footprintjs 11.2.0 → 12.0.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/esm/index.d.ts +4 -20
- package/dist/esm/index.js +2 -2
- package/dist/esm/lib/attempt/policy.d.ts +1 -1
- package/dist/esm/lib/attempt/policy.js +2 -2
- package/dist/esm/lib/attempt/types.d.ts +2 -1
- package/dist/esm/lib/attempt/types.js +1 -1
- package/dist/esm/lib/budget/timeBudget.d.ts +13 -5
- package/dist/esm/lib/budget/timeBudget.js +28 -13
- package/dist/esm/lib/builder/FlowChartBuilder.d.ts +74 -35
- package/dist/esm/lib/builder/FlowChartBuilder.js +164 -112
- package/dist/esm/lib/builder/index.d.ts +3 -2
- package/dist/esm/lib/builder/index.js +4 -3
- package/dist/esm/lib/builder/retryLoop.d.ts +1 -1
- package/dist/esm/lib/builder/retryLoop.js +1 -1
- package/dist/esm/lib/builder/structure/StructureRecorder.d.ts +11 -14
- package/dist/esm/lib/builder/structure/StructureRecorder.js +3 -4
- package/dist/esm/lib/builder/structure/StructureRecorderDispatcher.js +18 -3
- package/dist/esm/lib/builder/types.d.ts +5 -4
- package/dist/esm/lib/builder/types.js +4 -3
- package/dist/esm/lib/capture/checkpointCapture.d.ts +1 -0
- package/dist/esm/lib/capture/checkpointCapture.js +10 -4
- package/dist/esm/lib/capture/envelope.d.ts +6 -3
- package/dist/esm/lib/capture/envelope.js +25 -10
- package/dist/esm/lib/capture/historyNote.js +3 -3
- package/dist/esm/lib/capture/nativeCoverage.d.ts +6 -0
- package/dist/esm/lib/capture/nativeCoverage.js +11 -1
- package/dist/esm/lib/capture/policies.d.ts +2 -2
- package/dist/esm/lib/capture/policies.js +3 -3
- package/dist/esm/lib/capture/summarize.d.ts +2 -1
- package/dist/esm/lib/capture/summarize.js +36 -8
- package/dist/esm/lib/contract/schema.js +14 -5
- package/dist/esm/lib/decide/types.d.ts +11 -8
- package/dist/esm/lib/decide/types.js +1 -1
- package/dist/esm/lib/detach/drivers/batch.js +2 -15
- package/dist/esm/lib/detach/drivers/immediate.js +3 -2
- package/dist/esm/lib/detach/drivers/sendBeacon.d.ts +4 -4
- package/dist/esm/lib/detach/drivers/sendBeacon.js +7 -6
- package/dist/esm/lib/detach/drivers/workerThread.d.ts +20 -1
- package/dist/esm/lib/detach/drivers/workerThread.js +56 -12
- package/dist/esm/lib/detach/errors.d.ts +7 -0
- package/dist/esm/lib/detach/errors.js +21 -0
- package/dist/esm/lib/detach/registry.d.ts +19 -18
- package/dist/esm/lib/detach/registry.js +20 -19
- package/dist/esm/lib/detach/spawn.d.ts +1 -2
- package/dist/esm/lib/detach/spawn.js +2 -3
- package/dist/esm/lib/detach/types.d.ts +6 -5
- package/dist/esm/lib/detach/types.js +5 -4
- package/dist/esm/lib/engine/handlers/ChildrenExecutor.js +3 -2
- package/dist/esm/lib/engine/handlers/DeciderHandler.js +8 -2
- package/dist/esm/lib/engine/handlers/NodeResolver.d.ts +9 -1
- package/dist/esm/lib/engine/handlers/NodeResolver.js +15 -8
- package/dist/esm/lib/engine/handlers/ParallelForEachHandler.d.ts +6 -1
- package/dist/esm/lib/engine/handlers/ParallelForEachHandler.js +150 -58
- package/dist/esm/lib/engine/handlers/RuntimeStructureManager.d.ts +9 -1
- package/dist/esm/lib/engine/handlers/RuntimeStructureManager.js +28 -17
- package/dist/esm/lib/engine/handlers/SelectorHandler.js +10 -3
- package/dist/esm/lib/engine/handlers/SubflowExecutor.d.ts +4 -2
- package/dist/esm/lib/engine/handlers/SubflowExecutor.js +55 -17
- package/dist/esm/lib/engine/handlers/SubflowInputMapper.js +33 -15
- package/dist/esm/lib/engine/handlers/mapperEdits.d.ts +23 -0
- package/dist/esm/lib/engine/handlers/mapperEdits.js +95 -0
- package/dist/esm/lib/engine/handlers/mapperScope.d.ts +81 -0
- package/dist/esm/lib/engine/handlers/mapperScope.js +151 -0
- package/dist/esm/lib/engine/handlers/plainObject.d.ts +15 -0
- package/dist/esm/lib/engine/handlers/plainObject.js +21 -0
- package/dist/esm/lib/engine/handlers/selectionProblem.d.ts +9 -0
- package/dist/esm/lib/engine/handlers/selectionProblem.js +15 -0
- package/dist/esm/lib/engine/narrative/CombinedNarrativeRecorder.d.ts +4 -2
- package/dist/esm/lib/engine/narrative/CombinedNarrativeRecorder.js +18 -10
- package/dist/esm/lib/engine/narrative/FlowRecorderDispatcher.d.ts +2 -2
- package/dist/esm/lib/engine/narrative/FlowRecorderDispatcher.js +1 -1
- package/dist/esm/lib/engine/narrative/NarrativeFlowRecorder.d.ts +3 -5
- package/dist/esm/lib/engine/narrative/NarrativeFlowRecorder.js +8 -25
- package/dist/esm/lib/engine/narrative/formatting/ruleEvidence/index.js +10 -2
- package/dist/esm/lib/engine/narrative/recorders/AdaptiveNarrativeFlowRecorder.d.ts +5 -1
- package/dist/esm/lib/engine/narrative/recorders/AdaptiveNarrativeFlowRecorder.js +9 -5
- package/dist/esm/lib/engine/narrative/recorders/ManifestFlowRecorder.d.ts +9 -1
- package/dist/esm/lib/engine/narrative/recorders/ManifestFlowRecorder.js +27 -6
- package/dist/esm/lib/engine/narrative/recorders/MilestoneNarrativeFlowRecorder.d.ts +4 -0
- package/dist/esm/lib/engine/narrative/recorders/MilestoneNarrativeFlowRecorder.js +8 -1
- package/dist/esm/lib/engine/narrative/recorders/ProgressiveNarrativeFlowRecorder.d.ts +2 -0
- package/dist/esm/lib/engine/narrative/recorders/ProgressiveNarrativeFlowRecorder.js +6 -1
- package/dist/esm/lib/engine/narrative/recorders/SeparateNarrativeFlowRecorder.d.ts +1 -1
- package/dist/esm/lib/engine/narrative/recorders/SeparateNarrativeFlowRecorder.js +2 -2
- package/dist/esm/lib/engine/narrative/types.d.ts +1 -1
- package/dist/esm/lib/engine/narrative/types.js +1 -1
- package/dist/esm/lib/engine/traversal/FlowchartTraverser.d.ts +41 -44
- package/dist/esm/lib/engine/traversal/FlowchartTraverser.js +74 -27
- package/dist/esm/lib/engine/types.d.ts +14 -4
- package/dist/esm/lib/engine/types.js +1 -1
- package/dist/esm/lib/filter/evaluator.d.ts +6 -0
- package/dist/esm/lib/filter/evaluator.js +144 -20
- package/dist/esm/lib/ids/reservedIds.d.ts +2 -2
- package/dist/esm/lib/ids/reservedIds.js +3 -3
- package/dist/esm/lib/memory/StageContext.d.ts +140 -10
- package/dist/esm/lib/memory/StageContext.js +292 -36
- package/dist/esm/lib/memory/borrowedMutation.d.ts +18 -0
- package/dist/esm/lib/memory/borrowedMutation.js +40 -1
- package/dist/esm/lib/memory/frameTypes.d.ts +6 -4
- package/dist/esm/lib/memory/frameTypes.js +2 -2
- package/dist/esm/lib/memory/hiddenObjectTrail.d.ts +118 -0
- package/dist/esm/lib/memory/hiddenObjectTrail.js +221 -0
- package/dist/esm/lib/memory/keptReads.d.ts +62 -0
- package/dist/esm/lib/memory/keptReads.js +79 -0
- package/dist/esm/lib/memory/markPlaces.d.ts +98 -0
- package/dist/esm/lib/memory/markPlaces.js +124 -0
- package/dist/esm/lib/memory/pathTargets.d.ts +48 -0
- package/dist/esm/lib/memory/pathTargets.js +89 -0
- package/dist/esm/lib/memory/redaction.d.ts +142 -24
- package/dist/esm/lib/memory/redaction.js +276 -87
- package/dist/esm/lib/memory/retainedValue/index.js +13 -2
- package/dist/esm/lib/memory/runPolicy.d.ts +10 -8
- package/dist/esm/lib/memory/runPolicy.js +3 -3
- package/dist/esm/lib/memory/selectedObjects.d.ts +215 -0
- package/dist/esm/lib/memory/selectedObjects.js +603 -0
- package/dist/esm/lib/memory/servedPlaces.d.ts +41 -0
- package/dist/esm/lib/memory/servedPlaces.js +138 -0
- package/dist/esm/lib/observer-queue/index.d.ts +3 -2
- package/dist/esm/lib/observer-queue/index.js +4 -3
- package/dist/esm/lib/pause/types.d.ts +8 -6
- package/dist/esm/lib/pause/types.js +8 -6
- package/dist/esm/lib/reactive/allowlist.d.ts +12 -3
- package/dist/esm/lib/reactive/allowlist.js +17 -6
- package/dist/esm/lib/reactive/arrayTraps.d.ts +10 -2
- package/dist/esm/lib/reactive/arrayTraps.js +117 -19
- package/dist/esm/lib/reactive/createTypedScope.js +35 -9
- package/dist/esm/lib/reactive/handles.js +3 -5
- package/dist/esm/lib/reactive/jsonProjection.d.ts +4 -4
- package/dist/esm/lib/reactive/jsonProjection.js +7 -9
- package/dist/esm/lib/reactive/liveView.d.ts +4 -1
- package/dist/esm/lib/reactive/liveView.js +10 -3
- package/dist/esm/lib/reactive/structuralWrite.js +23 -5
- package/dist/esm/lib/reactive/types.d.ts +6 -0
- package/dist/esm/lib/reactive/types.js +1 -1
- package/dist/esm/lib/reactive/writeTraps.d.ts +20 -1
- package/dist/esm/lib/reactive/writeTraps.js +78 -6
- package/dist/esm/lib/recorder/AttemptRecorder.js +2 -2
- package/dist/esm/lib/recorder/BoundaryStateStore.d.ts +4 -2
- package/dist/esm/lib/recorder/BoundaryStateStore.js +9 -6
- package/dist/esm/lib/recorder/CombinedRecorder.d.ts +4 -3
- package/dist/esm/lib/recorder/CombinedRecorder.js +3 -3
- package/dist/esm/lib/recorder/CompositeRecorder.d.ts +1 -1
- package/dist/esm/lib/recorder/CompositeRecorder.js +1 -1
- package/dist/esm/lib/recorder/ControlDepRecorder.d.ts +1 -1
- package/dist/esm/lib/recorder/ControlDepRecorder.js +2 -2
- package/dist/esm/lib/recorder/EmitRecorder.d.ts +1 -1
- package/dist/esm/lib/recorder/EmitRecorder.js +2 -2
- package/dist/esm/lib/recorder/QualityRecorder.js +5 -2
- package/dist/esm/lib/recorder/TopologyRecorder.js +14 -7
- package/dist/esm/lib/runner/ExecutionRuntime.d.ts +2 -3
- package/dist/esm/lib/runner/ExecutionRuntime.js +3 -4
- package/dist/esm/lib/runner/FlowChartExecutor.d.ts +12 -5
- package/dist/esm/lib/runner/FlowChartExecutor.js +43 -22
- package/dist/esm/lib/runner/RunContext.d.ts +25 -3
- package/dist/esm/lib/runner/RunContext.js +14 -5
- package/dist/esm/lib/runner/RunnableChart.d.ts +10 -3
- package/dist/esm/lib/runner/RunnableChart.js +45 -25
- package/dist/esm/lib/runner/deadline.d.ts +1 -0
- package/dist/esm/lib/runner/deadline.js +1 -1
- package/dist/esm/lib/runner/options.d.ts +6 -6
- package/dist/esm/lib/runner/options.js +1 -1
- package/dist/esm/lib/runner/recordSink.js +4 -2
- package/dist/esm/lib/runner/snapshot.js +3 -3
- package/dist/esm/lib/runner/stringifySnapshot.d.ts +4 -3
- package/dist/esm/lib/runner/stringifySnapshot.js +38 -4
- package/dist/esm/lib/schema/detect.d.ts +1 -6
- package/dist/esm/lib/schema/detect.js +2 -7
- package/dist/esm/lib/schema/validate.js +13 -3
- package/dist/esm/lib/scope/ScopeFacade.d.ts +4 -2
- package/dist/esm/lib/scope/ScopeFacade.js +17 -8
- package/dist/esm/lib/scope/protection/createProtectedScope.js +6 -19
- package/dist/esm/lib/scope/recorders/DebugRecorder.d.ts +1 -1
- package/dist/esm/lib/scope/recorders/DebugRecorder.js +2 -2
- package/dist/esm/lib/scope/state/zod/scopeFactory.js +33 -10
- package/dist/esm/lib/scope/state/zod/utils/validateHelper.js +1 -15
- package/dist/esm/lib/sinks/fileSink.d.ts +4 -1
- package/dist/esm/lib/sinks/fileSink.js +57 -28
- package/dist/esm/lib/sinks/indexedAdmission.d.ts +2 -0
- package/dist/esm/lib/sinks/indexedAdmission.js +11 -1
- package/dist/esm/lib/sinks/indexedRecordFile.js +3 -3
- package/dist/esm/lib/sinks/indexedScan.js +3 -4
- package/dist/esm/recorders.js +1 -1
- package/dist/index.js +3 -3
- package/dist/lib/attempt/policy.js +2 -2
- package/dist/lib/attempt/types.js +1 -1
- package/dist/lib/budget/timeBudget.js +28 -13
- package/dist/lib/builder/FlowChartBuilder.js +163 -111
- package/dist/lib/builder/index.js +4 -3
- package/dist/lib/builder/retryLoop.js +1 -1
- package/dist/lib/builder/structure/StructureRecorder.js +3 -4
- package/dist/lib/builder/structure/StructureRecorderDispatcher.js +18 -3
- package/dist/lib/builder/types.js +4 -3
- package/dist/lib/capture/checkpointCapture.js +9 -3
- package/dist/lib/capture/envelope.js +25 -10
- package/dist/lib/capture/historyNote.js +2 -2
- package/dist/lib/capture/nativeCoverage.js +13 -2
- package/dist/lib/capture/policies.js +3 -3
- package/dist/lib/capture/summarize.js +36 -8
- package/dist/lib/contract/schema.js +14 -5
- package/dist/lib/decide/types.js +1 -1
- package/dist/lib/detach/drivers/batch.js +4 -17
- package/dist/lib/detach/drivers/immediate.js +3 -2
- package/dist/lib/detach/drivers/sendBeacon.js +7 -6
- package/dist/lib/detach/drivers/workerThread.js +56 -12
- package/dist/lib/detach/errors.js +25 -0
- package/dist/lib/detach/registry.js +20 -19
- package/dist/lib/detach/spawn.js +2 -3
- package/dist/lib/detach/types.js +5 -4
- package/dist/lib/engine/handlers/ChildrenExecutor.js +3 -2
- package/dist/lib/engine/handlers/DeciderHandler.js +8 -2
- package/dist/lib/engine/handlers/NodeResolver.js +15 -8
- package/dist/lib/engine/handlers/ParallelForEachHandler.js +150 -58
- package/dist/lib/engine/handlers/RuntimeStructureManager.js +28 -17
- package/dist/lib/engine/handlers/SelectorHandler.js +10 -3
- package/dist/lib/engine/handlers/SubflowExecutor.js +55 -17
- package/dist/lib/engine/handlers/SubflowInputMapper.js +35 -17
- package/dist/lib/engine/handlers/mapperEdits.js +99 -0
- package/dist/lib/engine/handlers/mapperScope.js +157 -0
- package/dist/lib/engine/handlers/plainObject.js +25 -0
- package/dist/lib/engine/handlers/selectionProblem.js +19 -0
- package/dist/lib/engine/narrative/CombinedNarrativeRecorder.js +18 -10
- package/dist/lib/engine/narrative/FlowRecorderDispatcher.js +1 -1
- package/dist/lib/engine/narrative/NarrativeFlowRecorder.js +8 -25
- package/dist/lib/engine/narrative/formatting/ruleEvidence/index.js +10 -2
- package/dist/lib/engine/narrative/recorders/AdaptiveNarrativeFlowRecorder.js +9 -5
- package/dist/lib/engine/narrative/recorders/ManifestFlowRecorder.js +27 -6
- package/dist/lib/engine/narrative/recorders/MilestoneNarrativeFlowRecorder.js +8 -1
- package/dist/lib/engine/narrative/recorders/ProgressiveNarrativeFlowRecorder.js +6 -1
- package/dist/lib/engine/narrative/recorders/SeparateNarrativeFlowRecorder.js +2 -2
- package/dist/lib/engine/narrative/types.js +1 -1
- package/dist/lib/engine/traversal/FlowchartTraverser.js +74 -27
- package/dist/lib/engine/types.js +1 -1
- package/dist/lib/filter/evaluator.js +144 -20
- package/dist/lib/ids/reservedIds.js +3 -3
- package/dist/lib/memory/StageContext.js +290 -34
- package/dist/lib/memory/borrowedMutation.js +42 -2
- package/dist/lib/memory/frameTypes.js +2 -2
- package/dist/lib/memory/hiddenObjectTrail.js +225 -0
- package/dist/lib/memory/keptReads.js +83 -0
- package/dist/lib/memory/markPlaces.js +132 -0
- package/dist/lib/memory/pathTargets.js +95 -0
- package/dist/lib/memory/redaction.js +281 -90
- package/dist/lib/memory/retainedValue/index.js +13 -2
- package/dist/lib/memory/runPolicy.js +3 -3
- package/dist/lib/memory/selectedObjects.js +608 -0
- package/dist/lib/memory/servedPlaces.js +142 -0
- package/dist/lib/observer-queue/index.js +4 -3
- package/dist/lib/pause/types.js +8 -6
- package/dist/lib/reactive/allowlist.js +19 -7
- package/dist/lib/reactive/arrayTraps.js +116 -18
- package/dist/lib/reactive/createTypedScope.js +34 -8
- package/dist/lib/reactive/handles.js +3 -5
- package/dist/lib/reactive/jsonProjection.js +7 -9
- package/dist/lib/reactive/liveView.js +10 -3
- package/dist/lib/reactive/structuralWrite.js +23 -5
- package/dist/lib/reactive/types.js +1 -1
- package/dist/lib/reactive/writeTraps.js +82 -7
- package/dist/lib/recorder/AttemptRecorder.js +2 -2
- package/dist/lib/recorder/BoundaryStateStore.js +9 -6
- package/dist/lib/recorder/CombinedRecorder.js +3 -3
- package/dist/lib/recorder/CompositeRecorder.js +1 -1
- package/dist/lib/recorder/ControlDepRecorder.js +2 -2
- package/dist/lib/recorder/EmitRecorder.js +2 -2
- package/dist/lib/recorder/QualityRecorder.js +5 -2
- package/dist/lib/recorder/TopologyRecorder.js +14 -7
- package/dist/lib/runner/ExecutionRuntime.js +3 -4
- package/dist/lib/runner/FlowChartExecutor.js +43 -22
- package/dist/lib/runner/RunContext.js +14 -5
- package/dist/lib/runner/RunnableChart.js +47 -26
- package/dist/lib/runner/deadline.js +1 -1
- package/dist/lib/runner/options.js +1 -1
- package/dist/lib/runner/recordSink.js +4 -2
- package/dist/lib/runner/snapshot.js +3 -3
- package/dist/lib/runner/stringifySnapshot.js +38 -4
- package/dist/lib/schema/detect.js +2 -7
- package/dist/lib/schema/validate.js +13 -3
- package/dist/lib/scope/ScopeFacade.js +17 -8
- package/dist/lib/scope/protection/createProtectedScope.js +6 -19
- package/dist/lib/scope/recorders/DebugRecorder.js +2 -2
- package/dist/lib/scope/state/zod/scopeFactory.js +32 -9
- package/dist/lib/scope/state/zod/utils/validateHelper.js +1 -15
- package/dist/lib/sinks/fileSink.js +57 -28
- package/dist/lib/sinks/indexedAdmission.js +13 -2
- package/dist/lib/sinks/indexedRecordFile.js +2 -2
- package/dist/lib/sinks/indexedScan.js +2 -3
- package/dist/recorders.js +1 -1
- package/dist/types/index.d.ts +4 -20
- package/dist/types/lib/attempt/policy.d.ts +1 -1
- package/dist/types/lib/attempt/types.d.ts +2 -1
- package/dist/types/lib/budget/timeBudget.d.ts +13 -5
- package/dist/types/lib/builder/FlowChartBuilder.d.ts +74 -35
- package/dist/types/lib/builder/index.d.ts +3 -2
- package/dist/types/lib/builder/retryLoop.d.ts +1 -1
- package/dist/types/lib/builder/structure/StructureRecorder.d.ts +11 -14
- package/dist/types/lib/builder/types.d.ts +5 -4
- package/dist/types/lib/capture/checkpointCapture.d.ts +1 -0
- package/dist/types/lib/capture/envelope.d.ts +6 -3
- package/dist/types/lib/capture/nativeCoverage.d.ts +6 -0
- package/dist/types/lib/capture/policies.d.ts +2 -2
- package/dist/types/lib/capture/summarize.d.ts +2 -1
- package/dist/types/lib/decide/types.d.ts +11 -8
- package/dist/types/lib/detach/drivers/sendBeacon.d.ts +4 -4
- package/dist/types/lib/detach/drivers/workerThread.d.ts +20 -1
- package/dist/types/lib/detach/errors.d.ts +7 -0
- package/dist/types/lib/detach/registry.d.ts +19 -18
- package/dist/types/lib/detach/spawn.d.ts +1 -2
- package/dist/types/lib/detach/types.d.ts +6 -5
- package/dist/types/lib/engine/handlers/NodeResolver.d.ts +9 -1
- package/dist/types/lib/engine/handlers/ParallelForEachHandler.d.ts +6 -1
- package/dist/types/lib/engine/handlers/RuntimeStructureManager.d.ts +9 -1
- package/dist/types/lib/engine/handlers/SubflowExecutor.d.ts +4 -2
- package/dist/types/lib/engine/handlers/mapperEdits.d.ts +23 -0
- package/dist/types/lib/engine/handlers/mapperScope.d.ts +81 -0
- package/dist/types/lib/engine/handlers/plainObject.d.ts +15 -0
- package/dist/types/lib/engine/handlers/selectionProblem.d.ts +9 -0
- package/dist/types/lib/engine/narrative/CombinedNarrativeRecorder.d.ts +4 -2
- package/dist/types/lib/engine/narrative/FlowRecorderDispatcher.d.ts +2 -2
- package/dist/types/lib/engine/narrative/NarrativeFlowRecorder.d.ts +3 -5
- package/dist/types/lib/engine/narrative/recorders/AdaptiveNarrativeFlowRecorder.d.ts +5 -1
- package/dist/types/lib/engine/narrative/recorders/ManifestFlowRecorder.d.ts +9 -1
- package/dist/types/lib/engine/narrative/recorders/MilestoneNarrativeFlowRecorder.d.ts +4 -0
- package/dist/types/lib/engine/narrative/recorders/ProgressiveNarrativeFlowRecorder.d.ts +2 -0
- package/dist/types/lib/engine/narrative/recorders/SeparateNarrativeFlowRecorder.d.ts +1 -1
- package/dist/types/lib/engine/narrative/types.d.ts +1 -1
- package/dist/types/lib/engine/traversal/FlowchartTraverser.d.ts +41 -44
- package/dist/types/lib/engine/types.d.ts +14 -4
- package/dist/types/lib/filter/evaluator.d.ts +6 -0
- package/dist/types/lib/ids/reservedIds.d.ts +2 -2
- package/dist/types/lib/memory/StageContext.d.ts +140 -10
- package/dist/types/lib/memory/borrowedMutation.d.ts +18 -0
- package/dist/types/lib/memory/frameTypes.d.ts +6 -4
- package/dist/types/lib/memory/hiddenObjectTrail.d.ts +118 -0
- package/dist/types/lib/memory/keptReads.d.ts +62 -0
- package/dist/types/lib/memory/markPlaces.d.ts +98 -0
- package/dist/types/lib/memory/pathTargets.d.ts +48 -0
- package/dist/types/lib/memory/redaction.d.ts +142 -24
- package/dist/types/lib/memory/runPolicy.d.ts +10 -8
- package/dist/types/lib/memory/selectedObjects.d.ts +215 -0
- package/dist/types/lib/memory/servedPlaces.d.ts +41 -0
- package/dist/types/lib/observer-queue/index.d.ts +3 -2
- package/dist/types/lib/pause/types.d.ts +8 -6
- package/dist/types/lib/reactive/allowlist.d.ts +12 -3
- package/dist/types/lib/reactive/arrayTraps.d.ts +10 -2
- package/dist/types/lib/reactive/jsonProjection.d.ts +4 -4
- package/dist/types/lib/reactive/liveView.d.ts +4 -1
- package/dist/types/lib/reactive/types.d.ts +6 -0
- package/dist/types/lib/reactive/writeTraps.d.ts +20 -1
- package/dist/types/lib/recorder/BoundaryStateStore.d.ts +4 -2
- package/dist/types/lib/recorder/CombinedRecorder.d.ts +4 -3
- package/dist/types/lib/recorder/CompositeRecorder.d.ts +1 -1
- package/dist/types/lib/recorder/ControlDepRecorder.d.ts +1 -1
- package/dist/types/lib/recorder/EmitRecorder.d.ts +1 -1
- package/dist/types/lib/runner/ExecutionRuntime.d.ts +2 -3
- package/dist/types/lib/runner/FlowChartExecutor.d.ts +12 -5
- package/dist/types/lib/runner/RunContext.d.ts +25 -3
- package/dist/types/lib/runner/RunnableChart.d.ts +10 -3
- package/dist/types/lib/runner/deadline.d.ts +1 -0
- package/dist/types/lib/runner/options.d.ts +6 -6
- package/dist/types/lib/runner/stringifySnapshot.d.ts +4 -3
- package/dist/types/lib/schema/detect.d.ts +1 -6
- package/dist/types/lib/scope/ScopeFacade.d.ts +4 -2
- package/dist/types/lib/scope/recorders/DebugRecorder.d.ts +1 -1
- package/dist/types/lib/sinks/fileSink.d.ts +4 -1
- package/dist/types/lib/sinks/indexedAdmission.d.ts +2 -0
- package/package.json +6 -8
- package/dist/esm/lib/scope/state/installResolvers.d.ts +0 -4
- package/dist/esm/lib/scope/state/installResolvers.js +0 -15
- package/dist/lib/scope/state/installResolvers.js +0 -19
- package/dist/types/lib/scope/state/installResolvers.d.ts +0 -4
|
@@ -41,7 +41,7 @@ export declare class StageContext {
|
|
|
41
41
|
/** @internal Stamped before observers; never inherited by another frame or persisted. */
|
|
42
42
|
bindFailureIdentity(runId: string, runtimeStageId: string): void;
|
|
43
43
|
/**
|
|
44
|
-
* The record half of this frame (`RecordFrame
|
|
44
|
+
* The record half of this frame (foottrace's `RecordFrame`, C3): the heap and,
|
|
45
45
|
* when the run keeps them, the redacted mirror and the log; the address;
|
|
46
46
|
* the first-touch base; the lazy transaction buffer; the readKeys list.
|
|
47
47
|
* Every state read of this frame goes through it, and so does every
|
|
@@ -135,6 +135,8 @@ export declare class StageContext {
|
|
|
135
135
|
* facade path never allocates it.
|
|
136
136
|
*/
|
|
137
137
|
private _nestedReads?;
|
|
138
|
+
/** Which reads this frame has already kept: a read is kept once for each object a key holds (`keptReads.ts`). */
|
|
139
|
+
private readonly keptReads;
|
|
138
140
|
/**
|
|
139
141
|
* Dev mode only: the root keys whose LAST tracked read was served from
|
|
140
142
|
* committed state — before this stage's first write, when no transaction
|
|
@@ -144,6 +146,15 @@ export declare class StageContext {
|
|
|
144
146
|
* stage wrote them. Never allocated outside `enableDevMode()`.
|
|
145
147
|
*/
|
|
146
148
|
private _viewReads?;
|
|
149
|
+
/**
|
|
150
|
+
* Dev mode only: the root keys read LIVE through {@link readLiveRoot} (a subflow mount's mappers and
|
|
151
|
+
* its list append). Such a read is of committed state as it was at that moment, not of this frame's
|
|
152
|
+
* pinned view, and a mount stays open for the whole run of its subflow: a parallel sibling may
|
|
153
|
+
* rightly replace the key in between. {@link warnOnBorrowedMutation} has no pinned value to compare
|
|
154
|
+
* the copy with, so it skips these keys, as it skips every read the live fallback served.
|
|
155
|
+
* Never allocated outside `enableDevMode()`.
|
|
156
|
+
*/
|
|
157
|
+
private _liveReads?;
|
|
147
158
|
/**
|
|
148
159
|
* Has this frame committed at least once? The borrowed-read guard runs on
|
|
149
160
|
* the FIRST commit only — see {@link warnOnBorrowedMutation}. The frame
|
|
@@ -155,8 +166,19 @@ export declare class StageContext {
|
|
|
155
166
|
private _committed;
|
|
156
167
|
/** Tracked reads of a selected value ({@link selectedReads}). */
|
|
157
168
|
private _selectedReads;
|
|
158
|
-
/**
|
|
159
|
-
|
|
169
|
+
/**
|
|
170
|
+
* Follows the objects this frame read under a selected name into what it writes: at each write, and
|
|
171
|
+
* once more at commit (`hiddenObjectTrail.ts`). Made at the first write or read a redaction rule
|
|
172
|
+
* has something to say about, so a run without a policy holds none.
|
|
173
|
+
*/
|
|
174
|
+
private _trail?;
|
|
175
|
+
/**
|
|
176
|
+
* This frame's staged deletes of keys the redaction rule keeps hidden (`redaction.ts · markStagedWrite`),
|
|
177
|
+
* each with the absolute path it deletes. A delete is only STAGED until the frame commits, so no mark
|
|
178
|
+
* ends at the write: {@link endMarksOfLandedDeletes} asks the state once the commit has landed. A
|
|
179
|
+
* discarded try drops them; a delete that never landed ends nothing.
|
|
180
|
+
*/
|
|
181
|
+
private _stagedDeletes?;
|
|
160
182
|
/**
|
|
161
183
|
* RFC-003 D2 honesty markers — untracked read paths used during THIS
|
|
162
184
|
* stage's execution (`'args'` / `'env'` / `'silent'`). Marked by
|
|
@@ -214,7 +236,7 @@ export declare class StageContext {
|
|
|
214
236
|
/**
|
|
215
237
|
* Install a parallel redacted mirror. Subsequent `commit()` calls apply
|
|
216
238
|
* the already-computed redacted patches — the ones the log records — to
|
|
217
|
-
* this mirror, beside the raw patches on the heap (`
|
|
239
|
+
* this mirror, beside the raw patches on the heap (foottrace's `RecordFrame · commit`).
|
|
218
240
|
* Child / next contexts inherit the mirror via `createNext` / `createChild`.
|
|
219
241
|
*
|
|
220
242
|
* Called on a runtime's root frame by `ExecutionRuntime` when the run's policy keeps a mirror.
|
|
@@ -274,7 +296,7 @@ export declare class StageContext {
|
|
|
274
296
|
* one `stageWrite` decided BEFORE staging, carried to commit with the
|
|
275
297
|
* value. The staged write itself is unaffected — redaction of the
|
|
276
298
|
* committed payload is the record frame's scrub of that write
|
|
277
|
-
* (`RecordFrame · write`, then
|
|
299
|
+
* (`RecordFrame · write`, then foottrace's scrub at commit).
|
|
278
300
|
*/
|
|
279
301
|
private trackWrite;
|
|
280
302
|
/**
|
|
@@ -301,7 +323,8 @@ export declare class StageContext {
|
|
|
301
323
|
* 2. identity inheritance — `inheritByIdentity`, against this frame's
|
|
302
324
|
* selected reads as they stand after step 1;
|
|
303
325
|
* 3. the bytes — `RecordFrame · write`, the op and its scrub (the whole
|
|
304
|
-
* value, or the fields inside it)
|
|
326
|
+
* value, or the fields inside it). Steps 2 and 3 are one call,
|
|
327
|
+
* `HiddenObjectTrail · stage`, which also keeps what the key showed;
|
|
305
328
|
* 4. the marks — `markStagedWrite`, only once the write staged, so a
|
|
306
329
|
* write that fails to stage marks nothing.
|
|
307
330
|
* Each step reads the rule (and the selected reads) when it acts, as this
|
|
@@ -309,6 +332,22 @@ export declare class StageContext {
|
|
|
309
332
|
* under the same decision.
|
|
310
333
|
*/
|
|
311
334
|
private stageWrite;
|
|
335
|
+
/**
|
|
336
|
+
* The frame's staged writes have landed. A delete among them ends its key's mark NOW, and only when
|
|
337
|
+
* the key is really gone from the state. WHY ask the state: a stage that deletes a key and writes it
|
|
338
|
+
* again before its commit has not deleted it (the record shows no delete either), and what it wrote
|
|
339
|
+
* back may be the hidden value it read first.
|
|
340
|
+
*/
|
|
341
|
+
private endMarksOfLandedDeletes;
|
|
342
|
+
/** This frame's trail of hidden objects, made when first asked for (`hiddenObjectTrail.ts`). */
|
|
343
|
+
private get trail();
|
|
344
|
+
/**
|
|
345
|
+
* Search what this frame wrote once more, as it stands now, before it is recorded
|
|
346
|
+
* (`HiddenObjectTrail · followAtCommit`, why). A key that gained a hidden place there was staged
|
|
347
|
+
* again; here it gets its marks. And every write the frame kept for its snapshot takes the verdict
|
|
348
|
+
* its kept form is taken under: this runs before {@link materialiseWrites}.
|
|
349
|
+
*/
|
|
350
|
+
private followLateEdits;
|
|
312
351
|
/**
|
|
313
352
|
* Write and read at ANOTHER frame's address (its run namespace) while this
|
|
314
353
|
* frame keeps its own identity on the record — `stage`, `stageId`,
|
|
@@ -337,8 +376,9 @@ export declare class StageContext {
|
|
|
337
376
|
/**
|
|
338
377
|
* Tracked read. The returned value is BORROWED — see the contract on
|
|
339
378
|
* `ScopeFacade.getValue`. Read-tracking cost is policy-gated (#14):
|
|
340
|
-
* `'full'`
|
|
341
|
-
*
|
|
379
|
+
* `'full'` keeps a clone of the value in `_stageReads` (the default), once
|
|
380
|
+
* for each object a key holds ({@link keepOnce}); `'summary'` records a
|
|
381
|
+
* cheap marker, `'off'` records nothing.
|
|
342
382
|
*/
|
|
343
383
|
getValue(path: string[], key?: string, description?: string): unknown;
|
|
344
384
|
/**
|
|
@@ -349,6 +389,67 @@ export declare class StageContext {
|
|
|
349
389
|
inspectValue(path: string[], key?: string): unknown;
|
|
350
390
|
private retainedRead;
|
|
351
391
|
private readRetainedValue;
|
|
392
|
+
/**
|
|
393
|
+
* A read of one ROOT key of live committed state, recorded as a read of THIS step. The mount of a
|
|
394
|
+
* subflow reads this way: its two mappers (`engine/handlers/mapperScope.ts`) and its merge-back,
|
|
395
|
+
* which reads what is there before it adds to it (`SubflowInputMapper · applyOutputMapping`). The
|
|
396
|
+
* value is live state at the root, exactly what those were handed before. What is new is that the
|
|
397
|
+
* read is RECORDED: on the frame's read prefix, under the rule's verdict, in the taint count and
|
|
398
|
+
* in `stageReads`. A key the state does not hold reads `undefined` and records nothing, as before.
|
|
399
|
+
*
|
|
400
|
+
* WHY NOT `getValue`: that serves the frame's own view, pinned at its first touch. A mount's
|
|
401
|
+
* output mapping runs after the subflow has run, and reads state as it is THEN; a pinned view
|
|
402
|
+
* would hand it state as it was when the mount began.
|
|
403
|
+
*
|
|
404
|
+
* WHAT `stageReads` KEEPS IS THE RUN'S OWN SETTING (`readTracking`), as for every read of every
|
|
405
|
+
* step: a copy under `'full'`, a marker under `'summary'`, nothing under `'off'`. The first cut kept
|
|
406
|
+
* a marker whatever the setting said, to spare a mount in a loop the copy. That broke what `'full'`
|
|
407
|
+
* promises a reader of the record (every read of a step is there as a value), and a consumer's own
|
|
408
|
+
* test caught it. The copy is the setting's price, here as for a stage; `bench/mapper-reads.ts`
|
|
409
|
+
* measures it, and `'summary'` is the setting for a run that hands large values on.
|
|
410
|
+
*
|
|
411
|
+
* WITH READ SOURCES ON (`readSources: true`) this read has no source of its own: the record's
|
|
412
|
+
* source-capturing door reads the frame's view, not live root state. The capture says so
|
|
413
|
+
* (`untracked-read`, status `partial`) and never reports a run with such a read as fully captured.
|
|
414
|
+
*/
|
|
415
|
+
readLiveRoot(key: string): unknown;
|
|
416
|
+
/**
|
|
417
|
+
* A read of `key` as THIS frame's writes see it (its own address, then the root), recorded as a read
|
|
418
|
+
* of this step like any other. A subflow's merge-back reads this way before it merges a plain object
|
|
419
|
+
* field by field: what comes out under `key` is what was there with those fields changed, and the
|
|
420
|
+
* fields are written where the frame writes. (For a mount whose frame writes at the root, which is
|
|
421
|
+
* every mount the builder makes, this is the root key; read at the root regardless, a frame that
|
|
422
|
+
* writes under a namespace would be given the wrong writer.) A key that is not there reads
|
|
423
|
+
* `undefined` and records nothing: that is all this door adds to {@link getValue}.
|
|
424
|
+
*/
|
|
425
|
+
readOwnView(key: string): unknown;
|
|
426
|
+
/**
|
|
427
|
+
* `value` is about to be written at `path`/`key` in PIECES: a subflow's merge-back merges a plain
|
|
428
|
+
* object field by field and appends a list as a new array. The write funnel then sees only the
|
|
429
|
+
* pieces, so an object this frame read under a selected name would lose its rule on the way (step 2
|
|
430
|
+
* of {@link stageWrite}, which follows an object by identity). Asked here with the whole value
|
|
431
|
+
* first, the target inherits what a whole write would have given it.
|
|
432
|
+
*/
|
|
433
|
+
inheritRule(path: string[], key: string, value: unknown): void;
|
|
434
|
+
/**
|
|
435
|
+
* `handed` is what user code was given in place of `value`, an object this frame read under a
|
|
436
|
+
* selected name: the redaction rule hands a subflow mapper a VIEW of a record whose fields are
|
|
437
|
+
* selected, not the record. It carries the same rule, so that a copy of it written under another
|
|
438
|
+
* name is found by identity ({@link inheritRule}, {@link stageWrite}) as the record itself would be.
|
|
439
|
+
*/
|
|
440
|
+
sameRuleFor(handed: unknown, value: unknown): void;
|
|
441
|
+
/**
|
|
442
|
+
* `copy` is a full copy the scope made of `value` and handed to user code (`$batchArray`). An object
|
|
443
|
+
* taken out of the copy is the selected value's all the same.
|
|
444
|
+
*/
|
|
445
|
+
copyOfSelected(copy: unknown, value: unknown): void;
|
|
446
|
+
/** What every tracked read keeps, once the value is in hand and its verdict known (see {@link getValue}). */
|
|
447
|
+
private retainRead;
|
|
448
|
+
/**
|
|
449
|
+
* Keep what this read saw in {@link _stageReads}: once for each object a root key holds, not once for
|
|
450
|
+
* each read of it. The rule, why it holds and what it leaves alone are in `keptReads.ts`.
|
|
451
|
+
*/
|
|
452
|
+
private keepOnce;
|
|
352
453
|
/**
|
|
353
454
|
* How many tracked reads of this frame read a value the run's rule selects
|
|
354
455
|
* (a key it masks whole, or one with secret fields). A boundary that maps
|
|
@@ -368,7 +469,20 @@ export declare class StageContext {
|
|
|
368
469
|
* retained or reported.
|
|
369
470
|
*/
|
|
370
471
|
noteUntrackedRead(key: string | undefined, value: unknown): void;
|
|
371
|
-
/**
|
|
472
|
+
/**
|
|
473
|
+
* The stage asked for its input (`$getArgs()`): what the rule hides in it stays hidden wherever the
|
|
474
|
+
* stage writes it (`HiddenObjectTrail · rememberInput`). Never counted as a selected read: the taint
|
|
475
|
+
* law asks the input itself (`redaction.ts`, "the taint law").
|
|
476
|
+
*/
|
|
477
|
+
noteInputRead(input: unknown, source?: unknown): void;
|
|
478
|
+
/** An object read under a selected name, and every object inside it, keeps its rule wherever the stage writes it (`selectedObjects.ts`). */
|
|
479
|
+
private rememberSelected;
|
|
480
|
+
/**
|
|
481
|
+
* A read with no key hands the stage everything under `path`, so it counts when that holds a selected
|
|
482
|
+
* name, and each selected value in it is remembered like one read by its key (`selectedObjects.ts`):
|
|
483
|
+
* the value at a selected path, or, for the whole state, the value of each selected key (the keys of
|
|
484
|
+
* every run namespace included).
|
|
485
|
+
*/
|
|
372
486
|
private noteKeylessRead;
|
|
373
487
|
private noteAndJudgeRead;
|
|
374
488
|
private judgeRead;
|
|
@@ -379,7 +493,13 @@ export declare class StageContext {
|
|
|
379
493
|
getValueDirect(path: string[], key?: string): unknown;
|
|
380
494
|
getRoot(key: string): any;
|
|
381
495
|
getGlobal(key: string): any;
|
|
382
|
-
|
|
496
|
+
/**
|
|
497
|
+
* The names of the root keys of committed state, as they stand now: what a subflow mapper may read
|
|
498
|
+
* (`engine/handlers/mapperScope.ts`). Names only; a value is read through {@link readLiveRoot}.
|
|
499
|
+
*/
|
|
500
|
+
rootKeys(): string[];
|
|
501
|
+
/** Does committed state hold `key` at its root, as it stands now? A name is asked, no value is read. */
|
|
502
|
+
hasRootKey(key: unknown): key is string;
|
|
383
503
|
getRunId(): string;
|
|
384
504
|
/**
|
|
385
505
|
* RFC-003 D2: record that this stage consumed an untracked read path.
|
|
@@ -512,6 +632,16 @@ export declare class StageContext {
|
|
|
512
632
|
* every attempt did, and the retry feature's whole point is that the earlier
|
|
513
633
|
* attempts stay visible.
|
|
514
634
|
*
|
|
635
|
+
* Also KEPT: what the attempt read under a selected name — the count
|
|
636
|
+
* (`_selectedReads`, so {@link selectedReads} and {@link taintedReads} still
|
|
637
|
+
* count it) and the objects it read (`HiddenObjectTrail`, so `stageWrite`
|
|
638
|
+
* still hands their rule on). A later attempt can hold what a failed one
|
|
639
|
+
* read (a closure, a module variable), and the library cannot tell, so a
|
|
640
|
+
* selected read in any attempt marks the later ones: a threshold or break
|
|
641
|
+
* reason they serve is masked, and such an object keeps its rule when a
|
|
642
|
+
* later attempt writes it under another name. This is the conservative
|
|
643
|
+
* side for redaction (test/lib/engine/security/retry-isolation.test.ts).
|
|
644
|
+
*
|
|
515
645
|
* No commit is recorded and no observer fires — a discarded attempt is not a
|
|
516
646
|
* cursor stop, because from shared state's point of view it never happened.
|
|
517
647
|
*/
|