@remnic/cli 9.69.31 → 9.69.33
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/dist/index.js +15 -6
- package/package.json +32 -32
package/dist/index.js
CHANGED
|
@@ -2646,6 +2646,10 @@ async function computeConvergePlan(options = {}) {
|
|
|
2646
2646
|
return collapseActiveFactDuplicates(plan, localManifests, peerManifests, semanticAgreementMap);
|
|
2647
2647
|
}
|
|
2648
2648
|
async function executeConvergeApply(options = {}) {
|
|
2649
|
+
const rawConcurrency = Number(process.env.REMNIC_CONVERGE_TRANSFER_CONCURRENCY ?? 8);
|
|
2650
|
+
if (!Number.isInteger(rawConcurrency) || rawConcurrency < 1) {
|
|
2651
|
+
throw new Error("converge: REMNIC_CONVERGE_TRANSFER_CONCURRENCY must be a positive integer");
|
|
2652
|
+
}
|
|
2649
2653
|
const conflictPolicy = options.conflictPolicy ?? options.config?.converge.conflictPolicy ?? DEFAULT_CONVERGE_CONFLICT_POLICY;
|
|
2650
2654
|
const plan = await computeConvergePlan({ ...options, conflictPolicy });
|
|
2651
2655
|
if (plan.converged && !options.dryRun) {
|
|
@@ -2727,8 +2731,7 @@ async function executeConvergeApply(options = {}) {
|
|
|
2727
2731
|
} catch {
|
|
2728
2732
|
}
|
|
2729
2733
|
}
|
|
2730
|
-
|
|
2731
|
-
if (entry.action === "identical") continue;
|
|
2734
|
+
const executeTransferEntry = async (entry) => {
|
|
2732
2735
|
let transferType = "none";
|
|
2733
2736
|
if (entry.action === "pull") {
|
|
2734
2737
|
transferType = "pull";
|
|
@@ -2769,7 +2772,7 @@ async function executeConvergeApply(options = {}) {
|
|
|
2769
2772
|
}
|
|
2770
2773
|
if (!remoteFile || entry.peerSha256 && remoteFile.sha256 !== entry.peerSha256) {
|
|
2771
2774
|
actualTransfers.failed += 1;
|
|
2772
|
-
|
|
2775
|
+
return;
|
|
2773
2776
|
}
|
|
2774
2777
|
let namespaceFiles = options.localFileBuffers.get(entry.namespace);
|
|
2775
2778
|
if (!namespaceFiles) {
|
|
@@ -2779,12 +2782,12 @@ async function executeConvergeApply(options = {}) {
|
|
|
2779
2782
|
namespaceFiles.set(localPath, remoteFile.content);
|
|
2780
2783
|
if (entry.action === "conflict") actualTransfers.conflictsResolved += 1;
|
|
2781
2784
|
else actualTransfers.pulled += 1;
|
|
2782
|
-
|
|
2785
|
+
return;
|
|
2783
2786
|
}
|
|
2784
2787
|
const rootDir = rootMap.get(entry.namespace);
|
|
2785
2788
|
if (!rootDir) {
|
|
2786
2789
|
actualTransfers.failed += 1;
|
|
2787
|
-
|
|
2790
|
+
return;
|
|
2788
2791
|
}
|
|
2789
2792
|
const io = await createOfflineStorageIo(rootDir);
|
|
2790
2793
|
const expectedLocalSha256 = entry.action === "conflict" ? entry.localSha256 : entry.baseSha256;
|
|
@@ -2902,7 +2905,7 @@ async function executeConvergeApply(options = {}) {
|
|
|
2902
2905
|
while (chunkOffset < offset) {
|
|
2903
2906
|
const skipped = await chunks.next();
|
|
2904
2907
|
if (skipped.done || chunkOffset + skipped.value.length > offset) {
|
|
2905
|
-
throw new Error(`
|
|
2908
|
+
throw new Error(`upload resume failed at ${offset}: ${localPath}`);
|
|
2906
2909
|
}
|
|
2907
2910
|
chunkOffset += skipped.value.length;
|
|
2908
2911
|
}
|
|
@@ -3060,6 +3063,12 @@ async function executeConvergeApply(options = {}) {
|
|
|
3060
3063
|
if (suppressed) actualTransfers.suppressed += 1;
|
|
3061
3064
|
else actualTransfers.failed += 1;
|
|
3062
3065
|
}
|
|
3066
|
+
};
|
|
3067
|
+
const TRANSFER_BATCH_SIZE = rawConcurrency;
|
|
3068
|
+
const actionable = plan.entries.filter((entry) => entry.action !== "identical");
|
|
3069
|
+
for (let i = 0; i < actionable.length; i += TRANSFER_BATCH_SIZE) {
|
|
3070
|
+
const batch = actionable.slice(i, i + TRANSFER_BATCH_SIZE);
|
|
3071
|
+
await Promise.all(batch.map((entry) => executeTransferEntry(entry)));
|
|
3063
3072
|
}
|
|
3064
3073
|
if (options.peerUrl && peerMutatedNamespaces.size > 0) {
|
|
3065
3074
|
const namespaces = [...peerMutatedNamespaces].sort();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/cli",
|
|
3
|
-
"version": "9.69.
|
|
3
|
+
"version": "9.69.33",
|
|
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/server": "^9.69.
|
|
30
|
-
"@remnic/
|
|
31
|
-
"@remnic/
|
|
29
|
+
"@remnic/server": "^9.69.33",
|
|
30
|
+
"@remnic/plugin-pi": "^9.69.33",
|
|
31
|
+
"@remnic/core": "^9.69.33"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@remnic/bench": "^9.69.
|
|
35
|
-
"@remnic/plugin-openclaw": "^9.69.
|
|
36
|
-
"@remnic/export-weclone": "^9.69.
|
|
37
|
-
"@remnic/import-weclone": "^9.69.
|
|
38
|
-
"@remnic/import-chatgpt": "^9.69.
|
|
39
|
-
"@remnic/import-claude": "^9.69.
|
|
40
|
-
"@remnic/import-gemini": "^9.69.
|
|
41
|
-
"@remnic/import-lossless-claw": "^9.69.
|
|
42
|
-
"@remnic/import-mem0": "^9.69.
|
|
43
|
-
"@remnic/import-supermemory": "^9.69.
|
|
44
|
-
"@remnic/import-okf": "^9.69.
|
|
45
|
-
"@remnic/connector-limitless": "^9.69.
|
|
46
|
-
"@remnic/connector-bee": "^9.69.
|
|
47
|
-
"@remnic/connector-omi": "^9.69.
|
|
48
|
-
"@remnic/capture-audio": "^9.69.
|
|
34
|
+
"@remnic/bench": "^9.69.33",
|
|
35
|
+
"@remnic/plugin-openclaw": "^9.69.33",
|
|
36
|
+
"@remnic/export-weclone": "^9.69.33",
|
|
37
|
+
"@remnic/import-weclone": "^9.69.33",
|
|
38
|
+
"@remnic/import-chatgpt": "^9.69.33",
|
|
39
|
+
"@remnic/import-claude": "^9.69.33",
|
|
40
|
+
"@remnic/import-gemini": "^9.69.33",
|
|
41
|
+
"@remnic/import-lossless-claw": "^9.69.33",
|
|
42
|
+
"@remnic/import-mem0": "^9.69.33",
|
|
43
|
+
"@remnic/import-supermemory": "^9.69.33",
|
|
44
|
+
"@remnic/import-okf": "^9.69.33",
|
|
45
|
+
"@remnic/connector-limitless": "^9.69.33",
|
|
46
|
+
"@remnic/connector-bee": "^9.69.33",
|
|
47
|
+
"@remnic/connector-omi": "^9.69.33",
|
|
48
|
+
"@remnic/capture-audio": "^9.69.33"
|
|
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.
|
|
101
|
-
"@remnic/plugin-openclaw": "9.69.
|
|
102
|
-
"@remnic/export-weclone": "9.69.
|
|
103
|
-
"@remnic/import-weclone": "9.69.
|
|
104
|
-
"@remnic/import-
|
|
105
|
-
"@remnic/import-
|
|
106
|
-
"@remnic/import-lossless-claw": "9.69.
|
|
107
|
-
"@remnic/
|
|
108
|
-
"@remnic/import-
|
|
109
|
-
"@remnic/import-
|
|
110
|
-
"@remnic/
|
|
111
|
-
"@remnic/connector-
|
|
112
|
-
"@remnic/connector-omi": "9.69.
|
|
100
|
+
"@remnic/bench": "9.69.33",
|
|
101
|
+
"@remnic/plugin-openclaw": "9.69.33",
|
|
102
|
+
"@remnic/export-weclone": "9.69.33",
|
|
103
|
+
"@remnic/import-weclone": "9.69.33",
|
|
104
|
+
"@remnic/import-chatgpt": "9.69.33",
|
|
105
|
+
"@remnic/import-gemini": "9.69.33",
|
|
106
|
+
"@remnic/import-lossless-claw": "9.69.33",
|
|
107
|
+
"@remnic/import-supermemory": "9.69.33",
|
|
108
|
+
"@remnic/import-mem0": "9.69.33",
|
|
109
|
+
"@remnic/import-claude": "9.69.33",
|
|
110
|
+
"@remnic/connector-bee": "9.69.33",
|
|
111
|
+
"@remnic/connector-limitless": "9.69.33",
|
|
112
|
+
"@remnic/connector-omi": "9.69.33"
|
|
113
113
|
},
|
|
114
114
|
"license": "MIT",
|
|
115
115
|
"repository": {
|