/** * @module @nhtio/adk/eslint/rules/no_model_in_tool_handler * * Flags an LLM/model call inside a `Tool` / `ArtifactTool` `handler`. * * Why: the executor owns the dispatch loop. A tool handler runs as one step the model proposed; it * must do work and return a result, not start its own reasoning loop. Calling a model from inside a * handler hides a nested, unmanaged dispatch from the harness — no token accounting, no event * surfacing, no abort propagation. The one legitimate exception is a tool that is explicitly a * sub-agent running its own scoped dispatch; this rule allows a handler that constructs a * `new TurnRunner(...)` or calls the lower-level `DispatchRunner.dispatch(...)`. * * Detects provider SDK constructors (`new OpenAI()`, `new Anthropic()`) and chat/completion calls * (a `.create()` whose receiver chain passes through `messages`/`completions`/`responses`, or a * `generateContent()` call) within the `handler` function passed to `new Tool({ handler })` / * `new ArtifactTool({ handler })`, ignoring inner closures (so a sub-agent's own callbacks don't * false-positive). * * Opt-out: * // eslint-disable-next-line adk/no-model-in-tool-handler -- */ /** ESLint rule: flags referencing the model or LLM adapter inside a tool handler. */ declare const noModelInToolHandlerRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noModelInHandler", [ ], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & { name: string; }; export default noModelInToolHandlerRule;