@tangle-network/agent-runtime 0.103.1 → 0.104.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 (67) hide show
  1. package/README.md +4 -0
  2. package/dist/agent.d.ts +1 -1
  3. package/dist/agent.js +5 -5
  4. package/dist/analyst-loop.d.ts +1 -1
  5. package/dist/{chunk-TUSOOIDV.js → chunk-2QJSNOGK.js} +2 -2
  6. package/dist/{chunk-ZOYN3JR5.js → chunk-2UABGGUB.js} +3 -3
  7. package/dist/{chunk-6WZZXQV5.js → chunk-2X65HYMI.js} +1 -1
  8. package/dist/chunk-2X65HYMI.js.map +1 -0
  9. package/dist/{chunk-AAN2MB2X.js → chunk-3PPVCS75.js} +3 -3
  10. package/dist/chunk-3PPVCS75.js.map +1 -0
  11. package/dist/{chunk-EAQ5YRRY.js → chunk-5HNDYWUT.js} +39 -22
  12. package/dist/chunk-5HNDYWUT.js.map +1 -0
  13. package/dist/{chunk-3LJF5XSE.js → chunk-ATDFUJYI.js} +6 -6
  14. package/dist/chunk-ATDFUJYI.js.map +1 -0
  15. package/dist/{chunk-LFM4JBRW.js → chunk-FJI3EXU3.js} +46 -5
  16. package/dist/chunk-FJI3EXU3.js.map +1 -0
  17. package/dist/{chunk-5AITUUHO.js → chunk-HAO4CXHP.js} +2 -2
  18. package/dist/{chunk-M6MD6JBS.js → chunk-KRBFHMV6.js} +429 -1
  19. package/dist/chunk-KRBFHMV6.js.map +1 -0
  20. package/dist/{chunk-AYU35OTU.js → chunk-PZZKQVQV.js} +1 -1
  21. package/dist/chunk-PZZKQVQV.js.map +1 -0
  22. package/dist/{chunk-QYCKIV6C.js → chunk-STJEHM5F.js} +2 -2
  23. package/dist/{completion-gate-DLINnrkM.d.ts → completion-gate-Bv47cOnn.d.ts} +2 -2
  24. package/dist/{coordination-DTehA977.d.ts → coordination-CxtzMxSM.d.ts} +27 -27
  25. package/dist/environment-provider.d.ts +18 -7
  26. package/dist/environment-provider.js +3 -1
  27. package/dist/{improve-B40dRu0X.d.ts → improve--2A0gK1-.d.ts} +10 -4
  28. package/dist/index.d.ts +13 -13
  29. package/dist/index.js +10 -10
  30. package/dist/index.js.map +1 -1
  31. package/dist/intelligence.d.ts +46 -9
  32. package/dist/intelligence.js +117 -20
  33. package/dist/intelligence.js.map +1 -1
  34. package/dist/knowledge.d.ts +5 -5
  35. package/dist/knowledge.js +7 -7
  36. package/dist/{loop-runner-bin-DhIXsLAd.d.ts → loop-runner-bin-DUOGtvOl.d.ts} +3 -3
  37. package/dist/loop-runner-bin.d.ts +5 -5
  38. package/dist/loop-runner-bin.js +6 -6
  39. package/dist/loops.d.ts +66 -41
  40. package/dist/loops.js +9 -5
  41. package/dist/mcp/bin.js +4 -4
  42. package/dist/mcp/index.d.ts +6 -6
  43. package/dist/mcp/index.js +10 -10
  44. package/dist/mcp/index.js.map +1 -1
  45. package/dist/primeintellect/index.d.ts +1 -1
  46. package/dist/primeintellect/index.js.map +1 -1
  47. package/dist/profiles.d.ts +6 -6
  48. package/dist/profiles.js.map +1 -1
  49. package/dist/{structural-rollout-BFPIy3iw.d.ts → structural-rollout-C4mabf87.d.ts} +3 -3
  50. package/dist/{supervise-Cp8bNcJi.d.ts → supervise-7q9F5brx.d.ts} +3 -3
  51. package/dist/testing.js +8 -8
  52. package/dist/testing.js.map +1 -1
  53. package/dist/{types-DK11_O4L.d.ts → types-BCoemcXU.d.ts} +4 -4
  54. package/dist/{types-lZTE_LBd.d.ts → types-CvNwMzQt.d.ts} +4 -4
  55. package/dist/{worktree-fanout-DiiJWjJO.d.ts → worktree-fanout-WsOzt8qu.d.ts} +5 -5
  56. package/package.json +3 -3
  57. package/dist/chunk-3LJF5XSE.js.map +0 -1
  58. package/dist/chunk-6WZZXQV5.js.map +0 -1
  59. package/dist/chunk-AAN2MB2X.js.map +0 -1
  60. package/dist/chunk-AYU35OTU.js.map +0 -1
  61. package/dist/chunk-EAQ5YRRY.js.map +0 -1
  62. package/dist/chunk-LFM4JBRW.js.map +0 -1
  63. package/dist/chunk-M6MD6JBS.js.map +0 -1
  64. /package/dist/{chunk-TUSOOIDV.js.map → chunk-2QJSNOGK.js.map} +0 -0
  65. /package/dist/{chunk-ZOYN3JR5.js.map → chunk-2UABGGUB.js.map} +0 -0
  66. /package/dist/{chunk-5AITUUHO.js.map → chunk-HAO4CXHP.js.map} +0 -0
  67. /package/dist/{chunk-QYCKIV6C.js.map → chunk-STJEHM5F.js.map} +0 -0
