@synkro-sh/cli 1.7.7 → 1.7.8

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
@@ -1975,6 +1975,10 @@ export async function localGradeCwe(prompt: string, agentKind: AgentKind = 'clau
1975
1975
  // directive to poll the user + call record_fix_choice. PURELY ADDITIVE \u2014 any
1976
1976
  // failure returns '' so enforcement behaves exactly as before.
1977
1977
  export async function buildFixPollDirective(o: { candA: string; code: string; ruleId: string; sessionId: string; filePath: string; model: string; graderPrompt: string; graderPool?: AgentKind }): Promise<string> {
1978
+ // Kill switch (container/agent env, NOT user-toggleable via MCP): headless/benchmark
1979
+ // runs (e.g. sec-code-bench) set SYNKRO_FIX_POLL=0 to suppress the AskUserQuestion poll
1980
+ // so grading runs non-interactively. The container endpoint enforces the same flag.
1981
+ if (process.env.SYNKRO_FIX_POLL === '0') return '';
1978
1982
  try {
1979
1983
  const candA = (o.candA || '').trim();
1980
1984
  if (!candA) return '';
@@ -4798,7 +4802,7 @@ async function main() {
4798
4802
  // than re-deriving. ask mode: no fix in the deny text; the poll directive
4799
4803
  // (below) lets the HUMAN choose among candidates.
4800
4804
  const denyReason = mode === 'fix'
4801
- ? 'Guard: ' + guardReason + (verdict.suggestedFix ? '\\nSuggested fix (apply this): ' + verdict.suggestedFix : '') + '\\nFix all issues before retrying. Do NOT ask the user to make the edit manually \u2014 resolve the violation in code yourself.'
4805
+ ? 'Guard: ' + guardReason + (verdict.suggestedFix ? '\\nRequired fix (apply this exactly): ' + verdict.suggestedFix : '') + '\\nFix all issues before retrying. Do NOT ask the user to make the edit manually \u2014 resolve the violation in code yourself.'
4802
4806
  : 'Guard: ' + guardReason + '\\nAsk the user for explicit consent before retrying.';
4803
4807
  dispatchCapture(jwt, 'edit', 'block', verdict.severity || 'critical', verdict.category || 'security',
4804
4808
  toolName, gitRepo, sessionId, config.captureDepth, {
@@ -10637,6 +10641,11 @@ async function dockerInstall(opts = {}) {
10637
10641
  ...process.env.SYNKRO_MAX_BATCH_SIZE ? ["-e", `SYNKRO_MAX_BATCH_SIZE=${process.env.SYNKRO_MAX_BATCH_SIZE}`] : [],
10638
10642
  // Cursor grading model — tunable like SYNKRO_MAX_BATCH_SIZE.
10639
10643
  ...process.env.SYNKRO_CURSOR_MODEL ? ["-e", `SYNKRO_CURSOR_MODEL=${process.env.SYNKRO_CURSOR_MODEL}`] : [],
10644
+ // Fix-poll kill switch. Default ON in the image; a benchmark/headless run
10645
+ // (e.g. sec-code-bench) sets SYNKRO_FIX_POLL=0 so ask-mode violations skip the
10646
+ // interactive AskUserQuestion poll and fall through to generate-the-fix. Only
10647
+ // passed when the operator set it; otherwise the image default (1) applies.
10648
+ ...process.env.SYNKRO_FIX_POLL ? ["-e", `SYNKRO_FIX_POLL=${process.env.SYNKRO_FIX_POLL}`] : [],
10640
10649
  // Connected repo — the server seeds the local app + ruleset named after it.
10641
10650
  ...opts.connectedRepo ? ["-e", `SYNKRO_CONNECTED_REPO=${opts.connectedRepo}`] : [],
10642
10651
  // Real account identity (from config.env via process.env) — telemetry is
@@ -11634,7 +11643,7 @@ function writeConfigEnv(opts) {
11634
11643
  `SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
11635
11644
  `SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
11636
11645
  `SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
11637
- `SYNKRO_VERSION=${shellQuoteSingle("1.7.7")}`
11646
+ `SYNKRO_VERSION=${shellQuoteSingle("1.7.8")}`
11638
11647
  ];
11639
11648
  if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
11640
11649
  if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
@@ -15697,7 +15706,7 @@ var args = process.argv.slice(2);
15697
15706
  var cmd = args[0] || "";
15698
15707
  var subArgs = args.slice(1);
15699
15708
  function printVersion() {
15700
- console.log("1.7.7");
15709
+ console.log("1.7.8");
15701
15710
  }
15702
15711
  function printHelp2() {
15703
15712
  console.log(`Synkro CLI \u2014 runtime safety for AI coding agents