@tangle-network/agent-runtime 0.318.0 → 0.319.3

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 (81) hide show
  1. package/dist/{activation-CRG-tjnR.js → activation-ClcJ6wO1.js} +3 -3
  2. package/dist/{activation-CRG-tjnR.js.map → activation-ClcJ6wO1.js.map} +1 -1
  3. package/dist/{activation-RExX9RDm.d.ts → activation-OColGsfd.d.ts} +2 -2
  4. package/dist/agent.d.ts +3 -3
  5. package/dist/agent.js +3 -3
  6. package/dist/{bundle-RgHpAFDY.js → bundle-Cw-QdGmH.js} +2 -2
  7. package/dist/{bundle-RgHpAFDY.js.map → bundle-Cw-QdGmH.js.map} +1 -1
  8. package/dist/candidate-execution/index.d.ts +40 -3
  9. package/dist/candidate-execution/index.js +86 -7
  10. package/dist/candidate-execution/index.js.map +1 -1
  11. package/dist/{coordination-driver-DK3pI_HB.js → coordination-driver-Culvomn2.js} +3 -3
  12. package/dist/{coordination-driver-DK3pI_HB.js.map → coordination-driver-Culvomn2.js.map} +1 -1
  13. package/dist/{delegate-Co9vJIgE.js → delegate-CpMbpiIR.js} +2 -2
  14. package/dist/{delegate-Co9vJIgE.js.map → delegate-CpMbpiIR.js.map} +1 -1
  15. package/dist/durable.d.ts +1 -1
  16. package/dist/durable.js +4 -4
  17. package/dist/{graph-DYBCYZjg.js → graph-DnfSGUM8.js} +5 -5
  18. package/dist/{graph-DYBCYZjg.js.map → graph-DnfSGUM8.js.map} +1 -1
  19. package/dist/graph-registry-BuJbzTzF.js +211 -0
  20. package/dist/graph-registry-BuJbzTzF.js.map +1 -0
  21. package/dist/{improvement-cycle-jp80l_ZQ.js → improvement-cycle-xnQwUaC3.js} +7 -7
  22. package/dist/{improvement-cycle-jp80l_ZQ.js.map → improvement-cycle-xnQwUaC3.js.map} +1 -1
  23. package/dist/{index-CHlWvoo5.d.ts → index-Da7w2H86.d.ts} +268 -82
  24. package/dist/index.d.ts +5 -5
  25. package/dist/index.js +10 -10
  26. package/dist/intelligence.d.ts +4 -4
  27. package/dist/intelligence.js +7 -7
  28. package/dist/kernel.d.ts +3 -2
  29. package/dist/kernel.js +12 -11
  30. package/dist/{loop-runner-bin-C-QaaVE2.d.ts → loop-runner-bin-CbBoLC9D.d.ts} +2 -2
  31. package/dist/{loop-runner-bin-C8jLr2gR.js → loop-runner-bin-uoeGHNZA.js} +3 -3
  32. package/dist/{loop-runner-bin-C8jLr2gR.js.map → loop-runner-bin-uoeGHNZA.js.map} +1 -1
  33. package/dist/loop-runner-bin.d.ts +1 -1
  34. package/dist/loop-runner-bin.js +1 -1
  35. package/dist/mcp/bin.js +3 -3
  36. package/dist/mcp/index.d.ts +2 -2
  37. package/dist/mcp/index.js +6 -6
  38. package/dist/{model-policy-B-rOb8Nj.js → model-policy-CNe257pB.js} +4 -4
  39. package/dist/{model-policy-B-rOb8Nj.js.map → model-policy-CNe257pB.js.map} +1 -1
  40. package/dist/{openai-tools-BuJB3JQH.d.ts → openai-tools-Cu9E1Bda.d.ts} +2 -2
  41. package/dist/placement.d.ts +1 -1
  42. package/dist/{prepare-CD9kR0gS.js → prepare-DjCLEN-q.js} +3 -3
  43. package/dist/prepare-DjCLEN-q.js.map +1 -0
  44. package/dist/{profile-CHXYmpGd.js → profile-DmVM4Gxb.js} +9 -2
  45. package/dist/profile-DmVM4Gxb.js.map +1 -0
  46. package/dist/{profile-materialization-Cca615eu.d.ts → profile-materialization-C5-t3HJ7.d.ts} +14 -3
  47. package/dist/profiles.d.ts +1 -1
  48. package/dist/profiles.js +1 -1
  49. package/dist/{protected-model-port-C9QtEf3y.d.ts → protected-model-port-CQg2gstJ.d.ts} +3 -3
  50. package/dist/{protected-model-port-B0pHd65J.js → protected-model-port-D1fcnYdj.js} +4 -4
  51. package/dist/{protected-model-port-B0pHd65J.js.map → protected-model-port-D1fcnYdj.js.map} +1 -1
  52. package/dist/{provision-supervisor-CunKnayY.js → provision-supervisor-DiZTjzdp.js} +5 -5
  53. package/dist/{provision-supervisor-CunKnayY.js.map → provision-supervisor-DiZTjzdp.js.map} +1 -1
  54. package/dist/{runtime-UG5tV_yf.js → runtime-6qzuLTJ7.js} +307 -13
  55. package/dist/runtime-6qzuLTJ7.js.map +1 -0
  56. package/dist/{search-executor-DMX6tCY4.js → search-executor-DlaLafvy.js} +4 -4
  57. package/dist/{search-executor-DMX6tCY4.js.map → search-executor-DlaLafvy.js.map} +1 -1
  58. package/dist/{server-fSBvPPLH.js → server-sLrmWqKw.js} +4 -4
  59. package/dist/{server-fSBvPPLH.js.map → server-sLrmWqKw.js.map} +1 -1
  60. package/dist/{supervise-C41ywfFd.js → supervise-D4CnC-cl.js} +5 -5
  61. package/dist/{supervise-C41ywfFd.js.map → supervise-D4CnC-cl.js.map} +1 -1
  62. package/dist/{supervisor-BXEL_Fxe.js → supervisor-Cqhu3xH-.js} +234 -35
  63. package/dist/supervisor-Cqhu3xH-.js.map +1 -0
  64. package/dist/testing.d.ts +1 -1
  65. package/dist/testing.js +14 -14
  66. package/dist/tui/index.d.ts +1 -1
  67. package/dist/tui/index.js +1 -1
  68. package/dist/workspace-store/index.d.ts +171 -3
  69. package/dist/workspace-store/index.js +529 -8
  70. package/dist/workspace-store/index.js.map +1 -1
  71. package/dist/{workspace-streams-DkijayqX.js → workspace-streams-DFAhW7hF.js} +300 -42
  72. package/dist/workspace-streams-DFAhW7hF.js.map +1 -0
  73. package/dist/{workspace-streams-CpSmt3zx.d.ts → workspace-streams-U6_UfOXu.d.ts} +10 -2
  74. package/package.json +13 -10
  75. package/skills/codemode/references/runtime-execution.md +10 -3
  76. package/skills/graph-designer/SKILL.md +57 -0
  77. package/dist/prepare-CD9kR0gS.js.map +0 -1
  78. package/dist/profile-CHXYmpGd.js.map +0 -1
  79. package/dist/runtime-UG5tV_yf.js.map +0 -1
  80. package/dist/supervisor-BXEL_Fxe.js.map +0 -1
  81. package/dist/workspace-streams-DkijayqX.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-runtime",
