@tangle-network/agent-runtime 0.68.0 → 0.70.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.
- package/README.md +81 -13
- package/dist/agent.d.ts +4 -5
- package/dist/agent.js +3 -6
- package/dist/agent.js.map +1 -1
- package/dist/chunk-BYZCXQHF.js +474 -0
- package/dist/chunk-BYZCXQHF.js.map +1 -0
- package/dist/{chunk-OYU5LR4T.js → chunk-EDCVUZZC.js} +2 -2
- package/dist/{chunk-QNUEFNU7.js → chunk-L5ZFBVT6.js} +6 -6
- package/dist/chunk-L5ZFBVT6.js.map +1 -0
- package/dist/{chunk-VKUHUFX7.js → chunk-QXWGSDAQ.js} +914 -590
- package/dist/chunk-QXWGSDAQ.js.map +1 -0
- package/dist/{chunk-LTEF2LYD.js → chunk-ZNQVMMR5.js} +3 -3
- package/dist/{coordination-Curpzeyc.d.ts → coordination-C7WxwHXq.d.ts} +8 -1
- package/dist/{delegates-CLFNAKyi.d.ts → delegates-DqAgo32T.d.ts} +105 -10
- package/dist/{improvement-adapter-BC4HhuAR.d.ts → improvement-adapter-BVuMragr.d.ts} +1 -1
- package/dist/index.d.ts +439 -100
- package/dist/index.js +583 -125
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +2 -3
- package/dist/{loop-runner-bin-B6dzNZC8.d.ts → loop-runner-bin-B0NeLTRd.d.ts} +4 -4
- package/dist/loop-runner-bin.d.ts +7 -10
- package/dist/loop-runner-bin.js +4 -7
- package/dist/loops.d.ts +3149 -16
- package/dist/loops.js +34 -63
- package/dist/mcp/bin.js +14 -16
- package/dist/mcp/bin.js.map +1 -1
- package/dist/mcp/index.d.ts +8 -12
- package/dist/mcp/index.js +16 -19
- package/dist/mcp/index.js.map +1 -1
- package/dist/{openai-tools-CA2N3-Ak.d.ts → openai-tools-DPx9Gzvn.d.ts} +1 -1
- package/dist/profiles.d.ts +94 -6
- package/dist/profiles.js +320 -9
- package/dist/profiles.js.map +1 -1
- package/dist/{router-client-30Y_pca8.d.ts → router-client-C7kp_ECN.d.ts} +37 -1
- package/dist/{substrate-CUgk7F7s.d.ts → substrate-BoRXgvka.d.ts} +52 -1
- package/dist/{types-Crxftafi.d.ts → types-BYa2ZOAx.d.ts} +83 -2
- package/dist/{types-p8dWBIXL.d.ts → types-DJu6TBGp.d.ts} +2 -16
- package/dist/{worktree-fanout-DUiKPApb.d.ts → worktree-fanout-gNfl0Byj.d.ts} +9 -37
- package/package.json +9 -39
- package/dist/analyst-loop.d.ts +0 -52
- package/dist/analyst-loop.js +0 -11
- package/dist/analyst-loop.js.map +0 -1
- package/dist/audit.d.ts +0 -93
- package/dist/audit.js +0 -312
- package/dist/audit.js.map +0 -1
- package/dist/chunk-4B6U4CVQ.js +0 -15
- package/dist/chunk-4B6U4CVQ.js.map +0 -1
- package/dist/chunk-FCIPUALH.js +0 -214
- package/dist/chunk-FCIPUALH.js.map +0 -1
- package/dist/chunk-O2UPHN7X.js +0 -114
- package/dist/chunk-O2UPHN7X.js.map +0 -1
- package/dist/chunk-P5OKDSLB.js +0 -580
- package/dist/chunk-P5OKDSLB.js.map +0 -1
- package/dist/chunk-QNUEFNU7.js.map +0 -1
- package/dist/chunk-VKUHUFX7.js.map +0 -1
- package/dist/chunk-VLF5RHEQ.js +0 -143
- package/dist/chunk-VLF5RHEQ.js.map +0 -1
- package/dist/coder-2leJPOvC.d.ts +0 -52
- package/dist/improvement.d.ts +0 -208
- package/dist/improvement.js +0 -343
- package/dist/improvement.js.map +0 -1
- package/dist/local-harness-BE_h8szs.d.ts +0 -93
- package/dist/platform.d.ts +0 -255
- package/dist/platform.js +0 -229
- package/dist/platform.js.map +0 -1
- package/dist/run-loop-D3PwlG7J.d.ts +0 -112
- package/dist/runtime-hooks-C7JwKb9E.d.ts +0 -70
- package/dist/runtime.d.ts +0 -3108
- package/dist/runtime.js +0 -263
- package/dist/runtime.js.map +0 -1
- package/dist/topology.d.ts +0 -126
- package/dist/topology.js +0 -333
- package/dist/topology.js.map +0 -1
- package/dist/workflow.d.ts +0 -551
- package/dist/workflow.js +0 -1781
- package/dist/workflow.js.map +0 -1
- /package/dist/{chunk-OYU5LR4T.js.map → chunk-EDCVUZZC.js.map} +0 -0
- /package/dist/{chunk-LTEF2LYD.js.map → chunk-ZNQVMMR5.js.map} +0 -0
package/dist/runtime.js
DELETED
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FileCorpus,
|
|
3
|
-
FileResultBlobStore,
|
|
4
|
-
FileSpawnJournal,
|
|
5
|
-
InMemoryCorpus,
|
|
6
|
-
InMemoryResultBlobStore,
|
|
7
|
-
InMemorySpawnJournal,
|
|
8
|
-
acquireSandbox,
|
|
9
|
-
adaptiveRefine,
|
|
10
|
-
analyzeTrace,
|
|
11
|
-
anytimeReport,
|
|
12
|
-
asAuthoredProfile,
|
|
13
|
-
assertStrategyContract,
|
|
14
|
-
assertTraceDerivedFindings,
|
|
15
|
-
auditIntent,
|
|
16
|
-
authorStrategy,
|
|
17
|
-
authoredWorker,
|
|
18
|
-
breadthDriver,
|
|
19
|
-
buildSteerContext,
|
|
20
|
-
builtinShapes,
|
|
21
|
-
cliWorktreeExecutor,
|
|
22
|
-
completionAuthorizes,
|
|
23
|
-
contentAddress,
|
|
24
|
-
coordinationDriverAgent,
|
|
25
|
-
countDiffLines,
|
|
26
|
-
createBudgetPool,
|
|
27
|
-
createEventBus,
|
|
28
|
-
createExecutor,
|
|
29
|
-
createExecutorRegistry,
|
|
30
|
-
createInMemoryRunContext,
|
|
31
|
-
createInbox,
|
|
32
|
-
createMcpEnvironment,
|
|
33
|
-
createPartsTraceSource,
|
|
34
|
-
createPushTraceSource,
|
|
35
|
-
createRootHandle,
|
|
36
|
-
createSandboxForSpec,
|
|
37
|
-
createSandboxLineage,
|
|
38
|
-
createScope,
|
|
39
|
-
createScopeAnalyst,
|
|
40
|
-
createShapeRegistry,
|
|
41
|
-
createSupervisor,
|
|
42
|
-
createVerifierEnvironment,
|
|
43
|
-
createWaterfallCollector,
|
|
44
|
-
createWorktreeCliExecutor,
|
|
45
|
-
decodeAnthropicPart,
|
|
46
|
-
decodeOpenAiPart,
|
|
47
|
-
decodeOpencodePart,
|
|
48
|
-
decodeToolPart,
|
|
49
|
-
defaultAnalystInstruction,
|
|
50
|
-
defaultAuditorInstruction,
|
|
51
|
-
defaultSelectWinner,
|
|
52
|
-
defaultToolDetectors,
|
|
53
|
-
definePersona,
|
|
54
|
-
defineStrategy,
|
|
55
|
-
depthDriver,
|
|
56
|
-
deterministicCompletion,
|
|
57
|
-
discriminatingMeans,
|
|
58
|
-
driverChild,
|
|
59
|
-
driverExecutorFactory,
|
|
60
|
-
driverRuntime,
|
|
61
|
-
equalKOnCost,
|
|
62
|
-
fanout,
|
|
63
|
-
flatWidenGate,
|
|
64
|
-
gateOnDeliverable,
|
|
65
|
-
gitWorkspace,
|
|
66
|
-
harvestCorpus,
|
|
67
|
-
inlineSandboxClient,
|
|
68
|
-
isDriverSpec,
|
|
69
|
-
isNonEmptyPatch,
|
|
70
|
-
jjWorkspace,
|
|
71
|
-
localShell,
|
|
72
|
-
loopDispatch,
|
|
73
|
-
loopUntil,
|
|
74
|
-
materializeTreeView,
|
|
75
|
-
nestedScopeSeamKey,
|
|
76
|
-
observe,
|
|
77
|
-
openSandboxRun,
|
|
78
|
-
panel,
|
|
79
|
-
patchDelivered,
|
|
80
|
-
pickChampion,
|
|
81
|
-
pipeline,
|
|
82
|
-
printBenchmarkReport,
|
|
83
|
-
probeSandboxCapabilities,
|
|
84
|
-
promotionGate,
|
|
85
|
-
refine,
|
|
86
|
-
registerShape,
|
|
87
|
-
registryScopeAnalyst,
|
|
88
|
-
renderAnytimeTable,
|
|
89
|
-
renderCorpusToInstructions,
|
|
90
|
-
renderReport,
|
|
91
|
-
replaySpawnTree,
|
|
92
|
-
reportLoopUsage,
|
|
93
|
-
routerChatWithTools,
|
|
94
|
-
routerChatWithUsage,
|
|
95
|
-
routerDriverChat,
|
|
96
|
-
routerToolLoop,
|
|
97
|
-
runAgentic,
|
|
98
|
-
runBenchmark,
|
|
99
|
-
runCoderChecks,
|
|
100
|
-
runInWorkspace,
|
|
101
|
-
runLoop,
|
|
102
|
-
runPersonified,
|
|
103
|
-
runStrategyEvolution,
|
|
104
|
-
sample,
|
|
105
|
-
sampleThenRefine,
|
|
106
|
-
sandboxSessionTraceSource,
|
|
107
|
-
selectChampion,
|
|
108
|
-
selectValidWinner,
|
|
109
|
-
sentinelCompletion,
|
|
110
|
-
serveCoordinationMcp,
|
|
111
|
-
settledToIteration,
|
|
112
|
-
spendFromUsageEvents,
|
|
113
|
-
stopSentinel,
|
|
114
|
-
strategyAuthorContract,
|
|
115
|
-
supervisorSkill,
|
|
116
|
-
toToolSpan,
|
|
117
|
-
toolPartDecoders,
|
|
118
|
-
touchedPathsFromPatch,
|
|
119
|
-
touchesSecretPath,
|
|
120
|
-
trajectoryReport,
|
|
121
|
-
verify,
|
|
122
|
-
watchTrace,
|
|
123
|
-
widen,
|
|
124
|
-
withDriverExecutor,
|
|
125
|
-
worktreeFanout
|
|
126
|
-
} from "./chunk-VKUHUFX7.js";
|
|
127
|
-
import "./chunk-WIR4HOOJ.js";
|
|
128
|
-
import {
|
|
129
|
-
extractLlmCallEvent,
|
|
130
|
-
mapSandboxEvent
|
|
131
|
-
} from "./chunk-VLF5RHEQ.js";
|
|
132
|
-
import "./chunk-O2UPHN7X.js";
|
|
133
|
-
import "./chunk-G3RGMA7C.js";
|
|
134
|
-
import "./chunk-DGUM43GV.js";
|
|
135
|
-
export {
|
|
136
|
-
FileCorpus,
|
|
137
|
-
FileResultBlobStore,
|
|
138
|
-
FileSpawnJournal,
|
|
139
|
-
InMemoryCorpus,
|
|
140
|
-
InMemoryResultBlobStore,
|
|
141
|
-
InMemorySpawnJournal,
|
|
142
|
-
acquireSandbox,
|
|
143
|
-
adaptiveRefine,
|
|
144
|
-
analyzeTrace,
|
|
145
|
-
anytimeReport,
|
|
146
|
-
asAuthoredProfile,
|
|
147
|
-
assertStrategyContract,
|
|
148
|
-
assertTraceDerivedFindings,
|
|
149
|
-
auditIntent,
|
|
150
|
-
authorStrategy,
|
|
151
|
-
authoredWorker,
|
|
152
|
-
breadthDriver,
|
|
153
|
-
buildSteerContext,
|
|
154
|
-
builtinShapes,
|
|
155
|
-
cliWorktreeExecutor,
|
|
156
|
-
completionAuthorizes,
|
|
157
|
-
contentAddress,
|
|
158
|
-
coordinationDriverAgent,
|
|
159
|
-
countDiffLines,
|
|
160
|
-
createBudgetPool,
|
|
161
|
-
createEventBus,
|
|
162
|
-
createExecutor,
|
|
163
|
-
createExecutorRegistry,
|
|
164
|
-
createInMemoryRunContext,
|
|
165
|
-
createInbox,
|
|
166
|
-
createMcpEnvironment,
|
|
167
|
-
createPartsTraceSource,
|
|
168
|
-
createPushTraceSource,
|
|
169
|
-
createRootHandle,
|
|
170
|
-
createSandboxForSpec,
|
|
171
|
-
createSandboxLineage,
|
|
172
|
-
createScope,
|
|
173
|
-
createScopeAnalyst,
|
|
174
|
-
createShapeRegistry,
|
|
175
|
-
createSupervisor,
|
|
176
|
-
createVerifierEnvironment,
|
|
177
|
-
createWaterfallCollector,
|
|
178
|
-
createWorktreeCliExecutor,
|
|
179
|
-
decodeAnthropicPart,
|
|
180
|
-
decodeOpenAiPart,
|
|
181
|
-
decodeOpencodePart,
|
|
182
|
-
decodeToolPart,
|
|
183
|
-
defaultAnalystInstruction,
|
|
184
|
-
defaultAuditorInstruction,
|
|
185
|
-
defaultSelectWinner,
|
|
186
|
-
defaultToolDetectors,
|
|
187
|
-
definePersona,
|
|
188
|
-
defineStrategy,
|
|
189
|
-
depthDriver,
|
|
190
|
-
deterministicCompletion,
|
|
191
|
-
discriminatingMeans,
|
|
192
|
-
driverChild,
|
|
193
|
-
driverExecutorFactory,
|
|
194
|
-
driverRuntime,
|
|
195
|
-
equalKOnCost,
|
|
196
|
-
extractLlmCallEvent,
|
|
197
|
-
fanout,
|
|
198
|
-
flatWidenGate,
|
|
199
|
-
gateOnDeliverable,
|
|
200
|
-
gitWorkspace,
|
|
201
|
-
harvestCorpus,
|
|
202
|
-
inlineSandboxClient,
|
|
203
|
-
isDriverSpec,
|
|
204
|
-
isNonEmptyPatch,
|
|
205
|
-
jjWorkspace,
|
|
206
|
-
localShell,
|
|
207
|
-
loopDispatch,
|
|
208
|
-
loopUntil,
|
|
209
|
-
mapSandboxEvent,
|
|
210
|
-
materializeTreeView,
|
|
211
|
-
nestedScopeSeamKey,
|
|
212
|
-
observe,
|
|
213
|
-
openSandboxRun,
|
|
214
|
-
panel,
|
|
215
|
-
patchDelivered,
|
|
216
|
-
pickChampion,
|
|
217
|
-
pipeline,
|
|
218
|
-
printBenchmarkReport,
|
|
219
|
-
probeSandboxCapabilities,
|
|
220
|
-
promotionGate,
|
|
221
|
-
refine,
|
|
222
|
-
registerShape,
|
|
223
|
-
registryScopeAnalyst,
|
|
224
|
-
renderAnytimeTable,
|
|
225
|
-
renderCorpusToInstructions,
|
|
226
|
-
renderReport,
|
|
227
|
-
replaySpawnTree,
|
|
228
|
-
reportLoopUsage,
|
|
229
|
-
routerChatWithTools,
|
|
230
|
-
routerChatWithUsage,
|
|
231
|
-
routerDriverChat,
|
|
232
|
-
routerToolLoop,
|
|
233
|
-
runAgentic,
|
|
234
|
-
runBenchmark,
|
|
235
|
-
runCoderChecks,
|
|
236
|
-
runInWorkspace,
|
|
237
|
-
runLoop,
|
|
238
|
-
runPersonified,
|
|
239
|
-
runStrategyEvolution,
|
|
240
|
-
sample,
|
|
241
|
-
sampleThenRefine,
|
|
242
|
-
sandboxSessionTraceSource,
|
|
243
|
-
selectChampion,
|
|
244
|
-
selectValidWinner,
|
|
245
|
-
sentinelCompletion,
|
|
246
|
-
serveCoordinationMcp,
|
|
247
|
-
settledToIteration,
|
|
248
|
-
spendFromUsageEvents,
|
|
249
|
-
stopSentinel,
|
|
250
|
-
strategyAuthorContract,
|
|
251
|
-
supervisorSkill,
|
|
252
|
-
toToolSpan,
|
|
253
|
-
toolPartDecoders,
|
|
254
|
-
touchedPathsFromPatch,
|
|
255
|
-
touchesSecretPath,
|
|
256
|
-
trajectoryReport,
|
|
257
|
-
verify,
|
|
258
|
-
watchTrace,
|
|
259
|
-
widen,
|
|
260
|
-
withDriverExecutor,
|
|
261
|
-
worktreeFanout
|
|
262
|
-
};
|
|
263
|
-
//# sourceMappingURL=runtime.js.map
|
package/dist/runtime.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/topology.d.ts
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { R as RuntimeHooks, a as RuntimeHookEvent } from './runtime-hooks-C7JwKb9E.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @experimental
|
|
5
|
-
*
|
|
6
|
-
* Run replay — the visual, animated record of a recursive agent run.
|
|
7
|
-
*
|
|
8
|
-
* The runtime emits ONE event stream (`agent.spawn`/`agent.child`/`agent.run`/`agent.turn`)
|
|
9
|
-
* through `RuntimeHooks`; the topology tree + waterfall already fold it into ASCII. This module
|
|
10
|
-
* folds the SAME stream into a normalized, timestamped `ReplayEvent[]` (the recorder) and renders
|
|
11
|
-
* a self-contained, animated HTML player (`renderReplayHtml`) — a timeline scrubber over the live
|
|
12
|
-
* recursive tree where every node colors by the completion-oracle: delivered (valid) green, ran-
|
|
13
|
-
* but-not-delivered amber, failed red. No server, no build, no external deps — one HTML file you
|
|
14
|
-
* open in a browser. The same `ReplayEvent[]` is the portable timeline a hosted plane viewer reads.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/** One normalized animation frame — a node appearing, settling, or stepping, at a wall-clock ms. */
|
|
18
|
-
interface ReplayEvent {
|
|
19
|
-
t: number;
|
|
20
|
-
kind: 'root' | 'spawn' | 'settle' | 'step';
|
|
21
|
-
id: string;
|
|
22
|
-
parentId?: string;
|
|
23
|
-
label?: string;
|
|
24
|
-
runtime?: string;
|
|
25
|
-
depth?: number;
|
|
26
|
-
status?: 'running' | 'done' | 'down';
|
|
27
|
-
/** The completion-oracle signal: delivered ⟺ a deployable check passed (not self-report). */
|
|
28
|
-
valid?: boolean;
|
|
29
|
-
score?: number;
|
|
30
|
-
reason?: string;
|
|
31
|
-
tokens?: number;
|
|
32
|
-
usd?: number;
|
|
33
|
-
}
|
|
34
|
-
interface ReplayTimeline {
|
|
35
|
-
runId: string;
|
|
36
|
-
events: ReplayEvent[];
|
|
37
|
-
/** Wall-clock window [t0, t1] the player scrubs over. */
|
|
38
|
-
t0: number;
|
|
39
|
-
t1: number;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* A `RuntimeHooks` sink that records every lifecycle event in arrival order as `ReplayEvent`s.
|
|
43
|
-
* Attach it to `SupervisorOpts.hooks` (or merge with another hooks object) and read `timeline()`
|
|
44
|
-
* after the run. Pure capture — no I/O, no throwing; an unrecognized event is ignored.
|
|
45
|
-
*/
|
|
46
|
-
declare function createReplayRecorder(): {
|
|
47
|
-
hooks: RuntimeHooks;
|
|
48
|
-
events: ReplayEvent[];
|
|
49
|
-
timeline(runId?: string): ReplayTimeline;
|
|
50
|
-
};
|
|
51
|
-
/** Render a self-contained animated HTML replay player for a timeline. Open the file in a browser. */
|
|
52
|
-
declare function renderReplayHtml(timeline: ReplayTimeline, opts?: {
|
|
53
|
-
title?: string;
|
|
54
|
-
}): string;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* @experimental
|
|
58
|
-
*
|
|
59
|
-
* TOPOLOGY VIEW — the live recursive agent tree, folded from the ONE lifecycle stream
|
|
60
|
-
* (`src/runtime-hooks.ts`). It is a pure projection: feed it the `RuntimeHookEvent`s that
|
|
61
|
-
* `runLoop`, `toolLoop`, and the keystone `Scope` already emit, and it maintains the tree of
|
|
62
|
-
* agents + renders it. Attach `view.hooks` to a `Supervisor`/`runLoop` and the tree updates live.
|
|
63
|
-
*
|
|
64
|
-
* Two node sources, ONE stream:
|
|
65
|
-
* - an agent node is born from `agent.spawn` (id = `childId`, parent = the spawner) or the root
|
|
66
|
-
* `agent.run` (id = `runId`); `agent.child`/`agent.run:after` settle it (status + score/reason).
|
|
67
|
-
* - a STEP (`agent.{turn,tool_call,plan,decision}`) is not a node — it advances the step count of
|
|
68
|
-
* the agent it belongs to (matched by `runId`/`parentId`).
|
|
69
|
-
*
|
|
70
|
-
* No I/O, no timers, no backend coupling — the same projection drives a CLI render, a TUI, or a
|
|
71
|
-
* web tree. Rendering is deterministic given the event order (the stream is the source of truth).
|
|
72
|
-
*/
|
|
73
|
-
|
|
74
|
-
type TopologyStatus = 'running' | 'done' | 'down';
|
|
75
|
-
/** One agent in the tree. A leaf never spawns; a driver's `childIds` is non-empty. */
|
|
76
|
-
interface TopologyNode {
|
|
77
|
-
readonly id: string;
|
|
78
|
-
/** Display label (spawn `label`, or the driver name on the root). */
|
|
79
|
-
label: string;
|
|
80
|
-
/** Leaf runtime (`router`/`sandbox`/`cli`) when known. */
|
|
81
|
-
runtime?: string;
|
|
82
|
-
/** Parent agent id; undefined ⇒ a root. */
|
|
83
|
-
parentId?: string;
|
|
84
|
-
/** Recursion depth (root = 0). */
|
|
85
|
-
depth: number;
|
|
86
|
-
status: TopologyStatus;
|
|
87
|
-
/** Count of in-agent steps (turns + tool calls + plan/decision rounds) folded so far. */
|
|
88
|
-
steps: number;
|
|
89
|
-
/** Deployable score in [0,1] once settled `done`. */
|
|
90
|
-
score?: number;
|
|
91
|
-
/** Failure reason once settled `down`. */
|
|
92
|
-
reason?: string;
|
|
93
|
-
/** Children in spawn order. */
|
|
94
|
-
readonly childIds: string[];
|
|
95
|
-
}
|
|
96
|
-
interface RenderOptions {
|
|
97
|
-
/** Cap the rendered depth (deeper nodes collapse to a `… N more` line). Default: no cap. */
|
|
98
|
-
readonly maxDepth?: number;
|
|
99
|
-
/** Drop the per-node detail suffix (steps/children/score) — labels only. Default: false. */
|
|
100
|
-
readonly compact?: boolean;
|
|
101
|
-
}
|
|
102
|
-
interface TopologyView {
|
|
103
|
-
/** The `RuntimeHooks` sink — attach to `SupervisorOpts.hooks` / `runLoop` options. */
|
|
104
|
-
readonly hooks: RuntimeHooks;
|
|
105
|
-
/** Fold one event into the tree (the same call `hooks.onEvent` makes — exposed for replay). */
|
|
106
|
-
ingest(event: RuntimeHookEvent): void;
|
|
107
|
-
/** Every node, insertion order. */
|
|
108
|
-
nodes(): TopologyNode[];
|
|
109
|
-
/** Nodes with no in-tree parent (the run roots). */
|
|
110
|
-
roots(): TopologyNode[];
|
|
111
|
-
/** One node by id. */
|
|
112
|
-
node(id: string): TopologyNode | undefined;
|
|
113
|
-
/** Render the tree as an aligned ASCII forest. */
|
|
114
|
-
render(opts?: RenderOptions): string;
|
|
115
|
-
}
|
|
116
|
-
/** Build a live topology view. Stateful — one per run (or per replay). */
|
|
117
|
-
declare function createTopologyView(): TopologyView;
|
|
118
|
-
/** Render a forest of `TopologyNode`s to an aligned ASCII tree. Pure — given the same roots +
|
|
119
|
-
* node lookup it returns the same string. Exposed so a caller can render a tree it folded
|
|
120
|
-
* itself (e.g. from a journal replay) without the live view. */
|
|
121
|
-
declare function renderTopologyTree(tree: {
|
|
122
|
-
roots: TopologyNode[];
|
|
123
|
-
node: (id: string) => TopologyNode | undefined;
|
|
124
|
-
}, opts?: RenderOptions): string;
|
|
125
|
-
|
|
126
|
-
export { type RenderOptions, type ReplayEvent, type ReplayTimeline, type TopologyNode, type TopologyStatus, type TopologyView, createReplayRecorder, createTopologyView, renderReplayHtml, renderTopologyTree };
|