@edihasaj/recall 2.0.17 → 2.0.19
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 +12 -0
- package/dist/{chunk-VUVFQJWZ.js → chunk-3SI2FCYS.js} +2 -2
- package/dist/{chunk-Q22B7YDQ.js → chunk-5VIPRV3V.js} +5 -5
- package/dist/{chunk-22AJZ7UQ.js → chunk-673NQIZX.js} +2 -2
- package/dist/{chunk-UDLRBKC3.js → chunk-6B7YHOGI.js} +3 -3
- package/dist/{chunk-YIVOTIDF.js → chunk-FH2XQDYL.js} +5 -5
- package/dist/{chunk-KLERXJ47.js → chunk-GENJNVHG.js} +3 -3
- package/dist/{chunk-2COJXGP4.js → chunk-GTHCX5LX.js} +4 -3
- package/dist/{chunk-2COJXGP4.js.map → chunk-GTHCX5LX.js.map} +1 -1
- package/dist/{chunk-EY6HIDG2.js → chunk-J4IWU2BE.js} +9 -9
- package/dist/{chunk-Q7254IPO.js → chunk-J6YBL72P.js} +193 -15
- package/dist/chunk-J6YBL72P.js.map +1 -0
- package/dist/{chunk-YIUBD27J.js → chunk-M4JG3HMA.js} +30 -37
- package/dist/chunk-M4JG3HMA.js.map +1 -0
- package/dist/{chunk-CSBXI3ET.js → chunk-NSXTH2B4.js} +8 -4
- package/dist/chunk-NSXTH2B4.js.map +1 -0
- package/dist/{chunk-ZT67CYDS.js → chunk-QDCIXULL.js} +2 -2
- package/dist/{chunk-ZT67CYDS.js.map → chunk-QDCIXULL.js.map} +1 -1
- package/dist/{chunk-FNIIUNW6.js → chunk-QDONEJJG.js} +2 -2
- package/dist/{chunk-QQ6YHR7I.js → chunk-R5CG3RC4.js} +231 -26
- package/dist/chunk-R5CG3RC4.js.map +1 -0
- package/dist/{chunk-KVZN35JF.js → chunk-WDUYM3NZ.js} +7 -7
- package/dist/{chunk-RAQT2OBR.js → chunk-WPHCCQOC.js} +7 -7
- package/dist/{chunk-GK7OWVRQ.js → chunk-X3EF5QHV.js} +3 -3
- package/dist/{chunk-XRKUJ5B4.js → chunk-ZHJRYVOD.js} +2 -2
- package/dist/{cleanup-4TXIHTJT.js → cleanup-FOGHMRL5.js} +11 -11
- package/dist/cli.js +39 -191
- package/dist/cli.js.map +1 -1
- package/dist/{codex-trust-2JIY66CP.js → codex-trust-C2GOV764.js} +4 -4
- package/dist/daemon.js +143 -39
- package/dist/daemon.js.map +1 -1
- package/dist/dispatcher-OIINFHQU.js +22 -0
- package/dist/{embeddings-AAS7NKGB.js → embeddings-6Y7KXV5L.js} +5 -5
- package/dist/ingest-QFX3ZEM6.js +20 -0
- package/dist/{keychain-SHRO7W6J.js → keychain-DHS6XKIQ.js} +3 -3
- package/dist/mcp.js +15 -15
- package/dist/{memory-value-R2C7ZSDF.js → memory-value-U6TGLBZB.js} +11 -11
- package/dist/{provenance-I5GIAP7N.js → provenance-PLISLH2V.js} +9 -9
- package/dist/quality-AYWNSDIU.js +25 -0
- package/dist/retrieval-B2DYBYAJ.js +15 -0
- package/dist/{store-X2B6MRBH.js → store-OLSM63EZ.js} +4 -4
- package/dist/sync-server.js +2 -2
- package/dist/{tasks-H4NIS6QO.js → tasks-S5ZMXA5K.js} +11 -11
- package/dist/{usage-35HSDMNT.js → usage-RWS6VQBY.js} +4 -4
- package/package.json +1 -1
- package/vendor/recall-cloud-sync/PROVENANCE.md +18 -5
- package/vendor/recall-cloud-sync/recall-sync-local.mjs +19 -10
- package/vendor/recall-cloud-sync/recall-sync.mjs +40 -6
- package/dist/chunk-CSBXI3ET.js.map +0 -1
- package/dist/chunk-Q7254IPO.js.map +0 -1
- package/dist/chunk-QQ6YHR7I.js.map +0 -1
- package/dist/chunk-YIUBD27J.js.map +0 -1
- package/dist/dispatcher-O6NGADCQ.js +0 -22
- package/dist/ingest-DW3AG4M5.js +0 -20
- package/dist/quality-32MAXPNJ.js +0 -25
- package/dist/retrieval-RKYWWNWC.js +0 -15
- /package/dist/{chunk-VUVFQJWZ.js.map → chunk-3SI2FCYS.js.map} +0 -0
- /package/dist/{chunk-Q22B7YDQ.js.map → chunk-5VIPRV3V.js.map} +0 -0
- /package/dist/{chunk-22AJZ7UQ.js.map → chunk-673NQIZX.js.map} +0 -0
- /package/dist/{chunk-UDLRBKC3.js.map → chunk-6B7YHOGI.js.map} +0 -0
- /package/dist/{chunk-YIVOTIDF.js.map → chunk-FH2XQDYL.js.map} +0 -0
- /package/dist/{chunk-KLERXJ47.js.map → chunk-GENJNVHG.js.map} +0 -0
- /package/dist/{chunk-EY6HIDG2.js.map → chunk-J4IWU2BE.js.map} +0 -0
- /package/dist/{chunk-FNIIUNW6.js.map → chunk-QDONEJJG.js.map} +0 -0
- /package/dist/{chunk-KVZN35JF.js.map → chunk-WDUYM3NZ.js.map} +0 -0
- /package/dist/{chunk-RAQT2OBR.js.map → chunk-WPHCCQOC.js.map} +0 -0
- /package/dist/{chunk-GK7OWVRQ.js.map → chunk-X3EF5QHV.js.map} +0 -0
- /package/dist/{chunk-XRKUJ5B4.js.map → chunk-ZHJRYVOD.js.map} +0 -0
- /package/dist/{cleanup-4TXIHTJT.js.map → cleanup-FOGHMRL5.js.map} +0 -0
- /package/dist/{codex-trust-2JIY66CP.js.map → codex-trust-C2GOV764.js.map} +0 -0
- /package/dist/{dispatcher-O6NGADCQ.js.map → dispatcher-OIINFHQU.js.map} +0 -0
- /package/dist/{embeddings-AAS7NKGB.js.map → embeddings-6Y7KXV5L.js.map} +0 -0
- /package/dist/{ingest-DW3AG4M5.js.map → ingest-QFX3ZEM6.js.map} +0 -0
- /package/dist/{keychain-SHRO7W6J.js.map → keychain-DHS6XKIQ.js.map} +0 -0
- /package/dist/{memory-value-R2C7ZSDF.js.map → memory-value-U6TGLBZB.js.map} +0 -0
- /package/dist/{provenance-I5GIAP7N.js.map → provenance-PLISLH2V.js.map} +0 -0
- /package/dist/{quality-32MAXPNJ.js.map → quality-AYWNSDIU.js.map} +0 -0
- /package/dist/{retrieval-RKYWWNWC.js.map → retrieval-B2DYBYAJ.js.map} +0 -0
- /package/dist/{store-X2B6MRBH.js.map → store-OLSM63EZ.js.map} +0 -0
- /package/dist/{tasks-H4NIS6QO.js.map → tasks-S5ZMXA5K.js.map} +0 -0
- /package/dist/{usage-35HSDMNT.js.map → usage-RWS6VQBY.js.map} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildPrompt,
|
|
3
|
+
dispatchPendingTasks,
|
|
4
|
+
formatDispatchReport,
|
|
5
|
+
hasAnyLlmProvider
|
|
6
|
+
} from "./chunk-R5CG3RC4.js";
|
|
7
|
+
import "./chunk-ZHJRYVOD.js";
|
|
8
|
+
import "./chunk-WDUYM3NZ.js";
|
|
9
|
+
import "./chunk-6B7YHOGI.js";
|
|
10
|
+
import "./chunk-3SI2FCYS.js";
|
|
11
|
+
import "./chunk-NSXTH2B4.js";
|
|
12
|
+
import "./chunk-QDONEJJG.js";
|
|
13
|
+
import "./chunk-GENJNVHG.js";
|
|
14
|
+
import "./chunk-GTHCX5LX.js";
|
|
15
|
+
import "./chunk-QDCIXULL.js";
|
|
16
|
+
export {
|
|
17
|
+
buildPrompt,
|
|
18
|
+
dispatchPendingTasks,
|
|
19
|
+
formatDispatchReport,
|
|
20
|
+
hasAnyLlmProvider
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=dispatcher-OIINFHQU.js.map
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
storeEmbedding,
|
|
22
22
|
syncMemoryEmbedding,
|
|
23
23
|
verifyEmbeddings
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-NSXTH2B4.js";
|
|
25
|
+
import "./chunk-QDONEJJG.js";
|
|
26
|
+
import "./chunk-GTHCX5LX.js";
|
|
27
|
+
import "./chunk-QDCIXULL.js";
|
|
28
28
|
export {
|
|
29
29
|
bootstrapEmbeddings,
|
|
30
30
|
cosineSimilarity,
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
syncMemoryEmbedding,
|
|
50
50
|
verifyEmbeddings
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=embeddings-
|
|
52
|
+
//# sourceMappingURL=embeddings-6Y7KXV5L.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ingestMemoryExtraction,
|
|
3
|
+
ingestMemoryHeuristic,
|
|
4
|
+
mergeAndIngest,
|
|
5
|
+
safeIngestMemoryById
|
|
6
|
+
} from "./chunk-WDUYM3NZ.js";
|
|
7
|
+
import "./chunk-6B7YHOGI.js";
|
|
8
|
+
import "./chunk-3SI2FCYS.js";
|
|
9
|
+
import "./chunk-NSXTH2B4.js";
|
|
10
|
+
import "./chunk-QDONEJJG.js";
|
|
11
|
+
import "./chunk-GENJNVHG.js";
|
|
12
|
+
import "./chunk-GTHCX5LX.js";
|
|
13
|
+
import "./chunk-QDCIXULL.js";
|
|
14
|
+
export {
|
|
15
|
+
ingestMemoryExtraction,
|
|
16
|
+
ingestMemoryHeuristic,
|
|
17
|
+
mergeAndIngest,
|
|
18
|
+
safeIngestMemoryById
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=ingest-QFX3ZEM6.js.map
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
listCredentials,
|
|
9
9
|
setApiKey,
|
|
10
10
|
setAzureConfig
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-QDONEJJG.js";
|
|
12
|
+
import "./chunk-QDCIXULL.js";
|
|
13
13
|
init_keychain();
|
|
14
14
|
export {
|
|
15
15
|
deleteApiKey,
|
|
@@ -21,4 +21,4 @@ export {
|
|
|
21
21
|
setApiKey,
|
|
22
22
|
setAzureConfig
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=keychain-
|
|
24
|
+
//# sourceMappingURL=keychain-DHS6XKIQ.js.map
|
package/dist/mcp.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRecallMcpServer
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-J4IWU2BE.js";
|
|
4
|
+
import "./chunk-5VIPRV3V.js";
|
|
5
|
+
import "./chunk-J6YBL72P.js";
|
|
6
|
+
import "./chunk-R5CG3RC4.js";
|
|
7
|
+
import "./chunk-WPHCCQOC.js";
|
|
8
|
+
import "./chunk-ZHJRYVOD.js";
|
|
9
|
+
import "./chunk-673NQIZX.js";
|
|
10
|
+
import "./chunk-WDUYM3NZ.js";
|
|
11
|
+
import "./chunk-6B7YHOGI.js";
|
|
12
|
+
import "./chunk-3SI2FCYS.js";
|
|
13
|
+
import "./chunk-NSXTH2B4.js";
|
|
14
|
+
import "./chunk-QDONEJJG.js";
|
|
15
|
+
import "./chunk-GENJNVHG.js";
|
|
16
|
+
import "./chunk-GTHCX5LX.js";
|
|
17
17
|
import {
|
|
18
18
|
init_define_RECALL_BUILD_INFO
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QDCIXULL.js";
|
|
20
20
|
|
|
21
21
|
// src/mcp/server.ts
|
|
22
22
|
init_define_RECALL_BUILD_INFO();
|
|
@@ -10,16 +10,16 @@ import {
|
|
|
10
10
|
recordInjectionValueEvents,
|
|
11
11
|
recordMemoryValueEvent,
|
|
12
12
|
recordOutcomeValueEvent
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-WPHCCQOC.js";
|
|
14
|
+
import "./chunk-ZHJRYVOD.js";
|
|
15
|
+
import "./chunk-WDUYM3NZ.js";
|
|
16
|
+
import "./chunk-6B7YHOGI.js";
|
|
17
|
+
import "./chunk-3SI2FCYS.js";
|
|
18
|
+
import "./chunk-NSXTH2B4.js";
|
|
19
|
+
import "./chunk-QDONEJJG.js";
|
|
20
|
+
import "./chunk-GENJNVHG.js";
|
|
21
|
+
import "./chunk-GTHCX5LX.js";
|
|
22
|
+
import "./chunk-QDCIXULL.js";
|
|
23
23
|
export {
|
|
24
24
|
backfillMemoryValueEvents,
|
|
25
25
|
computeMemoryValueReport,
|
|
@@ -33,4 +33,4 @@ export {
|
|
|
33
33
|
recordMemoryValueEvent,
|
|
34
34
|
recordOutcomeValueEvent
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=memory-value-
|
|
36
|
+
//# sourceMappingURL=memory-value-U6TGLBZB.js.map
|
|
@@ -3,21 +3,21 @@ import {
|
|
|
3
3
|
hasNonDurableProvenance,
|
|
4
4
|
queryMemories,
|
|
5
5
|
recordAuditWithSnapshot
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-WDUYM3NZ.js";
|
|
7
|
+
import "./chunk-6B7YHOGI.js";
|
|
8
|
+
import "./chunk-3SI2FCYS.js";
|
|
9
9
|
import {
|
|
10
10
|
queueMemoryEmbeddingSync
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-NSXTH2B4.js";
|
|
12
|
+
import "./chunk-QDONEJJG.js";
|
|
13
|
+
import "./chunk-GENJNVHG.js";
|
|
14
14
|
import {
|
|
15
15
|
eq,
|
|
16
16
|
memories
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GTHCX5LX.js";
|
|
18
18
|
import {
|
|
19
19
|
init_define_RECALL_BUILD_INFO
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QDCIXULL.js";
|
|
21
21
|
|
|
22
22
|
// src/maintenance/provenance.ts
|
|
23
23
|
init_define_RECALL_BUILD_INFO();
|
|
@@ -47,4 +47,4 @@ function quarantineGeneratedMemories(db, apply = false) {
|
|
|
47
47
|
export {
|
|
48
48
|
quarantineGeneratedMemories
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=provenance-
|
|
50
|
+
//# sourceMappingURL=provenance-PLISLH2V.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computeQualityReport,
|
|
3
|
+
diffQualitySnapshots,
|
|
4
|
+
formatQualityReport,
|
|
5
|
+
listQualitySnapshots,
|
|
6
|
+
recordQualitySnapshot
|
|
7
|
+
} from "./chunk-FH2XQDYL.js";
|
|
8
|
+
import "./chunk-WPHCCQOC.js";
|
|
9
|
+
import "./chunk-ZHJRYVOD.js";
|
|
10
|
+
import "./chunk-WDUYM3NZ.js";
|
|
11
|
+
import "./chunk-6B7YHOGI.js";
|
|
12
|
+
import "./chunk-3SI2FCYS.js";
|
|
13
|
+
import "./chunk-NSXTH2B4.js";
|
|
14
|
+
import "./chunk-QDONEJJG.js";
|
|
15
|
+
import "./chunk-GENJNVHG.js";
|
|
16
|
+
import "./chunk-GTHCX5LX.js";
|
|
17
|
+
import "./chunk-QDCIXULL.js";
|
|
18
|
+
export {
|
|
19
|
+
computeQualityReport,
|
|
20
|
+
diffQualitySnapshots,
|
|
21
|
+
formatQualityReport,
|
|
22
|
+
listQualitySnapshots,
|
|
23
|
+
recordQualitySnapshot
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=quality-AYWNSDIU.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
graphQuery
|
|
3
|
+
} from "./chunk-5VIPRV3V.js";
|
|
4
|
+
import "./chunk-WDUYM3NZ.js";
|
|
5
|
+
import "./chunk-6B7YHOGI.js";
|
|
6
|
+
import "./chunk-3SI2FCYS.js";
|
|
7
|
+
import "./chunk-NSXTH2B4.js";
|
|
8
|
+
import "./chunk-QDONEJJG.js";
|
|
9
|
+
import "./chunk-GENJNVHG.js";
|
|
10
|
+
import "./chunk-GTHCX5LX.js";
|
|
11
|
+
import "./chunk-QDCIXULL.js";
|
|
12
|
+
export {
|
|
13
|
+
graphQuery
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=retrieval-B2DYBYAJ.js.map
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
neighborsOf,
|
|
13
13
|
upsertEntity,
|
|
14
14
|
upsertRelation
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-GENJNVHG.js";
|
|
16
|
+
import "./chunk-GTHCX5LX.js";
|
|
17
|
+
import "./chunk-QDCIXULL.js";
|
|
18
18
|
export {
|
|
19
19
|
clearGraph,
|
|
20
20
|
countEntities,
|
|
@@ -30,4 +30,4 @@ export {
|
|
|
30
30
|
upsertEntity,
|
|
31
31
|
upsertRelation
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=store-
|
|
33
|
+
//# sourceMappingURL=store-OLSM63EZ.js.map
|
package/dist/sync-server.js
CHANGED
|
@@ -32,16 +32,16 @@ import {
|
|
|
32
32
|
submitTask,
|
|
33
33
|
sweepExpiredLeases,
|
|
34
34
|
targetKey
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-R5CG3RC4.js";
|
|
36
|
+
import "./chunk-ZHJRYVOD.js";
|
|
37
|
+
import "./chunk-WDUYM3NZ.js";
|
|
38
|
+
import "./chunk-6B7YHOGI.js";
|
|
39
|
+
import "./chunk-3SI2FCYS.js";
|
|
40
|
+
import "./chunk-NSXTH2B4.js";
|
|
41
|
+
import "./chunk-QDONEJJG.js";
|
|
42
|
+
import "./chunk-GENJNVHG.js";
|
|
43
|
+
import "./chunk-GTHCX5LX.js";
|
|
44
|
+
import "./chunk-QDCIXULL.js";
|
|
45
45
|
export {
|
|
46
46
|
DEFAULT_ENQUEUE_CONFIG,
|
|
47
47
|
DEFAULT_LEASE_SECONDS,
|
|
@@ -77,4 +77,4 @@ export {
|
|
|
77
77
|
sweepExpiredLeases,
|
|
78
78
|
targetKey
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=tasks-
|
|
80
|
+
//# sourceMappingURL=tasks-S5ZMXA5K.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
desc
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6B7YHOGI.js";
|
|
4
4
|
import {
|
|
5
5
|
gte,
|
|
6
6
|
llmUsage,
|
|
7
7
|
sql
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GTHCX5LX.js";
|
|
9
9
|
import {
|
|
10
10
|
init_define_RECALL_BUILD_INFO
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QDCIXULL.js";
|
|
12
12
|
|
|
13
13
|
// src/llm/usage.ts
|
|
14
14
|
init_define_RECALL_BUILD_INFO();
|
|
@@ -105,4 +105,4 @@ export {
|
|
|
105
105
|
formatUsageReport,
|
|
106
106
|
summarizeUsage
|
|
107
107
|
};
|
|
108
|
-
//# sourceMappingURL=usage-
|
|
108
|
+
//# sourceMappingURL=usage-RWS6VQBY.js.map
|
package/package.json
CHANGED
|
@@ -3,18 +3,31 @@
|
|
|
3
3
|
Bundled so Recall can run optional cloud sync inside its own daemon, without the
|
|
4
4
|
separate `Recall Cloud Sync` helper, LaunchAgent or `~/.recall-cloud-sync` install.
|
|
5
5
|
|
|
6
|
-
## Upstream
|
|
6
|
+
## Upstream snapshot and reviewed backports
|
|
7
7
|
|
|
8
8
|
Source: `recall-cloud` repository, `scripts/`, commit `6ad7bfe921ca5d5aab53c95c464664ae57a8d2f3` (2026-10-12).
|
|
9
9
|
|
|
10
|
+
The two sync modules include the October 28, 2026 privacy-verification backport
|
|
11
|
+
from `recall-cloud/scripts`, commit `218a03d`: transactional failure on invalid encrypted payloads,
|
|
12
|
+
key verification before upload, and a full encrypted pull on watcher restart.
|
|
13
|
+
The upload projection also backports optional note-column selection from
|
|
14
|
+
upstream `13b0b58` without importing unrelated installer and outcome changes.
|
|
15
|
+
The token module remains byte-identical to the original snapshot. Maintain
|
|
16
|
+
changes upstream first, then apply the focused backport; do not develop a second
|
|
17
|
+
sync engine here.
|
|
18
|
+
|
|
10
19
|
| File | sha256 |
|
|
11
20
|
|---|---|
|
|
12
|
-
| `recall-sync.mjs` | `
|
|
13
|
-
| `recall-sync-local.mjs` | `
|
|
21
|
+
| `recall-sync.mjs` | `4c1404f91144e03a6d75038776ec2c976f696a89cfcc560d086d2540593b2223` |
|
|
22
|
+
| `recall-sync-local.mjs` | `d2b4d1172fc1e39be52fac1eb4fc8b64cb5ae83969e70944188fde4406c7cadb` |
|
|
14
23
|
| `private-token.mjs` | `4450e12ccf9509d33bf65cb7ef084d059a96898e0bef1adc438b14cf37eb484d` |
|
|
15
24
|
|
|
16
|
-
To
|
|
17
|
-
|
|
25
|
+
To refresh the complete snapshot, stage the upstream module graph together,
|
|
26
|
+
including any new relative imports, update the commit and hashes above, and
|
|
27
|
+
run `npx vitest run test/cloud-packaging.test.ts`. For a focused backport, keep
|
|
28
|
+
its source and scope here. The upstream `scripts/recall-sync-private.test.mjs`
|
|
29
|
+
also runs against this engine by setting `RECALL_SYNC_ENGINE` to its absolute
|
|
30
|
+
path, exercising actual HTTP push/pull, restore, key failure and retry safety.
|
|
18
31
|
|
|
19
32
|
## Recall-authored
|
|
20
33
|
|
|
@@ -196,20 +196,29 @@ function isExpiredRejectedTombstone(row, retentionDays, now) {
|
|
|
196
196
|
return updatedMs < now - retentionDays * 86_400_000;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
+
export function decryptCloudPayload(record, e2ee, decrypt) {
|
|
200
|
+
try {
|
|
201
|
+
if (!record.contentCiphertext || !record.contentNonce || !decrypt) throw new Error();
|
|
202
|
+
const payload = JSON.parse(decrypt(e2ee.key, record.contentCiphertext, record.contentNonce));
|
|
203
|
+
if (!payload || typeof payload.text !== "string" || !payload.text.trim()
|
|
204
|
+
|| !payload.recall || typeof payload.recall !== "object" || Array.isArray(payload.recall)) {
|
|
205
|
+
throw new Error();
|
|
206
|
+
}
|
|
207
|
+
return payload;
|
|
208
|
+
} catch {
|
|
209
|
+
// Do not leak crypto errors, record contents, or keys to engine logs.
|
|
210
|
+
throw new Error("E2EE verification failed. Check the original passphrase; encrypted data may also be damaged. Sync was stopped.");
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
199
214
|
function cloudRecordToLocalRow(record, { deviceId, e2ee, decrypt, deviceAliases }) {
|
|
200
215
|
let text = record.contentPlaintext;
|
|
201
216
|
let metadata = record.metadata && typeof record.metadata === "object" ? record.metadata : {};
|
|
202
217
|
if (record.encryptionMode === "e2ee") {
|
|
203
|
-
if (!e2ee
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
);
|
|
208
|
-
text = payload.text;
|
|
209
|
-
metadata = { ...metadata, recall: payload.recall };
|
|
210
|
-
} catch {
|
|
211
|
-
return null;
|
|
212
|
-
}
|
|
218
|
+
if (!e2ee) return null;
|
|
219
|
+
const payload = decryptCloudPayload(record, e2ee, decrypt);
|
|
220
|
+
text = payload.text;
|
|
221
|
+
metadata = { ...metadata, recall: payload.recall };
|
|
213
222
|
}
|
|
214
223
|
if (typeof text !== "string" || !text.trim()) return null;
|
|
215
224
|
|
|
@@ -14,6 +14,7 @@ import { dirname, join, resolve } from "node:path";
|
|
|
14
14
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
15
15
|
import {
|
|
16
16
|
applyPulledRecords,
|
|
17
|
+
decryptCloudPayload,
|
|
17
18
|
canonicalExternalId,
|
|
18
19
|
cloudExternalIdForRow
|
|
19
20
|
} from "./recall-sync-local.mjs";
|
|
@@ -160,7 +161,7 @@ async function main() {
|
|
|
160
161
|
}
|
|
161
162
|
}
|
|
162
163
|
|
|
163
|
-
async function push(options) {
|
|
164
|
+
async function push(options, { verifiedE2ee = false } = {}) {
|
|
164
165
|
const api = requiredApi(options.api ?? process.env.RECALL_CLOUD_API);
|
|
165
166
|
const token = resolveToken(options);
|
|
166
167
|
const dbPath = resolve(expandHome(options.db ?? process.env.RECALL_DB ?? DEFAULT_DB));
|
|
@@ -189,6 +190,10 @@ async function push(options) {
|
|
|
189
190
|
return;
|
|
190
191
|
}
|
|
191
192
|
|
|
193
|
+
// A mistyped key on a new device must not overwrite existing ciphertext.
|
|
194
|
+
// Watch verifies through its preceding pull; standalone push verifies here.
|
|
195
|
+
if (e2ee && !verifiedE2ee) await verifyRemoteEncryption(api, token, e2ee);
|
|
196
|
+
|
|
192
197
|
let accepted = 0;
|
|
193
198
|
// Rows the server actually wrote. `accepted` only counts records that
|
|
194
199
|
// survived the ACL filter; the updated_at guard can still drop stale ones,
|
|
@@ -436,16 +441,31 @@ async function watch(options) {
|
|
|
436
441
|
process.on("SIGINT", () => stop("SIGINT"));
|
|
437
442
|
process.on("SIGTERM", () => stop("SIGTERM"));
|
|
438
443
|
|
|
444
|
+
const privateSync = resolveE2ee(loopOptions);
|
|
445
|
+
let needsKeyVerification = Boolean(privateSync);
|
|
439
446
|
while (running) {
|
|
440
447
|
try {
|
|
441
448
|
const lastFullMs = Date.parse(String(cursor.fullReconciledAt ?? ""));
|
|
442
|
-
const fullReconcile = !Number.isFinite(lastFullMs)
|
|
449
|
+
const fullReconcile = needsKeyVerification || !Number.isFinite(lastFullMs)
|
|
443
450
|
|| Date.now() - lastFullMs >= fullReconcileSeconds * 1000;
|
|
451
|
+
// Verify/import encrypted data before any upload, even with saved cursors.
|
|
452
|
+
// Failed decryption rolls back the pull and never advances its cursor.
|
|
453
|
+
if (privateSync) {
|
|
454
|
+
// Key verification must not inherit the user's incremental batch limit.
|
|
455
|
+
if (needsKeyVerification) await retryTransientSync(() => verifyRemoteEncryption(api, token, privateSync));
|
|
456
|
+
const verified = await retryTransientSync(() => retrySqliteBusy(() => pull({
|
|
457
|
+
...loopOptions,
|
|
458
|
+
since: fullReconcile ? undefined : cursor.pull?.updatedAt,
|
|
459
|
+
sinceId: fullReconcile ? undefined : cursor.pull?.id
|
|
460
|
+
})));
|
|
461
|
+
if (verified.cursor) cursor.pull = verified.cursor;
|
|
462
|
+
needsKeyVerification = false;
|
|
463
|
+
}
|
|
444
464
|
const pushResult = await retryTransientSync(() => push({
|
|
445
465
|
...loopOptions,
|
|
446
466
|
after: fullReconcile ? undefined : cursor.push?.updatedAt,
|
|
447
467
|
afterId: fullReconcile ? undefined : cursor.push?.id
|
|
448
|
-
}));
|
|
468
|
+
}, { verifiedE2ee: Boolean(privateSync) }));
|
|
449
469
|
if (pushResult?.cursor) cursor.push = pushResult.cursor;
|
|
450
470
|
state.entries[stateKey] = cursor;
|
|
451
471
|
saveSyncState(statePath, state);
|
|
@@ -933,6 +953,8 @@ function readRecallMemories(dbPath, statusSet, limit, cursor = {}) {
|
|
|
933
953
|
const db = new Database(dbPath, { readonly: true, fileMustExist: true });
|
|
934
954
|
try {
|
|
935
955
|
db.pragma("query_only = ON");
|
|
956
|
+
const columns = new Set(db.prepare("PRAGMA table_info(memories)").all().map((column) => column.name));
|
|
957
|
+
const note = columns.has("note") ? ", note" : "";
|
|
936
958
|
const placeholders = [...statusSet].map(() => "?").join(",");
|
|
937
959
|
const cursorClause = cursor.after
|
|
938
960
|
? "AND (updated_at > ? OR (updated_at = ? AND id > ?))"
|
|
@@ -947,7 +969,7 @@ function readRecallMemories(dbPath, statusSet, limit, cursor = {}) {
|
|
|
947
969
|
id, type, text, scope, path_scope, repo, status, confidence, source,
|
|
948
970
|
evidence, capture_context, supersedes, created_at, updated_at,
|
|
949
971
|
last_validated_at, last_injected_at, injection_count, override_count,
|
|
950
|
-
repetition_count, team_id, sync_version, auto_inject, dedupe_key
|
|
972
|
+
repetition_count, team_id, sync_version, auto_inject, dedupe_key${note}
|
|
951
973
|
FROM memories
|
|
952
974
|
WHERE status IN (${placeholders})
|
|
953
975
|
${cursorClause}
|
|
@@ -1054,6 +1076,14 @@ function toCloudRecord(row, deviceId, e2ee = null, deviceAliases = {}) {
|
|
|
1054
1076
|
};
|
|
1055
1077
|
}
|
|
1056
1078
|
|
|
1079
|
+
async function verifyRemoteEncryption(api, token, e2ee) {
|
|
1080
|
+
const remote = await fetchAllSyncRecords({ api, token, max: 100001 });
|
|
1081
|
+
if (remote.length > 100000) throw new Error("E2EE verification exceeded the safe record limit; sync was stopped.");
|
|
1082
|
+
for (const record of remote) {
|
|
1083
|
+
if (record.encryptionMode === "e2ee") decryptCloudPayload(record, e2ee, e2eeDecrypt);
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1057
1087
|
async function fetchAllSyncRecords({ api, token, since = null, sinceId = null, max = 100000 }) {
|
|
1058
1088
|
const all = [];
|
|
1059
1089
|
let cursorTime = since ?? null;
|
|
@@ -1066,11 +1096,14 @@ async function fetchAllSyncRecords({ api, token, since = null, sinceId = null, m
|
|
|
1066
1096
|
token,
|
|
1067
1097
|
body: { since: cursorTime, sinceId: cursorId, limit: pageSize }
|
|
1068
1098
|
});
|
|
1069
|
-
|
|
1099
|
+
if (!Array.isArray(result.records)) throw new Error("Invalid Cloud sync response: records are missing");
|
|
1100
|
+
const batch = result.records;
|
|
1070
1101
|
if (batch.length === 0) break;
|
|
1071
1102
|
all.push(...batch);
|
|
1072
1103
|
const last = batch[batch.length - 1];
|
|
1073
|
-
if (!last?.updatedAt || !last?.externalId
|
|
1104
|
+
if (!last?.updatedAt || !last?.externalId) throw new Error("Invalid Cloud sync response: cursor is missing");
|
|
1105
|
+
if (batch.length < pageSize) break;
|
|
1106
|
+
if (last.updatedAt === cursorTime && last.externalId === cursorId) throw new Error("Invalid Cloud sync response: cursor did not advance");
|
|
1074
1107
|
cursorTime = last.updatedAt;
|
|
1075
1108
|
cursorId = last.externalId;
|
|
1076
1109
|
}
|
|
@@ -1093,6 +1126,7 @@ async function fetchJson(url, { method, token, body }) {
|
|
|
1093
1126
|
try {
|
|
1094
1127
|
const parsed = text ? JSON.parse(text) : {};
|
|
1095
1128
|
if (typeof parsed.error === "string") detail = parsed.error;
|
|
1129
|
+
else if (typeof parsed.detail === "string") detail = parsed.detail;
|
|
1096
1130
|
} catch {
|
|
1097
1131
|
// HTML proxy errors are intentionally not echoed into long-lived logs.
|
|
1098
1132
|
}
|