@tangle-network/agent-runtime 0.79.4 → 0.80.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 (35) hide show
  1. package/README.md +6 -0
  2. package/dist/agent.js +3 -3
  3. package/dist/{chunk-IPEQ3ERC.js → chunk-3X53HYRW.js} +2 -2
  4. package/dist/{chunk-IPEQ3ERC.js.map → chunk-3X53HYRW.js.map} +1 -1
  5. package/dist/{chunk-U6AP535M.js → chunk-DH72UOYR.js} +3 -3
  6. package/dist/{chunk-RUJZK6VH.js → chunk-LLJRUTE7.js} +2 -2
  7. package/dist/{chunk-NXZEVWKP.js → chunk-M3Y362RW.js} +2 -2
  8. package/dist/{chunk-AHZ3YBL6.js → chunk-QSO2TVDS.js} +146 -64
  9. package/dist/chunk-QSO2TVDS.js.map +1 -0
  10. package/dist/{chunk-44CX5JU6.js → chunk-TPII5AU7.js} +53 -5
  11. package/dist/chunk-TPII5AU7.js.map +1 -0
  12. package/dist/{coordination-BFVtgRax.d.ts → coordination-BI9tpcmF.d.ts} +12 -3
  13. package/dist/environment-provider.d.ts +1 -1
  14. package/dist/index.d.ts +4 -4
  15. package/dist/index.js +5 -5
  16. package/dist/intelligence.d.ts +1 -1
  17. package/dist/intelligence.js +1 -1
  18. package/dist/{loop-runner-bin-CTVja8e0.d.ts → loop-runner-bin-CBkLsyFg.d.ts} +2 -2
  19. package/dist/loop-runner-bin.d.ts +4 -4
  20. package/dist/loop-runner-bin.js +4 -4
  21. package/dist/loops.d.ts +32 -12
  22. package/dist/loops.js +5 -3
  23. package/dist/mcp/bin.js +3 -3
  24. package/dist/mcp/index.d.ts +6 -6
  25. package/dist/mcp/index.js +5 -5
  26. package/dist/{router-client-Ak2IGuXq.d.ts → router-client-D6Ocf4jG.d.ts} +19 -0
  27. package/dist/{types-DYW0tloU.d.ts → types-By9LXllv.d.ts} +7 -0
  28. package/dist/{worktree-fanout-DaUDwCA_.d.ts → worktree-fanout-D9Z2dMS9.d.ts} +2 -2
  29. package/dist/{worktree-harness-Dt6s_m3z.d.ts → worktree-harness-Dx8XULW3.d.ts} +1 -1
  30. package/package.json +1 -1
  31. package/dist/chunk-44CX5JU6.js.map +0 -1
  32. package/dist/chunk-AHZ3YBL6.js.map +0 -1
  33. /package/dist/{chunk-U6AP535M.js.map → chunk-DH72UOYR.js.map} +0 -0
  34. /package/dist/{chunk-RUJZK6VH.js.map → chunk-LLJRUTE7.js.map} +0 -0
  35. /package/dist/{chunk-NXZEVWKP.js.map → chunk-M3Y362RW.js.map} +0 -0
@@ -1,12 +1,12 @@
1
- import { E as ExecutorFactory, b as ExecutorRegistry, h as Spend, c as Agent, i as Scope, d as ResultBlobStore, B as Budget } from './types-DYW0tloU.js';
1
+ import { E as ExecutorFactory, b as ExecutorRegistry, h as Spend, c as Agent, i as Scope, d as ResultBlobStore, B as Budget } from './types-By9LXllv.js';
2
2
  import { AgentProfile } from '@tangle-network/agent-interface';
3
3
  import { U as UiLens, a as UiFinding, C as CoderTask } from './substrate-rNj6TDc3.js';
4
4
  import { e as LoopTraceEmitter, c as LoopTraceEvent, S as SandboxClient, A as AgentRunSpec, E as ExecCtx } from './types-BF-MEsQB.js';
5
5
  import { SandboxEvent, SandboxInstance, BackendType } from '@tangle-network/sandbox';
6
6
  import { AgentEvalError } from '@tangle-network/agent-eval';
7
7
  import { O as OtelExporter } from './otel-export-BKmNwiCb.js';
8
- import { T as ToolSpec, R as RouterConfig } from './router-client-Ak2IGuXq.js';
9
- import { G as GitRunner, a as WorktreeCheckRunner, D as DeliverableSpec } from './worktree-harness-Dt6s_m3z.js';
8
+ import { T as ToolSpec, R as RouterConfig } from './router-client-D6Ocf4jG.js';
9
+ import { G as GitRunner, a as WorktreeCheckRunner, D as DeliverableSpec } from './worktree-harness-Dx8XULW3.js';
10
10
  import { L as LocalHarness } from './local-harness-DU7yV6mG.js';
11
11
  import { ProviderExecutorOptions, AgentEnvironmentProviderRegistry } from './environment-provider.js';
12
12
  import { AgentEnvironmentProvider } from '@tangle-network/agent-interface/environment-provider';
@@ -2092,6 +2092,15 @@ interface CoordinationTools {
2092
2092
  * (mid-run, on the worker pipe) uses to tell the driver "this worker is looping/erroring" the
2093
2093
  * moment it happens, instead of only at settle. Queued for `await_event` + pass-through. */
2094
2094
  raiseFinding(finding: AnalystFindingEvent): Promise<void>;
2095
+ /**
2096
+ * Post-loop drain: pull every ALREADY-settled, unpulled child into the ledger (publishing each
2097
+ * as a `settled` bus event for the audit trail) WITHOUT awaiting live children. The driver
2098
+ * calls this once its brain loop ends, so a delivered child the brain never awaited still
2099
+ * reaches `finalizeBestDelivered` — a gate-verified delivery must never be lost to the
2100
+ * driver's pull discipline. Analyst-on-settle hooks do NOT fire here (the driver has stopped;
2101
+ * nobody is left to read a finding, and analysts spend real compute). Returns the count.
2102
+ */
2103
+ drainResolved(): Promise<number>;
2095
2104
  }
2096
2105
  /** Build the driver's MCP tools over a live scope. */
2097
2106
  declare function createCoordinationTools(opts: CoordinationToolsOptions): CoordinationTools;
@@ -2,7 +2,7 @@ import { AgentProfile, AgentProfileValidationResult } from '@tangle-network/agen
2
2
  import { AgentEnvironmentProvider, AgentEnvironmentCapabilities, CreateAgentEnvironmentInput, AgentTurnInput, AgentProfileRef } from '@tangle-network/agent-interface/environment-provider';
3
3
  export { AgentEnvironment, AgentEnvironmentCapabilities, AgentEnvironmentEvent, AgentEnvironmentProvider, AgentEnvironmentQuery, AgentEnvironmentStatus, AgentEnvironmentSummary, AgentProfileRef, AgentSession, AgentSessionRef, AgentSessionStatus, AgentTurnInput, AgentTurnResult, CheckpointRef, CheckpointRequest, CreateAgentEnvironmentInput, ExecRequest, ExecResult, ForkRequest, PlacementInfo, ResourceRequest, WorkspaceRequest } from '@tangle-network/agent-interface/environment-provider';
4
4
  import { CreateSandboxOptions, BackendType } from '@tangle-network/sandbox';
5
- import { R as Runtime, E as ExecutorFactory } from './types-DYW0tloU.js';
5
+ import { R as Runtime, E as ExecutorFactory } from './types-By9LXllv.js';
6
6
  import { S as SandboxClient } from './types-BF-MEsQB.js';
7
7
  import '@tangle-network/agent-eval';
8
8
 
