diff --git a/libs/typescript/agent/src/types.ts b/libs/typescript/agent/src/types.ts index 48a4bc3d..9d5a7b8d 100644 --- a/libs/typescript/agent/src/types.ts +++ b/libs/typescript/agent/src/types.ts @@ -47,7 +47,9 @@ export type AgentMessage = | AssistantMessage | ReasoningMessage | ComputerCallMessage - | ComputerCallOutputMessage; + | ComputerCallOutputMessage + | FunctionCallMesssage + | FunctionCallOutputMessage; // Input message export interface UserMessage { type?: 'message'; @@ -78,6 +80,20 @@ export interface ComputerCallOutputMessage { call_id: string; output: ComputerResultContent; } +// Output function call +export interface FunctionCallMessage { + type: 'function_call'; + call_id: string; + status: 'completed' | 'failed' | 'pending'; + name: string; + arguments: string; // JSON dict of kwargs +} +// Output function call result (always text) +export interface FunctionCallOutputMessage { + type: 'function_call_output'; + call_id: string; + output: string; +} // #endregion