@heylemon/lemonade 0.6.4 → 0.6.5

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.
@@ -346,7 +346,20 @@ export function buildAgentSystemPrompt(params) {
346
346
  "If the user asks you to do something (take a screenshot, send a file, etc.), just do it — pick the best approach and act.",
347
347
  "Never reply with a list of approaches/options when a single tool call would suffice.",
348
348
  "CRITICAL: NEVER stop after announcing what you're going to do. Do NOT say 'I'll check your LinkedIn' and then stop. Say it AND immediately do it in the same response — search, open browser, navigate, find the answer, and return it. The user should never have to ask twice. One request = one complete answer.",
349
- 'For screenshots of the user\'s Mac screen: use `curl -s http://127.0.0.1:19848/screenshot` which returns JSON `{"path":"/path/to/screenshot.jpg","mode":"window"}`. This is the PREFERRED method — it uses the Lemon app\'s screen recording permission and always works. Modes: `?mode=window` (default, frontmost app only), `?mode=screen` (full primary display), `?mode=display&display=N` (specific display by 0-based index, for external monitors). The returned path can be used with the `message` tool to send the screenshot to WhatsApp/Slack, or with the `image` tool to analyze it. Fallback: `screencapture -x /tmp/screenshot.png` (may fail without screen recording permission).',
349
+ "",
350
+ "## Screenshots",
351
+ 'Endpoint: `curl -s "http://127.0.0.1:19848/screenshot?name=SHORT_NAME"`',
352
+ 'Returns: `{"path": "/path/to/file.jpg", "mode": "window"}`',
353
+ "",
354
+ "Parameters:",
355
+ "- `name` (required): short slug describing the screenshot (e.g., `slack-dm-john`, `xcode-error`). Used as filename for later reference.",
356
+ "- `mode`: `window` (default, frontmost app), `screen` (full primary display), `display` (specific monitor)",
357
+ "- `display`: 0-based display index (use with `mode=display` for external monitors)",
358
+ "",
359
+ "Storage: `~/.lemonade/tmp/screenshots/<name>.jpg`",
360
+ "If user refers to a past screenshot and the path is no longer in conversation, run `ls ~/.lemonade/tmp/screenshots/` to find it by name.",
361
+ "",
362
+ "Usage: returned path works with `message` tool (send via WhatsApp/Slack) and `image` tool (analyze).",
350
363
  "",
351
364
  "## Third-Party App Requests (Trello, Jira, LinkedIn, Asana, HubSpot, Salesforce, Todoist, etc.)",
352
365
  "",
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.6.4",
3
- "commit": "280fc792c8d63cd13a1bc797777ecb14910249c4",
4
- "builtAt": "2026-02-28T08:18:47.006Z"
2
+ "version": "0.6.5",
3
+ "commit": "a8d80580774ad7b3248da8d2ca971e56c62e4ace",
4
+ "builtAt": "2026-02-28T09:58:29.125Z"
5
5
  }
@@ -31,12 +31,15 @@ export async function handleTaskEventsHttpRequest(req, res, opts) {
31
31
  const unsubscribe = onAgentEvent((evt) => {
32
32
  if (!RELEVANT_STREAMS.has(evt.stream))
33
33
  return;
34
- // Notifications are always forwarded regardless of session key
35
- if (evt.stream !== "notification") {
34
+ // Notifications, task_info, and lifecycle are always forwarded regardless of session key.
35
+ // task_info creates tasks in the frontend; lifecycle (start/end/error) manages their state.
36
+ // Without this, runs whose sessionKey lacks a channel name (e.g. dmScope=main → "agent:main:main")
37
+ // would create a task but never complete it, leaving the UI hanging.
38
+ if (evt.stream !== "notification" && evt.stream !== "task_info" && evt.stream !== "lifecycle") {
36
39
  const sk = evt.sessionKey ?? "";
37
40
  const isMessagingChannel = sk.includes("whatsapp") || sk.includes("slack");
38
41
  const isSubagent = sk.includes(":subagent:");
39
- if (!isMessagingChannel && !isSubagent && evt.stream !== "task_info")
42
+ if (!isMessagingChannel && !isSubagent)
40
43
  return;
41
44
  }
42
45
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heylemon/lemonade",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "description": "AI gateway CLI for Lemon - local AI assistant with integrations",
5
5
  "publishConfig": {
6
6
  "access": "restricted"