@synkro-sh/cli 1.7.6 → 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 +16 -7
- package/dist/bootstrap.js.map +1 -1
- package/package.json +1 -1
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 ? '\\
|
|
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.
|
|
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)}`);
|
|
@@ -13596,7 +13605,7 @@ tmux kill-session -t "=$SESSION" 2>/dev/null || true
|
|
|
13596
13605
|
# Start claude inside a detached tmux session so it has a real pty.
|
|
13597
13606
|
# Redirect stderr to the log so we can see why it dies.
|
|
13598
13607
|
tmux new-session -d -s "$SESSION" \\
|
|
13599
|
-
"SYNKRO_CHANNEL_PORT=${CHANNEL_1_PORT} CLAUDE_CODE_DISABLE_THINKING=1 claude --dangerously-load-development-channels server:synkro-local --dangerously-skip-permissions --setting-sources project,local --model claude-sonnet-
|
|
13608
|
+
"SYNKRO_CHANNEL_PORT=${CHANNEL_1_PORT} CLAUDE_CODE_DISABLE_THINKING=1 claude --dangerously-load-development-channels server:synkro-local --dangerously-skip-permissions --setting-sources project,local --model claude-sonnet-5 2>>$LOG; echo 'claude exited with code '$'?' >> $LOG"
|
|
13600
13609
|
|
|
13601
13610
|
# Claude's --dangerously-load-development-channels shows a confirmation
|
|
13602
13611
|
# prompt: option 1 = "I am using this for local development" (accept),
|
|
@@ -13658,7 +13667,7 @@ log "claude version: $(claude --version 2>&1 | head -1)"
|
|
|
13658
13667
|
tmux kill-session -t "=$SESSION" 2>/dev/null || true
|
|
13659
13668
|
|
|
13660
13669
|
tmux new-session -d -s "$SESSION" \\
|
|
13661
|
-
"SYNKRO_CHANNEL_PORT=${CHANNEL_2_PORT} CLAUDE_CODE_DISABLE_THINKING=1 claude --dangerously-load-development-channels server:synkro-local --dangerously-skip-permissions --setting-sources project,local --model claude-sonnet-
|
|
13670
|
+
"SYNKRO_CHANNEL_PORT=${CHANNEL_2_PORT} CLAUDE_CODE_DISABLE_THINKING=1 claude --dangerously-load-development-channels server:synkro-local --dangerously-skip-permissions --setting-sources project,local --model claude-sonnet-5 2>>$LOG; echo 'claude exited with code '$'?' >> $LOG"
|
|
13662
13671
|
|
|
13663
13672
|
sleep 3
|
|
13664
13673
|
if tmux has-session -t "=$SESSION" 2>/dev/null; then
|
|
@@ -13714,7 +13723,7 @@ log "claude version: $(claude --version 2>&1 | head -1)"
|
|
|
13714
13723
|
tmux kill-session -t "=$SESSION" 2>/dev/null || true
|
|
13715
13724
|
|
|
13716
13725
|
tmux new-session -d -s "$SESSION" \\
|
|
13717
|
-
"SYNKRO_CHANNEL_PORT=${CHANNEL_3_PORT} CLAUDE_CODE_DISABLE_THINKING=1 claude --dangerously-load-development-channels server:synkro-local --dangerously-skip-permissions --setting-sources project,local --model claude-sonnet-
|
|
13726
|
+
"SYNKRO_CHANNEL_PORT=${CHANNEL_3_PORT} CLAUDE_CODE_DISABLE_THINKING=1 claude --dangerously-load-development-channels server:synkro-local --dangerously-skip-permissions --setting-sources project,local --model claude-sonnet-5 2>>$LOG; echo 'claude exited with code '$'?' >> $LOG"
|
|
13718
13727
|
|
|
13719
13728
|
sleep 3
|
|
13720
13729
|
if tmux has-session -t "=$SESSION" 2>/dev/null; then
|
|
@@ -13770,7 +13779,7 @@ log "claude version: $(claude --version 2>&1 | head -1)"
|
|
|
13770
13779
|
tmux kill-session -t "=$SESSION" 2>/dev/null || true
|
|
13771
13780
|
|
|
13772
13781
|
tmux new-session -d -s "$SESSION" \\
|
|
13773
|
-
"SYNKRO_CHANNEL_PORT=${CHANNEL_4_PORT} CLAUDE_CODE_DISABLE_THINKING=1 claude --dangerously-load-development-channels server:synkro-local --dangerously-skip-permissions --setting-sources project,local --model claude-sonnet-
|
|
13782
|
+
"SYNKRO_CHANNEL_PORT=${CHANNEL_4_PORT} CLAUDE_CODE_DISABLE_THINKING=1 claude --dangerously-load-development-channels server:synkro-local --dangerously-skip-permissions --setting-sources project,local --model claude-sonnet-5 2>>$LOG; echo 'claude exited with code '$'?' >> $LOG"
|
|
13774
13783
|
|
|
13775
13784
|
sleep 3
|
|
13776
13785
|
if tmux has-session -t "=$SESSION" 2>/dev/null; then
|
|
@@ -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.
|
|
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
|