audrey 1.1.0 → 1.1.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.
Files changed (83) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +16 -7
  3. package/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +4 -4
  4. package/benchmarks/output/external/guardbench-external-dry-run.json +1 -1
  5. package/benchmarks/output/external/guardbench-external-evidence.json +1 -1
  6. package/benchmarks/output/guardbench-conformance-card.json +8 -8
  7. package/benchmarks/output/guardbench-raw.json +122 -114
  8. package/benchmarks/output/guardbench-summary.json +205 -189
  9. package/benchmarks/output/leaderboard/guardbench-leaderboard.json +5 -5
  10. package/benchmarks/output/leaderboard/guardbench-leaderboard.md +2 -2
  11. package/benchmarks/output/submission-bundle/guardbench-conformance-card.json +8 -8
  12. package/benchmarks/output/submission-bundle/guardbench-raw.json +122 -114
  13. package/benchmarks/output/submission-bundle/guardbench-summary.json +205 -189
  14. package/benchmarks/output/submission-bundle/submission-manifest.json +10 -10
  15. package/benchmarks/output/submission-bundle/validation-report.json +1 -1
  16. package/benchmarks/output/summary.json +44 -44
  17. package/dist/mcp-server/config.d.ts +1 -1
  18. package/dist/mcp-server/config.js +1 -1
  19. package/dist/mcp-server/index.d.ts.map +1 -1
  20. package/dist/mcp-server/index.js +88 -37
  21. package/dist/mcp-server/index.js.map +1 -1
  22. package/dist/src/audrey.d.ts +2 -0
  23. package/dist/src/audrey.d.ts.map +1 -1
  24. package/dist/src/audrey.js +2 -0
  25. package/dist/src/audrey.js.map +1 -1
  26. package/dist/src/autopilot.d.ts +3 -1
  27. package/dist/src/autopilot.d.ts.map +1 -1
  28. package/dist/src/autopilot.js +150 -37
  29. package/dist/src/autopilot.js.map +1 -1
  30. package/dist/src/capsule.d.ts +2 -0
  31. package/dist/src/capsule.d.ts.map +1 -1
  32. package/dist/src/capsule.js +43 -3
  33. package/dist/src/capsule.js.map +1 -1
  34. package/dist/src/controller.d.ts.map +1 -1
  35. package/dist/src/controller.js +7 -3
  36. package/dist/src/controller.js.map +1 -1
  37. package/dist/src/events.d.ts +23 -6
  38. package/dist/src/events.d.ts.map +1 -1
  39. package/dist/src/events.js +80 -13
  40. package/dist/src/events.js.map +1 -1
  41. package/dist/src/preflight.d.ts.map +1 -1
  42. package/dist/src/preflight.js +19 -6
  43. package/dist/src/preflight.js.map +1 -1
  44. package/dist/src/project.d.ts +17 -0
  45. package/dist/src/project.d.ts.map +1 -0
  46. package/dist/src/project.js +56 -0
  47. package/dist/src/project.js.map +1 -0
  48. package/dist/src/redact.d.ts.map +1 -1
  49. package/dist/src/redact.js +20 -0
  50. package/dist/src/redact.js.map +1 -1
  51. package/docs/paper/07-evaluation.md +5 -5
  52. package/docs/paper/audrey-paper-v1.md +5 -5
  53. package/docs/paper/evidence-ledger.md +1 -1
  54. package/docs/paper/output/arxiv/arxiv-manifest.json +4 -4
  55. package/docs/paper/output/arxiv/main.tex +5 -5
  56. package/docs/paper/output/arxiv-compile-report.json +3 -3
  57. package/docs/paper/output/submission-bundle/README.md +16 -7
  58. package/docs/paper/output/submission-bundle/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +4 -4
  59. package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-dry-run.json +1 -1
  60. package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-evidence.json +1 -1
  61. package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-conformance-card.json +8 -8
  62. package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-raw.json +122 -114
  63. package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-summary.json +205 -189
  64. package/docs/paper/output/submission-bundle/benchmarks/output/leaderboard/guardbench-leaderboard.json +5 -5
  65. package/docs/paper/output/submission-bundle/benchmarks/output/leaderboard/guardbench-leaderboard.md +2 -2
  66. package/docs/paper/output/submission-bundle/benchmarks/output/submission-bundle/submission-manifest.json +10 -10
  67. package/docs/paper/output/submission-bundle/benchmarks/output/submission-bundle/validation-report.json +1 -1
  68. package/docs/paper/output/submission-bundle/benchmarks/output/summary.json +42 -42
  69. package/docs/paper/output/submission-bundle/docs/paper/07-evaluation.md +5 -5
  70. package/docs/paper/output/submission-bundle/docs/paper/audrey-paper-v1.md +5 -5
  71. package/docs/paper/output/submission-bundle/docs/paper/evidence-ledger.md +1 -1
  72. package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/arxiv-manifest.json +4 -4
  73. package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/main.tex +5 -5
  74. package/docs/paper/output/submission-bundle/docs/paper/output/arxiv-compile-report.json +3 -3
  75. package/docs/paper/output/submission-bundle/package.json +8 -1
  76. package/docs/paper/output/submission-bundle/paper-submission-manifest.json +31 -31
  77. package/package.json +8 -1
  78. package/scripts/audit-release-completion.mjs +1 -1
  79. package/scripts/finalize-release.mjs +1 -1
  80. package/scripts/prepare-release-cut.mjs +1 -1
  81. package/scripts/publish-release-bundle.mjs +1 -1
  82. package/scripts/publish-release-github-api.mjs +1 -1
  83. package/scripts/verify-release-readiness.mjs +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.2 - 2026-07-13
