Platform contracts / JSON Schema
Workspai CLI Operation Result
Defines the versioned cli operation result v1 boundary used by Workspai and its consumers.
- Schema version
workspai-cli-operation-result-v1- Contract path
contracts/cli-operation-result.v1.json- Publication
- json-schema
- Defined fields
- 12
- Artifact bindings
- 0
Why this contract exists
Architecture role
Defines a versioned interoperability boundary used by Workspai and contract-aware consumers.
Consumption boundary
- • Workspai CLI
- • Contract-aware integrations
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.
This is a supporting, capability, cache, compatibility, or consumer contract. It has no single direct producer command in the canonical Workspace Intelligence execution registry.
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 |
|---|---|---|---|---|
| artifact | any | No | Defines the artifact value at this contract boundary. | — |
| context | object | No | Defines the context value at this contract boundary. | additionalProperties: true |
| error | object | No | Defines the error value at this contract boundary. | additionalProperties: false |
| error.code | string | Yes | Defines the code value at this contract boundary. | minLength: 1 |
| error.message | string | Yes | Defines the message value at this contract boundary. | minLength: 1 |
| examples | array | No | Defines the examples value at this contract boundary. | — |
| exitCode | integer | Yes | Defines the exitcode value at this contract boundary. | minimum: 0 |
| nextActions | array | No | Defines the nextactions value at this contract boundary. | — |
| operation | string | Yes | Defines the operation value at this contract boundary. | minLength: 1 |
| outputPath | string | No | Defines the outputpath value at this contract boundary. | minLength: 1 |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspai-cli-operation-result-v1" |
| status | enum | Yes | Defines the status value at this contract boundary. | enum: success, error |
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/cli-operation-result.v1.json",
"title": "Workspai CLI Operation Result",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"operation",
"status",
"exitCode"
],
"properties": {
"schemaVersion": {
"const": "workspai-cli-operation-result-v1"
},
"operation": {
"type": "string",
"minLength": 1
},
"status": {
"enum": [
"success",
"error"
]
},
"exitCode": {
"type": "integer",
"minimum": 0
},
"artifact": {},
"outputPath": {
"type": "string",
"minLength": 1
},
"error": {
"type": "object",
"additionalProperties": false,
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"minLength": 1
},
"message": {
"type": "string",
"minLength": 1
}
}
},
"context": {
"type": "object",
"additionalProperties": true
},
"examples": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"nextActions": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
}
},
"allOf": [
{
"if": {
"properties": {
"status": {
"const": "success"
}
},
"required": [
"status"
]
},
"then": {
"required": [
"artifact"
],
"not": {
"required": [
"error"
]
}
}
},
{
"if": {
"properties": {
"status": {
"const": "error"
}
},
"required": [
"status"
]
},
"then": {
"required": [
"error"
],
"not": {
"required": [
"artifact"
]
}
}
}
]
}