Command capabilities / JSON Schema
Workspai Command Capabilities
Defines the versioned command capabilities v1 boundary used by Workspai and its consumers.
- Schema version
rapidkit-command-capabilities-v1- Contract path
contracts/command-capabilities.v1.json- Publication
- synced-supporting-contract
- Defined fields
- 40
- Artifact bindings
- 0
Why this contract exists
Architecture role
Publishes the supported CLI capability surface for documentation and external consumers.
Consumption boundary
- • Workspai CLI
- • Documentation portal
- • Extensions and adapters
Related commands
Commands are linked only when the runtime contract identifies a direct production relationship. Supporting contracts may be consumed without having a single producer command.
Produced artifacts
These durable files are emitted by registered commands and validated against this contract.
No canonical file artifact is registered for this contract. It may describe capabilities, embedded data, runtime exchange, or supporting state instead of a standalone report.
Field reference
Every declared schema property or published capability path is listed here. Required means the contract declares or publishes that field at the shown boundary.
| Field path | Type | Required | Meaning | Constraints |
|---|---|---|---|---|
| cli | string | Yes | Defines the cli value at this contract boundary. | const: "workspai" |
| commandMap | object | Yes | Defines the commandmap value at this contract boundary. | — |
| commands | object | Yes | Defines the commands value at this contract boundary. | additionalProperties: false |
| commands.coreBacked | array | Yes | Defines the corebacked value at this contract boundary. | — |
| commands.npmOwned | array | Yes | Defines the npmowned value at this contract boundary. | — |
| commands.projectScoped | array | Yes | Defines the projectscoped value at this contract boundary. | — |
| contractCatalog | object | Yes | Defines the contractcatalog value at this contract boundary. | additionalProperties: true |
| contracts | object | Yes | Defines the contracts value at this contract boundary. | additionalProperties: true |
| cwd | string | Yes | Defines the cwd value at this contract boundary. | minLength: 1 |
| runtimeInventory | object | Yes | Defines the runtimeinventory value at this contract boundary. | additionalProperties: false |
| runtimeInventory.commands | array | Yes | Defines the commands value at this contract boundary. | — |
| runtimeInventory.commands[].aliases | array | Yes | Defines the aliases value at this contract boundary. | — |
| runtimeInventory.commands[].arguments | array | Yes | Defines the arguments value at this contract boundary. | — |
| runtimeInventory.commands[].arguments[].name | string | Yes | Defines the name value at this contract boundary. | minLength: 1 |
| runtimeInventory.commands[].arguments[].required | boolean | Yes | Defines the required value at this contract boundary. | — |
| runtimeInventory.commands[].arguments[].variadic | boolean | Yes | Defines the variadic value at this contract boundary. | — |
| runtimeInventory.commands[].command | string | Yes | Defines the command value at this contract boundary. | minLength: 1 |
| runtimeInventory.commands[].description | string | Yes | Defines the description value at this contract boundary. | — |
| runtimeInventory.commands[].hidden | boolean | Yes | Defines the hidden value at this contract boundary. | — |
| runtimeInventory.commands[].options | array | Yes | Defines the options value at this contract boundary. | — |
| runtimeInventory.commands[].options[].attributeName | string | null | Yes | Defines the attributename value at this contract boundary. | — |
| runtimeInventory.commands[].options[].flags | string | Yes | Defines the flags value at this contract boundary. | minLength: 1 |
| runtimeInventory.commands[].parent | string | null | Yes | Defines the parent value at this contract boundary. | — |
| runtimeInventory.commands[].path | array | Yes | Defines the path value at this contract boundary. | minItems: 1 |
| runtimeInventory.commands[].registrationKind | enum | Yes | Defines the registrationkind value at this contract boundary. | enum: commander, manual-handler |
| runtimeInventory.integrity | object | Yes | Defines the integrity value at this contract boundary. | additionalProperties: false |
| runtimeInventory.integrity.declaredButUnregistered | array | Yes | Defines the declaredbutunregistered value at this contract boundary. | — |
| runtimeInventory.integrity.declaredScopedButUnregistered | array | Yes | Defines the declaredscopedbutunregistered value at this contract boundary. | — |
| runtimeInventory.integrity.ok | boolean | Yes | Defines the ok value at this contract boundary. | — |
| runtimeInventory.integrity.registeredButUndeclared | array | Yes | Defines the registeredbutundeclared value at this contract boundary. | — |
| runtimeInventory.integrity.registeredScopedButUndeclared | array | Yes | Defines the registeredscopedbutundeclared value at this contract boundary. | — |
| runtimeInventory.schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspai-cli-runtime-command-inventory-v1" |
| runtimeInventory.topLevelCommands | array | Yes | Defines the toplevelcommands value at this contract boundary. | — |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "rapidkit-command-capabilities-v1" |
| scope | string | Yes | Defines the scope value at this contract boundary. | const: "global" |
| version | string | Yes | Defines the version value at this contract boundary. | minLength: 1 |
| workspace | object | Yes | Defines the workspace value at this contract boundary. | additionalProperties: false |
| workspace.command | string | Yes | Defines the command value at this contract boundary. | const: "workspace" |
| workspace.intelligenceSubcommands | array | Yes | Defines the intelligencesubcommands value at this contract boundary. | — |
| workspace.subcommands | array | Yes | Defines the subcommands value at this contract boundary. | — |
Canonical machine-readable definition
The raw synchronized contract remains authoritative. The educational sections above are projections of this definition.
Show raw JSON
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://workspai.dev/schemas/command-capabilities.v1.json",
"title": "Workspai Command Capabilities",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"scope",
"cli",
"version",
"cwd",
"contracts",
"contractCatalog",
"commands",
"workspace",
"commandMap",
"runtimeInventory"
],
"properties": {
"schemaVersion": {
"const": "rapidkit-command-capabilities-v1"
},
"scope": {
"const": "global"
},
"cli": {
"const": "workspai"
},
"version": {
"type": "string",
"minLength": 1
},
"cwd": {
"type": "string",
"minLength": 1
},
"contracts": {
"type": "object",
"additionalProperties": true
},
"contractCatalog": {
"type": "object",
"additionalProperties": true
},
"commands": {
"type": "object",
"additionalProperties": false,
"required": [
"npmOwned",
"coreBacked",
"projectScoped"
],
"properties": {
"npmOwned": {
"type": "array",
"items": {
"type": "string"
}
},
"coreBacked": {
"type": "array",
"items": {
"type": "string"
}
},
"projectScoped": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"workspace": {
"type": "object",
"additionalProperties": false,
"required": [
"command",
"subcommands",
"intelligenceSubcommands"
],
"properties": {
"command": {
"const": "workspace"
},
"subcommands": {
"type": "array",
"items": {
"type": "string"
}
},
"intelligenceSubcommands": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"commandMap": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"required": [
"command",
"owner",
"status",
"scope"
],
"properties": {
"command": {
"type": "string",
"minLength": 1
},
"owner": {
"enum": [
"npm-wrapper",
"python-core",
"runtime-adapter"
]
},
"status": {
"enum": [
"supported",
"delegated",
"runtime-dependent"
]
},
"scope": {
"type": "string",
"minLength": 1
}
}
}
},
"runtimeInventory": {
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"commands",
"topLevelCommands",
"integrity"
],
"properties": {
"schemaVersion": {
"const": "workspai-cli-runtime-command-inventory-v1"
},
"commands": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"path",
"command",
"parent",
"registrationKind",
"aliases",
"description",
"hidden",
"arguments",
"options"
],
"properties": {
"path": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
},
"command": {
"type": "string",
"minLength": 1
},
"parent": {
"type": [
"string",
"null"
]
},
"registrationKind": {
"enum": [
"commander",
"manual-handler"
]
},
"aliases": {
"type": "array",
"items": {
"type": "string"
}
},
"description": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"arguments": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"name",
"required",
"variadic"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"required": {
"type": "boolean"
},
"variadic": {
"type": "boolean"
}
}
}
},
"options": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"flags",
"attributeName"
],
"properties": {
"flags": {
"type": "string",
"minLength": 1
},
"attributeName": {
"type": [
"string",
"null"
]
}
}
}
}
}
}
},
"topLevelCommands": {
"type": "array",
"items": {
"type": "string"
}
},
"integrity": {
"type": "object",
"additionalProperties": false,
"required": [
"ok",
"registeredButUndeclared",
"declaredButUnregistered",
"registeredScopedButUndeclared",
"declaredScopedButUnregistered"
],
"properties": {
"ok": {
"type": "boolean"
},
"registeredButUndeclared": {
"type": "array",
"items": {
"type": "string"
}
},
"declaredButUnregistered": {
"type": "array",
"items": {
"type": "string"
}
},
"registeredScopedButUndeclared": {
"type": "array",
"items": {
"type": "string"
}
},
"declaredScopedButUnregistered": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}