audrey 0.21.0 → 0.23.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.
Files changed (152) hide show
  1. package/CHANGELOG.md +176 -0
  2. package/README.md +76 -32
  3. package/SECURITY.md +29 -0
  4. package/dist/mcp-server/config.d.ts +5 -4
  5. package/dist/mcp-server/config.d.ts.map +1 -1
  6. package/dist/mcp-server/config.js +6 -8
  7. package/dist/mcp-server/config.js.map +1 -1
  8. package/dist/mcp-server/index.d.ts +219 -23
  9. package/dist/mcp-server/index.d.ts.map +1 -1
  10. package/dist/mcp-server/index.js +681 -95
  11. package/dist/mcp-server/index.js.map +1 -1
  12. package/dist/src/adaptive.d.ts.map +1 -1
  13. package/dist/src/adaptive.js +3 -1
  14. package/dist/src/adaptive.js.map +1 -1
  15. package/dist/src/affect.d.ts +4 -1
  16. package/dist/src/affect.d.ts.map +1 -1
  17. package/dist/src/affect.js +6 -4
  18. package/dist/src/affect.js.map +1 -1
  19. package/dist/src/audrey.d.ts +54 -4
  20. package/dist/src/audrey.d.ts.map +1 -1
  21. package/dist/src/audrey.js +457 -62
  22. package/dist/src/audrey.js.map +1 -1
  23. package/dist/src/capsule.d.ts +2 -1
  24. package/dist/src/capsule.d.ts.map +1 -1
  25. package/dist/src/capsule.js +14 -4
  26. package/dist/src/capsule.js.map +1 -1
  27. package/dist/src/causal.d.ts.map +1 -1
  28. package/dist/src/causal.js +20 -2
  29. package/dist/src/causal.js.map +1 -1
  30. package/dist/src/confidence.d.ts.map +1 -1
  31. package/dist/src/confidence.js +3 -0
  32. package/dist/src/confidence.js.map +1 -1
  33. package/dist/src/consolidate.d.ts +1 -0
  34. package/dist/src/consolidate.d.ts.map +1 -1
  35. package/dist/src/consolidate.js +35 -19
  36. package/dist/src/consolidate.js.map +1 -1
  37. package/dist/src/controller.d.ts +38 -0
  38. package/dist/src/controller.d.ts.map +1 -0
  39. package/dist/src/controller.js +169 -0
  40. package/dist/src/controller.js.map +1 -0
  41. package/dist/src/db.d.ts.map +1 -1
  42. package/dist/src/db.js +12 -0
  43. package/dist/src/db.js.map +1 -1
  44. package/dist/src/decay.d.ts.map +1 -1
  45. package/dist/src/decay.js +57 -50
  46. package/dist/src/decay.js.map +1 -1
  47. package/dist/src/embedding.d.ts.map +1 -1
  48. package/dist/src/embedding.js +31 -3
  49. package/dist/src/embedding.js.map +1 -1
  50. package/dist/src/encode.d.ts +9 -2
  51. package/dist/src/encode.d.ts.map +1 -1
  52. package/dist/src/encode.js +21 -8
  53. package/dist/src/encode.js.map +1 -1
  54. package/dist/src/export.d.ts.map +1 -1
  55. package/dist/src/export.js +5 -3
  56. package/dist/src/export.js.map +1 -1
  57. package/dist/src/feedback.d.ts +29 -0
  58. package/dist/src/feedback.d.ts.map +1 -0
  59. package/dist/src/feedback.js +123 -0
  60. package/dist/src/feedback.js.map +1 -0
  61. package/dist/src/forget.d.ts.map +1 -1
  62. package/dist/src/forget.js +58 -50
  63. package/dist/src/forget.js.map +1 -1
  64. package/dist/src/fts.js +1 -1
  65. package/dist/src/fts.js.map +1 -1
  66. package/dist/src/hybrid-recall.d.ts +2 -1
  67. package/dist/src/hybrid-recall.d.ts.map +1 -1
  68. package/dist/src/hybrid-recall.js +35 -26
  69. package/dist/src/hybrid-recall.js.map +1 -1
  70. package/dist/src/impact.d.ts +47 -0
  71. package/dist/src/impact.d.ts.map +1 -0
  72. package/dist/src/impact.js +146 -0
  73. package/dist/src/impact.js.map +1 -0
  74. package/dist/src/import.d.ts +177 -1
  75. package/dist/src/import.d.ts.map +1 -1
  76. package/dist/src/import.js +206 -17
  77. package/dist/src/import.js.map +1 -1
  78. package/dist/src/index.d.ts +4 -0
  79. package/dist/src/index.d.ts.map +1 -1
  80. package/dist/src/index.js +2 -0
  81. package/dist/src/index.js.map +1 -1
  82. package/dist/src/interference.d.ts +5 -2
  83. package/dist/src/interference.d.ts.map +1 -1
  84. package/dist/src/interference.js +27 -20
  85. package/dist/src/interference.js.map +1 -1
  86. package/dist/src/llm.d.ts.map +1 -1
  87. package/dist/src/llm.js +1 -0
  88. package/dist/src/llm.js.map +1 -1
  89. package/dist/src/migrate.d.ts.map +1 -1
  90. package/dist/src/migrate.js +21 -9
  91. package/dist/src/migrate.js.map +1 -1
  92. package/dist/src/preflight.d.ts +2 -1
  93. package/dist/src/preflight.d.ts.map +1 -1
  94. package/dist/src/preflight.js +25 -5
  95. package/dist/src/preflight.js.map +1 -1
  96. package/dist/src/profile.d.ts +23 -0
  97. package/dist/src/profile.d.ts.map +1 -0
  98. package/dist/src/profile.js +51 -0
  99. package/dist/src/profile.js.map +1 -0
  100. package/dist/src/promote.d.ts.map +1 -1
  101. package/dist/src/promote.js +2 -3
  102. package/dist/src/promote.js.map +1 -1
  103. package/dist/src/prompts.d.ts.map +1 -1
  104. package/dist/src/prompts.js +76 -47
  105. package/dist/src/prompts.js.map +1 -1
  106. package/dist/src/recall.d.ts +9 -6
  107. package/dist/src/recall.d.ts.map +1 -1
  108. package/dist/src/recall.js +182 -40
  109. package/dist/src/recall.js.map +1 -1
  110. package/dist/src/redact.d.ts +7 -1
  111. package/dist/src/redact.d.ts.map +1 -1
  112. package/dist/src/redact.js +94 -11
  113. package/dist/src/redact.js.map +1 -1
  114. package/dist/src/rollback.d.ts.map +1 -1
  115. package/dist/src/rollback.js +9 -4
  116. package/dist/src/rollback.js.map +1 -1
  117. package/dist/src/routes.d.ts +1 -0
  118. package/dist/src/routes.d.ts.map +1 -1
  119. package/dist/src/routes.js +185 -6
  120. package/dist/src/routes.js.map +1 -1
  121. package/dist/src/rules-compiler.d.ts.map +1 -1
  122. package/dist/src/rules-compiler.js +36 -6
  123. package/dist/src/rules-compiler.js.map +1 -1
  124. package/dist/src/server.d.ts +2 -1
  125. package/dist/src/server.d.ts.map +1 -1
  126. package/dist/src/server.js +42 -4
  127. package/dist/src/server.js.map +1 -1
  128. package/dist/src/tool-trace.d.ts.map +1 -1
  129. package/dist/src/tool-trace.js +42 -29
  130. package/dist/src/tool-trace.js.map +1 -1
  131. package/dist/src/types.d.ts +28 -1
  132. package/dist/src/types.d.ts.map +1 -1
  133. package/dist/src/ulid.d.ts.map +1 -1
  134. package/dist/src/ulid.js +52 -2
  135. package/dist/src/ulid.js.map +1 -1
  136. package/dist/src/utils.d.ts.map +1 -1
  137. package/dist/src/utils.js +8 -1
  138. package/dist/src/utils.js.map +1 -1
  139. package/dist/src/validate.d.ts +2 -0
  140. package/dist/src/validate.d.ts.map +1 -1
  141. package/dist/src/validate.js +60 -29
  142. package/dist/src/validate.js.map +1 -1
  143. package/package.json +20 -26
  144. package/docs/assets/benchmarks/local-benchmark.svg +0 -45
  145. package/docs/assets/benchmarks/operations-benchmark.svg +0 -45
  146. package/docs/assets/benchmarks/published-memory-standards.svg +0 -50
  147. package/docs/audrey-for-dummies.md +0 -670
  148. package/docs/benchmarking.md +0 -151
  149. package/docs/future-of-llm-memory.md +0 -452
  150. package/docs/mcp-hosts.md +0 -206
  151. package/docs/ollama-local-agents.md +0 -128
  152. package/docs/production-readiness.md +0 -128
