@tangle-network/agent-runtime 0.76.0 → 0.78.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 (32) hide show
  1. package/dist/agent.d.ts +1 -1
  2. package/dist/agent.js +2 -2
  3. package/dist/analyst-loop.d.ts +1 -1
  4. package/dist/{chunk-MRWXCFV5.js → chunk-OL2SEETC.js} +2 -2
  5. package/dist/{chunk-ZKMOIEOB.js → chunk-OLPH6W3J.js} +66 -24
  6. package/dist/chunk-OLPH6W3J.js.map +1 -0
  7. package/dist/{chunk-QKNBYHMK.js → chunk-QJ6BWENI.js} +3 -3
  8. package/dist/{chunk-SA5GCF2X.js → chunk-YHS6I2IS.js} +177 -24
  9. package/dist/chunk-YHS6I2IS.js.map +1 -0
  10. package/dist/{coordination-c_7Olmtq.d.ts → coordination-Csxsy39a.d.ts} +3 -3
  11. package/dist/index.d.ts +6 -6
  12. package/dist/index.js +4 -4
  13. package/dist/intelligence.d.ts +2 -2
  14. package/dist/{loop-runner-bin-Dbtg787n.d.ts → loop-runner-bin-BTMpf1oY.d.ts} +2 -2
  15. package/dist/loop-runner-bin.d.ts +4 -4
  16. package/dist/loop-runner-bin.js +3 -3
  17. package/dist/loops.d.ts +189 -12
  18. package/dist/loops.js +8 -2
  19. package/dist/mcp/bin.js +1 -1
  20. package/dist/mcp/index.d.ts +7 -7
  21. package/dist/mcp/index.js +3 -3
  22. package/dist/{openai-tools-D5tcirFF.d.ts → openai-tools-B-3v06BE.d.ts} +1 -1
  23. package/dist/profiles.d.ts +1 -1
  24. package/dist/{router-client-C7kp_ECN.d.ts → router-client-CMAWGv1h.d.ts} +8 -0
  25. package/dist/{types-B-jWSfcu.d.ts → types-BF-MEsQB.d.ts} +21 -0
  26. package/dist/{worktree-CDxqwxGo.d.ts → worktree-DH_Y0brm.d.ts} +1 -1
  27. package/dist/{worktree-fanout-CljF1L2v.d.ts → worktree-fanout-DGC7jS7i.d.ts} +2 -2
  28. package/package.json +5 -8
  29. package/dist/chunk-SA5GCF2X.js.map +0 -1
  30. package/dist/chunk-ZKMOIEOB.js.map +0 -1
  31. /package/dist/{chunk-MRWXCFV5.js.map → chunk-OL2SEETC.js.map} +0 -0
  32. /package/dist/{chunk-QKNBYHMK.js.map → chunk-QJ6BWENI.js.map} +0 -0
@@ -1,11 +1,11 @@
1
- import { m as ExecutorFactory, E as ExecutorRegistry, l as DeliverableSpec, i as Spend, d as Agent, j as Scope, e as ResultBlobStore, B as Budget } from './worktree-CDxqwxGo.js';
1
+ import { m as ExecutorFactory, E as ExecutorRegistry, l as DeliverableSpec, i as Spend, d as Agent, j as Scope, e as ResultBlobStore, B as Budget } from './worktree-DH_Y0brm.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
- import { e as LoopTraceEmitter, c as LoopTraceEvent, S as SandboxClient, A as AgentRunSpec, E as ExecCtx } from './types-B-jWSfcu.js';
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-C7kp_ECN.js';
8
+ import { T as ToolSpec, R as RouterConfig } from './router-client-CMAWGv1h.js';
9
9
  import { L as LocalHarness } from './local-harness-BE_h8szs.js';
10
10
 
