@synkro-sh/cli 1.6.67 → 1.6.68
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/bootstrap.js +29 -7
- package/dist/bootstrap.js.map +1 -1
- package/package.json +1 -1
package/dist/bootstrap.js
CHANGED
|
@@ -9638,12 +9638,25 @@ function captureClaudeSetupToken() {
|
|
|
9638
9638
|
let yellow = "";
|
|
9639
9639
|
let m;
|
|
9640
9640
|
while ((m = yellowRe.exec(raw)) !== null) yellow += m[1];
|
|
9641
|
-
const
|
|
9642
|
-
|
|
9641
|
+
const yMatch = yellow.replace(/\s/g, "").match(/sk-ant-oat01-[A-Za-z0-9_-]+/);
|
|
9642
|
+
let lineMatch = "";
|
|
9643
|
+
const clean = raw.replace(/\x1B\[[0-9;?]*[a-zA-Z]/g, "").replace(/\x1B\][^\x07]*\x07/g, "");
|
|
9644
|
+
const lines = clean.split("\n").map((l) => l.trim());
|
|
9645
|
+
for (let i = 0; i < lines.length; i++) {
|
|
9646
|
+
const idx = lines[i].indexOf("sk-ant-oat01-");
|
|
9647
|
+
if (idx < 0) continue;
|
|
9648
|
+
let tok = (lines[i].slice(idx).match(/^sk-ant-oat01-[A-Za-z0-9_-]*/) || [""])[0];
|
|
9649
|
+
for (let j = i + 1; j < lines.length && /^[A-Za-z0-9_-]+$/.test(lines[j]); j++) tok += lines[j];
|
|
9650
|
+
lineMatch = tok;
|
|
9651
|
+
break;
|
|
9652
|
+
}
|
|
9653
|
+
const candidates = [yMatch ? yMatch[0] : "", lineMatch].filter((t) => /^sk-ant-oat01-[A-Za-z0-9_-]{20,}$/.test(t));
|
|
9654
|
+
const best = candidates.sort((a, b) => b.length - a.length)[0];
|
|
9655
|
+
if (!best) {
|
|
9643
9656
|
reject(new Error(`Could not find token in claude setup-token output (file=${raw.length}b, yellow=${yellow.length}b)`));
|
|
9644
9657
|
return;
|
|
9645
9658
|
}
|
|
9646
|
-
resolve4(
|
|
9659
|
+
resolve4(best);
|
|
9647
9660
|
});
|
|
9648
9661
|
});
|
|
9649
9662
|
}
|
|
@@ -10318,7 +10331,7 @@ function writeConfigEnv(opts) {
|
|
|
10318
10331
|
`SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
|
|
10319
10332
|
`SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
|
|
10320
10333
|
`SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
|
|
10321
|
-
`SYNKRO_VERSION=${shellQuoteSingle("1.6.
|
|
10334
|
+
`SYNKRO_VERSION=${shellQuoteSingle("1.6.68")}`
|
|
10322
10335
|
];
|
|
10323
10336
|
if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
|
|
10324
10337
|
if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
|
|
@@ -11057,6 +11070,7 @@ async function installCommand(opts = {}) {
|
|
|
11057
11070
|
}
|
|
11058
11071
|
writeSynkroFileIfMissing({ hasClaudeCode, hasCursor, gradingMode, deployLocation });
|
|
11059
11072
|
console.log();
|
|
11073
|
+
let cloudGradeOk = null;
|
|
11060
11074
|
if (useLocalMcp) {
|
|
11061
11075
|
const { assertDockerAvailable: assertDockerAvailable2 } = await Promise.resolve().then(() => (init_dockerInstall(), dockerInstall_exports));
|
|
11062
11076
|
try {
|
|
@@ -11139,7 +11153,7 @@ async function installCommand(opts = {}) {
|
|
|
11139
11153
|
} else if (target === "cloud-container") {
|
|
11140
11154
|
if (hasCursor) await promptCursorApiKey(opts);
|
|
11141
11155
|
await provisionCloudContainer({ gatewayUrl, jwt: token, orgId, userId, email, hasClaudeCode, hasCursor });
|
|
11142
|
-
await verifyCloudGrader(token);
|
|
11156
|
+
cloudGradeOk = await verifyCloudGrader(token);
|
|
11143
11157
|
}
|
|
11144
11158
|
if (transcriptConsent) {
|
|
11145
11159
|
const repo = detectGitRepo2();
|
|
@@ -11228,7 +11242,15 @@ async function installCommand(opts = {}) {
|
|
|
11228
11242
|
const { setupGithubCommand: setupGithubCommand2 } = await Promise.resolve().then(() => (init_setupGithub(), setupGithub_exports));
|
|
11229
11243
|
await setupGithubCommand2({ nonInteractive: true, githubToken: ghToken });
|
|
11230
11244
|
}
|
|
11231
|
-
|
|
11245
|
+
if (cloudGradeOk === false) {
|
|
11246
|
+
console.error("");
|
|
11247
|
+
console.error("\u2717 Synkro installed, but the cloud grader is NOT working \u2014 grading will fail on your edits.");
|
|
11248
|
+
console.error(" The smoke grade above shows why (most often a bad/incomplete Claude setup-token \u2192 401).");
|
|
11249
|
+
console.error(" Re-run `synkro install` \u2192 cloud to re-authorize with a fresh token.");
|
|
11250
|
+
process.exitCode = 1;
|
|
11251
|
+
} else {
|
|
11252
|
+
console.log("\u2713 Synkro installed.");
|
|
11253
|
+
}
|
|
11232
11254
|
if (process.stdin.isTTY && claudeDesktopInstalled()) {
|
|
11233
11255
|
console.log("\n Claude Desktop detected \u2014 to monitor its conversations in your dashboard, run: synkro claude-desktop");
|
|
11234
11256
|
}
|
|
@@ -13897,7 +13919,7 @@ var args = process.argv.slice(2);
|
|
|
13897
13919
|
var cmd = args[0] || "";
|
|
13898
13920
|
var subArgs = args.slice(1);
|
|
13899
13921
|
function printVersion() {
|
|
13900
|
-
console.log("1.6.
|
|
13922
|
+
console.log("1.6.68");
|
|
13901
13923
|
}
|
|
13902
13924
|
function printHelp2() {
|
|
13903
13925
|
console.log(`Synkro CLI \u2014 runtime safety for AI coding agents
|