All contracts

Recovery and archival / JSON Schema

Workspai Workspace Archive Manifest v1

Defines the versioned workspace archive manifest v1 boundary used by Workspai and its consumers.

Schema version
workspai-workspace-archive-manifest-v1
Contract path
contracts/workspace-archive-manifest.v1.json
Publication
json-schema
Defined fields
17
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 pathTypeRequiredMeaningConstraints
archiveFormatenumNoDefines the archiveformat value at this contract boundary.enum: zip-store, zip-deflate
compressionenumNoDefines the compression value at this contract boundary.enum: store, deflate
containerFormatenumNoDefines the containerformat value at this contract boundary.enum: zip, zip64
exportedAtstringYesDefines the exportedat value at this contract boundary.format: date-time
exportedByenumNoDefines the exportedby value at this contract boundary.enum: workspai, workspai-vscode
filesarrayYesDefines the files value at this contract boundary.
files[].pathstringYesDefines the path value at this contract boundary.minLength: 1
files[].sha256stringYesDefines the sha256 value at this contract boundary.pattern: ^[a-f0-9]{64}$
files[].sizeintegerYesDefines the size value at this contract boundary.minimum: 0
kindstringYesDefines the kind value at this contract boundary.const: "workspai.workspace.archive"
schemaVersionstringNoDefines the schemaversion value at this contract boundary.const: "workspai-workspace-archive-manifest-v1"
securityobjectYesDefines the security value at this contract boundary.additionalProperties: false
security.envFilesIncludedbooleanYesDefines the envfilesincluded value at this contract boundary.
security.excludedByDefaultarrayYesDefines the excludedbydefault value at this contract boundary.
streamingbooleanNoDefines the streaming value at this contract boundary.
versionnumberYesDefines the version value at this contract boundary.const: 1
workspaceNamestringYesDefines the workspacename 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://workspai.dev/contracts/workspace-archive-manifest.v1.json",
  "title": "Workspai Workspace Archive Manifest v1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "version",
    "kind",
    "workspaceName",
    "exportedAt",
    "security",
    "files"
  ],
  "properties": {
    "schemaVersion": {
      "const": "workspai-workspace-archive-manifest-v1"
    },
    "version": {
      "const": 1
    },
    "kind": {
      "const": "workspai.workspace.archive"
    },
    "workspaceName": {
      "type": "string",
      "minLength": 1
    },
    "exportedAt": {
      "type": "string",
      "format": "date-time"
    },
    "exportedBy": {
      "enum": [
        "workspai",
        "workspai-vscode"
      ]
    },
    "archiveFormat": {
      "enum": [
        "zip-store",
        "zip-deflate"
      ]
    },
    "containerFormat": {
      "enum": [
        "zip",
        "zip64"
      ]
    },
    "compression": {
      "enum": [
        "store",
        "deflate"
      ]
    },
    "streaming": {
      "type": "boolean"
    },
    "security": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "envFilesIncluded",
        "excludedByDefault"
      ],
      "properties": {
        "envFilesIncluded": {
          "type": "boolean"
        },
        "excludedByDefault": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        }
      }
    },
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "path",
          "size",
          "sha256"
        ],
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1
          },
          "size": {
            "type": "integer",
            "minimum": 0
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        }
      }
    }
  }
}