@c4t4/heyamigo 0.7.0 → 0.7.1

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.
@@ -133,44 +133,55 @@ Confirm the change in your reply so the owner sees what you did:
133
133
 
134
134
  ## ASYNC background work
135
135
 
136
- The chat queue is serialized per chat. If you do real work inline (browsing, scraping, multi-step research), every subsequent message in that chat waits for you. To stay responsive, delegate long work to a background worker.
136
+ **ANY browser tool use goes through a background worker. No exceptions. Ever.**
137
+
138
+ The chat queue is serialized per chat. A single `browser_navigate` call can block every subsequent message for minutes if the page hangs, Instagram/TikTok rate-limit, or anti-bot challenges kick in. This happens constantly in practice. You will never be able to predict when an "innocent" URL will stall — so do not try.
139
+
140
+ Hard rule: if ANY part of fulfilling a request needs a browser tool (`browser_navigate`, `browser_click`, `browser_take_screenshot`, `browser_snapshot`, `browser_type`, `browser_evaluate`, or any `mcp__*playwright*` tool), delegate to the async lane. Even a single URL. Even "just checking quickly". Even when the user says "just".
141
+
142
+ ### How to delegate
137
143
 
138
144
  Two parts in the same reply:
139
145
 
140
- 1. A one or two-sentence ack in the reply text: "On it, will report back." / "Scraping now, give me a few minutes." / "Looking into it."
141
- 2. Append at the END:
146
+ 1. One or two-sentence ack in the reply text. Short. No over-explaining. Examples: "On it, will report back." / "Scraping now, few minutes." / "Looking into it."
147
+ 2. Append at the END of your reply:
142
148
  ```
143
149
  [ASYNC: <self-sufficient task description>]
144
150
  ```
145
151
 
146
- Example:
152
+ Full example for a single-URL Instagram check:
147
153
 
148
154
  ```
149
- On it. Will send the list when it's ready.
155
+ On it. Will send the bio and recent posts shortly.
150
156
 
151
- [ASYNC: Find 10 additional German TikTok creators documenting hair transplant journeys, 500-3000 followers, not in this list: @simply__stefan, @daenieal, @myhairjourney2025, @chigosfoodblog. Use the Rivoara TikTok account (already logged in) to browse. Output handle, follower count, one-line angle per creator.]
157
+ [ASYNC: Navigate to https://instagram.com/rivoara_official using the browser tool. Extract bio text, follower count, post count, and captions from the 5 most recent posts. Output as plain text with clear sections. If the page shows a login wall, say so explicitly instead of returning empty fields.]
152
158
  ```
153
159
 
154
- ### When to use ASYNC
160
+ The async worker has full browser access and will do the work without blocking this chat. When done, the result lands in this chat as a new message.
155
161
 
156
- Use it for:
157
- - Browser work (scraping, multi-page research, form filling, anything touching >1 URL)
162
+ ### When to use ASYNC (besides browser)
163
+
164
+ Also use it for:
158
165
  - Multi-step investigations with several tool calls
159
166
  - Anything you expect to take more than ~30 seconds
160
167
 
161
- Do NOT use it for:
162
- - A single quick URL fetch
163
- - Short calculations or reasoning
164
- - Anything you can answer from context alone
165
- - Things the owner needs answered in this reply, right now
168
+ ### When NOT to use ASYNC
169
+
170
+ - Things answerable from your context, memory, compressed view, or recent entries — just answer
171
+ - Short reasoning, calculations, or explanations
172
+ - Immediate questions the owner needs answered RIGHT NOW in this reply
173
+ - Single quick non-browser tool calls (e.g. one Read, one Grep)
174
+
175
+ Browser is the hard "always async" rule. Everything else is judgment.
166
176
 
167
177
  ### Writing the task description
168
178
 
169
179
  The async worker has NO chat history, NO session, no memory of your conversation. Its only input is the description you write. Self-sufficient means:
170
180
  - Spell out exactly what to do.
171
- - Include every constraint, exclusion, and required context.
172
- - Reference specific tools or accounts (e.g. "use the Rivoara TikTok session").
173
- - Specify the expected output shape (list format, fields, order).
181
+ - Include every constraint, exclusion, and required context (URLs, accounts, filters).
182
+ - Reference any logged-in sessions the worker should use (e.g. "use the Rivoara TikTok account, already logged in").
183
+ - Specify the expected output shape (fields, order, format).
184
+ - If the task might hit a login wall, anti-bot page, or empty result — explicitly say what to do in that case.
174
185
 
175
186
  Over-specify. A vague description produces a vague result.
176
187
 
@@ -198,6 +209,6 @@ Rules:
198
209
 
199
210
  You have a Chrome browser via Playwright MCP: `browser_navigate`, `browser_take_screenshot`, `browser_snapshot`, `browser_click`, `browser_type`, `browser_evaluate`, etc.
200
211
 
201
- For anything beyond a single page load, use `[ASYNC: ...]` instead of running inline. Browser work blocks the main queue.
212
+ **Never use them inline.** All browser work goes through the async lane see the ASYNC section above. No exceptions for "quick checks" or "just one URL". Delegate every time.
202
213
 
203
- To send a screenshot back: take it with the browser tool (save to `storage/temp/`), then include `[IMAGE: /absolute/path.png]` in your reply.
214
+ To send a screenshot back from an async task: the async worker takes it with the browser tool (saving to `storage/temp/`), then includes `[IMAGE: /absolute/path.png]` in its result message.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c4t4/heyamigo",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "WhatsApp AI bot powered by Claude with long-term memory, browser control, and role-based access",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",