package/CHANGELOG.md CHANGED
@@ -1,5 +1,181 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.23.1 - 2026-05-08
4
+
5
+ ### Added - Audrey Guard chassis
6
+
7
+ - Added `MemoryController` as the first orchestration layer for memory-before-action workflows. `beforeAction()` returns `allow` / `warn` / `block` with evidence, reflexes, recommendations, and an optional capsule; `afterAction()` records redacted tool outcomes and turns failures into tool-result memories.
8
+ - Added `audrey guard --tool <Tool> "<action>"` with `--json`, `--explain`, `--override`, and `--fail-on-warn`.
9
+ - Added `audrey demo --scenario repeated-failure`, a deterministic no-network demo where Audrey records a failed deploy, blocks the repeat attempt, validates the lesson, and prints impact.
10
+ - `Audrey.encodeBatch()` now uses provider-level `embedBatch()` and validates the batch before embedding, avoiding N sequential cloud embedding calls for valid batches.
11
+ - Recall now surfaces partial vector/FTS failures on the returned result array. Capsules preserve those diagnostics, strict Guard preflights block when recall is degraded, and `/v1/status` / `memory_status` expose the latest recall degradation signal.
12
+ - Added `docs/AUDREY_PAPER_OUTLINE.md`, framing Audrey Guard as local-first pre-action memory control for tool-using agents and outlining the GuardBench evaluation plan.
13
+
14
+ ### Fixed
15
+
16
+ - Docker Compose now requires `AUDREY_API_KEY` instead of starting a non-loopback unauthenticated REST sidecar that the server correctly refuses.
17
+ - Guard exact-failure matching now redacts before trimming, matches tool names case-insensitively, and includes file scope in the action hash.
18
+ - Redaction-aware truncation keeps complete `[REDACTED:*]` markers in long tool errors and output summaries.
19
+ - `npm test` and `npm run test:watch` now set a repo-local Vitest temp directory before Vitest starts, avoiding locked-down Windows user-temp failures.
20
+ - `npm audit --omit=dev --audit-level=moderate` is clean after refreshing Hono, Zod, and transitive rate-limit packages.
21
+ - README benchmark sample values now match `benchmarks/snapshots/perf-0.22.2.json`; the paper evidence ledger was re-checked for the repeated-failure demo line range and live bibliography URLs before release prep.
22
+
23
+ ## 0.22.2 - 2026-05-01
24
+
25
+ ### Correctness — second CodeRabbit review pass and code-scanning audit
26
+
27
+ - `src/forget.ts` `WHERE v.state ...` was filtering on the denormalized state column on `vec_semantics` / `vec_procedures`. That column is only populated at INSERT and never updated, so dormant or superseded rows were still passing the filter. Switched to `s.state` / `p.state`. Same fix applied to `src/interference.ts` after the second review pass caught the duplicate.
28
+ - Wrapped `forgetMemory`, `purgeMemories`, `applyDecay`, `applyInterference`, and the contradiction insert + state update in `src/validate.ts` in transactions so partial failures can't leave inconsistent counts or orphan contradictions.
29
+ - `mcp-server/index.ts` `VALID_SOURCES` and `VALID_TYPES` were object literals fed to `z.enum()`, which expects a tuple. Converted to const tuples so the MCP schemas validate correctly.
30
+ - `src/utils.ts` `cosineSimilarity` now throws on length mismatch instead of silently returning NaN; `daysBetween` throws on invalid date strings.
31
+ - `src/ulid.ts` `generateDeterministicId` rebuilt as canonicalize → SHA-256 → first 16 bytes → Crockford Base32. The previous shape used `JSON.stringify` (object-key-order-unstable) and emitted hex characters, neither of which produced a real ULID. `canonicalize` now also rejects circular references.
32
+ - `src/audrey.ts` constructor and `consolidate`/`decay` now use `??` for default fallbacks so an explicit `0` survives. The previous `||` short-circuit silently replaced valid zero-value config.
33
+ - `src/audrey.ts` `recallStream` now respects `options.agent` (was hardcoded to `this.agent`) and waits for embedding warmup like the non-streaming path.
34
+ - `src/confidence.ts` `recencyDecay` throws `RangeError` on `halfLifeDays <= 0` to surface NaN/Infinity earlier in the pipeline.
35
+ - `src/causal.ts` and `src/validate.ts` now validate the LLM response shape before reading fields. `causal` rejects non-finite confidence; `validate` rejects non-object/array conditions and only counts new evidence toward `supporting_count`.
36
+ - `src/rollback.ts` UPDATEs now check `.changes` and aggregate real counts. Rolling back ids that don't exist no longer reports false success.
37
+ - `src/rules-compiler.ts` `quoteString` now also escapes newline, carriage return, and tab so promoted rule content with multiline values produces valid double-quoted YAML.
38
+ - `src/decay.ts` and `src/forget.ts purgeMemories` moved their SELECTs inside the surrounding transaction so concurrent writers can't slip rows in or out between read and write.
39
+ - `src/migrate.ts` `reembedAll` chunks `embedBatch` calls into 256-row batches and labels failures by kind + row range. Pre-fix a partial embed failure on a 50K-episode reembed printed a bare provider error and lost the location. `EpisodeMigrateRow.consolidated` was also retyped to `number | null` to match runtime usage.
40
+ - `src/embedding.ts` `embedBatch` validates response shape with clear errors instead of mapping over a missing or malformed `data` field.
41
+ - `src/encode.ts` `effectiveSalience` clamped to `[0, 1]`. The previous formula could go negative on a sufficiently negative arousal boost.
42
+ - `src/affect.ts` `timeDeltaDays` no longer propagates NaN from invalid `created_at`.
43
+ - `src/capsule.ts` failure entry `memory_id` no longer interpolates `'undefined'` when `tool_name` is missing; recall spread order keeps `scope: 'agent'` from being overridden by caller options.
44
+ - `src/import.ts` `isDatabaseEmpty` now also checks `memory_events`. Pre-fix you could `restore` into a "fresh" store that already contained audit-trail rows.
45
+ - `src/server.ts` shutdown awaits `server.close` (was fire-and-forget) and surfaces `audrey.closeAsync` errors to stderr instead of silently swallowing them. `ERR_SERVER_NOT_RUNNING` is treated as success.
46
+ - `src/feedback.ts` replaced a `findRow(id)!.row` non-null assertion with a defensive null check; if the row was concurrently forgotten between UPDATE and re-read, returns the values just written rather than crashing.
47
+ - `src/promote.ts` folded `trigger_conditions` into the main SELECT (was an N+1).
48
+
49
+ ### Security
50
+
51
+ - `src/routes.ts` API key auth uses padded-buffer constant-time comparison. The previous `provided.length !== expected.length || !timingSafeEqual(...)` shape leaked the expected key length via response timing on local untrusted callers. Both buffers are now padded to 1 KiB before `timingSafeEqual`, so the comparison runs identically regardless of header length.
52
+ - `src/redact.ts` raised the hex-secret length threshold from 40 to 80 chars so 40-character git SHAs and 64-character SHA-256 checksums are no longer redacted as secrets.
53
+ - The "Protect master" GitHub ruleset was updated to drop the stale `Node 18 on Ubuntu` required check (CI dropped Node 18 from the matrix in 0.22.1 to match `engines.node >=20`, but the protection rule kept requiring a check that would never run).
54
+
55
+ ### Added — closed-loop visibility on REST and Python
56
+
57
+ - New `GET /v1/impact` route that mirrors `Audrey.impact()` and the `audrey impact` CLI. Bounds `windowDays` to 1-365 and `limit` to 1-100.
58
+ - Python sync and async clients gained an `impact(window_days=, limit=)` method. The previous `analytics()` no longer raises `NotImplementedError`; it's an alias of `impact()` for older callers.
59
+ - Python integration tests are no longer skipped. The suite spins up the real TS REST sidecar via `node dist/mcp-server/index.js serve` and exercises encode → recall → mark_used → impact → snapshot → restore end-to-end.
60
+
61
+ ### Benchmarks — legitimate performance snapshot, no marketing graphs
62
+
63
+ - New `npm run bench:perf-snapshot` (`benchmarks/perf-snapshot.js`) reports encode and hybrid-recall p50/p95/p99 across multiple corpus sizes (default 100, 1000, 5000) with full machine provenance (Node version, CPU model, RAM, git SHA) so the numbers are reproducible.
64
+ - Removed the synthetic-baseline SVG charts (`docs/assets/benchmarks/local-benchmark.svg`, `operations-benchmark.svg`, `published-memory-standards.svg`) from the repo and from the npm package's `files` field. They claimed Audrey beat naive baselines on 12 hand-crafted scenarios, which is not a useful marketing signal. The behavioral regression suite (`npm run bench:memory:check`) still runs as a release gate; it just no longer ships chart artifacts to the README.
65
+ - Removed the `bench:memory:readme-assets` script (it generated the SVGs above).
66
+ - README's Benchmarks section rewritten around the perf snapshot with explicit caveats about embedding-provider cost and what the numbers do and don't cover.
67
+
68
+ ### Fixed
69
+
70
+ - `mcp-server/index.ts` help banner: `memory_validate` was already registered but was missing from the in-session tool list.
71
+ - `CHANGELOG.md` 0.22.1 contradicted itself by stating `mark_used()` was both upgraded to a real call and still raises `NotImplementedError`. Removed the stale duplicate.
72
+
73
+ ### Personal-data cleanup
74
+
75
+ - `tests/http-api.test.js` no longer references "Tyler" — replaced with generic test fixtures so the public test suite has no personal identifiers.
76
+
77
+ ## 0.22.1 - 2026-04-30
78
+
79
+ ### Added — `audrey impact` report
80
+
81
+ - New `audrey impact` CLI command (also `--json` for automation, `--window N` for the lookback window in days, `--limit N` for how many rows in each list).
82
+ - Shows: total memories by type, all-time validated count, recent validations, top-N most-used memories, weakest-N (lowest salience — candidates to forget), and recent activity timeline.
83
+ - Backed by `src/impact.ts` (`buildImpactReport`, `formatImpactReport`) and `Audrey.impact({ windowDays, limit })`.
84
+ - This is the marketing surface the adversary called for: vital signs over CI verdicts. As agents start calling `memory_validate`, the report accumulates the "X failures prevented this week, Y procedures auto-promoted" story.
85
+
86
+ ### Added — closed-loop feedback (the "memory before action" wedge)
87
+
88
+ - New `memory_validate(id, outcome)` MCP tool. `outcome` is one of:
89
+ - `"helpful"` — the recalled memory drove a correct action. Reinforces salience and bumps `retrieval_count` for semantic/procedural rows.
90
+ - `"wrong"` — the memory was misleading. Decreases salience and bumps `challenge_count` for semantic memories.
91
+ - `"used"` — neutral signal that the memory was referenced (smaller salience delta than `helpful`).
92
+ - New REST endpoints `POST /v1/validate` (canonical) and `POST /v1/mark-used` (legacy alias defaulting to `outcome=used`).
93
+ - New `Audrey.validate({ id, outcome })` SDK method emits a `'validate'` event so consumers can audit feedback flow.
94
+ - New `src/feedback.ts` module with the `applyFeedback()` primitive — kept out of `audrey.ts` per architecture review (god-class concern).
95
+ - Python client `mark_used()` is no longer a `NotImplementedError`; calls `/v1/mark-used`. New `validate(memory_id, outcome="used"|"helpful"|"wrong")` method on both sync and async clients.
96
+ - 10 new tests (6 SDK math, 1 MCP enum, 3 HTTP roundtrip including 404 path).
97
+
98
+ This is the P0#1 item from `docs/PRODUCTION_BACKLOG.md` — the closed feedback loop that lifts the autopilot rubric's ALIVE dimension from 4 to 7+. The math reuses the existing `confidence.ts` reinforcement formula; the new column work is a no-op (`usage_count` and `last_used_at` were already added by migration 10 in v0.21).
99
+
100
+ ### Security
101
+
102
+ - HTTP `/v1/recall` and `/v1/capsule` no longer body-spread caller options into `audrey.recall()`. Pre-fix, `includePrivate: true` and `confidenceConfig` overrides could be passed in HTTP bodies, bypassing the private-memory ACL and integrity controls. The new `sanitizeRecallOptions()` allowlist drops anything not in a known-safe key set.
103
+ - `audrey serve` defaults to binding `127.0.0.1` (was `0.0.0.0`). Refuses to start on a non-loopback host without `AUDREY_API_KEY` unless `AUDREY_ALLOW_NO_AUTH=1`. New `AUDREY_HOST` env var explicitly opts in to network exposure.
104
+ - HTTP API key comparison uses `crypto.timingSafeEqual` instead of string `!==` to avoid prefix-match timing leaks on local untrusted callers.
105
+ - `audrey promote --yes` refuses to write `.claude/rules/*.md` outside `process.cwd()` unless the target path is in `AUDREY_PROMOTE_ROOTS`. Prevents a malicious MCP caller from writing persistent prompt-injection files into the user's `~/.claude/` directory.
106
+
107
+ ### First-contact UX
108
+
109
+ - `audrey --help`, `audrey --version`, and `audrey help`/`audrey version` now print help/version and exit 0 instead of silently dropping into the MCP stdio server. Unknown subcommands print error + help and exit 2.
110
+ - ONNX runtime EP-assignment warnings ("Some nodes were not assigned to the preferred execution providers...") are suppressed by default via per-session `logSeverityLevel`. Set `AUDREY_ONNX_VERBOSE=1` to restore the original behavior.
111
+ - `[audrey-mcp]` info boot logs (server started, connected via stdio, warmup completed) are gated behind `AUDREY_DEBUG=1`. Warmup-failure errors continue to log unconditionally.
112
+
113
+ ### Reliability
114
+
115
+ - `audrey.close()` now warns to stderr when called with pending post-encode consolidation work. New `audrey.closeAsync()` awaits `drainPostEncodeQueue()` before closing the database. All CLI subcommands (`reembed`, `dream`, `greeting`, `reflect`, `demo`, `observe-tool`, `promote`) use `closeAsync` to prevent the silent-data-loss race introduced in v0.22.0 where post-encode validation/interference could hit a closed DB.
116
+ - `_emitQueueError` reverted to the standard EventEmitter idiom: emit `error` when a listener is attached, fall back to `console.error` otherwise. v0.22.0 always called `console.error` and produced duplicate stderr lines for apps with structured error pipelines.
117
+ - `encodeBatch` now reuses the encode vector across post-encode stages and routes through `_enqueuePostEncode` (matching `encode`). Pre-fix, batch callers paid 4× embed cost per item and silently bypassed interference/resonance — a behavior divergence from single-encode that the v0.22.0 perf pass missed.
118
+
119
+ ### Performance
120
+
121
+ - SQLite PRAGMA tuning at db creation: `synchronous=NORMAL` (durable under WAL), 64 MiB page cache, 256 MiB mmap, `temp_store=MEMORY`. Set `AUDREY_PRAGMA_DEFAULTS=0` to revert to better-sqlite3 defaults. Expected impact: 2-5× recall p95 at &gt;10K episodes; 30-50% improvement on encode under sustained load.
122
+
123
+ ### Dependencies
124
+
125
+ - `sqlite-vec`: `0.1.7-alpha.2` → `0.1.9` (alpha to stable; the prior pin was 15 months old).
126
+ - `@modelcontextprotocol/sdk`: `1.26.0` → `1.29.0` (stricter schema validation, transport stability).
127
+ - `zod` `4.3.6` → `4.4.1`, `better-sqlite3` `12.6.2` → `12.9.0`, `hono` `4.12.14` → `4.12.15`, `@hono/node-server` `1.19.13` → `1.19.14`, `vitest` `4.0.18` → `4.1.5`, `typescript` `6.0.2` → `6.0.3`.
128
+ - `npm audit`: 0 vulnerabilities (production); transitive postcss CVE in vitest's vite resolved via `npm audit fix`.
129
+
130
+ ### SDK contract fixes (Python ↔ TS server)
131
+
132
+ - Python client `DEFAULT_BASE_URL` corrected from `http://127.0.0.1:3487` to `http://127.0.0.1:7437` to match the TS server's default port. Pre-fix, calling `Audrey()` with no args connected to nothing.
133
+ - Python `recall()` and `recall_response()` now decode the bare-list payload that `/v1/recall` actually returns, then wrap into `RecallResponse` client-side. Pre-fix, `recall_response()` would raise a Pydantic validation error against the real server.
134
+ - Python `restore()` now wraps the snapshot in `{"snapshot": ...}` to match the TS `/v1/import` handler that reads `body.snapshot`. Pre-fix, the server received `body.snapshot === undefined` and `audrey.import(undefined)` failed.
135
+ - Python `analytics()` raises `NotImplementedError` with a pointer to `docs/PRODUCTION_BACKLOG.md` until the analytics endpoint ships. Pre-fix, it produced a cryptic 404 from the TS sidecar that doesn't expose that endpoint. (Note: `mark_used()` was upgraded to a real call against `/v1/mark-used` in this same release — see the closed-loop section above.)
136
+ - README REST API row no longer claims `/openapi.json` or `/docs` — those routes aren't currently wired. The README now matches the actual surface (`/health` + `/v1/*`).
137
+
138
+ ### Removed
139
+
140
+ - `hybrid_strict` retrieval mode (was a silent alias of `hybrid` with no behavioral difference). Use `hybrid` (default) or `vector`.
141
+
142
+ ### Internal
143
+
144
+ - New `closeAsync(timeoutMs?: number)` on `Audrey`.
145
+ - New `sanitizeRecallOptions()` allowlist helper in `src/routes.ts`.
146
+ - `startServer` returns `hostname` alongside `port`.
147
+ - 5 new tests: CLI surface (`--help`/`--version`/unknown), HTTP recall sanitizer (privacy ACL, integrity, retrieval enum), HTTP bind safety (no-auth on LAN refused, `AUDREY_ALLOW_NO_AUTH` override).
148
+
149
+ ## 0.22.0 - 2026-04-28
150
+
151
+ ### Performance
152
+
153
+ - Encode response time: 24.7ms to 15.2ms p50, about 40% faster.
154
+ - Cold-start first encode: 525ms to 28ms with warmup, about 18.7x faster.
155
+ - Hybrid recall: 30.2ms to 14.3ms p50, about 2.1x faster.
156
+ - Eliminated 3 of 4 redundant embedding calls during encode. Validation, interference, and affect resonance now reuse the main content vector.
157
+
158
+ ### Added
159
+
160
+ - Added `memory_encode.wait_for_consolidation` parameter, default `false`, for opt-in read-after-write semantics.
161
+ - Added `memory_recall.retrieval` parameter with `"hybrid"` default and `"vector"` (FTS-bypass fast path).
162
+ - Added `pending_consolidation_count`, `embedding_warm`, `warmup_duration_ms`, and `default_retrieval_mode` to `memory_status`.
163
+ - Added background embedding pipeline warmup after MCP `server.connect()`.
164
+ - Added `AUDREY_PROFILE=1` for per-stage timings in MCP `_meta.diagnostics`.
165
+ - Added `AUDREY_DISABLE_WARMUP=1` to opt out of background embedding warmup.
166
+ - Added `benchmarks/perf.bench.js` and `npm run bench:perf` as a mock-embedding CI perf gate.
167
+
168
+ ### Changed
169
+
170
+ - Moved post-encode validation, interference, and affect resonance onto a serialized async queue so `memory_encode` no longer blocks on downstream consolidation work by default.
171
+ - Folded recall's three healthy-store vec-table count queries into one SQL roundtrip before KNN.
172
+ - Process shutdown now drains the post-encode consolidation queue with a 5-second timeout and logs pending row IDs if work remains.
173
+
174
+ ### Internal
175
+
176
+ - Added `src/profile.ts` with `ProfileRecorder`.
177
+ - Added `encodeWithDiagnostics()` and `recallWithDiagnostics()` for MCP profiling-mode response metadata.
178
+
3
179
  ## 0.21.0 - Release Diagnostics and Host Setup
