/** * footprintjs/trace — Execution tracing, debugging, and backtracking utilities. * * Runtime stage IDs, commit log queries, and recorder base classes. * * @example * ```typescript * import { parseRuntimeStageId, findLastWriter, KeyedStore, SequenceStore } from 'footprintjs/trace'; * * // Parse a runtimeStageId * const { stageId, executionIndex } = parseRuntimeStageId('call-llm#5'); * * // Backtrack: who wrote 'systemPrompt' before commit at idx 8? * const writer = findLastWriter(commitLog, 'systemPrompt', 8); * * // v5 primary API: compose a Store as a field (one purpose per recorder). * // KeyedStore — 1:1 (one entry per step) * class MyRecorder { * readonly id = 'my-recorder'; * private store = new KeyedStore(); * onWrite(e) { this.store.set(e.runtimeStageId, { ... }); } * } * * // SequenceStore — 1:N (multiple entries per step, ordering matters) * class AuditRecorder { * readonly id = 'audit'; * private store = new SequenceStore(); * onRead(e) { this.store.push({ runtimeStageId: e.runtimeStageId, ... }); } * } * ``` */ export type { ExecutionCounter } from './lib/engine/runtimeStageId.js'; export { buildRuntimeStageId, createExecutionCounter, parseRuntimeStageId, splitStageId, } from './lib/engine/runtimeStageId.js'; export type { WalkerItem, WalkerOptions } from './lib/engine/walkSubflowSpec.js'; export { walkSubflowSpec } from './lib/engine/walkSubflowSpec.js'; export { commitValueAt, findCommit, findCommits, findLastWriter } from './lib/memory/commitLogUtils.js'; export type { CausalChainOptions, CausalEdge, CausalNode, ControlDependency, ControlDepLookup, EdgeWeigher, KeysReadLookup, } from './lib/memory/backtrack.js'; export { causalChain, flattenCausalDAG, formatCausalChain } from './lib/memory/backtrack.js'; export type { UntrackedSource } from './lib/memory/types.js'; export { BoundaryStateStore } from './lib/recorder/BoundaryStateStore.js'; export { KeyedStore } from './lib/recorder/KeyedStore.js'; export { SequenceStore } from './lib/recorder/SequenceStore.js'; export type { RangeEntry, RangeToken } from './lib/recorder/CommitRangeIndex.js'; export { CommitRangeIndex } from './lib/recorder/CommitRangeIndex.js'; export type { Topology, TopologyEdge, TopologyIncomingKind, TopologyNode, TopologyRecorderOptions, } from './lib/recorder/TopologyRecorder.js'; export { TopologyRecorder, topologyRecorder } from './lib/recorder/TopologyRecorder.js'; export type { InOutEntry, InOutPhase, InOutRecorderOptions } from './lib/recorder/InOutRecorder.js'; export { InOutRecorder, inOutRecorder, ROOT_RUNTIME_STAGE_ID, ROOT_SUBFLOW_ID } from './lib/recorder/InOutRecorder.js'; export type { ControlDecisionRecord, ControlDepRecorderOptions } from './lib/recorder/ControlDepRecorder.js'; export { ControlDepRecorder, controlDepRecorder } from './lib/recorder/ControlDepRecorder.js'; export type { QualityEntry, QualityRecorderOptions, QualityScoringFn } from './lib/recorder/QualityRecorder.js'; export { QualityRecorder } from './lib/recorder/QualityRecorder.js'; export type { QualityFrame, QualityStackTrace } from './lib/recorder/qualityTrace.js'; export { formatQualityTrace, qualityTrace } from './lib/recorder/qualityTrace.js';