@synkro-sh/cli 1.6.37 → 1.6.38
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 +32 -5
- package/dist/bootstrap.js.map +1 -1
- package/package.json +1 -1
package/dist/bootstrap.js
CHANGED
|
@@ -7100,7 +7100,8 @@ __export(dockerInstall_exports, {
|
|
|
7100
7100
|
readContainerConfig: () => readContainerConfig,
|
|
7101
7101
|
resolveWorkerConfig: () => resolveWorkerConfig,
|
|
7102
7102
|
splitWorkers: () => splitWorkers,
|
|
7103
|
-
waitForContainerReady: () => waitForContainerReady
|
|
7103
|
+
waitForContainerReady: () => waitForContainerReady,
|
|
7104
|
+
waitForWorkersReady: () => waitForWorkersReady
|
|
7104
7105
|
});
|
|
7105
7106
|
import { copyFileSync, existsSync as existsSync8, mkdirSync as mkdirSync7, readFileSync as readFileSync6, readdirSync as readdirSync2 } from "fs";
|
|
7106
7107
|
import { homedir as homedir6 } from "os";
|
|
@@ -7427,6 +7428,22 @@ async function waitForContainerReady(timeoutMs = 6e4) {
|
|
|
7427
7428
|
}
|
|
7428
7429
|
return false;
|
|
7429
7430
|
}
|
|
7431
|
+
async function waitForWorkersReady(timeoutMs = 6e4) {
|
|
7432
|
+
const start = Date.now();
|
|
7433
|
+
const url = `http://127.0.0.1:${HOST_GRADER_PORT}/healthz`;
|
|
7434
|
+
while (Date.now() - start < timeoutMs) {
|
|
7435
|
+
try {
|
|
7436
|
+
const r = await fetch(url, { signal: AbortSignal.timeout(2e3) });
|
|
7437
|
+
if (r.ok) {
|
|
7438
|
+
const data = await r.json();
|
|
7439
|
+
if ((data.healthy || 0) > 0) return true;
|
|
7440
|
+
}
|
|
7441
|
+
} catch {
|
|
7442
|
+
}
|
|
7443
|
+
await new Promise((r) => setTimeout(r, 1e3));
|
|
7444
|
+
}
|
|
7445
|
+
return false;
|
|
7446
|
+
}
|
|
7430
7447
|
function dockerRemove() {
|
|
7431
7448
|
spawnSync2("docker", ["rm", CONTAINER_NAME], { encoding: "utf-8", timeout: 3e4 });
|
|
7432
7449
|
}
|
|
@@ -8244,7 +8261,7 @@ function writeConfigEnv(opts) {
|
|
|
8244
8261
|
`SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
|
|
8245
8262
|
`SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
|
|
8246
8263
|
`SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
|
|
8247
|
-
`SYNKRO_VERSION=${shellQuoteSingle("1.6.
|
|
8264
|
+
`SYNKRO_VERSION=${shellQuoteSingle("1.6.38")}`
|
|
8248
8265
|
];
|
|
8249
8266
|
if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
|
|
8250
8267
|
if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
|
|
@@ -8704,7 +8721,13 @@ async function installCommand(opts = {}) {
|
|
|
8704
8721
|
} catch {
|
|
8705
8722
|
console.warn(" \u26A0 ingest endpoint unreachable \u2014 telemetry spool may not drain.");
|
|
8706
8723
|
}
|
|
8707
|
-
await
|
|
8724
|
+
const workersUp = await waitForWorkersReady(3e4);
|
|
8725
|
+
if (workersUp) {
|
|
8726
|
+
console.log(" \u2713 workers ready");
|
|
8727
|
+
await syncSkillFiles();
|
|
8728
|
+
} else {
|
|
8729
|
+
console.warn(" \u26A0 workers did not register within 30s \u2014 skill sync skipped");
|
|
8730
|
+
}
|
|
8708
8731
|
} else {
|
|
8709
8732
|
console.error(" \u2717 container did not become healthy within 60s");
|
|
8710
8733
|
console.error(" Run `docker logs synkro-server` to debug.");
|
|
@@ -10773,7 +10796,11 @@ async function cmdRestart(rest = []) {
|
|
|
10773
10796
|
await dockerUpdate({ claudeWorkers, cursorWorkers });
|
|
10774
10797
|
const ready = await waitForContainerReady(6e4);
|
|
10775
10798
|
console.log(ready ? "\u2713 container ready" : "\u26A0 container did not pass /healthz within 60s");
|
|
10776
|
-
if (ready)
|
|
10799
|
+
if (ready) {
|
|
10800
|
+
const workersUp = await waitForWorkersReady(3e4);
|
|
10801
|
+
console.log(workersUp ? "\u2713 workers ready" : "\u26A0 workers did not register within 30s");
|
|
10802
|
+
if (workersUp) await syncSkillFiles();
|
|
10803
|
+
}
|
|
10777
10804
|
return;
|
|
10778
10805
|
}
|
|
10779
10806
|
stopTask(CHANNEL_PRIMARY);
|
|
@@ -11292,7 +11319,7 @@ var args = process.argv.slice(2);
|
|
|
11292
11319
|
var cmd = args[0] || "";
|
|
11293
11320
|
var subArgs = args.slice(1);
|
|
11294
11321
|
function printVersion() {
|
|
11295
|
-
console.log("1.6.
|
|
11322
|
+
console.log("1.6.38");
|
|
11296
11323
|
}
|
|
11297
11324
|
function printHelp2() {
|
|
11298
11325
|
console.log(`Synkro CLI \u2014 runtime safety for AI coding agents
|