pi-mono/packages/agent/test
Mario Zechner b5f425ad15 feat(agent,coding-agent): add prepareArguments hook for pre-validation argument preparation
Add AgentTool.prepareArguments and ToolDefinition.prepareArguments hook
that runs before schema validation in the agent loop. This lets tools
silently accept legacy argument shapes from resumed old sessions without
polluting the public schema.

The built-in edit tool uses this to fold legacy top-level oldText/newText
into edits[] when resuming sessions that predate the edits-only schema.

- AgentTool/ToolDefinition: typed prepareArguments returning Static<TParameters>
- agent-loop: prepareToolCallArguments() runs before validateToolArguments()
- edit tool: prepareEditArguments folds legacy fields, validateEditInput is strict
- Documented in extensions.md with edit-tool example
2026-03-29 21:06:22 +02:00
..
utils WIP: Refactor agent package - not compiling 2025-12-30 22:42:20 +01:00
agent-loop.test.ts feat(agent,coding-agent): add prepareArguments hook for pre-validation argument preparation 2026-03-29 21:06:22 +02:00
agent.test.ts fix(agent,coding-agent): resume queued messages after auto-compaction 2026-02-06 11:36:19 +01:00
bedrock-models.test.ts fix(ai): signature support for non-Anthropic models in Amazon Bedrock provider (#727) 2026-01-14 19:21:35 +01:00
bedrock-utils.ts feat(ai): Add Amazon Bedrock provider (#494) 2026-01-13 00:32:59 +01:00
e2e.test.ts fix(coding-agent): sync tool hooks with agent event processing closes #2113 2026-03-14 03:10:04 +01:00