Recovery and archival / JSON Schema
Workspai Activity Monitor Snapshot
A deterministic local projection of durable Workspai activity journals. It is observational and is not verification evidence by itself.
- Schema version
workspace-activity-monitor-snapshot.v1- Contract path
contracts/workspace-activity-monitor-snapshot.v1.json- Publication
- capability-contract
- Defined fields
- 69
- Artifact bindings
- 0
Why this contract exists
Architecture role
Preserves recoverable state and records the safety boundary of destructive operations.
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.
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 |
|---|---|---|---|---|
| $defs.artifact.at | string | Yes | Defines the at value at this contract boundary. | format: date-time |
| $defs.artifact.locator | string | Yes | Defines the locator value at this contract boundary. | — |
| $defs.attempt.attempt | integer | Yes | Defines the attempt value at this contract boundary. | minimum: 1 |
| $defs.attempt.durationMs | number | No | Defines the durationms value at this contract boundary. | minimum: 0 |
| $defs.attempt.progress | reference | No | Defines the progress value at this contract boundary. | ref: #/$defs/progress |
| $defs.attempt.startedAt | string | Yes | Defines the startedat value at this contract boundary. | format: date-time |
| $defs.attempt.status | reference | Yes | Defines the status value at this contract boundary. | ref: #/$defs/status |
| $defs.attempt.updatedAt | string | Yes | Defines the updatedat value at this contract boundary. | format: date-time |
| $defs.block.attempt | integer | No | Defines the attempt value at this contract boundary. | minimum: 1 |
| $defs.block.attempts | array | Yes | Defines the attempts value at this contract boundary. | — |
| $defs.block.durationMs | number | No | Defines the durationms value at this contract boundary. | minimum: 0 |
| $defs.block.evidenceBindings | array | No | Defines the evidencebindings value at this contract boundary. | maxItems: 100 |
| $defs.block.group | string | No | Defines the group value at this contract boundary. | minLength: 1 |
| $defs.block.id | string | Yes | Defines the id value at this contract boundary. | minLength: 1 |
| $defs.block.label | string | Yes | Defines the label value at this contract boundary. | minLength: 1 |
| $defs.block.layoutHint | enum | No | Defines the layouthint value at this contract boundary. | enum: source, process, gate, sink |
| $defs.block.order | number | Yes | Defines the order value at this contract boundary. | — |
| $defs.block.parentId | string | No | Defines the parentid value at this contract boundary. | minLength: 1 |
| $defs.block.progress | reference | No | Defines the progress value at this contract boundary. | ref: #/$defs/progress |
| $defs.block.status | reference | Yes | Defines the status value at this contract boundary. | ref: #/$defs/status |
| $defs.block.updatedAt | string | Yes | Defines the updatedat value at this contract boundary. | format: date-time |
| $defs.edge.fromBlockId | string | Yes | Defines the fromblockid value at this contract boundary. | minLength: 1 |
| $defs.edge.id | string | Yes | Defines the id value at this contract boundary. | minLength: 1 |
| $defs.edge.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: sequence, parallel, gate, handoff |
| $defs.edge.order | number | Yes | Defines the order value at this contract boundary. | — |
| $defs.edge.status | reference | Yes | Defines the status value at this contract boundary. | ref: #/$defs/status |
| $defs.edge.toBlockId | string | Yes | Defines the toblockid value at this contract boundary. | minLength: 1 |
| $defs.edge.updatedAt | string | Yes | Defines the updatedat value at this contract boundary. | format: date-time |
| $defs.evidenceBinding.graphSourceHash | string | No | Defines the graphsourcehash value at this contract boundary. | minLength: 1 |
| $defs.evidenceBinding.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: artifact, graph-entity, graph-relation, proof, project |
| $defs.evidenceBinding.provenance | enum | Yes | Defines the provenance value at this contract boundary. | enum: authoritative, observed |
| $defs.evidenceBinding.ref | string | Yes | Defines the ref value at this contract boundary. | minLength: 1 |
| $defs.evidenceBinding.role | enum | Yes | Defines the role value at this contract boundary. | enum: input, output, verification, subject |
| $defs.origin.id | string | Yes | Defines the id value at this contract boundary. | minLength: 1 |
| $defs.origin.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: project, workspace-root |
| $defs.origin.label | string | Yes | Defines the label value at this contract boundary. | minLength: 1 |
| $defs.progress.completed | number | No | Defines the completed value at this contract boundary. | minimum: 0 |
| $defs.progress.iteration | number | No | Defines the iteration value at this contract boundary. | minimum: 0 |
| $defs.progress.iterations | number | No | Defines the iterations value at this contract boundary. | minimum: 0 |
| $defs.progress.percent | number | No | Defines the percent value at this contract boundary. | minimum: 0 · maximum: 100 |
| $defs.progress.total | number | No | Defines the total value at this contract boundary. | minimum: 0 |
| $defs.run.artifacts | array | Yes | Defines the artifacts value at this contract boundary. | — |
| $defs.run.blocks | array | Yes | Defines the blocks value at this contract boundary. | — |
| $defs.run.command | array | Yes | Defines the command value at this contract boundary. | — |
| $defs.run.durationMs | number | No | Defines the durationms value at this contract boundary. | minimum: 0 |
| $defs.run.edges | array | Yes | Defines the edges value at this contract boundary. | — |
| $defs.run.evidenceBindings | array | No | Defines the evidencebindings value at this contract boundary. | maxItems: 100 |
| $defs.run.origin | reference | No | Defines the origin value at this contract boundary. | ref: #/$defs/origin |
| $defs.run.orphaned | boolean | No | Defines the orphaned value at this contract boundary. | — |
| $defs.run.parentRunId | string | No | Defines the parentrunid value at this contract boundary. | minLength: 1 |
| $defs.run.pid | integer | No | Defines the pid value at this contract boundary. | minimum: 1 |
| $defs.run.runId | string | Yes | Defines the runid value at this contract boundary. | minLength: 1 |
| $defs.run.startedAt | string | Yes | Defines the startedat value at this contract boundary. | format: date-time |
| $defs.run.status | reference | Yes | Defines the status value at this contract boundary. | ref: #/$defs/status |
| $defs.run.touches | array | Yes | Defines the touches value at this contract boundary. | — |
| $defs.run.updatedAt | string | Yes | Defines the updatedat value at this contract boundary. | format: date-time |
| $defs.run.warnings | array | Yes | Defines the warnings value at this contract boundary. | — |
| $defs.scope.id | string | Yes | Defines the id value at this contract boundary. | minLength: 1 |
| $defs.scope.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: ephemeral-project, project, workspace |
| $defs.scope.label | string | Yes | Defines the label value at this contract boundary. | minLength: 1 |
| $defs.scope.portable | boolean | Yes | Defines the portable value at this contract boundary. | — |
| $defs.touch.at | string | Yes | Defines the at value at this contract boundary. | format: date-time |
| $defs.touch.locator | string | Yes | Defines the locator value at this contract boundary. | — |
| $defs.touch.operation | string | No | Defines the operation value at this contract boundary. | — |
| diagnostics | array | Yes | Defines the diagnostics value at this contract boundary. | — |
| generatedAt | string | Yes | Defines the generatedat value at this contract boundary. | format: date-time |
| runs | array | Yes | Defines the runs value at this contract boundary. | — |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspace-activity-monitor-snapshot.v1" |
| scope | reference | Yes | Defines the scope value at this contract boundary. | ref: #/$defs/scope |
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/contracts/workspace-activity-monitor-snapshot.v1.json",
"title": "Workspai Activity Monitor Snapshot",
"description": "A deterministic local projection of durable Workspai activity journals. It is observational and is not verification evidence by itself.",
"type": "object",
"required": [
"schemaVersion",
"generatedAt",
"scope",
"runs",
"diagnostics"
],
"properties": {
"schemaVersion": {
"const": "workspace-activity-monitor-snapshot.v1"
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"scope": {
"$ref": "#/$defs/scope"
},
"runs": {
"type": "array",
"items": {
"$ref": "#/$defs/run"
}
},
"diagnostics": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"$defs": {
"status": {
"enum": [
"planned",
"running",
"succeeded",
"warned",
"blocked",
"failed",
"cancelled",
"skipped",
"rolled-back"
]
},
"scope": {
"type": "object",
"required": [
"kind",
"id",
"label",
"portable"
],
"properties": {
"kind": {
"enum": [
"ephemeral-project",
"project",
"workspace"
]
},
"id": {
"type": "string",
"minLength": 1
},
"label": {
"type": "string",
"minLength": 1
},
"portable": {
"type": "boolean"
}
},
"additionalProperties": false
},
"origin": {
"type": "object",
"required": [
"id",
"kind",
"label"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"kind": {
"enum": [
"project",
"workspace-root"
]
},
"label": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"progress": {
"type": "object",
"properties": {
"completed": {
"type": "number",
"minimum": 0
},
"total": {
"type": "number",
"minimum": 0
},
"percent": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"iteration": {
"type": "number",
"minimum": 0
},
"iterations": {
"type": "number",
"minimum": 0
}
},
"additionalProperties": false
},
"attempt": {
"type": "object",
"required": [
"attempt",
"status",
"startedAt",
"updatedAt"
],
"properties": {
"attempt": {
"type": "integer",
"minimum": 1
},
"status": {
"$ref": "#/$defs/status"
},
"startedAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"progress": {
"$ref": "#/$defs/progress"
},
"durationMs": {
"type": "number",
"minimum": 0
}
},
"additionalProperties": false
},
"evidenceBinding": {
"type": "object",
"required": [
"kind",
"ref",
"role",
"provenance"
],
"properties": {
"kind": {
"enum": [
"artifact",
"graph-entity",
"graph-relation",
"proof",
"project"
]
},
"ref": {
"type": "string",
"minLength": 1
},
"role": {
"enum": [
"input",
"output",
"verification",
"subject"
]
},
"provenance": {
"enum": [
"authoritative",
"observed"
]
},
"graphSourceHash": {
"type": "string",
"minLength": 1
}
},
"allOf": [
{
"if": {
"properties": {
"kind": {
"enum": [
"graph-entity",
"graph-relation",
"proof"
]
}
},
"required": [
"kind"
]
},
"then": {
"required": [
"graphSourceHash"
]
}
}
],
"additionalProperties": false
},
"block": {
"type": "object",
"required": [
"id",
"label",
"status",
"order",
"updatedAt",
"attempts"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"label": {
"type": "string",
"minLength": 1
},
"status": {
"$ref": "#/$defs/status"
},
"order": {
"type": "number"
},
"parentId": {
"type": "string",
"minLength": 1
},
"progress": {
"$ref": "#/$defs/progress"
},
"durationMs": {
"type": "number",
"minimum": 0
},
"layoutHint": {
"enum": [
"source",
"process",
"gate",
"sink"
]
},
"group": {
"type": "string",
"minLength": 1
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"attempt": {
"type": "integer",
"minimum": 1
},
"attempts": {
"type": "array",
"items": {
"$ref": "#/$defs/attempt"
}
},
"evidenceBindings": {
"type": "array",
"maxItems": 100,
"items": {
"$ref": "#/$defs/evidenceBinding"
}
}
},
"additionalProperties": false
},
"edge": {
"type": "object",
"required": [
"id",
"fromBlockId",
"toBlockId",
"kind",
"status",
"order",
"updatedAt"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"fromBlockId": {
"type": "string",
"minLength": 1
},
"toBlockId": {
"type": "string",
"minLength": 1
},
"kind": {
"enum": [
"sequence",
"parallel",
"gate",
"handoff"
]
},
"status": {
"$ref": "#/$defs/status"
},
"order": {
"type": "number"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false
},
"touch": {
"type": "object",
"required": [
"locator",
"at"
],
"properties": {
"locator": {
"type": "string"
},
"operation": {
"type": "string"
},
"at": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false
},
"artifact": {
"type": "object",
"required": [
"locator",
"at"
],
"properties": {
"locator": {
"type": "string"
},
"at": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false
},
"run": {
"type": "object",
"required": [
"runId",
"command",
"status",
"startedAt",
"updatedAt",
"blocks",
"edges",
"touches",
"artifacts",
"warnings"
],
"properties": {
"runId": {
"type": "string",
"minLength": 1
},
"parentRunId": {
"type": "string",
"minLength": 1
},
"pid": {
"type": "integer",
"minimum": 1
},
"orphaned": {
"type": "boolean"
},
"origin": {
"$ref": "#/$defs/origin"
},
"command": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"$ref": "#/$defs/status"
},
"startedAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"durationMs": {
"type": "number",
"minimum": 0
},
"blocks": {
"type": "array",
"items": {
"$ref": "#/$defs/block"
}
},
"edges": {
"type": "array",
"items": {
"$ref": "#/$defs/edge"
}
},
"touches": {
"type": "array",
"items": {
"$ref": "#/$defs/touch"
}
},
"artifacts": {
"type": "array",
"items": {
"$ref": "#/$defs/artifact"
}
},
"warnings": {
"type": "array",
"items": {
"type": "string"
}
},
"evidenceBindings": {
"type": "array",
"maxItems": 100,
"items": {
"$ref": "#/$defs/evidenceBinding"
}
}
},
"additionalProperties": false
}
}
}