footprintjs 9.48.4 → 10.0.1

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 (326) hide show
  1. package/AGENTS.md +12 -10
  2. package/CLAUDE.md +21 -23
  3. package/README.md +1 -1
  4. package/dist/advanced.js +71 -128
  5. package/dist/esm/advanced.d.ts +24 -58
  6. package/dist/esm/advanced.js +13 -51
  7. package/dist/esm/index.d.ts +5 -8
  8. package/dist/esm/index.js +3 -3
  9. package/dist/esm/lib/builder/FlowChartBuilder.d.ts +1 -1
  10. package/dist/esm/lib/builder/FlowChartBuilder.js +28 -10
  11. package/dist/esm/lib/builder/structure/StructureRecorder.d.ts +1 -1
  12. package/dist/esm/lib/builder/structure/StructureRecorder.js +1 -1
  13. package/dist/esm/lib/capture/index.d.ts +0 -1
  14. package/dist/esm/lib/capture/index.js +1 -2
  15. package/dist/esm/lib/engine/graph/prefixNodeTree.js +2 -2
  16. package/dist/esm/lib/engine/handlers/ResumeEntry.d.ts +3 -3
  17. package/dist/esm/lib/engine/handlers/ResumeEntry.js +4 -4
  18. package/dist/esm/lib/engine/handlers/SubflowExecutor.d.ts +1 -2
  19. package/dist/esm/lib/engine/handlers/SubflowExecutor.js +4 -8
  20. package/dist/esm/lib/engine/index.d.ts +1 -1
  21. package/dist/esm/lib/engine/index.js +1 -1
  22. package/dist/esm/lib/engine/narrative/CombinedNarrativeRecorder.d.ts +4 -4
  23. package/dist/esm/lib/engine/narrative/CombinedNarrativeRecorder.js +1 -1
  24. package/dist/esm/lib/engine/narrative/index.d.ts +1 -1
  25. package/dist/esm/lib/engine/narrative/index.js +1 -1
  26. package/dist/esm/lib/engine/narrative/narrativeTypes.d.ts +1 -11
  27. package/dist/esm/lib/engine/narrative/narrativeTypes.js +1 -1
  28. package/dist/esm/lib/engine/traversal/FlowchartTraverser.d.ts +2 -10
  29. package/dist/esm/lib/engine/traversal/FlowchartTraverser.js +4 -6
  30. package/dist/esm/lib/engine/traversalContext.d.ts +1 -1
  31. package/dist/esm/lib/engine/traversalContext.js +2 -2
  32. package/dist/esm/lib/engine/types.d.ts +2 -10
  33. package/dist/esm/lib/engine/types.js +1 -1
  34. package/dist/esm/lib/engine/walkSubflowSpec.js +2 -2
  35. package/dist/esm/lib/ids/reservedIds.js +2 -2
  36. package/dist/esm/lib/memory/DiagnosticCollector.js +2 -2
  37. package/dist/esm/lib/memory/StageContext.d.ts +2 -4
  38. package/dist/esm/lib/memory/StageContext.js +2 -2
  39. package/dist/esm/lib/memory/borrowedMutation.js +2 -2
  40. package/dist/esm/lib/memory/index.d.ts +6 -21
  41. package/dist/esm/lib/memory/index.js +4 -22
  42. package/dist/esm/lib/memory/redaction.d.ts +1 -1
  43. package/dist/esm/lib/memory/redaction.js +2 -2
  44. package/dist/esm/lib/memory/runPolicy.d.ts +3 -2
  45. package/dist/esm/lib/memory/runPolicy.js +1 -1
  46. package/dist/esm/lib/reactive/createTypedScope.js +2 -2
  47. package/dist/esm/lib/reactive/writeTraps.js +2 -2
  48. package/dist/esm/lib/recorder/ControlDepRecorder.d.ts +3 -2
  49. package/dist/esm/lib/recorder/ControlDepRecorder.js +3 -2
  50. package/dist/esm/lib/recorder/EmitRecorder.d.ts +1 -1
  51. package/dist/esm/lib/recorder/EmitRecorder.js +1 -1
  52. package/dist/esm/lib/recorder/InOutRecorder.js +2 -2
  53. package/dist/esm/lib/recorder/qualityTrace.d.ts +5 -2
  54. package/dist/esm/lib/recorder/qualityTrace.js +15 -7
  55. package/dist/esm/lib/runner/DeferredObserverTier.js +2 -2
  56. package/dist/esm/lib/runner/ExecutionRuntime.d.ts +4 -5
  57. package/dist/esm/lib/runner/ExecutionRuntime.js +2 -5
  58. package/dist/esm/lib/runner/FlowChartExecutor.d.ts +1 -1
  59. package/dist/esm/lib/runner/FlowChartExecutor.js +1 -1
  60. package/dist/esm/lib/runner/getSubtreeSnapshot.d.ts +1 -1
  61. package/dist/esm/lib/runner/getSubtreeSnapshot.js +4 -4
  62. package/dist/esm/lib/runner/resume.js +2 -2
  63. package/dist/esm/lib/runner/snapshot.js +3 -2
  64. package/dist/esm/lib/scope/ScopeFacade.js +2 -2
  65. package/dist/esm/lib/scope/state/zod/scopeFactory.js +2 -2
  66. package/dist/esm/recorders.d.ts +2 -3
  67. package/dist/esm/recorders.js +1 -1
  68. package/dist/esm/trace.d.ts +11 -57
  69. package/dist/esm/trace.js +10 -68
  70. package/dist/index.js +3 -3
  71. package/dist/lib/builder/FlowChartBuilder.js +30 -12
  72. package/dist/lib/builder/structure/StructureRecorder.js +1 -1
  73. package/dist/lib/capture/index.js +2 -4
  74. package/dist/lib/engine/graph/prefixNodeTree.js +5 -5
  75. package/dist/lib/engine/handlers/ResumeEntry.js +4 -4
  76. package/dist/lib/engine/handlers/SubflowExecutor.js +5 -9
  77. package/dist/lib/engine/index.js +1 -1
  78. package/dist/lib/engine/narrative/CombinedNarrativeRecorder.js +1 -1
  79. package/dist/lib/engine/narrative/index.js +1 -1
  80. package/dist/lib/engine/narrative/narrativeTypes.js +1 -1
  81. package/dist/lib/engine/traversal/FlowchartTraverser.js +8 -10
  82. package/dist/lib/engine/traversalContext.js +4 -4
  83. package/dist/lib/engine/types.js +1 -1
  84. package/dist/lib/engine/walkSubflowSpec.js +3 -3
  85. package/dist/lib/ids/reservedIds.js +5 -5
  86. package/dist/lib/memory/DiagnosticCollector.js +3 -3
  87. package/dist/lib/memory/StageContext.js +3 -3
  88. package/dist/lib/memory/borrowedMutation.js +3 -3
  89. package/dist/lib/memory/index.js +7 -42
  90. package/dist/lib/memory/redaction.js +3 -3
  91. package/dist/lib/memory/runPolicy.js +1 -1
  92. package/dist/lib/reactive/createTypedScope.js +3 -3
  93. package/dist/lib/reactive/writeTraps.js +4 -4
  94. package/dist/lib/recorder/ControlDepRecorder.js +3 -2
  95. package/dist/lib/recorder/EmitRecorder.js +1 -1
  96. package/dist/lib/recorder/InOutRecorder.js +3 -3
  97. package/dist/lib/recorder/qualityTrace.js +17 -9
  98. package/dist/lib/runner/DeferredObserverTier.js +3 -3
  99. package/dist/lib/runner/ExecutionRuntime.js +6 -9
  100. package/dist/lib/runner/FlowChartExecutor.js +1 -1
  101. package/dist/lib/runner/getSubtreeSnapshot.js +6 -6
  102. package/dist/lib/runner/resume.js +3 -3
  103. package/dist/lib/runner/snapshot.js +6 -5
  104. package/dist/lib/scope/ScopeFacade.js +3 -3
  105. package/dist/lib/scope/state/zod/scopeFactory.js +4 -4
  106. package/dist/recorders.js +1 -1
  107. package/dist/trace.js +18 -120
  108. package/dist/types/advanced.d.ts +24 -58
  109. package/dist/types/index.d.ts +5 -8
  110. package/dist/types/lib/builder/FlowChartBuilder.d.ts +1 -1
  111. package/dist/types/lib/builder/structure/StructureRecorder.d.ts +1 -1
  112. package/dist/types/lib/capture/index.d.ts +0 -1
  113. package/dist/types/lib/engine/handlers/ResumeEntry.d.ts +3 -3
  114. package/dist/types/lib/engine/handlers/SubflowExecutor.d.ts +1 -2
  115. package/dist/types/lib/engine/index.d.ts +1 -1
  116. package/dist/types/lib/engine/narrative/CombinedNarrativeRecorder.d.ts +4 -4
  117. package/dist/types/lib/engine/narrative/index.d.ts +1 -1
  118. package/dist/types/lib/engine/narrative/narrativeTypes.d.ts +1 -11
  119. package/dist/types/lib/engine/traversal/FlowchartTraverser.d.ts +2 -10
  120. package/dist/types/lib/engine/traversalContext.d.ts +1 -1
  121. package/dist/types/lib/engine/types.d.ts +2 -10
  122. package/dist/types/lib/memory/StageContext.d.ts +2 -4
  123. package/dist/types/lib/memory/index.d.ts +6 -21
  124. package/dist/types/lib/memory/redaction.d.ts +1 -1
  125. package/dist/types/lib/memory/runPolicy.d.ts +3 -2
  126. package/dist/types/lib/recorder/ControlDepRecorder.d.ts +3 -2
  127. package/dist/types/lib/recorder/EmitRecorder.d.ts +1 -1
  128. package/dist/types/lib/recorder/qualityTrace.d.ts +5 -2
  129. package/dist/types/lib/runner/ExecutionRuntime.d.ts +4 -5
  130. package/dist/types/lib/runner/FlowChartExecutor.d.ts +1 -1
  131. package/dist/types/lib/runner/getSubtreeSnapshot.d.ts +1 -1
  132. package/dist/types/recorders.d.ts +2 -3
  133. package/dist/types/trace.d.ts +11 -57
  134. package/package.json +6 -17
  135. package/dist/esm/lib/capture/freeze.d.ts +0 -91
  136. package/dist/esm/lib/capture/freeze.js +0 -314
  137. package/dist/esm/lib/capture/ownData.d.ts +0 -18
  138. package/dist/esm/lib/capture/ownData.js +0 -36
  139. package/dist/esm/lib/capture/valueKinds.d.ts +0 -57
  140. package/dist/esm/lib/capture/valueKinds.js +0 -142
  141. package/dist/esm/lib/ids/runtimeStageId.d.ts +0 -173
  142. package/dist/esm/lib/ids/runtimeStageId.js +0 -194
  143. package/dist/esm/lib/memory/EventLog.d.ts +0 -105
  144. package/dist/esm/lib/memory/EventLog.js +0 -148
  145. package/dist/esm/lib/memory/RecordFrame.d.ts +0 -232
  146. package/dist/esm/lib/memory/RecordFrame.js +0 -296
  147. package/dist/esm/lib/memory/SharedMemory.d.ts +0 -46
  148. package/dist/esm/lib/memory/SharedMemory.js +0 -88
  149. package/dist/esm/lib/memory/TransactionBuffer.d.ts +0 -521
  150. package/dist/esm/lib/memory/TransactionBuffer.js +0 -947
  151. package/dist/esm/lib/memory/admission.d.ts +0 -81
  152. package/dist/esm/lib/memory/admission.js +0 -153
  153. package/dist/esm/lib/memory/backtrack.d.ts +0 -292
  154. package/dist/esm/lib/memory/backtrack.js +0 -467
  155. package/dist/esm/lib/memory/commitLogUtils.d.ts +0 -217
  156. package/dist/esm/lib/memory/commitLogUtils.js +0 -384
  157. package/dist/esm/lib/memory/deltaEncoding.d.ts +0 -66
  158. package/dist/esm/lib/memory/deltaEncoding.js +0 -122
  159. package/dist/esm/lib/memory/equality.d.ts +0 -93
  160. package/dist/esm/lib/memory/equality.js +0 -262
  161. package/dist/esm/lib/memory/eventPosition.d.ts +0 -18
  162. package/dist/esm/lib/memory/eventPosition.js +0 -2
  163. package/dist/esm/lib/memory/honesty.d.ts +0 -93
  164. package/dist/esm/lib/memory/honesty.js +0 -92
  165. package/dist/esm/lib/memory/keyPaths.d.ts +0 -125
  166. package/dist/esm/lib/memory/keyPaths.js +0 -227
  167. package/dist/esm/lib/memory/logModel.d.ts +0 -76
  168. package/dist/esm/lib/memory/logModel.js +0 -364
  169. package/dist/esm/lib/memory/merge.d.ts +0 -26
  170. package/dist/esm/lib/memory/merge.js +0 -52
  171. package/dist/esm/lib/memory/pathOps.d.ts +0 -118
  172. package/dist/esm/lib/memory/pathOps.js +0 -293
  173. package/dist/esm/lib/memory/paths.d.ts +0 -52
  174. package/dist/esm/lib/memory/paths.js +0 -57
  175. package/dist/esm/lib/memory/placeholders.d.ts +0 -39
  176. package/dist/esm/lib/memory/placeholders.js +0 -40
  177. package/dist/esm/lib/memory/recordCommit.d.ts +0 -45
  178. package/dist/esm/lib/memory/recordCommit.js +0 -61
  179. package/dist/esm/lib/memory/scrub.d.ts +0 -53
  180. package/dist/esm/lib/memory/scrub.js +0 -74
  181. package/dist/esm/lib/memory/types.d.ts +0 -209
  182. package/dist/esm/lib/memory/types.js +0 -10
  183. package/dist/esm/lib/memory/utils.d.ts +0 -73
  184. package/dist/esm/lib/memory/utils.js +0 -151
  185. package/dist/esm/lib/memory/verbs.d.ts +0 -333
  186. package/dist/esm/lib/memory/verbs.js +0 -427
  187. package/dist/esm/lib/recorder/CommitRangeIndex.d.ts +0 -147
  188. package/dist/esm/lib/recorder/CommitRangeIndex.js +0 -207
  189. package/dist/esm/lib/scope/detectCircular.d.ts +0 -13
  190. package/dist/esm/lib/scope/detectCircular.js +0 -14
  191. package/dist/esm/lib/scope/recorders/summarizeValue.d.ts +0 -5
  192. package/dist/esm/lib/scope/recorders/summarizeValue.js +0 -6
  193. package/dist/esm/lib/slice/elementProvenance.d.ts +0 -81
  194. package/dist/esm/lib/slice/elementProvenance.js +0 -190
  195. package/dist/esm/lib/slice/forwardSliceForKey.d.ts +0 -88
  196. package/dist/esm/lib/slice/forwardSliceForKey.js +0 -243
  197. package/dist/esm/lib/slice/index.d.ts +0 -25
  198. package/dist/esm/lib/slice/index.js +0 -25
  199. package/dist/esm/lib/slice/keyIndex.d.ts +0 -137
  200. package/dist/esm/lib/slice/keyIndex.js +0 -293
  201. package/dist/esm/lib/slice/keyTimeline.d.ts +0 -49
  202. package/dist/esm/lib/slice/keyTimeline.js +0 -113
  203. package/dist/esm/lib/slice/keysReadSources.d.ts +0 -51
  204. package/dist/esm/lib/slice/keysReadSources.js +0 -95
  205. package/dist/esm/lib/slice/serialize.d.ts +0 -78
  206. package/dist/esm/lib/slice/serialize.js +0 -278
  207. package/dist/esm/lib/slice/sliceForKey.d.ts +0 -47
  208. package/dist/esm/lib/slice/sliceForKey.js +0 -90
  209. package/dist/esm/lib/slice/types.d.ts +0 -567
  210. package/dist/esm/lib/slice/types.js +0 -25
  211. package/dist/esm/lib/time-travel/axis.d.ts +0 -119
  212. package/dist/esm/lib/time-travel/axis.js +0 -179
  213. package/dist/esm/lib/time-travel/bundles.d.ts +0 -77
  214. package/dist/esm/lib/time-travel/bundles.js +0 -136
  215. package/dist/esm/lib/time-travel/chain.d.ts +0 -93
  216. package/dist/esm/lib/time-travel/chain.js +0 -188
  217. package/dist/esm/lib/time-travel/commitStops.d.ts +0 -55
  218. package/dist/esm/lib/time-travel/commitStops.js +0 -202
  219. package/dist/esm/lib/time-travel/index.d.ts +0 -22
  220. package/dist/esm/lib/time-travel/index.js +0 -21
  221. package/dist/esm/lib/time-travel/stateAt.d.ts +0 -102
  222. package/dist/esm/lib/time-travel/stateAt.js +0 -153
  223. package/dist/esm/lib/time-travel/tagStops.d.ts +0 -72
  224. package/dist/esm/lib/time-travel/tagStops.js +0 -102
  225. package/dist/esm/lib/time-travel/timeTravel.d.ts +0 -70
  226. package/dist/esm/lib/time-travel/timeTravel.js +0 -360
  227. package/dist/esm/lib/time-travel/types.d.ts +0 -470
  228. package/dist/esm/lib/time-travel/types.js +0 -23
  229. package/dist/esm/write.d.ts +0 -47
  230. package/dist/esm/write.js +0 -46
  231. package/dist/lib/capture/freeze.js +0 -320
  232. package/dist/lib/capture/ownData.js +0 -41
  233. package/dist/lib/capture/valueKinds.js +0 -146
  234. package/dist/lib/ids/runtimeStageId.js +0 -210
  235. package/dist/lib/memory/EventLog.js +0 -152
  236. package/dist/lib/memory/RecordFrame.js +0 -300
  237. package/dist/lib/memory/SharedMemory.js +0 -92
  238. package/dist/lib/memory/TransactionBuffer.js +0 -951
  239. package/dist/lib/memory/admission.js +0 -159
  240. package/dist/lib/memory/backtrack.js +0 -474
  241. package/dist/lib/memory/commitLogUtils.js +0 -399
  242. package/dist/lib/memory/deltaEncoding.js +0 -128
  243. package/dist/lib/memory/equality.js +0 -266
  244. package/dist/lib/memory/eventPosition.js +0 -3
  245. package/dist/lib/memory/honesty.js +0 -95
  246. package/dist/lib/memory/keyPaths.js +0 -243
  247. package/dist/lib/memory/logModel.js +0 -372
  248. package/dist/lib/memory/merge.js +0 -56
  249. package/dist/lib/memory/pathOps.js +0 -309
  250. package/dist/lib/memory/paths.js +0 -62
  251. package/dist/lib/memory/placeholders.js +0 -43
  252. package/dist/lib/memory/recordCommit.js +0 -65
  253. package/dist/lib/memory/scrub.js +0 -79
  254. package/dist/lib/memory/types.js +0 -11
  255. package/dist/lib/memory/utils.js +0 -170
  256. package/dist/lib/memory/verbs.js +0 -444
  257. package/dist/lib/recorder/CommitRangeIndex.js +0 -211
  258. package/dist/lib/scope/detectCircular.js +0 -21
  259. package/dist/lib/scope/recorders/summarizeValue.js +0 -10
  260. package/dist/lib/slice/elementProvenance.js +0 -195
  261. package/dist/lib/slice/forwardSliceForKey.js +0 -247
  262. package/dist/lib/slice/index.js +0 -42
  263. package/dist/lib/slice/keyIndex.js +0 -313
  264. package/dist/lib/slice/keyTimeline.js +0 -117
  265. package/dist/lib/slice/keysReadSources.js +0 -101
  266. package/dist/lib/slice/serialize.js +0 -286
  267. package/dist/lib/slice/sliceForKey.js +0 -95
  268. package/dist/lib/slice/types.js +0 -26
  269. package/dist/lib/time-travel/axis.js +0 -184
  270. package/dist/lib/time-travel/bundles.js +0 -144
  271. package/dist/lib/time-travel/chain.js +0 -193
  272. package/dist/lib/time-travel/commitStops.js +0 -206
  273. package/dist/lib/time-travel/index.js +0 -32
  274. package/dist/lib/time-travel/stateAt.js +0 -160
  275. package/dist/lib/time-travel/tagStops.js +0 -106
  276. package/dist/lib/time-travel/timeTravel.js +0 -364
  277. package/dist/lib/time-travel/types.js +0 -24
  278. package/dist/types/lib/capture/freeze.d.ts +0 -91
  279. package/dist/types/lib/capture/ownData.d.ts +0 -18
  280. package/dist/types/lib/capture/valueKinds.d.ts +0 -57
  281. package/dist/types/lib/ids/runtimeStageId.d.ts +0 -173
  282. package/dist/types/lib/memory/EventLog.d.ts +0 -105
  283. package/dist/types/lib/memory/RecordFrame.d.ts +0 -232
  284. package/dist/types/lib/memory/SharedMemory.d.ts +0 -46
  285. package/dist/types/lib/memory/TransactionBuffer.d.ts +0 -521
  286. package/dist/types/lib/memory/admission.d.ts +0 -81
  287. package/dist/types/lib/memory/backtrack.d.ts +0 -292
  288. package/dist/types/lib/memory/commitLogUtils.d.ts +0 -217
  289. package/dist/types/lib/memory/deltaEncoding.d.ts +0 -66
  290. package/dist/types/lib/memory/equality.d.ts +0 -93
  291. package/dist/types/lib/memory/eventPosition.d.ts +0 -18
  292. package/dist/types/lib/memory/honesty.d.ts +0 -93
  293. package/dist/types/lib/memory/keyPaths.d.ts +0 -125
  294. package/dist/types/lib/memory/logModel.d.ts +0 -76
  295. package/dist/types/lib/memory/merge.d.ts +0 -26
  296. package/dist/types/lib/memory/pathOps.d.ts +0 -118
  297. package/dist/types/lib/memory/paths.d.ts +0 -52
  298. package/dist/types/lib/memory/placeholders.d.ts +0 -39
  299. package/dist/types/lib/memory/recordCommit.d.ts +0 -45
  300. package/dist/types/lib/memory/scrub.d.ts +0 -53
  301. package/dist/types/lib/memory/types.d.ts +0 -209
  302. package/dist/types/lib/memory/utils.d.ts +0 -73
  303. package/dist/types/lib/memory/verbs.d.ts +0 -333
  304. package/dist/types/lib/recorder/CommitRangeIndex.d.ts +0 -147
  305. package/dist/types/lib/scope/detectCircular.d.ts +0 -13
  306. package/dist/types/lib/scope/recorders/summarizeValue.d.ts +0 -5
  307. package/dist/types/lib/slice/elementProvenance.d.ts +0 -81
  308. package/dist/types/lib/slice/forwardSliceForKey.d.ts +0 -88
  309. package/dist/types/lib/slice/index.d.ts +0 -25
  310. package/dist/types/lib/slice/keyIndex.d.ts +0 -137
  311. package/dist/types/lib/slice/keyTimeline.d.ts +0 -49
  312. package/dist/types/lib/slice/keysReadSources.d.ts +0 -51
  313. package/dist/types/lib/slice/serialize.d.ts +0 -78
  314. package/dist/types/lib/slice/sliceForKey.d.ts +0 -47
  315. package/dist/types/lib/slice/types.d.ts +0 -567
  316. package/dist/types/lib/time-travel/axis.d.ts +0 -119
  317. package/dist/types/lib/time-travel/bundles.d.ts +0 -77
  318. package/dist/types/lib/time-travel/chain.d.ts +0 -93
  319. package/dist/types/lib/time-travel/commitStops.d.ts +0 -55
  320. package/dist/types/lib/time-travel/index.d.ts +0 -22
  321. package/dist/types/lib/time-travel/stateAt.d.ts +0 -102
  322. package/dist/types/lib/time-travel/tagStops.d.ts +0 -72
  323. package/dist/types/lib/time-travel/timeTravel.d.ts +0 -70
  324. package/dist/types/lib/time-travel/types.d.ts +0 -470
  325. package/dist/types/write.d.ts +0 -47
  326. package/dist/write.js +0 -52
