@synkro-sh/cli 1.4.5 → 1.4.7
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 +34 -11
- package/dist/bootstrap.js.map +1 -1
- package/package.json +1 -1
package/dist/bootstrap.js
CHANGED
|
@@ -3679,9 +3679,21 @@ function patchClaudeJson() {
|
|
|
3679
3679
|
});
|
|
3680
3680
|
}
|
|
3681
3681
|
function installLocalCC() {
|
|
3682
|
-
|
|
3682
|
+
let bunCheck = spawnSync("bun", ["--version"], { encoding: "utf-8" });
|
|
3683
3683
|
if (bunCheck.status !== 0) {
|
|
3684
|
-
|
|
3684
|
+
if (process.platform === "darwin") {
|
|
3685
|
+
console.log(" Installing bun via brew...");
|
|
3686
|
+
const brewR = spawnSync("brew", ["install", "oven-sh/bun/bun"], { encoding: "utf-8", stdio: "inherit", timeout: 12e4 });
|
|
3687
|
+
if (brewR.status !== 0) {
|
|
3688
|
+
throw new LocalCCInstallError("bun auto-install failed. Install manually: curl -fsSL https://bun.sh/install | bash");
|
|
3689
|
+
}
|
|
3690
|
+
bunCheck = spawnSync("bun", ["--version"], { encoding: "utf-8" });
|
|
3691
|
+
if (bunCheck.status !== 0) {
|
|
3692
|
+
throw new LocalCCInstallError("bun installed but not found on PATH. Restart your terminal and re-run install.");
|
|
3693
|
+
}
|
|
3694
|
+
} else {
|
|
3695
|
+
throw new LocalCCInstallError("bun is required. Install it: curl -fsSL https://bun.sh/install | bash");
|
|
3696
|
+
}
|
|
3685
3697
|
}
|
|
3686
3698
|
writePluginFiles();
|
|
3687
3699
|
runBunInstall();
|
|
@@ -3767,7 +3779,7 @@ done
|
|
|
3767
3779
|
});
|
|
3768
3780
|
|
|
3769
3781
|
// cli/local-cc/pueue.ts
|
|
3770
|
-
import { execFileSync, spawnSync as spawnSync2 } from "child_process";
|
|
3782
|
+
import { execFileSync, spawnSync as spawnSync2, spawn } from "child_process";
|
|
3771
3783
|
import { homedir as homedir8 } from "os";
|
|
3772
3784
|
import { join as join9 } from "path";
|
|
3773
3785
|
import { connect } from "net";
|
|
@@ -3907,11 +3919,13 @@ function assertPueueInstalled() {
|
|
|
3907
3919
|
throw new PueueError("pueue not found. Install it: brew install pueue (macOS) or https://github.com/Nukesor/pueue");
|
|
3908
3920
|
}
|
|
3909
3921
|
}
|
|
3910
|
-
const status = spawnSync2("pueue", ["status", "--json"], { encoding: "utf-8" });
|
|
3922
|
+
const status = spawnSync2("pueue", ["status", "--json"], { encoding: "utf-8", timeout: 5e3 });
|
|
3911
3923
|
if (status.status !== 0) {
|
|
3912
3924
|
console.log(" Starting pueued daemon...");
|
|
3913
|
-
|
|
3914
|
-
|
|
3925
|
+
const child = spawn("pueued", ["-d"], { stdio: "ignore", detached: true });
|
|
3926
|
+
child.unref();
|
|
3927
|
+
spawnSync2("sleep", ["1"]);
|
|
3928
|
+
const retry = spawnSync2("pueue", ["status", "--json"], { encoding: "utf-8", timeout: 5e3 });
|
|
3915
3929
|
if (retry.status !== 0) {
|
|
3916
3930
|
throw new PueueError("pueue daemon not reachable after starting pueued. Check `pueued` manually.");
|
|
3917
3931
|
}
|
|
@@ -3979,17 +3993,26 @@ function getPrimer(role) {
|
|
|
3979
3993
|
function buildChannelContent(role, payload) {
|
|
3980
3994
|
return `${getPrimer(role)}
|
|
3981
3995
|
|
|
3996
|
+
${CHANNEL_REPLY_INSTRUCTIONS}
|
|
3997
|
+
|
|
3982
3998
|
---
|
|
3983
3999
|
PAYLOAD (the input to evaluate):
|
|
3984
4000
|
|
|
3985
4001
|
${payload}`;
|
|
3986
4002
|
}
|
|
3987
|
-
var CACHE_PATH2, _cached;
|
|
4003
|
+
var CACHE_PATH2, _cached, CHANNEL_REPLY_INSTRUCTIONS;
|
|
3988
4004
|
var init_prompts = __esm({
|
|
3989
4005
|
"cli/local-cc/prompts.ts"() {
|
|
3990
4006
|
"use strict";
|
|
3991
4007
|
CACHE_PATH2 = join10(homedir9(), ".synkro", "prompts", "judge-prompts.json");
|
|
3992
4008
|
_cached = null;
|
|
4009
|
+
CHANNEL_REPLY_INSTRUCTIONS = `
|
|
4010
|
+
DELIVERY METHOD \u2014 MANDATORY, OVERRIDES ALL OTHER OUTPUT RULES:
|
|
4011
|
+
You are running inside a Synkro MCP channel. Do NOT output your verdict as text.
|
|
4012
|
+
Instead, after generating your verdict, call the \`reply\` tool EXACTLY ONCE with:
|
|
4013
|
+
- req_id: the req_id from this channel event's meta
|
|
4014
|
+
- result: your complete verdict block as a string (the <synkro-verdict>\u2026</synkro-verdict> XML)
|
|
4015
|
+
Any text output is silently discarded. Only the reply tool call is captured.`;
|
|
3993
4016
|
}
|
|
3994
4017
|
});
|
|
3995
4018
|
|
|
@@ -4326,7 +4349,7 @@ function writeConfigEnv(opts) {
|
|
|
4326
4349
|
`SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
|
|
4327
4350
|
`SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
|
|
4328
4351
|
`SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
|
|
4329
|
-
`SYNKRO_VERSION=${shellQuoteSingle("1.4.
|
|
4352
|
+
`SYNKRO_VERSION=${shellQuoteSingle("1.4.7")}`
|
|
4330
4353
|
];
|
|
4331
4354
|
if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
|
|
4332
4355
|
if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
|
|
@@ -5320,7 +5343,7 @@ var scanPr_exports = {};
|
|
|
5320
5343
|
__export(scanPr_exports, {
|
|
5321
5344
|
scanPrCommand: () => scanPrCommand
|
|
5322
5345
|
});
|
|
5323
|
-
import { execSync as execSync6, spawn } from "child_process";
|
|
5346
|
+
import { execSync as execSync6, spawn as spawn2 } from "child_process";
|
|
5324
5347
|
import { readFileSync as readFileSync13, existsSync as existsSync15 } from "fs";
|
|
5325
5348
|
import { join as join15 } from "path";
|
|
5326
5349
|
function parseMatchSpec(condition) {
|
|
@@ -5531,7 +5554,7 @@ ${hunks}`;
|
|
|
5531
5554
|
const fullPrompt = promptHeader + userMessage;
|
|
5532
5555
|
return new Promise((resolve2) => {
|
|
5533
5556
|
const t0 = Date.now();
|
|
5534
|
-
const proc =
|
|
5557
|
+
const proc = spawn2(
|
|
5535
5558
|
"claude",
|
|
5536
5559
|
["--print", "--model", "claude-sonnet-4-6", "--output-format", "json", "--no-session-persistence"],
|
|
5537
5560
|
{
|
|
@@ -5630,7 +5653,7 @@ ${JSON.stringify(findings, null, 2)}
|
|
|
5630
5653
|
function spawnOpusConsolidator(findings, claudeToken) {
|
|
5631
5654
|
return new Promise((resolve2) => {
|
|
5632
5655
|
const prompt2 = buildConsolidationPrompt(findings);
|
|
5633
|
-
const proc =
|
|
5656
|
+
const proc = spawn2(
|
|
5634
5657
|
"claude",
|
|
5635
5658
|
["--print", "--model", "claude-opus-4-7", "--output-format", "json", "--no-session-persistence"],
|
|
5636
5659
|
{
|