| title | Manifest |
|---|---|
| description | Manifest protocol schemas |
{/*
Structured permission grants requested by a plugin (ADR-0025 §3.2).
Each list scopes one capability surface the plugin may touch. The
install-time consent flow (ADR §3.5 step 2) turns this declaration into
the persisted granted_permissions set enforced at load by the
PluginPermissionEnforcer.
@example
import { Manifest, ManifestPermissions, PluginEngines, PluginIntegrity, PluginPackaging, PluginPermissions, PluginRuntime } from '@objectstack/spec/kernel';
import type { Manifest, ManifestPermissions, PluginEngines, PluginIntegrity, PluginPackaging, PluginPermissions, PluginRuntime } from '@objectstack/spec/kernel';
// Validate data
const result = Manifest.parse(data);| Property | Type | Required | Description |
|---|---|---|---|
| id | string |
✅ | Unique package identifier (reverse domain style) |
| namespace | string |
optional | Short namespace identifier; also the mandatory prefix of every object name (e.g. "todo" → object names "todo_task", "todo_project") |
| defaultDatasource | string |
optional | Default datasource for all objects in this package |
| version | string |
✅ | Package version (semantic versioning) |
| type | Enum<'plugin' | 'ui' | 'driver' | 'server' | 'app' | 'theme' | 'agent' | 'objectql' | 'module' | 'gateway' | 'adapter'> |
✅ | Type of package |
| scope | Enum<'cloud' | 'system' | 'project'> |
optional | Deployment scope: cloud | system | project |
| name | string |
✅ | Human-readable package name |
| description | string |
optional | Package description |
| permissions | string[] | { services?: string[]; hooks?: string[]; network?: string[]; fs?: string[] } |
optional | Required permissions: legacy string[] or structured plugin block (ADR-0025 §3.2) |
| objects | string[] |
optional | Glob patterns for ObjectQL schemas files |
| datasources | string[] |
optional | Glob patterns for Datasource definitions |
| dependencies | Record<string, string> |
optional | Package dependencies |
| configuration | { title?: string; properties: Record<string, { type: Enum<'string' | 'number' | 'boolean' | 'array' | 'object'>; default?: any; description?: string; required?: boolean; … }> } |
optional | Plugin configuration settings |
| contributes | { kinds?: { id: string; globs: string[]; description?: string }[]; events?: string[]; menus?: Record<string, { id: string; label: string; command?: string }[]>; themes?: { id: string; label: string; path: string }[]; … } |
optional | Platform contributions |
| data | { object: string; externalId?: string; mode?: Enum<'insert' | 'update' | 'upsert' | 'replace' | 'ignore'>; env?: Enum<'prod' | 'dev' | 'test'>[]; … }[] |
optional | Initial seed data (prefer top-level data field) |
| capabilities | { implements?: { protocol: object; conformance?: Enum<'full' | 'partial' | 'experimental' | 'deprecated'>; implementedFeatures?: string[]; features?: { name: string; enabled?: boolean; description?: string; sinceVersion?: string; … }[]; … }[]; provides?: { id: string; name: string; description?: string; version: object; … }[]; requires?: { pluginId: string; version: string; optional?: boolean; reason?: string; … }[]; extensionPoints?: { id: string; name: string; description?: string; type: Enum<'action' | 'hook' | 'widget' | 'provider' | 'transformer' | 'validator' | 'decorator'>; … }[]; … } |
optional | Plugin capability declarations for interoperability |
| extensions | Record<string, any> |
optional | Extension points and contributions |
| navigationContributions | { app: string; group?: string; priority?: integer; items: { id: string; label: string; icon?: string; order?: number; … } | { id: string; label: string; icon?: string; order?: number; … } | { id: string; label: string; icon?: string; order?: number; … } | { id: string; label: string; icon?: string; order?: number; … } | { id: string; label: string; icon?: string; order?: number; … } | { id: string; label: string; icon?: string; order?: number; … } | { id: string; label: string; icon?: string; order?: number; … } | { type: 'separator'; id?: string; order?: number } | { id: string; label: string; icon?: string; order?: number; … }[] }[] |
optional | Navigation items this package contributes into apps owned by other packages |
| loading | { strategy?: Enum<'eager' | 'lazy' | 'parallel' | 'deferred' | 'on-demand'>; preload?: object; codeSplitting?: object; dynamicImport?: object; … } |
optional | Plugin loading and runtime behavior configuration |
| engine | { objectstack: string } |
optional | Platform compatibility requirements (legacy; superseded by engines) |
| engines | { platform?: string; protocol?: string } |
optional | Plugin compatibility ranges (ADR-0025 §3.2; supersedes engine) |
| runtime | Enum<'node' | 'sandbox' | 'worker'> |
optional | Plugin trust tier (ADR-0025 §3.6) |
| packaging | Enum<'bundled' | 'manifest-deps'> |
optional | Dependency packaging strategy (ADR-0025 §3.3) |
| integrity | Record<string, string> |
optional | Per-file content digests of the plugin artifact (ADR-0025 §3.2) |
This schema accepts one of the following structures:
Type: string[]
Structured plugin permission grants (ADR-0025 §3.2)
| Property | Type | Required | Description |
|---|---|---|---|
| services | string[] |
optional | Platform services the plugin may resolve (e.g. "object", "http") |
| hooks | string[] |
optional | Lifecycle hooks the plugin may register (e.g. "record.beforeInsert") |
| network | string[] |
optional | Network hosts the plugin may reach (e.g. "api.acme.com") |
| fs | string[] |
optional | Filesystem paths the plugin may access |
Plugin compatibility ranges (ADR-0025 §3.2)
| Property | Type | Required | Description |
|---|---|---|---|
| platform | string |
optional | ObjectStack platform release range (SemVer, e.g. ">=4.0 <5") |
| protocol | string |
optional | Runtime/metadata protocol range, checked first (ADR §3.10 #3) |
Dependency packaging strategy (ADR-0025 §3.3)
bundledmanifest-deps
Structured plugin permission grants (ADR-0025 §3.2)
| Property | Type | Required | Description |
|---|---|---|---|
| services | string[] |
optional | Platform services the plugin may resolve (e.g. "object", "http") |
| hooks | string[] |
optional | Lifecycle hooks the plugin may register (e.g. "record.beforeInsert") |
| network | string[] |
optional | Network hosts the plugin may reach (e.g. "api.acme.com") |
| fs | string[] |
optional | Filesystem paths the plugin may access |
Plugin trust tier (ADR-0025 §3.6)
nodesandboxworker
\{ "services": ["object", "http"], "hooks": ["record.beforeInsert"], "network": ["api.acme.com"], "fs": [] \}