footprint-explainable-ui 0.27.0 → 0.29.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/dist/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as react from 'react';
2
+ import { ReactNode } from 'react';
2
3
  import { Node, Edge } from '@xyflow/react';
3
4
 
4
5
  /** Snapshot of a single pipeline stage — the core data shape for all components. */
@@ -318,6 +319,31 @@ interface StageDetailPanelProps extends BaseComponentProps {
318
319
  }
319
320
  declare function StageDetailPanel({ snapshots, selectedIndex, mode: controlledMode, showToggle, onModeChange, size, unstyled, className, style, }: StageDetailPanelProps): react.JSX.Element;
320
321
 
322
+ /**
323
+ * Same-Rail Rewind (tracing mode) — the rail's AXIS never changes, only its
324
+ * stops do: every dependency was committed earlier than the value it fed, so
325
+ * a backward slice is a sub-sequence of this same timeline. When `tracing`
326
+ * is set, slice members stay landable ("stops"), everything else fades to
327
+ * unlandable ticks, and prev/next walk stop-to-stop ("◀ earlier cause").
328
+ * The cursor stays the ONE `selectedIndex` — no second position exists.
329
+ */
330
+ interface TracingRail {
331
+ /** The traced variable — rendered in the mode header. */
332
+ tracedKey: string;
333
+ /** Set while an ingredient filter is active ("▸ via key"). */
334
+ viaKey?: string | null;
335
+ /** Snapshot indices that are stops, ASCENDING. All other ticks become
336
+ * faint and unlandable (context, not destinations). */
337
+ stopIndices: number[];
338
+ /** 1-based position of the cursor in WALK order (newest first) + total —
339
+ * the "stop 2 of 6" label. */
340
+ stopOrdinal: number;
341
+ totalStops: number;
342
+ /** Exit tracing (Done button / Escape). The cursor stays put. */
343
+ onExit: () => void;
344
+ /** Clear the via filter back to the full walk (breadcrumb's "show all"). */
345
+ onShowAll?: () => void;
346
+ }
321
347
  interface TimeTravelControlsProps extends BaseComponentProps {
322
348
  /** Stage snapshots */
323
349
  snapshots: StageSnapshot[];
@@ -327,8 +353,10 @@ interface TimeTravelControlsProps extends BaseComponentProps {
327
353
  onIndexChange: (index: number) => void;
328
354
  /** Enable auto-play with Gantt-proportional timing */
329
355
  autoPlayable?: boolean;
356
+ /** Same-Rail Rewind session — when set, the rail is in tracing mode. */
357
+ tracing?: TracingRail | null;
330
358
  }
331
- declare function TimeTravelControls({ snapshots, selectedIndex, onIndexChange, autoPlayable, size, unstyled, className, style, }: TimeTravelControlsProps): react.JSX.Element;
359
+ declare function TimeTravelControls({ snapshots, selectedIndex, onIndexChange, autoPlayable, tracing, size, unstyled, className, style, }: TimeTravelControlsProps): react.JSX.Element;
332
360
 
333
361
  /**
334
362
  * One entry in the execution timeline. `<TracedFlow>` keys time-travel
@@ -731,6 +759,9 @@ interface ExplainableShellProps extends BaseComponentProps {
731
759
  selectedIndex: number;
732
760
  onNodeClick?: (indexOrId: number | string) => void;
733
761
  showStageId?: boolean;
762
+ /** Dependency-cone overlay (chart node id → BFS depth) — painted while
763
+ * the Inspector's Data Trace tab is open. Custom renderers may ignore it. */
764
+ sliceCone?: ReadonlyMap<string, number>;
734
765
  }) => React.ReactNode;
735
766
  /**
736
767
  * When true, render each node's stable `stageId` as a small monospace
@@ -1103,9 +1134,140 @@ interface InspectorPanelProps {
1103
1134
  selectedStageId?: string;
1104
1135
  /** Navigate to a stage when clicking a Data Trace frame. */
1105
1136
  onNavigateToStage?: (runtimeStageId: string) => void;
