ccsini 0.1.42 → 0.1.44
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 +28 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -27882,6 +27882,7 @@ var init_constants = __esm(() => {
|
|
|
27882
27882
|
session: ["projects/**/*.jsonl"],
|
|
27883
27883
|
memory: ["projects/*/memory/**/*"],
|
|
27884
27884
|
skill: ["skills/**/*"],
|
|
27885
|
+
plugin: ["plugins/**/*"],
|
|
27885
27886
|
command: ["commands/**/*"],
|
|
27886
27887
|
plan: ["plans/**/*"],
|
|
27887
27888
|
config: ["settings.json"],
|
|
@@ -27895,6 +27896,7 @@ var init_constants = __esm(() => {
|
|
|
27895
27896
|
session: "append-dedup",
|
|
27896
27897
|
memory: "append-sections",
|
|
27897
27898
|
skill: "content-hash",
|
|
27899
|
+
plugin: "content-hash",
|
|
27898
27900
|
command: "content-hash",
|
|
27899
27901
|
plan: "merge-by-id",
|
|
27900
27902
|
config: "last-write-wins",
|
|
@@ -27920,7 +27922,6 @@ var init_constants = __esm(() => {
|
|
|
27920
27922
|
"**/node_modules/**",
|
|
27921
27923
|
"**/cache/**",
|
|
27922
27924
|
"**/tool-results/**",
|
|
27923
|
-
"plugins/**",
|
|
27924
27925
|
"plans/**",
|
|
27925
27926
|
"todos/**",
|
|
27926
27927
|
"tasks/**",
|
|
@@ -27929,6 +27930,7 @@ var init_constants = __esm(() => {
|
|
|
27929
27930
|
"**/dist/**",
|
|
27930
27931
|
"**/.git/**",
|
|
27931
27932
|
"**/*.bak",
|
|
27933
|
+
"**/*.conflict",
|
|
27932
27934
|
"settings.*.json",
|
|
27933
27935
|
"history.jsonl"
|
|
27934
27936
|
];
|
|
@@ -28018,7 +28020,7 @@ var {
|
|
|
28018
28020
|
} = import__.default;
|
|
28019
28021
|
|
|
28020
28022
|
// src/version.ts
|
|
28021
|
-
var VERSION = "0.1.
|
|
28023
|
+
var VERSION = "0.1.44";
|
|
28022
28024
|
|
|
28023
28025
|
// src/commands/init.ts
|
|
28024
28026
|
init_source();
|
|
@@ -29377,6 +29379,24 @@ async function pushSync(client, masterKey, deviceName, configDir, onProgress, se
|
|
|
29377
29379
|
const diffs = diffManifests(localManifest, remoteManifest);
|
|
29378
29380
|
const toPush = diffs.filter((d) => d.action === "push" || d.action === "merge");
|
|
29379
29381
|
progress(`${toPush.length} files to push`);
|
|
29382
|
+
if (remoteManifest) {
|
|
29383
|
+
const merges = toPush.filter((d) => d.action === "merge" && d.remoteHash);
|
|
29384
|
+
for (const diff of merges) {
|
|
29385
|
+
try {
|
|
29386
|
+
let encrypted;
|
|
29387
|
+
try {
|
|
29388
|
+
encrypted = await client.downloadBlob(blobKey(diff.path, diff.remoteHash));
|
|
29389
|
+
} catch {
|
|
29390
|
+
encrypted = await client.downloadBlob(diff.remoteHash);
|
|
29391
|
+
}
|
|
29392
|
+
const decrypted = decryptFile(masterKey, diff.path, encrypted);
|
|
29393
|
+
const conflictPath = join6(claudeDir, `${diff.path}.conflict`);
|
|
29394
|
+
await mkdir2(dirname(conflictPath), { recursive: true });
|
|
29395
|
+
await writeFile5(conflictPath, decrypted);
|
|
29396
|
+
progress(`Saved conflict backup: ${diff.path}.conflict`);
|
|
29397
|
+
} catch {}
|
|
29398
|
+
}
|
|
29399
|
+
}
|
|
29380
29400
|
let uploaded = 0;
|
|
29381
29401
|
const failedPaths = new Set;
|
|
29382
29402
|
const chunks = chunkArray(toPush, MAX_CONCURRENT_TRANSFERS);
|
|
@@ -29504,11 +29524,16 @@ async function pullSync(client, masterKey, deviceName, configDir, onProgress, se
|
|
|
29504
29524
|
if (localEntry && entry) {
|
|
29505
29525
|
const result = mergeLastWriteWins(localContent, remoteContent, localEntry.modified, entry.modified);
|
|
29506
29526
|
await writeFile5(localPath2, result.content);
|
|
29507
|
-
await writeFile5(`${localPath2}.
|
|
29527
|
+
await writeFile5(`${localPath2}.conflict`, result.backupContent);
|
|
29508
29528
|
downloaded++;
|
|
29509
29529
|
progress(`Downloading ${downloaded}/${toPull.length}: ${diff.path}`);
|
|
29510
29530
|
return;
|
|
29511
29531
|
}
|
|
29532
|
+
await writeFile5(`${localPath2}.conflict`, localContent);
|
|
29533
|
+
await writeFile5(localPath2, remoteContent);
|
|
29534
|
+
downloaded++;
|
|
29535
|
+
progress(`Downloading ${downloaded}/${toPull.length}: ${diff.path} (conflict saved)`);
|
|
29536
|
+
return;
|
|
29512
29537
|
}
|
|
29513
29538
|
const localPath = join6(claudeDir, diff.path);
|
|
29514
29539
|
await mkdir2(dirname(localPath), { recursive: true });
|