- Extract `awaitQueuedNavigation` and `mapActionError` in `tools.zig`.
- Optimize `substituteEnvVars` using `indexOfScalarPos` to reduce copies.
- Switch to `parseFromSliceLeaky` for tool arguments parsing.
- Improve error handling in `Agent.zig` self-healing and `Recorder.zig`.
- Simplify `callEval` by adding `evalScript` helper.
- Reorder `arena` and `session` arguments in tool functions.
- Optimize `substituteEnvVars` to only process `$LP_` prefixes.
- Use stack buffer for backup paths in `Agent.zig`.
- Clean up `formatActionResult` implementation.
- Update `ToolExecutor.callEval` to return `EvalResult` for better error handling.
- Swap `ScriptIterator.init` arguments to follow the allocator-first convention.
- Use explicit type syntax for `.init` calls across the agent package.
- Remove redundant `isKnownTool` helper in favor of direct enum conversion.
- Use `atomicFile` for script updates in `Agent.zig`.
- Ensure `ai_client` is properly deinitialized on `init` failure.
- Consolidate JSON quoting into `Command.buildJson`.
- Simplify `Recorder` and `ToolExecutor` implementations.
- Fix page scope access in `mcp/tools.zig`.
Introduces a Verifier to ensure commands like click or type actually
achieve their intended effects. Adds retry logic for flaky actions
and includes verification context in self-healing prompts.
- Standardize `fill` tool to use `value` instead of `text`.
- Add formatted output methods (`printInfoFmt`, `printErrorFmt`) to `Terminal`.
- Improve error handling in `ToolExecutor` and `browser/tools` by using error unions.
- Deduplicate `minify` utility and remove redundant code comments.
- Refactor tool dispatch to use `Action` enum tags instead of hardcoded strings.
Both MCP tools.zig and agent ToolExecutor.zig duplicated the same 20 tool
handlers. This extracts the shared logic into src/browser/tools.zig so new
tools only need to be added once. Reduces total code by ~620 lines while
keeping all 465 tests passing.
Introduces `lightpanda agent` command that provides a REPL where users
can chat with an AI that uses the browser's tools (goto, markdown, click,
fill, etc.) to browse the web. Uses zenai for multi-provider LLM support
(Anthropic, OpenAI, Gemini) and linenoise v2 for terminal line editing.