1137
+ /** Fires when the user switches tabs — lets the shell paint the chart's
1138
+ * dependency cone while the Data Trace tab is open. */
1139
+ onTabChange?: (tab: "state" | "trace") => void;
1140
+ /** Controlled tab — when provided the SHELL owns the tab (it must force
1141
+ * Data Trace open on tracing entry); clicks still fire onTabChange. */
1142
+ tab?: "state" | "trace";
1143
+ /** Replaces the Data Trace tab body (the shell swaps in the Same-Rail
1144
+ * Rewind stop card / entry chips); default = the classic frames list. */
1145
+ traceContent?: ReactNode;
1106
1146
  }
1107
1147
  declare const InspectorPanel: react.NamedExoticComponent<InspectorPanelProps>;
1108
1148
 
1149
+ /**
1150
+ * traceWalk — the SAME-RAIL REWIND walk: a variable-anchored backward slice,
1151
+ * linearized in REVERSE COMMIT ORDER so it can be driven by the existing
1152
+ * time slider ("◀ earlier cause" stop by stop).
1153
+ *
1154
+ * THE LOAD-BEARING FACT (why one linear walk can cover a DAG): every
1155
+ * dependency was committed strictly EARLIER than the value derived from it,
1156
+ * so a backward slice is always a sub-sequence of the run's timeline — and
1157
+ * sorting its frames by commitIdx DESCENDING is a valid topological order.
1158
+ * One monotone "earlier" button therefore visits EVERY frame, including
1159
+ * both parents of a fork, with no branch-choosing UI and no second cursor.
1160
+ *
1161
+ * FORKS are explained, not navigated: each stop carries its `ingredients`
1162
+ * (the read keys + who wrote each), so a 2-parent value shows both chips;
1163
+ * "follow one ingredient" is a RE-ANCHORED walk (same function, key = the
1164
+ * ingredient, before = this stop) — never a special traversal mode.
1165
+ *
1166
+ * HONEST ABSENCE, two truthful sentences (they are different facts):
1167
+ * 'never-written' — no commit in the WHOLE log wrote the key: it came
1168
+ * in with the run's inputs.
1169
+ * 'not-yet-written' — a later commit writes it, but none at or before
1170
+ * the cutoff: "not yet" is not "never".
1171
+ *
1172
+ * Shares the read→write BFS with dataTrace.ts (the causalChain mirror);
1173
+ * eui still never imports footprintjs — snapshot SHAPES only.
1174
+ */
1175
+ /** One read key of a stop, resolved to the commit that wrote it. */
1176
+ interface TraceIngredient {
1177
+ key: string;
1178
+ /** null = no commit before this stop wrote the key (a run-input terminus). */
1179
+ writerRuntimeStageId: string | null;
1180
+ writerStageName: string | null;
1181
+ writerCommitIdx: number | null;
1182
+ }
1183
+ /** One stop on the rewind rail — a slice frame with its rail position. */
1184
+ interface TraceStop {
1185
+ runtimeStageId: string;
1186
+ stageId: string;
1187
+ stageName: string;
1188
+ /** Position in the commit log — the stop's place on the time rail. */
1189
+ commitIdx: number;
1190
+ /** The slice keys DOWNSTREAM members read from this stop (what it
1191
+ * contributed to the traced value). The anchor contributes the traced
1192
+ * key itself. */
1193
+ contributedKeys: string[];
1194
+ keysWritten: string[];
1195
+ ingredients: TraceIngredient[];
1196
+ /** BFS hop distance from the anchor (tooltip-grade info, NOT the walk
1197
+ * order — the walk order is time). */
1198
+ depth: number;
1199
+ /** 1-based pass number when the same stage appears more than once in
1200
+ * the walk (loop iterations); 0 = appears once. */
1201
+ loopPass: number;
1202
+ }
1203
+ interface TraceWalkMissing {
1204
+ reason: "never-written" | "not-yet-written";
1205
+ /** For 'not-yet-written': where the FIRST write actually happens. */
1206
+ firstWriteCommitIdx?: number;
1207
+ firstWriterRuntimeStageId?: string;
1208
+ firstWriterStageName?: string;
1209
+ }
1210
+ interface TraceWalk {
1211
+ key: string;
1212
+ /** Stops in WALK ORDER: commitIdx DESCENDING. stops[0] is the anchor
1213
+ * (the last writer of `key` within the cutoff). */
1214
+ stops: TraceStop[];
1215
+ /** Non-null ⇒ zero stops: the honest-absence card, not an empty chain. */
1216
+ missing: TraceWalkMissing | null;
1217
+ /** Read keys that NO commit ever wrote — the run's inputs ("came in the
1218
+ * door"), deduped, in first-encounter order. */
1219
+ inputTermini: string[];
1220
+ /** False when the snapshot recorded no reads anywhere — the chain is
1221
+ * UNKNOWABLE (not absent) beyond the anchor. */
1222
+ readsAvailable: boolean;
1223
+ /** True when the underlying slice hit its frame/depth budget — the
1224
+ * earliest stop may not be the true origin. */
1225
+ truncated: boolean;
1226
+ }
1227
+ /**
1228
+ * Build the rewind walk for `key`.
1229
+ *
1230
+ * `beforeCommitIdx` (EXCLUSIVE) scopes the question to "the value as it
1231
+ * stood before that moment" — it is also how ingredient-following works:
1232
+ * follow ingredient K at stop S = buildTraceWalk(K, { beforeCommitIdx:
1233
+ * S.commitIdx }) — one function, no traversal modes.
1234
+ */
1235
+ declare function buildTraceWalk(commitLog: unknown[], executionTree: unknown, key: string, opts?: {
1236
+ beforeCommitIdx?: number;
1237
+ maxDepth?: number;
1238
+ maxFrames?: number;
1239
+ }): TraceWalk;
1240
+ /**
1241
+ * formatTraceWalk — THE parity artifact: the [Copy story] button and any
1242
+ * LLM backtrack tool emit THIS string, so the human's board and the
1243
+ * agent's answer are the same text, not two translations.
1244
+ *
1245
+ * `stepNumberOf` maps a runtimeStageId to the 1-based step number shown on
1246
+ * the rail (null = not on the rail); walk order and wording match the
1247
+ * stop cards exactly.
1248
+ */
1249
+ declare function formatTraceWalk(walk: TraceWalk, stepNumberOf: (runtimeStageId: string) => number | null): string;
1250
+
1251
+ interface TraceWalkCardProps {
1252
+ walk: TraceWalk;
1253
+ /** The ONE cursor — the card highlights its stop; null falls back to the anchor. */
1254
+ cursorRuntimeStageId: string | null;
1255
+ /** Active ingredient filter (breadcrumb "▸ via key"). */
1256
+ viaKey?: string | null;
1257
+ /** Map a stop to its 1-based rail step number (null = not on this rail). */
1258
+ stepNumberOf: (runtimeStageId: string) => number | null;
1259
+ /** Value preview for a contributed key at the current stop (the shell
1260
+ * reads snapshot.memory — state as of that moment). */
1261
+ previewValueOf?: (key: string) => unknown;
1262
+ /** Follow an ingredient: re-anchor the walk on ing.key before this stop. */
1263
+ onFollowIngredient?: (ing: TraceIngredient) => void;
1264
+ /** Jump the cursor to a stop (itinerary row click). */
1265
+ onJumpToStop?: (runtimeStageId: string) => void;
1266
+ onShowAll?: () => void;
1267
+ onExit?: () => void;
1268
+ }
1269
+ declare const TraceWalkCard: react.NamedExoticComponent<TraceWalkCardProps>;
1270
+
1109
1271
  interface InsightConfig {
1110
1272
  /** Unique ID (matches recorder id). */
1111
1273
  id: string;
@@ -1133,4 +1295,4 @@ interface CompactTimelineProps {
1133
1295
  }
1134
1296
  declare const CompactTimeline: react.NamedExoticComponent<CompactTimelineProps>;
1135
1297
 
1136
- export { type NarrativeEntry as AdapterNarrativeEntry, type AgentfootprintTrace, type BaseComponentProps, type CausalFrame, CompactTimeline, type CompactTimelineProps, type DarkModeTokensOptions, DataTracePanel, type DataTracePanelProps, type DefaultExpanded, type DiffEntry, type EntryRangeIndex, ExplainableShell, type ExplainableShellProps, FootprintTheme, GanttTimeline, type GanttTimelineProps, type InsightConfig, InsightPanel, type InsightPanelProps, InspectorPanel, type InspectorPanelProps, type MemoryChange, MemoryInspector, type MemoryInspectorProps, MemoryPanel, type MemoryPanelProps, type NarrativeEntry, NarrativeLog, type NarrativeLogProps, NarrativePanel, type NarrativePanelProps, NarrativeTrace, type NarrativeTraceProps, type PanelLabels, type RecorderView, ResultPanel, type ResultPanelProps, type RuntimeSnapshotInput, ScopeDiff, type ScopeDiffProps, type ShellTab, type Size, SnapshotPanel, type SnapshotPanelProps, type StageDetailMode, StageDetailPanel, type StageDetailPanelProps, type StageSnapshot, StoryNarrative, type StoryNarrativeProps, SubflowTree, type SubflowTreeEntry, type SubflowTreeProps, type ThemePresetName, type ThemeTokens, TimeTravelControls, type TimeTravelControlsProps, type TraceParseError, type TraceTheme, TraceViewer, type TraceViewerProps, buildEntryRangeIndex, computeRevealedEntryCount, coolDark, coolLight, createSnapshots, defaultTokens, extractSubflowNarrative, mergeWritePatch, rawDefaults, subflowResultToSnapshots, themePresets, toVisualizationSnapshots, tokensToCSSVars, useDarkModeTokens, useFootprintTheme, warmDark, warmLight };
1298
+ export { type NarrativeEntry as AdapterNarrativeEntry, type AgentfootprintTrace, type BaseComponentProps, type CausalFrame, CompactTimeline, type CompactTimelineProps, type DarkModeTokensOptions, DataTracePanel, type DataTracePanelProps, type DefaultExpanded, type DiffEntry, type EntryRangeIndex, ExplainableShell, type ExplainableShellProps, FootprintTheme, GanttTimeline, type GanttTimelineProps, type InsightConfig, InsightPanel, type InsightPanelProps, InspectorPanel, type InspectorPanelProps, type MemoryChange, MemoryInspector, type MemoryInspectorProps, MemoryPanel, type MemoryPanelProps, type NarrativeEntry, NarrativeLog, type NarrativeLogProps, NarrativePanel, type NarrativePanelProps, NarrativeTrace, type NarrativeTraceProps, type PanelLabels, type RecorderView, ResultPanel, type ResultPanelProps, type RuntimeSnapshotInput, ScopeDiff, type ScopeDiffProps, type ShellTab, type Size, SnapshotPanel, type SnapshotPanelProps, type StageDetailMode, StageDetailPanel, type StageDetailPanelProps, type StageSnapshot, StoryNarrative, type StoryNarrativeProps, SubflowTree, type SubflowTreeEntry, type SubflowTreeProps, type ThemePresetName, type ThemeTokens, TimeTravelControls, type TimeTravelControlsProps, type TraceIngredient, type TraceParseError, type TraceStop, type TraceTheme, TraceViewer, type TraceViewerProps, type TraceWalk, TraceWalkCard, type TraceWalkCardProps, type TraceWalkMissing, type TracingRail, buildEntryRangeIndex, buildTraceWalk, computeRevealedEntryCount, coolDark, coolLight, createSnapshots, defaultTokens, extractSubflowNarrative, formatTraceWalk, mergeWritePatch, rawDefaults, subflowResultToSnapshots, themePresets, toVisualizationSnapshots, tokensToCSSVars, useDarkModeTokens, useFootprintTheme, warmDark, warmLight };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as react from 'react';
2
+ import { ReactNode } from 'react';
2
3
  import { Node, Edge } from '@xyflow/react';
3
4
 
4
5
  /** Snapshot of a single pipeline stage — the core data shape for all components. */
@@ -318,6 +319,31 @@ interface StageDetailPanelProps extends BaseComponentProps {
318
319
  }
319
320
  declare function StageDetailPanel({ snapshots, selectedIndex, mode: controlledMode, showToggle, onModeChange, size, unstyled, className, style, }: StageDetailPanelProps): react.JSX.Element;
320
321
 
322
+ /**
323
+ * Same-Rail Rewind (tracing mode) — the rail's AXIS never changes, only its
324
+ * stops do: every dependency was committed earlier than the value it fed, so
325
+ * a backward slice is a sub-sequence of this same timeline. When `tracing`
326
+ * is set, slice members stay landable ("stops"), everything else fades to
327
+ * unlandable ticks, and prev/next walk stop-to-stop ("◀ earlier cause").
328
+ * The cursor stays the ONE `selectedIndex` — no second position exists.
329
+ */
330
+ interface TracingRail {
331
+ /** The traced variable — rendered in the mode header. */
332
+ tracedKey: string;
333
+ /** Set while an ingredient filter is active ("▸ via key"). */
334
+ viaKey?: string | null;
335
+ /** Snapshot indices that are stops, ASCENDING. All other ticks become
336
+ * faint and unlandable (context, not destinations). */
337
+ stopIndices: number[];
338
+ /** 1-based position of the cursor in WALK order (newest first) + total —
339
+ * the "stop 2 of 6" label. */
340
+ stopOrdinal: number;
341
+ totalStops: number;
342
+ /** Exit tracing (Done button / Escape). The cursor stays put. */
343
+ onExit: () => void;
344
+ /** Clear the via filter back to the full walk (breadcrumb's "show all"). */
345
+ onShowAll?: () => void;
346
+ }
321
347
  interface TimeTravelControlsProps extends BaseComponentProps {
322
348
  /** Stage snapshots */
323
349
  snapshots: StageSnapshot[];
@@ -327,8 +353,10 @@ interface TimeTravelControlsProps extends BaseComponentProps {
327
353
  onIndexChange: (index: number) => void;
328
354
  /** Enable auto-play with Gantt-proportional timing */
329
355
  autoPlayable?: boolean;
356
+ /** Same-Rail Rewind session — when set, the rail is in tracing mode. */
357
+ tracing?: TracingRail | null;
330
358
  }
331
- declare function TimeTravelControls({ snapshots, selectedIndex, onIndexChange, autoPlayable, size, unstyled, className, style, }: TimeTravelControlsProps): react.JSX.Element;
359
+ declare function TimeTravelControls({ snapshots, selectedIndex, onIndexChange, autoPlayable, tracing, size, unstyled, className, style, }: TimeTravelControlsProps): react.JSX.Element;
332
360
 
333
361
  /**
334
362
  * One entry in the execution timeline. `<TracedFlow>` keys time-travel
@@ -731,6 +759,9 @@ interface ExplainableShellProps extends BaseComponentProps {
731
759
  selectedIndex: number;
732
760
  onNodeClick?: (indexOrId: number | string) => void;
733
761
  showStageId?: boolean;
762
+ /** Dependency-cone overlay (chart node id → BFS depth) — painted while
763
+ * the Inspector's Data Trace tab is open. Custom renderers may ignore it. */
764
+ sliceCone?: ReadonlyMap<string, number>;
734
765
  }) => React.ReactNode;
