firecrawl-cli 1.16.2 → 1.17.1

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.
Files changed (103) hide show
  1. package/README.md +15 -37
  2. package/dist/__tests__/commands/init.test.js +4 -2
  3. package/dist/__tests__/commands/init.test.js.map +1 -1
  4. package/dist/__tests__/commands/search.test.js +134 -179
  5. package/dist/__tests__/commands/search.test.js.map +1 -1
  6. package/dist/__tests__/commands/setup.test.js +6 -2
  7. package/dist/__tests__/commands/setup.test.js.map +1 -1
  8. package/dist/commands/init.d.ts.map +1 -1
  9. package/dist/commands/init.js +27 -4
  10. package/dist/commands/init.js.map +1 -1
  11. package/dist/commands/search-feedback.d.ts +44 -0
  12. package/dist/commands/search-feedback.d.ts.map +1 -0
  13. package/dist/commands/search-feedback.js +357 -0
  14. package/dist/commands/search-feedback.js.map +1 -0
  15. package/dist/commands/search.d.ts.map +1 -1
  16. package/dist/commands/search.js +19 -28
  17. package/dist/commands/search.js.map +1 -1
  18. package/dist/commands/setup.d.ts +1 -1
  19. package/dist/commands/setup.d.ts.map +1 -1
  20. package/dist/commands/setup.js +9 -5
  21. package/dist/commands/setup.js.map +1 -1
  22. package/dist/commands/skills-install.d.ts +9 -1
  23. package/dist/commands/skills-install.d.ts.map +1 -1
  24. package/dist/commands/skills-install.js +13 -2
  25. package/dist/commands/skills-install.js.map +1 -1
  26. package/dist/commands/status.d.ts.map +1 -1
  27. package/dist/commands/status.js +4 -0
  28. package/dist/commands/status.js.map +1 -1
  29. package/dist/index.js +68 -8
  30. package/dist/index.js.map +1 -1
  31. package/package.json +1 -1
  32. package/dist/commands/experimental/backends.d.ts +0 -19
  33. package/dist/commands/experimental/backends.d.ts.map +0 -1
  34. package/dist/commands/experimental/backends.js +0 -74
  35. package/dist/commands/experimental/backends.js.map +0 -1
  36. package/dist/commands/experimental/index.d.ts +0 -13
  37. package/dist/commands/experimental/index.d.ts.map +0 -1
  38. package/dist/commands/experimental/index.js +0 -200
  39. package/dist/commands/experimental/index.js.map +0 -1
  40. package/dist/commands/experimental/shared.d.ts +0 -17
  41. package/dist/commands/experimental/shared.d.ts.map +0 -1
  42. package/dist/commands/experimental/shared.js +0 -152
  43. package/dist/commands/experimental/shared.js.map +0 -1
  44. package/dist/commands/experimental/workflows/company-directories.d.ts +0 -11
  45. package/dist/commands/experimental/workflows/company-directories.d.ts.map +0 -1
  46. package/dist/commands/experimental/workflows/company-directories.js +0 -245
  47. package/dist/commands/experimental/workflows/company-directories.js.map +0 -1
  48. package/dist/commands/experimental/workflows/competitive-intel.d.ts +0 -11
  49. package/dist/commands/experimental/workflows/competitive-intel.d.ts.map +0 -1
  50. package/dist/commands/experimental/workflows/competitive-intel.js +0 -226
  51. package/dist/commands/experimental/workflows/competitive-intel.js.map +0 -1
  52. package/dist/commands/experimental/workflows/competitor-analysis.d.ts +0 -10
  53. package/dist/commands/experimental/workflows/competitor-analysis.d.ts.map +0 -1
  54. package/dist/commands/experimental/workflows/competitor-analysis.js +0 -196
  55. package/dist/commands/experimental/workflows/competitor-analysis.js.map +0 -1
  56. package/dist/commands/experimental/workflows/dashboard-reporting.d.ts +0 -11
  57. package/dist/commands/experimental/workflows/dashboard-reporting.d.ts.map +0 -1
  58. package/dist/commands/experimental/workflows/dashboard-reporting.js +0 -254
  59. package/dist/commands/experimental/workflows/dashboard-reporting.js.map +0 -1
  60. package/dist/commands/experimental/workflows/deep-research.d.ts +0 -11
  61. package/dist/commands/experimental/workflows/deep-research.d.ts.map +0 -1
  62. package/dist/commands/experimental/workflows/deep-research.js +0 -159
  63. package/dist/commands/experimental/workflows/deep-research.js.map +0 -1
  64. package/dist/commands/experimental/workflows/demo.d.ts +0 -11
  65. package/dist/commands/experimental/workflows/demo.d.ts.map +0 -1
  66. package/dist/commands/experimental/workflows/demo.js +0 -190
  67. package/dist/commands/experimental/workflows/demo.js.map +0 -1
  68. package/dist/commands/experimental/workflows/knowledge-base.d.ts +0 -11
  69. package/dist/commands/experimental/workflows/knowledge-base.d.ts.map +0 -1
  70. package/dist/commands/experimental/workflows/knowledge-base.js +0 -319
  71. package/dist/commands/experimental/workflows/knowledge-base.js.map +0 -1
  72. package/dist/commands/experimental/workflows/knowledge-ingest.d.ts +0 -12
  73. package/dist/commands/experimental/workflows/knowledge-ingest.d.ts.map +0 -1
  74. package/dist/commands/experimental/workflows/knowledge-ingest.js +0 -251
  75. package/dist/commands/experimental/workflows/knowledge-ingest.js.map +0 -1
  76. package/dist/commands/experimental/workflows/lead-gen.d.ts +0 -11
  77. package/dist/commands/experimental/workflows/lead-gen.d.ts.map +0 -1
  78. package/dist/commands/experimental/workflows/lead-gen.js +0 -257
  79. package/dist/commands/experimental/workflows/lead-gen.js.map +0 -1
  80. package/dist/commands/experimental/workflows/lead-research.d.ts +0 -11
  81. package/dist/commands/experimental/workflows/lead-research.d.ts.map +0 -1
  82. package/dist/commands/experimental/workflows/lead-research.js +0 -146
  83. package/dist/commands/experimental/workflows/lead-research.js.map +0 -1
  84. package/dist/commands/experimental/workflows/market-research.d.ts +0 -11
  85. package/dist/commands/experimental/workflows/market-research.d.ts.map +0 -1
  86. package/dist/commands/experimental/workflows/market-research.js +0 -260
  87. package/dist/commands/experimental/workflows/market-research.js.map +0 -1
  88. package/dist/commands/experimental/workflows/qa.d.ts +0 -11
  89. package/dist/commands/experimental/workflows/qa.d.ts.map +0 -1
  90. package/dist/commands/experimental/workflows/qa.js +0 -184
  91. package/dist/commands/experimental/workflows/qa.js.map +0 -1
  92. package/dist/commands/experimental/workflows/research-papers.d.ts +0 -11
  93. package/dist/commands/experimental/workflows/research-papers.d.ts.map +0 -1
  94. package/dist/commands/experimental/workflows/research-papers.js +0 -151
  95. package/dist/commands/experimental/workflows/research-papers.js.map +0 -1
  96. package/dist/commands/experimental/workflows/seo-audit.d.ts +0 -11
  97. package/dist/commands/experimental/workflows/seo-audit.d.ts.map +0 -1
  98. package/dist/commands/experimental/workflows/seo-audit.js +0 -155
  99. package/dist/commands/experimental/workflows/seo-audit.js.map +0 -1
  100. package/dist/commands/experimental/workflows/shop.d.ts +0 -11
  101. package/dist/commands/experimental/workflows/shop.d.ts.map +0 -1
  102. package/dist/commands/experimental/workflows/shop.js +0 -155
  103. package/dist/commands/experimental/workflows/shop.js.map +0 -1
