@agentproto/corpus-cli 0.10.0 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/specs/resources/aip-14/draft/TOOL.schema.json +1 -1
  2. package/dist/specs/resources/aip-15/draft/WORKFLOW.schema.json +59 -47
  3. package/dist/specs/resources/aip-16/draft/IO.schema.json +4 -0
  4. package/dist/specs/resources/aip-18/draft/COLLECTION.schema.json +128 -7
  5. package/dist/specs/resources/aip-36/draft/SANDBOX.schema.json +13 -0
  6. package/dist/specs/resources/aip-41/draft/ROUTINE.schema.json +21 -2
  7. package/dist/specs/resources/aip-42/draft/AGENT.schema.json +1 -1
  8. package/dist/specs/resources/aip-44/draft/ACP.schema.json +3 -1
  9. package/dist/specs/resources/aip-47/draft/ROLE.schema.json +1 -1
  10. package/dist/specs/resources/aip-49/draft/ASSET.schema.json +232 -0
  11. package/dist/specs/resources/aip-50/draft/AUTH.schema.json +114 -0
  12. package/dist/specs/resources/aip-53/draft/APP.schema.json +211 -0
  13. package/dist/specs/resources/aip-54/draft/REF.schema.json +1 -1
  14. package/dist/specs/resources/aip-54/draft/WS-REF.schema.json +46 -0
  15. package/dist/specs/resources/aip-55/draft/PRODUCT.schema.json +172 -38
  16. package/dist/specs/resources/aip-58/draft/event.schema.json +55 -0
  17. package/dist/specs/resources/aip-58/draft/journal-entry.schema.json +47 -0
  18. package/dist/specs/resources/aip-58/draft/run.schema.json +164 -0
  19. package/dist/specs/resources/aip-58/draft/vectors/README.md +18 -0
  20. package/dist/specs/resources/aip-58/draft/vectors/v1-invalid-input.json +31 -0
  21. package/dist/specs/resources/aip-58/draft/vectors/v2-suspended-input-required.json +51 -0
  22. package/dist/specs/resources/aip-58/draft/vectors/v3-missing-artifact.json +39 -0
  23. package/dist/specs/resources/aip-58/draft/vectors/v4-host-restart.json +36 -0
  24. package/dist/specs/resources/aip-58/draft/vectors/v5-disjoint-workspaces.json +60 -0
  25. package/dist/specs/resources/aip-58/draft/vectors/v6-orphaned.json +29 -0
  26. package/dist/specs/resources/aip-58/draft/vectors/v7-replay.json +46 -0
  27. package/dist/specs/resources/aip-58/draft/vectors/v8-heuristic-not-suspend.json +47 -0
  28. package/dist/specs/resources/aip-62/draft/ATTESTATION.schema.json +184 -0
  29. package/dist/specs/resources/aip-62/draft/REVIEW-PACK.schema.json +70 -0
  30. package/dist/specs/resources/aip-62/draft/REVIEW.schema.json +180 -0
  31. package/dist/specs/resources/aip-7/draft/GOVERNANCE.schema.json +147 -1
  32. package/dist/specs/resources/{aip-52/draft → pending/harness}/HARNESS.schema.json +1 -1
  33. package/package.json +4 -4
  34. package/dist/specs/resources/aip-52/draft/ADAPTER.md +0 -193
  35. package/dist/specs/resources/aip-54/draft/REF.md +0 -89
  36. package/dist/specs/resources/aip-55/draft/PRODUCT.md +0 -143
@@ -4,7 +4,7 @@
4
4
  "title": "TOOL.md frontmatter — agenttool/v1 (abstract agent contract)",
5
5
  "description": "Validates the YAML frontmatter portion of an AIP-14 TOOL.md manifest. Implementation-specific fields (code/run/runner/secrets/network/entry) are NOT part of this schema — they live on the AIP-30 PROVIDER schema.",
6
6
  "type": "object",
