| 268 | #[derive(Debug, Deserialize)] |
| 269 | #[allow(dead_code)] |
| 270 | struct AfterToolInput { |
| 271 | #[serde(default)] |
| 272 | session_id: Option<String>, |
| 273 | |
| 274 | #[serde(default)] |
| 275 | tool_name: Option<String>, |
| 276 | |
| 277 | #[serde(default)] |
| 278 | tool_call_id: Option<String>, |
| 279 | |
| 280 | /// "completed" or "error" |
| 281 | #[serde(default)] |
| 282 | status: Option<String>, |
| 283 | |
| 284 | /// Duration of tool execution in milliseconds |
| 285 | #[serde(default)] |
| 286 | duration: Option<u64>, |
| 287 | |
| 288 | /// Whether the tool modified files |
| 289 | #[serde(default)] |
| 290 | modified_files: Option<bool>, |
| 291 | |
| 292 | /// Truncated tool output (up to 500 chars from the plugin) |
| 293 | #[serde(default)] |
| 294 | tool_output: Option<String>, |
| 295 | |
| 296 | /// Human-readable title (e.g., "Install TypeScript as dev dependency") |
| 297 | #[serde(default)] |
| 298 | title: Option<String>, |
| 299 | |
| 300 | /// Absolute file path for write/edit tools |
| 301 | #[serde(default)] |
| 302 | file_path: Option<String>, |
| 303 | |
| 304 | /// Structured file diff: { file, before, after, additions, deletions } |
| 305 | #[serde(default)] |
| 306 | filediff: Option<serde_json::Value>, |
| 307 | |
| 308 | /// LSP diagnostics at time of edit: { "/path/file.ts": [{ range, message }] } |
| 309 | #[serde(default)] |
| 310 | diagnostics: Option<serde_json::Value>, |
| 311 | |
| 312 | /// Exit code for bash tools |
| 313 | #[serde(default)] |
| 314 | exit_code: Option<i32>, |
| 315 | |
| 316 | #[serde(default)] |
| 317 | cwd: Option<String>, |
| 318 | |
| 319 | #[serde(default)] |
| 320 | timestamp: Option<String>, |
| 321 | } |
| 322 | |
| 323 | // OpenCodeHook |
| 324 |
nothing calls this directly
no outgoing calls
no test coverage detected