@tangle-network/agent-runtime 0.46.0 → 0.48.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 (38) hide show
  1. package/dist/agent.d.ts +1 -1
  2. package/dist/agent.js +1 -1
  3. package/dist/analyst-loop.d.ts +1 -1
  4. package/dist/{chunk-GN75RGM6.js → chunk-656G2XCL.js} +3 -3
  5. package/dist/{chunk-65FQLI4V.js → chunk-IW2LMLK6.js} +1714 -42
  6. package/dist/chunk-IW2LMLK6.js.map +1 -0
  7. package/dist/{chunk-I42NHLKX.js → chunk-LX66I3SC.js} +11 -6
  8. package/dist/chunk-LX66I3SC.js.map +1 -0
  9. package/dist/{chunk-KPN7OQ64.js → chunk-TJS7S3HJ.js} +2 -2
  10. package/dist/{chunk-KPN7OQ64.js.map → chunk-TJS7S3HJ.js.map} +1 -1
  11. package/dist/{coder-DCWFQpmJ.d.ts → coder-CVZNGbyg.d.ts} +1 -1
  12. package/dist/{driver-C-mtBo7h.d.ts → driver-DYU2sgHr.d.ts} +1 -1
  13. package/dist/index.d.ts +7 -7
  14. package/dist/index.js +3 -3
  15. package/dist/{kb-gate-2Gwpz_27.d.ts → kb-gate-51BlLlVM.d.ts} +8 -2
  16. package/dist/{loop-runner-bin-D-K6bRp3.d.ts → loop-runner-bin-DEm4roYF.d.ts} +4 -4
  17. package/dist/loop-runner-bin.d.ts +5 -5
  18. package/dist/loop-runner-bin.js +3 -3
  19. package/dist/loops.d.ts +5 -5
  20. package/dist/loops.js +55 -1
  21. package/dist/mcp/bin.js +3 -3
  22. package/dist/mcp/index.d.ts +71 -70
  23. package/dist/mcp/index.js +199 -27
  24. package/dist/mcp/index.js.map +1 -1
  25. package/dist/{otel-export-nurzFwuJ.d.ts → otel-export-EzfsVUhh.d.ts} +1 -1
  26. package/dist/profiles.d.ts +2 -2
  27. package/dist/{run-loop-CU2Y00Si.d.ts → run-loop-DvD4aGiE.d.ts} +1 -1
  28. package/dist/runtime.d.ts +915 -71
  29. package/dist/runtime.js +55 -1
  30. package/dist/{types-BfoeiQRZ.d.ts → types-BpDfCPUp.d.ts} +5 -5
  31. package/dist/{types-DnYoHvvZ.d.ts → types-nBMuollC.d.ts} +17 -0
  32. package/dist/workflow.d.ts +2 -2
  33. package/dist/workflow.js +1 -1
  34. package/package.json +25 -14
  35. package/skills/loop-writer/SKILL.md +163 -0
  36. package/dist/chunk-65FQLI4V.js.map +0 -1
  37. package/dist/chunk-I42NHLKX.js.map +0 -1
  38. /package/dist/{chunk-GN75RGM6.js.map → chunk-656G2XCL.js.map} +0 -0
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- export { L as LoopRunnerCliArgs, f as LoopRunnerCliResult, p as parseLoopRunnerArgv, o as runLoopRunnerCli } from './loop-runner-bin-D-K6bRp3.js';
2
+ export { L as LoopRunnerCliArgs, f as LoopRunnerCliResult, p as parseLoopRunnerArgv, o as runLoopRunnerCli } from './loop-runner-bin-DEm4roYF.js';
3
3
  import '@tangle-network/agent-eval/campaign';
4
4
  import '@tangle-network/agent-eval/contract';
5
5
  import './types-p8dWBIXL.js';
6
6
  import '@tangle-network/agent-eval';
7
- import './kb-gate-2Gwpz_27.js';
8
- import './coder-DCWFQpmJ.js';
7
+ import './kb-gate-51BlLlVM.js';
8
+ import './coder-CVZNGbyg.js';
9
9
  import '@tangle-network/sandbox';
10
- import './types-DnYoHvvZ.js';
10
+ import './types-nBMuollC.js';
11
11
  import './runtime-hooks-C7JwKb9E.js';
12
12
  import './substrate-CUgk7F7s.js';
13
- import './driver-C-mtBo7h.js';
13
+ import './driver-DYU2sgHr.js';
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  parseLoopRunnerArgv,
4
4
  runLoopRunnerCli
5
- } from "./chunk-GN75RGM6.js";
5
+ } from "./chunk-656G2XCL.js";
6
6
  import "./chunk-FNMGYYSS.js";
7
- import "./chunk-I42NHLKX.js";
7
+ import "./chunk-LX66I3SC.js";
8
8
  import "./chunk-KADIJAD4.js";
9
9
  import "./chunk-HNUXAZIJ.js";
10
- import "./chunk-65FQLI4V.js";
10
+ import "./chunk-IW2LMLK6.js";
11
11
  import "./chunk-GSUO5QS6.js";
12
12
  import "./chunk-DGUM43GV.js";
