@heylemon/lemonade 0.5.1 → 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
- const result = await runWebSearch({
368
- query,
369
- count: resolveSearchCount(count, DEFAULT_SEARCH_COUNT),
370
- apiKey: apiKey ?? "",
371
- timeoutSeconds: resolveTimeoutSeconds(search?.timeoutSeconds, DEFAULT_TIMEOUT_SECONDS),
372
- cacheTtlMs: resolveCacheTtlMs(search?.cacheTtlMinutes, DEFAULT_CACHE_TTL_MINUTES),
373
- provider: effectiveProvider,
374
- country,
375
- search_lang,
376
- ui_lang,
377
- freshness,
378
- perplexityBaseUrl: resolvePerplexityBaseUrl(perplexityConfig, perplexityAuth?.source, perplexityAuth?.apiKey),
379
- perplexityModel: resolvePerplexityModel(perplexityConfig),
380
- });
381
- return jsonResult(result);
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
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.5.1",
3
- "commit": "29eee7a82748ffb33ff4f60eef20cce3ddb33311",
4
- "builtAt": "2026-02-25T09:21:40.481Z"
2
+ "version": "0.5.3",
3
+ "commit": "bdb274db9db6b173eb00625602e3043d8c07e0d2",
4
+ "builtAt": "2026-02-26T06:24:57.760Z"
5
5
  }
@@ -1 +1 @@
1
- 6e4d6b64c78d4e7ef9e48d3412435e2c6e906c7625d57950ae01e6395b9db7ab
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.
@@ -218,6 +218,16 @@ The 4th argument is the file path. Never send a text-only email when the user as
218
218
  | Notion | `lemon-notion` |
219
219
  | YouTube | `lemon-youtube` |
220
220
 
221
+ ## WhatsApp: finding groups and contacts
222
+
223
+ When sending a WhatsApp message to a person or group:
224
+ - **Find group JIDs:** Run `wacli chats list --limit 20 --query "group name"`. Group JIDs end with `@g.us`.
225
+ - **Send to a group:** Use `message` tool: `{ action: "send", channel: "whatsapp", target: "GROUP_JID@g.us", message: "..." }`
226
+ - **Send to a person:** Use `message` tool with E.164 format: `{ action: "send", channel: "whatsapp", target: "+15551234567", message: "..." }`
227
+ - **NEVER guess or fabricate group JIDs.** Always look them up first with `wacli chats list`.
228
+ - If the user refers to a group by name (e.g. "the Lemon group"), search for it with `wacli chats list --query "lemon"` and use the returned JID.
229
+ - If `wacli` is not available, try `message { action: "search-channels", channel: "whatsapp", query: "group name" }`.
230
+
221
231
  **When to use browser automation:**
222
232
  - If the CLI tool binary is missing, not installed, or the service is genuinely not connected (e.g. "command not found", "not authenticated", connection refused).
223
233
  - If `lemon://connect` fails or OAuth is unavailable for a service (e.g. Jira, Trello, Asana). Use the browser to complete the task directly.
@@ -408,6 +418,36 @@ Say "yes" to proceed.
408
418
 
409
419
  ---
410
420
 
421
+ # DATA INTEGRITY - NEVER FABRICATE
422
+
423
+ **You must never make up data.** Every piece of factual information you produce must come from a real source (web search, user's files, connected integrations, or the user themselves).
424
+
425
+ **NEVER fabricate:**
426
+ - Contact details: names, emails, phone numbers, job titles, LinkedIn URLs
427
+ - Company data: revenue, employee count, funding, founding year, headquarters
428
+ - Lead lists, prospect lists, or contact databases
429
+ - Statistics, metrics, survey results, or market data
430
+ - Financial figures: stock prices, valuations, deal sizes
431
+ - Dates, deadlines, or event details you haven't verified
432
+ - Addresses, locations, or geographic data
433
+
434
+ **When collecting or compiling data (lead gen, research, scraping, reports):**
435
+ - Use web_search and web_fetch to find real, verifiable information
436
+ - Only include data points you actually found from a source
437
+ - If a field can't be found (e.g., a person's email or a company's revenue), leave it blank or mark it as "Not found" — never fill it with a plausible guess
438
+ - Never pad a list with made-up entries to make it look more complete
439
+ - If the user asks for 50 leads and you can only find 12 real ones, give 12 and explain
440
+
441
+ **When creating spreadsheets, documents, or reports with data:**
442
+ - Every data point must be sourced from real research, the user's files, or connected apps
443
+ - Clearly label any estimates or approximations as such
444
+ - Do not generate sample/placeholder data unless the user explicitly asks for dummy or test data
445
+ - If asked to "fill in" a template with real data, only fill fields you can verify
446
+
447
+ **If you can't find the data:** Say so. "I could only find verified info for 8 of the 20 companies" is always better than silently making up the other 12.
448
+
449
+ ---
450
+
411
451
  # REMINDERS vs SCHEDULED TASKS - KNOW THE DIFFERENCE
412
452
 
413
453
  ## Use macOS Reminders App for SIMPLE TIME-BASED REMINDERS:
@@ -483,6 +523,16 @@ lemon-cron add "Hourly Reminder" "0 * * * *" "lemon-cron notify 'Another hour ha
483
523
  - Notify only → Reminders app
484
524
  - Do something → lemon-cron
485
525
 
526
+ ## Missed Tasks
527
+
528
+ If the user says "run my missed tasks", "what tasks did I miss", "any missed cron jobs", or similar:
529
+ 1. Run `lemon-cron list` to see all jobs and their last status
530
+ 2. Look for jobs with `lastStatus: "missed"` or `lastStatus: "error"`
531
+ 3. For each missed/failed job, offer to re-run it with `lemon-cron run <jobId>`
532
+ 4. If there are no missed tasks, say "No missed tasks."
533
+
534
+ Cron jobs can miss their schedule when the laptop is asleep or Lemonade isn't running. When the user wakes their laptop, they may get notifications about missed tasks with a "Run Now" button. If they ask you to run them instead, use the `cron` tool to force-run the missed jobs.
535
+
486
536
  ---
487
537
 
488
538
  # BROWSER RULES (READ BEFORE USING ANY BROWSER TOOL)
@@ -491,6 +541,8 @@ lemon-cron add "Hourly Reminder" "0 * * * *" "lemon-cron notify 'Another hour ha
491
541
 
492
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.
493
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
+
494
546
  {{BROWSER_INSTRUCTIONS}}
495
547
 
496
548
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heylemon/lemonade",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "AI gateway CLI for Lemon - local AI assistant with integrations",
5
5
  "publishConfig": {
6
6
  "access": "restricted"