firecrawl-cli 1.17.0 → 1.18.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/README.md +13 -35
- package/dist/__tests__/commands/init.test.js +4 -2
- package/dist/__tests__/commands/init.test.js.map +1 -1
- package/dist/__tests__/commands/setup.test.js +6 -2
- package/dist/__tests__/commands/setup.test.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +27 -4
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/monitor.d.ts +23 -0
- package/dist/commands/monitor.d.ts.map +1 -0
- package/dist/commands/monitor.js +395 -0
- package/dist/commands/monitor.js.map +1 -0
- package/dist/commands/setup.d.ts +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +9 -5
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/skills-install.d.ts +9 -1
- package/dist/commands/skills-install.d.ts.map +1 -1
- package/dist/commands/skills-install.js +13 -2
- package/dist/commands/skills-install.js.map +1 -1
- package/dist/index.js +7 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/commands/experimental/backends.d.ts +0 -19
- package/dist/commands/experimental/backends.d.ts.map +0 -1
- package/dist/commands/experimental/backends.js +0 -74
- package/dist/commands/experimental/backends.js.map +0 -1
- package/dist/commands/experimental/index.d.ts +0 -13
- package/dist/commands/experimental/index.d.ts.map +0 -1
- package/dist/commands/experimental/index.js +0 -200
- package/dist/commands/experimental/index.js.map +0 -1
- package/dist/commands/experimental/shared.d.ts +0 -17
- package/dist/commands/experimental/shared.d.ts.map +0 -1
- package/dist/commands/experimental/shared.js +0 -152
- package/dist/commands/experimental/shared.js.map +0 -1
- package/dist/commands/experimental/workflows/company-directories.d.ts +0 -11
- package/dist/commands/experimental/workflows/company-directories.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/company-directories.js +0 -245
- package/dist/commands/experimental/workflows/company-directories.js.map +0 -1
- package/dist/commands/experimental/workflows/competitive-intel.d.ts +0 -11
- package/dist/commands/experimental/workflows/competitive-intel.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/competitive-intel.js +0 -226
- package/dist/commands/experimental/workflows/competitive-intel.js.map +0 -1
- package/dist/commands/experimental/workflows/competitor-analysis.d.ts +0 -10
- package/dist/commands/experimental/workflows/competitor-analysis.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/competitor-analysis.js +0 -196
- package/dist/commands/experimental/workflows/competitor-analysis.js.map +0 -1
- package/dist/commands/experimental/workflows/dashboard-reporting.d.ts +0 -11
- package/dist/commands/experimental/workflows/dashboard-reporting.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/dashboard-reporting.js +0 -254
- package/dist/commands/experimental/workflows/dashboard-reporting.js.map +0 -1
- package/dist/commands/experimental/workflows/deep-research.d.ts +0 -11
- package/dist/commands/experimental/workflows/deep-research.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/deep-research.js +0 -159
- package/dist/commands/experimental/workflows/deep-research.js.map +0 -1
- package/dist/commands/experimental/workflows/demo.d.ts +0 -11
- package/dist/commands/experimental/workflows/demo.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/demo.js +0 -190
- package/dist/commands/experimental/workflows/demo.js.map +0 -1
- package/dist/commands/experimental/workflows/knowledge-base.d.ts +0 -11
- package/dist/commands/experimental/workflows/knowledge-base.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/knowledge-base.js +0 -319
- package/dist/commands/experimental/workflows/knowledge-base.js.map +0 -1
- package/dist/commands/experimental/workflows/knowledge-ingest.d.ts +0 -12
- package/dist/commands/experimental/workflows/knowledge-ingest.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/knowledge-ingest.js +0 -251
- package/dist/commands/experimental/workflows/knowledge-ingest.js.map +0 -1
- package/dist/commands/experimental/workflows/lead-gen.d.ts +0 -11
- package/dist/commands/experimental/workflows/lead-gen.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/lead-gen.js +0 -257
- package/dist/commands/experimental/workflows/lead-gen.js.map +0 -1
- package/dist/commands/experimental/workflows/lead-research.d.ts +0 -11
- package/dist/commands/experimental/workflows/lead-research.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/lead-research.js +0 -146
- package/dist/commands/experimental/workflows/lead-research.js.map +0 -1
- package/dist/commands/experimental/workflows/market-research.d.ts +0 -11
- package/dist/commands/experimental/workflows/market-research.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/market-research.js +0 -260
- package/dist/commands/experimental/workflows/market-research.js.map +0 -1
- package/dist/commands/experimental/workflows/qa.d.ts +0 -11
- package/dist/commands/experimental/workflows/qa.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/qa.js +0 -184
- package/dist/commands/experimental/workflows/qa.js.map +0 -1
- package/dist/commands/experimental/workflows/research-papers.d.ts +0 -11
- package/dist/commands/experimental/workflows/research-papers.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/research-papers.js +0 -151
- package/dist/commands/experimental/workflows/research-papers.js.map +0 -1
- package/dist/commands/experimental/workflows/seo-audit.d.ts +0 -11
- package/dist/commands/experimental/workflows/seo-audit.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/seo-audit.js +0 -155
- package/dist/commands/experimental/workflows/seo-audit.js.map +0 -1
- package/dist/commands/experimental/workflows/shop.d.ts +0 -11
- package/dist/commands/experimental/workflows/shop.d.ts.map +0 -1
- package/dist/commands/experimental/workflows/shop.js +0 -155
- package/dist/commands/experimental/workflows/shop.js.map +0 -1
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Workflow: Lead Generation
|
|
4
|
-
*
|
|
5
|
-
* Uses a cloud browser to fill search forms on prospect databases (Apollo,
|
|
6
|
-
* LinkedIn Sales Nav, ZoomInfo, etc.), apply filters, paginate through
|
|
7
|
-
* results, and extract contact details at scale into structured formats.
|
|
8
|
-
*/
|
|
9
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
-
}
|
|
15
|
-
Object.defineProperty(o, k2, desc);
|
|
16
|
-
}) : (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
o[k2] = m[k];
|
|
19
|
-
}));
|
|
20
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
-
}) : function(o, v) {
|
|
23
|
-
o["default"] = v;
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
-
var ownKeys = function(o) {
|
|
27
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
-
var ar = [];
|
|
29
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
-
return ar;
|
|
31
|
-
};
|
|
32
|
-
return ownKeys(o);
|
|
33
|
-
};
|
|
34
|
-
return function (mod) {
|
|
35
|
-
if (mod && mod.__esModule) return mod;
|
|
36
|
-
var result = {};
|
|
37
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
-
__setModuleDefault(result, mod);
|
|
39
|
-
return result;
|
|
40
|
-
};
|
|
41
|
-
})();
|
|
42
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
-
exports.register = register;
|
|
44
|
-
const backends_1 = require("../backends");
|
|
45
|
-
const shared_1 = require("../shared");
|
|
46
|
-
// ─── Input gathering ────────────────────────────────────────────────────────
|
|
47
|
-
async function gatherInputs(prefill) {
|
|
48
|
-
if (prefill?.target) {
|
|
49
|
-
return {
|
|
50
|
-
target: prefill.target,
|
|
51
|
-
source: 'auto',
|
|
52
|
-
profile: '',
|
|
53
|
-
maxLeads: '50',
|
|
54
|
-
output: 'json',
|
|
55
|
-
context: '',
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
const { input, select } = await Promise.resolve().then(() => __importStar(require('@inquirer/prompts')));
|
|
59
|
-
const target = await input({
|
|
60
|
-
message: 'Describe your ideal prospects (e.g., "CTOs at Series B fintech startups in NYC")',
|
|
61
|
-
validate: (0, shared_1.validateRequired)('Target description'),
|
|
62
|
-
});
|
|
63
|
-
const source = await select({
|
|
64
|
-
message: 'Where should the agent search?',
|
|
65
|
-
choices: [
|
|
66
|
-
{ name: 'Auto-detect best sources', value: 'auto' },
|
|
67
|
-
{ name: 'Apollo.io', value: 'apollo' },
|
|
68
|
-
{ name: 'LinkedIn (requires profile)', value: 'linkedin' },
|
|
69
|
-
{ name: 'Crunchbase', value: 'crunchbase' },
|
|
70
|
-
{ name: 'Custom URL / database', value: 'custom' },
|
|
71
|
-
],
|
|
72
|
-
});
|
|
73
|
-
let sourceValue = source;
|
|
74
|
-
if (source === 'custom') {
|
|
75
|
-
sourceValue = await input({
|
|
76
|
-
message: 'Enter the database URL:',
|
|
77
|
-
validate: (0, shared_1.validateRequired)('URL'),
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
const profile = await input({
|
|
81
|
-
message: 'Browser profile for auth? (leave blank for anonymous access)',
|
|
82
|
-
default: '',
|
|
83
|
-
});
|
|
84
|
-
const maxLeads = await input({
|
|
85
|
-
message: 'How many leads to extract?',
|
|
86
|
-
default: '50',
|
|
87
|
-
});
|
|
88
|
-
const output = await select({
|
|
89
|
-
message: 'Output format?',
|
|
90
|
-
choices: [
|
|
91
|
-
{ name: 'JSON (structured, CRM-ready)', value: 'json' },
|
|
92
|
-
{ name: 'CSV (spreadsheet/CRM import)', value: 'csv' },
|
|
93
|
-
{ name: 'Print to terminal', value: 'terminal' },
|
|
94
|
-
],
|
|
95
|
-
});
|
|
96
|
-
const context = await input({
|
|
97
|
-
message: 'Any other criteria? (e.g., "must have email", "exclude consultants")',
|
|
98
|
-
default: '',
|
|
99
|
-
});
|
|
100
|
-
return {
|
|
101
|
-
target,
|
|
102
|
-
source: sourceValue,
|
|
103
|
-
profile,
|
|
104
|
-
maxLeads,
|
|
105
|
-
output,
|
|
106
|
-
context,
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
// ─── System prompt ──────────────────────────────────────────────────────────
|
|
110
|
-
function buildSystemPrompt(opts) {
|
|
111
|
-
const sourceUrls = {
|
|
112
|
-
apollo: 'https://app.apollo.io',
|
|
113
|
-
linkedin: 'https://www.linkedin.com/sales',
|
|
114
|
-
crunchbase: 'https://www.crunchbase.com/discover/people',
|
|
115
|
-
};
|
|
116
|
-
const sourceHint = opts.source === 'auto'
|
|
117
|
-
? 'Start by searching the web to find the best prospect databases for this target audience. Try Apollo.io, LinkedIn, Crunchbase, industry directories, or any relevant databases.'
|
|
118
|
-
: `Start at: ${sourceUrls[opts.source] || opts.source}`;
|
|
119
|
-
const profileBlock = opts.profile
|
|
120
|
-
? `\n### Authentication\n\nUse the saved browser profile \`${opts.profile}\`:\n\`\`\`bash\nfirecrawl browser "open <url>" --profile ${opts.profile}\n\`\`\`\nAfter the first \`open\` with \`--profile\`, subsequent browser commands don't need the flag.`
|
|
121
|
-
: '';
|
|
122
|
-
const outputInstructions = {
|
|
123
|
-
terminal: 'Print the lead list to the terminal as a formatted markdown table.',
|
|
124
|
-
json: `Save results to \`leads.json\` in the current directory. Tell the user the file path when done.
|
|
125
|
-
|
|
126
|
-
Use this schema:
|
|
127
|
-
\`\`\`json
|
|
128
|
-
{
|
|
129
|
-
"query": "string (target description)",
|
|
130
|
-
"source": "string (database used)",
|
|
131
|
-
"extractedAt": "ISO-8601",
|
|
132
|
-
"totalLeads": 0,
|
|
133
|
-
"leads": [
|
|
134
|
-
{
|
|
135
|
-
"name": "string",
|
|
136
|
-
"title": "string",
|
|
137
|
-
"company": "string",
|
|
138
|
-
"companyUrl": "string",
|
|
139
|
-
"location": "string",
|
|
140
|
-
"email": "string (if available)",
|
|
141
|
-
"linkedin": "string (if available)",
|
|
142
|
-
"phone": "string (if available)",
|
|
143
|
-
"industry": "string",
|
|
144
|
-
"companySize": "string",
|
|
145
|
-
"fundingStage": "string",
|
|
146
|
-
"notes": "string",
|
|
147
|
-
"profileUrl": "string (source listing URL)"
|
|
148
|
-
}
|
|
149
|
-
]
|
|
150
|
-
}
|
|
151
|
-
\`\`\``,
|
|
152
|
-
csv: `Save results to \`leads.csv\` in the current directory with columns: name, title, company, companyUrl, location, email, linkedin, phone, industry, companySize, fundingStage, notes, profileUrl. Tell the user the file path when done.`,
|
|
153
|
-
};
|
|
154
|
-
return `You are a lead generation agent powered by Firecrawl. You use a real cloud browser to search prospect databases, fill in filters, paginate through results, and extract structured contact data.
|
|
155
|
-
|
|
156
|
-
## STEP 1: Launch Browser and Open Live View
|
|
157
|
-
|
|
158
|
-
Before anything else, launch a browser session so the user can watch:
|
|
159
|
-
|
|
160
|
-
\`\`\`bash
|
|
161
|
-
firecrawl browser launch-session --json
|
|
162
|
-
\`\`\`
|
|
163
|
-
|
|
164
|
-
Extract the \`interactiveLiveViewUrl\` from the JSON output and open it (NOT the regular \`liveViewUrl\` -- the interactive one lets the user click and interact):
|
|
165
|
-
|
|
166
|
-
\`\`\`bash
|
|
167
|
-
open "<interactiveLiveViewUrl>" # macOS
|
|
168
|
-
xdg-open "<interactiveLiveViewUrl>" # Linux
|
|
169
|
-
\`\`\`
|
|
170
|
-
|
|
171
|
-
If the \`open\` command fails, print the URL clearly.
|
|
172
|
-
${profileBlock}
|
|
173
|
-
|
|
174
|
-
## STEP 2: Navigate to Prospect Database
|
|
175
|
-
|
|
176
|
-
${sourceHint}
|
|
177
|
-
|
|
178
|
-
## STEP 3: Apply Filters and Search
|
|
179
|
-
|
|
180
|
-
1. **Snapshot** the page to see available search/filter controls
|
|
181
|
-
2. **Fill search forms** -- type the target criteria into search bars
|
|
182
|
-
3. **Apply filters** -- click dropdowns, checkboxes, sliders for:
|
|
183
|
-
- Job title / role
|
|
184
|
-
- Company size
|
|
185
|
-
- Industry / sector
|
|
186
|
-
- Location / geography
|
|
187
|
-
- Funding stage
|
|
188
|
-
- Technologies used
|
|
189
|
-
4. **Execute the search** -- click "Search" or wait for auto-results
|
|
190
|
-
|
|
191
|
-
### Browser commands:
|
|
192
|
-
\`\`\`bash
|
|
193
|
-
firecrawl browser "open <url>"
|
|
194
|
-
firecrawl browser "snapshot"
|
|
195
|
-
firecrawl browser "click @<ref>"
|
|
196
|
-
firecrawl browser "type @<ref> <text>"
|
|
197
|
-
firecrawl browser "scroll down"
|
|
198
|
-
firecrawl browser "scrape"
|
|
199
|
-
\`\`\`
|
|
200
|
-
|
|
201
|
-
## STEP 4: Extract and Paginate
|
|
202
|
-
|
|
203
|
-
After filtering:
|
|
204
|
-
|
|
205
|
-
1. **Snapshot** the results to see lead listings
|
|
206
|
-
2. **Extract** visible data from each lead (name, title, company, etc.)
|
|
207
|
-
3. **Click into profiles** if the listing doesn't have enough detail
|
|
208
|
-
4. **Navigate back** to the results list
|
|
209
|
-
5. **Paginate** -- click "Next", page numbers, or scroll for more
|
|
210
|
-
6. Repeat until you've collected ~${opts.maxLeads} leads or exhausted results
|
|
211
|
-
|
|
212
|
-
### Tips:
|
|
213
|
-
- Some databases show partial info (e.g., masked emails) -- extract what's visible
|
|
214
|
-
- If you get rate-limited or CAPTCHAed, note it and move to the next result
|
|
215
|
-
- Track progress: print "Extracted X/${opts.maxLeads} leads..." periodically
|
|
216
|
-
- Deduplicate leads that appear in multiple pages
|
|
217
|
-
|
|
218
|
-
## Output Format
|
|
219
|
-
|
|
220
|
-
${outputInstructions[opts.output]}
|
|
221
|
-
|
|
222
|
-
## Important
|
|
223
|
-
|
|
224
|
-
- Only extract publicly visible or legitimately accessible data
|
|
225
|
-
- Note any fields that were partially masked or unavailable
|
|
226
|
-
- If a source requires paid access for full data, note what's behind the paywall
|
|
227
|
-
|
|
228
|
-
Do everything sequentially. Start immediately.`;
|
|
229
|
-
}
|
|
230
|
-
// ─── Command registration ───────────────────────────────────────────────────
|
|
231
|
-
function register(parentCmd, backend) {
|
|
232
|
-
const config = backends_1.BACKENDS[backend];
|
|
233
|
-
parentCmd
|
|
234
|
-
.command('lead-gen')
|
|
235
|
-
.description('Extract prospect contact details from databases at scale via browser')
|
|
236
|
-
.argument('[target...]', 'Describe ideal prospects (e.g., "CTOs at B2B SaaS startups")')
|
|
237
|
-
.option('-y, --yes', 'Auto-approve all tool permissions')
|
|
238
|
-
.action(async (targetParts, options) => {
|
|
239
|
-
const prefillTarget = targetParts.length > 0 ? targetParts.join(' ') : undefined;
|
|
240
|
-
const inputs = await gatherInputs(prefillTarget ? { target: prefillTarget } : undefined);
|
|
241
|
-
const parts = [`Find leads matching: ${inputs.target}`];
|
|
242
|
-
if (inputs.source !== 'auto')
|
|
243
|
-
parts.push(`Search on: ${inputs.source}`);
|
|
244
|
-
if (inputs.context)
|
|
245
|
-
parts.push(inputs.context);
|
|
246
|
-
const userMessage = parts.join('. ') + '.';
|
|
247
|
-
const skipPermissions = true;
|
|
248
|
-
console.log(`\nLaunching ${config.displayName}...\n`);
|
|
249
|
-
(0, backends_1.launchAgent)(backend, buildSystemPrompt({
|
|
250
|
-
source: inputs.source,
|
|
251
|
-
profile: inputs.profile,
|
|
252
|
-
maxLeads: inputs.maxLeads,
|
|
253
|
-
output: inputs.output,
|
|
254
|
-
}), userMessage, skipPermissions);
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
//# sourceMappingURL=lead-gen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lead-gen.js","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/lead-gen.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqOH,4BAwCC;AA1Q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CAAC;QAC/C,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;QAE3C,MAAM,eAAe,GAAG,IAAI,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,eAAe,MAAM,CAAC,WAAW,OAAO,CAAC,CAAC;QAEtD,IAAA,sBAAW,EACT,OAAO,EACP,iBAAiB,CAAC;YAChB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,MAAM,EAAE,MAAM,CAAC,MAAM;SACtB,CAAC,EACF,WAAW,EACX,eAAe,CAChB,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Workflow: Lead Research
|
|
3
|
-
*
|
|
4
|
-
* Spawns parallel agents to research a company, recent news/activity, and
|
|
5
|
-
* optionally a specific person -- all at once. Results are synthesized into
|
|
6
|
-
* a brief with talking points and pain points.
|
|
7
|
-
*/
|
|
8
|
-
import { Command } from 'commander';
|
|
9
|
-
import { type Backend } from '../backends';
|
|
10
|
-
export declare function register(parentCmd: Command, backend: Backend): void;
|
|
11
|
-
//# sourceMappingURL=lead-research.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lead-research.d.ts","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/lead-research.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,OAAO,EAAyB,MAAM,aAAa,CAAC;AAkHlE,wBAAgB,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAyBnE"}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Workflow: Lead Research
|
|
4
|
-
*
|
|
5
|
-
* Spawns parallel agents to research a company, recent news/activity, and
|
|
6
|
-
* optionally a specific person -- all at once. Results are synthesized into
|
|
7
|
-
* a brief with talking points and pain points.
|
|
8
|
-
*/
|
|
9
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
-
}
|
|
15
|
-
Object.defineProperty(o, k2, desc);
|
|
16
|
-
}) : (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
o[k2] = m[k];
|
|
19
|
-
}));
|
|
20
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
-
}) : function(o, v) {
|
|
23
|
-
o["default"] = v;
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
-
var ownKeys = function(o) {
|
|
27
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
-
var ar = [];
|
|
29
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
-
return ar;
|
|
31
|
-
};
|
|
32
|
-
return ownKeys(o);
|
|
33
|
-
};
|
|
34
|
-
return function (mod) {
|
|
35
|
-
if (mod && mod.__esModule) return mod;
|
|
36
|
-
var result = {};
|
|
37
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
-
__setModuleDefault(result, mod);
|
|
39
|
-
return result;
|
|
40
|
-
};
|
|
41
|
-
})();
|
|
42
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
-
exports.register = register;
|
|
44
|
-
const backends_1 = require("../backends");
|
|
45
|
-
const shared_1 = require("../shared");
|
|
46
|
-
// ─── Input gathering ────────────────────────────────────────────────────────
|
|
47
|
-
async function gatherInputs(prefill) {
|
|
48
|
-
const { input, select } = await Promise.resolve().then(() => __importStar(require('@inquirer/prompts')));
|
|
49
|
-
const company = prefill?.company ||
|
|
50
|
-
(await input({
|
|
51
|
-
message: 'What company do you want to research?',
|
|
52
|
-
validate: (0, shared_1.validateRequired)('Company name or URL'),
|
|
53
|
-
}));
|
|
54
|
-
const person = await input({
|
|
55
|
-
message: 'Specific person to research? (leave blank to skip)',
|
|
56
|
-
default: '',
|
|
57
|
-
});
|
|
58
|
-
const context = await input({
|
|
59
|
-
message: 'What\'s the context? (e.g., "preparing for a sales call", "partnership eval")',
|
|
60
|
-
default: '',
|
|
61
|
-
});
|
|
62
|
-
const output = await select({
|
|
63
|
-
message: 'How should the brief be delivered?',
|
|
64
|
-
choices: [
|
|
65
|
-
{ name: 'Print to terminal', value: 'terminal' },
|
|
66
|
-
{ name: 'Save as Markdown file', value: 'markdown' },
|
|
67
|
-
],
|
|
68
|
-
});
|
|
69
|
-
return { company, person, context, output };
|
|
70
|
-
}
|
|
71
|
-
// ─── System prompt ──────────────────────────────────────────────────────────
|
|
72
|
-
function buildSystemPrompt(opts) {
|
|
73
|
-
const outputInstructions = opts.output === 'markdown'
|
|
74
|
-
? 'Save the brief to a file called `lead-brief.md` in the current directory. Tell the user the file path when done.'
|
|
75
|
-
: 'Print the full brief to the terminal in well-formatted markdown.';
|
|
76
|
-
return `You are a lead research team lead powered by Firecrawl. You orchestrate parallel research agents to prepare intelligence briefs before meetings, calls, or outreach.
|
|
77
|
-
|
|
78
|
-
${shared_1.FIRECRAWL_TOOLS_BLOCK}
|
|
79
|
-
|
|
80
|
-
## Your Strategy
|
|
81
|
-
|
|
82
|
-
You are a **team lead**, not a solo researcher. Your job is to:
|
|
83
|
-
|
|
84
|
-
1. **Spawn parallel subagents** -- Launch agents to research the company, recent activity, and person simultaneously.
|
|
85
|
-
2. **Collect results** -- Each agent reports back findings with sources.
|
|
86
|
-
3. **Synthesize** -- Build the brief with talking points and pain points from all agent findings.
|
|
87
|
-
|
|
88
|
-
## Agent Assignments
|
|
89
|
-
|
|
90
|
-
Spawn these agents in parallel:
|
|
91
|
-
1. **Company Profile Agent** -- Scrape the company website: about page, team/careers, product pages, pricing. Return what they do, size, stage, tech stack, key metrics.
|
|
92
|
-
2. **News & Activity Agent** -- Search for recent news about the company: funding, launches, hires, partnerships, press coverage from the last 6 months. Scrape the top results.
|
|
93
|
-
3. **Person Research Agent** (if a person is specified) -- Search for the person: their role, background, recent talks/posts/tweets, interests, public profiles. Scrape relevant pages.
|
|
94
|
-
|
|
95
|
-
${shared_1.SUBAGENT_INSTRUCTIONS}
|
|
96
|
-
|
|
97
|
-
## Output Format
|
|
98
|
-
|
|
99
|
-
${outputInstructions}
|
|
100
|
-
|
|
101
|
-
Structure the brief as:
|
|
102
|
-
|
|
103
|
-
### Company Overview
|
|
104
|
-
What they do, size, stage, key metrics.
|
|
105
|
-
|
|
106
|
-
### Recent Activity
|
|
107
|
-
News, launches, funding, hires from the last 6 months.
|
|
108
|
-
|
|
109
|
-
### Key People
|
|
110
|
-
Relevant people at the company with their roles and backgrounds.
|
|
111
|
-
|
|
112
|
-
### Talking Points
|
|
113
|
-
5-7 specific conversation starters based on your research.
|
|
114
|
-
|
|
115
|
-
### Potential Pain Points
|
|
116
|
-
What challenges might they be facing based on their industry/stage/tech?
|
|
117
|
-
|
|
118
|
-
### Sources
|
|
119
|
-
Every URL you scraped.
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
Be concise and actionable. This is a pre-meeting brief, not a thesis.
|
|
124
|
-
|
|
125
|
-
Start working immediately.`;
|
|
126
|
-
}
|
|
127
|
-
// ─── Command registration ───────────────────────────────────────────────────
|
|
128
|
-
function register(parentCmd, backend) {
|
|
129
|
-
const config = backends_1.BACKENDS[backend];
|
|
130
|
-
parentCmd
|
|
131
|
-
.command('lead-research')
|
|
132
|
-
.description('Research a company or person before a meeting or outreach')
|
|
133
|
-
.argument('[company]', 'Company name or URL')
|
|
134
|
-
.option('-y, --yes', 'Auto-approve all tool permissions')
|
|
135
|
-
.action(async (company, options) => {
|
|
136
|
-
const inputs = await gatherInputs(company ? { company } : undefined);
|
|
137
|
-
const skipPermissions = options.yes || (await (0, shared_1.askPermissionMode)(backend));
|
|
138
|
-
console.log(`\nLaunching ${config.displayName}...\n`);
|
|
139
|
-
(0, backends_1.launchAgent)(backend, buildSystemPrompt({ output: inputs.output }), (0, shared_1.buildMessage)([
|
|
140
|
-
`Research ${inputs.company}`,
|
|
141
|
-
inputs.person && `Focus on ${inputs.person}`,
|
|
142
|
-
inputs.context && `Context: ${inputs.context}`,
|
|
143
|
-
]), skipPermissions);
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
//# sourceMappingURL=lead-research.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lead-research.js","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/lead-research.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqHH,4BAyBC;AA3ID,0CAAkE;AAClE,sCAMmB;AAWnB,+EAA+E;AAE/E,KAAK,UAAU,YAAY,CAAC,OAA8B;IACxD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,wDAAa,mBAAmB,GAAC,CAAC;IAE5D,MAAM,OAAO,GACX,OAAO,EAAE,OAAO;QAChB,CAAC,MAAM,KAAK,CAAC;YACX,OAAO,EAAE,uCAAuC;YAChD,QAAQ,EAAE,IAAA,yBAAgB,EAAC,qBAAqB,CAAC;SAClD,CAAC,CAAC,CAAC;IAEN,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC;QACzB,OAAO,EAAE,oDAAoD;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S,CAAC,CAAC;QAErE,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,IAAA,0BAAiB,EAAC,OAAO,CAAC,CAAC,CAAC;QAC1E,OAAO,CAAC,GAAG,CAAC,eAAe,MAAM,CAAC,WAAW,OAAO,CAAC,CAAC;QAEtD,IAAA,sBAAW,EACT,OAAO,EACP,iBAAiB,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,EAC5C,IAAA,qBAAY,EAAC;YACX,YAAY,MAAM,CAAC,OAAO,EAAE;YAC5B,MAAM,CAAC,MAAM,IAAI,YAAY,MAAM,CAAC,MAAM,EAAE;YAC5C,MAAM,CAAC,OAAO,IAAI,YAAY,MAAM,CAAC,OAAO,EAAE;SAC/C,CAAC,EACF,eAAe,CAChB,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Workflow: Market Research
|
|
3
|
-
*
|
|
4
|
-
* Browses financial portals, earnings pages, and market data sites using a
|
|
5
|
-
* cloud browser. Interacts with charts, filters, and dropdowns to extract
|
|
6
|
-
* earnings data, market metrics, and financial comparisons across companies.
|
|
7
|
-
*/
|
|
8
|
-
import { Command } from 'commander';
|
|
9
|
-
import { type Backend } from '../backends';
|
|
10
|
-
export declare function register(parentCmd: Command, backend: Backend): void;
|
|
11
|
-
//# sourceMappingURL=market-research.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"market-research.d.ts","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/market-research.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,OAAO,EAAyB,MAAM,aAAa,CAAC;AAoOlE,wBAAgB,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAoCnE"}
|