@heylemon/lemonade 0.5.2 → 0.5.4

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.
@@ -10,9 +10,11 @@ const CLAUDE_MODEL_ALIASES = {
10
10
  "claude-opus-4-5": "opus",
11
11
  "claude-opus-4": "opus",
12
12
  sonnet: "sonnet",
13
+ "sonnet-4.6": "sonnet",
13
14
  "sonnet-4.5": "sonnet",
14
15
  "sonnet-4.1": "sonnet",
15
16
  "sonnet-4.0": "sonnet",
17
+ "claude-sonnet-4-6": "sonnet",
16
18
  "claude-sonnet-4-5": "sonnet",
17
19
  "claude-sonnet-4-1": "sonnet",
18
20
  "claude-sonnet-4-0": "sonnet",
@@ -1,6 +1,6 @@
1
1
  // Defaults for agent metadata when upstream does not supply them.
2
2
  // Model id uses pi-ai's built-in Anthropic catalog.
3
3
  export const DEFAULT_PROVIDER = "anthropic";
4
- export const DEFAULT_MODEL = "claude-opus-4-5";
5
- // Context window: Opus 4.5 supports ~200k tokens (per pi-ai models.generated.ts).
4
+ export const DEFAULT_MODEL = "claude-sonnet-4-6";
5
+ // Context window: Sonnet 4.6 supports up to 1M tokens (200k default).
6
6
  export const DEFAULT_CONTEXT_TOKENS = 200_000;
@@ -1,4 +1,4 @@
1
- const ANTHROPIC_PREFIXES = ["claude-opus-4-5", "claude-sonnet-4-5", "claude-haiku-4-5"];
1
+ const ANTHROPIC_PREFIXES = ["claude-opus-4-5", "claude-sonnet-4-6", "claude-sonnet-4-5", "claude-haiku-4-5"];
2
2
  const OPENAI_MODELS = ["gpt-5.2", "gpt-5.0"];
3
3
  const CODEX_MODELS = [
4
4
  "gpt-5.2",
@@ -33,6 +33,8 @@ function normalizeAnthropicModelId(model) {
33
33
  const lower = trimmed.toLowerCase();
34
34
  if (lower === "opus-4.5")
35
35
  return "claude-opus-4-5";
36
+ if (lower === "sonnet-4.6")
37
+ return "claude-sonnet-4-6";
36
38
  if (lower === "sonnet-4.5")
37
39
  return "claude-sonnet-4-5";
38
40
  return trimmed;
@@ -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.2",
2
+ "version": "0.5.4",
3
3
  "commit": "bdb274db9db6b173eb00625602e3043d8c07e0d2",
4
- "builtAt": "2026-02-26T04:57:32.835Z"
4
+ "builtAt": "2026-02-26T08:03:30.886Z"
5
5
  }
@@ -1 +1 @@
1
- 70db137c6b173ef309e5480906d0de1f7b00a40b9b22c0897b83333f4a999c3c
1
+ c86e59b5d61a3ebb815da0f7ea8465d789b2fca4f8b55a1071e34b44c62a1c7b
@@ -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
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heylemon/lemonade",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "AI gateway CLI for Lemon - local AI assistant with integrations",
5
5
  "publishConfig": {
6
6
  "access": "restricted"