@openai/agents-core
Version:
The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.
1,070 lines • 106 kB
TypeScript
import { z } from 'zod';
import { Agent } from './agent';
import { RunItem, RunToolApprovalItem } from './items';
import type { ModelResponse, ModelSettings } from './model';
import { RunContext } from './runContext';
import { type ReasoningItemIdPolicy } from './runner/items';
import { AgentToolUseTracker } from './runner/toolUseTracker';
import { NextStep } from './runner/steps';
import type { ProcessedResponse } from './runner/types';
import type { AgentSpanData, Span } from './tracing/spans';
import { Usage } from './usage';
import { Trace } from './tracing/traces';
import { AgentInputItem } from './types';
import type { InputGuardrailResult, OutputGuardrailResult } from './guardrail';
import type { ToolInputGuardrailResult, ToolOutputGuardrailResult } from './toolGuardrail';
/**
* The schema version of the serialized run state. This is used to ensure that the serialized
* run state is compatible with the current version of the SDK.
* If anything in this schema changes, the version will have to be incremented.
*
* Version history.
* - 1.0: Initial serialized RunState schema.
* - 1.1: Adds optional currentTurnInProgress, conversationId, and previousResponseId fields,
* plus broader tool_call_output_item rawItem variants for non-function tools. Older 1.0
* payloads remain readable but resumes may lack mid-turn or server-managed context precision.
* - 1.2: Adds pendingAgentToolRuns for nested agent tool resumption.
* - 1.3: Adds computer tool approval items to serialized tool_approval_item unions.
* - 1.4: Adds optional toolInput to serialized run context.
* - 1.5: Adds optional reasoningItemIdPolicy to preserve reasoning input policy across resume.
*/
export declare const CURRENT_SCHEMA_VERSION: "1.5";
type ContextOverrideStrategy = 'merge' | 'replace';
declare const serializedSpanBase: z.ZodObject<{
object: z.ZodLiteral<"trace.span">;
id: z.ZodString;
trace_id: z.ZodString;
parent_id: z.ZodNullable<z.ZodString>;
started_at: z.ZodNullable<z.ZodString>;
ended_at: z.ZodNullable<z.ZodString>;
error: z.ZodNullable<z.ZodObject<{
message: z.ZodString;
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
}, z.core.$strip>>;
span_data: z.ZodRecord<z.ZodString, z.ZodAny>;
}, z.core.$strip>;
type SerializedSpanType = z.infer<typeof serializedSpanBase> & {
previous_span?: SerializedSpanType;
};
export declare const SerializedRunState: z.ZodObject<{
$schemaVersion: z.ZodEnum<{
"1.0": "1.0";
1.1: "1.1";
1.2: "1.2";
1.3: "1.3";
1.4: "1.4";
1.5: "1.5";
}>;
currentTurn: z.ZodNumber;
currentAgent: z.ZodObject<{
name: z.ZodString;
}, z.core.$strip>;
originalInput: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodOptional<z.ZodLiteral<"message">>;
role: z.ZodLiteral<"user">;
content: z.ZodUnion<[z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_text">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_image">;
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
id: z.ZodString;
}, z.core.$strip>]>>;
detail: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_file">;
file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
id: z.ZodString;
}, z.core.$strip>]>, z.ZodObject<{
url: z.ZodString;
}, z.core.$strip>]>>;
filename: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"audio">;
audio: z.ZodUnion<[z.ZodString, z.ZodObject<{
id: z.ZodString;
}, z.core.$strip>]>;
format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
transcript: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>], "type">>, z.ZodString]>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodOptional<z.ZodLiteral<"message">>;
role: z.ZodLiteral<"assistant">;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>;
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"output_text">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"refusal">;
refusal: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"audio">;
audio: z.ZodUnion<[z.ZodString, z.ZodObject<{
id: z.ZodString;
}, z.core.$strip>]>;
format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
transcript: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"image">;
image: z.ZodString;
}, z.core.$strip>], "type">>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodOptional<z.ZodLiteral<"message">>;
role: z.ZodLiteral<"system">;
content: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"hosted_tool_call">;
name: z.ZodString;
arguments: z.ZodOptional<z.ZodString>;
status: z.ZodOptional<z.ZodString>;
output: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"function_call">;
callId: z.ZodString;
name: z.ZodString;
status: z.ZodOptional<z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>>;
arguments: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"computer_call">;
callId: z.ZodString;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>;
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"screenshot">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"click">;
x: z.ZodNumber;
y: z.ZodNumber;
button: z.ZodEnum<{
left: "left";
right: "right";
wheel: "wheel";
back: "back";
forward: "forward";
}>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"double_click">;
x: z.ZodNumber;
y: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"scroll">;
x: z.ZodNumber;
y: z.ZodNumber;
scroll_x: z.ZodNumber;
scroll_y: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"type">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"wait">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"move">;
x: z.ZodNumber;
y: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"keypress">;
keys: z.ZodArray<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"drag">;
path: z.ZodArray<z.ZodObject<{
x: z.ZodNumber;
y: z.ZodNumber;
}, z.core.$strip>>;
}, z.core.$strip>], "type">;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"shell_call">;
callId: z.ZodString;
status: z.ZodOptional<z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>>;
action: z.ZodObject<{
commands: z.ZodArray<z.ZodString>;
timeoutMs: z.ZodOptional<z.ZodNumber>;
maxOutputLength: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"apply_patch_call">;
callId: z.ZodString;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
}>;
operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"create_file">;
path: z.ZodString;
diff: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"update_file">;
path: z.ZodString;
diff: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"delete_file">;
path: z.ZodString;
}, z.core.$strip>], "type">;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"function_call_result">;
name: z.ZodString;
callId: z.ZodString;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>;
output: z.ZodUnion<readonly [z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"image">;
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
data: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
mediaType: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
url: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
fileId: z.ZodString;
}, z.core.$strip>]>]>>;
detail: z.ZodOptional<z.ZodType<"low" | "high" | "auto" | (string & {}), unknown, z.core.$ZodTypeInternals<"low" | "high" | "auto" | (string & {}), unknown>>>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"file">;
file: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
data: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
mediaType: z.ZodString;
filename: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
url: z.ZodString;
filename: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
id: z.ZodString;
filename: z.ZodOptional<z.ZodString>;
}, z.core.$strip>]>;
}, z.core.$strip>], "type">, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_text">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_image">;
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
id: z.ZodString;
}, z.core.$strip>]>>;
detail: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_file">;
file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
id: z.ZodString;
}, z.core.$strip>]>, z.ZodObject<{
url: z.ZodString;
}, z.core.$strip>]>>;
filename: z.ZodOptional<z.ZodString>;
}, z.core.$strip>], "type">>]>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"computer_call_result">;
callId: z.ZodString;
output: z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"computer_screenshot">;
data: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"shell_call_output">;
callId: z.ZodString;
maxOutputLength: z.ZodOptional<z.ZodNumber>;
output: z.ZodArray<z.ZodObject<{
stdout: z.ZodString;
stderr: z.ZodString;
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"timeout">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"exit">;
exitCode: z.ZodNullable<z.ZodNumber>;
}, z.core.$strip>], "type">;
}, z.core.$loose>>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"apply_patch_call_output">;
callId: z.ZodString;
status: z.ZodEnum<{
completed: "completed";
failed: "failed";
}>;
output: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"reasoning">;
content: z.ZodArray<z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_text">;
text: z.ZodString;
}, z.core.$strip>>;
rawContent: z.ZodOptional<z.ZodArray<z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"reasoning_text">;
text: z.ZodString;
}, z.core.$strip>>>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"compaction">;
encrypted_content: z.ZodString;
id: z.ZodOptional<z.ZodString>;
created_by: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"unknown">;
}, z.core.$strip>]>>]>;
modelResponses: z.ZodArray<z.ZodObject<{
usage: z.ZodObject<{
requests: z.ZodNumber;
inputTokens: z.ZodNumber;
outputTokens: z.ZodNumber;
totalTokens: z.ZodNumber;
inputTokensDetails: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
outputTokensDetails: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
requestUsageEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
inputTokens: z.ZodNumber;
outputTokens: z.ZodNumber;
totalTokens: z.ZodNumber;
inputTokensDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
outputTokensDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
endpoint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
}, z.core.$strip>;
output: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodOptional<z.ZodLiteral<"message">>;
role: z.ZodLiteral<"assistant">;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>;
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"output_text">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"refusal">;
refusal: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"audio">;
audio: z.ZodUnion<[z.ZodString, z.ZodObject<{
id: z.ZodString;
}, z.core.$strip>]>;
format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
transcript: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"image">;
image: z.ZodString;
}, z.core.$strip>], "type">>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"hosted_tool_call">;
name: z.ZodString;
arguments: z.ZodOptional<z.ZodString>;
status: z.ZodOptional<z.ZodString>;
output: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"function_call">;
callId: z.ZodString;
name: z.ZodString;
status: z.ZodOptional<z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>>;
arguments: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"computer_call">;
callId: z.ZodString;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>;
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"screenshot">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"click">;
x: z.ZodNumber;
y: z.ZodNumber;
button: z.ZodEnum<{
left: "left";
right: "right";
wheel: "wheel";
back: "back";
forward: "forward";
}>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"double_click">;
x: z.ZodNumber;
y: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"scroll">;
x: z.ZodNumber;
y: z.ZodNumber;
scroll_x: z.ZodNumber;
scroll_y: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"type">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"wait">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"move">;
x: z.ZodNumber;
y: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"keypress">;
keys: z.ZodArray<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"drag">;
path: z.ZodArray<z.ZodObject<{
x: z.ZodNumber;
y: z.ZodNumber;
}, z.core.$strip>>;
}, z.core.$strip>], "type">;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"shell_call">;
callId: z.ZodString;
status: z.ZodOptional<z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>>;
action: z.ZodObject<{
commands: z.ZodArray<z.ZodString>;
timeoutMs: z.ZodOptional<z.ZodNumber>;
maxOutputLength: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"apply_patch_call">;
callId: z.ZodString;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
}>;
operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"create_file">;
path: z.ZodString;
diff: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"update_file">;
path: z.ZodString;
diff: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"delete_file">;
path: z.ZodString;
}, z.core.$strip>], "type">;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"function_call_result">;
name: z.ZodString;
callId: z.ZodString;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>;
output: z.ZodUnion<readonly [z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"image">;
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
data: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
mediaType: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
url: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
fileId: z.ZodString;
}, z.core.$strip>]>]>>;
detail: z.ZodOptional<z.ZodType<"low" | "high" | "auto" | (string & {}), unknown, z.core.$ZodTypeInternals<"low" | "high" | "auto" | (string & {}), unknown>>>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"file">;
file: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
data: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
mediaType: z.ZodString;
filename: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
url: z.ZodString;
filename: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
id: z.ZodString;
filename: z.ZodOptional<z.ZodString>;
}, z.core.$strip>]>;
}, z.core.$strip>], "type">, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_text">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_image">;
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
id: z.ZodString;
}, z.core.$strip>]>>;
detail: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_file">;
file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
id: z.ZodString;
}, z.core.$strip>]>, z.ZodObject<{
url: z.ZodString;
}, z.core.$strip>]>>;
filename: z.ZodOptional<z.ZodString>;
}, z.core.$strip>], "type">>]>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"shell_call_output">;
callId: z.ZodString;
maxOutputLength: z.ZodOptional<z.ZodNumber>;
output: z.ZodArray<z.ZodObject<{
stdout: z.ZodString;
stderr: z.ZodString;
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"timeout">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"exit">;
exitCode: z.ZodNullable<z.ZodNumber>;
}, z.core.$strip>], "type">;
}, z.core.$loose>>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"apply_patch_call_output">;
callId: z.ZodString;
status: z.ZodEnum<{
completed: "completed";
failed: "failed";
}>;
output: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"reasoning">;
content: z.ZodArray<z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_text">;
text: z.ZodString;
}, z.core.$strip>>;
rawContent: z.ZodOptional<z.ZodArray<z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"reasoning_text">;
text: z.ZodString;
}, z.core.$strip>>>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"compaction">;
encrypted_content: z.ZodString;
id: z.ZodOptional<z.ZodString>;
created_by: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"unknown">;
}, z.core.$strip>], "type">>;
responseId: z.ZodOptional<z.ZodString>;
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
}, z.core.$strip>>;
context: z.ZodObject<{
usage: z.ZodObject<{
requests: z.ZodNumber;
inputTokens: z.ZodNumber;
outputTokens: z.ZodNumber;
totalTokens: z.ZodNumber;
inputTokensDetails: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
outputTokensDetails: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
requestUsageEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
inputTokens: z.ZodNumber;
outputTokens: z.ZodNumber;
totalTokens: z.ZodNumber;
inputTokensDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
outputTokensDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
endpoint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
}, z.core.$strip>;
approvals: z.ZodRecord<z.ZodString, z.ZodObject<{
approved: z.ZodUnion<[z.ZodArray<z.ZodString>, z.ZodBoolean]>;
rejected: z.ZodUnion<[z.ZodArray<z.ZodString>, z.ZodBoolean]>;
}, z.core.$strip>>;
context: z.ZodRecord<z.ZodString, z.ZodAny>;
toolInput: z.ZodOptional<z.ZodAny>;
}, z.core.$strip>;
toolUseTracker: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
maxTurns: z.ZodNumber;
currentAgentSpan: z.ZodOptional<z.ZodNullable<z.ZodType<SerializedSpanType, unknown, z.core.$ZodTypeInternals<SerializedSpanType, unknown>>>>;
noActiveAgentRun: z.ZodBoolean;
inputGuardrailResults: z.ZodArray<z.ZodObject<{
guardrail: z.ZodObject<{
type: z.ZodLiteral<"input">;
name: z.ZodString;
}, z.core.$strip>;
output: z.ZodObject<{
tripwireTriggered: z.ZodBoolean;
outputInfo: z.ZodAny;
}, z.core.$strip>;
}, z.core.$strip>>;
outputGuardrailResults: z.ZodArray<z.ZodObject<{
guardrail: z.ZodObject<{
type: z.ZodLiteral<"output">;
name: z.ZodString;
}, z.core.$strip>;
agentOutput: z.ZodAny;
agent: z.ZodObject<{
name: z.ZodString;
}, z.core.$strip>;
output: z.ZodObject<{
tripwireTriggered: z.ZodBoolean;
outputInfo: z.ZodAny;
}, z.core.$strip>;
}, z.core.$strip>>;
toolInputGuardrailResults: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
guardrail: z.ZodObject<{
name: z.ZodString;
type: z.ZodLiteral<"tool_input">;
}, z.core.$strip>;
output: z.ZodObject<{
outputInfo: z.ZodOptional<z.ZodAny>;
behavior: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"allow">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"rejectContent">;
message: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"throwException">;
}, z.core.$strip>], "type">;
}, z.core.$strip>;
}, z.core.$strip>>>>;
toolOutputGuardrailResults: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
guardrail: z.ZodObject<{
name: z.ZodString;
type: z.ZodLiteral<"tool_output">;
}, z.core.$strip>;
output: z.ZodObject<{
outputInfo: z.ZodOptional<z.ZodAny>;
behavior: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"allow">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"rejectContent">;
message: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"throwException">;
}, z.core.$strip>], "type">;
}, z.core.$strip>;
}, z.core.$strip>>>>;
currentTurnInProgress: z.ZodOptional<z.ZodBoolean>;
currentStep: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"next_step_handoff">;
newAgent: z.ZodAny;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"next_step_final_output">;
output: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"next_step_run_again">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"next_step_interruption">;
data: z.ZodRecord<z.ZodString, z.ZodAny>;
}, z.core.$strip>], "type">>;
lastModelResponse: z.ZodOptional<z.ZodObject<{
usage: z.ZodObject<{
requests: z.ZodNumber;
inputTokens: z.ZodNumber;
outputTokens: z.ZodNumber;
totalTokens: z.ZodNumber;
inputTokensDetails: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
outputTokensDetails: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
requestUsageEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
inputTokens: z.ZodNumber;
outputTokens: z.ZodNumber;
totalTokens: z.ZodNumber;
inputTokensDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
outputTokensDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
endpoint: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
}, z.core.$strip>;
output: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodOptional<z.ZodLiteral<"message">>;
role: z.ZodLiteral<"assistant">;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>;
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"output_text">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"refusal">;
refusal: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"audio">;
audio: z.ZodUnion<[z.ZodString, z.ZodObject<{
id: z.ZodString;
}, z.core.$strip>]>;
format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
transcript: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"image">;
image: z.ZodString;
}, z.core.$strip>], "type">>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"hosted_tool_call">;
name: z.ZodString;
arguments: z.ZodOptional<z.ZodString>;
status: z.ZodOptional<z.ZodString>;
output: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"function_call">;
callId: z.ZodString;
name: z.ZodString;
status: z.ZodOptional<z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>>;
arguments: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"computer_call">;
callId: z.ZodString;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>;
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"screenshot">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"click">;
x: z.ZodNumber;
y: z.ZodNumber;
button: z.ZodEnum<{
left: "left";
right: "right";
wheel: "wheel";
back: "back";
forward: "forward";
}>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"double_click">;
x: z.ZodNumber;
y: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"scroll">;
x: z.ZodNumber;
y: z.ZodNumber;
scroll_x: z.ZodNumber;
scroll_y: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"type">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"wait">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"move">;
x: z.ZodNumber;
y: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"keypress">;
keys: z.ZodArray<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"drag">;
path: z.ZodArray<z.ZodObject<{
x: z.ZodNumber;
y: z.ZodNumber;
}, z.core.$strip>>;
}, z.core.$strip>], "type">;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"shell_call">;
callId: z.ZodString;
status: z.ZodOptional<z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>>;
action: z.ZodObject<{
commands: z.ZodArray<z.ZodString>;
timeoutMs: z.ZodOptional<z.ZodNumber>;
maxOutputLength: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"apply_patch_call">;
callId: z.ZodString;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
}>;
operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"create_file">;
path: z.ZodString;
diff: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"update_file">;
path: z.ZodString;
diff: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"delete_file">;
path: z.ZodString;
}, z.core.$strip>], "type">;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"function_call_result">;
name: z.ZodString;
callId: z.ZodString;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>;
output: z.ZodUnion<readonly [z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"text">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"image">;
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
data: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
mediaType: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
url: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
fileId: z.ZodString;
}, z.core.$strip>]>]>>;
detail: z.ZodOptional<z.ZodType<"low" | "high" | "auto" | (string & {}), unknown, z.core.$ZodTypeInternals<"low" | "high" | "auto" | (string & {}), unknown>>>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"file">;
file: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
data: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>]>;
mediaType: z.ZodString;
filename: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
url: z.ZodString;
filename: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
id: z.ZodString;
filename: z.ZodOptional<z.ZodString>;
}, z.core.$strip>]>;
}, z.core.$strip>], "type">, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_text">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_image">;
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
id: z.ZodString;
}, z.core.$strip>]>>;
detail: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_file">;
file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
id: z.ZodString;
}, z.core.$strip>]>, z.ZodObject<{
url: z.ZodString;
}, z.core.$strip>]>>;
filename: z.ZodOptional<z.ZodString>;
}, z.core.$strip>], "type">>]>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"shell_call_output">;
callId: z.ZodString;
maxOutputLength: z.ZodOptional<z.ZodNumber>;
output: z.ZodArray<z.ZodObject<{
stdout: z.ZodString;
stderr: z.ZodString;
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"timeout">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"exit">;
exitCode: z.ZodNullable<z.ZodNumber>;
}, z.core.$strip>], "type">;
}, z.core.$loose>>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"apply_patch_call_output">;
callId: z.ZodString;
status: z.ZodEnum<{
completed: "completed";
failed: "failed";
}>;
output: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"reasoning">;
content: z.ZodArray<z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"input_text">;
text: z.ZodString;
}, z.core.$strip>>;
rawContent: z.ZodOptional<z.ZodArray<z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"reasoning_text">;
text: z.ZodString;
}, z.core.$strip>>>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"compaction">;
encrypted_content: z.ZodString;
id: z.ZodOptional<z.ZodString>;
created_by: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"unknown">;
}, z.core.$strip>], "type">>;
responseId: z.ZodOptional<z.ZodString>;
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
}, z.core.$strip>>;
generatedItems: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"message_output_item">;
rawItem: z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodOptional<z.ZodLiteral<"message">>;
role: z.ZodLiteral<"assistant">;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>;
content: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"output_text">;
text: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"refusal">;
refusal: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"audio">;
audio: z.ZodUnion<[z.ZodString, z.ZodObject<{
id: z.ZodString;
}, z.core.$strip>]>;
format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
transcript: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
type: z.ZodLiteral<"image">;
image: z.ZodString;
}, z.core.$strip>], "type">>;
}, z.core.$strip>;
agent: z.ZodObject<{
name: z.ZodString;
}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"tool_call_item">;
rawItem: z.ZodUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
id: z.ZodOptional<z.ZodString>;
type: z.ZodLiteral<"computer_call">;
callId: z.ZodString;
status: z.ZodEnum<{
in_progress: "in_progress";
completed: "completed";
incomplete: "incomplete";
}>;
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
type: z.ZodLiteral<"screenshot">;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"click">;
x: z.ZodNumber;
y: z.ZodNumber;
button: z.ZodEnum<{
left: "left";
right: "right";
wheel: "wheel";
back: "back";
forward: "forward";
}>;
}, z.core.$strip>, z.ZodObject<{
type: z.ZodLiteral<"double