package/dist/index.d.ts CHANGED
@@ -9,16 +9,16 @@ import { Scenario as Scenario$1, SurfaceProposer, JudgeConfig, MutableSurface, D
9
9
  import { AgentProfile as AgentProfile$1 } from '@tangle-network/agent-interface';
10
10
  import { S as SurfaceImprovementEdit } from './improvement-adapter-CioiEE2z.js';
11
11
  import { I as ImprovementAdapter } from './types-BC3bZpH0.js';
12
- export { D as DELEGATED_LOOP_MODES, a as DelegatedLoopMode, b as DelegatedLoopRegistry, c as DelegatedLoopResult, d as DelegatedLoopRunner, L as LoopRunnerCliArgs, e as LoopRunnerCliResult, R as ResearchLoopResult, f as ResearchLoopRunnerOptions, g as RunDelegatedLoopOptions, V as VetoedFact, W as WorktreeLoopRunnerOptions, h as auditLoopRunner, i as isDelegatedLoopMode, p as parseLoopRunnerArgv, r as researchLoopRunner, j as runDelegatedLoop, k as runLoopRunnerCli, s as selfImproveLoopRunner, w as worktreeLoopRunner } from './loop-runner-bin-CTVja8e0.js';
12
+ export { D as DELEGATED_LOOP_MODES, a as DelegatedLoopMode, b as DelegatedLoopRegistry, c as DelegatedLoopResult, d as DelegatedLoopRunner, L as LoopRunnerCliArgs, e as LoopRunnerCliResult, R as ResearchLoopResult, f as ResearchLoopRunnerOptions, g as RunDelegatedLoopOptions, V as VetoedFact, W as WorktreeLoopRunnerOptions, h as auditLoopRunner, i as isDelegatedLoopMode, p as parseLoopRunnerArgv, r as researchLoopRunner, j as runDelegatedLoop, k as runLoopRunnerCli, s as selfImproveLoopRunner, w as worktreeLoopRunner } from './loop-runner-bin-CBkLsyFg.js';
13
13
  export { m as mcpToolsForRuntimeMcp, a as mcpToolsForRuntimeMcpSubset } from './openai-tools-B-3v06BE.js';
14
14
  export { E as EvalRunEvent, a as EvalRunGeneration, b as EvalRunsExportConfig, c as EvalRunsExportResult, I as INTELLIGENCE_WIRE_VERSION, L as LoopSpanNode, d as OtelAttribute, e as OtelExportConfig, O as OtelExporter, f as OtelSpan, g as buildLoopOtelSpans, h as buildLoopSpanNodes, i as createOtelExporter, j as exportEvalRuns, l as loopEventToOtelSpan } from './otel-export-BKmNwiCb.js';
15
15
  import '@tangle-network/sandbox';
16
16
  import './local-harness-DU7yV6mG.js';
17
17
  import 'node:child_process';
18
18
  import './kb-gate-CuzMYGYM.js';
19
- import './types-DYW0tloU.js';
20
- import './worktree-fanout-DaUDwCA_.js';
21
- import './worktree-harness-Dt6s_m3z.js';
19
+ import './types-By9LXllv.js';
20
+ import './worktree-fanout-D9Z2dMS9.js';
21
+ import './worktree-harness-Dx8XULW3.js';
22
22
 
23
23
  /**
24
24
  * @stable
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  mcpToolsForRuntimeMcp,
3
3
  mcpToolsForRuntimeMcpSubset
4
- } from "./chunk-RUJZK6VH.js";
4
+ } from "./chunk-LLJRUTE7.js";
5
5
  import {
6
6
  DEFAULT_ROUTER_BASE_URL,
7
7
  cleanModelId,
@@ -20,16 +20,16 @@ import {
20
20
  runLoopRunnerCli,
21
21
  selfImproveLoopRunner,
22
22
  worktreeLoopRunner
23
- } from "./chunk-U6AP535M.js";
23
+ } from "./chunk-DH72UOYR.js";
24
24
  import "./chunk-FNMGYYSS.js";
25
- import "./chunk-AHZ3YBL6.js";
25
+ import "./chunk-QSO2TVDS.js";
26
26
  import {
27
27
  assertModelAllowed,
28
28
  composeRuntimeHooks,
29
29
  defineRuntimeHooks,
30
30
  notifyRuntimeDecisionPoint,
31
31
  notifyRuntimeHookEvent
32
- } from "./chunk-44CX5JU6.js";
32
+ } from "./chunk-TPII5AU7.js";
33
33
  import {
34
34
  INTELLIGENCE_WIRE_VERSION,
35
35
  buildLoopOtelSpans,
@@ -37,7 +37,7 @@ import {
37
37
  createOtelExporter,
38
38
  exportEvalRuns,
39
39
  loopEventToOtelSpan
40
- } from "./chunk-IPEQ3ERC.js";
40
+ } from "./chunk-3X53HYRW.js";
41
41
  import "./chunk-H7IBHAFT.js";
42
42
  import "./chunk-C2FZ6GR6.js";
43
43
  import "./chunk-4J6RBI3K.js";
@@ -1,6 +1,6 @@
1
1
  import { c as LoopTraceEvent } from './types-BF-MEsQB.js';
2
2
  import { AgentProfileMcpServer } from '@tangle-network/agent-interface';
3
- import { T as ToolSpec } from './router-client-Ak2IGuXq.js';
3
+ import { T as ToolSpec } from './router-client-D6Ocf4jG.js';
4
4
  import '@tangle-network/agent-eval';
5
5
  import '@tangle-network/sandbox';
6
6
 
@@ -2,7 +2,7 @@ import {
2
2
  buildLoopOtelSpans,
3
3
  createOtelExporter,
4
4
  flatOtelSpan
5
- } from "./chunk-IPEQ3ERC.js";
5
+ } from "./chunk-3X53HYRW.js";
6
6
  import "./chunk-DGUM43GV.js";
7
7
 
8
8
  // src/intelligence/effort.ts
@@ -2,8 +2,8 @@ import { Scenario } from '@tangle-network/agent-eval/campaign';
2
2
  import { SelfImproveOptions, SelfImproveResult } from '@tangle-network/agent-eval/contract';
3
3
  import { R as RunAnalystLoopOpts, a as RunAnalystLoopResult } from './types-BC3bZpH0.js';
4
4
  import { F as FactCandidate, C as CreateKbGateOptions } from './kb-gate-CuzMYGYM.js';
5
- import { B as Budget } from './types-DYW0tloU.js';
6
- import { A as AuthoredHarness, W as WinnerStrategy, a as WorktreeFanoutOptions, b as WorktreePatchArtifact } from './worktree-fanout-DaUDwCA_.js';
5
+ import { B as Budget } from './types-By9LXllv.js';
6
+ import { A as AuthoredHarness, W as WinnerStrategy, a as WorktreeFanoutOptions, b as WorktreePatchArtifact } from './worktree-fanout-D9Z2dMS9.js';
7
7
 
8
8
  /**
9
9
  * @experimental
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
- export { L as LoopRunnerCliArgs, e as LoopRunnerCliResult, p as parseLoopRunnerArgv, k as runLoopRunnerCli } from './loop-runner-bin-CTVja8e0.js';
2
+ export { L as LoopRunnerCliArgs, e as LoopRunnerCliResult, p as parseLoopRunnerArgv, k as runLoopRunnerCli } from './loop-runner-bin-CBkLsyFg.js';
3
3
  import '@tangle-network/agent-eval/campaign';
4
4
  import '@tangle-network/agent-eval/contract';
5
5
  import './types-BC3bZpH0.js';
6
6
  import '@tangle-network/agent-eval';
7
7
  import './kb-gate-CuzMYGYM.js';
8
- import './types-DYW0tloU.js';
8
+ import './types-By9LXllv.js';
9
9
  import '@tangle-network/agent-interface';
10
10
  import '@tangle-network/sandbox';
11
11
  import './types-BF-MEsQB.js';
12
- import './worktree-fanout-DaUDwCA_.js';
13
- import './worktree-harness-Dt6s_m3z.js';
12
+ import './worktree-fanout-D9Z2dMS9.js';
13
+ import './worktree-harness-Dx8XULW3.js';
14
14
  import './local-harness-DU7yV6mG.js';
15
15
  import 'node:child_process';
@@ -2,11 +2,11 @@
2
2
  import {
3
3
  parseLoopRunnerArgv,
4
4
  runLoopRunnerCli
5
- } from "./chunk-U6AP535M.js";
5
+ } from "./chunk-DH72UOYR.js";
6
6
  import "./chunk-FNMGYYSS.js";
7
- import "./chunk-AHZ3YBL6.js";
8
- import "./chunk-44CX5JU6.js";
9
- import "./chunk-IPEQ3ERC.js";
7
+ import "./chunk-QSO2TVDS.js";
8
+ import "./chunk-TPII5AU7.js";
9
+ import "./chunk-3X53HYRW.js";
10
10
  import "./chunk-H7IBHAFT.js";
11
11
  import "./chunk-C2FZ6GR6.js";
12
12
  import "./chunk-4J6RBI3K.js";
package/dist/loops.d.ts CHANGED
@@ -2,22 +2,22 @@ import { ChatClient, RunRecord, AnalystFinding, AgentProfile, AnalystRunInputs,
2
2
  export { AnalystFinding, DefaultVerdict, computeFindingId, makeFinding } from '@tangle-network/agent-eval';
3
3
  import { SandboxEvent, SandboxInstance, CreateSandboxOptions } from '@tangle-network/sandbox';
4
4
  export { AgentProfile, CreateSandboxOptions, SandboxEvent, SandboxInstance } from '@tangle-network/sandbox';
5
- import { d as ResultBlobStore, S as SpawnJournal, N as NodeId, j as SpawnEvent, E as ExecutorFactory, c as Agent, B as Budget, i as Scope, g as Settled, f as SupervisedResult, h as Spend, U as UsageEvent, b as ExecutorRegistry, k as Supervisor } from './types-DYW0tloU.js';
6
- export { A as AgentSpec, a as Executor, l as ExecutorContext, m as ExecutorResult, R as Runtime, n as SupervisorOpts, T as TreeView, W as WidenGate } from './types-DYW0tloU.js';
7
- import { ak as MakeWorkerAgent, A as AnalystRegistry, o as CoordinationTools, n as CoordinationEvent, ar as QuestionPolicy, a$ as ExecutorConfig } from './coordination-BFVtgRax.js';
8
- export { b0 as BusEvent, b1 as BusRecord, b2 as BusStats, b3 as EventBus, b4 as ProviderSeam, b5 as PublishOptions, b6 as cliWorktreeExecutor, b7 as createEventBus, b8 as createExecutor, b9 as createExecutorRegistry } from './coordination-BFVtgRax.js';
9
- import { R as RuntimeHooks, I as Iteration, S as SandboxClient, W as Driver, A as AgentRunSpec, b as OutputAdapter, V as Validator, E as ExecCtx, X as LoopWinner, Y as LoopLineageOptions, Z as LoopResult, L as LoopTokenUsage, a as RuntimeStreamEvent, _ as MountRecorder } from './types-BF-MEsQB.js';
5
+ import { d as ResultBlobStore, S as SpawnJournal, N as NodeId, j as SpawnEvent, E as ExecutorFactory, c as Agent, B as Budget, i as Scope, g as Settled, f as SupervisedResult, h as Spend, U as UsageEvent, b as ExecutorRegistry, k as Supervisor } from './types-By9LXllv.js';
6
+ export { A as AgentSpec, a as Executor, l as ExecutorContext, m as ExecutorResult, R as Runtime, n as SupervisorOpts, T as TreeView, W as WidenGate } from './types-By9LXllv.js';
7
+ import { ak as MakeWorkerAgent, A as AnalystRegistry, o as CoordinationTools, n as CoordinationEvent, ar as QuestionPolicy, a$ as ExecutorConfig } from './coordination-BI9tpcmF.js';
8
+ export { b0 as BusEvent, b1 as BusRecord, b2 as BusStats, b3 as EventBus, b4 as ProviderSeam, b5 as PublishOptions, b6 as cliWorktreeExecutor, b7 as createEventBus, b8 as createExecutor, b9 as createExecutorRegistry } from './coordination-BI9tpcmF.js';
9
+ import { R as RuntimeHooks, S as SandboxClient, I as Iteration, W as Driver, A as AgentRunSpec, b as OutputAdapter, V as Validator, E as ExecCtx, X as LoopWinner, Y as LoopLineageOptions, Z as LoopResult, L as LoopTokenUsage, a as RuntimeStreamEvent, _ as MountRecorder } from './types-BF-MEsQB.js';
10
10
  export { $ as LoopDecisionPayload, a0 as LoopEndedPayload, a1 as LoopIterationDispatchPayload, a2 as LoopIterationEndedPayload, a3 as LoopIterationStartedPayload, a4 as LoopPlanDescription, a5 as LoopPlanPayload, d as LoopSandboxPlacement, a6 as LoopStartedPayload, a7 as LoopTeardownFailedPayload, e as LoopTraceEmitter, c as LoopTraceEvent, a8 as MountManifestEntry, a9 as RunProvenance, aa as SelectionReceipt, ab as ValidationCtx } from './types-BF-MEsQB.js';
11
11
  export { AgentEnvironmentProviderRef, AgentEnvironmentProviderRegistry, ProviderAsSandboxClientOptions, ProviderExecutorOptions, SandboxClientProviderOptions, createAgentEnvironmentProviderRegistry, providerAsExecutor, providerAsSandboxClient, resolveAgentEnvironmentProvider, sandboxClientAsProvider } from './environment-provider.js';
12
- import { C as CorpusRecord, c as Corpus, O as Outcome, S as ScopeAnalyzeInput, d as AssertTraceDerivedFindings, e as SteerContext, f as ScopeAnalyst, F as FanoutOptions, g as CombinatorShape, h as ScopeWidenGate, L as LoopUntilSpec, P as PanelSpec, i as PipelineStage, W as WinnerStrategy, j as FanoutWinnerSelector, V as VerifySpec, k as WidenSpec, l as CorpusFilter, R as RenderCorpusToInstructionsOptions, D as DefinePersonaInput, m as Persona, n as RunPersonifiedOptions, o as ShapeRegistry, p as LoopShape, E as EqualKArm, q as EqualKOnCostOptions, r as EqualKVerdict, T as TrajectoryReportOptions, s as TrajectoryReport } from './worktree-fanout-DaUDwCA_.js';
13
- export { A as AuthoredHarness, t as DefinePersona, u as EqualKOnCost, v as Fanout, w as FanoutSynthesis, x as FlatWidenGate, y as LoopUntil, z as LoopUntilState, B as Panel, G as PanelJudge, H as PanelVerdict, I as PatchDeliverableOptions, J as PersonaContext, K as PersonaExecutors, M as Pipeline, N as RenderCorpusToInstructions, Q as RunPersonified, U as ShapeBudget, X as ShapeContext, Y as TrajectoryNode, Z as TrajectoryReportFn, _ as Verify, $ as Widen, a0 as WidenDecision, a1 as WidenLineage, a2 as WorktreeCliExecutorOptions, a as WorktreeFanoutOptions, b as WorktreePatchArtifact, a3 as createWorktreeCliExecutor, a4 as patchDelivered, a5 as worktreeFanout } from './worktree-fanout-DaUDwCA_.js';
12
+ import { C as CorpusRecord, c as Corpus, O as Outcome, S as ScopeAnalyzeInput, d as AssertTraceDerivedFindings, e as SteerContext, f as ScopeAnalyst, F as FanoutOptions, g as CombinatorShape, h as ScopeWidenGate, L as LoopUntilSpec, P as PanelSpec, i as PipelineStage, W as WinnerStrategy, j as FanoutWinnerSelector, V as VerifySpec, k as WidenSpec, l as CorpusFilter, R as RenderCorpusToInstructionsOptions, D as DefinePersonaInput, m as Persona, n as RunPersonifiedOptions, o as ShapeRegistry, p as LoopShape, E as EqualKArm, q as EqualKOnCostOptions, r as EqualKVerdict, T as TrajectoryReportOptions, s as TrajectoryReport } from './worktree-fanout-D9Z2dMS9.js';
13
+ export { A as AuthoredHarness, t as DefinePersona, u as EqualKOnCost, v as Fanout, w as FanoutSynthesis, x as FlatWidenGate, y as LoopUntil, z as LoopUntilState, B as Panel, G as PanelJudge, H as PanelVerdict, I as PatchDeliverableOptions, J as PersonaContext, K as PersonaExecutors, M as Pipeline, N as RenderCorpusToInstructions, Q as RunPersonified, U as ShapeBudget, X as ShapeContext, Y as TrajectoryNode, Z as TrajectoryReportFn, _ as Verify, $ as Widen, a0 as WidenDecision, a1 as WidenLineage, a2 as WorktreeCliExecutorOptions, a as WorktreeFanoutOptions, b as WorktreePatchArtifact, a3 as createWorktreeCliExecutor, a4 as patchDelivered, a5 as worktreeFanout } from './worktree-fanout-D9Z2dMS9.js';
14
14
  import { Scenario, DispatchFn, ProfileDispatchFn } from '@tangle-network/agent-eval/campaign';
15
15
  import { b as AnalystRegistryLike } from './types-BC3bZpH0.js';
16
16
  import { AgentProfile as AgentProfile$1 } from '@tangle-network/agent-interface';
17
- import { R as RouterConfig, a as ToolLoopChat, b as ToolLoopCompactionOptions } from './router-client-Ak2IGuXq.js';
18
- export { c as RouterChatResult, d as RouterChatToolsResult, e as RouterToolCall, f as RouterToolLoopResult, g as ToolLoopCompaction, T as ToolSpec, r as routerBrain, h as routerChatWithTools, i as routerChatWithUsage, j as routerToolLoop } from './router-client-Ak2IGuXq.js';
19
- import { D as DeliverableSpec } from './worktree-harness-Dt6s_m3z.js';
20
- export { g as WorktreeCommandResult, h as gateOnDeliverable } from './worktree-harness-Dt6s_m3z.js';
17
+ import { R as RouterConfig, a as ToolLoopChat, b as ToolLoopCompactionOptions } from './router-client-D6Ocf4jG.js';
18
+ export { c as RouterChatResult, d as RouterChatToolsResult, e as RouterToolCall, f as RouterToolLoopResult, g as ToolLoopCompaction, T as ToolSpec, r as routerBrain, h as routerChatWithTools, i as routerChatWithUsage, j as routerToolLoop } from './router-client-D6Ocf4jG.js';
19
+ import { D as DeliverableSpec } from './worktree-harness-Dx8XULW3.js';
20
+ export { g as WorktreeCommandResult, h as gateOnDeliverable } from './worktree-harness-Dx8XULW3.js';
21
21
  import { stuckLoopView, toolWasteView } from '@tangle-network/agent-eval/pipelines';
22
22
  export { AgentEnvironment, AgentEnvironmentCapabilities, AgentEnvironmentEvent, AgentEnvironmentProvider, AgentEnvironmentQuery, AgentEnvironmentStatus, AgentEnvironmentSummary, AgentProfileRef, AgentSession, AgentSessionRef, AgentSessionStatus, AgentTurnInput, AgentTurnResult, CheckpointRef, CheckpointRequest, CreateAgentEnvironmentInput, ExecRequest, ExecResult, ForkRequest, PlacementInfo, ResourceRequest, WorkspaceRequest } from '@tangle-network/agent-interface/environment-provider';
23
23
  import './substrate-rNj6TDc3.js';
@@ -409,6 +409,23 @@ declare function renderLeaderboardSvg(report: Leaderboard): string;
409
409
  * matrix as a table. Single file, no assets, opens in any browser. */
410
410
  declare function renderLeaderboardHtml(report: Leaderboard): string;
411
411
 
412
+ interface CliBridgeConfig {
413
+ /** cli-bridge base URL. Defaults to `http://127.0.0.1:3355`. */
414
+ url?: string;
415
+ /** Bearer token the bridge requires (fail loud when empty). */
416
+ bearer: string;
417
+ /** Default harness when a `create({ backend })` override does not set one. */
418
+ harness?: string;
419
+ /** Default model when a `create({ backend })` override does not set one. */
420
+ model?: string;
421
+ }
422
+ /**
423
+ * A `SandboxClient` whose every prompt is one cli-bridge chat completion, metered
424
+ * and driven by the shared `runLoop` kernel. Pass a fixed `harness`/`model`, or omit
425
+ * them and set the target per cell via `create({ backend: { type, model: { model } } })`.
426
+ */
427
+ declare function cliBridgeSandboxClient(cfg: CliBridgeConfig): SandboxClient;
428
+
412
429
  /**
413
430
  * @experimental
414
431
  *
@@ -2815,6 +2832,9 @@ interface CoordinationMcpHandle {
2815
2832
  valid?: boolean;
2816
2833
  outRef?: string;
2817
2834
  }>;
2835
+ /** Post-loop drain of already-settled, unpulled children into the ledger — call before reading
2836
+ * `settled()` for a finalize, so a delivered child the harness never awaited is not lost. */
2837
+ drainResolved: CoordinationTools['drainResolved'];
2818
2838
  isStopped(): boolean;
2819
2839
  /** The full ordered bus-event log — observability audit + replay trail. */
2820
2840
  history: CoordinationTools['history'];
@@ -3516,4 +3536,4 @@ declare function runInWorkspace<T>(ws: Workspace, body: (cwd: string) => Promise
3516
3536
  commitOnInvalid?: boolean;
3517
3537
  }): Promise<WorkspaceRun<T>>;
