audrey 1.0.0 → 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.
Files changed (234) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +30 -6
  3. package/benchmarks/adapter-self-test.mjs +6 -2
  4. package/benchmarks/adapters/example-allow.mjs +5 -2
  5. package/benchmarks/adapters/mem0-platform.mjs +19 -12
  6. package/benchmarks/adapters/zep-cloud.mjs +51 -27
  7. package/benchmarks/baselines.js +11 -6
  8. package/benchmarks/build-leaderboard.mjs +36 -23
  9. package/benchmarks/cases.js +24 -12
  10. package/benchmarks/create-conformance-card.mjs +12 -3
  11. package/benchmarks/create-submission-bundle.mjs +22 -8
  12. package/benchmarks/dry-run-external-adapters.mjs +24 -12
  13. package/benchmarks/guardbench.js +354 -124
  14. package/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +7 -7
  15. package/benchmarks/output/external/guardbench-external-dry-run.json +1 -1
  16. package/benchmarks/output/external/guardbench-external-evidence.json +1 -1
  17. package/benchmarks/output/guardbench-conformance-card.json +12 -12
  18. package/benchmarks/output/guardbench-raw.json +243 -144
  19. package/benchmarks/output/guardbench-summary.json +354 -230
  20. package/benchmarks/output/leaderboard/guardbench-leaderboard.json +5 -5
  21. package/benchmarks/output/leaderboard/guardbench-leaderboard.md +2 -2
  22. package/benchmarks/output/submission-bundle/guardbench-conformance-card.json +12 -12
  23. package/benchmarks/output/submission-bundle/guardbench-raw.json +243 -144
  24. package/benchmarks/output/submission-bundle/guardbench-summary.json +354 -230
  25. package/benchmarks/output/submission-bundle/schemas/guardbench-raw.schema.json +21 -1
  26. package/benchmarks/output/submission-bundle/schemas/guardbench-summary.schema.json +23 -2
  27. package/benchmarks/output/submission-bundle/submission-manifest.json +15 -15
  28. package/benchmarks/output/submission-bundle/validation-report.json +1 -1
  29. package/benchmarks/output/summary.json +58 -58
  30. package/benchmarks/perf-snapshot.js +12 -9
  31. package/benchmarks/perf.bench.js +14 -6
  32. package/benchmarks/public-paths.mjs +11 -5
  33. package/benchmarks/reference-results.js +10 -5
  34. package/benchmarks/report.js +48 -27
  35. package/benchmarks/run-external-guardbench.mjs +47 -25
  36. package/benchmarks/run.js +112 -59
  37. package/benchmarks/schemas/guardbench-raw.schema.json +21 -1
  38. package/benchmarks/schemas/guardbench-summary.schema.json +23 -2
  39. package/benchmarks/validate-adapter-module.mjs +13 -10
  40. package/benchmarks/validate-adapter-registry.mjs +16 -5
  41. package/benchmarks/validate-guardbench-artifacts.mjs +76 -19
  42. package/benchmarks/verify-external-evidence.mjs +86 -31
  43. package/benchmarks/verify-publication-artifacts.mjs +34 -11
  44. package/benchmarks/verify-submission-bundle.mjs +9 -4
  45. package/dist/mcp-server/config.d.ts +1 -1
  46. package/dist/mcp-server/config.d.ts.map +1 -1
  47. package/dist/mcp-server/config.js +5 -3
  48. package/dist/mcp-server/config.js.map +1 -1
  49. package/dist/mcp-server/index.d.ts +4 -3
  50. package/dist/mcp-server/index.d.ts.map +1 -1
  51. package/dist/mcp-server/index.js +479 -172
  52. package/dist/mcp-server/index.js.map +1 -1
  53. package/dist/src/action-key.d.ts.map +1 -1
  54. package/dist/src/action-key.js +6 -2
  55. package/dist/src/action-key.js.map +1 -1
  56. package/dist/src/adaptive.d.ts.map +1 -1
  57. package/dist/src/adaptive.js +4 -2
  58. package/dist/src/adaptive.js.map +1 -1
  59. package/dist/src/affect.d.ts.map +1 -1
  60. package/dist/src/affect.js +8 -5
  61. package/dist/src/affect.js.map +1 -1
  62. package/dist/src/audrey.d.ts +11 -1
  63. package/dist/src/audrey.d.ts.map +1 -1
  64. package/dist/src/audrey.js +110 -53
  65. package/dist/src/audrey.js.map +1 -1
  66. package/dist/src/capsule.d.ts.map +1 -1
  67. package/dist/src/capsule.js +37 -15
  68. package/dist/src/capsule.js.map +1 -1
  69. package/dist/src/causal.d.ts +1 -1
  70. package/dist/src/causal.d.ts.map +1 -1
  71. package/dist/src/causal.js +4 -2
  72. package/dist/src/causal.js.map +1 -1
  73. package/dist/src/confidence.d.ts.map +1 -1
  74. package/dist/src/confidence.js +5 -5
  75. package/dist/src/confidence.js.map +1 -1
  76. package/dist/src/consolidate.d.ts.map +1 -1
  77. package/dist/src/consolidate.js +17 -9
  78. package/dist/src/consolidate.js.map +1 -1
  79. package/dist/src/context.js +1 -1
  80. package/dist/src/context.js.map +1 -1
  81. package/dist/src/controller.d.ts +17 -1
  82. package/dist/src/controller.d.ts.map +1 -1
  83. package/dist/src/controller.js +73 -23
  84. package/dist/src/controller.js.map +1 -1
  85. package/dist/src/db.d.ts.map +1 -1
  86. package/dist/src/db.js +78 -27
  87. package/dist/src/db.js.map +1 -1
  88. package/dist/src/decay.d.ts +1 -1
  89. package/dist/src/decay.d.ts.map +1 -1
  90. package/dist/src/decay.js +1 -1
  91. package/dist/src/decay.js.map +1 -1
  92. package/dist/src/embedding.d.ts +12 -4
  93. package/dist/src/embedding.d.ts.map +1 -1
  94. package/dist/src/embedding.js +18 -16
  95. package/dist/src/embedding.js.map +1 -1
  96. package/dist/src/encode.d.ts.map +1 -1
  97. package/dist/src/encode.js +5 -4
  98. package/dist/src/encode.js.map +1 -1
  99. package/dist/src/events.d.ts +3 -2
  100. package/dist/src/events.d.ts.map +1 -1
  101. package/dist/src/events.js +7 -3
  102. package/dist/src/events.js.map +1 -1
  103. package/dist/src/export.d.ts.map +1 -1
  104. package/dist/src/export.js +21 -7
  105. package/dist/src/export.js.map +1 -1
  106. package/dist/src/feedback.d.ts.map +1 -1
  107. package/dist/src/feedback.js +1 -1
  108. package/dist/src/feedback.js.map +1 -1
  109. package/dist/src/forget.d.ts.map +1 -1
  110. package/dist/src/forget.js +12 -6
  111. package/dist/src/forget.js.map +1 -1
  112. package/dist/src/fts.d.ts.map +1 -1
  113. package/dist/src/fts.js +20 -8
  114. package/dist/src/fts.js.map +1 -1
  115. package/dist/src/hybrid-recall.d.ts.map +1 -1
  116. package/dist/src/hybrid-recall.js +12 -6
  117. package/dist/src/hybrid-recall.js.map +1 -1
  118. package/dist/src/impact.d.ts.map +1 -1
  119. package/dist/src/impact.js +26 -10
  120. package/dist/src/impact.js.map +1 -1
  121. package/dist/src/import.d.ts.map +1 -1
  122. package/dist/src/import.js +11 -6
  123. package/dist/src/import.js.map +1 -1
  124. package/dist/src/index.d.ts +5 -4
  125. package/dist/src/index.d.ts.map +1 -1
  126. package/dist/src/index.js +4 -4
  127. package/dist/src/index.js.map +1 -1
  128. package/dist/src/interference.d.ts.map +1 -1
  129. package/dist/src/interference.js +10 -5
  130. package/dist/src/interference.js.map +1 -1
  131. package/dist/src/introspect.d.ts.map +1 -1
  132. package/dist/src/introspect.js +12 -6
  133. package/dist/src/introspect.js.map +1 -1
  134. package/dist/src/llm.d.ts +2 -2
  135. package/dist/src/llm.d.ts.map +1 -1
  136. package/dist/src/llm.js +6 -6
  137. package/dist/src/llm.js.map +1 -1
  138. package/dist/src/migrate.d.ts.map +1 -1
  139. package/dist/src/migrate.js +10 -4
  140. package/dist/src/migrate.js.map +1 -1
  141. package/dist/src/preflight.d.ts.map +1 -1
  142. package/dist/src/preflight.js +6 -8
  143. package/dist/src/preflight.js.map +1 -1
  144. package/dist/src/profile.d.ts.map +1 -1
  145. package/dist/src/profile.js.map +1 -1
  146. package/dist/src/promote.d.ts.map +1 -1
  147. package/dist/src/promote.js +16 -7
  148. package/dist/src/promote.js.map +1 -1
  149. package/dist/src/prompts.d.ts.map +1 -1
  150. package/dist/src/prompts.js +1 -2
  151. package/dist/src/prompts.js.map +1 -1
  152. package/dist/src/recall.d.ts.map +1 -1
  153. package/dist/src/recall.js +85 -18
  154. package/dist/src/recall.js.map +1 -1
  155. package/dist/src/redact.d.ts.map +1 -1
  156. package/dist/src/redact.js +9 -4
  157. package/dist/src/redact.js.map +1 -1
  158. package/dist/src/reflexes.d.ts.map +1 -1
  159. package/dist/src/reflexes.js +1 -7
  160. package/dist/src/reflexes.js.map +1 -1
  161. package/dist/src/rollback.d.ts.map +1 -1
  162. package/dist/src/rollback.js +4 -2
  163. package/dist/src/rollback.js.map +1 -1
  164. package/dist/src/routes.d.ts.map +1 -1
  165. package/dist/src/routes.js +37 -14
  166. package/dist/src/routes.js.map +1 -1
  167. package/dist/src/rules-compiler.d.ts.map +1 -1
  168. package/dist/src/rules-compiler.js +24 -2
  169. package/dist/src/rules-compiler.js.map +1 -1
  170. package/dist/src/server.js +2 -2
  171. package/dist/src/server.js.map +1 -1
  172. package/dist/src/tool-trace.d.ts +2 -2
  173. package/dist/src/tool-trace.d.ts.map +1 -1
  174. package/dist/src/tool-trace.js +12 -4
  175. package/dist/src/tool-trace.js.map +1 -1
  176. package/dist/src/types.d.ts.map +1 -1
  177. package/dist/src/ulid.js +1 -1
  178. package/dist/src/ulid.js.map +1 -1
  179. package/dist/src/utils.d.ts.map +1 -1
  180. package/dist/src/utils.js.map +1 -1
  181. package/dist/src/validate.d.ts.map +1 -1
  182. package/dist/src/validate.js +20 -10
  183. package/dist/src/validate.js.map +1 -1
  184. package/docs/paper/07-evaluation.md +5 -5
  185. package/docs/paper/audrey-paper-v1.md +6 -6
  186. package/docs/paper/evidence-ledger.md +1 -1
  187. package/docs/paper/output/arxiv/arxiv-manifest.json +4 -4
  188. package/docs/paper/output/arxiv/main.tex +6 -6
  189. package/docs/paper/output/arxiv-compile-report.json +3 -3
  190. package/docs/paper/output/submission-bundle/README.md +30 -6
  191. package/docs/paper/output/submission-bundle/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +7 -7
  192. package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-dry-run.json +1 -1
  193. package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-evidence.json +1 -1
  194. package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-conformance-card.json +12 -12
  195. package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-raw.json +243 -144
  196. package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-summary.json +354 -230
  197. package/docs/paper/output/submission-bundle/benchmarks/output/leaderboard/guardbench-leaderboard.json +5 -5
  198. package/docs/paper/output/submission-bundle/benchmarks/output/leaderboard/guardbench-leaderboard.md +2 -2
  199. package/docs/paper/output/submission-bundle/benchmarks/output/submission-bundle/submission-manifest.json +15 -15
  200. package/docs/paper/output/submission-bundle/benchmarks/output/submission-bundle/validation-report.json +1 -1
  201. package/docs/paper/output/submission-bundle/benchmarks/output/summary.json +52 -52
  202. package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-raw.schema.json +21 -1
  203. package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-summary.schema.json +23 -2
  204. package/docs/paper/output/submission-bundle/docs/paper/07-evaluation.md +5 -5
  205. package/docs/paper/output/submission-bundle/docs/paper/audrey-paper-v1.md +6 -6
  206. package/docs/paper/output/submission-bundle/docs/paper/evidence-ledger.md +1 -1
  207. package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/arxiv-manifest.json +4 -4
  208. package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/main.tex +6 -6
  209. package/docs/paper/output/submission-bundle/docs/paper/output/arxiv-compile-report.json +3 -3
  210. package/docs/paper/output/submission-bundle/package.json +18 -5
  211. package/docs/paper/output/submission-bundle/paper-submission-manifest.json +40 -40
  212. package/examples/fintech-ops-demo.js +12 -5
  213. package/examples/healthcare-ops-demo.js +8 -4
  214. package/examples/ollama-memory-agent.js +41 -13
  215. package/examples/stripe-demo.js +12 -5
  216. package/package.json +18 -5
  217. package/scripts/audit-release-completion.mjs +179 -101
  218. package/scripts/create-arxiv-source.mjs +20 -14
  219. package/scripts/create-paper-submission-bundle.mjs +6 -2
  220. package/scripts/finalize-release.mjs +111 -36
  221. package/scripts/prepare-release-cut.mjs +14 -6
  222. package/scripts/publish-release-bundle.mjs +62 -23
  223. package/scripts/publish-release-github-api.mjs +89 -24
  224. package/scripts/smoke-cli.js +26 -6
  225. package/scripts/sync-paper-artifacts.mjs +5 -1
  226. package/scripts/verify-arxiv-compile.mjs +52 -16
  227. package/scripts/verify-arxiv-source.mjs +45 -15
  228. package/scripts/verify-browser-launch-plan.mjs +28 -11
  229. package/scripts/verify-browser-launch-results.mjs +32 -14
  230. package/scripts/verify-paper-artifacts.mjs +539 -79
  231. package/scripts/verify-paper-claims.mjs +48 -20
  232. package/scripts/verify-paper-submission-bundle.mjs +22 -11
  233. package/scripts/verify-publication-pack.mjs +23 -9
  234. package/scripts/verify-release-readiness.mjs +250 -71
