@synkro-sh/cli 1.6.51 → 1.6.52
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 +18 -9
- package/dist/bootstrap.js.map +1 -1
- package/package.json +1 -1
package/dist/bootstrap.js
CHANGED
|
@@ -6263,9 +6263,12 @@ export async function runStub(surface: string, opts: StubOpts = {}): Promise<voi
|
|
|
6263
6263
|
const sessionId = String(payload.session_id || payload.conversation_id || '');
|
|
6264
6264
|
const root = gitRoot(cwd);
|
|
6265
6265
|
|
|
6266
|
-
// Dormancy: a repo is onboarded only if it has a .synkro at its git
|
|
6266
|
+
// Dormancy: a repo is onboarded only if it has a .synkro FILE at its git
|
|
6267
|
+
// root. Guard root !== HOME — ~/.synkro is the config DIRECTORY, so without
|
|
6268
|
+
// this a home-rooted cwd (dotfiles in git, non-git dir under home) would
|
|
6269
|
+
// "find" the config dir and look onboarded.
|
|
6267
6270
|
let synkroFileText = '';
|
|
6268
|
-
if (root && existsSync(join(root, '.synkro'))) {
|
|
6271
|
+
if (root && root !== HOME && existsSync(join(root, '.synkro'))) {
|
|
6269
6272
|
try { synkroFileText = readFileSync(join(root, '.synkro'), 'utf-8'); } catch {}
|
|
6270
6273
|
}
|
|
6271
6274
|
if (!synkroFileText) {
|
|
@@ -8393,7 +8396,7 @@ __export(install_exports, {
|
|
|
8393
8396
|
syncSkillFiles: () => syncSkillFiles,
|
|
8394
8397
|
writeHookScripts: () => writeHookScripts
|
|
8395
8398
|
});
|
|
8396
|
-
import { existsSync as existsSync10, mkdirSync as mkdirSync8, writeFileSync as writeFileSync7, chmodSync as chmodSync2, readFileSync as readFileSync8, readdirSync as readdirSync3, unlinkSync as unlinkSync4 } from "fs";
|
|
8399
|
+
import { existsSync as existsSync10, mkdirSync as mkdirSync8, writeFileSync as writeFileSync7, chmodSync as chmodSync2, readFileSync as readFileSync8, readdirSync as readdirSync3, unlinkSync as unlinkSync4, statSync as statSync2 } from "fs";
|
|
8397
8400
|
import { homedir as homedir8 } from "os";
|
|
8398
8401
|
import { join as join8 } from "path";
|
|
8399
8402
|
import { execSync as execSync6 } from "child_process";
|
|
@@ -8716,7 +8719,7 @@ function writeConfigEnv(opts) {
|
|
|
8716
8719
|
`SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
|
|
8717
8720
|
`SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
|
|
8718
8721
|
`SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
|
|
8719
|
-
`SYNKRO_VERSION=${shellQuoteSingle("1.6.
|
|
8722
|
+
`SYNKRO_VERSION=${shellQuoteSingle("1.6.52")}`
|
|
8720
8723
|
];
|
|
8721
8724
|
if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
|
|
8722
8725
|
if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
|
|
@@ -9367,8 +9370,14 @@ function writeSynkroFileIfMissing(opts) {
|
|
|
9367
9370
|
try {
|
|
9368
9371
|
const root = execSync6("git rev-parse --show-toplevel", { encoding: "utf-8", timeout: 3e3, stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
9369
9372
|
if (!root) return;
|
|
9373
|
+
if (root === homedir8()) return;
|
|
9370
9374
|
const fp = join8(root, ".synkro");
|
|
9371
|
-
|
|
9375
|
+
let hasFile = false;
|
|
9376
|
+
try {
|
|
9377
|
+
hasFile = statSync2(fp).isFile();
|
|
9378
|
+
} catch {
|
|
9379
|
+
}
|
|
9380
|
+
if (hasFile) {
|
|
9372
9381
|
console.log(` .synkro: ${fp} (existing, respected)`);
|
|
9373
9382
|
return;
|
|
9374
9383
|
}
|
|
@@ -10549,7 +10558,7 @@ var init_disconnect = __esm({
|
|
|
10549
10558
|
});
|
|
10550
10559
|
|
|
10551
10560
|
// cli/local-cc/turnLog.ts
|
|
10552
|
-
import { appendFileSync, existsSync as existsSync13, mkdirSync as mkdirSync10, openSync as openSync2, readFileSync as readFileSync10, readSync, closeSync as closeSync2, statSync as
|
|
10561
|
+
import { appendFileSync, existsSync as existsSync13, mkdirSync as mkdirSync10, openSync as openSync2, readFileSync as readFileSync10, readSync, closeSync as closeSync2, statSync as statSync3, watchFile, unwatchFile } from "fs";
|
|
10553
10562
|
import { dirname as dirname6, join as join11 } from "path";
|
|
10554
10563
|
import { homedir as homedir11 } from "os";
|
|
10555
10564
|
function truncate(s, max = PREVIEW_MAX) {
|
|
@@ -10589,7 +10598,7 @@ function appendTurn(args2) {
|
|
|
10589
10598
|
function readRecentTurns(n = 20) {
|
|
10590
10599
|
if (!existsSync13(TURN_LOG_PATH)) return [];
|
|
10591
10600
|
try {
|
|
10592
|
-
const size =
|
|
10601
|
+
const size = statSync3(TURN_LOG_PATH).size;
|
|
10593
10602
|
if (size === 0) return [];
|
|
10594
10603
|
const text = readFileSync10(TURN_LOG_PATH, "utf-8");
|
|
10595
10604
|
const lines = text.split("\n").filter(Boolean);
|
|
@@ -10615,7 +10624,7 @@ function followTurns(onEntry) {
|
|
|
10615
10624
|
}
|
|
10616
10625
|
let lastSize = (() => {
|
|
10617
10626
|
try {
|
|
10618
|
-
return
|
|
10627
|
+
return statSync3(TURN_LOG_PATH).size;
|
|
10619
10628
|
} catch {
|
|
10620
10629
|
return 0;
|
|
10621
10630
|
}
|
|
@@ -11900,7 +11909,7 @@ var args = process.argv.slice(2);
|
|
|
11900
11909
|
var cmd = args[0] || "";
|
|
11901
11910
|
var subArgs = args.slice(1);
|
|
11902
11911
|
function printVersion() {
|
|
11903
|
-
console.log("1.6.
|
|
11912
|
+
console.log("1.6.52");
|
|
11904
11913
|
}
|
|
11905
11914
|
function printHelp2() {
|
|
11906
11915
|
console.log(`Synkro CLI \u2014 runtime safety for AI coding agents
|