@agentproto/corpus-cli 0.11.3 → 0.11.5

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.
Files changed (29) hide show
  1. package/dist/cli.mjs +1 -1
  2. package/dist/cli.mjs.map +1 -1
  3. package/dist/specs/resources/aip-14/draft/TOOL.schema.json +2 -2
  4. package/dist/specs/resources/aip-15/draft/WORKFLOW.schema.json +7 -7
  5. package/dist/specs/resources/aip-22/draft/OFFICE.schema.json +8 -8
  6. package/dist/specs/resources/aip-23/draft/IDENTITY.schema.json +2 -2
  7. package/dist/specs/resources/aip-34/draft/TYPES.schema.json +1 -1
  8. package/dist/specs/resources/aip-34/draft/WORKSPACE.schema.json +5 -2
  9. package/dist/specs/resources/aip-36/draft/PLACEMENT.schema.json +129 -0
  10. package/dist/specs/resources/aip-36/draft/SANDBOX.schema.json +3 -3
  11. package/dist/specs/resources/aip-38/draft/POLICY.schema.json +22 -2
  12. package/dist/specs/resources/aip-41/draft/ROUTINE.schema.json +3 -3
  13. package/dist/specs/resources/aip-42/draft/AGENT.schema.json +42 -4
  14. package/dist/specs/resources/aip-45/draft/HARNESS.schema.json +87 -9
  15. package/dist/specs/resources/aip-45/draft/STREAM-EVENTS.schema.json +192 -0
  16. package/dist/specs/resources/aip-46/draft/SessionConfig.schema.json +2 -26
  17. package/dist/specs/resources/aip-47/draft/ROLE.schema.json +93 -1
  18. package/dist/specs/resources/aip-53/draft/APP.schema.json +354 -87
  19. package/dist/specs/resources/aip-54/draft/WS-REF.schema.json +2 -1
  20. package/dist/specs/resources/aip-58/draft/run.schema.json +1 -1
  21. package/dist/specs/resources/aip-6/draft/COMPANY.schema.json +67 -105
  22. package/dist/specs/resources/aip-63/draft/BROWSER.schema.json +54 -12
  23. package/dist/specs/resources/aip-63/draft/RECIPE.schema.json +93 -0
  24. package/dist/specs/resources/aip-63/draft/RECORDING.schema.json +2 -0
  25. package/dist/specs/resources/{pending/memory → aip-72}/draft/MEMORY.schema.json +115 -62
  26. package/dist/specs/resources/aip-9/draft/OPERATOR.schema.json +229 -138
  27. package/package.json +3 -3
  28. package/dist/specs/resources/pending/harness/HARNESS.schema.json +0 -254
  29. package/dist/specs/resources/pending/services/SERVICES.schema.json +0 -55