@@ -9,7 +9,7 @@ export { FlowchartTraverser } from './traversal/FlowchartTraverser.js';
9
9
  export { isStageNodeReturn } from './graph/StageNode.js';
10
10
  export * from './types.js';
11
11
  export * from './handlers/index.js';
12
- export type { CombinedNarrativeEntry, CombinedNarrativeOptions, EmitRenderContext, NarrativeFormatter, NarrativeRenderer, } from './narrative/narrativeTypes.js';
12
+ export type { CombinedNarrativeEntry, CombinedNarrativeOptions, EmitRenderContext, NarrativeFormatter, } from './narrative/narrativeTypes.js';
13
13
  export { NullControlFlowNarrativeGenerator } from './narrative/NullControlFlowNarrativeGenerator.js';
14
14
  export type { IControlFlowNarrative } from './narrative/types.js';
15
15
  export { FlowRecorderDispatcher } from './narrative/FlowRecorderDispatcher.js';
@@ -17,7 +17,7 @@
17
17
  import type { CombinedRecorder } from '../../recorder/CombinedRecorder.js';
18
18
  import type { EmitEvent } from '../../recorder/EmitRecorder.js';
19
19
  import type { ErrorEvent, PauseEvent, ReadEvent, ResumeEvent, WriteEvent } from '../../scope/types.js';
