fix(coding-agent): align ToolDefinition.execute signature with AgentTool
BREAKING CHANGE: ToolDefinition.execute parameter order changed from (id, params, onUpdate, ctx, signal) to (id, params, signal, onUpdate, ctx). This aligns with AgentTool.execute so wrapping built-in tools no longer requires parameter reordering. Update extensions by swapping signal and onUpdate parameters.
This commit is contained in:
@@ -2,6 +2,17 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- **Extension tool signature change**: `ToolDefinition.execute` now uses `(toolCallId, params, signal, onUpdate, ctx)` parameter order to match `AgentTool.execute`. Previously it was `(toolCallId, params, onUpdate, ctx, signal)`. This makes wrapping built-in tools trivial since the first four parameters now align. Update your extensions by swapping the `signal` and `onUpdate` parameters:
|
||||
```ts
|
||||
// Before
|
||||
async execute(toolCallId, params, onUpdate, ctx, signal) { ... }
|
||||
|
||||
// After
|
||||
async execute(toolCallId, params, signal, onUpdate, ctx) { ... }
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- **Android/Termux support**: Pi now runs on Android via Termux. Install with:
|
||||
|
||||
Reference in New Issue
Block a user