Set the agent identity for sessions created by this orchestrator. Called by the CLI hook handler after construction, before dispatching events. This ensures new sessions get the correct agent name (e.g., "claude-code" / "Claude Code") instead of "unknown".
(&mut self, name: impl Into<String>, display_name: impl Into<String>)
| 298 | /// events. This ensures new sessions get the correct agent name |
| 299 | /// (e.g., "claude-code" / "Claude Code") instead of "unknown". |
| 300 | pub fn set_agent(&mut self, name: impl Into<String>, display_name: impl Into<String>) { |
| 301 | self.agent_name = name.into(); |
| 302 | self.agent_display_name = display_name.into(); |
| 303 | } |
| 304 | |
| 305 | /// Attach the managed-run context for this hook invocation |
| 306 | /// (see [`ManagedRunContext`]). |
no outgoing calls