@miller-tech/uap 1.175.13 → 1.178.0

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 (95) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/benchmarks/harness-card.d.ts +86 -0
  3. package/dist/benchmarks/harness-card.d.ts.map +1 -0
  4. package/dist/benchmarks/harness-card.js +153 -0
  5. package/dist/benchmarks/harness-card.js.map +1 -0
  6. package/dist/benchmarks/paired/report.d.ts +15 -0
  7. package/dist/benchmarks/paired/report.d.ts.map +1 -1
  8. package/dist/benchmarks/paired/report.js +12 -0
  9. package/dist/benchmarks/paired/report.js.map +1 -1
  10. package/dist/benchmarks/paired/types.d.ts +1 -1
  11. package/dist/bin/cli.js +27 -0
  12. package/dist/bin/cli.js.map +1 -1
  13. package/dist/cli/bench.d.ts.map +1 -1
  14. package/dist/cli/bench.js +64 -3
  15. package/dist/cli/bench.js.map +1 -1
  16. package/dist/cli/harness.d.ts +3 -2
  17. package/dist/cli/harness.d.ts.map +1 -1
  18. package/dist/cli/harness.js +81 -0
  19. package/dist/cli/harness.js.map +1 -1
  20. package/dist/cli/memory.d.ts +7 -1
  21. package/dist/cli/memory.d.ts.map +1 -1
  22. package/dist/cli/memory.js +165 -0
  23. package/dist/cli/memory.js.map +1 -1
  24. package/dist/delivery/agentic-executor.d.ts +76 -2
  25. package/dist/delivery/agentic-executor.d.ts.map +1 -1
  26. package/dist/delivery/agentic-executor.js +231 -29
  27. package/dist/delivery/agentic-executor.js.map +1 -1
  28. package/dist/delivery/edit-match.d.ts +134 -0
  29. package/dist/delivery/edit-match.d.ts.map +1 -0
  30. package/dist/delivery/edit-match.js +331 -0
  31. package/dist/delivery/edit-match.js.map +1 -0
  32. package/dist/memory/dynamic-retrieval.d.ts.map +1 -1
  33. package/dist/memory/dynamic-retrieval.js +57 -0
  34. package/dist/memory/dynamic-retrieval.js.map +1 -1
  35. package/dist/memory/reconstruct-ingest.d.ts +88 -0
  36. package/dist/memory/reconstruct-ingest.d.ts.map +1 -0
  37. package/dist/memory/reconstruct-ingest.js +165 -0
  38. package/dist/memory/reconstruct-ingest.js.map +1 -0
  39. package/dist/memory/reconstruct-store.d.ts +143 -0
  40. package/dist/memory/reconstruct-store.d.ts.map +1 -0
  41. package/dist/memory/reconstruct-store.js +312 -0
  42. package/dist/memory/reconstruct-store.js.map +1 -0
  43. package/dist/memory/reconstruct.d.ts +272 -0
  44. package/dist/memory/reconstruct.d.ts.map +1 -0
  45. package/dist/memory/reconstruct.js +552 -0
  46. package/dist/memory/reconstruct.js.map +1 -0
  47. package/dist/policies/schemas/policy.d.ts +2 -2
  48. package/dist/self-harness/evidence-proposer.d.ts +58 -0
  49. package/dist/self-harness/evidence-proposer.d.ts.map +1 -0
  50. package/dist/self-harness/evidence-proposer.js +132 -0
  51. package/dist/self-harness/evidence-proposer.js.map +1 -0
  52. package/dist/self-harness/manifest.d.ts +130 -0
  53. package/dist/self-harness/manifest.d.ts.map +1 -0
  54. package/dist/self-harness/manifest.js +247 -0
  55. package/dist/self-harness/manifest.js.map +1 -0
  56. package/dist/self-harness/mods.d.ts +57 -3
  57. package/dist/self-harness/mods.d.ts.map +1 -1
  58. package/dist/self-harness/mods.js +72 -0
  59. package/dist/self-harness/mods.js.map +1 -1
  60. package/dist/self-harness/orchestrator.d.ts +27 -0
  61. package/dist/self-harness/orchestrator.d.ts.map +1 -1
  62. package/dist/self-harness/orchestrator.js +47 -4
  63. package/dist/self-harness/orchestrator.js.map +1 -1
  64. package/dist/self-harness/pending.d.ts +17 -3
  65. package/dist/self-harness/pending.d.ts.map +1 -1
  66. package/dist/self-harness/pending.js +26 -4
  67. package/dist/self-harness/pending.js.map +1 -1
  68. package/dist/self-harness/profile.d.ts +17 -1
  69. package/dist/self-harness/profile.d.ts.map +1 -1
  70. package/dist/self-harness/profile.js +11 -4
  71. package/dist/self-harness/profile.js.map +1 -1
  72. package/dist/self-harness/run.d.ts +19 -0
  73. package/dist/self-harness/run.d.ts.map +1 -1
  74. package/dist/self-harness/run.js +43 -4
  75. package/dist/self-harness/run.js.map +1 -1
  76. package/dist/self-harness/transfer.d.ts.map +1 -1
  77. package/dist/self-harness/transfer.js +2 -0
  78. package/dist/self-harness/transfer.js.map +1 -1
  79. package/dist/self-harness/validate.d.ts +17 -6
  80. package/dist/self-harness/validate.d.ts.map +1 -1
  81. package/dist/self-harness/validate.js +73 -8
  82. package/dist/self-harness/validate.js.map +1 -1
  83. package/dist/telemetry/tool-calls.d.ts +82 -0
  84. package/dist/telemetry/tool-calls.d.ts.map +1 -0
  85. package/dist/telemetry/tool-calls.js +280 -0
  86. package/dist/telemetry/tool-calls.js.map +1 -0
  87. package/dist/telemetry/tool-failure.d.ts +71 -0
  88. package/dist/telemetry/tool-failure.d.ts.map +1 -0
  89. package/dist/telemetry/tool-failure.js +123 -0
  90. package/dist/telemetry/tool-failure.js.map +1 -0
  91. package/docs/plans/harness-engineering-uplift-2026-07-31.md +280 -0
  92. package/package.json +1 -1
  93. package/src/policies/enforcers/__pycache__/_common.cpython-312.pyc +0 -0
  94. package/templates/hooks/__pycache__/deliver_autoroute.cpython-312.pyc +0 -0
  95. package/tools/agents/scripts/__pycache__/toolcall_path_normalizer.cpython-312.pyc +0 -0