20
- import type { CombinedNarrativeEntry, NarrativeRenderer } from './narrativeTypes.js';
20
+ import type { CombinedNarrativeEntry, NarrativeFormatter } from './narrativeTypes.js';
21
21
  import type { FlowBreakEvent, FlowDecisionEvent, FlowErrorEvent, FlowForkEvent, FlowLoopEvent, FlowPauseEvent, FlowResumeEvent, FlowSelectedEvent, FlowStageEvent, FlowStageRetryEvent, FlowSubflowEvent } from './types.js';
22
22
  export interface CombinedNarrativeRecorderOptions {
23
23
  includeStepNumbers?: boolean;
@@ -27,8 +27,8 @@ export interface CombinedNarrativeRecorderOptions {
27
27
  * Receives the raw value and maxValueLength. Defaults to summarizeValue(). */
28
28
  formatValue?: (value: unknown, maxLen: number) => string;
29
29
  /** Pluggable renderer for customizing narrative output. Unimplemented methods
30
- * fall back to the default English renderer. See NarrativeRenderer docs. */
31
- renderer?: NarrativeRenderer;
30
+ * fall back to the default English renderer. See NarrativeFormatter docs. */
31
+ renderer?: NarrativeFormatter;
32
32
  }
33
33
  /**
34
34
  * Implements `CombinedRecorder` — the library's first-class abstraction for
@@ -158,7 +158,7 @@ export declare class CombinedNarrativeRecorder implements CombinedRecorder {
158
158
  description: string;
159
159
  preferredOperation: "translate";
160
160
  data: {
161
- type: "subflow" | "loop" | "error" | "stage" | "pause" | "emit" | "fork" | "selector" | "step" | "condition" | "break" | "resume" | "retry";
161
+ type: "subflow" | "loop" | "error" | "pause" | "emit" | "fork" | "selector" | "stage" | "step" | "condition" | "break" | "resume" | "retry";
162
162
  text: string;
163
163
  depth: number;
164
164
  stageName?: string | undefined;
@@ -1,6 +1,6 @@
1
1
  export type { CombinedNarrativeRecorderOptions } from './CombinedNarrativeRecorder.js';
2
2
  export { CombinedNarrativeRecorder } from './CombinedNarrativeRecorder.js';
3
- export type { BreakRenderContext, CombinedNarrativeEntry, CombinedNarrativeOptions, DecisionRenderContext, EmitRenderContext, ErrorRenderContext, ForkRenderContext, LoopRenderContext, NarrativeFormatter, NarrativeRenderer, OpRenderContext, SelectedRenderContext, StageRenderContext, SubflowRenderContext, } from './narrativeTypes.js';
3
+ export type { BreakRenderContext, CombinedNarrativeEntry, CombinedNarrativeOptions, DecisionRenderContext, EmitRenderContext, ErrorRenderContext, ForkRenderContext, LoopRenderContext, NarrativeFormatter, OpRenderContext, SelectedRenderContext, StageRenderContext, SubflowRenderContext, } from './narrativeTypes.js';
4
4
  export { NullControlFlowNarrativeGenerator } from './NullControlFlowNarrativeGenerator.js';
5
5
  export type { IControlFlowNarrative } from './types.js';
6
6
  export { FlowRecorderDispatcher } from './FlowRecorderDispatcher.js';
@@ -150,9 +150,7 @@ export interface EmitRenderContext {
150
150
  * In web terminology "renderer" usually means "turn data into a visible UI"
151
151
  * (pixels, DOM, HTML). This interface does something smaller: it converts
152
152
  * event context into a text string. That is more accurately called a
153
- * *formatter* — hence the new name. The legacy alias `NarrativeRenderer`
154
- * is preserved for backward compatibility and marked `@deprecated`; it will
155
- * be removed in the next major release.
153
+ * *formatter*.
156
154
  *
157
155
  * ## Behaviour
158
156
  *
@@ -215,11 +213,3 @@ export interface NarrativeFormatter {
215
213
  */
216
214
  renderEmit?(ctx: EmitRenderContext): string | null | undefined;
217
215
  }