7
- "required": ["name", "id", "description", "version"],
7
+ "required": ["name", "id", "description", "version", "inputs", "outputs"],
8
8
  "additionalProperties": false,
9
9
  "properties": {
10
10
  "name": {
@@ -274,6 +274,10 @@
274
274
  }
275
275
  }
276
276
  ]
277
+ },
278
+ "cacheable": {
279
+ "type": "boolean",
280
+ "description": "Cache this step's output under the run's cacheKey; only its resolved `inputs` are hashed (not `context`/secrets). Default false."
277
281
  }
278
282
  }
279
283
  },
@@ -294,7 +298,16 @@
294
298
  }
295
299
  }
296
300
  },
297
- "default": { "type": "string" }
301
+ "default": { "type": "string" },
302
+ "join": {
303
+ "type": "string",
304
+ "description": "Id of the later sibling where execution resumes after the chosen arm — it MUST come after every arm target. Omitted ⇒ the step right after the last arm's target (so the last arm's body is exactly its target step); declare `join` to give the last arm several steps."
305
+ },
306
+ "fallthrough": {
307
+ "type": "boolean",
308
+ "default": false,
309
+ "description": "Legacy, discouraged. `true` restores the pre-exclusive semantics: the chosen target runs AND every sibling after it in document order (so taking an earlier arm also runs every later arm), and a no-match without `default` continues at the next sibling. Incompatible with `join`."
310
+ }
298
311
  }
299
312
  },
300
313
  "stepParallel": {
@@ -339,7 +352,6 @@
339
352
  },
340
353
  "stepApproval": {
341
354
  "type": "object",
342
- "description": "A human-in-the-loop gate. The HOST resolves the step — it MUST park the run (visible in its status output, e.g. an `awaitingApproval` record) and wait for a human decision; it MUST NOT auto-approve. The decision carries `who` (who decided) and an optional `note`, and is recorded on the host's state ledger (`by: \"human\"`) — state is written only from gate results and approvals. `timeout_ms` bounds the wait: when it elapses with no human decision, the host resolves the step as REJECTED with `who: \"timeout\"` (the `on_timeout`/`on_reject` branch, never an approval).",
343
355
  "required": ["kind", "prompt", "approvers"],
344
356
  "properties": {
345
357
  "kind": { "const": "approval" },
@@ -406,51 +418,9 @@
406
418
  }
407
419
  }
408
420
  },
