콘텐츠로 이동

RunHandoffOutputItem

이 콘텐츠는 아직 번역되지 않았습니다.

  • RunItemBase
new RunHandoffOutputItem(
rawItem,
sourceAgent,
targetAgent): RunHandoffOutputItem;
Parameter Type Description

rawItem

{ callId: string; id?: string; name: string; output: | string | { providerData?: Record<string, any>; text: string; type: "text"; } | { detail?: "low" | "high" | "auto" | string & object; image?: | string | { data: string | Uint8Array<ArrayBuffer>; mediaType?: string; } | { url: string; } | { fileId: string; }; providerData?: Record<string, any>; type: "image"; } | { file: | string | { data: string | Uint8Array<ArrayBuffer>; filename: string; mediaType: string; } | { filename?: string; url: string; } | { filename?: string; id: string; }; providerData?: Record<string, any>; type: "file"; } | ( | { providerData?: Record<string, any>; text: string; type: "input_text"; } | { detail?: string; image?: | string | { id: string; }; providerData?: Record<string, any>; type: "input_image"; } | { file?: | string | { id: string; } | { url: string; }; filename?: string; providerData?: Record<string, any>; type: "input_file"; })[]; providerData?: Record<string, any>; status: "in_progress" | "completed" | "incomplete"; type: "function_call_result"; }

rawItem.callId

string

The ID of the tool call. Required to match up the respective tool call result.

rawItem.id?

string

An ID to identify the item. This is optional by default. If a model provider absolutely requires this field, it will be validated on the model level.

rawItem.name

string

The name of the tool that was called

rawItem.output

| string | { providerData?: Record<string, any>; text: string; type: "text"; } | { detail?: "low" | "high" | "auto" | string & object; image?: | string | { data: string | Uint8Array<ArrayBuffer>; mediaType?: string; } | { url: string; } | { fileId: string; }; providerData?: Record<string, any>; type: "image"; } | { file: | string | { data: string | Uint8Array<ArrayBuffer>; filename: string; mediaType: string; } | { filename?: string; url: string; } | { filename?: string; id: string; }; providerData?: Record<string, any>; type: "file"; } | ( | { providerData?: Record<string, any>; text: string; type: "input_text"; } | { detail?: string; image?: | string | { id: string; }; providerData?: Record<string, any>; type: "input_image"; } | { file?: | string | { id: string; } | { url: string; }; filename?: string; providerData?: Record<string, any>; type: "input_file"; })[]

The output of the tool call.

rawItem.providerData?

Record<string, any>

Additional optional provider specific data. Used for custom functionality or model provider specific fields.

rawItem.status

"in_progress" | "completed" | "incomplete"

The status of the tool call.

rawItem.type

"function_call_result"

sourceAgent

Agent<any, any>

targetAgent

Agent<any, any>

RunHandoffOutputItem

RunItemBase.constructor
rawItem: object;
Name Type Description

callId

string

The ID of the tool call. Required to match up the respective tool call result.

id?

string

An ID to identify the item. This is optional by default. If a model provider absolutely requires this field, it will be validated on the model level.

name

string

The name of the tool that was called

output

| string | { providerData?: Record<string, any>; text: string; type: "text"; } | { detail?: "low" | "high" | "auto" | string & object; image?: | string | { data: string | Uint8Array<ArrayBuffer>; mediaType?: string; } | { url: string; } | { fileId: string; }; providerData?: Record<string, any>; type: "image"; } | { file: | string | { data: string | Uint8Array<ArrayBuffer>; filename: string; mediaType: string; } | { filename?: string; url: string; } | { filename?: string; id: string; }; providerData?: Record<string, any>; type: "file"; } | ( | { providerData?: Record<string, any>; text: string; type: "input_text"; } | { detail?: string; image?: | string | { id: string; }; providerData?: Record<string, any>; type: "input_image"; } | { file?: | string | { id: string; } | { url: string; }; filename?: string; providerData?: Record<string, any>; type: "input_file"; })[]

The output of the tool call.

providerData?

Record<string, any>

Additional optional provider specific data. Used for custom functionality or model provider specific fields.

status

"in_progress" | "completed" | "incomplete"

The status of the tool call.

type

"function_call_result"

RunItemBase.rawItem

sourceAgent: Agent<any, any>;

targetAgent: Agent<any, any>;

readonly type: "handoff_output_item";
RunItemBase.type
toJSON(): object;

object

