-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add plugin-setup and services to Studio deployment #1063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,9 +31,12 @@ import { createHonoApp } from '@objectstack/hono'; | |
| import { AuthPlugin } from '@objectstack/plugin-auth'; | ||
| import { SecurityPlugin } from '@objectstack/plugin-security'; | ||
| import { AuditPlugin } from '@objectstack/plugin-audit'; | ||
| import { SetupPlugin } from '@objectstack/plugin-setup'; | ||
| import { FeedServicePlugin } from '@objectstack/service-feed'; | ||
| import { MetadataPlugin } from '@objectstack/metadata'; | ||
| import { AIServicePlugin } from '@objectstack/service-ai'; | ||
| import { AutomationServicePlugin } from '@objectstack/service-automation'; | ||
| import { AnalyticsServicePlugin } from '@objectstack/service-analytics'; | ||
| import { handle } from '@hono/node-server/vercel'; | ||
| import { Hono } from 'hono'; | ||
| import { cors } from 'hono/cors'; | ||
|
|
@@ -127,6 +130,9 @@ async function ensureKernel(): Promise<ObjectKernel> { | |
| 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()); | ||
|
Comment on lines
131
to
+135
|
||
|
|
||
| // Broker shim — bridges HttpDispatcher → ObjectQL engine | ||
| (kernel as any).broker = createBrokerShim(kernel); | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,12 @@ import { ObjectKernel, DriverPlugin, AppPlugin } from '@objectstack/runtime'; | |||||||||||||||||||||||||||
| import { ObjectQLPlugin } from '@objectstack/objectql'; | ||||||||||||||||||||||||||||
| import { InMemoryDriver } from '@objectstack/driver-memory'; | ||||||||||||||||||||||||||||
| import { MSWPlugin } from '@objectstack/plugin-msw'; | ||||||||||||||||||||||||||||
| import { SetupPlugin } from '@objectstack/plugin-setup'; | ||||||||||||||||||||||||||||
| import { AutomationServicePlugin } from '@objectstack/service-automation'; | ||||||||||||||||||||||||||||
| import { AnalyticsServicePlugin } from '@objectstack/service-analytics'; | ||||||||||||||||||||||||||||
| import { MetadataPlugin } from '@objectstack/metadata'; | ||||||||||||||||||||||||||||
| import { AIServicePlugin } from '@objectstack/service-ai'; | ||||||||||||||||||||||||||||
| import { FeedServicePlugin } from '@objectstack/service-feed'; | ||||||||||||||||||||||||||||
| import { createBrokerShim } from '../lib/create-broker-shim'; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| // System object definitions — resolved via Vite aliases to plugin source (no runtime deps) | ||||||||||||||||||||||||||||
|
|
@@ -75,6 +81,14 @@ export async function createKernel(options: KernelOptions) { | |||||||||||||||||||||||||||
| await kernel.use(new AppPlugin(appConfig)); | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| // Register services and plugins | ||||||||||||||||||||||||||||
| 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()); | ||||||||||||||||||||||||||||
|
Comment on lines
+85
to
+90
|
||||||||||||||||||||||||||||
| 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()); | |
| // SetupPlugin must be registered BEFORE services that contribute to Setup navigation | |
| 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()); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
randomUUIDpolyfill currently returns a constant all-zero UUID.service-aiuses this to generate conversation/message IDs; returning a constant will cause ID collisions and can break any code that assumes IDs are unique (e.g., inserts keyed byid, UI lists keyed by id). Prefer delegating toglobalThis.crypto.randomUUID()when available, or generate a simple unique/monotonic UUID fallback (e.g., counter + timestamp) so IDs remain stable but non-colliding in the browser build.