409
- "harness": {
410
- "type": "object",
411
- "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).",
412
- "additionalProperties": false,
413
- "properties": {
414
- "model": { "type": "string", "description": "Model id override for this spawn." },
415
- "effort": { "type": "string", "description": "Reasoning-effort override for this spawn (adapter-defined vocabulary, e.g. \"low\" | \"medium\" | \"high\")." },
416
- "role": { "type": "string", "description": "Spawn-time role governing the child's tool-policy disposition (e.g. \"executor\" | \"supervisor\")." },
417
- "tools": {
418
- "type": "array",
419
- "items": { "type": "string" },
420
- "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."
421
- },
422
- "skills": {
423
- "type": "array",
424
- "items": { "type": "string" },
425
- "description": "Skill ids auto-mounted into the spawn — adapters with no such option (e.g. claude-code, which auto-discovers skills) ignore it."
426
- },
427
- "cwd": { "type": "string", "description": "Working directory override for this step's spawn; takes precedence over the run-level cwd." },
428
- "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`." },
429
- "promptSha": { "type": "string", "description": "Computed by the loader at load time — sha256 (hex) of `promptFile`'s raw bytes. Not hand-authored; present only when `promptFile` was resolved." },
430
- "knowledge": {
431
- "type": "array",
432
- "items": { "$ref": "#/$defs/knowledgeSelector" },
433
- "description": "AIP-10 corpus knowledge to materialize into this step's working directory before the session runs. For each selector, the host resolves the workspace (relative paths resolve against the WORKFLOW.md's own directory), queries its refined `entries/**/*.md` (anyOf = tag OR, allOf = tag AND post-filter, kinds = refined-kind filter), sorts matches by slug ascending, caps at `maxEntries` (default 50), and writes each raw entry (frontmatter + body) to `<cwd>/.knowledge/<workspaceBasename>/<slug>.md` plus a deterministic `<cwd>/.knowledge/INDEX.md` (one `- [<title>](<relpath>) — kind, tags` line per entry, grouped per workspace). One line naming the INDEX is prepended to the step's prompt. An empty match is not an error — it is recorded (`matched: 0`) and warned via the harness-warning event (`knowledge-empty`). Mode is v1 `\"files\"` only; `\"tool\"` is reserved. Example:\n\nknowledge:\n - workspace: ../corpus-writer\n anyOf: [book-factory, drafting]\n allOf: [style-guide]\n kinds: [fact]\n maxEntries: 20\n mode: files"
434
- }
435
- }
436
- },
437
- "knowledgeSelector": {
438
- "type": "object",
439
- "description": "One AIP-10 corpus workspace attachment on a `kind: \"agent\"` step's `harness.knowledge[]` — see the `harness.knowledge` description for the full materialization contract. String fields (`workspace`, `anyOf[]`, `allOf[]`, `kinds[]`) may carry leading `$…` run-time references; the loader defers such selectors (`deferred` is an internal field, rejected when user-authored) and the runtime resolves them against the run bindings before materialization.",
440
- "required": ["workspace"],
441
- "additionalProperties": false,
442
- "properties": {
443
- "workspace": { "type": "string", "minLength": 1, "description": "Path to an AIP-10 corpus workspace root — relative to the WORKFLOW.md's directory (resolved by the loader to an absolute path) or absolute. A workspace that does not exist fails the load. Ref rule: a string containing a `$…` run-time reference (AIP-16 grammar) is left untouched at load time and resolved per run against the run bindings — only the LEADING reference token (up to the next `/`) is replaced, e.g. `$input.bookDir/knowledge` becomes `<resolved bookDir>/knowledge`; a relative resolved workspace joins to the run cwd, and a workspace that still does not exist after resolution is warned (`knowledge-workspace-missing`), not thrown." },
444
- "anyOf": { "type": "array", "items": { "type": "string" }, "description": "Tags with OR semantics — an entry matching ANY of these passes. Empty/absent = no tag filter. Tag strings may carry leading `$…` run-time references, resolved per run like `workspace`." },
445
- "allOf": { "type": "array", "items": { "type": "string" }, "description": "Tags that must ALL be present on an entry (post-filter applied after anyOf)." },
446
- "kinds": { "type": "array", "items": { "type": "string" }, "description": "Refined-kind filter (e.g. \"fact\" | \"howto\") — only entries of these kinds pass." },
447
- "maxEntries": { "type": "integer", "minimum": 1, "description": "Cap on materialized entries, applied after sorting by slug ascending (deterministic). Default 50." },
448
- "mode": { "const": "files", "description": "Materialization mode. v1 supports only \"files\" (write entries into the step cwd's .knowledge/); other values are rejected." }
449
- }
450
- },
451
421
  "stepAgent": {
452
422
  "type": "object",
453
- "description": "Spawn or reuse an agent session and send it a prompt.",
423
+ "description": "Spawn or reuse an agent session and send it a prompt. Codifies `@agentproto/workflow`'s shipped `StepAgent` union member (`packages/workflow/src/types.ts`).",
454
424
  "required": ["kind", "prompt"],
455
425
  "properties": {
456
426
  "kind": { "const": "agent" },
@@ -529,11 +499,11 @@
529
499
  },
530
500
  "stepGate": {
531
501
  "type": "object",
532
- "description": "Run a shell command through the host's subprocess runner (AIP-17) as a deterministic pass/fail check. Exit code 0 is a pass; any other exit code is a failure, subject to `retry`. The process' stdout, if it parses as JSON, becomes the gate's report; otherwise, when `report` names a file, that file is read (relative to `cwd`) and parsed as JSON instead. The report — plus `ok` and `exitCode` — is bound at `$steps.<id>.report` / `.ok` / `.exitCode`, and emitted as a `gate-report` lifecycle event on the run's event stream.",
502
+ "description": "Run a shell command through the host's subprocess runner (AIP-17) as a deterministic pass/fail check. Exit code 0 is a pass; any other exit code is a failure, subject to `retry`. The process' stdout, if it parses as JSON, becomes the gate's report; otherwise, when `report` names a file, that file is read (relative to `cwd`) and parsed as JSON instead. The report — plus `ok` and `exitCode` — is bound at `$steps.<id>.report` / `.ok` / `.exitCode`, and emitted as a `gate-report` lifecycle event on the run's event stream. Codifies `@agentproto/workflow`'s shipped `StepGate` contract (`packages/workflow/src/types.ts`).",
533
503
  "required": ["kind", "command"],
534
504
  "properties": {
535
505
  "kind": { "const": "gate" },
536
- "command": { "type": "string" },
506
+ "command": { "type": "string", "description": "The command to execute. No shell interpolation — invoked as an argv vector (`command` + `args`), never through a shell." },
537
507
  "args": { "type": "array", "items": { "type": "string", "description": "May carry a LEADING `$…` run-time reference (AIP-16): a leading `$input|$item|$steps.<id>|$index` token is resolved per run against the run bindings and any trailing text is appended verbatim (`$input.bookDir/knowledge` → `<resolved>/knowledge`; a string that is exactly a ref resolves to that value's string form); `$$` escapes a literal `$`; an unresolvable ref throws naming the step and the arg index." } },
538
508
  "cwd": { "type": "string", "description": "Working directory. Defaults to the workflow run's own cwd. May carry the same leading-`$…` ref rule as `args` (leading token + trailing text, `$$` escape, unresolvable ref throws). The resolved cwd is made absolute: absolute stays absolute; a relative resolved cwd (incl. `.`) resolves against the run's cwd, never the daemon process cwd." },
539
509
  "report": { "type": "string", "description": "Path (relative to `cwd`) of a JSON report file, consulted when stdout doesn't itself parse as JSON." },
@@ -547,6 +517,48 @@
547
517
  }
548
518
  }
549
519
  }
