audrey 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +3 -1
- package/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +4 -4
- package/benchmarks/output/external/guardbench-external-dry-run.json +1 -1
- package/benchmarks/output/external/guardbench-external-evidence.json +1 -1
- package/benchmarks/output/guardbench-conformance-card.json +9 -9
- package/benchmarks/output/guardbench-raw.json +123 -115
- package/benchmarks/output/guardbench-summary.json +204 -188
- 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 +9 -9
- package/benchmarks/output/submission-bundle/guardbench-raw.json +123 -115
- package/benchmarks/output/submission-bundle/guardbench-summary.json +204 -188
- package/benchmarks/output/submission-bundle/submission-manifest.json +10 -10
- package/benchmarks/output/submission-bundle/validation-report.json +1 -1
- package/benchmarks/output/summary.json +61 -61
- package/dist/mcp-server/config.d.ts +1 -1
- package/dist/mcp-server/config.js +1 -1
- package/dist/mcp-server/index.d.ts.map +1 -1
- package/dist/mcp-server/index.js +68 -18
- package/dist/mcp-server/index.js.map +1 -1
- package/dist/src/audrey.d.ts +2 -0
- package/dist/src/audrey.d.ts.map +1 -1
- package/dist/src/audrey.js +2 -0
- package/dist/src/audrey.js.map +1 -1
- package/dist/src/autopilot.d.ts +3 -1
- package/dist/src/autopilot.d.ts.map +1 -1
- package/dist/src/autopilot.js +150 -37
- package/dist/src/autopilot.js.map +1 -1
- package/dist/src/capsule.d.ts +2 -0
- package/dist/src/capsule.d.ts.map +1 -1
- package/dist/src/capsule.js +43 -3
- package/dist/src/capsule.js.map +1 -1
- package/dist/src/controller.d.ts.map +1 -1
- package/dist/src/controller.js +7 -3
- package/dist/src/controller.js.map +1 -1
- package/dist/src/events.d.ts +23 -6
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js +80 -13
- package/dist/src/events.js.map +1 -1
- package/dist/src/preflight.d.ts.map +1 -1
- package/dist/src/preflight.js +16 -3
- package/dist/src/preflight.js.map +1 -1
- package/dist/src/project.d.ts +17 -0
- package/dist/src/project.d.ts.map +1 -0
- package/dist/src/project.js +56 -0
- package/dist/src/project.js.map +1 -0
- package/dist/src/redact.d.ts.map +1 -1
- package/dist/src/redact.js +20 -0
- package/dist/src/redact.js.map +1 -1
- package/docs/paper/07-evaluation.md +4 -4
- package/docs/paper/audrey-paper-v1.md +4 -4
- 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 +4 -4
- package/docs/paper/output/arxiv-compile-report.json +3 -3
- package/docs/paper/output/submission-bundle/README.md +3 -1
- package/docs/paper/output/submission-bundle/benchmarks/output/adapter-self-test/guardbench-adapter-self-test.json +4 -4
- package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-dry-run.json +1 -1
- package/docs/paper/output/submission-bundle/benchmarks/output/external/guardbench-external-evidence.json +1 -1
- package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-conformance-card.json +9 -9
- package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-raw.json +123 -115
- package/docs/paper/output/submission-bundle/benchmarks/output/guardbench-summary.json +204 -188
- 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 +10 -10
- 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 +59 -59
- package/docs/paper/output/submission-bundle/docs/paper/07-evaluation.md +4 -4
- package/docs/paper/output/submission-bundle/docs/paper/audrey-paper-v1.md +4 -4
- 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 +4 -4
- package/docs/paper/output/submission-bundle/docs/paper/output/arxiv-compile-report.json +3 -3
- package/docs/paper/output/submission-bundle/package.json +2 -1
- package/docs/paper/output/submission-bundle/paper-submission-manifest.json +30 -30
- package/package.json +2 -1
package/dist/mcp-server/index.js
CHANGED
|
@@ -72,6 +72,41 @@ async function reembed() {
|
|
|
72
72
|
await audrey.closeAsync();
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
+
// The dream/reflect CLIs run under a utility agent name, but memories belong to
|
|
76
|
+
// real agents (claude-code, codex, ...). Consolidate per owning agent so the
|
|
77
|
+
// sweep actually touches stored episodes instead of the utility agent's empty set.
|
|
78
|
+
async function dreamAcrossAgents(audrey) {
|
|
79
|
+
const rows = audrey.db
|
|
80
|
+
.prepare(`SELECT DISTINCT agent FROM episodes
|
|
81
|
+
WHERE consolidated = 0 AND superseded_by IS NULL AND embedding IS NOT NULL`)
|
|
82
|
+
.all();
|
|
83
|
+
const agents = rows
|
|
84
|
+
.map(row => row.agent)
|
|
85
|
+
.filter(agent => typeof agent === 'string' && agent.trim().length > 0);
|
|
86
|
+
if (agents.length === 0)
|
|
87
|
+
agents.push(audrey.agent);
|
|
88
|
+
const totals = {
|
|
89
|
+
episodesEvaluated: 0,
|
|
90
|
+
clustersFound: 0,
|
|
91
|
+
principlesExtracted: 0,
|
|
92
|
+
semanticsCreated: 0,
|
|
93
|
+
proceduresCreated: 0,
|
|
94
|
+
decayEvaluated: 0,
|
|
95
|
+
decayDormant: 0,
|
|
96
|
+
agents,
|
|
97
|
+
};
|
|
98
|
+
for (const agent of agents) {
|
|
99
|
+
const result = await audrey.dream({ agent });
|
|
100
|
+
totals.episodesEvaluated += result.consolidation.episodesEvaluated;
|
|
101
|
+
totals.clustersFound += result.consolidation.clustersFound;
|
|
102
|
+
totals.principlesExtracted += result.consolidation.principlesExtracted;
|
|
103
|
+
totals.semanticsCreated += result.consolidation.semanticsCreated ?? 0;
|
|
104
|
+
totals.proceduresCreated += result.consolidation.proceduresCreated ?? 0;
|
|
105
|
+
totals.decayEvaluated += result.decay.totalEvaluated;
|
|
106
|
+
totals.decayDormant += result.decay.transitionedToDormant;
|
|
107
|
+
}
|
|
108
|
+
return totals;
|
|
109
|
+
}
|
|
75
110
|
async function dream() {
|
|
76
111
|
const dataDir = resolveDataDir(process.env);
|
|
77
112
|
const explicit = process.env['AUDREY_EMBEDDING_PROVIDER'];
|
|
@@ -93,14 +128,16 @@ async function dream() {
|
|
|
93
128
|
: `${embedding.provider} (${embedding.dimensions}d)`;
|
|
94
129
|
console.log('[audrey] Starting dream cycle...');
|
|
95
130
|
console.log(`[audrey] Embedding: ${embeddingLabel}`);
|
|
96
|
-
const
|
|
131
|
+
const totals = await dreamAcrossAgents(audrey);
|
|
132
|
+
const stats = audrey.introspect();
|
|
97
133
|
const health = audrey.memoryStatus();
|
|
98
|
-
console.log(`[audrey]
|
|
99
|
-
|
|
100
|
-
`
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
134
|
+
console.log(`[audrey] Agents: ${totals.agents.join(', ')}`);
|
|
135
|
+
console.log(`[audrey] Consolidation: evaluated ${totals.episodesEvaluated} episodes, ` +
|
|
136
|
+
`found ${totals.clustersFound} clusters, extracted ${totals.principlesExtracted} principles ` +
|
|
137
|
+
`(${totals.semanticsCreated} semantic, ${totals.proceduresCreated} procedural)`);
|
|
138
|
+
console.log(`[audrey] Decay: evaluated ${totals.decayEvaluated} memories, ` +
|
|
139
|
+
`${totals.decayDormant} transitioned to dormant`);
|
|
140
|
+
console.log(`[audrey] Final: ${stats.episodic} episodic, ${stats.semantic} semantic, ${stats.procedural} procedural ` +
|
|
104
141
|
`| ${health.healthy ? 'healthy' : 'unhealthy'}`);
|
|
105
142
|
console.log('[audrey] Dream complete.');
|
|
106
143
|
}
|
|
@@ -248,7 +285,7 @@ async function reflect() {
|
|
|
248
285
|
const embedding = resolveEmbeddingProvider(process.env, explicit);
|
|
249
286
|
const config = {
|
|
250
287
|
dataDir,
|
|
251
|
-
agent: 'reflect',
|
|
288
|
+
agent: process.env['AUDREY_AGENT'] ?? 'reflect',
|
|
252
289
|
embedding,
|
|
253
290
|
};
|
|
254
291
|
const llm = resolveLLMProvider(process.env, process.env['AUDREY_LLM_PROVIDER']);
|
|
@@ -286,13 +323,13 @@ async function reflect() {
|
|
|
286
323
|
}
|
|
287
324
|
// Always run dream cycle after reflect
|
|
288
325
|
console.log('[audrey] Starting dream cycle...');
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
console.log(`[audrey] Status: ${
|
|
295
|
-
`${
|
|
326
|
+
const totals = await dreamAcrossAgents(audrey);
|
|
327
|
+
const stats = audrey.introspect();
|
|
328
|
+
console.log(`[audrey] Consolidation: ${totals.episodesEvaluated} episodes evaluated, ` +
|
|
329
|
+
`${totals.clustersFound} clusters, ${totals.principlesExtracted} principles`);
|
|
330
|
+
console.log(`[audrey] Decay: ${totals.decayEvaluated} evaluated, ` + `${totals.decayDormant} dormant`);
|
|
331
|
+
console.log(`[audrey] Status: ${stats.episodic} episodic, ${stats.semantic} semantic, ` +
|
|
332
|
+
`${stats.procedural} procedural`);
|
|
296
333
|
console.log('[audrey] Dream complete.');
|
|
297
334
|
}
|
|
298
335
|
finally {
|
|
@@ -1773,9 +1810,17 @@ async function main() {
|
|
|
1773
1810
|
.max(200)
|
|
1774
1811
|
.optional()
|
|
1775
1812
|
.describe('Max rows to return (defaults to 20)'),
|
|
1776
|
-
|
|
1813
|
+
cwd: z
|
|
1814
|
+
.string()
|
|
1815
|
+
.optional()
|
|
1816
|
+
.describe('Scope failures to the project containing this directory'),
|
|
1817
|
+
include_resolved: z
|
|
1818
|
+
.boolean()
|
|
1819
|
+
.optional()
|
|
1820
|
+
.describe('Include failure streaks already resolved by a later success (default false)'),
|
|
1821
|
+
}, async ({ since, limit, cwd, include_resolved }) => {
|
|
1777
1822
|
try {
|
|
1778
|
-
return toolResult(audrey.recentFailures({ since, limit }));
|
|
1823
|
+
return toolResult(audrey.recentFailures({ since, limit, cwd, includeResolved: include_resolved }));
|
|
1779
1824
|
}
|
|
1780
1825
|
catch (err) {
|
|
1781
1826
|
return toolError(err);
|
|
@@ -1820,7 +1865,11 @@ async function main() {
|
|
|
1820
1865
|
.enum(['agent', 'shared'])
|
|
1821
1866
|
.optional()
|
|
1822
1867
|
.describe('agent restricts memory recall to this MCP server agent identity. shared searches the whole store. Defaults to agent.'),
|
|
1823
|
-
|
|
1868
|
+
cwd: z
|
|
1869
|
+
.string()
|
|
1870
|
+
.optional()
|
|
1871
|
+
.describe('Scope tool-failure risks to the project containing this directory.'),
|
|
1872
|
+
}, async ({ query, limit, budget_chars, mode, recent_change_window_hours, include_risks, include_contradictions, scope, cwd, }) => {
|
|
1824
1873
|
try {
|
|
1825
1874
|
const capsule = await audrey.capsule(query, {
|
|
1826
1875
|
limit,
|
|
@@ -1829,6 +1878,7 @@ async function main() {
|
|
|
1829
1878
|
recentChangeWindowHours: recent_change_window_hours,
|
|
1830
1879
|
includeRisks: include_risks,
|
|
1831
1880
|
includeContradictions: include_contradictions,
|
|
1881
|
+
cwd,
|
|
1832
1882
|
recall: { scope: scope ?? 'agent' },
|
|
1833
1883
|
});
|
|
1834
1884
|
return toolResult(capsule);
|