@edihasaj/recall 2.0.15 → 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.
Files changed (84) hide show
  1. package/README.md +22 -4
  2. package/dist/{chunk-UNHFXJ3J.js → chunk-22AJZ7UQ.js} +2 -2
  3. package/dist/{chunk-3XNM4OBY.js → chunk-2COJXGP4.js} +2 -2
  4. package/dist/{chunk-UPBAWEEX.js → chunk-CSBXI3ET.js} +41 -22
  5. package/dist/chunk-CSBXI3ET.js.map +1 -0
  6. package/dist/{chunk-QRRXTZ2D.js → chunk-EY6HIDG2.js} +13 -11
  7. package/dist/chunk-EY6HIDG2.js.map +1 -0
  8. package/dist/{chunk-IP3Y6IVH.js → chunk-FNIIUNW6.js} +2 -2
  9. package/dist/{chunk-5HLPQ4QO.js → chunk-GK7OWVRQ.js} +3 -3
  10. package/dist/{chunk-5VFPRH5H.js → chunk-KLERXJ47.js} +3 -3
  11. package/dist/{chunk-6VNCO5FJ.js → chunk-KVZN35JF.js} +7 -7
  12. package/dist/{chunk-6OSF6UMA.js → chunk-Q22B7YDQ.js} +5 -5
  13. package/dist/{chunk-OICFUTKH.js → chunk-Q7254IPO.js} +908 -43
  14. package/dist/chunk-Q7254IPO.js.map +1 -0
  15. package/dist/{chunk-EKIFJ47B.js → chunk-QQ6YHR7I.js} +11 -11
  16. package/dist/{chunk-S6P6VLHE.js → chunk-RAQT2OBR.js} +7 -7
  17. package/dist/{chunk-6IICQV52.js → chunk-UDLRBKC3.js} +3 -3
  18. package/dist/{chunk-HYJLVJF3.js → chunk-VUVFQJWZ.js} +2 -2
  19. package/dist/{chunk-J5ID5UG6.js → chunk-XRKUJ5B4.js} +2 -2
  20. package/dist/{chunk-KLHMJF5K.js → chunk-YIUBD27J.js} +14 -14
  21. package/dist/chunk-YIUBD27J.js.map +1 -0
  22. package/dist/{chunk-CNVC77BD.js → chunk-YIVOTIDF.js} +5 -5
  23. package/dist/{chunk-WGO53NXP.js → chunk-ZT67CYDS.js} +2 -2
  24. package/dist/chunk-ZT67CYDS.js.map +1 -0
  25. package/dist/{cleanup-KDX5OURB.js → cleanup-4TXIHTJT.js} +11 -11
  26. package/dist/cli.js +55 -36
  27. package/dist/cli.js.map +1 -1
  28. package/dist/{codex-trust-D3GWH24Q.js → codex-trust-2JIY66CP.js} +4 -4
  29. package/dist/daemon.js +1090 -169
  30. package/dist/daemon.js.map +1 -1
  31. package/dist/dispatcher-O6NGADCQ.js +22 -0
  32. package/dist/{embeddings-MYVWUUN3.js → embeddings-AAS7NKGB.js} +5 -5
  33. package/dist/ingest-DW3AG4M5.js +20 -0
  34. package/dist/{keychain-6A4D2OC7.js → keychain-SHRO7W6J.js} +3 -3
  35. package/dist/mcp.js +15 -15
  36. package/dist/{memory-value-GUTJ6GZZ.js → memory-value-R2C7ZSDF.js} +11 -11
  37. package/dist/{provenance-YTXKCFG6.js → provenance-I5GIAP7N.js} +9 -9
  38. package/dist/quality-32MAXPNJ.js +25 -0
  39. package/dist/retrieval-RKYWWNWC.js +15 -0
  40. package/dist/{store-N44KEHDD.js → store-X2B6MRBH.js} +4 -4
  41. package/dist/sync-server.js +2 -2
  42. package/dist/{tasks-WOTNJOMJ.js → tasks-H4NIS6QO.js} +11 -11
  43. package/dist/{usage-LJNNKBGV.js → usage-35HSDMNT.js} +4 -4
  44. package/package.json +6 -5
  45. package/vendor/recall-cloud-sync/PROVENANCE.md +27 -0
  46. package/vendor/recall-cloud-sync/managed-worker.mjs +48 -0
  47. package/vendor/recall-cloud-sync/private-token.mjs +95 -0
  48. package/vendor/recall-cloud-sync/recall-sync-local.mjs +406 -0
  49. package/vendor/recall-cloud-sync/recall-sync.mjs +1266 -0
  50. package/dist/chunk-KLHMJF5K.js.map +0 -1
  51. package/dist/chunk-OICFUTKH.js.map +0 -1
  52. package/dist/chunk-QRRXTZ2D.js.map +0 -1
  53. package/dist/chunk-UPBAWEEX.js.map +0 -1
  54. package/dist/chunk-WGO53NXP.js.map +0 -1
  55. package/dist/dispatcher-3WK6HO5O.js +0 -22
  56. package/dist/ingest-J5BURTVS.js +0 -20
  57. package/dist/quality-JFHCRXD5.js +0 -25
  58. package/dist/retrieval-4V3SVEI6.js +0 -15
  59. /package/dist/{chunk-UNHFXJ3J.js.map → chunk-22AJZ7UQ.js.map} +0 -0
  60. /package/dist/{chunk-3XNM4OBY.js.map → chunk-2COJXGP4.js.map} +0 -0
  61. /package/dist/{chunk-IP3Y6IVH.js.map → chunk-FNIIUNW6.js.map} +0 -0
  62. /package/dist/{chunk-5HLPQ4QO.js.map → chunk-GK7OWVRQ.js.map} +0 -0
  63. /package/dist/{chunk-5VFPRH5H.js.map → chunk-KLERXJ47.js.map} +0 -0
  64. /package/dist/{chunk-6VNCO5FJ.js.map → chunk-KVZN35JF.js.map} +0 -0
  65. /package/dist/{chunk-6OSF6UMA.js.map → chunk-Q22B7YDQ.js.map} +0 -0
  66. /package/dist/{chunk-EKIFJ47B.js.map → chunk-QQ6YHR7I.js.map} +0 -0
  67. /package/dist/{chunk-S6P6VLHE.js.map → chunk-RAQT2OBR.js.map} +0 -0
  68. /package/dist/{chunk-6IICQV52.js.map → chunk-UDLRBKC3.js.map} +0 -0
  69. /package/dist/{chunk-HYJLVJF3.js.map → chunk-VUVFQJWZ.js.map} +0 -0
  70. /package/dist/{chunk-J5ID5UG6.js.map → chunk-XRKUJ5B4.js.map} +0 -0
  71. /package/dist/{chunk-CNVC77BD.js.map → chunk-YIVOTIDF.js.map} +0 -0
  72. /package/dist/{cleanup-KDX5OURB.js.map → cleanup-4TXIHTJT.js.map} +0 -0
  73. /package/dist/{codex-trust-D3GWH24Q.js.map → codex-trust-2JIY66CP.js.map} +0 -0
  74. /package/dist/{dispatcher-3WK6HO5O.js.map → dispatcher-O6NGADCQ.js.map} +0 -0
  75. /package/dist/{embeddings-MYVWUUN3.js.map → embeddings-AAS7NKGB.js.map} +0 -0
  76. /package/dist/{ingest-J5BURTVS.js.map → ingest-DW3AG4M5.js.map} +0 -0
  77. /package/dist/{keychain-6A4D2OC7.js.map → keychain-SHRO7W6J.js.map} +0 -0
  78. /package/dist/{memory-value-GUTJ6GZZ.js.map → memory-value-R2C7ZSDF.js.map} +0 -0
  79. /package/dist/{provenance-YTXKCFG6.js.map → provenance-I5GIAP7N.js.map} +0 -0
  80. /package/dist/{quality-JFHCRXD5.js.map → quality-32MAXPNJ.js.map} +0 -0
  81. /package/dist/{retrieval-4V3SVEI6.js.map → retrieval-RKYWWNWC.js.map} +0 -0
  82. /package/dist/{store-N44KEHDD.js.map → store-X2B6MRBH.js.map} +0 -0
  83. /package/dist/{tasks-WOTNJOMJ.js.map → tasks-H4NIS6QO.js.map} +0 -0
  84. /package/dist/{usage-LJNNKBGV.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-UPBAWEEX.js";
25
- import "./chunk-IP3Y6IVH.js";
26
- import "./chunk-3XNM4OBY.js";
27
- import "./chunk-WGO53NXP.js";
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-MYVWUUN3.js.map
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-IP3Y6IVH.js";
12
- import "./chunk-WGO53NXP.js";
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-6A4D2OC7.js.map
24
+ //# sourceMappingURL=keychain-SHRO7W6J.js.map
package/dist/mcp.js CHANGED
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  createRecallMcpServer
3
- } from "./chunk-QRRXTZ2D.js";
4
- import "./chunk-6OSF6UMA.js";
5
- import "./chunk-OICFUTKH.js";
6
- import "./chunk-EKIFJ47B.js";
7
- import "./chunk-S6P6VLHE.js";
8
- import "./chunk-J5ID5UG6.js";
9
- import "./chunk-UNHFXJ3J.js";
10
- import "./chunk-6VNCO5FJ.js";
11
- import "./chunk-6IICQV52.js";
12
- import "./chunk-HYJLVJF3.js";
13
- import "./chunk-UPBAWEEX.js";
14
- import "./chunk-IP3Y6IVH.js";
15
- import "./chunk-5VFPRH5H.js";
16
- import "./chunk-3XNM4OBY.js";
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-WGO53NXP.js";
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-S6P6VLHE.js";
14
- import "./chunk-J5ID5UG6.js";
15
- import "./chunk-6VNCO5FJ.js";
16
- import "./chunk-6IICQV52.js";
17
- import "./chunk-HYJLVJF3.js";
18
- import "./chunk-UPBAWEEX.js";
19
- import "./chunk-IP3Y6IVH.js";
20
- import "./chunk-5VFPRH5H.js";
21
- import "./chunk-3XNM4OBY.js";
22
- import "./chunk-WGO53NXP.js";
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-GUTJ6GZZ.js.map
36
+ //# sourceMappingURL=memory-value-R2C7ZSDF.js.map
@@ -3,21 +3,21 @@ import {
3
3
  hasNonDurableProvenance,
4
4
  queryMemories,
5
5
  recordAuditWithSnapshot
6
- } from "./chunk-6VNCO5FJ.js";
7
- import "./chunk-6IICQV52.js";
8
- import "./chunk-HYJLVJF3.js";
6
+ } from "./chunk-KVZN35JF.js";
7
+ import "./chunk-UDLRBKC3.js";
8
+ import "./chunk-VUVFQJWZ.js";
9
9
  import {
10
10
  queueMemoryEmbeddingSync
11
- } from "./chunk-UPBAWEEX.js";
12
- import "./chunk-IP3Y6IVH.js";
13
- import "./chunk-5VFPRH5H.js";
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-3XNM4OBY.js";
17
+ } from "./chunk-2COJXGP4.js";
18
18
  import {
19
19
  init_define_RECALL_BUILD_INFO
20
- } from "./chunk-WGO53NXP.js";
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-YTXKCFG6.js.map
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-5VFPRH5H.js";
16
- import "./chunk-3XNM4OBY.js";
17
- import "./chunk-WGO53NXP.js";
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-N44KEHDD.js.map
33
+ //# sourceMappingURL=store-X2B6MRBH.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Sentry
3
- } from "./chunk-UNHFXJ3J.js";
3
+ } from "./chunk-22AJZ7UQ.js";
4
4
  import {
5
5
  init_define_RECALL_BUILD_INFO
6
- } from "./chunk-WGO53NXP.js";
6
+ } from "./chunk-ZT67CYDS.js";
7
7
 
