Workspace operations / JSON Schema
Workspace Model Cache V1
Defines the versioned workspace model cache v1 boundary used by Workspai and its consumers.
- Schema version
workspace-model-cache.v1- Contract path
contracts/workspace-model-cache.v1.json- Publication
- json-schema
- Defined fields
- 8
- Artifact bindings
- 1
Why this contract exists
Architecture role
Defines canonical workspace state or a versioned projection of that state.
Consumption boundary
- • Workspai CLI
- • Workspace Intelligence consumers
- • IDEs and agents
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.
| Artifact path | Schema | Producer |
|---|---|---|
| .workspai/cache/workspace-model.v1.json | workspace-model-cache.v1 | workspai workspace model |
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 |
|---|---|---|---|---|
| cliVersion | string | Yes | Defines the cliversion value at this contract boundary. | minLength: 1 |
| generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | format: date-time |
| inputsHash | string | Yes | Defines the inputshash value at this contract boundary. | pattern: ^[a-f0-9]{64}$ |
| model | object | Yes | Defines the model value at this contract boundary. | additionalProperties: true |
| model.schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspace-model.v1" |
| projectSignatures | object | No | Defines the projectsignatures value at this contract boundary. | — |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspace-model-cache.v1" |
| workspaceFileSignatures | object | No | Defines the workspacefilesignatures 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",
"type": "object",
"required": [
"schemaVersion",
"cliVersion",
"inputsHash",
"generatedAt",
"model"
],
"properties": {
"schemaVersion": {
"const": "workspace-model-cache.v1"
},
"cliVersion": {
"type": "string",
"minLength": 1
},
"inputsHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"model": {
"type": "object",
"required": [
"schemaVersion"
],
"properties": {
"schemaVersion": {
"const": "workspace-model.v1"
}
},
"additionalProperties": true
},
"projectSignatures": {
"type": "object",
"additionalProperties": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
"workspaceFileSignatures": {
"type": "object",
"additionalProperties": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
}
},
"additionalProperties": true
}