13
13
  export {
package/dist/loops.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { AgentProfile, CreateSandboxOptions, SandboxEvent, SandboxInstance } from '@tangle-network/sandbox';
2
- export { AssertTraceDerivedFindings, BridgeSeam, BudgetPool, BudgetReadout, CheckpointCapableBox, CliSeam, CombinatorShape, Corpus, CorpusFilter, CorpusRecord, CreateScopeAnalystOptions, CriuCapableClient, DefinePersona, DefinePersonaInput, Deliverable, EqualKArm, EqualKOnCost, EqualKOnCostOptions, EqualKVerdict, ExecutorConfig, Fanout, FanoutOptions, FanoutSynthesis, FileCorpus, FileResultBlobStore, FileSpawnJournal, FlatWidenGate, ForkCapableBox, InMemoryCorpus, InMemoryResultBlobStore, InMemorySpawnJournal, LoopDispatchOptions, LoopOptionsForDispatch, LoopShape, LoopUntil, LoopUntilSpec, LoopUntilState, OpenSandboxRunOptions, Outcome, Panel, PanelJudge, PanelSpec, PanelVerdict, Persona, PersonaContext, PersonaExecutors, Pipeline, PipelineStage, RenderCorpusToInstructions, RenderCorpusToInstructionsOptions, ReservationTicket, RouterSeam, RunPersonified, RunPersonifiedOptions, SandboxCapabilities, SandboxLineage, SandboxLineageHandle, SandboxRun, SandboxSeam, ScopeAnalyst, ScopeAnalyzeInput, ScopeWidenGate, SessionCapableBox, ShapeBudget, ShapeContext, ShapeRegistry, SteerContext, TrajectoryNode, TrajectoryReport, TrajectoryReportFn, TrajectoryReportOptions, TurnResult, UsageSink, Verify, VerifySpec, Widen, WidenDecision, WidenLineage, WidenSpec, acquireSandbox, assertTraceDerivedFindings, buildSteerContext, builtinShapes, contentAddress, createBudgetPool, createExecutor, createExecutorRegistry, createRootHandle, createSandboxLineage, createScope, createScopeAnalyst, createShapeRegistry, createSupervisor, definePersona, equalKOnCost, extractLlmCallEvent, fanout, flatWidenGate, inlineSandboxClient, loopDispatch, loopUntil, mapSandboxEvent, materializeTreeView, openSandboxRun, panel, pipeline, probeSandboxCapabilities, registerShape, renderCorpusToInstructions, replaySpawnTree, reportLoopUsage, runPersonified, settledToIteration, spendFromUsageEvents, trajectoryReport, verify, widen } from './runtime.js';
3
- export { A as AnalyzeInput, a as CompletionAnalyst, b as CompletionEvidence, c as CompletionPolicy, d as CompletionVerdict, C as CreateDriverOptions, D as DriverDecision, P as PlannerContext, e as TopologyMove, T as TopologyPlanner, f as completionAuthorizes, g as createDriver, h as deterministicCompletion, r as renderAnalyses, s as sentinelCompletion, i as stopSentinel } from './driver-C-mtBo7h.js';
4
- export { R as RunLoopOptions, c as createSandboxForSpec, d as defaultSelectWinner, r as runLoop } from './run-loop-CU2Y00Si.js';
5
- export { A as Agent, d as AgentSpec, B as Budget, j as Executor, k as ExecutorContext, E as ExecutorFactory, e as ExecutorRegistry, l as ExecutorResult, H as Handle, N as NodeId, m as NodeSnapshot, n as NodeStatus, o as Restart, R as ResultBlobStore, f as RootHandle, p as RootSignal, q as Runtime, S as Scope, c as Settled, b as SpawnEvent, a as SpawnJournal, r as SpawnOpts, h as Spend, g as SupervisedResult, i as Supervisor, s as SupervisorOpts, T as TreeView, U as UsageEvent, W as WidenGate } from './types-BfoeiQRZ.js';
6
- export { A as AgentRunSpec, D as Driver, E as ExecCtx, I as Iteration, C as LoopDecisionPayload, F as LoopEndedPayload, G as LoopIterationDispatchPayload, H as LoopIterationEndedPayload, J as LoopIterationStartedPayload, a as LoopLineageOptions, M as LoopPlanDescription, N as LoopPlanPayload, b as LoopResult, f as LoopSandboxPlacement, P as LoopStartedPayload, Q as LoopTeardownFailedPayload, c as LoopTokenUsage, e as LoopTraceEmitter, T as LoopTraceEvent, L as LoopWinner, O as OutputAdapter, S as SandboxClient, U as ValidationCtx, V as Validator } from './types-DnYoHvvZ.js';
2
+ export { AgenticOptions, AgenticRunResult, AgenticSurface, AgenticTask, AgenticTool, ArtifactHandle, AssertTraceDerivedFindings, AuditIntentInput, AuditIntentOptions, AuthorStrategyOptions, AuthoredStrategy, BenchmarkCell, BenchmarkConfig, BenchmarkLift, BenchmarkReport, BenchmarkStrategySummary, BenchmarkTaskRow, BridgeSeam, BudgetPool, BudgetReadout, ChampionPick, ChampionPolicy, CheckpointCapableBox, CliSeam, CombinatorShape, Corpus, CorpusFilter, CorpusRecord, CreateScopeAnalystOptions, CriuCapableClient, DefinePersona, DefinePersonaInput, Deliverable, Environment, EqualKArm, EqualKOnCost, EqualKOnCostOptions, EqualKVerdict, EvolutionArchiveNode, EvolutionAuthor, EvolutionCandidate, EvolutionGeneration, EvolutionReport, ExecutorConfig, Fanout, FanoutOptions, FanoutSynthesis, FileCorpus, FileResultBlobStore, FileSpawnJournal, FlatWidenGate, ForkCapableBox, GitWorkspaceOptions, HarvestCorpusOptions, HarvestFailure, HarvestReport, InMemoryCorpus, InMemoryResultBlobStore, InMemorySpawnJournal, IntentAudit, LoopDispatchOptions, LoopOptionsForDispatch, LoopShape, LoopUntil, LoopUntilSpec, LoopUntilState, McpEndpoint, McpEnvironmentOptions, Observation, ObserveInput, ObserveOptions, OpenSandboxRunOptions, Outcome, Panel, PanelJudge, PanelSpec, PanelVerdict, Persona, PersonaContext, PersonaExecutors, Pipeline, PipelineStage, PromotionGateOptions, PromotionVerdict, RenderCorpusToInstructions, RenderCorpusToInstructionsOptions, ReservationTicket, RouterSeam, RouterToolsSeam, RunAgenticOptions, RunPersonified, RunPersonifiedOptions, SandboxCapabilities, SandboxLineage, SandboxLineageHandle, SandboxRun, SandboxSeam, ScopeAnalyst, ScopeAnalyzeInput, ScopeWidenGate, SessionCapableBox, ShapeBudget, ShapeContext, ShapeRegistry, Shell, ShotPersona, ShotSpec, SteerContext, Strategy, StrategyCtx, StrategyEvolutionConfig, StrategyResult, SurfaceScore, ToolSpec, TrajectoryNode, TrajectoryReport, TrajectoryReportFn, TrajectoryReportOptions, TurnResult, UsageSink, VerifierEnvironmentOptions, Verify, VerifySpec, Widen, WidenDecision, WidenLineage, WidenSpec, Workspace, WorkspaceCommit, acquireSandbox, adaptiveRefine, assertStrategyContract, assertTraceDerivedFindings, auditIntent, authorStrategy, breadthDriver, buildSteerContext, builtinShapes, contentAddress, createBudgetPool, createExecutor, createExecutorRegistry, createMcpEnvironment, createRootHandle, createSandboxLineage, createScope, createScopeAnalyst, createShapeRegistry, createSupervisor, createVerifierEnvironment, defaultAnalystInstruction, defaultAuditorInstruction, definePersona, defineStrategy, depthDriver, equalKOnCost, extractLlmCallEvent, fanout, flatWidenGate, gitWorkspace, harvestCorpus, inlineSandboxClient, jjWorkspace, localShell, loopDispatch, loopUntil, mapSandboxEvent, materializeTreeView, observe, openSandboxRun, panel, pipeline, printBenchmarkReport, probeSandboxCapabilities, promotionGate, refine, registerShape, renderCorpusToInstructions, renderReport, replaySpawnTree, reportLoopUsage, runAgentic, runBenchmark, runPersonified, runStrategyEvolution, sample, sampleThenRefine, selectChampion, settledToIteration, spendFromUsageEvents, strategyAuthorContract, trajectoryReport, verify, widen } from './runtime.js';
3
+ export { A as AnalyzeInput, a as CompletionAnalyst, b as CompletionEvidence, c as CompletionPolicy, d as CompletionVerdict, C as CreateDriverOptions, D as DriverDecision, P as PlannerContext, e as TopologyMove, T as TopologyPlanner, f as completionAuthorizes, g as createDriver, h as deterministicCompletion, r as renderAnalyses, s as sentinelCompletion, i as stopSentinel } from './driver-DYU2sgHr.js';
4
+ export { R as RunLoopOptions, c as createSandboxForSpec, d as defaultSelectWinner, r as runLoop } from './run-loop-DvD4aGiE.js';
5
+ export { A as Agent, d as AgentSpec, B as Budget, j as Executor, k as ExecutorContext, h as ExecutorFactory, E as ExecutorRegistry, l as ExecutorResult, H as Handle, N as NodeId, m as NodeSnapshot, n as NodeStatus, o as Restart, R as ResultBlobStore, e as RootHandle, p as RootSignal, q as Runtime, S as Scope, c as Settled, b as SpawnEvent, a as SpawnJournal, r as SpawnOpts, g as Spend, f as SupervisedResult, i as Supervisor, s as SupervisorOpts, T as TreeView, U as UsageEvent, W as WidenGate } from './types-BpDfCPUp.js';
6
+ export { A as AgentRunSpec, D as Driver, E as ExecCtx, I as Iteration, C as LoopDecisionPayload, F as LoopEndedPayload, G as LoopIterationDispatchPayload, H as LoopIterationEndedPayload, J as LoopIterationStartedPayload, a as LoopLineageOptions, M as LoopPlanDescription, N as LoopPlanPayload, b as LoopResult, f as LoopSandboxPlacement, P as LoopStartedPayload, Q as LoopTeardownFailedPayload, c as LoopTokenUsage, e as LoopTraceEmitter, T as LoopTraceEvent, L as LoopWinner, O as OutputAdapter, S as SandboxClient, U as ValidationCtx, V as Validator } from './types-nBMuollC.js';
7
7
  export { DefaultVerdict } from '@tangle-network/agent-eval';
8
8
  import '@tangle-network/agent-eval/campaign';
9
9
  import './runtime-hooks-C7JwKb9E.js';
package/dist/loops.js CHANGED
@@ -6,7 +6,12 @@ import {
6
6
  InMemoryResultBlobStore,
7
7
  InMemorySpawnJournal,
8
8
  acquireSandbox,
9
+ adaptiveRefine,
10
+ assertStrategyContract,
9
11
  assertTraceDerivedFindings,
12
+ auditIntent,
13
+ authorStrategy,
14
+ breadthDriver,
10
15
  buildSteerContext,
11
16
  builtinShapes,
12
17
  completionAuthorizes,
@@ -15,6 +20,7 @@ import {
15
20
  createDriver,
16
21
  createExecutor,
17
22
  createExecutorRegistry,
23
+ createMcpEnvironment,
18
24
  createRootHandle,
19
25
  createSandboxForSpec,
20
26
  createSandboxLineage,
@@ -22,35 +28,56 @@ import {
22
28
  createScopeAnalyst,
23
29
  createShapeRegistry,
24
30
  createSupervisor,
31
+ createVerifierEnvironment,
32
+ defaultAnalystInstruction,
33
+ defaultAuditorInstruction,
25
34
  defaultSelectWinner,
26
35
  definePersona,
36
+ defineStrategy,
37
+ depthDriver,
27
38
  deterministicCompletion,
28
39
  equalKOnCost,
29
40
  fanout,
30
41
  flatWidenGate,
42
+ gitWorkspace,
43
+ harvestCorpus,
31
44
  inlineSandboxClient,
45
+ jjWorkspace,
46
+ localShell,
32
47
  loopDispatch,
33
48
  loopUntil,
34
49
  materializeTreeView,
50
+ observe,
35
51
  openSandboxRun,
36
52
  panel,
37
53
  pipeline,
54
+ printBenchmarkReport,
38
55
  probeSandboxCapabilities,
56
+ promotionGate,
57
+ refine,
39
58
  registerShape,
40
59
  renderAnalyses,
41
60
  renderCorpusToInstructions,
61
+ renderReport,
42
62
  replaySpawnTree,
43
63
  reportLoopUsage,
64
+ runAgentic,
65
+ runBenchmark,
44
66
  runLoop,
45
67
  runPersonified,
68
+ runStrategyEvolution,
69
+ sample,
70
+ sampleThenRefine,
71
+ selectChampion,
46
72
  sentinelCompletion,
47
73
  settledToIteration,
48
74
  spendFromUsageEvents,
49
75
  stopSentinel,
76
+ strategyAuthorContract,
50
77
  trajectoryReport,
51
78
  verify,
52
79
  widen
53
- } from "./chunk-65FQLI4V.js";
80
+ } from "./chunk-IW2LMLK6.js";
54
81
  import {
55
82
  extractLlmCallEvent,
56
83
  mapSandboxEvent
@@ -64,7 +91,12 @@ export {
64
91
  InMemoryResultBlobStore,
65
92
  InMemorySpawnJournal,
66
93
  acquireSandbox,
94
+ adaptiveRefine,
95
+ assertStrategyContract,
67
96
  assertTraceDerivedFindings,
97
+ auditIntent,
98
+ authorStrategy,
99
+ breadthDriver,
68
100
  buildSteerContext,
69
101
  builtinShapes,
70
102
  completionAuthorizes,
@@ -73,6 +105,7 @@ export {
73
105
  createDriver,
74
106
  createExecutor,
75
107
  createExecutorRegistry,
108
+ createMcpEnvironment,
76
109
  createRootHandle,
77
110
  createSandboxForSpec,
78
111
  createSandboxLineage,
@@ -80,33 +113,54 @@ export {
80
113
  createScopeAnalyst,
81
114
  createShapeRegistry,
82
115
  createSupervisor,
116
+ createVerifierEnvironment,
117
+ defaultAnalystInstruction,
118
+ defaultAuditorInstruction,
83
119
  defaultSelectWinner,
84
120
  definePersona,
121
+ defineStrategy,
122
+ depthDriver,
85
123
  deterministicCompletion,
86
124
  equalKOnCost,
87
125
  extractLlmCallEvent,
88
126
  fanout,
89
127
  flatWidenGate,
128
+ gitWorkspace,
129
+ harvestCorpus,
90
130
  inlineSandboxClient,
131
+ jjWorkspace,
132
+ localShell,
91
133
  loopDispatch,
92
134
  loopUntil,
93
135
  mapSandboxEvent,
94
136
  materializeTreeView,
137
+ observe,
95
138
  openSandboxRun,
96
139
  panel,
97
140
  pipeline,
141
+ printBenchmarkReport,
98
142
  probeSandboxCapabilities,
143
+ promotionGate,
144
+ refine,
99
145
  registerShape,
100
146
  renderAnalyses,
101
147
  renderCorpusToInstructions,
148
+ renderReport,
102
149
  replaySpawnTree,
103
150
  reportLoopUsage,
151
+ runAgentic,
152
+ runBenchmark,
104
153
  runLoop,
105
154
  runPersonified,
155
+ runStrategyEvolution,
156
+ sample,
157
+ sampleThenRefine,
158
+ selectChampion,
106
159
  sentinelCompletion,
107
160
  settledToIteration,
108
161
  spendFromUsageEvents,
109
162
  stopSentinel,
163
+ strategyAuthorContract,
110
164
  trajectoryReport,
111
165
  verify,
112
166
  widen
package/dist/mcp/bin.js CHANGED
@@ -4,17 +4,17 @@ import {
4
4
  createPropagatingTraceEmitter,
5
5
  detectExecutor,
6
6
  readTraceContextFromEnv
7
- } from "../chunk-KPN7OQ64.js";
7
+ } from "../chunk-TJS7S3HJ.js";
8
8
  import "../chunk-WIR4HOOJ.js";
9
9
  import "../chunk-JNPK46YH.js";
10
10
  import {
11
11
  createDefaultCoderDelegate
12
- } from "../chunk-I42NHLKX.js";
12
+ } from "../chunk-LX66I3SC.js";
13
13
  import "../chunk-KADIJAD4.js";
14
14
  import "../chunk-GLR25NG7.js";
15
15
  import {
16
16
  runLoop
17
- } from "../chunk-65FQLI4V.js";
17
+ } from "../chunk-IW2LMLK6.js";
18
18
  import "../chunk-GSUO5QS6.js";
19
19
  import "../chunk-DGUM43GV.js";
20
20
 
@@ -1,17 +1,17 @@
1
- import { S as SandboxClient, f as LoopSandboxPlacement, e as LoopTraceEmitter } from '../types-DnYoHvvZ.js';
2
- import { c as FleetHandle, d as DelegationExecutor, e as DelegateFeedbackArgs, f as DelegationFeedbackSnapshot, g as DelegationProfile, D as DelegateCodeArgs, h as DelegateResearchArgs, i as DelegateUiAuditArgs, j as DelegationStatus, k as DelegationProgress, l as DelegationResultPayload, m as DelegationError, n as DelegationStatusResult, o as DelegationHistoryArgs, p as DelegationHistoryEntry, q as CoderDelegate, R as ResearcherDelegate, U as UiAuditorDelegate, r as DelegateCodeResult, s as DelegateFeedbackResult, t as ResearchSource, u as DelegateResearchResult, v as DelegateUiAuditResult, w as DelegationHistoryResult, x as DelegationStatusArgs } from '../kb-gate-2Gwpz_27.js';
3
- export { y as CoderReview, C as CoderReviewer, a as CoderWinnerSelection, z as CreateDefaultCoderDelegateOptions, b as CreateKbGateOptions, A as DelegateCodeConfig, B as DelegateResearchConfig, E as DelegateRunCtx, G as DelegateUiAuditConfig, H as DelegateUiAuditRoute, F as FactCandidate, I as FactJudge, J as FactJudgeVerdict, K as FeedbackRating, L as FeedbackRefersTo, M as FleetWorkspaceExecutorOptions, N as KbGateResult, O as ResearchOutputShape, S as SiblingSandboxExecutorOptions, P as UiAuditorDelegationOutput, Q as createDefaultCoderDelegate, T as createFleetWorkspaceExecutor, V as createKbGate, W as createSiblingSandboxExecutor } from '../kb-gate-2Gwpz_27.js';
1
+ import { S as SandboxClient, f as LoopSandboxPlacement, e as LoopTraceEmitter } from '../types-nBMuollC.js';
2
+ import { c as FleetHandle, d as DelegationExecutor, e as DelegateFeedbackArgs, f as DelegationFeedbackSnapshot, g as DelegationProfile, D as DelegateCodeArgs, h as DelegateResearchArgs, i as DelegateUiAuditArgs, j as DelegationStatus, k as DelegationProgress, l as DelegationResultPayload, m as DelegationError, n as DelegationStatusResult, o as DelegationHistoryArgs, p as DelegationHistoryEntry, q as CoderDelegate, R as ResearcherDelegate, U as UiAuditorDelegate, r as DelegateCodeResult, s as DelegateFeedbackResult, t as ResearchSource, u as DelegateResearchResult, v as DelegateUiAuditResult, w as DelegationHistoryResult, x as DelegationStatusArgs } from '../kb-gate-51BlLlVM.js';
3
+ export { y as CoderReview, C as CoderReviewer, a as CoderWinnerSelection, z as CreateDefaultCoderDelegateOptions, b as CreateKbGateOptions, A as DelegateCodeConfig, B as DelegateResearchConfig, E as DelegateRunCtx, G as DelegateUiAuditConfig, H as DelegateUiAuditRoute, F as FactCandidate, I as FactJudge, J as FactJudgeVerdict, K as FeedbackRating, L as FeedbackRefersTo, M as FleetWorkspaceExecutorOptions, N as KbGateResult, O as ResearchOutputShape, S as SiblingSandboxExecutorOptions, P as UiAuditorDelegationOutput, Q as createDefaultCoderDelegate, T as createFleetWorkspaceExecutor, V as createKbGate, W as createSiblingSandboxExecutor } from '../kb-gate-51BlLlVM.js';
4
4
  export { B as BuildDelegationMcpServerOptions, C as ComposeProductionAgentProfileOptions, D as DELEGATION_MCP_SERVER_KEY, b as buildDelegationMcpServer, c as composeProductionAgentProfile } from '../delegation-profile-1GbW5yA3.js';
5
5
  import { L as LocalHarness, r as runLocalHarness } from '../local-harness-KrdFTY5R.js';
6
6
  export { a as LocalHarnessResult, R as RunLocalHarnessOptions } from '../local-harness-KrdFTY5R.js';
7
- import { O as OtelExporter } from '../otel-export-nurzFwuJ.js';
8
- export { m as mcpToolsForRuntimeMcp, a as mcpToolsForRuntimeMcpSubset } from '../otel-export-nurzFwuJ.js';
7
+ import { O as OtelExporter } from '../otel-export-EzfsVUhh.js';
8
+ export { m as mcpToolsForRuntimeMcp, a as mcpToolsForRuntimeMcpSubset } from '../otel-export-EzfsVUhh.js';
9
9
  import { AnalystFinding } from '@tangle-network/agent-eval';
10
- import { S as Scope, R as ResultBlobStore, A as Agent, B as Budget } from '../types-BfoeiQRZ.js';
10
+ import { S as Scope, R as ResultBlobStore, A as Agent, B as Budget } from '../types-BpDfCPUp.js';
11
11
  import { a as UiLens } from '../substrate-CUgk7F7s.js';
12
12
  import '@tangle-network/sandbox';
13
13
  import '../runtime-hooks-C7JwKb9E.js';
14
- import '../coder-DCWFQpmJ.js';
14
+ import '../coder-CVZNGbyg.js';
15
15
  import 'node:child_process';
16
16
 
17
17
  /**
@@ -452,10 +452,9 @@ interface McpServerOptions {
452
452
  /** Override the default in-memory task queue. */
453
453
  queue?: DelegationTaskQueue;
454
454
  /**
455
- * Extra tools to serve alongside the delegation tools e.g. the operator toolbox
456
- * (`createCoordinationTools(...).tools`), which exposes the driver's spawn/observe/steer verbs over
457
- * MCP so a sandbox agent can BE the driver. Registered after the built-ins; a duplicate name
458
- * throws (fail loud — no silent shadowing of a delegation tool).
455
+ * Extra tools to serve alongside the delegation tools, for example
456
+ * `createCoordinationTools(...).tools`. Registered after the built-ins; a
457
+ * duplicate name throws so delegation tools cannot be shadowed silently.
459
458
  */
460
459
  extraTools?: McpToolDescriptor[];
461
460
  /** Server display name surfaced via `initialize`. Default `'agent-runtime-mcp'`. */
@@ -570,9 +569,11 @@ interface CheckRunnerOptions {
570
569
  /** Run ONE lens over a trace → findings. Generic over any kind: prompt = the lens + the agent-eval
571
570
  * finding schema; the model's JSON array is parsed (`parseRawFinding`), lifted, and firewalled. */
572
571
  declare function runCheck(kind: Check, trace: unknown, opts: CheckRunnerOptions, producedAt: string): Promise<AnalystFinding[]>;
573
- /** Build a `run_analyst` runner over a kind directory — the seam the operator toolbox is wired with.
574
- * Returns the findings, or a typed error for an unknown kind. `producedAt` is passed in (the runtime
575
- * forbids `Date.now` in replay-safe paths; the caller stamps it). */
572
+ /**
573
+ * Build a `run_analyst` runner over a kind directory.
574
+ * Returns findings, or a typed error for an unknown kind. `producedAt` is
575
+ * passed in because replay-safe paths must not read `Date.now`.
576
+ */
576
577
  declare function makeCheckRunner(kinds: Record<string, Check>, opts: CheckRunnerOptions): (kindId: string, trace: unknown, producedAt: string) => Promise<AnalystFinding[] | {
577
578
  error: string;
578
579
  }>;
@@ -580,84 +581,84 @@ declare function makeCheckRunner(kinds: Record<string, Check>, opts: CheckRunner
580
581
  /**
581
582
  * @experimental
582
583
  *
583
- * COORDINATION TOOLS the verbs a parent agent uses to coordinate the child agents it spawns,
584
- * exposed as MCP tools backed by a live keystone `Scope`. This is `Scope`-as-MCP.
585
- *
586
- * NOT a transport. The cross-org message bus (`docs/agent-bus-protocol.md`) and the SDK's
587
- * `dispatchPrompt`/`SessionMessage` are the *transports* the `steer` verb rides; THIS file is the
588
- * verb set (the API). One verb, several bindings: in-process `Scope.send` is a direct call; across
589
- * sandboxes it rides SDK session-messaging; across orgs it rides the agent-bus protocol.
590
- *
591
- * spawn_worker → scope.spawn (budget-bounded, fail-closed — equal-k holds even for an LLM driver)
592
- * await_next → scope.next (THE wake event: block until the next spawned child settles)
593
- * observe_worker→ scope.view + the result blob (a child's status, spend, and settled output)
594
- * steer_worker → scope.send (deliver a next-instruction / interrupt to a RUNNING child)
595
- * list_analysts → the check menu (the trace lenses the agent can apply — see checks.ts)
596
- * run_analyst → apply a CHECK (run a kind over a child's trace → trace-derived findings)
597
- * stop → declare the run complete (the terminal move)
598
- *
599
- * The check verbs are present only when the check seam (`analystKinds` + `runAnalyst`) is wired —
600
- * an agent that does not review traces (a pure dispatcher) omits them. A trace check is a SEPARATE
601
- * lens (selector ≠ judge: it reads the trace, never the score); authoring a NEW check at runtime is
602
- * the next addition.
603
- *
604
- * A worker the driver spawns may itself carry the driver profile — `spawn_worker` does not care what
605
- * the profile is, so drivers-of-drivers fall out for free (each sub-driver gets its own sub-scope,
606
- * bounded by `maxDepth` + the conserved pool).
584
+ * MCP binding for a live `Scope`. A sandbox driver gets the same small verbs
585
+ * the in-process driver has: spawn, observe, await, steer, ask/answer, analyze,
586
+ * and stop. Settled outputs remain Scope artifacts; product code can project
587
+ * them into any UI/report envelope it needs.
607
588
  */
608
589
 
609
- /** A worker the driver has drained via `await_next` — the operator's running ledger of settled
610
- * workers + their DEPLOYABLE verdict (the driver IS the selector, so it legitimately reads the
611
- * verdict; the analyst, which reads only the trace, is the separate selector≠judge lens). The
612
- * driver picks its deliverable from this ledger at `stop`. */
590
+ /** A worker the driver has drained via `await_next`. */
613
591
  interface SettledWorker {
614
592
  readonly id: string;
615
593
  readonly status: 'done' | 'down';
616
- /** Deployable score in [0,1] from the worker's verdict (done only). */
617
594
  readonly score?: number;
618
- /** Whether the deployable verdict passed (done only). */
619
595
  readonly valid?: boolean;
620
- /** Result-blob pointer for the worker's output/trace (done only). */
621
596
  readonly outRef?: string;
622
- /** Failure reason (down only). */
623
597
  readonly reason?: string;
624
598
  }
625
- /** How a `spawn_worker` profile becomes a spawnable leaf `Agent`. The caller wires this (e.g. the
626
- * surface registry turns a profile into a shot executor) so the toolbox stays domain-blind. */
599
+ type QuestionLevel = 'worker' | 'driver' | 'loop';
600
+ type QuestionUrgency = 'continue-without' | 'blocks-step' | 'blocks-run';
601
+ interface QuestionOption {
602
+ readonly label: string;
603
+ readonly tradeoff: string;
604
+ }
605
+ interface Question {
606
+ readonly id: string;
607
+ readonly from: string;
608
+ readonly level: QuestionLevel;
609
+ readonly question: string;
610
+ readonly reason: string;
611
+ readonly urgency: QuestionUrgency;
612
+ readonly options?: ReadonlyArray<QuestionOption>;
613
+ }
614
+ type QuestionDecision = {
615
+ readonly kind: 'answer';
616
+ readonly answer: string;
617
+ readonly by: string;
618
+ } | {
619
+ readonly kind: 'defer';
620
+ readonly reason: string;
621
+ } | {
622
+ readonly kind: 'escalate';
623
+ readonly to: 'parent' | 'user' | string;
624
+ readonly reason: string;
625
+ };
626
+ interface QuestionRecord extends Question {
627
+ readonly status: 'open' | 'answered' | 'deferred' | 'escalated';
628
+ readonly decision?: QuestionDecision;
629
+ readonly openedAt: number;
630
+ }
631
+ type QuestionPolicy = 'auto' | 'mustDecide' | 'bubble' | 'failClosed';
632
+ interface AnalystRegistry {
633
+ readonly kinds: ReadonlyArray<{
634
+ id: string;
635
+ description: string;
636
+ area: string;
637
+ }>;
638
+ readonly run: (kindId: string, trace: unknown) => Promise<unknown>;
639
+ }
640
+ type CoordinationEvent = {
641
+ readonly type: 'question';
642
+ readonly question: QuestionRecord;
643
+ };
627
644
  type MakeWorkerAgent = (profile: unknown) => Agent<unknown, unknown>;
628
645
  interface CoordinationToolsOptions {
629
- /** The DRIVER's live scope — spawn/observe/steer all act on this. */
630
646
  readonly scope: Scope<unknown>;
631
- /** Result blobs, so `observe_worker` can rehydrate a settled worker's output. */
632
647
  readonly blobs: ResultBlobStore;
633
- /** Turn a spawn_worker `profile` into a leaf agent (registry-resolved on spawn). */
634
648
  readonly makeWorkerAgent: MakeWorkerAgent;
635
- /** Per-worker conserved budget the driver reserves on each spawn. */
636
649
  readonly perWorker: Budget;
637
- /** The analyst lens menu (for `list_analysts`) — id + one-line + area. Injected so the toolbox
638
- * stays domain-blind; wire it from `analyst-kinds.ts`'s directory. Omit to disable analyst tools. */
639
- readonly analystKinds?: ReadonlyArray<{
640
- id: string;
641
- description: string;
642
- area: string;
643
- }>;
644
- /** Run a lens over a worker's trace → findings (or a typed error). Wire it from
645
- * `makeCheckRunner(...)`. `run_analyst` fetches the worker's settled output and passes it here. */
646
- readonly runAnalyst?: (kindId: string, trace: unknown) => Promise<unknown>;
650
+ readonly analysts?: AnalystRegistry;
651
+ readonly onEvent?: (event: CoordinationEvent) => void | Promise<void>;
652
+ readonly questionPolicy?: QuestionPolicy;
647
653
  }
648
654
  interface CoordinationTools {
649
- /** MCP tools — register on an `McpServer`, or call the handlers directly in-process. */
650
655
  readonly tools: McpToolDescriptor[];
651
- /** True once the driver called `stop` — the operator loop reads this to terminate. */
652
656
  isStopped(): boolean;
653
- /** The reason passed to `stop`, if any. */
654
657
  stopReason(): string | undefined;
655
- /** The workers drained so far via `await_next` (the driver's selection ledger). */
656
658
  settled(): ReadonlyArray<SettledWorker>;
659
+ questions(): ReadonlyArray<QuestionRecord>;
657
660
  }
658
- /** Build the operator toolbox over a live scope. The tools are the driver's verbs; their handlers
659
- * are thin wrappers over the keystone (spawn/view/send), so the budget/journal/abort discipline of
660
- * the Supervisor applies to a sandbox driver exactly as to the in-process one. */
661
+ /** Build the driver's MCP tools over a live scope. */
661
662
  declare function createCoordinationTools(opts: CoordinationToolsOptions): CoordinationTools;
662
663
 
663
664
  /**
@@ -1147,4 +1148,4 @@ declare function createPropagatingTraceEmitter(ctx: TraceContext): {
1147
1148
  */
1148
1149
  declare function traceContextToEnv(ctx: TraceContext): Record<string, string>;
1149
1150
 
1150
- export { type Check, type CheckRunnerOptions, CoderDelegate, type CoordinationTools, type CoordinationToolsOptions, type CreateWorktreeOptions, DELEGATE_CODE_DESCRIPTION, DELEGATE_CODE_INPUT_SCHEMA, DELEGATE_CODE_TOOL_NAME, DELEGATE_FEEDBACK_DESCRIPTION, DELEGATE_FEEDBACK_INPUT_SCHEMA, DELEGATE_FEEDBACK_TOOL_NAME, DELEGATE_RESEARCH_DESCRIPTION, DELEGATE_RESEARCH_INPUT_SCHEMA, DELEGATE_RESEARCH_TOOL_NAME, DELEGATE_UI_AUDIT_DESCRIPTION, DELEGATE_UI_AUDIT_INPUT_SCHEMA, DELEGATE_UI_AUDIT_TOOL_NAME, DELEGATION_HISTORY_DESCRIPTION, DELEGATION_HISTORY_INPUT_SCHEMA, DELEGATION_HISTORY_TOOL_NAME, DELEGATION_STATUS_DESCRIPTION, DELEGATION_STATUS_INPUT_SCHEMA, DELEGATION_STATUS_TOOL_NAME, DelegateCodeArgs, DelegateCodeResult, DelegateFeedbackArgs, DelegateFeedbackResult, DelegateResearchArgs, DelegateResearchResult, DelegateUiAuditArgs, DelegateUiAuditResult, DelegationError, DelegationExecutor, DelegationFeedbackSnapshot, DelegationHistoryArgs, DelegationHistoryEntry, DelegationHistoryResult, DelegationProfile, DelegationProgress, type DelegationRecord, DelegationResultPayload, DelegationStatus, DelegationStatusArgs, DelegationStatusResult, DelegationTaskQueue, type DelegationTaskQueueOptions, type DetectExecutorArgs, type DiffOptions, type DiffResult, type FeedbackEvent, type FeedbackStore, FleetHandle, type GitRunner, InMemoryFeedbackStore, type InProcessExecutorDescribePlacement, type InProcessExecutorOptions, type JsonRpcMessage, type JsonRpcResponse, LocalHarness, type MakeWorkerAgent, type McpServer, type McpServerOptions, type McpToolDescriptor, type McpTransport, type RemoveWorktreeOptions, ResearchSource, ResearcherDelegate, type SettledWorker, type SubmitInput, type SubmitOutput, type TraceContext, UiAuditorDelegate, type WorktreeHandle, captureWorktreeDiff, createCoordinationTools, createDelegateCodeHandler, createDelegateFeedbackHandler, createDelegateResearchHandler, createDelegateUiAuditHandler, createDelegationHistoryHandler, createDelegationStatusHandler, createInProcessExecutor, createInProcessTransport, createMcpServer, createPropagatingTraceEmitter, createWorktree, defaultChecks, detectExecutor, eventToSnapshot, hashIdempotencyInput, liftFindings, makeCheckRunner, readTraceContextFromEnv, removeWorktree, renderTrace, runCheck, runLocalHarness, traceContextToEnv, validateDelegateCodeArgs, validateDelegateFeedbackArgs, validateDelegateResearchArgs, validateDelegateUiAuditArgs, validateDelegationHistoryArgs, validateDelegationStatusArgs };
1151
+ export { type AnalystRegistry, type Check, type CheckRunnerOptions, CoderDelegate, type CoordinationEvent, type CoordinationTools, type CoordinationToolsOptions, type CreateWorktreeOptions, DELEGATE_CODE_DESCRIPTION, DELEGATE_CODE_INPUT_SCHEMA, DELEGATE_CODE_TOOL_NAME, DELEGATE_FEEDBACK_DESCRIPTION, DELEGATE_FEEDBACK_INPUT_SCHEMA, DELEGATE_FEEDBACK_TOOL_NAME, DELEGATE_RESEARCH_DESCRIPTION, DELEGATE_RESEARCH_INPUT_SCHEMA, DELEGATE_RESEARCH_TOOL_NAME, DELEGATE_UI_AUDIT_DESCRIPTION, DELEGATE_UI_AUDIT_INPUT_SCHEMA, DELEGATE_UI_AUDIT_TOOL_NAME, DELEGATION_HISTORY_DESCRIPTION, DELEGATION_HISTORY_INPUT_SCHEMA, DELEGATION_HISTORY_TOOL_NAME, DELEGATION_STATUS_DESCRIPTION, DELEGATION_STATUS_INPUT_SCHEMA, DELEGATION_STATUS_TOOL_NAME, DelegateCodeArgs, DelegateCodeResult, DelegateFeedbackArgs, DelegateFeedbackResult, DelegateResearchArgs, DelegateResearchResult, DelegateUiAuditArgs, DelegateUiAuditResult, DelegationError, DelegationExecutor, DelegationFeedbackSnapshot, DelegationHistoryArgs, DelegationHistoryEntry, DelegationHistoryResult, DelegationProfile, DelegationProgress, type DelegationRecord, DelegationResultPayload, DelegationStatus, DelegationStatusArgs, DelegationStatusResult, DelegationTaskQueue, type DelegationTaskQueueOptions, type DetectExecutorArgs, type DiffOptions, type DiffResult, type FeedbackEvent, type FeedbackStore, FleetHandle, type GitRunner, InMemoryFeedbackStore, type InProcessExecutorDescribePlacement, type InProcessExecutorOptions, type JsonRpcMessage, type JsonRpcResponse, LocalHarness, type MakeWorkerAgent, type McpServer, type McpServerOptions, type McpToolDescriptor, type McpTransport, type Question, type QuestionDecision, type QuestionPolicy, type QuestionRecord, type RemoveWorktreeOptions, ResearchSource, ResearcherDelegate, type SettledWorker, type SubmitInput, type SubmitOutput, type TraceContext, UiAuditorDelegate, type WorktreeHandle, captureWorktreeDiff, createCoordinationTools, createDelegateCodeHandler, createDelegateFeedbackHandler, createDelegateResearchHandler, createDelegateUiAuditHandler, createDelegationHistoryHandler, createDelegationStatusHandler, createInProcessExecutor, createInProcessTransport, createMcpServer, createPropagatingTraceEmitter, createWorktree, defaultChecks, detectExecutor, eventToSnapshot, hashIdempotencyInput, liftFindings, makeCheckRunner, readTraceContextFromEnv, removeWorktree, renderTrace, runCheck, runLocalHarness, traceContextToEnv, validateDelegateCodeArgs, validateDelegateFeedbackArgs, validateDelegateResearchArgs, validateDelegateUiAuditArgs, validateDelegationHistoryArgs, validateDelegationStatusArgs };