@synkro-sh/cli 1.6.47 → 1.6.48

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
@@ -8330,14 +8330,14 @@ import { join as join8 } from "path";
8330
8330
  import { execSync as execSync6 } from "child_process";
8331
8331
  import { createInterface as createInterface3 } from "readline";
8332
8332
  function resolvePersistedHookMode() {
8333
- if (process.env.SYNKRO_HOOK_MODE === "stub") return "stub";
8334
8333
  if (process.env.SYNKRO_HOOK_MODE === "full") return "full";
8334
+ if (process.env.SYNKRO_HOOK_MODE === "stub") return "stub";
8335
8335
  try {
8336
8336
  const env = readFileSync8(CONFIG_PATH2, "utf-8");
8337
- if (/^SYNKRO_HOOK_MODE=['"]?stub['"]?\s*$/m.test(env)) return "stub";
8337
+ if (/^SYNKRO_HOOK_MODE=['"]?full['"]?\s*$/m.test(env)) return "full";
8338
8338
  } catch {
8339
8339
  }
8340
- return "full";
8340
+ return "stub";
8341
8341
  }
8342
8342
  function sanitizeGatewayCandidate(raw) {
8343
8343
  if (!raw) return void 0;
@@ -8354,11 +8354,12 @@ function parseArgs(argv) {
8354
8354
  else if (a === "--force" || a === "-f") opts.force = true;
8355
8355
  else if (a === "--link-repo") opts.linkRepo = true;
8356
8356
  else if (a === "--stub" || a === "--mode=stub") opts.hookMode = "stub";
8357
- else if (a === "--mode=full") opts.hookMode = "full";
8357
+ else if (a === "--legacy" || a === "--mode=full") opts.hookMode = "full";
8358
8358
  }
8359
8359
  const modeIdx = argv.indexOf("--mode");
8360
8360
  if (modeIdx >= 0 && argv[modeIdx + 1] === "stub") opts.hookMode = "stub";
8361
8361
  if (modeIdx >= 0 && argv[modeIdx + 1] === "full") opts.hookMode = "full";
8362
+ if (!opts.hookMode && process.env.SYNKRO_HOOK_MODE === "full") opts.hookMode = "full";
8362
8363
  if (!opts.hookMode && process.env.SYNKRO_HOOK_MODE === "stub") opts.hookMode = "stub";
8363
8364
  if (!opts.gatewayUrl) {
8364
8365
  const fromEnv = sanitizeGatewayCandidate(process.env.SYNKRO_GATEWAY_URL);
@@ -8470,7 +8471,7 @@ function ensureSynkroDir() {
8470
8471
  mkdirSync8(OFFSETS_DIR, { recursive: true });
8471
8472
  mkdirSync8(join8(SYNKRO_DIR4, "sessions"), { recursive: true });
8472
8473
  }
8473
- function writeHookScripts(mode = "full") {
8474
+ function writeHookScripts(mode = "stub") {
8474
8475
  const installExtractCorePath = join8(HOOKS_DIR, "installExtractCore.ts");
8475
8476
  const bashScriptPath = join8(HOOKS_DIR, "cc-bash-judge.ts");
8476
8477
  const bashFollowupScriptPath = join8(HOOKS_DIR, "cc-bash-followup.ts");
@@ -8629,7 +8630,7 @@ function writeConfigEnv(opts) {
8629
8630
  `SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
8630
8631
  `SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
8631
8632
  `SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
8632
- `SYNKRO_VERSION=${shellQuoteSingle("1.6.47")}`
8633
+ `SYNKRO_VERSION=${shellQuoteSingle("1.6.48")}`
8633
8634
  ];
8634
8635
  if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
8635
8636
  if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
@@ -8643,7 +8644,7 @@ function writeConfigEnv(opts) {
8643
8644
  lines.push(`SYNKRO_DEPLOYMENT_MODE=${shellQuoteSingle(safeMode)}`);
8644
8645
  lines.push(`SYNKRO_GRADING_MODE=${shellQuoteSingle(sanitizeConfigValue(opts.gradingMode ?? "local", 16))}`);
8645
8646
  lines.push(`SYNKRO_STORAGE_MODE=${shellQuoteSingle(sanitizeConfigValue(opts.storageMode ?? "local", 16))}`);
8646
- lines.push(`SYNKRO_HOOK_MODE=${shellQuoteSingle(sanitizeConfigValue(opts.hookMode ?? "full", 8))}`);
8647
+ lines.push(`SYNKRO_HOOK_MODE=${shellQuoteSingle(sanitizeConfigValue(opts.hookMode ?? "stub", 8))}`);
8647
8648
  lines.push("");
8648
8649
  writeFileSync7(CONFIG_PATH2, lines.join("\n"), "utf-8");
8649
8650
  chmodSync2(CONFIG_PATH2, 384);
@@ -11717,7 +11718,7 @@ var args = process.argv.slice(2);
11717
11718
  var cmd = args[0] || "";
11718
11719
  var subArgs = args.slice(1);
11719
11720
  function printVersion() {
11720
- console.log("1.6.47");
11721
+ console.log("1.6.48");
11721
11722
  }
11722
11723
  function printHelp2() {
11723
11724
  console.log(`Synkro CLI \u2014 runtime safety for AI coding agents