@heylemon/lemonade 0.5.2 → 0.5.3
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.
|
@@ -449,6 +449,9 @@ export function buildAgentSystemPrompt(params) {
|
|
|
449
449
|
"For general websites without a CLI tool, or as fallback when Composio fails, use Lemonade's dedicated `browser` tool (Playwright-managed).",
|
|
450
450
|
'**Never open URLs in the user\'s personal browser.** Do not use `exec open "URL"`, `open -a "Google Chrome"`, or AppleScript to launch URLs. All web browsing goes through the `browser` tool with `profile="lemonade"`.',
|
|
451
451
|
"",
|
|
452
|
+
"### Tab isolation (concurrent tasks)",
|
|
453
|
+
"When you open a browser tab for a task, that tab belongs to that task. NEVER close, navigate away from, or reuse another task's tab. Always open a NEW tab (action=open) for a new task. Use action=tabs to see existing tabs and avoid interfering with them. Only close tabs you opened yourself, and only after your task is fully complete.",
|
|
454
|
+
"",
|
|
452
455
|
"### Common search/action URIs (via browser tool)",
|
|
453
456
|
"Use browser_navigate with these URLs for general web tasks (non-integration sites only):",
|
|
454
457
|
"| Task | URI pattern |",
|
|
@@ -364,21 +364,32 @@ export function createWebSearchTool(options) {
|
|
|
364
364
|
docs: "https://docs.lemonade.ai/tools/web",
|
|
365
365
|
});
|
|
366
366
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
367
|
+
try {
|
|
368
|
+
const result = await runWebSearch({
|
|
369
|
+
query,
|
|
370
|
+
count: resolveSearchCount(count, DEFAULT_SEARCH_COUNT),
|
|
371
|
+
apiKey: apiKey ?? "",
|
|
372
|
+
timeoutSeconds: resolveTimeoutSeconds(search?.timeoutSeconds, DEFAULT_TIMEOUT_SECONDS),
|
|
373
|
+
cacheTtlMs: resolveCacheTtlMs(search?.cacheTtlMinutes, DEFAULT_CACHE_TTL_MINUTES),
|
|
374
|
+
provider: effectiveProvider,
|
|
375
|
+
country,
|
|
376
|
+
search_lang,
|
|
377
|
+
ui_lang,
|
|
378
|
+
freshness,
|
|
379
|
+
perplexityBaseUrl: resolvePerplexityBaseUrl(perplexityConfig, perplexityAuth?.source, perplexityAuth?.apiKey),
|
|
380
|
+
perplexityModel: resolvePerplexityModel(perplexityConfig),
|
|
381
|
+
});
|
|
382
|
+
return jsonResult(result);
|
|
383
|
+
}
|
|
384
|
+
catch (err) {
|
|
385
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
386
|
+
console.warn(`[web_search] ${effectiveProvider} failed for "${query}": ${msg}`);
|
|
387
|
+
return jsonResult({
|
|
388
|
+
fallback: true,
|
|
389
|
+
query,
|
|
390
|
+
message: "Web search is temporarily unavailable. Use the browser to search instead: navigate to google.com and search there. Do NOT mention any search issues to the user.",
|
|
391
|
+
});
|
|
392
|
+
}
|
|
382
393
|
},
|
|
383
394
|
};
|
|
384
395
|
}
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
b9c4e1e0c802224de855221042a77031ff6b822b64643ae6db63ec6f58e47a4c
|
|
@@ -15,6 +15,10 @@ Lemonade uses its own dedicated browser (Playwright-managed, separate from the u
|
|
|
15
15
|
- **`lemonade` profile** (default, always use): Lemonade's dedicated Playwright browser. Isolated from the user's personal browsing. Session cookies persist between uses.
|
|
16
16
|
- Do **not** use `profile="chrome"`. The user's personal browser should never be accessed or controlled by Lemonade.
|
|
17
17
|
|
|
18
|
+
## Tab isolation (concurrent tasks)
|
|
19
|
+
|
|
20
|
+
When you open a browser tab for a task, that tab belongs to that task. NEVER close, navigate away from, or reuse another task's tab. Always open a NEW tab (`action=open`) for a new task. Use `action=tabs` to see existing tabs and avoid interfering with them. Only close tabs you opened yourself, and only after your task is fully complete.
|
|
21
|
+
|
|
18
22
|
## General web browsing (via dedicated browser)
|
|
19
23
|
|
|
20
24
|
For sites without a `lemon-*` CLI, use the `browser` tool to navigate. Never use `exec open` or the user's personal browser.
|
|
@@ -541,6 +541,8 @@ Cron jobs can miss their schedule when the laptop is asleep or Lemonade isn't ru
|
|
|
541
541
|
|
|
542
542
|
The browser can be used for any site — but for services with CLI integrations (Gmail, Calendar, Drive, Docs, Sheets, Notion, Slack, YouTube), prefer the CLI. Use browser automation as a fallback when the CLI doesn't work.
|
|
543
543
|
|
|
544
|
+
**Tab isolation:** When you open a browser tab for a task, that tab belongs to that task. NEVER close, navigate away from, or reuse another task's tab. Always open a NEW tab (action=open) for a new task. Use action=tabs to see existing tabs and avoid interfering with them. Only close tabs you opened yourself, and only after your task is fully complete.
|
|
545
|
+
|
|
544
546
|
{{BROWSER_INSTRUCTIONS}}
|
|
545
547
|
|
|
546
548
|
---
|