@tangle-network/agent-runtime 0.181.0 → 0.183.0

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 (79) hide show
  1. package/dist/{activation-DQeqgV8K.js → activation-n31Hpe4r.js} +2 -2
  2. package/dist/{activation-DQeqgV8K.js.map → activation-n31Hpe4r.js.map} +1 -1
  3. package/dist/agent.d.ts +1 -1
  4. package/dist/agent.js +3 -3
  5. package/dist/{analyst-loop-35qyyDqP.js → analyst-loop-DCTra9Qy.js} +2 -2
  6. package/dist/{analyst-loop-35qyyDqP.js.map → analyst-loop-DCTra9Qy.js.map} +1 -1
  7. package/dist/analyst-loop.js +1 -1
  8. package/dist/{authoring-DN4xp35f.js → authoring-B05VmJoe.js} +4 -4
  9. package/dist/authoring-B05VmJoe.js.map +1 -0
  10. package/dist/{conversation-Dj-W5J1A.js → conversation-BSgEebIo.js} +2 -2
  11. package/dist/{conversation-Dj-W5J1A.js.map → conversation-BSgEebIo.js.map} +1 -1
  12. package/dist/conversation.js +1 -1
  13. package/dist/{coordination-driver-B_mNdx1I.js → coordination-driver-DwwFgEKZ.js} +19 -11
  14. package/dist/coordination-driver-DwwFgEKZ.js.map +1 -0
  15. package/dist/durable.d.ts +1 -1
  16. package/dist/durable.js +1 -1
  17. package/dist/{environment-provider-B6HqC4mh.js → environment-provider-C4elwcpo.js} +2 -2
  18. package/dist/{environment-provider-B6HqC4mh.js.map → environment-provider-C4elwcpo.js.map} +1 -1
  19. package/dist/environment-provider.js +1 -1
  20. package/dist/{graph-Ca4JV-Q6.js → graph-CJOhaZ35.js} +5 -5
  21. package/dist/graph-CJOhaZ35.js.map +1 -0
  22. package/dist/graph.d.ts +2 -2
  23. package/dist/graph.js +3 -3
  24. package/dist/{improvement-cycle-BEKM4E0T.js → improvement-cycle-xqQfqSpf.js} +5 -5
  25. package/dist/{improvement-cycle-BEKM4E0T.js.map → improvement-cycle-xqQfqSpf.js.map} +1 -1
  26. package/dist/{index-DhI31ODk.d.ts → index-BhtdFMnG.d.ts} +61 -19
  27. package/dist/{index-C137-hlN.d.ts → index-Dg2UXocB.d.ts} +3 -3
  28. package/dist/index.d.ts +5 -5
  29. package/dist/index.js +9 -9
  30. package/dist/intelligence.d.ts +2 -2
  31. package/dist/intelligence.js +4 -4
  32. package/dist/kernel.d.ts +3 -3
  33. package/dist/kernel.js +12 -12
  34. package/dist/{knowledge-DR0ap2Q9.js → knowledge-CRoESDWq.js} +3 -3
  35. package/dist/{knowledge-DR0ap2Q9.js.map → knowledge-CRoESDWq.js.map} +1 -1
  36. package/dist/knowledge.d.ts +1 -1
  37. package/dist/knowledge.js +1 -1
  38. package/dist/{loop-runner-bin-DcGlGmdV.js → loop-runner-bin-DBMN5QXW.js} +4 -4
  39. package/dist/{loop-runner-bin-DcGlGmdV.js.map → loop-runner-bin-DBMN5QXW.js.map} +1 -1
  40. package/dist/{loop-runner-bin-C7RGEVw0.d.ts → loop-runner-bin-NanoP_bG.d.ts} +2 -2
  41. package/dist/loop-runner-bin.d.ts +1 -1
  42. package/dist/loop-runner-bin.js +1 -1
  43. package/dist/mcp/bin.js +3 -3
  44. package/dist/mcp/index.d.ts +31 -4
  45. package/dist/mcp/index.js +52 -6
  46. package/dist/mcp/index.js.map +1 -1
  47. package/dist/{openai-tools-CalMJdQb.js → openai-tools-DcBRPkrK.js} +2 -2
  48. package/dist/{openai-tools-CalMJdQb.js.map → openai-tools-DcBRPkrK.js.map} +1 -1
  49. package/dist/primeintellect/index.d.ts +1 -1
  50. package/dist/{provision-supervisor-CZ-V1h03.js → provision-supervisor-BOy-x5Rn.js} +5 -5
  51. package/dist/{provision-supervisor-CZ-V1h03.js.map → provision-supervisor-BOy-x5Rn.js.map} +1 -1
  52. package/dist/{redact-pDUP8izr.d.ts → redact-BYcuQ6R_.d.ts} +2 -2
  53. package/dist/{runtime-DawGtqdw.d.ts → runtime-B-DLSfE5.d.ts} +54 -6
  54. package/dist/{runtime-B4sDmaCx.js → runtime-CDnK6T-T.js} +12 -12
  55. package/dist/{runtime-B4sDmaCx.js.map → runtime-CDnK6T-T.js.map} +1 -1
  56. package/dist/{sandbox-events-B2cWfjwu.js → sandbox-events-DGXLxiuX.js} +197 -8
  57. package/dist/sandbox-events-DGXLxiuX.js.map +1 -0
  58. package/dist/{stream-agent-turn-D-GzjvCl.js → stream-agent-turn-B5Cmq-u3.js} +47 -22
  59. package/dist/stream-agent-turn-B5Cmq-u3.js.map +1 -0
  60. package/dist/{structural-rollout-BKt0UfUL.js → structural-rollout-Cv_aUlFY.js} +3 -3
  61. package/dist/{structural-rollout-BKt0UfUL.js.map → structural-rollout-Cv_aUlFY.js.map} +1 -1
  62. package/dist/{supervise-DUS8td9n.js → supervise-OiFWCM75.js} +9 -9
  63. package/dist/supervise-OiFWCM75.js.map +1 -0
  64. package/dist/{supervisor-CC3qqrVo.js → supervisor-DyRbmn1C.js} +100 -68
  65. package/dist/supervisor-DyRbmn1C.js.map +1 -0
  66. package/dist/testing.d.ts +2 -2
  67. package/dist/testing.js +12 -12
  68. package/dist/tui/index.d.ts +1 -1
  69. package/dist/tui/index.js +1 -1
  70. package/package.json +1 -1
  71. package/skills/codemode/SKILL.md +1 -1
  72. package/skills/supervise/SKILL.md +2 -2
  73. package/dist/authoring-DN4xp35f.js.map +0 -1
  74. package/dist/coordination-driver-B_mNdx1I.js.map +0 -1
  75. package/dist/graph-Ca4JV-Q6.js.map +0 -1
  76. package/dist/sandbox-events-B2cWfjwu.js.map +0 -1
  77. package/dist/stream-agent-turn-D-GzjvCl.js.map +0 -1
  78. package/dist/supervise-DUS8td9n.js.map +0 -1
  79. package/dist/supervisor-CC3qqrVo.js.map +0 -1
