Plugin Capability — Kernel Protocol reference
Defines the standard way plugins declare their capabilities, implementations, and conformance levels to ensure interoperability across vendors.
Defines the standard way plugins declare their capabilities, implementations,
and conformance levels to ensure interoperability across vendors.
Based on the Protocol-Oriented Architecture pattern similar to:
- Kubernetes CRDs (Custom Resource Definitions)
- OSGi Service Registry
- Eclipse Extension Points
Source: packages/spec/src/kernel/plugin-capability.zod.ts
import { CapabilityConformanceLevelSchema, ExtensionPointSchema, PluginCapabilitySchema, PluginCapabilityManifestSchema, PluginDependencySchema, PluginInterfaceSchema, ProtocolFeatureSchema, ProtocolReferenceSchema, ProtocolVersionSchema } from '@objectstack/spec/kernel';
import type { CapabilityConformanceLevel, ExtensionPoint, PluginCapability, PluginCapabilityManifest, PluginDependency, PluginInterface, ProtocolFeature, ProtocolReference, ProtocolVersion } from '@objectstack/spec/kernel';
// Validate data
const result = CapabilityConformanceLevelSchema.parse(data);
Level of protocol conformance
full
partial
experimental
deprecated
| Property | Type | Required | Description |
|---|
| id | string | ✅ | Unique extension point identifier |
| name | string | ✅ | |
| description | string | optional | |
| type | Enum<'action' | 'hook' | 'widget' | 'provider' | 'transformer' | 'validator' | 'decorator'> | ✅ | |
| contract | { input?: string; output?: string; signature?: string } | optional | |
| cardinality | Enum<'single' | 'multiple'> | optional (default: "multiple") | Whether multiple extensions can register to this point |
| Property | Type | Required | Description |
|---|
| input | string | optional | Input type/schema |
| output | string | optional | Output type/schema |
| signature | string | optional | Function signature if applicable |
| Property | Type | Required | Description |
|---|
| protocol | { id: string; label: string; version: object; specification?: string; … } | ✅ | |
| conformance | Enum<'full' | 'partial' | 'experimental' | 'deprecated'> | optional (default: "full") | Level of protocol conformance |
| implementedFeatures | string[] | optional | List of implemented feature names |
| features | { name: string; enabled?: boolean; description?: string; sinceVersion?: string; … }[] | optional | |
| metadata | Record<string, any> | optional | |
| certified | boolean | optional (default: false) | Has passed official conformance tests |
| certificationDate | string | optional | |
| Property | Type | Required | Description |
|---|
| id | string | ✅ | Unique protocol identifier (e.g., com.objectstack.protocol.storage.v1) |
| label | string | ✅ | |
| version | { major: integer; minor: integer; patch: integer } | ✅ | Semantic version of the protocol |
| specification | string | optional | URL or path to protocol specification |
| description | string | optional | |
| Property | Type | Required | Description |
|---|
| name | string | ✅ | Feature identifier within the protocol |
| enabled | boolean | optional (default: true) | |
| description | string | optional | |
| sinceVersion | string | optional | Version when this feature was added |
| deprecatedSince | string | optional | Version when deprecated |
| Property | Type | Required | Description |
|---|
| implements | { protocol: object; conformance?: Enum<'full' | 'partial' | 'experimental' | 'deprecated'>; implementedFeatures?: string[]; features?: object[]; … }[] | optional | List of protocols this plugin conforms to |
| provides | { id: string; name: string; description?: string; version: object; … }[] | optional | Services/APIs this plugin offers to others |
| requires | { pluginId: string; version: string; optional?: boolean; reason?: string; … }[] | optional | Required plugins and their capabilities |
| extensionPoints | { id: string; name: string; description?: string; type: Enum<'action' | 'hook' | 'widget' | 'provider' | 'transformer' | 'validator' | 'decorator'>; … }[] | optional | Points where other plugins can extend this plugin |
| extensions | { targetPluginId: string; extensionPointId: string; implementation: string; priority?: integer }[] | optional | Extensions contributed to other plugins |
| Property | Type | Required | Description |
|---|
| protocol | { id: string; label: string; version: object; specification?: string; … } | ✅ | |
| conformance | Enum<'full' | 'partial' | 'experimental' | 'deprecated'> | optional (default: "full") | Level of protocol conformance |
| implementedFeatures | string[] | optional | List of implemented feature names |
| features | { name: string; enabled?: boolean; description?: string; sinceVersion?: string; … }[] | optional | |
| metadata | Record<string, any> | optional | |
| certified | boolean | optional (default: false) | Has passed official conformance tests |
| certificationDate | string | optional | |
| Property | Type | Required | Description |
|---|
| id | string | ✅ | Unique interface identifier |
| name | string | ✅ | |
| description | string | optional | |
| version | { major: integer; minor: integer; patch: integer } | ✅ | Semantic version of the protocol |
| methods | { name: string; description?: string; parameters?: object[]; returnType?: string; … }[] | ✅ | |
| events | { name: string; description?: string; payload?: string }[] | optional | |
| stability | Enum<'stable' | 'beta' | 'alpha' | 'experimental'> | optional (default: "stable") | |
| Property | Type | Required | Description |
|---|
| pluginId | string | ✅ | Required plugin identifier |
| version | string | ✅ | Semantic version constraint |
| optional | boolean | optional (default: false) | |
| reason | string | optional | |
| requiredCapabilities | string[] | optional | Protocol IDs the dependency must support |
| Property | Type | Required | Description |
|---|
| id | string | ✅ | Unique extension point identifier |
| name | string | ✅ | |
| description | string | optional | |
| type | Enum<'action' | 'hook' | 'widget' | 'provider' | 'transformer' | 'validator' | 'decorator'> | ✅ | |
| contract | { input?: string; output?: string; signature?: string } | optional | |
| cardinality | Enum<'single' | 'multiple'> | optional (default: "multiple") | Whether multiple extensions can register to this point |
| Property | Type | Required | Description |
|---|
| targetPluginId | string | ✅ | Plugin ID being extended |
| extensionPointId | string | ✅ | Extension point identifier |
| implementation | string | ✅ | Path to implementation module |
| priority | integer | optional (default: 100) | Registration priority (lower = higher priority) |
| Property | Type | Required | Description |
|---|
| pluginId | string | ✅ | Required plugin identifier |
| version | string | ✅ | Semantic version constraint |
| optional | boolean | optional (default: false) | |
| reason | string | optional | |
| requiredCapabilities | string[] | optional | Protocol IDs the dependency must support |
| Property | Type | Required | Description |
|---|
| id | string | ✅ | Unique interface identifier |
| name | string | ✅ | |
| description | string | optional | |
| version | { major: integer; minor: integer; patch: integer } | ✅ | Semantic version of the protocol |
| methods | { name: string; description?: string; parameters?: object[]; returnType?: string; … }[] | ✅ | |
| events | { name: string; description?: string; payload?: string }[] | optional | |
| stability | Enum<'stable' | 'beta' | 'alpha' | 'experimental'> | optional (default: "stable") | |
| Property | Type | Required | Description |
|---|
| name | string | ✅ | Method name |
| description | string | optional | |
| parameters | { name: string; type: string; required?: boolean; description?: string }[] | optional | |
| returnType | string | optional | Return value type |
| async | boolean | optional (default: false) | Whether method returns a Promise |
| Property | Type | Required | Description |
|---|
| name | string | ✅ | Event name |
| description | string | optional | |
| payload | string | optional | Event payload type |
| Property | Type | Required | Description |
|---|
| name | string | ✅ | Feature identifier within the protocol |
| enabled | boolean | optional (default: true) | |
| description | string | optional | |
| sinceVersion | string | optional | Version when this feature was added |
| deprecatedSince | string | optional | Version when deprecated |
| Property | Type | Required | Description |
|---|
| id | string | ✅ | Unique protocol identifier (e.g., com.objectstack.protocol.storage.v1) |
| label | string | ✅ | |
| version | { major: integer; minor: integer; patch: integer } | ✅ | Semantic version of the protocol |
| specification | string | optional | URL or path to protocol specification |
| description | string | optional | |
Semantic version of the protocol
| Property | Type | Required | Description |
|---|
| major | integer | ✅ | |
| minor | integer | ✅ | |
| patch | integer | ✅ | |