520
+ },
521
+ "harness": {
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).",
524
+ "additionalProperties": false,
525
+ "properties": {
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\")." },
528
+ "role": { "type": "string", "description": "Spawn-time role governing the child's tool-policy disposition (e.g. \"executor\" | \"supervisor\")." },
529
+ "tools": {
530
+ "type": "array",
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."
533
+ },
534
+ "skills": {
535
+ "type": "array",
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."
538
+ },
539
+ "cwd": { "type": "string", "description": "Working directory override for this step's spawn; takes precedence over the run-level cwd." },
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`." },
541
+ "promptSha": { "type": "string", "description": "Computed by the loader at load time — sha256 (hex) of `promptFile`'s raw bytes. Not hand-authored; present only when `promptFile` was resolved." },
542
+ "knowledge": {
543
+ "type": "array",
544
+ "items": { "$ref": "#/$defs/knowledgeSelector" },
545
+ "description": "AIP-10 corpus knowledge to materialize into this step's working directory before the session runs. For each selector, the host resolves the workspace (relative paths resolve against the WORKFLOW.md's own directory), queries its refined `entries/**/*.md` (anyOf = tag OR, allOf = tag AND post-filter, kinds = refined-kind filter), sorts matches by slug ascending, caps at `maxEntries` (default 50), and writes each raw entry (frontmatter + body) to `<cwd>/.knowledge/<workspaceBasename>/<slug>.md` plus a deterministic `<cwd>/.knowledge/INDEX.md` (one `- [<title>](<relpath>) — kind, tags` line per entry, grouped per workspace). One line naming the INDEX is prepended to the step's prompt. An empty match is not an error — it is recorded (`matched: 0`) and warned via the harness-warning event (`knowledge-empty`). Mode is v1 `\"files\"` only; `\"tool\"` is reserved."
546
+ }
547
+ }
548
+ },
549
+ "knowledgeSelector": {
550
+ "type": "object",
551
+ "description": "One AIP-10 corpus workspace attachment on a `kind: \"agent\"` step's `harness.knowledge[]` — see the `harness.knowledge` description for the full materialization contract. String fields (`workspace`, `anyOf[]`, `allOf[]`, `kinds[]`) may carry leading `$…` run-time references; the loader defers such selectors (`deferred` is an internal field, rejected when user-authored) and the runtime resolves them against the run bindings before materialization.",
552
+ "required": ["workspace"],
553
+ "additionalProperties": false,
554
+ "properties": {
555
+ "workspace": { "type": "string", "minLength": 1, "description": "Path to an AIP-10 corpus workspace root — relative to the WORKFLOW.md's directory (resolved by the loader to an absolute path) or absolute. A workspace that does not exist fails the load. Ref rule: a string containing a `$…` run-time reference (AIP-16 grammar) is left untouched at load time and resolved per run against the run bindings — only the LEADING reference token (up to the next `/`) is replaced, e.g. `$input.bookDir/knowledge` becomes `<resolved bookDir>/knowledge`; a relative resolved workspace joins to the run cwd, and a workspace that still does not exist after resolution is warned (`knowledge-workspace-missing`), not thrown." },
556
+ "anyOf": { "type": "array", "items": { "type": "string" }, "description": "Tags with OR semantics — an entry matching ANY of these passes. Empty/absent = no tag filter. Tag strings may carry leading `$…` run-time references, resolved per run like `workspace`." },
557
+ "allOf": { "type": "array", "items": { "type": "string" }, "description": "Tags that must ALL be present on an entry (post-filter applied after anyOf)." },
558
+ "kinds": { "type": "array", "items": { "type": "string" }, "description": "Refined-kind filter (e.g. \"fact\" | \"howto\") — only entries of these kinds pass." },
559
+ "maxEntries": { "type": "integer", "minimum": 1, "description": "Cap on materialized entries, applied after sorting by slug ascending (deterministic). Default 50." },
560
+ "mode": { "const": "files", "description": "Materialization mode. v1 supports only \"files\" (write entries into the step cwd's .knowledge/); other values are rejected." }
561
+ }
550
562
  }