4
180
 
5
181
  - Added `npx audrey doctor` for first-contact diagnostics, JSON automation, provider checks, MCP entrypoint validation, memory-store health, and host config generation.
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  <div align="center">
2
2
  <img src="docs/assets/audrey-wordmark.png" alt="Audrey wordmark" width="760">
3
3
 
4
- <p><strong>The local-first memory control plane for AI agents.</strong></p>
4
+ <p><strong>The local-first memory firewall for AI agents.</strong></p>
5
5
 
6
6
  <p>
7
7
  Give Codex, Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, JetBrains, Ollama-backed agents,
8
- and custom agent services one durable memory layer they can check before they act.
8
+ and custom agent services one durable memory layer they can check before they touch tools.
9
9
  </p>
10
10
 
11
11
  <p>
@@ -19,13 +19,17 @@
19
19
 
20
20
  Agents forget the exact mistakes they made yesterday. They repeat broken commands, lose project-specific rules, miss contradictions, and treat every new session like a cold start.
21
21
 
22
+ Audrey Guard is the headline loop: record what happened, remember what mattered, check before action, return `allow`, `warn`, or `block` with evidence, then validate whether the memory helped.
23
+
22
24
  Audrey turns those hard-won lessons into a local memory runtime:
23
25
 
26
+ - `audrey guard --tool Bash "npm run deploy"` runs memory-before-action from the terminal.
24
27
  - `memory_recall` finds durable context by semantic similarity.
