Release v5.1.3: Fix PostToolUse hook field name bug
Bug Fix: - Changed tool_output to tool_response throughout PostToolUse hook chain - PostToolUse events provide tool_response field, not tool_output - Updated save-hook.ts to send tool_response - Updated worker-service.ts endpoint to accept tool_response - Updated worker-service-v2.ts for consistency - Updated worker-types.ts interfaces (PendingMessage, ObservationData) - Updated SessionManager.ts message queue - Updated SDKAgent.ts observation prompt builder Impact: Fixes observation capture for PostToolUse events. Previous version was sending undefined for tool responses, causing incomplete observations. Files changed: - src/hooks/save-hook.ts (interface + destructuring + fetch body) - src/services/worker-service.ts (ObservationMessage interface + handler + SDK prompt) - src/services/worker-service-v2.ts (handler) - src/services/worker-types.ts (PendingMessage + ObservationData interfaces) - src/services/worker/SessionManager.ts (queue push) - src/services/worker/SDKAgent.ts (observation prompt) - plugin/scripts/*.js (rebuilt) - Version bumped to 5.1.3 (patch) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -137,7 +137,7 @@ export class SDKAgent {
|
||||
id: 0, // Not used in prompt
|
||||
tool_name: message.tool_name!,
|
||||
tool_input: JSON.stringify(message.tool_input),
|
||||
tool_output: JSON.stringify(message.tool_output),
|
||||
tool_output: JSON.stringify(message.tool_response),
|
||||
created_at_epoch: Date.now()
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user