Schemas, examples and a flag registry for the twelve HUX cards, a dependency-free validator, the governance rules (memory ledger, autonomy matrix, friendly modes mapped to real Switchyard routes, privacy defaults, suggestion gating, release state machine) and the contract doc UI work codes against. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RNPhwu2bsaRNg3DETSAZoM
43 lines
2.1 KiB
JSON
43 lines
2.1 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://hermes.bstein.dev/contracts/hux/v1/event.schema.json",
|
|
"title": "HUX activity event",
|
|
"description": "One entry in the per-conversation activity stream (HUX-01). seq is strictly monotonic per conversation; consumers resume with after_seq. Every other HUX record that changes state emits exactly one event.",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["schema", "id", "seq", "ts", "conversation_id", "kind", "summary", "provenance", "sensitivity", "redaction"],
|
|
"properties": {
|
|
"schema": {"const": "hux.event.v1"},
|
|
"id": {"$ref": "common.schema.json#/$defs/id"},
|
|
"seq": {"type": "integer", "minimum": 0},
|
|
"ts": {"$ref": "common.schema.json#/$defs/timestamp"},
|
|
"conversation_id": {"$ref": "common.schema.json#/$defs/id"},
|
|
"run_id": {"type": "string", "maxLength": 120},
|
|
"parent_event_id": {"$ref": "common.schema.json#/$defs/id"},
|
|
"correlation_id": {"type": "string", "maxLength": 120},
|
|
"kind": {
|
|
"type": "string",
|
|
"enum": [
|
|
"message.user", "message.assistant",
|
|
"decision.route", "decision.plan",
|
|
"tool.call", "tool.result",
|
|
"approval.requested", "approval.resolved",
|
|
"memory.proposed", "memory.committed", "memory.forgotten",
|
|
"artifact.created", "artifact.version", "artifact.promoted",
|
|
"citation.attached",
|
|
"mode.changed",
|
|
"run.started", "run.cancelled", "run.completed", "run.failed",
|
|
"privacy.notice",
|
|
"suggestion.shown", "suggestion.dismissed",
|
|
"release.transition"
|
|
]
|
|
},
|
|
"summary": {"type": "string", "minLength": 1, "maxLength": 280},
|
|
"detail": {"type": "object", "description": "Kind-specific payload. Redacted according to redaction.level before leaving the tenant."},
|
|
"evidence": {"type": "array", "maxItems": 64, "items": {"$ref": "common.schema.json#/$defs/evidence_ref"}},
|
|
"provenance": {"$ref": "common.schema.json#/$defs/provenance"},
|
|
"sensitivity": {"$ref": "common.schema.json#/$defs/sensitivity"},
|
|
"redaction": {"$ref": "common.schema.json#/$defs/redaction"}
|
|
}
|
|
}
|