@@ -443,7 +443,7 @@ interface Driver<Task, Output, Decision> {
443
443
  /**
444
444
  * Optional: the driver AUTHORS the winner instead of the kernel's argmax. The
445
445
  * kernel consults this at finalize ONLY when the caller did not pass an explicit
446
- * `selectWinner` to runLoop. Return the driver-declared winner (e.g. from a
446
+ * `selectWinner` to runAgentRounds. Return the driver-declared winner (e.g. from a
447
447
  * `select` topology move) or `undefined` to fall through to the default
448
448
  * (best-valid-score, earliest index). This is the SELECTOR role made
449
449
  * agent-authorable — the planner runs the selection, not the kernel.
@@ -522,7 +522,7 @@ interface SandboxClient {
522
522
  }>;
523
523
  }
524
524
  /**
525
- * Opt-in box-lineage controls for `runLoop`. Default OFF — with both flags
525
+ * Opt-in box-lineage controls for `runAgentRounds`. Default OFF — with both flags
526
526
  * unset the kernel's per-iteration behavior is byte-identical to acquiring a
527
527
  * fresh box, streaming once, and tearing it down. The independence of N fresh
528
528
  * boxes (e.g. `random@k`) is a compute-control invariant; these flags must
@@ -746,7 +746,7 @@ interface LoopTeardownFailedPayload {
746
746
  reason: string;
747
747
  }
748
748
  /**
749
- * Execution context for `runLoop`: the sandbox client the kernel creates boxes through, plus optional runtime hooks.
749
+ * Execution context for `runAgentRounds`: the sandbox client the kernel creates boxes through, plus optional runtime hooks.
750
750
  *
751
751
  * @experimental
752
752
  */
@@ -799,4 +799,4 @@ interface ExecCtx {
799
799
  parentSpanId?: string;
800
800
  }
801
801
 
802
- export { type AgentRunSpec as A, type LoopIterationEndedPayload as B, type LoopIterationStartedPayload as C, type Driver as D, type ExecCtx as E, type LoopPlanDescription as F, type LoopPlanPayload as G, type LoopStartedPayload as H, type Iteration as I, type LoopTeardownFailedPayload as J, type MountManifestEntry as K, type LoopTokenUsage as L, type MountRecorder as M, type RunProvenance as N, type OutputAdapter as O, type ValidationCtx as P, type RuntimeHooks as R, type SandboxClient as S, type Validator as V, type SelectionReceipt as a, type LoopSandboxPlacement as b, type LoopTraceEvent as c, type RuntimeDecisionEvidenceRef as d, type RuntimeDecisionKind as e, type RuntimeDecisionPoint as f, type RuntimeHookContext as g, type RuntimeHookErrorContext as h, type RuntimeHookEvent as i, type RuntimeHookPhase as j, type RuntimeHookTarget as k, type RuntimeRunHandle as l, type RuntimeRunPersistenceAdapter as m, type RuntimeRunRow as n, composeRuntimeHooks as o, defineRuntimeHooks as p, notifyRuntimeDecisionPoint as q, notifyRuntimeHookEvent as r, startRuntimeRun as s, type LoopTraceEmitter as t, type LoopWinner as u, type LoopLineageOptions as v, type LoopResult as w, type LoopDecisionPayload as x, type LoopEndedPayload as y, type LoopIterationDispatchPayload as z };
802
+ export { type AgentRunSpec as A, type LoopIterationEndedPayload as B, type LoopIterationStartedPayload as C, type Driver as D, type ExecCtx as E, type LoopPlanDescription as F, type LoopPlanPayload as G, type LoopStartedPayload as H, type Iteration as I, type LoopTeardownFailedPayload as J, type MountManifestEntry as K, type LoopTokenUsage as L, type MountRecorder as M, type RunProvenance as N, type OutputAdapter as O, type ValidationCtx as P, type RuntimeHooks as R, type SelectionReceipt as S, type Validator as V, type SandboxClient as a, type LoopSandboxPlacement as b, type LoopTraceEvent as c, type RuntimeDecisionEvidenceRef as d, type RuntimeDecisionKind as e, type RuntimeDecisionPoint as f, type RuntimeHookContext as g, type RuntimeHookErrorContext as h, type RuntimeHookEvent as i, type RuntimeHookPhase as j, type RuntimeHookTarget as k, type RuntimeRunHandle as l, type RuntimeRunPersistenceAdapter as m, type RuntimeRunRow as n, composeRuntimeHooks as o, defineRuntimeHooks as p, notifyRuntimeDecisionPoint as q, notifyRuntimeHookEvent as r, startRuntimeRun as s, type LoopTraceEmitter as t, type LoopWinner as u, type LoopLineageOptions as v, type LoopResult as w, type LoopDecisionPayload as x, type LoopEndedPayload as y, type LoopIterationDispatchPayload as z };
@@ -1,7 +1,7 @@
1
1
  import { ToolSpan, DefaultVerdict } from '@tangle-network/agent-eval';
2
2
  import { AgentProfile } from '@tangle-network/agent-interface';
3
3
  import { BackendType } from '@tangle-network/sandbox';
4
- import { L as LoopTokenUsage, R as RuntimeHooks } from './types-DK11_O4L.js';
4
+ import { L as LoopTokenUsage, R as RuntimeHooks } from './types-BCoemcXU.js';
5
5
 
6
6
  /**
7
7
  *
@@ -373,7 +373,7 @@ interface Agent<Task, Out> {
373
373
  * meters every runtime identically.
374
374
  *
375
375
  * Built-in implementations (in `runtime.ts`, NOT variants here): router/inline (a direct
376
- * Router/HTTP inference call, no box), sandbox (COMPOSES `runLoop` as a leaf, forwarding
376
+ * Router/HTTP inference call, no box), sandbox (COMPOSES `runAgentRounds` as a leaf, forwarding
377
377
  * PR #150's optional `lineage` passthrough — does NOT reinvent checkpoint/fork), cli
378
378
  * (Halo/RLM subprocess; `budgetExempt`, excluded from equal-k by construction). A user's
379
379
  * own agent (mastra/agno/raw HTTP/anything) is first-class by implementing this interface.
@@ -482,7 +482,7 @@ type Runtime = 'router' | 'inline' | 'sandbox' | 'cli' | (string & {});
482
482
  * Resolution (in `runtime.ts`):
483
483
  * - `executor` present → BYO: use it verbatim (a user's own `Executor`).
484
484
  * - `harness === null` → router/inline: a direct Router call, no box.
485
- * - `harness` is a `BackendType` → sandbox: compose `runLoop` against `profile` on that backend.
485
+ * - `harness` is a `BackendType` → sandbox: compose `runAgentRounds` against `profile` on that backend.
486
486
  * Fail loud on an unresolvable spec (no executor and an unknown harness).
487
487
  */
488
488
  interface AgentSpec {
@@ -888,7 +888,7 @@ interface SupervisorOpts {
888
888
  readonly now?: () => number;
889
889
  readonly signal?: AbortSignal;
890
890
  /** Lifecycle stream sink, threaded into the root `Scope` so every `spawn`/settle emits on the
891
- * same `agent.spawn`/`agent.child` stream `runLoop` feeds — one observable recursive tree. */
891
+ * same `agent.spawn`/`agent.child` stream `runAgentRounds` feeds — one observable recursive tree. */
892
892
  readonly hooks?: RuntimeHooks;
893
893
  }
894
894
  /** Typed terminal result (M2) — a no-winner is NEVER coerced to a best-effort output. */
@@ -1,9 +1,9 @@
1
1
  import { AgentProfile } from '@tangle-network/agent-interface';
2
2
  import { AnalystFinding, DefaultVerdict } from '@tangle-network/agent-eval';
3
- import { N as NodeId, a as Settled, g as Spend, h as AgentSpec, S as Scope, c as SpawnJournal, b as ResultBlobStore, i as ExecutorRegistry, B as Budget, A as Agent, j as RootHandle, e as SupervisedResult, f as Executor } from './types-lZTE_LBd.js';
4
- import { I as Iteration, R as RuntimeHooks } from './types-DK11_O4L.js';
3
+ import { N as NodeId, a as Settled, g as Spend, h as AgentSpec, S as Scope, c as SpawnJournal, b as ResultBlobStore, i as ExecutorRegistry, B as Budget, A as Agent, j as RootHandle, e as SupervisedResult, f as Executor } from './types-CvNwMzQt.js';
4
+ import { I as Iteration, R as RuntimeHooks } from './types-BCoemcXU.js';
5
5
  import { BackendType } from '@tangle-network/sandbox';
6
- import { W as WorktreeHarnessResult, G as GitRunner, a as WorktreeCheckRunner, D as DeliverableSpec } from './completion-gate-DLINnrkM.js';
6
+ import { W as WorktreeHarnessResult, G as GitRunner, a as WorktreeCheckRunner, D as DeliverableSpec } from './completion-gate-Bv47cOnn.js';
7
7
  import { L as LocalHarness, r as runLocalHarness } from './local-harness-CtK9dSny.js';
8
8
 
9
9
  /**
@@ -806,11 +806,11 @@ interface CoderCheckConstraints {
806
806
  * coding-harness CLI (claude / codex / opencode) on its OWN git worktree, surfaced as the open
807
807
  * `Executor<Out>` port (`./types`). It is a LEAF executor: it plugs straight into the
808
808
  * `Scope`/`Supervisor` recursion and `gateOnDeliverable`, so it IS the canonical recursive path
809
- * (no `runLoop`/virtual-SandboxInstance shim in between).
809
+ * (no `runAgentRounds`/virtual-SandboxInstance shim in between).
810
810
  *
811
811
  * This is a THIN adapter: the physical act (worktree → profile-aware harness invocation → diff →
812
812
  * checks → cleanup) lives ONCE in `runWorktreeHarness` (`../../mcp/worktree-harness`), shared with
813
- * the `runLoop`/coder-delegate `createInProcessExecutor`. This executor only projects that core's
813
+ * the `runAgentRounds`/coder-delegate `createInProcessExecutor`. This executor only projects that core's
814
814
  * result onto the `Executor` port (artifact + spend) and owns the teardown point. The complete
815
815
  * profile delivery — direct prompt/model plus materialized file-backed resources — lives there.
816
816
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-runtime",
3
- "version": "0.103.1",
3
+ "version": "0.104.0",
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": {
@@ -124,7 +124,7 @@
124
124
  "@biomejs/biome": "^2.4.15",
125
125
  "@tangle-network/agent-eval": "0.125.0",
126
126
  "@tangle-network/agent-interface": "0.32.0",
127
- "@tangle-network/sandbox": "^0.11.1",
127
+ "@tangle-network/sandbox": "^0.12.0",
128
128
  "@types/node": "^25.9.3",
129
129
  "@types/tar-stream": "3.1.4",
130
130
  "playwright": "^1.61.0",
@@ -156,7 +156,7 @@
156
156
  "peerDependencies": {
157
157
  "@tangle-network/agent-eval": ">=0.122.8 <0.126.0",
158
158
  "@tangle-network/agent-interface": ">=0.32.0 <0.33.0",
159
- "@tangle-network/sandbox": ">=0.11.1 <1.0.0",
159
+ "@tangle-network/sandbox": ">=0.12.0 <1.0.0",
160
160
  "playwright": "^1.40.0"
161
161
  },
162
162
  "peerDependenciesMeta": {