-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagent-info.schema.json
More file actions
119 lines (119 loc) · 3.5 KB
/
Copy pathagent-info.schema.json
File metadata and controls
119 lines (119 loc) · 3.5 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/paperfoot/agent-cli-framework/main/schemas/agent-info.schema.json",
"title": "Agent CLI Framework capability manifest (agent-info)",
"description": "The canonical shape of `<tool> agent-info` output. Raw JSON, never wrapped in the output envelope. Every command listed must be routable in the binary.",
"type": "object",
"required": [
"name",
"version",
"description",
"commands",
"global_flags",
"exit_codes",
"envelope",
"config",
"auto_json_when_piped"
],
"properties": {
"name": { "type": "string", "minLength": 1 },
"version": { "type": "string", "minLength": 1 },
"description": { "type": "string", "minLength": 1 },
"commands": {
"type": "object",
"minProperties": 1,
"additionalProperties": { "$ref": "#/$defs/command" }
},
"global_flags": {
"type": "object",
"required": ["--json", "--quiet"],
"additionalProperties": {
"type": "object",
"required": ["description"],
"properties": {
"description": { "type": "string", "minLength": 1 },
"type": { "type": "string" },
"default": {}
},
"additionalProperties": true
}
},
"exit_codes": {
"type": "object",
"required": ["0", "1", "2", "3", "4"],
"additionalProperties": { "type": "string", "minLength": 1 }
},
"envelope": {
"type": "object",
"required": ["version", "success", "error"],
"properties": {
"version": { "const": "1" },
"success": { "type": "string" },
"error": { "type": "string" }
},
"additionalProperties": true
},
"config": {
"type": "object",
"required": ["path", "env_prefix"],
"properties": {
"path": { "type": "string", "minLength": 1 },
"env_prefix": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]*_$",
"description": "Uppercase prefix ending in underscore, e.g. MYCLI_"
}
},
"additionalProperties": true
},
"auto_json_when_piped": { "type": "boolean" }
},
"additionalProperties": true,
"$defs": {
"command": {
"type": "object",
"required": ["description", "args", "options"],
"properties": {
"description": { "type": "string", "minLength": 1 },
"aliases": {
"type": "array",
"items": { "type": "string", "minLength": 1 }
},
"args": {
"type": "array",
"items": { "$ref": "#/$defs/arg" }
},
"options": {
"type": "array",
"items": { "$ref": "#/$defs/option" }
}
},
"additionalProperties": true
},
"arg": {
"type": "object",
"required": ["name", "type", "required"],
"properties": {
"name": { "type": "string", "minLength": 1 },
"kind": { "enum": ["positional"] },
"type": { "type": "string" },
"required": { "type": "boolean" },
"description": { "type": "string" }
},
"additionalProperties": true
},
"option": {
"type": "object",
"required": ["name", "type"],
"properties": {
"name": { "type": "string", "pattern": "^--" },
"type": { "type": "string" },
"required": { "type": "boolean" },
"default": {},
"values": { "type": "array" },
"description": { "type": "string" }
},
"additionalProperties": true
}
}
}