25
28
  - `memory_preflight` checks prior failures, risks, rules, and relevant procedures before an action.
26
29
  - `memory_reflexes` converts remembered evidence into trigger-response guidance agents can follow.
30
+ - `memory_validate` closes the loop after the action — `helpful`, `used`, or `wrong` outcomes feed salience and decay.
27
31
  - `memory_dream` consolidates episodes into principles and applies decay.
28
- - `audrey doctor` tells a human or CI system whether the runtime is actually ready.
32
+ - `audrey impact` and `audrey doctor` tell a human or CI system whether the runtime is doing real work and is actually ready.
29
33
 
30
34
  It is not a hosted vector database, a notes app, or a Claude-only plugin. Audrey is a SQLite-backed continuity layer that can sit under any local or sidecar agent loop.
31
35
 
@@ -39,15 +43,16 @@ Requires Node.js 20+.
39
43
 
40
44
  ```bash
41
45
  npx audrey doctor
42
- npx audrey demo
46
+ npx audrey demo --scenario repeated-failure
47
+ npx audrey guard --tool Bash "npm run deploy"
43
48
  ```
44
49
 
45
- `doctor` verifies Node, the MCP entrypoint, provider selection, memory-store health, and host config generation. `demo` runs a no-key, no-host, no-network proof: it creates temporary memories, records a redacted failed tool trace, generates a Memory Capsule, proves recall, prints Memory Reflexes, and deletes the demo store.
50
+ `doctor` verifies Node, the MCP entrypoint, provider selection, memory-store health, and host config generation. The repeated-failure demo is no-key, no-host, and no-network: it creates a temporary store, records a failed deploy, teaches Audrey the fix, then shows Audrey Guard blocking the repeat attempt with evidence.
46
51
 
