@systemdox/mcp-server 0.1.50 → 0.1.51

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/cli.js CHANGED
@@ -1828,6 +1828,7 @@ __export(setup_mcp_exports, {
1828
1828
  writeServerEntry: () => writeServerEntry
1829
1829
  });
1830
1830
  import { existsSync as existsSync3, readFileSync } from "fs";
1831
+ import { mkdir as mkdir4 } from "fs/promises";
1831
1832
  import { join as join4 } from "path";
1832
1833
  async function validateApiKey(apiKey, apiUrl) {
1833
1834
  try {
@@ -1955,6 +1956,7 @@ async function setupMcpServer(opts) {
1955
1956
  }
1956
1957
  try {
1957
1958
  if ((await readCredentials())[workspace]?.apiKey !== apiKey) await writeCredentials(workspace, apiKey);
1959
+ await mkdir4(join4(homeDir(), ".claude", "skills"), { recursive: true });
1958
1960
  const several = Object.keys(await readCredentials()).length > 1;
1959
1961
  for (const target of selected) {
1960
1962
  const removed = await writeServerEntry(target.path, apiUrl, several ? workspace : void 0);
@@ -2000,7 +2002,7 @@ var init_setup_mcp = __esm({
2000
2002
 
2001
2003
  // src/lib/skills.ts
2002
2004
  import { createHash as createHash3 } from "crypto";
2003
- import { lstat, mkdir as mkdir4, readdir as readdir3, readFile as readFile4, rm as rm3, writeFile as writeFile4 } from "fs/promises";
2005
+ import { lstat, mkdir as mkdir5, readdir as readdir3, readFile as readFile4, rm as rm3, writeFile as writeFile4 } from "fs/promises";
2004
2006
  import { existsSync as existsSync4 } from "fs";
2005
2007
  import { homedir as homedir2 } from "os";
2006
2008
  import { dirname as dirname4, join as join5, relative, resolve as resolve3, sep } from "path";
@@ -2125,7 +2127,7 @@ async function installSkill(version, dest, { overwrite = false } = {}) {
2125
2127
  const written = [];
2126
2128
  for (const f of version.files) {
2127
2129
  const full = within(dest, f.path);
2128
- await mkdir4(dirname4(full), { recursive: true });
2130
+ await mkdir5(dirname4(full), { recursive: true });
2129
2131
  await writeFile4(full, f.content, "utf8");
2130
2132
  written.push(f.path);
2131
2133
  }
@@ -2160,6 +2162,9 @@ function fenceFor(text3) {
2160
2162
  const longest = Math.max(0, ...(text3.match(/`+/g) ?? []).map((r) => r.length));
2161
2163
  return "`".repeat(Math.max(3, longest + 1));
2162
2164
  }
2165
+ function afterInstall(skillMd) {
2166
+ return `No restart is needed: a running Claude Code session picks it up. If one does not list it yet, read ${skillMd} and follow it, or run /reload-skills.`;
2167
+ }
2163
2168
  function describeInstall(name, r) {
2164
2169
  const lines = [
2165
2170
  `Installed ${name} version ${r.version} into ${r.dest} (${r.written.length} file(s)).`
@@ -2169,7 +2174,7 @@ function describeInstall(name, r) {
2169
2174
  lines.push(`Kept, edited here and no longer in the skill: ${r.keptEdited.join(", ")}`);
2170
2175
  }
2171
2176
  if (r.keptUntracked.length) lines.push(`Kept, added here: ${r.keptUntracked.join(", ")}`);
2172
- lines.push("Start a new Claude Code session to load it.");
2177
+ lines.push(afterInstall(join5(r.dest, "SKILL.md")));
2173
2178
  return lines.join("\n");
2174
2179
  }
2175
2180
  var MANIFEST_FILE, ENTRY_FILE, PLUGIN_MANIFEST_FOLDER, MAX_FILES, MAX_FILE_BYTES, MAX_TOTAL_BYTES, NAME_RE, SEGMENT_RE, SKIPPED, SkillInstallRefused;
@@ -2296,7 +2301,7 @@ __export(plugin_path_exports, {
2296
2301
  });
2297
2302
  import { createHash as createHash4, randomBytes } from "crypto";
2298
2303
  import { existsSync as existsSync5 } from "fs";
2299
- import { mkdir as mkdir5, rename as rename2, writeFile as writeFile5 } from "fs/promises";
2304
+ import { mkdir as mkdir6, rename as rename2, writeFile as writeFile5 } from "fs/promises";
2300
2305
  import { dirname as dirname5, join as join6, resolve as resolve5, sep as sep2 } from "path";
2301
2306
  import { inflateRawSync } from "zlib";
2302
2307
  function parsePluginPathArgs(argv) {
@@ -2394,13 +2399,13 @@ async function unpackZip(zip, dest) {
2394
2399
  return full;
2395
2400
  });
2396
2401
  const data = entries2.map((e) => e.directory ? void 0 : entryData(zip, e));
2397
- await mkdir5(root, { recursive: true });
2402
+ await mkdir6(root, { recursive: true });
2398
2403
  for (const [i, entry] of entries2.entries()) {
2399
2404
  if (entry.directory) {
2400
- await mkdir5(targets[i], { recursive: true });
2405
+ await mkdir6(targets[i], { recursive: true });
2401
2406
  continue;
2402
2407
  }
2403
- await mkdir5(dirname5(targets[i]), { recursive: true });
2408
+ await mkdir6(dirname5(targets[i]), { recursive: true });
2404
2409
  await writeFile5(targets[i], data[i], { mode: entry.mode ?? 420 });
2405
2410
  }
2406
2411
  return entries2.filter((e) => !e.directory).length;
@@ -4953,7 +4958,7 @@ ${fence}
4953
4958
  ${f.content}${f.content.endsWith("\n") ? "" : "\n"}${fence}`;
4954
4959
  }).join("\n\n");
4955
4960
  return text(
4956
- `Skill **${version.name}** version ${version.version}: write these ${version.files.length} file(s) into ${dest}/ exactly as shown (the content between the fences), creating folders as needed. If a file there differs from ${MANIFEST_FILE}'s hash for it, it was edited: ask before replacing it. Then write ${MANIFEST_FILE} with this content, and tell the user to start a new Claude Code session.
4961
+ `Skill **${version.name}** version ${version.version}: write these ${version.files.length} file(s) into ${dest}/ exactly as shown (the content between the fences), creating folders as needed. If a file there differs from ${MANIFEST_FILE}'s hash for it, it was edited: ask before replacing it. Then write ${MANIFEST_FILE} with this content. ${afterInstall(`${dest}/SKILL.md`)}
4957
4962
 
4958
4963
  ### ${MANIFEST_FILE}
4959
4964
 
@@ -5229,7 +5234,7 @@ var init_server = __esm({
5229
5234
  init_create_prompt_template();
5230
5235
  init_skills2();
5231
5236
  init_team_setup();
5232
- SERVER_VERSION = true ? "0.1.50" : "0.0.0-dev";
5237
+ SERVER_VERSION = true ? "0.1.51" : "0.0.0-dev";
5233
5238
  }
5234
5239
  });
5235
5240
 
package/dist/http.js CHANGED
@@ -466,6 +466,9 @@ function fenceFor(text3) {
466
466
  const longest = Math.max(0, ...(text3.match(/`+/g) ?? []).map((r) => r.length));
467
467
  return "`".repeat(Math.max(3, longest + 1));
468
468
  }
469
+ function afterInstall(skillMd) {
470
+ return `No restart is needed: a running Claude Code session picks it up. If one does not list it yet, read ${skillMd} and follow it, or run /reload-skills.`;
471
+ }
469
472
  function describeInstall(name, r) {
470
473
  const lines = [
471
474
  `Installed ${name} version ${r.version} into ${r.dest} (${r.written.length} file(s)).`
@@ -475,7 +478,7 @@ function describeInstall(name, r) {
475
478
  lines.push(`Kept, edited here and no longer in the skill: ${r.keptEdited.join(", ")}`);
476
479
  }
477
480
  if (r.keptUntracked.length) lines.push(`Kept, added here: ${r.keptUntracked.join(", ")}`);
478
- lines.push("Start a new Claude Code session to load it.");
481
+ lines.push(afterInstall(join(r.dest, "SKILL.md")));
479
482
  return lines.join("\n");
480
483
  }
481
484
 
@@ -2841,7 +2844,7 @@ ${fence}
2841
2844
  ${f.content}${f.content.endsWith("\n") ? "" : "\n"}${fence}`;
2842
2845
  }).join("\n\n");
2843
2846
  return text(
2844
- `Skill **${version.name}** version ${version.version}: write these ${version.files.length} file(s) into ${dest}/ exactly as shown (the content between the fences), creating folders as needed. If a file there differs from ${MANIFEST_FILE}'s hash for it, it was edited: ask before replacing it. Then write ${MANIFEST_FILE} with this content, and tell the user to start a new Claude Code session.
2847
+ `Skill **${version.name}** version ${version.version}: write these ${version.files.length} file(s) into ${dest}/ exactly as shown (the content between the fences), creating folders as needed. If a file there differs from ${MANIFEST_FILE}'s hash for it, it was edited: ask before replacing it. Then write ${MANIFEST_FILE} with this content. ${afterInstall(`${dest}/SKILL.md`)}
2845
2848
 
2846
2849
  ### ${MANIFEST_FILE}
2847
2850
 
@@ -3887,7 +3890,7 @@ function registerTeamSetupTools(server, apiClient, { localFiles }) {
3887
3890
  }
3888
3891
 
3889
3892
  // src/server.ts
3890
- var SERVER_VERSION = true ? "0.1.50" : "0.0.0-dev";
3893
+ var SERVER_VERSION = true ? "0.1.51" : "0.0.0-dev";
3891
3894
  function createServer(apiClient, { localFiles = false, instructions, keyProblem } = {}) {
3892
3895
  const server = new McpServer(
3893
3896
  {
package/dist/index.js CHANGED
@@ -447,6 +447,9 @@ function fenceFor(text3) {
447
447
  const longest = Math.max(0, ...(text3.match(/`+/g) ?? []).map((r) => r.length));
448
448
  return "`".repeat(Math.max(3, longest + 1));
449
449
  }
450
+ function afterInstall(skillMd) {
451
+ return `No restart is needed: a running Claude Code session picks it up. If one does not list it yet, read ${skillMd} and follow it, or run /reload-skills.`;
452
+ }
450
453
  function describeInstall(name, r) {
451
454
  const lines = [
452
455
  `Installed ${name} version ${r.version} into ${r.dest} (${r.written.length} file(s)).`
@@ -456,7 +459,7 @@ function describeInstall(name, r) {
456
459
  lines.push(`Kept, edited here and no longer in the skill: ${r.keptEdited.join(", ")}`);
457
460
  }
458
461
  if (r.keptUntracked.length) lines.push(`Kept, added here: ${r.keptUntracked.join(", ")}`);
459
- lines.push("Start a new Claude Code session to load it.");
462
+ lines.push(afterInstall(join(r.dest, "SKILL.md")));
460
463
  return lines.join("\n");
461
464
  }
462
465
 
@@ -2860,7 +2863,7 @@ ${fence}
2860
2863
  ${f.content}${f.content.endsWith("\n") ? "" : "\n"}${fence}`;
2861
2864
  }).join("\n\n");
2862
2865
  return text(
2863
- `Skill **${version.name}** version ${version.version}: write these ${version.files.length} file(s) into ${dest}/ exactly as shown (the content between the fences), creating folders as needed. If a file there differs from ${MANIFEST_FILE}'s hash for it, it was edited: ask before replacing it. Then write ${MANIFEST_FILE} with this content, and tell the user to start a new Claude Code session.
2866
+ `Skill **${version.name}** version ${version.version}: write these ${version.files.length} file(s) into ${dest}/ exactly as shown (the content between the fences), creating folders as needed. If a file there differs from ${MANIFEST_FILE}'s hash for it, it was edited: ask before replacing it. Then write ${MANIFEST_FILE} with this content. ${afterInstall(`${dest}/SKILL.md`)}
2864
2867
 
2865
2868
  ### ${MANIFEST_FILE}
2866
2869
 
@@ -3906,7 +3909,7 @@ function registerTeamSetupTools(server, apiClient2, { localFiles }) {
3906
3909
  }
3907
3910
 
3908
3911
  // src/server.ts
3909
- var SERVER_VERSION = true ? "0.1.50" : "0.0.0-dev";
3912
+ var SERVER_VERSION = true ? "0.1.51" : "0.0.0-dev";
3910
3913
  function createServer(apiClient2, { localFiles = false, instructions, keyProblem: keyProblem2 } = {}) {
3911
3914
  const server = new McpServer(
3912
3915
  {
@@ -385,6 +385,9 @@ async function installSkill(version, dest, { overwrite = false } = {}) {
385
385
  keptEdited
386
386
  };
387
387
  }
388
+ function afterInstall(skillMd) {
389
+ return `No restart is needed: a running Claude Code session picks it up. If one does not list it yet, read ${skillMd} and follow it, or run /reload-skills.`;
390
+ }
388
391
  function describeInstall(name, r) {
389
392
  const lines = [
390
393
  `Installed ${name} version ${r.version} into ${r.dest} (${r.written.length} file(s)).`
@@ -394,7 +397,7 @@ function describeInstall(name, r) {
394
397
  lines.push(`Kept, edited here and no longer in the skill: ${r.keptEdited.join(", ")}`);
395
398
  }
396
399
  if (r.keptUntracked.length) lines.push(`Kept, added here: ${r.keptUntracked.join(", ")}`);
397
- lines.push("Start a new Claude Code session to load it.");
400
+ lines.push(afterInstall(join(r.dest, "SKILL.md")));
398
401
  return lines.join("\n");
399
402
  }
400
403
 
@@ -103,5 +103,12 @@ export declare function installSkill(version: SkillVersionFiles, dest: string, {
103
103
  }): Promise<InstallResult>;
104
104
  /** A fence longer than any backtick run in `text`, so content cannot close it. */
105
105
  export declare function fenceFor(text: string): string;
106
+ /**
107
+ * What follows an install. Claude Code watches its skills folders, so a running
108
+ * session needs no restart, unless the top-level folder did not exist when the
109
+ * session started (code.claude.com/docs/en/skills, "Edit a skill during a
110
+ * session"): `/reload-skills` covers that, and reading the file works anywhere.
111
+ */
112
+ export declare function afterInstall(skillMd: string): string;
106
113
  /** Human summary of an install, shared by the tool and the CLI. */
107
114
  export declare function describeInstall(name: string, r: InstallResult): string;
@@ -182,6 +182,9 @@ function fenceFor(text) {
182
182
  const longest = Math.max(0, ...(text.match(/`+/g) ?? []).map((r) => r.length));
183
183
  return "`".repeat(Math.max(3, longest + 1));
184
184
  }
185
+ function afterInstall(skillMd) {
186
+ return `No restart is needed: a running Claude Code session picks it up. If one does not list it yet, read ${skillMd} and follow it, or run /reload-skills.`;
187
+ }
185
188
  function describeInstall(name, r) {
186
189
  const lines = [
187
190
  `Installed ${name} version ${r.version} into ${r.dest} (${r.written.length} file(s)).`
@@ -191,7 +194,7 @@ function describeInstall(name, r) {
191
194
  lines.push(`Kept, edited here and no longer in the skill: ${r.keptEdited.join(", ")}`);
192
195
  }
193
196
  if (r.keptUntracked.length) lines.push(`Kept, added here: ${r.keptUntracked.join(", ")}`);
194
- lines.push("Start a new Claude Code session to load it.");
197
+ lines.push(afterInstall(join(r.dest, "SKILL.md")));
195
198
  return lines.join("\n");
196
199
  }
197
200
  export {
@@ -201,6 +204,7 @@ export {
201
204
  MAX_FILE_BYTES,
202
205
  MAX_TOTAL_BYTES,
203
206
  SkillInstallRefused,
207
+ afterInstall,
204
208
  defaultSkillDir,
205
209
  describeInstall,
206
210
  fenceFor,
package/dist/server.js CHANGED
@@ -1607,6 +1607,9 @@ function fenceFor(text3) {
1607
1607
  const longest = Math.max(0, ...(text3.match(/`+/g) ?? []).map((r) => r.length));
1608
1608
  return "`".repeat(Math.max(3, longest + 1));
1609
1609
  }
1610
+ function afterInstall(skillMd) {
1611
+ return `No restart is needed: a running Claude Code session picks it up. If one does not list it yet, read ${skillMd} and follow it, or run /reload-skills.`;
1612
+ }
1610
1613
  function describeInstall(name, r) {
1611
1614
  const lines = [
1612
1615
  `Installed ${name} version ${r.version} into ${r.dest} (${r.written.length} file(s)).`
@@ -1616,7 +1619,7 @@ function describeInstall(name, r) {
1616
1619
  lines.push(`Kept, edited here and no longer in the skill: ${r.keptEdited.join(", ")}`);
1617
1620
  }
1618
1621
  if (r.keptUntracked.length) lines.push(`Kept, added here: ${r.keptUntracked.join(", ")}`);
1619
- lines.push("Start a new Claude Code session to load it.");
1622
+ lines.push(afterInstall(join(r.dest, "SKILL.md")));
1620
1623
  return lines.join("\n");
1621
1624
  }
1622
1625
 
@@ -2498,7 +2501,7 @@ ${fence}
2498
2501
  ${f.content}${f.content.endsWith("\n") ? "" : "\n"}${fence}`;
2499
2502
  }).join("\n\n");
2500
2503
  return text(
2501
- `Skill **${version.name}** version ${version.version}: write these ${version.files.length} file(s) into ${dest}/ exactly as shown (the content between the fences), creating folders as needed. If a file there differs from ${MANIFEST_FILE}'s hash for it, it was edited: ask before replacing it. Then write ${MANIFEST_FILE} with this content, and tell the user to start a new Claude Code session.
2504
+ `Skill **${version.name}** version ${version.version}: write these ${version.files.length} file(s) into ${dest}/ exactly as shown (the content between the fences), creating folders as needed. If a file there differs from ${MANIFEST_FILE}'s hash for it, it was edited: ask before replacing it. Then write ${MANIFEST_FILE} with this content. ${afterInstall(`${dest}/SKILL.md`)}
2502
2505
 
2503
2506
  ### ${MANIFEST_FILE}
2504
2507
 
@@ -3544,7 +3547,7 @@ function registerTeamSetupTools(server, apiClient, { localFiles }) {
3544
3547
  }
3545
3548
 
3546
3549
  // src/server.ts
3547
- var SERVER_VERSION = true ? "0.1.50" : "0.0.0-dev";
3550
+ var SERVER_VERSION = true ? "0.1.51" : "0.0.0-dev";
3548
3551
  function createServer(apiClient, { localFiles = false, instructions, keyProblem } = {}) {
3549
3552
  const server = new McpServer(
3550
3553
  {
package/dist/setup-mcp.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  // src/setup-mcp.ts
4
4
  import { existsSync as existsSync3, readFileSync } from "fs";
5
+ import { mkdir as mkdir4 } from "fs/promises";
5
6
  import { join as join4 } from "path";
6
7
 
7
8
  // src/lib/cache.ts
@@ -591,6 +592,7 @@ async function setupMcpServer(opts) {
591
592
  }
592
593
  try {
593
594
  if ((await readCredentials())[workspace]?.apiKey !== apiKey) await writeCredentials(workspace, apiKey);
595
+ await mkdir4(join4(homeDir(), ".claude", "skills"), { recursive: true });
594
596
  const several = Object.keys(await readCredentials()).length > 1;
595
597
  for (const target of selected) {
596
598
  const removed = await writeServerEntry(target.path, apiUrl, several ? workspace : void 0);
@@ -203,6 +203,9 @@ function fenceFor(text2) {
203
203
  const longest = Math.max(0, ...(text2.match(/`+/g) ?? []).map((r) => r.length));
204
204
  return "`".repeat(Math.max(3, longest + 1));
205
205
  }
206
+ function afterInstall(skillMd) {
207
+ return `No restart is needed: a running Claude Code session picks it up. If one does not list it yet, read ${skillMd} and follow it, or run /reload-skills.`;
208
+ }
206
209
  function describeInstall(name, r) {
207
210
  const lines = [
208
211
  `Installed ${name} version ${r.version} into ${r.dest} (${r.written.length} file(s)).`
@@ -212,7 +215,7 @@ function describeInstall(name, r) {
212
215
  lines.push(`Kept, edited here and no longer in the skill: ${r.keptEdited.join(", ")}`);
213
216
  }
214
217
  if (r.keptUntracked.length) lines.push(`Kept, added here: ${r.keptUntracked.join(", ")}`);
215
- lines.push("Start a new Claude Code session to load it.");
218
+ lines.push(afterInstall(join(r.dest, "SKILL.md")));
216
219
  return lines.join("\n");
217
220
  }
218
221
 
@@ -342,7 +345,7 @@ ${fence}
342
345
  ${f.content}${f.content.endsWith("\n") ? "" : "\n"}${fence}`;
343
346
  }).join("\n\n");
344
347
  return text(
345
- `Skill **${version.name}** version ${version.version}: write these ${version.files.length} file(s) into ${dest}/ exactly as shown (the content between the fences), creating folders as needed. If a file there differs from ${MANIFEST_FILE}'s hash for it, it was edited: ask before replacing it. Then write ${MANIFEST_FILE} with this content, and tell the user to start a new Claude Code session.
348
+ `Skill **${version.name}** version ${version.version}: write these ${version.files.length} file(s) into ${dest}/ exactly as shown (the content between the fences), creating folders as needed. If a file there differs from ${MANIFEST_FILE}'s hash for it, it was edited: ask before replacing it. Then write ${MANIFEST_FILE} with this content. ${afterInstall(`${dest}/SKILL.md`)}
346
349
 
347
350
  ### ${MANIFEST_FILE}
348
351
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@systemdox/mcp-server",
3
- "version": "0.1.50",
3
+ "version": "0.1.51",
4
4
  "mcpName": "io.github.puglieseweb/systemdox",
5
5
  "type": "module",
6
6
  "description": "Give AI coding agents your architecture context over MCP — checks, specs, ADRs, project rules, and docs from SystemDox, delivered at write time",