@edihasaj/recall 2.0.16 → 2.0.17
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 +22 -4
- package/dist/{chunk-Q2F7EQCA.js → chunk-22AJZ7UQ.js} +2 -2
- package/dist/{chunk-GCMP2YYN.js → chunk-2COJXGP4.js} +2 -2
- package/dist/{chunk-SYSSACWJ.js → chunk-CSBXI3ET.js} +39 -20
- package/dist/chunk-CSBXI3ET.js.map +1 -0
- package/dist/{chunk-QPR77YXP.js → chunk-EY6HIDG2.js} +13 -11
- package/dist/chunk-EY6HIDG2.js.map +1 -0
- package/dist/{chunk-GDN44ZC7.js → chunk-FNIIUNW6.js} +2 -2
- package/dist/{chunk-YELXEWKH.js → chunk-GK7OWVRQ.js} +3 -3
- package/dist/{chunk-7UWVXXTU.js → chunk-KLERXJ47.js} +3 -3
- package/dist/{chunk-THC7QOAK.js → chunk-KVZN35JF.js} +7 -7
- package/dist/{chunk-SEXZABB2.js → chunk-Q22B7YDQ.js} +5 -5
- package/dist/{chunk-VRAG5V66.js → chunk-Q7254IPO.js} +908 -43
- package/dist/chunk-Q7254IPO.js.map +1 -0
- package/dist/{chunk-EKFOHVHS.js → chunk-QQ6YHR7I.js} +11 -11
- package/dist/{chunk-MLC3KO2O.js → chunk-RAQT2OBR.js} +7 -7
- package/dist/{chunk-DVLQYARZ.js → chunk-UDLRBKC3.js} +3 -3
- package/dist/{chunk-DOYTMHDI.js → chunk-VUVFQJWZ.js} +2 -2
- package/dist/{chunk-LEOXFQJJ.js → chunk-XRKUJ5B4.js} +2 -2
- package/dist/{chunk-ZF23OPYV.js → chunk-YIUBD27J.js} +14 -14
- package/dist/chunk-YIUBD27J.js.map +1 -0
- package/dist/{chunk-DAW6FUGL.js → chunk-YIVOTIDF.js} +5 -5
- package/dist/{chunk-FYMMTODQ.js → chunk-ZT67CYDS.js} +2 -2
- package/dist/{chunk-FYMMTODQ.js.map → chunk-ZT67CYDS.js.map} +1 -1
- package/dist/{cleanup-WJFE6IVP.js → cleanup-4TXIHTJT.js} +11 -11
- package/dist/cli.js +55 -36
- package/dist/cli.js.map +1 -1
- package/dist/{codex-trust-3BFTJFRD.js → codex-trust-2JIY66CP.js} +4 -4
- package/dist/daemon.js +1090 -169
- package/dist/daemon.js.map +1 -1
- package/dist/dispatcher-O6NGADCQ.js +22 -0
- package/dist/{embeddings-H352GFKD.js → embeddings-AAS7NKGB.js} +5 -5
- package/dist/ingest-DW3AG4M5.js +20 -0
- package/dist/{keychain-A2Z7D7YE.js → keychain-SHRO7W6J.js} +3 -3
- package/dist/mcp.js +15 -15
- package/dist/{memory-value-M3TA7SEK.js → memory-value-R2C7ZSDF.js} +11 -11
- package/dist/{provenance-CXU6LZK7.js → provenance-I5GIAP7N.js} +9 -9
- package/dist/quality-32MAXPNJ.js +25 -0
- package/dist/retrieval-RKYWWNWC.js +15 -0
- package/dist/{store-YCVWABSH.js → store-X2B6MRBH.js} +4 -4
- package/dist/sync-server.js +2 -2
- package/dist/{tasks-4UL2FIAQ.js → tasks-H4NIS6QO.js} +11 -11
- package/dist/{usage-HZ27RG53.js → usage-35HSDMNT.js} +4 -4
- package/package.json +2 -1
- package/vendor/recall-cloud-sync/PROVENANCE.md +27 -0
- package/vendor/recall-cloud-sync/managed-worker.mjs +48 -0
- package/vendor/recall-cloud-sync/private-token.mjs +95 -0
- package/vendor/recall-cloud-sync/recall-sync-local.mjs +406 -0
- package/vendor/recall-cloud-sync/recall-sync.mjs +1266 -0
- package/dist/chunk-QPR77YXP.js.map +0 -1
- package/dist/chunk-SYSSACWJ.js.map +0 -1
- package/dist/chunk-VRAG5V66.js.map +0 -1
- package/dist/chunk-ZF23OPYV.js.map +0 -1
- package/dist/dispatcher-5JVGZNWT.js +0 -22
- package/dist/ingest-NVYEOSVZ.js +0 -20
- package/dist/quality-4CG6U273.js +0 -25
- package/dist/retrieval-42CPYUDW.js +0 -15
- /package/dist/{chunk-Q2F7EQCA.js.map → chunk-22AJZ7UQ.js.map} +0 -0
- /package/dist/{chunk-GCMP2YYN.js.map → chunk-2COJXGP4.js.map} +0 -0
- /package/dist/{chunk-GDN44ZC7.js.map → chunk-FNIIUNW6.js.map} +0 -0
- /package/dist/{chunk-YELXEWKH.js.map → chunk-GK7OWVRQ.js.map} +0 -0
- /package/dist/{chunk-7UWVXXTU.js.map → chunk-KLERXJ47.js.map} +0 -0
- /package/dist/{chunk-THC7QOAK.js.map → chunk-KVZN35JF.js.map} +0 -0
- /package/dist/{chunk-SEXZABB2.js.map → chunk-Q22B7YDQ.js.map} +0 -0
- /package/dist/{chunk-EKFOHVHS.js.map → chunk-QQ6YHR7I.js.map} +0 -0
- /package/dist/{chunk-MLC3KO2O.js.map → chunk-RAQT2OBR.js.map} +0 -0
- /package/dist/{chunk-DVLQYARZ.js.map → chunk-UDLRBKC3.js.map} +0 -0
- /package/dist/{chunk-DOYTMHDI.js.map → chunk-VUVFQJWZ.js.map} +0 -0
- /package/dist/{chunk-LEOXFQJJ.js.map → chunk-XRKUJ5B4.js.map} +0 -0
- /package/dist/{chunk-DAW6FUGL.js.map → chunk-YIVOTIDF.js.map} +0 -0
- /package/dist/{cleanup-WJFE6IVP.js.map → cleanup-4TXIHTJT.js.map} +0 -0
- /package/dist/{codex-trust-3BFTJFRD.js.map → codex-trust-2JIY66CP.js.map} +0 -0
- /package/dist/{dispatcher-5JVGZNWT.js.map → dispatcher-O6NGADCQ.js.map} +0 -0
- /package/dist/{embeddings-H352GFKD.js.map → embeddings-AAS7NKGB.js.map} +0 -0
- /package/dist/{ingest-NVYEOSVZ.js.map → ingest-DW3AG4M5.js.map} +0 -0
- /package/dist/{keychain-A2Z7D7YE.js.map → keychain-SHRO7W6J.js.map} +0 -0
- /package/dist/{memory-value-M3TA7SEK.js.map → memory-value-R2C7ZSDF.js.map} +0 -0
- /package/dist/{provenance-CXU6LZK7.js.map → provenance-I5GIAP7N.js.map} +0 -0
- /package/dist/{quality-4CG6U273.js.map → quality-32MAXPNJ.js.map} +0 -0
- /package/dist/{retrieval-42CPYUDW.js.map → retrieval-RKYWWNWC.js.map} +0 -0
- /package/dist/{store-YCVWABSH.js.map → store-X2B6MRBH.js.map} +0 -0
- /package/dist/{tasks-4UL2FIAQ.js.map → tasks-H4NIS6QO.js.map} +0 -0
- /package/dist/{usage-HZ27RG53.js.map → usage-35HSDMNT.js.map} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildPrompt,
|
|
3
|
+
dispatchPendingTasks,
|
|
4
|
+
formatDispatchReport,
|
|
5
|
+
hasAnyLlmProvider
|
|
6
|
+
} from "./chunk-QQ6YHR7I.js";
|
|
7
|
+
import "./chunk-XRKUJ5B4.js";
|
|
8
|
+
import "./chunk-KVZN35JF.js";
|
|
9
|
+
import "./chunk-UDLRBKC3.js";
|
|
10
|
+
import "./chunk-VUVFQJWZ.js";
|
|
11
|
+
import "./chunk-CSBXI3ET.js";
|
|
12
|
+
import "./chunk-FNIIUNW6.js";
|
|
13
|
+
import "./chunk-KLERXJ47.js";
|
|
14
|
+
import "./chunk-2COJXGP4.js";
|
|
15
|
+
import "./chunk-ZT67CYDS.js";
|
|
16
|
+
export {
|
|
17
|
+
buildPrompt,
|
|
18
|
+
dispatchPendingTasks,
|
|
19
|
+
formatDispatchReport,
|
|
20
|
+
hasAnyLlmProvider
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=dispatcher-O6NGADCQ.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-CSBXI3ET.js";
|
|
25
|
+
import "./chunk-FNIIUNW6.js";
|
|
26
|
+
import "./chunk-2COJXGP4.js";
|
|
27
|
+
import "./chunk-ZT67CYDS.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-AAS7NKGB.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ingestMemoryExtraction,
|
|
3
|
+
ingestMemoryHeuristic,
|
|
4
|
+
mergeAndIngest,
|
|
5
|
+
safeIngestMemoryById
|
|
6
|
+
} from "./chunk-KVZN35JF.js";
|
|
7
|
+
import "./chunk-UDLRBKC3.js";
|
|
8
|
+
import "./chunk-VUVFQJWZ.js";
|
|
9
|
+
import "./chunk-CSBXI3ET.js";
|
|
10
|
+
import "./chunk-FNIIUNW6.js";
|
|
11
|
+
import "./chunk-KLERXJ47.js";
|
|
12
|
+
import "./chunk-2COJXGP4.js";
|
|
13
|
+
import "./chunk-ZT67CYDS.js";
|
|
14
|
+
export {
|
|
15
|
+
ingestMemoryExtraction,
|
|
16
|
+
ingestMemoryHeuristic,
|
|
17
|
+
mergeAndIngest,
|
|
18
|
+
safeIngestMemoryById
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=ingest-DW3AG4M5.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-FNIIUNW6.js";
|
|
12
|
+
import "./chunk-ZT67CYDS.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-SHRO7W6J.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-EY6HIDG2.js";
|
|
4
|
+
import "./chunk-Q22B7YDQ.js";
|
|
5
|
+
import "./chunk-Q7254IPO.js";
|
|
6
|
+
import "./chunk-QQ6YHR7I.js";
|
|
7
|
+
import "./chunk-RAQT2OBR.js";
|
|
8
|
+
import "./chunk-XRKUJ5B4.js";
|
|
9
|
+
import "./chunk-22AJZ7UQ.js";
|
|
10
|
+
import "./chunk-KVZN35JF.js";
|
|
11
|
+
import "./chunk-UDLRBKC3.js";
|
|
12
|
+
import "./chunk-VUVFQJWZ.js";
|
|
13
|
+
import "./chunk-CSBXI3ET.js";
|
|
14
|
+
import "./chunk-FNIIUNW6.js";
|
|
15
|
+
import "./chunk-KLERXJ47.js";
|
|
16
|
+
import "./chunk-2COJXGP4.js";
|
|
17
17
|
import {
|
|
18
18
|
init_define_RECALL_BUILD_INFO
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ZT67CYDS.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-RAQT2OBR.js";
|
|
14
|
+
import "./chunk-XRKUJ5B4.js";
|
|
15
|
+
import "./chunk-KVZN35JF.js";
|
|
16
|
+
import "./chunk-UDLRBKC3.js";
|
|
17
|
+
import "./chunk-VUVFQJWZ.js";
|
|
18
|
+
import "./chunk-CSBXI3ET.js";
|
|
19
|
+
import "./chunk-FNIIUNW6.js";
|
|
20
|
+
import "./chunk-KLERXJ47.js";
|
|
21
|
+
import "./chunk-2COJXGP4.js";
|
|
22
|
+
import "./chunk-ZT67CYDS.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-R2C7ZSDF.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-KVZN35JF.js";
|
|
7
|
+
import "./chunk-UDLRBKC3.js";
|
|
8
|
+
import "./chunk-VUVFQJWZ.js";
|
|
9
9
|
import {
|
|
10
10
|
queueMemoryEmbeddingSync
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-CSBXI3ET.js";
|
|
12
|
+
import "./chunk-FNIIUNW6.js";
|
|
13
|
+
import "./chunk-KLERXJ47.js";
|
|
14
14
|
import {
|
|
15
15
|
eq,
|
|
16
16
|
memories
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2COJXGP4.js";
|
|
18
18
|
import {
|
|
19
19
|
init_define_RECALL_BUILD_INFO
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZT67CYDS.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-I5GIAP7N.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computeQualityReport,
|
|
3
|
+
diffQualitySnapshots,
|
|
4
|
+
formatQualityReport,
|
|
5
|
+
listQualitySnapshots,
|
|
6
|
+
recordQualitySnapshot
|
|
7
|
+
} from "./chunk-YIVOTIDF.js";
|
|
8
|
+
import "./chunk-RAQT2OBR.js";
|
|
9
|
+
import "./chunk-XRKUJ5B4.js";
|
|
10
|
+
import "./chunk-KVZN35JF.js";
|
|
11
|
+
import "./chunk-UDLRBKC3.js";
|
|
12
|
+
import "./chunk-VUVFQJWZ.js";
|
|
13
|
+
import "./chunk-CSBXI3ET.js";
|
|
14
|
+
import "./chunk-FNIIUNW6.js";
|
|
15
|
+
import "./chunk-KLERXJ47.js";
|
|
16
|
+
import "./chunk-2COJXGP4.js";
|
|
17
|
+
import "./chunk-ZT67CYDS.js";
|
|
18
|
+
export {
|
|
19
|
+
computeQualityReport,
|
|
20
|
+
diffQualitySnapshots,
|
|
21
|
+
formatQualityReport,
|
|
22
|
+
listQualitySnapshots,
|
|
23
|
+
recordQualitySnapshot
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=quality-32MAXPNJ.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
graphQuery
|
|
3
|
+
} from "./chunk-Q22B7YDQ.js";
|
|
4
|
+
import "./chunk-KVZN35JF.js";
|
|
5
|
+
import "./chunk-UDLRBKC3.js";
|
|
6
|
+
import "./chunk-VUVFQJWZ.js";
|
|
7
|
+
import "./chunk-CSBXI3ET.js";
|
|
8
|
+
import "./chunk-FNIIUNW6.js";
|
|
9
|
+
import "./chunk-KLERXJ47.js";
|
|
10
|
+
import "./chunk-2COJXGP4.js";
|
|
11
|
+
import "./chunk-ZT67CYDS.js";
|
|
12
|
+
export {
|
|
13
|
+
graphQuery
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=retrieval-RKYWWNWC.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-KLERXJ47.js";
|
|
16
|
+
import "./chunk-2COJXGP4.js";
|
|
17
|
+
import "./chunk-ZT67CYDS.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-X2B6MRBH.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-QQ6YHR7I.js";
|
|
36
|
+
import "./chunk-XRKUJ5B4.js";
|
|
37
|
+
import "./chunk-KVZN35JF.js";
|
|
38
|
+
import "./chunk-UDLRBKC3.js";
|
|
39
|
+
import "./chunk-VUVFQJWZ.js";
|
|
40
|
+
import "./chunk-CSBXI3ET.js";
|
|
41
|
+
import "./chunk-FNIIUNW6.js";
|
|
42
|
+
import "./chunk-KLERXJ47.js";
|
|
43
|
+
import "./chunk-2COJXGP4.js";
|
|
44
|
+
import "./chunk-ZT67CYDS.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-H4NIS6QO.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
desc
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UDLRBKC3.js";
|
|
4
4
|
import {
|
|
5
5
|
gte,
|
|
6
6
|
llmUsage,
|
|
7
7
|
sql
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2COJXGP4.js";
|
|
9
9
|
import {
|
|
10
10
|
init_define_RECALL_BUILD_INFO
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZT67CYDS.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-35HSDMNT.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edihasaj/recall",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.17",
|
|
4
4
|
"description": "Cross-tool coding memory and instruction compiler",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://recallmemory.dev/",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"scripts/recall-codex",
|
|
26
26
|
"scripts/recall-session",
|
|
27
27
|
"scripts/install.ps1",
|
|
28
|
+
"vendor/recall-cloud-sync",
|
|
28
29
|
"README.md",
|
|
29
30
|
"LICENSE"
|
|
30
31
|
],
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# recall-cloud-sync (vendored)
|
|
2
|
+
|
|
3
|
+
Bundled so Recall can run optional cloud sync inside its own daemon, without the
|
|
4
|
+
separate `Recall Cloud Sync` helper, LaunchAgent or `~/.recall-cloud-sync` install.
|
|
5
|
+
|
|
6
|
+
## Upstream files (byte-identical copies, do not edit here)
|
|
7
|
+
|
|
8
|
+
Source: `recall-cloud` repository, `scripts/`, commit `6ad7bfe921ca5d5aab53c95c464664ae57a8d2f3` (2026-10-12).
|
|
9
|
+
|
|
10
|
+
| File | sha256 |
|
|
11
|
+
|---|---|
|
|
12
|
+
| `recall-sync.mjs` | `01e5fb2dad66d86ee8c4de126c3efddc4553d86506ce2d7b9c20eb5e6cef5c19` |
|
|
13
|
+
| `recall-sync-local.mjs` | `084ad070f468924e5cb9a32c5b6fb7d9d2ea8c3f347838d4360cc1a7cef62e7a` |
|
|
14
|
+
| `private-token.mjs` | `4450e12ccf9509d33bf65cb7ef084d059a96898e0bef1adc438b14cf37eb484d` |
|
|
15
|
+
|
|
16
|
+
To update, copy the three files from `recall-cloud/scripts/`, update the commit and
|
|
17
|
+
hashes above, and run `npx vitest run test/cloud-packaging.test.ts`.
|
|
18
|
+
|
|
19
|
+
## Recall-authored
|
|
20
|
+
|
|
21
|
+
| File | Purpose |
|
|
22
|
+
|---|---|
|
|
23
|
+
| `managed-worker.mjs` | Runs the unmodified engine `watch` loop in-process, exits when the daemon's IPC channel closes (including daemon SIGKILL), and bounds every request with a 30s abort signal. |
|
|
24
|
+
|
|
25
|
+
The engine resolves `better-sqlite3` from the surrounding `node_modules`, so this
|
|
26
|
+
directory must stay next to `dist/` and `node_modules/` in the npm package and in
|
|
27
|
+
the app's `Runtime`.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Recall-authored (not part of the upstream recall-cloud engine; see PROVENANCE.md).
|
|
2
|
+
//
|
|
3
|
+
// Runs the unmodified recall-sync.mjs `watch` loop inside this process and ties
|
|
4
|
+
// its lifetime to the Recall daemon that forked it. The IPC channel closes when
|
|
5
|
+
// the daemon exits for any reason, including SIGKILL, so the sync loop can never
|
|
6
|
+
// keep uploading after the daemon is gone. No PID files are involved.
|
|
7
|
+
//
|
|
8
|
+
// usage (forked with an IPC channel): node managed-worker.mjs <engine.mjs> watch [engine flags]
|
|
9
|
+
import { pathToFileURL } from "node:url";
|
|
10
|
+
|
|
11
|
+
const [enginePath, ...engineArgs] = process.argv.slice(2);
|
|
12
|
+
if (typeof process.send !== "function" || !enginePath) {
|
|
13
|
+
console.error("managed-worker requires an IPC channel and an engine path");
|
|
14
|
+
process.exit(2);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const initialParent = process.ppid;
|
|
18
|
+
const quit = () => process.exit(0);
|
|
19
|
+
|
|
20
|
+
process.on("disconnect", quit);
|
|
21
|
+
process.on("message", (message) => {
|
|
22
|
+
if (message && message.type === "stop") quit();
|
|
23
|
+
});
|
|
24
|
+
process.on("SIGTERM", quit);
|
|
25
|
+
process.on("SIGINT", quit);
|
|
26
|
+
// Second line of defence if the IPC close were ever missed.
|
|
27
|
+
setInterval(() => {
|
|
28
|
+
if (process.ppid !== initialParent) quit();
|
|
29
|
+
}, 1000).unref();
|
|
30
|
+
|
|
31
|
+
// Bound every network call, including reading the response body: the timeout
|
|
32
|
+
// signal is never cleared on headers, and it is combined with any caller signal.
|
|
33
|
+
const REQUEST_TIMEOUT_MS = Number(process.env.RECALL_CLOUD_REQUEST_TIMEOUT_MS) || 30_000;
|
|
34
|
+
const nativeFetch = globalThis.fetch;
|
|
35
|
+
globalThis.fetch = (input, init = {}) => {
|
|
36
|
+
const timeout = AbortSignal.timeout(REQUEST_TIMEOUT_MS);
|
|
37
|
+
const signal = init.signal ? AbortSignal.any([init.signal, timeout]) : timeout;
|
|
38
|
+
return nativeFetch(input, { ...init, signal });
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// The engine only runs main() when process.argv[1] is its own path.
|
|
42
|
+
process.argv = [process.execPath, enginePath, ...engineArgs];
|
|
43
|
+
try {
|
|
44
|
+
await import(pathToFileURL(enginePath).href);
|
|
45
|
+
} catch (error) {
|
|
46
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { randomBytes } from "node:crypto";
|
|
2
|
+
import {
|
|
3
|
+
chmodSync,
|
|
4
|
+
existsSync,
|
|
5
|
+
lstatSync,
|
|
6
|
+
mkdirSync,
|
|
7
|
+
readFileSync,
|
|
8
|
+
renameSync,
|
|
9
|
+
rmSync,
|
|
10
|
+
writeFileSync
|
|
11
|
+
} from "node:fs";
|
|
12
|
+
import { dirname, join, resolve } from "node:path";
|
|
13
|
+
import { homedir } from "node:os";
|
|
14
|
+
|
|
15
|
+
export function normalizeToken(value) {
|
|
16
|
+
const token = String(value ?? "");
|
|
17
|
+
if (!token || token.length > 4096 || token !== token.trim() || /[\r\n\0]/.test(token)) {
|
|
18
|
+
throw new Error("Invalid Recall Cloud token");
|
|
19
|
+
}
|
|
20
|
+
return token;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function readPrivateTokenFile(filePath) {
|
|
24
|
+
const resolvedPath = resolve(expandHome(filePath));
|
|
25
|
+
validatePrivateFile(resolvedPath);
|
|
26
|
+
return normalizeToken(readFileSync(resolvedPath, "utf8"));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function writePrivateTokenFile(filePath, token) {
|
|
30
|
+
const directory = dirname(filePath);
|
|
31
|
+
mkdirSync(directory, { recursive: true, mode: 0o700 });
|
|
32
|
+
const directoryStat = lstatSync(directory);
|
|
33
|
+
if (!directoryStat.isDirectory() || directoryStat.isSymbolicLink()) {
|
|
34
|
+
throw new Error(`Credential directory is not a real directory: ${directory}`);
|
|
35
|
+
}
|
|
36
|
+
validateOwner(directory, directoryStat);
|
|
37
|
+
chmodSync(directory, 0o700);
|
|
38
|
+
writePrivateFileAtomic(filePath, normalizeToken(token));
|
|
39
|
+
validatePrivateFile(filePath);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function writePrivateFileAtomic(filePath, content) {
|
|
43
|
+
const temporaryPath = `${filePath}.tmp-${process.pid}-${randomBytes(8).toString("hex")}`;
|
|
44
|
+
try {
|
|
45
|
+
writeFileSync(temporaryPath, content, { encoding: "utf8", mode: 0o600, flag: "wx" });
|
|
46
|
+
chmodSync(temporaryPath, 0o600);
|
|
47
|
+
renameSync(temporaryPath, filePath);
|
|
48
|
+
} finally {
|
|
49
|
+
if (existsSync(temporaryPath)) rmSync(temporaryPath);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function validatePrivateFile(filePath) {
|
|
54
|
+
const fileStat = lstatSync(filePath);
|
|
55
|
+
if (!fileStat.isFile() || fileStat.isSymbolicLink()) {
|
|
56
|
+
throw new Error(`Credential path must be a regular file: ${filePath}`);
|
|
57
|
+
}
|
|
58
|
+
validateOwner(filePath, fileStat);
|
|
59
|
+
// Windows protects this path with an inherited user-only ACL in install.ps1.
|
|
60
|
+
// POSIX mode bits are synthetic there and cannot prove access restrictions.
|
|
61
|
+
if (process.platform === "win32") return;
|
|
62
|
+
if ((fileStat.mode & 0o777) !== 0o600) {
|
|
63
|
+
throw new Error(`Credential file must have mode 0600: ${filePath}`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function validateApiUrl(value) {
|
|
68
|
+
let url;
|
|
69
|
+
try {
|
|
70
|
+
url = new URL(String(value));
|
|
71
|
+
} catch {
|
|
72
|
+
throw new Error("Recall Cloud API URL is invalid");
|
|
73
|
+
}
|
|
74
|
+
const loopback = url.hostname === "localhost"
|
|
75
|
+
|| url.hostname === "127.0.0.1"
|
|
76
|
+
|| url.hostname === "::1";
|
|
77
|
+
if ((url.protocol !== "https:" && !(loopback && url.protocol === "http:"))
|
|
78
|
+
|| url.username
|
|
79
|
+
|| url.password) {
|
|
80
|
+
throw new Error("Recall Cloud API must use HTTPS (or loopback HTTP) without URL credentials");
|
|
81
|
+
}
|
|
82
|
+
return url.href.replace(/\/$/, "");
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function validateOwner(filePath, fileStat) {
|
|
86
|
+
if (typeof process.getuid === "function" && fileStat.uid !== process.getuid()) {
|
|
87
|
+
throw new Error(`Credential path must be owned by the current user: ${filePath}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function expandHome(value) {
|
|
92
|
+
if (value === "~") return homedir();
|
|
93
|
+
if (value.startsWith("~/")) return join(homedir(), value.slice(2));
|
|
94
|
+
return value;
|
|
95
|
+
}
|