3
- "version": "0.318.0",
3
+ "version": "0.319.3",
4
4
  "description": "Shared task-lifecycle skeleton for agents: a recursive loop kernel for chat turns, one-shot tasks, and multi-attempt loops, with trace capture and eval-gated self-improvement. Domain behavior lives in adapters; scoring and ship-gates in @tangle-network/agent-eval.",
5
5
  "homepage": "https://github.com/tangle-network/agent-runtime#readme",
6
6
  "repository": {
@@ -113,10 +113,13 @@
113
113
  "@arethetypeswrong/cli": "0.18.5",
114
114
  "@biomejs/biome": "^2.5.11",
115
115
  "@modelcontextprotocol/sdk": "1.30.0",
116
- "@tangle-network/agent-eval": "0.211.3",
117
- "@tangle-network/agent-interface": "^3.1.1",
118
- "@tangle-network/agent-provider-tangle": "2.0.0",
119
- "@tangle-network/sandbox": "^0.60.0",
116
+ "@tangle-network/agent-eval": "0.213.0",
117
+ "@tangle-network/agent-interface": "5.2.0",
118
+ "@tangle-network/agent-provider-cli-bridge": "2.0.0",
119
+ "@tangle-network/agent-provider-daytona": "0.6.0",
120
+ "@tangle-network/agent-provider-e2b": "0.6.0",
121
+ "@tangle-network/agent-provider-tangle": "4.0.0",
122
+ "@tangle-network/sandbox": "0.60.49",
120
123
  "@types/node": "26.4.0",
121
124
  "@types/tar-stream": "3.1.4",
122
125
  "miniflare": "4.20260722.0",
@@ -137,15 +140,15 @@
137
140
  },
138
141
  "license": "MIT",
139
142
  "peerDependencies": {
140
- "@tangle-network/agent-eval": ">=0.209.1 <0.212.0",
141
- "@tangle-network/agent-interface": "^3.1.1",
143
+ "@tangle-network/agent-eval": ">=0.213.0 <0.214.0",
144
+ "@tangle-network/agent-interface": "^5.2.0",
142
145
  "@tangle-network/sandbox": ">=0.58.4 <0.61.0"
143
146
  },
