atlas-iac/services/hermes/contracts/hux/identity.schema.json
jenkins 1b1a14e972 hermes(hux): contract 1.1.0 additive revision and Wave A consolidation
Adds receipt evidence kind, 422 unprocessable, optional revision on research
records, audit_stale on the privacy policy, per-route body caps (25 MiB
artifact uploads), promotion checks the project exists, memory rules skip
content-free statuses. Handoff ledger covers every Wave A card.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNPhwu2bsaRNg3DETSAZoM
2026-08-24 00:48:20 -03:00

159 lines
4.0 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://hermes.bstein.dev/contracts/hux/v1/identity.schema.json",
"title": "HUX identity, capability negotiation and data manifest",
"description": "HUX-11 foundation records. capabilities is the first call every client makes: it learns the contract version, which cards are on for this tenant (a card is on only when its whole dependency chain is on), and the server build. manifest is stored on the tenant PVC and tells a rolled-back reader whether it can read the data.",
"$defs": {
"capabilities": {
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"contract_version",
"identity",
"cards",
"server"
],
"properties": {
"schema": {
"const": "hux.capabilities.v1"
},
"contract_version": {
"$ref": "common.schema.json#/$defs/contract_version"
},
"identity": {
"$ref": "common.schema.json#/$defs/identity"
},
"cards": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"card",
"flag",
"enabled",
"routes"
],
"properties": {
"card": {
"type": "string",
"pattern": "^HUX-[0-9]{2}$"
},
"flag": {
"type": "string",
"pattern": "^hux\\.[a-z_]+$"
},
"enabled": {
"type": "boolean"
},
"routes": {
"type": "array",
"items": {
"type": "string",
"pattern": "^/hux/v1/"
}
}
}
}
},
"server": {
"$ref": "common.schema.json#/$defs/build"
}
}
},
"manifest": {
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"contract_version",
"data_layout_version",
"min_reader_contract_version",
"created_at",
"updated_at"
],
"properties": {
"schema": {
"const": "hux.manifest.v1"
},
"contract_version": {
"$ref": "common.schema.json#/$defs/contract_version"
},
"data_layout_version": {
"type": "integer",
"minimum": 1
},
"min_reader_contract_version": {
"$ref": "common.schema.json#/$defs/contract_version"
},
"created_at": {
"$ref": "common.schema.json#/$defs/timestamp"
},
"updated_at": {
"$ref": "common.schema.json#/$defs/timestamp"
}
}
},
"error": {
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"status",
"code",
"message"
],
"properties": {
"schema": {
"const": "hux.error.v1"
},
"status": {
"type": "integer",
"minimum": 400,
"maximum": 599
},
"code": {
"type": "string",
"enum": [
"unauthorized",
"forbidden",
"not_found",
"conflict",
"flag_off",
"invalid",
"too_large",
"rate_limited",
"approval_required",
"budget_exhausted",
"unprocessable"
]
},
"message": {
"type": "string",
"maxLength": 280
},
"details": {
"type": "array",
"maxItems": 32,
"items": {
"type": "string",
"maxLength": 280
}
}
}
}
},
"oneOf": [
{
"$ref": "#/$defs/capabilities"
},
{
"$ref": "#/$defs/manifest"
},
{
"$ref": "#/$defs/error"
}
]
}