@synkro-sh/cli 1.6.38 → 1.6.40
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 +44 -39
- package/dist/bootstrap.js.map +1 -1
- package/package.json +1 -1
package/dist/bootstrap.js
CHANGED
|
@@ -8261,7 +8261,7 @@ function writeConfigEnv(opts) {
|
|
|
8261
8261
|
`SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
|
|
8262
8262
|
`SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
|
|
8263
8263
|
`SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
|
|
8264
|
-
`SYNKRO_VERSION=${shellQuoteSingle("1.6.
|
|
8264
|
+
`SYNKRO_VERSION=${shellQuoteSingle("1.6.40")}`
|
|
8265
8265
|
];
|
|
8266
8266
|
if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
|
|
8267
8267
|
if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
|
|
@@ -9029,29 +9029,30 @@ async function syncSkillFiles() {
|
|
|
9029
9029
|
const resolved = resolveSkillPaths(sf.skills, sf._repoRoot);
|
|
9030
9030
|
if (resolved.length === 0) return;
|
|
9031
9031
|
const mcpPort = process.env.SYNKRO_MCP_PORT || "18931";
|
|
9032
|
-
|
|
9032
|
+
const tasks = resolved.map((fp) => {
|
|
9033
9033
|
const content = readFileSync8(fp, "utf-8");
|
|
9034
|
-
if (!content.trim()) continue;
|
|
9035
9034
|
const source = `skill:${fp.split("/").pop()}`;
|
|
9036
|
-
|
|
9037
|
-
|
|
9038
|
-
|
|
9039
|
-
|
|
9040
|
-
|
|
9041
|
-
|
|
9042
|
-
|
|
9043
|
-
|
|
9044
|
-
|
|
9045
|
-
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
console.
|
|
9035
|
+
if (!content.trim()) return null;
|
|
9036
|
+
return { source, content };
|
|
9037
|
+
}).filter(Boolean);
|
|
9038
|
+
if (tasks.length === 0) return;
|
|
9039
|
+
const results = await Promise.allSettled(tasks.map(async ({ source, content }) => {
|
|
9040
|
+
const resp = await fetch(`http://127.0.0.1:${mcpPort}/api/local/skills/sync`, {
|
|
9041
|
+
method: "POST",
|
|
9042
|
+
headers: { "Content-Type": "application/json" },
|
|
9043
|
+
body: JSON.stringify({ source, content }),
|
|
9044
|
+
signal: AbortSignal.timeout(65e3)
|
|
9045
|
+
});
|
|
9046
|
+
if (!resp.ok) throw new Error(`${resp.status}`);
|
|
9047
|
+
const result = await resp.json();
|
|
9048
|
+
return { source, ...result };
|
|
9049
|
+
}));
|
|
9050
|
+
for (const r of results) {
|
|
9051
|
+
if (r.status === "fulfilled") {
|
|
9052
|
+
const { source, created, message } = r.value;
|
|
9053
|
+
console.log(created > 0 ? ` \u2713 skill ${source}: ${created} new rules added` : ` \u2713 skill ${source}: ${message || "up to date"}`);
|
|
9054
|
+
} else {
|
|
9055
|
+
console.warn(` \u26A0 skill sync failed: ${r.reason}`);
|
|
9055
9056
|
}
|
|
9056
9057
|
}
|
|
9057
9058
|
}
|
|
@@ -11116,27 +11117,31 @@ async function updateCommand() {
|
|
|
11116
11117
|
async function restartCommand(rest = []) {
|
|
11117
11118
|
assertDockerAvailable();
|
|
11118
11119
|
const cfg = resolveWorkerConfig(rest);
|
|
11119
|
-
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
process.exit(1);
|
|
11120
|
+
let claudeWorkers = cfg.claudeWorkers;
|
|
11121
|
+
let cursorWorkers = cfg.cursorWorkers;
|
|
11122
|
+
if (!cfg.explicit) {
|
|
11123
|
+
const reconciled = reconcileHarness();
|
|
11124
|
+
if (reconciled) {
|
|
11125
|
+
claudeWorkers = reconciled.claudeWorkers;
|
|
11126
|
+
cursorWorkers = reconciled.cursorWorkers;
|
|
11127
11127
|
}
|
|
11128
|
-
console.log("\nServer restarted successfully.");
|
|
11129
|
-
return;
|
|
11130
11128
|
}
|
|
11131
|
-
console.log(
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11129
|
+
console.log(`Synkro: restarting server (${claudeWorkers} claude + ${cursorWorkers} cursor)
|
|
11130
|
+
`);
|
|
11131
|
+
await dockerUpdate({ claudeWorkers, cursorWorkers, connectedRepo: resolveConnectedRepo() });
|
|
11132
|
+
const ready = await waitForContainerReady(6e4);
|
|
11133
|
+
if (!ready) {
|
|
11134
|
+
console.error("\n\u26A0 container did not pass /healthz within 60s");
|
|
11137
11135
|
process.exit(1);
|
|
11138
11136
|
}
|
|
11139
11137
|
console.log("\nServer restarted successfully.");
|
|
11138
|
+
const workersUp = await waitForWorkersReady(3e4);
|
|
11139
|
+
if (workersUp) {
|
|
11140
|
+
console.log("\u2713 workers ready");
|
|
11141
|
+
await syncSkillFiles();
|
|
11142
|
+
} else {
|
|
11143
|
+
console.warn("\u26A0 workers did not register within 30s \u2014 skill sync skipped");
|
|
11144
|
+
}
|
|
11140
11145
|
}
|
|
11141
11146
|
var init_lifecycle = __esm({
|
|
11142
11147
|
"cli/commands/lifecycle.ts"() {
|
|
@@ -11319,7 +11324,7 @@ var args = process.argv.slice(2);
|
|
|
11319
11324
|
var cmd = args[0] || "";
|
|
11320
11325
|
var subArgs = args.slice(1);
|
|
11321
11326
|
function printVersion() {
|
|
11322
|
-
console.log("1.6.
|
|
11327
|
+
console.log("1.6.40");
|
|
11323
11328
|
}
|
|
11324
11329
|
function printHelp2() {
|
|
11325
11330
|
console.log(`Synkro CLI \u2014 runtime safety for AI coding agents
|