File size: 2,207 Bytes
1e3bc19 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "intelligence-request.schema.json",
"title": "IntelligenceRequest",
"description": "What the edge asks of the ML service. phase, purpose, principal_scope and rights_scope are computed on the server from a verified session and lock; a value sent by the browser, the chat history or a tool result has no authority. The service checks phase, purpose and every field of principal_scope (kind, subject_id, tenant_id) against the capability that accompanies the request (P3-H) and refuses a divergence with 403 authority_mismatch naming the field.",
"type": "object",
"additionalProperties": false,
"required": ["schema_version", "request_id", "question_id", "event_version", "as_of", "evidence_snapshot_id", "phase", "purpose", "rights_scope", "principal_scope", "recipe_id"],
"properties": {
"schema_version": { "$ref": "common.schema.json#/$defs/schema_version" },
"request_id": { "$ref": "common.schema.json#/$defs/id" },
"trace_id": { "$ref": "common.schema.json#/$defs/id" },
"question_id": { "$ref": "common.schema.json#/$defs/question_id" },
"event_version": { "$ref": "common.schema.json#/$defs/event_version" },
"as_of": { "$ref": "common.schema.json#/$defs/utc" },
"evidence_snapshot_id": { "$ref": "common.schema.json#/$defs/id" },
"phase": { "$ref": "common.schema.json#/$defs/phase" },
"purpose": { "$ref": "common.schema.json#/$defs/purpose" },
"rights_scope": { "$ref": "common.schema.json#/$defs/rights_scope" },
"principal_scope": { "$ref": "common.schema.json#/$defs/principal_scope" },
"recipe_id": { "$ref": "common.schema.json#/$defs/id" },
"mode": { "enum": ["roast", "chat", "caption", "summary"] },
"messages": {
"description": "Untrusted conversation turns. Never a source of authorization or evidence.",
"type": "array",
"maxItems": 20,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["role", "content"],
"properties": {
"role": { "enum": ["user", "assistant"] },
"content": { "type": "string", "maxLength": 2000 }
}
}
}
}
}
|