47
52
  Expected first-run shape:
48
53
 
49
54
  ```text
50
- Audrey Doctor v0.21.0
55
+ Audrey Doctor v0.23.1
51
56
  Store health: not initialized
52
57
  Verdict: ready
53
58
  ```
@@ -81,6 +86,8 @@ claude mcp list
81
86
 
82
87
  All local MCP paths default to local embeddings and one shared SQLite-backed memory directory. Use `AUDREY_DATA_DIR` to isolate projects, tenants, or host identities.
83
88
 
89
+ Installer-generated host config does not include provider API keys by default. Prefer setting `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GOOGLE_API_KEY`, or `GEMINI_API_KEY` in the host runtime environment; use `npx audrey install --include-secrets` only if you explicitly accept argv/config exposure.
90
+
84
91
  ## Use With Ollama And Local Agents
85
92
 
86
93
  Ollama runs models; Audrey supplies memory. Start Audrey as a local REST sidecar and expose its routes as tools in your agent loop:
@@ -113,9 +120,9 @@ Core sidecar tools:
113
120
 
114
121
  | Surface | Status |
115
122
  |---|---|
116
- | MCP stdio server | 19 tools, resources, and prompt templates |
117
- | CLI | `doctor`, `demo`, `install`, `mcp-config`, `status`, `dream`, `reembed`, `observe-tool`, `promote` |
118
- | REST API | Hono server with `/health`, `/openapi.json`, `/docs`, and `/v1/*` routes |
123
+ | MCP stdio server | 20 tools plus status/recent/principles resources and briefing/recall/reflection prompts |
124
+ | CLI | `doctor`, `demo`, `guard`, `install`, `mcp-config`, `status`, `dream`, `reembed`, `observe-tool`, `promote`, `impact` |
125
+ | REST API | Hono server with `/health` and `/v1/*` routes |
119
126
  | JavaScript SDK | Direct TypeScript/Node import from `audrey` |