551
563
  }
552
564
  }
@@ -43,6 +43,10 @@
43
43
  "contentType": {
44
44
  "description": "Informational MIME type. Hosts MAY surface in audit logs / UIs.",
45
45
  "type": "string"
46
+ },
47
+ "required": {
48
+ "description": "outputsFiles only (AIP-58 amendment): missing when the producing step finishes MUST fail the run { code: \"missing-artifact\" } (AIP-58 section 4/10). Absent or false is advisory only -- a host MAY warn but MUST NOT fail the run.",
49
+ "type": "boolean"
46
50
  }
47
51
  }
48
52
  },
@@ -241,7 +241,7 @@
241
241
  "type": "object",
242
242
  "required": ["name", "type"],
243
243
  "additionalProperties": false,
244
- "description": "Definition of one field on a collection's item schema. Merge-by-name. Type drift between parent and child is HARD refused.",
244
+ "description": "Definition of one field on a collection's item schema (an entry in `fields[]`). Merge-by-name. Type drift between parent and child is HARD refused. Identical to `fieldShape` plus a REQUIRED `name`; keep the two property lists in sync.",
245
245
  "properties": {
246
246
  "name": {
247
247
  "type": "string",
@@ -282,8 +282,8 @@
282
282
  "description": "Required when type=enum. Children may narrow to a subset; widening to a superset is permitted (it does not invalidate instances)."
283
283
  },
284
284
  "items": {
285
- "$ref": "#/$defs/fieldDef",
286
- "description": "Required when type=array. Recursive shape — describes the inner item type."
285
+ "$ref": "#/$defs/fieldShape",
286
+ "description": "Required when type=array. Recursive shape — describes the inner item type. Carries no `name` (see `fieldShape`)."
287
287
  },
288
288
  "refKind": {
289
289
  "type": "string",
@@ -311,7 +311,128 @@
311
311
  "default": true,
312
312
  "description": "OPTIONAL deprecation flag. A child may set false to mark an inherited field deprecated; the host preserves the field in the resolved schema (so existing items still validate) but flags new uses via lint. Setting enabled:false on a field a child does not inherit is invalid."
313
313
  }
314
- }
314
+ },
315
+ "allOf": [
316
+ {
317
+ "description": "type=enum requires `enum`.",
318
+ "if": {
319
+ "required": ["type"],
320
+ "properties": { "type": { "const": "enum" } }
321
+ },
322
+ "then": { "required": ["enum"] }
323
+ },
324
+ {
325
+ "description": "type=array requires `items`.",
326
+ "if": {
327
+ "required": ["type"],
328
+ "properties": { "type": { "const": "array" } }
329
+ },
330
+ "then": { "required": ["items"] }
331
+ },
332
+ {
333
+ "description": "type=ref requires `refKind`.",
334
+ "if": {
335
+ "required": ["type"],
336
+ "properties": { "type": { "const": "ref" } }
337
+ },
338
+ "then": { "required": ["refKind"] }
339
+ }
340
+ ]
341
+ },
342
+ "fieldShape": {
343
+ "type": "object",
344
+ "required": ["type"],
345
+ "additionalProperties": false,
346
+ "description": "Name-less field definition: the shape of an array field's `items:`. Identical to `fieldDef` minus `name` — an inner value type has no name of its own, and `name` is only meaningful (and required) for entries in `fields[]`. Keep the two property lists in sync.",
347
+ "properties": {
348
+ "type": {
349
+ "enum": [
350
+ "string",
351
+ "number",
352
+ "boolean",
353
+ "enum",
354
+ "date",
355
+ "datetime",
356
+ "text",
357
+ "url",
358
+ "ref",
359
+ "array"
360
+ ],
361
+ "description": "Field type. Drift across composition (parent string -> child number) is HARD refused (`collection_field_type_drift`)."
362
+ },
363
+ "required": {
364
+ "type": "boolean",
365
+ "default": false,
366
+ "description": "Whether items MUST declare this field. A child may narrow false -> true; loosening true -> false is permitted (it removes a constraint without invalidating instances)."
367
+ },
368
+ "description": {
369
+ "type": "string",
370
+ "maxLength": 1000,
371
+ "description": "Prose describing what the field captures."
372
+ },
373
+ "enum": {
374
+ "type": "array",
375
+ "items": { "type": "string" },
376
+ "uniqueItems": true,
377
+ "description": "Required when type=enum. Children may narrow to a subset; widening to a superset is permitted (it does not invalidate instances)."
378
+ },
379
+ "items": {
380
+ "$ref": "#/$defs/fieldShape",
381
+ "description": "Required when type=array. Recursive shape — describes the inner item type. Carries no `name` (see `fieldShape`)."
382
+ },
383
+ "refKind": {
384
+ "type": "string",
385
+ "pattern": "^[a-z][a-z0-9-]*[a-z0-9]$",
386
+ "description": "Required when type=ref. The target collection's `name`. Hosts validate that ref values point at items of this collection."
387
+ },
388
+ "pattern": {
389
+ "type": "string",
390
+ "description": "OPTIONAL regex constraint. Only valid when type=string."
391
+ },
392
+ "min": {
393
+ "type": "number",
394
+ "description": "OPTIONAL minimum. For type=number: minimum value. For type=array: minimum length."
395
+ },
396
+ "max": {
397
+ "type": "number",
398
+ "description": "OPTIONAL maximum. For type=number: maximum value. For type=array: maximum length."
399
+ },
400
+ "format": {
401
+ "type": "string",
402
+ "description": "OPTIONAL named format. Common values: email, uri, semver, uuid, slug. Only valid when type=string. Hosts MAY interpret unknown formats as advisory."
403
+ },
404
+ "enabled": {
405
+ "type": "boolean",
406
+ "default": true,
407
+ "description": "OPTIONAL deprecation flag. A child may set false to mark an inherited field deprecated; the host preserves the field in the resolved schema (so existing items still validate) but flags new uses via lint. Setting enabled:false on a field a child does not inherit is invalid."
408
+ }
409
+ },
410
+ "allOf": [
411
+ {
412
+ "description": "type=enum requires `enum`.",
413
+ "if": {
414
+ "required": ["type"],
415
+ "properties": { "type": { "const": "enum" } }
416
+ },
417
+ "then": { "required": ["enum"] }
418
+ },
419
+ {
420
+ "description": "type=array requires `items`.",
421
+ "if": {
422
+ "required": ["type"],
423
+ "properties": { "type": { "const": "array" } }
424
+ },
425
+ "then": { "required": ["items"] }
426
+ },
427
+ {
428
+ "description": "type=ref requires `refKind`.",
429
+ "if": {
430
+ "required": ["type"],
431
+ "properties": { "type": { "const": "ref" } }
432
+ },
433
+ "then": { "required": ["refKind"] }
434
+ }
435
+ ]
315
436
  },