@@ -0,0 +1,192 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentproto.sh/docs/aip-45/STREAM-EVENTS.schema.json",
4
+ "title": "AIP-45 stream events: agent-prompt and mode-changed",
5
+ "description": "JSON Schema for the AIP-45 stream events whose fields are specified: agent-prompt (with its optional typed request kinds) and mode-changed. The event name is carried in `kind`. The other events of the taxonomy (text-delta, tool-call, tool-result, thought, turn-end, error) are not covered here yet.",
6
+ "oneOf": [
7
+ { "$ref": "#/$defs/agentPrompt" },
8
+ { "$ref": "#/$defs/modeChanged" }
9
+ ],
10
+ "$defs": {
11
+ "meta": {
12
+ "type": "object",
13
+ "description": "Vendor extras. Consumers MUST NOT rely on keys they do not know."
14
+ },
15
+ "modeChanged": {
16
+ "type": "object",
17
+ "additionalProperties": false,
18
+ "required": ["kind", "sessionId", "modeId", "previousModeId", "cause"],
19
+ "description": "The session's current mode changed. Mirrors ACP current_mode_update (currentModeId) and adds previousModeId and cause.",
20
+ "properties": {
21
+ "kind": { "const": "mode-changed" },
22
+ "sessionId": { "type": "string", "minLength": 1 },
23
+ "modeId": { "type": "string", "minLength": 1, "description": "The current mode after the change. One of the session's available modes." },
24
+ "previousModeId": { "type": "string", "minLength": 1, "description": "The mode before the change. MUST differ from modeId (not expressible in JSON Schema; checked by consumers)." },
25
+ "cause": {
26
+ "enum": ["caller", "agent"],
27
+ "description": "caller = the caller's own setSessionMode was applied; agent = any other reason, including a switch after an approved plan."
28
+ },
29
+ "reason": { "type": "string", "description": "Human-readable reason, e.g. \"plan approved\"." },
30
+ "_meta": { "$ref": "#/$defs/meta" }
31
+ }
32
+ },
33
+ "permissionOption": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": ["optionId", "name", "kind"],
37
+ "description": "One answer the caller can pick. Same shape as ACP PermissionOption.",
38
+ "properties": {
39
+ "optionId": { "type": "string", "minLength": 1 },
40
+ "name": { "type": "string", "minLength": 1 },
41
+ "kind": { "enum": ["allow_once", "allow_always", "reject_once", "reject_always"] },
42
+ "_meta": { "$ref": "#/$defs/meta" }
43
+ }
44
+ },
45
+ "questionRequest": {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "required": ["prompt", "choices", "allowFreeText"],
49
+ "properties": {
50
+ "prompt": { "type": "string", "minLength": 1, "description": "The question text." },
51
+ "choices": {
52
+ "type": "array",
53
+ "items": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": ["optionId", "label"],
57
+ "properties": {
58
+ "optionId": { "type": "string", "minLength": 1, "description": "MUST appear in the event's options." },
59
+ "label": { "type": "string", "minLength": 1 },
60
+ "description": { "type": "string" }
61
+ }
62
+ }
63
+ },
64
+ "allowFreeText": { "type": "boolean", "description": "A typed answer is accepted: the caller selects freeTextOptionId and puts the text in the resolution's feedback." },
65
+ "freeTextOptionId": { "type": "string", "minLength": 1, "description": "REQUIRED when allowFreeText is true. MUST appear in the event's options." },
66
+ "fields": {
67
+ "type": "array",
68
+ "minItems": 1,
69
+ "items": { "$ref": "#/$defs/questionField" },
70
+ "description": "Multi-field question (2026-11-03). When present it is the source of truth: the caller answers with respondPermission(toolCallId, { answers }) keyed by field id, and the legacy members (prompt as the overall message, choices, allowFreeText, freeTextOptionId) are a projection for consumers that predate it."
71
+ }
72
+ },
73
+ "allOf": [
74
+ {
75
+ "if": { "properties": { "allowFreeText": { "const": true } }, "required": ["allowFreeText"] },
76
+ "then": { "required": ["freeTextOptionId"] }
77
+ },
78
+ {
79
+ "if": {
80
+ "properties": { "allowFreeText": { "const": false } },
81
+ "required": ["allowFreeText"],
82
+ "not": { "required": ["fields"] }
83
+ },
84
+ "then": { "properties": { "choices": { "minItems": 1 } } }
85
+ }
86
+ ]
87
+ },
88
+ "questionField": {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "required": ["id", "input", "prompt"],
92
+ "description": "One question of a multi-field prompt. For an ACP form elicitation, one schema property.",
93
+ "properties": {
94
+ "id": { "type": "string", "minLength": 1, "description": "Stable key, unique in the prompt. For an ACP elicitation: the schema property key." },
95
+ "input": { "enum": ["single", "multi", "text", "boolean", "number"] },
96
+ "header": { "type": "string", "description": "Short chip label." },
97
+ "prompt": { "type": "string", "minLength": 1, "description": "The question text for this field." },
98
+ "choices": {
99
+ "type": "array",
100
+ "items": {
101
+ "type": "object",
102
+ "additionalProperties": false,
103
+ "required": ["value", "label"],
104
+ "properties": {
105
+ "value": { "type": "string", "description": "What goes back to the harness." },
106
+ "label": { "type": "string", "minLength": 1 },
107
+ "description": { "type": "string" },
108
+ "preview": { "type": "string" }
109
+ }
110
+ }
111
+ },
112
+ "allowFreeText": { "type": "boolean", "description": "single / multi: the user may type an answer instead of, or in addition to, a choice." },
113
+ "required": { "type": "boolean" },
114
+ "recommended": { "type": "string", "description": "Daemon recommendation, a choices[].value. Never guessed by a client." }
115
+ },
116
+ "if": { "properties": { "input": { "enum": ["single", "multi"] } } },
117
+ "then": { "required": ["choices"], "properties": { "choices": { "minItems": 1 } } }
118
+ },
119
+ "planApprovalRequest": {
120
+ "type": "object",
121
+ "additionalProperties": false,
122
+ "required": ["approveOptionId", "rejectOptionId"],
123
+ "anyOf": [{ "required": ["plan"] }, { "required": ["planRef"] }],
124
+ "properties": {
125
+ "plan": { "type": "string", "description": "The plan text." },
126
+ "planRef": { "type": "string", "minLength": 1, "description": "A reference to the plan (a path inside the session's sandbox, or a URI)." },
127
+ "targetModeId": { "type": "string", "minLength": 1, "description": "The session mode the harness enters if the plan is approved." },
128
+ "approveOptionId": { "type": "string", "minLength": 1, "description": "MUST appear in the event's options with kind allow_once." },
129
+ "rejectOptionId": { "type": "string", "minLength": 1, "description": "MUST appear in the event's options with kind reject_once. The resolution's feedback, when present, is the rejection reason handed to the agent." }
130
+ }
131
+ },
132
+ "agentPrompt": {
133
+ "type": "object",
134
+ "additionalProperties": false,
135
+ "required": ["kind", "sessionId", "toolCallId", "options"],
136
+ "description": "The agent asks the caller to choose among options. Answered with respondPermission(toolCallId, { optionId, feedback? } | { answers } | { cancelled: true }); answers only for a question with fields.",
137
+ "properties": {
138
+ "kind": { "const": "agent-prompt" },
139
+ "sessionId": { "type": "string", "minLength": 1 },
140
+ "toolCallId": { "type": "string", "minLength": 1, "description": "Request id the caller passes back to respondPermission." },
141
+ "options": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/permissionOption" } },
142
+ "text": { "type": "string", "description": "Human-readable question line." },
143
+ "toolName": { "type": "string" },
144
+ "rawInput": { "description": "The tool call's raw input, unmodified." },
145
+ "request": {
146
+ "enum": ["tool-permission", "question", "plan-approval"],
147
+ "default": "tool-permission",
148
+ "description": "What the agent asks for. Absent reads as tool-permission."
149
+ },
150
+ "question": { "$ref": "#/$defs/questionRequest" },
151
+ "planApproval": { "$ref": "#/$defs/planApprovalRequest" },
152
+ "_meta": { "$ref": "#/$defs/meta" }
153
+ },
154
+ "allOf": [
155
+ {
156
+ "if": { "properties": { "request": { "const": "question" } }, "required": ["request"] },
157
+ "then": { "required": ["question"], "not": { "required": ["planApproval"] } }
158
+ },
159
+ {
160
+ "if": { "properties": { "request": { "const": "plan-approval" } }, "required": ["request"] },
161
+ "then": { "required": ["planApproval"], "not": { "required": ["question"] } }
162
+ },
163
+ {
164
+ "if": {
165
+ "anyOf": [
166
+ { "not": { "required": ["request"] } },
167
+ { "properties": { "request": { "const": "tool-permission" } }, "required": ["request"] }
168
+ ]
169
+ },
170
+ "then": { "not": { "anyOf": [{ "required": ["question"] }, { "required": ["planApproval"] }] } }
171
+ },
172
+ {
173
+ "if": {
174
+ "properties": { "request": { "enum": ["question", "plan-approval"] } },
175
+ "required": ["request"]
176
+ },
177
+ "then": {
178
+ "properties": {
179
+ "options": {
180
+ "contains": {
181
+ "type": "object",
182
+ "properties": { "kind": { "enum": ["reject_once", "reject_always"] } },
183
+ "required": ["kind"]
184
+ }
185
+ }
186
+ }
187
+ }
188
+ }
189
+ ]
190
+ }
191
+ }
192
+ }
@@ -16,12 +16,6 @@
16
16
  "minLength": 1,