120
127
  | Python client | `pip install audrey-memory`, calls the REST sidecar |
121
128
  | Storage | Local SQLite plus `sqlite-vec`, no hosted database required |
@@ -183,10 +190,7 @@ Audrey is close to a 1.0-ready local memory runtime, but production depends on h
183
190
  Release gates used for this package:
184
191
 
185
192
  ```bash
186
- npm run build
187
- npm run typecheck
188
- npm run bench:memory:check
189
- npm pack --dry-run
193
+ npm run release:gate
190
194
  npx audrey doctor
191
195
  npx audrey demo
192
196
  ```
@@ -209,22 +213,60 @@ Production controls you still own:
209
213
  - Run `npx audrey dream` on a schedule so consolidation and decay stay current.
210
214
  - Add application-level encryption, retention, access control, and audit logging for regulated environments.
211
215
 
212
- Read the full guide: [docs/production-readiness.md](docs/production-readiness.md).
216
+ ## Environment Variables
217
+
218
+ | Variable | Default | Purpose |
219
+ |---|---|---|
220
+ | `AUDREY_DATA_DIR` | `~/.audrey/data` | SQLite memory store path. Use one per tenant or agent identity for isolation. |
221
+ | `AUDREY_AGENT` | `local-agent` | Logical agent identity stamped on writes. |
222
+ | `AUDREY_EMBEDDING_PROVIDER` | `local` | `local`, `gemini`, `openai`, or `mock`. Cloud providers require explicit opt-in. |
223
+ | `AUDREY_LLM_PROVIDER` | auto | `anthropic`, `openai`, or `mock`. |
224
+ | `AUDREY_DEVICE` | `gpu` | Local embedding device (`gpu` or `cpu`). Falls back to CPU if GPU init fails. |
225
+ | `AUDREY_PORT` | `7437` | REST sidecar port. |
226
+ | `AUDREY_HOST` | `127.0.0.1` | REST sidecar bind address. Set to `0.0.0.0` only with `AUDREY_API_KEY`. |
227
+ | `AUDREY_API_KEY` | unset | Bearer token required for non-loopback REST traffic. |
228
+ | `AUDREY_ALLOW_NO_AUTH` | `0` | Set to `1` to allow non-loopback bind without an API key. Don't. |
229
+ | `AUDREY_ENABLE_ADMIN_TOOLS` | `0` | Set to `1` to enable export, import, and forget routes/tools. Disabled by default. |
230
+ | `AUDREY_PROMOTE_ROOTS` | unset | Colon/semicolon-separated extra roots for `audrey promote --yes` writes. By default writes are restricted to `process.cwd()`. |
231
+ | `AUDREY_DEBUG` | `0` | Set to `1` to print MCP info logs (server started, warmup completed). Errors always log. |
232
+ | `AUDREY_PROFILE` | `0` | Set to `1` to emit per-stage timings via MCP `_meta.diagnostics`. |
233
+ | `AUDREY_DISABLE_WARMUP` | `0` | Set to `1` to skip background embedding warmup at MCP boot. |
234
+ | `AUDREY_ONNX_VERBOSE` | `0` | Set to `1` to restore ONNX runtime EP-assignment warnings (suppressed by default). |
235
+ | `AUDREY_PRAGMA_DEFAULTS` | `1` | Set to `0` to revert SQLite PRAGMA tuning to better-sqlite3 defaults. |
236
+ | `AUDREY_CONTEXT_BUDGET_CHARS` | `4000` | Default Memory Capsule character budget. |
213
237
 
214
238
  ## Benchmarks
215
239
 
