MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / AfterToolInput

Class AfterToolInput

atomic-agent/src/hooks/opencode.rs:274–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected