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
4 changes: 4 additions & 0 deletions content/docs/references/system/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ This section contains all protocol schemas for the system layer of ObjectStack.
<Card href="./object-storage" title="Object Storage" description="Source: packages/spec/src/system/object-storage.zod.ts" />
<Card href="./plugin" title="Plugin" description="Source: packages/spec/src/system/plugin.zod.ts" />
<Card href="./plugin-capability" title="Plugin Capability" description="Source: packages/spec/src/system/plugin-capability.zod.ts" />
<Card href="./plugin-lifecycle-events" title="Plugin Lifecycle Events" description="Source: packages/spec/src/system/plugin-lifecycle-events.zod.ts" />
<Card href="./plugin-validator" title="Plugin Validator" description="Source: packages/spec/src/system/plugin-validator.zod.ts" />
<Card href="./search-engine" title="Search Engine" description="Source: packages/spec/src/system/search-engine.zod.ts" />
<Card href="./service-registry" title="Service Registry" description="Source: packages/spec/src/system/service-registry.zod.ts" />
<Card href="./startup-orchestrator" title="Startup Orchestrator" description="Source: packages/spec/src/system/startup-orchestrator.zod.ts" />
<Card href="./tracing" title="Tracing" description="Source: packages/spec/src/system/tracing.zod.ts" />
<Card href="./translation" title="Translation" description="Source: packages/spec/src/system/translation.zod.ts" />
</Cards>
Expand Down
4 changes: 4 additions & 0 deletions content/docs/references/system/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
"object-storage",
"plugin",
"plugin-capability",
"plugin-lifecycle-events",
"plugin-validator",
"search-engine",
"service-registry",
"startup-orchestrator",
"tracing",
"translation"
]
Expand Down
15 changes: 15 additions & 0 deletions packages/spec/json-schema/system/EventPhase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$ref": "#/definitions/EventPhase",
"definitions": {
"EventPhase": {
"type": "string",
"enum": [
"init",
"start",
"destroy"
],
"description": "Plugin lifecycle phase"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
33 changes: 33 additions & 0 deletions packages/spec/json-schema/system/HealthStatus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$ref": "#/definitions/HealthStatus",
"definitions": {
"HealthStatus": {
"type": "object",
"properties": {
"healthy": {
"type": "boolean",
"description": "Whether the plugin is healthy"
},
"timestamp": {
"type": "integer",
"description": "Unix timestamp in milliseconds when health check was performed"
},
"details": {
"type": "object",
"additionalProperties": {},
"description": "Optional plugin-specific health details"
},
"message": {
"type": "string",
"description": "Error message if plugin is unhealthy"
}
},
"required": [
"healthy",
"timestamp"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
30 changes: 30 additions & 0 deletions packages/spec/json-schema/system/HookRegisteredEvent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$ref": "#/definitions/HookRegisteredEvent",
"definitions": {
"HookRegisteredEvent": {
"type": "object",
"properties": {
"hookName": {
"type": "string",
"description": "Name of the hook"
},
"timestamp": {
"type": "integer",
"description": "Unix timestamp in milliseconds"
},
"handlerCount": {
"type": "integer",
"minimum": 0,
"description": "Number of handlers registered for this hook"
}
},
"required": [
"hookName",
"timestamp",
"handlerCount"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
34 changes: 34 additions & 0 deletions packages/spec/json-schema/system/HookTriggeredEvent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$ref": "#/definitions/HookTriggeredEvent",
"definitions": {
"HookTriggeredEvent": {
"type": "object",
"properties": {
"hookName": {
"type": "string",
"description": "Name of the hook"
},
"timestamp": {
"type": "integer",
"description": "Unix timestamp in milliseconds"
},
"args": {
"type": "array",
"description": "Arguments passed to the hook handlers"
},
"handlerCount": {
"type": "integer",
"minimum": 0,
"description": "Number of handlers that will handle this event"
}
},
"required": [
"hookName",
"timestamp",
"args"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
19 changes: 19 additions & 0 deletions packages/spec/json-schema/system/KernelEventBase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$ref": "#/definitions/KernelEventBase",
"definitions": {
"KernelEventBase": {
"type": "object",
"properties": {
"timestamp": {
"type": "integer",
"description": "Unix timestamp in milliseconds"
}
},
"required": [
"timestamp"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
29 changes: 29 additions & 0 deletions packages/spec/json-schema/system/KernelReadyEvent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$ref": "#/definitions/KernelReadyEvent",
"definitions": {
"KernelReadyEvent": {
"type": "object",
"properties": {
"timestamp": {
"type": "integer",
"description": "Unix timestamp in milliseconds"
},
"duration": {
"type": "number",
"minimum": 0,
"description": "Total initialization duration in milliseconds"
},
"pluginCount": {
"type": "integer",
"minimum": 0,
"description": "Number of plugins initialized"
}
},
"required": [
"timestamp"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
23 changes: 23 additions & 0 deletions packages/spec/json-schema/system/KernelShutdownEvent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$ref": "#/definitions/KernelShutdownEvent",
"definitions": {
"KernelShutdownEvent": {
"type": "object",
"properties": {
"timestamp": {
"type": "integer",
"description": "Unix timestamp in milliseconds"
},
"reason": {
"type": "string",
"description": "Reason for kernel shutdown"
}
},
"required": [
"timestamp"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
46 changes: 46 additions & 0 deletions packages/spec/json-schema/system/PluginErrorEvent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$ref": "#/definitions/PluginErrorEvent",
"definitions": {
"PluginErrorEvent": {
"type": "object",
"properties": {
"pluginName": {
"type": "string",
"description": "Name of the plugin"
},
"timestamp": {
"type": "integer",
"description": "Unix timestamp in milliseconds when event occurred"
},
"error": {
"description": "Error object"
},
"phase": {
"type": "string",
"enum": [
"init",
"start",
"destroy"
],
"description": "Lifecycle phase where error occurred"
},
"errorMessage": {
"type": "string",
"description": "Error message"
},
"errorStack": {
"type": "string",
"description": "Error stack trace"
}
},
"required": [
"pluginName",
"timestamp",
"error",
"phase"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
24 changes: 24 additions & 0 deletions packages/spec/json-schema/system/PluginEventBase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$ref": "#/definitions/PluginEventBase",
"definitions": {
"PluginEventBase": {
"type": "object",
"properties": {
"pluginName": {
"type": "string",
"description": "Name of the plugin"
},
"timestamp": {
"type": "integer",
"description": "Unix timestamp in milliseconds when event occurred"
}
},
"required": [
"pluginName",
"timestamp"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
31 changes: 31 additions & 0 deletions packages/spec/json-schema/system/PluginLifecycleEventType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$ref": "#/definitions/PluginLifecycleEventType",
"definitions": {
"PluginLifecycleEventType": {
"type": "string",
"enum": [
"kernel:ready",
"kernel:shutdown",
"kernel:before-init",
"kernel:after-init",
"plugin:registered",
"plugin:before-init",
"plugin:init",
"plugin:after-init",
"plugin:before-start",
"plugin:started",
"plugin:after-start",
"plugin:before-destroy",
"plugin:destroyed",
"plugin:after-destroy",
"plugin:error",
"service:registered",
"service:unregistered",
"hook:registered",
"hook:triggered"
],
"description": "Plugin lifecycle event type"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
38 changes: 38 additions & 0 deletions packages/spec/json-schema/system/PluginLifecyclePhaseEvent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$ref": "#/definitions/PluginLifecyclePhaseEvent",
"definitions": {
"PluginLifecyclePhaseEvent": {
"type": "object",
"properties": {
"pluginName": {
"type": "string",
"description": "Name of the plugin"
},
"timestamp": {
"type": "integer",
"description": "Unix timestamp in milliseconds when event occurred"
},
"duration": {
"type": "number",
"minimum": 0,
"description": "Duration of the lifecycle phase in milliseconds"
},
"phase": {
"type": "string",
"enum": [
"init",
"start",
"destroy"
],
"description": "Lifecycle phase"
}
},
"required": [
"pluginName",
"timestamp"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
Loading
Loading