@@ -4,7 +4,7 @@ import { t as detachedFrozen } from "./snapshot-CTAf4uuA.js";
4
4
  import { b as workerTraceAnalysisStore, i as InMemorySpawnJournal, n as FileSpawnJournal, r as InMemoryResultBlobStore, t as FileResultBlobStore, y as parseWorkerToolTraceArtifact } from "./spawn-journal--N8Ten1q.js";
5
5
  import { _ as unmeteredSpend, r as chargedTokens, u as promptCacheTokenClasses } from "./util-D6ZEuBMi.js";
6
6
  import { i as writeAllBytes, n as parseCommittedJsonLines, r as prepareJsonlAppend, t as isNoEntError } from "./jsonl-file-CDfsCI5s.js";
7
- import { Dt as createPeerMailbox, J as assertValidBudget, Kt as runBrainLoop, Mt as isTerminalNodeStatus, St as createInbox, U as freeSlots, c as pickBestDelivered, f as withDriverExecutor, g as meterRuntimeOwnedProviderAttempt, jt as isLiveNodeStatus, l as runFinalizer, o as bestDelivered, ot as createExecutorRegistry, u as runTree } from "./supervisor-CC3qqrVo.js";
7
+ import { Dt as createPeerMailbox, J as assertValidBudget, Kt as runBrainLoop, Mt as isTerminalNodeStatus, St as createInbox, U as freeSlots, c as pickBestDelivered, f as withDriverExecutor, g as meterRuntimeOwnedProviderAttempt, jt as isLiveNodeStatus, l as runFinalizer, o as bestDelivered, ot as createExecutorRegistry, u as runTree } from "./supervisor-DyRbmn1C.js";
8
8
  import { A as writeWorkerCancellation, M as writeWorkerSteerAcknowledgement, c as readWorkerCancelRequests, d as readWorkerSteerRequests, k as writeRunCancellation, l as readWorkerCancellation, o as readRunCancelRequest, r as claimWorkerSteerDelivery, s as readRunCancellation, u as readWorkerSteerAcknowledgement } from "./run-layout-Cd_l2XWV.js";
