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.
- package/CHANGELOG.md +54 -0
- package/README.md +30 -6
- package/benchmarks/adapter-self-test.mjs +6 -2
- package/benchmarks/adapters/example-allow.mjs +5 -2
- package/benchmarks/adapters/mem0-platform.mjs +19 -12
- package/benchmarks/adapters/zep-cloud.mjs +51 -27
- package/benchmarks/baselines.js +11 -6
- package/benchmarks/build-leaderboard.mjs +36 -23
- package/benchmarks/cases.js +24 -12
- package/benchmarks/create-conformance-card.mjs +12 -3
- package/benchmarks/create-submission-bundle.mjs +22 -8
- package/benchmarks/dry-run-external-adapters.mjs +24 -12
- package/benchmarks/guardbench.js +354 -124
- package/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +7 -7
- package/benchmarks/output/external/guardbench-external-dry-run.json +1 -1
- package/benchmarks/output/external/guardbench-external-evidence.json +1 -1
- package/benchmarks/output/guardbench-conformance-card.json +12 -12
- package/benchmarks/output/guardbench-raw.json +243 -144
- package/benchmarks/output/guardbench-summary.json +354 -230
- package/benchmarks/output/leaderboard/guardbench-leaderboard.json +5 -5
- package/benchmarks/output/leaderboard/guardbench-leaderboard.md +2 -2
- package/benchmarks/output/submission-bundle/guardbench-conformance-card.json +12 -12
- package/benchmarks/output/submission-bundle/guardbench-raw.json +243 -144
- package/benchmarks/output/submission-bundle/guardbench-summary.json +354 -230
- package/benchmarks/output/submission-bundle/schemas/guardbench-raw.schema.json +21 -1
- package/benchmarks/output/submission-bundle/schemas/guardbench-summary.schema.json +23 -2
- package/benchmarks/output/submission-bundle/submission-manifest.json +15 -15
- package/benchmarks/output/submission-bundle/validation-report.json +1 -1
- package/benchmarks/output/summary.json +58 -58
- package/benchmarks/perf-snapshot.js +12 -9
- package/benchmarks/perf.bench.js +14 -6
- package/benchmarks/public-paths.mjs +11 -5
- package/benchmarks/reference-results.js +10 -5
- package/benchmarks/report.js +48 -27
- package/benchmarks/run-external-guardbench.mjs +47 -25
- package/benchmarks/run.js +112 -59
- package/benchmarks/schemas/guardbench-raw.schema.json +21 -1
- package/benchmarks/schemas/guardbench-summary.schema.json +23 -2
- package/benchmarks/validate-adapter-module.mjs +13 -10
- package/benchmarks/validate-adapter-registry.mjs +16 -5
- package/benchmarks/validate-guardbench-artifacts.mjs +76 -19
- package/benchmarks/verify-external-evidence.mjs +86 -31
- package/benchmarks/verify-publication-artifacts.mjs +34 -11
- package/benchmarks/verify-submission-bundle.mjs +9 -4
- package/dist/mcp-server/config.d.ts +1 -1
- package/dist/mcp-server/config.d.ts.map +1 -1
- package/dist/mcp-server/config.js +5 -3
- package/dist/mcp-server/config.js.map +1 -1
- package/dist/mcp-server/index.d.ts +4 -3
- package/dist/mcp-server/index.d.ts.map +1 -1
- package/dist/mcp-server/index.js +479 -172
- package/dist/mcp-server/index.js.map +1 -1
- package/dist/src/action-key.d.ts.map +1 -1
- package/dist/src/action-key.js +6 -2
- package/dist/src/action-key.js.map +1 -1
- package/dist/src/adaptive.d.ts.map +1 -1
- package/dist/src/adaptive.js +4 -2
- package/dist/src/adaptive.js.map +1 -1
- package/dist/src/affect.d.ts.map +1 -1
- package/dist/src/affect.js +8 -5
- package/dist/src/affect.js.map +1 -1
- package/dist/src/audrey.d.ts +11 -1
- package/dist/src/audrey.d.ts.map +1 -1
- package/dist/src/audrey.js +110 -53
- package/dist/src/audrey.js.map +1 -1
- package/dist/src/capsule.d.ts.map +1 -1
- package/dist/src/capsule.js +37 -15
- package/dist/src/capsule.js.map +1 -1
- package/dist/src/causal.d.ts +1 -1
- package/dist/src/causal.d.ts.map +1 -1
- package/dist/src/causal.js +4 -2
- package/dist/src/causal.js.map +1 -1
- package/dist/src/confidence.d.ts.map +1 -1
- package/dist/src/confidence.js +5 -5
- package/dist/src/confidence.js.map +1 -1
- package/dist/src/consolidate.d.ts.map +1 -1
- package/dist/src/consolidate.js +17 -9
- package/dist/src/consolidate.js.map +1 -1
- package/dist/src/context.js +1 -1
- package/dist/src/context.js.map +1 -1
- package/dist/src/controller.d.ts +17 -1
- package/dist/src/controller.d.ts.map +1 -1
- package/dist/src/controller.js +73 -23
- package/dist/src/controller.js.map +1 -1
- package/dist/src/db.d.ts.map +1 -1
- package/dist/src/db.js +78 -27
- package/dist/src/db.js.map +1 -1
- package/dist/src/decay.d.ts +1 -1
- package/dist/src/decay.d.ts.map +1 -1
- package/dist/src/decay.js +1 -1
- package/dist/src/decay.js.map +1 -1
- package/dist/src/embedding.d.ts +12 -4
- package/dist/src/embedding.d.ts.map +1 -1
- package/dist/src/embedding.js +18 -16
- package/dist/src/embedding.js.map +1 -1
- package/dist/src/encode.d.ts.map +1 -1
- package/dist/src/encode.js +5 -4
- package/dist/src/encode.js.map +1 -1
- package/dist/src/events.d.ts +3 -2
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js +7 -3
- package/dist/src/events.js.map +1 -1
- package/dist/src/export.d.ts.map +1 -1
- package/dist/src/export.js +21 -7
- package/dist/src/export.js.map +1 -1
- package/dist/src/feedback.d.ts.map +1 -1
- package/dist/src/feedback.js +1 -1
- package/dist/src/feedback.js.map +1 -1
- package/dist/src/forget.d.ts.map +1 -1
- package/dist/src/forget.js +12 -6
- package/dist/src/forget.js.map +1 -1
- package/dist/src/fts.d.ts.map +1 -1
- package/dist/src/fts.js +20 -8
- package/dist/src/fts.js.map +1 -1
- package/dist/src/hybrid-recall.d.ts.map +1 -1
- package/dist/src/hybrid-recall.js +12 -6
- package/dist/src/hybrid-recall.js.map +1 -1
- package/dist/src/impact.d.ts.map +1 -1
- package/dist/src/impact.js +26 -10
- package/dist/src/impact.js.map +1 -1
- package/dist/src/import.d.ts.map +1 -1
- package/dist/src/import.js +11 -6
- package/dist/src/import.js.map +1 -1
- package/dist/src/index.d.ts +5 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/interference.d.ts.map +1 -1
- package/dist/src/interference.js +10 -5
- package/dist/src/interference.js.map +1 -1
- package/dist/src/introspect.d.ts.map +1 -1
- package/dist/src/introspect.js +12 -6
- package/dist/src/introspect.js.map +1 -1
- package/dist/src/llm.d.ts +2 -2
- package/dist/src/llm.d.ts.map +1 -1
- package/dist/src/llm.js +6 -6
- package/dist/src/llm.js.map +1 -1
- package/dist/src/migrate.d.ts.map +1 -1
- package/dist/src/migrate.js +10 -4
- package/dist/src/migrate.js.map +1 -1
- package/dist/src/preflight.d.ts.map +1 -1
- package/dist/src/preflight.js +6 -8
- package/dist/src/preflight.js.map +1 -1
- package/dist/src/profile.d.ts.map +1 -1
- package/dist/src/profile.js.map +1 -1
- package/dist/src/promote.d.ts.map +1 -1
- package/dist/src/promote.js +16 -7
- package/dist/src/promote.js.map +1 -1
- package/dist/src/prompts.d.ts.map +1 -1
- package/dist/src/prompts.js +1 -2
- package/dist/src/prompts.js.map +1 -1
- package/dist/src/recall.d.ts.map +1 -1
- package/dist/src/recall.js +85 -18
- package/dist/src/recall.js.map +1 -1
- package/dist/src/redact.d.ts.map +1 -1
- package/dist/src/redact.js +9 -4
- package/dist/src/redact.js.map +1 -1
- package/dist/src/reflexes.d.ts.map +1 -1
- package/dist/src/reflexes.js +1 -7
- package/dist/src/reflexes.js.map +1 -1
- package/dist/src/rollback.d.ts.map +1 -1
- package/dist/src/rollback.js +4 -2
- package/dist/src/rollback.js.map +1 -1
- package/dist/src/routes.d.ts.map +1 -1
- package/dist/src/routes.js +37 -14
- package/dist/src/routes.js.map +1 -1
- package/dist/src/rules-compiler.d.ts.map +1 -1
- package/dist/src/rules-compiler.js +24 -2
- package/dist/src/rules-compiler.js.map +1 -1
- package/dist/src/server.js +2 -2
- package/dist/src/server.js.map +1 -1
- package/dist/src/tool-trace.d.ts +2 -2
- package/dist/src/tool-trace.d.ts.map +1 -1
- package/dist/src/tool-trace.js +12 -4
- package/dist/src/tool-trace.js.map +1 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/ulid.js +1 -1
- package/dist/src/ulid.js.map +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js.map +1 -1
- package/dist/src/validate.d.ts.map +1 -1
- package/dist/src/validate.js +20 -10
- package/dist/src/validate.js.map +1 -1
- package/docs/paper/07-evaluation.md +5 -5
- package/docs/paper/audrey-paper-v1.md +6 -6
- package/docs/paper/evidence-ledger.md +1 -1
- package/docs/paper/output/arxiv/arxiv-manifest.json +4 -4
- package/docs/paper/output/arxiv/main.tex +6 -6
- package/docs/paper/output/arxiv-compile-report.json +3 -3
- package/docs/paper/output/submission-bundle/README.md +30 -6
- package/docs/paper/output/submission-bundle/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +7 -7
- package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-dry-run.json +1 -1
- package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-evidence.json +1 -1
- package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-conformance-card.json +12 -12
- package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-raw.json +243 -144
- package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-summary.json +354 -230
- package/docs/paper/output/submission-bundle/benchmarks/output/leaderboard/guardbench-leaderboard.json +5 -5
- package/docs/paper/output/submission-bundle/benchmarks/output/leaderboard/guardbench-leaderboard.md +2 -2
- package/docs/paper/output/submission-bundle/benchmarks/output/submission-bundle/submission-manifest.json +15 -15
- package/docs/paper/output/submission-bundle/benchmarks/output/submission-bundle/validation-report.json +1 -1
- package/docs/paper/output/submission-bundle/benchmarks/output/summary.json +52 -52
- package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-raw.schema.json +21 -1
- package/docs/paper/output/submission-bundle/benchmarks/schemas/guardbench-summary.schema.json +23 -2
- package/docs/paper/output/submission-bundle/docs/paper/07-evaluation.md +5 -5
- package/docs/paper/output/submission-bundle/docs/paper/audrey-paper-v1.md +6 -6
- package/docs/paper/output/submission-bundle/docs/paper/evidence-ledger.md +1 -1
- package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/arxiv-manifest.json +4 -4
- package/docs/paper/output/submission-bundle/docs/paper/output/arxiv/main.tex +6 -6
- package/docs/paper/output/submission-bundle/docs/paper/output/arxiv-compile-report.json +3 -3
- package/docs/paper/output/submission-bundle/package.json +18 -5
- package/docs/paper/output/submission-bundle/paper-submission-manifest.json +40 -40
- package/examples/fintech-ops-demo.js +12 -5
- package/examples/healthcare-ops-demo.js +8 -4
- package/examples/ollama-memory-agent.js +41 -13
- package/examples/stripe-demo.js +12 -5
- package/package.json +18 -5
- package/scripts/audit-release-completion.mjs +179 -101
- package/scripts/create-arxiv-source.mjs +20 -14
- package/scripts/create-paper-submission-bundle.mjs +6 -2
- package/scripts/finalize-release.mjs +111 -36
- package/scripts/prepare-release-cut.mjs +14 -6
- package/scripts/publish-release-bundle.mjs +62 -23
- package/scripts/publish-release-github-api.mjs +89 -24
- package/scripts/smoke-cli.js +26 -6
- package/scripts/sync-paper-artifacts.mjs +5 -1
- package/scripts/verify-arxiv-compile.mjs +52 -16
- package/scripts/verify-arxiv-source.mjs +45 -15
- package/scripts/verify-browser-launch-plan.mjs +28 -11
- package/scripts/verify-browser-launch-results.mjs +32 -14
- package/scripts/verify-paper-artifacts.mjs +539 -79
- package/scripts/verify-paper-claims.mjs +48 -20
- package/scripts/verify-paper-submission-bundle.mjs +22 -11
- package/scripts/verify-publication-pack.mjs +23 -9
- package/scripts/verify-release-readiness.mjs +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 =
|
|
10
|
-
|
|
9
|
+
const userPrompt =
|
|
10
|
+
process.argv.slice(2).join(' ').trim() ||
|
|
11
|
+
'Use Audrey memory to explain how this local Ollama agent should remember useful facts.';
|
|
11
12
|
|
|
12
13
|
function usage() {
|
|
13
14
|
console.log(`
|
|
@@ -112,15 +113,22 @@ const tools = [
|
|
|
112
113
|
type: 'function',
|
|
113
114
|
function: {
|
|
114
115
|
name: 'memory_preflight',
|
|
115
|
-
description:
|
|
116
|
+
description:
|
|
117
|
+
'Check Audrey memory before taking an action, so prior failures and rules are not repeated.',
|
|
116
118
|
parameters: {
|
|
117
119
|
type: 'object',
|
|
118
120
|
required: ['action'],
|
|
119
121
|
properties: {
|
|
120
122
|
action: { type: 'string', description: 'Action the agent is considering.' },
|
|
121
123
|
tool: { type: 'string', description: 'Optional tool or command family.' },
|
|
122
|
-
strict: {
|
|
123
|
-
|
|
124
|
+
strict: {
|
|
125
|
+
type: 'boolean',
|
|
126
|
+
description: 'If true, high-severity warnings can block the action.',
|
|
127
|
+
},
|
|
128
|
+
include_capsule: {
|
|
129
|
+
type: 'boolean',
|
|
130
|
+
description: 'Include full capsule context in the result.',
|
|
131
|
+
},
|
|
124
132
|
},
|
|
125
133
|
},
|
|
126
134
|
},
|
|
@@ -129,15 +137,22 @@ const tools = [
|
|
|
129
137
|
type: 'function',
|
|
130
138
|
function: {
|
|
131
139
|
name: 'memory_reflexes',
|
|
132
|
-
description:
|
|
140
|
+
description:
|
|
141
|
+
'Return Audrey Memory Reflexes: trigger-response rules for the action the agent is considering.',
|
|
133
142
|
parameters: {
|
|
134
143
|
type: 'object',
|
|
135
144
|
required: ['action'],
|
|
136
145
|
properties: {
|
|
137
146
|
action: { type: 'string', description: 'Action the agent is considering.' },
|
|
138
147
|
tool: { type: 'string', description: 'Optional tool or command family.' },
|
|
139
|
-
strict: {
|
|
140
|
-
|
|
148
|
+
strict: {
|
|
149
|
+
type: 'boolean',
|
|
150
|
+
description: 'If true, high-severity warnings can become blocking reflexes.',
|
|
151
|
+
},
|
|
152
|
+
include_preflight: {
|
|
153
|
+
type: 'boolean',
|
|
154
|
+
description: 'Include the full underlying preflight report.',
|
|
155
|
+
},
|
|
141
156
|
},
|
|
142
157
|
},
|
|
143
158
|
},
|
|
@@ -176,7 +191,8 @@ const tools = [
|
|
|
176
191
|
type: 'function',
|
|
177
192
|
function: {
|
|
178
193
|
name: 'memory_encode',
|
|
179
|
-
description:
|
|
194
|
+
description:
|
|
195
|
+
'Store a useful lasting observation, decision, preference, or procedure in Audrey.',
|
|
180
196
|
parameters: {
|
|
181
197
|
type: 'object',
|
|
182
198
|
required: ['content'],
|
|
@@ -184,7 +200,13 @@ const tools = [
|
|
|
184
200
|
content: { type: 'string', description: 'Memory content to store.' },
|
|
185
201
|
source: {
|
|
186
202
|
type: 'string',
|
|
187
|
-
enum: [
|
|
203
|
+
enum: [
|
|
204
|
+
'direct-observation',
|
|
205
|
+
'told-by-user',
|
|
206
|
+
'tool-result',
|
|
207
|
+
'inference',
|
|
208
|
+
'model-generated',
|
|
209
|
+
],
|
|
188
210
|
description: 'Source reliability category.',
|
|
189
211
|
},
|
|
190
212
|
tags: {
|
|
@@ -270,7 +292,9 @@ async function main() {
|
|
|
270
292
|
try {
|
|
271
293
|
response = await ollamaChat(messages);
|
|
272
294
|
} catch (err) {
|
|
273
|
-
console.error(
|
|
295
|
+
console.error(
|
|
296
|
+
`Ollama is not reachable at ${OLLAMA_URL}, or model "${OLLAMA_MODEL}" is not available.`,
|
|
297
|
+
);
|
|
274
298
|
console.error(`Try: ollama pull ${OLLAMA_MODEL}`);
|
|
275
299
|
console.error(`Details: ${err.message}`);
|
|
276
300
|
process.exit(1);
|
|
@@ -294,7 +318,11 @@ async function main() {
|
|
|
294
318
|
const name = call.function?.name;
|
|
295
319
|
const executor = toolExecutors[name];
|
|
296
320
|
if (!executor) {
|
|
297
|
-
messages.push({
|
|
321
|
+
messages.push({
|
|
322
|
+
role: 'tool',
|
|
323
|
+
tool_name: name || 'unknown',
|
|
324
|
+
content: 'Unknown Audrey tool',
|
|
325
|
+
});
|
|
298
326
|
continue;
|
|
299
327
|
}
|
|
300
328
|
|
|
@@ -320,7 +348,7 @@ async function main() {
|
|
|
320
348
|
console.log('Stopped after MAX_TOOL_LOOPS without a final model answer.');
|
|
321
349
|
}
|
|
322
350
|
|
|
323
|
-
main().catch(
|
|
351
|
+
main().catch(err => {
|
|
324
352
|
console.error(err);
|
|
325
353
|
process.exit(1);
|
|
326
354
|
});
|
package/examples/stripe-demo.js
CHANGED
|
@@ -21,11 +21,15 @@ async function demo() {
|
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
brain.on('consolidation', ({ principlesExtracted, clustersFound }) => {
|
|
24
|
-
console.log(
|
|
24
|
+
console.log(
|
|
25
|
+
` [CONSOLIDATE] Found ${clustersFound} clusters, extracted ${principlesExtracted} principles`,
|
|
26
|
+
);
|
|
25
27
|
});
|
|
26
28
|
|
|
27
29
|
brain.on('reinforcement', ({ episodeId, similarity }) => {
|
|
28
|
-
console.log(
|
|
30
|
+
console.log(
|
|
31
|
+
` [REINFORCE] Episode ${episodeId.slice(0, 8)}... reinforced existing knowledge (sim: ${similarity?.toFixed(2) || 'N/A'})`,
|
|
32
|
+
);
|
|
29
33
|
});
|
|
30
34
|
|
|
31
35
|
// --- Scenario: Agent encounters Stripe rate limits ---
|
|
@@ -41,7 +45,8 @@ async function demo() {
|
|
|
41
45
|
|
|
42
46
|
console.log('\n--- Episode 2: Second hit from different code path ---');
|
|
43
47
|
await brain.encode({
|
|
44
|
-
content:
|
|
48
|
+
content:
|
|
49
|
+
'Stripe webhook verification endpoint returned 429 Too Many Requests during high traffic',
|
|
45
50
|
source: 'tool-result',
|
|
46
51
|
salience: 0.7,
|
|
47
52
|
causal: { trigger: 'webhook-flood', consequence: 'missed-webhook-events' },
|
|
@@ -65,7 +70,7 @@ async function demo() {
|
|
|
65
70
|
// (e.g. OpenAI text-embedding-3-small), a threshold of 0.80+ works well.
|
|
66
71
|
// We drop it here so the demo pipeline runs end-to-end.
|
|
67
72
|
similarityThreshold: -0.3,
|
|
68
|
-
extractPrinciple: (
|
|
73
|
+
extractPrinciple: () => ({
|
|
69
74
|
content: `Stripe enforces ~100 req/s rate limit across all endpoints. Exceeding this causes 429 errors that can stall payment queues and cause missed webhooks. Implement request throttling.`,
|
|
70
75
|
type: 'semantic',
|
|
71
76
|
}),
|
|
@@ -80,7 +85,9 @@ async function demo() {
|
|
|
80
85
|
|
|
81
86
|
console.log(`\nRecalled ${memories.length} memories:`);
|
|
82
87
|
for (const mem of memories) {
|
|
83
|
-
console.log(
|
|
88
|
+
console.log(
|
|
89
|
+
` [${mem.type.toUpperCase()}] (conf: ${mem.confidence.toFixed(2)}, score: ${mem.score.toFixed(3)}) ${mem.content.slice(0, 80)}${mem.content.length > 80 ? '...' : ''}`,
|
|
90
|
+
);
|
|
84
91
|
}
|
|
85
92
|
|
|
86
93
|
// --- Introspection ---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "audrey",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Local-first memory runtime for AI agents with recall, consolidation, memory reflexes, contradiction detection, and tool-trace learning",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -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,
|
|
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])
|
|
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')
|
|
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}
|
|
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(
|
|
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)
|
|
143
|
-
|
|
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({
|
|
165
|
+
const strictReadiness = await verifyReleaseReadiness({
|
|
166
|
+
targetVersion: version,
|
|
167
|
+
allowPending: false,
|
|
168
|
+
});
|
|
154
169
|
const browserResults = await verifyBrowserLaunchResults();
|
|
155
|
-
const externalEvidence = await verifyExternalGuardBenchEvidence({
|
|
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'], {
|
|
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(
|
|
161
|
-
|
|
162
|
-
|
|
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)
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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 =
|
|
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(
|
|
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(
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
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)
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
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)
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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(
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
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(
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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(
|
|
266
|
-
|
|
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(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
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(
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
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(
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
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(
|
|
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
|
|
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()) {
|