110 lines
2.1 KiB
JSON
110 lines
2.1 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://go-sip.local/contracts/proposals/ai-authorization-v0.2.schema.json",
|
|
"title": "Dispatcher to Agent immutable AI authorization",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"authorization_id",
|
|
"tenant_id",
|
|
"tenant_key",
|
|
"agent_version_id",
|
|
"config_sha256",
|
|
"mode",
|
|
"issued_at",
|
|
"expires_at",
|
|
"source",
|
|
"revoked"
|
|
],
|
|
"properties": {
|
|
"authorization_id": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
},
|
|
"tenant_id": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
},
|
|
"tenant_key": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 224
|
|
},
|
|
"agent_version_id": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
},
|
|
"config_sha256": {
|
|
"type": "string",
|
|
"pattern": "^[a-f0-9]{64}$"
|
|
},
|
|
"mode": {
|
|
"enum": [
|
|
"full_ai",
|
|
"asr_only"
|
|
]
|
|
},
|
|
"issued_at": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"expires_at": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"source": {
|
|
"enum": [
|
|
"saas",
|
|
"mock-saas"
|
|
]
|
|
},
|
|
"credential_refs": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"asr": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
},
|
|
"llm": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
},
|
|
"tts": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
}
|
|
}
|
|
},
|
|
"revoked": {
|
|
"type": "boolean"
|
|
},
|
|
"revocation_reason": {
|
|
"type": "string",
|
|
"maxLength": 256
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"revoked": {
|
|
"const": true
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"required": [
|
|
"revocation_reason"
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|