@synkro-sh/cli 1.6.64 → 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 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.64")}`
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)...");
@@ -10449,11 +10473,13 @@ async function verifyCloudGrader(jwt2) {
10449
10473
  console.warn(" \u2192 the worker returned an error; most often a bad/expired Claude setup-token.");
10450
10474
  }
10451
10475
  console.warn(" Re-run `synkro install` \u2192 cloud to re-authorize the hosted worker.\n");
10476
+ await printWorkerDebug(base, jwt2);
10452
10477
  return false;
10453
10478
  } catch (e) {
10454
10479
  const reason = e?.name === "TimeoutError" ? "the grade never returned within 120s (worker hung \u2014 usually claude auth)" : `the request failed (${e?.message || "network"})`;
10455
10480
  console.warn(` \u2717 smoke grade FAILED: ${reason}.`);
10456
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);
10457
10483
  return false;
10458
10484
  }
10459
10485
  }
@@ -13862,7 +13888,7 @@ var args = process.argv.slice(2);
13862
13888
  var cmd = args[0] || "";
13863
13889
  var subArgs = args.slice(1);
13864
13890
  function printVersion() {
13865
- console.log("1.6.64");
13891
+ console.log("1.6.65");
13866
13892
  }
13867
13893
  function printHelp2() {
13868
13894
  console.log(`Synkro CLI \u2014 runtime safety for AI coding agents