audrey 1.1.3 → 1.2.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 (285) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/README.md +39 -12
  3. package/dist/mcp-server/codex-hooks-probe.d.ts +22 -0
  4. package/dist/mcp-server/codex-hooks-probe.d.ts.map +1 -0
  5. package/dist/mcp-server/codex-hooks-probe.js +160 -0
  6. package/dist/mcp-server/codex-hooks-probe.js.map +1 -0
  7. package/dist/mcp-server/config.d.ts +26 -2
  8. package/dist/mcp-server/config.d.ts.map +1 -1
  9. package/dist/mcp-server/config.js +52 -20
  10. package/dist/mcp-server/config.js.map +1 -1
  11. package/dist/mcp-server/hooks.d.ts +28 -0
  12. package/dist/mcp-server/hooks.d.ts.map +1 -1
  13. package/dist/mcp-server/hooks.js +91 -2
  14. package/dist/mcp-server/hooks.js.map +1 -1
  15. package/dist/mcp-server/index.d.ts +242 -2
  16. package/dist/mcp-server/index.d.ts.map +1 -1
  17. package/dist/mcp-server/index.js +806 -240
  18. package/dist/mcp-server/index.js.map +1 -1
  19. package/dist/mcp-server/tool-schemas.d.ts +32 -2
  20. package/dist/mcp-server/tool-schemas.d.ts.map +1 -1
  21. package/dist/mcp-server/tool-schemas.js +55 -0
  22. package/dist/mcp-server/tool-schemas.js.map +1 -1
  23. package/dist/src/audrey.d.ts +14 -2
  24. package/dist/src/audrey.d.ts.map +1 -1
  25. package/dist/src/audrey.js +152 -28
  26. package/dist/src/audrey.js.map +1 -1
  27. package/dist/src/autopilot.d.ts +22 -0
  28. package/dist/src/autopilot.d.ts.map +1 -1
  29. package/dist/src/autopilot.js +271 -50
  30. package/dist/src/autopilot.js.map +1 -1
  31. package/dist/src/capsule.d.ts +23 -0
  32. package/dist/src/capsule.d.ts.map +1 -1
  33. package/dist/src/capsule.js +56 -11
  34. package/dist/src/capsule.js.map +1 -1
  35. package/dist/src/confidence.d.ts +9 -1
  36. package/dist/src/confidence.d.ts.map +1 -1
  37. package/dist/src/confidence.js +16 -2
  38. package/dist/src/confidence.js.map +1 -1
  39. package/dist/src/consolidate.d.ts +4 -0
  40. package/dist/src/consolidate.d.ts.map +1 -1
  41. package/dist/src/consolidate.js +206 -34
  42. package/dist/src/consolidate.js.map +1 -1
  43. package/dist/src/controller.d.ts +17 -1
  44. package/dist/src/controller.d.ts.map +1 -1
  45. package/dist/src/controller.js +244 -128
  46. package/dist/src/controller.js.map +1 -1
  47. package/dist/src/db.d.ts.map +1 -1
  48. package/dist/src/db.js +233 -56
  49. package/dist/src/db.js.map +1 -1
  50. package/dist/src/encode.d.ts +2 -1
  51. package/dist/src/encode.d.ts.map +1 -1
  52. package/dist/src/encode.js +41 -4
  53. package/dist/src/encode.js.map +1 -1
  54. package/dist/src/events.d.ts +48 -1
  55. package/dist/src/events.d.ts.map +1 -1
  56. package/dist/src/events.js +160 -62
  57. package/dist/src/events.js.map +1 -1
  58. package/dist/src/export.d.ts.map +1 -1
  59. package/dist/src/export.js +4 -4
  60. package/dist/src/export.js.map +1 -1
  61. package/dist/src/grounding.d.ts +111 -0
  62. package/dist/src/grounding.d.ts.map +1 -0
  63. package/dist/src/grounding.js +259 -0
  64. package/dist/src/grounding.js.map +1 -0
  65. package/dist/src/hybrid-recall.d.ts +16 -7
  66. package/dist/src/hybrid-recall.d.ts.map +1 -1
  67. package/dist/src/hybrid-recall.js +22 -11
  68. package/dist/src/hybrid-recall.js.map +1 -1
  69. package/dist/src/import.d.ts +10 -0
  70. package/dist/src/import.d.ts.map +1 -1
  71. package/dist/src/import.js +122 -22
  72. package/dist/src/import.js.map +1 -1
  73. package/dist/src/llm.d.ts.map +1 -1
  74. package/dist/src/llm.js +16 -0
  75. package/dist/src/llm.js.map +1 -1
  76. package/dist/src/preflight.d.ts.map +1 -1
  77. package/dist/src/preflight.js +89 -47
  78. package/dist/src/preflight.js.map +1 -1
  79. package/dist/src/project.d.ts +4 -1
  80. package/dist/src/project.d.ts.map +1 -1
  81. package/dist/src/project.js +65 -5
  82. package/dist/src/project.js.map +1 -1
  83. package/dist/src/recall.d.ts.map +1 -1
  84. package/dist/src/recall.js +138 -13
  85. package/dist/src/recall.js.map +1 -1
  86. package/dist/src/redact.d.ts +1 -1
  87. package/dist/src/redact.d.ts.map +1 -1
  88. package/dist/src/redact.js +185 -5
  89. package/dist/src/redact.js.map +1 -1
  90. package/dist/src/routes.d.ts.map +1 -1
  91. package/dist/src/routes.js +91 -18
  92. package/dist/src/routes.js.map +1 -1
  93. package/dist/src/trust.d.ts +35 -0
  94. package/dist/src/trust.d.ts.map +1 -0
  95. package/dist/src/trust.js +77 -0
  96. package/dist/src/trust.js.map +1 -0
  97. package/dist/src/types.d.ts +24 -0
  98. package/dist/src/types.d.ts.map +1 -1
  99. package/package.json +3 -37
  100. package/benchmarks/adapter-kit.mjs +0 -20
  101. package/benchmarks/adapter-self-test.mjs +0 -170
  102. package/benchmarks/adapters/example-allow.mjs +0 -31
  103. package/benchmarks/adapters/mem0-platform.mjs +0 -274
  104. package/benchmarks/adapters/registry.json +0 -51
  105. package/benchmarks/adapters/zep-cloud.mjs +0 -304
  106. package/benchmarks/baselines.js +0 -174
  107. package/benchmarks/build-leaderboard.mjs +0 -183
  108. package/benchmarks/cases.js +0 -549
  109. package/benchmarks/create-conformance-card.mjs +0 -148
  110. package/benchmarks/create-submission-bundle.mjs +0 -190
  111. package/benchmarks/dry-run-external-adapters.mjs +0 -177
  112. package/benchmarks/guardbench.js +0 -1265
  113. package/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +0 -50
  114. package/benchmarks/output/external/guardbench-external-dry-run.json +0 -69
  115. package/benchmarks/output/external/guardbench-external-evidence.json +0 -56
  116. package/benchmarks/output/guardbench-conformance-card.json +0 -63
  117. package/benchmarks/output/guardbench-manifest.json +0 -414
  118. package/benchmarks/output/guardbench-raw.json +0 -1279
  119. package/benchmarks/output/guardbench-summary.json +0 -2123
  120. package/benchmarks/output/leaderboard/guardbench-leaderboard.json +0 -93
  121. package/benchmarks/output/leaderboard/guardbench-leaderboard.md +0 -7
  122. package/benchmarks/output/submission-bundle/guardbench-conformance-card.json +0 -63
  123. package/benchmarks/output/submission-bundle/guardbench-manifest.json +0 -414
  124. package/benchmarks/output/submission-bundle/guardbench-raw.json +0 -1279
  125. package/benchmarks/output/submission-bundle/guardbench-summary.json +0 -2123
  126. package/benchmarks/output/submission-bundle/schemas/guardbench-adapter-registry.schema.json +0 -69
  127. package/benchmarks/output/submission-bundle/schemas/guardbench-adapter-self-test.schema.json +0 -156
  128. package/benchmarks/output/submission-bundle/schemas/guardbench-conformance-card.schema.json +0 -184
  129. package/benchmarks/output/submission-bundle/schemas/guardbench-external-dry-run.schema.json +0 -74
  130. package/benchmarks/output/submission-bundle/schemas/guardbench-external-evidence.schema.json +0 -108
  131. package/benchmarks/output/submission-bundle/schemas/guardbench-external-run.schema.json +0 -160
  132. package/benchmarks/output/submission-bundle/schemas/guardbench-leaderboard.schema.json +0 -179
  133. package/benchmarks/output/submission-bundle/schemas/guardbench-manifest.schema.json +0 -213
  134. package/benchmarks/output/submission-bundle/schemas/guardbench-publication-verification.schema.json +0 -47
  135. package/benchmarks/output/submission-bundle/schemas/guardbench-raw.schema.json +0 -184
  136. package/benchmarks/output/submission-bundle/schemas/guardbench-submission-manifest.schema.json +0 -151
  137. package/benchmarks/output/submission-bundle/schemas/guardbench-summary.schema.json +0 -249
  138. package/benchmarks/output/submission-bundle/submission-manifest.json +0 -131
  139. package/benchmarks/output/submission-bundle/validation-report.json +0 -31
  140. package/benchmarks/output/summary.json +0 -2354
  141. package/benchmarks/perf-snapshot.js +0 -307
  142. package/benchmarks/perf.bench.js +0 -169
  143. package/benchmarks/public-paths.mjs +0 -97
  144. package/benchmarks/reference-results.js +0 -75
  145. package/benchmarks/report.js +0 -280
  146. package/benchmarks/run-external-guardbench.mjs +0 -303
  147. package/benchmarks/run.js +0 -735
  148. package/benchmarks/schemas/guardbench-adapter-registry.schema.json +0 -69
  149. package/benchmarks/schemas/guardbench-adapter-self-test.schema.json +0 -156
  150. package/benchmarks/schemas/guardbench-conformance-card.schema.json +0 -184
  151. package/benchmarks/schemas/guardbench-external-dry-run.schema.json +0 -74
  152. package/benchmarks/schemas/guardbench-external-evidence.schema.json +0 -108
  153. package/benchmarks/schemas/guardbench-external-run.schema.json +0 -160
  154. package/benchmarks/schemas/guardbench-leaderboard.schema.json +0 -179
  155. package/benchmarks/schemas/guardbench-manifest.schema.json +0 -213
  156. package/benchmarks/schemas/guardbench-publication-verification.schema.json +0 -47
  157. package/benchmarks/schemas/guardbench-raw.schema.json +0 -184
  158. package/benchmarks/schemas/guardbench-submission-manifest.schema.json +0 -151
  159. package/benchmarks/schemas/guardbench-summary.schema.json +0 -249
  160. package/benchmarks/snapshots/perf-0.22.2.json +0 -123
  161. package/benchmarks/snapshots/perf-0.23.0.json +0 -123
  162. package/benchmarks/validate-adapter-module.mjs +0 -107
  163. package/benchmarks/validate-adapter-registry.mjs +0 -145
  164. package/benchmarks/validate-adapter-self-test.mjs +0 -96
  165. package/benchmarks/validate-guardbench-artifacts.mjs +0 -400
  166. package/benchmarks/verify-external-evidence.mjs +0 -351
  167. package/benchmarks/verify-publication-artifacts.mjs +0 -309
  168. package/benchmarks/verify-submission-bundle.mjs +0 -172
  169. package/docs/AUDREY_PAPER_OUTLINE.md +0 -178
  170. package/docs/MEMORY_BENCHMARKING.md +0 -59
  171. package/docs/PRODUCTION_BACKLOG.md +0 -321
  172. package/docs/assets/audrey-feature-grid.jpg +0 -0
  173. package/docs/assets/audrey-logo.svg +0 -45
  174. package/docs/assets/audrey-wordmark.png +0 -0
  175. package/docs/paper/00-master.md +0 -48
  176. package/docs/paper/01-introduction.md +0 -27
  177. package/docs/paper/02-related-work.md +0 -47
  178. package/docs/paper/03-problem-definition.md +0 -108
  179. package/docs/paper/04-design.md +0 -164
  180. package/docs/paper/05-guardbench-spec.md +0 -412
  181. package/docs/paper/06-implementation.md +0 -115
  182. package/docs/paper/07-evaluation.md +0 -168
  183. package/docs/paper/08-discussion-limitations.md +0 -61
  184. package/docs/paper/09-conclusion.md +0 -11
  185. package/docs/paper/SUBMISSION_README.md +0 -162
  186. package/docs/paper/appendix-a-demo-transcript.md +0 -114
  187. package/docs/paper/arxiv-compile-report.schema.json +0 -116
  188. package/docs/paper/arxiv-source.schema.json +0 -61
  189. package/docs/paper/audrey-paper-v1.md +0 -1108
  190. package/docs/paper/browser-launch-plan.json +0 -209
  191. package/docs/paper/browser-launch-plan.schema.json +0 -100
  192. package/docs/paper/browser-launch-results.json +0 -86
  193. package/docs/paper/browser-launch-results.schema.json +0 -66
  194. package/docs/paper/claim-register.json +0 -138
  195. package/docs/paper/claim-register.schema.json +0 -81
  196. package/docs/paper/evidence-ledger.md +0 -103
  197. package/docs/paper/output/arxiv/README-arxiv.txt +0 -8
  198. package/docs/paper/output/arxiv/arxiv-manifest.json +0 -41
  199. package/docs/paper/output/arxiv/main.tex +0 -951
  200. package/docs/paper/output/arxiv/references.bib +0 -222
  201. package/docs/paper/output/arxiv-compile-report.json +0 -24
  202. package/docs/paper/output/submission-bundle/LICENSE +0 -21
  203. package/docs/paper/output/submission-bundle/README.md +0 -440
  204. package/docs/paper/output/submission-bundle/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +0 -50
  205. package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-dry-run.json +0 -69
  206. package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-evidence.json +0 -56
  207. package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-conformance-card.json +0 -63
  208. package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-manifest.json +0 -414
  209. package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-raw.json +0 -1279
  210. package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-summary.json +0 -2123
  211. package/docs/paper/output/submission-bundle/benchmarks/output/leaderboard/guardbench-leaderboard.json +0 -93
  212. package/docs/paper/output/submission-bundle/benchmarks/output/leaderboard/guardbench-leaderboard.md +0 -7
  213. package/docs/paper/output/submission-bundle/benchmarks/output/submission-bundle/submission-manifest.json +0 -131
  214. package/docs/paper/output/submission-bundle/benchmarks/output/submission-bundle/validation-report.json +0 -31
  215. package/docs/paper/output/submission-bundle/benchmarks/output/summary.json +0 -2354
  216. package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-adapter-registry.schema.json +0 -69
  217. package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-adapter-self-test.schema.json +0 -156
  218. package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-conformance-card.schema.json +0 -184
  219. package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-external-dry-run.schema.json +0 -74
  220. package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-external-evidence.schema.json +0 -108
  221. package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-external-run.schema.json +0 -160
  222. package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-leaderboard.schema.json +0 -179
  223. package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-manifest.schema.json +0 -213
  224. package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-publication-verification.schema.json +0 -47
  225. package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-raw.schema.json +0 -184
  226. package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-submission-manifest.schema.json +0 -151
  227. package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-summary.schema.json +0 -249
  228. package/docs/paper/output/submission-bundle/docs/AUDREY_PAPER_OUTLINE.md +0 -178
  229. package/docs/paper/output/submission-bundle/docs/paper/00-master.md +0 -48
  230. package/docs/paper/output/submission-bundle/docs/paper/01-introduction.md +0 -27
  231. package/docs/paper/output/submission-bundle/docs/paper/02-related-work.md +0 -47
  232. package/docs/paper/output/submission-bundle/docs/paper/03-problem-definition.md +0 -108
  233. package/docs/paper/output/submission-bundle/docs/paper/04-design.md +0 -164
  234. package/docs/paper/output/submission-bundle/docs/paper/05-guardbench-spec.md +0 -412
  235. package/docs/paper/output/submission-bundle/docs/paper/06-implementation.md +0 -115
  236. package/docs/paper/output/submission-bundle/docs/paper/07-evaluation.md +0 -168
  237. package/docs/paper/output/submission-bundle/docs/paper/08-discussion-limitations.md +0 -61
  238. package/docs/paper/output/submission-bundle/docs/paper/09-conclusion.md +0 -11
  239. package/docs/paper/output/submission-bundle/docs/paper/SUBMISSION_README.md +0 -162
  240. package/docs/paper/output/submission-bundle/docs/paper/appendix-a-demo-transcript.md +0 -114
  241. package/docs/paper/output/submission-bundle/docs/paper/arxiv-compile-report.schema.json +0 -116
  242. package/docs/paper/output/submission-bundle/docs/paper/arxiv-source.schema.json +0 -61
  243. package/docs/paper/output/submission-bundle/docs/paper/audrey-paper-v1.md +0 -1108
  244. package/docs/paper/output/submission-bundle/docs/paper/browser-launch-plan.json +0 -209
  245. package/docs/paper/output/submission-bundle/docs/paper/browser-launch-plan.schema.json +0 -100
  246. package/docs/paper/output/submission-bundle/docs/paper/browser-launch-results.json +0 -86
  247. package/docs/paper/output/submission-bundle/docs/paper/browser-launch-results.schema.json +0 -66
  248. package/docs/paper/output/submission-bundle/docs/paper/claim-register.json +0 -138
  249. package/docs/paper/output/submission-bundle/docs/paper/claim-register.schema.json +0 -81
  250. package/docs/paper/output/submission-bundle/docs/paper/evidence-ledger.md +0 -103
  251. package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/README-arxiv.txt +0 -8
  252. package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/arxiv-manifest.json +0 -41
  253. package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/main.tex +0 -951
  254. package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/references.bib +0 -222
  255. package/docs/paper/output/submission-bundle/docs/paper/output/arxiv-compile-report.json +0 -24
  256. package/docs/paper/output/submission-bundle/docs/paper/paper-submission-bundle.schema.json +0 -70
  257. package/docs/paper/output/submission-bundle/docs/paper/publication-pack.json +0 -81
  258. package/docs/paper/output/submission-bundle/docs/paper/publication-pack.schema.json +0 -60
  259. package/docs/paper/output/submission-bundle/docs/paper/references.bib +0 -222
  260. package/docs/paper/output/submission-bundle/package.json +0 -235
  261. package/docs/paper/output/submission-bundle/paper-submission-manifest.json +0 -379
  262. package/docs/paper/paper-submission-bundle.schema.json +0 -70
  263. package/docs/paper/publication-pack.json +0 -81
  264. package/docs/paper/publication-pack.schema.json +0 -60
  265. package/docs/paper/references.bib +0 -222
  266. package/scripts/audit-release-completion.mjs +0 -440
  267. package/scripts/create-arxiv-source.mjs +0 -368
  268. package/scripts/create-paper-submission-bundle.mjs +0 -214
  269. package/scripts/finalize-release.mjs +0 -601
  270. package/scripts/prepare-release-cut.mjs +0 -277
  271. package/scripts/publish-release-bundle.mjs +0 -252
  272. package/scripts/publish-release-github-api.mjs +0 -494
  273. package/scripts/run-vitest.mjs +0 -34
  274. package/scripts/smoke-cli.js +0 -92
  275. package/scripts/sync-paper-artifacts.mjs +0 -112
  276. package/scripts/verify-arxiv-compile.mjs +0 -476
  277. package/scripts/verify-arxiv-source.mjs +0 -224
  278. package/scripts/verify-browser-launch-plan.mjs +0 -254
  279. package/scripts/verify-browser-launch-results.mjs +0 -303
  280. package/scripts/verify-paper-artifacts.mjs +0 -798
  281. package/scripts/verify-paper-claims.mjs +0 -254
  282. package/scripts/verify-paper-submission-bundle.mjs +0 -218
  283. package/scripts/verify-publication-pack.mjs +0 -210
  284. package/scripts/verify-python-package.py +0 -201
  285. package/scripts/verify-release-readiness.mjs +0 -920
