@dudko.dev/agent 0.0.53 → 0.0.54

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.
package/README.md CHANGED
@@ -651,8 +651,9 @@ The run caps are **soft**: they are checked between steps *and* inside an execut
651
651
 
652
652
  - **Yours wins.** Any `limits.perCall.<stage>` replaces the default, and **`0` means no cap** (the provider's own maximum applies — what Node did before these defaults existed).
653
653
  - **A stage that thinks gets no default cap.** On OpenAI and Gemini the reasoning counts against `max_output_tokens`, so a default sized for the answer alone could leave a thinking model no room to write it. Set `perCall` yourself if you want a cap there (Anthropic adds the thinking budget on top of it).
654
+ - **A model that thinks without being asked to is noticed.** Gemini 2.5+, GPT-5 and others reason by default, with no `thinking` in the config, so the config alone cannot say that a stage thinks. The usage of every call does: once a call of a stage reports reasoning tokens, that stage has no default cap for this agent any more, and a plan, a replanner decision or a pipeline's route call that the default cap **cut off while the model reasoned** is asked for once more, without the cap - a `retry` event says why, and what the cut attempt cost is counted. It is not one of the `llmMaxRetries`. An executor step is not repeated (its tools may have run); its next step is uncapped. A cap you set yourself stays, and the call is not repeated.
654
655
  - **A call the cap cuts off says so.** The executor and synthesizer emit a `log` warning (`[synthesizer] the model's output was cut off at 4000 tokens, the default cap for this stage …`); a plan or a replanner decision cut in half fails with the same reason in its error instead of a bare "could not parse the response" (the run survives both: see [When the replanner fails](#when-the-replanner-fails)).
655
- - The browser sibling `@dudko.dev/agent-web` follows the same rules (yours wins and `0` is no cap, none for a stage that thinks, a cut-off call says so), with its own, smaller shares (800 / 1,200 / 400 / 3,000 at 128k).
656
+ - The browser sibling `@dudko.dev/agent-web` follows the same rules (yours wins and `0` is no cap, none for a stage that thinks or is seen to, a cut-off call says so), with its own, smaller shares (800 / 1,200 / 400 / 3,000 at 128k).
656
657
 
657
658
  `maxToolCalls`: once reached, further tool calls in the run fail with `tool-call budget exhausted` (the model sees that as the tool result) and the run moves to synthesis with `budget.exceeded` of kind `'tool-calls'`. Built-in tools (`find_tools`, `load_skill`, `read_skill_file`) do not count.
658
659
 
@@ -878,7 +879,7 @@ A denied call throws `ToolDeniedError` inside the tool, so the step records `ok:
878
879
 
879
880
  **Tool search.** `toolSelectionStrategy` now defaults to `'auto'`: the executor gets every tool (`'all'`, exactly as before) while the filtered catalogue has at most `toolSearchThreshold` (default 40) tools, and switches to `'search'` above that. In `'search'` mode each step starts with the built-in tools, the step's `suggestedTools` and the tools discovered earlier in the run (the 16 most recent), plus `find_tools({ query, server?, limit? })`. It ranks the whole catalogue and **activates** the matches: they become callable from the model's next LLM step and stay active for the rest of the run (`tools.discovered` event). The planner sees an abridged catalogue grouped by server and treats `suggestedTools` as hints. The ranking is the exported pure `searchTools(catalog, query, { server?, limit? })` — terms matched in the name score 3, in the server 2, in the description 1, prefix-matched for terms of 3+ chars. `'all'` and `'plan-narrowed'` behave as before.
880
881
 
881
- **Loading.** `tools/list` follows `nextCursor` (up to 100 pages), on connect and on `tools/list_changed` refreshes. Each server must connect and list within `connectTimeoutMs` (per server; default from the top-level `mcpConnectTimeoutMs`, 30 s; `0` disables) or it is reported failed (`connect timed out after Xms`) and closed while the others mount. `agent.listTools()` entries carry `server` and `readOnly`.
882
+ **Loading.** `tools/list` follows `nextCursor` (up to 100 pages), on connect and on `tools/list_changed` refreshes. Each server must connect and list within `connectTimeoutMs` (per server; default from the top-level `mcpConnectTimeoutMs`, 30 s; `0` disables) or it is reported failed (`connect timed out after Xms`) and closed while the others mount. `agent.listTools()` entries carry `server` and `readOnly`. A refresh is applied between runs, never behind one: a change announced during a run is listed when no run is going, and an `agent.run()` or `agent.reconnect()` that arrives while that listing is in flight waits for it and works on the refreshed tools (it is not refused; the wait ends with the listing, or with the run's `signal`).
882
883
 
883
884
  ## MCP server instructions and structured results
884
885