@jaggerxtrm/specialists 3.6.17 → 3.6.19

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.
Files changed (2) hide show
  1. package/dist/index.js +39 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20747,13 +20747,22 @@ function parseMemoriesPayload(jsonText) {
20747
20747
  return [];
20748
20748
  }
20749
20749
  function readBdMemories(cwd) {
20750
- const stdout = execSync("bd memories --json", {
20751
- cwd,
20752
- encoding: "utf8",
20753
- stdio: ["ignore", "pipe", "pipe"],
20754
- timeout: 5000
20755
- });
20756
- return parseMemoriesPayload(stdout);
20750
+ try {
20751
+ const stdout = execSync("bd memories --json", {
20752
+ cwd,
20753
+ encoding: "utf8",
20754
+ stdio: ["ignore", "pipe", "pipe"],
20755
+ timeout: 5000
20756
+ });
20757
+ return parseMemoriesPayload(stdout);
20758
+ } catch (error2) {
20759
+ const commandError = error2;
20760
+ const stderr = typeof commandError.stderr === "string" ? commandError.stderr : commandError.stderr?.toString("utf8") ?? "";
20761
+ if (/no beads database found/i.test(stderr)) {
20762
+ return [];
20763
+ }
20764
+ throw error2;
20765
+ }
20757
20766
  }
