codex: add app-server support for spawn_agents_on_csv

This commit is contained in:
kh.ai
2026-04-08 04:38:45 -05:00
parent ea516f9a40
commit 478afb40dd
39 changed files with 951 additions and 56 deletions
+23
View File
@@ -3409,10 +3409,27 @@ pub enum TurnAbortReason {
ReviewEnded,
}
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "snake_case")]
#[ts(rename_all = "snake_case")]
pub enum CollabAgentSpawnTool {
SpawnAgent,
SpawnAgentsOnCsv,
}
impl Default for CollabAgentSpawnTool {
fn default() -> Self {
Self::SpawnAgent
}
}
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, JsonSchema, TS)]
pub struct CollabAgentSpawnBeginEvent {
/// Identifier for the collab tool call.
pub call_id: String,
/// Tool that initiated the spawn flow.
#[serde(default)]
pub tool: CollabAgentSpawnTool,
/// Thread ID of the sender.
pub sender_thread_id: ThreadId,
/// Initial prompt sent to the agent. Can be empty to prevent CoT leaking at the
@@ -3452,6 +3469,9 @@ pub struct CollabAgentStatusEntry {
pub struct CollabAgentSpawnEndEvent {
/// Identifier for the collab tool call.
pub call_id: String,
/// Tool that initiated the spawn flow.
#[serde(default)]
pub tool: CollabAgentSpawnTool,
/// Thread ID of the sender.
pub sender_thread_id: ThreadId,
/// Thread ID of the newly spawned agent, if it was created.
@@ -3469,6 +3489,9 @@ pub struct CollabAgentSpawnEndEvent {
pub model: String,
/// Effective reasoning effort used by the spawned agent after inheritance and role overrides.
pub reasoning_effort: ReasoningEffortConfig,
/// Final per-agent statuses for multi-agent batch spawns.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub agent_statuses: Vec<CollabAgentStatusEntry>,
/// Last known status of the new agent reported to the sender agent.
pub status: AgentStatus,
}