@@ -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 = process.argv.slice(2).join(' ').trim()
10
- || 'Use Audrey memory to explain how this local Ollama agent should remember useful facts.';
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: 'Check Audrey memory before taking an action, so prior failures and rules are not repeated.',
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: { type: 'boolean', description: 'If true, high-severity warnings can block the action.' },
123
- include_capsule: { type: 'boolean', description: 'Include full capsule context in the result.' },
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: 'Return Audrey Memory Reflexes: trigger-response rules for the action the agent is considering.',
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: { type: 'boolean', description: 'If true, high-severity warnings can become blocking reflexes.' },
140
- include_preflight: { type: 'boolean', description: 'Include the full underlying preflight report.' },
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: 'Store a useful lasting observation, decision, preference, or procedure in Audrey.',
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: ['direct-observation', 'told-by-user', 'tool-result', 'inference', 'model-generated'],
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(`Ollama is not reachable at ${OLLAMA_URL}, or model "${OLLAMA_MODEL}" is not available.`);
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({ role: 'tool', tool_name: name || 'unknown', content: 'Unknown Audrey tool' });
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((err) => {
351
+ main().catch(err => {
324
352
  console.error(err);
325
353
  process.exit(1);
326
354
  });
@@ -21,11 +21,15 @@ async function demo() {
21
21
  });
22
22
 
23
23
  brain.on('consolidation', ({ principlesExtracted, clustersFound }) => {
24
- console.log(` [CONSOLIDATE] Found ${clustersFound} clusters, extracted ${principlesExtracted} principles`);
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(` [REINFORCE] Episode ${episodeId.slice(0, 8)}... reinforced existing knowledge (sim: ${similarity?.toFixed(2) || 'N/A'})`);
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: 'Stripe webhook verification endpoint returned 429 Too Many Requests during high traffic',
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: (episodes) => ({
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(` [${mem.type.toUpperCase()}] (conf: ${mem.confidence.toFixed(2)}, score: ${mem.score.toFixed(3)}) ${mem.content.slice(0, 80)}${mem.content.length > 80 ? '...' : ''}`);
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.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",
@@ -71,10 +71,10 @@
71
71
  "pretest": "npm run build && npm run test:artifacts",
72
72
  "test": "node scripts/run-vitest.mjs",
73
73
  "test:watch": "node scripts/run-vitest.mjs watch",
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:arxiv && npm run paper:arxiv:verify && npm run paper:arxiv:compile && npm run paper:bundle && npm run paper:bundle: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",
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 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"
@@ -3,7 +3,7 @@
3
3
  import { spawnSync } from 'node:child_process';
4
4
  import { createHash } from 'node:crypto';
5
5
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
6
- import { dirname, join, resolve } from 'node:path';
6
+ import { dirname, resolve } from 'node:path';
7
7
  import { fileURLToPath } from 'node:url';
8
8
  import { verifyExternalGuardBenchEvidence } from '../benchmarks/verify-external-evidence.mjs';
9
9
  import { verifyBrowserLaunchResults } from './verify-browser-launch-results.mjs';
@@ -35,7 +35,8 @@ function parseArgs(argv = process.argv.slice(2)) {
35
35
 
36
36
  for (let i = 0; i < argv.length; i++) {
37
37
  const token = argv[i];
38
- if ((token === '--version' || token === '--target-version') && argv[i + 1]) args.version = argv[++i];
38
+ if ((token === '--version' || token === '--target-version') && argv[i + 1])
39
+ args.version = argv[++i];
39
40
  else if (token === '--out' && argv[i + 1]) args.out = argv[++i];
40
41
  else if (token === '--json') args.json = true;
41
42
  else if (token === '--help' || token === '-h') args.help = true;
@@ -81,7 +82,9 @@ function run(command, args, options = {}) {
81
82
  }
82
83
 
83
84
  function sha256(path) {
84
- return createHash('sha256').update(readFileSync(fromRoot(path))).digest('hex');
85
+ return createHash('sha256')
86
+ .update(readFileSync(fromRoot(path)))
87
+ .digest('hex');
85
88
  }
86
89
 
87
90
  function artifactEvidence(path) {
@@ -104,7 +107,10 @@ function statusFromGaps(gaps, passed = true) {
104
107
  }
105
108
 
106
109
  function commandEvidence(result) {
107
- const firstLine = `${result.stderr}\n${result.stdout}`.split(/\r?\n/).map(line => line.trim()).find(Boolean);
110
+ const firstLine = `${result.stderr}\n${result.stdout}`
111
+ .split(/\r?\n/)
112
+ .map(line => line.trim())
113
+ .find(Boolean);
108
114
  return `${result.command}: ${result.ok ? 'ok' : `exit ${result.status ?? 'unknown'}`}${firstLine ? ` (${firstLine})` : ''}`;
109
115
  }
110
116
 
@@ -137,10 +143,16 @@ function localPathSweep(paths) {
137
143
  for (const path of paths) {
138
144
  const absolute = fromRoot(path);
139
145
  if (!existsSync(absolute)) continue;
140
- const scan = run('rg', ['-n', '-F', '-e', 'B:\\Projects', '-e', 'C:\\Users', '-e', '\\\\?\\', '-e', 'file://', path], { timeout: 30_000 });
146
+ const scan = run(
147
+ 'rg',
148
+ ['-n', '-F', '-e', 'B:\\Projects', '-e', 'C:\\Users', '-e', '\\\\?\\', '-e', 'file://', path],
149
+ { timeout: 30_000 },
150
+ );
141
151
  if (scan.status === 0) failures.push(`${path}: local path match found`);
142
- if (scan.status !== 0 && scan.status !== 1) failures.push(`${path}: local path sweep failed (${scan.stderr || scan.stdout})`);
143
- if (scan.stdout && localPathPattern.test(scan.stdout)) failures.push(`${path}: local path sweep output contains local path`);
152
+ if (scan.status !== 0 && scan.status !== 1)
153
+ failures.push(`${path}: local path sweep failed (${scan.stderr || scan.stdout})`);
154
+ if (scan.stdout && localPathPattern.test(scan.stdout))
155
+ failures.push(`${path}: local path sweep output contains local path`);
144
156
  }
145
157
  return failures;
146
158
  }
@@ -150,16 +162,41 @@ export async function auditReleaseCompletion(options = {}) {
150
162
  const out = options.out ?? DEFAULT_OUT;
151
163
  const pkg = readJson('package.json');
152
164
  const readiness = await verifyReleaseReadiness({ targetVersion: version, allowPending: true });
153
- const strictReadiness = await verifyReleaseReadiness({ targetVersion: version, allowPending: false });
165
+ const strictReadiness = await verifyReleaseReadiness({
166
+ targetVersion: version,
167
+ allowPending: false,
168
+ });
154
169
  const browserResults = await verifyBrowserLaunchResults();
155
- const externalEvidence = await verifyExternalGuardBenchEvidence({ allowPending: true, write: false });
170
+ const externalEvidence = await verifyExternalGuardBenchEvidence({
171
+ allowPending: true,
172
+ write: false,
173
+ });
156
174
  const paperVerify = run('node', ['scripts/verify-paper-artifacts.mjs'], { timeout: 180_000 });
157
- const paperBundleVerify = run('node', ['scripts/verify-paper-submission-bundle.mjs'], { timeout: 120_000 });
175
+ const paperBundleVerify = run('node', ['scripts/verify-paper-submission-bundle.mjs'], {
176
+ timeout: 120_000,
177
+ });
158
178
  const audit = run('npm', ['audit', '--omit=dev', '--audit-level=moderate'], { timeout: 120_000 });
159
179
  const diffCheck = run('git', ['diff', '--check'], { timeout: 60_000 });
160
- const bundleVerify = run('git', ['bundle', 'verify', `.tmp/release-artifacts/audrey-${version}.git.bundle`], { timeout: 60_000 });
161
- const remoteRefsResult = run('git', ['-c', 'http.sslBackend=openssl', 'ls-remote', 'origin', 'refs/heads/master', `refs/tags/v${version}`], { timeout: 60_000 });
162
- const npmView = run('npm', ['view', `audrey@${version}`, 'version', '--registry', NPM_REGISTRY], { timeout: 60_000 });
180
+ const bundleVerify = run(
181
+ 'git',
182
+ ['bundle', 'verify', `.tmp/release-artifacts/audrey-${version}.git.bundle`],
183
+ { timeout: 60_000 },
184
+ );
185
+ const remoteRefsResult = run(
186
+ 'git',
187
+ [
188
+ '-c',
189
+ 'http.sslBackend=openssl',
190
+ 'ls-remote',
191
+ 'origin',
192
+ 'refs/heads/master',
193
+ `refs/tags/v${version}`,
194
+ ],
195
+ { timeout: 60_000 },
196
+ );
197
+ const npmView = run('npm', ['view', `audrey@${version}`, 'version', '--registry', NPM_REGISTRY], {
198
+ timeout: 60_000,
199
+ });
163
200
  const pypi = await checkPypi(version);
164
201
  const gitObjects = latestGitObjectReport();
165
202
  const remoteRefs = extractRemoteRefs(remoteRefsResult.stdout);
@@ -170,130 +207,166 @@ export async function auditReleaseCompletion(options = {}) {
170
207
 
171
208
  const checklist = [];
172
209
  const versionGaps = [];
173
- if (pkg.version !== version) versionGaps.push(`package.json is ${pkg.version}, expected ${version}`);
174
- if (!readiness.ok) versionGaps.push(...readiness.failures.map(failure => `readiness failure: ${failure}`));
175
- checklist.push(checklistItem(
176
- 'code-release-local-readiness',
177
- 'Audrey codebase is cut to 1.0.0 and local release gates are coherent.',
178
- statusFromGaps(versionGaps, readiness.ok),
179
- [
180
- `package.json version=${pkg.version}`,
181
- `readiness ok=${readiness.ok}`,
182
- `strict readiness ok=${strictReadiness.ok}`,
183
- `pending blockers=${readiness.blockers.length}`,
184
- ],
185
- versionGaps,
186
- ));
210
+ if (pkg.version !== version)
211
+ versionGaps.push(`package.json is ${pkg.version}, expected ${version}`);
212
+ if (!readiness.ok)
213
+ versionGaps.push(...readiness.failures.map(failure => `readiness failure: ${failure}`));
214
+ checklist.push(
215
+ checklistItem(
216
+ 'code-release-local-readiness',
217
+ 'Audrey codebase is cut to 1.0.0 and local release gates are coherent.',
218
+ statusFromGaps(versionGaps, readiness.ok),
219
+ [
220
+ `package.json version=${pkg.version}`,
221
+ `readiness ok=${readiness.ok}`,
222
+ `strict readiness ok=${strictReadiness.ok}`,
223
+ `pending blockers=${readiness.blockers.length}`,
224
+ ],
225
+ versionGaps,
226
+ ),
227
+ );
187
228
 
188
229
  const sourceGaps = [];
189
230
  const remoteMaster = remoteRefs.get('refs/heads/master');
190
- const remoteTag = remoteRefs.get(`refs/tags/v${version}`) ?? remoteRefs.get(`refs/tags/v${version}^{}`);
231
+ const remoteTag =
232
+ remoteRefs.get(`refs/tags/v${version}`) ?? remoteRefs.get(`refs/tags/v${version}^{}`);
191
233
  if (!bundleVerify.ok) sourceGaps.push('release Git bundle does not verify');
192
234
  if (!gitObjects?.commit) sourceGaps.push('missing external release commit object report');
193
235
  if (gitObjects?.commit && remoteMaster !== gitObjects.commit) {
194
- sourceGaps.push(`remote master is ${remoteMaster ?? 'missing'}, not release commit ${gitObjects.commit}`);
236
+ sourceGaps.push(
237
+ `remote master is ${remoteMaster ?? 'missing'}, not release commit ${gitObjects.commit}`,
238
+ );
195
239
  }
196
240
  if (!remoteTag) sourceGaps.push(`remote tag v${version} is missing`);
197
- checklist.push(checklistItem(
198
- 'source-control-release-state',
199
- 'Final release commit and v1.0.0 tag are present on the public repository.',
200
- statusFromGaps(sourceGaps, bundleVerify.ok && remoteRefsResult.ok),
201
- [
202
- commandEvidence(bundleVerify),
203
- `external commit=${gitObjects?.commit ?? 'missing'}`,
204
- `external tag object=${gitObjects?.tag ?? 'missing'}`,
205
- `remote master=${remoteMaster ?? 'missing'}`,
206
- `remote tag=${remoteTag ?? 'missing'}`,
207
- ],
208
- sourceGaps,
209
- ));
241
+ checklist.push(
242
+ checklistItem(
243
+ 'source-control-release-state',
244
+ 'Final release commit and v1.0.0 tag are present on the public repository.',
245
+ statusFromGaps(sourceGaps, bundleVerify.ok && remoteRefsResult.ok),
246
+ [
247
+ commandEvidence(bundleVerify),
248
+ `external commit=${gitObjects?.commit ?? 'missing'}`,
249
+ `external tag object=${gitObjects?.tag ?? 'missing'}`,
250
+ `remote master=${remoteMaster ?? 'missing'}`,
251
+ `remote tag=${remoteTag ?? 'missing'}`,
252
+ ],
253
+ sourceGaps,
254
+ ),
255
+ );
210
256
 
211
257
  const npmArtifact = artifactEvidence(`.tmp/release-artifacts/audrey-${version}.tgz`);
212
258
  const npmGaps = [];
213
259
  if (!npmArtifact.exists) npmGaps.push('npm tarball missing');
214
- if (!npmView.ok) npmGaps.push(`audrey@${version} is not published on npm or npm registry check failed`);
215
- checklist.push(checklistItem(
216
- 'npm-package-publication',
217
- 'audrey@1.0.0 npm package is packaged and published.',
218
- statusFromGaps(npmGaps),
219
- [JSON.stringify(npmArtifact), commandEvidence(npmView)],
220
- npmGaps,
221
- ));
260
+ if (!npmView.ok)
261
+ npmGaps.push(`audrey@${version} is not published on npm or npm registry check failed`);
262
+ checklist.push(
263
+ checklistItem(
264
+ 'npm-package-publication',
265
+ 'audrey@1.0.0 npm package is packaged and published.',
266
+ statusFromGaps(npmGaps),
267
+ [JSON.stringify(npmArtifact), commandEvidence(npmView)],
268
+ npmGaps,
269
+ ),
270
+ );
222
271
 
223
272
  const wheel = artifactEvidence(`python/dist/audrey_memory-${version}-py3-none-any.whl`);
224
273
  const sdist = artifactEvidence(`python/dist/audrey_memory-${version}.tar.gz`);
225
274
  const pypiGaps = [];
226
275
  if (!wheel.exists) pypiGaps.push('Python wheel missing');
227
276
  if (!sdist.exists) pypiGaps.push('Python sdist missing');
228
- if (!pypi.ok) pypiGaps.push(`audrey-memory ${version} is not published on PyPI (status=${pypi.status})`);
229
- checklist.push(checklistItem(
230
- 'python-package-publication',
231
- 'audrey-memory 1.0.0 Python package is built and published.',
232
- statusFromGaps(pypiGaps),
233
- [JSON.stringify(wheel), JSON.stringify(sdist), `PyPI status=${pypi.status}`],
234
- pypiGaps,
235
- ));
277
+ if (!pypi.ok)
278
+ pypiGaps.push(`audrey-memory ${version} is not published on PyPI (status=${pypi.status})`);
279
+ checklist.push(
280
+ checklistItem(
281
+ 'python-package-publication',
282
+ 'audrey-memory 1.0.0 Python package is built and published.',
283
+ statusFromGaps(pypiGaps),
284
+ [JSON.stringify(wheel), JSON.stringify(sdist), `PyPI status=${pypi.status}`],
285
+ pypiGaps,
286
+ ),
287
+ );
236
288
 
237
289
  const paperGaps = [];
238
290
  if (!paperVerify.ok) paperGaps.push('paper artifact verifier failed');
239
291
  if (!paperBundleVerify.ok) paperGaps.push('paper submission bundle verifier failed');
240
- checklist.push(checklistItem(
241
- 'paper-local-quality',
242
- 'Research paper, claim register, bibliography, evidence ledger, arXiv source, and submission bundle verify locally.',
243
- statusFromGaps(paperGaps, paperVerify.ok && paperBundleVerify.ok),
244
- [commandEvidence(paperVerify), commandEvidence(paperBundleVerify)],
245
- paperGaps,
246
- ));
292
+ checklist.push(
293
+ checklistItem(
294
+ 'paper-local-quality',
295
+ 'Research paper, claim register, bibliography, evidence ledger, arXiv source, and submission bundle verify locally.',
296
+ statusFromGaps(paperGaps, paperVerify.ok && paperBundleVerify.ok),
297
+ [commandEvidence(paperVerify), commandEvidence(paperBundleVerify)],
298
+ paperGaps,
299
+ ),
300
+ );
247
301
 
248
302
  const publicationGaps = [];
249
303
  if (!browserResults.ok) publicationGaps.push(...browserResults.failures);
250
304
  if (!browserResults.ready) publicationGaps.push(...browserResults.blockers);
251
- checklist.push(checklistItem(
252
- 'paper-publication',
253
- 'Paper is publicly submitted/published across the launch targets recorded by the browser launch ledger.',
254
- statusFromGaps(publicationGaps, browserResults.ok),
255
- [
256
- `browser results ok=${browserResults.ok}`,
257
- `browser results ready=${browserResults.ready}`,
258
- `submitted=${browserResults.targets.filter(target => target.status === 'submitted').length}/${browserResults.targets.length}`,
259
- ],
260
- publicationGaps,
261
- ));
305
+ checklist.push(
306
+ checklistItem(
307
+ 'paper-publication',
308
+ 'Paper is publicly submitted/published across the launch targets recorded by the browser launch ledger.',
309
+ statusFromGaps(publicationGaps, browserResults.ok),
310
+ [
311
+ `browser results ok=${browserResults.ok}`,
312
+ `browser results ready=${browserResults.ready}`,
313
+ `submitted=${browserResults.targets.filter(target => target.status === 'submitted').length}/${browserResults.targets.length}`,
314
+ ],
315
+ publicationGaps,
316
+ ),
317
+ );
262
318
 
263
319
  const guardGaps = [];
264
320
  if (!externalEvidence.ok) guardGaps.push(...externalEvidence.failures);
265
- for (const adapter of externalEvidence.adapters.filter(adapter => adapter.status !== 'verified')) {
266
- guardGaps.push(`${adapter.id}: ${adapter.missingEnv?.length ? `missing ${adapter.missingEnv.join(', ')}` : adapter.evidenceKind}`);
321
+ for (const adapter of externalEvidence.adapters.filter(
322
+ adapter => adapter.status !== 'verified',
323
+ )) {
324
+ guardGaps.push(
325
+ `${adapter.id}: ${adapter.missingEnv?.length ? `missing ${adapter.missingEnv.join(', ')}` : adapter.evidenceKind}`,
326
+ );
267
327
  }
268
- checklist.push(checklistItem(
269
- 'external-guardbench-evidence',
270
- 'External GuardBench adapters are live-verified, not only dry-run verified.',
271
- statusFromGaps(guardGaps, externalEvidence.ok),
272
- externalEvidence.adapters.map(adapter => `${adapter.id}: ${adapter.status}/${adapter.evidenceKind}`),
273
- guardGaps,
274
- ));
328
+ checklist.push(
329
+ checklistItem(
330
+ 'external-guardbench-evidence',
331
+ 'External GuardBench adapters are live-verified, not only dry-run verified.',
332
+ statusFromGaps(guardGaps, externalEvidence.ok),
333
+ externalEvidence.adapters.map(
334
+ adapter => `${adapter.id}: ${adapter.status}/${adapter.evidenceKind}`,
335
+ ),
336
+ guardGaps,
337
+ ),
338
+ );
275
339
 
276
340
  const safetyGaps = [];
277
341
  if (!audit.ok) safetyGaps.push('production dependency audit failed');
278
342
  if (!diffCheck.ok) safetyGaps.push('git diff --check failed');
279
343
  safetyGaps.push(...localPathFailures);
280
- checklist.push(checklistItem(
281
- 'release-safety-hygiene',
282
- 'Release artifacts pass dependency audit, whitespace checks, and local-path leak sweeps.',
283
- statusFromGaps(safetyGaps, audit.ok && diffCheck.ok),
284
- [commandEvidence(audit), commandEvidence(diffCheck), `local path sweep failures=${localPathFailures.length}`],
285
- safetyGaps,
286
- ));
344
+ checklist.push(
345
+ checklistItem(
346
+ 'release-safety-hygiene',
347
+ 'Release artifacts pass dependency audit, whitespace checks, and local-path leak sweeps.',
348
+ statusFromGaps(safetyGaps, audit.ok && diffCheck.ok),
349
+ [
350
+ commandEvidence(audit),
351
+ commandEvidence(diffCheck),
352
+ `local path sweep failures=${localPathFailures.length}`,
353
+ ],
354
+ safetyGaps,
355
+ ),
356
+ );
287
357
 
288
358
  const finalizerGaps = [];
289
359
  if (!artifactReport) finalizerGaps.push('missing release-finalize-report.json');
290
- checklist.push(checklistItem(
291
- 'release-finalizer-artifacts',
292
- 'Finalization report records packaged npm/Python artifacts and source-control handoff artifacts.',
293
- statusFromGaps(finalizerGaps),
294
- artifactReport?.artifacts?.map(artifact => `${artifact.path} sha256=${artifact.sha256}`) ?? [],
295
- finalizerGaps,
296
- ));
360
+ checklist.push(
361
+ checklistItem(
362
+ 'release-finalizer-artifacts',
363
+ 'Finalization report records packaged npm/Python artifacts and source-control handoff artifacts.',
364
+ statusFromGaps(finalizerGaps),
365
+ artifactReport?.artifacts?.map(artifact => `${artifact.path} sha256=${artifact.sha256}`) ??
366
+ [],
367
+ finalizerGaps,
368
+ ),
369
+ );
297
370
 
298
371
  const complete = checklist.every(item => item.status === 'passed');
299
372
  const report = {
@@ -343,7 +416,9 @@ async function main() {
343
416
  } else {
344
417
  console.log(`Audrey release completion audit: complete=${report.complete}`);
345
418
  for (const item of report.checklist) {
346
- console.log(`- ${item.id}: ${item.status}${item.gaps.length ? ` (${item.gaps.length} gap(s))` : ''}`);
419
+ console.log(
420
+ `- ${item.id}: ${item.status}${item.gaps.length ? ` (${item.gaps.length} gap(s))` : ''}`,
421
+ );
347
422
  }
348
423
  }
349
424
 
@@ -351,7 +426,10 @@ async function main() {
351
426
  }
352
427
 
353
428
  function isDirectRun() {
354
- return Boolean(process.argv[1]) && resolve(process.argv[1]).toLowerCase() === fileURLToPath(import.meta.url).toLowerCase();
429
+ return (
430
+ Boolean(process.argv[1]) &&
431
+ resolve(process.argv[1]).toLowerCase() === fileURLToPath(import.meta.url).toLowerCase()
432
+ );
355
433
  }
356
434
 
357
435
  if (isDirectRun()) {