@synkro-sh/cli 1.7.27 → 1.7.30
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 +19 -11
- package/dist/bootstrap.js.map +1 -1
- package/package.json +1 -1
package/dist/bootstrap.js
CHANGED
|
@@ -7826,8 +7826,22 @@ export async function runStub(surface: string, opts: StubOpts = {}): Promise<voi
|
|
|
7826
7826
|
// wait above that budget — not the 6s telemetry default — or the stub abandons
|
|
7827
7827
|
// the request before the result lands and the completion shows up a hook late.
|
|
7828
7828
|
const timeoutMs = surface === 'bash-followup' ? 32000 : (opts.telemetry ? 6000 : 28000);
|
|
7829
|
-
|
|
7830
|
-
|
|
7829
|
+
// Cloud has no local container to reach. Post the SAME envelope to the org's grader
|
|
7830
|
+
// via the gateway's /grade/submit as role 'scan:<surface>'; the container runs
|
|
7831
|
+
// scanRouter (runScan) server-side and returns the SAME shaped decision — so cloud
|
|
7832
|
+
// and local share ONE grading implementation, no client-side parsing. The gateway
|
|
7833
|
+
// accepts the durable 1yr MCP token (verifyOrg → org-derived, tenant-safe).
|
|
7834
|
+
const cloud = deployIsCloud();
|
|
7835
|
+
// Regex-free trailing-slash trim — this is inside a template literal, where a
|
|
7836
|
+
// regex like /\\/+$/ mis-escapes into broken emitted code (smoke:hooks catches it).
|
|
7837
|
+
let gwBase = cfgVal('SYNKRO_GATEWAY_URL') || 'https://api.synkro.sh';
|
|
7838
|
+
while (gwBase.endsWith('/')) gwBase = gwBase.slice(0, -1);
|
|
7839
|
+
const url = cloud
|
|
7840
|
+
? gwBase + '/grade/submit'
|
|
7841
|
+
: 'http://127.0.0.1:' + PORT + '/api/scan/' + surface + (harness === 'cursor' ? '?harness=cursor' : '');
|
|
7842
|
+
const body = cloud
|
|
7843
|
+
? JSON.stringify({ role: 'scan:' + surface, payload: JSON.stringify(envelope), content: '' })
|
|
7844
|
+
: JSON.stringify(envelope);
|
|
7831
7845
|
const headers = { 'Content-Type': 'application/json', Authorization: 'Bearer ' + loadMcpJwt() };
|
|
7832
7846
|
// Telemetry hooks (bash-followup, transcript-sync, session telemetry) IGNORE the
|
|
7833
7847
|
// response and the server processes them DETACHED, so delivery RELIABILITY beats
|
|
@@ -11759,7 +11773,7 @@ function writeConfigEnv(opts) {
|
|
|
11759
11773
|
`SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
|
|
11760
11774
|
`SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
|
|
11761
11775
|
`SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
|
|
11762
|
-
`SYNKRO_VERSION=${shellQuoteSingle("1.7.
|
|
11776
|
+
`SYNKRO_VERSION=${shellQuoteSingle("1.7.30")}`
|
|
11763
11777
|
];
|
|
11764
11778
|
if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
|
|
11765
11779
|
if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
|
|
@@ -12381,13 +12395,7 @@ async function installCommand(opts = {}) {
|
|
|
12381
12395
|
}
|
|
12382
12396
|
const transcriptConsent = transcriptCC || transcriptCursor;
|
|
12383
12397
|
ensureSynkroDir();
|
|
12384
|
-
|
|
12385
|
-
if (target === "cloud-container" && hookMode === "stub") {
|
|
12386
|
-
if (opts.hookMode === "stub") {
|
|
12387
|
-
console.log(" \u24D8 Cloud mode needs full hooks (stub hooks require a local container) \u2014 using full.\n");
|
|
12388
|
-
}
|
|
12389
|
-
hookMode = "full";
|
|
12390
|
-
}
|
|
12398
|
+
const hookMode = opts.hookMode || resolvePersistedHookMode();
|
|
12391
12399
|
const scripts = writeHookScripts(hookMode);
|
|
12392
12400
|
console.log("Wrote hook scripts to ~/.synkro/hooks/\n");
|
|
12393
12401
|
for (const mode of ["edit", "bash"]) {
|
|
@@ -15965,7 +15973,7 @@ var args = process.argv.slice(2);
|
|
|
15965
15973
|
var cmd = args[0] || "";
|
|
15966
15974
|
var subArgs = args.slice(1);
|
|
15967
15975
|
function printVersion() {
|
|
15968
|
-
console.log("1.7.
|
|
15976
|
+
console.log("1.7.30");
|
|
15969
15977
|
}
|
|
15970
15978
|
function printHelp2() {
|
|
15971
15979
|
console.log(`Synkro CLI \u2014 runtime safety for AI coding agents
|