Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

Added function types

Dillon DuPontdcb584fbb8f6
diff --git a/libs/typescript/agent/src/types.ts b/libs/typescript/agent/src/types.ts
index 48a4bc3deb..9d5a7b8d9e 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