4
+
5
+ ### Guard signal quality
6
+
7
+ - Consolidation now sweeps every real owning agent instead of the CLI utility agent, so `audrey dream` and reflection actually convert episodes into semantic and procedural knowledge on stores that previously reported "evaluated 0 episodes".
8
+ - Failure streaks are self-extinguishing: `failure_count` counts failures since the tool's last success in scope, and a subsequent success retires the warning instead of letting it nag at high confidence for the full window. Same-instant ties order by monotonic event id and fail toward warning. `include_resolved` preserves the raw diagnostic view.
9
+ - Tool-failure signals are project-scoped: `memory_recent_failures`, `memory_capsule`, and preflight accept a `cwd` and exclude failures recorded in other projects. Directionality is asymmetric on purpose — failures without a recorded directory stay visible because they cannot be proven foreign, while only a success provably from the current project can extinguish a local streak. Autopilot passes the working directory even under shared scope, so cross-project semantic knowledge still travels while foreign failure noise does not.
10
+ - Autopilot-learned tool-failure episodes (tool-result source) now categorize as risks, are tool-matched at medium severity in preflight, and cap their error summaries in capsules at 240 characters. User-authored memories that carry the same tag keep full high-severity risk treatment.
11
+ - Redaction no longer destroys machine identifiers such as MCP tool names: consistently-cased word identifiers (three or more separator-delimited all-lowercase or all-uppercase segments) are exempt from the high-entropy secret rule. Title-cased memorable passphrases and digit-bearing tokens still redact.
12
+
13
+ ### Injection efficiency
14
+
15
+ - Compact packet format (default; `AUDREY_PACKET_FORMAT=verbose` reverts): entries render as `[memory_id confidence] "content"` lines with a one-line safety preamble. Content stays JSON-quoted; injection-safety invariants are unchanged.
16
+ - Session-delta injection (default; `AUDREY_PACKET_DELTA=0` reverts): each memory is injected once per session instead of on every prompt. SessionStart delivers the full packet and seeds the tracker; the tracker clears on session start and compaction — the moments earlier packets can leave the context window. A memory whose state changes after injection (for example, becoming disputed) reinjects with its new standing. Measured on a production store this removed a repeated 3.5k-character packet from every prompt after the first.
17
+
18
+ ### MCP Registry
19
+
20
+ - Publishes Audrey to the official MCP Registry as `io.github.evilander/audrey` via GitHub OIDC in the release pipeline, after the npm publish gates pass.
21
+
22
+ ## 1.1.1 - 2026-07-10
23
+
24
+ ### npm 12 install compatibility
25
+
26
+ - Documents and emits a least-privilege global install command that explicitly allows only Audrey's four required dependency lifecycle scripts. This keeps SQLite and local inference working under npm 12's new default-deny install-script policy without enabling arbitrary package scripts.
27
+ - Adds pinned project-level npm 12 approvals for Audrey's current native/runtime dependencies and regression coverage for the CLI guidance.
28
+ - Pins the trusted npm publisher to npm 11.14.1 so the immutable 1.1.0 tag can be recovered safely after npm 12 withheld `better-sqlite3`'s native binding during its first publish attempt.
29
+
3
30
  ## 1.1.0 - 2026-07-09
4
31
 
5
32
  ### Audrey Autopilot
