audrey 1.0.2 → 1.1.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.
Files changed (183) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +303 -429
  3. package/SECURITY.md +3 -3
  4. package/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +3 -3
  5. package/benchmarks/output/external/guardbench-external-dry-run.json +1 -1
  6. package/benchmarks/output/external/guardbench-external-evidence.json +1 -1
  7. package/benchmarks/output/guardbench-conformance-card.json +11 -11
  8. package/benchmarks/output/guardbench-raw.json +105 -104
  9. package/benchmarks/output/guardbench-summary.json +169 -167
  10. package/benchmarks/output/leaderboard/guardbench-leaderboard.json +5 -5
  11. package/benchmarks/output/leaderboard/guardbench-leaderboard.md +2 -2
  12. package/benchmarks/output/submission-bundle/guardbench-conformance-card.json +11 -11
  13. package/benchmarks/output/submission-bundle/guardbench-raw.json +105 -104
  14. package/benchmarks/output/submission-bundle/guardbench-summary.json +169 -167
  15. package/benchmarks/output/submission-bundle/submission-manifest.json +11 -11
  16. package/benchmarks/output/submission-bundle/validation-report.json +1 -1
  17. package/benchmarks/output/summary.json +58 -58
  18. package/benchmarks/public-paths.mjs +14 -1
  19. package/dist/mcp-server/config.d.ts +4 -1
  20. package/dist/mcp-server/config.d.ts.map +1 -1
  21. package/dist/mcp-server/config.js +47 -7
  22. package/dist/mcp-server/config.js.map +1 -1
  23. package/dist/mcp-server/hooks.d.ts +41 -0
  24. package/dist/mcp-server/hooks.d.ts.map +1 -0
  25. package/dist/mcp-server/hooks.js +313 -0
  26. package/dist/mcp-server/hooks.js.map +1 -0
  27. package/dist/mcp-server/index.d.ts +8 -354
  28. package/dist/mcp-server/index.d.ts.map +1 -1
  29. package/dist/mcp-server/index.js +593 -565
  30. package/dist/mcp-server/index.js.map +1 -1
  31. package/dist/mcp-server/tool-schemas.d.ts +341 -0
  32. package/dist/mcp-server/tool-schemas.d.ts.map +1 -0
  33. package/dist/mcp-server/tool-schemas.js +248 -0
  34. package/dist/mcp-server/tool-schemas.js.map +1 -0
  35. package/dist/mcp-server/tool-validation.d.ts +17 -0
  36. package/dist/mcp-server/tool-validation.d.ts.map +1 -0
  37. package/dist/mcp-server/tool-validation.js +41 -0
  38. package/dist/mcp-server/tool-validation.js.map +1 -0
  39. package/dist/src/action-key.d.ts +1 -0
  40. package/dist/src/action-key.d.ts.map +1 -1
  41. package/dist/src/action-key.js +11 -13
  42. package/dist/src/action-key.js.map +1 -1
  43. package/dist/src/affect.d.ts +1 -0
  44. package/dist/src/affect.d.ts.map +1 -1
  45. package/dist/src/affect.js +9 -4
  46. package/dist/src/affect.js.map +1 -1
  47. package/dist/src/audrey.d.ts +11 -3
  48. package/dist/src/audrey.d.ts.map +1 -1
  49. package/dist/src/audrey.js +59 -25
  50. package/dist/src/audrey.js.map +1 -1
  51. package/dist/src/autopilot.d.ts +32 -0
  52. package/dist/src/autopilot.d.ts.map +1 -0
  53. package/dist/src/autopilot.js +997 -0
  54. package/dist/src/autopilot.js.map +1 -0
  55. package/dist/src/capsule.d.ts +2 -0
  56. package/dist/src/capsule.d.ts.map +1 -1
  57. package/dist/src/capsule.js +27 -12
  58. package/dist/src/capsule.js.map +1 -1
  59. package/dist/src/consolidate.d.ts +1 -1
  60. package/dist/src/consolidate.d.ts.map +1 -1
  61. package/dist/src/consolidate.js +14 -8
  62. package/dist/src/consolidate.js.map +1 -1
  63. package/dist/src/controller.d.ts +2 -0
  64. package/dist/src/controller.d.ts.map +1 -1
  65. package/dist/src/controller.js +18 -11
  66. package/dist/src/controller.js.map +1 -1
  67. package/dist/src/db.d.ts.map +1 -1
  68. package/dist/src/db.js +121 -33
  69. package/dist/src/db.js.map +1 -1
  70. package/dist/src/decay.d.ts +2 -1
  71. package/dist/src/decay.d.ts.map +1 -1
  72. package/dist/src/decay.js +14 -10
  73. package/dist/src/decay.js.map +1 -1
  74. package/dist/src/embedding.d.ts.map +1 -1
  75. package/dist/src/embedding.js.map +1 -1
  76. package/dist/src/encode.d.ts.map +1 -1
  77. package/dist/src/encode.js +4 -2
  78. package/dist/src/encode.js.map +1 -1
  79. package/dist/src/events.d.ts +2 -0
  80. package/dist/src/events.d.ts.map +1 -1
  81. package/dist/src/events.js +15 -1
  82. package/dist/src/events.js.map +1 -1
  83. package/dist/src/feedback.d.ts +1 -0
  84. package/dist/src/feedback.d.ts.map +1 -1
  85. package/dist/src/feedback.js +13 -9
  86. package/dist/src/feedback.js.map +1 -1
  87. package/dist/src/forget.d.ts.map +1 -1
  88. package/dist/src/forget.js.map +1 -1
  89. package/dist/src/impact.d.ts +1 -1
  90. package/dist/src/impact.d.ts.map +1 -1
  91. package/dist/src/impact.js +40 -30
  92. package/dist/src/impact.js.map +1 -1
  93. package/dist/src/import.d.ts.map +1 -1
  94. package/dist/src/import.js +13 -9
  95. package/dist/src/import.js.map +1 -1
  96. package/dist/src/index.d.ts +2 -0
  97. package/dist/src/index.d.ts.map +1 -1
  98. package/dist/src/index.js +1 -0
  99. package/dist/src/index.js.map +1 -1
  100. package/dist/src/interference.d.ts +2 -1
  101. package/dist/src/interference.d.ts.map +1 -1
  102. package/dist/src/interference.js +44 -17
  103. package/dist/src/interference.js.map +1 -1
  104. package/dist/src/llm.d.ts.map +1 -1
  105. package/dist/src/llm.js +12 -1
  106. package/dist/src/llm.js.map +1 -1
  107. package/dist/src/migrate.d.ts.map +1 -1
  108. package/dist/src/migrate.js +9 -9
  109. package/dist/src/migrate.js.map +1 -1
  110. package/dist/src/preflight.d.ts +2 -0
  111. package/dist/src/preflight.d.ts.map +1 -1
  112. package/dist/src/preflight.js +29 -12
  113. package/dist/src/preflight.js.map +1 -1
  114. package/dist/src/promote.d.ts +1 -0
  115. package/dist/src/promote.d.ts.map +1 -1
  116. package/dist/src/promote.js +12 -8
  117. package/dist/src/promote.js.map +1 -1
  118. package/dist/src/recall.d.ts.map +1 -1
  119. package/dist/src/recall.js +152 -100
  120. package/dist/src/recall.js.map +1 -1
  121. package/dist/src/reflexes.d.ts.map +1 -1
  122. package/dist/src/reflexes.js.map +1 -1
  123. package/dist/src/rollback.d.ts.map +1 -1
  124. package/dist/src/rollback.js.map +1 -1
  125. package/dist/src/routes.d.ts +1 -0
  126. package/dist/src/routes.d.ts.map +1 -1
  127. package/dist/src/routes.js +73 -20
  128. package/dist/src/routes.js.map +1 -1
  129. package/dist/src/server.d.ts +1 -0
  130. package/dist/src/server.d.ts.map +1 -1
  131. package/dist/src/server.js +2 -2
  132. package/dist/src/server.js.map +1 -1
  133. package/dist/src/types.d.ts +1 -0
  134. package/dist/src/types.d.ts.map +1 -1
  135. package/dist/src/utils.d.ts +2 -0
  136. package/dist/src/utils.d.ts.map +1 -1
  137. package/dist/src/utils.js +18 -0
  138. package/dist/src/utils.js.map +1 -1
  139. package/dist/src/validate.d.ts +1 -0
  140. package/dist/src/validate.d.ts.map +1 -1
  141. package/dist/src/validate.js +19 -10
  142. package/dist/src/validate.js.map +1 -1
  143. package/docs/AUDREY_PAPER_OUTLINE.md +6 -3
  144. package/docs/PRODUCTION_BACKLOG.md +47 -30
  145. package/docs/paper/06-implementation.md +5 -3
  146. package/docs/paper/07-evaluation.md +5 -5
  147. package/docs/paper/08-discussion-limitations.md +1 -1
  148. package/docs/paper/audrey-paper-v1.md +11 -9
  149. package/docs/paper/evidence-ledger.md +8 -8
  150. package/docs/paper/output/arxiv/arxiv-manifest.json +4 -4
  151. package/docs/paper/output/arxiv/main.tex +11 -9
  152. package/docs/paper/output/arxiv-compile-report.json +3 -3
  153. package/docs/paper/output/submission-bundle/README.md +303 -429
  154. package/docs/paper/output/submission-bundle/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +3 -3
  155. package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-dry-run.json +1 -1
  156. package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-evidence.json +1 -1
  157. package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-conformance-card.json +11 -11
  158. package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-raw.json +105 -104
  159. package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-summary.json +169 -167
  160. package/docs/paper/output/submission-bundle/benchmarks/output/leaderboard/guardbench-leaderboard.json +5 -5
  161. package/docs/paper/output/submission-bundle/benchmarks/output/leaderboard/guardbench-leaderboard.md +2 -2
  162. package/docs/paper/output/submission-bundle/benchmarks/output/submission-bundle/submission-manifest.json +11 -11
  163. package/docs/paper/output/submission-bundle/benchmarks/output/submission-bundle/validation-report.json +1 -1
  164. package/docs/paper/output/submission-bundle/benchmarks/output/summary.json +45 -45
  165. package/docs/paper/output/submission-bundle/docs/AUDREY_PAPER_OUTLINE.md +6 -3
  166. package/docs/paper/output/submission-bundle/docs/paper/06-implementation.md +5 -3
  167. package/docs/paper/output/submission-bundle/docs/paper/07-evaluation.md +5 -5
  168. package/docs/paper/output/submission-bundle/docs/paper/08-discussion-limitations.md +1 -1
  169. package/docs/paper/output/submission-bundle/docs/paper/audrey-paper-v1.md +11 -9
  170. package/docs/paper/output/submission-bundle/docs/paper/evidence-ledger.md +8 -8
  171. package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/arxiv-manifest.json +4 -4
  172. package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/main.tex +11 -9
  173. package/docs/paper/output/submission-bundle/docs/paper/output/arxiv-compile-report.json +3 -3
  174. package/docs/paper/output/submission-bundle/package.json +5 -2
  175. package/docs/paper/output/submission-bundle/paper-submission-manifest.json +41 -41
  176. package/package.json +5 -2
  177. package/scripts/audit-release-completion.mjs +8 -8
  178. package/scripts/finalize-release.mjs +1 -1
  179. package/scripts/prepare-release-cut.mjs +1 -1
  180. package/scripts/publish-release-bundle.mjs +8 -4
  181. package/scripts/publish-release-github-api.mjs +1 -1
  182. package/scripts/sync-paper-artifacts.mjs +4 -5
  183. package/scripts/verify-release-readiness.mjs +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