216
- Audrey ships with a benchmark harness and release gate:
240
+ Audrey ships two benchmark commands.
241
+
242
+ ### Performance snapshot
243
+
244
+ `npm run bench:perf-snapshot` measures encode and hybrid recall latency at multiple corpus sizes against the in-process mock provider. It reports p50/p95/p99 plus machine provenance so the numbers are reproducible and honest about what they cover.
217
245
 
218
246
  ```bash
219
- npm run bench:memory
220
- npm run bench:memory:check
247
+ npm run build
248
+ npm run bench:perf-snapshot # default sizes 100, 1000, 5000
249
+ node benchmarks/perf-snapshot.js --sizes 1000,10000 --json # custom shape
221
250
  ```
222
251
 
223
- Current repo snapshot:
252
+ Sample output from `benchmarks/snapshots/perf-0.22.2.json` (24-core Ryzen 9 7900X3D, Node 25.5.0, mock 64-dim embedding, hybrid recall, limit 5):
253
+
254
+ | Corpus size | Encode p50 (ms) | Encode p95 (ms) | Recall p50 (ms) | Recall p95 (ms) | Recall p99 (ms) |
255
+ |---|---|---|---|---|---|
256
+ | 100 | 0.33 | 0.59 | 0.54 | 1.82 | 2.71 |
257
+ | 1,000 | 0.31 | 2.15 | 1.57 | 2.36 | 21.18 |
258
+ | 5,000 | 0.31 | 1.84 | 2.09 | 3.42 | 16.58 |
224
259
 
225
- ![Audrey local benchmark](docs/assets/benchmarks/local-benchmark.svg)
260
+ These numbers cover Audrey's own pipeline (SQLite + sqlite-vec + hybrid ranking) and exclude embedding-provider cost. Real-world recall p95 with a local 384-dim provider is typically 5-15x higher; with a hosted provider it is dominated by the API round-trip. Run on your own hardware before quoting numbers anywhere.
226
261
 
227
- The benchmark suite covers retrieval behavior, overwrite behavior, delete/abstain behavior, and semantic/procedural merge behavior. For methodology and comparison anchors, see [docs/benchmarking.md](docs/benchmarking.md).
262
+ ### Behavioral regression suite
263
+
264
+ `npm run bench:memory:check` is a release gate. It runs a small set of retrieval and lifecycle scenarios (information extraction, knowledge updates, multi-session reasoning, conflict resolution, privacy boundary, overwrite, delete-and-abstain, semantic/procedural merge) against Audrey and three weak baselines (vector-only, keyword+recency, recent-window) and asserts Audrey doesn't regress. The baseline comparisons exist to catch correctness regressions in retrieval logic, not to make marketing claims.
265
+
266
+ ```bash
267
+ npm run bench:memory # full regression suite (writes JSON + report)
268
+ npm run bench:memory:check # release gate, exits non-zero on regression
269
+ ```
228
270
 
229
271
  ## Command Reference
230
272
 
@@ -246,39 +288,41 @@ npx audrey status --json --fail-on-unhealthy
246
288
  npx audrey dream
247
289
  npx audrey reembed
248
290
 
291
+ # Closed-loop visibility
292
+ npx audrey impact
293
+ npx audrey impact --json --window 7 --limit 5
294
+
249
295
  # Tool-trace learning
250
296
  npx audrey observe-tool --event PostToolUse --tool Bash --outcome failed
251
297
  npx audrey promote --dry-run
252
298
 
253
299
  # REST sidecar
254
300
  npx audrey serve
301
+ copy .env.docker.example .env
302
+ # edit AUDREY_API_KEY in .env
255
303
  docker compose up -d --build
256
304
  ```
257
305
 
306
+ The Node sidecar defaults to `127.0.0.1:7437`. The Docker image intentionally binds inside the container on `3487`, so Compose requires `AUDREY_API_KEY` in `.env` before startup. Override the published host port with `AUDREY_PUBLISHED_PORT` when using Compose.
307
+
258
308
  ## Documentation
259
309
 
260
- - [Audrey for Dummies](docs/audrey-for-dummies.md)
261
- - [MCP host guide](docs/mcp-hosts.md)
262
- - [Ollama and local agents](docs/ollama-local-agents.md)
263
- - [Production readiness](docs/production-readiness.md)
264
- - [Future of LLM memory](docs/future-of-llm-memory.md)
265
- - [Benchmarking](docs/benchmarking.md)
266
310
  - [Security policy](SECURITY.md)
311
+ - [Audrey paper outline](docs/AUDREY_PAPER_OUTLINE.md)
312
+ - Public setup, runtime, benchmark, and command guidance is maintained in this README.
267
313
 
268
314
  ## Development
269
315
 
270
316
  ```bash
271
317
  npm ci
272
- npm run build
273
- npm run typecheck
274
- npm test
275
- npm run bench:memory:check
276
- npm run pack:check
318
+ npm run release:gate
277
319
  python -m unittest discover -s python/tests -v
278
320
  python -m build --no-isolation python