9
9
  import { agentProfileSchema, canonicalCandidateDigest } from "@tangle-network/agent-interface";
10
10
  import { argHash, errorStreakDetector, observeAll, repeatedActionDetector } from "@tangle-network/agent-eval";
@@ -183,9 +183,17 @@ const DEFAULT_AWAIT_EVENT_TIMEOUT_MS = 15e3;
183
183
  /** The reserved coordination verb names — the complete set `createCoordinationTools` can emit
184
184
  * (the analyst pair is conditional but still reserved). A driver's extra WORK tools must not
185
185
  * collide with any of these, or it could no longer coordinate; callers validate eagerly against
186
- * this set so the conflict fails loud at construction, not buried in a swallowed `act()` throw. */
186
+ * this set so the conflict fails loud at construction, not buried in a swallowed `act()` throw.
187
+ *
188
+ * Every name here must also stay clear of the tools a coding harness publishes NATIVELY
189
+ * (`harnessNativeToolNames`, `mcp/harness-native-tools`). A harness prefixes an MCP tool with its
190
+ * server name, so the two never collide on the wire — but a driver reads a BARE word out of a
191
+ * prompt, and a bare word that the harness also publishes resolves to the harness's own tool.
192
+ * The spawn verb is `spawn_worker` for that reason: the runtime's vocabulary for the spawned
193
+ * thing is a worker (`workerId`, `maxLiveWorkers`, the per-worker budget), and no known harness
194
+ * publishes that name. `tests/kernel/harness-native-tools.test.ts` holds the set clear. */
187
195
  const coordinationVerbNames = [
188
- "spawn_agent",
196
+ "spawn_worker",
189
197
  "observe_agent",
190
198
  "steer_agent",
191
199
  "await_event",
@@ -216,7 +224,7 @@ function isAwaitableEventKind(value) {
216
224
  }
217
225
  const idArg = {
218
226
  type: "string",
219
- description: "The workerId returned by spawn_agent."
227
+ description: "The workerId returned by spawn_worker."
220
228
  };
221
229
  /**
222
230
  * Strip zod's object-KEY CODEC artifact from a derived JSON Schema, at every depth.
@@ -327,7 +335,7 @@ const spawnProfileFields = [
327
335
  }
328
336
  ];
329
337
  /**
330
- * Build the published shape of `spawn_agent`'s `profile` argument from the canonical
338
+ * Build the published shape of `spawn_worker`'s `profile` argument from the canonical
331
339
  * `agentProfileSchema` conversion's `properties` map, so it cannot drift from the profile the
332
340
  * runtime materializes.
333
341
  *
@@ -1151,7 +1159,7 @@ function createCoordinationTools(opts) {
1151
1159
  };
1152
1160
  const tools = [
1153
1161
  {
1154
- name: "spawn_agent",
1162
+ name: "spawn_worker",
1155
1163
  description: "Start a worker the driver will drive. `profile` is the worker or another driver; `task` is what it should do. Reserves budget from the conserved pool and fails closed. Pass an optional `budget` (per-field) to give a hard sub-task more than the default — it merges over the per-worker default; the conserved pool is still the hard fence. When a max-live-workers cap is set it also fails closed (`error: \"max-live-workers\"`) while that many workers are still in flight — settle or steer one before spawning another. Pass a `key` naming the assignment to make it run-once ACROSS restarts: a key that already completed returns the finished result (`resumed: \"completed\"` — no work re-runs, nothing is spent), a key whose prior attempt failed or was lost with a dead process spawns fresh and says so (`resumed: \"retried\" | \"lost\"`), and a key still running is refused (`error: \"duplicate-key\"`). Returns `freeSlots`: how many MORE workers you can start right now (`null` = uncapped). While `freeSlots > 0` there is idle capacity — call this again to fill it rather than waiting; parallel workers finish the run sooner than one at a time.",
1156
1164
  inputSchema: {
1157
1165
  type: "object",
@@ -2296,7 +2304,7 @@ function progressStop(tracker, rule, ledger, scope, now, stallAfterMs) {
2296
2304
  * against the live scope, fold the results back, repeat until the driver stops (no tool
2297
2305
  * calls) or the turn cap forces a keep-best finalize.
2298
2306
  *
2299
- * Recursion composes through `makeWorkerAgent`: `spawn_agent` resolves a `profile` to a
2307
+ * Recursion composes through `makeWorkerAgent`: `spawn_worker` resolves a `profile` to a
2300
2308
  * worker LEAF or — when the profile is a driver — a `driverChild` wrapping ANOTHER
2301
2309
  * `driverAgent` over its own nested scope (see `driver-executor.ts`). So an agent
2302
2310
  * drives an agent that drives an agent, each an LLM tool-loop, all on one conserved-budget
@@ -2981,9 +2989,9 @@ function resumeBrief(resume, prior) {
2981
2989
  const completed = byState("completed");
2982
2990
  const lost = byState("in-doubt");
2983
2991
  const failed = byState("down");
2984
- if (completed.length > 0) lines.push("", "COMPLETED keys — spawn_agent with the same key returns the finished result, spending nothing:", ...completed.map(([k, v]) => `- ${k} → ${v.id} (${v.label})`));
2985
- if (lost.length > 0) lines.push("", "Keys LOST in flight with the prior process — this is the unresolved work; spawn_agent with the same key starts a fresh attempt:", ...lost.map(([k, v]) => `- ${k} (prior attempt ${v.id}, ${v.label})`));
2986
- if (failed.length > 0) lines.push("", "Keys whose prior attempt FAILED (settled down) — spawn_agent with the same key retries:", ...failed.map(([k, v]) => `- ${k} (prior attempt ${v.id}, ${v.label})`));
2992
+ if (completed.length > 0) lines.push("", "COMPLETED keys — spawn_worker with the same key returns the finished result, spending nothing:", ...completed.map(([k, v]) => `- ${k} → ${v.id} (${v.label})`));
2993
+ if (lost.length > 0) lines.push("", "Keys LOST in flight with the prior process — this is the unresolved work; spawn_worker with the same key starts a fresh attempt:", ...lost.map(([k, v]) => `- ${k} (prior attempt ${v.id}, ${v.label})`));
2994
+ if (failed.length > 0) lines.push("", "Keys whose prior attempt FAILED (settled down) — spawn_worker with the same key retries:", ...failed.map(([k, v]) => `- ${k} (prior attempt ${v.id}, ${v.label})`));
2987
2995
  if (resume.waits.length > 0) lines.push("", "Pending waits RE-ARMED on their original deadlines (they settle through await_event):", ...resume.waits.map((w) => `- ${w.label} (${w.spec.kind})`));
2988
2996
  appendPriorCoordination(lines, prior);
2989
2997
  const spent = resume.priorSpend;
@@ -3060,4 +3068,4 @@ function errMessage(e) {
3060
3068
  //#endregion
3061
3069
  export { coordinationVerbNames as C, createEventBus as D, questionEscalationTargets as E, defaultToolDetectors as O, canonicalFindingEvent as S, normalizeAnalyzeOnSettle as T, renderAnytimeTable as _, allOf as a, FileCoordinationLog as b, createProgressTracker as c, progressStop as d, sampleFromSettled as f, plateauLength as g, bestSoFar as h, finalizeBestDelivered as i, watchTrace as k, noProgressFor as l, areaUnderCurve as m, createSteerAcknowledger as n, allWorkersStalled as o, anytimeReport as p, driverAgent as r, anyOf as s, createCancelAcknowledger as t, plateau as u, createFileRunContext as v, createCoordinationTools as w, DEFAULT_AWAIT_EVENT_TIMEOUT_MS as x, createInMemoryRunContext as y };
3062
3070
 
3063
- //# sourceMappingURL=coordination-driver-B_mNdx1I.js.map
3071
+ //# sourceMappingURL=coordination-driver-DwwFgEKZ.js.map