|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "https://schemas.coding-autopilot.dev/v0.1/common.schema.json", |
| 4 | + "title": "CAS Common Definitions", |
| 5 | + "$defs": { |
| 6 | + "actor": { |
| 7 | + "type": "object", |
| 8 | + "additionalProperties": false, |
| 9 | + "required": ["id", "type"], |
| 10 | + "properties": { |
| 11 | + "id": { "type": "string", "minLength": 1, "maxLength": 256 }, |
| 12 | + "type": { |
| 13 | + "type": "string", |
| 14 | + "enum": ["human", "agent", "service", "workflow"] |
| 15 | + }, |
| 16 | + "displayName": { "type": "string", "minLength": 1, "maxLength": 256 } |
| 17 | + } |
| 18 | + }, |
| 19 | + "traceContext": { |
| 20 | + "type": "object", |
| 21 | + "additionalProperties": false, |
| 22 | + "required": ["traceparent"], |
| 23 | + "properties": { |
| 24 | + "traceparent": { |
| 25 | + "type": "string", |
| 26 | + "pattern": "^[\\da-f]{2}-[\\da-f]{32}-[\\da-f]{16}-[\\da-f]{2}$" |
| 27 | + }, |
| 28 | + "tracestate": { "type": "string", "maxLength": 512 } |
| 29 | + } |
| 30 | + }, |
| 31 | + "lifecycleMetadata": { |
| 32 | + "type": "object", |
| 33 | + "required": [ |
| 34 | + "correlationId", |
| 35 | + "promptId", |
| 36 | + "runId", |
| 37 | + "repo", |
| 38 | + "actor", |
| 39 | + "timestamp", |
| 40 | + "schemaVersion", |
| 41 | + "traceContext" |
| 42 | + ], |
| 43 | + "properties": { |
| 44 | + "correlationId": { "type": "string", "minLength": 1, "maxLength": 128 }, |
| 45 | + "promptId": { "type": "string", "minLength": 1, "maxLength": 128 }, |
| 46 | + "runId": { "type": "string", "minLength": 1, "maxLength": 128 }, |
| 47 | + "repo": { |
| 48 | + "type": "string", |
| 49 | + "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$" |
| 50 | + }, |
| 51 | + "actor": { "$ref": "#/$defs/actor" }, |
| 52 | + "timestamp": { "type": "string", "format": "date-time" }, |
| 53 | + "schemaVersion": { "const": "0.1.0" }, |
| 54 | + "traceContext": { "$ref": "#/$defs/traceContext" } |
| 55 | + } |
| 56 | + }, |
| 57 | + "evidence": { |
| 58 | + "type": "object", |
| 59 | + "additionalProperties": false, |
| 60 | + "required": ["kind", "uri"], |
| 61 | + "properties": { |
| 62 | + "kind": { "type": "string", "minLength": 1, "maxLength": 64 }, |
| 63 | + "uri": { "type": "string", "format": "uri" }, |
| 64 | + "sha256": { "type": "string", "pattern": "^[\\da-f]{64}$" } |
| 65 | + } |
| 66 | + } |
| 67 | + } |
| 68 | +} |
0 commit comments