agentfootprint 9.89.1 → 9.89.3

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 (30) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/dist/core/flowchartAsTool.js +2 -2
  3. package/dist/core/flowchartAsTool.js.map +1 -1
  4. package/dist/core/runbook/recording.js +5 -4
  5. package/dist/core/runbook/recording.js.map +1 -1
  6. package/dist/core/runbook/runbookAsTool.js +2 -2
  7. package/dist/core/runbook/runbookAsTool.js.map +1 -1
  8. package/dist/core/servableSnapshot.js +35 -82
  9. package/dist/core/servableSnapshot.js.map +1 -1
  10. package/dist/esm/core/flowchartAsTool.d.ts +33 -17
  11. package/dist/esm/core/flowchartAsTool.js +2 -2
  12. package/dist/esm/core/flowchartAsTool.js.map +1 -1
  13. package/dist/esm/core/runbook/recording.d.ts +5 -4
  14. package/dist/esm/core/runbook/recording.js +5 -4
  15. package/dist/esm/core/runbook/recording.js.map +1 -1
  16. package/dist/esm/core/runbook/runbookAsTool.js +2 -2
  17. package/dist/esm/core/runbook/runbookAsTool.js.map +1 -1
  18. package/dist/esm/core/runbook/types.d.ts +16 -8
  19. package/dist/esm/core/servableSnapshot.d.ts +34 -42
  20. package/dist/esm/core/servableSnapshot.js +35 -82
  21. package/dist/esm/core/servableSnapshot.js.map +1 -1
  22. package/dist/types/core/flowchartAsTool.d.ts +33 -17
  23. package/dist/types/core/flowchartAsTool.d.ts.map +1 -1
  24. package/dist/types/core/runbook/recording.d.ts +5 -4
  25. package/dist/types/core/runbook/recording.d.ts.map +1 -1
  26. package/dist/types/core/runbook/types.d.ts +16 -8
  27. package/dist/types/core/runbook/types.d.ts.map +1 -1
  28. package/dist/types/core/servableSnapshot.d.ts +34 -42
  29. package/dist/types/core/servableSnapshot.d.ts.map +1 -1
  30. package/package.json +3 -3
@@ -13,52 +13,44 @@
13
13
  *
14
14
  * THE DEFECT THIS CLOSES (9.89.1; entry 6 of
15
15
  * docs/design/2026-09-recorded-not-built.md). footprintjs scrubs at COMMIT
16
- * time: a policy-redacted key never
17
- * enters the commit log. But the live state view is not a commit — it is the
18
- * run's own heap — and its scrubbed twin, the *redacted mirror*, is served
19
- * only by `getSnapshot({ redact: true })`. Both tools called `getSnapshot()`
20
- * bare, so the string the model read and the kept record's `sharedState`
21
- * carried the plaintext while the log beside them said `REDACTED`. Two
22
- * mechanisms, each correct, never composed.
16
+ * time: a policy-redacted key never enters the commit log. But the live state
17
+ * view is not a commit — it is the run's own heap — and its scrubbed twin, the
18
+ * *redacted mirror*, is served only by `getSnapshot({ redact: true })`. Both
19
+ * tools called `getSnapshot()` bare, so the string the model read and the kept
20
+ * record's `sharedState` carried the plaintext while the log beside them said
21
+ * `REDACTED`. Two mechanisms, each correct, never composed.
23
22
  *
24
23
  * THE RULE. With a policy set, the served snapshot is footprintjs's redacted
25
- * view, plus one thing that view leaves raw: a subflow's final state.
26
- * `subflowResults[*].treeContext.globalContext` is the subflow's own isolated
27
- * heap (footprintjs `SubflowExecutor` builds the result from the nested
28
- * runtime's `sharedState`, and only the RUN-level runtime keeps a mirror). Its
29
- * `history`, though, is that subflow's commit log — scrubbed at write time
30
- * like the run's — so the served state is the FOLD of that history, through
31
- * footprintjs's own `stateAt`. That is the same construction the run-level
32
- * mirror is (apply the scrubbed patches in order), done at serve time for the
33
- * level footprintjs does not mirror. The subflow's fold base is dropped by the
34
- * same law footprintjs applies to the run's (`ExecutionRuntime.getSnapshot`:
35
- * the base never passed a policy, so it is omitted rather than served) — in
36
- * footprintjs 9.18 a subflow runtime is created bare, so that base is `{}`
37
- * and nothing is lost; the omission is there for the day it is not.
24
+ * view, exactly the object `getSnapshot({ redact: true })` returns — not a
25
+ * copy, not a second scrub. Without a policy it is `executor.getSnapshot()`,
26
+ * byte for byte: no mirror, the fold bases present, exactly the path both
27
+ * tools had.
38
28
  *