@@ -1,172 +0,0 @@
1
- import { existsSync, readdirSync, readFileSync } from 'node:fs';
2
- import { createHash } from 'node:crypto';
3
- import { join, relative, resolve } from 'node:path';
4
- import { validateGuardBenchArtifacts, validateSchema } from './validate-guardbench-artifacts.mjs';
5
- import { publicPath, scanFilesForLocalPaths } from './public-paths.mjs';
6
-
7
- const REQUIRED_FILES = [
8
- 'guardbench-conformance-card.json',
9
- 'guardbench-manifest.json',
10
- 'guardbench-raw.json',
11
- 'guardbench-summary.json',
12
- 'schemas/guardbench-adapter-registry.schema.json',
13
- 'schemas/guardbench-adapter-self-test.schema.json',
14
- 'schemas/guardbench-conformance-card.schema.json',
15
- 'schemas/guardbench-external-dry-run.schema.json',
16
- 'schemas/guardbench-external-evidence.schema.json',
17
- 'schemas/guardbench-external-run.schema.json',
18
- 'schemas/guardbench-leaderboard.schema.json',
19
- 'schemas/guardbench-manifest.schema.json',
20
- 'schemas/guardbench-publication-verification.schema.json',
21
- 'schemas/guardbench-raw.schema.json',
22
- 'schemas/guardbench-summary.schema.json',
23
- 'schemas/guardbench-submission-manifest.schema.json',
24
- 'validation-report.json',
25
- ];
26
-
27
- function readJson(path) {
28
- return JSON.parse(readFileSync(path, 'utf-8'));
29
- }
30
-
31
- function sha256File(path) {
32
- return createHash('sha256').update(readFileSync(path)).digest('hex');
33
- }
34
-
35
- function walkFiles(dir, root = dir) {
36
- return readdirSync(dir, { withFileTypes: true }).flatMap(entry => {
37
- const path = join(dir, entry.name);
38
- if (entry.isDirectory()) return walkFiles(path, root);
39
- return relative(root, path).replaceAll('\\', '/');
40
- });
41
- }
42
-
43
- export function verifyGuardBenchSubmissionBundle(options = {}) {
44
- const dir = resolve(options.dir ?? 'benchmarks/output/submission-bundle');
45
- const manifestPath = join(dir, 'submission-manifest.json');
46
- const failures = [];
47
- let manifest = null;
48
-
49
- try {
50
- manifest = readJson(manifestPath);
51
- } catch (error) {
52
- failures.push(`submission-manifest.json: ${error.message}`);
53
- }
54
-
55
- if (!manifest) {
56
- return { ok: false, dir, failures };
57
- }
58
-
59
- if (manifest.suite !== 'GuardBench submission bundle') {
60
- failures.push('submission-manifest.json: suite must be GuardBench submission bundle');
61
- }
62
- try {
63
- const schema = readJson(join(dir, 'schemas', 'guardbench-submission-manifest.schema.json'));
64
- for (const error of validateSchema(manifest, schema, 'submission-manifest')) {
65
- failures.push(`submission-manifest.json: ${error}`);
66
- }
67
- } catch (error) {
68
- failures.push(`schemas/guardbench-submission-manifest.schema.json: ${error.message}`);
69
- }
70
- const listed = new Map((manifest.files ?? []).map(file => [file.path, file]));
71
- for (const file of REQUIRED_FILES) {
72
- if (!listed.has(file))
73
- failures.push(`submission-manifest.json: missing required file record ${file}`);
74
- }
75
- if (listed.has('submission-manifest.json')) {
76
- failures.push('submission-manifest.json: must not include a self-hash file record');
77
- }
78
-
79
- for (const [file, record] of listed) {
80
- const path = join(dir, file);
81
- if (!existsSync(path)) {
82
- failures.push(`${file}: listed in manifest but missing from bundle`);
83
- continue;
84
- }
85
- const actualHash = sha256File(path);
86
- if (record.sha256 !== actualHash) failures.push(`${file}: sha256 mismatch`);
87
- const actualBytes = readFileSync(path).byteLength;
88
- if (record.bytes !== actualBytes) failures.push(`${file}: byte length mismatch`);
89
- }
90
-
91
- const actualFiles = walkFiles(dir)
92
- .filter(file => file !== 'submission-manifest.json')
93
- .sort();
94
- const listedFiles = [...listed.keys()].sort();
95
- const actualSet = new Set(actualFiles);
96
- const listedSet = new Set(listedFiles);
97
- for (const file of actualFiles) {
98
- if (!listedSet.has(file)) failures.push(`${file}: present in bundle but missing from manifest`);
99
- }
100
- for (const file of listedFiles) {
101
- if (!actualSet.has(file))
102
- failures.push(`${file}: listed in manifest but not present in bundle`);
103
- }
104
-
105
- const artifactValidation = validateGuardBenchArtifacts({
106
- dir,
107
- schemasDir: join(dir, 'schemas'),
108
- });
109
- if (!artifactValidation.ok) {
110
- failures.push(...artifactValidation.failures.map(failure => `artifact validation: ${failure}`));
111
- }
112
- if (manifest.validation?.ok !== true) {
113
- failures.push('submission-manifest.json: embedded validation status is not ok');
114
- }
115
- for (const file of scanFilesForLocalPaths(dir, actualFiles)) {
116
- failures.push(`${file}: contains a local absolute path`);
117
- }
118
-
119
- return {
120
- ok: failures.length === 0,
121
- dir: publicPath(dir),
122
- subject: manifest.subject ?? null,
123
- files: listedFiles,
124
- artifactValidation,
125
- failures,
126
- };
127
- }
128
-
129
- function parseArgs(argv = process.argv.slice(2)) {
130
- const args = { dir: 'benchmarks/output/submission-bundle', json: false };
131
- for (let i = 0; i < argv.length; i++) {
132
- const token = argv[i];
133
- if ((token === '--dir' || token === '--bundle-dir') && argv[i + 1]) args.dir = argv[++i];
134
- else if (token === '--json') args.json = true;
135
- else if (token === '--help' || token === '-h') args.help = true;
136
- else throw new Error(`Unknown argument: ${token}`);
137
- }
138
- return args;
139
- }
140
-
141
- function usage() {
142
- return [
143
- 'Usage: node benchmarks/verify-submission-bundle.mjs [--dir benchmarks/output/submission-bundle] [--json]',
144
- '',
145
- 'Verifies a GuardBench submission bundle manifest, file hashes, bundled schemas,',
146
- 'and artifact validation report.',
147
- ].join('\n');
148
- }
149
-
150
- async function main() {
151
- const args = parseArgs();
152
- if (args.help) {
153
- console.log(usage());
154
- return;
155
- }
156
- const report = verifyGuardBenchSubmissionBundle(args);
157
- if (args.json) console.log(JSON.stringify(report, null, 2));
158
- else if (report.ok)
159
- console.log(`GuardBench submission bundle verification passed: ${report.dir}`);
160
- else {
161
- console.error('GuardBench submission bundle verification failed:');
162
- for (const failure of report.failures) console.error(`- ${failure}`);
163
- }
164
- if (!report.ok) process.exit(1);
165
- }
166
-
167
- if (process.argv[1] && resolve(process.argv[1]).endsWith('verify-submission-bundle.mjs')) {
168
- main().catch(error => {
169
- console.error(error.stack ?? error.message);
170
- process.exit(1);
171
- });
172
- }
@@ -1,178 +0,0 @@
1
- # Audrey Paper Outline
2
-
3
- ## Working Title
4
-
5
- Audrey Guard: Local-First Pre-Action Memory Control for Tool-Using Agents
6
-
7
- ## One-Sentence Thesis
8
-
9
- Long-term memory for agents should not stop at recall; it should run before tool use, connect prior outcomes to the next action, and return an auditable `allow`, `warn`, or `block` decision with evidence.
10
-
11
- ## Abstract Draft
12
-
13
- Tool-using agents repeatedly fail in ways that are avoidable: they rerun broken commands, ignore project-specific procedures, lose the context behind prior failures, and trust degraded retrieval paths as if they were complete. Existing agent-memory systems focus mainly on storing and retrieving conversational facts. Audrey reframes memory as a local-first control loop for action: observe tool outcomes, encode durable lessons, build a memory capsule before the next action, generate reflexes, decide whether to allow, warn, or block, and validate whether the memory changed the result.
14
-
15
- This paper introduces Audrey Guard, a SQLite-backed memory controller for Model Context Protocol and CLI agents. Audrey Guard combines hybrid vector/FTS recall, memory capsules, preflight warnings, tool-trace learning, redaction-first audit logging, and evidence-linked impact measurement. The evaluation plan measures repeated-failure prevention, false-block rate, degraded-recall fail-closed behavior, redaction safety, and overhead. The result is a practical memory firewall for local agent work: not a replacement for general memory platforms, but an auditable layer that helps agents avoid repeating known mistakes before they touch tools.
16
-
17
- ## Core Contributions
18
-
19
- 1. Define pre-action memory control as a distinct problem from generic long-term memory retrieval.
20
- 2. Present the Audrey Guard loop: `PostToolUse` observation -> memory encoding -> preflight/capsule/reflex generation -> `allow` / `warn` / `block` -> validation/impact.
21
- 3. Show a local-first implementation over SQLite, vector search, FTS, MCP, CLI, REST, and Python clients.
22
- 4. Introduce GuardBench, an evaluation suite focused on tool-use risk reduction rather than chat-memory accuracy alone.
23
- 5. Measure safety properties that memory systems usually underreport: repeated-failure prevention, recall degradation handling, secret redaction, and audit lineage.
24
-
25
- ## Paper Structure
26
-
27
- ### 1. Introduction
28
-
29
- - Agents now operate tools, not just text conversations.
30
- - The failure mode is operational: the agent knows less than yesterday's run.
31
- - Generic memory recall is necessary but insufficient; the memory must participate before action.
32
- - Audrey's claim: a local memory controller can prevent repeated tool failures with low overhead and inspectable evidence.
33
-
34
- ### 2. Background and Related Work
35
-
36
- - Agent-memory systems: Mem0, Letta/MemGPT, LangMem, Zep/Graphiti, Supermemory, OpenMemory, Cognee, LlamaIndex memory.
37
- - Memory-as-system-resource work: MemOS, procedural memory, evidence-driven retention, temporal graphs.
38
- - MCP tool safety: tool annotations, tool poisoning, descriptor drift, open-world tool risk.
39
- - Hook runtimes: Claude Code `PreToolUse`, `PostToolUse`, and `PostToolUseFailure` make pre-action memory control deployable.
40
-
41
- ### 3. Problem Definition
42
-
43
- - Input: proposed agent action, tool name, command/action text, cwd, file scope, session id, and current memory store.
44
- - Output: decision, risk score, summary, evidence ids, recommended actions, reflexes, optional capsule, and preflight event id.
45
- - Desired behavior:
46
- - Block exact repeated failures unless the action changed.
47
- - Warn on relevant prior failures, must-follow procedures, contradictions, and degraded recall.
48
- - Preserve evidence lineage and redact secrets before durable storage.
49
- - Add low enough latency to run inside tool hooks.
50
-
51
- ### 4. Audrey Guard Design
52
-
53
- - Memory substrate: episodic, semantic, procedural, event log, validation, decay, consolidation.
54
- - Recall: hybrid vector + FTS with tag/source/date filters and partial-failure diagnostics.
55
- - Capsules: budgeted evidence assembly for action context.
56
- - Preflight: warnings and risk scoring from capsule sections, status, and recent tool failures.
57
- - Reflexes: action-oriented responses generated from preflight evidence.
58
- - Controller: `beforeAction()` and `afterAction()` over existing Audrey primitives.
59
- - Audit safety: redaction-before-truncation, action hashing, file-scope hashing, event ids.
60
-
61
- ### 5. Implementation
62
-
63
- - Runtime: Node.js 20+, TypeScript, SQLite, sqlite-vec, Hono REST, MCP stdio, Python client.
64
- - CLI:
65
- - `audrey guard --tool Bash "npm run deploy"`
66
- - `audrey demo --scenario repeated-failure`
67
- - MCP surfaces:
68
- - Tools for recall, preflight, reflexes, observe-tool, impact, status.
69
- - Resources for status, recent memories, and principles.
70
- - Prompts for session briefing, recall, and reflection.
71
- - Docker behavior: fail-closed non-loopback REST sidecar with required API key.
72
-
73
- ### 6. Evaluation: GuardBench
74
-
75
- Baselines:
76
-
77
- - No memory.
78
- - Recent-window memory.
79
- - Vector-only recall.
80
- - Keyword/FTS-only recall.
81
- - Audrey Guard with hybrid recall and exact-failure matching.
82
-
83
- Scenarios:
84
-
85
- - Repeated failed shell command.
86
- - Required preflight procedure missing.
87
- - Same command in a different file scope.
88
- - Same tool/action with changed command.
89
- - Prior failure plus successful fix.
90
- - Recall vector table missing.
91
- - FTS failure under hybrid recall.
92
- - Long secret near truncation boundary.
93
- - Conflicting project instructions.
94
- - High-volume irrelevant memory noise.
95
-
96
- Metrics:
97
-
98
- - Repeated-failure prevention rate.
99
- - False-block rate.
100
- - Useful-warning precision.
101
- - Evidence recall: whether the blocking evidence is surfaced.
102
- - Redaction safety: raw secret leakage count.
103
- - Recall-degradation detection rate.
104
- - Runtime overhead p50/p95.
105
- - Validation-linked impact count.
106
-
107
- ### 7. Results Plan
108
-
109
- - Use the existing repeated-failure demo as the first qualitative figure.
110
- - Run `npm run bench:memory:check` as the memory-regression baseline.
111
- - Keep the `bench:guard` command wired into release evidence before paper submission.
112
- - Report machine provenance for all timings, matching the existing 0.22.2 benchmark snapshot style.
113
- - Include ablations:
114
- - Without exact action hash.
115
- - Without file scope.
116
- - Without recall degradation warnings.
117
- - Without redaction-aware truncation.
118
-
119
- ### 8. Discussion
120
-
121
- - Why Audrey should not compete as "the best general memory store."
122
- - Why local-first matters for tool traces: secrets, filesystem paths, project rules, and private failures.
123
- - Why tool annotations are hints, not policy guarantees.
124
- - What Audrey borrows from graph memory without adding a graph database to the core.
125
- - Limitations:
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.
130
- - Validation lineage is bound to exact preflight event evidence, but feedback
131
- does not yet tune risk scoring.
132
- - Local comparative GuardBench numbers exist; no external-system numbers yet.
133
- - Temporal belief fields are still future work.
134
-
135
- ### 9. Conclusion
136
-
137
- - Agent memory should be judged by whether it changes future actions, not just whether it retrieves relevant text.
138
- - Audrey Guard demonstrates a practical local loop for using memory as a pre-action control layer.
139
- - The next publishable milestone is live external-adapter GuardBench output plus measured real-host coverage and a persistent hook runtime.
140
-
141
- ## Figures and Tables
142
-
143
- 1. Guard loop diagram: observe -> encode -> capsule/preflight/reflex -> decision -> validate.
144
- 2. Architecture diagram: SQLite store, event log, recall, controller, MCP/CLI/REST clients.
145
- 3. Repeated-failure demo transcript with evidence ids.
146
- 4. GuardBench table by baseline and scenario.
147
- 5. Redaction/truncation safety table.
148
- 6. Latency table: preflight p50/p95 by memory count.
149
-
150
- ## Artifact Checklist Before Submission
151
-
152
- - `bench:guard` script and JSON output.
153
- - Public GuardBench scenario manifest, comparative adapter package, and external-run metadata bundle.
154
- - Reproducible benchmark snapshot with Node version, CPU, RAM, git SHA.
155
- - CLI smoke transcript for `audrey demo --scenario repeated-failure`.
156
- - MCP smoke transcript for `tools/list`, `resources/list`, `prompts/list`, and `memory_status`.
157
- - Python integration proof.
158
- - Docker fail-closed auth proof.
159
- - Paper appendix with exact commands.
160
-
161
- ## Submission Strategy
162
-
163
- 1. Publish an arXiv preprint after GuardBench exists.
164
- 2. Submit to an agent-systems, AI engineering, or LLM applications workshop.
165
- 3. Keep the first version implementation-centered, not theory-heavy.
166
- 4. Release the evaluation artifact with the paper so the claim is falsifiable.
167
-
168
- ## Source Map
169
-
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
171
- - MCP annotation risk vocabulary: https://blog.modelcontextprotocol.io/posts/2026-03-16-tool-annotations/
172
- - Claude Code hooks: https://code.claude.com/docs/en/hooks
173
- - Codex hooks: https://developers.openai.com/codex/hooks
174
- - Mem0 token-efficient memory algorithm: https://mem0.ai/blog/mem0-the-token-efficient-memory-algorithm
175
- - MemOS: https://huggingface.co/papers/2507.03724
176
- - MCP Security Bench: https://huggingface.co/papers/2510.15994
177
- - Securing MCP against tool poisoning: https://papers.cool/arxiv/2512.06556
178
- - Zep/Graphiti temporal knowledge graph: https://help.getzep.com/graphiti/graphiti/overview
@@ -1,59 +0,0 @@
1
- # Audrey Memory Benchmarking Strategy
2
-
3
- Updated: 2026-05-05 for the 0.23.0 Audrey Guard release.
4
-
5
- Audrey should win trust before it tries to win leaderboards. The benchmark story is:
6
- separate what Audrey can prove locally, publish the exact harness and artifacts, and
7
- only compare against external systems on tasks that measure the same thing.
8
-
9
- ## 0.23.0 Release Stance
10
-
11
- - Performance snapshots measure Audrey's local pipeline: SQLite, sqlite-vec,
12
- hybrid ranking, and post-encode work. They intentionally exclude hosted
13
- embedding latency and do not compare against unrelated systems.
14
- - The behavioral suite is split into retrieval, lifecycle operations, and guard
15
- loop behavior. Guard cases stay out of the comparable aggregate because
16
- "no controller" baselines are useful regressions, not fair leaderboard peers.
17
- - `npm run bench:memory:guard` is Audrey's new product benchmark: can memory
18
- stop an agent before it repeats a known tool failure or violates a must-follow
19
- release rule, and can the receipt boundary reject replayed or non-guard
20
- outcomes?
21
- - The next public claim should be a reproducible report, not a slogan: commit
22
- the command, raw JSON, machine provenance, model/provider configuration, and
23
- any judge prompt or scoring rule used.
24
-
25
- ## External Benchmark Map
26
-
27
- | Benchmark | What It Tests | Audrey Fit |
28
- |---|---|---|
29
- | LongMemEval | Information extraction, multi-session reasoning, temporal reasoning, knowledge updates, and abstention across scalable chat histories. | Good retrieval/lifecycle fit once Audrey has an adapter and evaluator. Source: https://arxiv.org/abs/2410.10813 |
30
- | LoCoMo | Very long-term conversations around 300 turns, 9K tokens on average, and up to 35 sessions, with QA, summarization, and multimodal dialogue tasks. | Useful external context, but Audrey should keep published scores separate from local synthetic cases. Source: https://arxiv.org/abs/2402.17753 |
31
- | MemoryAgentBench | Incremental multi-turn memory with accurate retrieval, test-time learning, long-range understanding, and selective forgetting. | Strong fit for Audrey's live agent posture because it evaluates online accumulation rather than static long-context reading. Source: https://arxiv.org/abs/2507.05257 |
32
- | StructMemEval | Whether agents organize long-term memory into useful structures such as ledgers, to-do lists, and trees rather than just recalling facts. | High-value 0.24 target for Audrey's memory-controller routing and future typed memory stores. Source: https://arxiv.org/abs/2602.11243 |
33
- | MemGUI-Bench | Cross-temporal and cross-spatial memory for mobile GUI agents, with memory-centric tasks and staged evaluation. | Not a direct coding-agent benchmark, but its failure taxonomy is relevant to tool-bound agents with UI state. Source: https://arxiv.org/abs/2602.06075 |
34
-
35
- ## Release-Quality Rules
36
-
37
- 1. Do not mix controller benchmarks with retrieval leaderboards unless all
38
- compared systems receive equivalent controller affordances.
39
- 2. Do not quote latency without the embedding provider, dimensions, corpus size,
40
- recall mode, hardware, Node version, and whether warm caches were involved.
41
- 3. Treat abstention, deletion, overwrite, conflict resolution, and selective
42
- forgetting as first-class memory outcomes, not edge cases.
43
- 4. Prefer task evidence over vibe: raw JSON, artifacts, evaluator code, and
44
- reproduction commands should ship with every public benchmark claim.
45
- 5. For coding-agent memory, measure prevented mistakes and time-to-recovery, not
46
- only whether a stored fact was recalled.
47
-
48
- ## 0.24 Benchmark Targets
49
-
50
- - Add a LongMemEval adapter that can run a small public shard with mock and real
51
- embedding providers.
52
- - Add a MemoryAgentBench-style incremental harness with explicit selective
53
- forgetting and test-time learning cases.
54
- - Add structured-memory cases that force Audrey to maintain a ledger, checklist,
55
- or dependency tree across sessions.
56
- - Add an agent-tool benchmark where `beforeAction()` and `afterAction()` wrap a
57
- scripted coding workflow and score prevented repeats, blocked violations, and
58
- useful cautions.
59
- - Publish one reproducible external report before making any SOTA-style claim.