8
8
  // src/sync/server.ts
9
9
  init_define_RECALL_BUILD_INFO();
@@ -32,16 +32,16 @@ import {
32
32
  submitTask,
33
33
  sweepExpiredLeases,
34
34
  targetKey
35
- } from "./chunk-EKIFJ47B.js";
36
- import "./chunk-J5ID5UG6.js";
37
- import "./chunk-6VNCO5FJ.js";
38
- import "./chunk-6IICQV52.js";
39
- import "./chunk-HYJLVJF3.js";
40
- import "./chunk-UPBAWEEX.js";
41
- import "./chunk-IP3Y6IVH.js";
42
- import "./chunk-5VFPRH5H.js";
43
- import "./chunk-3XNM4OBY.js";
44
- import "./chunk-WGO53NXP.js";
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-WOTNJOMJ.js.map
80
+ //# sourceMappingURL=tasks-H4NIS6QO.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  desc
3
- } from "./chunk-6IICQV52.js";
3
+ } from "./chunk-UDLRBKC3.js";
4
4
  import {
5
5
  gte,
6
6
  llmUsage,
7
7
  sql
8
- } from "./chunk-3XNM4OBY.js";
8
+ } from "./chunk-2COJXGP4.js";
9
9
  import {
10
10
  init_define_RECALL_BUILD_INFO
11
- } from "./chunk-WGO53NXP.js";
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-LJNNKBGV.js.map
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.15",
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
  ],
