@sellable/mcp 0.1.35 → 0.1.37

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.
@@ -190,7 +190,7 @@ export declare function fetchLinkedInPosts(linkedinUrl: string, limit?: number):
190
190
  }>;
191
191
  export declare function fetchLinkedInProfile(linkedinUrl: string, options?: {
192
192
  full?: boolean;
193
- }): Promise<unknown>;
193
+ }): Promise<any>;
194
194
  export declare function fetchCompany(companyUrl: string): Promise<unknown>;
195
195
  export declare function fetchCompanyPosts(companyUrl: string, limit?: number, sortBy?: "recent" | "top"): Promise<{
196
196
  posts: SerializedPost[];
@@ -200,7 +200,7 @@ export declare function getUserPosts(linkedinUrl: string, maxPosts?: number): Pr
200
200
  posts: SerializedPost[];
201
201
  count: number;
202
202
  }>;
203
- export declare function getLinkedInProfile(linkedinUrl: string): Promise<unknown>;
203
+ export declare function getLinkedInProfile(linkedinUrl: string): Promise<any>;
204
204
  interface PostEngager {
205
205
  name: string;
206
206
  headline: string;
@@ -163,7 +163,24 @@ export async function fetchLinkedInProfile(linkedinUrl, options = {}) {
163
163
  if (options.full) {
164
164
  params.set("full", "true");
165
165
  }
166
- return api.get(`/api/v1/scrape/linkedin/profile?${params.toString()}`);
166
+ const raw = await api.get(`/api/v1/scrape/linkedin/profile?${params.toString()}`);
167
+ // Server returns the same profile object triplicated as `.data`,
168
+ // `.person`, AND `.profile.person` for backwards-compat with web
169
+ // callers (signal-discovery, profile-enrichment, canonical-cache, etc).
170
+ // For the MCP layer, that ~3xs the JSON size and routinely breaches
171
+ // Claude Code's max-token cap on tool results — which triggers the
172
+ // harness's "save to file + read in chunks via python3" overflow
173
+ // fallback. Strip the duplicates here so the agent gets one clean
174
+ // copy of the data under a single `profile` key.
175
+ if (raw &&
176
+ typeof raw === "object" &&
177
+ raw.status === "success" &&
178
+ (raw.data || raw.person || raw.profile?.person)) {
179
+ const canonical = raw.data ?? raw.person ?? raw.profile?.person;
180
+ const { status, data, person, profile, ...rest } = raw;
181
+ return { status, profile: canonical, ...rest };
182
+ }
183
+ return raw;
167
184
  }
168
185
  export async function fetchCompany(companyUrl) {
169
186
  const api = getApi();
@@ -47,8 +47,8 @@ export interface CompleteSenderResearchInput {
47
47
  credibilitySignalsFound?: number;
48
48
  notes?: string;
49
49
  }
50
- export declare const DEFAULT_SUBSKILL_PROMPT_CHUNK_CHARS = 24000;
51
- export declare const MAX_SUBSKILL_PROMPT_CHUNK_CHARS = 24000;
50
+ export declare const DEFAULT_SUBSKILL_PROMPT_CHUNK_CHARS = 40000;
51
+ export declare const MAX_SUBSKILL_PROMPT_CHUNK_CHARS = 48000;
52
52
  export declare const promptToolDefinitions: ({
53
53
  name: string;
54
54
  description: string;
@@ -1,8 +1,15 @@
1
1
  import { getApi } from "../api.js";
2
2
  import { getSkillByName, listSkills, stripFrontmatter } from "../skills.js";
3
3
  import { markCreateCampaignPromptLoaded, markResearchPromptLoaded, markSenderResearchCompleted, } from "./flow-preflight.js";
4
- export const DEFAULT_SUBSKILL_PROMPT_CHUNK_CHARS = 24_000;
5
- export const MAX_SUBSKILL_PROMPT_CHUNK_CHARS = 24_000;
4
+ // Chunk size sits below Claude Code's max-token cap on tool results
5
+ // (empirically around ~50k chars — fetch_linkedin_profile breached at
6
+ // 53,295 chars, which forced a python3 chunked-read fallback). 40k gives
7
+ // headroom and cuts a 105k subskill prompt from 5 round trips at 24k →
8
+ // 3 round trips at 40k, saving ~40% of agent latency on first load.
9
+ // MAX leaves room for the agent to request slightly larger windows when
10
+ // it knows the prompt fits, without breaching the cap.
11
+ export const DEFAULT_SUBSKILL_PROMPT_CHUNK_CHARS = 40_000;
12
+ export const MAX_SUBSKILL_PROMPT_CHUNK_CHARS = 48_000;
6
13
  export const promptToolDefinitions = [
7
14
  {
8
15
  name: "get_message_prompt",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellable/mcp",
3
- "version": "0.1.35",
3
+ "version": "0.1.37",
4
4
  "type": "module",
5
5
  "description": "Sellable MCP server for Claude Code and Codex campaign workflows",
6
6
  "main": "dist/index.js",