3518
3538
 
3519
- export { Agent, AgentRunSpec, type AgenticOptions, type AgenticRunResult, type AgenticSurface, type AgenticTask, type AgenticTool, AnalystRegistry, type AnytimeReport, type AnytimeStrategySummary, type AnytimeTaskCurve, type ApplyContinuation, type ArtifactHandle, AssertTraceDerivedFindings, type AuditIntentInput, type AuditIntentOptions, type AuthorStrategyOptions, type AuthoredProfile, type AuthoredStrategy, type BenchmarkCell, type BenchmarkConfig, type BenchmarkLift, type BenchmarkReport, type BenchmarkStrategySummary, type BenchmarkTaskRow, Budget, type BudgetPool, type BudgetReadout, type ChampionPick, type ChampionPolicy, type CheckpointCapableBox, CombinatorShape, type CompletionAnalyst, type CompletionEvidence, type CompletionPolicy, type CompletionVerdict, CoordinationEvent, type CoordinationMcpHandle, Corpus, CorpusFilter, CorpusRecord, type CreateScopeAnalystOptions, type CriuCapableClient, DefinePersonaInput, type DelegateOptions, type Deliverable, DeliverableSpec, type DriveHarness, Driver, type DriverAgentOptions, type DumbDriverOptions, type Environment, EqualKArm, EqualKOnCostOptions, EqualKVerdict, type EvolutionArchiveNode, type EvolutionAuthor, type EvolutionBandInfo, type EvolutionCandidate, type EvolutionGeneration, type EvolutionReport, ExecCtx, ExecutorConfig, ExecutorFactory, ExecutorRegistry, FanoutOptions, FanoutWinnerSelector, FileCorpus, type ForkCapableBox, type GitWorkspaceOptions, type HarvestCorpusOptions, type HarvestFailure, type HarvestReport, InMemoryCorpus, InMemoryResultBlobStore, type InMemoryRunContext, type InMemoryRunContextOptions, InMemorySpawnJournal, type InProcessOnPrompt, type InProcessPromptCtx, type InProcessSandboxClientOptions, type Inbox, type InboxMessage, type IntentAudit, type Interval, Iteration, type Leaderboard, type LeaderboardOptions, type LeaderboardRow, type LoopCampaignDispatchOptions, type LoopDispatchOptions, LoopLineageOptions, type LoopOptionsForDispatch, LoopResult, LoopShape, LoopTokenUsage, LoopUntilSpec, LoopWinner, MakeWorkerAgent, type McpEndpoint, type McpEnvironmentOptions, MountRecorder, type NaiveDriverOptions, type Observation, type ObserveInput, type ObserveOptions, type OpenSandboxRunOptions, Outcome, OutputAdapter, type PairwiseOptions, type PairwiseVerdict, PanelSpec, Persona, PipelineStage, type ProfileRichness, type ProfileRichnessThresholds, type PromotionGateOptions, type PromotionVerdict, type RegistryAnalyzeProjection, RenderCorpusToInstructionsOptions, type ReservationTicket, ResultBlobStore, RouterConfig, type RunAgenticOptions, RunPersonifiedOptions, type SandboxCapabilities, SandboxClient, type SandboxLineage, type SandboxLineageHandle, type SandboxRun, SandboxRunAbortError, Scope, ScopeAnalyst, ScopeAnalyzeInput, ScopeWidenGate, type SessionCapableBox, type SessionTraceBox, Settled, ShapeRegistry, type Shell, type ShotPersona, type ShotSpec, Spend, SteerContext, type SteeringDecision, type Strategy, type StrategyCtx, type StrategyEvolutionConfig, type StrategyResult, type SuperviseOptions, type SuperviseSurfaceOptions, type SuperviseSurfaceResult, SupervisedResult, Supervisor, type SupervisorAgentDeps, type SupervisorProfile, type SurfaceScore, type SurfaceWorkerConfig, type SurfaceWorkerOut, ToolLoopChat, ToolLoopCompactionOptions, type TraceSource, type TrajectoryAnalysis, TrajectoryReport, TrajectoryReportOptions, type TurnResult, UsageEvent, type UsageSink, Validator, type VerifierEnvironmentOptions, VerifySpec, type WatchTraceOptions, type WaterfallCollector, type WaterfallReport, type WaterfallSpan, WidenSpec, WinnerStrategy, type Workspace, type WorkspaceCommit, type WorkspaceRun, acquireSandbox, adaptiveRefine, analyzeTrace, anytimeReport, asAuthoredProfile, assertModelAllowed, assertStrategyContract, assertTraceDerivedFindings, assessAuthoredProfile, auditIntent, authorStrategy, authoredWorker, breadthStrategy, buildSteerContext, builtinShapes, completionAuthorizes, contentAddress, createBudgetPool, createInMemoryRunContext, createInbox, createMcpEnvironment, createPushTraceSource, createSandboxLineage, createScope, createScopeAnalyst, createShapeRegistry, createSupervisor, createVerifierEnvironment, createWaterfallCollector, decodeToolPart, defaultAnalystInstruction, defaultAuditorInstruction, defaultDelegateBudget, defaultProfileRichnessThresholds, defaultSelectWinner, defaultToolDetectors, definePersona, defineStrategy, delegate, depthStrategy, deterministicCompletion, discriminatingMeans, driverAgent, dumbDriver, equalKOnCost, extractLlmCallEvent, failuresAnalyst, fanout, finalizeBestDelivered, flatWidenGate, gitWorkspace, harvestCorpus, inProcessSandboxClient, inlineSandboxClient, jjWorkspace, leaderboard, localShell, loopCampaignDispatch, loopDispatch, loopUntil, mapSandboxEvent, naiveDriver, observe, openSandboxRun, pairwiseSignificance, panel, pickChampion, pipeline, printBenchmarkReport, probeSandboxCapabilities, profileRichnessFinding, promotionGate, refine, registerShape, registryScopeAnalyst, renderAnytimeTable, renderCorpusToInstructions, renderLeaderboardHtml, renderLeaderboardMarkdown, renderLeaderboardSvg, renderPairwiseMarkdown, renderReport, reportLoopUsage, runAgentic, runBenchmark, runInWorkspace, runLoop, runPersonified, runStrategyEvolution, sample, sampleThenRefine, sandboxSessionTraceSource, selectChampion, selectValidWinner, sentinelCompletion, serveCoordinationMcp, settledToIteration, spendFromUsageEvents, stopSentinel, strategyAuthorContract, sumSandboxUsage, supervise, superviseSurface, supervisorAgent, supervisorInstructions, trajectoryReport, verify, watchTrace, widen, workerFromBackend };
3539
+ export { Agent, AgentRunSpec, type AgenticOptions, type AgenticRunResult, type AgenticSurface, type AgenticTask, type AgenticTool, AnalystRegistry, type AnytimeReport, type AnytimeStrategySummary, type AnytimeTaskCurve, type ApplyContinuation, type ArtifactHandle, AssertTraceDerivedFindings, type AuditIntentInput, type AuditIntentOptions, type AuthorStrategyOptions, type AuthoredProfile, type AuthoredStrategy, type BenchmarkCell, type BenchmarkConfig, type BenchmarkLift, type BenchmarkReport, type BenchmarkStrategySummary, type BenchmarkTaskRow, Budget, type BudgetPool, type BudgetReadout, type ChampionPick, type ChampionPolicy, type CheckpointCapableBox, type CliBridgeConfig, CombinatorShape, type CompletionAnalyst, type CompletionEvidence, type CompletionPolicy, type CompletionVerdict, CoordinationEvent, type CoordinationMcpHandle, Corpus, CorpusFilter, CorpusRecord, type CreateScopeAnalystOptions, type CriuCapableClient, DefinePersonaInput, type DelegateOptions, type Deliverable, DeliverableSpec, type DriveHarness, Driver, type DriverAgentOptions, type DumbDriverOptions, type Environment, EqualKArm, EqualKOnCostOptions, EqualKVerdict, type EvolutionArchiveNode, type EvolutionAuthor, type EvolutionBandInfo, type EvolutionCandidate, type EvolutionGeneration, type EvolutionReport, ExecCtx, ExecutorConfig, ExecutorFactory, ExecutorRegistry, FanoutOptions, FanoutWinnerSelector, FileCorpus, type ForkCapableBox, type GitWorkspaceOptions, type HarvestCorpusOptions, type HarvestFailure, type HarvestReport, InMemoryCorpus, InMemoryResultBlobStore, type InMemoryRunContext, type InMemoryRunContextOptions, InMemorySpawnJournal, type InProcessOnPrompt, type InProcessPromptCtx, type InProcessSandboxClientOptions, type Inbox, type InboxMessage, type IntentAudit, type Interval, Iteration, type Leaderboard, type LeaderboardOptions, type LeaderboardRow, type LoopCampaignDispatchOptions, type LoopDispatchOptions, LoopLineageOptions, type LoopOptionsForDispatch, LoopResult, LoopShape, LoopTokenUsage, LoopUntilSpec, LoopWinner, MakeWorkerAgent, type McpEndpoint, type McpEnvironmentOptions, MountRecorder, type NaiveDriverOptions, type Observation, type ObserveInput, type ObserveOptions, type OpenSandboxRunOptions, Outcome, OutputAdapter, type PairwiseOptions, type PairwiseVerdict, PanelSpec, Persona, PipelineStage, type ProfileRichness, type ProfileRichnessThresholds, type PromotionGateOptions, type PromotionVerdict, type RegistryAnalyzeProjection, RenderCorpusToInstructionsOptions, type ReservationTicket, ResultBlobStore, RouterConfig, type RunAgenticOptions, RunPersonifiedOptions, type SandboxCapabilities, SandboxClient, type SandboxLineage, type SandboxLineageHandle, type SandboxRun, SandboxRunAbortError, Scope, ScopeAnalyst, ScopeAnalyzeInput, ScopeWidenGate, type SessionCapableBox, type SessionTraceBox, Settled, ShapeRegistry, type Shell, type ShotPersona, type ShotSpec, Spend, SteerContext, type SteeringDecision, type Strategy, type StrategyCtx, type StrategyEvolutionConfig, type StrategyResult, type SuperviseOptions, type SuperviseSurfaceOptions, type SuperviseSurfaceResult, SupervisedResult, Supervisor, type SupervisorAgentDeps, type SupervisorProfile, type SurfaceScore, type SurfaceWorkerConfig, type SurfaceWorkerOut, ToolLoopChat, ToolLoopCompactionOptions, type TraceSource, type TrajectoryAnalysis, TrajectoryReport, TrajectoryReportOptions, type TurnResult, UsageEvent, type UsageSink, Validator, type VerifierEnvironmentOptions, VerifySpec, type WatchTraceOptions, type WaterfallCollector, type WaterfallReport, type WaterfallSpan, WidenSpec, WinnerStrategy, type Workspace, type WorkspaceCommit, type WorkspaceRun, acquireSandbox, adaptiveRefine, analyzeTrace, anytimeReport, asAuthoredProfile, assertModelAllowed, assertStrategyContract, assertTraceDerivedFindings, assessAuthoredProfile, auditIntent, authorStrategy, authoredWorker, breadthStrategy, buildSteerContext, builtinShapes, cliBridgeSandboxClient, completionAuthorizes, contentAddress, createBudgetPool, createInMemoryRunContext, createInbox, createMcpEnvironment, createPushTraceSource, createSandboxLineage, createScope, createScopeAnalyst, createShapeRegistry, createSupervisor, createVerifierEnvironment, createWaterfallCollector, decodeToolPart, defaultAnalystInstruction, defaultAuditorInstruction, defaultDelegateBudget, defaultProfileRichnessThresholds, defaultSelectWinner, defaultToolDetectors, definePersona, defineStrategy, delegate, depthStrategy, deterministicCompletion, discriminatingMeans, driverAgent, dumbDriver, equalKOnCost, extractLlmCallEvent, failuresAnalyst, fanout, finalizeBestDelivered, flatWidenGate, gitWorkspace, harvestCorpus, inProcessSandboxClient, inlineSandboxClient, jjWorkspace, leaderboard, localShell, loopCampaignDispatch, loopDispatch, loopUntil, mapSandboxEvent, naiveDriver, observe, openSandboxRun, pairwiseSignificance, panel, pickChampion, pipeline, printBenchmarkReport, probeSandboxCapabilities, profileRichnessFinding, promotionGate, refine, registerShape, registryScopeAnalyst, renderAnytimeTable, renderCorpusToInstructions, renderLeaderboardHtml, renderLeaderboardMarkdown, renderLeaderboardSvg, renderPairwiseMarkdown, renderReport, reportLoopUsage, runAgentic, runBenchmark, runInWorkspace, runLoop, runPersonified, runStrategyEvolution, sample, sampleThenRefine, sandboxSessionTraceSource, selectChampion, selectValidWinner, sentinelCompletion, serveCoordinationMcp, settledToIteration, spendFromUsageEvents, stopSentinel, strategyAuthorContract, sumSandboxUsage, supervise, superviseSurface, supervisorAgent, supervisorInstructions, trajectoryReport, verify, watchTrace, widen, workerFromBackend };
package/dist/loops.js CHANGED
@@ -12,6 +12,7 @@ import {
12
12
  breadthStrategy,
13
13
  buildSteerContext,
14
14
  builtinShapes,
15
+ cliBridgeSandboxClient,
15
16
  completionAuthorizes,
16
17
  computeFindingId,
17
18
  createMcpEnvironment,
@@ -85,7 +86,7 @@ import {
85
86
  watchTrace,
86
87
  widen,
87
88
  worktreeFanout
88
- } from "./chunk-AHZ3YBL6.js";
89
+ } from "./chunk-QSO2TVDS.js";
89
90
  import {
90
91
  InMemoryResultBlobStore,
91
92
  InMemorySpawnJournal,
@@ -127,8 +128,8 @@ import {
127
128
  supervisorAgent,
128
129
  supervisorInstructions,
129
130
  workerFromBackend
130
- } from "./chunk-44CX5JU6.js";
131
- import "./chunk-IPEQ3ERC.js";
131
+ } from "./chunk-TPII5AU7.js";
132
+ import "./chunk-3X53HYRW.js";
132
133
  import {
133
134
  createAgentEnvironmentProviderRegistry,
134
135
  providerAsExecutor,
@@ -166,6 +167,7 @@ export {
166
167
  breadthStrategy,
167
168
  buildSteerContext,
168
169
  builtinShapes,
170
+ cliBridgeSandboxClient,
169
171
  cliWorktreeExecutor,
170
172
  completionAuthorizes,
171
173
  computeFindingId,
package/dist/mcp/bin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readTraceContextFromEnv
4
- } from "../chunk-NXZEVWKP.js";
4
+ } from "../chunk-M3Y362RW.js";
5
5
  import {
6
6
  resolveRouterBaseUrl
7
7
  } from "../chunk-GRAGM4MC.js";
