footprintjs 13.0.0 → 14.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/AGENTS.md +2 -1
- package/dist/esm/lib/builder/FlowChartBuilder.js +7 -62
- package/dist/esm/lib/builder/effectDeclarations.d.ts +29 -0
- package/dist/esm/lib/builder/effectDeclarations.js +66 -0
- package/dist/esm/lib/capture/fanoutCollections.d.ts +6 -0
- package/dist/esm/lib/capture/fanoutCollections.js +51 -0
- package/dist/esm/lib/capture/nativeRootReads.d.ts +6 -0
- package/dist/esm/lib/capture/nativeRootReads.js +19 -0
- package/dist/esm/lib/capture/sinkStats.d.ts +16 -0
- package/dist/esm/lib/capture/sinkStats.js +2 -0
- package/dist/esm/lib/capture/subflowCapability.d.ts +46 -0
- package/dist/esm/lib/capture/subflowCapability.js +52 -0
- package/dist/esm/lib/capture/subflowHandoff.d.ts +87 -0
- package/dist/esm/lib/capture/subflowHandoff.js +50 -0
- package/dist/esm/lib/decide/evidence.js +2 -2
- package/dist/esm/lib/detach/drivers/sendBeacon.js +4 -1
- package/dist/esm/lib/detach/drivers/workerThread.js +4 -1
- package/dist/esm/lib/detach/spawn.js +3 -1
- package/dist/esm/lib/engine/handlers/ParallelForEachHandler.js +35 -12
- package/dist/esm/lib/engine/handlers/SubflowExecutor.d.ts +0 -14
- package/dist/esm/lib/engine/handlers/SubflowExecutor.js +12 -81
- package/dist/esm/lib/engine/handlers/handoff/fanout.d.ts +27 -0
- package/dist/esm/lib/engine/handlers/handoff/fanout.js +120 -0
- package/dist/esm/lib/engine/handlers/handoff/generated.d.ts +12 -0
- package/dist/esm/lib/engine/handlers/handoff/generated.js +8 -0
- package/dist/esm/lib/engine/handlers/handoff/input.d.ts +21 -0
- package/dist/esm/lib/engine/handlers/handoff/input.js +114 -0
- package/dist/esm/lib/engine/handlers/handoff/prefix.d.ts +11 -0
- package/dist/esm/lib/engine/handlers/handoff/prefix.js +30 -0
- package/dist/esm/lib/engine/handlers/handoff.d.ts +5 -0
- package/dist/esm/lib/engine/handlers/handoff.js +21 -0
- package/dist/esm/lib/engine/handlers/mappedInput.d.ts +29 -0
- package/dist/esm/lib/engine/handlers/mappedInput.js +66 -0
- package/dist/esm/lib/engine/handlers/mapperScope.js +3 -2
- package/dist/esm/lib/engine/handlers/servedPause.js +2 -2
- package/dist/esm/lib/engine/handlers/servedSubflowResults.d.ts +2 -1
- package/dist/esm/lib/engine/handlers/servedSubflowResults.js +9 -7
- package/dist/esm/lib/engine/narrative/formatting/ruleEvidence/index.js +2 -2
- package/dist/esm/lib/engine/traversal/FlowchartTraverser.d.ts +1 -0
- package/dist/esm/lib/engine/types.d.ts +4 -19
- package/dist/esm/lib/engine/types.js +1 -1
- package/dist/esm/lib/filter/evaluator.d.ts +1 -1
- package/dist/esm/lib/filter/evaluator.js +2 -2
- package/dist/esm/lib/memory/StageContext.d.ts +6 -12
- package/dist/esm/lib/memory/StageContext.js +13 -23
- package/dist/esm/lib/memory/callLimits/index.d.ts +8 -0
- package/dist/esm/lib/memory/callLimits/index.js +9 -0
- package/dist/esm/lib/memory/frameTypes.d.ts +5 -0
- package/dist/esm/lib/memory/frameTypes.js +1 -1
- package/dist/esm/lib/memory/hiddenObjectTrail.d.ts +2 -1
- package/dist/esm/lib/memory/hiddenObjectTrail.js +2 -2
- package/dist/esm/lib/memory/readAuthority/context.d.ts +4 -0
- package/dist/esm/lib/memory/readAuthority/context.js +11 -0
- package/dist/esm/lib/memory/readAuthority/identity.d.ts +11 -0
- package/dist/esm/lib/memory/readAuthority/identity.js +26 -0
- package/dist/esm/lib/memory/readAuthority/intrinsics.d.ts +10 -0
- package/dist/esm/lib/memory/readAuthority/intrinsics.js +50 -0
- package/dist/esm/lib/memory/readAuthority/owners.d.ts +3 -0
- package/dist/esm/lib/memory/readAuthority/owners.js +9 -0
- package/dist/esm/lib/memory/readAuthority/policy.d.ts +3 -0
- package/dist/esm/lib/memory/readAuthority/policy.js +11 -0
- package/dist/esm/lib/memory/readAuthority/policyObservation.d.ts +2 -0
- package/dist/esm/lib/memory/readAuthority/policyObservation.js +20 -0
- package/dist/esm/lib/memory/readAuthority/rule.d.ts +4 -0
- package/dist/esm/lib/memory/readAuthority/rule.js +16 -0
- package/dist/esm/lib/memory/readAuthority.d.ts +6 -0
- package/dist/esm/lib/memory/readAuthority.js +7 -0
- package/dist/esm/lib/memory/redaction.d.ts +4 -43
- package/dist/esm/lib/memory/redaction.js +8 -22
- package/dist/esm/lib/memory/redactionValues.d.ts +44 -0
- package/dist/esm/lib/memory/redactionValues.js +23 -0
- package/dist/esm/lib/memory/retainedValue/index.d.ts +2 -1
- package/dist/esm/lib/memory/retainedValue/index.js +3 -2
- package/dist/esm/lib/memory/runPolicy.js +6 -4
- package/dist/esm/lib/runner/ExecutionRuntime.d.ts +5 -16
- package/dist/esm/lib/runner/ExecutionRuntime.js +9 -15
- package/dist/esm/lib/runner/FlowChartExecutor.js +3 -2
- package/dist/esm/lib/runner/options.d.ts +3 -1
- package/dist/esm/lib/runner/options.js +4 -1
- package/dist/esm/lib/runner/recordSink.js +2 -2
- package/dist/esm/lib/runner/snapshot.d.ts +0 -7
- package/dist/esm/lib/runner/snapshot.js +3 -9
- package/dist/esm/lib/scope/ScopeFacade.js +3 -2
- package/dist/esm/lib/scope/runtime.d.ts +2 -0
- package/dist/esm/lib/scope/runtime.js +6 -1
- package/dist/esm/subflow-capture.d.ts +9 -0
- package/dist/esm/subflow-capture.js +30 -0
- package/dist/lib/builder/FlowChartBuilder.js +23 -78
- package/dist/lib/builder/effectDeclarations.js +71 -0
- package/dist/lib/capture/fanoutCollections.js +57 -0
- package/dist/lib/capture/nativeRootReads.js +24 -0
- package/dist/lib/capture/sinkStats.js +3 -0
- package/dist/lib/capture/subflowCapability.js +62 -0
- package/dist/lib/capture/subflowHandoff.js +58 -0
- package/dist/lib/decide/evidence.js +3 -3
- package/dist/lib/detach/drivers/sendBeacon.js +4 -1
- package/dist/lib/detach/drivers/workerThread.js +4 -1
- package/dist/lib/detach/spawn.js +3 -1
- package/dist/lib/engine/handlers/ParallelForEachHandler.js +34 -11
- package/dist/lib/engine/handlers/SubflowExecutor.js +13 -82
- package/dist/lib/engine/handlers/handoff/fanout.js +124 -0
- package/dist/lib/engine/handlers/handoff/generated.js +13 -0
- package/dist/lib/engine/handlers/handoff/input.js +118 -0
- package/dist/lib/engine/handlers/handoff/prefix.js +34 -0
- package/dist/lib/engine/handlers/handoff.js +25 -0
- package/dist/lib/engine/handlers/mappedInput.js +70 -0
- package/dist/lib/engine/handlers/mapperScope.js +3 -2
- package/dist/lib/engine/handlers/servedPause.js +3 -3
- package/dist/lib/engine/handlers/servedSubflowResults.js +9 -7
- package/dist/lib/engine/narrative/formatting/ruleEvidence/index.js +3 -3
- package/dist/lib/engine/types.js +1 -1
- package/dist/lib/filter/evaluator.js +4 -4
- package/dist/lib/memory/StageContext.js +32 -40
- package/dist/lib/memory/callLimits/index.js +12 -0
- package/dist/lib/memory/frameTypes.js +1 -1
- package/dist/lib/memory/hiddenObjectTrail.js +1 -1
- package/dist/lib/memory/readAuthority/context.js +15 -0
- package/dist/lib/memory/readAuthority/identity.js +32 -0
- package/dist/lib/memory/readAuthority/intrinsics.js +58 -0
- package/dist/lib/memory/readAuthority/owners.js +14 -0
- package/dist/lib/memory/readAuthority/policy.js +16 -0
- package/dist/lib/memory/readAuthority/policyObservation.js +24 -0
- package/dist/lib/memory/readAuthority/rule.js +20 -0
- package/dist/lib/memory/readAuthority.js +16 -0
- package/dist/lib/memory/redaction.js +34 -44
- package/dist/lib/memory/redactionValues.js +26 -0
- package/dist/lib/memory/retainedValue/index.js +3 -2
- package/dist/lib/memory/runPolicy.js +6 -4
- package/dist/lib/runner/ExecutionRuntime.js +9 -15
- package/dist/lib/runner/FlowChartExecutor.js +3 -2
- package/dist/lib/runner/options.js +4 -1
- package/dist/lib/runner/recordSink.js +4 -4
- package/dist/lib/runner/snapshot.js +3 -9
- package/dist/lib/scope/ScopeFacade.js +3 -2
- package/dist/lib/scope/runtime.js +8 -2
- package/dist/subflow-capture.js +34 -0
- package/dist/types/lib/builder/effectDeclarations.d.ts +29 -0
- package/dist/types/lib/capture/fanoutCollections.d.ts +6 -0
- package/dist/types/lib/capture/nativeRootReads.d.ts +6 -0
- package/dist/types/lib/capture/sinkStats.d.ts +16 -0
- package/dist/types/lib/capture/subflowCapability.d.ts +46 -0
- package/dist/types/lib/capture/subflowHandoff.d.ts +87 -0
- package/dist/types/lib/engine/handlers/SubflowExecutor.d.ts +0 -14
- package/dist/types/lib/engine/handlers/handoff/fanout.d.ts +27 -0
- package/dist/types/lib/engine/handlers/handoff/generated.d.ts +12 -0
- package/dist/types/lib/engine/handlers/handoff/input.d.ts +21 -0
- package/dist/types/lib/engine/handlers/handoff/prefix.d.ts +11 -0
- package/dist/types/lib/engine/handlers/handoff.d.ts +5 -0
- package/dist/types/lib/engine/handlers/mappedInput.d.ts +29 -0
- package/dist/types/lib/engine/handlers/servedSubflowResults.d.ts +2 -1
- package/dist/types/lib/engine/traversal/FlowchartTraverser.d.ts +1 -0
- package/dist/types/lib/engine/types.d.ts +4 -19
- package/dist/types/lib/filter/evaluator.d.ts +1 -1
- package/dist/types/lib/memory/StageContext.d.ts +6 -12
- package/dist/types/lib/memory/callLimits/index.d.ts +8 -0
- package/dist/types/lib/memory/frameTypes.d.ts +5 -0
- package/dist/types/lib/memory/hiddenObjectTrail.d.ts +2 -1
- package/dist/types/lib/memory/readAuthority/context.d.ts +4 -0
- package/dist/types/lib/memory/readAuthority/identity.d.ts +11 -0
- package/dist/types/lib/memory/readAuthority/intrinsics.d.ts +10 -0
- package/dist/types/lib/memory/readAuthority/owners.d.ts +3 -0
- package/dist/types/lib/memory/readAuthority/policy.d.ts +3 -0
- package/dist/types/lib/memory/readAuthority/policyObservation.d.ts +2 -0
- package/dist/types/lib/memory/readAuthority/rule.d.ts +4 -0
- package/dist/types/lib/memory/readAuthority.d.ts +6 -0
- package/dist/types/lib/memory/redaction.d.ts +4 -43
- package/dist/types/lib/memory/redactionValues.d.ts +44 -0
- package/dist/types/lib/memory/retainedValue/index.d.ts +2 -1
- package/dist/types/lib/runner/ExecutionRuntime.d.ts +5 -16
- package/dist/types/lib/runner/options.d.ts +3 -1
- package/dist/types/lib/runner/snapshot.d.ts +0 -7
- package/dist/types/lib/scope/runtime.d.ts +2 -0
- package/dist/types/subflow-capture.d.ts +9 -0
- package/package.json +17 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Captured operations over identity-admitted owners; none dispatches a user method. */
|
|
2
|
+
export declare const ownDescriptor: (o: any, p: PropertyKey) => PropertyDescriptor | undefined;
|
|
3
|
+
export declare const prototypeOf: (o: any) => any;
|
|
4
|
+
export declare const objectPrototype: Object;
|
|
5
|
+
export declare const weaklyHas: (owners: WeakSet<object>, value: unknown) => value is object;
|
|
6
|
+
export declare const weaklyAdd: (owners: WeakSet<object>, value: object) => void;
|
|
7
|
+
export declare function dataField(owner: object, key: string): PropertyDescriptor | undefined;
|
|
8
|
+
export declare function sameDataField(owner: object, key: string, original: PropertyDescriptor): boolean;
|
|
9
|
+
/** Brand first: a Proxy around a Set fails without executing any of its traps. */
|
|
10
|
+
export declare function nativeSetSize(value: unknown): number | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type OwnerData } from './identity.js';
|
|
2
|
+
/** true = observed inert, false = observed active, undefined = unknown authority. */
|
|
3
|
+
export type RuleObservation = (rule: unknown) => boolean | undefined;
|
|
4
|
+
export declare function observeRule(owners: OwnerData, rule: unknown): boolean | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Private owner foundation only; no public door, live sampling, read adapter or event enrichment. */
|
|
2
|
+
export { observeContext } from './readAuthority/context.js';
|
|
3
|
+
export { registerOwner } from './readAuthority/identity.js';
|
|
4
|
+
export { createContextAuthority, createRuleAuthority } from './readAuthority/owners.js';
|
|
5
|
+
export { mintPolicy } from './readAuthority/policy.js';
|
|
6
|
+
export { observeRule } from './readAuthority/rule.js';
|
|
@@ -65,22 +65,9 @@
|
|
|
65
65
|
import type { WriteScrub, WriteVerb } from 'foottrace/write';
|
|
66
66
|
import type { StructuredErrorInfo } from '../errors/errorInfo.js';
|
|
67
67
|
import type { RedactionMarks } from '../pause/types.js';
|
|
68
|
+
import { type RedactionVerdict, type ServedThreshold } from './redactionValues.js';
|
|
68
69
|
import type { FoundSelected, SameContent, SelectedObjects, ShownObjects } from './selectedObjects.js';
|
|
69
|
-
|
|
70
|
-
* What the SCOPE CHANNEL carries where a value was scrubbed: a scope recorder's read, write and
|
|
71
|
-
* commit events, the `stageReads` / `stageWrites` retention, the narrative, a decision's evidence, an
|
|
72
|
-
* emit payload matched by `emitPatterns`, a pause payload's served form and a subflow's narrated seed
|
|
73
|
-
* (`onSubflowEntry`) — every value this verdict serves, unless its caller passes the log's string.
|
|
74
|
-
*
|
|
75
|
-
* Its twin is the RECORD's `LOG_PLACEHOLDER` (`'REDACTED'`, in foottrace): the commit log,
|
|
76
|
-
* the redacted mirror and everything served from them. So NOT every recorder event carries this one:
|
|
77
|
-
* `onSubflowExit.outputState` serves the subflow's redacted mirror when a policy keeps one, and so
|
|
78
|
-
* carries the log's string (without a mirror — per-call marks alone — it is the subflow's heap
|
|
79
|
-
* retained under the rule, with this one). Both strings are historical and neither changed when it
|
|
80
|
-
* moved: this one was the constant `REDACTED` in this file until F4a, then `placeholders.ts ·
|
|
81
|
-
* SCOPE_PLACEHOLDER`, and since C4 it lives here again, beside the verdict that writes it.
|
|
82
|
-
*/
|
|
83
|
-
export declare const SCOPE_PLACEHOLDER = "[REDACTED]";
|
|
70
|
+
export { type RedactionVerdict, type ServedThreshold, CLEAR, SCOPE_PLACEHOLDER, THRESHOLD_HOLE, } from './redactionValues.js';
|
|
84
71
|
/**
|
|
85
72
|
* Declarative key/path redaction for recorded state and boundary records.
|
|
86
73
|
*
|
|
@@ -143,26 +130,6 @@ export interface RedactionReport {
|
|
|
143
130
|
/** Pattern sources that were active (e.g. ['password|secret']). */
|
|
144
131
|
patterns: string[];
|
|
145
132
|
}
|
|
146
|
-
/**
|
|
147
|
-
* What the policy says about the value at one user-level path.
|
|
148
|
-
*
|
|
149
|
-
* - `'clear'` — nothing to scrub; retain and serve the value as it is.
|
|
150
|
-
* - `'whole'` — the entire value is secret. `key` is the policy or marked
|
|
151
|
-
* key that decided it (the path itself or one of its ancestors).
|
|
152
|
-
* - `'fields'` — the value is an object whose `paths` (dot-paths INSIDE the
|
|
153
|
-
* value, relative to it) are secret; everything else in it is not.
|
|
154
|
-
*/
|
|
155
|
-
export type RedactionVerdict = {
|
|
156
|
-
readonly kind: 'clear';
|
|
157
|
-
} | {
|
|
158
|
-
readonly kind: 'whole';
|
|
159
|
-
readonly key: string;
|
|
160
|
-
} | {
|
|
161
|
-
readonly kind: 'fields';
|
|
162
|
-
readonly key: string;
|
|
163
|
-
readonly paths: readonly string[];
|
|
164
|
-
};
|
|
165
|
-
export declare const CLEAR: RedactionVerdict;
|
|
166
133
|
/**
|
|
167
134
|
* Where a stage's own code may have copied a value from, as data. The rule cannot see what a string or a threshold
|
|
168
135
|
* was built from, so it asks these instead: the taint law ({@link RedactionRule.retainStageText},
|
|
@@ -174,14 +141,6 @@ export interface StageSources {
|
|
|
174
141
|
/** Reads of a selected value on this frame so far (`StageContext · taintedReads`). */
|
|
175
142
|
readonly selectedReads?: number;
|
|
176
143
|
}
|
|
177
|
-
/** What a condition row keeps of its threshold: the value to store, and whether that value is a hole. */
|
|
178
|
-
export interface ServedThreshold {
|
|
179
|
-
readonly threshold: unknown;
|
|
180
|
-
/** Absent for a value: the string `[REDACTED]` can be a real threshold. */
|
|
181
|
-
readonly thresholdRedacted?: true;
|
|
182
|
-
}
|
|
183
|
-
/** A threshold nothing can answer for: the placeholder, and the marker that says it is one. */
|
|
184
|
-
export declare const THRESHOLD_HOLE: ServedThreshold;
|
|
185
144
|
/**
|
|
186
145
|
* What one `decide()` / `select()` asks the run's rule, answered live as data ({@link RedactionRule.evidenceRule}), so
|
|
187
146
|
* `decide/` and `filter/` hold neither a rule nor a frame.
|
|
@@ -769,3 +728,5 @@ export declare class MapperTaint {
|
|
|
769
728
|
/** Does a value the mapper BUILT embed, by reference, a selected record it read or was handed? */
|
|
770
729
|
private embedsSelected;
|
|
771
730
|
}
|
|
731
|
+
/** Engine-private, callback-free foundation; deliberately absent from every public door. */
|
|
732
|
+
export declare const observeOwnedRule: (owner: unknown) => boolean | undefined;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the SCOPE CHANNEL carries where a value was scrubbed: a scope recorder's read, write and
|
|
3
|
+
* commit events, the `stageReads` / `stageWrites` retention, the narrative, a decision's evidence, an
|
|
4
|
+
* emit payload matched by `emitPatterns`, a pause payload's served form and a subflow's narrated seed
|
|
5
|
+
* (`onSubflowEntry`) — every value this verdict serves, unless its caller passes the log's string.
|
|
6
|
+
*
|
|
7
|
+
* Its twin is the RECORD's `LOG_PLACEHOLDER` (`'REDACTED'`, in foottrace): the commit log,
|
|
8
|
+
* the redacted mirror and everything served from them. So NOT every recorder event carries this one:
|
|
9
|
+
* `onSubflowExit.outputState` serves the subflow's redacted mirror when a policy keeps one, and so
|
|
10
|
+
* carries the log's string (without a mirror — per-call marks alone — it is the subflow's heap
|
|
11
|
+
* retained under the rule, with this one). Both strings are historical and neither changed when it
|
|
12
|
+
* moved: this one was the constant `REDACTED` in this file until F4a, then `placeholders.ts ·
|
|
13
|
+
* SCOPE_PLACEHOLDER`, and since C4 it lives here again, beside the verdict that writes it.
|
|
14
|
+
* The shared fixed-value owner is now `memory/redactionValues.ts`; the original verdict facade re-exports it.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SCOPE_PLACEHOLDER = "[REDACTED]";
|
|
17
|
+
/**
|
|
18
|
+
* What the policy says about the value at one user-level path.
|
|
19
|
+
*
|
|
20
|
+
* - `'clear'` — nothing to scrub; retain and serve the value as it is.
|
|
21
|
+
* - `'whole'` — the entire value is secret. `key` is the policy or marked
|
|
22
|
+
* key that decided it (the path itself or one of its ancestors).
|
|
23
|
+
* - `'fields'` — the value is an object whose `paths` (dot-paths INSIDE the
|
|
24
|
+
* value, relative to it) are secret; everything else in it is not.
|
|
25
|
+
*/
|
|
26
|
+
export type RedactionVerdict = {
|
|
27
|
+
readonly kind: 'clear';
|
|
28
|
+
} | {
|
|
29
|
+
readonly kind: 'whole';
|
|
30
|
+
readonly key: string;
|
|
31
|
+
} | {
|
|
32
|
+
readonly kind: 'fields';
|
|
33
|
+
readonly key: string;
|
|
34
|
+
readonly paths: readonly string[];
|
|
35
|
+
};
|
|
36
|
+
export declare const CLEAR: RedactionVerdict;
|
|
37
|
+
/** What a condition row keeps of its threshold: the value to store, and whether that value is a hole. */
|
|
38
|
+
export interface ServedThreshold {
|
|
39
|
+
readonly threshold: unknown;
|
|
40
|
+
/** Absent for a value: the string `[REDACTED]` can be a real threshold. */
|
|
41
|
+
readonly thresholdRedacted?: true;
|
|
42
|
+
}
|
|
43
|
+
/** A threshold nothing can answer for: the placeholder, and the marker that says it is one. */
|
|
44
|
+
export declare const THRESHOLD_HOLE: ServedThreshold;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReadTrackingMode, WriteTrackingMode } from '../frameTypes.js';
|
|
2
|
-
import {
|
|
2
|
+
import { RedactionRule } from '../redaction.js';
|
|
3
|
+
import { type RedactionVerdict } from '../redactionValues.js';
|
|
3
4
|
/**
|
|
4
5
|
* The form of a value the engine RETAINS (reads and writes retention):
|
|
5
6
|
* the placeholder beats every dial; a field-level scrub happens before the
|
|
@@ -13,7 +13,9 @@ import type { CommitBundle, CommitValuesMode, LogAddress, LogOutcome, Meta } fro
|
|
|
13
13
|
import type { RecordSink, WriteProvenanceMode } from 'foottrace/write';
|
|
14
14
|
import { EventLog, SharedMemory } from 'foottrace/write';
|
|
15
15
|
import type { RunCorrelation } from '../attempt/types.js';
|
|
16
|
-
import type {
|
|
16
|
+
import type { RecordSinkStats } from '../capture/sinkStats.js';
|
|
17
|
+
import type { FanoutCollections } from '../capture/subflowHandoff.js';
|
|
18
|
+
export type { RecordSinkStats } from '../capture/sinkStats.js';
|
|
17
19
|
import type { CaptureChannelStatus, RecorderCaptureAcknowledgement } from '../capture/nativeCoverage.js';
|
|
18
20
|
import { NativeCapture } from '../capture/nativeCoverage.js';
|
|
19
21
|
import { NativeExtent } from '../capture/nativeExtent/collector.js';
|
|
@@ -109,6 +111,8 @@ export type RuntimeSnapshot = {
|
|
|
109
111
|
readonly logAddress?: LogAddress;
|
|
110
112
|
/** Present only when child-output handoff observation was explicitly requested. */
|
|
111
113
|
readonly captureOutputHandoff?: true;
|
|
114
|
+
/** Bounded parent-owned scope observations, not an invocation completeness certificate. */
|
|
115
|
+
readonly fanoutCollections?: FanoutCollections;
|
|
112
116
|
/** Present only when built-in TypedScope nested member observation was requested. */
|
|
113
117
|
readonly nestedReadTracking?: true;
|
|
114
118
|
/**
|
|
@@ -154,21 +158,6 @@ export type RuntimeSnapshot = {
|
|
|
154
158
|
*/
|
|
155
159
|
sink?: RecordSinkStats;
|
|
156
160
|
};
|
|
157
|
-
/** `getSnapshot().sink` — what the run handed its sink, and what the sink did not take (10.1, P6). */
|
|
158
|
-
export interface RecordSinkStats {
|
|
159
|
-
/** Present only when explicit capture persistence was requested. Never inferred from an ordinary flush. */
|
|
160
|
-
readonly capture?: CaptureHistoryStatus;
|
|
161
|
-
/** Entries handed to the adapter (each `opened`, `commit`, `note`, `closed` call). */
|
|
162
|
-
readonly entries: number;
|
|
163
|
-
/**
|
|
164
|
-
* Losses — a method that threw or rejected, an entry the log refused to send, a `meta` the log could not copy
|
|
165
|
-
* (that entry was still stored, without it), and failed or timed-out flushes. A rejection that settles after the
|
|
166
|
-
* run finished is counted when it settles.
|
|
167
|
-
*/
|
|
168
|
-
readonly failed: number;
|
|
169
|
-
/** The last loss's error, as text. Absent while nothing was lost. */
|
|
170
|
-
readonly lastError?: string;
|
|
171
|
-
}
|
|
172
161
|
/**
|
|
173
162
|
* Where a runtime's log writes as it lands (10.1, P6): the run's sink, the log's address and what the writer puts on
|
|
174
163
|
* its `opened` entry. Absent → the log is the plain one-argument `EventLog`, byte-identical to 10.0.
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import type { Meta } from 'foottrace';
|
|
9
9
|
import type { RunCorrelation } from '../attempt/types.js';
|
|
10
10
|
import type { FlowChart } from '../builder/types.js';
|
|
11
|
+
import { type SubflowCaptureOptions, type SubflowCapturePort } from '../capture/subflowCapability.js';
|
|
11
12
|
import type { ResumeEntry } from '../engine/handlers/ResumeEntry.js';
|
|
12
13
|
import type { ScopeFactory, StreamHandlers } from '../engine/types.js';
|
|
13
14
|
import type { RunDials } from '../memory/runPolicy.js';
|
|
@@ -34,7 +35,7 @@ import { type RecordSinkOption, type ResolvedRecordSink, type RunRecord } from '
|
|
|
34
35
|
* TypeScript cannot infer `TScope` through the options object. Pass the type
|
|
35
36
|
* explicitly: `new FlowChartExecutor<TOut, MyScope>(chart, { scopeFactory })`.
|
|
36
37
|
*/
|
|
37
|
-
export interface FlowChartExecutorOptions<TScope = any> extends RunDials {
|
|
38
|
+
export interface FlowChartExecutorOptions<TScope = any> extends RunDials, SubflowCaptureOptions {
|
|
38
39
|
/** Custom scope factory. Defaults to TypedScope or ScopeFacade auto-detection. */
|
|
39
40
|
scopeFactory?: ScopeFactory<TScope>;
|
|
40
41
|
/**
|
|
@@ -96,6 +97,7 @@ export interface ExecutorArgs<TOut, TScope> {
|
|
|
96
97
|
scopeProtectionMode?: ScopeProtectionMode;
|
|
97
98
|
/** The dials as given (absent = default) — the run's policy is built from them per leg. */
|
|
98
99
|
dials: RunDials;
|
|
100
|
+
subflowCapture?: SubflowCapturePort;
|
|
99
101
|
/** The record sink, resolved and checked at construction (10.1, P6). */
|
|
100
102
|
sink?: ResolvedRecordSink;
|
|
101
103
|
captureCoverage?: boolean;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* snapshot — what `FlowChartExecutor.getSnapshot()` serves (F9).
|
|
3
|
-
*
|
|
4
|
-
* The traverser's runtime snapshot, plus what only the executor knows: the
|
|
5
|
-
* served subflow results (each subflow's own mirror under `redact: true`), one
|
|
6
|
-
* recorder row per recorder id, and the deferred tier's accounting.
|
|
7
|
-
*/
|
|
8
1
|
import type { FlowRecorder } from '../engine/narrative/types.js';
|
|
9
2
|
import type { FlowchartTraverser } from '../engine/traversal/FlowchartTraverser.js';
|
|
10
3
|
import type { ScopeRecorder } from '../scope/types.js';
|
|
@@ -70,3 +70,5 @@ export declare function registerNativeRunTarget(target: object, context: object)
|
|
|
70
70
|
export declare function hasNativeCaptureTarget(target: object, context: object): boolean;
|
|
71
71
|
/** @internal Resolve only explicit scope/native registrations; never inspect a user proxy. */
|
|
72
72
|
export declare function scopeRunFrame(scope: unknown): RunFrame | undefined;
|
|
73
|
+
/** @internal Native run target ownership, independent of optional recording dials. */
|
|
74
|
+
export declare function hasNativeRunTarget(target: object, context: object): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Configure only input/fanout booleans as own plain data; no user callbacks or accessors are accepted. */
|
|
2
|
+
export declare function subflowCapture(options?: {
|
|
3
|
+
readonly input?: boolean;
|
|
4
|
+
readonly fanout?: boolean;
|
|
5
|
+
}): Readonly<{
|
|
6
|
+
captureInputHandoff: boolean;
|
|
7
|
+
captureFanoutHandoff: boolean;
|
|
8
|
+
subflowCapture: object;
|
|
9
|
+
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "footprintjs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"description": "TypeScript workflow engine that records each run's stages, state changes and decision evidence, so AI agents and people can explain and debug what happened.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sanjay Krishna Anbalagan",
|
|
@@ -157,7 +157,17 @@
|
|
|
157
157
|
"default": "./dist/zod.js"
|
|
158
158
|
}
|
|
159
159
|
},
|
|
160
|
-
"./package.json": "./package.json"
|
|
160
|
+
"./package.json": "./package.json",
|
|
161
|
+
"./subflow-capture": {
|
|
162
|
+
"import": {
|
|
163
|
+
"types": "./dist/esm/subflow-capture.d.ts",
|
|
164
|
+
"default": "./dist/esm/subflow-capture.js"
|
|
165
|
+
},
|
|
166
|
+
"require": {
|
|
167
|
+
"types": "./dist/types/subflow-capture.d.ts",
|
|
168
|
+
"default": "./dist/subflow-capture.js"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
161
171
|
},
|
|
162
172
|
"typesVersions": {
|
|
163
173
|
"*": {
|
|
@@ -178,6 +188,9 @@
|
|
|
178
188
|
],
|
|
179
189
|
"zod": [
|
|
180
190
|
"./dist/types/zod.d.ts"
|
|
191
|
+
],
|
|
192
|
+
"subflow-capture": [
|
|
193
|
+
"./dist/types/subflow-capture.d.ts"
|
|
181
194
|
]
|
|
182
195
|
}
|
|
183
196
|
},
|
|
@@ -189,7 +202,7 @@
|
|
|
189
202
|
},
|
|
190
203
|
"sideEffects": false,
|
|
191
204
|
"peerDependencies": {
|
|
192
|
-
"foottrace": "^2.
|
|
205
|
+
"foottrace": "^2.1.0",
|
|
193
206
|
"zod": "^3.0.0 || ^4.0.0"
|
|
194
207
|
},
|
|
195
208
|
"peerDependenciesMeta": {
|
|
@@ -214,7 +227,7 @@
|
|
|
214
227
|
"eslint-plugin-simple-import-sort": "^8.0.0",
|
|
215
228
|
"fast-check": "^4.4.0",
|
|
216
229
|
"footprintjs-baseline": "npm:footprintjs@9.28.0",
|
|
217
|
-
"foottrace": "^2.
|
|
230
|
+
"foottrace": "^2.1.0",
|
|
218
231
|
"husky": "^9.1.7",
|
|
219
232
|
"lint-staged": "^16.3.2",
|
|
220
233
|
"markdown-it": "^14.3.1",
|