@agentproto/corpus-cli 0.11.3 → 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-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-34/draft/TYPES.schema.json +1 -1
- package/dist/specs/resources/aip-34/draft/WORKSPACE.schema.json +5 -2
- package/dist/specs/resources/aip-38/draft/POLICY.schema.json +22 -2
- package/dist/specs/resources/aip-42/draft/AGENT.schema.json +42 -4
- package/dist/specs/resources/aip-45/draft/HARNESS.schema.json +79 -1
- package/dist/specs/resources/aip-45/draft/STREAM-EVENTS.schema.json +151 -0
- package/dist/specs/resources/aip-47/draft/ROLE.schema.json +93 -1
- package/dist/specs/resources/aip-53/draft/APP.schema.json +30 -42
- package/dist/specs/resources/aip-54/draft/WS-REF.schema.json +2 -1
- package/dist/specs/resources/aip-6/draft/COMPANY.schema.json +67 -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 +229 -138
- 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
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
},
|
|
34
34
|
"inputs": {
|
|
35
35
|
"description": "Defined by AIP-16 — the IO `inputs` block.",
|
|
36
|
-
"$ref": "https://agentproto.sh/
|
|
36
|
+
"$ref": "https://agentproto.sh/schemas/aip-16/IO.schema.json#/$defs/inputs"
|
|
37
37
|
},
|
|
38
38
|
"outputs": {
|
|
39
39
|
"description": "Defined by AIP-16 — the IO `outputs` block.",
|
|
40
|
-
"$ref": "https://agentproto.sh/
|
|
40
|
+
"$ref": "https://agentproto.sh/schemas/aip-16/IO.schema.json#/$defs/outputs"
|
|
41
41
|
},
|
|
42
42
|
"idempotent": {
|
|
43
43
|
"type": "boolean",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"type": "string",
|
|
40
40
|
"minLength": 1,
|
|
41
41
|
"maxLength": 512,
|
|
42
|
-
"pattern": "^(\\.\\./|\\./)[^\\s]+/
|
|
43
|
-
"description": "OPTIONAL
|
|
42
|
+
"pattern": "^(\\.\\./|\\./)([^\\s]+/)?OFFICE\\.md$",
|
|
43
|
+
"description": "OPTIONAL: relative path to a parent OFFICE.md, for example ../OFFICE.md from a child node of a company tree. Presence makes the manifest a VIEW; absence makes it a WORKSPACE ROOT. Recursive composition; maximum chain depth is 8."
|
|
44
44
|
},
|
|
45
45
|
"appliesTo": {
|
|
46
46
|
"type": "array",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
},
|
|
100
100
|
"executor": {
|
|
101
101
|
"type": "string",
|
|
102
|
-
"pattern": "^ws://operators/[a-z][a-z0-9-]
|
|
103
|
-
"description": "OPTIONAL
|
|
102
|
+
"pattern": "^(ws://operators/[a-z][a-z0-9-]*|operator:[a-z][a-z0-9-]*(@[^\\s]+)?)$",
|
|
103
|
+
"description": "OPTIONAL: AIP-9 default org-level operator of the whole tree this office spans, as a ws:// ref or an AIP-54 `operator:<slug>[@<workspace>]` compact ref. The `@<workspace>` form names an operator of another workspace; ws:// cannot. The host activates this operator for company-level prompts when no more-specific seat or view applies."
|
|
104
104
|
},
|
|
105
105
|
"governance": {
|
|
106
106
|
"type": "string",
|
|
@@ -110,8 +110,8 @@
|
|
|
110
110
|
},
|
|
111
111
|
"work": {
|
|
112
112
|
"type": "string",
|
|
113
|
-
"pattern": "^ws://workspaces
|
|
114
|
-
"description": "OPTIONAL — AIP-20 work tracker the company runs. Cross-references on items resolve against the bound work workspace by default."
|
|
113
|
+
"pattern": "^ws://workspaces/@[a-z0-9][a-z0-9-]*/[a-z0-9][a-z0-9-]*/WORK\\.md$",
|
|
114
|
+
"description": "OPTIONAL — AIP-20 work tracker the company runs, as the AIP-54 ref of its WORK.md: `ws://workspaces/@<owner>/<slug>/WORK.md`. Cross-references on items resolve against the bound work workspace by default."
|
|
115
115
|
},
|
|
116
116
|
"agency": {
|
|
117
117
|
"type": "string",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"type": "string",
|
|
154
154
|
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
155
155
|
"default": "parent",
|
|
156
|
-
"description": "Item field name carrying the org-parent ref. Defaults to AIP-18's universal-ish 'parent'."
|
|
156
|
+
"description": "Item field name carrying the org-parent ref: an item id, or for a seat attached to a node an AIP-54 `workspace:` ref to that node's view. Defaults to AIP-18's universal-ish 'parent'."
|
|
157
157
|
},
|
|
158
158
|
"rules": {
|
|
159
159
|
"type": "object",
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
},
|
|
179
179
|
"uniqueItems": true
|
|
180
180
|
},
|
|
181
|
-
"description": "OPTIONAL
|
|
181
|
+
"description": "OPTIONAL: containment matrix. Keys are CHILD collection names; values are arrays of allowed PARENT collection names. The reserved parent name `view` stands for a node of the same tree that carries a view of this office; it is not a collection. The host enforces this at item-write time. Per-item violations: office_orgtree_invalid_parent_kind (HARD)."
|
|
182
182
|
},
|
|
183
183
|
"maxDepth": {
|
|
184
184
|
"type": "integer",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
},
|
|
66
66
|
"work": {
|
|
67
67
|
"type": "string",
|
|
68
|
-
"pattern": "^ws://workspaces
|
|
69
|
-
"description": "OPTIONAL — AIP-20 work tracker the identity participates in (an operator's task queue, a company's program plan)."
|
|
68
|
+
"pattern": "^ws://workspaces/@[a-z0-9][a-z0-9-]*/[a-z0-9][a-z0-9-]*/WORK\\.md$",
|
|
69
|
+
"description": "OPTIONAL — AIP-20 work tracker the identity participates in (an operator's task queue, a company's program plan). The ref names the node's WORK.md through the workspace node's work binding (same form as the AIP-22 OFFICE.schema.json work field)."
|
|
70
70
|
},
|
|
71
71
|
"knowledge": {
|
|
72
72
|
"type": "string",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"extends": {
|
|
29
29
|
"type": "string",
|
|
30
|
-
"description": "Another type this one inherits
|
|
30
|
+
"description": "Another type of the same registry this one inherits from (e.g. a `guild` or `client` type extending `project`). Fields left unset here (`parents`, `default_wall`, `requires_files`, `starter`, `max_per_tree`, `adds_fields`) are inherited whole from the resolved base; a field set here replaces the inherited one, nothing is merged. An omitted or empty `requires_files` counts as unset."
|
|
31
31
|
},
|
|
32
32
|
"default_wall": {
|
|
33
33
|
"enum": ["shared", "isolated", "sealed", "hard"],
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"wall": {
|
|
58
58
|
"enum": ["shared", "isolated", "sealed", "hard"],
|
|
59
59
|
"default": "isolated",
|
|
60
|
-
"description": "Visibility level toward sibling/ancestor nodes. shared: siblings read the whole node (implicit export `to: \"children\"` of the PARENT). isolated (default): nothing crosses without an explicit includes/exports door; ancestors still see everything. sealed: as isolated, PLUS ancestors see only this node's EXPORT.md, never raw files; inbound includes require host-side approval (AIP-7). hard: as sealed, PLUS enforced by a separate process/identity — no shared daemon, no shared auth profile, no shared MCP surface; the only traffic in or out is the declared exports, delivered by message, never by mount. A child MAY raise its own wall (shared→isolated→sealed→hard) but MUST NOT set a level looser than its
|
|
60
|
+
"description": "Visibility level toward sibling/ancestor nodes. shared: siblings read the whole node (implicit export `to: \"children\"` of the PARENT). isolated (default): nothing crosses without an explicit includes/exports door; ancestors still see everything. sealed: as isolated, PLUS ancestors see only this node's EXPORT.md, never raw files; inbound includes require host-side approval (AIP-7). hard: as sealed, PLUS enforced by a separate process/identity — no shared daemon, no shared auth profile, no shared MCP surface; the only traffic in or out is the declared exports, delivered by message, never by mount. Walls are evaluated against the requesting SESSION's node scope (the nearest declared node whose folder contains the session's AIP-46 `ground`), never against an operator or agent. A child MAY raise its own wall (shared→isolated→sealed→hard) but MUST NOT set a level looser than its TYPES.md entry's `default_wall` (conformance rule 7)."
|
|
61
61
|
},
|
|
62
62
|
"includes": {
|
|
63
63
|
"type": "array",
|
|
@@ -100,7 +100,10 @@
|
|
|
100
100
|
"default": [],
|
|
101
101
|
"description": "Provider-side consent for an `apps[].attach` pointed at THIS node by another node — same two-sided-consent shape as `exports`/`uses_secrets`. An attach with no matching entry here is a conformance error, never silently honoured."
|
|
102
102
|
},
|
|
103
|
-
"policy": {
|
|
103
|
+
"policy": {
|
|
104
|
+
"$ref": "#/$defs/policyRefBlock",
|
|
105
|
+
"description": "AIP-38 POLICY block for this node. A session scoped to a node is evaluated under the AIP-38 composition of the policy of every node on its chain, from this node up to the root of its tree: a matching deny in any node wins, `default: deny` in any node prevails, every requirement applies. The chain stops at the tree root; doors never extend it."
|
|
106
|
+
},
|
|
104
107
|
"defaults": {
|
|
105
108
|
"type": "object",
|
|
106
109
|
"additionalProperties": true,
|
|
@@ -116,9 +116,29 @@
|
|
|
116
116
|
},
|
|
117
117
|
"scope": {
|
|
118
118
|
"type": "string",
|
|
119
|
-
"description": "Optional scope narrowing for this grant (action-specific)."
|
|
119
|
+
"description": "Optional scope narrowing for this grant (action-specific). For `tool:invoke` (AIP-39), a tool name `<server>/<name>` (AIP-54 tool-body), or a `*`-suffix glob such as `<server>/*`; matching is AIP-38 Scope matching rules 1, 2 and 5."
|
|
120
120
|
}
|
|
121
|
-
}
|
|
121
|
+
},
|
|
122
|
+
"allOf": [
|
|
123
|
+
{
|
|
124
|
+
"if": {
|
|
125
|
+
"required": ["action"],
|
|
126
|
+
"properties": {
|
|
127
|
+
"action": {
|
|
128
|
+
"enum": ["tool:invoke", "@agentik/actions/standard/tool-invoke"]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"then": {
|
|
133
|
+
"properties": {
|
|
134
|
+
"scope": {
|
|
135
|
+
"pattern": "^(\\*|[A-Za-z0-9_.-]+\\*|[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]*\\*?)$",
|
|
136
|
+
"description": "Lint for `tool:invoke`: `*`, a `<prefix>*` glob, a full tool name `<server>/<name>`, or a `<server>/<prefix>*` glob. A bare name such as `cron_create` has no server and matches nothing (AIP-38 Tool names)."
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
122
142
|
},
|
|
123
143
|
"condition": {
|
|
124
144
|
"type": "object",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"type": "array",
|
|
54
54
|
"items": { "$ref": "#/$defs/toolRef" },
|
|
55
55
|
"default": [],
|
|
56
|
-
"description": "AIP-14 tool refs."
|
|
56
|
+
"description": "AIP-14 tool refs, or structured server refs { kind: mcp, server, allow?, deny? }. A tool is named <server>/<name> (AIP-54 tool-body); deny wins."
|
|
57
57
|
},
|
|
58
58
|
"actions": {
|
|
59
59
|
"type": "object",
|
|
@@ -161,7 +161,8 @@
|
|
|
161
161
|
},
|
|
162
162
|
"metadata": {
|
|
163
163
|
"type": "object",
|
|
164
|
-
"additionalProperties": true
|
|
164
|
+
"additionalProperties": true,
|
|
165
|
+
"description": "Free-form, namespaced under '<vendor>'. Hosts MUST tolerate unknown vendor namespaces; they MUST NOT honour metadata that overrides AIP-defined fields. Session configuration (harness, posture, preset, auth) is AIP-46, not an AGENT field."
|
|
165
166
|
}
|
|
166
167
|
},
|
|
167
168
|
"$defs": {
|
|
@@ -184,7 +185,34 @@
|
|
|
184
185
|
"$ref": "#/$defs/anyRef"
|
|
185
186
|
},
|
|
186
187
|
"toolRef": {
|
|
187
|
-
"
|
|
188
|
+
"oneOf": [
|
|
189
|
+
{ "$ref": "#/$defs/anyRef" },
|
|
190
|
+
{ "$ref": "#/$defs/mcpToolRef" }
|
|
191
|
+
],
|
|
192
|
+
"description": "An AIP-14/AIP-54 ref, or a structured server ref."
|
|
193
|
+
},
|
|
194
|
+
"mcpToolRef": {
|
|
195
|
+
"type": "object",
|
|
196
|
+
"required": ["kind", "server"],
|
|
197
|
+
"additionalProperties": false,
|
|
198
|
+
"properties": {
|
|
199
|
+
"kind": { "const": "mcp" },
|
|
200
|
+
"server": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"pattern": "^[A-Za-z0-9_.-]+$",
|
|
203
|
+
"description": "The server that exposes the tools, as the host names it. Mandatory; no '/'."
|
|
204
|
+
},
|
|
205
|
+
"allow": {
|
|
206
|
+
"type": "array",
|
|
207
|
+
"items": { "type": "string", "pattern": "^[A-Za-z0-9_.-]+$" },
|
|
208
|
+
"description": "Tool names on this server the agent is offered (the <name> part of <server>/<name>). Absent = every tool the server exposes; [] = none."
|
|
209
|
+
},
|
|
210
|
+
"deny": {
|
|
211
|
+
"type": "array",
|
|
212
|
+
"items": { "type": "string", "pattern": "^[A-Za-z0-9_.-]+$" },
|
|
213
|
+
"description": "Tool names on this server the agent is never offered. Deny wins over allow and over any other tools item; it is the AGENT-level projection of an AIP-38 explicit deny and never grants permission."
|
|
214
|
+
}
|
|
215
|
+
}
|
|
188
216
|
},
|
|
189
217
|
"actionRef": {
|
|
190
218
|
"oneOf": [
|
|
@@ -247,7 +275,17 @@
|
|
|
247
275
|
"enabled": {
|
|
248
276
|
"type": "boolean",
|
|
249
277
|
"default": true,
|
|
250
|
-
"description": "When false, the agent MUST NOT write
|
|
278
|
+
"description": "AIP-72 memory items for this agent. When false, the agent MUST NOT write any memory item (none is created, updated or retired), and the host projects none into its sessions."
|
|
279
|
+
},
|
|
280
|
+
"store": {
|
|
281
|
+
"type": "string",
|
|
282
|
+
"minLength": 1,
|
|
283
|
+
"description": "The AIP-72 memory store (section 8) the agent's items are read from and proposed to: a workspace-relative path to a reference-layout directory, or a host-resolved store id. Host default when omitted."
|
|
284
|
+
},
|
|
285
|
+
"anchors": {
|
|
286
|
+
"type": "array",
|
|
287
|
+
"items": { "type": "string", "minLength": 1 },
|
|
288
|
+
"description": "Scope anchors in formatted form (e.g. 'global', 'project:acme', 'agent:assistant') added to the ones the host resolves for a session; they select the items of the AIP-72 projection digest (section 9). 'global' always applies."
|
|
251
289
|
},
|
|
252
290
|
"scope": {
|
|
253
291
|
"enum": ["per-conversation", "per-thread", "per-workspace", "none"],
|
|
@@ -343,7 +343,85 @@
|
|
|
343
343
|
"file_io": { "type": "boolean" },
|
|
344
344
|
"multimodal": { "type": "boolean" },
|
|
345
345
|
"resumable": { "type": "boolean" },
|
|
346
|
-
"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 } }
|
|
347
425
|
}
|
|
348
426
|
},
|
|
349
427
|
"mode": {
|
|
@@ -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
|
+
}
|
|
@@ -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
|
|
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
|
}
|