@synkro-sh/cli 1.7.42 → 1.7.44

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
@@ -4826,7 +4826,7 @@ function writeConfigEnv(opts) {
4826
4826
  `SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
4827
4827
  `SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
4828
4828
  `SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
4829
- `SYNKRO_VERSION=${shellQuoteSingle("1.7.42")}`
4829
+ `SYNKRO_VERSION=${shellQuoteSingle("1.7.44")}`
4830
4830
  ];
4831
4831
  if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
4832
4832
  if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
@@ -6106,7 +6106,7 @@ async function syncSkillFiles() {
6106
6106
  console.log(` indexing ${tasks.length} skill file${tasks.length === 1 ? "" : "s"} \u2014 comparing against existing ruleset (this may take a few seconds)...`);
6107
6107
  await ingestSkillTasks(tasks, mcpPort);
6108
6108
  }
6109
- function discoverSkillFiles(repoRoot, excludeHashes) {
6109
+ function discoverSkillFiles(repoRoot, excludeHashes, excludeNames) {
6110
6110
  const roots = [];
6111
6111
  const add = (p) => {
6112
6112
  try {
@@ -6135,7 +6135,7 @@ function discoverSkillFiles(repoRoot, excludeHashes) {
6135
6135
  }
6136
6136
  if (!content.trim()) return;
6137
6137
  const hash = createHash("sha256").update(content).digest("hex");
6138
- if (seen.has(hash) || excludeHashes.has(hash)) return;
6138
+ if (seen.has(hash) || excludeHashes.has(hash) || excludeNames?.has(name.toLowerCase())) return;
6139
6139
  seen.add(hash);
6140
6140
  out.push({ source: `skill:${name}`, content, name, hash });
6141
6141
  };
@@ -6191,6 +6191,7 @@ async function discoverAndIngestSkills() {
6191
6191
  try {
6192
6192
  const sf = readFullSynkroFile();
6193
6193
  const repoRoot = sf?._repoRoot || detectGitRepo2();
6194
+ const mcpPort = process.env.SYNKRO_MCP_PORT || "18931";
6194
6195
  const excludeHashes = /* @__PURE__ */ new Set();
6195
6196
  if (sf?.skills?.length) {
6196
6197
  for (const fp of resolveSkillPaths(sf.skills, sf._repoRoot)) {
@@ -6200,7 +6201,19 @@ async function discoverAndIngestSkills() {
6200
6201
  }
6201
6202
  }
6202
6203
  }
6203
- const found = discoverSkillFiles(repoRoot, excludeHashes);
6204
+ const excludeNames = /* @__PURE__ */ new Set();
6205
+ try {
6206
+ const resp = await fetch(`http://127.0.0.1:${mcpPort}/api/local/skills?status=active`, { signal: AbortSignal.timeout(5e3) });
6207
+ if (resp.ok) {
6208
+ const { skills } = await resp.json();
6209
+ for (const s of skills || []) {
6210
+ if (s.content_hash) excludeHashes.add(s.content_hash);
6211
+ else if (s.name) excludeNames.add(String(s.name).toLowerCase());
6212
+ }
6213
+ }
6214
+ } catch {
6215
+ }
6216
+ const found = discoverSkillFiles(repoRoot, excludeHashes, excludeNames);
6204
6217
  if (found.length === 0) return;
6205
6218
  const setHash = discoverySetHash(found);
6206
6219
  let prev = "";
@@ -6218,7 +6231,6 @@ async function discoverAndIngestSkills() {
6218
6231
  console.log(" Skipped \u2014 you can ingest skills anytime from the Synkro dashboard or via the MCP tool.");
6219
6232
  return;
6220
6233
  }
6221
- const mcpPort = process.env.SYNKRO_MCP_PORT || "18931";
6222
6234
  console.log(` Ingesting ${picks.length} skill${picks.length === 1 ? "" : "s"} (security-vetting each first)\u2026`);
6223
6235
  const summary = await ingestSkillTasks(picks.map((i) => ({ source: found[i].source, content: found[i].content })), mcpPort);
6224
6236
  const parts = [`${summary.ingested} ingested (${summary.rules} rule${summary.rules === 1 ? "" : "s"})`];
@@ -7259,7 +7271,11 @@ async function disconnectCommand(args2 = []) {
7259
7271
  rmSync2(SYNKRO_DIR7, { recursive: true, force: true });
7260
7272
  console.log(`\u2713 wiped ${SYNKRO_DIR7} entirely \u2014 including all scan data and backups`);
7261
7273
  } else {
7262
- const keep = /* @__PURE__ */ new Set([join13(SYNKRO_DIR7, "pgdata"), join13(SYNKRO_DIR7, "pgdata-backups")]);
7274
+ const keep = /* @__PURE__ */ new Set([
7275
+ join13(SYNKRO_DIR7, "pgdata"),
7276
+ join13(SYNKRO_DIR7, "pgdata-backups"),
7277
+ join13(SYNKRO_DIR7, ".transcript-offsets")
7278
+ ]);
7263
7279
  const preserved = [];
7264
7280
  for (const entry of readdirSync4(SYNKRO_DIR7)) {
7265
7281
  const full = join13(SYNKRO_DIR7, entry);
@@ -9039,7 +9055,7 @@ var args = process.argv.slice(2);
9039
9055
  var cmd = args[0] || "";
9040
9056
  var subArgs = args.slice(1);
9041
9057
  function printVersion() {
9042
- console.log("1.7.42");
9058
+ console.log("1.7.44");
9043
9059
  }
9044
9060
  function printHelp2() {
9045
9061
  console.log(`Synkro CLI \u2014 runtime safety for AI coding agents