735
766
  /**
736
767
  * When true, render each node's stable `stageId` as a small monospace
@@ -1103,9 +1134,140 @@ interface InspectorPanelProps {
1103
1134
  selectedStageId?: string;
1104
1135
  /** Navigate to a stage when clicking a Data Trace frame. */
1105
1136
  onNavigateToStage?: (runtimeStageId: string) => void;
1137
+ /** Fires when the user switches tabs — lets the shell paint the chart's
1138
+ * dependency cone while the Data Trace tab is open. */
1139
+ onTabChange?: (tab: "state" | "trace") => void;
1140
+ /** Controlled tab — when provided the SHELL owns the tab (it must force
1141
+ * Data Trace open on tracing entry); clicks still fire onTabChange. */
1142
+ tab?: "state" | "trace";
1143
+ /** Replaces the Data Trace tab body (the shell swaps in the Same-Rail
1144
+ * Rewind stop card / entry chips); default = the classic frames list. */
1145
+ traceContent?: ReactNode;
1106
1146
  }
1107
1147
  declare const InspectorPanel: react.NamedExoticComponent<InspectorPanelProps>;
1108
1148
 
1149
+ /**
1150
+ * traceWalk — the SAME-RAIL REWIND walk: a variable-anchored backward slice,
1151
+ * linearized in REVERSE COMMIT ORDER so it can be driven by the existing
1152
+ * time slider ("◀ earlier cause" stop by stop).
1153
+ *
1154
+ * THE LOAD-BEARING FACT (why one linear walk can cover a DAG): every
1155
+ * dependency was committed strictly EARLIER than the value derived from it,
1156
+ * so a backward slice is always a sub-sequence of the run's timeline — and
1157
+ * sorting its frames by commitIdx DESCENDING is a valid topological order.
1158
+ * One monotone "earlier" button therefore visits EVERY frame, including
1159
+ * both parents of a fork, with no branch-choosing UI and no second cursor.
1160
+ *
1161
+ * FORKS are explained, not navigated: each stop carries its `ingredients`
1162
+ * (the read keys + who wrote each), so a 2-parent value shows both chips;
1163
+ * "follow one ingredient" is a RE-ANCHORED walk (same function, key = the
1164
+ * ingredient, before = this stop) — never a special traversal mode.
1165
+ *
1166
+ * HONEST ABSENCE, two truthful sentences (they are different facts):
1167
+ * 'never-written' — no commit in the WHOLE log wrote the key: it came
1168
+ * in with the run's inputs.
1169
+ * 'not-yet-written' — a later commit writes it, but none at or before
1170
+ * the cutoff: "not yet" is not "never".
1171
+ *
1172
+ * Shares the read→write BFS with dataTrace.ts (the causalChain mirror);
1173
+ * eui still never imports footprintjs — snapshot SHAPES only.
1174
+ */
1175
+ /** One read key of a stop, resolved to the commit that wrote it. */
1176
+ interface TraceIngredient {
1177
+ key: string;
1178
+ /** null = no commit before this stop wrote the key (a run-input terminus). */
1179
+ writerRuntimeStageId: string | null;
1180
+ writerStageName: string | null;
1181
+ writerCommitIdx: number | null;
1182
+ }
1183
+ /** One stop on the rewind rail — a slice frame with its rail position. */
1184
+ interface TraceStop {
1185
+ runtimeStageId: string;
1186
+ stageId: string;
1187
+ stageName: string;
1188
+ /** Position in the commit log — the stop's place on the time rail. */
1189
+ commitIdx: number;
1190
+ /** The slice keys DOWNSTREAM members read from this stop (what it
1191
+ * contributed to the traced value). The anchor contributes the traced
1192
+ * key itself. */
1193
+ contributedKeys: string[];
1194
+ keysWritten: string[];
1195
+ ingredients: TraceIngredient[];
1196
+ /** BFS hop distance from the anchor (tooltip-grade info, NOT the walk
1197
+ * order — the walk order is time). */
1198
+ depth: number;
1199
+ /** 1-based pass number when the same stage appears more than once in
1200
+ * the walk (loop iterations); 0 = appears once. */
1201
+ loopPass: number;
1202
+ }
1203
+ interface TraceWalkMissing {
1204
+ reason: "never-written" | "not-yet-written";
1205
+ /** For 'not-yet-written': where the FIRST write actually happens. */
1206
+ firstWriteCommitIdx?: number;
1207
+ firstWriterRuntimeStageId?: string;
1208
+ firstWriterStageName?: string;
1209
+ }
1210
+ interface TraceWalk {
1211
+ key: string;
1212
+ /** Stops in WALK ORDER: commitIdx DESCENDING. stops[0] is the anchor
1213
+ * (the last writer of `key` within the cutoff). */
1214
+ stops: TraceStop[];
1215
+ /** Non-null ⇒ zero stops: the honest-absence card, not an empty chain. */
1216
+ missing: TraceWalkMissing | null;
1217
+ /** Read keys that NO commit ever wrote — the run's inputs ("came in the
1218
+ * door"), deduped, in first-encounter order. */
1219
+ inputTermini: string[];
1220
+ /** False when the snapshot recorded no reads anywhere — the chain is
1221
+ * UNKNOWABLE (not absent) beyond the anchor. */
1222
+ readsAvailable: boolean;
1223
+ /** True when the underlying slice hit its frame/depth budget — the
1224
+ * earliest stop may not be the true origin. */
1225
+ truncated: boolean;
1226
+ }
1227
+ /**
1228
+ * Build the rewind walk for `key`.
1229
+ *
1230
+ * `beforeCommitIdx` (EXCLUSIVE) scopes the question to "the value as it
1231
+ * stood before that moment" — it is also how ingredient-following works:
1232
+ * follow ingredient K at stop S = buildTraceWalk(K, { beforeCommitIdx:
1233
+ * S.commitIdx }) — one function, no traversal modes.
1234
+ */
1235
+ declare function buildTraceWalk(commitLog: unknown[], executionTree: unknown, key: string, opts?: {
1236
+ beforeCommitIdx?: number;
1237
+ maxDepth?: number;
1238
+ maxFrames?: number;
1239
+ }): TraceWalk;
1240
+ /**
1241
+ * formatTraceWalk — THE parity artifact: the [Copy story] button and any
1242
+ * LLM backtrack tool emit THIS string, so the human's board and the
1243
+ * agent's answer are the same text, not two translations.
1244
+ *
1245
+ * `stepNumberOf` maps a runtimeStageId to the 1-based step number shown on
1246
+ * the rail (null = not on the rail); walk order and wording match the
1247
+ * stop cards exactly.
1248
+ */
1249
+ declare function formatTraceWalk(walk: TraceWalk, stepNumberOf: (runtimeStageId: string) => number | null): string;
1250
+
1251
+ interface TraceWalkCardProps {
1252
+ walk: TraceWalk;
1253
+ /** The ONE cursor — the card highlights its stop; null falls back to the anchor. */
1254
+ cursorRuntimeStageId: string | null;
1255
+ /** Active ingredient filter (breadcrumb "▸ via key"). */
1256
+ viaKey?: string | null;
1257
+ /** Map a stop to its 1-based rail step number (null = not on this rail). */
1258
+ stepNumberOf: (runtimeStageId: string) => number | null;
1259
+ /** Value preview for a contributed key at the current stop (the shell
1260
+ * reads snapshot.memory — state as of that moment). */
1261
+ previewValueOf?: (key: string) => unknown;
1262
+ /** Follow an ingredient: re-anchor the walk on ing.key before this stop. */
1263
+ onFollowIngredient?: (ing: TraceIngredient) => void;
1264
+ /** Jump the cursor to a stop (itinerary row click). */
1265
+ onJumpToStop?: (runtimeStageId: string) => void;
1266
+ onShowAll?: () => void;
1267
+ onExit?: () => void;
1268
+ }
1269
+ declare const TraceWalkCard: react.NamedExoticComponent<TraceWalkCardProps>;
1270
+
1109
1271
  interface InsightConfig {
1110
1272
  /** Unique ID (matches recorder id). */
1111
1273
  id: string;
@@ -1133,4 +1295,4 @@ interface CompactTimelineProps {
1133
1295
  }
1134
1296
  declare const CompactTimeline: react.NamedExoticComponent<CompactTimelineProps>;
1135
1297
 
1136
- export { type NarrativeEntry as AdapterNarrativeEntry, type AgentfootprintTrace, type BaseComponentProps, type CausalFrame, CompactTimeline, type CompactTimelineProps, type DarkModeTokensOptions, DataTracePanel, type DataTracePanelProps, type DefaultExpanded, type DiffEntry, type EntryRangeIndex, ExplainableShell, type ExplainableShellProps, FootprintTheme, GanttTimeline, type GanttTimelineProps, type InsightConfig, InsightPanel, type InsightPanelProps, InspectorPanel, type InspectorPanelProps, type MemoryChange, MemoryInspector, type MemoryInspectorProps, MemoryPanel, type MemoryPanelProps, type NarrativeEntry, NarrativeLog, type NarrativeLogProps, NarrativePanel, type NarrativePanelProps, NarrativeTrace, type NarrativeTraceProps, type PanelLabels, type RecorderView, ResultPanel, type ResultPanelProps, type RuntimeSnapshotInput, ScopeDiff, type ScopeDiffProps, type ShellTab, type Size, SnapshotPanel, type SnapshotPanelProps, type StageDetailMode, StageDetailPanel, type StageDetailPanelProps, type StageSnapshot, StoryNarrative, type StoryNarrativeProps, SubflowTree, type SubflowTreeEntry, type SubflowTreeProps, type ThemePresetName, type ThemeTokens, TimeTravelControls, type TimeTravelControlsProps, type TraceParseError, type TraceTheme, TraceViewer, type TraceViewerProps, buildEntryRangeIndex, computeRevealedEntryCount, coolDark, coolLight, createSnapshots, defaultTokens, extractSubflowNarrative, mergeWritePatch, rawDefaults, subflowResultToSnapshots, themePresets, toVisualizationSnapshots, tokensToCSSVars, useDarkModeTokens, useFootprintTheme, warmDark, warmLight };
1298
+ export { type NarrativeEntry as AdapterNarrativeEntry, type AgentfootprintTrace, type BaseComponentProps, type CausalFrame, CompactTimeline, type CompactTimelineProps, type DarkModeTokensOptions, DataTracePanel, type DataTracePanelProps, type DefaultExpanded, type DiffEntry, type EntryRangeIndex, ExplainableShell, type ExplainableShellProps, FootprintTheme, GanttTimeline, type GanttTimelineProps, type InsightConfig, InsightPanel, type InsightPanelProps, InspectorPanel, type InspectorPanelProps, type MemoryChange, MemoryInspector, type MemoryInspectorProps, MemoryPanel, type MemoryPanelProps, type NarrativeEntry, NarrativeLog, type NarrativeLogProps, NarrativePanel, type NarrativePanelProps, NarrativeTrace, type NarrativeTraceProps, type PanelLabels, type RecorderView, ResultPanel, type ResultPanelProps, type RuntimeSnapshotInput, ScopeDiff, type ScopeDiffProps, type ShellTab, type Size, SnapshotPanel, type SnapshotPanelProps, type StageDetailMode, StageDetailPanel, type StageDetailPanelProps, type StageSnapshot, StoryNarrative, type StoryNarrativeProps, SubflowTree, type SubflowTreeEntry, type SubflowTreeProps, type ThemePresetName, type ThemeTokens, TimeTravelControls, type TimeTravelControlsProps, type TraceIngredient, type TraceParseError, type TraceStop, type TraceTheme, TraceViewer, type TraceViewerProps, type TraceWalk, TraceWalkCard, type TraceWalkCardProps, type TraceWalkMissing, type TracingRail, buildEntryRangeIndex, buildTraceWalk, computeRevealedEntryCount, coolDark, coolLight, createSnapshots, defaultTokens, extractSubflowNarrative, formatTraceWalk, mergeWritePatch, rawDefaults, subflowResultToSnapshots, themePresets, toVisualizationSnapshots, tokensToCSSVars, useDarkModeTokens, useFootprintTheme, warmDark, warmLight };