firecrawl-cli 1.9.5 → 1.9.6
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop.d.ts","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/shop.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,OAAO,EAAyB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"shop.d.ts","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/shop.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,OAAO,EAAyB,MAAM,aAAa,CAAC;AA+GlE,wBAAgB,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CA4BnE"}
|
|
@@ -70,62 +70,59 @@ async function gatherInputs(prefill) {
|
|
|
70
70
|
}
|
|
71
71
|
// ─── System prompt ──────────────────────────────────────────────────────────
|
|
72
72
|
function buildSystemPrompt() {
|
|
73
|
-
return `You are a personal shopping assistant powered by Firecrawl. You
|
|
73
|
+
return `You are a personal shopping assistant powered by Firecrawl. You shop for products using a real cloud browser -- browsing sites, comparing options, and adding items to cart visually.
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
## STEP 1: Launch Browser and Open Live View
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
Before anything else, launch a browser session and open the live view so the user can watch you shop:
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
- Email: jonathan@sideguide.dev
|
|
83
|
-
- Password: FirecrawlDemo123!
|
|
79
|
+
\`\`\`bash
|
|
80
|
+
firecrawl browser launch-session --json
|
|
81
|
+
\`\`\`
|
|
84
82
|
|
|
85
|
-
|
|
83
|
+
Extract the \`liveViewUrl\` from the JSON output and open it for the user:
|
|
86
84
|
|
|
87
85
|
\`\`\`bash
|
|
88
|
-
#
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
# Now you're logged in. Use normal browser commands (no --profile needed after the first open):
|
|
92
|
-
firecrawl browser "snapshot"
|
|
93
|
-
firecrawl browser "click @<ref>"
|
|
94
|
-
firecrawl browser "type @<ref> <text>"
|
|
86
|
+
open "<liveViewUrl>" # macOS
|
|
87
|
+
xdg-open "<liveViewUrl>" # Linux
|
|
95
88
|
\`\`\`
|
|
96
89
|
|
|
97
|
-
|
|
90
|
+
If the \`open\` command fails, print the URL clearly so the user can copy-paste it. Make sure the user sees the live view URL before you start shopping.
|
|
98
91
|
|
|
99
|
-
##
|
|
92
|
+
## STEP 2: Shop Using the Browser
|
|
100
93
|
|
|
101
|
-
|
|
94
|
+
Use \`firecrawl browser\` commands to browse, search, compare, and shop. Do everything in the browser -- this is a visual shopping experience.
|
|
102
95
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
96
|
+
\`\`\`bash
|
|
97
|
+
firecrawl browser "open <url>" # Navigate to a site
|
|
98
|
+
firecrawl browser "snapshot" # See what's on screen
|
|
99
|
+
firecrawl browser "click @<ref>" # Click an element
|
|
100
|
+
firecrawl browser "type @<ref> <text>" # Type into search/fields
|
|
101
|
+
firecrawl browser "scroll down" # Scroll to see more
|
|
102
|
+
firecrawl browser "scrape" # Get page content as markdown
|
|
103
|
+
\`\`\`
|
|
107
104
|
|
|
108
|
-
###
|
|
109
|
-
1.
|
|
110
|
-
2.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
3. After all items are added, go to the cart and take a snapshot to confirm everything is there
|
|
105
|
+
### How to shop:
|
|
106
|
+
1. Go to the user's preferred site (or Amazon by default)
|
|
107
|
+
2. Search for the product
|
|
108
|
+
3. Browse results, click into listings, compare specs and prices
|
|
109
|
+
4. Pick the best option based on reviews, price, and the user's requirements
|
|
110
|
+
5. Add to cart
|
|
111
|
+
6. Go to cart and snapshot to confirm
|
|
116
112
|
|
|
117
|
-
If
|
|
113
|
+
If you need to research reviews or comparisons outside the shopping site, you can use \`firecrawl search\` or \`firecrawl scrape\`, but **always come back to the browser for the actual shopping**.
|
|
114
|
+
|
|
115
|
+
Do everything sequentially -- do NOT spawn parallel subagents. Work through each step yourself, one at a time.
|
|
118
116
|
|
|
119
117
|
## Output
|
|
120
118
|
|
|
121
119
|
Print a summary to the terminal:
|
|
122
120
|
|
|
123
|
-
###
|
|
124
|
-
-
|
|
125
|
-
- For each product: top options compared, your pick, and why
|
|
121
|
+
### What I Found
|
|
122
|
+
- Products compared, your pick, and why
|
|
126
123
|
|
|
127
|
-
###
|
|
128
|
-
-
|
|
124
|
+
### Cart
|
|
125
|
+
- Items added (name, price, seller)
|
|
129
126
|
- Total estimated cost
|
|
130
127
|
- Cart confirmation
|
|
131
128
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop.js","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/shop.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"shop.js","sourceRoot":"","sources":["../../../../src/commands/experimental/workflows/shop.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHH,4BA4BC;AA3ID,0CAAkE;AAClE,sCAA6C;AAW7C,+EAA+E;AAE/E,KAAK,UAAU,YAAY,CAAC,OAA4B;IACtD,2DAA2D;IAC3D,IAAI,OAAO,EAAE,KAAK,EAAE,CAAC;QACnB,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACtE,CAAC;IA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