@tangle-network/agent-runtime 9.0.2 → 9.0.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.
Files changed (80) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/{activation-BrBDs0Yj.js → activation-CHTcCoOU.js} +2 -2
  3. package/dist/{activation-BrBDs0Yj.js.map → activation-CHTcCoOU.js.map} +1 -1
  4. package/dist/{activation-CoVktVKr.d.ts → activation-OSYxeVWi.d.ts} +2 -2
  5. package/dist/agent.d.ts +1 -1
  6. package/dist/agent.js +3 -3
  7. package/dist/{coordination-manager-DKmQGzBB.js → coordination-manager-C5G6oB-x.js} +68 -38
  8. package/dist/coordination-manager-C5G6oB-x.js.map +1 -0
  9. package/dist/{delegate-CHGMIC6s.js → delegate-NEQtLI5w.js} +2 -2
  10. package/dist/{delegate-CHGMIC6s.js.map → delegate-NEQtLI5w.js.map} +1 -1
  11. package/dist/durable.d.ts +1 -1
  12. package/dist/durable.js +9 -9
  13. package/dist/{failure-cause-CVB-YE88.js → failure-cause-BE3qg7OI.js} +2 -2
  14. package/dist/failure-cause-BE3qg7OI.js.map +1 -0
  15. package/dist/{graph-BRlI0CEL.js → graph-pyV29Pei.js} +25 -28
  16. package/dist/graph-pyV29Pei.js.map +1 -0
  17. package/dist/{improve-CnTEGkF6.js → improve-98tlsS0O.js} +6 -6
  18. package/dist/{improve-CnTEGkF6.js.map → improve-98tlsS0O.js.map} +1 -1
  19. package/dist/index.d.ts +3 -3
  20. package/dist/index.js +10 -10
  21. package/dist/intelligence.d.ts +2 -2
  22. package/dist/intelligence.js +4 -4
  23. package/dist/kernel.d.ts +1 -1
  24. package/dist/kernel.js +13 -13
  25. package/dist/{loop-runner-DZeXWH78.d.ts → loop-runner-CCdQ1pmE.d.ts} +2 -2
  26. package/dist/loop-runner-bin.d.ts +1 -1
  27. package/dist/loop-runner-bin.js +1 -1
  28. package/dist/{loop-runner-CqPsP7uW.js → loop-runner-hZugKket.js} +2 -2
  29. package/dist/{loop-runner-CqPsP7uW.js.map → loop-runner-hZugKket.js.map} +1 -1
  30. package/dist/mcp/bin.js +3 -3
  31. package/dist/mcp/index.d.ts +1 -1
  32. package/dist/mcp/index.js +6 -6
  33. package/dist/mcp/memory-bin.js +1 -1
  34. package/dist/profiles.d.ts +1 -1
  35. package/dist/{provision-supervisor-B-ULubUf.js → provision-supervisor-BZzh3-qy.js} +5 -5
  36. package/dist/{provision-supervisor-B-ULubUf.js.map → provision-supervisor-BZzh3-qy.js.map} +1 -1
  37. package/dist/{run-cancellation-DZn4OSl8.js → run-cancellation-BfOYso1K.js} +2 -2
  38. package/dist/{run-cancellation-DZn4OSl8.js.map → run-cancellation-BfOYso1K.js.map} +1 -1
  39. package/dist/{run-state-nbF5NNGy.js → run-state-JBy64gPw.js} +5 -5
  40. package/dist/{run-state-nbF5NNGy.js.map → run-state-JBy64gPw.js.map} +1 -1
  41. package/dist/{runtime-9ZCcT0kP.js → runtime-ClVpsN9W.js} +13 -13
  42. package/dist/{runtime-9ZCcT0kP.js.map → runtime-ClVpsN9W.js.map} +1 -1
  43. package/dist/{search-executor-2xqDTDNO.js → search-executor-dpFpe2iW.js} +4 -4
  44. package/dist/{search-executor-2xqDTDNO.js.map → search-executor-dpFpe2iW.js.map} +1 -1
  45. package/dist/{server-D3RV-84X.js → server-Dj1OZSJE.js} +4 -4
  46. package/dist/{server-D3RV-84X.js.map → server-Dj1OZSJE.js.map} +1 -1
  47. package/dist/{settle-record-B95oiypS.js → settle-record-CMcLWmB8.js} +2 -2
  48. package/dist/{settle-record-B95oiypS.js.map → settle-record-CMcLWmB8.js.map} +1 -1
  49. package/dist/{structural-rollout-BHNqBUV0.js → structural-rollout-BAr-r83B.js} +4 -4
  50. package/dist/{structural-rollout-BHNqBUV0.js.map → structural-rollout-BAr-r83B.js.map} +1 -1
  51. package/dist/{supervise-CULDLjjS.js → supervise-BatPUJkn.js} +34 -10
  52. package/dist/supervise-BatPUJkn.js.map +1 -0
  53. package/dist/{supervision-discovery-DUpm_6nQ.js → supervision-discovery-Ch0ZtXCd.js} +3 -3
  54. package/dist/{supervision-discovery-DUpm_6nQ.js.map → supervision-discovery-Ch0ZtXCd.js.map} +1 -1
  55. package/dist/{supervisor-BhcXPxAk.js → supervisor-CDxtn00P.js} +80 -20
  56. package/dist/supervisor-CDxtn00P.js.map +1 -0
  57. package/dist/{supervisor-accounting-BB22j3hu.js → supervisor-accounting-DIEwaMfr.js} +65 -80
  58. package/dist/supervisor-accounting-DIEwaMfr.js.map +1 -0
  59. package/dist/testing.d.ts +1 -1
  60. package/dist/testing.js +11 -11
  61. package/dist/{tool-server-DYwRbi0I.js → tool-server-CnhRLpwg.js} +2 -2
  62. package/dist/{tool-server-DYwRbi0I.js.map → tool-server-CnhRLpwg.js.map} +1 -1
  63. package/dist/{top-web-DsFGyUlS.js → top-web-Cx4U6mkL.js} +6 -6
  64. package/dist/{top-web-DsFGyUlS.js.map → top-web-Cx4U6mkL.js.map} +1 -1
  65. package/dist/tui/bin.js +3 -3
  66. package/dist/tui/index.d.ts +1 -1
  67. package/dist/tui/index.js +2 -2
  68. package/dist/{types-CTp7j9jD.d.ts → types-KQkbyDmn.d.ts} +58 -6
  69. package/package.json +3 -3
  70. package/skills/profile-authoring/SKILL.md +57 -120
  71. package/skills/profile-authoring/references/acceptance-examples.md +15 -10
  72. package/skills/profile-authoring/references/execution-and-credentials.md +2 -7
  73. package/skills/profile-authoring/references/profile-contract.md +59 -0
  74. package/skills/profile-authoring/references/research-directors.md +1 -5
  75. package/dist/coordination-manager-DKmQGzBB.js.map +0 -1
  76. package/dist/failure-cause-CVB-YE88.js.map +0 -1
  77. package/dist/graph-BRlI0CEL.js.map +0 -1
  78. package/dist/supervise-CULDLjjS.js.map +0 -1
  79. package/dist/supervisor-BhcXPxAk.js.map +0 -1
  80. package/dist/supervisor-accounting-BB22j3hu.js.map +0 -1
