audrey 1.1.3 → 1.2.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.
- package/CHANGELOG.md +97 -0
- package/README.md +39 -12
- package/dist/mcp-server/codex-hooks-probe.d.ts +22 -0
- package/dist/mcp-server/codex-hooks-probe.d.ts.map +1 -0
- package/dist/mcp-server/codex-hooks-probe.js +160 -0
- package/dist/mcp-server/codex-hooks-probe.js.map +1 -0
- package/dist/mcp-server/config.d.ts +26 -2
- package/dist/mcp-server/config.d.ts.map +1 -1
- package/dist/mcp-server/config.js +54 -22
- package/dist/mcp-server/config.js.map +1 -1
- package/dist/mcp-server/hooks.d.ts +28 -0
- package/dist/mcp-server/hooks.d.ts.map +1 -1
- package/dist/mcp-server/hooks.js +91 -2
- package/dist/mcp-server/hooks.js.map +1 -1
- package/dist/mcp-server/index.d.ts +242 -2
- package/dist/mcp-server/index.d.ts.map +1 -1
- package/dist/mcp-server/index.js +806 -240
- package/dist/mcp-server/index.js.map +1 -1
- package/dist/mcp-server/tool-schemas.d.ts +32 -2
- package/dist/mcp-server/tool-schemas.d.ts.map +1 -1
- package/dist/mcp-server/tool-schemas.js +55 -0
- package/dist/mcp-server/tool-schemas.js.map +1 -1
- package/dist/src/audrey.d.ts +14 -2
- package/dist/src/audrey.d.ts.map +1 -1
- package/dist/src/audrey.js +152 -28
- package/dist/src/audrey.js.map +1 -1
- package/dist/src/autopilot.d.ts +22 -0
- package/dist/src/autopilot.d.ts.map +1 -1
- package/dist/src/autopilot.js +271 -50
- package/dist/src/autopilot.js.map +1 -1
- package/dist/src/capsule.d.ts +23 -0
- package/dist/src/capsule.d.ts.map +1 -1
- package/dist/src/capsule.js +56 -11
- package/dist/src/capsule.js.map +1 -1
- package/dist/src/confidence.d.ts +9 -1
- package/dist/src/confidence.d.ts.map +1 -1
- package/dist/src/confidence.js +16 -2
- package/dist/src/confidence.js.map +1 -1
- package/dist/src/consolidate.d.ts +4 -0
- package/dist/src/consolidate.d.ts.map +1 -1
- package/dist/src/consolidate.js +206 -34
- package/dist/src/consolidate.js.map +1 -1
- package/dist/src/controller.d.ts +17 -1
- package/dist/src/controller.d.ts.map +1 -1
- package/dist/src/controller.js +244 -128
- package/dist/src/controller.js.map +1 -1
- package/dist/src/db.d.ts.map +1 -1
- package/dist/src/db.js +233 -56
- package/dist/src/db.js.map +1 -1
- package/dist/src/encode.d.ts +2 -1
- package/dist/src/encode.d.ts.map +1 -1
- package/dist/src/encode.js +41 -4
- package/dist/src/encode.js.map +1 -1
- package/dist/src/events.d.ts +48 -1
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js +160 -62
- package/dist/src/events.js.map +1 -1
- package/dist/src/export.d.ts.map +1 -1
- package/dist/src/export.js +4 -4
- package/dist/src/export.js.map +1 -1
- package/dist/src/grounding.d.ts +111 -0
- package/dist/src/grounding.d.ts.map +1 -0
- package/dist/src/grounding.js +259 -0
- package/dist/src/grounding.js.map +1 -0
- package/dist/src/hybrid-recall.d.ts +16 -7
- package/dist/src/hybrid-recall.d.ts.map +1 -1
- package/dist/src/hybrid-recall.js +22 -11
- package/dist/src/hybrid-recall.js.map +1 -1
- package/dist/src/import.d.ts +10 -0
- package/dist/src/import.d.ts.map +1 -1
- package/dist/src/import.js +122 -22
- package/dist/src/import.js.map +1 -1
- package/dist/src/llm.d.ts.map +1 -1
- package/dist/src/llm.js +16 -0
- package/dist/src/llm.js.map +1 -1
- package/dist/src/preflight.d.ts.map +1 -1
- package/dist/src/preflight.js +89 -47
- package/dist/src/preflight.js.map +1 -1
- package/dist/src/project.d.ts +4 -1
- package/dist/src/project.d.ts.map +1 -1
- package/dist/src/project.js +65 -5
- package/dist/src/project.js.map +1 -1
- package/dist/src/recall.d.ts.map +1 -1
- package/dist/src/recall.js +138 -13
- package/dist/src/recall.js.map +1 -1
- package/dist/src/redact.d.ts +1 -1
- package/dist/src/redact.d.ts.map +1 -1
- package/dist/src/redact.js +185 -5
- package/dist/src/redact.js.map +1 -1
- package/dist/src/routes.d.ts.map +1 -1
- package/dist/src/routes.js +91 -18
- package/dist/src/routes.js.map +1 -1
- package/dist/src/trust.d.ts +35 -0
- package/dist/src/trust.d.ts.map +1 -0
- package/dist/src/trust.js +77 -0
- package/dist/src/trust.js.map +1 -0
- package/dist/src/types.d.ts +24 -0
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +3 -37
- package/benchmarks/adapter-kit.mjs +0 -20
- package/benchmarks/adapter-self-test.mjs +0 -170
- package/benchmarks/adapters/example-allow.mjs +0 -31
- package/benchmarks/adapters/mem0-platform.mjs +0 -274
- package/benchmarks/adapters/registry.json +0 -51
- package/benchmarks/adapters/zep-cloud.mjs +0 -304
- package/benchmarks/baselines.js +0 -174
- package/benchmarks/build-leaderboard.mjs +0 -183
- package/benchmarks/cases.js +0 -549
- package/benchmarks/create-conformance-card.mjs +0 -148
- package/benchmarks/create-submission-bundle.mjs +0 -190
- package/benchmarks/dry-run-external-adapters.mjs +0 -177
- package/benchmarks/guardbench.js +0 -1265
- package/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +0 -50
- package/benchmarks/output/external/guardbench-external-dry-run.json +0 -69
- package/benchmarks/output/external/guardbench-external-evidence.json +0 -56
- package/benchmarks/output/guardbench-conformance-card.json +0 -63
- package/benchmarks/output/guardbench-manifest.json +0 -414
- package/benchmarks/output/guardbench-raw.json +0 -1279
- package/benchmarks/output/guardbench-summary.json +0 -2123
- package/benchmarks/output/leaderboard/guardbench-leaderboard.json +0 -93
- package/benchmarks/output/leaderboard/guardbench-leaderboard.md +0 -7
- package/benchmarks/output/submission-bundle/guardbench-conformance-card.json +0 -63
- package/benchmarks/output/submission-bundle/guardbench-manifest.json +0 -414
- package/benchmarks/output/submission-bundle/guardbench-raw.json +0 -1279
- package/benchmarks/output/submission-bundle/guardbench-summary.json +0 -2123
- package/benchmarks/output/submission-bundle/schemas/guardbench-adapter-registry.schema.json +0 -69
- package/benchmarks/output/submission-bundle/schemas/guardbench-adapter-self-test.schema.json +0 -156
- package/benchmarks/output/submission-bundle/schemas/guardbench-conformance-card.schema.json +0 -184
- package/benchmarks/output/submission-bundle/schemas/guardbench-external-dry-run.schema.json +0 -74
- package/benchmarks/output/submission-bundle/schemas/guardbench-external-evidence.schema.json +0 -108
- package/benchmarks/output/submission-bundle/schemas/guardbench-external-run.schema.json +0 -160
- package/benchmarks/output/submission-bundle/schemas/guardbench-leaderboard.schema.json +0 -179
- package/benchmarks/output/submission-bundle/schemas/guardbench-manifest.schema.json +0 -213
- package/benchmarks/output/submission-bundle/schemas/guardbench-publication-verification.schema.json +0 -47
- package/benchmarks/output/submission-bundle/schemas/guardbench-raw.schema.json +0 -184
- package/benchmarks/output/submission-bundle/schemas/guardbench-submission-manifest.schema.json +0 -151
- package/benchmarks/output/submission-bundle/schemas/guardbench-summary.schema.json +0 -249
- package/benchmarks/output/submission-bundle/submission-manifest.json +0 -131
- package/benchmarks/output/submission-bundle/validation-report.json +0 -31
- package/benchmarks/output/summary.json +0 -2354
- package/benchmarks/perf-snapshot.js +0 -307
- package/benchmarks/perf.bench.js +0 -169
- package/benchmarks/public-paths.mjs +0 -97
- package/benchmarks/reference-results.js +0 -75
- package/benchmarks/report.js +0 -280
- package/benchmarks/run-external-guardbench.mjs +0 -303
- package/benchmarks/run.js +0 -735
- package/benchmarks/schemas/guardbench-adapter-registry.schema.json +0 -69
- package/benchmarks/schemas/guardbench-adapter-self-test.schema.json +0 -156
- package/benchmarks/schemas/guardbench-conformance-card.schema.json +0 -184
- package/benchmarks/schemas/guardbench-external-dry-run.schema.json +0 -74
- package/benchmarks/schemas/guardbench-external-evidence.schema.json +0 -108
- package/benchmarks/schemas/guardbench-external-run.schema.json +0 -160
- package/benchmarks/schemas/guardbench-leaderboard.schema.json +0 -179
- package/benchmarks/schemas/guardbench-manifest.schema.json +0 -213
- package/benchmarks/schemas/guardbench-publication-verification.schema.json +0 -47
- package/benchmarks/schemas/guardbench-raw.schema.json +0 -184
- package/benchmarks/schemas/guardbench-submission-manifest.schema.json +0 -151
- package/benchmarks/schemas/guardbench-summary.schema.json +0 -249
- package/benchmarks/snapshots/perf-0.22.2.json +0 -123
- package/benchmarks/snapshots/perf-0.23.0.json +0 -123
- package/benchmarks/validate-adapter-module.mjs +0 -107
- package/benchmarks/validate-adapter-registry.mjs +0 -145
- package/benchmarks/validate-adapter-self-test.mjs +0 -96
- package/benchmarks/validate-guardbench-artifacts.mjs +0 -400
- package/benchmarks/verify-external-evidence.mjs +0 -351
- package/benchmarks/verify-publication-artifacts.mjs +0 -309
- package/benchmarks/verify-submission-bundle.mjs +0 -172
- package/docs/AUDREY_PAPER_OUTLINE.md +0 -178
- package/docs/MEMORY_BENCHMARKING.md +0 -59
- package/docs/PRODUCTION_BACKLOG.md +0 -321
- package/docs/assets/audrey-feature-grid.jpg +0 -0
- package/docs/assets/audrey-logo.svg +0 -45
- package/docs/assets/audrey-wordmark.png +0 -0
- package/docs/paper/00-master.md +0 -48
- package/docs/paper/01-introduction.md +0 -27
- package/docs/paper/02-related-work.md +0 -47
- package/docs/paper/03-problem-definition.md +0 -108
- package/docs/paper/04-design.md +0 -164
- package/docs/paper/05-guardbench-spec.md +0 -412
- package/docs/paper/06-implementation.md +0 -115
- package/docs/paper/07-evaluation.md +0 -168
- package/docs/paper/08-discussion-limitations.md +0 -61
- package/docs/paper/09-conclusion.md +0 -11
- package/docs/paper/SUBMISSION_README.md +0 -162
- package/docs/paper/appendix-a-demo-transcript.md +0 -114
- package/docs/paper/arxiv-compile-report.schema.json +0 -116
- package/docs/paper/arxiv-source.schema.json +0 -61
- package/docs/paper/audrey-paper-v1.md +0 -1108
- package/docs/paper/browser-launch-plan.json +0 -209
- package/docs/paper/browser-launch-plan.schema.json +0 -100
- package/docs/paper/browser-launch-results.json +0 -86
- package/docs/paper/browser-launch-results.schema.json +0 -66
- package/docs/paper/claim-register.json +0 -138
- package/docs/paper/claim-register.schema.json +0 -81
- package/docs/paper/evidence-ledger.md +0 -103
- package/docs/paper/output/arxiv/README-arxiv.txt +0 -8
- package/docs/paper/output/arxiv/arxiv-manifest.json +0 -41
- package/docs/paper/output/arxiv/main.tex +0 -951
- package/docs/paper/output/arxiv/references.bib +0 -222
- package/docs/paper/output/arxiv-compile-report.json +0 -24
- package/docs/paper/output/submission-bundle/LICENSE +0 -21
- package/docs/paper/output/submission-bundle/README.md +0 -440
- package/docs/paper/output/submission-bundle/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +0 -50
- package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-dry-run.json +0 -69
- package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-evidence.json +0 -56
- package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-conformance-card.json +0 -63
- package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-manifest.json +0 -414
- package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-raw.json +0 -1279
- package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-summary.json +0 -2123
- package/docs/paper/output/submission-bundle/benchmarks/output/leaderboard/guardbench-leaderboard.json +0 -93
- package/docs/paper/output/submission-bundle/benchmarks/output/leaderboard/guardbench-leaderboard.md +0 -7
- package/docs/paper/output/submission-bundle/benchmarks/output/submission-bundle/submission-manifest.json +0 -131
- package/docs/paper/output/submission-bundle/benchmarks/output/submission-bundle/validation-report.json +0 -31
- package/docs/paper/output/submission-bundle/benchmarks/output/summary.json +0 -2354
- package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-adapter-registry.schema.json +0 -69
- package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-adapter-self-test.schema.json +0 -156
- package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-conformance-card.schema.json +0 -184
- package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-external-dry-run.schema.json +0 -74
- package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-external-evidence.schema.json +0 -108
- package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-external-run.schema.json +0 -160
- package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-leaderboard.schema.json +0 -179
- package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-manifest.schema.json +0 -213
- package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-publication-verification.schema.json +0 -47
- package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-raw.schema.json +0 -184
- package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-submission-manifest.schema.json +0 -151
- package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-summary.schema.json +0 -249
- package/docs/paper/output/submission-bundle/docs/AUDREY_PAPER_OUTLINE.md +0 -178
- package/docs/paper/output/submission-bundle/docs/paper/00-master.md +0 -48
- package/docs/paper/output/submission-bundle/docs/paper/01-introduction.md +0 -27
- package/docs/paper/output/submission-bundle/docs/paper/02-related-work.md +0 -47
- package/docs/paper/output/submission-bundle/docs/paper/03-problem-definition.md +0 -108
- package/docs/paper/output/submission-bundle/docs/paper/04-design.md +0 -164
- package/docs/paper/output/submission-bundle/docs/paper/05-guardbench-spec.md +0 -412
- package/docs/paper/output/submission-bundle/docs/paper/06-implementation.md +0 -115
- package/docs/paper/output/submission-bundle/docs/paper/07-evaluation.md +0 -168
- package/docs/paper/output/submission-bundle/docs/paper/08-discussion-limitations.md +0 -61
- package/docs/paper/output/submission-bundle/docs/paper/09-conclusion.md +0 -11
- package/docs/paper/output/submission-bundle/docs/paper/SUBMISSION_README.md +0 -162
- package/docs/paper/output/submission-bundle/docs/paper/appendix-a-demo-transcript.md +0 -114
- package/docs/paper/output/submission-bundle/docs/paper/arxiv-compile-report.schema.json +0 -116
- package/docs/paper/output/submission-bundle/docs/paper/arxiv-source.schema.json +0 -61
- package/docs/paper/output/submission-bundle/docs/paper/audrey-paper-v1.md +0 -1108
- package/docs/paper/output/submission-bundle/docs/paper/browser-launch-plan.json +0 -209
- package/docs/paper/output/submission-bundle/docs/paper/browser-launch-plan.schema.json +0 -100
- package/docs/paper/output/submission-bundle/docs/paper/browser-launch-results.json +0 -86
- package/docs/paper/output/submission-bundle/docs/paper/browser-launch-results.schema.json +0 -66
- package/docs/paper/output/submission-bundle/docs/paper/claim-register.json +0 -138
- package/docs/paper/output/submission-bundle/docs/paper/claim-register.schema.json +0 -81
- package/docs/paper/output/submission-bundle/docs/paper/evidence-ledger.md +0 -103
- package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/README-arxiv.txt +0 -8
- package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/arxiv-manifest.json +0 -41
- package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/main.tex +0 -951
- package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/references.bib +0 -222
- package/docs/paper/output/submission-bundle/docs/paper/output/arxiv-compile-report.json +0 -24
- package/docs/paper/output/submission-bundle/docs/paper/paper-submission-bundle.schema.json +0 -70
- package/docs/paper/output/submission-bundle/docs/paper/publication-pack.json +0 -81
- package/docs/paper/output/submission-bundle/docs/paper/publication-pack.schema.json +0 -60
- package/docs/paper/output/submission-bundle/docs/paper/references.bib +0 -222
- package/docs/paper/output/submission-bundle/package.json +0 -235
- package/docs/paper/output/submission-bundle/paper-submission-manifest.json +0 -379
- package/docs/paper/paper-submission-bundle.schema.json +0 -70
- package/docs/paper/publication-pack.json +0 -81
- package/docs/paper/publication-pack.schema.json +0 -60
- package/docs/paper/references.bib +0 -222
- package/scripts/audit-release-completion.mjs +0 -440
- package/scripts/create-arxiv-source.mjs +0 -368
- package/scripts/create-paper-submission-bundle.mjs +0 -214
- package/scripts/finalize-release.mjs +0 -601
- package/scripts/prepare-release-cut.mjs +0 -277
- package/scripts/publish-release-bundle.mjs +0 -252
- package/scripts/publish-release-github-api.mjs +0 -494
- package/scripts/run-vitest.mjs +0 -34
- package/scripts/smoke-cli.js +0 -92
- package/scripts/sync-paper-artifacts.mjs +0 -112
- package/scripts/verify-arxiv-compile.mjs +0 -476
- package/scripts/verify-arxiv-source.mjs +0 -224
- package/scripts/verify-browser-launch-plan.mjs +0 -254
- package/scripts/verify-browser-launch-results.mjs +0 -303
- package/scripts/verify-paper-artifacts.mjs +0 -798
- package/scripts/verify-paper-claims.mjs +0 -254
- package/scripts/verify-paper-submission-bundle.mjs +0 -218
- package/scripts/verify-publication-pack.mjs +0 -210
- package/scripts/verify-python-package.py +0 -201
- 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.
|