Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/studio/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ async function ensureKernel(): Promise<ObjectKernel> {
}), 'turso'));
await kernel.use(new AppPlugin(studioConfig));

// SetupPlugin must load BEFORE other plugins that contribute navigation items
// so that the setupNav service is available during their init() phase
await kernel.use(new SetupPlugin());

// Auth plugin — uses better-auth for real authentication
// Prefer VERCEL_PROJECT_PRODUCTION_URL (stable across deployments)
// over VERCEL_URL (unique per deployment, causes origin mismatch).
Expand All @@ -129,7 +133,6 @@ async function ensureKernel(): Promise<ObjectKernel> {
await kernel.use(new AIServicePlugin());
await kernel.use(new AutomationServicePlugin());
await kernel.use(new AnalyticsServicePlugin());
await kernel.use(new SetupPlugin());

// Broker shim — bridges HttpDispatcher → ObjectQL engine
(kernel as any).broker = createBrokerShim(kernel);
Expand Down
4 changes: 3 additions & 1 deletion apps/studio/src/mocks/createKernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ export async function createKernel(options: KernelOptions) {
}

// Register services and plugins
// SetupPlugin must load BEFORE other plugins that contribute navigation items
// so that the setupNav service is available during their init() phase
await kernel.use(new SetupPlugin());
await kernel.use(new FeedServicePlugin());
await kernel.use(new MetadataPlugin({ watch: false }));
await kernel.use(new AIServicePlugin());
await kernel.use(new AutomationServicePlugin());
await kernel.use(new AnalyticsServicePlugin());
await kernel.use(new SetupPlugin());

// Protocol service is registered automatically by ObjectQLPlugin.init()
// via ObjectStackProtocolImplementation (which uses SchemaRegistry internally).
Expand Down
Loading