@synkro-sh/cli 1.6.38 → 1.6.39

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 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.38")}`
8264
+ `SYNKRO_VERSION=${shellQuoteSingle("1.6.39")}`
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
- for (const fp of resolved) {
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
- try {
9037
- const resp = await fetch(`http://127.0.0.1:${mcpPort}/api/local/skills/sync`, {
9038
- method: "POST",
9039
- headers: { "Content-Type": "application/json" },
9040
- body: JSON.stringify({ source, content }),
9041
- signal: AbortSignal.timeout(65e3)
9042
- });
9043
- if (resp.ok) {
9044
- const result = await resp.json();
9045
- if (result.created > 0) {
9046
- console.log(` \u2713 skill ${source}: ${result.created} new rules added`);
9047
- } else {
9048
- console.log(` \u2713 skill ${source}: ${result.message || "up to date"}`);
9049
- }
9050
- } else {
9051
- console.warn(` \u26A0 skill ${source}: sync failed (${resp.status})`);
9052
- }
9053
- } catch (e) {
9054
- console.warn(` \u26A0 skill ${source}: ${e.message}`);
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
  }
@@ -11319,7 +11320,7 @@ var args = process.argv.slice(2);
11319
11320
  var cmd = args[0] || "";
11320
11321
  var subArgs = args.slice(1);
11321
11322
  function printVersion() {
11322
- console.log("1.6.38");
11323
+ console.log("1.6.39");
11323
11324
  }
11324
11325
  function printHelp2() {
11325
11326
  console.log(`Synkro CLI \u2014 runtime safety for AI coding agents