footprint-explainable-ui 0.3.2 → 0.5.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 +42 -3
- package/dist/adapters/fromRuntimeSnapshot.d.ts +52 -0
- package/dist/adapters/fromRuntimeSnapshot.d.ts.map +1 -0
- package/dist/adapters/fromRuntimeSnapshot.js +97 -0
- package/dist/adapters/fromRuntimeSnapshot.js.map +1 -0
- package/dist/components/ExplainableShell/ExplainableShell.d.ts +26 -0
- package/dist/components/ExplainableShell/ExplainableShell.d.ts.map +1 -0
- package/dist/components/ExplainableShell/ExplainableShell.js +94 -0
- package/dist/components/ExplainableShell/ExplainableShell.js.map +1 -0
- package/dist/components/ExplainableShell/index.d.ts +3 -0
- package/dist/components/ExplainableShell/index.d.ts.map +1 -0
- package/dist/components/ExplainableShell/index.js +2 -0
- package/dist/components/ExplainableShell/index.js.map +1 -0
- package/dist/components/FlowchartView/FlowchartView.d.ts +20 -0
- package/dist/components/FlowchartView/FlowchartView.d.ts.map +1 -0
- package/dist/components/FlowchartView/FlowchartView.js +80 -0
- package/dist/components/FlowchartView/FlowchartView.js.map +1 -0
- package/dist/components/FlowchartView/SubflowBreadcrumb.d.ts +11 -0
- package/dist/components/FlowchartView/SubflowBreadcrumb.d.ts.map +1 -0
- package/dist/components/FlowchartView/SubflowBreadcrumb.js +49 -0
- package/dist/components/FlowchartView/SubflowBreadcrumb.js.map +1 -0
- package/dist/components/FlowchartView/SubflowTree.d.ts +36 -0
- package/dist/components/FlowchartView/SubflowTree.d.ts.map +1 -0
- package/dist/components/FlowchartView/SubflowTree.js +143 -0
- package/dist/components/FlowchartView/SubflowTree.js.map +1 -0
- package/dist/components/FlowchartView/TracedFlowchartView.d.ts +20 -0
- package/dist/components/FlowchartView/TracedFlowchartView.d.ts.map +1 -0
- package/dist/components/FlowchartView/TracedFlowchartView.js +101 -0
- package/dist/components/FlowchartView/TracedFlowchartView.js.map +1 -0
- package/dist/components/FlowchartView/index.d.ts +11 -0
- package/dist/components/FlowchartView/index.d.ts.map +1 -0
- package/dist/components/FlowchartView/index.js +6 -0
- package/dist/components/FlowchartView/index.js.map +1 -0
- package/dist/components/FlowchartView/specToReactFlow.d.ts +56 -0
- package/dist/components/FlowchartView/specToReactFlow.d.ts.map +1 -0
- package/dist/components/FlowchartView/specToReactFlow.js +202 -0
- package/dist/components/FlowchartView/specToReactFlow.js.map +1 -0
- package/dist/components/FlowchartView/useSubflowNavigation.d.ts +35 -0
- package/dist/components/FlowchartView/useSubflowNavigation.d.ts.map +1 -0
- package/dist/components/FlowchartView/useSubflowNavigation.js +80 -0
- package/dist/components/FlowchartView/useSubflowNavigation.js.map +1 -0
- package/dist/components/GanttTimeline/GanttTimeline.d.ts +18 -0
- package/dist/components/GanttTimeline/GanttTimeline.d.ts.map +1 -0
- package/dist/components/GanttTimeline/GanttTimeline.js +123 -0
- package/dist/components/GanttTimeline/GanttTimeline.js.map +1 -0
- package/dist/components/GanttTimeline/index.d.ts +3 -0
- package/dist/components/GanttTimeline/index.d.ts.map +1 -0
- package/dist/components/GanttTimeline/index.js +2 -0
- package/dist/components/GanttTimeline/index.js.map +1 -0
- package/dist/components/MemoryInspector/MemoryInspector.d.ts +19 -0
- package/dist/components/MemoryInspector/MemoryInspector.d.ts.map +1 -0
- package/dist/components/MemoryInspector/MemoryInspector.js +95 -0
- package/dist/components/MemoryInspector/MemoryInspector.js.map +1 -0
- package/dist/components/MemoryInspector/index.d.ts +3 -0
- package/dist/components/MemoryInspector/index.d.ts.map +1 -0
- package/dist/components/MemoryInspector/index.js +2 -0
- package/dist/components/MemoryInspector/index.js.map +1 -0
- package/dist/components/NarrativeLog/NarrativeLog.d.ts +15 -0
- package/dist/components/NarrativeLog/NarrativeLog.d.ts.map +1 -0
- package/dist/components/NarrativeLog/NarrativeLog.js +65 -0
- package/dist/components/NarrativeLog/NarrativeLog.js.map +1 -0
- package/dist/components/NarrativeLog/index.d.ts +3 -0
- package/dist/components/NarrativeLog/index.d.ts.map +1 -0
- package/dist/components/NarrativeLog/index.js +2 -0
- package/dist/components/NarrativeLog/index.js.map +1 -0
- package/dist/components/NarrativeTrace/NarrativeTrace.d.ts +13 -0
- package/dist/components/NarrativeTrace/NarrativeTrace.d.ts.map +1 -0
- package/dist/components/NarrativeTrace/NarrativeTrace.js +127 -0
- package/dist/components/NarrativeTrace/NarrativeTrace.js.map +1 -0
- package/dist/components/NarrativeTrace/index.d.ts +3 -0
- package/dist/components/NarrativeTrace/index.d.ts.map +1 -0
- package/dist/components/NarrativeTrace/index.js +2 -0
- package/dist/components/NarrativeTrace/index.js.map +1 -0
- package/dist/components/ResultPanel/ResultPanel.d.ts +11 -0
- package/dist/components/ResultPanel/ResultPanel.d.ts.map +1 -0
- package/dist/components/ResultPanel/ResultPanel.js +54 -0
- package/dist/components/ResultPanel/ResultPanel.js.map +1 -0
- package/dist/components/ResultPanel/index.d.ts +3 -0
- package/dist/components/ResultPanel/index.d.ts.map +1 -0
- package/dist/components/ResultPanel/index.js +2 -0
- package/dist/components/ResultPanel/index.js.map +1 -0
- package/dist/components/ScopeDiff/ScopeDiff.d.ts +17 -0
- package/dist/components/ScopeDiff/ScopeDiff.d.ts.map +1 -0
- package/dist/components/ScopeDiff/ScopeDiff.js +87 -0
- package/dist/components/ScopeDiff/ScopeDiff.js.map +1 -0
- package/dist/components/ScopeDiff/index.d.ts +3 -0
- package/dist/components/ScopeDiff/index.d.ts.map +1 -0
- package/dist/components/ScopeDiff/index.js +2 -0
- package/dist/components/ScopeDiff/index.js.map +1 -0
- package/dist/components/SnapshotPanel/SnapshotPanel.d.ts +17 -0
- package/dist/components/SnapshotPanel/SnapshotPanel.d.ts.map +1 -0
- package/dist/components/SnapshotPanel/SnapshotPanel.js +85 -0
- package/dist/components/SnapshotPanel/SnapshotPanel.js.map +1 -0
- package/dist/components/SnapshotPanel/index.d.ts +3 -0
- package/dist/components/SnapshotPanel/index.d.ts.map +1 -0
- package/dist/components/SnapshotPanel/index.js +2 -0
- package/dist/components/SnapshotPanel/index.js.map +1 -0
- package/dist/components/StageNode/StageNode.d.ts +31 -0
- package/dist/components/StageNode/StageNode.d.ts.map +1 -0
- package/dist/components/StageNode/StageNode.js +134 -0
- package/dist/components/StageNode/StageNode.js.map +1 -0
- package/dist/components/StageNode/index.d.ts +3 -0
- package/dist/components/StageNode/index.d.ts.map +1 -0
- package/dist/components/StageNode/index.js +2 -0
- package/dist/components/StageNode/index.js.map +1 -0
- package/dist/components/TimeTravelControls/TimeTravelControls.d.ts +13 -0
- package/dist/components/TimeTravelControls/TimeTravelControls.d.ts.map +1 -0
- package/dist/components/TimeTravelControls/TimeTravelControls.js +104 -0
- package/dist/components/TimeTravelControls/TimeTravelControls.js.map +1 -0
- package/dist/components/TimeTravelControls/index.d.ts +3 -0
- package/dist/components/TimeTravelControls/index.d.ts.map +1 -0
- package/dist/components/TimeTravelControls/index.js +2 -0
- package/dist/components/TimeTravelControls/index.js.map +1 -0
- package/dist/components/TimeTravelDebugger/TimeTravelDebugger.d.ts +22 -0
- package/dist/components/TimeTravelDebugger/TimeTravelDebugger.d.ts.map +1 -0
- package/dist/components/TimeTravelDebugger/TimeTravelDebugger.js +104 -0
- package/dist/components/TimeTravelDebugger/TimeTravelDebugger.js.map +1 -0
- package/dist/components/TimeTravelDebugger/index.d.ts +3 -0
- package/dist/components/TimeTravelDebugger/index.d.ts.map +1 -0
- package/dist/components/TimeTravelDebugger/index.js +2 -0
- package/dist/components/TimeTravelDebugger/index.js.map +1 -0
- package/dist/flowchart.cjs +704 -220
- package/dist/flowchart.cjs.map +1 -1
- package/dist/flowchart.d.cts +55 -1
- package/dist/flowchart.d.ts +55 -1
- package/dist/flowchart.d.ts.map +1 -0
- package/dist/flowchart.js +700 -214
- package/dist/flowchart.js.map +1 -1
- package/dist/index.cjs +849 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +95 -3
- package/dist/index.d.ts +95 -3
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +851 -80
- package/dist/index.js.map +1 -1
- package/dist/theme/ThemeProvider.d.ts +13 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/ThemeProvider.js +16 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/index.d.ts +7 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +5 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/presets.d.ts +15 -0
- package/dist/theme/presets.d.ts.map +1 -0
- package/dist/theme/presets.js +70 -0
- package/dist/theme/presets.js.map +1 -0
- package/dist/theme/styles.d.ts +32 -0
- package/dist/theme/styles.d.ts.map +1 -0
- package/dist/theme/styles.js +37 -0
- package/dist/theme/styles.js.map +1 -0
- package/dist/theme/tokens.d.ts +28 -0
- package/dist/theme/tokens.d.ts.map +1 -0
- package/dist/theme/tokens.js +58 -0
- package/dist/theme/tokens.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +35 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +10 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
2
3
|
|
|
3
4
|
/** Snapshot of a single pipeline stage — the core data shape for all components. */
|
|
4
5
|
interface StageSnapshot {
|
|
@@ -16,6 +17,12 @@ interface StageSnapshot {
|
|
|
16
17
|
durationMs: number;
|
|
17
18
|
/** Execution status */
|
|
18
19
|
status?: "pending" | "active" | "done" | "error";
|
|
20
|
+
/** Human-readable description of what this stage does */
|
|
21
|
+
description?: string;
|
|
22
|
+
/** Subflow identifier (when this stage is inside a subflow) */
|
|
23
|
+
subflowId?: string;
|
|
24
|
+
/** Subflow execution result — present on stages that ran a subflow. */
|
|
25
|
+
subflowResult?: unknown;
|
|
19
26
|
}
|
|
20
27
|
/** Component size variants */
|
|
21
28
|
type Size = "compact" | "default" | "detailed";
|
|
@@ -135,12 +142,15 @@ interface GanttTimelineProps extends BaseComponentProps {
|
|
|
135
142
|
selectedIndex?: number;
|
|
136
143
|
/** Callback when a stage bar is clicked */
|
|
137
144
|
onSelect?: (index: number) => void;
|
|
145
|
+
/** Max visible rows before collapsing (0 = no collapse). Default: 5 */
|
|
146
|
+
maxVisibleRows?: number;
|
|
138
147
|
}
|
|
139
148
|
/**
|
|
140
149
|
* Horizontal Gantt-style timeline showing stage durations and overlap.
|
|
141
|
-
*
|
|
150
|
+
* Collapses to `maxVisibleRows` with expand/collapse toggle.
|
|
151
|
+
* Auto-scrolls to keep the active stage visible when collapsed.
|
|
142
152
|
*/
|
|
143
|
-
declare function GanttTimeline({ snapshots, selectedIndex, onSelect, size, unstyled, className, style, }: GanttTimelineProps): react_jsx_runtime.JSX.Element;
|
|
153
|
+
declare function GanttTimeline({ snapshots, selectedIndex, onSelect, size, unstyled, className, style, maxVisibleRows, }: GanttTimelineProps): react_jsx_runtime.JSX.Element;
|
|
144
154
|
|
|
145
155
|
interface SnapshotPanelProps extends BaseComponentProps {
|
|
146
156
|
/** Stage snapshots from pipeline execution */
|
|
@@ -184,6 +194,29 @@ interface ResultPanelProps extends BaseComponentProps {
|
|
|
184
194
|
}
|
|
185
195
|
declare function ResultPanel({ data, logs, hideConsole, size, unstyled, className, style, }: ResultPanelProps): react_jsx_runtime.JSX.Element;
|
|
186
196
|
|
|
197
|
+
type StageDetailMode = "simple" | "dev";
|
|
198
|
+
interface MemoryChange {
|
|
199
|
+
key: string;
|
|
200
|
+
type: "added" | "updated" | "removed";
|
|
201
|
+
oldValue?: unknown;
|
|
202
|
+
newValue?: unknown;
|
|
203
|
+
}
|
|
204
|
+
interface StageDetailPanelProps extends BaseComponentProps {
|
|
205
|
+
/** Stage snapshots for time-travel */
|
|
206
|
+
snapshots: StageSnapshot[];
|
|
207
|
+
/** Current snapshot index */
|
|
208
|
+
selectedIndex: number;
|
|
209
|
+
/** Display mode: "simple" (description + narrative) or "dev" (memory story) */
|
|
210
|
+
mode?: StageDetailMode;
|
|
211
|
+
/** Show a toggle to switch between simple/dev modes (default: false) */
|
|
212
|
+
showToggle?: boolean;
|
|
213
|
+
/** Called when user toggles mode via built-in toggle */
|
|
214
|
+
onModeChange?: (mode: StageDetailMode) => void;
|
|
215
|
+
/** Keys to exclude from memory display (default: engine internals). Pass empty set to show all. */
|
|
216
|
+
excludeKeys?: Set<string>;
|
|
217
|
+
}
|
|
218
|
+
declare function StageDetailPanel({ snapshots, selectedIndex, mode: controlledMode, showToggle, onModeChange, size, unstyled, className, style, }: StageDetailPanelProps): react_jsx_runtime.JSX.Element;
|
|
219
|
+
|
|
187
220
|
interface TimeTravelControlsProps extends BaseComponentProps {
|
|
188
221
|
/** Stage snapshots */
|
|
189
222
|
snapshots: StageSnapshot[];
|
|
@@ -221,6 +254,57 @@ interface ExplainableShellProps extends BaseComponentProps {
|
|
|
221
254
|
}
|
|
222
255
|
declare function ExplainableShell({ snapshots, resultData, logs, narrative, tabs, defaultTab, hideConsole, renderFlowchart, size, unstyled, className, style, }: ExplainableShellProps): react_jsx_runtime.JSX.Element;
|
|
223
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Converts a SerializedPipelineStructure (from builder.toSpec()) into
|
|
259
|
+
* ReactFlow nodes and edges with auto-layout.
|
|
260
|
+
*
|
|
261
|
+
* Supports two modes:
|
|
262
|
+
* 1. Build-time only (no executionState) — all nodes gray
|
|
263
|
+
* 2. With execution overlay — executed nodes colored, active node highlighted,
|
|
264
|
+
* unvisited nodes stay gray
|
|
265
|
+
*/
|
|
266
|
+
|
|
267
|
+
interface SpecNode {
|
|
268
|
+
name: string;
|
|
269
|
+
id?: string;
|
|
270
|
+
type?: "stage" | "decider" | "fork" | "streaming";
|
|
271
|
+
description?: string;
|
|
272
|
+
children?: SpecNode[];
|
|
273
|
+
next?: SpecNode;
|
|
274
|
+
branchIds?: string[];
|
|
275
|
+
hasDecider?: boolean;
|
|
276
|
+
hasSelector?: boolean;
|
|
277
|
+
loopTarget?: string;
|
|
278
|
+
isSubflowRoot?: boolean;
|
|
279
|
+
subflowId?: string;
|
|
280
|
+
subflowName?: string;
|
|
281
|
+
subflowStructure?: SpecNode;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
interface SubflowTreeEntry {
|
|
285
|
+
/** Node name / identifier */
|
|
286
|
+
name: string;
|
|
287
|
+
/** Human-readable description */
|
|
288
|
+
description?: string;
|
|
289
|
+
/** Subflow ID (when this node represents a subflow) */
|
|
290
|
+
subflowId?: string;
|
|
291
|
+
/** Whether this node is a subflow root (has nested structure) */
|
|
292
|
+
isSubflow?: boolean;
|
|
293
|
+
/** Nested children (subflow stages) */
|
|
294
|
+
children?: SubflowTreeEntry[];
|
|
295
|
+
}
|
|
296
|
+
interface SubflowTreeProps extends BaseComponentProps {
|
|
297
|
+
/** Pipeline spec to derive the tree from */
|
|
298
|
+
spec: SpecNode;
|
|
299
|
+
/** Currently active stage name (highlights in tree) */
|
|
300
|
+
activeStage?: string | null;
|
|
301
|
+
/** Set of completed stage names */
|
|
302
|
+
doneStages?: Set<string>;
|
|
303
|
+
/** Called when a tree node is clicked */
|
|
304
|
+
onNodeSelect?: (name: string, isSubflow: boolean) => void;
|
|
305
|
+
}
|
|
306
|
+
declare const SubflowTree: react.NamedExoticComponent<SubflowTreeProps>;
|
|
307
|
+
|
|
224
308
|
/**
|
|
225
309
|
* Shape of FootPrint's RuntimeSnapshot (from FlowChartExecutor.getSnapshot()).
|
|
226
310
|
* We define it here instead of importing to avoid a hard dependency on footprintjs.
|
|
@@ -230,11 +314,15 @@ interface RuntimeStageSnapshot {
|
|
|
230
314
|
name?: string;
|
|
231
315
|
isDecider?: boolean;
|
|
232
316
|
isFork?: boolean;
|
|
317
|
+
/** User-level writes made by this stage (pre-namespace keys → values). */
|
|
318
|
+
stageWrites?: Record<string, unknown>;
|
|
233
319
|
logs: Record<string, unknown>;
|
|
234
320
|
errors: Record<string, unknown>;
|
|
235
321
|
metrics: Record<string, unknown>;
|
|
236
322
|
evals: Record<string, unknown>;
|
|
237
323
|
flowMessages?: unknown[];
|
|
324
|
+
description?: string;
|
|
325
|
+
subflowId?: string;
|
|
238
326
|
next?: RuntimeStageSnapshot;
|
|
239
327
|
children?: RuntimeStageSnapshot[];
|
|
240
328
|
}
|
|
@@ -242,6 +330,8 @@ interface RuntimeSnapshot {
|
|
|
242
330
|
sharedState: Record<string, unknown>;
|
|
243
331
|
executionTree: RuntimeStageSnapshot;
|
|
244
332
|
commitLog: unknown[];
|
|
333
|
+
/** Per-subflow execution results (keyed by subflowId). */
|
|
334
|
+
subflowResults?: Record<string, unknown>;
|
|
245
335
|
}
|
|
246
336
|
/**
|
|
247
337
|
* Converts a FootPrint RuntimeSnapshot into a flat array of StageSnapshots
|
|
@@ -265,6 +355,8 @@ declare function createSnapshots(stages: Array<{
|
|
|
265
355
|
memory?: Record<string, unknown>;
|
|
266
356
|
narrative?: string;
|
|
267
357
|
durationMs?: number;
|
|
358
|
+
description?: string;
|
|
359
|
+
subflowId?: string;
|
|
268
360
|
}>): StageSnapshot[];
|
|
269
361
|
|
|
270
|
-
export { type BaseComponentProps, type DiffEntry, ExplainableShell, type ExplainableShellProps, FootprintTheme, GanttTimeline, type GanttTimelineProps, MemoryInspector, type MemoryInspectorProps, NarrativeLog, type NarrativeLogProps, NarrativeTrace, type NarrativeTraceProps, ResultPanel, type ResultPanelProps, ScopeDiff, type ScopeDiffProps, type ShellTab, type Size, SnapshotPanel, type SnapshotPanelProps, type StageSnapshot, type ThemePresetName, type ThemeTokens, TimeTravelControls, type TimeTravelControlsProps, coolDark, createSnapshots, defaultTokens, themePresets, toVisualizationSnapshots, tokensToCSSVars, useFootprintTheme, warmDark, warmLight };
|
|
362
|
+
export { type BaseComponentProps, type DiffEntry, ExplainableShell, type ExplainableShellProps, FootprintTheme, GanttTimeline, type GanttTimelineProps, type MemoryChange, MemoryInspector, type MemoryInspectorProps, NarrativeLog, type NarrativeLogProps, NarrativeTrace, type NarrativeTraceProps, ResultPanel, type ResultPanelProps, ScopeDiff, type ScopeDiffProps, type ShellTab, type Size, SnapshotPanel, type SnapshotPanelProps, type StageDetailMode, StageDetailPanel, type StageDetailPanelProps, type StageSnapshot, SubflowTree, type SubflowTreeEntry, type SubflowTreeProps, type ThemePresetName, type ThemeTokens, TimeTravelControls, type TimeTravelControlsProps, coolDark, createSnapshots, defaultTokens, themePresets, toVisualizationSnapshots, tokensToCSSVars, useFootprintTheme, warmDark, warmLight };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
2
3
|
|
|
3
4
|
/** Snapshot of a single pipeline stage — the core data shape for all components. */
|
|
4
5
|
interface StageSnapshot {
|
|
@@ -16,6 +17,12 @@ interface StageSnapshot {
|
|
|
16
17
|
durationMs: number;
|
|
17
18
|
/** Execution status */
|
|
18
19
|
status?: "pending" | "active" | "done" | "error";
|
|
20
|
+
/** Human-readable description of what this stage does */
|
|
21
|
+
description?: string;
|
|
22
|
+
/** Subflow identifier (when this stage is inside a subflow) */
|
|
23
|
+
subflowId?: string;
|
|
24
|
+
/** Subflow execution result — present on stages that ran a subflow. */
|
|
25
|
+
subflowResult?: unknown;
|
|
19
26
|
}
|
|
20
27
|
/** Component size variants */
|
|
21
28
|
type Size = "compact" | "default" | "detailed";
|
|
@@ -135,12 +142,15 @@ interface GanttTimelineProps extends BaseComponentProps {
|
|
|
135
142
|
selectedIndex?: number;
|
|
136
143
|
/** Callback when a stage bar is clicked */
|
|
137
144
|
onSelect?: (index: number) => void;
|
|
145
|
+
/** Max visible rows before collapsing (0 = no collapse). Default: 5 */
|
|
146
|
+
maxVisibleRows?: number;
|
|
138
147
|
}
|
|
139
148
|
/**
|
|
140
149
|
* Horizontal Gantt-style timeline showing stage durations and overlap.
|
|
141
|
-
*
|
|
150
|
+
* Collapses to `maxVisibleRows` with expand/collapse toggle.
|
|
151
|
+
* Auto-scrolls to keep the active stage visible when collapsed.
|
|
142
152
|
*/
|
|
143
|
-
declare function GanttTimeline({ snapshots, selectedIndex, onSelect, size, unstyled, className, style, }: GanttTimelineProps): react_jsx_runtime.JSX.Element;
|
|
153
|
+
declare function GanttTimeline({ snapshots, selectedIndex, onSelect, size, unstyled, className, style, maxVisibleRows, }: GanttTimelineProps): react_jsx_runtime.JSX.Element;
|
|
144
154
|
|
|
145
155
|
interface SnapshotPanelProps extends BaseComponentProps {
|
|
146
156
|
/** Stage snapshots from pipeline execution */
|
|
@@ -184,6 +194,29 @@ interface ResultPanelProps extends BaseComponentProps {
|
|
|
184
194
|
}
|
|
185
195
|
declare function ResultPanel({ data, logs, hideConsole, size, unstyled, className, style, }: ResultPanelProps): react_jsx_runtime.JSX.Element;
|
|
186
196
|
|
|
197
|
+
type StageDetailMode = "simple" | "dev";
|
|
198
|
+
interface MemoryChange {
|
|
199
|
+
key: string;
|
|
200
|
+
type: "added" | "updated" | "removed";
|
|
201
|
+
oldValue?: unknown;
|
|
202
|
+
newValue?: unknown;
|
|
203
|
+
}
|
|
204
|
+
interface StageDetailPanelProps extends BaseComponentProps {
|
|
205
|
+
/** Stage snapshots for time-travel */
|
|
206
|
+
snapshots: StageSnapshot[];
|
|
207
|
+
/** Current snapshot index */
|
|
208
|
+
selectedIndex: number;
|
|
209
|
+
/** Display mode: "simple" (description + narrative) or "dev" (memory story) */
|
|
210
|
+
mode?: StageDetailMode;
|
|
211
|
+
/** Show a toggle to switch between simple/dev modes (default: false) */
|
|
212
|
+
showToggle?: boolean;
|
|
213
|
+
/** Called when user toggles mode via built-in toggle */
|
|
214
|
+
onModeChange?: (mode: StageDetailMode) => void;
|
|
215
|
+
/** Keys to exclude from memory display (default: engine internals). Pass empty set to show all. */
|
|
216
|
+
excludeKeys?: Set<string>;
|
|
217
|
+
}
|
|
218
|
+
declare function StageDetailPanel({ snapshots, selectedIndex, mode: controlledMode, showToggle, onModeChange, size, unstyled, className, style, }: StageDetailPanelProps): react_jsx_runtime.JSX.Element;
|
|
219
|
+
|
|
187
220
|
interface TimeTravelControlsProps extends BaseComponentProps {
|
|
188
221
|
/** Stage snapshots */
|
|
189
222
|
snapshots: StageSnapshot[];
|
|
@@ -221,6 +254,57 @@ interface ExplainableShellProps extends BaseComponentProps {
|
|
|
221
254
|
}
|
|
222
255
|
declare function ExplainableShell({ snapshots, resultData, logs, narrative, tabs, defaultTab, hideConsole, renderFlowchart, size, unstyled, className, style, }: ExplainableShellProps): react_jsx_runtime.JSX.Element;
|
|
223
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Converts a SerializedPipelineStructure (from builder.toSpec()) into
|
|
259
|
+
* ReactFlow nodes and edges with auto-layout.
|
|
260
|
+
*
|
|
261
|
+
* Supports two modes:
|
|
262
|
+
* 1. Build-time only (no executionState) — all nodes gray
|
|
263
|
+
* 2. With execution overlay — executed nodes colored, active node highlighted,
|
|
264
|
+
* unvisited nodes stay gray
|
|
265
|
+
*/
|
|
266
|
+
|
|
267
|
+
interface SpecNode {
|
|
268
|
+
name: string;
|
|
269
|
+
id?: string;
|
|
270
|
+
type?: "stage" | "decider" | "fork" | "streaming";
|
|
271
|
+
description?: string;
|
|
272
|
+
children?: SpecNode[];
|
|
273
|
+
next?: SpecNode;
|
|
274
|
+
branchIds?: string[];
|
|
275
|
+
hasDecider?: boolean;
|
|
276
|
+
hasSelector?: boolean;
|
|
277
|
+
loopTarget?: string;
|
|
278
|
+
isSubflowRoot?: boolean;
|
|
279
|
+
subflowId?: string;
|
|
280
|
+
subflowName?: string;
|
|
281
|
+
subflowStructure?: SpecNode;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
interface SubflowTreeEntry {
|
|
285
|
+
/** Node name / identifier */
|
|
286
|
+
name: string;
|
|
287
|
+
/** Human-readable description */
|
|
288
|
+
description?: string;
|
|
289
|
+
/** Subflow ID (when this node represents a subflow) */
|
|
290
|
+
subflowId?: string;
|
|
291
|
+
/** Whether this node is a subflow root (has nested structure) */
|
|
292
|
+
isSubflow?: boolean;
|
|
293
|
+
/** Nested children (subflow stages) */
|
|
294
|
+
children?: SubflowTreeEntry[];
|
|
295
|
+
}
|
|
296
|
+
interface SubflowTreeProps extends BaseComponentProps {
|
|
297
|
+
/** Pipeline spec to derive the tree from */
|
|
298
|
+
spec: SpecNode;
|
|
299
|
+
/** Currently active stage name (highlights in tree) */
|
|
300
|
+
activeStage?: string | null;
|
|
301
|
+
/** Set of completed stage names */
|
|
302
|
+
doneStages?: Set<string>;
|
|
303
|
+
/** Called when a tree node is clicked */
|
|
304
|
+
onNodeSelect?: (name: string, isSubflow: boolean) => void;
|
|
305
|
+
}
|
|
306
|
+
declare const SubflowTree: react.NamedExoticComponent<SubflowTreeProps>;
|
|
307
|
+
|
|
224
308
|
/**
|
|
225
309
|
* Shape of FootPrint's RuntimeSnapshot (from FlowChartExecutor.getSnapshot()).
|
|
226
310
|
* We define it here instead of importing to avoid a hard dependency on footprintjs.
|
|
@@ -230,11 +314,15 @@ interface RuntimeStageSnapshot {
|
|
|
230
314
|
name?: string;
|
|
231
315
|
isDecider?: boolean;
|
|
232
316
|
isFork?: boolean;
|
|
317
|
+
/** User-level writes made by this stage (pre-namespace keys → values). */
|
|
318
|
+
stageWrites?: Record<string, unknown>;
|
|
233
319
|
logs: Record<string, unknown>;
|
|
234
320
|
errors: Record<string, unknown>;
|
|
235
321
|
metrics: Record<string, unknown>;
|
|
236
322
|
evals: Record<string, unknown>;
|
|
237
323
|
flowMessages?: unknown[];
|
|
324
|
+
description?: string;
|
|
325
|
+
subflowId?: string;
|
|
238
326
|
next?: RuntimeStageSnapshot;
|
|
239
327
|
children?: RuntimeStageSnapshot[];
|
|
240
328
|
}
|
|
@@ -242,6 +330,8 @@ interface RuntimeSnapshot {
|
|
|
242
330
|
sharedState: Record<string, unknown>;
|
|
243
331
|
executionTree: RuntimeStageSnapshot;
|
|
244
332
|
commitLog: unknown[];
|
|
333
|
+
/** Per-subflow execution results (keyed by subflowId). */
|
|
334
|
+
subflowResults?: Record<string, unknown>;
|
|
245
335
|
}
|
|
246
336
|
/**
|
|
247
337
|
* Converts a FootPrint RuntimeSnapshot into a flat array of StageSnapshots
|
|
@@ -265,6 +355,8 @@ declare function createSnapshots(stages: Array<{
|
|
|
265
355
|
memory?: Record<string, unknown>;
|
|
266
356
|
narrative?: string;
|
|
267
357
|
durationMs?: number;
|
|
358
|
+
description?: string;
|
|
359
|
+
subflowId?: string;
|
|
268
360
|
}>): StageSnapshot[];
|
|
269
361
|
|
|
270
|
-
export { type BaseComponentProps, type DiffEntry, ExplainableShell, type ExplainableShellProps, FootprintTheme, GanttTimeline, type GanttTimelineProps, MemoryInspector, type MemoryInspectorProps, NarrativeLog, type NarrativeLogProps, NarrativeTrace, type NarrativeTraceProps, ResultPanel, type ResultPanelProps, ScopeDiff, type ScopeDiffProps, type ShellTab, type Size, SnapshotPanel, type SnapshotPanelProps, type StageSnapshot, type ThemePresetName, type ThemeTokens, TimeTravelControls, type TimeTravelControlsProps, coolDark, createSnapshots, defaultTokens, themePresets, toVisualizationSnapshots, tokensToCSSVars, useFootprintTheme, warmDark, warmLight };
|
|
362
|
+
export { type BaseComponentProps, type DiffEntry, ExplainableShell, type ExplainableShellProps, FootprintTheme, GanttTimeline, type GanttTimelineProps, type MemoryChange, MemoryInspector, type MemoryInspectorProps, NarrativeLog, type NarrativeLogProps, NarrativeTrace, type NarrativeTraceProps, ResultPanel, type ResultPanelProps, ScopeDiff, type ScopeDiffProps, type ShellTab, type Size, SnapshotPanel, type SnapshotPanelProps, type StageDetailMode, StageDetailPanel, type StageDetailPanelProps, type StageSnapshot, SubflowTree, type SubflowTreeEntry, type SubflowTreeProps, type ThemePresetName, type ThemeTokens, TimeTravelControls, type TimeTravelControlsProps, coolDark, createSnapshots, defaultTokens, themePresets, toVisualizationSnapshots, tokensToCSSVars, useFootprintTheme, warmDark, warmLight };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,aAAa,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGvE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACtE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG5D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,YAAY,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAE/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,YAAY,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAGrF,OAAO,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AACrE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAGjG,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC"}
|