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
51
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
externalProjectsarrayNoDefines the externalprojects value at this contract boundary.
externalProjects[].includedbooleanYesDefines the included value at this contract boundary.const: false
externalProjects[].namestringYesDefines the name value at this contract boundary.minLength: 1
externalProjects[].relationshipenumYesDefines the relationship value at this contract boundary.enum: adopted, linked, imported, managed, restored
externalProjects[].requiredActionstringYesDefines the requiredaction value at this contract boundary.const: "relink"
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"
portableContractobjectNoDefines the portablecontract value at this contract boundary.additionalProperties: false
portableContract.generatedAtstringYesDefines the generatedat value at this contract boundary.format: date-time
portableContract.kindstringYesDefines the kind value at this contract boundary.const: "rapidkit.workspace.contract"
portableContract.projectsarrayYesDefines the projects value at this contract boundary.
portableContract.projects[].contractsobjectYesDefines the contracts value at this contract boundary.additionalProperties: false
portableContract.projects[].contracts.apisarrayYesDefines the apis value at this contract boundary.
portableContract.projects[].contracts.apis[].basePathstringYesDefines the basepath value at this contract boundary.minLength: 1
portableContract.projects[].contracts.apis[].namestringYesDefines the name value at this contract boundary.minLength: 1
portableContract.projects[].contracts.consumesarrayYesDefines the consumes value at this contract boundary.
portableContract.projects[].contracts.dependsOnarrayYesDefines the dependson value at this contract boundary.
portableContract.projects[].contracts.envarrayYesDefines the env value at this contract boundary.
portableContract.projects[].contracts.ownsarrayYesDefines the owns value at this contract boundary.
portableContract.projects[].contracts.publishesarrayYesDefines the publishes value at this contract boundary.
portableContract.projects[].frameworkstringNoDefines the framework value at this contract boundary.minLength: 1
portableContract.projects[].kitstringNoDefines the kit value at this contract boundary.minLength: 1
portableContract.projects[].modulesarrayYesDefines the modules value at this contract boundary.
portableContract.projects[].portsarrayYesDefines the ports value at this contract boundary.
portableContract.projects[].ports[].namestringYesDefines the name value at this contract boundary.minLength: 1
portableContract.projects[].ports[].portintegerYesDefines the port value at this contract boundary.minimum: 1 · maximum: 65535
portableContract.projects[].ports[].protocolenumYesDefines the protocol value at this contract boundary.enum: http, https, grpc, tcp, udp
portableContract.projects[].relationshipenumNoDefines the relationship value at this contract boundary.enum: imported, adopted
portableContract.projects[].relativePathstringYesDefines the relativepath value at this contract boundary.minLength: 1
portableContract.projects[].runtimestringNoDefines the runtime value at this contract boundary.minLength: 1
portableContract.projects[].slugstringYesDefines the slug value at this contract boundary.minLength: 1
portableContract.projects[].sourceenumNoDefines the source value at this contract boundary.enum: workspace, local-folder, git-url, adopted-local
portableContract.schemaVersionnumberYesDefines the schemaversion value at this contract boundary.const: 1
portableContract.workspaceobjectYesDefines the workspace value at this contract boundary.additionalProperties: false
portableContract.workspace.namestringYesDefines the name value at this contract boundary.minLength: 1
portableContract.workspace.profilestringNoDefines the profile value at this contract boundary.minLength: 1
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
        }
      }
    },
    "externalProjects": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "relationship",
          "included",
          "requiredAction"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "relationship": {
            "enum": [
              "adopted",
              "linked",
              "imported",
              "managed",
              "restored"
            ]
          },
          "included": {
            "const": false
          },
          "requiredAction": {
            "const": "relink"
          }
        }
      }
    },
    "portableContract": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "kind",
        "generatedAt",
        "workspace",
        "projects"
      ],
      "properties": {
        "schemaVersion": {
          "const": 1
        },
        "kind": {
          "const": "rapidkit.workspace.contract"
        },
        "generatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "workspace": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "name"
          ],
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1
            },
            "profile": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "projects": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "slug",
              "relativePath",
              "modules",
              "ports",
              "contracts"
            ],
            "properties": {
              "slug": {
                "type": "string",
                "minLength": 1
              },
              "relativePath": {
                "type": "string",
                "minLength": 1,
                "not": {
                  "pattern": "^external/"
                }
              },
              "source": {
                "enum": [
                  "workspace",
                  "local-folder",
                  "git-url",
                  "adopted-local"
                ]
              },
              "relationship": {
                "enum": [
                  "imported",
                  "adopted"
                ]
              },
              "runtime": {
                "type": "string",
                "minLength": 1
              },
              "framework": {
                "type": "string",
                "minLength": 1
              },
              "kit": {
                "type": "string",
                "minLength": 1
              },
              "modules": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "uniqueItems": true
              },
              "ports": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "name",
                    "port",
                    "protocol"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "port": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 65535
                    },
                    "protocol": {
                      "enum": [
                        "http",
                        "https",
                        "grpc",
                        "tcp",
                        "udp"
                      ]
                    }
                  }
                }
              },
              "contracts": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "owns",
                  "apis",
                  "publishes",
                  "consumes",
                  "dependsOn",
                  "env"
                ],
                "properties": {
                  "owns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "uniqueItems": true
                  },
                  "apis": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "name",
                        "basePath"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "basePath": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    }
                  },
                  "publishes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "uniqueItems": true
                  },
                  "consumes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "uniqueItems": true
                  },
                  "dependsOn": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "uniqueItems": true
                  },
                  "env": {
                    "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}$"
          }
        }
      }
    }
  }
}