@@ -0,0 +1,59 @@
1
+ # Profile contract
2
+
3
+ Discovery lost 20 driver attempts to unpublished tool names and 3 spawns to a missing subscription source.
4
+ In a Discovery play, start from `inputs/profile-examples/<family>.json`.
5
+
6
+ ## Fields
7
+
8
+ - Discovery triples: `opencode` + `zai-coding-plan` + `glm-5.3`; `claude-code` + `anthropic` + `claude-opus-5-5`; `codex` + `openai` + `gpt-6.1-sol`.
9
+ - A subscription-only run refuses a spawn with no `credentialSource` before spend.
10
+ - `prompt.systemPrompt` replaces the harness's own guidance (17,730 characters on Codex), and Discovery refuses one under 4,000 characters.
11
+ - A file by path: `{"path": "<mount>", "resource": {"kind": "inline", "name": "<name>", "path": "<file in your workspace>"}}`; Runtime reads the bytes (UTF-8, at most 4 MiB). A manager that retyped a file into `content` delivered 5 wrong characters in 24,008.
12
+ - A manager carries this skill as `"skills": [{"kind": "inline", "name": "profile-authoring", "path": "<SKILL.md in your workspace>"}]`.
13
+ - A mounted skill or listed tool proves only availability.
14
+
15
+ ## Native tool ids
16
+
17
+ From agent-container's `agent-profile-materialize` package (`control-maps` and `execution-controls`); matching ignores case and all but letters, digits and `_`.
18
+
19
+ | Harness | Accepted | Refused |
20
+ |---|---|---|
21
+ | opencode | read, write, edit, apply_patch (or patch), bash, glob, grep, webfetch, websearch, todowrite, skill, question, codesearch; the tool key `"task": true` turns native subagents on (`"task": false` turns them off) | list, ls, find, lsp, any other name |
22
+ | claude-code | Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, TodoWrite, NotebookEdit, Skill, AskUserQuestion; Agent, Task and TaskOutput when the profile wants native subagents | any other name, every `mcp__` name included |
23
+ | codex | `web_search` (true or false); `web_fetch` only as false | every other key, and any `permissions` entry |
24
+ | pi | names in Pi's own registry: read, bash, edit, write (glob becomes find, shell becomes bash); a named tool Pi lacks ends the session | names Pi lacks |
25
+ | any other | no `tools` and no `permissions` | every entry |
26
+
27
+ A harness's own subagent runs outside Runtime: no journal row, no reservation from the shared budget, no grade.
28
+ Turn native subagents on for internal throughput (split and merge, maker and critic, best of N) when separate Runtime identity, budget and grading are unnecessary; their work counts only through the delivered artifact.
29
+
30
+ ## Runtime keys
31
+
32
+ Sources: agent-runtime `src/runtime/supervise/provider-visible-profile.ts`; verbs from `coordinationVerbNames` in `src/mcp/tools/coordination-events.ts`; inheritance from `withInheritedSpawnRights` in `src/runtime/supervise/supervise.ts`.
33
+
34
+ - Runtime removes every key that starts with `agent_runtime_coordination_` before the harness sees the profile. Any other spelling reaches the harness and is refused: a bare `knowledge_record`, OpenCode's `agent-runtime-coordination_spawn_worker`, Claude Code's `mcp__agent-runtime-coordination__spawn_worker`, or `agent_runtime_spawn_worker`.
35
+ - Verbs: `spawn_worker`, `cancel_worker`, `observe_agent`, `steer_agent`, `read_journal`, `submit_result`, `report_blocked`, `ask_parent`, `list_questions`, `answer_question`, `read_continuation`, `stop`, `list_analysts`, `run_analyst`, `define_analyst`, `run_graph`.
36
+ - A run's tool provider adds product verbs under the same prefix; Discovery serves `knowledge_read`, `knowledge_search`, `knowledge_resolve` and `knowledge_record`. A declared verb no provider serves fails when the run resolves its tools.
37
+ - `await_event` no longer exists; a profile that grants it is refused.
38
+ - A child that names any coordination key gets exactly those keys; an inheriting child also gets `submit_result`, but cannot write Knowledge pages.
39
+
40
+ ## A leaf that starts on OpenCode
41
+
42
+ ```json
43
+ {"name": "csv-edge-case-tester", "description": "Finds RFC 4180 inputs that break csvstat.mjs",
44
+ "harness": "opencode",
45
+ "model": {"provider": "zai-coding-plan", "default": "glm-5.3", "reasoningEffort": "high", "metadata": {"credentialSource": "subscription"}},
46
+ "prompt": {"instructions": ["You are the CSV edge-case tester: you find inputs that break csvstat.mjs.", "Write each case under out/cases/, run it, and record failures at pages/csvstat-cli/work/tester/failures.md.", "Call submit_result with that page path, then end your turn."]},
47
+ "tools": {"read": true, "write": true, "edit": true, "bash": true, "glob": true, "grep": true, "task": false,
48
+ "agent_runtime_coordination_knowledge_read": true, "agent_runtime_coordination_knowledge_record": true,
49
+ "agent_runtime_coordination_submit_result": true, "agent_runtime_coordination_report_blocked": true},
50
+ "permissions": {"bash": "allow", "edit": "allow", "external_directory": "allow"},
51
+ "resources": {"failOnError": true}}
52
+ ```
53
+
54
+ ## Brief detail
55
+
56
+ - At `deadlineMs` the child is told to record its state and submit what it has; it is stopped only if it then makes no progress.
57
+ - A manager also gets a notice before its deadline. Polling or a shell timer is not re-entry and spends turns.
58
+ - A nested manager that returns early can end its scope and cancel live descendants.
59
+ - A failed child's recorded work may be usable; a spawn that returned a transport error may still have started a child.
@@ -88,7 +88,7 @@ Choose the existing Eval investigation engine and lower-level driver appropriate
88
88
 
