@agentproto/corpus-cli 0.11.2 → 0.11.4
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 +1 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/specs/resources/aip-11/draft/LESSON.schema.json +2 -2
- package/dist/specs/resources/aip-12/draft/PLAYBOOK.schema.json +2 -1
- package/dist/specs/resources/aip-14/draft/TOOL.schema.json +2 -2
- package/dist/specs/resources/aip-22/draft/OFFICE.schema.json +8 -8
- package/dist/specs/resources/aip-23/draft/IDENTITY.schema.json +2 -2
- package/dist/specs/resources/aip-3/draft/SKILL.schema.json +2 -2
- package/dist/specs/resources/aip-34/draft/EXPORT.schema.json +2 -2
- package/dist/specs/resources/aip-34/draft/LOCK.schema.json +3 -3
- package/dist/specs/resources/aip-34/draft/PRESENCE.schema.json +3 -3
- package/dist/specs/resources/aip-34/draft/TYPES.schema.json +3 -3
- package/dist/specs/resources/aip-34/draft/WORKSPACE.schema.json +6 -3
- package/dist/specs/resources/aip-38/draft/POLICY.schema.json +36 -5
- package/dist/specs/resources/aip-4/draft/DESIGN.schema.json +2 -2
- package/dist/specs/resources/aip-42/draft/AGENT.schema.json +42 -4
- package/dist/specs/resources/aip-43/draft/Selector.schema.json +245 -0
- package/dist/specs/resources/aip-45/draft/{AGENT-CLI.schema.json → HARNESS.schema.json} +156 -9
- package/dist/specs/resources/aip-45/draft/STREAM-EVENTS.schema.json +151 -0
- package/dist/specs/resources/aip-46/draft/SessionConfig.schema.json +293 -0
- package/dist/specs/resources/aip-47/draft/ROLE.schema.json +93 -1
- package/dist/specs/resources/aip-48/draft/MultiAgentRuntime.schema.json +3 -3
- package/dist/specs/resources/aip-53/draft/APP.schema.json +36 -19
- package/dist/specs/resources/aip-54/draft/WS-REF.schema.json +2 -1
- package/dist/specs/resources/aip-6/draft/COMPANY.schema.json +69 -107
- package/dist/specs/resources/aip-62/draft/ATTESTATION.schema.json +11 -4
- package/dist/specs/resources/aip-63/draft/RECORDING.schema.json +2 -2
- package/dist/specs/resources/aip-69/draft/AuthProfile.schema.json +127 -0
- package/dist/specs/resources/aip-7/draft/GOVERNANCE.schema.json +436 -105
- package/dist/specs/resources/{pending/memory → aip-72}/draft/MEMORY.schema.json +115 -62
- package/dist/specs/resources/aip-9/draft/OPERATOR.schema.json +230 -139
- package/package.json +3 -3
- package/dist/specs/resources/pending/harness/HARNESS.schema.json +0 -254
- package/dist/specs/resources/pending/services/SERVICES.schema.json +0 -55
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://agentproto.sh/docs/aip-45/
|
|
4
|
-
"title": "
|
|
5
|
-
"description": "JSON Schema for the YAML frontmatter of an AIP-45
|
|
3
|
+
"$id": "https://agentproto.sh/docs/aip-45/HARNESS.schema.json",
|
|
4
|
+
"title": "HARNESS.md frontmatter — harness/v1",
|
|
5
|
+
"description": "JSON Schema for the YAML frontmatter of an AIP-45 HARNESS.md manifest. Sibling of AIP-29 (CLI.md, tool CLIs); covers interactive harnesses (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
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": ["name", "id", "description", "version", "bin", "install", "version_check", "sandbox", "protocol"],
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"items": { "$ref": "https://agentproto.sh/docs/aip-29/CLI.schema.json#/$defs/setupStep" }
|
|
57
57
|
},
|
|
58
58
|
"auth": {
|
|
59
|
-
"$ref": "
|
|
59
|
+
"$ref": "#/$defs/auth"
|
|
60
60
|
},
|
|
61
61
|
"sandbox": {
|
|
62
62
|
"description": "Inherits AIP-36 SANDBOX.md verbatim. Either an inline block or a workspace-relative ref to a SANDBOX.md.",
|
|
@@ -114,10 +114,16 @@
|
|
|
114
114
|
"items": { "$ref": "#/$defs/option" },
|
|
115
115
|
"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."
|
|
116
116
|
},
|
|
117
|
+
"gateways": {
|
|
118
|
+
"type": "array",
|
|
119
|
+
"items": { "$ref": "#/$defs/preset" },
|
|
120
|
+
"description": "AIP-45 gateway endpoints this harness can be pointed at (Anthropic/OpenAI-compatible backends). Merged into the gateway catalog (agentproto presets list / list_provider_presets) alongside the built-in registry, deduped by id (built-in wins on collision). Lets an external harness surface a gateway the built-in registry doesn't know about. Replaces the legacy `presets` field; a manifest MUST NOT carry both."
|
|
121
|
+
},
|
|
117
122
|
"presets": {
|
|
118
123
|
"type": "array",
|
|
119
124
|
"items": { "$ref": "#/$defs/preset" },
|
|
120
|
-
"
|
|
125
|
+
"deprecated": true,
|
|
126
|
+
"description": "DEPRECATED: legacy alias for `gateways`, with identical entry fields. Accepted so existing manifests keep loading. A manifest MUST NOT carry both `gateways` and `presets`."
|
|
121
127
|
},
|
|
122
128
|
"continuation": { "$ref": "#/$defs/continuation" },
|
|
123
129
|
"requires": { "$ref": "https://agentproto.sh/docs/aip-29/CLI.schema.json#/properties/requires" },
|
|
@@ -178,6 +184,9 @@
|
|
|
178
184
|
"required": ["capabilities"]
|
|
179
185
|
}
|
|
180
186
|
},
|
|
187
|
+
{
|
|
188
|
+
"not": { "required": ["gateways", "presets"] }
|
|
189
|
+
},
|
|
181
190
|
{
|
|
182
191
|
"if": {
|
|
183
192
|
"type": "object",
|
|
@@ -206,6 +215,66 @@
|
|
|
206
215
|
}
|
|
207
216
|
],
|
|
208
217
|
"$defs": {
|
|
218
|
+
"auth": {
|
|
219
|
+
"type": "object",
|
|
220
|
+
"additionalProperties": false,
|
|
221
|
+
"description": "Auth surface. The `ref`, `state`, `login`, `refresh`, and `expiry` fields follow AIP-29's auth schema verbatim; `methods` is the AIP-45 addition that lists the credential methods the harness can present per billing route.",
|
|
222
|
+
"properties": {
|
|
223
|
+
"ref": { "type": "string", "description": "Workspace-relative path to SECRETS.md (AIP-19)." },
|
|
224
|
+
"state": {
|
|
225
|
+
"type": "object",
|
|
226
|
+
"additionalProperties": false,
|
|
227
|
+
"properties": {
|
|
228
|
+
"paths": { "type": "array", "items": { "type": "string" } },
|
|
229
|
+
"env": { "type": "array", "items": { "type": "string" } }
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"login": {
|
|
233
|
+
"type": "object",
|
|
234
|
+
"additionalProperties": false,
|
|
235
|
+
"required": ["cmd"],
|
|
236
|
+
"properties": {
|
|
237
|
+
"cmd": { "type": "string" },
|
|
238
|
+
"interactive": { "type": "boolean" },
|
|
239
|
+
"requires_callback_url": { "type": "boolean" },
|
|
240
|
+
"completes_when": {
|
|
241
|
+
"type": "object",
|
|
242
|
+
"additionalProperties": false,
|
|
243
|
+
"required": ["cmd"],
|
|
244
|
+
"properties": {
|
|
245
|
+
"cmd": { "type": "string" },
|
|
246
|
+
"exit_code": { "type": "integer" }
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"refresh": {
|
|
252
|
+
"type": "object",
|
|
253
|
+
"additionalProperties": false,
|
|
254
|
+
"required": ["cmd"],
|
|
255
|
+
"properties": {
|
|
256
|
+
"cmd": { "type": "string" },
|
|
257
|
+
"every": { "type": "string", "pattern": "^P(?:T)?\\S+$", "description": "ISO-8601 duration." }
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"expiry": {
|
|
261
|
+
"type": "object",
|
|
262
|
+
"additionalProperties": false,
|
|
263
|
+
"properties": {
|
|
264
|
+
"detect": { "type": "string", "pattern": "^exit_code:\\d+$" }
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"methods": {
|
|
268
|
+
"type": "object",
|
|
269
|
+
"description": "Optional map from billing route to the credential methods the harness can present on that route. A route key is one of gateways[].id, or the reserved key `default` for the route the harness uses when no gateway is selected. A host selects an auth profile only if the profile's method appears in this list for the session's route. Absent: the host falls back to its own per-harness table and MUST be able to show it.",
|
|
270
|
+
"additionalProperties": {
|
|
271
|
+
"type": "array",
|
|
272
|
+
"minItems": 1,
|
|
273
|
+
"items": { "type": "string", "minLength": 1 }
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
},
|
|
209
278
|
"session": {
|
|
210
279
|
"type": "object",
|
|
211
280
|
"additionalProperties": false,
|
|
@@ -274,7 +343,85 @@
|
|
|
274
343
|
"file_io": { "type": "boolean" },
|
|
275
344
|
"multimodal": { "type": "boolean" },
|
|
276
345
|
"resumable": { "type": "boolean" },
|
|
277
|
-
"bidirectional": { "type": "boolean" }
|
|
346
|
+
"bidirectional": { "type": "boolean" },
|
|
347
|
+
"hooks": {
|
|
348
|
+
"type": "array",
|
|
349
|
+
"items": { "$ref": "#/$defs/nativeHookCapability" },
|
|
350
|
+
"description": "AIP-71 native hook declaration (section 3): an open list of the native hook seams this harness can project. Metadata only: it does not enable a hook, install user code, or grant a permission. Two entries MUST NOT share the same (event, native_event) pair (AIP-71 section 3 rule 4; not expressible in JSON Schema). A harness-extension capability, excluded from the ACP subset check."
|
|
351
|
+
},
|
|
352
|
+
"mode_events": {
|
|
353
|
+
"type": "boolean",
|
|
354
|
+
"description": "The harness exposes session modes and emits the mode-changed stream event for every change of the current mode the caller did not make itself (SHOULD for the caller's own setSessionMode too). Absent reads as false. A harness-extension capability, excluded from the ACP subset check."
|
|
355
|
+
},
|
|
356
|
+
"typed_prompts": {
|
|
357
|
+
"type": "boolean",
|
|
358
|
+
"description": "The harness sets `request` on agent-prompt events and carries the `question` or `planApproval` payload for those kinds (see STREAM-EVENTS.schema.json). Absent reads as false: every agent-prompt is a tool-permission. A harness-extension capability, excluded from the ACP subset check."
|
|
359
|
+
},
|
|
360
|
+
"memory": {
|
|
361
|
+
"type": "object",
|
|
362
|
+
"additionalProperties": false,
|
|
363
|
+
"description": "AIP-72 memory projection declaration (section 9). Metadata only: the host resolves the effective projection, native first with the system prompt as the fallback. Absent reads as { inject: none, capture: none }. A harness-extension capability, excluded from the ACP subset check.",
|
|
364
|
+
"properties": {
|
|
365
|
+
"inject": {
|
|
366
|
+
"enum": ["native-dir", "system-prompt", "none"],
|
|
367
|
+
"description": "How a digest of in-force memory items reaches a session at spawn: written into the harness's native memory location, appended to the system prompt, or not at all."
|
|
368
|
+
},
|
|
369
|
+
"capture": {
|
|
370
|
+
"enum": ["native-dir-diff", "none"],
|
|
371
|
+
"description": "Whether the native memory location can be diffed after the session so its changes become memory store proposals."
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"nativeHookCapability": {
|
|
378
|
+
"type": "object",
|
|
379
|
+
"additionalProperties": false,
|
|
380
|
+
"required": ["event", "native_event", "path", "can_block", "handlers"],
|
|
381
|
+
"description": "One native hook seam (AIP-71 NativeHookCapability, section 3 rules 1 to 4). A lifecycle seam cannot block (rule 3); the uniqueness of (event, native_event) pairs across the hooks array (rule 4) cannot be expressed in JSON Schema and is enforced by the reader.",
|
|
382
|
+
"properties": {
|
|
383
|
+
"event": {
|
|
384
|
+
"type": "string",
|
|
385
|
+
"minLength": 1,
|
|
386
|
+
"pattern": "^\\S+$",
|
|
387
|
+
"description": "The portable AIP-37 semantic event (e.g. tool-call). A namespaced <host>:<event> name is non-portable and MUST be registered by that host. MUST NOT contain whitespace."
|
|
388
|
+
},
|
|
389
|
+
"native_event": {
|
|
390
|
+
"type": "string",
|
|
391
|
+
"minLength": 1,
|
|
392
|
+
"pattern": "^\\S+$",
|
|
393
|
+
"description": "The harness callback identifier (e.g. PreToolUse). Descriptive and harness-owned; portable configuration MUST NOT reference it. MUST NOT contain whitespace."
|
|
394
|
+
},
|
|
395
|
+
"path": {
|
|
396
|
+
"enum": ["admission", "lifecycle"],
|
|
397
|
+
"description": "admission = the native seam runs before an operation; lifecycle = it observes a lifecycle transition."
|
|
398
|
+
},
|
|
399
|
+
"can_block": {
|
|
400
|
+
"type": "boolean",
|
|
401
|
+
"description": "True only when a successful native callback can prevent the corresponding operation. A timeout or malformed callback response MUST NOT be advertised as a successful denial. MUST be false when path is lifecycle."
|
|
402
|
+
},
|
|
403
|
+
"handlers": {
|
|
404
|
+
"type": "array",
|
|
405
|
+
"items": { "enum": ["command", "mcp", "http", "prompt", "agent"] },
|
|
406
|
+
"minItems": 1,
|
|
407
|
+
"uniqueItems": true,
|
|
408
|
+
"description": "Mechanisms the harness can execute at that seam. MUST list at least one mechanism, without duplicates."
|
|
409
|
+
},
|
|
410
|
+
"async": {
|
|
411
|
+
"type": "boolean",
|
|
412
|
+
"description": "The harness can run the handler in the background."
|
|
413
|
+
},
|
|
414
|
+
"context": {
|
|
415
|
+
"enum": ["none", "append"],
|
|
416
|
+
"description": "append = a successful handler may add bounded context to the next model turn. It does not permit replacing the user's prompt."
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"if": {
|
|
420
|
+
"properties": { "path": { "const": "lifecycle" } },
|
|
421
|
+
"required": ["path"]
|
|
422
|
+
},
|
|
423
|
+
"then": {
|
|
424
|
+
"properties": { "can_block": { "const": false } }
|
|
278
425
|
}
|
|
279
426
|
},
|
|
280
427
|
"mode": {
|
|
@@ -392,16 +539,16 @@
|
|
|
392
539
|
"type": "object",
|
|
393
540
|
"additionalProperties": false,
|
|
394
541
|
"required": ["id", "label", "schemaFlavor", "baseUrl", "keyEnv"],
|
|
395
|
-
"description": "A gateway
|
|
542
|
+
"description": "A gateway this harness can be pointed at: a backend an Anthropic/OpenAI-compatible client can front. Declared in the manifest so the catalog surfaces harness-contributed gateways alongside the built-in registry. No harness projection (env/env_unset/bin_args) here; that stays in modes/options.",
|
|
396
543
|
"properties": {
|
|
397
544
|
"id": {
|
|
398
545
|
"type": "string",
|
|
399
546
|
"minLength": 1,
|
|
400
|
-
"description": "Stable
|
|
547
|
+
"description": "Stable gateway id. SHOULD equal the mode id if the harness projects this gateway as a mode. Catalog dedupes built-in vs harness-declared by id; a harness-declared id colliding with a built-in is ignored in favor of the built-in (registry is source of truth for canonical providers)."
|
|
401
548
|
},
|
|
402
549
|
"label": { "type": "string", "minLength": 1, "description": "Human label for the catalog UI." },
|
|
403
550
|
"description": { "type": "string" },
|
|
404
|
-
"schemaFlavor": { "enum": ["anthropic", "openai"], "description": "API schema flavor
|
|
551
|
+
"schemaFlavor": { "enum": ["anthropic", "openai"], "description": "API schema flavor: selects which harness family can consume the gateway." },
|
|
405
552
|
"baseUrl": { "type": "string", "minLength": 1, "description": "Base URL the client hits." },
|
|
406
553
|
"keyEnv": {
|
|
407
554
|
"type": "string",
|
|
@@ -0,0 +1,151 @@
|
|
|
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
|
+
},
|
|
67
|
+
"allOf": [
|
|
68
|
+
{
|
|
69
|
+
"if": { "properties": { "allowFreeText": { "const": true } }, "required": ["allowFreeText"] },
|
|
70
|
+
"then": { "required": ["freeTextOptionId"] }
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"if": { "properties": { "allowFreeText": { "const": false } }, "required": ["allowFreeText"] },
|
|
74
|
+
"then": { "properties": { "choices": { "minItems": 1 } } }
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"planApprovalRequest": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"additionalProperties": false,
|
|
81
|
+
"required": ["approveOptionId", "rejectOptionId"],
|
|
82
|
+
"anyOf": [{ "required": ["plan"] }, { "required": ["planRef"] }],
|
|
83
|
+
"properties": {
|
|
84
|
+
"plan": { "type": "string", "description": "The plan text." },
|
|
85
|
+
"planRef": { "type": "string", "minLength": 1, "description": "A reference to the plan (a path inside the session's sandbox, or a URI)." },
|
|
86
|
+
"targetModeId": { "type": "string", "minLength": 1, "description": "The session mode the harness enters if the plan is approved." },
|
|
87
|
+
"approveOptionId": { "type": "string", "minLength": 1, "description": "MUST appear in the event's options with kind allow_once." },
|
|
88
|
+
"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." }
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"agentPrompt": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"additionalProperties": false,
|
|
94
|
+
"required": ["kind", "sessionId", "toolCallId", "options"],
|
|
95
|
+
"description": "The agent asks the caller to choose among options. Answered with respondPermission(toolCallId, { optionId, feedback? } | { cancelled: true }).",
|
|
96
|
+
"properties": {
|
|
97
|
+
"kind": { "const": "agent-prompt" },
|
|
98
|
+
"sessionId": { "type": "string", "minLength": 1 },
|
|
99
|
+
"toolCallId": { "type": "string", "minLength": 1, "description": "Request id the caller passes back to respondPermission." },
|
|
100
|
+
"options": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/permissionOption" } },
|
|
101
|
+
"text": { "type": "string", "description": "Human-readable question line." },
|
|
102
|
+
"toolName": { "type": "string" },
|
|
103
|
+
"rawInput": { "description": "The tool call's raw input, unmodified." },
|
|
104
|
+
"request": {
|
|
105
|
+
"enum": ["tool-permission", "question", "plan-approval"],
|
|
106
|
+
"default": "tool-permission",
|
|
107
|
+
"description": "What the agent asks for. Absent reads as tool-permission."
|
|
108
|
+
},
|
|
109
|
+
"question": { "$ref": "#/$defs/questionRequest" },
|
|
110
|
+
"planApproval": { "$ref": "#/$defs/planApprovalRequest" },
|
|
111
|
+
"_meta": { "$ref": "#/$defs/meta" }
|
|
112
|
+
},
|
|
113
|
+
"allOf": [
|
|
114
|
+
{
|
|
115
|
+
"if": { "properties": { "request": { "const": "question" } }, "required": ["request"] },
|
|
116
|
+
"then": { "required": ["question"], "not": { "required": ["planApproval"] } }
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"if": { "properties": { "request": { "const": "plan-approval" } }, "required": ["request"] },
|
|
120
|
+
"then": { "required": ["planApproval"], "not": { "required": ["question"] } }
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"if": {
|
|
124
|
+
"anyOf": [
|
|
125
|
+
{ "not": { "required": ["request"] } },
|
|
126
|
+
{ "properties": { "request": { "const": "tool-permission" } }, "required": ["request"] }
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"then": { "not": { "anyOf": [{ "required": ["question"] }, { "required": ["planApproval"] }] } }
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"if": {
|
|
133
|
+
"properties": { "request": { "enum": ["question", "plan-approval"] } },
|
|
134
|
+
"required": ["request"]
|
|
135
|
+
},
|
|
136
|
+
"then": {
|
|
137
|
+
"properties": {
|
|
138
|
+
"options": {
|
|
139
|
+
"contains": {
|
|
140
|
+
"type": "object",
|
|
141
|
+
"properties": { "kind": { "enum": ["reject_once", "reject_always"] } },
|
|
142
|
+
"required": ["kind"]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://agentproto.sh/schemas/aip-46/SessionConfig.schema.json",
|
|
4
|
+
"title": "AIP-46 SessionConfig, ConfigOverlay and SessionPreset",
|
|
5
|
+
"description": "Normalized per-session configuration (2026-10-23 session-config amendment). Hosts MAY accept additional host-specific keys only under an x- prefix.",
|
|
6
|
+
"$defs": {
|
|
7
|
+
"ConfigOverlay": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"patternProperties": {
|
|
11
|
+
"^x-": {}
|
|
12
|
+
},
|
|
13
|
+
"properties": {
|
|
14
|
+
"harness": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 1,
|
|
17
|
+
"description": "AIP-45 harness slug."
|
|
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
|
+
"model": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1,
|
|
28
|
+
"description": "Model id, or selector:<id> naming a saved AIP-43 selector."
|
|
29
|
+
},
|
|
30
|
+
"effort": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1
|
|
33
|
+
},
|
|
34
|
+
"posture": {
|
|
35
|
+
"oneOf": [
|
|
36
|
+
{
|
|
37
|
+
"enum": [
|
|
38
|
+
"default",
|
|
39
|
+
"plan",
|
|
40
|
+
"accept-edits",
|
|
41
|
+
"bypass",
|
|
42
|
+
"read-only"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "object",
|
|
47
|
+
"required": [
|
|
48
|
+
"harnessModeId"
|
|
49
|
+
],
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"properties": {
|
|
52
|
+
"harnessModeId": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"minLength": 1
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"contextProfile": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"minLength": 1
|
|
63
|
+
},
|
|
64
|
+
"route": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"required": [
|
|
67
|
+
"gateway"
|
|
68
|
+
],
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"properties": {
|
|
71
|
+
"gateway": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"minLength": 1
|
|
74
|
+
},
|
|
75
|
+
"baseUrl": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"format": "uri"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"access": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"required": [
|
|
84
|
+
"profileRef"
|
|
85
|
+
],
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"properties": {
|
|
88
|
+
"profileRef": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"minLength": 1,
|
|
91
|
+
"description": "AIP-69 auth profile id."
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"options": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"description": "Harness-native AIP-45 options, validated against the harness manifest."
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"not": {
|
|
101
|
+
"required": [
|
|
102
|
+
"harness",
|
|
103
|
+
"adapter"
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"FailureClass": {
|
|
108
|
+
"enum": [
|
|
109
|
+
"rate-limit",
|
|
110
|
+
"quota-exhausted",
|
|
111
|
+
"upstream-5xx",
|
|
112
|
+
"model-unavailable",
|
|
113
|
+
"auth-failed",
|
|
114
|
+
"no-output-stall",
|
|
115
|
+
"harness-crashed"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
"SessionConfig": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"additionalProperties": false,
|
|
121
|
+
"patternProperties": {
|
|
122
|
+
"^x-": {}
|
|
123
|
+
},
|
|
124
|
+
"properties": {
|
|
125
|
+
"harness": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"minLength": 1,
|
|
128
|
+
"description": "AIP-45 harness slug."
|
|
129
|
+
},
|
|
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
|
+
"model": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"minLength": 1,
|
|
139
|
+
"description": "Model id, or selector:<id> naming a saved AIP-43 selector."
|
|
140
|
+
},
|
|
141
|
+
"effort": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"minLength": 1
|
|
144
|
+
},
|
|
145
|
+
"posture": {
|
|
146
|
+
"oneOf": [
|
|
147
|
+
{
|
|
148
|
+
"enum": [
|
|
149
|
+
"default",
|
|
150
|
+
"plan",
|
|
151
|
+
"accept-edits",
|
|
152
|
+
"bypass",
|
|
153
|
+
"read-only"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"type": "object",
|
|
158
|
+
"required": [
|
|
159
|
+
"harnessModeId"
|
|
160
|
+
],
|
|
161
|
+
"additionalProperties": false,
|
|
162
|
+
"properties": {
|
|
163
|
+
"harnessModeId": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"minLength": 1
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
"contextProfile": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"minLength": 1
|
|
174
|
+
},
|
|
175
|
+
"route": {
|
|
176
|
+
"type": "object",
|
|
177
|
+
"required": [
|
|
178
|
+
"gateway"
|
|
179
|
+
],
|
|
180
|
+
"additionalProperties": false,
|
|
181
|
+
"properties": {
|
|
182
|
+
"gateway": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"minLength": 1
|
|
185
|
+
},
|
|
186
|
+
"baseUrl": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"format": "uri"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"access": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"required": [
|
|
195
|
+
"profileRef"
|
|
196
|
+
],
|
|
197
|
+
"additionalProperties": false,
|
|
198
|
+
"properties": {
|
|
199
|
+
"profileRef": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"minLength": 1,
|
|
202
|
+
"description": "AIP-69 auth profile id."
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"options": {
|
|
207
|
+
"type": "object",
|
|
208
|
+
"description": "Harness-native AIP-45 options, validated against the harness manifest."
|
|
209
|
+
},
|
|
210
|
+
"retry": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"required": [
|
|
213
|
+
"on"
|
|
214
|
+
],
|
|
215
|
+
"additionalProperties": false,
|
|
216
|
+
"properties": {
|
|
217
|
+
"on": {
|
|
218
|
+
"type": "array",
|
|
219
|
+
"items": {
|
|
220
|
+
"$ref": "#/$defs/FailureClass"
|
|
221
|
+
},
|
|
222
|
+
"uniqueItems": true
|
|
223
|
+
},
|
|
224
|
+
"maxRetries": {
|
|
225
|
+
"type": "integer",
|
|
226
|
+
"minimum": 0
|
|
227
|
+
},
|
|
228
|
+
"retryAfterToolCalls": {
|
|
229
|
+
"type": "boolean",
|
|
230
|
+
"default": false
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"fallback": {
|
|
235
|
+
"type": "array",
|
|
236
|
+
"items": {
|
|
237
|
+
"$ref": "#/$defs/ConfigOverlay"
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"not": {
|
|
242
|
+
"required": [
|
|
243
|
+
"harness",
|
|
244
|
+
"adapter"
|
|
245
|
+
]
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"SessionPreset": {
|
|
249
|
+
"type": "object",
|
|
250
|
+
"required": [
|
|
251
|
+
"id",
|
|
252
|
+
"config"
|
|
253
|
+
],
|
|
254
|
+
"additionalProperties": false,
|
|
255
|
+
"properties": {
|
|
256
|
+
"id": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,62}$"
|
|
259
|
+
},
|
|
260
|
+
"label": {
|
|
261
|
+
"type": "string"
|
|
262
|
+
},
|
|
263
|
+
"tags": {
|
|
264
|
+
"type": "array",
|
|
265
|
+
"items": {
|
|
266
|
+
"type": "string"
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"extends": {
|
|
270
|
+
"type": "array",
|
|
271
|
+
"items": {
|
|
272
|
+
"type": "string"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"defaultFor": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"minLength": 1
|
|
278
|
+
},
|
|
279
|
+
"agent": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"minLength": 1
|
|
282
|
+
},
|
|
283
|
+
"config": {
|
|
284
|
+
"$ref": "#/$defs/SessionConfig"
|
|
285
|
+
},
|
|
286
|
+
"policy": {
|
|
287
|
+
"description": "AIP-38 PolicyRef (inline, ref or file)."
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"$ref": "#/$defs/SessionConfig"
|
|
293
|
+
}
|