Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ access happen — those live in `tool/`, `executor/`, and `storage/` respectivel
(the normalized `FunctionTool` and `ToolChoice`, distinct from tool *declarations*),
`usage.rs` (token accounting structs).
- **`types/tools/params.rs`** — the tool **declaration** shapes a client sends:
`ResponsesTool` (tagged enum: `Function`, `Mcp`, `WebSearch`, `FileSearch`,
`ResponsesTool` (tagged enum: `Function`, `ToolSearch`, `Mcp`, `WebSearch`, `FileSearch`,
`CodeInterpreter`, `Namespace`, `Custom`, `Unknown`) and each variant's param struct.
This is a good concrete example of the module boundary: `ResponsesTool` is *defined*
here as a pure shape, but its behavior — `validate()` and `to_function_tools()` — is
Expand Down
3 changes: 3 additions & 0 deletions crates/agentic-server-core/src/events/normalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ fn extract_output_item_added(json: &Value) -> EventPayload {
name: json_str_opt(item, "name"),
namespace: json_str_opt(item, "namespace"),
call_id: json_str_opt(item, "call_id"),
execution: item.get("execution").cloned().and_then(deserialize_from_value_opt),
status: json_str_opt(item, "status"),
arguments: item.get("arguments").and_then(Value::as_object).cloned(),
}
}

Expand Down
7 changes: 7 additions & 0 deletions crates/agentic-server-core/src/events/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use serde::{Deserialize, Serialize};
use serde_json::{Map, Value};

use crate::types::io::ResponseUsage;
use crate::types::tools::ToolSearchExecution;

/// The type of an output item received during streaming.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
Expand All @@ -12,6 +13,7 @@ pub enum SSEItemType {
WebSearchCall,
McpCall,
McpListTools,
ToolSearchCall,
Compaction,
Message,
}
Expand All @@ -26,6 +28,7 @@ impl SSEItemType {
Self::WebSearchCall => "web_search_call",
Self::McpCall => "mcp_call",
Self::McpListTools => "mcp_list_tools",
Self::ToolSearchCall => "tool_search_call",
Self::Compaction => "compaction",
Self::Message => "message",
}
Expand All @@ -41,6 +44,7 @@ impl From<&str> for SSEItemType {
"web_search_call" => Self::WebSearchCall,
"mcp_call" => Self::McpCall,
"mcp_list_tools" => Self::McpListTools,
"tool_search_call" => Self::ToolSearchCall,
"compaction" => Self::Compaction,
_ => Self::Message,
}
Expand Down Expand Up @@ -252,6 +256,9 @@ pub enum EventPayload {
name: Option<String>,
namespace: Option<String>,
call_id: Option<String>,
execution: Option<ToolSearchExecution>,
status: Option<String>,
arguments: Option<Map<String, Value>>,
},

/// `response.output_item.done`
Expand Down
Loading