@remnic/cli 9.69.40 → 9.69.41

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 (2) hide show
  1. package/dist/index.js +12 -24
  2. package/package.json +32 -32
package/dist/index.js CHANGED
@@ -581,7 +581,7 @@ import {
581
581
  runPromotionCandidatesCommand,
582
582
  buildOfflineSyncChangesetFromSnapshot,
583
583
  drainPendingLifecycleForOfflineSync,
584
- compileOfflineSyncExcludeGlobs,
584
+ compileOfflineSyncExcludeGlobs as compileOfflineSyncExcludeGlobs2,
585
585
  buildOfflineSyncSnapshotFromBase as buildOfflineSyncSnapshotFromBase2,
586
586
  defaultOfflineSyncStatePath,
587
587
  normalizeOfflineSyncSnapshot,
@@ -2053,6 +2053,7 @@ import {
2053
2053
  DEFAULT_CONVERGE_CONFLICT_POLICY,
2054
2054
  OFFLINE_SYNC_FILE_CONTENT_TRANSFER_CHUNK_BYTES as OFFLINE_SYNC_FILE_CONTENT_TRANSFER_CHUNK_BYTES3,
2055
2055
  applyOfflineSyncFileContentChunk,
2056
+ compileOfflineSyncExcludeGlobs,
2056
2057
  envConvergePeerRequestTimeoutMs as envConvergePeerRequestTimeoutMs2,
2057
2058
  isInternalRemnicStatePath as isInternalRemnicStatePath4,
2058
2059
  normalizeConvergePeerRequestTimeoutMs,
@@ -2068,7 +2069,9 @@ import {
2068
2069
  readConvergeCursor,
2069
2070
  writeConvergeCursor
2070
2071
  } from "@remnic/core/reconcile/cursor.js";
2071
- import { collapseActiveFactDuplicates } from "@remnic/core/reconcile/manifest.js";
2072
+ import {
2073
+ collapseActiveFactDuplicates
2074
+ } from "@remnic/core/reconcile/manifest.js";
2072
2075
  import {
2073
2076
  planReconciliation
2074
2077
  } from "@remnic/core/reconcile/plan.js";
@@ -2495,12 +2498,11 @@ async function readLocalTombstoneEvidence(rootDir) {
2495
2498
  }
2496
2499
 
2497
2500
  // src/offline-storage-io.ts
2498
- import { createDecipheriv, createHash as createHash2 } from "crypto";
2501
+ import { createDecipheriv } from "crypto";
2499
2502
  import fs18 from "fs";
2500
2503
  import { lstat as lstat2, mkdtemp, readdir as readdir2, rm as rm2 } from "fs/promises";
2501
2504
  import path4 from "path";
2502
2505
  import {
2503
- OFFLINE_SYNC_FILE_CONTENT_TRANSFER_CHUNK_BYTES,
2504
2506
  StorageManager as StorageManager3,
2505
2507
  createPersistedSupportPassportPrivateFileExclusion,
2506
2508
  createSupportPassportPrivateFileExclusion
@@ -2594,24 +2596,7 @@ async function createOfflineStorageIo(memoryDir, configuredStorage, persistedExc
2594
2596
  ) : createSupportPassportPrivateFileExclusion(storage),
2595
2597
  readFile: async ({ filePath }) => storage.readOfflineSyncFile(filePath),
2596
2598
  readDeletionRevisions: () => storage.readDeletionRevisions(),
2597
- readFileDigest: async ({ filePath }) => {
2598
- const hash = createHash2("sha256");
2599
- let bytes = 0;
2600
- for await (const rawChunk of readOfflineSyncFileChunks({
2601
- filePath,
2602
- memoryDir,
2603
- secureStoreKey,
2604
- chunkSize: OFFLINE_SYNC_FILE_CONTENT_TRANSFER_CHUNK_BYTES
2605
- })) {
2606
- const chunk = Buffer.isBuffer(rawChunk) ? rawChunk : Buffer.from(rawChunk);
2607
- hash.update(chunk);
2608
- bytes += chunk.length;
2609
- }
2610
- return {
2611
- sha256: hash.digest("hex"),
2612
- bytes
2613
- };
2614
- },
2599
+ readFileDigest: async ({ filePath }) => storage.digestOfflineSyncFile(filePath),
2615
2600
  readFileChunks: ({ filePath, chunkSize }) => readOfflineSyncFileChunks({
2616
2601
  filePath,
2617
2602
  memoryDir,
@@ -2941,6 +2926,7 @@ async function planLocalNamespaceCensus(args) {
2941
2926
  readFile: io.readFile,
2942
2927
  readFileDigest: io.readFileDigest,
2943
2928
  excludeFile: io.excludeFile,
2929
+ userExcludeRegexps: args.userExcludeRegexps,
2944
2930
  signal: args.signal
2945
2931
  });
2946
2932
  const files = snapshot.files.filter((record2) => !isInternalRemnicStatePath(record2.path)).map((record2) => ({
@@ -3981,6 +3967,7 @@ async function computeConvergePlan(options = {}) {
3981
3967
  }
3982
3968
  }
3983
3969
  const memoryDir = options.cursorDir ?? config?.memoryDir;
3970
+ const userExcludeRegexps = compileOfflineSyncExcludeGlobs(config?.offlineSyncExcludes ?? []);
3984
3971
  const peerUrl = options.peerUrl;
3985
3972
  const cacheActive = memoryDir !== void 0 && (!options.localFilesByNamespace && config || !options.peerFilesByNamespace && peerUrl);
3986
3973
  const cache = cacheActive && memoryDir !== void 0 ? await openPlanCache(
@@ -4006,7 +3993,8 @@ async function computeConvergePlan(options = {}) {
4006
3993
  signal: options.signal,
4007
3994
  onProgress: options.onProgress,
4008
3995
  memoryDir,
4009
- peerUrl: options.peerUrl
3996
+ peerUrl: options.peerUrl,
3997
+ userExcludeRegexps
4010
3998
  });
4011
3999
  localMap.set(rootInfo.namespace, census.files);
4012
4000
  localManifests.set(rootInfo.namespace, census.manifest);
@@ -15585,7 +15573,7 @@ function resolveOfflineSyncUserExcludes(rest, config) {
15585
15573
  globs.push(entry.trim());
15586
15574
  }
15587
15575
  }
15588
- return compileOfflineSyncExcludeGlobs(globs);
15576
+ return compileOfflineSyncExcludeGlobs2(globs);
15589
15577
  }
15590
15578
  async function cmdOffline(action, rest, json) {
15591
15579
  if (action === "help" || action === "--help" || action === "-h" || rest.includes("--help") || rest.includes("-h")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/cli",
3
- "version": "9.69.40",
3
+ "version": "9.69.41",
4
4
  "description": "CLI for Remnic memory — init, query, doctor, daemon management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,26 +26,26 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "yaml": "^2.4.2",
29
- "@remnic/plugin-pi": "^9.69.40",
30
- "@remnic/server": "^9.69.40",
31
- "@remnic/core": "^9.69.40"
29
+ "@remnic/plugin-pi": "^9.69.41",
30
+ "@remnic/server": "^9.69.41",
31
+ "@remnic/core": "^9.69.41"
32
32
  },
33
33
  "peerDependencies": {
34
- "@remnic/bench": "^9.69.40",
35
- "@remnic/plugin-openclaw": "^9.69.40",
36
- "@remnic/export-weclone": "^9.69.40",
37
- "@remnic/import-weclone": "^9.69.40",
38
- "@remnic/import-chatgpt": "^9.69.40",
39
- "@remnic/import-claude": "^9.69.40",
40
- "@remnic/import-gemini": "^9.69.40",
41
- "@remnic/import-lossless-claw": "^9.69.40",
42
- "@remnic/import-mem0": "^9.69.40",
43
- "@remnic/import-supermemory": "^9.69.40",
44
- "@remnic/import-okf": "^9.69.40",
45
- "@remnic/connector-limitless": "^9.69.40",
46
- "@remnic/connector-bee": "^9.69.40",
47
- "@remnic/connector-omi": "^9.69.40",
48
- "@remnic/capture-audio": "^9.69.40"
34
+ "@remnic/bench": "^9.69.41",
35
+ "@remnic/plugin-openclaw": "^9.69.41",
36
+ "@remnic/export-weclone": "^9.69.41",
37
+ "@remnic/import-weclone": "^9.69.41",
38
+ "@remnic/import-chatgpt": "^9.69.41",
39
+ "@remnic/import-claude": "^9.69.41",
40
+ "@remnic/import-gemini": "^9.69.41",
41
+ "@remnic/import-lossless-claw": "^9.69.41",
42
+ "@remnic/import-mem0": "^9.69.41",
43
+ "@remnic/import-supermemory": "^9.69.41",
44
+ "@remnic/import-okf": "^9.69.41",
45
+ "@remnic/connector-limitless": "^9.69.41",
46
+ "@remnic/connector-bee": "^9.69.41",
47
+ "@remnic/connector-omi": "^9.69.41",
48
+ "@remnic/capture-audio": "^9.69.41"
49
49
  },
50
50
  "peerDependenciesMeta": {
51
51
  "@remnic/bench": {
@@ -97,19 +97,19 @@
97
97
  "devDependencies": {
98
98
  "tsup": "^8.5.1",
99
99
  "typescript": "^5.9.3",
100
- "@remnic/bench": "9.69.40",
101
- "@remnic/plugin-openclaw": "9.69.40",
102
- "@remnic/export-weclone": "9.69.40",
103
- "@remnic/import-chatgpt": "9.69.40",
104
- "@remnic/import-gemini": "9.69.40",
105
- "@remnic/import-claude": "9.69.40",
106
- "@remnic/import-weclone": "9.69.40",
107
- "@remnic/import-lossless-claw": "9.69.40",
108
- "@remnic/import-mem0": "9.69.40",
109
- "@remnic/connector-limitless": "9.69.40",
110
- "@remnic/connector-bee": "9.69.40",
111
- "@remnic/connector-omi": "9.69.40",
112
- "@remnic/import-supermemory": "9.69.40"
100
+ "@remnic/plugin-openclaw": "9.69.41",
101
+ "@remnic/bench": "9.69.41",
102
+ "@remnic/export-weclone": "9.69.41",
103
+ "@remnic/import-gemini": "9.69.41",
104
+ "@remnic/import-weclone": "9.69.41",
105
+ "@remnic/import-claude": "9.69.41",
106
+ "@remnic/import-supermemory": "9.69.41",
107
+ "@remnic/import-lossless-claw": "9.69.41",
108
+ "@remnic/import-mem0": "9.69.41",
109
+ "@remnic/connector-limitless": "9.69.41",
110
+ "@remnic/import-chatgpt": "9.69.41",
111
+ "@remnic/connector-bee": "9.69.41",
112
+ "@remnic/connector-omi": "9.69.41"
113
113
  },
114
114
  "license": "MIT",
115
115
  "repository": {