package/README.md CHANGED
@@ -34,10 +34,12 @@ The model does not have to remember that a memory tool exists. That is the point
34
34
  Install Audrey once, review the hooks once, and then use Codex or Claude Code normally.
35
35
 
36
36
  ```bash
37
- npm install -g audrey
37
+ npm install -g audrey --allow-scripts=better-sqlite3,onnxruntime-node,sharp,protobufjs
38
38
  audrey install --host auto
39
39
  ```
40
40
 
41
+ The explicit install-script list is for npm 12's safer dependency policy. It permits only the four packages Audrey needs for SQLite, local inference, and their generated runtime files. With npm 11 or earlier, the shorter `npm install -g audrey` is equivalent.
42
+
41
43
  `auto` configures whichever supported CLIs are installed. You can choose one explicitly:
42
44
 
43
45
  ```bash
@@ -76,7 +78,7 @@ This is more useful than “the vector search found a vaguely similar error.”
76
78
  Try the complete loop without an API key or network call:
77
79
 
78
80
  ```bash
79
- npx audrey demo --scenario repeated-failure
81
+ audrey demo --scenario repeated-failure
80
82
  ```
81
83
 
82
84
  ## What Audrey remembers
@@ -127,12 +129,10 @@ Vector candidates are partitioned by agent before nearest-neighbor ranking, so o
127
129
  ## See it before installing anything
128
130
 
129
131
  ```bash
130
- npx audrey doctor
131
- npx audrey demo
132
- npx audrey install --host auto --dry-run
132
+ npm exec --yes --package=audrey --allow-scripts=better-sqlite3,onnxruntime-node,sharp,protobufjs -- audrey demo --scenario repeated-failure
133
133
  ```
134
134
 
135
- The dry run prints the MCP and lifecycle-hook configuration for both hosts without changing files.
135
+ That command runs from the npm cache, exercises the full SQLite-backed Guard loop, and leaves host configuration unchanged.
136
136
 
137
137
  <div align="center">
138
138
  <img src="docs/assets/audrey-feature-grid.jpg" alt="Audrey memory continuity, recall, evidence, local storage, and memory-before-action" width="760">
@@ -165,6 +165,13 @@ npm install audrey
165
165
  pip install audrey-memory
166
166
  ```
167
167
 
168
+ For a project install with npm 12, approve Audrey's reviewed dependency scripts in the project root and rebuild once if npm reported that it blocked them:
169
+
170
+ ```bash
171
+ npm install-scripts approve better-sqlite3 onnxruntime-node sharp protobufjs
172
+ npm rebuild
173
+ ```
174
+
168
175
  For Autopilot, prefer a global or otherwise stable installation. Hook and MCP configuration pins the actual Node executable and Audrey entrypoint; an ephemeral `npx` cache is not a durable production runtime.
169
176
 
170
177
  ### Host configuration
@@ -340,6 +347,8 @@ The server also sends host instructions explaining the Guard receipt loop when l
340
347
  | `AUDREY_DEVICE` | `gpu` | Local embedding device; falls back to CPU |
341
348
  | `AUDREY_CONTEXT_BUDGET_CHARS` | `4000` | Maximum default capsule size |
342
349
  | `AUDREY_AUTOPILOT_SCOPE` | `agent` | `agent` or explicit cross-agent `shared` recall for hooks |
350
+ | `AUDREY_PACKET_FORMAT` | `compact` | Injected packet style: `compact` line format or `verbose` key=value |
351
+ | `AUDREY_PACKET_DELTA` | `1` | Inject each memory once per session; `0` resends full packets every prompt |
343
352
  | `AUDREY_HOOK_FAIL_CLOSED` | `0` | Deny guarded actions when Audrey itself fails |
344
353
  | `AUDREY_API_KEY` | unset | Bearer token for REST access |
345
354
  | `AUDREY_HOST` | `127.0.0.1` | REST bind address |
@@ -381,7 +390,7 @@ npm run pack:check
381
390
  GuardBench currently contains ten local, deterministic pre-action scenarios covering repeated failures, procedures, scope changes, recovery, redaction, conflicting instructions, and noisy stores. The checked-in v1 methodology uses a mock 64-dimensional embedding provider and exists to catch regressions. A perfect local pass is not a claim about real-provider latency or production false-positive rates.
382
391
 
383
392
  <!-- guardbench-summary:start -->
