Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 8
feat(kernel): add preview/demo runtime mode with auto-login and simulated identity#676
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
ac56c39a463c0f8e5aa991909884File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -14,8 +14,8 @@ Defines the operating mode of the kernel | ||||||
| ## TypeScript Usage | ||||||
| ```typescript | ||||||
| import { KernelContext, RuntimeMode } from '@objectstack/spec/kernel'; | ||||||
| import type { KernelContext, RuntimeMode } from '@objectstack/spec/kernel'; | ||||||
| import { KernelContext, RuntimeMode, PreviewModeConfig } from '@objectstack/spec/kernel'; | ||||||
| import type { KernelContext, RuntimeMode, PreviewModeConfig } from '@objectstack/spec/kernel'; | ||||||
| // Validate data | ||||||
| const result = KernelContext.parse(data); | ||||||
| @@ -30,13 +30,14 @@ const result = KernelContext.parse(data); | ||||||
| | Property | Type | Required | Description | | ||||||
| | :--- | :--- | :--- | :--- | | ||||||
| | **instanceId** | `string` | ✅ | Unique UUID for this running kernel process | | ||||||
| | **mode** | `Enum<'development' \| 'production' \| 'test' \| 'provisioning'>` | ✅ | Kernel operating mode | | ||||||
| | **mode** | `Enum<'development' \| 'production' \| 'test' \| 'provisioning' \| 'preview'>` | ✅ | Kernel operating mode | | ||||||
| | **version** | `string` | ✅ | Kernel version | | ||||||
| | **appName** | `string` | optional | Host application name | | ||||||
| | **cwd** | `string` | ✅ | Current working directory | | ||||||
| | **workspaceRoot** | `string` | optional | Workspace root if different from cwd | | ||||||
| | **startTime** | `integer` | ✅ | Boot timestamp (ms) | | ||||||
| | **features** | `Record<string, boolean>` | ✅ | Global feature toggles | | ||||||
| | **previewMode** | `PreviewModeConfig` | optional | Preview/demo mode configuration (used when mode is `'preview'`) | | ||||||
| --- | ||||||
| @@ -47,11 +48,56 @@ Kernel operating mode | ||||||
| ### Allowed Values | ||||||
| * `development` | ||||||
| * `production` | ||||||
| * `test` | ||||||
| * `provisioning` | ||||||
| * `development` — Hot-reload, verbose logging | ||||||
| * `production` — Optimized, strict security | ||||||
| * `test` — Mocked interfaces | ||||||
| * `provisioning` — Setup/Migration mode | ||||||
| * `preview` — Demo/preview mode — bypass auth, simulate admin identity | ||||||
| --- | ||||||
| ## PreviewModeConfig | ||||||
| Configures the kernel's preview/demo mode behaviour. When `mode` is set to `'preview'`, the platform | ||||||
CopilotAI | ||||||
| Configures the kernel's preview/demo mode behaviour. When `mode` is set to `'preview'`, the platform | |
| Configures the kernel's preview/demo mode behavior. When `mode` is set to `'preview'`, the platform |
Uh oh!
There was an error while loading. Please reload this page.
CopilotAIFeb 14, 2026
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.
The TypeScript usage snippet is incorrect:
KernelContextis a type (not a Zod schema), soKernelContext.parse(...)and the value import will fail. Also importing the same identifiers as both value and type in separate import statements is invalid/redundant. Update the snippet to import and useKernelContextSchema.parse(...), and only importKernelContext/RuntimeMode/PreviewModeConfigas types if needed.