@synkro-sh/cli 1.6.61 → 1.6.62
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 -6
- package/dist/bootstrap.js.map +1 -1
- package/package.json +1 -1
package/dist/bootstrap.js
CHANGED
|
@@ -9991,6 +9991,7 @@ __export(install_exports, {
|
|
|
9991
9991
|
parseArgs: () => parseArgs,
|
|
9992
9992
|
reconcileDeployLocation: () => reconcileDeployLocation,
|
|
9993
9993
|
reconcileHarness: () => reconcileHarness,
|
|
9994
|
+
recycleCloudContainer: () => recycleCloudContainer,
|
|
9994
9995
|
syncSkillFiles: () => syncSkillFiles,
|
|
9995
9996
|
writeHookScripts: () => writeHookScripts
|
|
9996
9997
|
});
|
|
@@ -10317,7 +10318,7 @@ function writeConfigEnv(opts) {
|
|
|
10317
10318
|
`SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
|
|
10318
10319
|
`SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
|
|
10319
10320
|
`SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
|
|
10320
|
-
`SYNKRO_VERSION=${shellQuoteSingle("1.6.
|
|
10321
|
+
`SYNKRO_VERSION=${shellQuoteSingle("1.6.62")}`
|
|
10321
10322
|
];
|
|
10322
10323
|
if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
|
|
10323
10324
|
if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
|
|
@@ -10495,7 +10496,7 @@ async function reconcileDeployLocation() {
|
|
|
10495
10496
|
const sf = readFullSynkroFile();
|
|
10496
10497
|
const desired = sf?.grader.location === "cloud" ? "cloud" : "local";
|
|
10497
10498
|
const current = readPersistedDeployLocation();
|
|
10498
|
-
if (desired === current) return desired;
|
|
10499
|
+
if (desired === current) return { location: desired, changed: false };
|
|
10499
10500
|
const hasClaudeCode = sf ? sf.harness.includes("claude-code") : true;
|
|
10500
10501
|
const hasCursor = sf ? sf.harness.includes("cursor") : false;
|
|
10501
10502
|
console.log(`
|
|
@@ -10548,7 +10549,29 @@ synkro.toml: deploy location changed ${current} \u2192 ${desired}
|
|
|
10548
10549
|
await applyMcpConfig({ gatewayUrl, jwt: token, hasClaudeCode, hasCursor, local: true });
|
|
10549
10550
|
console.log(" \u2713 switched to local \u2014 bringing the local grader + MCP up\n");
|
|
10550
10551
|
}
|
|
10551
|
-
return desired;
|
|
10552
|
+
return { location: desired, changed: true };
|
|
10553
|
+
}
|
|
10554
|
+
async function recycleCloudContainer() {
|
|
10555
|
+
if (!isAuthenticated()) {
|
|
10556
|
+
console.error("Not authenticated \u2014 run `synkro login`.");
|
|
10557
|
+
return;
|
|
10558
|
+
}
|
|
10559
|
+
await ensureValidToken();
|
|
10560
|
+
const token = getAccessToken();
|
|
10561
|
+
if (!token) {
|
|
10562
|
+
console.error("No access token \u2014 run `synkro login`.");
|
|
10563
|
+
return;
|
|
10564
|
+
}
|
|
10565
|
+
const base = (process.env.SYNKRO_CONTAINERS_URL || "https://containers.synkro.sh").replace(/\/$/, "");
|
|
10566
|
+
console.log("Synkro: recycling the cloud grader container (destroy \u2192 fresh boot)\u2026");
|
|
10567
|
+
try {
|
|
10568
|
+
const r = await fetch(`${base}/recycle`, { method: "POST", headers: { Authorization: `Bearer ${token}` }, signal: AbortSignal.timeout(3e4) });
|
|
10569
|
+
if (r.ok) console.log(" \u2713 old container destroyed");
|
|
10570
|
+
else console.warn(` \u26A0 recycle returned HTTP ${r.status} \u2014 continuing to warm anyway.`);
|
|
10571
|
+
} catch {
|
|
10572
|
+
console.warn(" \u26A0 recycle request failed (network) \u2014 continuing to warm anyway.");
|
|
10573
|
+
}
|
|
10574
|
+
await verifyCloudGrader(token);
|
|
10552
10575
|
}
|
|
10553
10576
|
function resolveDeploymentMode() {
|
|
10554
10577
|
const envOverride = process.env.SYNKRO_DEPLOYMENT_MODE?.toLowerCase();
|
|
@@ -13599,9 +13622,9 @@ async function updateCommand() {
|
|
|
13599
13622
|
console.log("\nSynkro updated \u2014 now running the latest version.");
|
|
13600
13623
|
}
|
|
13601
13624
|
async function restartCommand(rest = []) {
|
|
13602
|
-
const location = await reconcileDeployLocation();
|
|
13625
|
+
const { location, changed } = await reconcileDeployLocation();
|
|
13603
13626
|
if (location === "cloud") {
|
|
13604
|
-
|
|
13627
|
+
if (!changed) await recycleCloudContainer();
|
|
13605
13628
|
return;
|
|
13606
13629
|
}
|
|
13607
13630
|
assertDockerAvailable();
|
|
@@ -13813,7 +13836,7 @@ var args = process.argv.slice(2);
|
|
|
13813
13836
|
var cmd = args[0] || "";
|
|
13814
13837
|
var subArgs = args.slice(1);
|
|
13815
13838
|
function printVersion() {
|
|
13816
|
-
console.log("1.6.
|
|
13839
|
+
console.log("1.6.62");
|
|
13817
13840
|
}
|
|
13818
13841
|
function printHelp2() {
|
|
13819
13842
|
console.log(`Synkro CLI \u2014 runtime safety for AI coding agents
|