recursive/session/orphan.rs
1//! Orphan tool-call detection types (Goal 153).
2//!
3//! Describes a tool call that was dispatched but never completed
4//! (no matching `tool` result message in the transcript).
5//!
6//! Split from `session.rs` during the Goal 221 module refactor.
7
8/// Goal-153: describes a tool call that was dispatched but never completed
9/// (no matching `tool` result message in the transcript).
10#[derive(Debug, Clone)]
11pub struct OrphanToolCall {
12 /// `id` field of the assistant `TranscriptEntry` that issued the call.
13 pub assistant_msg_id: String,
14 /// The `id` of the tool call itself (matches `tool_call_id` on the
15 /// expected — but missing — tool result message).
16 pub tool_call_id: String,
17 /// The name of the tool that was called.
18 pub tool_name: String,
19 /// BLAKE3 of canonical JSON of the call arguments (for drift detection).
20 pub args_hash: String,
21 /// Side-effect class, determined from the current registry (valid because
22 /// `recursive resume` validates the registry hash before calling this).
23 pub side_effect_at_call: crate::tools::ToolSideEffect,
24}