316
437
  "item": {
317
438
  "type": "object",
@@ -388,7 +509,7 @@
388
509
  },
389
510
  "dueAt": {
390
511
  "type": "string",
391
- "description": "OPTIONAL — deadline value. Format depends on collection.deadline.kind: ISO date for target-date, ISO datetime for window, RRULE-like for recurrent."
512
+ "description": "OPTIONAL — deadline value. Format depends on collection.deadline.kind: ISO date for target-date, ISO datetime for window, RRULE-like for recurrent. Same quoting rule as `createdAt`: producers SHOULD quote date and datetime values; consumers MAY accept a native date/timestamp."
392
513
  },
393
514
  "attachments": {
394
515
  "type": "array",
@@ -417,12 +538,12 @@
417
538
  "createdAt": {
418
539
  "type": "string",
419
540
  "format": "date-time",
420
- "description": "OPTIONAL — ISO 8601 creation timestamp."
541
+ "description": "OPTIONAL — ISO 8601 creation timestamp. Producers SHOULD write it as a quoted YAML string (createdAt: \"2026-04-26T09:14:00Z\"): some YAML 1.1 parsers resolve an unquoted ISO timestamp to a native timestamp, which is not a string. Consumers MAY accept a native timestamp and normalize it to an ISO 8601 string before validating."
421
542
  },
422
543
  "updatedAt": {
423
544
  "type": "string",
424
545
  "format": "date-time",
425
- "description": "OPTIONAL — ISO 8601 last-update timestamp."
546
+ "description": "OPTIONAL — ISO 8601 last-update timestamp. Same quoting rule as `createdAt`: producers SHOULD quote it; consumers MAY accept a native timestamp."
426
547
  },
427
548
  "metadata": {
428
549
  "type": "object",
@@ -77,6 +77,19 @@
77
77
  }
78
78
  }
