@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
@@ -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/docs/aip-16/IO.schema.json#/$defs/inputs"
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/docs/aip-16/IO.schema.json#/$defs/outputs"
40
+ "$ref": "https://agentproto.sh/schemas/aip-16/IO.schema.json#/$defs/outputs"
41
41
  },
42
42
  "idempotent": {
43
43
  "type": "boolean",
@@ -426,7 +426,7 @@
426
426
  "kind": { "const": "agent" },
427
427
  "agent": {
428
428
  "type": "object",
429
- "description": "App-scoped agent id to resolve at compile time. Omit to spawn a plain `adapter` (no app-ref resolution) or reuse via `sessionRef`.",
429
+ "description": "App-scoped agent id to resolve at compile time. Omit to spawn a plain harness through the step's `adapter` key (no app-ref resolution) or reuse via `sessionRef`.",
430
430
  "required": ["ref"],
431
431
  "properties": {
432
432
  "ref": { "type": "string" }
@@ -435,7 +435,7 @@
435
435
  "prompt": { "type": "string" },
436
436
  "adapter": {
437
437
  "type": "string",
438
- "description": "Adapter slug for spawning a NEW session. Ignored (and unnecessary) when `agent.ref` resolves one for you. Omit both to reuse via `sessionRef`."
438
+ "description": "AIP-45 harness slug for spawning a NEW session. Ignored (and unnecessary) when `agent.ref` resolves one for you. Omit both to reuse via `sessionRef`. The key keeps the name `adapter` until the AIP-15 open question on the `harness` block is settled."
439
439
  },
440
440
  "sessionRef": {
441
441
  "type": "string",
@@ -492,7 +492,7 @@
492
492
  "options": {
493
493
  "type": "object",
494
494
  "additionalProperties": { "type": ["boolean", "number", "string"] },
495
- "description": "Manifest-declared adapter option id → value, forwarded to a NEW spawn's `startSession({ options })` — e.g. mastra-agent's `agent` option, set by `agent.ref` resolution at compile time. Only meaningful with `adapter`; ignored on a `sessionRef` reuse. May also be authored directly on the step."
495
+ "description": "Manifest-declared harness option id → value, forwarded to a NEW spawn's `startSession({ options })` — e.g. mastra-agent's `agent` option, set by `agent.ref` resolution at compile time. Only meaningful with `adapter`; ignored on a `sessionRef` reuse. May also be authored directly on the step."
496
496
  },
497
497
  "harness": { "$ref": "#/$defs/harness" }
498
498
  }
@@ -520,21 +520,21 @@
520
520
  },
521
521
  "harness": {
522
522
  "type": "object",
523
- "description": "Harness pinning for a `kind: \"agent\"` step's spawn. Precedence when a field is also set elsewhere: step `harness` (highest) > the resolved AGENT.md's own frontmatter > `app_run` caller args > the adapter's own default (lowest).",
523
+ "description": "Harness pinning for a `kind: \"agent\"` step's spawn. Precedence when a field is also set elsewhere: step `harness` (highest) > the resolved AGENT.md's own frontmatter > `app_run` caller args > the harness's own default (lowest).",
524
524
  "additionalProperties": false,
525
525
  "properties": {
526
526
  "model": { "type": "string", "description": "Model id override for this spawn." },
527
- "effort": { "type": "string", "description": "Reasoning-effort override for this spawn (adapter-defined vocabulary, e.g. \"low\" | \"medium\" | \"high\")." },
527
+ "effort": { "type": "string", "description": "Reasoning-effort override for this spawn (harness-defined vocabulary, e.g. \"low\" | \"medium\" | \"high\")." },
528
528
  "role": { "type": "string", "description": "Spawn-time role governing the child's tool-policy disposition (e.g. \"executor\" | \"supervisor\")." },
529
529
  "tools": {
530
530
  "type": "array",
531
531
  "items": { "type": "string" },
532
- "description": "Per-spawn tool allowlist. Applied where the resolved adapter supports a generic per-spawn allowlist mechanism; where it doesn't, the host records `toolsApplied: false` on the step's run record and emits a warning event instead of silently ignoring the field."
532
+ "description": "Per-spawn tool allowlist. Applied where the resolved harness supports a generic per-spawn allowlist mechanism; where it doesn't, the host records `toolsApplied: false` on the step's run record and emits a warning event instead of silently ignoring the field."
533
533
  },
534
534
  "skills": {
535
535
  "type": "array",
536
536
  "items": { "type": "string" },
537
- "description": "Skill ids auto-mounted into the spawn — adapters with no such option (e.g. claude-code, which auto-discovers skills) ignore it."
537
+ "description": "Skill ids auto-mounted into the spawn — harnesses with no such option (e.g. claude-code, which auto-discovers skills) ignore it."
538
538
  },
539
539
  "cwd": { "type": "string", "description": "Working directory override for this step's spawn; takes precedence over the run-level cwd." },
540
540
  "promptFile": { "type": "string", "description": "Read this file (relative to the WORKFLOW.md's directory) at load time and use its contents as the step's `prompt`, replacing any inline `prompt`." },
@@ -39,8 +39,8 @@
39
39
  "type": "string",
40
40
  "minLength": 1,
41
41
  "maxLength": 512,
42
- "pattern": "^(\\.\\./|\\./)[^\\s]+/COMPANY\\.md$",
43
- "description": "OPTIONAL — relative path to a parent OFFICE.md. Presence makes the manifest a VIEW; absence makes it a WORKSPACE ROOT. Recursive composition; maximum chain depth is 8."
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 — AIP-9 default org-level operator. The host activates this operator for company-level prompts when no more-specific operator applies."
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/[a-z][a-z0-9-]*$",
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 — containment matrix. Keys are CHILD collection names; values are arrays of allowed PARENT collection names. The host enforces this at item-write time. Per-item violations: office_orgtree_invalid_parent_kind (HARD)."
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/[a-z][a-z0-9-]*$",
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 unset fields from (e.g. a `client` type extending `project`)."
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 parent's or its TYPES.md entry's `default_wall`."
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": { "$ref": "#/$defs/policyRefBlock" },
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,
@@ -0,0 +1,129 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentproto.sh/schemas/aip-36/PLACEMENT.schema.json",
4
+ "title": "Placement ladder (AIP-36 v1.4)",
5
+ "description": "Validates the `placement` input of a session spawn (AIP-36 v1.4 §Placement ladder): an ordered list of rungs, each a sandbox plus optional model / access / preflight / turnRetry overrides. Mirrors `placementInputSchema` in agentproto/ts `packages/runtime/src/placement-ladder.ts:36-40`. Mutually exclusive with a top-level `sandbox` on the same spawn.",
6
+ "type": "object",
7
+ "required": ["ladder"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "ladder": {
11
+ "type": "array",
12
+ "minItems": 1,
13
+ "maxItems": 8,
14
+ "items": { "$ref": "#/$defs/rung" },
15
+ "description": "Rungs, tried in order. 1 to 8 (MAX_PLACEMENT_RUNGS, placement-ladder.ts:17)."
16
+ }
17
+ },
18
+ "$defs": {
19
+ "rung": {
20
+ "type": "object",
21
+ "required": ["sandbox"],
22
+ "additionalProperties": false,
23
+ "description": "One placement choice (placement-ladder.ts:26-34). An axis the rung omits inherits the spawn's own top-level value (placement-ladder.ts:125-136).",
24
+ "properties": {
25
+ "sandbox": {
26
+ "description": "A provider slug, or an inline sandbox spec in the AIP-36 inline form (SANDBOX.schema.json). A rung always boots a fresh box: `reuse` is refused (placement-ladder.ts:115-120).",
27
+ "oneOf": [
28
+ { "type": "string", "minLength": 1 },
29
+ {
30
+ "type": "object",
31
+ "required": ["provider"],
32
+ "properties": {
33
+ "provider": { "type": "string", "minLength": 1 }
34
+ },
35
+ "not": { "required": ["reuse"] }
36
+ }
37
+ ]
38
+ },
39
+ "model": {
40
+ "type": "string",
41
+ "minLength": 1,
42
+ "description": "Model id for a session placed on this rung. A metered model id MUST be gated by an owner-controlled allowlist (AIP-36 v1.4 §5)."
43
+ },
44
+ "access": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "description": "Auth profile override for this rung (AIP-69 profile refs).",
48
+ "properties": {
49
+ "profileRef": { "type": "string", "minLength": 1 },
50
+ "profileRefs": {
51
+ "type": "array",
52
+ "minItems": 1,
53
+ "items": { "type": "string", "minLength": 1 }
54
+ }
55
+ }
56
+ },
57
+ "preflight": {
58
+ "type": "array",
59
+ "items": { "type": "string", "minLength": 1 },
60
+ "description": "Preflight probe ids run on the booted box before the agent starts, in order, stopping at the first `ko` (AIP-36 v1.4 §2). An id no probe is registered under fails the spawn with `sandbox_preflight_invalid`, which ends the walk."
61
+ },
62
+ "turnRetry": {
63
+ "description": "Mid-run turn-retry policy for a session placed on this rung. Replaces, never merges with, the spawn's top-level `turnRetry`. `null` opts out. Mirrors `turnRetryInputSchema` (packages/runtime/src/turn-retry-policy.ts:199-230).",
64
+ "oneOf": [
65
+ { "type": "null" },
66
+ { "$ref": "#/$defs/turnRetry" }
67
+ ]
68
+ }
69
+ }
70
+ },
71
+ "turnRetry": {
72
+ "type": "object",
73
+ "required": ["on"],
74
+ "properties": {
75
+ "on": {
76
+ "type": "array",
77
+ "items": { "enum": ["rate-limit", "upstream-5xx", "no-output-stall", "usage-limit"] }
78
+ },
79
+ "action": { "enum": ["retry", "migrate"] },
80
+ "maxRetries": { "type": "integer", "minimum": 1 },
81
+ "baseDelayMs": { "type": "integer", "minimum": 0 },
82
+ "factor": { "type": "number", "minimum": 1 },
83
+ "maxDelayMs": { "type": "integer", "minimum": 0 },
84
+ "maxMigrations": { "type": "integer", "minimum": 0 },
85
+ "retryAfterToolCalls": { "type": "boolean" },
86
+ "rotate": {
87
+ "type": "array",
88
+ "maxItems": 16,
89
+ "items": {
90
+ "type": "object",
91
+ "required": ["model"],
92
+ "properties": {
93
+ "model": { "type": "string", "minLength": 1 },
94
+ "profileRef": { "type": "string", "minLength": 1 }
95
+ }
96
+ }
97
+ },
98
+ "rotateOn": {
99
+ "type": "array",
100
+ "minItems": 1,
101
+ "items": { "enum": ["rate-limit", "upstream-5xx", "no-output-stall", "usage-limit"] }
102
+ },
103
+ "cooldownMs": { "type": "integer", "minimum": 1 },
104
+ "fallback": {
105
+ "type": "array",
106
+ "maxItems": 16,
107
+ "description": "Ordered config overlays tried after same-config retries are exhausted; the reference implementation's subset of AIP-46 `ConfigOverlay`.",
108
+ "items": {
109
+ "type": "object",
110
+ "anyOf": [
111
+ { "required": ["model"] },
112
+ { "required": ["access"] },
113
+ { "required": ["harness"] }
114
+ ],
115
+ "properties": {
116
+ "model": { "type": "string", "minLength": 1 },
117
+ "access": {
118
+ "type": "object",
119
+ "required": ["profileRef"],
120
+ "properties": { "profileRef": { "type": "string", "minLength": 1 } }
121
+ },
122
+ "harness": { "type": "string", "minLength": 1 }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }
129
+ }
@@ -30,10 +30,10 @@
30
30
  "type": "object",
31
31
  "additionalProperties": true,
32
32
  "properties": {
33
- "installAdapters": {
33
+ "installHarnesses": {
34
34
  "type": "array",
35
35
  "items": { "type": "string", "minLength": 1 },
36
- "description": "Semantic harness slugs to pre-install in the box at boot (e.g. [\"hermes\", \"claude-code\"]). Each expands to @agentproto/adapter-<slug>@latest plus that adapter's declared boot extras; a config.installPackages pin for the same package always wins. Additive — absent means no extra install."
36
+ "description": "Semantic harness slugs to pre-install in the box at boot (e.g. [\"hermes\", \"claude-code\"]). Each expands to @agentproto/harness-<slug>@latest plus that harness's declared boot extras; a config.installPackages pin for the same package always wins. Additive — absent means no extra install."
37
37
  }
38
38
  },
39
39
  "description": "Provider-specific connection fields. Shape varies per provider (see AIP-36 §Provider config shapes)."
@@ -80,7 +80,7 @@
80
80
  "type": "string",
81
81
  "pattern": "^(shared|auto|dedicated|[a-z0-9]{1,8})$",
82
82
  "default": "shared",
83
- "description": "Public source address for outbound traffic (AIP-36 v1.3): shared | auto | dedicated | pool slot id. A provider without an address pool MUST refuse any value other than shared with sandbox_egress_pool_unavailable."
83
+ "description": "Public source address for outbound traffic (AIP-36 v1.3): shared | auto | dedicated | pool slot id. A provider without an address pool MUST refuse any value other than shared with sandbox_egress_pool_unavailable. With auto, a provider given an egress health view skips slots cooling down for the session's model and fails with sandbox_egress_all_cooling, booting nothing, when every slot is cooling (AIP-36 v1.4 §3)."
84
84
  }
85
85
  }
86
86
  },
@@ -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",
@@ -248,12 +248,12 @@
248
248
  "properties": {
249
249
  "agent": {
250
250
  "type": "object",
251
- "required": ["adapter", "prompt"],
251
+ "required": ["harness", "prompt"],
252
252
  "additionalProperties": false,
253
253
  "properties": {
254
- "adapter": { "type": "string", "minLength": 1, "description": "Agent adapter slug (e.g. 'claude-code', 'hermes')." },
254
+ "harness": { "type": "string", "minLength": 1, "description": "AIP-45 harness slug (e.g. 'claude-code', 'hermes')." },
255
255
  "prompt": { "type": "string", "minLength": 1, "description": "Initial prompt / consigne sent to the spawned agent." },
256
- "model": { "type": "string", "minLength": 1, "description": "Optional model identifier forwarded to the adapter." },
256
+ "model": { "type": "string", "minLength": 1, "description": "Optional model identifier forwarded to the harness." },
257
257
  "cwd": { "type": "string", "minLength": 1, "description": "Working directory for the spawned session." }
258
258
  }
259
259
  }
@@ -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
- "$ref": "#/$defs/anyRef"
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 anything to MEMORY.md files (no item is created, updated, or tombstoned)."
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"],
@@ -74,11 +74,11 @@
74
74
  "confinedReadPaths": {
75
75
  "type": "array",
76
76
  "items": { "type": "string", "minLength": 1 },
77
- "description": "READ-only paths an OS-confined spawn needs to boot (e.g. the CLI's own global config files under $HOME, which the sandbox denies). `~/...` anchors at the operator's home; a leading `$VAR`/`${VAR}` is read from the per-spawn env and dropped when unset. Never grants write access; mutable state belongs in the adapter's state home."
77
+ "description": "READ-only paths an OS-confined spawn needs to boot (e.g. the CLI's own global config files under $HOME, which the sandbox denies). `~/...` anchors at the operator's home; a leading `$VAR`/`${VAR}` is read from the per-spawn env and dropped when unset. Never grants write access; mutable state belongs in the harness's state home."
78
78
  },
79
79
  "protocol": {
80
80
  "enum": ["acp", "mcp", "proprietary"],
81
- "description": "Wire protocol discriminator. acp = AIP-44 ACP server; mcp = MCP-over-stdio; proprietary = adapter package implements AgentCliClient."
81
+ "description": "Wire protocol discriminator. acp = AIP-44 ACP server; mcp = MCP-over-stdio; proprietary = harness package implements AgentCliClient."
82
82
  },
83
83
  "acp": {
84
84
  "type": "string",
@@ -96,7 +96,7 @@
96
96
  "url": { "type": "string", "format": "uri" }
97
97
  }
98
98
  },
99
- "adapter": {
99
+ "harness": {
100
100
  "type": "string",
101
101
  "pattern": "^@?[a-z0-9][a-z0-9\\-./]*$",
102
102
  "description": "NPM package name implementing AgentCliClient. REQUIRED when protocol=proprietary."
@@ -158,7 +158,7 @@
158
158
  },
159
159
  {
160
160
  "if": { "properties": { "protocol": { "const": "proprietary" } }, "required": ["protocol"] },
161
- "then": { "required": ["adapter"] }
161
+ "then": { "required": ["harness"] }
162
162
  },
163
163
  {
164
164
  "if": {
@@ -314,16 +314,16 @@
314
314
  "type": "object",
315
315
  "additionalProperties": false,
316
316
  "required": ["id"],
317
- "description": "A model id annotated with who serves/bills it and how this adapter reaches it. A bare string (still legal) leaves provider unstated — the projector MUST NOT guess one.",
317
+ "description": "A model id annotated with who serves/bills it and how this harness reaches it. A bare string (still legal) leaves provider unstated — the projector MUST NOT guess one.",
318
318
  "properties": {
319
319
  "id": { "type": "string", "description": "Model id, unchanged on the wire — this is annotation, not renaming." },
320
320
  "provider": { "type": "string", "description": "ProviderPreset id (or direct provider, e.g. \"anthropic\") — who serves and bills this model. Omit when unstated." },
321
- "mode": { "type": "string", "description": "This adapter's mode id that routes to `provider` (e.g. \"moonshot\"). Omit when the adapter routes on its own (e.g. a model-id prefix) or needs no mode switch." }
321
+ "mode": { "type": "string", "description": "This harness's mode id that routes to `provider` (e.g. \"moonshot\"). Omit when the harness routes on its own (e.g. a model-id prefix) or needs no mode switch." }
322
322
  }
323
323
  }
324
324
  ]
325
325
  },
326
- "description": "Model ids the host MAY route to. Each entry is either a bare id (provider unstated, adapter default) or a { id, provider?, mode? } binding declaring who serves it and which adapter mode reaches it."
326
+ "description": "Model ids the host MAY route to. Each entry is either a bare id (provider unstated, harness default) or a { id, provider?, mode? } binding declaring who serves it and which harness mode reaches it."
327
327
  },
328
328
  "env": {
329
329
  "type": "object",
@@ -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": {
@@ -480,7 +558,7 @@
480
558
  "scrubEnv": {
481
559
  "type": "array",
482
560
  "items": { "type": "string" },
483
- "description": "Env vars to scrub when this preset is active. Optional — an adapter that scrubs in code may omit it. Not surfaced to catalog clients."
561
+ "description": "Env vars to scrub when this preset is active. Optional — a harness that scrubs in code may omit it. Not surfaced to catalog clients."
484
562
  },
485
563
  "defaultModel": { "type": "string", "description": "Conventional default model id for this provider, if any." },
486
564
  "homepage": { "type": "string", "description": "Optional homepage/docs URL for the catalog UI." }