@@ -51,7 +52,7 @@
51
52
  "node": ">=22.0.0"
52
53
  },
53
54
  "dependencies": {
54
- "@huggingface/transformers": "4.2.0",
55
+ "@huggingface/transformers": "4.3.1",
55
56
  "@modelcontextprotocol/sdk": "1.32.1",
56
57
  "@sentry/node": "10.65.0",
57
58
  "@universalmemoryprotocol/core": "https://github.com/edihasaj/universal-memory-protocol/releases/download/v1.0.4/universalmemoryprotocol-core-1.0.4.tgz",
@@ -59,13 +60,13 @@
59
60
  "commander": "13.1.0",
60
61
  "drizzle-orm": "0.45.2",
61
62
  "sqlite-vec": "0.1.9",
62
- "zod": "3.25.76"
63
+ "zod": "^4.6.6"
63
64
  },
64
65
  "overrides": {
65
66
  "@hono/node-server": "2.1.0",
66
67
  "@protobufjs/utf8": "1.1.2",
67
68
  "adm-zip": "0.6.1",
68
- "body-parser": "2.3.0",
69
+ "body-parser": "2.4.0",
69
70
  "esbuild": "0.28.1",
70
71
  "fast-uri": "3.1.9",
71
72
  "hono": "4.13.13",
@@ -85,7 +86,7 @@
85
86
  "@hono/node-server": "2.0.11",
86
87
  "@protobufjs/utf8": "1.1.2",
87
88
  "adm-zip": "0.6.1",
88
- "body-parser": "2.3.0",
89
+ "body-parser": "2.4.0",
89
90
  "esbuild": "0.28.1",
90
91
  "fast-uri": "3.1.9",
91
92
  "hono": "4.13.13",
@@ -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
+ }