@melaya/runner 1.0.93 → 1.0.94

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.
@@ -205,13 +205,19 @@ def _build_agent():
205
205
  "TikTok). Opening the wrong app is a FAILED task, not a reasonable default. "
206
206
  "After the user authorizes the app, phone_list_apps reflects it immediately — "
207
207
  "re-check and open the REQUESTED app.\n"
208
- "- You are FULLY AUTONOMOUS on the phone: NEVER ask the user a question, "
209
- "never end your turn asking for confirmation or offering a choice make the "
210
- "reasonable decision and DO it (the ONE exception is the EXACT-APP rule above: "
211
- "a missing app is a stop, not a substitution). If a feed is algorithmic, use "
212
- "the app's own Search / Explore to find the right content yourself. Keep going "
213
- "until the task is COMPLETE (e.g. all N comments posted) or you are genuinely "
214
- "blocked; only then report what you did and what (if anything) is blocked.\n"
208
+ "- You are AUTONOMOUS on the phone: for routine choices, make the reasonable "
209
+ "decision and DO it never stall the run by ENDING YOUR TURN to ask in chat. "
210
+ "But when you hit a GENUINE fork you cannot reasonably resolve on your own (which "
211
+ "of several accounts to act as, a truly ambiguous target, a risky irreversible "
212
+ "step), or you want a go/no-go before continuing a long task, call "
213
+ "phone_ask_user(question): it expands the Melaya tile ON THE PHONE into a reply "
214
+ "card and BLOCKS for the user's typed answer WITHOUT ending your turn, so the run "
215
+ "continues seamlessly the moment they reply. Use it SPARINGLY, for real decisions "
216
+ "only — not routine ones. The EXACT-APP rule still holds (a missing app is a stop, "
217
+ "not a substitution). If a feed is algorithmic, use the app's own Search / Explore "
218
+ "to find the right content yourself. Keep going until the task is COMPLETE (e.g. "
219
+ "all N comments posted) or you are genuinely blocked; only then report what you "
220
+ "did and what (if anything) is blocked.\n"
215
221
  if phone_enabled else ""
216
222
  )
217
223
  connector_rule = (
@@ -246,13 +252,16 @@ def _build_agent():
246
252
  model_name=model,
247
253
  provider=provider,
248
254
  api_key="", # model.py resolves the provider's own creds (OAuth off disk / localhost)
249
- # Phone tasks are many-step (each comment screen_tree→tap→type→post), so
250
- # give them room like the device template (40); read-only Q&A needs few.
251
- # Connector WRITE tasks are equally many-step (e.g. "message all my recent
252
- # LinkedIn connections" = 1 list + N sends, each its own reasoning+HITL
253
- # round), so they need the same headroom 8 hit the cap mid-task and
254
- # forced _summarizing() on a half-finished tool batch.
255
- max_iters=40 if (phone_enabled or connector_services) else 8,
255
+ # Phone tasks that act on N items ("like + comment on 10 posts") take
256
+ # ~10-15 tool calls EACH (screen_tree→read→tap→type→post_comment→verify→
257
+ # swipe to the next), so a flat 40 capped a 10-post run at ~3 done and
258
+ # forced a mid-task stop which also ends the turn and tears down the
259
+ # phone working-overlay, snapping the phone back to the Melaya app before
260
+ # the task is finished. Give phone runs real headroom (they are HITL-gated,
261
+ # so each write still needs the user's tap — cost stays bounded). Connector
262
+ # WRITE fan-outs (1 list + N sends, each its own reasoning+HITL round) keep
263
+ # the 40 that fits them; read-only Q&A needs very few.
264
+ max_iters=100 if phone_enabled else (40 if connector_services else 8),
256
265
  reliability=True,
257
266
  bounded_memory=True,
258
267
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melaya/runner",
3
- "version": "1.0.93",
3
+ "version": "1.0.94",
4
4
  "description": "Run Melaya AI pipelines locally with your own LM Studio or Ollama models",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,