218
- /**
219
- * @deprecated Renamed to `NarrativeFormatter` for clarity — this interface
220
- * formats event context into text lines, not "render to UI". Legacy alias
221
- * kept for backward compatibility; will be removed in the next major
222
- * release. Migrate by replacing `NarrativeRenderer` with
223
- * `NarrativeFormatter` at imports — no behavioural change.
224
- */
225
- export type NarrativeRenderer = NarrativeFormatter;
@@ -23,8 +23,7 @@
23
23
  * Patch model: Stage writes into local patch; commitPatch() after return or throw.
24
24
  */
25
25
  import type { ScopeProtectionMode } from '../../scope/protection/types.js';
26
- import type { QueuedPause } from '../handlers/ResumeEntry.js';
27
- import { ResumeEntry } from '../handlers/ResumeEntry.js';
26
+ import type { QueuedPause, ResumeEntry } from '../handlers/ResumeEntry.js';
28
27
  import { FlowRecorderDispatcher } from '../narrative/FlowRecorderDispatcher.js';
29
28
  import type { FlowRecorder, IControlFlowNarrative } from '../narrative/types.js';
30
29
  import type { IExecutionRuntime, ILogger, ScopeFactory, Selector, SerializedPipelineStructure, StageFunction, StageNode, StreamHandlers, SubflowMountOptions, SubflowResult, TraversalResult } from '../types.js';
