HUX-11 contract freeze: identity/capabilities/manifest/error records, event turn and idempotency and delegation/side-effect kinds, memory no-store/supersedes/ retrieval removal, revisions for optimistic concurrency, artifact access, budget scope/spend/subagents and external side-effect gating, notebook notes and dedupe keys. ADR-0001 records the wire and compatibility rules. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RNPhwu2bsaRNg3DETSAZoM
197 lines
4.5 KiB
JSON
197 lines
4.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://hermes.bstein.dev/contracts/hux/v1/artifact.schema.json",
|
|
"title": "HUX artifact",
|
|
"description": "Typed, versioned output (HUX-04). Content lives behind content_ref; versions are immutable and diffable; lineage records what an artifact was derived from; promotion copies a version into a project.",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"schema",
|
|
"id",
|
|
"owner",
|
|
"type",
|
|
"title",
|
|
"current_version",
|
|
"versions",
|
|
"sensitivity",
|
|
"created_at",
|
|
"updated_at",
|
|
"revision",
|
|
"access"
|
|
],
|
|
"properties": {
|
|
"schema": {
|
|
"const": "hux.artifact.v1"
|
|
},
|
|
"id": {
|
|
"$ref": "common.schema.json#/$defs/id"
|
|
},
|
|
"owner": {
|
|
"$ref": "common.schema.json#/$defs/user_ref"
|
|
},
|
|
"conversation_id": {
|
|
"$ref": "common.schema.json#/$defs/id"
|
|
},
|
|
"project_id": {
|
|
"$ref": "common.schema.json#/$defs/id"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"markdown",
|
|
"code",
|
|
"html",
|
|
"svg",
|
|
"image",
|
|
"json",
|
|
"csv",
|
|
"document",
|
|
"audio"
|
|
]
|
|
},
|
|
"language": {
|
|
"type": "string",
|
|
"maxLength": 40
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 200
|
|
},
|
|
"current_version": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"versions": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"version",
|
|
"created_at",
|
|
"created_by",
|
|
"content_ref"
|
|
],
|
|
"properties": {
|
|
"version": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"created_at": {
|
|
"$ref": "common.schema.json#/$defs/timestamp"
|
|
},
|
|
"created_by": {
|
|
"$ref": "common.schema.json#/$defs/actor"
|
|
},
|
|
"message_id": {
|
|
"type": "string",
|
|
"maxLength": 120
|
|
},
|
|
"content_ref": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"hash",
|
|
"bytes",
|
|
"mime"
|
|
],
|
|
"properties": {
|
|
"hash": {
|
|
"$ref": "common.schema.json#/$defs/sha256"
|
|
},
|
|
"bytes": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"mime": {
|
|
"type": "string",
|
|
"maxLength": 120
|
|
}
|
|
}
|
|
},
|
|
"diff_from": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"lineage": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"artifact_id",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"artifact_id": {
|
|
"$ref": "common.schema.json#/$defs/id"
|
|
},
|
|
"version": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
}
|
|
}
|
|
},
|
|
"note": {
|
|
"type": "string",
|
|
"maxLength": 200
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"promotion": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"project_id",
|
|
"version",
|
|
"at"
|
|
],
|
|
"properties": {
|
|
"project_id": {
|
|
"$ref": "common.schema.json#/$defs/id"
|
|
},
|
|
"version": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"at": {
|
|
"$ref": "common.schema.json#/$defs/timestamp"
|
|
}
|
|
}
|
|
},
|
|
"sensitivity": {
|
|
"$ref": "common.schema.json#/$defs/sensitivity"
|
|
},
|
|
"created_at": {
|
|
"$ref": "common.schema.json#/$defs/timestamp"
|
|
},
|
|
"updated_at": {
|
|
"$ref": "common.schema.json#/$defs/timestamp"
|
|
},
|
|
"revision": {
|
|
"$ref": "common.schema.json#/$defs/revision"
|
|
},
|
|
"access": {
|
|
"type": "object",
|
|
"description": "Owner-only unless a share token is minted; shares are read-only and expire.",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"mode"
|
|
],
|
|
"properties": {
|
|
"mode": {
|
|
"type": "string",
|
|
"enum": [
|
|
"owner",
|
|
"shared_readonly"
|
|
]
|
|
},
|
|
"share_expires_at": {
|
|
"$ref": "common.schema.json#/$defs/timestamp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|