Workspace operations / JSON Schema
Workspai Workspace Activity Event
Local-first operational activity emitted by Workspai commands. Activity is observational and does not by itself establish evidence or decision authority.
- Schema version
workspace-activity-event.v1- Contract path
contracts/workspace-activity-event.v1.json- Publication
- json-schema
- Defined fields
- 50
- 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
- • 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.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 |
| attempt | integer | No | Defines the attempt value at this contract boundary. | minimum: 1 |
| attributes | object | No | Defines the attributes value at this contract boundary. | additionalProperties: true |
| blockId | string | No | Defines the blockid value at this contract boundary. | minLength: 1 |
| causationId | string | No | Defines the causationid value at this contract boundary. | minLength: 1 |
| component | string | Yes | Defines the component value at this contract boundary. | minLength: 1 |
| correlationId | string | No | Defines the correlationid value at this contract boundary. | minLength: 1 |
| durationMs | number | No | Defines the durationms value at this contract boundary. | minimum: 0 |
| edge | object | No | Defines the edge value at this contract boundary. | additionalProperties: false |
| edge.fromBlockId | string | Yes | Defines the fromblockid value at this contract boundary. | minLength: 1 |
| edge.id | string | Yes | Defines the id value at this contract boundary. | minLength: 1 |
| edge.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: sequence, parallel, gate, handoff |
| edge.toBlockId | string | Yes | Defines the toblockid value at this contract boundary. | minLength: 1 |
| eventId | string | Yes | Defines the eventid value at this contract boundary. | minLength: 8 |
| evidenceBindings | array | No | Defines the evidencebindings value at this contract boundary. | maxItems: 100 |
| kind | enum | Yes | Defines the kind value at this contract boundary. | enum: run.started, run.completed, run.failed, run.cancelled, block.planned, block.started, block.progress, block.completed, block.failed, block.blocked, block.skipped, edge.declared, operation.started, operation.completed, operation.failed, touch.planned, touch.observed, artifact.published, artifact.rejected, warning.detected |
| message | string | Yes | Defines the message value at this contract boundary. | minLength: 1 |
| origin | object | No | Defines the origin value at this contract boundary. | additionalProperties: false |
| origin.id | string | Yes | Defines the id value at this contract boundary. | minLength: 8 |
| origin.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: project, workspace-root |
| origin.label | string | Yes | Defines the label value at this contract boundary. | minLength: 1 |
| parentRunId | string | No | Defines the parentrunid value at this contract boundary. | minLength: 8 |
| parentSpanId | string | No | Defines the parentspanid value at this contract boundary. | minLength: 1 |
| progress | object | No | Defines the progress value at this contract boundary. | additionalProperties: false |
| progress.completed | number | No | Defines the completed value at this contract boundary. | minimum: 0 |
| progress.iteration | number | No | Defines the iteration value at this contract boundary. | minimum: 0 |
| progress.iterations | number | No | Defines the iterations value at this contract boundary. | minimum: 0 |
| progress.percent | number | No | Defines the percent value at this contract boundary. | minimum: 0 · maximum: 100 |
| progress.total | number | No | Defines the total value at this contract boundary. | minimum: 0 |
| projectId | string | No | Defines the projectid value at this contract boundary. | minLength: 1 |
| runId | string | Yes | Defines the runid value at this contract boundary. | minLength: 8 |
| schemaVersion | string | Yes | Defines the schemaversion value at this contract boundary. | const: "workspace-activity-event.v1" |
| scope | object | Yes | Defines the scope value at this contract boundary. | additionalProperties: false |
| scope.id | string | Yes | Defines the id value at this contract boundary. | minLength: 8 |
| scope.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: ephemeral-project, project, workspace |
| scope.label | string | Yes | Defines the label value at this contract boundary. | minLength: 1 |
| scope.portable | boolean | Yes | Defines the portable value at this contract boundary. | — |
| sequence | integer | Yes | Defines the sequence value at this contract boundary. | minimum: 1 |
| spanId | string | No | Defines the spanid value at this contract boundary. | minLength: 1 |
| status | enum | Yes | Defines the status value at this contract boundary. | enum: planned, running, succeeded, warned, blocked, failed, cancelled, skipped, rolled-back |
| target | object | No | Defines the target value at this contract boundary. | additionalProperties: false |
| target.kind | enum | Yes | Defines the kind value at this contract boundary. | enum: file, directory, artifact, process, workspace, project, other |
| target.locator | string | No | Defines the locator value at this contract boundary. | — |
| target.operation | string | No | Defines the operation value at this contract boundary. | — |
| target.provenance | enum | No | Defines the provenance value at this contract boundary. | enum: authoritative, observed, inferred |
| timestamp | string | Yes | Defines the timestamp value at this contract boundary. | format: date-time |
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-event.v1.json",
"title": "Workspai Workspace Activity Event",
"description": "Local-first operational activity emitted by Workspai commands. Activity is observational and does not by itself establish evidence or decision authority.",
"type": "object",
"required": [
"schemaVersion",
"eventId",
"sequence",
"timestamp",
"runId",
"scope",
"kind",
"status",
"component",
"message"
],
"properties": {
"schemaVersion": {
"const": "workspace-activity-event.v1"
},
"eventId": {
"type": "string",
"minLength": 8
},
"sequence": {
"type": "integer",
"minimum": 1
},
"timestamp": {
"type": "string",
"format": "date-time"
},
"runId": {
"type": "string",
"minLength": 8
},
"parentRunId": {
"type": "string",
"minLength": 8
},
"spanId": {
"type": "string",
"minLength": 1
},
"parentSpanId": {
"type": "string",
"minLength": 1
},
"causationId": {
"type": "string",
"minLength": 1
},
"correlationId": {
"type": "string",
"minLength": 1
},
"scope": {
"type": "object",
"required": [
"kind",
"id",
"label",
"portable"
],
"properties": {
"kind": {
"enum": [
"ephemeral-project",
"project",
"workspace"
]
},
"id": {
"type": "string",
"minLength": 8
},
"label": {
"type": "string",
"minLength": 1
},
"portable": {
"type": "boolean"
}
},
"additionalProperties": false
},
"kind": {
"enum": [
"run.started",
"run.completed",
"run.failed",
"run.cancelled",
"block.planned",
"block.started",
"block.progress",
"block.completed",
"block.failed",
"block.blocked",
"block.skipped",
"edge.declared",
"operation.started",
"operation.completed",
"operation.failed",
"touch.planned",
"touch.observed",
"artifact.published",
"artifact.rejected",
"warning.detected"
]
},
"status": {
"enum": [
"planned",
"running",
"succeeded",
"warned",
"blocked",
"failed",
"cancelled",
"skipped",
"rolled-back"
]
},
"component": {
"type": "string",
"minLength": 1
},
"message": {
"type": "string",
"minLength": 1
},
"blockId": {
"type": "string",
"minLength": 1
},
"attempt": {
"type": "integer",
"minimum": 1
},
"origin": {
"type": "object",
"required": [
"id",
"kind",
"label"
],
"properties": {
"id": {
"type": "string",
"minLength": 8
},
"kind": {
"enum": [
"project",
"workspace-root"
]
},
"label": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"projectId": {
"type": "string",
"minLength": 1
},
"durationMs": {
"type": "number",
"minimum": 0
},
"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
},
"target": {
"type": "object",
"required": [
"kind"
],
"properties": {
"kind": {
"enum": [
"file",
"directory",
"artifact",
"process",
"workspace",
"project",
"other"
]
},
"locator": {
"type": "string"
},
"operation": {
"type": "string"
},
"provenance": {
"enum": [
"authoritative",
"observed",
"inferred"
]
}
},
"additionalProperties": false
},
"evidenceBindings": {
"type": "array",
"maxItems": 100,
"items": {
"$ref": "#/$defs/evidenceBinding"
}
},
"edge": {
"type": "object",
"required": [
"id",
"fromBlockId",
"toBlockId",
"kind"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"fromBlockId": {
"type": "string",
"minLength": 1
},
"toBlockId": {
"type": "string",
"minLength": 1
},
"kind": {
"enum": [
"sequence",
"parallel",
"gate",
"handoff"
]
}
},
"additionalProperties": false
},
"attributes": {
"type": "object",
"additionalProperties": true
}
},
"additionalProperties": false,
"$defs": {
"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
}
}
}