cortex-sync 0.4.5 → 0.4.6
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/cli.js +19 -6
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1343,7 +1343,6 @@ Make sure Claude Code CLI is installed and "claude" is in your PATH.`
|
|
|
1343
1343
|
// src/commands/team/init.ts
|
|
1344
1344
|
import { input as input3, confirm as confirm3, select as select2, password as password5 } from "@inquirer/prompts";
|
|
1345
1345
|
import { writeFile as writeFile12, mkdir as mkdir11 } from "fs/promises";
|
|
1346
|
-
import { randomUUID } from "crypto";
|
|
1347
1346
|
import { join as join17 } from "path";
|
|
1348
1347
|
|
|
1349
1348
|
// src/lib/team-repo.ts
|
|
@@ -1646,7 +1645,7 @@ Cloning ${repoUrl} \u2192 ~/.cortex/team/`);
|
|
|
1646
1645
|
derived = deriveKey(teamPassphrase, repoUrl);
|
|
1647
1646
|
}
|
|
1648
1647
|
if (!identifyProject(process.cwd())) {
|
|
1649
|
-
await writeProjectConfig({ projectId:
|
|
1648
|
+
await writeProjectConfig({ projectId: repoUrl });
|
|
1650
1649
|
}
|
|
1651
1650
|
const count = await pushSessions(config.email, process.cwd(), derived);
|
|
1652
1651
|
if (count > 0) {
|
|
@@ -1661,7 +1660,6 @@ Cloning ${repoUrl} \u2192 ~/.cortex/team/`);
|
|
|
1661
1660
|
|
|
1662
1661
|
// src/commands/team/push.ts
|
|
1663
1662
|
import { writeFile as writeFile13, mkdir as mkdir12 } from "fs/promises";
|
|
1664
|
-
import { randomUUID as randomUUID2 } from "crypto";
|
|
1665
1663
|
import { join as join18 } from "path";
|
|
1666
1664
|
import { password as password6 } from "@inquirer/prompts";
|
|
1667
1665
|
async function teamPushCommand() {
|
|
@@ -1692,7 +1690,7 @@ async function teamPushCommand() {
|
|
|
1692
1690
|
);
|
|
1693
1691
|
if (shareSession) {
|
|
1694
1692
|
if (!identifyProject(process.cwd())) {
|
|
1695
|
-
await writeProjectConfig({ projectId:
|
|
1693
|
+
await writeProjectConfig({ projectId: repoUrl });
|
|
1696
1694
|
}
|
|
1697
1695
|
let derived;
|
|
1698
1696
|
if (encryptSessions) {
|
|
@@ -1839,6 +1837,7 @@ async function teamPullCommand() {
|
|
|
1839
1837
|
// src/commands/install.ts
|
|
1840
1838
|
import { readFile as readFile15 } from "fs/promises";
|
|
1841
1839
|
import { join as join20 } from "path";
|
|
1840
|
+
import { password as password8 } from "@inquirer/prompts";
|
|
1842
1841
|
async function installCommand(opts) {
|
|
1843
1842
|
let config;
|
|
1844
1843
|
try {
|
|
@@ -1877,8 +1876,22 @@ async function installCommand(opts) {
|
|
|
1877
1876
|
console.warn(` \u26A0 Could not install ${pluginId}: ${e.message}`);
|
|
1878
1877
|
}
|
|
1879
1878
|
}
|
|
1880
|
-
await writeProjectConfig({ repo: repoUrl });
|
|
1881
|
-
|
|
1879
|
+
await writeProjectConfig({ repo: repoUrl, projectId: repoUrl });
|
|
1880
|
+
let derived;
|
|
1881
|
+
const { encryptSessions } = await readProjectConfig();
|
|
1882
|
+
if (encryptSessions) {
|
|
1883
|
+
const teamPassphrase = await password8({
|
|
1884
|
+
message: "Team passphrase (to decrypt sessions):",
|
|
1885
|
+
mask: "*",
|
|
1886
|
+
validate: (v) => v.length >= 12 || "Minimum 12 characters"
|
|
1887
|
+
});
|
|
1888
|
+
derived = deriveKey(teamPassphrase, repoUrl);
|
|
1889
|
+
}
|
|
1890
|
+
const sessionCount = await pullSessions(process.cwd(), derived);
|
|
1891
|
+
if (sessionCount > 0) {
|
|
1892
|
+
console.log(` + ${sessionCount} sessions installed`);
|
|
1893
|
+
}
|
|
1894
|
+
console.log("\n\u2713 Team context installed. Restart Claude Code to activate.");
|
|
1882
1895
|
}
|
|
1883
1896
|
|
|
1884
1897
|
// src/cli.ts
|