144
147
  "dependencies": {
145
148
  "@earendil-works/pi-codemode": "1.0.4",
146
- "@tangle-network/agent-core": ">=0.10.3 <0.11.0",
147
- "@tangle-network/agent-knowledge": "^20.0.1",
148
- "@tangle-network/agent-profile-materialize": ">=0.21.0 <0.23.0",
149
+ "@tangle-network/agent-core": ">=0.12.0 <0.13.0",
150
+ "@tangle-network/agent-knowledge": "^22.0.1",
151
+ "@tangle-network/agent-profile-materialize": ">=0.25.2 <0.26.0",
149
152
  "@tangle-network/agent-trace-contract": "^2.0.0",
150
153
  "tar-stream": "3.2.1",
151
154
  "zod": "4.6.5"
@@ -16,9 +16,16 @@ This does not require the Pi coding harness.
16
16
  For ONE node of a graph — a code node beside ordinary agent nodes — declare it on the
17
17
  node's pinned profile instead of the environment: `model.metadata.codeMode = true` (or
18
18
  `{ concurrency, maxCalls, timeoutMs, memoryLimitBytes, directTools }`). The profile
19
- declaration overrides the backend default for that node alone, and every graph node is
20
- its pinned profile, so this is the whole authoring surface: no seam change, no new node
21
- kind. Validation is fail-loud (unknown or host-owned fields are refused before any request).
19
+ declaration enables code mode for that node; `false` opts that node out even when its
20
+ backend defaults to code mode. This changes presentation only: profile tool grants,
21
+ handler authorization, Runtime budgets and metering still apply. `true` and an empty
22
+ object inherit the host's settings.
23
+ For enabled nodes, each numeric setting is the smaller of the explicit host ceiling and
24
+ profile request. Omitted settings inherit; engine defaults apply only if neither supplies
25
+ one. Host and profile `directTools` are combined, so a profile cannot make a host's
26
+ direct-only capability callable from a program. Restored `store` always belongs to the
27
+ host and survives profile declarations. This keeps one authoring surface and no new node
28
+ kind. Unknown or host-owned profile fields are refused before any request.
22
29
 
23
30
  The implementation uses the standalone `@earendil-works/pi-codemode` QuickJS/WASM worker.
24
31
  There is no unsafe Node VM fallback. Code cannot read host files, processes or network
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: graph-designer
3
+ description: Design, replay, and improve agent graphs — an agent whose job is the graph, not the work.
4
+ ---
5
+
6
+ # Graph Designer
7
+
8
+ When an input arrives, your job is NOT to do the work. It is to pick or design the GRAPH
9
+ that does the work, run it under your granted permissions, and record what happened.
10
+ Every execution is fully traced like any graph run — the registry plus the run's journal
11
+ is the knowledge.
12
+
13
+ ## The loop (every input)
14
+
15
+ 1. Compute the task shape: the durable description you will look this kind of work up by
16
+ (kind, source, constraints — stable fields, not the payload itself). Hash it.
17
+ 2. `lookupGraph(registry, taskDigest)` over YOUR WORKSPACE's registry:
18
+ - **replay** → run the stored graph verbatim. Re-bind the deliverable's check from the
19
+ environment (oracles are never stored). Record the run. This path spends near-zero
20
+ inference: no re-authoring, no redesign — the graph IS the answer.
21
+ - **author** (with the stated reason) → design per the `agent-graphs` skill, run it,
22
+ record it. If a prior graph failed to deliver for this shape, mutate deliberately
23
+ (budget, directives as new prompt-registry versions, model mix, an added analyst),
24
+ never blindly: name what the prior record says went wrong.
25
+ 3. Record EVERY run: `recordGraphRun` with the terminal accounting. The registry is the
26
+ compounding asset — a run you don't record is knowledge you burn.
27
+
28
+ ## Where the registry lives
29
+
30
+ The registry is files in your workspace (`graph-registry/records.jsonl` + content-addressed
31
+ graphs). In a sandbox, snapshots carry it: a rerun over the same sandbox finds every graph
32
+ ever run. Do not store the deliverable's check function — the environment re-binds it.
33
+
34
+ ## Improving, honestly
35
+
36
+ Replay is the default; improvement is the exception with a reason. Read the prior records:
37
+ delivered-and-cheapest wins (`pickBestGraph`); a no-winner with budget exhaustion wants
38
+ budget or scope changes, not a new topology; repeated near-misses want a directive rewrite
39
+ (a new prompt-registry version — directives are data, old versions stay). Prefer mutating
40
+ one axis at a time so the next record attributes the difference. When an optimizer run
41
+ (agent-eval) is available, feed it the losing graph's journal; otherwise your reasoned
42
+ mutation IS the search step.
43
+
44
+ ## Profiles improve the same way graphs do
45
+
46
+ A worker profile is named and content-addressed; when a mutation rewrites a node's
47
+ prompt, record the run in the profile registry too (`recordProfileRun`) — same shape
48
+ as the graph registry, one level down. The winning revision per name is then an
49
+ answered question (`bestProfileFor`), not an argument: delivered beats failed, then
50
+ cheaper, then recent, and revisions never overwrite so old-vs-new is always a
51
+ controlled diff.
52
+
53
+ ## Then consider
54
+
55
+ - `agent-graphs` for the authoring contract (roles, edges, deliverable, budget).
56
+ - `codemode` when a node's work is mechanical composition — `model.metadata.codeMode`.
57
+ - The run's own ledger (`GraphResult.ledger`, the journal) as the evidence for every decision above.