79
79
  },
80
+ "join": {
81
+ "type": "object",
82
+ "additionalProperties": false,
83
+ "required": ["tokenEnv"],
84
+ "properties": {
85
+ "tokenEnv": {
86
+ "type": "string",
87
+ "minLength": 1,
88
+ "description": "Name of a host env var whose value (a join-token URL) should be forwarded into the sandbox under the SAME name at boot, so the box can auto-register with the daemon that minted the token. Equivalent to adding that name to env.passthrough — provided as a distinct, self-documenting field because its purpose (auto-join) is different from an arbitrary forwarded secret. Absent/no-op when the named host env var isn't actually set (e.g. a fork's CI run with no AGENTPROTO_JOIN secret) — never fails the boot."
89
+ }
90
+ },
91
+ "description": "Auto-join wiring: forwards a host env var (holding a join-token URL) into the sandbox by the same name, so the box can register itself with the daemon that minted the token."
92
+ },
80
93
  "mounts": {
81
94
  "type": "array",
82
95
  "items": { "$ref": "#/$defs/mountEntry" },
@@ -186,7 +186,8 @@
186
186
  "oneOf": [
187
187
  { "$ref": "#/$defs/targetAction" },
188
188
  { "$ref": "#/$defs/targetWorkflow" },
189
- { "$ref": "#/$defs/targetTool" }
189
+ { "$ref": "#/$defs/targetTool" },
190
+ { "$ref": "#/$defs/targetAgent" }
190
191
  ]
191
192
  },