@@ -9,8 +9,8 @@ import {
9
9
  DelegationTaskQueue,
10
10
  FileDelegationStore,
11
11
  createMcpServer
12
- } from "../chunk-44CX5JU6.js";
13
- import "../chunk-IPEQ3ERC.js";
12
+ } from "../chunk-TPII5AU7.js";
13
+ import "../chunk-3X53HYRW.js";
14
14
  import "../chunk-H7IBHAFT.js";
15
15
  import "../chunk-4J6RBI3K.js";
16
16
  import "../chunk-5JAUQZQA.js";
@@ -1,19 +1,19 @@
1
1
  import { S as SandboxClient, d as LoopSandboxPlacement } from '../types-BF-MEsQB.js';
2
- import { F as FleetHandle, D as DelegationExecutor, a as DelegationTaskQueue, b as FeedbackStore, c as DelegateFeedbackResult, d as DelegateFeedbackArgs, U as UiAuditorDelegate, e as DelegateUiAuditArgs, f as DelegateUiAuditResult, g as DelegationHistoryResult, h as DelegationHistoryArgs, i as DelegationStatusResult, j as DelegationStatusArgs } from '../coordination-BFVtgRax.js';
3
- export { A as AnalystRegistry, C as CappedDelegationTrace, k as CoderDelegate, l as CoderReview, m as CoderReviewer, n as CoordinationEvent, o as CoordinationTools, p as CoordinationToolsOptions, q as DELEGATE_DESCRIPTION, r as DELEGATE_INPUT_SCHEMA, s as DELEGATE_TOOL_NAME, t as DELEGATION_TRACE_MAX_BYTES, u as DELEGATION_TRACE_MAX_SPANS, v as DelegateArgs, w as DelegateCodeArgs, x as DelegateCodeConfig, y as DelegateCodeResult, z as DelegateHandlerOptions, B as DelegateResearchArgs, E as DelegateResearchConfig, G as DelegateResearchResult, H as DelegateResult, I as DelegateRunCtx, J as DelegateUiAuditConfig, K as DelegateUiAuditRoute, L as DelegationError, M as DelegationFeedbackSnapshot, N as DelegationHistoryEntry, O as DelegationPersistenceError, P as DelegationProfile, Q as DelegationProgress, R as DelegationRecord, S as DelegationResultPayload, T as DelegationResumeContext, V as DelegationResumeDriver, W as DelegationResumeTick, X as DelegationRunContext, Y as DelegationStateCorruptError, Z as DelegationStatus, _ as DelegationStore, $ as DelegationTaskQueueOptions, a0 as DelegationTraceCaps, a1 as DelegationTraceCollector, a2 as DelegationTraceSpan, a3 as DetachedSessionDelegateOptions, a4 as DetachedSessionRefParts, a5 as DetachedTurn, a6 as DetachedTurnResumeDriverOptions, a7 as DetachedWinnerSelection, a8 as DriveTurnCapableBox, a9 as DriveTurnTick, aa as FeedbackEvent, ab as FeedbackRating, ac as FeedbackRefersTo, ad as FileDelegationStore, ae as FileDelegationStoreOptions, af as FleetWorkspaceExecutorOptions, ag as InMemoryDelegationStore, ah as InMemoryFeedbackStore, ai as JsonRpcMessage, aj as JsonRpcResponse, ak as MakeWorkerAgent, al as McpServer, am as McpServerOptions, an as McpToolDescriptor, ao as McpTransport, ap as Question, aq as QuestionDecision, ar as QuestionPolicy, as as QuestionRecord, at as ResearchOutputShape, au as ResearchSource, av as RunDetachedTurnOptions, aw as SettleDetachedCoderTurnOptions, ax as SettledWorker, ay as SiblingSandboxExecutorOptions, az as SubmitInput, aA as SubmitOutput, aB as TraceContext, aC as UiAuditorDelegationOutput, aD as buildDelegationTraceSpans, aE as capDelegationTrace, aF as coderTaskFromArgs, aG as composeLoopTraceEmitters, aH as createCoordinationTools, aI as createDelegateHandler, aJ as createDelegationTraceCollector, aK as createDetachedTurnResumeDriver, aL as createFleetWorkspaceExecutor, aM as createInProcessTransport, aN as createMcpServer, aO as createPropagatingTraceEmitter, aP as createSiblingSandboxExecutor, aQ as detachedSessionDelegate, aR as detachedTurnEvents, aS as eventToSnapshot, aT as formatDetachedSessionRef, aU as hashIdempotencyInput, aV as parseDetachedSessionRef, aW as readTraceContextFromEnv, aX as runDetachedTurn, aY as settleDetachedCoderTurn, aZ as traceContextToEnv, a_ as validateDelegateArgs } from '../coordination-BFVtgRax.js';
2
+ import { F as FleetHandle, D as DelegationExecutor, a as DelegationTaskQueue, b as FeedbackStore, c as DelegateFeedbackResult, d as DelegateFeedbackArgs, U as UiAuditorDelegate, e as DelegateUiAuditArgs, f as DelegateUiAuditResult, g as DelegationHistoryResult, h as DelegationHistoryArgs, i as DelegationStatusResult, j as DelegationStatusArgs } from '../coordination-BI9tpcmF.js';
3
+ export { A as AnalystRegistry, C as CappedDelegationTrace, k as CoderDelegate, l as CoderReview, m as CoderReviewer, n as CoordinationEvent, o as CoordinationTools, p as CoordinationToolsOptions, q as DELEGATE_DESCRIPTION, r as DELEGATE_INPUT_SCHEMA, s as DELEGATE_TOOL_NAME, t as DELEGATION_TRACE_MAX_BYTES, u as DELEGATION_TRACE_MAX_SPANS, v as DelegateArgs, w as DelegateCodeArgs, x as DelegateCodeConfig, y as DelegateCodeResult, z as DelegateHandlerOptions, B as DelegateResearchArgs, E as DelegateResearchConfig, G as DelegateResearchResult, H as DelegateResult, I as DelegateRunCtx, J as DelegateUiAuditConfig, K as DelegateUiAuditRoute, L as DelegationError, M as DelegationFeedbackSnapshot, N as DelegationHistoryEntry, O as DelegationPersistenceError, P as DelegationProfile, Q as DelegationProgress, R as DelegationRecord, S as DelegationResultPayload, T as DelegationResumeContext, V as DelegationResumeDriver, W as DelegationResumeTick, X as DelegationRunContext, Y as DelegationStateCorruptError, Z as DelegationStatus, _ as DelegationStore, $ as DelegationTaskQueueOptions, a0 as DelegationTraceCaps, a1 as DelegationTraceCollector, a2 as DelegationTraceSpan, a3 as DetachedSessionDelegateOptions, a4 as DetachedSessionRefParts, a5 as DetachedTurn, a6 as DetachedTurnResumeDriverOptions, a7 as DetachedWinnerSelection, a8 as DriveTurnCapableBox, a9 as DriveTurnTick, aa as FeedbackEvent, ab as FeedbackRating, ac as FeedbackRefersTo, ad as FileDelegationStore, ae as FileDelegationStoreOptions, af as FleetWorkspaceExecutorOptions, ag as InMemoryDelegationStore, ah as InMemoryFeedbackStore, ai as JsonRpcMessage, aj as JsonRpcResponse, ak as MakeWorkerAgent, al as McpServer, am as McpServerOptions, an as McpToolDescriptor, ao as McpTransport, ap as Question, aq as QuestionDecision, ar as QuestionPolicy, as as QuestionRecord, at as ResearchOutputShape, au as ResearchSource, av as RunDetachedTurnOptions, aw as SettleDetachedCoderTurnOptions, ax as SettledWorker, ay as SiblingSandboxExecutorOptions, az as SubmitInput, aA as SubmitOutput, aB as TraceContext, aC as UiAuditorDelegationOutput, aD as buildDelegationTraceSpans, aE as capDelegationTrace, aF as coderTaskFromArgs, aG as composeLoopTraceEmitters, aH as createCoordinationTools, aI as createDelegateHandler, aJ as createDelegationTraceCollector, aK as createDetachedTurnResumeDriver, aL as createFleetWorkspaceExecutor, aM as createInProcessTransport, aN as createMcpServer, aO as createPropagatingTraceEmitter, aP as createSiblingSandboxExecutor, aQ as detachedSessionDelegate, aR as detachedTurnEvents, aS as eventToSnapshot, aT as formatDetachedSessionRef, aU as hashIdempotencyInput, aV as parseDetachedSessionRef, aW as readTraceContextFromEnv, aX as runDetachedTurn, aY as settleDetachedCoderTurn, aZ as traceContextToEnv, a_ as validateDelegateArgs } from '../coordination-BI9tpcmF.js';
4
4
  import { L as LocalHarness, r as runLocalHarness } from '../local-harness-DU7yV6mG.js';
