@sellable/mcp 0.1.2 → 0.1.3

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/index-dev.js CHANGED
File without changes
package/dist/index.js CHANGED
File without changes
package/dist/skills.js CHANGED
@@ -1,13 +1,25 @@
1
1
  import * as fs from "fs";
2
2
  import * as path from "path";
3
+ import { fileURLToPath } from "url";
3
4
  export function resolveSkillsDir() {
4
5
  const candidates = [];
5
6
  if (process.env.SELLABLE_SKILLS_DIR) {
6
7
  candidates.push(path.resolve(process.env.SELLABLE_SKILLS_DIR));
7
8
  }
9
+ // Works for both source execution (src/../skills) and npm package execution
10
+ // (dist/../skills), including npx bin shims.
11
+ const moduleDir = path.dirname(fileURLToPath(import.meta.url));
12
+ candidates.push(path.resolve(moduleDir, "../skills"));
8
13
  if (process.argv[1]) {
9
14
  // When running as CLI, argv[1] is typically ".../dist/index.js".
10
15
  candidates.push(path.resolve(path.dirname(process.argv[1]), "../skills"));
16
+ try {
17
+ const realEntryPath = fs.realpathSync(process.argv[1]);
18
+ candidates.push(path.resolve(path.dirname(realEntryPath), "../skills"));
19
+ }
20
+ catch {
21
+ // Ignore unreadable argv paths; module-relative and cwd fallbacks remain.
22
+ }
11
23
  }
12
24
  // Local repo execution and test contexts.
13
25
  candidates.push(path.resolve(process.cwd(), "mcp/sellable/skills"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",