192
193
  "targetAction": {
@@ -240,6 +241,24 @@
240
241
  }
241
242
  }
242
243
  },
244
+ "targetAgent": {
245
+ "type": "object",
246
+ "required": ["agent"],
247
+ "additionalProperties": false,
248
+ "properties": {
249
+ "agent": {
250
+ "type": "object",
251
+ "required": ["adapter", "prompt"],
252
+ "additionalProperties": false,
253
+ "properties": {
254
+ "adapter": { "type": "string", "minLength": 1, "description": "Agent adapter slug (e.g. 'claude-code', 'hermes')." },
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." },
257
+ "cwd": { "type": "string", "minLength": 1, "description": "Working directory for the spawned session." }
258
+ }
259
+ }
260
+ }
261
+ },
243
262
  "anyRef": {
244
263
  "type": "object",
245
264
  "additionalProperties": false,
@@ -248,7 +267,7 @@
248
267
  "file": { "type": "string", "minLength": 1 },
249
268
  "inline": { "type": "object", "additionalProperties": true }
250
269
  },
251
- "description": "AIP-27 ref primitive — exactly one of ref|file|inline."
270
+ "description": "AIP-54 ref primitive — exactly one of ref|file|inline."
252
271
  },
253
272
  "identityRef": {
254
273
  "oneOf": [
@@ -178,7 +178,7 @@
178
178
  }
179
179
  }
180
180
  ],
181
- "description": "AIP-27 ref primitive — string shorthand or { ref | file | inline }."
181
+ "description": "AIP-54 ref primitive — string shorthand or { ref | file | inline }."
182
182
  },
183
183
  "agentRef": {
184
184
  "$ref": "#/$defs/anyRef"
@@ -108,7 +108,9 @@
108
108
  "properties": {
109
109
  "name": { "type": "string" },
110
110
  "transport": { "enum": ["stdio", "http", "sse"] },
111
- "ref": { "type": "string" }
111
+ "ref": { "type": "string" },
112
+ "args": { "type": "array", "items": { "type": "string" }, "description": "stdio only: argv passed to the `ref` command." },
113
+ "env": { "type": "object", "additionalProperties": { "type": "string" }, "description": "stdio only: extra environment for the launched server." }
112
114
  }
113
115
  }
114
116
  }
@@ -47,7 +47,7 @@
47
47
  "extends": {
48
48
  "type": "string",
49
49
  "minLength": 1,
50
- "description": "Reference to a parent ROLE. Triggers composition. Accepts any of the ref forms in AIP-47 §Reference syntax: bare slug (`seo-specialist`), scoped slug (`builtin/seo-specialist`, `file/<path>`, `db/<id>`), `ws://roles/<slug>` URI, or fully-qualified URL. Path-form refs SHOULD end in 'ROLE.md'."
50
+ "description": "Reference to a parent ROLE. Triggers composition. Accepts any of the ref forms in AIP-54 §Reference syntax: bare slug (`seo-specialist`), scoped slug (`builtin/seo-specialist`, `file/<path>`, `db/<id>`), `ws://roles/<slug>` URI, or fully-qualified URL. Path-form refs SHOULD end in 'ROLE.md'."
51
51
  },
52
52
  "department": {
53
53
  "type": "string",