17
17
  "description": "AIP-45 harness slug."
18
18
  },
19
- "adapter": {
20
- "type": "string",
21
- "minLength": 1,
22
- "deprecated": true,
23
- "description": "Legacy alias of `harness` (AIP-70). A config MUST NOT carry both."
24
- },
25
19
  "model": {
26
20
  "type": "string",
27
21
  "minLength": 1,
@@ -88,7 +82,7 @@
88
82
  "profileRef": {
89
83
  "type": "string",
90
84
  "minLength": 1,
91
- "description": "AIP-69 auth profile id."
85
+ "description": "AIP-69 auth profile id, or an account slot `slot:<name>`: a named indirection resolved through the host config map `accountSlots` (slot name, no dot -> real auth profile id) at the moment of use (spawn, restart, turn-retry fallback). An unknown slot, or one naming a missing or disabled profile, is an error at use time, never a silent fallback. The session records the real profile it bills and, separately, the slot it asked for (`accessSlot`)."
92
86
  }
93
87
  }
94
88
  },
@@ -96,12 +90,6 @@
96
90
  "type": "object",
97
91
  "description": "Harness-native AIP-45 options, validated against the harness manifest."
98
92
  }
99
- },
100
- "not": {
101
- "required": [
102
- "harness",
103
- "adapter"
104
- ]
105
93
  }