11
11
  /**
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AgentProfile, AgentEvalError, AnalystFinding, KnowledgeReadinessReport, RunRecord, ControlEvalResult, KnowledgeRequirement } from '@tangle-network/agent-eval';
2
2
  export { AgentEvalError, AgentEvalErrorCode, ConfigError, ControlBudget, ControlDecision, ControlEvalResult, ControlRunResult, ControlStep, DataAcquisitionPlan, JudgeError, KnowledgeReadinessReport, KnowledgeRequirement, NotFoundError, RunRecord, ValidationError } from '@tangle-network/agent-eval';
3
- import { f as AgentBackendInput, g as AgentExecutionBackend, O as OpenAIChatTool, h as OpenAIChatToolChoice, i as OpenAIChatResponseFormat, j as AgentBackendContext, a as RuntimeStreamEvent, K as KnowledgeReadinessDecision, k as RunAgentTaskOptions, l as AgentTaskRunResult, m as RunAgentTaskStreamOptions, n as AgentRuntimeEvent, o as AgentTaskStatus, p as RuntimeSessionStore, q as RuntimeSession, R as RuntimeHooks } from './types-B-jWSfcu.js';
4
- export { r as AgentAdapter, s as AgentKnowledgeProvider, t as AgentRuntimeEventSink, u as AgentTaskContext, v as AgentTaskSpec, B as BackendErrorDetail, w as RuntimeDecisionEvidenceRef, x as RuntimeDecisionKind, y as RuntimeDecisionPoint, z as RuntimeHookContext, C as RuntimeHookErrorContext, D as RuntimeHookEvent, F as RuntimeHookPhase, G as RuntimeHookTarget, H as RuntimeRunHandle, J as RuntimeRunPersistenceAdapter, M as RuntimeRunRow, N as composeRuntimeHooks, P as defineRuntimeHooks, Q as notifyRuntimeDecisionPoint, T as notifyRuntimeHookEvent, U as startRuntimeRun } from './types-B-jWSfcu.js';
3
+ import { f as AgentBackendInput, g as AgentExecutionBackend, O as OpenAIChatTool, h as OpenAIChatToolChoice, i as OpenAIChatResponseFormat, j as AgentBackendContext, a as RuntimeStreamEvent, K as KnowledgeReadinessDecision, k as RunAgentTaskOptions, l as AgentTaskRunResult, m as RunAgentTaskStreamOptions, n as AgentRuntimeEvent, o as AgentTaskStatus, p as RuntimeSessionStore, q as RuntimeSession, R as RuntimeHooks } from './types-BF-MEsQB.js';
4
+ export { r as AgentAdapter, s as AgentKnowledgeProvider, t as AgentRuntimeEventSink, u as AgentTaskContext, v as AgentTaskSpec, B as BackendErrorDetail, w as RuntimeDecisionEvidenceRef, x as RuntimeDecisionKind, y as RuntimeDecisionPoint, z as RuntimeHookContext, C as RuntimeHookErrorContext, D as RuntimeHookEvent, F as RuntimeHookPhase, G as RuntimeHookTarget, H as RuntimeRunHandle, J as RuntimeRunPersistenceAdapter, M as RuntimeRunRow, N as composeRuntimeHooks, P as defineRuntimeHooks, Q as notifyRuntimeDecisionPoint, T as notifyRuntimeHookEvent, U as startRuntimeRun } from './types-BF-MEsQB.js';
5
5
  import { Scenario, ProfileDispatchFn } from '@tangle-network/agent-eval/campaign';
6
6
  import { C as CandidateGenerator } from './mcp-serve-verifier-CT1KLTG_.js';
7
7
  export { A as AgenticGeneratorOptions, I as ImprovementDriverOptions, M as McpServeSpec, V as Verifier, a as VerifyResult, b as agenticGenerator, c as commandVerifier, i as improvementDriver, m as mcpServeVerifier } from './mcp-serve-verifier-CT1KLTG_.js';
@@ -9,15 +9,15 @@ 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-Dbtg787n.js';
13
- export { m as mcpToolsForRuntimeMcp, a as mcpToolsForRuntimeMcpSubset } from './openai-tools-D5tcirFF.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-BTMpf1oY.js';
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-BE_h8szs.js';
17
17
  import 'node:child_process';
18
18
  import './kb-gate-CuzMYGYM.js';
19
- import './worktree-CDxqwxGo.js';
20
- import './worktree-fanout-CljF1L2v.js';
19
+ import './worktree-DH_Y0brm.js';
20
+ import './worktree-fanout-DGC7jS7i.js';
21
21
 
22
22
  /**
23
23
  * @stable
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  mcpToolsForRuntimeMcp,
3
3
  mcpToolsForRuntimeMcpSubset
4
- } from "./chunk-MRWXCFV5.js";
4
+ } from "./chunk-OL2SEETC.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-QKNBYHMK.js";
23
+ } from "./chunk-QJ6BWENI.js";
24
24
  import "./chunk-FNMGYYSS.js";
25
- import "./chunk-SA5GCF2X.js";
25
+ import "./chunk-YHS6I2IS.js";
26
26
  import {
27
27
  assertModelAllowed,
28
28
  composeRuntimeHooks,
29
29
  defineRuntimeHooks,
30
30
  notifyRuntimeDecisionPoint,
31
31
  notifyRuntimeHookEvent
32
- } from "./chunk-ZKMOIEOB.js";
32
+ } from "./chunk-OLPH6W3J.js";
33
33
  import {
34
34
  INTELLIGENCE_WIRE_VERSION,
35
35
  buildLoopOtelSpans,
@@ -1,6 +1,6 @@
1
- import { c as LoopTraceEvent } from './types-B-jWSfcu.js';
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-C7kp_ECN.js';
3
+ import { T as ToolSpec } from './router-client-CMAWGv1h.js';
4
4
  import '@tangle-network/agent-eval';
5
5
  import '@tangle-network/sandbox';
6
6
 
@@ -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 './worktree-CDxqwxGo.js';
6
- import { A as AuthoredHarness, W as WinnerStrategy, a as WorktreeFanoutOptions, b as WorktreePatchArtifact } from './worktree-fanout-CljF1L2v.js';
5
+ import { B as Budget } from './worktree-DH_Y0brm.js';
6
+ import { A as AuthoredHarness, W as WinnerStrategy, a as WorktreeFanoutOptions, b as WorktreePatchArtifact } from './worktree-fanout-DGC7jS7i.js';
7
7
 
8
8
  /**
9
9
  * @experimental
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- export { L as LoopRunnerCliArgs, e as LoopRunnerCliResult, p as parseLoopRunnerArgv, k as runLoopRunnerCli } from './loop-runner-bin-Dbtg787n.js';
2
+ export { L as LoopRunnerCliArgs, e as LoopRunnerCliResult, p as parseLoopRunnerArgv, k as runLoopRunnerCli } from './loop-runner-bin-BTMpf1oY.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 './worktree-CDxqwxGo.js';
8
+ import './worktree-DH_Y0brm.js';
9
9
  import '@tangle-network/agent-interface';
10
10
  import '@tangle-network/sandbox';
11
- import './types-B-jWSfcu.js';
12
- import './worktree-fanout-CljF1L2v.js';
11
+ import './types-BF-MEsQB.js';
12
+ import './worktree-fanout-DGC7jS7i.js';
13
13
  import './local-harness-BE_h8szs.js';
14
14
  import 'node:child_process';
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  parseLoopRunnerArgv,
4
4
  runLoopRunnerCli
5
- } from "./chunk-QKNBYHMK.js";
5
+ } from "./chunk-QJ6BWENI.js";
6
6
  import "./chunk-FNMGYYSS.js";
7
- import "./chunk-SA5GCF2X.js";
8
- import "./chunk-ZKMOIEOB.js";
7
+ import "./chunk-YHS6I2IS.js";
8
+ import "./chunk-OLPH6W3J.js";
9
9
  import "./chunk-VMNEQHJR.js";
10
10
  import "./chunk-IODKUOBA.js";
11
11
  import "./chunk-T2HVQVB4.js";
package/dist/loops.d.ts CHANGED
@@ -1,20 +1,20 @@
1
1
  import { ChatClient, AnalystFinding, AgentProfile, AnalystRunInputs, ToolSpan, StreamingDetector, DetectorSignal, buildTrajectory } from '@tangle-network/agent-eval';
2
2
  export { AnalystFinding, DefaultVerdict, computeFindingId, makeFinding } from '@tangle-network/agent-eval';
3
- import { SandboxInstance, CreateSandboxOptions, SandboxEvent } from '@tangle-network/sandbox';
3
+ import { SandboxEvent, SandboxInstance, CreateSandboxOptions } from '@tangle-network/sandbox';
4
4
  export { AgentProfile, CreateSandboxOptions, SandboxEvent, SandboxInstance } from '@tangle-network/sandbox';
5
- import { e as ResultBlobStore, S as SpawnJournal, N as NodeId, n as SpawnEvent, m as ExecutorFactory, d as Agent, B as Budget, j as Scope, h as Settled, g as SupervisedResult, l as DeliverableSpec, i as Spend, U as UsageEvent, E as ExecutorRegistry, o as Supervisor } from './worktree-CDxqwxGo.js';
6
- export { A as AgentSpec, k as Executor, p as ExecutorContext, q as ExecutorResult, s as SupervisorOpts, T as TreeView, t as WidenGate, u as gateOnDeliverable } from './worktree-CDxqwxGo.js';
7
- import { ak as MakeWorkerAgent, o as CoordinationTools, A as AnalystRegistry, n as CoordinationEvent, ar as QuestionPolicy, a$ as ExecutorConfig } from './coordination-c_7Olmtq.js';
8
- export { b0 as BusEvent, b1 as BusRecord, b2 as BusStats, b3 as EventBus, b4 as PublishOptions, b5 as cliWorktreeExecutor, b6 as createEventBus, b7 as createExecutor, b8 as createExecutorRegistry } from './coordination-c_7Olmtq.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-B-jWSfcu.js';
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-B-jWSfcu.js';
11
- 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-CljF1L2v.js';
12
- 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, a3 as WorktreeCommandResult, a as WorktreeFanoutOptions, b as WorktreePatchArtifact, a4 as createWorktreeCliExecutor, a5 as patchDelivered, a6 as worktreeFanout } from './worktree-fanout-CljF1L2v.js';
5
+ import { e as ResultBlobStore, S as SpawnJournal, N as NodeId, n as SpawnEvent, m as ExecutorFactory, d as Agent, B as Budget, j as Scope, h as Settled, g as SupervisedResult, l as DeliverableSpec, i as Spend, U as UsageEvent, E as ExecutorRegistry, o as Supervisor } from './worktree-DH_Y0brm.js';
6
+ export { A as AgentSpec, k as Executor, p as ExecutorContext, q as ExecutorResult, s as SupervisorOpts, T as TreeView, t as WidenGate, u as gateOnDeliverable } from './worktree-DH_Y0brm.js';
7
+ import { ak as MakeWorkerAgent, o as CoordinationTools, A as AnalystRegistry, n as CoordinationEvent, ar as QuestionPolicy, a$ as ExecutorConfig } from './coordination-Csxsy39a.js';
8
+ export { b0 as BusEvent, b1 as BusRecord, b2 as BusStats, b3 as EventBus, b4 as PublishOptions, b5 as cliWorktreeExecutor, b6 as createEventBus, b7 as createExecutor, b8 as createExecutorRegistry } from './coordination-Csxsy39a.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';
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
+ 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-DGC7jS7i.js';
12
+ 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, a3 as WorktreeCommandResult, a as WorktreeFanoutOptions, b as WorktreePatchArtifact, a4 as createWorktreeCliExecutor, a5 as patchDelivered, a6 as worktreeFanout } from './worktree-fanout-DGC7jS7i.js';
13
13
  import { Scenario, ProfileDispatchFn } from '@tangle-network/agent-eval/campaign';
14
14
  import { b as AnalystRegistryLike } from './types-BC3bZpH0.js';
15
15
  import { AgentProfile as AgentProfile$1 } from '@tangle-network/agent-interface';
16
- import { R as RouterConfig, a as ToolLoopChat } from './router-client-C7kp_ECN.js';
17
- export { b as RouterChatResult, c as RouterChatToolsResult, d as RouterToolCall, e as RouterToolLoopResult, T as ToolSpec, r as routerBrain, f as routerChatWithTools, g as routerChatWithUsage, h as routerToolLoop } from './router-client-C7kp_ECN.js';
16
+ import { R as RouterConfig, a as ToolLoopChat } from './router-client-CMAWGv1h.js';
17
+ export { b as RouterChatResult, c as RouterChatToolsResult, d as RouterToolCall, e as RouterToolLoopResult, T as ToolSpec, r as routerBrain, f as routerChatWithTools, g as routerChatWithUsage, h as routerToolLoop } from './router-client-CMAWGv1h.js';
18
18
  import { stuckLoopView, toolWasteView } from '@tangle-network/agent-eval/pipelines';
19
19
  import './substrate-rNj6TDc3.js';
20
20
  import './otel-export-BKmNwiCb.js';
@@ -470,6 +470,55 @@ interface HarvestReport {
470
470
  }
471
471
  declare function harvestCorpus(opts: HarvestCorpusOptions): Promise<HarvestReport>;
472
472
 
473
+ /** Context handed to each `onPrompt` call. */
474
+ interface InProcessPromptCtx {
475
+ /** 0-based round index — increments per `streamPrompt` on the SAME box (so a
476
+ * refine driver's round N can differ from round N-1). Fresh boxes start at 0. */
477
+ round: number;
478
+ /** Absolute path of this box's workspace, when a `workdir` was configured.
479
+ * Write the deliverable / fixtures here; `fs.read`/`fs.write`/`exec` operate
480
+ * over it. `undefined` for pure event-only boxes. */
481
+ workdir?: string;
482
+ /** Cooperative cancellation channel for this turn. */
483
+ signal: AbortSignal;
484
+ }
485
+ /**
486
+ * The user callback: given a prompt and its round, produce the box's event
487
+ * stream for that turn. Return a plain `SandboxEvent[]` (the common case) or an
488
+ * async iterable for streaming. The callback may also write files into
489
+ * `ctx.workdir` (read back via `fs.read` or graded by `exec`).
490
+ */
491
+ type InProcessOnPrompt = (prompt: string, ctx: InProcessPromptCtx) => SandboxEvent[] | AsyncIterable<SandboxEvent> | Promise<SandboxEvent[]>;
492
+ /** @experimental */
493
+ interface InProcessSandboxClientOptions {
494
+ /** The per-turn behavior — see {@link InProcessOnPrompt}. */
495
+ onPrompt: InProcessOnPrompt;
496
+ /**
497
+ * Opt in to a REAL filesystem-backed box. When set, each `create()` mints a
498
+ * fresh temp directory (prefixed `<workdir>-`) and the box exposes
499
+ * `fs.read`/`fs.write` and `exec` over it; `delete()` removes the dir. Omit
500
+ * for a pure event-only box (no `fs`/`exec` members), which is all a driver
501
+ * or fanout loop needs.
502
+ */
503
+ workdir?: string;
504
+ /**
505
+ * Override the box `id`. A string is used verbatim; a function receives the
506
+ * 0-based create-sequence and returns the id (e.g. machine-keyed placement
507
+ * demos). Default `in-process-<seq>`. The id is the value `describePlacement`
508
+ * tags, so set it when a demo's output reads on a meaningful sandbox id.
509
+ */
510
+ id?: string | ((seq: number) => string);
511
+ }
512
+ /**
513
+ * Adapt a single `onPrompt(prompt, ctx)` callback into a `SandboxClient` for
514
+ * `runLoop` / `openSandboxRun`. Returns a PROPERLY-TYPED `SandboxClient`: the
515
+ * lone `SandboxInstance` cast (object literal → `declare class`) lives inside
516
+ * this function, so call sites stay cast-free.
517
+ *
518
+ * @experimental
519
+ */
520
+ declare function inProcessSandboxClient(options: InProcessSandboxClientOptions): SandboxClient;
521
+
473
522
  /**
474
523
  * Adapt an `ExecutorFactory` into a `SandboxClient` for `runLoop`. The factory is
475
524
  * instantiated fresh per `streamPrompt` (mirrors the per-spawn executor lifecycle):
@@ -696,6 +745,12 @@ interface AgenticOptions {
696
745
  routerBaseUrl: string;
697
746
  routerKey: string;
698
747
  model: string;
748
+ /** Optional completion transport (see `RouterConfig.complete`): when set, BOTH legs of an
749
+ * offline run use it instead of `fetch`-ing the router — the worker's tool loop (threaded into
750
+ * its `routerToolLoop` cfg) AND the analyst's critic (its `ChatClient` is bound to this same
751
+ * transport). One injected responder serves both, as a localhost mock endpoint would. Absent ⇒
752
+ * the live router fetch path (the default). */
753
+ complete?: (body: Record<string, unknown>) => Promise<unknown>;
699
754
  temperature?: number;
