All contracts

Workspace operations / JSON Schema

Workspai Workspace Run Evidence

Defines the versioned workspace run last v1 boundary used by Workspai and its consumers.

Schema version
workspace-run-v1
Contract path
contracts/workspace-run-last.v1.json
Publication
synced-supporting-contract
Defined fields
25
Artifact bindings
1

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.

Produced artifacts

These durable files are emitted by registered commands and validated against this contract.

Artifact pathSchemaProducer
.workspai/reports/workspace-run-last.jsonworkspace-run-v1
workspai workspace run

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 pathTypeRequiredMeaningConstraints
$defs.workspaceRunStageReport.durationMsintegerYesDefines the durationms value at this contract boundary.minimum: 0
$defs.workspaceRunStageReport.enterpriseControlsobjectNoDefines the enterprisecontrols value at this contract boundary.additionalProperties: true
$defs.workspaceRunStageReport.gatesobjectYesDefines the gates value at this contract boundary.additionalProperties: true
$defs.workspaceRunStageReport.generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
$defs.workspaceRunStageReport.optionsobjectYesDefines the options value at this contract boundary.additionalProperties: true
$defs.workspaceRunStageReport.projectsarrayYesDefines the projects value at this contract boundary.
$defs.workspaceRunStageReport.schemaVersionenumYesDefines the schemaversion value at this contract boundary.enum: 1.0, workspace-run-stage-v1
$defs.workspaceRunStageReport.selectionobjectYesDefines the selection value at this contract boundary.additionalProperties: true
$defs.workspaceRunStageReport.stageenumYesDefines the stage value at this contract boundary.enum: init, test, build, start
$defs.workspaceRunStageReport.summaryobjectYesDefines the summary value at this contract boundary.additionalProperties: true
$defs.workspaceRunStageReport.summary.exitCodeintegerYesDefines the exitcode value at this contract boundary.
$defs.workspaceRunStageReport.summary.failedintegerYesDefines the failed value at this contract boundary.minimum: 0
$defs.workspaceRunStageReport.summary.passedintegerYesDefines the passed value at this contract boundary.minimum: 0
$defs.workspaceRunStageReport.summary.projectCountintegerYesDefines the projectcount value at this contract boundary.minimum: 0
$defs.workspaceRunStageReport.summary.selectedCountintegerYesDefines the selectedcount value at this contract boundary.minimum: 0
$defs.workspaceRunStageReport.summary.skippedintegerYesDefines the skipped value at this contract boundary.minimum: 0
$defs.workspaceRunStageReport.workspacePathstringYesDefines the workspacepath value at this contract boundary.minLength: 1
enterpriseControlsobjectYesDefines the enterprisecontrols value at this contract boundary.additionalProperties: true
enterpriseControls.evidencePathstringYesDefines the evidencepath value at this contract boundary.minLength: 1
enterpriseControls.jsonReadybooleanYesDefines the jsonready value at this contract boundary.
generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
latestStageenumYesDefines the lateststage value at this contract boundary.enum: init, test, build, start
schemaVersionstringYesDefines the schemaversion value at this contract boundary.const: "workspace-run-v1"
stagesobjectYesDefines the stages value at this contract boundary.
workspacePathstringYesDefines the workspacepath value at this contract boundary.minLength: 1

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://getrapidkit.com/schemas/workspace-run-last.v1.json",
  "title": "Workspai Workspace Run Evidence",
  "type": "object",
  "required": [
    "schemaVersion",
    "generatedAt",
    "workspacePath",
    "latestStage",
    "stages",
    "enterpriseControls"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workspace-run-v1"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "workspacePath": {
      "type": "string",
      "minLength": 1
    },
    "latestStage": {
      "enum": [
        "init",
        "test",
        "build",
        "start"
      ]
    },
    "stages": {
      "type": "object",
      "propertyNames": {
        "enum": [
          "init",
          "test",
          "build",
          "start"
        ]
      },
      "additionalProperties": {
        "$ref": "#/$defs/workspaceRunStageReport"
      }
    },
    "enterpriseControls": {
      "type": "object",
      "required": [
        "jsonReady",
        "evidencePath"
      ],
      "properties": {
        "jsonReady": {
          "type": "boolean"
        },
        "evidencePath": {
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": false,
  "$defs": {
    "workspaceRunStageReport": {
      "type": "object",
      "required": [
        "schemaVersion",
        "workspacePath",
        "stage",
        "generatedAt",
        "durationMs",
        "options",
        "selection",
        "gates",
        "summary",
        "projects"
      ],
      "properties": {
        "schemaVersion": {
          "enum": [
            "1.0",
            "workspace-run-stage-v1"
          ]
        },
        "workspacePath": {
          "type": "string",
          "minLength": 1
        },
        "stage": {
          "enum": [
            "init",
            "test",
            "build",
            "start"
          ]
        },
        "generatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "durationMs": {
          "type": "integer",
          "minimum": 0
        },
        "options": {
          "type": "object",
          "additionalProperties": true
        },
        "selection": {
          "type": "object",
          "additionalProperties": true
        },
        "gates": {
          "type": "object",
          "additionalProperties": true
        },
        "summary": {
          "type": "object",
          "required": [
            "projectCount",
            "selectedCount",
            "passed",
            "failed",
            "skipped",
            "exitCode"
          ],
          "properties": {
            "projectCount": {
              "type": "integer",
              "minimum": 0
            },
            "selectedCount": {
              "type": "integer",
              "minimum": 0
            },
            "passed": {
              "type": "integer",
              "minimum": 0
            },
            "failed": {
              "type": "integer",
              "minimum": 0
            },
            "skipped": {
              "type": "integer",
              "minimum": 0
            },
            "exitCode": {
              "type": "integer"
            }
          },
          "additionalProperties": true
        },
        "projects": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "enterpriseControls": {
          "type": "object",
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    }
  }
}