3
  "suite": "GuardBench leaderboard",
4
- "generatedAt": "2026-05-29T03:45:37.292Z",
4
+ "generatedAt": "2026-07-10T15:00:42.478Z",
5
5
  "ranking": [
6
6
  "verified bundle",
7
7
  "adapter conformance",
@@ -28,9 +28,9 @@
28
28
  "evidenceRecall": 1,
29
29
  "redactionLeaks": 0,
30
30
  "latency": {
31
- "p50Ms": 2.916,
32
- "p95Ms": 21.17,
33
- "maxMs": 21.17
31
+ "p50Ms": 3.501,
32
+ "p95Ms": 20.658,
33
+ "maxMs": 20.658
34
34
  }
35
35
  },
36
36
  "conformance": {
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "source": {
43
43
  "dir": "benchmarks/output/submission-bundle",
44
- "manifestGeneratedAt": "2026-05-29T03:45:36.970Z",
44
+ "manifestGeneratedAt": "2026-07-10T15:00:42.148Z",
45
45
  "fileCount": 17
46
46
  },
47
47
  "verification": {
@@ -1,7 +1,7 @@
1
1
  # GuardBench Leaderboard
2
2
 
3
- Generated: 2026-05-29T03:45:37.292Z
3
+ Generated: 2026-07-10T15:00:42.478Z
4
4
 
5
5
  | Rank | Subject | Verified | Conformant | Full Contract | Decision Accuracy | Evidence Recall | Redaction Leaks | p95 Latency | Bundle |
6
6
  |---:|---|---:|---:|---:|---:|---:|---:|---:|---|
7
- | 1 | Audrey Guard | yes | yes | 100.0% | 100.0% | 100.0% | 0 | 21.17ms | benchmarks/output/submission-bundle |
7
+ | 1 | Audrey Guard | yes | yes | 100.0% | 100.0% | 100.0% | 0 | 20.658ms | benchmarks/output/submission-bundle |
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
3
  "suite": "GuardBench submission bundle",
4
- "generatedAt": "2026-05-29T03:45:36.970Z",
4
+ "generatedAt": "2026-07-10T15:00:42.148Z",
5
5
  "sourceDir": "benchmarks/output",
6
6
  "subject": {
7
7
  "name": "Audrey Guard",
@@ -16,9 +16,9 @@
16
16
  "evidenceRecall": 1,
17
17
  "redactionLeaks": 0,
18
18
  "latency": {
19
- "p50Ms": 2.916,
20
- "p95Ms": 21.17,
21
- "maxMs": 21.17
19
+ "p50Ms": 3.501,
20
+ "p95Ms": 20.658,
21
+ "maxMs": 20.658
22
22
  }
23
23
  },
24
24
  "conformance": {
@@ -44,8 +44,8 @@
44
44
  "files": [
45
45
  {
46
46
  "path": "guardbench-conformance-card.json",
47
- "bytes": 1733,
48
- "sha256": "a32ce0a46b2f031e827caa0896fdd6a870acf92f6bccb481ca661a3ea4b74a79"
47
+ "bytes": 1735,
48
+ "sha256": "f7e755fdc52216dbe387f28b3acdd6068b51b908db0cabde455b6d793b62ed43"
49
49
  },
50
50
  {
51
51
  "path": "guardbench-manifest.json",
@@ -54,13 +54,13 @@
54
54
  },
55
55
  {
56
56
  "path": "guardbench-raw.json",
57
- "bytes": 43407,
58
- "sha256": "15b39fd1a65709a89455fbfcaf815daf364b204fa526d5065cc12fcaed281d28"
57
+ "bytes": 43454,
58
+ "sha256": "1888c8524d54f10bb403ef09b923cec63376518bf6d202ef271ba895811d37d8"
59
59
  },
60
60
  {
61
61
  "path": "guardbench-summary.json",
62
- "bytes": 69260,
63
- "sha256": "e8669cd6c80dc3dc849b3c4fcc473ea706eb3a760bced69682d0dc2396b2e233"
62
+ "bytes": 69347,
63
+ "sha256": "88cd54e091e5aa89e7ef873a2e440430b3c35eb3f4664d963a56d197cc3691e9"
64
64
  },
65
65
  {
66
66
  "path": "schemas/guardbench-adapter-registry.schema.json",
@@ -125,7 +125,7 @@
125
125
  {
126
126
  "path": "validation-report.json",
127
127
  "bytes": 739,
128
- "sha256": "6f6c385d8db108b1a5e30de389a1131bece70ccb18c552a5f005f7dbe377d695"
128
+ "sha256": "9db6530947c3f88de484235f44eaa47e7aca98dee8d3603ea0daf067d28a98d3"
129
129
  }
130
130
  ]
131
131
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-05-29T03:45:36.970Z",
2
+ "generatedAt": "2026-07-10T15:00:42.148Z",
3
3
  "sourceValidation": {
4
4
  "ok": true,
5
5
  "dir": "benchmarks/output",
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-05-29T03:45:32.997Z",
2
+ "generatedAt": "2026-07-10T15:00:37.705Z",
3
3
  "command": "node benchmarks/run.js --provider mock --dimensions 64",
4
4
  "config": {
5
5
  "provider": "mock",
@@ -23,19 +23,19 @@
23
23
  "system": "Audrey",
24
24
  "scorePercent": 100,
25
25
  "passRate": 100,
26
- "avgDurationMs": 15.416666666666666
26
+ "avgDurationMs": 16.25
27
27
  },
28
28
  {
29
29
  "system": "Vector Only",
30
30
  "scorePercent": 41.66666666666667,
31
31
  "passRate": 25,
32
- "avgDurationMs": 0.3333333333333333
32
+ "avgDurationMs": 0.25
33
33
  },
34
34
  {
35
35
  "system": "Keyword + Recency",
36
36
  "scorePercent": 41.66666666666667,
37
37
  "passRate": 25,
38
- "avgDurationMs": 0.6666666666666666
38
+ "avgDurationMs": 0.5833333333333334
39
39
  },
40
40
  {
41
41
  "system": "Recent Window",
@@ -170,19 +170,19 @@
170
170
  "system": "Audrey",
171
171
  "scorePercent": 100,
172
172
  "passRate": 100,
173
- "avgDurationMs": 15.625
173
+ "avgDurationMs": 16.375
174
174
  },
175
175
  {
176
176
  "system": "Vector Only",
177
177
  "scorePercent": 56.25,
178
178
  "passRate": 37.5,
179
- "avgDurationMs": 0.375
179
+ "avgDurationMs": 0.25
180
180
  },
181
181
  {
182
182
  "system": "Keyword + Recency",
183
183
  "scorePercent": 50,
184
184
  "passRate": 37.5,
185
- "avgDurationMs": 1
185
+ "avgDurationMs": 0.875
186
186
  },
187
187
  {
188
188
  "system": "Recent Window",
@@ -277,7 +277,7 @@
277
277
  "results": [
278
278
  {
279
279
  "system": "Audrey",
280
- "durationMs": 24,
280
+ "durationMs": 25,
281
281
  "passed": true,
282
282
  "score": 1,
283
283
  "summary": "retrieved expected evidence",
@@ -289,7 +289,7 @@
289
289
  },
290
290
  {
291
291
  "system": "Vector Only",
292
- "durationMs": 2,
292
+ "durationMs": 1,
293
293
  "passed": true,
294
294
  "score": 1,
295
295
  "summary": "retrieved expected evidence",
@@ -336,7 +336,7 @@
336
336
  "results": [
337
337
  {
338
338
  "system": "Audrey",
339
- "durationMs": 13,
339
+ "durationMs": 14,
340
340
  "passed": true,
341
341
  "score": 1,
342
342
  "summary": "retrieved expected evidence",
@@ -347,7 +347,7 @@
347
347
  },
348
348
  {
349
349
  "system": "Vector Only",
350
- "durationMs": 1,
350
+ "durationMs": 0,
351
351
  "passed": false,
352
352
  "score": 0.5,
353
353
  "summary": "retrieved expected evidence, but conflicting evidence still appeared later",
@@ -407,7 +407,7 @@
407
407
  },
408
408
  {
409
409
  "system": "Vector Only",
410
- "durationMs": 0,
410
+ "durationMs": 1,
411
411
  "passed": true,
412
412
  "score": 1,
413
413
  "summary": "retrieved expected evidence",
@@ -574,7 +574,7 @@
574
574
  "results": [
575
575
  {
576
576
  "system": "Audrey",
577
- "durationMs": 13,
577
+ "durationMs": 16,
578
578
  "passed": true,
579
579
  "score": 1,
580
580
  "summary": "retrieved expected evidence",
@@ -597,7 +597,7 @@
597
597
  },
598
598
  {
599
599
  "system": "Keyword + Recency",
600
- "durationMs": 1,
600
+ "durationMs": 0,
601
601
  "passed": false,
602
602
  "score": 0,
603
603
  "summary": "blocked content outranked the correct answer",
@@ -632,7 +632,7 @@
632
632
  "results": [
633
633
  {
634
634
  "system": "Audrey",
635
- "durationMs": 18,
635
+ "durationMs": 19,
636
636
  "passed": true,
637
637
  "score": 1,
638
638
  "summary": "retrieved expected evidence",
@@ -750,7 +750,7 @@
750
750
  "system": "Audrey",
751
751
  "scorePercent": 100,
752
752
  "passRate": 100,
753
- "avgDurationMs": 15
753
+ "avgDurationMs": 16
754
754
  },
755
755
  {
756
756
  "system": "Keyword + Recency",
@@ -821,7 +821,7 @@
821
821
  "results": [
822
822
  {
823
823
  "system": "Audrey",
824
- "durationMs": 13,
824
+ "durationMs": 14,
825
825
  "passed": true,
826
826
  "score": 1,
827
827
  "summary": "retrieved expected evidence",
@@ -832,7 +832,7 @@
832
832
  },
833
833
  {
834
834
  "system": "Vector Only",
835
- "durationMs": 1,
835
+ "durationMs": 0,
836
836
  "passed": false,
837
837
  "score": 0.5,
838
838
  "summary": "retrieved expected evidence, but conflicting evidence still appeared later",
@@ -879,7 +879,7 @@
879
879
  "results": [
880
880
  {
881
881
  "system": "Audrey",
882
- "durationMs": 14,
882
+ "durationMs": 15,
883
883
  "passed": true,
884
884
  "score": 1,
885
885
  "summary": "correct abstention",
@@ -943,7 +943,7 @@
943
943
  },
944
944
  {
945
945
  "system": "Vector Only",
946
- "durationMs": 0,
946
+ "durationMs": 1,
947
947
  "passed": false,
948
948
  "score": 0,
949
949
  "summary": "missed target evidence",
@@ -993,7 +993,7 @@
993
993
  "results": [
994
994
  {
995
995
  "system": "Audrey",
996
- "durationMs": 16,
996
+ "durationMs": 18,
997
997
  "passed": true,
998
998
  "score": 1,
999
999
  "summary": "retrieved expected evidence",
@@ -1055,7 +1055,7 @@
1055
1055
  "system": "Audrey",
1056
1056
  "scorePercent": 100,
1057
1057
  "passRate": 100,
1058
- "avgDurationMs": 14.25
1058
+ "avgDurationMs": 15.25
1059
1059
  },
1060
1060
  {
1061
1061
  "system": "Vector Only",
@@ -1118,7 +1118,7 @@
1118
1118
  "results": [
1119
1119
  {
1120
1120
  "system": "Audrey",
1121
- "durationMs": 18,
1121
+ "durationMs": 20,
1122
1122
  "passed": true,
1123
1123
  "score": 1,
1124
1124
  "summary": "matched all required signals",
@@ -1234,12 +1234,12 @@
1234
1234
  "results": [
1235
1235
  {
1236
1236
  "system": "Audrey",
1237
- "durationMs": 14,
1237
+ "durationMs": 15,
1238
1238
  "passed": true,
1239
1239
  "score": 1,
1240
1240
  "summary": "matched all required signals",
1241
1241
  "topResults": [
1242
- "guard_hardened:replay_rejected error:guard receipt already has an outcome: 01KSRXCNSKBMJ51Y9GFJ37J0NV",
1242
+ "guard_hardened:replay_rejected error:guard receipt already has an outcome: 01KX68PZ5QNVH4SM1NQ0ZEVHTW",
1243
1243
  "decision:caution verdict:caution risk:0.55 Caution: 1 memory signal, 1 medium severity found before acting.",
1244
1244
  "warning:recent_failure severity:medium npm test failed 1x recently: Vitest failed with spawn EPERM Before re-running npm test, check what changed since the last failure."
1245
1245
  ],
@@ -1292,12 +1292,12 @@
1292
1292
  "results": [
1293
1293
  {
1294
1294
  "system": "Audrey",
1295
- "durationMs": 11,
1295
+ "durationMs": 12,
1296
1296
  "passed": true,
1297
1297
  "score": 1,
1298
1298
  "summary": "matched all required signals",
1299
1299
  "topResults": [
1300
- "guard_hardened:non_guard_receipt_rejected error:not a guard receipt: 01KSRXCNT0Q2HH0MK1SSNP5V1Q",
1300
+ "guard_hardened:non_guard_receipt_rejected error:not a guard receipt: 01KX68PZ643S3MRQMYPJ2PK7B3",
1301
1301
  "decision:go verdict:clear risk:0 No relevant memory risks, prior failures, or must-follow procedures were found."
1302
1302
  ],
1303
1303
  "retrievalSummary": "guard_hardened:non_guard_receipt_rejected error:not a guard receipt: 01K | decision:go verdict:clear risk:0 No relevant memory risks, prior failure"
@@ -1352,7 +1352,7 @@
1352
1352
  "results": [
1353
1353
  {
1354
1354
  "system": "Audrey",
1355
- "durationMs": 24,
1355
+ "durationMs": 25,
1356
1356
  "passed": true,
1357
1357
  "score": 1,
1358
1358
  "summary": "retrieved expected evidence",
@@ -1364,7 +1364,7 @@
1364
1364
  },
1365
1365
  {
1366
1366
  "system": "Vector Only",
1367
- "durationMs": 2,
1367
+ "durationMs": 1,
1368
1368
  "passed": true,
1369
1369
  "score": 1,
1370
1370
  "summary": "retrieved expected evidence",
@@ -1411,7 +1411,7 @@
1411
1411
  "results": [
1412
1412
  {
1413
1413
  "system": "Audrey",
1414
- "durationMs": 13,
1414
+ "durationMs": 14,
1415
1415
  "passed": true,
1416
1416
  "score": 1,
1417
1417
  "summary": "retrieved expected evidence",
@@ -1422,7 +1422,7 @@
1422
1422
  },
1423
1423
  {
1424
1424
  "system": "Vector Only",
1425
- "durationMs": 1,
1425
+ "durationMs": 0,
1426
1426
  "passed": false,
1427
1427
  "score": 0.5,
1428
1428
  "summary": "retrieved expected evidence, but conflicting evidence still appeared later",
@@ -1482,7 +1482,7 @@
1482
1482
  },
1483
1483
  {
1484
1484
  "system": "Vector Only",
1485
- "durationMs": 0,
1485
+ "durationMs": 1,
1486
1486
  "passed": true,
1487
1487
  "score": 1,
1488
1488
  "summary": "retrieved expected evidence",
@@ -1649,7 +1649,7 @@
1649
1649
  "results": [
1650
1650
  {
1651
1651
  "system": "Audrey",
1652
- "durationMs": 13,
1652
+ "durationMs": 16,
1653
1653
  "passed": true,
1654
1654
  "score": 1,
1655
1655
  "summary": "retrieved expected evidence",
@@ -1672,7 +1672,7 @@
1672
1672
  },
1673
1673
  {
1674
1674
  "system": "Keyword + Recency",
1675
- "durationMs": 1,
1675
+ "durationMs": 0,
1676
1676
  "passed": false,
1677
1677
  "score": 0,
1678
1678
  "summary": "blocked content outranked the correct answer",
@@ -1707,7 +1707,7 @@
1707
1707
  "results": [
1708
1708
  {
1709
1709
  "system": "Audrey",
1710
- "durationMs": 18,
1710
+ "durationMs": 19,
1711
1711
  "passed": true,
1712
1712
  "score": 1,
1713
1713
  "summary": "retrieved expected evidence",
@@ -1824,7 +1824,7 @@
1824
1824
  "results": [
1825
1825
  {
1826
1826
  "system": "Audrey",
1827
- "durationMs": 13,
1827
+ "durationMs": 14,
1828
1828
  "passed": true,
1829
1829
  "score": 1,
1830
1830
  "summary": "retrieved expected evidence",
@@ -1835,7 +1835,7 @@
1835
1835
  },
1836
1836
  {
1837
1837
  "system": "Vector Only",
1838
- "durationMs": 1,
1838
+ "durationMs": 0,
1839
1839
  "passed": false,
1840
1840
  "score": 0.5,
1841
1841
  "summary": "retrieved expected evidence, but conflicting evidence still appeared later",
@@ -1882,7 +1882,7 @@
1882
1882
  "results": [
1883
1883
  {
1884
1884
  "system": "Audrey",
1885
- "durationMs": 14,
1885
+ "durationMs": 15,
1886
1886
  "passed": true,
1887
1887
  "score": 1,
1888
1888
  "summary": "correct abstention",
@@ -1946,7 +1946,7 @@
1946
1946
  },
1947
1947
  {
1948
1948
  "system": "Vector Only",
1949
- "durationMs": 0,
1949
+ "durationMs": 1,
1950
1950
  "passed": false,
1951
1951
  "score": 0,
1952
1952
  "summary": "missed target evidence",
@@ -1996,7 +1996,7 @@
1996
1996
  "results": [
1997
1997
  {
1998
1998
  "system": "Audrey",
1999
- "durationMs": 16,
1999
+ "durationMs": 18,
2000
2000
  "passed": true,
2001
2001
  "score": 1,
2002
2002
  "summary": "retrieved expected evidence",
@@ -2058,7 +2058,7 @@
2058
2058
  "results": [
2059
2059
  {
2060
2060
  "system": "Audrey",
2061
- "durationMs": 18,
2061
+ "durationMs": 20,
2062
2062
  "passed": true,
2063
2063
  "score": 1,
2064
2064
  "summary": "matched all required signals",
@@ -2174,12 +2174,12 @@
2174
2174
  "results": [
2175
2175
  {
2176
2176
  "system": "Audrey",
2177
- "durationMs": 14,
2177
+ "durationMs": 15,
2178
2178
  "passed": true,
2179
2179
  "score": 1,
2180
2180
  "summary": "matched all required signals",
2181
2181
  "topResults": [
2182
- "guard_hardened:replay_rejected error:guard receipt already has an outcome: 01KSRXCNSKBMJ51Y9GFJ37J0NV",
2182
+ "guard_hardened:replay_rejected error:guard receipt already has an outcome: 01KX68PZ5QNVH4SM1NQ0ZEVHTW",
2183
2183
  "decision:caution verdict:caution risk:0.55 Caution: 1 memory signal, 1 medium severity found before acting.",
2184
2184
  "warning:recent_failure severity:medium npm test failed 1x recently: Vitest failed with spawn EPERM Before re-running npm test, check what changed since the last failure."
2185
2185
  ],
@@ -2232,12 +2232,12 @@
2232
2232
  "results": [
2233
2233
  {
2234
2234
  "system": "Audrey",
2235
- "durationMs": 11,
2235
+ "durationMs": 12,
2236
2236
  "passed": true,
2237
2237
  "score": 1,
2238
2238
  "summary": "matched all required signals",
2239
2239
  "topResults": [
2240
- "guard_hardened:non_guard_receipt_rejected error:not a guard receipt: 01KSRXCNT0Q2HH0MK1SSNP5V1Q",
2240
+ "guard_hardened:non_guard_receipt_rejected error:not a guard receipt: 01KX68PZ643S3MRQMYPJ2PK7B3",
2241
2241
  "decision:go verdict:clear risk:0 No relevant memory risks, prior failures, or must-follow procedures were found."
2242
2242
  ],
2243
2243
  "retrievalSummary": "guard_hardened:non_guard_receipt_rejected error:not a guard receipt: 01K | decision:go verdict:clear risk:0 No relevant memory risks, prior failure"
@@ -123,8 +123,10 @@ Metrics:
123
123
  - Why tool annotations are hints, not policy guarantees.
124
124
  - What Audrey borrows from graph memory without adding a graph database to the core.
125
125
  - Limitations:
126
- - Claude Code hook config can be applied with a guarded settings merge, but
127
- equivalent Codex hook wiring still depends on a stable host hook surface.
126
+ - Audrey 1.1 applies lifecycle hooks for Claude Code and Codex, but it can
127
+ inspect only the events and tool paths emitted by each trusted host.
128
+ - Hooks start short-lived Audrey processes; a persistent local runtime and
129
+ measured host-version compatibility gates remain production work.
128
130
  - Validation lineage is bound to exact preflight event evidence, but feedback
129
131
  does not yet tune risk scoring.
130
132
  - Local comparative GuardBench numbers exist; no external-system numbers yet.
@@ -134,7 +136,7 @@ Metrics:
134
136
 
135
137
  - Agent memory should be judged by whether it changes future actions, not just whether it retrieves relevant text.
136
138
  - Audrey Guard demonstrates a practical local loop for using memory as a pre-action control layer.
137
- - The next publishable milestone is live external-adapter GuardBench output plus broader host-hook integration.
139
+ - The next publishable milestone is live external-adapter GuardBench output plus measured real-host coverage and a persistent hook runtime.
138
140
 
139
141
  ## Figures and Tables
140
142
 
@@ -168,6 +170,7 @@ Metrics:
168
170
  - MCP tool annotations and trust model: https://modelcontextprotocol.io/specification/2025-11-25/server/tools and https://modelcontextprotocol.io/specification/2025-11-25/schema
169
171
  - MCP annotation risk vocabulary: https://blog.modelcontextprotocol.io/posts/2026-03-16-tool-annotations/
170
172
  - Claude Code hooks: https://code.claude.com/docs/en/hooks
173
+ - Codex hooks: https://developers.openai.com/codex/hooks
171
174
  - Mem0 token-efficient memory algorithm: https://mem0.ai/blog/mem0-the-token-efficient-memory-algorithm
172
175
  - MemOS: https://huggingface.co/papers/2507.03724
173
176
  - MCP Security Bench: https://huggingface.co/papers/2510.15994
@@ -84,11 +84,13 @@ The JSON walker redacts sensitive keys and values recursively. If a value sits u
84
84
 
85
85
  ## MCP, CLI, and REST Surfaces
86
86
 
87
- The MCP server registers 20 tools: `memory_dream`, `memory_encode`, `memory_recall`, `memory_consolidate`, `memory_introspect`, `memory_resolve_truth`, `memory_export`, `memory_import`, `memory_forget`, `memory_validate`, `memory_decay`, `memory_status`, `memory_reflect`, `memory_greeting`, `memory_observe_tool`, `memory_recent_failures`, `memory_capsule`, `memory_preflight`, `memory_reflexes`, and `memory_promote` (Ledger: E32). The Guard-relevant MCP surface is `memory_observe_tool`, `memory_recent_failures`, `memory_capsule`, `memory_preflight`, and `memory_reflexes`, with `memory_validate` supporting closed-loop validation and REST or CLI impact reporting supporting aggregate impact inspection (Ledger: E16-E19, E32-E34).
87
+ The MCP server registers 22 tools: `memory_dream`, `memory_encode`, `memory_recall`, `memory_consolidate`, `memory_introspect`, `memory_resolve_truth`, `memory_export`, `memory_import`, `memory_forget`, `memory_validate`, `memory_decay`, `memory_status`, `memory_reflect`, `memory_greeting`, `memory_observe_tool`, `memory_recent_failures`, `memory_capsule`, `memory_preflight`, `memory_guard_before`, `memory_guard_after`, `memory_reflexes`, and `memory_promote` (Ledger: E32). The Guard-relevant MCP surface is `memory_observe_tool`, `memory_recent_failures`, `memory_capsule`, `memory_preflight`, `memory_guard_before`, `memory_guard_after`, and `memory_reflexes`, with `memory_validate` supporting closed-loop validation and REST or CLI impact reporting supporting aggregate impact inspection (Ledger: E16-E19, E32-E34).
88
88
 
89
- The CLI recognizes `install`, `uninstall`, `mcp-config`, `hook-config`, `demo`, `guard`, `reembed`, `dream`, `greeting`, `reflect`, `serve`, `status`, `doctor`, `observe-tool`, `promote`, and `impact` (Ledger: E34). The `guard` subcommand invokes the controller, prints JSON or formatted output, exits nonzero for blocking decisions unless an explicit override is supplied, and can run as a Claude Code PreToolUse hook with `--hook`. `hook-config claude-code --apply` merges the generated hook block into Claude Code settings with backup/idempotence (Ledger: E26, E43).
89
+ The CLI recognizes `install`, `uninstall`, `mcp-config`, `hook-config`, `demo`, `guard`, `guard-after`, `hook`, `reembed`, `dream`, `greeting`, `reflect`, `serve`, `status`, `doctor`, `observe-tool`, `promote`, and `impact` (Ledger: E34). The `guard` subcommand remains available for explicit checks, while the host-facing `hook` subcommand normalizes current Claude Code and Codex lifecycle payloads. `audrey install --host auto` discovers installed supported CLIs, registers the MCP server, and applies host-specific lifecycle hooks from a stable Node and Audrey entrypoint. Generated settings preserve unrelated hooks, replace older Audrey-owned handlers, write backups before changing non-empty files, and are idempotent. Claude Code supports local, project, and user hook scopes; Codex supports project and user scopes and requires one-time review of non-managed hooks through `/hooks` (Ledger: E26, E43).
90
90
 
91
- The REST sidecar exposes routes for health, encode, recall, validate, mark-used, capsule, preflight, reflexes, consolidate, dream, introspect, impact, resolve-truth, export, import, forget, decay, status, reflect, and greeting (Ledger: E33). The sidecar defaults to loopback binding, refuses non-loopback binds without `AUDREY_API_KEY` unless `AUDREY_ALLOW_NO_AUTH=1`, and emits an explicit warning when that no-auth override is used (Ledger: E35). Export, import, and forget are disabled unless `AUDREY_ENABLE_ADMIN_TOOLS=1` (Ledger: E33).
91
+ The generated lifecycle covers session start, user prompt submission, guarded pre-tool use, correlated post-tool outcomes, post-compaction, and turn stop. Session and prompt hooks inject bounded, agent-scoped memory context. Retrieval queries are bounded before embedding: large prompts and edits contribute redacted previews, lengths, and hashes rather than unbounded bodies, while exact Guard identity digests the full normalized, redacted action. Pre-tool hooks create Guard receipts, and post-tool hooks close the matching receipt by `session_id + tool_use_id`; sanitized failures may become durable memories. Claude Code exposes an explicit failure event. Current Codex Bash hooks can omit exit status, so Audrey records an opaque result as `unknown` unless structured fields or response text establish success or failure. Stop and post-compaction hooks run consolidation only when due. Audrey fails open on hook-runtime errors by default, with explicit fail-closed operation available through `AUDREY_HOOK_FAIL_CLOSED=1`. This is lifecycle integration, not a complete enforcement boundary: Audrey can inspect only the events and tool paths emitted by each host, and the short-lived hook process still pays provider startup cost instead of using a persistent daemon (Ledger: E43, E44).
92
+
93
+ The REST sidecar exposes routes for health, encode, recall, validate, mark-used, capsule, preflight, Guard before/after receipts, reflexes, consolidate, dream, introspect, impact, resolve-truth, export, import, forget, decay, status, reflect, and greeting (Ledger: E33). The sidecar defaults to loopback binding, refuses non-loopback binds without `AUDREY_API_KEY` unless `AUDREY_ALLOW_NO_AUTH=1`, and emits an explicit warning when that no-auth override is used (Ledger: E35). Export, import, and forget are disabled unless `AUDREY_ENABLE_ADMIN_TOOLS=1` (Ledger: E33).
92
94
 
93
95
  ## Configuration
94
96
 
@@ -24,13 +24,13 @@ These numbers measure Audrey's local call path under an in-process mock embeddin
24
24
 
25
25
  ## Behavioral Regression Result
26
26
 
27
- The current `benchmarks/output/summary.json` was generated on 2026-05-29T03:45:32.997Z with command `node benchmarks/run.js --provider mock --dimensions 64` (Ledger: E24). It reports:
27
+ The current `benchmarks/output/summary.json` was generated on 2026-07-10T15:00:37.705Z with command `node benchmarks/run.js --provider mock --dimensions 64` (Ledger: E24). It reports:
28
28
 
29
29
  | System | Score Percent | Pass Rate | Average Duration Ms |
30
30
  |---|---:|---:|---:|
31
- | Audrey | 100 | 100 | 15.416666666666666 |
32
- | Vector Only | 41.66666666666667 | 25 | 0.3333333333333333 |
33
- | Keyword + Recency | 41.66666666666667 | 25 | 0.6666666666666666 |
31
+ | Audrey | 100 | 100 | 16.25 |
32
+ | Vector Only | 41.66666666666667 | 25 | 0.25 |
33
+ | Keyword + Recency | 41.66666666666667 | 25 | 0.5833333333333334 |
34
34
  | Recent Window | 37.5 | 25 | 0 |
35
35
 
36
36
  This output is a regression-gate result. The baselines are toy local baselines used to catch retrieval and lifecycle regressions in the Audrey codebase. They are not external systems, not tuned competitor implementations, and not GuardBench baselines (Ledger: E23-E24). The current suite covers retrieval and operation families such as information extraction, knowledge updates, multi-session reasoning, conflict resolution, procedural learning, privacy boundary, overwrite, delete-and-abstain, semantic merge, and procedural merge (Ledger: E23-E24).
@@ -55,7 +55,7 @@ It reports local adapters only, not external-system comparisons (Ledger: E46):
55
55
  | Evidence recall | 100% |
56
56
  | Redaction leaks | 0 |
57
57
  | Recall-degradation detection | 100% |
58
- | Guard latency p50 / p95 | 2.916 ms / 21.17 ms |
58
+ | Guard latency p50 / p95 | 3.501 ms / 20.658 ms |
59
59
  | Published artifact raw-secret leaks | 0 |
60
60
  | Audrey Guard decision accuracy | 100% |
61
61
  | No-memory decision accuracy | 10% |
@@ -46,7 +46,7 @@ Reflex generation is deterministic, not adaptive. Reflexes are mapped from prefl
46
46
 
47
47
  ## Open Problems
48
48
 
49
- Host hook parity. Audrey exposes CLI pieces that host hooks can call, and Claude Code documents hook extension points [@anthropic2026claudecodehooks]. Audrey now generates and applies Claude Code hook settings, `guard --hook` emits the current PreToolUse `hookSpecificOutput.permissionDecision` shape, and `observe-tool` records post-tool events (Ledger: E43). The remaining production installer work is equivalent wiring for hosts with stable hook surfaces, especially Codex.
49
+ Host hook coverage and process model. Audrey 1.1 generates, applies, and removes lifecycle hooks for current Claude Code and Codex CLIs; the shared adapter injects bounded context, runs Guard before selected side-effectful tools, correlates post-tool outcomes, and performs due-only maintenance (Ledger: E43). This closes the configuration gap, not the enforcement gap. Hook execution still depends on host trust and on the host emitting a supported event for the relevant tool path. Alternate or incompletely intercepted host tool paths remain outside Audrey's view. Each hook also starts a short-lived Audrey process, so the default local embedding provider can pay cold-start cost repeatedly. Production follow-up is a persistent local runtime, measured compatibility gates against supported host versions, and organization-managed deployment that binds tenant identity and enforcement policy outside a caller-controlled routing header. Claude Code's documented hook surface remains an example of the underlying host boundary [@anthropic2026claudecodehooks].
50
50
 
51
51
  Validation lineage is implemented but not yet policy-adaptive. Audrey can bind validation events to the exact preflight event, evidence IDs, and action key that produced a decision, and rejects mismatched evidence claims (Ledger: E44). The next step is using that closed-loop signal to tune warning priority and recommendation wording without giving the model direct control over policy.
52
52