@@ -121,13 +120,6 @@ export interface TraverserOptions<TOut = any, TScope = any> {
121
120
  * its first entry. See `ResumeEntry`. Undefined on normal `run()` paths.
122
121
  */
123
122
  resume?: ResumeEntry<TOut, TScope>;
124
- /**
125
- * @deprecated since 9.28.0 — pass {@link resume}. Still honoured, under the
126
- * same one-shot law: each capture seeds only the FIRST entry into its
127
- * subflow (in place of the inputMapper's values); later entries are
128
- * ordinary. Ignored when `resume` is set.
129
- */
130
- subflowStatesForResume?: Record<string, Record<string, unknown>>;
131
123
  /**
132
124
  * Per-`executor.run()` identifier. Threaded into every TraversalContext
133
125
  * this traverser produces so recorders can scope state to a single run.
@@ -340,7 +332,7 @@ export declare class FlowchartTraverser<TOut = any, TScope = any> {
340
332
  executionTree: unknown;
341
333
  initialState?: Record<string, unknown> | undefined;
342
334
  commitLog: unknown[];
343
- logAddress?: import("../../memory/eventPosition.js").LogAddress | undefined;
335
+ logAddress?: import("foottrace").LogAddress | undefined;
344
336
  subflowResults?: Record<string, unknown> | undefined;
345
337
  recorders?: {
346
338
  id: string;
@@ -18,7 +18,7 @@
18
18
  * even when `undefined` if the caller names them, which is what a stage stamp
19
19
  * has always done.
20
20
  */
21
- import { type RuntimeStageId } from '../ids/runtimeStageId.js';
21
+ import { type RuntimeStageId } from 'foottrace';
22
22
  import type { ResumeLink, TraversalContext } from './narrative/types.js';
23
23
  /** Everything a stamp can carry; optional keys are written only when PRESENT on this object. */
24
24
  export interface TraversalStamp {
@@ -4,9 +4,9 @@
4
4
  * Centralizes type definitions to avoid circular dependencies.
5
5
  * Every handler receives HandlerDeps (the DI bag) instead of importing the traverser.
6
6
  */
7
- import type { LogAddress } from '../memory/eventPosition.js';
7
+ import type { LogAddress } from 'foottrace';
8
+ import type { SharedMemory } from 'foottrace/write';
8
9
  import type { FlowControlType, FlowMessage } from '../memory/frameTypes.js';
9
- import type { SharedMemory } from '../memory/SharedMemory.js';
10
10
  import type { StageContext } from '../memory/StageContext.js';
11
11
  import type { ScopeProtectionMode } from '../scope/protection/types.js';
12
12
  import type { StageNode } from './graph/StageNode.js';
@@ -493,14 +493,6 @@ export interface HandlerDeps<TOut = any, TScope = any> {
493
493
  * paths.
494
494
  */
495
495
  resume?: ResumeEntry<TOut, TScope>;
496
- /**
497
- * @deprecated since 9.28.0 — the engine plans a resume with {@link resume}.
498
- * Still honoured, under the same one-shot law: each capture (keyed by
499
- * path-prefixed `subflowId`) seeds only the FIRST entry into its subflow,
500
- * in place of the inputMapper's values; later entries are ordinary.
501
- * Ignored when `resume` is set.
502
- */
503
- subflowStatesForResume?: Record<string, Record<string, unknown>>;
504
496
  }
505
497
  /** Options for FlowChartExecutor.run(). */
506
498
  export interface RunOptions {
@@ -11,15 +11,13 @@
11
11
  * frame writes (`runAddress.ts`), the dev-mode warnings, the commit observer
12
12
  * - DiagnosticCollector for logs, errors, metrics
13
13
  */
14
+ import type { CommitPhase, EmitSourcePosition, UntrackedSource } from 'foottrace';
15
+ import type { EventLog, SharedMemory } from 'foottrace/write';
14
16
  import { type DiagnosticChannel, DiagnosticCollector } from './DiagnosticCollector.js';
15
- import type { EventLog } from './EventLog.js';
16
- import type { EmitSourcePosition } from './eventPosition.js';
17
17
  import type { FlowControlType, StageSnapshot } from './frameTypes.js';
18
18
  import type { RedactionVerdict } from './redaction.js';
19
19
  import { RedactionRule } from './redaction.js';
20
20
  import type { RunPolicy } from './runPolicy.js';
21
- import type { SharedMemory } from './SharedMemory.js';
22
- import type { CommitPhase, UntrackedSource } from './types.js';
23
21
  export declare class StageContext {
24
22
  /**
25
23
  * The record half of this frame (`RecordFrame.ts`, L3, C3): the heap and,
@@ -1,26 +1,11 @@
1
- /**
2
- * memory/ — Foundation library (zero external deps)
3
- *
4
- * Transactional state management with namespace isolation,
5
- * atomic commits, and event-sourced time-travel.
6
- */
1
+ /** Engine frame, diagnostics, run policy and redaction. Record primitives belong to foottrace. */
2
+ export type { RetentionPolicy } from '../capture/policies.js';
3
+ export type { ReadSummaryMarker, WriteSummaryMarker } from '../capture/summarize.js';
7
4
  export { DiagnosticCollector } from './DiagnosticCollector.js';
8
- export { EventLog } from './EventLog.js';
9
- export { SharedMemory } from './SharedMemory.js';
10
- export { StageContext } from './StageContext.js';
11
- export { TransactionBuffer } from './TransactionBuffer.js';
5
+ export type { FlowControlType, FlowMessage, ReadTrackingMode, StageSnapshot, WriteTrackingMode } from './frameTypes.js';
12
6
  export type { RedactionVerdict } from './redaction.js';
13
7
  export { RedactionRule } from './redaction.js';
14
- export { redactPatch } from './scrub.js';
8
+ export { SCOPE_PLACEHOLDER } from './redaction.js';
15
9
  export type { RunDials, RunPolicy } from './runPolicy.js';
16
10
  export { DEFAULT_RUN_POLICY, runPolicy } from './runPolicy.js';
17
- export type { HonestyCode } from './honesty.js';
18
- export { HONESTY_CODES } from './honesty.js';
19
- export { LOG_PLACEHOLDER } from './placeholders.js';
20
- export { SCOPE_PLACEHOLDER } from './redaction.js';
21
- export type { RetentionPolicy } from '../capture/policies.js';
22
- export type { ReadSummaryMarker, WriteSummaryMarker } from '../capture/summarize.js';
23
- export type { FlowControlType, FlowMessage, ReadTrackingMode, StageSnapshot, WriteTrackingMode } from './frameTypes.js';
24
- export type { CommitBundle, CommitValuesMode, MemoryPatch, TraceEntry, UntrackedSource } from './types.js';
25
- export { UnknownVerbError } from './verbs.js';
26
- export { applySmartMerge, deepSmartMerge, DELIM, getNestedValue, getRunAndGlobalPaths, normalisePath, pathSegments, setNestedValue, updateNestedValue, updateValue, } from './utils.js';
11
+ export { StageContext } from './StageContext.js';
@@ -57,9 +57,9 @@
57
57
  * `'[REDACTED]'` ({@link SCOPE_PLACEHOLDER}, below — the verdict's own).
58
58
  * Neither string changed in 9.19.0 or since; each is spelled once in `src/`.
59
59
  */
60
+ import type { WriteScrub, WriteVerb } from 'foottrace/write';
60
61
  import type { StructuredErrorInfo } from '../errors/errorInfo.js';
61
62
  import type { RedactionMarks } from '../pause/types.js';
62
- import type { WriteScrub, WriteVerb } from './RecordFrame.js';
63
63
  /**
64
64
  * What the SCOPE CHANNEL carries where a value was scrubbed: a scope recorder's read, write and
65
65
  * commit events, the `stageReads` / `stageWrites` retention, the narrative, a decision's evidence, an
@@ -29,9 +29,10 @@
29
29
  * rule's marks. The mirror STORE is not policy — each runtime (a subflow has its own) keeps
30
30
  * its own store when `mirror` is set.
31
31
  */
32
+ import type { CommitValuesMode } from 'foottrace';
33
+ import type { WriteProvenanceMode } from 'foottrace/write';
32
34
  import type { ReadTrackingMode, WriteTrackingMode } from './frameTypes.js';
33
35
  import type { RedactionRule } from './redaction.js';
34
- import type { CommitValuesMode, WriteProvenanceMode } from './types.js';
35
36
  /**
36
37
  * The four observability dials as an executor takes them — every field optional, an absent
37
38
  * one is its default. `FlowChartExecutorOptions` extends this interface.
@@ -102,7 +103,7 @@ export interface RunDials {
102
103
  *
103
104
  * Consumers that read `bundle.overwrite[key]` as "the full value written"
104
105
  * must switch to `commitValueAt(commitLog, idx, key)` from
105
- * `footprintjs/trace` — under `'delta'` that value is verb-qualified (an
106
+ * `foottrace` — under `'delta'` that value is verb-qualified (an
106
107
  * `append` bundle holds only the tail). Path-tier consumers
107
108
  * (`findLastWriter`, `causalChain`, narrative, lens highlights) are
108
109
  * unaffected. The active mode is surfaced as
@@ -40,7 +40,8 @@
40
40
  *
41
41
  * @example
42
42
  * ```typescript
43
- * import { controlDepRecorder, causalChain } from 'footprintjs/trace';
43
+ * import { controlDepRecorder } from 'footprintjs/trace';
44
+ import { causalChain } from 'foottrace';
44
45
  *
45
46
  * const ctrl = controlDepRecorder();
46
47
  * executor.attachCombinedRecorder(ctrl); // auto-routes to FlowRecorder channel
@@ -52,9 +53,9 @@
52
53
  * });
53
54
  * ```
54
55
  */
56
+ import type { ControlDependency, ControlDepLookup } from 'foottrace';
55
57
  import type { DecisionEvidence, SelectionEvidence } from '../decide/types.js';
56
58
  import type { FlowDecisionEvent, FlowErrorEvent, FlowRecorder, FlowSelectedEvent, FlowStageEvent } from '../engine/narrative/types.js';
57
- import type { ControlDependency, ControlDepLookup } from '../memory/backtrack.js';
58
59
  /** One recorded decision/selection event (RFC-003 D5). */
59
60
  export interface ControlDecisionRecord {
60
61
  /** runtimeStageId of the decider/selector execution step. */
@@ -58,7 +58,7 @@
58
58
  * executor.attachEmitRecorder(tokenMeter);
59
59
  * ```
60
60
  */
61
- import type { EmitSourcePosition } from '../memory/eventPosition.js';
61
+ import type { EmitSourcePosition } from 'foottrace';
62
62
  import type { RecorderBundle } from './snapshot.js';
63
63
  /**
64
64
  * Event delivered to `EmitRecorder.onEmit`.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * qualityTrace() — Quality Stack Trace built on causalChain().
3
3
  *
4
- * Thin layer over `memory/backtrack.causalChain()` that decorates
4
+ * Thin layer over `foottrace`'s `causalChain()` that decorates
5
5
  * each causal node with quality scores from a QualityRecorder.
6
6
  *
7
7
  * ```
@@ -13,7 +13,7 @@
13
13
  * Root cause: quality dropped at call-llm#5 (0.8 → 0.3, Δ0.5)
14
14
  * ```
15
15
  */
16
- import type { CommitBundle } from '../memory/types.js';
16
+ import type { CommitBundle } from 'foottrace';
17
17
  import type { QualityEntry } from './QualityRecorder.js';
18
18
  /** Minimal per-step quality lookup — satisfied by `QualityRecorder` (structural, decoupled). */
19
19
  export interface QualityLookup {
@@ -41,6 +41,9 @@ export interface QualityStackTrace {
41
41
  }
42
42
  /**
43
43
  * Build a quality stack trace by decorating a causal chain with scores.
44
+ * Root cause is the largest positive score drop across a recorded parent→child
45
+ * dependency with known scores. Ties retain the first edge in BFS node / parent
46
+ * order. This score comparison is a diagnostic hint, not proof of why quality fell.
44
47
  *
45
48
  * @param commitLog From executor.getSnapshot().commitLog
46
49
  * @param qualityRecorder QualityRecorder attached during execution
@@ -9,13 +9,12 @@
9
9
  * The engine (FlowchartTraverser) receives this as its runtime parameter.
10
10
  * After execution, consumers query it for the full execution state.
11
11
  */
12
- import { EventLog } from '../memory/EventLog.js';
13
- import type { LogAddress } from '../memory/eventPosition.js';
12
+ import type { CommitBundle, CommitValuesMode, LogAddress } from 'foottrace';
13
+ import type { WriteProvenanceMode } from 'foottrace/write';
14
+ import { EventLog, SharedMemory } from 'foottrace/write';
14
15
  import type { StageSnapshot } from '../memory/frameTypes.js';
15
16
  import type { RunPolicy } from '../memory/runPolicy.js';
16
- import { SharedMemory } from '../memory/SharedMemory.js';
17
17
  import { StageContext } from '../memory/StageContext.js';
18
- import type { CommitBundle, CommitValuesMode, WriteProvenanceMode } from '../memory/types.js';
19
18
  import type { ObserverStats } from './DeferredObserverTier.js';
20
19
  /** Snapshot of a single recorder's collected data. */
21
20
  export interface RecorderSnapshot {
@@ -67,7 +66,7 @@ export type RuntimeSnapshot = {
67
66
  * Commit bundles are DIFFS, so the log alone cannot rebuild a value that
68
67
  * was seeded before the run and only ever merged afterwards. Shipping the
69
68
  * base WITH the log is what makes an offline fold — `stateAt(snapshot, i)`
70
- * from `footprintjs/trace` — reproduce the state a stage actually saw.
69
+ * from `foottrace` — reproduce the state a stage actually saw.
71
70
  *
72
71
  * OPTIONAL BY TYPE, and absent in exactly two cases. A plain `getSnapshot()`
73
72
  * always carries it, so a live fold reports `basis: 'initial+log'`. Under
@@ -21,6 +21,7 @@
21
21
  * stays here is the per-run state and the run lifecycle that threads it.
22
22
  * const result = await executor.run({ input: data, env: { traceId: 'req-123' } });
23
23
  */
24
+ import type { CommitValuesMode } from 'foottrace';
24
25
  import type { FlowChart } from '../builder/types.js';
25
26
  import type { CombinedNarrativeRecorderOptions } from '../engine/narrative/CombinedNarrativeRecorder.js';
26
27
  import type { CombinedNarrativeEntry } from '../engine/narrative/narrativeTypes.js';
@@ -28,7 +29,6 @@ import type { ManifestEntry } from '../engine/narrative/recorders/ManifestFlowRe
28
29
  import type { FlowRecorder } from '../engine/narrative/types.js';
29
30
  import { type ExecutorResult, type RunOptions, type ScopeFactory, type SerializedPipelineStructure, type StageNode, type SubflowResult } from '../engine/types.js';
30
31
  import type { ReadTrackingMode, WriteTrackingMode } from '../memory/frameTypes.js';
31
- import type { CommitValuesMode } from '../memory/types.js';
32
32
  import type { FlowchartCheckpoint } from '../pause/types.js';
33
33
  import type { CombinedRecorder } from '../recorder/CombinedRecorder.js';
34
34
  import type { EmitRecorder } from '../recorder/EmitRecorder.js';
@@ -45,7 +45,7 @@ export interface SubtreeSnapshot {
45
45
  * The subflow's OWN fold base — the state its isolated runtime started from,
46
46
  * before its first commit (`treeContext.initialState`). Pair it with
47
47
  * `history` to fold the subflow's state at any of its commits:
48
- * `stateAt(subtree, i)` from `footprintjs/trace` reads exactly these two
48
+ * `stateAt(subtree, i)` from `foottrace` reads exactly these two
49
49
  * fields. Normally `{}` — a subflow's `inputMapper` seed is its first
50
50
  * COMMIT, not a pre-run base.
51
51
  */
@@ -25,7 +25,7 @@
25
25
  */
26
26
  import type { CombinedNarrativeRecorderOptions } from './lib/engine/narrative/CombinedNarrativeRecorder.js';
27
27
  import { CombinedNarrativeRecorder } from './lib/engine/narrative/CombinedNarrativeRecorder.js';
28
- import type { BreakRenderContext, DecisionRenderContext, EmitRenderContext, ErrorRenderContext, ForkRenderContext, LoopRenderContext, NarrativeFormatter, NarrativeRenderer, OpRenderContext, SelectedRenderContext, StageRenderContext, SubflowRenderContext } from './lib/engine/narrative/narrativeTypes.js';
28
+ import type { BreakRenderContext, DecisionRenderContext, EmitRenderContext, ErrorRenderContext, ForkRenderContext, LoopRenderContext, NarrativeFormatter, OpRenderContext, SelectedRenderContext, StageRenderContext, SubflowRenderContext } from './lib/engine/narrative/narrativeTypes.js';
29
29
  import { AdaptiveNarrativeFlowRecorder } from './lib/engine/narrative/recorders/AdaptiveNarrativeFlowRecorder.js';
30
30
  import type { ManifestEntry } from './lib/engine/narrative/recorders/ManifestFlowRecorder.js';
31
31
  import { ManifestFlowRecorder } from './lib/engine/narrative/recorders/ManifestFlowRecorder.js';
@@ -36,7 +36,6 @@ import type { DebugEntry, DebugRecorderOptions } from './lib/scope/recorders/Deb
36
36
  import { DebugRecorder } from './lib/scope/recorders/DebugRecorder.js';
37
37
  import type { AggregatedMetrics, MetricRecorderOptions, StageMetrics } from './lib/scope/recorders/MetricRecorder.js';
38
38
  import { MetricRecorder } from './lib/scope/recorders/MetricRecorder.js';
39
- export type { EmitSourcePosition, LogAddress } from './lib/memory/eventPosition.js';
40
39
  /**
41
40
  * ScopeRecorder factory for combined flow+data narrative.
42
41
  *
@@ -67,7 +66,7 @@ export declare function manifest(): ManifestInstance;
67
66
  export declare function adaptive(): AdaptiveNarrativeFlowRecorder;
68
67
  export declare function milestone(): MilestoneNarrativeFlowRecorder;
69
68
  export declare function windowed(maxEntries?: number): WindowedNarrativeFlowRecorder;
70
- export type { BreakRenderContext, CombinedNarrativeRecorderOptions, DecisionRenderContext, EmitEvent, EmitRecorder, EmitRenderContext, ErrorRenderContext, ForkRenderContext, LoopRenderContext, NarrativeFormatter, NarrativeRenderer, OpRenderContext, SelectedRenderContext, StageRenderContext, SubflowRenderContext, };
69
+ export type { BreakRenderContext, CombinedNarrativeRecorderOptions, DecisionRenderContext, EmitEvent, EmitRecorder, EmitRenderContext, ErrorRenderContext, ForkRenderContext, LoopRenderContext, NarrativeFormatter, OpRenderContext, SelectedRenderContext, StageRenderContext, SubflowRenderContext, };
71
70
  export type { AggregatedMetrics, MetricRecorderOptions, StageMetrics };
72
71
  export type { CompositeSnapshot } from './lib/recorder/index.js';
73
72
  export { CompositeRecorder } from './lib/recorder/index.js';
@@ -1,69 +1,23 @@
1
1
  /**
2
- * footprintjs/trace — Execution tracing, debugging, and backtracking utilities.
2
+ * footprintjs/trace — recorder stores, topology, chart boundaries and control dependencies.
3
3
  *
4
- * Runtime stage IDs, commit log queries, and recorder base classes.
5
- *
6
- * @example
7
- * ```typescript
8
- * import { parseRuntimeStageId, findLastWriter, KeyedStore, SequenceStore } from 'footprintjs/trace';
9
- *
10
- * // Parse a runtimeStageId
11
- * const { stageId, executionIndex } = parseRuntimeStageId('call-llm#5');
12
- *
13
- * // Backtrack: who wrote 'systemPrompt' before commit at idx 8?
14
- * const writer = findLastWriter(commitLog, 'systemPrompt', 8);
15
- *
16
- * // v5 primary API: compose a Store as a field (one purpose per recorder).
17
- * // KeyedStore<T> — 1:1 (one entry per step)
18
- * class MyRecorder {
19
- * readonly id = 'my-recorder';
20
- * private store = new KeyedStore<MyEntry>();
21
- * onWrite(e) { this.store.set(e.runtimeStageId, { ... }); }
22
- * }
23
- *
24
- * // SequenceStore<T> — 1:N (multiple entries per step, ordering matters)
25
- * class AuditRecorder {
26
- * readonly id = 'audit';
27
- * private store = new SequenceStore<AuditEntry>();
28
- * onRead(e) { this.store.push({ runtimeStageId: e.runtimeStageId, ... }); }
29
- * }
30
- * ```
4
+ * Record readers, types and runtime-ID grammar belong to `foottrace`; record path helpers belong
5
+ * to `foottrace/paths`, and record writers to `foottrace/write`. This door exports only engine-owned
6
+ * observer tools. Record symbols are never re-exported across the package boundary.
31
7
  */
32
- export type { CommitIdx, ExecutionCounter, ExecutionIndex, RuntimeStageId } from './lib/ids/runtimeStageId.js';
33
- export { buildRuntimeStageId, createExecutionCounter, parseRuntimeStageId, splitStageId, } from './lib/ids/runtimeStageId.js';
34
- export { BRANCH_SEGMENT_MARKER, buildBranchSegment, hasBranchSegmentMarker, isBranchSegment, parseBranchSegment, } from './lib/ids/branchSegment.js';
35
8
  export type { WalkerItem, WalkerOptions } from './lib/engine/walkSubflowSpec.js';
36
9
  export { walkSubflowSpec } from './lib/engine/walkSubflowSpec.js';
37
- export { pathSegments } from './lib/memory/paths.js';
38
- export { UnknownVerbError } from './lib/memory/verbs.js';
39
- export type { CommitBundle, MemoryPatch, TraceEntry } from './lib/memory/types.js';
40
- export type { ExecutionTree } from './lib/memory/types.js';
41
- export { applySmartMerge } from './lib/memory/verbs.js';
42
- export type { ValueBasis, ValueBasisOptions, ValueWithBasis, WriterBasis, WriterWithBasis, } from './lib/memory/commitLogUtils.js';
43
- export { buildCommitIndex, commitIndexOf, commitValueAt, commitValueAtWithBasis, findCommit, findCommits, findLastWriter, findLastWriterWithBasis, inferLegacyPhases, recordsPhases, } from './lib/memory/commitLogUtils.js';
44
- export type { CommitPhase } from './lib/memory/types.js';
45
- export type { AxisRefusal, AxisSplit, BookendedAxis, FoldBasis, FoldedState, FoldSource, LogGap, Mark, Move, MoveRefusal, Stop, StopFilter, StopKind, TimeTravel, TimeTravelOptions, TimeTravelSource, TimeTravelStrategy, } from './lib/time-travel/index.js';
46
- export { commitStops, commitStopsStrategy, filterStops, isCommitBundle, splitAxis, stateAt, tagStops, timeTravel, } from './lib/time-travel/index.js';
47
- export type { CausalChainOptions, CausalEdge, CausalNode, ControlDependency, ControlDepLookup, EdgeWeigher, KeysReadLookup, } from './lib/memory/backtrack.js';
48
- export { causalChain, flattenCausalDAG, formatCausalChain } from './lib/memory/backtrack.js';
49
- export type { UntrackedSource } from './lib/memory/types.js';
50
- export type { ArrayProvenance, AttributionBasis, ElementBirth, FedBasis, ForwardEdge, ForwardNode, ForwardRead, ForwardSlice, ForwardSliceJSON, HonestyNote, HonestyNoteCode, KeyMoment, KeysReadSource, KeyTimeline, MissingProvenanceReason, MissingSliceReason, ReadsCoverage, SliceJSON, StateKey, VariableSlice, } from './lib/slice/index.js';
51
- export type { ForwardSliceForKeyOptions, KeyTimelineOptions, SliceForKeyOptions } from './lib/slice/index.js';
52
- export { arrayProvenance, elementProvenance, formatForwardSlice, formatSlice, formatTimeline, forwardSliceForKey, forwardSliceToJSON, keysReadFromExecutionTree, keysReadFromMap, keyTimeline, normaliseStateKey, resolveKeysReadSource, sliceForKey, sliceToJSON, } from './lib/slice/index.js';
53
- export type { HonestyCode } from './lib/memory/honesty.js';
54
- export { HONESTY_CODES } from './lib/memory/honesty.js';
10
+ export { BRANCH_SEGMENT_MARKER, buildBranchSegment, hasBranchSegmentMarker, isBranchSegment, parseBranchSegment, } from './lib/ids/branchSegment.js';
55
11
  export { BoundaryStateStore } from './lib/recorder/BoundaryStateStore.js';
56
- export { KeyedStore } from './lib/recorder/KeyedStore.js';
57
- export { SequenceStore } from './lib/recorder/SequenceStore.js';
58
- export type { RangeEntry, RangeToken } from './lib/recorder/CommitRangeIndex.js';
59
- export { CommitRangeIndex } from './lib/recorder/CommitRangeIndex.js';
60
- export type { Topology, TopologyEdge, TopologyIncomingKind, TopologyNode, TopologyRecorderOptions, } from './lib/recorder/TopologyRecorder.js';
61
- export { TopologyRecorder, topologyRecorder } from './lib/recorder/TopologyRecorder.js';
62
- export type { InOutEntry, InOutPhase, InOutRecorderOptions } from './lib/recorder/InOutRecorder.js';
63
- export { InOutRecorder, inOutRecorder, ROOT_RUNTIME_STAGE_ID, ROOT_SUBFLOW_ID } from './lib/recorder/InOutRecorder.js';
64
12
  export type { ControlDecisionRecord, ControlDepRecorderOptions } from './lib/recorder/ControlDepRecorder.js';
65
13
  export { ControlDepRecorder, controlDepRecorder } from './lib/recorder/ControlDepRecorder.js';
14
+ export type { InOutEntry, InOutPhase, InOutRecorderOptions } from './lib/recorder/InOutRecorder.js';
15
+ export { InOutRecorder, inOutRecorder, ROOT_RUNTIME_STAGE_ID, ROOT_SUBFLOW_ID } from './lib/recorder/InOutRecorder.js';
16
+ export { KeyedStore } from './lib/recorder/KeyedStore.js';
66
17
  export type { QualityEntry, QualityRecorderOptions, QualityScoringFn } from './lib/recorder/QualityRecorder.js';
67
18
  export { QualityRecorder } from './lib/recorder/QualityRecorder.js';
68
19
  export type { QualityFrame, QualityStackTrace } from './lib/recorder/qualityTrace.js';
69
20
  export { formatQualityTrace, qualityTrace } from './lib/recorder/qualityTrace.js';
21
+ export { SequenceStore } from './lib/recorder/SequenceStore.js';
22
+ export type { Topology, TopologyEdge, TopologyIncomingKind, TopologyNode, TopologyRecorderOptions, } from './lib/recorder/TopologyRecorder.js';
23
+ export { TopologyRecorder, topologyRecorder } from './lib/recorder/TopologyRecorder.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "footprintjs",
3
- "version": "9.48.4",
3
+ "version": "10.0.1",
4
4
  "description": "Explainable backend flows — automatic causal traces, decision evidence, and MCP tool generation for AI agents",
5
5
  "license": "MIT",
6
6
  "author": "Sanjay Krishna Anbalagan",
@@ -52,8 +52,7 @@
52
52
  "check:dup-types": "node scripts/check-dup-types.mjs",
53
53
  "check:layering": "node scripts/check-layering.mjs",
54
54
  "check:record-tests": "node scripts/record-tests.mjs --check",
55
- "check:record-freeze": "node scripts/check-record-freeze.mjs",
56
- "check:trace-ready": "node scripts/trace-ready.mjs --check-e1",
55
+ "check:trace-ready": "node scripts/trace-ready.mjs --check-extracted",
57
56
  "trace:ready": "node scripts/trace-ready.mjs",
58
57
  "check:doc-snippets": "node scripts/check-doc-snippets.mjs",
59
58
  "audit:family": "node scripts/audit-family-versions.mjs",
@@ -128,16 +127,6 @@
128
127
  "default": "./dist/trace.js"
129
128
  }
130
129
  },
131
- "./write": {
132
- "import": {
133
- "types": "./dist/esm/write.d.ts",
134
- "default": "./dist/esm/write.js"
135
- },
136
- "require": {
137
- "types": "./dist/types/write.d.ts",
138
- "default": "./dist/write.js"
139
- }
140
- },
141
130
  "./detach": {
142
131
  "import": {
143
132
  "types": "./dist/esm/detach.d.ts",
@@ -171,9 +160,6 @@
171
160
  "trace": [
172
161
  "./dist/types/trace.d.ts"
173
162
  ],
174
- "write": [
175
- "./dist/types/write.d.ts"
176
- ],
177
163
  "detach": [
178
164
  "./dist/types/detach.d.ts"
179
165
  ],
@@ -189,6 +175,9 @@
189
175
  ]
190
176
  },
191
177
  "sideEffects": false,
178
+ "dependencies": {
179
+ "foottrace": "^1.0.0"
180
+ },
192
181
  "peerDependencies": {
193
182
  "zod": "^3.0.0 || ^4.0.0"
194
183
  },
@@ -214,7 +203,7 @@
214
203
  "eslint-plugin-simple-import-sort": "^8.0.0",
215
204
  "fast-check": "^4.4.0",
216
205
  "footprintjs-baseline": "npm:footprintjs@9.28.0",
217
- "footprintjs-published": "npm:footprintjs@^9.46.1",
206
+ "footprintjs-published": "npm:footprintjs@^10.0.0",
218
207
  "husky": "^9.1.7",
219
208
  "lint-staged": "^16.3.2",
220
209
  "markdown-it": "^14.3.1",
@@ -1,91 +0,0 @@
1
- /**
2
- * freeze.ts — the ONE deep-freeze walk (moved here from `scope/protection/readonlyInput.ts` in F3),
3
- * and the serve-time law for the commit log (9.44.2).
4
- *
5
- * WHY HERE. Saved trees freeze through this walk: the fold base served as
6
- * `initialState` (`ExecutionRuntime · getFoldBase`), the
7
- * dev-mode snapshot (`runner/snapshot.ts · servedSnapshot`), every state `stateAt` hands out
8
- * (`time-travel/stateAt.ts`) and, since F3, every commit bundle (`EventLog · record`). `memory/` must
9
- * not import `scope/` (that edge closed the memory ⇄ scope ⇄ recorder module cycle F0 removed), so the
10
- * walk lives in this leaf folder, which imports nothing outside itself. Args use an ownership snapshot
11
- * instead (`scope/protection/readonlyInput.ts · createFrozenArgs`): never freeze borrowed caller values.
12
- *
13
- * FREEZE WHAT CAN BE FROZEN, COPY WHAT CAN'T (9.44.2). `Object.freeze` cannot seal a Date's time, a
14
- * Map's or Set's entries, a buffer's bytes, a RegExp (`compile()` rewrites a frozen one) or an Error
15
- * (V8's own `stack` accessor writes through a frozen one). A fresh tree handed to one caller (a `stateAt`
16
- * state, the dev-mode snapshot) is that caller's own, so freezing it is a guard and nothing more. The
17
- * COMMIT LOG — each bundle, and the fold base — is served to every reader, so {@link freezeRecord}
18
- * remembers that a record holds such a value, its first serve maps the containers on the way to each
19
- * one (its open PATHS), and {@link serveRecord} hands a reader a copy of those paths only: a fresh copy
20
- * of each such value, fresh frozen containers on the way to it, and every other part shared, frozen, as
21
- * it is. Until 9.44.2 `snapshot.commitLog[i].overwrite.when.setTime(0)` rewrote every later snapshot,
22
- * `stateAt`, `commitValueAt`, slice and cursor answer.
23
- *
24
- * Every walk here is ITERATIVE (an explicit stack): a record's depth is not bounded by the call stack.
25
- *
26
- * @example
27
- * ```typescript
28
- * import { deepFreeze, freezeRecord, serveRecord } from './freeze.js';
29
- *
30
- * const args = deepFreeze({ order: { lines: [{ sku: 'A' }] }, bytes: new Uint8Array([1]) });
31
- * Object.isFrozen(args.order.lines[0]); // true
32
- * Object.isFrozen(args.bytes); // false — a typed array cannot be frozen; it is skipped
33
- *
34
- * const record = freezeRecord({ when: new Date(0), tags: ['a'] });
35
- * const served = serveRecord(record);
36
- * served.when.setTime(5); // changes the reader's copy
37
- * serveRecord(record).when.getTime(); // 0 — every serve is the record as recorded
38
- * served.tags === record.tags; // true — the sealed part is shared, not copied
39
- * serveRecord(freezeRecord({ n: 1 })); // a record freezing sealed whole: served as itself
40
- * ```
41
- */
42
- /**
43
- * How {@link deepFreeze} walks an ARRAY.
44
- *
45
- * - `'every-key'` (the default) — every own property, as for any other object: the index elements
46
- * AND any expando (`arr.note = { … }`). The dev-mode snapshot relies on this contract.
47
- * - `'indices'` — the index elements only, so no key string is allocated per element; this is what
48
- * keeps freezing a 10,000-element commit inside its budget (`bench/element-writes.ts`). An object
49
- * hung on an array EXPANDO is then left unfrozen, and unseen by {@link serveRecord} — the commit
50
- * log's named hole (`EventLog · record`; an array expando is out of contract for state).
51
- */
52
- export type ArrayWalk = 'every-key' | 'indices';
53
- /**
54
- * Freezes `obj` and every object reachable through its own properties, and returns `obj`.
55
- *
56
- * - An object that is ALREADY frozen is left as it is, and not descended — 9.32.0's contract, kept:
57
- * args may hold a caller's frozen object with live parts inside (a class instance a stage calls),
58
- * and freezing past it would break them. It is also what ends a cycle. The commit log never meets
59
- * one: its payloads are fresh `structuredClone`s.
60
- * - ArrayBuffer views (typed arrays, `DataView`) are skipped: `Object.freeze` throws on a non-empty
61
- * typed array, so a `Uint8Array` in state, args or the fold base used to fail the run or the
62
- * snapshot here.
63
- * - What `Object.freeze` cannot reach stays mutable — Map and Set contents, a Date's time, the
64
- * bytes behind a buffer. A frozen RegExp's `lastIndex` is read-only, so a `/g` or `/y` regex
65
- * taken from a frozen tree throws when `exec` or `replace` advance it. The commit log goes through
66
- * {@link freezeRecord} and {@link serveRecord} instead.
67
- * - Functions are not descended (they are not values the engine stores).
68
- */
69
- export declare function deepFreeze<T>(obj: T, arrays?: ArrayWalk): T;
70
- /**
71
- * {@link deepFreeze} for a record many readers are SERVED (a commit bundle, the fold base), and two more
72
- * things on the same walk:
73
- *
74
- * - it remembers THAT the record holds a value freezing cannot seal — one flag; the record's first
75
- * serve maps WHERE (the containers on the way to each such value, its open paths), so the run pays
76
- * nothing more and {@link serveRecord} copies those paths and nothing else;
77
- * - a typed array or `DataView` that views a SLICE of a bigger buffer (a Node `Buffer` views its
78
- * shared pool) is replaced, in the record, by a copy of the bytes it views — the record keeps the
79
- * view's bytes, never the rest of the buffer (a resizable or shared buffer is kept as it is).
80
- *
81
- * A part frozen before is not frozen past (deepFreeze's contract) but is looked through, so a value
82
- * freezing cannot seal inside it still opens the record. Returns `record`.
83
- */
84
- export declare function freezeRecord<T extends object>(record: T, arrays?: ArrayWalk): T;
85
- /**
86
- * The record as a reader may hold it — THE serve-time law: a record freezing sealed whole is served as
87
- * itself (shared, no cost); any other as a copy of its open paths ({@link freezeRecord}): fresh frozen
88
- * containers down to each value freezing cannot seal, a fresh copy of that value, and every other part
89
- * shared, frozen, as it is. A copy is served the same way again.
90
- */
91
- export declare function serveRecord<T>(record: T): T;