@@ -1,254 +0,0 @@
1
- "use strict";
2
- /**
3
- * Workflow: Dashboard Reporting
4
- *
5
- * Uses saved browser profiles to log into analytics platforms and internal
6
- * tools, navigate dashboards, extract metrics, trigger exports, and compile
7
- * cross-platform reports. Supports any login-gated web dashboard.
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?.dashboards) {
49
- return {
50
- dashboards: prefill.dashboards,
51
- profile: '',
52
- metrics: '',
53
- dateRange: 'last 7 days',
54
- output: 'json',
55
- context: '',
56
- };
57
- }
58
- const { input, select } = await Promise.resolve().then(() => __importStar(require('@inquirer/prompts')));
59
- const dashboards = await input({
60
- message: 'Which dashboards to pull from? (URLs, comma-separated -- e.g., "analytics.google.com, app.mixpanel.com")',
61
- validate: (0, shared_1.validateRequired)('At least one dashboard URL'),
62
- });
63
- const profile = await input({
64
- message: 'Browser profile for auth? (required for most dashboards)',
65
- default: '',
66
- });
67
- const metrics = await input({
68
- message: 'What metrics or data to extract? (leave blank for "everything visible")',
69
- default: '',
70
- });
71
- const dateRange = await select({
72
- message: 'Date range?',
73
- choices: [
74
- { name: 'Last 7 days', value: 'last 7 days' },
75
- { name: 'Last 30 days', value: 'last 30 days' },
76
- { name: 'Last 90 days', value: 'last 90 days' },
77
- { name: 'Month to date', value: 'month to date' },
78
- { name: 'Year to date', value: 'year to date' },
79
- { name: 'Custom (specify in context)', value: 'custom' },
80
- ],
81
- });
82
- const output = await select({
83
- message: 'Output format?',
84
- choices: [
85
- { name: 'JSON (structured metrics)', value: 'json' },
86
- { name: 'Markdown report', value: 'markdown' },
87
- { name: 'Print to terminal', value: 'terminal' },
88
- ],
89
- });
90
- const context = await input({
91
- message: 'Any other instructions? (e.g., "compare to previous period", "focus on conversion funnel")',
92
- default: '',
93
- });
94
- return { dashboards, profile, metrics, dateRange, output, context };
95
- }
96
- // ─── System prompt ──────────────────────────────────────────────────────────
97
- function buildSystemPrompt(opts) {
98
- const profileBlock = opts.profile
99
- ? `\n### Authentication\n\nUse the saved browser profile \`${opts.profile}\` to access dashboards:\n\`\`\`bash\nfirecrawl browser "open <url>" --profile ${opts.profile}\n\`\`\`\nAfter the first \`open\` with \`--profile\`, subsequent browser commands don't need the flag.\n\nIf you encounter a login page, use the profile's saved cookies/session. If those have expired, tell the user and ask them to re-authenticate the profile.`
100
- : `\n### Authentication\n\nNo browser profile was specified. If dashboards require login, tell the user they need to provide a browser profile with saved auth. You can still attempt to access public dashboards or demo instances.`;
101
- const outputInstructions = {
102
- terminal: 'Print the full dashboard report to the terminal in well-formatted markdown with data tables.',
103
- json: `Save the report to \`dashboard-report.json\` in the current directory. Tell the user the file path when done.
104
-
105
- Use this schema:
106
- \`\`\`json
107
- {
108
- "reportedAt": "ISO-8601",
109
- "dateRange": "string",
110
- "dashboards": [
111
- {
112
- "name": "string (platform name)",
113
- "url": "string",
114
- "metrics": [
115
- {
116
- "name": "string",
117
- "value": "string | number",
118
- "unit": "string (e.g. %, users, $)",
119
- "change": "string (e.g. +12% vs previous period)",
120
- "period": "string"
121
- }
122
- ],
123
- "tables": [
124
- {
125
- "title": "string",
126
- "headers": ["string"],
127
- "rows": [["string"]]
128
- }
129
- ],
130
- "exports": [{ "filename": "string", "description": "string" }],
131
- "notes": "string"
132
- }
133
- ],
134
- "summary": {
135
- "highlights": ["string"],
136
- "alerts": ["string"],
137
- "trends": ["string"]
138
- }
139
- }
140
- \`\`\``,
141
- markdown: 'Save the report to `dashboard-report.md` in the current directory. Tell the user the file path when done.',
142
- };
143
- return `You are a dashboard reporting agent powered by Firecrawl. You use a real cloud browser to log into analytics platforms and internal tools, navigate dashboards, extract metrics, and compile cross-platform reports.
144
-
145
- ## STEP 1: Launch Browser and Open Live View
146
-
147
- Before anything else, launch a browser session so the user can watch:
148
-
149
- \`\`\`bash
150
- firecrawl browser launch-session --json
151
- \`\`\`
152
-
153
- Extract the \`interactiveLiveViewUrl\` from the JSON output and open it (NOT the regular \`liveViewUrl\` -- the interactive one lets the user click and interact):
154
-
155
- \`\`\`bash
156
- open "<interactiveLiveViewUrl>" # macOS
157
- xdg-open "<interactiveLiveViewUrl>" # Linux
158
- \`\`\`
159
-
160
- If the \`open\` command fails, print the URL clearly.
161
- ${profileBlock}
162
-
163
- ## STEP 2: Visit Each Dashboard
164
-
165
- For each dashboard URL the user provides:
166
-
167
- 1. **Navigate** to the dashboard
168
- 2. **Snapshot** to see the current state
169
- 3. **Set the date range** to "${opts.dateRange}" -- look for date pickers, dropdowns, or preset buttons and click them
170
- 4. **Extract visible metrics** -- KPIs, summary cards, headline numbers
171
- 5. **Explore data tables** -- click through tabs, expand sections, scroll tables
172
- 6. **Look for exports** -- if there's a "Download CSV", "Export", or "Report" button, click it
173
- 7. **Screenshot key views** by scraping the page content
174
-
175
- ### Browser commands:
176
- \`\`\`bash
177
- firecrawl browser "open <url>"
178
- firecrawl browser "snapshot"
179
- firecrawl browser "click @<ref>"
180
- firecrawl browser "type @<ref> <text>"
181
- firecrawl browser "scroll down"
182
- firecrawl browser "scrape"
183
- \`\`\`
184
-
185
- ### Common dashboard patterns:
186
- - **Google Analytics**: Navigate to Reports > Engagement, Acquisition, etc.
187
- - **Mixpanel / Amplitude**: Click through funnels, retention, user flows
188
- - **Stripe / Billing dashboards**: Revenue, MRR, churn, customer counts
189
- - **Internal tools**: Look for nav menus, sidebar items, tab strips
190
- - **Grafana / Datadog**: Expand panels, hover charts for values, adjust time range
191
-
192
- ### Handling charts and visualizations:
193
- - Charts can't be "read" visually -- instead, look for:
194
- - Data tables below/beside charts
195
- - Hover tooltips (snapshot after hovering)
196
- - "View as table" or "Show data" toggles
197
- - Export/download buttons for raw data
198
- - If a metric is only in a chart, describe what you can see from the page content
199
-
200
- ## STEP 3: Compile Report
201
-
202
- After visiting all dashboards, compile findings into a unified report:
203
-
204
- ### Dashboard-by-Dashboard Breakdown
205
- For each platform:
206
- - Platform name and URL
207
- - All metrics extracted with values and units
208
- - Any data tables captured
209
- - Files exported (if any)
210
-
211
- ### Cross-Platform Summary
212
- - Key highlights across all dashboards
213
- - Alerts (metrics that changed significantly)
214
- - Trends (patterns across platforms)
215
-
216
- ## Output Format
217
-
218
- ${outputInstructions[opts.output]}
219
-
220
- ---
221
-
222
- Do everything sequentially -- visit one dashboard at a time. Be thorough: click through tabs, expand sections, scroll to load lazy content. Extract actual numbers, not just labels.
223
-
224
- Start immediately.`;
225
- }
226
- // ─── Command registration ───────────────────────────────────────────────────
227
- function register(parentCmd, backend) {
228
- const config = backends_1.BACKENDS[backend];
229
- parentCmd
230
- .command('dashboard-reporting')
231
- .description('Pull metrics from analytics dashboards and internal tools via browser')
232
- .argument('[dashboards...]', 'Dashboard URLs to pull from')
233
- .option('-y, --yes', 'Auto-approve all tool permissions')
234
- .action(async (dashboardParts, options) => {
235
- const prefillDashboards = dashboardParts.length > 0 ? dashboardParts.join(' ') : undefined;
236
- const inputs = await gatherInputs(prefillDashboards ? { dashboards: prefillDashboards } : undefined);
237
- const parts = [`Pull reports from: ${inputs.dashboards}`];
238
- if (inputs.metrics)
239
- parts.push(`Focus on these metrics: ${inputs.metrics}`);
240
- if (inputs.dateRange !== 'custom')
241
- parts.push(`Date range: ${inputs.dateRange}`);
242
- if (inputs.context)
243
- parts.push(inputs.context);
244
- const userMessage = parts.join('. ') + '.';
245
- const skipPermissions = true;
246
- console.log(`\nLaunching ${config.displayName}...\n`);
247
- (0, backends_1.launchAgent)(backend, buildSystemPrompt({
248
- profile: inputs.profile,
249
- dateRange: inputs.dateRange,
250
- output: inputs.output,
251
- }), userMessage, skipPermissions);
252
- });
253
- }
254
- //# sourceMappingURL=dashboard-reporting.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dashboard-reporting.js","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/dashboard-reporting.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgOH,4BAuCC;AApQD,0CAAkE;AAClE,sCAA6C;AAa7C,+EAA+E;AAE/E,KAAK,UAAU,YAAY,CAAC,OAE3B;IACC,IAAI,OAAO,EAAE,UAAU,EAAE,CAAC;QACxB,OAAO;YACL,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,EAAE;YACX,S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AAM,iBAAiB,GACrB,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACnE,MAAM,MAAM,GAAG,MAAM,YAAY,CAC/B,iBAAiB,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,SAAS,CAClE,CAAC;QAEF,MAAM,KAAK,GAAG,CAAC,sBAAsB,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;QAC1D,IAAI,MAAM,CAAC,OAAO;YAChB,KAAK,CAAC,IAAI,CAAC,2BAA2B,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAC1D,IAAI,MAAM,CAAC,SAAS,KAAK,QAAQ;YAC/B,KAAK,CAAC,IAAI,CAAC,eAAe,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;QAChD,IAAI,MAAM,CAAC,OAAO;YAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,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,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,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: Deep Research
3
- *
4
- * Breaks a topic into research angles, then spawns parallel agents -- one per
5
- * angle (overview, technical, market, contrarian). Results are cross-referenced
6
- * and synthesized into a structured report.
7
- */
8
- import { Command } from 'commander';
9
- import { type Backend } from '../backends';
10
- export declare function register(parentCmd: Command, backend: Backend): void;
11
- //# sourceMappingURL=deep-research.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deep-research.d.ts","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/deep-research.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,OAAO,EAAyB,MAAM,aAAa,CAAC;AAuIlE,wBAAgB,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAqBnE"}
@@ -1,159 +0,0 @@
1
- "use strict";
2
- /**
3
- * Workflow: Deep Research
4
- *
5
- * Breaks a topic into research angles, then spawns parallel agents -- one per
6
- * angle (overview, technical, market, contrarian). Results are cross-referenced
7
- * and synthesized into a structured report.
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 topic = prefill?.topic ||
50
- (await input({
51
- message: 'What topic do you want to research?',
52
- validate: (0, shared_1.validateRequired)('Topic'),
53
- }));
54
- const depth = await select({
55
- message: 'How deep should the research go?',
56
- choices: [
57
- { name: 'Quick overview (5-10 sources)', value: 'quick' },
58
- { name: 'Thorough analysis (15-25 sources)', value: 'thorough' },
59
- { name: 'Exhaustive deep-dive (25+ sources)', value: 'exhaustive' },
60
- ],
61
- });
62
- const context = await input({
63
- message: 'Any specific angles or questions to focus on? (leave blank to skip)',
64
- default: '',
65
- });
66
- const output = await select({
67
- message: 'How should the research be delivered?',
68
- choices: [
69
- { name: 'Print to terminal', value: 'terminal' },
70
- { name: 'Save as Markdown file', value: 'markdown' },
71
- { name: 'Save as JSON (structured data)', value: 'json' },
72
- ],
73
- });
74
- return { topic, depth, context, output };
75
- }
76
- // ─── System prompt ──────────────────────────────────────────────────────────
77
- function buildSystemPrompt(opts) {
78
- const depthInstructions = {
79
- quick: 'Search 3-5 queries and scrape 5-10 of the most relevant pages.',
80
- thorough: 'Search 5-10 queries from different angles and scrape 15-25 pages. Cross-reference claims across sources.',
81
- exhaustive: 'Search 10+ queries covering every angle. Scrape 25+ pages including primary sources, research papers, expert opinions, and contrarian views. Cross-reference everything.',
82
- };
83
- const outputInstructions = {
84
- terminal: 'Print the full research report to the terminal in well-formatted markdown.',
85
- markdown: 'Save the report to a file called `research-report.md` in the current directory. Tell the user the file path when done.',
86
- json: 'Save the report as structured JSON to `research-report.json` in the current directory. Tell the user the file path when done.',
87
- };
88
- return `You are a deep research team lead powered by Firecrawl. You orchestrate parallel research agents to investigate a topic from every angle simultaneously.
89
-
90
- ${shared_1.FIRECRAWL_TOOLS_BLOCK}
91
-
92
- ## Research Depth
93
-
94
- ${depthInstructions[opts.depth]}
95
-
96
- ## Your Strategy
97
-
98
- You are a **team lead**, not a solo researcher. Your job is to:
99
-
100
- 1. **Break the topic into angles** -- Identify 3-5 distinct research angles or subtopics.
101
- 2. **Spawn parallel subagents** -- One agent per angle. Each searches, scrapes, and analyzes from their specific perspective.
102
- 3. **Collect results** -- Each agent reports back findings with sources.
103
- 4. **Cross-reference and synthesize** -- Merge findings, resolve conflicting claims, build the unified report.
104
-
105
- ## Agent Assignments
106
-
107
- Based on the topic, spawn agents like:
108
- 1. **Overview Agent** -- Broad searches, foundational context, definitions, key players. Scrape Wikipedia, encyclopedia-style sources, overview articles.
109
- 2. **Technical Deep-Dive Agent** -- Technical details, documentation, specifications, architecture. Scrape docs, technical blogs, research papers.
110
- 3. **Market & Industry Agent** -- Market size, trends, adoption, industry analyst perspectives. Scrape reports, news articles, industry publications.
111
- 4. **Contrarian & Risks Agent** -- Counterarguments, criticisms, failure cases, limitations. Search for "<topic> problems", "<topic> criticism", "<topic> limitations".
112
-
113
- Adjust the number and focus of agents based on the topic and depth level.
114
-
115
- ${shared_1.SUBAGENT_INSTRUCTIONS}
116
-
117
- ## Output Format
118
-
119
- ${outputInstructions[opts.output]}
120
-
121
- Structure the report as:
122
-
123
- ### Executive Summary
124
- 2-3 paragraph overview of key findings.
125
-
126
- ### Key Findings
127
- Numbered list of the most important discoveries, each with supporting evidence.
128
-
129
- ### Detailed Analysis
130
- Deep dive into each major theme or subtopic.
131
-
132
- ### Contrarian Views & Risks
133
- What are the counterarguments? What could go wrong?
134
-
135
- ### Sources
136
- Every URL you scraped, with a one-line summary of what you found there.
137
-
138
- ---
139
-
140
- Be thorough and honest. Cite your sources. Flag uncertainty. Do not fabricate information.
141
-
142
- Start working immediately when given a topic.`;
143
- }
144
- // ─── Command registration ───────────────────────────────────────────────────
145
- function register(parentCmd, backend) {
146
- const config = backends_1.BACKENDS[backend];
147
- parentCmd
148
- .command('deep-research')
149
- .description('Deep research any topic using web search and scraping')
150
- .argument('[topic]', 'Topic to research')
151
- .option('-y, --yes', 'Auto-approve all tool permissions')
152
- .action(async (topic, options) => {
153
- const inputs = await gatherInputs(topic ? { topic } : undefined);
154
- const skipPermissions = options.yes || (await (0, shared_1.askPermissionMode)(backend));
155
- console.log(`\nLaunching ${config.displayName}...\n`);
156
- (0, backends_1.launchAgent)(backend, buildSystemPrompt({ depth: inputs.depth, output: inputs.output }), (0, shared_1.buildMessage)([inputs.topic, inputs.context]), skipPermissions);
157
- });
158
- }
159
- //# sourceMappingURL=deep-research.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deep-research.js","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/deep-research.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0IH,4BAqBC;AA5JD,0CAAkE;AAClE,sCAMmB;AAWnB,+EAA+E;AAE/E,KAAK,UAAU,YAAY,CAAC,OAA4B;IACtD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,wDAAa,mBAAmB,GAAC,CAAC;IAE5D,MAAM,KAAK,GACT,OAAO,EAAE,KAAK;QACd,CAAC,MAAM,KAAK,CAAC;YACX,OAAO,EAAE,qCAAqC;YAC9C,QAAQ,EAAE,IAAA,yBAAgB,EAAC,OAAO,CAAC;SACpC,CAAC,CAAC,CAAC;IAEN,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC;QACzB,OAAO,EAAE,kCAAkC;QAC3C,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,+BAA+B,EAAE,KAAK,EAAE,OAAO,EAAE;YACzD,EAAE,IAAI,EAAE,mCAAmC,EAAE,KAAK,EAAE,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AS;SACN,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,uDAAuD,CAAC;SACpE,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;SACxC,MAAM,CAAC,WAAW,EAAE,mCAAmC,CAAC;SACxD,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QAC/B,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAEjE,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,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,EACjE,IAAA,qBAAY,EAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,EAC5C,eAAe,CAChB,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Workflow: Demo Walkthrough
3
- *
4
- * Uses Firecrawl's cloud browser to walk through a product's key flows --
5
- * signup, onboarding, pricing, docs -- step by step. Captures every screen,
6
- * documents interactions, and produces a structured walkthrough report.
7
- */
8
- import { Command } from 'commander';
9
- import { type Backend } from '../backends';
10
- export declare function register(parentCmd: Command, backend: Backend): void;
11
- //# sourceMappingURL=demo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/demo.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,OAAO,EAAyB,MAAM,aAAa,CAAC;AAuKlE,wBAAgB,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAqBnE"}
@@ -1,190 +0,0 @@
1
- "use strict";
2
- /**
3
- * Workflow: Demo Walkthrough
4
- *
5
- * Uses Firecrawl's cloud browser to walk through a product's key flows --
6
- * signup, onboarding, pricing, docs -- step by step. Captures every screen,
7
- * documents interactions, and produces a structured walkthrough report.
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 rawUrl = prefill?.url ||
50
- (await input({
51
- message: 'What product do you want to walk through?',
52
- validate: shared_1.validateUrl,
53
- }));
54
- const focus = await select({
55
- message: 'What flows should the agent explore?',
56
- choices: [
57
- { name: 'Full product walkthrough (all key flows)', value: 'full' },
58
- { name: 'Signup and onboarding flow', value: 'signup' },
59
- { name: 'Pricing and plans', value: 'pricing' },
60
- { name: 'Documentation and developer experience', value: 'docs' },
61
- { name: 'Dashboard and core product', value: 'dashboard' },
62
- ],
63
- });
64
- const context = await input({
65
- message: 'Anything specific to look for? (leave blank to skip)',
66
- default: '',
67
- });
68
- const output = await select({
69
- message: 'How should the walkthrough be delivered?',
70
- choices: [
71
- { name: 'Print to terminal', value: 'terminal' },
72
- { name: 'Save as Markdown file', value: 'markdown' },
73
- ],
74
- });
75
- return { url: (0, shared_1.normalizeUrl)(rawUrl), focus, context, output };
76
- }
77
- // ─── System prompt ──────────────────────────────────────────────────────────
78
- function buildSystemPrompt(opts) {
79
- const outputInstructions = opts.output === 'markdown'
80
- ? 'Save the walkthrough to a file called `demo-walkthrough.md` in the current directory. Tell the user the file path when done.'
81
- : 'Print the full walkthrough to the terminal in well-formatted markdown.';
82
- const focusInstructions = {
83
- full: `Spawn these parallel agents, each walking a different flow:
84
- 1. **Homepage & Marketing Agent** -- Open the homepage. Click through marketing pages (features, about, use cases). Document the messaging, value prop, key claims, and CTAs. Note what's above the fold vs below.
85
- 2. **Signup & Onboarding Agent** -- Find the signup/get-started flow. Walk through every step of signup and onboarding. Document each screen, what's required, friction points, and the first-run experience. Do NOT submit real credentials -- just document the flow.
86
- 3. **Pricing & Plans Agent** -- Navigate to pricing. Click to expand tiers, toggle monthly/annual, check feature comparisons. Document every plan, price, and feature. Look for hidden costs or confusing language.
87
- 4. **Docs & Developer Experience Agent** -- Navigate to docs. Walk through the quickstart guide. Check navigation, code examples, search functionality. Document the developer onboarding experience.`,
88
- signup: `Spawn these parallel agents to thoroughly explore the signup and onboarding experience:
89
- 1. **Signup Discovery Agent** -- Find every signup entry point (header CTA, pricing page, landing pages). Document how many clicks to get to signup from different starting points.
90
- 2. **Signup Flow Agent** -- Walk through the signup form step by step. Document every field, validation message, and screen transition. Note required vs optional fields. Do NOT submit real credentials.
91
- 3. **Onboarding Agent** -- After signup screens, document the onboarding flow: welcome screens, setup wizards, tutorials, first-run experience. Walk through every step.
92
- 4. **Social Proof Agent** -- Look for trust signals during signup: testimonials, logos, security badges, terms. Document what reassurance the user gets during the flow.`,
93
- pricing: `Spawn these parallel agents to deeply analyze the pricing experience:
94
- 1. **Pricing Page Agent** -- Navigate to the pricing page. Snapshot the full layout. Toggle between monthly/annual. Click to expand feature lists. Document every plan name, price, and feature.
95
- 2. **Feature Comparison Agent** -- Find the feature comparison table or matrix. Click through each tier's detail page. Document what's included and excluded at each level.
96
- 3. **Pricing Discovery Agent** -- Check multiple entry points to pricing (nav, footer, CTAs). Look for different pricing shown to different segments. Check if pricing changes based on region or plan selection.
97
- 4. **Competitor Pricing Agent** -- Search for and scrape competitor pricing pages. Build a side-by-side comparison of pricing tiers and features.`,
98
- docs: `Spawn these parallel agents to walk through the documentation experience:
99
- 1. **Quickstart Agent** -- Find and follow the quickstart guide from start to finish. Try every step. Document the experience: was it clear? Were code examples correct? How long would it take a new developer?
100
- 2. **Navigation Agent** -- Explore the doc structure. Click through the sidebar, use search, check breadcrumbs. Document the information architecture and how easy it is to find things.
101
- 3. **Code Examples Agent** -- Find code examples across the docs. Check multiple languages/SDKs. Document which are available, their quality, and whether they look copy-pasteable.
102
- 4. **API Reference Agent** -- Find the API reference. Walk through endpoints, check request/response examples, look for interactive "try it" features. Document completeness and usability.`,
103
- dashboard: `Spawn these parallel agents to explore the core product experience:
104
- 1. **Entry Point Agent** -- Find the login/dashboard entry. Document what the user sees on first login. Walk through the main navigation. Map out the product sections.
105
- 2. **Core Flow Agent** -- Identify the primary user action (create something, configure something). Walk through it step by step. Document each screen and interaction.
106
- 3. **Settings & Config Agent** -- Explore settings, integrations, API keys, team management. Document what's configurable and how.
107
- 4. **Help & Support Agent** -- Find help resources within the product: tooltips, help center links, chat widgets, documentation links. Document what support is available in-context.`,
108
- };
109
- return `You are a product demo team lead powered by Firecrawl. You walk through a product's key flows using cloud browser automation, documenting every screen and interaction.
110
-
111
- ${shared_1.QA_TOOLS_BLOCK}
112
-
113
- ## Your Strategy
114
-
115
- You are a **team lead**. Your job is to:
116
-
117
- 1. **Open the site first** -- Run \`firecrawl browser "open <url>"\` yourself to get the initial page state and understand the site structure.
118
- 2. **Spawn parallel subagents** -- Each agent walks through a different flow using \`firecrawl browser\`. They click, scroll, type, and snapshot their way through the product.
119
- 3. **Collect results** -- Each agent reports back a step-by-step walkthrough of their flow.
120
- 4. **Synthesize** -- Merge all walkthroughs into one structured report.
121
-
122
- ## Agent Assignments
123
-
124
- ${focusInstructions[opts.focus]}
125
-
126
- ${shared_1.SUBAGENT_INSTRUCTIONS}
127
-
128
- - Tell each agent to use \`firecrawl browser\` commands to navigate interactively
129
- - Each agent should describe every screen they see: layout, content, CTAs, forms
130
- - Agents should \`firecrawl browser "snapshot"\` at each step to see interactive elements
131
- - Agents should note the user experience: what's clear, what's confusing, what's missing
132
-
133
- ## Output Format
134
-
135
- ${outputInstructions}
136
-
137
- Structure the walkthrough as:
138
-
139
- ### Product Overview
140
- One paragraph summary of what the product does based on exploring it.
141
-
142
- ### Flow Walkthroughs
143
-
144
- For each flow explored:
145
-
146
- #### [Flow Name]
147
- Step-by-step walkthrough:
148
- 1. **[Screen/Page Name]** -- What's on screen, key elements, what the user would do next
149
- 2. **[Next Screen]** -- What changed, new elements, user actions available
150
- ...
151
-
152
- Key observations:
153
- - What works well
154
- - What's confusing or could be improved
155
- - Notable UX patterns
156
-
157
- ### Key Findings
158
- - First impression and overall UX quality
159
- - Standout features or patterns
160
- - Friction points or usability issues
161
- - How the product compares to typical products in the space
162
-
163
- ### Recommendations
164
- What could be improved, from a user experience perspective.
165
-
166
- ### Pages Visited
167
- Full list of every URL the agents navigated to.
168
-
169
- ---
170
-
171
- Be specific and descriptive. Don't just say "the pricing page looks good" -- describe what's on it, how it's organized, and what makes it effective or not.
172
-
173
- Start by opening the site, then immediately fan out your agents to walk through different flows in parallel.`;
174
- }
175
- // ─── Command registration ───────────────────────────────────────────────────
176
- function register(parentCmd, backend) {
177
- const config = backends_1.BACKENDS[backend];
178
- parentCmd
179
- .command('demo')
180
- .description("Walk through a product's key flows using cloud browser")
181
- .argument('[url]', 'Product URL to explore')
182
- .option('-y, --yes', 'Auto-approve all tool permissions')
183
- .action(async (url, options) => {
184
- const inputs = await gatherInputs(url ? { url } : undefined);
185
- const skipPermissions = options.yes || (await (0, shared_1.askPermissionMode)(backend));
186
- console.log(`\nLaunching ${config.displayName}...\n`);
187
- (0, backends_1.launchAgent)(backend, buildSystemPrompt({ focus: inputs.focus, output: inputs.output }), (0, shared_1.buildMessage)([`Walk through ${inputs.url}`, inputs.context]), skipPermissions);
188
- });
189
- }
190
- //# sourceMappingURL=demo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"demo.js","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/demo.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0KH,4BAqBC;AA5LD,0CAAkE;AAClE,sCAOmB;AAWnB,+EAA+E;AAE/E,KAAK,UAAU,YAAY,CAAC,OAA0B;IACpD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,wDAAa,mBAAmB,GAAC,CAAC;IAE5D,MAAM,MAAM,GACV,OAAO,EAAE,GAAG;QACZ,CAAC,MAAM,KAAK,CAAC;YACX,OAAO,EAAE,2CAA2C;YACpD,QAAQ,EAAE,oBAAW;SACtB,CAAC,CAAC,CAAC;IAEN,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC;QACzB,OAAO,EAAE,sCAAsC;Q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