audrey 1.0.1 → 1.0.2
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 +30 -0
- package/README.md +5 -3
- package/benchmarks/adapter-self-test.mjs +6 -2
- package/benchmarks/adapters/example-allow.mjs +5 -2
- package/benchmarks/adapters/mem0-platform.mjs +19 -12
- package/benchmarks/adapters/zep-cloud.mjs +51 -27
- package/benchmarks/baselines.js +11 -6
- package/benchmarks/build-leaderboard.mjs +36 -23
- package/benchmarks/cases.js +24 -12
- package/benchmarks/create-conformance-card.mjs +12 -3
- package/benchmarks/create-submission-bundle.mjs +22 -8
- package/benchmarks/dry-run-external-adapters.mjs +24 -12
- package/benchmarks/guardbench.js +263 -123
- package/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +4 -4
- package/benchmarks/output/external/guardbench-external-dry-run.json +1 -1
- package/benchmarks/output/external/guardbench-external-evidence.json +1 -1
- package/benchmarks/output/guardbench-conformance-card.json +11 -11
- package/benchmarks/output/guardbench-raw.json +107 -108
- package/benchmarks/output/guardbench-summary.json +170 -172
- package/benchmarks/output/leaderboard/guardbench-leaderboard.json +5 -5
- package/benchmarks/output/leaderboard/guardbench-leaderboard.md +2 -2
- package/benchmarks/output/submission-bundle/guardbench-conformance-card.json +11 -11
- package/benchmarks/output/submission-bundle/guardbench-raw.json +107 -108
- package/benchmarks/output/submission-bundle/guardbench-summary.json +170 -172
- package/benchmarks/output/submission-bundle/submission-manifest.json +11 -11
- package/benchmarks/output/submission-bundle/validation-report.json +1 -1
- package/benchmarks/output/summary.json +57 -57
- package/benchmarks/perf-snapshot.js +12 -9
- package/benchmarks/perf.bench.js +14 -6
- package/benchmarks/public-paths.mjs +11 -5
- package/benchmarks/reference-results.js +10 -5
- package/benchmarks/report.js +48 -27
- package/benchmarks/run-external-guardbench.mjs +47 -25
- package/benchmarks/run.js +112 -59
- package/benchmarks/validate-adapter-module.mjs +13 -10
- package/benchmarks/validate-adapter-registry.mjs +16 -5
- package/benchmarks/validate-guardbench-artifacts.mjs +76 -19
- package/benchmarks/verify-external-evidence.mjs +86 -31
- package/benchmarks/verify-publication-artifacts.mjs +34 -11
- package/benchmarks/verify-submission-bundle.mjs +9 -4
- package/dist/mcp-server/config.d.ts +1 -1
- package/dist/mcp-server/config.d.ts.map +1 -1
- package/dist/mcp-server/config.js +5 -3
- package/dist/mcp-server/config.js.map +1 -1
- package/dist/mcp-server/index.d.ts +4 -3
- package/dist/mcp-server/index.d.ts.map +1 -1
- package/dist/mcp-server/index.js +479 -172
- package/dist/mcp-server/index.js.map +1 -1
- package/dist/src/action-key.d.ts.map +1 -1
- package/dist/src/action-key.js +6 -2
- package/dist/src/action-key.js.map +1 -1
- package/dist/src/adaptive.d.ts.map +1 -1
- package/dist/src/adaptive.js +4 -2
- package/dist/src/adaptive.js.map +1 -1
- package/dist/src/affect.d.ts.map +1 -1
- package/dist/src/affect.js +8 -5
- package/dist/src/affect.js.map +1 -1
- package/dist/src/audrey.d.ts +1 -1
- package/dist/src/audrey.d.ts.map +1 -1
- package/dist/src/audrey.js +93 -49
- package/dist/src/audrey.js.map +1 -1
- package/dist/src/capsule.d.ts.map +1 -1
- package/dist/src/capsule.js +37 -15
- package/dist/src/capsule.js.map +1 -1
- package/dist/src/causal.d.ts +1 -1
- package/dist/src/causal.d.ts.map +1 -1
- package/dist/src/causal.js +4 -2
- package/dist/src/causal.js.map +1 -1
- package/dist/src/confidence.d.ts.map +1 -1
- package/dist/src/confidence.js +5 -5
- package/dist/src/confidence.js.map +1 -1
- package/dist/src/consolidate.d.ts.map +1 -1
- package/dist/src/consolidate.js +17 -9
- package/dist/src/consolidate.js.map +1 -1
- package/dist/src/context.js +1 -1
- package/dist/src/context.js.map +1 -1
- package/dist/src/controller.d.ts.map +1 -1
- package/dist/src/controller.js +24 -13
- package/dist/src/controller.js.map +1 -1
- package/dist/src/db.d.ts.map +1 -1
- package/dist/src/db.js +78 -27
- package/dist/src/db.js.map +1 -1
- package/dist/src/decay.d.ts +1 -1
- package/dist/src/decay.d.ts.map +1 -1
- package/dist/src/decay.js +1 -1
- package/dist/src/decay.js.map +1 -1
- package/dist/src/embedding.d.ts +12 -4
- package/dist/src/embedding.d.ts.map +1 -1
- package/dist/src/embedding.js +18 -16
- package/dist/src/embedding.js.map +1 -1
- package/dist/src/encode.d.ts.map +1 -1
- package/dist/src/encode.js +5 -4
- package/dist/src/encode.js.map +1 -1
- package/dist/src/events.d.ts +3 -2
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js +7 -3
- package/dist/src/events.js.map +1 -1
- package/dist/src/export.d.ts.map +1 -1
- package/dist/src/export.js +21 -7
- package/dist/src/export.js.map +1 -1
- package/dist/src/feedback.d.ts.map +1 -1
- package/dist/src/feedback.js +1 -1
- package/dist/src/feedback.js.map +1 -1
- package/dist/src/forget.d.ts.map +1 -1
- package/dist/src/forget.js +12 -6
- package/dist/src/forget.js.map +1 -1
- package/dist/src/fts.d.ts.map +1 -1
- package/dist/src/fts.js +20 -8
- package/dist/src/fts.js.map +1 -1
- package/dist/src/hybrid-recall.d.ts.map +1 -1
- package/dist/src/hybrid-recall.js +12 -6
- package/dist/src/hybrid-recall.js.map +1 -1
- package/dist/src/impact.d.ts.map +1 -1
- package/dist/src/impact.js +26 -10
- package/dist/src/impact.js.map +1 -1
- package/dist/src/import.d.ts.map +1 -1
- package/dist/src/import.js +11 -6
- package/dist/src/import.js.map +1 -1
- package/dist/src/index.d.ts +3 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/interference.d.ts.map +1 -1
- package/dist/src/interference.js +10 -5
- package/dist/src/interference.js.map +1 -1
- package/dist/src/introspect.d.ts.map +1 -1
- package/dist/src/introspect.js +12 -6
- package/dist/src/introspect.js.map +1 -1
- package/dist/src/llm.d.ts +2 -2
- package/dist/src/llm.d.ts.map +1 -1
- package/dist/src/llm.js +6 -6
- package/dist/src/llm.js.map +1 -1
- package/dist/src/migrate.d.ts.map +1 -1
- package/dist/src/migrate.js +10 -4
- package/dist/src/migrate.js.map +1 -1
- package/dist/src/preflight.d.ts.map +1 -1
- package/dist/src/preflight.js +6 -8
- package/dist/src/preflight.js.map +1 -1
- package/dist/src/profile.d.ts.map +1 -1
- package/dist/src/profile.js.map +1 -1
- package/dist/src/promote.d.ts.map +1 -1
- package/dist/src/promote.js +16 -7
- package/dist/src/promote.js.map +1 -1
- package/dist/src/prompts.d.ts.map +1 -1
- package/dist/src/prompts.js +1 -2
- package/dist/src/prompts.js.map +1 -1
- package/dist/src/recall.d.ts.map +1 -1
- package/dist/src/recall.js +85 -18
- package/dist/src/recall.js.map +1 -1
- package/dist/src/redact.d.ts.map +1 -1
- package/dist/src/redact.js +9 -4
- package/dist/src/redact.js.map +1 -1
- package/dist/src/reflexes.d.ts.map +1 -1
- package/dist/src/reflexes.js +1 -7
- package/dist/src/reflexes.js.map +1 -1
- package/dist/src/rollback.d.ts.map +1 -1
- package/dist/src/rollback.js +4 -2
- package/dist/src/rollback.js.map +1 -1
- package/dist/src/routes.d.ts.map +1 -1
- package/dist/src/routes.js +33 -13
- package/dist/src/routes.js.map +1 -1
- package/dist/src/rules-compiler.d.ts.map +1 -1
- package/dist/src/rules-compiler.js +24 -2
- package/dist/src/rules-compiler.js.map +1 -1
- package/dist/src/server.js +2 -2
- package/dist/src/server.js.map +1 -1
- package/dist/src/tool-trace.d.ts +2 -2
- package/dist/src/tool-trace.d.ts.map +1 -1
- package/dist/src/tool-trace.js +12 -4
- package/dist/src/tool-trace.js.map +1 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/ulid.js +1 -1
- package/dist/src/ulid.js.map +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js.map +1 -1
- package/dist/src/validate.d.ts.map +1 -1
- package/dist/src/validate.js +20 -10
- package/dist/src/validate.js.map +1 -1
- package/docs/paper/07-evaluation.md +5 -5
- package/docs/paper/audrey-paper-v1.md +5 -5
- package/docs/paper/evidence-ledger.md +1 -1
- package/docs/paper/output/arxiv/arxiv-manifest.json +4 -4
- package/docs/paper/output/arxiv/main.tex +5 -5
- package/docs/paper/output/arxiv-compile-report.json +3 -3
- package/docs/paper/output/submission-bundle/README.md +5 -3
- package/docs/paper/output/submission-bundle/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +4 -4
- package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-dry-run.json +1 -1
- package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-evidence.json +1 -1
- package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-conformance-card.json +11 -11
- package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-raw.json +107 -108
- package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-summary.json +170 -172
- package/docs/paper/output/submission-bundle/benchmarks/output/leaderboard/guardbench-leaderboard.json +5 -5
- package/docs/paper/output/submission-bundle/benchmarks/output/leaderboard/guardbench-leaderboard.md +2 -2
- package/docs/paper/output/submission-bundle/benchmarks/output/submission-bundle/submission-manifest.json +11 -11
- package/docs/paper/output/submission-bundle/benchmarks/output/submission-bundle/validation-report.json +1 -1
- package/docs/paper/output/submission-bundle/benchmarks/output/summary.json +58 -58
- package/docs/paper/output/submission-bundle/docs/paper/07-evaluation.md +5 -5
- package/docs/paper/output/submission-bundle/docs/paper/audrey-paper-v1.md +5 -5
- package/docs/paper/output/submission-bundle/docs/paper/evidence-ledger.md +1 -1
- package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/arxiv-manifest.json +4 -4
- package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/main.tex +5 -5
- package/docs/paper/output/submission-bundle/docs/paper/output/arxiv-compile-report.json +3 -3
- package/docs/paper/output/submission-bundle/package.json +17 -4
- package/docs/paper/output/submission-bundle/paper-submission-manifest.json +36 -36
- package/examples/fintech-ops-demo.js +12 -5
- package/examples/healthcare-ops-demo.js +8 -4
- package/examples/ollama-memory-agent.js +41 -13
- package/examples/stripe-demo.js +12 -5
- package/package.json +17 -4
- package/scripts/audit-release-completion.mjs +179 -101
- package/scripts/create-arxiv-source.mjs +20 -14
- package/scripts/create-paper-submission-bundle.mjs +6 -2
- package/scripts/finalize-release.mjs +111 -36
- package/scripts/prepare-release-cut.mjs +14 -6
- package/scripts/publish-release-bundle.mjs +62 -23
- package/scripts/publish-release-github-api.mjs +89 -24
- package/scripts/smoke-cli.js +9 -9
- package/scripts/sync-paper-artifacts.mjs +5 -1
- package/scripts/verify-arxiv-compile.mjs +52 -16
- package/scripts/verify-arxiv-source.mjs +45 -15
- package/scripts/verify-browser-launch-plan.mjs +28 -11
- package/scripts/verify-browser-launch-results.mjs +32 -14
- package/scripts/verify-paper-artifacts.mjs +539 -79
- package/scripts/verify-paper-claims.mjs +48 -20
- package/scripts/verify-paper-submission-bundle.mjs +22 -11
- package/scripts/verify-publication-pack.mjs +23 -9
- package/scripts/verify-release-readiness.mjs +211 -76
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"suite": "Audrey arXiv source package",
|
|
4
|
-
"generatedAt": "2026-05-
|
|
4
|
+
"generatedAt": "2026-05-29T03:45:42.097Z",
|
|
5
5
|
"sourceMarkdown": "docs/paper/audrey-paper-v1.md",
|
|
6
6
|
"publicationPack": "docs/paper/publication-pack.json",
|
|
7
7
|
"sourceHashes": {
|
|
8
|
-
"sourceMarkdown": "
|
|
8
|
+
"sourceMarkdown": "f2afc1cda24b1ba91cf39429e7836ead97c7a1c815b294b3d623bb20d8f5e7e6",
|
|
9
9
|
"publicationPack": "a1a523d5938faea72be568b843ac3890e61cea6070b0cfa46acf22ad3d2fb974",
|
|
10
10
|
"referencesBib": "c0bfcaf7bfe37d6933c812e46352be8a95397eaa430a0f5bc94037600a53f654"
|
|
11
11
|
},
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
{
|
|
14
14
|
"path": "main.tex",
|
|
15
15
|
"source": "docs/paper/audrey-paper-v1.md",
|
|
16
|
-
"bytes":
|
|
17
|
-
"sha256": "
|
|
16
|
+
"bytes": 122667,
|
|
17
|
+
"sha256": "e3ee98ea8c523e8f394b8fbbc73e206f0d6126b7349df5669206d4d48d9feea6"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"path": "references.bib",
|
|
@@ -729,13 +729,13 @@ These numbers measure Audrey's local call path under an in-process mock embeddin
|
|
|
729
729
|
|
|
730
730
|
\subsection{Behavioral Regression Result}
|
|
731
731
|
|
|
732
|
-
The current \texttt{benchmarks/output/summary.json} was generated on 2026-05-
|
|
732
|
+
The current \texttt{benchmarks/output/summary.json} was generated on 2026-05-29T03:45:32.997Z with command \texttt{node benchmarks/run.js --provider mock --dimensions 64} (Ledger: E24). It reports:
|
|
733
733
|
|
|
734
734
|
\begin{verbatim}
|
|
735
735
|
| System | Score Percent | Pass Rate | Average Duration Ms |
|
|
736
|
-
| Audrey | 100 | 100 |
|
|
737
|
-
| Vector Only | 41.66666666666667 | 25 | 0.
|
|
738
|
-
| Keyword + Recency | 41.66666666666667 | 25 | 0.
|
|
736
|
+
| Audrey | 100 | 100 | 15.416666666666666 |
|
|
737
|
+
| Vector Only | 41.66666666666667 | 25 | 0.3333333333333333 |
|
|
738
|
+
| Keyword + Recency | 41.66666666666667 | 25 | 0.6666666666666666 |
|
|
739
739
|
| Recent Window | 37.5 | 25 | 0 |
|
|
740
740
|
\end{verbatim}
|
|
741
741
|
|
|
@@ -759,7 +759,7 @@ It reports local adapters only, not external-system comparisons (Ledger: E46):
|
|
|
759
759
|
| Evidence recall | 100% |
|
|
760
760
|
| Redaction leaks | 0 |
|
|
761
761
|
| Recall-degradation detection | 100% |
|
|
762
|
-
| Guard latency p50 / p95 | 2.
|
|
762
|
+
| Guard latency p50 / p95 | 2.916 ms / 21.17 ms |
|
|
763
763
|
| Published artifact raw-secret leaks | 0 |
|
|
764
764
|
| Audrey Guard decision accuracy | 100% |
|
|
765
765
|
| No-memory decision accuracy | 10% |
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"suite": "Audrey arXiv compile check",
|
|
4
|
-
"generatedAt": "2026-05-
|
|
4
|
+
"generatedAt": "2026-05-29T03:45:42.412Z",
|
|
5
5
|
"source": {
|
|
6
6
|
"sourceDir": "docs/paper/output/arxiv",
|
|
7
7
|
"manifest": "docs/paper/output/arxiv/arxiv-manifest.json",
|
|
8
|
-
"manifestSha256": "
|
|
8
|
+
"manifestSha256": "6364c368755a4188d5b2deea9e3fe80201f5fa55658e6ae570141e54c5293bc6",
|
|
9
9
|
"mainTex": "docs/paper/output/arxiv/main.tex",
|
|
10
|
-
"mainTexSha256": "
|
|
10
|
+
"mainTexSha256": "e3ee98ea8c523e8f394b8fbbc73e206f0d6126b7349df5669206d4d48d9feea6",
|
|
11
11
|
"referencesBib": "docs/paper/output/arxiv/references.bib",
|
|
12
12
|
"referencesBibSha256": "c0bfcaf7bfe37d6933c812e46352be8a95397eaa430a0f5bc94037600a53f654"
|
|
13
13
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "audrey",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Local-first memory runtime for AI agents with recall, consolidation, memory reflexes, contradiction detection, and tool-trace learning",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"test": "node scripts/run-vitest.mjs",
|
|
73
73
|
"test:watch": "node scripts/run-vitest.mjs watch",
|
|
74
74
|
"test:artifacts": "npm run bench:perf && npm run bench:memory:check && npm run bench:guard:check && npm run bench:guard:card && npm run bench:guard:bundle && npm run bench:guard:bundle:verify && npm run bench:guard:leaderboard && npm run bench:guard:adapter-self-test && npm run bench:guard:adapter-self-test:validate && npm run bench:guard:external:dry-run && npm run bench:guard:external:evidence && npm run paper:sync && npm run paper:arxiv && npm run paper:arxiv:verify && npm run paper:arxiv:compile && npm run paper:bundle && npm run paper:bundle:verify && npm run paper:verify",
|
|
75
|
-
"release:gate": "npm run typecheck && npm test && npm run bench:memory:check && npm run bench:guard:check && npm run bench:guard:card && npm run bench:guard:bundle && npm run bench:guard:bundle:verify && npm run bench:guard:leaderboard && npm run bench:guard:adapter-registry:validate && npm run bench:guard:external:dry-run && npm run bench:guard:external:evidence && npm run bench:guard:adapter-module:validate && npm run bench:guard:adapter-self-test && npm run bench:guard:adapter-self-test:validate && npm run bench:guard:validate && npm run bench:guard:publication:verify && npm run python:release:check && npm run smoke:cli && npm run security:audit && npm run pack:check",
|
|
76
|
-
"release:gate:sandbox": "npm run build && npm run typecheck && npm run bench:perf && npm run bench:memory:check && npm run bench:guard:check && npm run bench:guard:card && npm run bench:guard:bundle && npm run bench:guard:bundle:verify && npm run bench:guard:leaderboard && npm run bench:guard:adapter-registry:validate && npm run bench:guard:external:dry-run && npm run bench:guard:external:evidence && npm run bench:guard:adapter-module:validate && npm run bench:guard:adapter-self-test && npm run bench:guard:adapter-self-test:validate && npm run bench:guard:validate && npm run bench:guard:publication:verify && npm run python:release:check && npm run smoke:cli && npm run security:audit && npm run pack:check",
|
|
77
|
-
"release:gate:paper": "npm run build && npm run typecheck && npm run bench:perf && npm run bench:memory:check && npm run bench:guard:check && npm run bench:guard:card && npm run bench:guard:bundle && npm run bench:guard:bundle:verify && npm run bench:guard:leaderboard && npm run bench:guard:adapter-registry:validate && npm run bench:guard:external:dry-run && npm run bench:guard:external:evidence && npm run bench:guard:adapter-module:validate && npm run bench:guard:adapter-self-test && npm run bench:guard:adapter-self-test:validate && npm run bench:guard:validate && npm run bench:guard:publication:verify && npm run python:release:check && npm run paper:sync && npm run paper:arxiv && npm run paper:arxiv:verify && npm run paper:arxiv:compile && npm run paper:launch-plan && npm run paper:launch-results && npm run paper:bundle && npm run paper:bundle:verify && npm run paper:verify && npm run release:readiness && npm run smoke:cli && npm run security:audit && npm run pack:check",
|
|
75
|
+
"release:gate": "npm run typecheck && npm run lint && npm run format:check && npm test && npm run bench:memory:check && npm run bench:guard:check && npm run bench:guard:card && npm run bench:guard:bundle && npm run bench:guard:bundle:verify && npm run bench:guard:leaderboard && npm run bench:guard:adapter-registry:validate && npm run bench:guard:external:dry-run && npm run bench:guard:external:evidence && npm run bench:guard:adapter-module:validate && npm run bench:guard:adapter-self-test && npm run bench:guard:adapter-self-test:validate && npm run bench:guard:validate && npm run bench:guard:publication:verify && npm run python:release:check && npm run smoke:cli && npm run security:audit && npm run pack:check",
|
|
76
|
+
"release:gate:sandbox": "npm run build && npm run typecheck && npm run lint && npm run format:check && npm run bench:perf && npm run bench:memory:check && npm run bench:guard:check && npm run bench:guard:card && npm run bench:guard:bundle && npm run bench:guard:bundle:verify && npm run bench:guard:leaderboard && npm run bench:guard:adapter-registry:validate && npm run bench:guard:external:dry-run && npm run bench:guard:external:evidence && npm run bench:guard:adapter-module:validate && npm run bench:guard:adapter-self-test && npm run bench:guard:adapter-self-test:validate && npm run bench:guard:validate && npm run bench:guard:publication:verify && npm run python:release:check && npm run smoke:cli && npm run security:audit && npm run pack:check",
|
|
77
|
+
"release:gate:paper": "npm run build && npm run typecheck && npm run lint && npm run format:check && npm run bench:perf && npm run bench:memory:check && npm run bench:guard:check && npm run bench:guard:card && npm run bench:guard:bundle && npm run bench:guard:bundle:verify && npm run bench:guard:leaderboard && npm run bench:guard:adapter-registry:validate && npm run bench:guard:external:dry-run && npm run bench:guard:external:evidence && npm run bench:guard:adapter-module:validate && npm run bench:guard:adapter-self-test && npm run bench:guard:adapter-self-test:validate && npm run bench:guard:validate && npm run bench:guard:publication:verify && npm run python:release:check && npm run paper:sync && npm run paper:arxiv && npm run paper:arxiv:verify && npm run paper:arxiv:compile && npm run paper:launch-plan && npm run paper:launch-results && npm run paper:bundle && npm run paper:bundle:verify && npm run paper:verify && npm run release:readiness && npm run smoke:cli && npm run security:audit && npm run pack:check",
|
|
78
78
|
"release:cut:plan": "node scripts/prepare-release-cut.mjs --json",
|
|
79
79
|
"release:cut:apply": "node scripts/prepare-release-cut.mjs --apply",
|
|
80
80
|
"release:readiness": "node scripts/verify-release-readiness.mjs --allow-pending",
|
|
@@ -135,6 +135,10 @@
|
|
|
135
135
|
"paper:sync": "node scripts/sync-paper-artifacts.mjs",
|
|
136
136
|
"paper:verify": "node scripts/verify-paper-artifacts.mjs",
|
|
137
137
|
"typecheck": "tsc --noEmit",
|
|
138
|
+
"lint": "eslint .",
|
|
139
|
+
"lint:fix": "eslint . --fix",
|
|
140
|
+
"format": "prettier --write \"src/**/*.ts\" \"mcp-server/**/*.ts\" \"tests/**/*.js\" \"benchmarks/**/*.{js,mjs}\" \"scripts/**/*.{js,mjs}\" \"examples/**/*.js\" \"*.{js,mjs}\" \".prettierrc.json\"",
|
|
141
|
+
"format:check": "prettier --check \"src/**/*.ts\" \"mcp-server/**/*.ts\" \"tests/**/*.js\" \"benchmarks/**/*.{js,mjs}\" \"scripts/**/*.{js,mjs}\" \"examples/**/*.js\" \"*.{js,mjs}\" \".prettierrc.json\"",
|
|
138
142
|
"serve": "node dist/mcp-server/index.js serve",
|
|
139
143
|
"docker:build": "docker build -t audrey:local .",
|
|
140
144
|
"docker:up": "docker compose up -d --build",
|
|
@@ -200,11 +204,20 @@
|
|
|
200
204
|
"zod": "^4.4.3"
|
|
201
205
|
},
|
|
202
206
|
"devDependencies": {
|
|
207
|
+
"@eslint/js": "^10.0.1",
|
|
203
208
|
"@types/better-sqlite3": "^7.6.13",
|
|
204
209
|
"@types/node": "^25.6.2",
|
|
210
|
+
"eslint": "^10.4.0",
|
|
211
|
+
"eslint-config-prettier": "^10.1.8",
|
|
212
|
+
"globals": "^17.6.0",
|
|
213
|
+
"prettier": "^3.8.3",
|
|
205
214
|
"typescript": "^6.0.3",
|
|
215
|
+
"typescript-eslint": "^8.60.0",
|
|
206
216
|
"vitest": "^4.1.5"
|
|
207
217
|
},
|
|
218
|
+
"overrides": {
|
|
219
|
+
"qs": "^6.15.2"
|
|
220
|
+
},
|
|
208
221
|
"directories": {
|
|
209
222
|
"example": "examples",
|
|
210
223
|
"test": "tests"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"suite": "Audrey paper submission bundle",
|
|
4
|
-
"generatedAt": "2026-05-
|
|
4
|
+
"generatedAt": "2026-05-29T03:45:42.799Z",
|
|
5
5
|
"sourceRoot": ".",
|
|
6
6
|
"outDir": "docs/paper/output/submission-bundle",
|
|
7
7
|
"claimVerification": {
|
|
@@ -17,33 +17,33 @@
|
|
|
17
17
|
"scenarios": 10,
|
|
18
18
|
"redactionLeaks": 0,
|
|
19
19
|
"artifactLeaks": 0,
|
|
20
|
-
"latencyP50Ms": 2.
|
|
21
|
-
"latencyP95Ms":
|
|
20
|
+
"latencyP50Ms": 2.916,
|
|
21
|
+
"latencyP95Ms": 21.17
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
{
|
|
25
25
|
"path": "benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json",
|
|
26
26
|
"source": "benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json",
|
|
27
|
-
"bytes":
|
|
28
|
-
"sha256": "
|
|
27
|
+
"bytes": 1266,
|
|
28
|
+
"sha256": "5e17a9311141e22d1df5e86a802c29981d9bd6427de3ed3af00bee3d75f2011c"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"path": "benchmarks/output/external/guardbench-external-dry-run.json",
|
|
32
32
|
"source": "benchmarks/output/external/guardbench-external-dry-run.json",
|
|
33
33
|
"bytes": 1831,
|
|
34
|
-
"sha256": "
|
|
34
|
+
"sha256": "32eaacbacf59ad6046e442bae6ab72920806f8607a1439170203ef46b6f18d7c"
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"path": "benchmarks/output/external/guardbench-external-evidence.json",
|
|
38
38
|
"source": "benchmarks/output/external/guardbench-external-evidence.json",
|
|
39
39
|
"bytes": 1638,
|
|
40
|
-
"sha256": "
|
|
40
|
+
"sha256": "617e4f00748b5c563a9c0a146b91712369854b6b00d4a72fe0375a37260966e8"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"path": "benchmarks/output/guardbench-conformance-card.json",
|
|
44
44
|
"source": "benchmarks/output/guardbench-conformance-card.json",
|
|
45
|
-
"bytes":
|
|
46
|
-
"sha256": "
|
|
45
|
+
"bytes": 1733,
|
|
46
|
+
"sha256": "a32ce0a46b2f031e827caa0896fdd6a870acf92f6bccb481ca661a3ea4b74a79"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"path": "benchmarks/output/guardbench-manifest.json",
|
|
@@ -54,44 +54,44 @@
|
|
|
54
54
|
{
|
|
55
55
|
"path": "benchmarks/output/guardbench-raw.json",
|
|
56
56
|
"source": "benchmarks/output/guardbench-raw.json",
|
|
57
|
-
"bytes":
|
|
58
|
-
"sha256": "
|
|
57
|
+
"bytes": 43407,
|
|
58
|
+
"sha256": "15b39fd1a65709a89455fbfcaf815daf364b204fa526d5065cc12fcaed281d28"
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"path": "benchmarks/output/guardbench-summary.json",
|
|
62
62
|
"source": "benchmarks/output/guardbench-summary.json",
|
|
63
|
-
"bytes":
|
|
64
|
-
"sha256": "
|
|
63
|
+
"bytes": 69260,
|
|
64
|
+
"sha256": "e8669cd6c80dc3dc849b3c4fcc473ea706eb3a760bced69682d0dc2396b2e233"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
"path": "benchmarks/output/leaderboard/guardbench-leaderboard.json",
|
|
68
68
|
"source": "benchmarks/output/leaderboard/guardbench-leaderboard.json",
|
|
69
|
-
"bytes":
|
|
70
|
-
"sha256": "
|
|
69
|
+
"bytes": 2796,
|
|
70
|
+
"sha256": "4468365e70f156f01e202721644f5e6d273b8482bc740e15b484484acde33ef9"
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"path": "benchmarks/output/leaderboard/guardbench-leaderboard.md",
|
|
74
74
|
"source": "benchmarks/output/leaderboard/guardbench-leaderboard.md",
|
|
75
|
-
"bytes":
|
|
76
|
-
"sha256": "
|
|
75
|
+
"bytes": 363,
|
|
76
|
+
"sha256": "e492fd96572fa8b2464357aad7b3f3c7e321ad42a11a18b9a343b23b349fc4be"
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
"path": "benchmarks/output/submission-bundle/submission-manifest.json",
|
|
80
80
|
"source": "benchmarks/output/submission-bundle/submission-manifest.json",
|
|
81
|
-
"bytes":
|
|
82
|
-
"sha256": "
|
|
81
|
+
"bytes": 3984,
|
|
82
|
+
"sha256": "cc43138aef6db9998079d5b7b638861af497f43e737f731f52fc0fd4abd00da8"
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
"path": "benchmarks/output/submission-bundle/validation-report.json",
|
|
86
86
|
"source": "benchmarks/output/submission-bundle/validation-report.json",
|
|
87
87
|
"bytes": 739,
|
|
88
|
-
"sha256": "
|
|
88
|
+
"sha256": "6f6c385d8db108b1a5e30de389a1131bece70ccb18c552a5f005f7dbe377d695"
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
"path": "benchmarks/output/summary.json",
|
|
92
92
|
"source": "benchmarks/output/summary.json",
|
|
93
|
-
"bytes":
|
|
94
|
-
"sha256": "
|
|
93
|
+
"bytes": 100748,
|
|
94
|
+
"sha256": "8ad41efec05b0f099a818e64fd191707be5bf6317d41fc353869df10c18918c7"
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
"path": "benchmarks/schemas/guardbench-adapter-registry.schema.json",
|
|
@@ -216,8 +216,8 @@
|
|
|
216
216
|
{
|
|
217
217
|
"path": "docs/paper/07-evaluation.md",
|
|
218
218
|
"source": "docs/paper/07-evaluation.md",
|
|
219
|
-
"bytes":
|
|
220
|
-
"sha256": "
|
|
219
|
+
"bytes": 11268,
|
|
220
|
+
"sha256": "4e712ef36a936df5034c67aff5c0167013aeb0b843067b6499ab7f47c2cb39e7"
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
223
|
"path": "docs/paper/08-discussion-limitations.md",
|
|
@@ -252,8 +252,8 @@
|
|
|
252
252
|
{
|
|
253
253
|
"path": "docs/paper/audrey-paper-v1.md",
|
|
254
254
|
"source": "docs/paper/audrey-paper-v1.md",
|
|
255
|
-
"bytes":
|
|
256
|
-
"sha256": "
|
|
255
|
+
"bytes": 116616,
|
|
256
|
+
"sha256": "f2afc1cda24b1ba91cf39429e7836ead97c7a1c815b294b3d623bb20d8f5e7e6"
|
|
257
257
|
},
|
|
258
258
|
{
|
|
259
259
|
"path": "docs/paper/browser-launch-plan.json",
|
|
@@ -294,26 +294,26 @@
|
|
|
294
294
|
{
|
|
295
295
|
"path": "docs/paper/evidence-ledger.md",
|
|
296
296
|
"source": "docs/paper/evidence-ledger.md",
|
|
297
|
-
"bytes":
|
|
298
|
-
"sha256": "
|
|
297
|
+
"bytes": 61843,
|
|
298
|
+
"sha256": "3dbf5d3b80937b468da063df7b884ba2d8a0d1e52d2c0d27a3a60f287cfdd9a2"
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
301
|
"path": "docs/paper/output/arxiv-compile-report.json",
|
|
302
302
|
"source": "docs/paper/output/arxiv-compile-report.json",
|
|
303
303
|
"bytes": 924,
|
|
304
|
-
"sha256": "
|
|
304
|
+
"sha256": "245aef38f5f4edca073731ed0c35560a7a3f67b0be52571e0bee172d155d7b99"
|
|
305
305
|
},
|
|
306
306
|
{
|
|
307
307
|
"path": "docs/paper/output/arxiv/arxiv-manifest.json",
|
|
308
308
|
"source": "docs/paper/output/arxiv/arxiv-manifest.json",
|
|
309
309
|
"bytes": 1316,
|
|
310
|
-
"sha256": "
|
|
310
|
+
"sha256": "6364c368755a4188d5b2deea9e3fe80201f5fa55658e6ae570141e54c5293bc6"
|
|
311
311
|
},
|
|
312
312
|
{
|
|
313
313
|
"path": "docs/paper/output/arxiv/main.tex",
|
|
314
314
|
"source": "docs/paper/output/arxiv/main.tex",
|
|
315
|
-
"bytes":
|
|
316
|
-
"sha256": "
|
|
315
|
+
"bytes": 122667,
|
|
316
|
+
"sha256": "e3ee98ea8c523e8f394b8fbbc73e206f0d6126b7349df5669206d4d48d9feea6"
|
|
317
317
|
},
|
|
318
318
|
{
|
|
319
319
|
"path": "docs/paper/output/arxiv/README-arxiv.txt",
|
|
@@ -366,14 +366,14 @@
|
|
|
366
366
|
{
|
|
367
367
|
"path": "package.json",
|
|
368
368
|
"source": "package.json",
|
|
369
|
-
"bytes":
|
|
370
|
-
"sha256": "
|
|
369
|
+
"bytes": 12529,
|
|
370
|
+
"sha256": "08eed72a235182d32ee495c7fea7f98d5641d855ef387f36f8a57adfbd10eb4e"
|
|
371
371
|
},
|
|
372
372
|
{
|
|
373
373
|
"path": "README.md",
|
|
374
374
|
"source": "README.md",
|
|
375
|
-
"bytes":
|
|
376
|
-
"sha256": "
|
|
375
|
+
"bytes": 26368,
|
|
376
|
+
"sha256": "4a0c524c65557c042f1752d29c668dfa3656fba6c53be335e50adefc8e9d3597"
|
|
377
377
|
}
|
|
378
378
|
]
|
|
379
379
|
}
|
|
@@ -11,7 +11,8 @@ async function demo() {
|
|
|
11
11
|
|
|
12
12
|
console.log('--- Encoding payment-operations incidents ---');
|
|
13
13
|
await brain.encode({
|
|
14
|
-
content:
|
|
14
|
+
content:
|
|
15
|
+
'Processor X returned HTTP 429 when payout retries exceeded 120 requests per minute for marketplace merchants.',
|
|
15
16
|
source: 'direct-observation',
|
|
16
17
|
salience: 0.9,
|
|
17
18
|
tags: ['payments', 'payouts', 'rate-limit'],
|
|
@@ -19,7 +20,8 @@ async function demo() {
|
|
|
19
20
|
});
|
|
20
21
|
|
|
21
22
|
await brain.encode({
|
|
22
|
-
content:
|
|
23
|
+
content:
|
|
24
|
+
'On-call notes show payout incident volume drops after retry batches are capped at 50 merchants per worker.',
|
|
23
25
|
source: 'tool-result',
|
|
24
26
|
salience: 0.8,
|
|
25
27
|
tags: ['payments', 'payouts', 'ops'],
|
|
@@ -27,7 +29,8 @@ async function demo() {
|
|
|
27
29
|
});
|
|
28
30
|
|
|
29
31
|
await brain.encode({
|
|
30
|
-
content:
|
|
32
|
+
content:
|
|
33
|
+
'Risk operations requested automatic escalation when payout failures affect more than three merchants in the same hour.',
|
|
31
34
|
source: 'told-by-user',
|
|
32
35
|
salience: 0.7,
|
|
33
36
|
tags: ['payments', 'escalation', 'risk'],
|
|
@@ -39,9 +42,13 @@ async function demo() {
|
|
|
39
42
|
minClusterSize: 3,
|
|
40
43
|
similarityThreshold: -0.3,
|
|
41
44
|
extractPrinciple: () => ({
|
|
42
|
-
content:
|
|
45
|
+
content:
|
|
46
|
+
'When payout retries spike, cap retry batches and escalate once multiple merchants are affected in the same hour.',
|
|
43
47
|
type: 'procedural',
|
|
44
|
-
conditions: [
|
|
48
|
+
conditions: [
|
|
49
|
+
'payout failures > 3 merchants per hour',
|
|
50
|
+
'processor returns 429 or throttling errors',
|
|
51
|
+
],
|
|
45
52
|
}),
|
|
46
53
|
});
|
|
47
54
|
|
|
@@ -11,7 +11,8 @@ async function demo() {
|
|
|
11
11
|
|
|
12
12
|
console.log('--- Encoding care-coordination observations ---');
|
|
13
13
|
await brain.encode({
|
|
14
|
-
content:
|
|
14
|
+
content:
|
|
15
|
+
'Referral queue delays drop when missing imaging notes are requested before prior-authorization submission.',
|
|
15
16
|
source: 'direct-observation',
|
|
16
17
|
salience: 0.9,
|
|
17
18
|
tags: ['healthcare-ops', 'prior-auth', 'referrals'],
|
|
@@ -19,7 +20,8 @@ async function demo() {
|
|
|
19
20
|
});
|
|
20
21
|
|
|
21
22
|
await brain.encode({
|
|
22
|
-
content:
|
|
23
|
+
content:
|
|
24
|
+
'Scheduling team reports the highest callback completion rate between 4pm and 6pm for discharge follow-up.',
|
|
23
25
|
source: 'tool-result',
|
|
24
26
|
salience: 0.8,
|
|
25
27
|
tags: ['healthcare-ops', 'follow-up', 'scheduling'],
|
|
@@ -27,7 +29,8 @@ async function demo() {
|
|
|
27
29
|
});
|
|
28
30
|
|
|
29
31
|
await brain.encode({
|
|
30
|
-
content:
|
|
32
|
+
content:
|
|
33
|
+
'Care coordinators want interpreter requirements captured in every handoff note before outreach starts.',
|
|
31
34
|
source: 'told-by-user',
|
|
32
35
|
salience: 0.7,
|
|
33
36
|
tags: ['healthcare-ops', 'handoff', 'interpreter'],
|
|
@@ -39,7 +42,8 @@ async function demo() {
|
|
|
39
42
|
minClusterSize: 3,
|
|
40
43
|
similarityThreshold: -0.3,
|
|
41
44
|
extractPrinciple: () => ({
|
|
42
|
-
content:
|
|
45
|
+
content:
|
|
46
|
+
'For care-coordination workflows, collect missing documentation and communication preferences before outreach or prior-auth submission.',
|
|
43
47
|
type: 'procedural',
|
|
44
48
|
conditions: ['prior-auth missing documentation', 'handoff note lacks outreach constraints'],
|
|
45
49
|
}),
|
|
@@ -6,8 +6,9 @@ const OLLAMA_MODEL = process.env.OLLAMA_MODEL || 'qwen3';
|
|
|
6
6
|
const AUDREY_API_KEY = process.env.AUDREY_API_KEY || '';
|
|
7
7
|
const MAX_TOOL_LOOPS = Number.parseInt(process.env.MAX_TOOL_LOOPS || '4', 10);
|
|
8
8
|
|
|
9
|
-
const userPrompt =
|
|
10
|
-
|
|
9
|
+
const userPrompt =
|
|
10
|
+
process.argv.slice(2).join(' ').trim() ||
|
|
11
|
+
'Use Audrey memory to explain how this local Ollama agent should remember useful facts.';
|
|
11
12
|
|
|
12
13
|
function usage() {
|
|
13
14
|
console.log(`
|
|
@@ -112,15 +113,22 @@ const tools = [
|
|
|
112
113
|
type: 'function',
|
|
113
114
|
function: {
|
|
114
115
|
name: 'memory_preflight',
|
|
115
|
-
description:
|
|
116
|
+
description:
|
|
117
|
+
'Check Audrey memory before taking an action, so prior failures and rules are not repeated.',
|
|
116
118
|
parameters: {
|
|
117
119
|
type: 'object',
|
|
118
120
|
required: ['action'],
|
|
119
121
|
properties: {
|
|
120
122
|
action: { type: 'string', description: 'Action the agent is considering.' },
|
|
121
123
|
tool: { type: 'string', description: 'Optional tool or command family.' },
|
|
122
|
-
strict: {
|
|
123
|
-
|
|
124
|
+
strict: {
|
|
125
|
+
type: 'boolean',
|
|
126
|
+
description: 'If true, high-severity warnings can block the action.',
|
|
127
|
+
},
|
|
128
|
+
include_capsule: {
|
|
129
|
+
type: 'boolean',
|
|
130
|
+
description: 'Include full capsule context in the result.',
|
|
131
|
+
},
|
|
124
132
|
},
|
|
125
133
|
},
|
|
126
134
|
},
|
|
@@ -129,15 +137,22 @@ const tools = [
|
|
|
129
137
|
type: 'function',
|
|
130
138
|
function: {
|
|
131
139
|
name: 'memory_reflexes',
|
|
132
|
-
description:
|
|
140
|
+
description:
|
|
141
|
+
'Return Audrey Memory Reflexes: trigger-response rules for the action the agent is considering.',
|
|
133
142
|
parameters: {
|
|
134
143
|
type: 'object',
|
|
135
144
|
required: ['action'],
|
|
136
145
|
properties: {
|
|
137
146
|
action: { type: 'string', description: 'Action the agent is considering.' },
|
|
138
147
|
tool: { type: 'string', description: 'Optional tool or command family.' },
|
|
139
|
-
strict: {
|
|
140
|
-
|
|
148
|
+
strict: {
|
|
149
|
+
type: 'boolean',
|
|
150
|
+
description: 'If true, high-severity warnings can become blocking reflexes.',
|
|
151
|
+
},
|
|
152
|
+
include_preflight: {
|
|
153
|
+
type: 'boolean',
|
|
154
|
+
description: 'Include the full underlying preflight report.',
|
|
155
|
+
},
|
|
141
156
|
},
|
|
142
157
|
},
|
|
143
158
|
},
|
|
@@ -176,7 +191,8 @@ const tools = [
|
|
|
176
191
|
type: 'function',
|
|
177
192
|
function: {
|
|
178
193
|
name: 'memory_encode',
|
|
179
|
-
description:
|
|
194
|
+
description:
|
|
195
|
+
'Store a useful lasting observation, decision, preference, or procedure in Audrey.',
|
|
180
196
|
parameters: {
|
|
181
197
|
type: 'object',
|
|
182
198
|
required: ['content'],
|
|
@@ -184,7 +200,13 @@ const tools = [
|
|
|
184
200
|
content: { type: 'string', description: 'Memory content to store.' },
|
|
185
201
|
source: {
|
|
186
202
|
type: 'string',
|
|
187
|
-
enum: [
|
|
203
|
+
enum: [
|
|
204
|
+
'direct-observation',
|
|
205
|
+
'told-by-user',
|
|
206
|
+
'tool-result',
|
|
207
|
+
'inference',
|
|
208
|
+
'model-generated',
|
|
209
|
+
],
|
|
188
210
|
description: 'Source reliability category.',
|
|
189
211
|
},
|
|
190
212
|
tags: {
|
|
@@ -270,7 +292,9 @@ async function main() {
|
|
|
270
292
|
try {
|
|
271
293
|
response = await ollamaChat(messages);
|
|
272
294
|
} catch (err) {
|
|
273
|
-
console.error(
|
|
295
|
+
console.error(
|
|
296
|
+
`Ollama is not reachable at ${OLLAMA_URL}, or model "${OLLAMA_MODEL}" is not available.`,
|
|
297
|
+
);
|
|
274
298
|
console.error(`Try: ollama pull ${OLLAMA_MODEL}`);
|
|
275
299
|
console.error(`Details: ${err.message}`);
|
|
276
300
|
process.exit(1);
|
|
@@ -294,7 +318,11 @@ async function main() {
|
|
|
294
318
|
const name = call.function?.name;
|
|
295
319
|
const executor = toolExecutors[name];
|
|
296
320
|
if (!executor) {
|
|
297
|
-
messages.push({
|
|
321
|
+
messages.push({
|
|
322
|
+
role: 'tool',
|
|
323
|
+
tool_name: name || 'unknown',
|
|
324
|
+
content: 'Unknown Audrey tool',
|
|
325
|
+
});
|
|
298
326
|
continue;
|
|
299
327
|
}
|
|
300
328
|
|
|
@@ -320,7 +348,7 @@ async function main() {
|
|
|
320
348
|
console.log('Stopped after MAX_TOOL_LOOPS without a final model answer.');
|
|
321
349
|
}
|
|
322
350
|
|
|
323
|
-
main().catch(
|
|
351
|
+
main().catch(err => {
|
|
324
352
|
console.error(err);
|
|
325
353
|
process.exit(1);
|
|
326
354
|
});
|
package/examples/stripe-demo.js
CHANGED
|
@@ -21,11 +21,15 @@ async function demo() {
|
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
brain.on('consolidation', ({ principlesExtracted, clustersFound }) => {
|
|
24
|
-
console.log(
|
|
24
|
+
console.log(
|
|
25
|
+
` [CONSOLIDATE] Found ${clustersFound} clusters, extracted ${principlesExtracted} principles`,
|
|
26
|
+
);
|
|
25
27
|
});
|
|
26
28
|
|
|
27
29
|
brain.on('reinforcement', ({ episodeId, similarity }) => {
|
|
28
|
-
console.log(
|
|
30
|
+
console.log(
|
|
31
|
+
` [REINFORCE] Episode ${episodeId.slice(0, 8)}... reinforced existing knowledge (sim: ${similarity?.toFixed(2) || 'N/A'})`,
|
|
32
|
+
);
|
|
29
33
|
});
|
|
30
34
|
|
|
31
35
|
// --- Scenario: Agent encounters Stripe rate limits ---
|
|
@@ -41,7 +45,8 @@ async function demo() {
|
|
|
41
45
|
|
|
42
46
|
console.log('\n--- Episode 2: Second hit from different code path ---');
|
|
43
47
|
await brain.encode({
|
|
44
|
-
content:
|
|
48
|
+
content:
|
|
49
|
+
'Stripe webhook verification endpoint returned 429 Too Many Requests during high traffic',
|
|
45
50
|
source: 'tool-result',
|
|
46
51
|
salience: 0.7,
|
|
47
52
|
causal: { trigger: 'webhook-flood', consequence: 'missed-webhook-events' },
|
|
@@ -65,7 +70,7 @@ async function demo() {
|
|
|
65
70
|
// (e.g. OpenAI text-embedding-3-small), a threshold of 0.80+ works well.
|
|
66
71
|
// We drop it here so the demo pipeline runs end-to-end.
|
|
67
72
|
similarityThreshold: -0.3,
|
|
68
|
-
extractPrinciple: (
|
|
73
|
+
extractPrinciple: () => ({
|
|
69
74
|
content: `Stripe enforces ~100 req/s rate limit across all endpoints. Exceeding this causes 429 errors that can stall payment queues and cause missed webhooks. Implement request throttling.`,
|
|
70
75
|
type: 'semantic',
|
|
71
76
|
}),
|
|
@@ -80,7 +85,9 @@ async function demo() {
|
|
|
80
85
|
|
|
81
86
|
console.log(`\nRecalled ${memories.length} memories:`);
|
|
82
87
|
for (const mem of memories) {
|
|
83
|
-
console.log(
|
|
88
|
+
console.log(
|
|
89
|
+
` [${mem.type.toUpperCase()}] (conf: ${mem.confidence.toFixed(2)}, score: ${mem.score.toFixed(3)}) ${mem.content.slice(0, 80)}${mem.content.length > 80 ? '...' : ''}`,
|
|
90
|
+
);
|
|
84
91
|
}
|
|
85
92
|
|
|
86
93
|
// --- Introspection ---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "audrey",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Local-first memory runtime for AI agents with recall, consolidation, memory reflexes, contradiction detection, and tool-trace learning",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"test": "node scripts/run-vitest.mjs",
|
|
73
73
|
"test:watch": "node scripts/run-vitest.mjs watch",
|
|
74
74
|
"test:artifacts": "npm run bench:perf && npm run bench:memory:check && npm run bench:guard:check && npm run bench:guard:card && npm run bench:guard:bundle && npm run bench:guard:bundle:verify && npm run bench:guard:leaderboard && npm run bench:guard:adapter-self-test && npm run bench:guard:adapter-self-test:validate && npm run bench:guard:external:dry-run && npm run bench:guard:external:evidence && npm run paper:sync && npm run paper:arxiv && npm run paper:arxiv:verify && npm run paper:arxiv:compile && npm run paper:bundle && npm run paper:bundle:verify && npm run paper:verify",
|
|
75
|
-
"release:gate": "npm run typecheck && npm test && npm run bench:memory:check && npm run bench:guard:check && npm run bench:guard:card && npm run bench:guard:bundle && npm run bench:guard:bundle:verify && npm run bench:guard:leaderboard && npm run bench:guard:adapter-registry:validate && npm run bench:guard:external:dry-run && npm run bench:guard:external:evidence && npm run bench:guard:adapter-module:validate && npm run bench:guard:adapter-self-test && npm run bench:guard:adapter-self-test:validate && npm run bench:guard:validate && npm run bench:guard:publication:verify && npm run python:release:check && npm run smoke:cli && npm run security:audit && npm run pack:check",
|
|
76
|
-
"release:gate:sandbox": "npm run build && npm run typecheck && npm run bench:perf && npm run bench:memory:check && npm run bench:guard:check && npm run bench:guard:card && npm run bench:guard:bundle && npm run bench:guard:bundle:verify && npm run bench:guard:leaderboard && npm run bench:guard:adapter-registry:validate && npm run bench:guard:external:dry-run && npm run bench:guard:external:evidence && npm run bench:guard:adapter-module:validate && npm run bench:guard:adapter-self-test && npm run bench:guard:adapter-self-test:validate && npm run bench:guard:validate && npm run bench:guard:publication:verify && npm run python:release:check && npm run smoke:cli && npm run security:audit && npm run pack:check",
|
|
77
|
-
"release:gate:paper": "npm run build && npm run typecheck && npm run bench:perf && npm run bench:memory:check && npm run bench:guard:check && npm run bench:guard:card && npm run bench:guard:bundle && npm run bench:guard:bundle:verify && npm run bench:guard:leaderboard && npm run bench:guard:adapter-registry:validate && npm run bench:guard:external:dry-run && npm run bench:guard:external:evidence && npm run bench:guard:adapter-module:validate && npm run bench:guard:adapter-self-test && npm run bench:guard:adapter-self-test:validate && npm run bench:guard:validate && npm run bench:guard:publication:verify && npm run python:release:check && npm run paper:sync && npm run paper:arxiv && npm run paper:arxiv:verify && npm run paper:arxiv:compile && npm run paper:launch-plan && npm run paper:launch-results && npm run paper:bundle && npm run paper:bundle:verify && npm run paper:verify && npm run release:readiness && npm run smoke:cli && npm run security:audit && npm run pack:check",
|
|
75
|
+
"release:gate": "npm run typecheck && npm run lint && npm run format:check && npm test && npm run bench:memory:check && npm run bench:guard:check && npm run bench:guard:card && npm run bench:guard:bundle && npm run bench:guard:bundle:verify && npm run bench:guard:leaderboard && npm run bench:guard:adapter-registry:validate && npm run bench:guard:external:dry-run && npm run bench:guard:external:evidence && npm run bench:guard:adapter-module:validate && npm run bench:guard:adapter-self-test && npm run bench:guard:adapter-self-test:validate && npm run bench:guard:validate && npm run bench:guard:publication:verify && npm run python:release:check && npm run smoke:cli && npm run security:audit && npm run pack:check",
|
|
76
|
+
"release:gate:sandbox": "npm run build && npm run typecheck && npm run lint && npm run format:check && npm run bench:perf && npm run bench:memory:check && npm run bench:guard:check && npm run bench:guard:card && npm run bench:guard:bundle && npm run bench:guard:bundle:verify && npm run bench:guard:leaderboard && npm run bench:guard:adapter-registry:validate && npm run bench:guard:external:dry-run && npm run bench:guard:external:evidence && npm run bench:guard:adapter-module:validate && npm run bench:guard:adapter-self-test && npm run bench:guard:adapter-self-test:validate && npm run bench:guard:validate && npm run bench:guard:publication:verify && npm run python:release:check && npm run smoke:cli && npm run security:audit && npm run pack:check",
|
|
77
|
+
"release:gate:paper": "npm run build && npm run typecheck && npm run lint && npm run format:check && npm run bench:perf && npm run bench:memory:check && npm run bench:guard:check && npm run bench:guard:card && npm run bench:guard:bundle && npm run bench:guard:bundle:verify && npm run bench:guard:leaderboard && npm run bench:guard:adapter-registry:validate && npm run bench:guard:external:dry-run && npm run bench:guard:external:evidence && npm run bench:guard:adapter-module:validate && npm run bench:guard:adapter-self-test && npm run bench:guard:adapter-self-test:validate && npm run bench:guard:validate && npm run bench:guard:publication:verify && npm run python:release:check && npm run paper:sync && npm run paper:arxiv && npm run paper:arxiv:verify && npm run paper:arxiv:compile && npm run paper:launch-plan && npm run paper:launch-results && npm run paper:bundle && npm run paper:bundle:verify && npm run paper:verify && npm run release:readiness && npm run smoke:cli && npm run security:audit && npm run pack:check",
|
|
78
78
|
"release:cut:plan": "node scripts/prepare-release-cut.mjs --json",
|
|
79
79
|
"release:cut:apply": "node scripts/prepare-release-cut.mjs --apply",
|
|
80
80
|
"release:readiness": "node scripts/verify-release-readiness.mjs --allow-pending",
|
|
@@ -135,6 +135,10 @@
|
|
|
135
135
|
"paper:sync": "node scripts/sync-paper-artifacts.mjs",
|
|
136
136
|
"paper:verify": "node scripts/verify-paper-artifacts.mjs",
|
|
137
137
|
"typecheck": "tsc --noEmit",
|
|
138
|
+
"lint": "eslint .",
|
|
139
|
+
"lint:fix": "eslint . --fix",
|
|
140
|
+
"format": "prettier --write \"src/**/*.ts\" \"mcp-server/**/*.ts\" \"tests/**/*.js\" \"benchmarks/**/*.{js,mjs}\" \"scripts/**/*.{js,mjs}\" \"examples/**/*.js\" \"*.{js,mjs}\" \".prettierrc.json\"",
|
|
141
|
+
"format:check": "prettier --check \"src/**/*.ts\" \"mcp-server/**/*.ts\" \"tests/**/*.js\" \"benchmarks/**/*.{js,mjs}\" \"scripts/**/*.{js,mjs}\" \"examples/**/*.js\" \"*.{js,mjs}\" \".prettierrc.json\"",
|
|
138
142
|
"serve": "node dist/mcp-server/index.js serve",
|
|
139
143
|
"docker:build": "docker build -t audrey:local .",
|
|
140
144
|
"docker:up": "docker compose up -d --build",
|
|
@@ -200,11 +204,20 @@
|
|
|
200
204
|
"zod": "^4.4.3"
|
|
201
205
|
},
|
|
202
206
|
"devDependencies": {
|
|
207
|
+
"@eslint/js": "^10.0.1",
|
|
203
208
|
"@types/better-sqlite3": "^7.6.13",
|
|
204
209
|
"@types/node": "^25.6.2",
|
|
210
|
+
"eslint": "^10.4.0",
|
|
211
|
+
"eslint-config-prettier": "^10.1.8",
|
|
212
|
+
"globals": "^17.6.0",
|
|
213
|
+
"prettier": "^3.8.3",
|
|
205
214
|
"typescript": "^6.0.3",
|
|
215
|
+
"typescript-eslint": "^8.60.0",
|
|
206
216
|
"vitest": "^4.1.5"
|
|
207
217
|
},
|
|
218
|
+
"overrides": {
|
|
219
|
+
"qs": "^6.15.2"
|
|
220
|
+
},
|
|
208
221
|
"directories": {
|
|
209
222
|
"example": "examples",
|
|
210
223
|
"test": "tests"
|