@synkro-sh/cli 1.4.100 → 1.4.101

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
@@ -5452,7 +5452,7 @@ __export(dockerInstall_exports, {
5452
5452
  imageTag: () => imageTag,
5453
5453
  waitForContainerReady: () => waitForContainerReady
5454
5454
  });
5455
- import { existsSync as existsSync8, mkdirSync as mkdirSync7 } from "fs";
5455
+ import { copyFileSync, existsSync as existsSync8, mkdirSync as mkdirSync7 } from "fs";
5456
5456
  import { homedir as homedir7 } from "os";
5457
5457
  import { join as join7 } from "path";
5458
5458
  import { spawnSync as spawnSync2 } from "child_process";
@@ -5481,6 +5481,11 @@ async function dockerInstall(opts = {}) {
5481
5481
  const image = imageTag();
5482
5482
  const workers = String(opts.workersPerPool ?? 8);
5483
5483
  mkdirSync7(PGDATA_PATH, { recursive: true });
5484
+ mkdirSync7(CLAUDE_HOST_STATE_DIR, { recursive: true });
5485
+ const hostClaudeJson = join7(homedir7(), ".claude.json");
5486
+ if (existsSync8(hostClaudeJson)) {
5487
+ copyFileSync(hostClaudeJson, CLAUDE_HOST_STATE_FILE);
5488
+ }
5484
5489
  if (!existsSync8(MCP_JWT_PATH)) {
5485
5490
  throw new DockerInstallError(
5486
5491
  `MCP JWT missing at ${MCP_JWT_PATH}. The installer should mint this before calling dockerInstall.`
@@ -5536,7 +5541,7 @@ async function dockerInstall(opts = {}) {
5536
5541
  "-v",
5537
5542
  `${join7(homedir7(), ".claude")}:/data/claude-host:ro`,
5538
5543
  "-v",
5539
- `${join7(homedir7(), ".claude.json")}:/home/synkro/.claude.json:rw`,
5544
+ `${CLAUDE_HOST_STATE_DIR}:/data/claude-host-state:ro`,
5540
5545
  "-e",
5541
5546
  `WORKERS_PER_POOL=${workers}`,
5542
5547
  image
@@ -5581,7 +5586,7 @@ function dockerStatus() {
5581
5586
  healthz: `http://127.0.0.1:${HOST_MCP_PORT}/`
5582
5587
  };
5583
5588
  }
5584
- var SYNKRO_DIR3, MCP_JWT_PATH, SYNKRO_CREDS_PATH, PGDATA_PATH, HOST_MCP_PORT, HOST_GRADER_PORT, HOST_CWE_PORT, HOST_PG_PORT, CONTAINER_NAME, DEFAULT_IMAGE, DockerInstallError;
5589
+ var SYNKRO_DIR3, MCP_JWT_PATH, SYNKRO_CREDS_PATH, PGDATA_PATH, CLAUDE_HOST_STATE_DIR, CLAUDE_HOST_STATE_FILE, HOST_MCP_PORT, HOST_GRADER_PORT, HOST_CWE_PORT, HOST_PG_PORT, CONTAINER_NAME, DEFAULT_IMAGE, DockerInstallError;
5585
5590
  var init_dockerInstall = __esm({
5586
5591
  "cli/local-cc/dockerInstall.ts"() {
5587
5592
  "use strict";
@@ -5590,6 +5595,8 @@ var init_dockerInstall = __esm({
5590
5595
  MCP_JWT_PATH = join7(SYNKRO_DIR3, ".mcp-jwt");
5591
5596
  SYNKRO_CREDS_PATH = join7(SYNKRO_DIR3, "credentials.json");
5592
5597
  PGDATA_PATH = join7(SYNKRO_DIR3, "pgdata");
5598
+ CLAUDE_HOST_STATE_DIR = join7(SYNKRO_DIR3, "claude-host-state");
5599
+ CLAUDE_HOST_STATE_FILE = join7(CLAUDE_HOST_STATE_DIR, ".claude.json");
5593
5600
  HOST_MCP_PORT = parseInt(process.env.SYNKRO_HOST_MCP_PORT || "18931", 10);
5594
5601
  HOST_GRADER_PORT = parseInt(process.env.SYNKRO_HOST_GRADER_PORT || "18929", 10);
5595
5602
  HOST_CWE_PORT = parseInt(process.env.SYNKRO_HOST_CWE_PORT || "18930", 10);
@@ -5739,7 +5746,7 @@ function writeConfigEnv(opts) {
5739
5746
  `SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
5740
5747
  `SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
5741
5748
  `SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
5742
- `SYNKRO_VERSION=${shellQuoteSingle("1.4.100")}`
5749
+ `SYNKRO_VERSION=${shellQuoteSingle("1.4.101")}`
5743
5750
  ];
5744
5751
  if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
5745
5752
  if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
@@ -6503,7 +6510,7 @@ rl.on('line', async (line) => {
6503
6510
  });
6504
6511
 
6505
6512
  // cli/local-cc/install.ts
6506
- import { existsSync as existsSync10, mkdirSync as mkdirSync9, writeFileSync as writeFileSync8, readFileSync as readFileSync8, chmodSync as chmodSync3, copyFileSync, renameSync as renameSync4, unlinkSync as unlinkSync4, openSync, fsyncSync, closeSync } from "fs";
6513
+ import { existsSync as existsSync10, mkdirSync as mkdirSync9, writeFileSync as writeFileSync8, readFileSync as readFileSync8, chmodSync as chmodSync3, copyFileSync as copyFileSync2, renameSync as renameSync4, unlinkSync as unlinkSync4, openSync, fsyncSync, closeSync } from "fs";
6507
6514
  import { join as join9 } from "path";
6508
6515
  import { homedir as homedir9 } from "os";
6509
6516
  import { spawnSync as spawnSync3 } from "child_process";
@@ -6540,7 +6547,7 @@ function safelyMutateClaudeJson(mutator) {
6540
6547
  err
6541
6548
  );
6542
6549
  }
6543
- copyFileSync(CLAUDE_JSON_PATH, CLAUDE_JSON_BACKUP_PATH);
6550
+ copyFileSync2(CLAUDE_JSON_PATH, CLAUDE_JSON_BACKUP_PATH);
6544
6551
  const tmpPath = `${CLAUDE_JSON_PATH}.synkro-tmp.${process.pid}`;
6545
6552
  try {
6546
6553
  writeFileSync8(tmpPath, newText, "utf-8");
@@ -6557,7 +6564,7 @@ function safelyMutateClaudeJson(mutator) {
6557
6564
  } catch {
6558
6565
  }
6559
6566
  try {
6560
- copyFileSync(CLAUDE_JSON_BACKUP_PATH, CLAUDE_JSON_PATH);
6567
+ copyFileSync2(CLAUDE_JSON_BACKUP_PATH, CLAUDE_JSON_PATH);
6561
6568
  } catch {
6562
6569
  }
6563
6570
  throw new LocalCCInstallError(
@@ -7175,7 +7182,7 @@ var args = process.argv.slice(2);
7175
7182
  var cmd = args[0] || "";
7176
7183
  var subArgs = args.slice(1);
7177
7184
  function printVersion() {
7178
- console.log("1.4.100");
7185
+ console.log("1.4.101");
7179
7186
  }
7180
7187
  function printHelp() {
7181
7188
  console.log(`Synkro CLI \u2014 runtime safety for AI coding agents