agent-recall-core 3.4.47 → 3.4.49
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/README.md +25 -0
- package/dist/digest/store.d.ts +15 -6
- package/dist/digest/store.d.ts.map +1 -1
- package/dist/digest/store.js +33 -20
- package/dist/digest/store.js.map +1 -1
- package/dist/embeddings/chunker.d.ts +102 -0
- package/dist/embeddings/chunker.d.ts.map +1 -0
- package/dist/embeddings/chunker.js +260 -0
- package/dist/embeddings/chunker.js.map +1 -0
- package/dist/embeddings/config.d.ts +93 -0
- package/dist/embeddings/config.d.ts.map +1 -0
- package/dist/embeddings/config.js +174 -0
- package/dist/embeddings/config.js.map +1 -0
- package/dist/embeddings/index-store.d.ts +61 -0
- package/dist/embeddings/index-store.d.ts.map +1 -0
- package/dist/embeddings/index-store.js +158 -0
- package/dist/embeddings/index-store.js.map +1 -0
- package/dist/embeddings/indexer.d.ts +75 -0
- package/dist/embeddings/indexer.d.ts.map +1 -0
- package/dist/embeddings/indexer.js +196 -0
- package/dist/embeddings/indexer.js.map +1 -0
- package/dist/embeddings/runtime.d.ts +66 -0
- package/dist/embeddings/runtime.d.ts.map +1 -0
- package/dist/embeddings/runtime.js +197 -0
- package/dist/embeddings/runtime.js.map +1 -0
- package/dist/helpers/associative-link.d.ts.map +1 -1
- package/dist/helpers/associative-link.js +26 -1
- package/dist/helpers/associative-link.js.map +1 -1
- package/dist/helpers/tokenize.d.ts +1 -0
- package/dist/helpers/tokenize.d.ts.map +1 -1
- package/dist/helpers/tokenize.js +18 -0
- package/dist/helpers/tokenize.js.map +1 -1
- package/dist/index.d.ts +27 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +50 -6
- package/dist/index.js.map +1 -1
- package/dist/palace/awareness.d.ts +34 -10
- package/dist/palace/awareness.d.ts.map +1 -1
- package/dist/palace/awareness.js +249 -180
- package/dist/palace/awareness.js.map +1 -1
- package/dist/palace/consolidate.d.ts +1 -1
- package/dist/palace/consolidate.d.ts.map +1 -1
- package/dist/palace/consolidate.js +9 -9
- package/dist/palace/consolidate.js.map +1 -1
- package/dist/palace/decay-pass.d.ts +1 -1
- package/dist/palace/decay-pass.d.ts.map +1 -1
- package/dist/palace/decay-pass.js +2 -2
- package/dist/palace/decay-pass.js.map +1 -1
- package/dist/palace/fan-out.d.ts +1 -1
- package/dist/palace/fan-out.d.ts.map +1 -1
- package/dist/palace/fan-out.js +5 -5
- package/dist/palace/fan-out.js.map +1 -1
- package/dist/palace/index-manager.d.ts +1 -1
- package/dist/palace/index-manager.d.ts.map +1 -1
- package/dist/palace/index-manager.js +1 -1
- package/dist/palace/index-manager.js.map +1 -1
- package/dist/palace/insights-index.d.ts +19 -6
- package/dist/palace/insights-index.d.ts.map +1 -1
- package/dist/palace/insights-index.js +36 -13
- package/dist/palace/insights-index.js.map +1 -1
- package/dist/palace/keystone.d.ts +1 -1
- package/dist/palace/keystone.d.ts.map +1 -1
- package/dist/palace/keystone.js +2 -2
- package/dist/palace/keystone.js.map +1 -1
- package/dist/palace/rooms.d.ts +3 -3
- package/dist/palace/rooms.d.ts.map +1 -1
- package/dist/palace/rooms.js +34 -6
- package/dist/palace/rooms.js.map +1 -1
- package/dist/retrieval/candidates.d.ts +27 -2
- package/dist/retrieval/candidates.d.ts.map +1 -1
- package/dist/retrieval/candidates.js +170 -3
- package/dist/retrieval/candidates.js.map +1 -1
- package/dist/retrieval/contradiction.d.ts +65 -13
- package/dist/retrieval/contradiction.d.ts.map +1 -1
- package/dist/retrieval/contradiction.js +40 -17
- package/dist/retrieval/contradiction.js.map +1 -1
- package/dist/retrieval/query-memory.d.ts +112 -9
- package/dist/retrieval/query-memory.d.ts.map +1 -1
- package/dist/retrieval/query-memory.js +623 -62
- package/dist/retrieval/query-memory.js.map +1 -1
- package/dist/retrieval/semantic-leg.d.ts +74 -0
- package/dist/retrieval/semantic-leg.d.ts.map +1 -0
- package/dist/retrieval/semantic-leg.js +180 -0
- package/dist/retrieval/semantic-leg.js.map +1 -0
- package/dist/storage/archive-write.d.ts.map +1 -1
- package/dist/storage/archive-write.js +29 -8
- package/dist/storage/archive-write.js.map +1 -1
- package/dist/storage/capture-router.d.ts +1 -1
- package/dist/storage/capture-router.d.ts.map +1 -1
- package/dist/storage/capture-router.js +26 -9
- package/dist/storage/capture-router.js.map +1 -1
- package/dist/storage/consolidation-queue.d.ts +11 -2
- package/dist/storage/consolidation-queue.d.ts.map +1 -1
- package/dist/storage/consolidation-queue.js +45 -16
- package/dist/storage/consolidation-queue.js.map +1 -1
- package/dist/storage/corrections.d.ts +185 -6
- package/dist/storage/corrections.d.ts.map +1 -1
- package/dist/storage/corrections.js +525 -126
- package/dist/storage/corrections.js.map +1 -1
- package/dist/storage/durable-intent.d.ts.map +1 -1
- package/dist/storage/durable-intent.js +24 -1
- package/dist/storage/durable-intent.js.map +1 -1
- package/dist/storage/filelock.d.ts +84 -12
- package/dist/storage/filelock.d.ts.map +1 -1
- package/dist/storage/filelock.js +309 -47
- package/dist/storage/filelock.js.map +1 -1
- package/dist/storage/fs-utils.d.ts +20 -0
- package/dist/storage/fs-utils.d.ts.map +1 -1
- package/dist/storage/fs-utils.js +27 -0
- package/dist/storage/fs-utils.js.map +1 -1
- package/dist/storage/paths.d.ts +34 -0
- package/dist/storage/paths.d.ts.map +1 -1
- package/dist/storage/paths.js +71 -0
- package/dist/storage/paths.js.map +1 -1
- package/dist/storage/pending.d.ts +154 -0
- package/dist/storage/pending.d.ts.map +1 -0
- package/dist/storage/pending.js +454 -0
- package/dist/storage/pending.js.map +1 -0
- package/dist/storage/project.d.ts.map +1 -1
- package/dist/storage/project.js +68 -16
- package/dist/storage/project.js.map +1 -1
- package/dist/storage/session-card.d.ts +13 -0
- package/dist/storage/session-card.d.ts.map +1 -1
- package/dist/storage/session-card.js +34 -3
- package/dist/storage/session-card.js.map +1 -1
- package/dist/storage/unclaimed.d.ts +165 -0
- package/dist/storage/unclaimed.d.ts.map +1 -0
- package/dist/storage/unclaimed.js +442 -0
- package/dist/storage/unclaimed.js.map +1 -0
- package/dist/storage/working-memory.d.ts.map +1 -1
- package/dist/storage/working-memory.js +19 -1
- package/dist/storage/working-memory.js.map +1 -1
- package/dist/supabase/recall-backend.d.ts +29 -2
- package/dist/supabase/recall-backend.d.ts.map +1 -1
- package/dist/supabase/recall-backend.js +231 -29
- package/dist/supabase/recall-backend.js.map +1 -1
- package/dist/supabase/sync.d.ts.map +1 -1
- package/dist/supabase/sync.js +13 -0
- package/dist/supabase/sync.js.map +1 -1
- package/dist/tools-logic/alignment-check.js +1 -1
- package/dist/tools-logic/alignment-check.js.map +1 -1
- package/dist/tools-logic/awareness-update.d.ts.map +1 -1
- package/dist/tools-logic/awareness-update.js +25 -16
- package/dist/tools-logic/awareness-update.js.map +1 -1
- package/dist/tools-logic/check-action.js +1 -1
- package/dist/tools-logic/check-action.js.map +1 -1
- package/dist/tools-logic/check.d.ts +55 -1
- package/dist/tools-logic/check.d.ts.map +1 -1
- package/dist/tools-logic/check.js +230 -57
- package/dist/tools-logic/check.js.map +1 -1
- package/dist/tools-logic/confidence.d.ts +11 -6
- package/dist/tools-logic/confidence.d.ts.map +1 -1
- package/dist/tools-logic/confidence.js +11 -6
- package/dist/tools-logic/confidence.js.map +1 -1
- package/dist/tools-logic/context-synthesize.js +2 -2
- package/dist/tools-logic/context-synthesize.js.map +1 -1
- package/dist/tools-logic/digest-read.js +2 -2
- package/dist/tools-logic/digest-read.js.map +1 -1
- package/dist/tools-logic/digest-recall.js +1 -1
- package/dist/tools-logic/digest-recall.js.map +1 -1
- package/dist/tools-logic/insight-promotion.d.ts +1 -1
- package/dist/tools-logic/insight-promotion.d.ts.map +1 -1
- package/dist/tools-logic/insight-promotion.js +17 -6
- package/dist/tools-logic/insight-promotion.js.map +1 -1
- package/dist/tools-logic/journal-capture.js +3 -3
- package/dist/tools-logic/journal-capture.js.map +1 -1
- package/dist/tools-logic/journal-write.js +3 -3
- package/dist/tools-logic/journal-write.js.map +1 -1
- package/dist/tools-logic/knowledge-write.js +2 -2
- package/dist/tools-logic/knowledge-write.js.map +1 -1
- package/dist/tools-logic/palace-lint.js +1 -1
- package/dist/tools-logic/palace-lint.js.map +1 -1
- package/dist/tools-logic/palace-read.js +1 -1
- package/dist/tools-logic/palace-read.js.map +1 -1
- package/dist/tools-logic/palace-search.js +1 -1
- package/dist/tools-logic/palace-search.js.map +1 -1
- package/dist/tools-logic/palace-walk.js +3 -3
- package/dist/tools-logic/palace-walk.js.map +1 -1
- package/dist/tools-logic/palace-write.js +4 -4
- package/dist/tools-logic/palace-write.js.map +1 -1
- package/dist/tools-logic/predict-correction.js +1 -1
- package/dist/tools-logic/predict-correction.js.map +1 -1
- package/dist/tools-logic/recall-backend.d.ts +11 -2
- package/dist/tools-logic/recall-backend.d.ts.map +1 -1
- package/dist/tools-logic/recall-backend.js +2 -2
- package/dist/tools-logic/recall-backend.js.map +1 -1
- package/dist/tools-logic/resurrect.d.ts.map +1 -1
- package/dist/tools-logic/resurrect.js +9 -1
- package/dist/tools-logic/resurrect.js.map +1 -1
- package/dist/tools-logic/safety-consolidation.d.ts.map +1 -1
- package/dist/tools-logic/safety-consolidation.js +32 -30
- package/dist/tools-logic/safety-consolidation.js.map +1 -1
- package/dist/tools-logic/session-end.d.ts +8 -0
- package/dist/tools-logic/session-end.d.ts.map +1 -1
- package/dist/tools-logic/session-end.js +51 -13
- package/dist/tools-logic/session-end.js.map +1 -1
- package/dist/tools-logic/session-start.d.ts +23 -0
- package/dist/tools-logic/session-start.d.ts.map +1 -1
- package/dist/tools-logic/session-start.js +44 -1
- package/dist/tools-logic/session-start.js.map +1 -1
- package/dist/tools-logic/smart-recall.d.ts +185 -10
- package/dist/tools-logic/smart-recall.d.ts.map +1 -1
- package/dist/tools-logic/smart-recall.js +364 -60
- package/dist/tools-logic/smart-recall.js.map +1 -1
- package/dist/tools-logic/store-doctor.d.ts.map +1 -1
- package/dist/tools-logic/store-doctor.js +7 -4
- package/dist/tools-logic/store-doctor.js.map +1 -1
- package/dist/tools-logic/store-repair.js +1 -1
- package/dist/tools-logic/store-repair.js.map +1 -1
- package/dist/tools-logic/supersession.d.ts +64 -3
- package/dist/tools-logic/supersession.d.ts.map +1 -1
- package/dist/tools-logic/supersession.js +155 -50
- package/dist/tools-logic/supersession.js.map +1 -1
- package/dist/types.d.ts +12 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/vector/embedding.d.ts +8 -0
- package/dist/vector/embedding.d.ts.map +1 -1
- package/dist/vector/embedding.js +8 -0
- package/dist/vector/embedding.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capture-router.js","sourceRoot":"","sources":["../../src/storage/capture-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,cAAc,EAA4B,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,8EAA8E;AAC9E,8BAA8B;AAC9B,8EAA8E;AAE9E,gEAAgE;AAChE,SAAS,aAAa;IACpB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,sBAAsB,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAQ7B,SAAS,SAAS,CAAC,IAAY;IAC7B,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,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AO,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;IACvC,CAAC;IAED,wEAAwE;IACxE,sEAAsE;IACtE,+CAA+C;IAC/C,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAC7B,MAAM,SAAS,GAAG,MAAM,mBAAmB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAClG,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;IACvC,CAAC;IAED,sDAAsD;IACtD,IAAI,MAAM,KAAK,eAAe,EAAE,CAAC;QAC/B,MAAM,YAAY,GAAwB;YACxC,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,aAAa,EAAE,KAAK,CAAC,aAAa,IAAI,IAAI;YAC1C,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,cAAc,EAAE,KAAK,CAAC,cAAc;SACrC,CAAC;QACF,MAAM,MAAM,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;QAC5C,OAAO;YACL,IAAI,EAAE,gBAAgB;YACtB,WAAW,EAAE,MAAM,CAAC,IAAI;YACxB,YAAY,EAAE,MAAM,CAAC,KAAK;SAC3B,CAAC;IACJ,CAAC;IAED,qFAAqF;IACrF,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,cAAc,EAAE,IAAI;KACrB,CAAC;AACJ,CAAC"}
|
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Storage: JSONL, one job per line, under ~/.agent-recall/.consolidation-queue/.
|
|
10
10
|
* Append-only; drain marks lines done by rewriting the file with done:true.
|
|
11
|
+
*
|
|
12
|
+
* fix6-locks (review finding): enqueue's append and drain's rewrite share the
|
|
13
|
+
* "consolidation-queue" lock, and the drain re-reads the file INSIDE the lock
|
|
14
|
+
* before rewriting — a Stop hook enqueueing while a drain is mid-flight can no
|
|
15
|
+
* longer have its job silently deleted by the drain's stale-snapshot rewrite
|
|
16
|
+
* (async handlers made that read→rewrite window seconds wide). Jobs are
|
|
17
|
+
* processed OUTSIDE the lock; only the append and the final rewrite hold it.
|
|
11
18
|
*/
|
|
12
19
|
export interface ConsolidationJob {
|
|
13
20
|
project: string;
|
|
@@ -26,8 +33,10 @@ export interface DrainReport {
|
|
|
26
33
|
}
|
|
27
34
|
/**
|
|
28
35
|
* Append a consolidation job to today's queue file. Best-effort: never throws.
|
|
36
|
+
* Locked (shared with the drain's rewrite) so an append can never straddle the
|
|
37
|
+
* drain's read→rename window and get deleted.
|
|
29
38
|
*/
|
|
30
|
-
export declare function enqueueConsolidation(job: ConsolidationJob): void
|
|
39
|
+
export declare function enqueueConsolidation(job: ConsolidationJob): Promise<void>;
|
|
31
40
|
/**
|
|
32
41
|
* Drain all pending (not-done) jobs across every queue file. For each pending
|
|
33
42
|
* job, invoke `handler(job)`; a throwing handler counts as failed but does NOT
|
|
@@ -35,5 +44,5 @@ export declare function enqueueConsolidation(job: ConsolidationJob): void;
|
|
|
35
44
|
*
|
|
36
45
|
* Best-effort: never throws to the caller.
|
|
37
46
|
*/
|
|
38
|
-
export declare function drainConsolidationQueue(handler: (job: ConsolidationJob) => void): DrainReport
|
|
47
|
+
export declare function drainConsolidationQueue(handler: (job: ConsolidationJob) => void | Promise<void>): Promise<DrainReport>;
|
|
39
48
|
//# sourceMappingURL=consolidation-queue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consolidation-queue.d.ts","sourceRoot":"","sources":["../../src/storage/consolidation-queue.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"consolidation-queue.d.ts","sourceRoot":"","sources":["../../src/storage/consolidation-queue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AASH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gCAAgC;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,MAAM,EAAE,MAAM,CAAC;CAChB;AAUD;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB/E;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GACvD,OAAO,CAAC,WAAW,CAAC,CAyHtB"}
|
|
@@ -8,11 +8,19 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Storage: JSONL, one job per line, under ~/.agent-recall/.consolidation-queue/.
|
|
10
10
|
* Append-only; drain marks lines done by rewriting the file with done:true.
|
|
11
|
+
*
|
|
12
|
+
* fix6-locks (review finding): enqueue's append and drain's rewrite share the
|
|
13
|
+
* "consolidation-queue" lock, and the drain re-reads the file INSIDE the lock
|
|
14
|
+
* before rewriting — a Stop hook enqueueing while a drain is mid-flight can no
|
|
15
|
+
* longer have its job silently deleted by the drain's stale-snapshot rewrite
|
|
16
|
+
* (async handlers made that read→rewrite window seconds wide). Jobs are
|
|
17
|
+
* processed OUTSIDE the lock; only the append and the final rewrite hold it.
|
|
11
18
|
*/
|
|
12
19
|
import * as fs from "node:fs";
|
|
13
20
|
import * as path from "node:path";
|
|
14
21
|
import { getRoot } from "../types.js";
|
|
15
22
|
import { ensureDir, todayISO } from "./fs-utils.js";
|
|
23
|
+
import { withLock } from "./filelock.js";
|
|
16
24
|
import { recordHookFailure } from "./hook-health.js";
|
|
17
25
|
function queueDir() {
|
|
18
26
|
return path.join(getRoot(), ".consolidation-queue");
|
|
@@ -22,8 +30,10 @@ function queueFileForToday() {
|
|
|
22
30
|
}
|
|
23
31
|
/**
|
|
24
32
|
* Append a consolidation job to today's queue file. Best-effort: never throws.
|
|
33
|
+
* Locked (shared with the drain's rewrite) so an append can never straddle the
|
|
34
|
+
* drain's read→rename window and get deleted.
|
|
25
35
|
*/
|
|
26
|
-
export function enqueueConsolidation(job) {
|
|
36
|
+
export async function enqueueConsolidation(job) {
|
|
27
37
|
try {
|
|
28
38
|
const dir = queueDir();
|
|
29
39
|
ensureDir(dir);
|
|
@@ -34,7 +44,9 @@ export function enqueueConsolidation(job) {
|
|
|
34
44
|
at: job.at ?? new Date().toISOString(),
|
|
35
45
|
done: false,
|
|
36
46
|
};
|
|
37
|
-
|
|
47
|
+
await withLock("consolidation-queue", () => {
|
|
48
|
+
fs.appendFileSync(queueFileForToday(), JSON.stringify(record) + "\n", "utf-8");
|
|
49
|
+
});
|
|
38
50
|
}
|
|
39
51
|
catch (err) {
|
|
40
52
|
// Enqueue is fire-and-forget — never break the caller (the Stop hook).
|
|
@@ -52,7 +64,7 @@ export function enqueueConsolidation(job) {
|
|
|
52
64
|
*
|
|
53
65
|
* Best-effort: never throws to the caller.
|
|
54
66
|
*/
|
|
55
|
-
export function drainConsolidationQueue(handler) {
|
|
67
|
+
export async function drainConsolidationQueue(handler) {
|
|
56
68
|
const report = { processed: 0, failed: 0 };
|
|
57
69
|
let dir;
|
|
58
70
|
try {
|
|
@@ -93,8 +105,11 @@ export function drainConsolidationQueue(handler) {
|
|
|
93
105
|
recordHookFailure("consolidation-drain-fileread", err);
|
|
94
106
|
continue; // unreadable file → skip, don't block the rest
|
|
95
107
|
}
|
|
96
|
-
|
|
97
|
-
|
|
108
|
+
// Successfully-processed lines only: original trimmed line → done-marked
|
|
109
|
+
// replacement. Everything NOT in this map (done lines, malformed lines,
|
|
110
|
+
// failed jobs, and — crucially — jobs appended by a concurrent enqueue
|
|
111
|
+
// AFTER our read above) is preserved verbatim by the locked re-read below.
|
|
112
|
+
const transformed = new Map();
|
|
98
113
|
for (const line of lines) {
|
|
99
114
|
const trimmed = line.trim();
|
|
100
115
|
if (!trimmed)
|
|
@@ -112,18 +127,15 @@ export function drainConsolidationQueue(handler) {
|
|
|
112
127
|
// verbatim) forever. Consistent with the sibling "consolidation-drain-job"
|
|
113
128
|
// wire below at the same per-line granularity.
|
|
114
129
|
recordHookFailure("consolidation-drain-parse", err);
|
|
115
|
-
|
|
116
|
-
continue;
|
|
130
|
+
continue; // malformed line — preserved verbatim by the re-read below
|
|
117
131
|
}
|
|
118
132
|
if (job.done) {
|
|
119
|
-
rewritten.push(trimmed);
|
|
120
133
|
continue;
|
|
121
134
|
}
|
|
122
135
|
try {
|
|
123
|
-
handler(job);
|
|
136
|
+
await handler(job);
|
|
124
137
|
report.processed++;
|
|
125
|
-
|
|
126
|
-
mutated = true;
|
|
138
|
+
transformed.set(trimmed, JSON.stringify({ ...job, done: true }));
|
|
127
139
|
}
|
|
128
140
|
catch (err) {
|
|
129
141
|
// One bad job never blocks the rest — leave it pending for a retry.
|
|
@@ -137,15 +149,32 @@ export function drainConsolidationQueue(handler) {
|
|
|
137
149
|
// prints it to stdout) is not the same as a persisted, queryable
|
|
138
150
|
// trace `ar health` can surface.
|
|
139
151
|
report.failed++;
|
|
140
|
-
rewritten.push(trimmed);
|
|
141
152
|
recordHookFailure("consolidation-drain-job", err);
|
|
142
153
|
}
|
|
143
154
|
}
|
|
144
|
-
if (
|
|
155
|
+
if (transformed.size > 0) {
|
|
145
156
|
try {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
157
|
+
// Re-read INSIDE the lock and substitute only the lines we processed —
|
|
158
|
+
// lines appended since our unlocked read survive verbatim.
|
|
159
|
+
await withLock("consolidation-queue", () => {
|
|
160
|
+
let current;
|
|
161
|
+
try {
|
|
162
|
+
current = fs.readFileSync(full, "utf-8").split("\n");
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
current = lines; // vanished/unreadable — fall back to our snapshot
|
|
166
|
+
}
|
|
167
|
+
const out = [];
|
|
168
|
+
for (const line of current) {
|
|
169
|
+
const t = line.trim();
|
|
170
|
+
if (!t)
|
|
171
|
+
continue;
|
|
172
|
+
out.push(transformed.get(t) ?? line);
|
|
173
|
+
}
|
|
174
|
+
const tmp = full + ".tmp." + process.pid;
|
|
175
|
+
fs.writeFileSync(tmp, out.join("\n") + "\n", "utf-8");
|
|
176
|
+
fs.renameSync(tmp, full); // atomic on POSIX
|
|
177
|
+
});
|
|
149
178
|
}
|
|
150
179
|
catch (err) {
|
|
151
180
|
// If we can't persist the done-marks, the worst case is a re-run of
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consolidation-queue.js","sourceRoot":"","sources":["../../src/storage/consolidation-queue.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"consolidation-queue.js","sourceRoot":"","sources":["../../src/storage/consolidation-queue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAmBrD,SAAS,QAAQ;IACf,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,sBAAsB,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,iBAAiB;IACxB,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,GAAG,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC;AAED;;;;GAIG;A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;oBACzB,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;wBAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;wBACtB,IAAI,CAAC,CAAC;4BAAE,SAAS;wBACjB,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;oBACvC,CAAC;oBACD,MAAM,GAAG,GAAG,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;oBACzC,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC;oBACtD,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,kBAAkB;gBAC9C,CAAC,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,oEAAoE;gBACpE,+DAA+D;gBAC/D,iEAAiE;gBACjE,kEAAkE;gBAClE,4DAA4D;gBAC5D,iBAAiB,CAAC,6BAA6B,EAAE,GAAG,CAAC,CAAC;YACxD,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Storage: ~/.agent-recall/projects/{project}/corrections/{date}-{slug}.json
|
|
6
6
|
*/
|
|
7
|
+
import type { Confidence, DecayClass } from "../types.js";
|
|
7
8
|
/**
|
|
8
9
|
* RD-1 (2026-07-13 workpacket §1, owner decisions 2026-07-14) — behavioral
|
|
9
10
|
* failure-class taxonomy for the cross-project recurrence join.
|
|
@@ -93,6 +94,59 @@ export interface CorrectionRecord {
|
|
|
93
94
|
* absent on pre-RD-1 records, which readers treat as "other" (never rewritten).
|
|
94
95
|
*/
|
|
95
96
|
failure_class?: FailureClass;
|
|
97
|
+
/**
|
|
98
|
+
* v4 W1 (2026-07-02 field-design-options.md §A.1) — assertion-time belief
|
|
99
|
+
* confidence, REUSING the discrete `Confidence` scale (types.ts) — no
|
|
100
|
+
* parallel float. ADDITIVE + OPTIONAL: absent on pre-v4 records, which
|
|
101
|
+
* `applyCorrectionDefaults` derives from `weight`/`severity` at read time
|
|
102
|
+
* (never persisted back to disk until the next write of that record).
|
|
103
|
+
*
|
|
104
|
+
* DISTINCT from `proof_confidence` (evidence-grounded Beta posterior over
|
|
105
|
+
* heeded/recurrence) and from `weight` (static authority prior) — this is
|
|
106
|
+
* assertion-time metadata about how sure the SOURCE was, not a
|
|
107
|
+
* recency-adjusted outcome signal. Per the proposal's decision matrix
|
|
108
|
+
* (§E, "rankCorrections() confidence feed" — Option B), this field is
|
|
109
|
+
* ANNOTATION ONLY and must never feed `rankCorrections()`'s scoring formula.
|
|
110
|
+
*/
|
|
111
|
+
confidence?: Confidence;
|
|
112
|
+
/**
|
|
113
|
+
* v4 W1 (2026-07-02 field-design-options.md §A.1/§A.5) — escape hatch for
|
|
114
|
+
* the computed `decay_class` (see `decayClassOf` below). Corrections carry
|
|
115
|
+
* no `MemoryCategory`, so the per-class default is always "slow" (§A.1);
|
|
116
|
+
* this override exists only for the rare correction whose truth genuinely
|
|
117
|
+
* decays faster/slower than that default (the proposal's worked example:
|
|
118
|
+
* a location fact mistakenly filed as a correction would want "volatile").
|
|
119
|
+
* ADDITIVE + OPTIONAL. NEVER read by `decayClassOf` as anything but an
|
|
120
|
+
* override — `decay_class` itself is never a stored/defaulted field.
|
|
121
|
+
*/
|
|
122
|
+
decay_class_override?: DecayClass;
|
|
123
|
+
/**
|
|
124
|
+
* v4 W1 (2026-07-02 field-design-options.md §A.1) — provenance of the
|
|
125
|
+
* assertion. ADDITIVE + OPTIONAL: absent on pre-v4 records, which
|
|
126
|
+
* `applyCorrectionDefaults` defaults to `{ source: holder ?? "unknown",
|
|
127
|
+
* mode: "told" }` at read time (corrections are always user-initiated —
|
|
128
|
+
* "told" is the safe default per the proposal).
|
|
129
|
+
*/
|
|
130
|
+
provenance?: CorrectionProvenance;
|
|
131
|
+
/**
|
|
132
|
+
* Fix #2 (dual-channel capture gate, 2026-09-11) — the structured
|
|
133
|
+
* human_correction form's `applies_when` context keywords, persisted for
|
|
134
|
+
* fidelity. ADDITIVE + OPTIONAL: absent on every pre-fix record and on
|
|
135
|
+
* records captured through non-structured paths; never defaulted at read
|
|
136
|
+
* time. The same tokens are ALSO folded into `tags` at capture (tags are
|
|
137
|
+
* the existing p1 context-match mechanism) — this field preserves the
|
|
138
|
+
* caller's original, unmixed list.
|
|
139
|
+
*/
|
|
140
|
+
applies_when?: string[];
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* v4 W1 (2026-07-02 field-design-options.md §A.1) — provenance of a
|
|
144
|
+
* correction assertion: where it came from and whether the agent inferred it
|
|
145
|
+
* ("observed") or the user stated it directly ("told").
|
|
146
|
+
*/
|
|
147
|
+
export interface CorrectionProvenance {
|
|
148
|
+
source: string;
|
|
149
|
+
mode: "observed" | "told";
|
|
96
150
|
}
|
|
97
151
|
/**
|
|
98
152
|
* One discarded correction-candidate, appended to corrections/_rejected.jsonl
|
|
@@ -214,6 +268,22 @@ export interface CorrectionKPI {
|
|
|
214
268
|
* script decides how to combine it later (see heed-design.md).
|
|
215
269
|
*/
|
|
216
270
|
not_violated_count: number;
|
|
271
|
+
/**
|
|
272
|
+
* v4 W2 (2026-07-02 field-design-options.md §A.5/§E) — computed decay_class
|
|
273
|
+
* breakdown across ALL corrections (same population as `total`, NOT `active`
|
|
274
|
+
* — mirrors the retrieved/heeded/recurred loop above, which also aggregates
|
|
275
|
+
* over `all`). ANNOTATION ONLY: purely informational, never feeds precision/
|
|
276
|
+
* verdict_coverage/any other formula in this interface. Every `DecayClass`
|
|
277
|
+
* key is always present (0 when no records fall in that class) so callers
|
|
278
|
+
* never need an `?? 0` guard.
|
|
279
|
+
*/
|
|
280
|
+
by_decay_class: Record<DecayClass, number>;
|
|
281
|
+
/**
|
|
282
|
+
* v4 W2 — effective `confidence` breakdown (post-defaults, via
|
|
283
|
+
* `effectiveConfidenceOf`) across the same ALL-corrections population as
|
|
284
|
+
* `by_decay_class`. Same ANNOTATION-ONLY guarantee.
|
|
285
|
+
*/
|
|
286
|
+
by_confidence: Record<Confidence, number>;
|
|
217
287
|
}
|
|
218
288
|
/**
|
|
219
289
|
* Gate version stamp — bump whenever isLikelyRealCorrection's accept criteria
|
|
@@ -233,7 +303,43 @@ export interface CorrectionKPI {
|
|
|
233
303
|
* a bare weak verb. Recall-safe — no fixture correction relies on a hedged weak verb.
|
|
234
304
|
*/
|
|
235
305
|
export declare const GATE_VERSION = "v4-2026-06-22";
|
|
306
|
+
/**
|
|
307
|
+
* Auto-detect severity: p0 if uses strong negation/mandate language, else p1.
|
|
308
|
+
*
|
|
309
|
+
* INDEPENDENT-REVIEW FIX (2026-09-09, TOW2-326 class): this pattern was
|
|
310
|
+
* English-only, so a CJK-only P0-caliber prohibition (禁止/不得/不能/不要 with
|
|
311
|
+
* no English marker) would now clear the newly CJK-aware capture gate above
|
|
312
|
+
* but still classify as p1 — silently losing the P0 blocking power (see
|
|
313
|
+
* check.ts's own doctrine comment: P0 severity is what lets a correction
|
|
314
|
+
* OVERRIDE a plan via `verdict: "blocked"`) an equivalent English phrasing
|
|
315
|
+
* would get. CJK rows added, mirroring STRONG_IMPERATIVE above; kept
|
|
316
|
+
* byte-identical to the duplicate `p0Patterns` copy in tools-logic/check.ts
|
|
317
|
+
* (search that file for `p0Patterns`, not a line number — line references
|
|
318
|
+
* drift; that copy is the primary caller, which computes severity itself
|
|
319
|
+
* before calling writeCorrection — this function is the FALLBACK path for
|
|
320
|
+
* callers that don't pre-supply severity).
|
|
321
|
+
*
|
|
322
|
+
* INDEPENDENT-REVIEW FIX (2026-09-09, round 3): 不能 scoped to 你不能 —
|
|
323
|
+
* see the identical fix/reasoning on STRONG_IMPERATIVE above.
|
|
324
|
+
*
|
|
325
|
+
* PRE-SHIP GATE FIX (2026-09-09, C-1): 不要's benign-reassurance exclusion
|
|
326
|
+
* widened from the narrow round-1 set (担心/客气/急/着急/紧张/见外) to the
|
|
327
|
+
* FULL round-2 set also used by GATED_PROHIBITION_PATTERNS and
|
|
328
|
+
* STRONG_IMPERATIVE (adds 慌/害怕/在意) — see CJK_REASSURANCE_COMPLETIONS'
|
|
329
|
+
* own doc comment. This copy had drifted out of sync with the other three
|
|
330
|
+
* sites; all four are now built from the SAME exported constant where they
|
|
331
|
+
* share a package (this file + check.ts), or kept byte-identical by
|
|
332
|
+
* cross-reference where they don't (correction-detector.ts, cli package).
|
|
333
|
+
*/
|
|
334
|
+
export declare function detectSeverity(text: string): "p0" | "p1";
|
|
236
335
|
export declare function stripInterjections(text: string): string;
|
|
336
|
+
/**
|
|
337
|
+
* Atomic JSON write — tmp + rename, mode 0600. Prevents truncation on SIGTERM.
|
|
338
|
+
* Extracted from the three identical inlined copies (writeCorrection /
|
|
339
|
+
* retractCorrection / recordOutcome) so every correction writer shares one
|
|
340
|
+
* durable path. Pure side-effect helper; no behavior change vs the originals.
|
|
341
|
+
*/
|
|
342
|
+
export declare function writeRecordAtomic(filepath: string, record: unknown): void;
|
|
237
343
|
/**
|
|
238
344
|
* W2-1 (naming-v2 spec §4) — regenerate corrections/_index.md, the
|
|
239
345
|
* materialized machine fast-path over the corrections store: a severity-first
|
|
@@ -258,6 +364,68 @@ export declare function regenerateCorrectionsIndex(project: string): void;
|
|
|
258
364
|
* protected, so this never archives on its own; it surfaces a review candidate.
|
|
259
365
|
*/
|
|
260
366
|
export declare function isStaleCorrection(rec: CorrectionRecord, nowMs?: number): boolean;
|
|
367
|
+
/**
|
|
368
|
+
* v4 W1 (2026-07-02 field-design-options.md §A.1/§A.5) — computed decay class
|
|
369
|
+
* for a correction. PURE — never mutates, never reads/writes disk. Corrections
|
|
370
|
+
* carry no `MemoryCategory`, so the class default is always `"slow"` (§A.1:
|
|
371
|
+
* "behavioral rules rarely become false — corrections.ts:2: persist forever").
|
|
372
|
+
* `decay_class_override` is the one escape hatch (§A.5's Option 2 recommendation:
|
|
373
|
+
* computed mapping + optional per-record override) for the rare correction whose
|
|
374
|
+
* truth genuinely decays faster/slower than that default.
|
|
375
|
+
*
|
|
376
|
+
* INVARIANT: `decay_class` is NEVER a stored/materialized field — it is
|
|
377
|
+
* recomputed from `decay_class_override` (if present) on every call. Callers
|
|
378
|
+
* needing it in a `SmartRecallResultItem`-shaped annotation should call this at
|
|
379
|
+
* read/response time, not persist its return value.
|
|
380
|
+
*
|
|
381
|
+
* DEFENSIVE (v4 W2 review fix): `decay_class_override` is loaded straight off
|
|
382
|
+
* disk-parsed JSON with no runtime validation — TypeScript's `DecayClass`
|
|
383
|
+
* union guards the WRITE path, not a hand-edited or corrupted file. Falling
|
|
384
|
+
* through to the union check below (rather than a bare `?? "slow"`) means an
|
|
385
|
+
* out-of-union value on disk normalizes to the documented default instead of
|
|
386
|
+
* leaking a garbage string into `getCorrectionKPIs`' `by_decay_class` tally,
|
|
387
|
+
* which would otherwise mint a stray `Record` key and silently break that
|
|
388
|
+
* field's "exhaustive partition, sums to `total`" invariant.
|
|
389
|
+
*/
|
|
390
|
+
export declare function decayClassOf(record: Pick<CorrectionRecord, "decay_class_override">): DecayClass;
|
|
391
|
+
/**
|
|
392
|
+
* v4 W2 (2026-07-02 field-design-options.md §E, "rankCorrections() confidence
|
|
393
|
+
* feed — Option B") — effective `confidence` for ANNOTATION purposes, i.e. the
|
|
394
|
+
* value a record would carry AFTER `applyCorrectionDefaults` resolves it, but
|
|
395
|
+
* computed WITHOUT running the full defaulting pipeline (holder/kind/
|
|
396
|
+
* proof_count/authoritative/provenance are irrelevant to this one field).
|
|
397
|
+
*
|
|
398
|
+
* In practice every caller of `rankCorrections`/`getCorrectionKPIs` already
|
|
399
|
+
* receives records that went through `applyCorrectionDefaults` inside
|
|
400
|
+
* `readCorrections()`, so `record.confidence` is normally already resolved —
|
|
401
|
+
* this mirrors that SAME resolution rule (confidence ?? defaultConfidence(weight
|
|
402
|
+
* ?? defaultWeight(severity))) as a defensive fallback for the rare caller that
|
|
403
|
+
* hands in raw/unresolved records directly (e.g. unit-test fixtures), so the two
|
|
404
|
+
* downstream annotation sites never disagree with `applyCorrectionDefaults` on
|
|
405
|
+
* what "effective confidence" means. PURE — never mutates, never reads/writes
|
|
406
|
+
* disk. Kept as ONE shared helper (class-not-instance) rather than two separate
|
|
407
|
+
* inline computations in rankCorrections and getCorrectionKPIs.
|
|
408
|
+
*
|
|
409
|
+
* DEFENSIVE (v4 W2 review fix): same rationale as `decayClassOf` above — an
|
|
410
|
+
* out-of-union `confidence` value on disk (hand-edited/corrupted JSON) falls
|
|
411
|
+
* through to the computed default rather than propagating a garbage string
|
|
412
|
+
* into `getCorrectionKPIs`' `by_confidence` tally.
|
|
413
|
+
*/
|
|
414
|
+
export declare function effectiveConfidenceOf(record: Pick<CorrectionRecord, "confidence" | "weight" | "severity">): Confidence;
|
|
415
|
+
/**
|
|
416
|
+
* v4 W2 — the shape `rankCorrections()` returns. A `CorrectionRecord` plus two
|
|
417
|
+
* ADDITIVE, ANNOTATION-ONLY fields computed at read time and never persisted:
|
|
418
|
+
* - `decay_class` — see `decayClassOf` above.
|
|
419
|
+
* - `confidence` — see `effectiveConfidenceOf` above; narrows the base
|
|
420
|
+
* record's optional `confidence?` to always-present here, since every
|
|
421
|
+
* ranked record has one resolved by the time it is returned.
|
|
422
|
+
* Neither field is read by `rankCorrections`' scoring formula — see the
|
|
423
|
+
* ASSERT_INVARIANT at that function's definition.
|
|
424
|
+
*/
|
|
425
|
+
export interface RankedCorrection extends CorrectionRecord {
|
|
426
|
+
decay_class: DecayClass;
|
|
427
|
+
confidence: Confidence;
|
|
428
|
+
}
|
|
261
429
|
/**
|
|
262
430
|
* Decimal-safe sentence splitter. Splits on sentence-ending punctuation
|
|
263
431
|
* (`.`, `!`, `?`, or a newline) ONLY when followed by whitespace or end-of-text
|
|
@@ -271,6 +439,7 @@ export declare function isStaleCorrection(rec: CorrectionRecord, nowMs?: number)
|
|
|
271
439
|
* tokenizer — it deliberately errs toward NOT splitting.
|
|
272
440
|
*/
|
|
273
441
|
export declare function splitSentences(text: string): string[];
|
|
442
|
+
export declare const CJK_REASSURANCE_COMPLETIONS = "\u62C5\u5FC3|\u5BA2\u6C14|\u6025|\u7740\u6025|\u7D27\u5F20|\u89C1\u5916|\u614C|\u5BB3\u6015|\u5728\u610F";
|
|
274
443
|
/**
|
|
275
444
|
* Capture-quality gate — rejects context-free fragments, pure acknowledgments,
|
|
276
445
|
* and text that carries no actionable signal.
|
|
@@ -337,6 +506,7 @@ export interface WriteCorrectionResult {
|
|
|
337
506
|
/** id of the written record, or the existing record's id on a merge. */
|
|
338
507
|
id?: string;
|
|
339
508
|
}
|
|
509
|
+
export declare function distillRuleIdentity(rule: string): string;
|
|
340
510
|
/**
|
|
341
511
|
* Write a correction to persistent storage.
|
|
342
512
|
* Auto-detects severity from the rule/context text.
|
|
@@ -346,7 +516,7 @@ export interface WriteCorrectionResult {
|
|
|
346
516
|
* are unaffected (the return value was void, now it is an object; ignoring it
|
|
347
517
|
* still compiles and runs correctly).
|
|
348
518
|
*/
|
|
349
|
-
export declare function writeCorrection(project: string, correction: CorrectionRecord): WriteCorrectionResult
|
|
519
|
+
export declare function writeCorrection(project: string, correction: CorrectionRecord): Promise<WriteCorrectionResult>;
|
|
350
520
|
/**
|
|
351
521
|
* TEST-ONLY instrumentation log — one entry (the project slug) appended per
|
|
352
522
|
* actual corrections-directory enumeration inside readCorrections() below
|
|
@@ -409,7 +579,7 @@ export interface RetractCorrectionResult {
|
|
|
409
579
|
* The file is rewritten atomically — never deleted. The record remains in
|
|
410
580
|
* _outcomes.jsonl history and can be manually reactivated by editing the JSON.
|
|
411
581
|
*/
|
|
412
|
-
export declare function retractCorrection(project: string, id: string, reason?: string, supersededBy?: string): RetractCorrectionResult
|
|
582
|
+
export declare function retractCorrection(project: string, id: string, reason?: string, supersededBy?: string): Promise<RetractCorrectionResult>;
|
|
413
583
|
/**
|
|
414
584
|
* Record an outcome event for a correction (retrieved / heeded / recurred).
|
|
415
585
|
* Appends to _outcomes.jsonl and also updates the correction JSON's counters
|
|
@@ -424,7 +594,7 @@ export declare function retractCorrection(project: string, id: string, reason?:
|
|
|
424
594
|
* the core-level enforcement of the single-producer contract (the CLI's
|
|
425
595
|
* `ar outcomes record` is the one caller that adds the prefix).
|
|
426
596
|
*/
|
|
427
|
-
export declare function recordOutcome(outcome: CorrectionOutcome): void
|
|
597
|
+
export declare function recordOutcome(outcome: CorrectionOutcome): Promise<void>;
|
|
428
598
|
/** One `_outcomes.jsonl` line that failed to parse (or lacked required fields). */
|
|
429
599
|
export interface MalformedOutcomeRow {
|
|
430
600
|
/** 1-based line number within _outcomes.jsonl. */
|
|
@@ -547,7 +717,7 @@ export interface OutcomesRebuildResult {
|
|
|
547
717
|
* 4. Only per-correction JSON files that actually differ are rewritten; the
|
|
548
718
|
* shared _index.md is regenerated ONCE at the end, only if anything wrote.
|
|
549
719
|
*/
|
|
550
|
-
export declare function runOutcomesRebuild(project: string, opts?: OutcomesRebuildOptions): OutcomesRebuildResult
|
|
720
|
+
export declare function runOutcomesRebuild(project: string, opts?: OutcomesRebuildOptions): Promise<OutcomesRebuildResult>;
|
|
551
721
|
/**
|
|
552
722
|
* Best-effort: append one row to corrections/_rejected.jsonl recording a
|
|
553
723
|
* gate-rejected correction candidate. INVARIANT: never throws — every fs op is
|
|
@@ -677,7 +847,7 @@ export interface NoiseReview {
|
|
|
677
847
|
*/
|
|
678
848
|
export declare function reviewNoiseCorrections(project: string, opts?: {
|
|
679
849
|
auto?: boolean;
|
|
680
|
-
}): NoiseReview
|
|
850
|
+
}): Promise<NoiseReview>;
|
|
681
851
|
/**
|
|
682
852
|
* P5: order corrections for surfacing when a cap applies. Today P0s are surfaced
|
|
683
853
|
* `slice(0, 10)` in newest-first FILENAME order — so when a project has >10 P0s
|
|
@@ -686,6 +856,15 @@ export declare function reviewNoiseCorrections(project: string, opts?: {
|
|
|
686
856
|
* evidence-backed + recently-relevant rules win the cap:
|
|
687
857
|
* severity (p0 always above p1) ≫ proof_confidence ≫ recency ≫ proof_count.
|
|
688
858
|
* Deterministic and stable; pure (Date.now only for recency decay).
|
|
859
|
+
*
|
|
860
|
+
* v4 W2 (2026-07-02 field-design-options.md §E, "rankCorrections() confidence
|
|
861
|
+
* feed — Option B") — the returned records are additionally annotated with a
|
|
862
|
+
* computed `decay_class` (`decayClassOf`) and effective `confidence`
|
|
863
|
+
* (`effectiveConfidenceOf`). Both are attached AFTER `scoreOf`/`sort` have
|
|
864
|
+
* fully decided the ORDER — neither field is read inside `scoreOf`, so this
|
|
865
|
+
* is pure annotation on the output, never an input to the ranking formula
|
|
866
|
+
* (ASSERT_INVARIANT: order is byte-identical to the pre-annotation behavior;
|
|
867
|
+
* see corrections-rank.test.mjs).
|
|
689
868
|
*/
|
|
690
|
-
export declare function rankCorrections(records: CorrectionRecord[], limit?: number):
|
|
869
|
+
export declare function rankCorrections(records: CorrectionRecord[], limit?: number): RankedCorrection[];
|
|
691
870
|
//# sourceMappingURL=corrections.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"corrections.d.ts","sourceRoot":"","sources":["../../src/storage/corrections.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"corrections.d.ts","sourceRoot":"","sources":["../../src/storage/corrections.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAM1D;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,kBAAkB,GAClB,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,GAChB,eAAe,GACf,mBAAmB,GACnB,cAAc,GACd,OAAO,CAAC;AAEZ,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ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