106
94
  },
107
95
  "FailureClass": {
@@ -127,12 +115,6 @@
127
115
  "minLength": 1,
128
116
  "description": "AIP-45 harness slug."
129
117
  },
130
- "adapter": {
131
- "type": "string",
132
- "minLength": 1,
133
- "deprecated": true,
134
- "description": "Legacy alias of `harness` (AIP-70). A config MUST NOT carry both."
135
- },
136
118
  "model": {
137
119
  "type": "string",
138
120
  "minLength": 1,
@@ -199,7 +181,7 @@
199
181
  "profileRef": {
200
182
  "type": "string",
201
183
  "minLength": 1,
202
- "description": "AIP-69 auth profile id."
184
+ "description": "AIP-69 auth profile id, or an account slot `slot:<name>`: a named indirection resolved through the host config map `accountSlots` (slot name, no dot -> real auth profile id) at the moment of use (spawn, restart, turn-retry fallback). An unknown slot, or one naming a missing or disabled profile, is an error at use time, never a silent fallback. The session records the real profile it bills and, separately, the slot it asked for (`accessSlot`)."
203
185
  }
204
186
  }
205
187
  },
@@ -237,12 +219,6 @@
237
219
  "$ref": "#/$defs/ConfigOverlay"
238
220
  }
239
221
  }
240
- },
241
- "not": {
242
- "required": [
243
- "harness",
244
- "adapter"
245
- ]
246
222
  }
247
223
  },
248
224
  "SessionPreset": {
@@ -167,7 +167,7 @@
167
167
  "defaultPolicy": {
168
168
  "type": "string",
169
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."
170
+ "description": "AIP-38 POLICY ref recommended for operators adopting this role. ADVISORY ONLY, denies included: role declares intent, policy decides effect; it may pre-fill the form that hires an operator and nothing more. 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
171
  },
172
172
  "knowledge": {
173
173
  "type": "object",
@@ -183,6 +183,13 @@
183
183
  },
184
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
185
  },
186
+ "slots": {
187
+ "type": "object",
188
+ "propertyNames": { "pattern": "^[a-z][a-z0-9_]{0,63}$" },
189
+ "additionalProperties": { "$ref": "#/$defs/slot" },
190
+ "default": {},
191
+ "description": "Typed slots an operator fills with its AIP-9 'role.bind' (refs and tools) and 'role.with' (scalars). Merged by key across 'extends': a key the child redeclares replaces the parent's. A slot grants nothing and MUST NOT be typed as a policy. See AIP-47 §Slots."
192
+ },
186
193
  "tags": {
187
194
  "type": "array",
188
195
  "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$" },
