@synkro-sh/cli 1.6.63 → 1.6.65
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 +48 -9
- package/dist/bootstrap.js.map +1 -1
- package/package.json +1 -1
package/dist/bootstrap.js
CHANGED
|
@@ -10318,7 +10318,7 @@ function writeConfigEnv(opts) {
|
|
|
10318
10318
|
`SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
|
|
10319
10319
|
`SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
|
|
10320
10320
|
`SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
|
|
10321
|
-
`SYNKRO_VERSION=${shellQuoteSingle("1.6.
|
|
10321
|
+
`SYNKRO_VERSION=${shellQuoteSingle("1.6.65")}`
|
|
10322
10322
|
];
|
|
10323
10323
|
if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
|
|
10324
10324
|
if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
|
|
@@ -10398,6 +10398,30 @@ async function provisionCloudContainer(opts) {
|
|
|
10398
10398
|
setupToken = "";
|
|
10399
10399
|
}
|
|
10400
10400
|
}
|
|
10401
|
+
async function printWorkerDebug(base, jwt2) {
|
|
10402
|
+
try {
|
|
10403
|
+
console.warn(" \u2500\u2500 container worker logs (the actual claude error) \u2500\u2500");
|
|
10404
|
+
const r = await fetch(`${base}/debug`, { headers: { Authorization: `Bearer ${jwt2}` }, signal: AbortSignal.timeout(9e4) });
|
|
10405
|
+
const d = await r.json().catch(() => null);
|
|
10406
|
+
if (!d || !Array.isArray(d.workers)) {
|
|
10407
|
+
console.warn(` (worker debug unavailable: HTTP ${r.status})
|
|
10408
|
+
`);
|
|
10409
|
+
return;
|
|
10410
|
+
}
|
|
10411
|
+
for (const w of d.workers) {
|
|
10412
|
+
const lines = String(w.logTail || "").split("\n").filter((l) => l.trim()).slice(-14);
|
|
10413
|
+
console.warn(` [${w.worker}]`);
|
|
10414
|
+
for (const l of lines) console.warn(" " + l.slice(0, 240));
|
|
10415
|
+
}
|
|
10416
|
+
if (Array.isArray(d.sick_pool) && d.sick_pool.length) {
|
|
10417
|
+
console.warn(" sick workers:");
|
|
10418
|
+
for (const s of d.sick_pool) console.warn(` ${s.kind}: ${s.sickReason || "(no reason)"}`);
|
|
10419
|
+
}
|
|
10420
|
+
console.warn("");
|
|
10421
|
+
} catch {
|
|
10422
|
+
console.warn(" (could not fetch worker debug)\n");
|
|
10423
|
+
}
|
|
10424
|
+
}
|
|
10401
10425
|
async function verifyCloudGrader(jwt2) {
|
|
10402
10426
|
const base = (process.env.SYNKRO_CONTAINERS_URL || "https://containers.synkro.sh").replace(/\/$/, "");
|
|
10403
10427
|
console.log(" Warming the cloud grader (booting container + checking workers)...");
|
|
@@ -10429,18 +10453,33 @@ async function verifyCloudGrader(jwt2) {
|
|
|
10429
10453
|
body: JSON.stringify({ role: "grade-edit", payload: probe, content: probe, agent_kind: "claude_code" }),
|
|
10430
10454
|
signal: AbortSignal.timeout(12e4)
|
|
10431
10455
|
});
|
|
10432
|
-
const
|
|
10456
|
+
const raw = await r.text();
|
|
10457
|
+
let body = {};
|
|
10458
|
+
try {
|
|
10459
|
+
body = JSON.parse(raw);
|
|
10460
|
+
} catch {
|
|
10461
|
+
}
|
|
10433
10462
|
if (r.ok && typeof body.result === "string" && body.result.includes("<synkro-verdict>")) {
|
|
10434
10463
|
console.log(" \u2713 smoke grade passed \u2014 cloud grading is live\n");
|
|
10435
10464
|
return true;
|
|
10436
10465
|
}
|
|
10437
|
-
|
|
10438
|
-
console.warn(
|
|
10439
|
-
|
|
10466
|
+
const detail = (body.error || raw || "").trim().slice(0, 300) || "(empty response)";
|
|
10467
|
+
console.warn(` \u2717 smoke grade FAILED (HTTP ${r.status}): ${detail}`);
|
|
10468
|
+
if (/no grader worker ready/i.test(detail)) {
|
|
10469
|
+
console.warn(" \u2192 the worker pool never registered (cold-start, or the pool failed to boot).");
|
|
10470
|
+
} else if (/connection lost|network|502/i.test(detail)) {
|
|
10471
|
+
console.warn(" \u2192 the container dropped the connection mid-grade \u2014 the claude worker crashed or hung (most often a bad/expired setup-token).");
|
|
10472
|
+
} else {
|
|
10473
|
+
console.warn(" \u2192 the worker returned an error; most often a bad/expired Claude setup-token.");
|
|
10474
|
+
}
|
|
10475
|
+
console.warn(" Re-run `synkro install` \u2192 cloud to re-authorize the hosted worker.\n");
|
|
10476
|
+
await printWorkerDebug(base, jwt2);
|
|
10440
10477
|
return false;
|
|
10441
|
-
} catch {
|
|
10442
|
-
|
|
10443
|
-
console.warn(
|
|
10478
|
+
} catch (e) {
|
|
10479
|
+
const reason = e?.name === "TimeoutError" ? "the grade never returned within 120s (worker hung \u2014 usually claude auth)" : `the request failed (${e?.message || "network"})`;
|
|
10480
|
+
console.warn(` \u2717 smoke grade FAILED: ${reason}.`);
|
|
10481
|
+
console.warn(" The container is provisioned but a grade does not complete; re-run `synkro install` \u2192 cloud.\n");
|
|
10482
|
+
await printWorkerDebug(base, jwt2);
|
|
10444
10483
|
return false;
|
|
10445
10484
|
}
|
|
10446
10485
|
}
|
|
@@ -13849,7 +13888,7 @@ var args = process.argv.slice(2);
|
|
|
13849
13888
|
var cmd = args[0] || "";
|
|
13850
13889
|
var subArgs = args.slice(1);
|
|
13851
13890
|
function printVersion() {
|
|
13852
|
-
console.log("1.6.
|
|
13891
|
+
console.log("1.6.65");
|
|
13853
13892
|
}
|
|
13854
13893
|
function printHelp2() {
|
|
13855
13894
|
console.log(`Synkro CLI \u2014 runtime safety for AI coding agents
|