@agentproto/corpus-cli 0.1.0-alpha.1 → 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +26 -8
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.ts +1 -5
- package/dist/index.mjs +15 -4
- package/dist/index.mjs.map +1 -1
- package/dist/specs/resources/aip-10/draft/KNOWLEDGE.schema.json +457 -0
- package/dist/specs/resources/aip-11/draft/LESSON.schema.json +149 -0
- package/dist/specs/resources/aip-12/draft/PLAYBOOK.schema.json +349 -0
- package/dist/specs/resources/aip-13/draft/WORK_ITEM.schema.json +547 -0
- package/dist/specs/resources/aip-14/draft/TOOL.schema.json +169 -0
- package/dist/specs/resources/aip-15/draft/WORKFLOW.schema.json +356 -0
- package/dist/specs/resources/aip-16/draft/IO.schema.json +64 -0
- package/dist/specs/resources/aip-17/draft/RUNNER.schema.json +81 -0
- package/dist/specs/resources/aip-18/draft/COLLECTION.schema.json +436 -0
- package/dist/specs/resources/aip-19/draft/SECRETS.schema.json +261 -0
- package/dist/specs/resources/aip-20/draft/WORK.schema.json +371 -0
- package/dist/specs/resources/aip-21/draft/AGENCY.schema.json +454 -0
- package/dist/specs/resources/aip-22/draft/OFFICE.schema.json +390 -0
- package/dist/specs/resources/aip-23/draft/IDENTITY.schema.json +358 -0
- package/dist/specs/resources/aip-24/draft/ASSEMBLY.schema.json +411 -0
- package/dist/specs/resources/aip-25/draft/PERSONA.schema.json +257 -0
- package/dist/specs/resources/aip-26/draft/CODE.schema.json +172 -0
- package/dist/specs/resources/aip-28/draft/INTENT.schema.json +215 -0
- package/dist/specs/resources/aip-29/draft/CLI.schema.json +339 -0
- package/dist/specs/resources/aip-3/draft/SKILL.schema.json +206 -0
- package/dist/specs/resources/aip-30/draft/DRIVER.schema.json +237 -0
- package/dist/specs/resources/aip-31/draft/HTTP.schema.json +80 -0
- package/dist/specs/resources/aip-32/draft/MCP.schema.json +88 -0
- package/dist/specs/resources/aip-33/draft/SDK.schema.json +60 -0
- package/dist/specs/resources/aip-34/draft/WORKSPACE.schema.json +252 -0
- package/dist/specs/resources/aip-35/draft/STORAGE.schema.json +237 -0
- package/dist/specs/resources/aip-36/draft/SANDBOX.schema.json +246 -0
- package/dist/specs/resources/aip-38/draft/POLICY.schema.json +217 -0
- package/dist/specs/resources/aip-39/draft/ACTION.schema.json +134 -0
- package/dist/specs/resources/aip-4/draft/DESIGN.schema.json +189 -0
- package/dist/specs/resources/aip-40/draft/EXTENSION.schema.json +116 -0
- package/dist/specs/resources/aip-41/draft/ROUTINE.schema.json +345 -0
- package/dist/specs/resources/aip-42/draft/AGENT.schema.json +268 -0
- package/dist/specs/resources/aip-44/draft/ACP.schema.json +170 -0
- package/dist/specs/resources/aip-45/draft/AGENT-CLI.schema.json +371 -0
- package/dist/specs/resources/aip-47/draft/ROLE.schema.json +199 -0
- package/dist/specs/resources/aip-48/draft/MultiAgentRuntime.schema.json +108 -0
- package/dist/specs/resources/aip-5/draft/TEMPLATE.schema.json +231 -0
- package/dist/specs/resources/aip-6/draft/COMPANY.schema.json +268 -0
- package/dist/specs/resources/aip-7/draft/GOVERNANCE.schema.json +581 -0
- package/dist/specs/resources/aip-8/draft/AGENCY.schema.json +518 -0
- package/dist/specs/resources/aip-9/draft/OPERATOR.schema.json +297 -0
- package/package.json +4 -4
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/docs/aip-45/AGENT-CLI.schema.json",
|
|
4
|
+
"title": "AGENT-CLI.md frontmatter — agentcli-interactive/v1",
|
|
5
|
+
"description": "JSON Schema for the YAML frontmatter of an AIP-45 AGENT-CLI.md manifest. Sibling of AIP-29 (CLI.md, tool CLIs); covers interactive agent CLIs (Hermes, Claude Code, OpenCode, Goose, Gemini CLI). Shares install/version/auth blocks with AIP-29 via $ref; binds to AIP-44 ACP for the wire protocol when protocol=acp.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["name", "id", "description", "version", "bin", "install", "version_check", "sandbox", "protocol"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"maxLength": 80,
|
|
14
|
+
"description": "Kebab id, MUST equal the parent directory name."
|
|
15
|
+
},
|
|
16
|
+
"id": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"pattern": "^[a-z0-9][a-z0-9\\-]{1,63}$"
|
|
19
|
+
},
|
|
20
|
+
"description": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"minLength": 1,
|
|
23
|
+
"maxLength": 2000
|
|
24
|
+
},
|
|
25
|
+
"version": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.\\-]+)?$"
|
|
28
|
+
},
|
|
29
|
+
"bin": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"pattern": "^[A-Za-z0-9._\\-/]+$",
|
|
32
|
+
"description": "Path to the binary (absolute or PATH-resolvable)."
|
|
33
|
+
},
|
|
34
|
+
"bin_args": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": { "type": "string" },
|
|
37
|
+
"description": "Default argv prefix (e.g. ['acp'] for `hermes acp`)."
|
|
38
|
+
},
|
|
39
|
+
"install": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"minItems": 1,
|
|
42
|
+
"items": { "$ref": "https://agentproto.sh/docs/aip-29/CLI.schema.json#/$defs/installMethod" },
|
|
43
|
+
"description": "Install methods — shared with AIP-29 via $ref."
|
|
44
|
+
},
|
|
45
|
+
"version_check": {
|
|
46
|
+
"$ref": "https://agentproto.sh/docs/aip-29/CLI.schema.json#/$defs/versionCheck"
|
|
47
|
+
},
|
|
48
|
+
"setup": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"description": "Post-install configuration steps — shared with AIP-29 via $ref. Used for sidecar daemons (openclaw onboard) and one-time bind config (gateway URL, default channel) that don't fit the auth state machine.",
|
|
51
|
+
"items": { "$ref": "https://agentproto.sh/docs/aip-29/CLI.schema.json#/$defs/setupStep" }
|
|
52
|
+
},
|
|
53
|
+
"auth": {
|
|
54
|
+
"$ref": "https://agentproto.sh/docs/aip-29/CLI.schema.json#/$defs/auth"
|
|
55
|
+
},
|
|
56
|
+
"sandbox": {
|
|
57
|
+
"description": "Inherits AIP-36 SANDBOX.md verbatim. Either an inline block or a workspace-relative ref to a SANDBOX.md.",
|
|
58
|
+
"oneOf": [
|
|
59
|
+
{ "type": "string", "description": "Workspace-relative path to a SANDBOX.md (AIP-36)." },
|
|
60
|
+
{ "type": "object", "description": "Inline AIP-36 sandbox block." }
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"runner": {
|
|
64
|
+
"oneOf": [
|
|
65
|
+
{ "type": "string", "description": "Workspace-relative path to a RUNNER.md (AIP-17)." },
|
|
66
|
+
{ "type": "object", "description": "Inline AIP-17 runner block." }
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
"protocol": {
|
|
70
|
+
"enum": ["acp", "mcp", "proprietary"],
|
|
71
|
+
"description": "Wire protocol discriminator. acp = AIP-44 ACP server; mcp = MCP-over-stdio; proprietary = adapter package implements AgentCliClient."
|
|
72
|
+
},
|
|
73
|
+
"acp": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "Workspace-relative ref to an AIP-44 ACP.md describing the wire profile. REQUIRED when protocol=acp."
|
|
76
|
+
},
|
|
77
|
+
"mcp": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"additionalProperties": false,
|
|
80
|
+
"required": ["transport"],
|
|
81
|
+
"description": "MCP server config. REQUIRED when protocol=mcp.",
|
|
82
|
+
"properties": {
|
|
83
|
+
"command": { "type": "string" },
|
|
84
|
+
"args": { "type": "array", "items": { "type": "string" } },
|
|
85
|
+
"transport": { "enum": ["stdio", "http", "sse"] },
|
|
86
|
+
"url": { "type": "string", "format": "uri" }
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"adapter": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"pattern": "^@?[a-z0-9][a-z0-9\\-./]*$",
|
|
92
|
+
"description": "NPM package name implementing AgentCliClient. REQUIRED when protocol=proprietary."
|
|
93
|
+
},
|
|
94
|
+
"session": { "$ref": "#/$defs/session" },
|
|
95
|
+
"models": { "$ref": "#/$defs/models" },
|
|
96
|
+
"capabilities": { "$ref": "#/$defs/capabilities" },
|
|
97
|
+
"modes": {
|
|
98
|
+
"type": "array",
|
|
99
|
+
"items": { "$ref": "#/$defs/mode" },
|
|
100
|
+
"description": "Mutually-exclusive operation modes the CLI exposes. The host picks at most one per turn via OPERATOR.runtime.config.mode. Each mode patches bin_args / env; the patches are applied AFTER the manifest's default bin_args and BEFORE option patches. Common shape: claude-code's permission modes (default | plan | accept-edits | bypass-permissions)."
|
|
101
|
+
},
|
|
102
|
+
"options": {
|
|
103
|
+
"type": "array",
|
|
104
|
+
"items": { "$ref": "#/$defs/option" },
|
|
105
|
+
"description": "Independent typed knobs the CLI accepts. The host picks any subset per turn via OPERATOR.runtime.config.options. Patches apply in declaration order, AFTER mode patches."
|
|
106
|
+
},
|
|
107
|
+
"continuation": { "$ref": "#/$defs/continuation" },
|
|
108
|
+
"requires": { "$ref": "https://agentproto.sh/docs/aip-29/CLI.schema.json#/properties/requires" },
|
|
109
|
+
"examples": {
|
|
110
|
+
"type": "array",
|
|
111
|
+
"items": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"required": ["goal", "prompt"],
|
|
115
|
+
"properties": {
|
|
116
|
+
"goal": { "type": "string" },
|
|
117
|
+
"prompt": { "type": "string" },
|
|
118
|
+
"note": { "type": "string" }
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"tags": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"items": { "type": "string", "pattern": "^[a-z0-9][a-z0-9\\-]{0,63}$" },
|
|
125
|
+
"uniqueItems": true
|
|
126
|
+
},
|
|
127
|
+
"metadata": { "type": "object" }
|
|
128
|
+
},
|
|
129
|
+
"allOf": [
|
|
130
|
+
{
|
|
131
|
+
"if": { "properties": { "protocol": { "const": "acp" } }, "required": ["protocol"] },
|
|
132
|
+
"then": { "required": ["acp"] }
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"if": { "properties": { "protocol": { "const": "mcp" } }, "required": ["protocol"] },
|
|
136
|
+
"then": { "required": ["mcp"] }
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"if": { "properties": { "protocol": { "const": "proprietary" } }, "required": ["protocol"] },
|
|
140
|
+
"then": { "required": ["adapter"] }
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"if": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"properties": {
|
|
146
|
+
"session": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"properties": { "mode": { "const": "resumable" } },
|
|
149
|
+
"required": ["mode"]
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"required": ["session"]
|
|
153
|
+
},
|
|
154
|
+
"then": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"properties": {
|
|
157
|
+
"capabilities": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"properties": { "resumable": { "const": true } },
|
|
160
|
+
"required": ["resumable"]
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"required": ["capabilities"]
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"if": {
|
|
168
|
+
"type": "object",
|
|
169
|
+
"properties": {
|
|
170
|
+
"continuation": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"properties": {
|
|
173
|
+
"default": { "const": "native-resume" }
|
|
174
|
+
},
|
|
175
|
+
"required": ["default"]
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"required": ["continuation"]
|
|
179
|
+
},
|
|
180
|
+
"then": {
|
|
181
|
+
"type": "object",
|
|
182
|
+
"properties": {
|
|
183
|
+
"capabilities": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"properties": { "resumable": { "const": true } },
|
|
186
|
+
"required": ["resumable"]
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"required": ["capabilities"]
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"$defs": {
|
|
194
|
+
"session": {
|
|
195
|
+
"type": "object",
|
|
196
|
+
"additionalProperties": false,
|
|
197
|
+
"properties": {
|
|
198
|
+
"mode": {
|
|
199
|
+
"enum": ["ephemeral", "persistent", "resumable"],
|
|
200
|
+
"default": "ephemeral",
|
|
201
|
+
"description": "ephemeral = torn down on disconnect; persistent = survives reconnect within idle_timeout_ms; resumable = durable across runs (requires capabilities.resumable: true)."
|
|
202
|
+
},
|
|
203
|
+
"idle_timeout_ms": {
|
|
204
|
+
"type": "integer",
|
|
205
|
+
"minimum": 1000,
|
|
206
|
+
"default": 600000
|
|
207
|
+
},
|
|
208
|
+
"max_turns": {
|
|
209
|
+
"type": "integer",
|
|
210
|
+
"minimum": 1
|
|
211
|
+
},
|
|
212
|
+
"context_carryover": {
|
|
213
|
+
"type": "boolean",
|
|
214
|
+
"default": true
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"models": {
|
|
219
|
+
"type": "object",
|
|
220
|
+
"additionalProperties": false,
|
|
221
|
+
"description": "Model routing for the agent. Maps logical defaults to env var slots resolved via AIP-19 SECRETS.md.",
|
|
222
|
+
"properties": {
|
|
223
|
+
"default": { "type": "string", "description": "Default model id passed to the agent." },
|
|
224
|
+
"allowed": {
|
|
225
|
+
"type": "array",
|
|
226
|
+
"items": { "type": "string" },
|
|
227
|
+
"description": "Model ids the host MAY route to."
|
|
228
|
+
},
|
|
229
|
+
"env": {
|
|
230
|
+
"type": "object",
|
|
231
|
+
"additionalProperties": { "type": "string" },
|
|
232
|
+
"description": "Map of model slot -> env var name (e.g. anthropic -> ANTHROPIC_API_KEY)."
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"capabilities": {
|
|
237
|
+
"type": "object",
|
|
238
|
+
"additionalProperties": false,
|
|
239
|
+
"description": "Manifest-declared capabilities. When protocol=acp, MUST be a subset of the AIP-44 ACP.md capabilities the bound runtime negotiates.",
|
|
240
|
+
"properties": {
|
|
241
|
+
"streaming": { "type": "boolean" },
|
|
242
|
+
"tool_calls": { "type": "boolean" },
|
|
243
|
+
"sub_agents": { "type": "boolean" },
|
|
244
|
+
"file_io": { "type": "boolean" },
|
|
245
|
+
"multimodal": { "type": "boolean" },
|
|
246
|
+
"resumable": { "type": "boolean" },
|
|
247
|
+
"bidirectional": { "type": "boolean" }
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"mode": {
|
|
251
|
+
"type": "object",
|
|
252
|
+
"additionalProperties": false,
|
|
253
|
+
"required": ["id"],
|
|
254
|
+
"description": "A single mutually-exclusive operation mode. Exactly one mode is active per turn; modes do not stack. Use options for independent knobs.",
|
|
255
|
+
"properties": {
|
|
256
|
+
"id": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"pattern": "^[a-z0-9][a-z0-9\\-]{0,63}$",
|
|
259
|
+
"description": "Stable id. The operator config references this id."
|
|
260
|
+
},
|
|
261
|
+
"description": { "type": "string" },
|
|
262
|
+
"bin_args_append": {
|
|
263
|
+
"type": "array",
|
|
264
|
+
"items": { "type": "string" },
|
|
265
|
+
"description": "Extra argv appended after the manifest's bin_args when this mode is active."
|
|
266
|
+
},
|
|
267
|
+
"env": {
|
|
268
|
+
"type": "object",
|
|
269
|
+
"additionalProperties": { "type": "string" },
|
|
270
|
+
"description": "Extra env vars merged into the spawn env when this mode is active."
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"option": {
|
|
275
|
+
"type": "object",
|
|
276
|
+
"additionalProperties": false,
|
|
277
|
+
"required": ["id", "type"],
|
|
278
|
+
"description": "A single typed knob. Multiple options can be active in the same turn; each option's patch is independent.",
|
|
279
|
+
"properties": {
|
|
280
|
+
"id": {
|
|
281
|
+
"type": "string",
|
|
282
|
+
"pattern": "^[a-z0-9][a-z0-9_]{0,63}$",
|
|
283
|
+
"description": "Stable id. The operator config references this id."
|
|
284
|
+
},
|
|
285
|
+
"type": {
|
|
286
|
+
"enum": ["boolean", "integer", "string", "enum"]
|
|
287
|
+
},
|
|
288
|
+
"description": { "type": "string" },
|
|
289
|
+
"enum": {
|
|
290
|
+
"type": "array",
|
|
291
|
+
"items": { "type": "string" },
|
|
292
|
+
"minItems": 1,
|
|
293
|
+
"description": "Allowed values when type=enum."
|
|
294
|
+
},
|
|
295
|
+
"default": {
|
|
296
|
+
"description": "Default value used when the operator config omits this option. Type matches the declared `type`."
|
|
297
|
+
},
|
|
298
|
+
"min": {
|
|
299
|
+
"type": "integer",
|
|
300
|
+
"description": "Lower bound when type=integer."
|
|
301
|
+
},
|
|
302
|
+
"max": {
|
|
303
|
+
"type": "integer",
|
|
304
|
+
"description": "Upper bound when type=integer."
|
|
305
|
+
},
|
|
306
|
+
"bin_args_template": {
|
|
307
|
+
"type": "array",
|
|
308
|
+
"items": { "type": "string" },
|
|
309
|
+
"description": "Argv template appended when the option has a non-default value. The literal token `{value}` is replaced with the option's value (stringified). Use for value-bearing flags like `--model {value}` or `--max-turns {value}`."
|
|
310
|
+
},
|
|
311
|
+
"bin_args_append_when_true": {
|
|
312
|
+
"type": "array",
|
|
313
|
+
"items": { "type": "string" },
|
|
314
|
+
"description": "Argv appended when type=boolean AND value=true. Use for bare flags like `--auto`."
|
|
315
|
+
},
|
|
316
|
+
"env": {
|
|
317
|
+
"type": "object",
|
|
318
|
+
"additionalProperties": { "type": "string" },
|
|
319
|
+
"description": "Env vars to merge when the option has a non-default value. Values may contain `{value}` for templating."
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"allOf": [
|
|
323
|
+
{
|
|
324
|
+
"if": { "properties": { "type": { "const": "enum" } }, "required": ["type"] },
|
|
325
|
+
"then": { "required": ["enum"] }
|
|
326
|
+
}
|
|
327
|
+
]
|
|
328
|
+
},
|
|
329
|
+
"continuation": {
|
|
330
|
+
"type": "object",
|
|
331
|
+
"additionalProperties": false,
|
|
332
|
+
"required": ["default", "supported"],
|
|
333
|
+
"description": "How prior turns reach the CLI. The driver hosts a strategy registry; this block declares which strategies fit this CLI and which is the default. The operator config MAY override `default` with any id from `supported`.",
|
|
334
|
+
"properties": {
|
|
335
|
+
"default": { "$ref": "#/$defs/continuationStrategyId" },
|
|
336
|
+
"supported": {
|
|
337
|
+
"type": "array",
|
|
338
|
+
"items": { "$ref": "#/$defs/continuationStrategyId" },
|
|
339
|
+
"minItems": 1,
|
|
340
|
+
"uniqueItems": true,
|
|
341
|
+
"description": "Strategies the CLI is known to work with. The host MUST refuse to run with a strategy outside this list."
|
|
342
|
+
},
|
|
343
|
+
"pinned_session": {
|
|
344
|
+
"type": "object",
|
|
345
|
+
"additionalProperties": false,
|
|
346
|
+
"description": "Tuning for the pinned-session strategy. Ignored by other strategies.",
|
|
347
|
+
"properties": {
|
|
348
|
+
"idle_timeout_ms": {
|
|
349
|
+
"type": "integer",
|
|
350
|
+
"minimum": 1000,
|
|
351
|
+
"default": 1800000,
|
|
352
|
+
"description": "How long an idle pinned session is kept alive before the driver closes it. Applies in addition to the CLI's own session.idle_timeout_ms."
|
|
353
|
+
},
|
|
354
|
+
"key_scope": {
|
|
355
|
+
"type": "array",
|
|
356
|
+
"items": { "enum": ["conversation", "operator", "user", "guild", "workspace"] },
|
|
357
|
+
"minItems": 1,
|
|
358
|
+
"uniqueItems": true,
|
|
359
|
+
"default": ["conversation", "operator"],
|
|
360
|
+
"description": "Composite key that uniquely identifies a pinned session. Default keys by (conversation, operator) — different conversations get different child processes; one operator per conversation reuses one process across turns."
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"continuationStrategyId": {
|
|
367
|
+
"enum": ["none", "pinned-session", "transcript", "native-resume"],
|
|
368
|
+
"description": "Built-in strategy ids. Future custom strategies require a follow-up AIP that opens this enum."
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-47/ROLE.schema.json",
|
|
4
|
+
"title": "ROLE.md frontmatter (AIP-47)",
|
|
5
|
+
"description": "Validates the YAML frontmatter portion of an AIP-47 ROLE.md manifest. Single-doc, no oneOf — every role is the same shape. The body is markdown and not validated by this schema.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema",
|
|
9
|
+
"name",
|
|
10
|
+
"title",
|
|
11
|
+
"description",
|
|
12
|
+
"version",
|
|
13
|
+
"seniority",
|
|
14
|
+
"mission",
|
|
15
|
+
"responsibilities"
|
|
16
|
+
],
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"properties": {
|
|
19
|
+
"schema": {
|
|
20
|
+
"const": "role/v1",
|
|
21
|
+
"description": "Schema dispatch tag. MUST be 'role/v1' for this version of AIP-47."
|
|
22
|
+
},
|
|
23
|
+
"name": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 2,
|
|
26
|
+
"maxLength": 64,
|
|
27
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
28
|
+
"description": "Machine identifier. Lowercase, digits, dashes. Must start with a letter, end with a letter or digit. Unique within the registry that hosts the role."
|
|
29
|
+
},
|
|
30
|
+
"title": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1,
|
|
33
|
+
"maxLength": 120,
|
|
34
|
+
"description": "Human-readable display title, sentence case."
|
|
35
|
+
},
|
|
36
|
+
"description": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"minLength": 1,
|
|
39
|
+
"maxLength": 2000,
|
|
40
|
+
"description": "One-paragraph job description. The role's purpose, audience, and shape."
|
|
41
|
+
},
|
|
42
|
+
"version": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][a-zA-Z0-9.-]+)?$",
|
|
45
|
+
"description": "Semver. Bump on breaking change to responsibilities, KPIs, tools, or seniority."
|
|
46
|
+
},
|
|
47
|
+
"extends": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1,
|
|
50
|
+
"description": "Reference to a parent ROLE. Triggers composition. Accepts any of the ref forms in AIP-47 §Reference syntax: bare slug (`seo-specialist`), scoped slug (`builtin/seo-specialist`, `file/<path>`, `db/<id>`), `ws://roles/<slug>` URI, or fully-qualified URL. Path-form refs SHOULD end in 'ROLE.md'."
|
|
51
|
+
},
|
|
52
|
+
"department": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"minLength": 1,
|
|
55
|
+
"maxLength": 80,
|
|
56
|
+
"pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
|
|
57
|
+
"description": "Department slug. Lowercase kebab-case. Recommended values listed in AIP-47 §Departments; free-form to accept domain-specific values."
|
|
58
|
+
},
|
|
59
|
+
"reports_to": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"minLength": 1,
|
|
62
|
+
"description": "Role-to-role reporting link. Conventionally a 'ws://roles/<slug>' ref. Schema does not validate scheme; the loader resolves."
|
|
63
|
+
},
|
|
64
|
+
"seniority": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"enum": [
|
|
67
|
+
"intern",
|
|
68
|
+
"junior",
|
|
69
|
+
"mid",
|
|
70
|
+
"senior",
|
|
71
|
+
"lead",
|
|
72
|
+
"principal",
|
|
73
|
+
"executive"
|
|
74
|
+
],
|
|
75
|
+
"description": "Seniority level of the job. Operator instances inherit this; a promotion is re-binding the operator to a higher-seniority role."
|
|
76
|
+
},
|
|
77
|
+
"mission": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"minLength": 1,
|
|
80
|
+
"maxLength": 2000,
|
|
81
|
+
"description": "One-paragraph mission, markdown. The reason the role exists."
|
|
82
|
+
},
|
|
83
|
+
"responsibilities": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"minItems": 1,
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"minLength": 1,
|
|
89
|
+
"maxLength": 280
|
|
90
|
+
},
|
|
91
|
+
"description": "Ordered imperative clauses. At least one. Lineage accumulates under 'extends' (append-and-dedupe)."
|
|
92
|
+
},
|
|
93
|
+
"capabilities": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
96
|
+
"uniqueItems": true,
|
|
97
|
+
"default": [],
|
|
98
|
+
"description": "Competences this role is expected to have. Append-and-dedupe across 'extends'."
|
|
99
|
+
},
|
|
100
|
+
"tools": {
|
|
101
|
+
"type": "array",
|
|
102
|
+
"items": { "type": "string", "minLength": 1 },
|
|
103
|
+
"uniqueItems": true,
|
|
104
|
+
"default": [],
|
|
105
|
+
"description": "AIP-14 tool refs the role declares as intended. Append-and-dedupe across 'extends'. Governance (AIP-7) gates effect."
|
|
106
|
+
},
|
|
107
|
+
"skills": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"items": { "type": "string", "minLength": 1 },
|
|
110
|
+
"uniqueItems": true,
|
|
111
|
+
"default": [],
|
|
112
|
+
"description": "AIP-3 skill refs the role expects to load. Append-and-dedupe across 'extends'."
|
|
113
|
+
},
|
|
114
|
+
"kpis": {
|
|
115
|
+
"type": "array",
|
|
116
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
117
|
+
"uniqueItems": true,
|
|
118
|
+
"default": [],
|
|
119
|
+
"description": "Scorer slugs (forward AIP) — KPIs evaluated against operators in this role. Append-and-dedupe across 'extends'."
|
|
120
|
+
},
|
|
121
|
+
"strengths": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
124
|
+
"uniqueItems": true,
|
|
125
|
+
"default": [],
|
|
126
|
+
"description": "Job-side strengths in prose. Append-and-dedupe across 'extends'."
|
|
127
|
+
},
|
|
128
|
+
"antiPatterns": {
|
|
129
|
+
"type": "array",
|
|
130
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
131
|
+
"uniqueItems": true,
|
|
132
|
+
"default": [],
|
|
133
|
+
"description": "What the role explicitly does NOT do. Append-and-dedupe across 'extends'."
|
|
134
|
+
},
|
|
135
|
+
"onPromotion": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"minLength": 1,
|
|
138
|
+
"description": "AIP-39 action ref fired on promotion INTO this role."
|
|
139
|
+
},
|
|
140
|
+
"onDemotion": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"minLength": 1,
|
|
143
|
+
"description": "AIP-39 action ref fired on demotion OUT of this role."
|
|
144
|
+
},
|
|
145
|
+
"onAssign": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"minLength": 1,
|
|
148
|
+
"description": "AIP-39 action ref fired on first assignment of this role."
|
|
149
|
+
},
|
|
150
|
+
"appliesTo": {
|
|
151
|
+
"type": "array",
|
|
152
|
+
"items": { "type": "string", "minLength": 1 },
|
|
153
|
+
"uniqueItems": true,
|
|
154
|
+
"default": [],
|
|
155
|
+
"description": "Cross-AIP bindings — restrict the role to specific operators. Local-only under 'extends' (NOT inherited)."
|
|
156
|
+
},
|
|
157
|
+
"defaultPersona": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"minLength": 1,
|
|
160
|
+
"description": "AIP-25 PERSONA ref recommended for operators adopting this role. Advisory; the operator's own 'persona' field overrides."
|
|
161
|
+
},
|
|
162
|
+
"defaultIdentity": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"minLength": 1,
|
|
165
|
+
"description": "AIP-23 IDENTITY ref recommended for operators adopting this role. Advisory; the operator's own 'identity' field overrides."
|
|
166
|
+
},
|
|
167
|
+
"defaultPolicy": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"minLength": 1,
|
|
170
|
+
"description": "AIP-38 POLICY ref recommended for operators adopting this role. ADVISORY ONLY — role declares intent, policy decides effect. The runtime MUST NOT apply defaultPolicy to an operator without the operator's own 'policy:' field or a governance signature attesting the binding. See AIP-47 §Role vs Policy vs Governance."
|
|
171
|
+
},
|
|
172
|
+
"knowledge": {
|
|
173
|
+
"type": "object",
|
|
174
|
+
"additionalProperties": false,
|
|
175
|
+
"properties": {
|
|
176
|
+
"packs": {
|
|
177
|
+
"type": "array",
|
|
178
|
+
"items": { "type": "string", "minLength": 1 },
|
|
179
|
+
"uniqueItems": true,
|
|
180
|
+
"default": [],
|
|
181
|
+
"description": "AIP-10 knowledge-pack refs this role mounts as its generic corpus floor. The host resolves each ref to a pack and mounts it read-only UNDER the operator's own editable corpus (the host overlays them). Append-and-dedupe across 'extends'. Absent = the host's convention (e.g. a pack named after the role slug). Operator-level packs layer ABOVE these."
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"description": "Generic knowledge this role consults — AIP-10 corpus packs mounted read-only as a floor beneath the operator's own corpus. Distinct from 'skills' (what the role knows how to DO): knowledge is what it CONSULTS. The host unions these with any operator-level packs."
|
|
185
|
+
},
|
|
186
|
+
"tags": {
|
|
187
|
+
"type": "array",
|
|
188
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
|
|
189
|
+
"uniqueItems": true,
|
|
190
|
+
"default": [],
|
|
191
|
+
"description": "Catalog tags. Lowercase kebab-case. Append-and-dedupe across 'extends'."
|
|
192
|
+
},
|
|
193
|
+
"metadata": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"default": {},
|
|
196
|
+
"description": "Vendor extensions, namespaced under '<vendor>'. Hosts MUST tolerate unknown vendor namespaces; they MUST NOT honour metadata that overrides AIP-defined fields."
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|