@@ -195,5 +202,90 @@
195
202
  "default": {},
196
203
  "description": "Vendor extensions, namespaced under '<vendor>'. Hosts MUST tolerate unknown vendor namespaces; they MUST NOT honour metadata that overrides AIP-defined fields."
197
204
  }
205
+ },
206
+ "$defs": {
207
+ "slot": {
208
+ "description": "One slot declaration. Exactly one type key: 'aip', 'collection', 'tool' or 'scalar'.",
209
+ "oneOf": [
210
+ {
211
+ "type": "object",
212
+ "required": ["aip"],
213
+ "additionalProperties": false,
214
+ "properties": {
215
+ "aip": {
216
+ "type": "integer",
217
+ "minimum": 1,
218
+ "not": { "const": 38 },
219
+ "description": "The slot takes an AIP-54 ref to an artifact whose doctype is owned by this AIP number. 38 (policy) is forbidden: a slot never carries a policy."
220
+ },
221
+ "description": { "$ref": "#/$defs/slotDescription" },
222
+ "optional": { "$ref": "#/$defs/slotOptional" }
223
+ }
224
+ },
225
+ {
226
+ "type": "object",
227
+ "required": ["collection"],
228
+ "additionalProperties": false,
229
+ "properties": {
230
+ "collection": {
231
+ "type": "string",
232
+ "pattern": "^[a-z][a-z0-9-]*$",
233
+ "not": { "const": "policies" },
234
+ "description": "The slot takes an AIP-54 ref whose kind belongs to this collection: a ws:// collection of the AIP-54 table, or a base collection. 'policies' is forbidden: a slot never carries a policy."
235
+ },
236
+ "description": { "$ref": "#/$defs/slotDescription" },
237
+ "optional": { "$ref": "#/$defs/slotOptional" }
238
+ }
239
+ },
240
+ {
241
+ "type": "object",
242
+ "required": ["tool"],
243
+ "additionalProperties": false,
244
+ "properties": {
245
+ "tool": {
246
+ "enum": ["mcp", "ref"],
247
+ "description": "'mcp': the slot takes a structured server ref {kind: mcp, server, allow?, deny?} (AIP-42 tools). 'ref': the slot takes one tool named <server>/<name> (AIP-54 tool-body). The bound tool joins the operator's tools and is still subject to policy."
248
+ },
249
+ "description": { "$ref": "#/$defs/slotDescription" },
250
+ "optional": { "$ref": "#/$defs/slotOptional" }
251
+ }
252
+ },
253
+ {
254
+ "type": "object",
255
+ "required": ["scalar"],
256
+ "additionalProperties": false,
257
+ "properties": {
258
+ "scalar": {
259
+ "enum": ["string", "number", "boolean"],
260
+ "description": "The slot takes a JSON scalar of this type, filled through 'role.with'."
261
+ },
262
+ "enum": {
263
+ "type": "array",
264
+ "minItems": 1,
265
+ "uniqueItems": true,
266
+ "items": { "type": ["string", "number", "boolean"] },
267
+ "description": "The allowed values."
268
+ },
269
+ "default": {
270
+ "type": ["string", "number", "boolean"],
271
+ "description": "Value used when the operator gives none. A scalar with a default is optional."
272
+ },
273
+ "description": { "$ref": "#/$defs/slotDescription" },
274
+ "optional": { "$ref": "#/$defs/slotOptional" }
275
+ }
276
+ }
277
+ ]
278
+ },
279
+ "slotDescription": {
280
+ "type": "string",
281
+ "minLength": 1,
282
+ "maxLength": 280,
283
+ "description": "Label shown in the rendered bindings block and in a hiring UI."
284
+ },
285
+ "slotOptional": {
286
+ "type": "boolean",
287
+ "default": false,
288
+ "description": "An optional slot may be left unbound."
289
+ }
198
290
  }
199
291
  }