62 lines
2.7 KiB
JSON
Raw Normal View History

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://hermes.bstein.dev/contracts/hux/v1/mode.schema.json",
"title": "HUX friendly mode intent",
"description": "Stable intent contract for Fast/Thoughtful/Research/Create/Private (HUX-06). A mode never names a vendor model; it names constraints that Switchyard resolves. The advanced drawer may pin an exact route id, which must exist in the Switchyard catalog.",
"type": "object",
"additionalProperties": false,
"required": ["schema", "mode", "label", "intent", "constraints", "switchyard"],
"properties": {
"schema": {"const": "hux.mode.v1"},
"mode": {"type": "string", "enum": ["fast", "thoughtful", "research", "create", "private"]},
"label": {"type": "string", "minLength": 1, "maxLength": 40},
"intent": {"type": "string", "minLength": 1, "maxLength": 400},
"constraints": {
"type": "object",
"additionalProperties": false,
"required": ["providers", "local_only", "effort", "tools", "memory", "citations_required", "retention"],
"properties": {
"providers": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "common.schema.json#/$defs/provider"}},
"local_only": {"type": "boolean"},
"effort": {
"type": "object",
"additionalProperties": false,
"required": ["min", "max"],
"properties": {
"min": {"$ref": "common.schema.json#/$defs/effort"},
"max": {"$ref": "common.schema.json#/$defs/effort"}
}
},
"tools": {
"type": "object",
"additionalProperties": false,
"required": ["web", "shell", "artifacts", "delegate"],
"properties": {
"web": {"type": "string", "enum": ["required", "allowed", "denied"]},
"shell": {"type": "string", "enum": ["allowed", "denied"]},
"artifacts": {"type": "string", "enum": ["encouraged", "allowed", "denied"]},
"delegate": {"type": "string", "enum": ["allowed", "denied"]}
}
},
"memory": {
"type": "object",
"additionalProperties": false,
"required": ["read", "write"],
"properties": {"read": {"type": "boolean"}, "write": {"type": "boolean"}}
},
"citations_required": {"type": "boolean"},
"retention": {"type": "string", "enum": ["default", "ephemeral"]}
}
},
"switchyard": {
"type": "object",
"additionalProperties": false,
"required": ["route_id"],
"properties": {
"route_id": {"type": "string", "pattern": "^atlas/(auto|manual|fallback|worker)/[a-z0-9/-]+$"},
"override_route_id": {"type": "string", "pattern": "^atlas/(auto|manual)/[a-z0-9/-]+$"}
}
}
}
}