89
89
  ## Check the profile before scaling
90
90
 
91
- Compare authored instructions, effective profile, materialized resources, and served tools for the root and a representative child. Retain component sizes and exact versions from existing profile/trace summaries. Identify measured versus estimated tokens and unavailable harness context. Confirm the child received the full authoring skill and this reference when it can create research directors.
91
+ Compare the effective profile, materialized resources and served tools for the root and a representative child. Retain component sizes and exact versions from existing profile/trace summaries. Identify measured versus estimated tokens and unavailable harness context. Confirm the child received the full authoring skill and this reference when it can create research directors.
92
92
 
93
93
  Inspect one real analysis result and the director's response during the first authorized research work. It must cite the evidence and either change the work or explain why the finding does not justify a change. Delivery of a finding alone proves neither consumption nor improvement. Preserve blocked capabilities in the run record and fix their owning package; the operator's manual critique must not be credited to the director.
94
94
 
@@ -99,7 +99,3 @@ The director maintains a concise research account in the existing knowledge/arti
99
99
  Read measured counters from the existing trace projection. For judgments such as instruction compliance, skill application, reward hacking, or wasted effort, name the analyst, rubric, cited examples, reviewed population, exclusions, and uncertainty. Use calibrated judgments for acceptance; leave unreviewed populations unassessed. Distinguish repeated attempts, continuations, and independent trials.
100
100
 
101
101
  For every consequential endogenous or operator change, preserve who acted, why, the triggering evidence, before/after identities, and the affected execution or fork through existing records. Link knowledge revisions and profile changes to those records; record external deployment changes separately from authored research changes. Keep original evidence immutable. A missing event requires a capture fix, not a reconstructed claim of complete provenance.
102
-
103
- ## Completion evidence
104
-
105
- A configured skill proves instructions were supplied. A captured tool call proves an action occurred. A reviewed artifact supports a claim. An improvement claim additionally requires the declared comparison. Report each level separately, with unknown outside acceptance unchanged.