footprintjs 9.46.0 → 9.46.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 (56) hide show
  1. package/CLAUDE.md +6 -6
  2. package/dist/esm/lib/decide/evaluator.js +2 -2
  3. package/dist/esm/lib/decide/evidence.js +2 -2
  4. package/dist/esm/lib/engine/handlers/servedPause.js +2 -2
  5. package/dist/esm/lib/memory/RecordFrame.d.ts +41 -6
  6. package/dist/esm/lib/memory/RecordFrame.js +36 -5
  7. package/dist/esm/lib/memory/SharedMemory.d.ts +1 -1
  8. package/dist/esm/lib/memory/SharedMemory.js +2 -2
  9. package/dist/esm/lib/memory/StageContext.d.ts +21 -14
  10. package/dist/esm/lib/memory/StageContext.js +36 -74
  11. package/dist/esm/lib/memory/borrowedMutation.d.ts +1 -1
  12. package/dist/esm/lib/memory/borrowedMutation.js +2 -2
  13. package/dist/esm/lib/memory/honesty.d.ts +4 -3
  14. package/dist/esm/lib/memory/honesty.js +5 -4
  15. package/dist/esm/lib/memory/index.d.ts +4 -2
  16. package/dist/esm/lib/memory/index.js +6 -4
  17. package/dist/esm/lib/memory/placeholders.d.ts +23 -28
  18. package/dist/esm/lib/memory/placeholders.js +24 -29
  19. package/dist/esm/lib/memory/recordCommit.d.ts +5 -3
  20. package/dist/esm/lib/memory/recordCommit.js +7 -5
  21. package/dist/esm/lib/memory/redaction.d.ts +78 -40
  22. package/dist/esm/lib/memory/redaction.js +130 -64
  23. package/dist/esm/lib/memory/runAddress.d.ts +20 -0
  24. package/dist/esm/lib/memory/runAddress.js +25 -0
  25. package/dist/esm/lib/memory/scrub.d.ts +51 -0
  26. package/dist/esm/lib/memory/scrub.js +72 -0
  27. package/dist/esm/lib/memory/utils.d.ts +3 -3
  28. package/dist/esm/lib/memory/utils.js +4 -4
  29. package/dist/lib/decide/evaluator.js +3 -3
  30. package/dist/lib/decide/evidence.js +3 -3
  31. package/dist/lib/engine/handlers/servedPause.js +3 -3
  32. package/dist/lib/memory/RecordFrame.js +36 -5
  33. package/dist/lib/memory/SharedMemory.js +2 -2
  34. package/dist/lib/memory/StageContext.js +42 -80
  35. package/dist/lib/memory/borrowedMutation.js +2 -2
  36. package/dist/lib/memory/honesty.js +5 -4
  37. package/dist/lib/memory/index.js +6 -4
  38. package/dist/lib/memory/placeholders.js +25 -30
  39. package/dist/lib/memory/recordCommit.js +9 -7
  40. package/dist/lib/memory/redaction.js +144 -75
  41. package/dist/lib/memory/runAddress.js +29 -0
  42. package/dist/lib/memory/scrub.js +77 -0
  43. package/dist/lib/memory/utils.js +4 -4
  44. package/dist/types/lib/memory/RecordFrame.d.ts +41 -6
  45. package/dist/types/lib/memory/SharedMemory.d.ts +1 -1
  46. package/dist/types/lib/memory/StageContext.d.ts +21 -14
  47. package/dist/types/lib/memory/borrowedMutation.d.ts +1 -1
  48. package/dist/types/lib/memory/honesty.d.ts +4 -3
  49. package/dist/types/lib/memory/index.d.ts +4 -2
  50. package/dist/types/lib/memory/placeholders.d.ts +23 -28
  51. package/dist/types/lib/memory/recordCommit.d.ts +5 -3
  52. package/dist/types/lib/memory/redaction.d.ts +78 -40
  53. package/dist/types/lib/memory/runAddress.d.ts +20 -0
  54. package/dist/types/lib/memory/scrub.d.ts +51 -0
  55. package/dist/types/lib/memory/utils.d.ts +3 -3
  56. package/package.json +1 -1
@@ -3,10 +3,12 @@
3
3
  *
4
4
  * Like a stack frame in a compiler/runtime:
5
5
  * - A RecordFrame — the record half (C3): the heap, the address, the
6
- * first-touch base, the lazy transaction buffer, the readKeys list
6
+ * first-touch base, the lazy transaction buffer and every write's scrub
7
+ * (C4), the readKeys list
7
8
  * - Links to parent/child/next contexts (call stack frames)
8
9
  * - What belongs to a stage inside a run: retention of reads and writes, the
9
- * redaction verdict per write, the dev-mode warnings, the commit observer
10
+ * redaction decision per write (`redaction.ts · decideWrite`) and where the
11
+ * frame writes (`runAddress.ts`), the dev-mode warnings, the commit observer
10
12
  * - DiagnosticCollector for logs, errors, metrics
11
13
  */
12
14
  import { type DiagnosticChannel, DiagnosticCollector } from './DiagnosticCollector.js';
@@ -206,10 +208,10 @@ export declare class StageContext {
206
208
  * and stores nothing under `'off'` (entry skipped entirely — nothing to
207
209
  * leak). A field-level verdict scrubs a clone BEFORE the dial sees it, so
208
210
  * a summary preview can never show the secret either. The verdict is the
209
- * one `stageWrite` asked the rule for BEFORE staging, carried to commit
210
- * with the value. The staged write itself is unaffected — redaction of
211
- * the committed payload is handled by the transaction buffer's
212
- * `redactedPaths`.
211
+ * one `stageWrite` decided BEFORE staging, carried to commit with the
212
+ * value. The staged write itself is unaffected — redaction of the
213
+ * committed payload is the record frame's scrub of that write
214
+ * (`RecordFrame · write`, then `scrub.ts` at commit).
213
215
  */
214
216
  private trackWrite;
215
217
  /**
@@ -243,14 +245,19 @@ export declare class StageContext {
243
245
  /**
244
246
  * THE ONE FUNNEL every staged write passes through — facade writes AND
245
247
  * the paths that bypass the facade (subflow seed, `outputMapper`
246
- * merge-back, resume re-seed). The ONE decision is made here: an explicit
247
- * per-call flag makes the value secret outright (and marks the key for the
248
- * rest of the run, the declare-once contract); otherwise the installed
249
- * rule decides from the user-level path. It stages the write, registers
250
- * the redacted paths the commit log and mirror will scrub (whole key, or
251
- * the fields inside the value), and keeps the run's marked-keys set in
252
- * step (a whole verdict marks its key; a delete clears the mark). Returns
253
- * the verdict so the caller retains and reports under the same decision.
248
+ * merge-back, resume re-seed). Two owners (C4): the run's rule DECIDES,
249
+ * the record frame WRITES the verdict's bytes, in four steps
250
+ * (`redaction.ts`, "The write decision"):
251
+ * 1. the verdict — `decideWrite`, under the rule active as the write begins;
252
+ * 2. identity inheritance — `inheritByIdentity`, against this frame's
253
+ * selected reads as they stand after step 1;
254
+ * 3. the bytes — `RecordFrame · write`, the op and its scrub (the whole
255
+ * value, or the fields inside it);
256
+ * 4. the marks — `markStagedWrite`, only once the write staged, so a
257
+ * write that fails to stage marks nothing.
258
+ * Each step reads the rule (and the selected reads) when it acts, as this
259
+ * funnel always did. Returns the verdict so the caller retains and reports
260
+ * under the same decision.
254
261
  */
255
262
  private stageWrite;
256
263
  /**