700
755
  /** Completion cap per worker turn — REQUIRED for thinking models (they burn unbounded
701
756
  * budgets on reasoning and return empty content without it). Omitted ⇒ provider default. */
@@ -1877,6 +1932,128 @@ interface OpenSandboxRunOptions {
1877
1932
  */
1878
1933
  declare function openSandboxRun<Out>(client: SandboxClient, options: OpenSandboxRunOptions, deliverable: Deliverable<Out>): Promise<SandboxRun<Out>>;
1879
1934
 
1935
+ /**
1936
+ * @experimental
1937
+ *
1938
+ * Leak-free steering drivers — the non-LLM controls for the driven loop.
1939
+ *
1940
+ * These are the two sibling `Driver`s of the `refine` reference driver
1941
+ * (examples/driver-loop/driver-loop.ts), differing ONLY in how much of the
1942
+ * prior `verdict` their `plan()` is allowed to read. The amount of the verdict
1943
+ * a driver reads IS the experimental axis:
1944
+ *
1945
+ * • refine — reads `verdict.notes` (and/or `verdict.scores`): the grader's
1946
+ * findings. A reviewer/judge LLM turns those findings into the
1947
+ * next prompt. This is the "coached" condition.
1948
+ * • dumb — reads ONLY `verdict.valid` (the pass/fail boolean). No findings,
1949
+ * no scores, no LLM. The next prompt is one of two fixed strings
1950
+ * keyed on pass/fail. This is the leak-free pass/fail control.
1951
+ * • naive — reads NOTHING from the verdict. The next prompt is one fixed
1952
+ * continuation string every round. This is the leak-free
1953
+ * no-signal control.
1954
+ *
1955
+ * The `dumb → refine` gap measured on the same task therefore isolates how much
1956
+ * the grader's findings (its notes/scores) inflate the result beyond a bare
1957
+ * pass/fail signal: it is exactly the delta between reading `verdict.valid` and
1958
+ * reading `verdict.notes`. The `naive → dumb` gap isolates the value of the
1959
+ * pass/fail bit alone. Run all three against one task to attribute a loop's
1960
+ * lift to its actual source instead of crediting it to the grader for free.
1961
+ *
1962
+ * GENERALITY CONTRACT
1963
+ * -------------------
1964
+ * These builders carry ZERO domain coupling:
1965
+ * • The continuation strings are PARAMETERS. The caller passes its own text;
1966
+ * the substrate hardcodes none.
1967
+ * • The Task shape is OPAQUE. The builder never assumes a `prompt` field (or
1968
+ * any field). The caller supplies `applyContinuation(task, text) → Task`,
1969
+ * which folds a steering string into the caller's own Task shape — exactly
1970
+ * symmetric with the caller-supplied `AgentRunSpec.taskToPrompt`. For a Task
1971
+ * that is `{ prompt: string; … }`, the fold is the one-liner
1972
+ * `(task, text) => ({ ...task, prompt: text })`.
1973
+ *
1974
+ * They consume nothing the loop kernel does not already give `plan()`/`decide()`
1975
+ * — `runLoop` requires no change. A benchmark picks a driver by name and the
1976
+ * kernel does the rest.
1977
+ */
1978
+
1979
+ /**
1980
+ * Terminal-or-continue decision shared by all three steering drivers. The
1981
+ * non-terminal `'refine'` keeps the loop running another shot; the terminal
1982
+ * `'pick-winner'`/`'fail'` stop it (`isTerminalDecision` in run-loop.ts treats
1983
+ * `'pick-winner'` and `'fail'` as terminal and any other string as a request
1984
+ * for another round). Identical to the reference refine driver's decision set.
1985
+ */
1986
+ type SteeringDecision = 'refine' | 'pick-winner' | 'fail';
1987
+ /**
1988
+ * Fold a steering string into the caller's Task shape, producing the Task for
1989
+ * the next shot. The substrate never assumes how a Task carries its prompt, so
1990
+ * the caller supplies this — the same way it supplies `taskToPrompt`. The
1991
+ * original `task` is passed so the fold can preserve task-level fields (ids,
1992
+ * fixtures, feature names) and replace only the instruction.
1993
+ */
1994
+ type ApplyContinuation<Task> = (task: Task, continuation: string) => Task;
1995
+ /** Options for {@link naiveDriver}. */
1996
+ interface NaiveDriverOptions<Task> {
1997
+ /**
1998
+ * The fixed continuation issued every round after shot 0. The same string is
1999
+ * sent whether the prior shot passed inspection or not — the naive driver
2000
+ * reads no part of the verdict. Domain text is the caller's; the substrate
2001
+ * supplies none.
2002
+ */
2003
+ continuation: string;
2004
+ /** Folds `continuation` into the caller's Task shape for the next shot. */
2005
+ applyContinuation: ApplyContinuation<Task>;
2006
+ /** Hard shot cap. The loop stops refining once history reaches this length. */
2007
+ maxIterations: number;
2008
+ /** Trace-event identifier. Default `'naive'`. */
2009
+ name?: string;
2010
+ }
2011
+ /**
2012
+ * `naiveDriver` — the no-signal steering control.
2013
+ *
2014
+ * `plan()` runs the initial `task` at shot 0, then issues the SAME fixed
2015
+ * `continuation` every subsequent round until a shot is valid or the cap is
2016
+ * hit. It reads NOTHING from `history[last].verdict` — not `.valid`, not
2017
+ * `.notes`, not `.scores`. It is the floor a coached loop must beat to earn its
2018
+ * coaching: any lift over naive that is not also present in `dumb` is
2019
+ * attributable to the pass/fail bit, and any lift of `refine` over `dumb` is
2020
+ * attributable to the grader's findings.
2021
+ */
2022
+ declare function naiveDriver<Task, Output>(options: NaiveDriverOptions<Task>): Driver<Task, Output, SteeringDecision>;
2023
+ /** Options for {@link dumbDriver}. */
2024
+ interface DumbDriverOptions<Task> {
2025
+ /**
2026
+ * Continuation issued when the prior shot's verdict is valid. In a
2027
+ * stop-on-pass loop this is rarely reached (a valid shot ends the loop), but
2028
+ * it is required so the driver is total over the pass/fail bit; pass a
2029
+ * confirmation/keep-going string.
2030
+ */
2031
+ onPass: string;
2032
+ /** Continuation issued when the prior shot's verdict is NOT valid. */
2033
+ onFail: string;
2034
+ /** Folds the chosen continuation into the caller's Task shape. */
2035
+ applyContinuation: ApplyContinuation<Task>;
2036
+ /** Hard shot cap. The loop stops refining once history reaches this length. */
2037
+ maxIterations: number;
2038
+ /** Trace-event identifier. Default `'dumb'`. */
2039
+ name?: string;
2040
+ }
2041
+ /**
2042
+ * `dumbDriver` — the pass/fail-only steering control.
2043
+ *
2044
+ * `plan()` runs the initial `task` at shot 0, then reads ONLY
2045
+ * `history[last].verdict.valid` (the boolean) and issues `onPass` or `onFail`
2046
+ * accordingly. It MUST NOT read `.notes` or `.scores` — that boundary is the
2047
+ * leak-free firewall. A `verdict` with no `valid` set (or no verdict) is
2048
+ * treated as not-valid, so the driver is total and never throws on a
2049
+ * grader/transport gap.
2050
+ *
2051
+ * The `dumb → refine` gap is the headline measurement: refine reads the
2052
+ * grader's `notes`, dumb reads only the pass/fail bit, so the difference is
2053
+ * exactly the value the findings add over a bare boolean.
2054
+ */
2055
+ declare function dumbDriver<Task, Output>(options: DumbDriverOptions<Task>): Driver<Task, Output, SteeringDecision>;
2056
+
1880
2057
  /**
1881
2058
  * authorStrategy — the agent-authored layer as a package primitive (software-3.0): an
1882
2059
  * LLM reads a benchmark's per-task LOSSES + the defineStrategy contract and writes a NEW
@@ -3065,4 +3242,4 @@ declare function runInWorkspace<T>(ws: Workspace, body: (cwd: string) => Promise
3065
3242
  commitOnInvalid?: boolean;
3066
3243
  }): Promise<WorkspaceRun<T>>;
3067
3244
 
3068
- export { Agent, AgentRunSpec, type AgenticOptions, type AgenticRunResult, type AgenticSurface, type AgenticTask, type AgenticTool, type AnytimeReport, type AnytimeStrategySummary, type AnytimeTaskCurve, 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 Environment, EqualKArm, EqualKOnCostOptions, EqualKVerdict, type EvolutionArchiveNode, type EvolutionAuthor, type EvolutionBandInfo, type EvolutionCandidate, type EvolutionGeneration, type EvolutionReport, ExecCtx, ExecutorConfig, FanoutOptions, FanoutWinnerSelector, FileCorpus, type ForkCapableBox, type GitWorkspaceOptions, type HarvestCorpusOptions, type HarvestFailure, type HarvestReport, InMemoryCorpus, InMemoryResultBlobStore, type InMemoryRunContext, type InMemoryRunContextOptions, InMemorySpawnJournal, type Inbox, type InboxMessage, type IntentAudit, Iteration, type LoopDispatchOptions, LoopLineageOptions, type LoopOptionsForDispatch, LoopResult, LoopShape, LoopTokenUsage, LoopUntilSpec, LoopWinner, type McpEndpoint, type McpEnvironmentOptions, MountRecorder, type Observation, type ObserveInput, type ObserveOptions, type OpenSandboxRunOptions, Outcome, OutputAdapter, 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 Strategy, type StrategyCtx, type StrategyEvolutionConfig, type StrategyResult, type SuperviseOptions, SupervisedResult, Supervisor, type SupervisorAgentDeps, type SupervisorProfile, type SurfaceScore, ToolLoopChat, 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, equalKOnCost, extractLlmCallEvent, fanout, finalizeBestDelivered, flatWidenGate, gitWorkspace, harvestCorpus, inlineSandboxClient, jjWorkspace, localShell, loopDispatch, loopUntil, mapSandboxEvent, observe, openSandboxRun, panel, pickChampion, pipeline, printBenchmarkReport, probeSandboxCapabilities, profileRichnessFinding, promotionGate, refine, registerShape, registryScopeAnalyst, renderAnytimeTable, renderCorpusToInstructions, renderReport, reportLoopUsage, runAgentic, runBenchmark, runInWorkspace, runLoop, runPersonified, runStrategyEvolution, sample, sampleThenRefine, sandboxSessionTraceSource, selectChampion, selectValidWinner, sentinelCompletion, serveCoordinationMcp, settledToIteration, spendFromUsageEvents, stopSentinel, strategyAuthorContract, supervise, supervisorAgent, supervisorInstructions, trajectoryReport, verify, watchTrace, widen, workerFromBackend };
3245
+ export { Agent, AgentRunSpec, type AgenticOptions, type AgenticRunResult, type AgenticSurface, type AgenticTask, type AgenticTool, 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, 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, Iteration, type LoopDispatchOptions, LoopLineageOptions, type LoopOptionsForDispatch, LoopResult, LoopShape, LoopTokenUsage, LoopUntilSpec, LoopWinner, type McpEndpoint, type McpEnvironmentOptions, MountRecorder, type NaiveDriverOptions, type Observation, type ObserveInput, type ObserveOptions, type OpenSandboxRunOptions, Outcome, OutputAdapter, 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, SupervisedResult, Supervisor, type SupervisorAgentDeps, type SupervisorProfile, type SurfaceScore, ToolLoopChat, 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, fanout, finalizeBestDelivered, flatWidenGate, gitWorkspace, harvestCorpus, inProcessSandboxClient, inlineSandboxClient, jjWorkspace, localShell, loopDispatch, loopUntil, mapSandboxEvent, naiveDriver, observe, openSandboxRun, panel, pickChampion, pipeline, printBenchmarkReport, probeSandboxCapabilities, profileRichnessFinding, promotionGate, refine, registerShape, registryScopeAnalyst, renderAnytimeTable, renderCorpusToInstructions, renderReport, reportLoopUsage, runAgentic, runBenchmark, runInWorkspace, runLoop, runPersonified, runStrategyEvolution, sample, sampleThenRefine, sandboxSessionTraceSource, selectChampion, selectValidWinner, sentinelCompletion, serveCoordinationMcp, settledToIteration, spendFromUsageEvents, stopSentinel, strategyAuthorContract, supervise, supervisorAgent, supervisorInstructions, trajectoryReport, verify, watchTrace, widen, workerFromBackend };
package/dist/loops.js CHANGED
@@ -29,17 +29,20 @@ import {
29
29
  depthStrategy,
30
30
  deterministicCompletion,
31
31
  discriminatingMeans,
32
+ dumbDriver,
32
33
  equalKOnCost,
33
34
  fanout,
34
35
  flatWidenGate,
35
36
  gitWorkspace,
36
37
  harvestCorpus,
38
+ inProcessSandboxClient,
37
39
  inlineSandboxClient,
38
40
  jjWorkspace,
39
41
  localShell,
40
42
  loopDispatch,
41
43
  loopUntil,
42
44
  makeFinding,
45
+ naiveDriver,
43
46
  observe,
44
47
  openSandboxRun,
45
48
  panel,
@@ -73,7 +76,7 @@ import {
73
76
  watchTrace,
74
77
  widen,
75
78
  worktreeFanout
76
- } from "./chunk-SA5GCF2X.js";
79
+ } from "./chunk-YHS6I2IS.js";
77
80
  import {
78
81
  InMemoryResultBlobStore,
79
82
  InMemorySpawnJournal,
@@ -115,7 +118,7 @@ import {
115
118
  supervisorAgent,
116
119
  supervisorInstructions,
117
120
  workerFromBackend
118
- } from "./chunk-ZKMOIEOB.js";
121
+ } from "./chunk-OLPH6W3J.js";
119
122
  import "./chunk-VMNEQHJR.js";
120
123
  import {
121
124
  extractLlmCallEvent,
@@ -180,6 +183,7 @@ export {
180
183
  deterministicCompletion,
181
184
  discriminatingMeans,
182
185
  driverAgent,
186
+ dumbDriver,
183
187
  equalKOnCost,
184
188
  extractLlmCallEvent,
185
189
  fanout,
@@ -188,6 +192,7 @@ export {
188
192
  gateOnDeliverable,
189
193
  gitWorkspace,
190
194
  harvestCorpus,
195
+ inProcessSandboxClient,
191
196
  inlineSandboxClient,
192
197
  jjWorkspace,
193
198
  localShell,
@@ -195,6 +200,7 @@ export {
195
200
  loopUntil,
196
201
  makeFinding,
197
202
  mapSandboxEvent,
203
+ naiveDriver,
198
204
  observe,
199
205
  openSandboxRun,
200
206
  panel,
package/dist/mcp/bin.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  DelegationTaskQueue,
10
10
  FileDelegationStore,
11
11
  createMcpServer
12
- } from "../chunk-ZKMOIEOB.js";
12
+ } from "../chunk-OLPH6W3J.js";
13
13
  import "../chunk-VMNEQHJR.js";
14
14
  import "../chunk-T2HVQVB4.js";
15
15
  import "../chunk-O2UPHN7X.js";
@@ -1,18 +1,18 @@
1
- import { S as SandboxClient, d as LoopSandboxPlacement } from '../types-B-jWSfcu.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-c_7Olmtq.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-c_7Olmtq.js';
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-Csxsy39a.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-Csxsy39a.js';
4
4
  import { L as LocalHarness, r as runLocalHarness } from '../local-harness-BE_h8szs.js';
5
5
  export { a as LocalHarnessResult, R as RunLocalHarnessOptions } from '../local-harness-BE_h8szs.js';
6
- import { G as GitRunner } from '../worktree-CDxqwxGo.js';
7
- export { C as CreateWorktreeOptions, D as DiffOptions, a as DiffResult, R as RemoveWorktreeOptions, W as WorktreeHandle, c as captureWorktreeDiff, b as createWorktree, r as removeWorktree } from '../worktree-CDxqwxGo.js';
6
+ import { G as GitRunner } from '../worktree-DH_Y0brm.js';
7
+ export { C as CreateWorktreeOptions, D as DiffOptions, a as DiffResult, R as RemoveWorktreeOptions, W as WorktreeHandle, c as captureWorktreeDiff, b as createWorktree, r as removeWorktree } from '../worktree-DH_Y0brm.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
- export { m as mcpToolsForRuntimeMcp, a as mcpToolsForRuntimeMcpSubset } from '../openai-tools-D5tcirFF.js';
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
13
  import '@tangle-network/agent-interface';
14
14
  import '../otel-export-BKmNwiCb.js';
15
- import '../router-client-C7kp_ECN.js';
15
+ import '../router-client-CMAWGv1h.js';
16
16
  import 'node:child_process';
17
17
 
18
18
  /**
package/dist/mcp/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  mcpToolsForRuntimeMcp,
8
8
  mcpToolsForRuntimeMcpSubset
9
- } from "../chunk-MRWXCFV5.js";
9
+ } from "../chunk-OL2SEETC.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-SA5GCF2X.js";
17
+ } from "../chunk-YHS6I2IS.js";
18
18
  import {
19
19
  DELEGATE_DESCRIPTION,
20
20
  DELEGATE_FEEDBACK_DESCRIPTION,
@@ -68,7 +68,7 @@ import {
68
68
  validateDelegateUiAuditArgs,
69
69
  validateDelegationHistoryArgs,
70
70
  validateDelegationStatusArgs
71
- } from "../chunk-ZKMOIEOB.js";
71
+ } from "../chunk-OLPH6W3J.js";
72
72
  import "../chunk-VMNEQHJR.js";
73
73
  import "../chunk-T2HVQVB4.js";
74
74
  import {
@@ -1,4 +1,4 @@
1
- import { O as OpenAIChatTool } from './types-B-jWSfcu.js';
1
+ import { O as OpenAIChatTool } from './types-BF-MEsQB.js';
2
2
 
3
3
  /**
4
4
  * @experimental
@@ -1,6 +1,6 @@
1
1
  import { a as UiFinding, U as UiLens } from './substrate-rNj6TDc3.js';
2
2
  export { C as CoderTask, b as UI_FINDING_SEVERITIES, c as UI_LENSES, d as UiFindingScreenshot, e as UiFindingSeverity, f as coderTaskToPrompt } from './substrate-rNj6TDc3.js';
3
- import { S as SandboxClient, b as OutputAdapter, V as Validator, A as AgentRunSpec } from './types-B-jWSfcu.js';
3
+ import { S as SandboxClient, b as OutputAdapter, V as Validator, A as AgentRunSpec } from './types-BF-MEsQB.js';
4
4
  import { SandboxEvent } from '@tangle-network/sandbox';
5
5
  import { AgentProfile } from '@tangle-network/agent-interface';
6
6
  import '@tangle-network/agent-eval';
@@ -40,6 +40,14 @@ interface RouterConfig {
40
40
  routerBaseUrl: string;
41
41
  routerKey: string;
42
42
  model: string;
43
+ /**
44
+ * Optional completion transport. When set, `routerChatWithUsage` / `routerChatWithTools` call it
45
+ * with the OpenAI-shape request body and use the parsed `/chat/completions` JSON it returns,
46
+ * INSTEAD of `fetch(routerBaseUrl + '/chat/completions')`. When absent the fetch path runs
47
+ * unchanged — the live router stays the default. The injection seam an offline benchmark uses to
48
+ * drive the worker with no network: a deterministic in-process responder satisfies it, no server.
49
+ */
50
+ complete?: (body: Record<string, unknown>) => Promise<unknown>;
43
51
  }
44
52
  interface RouterChatResult {
45
53
  content: string;
@@ -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
@@ -1,7 +1,7 @@
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-DH_Y0brm.js';
4
+ import { R as RuntimeHooks, I as Iteration } from './types-BF-MEsQB.js';
5
5
  import { BackendType } from '@tangle-network/sandbox';
6
6
  import { L as LocalHarness, r as runLocalHarness } from './local-harness-BE_h8szs.js';
7
7