@tangle-network/agent-runtime 0.77.0 → 0.79.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 (42) hide show
  1. package/dist/agent.d.ts +1 -1
  2. package/dist/agent.js +3 -3
  3. package/dist/analyst-loop.d.ts +1 -1
  4. package/dist/{chunk-O2UPHN7X.js → chunk-5JAUQZQA.js} +1 -1
  5. package/dist/chunk-5JAUQZQA.js.map +1 -0
  6. package/dist/{chunk-RQYPH2QE.js → chunk-EZ2QESTP.js} +871 -33
  7. package/dist/chunk-EZ2QESTP.js.map +1 -0
  8. package/dist/{chunk-LFL7K5FM.js → chunk-F6G3SSHY.js} +2 -2
  9. package/dist/{chunk-KKHMDE5I.js → chunk-GZX3PI7V.js} +3 -3
  10. package/dist/{chunk-JPURCA2O.js → chunk-LWGVVP2C.js} +2 -2
  11. package/dist/{chunk-CEW5BMGN.js → chunk-N2JJDGLJ.js} +2 -2
  12. package/dist/chunk-N2JJDGLJ.js.map +1 -0
  13. package/dist/{coordination-CZe4lTxy.d.ts → coordination-09JTQnlF.d.ts} +88 -25
  14. package/dist/index.d.ts +9 -9
  15. package/dist/index.js +6 -6
  16. package/dist/intelligence.d.ts +1 -1
  17. package/dist/lifecycle.d.ts +2 -2
  18. package/dist/lifecycle.js +2 -2
  19. package/dist/{local-harness-BE_h8szs.d.ts → local-harness-DU7yV6mG.d.ts} +1 -1
  20. package/dist/{loop-runner-bin-Dbtg787n.d.ts → loop-runner-bin-Ddgf4DkS.d.ts} +2 -2
  21. package/dist/loop-runner-bin.d.ts +5 -5
  22. package/dist/loop-runner-bin.js +4 -4
  23. package/dist/loops.d.ts +12 -11
  24. package/dist/loops.js +13 -3
  25. package/dist/mcp/bin.js +2 -2
  26. package/dist/mcp/bin.js.map +1 -1
  27. package/dist/mcp/index.d.ts +12 -12
  28. package/dist/mcp/index.js +4 -4
  29. package/dist/mcp/index.js.map +1 -1
  30. package/dist/{mcp-serve-verifier-CT1KLTG_.d.ts → mcp-serve-verifier-BvMAV_8U.d.ts} +1 -1
  31. package/dist/{openai-tools-D5tcirFF.d.ts → openai-tools-B-3v06BE.d.ts} +1 -1
  32. package/dist/profiles.d.ts +1 -1
  33. package/dist/{types-B-jWSfcu.d.ts → types-BF-MEsQB.d.ts} +21 -0
  34. package/dist/{worktree-CDxqwxGo.d.ts → worktree-CUn0d-ZT.d.ts} +2 -2
  35. package/dist/{worktree-fanout-CljF1L2v.d.ts → worktree-fanout-DwwatTdY.d.ts} +3 -3
  36. package/package.json +3 -7
  37. package/dist/chunk-CEW5BMGN.js.map +0 -1
  38. package/dist/chunk-O2UPHN7X.js.map +0 -1
  39. package/dist/chunk-RQYPH2QE.js.map +0 -1
  40. /package/dist/{chunk-LFL7K5FM.js.map → chunk-F6G3SSHY.js.map} +0 -0
  41. /package/dist/{chunk-KKHMDE5I.js.map → chunk-GZX3PI7V.js.map} +0 -0
  42. /package/dist/{chunk-JPURCA2O.js.map → chunk-LWGVVP2C.js.map} +0 -0
