Files
cmroubao/docs/agent-context.schema.json

95 lines
2.5 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.invalid/cmroubao/agent-context.schema.json",
"title": "cmroubao agent context manifest",
"type": "object",
"additionalProperties": false,
"required": [
"schema",
"schema_version",
"authority",
"bootstrap",
"routes",
"tasks",
"refresh",
"degraded_mode"
],
"properties": {
"schema": {
"const": "docs/agent-context.schema.json"
},
"schema_version": {
"const": 1
},
"authority": {
"type": "object",
"minProperties": 1,
"additionalProperties": {
"type": "string",
"minLength": 1
}
},
"bootstrap": {
"type": "object",
"additionalProperties": false,
"required": ["always_read"],
"properties": {
"always_read": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {"$ref": "#/$defs/repositoryPath"}
}
}
},
"routes": {
"type": "object",
"minProperties": 1,
"additionalProperties": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {"$ref": "#/$defs/repositoryPath"}
}
},
"tasks": {
"type": "object",
"additionalProperties": false,
"required": ["roadmap", "directory", "template"],
"properties": {
"roadmap": {"$ref": "#/$defs/repositoryPath"},
"directory": {"$ref": "#/$defs/repositoryPath"},
"template": {"$ref": "#/$defs/repositoryPath"}
}
},
"refresh": {
"type": "object",
"additionalProperties": false,
"required": ["context_ref", "cache_key", "unchanged_file", "changed_ref"],
"properties": {
"context_ref": {"const": "default_branch_head_sha"},
"cache_key": {"const": "file_sha"},
"unchanged_file": {"const": "reuse_within_current_session"},
"changed_ref": {"const": "reread_manifest_and_routed_documents"}
}
},
"degraded_mode": {
"type": "object",
"additionalProperties": false,
"required": ["continue_claimed_task", "claim_new_task", "write_remote_state"],
"properties": {
"continue_claimed_task": {"type": "boolean"},
"claim_new_task": {"type": "boolean"},
"write_remote_state": {"type": "boolean"}
}
}
},
"$defs": {
"repositoryPath": {
"type": "string",
"minLength": 1,
"pattern": "^(?!/)(?!.*\\\\\\\\)(?!.*(^|/)\\.\\.(/|$))(?![A-Za-z][A-Za-z0-9+.-]*:).+$"
}
}
}