@sellable/mcp 0.1.35 → 0.1.36
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/tools/linkedin.d.ts +2 -2
- package/dist/tools/linkedin.js +18 -1
- package/package.json +1 -1
package/dist/tools/linkedin.d.ts
CHANGED
|
@@ -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<
|
|
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<
|
|
203
|
+
export declare function getLinkedInProfile(linkedinUrl: string): Promise<any>;
|
|
204
204
|
interface PostEngager {
|
|
205
205
|
name: string;
|
|
206
206
|
headline: string;
|
package/dist/tools/linkedin.js
CHANGED
|
@@ -163,7 +163,24 @@ export async function fetchLinkedInProfile(linkedinUrl, options = {}) {
|
|
|
163
163
|
if (options.full) {
|
|
164
164
|
params.set("full", "true");
|
|
165
165
|
}
|
|
166
|
-
|
|
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();
|