rawItem:
| {
content: (
| {
providerData?: Record<string, any>;
refusal: string;
type: "refusal";
}
| {
providerData?: Record<string, any>;
text: string;
type: "output_text";
}
| {
audio: | string
| {
id: string;
};
format?: string | null;
providerData?: Record<string, any>;
transcript?: string | null;
type: "audio";
}
| {
image: string;
providerData?: Record<string, any>;
type: "image";
})[];
id?: string;
providerData?: Record<string, any>;
role: "assistant";
status: "in_progress" | "completed" | "incomplete";
type?: "message";
}
| {
content: | string
| (
| {
providerData?: Record<string, any>;
text: string;
type: "input_text";
}
| {
detail?: string;
image?: | string
| {
id: string;
};
providerData?: Record<string, any>;
type: "input_image";
}
| {
file?: | string
| {
id: string;
}
| {
url: string;
};
filename?: string;
providerData?: Record<string, any>;
type: "input_file";
}
| {
audio: | string
| {
id: string;
};
format?: string | null;
providerData?: Record<string, any>;
transcript?: string | null;
type: "audio";
})[];
id?: string;
providerData?: Record<string, any>;
role: "user";
type?: "message";
}
| {
content: string;
id?: string;
providerData?: Record<string, any>;
role: "system";
type?: "message";
}
| {
arguments?: string;
id?: string;
name: string;
output?: string;
providerData?: Record<string, any>;
status?: string;
type: "hosted_tool_call";
}
| {
arguments: string;
callId: string;
id?: string;
name: string;
providerData?: Record<string, any>;
status?: "in_progress" | "completed" | "incomplete";
type: "function_call";
}
| {
callId: string;
id?: string;
name: string;
output: | string
| {
providerData?: Record<string, any>;
text: string;
type: "text";
}
| {
detail?: "low" | "high" | "auto" | string & object;
image?: | string
| {
data: string | Uint8Array<ArrayBuffer>;
mediaType?: string;
}
| {
url: string;
}
| {
fileId: string;
};
providerData?: Record<string, any>;
type: "image";
}
| {
file: | string
| {
data: string | Uint8Array<ArrayBuffer>;
filename: string;
mediaType: string;
}
| {
filename?: string;
url: string;
}
| {
filename?: string;
id: string;
};
providerData?: Record<string, any>;
type: "file";
}
| (
| {
providerData?: Record<string, any>;
text: string;
type: "input_text";
}
| {
detail?: string;
image?: | string
| {
id: string;
};
providerData?: Record<string, any>;
type: "input_image";
}
| {
file?: | string
| {
id: string;
}
| {
url: string;
};
filename?: string;
providerData?: Record<string, any>;
type: "input_file";
})[];
providerData?: Record<string, any>;
status: "in_progress" | "completed" | "incomplete";
type: "function_call_result";
}
| {
action: | {
type: "screenshot";
}
| {
button: "left" | "right" | "wheel" | "back" | "forward";
type: "click";
x: number;
y: number;
}
| {
type: "double_click";
x: number;
y: number;
}
| {
scroll_x: number;
scroll_y: number;
type: "scroll";
x: number;
y: number;
}
| {
text: string;
type: "type";
}
| {
type: "wait";
}
| {
type: "move";
x: number;
y: number;
}
| {
keys: string[];
type: "keypress";
}
| {
path: object[];
type: "drag";
};
callId: string;
id?: string;
providerData?: Record<string, any>;
status: "in_progress" | "completed" | "incomplete";
type: "computer_call";
}
| {
callId: string;
id?: string;
output: {
data: string;
providerData?: Record<string, any>;
type: "computer_screenshot";
};
providerData?: Record<string, any>;
type: "computer_call_result";
}
| {
action: {
commands: string[];
maxOutputLength?: number;
timeoutMs?: number;
};
callId: string;
id?: string;
providerData?: Record<string, any>;
status?: "in_progress" | "completed" | "incomplete";
type: "shell_call";
}
| {
callId: string;
id?: string;
maxOutputLength?: number;
output: objectOutputType<{
outcome: ZodDiscriminatedUnion<"type", [ZodObject<{
type: ZodLiteral<...>;
}, "strip", ZodTypeAny, {
type: "timeout";
}, {
type: "timeout";
}>, ZodObject<{
exitCode: ZodNullable<...>;
type: ZodLiteral<...>;
}, "strip", ZodTypeAny, {
exitCode: ... | ...;
type: "exit";
}, {
exitCode: ... | ...;
type: "exit";
}>]>;
stderr: ZodString;
stdout: ZodString;
}, ZodTypeAny, "passthrough">[];
providerData?: Record<string, any>;
type: "shell_call_output";
}
| {
callId: string;
id?: string;
operation: | {
diff: string;
path: string;
type: "create_file";
}
| {
diff: string;
path: string;
type: "update_file";
}
| {
path: string;
type: "delete_file";
};
providerData?: Record<string, any>;
status: "in_progress" | "completed";
type: "apply_patch_call";
}
| {
callId: string;
id?: string;
output?: string;
providerData?: Record<string, any>;
status: "completed" | "failed";
type: "apply_patch_call_output";
}
| {
content: object[];
id?: string;
providerData?: Record<string, any>;
rawContent?: object[];
type: "reasoning";
}
| {
id?: string;
providerData?: Record<string, any>;
type: "unknown";
}
| undefined;
{
content: (
| {
providerData?: Record<string, any>;
refusal: string;
type: "refusal";
}
| {
providerData?: Record<string, any>;
text: string;
type: "output_text";
}
| {
audio: | string
| {
id: string;
};
format?: string | null;
providerData?: Record<string, any>;
transcript?: string | null;
type: "audio";
}
| {
image: string;
providerData?: Record<string, any>;
type: "image";
})[];
id?: string;
providerData?: Record<string, any>;
role: "assistant";
status: "in_progress" | "completed" | "incomplete";
type?: "message";
}
{
content: | string
| (
| {
providerData?: Record<string, any>;
text: string;
type: "input_text";
}
| {
detail?: string;
image?: | string
| {
id: string;
};
providerData?: Record<string, any>;
type: "input_image";
}
| {
file?: | string
| {
id: string;
}
| {
url: string;
};
filename?: string;
providerData?: Record<string, any>;
type: "input_file";
}
| {
audio: | string
| {
id: string;
};
format?: string | null;
providerData?: Record<string, any>;
transcript?: string | null;
type: "audio";
})[];
id?: string;
providerData?: Record<string, any>;
role: "user";
type?: "message";
}
{
content: string;
id?: string;
providerData?: Record<string, any>;
role: "system";
type?: "message";
}
{
arguments?: string;
id?: string;
name: string;
output?: string;
providerData?: Record<string, any>;
status?: string;
type: "hosted_tool_call";
}
{
arguments: string;
callId: string;
id?: string;
name: string;
providerData?: Record<string, any>;
status?: "in_progress" | "completed" | "incomplete";
type: "function_call";
}
{
callId: string;
id?: string;
name: string;
output: | string
| {
providerData?: Record<string, any>;
text: string;
type: "text";
}
| {
detail?: "low" | "high" | "auto" | string & object;
image?: | string
| {
data: string | Uint8Array<ArrayBuffer>;
mediaType?: string;
}
| {
url: string;
}
| {
fileId: string;
};
providerData?: Record<string, any>;
type: "image";
}
| {
file: | string
| {
data: string | Uint8Array<ArrayBuffer>;
filename: string;
mediaType: string;
}
| {
filename?: string;
url: string;
}
| {
filename?: string;
id: string;
};
providerData?: Record<string, any>;
type: "file";
}
| (
| {
providerData?: Record<string, any>;
text: string;
type: "input_text";
}
| {
detail?: string;
image?: | string
| {
id: string;
};
providerData?: Record<string, any>;
type: "input_image";
}
| {
file?: | string
| {
id: string;
}
| {
url: string;
};
filename?: string;
providerData?: Record<string, any>;
type: "input_file";
})[];
providerData?: Record<string, any>;
status: "in_progress" | "completed" | "incomplete";
type: "function_call_result";
}
{
action: | {
type: "screenshot";
}
| {
button: "left" | "right" | "wheel" | "back" | "forward";
type: "click";
x: number;
y: number;
}
| {
type: "double_click";
x: number;
y: number;
}
| {
scroll_x: number;
scroll_y: number;
type: "scroll";
x: number;
y: number;
}
| {
text: string;
type: "type";
}
| {
type: "wait";
}
| {
type: "move";
x: number;
y: number;
}
| {
keys: string[];
type: "keypress";
}
| {
path: object[];
type: "drag";
};
callId: string;
id?: string;
providerData?: Record<string, any>;
status: "in_progress" | "completed" | "incomplete";
type: "computer_call";
}
{
callId: string;
id?: string;
output: {
data: string;
providerData?: Record<string, any>;
type: "computer_screenshot";
};
providerData?: Record<string, any>;
type: "computer_call_result";
}
{
action: {
commands: string[];
maxOutputLength?: number;
timeoutMs?: number;
};
callId: string;
id?: string;
providerData?: Record<string, any>;
status?: "in_progress" | "completed" | "incomplete";
type: "shell_call";
}
{
callId: string;
id?: string;
maxOutputLength?: number;
output: objectOutputType<{
outcome: ZodDiscriminatedUnion<"type", [ZodObject<{
type: ZodLiteral<...>;
}, "strip", ZodTypeAny, {
type: "timeout";
}, {
type: "timeout";
}>, ZodObject<{
exitCode: ZodNullable<...>;
type: ZodLiteral<...>;
}, "strip", ZodTypeAny, {
exitCode: ... | ...;
type: "exit";
}, {
exitCode: ... | ...;
type: "exit";
}>]>;
stderr: ZodString;
stdout: ZodString;
}, ZodTypeAny, "passthrough">[];
providerData?: Record<string, any>;
type: "shell_call_output";
}
{
callId: string;
id?: string;
operation: | {
diff: string;
path: string;
type: "create_file";
}
| {
diff: string;
path: string;
type: "update_file";
}
| {
path: string;
type: "delete_file";
};
providerData?: Record<string, any>;
status: "in_progress" | "completed";
type: "apply_patch_call";
}
{
callId: string;
id?: string;
output?: string;
providerData?: Record<string, any>;
status: "completed" | "failed";
type: "apply_patch_call_output";
}
{
content: object[];
id?: string;
providerData?: Record<string, any>;
rawContent?: object[];
type: "reasoning";
}
{
id?: string;
providerData?: Record<string, any>;
type: "unknown";
}

undefined

sourceAgent: object;
name: string;
targetAgent: object;
name: string;
type: string;
RunItemBase.toJSON