39
- * Without a policy this is `executor.getSnapshot()`, byte for byte: no
40
- * mirror, no fold, the fold bases present, exactly the path both tools had.
29
+ * WHAT IT NO LONGER HAS TO DO (9.89.3). Through footprintjs 9.19.x the
30
+ * redacted view left ONE surface raw: a subflow's final state
31
+ * (`subflowResults[*].treeContext.globalContext`, and its per-iteration `#n`
32
+ * twin) was the subflow's own isolated heap, because only the run-level
33
+ * runtime kept a mirror. So this function refolded each subflow's scrubbed
34
+ * `history` through footprintjs's `stateAt` before serving — the mirror's own
35
+ * construction, done at serve time, one level down. footprintjs 9.20.0 closed
36
+ * that limit at the root: a subflow keeps its own mirror whenever the run
37
+ * does, and the served state IS that mirror (equal to the fold over its
38
+ * scrubbed history; `engine/handlers/servedSubflowResults.ts` substitutes it
39
+ * once per mount, so the path key and the `#n` twin still name ONE object).
40
+ * A refold kept here would be a SECOND owner of the same rule — two owners
41
+ * drift — so it is gone. `test/core/flowchartAsTool.redact.test.ts` §7 pins
42
+ * both halves: the substrate's own redacted view holds the placeholder (red
43
+ * on 9.19.x), and this function serves that very object.
41
44
  *
42
- * WHAT IT CANNOT DO. A served view is as clean as the log it is built from,
43
- * and footprintjs 9.18.0 leaves the plaintext in the RECORD in these places —
44
- * each pinned in `test/core/flowchartAsTool.redact.test.ts` so this list
45
- * goes stale loudly:
46
- * - `fields` (dot-path) redaction scrubs the value handed to RECORDERS only;
47
- * the commit takes the key-level verdict (`ScopeFacade.setValue`).
48
- * - A subflow's `outputMapper` writes back through `StageContext` directly,
49
- * not the facade, so the PARENT log takes a policy-redacted key verbatim
50
- * (`SubflowInputMapper.applyOutputMapping`).
51
- * - An `inputMapper` seed is committed by the subflow's runtime, not a
52
- * facade, so it is the subflow's `history[0]` unscrubbed
53
- * (`SubflowInputMapper.seedSubflowGlobalStore`) — and the same seed is
54
- * narrated as an `Input:` line with its `rawValue` before any policy sees
55
- * it (`SubflowExecutor` · narrativeInput = mappedInput).
56
- * - A stage that READS a redacted key clones the plaintext into its tracked
57
- * reads (`StageContext.getValue`), served as `executionTree.*.stageReads`;
58
- * read-tracking retention is not one of the substrate's redaction points.
59
- * The resume checkpoint (`err.checkpoint` on a paused run) is also not a
60
- * served view: resumption must replay against real values, and it is handed
61
- * to the agent loop, never to a model.
45
+ * WHAT IT CANNOT DO. The resume checkpoint (`err.checkpoint` on a paused run)
46
+ * is not a served view: resumption must replay against real values, and it is
47
+ * handed to the agent loop, never to a model. And the redacted view OMITS the
48
+ * run's `initialState` (footprintjs `ExecutionRuntime.getSnapshot`: the raw
49
+ * pre-run seed never passed a policy, so it is dropped rather than served), so
50
+ * a fold of a kept record reports `basis: 'log-only'`; a subflow's
51
+ * `treeContext.initialState` travels as footprintjs serves it (9.20.0 keeps
52
+ * it — the nested runtime's base BEFORE its seed, which is a commit of its
53
+ * own, `history[0]`).
62
54
  */
63
55
  import type { FlowChartExecutor, RedactionPolicy, RuntimeSnapshot } from 'footprintjs';
64
56
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"servableSnapshot.d.ts","sourceRoot":"","sources":["../../../src/core/servableSnapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAcvF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,iBAAiB,EAC3B,MAAM,EAAE,eAAe,GAAG,SAAS,GAClC,eAAe,CAKjB"}
1
+ {"version":3,"file":"servableSnapshot.d.ts","sourceRoot":"","sources":["../../../src/core/servableSnapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEvF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,iBAAiB,EAC3B,MAAM,EAAE,eAAe,GAAG,SAAS,GAClC,eAAe,CAEjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentfootprint",
3
- "version": "9.89.1",
3
+ "version": "9.89.3",
4
4
  "description": "The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -326,7 +326,7 @@
326
326
  "@modelcontextprotocol/sdk": "*",
327
327
  "@opentelemetry/api": "*",
328
328
  "@yarflam/potion-base-8m": "*",
329
- "footprintjs": "^9.18.0",
329
+ "footprintjs": "^9.20.0",
330
330
  "google-auth-library": "*",
331
331
  "ioredis": "*",
332
332
  "jose": "*",
@@ -423,7 +423,7 @@
423
423
  "esbuild": "^0.28.0",
424
424
  "eslint": "^8.44.0",
425
425
  "eslint-config-prettier": "^6.15.0",
426
- "footprintjs": "^9.18.0",
426
+ "footprintjs": "^9.20.0",
427
427
  "google-auth-library": "^11.0.1",
428
428
  "jose": "^6.2.7",
429
429
  "openai": "^7.4.0",