384
- Latest local result in this checkout: 10/10 scenarios passed, 100% prevention rate, 0% false-block rate, 0 raw secret leaks, 0 published artifact leaks, and 3.501ms / 20.658ms p50/p95 Guard latency under the mock-provider methodology.
393
+ Latest local result in this checkout: 10/10 scenarios passed, 100% prevention rate, 0% false-block rate, 0 raw secret leaks, 0 published artifact leaks, and 4.253ms / 21.196ms p50/p95 Guard latency under the mock-provider methodology.
385
394
  <!-- guardbench-summary:end -->
386
395
 
387
396
  `benchmarks/perf-snapshot.js` measures encode and hybrid-recall p50/p95/p99 at configurable corpus sizes with machine and provider provenance. Run it on the hardware and embedding provider you plan to operate; hosted-provider latency is dominated by its network round trip.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
3
  "suite": "GuardBench adapter self-test",
4
- "generatedAt": "2026-07-10T15:00:46.455Z",
4
+ "generatedAt": "2026-07-13T14:48:54.144Z",
5
5
  "ok": true,
6
6
  "adapter": {
7
7
  "name": "Example Allow Adapter",
@@ -27,9 +27,9 @@
27
27
  "evidenceRecall": 0.1,
28
28
  "redactionLeaks": 0,
29
29
  "latency": {
30
- "p50Ms": 0.01,
31
- "p95Ms": 0.042,
32
- "maxMs": 0.042
30
+ "p50Ms": 0.011,
31
+ "p95Ms": 0.041,
32
+ "maxMs": 0.041
33
33
  }
34
34
  },
35
35
  "contract": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
3
  "suite": "GuardBench external adapter dry-run matrix",
4
- "generatedAt": "2026-07-10T15:00:47.009Z",
4
+ "generatedAt": "2026-07-13T14:48:54.712Z",
5
5
  "ok": true,
6
6
  "registry": "benchmarks/adapters/registry.json",
7
7
  "outRoot": "benchmarks/output/external",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
3
  "suite": "GuardBench external evidence verification",
4
- "generatedAt": "2026-07-10T15:00:47.285Z",
4
+ "generatedAt": "2026-07-13T14:48:54.992Z",
5
5
  "ok": true,
6
6
  "allowPending": true,
7
7
  "registry": "benchmarks/adapters/registry.json",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
3
  "suite": "GuardBench conformance card",
4
- "generatedAt": "2026-07-10T15:00:42.135Z",
4
+ "generatedAt": "2026-07-13T14:48:49.667Z",
5
5
  "sourceDir": "benchmarks/output",
6
6
  "manifestVersion": "0.2.0",
7
7
  "suiteId": "guardbench-local-comparative",
@@ -25,9 +25,9 @@
25
25
  "evidenceRecall": 1,
26
26
  "redactionLeaks": 0,
27
27
  "latency": {
28
- "p50Ms": 3.501,
29
- "p95Ms": 20.658,
30
- "maxMs": 20.658
28
+ "p50Ms": 4.253,
29
+ "p95Ms": 21.196,
30
+ "maxMs": 21.196
31
31
  }
32
32
  },
33
33
  "conformance": {
@@ -39,14 +39,14 @@
39
39
  "integrity": {
40
40
  "artifactHashes": {
41
41
  "guardbench-manifest.json": "57636ce19fdaa6e50fc3fc961d9e499a9f43632f588c713a9fefe8e8a6fa724c",
42
- "guardbench-summary.json": "88cd54e091e5aa89e7ef873a2e440430b3c35eb3f4664d963a56d197cc3691e9",
43
- "guardbench-raw.json": "1888c8524d54f10bb403ef09b923cec63376518bf6d202ef271ba895811d37d8"
42
+ "guardbench-summary.json": "3ba1c059558aa8b511ae510276078930649ba6aca9669324148726fac10c7ee8",
43
+ "guardbench-raw.json": "786b03ff8570444620c23b35621bbb14897f06310de7e8bd3a337a1acf5ce776"
44
44
  },
45
45
  "externalRunMetadataHash": null
46
46
  },
47
47
  "provenance": {
48
- "generatedAt": "2026-07-10T15:00:41.781Z",
49
- "gitSha": "af2534b9dc5b980fb879e88ca63afd502480dd24",
48
+ "generatedAt": "2026-07-13T14:48:49.313Z",
49
+ "gitSha": "7111c630be69d3ab96439018f094dc4fac826aca",
50
50
  "gitDirty": false,
51
51
  "node": "v24.18.0",
52
52
  "v8": "13.6.233.17-node.50",