279
321
  ```
280
322
 
281
- On some locked-down Windows hosts, Vitest/Vite can fail before tests start with `spawn EPERM`. That is an environment process-spawn blocker, not an Audrey runtime failure. Use build, typecheck, benchmark, pack dry-run, direct `dist/` smokes, and GitHub Actions as the release evidence path.
323
+ `npm test` uses a repo-local Vitest launcher so locked-down Windows temp
324
+ directories do not block test startup. `npm run release:gate:sandbox` remains
325
+ available for hosts that block child-process spawning entirely.
282
326
 
283
327
  ## License
284
328
 
package/SECURITY.md ADDED
@@ -0,0 +1,29 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ Security fixes are best-effort for the current published release line and the current default branch.
6
+
7
+ | Version | Supported |
8
+ |---|---|
9
+ | `0.22.x` | Yes |
10
+ | `< 0.22.0` | No |
11
+
12
+ ## Reporting a Vulnerability
13
+
14
+ Do not open a public GitHub issue for a security vulnerability.
15
+
16
+ Report vulnerabilities through one of these channels:
17
+
18
+ - GitHub Security Advisories for this repository
19
+
20
+ Include:
21
+
22
+ - affected version
23
+ - reproduction steps or proof of concept
24
+ - impact description
25
+ - suggested mitigation, if you have one
26
+
27
+ ## Scope Notes
28
+
29
+ Audrey is a memory layer. Security posture also depends on the host application, deployment environment, provider configuration, access controls, and data-handling rules around it.
@@ -1,5 +1,5 @@
1
1
  import type { AudreyConfig, EmbeddingConfig, LLMConfig } from '../src/types.js';
2
- export declare const VERSION = "0.21.0";
2
+ export declare const VERSION = "0.23.1";
3
3
  export declare const SERVER_NAME = "audrey-memory";
4
4
  export declare const DEFAULT_AGENT = "local-agent";
5
5
  export declare const DEFAULT_DATA_DIR: string;
@@ -21,8 +21,9 @@ interface McpEnvOptions {
21
21
  export declare function resolveDataDir(env?: Record<string, string | undefined>): string;
22
22
  /**
23
23
  * Resolves which embedding provider to use.
24
- * Priority: explicit config -> gemini (if GOOGLE_API_KEY exists) -> local
25
- * OpenAI is NEVER auto-selected -- must be set explicitly via AUDREY_EMBEDDING_PROVIDER=openai.
24
+ * Priority: explicit config -> local.
25
+ * Cloud providers are never auto-selected from ambient API keys; choose them
26
+ * explicitly with AUDREY_EMBEDDING_PROVIDER=gemini|openai.
26
27
  */
27
28
  export declare function resolveEmbeddingProvider(env: Record<string, string | undefined>, explicit?: string | undefined): EmbeddingConfig & {
28
29
  dimensions: number;
@@ -39,6 +40,6 @@ export declare function buildStdioMcpServerConfig(env?: Record<string, string |
39
40
  env: Record<string, string>;
40
41
  };
41
42
  export declare function formatMcpHostConfig(host?: string | undefined, env?: Record<string, string | undefined>): string;
42
- export declare function buildInstallArgs(env?: Record<string, string | undefined>): string[];
43
+ export declare function buildInstallArgs(env?: Record<string, string | undefined>, options?: McpEnvOptions): string[];
43
44
  export {};
44
45
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../mcp-server/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEhF,eAAO,MAAM,OAAO,WAAW,CAAC;AAChC,eAAO,MAAM,WAAW,kBAAkB,CAAC;AAC3C,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAC3C,eAAO,MAAM,gBAAgB,QAAqC,CAAC;AACnE,eAAO,MAAM,cAAc,QAAwD,CAAC;AAEpF,eAAO,MAAM,gBAAgB;;;;;;;;;CASnB,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAEvD,UAAU,aAAa;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAyBD,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAAG,MAAM,CAE5F;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EACvC,QAAQ,GAAE,MAAM,GAAG,SAA4C,GAC9D,eAAe,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAkB1C;AAED,wBAA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AG,SAAS,CAAe,EACrD,IAAI,GAAE,MAAM,GAAG,SAAqB,GACnC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAOlE;AA6BD,wBAAgB,mBAAmB,CACjC,IAAI,GAAE,MAAM,GAAG,SAAqB,EACpC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GACpD,MAAM,CAgBR;AAED,wBAAgB,gBAAgB,CAC9B,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EACrD,OAAO,GAAE,aAAkB,GAC1B,MAAM,EAAE,CAaV"}
@@ -1,7 +1,7 @@
1
1
  import { homedir } from 'node:os';
2
2
  import { join } from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
- export const VERSION = '0.21.0';
4
+ export const VERSION = '0.23.1';
5
5
  export const SERVER_NAME = 'audrey-memory';
6
6
  export const DEFAULT_AGENT = 'local-agent';
7
7
  export const DEFAULT_DATA_DIR = join(homedir(), '.audrey', 'data');
@@ -41,8 +41,9 @@ export function resolveDataDir(env = process.env) {
41
41
  }
42
42
  /**
43
43
  * Resolves which embedding provider to use.
44
- * Priority: explicit config -> gemini (if GOOGLE_API_KEY exists) -> local
45
- * OpenAI is NEVER auto-selected -- must be set explicitly via AUDREY_EMBEDDING_PROVIDER=openai.
44
+ * Priority: explicit config -> local.
45
+ * Cloud providers are never auto-selected from ambient API keys; choose them
46
+ * explicitly with AUDREY_EMBEDDING_PROVIDER=gemini|openai.
46
47
  */
47
48
  export function resolveEmbeddingProvider(env, explicit = env['AUDREY_EMBEDDING_PROVIDER']) {
48
49
  if (explicit && explicit !== 'auto') {
@@ -59,9 +60,6 @@ export function resolveEmbeddingProvider(env, explicit = env['AUDREY_EMBEDDING_P
59
60
  result.device = env['AUDREY_DEVICE'] || 'gpu';
60
61
  return result;
61
62
  }
62
- if (env['GOOGLE_API_KEY'] || env['GEMINI_API_KEY']) {
63
- return { provider: 'gemini', apiKey: env['GOOGLE_API_KEY'] || env['GEMINI_API_KEY'], dimensions: 3072 };
64
- }
65
63
  return { provider: 'local', dimensions: 384, device: env['AUDREY_DEVICE'] || 'gpu' };
66
64
  }
67
65
  export function resolveLLMProvider(env, explicit = env['AUDREY_LLM_PROVIDER']) {
@@ -198,8 +196,8 @@ export function formatMcpHostConfig(host = 'generic', env = process.env) {
198
196
  }
199
197
  return JSON.stringify(jsonHostConfig(normalizedHost, env), null, 2);
200
198
  }
201
- export function buildInstallArgs(env = process.env) {
202
- const envPairs = buildAudreyMcpEnv(env, env['AUDREY_AGENT'] || HOST_AGENT_NAMES['claude-code'], { includeSecrets: true });
199
+ export function buildInstallArgs(env = process.env, options = {}) {
200
+ const envPairs = buildAudreyMcpEnv(env, env['AUDREY_AGENT'] || HOST_AGENT_NAMES['claude-code'], { includeSecrets: options.includeSecrets ?? false });
203
201
  const args = ['mcp', 'add', '-s', 'user', SERVER_NAME];
204
202
  for (const [key, value] of Object.entries(envPairs)) {
205
203
  args.push('-e', `${key}=${value}`);
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../mcp-server/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAChC,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC;AAC3C,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC;AAC3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AACnE,MAAM,CAAC,MAAM,c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