@sellable/mcp 0.1.0
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/.claude-plugin/plugin.json +12 -0
- package/.mcp.json +9 -0
- package/README.md +355 -0
- package/dist/api.d.ts +21 -0
- package/dist/api.js +73 -0
- package/dist/auth.d.ts +60 -0
- package/dist/auth.js +246 -0
- package/dist/engage-memory.d.ts +63 -0
- package/dist/engage-memory.js +354 -0
- package/dist/index-dev.d.ts +2 -0
- package/dist/index-dev.js +17 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +8 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.js +499 -0
- package/dist/skills.d.ts +11 -0
- package/dist/skills.js +97 -0
- package/dist/tools/auth.d.ts +30 -0
- package/dist/tools/auth.js +124 -0
- package/dist/tools/blueprint-commit.d.ts +174 -0
- package/dist/tools/blueprint-commit.js +286 -0
- package/dist/tools/bootstrap.d.ts +64 -0
- package/dist/tools/bootstrap.js +246 -0
- package/dist/tools/campaigns.d.ts +589 -0
- package/dist/tools/campaigns.js +892 -0
- package/dist/tools/cells.d.ts +58 -0
- package/dist/tools/cells.js +48 -0
- package/dist/tools/context.d.ts +88 -0
- package/dist/tools/context.js +271 -0
- package/dist/tools/csv-domains.d.ts +73 -0
- package/dist/tools/csv-domains.js +464 -0
- package/dist/tools/csv-linkedin.d.ts +102 -0
- package/dist/tools/csv-linkedin.js +712 -0
- package/dist/tools/direct-campaigns.d.ts +240 -0
- package/dist/tools/direct-campaigns.js +250 -0
- package/dist/tools/engage-bootstrap.d.ts +94 -0
- package/dist/tools/engage-bootstrap.js +205 -0
- package/dist/tools/engage-discovery.d.ts +78 -0
- package/dist/tools/engage-discovery.js +150 -0
- package/dist/tools/engage-memory.d.ts +181 -0
- package/dist/tools/engage-memory.js +143 -0
- package/dist/tools/engage-state.d.ts +72 -0
- package/dist/tools/engage-state.js +62 -0
- package/dist/tools/enrichment.d.ts +167 -0
- package/dist/tools/enrichment.js +174 -0
- package/dist/tools/flow-preflight.d.ts +68 -0
- package/dist/tools/flow-preflight.js +138 -0
- package/dist/tools/framework.d.ts +44 -0
- package/dist/tools/framework.js +153 -0
- package/dist/tools/interaction-mode.d.ts +27 -0
- package/dist/tools/interaction-mode.js +102 -0
- package/dist/tools/leads.d.ts +2417 -0
- package/dist/tools/leads.js +2307 -0
- package/dist/tools/linkedin.d.ts +210 -0
- package/dist/tools/linkedin.js +229 -0
- package/dist/tools/navigation.d.ts +91 -0
- package/dist/tools/navigation.js +381 -0
- package/dist/tools/one-off.d.ts +229 -0
- package/dist/tools/one-off.js +273 -0
- package/dist/tools/processing.d.ts +70 -0
- package/dist/tools/processing.js +56 -0
- package/dist/tools/prompts.d.ts +211 -0
- package/dist/tools/prompts.js +210 -0
- package/dist/tools/provider-preflight.d.ts +21 -0
- package/dist/tools/provider-preflight.js +59 -0
- package/dist/tools/readiness.d.ts +261 -0
- package/dist/tools/readiness.js +510 -0
- package/dist/tools/rows.d.ts +126 -0
- package/dist/tools/rows.js +105 -0
- package/dist/tools/rubrics.d.ts +497 -0
- package/dist/tools/rubrics.js +681 -0
- package/dist/tools/senders.d.ts +44 -0
- package/dist/tools/senders.js +69 -0
- package/dist/tools/sequencer.d.ts +127 -0
- package/dist/tools/sequencer.js +194 -0
- package/dist/tools/tables.d.ts +35 -0
- package/dist/tools/tables.js +36 -0
- package/dist/tools/verify-row.d.ts +36 -0
- package/dist/tools/verify-row.js +38 -0
- package/dist/tools/workspaces.d.ts +140 -0
- package/dist/tools/workspaces.js +139 -0
- package/dist/utils/workspace-root.d.ts +1 -0
- package/dist/utils/workspace-root.js +39 -0
- package/package.json +46 -0
- package/skills/building-gtm-tables/SKILL.md +216 -0
- package/skills/building-gtm-tables/core/auto-execute.yaml +19 -0
- package/skills/building-gtm-tables/core/blueprint-schema.json +72 -0
- package/skills/building-gtm-tables/references/brief-to-blueprint.md +334 -0
- package/skills/building-gtm-tables/references/column-type-catalog.md +318 -0
- package/skills/building-gtm-tables/references/common-blueprints.fixtures.ts +199 -0
- package/skills/building-gtm-tables/references/common-blueprints.md +44 -0
- package/skills/building-gtm-tables/references/failure-taxonomy.md +197 -0
- package/skills/building-gtm-tables/references/uat-seed-prompts.md +37 -0
- package/skills/building-gtm-tables/references/verify-loop.md +74 -0
- package/skills/campaign-messages/SKILL.md +173 -0
- package/skills/campaign-messages/flow.v1.json +75 -0
- package/skills/craft-message/SKILL.md +401 -0
- package/skills/create-campaign/ARCHITECTURE.md +232 -0
- package/skills/create-campaign/DISCUSS.md +296 -0
- package/skills/create-campaign/FLOW_ASCII.md +240 -0
- package/skills/create-campaign/HOST-PARITY-CHECKLIST.md +49 -0
- package/skills/create-campaign/README.md +142 -0
- package/skills/create-campaign/SKILL.md +286 -0
- package/skills/create-campaign/context/README.md +67 -0
- package/skills/create-campaign/context/_TEMPLATE.md +12 -0
- package/skills/create-campaign/context/context.md +35 -0
- package/skills/create-campaign/context/learnings.md +16 -0
- package/skills/create-campaign/context/registry.json +19 -0
- package/skills/create-campaign/core/flow.v1.json +217 -0
- package/skills/create-campaign/core/policy.md +191 -0
- package/skills/create-campaign/core/providers/apollo.json +35 -0
- package/skills/create-campaign/core/providers/prospeo.json +34 -0
- package/skills/create-campaign/core/providers/registry.json +31 -0
- package/skills/create-campaign/core/providers/sales-nav.json +37 -0
- package/skills/create-campaign/core/providers/signal-discovery.json +42 -0
- package/skills/create-campaign/references/brief-template.md +64 -0
- package/skills/create-campaign/references/campaign-quality.md +84 -0
- package/skills/create-campaign/references/copy-calibration-examples.md +120 -0
- package/skills/create-campaign/references/offer-patterns.md +108 -0
- package/skills/create-campaign/references/provider-selection-strategy.md +212 -0
- package/skills/create-campaign/references/question-examples.md +167 -0
- package/skills/create-campaign/references/token-fill-examples.md +81 -0
- package/skills/create-campaign-brief/ARCHITECTURE.md +72 -0
- package/skills/create-campaign-brief/DISCUSS.md +64 -0
- package/skills/create-campaign-brief/README.md +176 -0
- package/skills/create-campaign-brief/SKILL.md +537 -0
- package/skills/create-campaign-brief/references/brief-synthesis-rules.md +100 -0
- package/skills/create-campaign-brief/references/brief-template.md +220 -0
- package/skills/create-campaign-brief/references/campaign-idea-options.md +30 -0
- package/skills/create-campaign-brief/references/copy-appendix-template.md +62 -0
- package/skills/create-campaign-brief/references/draft-lifecycle.md +23 -0
- package/skills/create-campaign-brief/references/examples/MANIFEST.json +89 -0
- package/skills/create-campaign-brief/references/examples/briefs/clover.md +223 -0
- package/skills/create-campaign-brief/references/examples/briefs/galley.md +222 -0
- package/skills/create-campaign-brief/references/examples/briefs/gelee.md +220 -0
- package/skills/create-campaign-brief/references/examples/briefs/hey-digital.md +234 -0
- package/skills/create-campaign-brief/references/examples/briefs/persona.md +231 -0
- package/skills/create-campaign-brief/references/examples/briefs/revvix.md +220 -0
- package/skills/create-campaign-brief/references/examples/briefs/sellable-dev.md +220 -0
- package/skills/create-campaign-brief/references/examples/briefs/superposition.md +233 -0
- package/skills/create-campaign-brief/references/examples/briefs/superpower.md +219 -0
- package/skills/create-campaign-brief/references/examples/briefs/westpark-villas.md +220 -0
- package/skills/create-campaign-brief/references/icp-lock-question-bank.md +43 -0
- package/skills/create-campaign-brief/references/messaging-inputs.md +58 -0
- package/skills/create-campaign-brief/references/output-acceptance-rubric.md +62 -0
- package/skills/create-campaign-brief/references/phase75-active-runtime-message-pack.md +248 -0
- package/skills/create-campaign-brief/references/phase75-canonical-brief-template.md +319 -0
- package/skills/create-campaign-brief/references/phase75-good-brief-and-messaging-examples.md +445 -0
- package/skills/create-campaign-brief/references/quick-research-protocol.md +39 -0
- package/skills/create-campaign-brief/references/reference-sheet-protocol.md +60 -0
- package/skills/create-campaign-brief/references/zero-shot-iteration-rules.md +66 -0
- package/skills/create-campaign-v2/SKILL.md +1619 -0
- package/skills/create-campaign-v2/core/auto-execute.README.md +219 -0
- package/skills/create-campaign-v2/core/auto-execute.yaml +121 -0
- package/skills/create-campaign-v2/core/flow.v2.json +1643 -0
- package/skills/create-campaign-v2/core/policy.md +82 -0
- package/skills/create-campaign-v2/references/ai-tells.md +253 -0
- package/skills/create-campaign-v2/references/approval-gate-framing.md +346 -0
- package/skills/create-campaign-v2/references/draft-lifecycle.md +110 -0
- package/skills/create-campaign-v2/references/escalation-ladder.md +119 -0
- package/skills/create-campaign-v2/references/filter-leads.md +495 -0
- package/skills/create-campaign-v2/references/final-handoff-contract.md +176 -0
- package/skills/create-campaign-v2/references/gold-standard-message-examples.md +394 -0
- package/skills/create-campaign-v2/references/gold-standard-message-patterns.md +314 -0
- package/skills/create-campaign-v2/references/gold-standard-message-validation-example.md +212 -0
- package/skills/create-campaign-v2/references/lead-validation-preview.md +172 -0
- package/skills/create-campaign-v2/references/parallel-critique-protocol.md +368 -0
- package/skills/create-campaign-v2/references/sample-validation-loop.md +289 -0
- package/skills/create-campaign-v2/references/step-13-import-leads.md +151 -0
- package/skills/create-campaign-v2/references/step-15-re-cascade.md +90 -0
- package/skills/create-campaign-v2/references/thomas-revision-filters.md +521 -0
- package/skills/create-campaign-v2/references/thomas-variant-selection.md +202 -0
- package/skills/create-campaign-v2/references/tier-routing-matrix.md +66 -0
- package/skills/create-campaign-v2/references/validation-criteria.md +367 -0
- package/skills/create-campaign-v2/references/watch-link-handoff.md +106 -0
- package/skills/create-campaign-v2-validation/SKILL.md +296 -0
- package/skills/create-post/SKILL.md +1308 -0
- package/skills/create-rubric/SKILL.md +251 -0
- package/skills/engage/SKILL.md +549 -0
- package/skills/engage/core/README.md +23 -0
- package/skills/engage/core/proven-searches.json +11 -0
- package/skills/engage/core/style-guide.template.md +47 -0
- package/skills/engage/core/tracked-people.json +10 -0
- package/skills/enrich-prospects/SKILL.md +97 -0
- package/skills/find-leads/SKILL.md +467 -0
- package/skills/generate-messages/SKILL.md +2361 -0
- package/skills/interview/SKILL.md +132 -0
- package/skills/interview/core/ENGAGE_STYLE_GUIDE.template.md +54 -0
- package/skills/interview/core/ICP.template.md +54 -0
- package/skills/interview/core/VOICE_PROFILE.template.md +101 -0
- package/skills/providers/apollo.md +520 -0
- package/skills/providers/prospeo.md +398 -0
- package/skills/providers/sales-nav.md +372 -0
- package/skills/providers/signal-discovery.md +495 -0
- package/skills/research/SKILL.md +258 -0
- package/skills/research/config.json +9 -0
- package/skills/research/override.md +13 -0
- package/skills/research-prospect/SKILL.md +99 -0
- package/skills/research-sender/SKILL.md +158 -0
- package/skills/workflow-sequences/SKILL.md +85 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
export declare const linkedinToolDefinitions: ({
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
inputSchema: {
|
|
5
|
+
type: string;
|
|
6
|
+
properties: {
|
|
7
|
+
linkedinUrl: {
|
|
8
|
+
type: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
limit: {
|
|
12
|
+
type: string;
|
|
13
|
+
description: string;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
postUrl?: undefined;
|
|
17
|
+
sources?: undefined;
|
|
18
|
+
companyUrl?: undefined;
|
|
19
|
+
sortBy?: undefined;
|
|
20
|
+
linkedin_url?: undefined;
|
|
21
|
+
max_posts?: undefined;
|
|
22
|
+
};
|
|
23
|
+
required: string[];
|
|
24
|
+
};
|
|
25
|
+
} | {
|
|
26
|
+
name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: string;
|
|
30
|
+
properties: {
|
|
31
|
+
postUrl: {
|
|
32
|
+
type: string;
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
sources: {
|
|
36
|
+
type: string;
|
|
37
|
+
enum: string[];
|
|
38
|
+
description: string;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
limit: {
|
|
42
|
+
type: string;
|
|
43
|
+
description: string;
|
|
44
|
+
default: number;
|
|
45
|
+
};
|
|
46
|
+
linkedinUrl?: undefined;
|
|
47
|
+
companyUrl?: undefined;
|
|
48
|
+
sortBy?: undefined;
|
|
49
|
+
linkedin_url?: undefined;
|
|
50
|
+
max_posts?: undefined;
|
|
51
|
+
};
|
|
52
|
+
required: string[];
|
|
53
|
+
};
|
|
54
|
+
} | {
|
|
55
|
+
name: string;
|
|
56
|
+
description: string;
|
|
57
|
+
inputSchema: {
|
|
58
|
+
type: string;
|
|
59
|
+
properties: {
|
|
60
|
+
linkedinUrl: {
|
|
61
|
+
type: string;
|
|
62
|
+
description: string;
|
|
63
|
+
};
|
|
64
|
+
limit?: undefined;
|
|
65
|
+
postUrl?: undefined;
|
|
66
|
+
sources?: undefined;
|
|
67
|
+
companyUrl?: undefined;
|
|
68
|
+
sortBy?: undefined;
|
|
69
|
+
linkedin_url?: undefined;
|
|
70
|
+
max_posts?: undefined;
|
|
71
|
+
};
|
|
72
|
+
required: string[];
|
|
73
|
+
};
|
|
74
|
+
} | {
|
|
75
|
+
name: string;
|
|
76
|
+
description: string;
|
|
77
|
+
inputSchema: {
|
|
78
|
+
type: string;
|
|
79
|
+
properties: {
|
|
80
|
+
companyUrl: {
|
|
81
|
+
type: string;
|
|
82
|
+
description: string;
|
|
83
|
+
};
|
|
84
|
+
linkedinUrl?: undefined;
|
|
85
|
+
limit?: undefined;
|
|
86
|
+
postUrl?: undefined;
|
|
87
|
+
sources?: undefined;
|
|
88
|
+
sortBy?: undefined;
|
|
89
|
+
linkedin_url?: undefined;
|
|
90
|
+
max_posts?: undefined;
|
|
91
|
+
};
|
|
92
|
+
required: string[];
|
|
93
|
+
};
|
|
94
|
+
} | {
|
|
95
|
+
name: string;
|
|
96
|
+
description: string;
|
|
97
|
+
inputSchema: {
|
|
98
|
+
type: string;
|
|
99
|
+
properties: {
|
|
100
|
+
companyUrl: {
|
|
101
|
+
type: string;
|
|
102
|
+
description: string;
|
|
103
|
+
};
|
|
104
|
+
limit: {
|
|
105
|
+
type: string;
|
|
106
|
+
description: string;
|
|
107
|
+
default: number;
|
|
108
|
+
};
|
|
109
|
+
sortBy: {
|
|
110
|
+
type: string;
|
|
111
|
+
enum: string[];
|
|
112
|
+
description: string;
|
|
113
|
+
default: string;
|
|
114
|
+
};
|
|
115
|
+
linkedinUrl?: undefined;
|
|
116
|
+
postUrl?: undefined;
|
|
117
|
+
sources?: undefined;
|
|
118
|
+
linkedin_url?: undefined;
|
|
119
|
+
max_posts?: undefined;
|
|
120
|
+
};
|
|
121
|
+
required: string[];
|
|
122
|
+
};
|
|
123
|
+
} | {
|
|
124
|
+
name: string;
|
|
125
|
+
description: string;
|
|
126
|
+
inputSchema: {
|
|
127
|
+
type: string;
|
|
128
|
+
properties: {
|
|
129
|
+
linkedin_url: {
|
|
130
|
+
type: string;
|
|
131
|
+
description: string;
|
|
132
|
+
};
|
|
133
|
+
max_posts: {
|
|
134
|
+
type: string;
|
|
135
|
+
description: string;
|
|
136
|
+
default: number;
|
|
137
|
+
};
|
|
138
|
+
linkedinUrl?: undefined;
|
|
139
|
+
limit?: undefined;
|
|
140
|
+
postUrl?: undefined;
|
|
141
|
+
sources?: undefined;
|
|
142
|
+
companyUrl?: undefined;
|
|
143
|
+
sortBy?: undefined;
|
|
144
|
+
};
|
|
145
|
+
required: string[];
|
|
146
|
+
};
|
|
147
|
+
} | {
|
|
148
|
+
name: string;
|
|
149
|
+
description: string;
|
|
150
|
+
inputSchema: {
|
|
151
|
+
type: string;
|
|
152
|
+
properties: {
|
|
153
|
+
linkedin_url: {
|
|
154
|
+
type: string;
|
|
155
|
+
description: string;
|
|
156
|
+
};
|
|
157
|
+
linkedinUrl?: undefined;
|
|
158
|
+
limit?: undefined;
|
|
159
|
+
postUrl?: undefined;
|
|
160
|
+
sources?: undefined;
|
|
161
|
+
companyUrl?: undefined;
|
|
162
|
+
sortBy?: undefined;
|
|
163
|
+
max_posts?: undefined;
|
|
164
|
+
};
|
|
165
|
+
required: string[];
|
|
166
|
+
};
|
|
167
|
+
})[];
|
|
168
|
+
interface SerializedPost {
|
|
169
|
+
text: string;
|
|
170
|
+
date: string;
|
|
171
|
+
reactions: number;
|
|
172
|
+
comments: number;
|
|
173
|
+
url: string;
|
|
174
|
+
isRepost: boolean;
|
|
175
|
+
}
|
|
176
|
+
export declare function fetchLinkedInPosts(linkedinUrl: string, limit?: number): Promise<{
|
|
177
|
+
posts: SerializedPost[];
|
|
178
|
+
count: number;
|
|
179
|
+
}>;
|
|
180
|
+
export declare function fetchLinkedInProfile(linkedinUrl: string): Promise<unknown>;
|
|
181
|
+
export declare function fetchCompany(companyUrl: string): Promise<unknown>;
|
|
182
|
+
export declare function fetchCompanyPosts(companyUrl: string, limit?: number, sortBy?: "recent" | "top"): Promise<{
|
|
183
|
+
posts: SerializedPost[];
|
|
184
|
+
count: number;
|
|
185
|
+
}>;
|
|
186
|
+
export declare function getUserPosts(linkedinUrl: string, maxPosts?: number): Promise<{
|
|
187
|
+
posts: SerializedPost[];
|
|
188
|
+
count: number;
|
|
189
|
+
}>;
|
|
190
|
+
export declare function getLinkedInProfile(linkedinUrl: string): Promise<unknown>;
|
|
191
|
+
interface PostEngager {
|
|
192
|
+
name: string;
|
|
193
|
+
headline: string;
|
|
194
|
+
profileUrl: string;
|
|
195
|
+
source: "reaction" | "comment" | "both";
|
|
196
|
+
commentText?: string;
|
|
197
|
+
}
|
|
198
|
+
interface FetchPostEngagersResponse {
|
|
199
|
+
postId: string;
|
|
200
|
+
engagers: PostEngager[];
|
|
201
|
+
totalEngagers: number;
|
|
202
|
+
stats: {
|
|
203
|
+
reactionsCount: number;
|
|
204
|
+
commentsCount: number;
|
|
205
|
+
uniqueCount: number;
|
|
206
|
+
duplicatesRemoved: number;
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
export declare function fetchPostEngagers(postUrl: string, sources?: "reactions" | "comments" | "both", limit?: number): Promise<FetchPostEngagersResponse>;
|
|
210
|
+
export {};
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { getApi } from "../api.js";
|
|
2
|
+
export const linkedinToolDefinitions = [
|
|
3
|
+
{
|
|
4
|
+
name: "fetch_linkedin_posts",
|
|
5
|
+
description: "Fetch recent LinkedIn posts for a user profile. Returns compact serialized posts with: text, date, reactions, comments, url, isRepost.",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: "object",
|
|
8
|
+
properties: {
|
|
9
|
+
linkedinUrl: {
|
|
10
|
+
type: "string",
|
|
11
|
+
description: "Full LinkedIn profile URL",
|
|
12
|
+
},
|
|
13
|
+
limit: {
|
|
14
|
+
type: "number",
|
|
15
|
+
description: "Posts to return (default 25, max 50)",
|
|
16
|
+
default: 25,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
required: ["linkedinUrl"],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: "fetch_post_engagers",
|
|
24
|
+
description: "Fetch people who engaged with a LinkedIn post (reactions and/or comments). Returns deduplicated engagers with name, headline, profileUrl, and source. Use 'comments' for lead magnets to get people who actively engaged. Uses smart rate limiting and parallel fetching.",
|
|
25
|
+
inputSchema: {
|
|
26
|
+
type: "object",
|
|
27
|
+
properties: {
|
|
28
|
+
postUrl: {
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "Full LinkedIn post URL (e.g., https://www.linkedin.com/feed/update/activity:1234567890123456789)",
|
|
31
|
+
},
|
|
32
|
+
sources: {
|
|
33
|
+
type: "string",
|
|
34
|
+
enum: ["reactions", "comments", "both"],
|
|
35
|
+
description: "Which engagement types to fetch. 'comments' for lead magnets (higher intent), 'reactions' for broader reach, 'both' for all engagers (default: both)",
|
|
36
|
+
default: "both",
|
|
37
|
+
},
|
|
38
|
+
limit: {
|
|
39
|
+
type: "number",
|
|
40
|
+
description: "Max engagers to return. For reactions max ~800, for comments max ~100, for both max ~900 (default: 600)",
|
|
41
|
+
default: 600,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: ["postUrl"],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "fetch_linkedin_profile",
|
|
49
|
+
description: "Fetch LinkedIn profile details from Sellable scrape endpoints.",
|
|
50
|
+
inputSchema: {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: {
|
|
53
|
+
linkedinUrl: {
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "Full LinkedIn profile URL",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
required: ["linkedinUrl"],
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "fetch_company",
|
|
63
|
+
description: "Fetch LinkedIn company profile details.",
|
|
64
|
+
inputSchema: {
|
|
65
|
+
type: "object",
|
|
66
|
+
properties: {
|
|
67
|
+
companyUrl: {
|
|
68
|
+
type: "string",
|
|
69
|
+
description: "LinkedIn company URL",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
required: ["companyUrl"],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "fetch_company_posts",
|
|
77
|
+
description: "Fetch recent LinkedIn posts from a company page. Returns compact serialized posts with: text, date, reactions, comments, url, isRepost. Use this when asked to find posts by a company.",
|
|
78
|
+
inputSchema: {
|
|
79
|
+
type: "object",
|
|
80
|
+
properties: {
|
|
81
|
+
companyUrl: {
|
|
82
|
+
type: "string",
|
|
83
|
+
description: "Full LinkedIn company URL (e.g., https://www.linkedin.com/company/amazon)",
|
|
84
|
+
},
|
|
85
|
+
limit: {
|
|
86
|
+
type: "number",
|
|
87
|
+
description: "Posts to return (default 25, max 50)",
|
|
88
|
+
default: 25,
|
|
89
|
+
},
|
|
90
|
+
sortBy: {
|
|
91
|
+
type: "string",
|
|
92
|
+
enum: ["recent", "top"],
|
|
93
|
+
description: "Sort order: 'recent' for chronological (default), 'top' for highest engagement",
|
|
94
|
+
default: "recent",
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
required: ["companyUrl"],
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "get_user_posts",
|
|
102
|
+
description: "Fetch recent LinkedIn posts. Returns compact serialized posts with: text, date, reactions, comments, url, isRepost.",
|
|
103
|
+
inputSchema: {
|
|
104
|
+
type: "object",
|
|
105
|
+
properties: {
|
|
106
|
+
linkedin_url: {
|
|
107
|
+
type: "string",
|
|
108
|
+
description: "Full LinkedIn profile URL",
|
|
109
|
+
},
|
|
110
|
+
max_posts: {
|
|
111
|
+
type: "number",
|
|
112
|
+
description: "Posts to return (default 25, max 50)",
|
|
113
|
+
default: 25,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
required: ["linkedin_url"],
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "get_linkedin_profile",
|
|
121
|
+
description: "(Deprecated) Use fetch_linkedin_profile instead. Fetch LinkedIn profile details.",
|
|
122
|
+
inputSchema: {
|
|
123
|
+
type: "object",
|
|
124
|
+
properties: {
|
|
125
|
+
linkedin_url: {
|
|
126
|
+
type: "string",
|
|
127
|
+
description: "Full LinkedIn profile URL",
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
required: ["linkedin_url"],
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
];
|
|
134
|
+
export async function fetchLinkedInPosts(linkedinUrl, limit = 25) {
|
|
135
|
+
const api = getApi();
|
|
136
|
+
const params = new URLSearchParams({
|
|
137
|
+
linkedinUrl,
|
|
138
|
+
limit: String(limit),
|
|
139
|
+
});
|
|
140
|
+
const response = await api.get(`/api/v1/scrape/linkedin/user-posts?${params.toString()}`);
|
|
141
|
+
// Serialize to compact format: just text and key metadata
|
|
142
|
+
const posts = (response.posts || []).map((post) => ({
|
|
143
|
+
text: post.text || "",
|
|
144
|
+
date: post.activityDate || "",
|
|
145
|
+
reactions: post.reactionsCount || 0,
|
|
146
|
+
comments: post.commentsCount || 0,
|
|
147
|
+
url: post.activityUrl || "",
|
|
148
|
+
isRepost: post.isRepublishedPost || false,
|
|
149
|
+
}));
|
|
150
|
+
return {
|
|
151
|
+
posts,
|
|
152
|
+
count: posts.length,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
export async function fetchLinkedInProfile(linkedinUrl) {
|
|
156
|
+
const api = getApi();
|
|
157
|
+
const params = new URLSearchParams({ linkedinUrl });
|
|
158
|
+
return api.get(`/api/v1/scrape/linkedin/profile?${params.toString()}`);
|
|
159
|
+
}
|
|
160
|
+
export async function fetchCompany(companyUrl) {
|
|
161
|
+
const api = getApi();
|
|
162
|
+
const params = new URLSearchParams({ linkedinUrl: companyUrl });
|
|
163
|
+
return api.get(`/api/v1/scrape/linkedin/company?${params.toString()}`);
|
|
164
|
+
}
|
|
165
|
+
export async function fetchCompanyPosts(companyUrl, limit = 25, sortBy = "recent") {
|
|
166
|
+
const api = getApi();
|
|
167
|
+
const params = new URLSearchParams({
|
|
168
|
+
linkedinUrl: companyUrl,
|
|
169
|
+
limit: String(limit),
|
|
170
|
+
sortBy,
|
|
171
|
+
});
|
|
172
|
+
const response = await api.get(`/api/v1/scrape/linkedin/company-posts?${params.toString()}`);
|
|
173
|
+
const posts = (response.posts || []).map((post) => ({
|
|
174
|
+
text: post.text || "",
|
|
175
|
+
date: post.activityDate || "",
|
|
176
|
+
reactions: post.reactionsCount || 0,
|
|
177
|
+
comments: post.commentsCount || 0,
|
|
178
|
+
url: post.activityUrl || "",
|
|
179
|
+
isRepost: post.isRepublishedPost || false,
|
|
180
|
+
}));
|
|
181
|
+
return {
|
|
182
|
+
posts,
|
|
183
|
+
count: posts.length,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
// Deprecated aliases for backwards compatibility
|
|
187
|
+
export async function getUserPosts(linkedinUrl, maxPosts = 25) {
|
|
188
|
+
return fetchLinkedInPosts(linkedinUrl, maxPosts);
|
|
189
|
+
}
|
|
190
|
+
export async function getLinkedInProfile(linkedinUrl) {
|
|
191
|
+
return fetchLinkedInProfile(linkedinUrl);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Extract LinkedIn activity ID from post URL.
|
|
195
|
+
* Handles various LinkedIn URL formats:
|
|
196
|
+
* - https://www.linkedin.com/feed/update/urn:li:activity:1234567890123456789
|
|
197
|
+
* - https://www.linkedin.com/feed/update/activity:1234567890123456789
|
|
198
|
+
* - https://www.linkedin.com/posts/username_activity-1234567890123456789
|
|
199
|
+
* - Direct activity ID: 1234567890123456789
|
|
200
|
+
*/
|
|
201
|
+
function extractActivityId(postUrl) {
|
|
202
|
+
const match = postUrl.match(/activity[:\-]?(\d{19})/i) || postUrl.match(/(\d{19})/);
|
|
203
|
+
return match?.[1] || null;
|
|
204
|
+
}
|
|
205
|
+
export async function fetchPostEngagers(postUrl, sources = "both", limit = 600) {
|
|
206
|
+
const api = getApi();
|
|
207
|
+
const activityId = extractActivityId(postUrl);
|
|
208
|
+
if (!activityId) {
|
|
209
|
+
throw new Error(`Invalid LinkedIn post URL. Could not extract activity ID from: ${postUrl}`);
|
|
210
|
+
}
|
|
211
|
+
// Cap limit based on source type
|
|
212
|
+
let cappedLimit;
|
|
213
|
+
if (sources === "comments") {
|
|
214
|
+
cappedLimit = Math.min(limit, 100); // Comments max 100
|
|
215
|
+
}
|
|
216
|
+
else if (sources === "reactions") {
|
|
217
|
+
cappedLimit = Math.min(limit, 800); // Reactions max 800
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
cappedLimit = Math.min(limit, 900); // Both max 900
|
|
221
|
+
}
|
|
222
|
+
const response = await api.post("/api/v1/signal-discovery/fetch-all-engagers", {
|
|
223
|
+
postId: activityId,
|
|
224
|
+
postUrl,
|
|
225
|
+
limit: cappedLimit,
|
|
226
|
+
sources,
|
|
227
|
+
});
|
|
228
|
+
return response;
|
|
229
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export type GetCampaignNavigationStateInput = {
|
|
2
|
+
campaignId: string;
|
|
3
|
+
includeTableCheck?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export type CampaignOfferNavigation = {
|
|
6
|
+
id: string;
|
|
7
|
+
clientProspectId?: string | null;
|
|
8
|
+
offerPositioning?: unknown;
|
|
9
|
+
campaignBrief?: {
|
|
10
|
+
content?: string | null;
|
|
11
|
+
} | string | null;
|
|
12
|
+
leadSourceType?: string | null;
|
|
13
|
+
leadSourceProvider?: string | null;
|
|
14
|
+
selectedLeadListId?: string | null;
|
|
15
|
+
workflowTableId?: string | null;
|
|
16
|
+
currentStep?: string | null;
|
|
17
|
+
};
|
|
18
|
+
type NavigationDebugPayload = Record<string, unknown>;
|
|
19
|
+
export declare function logNavigationDebug(event: string, payload?: NavigationDebugPayload, campaignId?: string | null): void;
|
|
20
|
+
type CreateCampaignStepId = "campaign-created" | "pick-provider" | "provider-search" | "confirm-lead-list";
|
|
21
|
+
export declare const navigationToolDefinitions: {
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
inputSchema: {
|
|
25
|
+
type: string;
|
|
26
|
+
properties: {
|
|
27
|
+
campaignId: {
|
|
28
|
+
type: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
includeTableCheck: {
|
|
32
|
+
type: string;
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
required: string[];
|
|
37
|
+
additionalProperties: boolean;
|
|
38
|
+
};
|
|
39
|
+
}[];
|
|
40
|
+
type NavigationComputeOptions = {
|
|
41
|
+
includeTableCheck: boolean;
|
|
42
|
+
tableChecked: boolean;
|
|
43
|
+
rowCount: number | null;
|
|
44
|
+
hasWorkflowRows: boolean | null;
|
|
45
|
+
initialWarnings?: string[];
|
|
46
|
+
};
|
|
47
|
+
export declare function computeCampaignNavigationStateFromCampaign(campaign: CampaignOfferNavigation, options: NavigationComputeOptions): {
|
|
48
|
+
campaignId: string;
|
|
49
|
+
computedStep: CreateCampaignStepId;
|
|
50
|
+
blockedAt: CreateCampaignStepId | null;
|
|
51
|
+
missing: string[];
|
|
52
|
+
expectedHeadlessStep: string | null;
|
|
53
|
+
headlessCurrentStep: string | null;
|
|
54
|
+
uiStep: string | null;
|
|
55
|
+
table: {
|
|
56
|
+
workflowTableId: string | null;
|
|
57
|
+
checked: boolean;
|
|
58
|
+
rowCount: number | null;
|
|
59
|
+
hasRows: boolean | null;
|
|
60
|
+
};
|
|
61
|
+
context: {
|
|
62
|
+
leadSourceType: string | null;
|
|
63
|
+
leadSourceProvider: string | null;
|
|
64
|
+
selectedLeadListId: string | null;
|
|
65
|
+
providerCurrentStep: string | null;
|
|
66
|
+
};
|
|
67
|
+
warnings: string[];
|
|
68
|
+
};
|
|
69
|
+
export declare function getCampaignNavigationState(input: GetCampaignNavigationStateInput): Promise<{
|
|
70
|
+
campaignId: string;
|
|
71
|
+
computedStep: CreateCampaignStepId;
|
|
72
|
+
blockedAt: CreateCampaignStepId | null;
|
|
73
|
+
missing: string[];
|
|
74
|
+
expectedHeadlessStep: string | null;
|
|
75
|
+
headlessCurrentStep: string | null;
|
|
76
|
+
uiStep: string | null;
|
|
77
|
+
table: {
|
|
78
|
+
workflowTableId: string | null;
|
|
79
|
+
checked: boolean;
|
|
80
|
+
rowCount: number | null;
|
|
81
|
+
hasRows: boolean | null;
|
|
82
|
+
};
|
|
83
|
+
context: {
|
|
84
|
+
leadSourceType: string | null;
|
|
85
|
+
leadSourceProvider: string | null;
|
|
86
|
+
selectedLeadListId: string | null;
|
|
87
|
+
providerCurrentStep: string | null;
|
|
88
|
+
};
|
|
89
|
+
warnings: string[];
|
|
90
|
+
}>;
|
|
91
|
+
export {};
|