@synkro-sh/cli 1.4.88 → 1.4.89

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
@@ -5353,6 +5353,18 @@ var init_macKeychain = __esm({
5353
5353
  });
5354
5354
 
5355
5355
  // cli/local-cc/dockerInstall.ts
5356
+ var dockerInstall_exports = {};
5357
+ __export(dockerInstall_exports, {
5358
+ DockerInstallError: () => DockerInstallError,
5359
+ SYNKRO_DIR: () => SYNKRO_DIR3,
5360
+ assertDockerAvailable: () => assertDockerAvailable,
5361
+ dockerInstall: () => dockerInstall,
5362
+ dockerStatus: () => dockerStatus,
5363
+ dockerStop: () => dockerStop,
5364
+ dockerUpdate: () => dockerUpdate,
5365
+ imageTag: () => imageTag,
5366
+ waitForContainerReady: () => waitForContainerReady
5367
+ });
5356
5368
  import { existsSync as existsSync8, mkdirSync as mkdirSync7 } from "fs";
5357
5369
  import { homedir as homedir7 } from "os";
5358
5370
  import { join as join7 } from "path";
@@ -5459,6 +5471,10 @@ function dockerStop() {
5459
5471
  spawnSync2("docker", ["stop", CONTAINER_NAME], { encoding: "utf-8", timeout: 3e4 });
5460
5472
  spawnSync2("docker", ["rm", "-f", CONTAINER_NAME], { encoding: "utf-8", timeout: 3e4 });
5461
5473
  }
5474
+ async function dockerUpdate(workersPerPool) {
5475
+ dockerStop();
5476
+ await dockerInstall({ workersPerPool });
5477
+ }
5462
5478
  function dockerStatus() {
5463
5479
  const r = spawnSync2("docker", ["inspect", "--format", "{{.State.Status}}", CONTAINER_NAME], {
5464
5480
  encoding: "utf-8",
@@ -5642,7 +5658,7 @@ function writeConfigEnv(opts) {
5642
5658
  `SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
5643
5659
  `SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
5644
5660
  `SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
5645
- `SYNKRO_VERSION=${shellQuoteSingle("1.4.88")}`
5661
+ `SYNKRO_VERSION=${shellQuoteSingle("1.4.89")}`
5646
5662
  ];
5647
5663
  if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
5648
5664
  if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
@@ -6080,24 +6096,29 @@ async function installCommand(opts = {}) {
6080
6096
  }
6081
6097
  console.log();
6082
6098
  if (profile.localInference) {
6099
+ const { assertDockerAvailable: assertDockerAvailable2 } = await Promise.resolve().then(() => (init_dockerInstall(), dockerInstall_exports));
6083
6100
  try {
6084
- console.log("Installing Synkro server container...");
6085
- const workersPerPool = parseInt(process.env.SYNKRO_WORKERS_PER_POOL || "4", 10);
6086
- const { image, hostMcpPort, hostGraderPort, hostCwePort } = await dockerInstall({ workersPerPool });
6087
- console.log(` pulled ${image}`);
6088
- console.log(` container started \u2014 MCP=${hostMcpPort} general=${hostGraderPort} CWE=${hostCwePort}`);
6089
- console.log(" waiting for container /healthz...");
6090
- const ready = await waitForContainerReady(6e4);
6091
- if (ready) {
6092
- console.log(" \u2713 container ready");
6093
- } else {
6094
- console.warn(" \u26A0 container did not become healthy within 60s \u2014 check `docker logs synkro-server`");
6095
- }
6096
- console.log();
6101
+ assertDockerAvailable2();
6097
6102
  } catch (err) {
6098
- console.warn(` \u26A0 Docker install failed: ${err.message}
6099
- `);
6103
+ console.error(`
6104
+ \u2717 ${err.message}`);
6105
+ process.exit(1);
6100
6106
  }
6107
+ console.log("Installing Synkro server container...");
6108
+ const workersPerPool = parseInt(process.env.SYNKRO_WORKERS_PER_POOL || "4", 10);
6109
+ const { image, hostMcpPort, hostGraderPort, hostCwePort } = await dockerInstall({ workersPerPool });
6110
+ console.log(` \u2713 pulled ${image}`);
6111
+ console.log(` container started \u2014 MCP=${hostMcpPort} general=${hostGraderPort} CWE=${hostCwePort}`);
6112
+ console.log(" waiting for container to be ready...");
6113
+ const ready = await waitForContainerReady(6e4);
6114
+ if (ready) {
6115
+ console.log(" \u2713 container ready");
6116
+ } else {
6117
+ console.error(" \u2717 container did not become healthy within 60s");
6118
+ console.error(" Run `docker logs synkro-server` to debug.");
6119
+ process.exit(1);
6120
+ }
6121
+ console.log();
6101
6122
  }
6102
6123
  if (transcriptConsent) {
6103
6124
  try {
@@ -7177,7 +7198,7 @@ var args = process.argv.slice(2);
7177
7198
  var cmd = args[0] || "";
7178
7199
  var subArgs = args.slice(1);
7179
7200
  function printVersion() {
7180
- console.log("1.4.88");
7201
+ console.log("1.4.89");
7181
7202
  }
7182
7203
  function printHelp() {
7183
7204
  console.log(`Synkro CLI \u2014 runtime safety for AI coding agents