@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,143 @@
|
|
|
1
|
+
import { copySenderConfig, getEngageMemory, migrateFlatConfigs, recordProvenSearch, setStyleGuide, upsertTrackedPerson, } from "../engage-memory.js";
|
|
2
|
+
export const engageMemoryToolDefinitions = [
|
|
3
|
+
{
|
|
4
|
+
name: "get_engage_memory",
|
|
5
|
+
description: "Load engage memory from .sellable/configs/: style guide, proven search keywords, and tracked people. All data lives in readable markdown files the user can also edit directly. When senderId is provided, reads from senders/{senderId}/ with flat-path fallback.",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: "object",
|
|
8
|
+
properties: {
|
|
9
|
+
senderId: {
|
|
10
|
+
type: "string",
|
|
11
|
+
description: "Optional sender ID. When provided, reads per-sender configs from senders/{senderId}/. Falls back to flat configs if sender dir doesn't exist.",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
required: [],
|
|
15
|
+
additionalProperties: false,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "set_engage_style_guide",
|
|
20
|
+
description: "Write the user's commenting style guide. When senderId is provided, writes to .sellable/configs/senders/{senderId}/styleguide-core.md. Otherwise writes to .sellable/configs/writing/styleguide-core.md.",
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: "object",
|
|
23
|
+
properties: {
|
|
24
|
+
markdown: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "The style guide content in markdown format.",
|
|
27
|
+
},
|
|
28
|
+
senderId: {
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "Optional sender ID. When provided, writes to per-sender config.",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
required: ["markdown"],
|
|
34
|
+
additionalProperties: false,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "record_engage_proven_search",
|
|
39
|
+
description: "Record a keyword search outcome. When senderId is provided, writes to senders/{senderId}/proven-searches.md. Otherwise writes to discovery/proven-searches.md. Updates running averages if the keyword already exists.",
|
|
40
|
+
inputSchema: {
|
|
41
|
+
type: "object",
|
|
42
|
+
properties: {
|
|
43
|
+
keyword: {
|
|
44
|
+
type: "string",
|
|
45
|
+
description: "The search keyword that was used.",
|
|
46
|
+
},
|
|
47
|
+
totalReturned: {
|
|
48
|
+
type: "number",
|
|
49
|
+
description: "How many posts were returned by the search.",
|
|
50
|
+
},
|
|
51
|
+
postsYielded: {
|
|
52
|
+
type: "number",
|
|
53
|
+
description: "How many posts from this search were selected for the shortlist.",
|
|
54
|
+
},
|
|
55
|
+
senderId: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "Optional sender ID. When provided, writes to per-sender config.",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
required: ["keyword", "totalReturned", "postsYielded"],
|
|
61
|
+
additionalProperties: false,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "upsert_engage_tracked_person",
|
|
66
|
+
description: "Add or update a person in tracked people. When senderId is provided, writes to senders/{senderId}/influencers.md. Otherwise writes to discovery/influencers.md.",
|
|
67
|
+
inputSchema: {
|
|
68
|
+
type: "object",
|
|
69
|
+
properties: {
|
|
70
|
+
name: {
|
|
71
|
+
type: "string",
|
|
72
|
+
description: "Display name of the person.",
|
|
73
|
+
},
|
|
74
|
+
linkedinUrl: {
|
|
75
|
+
type: "string",
|
|
76
|
+
description: "Full LinkedIn profile URL.",
|
|
77
|
+
},
|
|
78
|
+
reason: {
|
|
79
|
+
type: "string",
|
|
80
|
+
description: "Why this person is being tracked (e.g. 'thought leader in B2B sales').",
|
|
81
|
+
},
|
|
82
|
+
senderId: {
|
|
83
|
+
type: "string",
|
|
84
|
+
description: "Optional sender ID. When provided, writes to per-sender config.",
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
required: ["name", "linkedinUrl", "reason"],
|
|
88
|
+
additionalProperties: false,
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "copy_sender_config",
|
|
93
|
+
description: "Copy all per-sender config files (styleguide-core.md, proven-searches.md, influencers.md) from one sender to another. Useful for bootstrapping a new sender from an existing one.",
|
|
94
|
+
inputSchema: {
|
|
95
|
+
type: "object",
|
|
96
|
+
properties: {
|
|
97
|
+
fromSenderId: {
|
|
98
|
+
type: "string",
|
|
99
|
+
description: "Source sender ID to copy configs from.",
|
|
100
|
+
},
|
|
101
|
+
toSenderId: {
|
|
102
|
+
type: "string",
|
|
103
|
+
description: "Target sender ID to copy configs to.",
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
required: ["fromSenderId", "toSenderId"],
|
|
107
|
+
additionalProperties: false,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "migrate_flat_configs",
|
|
112
|
+
description: "One-time migration: copy existing flat configs (writing/styleguide-core.md, discovery/proven-searches.md, discovery/influencers.md) into senders/{senderId}/. Leaves originals in place. Run once per sender when transitioning to per-sender config.",
|
|
113
|
+
inputSchema: {
|
|
114
|
+
type: "object",
|
|
115
|
+
properties: {
|
|
116
|
+
senderId: {
|
|
117
|
+
type: "string",
|
|
118
|
+
description: "Sender ID whose per-sender directory to populate from flat configs.",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
required: ["senderId"],
|
|
122
|
+
additionalProperties: false,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
];
|
|
126
|
+
export function getEngageMemoryTool(input) {
|
|
127
|
+
return getEngageMemory(input?.senderId);
|
|
128
|
+
}
|
|
129
|
+
export function setEngageStyleGuideTool(input) {
|
|
130
|
+
return setStyleGuide(input.markdown, input.senderId);
|
|
131
|
+
}
|
|
132
|
+
export function recordEngageProvenSearchTool(input) {
|
|
133
|
+
return recordProvenSearch(input);
|
|
134
|
+
}
|
|
135
|
+
export function upsertEngageTrackedPersonTool(input) {
|
|
136
|
+
return upsertTrackedPerson(input);
|
|
137
|
+
}
|
|
138
|
+
export function copySenderConfigTool(input) {
|
|
139
|
+
return copySenderConfig(input);
|
|
140
|
+
}
|
|
141
|
+
export function migrateFlatConfigsTool(input) {
|
|
142
|
+
return migrateFlatConfigs(input);
|
|
143
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export declare const engageStateToolDefinitions: ({
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
inputSchema: {
|
|
5
|
+
type: string;
|
|
6
|
+
properties: {
|
|
7
|
+
lastSenderId?: undefined;
|
|
8
|
+
lastCommentCampaignTableId?: undefined;
|
|
9
|
+
clearCommentCampaignTableId?: undefined;
|
|
10
|
+
lastSenderIds?: undefined;
|
|
11
|
+
lastCommentCampaignTableIds?: undefined;
|
|
12
|
+
lastMode?: undefined;
|
|
13
|
+
};
|
|
14
|
+
required: never[];
|
|
15
|
+
additionalProperties: boolean;
|
|
16
|
+
};
|
|
17
|
+
} | {
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: string;
|
|
22
|
+
properties: {
|
|
23
|
+
lastSenderId: {
|
|
24
|
+
type: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
lastCommentCampaignTableId: {
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
clearCommentCampaignTableId: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
lastSenderIds: {
|
|
35
|
+
type: string;
|
|
36
|
+
items: {
|
|
37
|
+
type: string;
|
|
38
|
+
};
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
lastCommentCampaignTableIds: {
|
|
42
|
+
type: string;
|
|
43
|
+
additionalProperties: {
|
|
44
|
+
type: string;
|
|
45
|
+
};
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
lastMode: {
|
|
49
|
+
type: string;
|
|
50
|
+
enum: string[];
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
required: never[];
|
|
55
|
+
additionalProperties: boolean;
|
|
56
|
+
};
|
|
57
|
+
})[];
|
|
58
|
+
export declare function getEngageStateTool(): {
|
|
59
|
+
activeWorkspaceId: string | null;
|
|
60
|
+
state: import("../auth.js").EngageWorkspaceState | null;
|
|
61
|
+
};
|
|
62
|
+
export declare function setEngageStateTool(input: {
|
|
63
|
+
lastSenderId?: string;
|
|
64
|
+
lastCommentCampaignTableId?: string;
|
|
65
|
+
clearCommentCampaignTableId?: boolean;
|
|
66
|
+
lastSenderIds?: string[];
|
|
67
|
+
lastCommentCampaignTableIds?: Record<string, string>;
|
|
68
|
+
lastMode?: "interactive" | "autonomous";
|
|
69
|
+
}): {
|
|
70
|
+
activeWorkspaceId: string;
|
|
71
|
+
state: import("../auth.js").EngageWorkspaceState;
|
|
72
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { getEngageState, updateEngageState } from "../auth.js";
|
|
2
|
+
export const engageStateToolDefinitions = [
|
|
3
|
+
{
|
|
4
|
+
name: "get_engage_state",
|
|
5
|
+
description: "Get persisted engage defaults (per active workspace) to avoid relying on LLM memory. Includes lastSenderId, lastSenderIds (multi-sender), lastCommentCampaignTableIds, and lastMode.",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: "object",
|
|
8
|
+
properties: {},
|
|
9
|
+
required: [],
|
|
10
|
+
additionalProperties: false,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: "set_engage_state",
|
|
15
|
+
description: "Persist engage defaults (per active workspace) so future runs can auto-select sender/table without relying on LLM memory. Supports both single-sender (lastSenderId) and multi-sender (lastSenderIds) fields.",
|
|
16
|
+
inputSchema: {
|
|
17
|
+
type: "object",
|
|
18
|
+
properties: {
|
|
19
|
+
lastSenderId: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "Primary sender ID (backward compat).",
|
|
22
|
+
},
|
|
23
|
+
lastCommentCampaignTableId: { type: "string" },
|
|
24
|
+
clearCommentCampaignTableId: {
|
|
25
|
+
type: "boolean",
|
|
26
|
+
description: "If true, clears the stored lastCommentCampaignTableId for this workspace.",
|
|
27
|
+
},
|
|
28
|
+
lastSenderIds: {
|
|
29
|
+
type: "array",
|
|
30
|
+
items: { type: "string" },
|
|
31
|
+
description: "Array of sender IDs from last multi-sender session.",
|
|
32
|
+
},
|
|
33
|
+
lastCommentCampaignTableIds: {
|
|
34
|
+
type: "object",
|
|
35
|
+
additionalProperties: { type: "string" },
|
|
36
|
+
description: "Map of senderId → comment campaign tableId for multi-sender sessions.",
|
|
37
|
+
},
|
|
38
|
+
lastMode: {
|
|
39
|
+
type: "string",
|
|
40
|
+
enum: ["interactive", "autonomous"],
|
|
41
|
+
description: "Last session mode.",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: [],
|
|
45
|
+
additionalProperties: false,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
export function getEngageStateTool() {
|
|
50
|
+
return getEngageState();
|
|
51
|
+
}
|
|
52
|
+
export function setEngageStateTool(input) {
|
|
53
|
+
return updateEngageState({
|
|
54
|
+
lastSenderId: input.lastSenderId,
|
|
55
|
+
lastCommentCampaignTableId: input.clearCommentCampaignTableId
|
|
56
|
+
? null
|
|
57
|
+
: input.lastCommentCampaignTableId,
|
|
58
|
+
lastSenderIds: input.lastSenderIds,
|
|
59
|
+
lastCommentCampaignTableIds: input.lastCommentCampaignTableIds,
|
|
60
|
+
lastMode: input.lastMode,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
export type EnrichWithProspeoInput = {
|
|
2
|
+
linkedinUrl?: string;
|
|
3
|
+
firstName?: string;
|
|
4
|
+
lastName?: string;
|
|
5
|
+
companyName?: string;
|
|
6
|
+
companyWebsite?: string;
|
|
7
|
+
onlyVerifiedEmail?: boolean;
|
|
8
|
+
enrichMobile?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type BulkEnrichWithProspeoInput = {
|
|
11
|
+
inputs: Array<{
|
|
12
|
+
identifier: string;
|
|
13
|
+
linkedin_url?: string;
|
|
14
|
+
first_name?: string;
|
|
15
|
+
last_name?: string;
|
|
16
|
+
company_name?: string;
|
|
17
|
+
}>;
|
|
18
|
+
onlyVerifiedEmail?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const enrichmentToolDefinitions: ({
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
inputSchema: {
|
|
24
|
+
type: string;
|
|
25
|
+
properties: {
|
|
26
|
+
linkedinUrl: {
|
|
27
|
+
type: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
firstName: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
lastName: {
|
|
35
|
+
type: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
companyName: {
|
|
39
|
+
type: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
companyWebsite: {
|
|
43
|
+
type: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
onlyVerifiedEmail: {
|
|
47
|
+
type: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
enrichMobile: {
|
|
51
|
+
type: string;
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
inputs?: undefined;
|
|
55
|
+
};
|
|
56
|
+
required: never[];
|
|
57
|
+
};
|
|
58
|
+
} | {
|
|
59
|
+
name: string;
|
|
60
|
+
description: string;
|
|
61
|
+
inputSchema: {
|
|
62
|
+
type: string;
|
|
63
|
+
properties: {
|
|
64
|
+
inputs: {
|
|
65
|
+
type: string;
|
|
66
|
+
description: string;
|
|
67
|
+
items: {
|
|
68
|
+
type: string;
|
|
69
|
+
properties: {
|
|
70
|
+
identifier: {
|
|
71
|
+
type: string;
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
linkedin_url: {
|
|
75
|
+
type: string;
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
first_name: {
|
|
79
|
+
type: string;
|
|
80
|
+
};
|
|
81
|
+
last_name: {
|
|
82
|
+
type: string;
|
|
83
|
+
};
|
|
84
|
+
company_name: {
|
|
85
|
+
type: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
required: string[];
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
onlyVerifiedEmail: {
|
|
92
|
+
type: string;
|
|
93
|
+
description: string;
|
|
94
|
+
};
|
|
95
|
+
linkedinUrl?: undefined;
|
|
96
|
+
firstName?: undefined;
|
|
97
|
+
lastName?: undefined;
|
|
98
|
+
companyName?: undefined;
|
|
99
|
+
companyWebsite?: undefined;
|
|
100
|
+
enrichMobile?: undefined;
|
|
101
|
+
};
|
|
102
|
+
required: string[];
|
|
103
|
+
};
|
|
104
|
+
} | {
|
|
105
|
+
name: string;
|
|
106
|
+
description: string;
|
|
107
|
+
inputSchema: {
|
|
108
|
+
type: string;
|
|
109
|
+
properties: {
|
|
110
|
+
linkedinUrl?: undefined;
|
|
111
|
+
firstName?: undefined;
|
|
112
|
+
lastName?: undefined;
|
|
113
|
+
companyName?: undefined;
|
|
114
|
+
companyWebsite?: undefined;
|
|
115
|
+
onlyVerifiedEmail?: undefined;
|
|
116
|
+
enrichMobile?: undefined;
|
|
117
|
+
inputs?: undefined;
|
|
118
|
+
};
|
|
119
|
+
required: never[];
|
|
120
|
+
};
|
|
121
|
+
})[];
|
|
122
|
+
export declare function enrichWithProspeo(input: EnrichWithProspeoInput): Promise<{
|
|
123
|
+
success: boolean;
|
|
124
|
+
creditsUsed: number;
|
|
125
|
+
person: {
|
|
126
|
+
name: string | undefined;
|
|
127
|
+
title: string | undefined;
|
|
128
|
+
headline: string | undefined;
|
|
129
|
+
email: string | undefined;
|
|
130
|
+
emailStatus: string | undefined;
|
|
131
|
+
phone: string | undefined;
|
|
132
|
+
phoneStatus: string | undefined;
|
|
133
|
+
linkedinUrl: string | undefined;
|
|
134
|
+
location: string;
|
|
135
|
+
};
|
|
136
|
+
company: {
|
|
137
|
+
name: string | undefined;
|
|
138
|
+
domain: string | undefined;
|
|
139
|
+
industry: string | undefined;
|
|
140
|
+
employeeRange: string | undefined;
|
|
141
|
+
} | null;
|
|
142
|
+
}>;
|
|
143
|
+
export declare function bulkEnrichWithProspeo(input: BulkEnrichWithProspeoInput): Promise<{
|
|
144
|
+
success: boolean;
|
|
145
|
+
totalCost: number;
|
|
146
|
+
summary: {
|
|
147
|
+
requested: number;
|
|
148
|
+
matched: number;
|
|
149
|
+
notMatched: number;
|
|
150
|
+
invalid: number;
|
|
151
|
+
};
|
|
152
|
+
matched: {
|
|
153
|
+
identifier: string;
|
|
154
|
+
name: string | undefined;
|
|
155
|
+
email: string | undefined;
|
|
156
|
+
emailStatus: string | undefined;
|
|
157
|
+
company: string | undefined;
|
|
158
|
+
}[];
|
|
159
|
+
notMatched: string[];
|
|
160
|
+
invalidDatapoints: string[];
|
|
161
|
+
}>;
|
|
162
|
+
export declare function getProspeoCredits(): Promise<{
|
|
163
|
+
plan: string;
|
|
164
|
+
remainingCredits: number;
|
|
165
|
+
usedCredits: number;
|
|
166
|
+
renewsInDays: number;
|
|
167
|
+
}>;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { getApi } from "../api.js";
|
|
2
|
+
export const enrichmentToolDefinitions = [
|
|
3
|
+
{
|
|
4
|
+
name: "enrich_with_prospeo",
|
|
5
|
+
description: "Enrich a person with email and company data using Prospeo. Provide LinkedIn URL (preferred) or name+company. Returns verified email, job history, and company details. Costs 1 credit (10 for mobile).",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: "object",
|
|
8
|
+
properties: {
|
|
9
|
+
linkedinUrl: {
|
|
10
|
+
type: "string",
|
|
11
|
+
description: "LinkedIn profile URL (preferred input method)",
|
|
12
|
+
},
|
|
13
|
+
firstName: {
|
|
14
|
+
type: "string",
|
|
15
|
+
description: "First name (alternative to linkedinUrl)",
|
|
16
|
+
},
|
|
17
|
+
lastName: {
|
|
18
|
+
type: "string",
|
|
19
|
+
description: "Last name (alternative to linkedinUrl)",
|
|
20
|
+
},
|
|
21
|
+
companyName: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "Company name for matching",
|
|
24
|
+
},
|
|
25
|
+
companyWebsite: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "Company domain for matching",
|
|
28
|
+
},
|
|
29
|
+
onlyVerifiedEmail: {
|
|
30
|
+
type: "boolean",
|
|
31
|
+
description: "Only return if email is verified (default: true)",
|
|
32
|
+
},
|
|
33
|
+
enrichMobile: {
|
|
34
|
+
type: "boolean",
|
|
35
|
+
description: "Include mobile number - costs 10 credits (default: false)",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
required: [],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "bulk_enrich_with_prospeo",
|
|
43
|
+
description: "Bulk enrich multiple people with Prospeo. Up to 100 inputs per request. Each input needs a unique identifier for correlation.",
|
|
44
|
+
inputSchema: {
|
|
45
|
+
type: "object",
|
|
46
|
+
properties: {
|
|
47
|
+
inputs: {
|
|
48
|
+
type: "array",
|
|
49
|
+
description: "Array of people to enrich (max 100)",
|
|
50
|
+
items: {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: {
|
|
53
|
+
identifier: {
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "Unique ID for correlation in results",
|
|
56
|
+
},
|
|
57
|
+
linkedin_url: {
|
|
58
|
+
type: "string",
|
|
59
|
+
description: "LinkedIn profile URL",
|
|
60
|
+
},
|
|
61
|
+
first_name: {
|
|
62
|
+
type: "string",
|
|
63
|
+
},
|
|
64
|
+
last_name: {
|
|
65
|
+
type: "string",
|
|
66
|
+
},
|
|
67
|
+
company_name: {
|
|
68
|
+
type: "string",
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
required: ["identifier"],
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
onlyVerifiedEmail: {
|
|
75
|
+
type: "boolean",
|
|
76
|
+
description: "Only return verified emails (default: true)",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
required: ["inputs"],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "get_prospeo_credits",
|
|
84
|
+
description: "Get Prospeo account credits remaining. Use to check balance before bulk operations.",
|
|
85
|
+
inputSchema: {
|
|
86
|
+
type: "object",
|
|
87
|
+
properties: {},
|
|
88
|
+
required: [],
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
];
|
|
92
|
+
export async function enrichWithProspeo(input) {
|
|
93
|
+
const api = getApi();
|
|
94
|
+
// Validate input
|
|
95
|
+
const hasLinkedIn = !!input.linkedinUrl;
|
|
96
|
+
const hasName = !!(input.firstName && input.lastName);
|
|
97
|
+
const hasCompany = !!(input.companyName || input.companyWebsite);
|
|
98
|
+
if (!hasLinkedIn && !(hasName && hasCompany)) {
|
|
99
|
+
throw new Error("Must provide linkedinUrl OR (firstName + lastName + company info)");
|
|
100
|
+
}
|
|
101
|
+
const response = await api.post("/api/v3/prospeo/enrich", {
|
|
102
|
+
linkedinUrl: input.linkedinUrl,
|
|
103
|
+
firstName: input.firstName,
|
|
104
|
+
lastName: input.lastName,
|
|
105
|
+
companyName: input.companyName,
|
|
106
|
+
companyWebsite: input.companyWebsite,
|
|
107
|
+
onlyVerifiedEmail: input.onlyVerifiedEmail ?? true,
|
|
108
|
+
enrichMobile: input.enrichMobile ?? false,
|
|
109
|
+
normalize: true,
|
|
110
|
+
});
|
|
111
|
+
// Return compact summary for LLM
|
|
112
|
+
const n = response.normalized;
|
|
113
|
+
return {
|
|
114
|
+
success: true,
|
|
115
|
+
creditsUsed: response.creditsUsed,
|
|
116
|
+
person: {
|
|
117
|
+
name: n?.name,
|
|
118
|
+
title: n?.title,
|
|
119
|
+
headline: n?.headline,
|
|
120
|
+
email: n?.email,
|
|
121
|
+
emailStatus: n?.emailStatus,
|
|
122
|
+
phone: n?.phone,
|
|
123
|
+
phoneStatus: n?.phoneStatus,
|
|
124
|
+
linkedinUrl: n?.linkedin_url,
|
|
125
|
+
location: [n?.city, n?.state, n?.country].filter(Boolean).join(", "),
|
|
126
|
+
},
|
|
127
|
+
company: n?.organization
|
|
128
|
+
? {
|
|
129
|
+
name: n.organization.name,
|
|
130
|
+
domain: n.organization.domain,
|
|
131
|
+
industry: n.organization.industry,
|
|
132
|
+
employeeRange: n.organization.employeeRange,
|
|
133
|
+
}
|
|
134
|
+
: null,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
export async function bulkEnrichWithProspeo(input) {
|
|
138
|
+
const api = getApi();
|
|
139
|
+
if (!input.inputs || input.inputs.length === 0) {
|
|
140
|
+
throw new Error("inputs array is required");
|
|
141
|
+
}
|
|
142
|
+
if (input.inputs.length > 100) {
|
|
143
|
+
throw new Error("Maximum 100 inputs per request");
|
|
144
|
+
}
|
|
145
|
+
const response = await api.post("/api/v3/prospeo/bulk-enrich", {
|
|
146
|
+
inputs: input.inputs,
|
|
147
|
+
onlyVerifiedEmail: input.onlyVerifiedEmail ?? true,
|
|
148
|
+
normalize: true,
|
|
149
|
+
});
|
|
150
|
+
return {
|
|
151
|
+
success: true,
|
|
152
|
+
totalCost: response.totalCost,
|
|
153
|
+
summary: response.summary,
|
|
154
|
+
matched: response.matched.map((m) => ({
|
|
155
|
+
identifier: m.identifier,
|
|
156
|
+
name: m.normalized?.name,
|
|
157
|
+
email: m.normalized?.email,
|
|
158
|
+
emailStatus: m.normalized?.emailStatus,
|
|
159
|
+
company: m.normalized?.organization?.name,
|
|
160
|
+
})),
|
|
161
|
+
notMatched: response.notMatched,
|
|
162
|
+
invalidDatapoints: response.invalidDatapoints,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
export async function getProspeoCredits() {
|
|
166
|
+
const api = getApi();
|
|
167
|
+
const response = await api.get("/api/v3/prospeo/account");
|
|
168
|
+
return {
|
|
169
|
+
plan: response.currentPlan,
|
|
170
|
+
remainingCredits: response.remainingCredits,
|
|
171
|
+
usedCredits: response.usedCredits,
|
|
172
|
+
renewsInDays: response.nextQuotaRenewalDays,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
type CreateCampaignPromptPreflightState = {
|
|
2
|
+
loadedAt: string;
|
|
3
|
+
};
|
|
4
|
+
type ResearchPromptMode = "generic" | "sender" | "prospect";
|
|
5
|
+
type ResearchPromptPreflightState = {
|
|
6
|
+
loadedAt: string;
|
|
7
|
+
mode: ResearchPromptMode;
|
|
8
|
+
subskillName: string;
|
|
9
|
+
};
|
|
10
|
+
type SenderEnrichmentSnapshot = {
|
|
11
|
+
observedAt: string;
|
|
12
|
+
enrichmentStatus: "partial" | "complete";
|
|
13
|
+
hasCaseStudies: boolean;
|
|
14
|
+
hasProof: boolean;
|
|
15
|
+
};
|
|
16
|
+
type SenderResearchDepth = "minimal-verification" | "deep-proof";
|
|
17
|
+
export declare function markCreateCampaignPromptLoaded(): CreateCampaignPromptPreflightState;
|
|
18
|
+
export declare function markResearchPromptLoaded(mode?: ResearchPromptMode, subskillName?: string): ResearchPromptPreflightState;
|
|
19
|
+
export declare function markSenderEnrichmentObserved(input: {
|
|
20
|
+
enrichmentStatus: "partial" | "complete";
|
|
21
|
+
caseStudies?: unknown;
|
|
22
|
+
proof?: unknown;
|
|
23
|
+
}): SenderEnrichmentSnapshot;
|
|
24
|
+
export declare function markSenderResearchCompleted(input?: {
|
|
25
|
+
depth?: SenderResearchDepth;
|
|
26
|
+
proofItemsFound?: number;
|
|
27
|
+
caseStudyItemsFound?: number;
|
|
28
|
+
credibilitySignalsFound?: number;
|
|
29
|
+
notes?: string | null;
|
|
30
|
+
}): {
|
|
31
|
+
readonly completedAt: string;
|
|
32
|
+
readonly depth: SenderResearchDepth;
|
|
33
|
+
readonly proofItemsFound: number;
|
|
34
|
+
readonly caseStudyItemsFound: number;
|
|
35
|
+
readonly credibilitySignalsFound: number;
|
|
36
|
+
readonly notes?: string | null;
|
|
37
|
+
readonly ok: true;
|
|
38
|
+
};
|
|
39
|
+
export declare function assertCreateCampaignPromptLoaded(): {
|
|
40
|
+
readonly ok: true;
|
|
41
|
+
readonly loadedAt: string;
|
|
42
|
+
};
|
|
43
|
+
export declare function assertResearchPromptLoaded(mode?: ResearchPromptMode | "any"): {
|
|
44
|
+
readonly ok: true;
|
|
45
|
+
readonly loadedAt: string;
|
|
46
|
+
readonly mode: ResearchPromptMode;
|
|
47
|
+
readonly subskillName: string;
|
|
48
|
+
};
|
|
49
|
+
export declare function assertNetNewCreateCampaignResearchReady(): {
|
|
50
|
+
readonly ok: true;
|
|
51
|
+
readonly enrichmentStatus: "partial" | "complete";
|
|
52
|
+
readonly hasCaseStudies: boolean;
|
|
53
|
+
readonly hasProof: boolean;
|
|
54
|
+
readonly enrichmentLooksComplete: boolean;
|
|
55
|
+
readonly usedResearchPrompt: boolean;
|
|
56
|
+
readonly researchPromptMode: ResearchPromptMode;
|
|
57
|
+
readonly researchPromptSubskillName: string;
|
|
58
|
+
readonly researchCompletion: {
|
|
59
|
+
readonly depth: SenderResearchDepth;
|
|
60
|
+
readonly proofItemsFound: number;
|
|
61
|
+
readonly caseStudyItemsFound: number;
|
|
62
|
+
readonly credibilitySignalsFound: number;
|
|
63
|
+
readonly completedAt: string;
|
|
64
|
+
};
|
|
65
|
+
readonly needsResearch: true;
|
|
66
|
+
};
|
|
67
|
+
export declare function resetFlowPreflightState(): void;
|
|
68
|
+
export {};
|