5
5
  export { a as LocalHarnessResult, R as RunLocalHarnessOptions } from '../local-harness-DU7yV6mG.js';
6
- import { G as GitRunner } from '../worktree-harness-Dt6s_m3z.js';
7
- export { C as CreateWorktreeOptions, b as DiffOptions, c as DiffResult, R as RemoveWorktreeOptions, d as WorktreeHandle, e as captureWorktreeDiff, f as createWorktree, r as removeWorktree } from '../worktree-harness-Dt6s_m3z.js';
6
+ import { G as GitRunner } from '../worktree-harness-Dx8XULW3.js';
7
+ export { C as CreateWorktreeOptions, b as DiffOptions, c as DiffResult, R as RemoveWorktreeOptions, d as WorktreeHandle, e as captureWorktreeDiff, f as createWorktree, r as removeWorktree } from '../worktree-harness-Dx8XULW3.js';
8
8
  export { C as CreateKbGateOptions, F as FactCandidate, a as FactJudge, b as FactJudgeVerdict, K as KbGateResult, c as createKbGate } from '../kb-gate-CuzMYGYM.js';
9
9
  export { m as mcpToolsForRuntimeMcp, a as mcpToolsForRuntimeMcpSubset } from '../openai-tools-B-3v06BE.js';
10
10
  import { AnalystFinding } from '@tangle-network/agent-eval';