20758
20767
  function shouldRefreshCache(args) {
20759
20768
  if (args.cacheCount === null || args.cacheLastSyncAtMs === null)
@@ -25001,12 +25010,13 @@ function copyCanonicalSpecialists(cwd) {
25001
25010
  mkdirSync4(targetDir, { recursive: true });
25002
25011
  }
25003
25012
  let copied = 0;
25004
- let skipped = 0;
25013
+ let refreshed = 0;
25005
25014
  for (const file of files) {
25006
25015
  const src = join10(sourceDir, file);
25007
25016
  const dest = join10(targetDir, file);
25008
25017
  if (existsSync9(dest)) {
25009
- skipped++;
25018
+ copyFileSync(src, dest);
25019
+ refreshed++;
25010
25020
  } else {
25011
25021
  copyFileSync(src, dest);
25012
25022
  copied++;
@@ -25015,8 +25025,8 @@ function copyCanonicalSpecialists(cwd) {
25015
25025
  if (copied > 0) {
25016
25026
  ok(`copied ${copied} canonical specialist${copied === 1 ? "" : "s"} to .specialists/default/`);
25017
25027
  }
25018
- if (skipped > 0) {
25019
- skip(`${skipped} specialist${skipped === 1 ? "" : "s"} already exist (not overwritten)`);
25028
+ if (refreshed > 0) {
25029
+ ok(`re-synced ${refreshed} canonical specialist${refreshed === 1 ? "" : "s"} in .specialists/default/`);
25020
25030
  }
25021
25031
  }
25022
25032
  function copyCanonicalNodeConfigs(cwd) {
@@ -25035,12 +25045,13 @@ function copyCanonicalNodeConfigs(cwd) {
25035
25045
  mkdirSync4(targetDir, { recursive: true });
25036
25046
  }
25037
25047
  let copied = 0;
25038
- let skipped = 0;
25048
+ let refreshed = 0;
25039
25049
  for (const file of files) {
25040
25050
  const src = join10(sourceDir, file);
25041
25051
  const dest = join10(targetDir, file);
25042
25052
  if (existsSync9(dest)) {
25043
- skipped++;
25053
+ copyFileSync(src, dest);
25054
+ refreshed++;
25044
25055
  } else {
25045
25056
  copyFileSync(src, dest);
25046
25057
  copied++;
@@ -25049,8 +25060,8 @@ function copyCanonicalNodeConfigs(cwd) {
25049
25060
  if (copied > 0) {
25050
25061
  ok(`copied ${copied} canonical node config${copied === 1 ? "" : "s"} to .specialists/default/nodes/`);
25051
25062
  }
25052
- if (skipped > 0) {
25053
- skip(`${skipped} node config${skipped === 1 ? "" : "s"} already exist (not overwritten)`);
25063
+ if (refreshed > 0) {
25064
+ ok(`re-synced ${refreshed} canonical node config${refreshed === 1 ? "" : "s"} in .specialists/default/nodes/`);
25054
25065
  }
25055
25066
  }
25056
25067
  function installProjectHooks(cwd) {
@@ -25072,6 +25083,7 @@ function installProjectHooks(cwd) {
25072
25083
  let copied = 0;
25073
25084
  let skippedCopies = 0;
25074
25085
  let linked = 0;
25086
+ let rewiredLinks = 0;
25075
25087
  let skippedLinks = 0;
25076
25088
  for (const file of hooks) {
25077
25089
  const src = join10(sourceDir, file);
@@ -25083,21 +25095,25 @@ function installProjectHooks(cwd) {
25083
25095
  copied++;
25084
25096
  }
25085
25097
  const claudeHookPath = join10(claudeHooksDir, file);
25098
+ const relativeTarget = `../../.xtrm/hooks/specialists/${file}`;
25086
25099
  if (existsSync9(claudeHookPath)) {
25087
25100
  const stats = lstatSync(claudeHookPath);
25088
25101
  if (!stats.isSymbolicLink()) {
25089
- skippedLinks++;
25102
+ unlinkSync(claudeHookPath);
25103
+ symlinkSync(relativeTarget, claudeHookPath);
25104
+ rewiredLinks++;
25090
25105
  continue;
25091
25106
  }
25092
25107
  const currentTarget = resolve4(dirname5(claudeHookPath), readlinkSync(claudeHookPath));
25093
25108
  if (currentTarget !== xtrmDest) {
25094
- skippedLinks++;
25109
+ unlinkSync(claudeHookPath);
25110
+ symlinkSync(relativeTarget, claudeHookPath);
25111
+ rewiredLinks++;
25095
25112
  continue;
25096
25113
  }
25097
25114
  skippedLinks++;
25098
25115
  continue;
25099
25116
  }
25100
- const relativeTarget = `../../.xtrm/hooks/specialists/${file}`;
25101
25117
  symlinkSync(relativeTarget, claudeHookPath);
25102
25118
  linked++;
25103
25119
  }
@@ -25107,6 +25123,8 @@ function installProjectHooks(cwd) {
25107
25123
  skip(`${skippedCopies} hook${skippedCopies === 1 ? "" : "s"} already exist in .xtrm/hooks/specialists/ (not overwritten)`);
25108
25124
  if (linked > 0)
25109
25125
  ok(`linked ${linked} hook${linked === 1 ? "" : "s"} in .claude/hooks/ -> .xtrm/hooks/specialists/`);
25126
+ if (rewiredLinks > 0)
25127
+ ok(`rewired ${rewiredLinks} legacy hook${rewiredLinks === 1 ? "" : "s"} in .claude/hooks/ -> .xtrm/hooks/specialists/`);
25110
25128
  if (skippedLinks > 0)
25111
25129
  skip(`${skippedLinks} hook${skippedLinks === 1 ? "" : "s"} already present in .claude/hooks/ (left unchanged)`);
25112
25130
  }
@@ -25499,8 +25517,9 @@ ${bold5("specialists init")}
25499
25517
  } else {
25500
25518
  skip("memories FTS cache sync skipped (not available)");
25501
25519
  }
25502
- } catch {
25503
- warn("memories FTS cache sync failed during init (non-fatal)");
25520
+ } catch (error2) {
25521
+ const message = error2 instanceof Error ? error2.message : String(error2);
25522
+ warn(`memories FTS cache sync failed during init (non-fatal): ${message}`);
25504
25523
  }
25505
25524
  const postconditionWarnings = validateInitPostconditions(cwd);
25506
25525
  if (postconditionWarnings.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaggerxtrm/specialists",
3
- "version": "3.6.17",
3
+ "version": "3.6.19",
4
4
  "description": "OmniSpecialist — 7-tool MCP orchestration layer powered by the Specialist System. Discover and execute .specialist.yaml files across project/user/system scopes via pi.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",