@@ -1251,6 +1251,27 @@ interface ExecCtx {
1251
1251
  hooks?: RuntimeHooks;
1252
1252
  /** Optional trace emitter. When set, the kernel emits `loop.*` events. */
1253
1253
  traceEmitter?: LoopTraceEmitter;
1254
+ /**
1255
+ * Optional per-event tee. When set, the kernel forwards EVERY raw event from
1256
+ * each iteration's `streamPrompt` stream as it arrives, so a host can stream
1257
+ * the agent's live output (tokens, tool calls) token-by-token. The observer
1258
+ * receives a defensive copy of each event — mutating it cannot affect the
1259
+ * run's own cost accounting or output parsing. Called synchronously in the hot
1260
+ * stream loop and never awaited, so a slow or never-settling observer cannot
1261
+ * stall the stream; keep it cheap. An async observer is fire-and-forget: its
1262
+ * promise is not awaited, so events carry no ordering or backpressure
1263
+ * guarantees (the next event may be observed before a prior async observer
1264
+ * settles) — use it for side-effect telemetry, not sequential processing.
1265
+ * Both a synchronous throw and a rejected returned promise are caught +
1266
+ * ignored so the observer can never break the run — but prefer not to depend
1267
+ * on that.
1268
+ *
1269
+ * @experimental
1270
+ */
1271
+ onSandboxEvent?: (event: SandboxEvent, meta: {
1272
+ iterationIndex: number;
1273
+ agentRunName: string;
1274
+ }) => void | PromiseLike<void>;
1254
1275
  /**
1255
1276
  * Optional production-run handle. When set, every synthesized `llm_call`
1256
1277
  * the kernel infers from a sandbox event stream is forwarded via
@@ -1,7 +1,7 @@
1
1
  import { 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-B-jWSfcu.js';
4
+ import { L as LoopTokenUsage, R as RuntimeHooks } from './types-BF-MEsQB.js';
5
5
 
6
6
  /**
7
7
  * @experimental
@@ -608,4 +608,4 @@ declare function captureWorktreeDiff(options: DiffOptions): Promise<DiffResult>;
608
608
  /** @experimental */
609
609
  declare function removeWorktree(options: RemoveWorktreeOptions): Promise<void>;
610
610
 
611
- export { type AgentSpec as A, type Budget as B, type CreateWorktreeOptions as C, type DiffOptions as D, type ExecutorRegistry as E, type GitRunner as G, type NodeId as N, type RemoveWorktreeOptions as R, type SpawnJournal as S, type TreeView as T, type UsageEvent as U, type WorktreeHandle as W, type DiffResult as a, createWorktree as b, captureWorktreeDiff as c, type Agent as d, type ResultBlobStore as e, type RootHandle as f, type SupervisedResult as g, type Settled as h, type Spend as i, type Scope as j, type Executor as k, type DeliverableSpec as l, type ExecutorFactory as m, type SpawnEvent as n, type Supervisor as o, type ExecutorContext as p, type ExecutorResult as q, removeWorktree as r, type SupervisorOpts as s, type WidenGate as t, gateOnDeliverable as u };
611
+ export { type AgentSpec as A, type Budget as B, type CreateWorktreeOptions as C, type DiffOptions as D, type ExecutorRegistry as E, type GitRunner as G, type NodeId as N, type RemoveWorktreeOptions as R, type SpawnJournal as S, type TreeView as T, type UsageEvent as U, type WorktreeHandle as W, type DiffResult as a, createWorktree as b, captureWorktreeDiff as c, type Agent as d, type ResultBlobStore as e, type RootHandle as f, type SupervisedResult as g, type Settled as h, type Spend as i, type Scope as j, type Executor as k, type DeliverableSpec as l, type Runtime as m, type ExecutorFactory as n, type SpawnEvent as o, type Supervisor as p, type ExecutorContext as q, removeWorktree as r, type ExecutorResult as s, type SupervisorOpts as t, type WidenGate as u, gateOnDeliverable as v };
@@ -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 { A as AgentSpec, E as ExecutorRegistry, B as Budget, d as Agent, S as SpawnJournal, e as ResultBlobStore, f as RootHandle, g as SupervisedResult, N as NodeId, h as Settled, i as Spend, j as Scope, G as GitRunner, k as Executor, l as DeliverableSpec } from './worktree-CDxqwxGo.js';
4
- import { R as RuntimeHooks, I as Iteration } from './types-B-jWSfcu.js';
3
+ import { A as AgentSpec, E as ExecutorRegistry, B as Budget, d as Agent, S as SpawnJournal, e as ResultBlobStore, f as RootHandle, g as SupervisedResult, N as NodeId, h as Settled, i as Spend, j as Scope, G as GitRunner, k as Executor, l as DeliverableSpec } from './worktree-CUn0d-ZT.js';
4
+ import { R as RuntimeHooks, I as Iteration } from './types-BF-MEsQB.js';
5
5
  import { BackendType } from '@tangle-network/sandbox';
6
- import { L as LocalHarness, r as runLocalHarness } from './local-harness-BE_h8szs.js';
6
+ import { L as LocalHarness, r as runLocalHarness } from './local-harness-DU7yV6mG.js';
7
7
 
8
8
  /**
9
9
  * @experimental
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-runtime",
3
- "version": "0.77.0",
3
+ "version": "0.79.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": {
@@ -90,7 +90,7 @@
90
90
  "devDependencies": {
91
91
  "@biomejs/biome": "^2.4.15",
92
92
  "@tangle-network/agent-eval": ">=0.100.0 <1.0.0",
93
- "@tangle-network/agent-interface": ">=0.10.0 <1.0.0",
93
+ "@tangle-network/agent-interface": ">=0.14.0 <1.0.0",
94
94
  "@tangle-network/sandbox": ">=0.8.0 <1.0.0",
95
95
  "@types/node": "^25.9.3",
96
96
  "playwright": "^1.61.0",
@@ -119,8 +119,7 @@
119
119
  "packageManager": "pnpm@10.28.0",
120
120
  "peerDependencies": {
121
121
  "@tangle-network/agent-eval": ">=0.97.0 <1.0.0",
122
- "@tangle-network/agent-interface": ">=0.10.0 <1.0.0",
123
- "@tangle-network/agent-knowledge": ">=1.7.0 <2.0.0",
122
+ "@tangle-network/agent-interface": ">=0.14.0 <1.0.0",
124
123
  "@tangle-network/sandbox": ">=0.8.0 <1.0.0",
125
124
  "playwright": "^1.40.0"
126
125
  },
@@ -128,9 +127,6 @@
128
127
  "@tangle-network/agent-interface": {
129
128
  "optional": true
130
129
  },
131
- "@tangle-network/agent-knowledge": {
132
- "optional": true
133
- },
134
130
  "@tangle-network/sandbox": {
135
131
  "optional": true
136
132
  },