11
11
  import { U as UiLens } from '../substrate-rNj6TDc3.js';
12
12
  import '@tangle-network/sandbox';
13
- import '../types-DYW0tloU.js';
13
+ import '../types-By9LXllv.js';
14
14
  import '@tangle-network/agent-interface';
15
15
  import '../otel-export-BKmNwiCb.js';
16
- import '../router-client-Ak2IGuXq.js';
16
+ import '../router-client-D6Ocf4jG.js';
17
17
  import '../environment-provider.js';
18
18
  import '@tangle-network/agent-interface/environment-provider';
19
19
  import 'node:child_process';
package/dist/mcp/index.js CHANGED
@@ -2,11 +2,11 @@ import {
2
2
  createPropagatingTraceEmitter,
3
3
  readTraceContextFromEnv,
4
4
  traceContextToEnv
5
- } from "../chunk-NXZEVWKP.js";
5
+ } from "../chunk-M3Y362RW.js";
6
6
  import {
7
7
  mcpToolsForRuntimeMcp,
8
8
  mcpToolsForRuntimeMcpSubset
9
- } from "../chunk-RUJZK6VH.js";
9
+ } from "../chunk-LLJRUTE7.js";
10
10
  import {
11
11
  createKbGate
12
12
  } from "../chunk-FNMGYYSS.js";
