@sellable/mcp 0.1.1 → 0.1.2

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/skills.d.ts CHANGED
@@ -5,6 +5,7 @@ export interface SkillDefinition {
5
5
  content: string;
6
6
  visibility: SkillVisibility;
7
7
  }
8
+ export declare function resolveSkillsDir(): string;
8
9
  export declare function loadSkills(force?: boolean): SkillDefinition[];
9
10
  export declare function listSkills(visibility?: SkillVisibility): SkillDefinition[];
10
11
  export declare function getSkillByName(name: string): SkillDefinition | undefined;
package/dist/skills.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as fs from "fs";
2
2
  import * as path from "path";
3
- function resolveSkillsDir() {
3
+ export function resolveSkillsDir() {
4
4
  const candidates = [];
5
5
  if (process.env.SELLABLE_SKILLS_DIR) {
6
6
  candidates.push(path.resolve(process.env.SELLABLE_SKILLS_DIR));
@@ -1,17 +1,23 @@
1
1
  import { existsSync, readFileSync } from "fs";
2
2
  import { dirname, isAbsolute, join, resolve } from "path";
3
+ import { resolveSkillsDir } from "../skills.js";
3
4
  import { resolveWorkspaceRoot } from "../utils/workspace-root.js";
4
5
  const entryPath = process.argv[1] ? resolve(process.argv[1]) : process.cwd();
5
6
  const entryDir = dirname(entryPath);
6
7
  const workspaceRoot = resolveWorkspaceRoot(entryDir);
7
- const frameworkRoot = join(workspaceRoot, "mcp/sellable/skills/create-campaign");
8
- const frameworkV2Root = join(workspaceRoot, "mcp/sellable/skills/create-campaign-v2");
8
+ const skillsRoot = resolveSkillsDir();
9
+ const frameworkRoot = join(skillsRoot, "create-campaign");
10
+ const frameworkV2Root = join(skillsRoot, "create-campaign-v2");
9
11
  function getFrameworkRoot(flowVersion) {
10
12
  return flowVersion === "v2" ? frameworkV2Root : frameworkRoot;
11
13
  }
12
- function resolveFromRoot(filePath) {
14
+ function resolveSkillAwarePath(filePath) {
13
15
  if (isAbsolute(filePath))
14
16
  return filePath;
17
+ const skillPathPrefix = "mcp/sellable/skills/";
18
+ if (filePath.startsWith(skillPathPrefix)) {
19
+ return resolve(skillsRoot, filePath.slice(skillPathPrefix.length));
20
+ }
15
21
  return resolve(workspaceRoot, filePath);
16
22
  }
17
23
  function readJson(filePath) {
@@ -30,7 +36,7 @@ function loadProviders(registry) {
30
36
  const warnings = [];
31
37
  for (const entry of registry.providers) {
32
38
  try {
33
- const configPath = resolveFromRoot(entry.configPath);
39
+ const configPath = resolveSkillAwarePath(entry.configPath);
34
40
  providers[entry.id] = readJson(configPath);
35
41
  }
36
42
  catch (error) {
@@ -65,7 +71,7 @@ function loadPlugins(registry) {
65
71
  const enabledEntries = registry.plugins.filter((p) => p.enabled !== false);
66
72
  const warnings = [];
67
73
  const plugins = enabledEntries.map((entry) => {
68
- const fullPath = resolveFromRoot(entry.path);
74
+ const fullPath = resolveSkillAwarePath(entry.path);
69
75
  if (!existsSync(fullPath)) {
70
76
  warnings.push(`Plugin file missing for ${entry.id}: ${fullPath}`);
71
77
  return {
@@ -1,6 +1,7 @@
1
1
  import { existsSync, readFileSync } from "fs";
2
2
  import { dirname, join, resolve } from "path";
3
3
  import { getApi, SellableApiError } from "../api.js";
4
+ import { resolveSkillsDir } from "../skills.js";
4
5
  import { resolveWorkspaceRoot } from "../utils/workspace-root.js";
5
6
  import { buildCsvDomainPreview, matchesConfirmationToken, parseConfirmationToken, projectCsvCarryRows, } from "./csv-domains.js";
6
7
  import { buildCsvLinkedinPreview, matchesLinkedinConfirmationToken, parseLinkedinConfirmationToken, uploadCsvLinkedinFile, } from "./csv-linkedin.js";
@@ -10,7 +11,8 @@ import { waitForLeadListReady } from "./readiness.js";
10
11
  const entryPath = process.argv[1] ? resolve(process.argv[1]) : process.cwd();
11
12
  const entryDir = dirname(entryPath);
12
13
  const workspaceRoot = resolveWorkspaceRoot(entryDir);
13
- const signalProviderConfigPath = join(workspaceRoot, "mcp/sellable/skills/create-campaign/core/providers/signal-discovery.json");
14
+ const skillsRoot = resolveSkillsDir();
15
+ const signalProviderConfigPath = join(skillsRoot, "create-campaign/core/providers/signal-discovery.json");
14
16
  const leadImportLimitsPath = join(workspaceRoot, "lead-import-limits.json");
15
17
  const defaultLeadImportLimits = {
16
18
  apollo: { maxImportCount: 2500 },
@@ -2235,7 +2237,7 @@ export function getProviderPrompt(input) {
2235
2237
  if (!filename) {
2236
2238
  throw new Error(`Unknown provider: ${provider}. Valid options: apollo, sales-nav, prospeo, signal-discovery`);
2237
2239
  }
2238
- const promptPath = join(workspaceRoot, "mcp/sellable/skills/providers", filename);
2240
+ const promptPath = join(skillsRoot, "providers", filename);
2239
2241
  try {
2240
2242
  const prompt = readFileSync(promptPath, "utf-8");
2241
2243
  markProviderPromptLoaded({
@@ -1,12 +1,14 @@
1
1
  import { existsSync, readFileSync } from "fs";
2
2
  import { dirname, isAbsolute, join, resolve } from "path";
3
3
  import { getApi } from "../api.js";
4
+ import { resolveSkillsDir } from "../skills.js";
4
5
  import { resolveWorkspaceRoot } from "../utils/workspace-root.js";
5
6
  import { getTableRowsMinimal } from "./rows.js";
6
7
  const entryPath = process.argv[1] ? resolve(process.argv[1]) : process.cwd();
7
8
  const entryDir = dirname(entryPath);
8
9
  const workspaceRoot = resolveWorkspaceRoot(entryDir);
9
- const frameworkRoot = join(workspaceRoot, "mcp/sellable/skills/create-campaign");
10
+ const skillsRoot = resolveSkillsDir();
11
+ const frameworkRoot = join(skillsRoot, "create-campaign");
10
12
  function isTruthyFlag(value) {
11
13
  if (!value)
12
14
  return false;
@@ -77,9 +79,13 @@ export function logNavigationDebug(event, payload = {}, campaignId) {
77
79
  ...payload,
78
80
  })}`);
79
81
  }
80
- function resolveFromRoot(filePath) {
82
+ function resolveSkillAwarePath(filePath) {
81
83
  if (isAbsolute(filePath))
82
84
  return filePath;
85
+ const skillPathPrefix = "mcp/sellable/skills/";
86
+ if (filePath.startsWith(skillPathPrefix)) {
87
+ return resolve(skillsRoot, filePath.slice(skillPathPrefix.length));
88
+ }
83
89
  return resolve(workspaceRoot, filePath);
84
90
  }
85
91
  function readJson(filePath) {
@@ -100,7 +106,7 @@ function loadProviderConfigs() {
100
106
  const failures = [];
101
107
  for (const entry of registry.providers) {
102
108
  try {
103
- const configPath = resolveFromRoot(entry.configPath);
109
+ const configPath = resolveSkillAwarePath(entry.configPath);
104
110
  const cfg = readJson(configPath);
105
111
  configs[entry.id] = cfg;
106
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",