@@ -0,0 +1,552 @@
1
+ /**
2
+ * Active memory reconstruction over a Cue–Tag–Content graph
3
+ * (harness plan area E, 2026-07-31).
4
+ *
5
+ * UAP's memory retrieval is passive: embed the query, pull the top-k, reason
6
+ * once. "Memory is Reconstructed, Not Retrieved" (arXiv 2606.06036) shows that
7
+ * paradigm is strictly less expressive than letting the model traverse memory
8
+ * WHILE it reasons — it proves active policies solve a binary-tree
9
+ * needle-in-a-haystack with zero error where passive policies need an
10
+ * exponential budget — and measures the practical gap at up to +23% on LoCoMo
11
+ * with 118k tokens per query against A-Mem's 632k and LangMem's 3.26M.
12
+ *
13
+ * THE TAG LAYER IS THE CONTRIBUTION. Their ablation: cue -> content direct
14
+ * indexing recalls ~65%; cue -> TAG -> content with multi-turn reasoning recalls
15
+ * ~90%. A "graph memory" that skips the associative tag bridge gets none of the
16
+ * benefit, so the schema here makes tags mandatory rather than an optimisation.
17
+ *
18
+ * Off by default. The literature's numbers are theirs, not ours: this ships
19
+ * behind `UAP_MEMORY_ACTIVE=1` until `uap bench paired` measures the lift on our
20
+ * own suite (harness plan constraint 3).
21
+ */
22
+ import Database from 'better-sqlite3';
23
+ import { mkdirSync } from 'node:fs';
24
+ import { dirname } from 'node:path';
25
+ /**
26
+ * A tag linking at least this share of the corpus relates everything and so
27
+ * discriminates nothing — a hub, not a bridge.
28
+ */
29
+ const HUB_RATIO = 0.6;
30
+ /** Below this many contents the ratio is noise, so no tag counts as a hub. */
31
+ const HUB_RATIO_MIN_CONTENTS = 20;
32
+ /**
33
+ * Zero-LLM policy: lexical overlap for routing, breadth-first for expansion.
34
+ *
35
+ * Not a toy — it is the honest default. An active traversal driven by a cheap
36
+ * heuristic is still active (it prunes on accumulated evidence, which is the
37
+ * mechanism the paper isolates); wiring an LLM in raises the ceiling but is not
38
+ * required for the structure to pay off, and a deterministic policy is what
39
+ * makes the loop unit-testable.
40
+ */
41
+ export function heuristicPolicy(opts = {}) {
42
+ const keepThreshold = opts.keepThreshold ?? 0.12;
43
+ // 3 was too eager: on any realistic graph step 1 admits >=3 nodes, the loop
44
+ // stops immediately, and the multi-hop discovery that IS the contribution
45
+ // never runs — the shipped default would have been passive retrieval with a
46
+ // worse ranker. 12 lets the second hop happen while staying under maxContext.
47
+ const sufficientAt = opts.sufficientAt ?? 12;
48
+ // Expansion MUST be bounded. Discovery reseeds the active set from every cue
49
+ // sharing a productive tag, so on a real store step 2 expanded 453 cues —
50
+ // effectively a full scan, which would make this slower AND more expensive
51
+ // than the passive top-k it replaces, inverting the paper's whole result.
52
+ const maxExpand = opts.maxExpandPerStep ?? 24;
53
+ const maxAssociative = opts.maxAssociativePerStep ?? 3;
54
+ const maxBridgeTagSize = opts.maxBridgeTagSize ?? 12;
55
+ return {
56
+ selectCues(query, activeCues, context) {
57
+ if (activeCues.length <= maxExpand)
58
+ return [...activeCues];
59
+ // Rank by relevance to the query first, then to evidence already
60
+ // accumulated — the second term is what makes this reconstruction rather
61
+ // than retrieval: what to look at next depends on what was just found.
62
+ const q = tokenize(query);
63
+ const ctx = tokenize(context.map((c) => c.text).join(' '));
64
+ const scored = activeCues.map((cue) => {
65
+ const t = tokenize(cue);
66
+ return { cue, score: overlap(t, q) * 2 + overlap(t, ctx) };
67
+ });
68
+ scored.sort((a, b) => b.score - a.score || a.cue.localeCompare(b.cue));
69
+ return scored.slice(0, maxExpand).map((s) => s.cue);
70
+ },
71
+ route(query, candidates, context, hops) {
72
+ const q = tokenize(query);
73
+ const direct = candidates.filter((c) => overlap(q, tokenize(c.text)) >= keepThreshold);
74
+ const keep = new Set(direct.map((c) => c.id));
75
+ const deferred = [];
76
+ // ASSOCIATIVE PASS. A tag that has produced admitted evidence is a
77
+ // known-good bridge, so a candidate reached through one earns a lower bar.
78
+ // That is what "associative" means — and without it a lexical router
79
+ // discards exactly the hops the graph exists to make, because the far side
80
+ // of a bridge does not resemble the query by construction.
81
+ //
82
+ // Still a bar, not a free pass: the candidate must relate to the query or
83
+ // to evidence already admitted.
84
+ if (hops && maxAssociative > 0) {
85
+ // Only tags proven in an EARLIER step. Folding in this step's own direct
86
+ // hits would let a bridge admit a sibling the router is rejecting in the
87
+ // very same pass — which is not an associative hop, it is bypassing the
88
+ // pruning. A bridge earns its keep across hops, not within one.
89
+ const productive = hops.productiveTags;
90
+ if (productive.size > 0) {
91
+ const ctx = tokenize([...context, ...direct].map((c) => c.text).join(' '));
92
+ // NO lexical minimum here, deliberately. The far side of a bridge does
93
+ // not resemble the query by construction — that is precisely the
94
+ // evidence retrieval cannot reach — so requiring word overlap would
95
+ // make the tag layer decorative and this whole structure a slower
96
+ // top-k. The PROVEN TAG is the evidence of relatedness.
97
+ //
98
+ // Bounded instead of filtered: at most `maxAssociative` per step, from
99
+ // tags that have already produced admitted evidence, ranked by how
100
+ // much they add to what is known. A cap is an honest way to buy recall
101
+ // with a known amount of noise; a lexical bar here would buy neither.
102
+ const eligible = candidates
103
+ .filter((c) => !keep.has(c.id) &&
104
+ (hops.tagsFor.get(c.id) ?? []).some((t) => productive.has(t)))
105
+ .map((c) => ({ c, score: Math.max(overlap(q, tokenize(c.text)), overlap(tokenize(c.text), ctx)) }))
106
+ // A floor of >0, not a lexical bar. Without ANY floor the slice still
107
+ // admits `maxAssociative` when every candidate scores zero, and the
108
+ // id tie-break then picks the three oldest memories in the store —
109
+ // deterministic noise. "No lexical minimum" and "no bar at all" are
110
+ // different things.
111
+ .map((x) => ({
112
+ ...x,
113
+ // Smallest productive tag this candidate came through.
114
+ specificity: Math.min(...(hops.tagsFor.get(x.c.id) ?? [])
115
+ .filter((t) => productive.has(t))
116
+ .map((t) => hops.tagSize(t))),
117
+ }))
118
+ // Zero lexical score is EXPECTED for a real associative hop, so it
119
+ // cannot be the filter. Tag specificity is: a bridge from a 3-member
120
+ // tag asserts a relation, one from a 300-member tag asserts noise.
121
+ .filter((x) => x.score > 0 || x.specificity <= maxBridgeTagSize)
122
+ .sort((a, b) => b.score - a.score || a.specificity - b.specificity || a.c.id - b.c.id);
123
+ for (const { c } of eligible.slice(0, maxAssociative))
124
+ keep.add(c.id);
125
+ for (const { c } of eligible.slice(maxAssociative))
126
+ deferred.push(c.id);
127
+ }
128
+ }
129
+ return { keep: [...keep], sufficient: context.length + keep.size >= sufficientAt, deferred };
130
+ },
131
+ };
132
+ }
133
+ function tokenize(s) {
134
+ return new Set(s
135
+ .toLowerCase()
136
+ .split(/[^a-z0-9]+/)
137
+ .filter((t) => t.length > 2));
138
+ }
139
+ function overlap(a, b) {
140
+ if (a.size === 0 || b.size === 0)
141
+ return 0;
142
+ let shared = 0;
143
+ for (const t of a)
144
+ if (b.has(t))
145
+ shared++;
146
+ return shared / a.size;
147
+ }
148
+ /**
149
+ * The Cue–Tag–Content graph.
150
+ *
151
+ * Its own SQLite file rather than a table in the semantic store: the traversal
152
+ * is a different access pattern (many small keyed hops, no vector math) and
153
+ * keeping it separate means enabling the feature cannot slow the existing
154
+ * retrieval path.
155
+ */
156
+ export class MemoryGraph {
157
+ db;
158
+ constructor(dbPath) {
159
+ mkdirSync(dirname(dbPath), { recursive: true });
160
+ this.db = new Database(dbPath);
161
+ this.db.pragma('journal_mode = WAL');
162
+ this.db.pragma('synchronous = NORMAL');
163
+ this.db.pragma('busy_timeout = 5000');
164
+ this.db.exec(`
165
+ CREATE TABLE IF NOT EXISTS mg_contents (
166
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
167
+ layer TEXT NOT NULL,
168
+ text TEXT NOT NULL,
169
+ occurred_at TEXT
170
+ );
171
+ CREATE TABLE IF NOT EXISTS mg_triples (
172
+ cue TEXT NOT NULL,
173
+ tag TEXT NOT NULL,
174
+ content_id INTEGER NOT NULL,
175
+ PRIMARY KEY (cue, tag, content_id)
176
+ );
177
+ CREATE INDEX IF NOT EXISTS idx_mg_triples_cue ON mg_triples(cue);
178
+ CREATE INDEX IF NOT EXISTS idx_mg_triples_cue_tag ON mg_triples(cue, tag);
179
+ -- cuesForTag filters on tag ALONE and runs once per productive tag per
180
+ -- step; without this it full-scans mg_triples in the discovery hot path.
181
+ CREATE INDEX IF NOT EXISTS idx_mg_triples_tag ON mg_triples(tag);
182
+ -- Source keys already ingested. Durable dedupe lives WITH the graph so a
183
+ -- rebuild is incremental and a deleted graph cannot leave a stale ledger
184
+ -- behind claiming everything is already indexed.
185
+ CREATE TABLE IF NOT EXISTS mg_sources (
186
+ key TEXT PRIMARY KEY,
187
+ ingested_at TEXT NOT NULL DEFAULT (datetime('now'))
188
+ );
189
+ -- Graph-level metadata. last_refresh_at exists because staleness must
190
+ -- NOT be derived from mg_sources: a refresh that finds nothing new writes
191
+ -- no source rows, so the timestamp never moves, the TTL never clears, and
192
+ -- the index rebuilds on every single retrieval. That is the common case
193
+ -- (idle project, unreachable long-term store, misconfigured project id),
194
+ -- and on the agent path it would be a full corpus scan per model turn.
195
+ CREATE TABLE IF NOT EXISTS mg_meta (
196
+ key TEXT PRIMARY KEY,
197
+ value TEXT NOT NULL
198
+ );
199
+ `);
200
+ }
201
+ /**
202
+ * Add one memory item and its (cue, tag) index entries.
203
+ *
204
+ * Tags are REQUIRED: an item indexed by cue alone is the ~65%-recall
205
+ * configuration the paper ablates away. Callers with no tags should supply a
206
+ * coarse one (the layer name) rather than none.
207
+ */
208
+ addContent(params) {
209
+ const info = this.db
210
+ .prepare('INSERT INTO mg_contents (layer, text, occurred_at) VALUES (?, ?, ?)')
211
+ .run(params.layer, params.text, params.occurredAt ?? null);
212
+ const id = Number(info.lastInsertRowid);
213
+ const stmt = this.db.prepare('INSERT OR IGNORE INTO mg_triples (cue, tag, content_id) VALUES (?, ?, ?)');
214
+ const tags = params.tags.length > 0 ? params.tags : [params.layer];
215
+ const insert = this.db.transaction(() => {
216
+ for (const cue of params.cues) {
217
+ for (const tag of tags)
218
+ stmt.run(norm(cue), norm(tag), id);
219
+ }
220
+ });
221
+ insert();
222
+ return id;
223
+ }
224
+ /** φ_{c→g}: the associative tags a cue activates. */
225
+ tagsForCue(cue) {
226
+ const rows = this.db
227
+ .prepare('SELECT DISTINCT tag FROM mg_triples WHERE cue = ?')
228
+ .all(norm(cue));
229
+ return rows.map((r) => r.tag);
230
+ }
231
+ /** φ_{(c,g)→v}: contents reachable from a cue THROUGH a specific tag. */
232
+ contentsFor(cue, tag) {
233
+ const rows = this.db
234
+ .prepare(`SELECT c.id, c.layer, c.text, c.occurred_at
235
+ FROM mg_triples t JOIN mg_contents c ON c.id = t.content_id
236
+ WHERE t.cue = ? AND t.tag = ?`)
237
+ .all(norm(cue), norm(tag));
238
+ return rows.map(toNode);
239
+ }
240
+ /**
241
+ * Tags too broad to be bridges: attached to >= 60% of all content. Reuses the
242
+ * discriminativeness rule `stats()` already applies, because a tag that links
243
+ * everything relates nothing — and on the short-term tier EVERY item is tagged
244
+ * with one of ~6 type values, so without this the "bridge" is the whole store.
245
+ */
246
+ hubTags() {
247
+ // The ratio only means something once there is a corpus to take a ratio of:
248
+ // on three memories a two-member tag is 67% and obviously a real bridge, and
249
+ // calling it a hub would stop every traversal in a small store.
250
+ const rows = this.db
251
+ .prepare(`SELECT tag FROM mg_triples GROUP BY tag
252
+ HAVING (SELECT COUNT(*) FROM mg_contents) >= ${HUB_RATIO_MIN_CONTENTS}
253
+ AND COUNT(DISTINCT content_id) >= ${HUB_RATIO} * (SELECT COUNT(*) FROM mg_contents)`)
254
+ .all();
255
+ return new Set(rows.map((r) => r.tag));
256
+ }
257
+ tagSizeCache = new Map();
258
+ /** How many distinct contents a tag links. Cached — hot in the route loop. */
259
+ tagSize(tag) {
260
+ const key = norm(tag);
261
+ const hit = this.tagSizeCache.get(key);
262
+ if (hit !== undefined)
263
+ return hit;
264
+ const row = this.db
265
+ .prepare('SELECT COUNT(DISTINCT content_id) AS n FROM mg_triples WHERE tag = ?')
266
+ .get(key);
267
+ const n = row?.n ?? 0;
268
+ this.tagSizeCache.set(key, n);
269
+ return n;
270
+ }
271
+ /** Cues that co-occur with a tag — how traversal discovers NEW clues. */
272
+ cuesForTag(tag) {
273
+ const rows = this.db
274
+ .prepare('SELECT DISTINCT cue FROM mg_triples WHERE tag = ?')
275
+ .all(norm(tag));
276
+ return rows.map((r) => r.cue);
277
+ }
278
+ /** Source keys already ingested, for incremental rebuilds. */
279
+ ingestedKeys() {
280
+ const rows = this.db.prepare('SELECT key FROM mg_sources').all();
281
+ return new Set(rows.map((r) => r.key));
282
+ }
283
+ /** Record that a refresh COMPLETED, whether or not it stored anything. */
284
+ markRefreshed(nowIso) {
285
+ this.db
286
+ .prepare("INSERT INTO mg_meta (key, value) VALUES ('last_refresh_at', ?) " +
287
+ 'ON CONFLICT(key) DO UPDATE SET value = excluded.value')
288
+ .run(nowIso);
289
+ }
290
+ /** ISO timestamp of the last completed refresh, or null if never refreshed. */
291
+ lastRefreshedAt() {
292
+ const row = this.db.prepare("SELECT value FROM mg_meta WHERE key = 'last_refresh_at'").get();
293
+ return row?.value ?? null;
294
+ }
295
+ /**
296
+ * Best-effort single-flight guard around a build.
297
+ *
298
+ * Two agents retrieving at once both see a stale graph, both build, and both
299
+ * insert the same items under fresh ids — permanent duplicates, since the
300
+ * ledger then reports them indexed. Returns false when another build holds the
301
+ * lock; a lock older than `staleMs` is taken over so a crashed build cannot
302
+ * wedge refreshes forever.
303
+ */
304
+ acquireBuildLock(nowMs, staleMs = 120_000) {
305
+ try {
306
+ const row = this.db.prepare("SELECT value FROM mg_meta WHERE key = 'build_lock'").get();
307
+ if (row) {
308
+ const held = Number(row.value);
309
+ if (Number.isFinite(held) && nowMs - held < staleMs)
310
+ return false;
311
+ }
312
+ this.db
313
+ .prepare("INSERT INTO mg_meta (key, value) VALUES ('build_lock', ?) " +
314
+ 'ON CONFLICT(key) DO UPDATE SET value = excluded.value')
315
+ .run(String(nowMs));
316
+ return true;
317
+ }
318
+ catch {
319
+ return false;
320
+ }
321
+ }
322
+ releaseBuildLock() {
323
+ try {
324
+ this.db.prepare("DELETE FROM mg_meta WHERE key = 'build_lock'").run();
325
+ }
326
+ catch {
327
+ /* best-effort */
328
+ }
329
+ }
330
+ /** ISO timestamp of the most recent ingest, or null if never built. */
331
+ lastIngestedAt() {
332
+ const row = this.db.prepare('SELECT MAX(ingested_at) AS t FROM mg_sources').get();
333
+ return row?.t ?? null;
334
+ }
335
+ /** Mark source keys as ingested. */
336
+ markIngested(keys) {
337
+ const stmt = this.db.prepare('INSERT OR IGNORE INTO mg_sources (key) VALUES (?)');
338
+ const tx = this.db.transaction((ks) => {
339
+ for (const k of ks)
340
+ stmt.run(k);
341
+ });
342
+ tx([...keys]);
343
+ }
344
+ /**
345
+ * Cheap emptiness probe. `stats()` runs five aggregates including two
346
+ * COUNT(DISTINCT) and a GROUP BY — far too expensive for the "should I route
347
+ * here" check that runs on every single query.
348
+ */
349
+ isEmpty() {
350
+ const row = this.db.prepare('SELECT 1 AS n FROM mg_contents LIMIT 1').get();
351
+ return row === undefined;
352
+ }
353
+ /** Delete everything — the truncate half of a real rebuild. */
354
+ clear() {
355
+ this.db.exec('DELETE FROM mg_triples; DELETE FROM mg_contents; DELETE FROM mg_sources;');
356
+ }
357
+ /** Shape of the graph, for `uap memory graph status` and honest reporting. */
358
+ stats() {
359
+ const one = (sql) => (this.db.prepare(sql).get()?.n ?? 0);
360
+ return {
361
+ contents: one('SELECT COUNT(*) AS n FROM mg_contents'),
362
+ cues: one('SELECT COUNT(DISTINCT cue) AS n FROM mg_triples'),
363
+ tags: one('SELECT COUNT(DISTINCT tag) AS n FROM mg_triples'),
364
+ triples: one('SELECT COUNT(*) AS n FROM mg_triples'),
365
+ // Tags linking >1 content node are the ones doing associative work — but
366
+ // a tag attached to EVERY memory (a type enum, a month bucket) links
367
+ // everything and discriminates nothing, so counting it as a bridge
368
+ // reports health while the graph is a hairball. Require >1 and <60% of
369
+ // all contents.
370
+ bridgingTags: one(`SELECT COUNT(*) AS n FROM (
371
+ SELECT tag FROM mg_triples
372
+ GROUP BY tag
373
+ HAVING COUNT(DISTINCT content_id) > 1
374
+ AND (
375
+ (SELECT COUNT(*) FROM mg_contents) < ${HUB_RATIO_MIN_CONTENTS}
376
+ OR COUNT(DISTINCT content_id) < ${HUB_RATIO} * (SELECT COUNT(*) FROM mg_contents)
377
+ )
378
+ )`),
379
+ };
380
+ }
381
+ /** Every cue in the graph — the seed set when the query matches nothing. */
382
+ allCues() {
383
+ const rows = this.db.prepare('SELECT DISTINCT cue FROM mg_triples').all();
384
+ return rows.map((r) => r.cue);
385
+ }
386
+ close() {
387
+ try {
388
+ this.db.close();
389
+ }
390
+ catch {
391
+ /* ignore */
392
+ }
393
+ }
394
+ }
395
+ function norm(s) {
396
+ return s.trim().toLowerCase();
397
+ }
398
+ function toNode(r) {
399
+ return {
400
+ id: r.id,
401
+ layer: r.layer,
402
+ text: r.text,
403
+ occurredAt: r.occurred_at ?? undefined,
404
+ };
405
+ }
406
+ /**
407
+ * Reconstruct an answer context by traversing the graph while reasoning.
408
+ *
409
+ * The loop is the paper's three-step iteration: select actions over the active
410
+ * set, traverse (cue -> tags -> contents), then route/prune and update state.
411
+ * The essential difference from retrieval is that step N+1's expansion depends
412
+ * on what step N actually found — cues discovered mid-traversal become new
413
+ * entry points, and weak paths are killed before they consume context.
414
+ */
415
+ export function reconstruct(graph, query, options = {}) {
416
+ const maxSteps = options.maxSteps ?? 5;
417
+ const maxContext = options.maxContext ?? 24;
418
+ const maxExpand = options.maxExpandPerStep ?? 24;
419
+ const policy = options.policy ?? heuristicPolicy();
420
+ const seeds = options.seedCues ?? seedCuesFromQuery(graph, query, options.maxSeeds);
421
+ let active = new Set(seeds.map(norm));
422
+ const visitedCues = new Set();
423
+ const context = [];
424
+ const admitted = new Set();
425
+ // Content the router judged irrelevant. A rejection is DURABLE: the router
426
+ // ruled on the merits, and a later bridge must not resurrect it — otherwise a
427
+ // single mis-tagged memory re-enters on every hop that touches its tag.
428
+ const rejected = new Set();
429
+ const steps = [];
430
+ // Tags that have produced admitted evidence, accumulated across steps.
431
+ const productiveTags = new Set();
432
+ // ...minus the ones too broad to mean anything.
433
+ const hubs = graph.hubTags();
434
+ let converged = false;
435
+ let stopReason = 'step-budget';
436
+ for (let step = 1; step <= maxSteps; step++) {
437
+ const toExpand = policy
438
+ .selectCues(query, [...active], context)
439
+ .map(norm)
440
+ // Intersect with the ACTIVE set: a policy may only expand cues the
441
+ // traversal actually reached, never ones it invented.
442
+ .filter((c) => active.has(c) && !visitedCues.has(c))
443
+ .slice(0, maxExpand);
444
+ if (toExpand.length === 0) {
445
+ stopReason = 'exhausted';
446
+ break;
447
+ }
448
+ const tags = new Set();
449
+ const candidates = [];
450
+ const seenThisStep = new Set();
451
+ // Which tags each candidate was reached through — the router needs it to
452
+ // tell an associative hop from an unrelated match.
453
+ const provenance = new Map();
454
+ for (const cue of toExpand) {
455
+ visitedCues.add(cue);
456
+ active.delete(cue);
457
+ for (const tag of graph.tagsForCue(cue)) {
458
+ tags.add(tag);
459
+ for (const node of graph.contentsFor(cue, tag)) {
460
+ provenance.set(node.id, [...(provenance.get(node.id) ?? []), tag]);
461
+ // Already in context, or already a candidate this step — the graph is
462
+ // many-to-many, so the same content is reached by several paths.
463
+ if (admitted.has(node.id) || rejected.has(node.id) || seenThisStep.has(node.id))
464
+ continue;
465
+ seenThisStep.add(node.id);
466
+ candidates.push(node);
467
+ }
468
+ }
469
+ }
470
+ const { keep, sufficient, deferred } = policy.route(query, candidates, context, {
471
+ tagsFor: provenance,
472
+ productiveTags,
473
+ tagSize: (t) => graph.tagSize(t),
474
+ });
475
+ const bridgedButCapped = new Set(deferred ?? []);
476
+ const keepSet = new Set(keep);
477
+ const kept = [];
478
+ const pruned = [];
479
+ const dropped = [];
480
+ for (const node of candidates) {
481
+ if (!keepSet.has(node.id)) {
482
+ // Pruned BEFORE it costs context — the token saving the paper measures.
483
+ pruned.push(node.id);
484
+ // Only a candidate the router actually SAW and declined is blacklisted.
485
+ // An associative candidate that merely missed the per-step cap was never
486
+ // judged on the merits, and must stay reachable by a later, stronger
487
+ // bridge.
488
+ if (!bridgedButCapped.has(node.id))
489
+ rejected.add(node.id);
490
+ continue;
491
+ }
492
+ if (context.length >= maxContext) {
493
+ dropped.push(node.id);
494
+ continue;
495
+ }
496
+ context.push(node);
497
+ admitted.add(node.id);
498
+ kept.push(node.id);
499
+ // This tag is now a proven bridge for the rest of the traversal — unless
500
+ // it is a hub, in which case it "bridges" to the entire corpus.
501
+ for (const t of provenance.get(node.id) ?? [])
502
+ if (!hubs.has(t))
503
+ productiveTags.add(t);
504
+ }
505
+ // Discovery: tags reached by KEPT evidence surface new cues to expand. Only
506
+ // productive tags propagate, or a pruned branch would keep reseeding itself.
507
+ if (kept.length > 0) {
508
+ // Reuse the tags just proven, rather than re-issuing every tagsForCue and
509
+ // contentsFor query the expansion above already made.
510
+ for (const tag of productiveTags) {
511
+ for (const cue of graph.cuesForTag(tag)) {
512
+ if (!visitedCues.has(cue))
513
+ active.add(cue);
514
+ }
515
+ }
516
+ }
517
+ steps.push({ step, expandedCues: toExpand, tags: [...tags], kept, pruned, dropped, sufficient });
518
+ if (sufficient || context.length >= maxContext) {
519
+ converged = sufficient;
520
+ stopReason = sufficient ? 'sufficient' : 'context-full';
521
+ break;
522
+ }
523
+ if (active.size === 0) {
524
+ stopReason = 'exhausted';
525
+ break;
526
+ }
527
+ }
528
+ return { context, steps, converged, stopReason };
529
+ }
530
+ /**
531
+ * Seed cues = query tokens present in the graph.
532
+ *
533
+ * When nothing matches we fall back to a BOUNDED sample rather than every cue
534
+ * in the graph: an off-topic query would otherwise load the entire content
535
+ * table on step 1, which is the opposite of what this is for.
536
+ */
537
+ export function seedCuesFromQuery(graph, query, maxSeeds = 32) {
538
+ const tokens = [...tokenize(query)];
539
+ const known = new Set(graph.allCues());
540
+ const hits = tokens.filter((t) => known.has(t));
541
+ if (hits.length > 0)
542
+ return hits;
543
+ return [...known].sort().slice(0, maxSeeds);
544
+ }
545
+ /**
546
+ * Is active reconstruction enabled? Off by default — the lift is measured on our
547
+ * own suite before it becomes the default retrieval path.
548
+ */
549
+ export function activeReconstructionEnabled() {
550
+ return process.env.UAP_MEMORY_ACTIVE === '1';
551
+ }
552
+ //# sourceMappingURL=reconstruct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reconstruct.js","sourceRoot":"","sources":["../../src/memory/reconstruct.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;;GAGG;AACH,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,8EAA8E;AAC9E,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAoHlC;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAC7B,OAWI,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;IACvC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACjC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AAC9C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,2BAA2B;IACzC,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,KAAK,GAAG,CAAC;AAC/C,CAAC"}
@@ -21,10 +21,10 @@ export declare const PolicySchema: z.ZodObject<{
21
21
  version: number;
22
22
  createdAt: string;
23
23
  category: "custom" | "code" | "security" | "workflow" | "release" | "testing" | "infrastructure" | "ui" | "image" | "automation" | "quality" | "safety";
24
+ tags: string[];
24
25
  level: "REQUIRED" | "RECOMMENDED" | "OPTIONAL";
25
26
  enforcementStage: "review" | "always" | "pre-exec" | "post-exec";
26
27
  rawMarkdown: string;
27
- tags: string[];
28
28
  updatedAt: string;
29
29
  isActive: boolean;
30
30
  convertedFormat?: string | null | undefined;
@@ -35,9 +35,9 @@ export declare const PolicySchema: z.ZodObject<{
35
35
  version: number;
36
36
  createdAt: string;
37
37
  category: "custom" | "code" | "security" | "workflow" | "release" | "testing" | "infrastructure" | "ui" | "image" | "automation" | "quality" | "safety";
38
+ tags: string[];
38
39
  level: "REQUIRED" | "RECOMMENDED" | "OPTIONAL";
39
40
  rawMarkdown: string;
40
- tags: string[];
41
41
  updatedAt: string;
42
42
  isActive: boolean;
43
43
  priority?: number | undefined;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Evidence-driven proposer — the D -> B connection (harness plan, 2026-07-31).
3
+ *
4
+ * The plan's load-bearing sequence is D (evidence corpus) THEN B (tool search
5
+ * space): record what the tool layer actually does, then mutate the knobs the
6
+ * evidence implicates. Shipping both halves without this module would leave the
7
+ * corpus written but unread and `ToolMod` defined but never emitted — a search
8
+ * space with nothing searching it.
9
+ *
10
+ * Unlike `heuristicProposer`, which maps a run-level FailureKind to an
11
+ * inference-server knob, this reads per-tool-call outcomes. That is the level
12
+ * the tool layer fails at: an `edit-miss` never surfaces as a run-level failure
13
+ * kind, it just quietly costs a turn, which is exactly why the loop could not
14
+ * see the surface the literature says matters most (tools +3.3pp, arXiv
15
+ * 2604.25850).
16
+ *
17
+ * Every proposal is a HYPOTHESIS with a measurable prediction, not a fix. The
18
+ * paired validator decides, and the change manifest falsifies it next round.
19
+ */
20
+ import { Mod } from './mods.js';
21
+ import type { Proposer } from './propose.js';
22
+ import type { HarnessProfile } from './profile.js';
23
+ import { type EvidenceSummary } from '../telemetry/tool-calls.js';
24
+ /** Thresholds at which a signal is strong enough to be worth a bench run. */
25
+ export interface EvidenceThresholds {
26
+ /** Minimum edit attempts before edit health means anything. */
27
+ minEditAttempts?: number;
28
+ /** Edit success rate below which the edit surface is implicated. */
29
+ editSuccessFloor?: number;
30
+ /** Share of edit attempts landing only via tolerance, above which anchors are stale. */
31
+ tolerantShareCeiling?: number;
32
+ }
33
+ /**
34
+ * Propose tool-layer Mods from the evidence corpus.
35
+ *
36
+ * `summary` is injected so this is testable without a database, and so a caller
37
+ * can scope it to one run.
38
+ */
39
+ export declare function proposeFromEvidence(summary: EvidenceSummary, profile: HarnessProfile, thresholds?: EvidenceThresholds): Mod[];
40
+ /**
41
+ * A `Proposer` that reads the live corpus.
42
+ *
43
+ * It ignores `weaknesses` by design: those are run-level failure kinds mined
44
+ * from bench records, and this proposer's whole point is the signal that never
45
+ * reaches that level.
46
+ */
47
+ export declare function evidenceProposer(opts?: {
48
+ runId?: string;
49
+ thresholds?: EvidenceThresholds;
50
+ summary?: EvidenceSummary;
51
+ }): Proposer;
52
+ /**
53
+ * Run several proposers and concatenate, de-duplicated by structural identity.
54
+ * Lets the loop search the tool layer AND the server layer in one iteration
55
+ * without either proposer knowing about the other.
56
+ */
57
+ export declare function combineProposers(id: string, proposers: Proposer[]): Proposer;
58
+ //# sourceMappingURL=evidence-proposer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidence-proposer.d.ts","sourceRoot":"","sources":["../../src/self-harness/evidence-proposer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAwD,MAAM,WAAW,CAAC;AACtF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAiBtF,6EAA6E;AAC7E,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wFAAwF;IACxF,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,eAAe,EACxB,OAAO,EAAE,cAAc,EACvB,UAAU,GAAE,kBAAuB,GAClC,GAAG,EAAE,CAiDP;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAAC,OAAO,CAAC,EAAE,eAAe,CAAA;CAAO,GACxF,QAAQ,CAQV;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAiB5E"}