@@ -14,7 +14,7 @@ import {
14
14
  assertTraceDerivedFindings,
15
15
  runCoderChecks,
16
16
  selectValidWinner
17
- } from "../chunk-AHZ3YBL6.js";
17
+ } from "../chunk-QSO2TVDS.js";
18
18
  import {
19
19
  DELEGATE_DESCRIPTION,
20
20
  DELEGATE_FEEDBACK_DESCRIPTION,
@@ -64,8 +64,8 @@ import {
64
64
  validateDelegateUiAuditArgs,
65
65
  validateDelegationHistoryArgs,
66
66
  validateDelegationStatusArgs
67
- } from "../chunk-44CX5JU6.js";
68
- import "../chunk-IPEQ3ERC.js";
67
+ } from "../chunk-TPII5AU7.js";
68
+ import "../chunk-3X53HYRW.js";
69
69
  import {
70
70
  deleteBoxSafe,
71
71
  sleep,
@@ -82,7 +82,17 @@ interface RouterConfig {
82
82
  complete?: (body: Record<string, unknown>) => Promise<unknown>;
83
83
  }
84
84
  interface RouterChatResult {
85
+ /** The final answer, with any inline `<think>...</think>` block stripped into `reasoning`. */
85
86
  content: string;
87
+ /**
88
+ * Thinking-model reasoning, when the provider surfaced it — either as a separate
89
+ * `reasoning`/`reasoning_content` message field (OpenRouter style) or inlined into
90
+ * `content` as a `<think>` block (Groq style). Undefined for non-thinking models.
91
+ * Downstream parsers that match single-token answers must read `content`, which is
92
+ * clean either way; before this split, Groq-style inlining made the same model look
93
+ * broken on one provider and fine on another.
94
+ */
95
+ reasoning?: string;
86
96
  /** REAL usage, or undefined when the provider reported none. */
87
97
  usage?: {
88
98
  input: number;
@@ -98,6 +108,15 @@ declare function routerChatWithUsage(cfg: RouterConfig, messages: Array<{
98
108
  temperature?: number;
99
109
  signal?: AbortSignal;
100
110
  maxTokens?: number;
111
+ /**
112
+ * Reasoning control for thinking models, forwarded as `reasoning_effort`.
113
+ * 'none' is the load-bearing value: binary/single-token decisions (routing,
114
+ * gating) on a thinking model otherwise burn the whole token budget inside
115
+ * the think block — on slow backends (CPU-local) that turns into a client
116
+ * timeout, not just waste. Providers that ignore the field are handled by
117
+ * the reasoning/content split in `parseChatResult`.
118
+ */
119
+ reasoningEffort?: 'none' | 'low' | 'medium' | 'high';
101
120
  }): Promise<RouterChatResult>;
102
121
  /** A tool-call the model emitted (provider-neutral; mirrors the runtime's ToolCallRequest). */
103
122
  interface RouterToolCall {
@@ -274,6 +274,13 @@ interface Scope<Out> {
274
274
  /** ray.wait n=1 over this scope's in-memory live set; resolves as each child settles;
275
275
  * `null` when the live set is empty. */
276
276
  next(): Promise<Settled<Out> | null>;
277
+ /**
278
+ * Non-blocking twin of `next()`: deliver an ALREADY-settled, undelivered child, or `null`
279
+ * when none is ready — never awaits a live child. The driver's post-loop drain reads this so
280
+ * a child that settled while the driver was busy (or after it stopped pulling) still reaches
281
+ * the finalize ledger instead of being silently lost.
282
+ */
283
+ nextResolved(): Promise<Settled<Out> | null>;
277
284
  /**
278
285
  * Steer a RUNNING child out-of-band — deliver a message to its executor's inbox (the driver's
279
286
  * `send` verb: next-instruction, interrupt, or resume). Returns `true` if the message was
@@ -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, b as ExecutorRegistry, B as Budget, c as Agent, S as SpawnJournal, d as ResultBlobStore, e as RootHandle, f as SupervisedResult, N as NodeId, g as Settled, h as Spend, i as Scope, a as Executor } from './types-DYW0tloU.js';
3
+ import { A as AgentSpec, b as ExecutorRegistry, B as Budget, c as Agent, S as SpawnJournal, d as ResultBlobStore, e as RootHandle, f as SupervisedResult, N as NodeId, g as Settled, h as Spend, i as Scope, a as Executor } from './types-By9LXllv.js';
4
4
  import { R as RuntimeHooks, I as Iteration } from './types-BF-MEsQB.js';
5
5
  import { BackendType } from '@tangle-network/sandbox';
6
- import { W as WorktreeHarnessResult, G as GitRunner, a as WorktreeCheckRunner, D as DeliverableSpec } from './worktree-harness-Dt6s_m3z.js';
6
+ import { W as WorktreeHarnessResult, G as GitRunner, a as WorktreeCheckRunner, D as DeliverableSpec } from './worktree-harness-Dx8XULW3.js';
7
7
  import { L as LocalHarness, r as runLocalHarness } from './local-harness-DU7yV6mG.js';
8
8
 
9
9
  /**
@@ -1,4 +1,4 @@
1
- import { a as Executor } from './types-DYW0tloU.js';
1
+ import { a as Executor } from './types-By9LXllv.js';
2
2
  import { L as LocalHarness } from './local-harness-DU7yV6mG.js';
3
3
 
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-runtime",
3
- "version": "0.79.4",
3
+ "version": "0.80.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": {