lace-mcp 0.0.2-alpha.3 → 0.0.2-alpha.4

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/cli.js +15 -8
  2. package/package.json +3 -2
package/dist/cli.js CHANGED
@@ -280,12 +280,19 @@ function credentialsToEnv(creds) {
280
280
  };
281
281
  }
282
282
  function extractSkillVersion(content) {
283
- const match = content.match(/<!-- lace-mcp-skill-version: (\d+) -->/);
283
+ const match = content.match(/lace-mcp-skill-version: (\d+)/);
284
284
  return match ? parseInt(match[1], 10) : 0;
285
285
  }
286
- function prependVersion(content) {
287
- return `<!-- lace-mcp-skill-version: ${SKILL_VERSION} -->
288
- ${content}`;
286
+ function injectVersion(content) {
287
+ if (content.startsWith("---\n")) {
288
+ return content.replace(/^---\n/, `---
289
+ lace-mcp-skill-version: ${SKILL_VERSION}
290
+ `);
291
+ }
292
+ return `${content.trimEnd()}
293
+
294
+ <!-- lace-mcp-skill-version: ${SKILL_VERSION} -->
295
+ `;
289
296
  }
290
297
  function loadSkillContent() {
291
298
  const skillPath = join3(resolve(import.meta.dirname, ".."), "SKILL.md");
@@ -344,7 +351,7 @@ function installClaudeSkill() {
344
351
  }
345
352
  }
346
353
  mkdirSync2(skillDir, { recursive: true });
347
- writeFileSync2(skillPath, prependVersion(content.trimStart()));
354
+ writeFileSync2(skillPath, injectVersion(content.trimStart()));
348
355
  console.log(` \u2713 /lace skill written to ${skillPath}`);
349
356
  }
350
357
  function installCursorRule() {
@@ -360,7 +367,7 @@ function installCursorRule() {
360
367
  }
361
368
  }
362
369
  mkdirSync2(rulesDir, { recursive: true });
363
- writeFileSync2(rulePath, prependVersion(buildCursorRule(extractSkillBody(content))));
370
+ writeFileSync2(rulePath, injectVersion(buildCursorRule(extractSkillBody(content))));
364
371
  console.log(` \u2713 Cursor rule written to ${rulePath}`);
365
372
  }
366
373
  function installCodexSkill() {
@@ -376,7 +383,7 @@ function installCodexSkill() {
376
383
  }
377
384
  }
378
385
  mkdirSync2(skillDir, { recursive: true });
379
- writeFileSync2(skillPath, prependVersion(extractSkillBody(content)));
386
+ writeFileSync2(skillPath, injectVersion(extractSkillBody(content)));
380
387
  console.log(` \u2713 Codex skill written to ${skillPath}`);
381
388
  }
382
389
  function mcpArgs(editor) {
@@ -384,7 +391,7 @@ function mcpArgs(editor) {
384
391
  }
385
392
  function installClaude(env) {
386
393
  try {
387
- const envFlags = Object.entries(env).map(([key, value]) => `--env ${key}=${value}`).join(" ");
394
+ const envFlags = Object.entries(env).map(([key, value]) => `-e ${key}=${value}`).join(" ");
388
395
  execSync2(`claude mcp add --transport stdio --scope user ${envFlags} lace -- npx ${mcpArgs("claude").join(" ")}`, {
389
396
  stdio: "inherit"
390
397
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lace-mcp",
3
- "version": "0.0.2-alpha.3",
3
+ "version": "0.0.2-alpha.4",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/cli.js",
@@ -27,6 +27,7 @@
27
27
  "install-claude-desktop": "tsx src/cli.ts install claude-desktop",
28
28
  "install-cursor": "tsx src/cli.ts install cursor",
29
29
  "install-codex": "tsx src/cli.ts install codex",
30
- "build": "rm -rf dist && esbuild src/cli.ts --bundle --platform=node --format=esm --outfile=dist/cli.js"
30
+ "build": "rm -rf dist && esbuild src/cli.ts --bundle --platform=node --format=esm --outfile=dist/cli.js",
31
+ "build:mcpb": "esbuild src/index.ts --bundle --platform=node --format=esm --outfile=mcpb/server/index.js && npx @anthropic-ai/mcpb pack mcpb dist/lace.mcpb"
31
32
  }
32
33
  }