@openai/agents-core 0.5.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/computer.d.ts +10 -2
- package/dist/events.d.ts +1 -1
- package/dist/events.js.map +1 -1
- package/dist/events.mjs.map +1 -1
- package/dist/extensions/handoffFilters.d.ts +4 -3
- package/dist/extensions/handoffFilters.js +8 -3
- package/dist/extensions/handoffFilters.js.map +1 -1
- package/dist/extensions/handoffFilters.mjs +9 -4
- package/dist/extensions/handoffFilters.mjs.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/items.d.ts +1158 -32
- package/dist/items.js +56 -2
- package/dist/items.js.map +1 -1
- package/dist/items.mjs +53 -1
- package/dist/items.mjs.map +1 -1
- package/dist/metadata.js +3 -3
- package/dist/metadata.mjs +3 -3
- package/dist/model.d.ts +14 -2
- package/dist/run.js +2 -2
- package/dist/run.js.map +1 -1
- package/dist/run.mjs +3 -3
- package/dist/run.mjs.map +1 -1
- package/dist/runContext.d.ts +12 -1
- package/dist/runContext.js +145 -41
- package/dist/runContext.js.map +1 -1
- package/dist/runContext.mjs +145 -41
- package/dist/runContext.mjs.map +1 -1
- package/dist/runState.d.ts +506 -18
- package/dist/runState.js +321 -15
- package/dist/runState.js.map +1 -1
- package/dist/runState.mjs +322 -16
- package/dist/runState.mjs.map +1 -1
- package/dist/runner/approvalRejection.d.ts +13 -0
- package/dist/runner/approvalRejection.js +44 -0
- package/dist/runner/approvalRejection.js.map +1 -0
- package/dist/runner/approvalRejection.mjs +37 -0
- package/dist/runner/approvalRejection.mjs.map +1 -0
- package/dist/runner/mcpApprovals.js +4 -1
- package/dist/runner/mcpApprovals.js.map +1 -1
- package/dist/runner/mcpApprovals.mjs +4 -1
- package/dist/runner/mcpApprovals.mjs.map +1 -1
- package/dist/runner/modelOutputs.d.ts +5 -1
- package/dist/runner/modelOutputs.js +552 -12
- package/dist/runner/modelOutputs.js.map +1 -1
- package/dist/runner/modelOutputs.mjs +552 -13
- package/dist/runner/modelOutputs.mjs.map +1 -1
- package/dist/runner/modelPreparation.js +5 -2
- package/dist/runner/modelPreparation.js.map +1 -1
- package/dist/runner/modelPreparation.mjs +5 -2
- package/dist/runner/modelPreparation.mjs.map +1 -1
- package/dist/runner/sessionPersistence.js +17 -3
- package/dist/runner/sessionPersistence.js.map +1 -1
- package/dist/runner/sessionPersistence.mjs +17 -3
- package/dist/runner/sessionPersistence.mjs.map +1 -1
- package/dist/runner/streaming.js +8 -0
- package/dist/runner/streaming.js.map +1 -1
- package/dist/runner/streaming.mjs +9 -1
- package/dist/runner/streaming.mjs.map +1 -1
- package/dist/runner/toolExecution.js +105 -95
- package/dist/runner/toolExecution.js.map +1 -1
- package/dist/runner/toolExecution.mjs +100 -90
- package/dist/runner/toolExecution.mjs.map +1 -1
- package/dist/runner/toolSearch.d.ts +23 -0
- package/dist/runner/toolSearch.js +426 -0
- package/dist/runner/toolSearch.js.map +1 -0
- package/dist/runner/toolSearch.mjs +416 -0
- package/dist/runner/toolSearch.mjs.map +1 -0
- package/dist/runner/turnResolution.js +2 -1
- package/dist/runner/turnResolution.js.map +1 -1
- package/dist/runner/turnResolution.mjs +2 -1
- package/dist/runner/turnResolution.mjs.map +1 -1
- package/dist/tool.d.ts +50 -0
- package/dist/tool.js +79 -0
- package/dist/tool.js.map +1 -1
- package/dist/tool.mjs +74 -0
- package/dist/tool.mjs.map +1 -1
- package/dist/toolIdentity.d.ts +23 -0
- package/dist/toolIdentity.js +105 -0
- package/dist/toolIdentity.js.map +1 -0
- package/dist/toolIdentity.mjs +89 -0
- package/dist/toolIdentity.mjs.map +1 -0
- package/dist/tooling.d.ts +24 -0
- package/dist/tooling.js +110 -0
- package/dist/tooling.js.map +1 -0
- package/dist/tooling.mjs +97 -0
- package/dist/tooling.mjs.map +1 -0
- package/dist/types/aliases.d.ts +3 -3
- package/dist/types/protocol.d.ts +417 -12
- package/dist/types/protocol.js +59 -4
- package/dist/types/protocol.js.map +1 -1
- package/dist/types/protocol.mjs +57 -2
- package/dist/types/protocol.mjs.map +1 -1
- package/dist/types/providerData.d.ts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +15 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +2 -0
- package/dist/utils/index.mjs.map +1 -1
- package/dist/utils/serialize.js +37 -6
- package/dist/utils/serialize.js.map +1 -1
- package/dist/utils/serialize.mjs +37 -6
- package/dist/utils/serialize.mjs.map +1 -1
- package/dist/utils/toolSearch.d.ts +1 -0
- package/dist/utils/toolSearch.js +13 -0
- package/dist/utils/toolSearch.js.map +1 -0
- package/dist/utils/toolSearch.mjs +2 -0
- package/dist/utils/toolSearch.mjs.map +1 -0
- package/package.json +2 -2
package/dist/runState.d.ts
CHANGED
|
@@ -10,9 +10,11 @@ import type { ProcessedResponse } from './runner/types';
|
|
|
10
10
|
import type { AgentSpanData, Span } from './tracing/spans';
|
|
11
11
|
import { Usage } from './usage';
|
|
12
12
|
import { Trace } from './tracing/traces';
|
|
13
|
-
import
|
|
13
|
+
import * as protocol from './types/protocol';
|
|
14
|
+
import { AgentInputItem, UnknownContext } from './types';
|
|
14
15
|
import type { InputGuardrailResult, OutputGuardrailResult } from './guardrail';
|
|
15
16
|
import type { ToolInputGuardrailResult, ToolOutputGuardrailResult } from './toolGuardrail';
|
|
17
|
+
import { Tool } from './tool';
|
|
16
18
|
import type { AgentToolInvocation } from './agentToolInvocation';
|
|
17
19
|
/**
|
|
18
20
|
* The schema version of the serialized run state. This is used to ensure that the serialized
|
|
@@ -29,8 +31,11 @@ import type { AgentToolInvocation } from './agentToolInvocation';
|
|
|
29
31
|
* - 1.4: Adds optional toolInput to serialized run context.
|
|
30
32
|
* - 1.5: Adds optional reasoningItemIdPolicy to preserve reasoning input policy across resume.
|
|
31
33
|
* - 1.6: Adds optional requestId to serialized model responses.
|
|
34
|
+
* - 1.7: Adds optional approval rejection messages.
|
|
35
|
+
* - 1.8: Adds tool search item variants, batched computer actions, and GA computer tool
|
|
36
|
+
* aliasing to serialized run state payloads.
|
|
32
37
|
*/
|
|
33
|
-
export declare const CURRENT_SCHEMA_VERSION: "1.
|
|
38
|
+
export declare const CURRENT_SCHEMA_VERSION: "1.8";
|
|
34
39
|
type ContextOverrideStrategy = 'merge' | 'replace';
|
|
35
40
|
declare const serializedSpanBase: z.ZodObject<{
|
|
36
41
|
object: z.ZodLiteral<"trace.span">;
|
|
@@ -57,6 +62,8 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
57
62
|
1.4: "1.4";
|
|
58
63
|
1.5: "1.5";
|
|
59
64
|
1.6: "1.6";
|
|
65
|
+
1.7: "1.7";
|
|
66
|
+
1.8: "1.8";
|
|
60
67
|
}>;
|
|
61
68
|
currentTurn: z.ZodNumber;
|
|
62
69
|
currentAgent: z.ZodObject<{
|
|
@@ -133,6 +140,30 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
133
140
|
type: z.ZodOptional<z.ZodLiteral<"message">>;
|
|
134
141
|
role: z.ZodLiteral<"system">;
|
|
135
142
|
content: z.ZodString;
|
|
143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
144
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
145
|
+
id: z.ZodOptional<z.ZodString>;
|
|
146
|
+
type: z.ZodLiteral<"tool_search_call">;
|
|
147
|
+
call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
148
|
+
callId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
149
|
+
execution: z.ZodOptional<z.ZodEnum<{
|
|
150
|
+
client: "client";
|
|
151
|
+
server: "server";
|
|
152
|
+
}>>;
|
|
153
|
+
arguments: z.ZodUnknown;
|
|
154
|
+
status: z.ZodOptional<z.ZodString>;
|
|
155
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
156
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
157
|
+
id: z.ZodOptional<z.ZodString>;
|
|
158
|
+
type: z.ZodLiteral<"tool_search_output">;
|
|
159
|
+
call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
160
|
+
callId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
161
|
+
execution: z.ZodOptional<z.ZodEnum<{
|
|
162
|
+
client: "client";
|
|
163
|
+
server: "server";
|
|
164
|
+
}>>;
|
|
165
|
+
status: z.ZodOptional<z.ZodString>;
|
|
166
|
+
tools: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
136
167
|
}, z.core.$strip>, z.ZodObject<{
|
|
137
168
|
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
138
169
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -147,6 +178,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
147
178
|
type: z.ZodLiteral<"function_call">;
|
|
148
179
|
callId: z.ZodString;
|
|
149
180
|
name: z.ZodString;
|
|
181
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
150
182
|
status: z.ZodOptional<z.ZodEnum<{
|
|
151
183
|
in_progress: "in_progress";
|
|
152
184
|
completed: "completed";
|
|
@@ -163,7 +195,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
163
195
|
completed: "completed";
|
|
164
196
|
incomplete: "incomplete";
|
|
165
197
|
}>;
|
|
166
|
-
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
198
|
+
action: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
167
199
|
type: z.ZodLiteral<"screenshot">;
|
|
168
200
|
}, z.core.$strip>, z.ZodObject<{
|
|
169
201
|
type: z.ZodLiteral<"click">;
|
|
@@ -204,7 +236,49 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
204
236
|
x: z.ZodNumber;
|
|
205
237
|
y: z.ZodNumber;
|
|
206
238
|
}, z.core.$strip>>;
|
|
207
|
-
}, z.core.$strip>], "type"
|
|
239
|
+
}, z.core.$strip>], "type">>;
|
|
240
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
241
|
+
type: z.ZodLiteral<"screenshot">;
|
|
242
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
243
|
+
type: z.ZodLiteral<"click">;
|
|
244
|
+
x: z.ZodNumber;
|
|
245
|
+
y: z.ZodNumber;
|
|
246
|
+
button: z.ZodEnum<{
|
|
247
|
+
left: "left";
|
|
248
|
+
right: "right";
|
|
249
|
+
wheel: "wheel";
|
|
250
|
+
back: "back";
|
|
251
|
+
forward: "forward";
|
|
252
|
+
}>;
|
|
253
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
254
|
+
type: z.ZodLiteral<"double_click">;
|
|
255
|
+
x: z.ZodNumber;
|
|
256
|
+
y: z.ZodNumber;
|
|
257
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
258
|
+
type: z.ZodLiteral<"scroll">;
|
|
259
|
+
x: z.ZodNumber;
|
|
260
|
+
y: z.ZodNumber;
|
|
261
|
+
scroll_x: z.ZodNumber;
|
|
262
|
+
scroll_y: z.ZodNumber;
|
|
263
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
264
|
+
type: z.ZodLiteral<"type">;
|
|
265
|
+
text: z.ZodString;
|
|
266
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
267
|
+
type: z.ZodLiteral<"wait">;
|
|
268
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
269
|
+
type: z.ZodLiteral<"move">;
|
|
270
|
+
x: z.ZodNumber;
|
|
271
|
+
y: z.ZodNumber;
|
|
272
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
273
|
+
type: z.ZodLiteral<"keypress">;
|
|
274
|
+
keys: z.ZodArray<z.ZodString>;
|
|
275
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
276
|
+
type: z.ZodLiteral<"drag">;
|
|
277
|
+
path: z.ZodArray<z.ZodObject<{
|
|
278
|
+
x: z.ZodNumber;
|
|
279
|
+
y: z.ZodNumber;
|
|
280
|
+
}, z.core.$strip>>;
|
|
281
|
+
}, z.core.$strip>], "type">>>;
|
|
208
282
|
}, z.core.$strip>, z.ZodObject<{
|
|
209
283
|
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
210
284
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -246,6 +320,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
246
320
|
id: z.ZodOptional<z.ZodString>;
|
|
247
321
|
type: z.ZodLiteral<"function_call_result">;
|
|
248
322
|
name: z.ZodString;
|
|
323
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
249
324
|
callId: z.ZodString;
|
|
250
325
|
status: z.ZodEnum<{
|
|
251
326
|
in_progress: "in_progress";
|
|
@@ -412,6 +487,30 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
412
487
|
type: z.ZodLiteral<"image">;
|
|
413
488
|
image: z.ZodString;
|
|
414
489
|
}, z.core.$strip>], "type">>;
|
|
490
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
491
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
492
|
+
id: z.ZodOptional<z.ZodString>;
|
|
493
|
+
type: z.ZodLiteral<"tool_search_call">;
|
|
494
|
+
call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
495
|
+
callId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
496
|
+
execution: z.ZodOptional<z.ZodEnum<{
|
|
497
|
+
client: "client";
|
|
498
|
+
server: "server";
|
|
499
|
+
}>>;
|
|
500
|
+
arguments: z.ZodUnknown;
|
|
501
|
+
status: z.ZodOptional<z.ZodString>;
|
|
502
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
503
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
504
|
+
id: z.ZodOptional<z.ZodString>;
|
|
505
|
+
type: z.ZodLiteral<"tool_search_output">;
|
|
506
|
+
call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
507
|
+
callId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
508
|
+
execution: z.ZodOptional<z.ZodEnum<{
|
|
509
|
+
client: "client";
|
|
510
|
+
server: "server";
|
|
511
|
+
}>>;
|
|
512
|
+
status: z.ZodOptional<z.ZodString>;
|
|
513
|
+
tools: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
415
514
|
}, z.core.$strip>, z.ZodObject<{
|
|
416
515
|
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
417
516
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -426,6 +525,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
426
525
|
type: z.ZodLiteral<"function_call">;
|
|
427
526
|
callId: z.ZodString;
|
|
428
527
|
name: z.ZodString;
|
|
528
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
429
529
|
status: z.ZodOptional<z.ZodEnum<{
|
|
430
530
|
in_progress: "in_progress";
|
|
431
531
|
completed: "completed";
|
|
@@ -442,7 +542,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
442
542
|
completed: "completed";
|
|
443
543
|
incomplete: "incomplete";
|
|
444
544
|
}>;
|
|
445
|
-
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
545
|
+
action: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
446
546
|
type: z.ZodLiteral<"screenshot">;
|
|
447
547
|
}, z.core.$strip>, z.ZodObject<{
|
|
448
548
|
type: z.ZodLiteral<"click">;
|
|
@@ -483,7 +583,49 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
483
583
|
x: z.ZodNumber;
|
|
484
584
|
y: z.ZodNumber;
|
|
485
585
|
}, z.core.$strip>>;
|
|
486
|
-
}, z.core.$strip>], "type"
|
|
586
|
+
}, z.core.$strip>], "type">>;
|
|
587
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
588
|
+
type: z.ZodLiteral<"screenshot">;
|
|
589
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
590
|
+
type: z.ZodLiteral<"click">;
|
|
591
|
+
x: z.ZodNumber;
|
|
592
|
+
y: z.ZodNumber;
|
|
593
|
+
button: z.ZodEnum<{
|
|
594
|
+
left: "left";
|
|
595
|
+
right: "right";
|
|
596
|
+
wheel: "wheel";
|
|
597
|
+
back: "back";
|
|
598
|
+
forward: "forward";
|
|
599
|
+
}>;
|
|
600
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
601
|
+
type: z.ZodLiteral<"double_click">;
|
|
602
|
+
x: z.ZodNumber;
|
|
603
|
+
y: z.ZodNumber;
|
|
604
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
605
|
+
type: z.ZodLiteral<"scroll">;
|
|
606
|
+
x: z.ZodNumber;
|
|
607
|
+
y: z.ZodNumber;
|
|
608
|
+
scroll_x: z.ZodNumber;
|
|
609
|
+
scroll_y: z.ZodNumber;
|
|
610
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
611
|
+
type: z.ZodLiteral<"type">;
|
|
612
|
+
text: z.ZodString;
|
|
613
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
614
|
+
type: z.ZodLiteral<"wait">;
|
|
615
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
616
|
+
type: z.ZodLiteral<"move">;
|
|
617
|
+
x: z.ZodNumber;
|
|
618
|
+
y: z.ZodNumber;
|
|
619
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
620
|
+
type: z.ZodLiteral<"keypress">;
|
|
621
|
+
keys: z.ZodArray<z.ZodString>;
|
|
622
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
623
|
+
type: z.ZodLiteral<"drag">;
|
|
624
|
+
path: z.ZodArray<z.ZodObject<{
|
|
625
|
+
x: z.ZodNumber;
|
|
626
|
+
y: z.ZodNumber;
|
|
627
|
+
}, z.core.$strip>>;
|
|
628
|
+
}, z.core.$strip>], "type">>>;
|
|
487
629
|
}, z.core.$strip>, z.ZodObject<{
|
|
488
630
|
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
489
631
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -525,6 +667,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
525
667
|
id: z.ZodOptional<z.ZodString>;
|
|
526
668
|
type: z.ZodLiteral<"function_call_result">;
|
|
527
669
|
name: z.ZodString;
|
|
670
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
528
671
|
callId: z.ZodString;
|
|
529
672
|
status: z.ZodEnum<{
|
|
530
673
|
in_progress: "in_progress";
|
|
@@ -657,6 +800,8 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
657
800
|
approvals: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
658
801
|
approved: z.ZodUnion<[z.ZodArray<z.ZodString>, z.ZodBoolean]>;
|
|
659
802
|
rejected: z.ZodUnion<[z.ZodArray<z.ZodString>, z.ZodBoolean]>;
|
|
803
|
+
messages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
804
|
+
stickyRejectMessage: z.ZodOptional<z.ZodString>;
|
|
660
805
|
}, z.core.$strip>>;
|
|
661
806
|
context: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
662
807
|
toolInput: z.ZodOptional<z.ZodAny>;
|
|
@@ -784,6 +929,30 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
784
929
|
type: z.ZodLiteral<"image">;
|
|
785
930
|
image: z.ZodString;
|
|
786
931
|
}, z.core.$strip>], "type">>;
|
|
932
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
933
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
934
|
+
id: z.ZodOptional<z.ZodString>;
|
|
935
|
+
type: z.ZodLiteral<"tool_search_call">;
|
|
936
|
+
call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
937
|
+
callId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
938
|
+
execution: z.ZodOptional<z.ZodEnum<{
|
|
939
|
+
client: "client";
|
|
940
|
+
server: "server";
|
|
941
|
+
}>>;
|
|
942
|
+
arguments: z.ZodUnknown;
|
|
943
|
+
status: z.ZodOptional<z.ZodString>;
|
|
944
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
945
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
946
|
+
id: z.ZodOptional<z.ZodString>;
|
|
947
|
+
type: z.ZodLiteral<"tool_search_output">;
|
|
948
|
+
call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
949
|
+
callId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
950
|
+
execution: z.ZodOptional<z.ZodEnum<{
|
|
951
|
+
client: "client";
|
|
952
|
+
server: "server";
|
|
953
|
+
}>>;
|
|
954
|
+
status: z.ZodOptional<z.ZodString>;
|
|
955
|
+
tools: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
787
956
|
}, z.core.$strip>, z.ZodObject<{
|
|
788
957
|
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
789
958
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -798,6 +967,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
798
967
|
type: z.ZodLiteral<"function_call">;
|
|
799
968
|
callId: z.ZodString;
|
|
800
969
|
name: z.ZodString;
|
|
970
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
801
971
|
status: z.ZodOptional<z.ZodEnum<{
|
|
802
972
|
in_progress: "in_progress";
|
|
803
973
|
completed: "completed";
|
|
@@ -814,7 +984,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
814
984
|
completed: "completed";
|
|
815
985
|
incomplete: "incomplete";
|
|
816
986
|
}>;
|
|
817
|
-
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
987
|
+
action: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
818
988
|
type: z.ZodLiteral<"screenshot">;
|
|
819
989
|
}, z.core.$strip>, z.ZodObject<{
|
|
820
990
|
type: z.ZodLiteral<"click">;
|
|
@@ -855,7 +1025,49 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
855
1025
|
x: z.ZodNumber;
|
|
856
1026
|
y: z.ZodNumber;
|
|
857
1027
|
}, z.core.$strip>>;
|
|
858
|
-
}, z.core.$strip>], "type"
|
|
1028
|
+
}, z.core.$strip>], "type">>;
|
|
1029
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1030
|
+
type: z.ZodLiteral<"screenshot">;
|
|
1031
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1032
|
+
type: z.ZodLiteral<"click">;
|
|
1033
|
+
x: z.ZodNumber;
|
|
1034
|
+
y: z.ZodNumber;
|
|
1035
|
+
button: z.ZodEnum<{
|
|
1036
|
+
left: "left";
|
|
1037
|
+
right: "right";
|
|
1038
|
+
wheel: "wheel";
|
|
1039
|
+
back: "back";
|
|
1040
|
+
forward: "forward";
|
|
1041
|
+
}>;
|
|
1042
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1043
|
+
type: z.ZodLiteral<"double_click">;
|
|
1044
|
+
x: z.ZodNumber;
|
|
1045
|
+
y: z.ZodNumber;
|
|
1046
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1047
|
+
type: z.ZodLiteral<"scroll">;
|
|
1048
|
+
x: z.ZodNumber;
|
|
1049
|
+
y: z.ZodNumber;
|
|
1050
|
+
scroll_x: z.ZodNumber;
|
|
1051
|
+
scroll_y: z.ZodNumber;
|
|
1052
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1053
|
+
type: z.ZodLiteral<"type">;
|
|
1054
|
+
text: z.ZodString;
|
|
1055
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1056
|
+
type: z.ZodLiteral<"wait">;
|
|
1057
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1058
|
+
type: z.ZodLiteral<"move">;
|
|
1059
|
+
x: z.ZodNumber;
|
|
1060
|
+
y: z.ZodNumber;
|
|
1061
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1062
|
+
type: z.ZodLiteral<"keypress">;
|
|
1063
|
+
keys: z.ZodArray<z.ZodString>;
|
|
1064
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1065
|
+
type: z.ZodLiteral<"drag">;
|
|
1066
|
+
path: z.ZodArray<z.ZodObject<{
|
|
1067
|
+
x: z.ZodNumber;
|
|
1068
|
+
y: z.ZodNumber;
|
|
1069
|
+
}, z.core.$strip>>;
|
|
1070
|
+
}, z.core.$strip>], "type">>>;
|
|
859
1071
|
}, z.core.$strip>, z.ZodObject<{
|
|
860
1072
|
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
861
1073
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -897,6 +1109,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
897
1109
|
id: z.ZodOptional<z.ZodString>;
|
|
898
1110
|
type: z.ZodLiteral<"function_call_result">;
|
|
899
1111
|
name: z.ZodString;
|
|
1112
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
900
1113
|
callId: z.ZodString;
|
|
901
1114
|
status: z.ZodEnum<{
|
|
902
1115
|
in_progress: "in_progress";
|
|
@@ -1046,6 +1259,42 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1046
1259
|
agent: z.ZodObject<{
|
|
1047
1260
|
name: z.ZodString;
|
|
1048
1261
|
}, z.core.$strip>;
|
|
1262
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1263
|
+
type: z.ZodLiteral<"tool_search_call_item">;
|
|
1264
|
+
rawItem: z.ZodObject<{
|
|
1265
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1266
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1267
|
+
type: z.ZodLiteral<"tool_search_call">;
|
|
1268
|
+
call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1269
|
+
callId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1270
|
+
execution: z.ZodOptional<z.ZodEnum<{
|
|
1271
|
+
client: "client";
|
|
1272
|
+
server: "server";
|
|
1273
|
+
}>>;
|
|
1274
|
+
arguments: z.ZodUnknown;
|
|
1275
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1276
|
+
}, z.core.$strip>;
|
|
1277
|
+
agent: z.ZodObject<{
|
|
1278
|
+
name: z.ZodString;
|
|
1279
|
+
}, z.core.$strip>;
|
|
1280
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1281
|
+
type: z.ZodLiteral<"tool_search_output_item">;
|
|
1282
|
+
rawItem: z.ZodObject<{
|
|
1283
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1284
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1285
|
+
type: z.ZodLiteral<"tool_search_output">;
|
|
1286
|
+
call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1287
|
+
callId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1288
|
+
execution: z.ZodOptional<z.ZodEnum<{
|
|
1289
|
+
client: "client";
|
|
1290
|
+
server: "server";
|
|
1291
|
+
}>>;
|
|
1292
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1293
|
+
tools: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1294
|
+
}, z.core.$strip>;
|
|
1295
|
+
agent: z.ZodObject<{
|
|
1296
|
+
name: z.ZodString;
|
|
1297
|
+
}, z.core.$strip>;
|
|
1049
1298
|
}, z.core.$strip>, z.ZodObject<{
|
|
1050
1299
|
type: z.ZodLiteral<"tool_call_item">;
|
|
1051
1300
|
rawItem: z.ZodUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1058,7 +1307,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1058
1307
|
completed: "completed";
|
|
1059
1308
|
incomplete: "incomplete";
|
|
1060
1309
|
}>;
|
|
1061
|
-
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1310
|
+
action: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1062
1311
|
type: z.ZodLiteral<"screenshot">;
|
|
1063
1312
|
}, z.core.$strip>, z.ZodObject<{
|
|
1064
1313
|
type: z.ZodLiteral<"click">;
|
|
@@ -1099,7 +1348,49 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1099
1348
|
x: z.ZodNumber;
|
|
1100
1349
|
y: z.ZodNumber;
|
|
1101
1350
|
}, z.core.$strip>>;
|
|
1102
|
-
}, z.core.$strip>], "type"
|
|
1351
|
+
}, z.core.$strip>], "type">>;
|
|
1352
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1353
|
+
type: z.ZodLiteral<"screenshot">;
|
|
1354
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1355
|
+
type: z.ZodLiteral<"click">;
|
|
1356
|
+
x: z.ZodNumber;
|
|
1357
|
+
y: z.ZodNumber;
|
|
1358
|
+
button: z.ZodEnum<{
|
|
1359
|
+
left: "left";
|
|
1360
|
+
right: "right";
|
|
1361
|
+
wheel: "wheel";
|
|
1362
|
+
back: "back";
|
|
1363
|
+
forward: "forward";
|
|
1364
|
+
}>;
|
|
1365
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1366
|
+
type: z.ZodLiteral<"double_click">;
|
|
1367
|
+
x: z.ZodNumber;
|
|
1368
|
+
y: z.ZodNumber;
|
|
1369
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1370
|
+
type: z.ZodLiteral<"scroll">;
|
|
1371
|
+
x: z.ZodNumber;
|
|
1372
|
+
y: z.ZodNumber;
|
|
1373
|
+
scroll_x: z.ZodNumber;
|
|
1374
|
+
scroll_y: z.ZodNumber;
|
|
1375
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1376
|
+
type: z.ZodLiteral<"type">;
|
|
1377
|
+
text: z.ZodString;
|
|
1378
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1379
|
+
type: z.ZodLiteral<"wait">;
|
|
1380
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1381
|
+
type: z.ZodLiteral<"move">;
|
|
1382
|
+
x: z.ZodNumber;
|
|
1383
|
+
y: z.ZodNumber;
|
|
1384
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1385
|
+
type: z.ZodLiteral<"keypress">;
|
|
1386
|
+
keys: z.ZodArray<z.ZodString>;
|
|
1387
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1388
|
+
type: z.ZodLiteral<"drag">;
|
|
1389
|
+
path: z.ZodArray<z.ZodObject<{
|
|
1390
|
+
x: z.ZodNumber;
|
|
1391
|
+
y: z.ZodNumber;
|
|
1392
|
+
}, z.core.$strip>>;
|
|
1393
|
+
}, z.core.$strip>], "type">>>;
|
|
1103
1394
|
}, z.core.$strip>, z.ZodObject<{
|
|
1104
1395
|
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1105
1396
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -1142,6 +1433,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1142
1433
|
type: z.ZodLiteral<"function_call">;
|
|
1143
1434
|
callId: z.ZodString;
|
|
1144
1435
|
name: z.ZodString;
|
|
1436
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
1145
1437
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1146
1438
|
in_progress: "in_progress";
|
|
1147
1439
|
completed: "completed";
|
|
@@ -1175,6 +1467,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1175
1467
|
id: z.ZodOptional<z.ZodString>;
|
|
1176
1468
|
type: z.ZodLiteral<"function_call_result">;
|
|
1177
1469
|
name: z.ZodString;
|
|
1470
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
1178
1471
|
callId: z.ZodString;
|
|
1179
1472
|
status: z.ZodEnum<{
|
|
1180
1473
|
in_progress: "in_progress";
|
|
@@ -1301,6 +1594,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1301
1594
|
type: z.ZodLiteral<"function_call">;
|
|
1302
1595
|
callId: z.ZodString;
|
|
1303
1596
|
name: z.ZodString;
|
|
1597
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
1304
1598
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1305
1599
|
in_progress: "in_progress";
|
|
1306
1600
|
completed: "completed";
|
|
@@ -1318,6 +1612,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1318
1612
|
id: z.ZodOptional<z.ZodString>;
|
|
1319
1613
|
type: z.ZodLiteral<"function_call_result">;
|
|
1320
1614
|
name: z.ZodString;
|
|
1615
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
1321
1616
|
callId: z.ZodString;
|
|
1322
1617
|
status: z.ZodEnum<{
|
|
1323
1618
|
in_progress: "in_progress";
|
|
@@ -1390,6 +1685,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1390
1685
|
type: z.ZodLiteral<"function_call">;
|
|
1391
1686
|
callId: z.ZodString;
|
|
1392
1687
|
name: z.ZodString;
|
|
1688
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
1393
1689
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1394
1690
|
in_progress: "in_progress";
|
|
1395
1691
|
completed: "completed";
|
|
@@ -1414,7 +1710,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1414
1710
|
completed: "completed";
|
|
1415
1711
|
incomplete: "incomplete";
|
|
1416
1712
|
}>;
|
|
1417
|
-
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1713
|
+
action: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1418
1714
|
type: z.ZodLiteral<"screenshot">;
|
|
1419
1715
|
}, z.core.$strip>, z.ZodObject<{
|
|
1420
1716
|
type: z.ZodLiteral<"click">;
|
|
@@ -1455,7 +1751,49 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1455
1751
|
x: z.ZodNumber;
|
|
1456
1752
|
y: z.ZodNumber;
|
|
1457
1753
|
}, z.core.$strip>>;
|
|
1458
|
-
}, z.core.$strip>], "type"
|
|
1754
|
+
}, z.core.$strip>], "type">>;
|
|
1755
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1756
|
+
type: z.ZodLiteral<"screenshot">;
|
|
1757
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1758
|
+
type: z.ZodLiteral<"click">;
|
|
1759
|
+
x: z.ZodNumber;
|
|
1760
|
+
y: z.ZodNumber;
|
|
1761
|
+
button: z.ZodEnum<{
|
|
1762
|
+
left: "left";
|
|
1763
|
+
right: "right";
|
|
1764
|
+
wheel: "wheel";
|
|
1765
|
+
back: "back";
|
|
1766
|
+
forward: "forward";
|
|
1767
|
+
}>;
|
|
1768
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1769
|
+
type: z.ZodLiteral<"double_click">;
|
|
1770
|
+
x: z.ZodNumber;
|
|
1771
|
+
y: z.ZodNumber;
|
|
1772
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1773
|
+
type: z.ZodLiteral<"scroll">;
|
|
1774
|
+
x: z.ZodNumber;
|
|
1775
|
+
y: z.ZodNumber;
|
|
1776
|
+
scroll_x: z.ZodNumber;
|
|
1777
|
+
scroll_y: z.ZodNumber;
|
|
1778
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1779
|
+
type: z.ZodLiteral<"type">;
|
|
1780
|
+
text: z.ZodString;
|
|
1781
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1782
|
+
type: z.ZodLiteral<"wait">;
|
|
1783
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1784
|
+
type: z.ZodLiteral<"move">;
|
|
1785
|
+
x: z.ZodNumber;
|
|
1786
|
+
y: z.ZodNumber;
|
|
1787
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1788
|
+
type: z.ZodLiteral<"keypress">;
|
|
1789
|
+
keys: z.ZodArray<z.ZodString>;
|
|
1790
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1791
|
+
type: z.ZodLiteral<"drag">;
|
|
1792
|
+
path: z.ZodArray<z.ZodObject<{
|
|
1793
|
+
x: z.ZodNumber;
|
|
1794
|
+
y: z.ZodNumber;
|
|
1795
|
+
}, z.core.$strip>>;
|
|
1796
|
+
}, z.core.$strip>], "type">>>;
|
|
1459
1797
|
}, z.core.$strip>]>, z.ZodObject<{
|
|
1460
1798
|
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1461
1799
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -1537,6 +1875,42 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1537
1875
|
agent: z.ZodObject<{
|
|
1538
1876
|
name: z.ZodString;
|
|
1539
1877
|
}, z.core.$strip>;
|
|
1878
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1879
|
+
type: z.ZodLiteral<"tool_search_call_item">;
|
|
1880
|
+
rawItem: z.ZodObject<{
|
|
1881
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1882
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1883
|
+
type: z.ZodLiteral<"tool_search_call">;
|
|
1884
|
+
call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1885
|
+
callId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1886
|
+
execution: z.ZodOptional<z.ZodEnum<{
|
|
1887
|
+
client: "client";
|
|
1888
|
+
server: "server";
|
|
1889
|
+
}>>;
|
|
1890
|
+
arguments: z.ZodUnknown;
|
|
1891
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1892
|
+
}, z.core.$strip>;
|
|
1893
|
+
agent: z.ZodObject<{
|
|
1894
|
+
name: z.ZodString;
|
|
1895
|
+
}, z.core.$strip>;
|
|
1896
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1897
|
+
type: z.ZodLiteral<"tool_search_output_item">;
|
|
1898
|
+
rawItem: z.ZodObject<{
|
|
1899
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1900
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1901
|
+
type: z.ZodLiteral<"tool_search_output">;
|
|
1902
|
+
call_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1903
|
+
callId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1904
|
+
execution: z.ZodOptional<z.ZodEnum<{
|
|
1905
|
+
client: "client";
|
|
1906
|
+
server: "server";
|
|
1907
|
+
}>>;
|
|
1908
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1909
|
+
tools: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1910
|
+
}, z.core.$strip>;
|
|
1911
|
+
agent: z.ZodObject<{
|
|
1912
|
+
name: z.ZodString;
|
|
1913
|
+
}, z.core.$strip>;
|
|
1540
1914
|
}, z.core.$strip>, z.ZodObject<{
|
|
1541
1915
|
type: z.ZodLiteral<"tool_call_item">;
|
|
1542
1916
|
rawItem: z.ZodUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1549,7 +1923,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1549
1923
|
completed: "completed";
|
|
1550
1924
|
incomplete: "incomplete";
|
|
1551
1925
|
}>;
|
|
1552
|
-
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1926
|
+
action: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1553
1927
|
type: z.ZodLiteral<"screenshot">;
|
|
1554
1928
|
}, z.core.$strip>, z.ZodObject<{
|
|
1555
1929
|
type: z.ZodLiteral<"click">;
|
|
@@ -1590,7 +1964,49 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1590
1964
|
x: z.ZodNumber;
|
|
1591
1965
|
y: z.ZodNumber;
|
|
1592
1966
|
}, z.core.$strip>>;
|
|
1593
|
-
}, z.core.$strip>], "type"
|
|
1967
|
+
}, z.core.$strip>], "type">>;
|
|
1968
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1969
|
+
type: z.ZodLiteral<"screenshot">;
|
|
1970
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1971
|
+
type: z.ZodLiteral<"click">;
|
|
1972
|
+
x: z.ZodNumber;
|
|
1973
|
+
y: z.ZodNumber;
|
|
1974
|
+
button: z.ZodEnum<{
|
|
1975
|
+
left: "left";
|
|
1976
|
+
right: "right";
|
|
1977
|
+
wheel: "wheel";
|
|
1978
|
+
back: "back";
|
|
1979
|
+
forward: "forward";
|
|
1980
|
+
}>;
|
|
1981
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1982
|
+
type: z.ZodLiteral<"double_click">;
|
|
1983
|
+
x: z.ZodNumber;
|
|
1984
|
+
y: z.ZodNumber;
|
|
1985
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1986
|
+
type: z.ZodLiteral<"scroll">;
|
|
1987
|
+
x: z.ZodNumber;
|
|
1988
|
+
y: z.ZodNumber;
|
|
1989
|
+
scroll_x: z.ZodNumber;
|
|
1990
|
+
scroll_y: z.ZodNumber;
|
|
1991
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1992
|
+
type: z.ZodLiteral<"type">;
|
|
1993
|
+
text: z.ZodString;
|
|
1994
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1995
|
+
type: z.ZodLiteral<"wait">;
|
|
1996
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1997
|
+
type: z.ZodLiteral<"move">;
|
|
1998
|
+
x: z.ZodNumber;
|
|
1999
|
+
y: z.ZodNumber;
|
|
2000
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2001
|
+
type: z.ZodLiteral<"keypress">;
|
|
2002
|
+
keys: z.ZodArray<z.ZodString>;
|
|
2003
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2004
|
+
type: z.ZodLiteral<"drag">;
|
|
2005
|
+
path: z.ZodArray<z.ZodObject<{
|
|
2006
|
+
x: z.ZodNumber;
|
|
2007
|
+
y: z.ZodNumber;
|
|
2008
|
+
}, z.core.$strip>>;
|
|
2009
|
+
}, z.core.$strip>], "type">>>;
|
|
1594
2010
|
}, z.core.$strip>, z.ZodObject<{
|
|
1595
2011
|
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1596
2012
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -1633,6 +2049,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1633
2049
|
type: z.ZodLiteral<"function_call">;
|
|
1634
2050
|
callId: z.ZodString;
|
|
1635
2051
|
name: z.ZodString;
|
|
2052
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
1636
2053
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1637
2054
|
in_progress: "in_progress";
|
|
1638
2055
|
completed: "completed";
|
|
@@ -1666,6 +2083,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1666
2083
|
id: z.ZodOptional<z.ZodString>;
|
|
1667
2084
|
type: z.ZodLiteral<"function_call_result">;
|
|
1668
2085
|
name: z.ZodString;
|
|
2086
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
1669
2087
|
callId: z.ZodString;
|
|
1670
2088
|
status: z.ZodEnum<{
|
|
1671
2089
|
in_progress: "in_progress";
|
|
@@ -1792,6 +2210,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1792
2210
|
type: z.ZodLiteral<"function_call">;
|
|
1793
2211
|
callId: z.ZodString;
|
|
1794
2212
|
name: z.ZodString;
|
|
2213
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
1795
2214
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1796
2215
|
in_progress: "in_progress";
|
|
1797
2216
|
completed: "completed";
|
|
@@ -1809,6 +2228,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1809
2228
|
id: z.ZodOptional<z.ZodString>;
|
|
1810
2229
|
type: z.ZodLiteral<"function_call_result">;
|
|
1811
2230
|
name: z.ZodString;
|
|
2231
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
1812
2232
|
callId: z.ZodString;
|
|
1813
2233
|
status: z.ZodEnum<{
|
|
1814
2234
|
in_progress: "in_progress";
|
|
@@ -1881,6 +2301,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1881
2301
|
type: z.ZodLiteral<"function_call">;
|
|
1882
2302
|
callId: z.ZodString;
|
|
1883
2303
|
name: z.ZodString;
|
|
2304
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
1884
2305
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1885
2306
|
in_progress: "in_progress";
|
|
1886
2307
|
completed: "completed";
|
|
@@ -1905,7 +2326,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1905
2326
|
completed: "completed";
|
|
1906
2327
|
incomplete: "incomplete";
|
|
1907
2328
|
}>;
|
|
1908
|
-
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2329
|
+
action: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1909
2330
|
type: z.ZodLiteral<"screenshot">;
|
|
1910
2331
|
}, z.core.$strip>, z.ZodObject<{
|
|
1911
2332
|
type: z.ZodLiteral<"click">;
|
|
@@ -1946,7 +2367,49 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1946
2367
|
x: z.ZodNumber;
|
|
1947
2368
|
y: z.ZodNumber;
|
|
1948
2369
|
}, z.core.$strip>>;
|
|
1949
|
-
}, z.core.$strip>], "type"
|
|
2370
|
+
}, z.core.$strip>], "type">>;
|
|
2371
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2372
|
+
type: z.ZodLiteral<"screenshot">;
|
|
2373
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2374
|
+
type: z.ZodLiteral<"click">;
|
|
2375
|
+
x: z.ZodNumber;
|
|
2376
|
+
y: z.ZodNumber;
|
|
2377
|
+
button: z.ZodEnum<{
|
|
2378
|
+
left: "left";
|
|
2379
|
+
right: "right";
|
|
2380
|
+
wheel: "wheel";
|
|
2381
|
+
back: "back";
|
|
2382
|
+
forward: "forward";
|
|
2383
|
+
}>;
|
|
2384
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2385
|
+
type: z.ZodLiteral<"double_click">;
|
|
2386
|
+
x: z.ZodNumber;
|
|
2387
|
+
y: z.ZodNumber;
|
|
2388
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2389
|
+
type: z.ZodLiteral<"scroll">;
|
|
2390
|
+
x: z.ZodNumber;
|
|
2391
|
+
y: z.ZodNumber;
|
|
2392
|
+
scroll_x: z.ZodNumber;
|
|
2393
|
+
scroll_y: z.ZodNumber;
|
|
2394
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2395
|
+
type: z.ZodLiteral<"type">;
|
|
2396
|
+
text: z.ZodString;
|
|
2397
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2398
|
+
type: z.ZodLiteral<"wait">;
|
|
2399
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2400
|
+
type: z.ZodLiteral<"move">;
|
|
2401
|
+
x: z.ZodNumber;
|
|
2402
|
+
y: z.ZodNumber;
|
|
2403
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2404
|
+
type: z.ZodLiteral<"keypress">;
|
|
2405
|
+
keys: z.ZodArray<z.ZodString>;
|
|
2406
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2407
|
+
type: z.ZodLiteral<"drag">;
|
|
2408
|
+
path: z.ZodArray<z.ZodObject<{
|
|
2409
|
+
x: z.ZodNumber;
|
|
2410
|
+
y: z.ZodNumber;
|
|
2411
|
+
}, z.core.$strip>>;
|
|
2412
|
+
}, z.core.$strip>], "type">>>;
|
|
1950
2413
|
}, z.core.$strip>]>, z.ZodObject<{
|
|
1951
2414
|
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1952
2415
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -2045,6 +2508,15 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
2045
2508
|
}, z.core.$strip>>;
|
|
2046
2509
|
}, z.core.$strip>;
|
|
2047
2510
|
export type FinalOutputSource = 'error_handler' | 'turn_resolution';
|
|
2511
|
+
type ToolSearchRuntimeToolEntry<TContext = UnknownContext> = {
|
|
2512
|
+
order: number;
|
|
2513
|
+
tools: Tool<TContext>[];
|
|
2514
|
+
};
|
|
2515
|
+
type ToolSearchRuntimeToolState<TContext = UnknownContext> = {
|
|
2516
|
+
anonymousEntries: ToolSearchRuntimeToolEntry<TContext>[];
|
|
2517
|
+
keyedEntries: Map<string, ToolSearchRuntimeToolEntry<TContext>>;
|
|
2518
|
+
nextOrder: number;
|
|
2519
|
+
};
|
|
2048
2520
|
/**
|
|
2049
2521
|
* Serializable snapshot of an agent's run, including context, usage and trace.
|
|
2050
2522
|
* While this class has publicly writable properties (prefixed with `_`), they are not meant to be
|
|
@@ -2175,6 +2647,11 @@ export declare class RunState<TContext, TAgent extends Agent<any, any>> {
|
|
|
2175
2647
|
* Trace associated with this run if tracing is enabled.
|
|
2176
2648
|
*/
|
|
2177
2649
|
_trace: Trace | null;
|
|
2650
|
+
/**
|
|
2651
|
+
* Runtime-only tool_search-loaded tools, scoped by agent name and preserved across turns for
|
|
2652
|
+
* the lifetime of this in-memory run.
|
|
2653
|
+
*/
|
|
2654
|
+
_toolSearchRuntimeToolsByAgentName: Map<string, ToolSearchRuntimeToolState<TContext>>;
|
|
2178
2655
|
constructor(context: RunContext<TContext>, originalInput: string | AgentInputItem[], startingAgent: TAgent, maxTurns: number);
|
|
2179
2656
|
/**
|
|
2180
2657
|
* Updates server-managed conversation identifiers as a single operation.
|
|
@@ -2188,6 +2665,9 @@ export declare class RunState<TContext, TAgent extends Agent<any, any>> {
|
|
|
2188
2665
|
* Updates the agent span associated with the current run.
|
|
2189
2666
|
*/
|
|
2190
2667
|
setCurrentAgentSpan(span?: Span<AgentSpanData>): void;
|
|
2668
|
+
private getOrCreateToolSearchRuntimeToolState;
|
|
2669
|
+
recordToolSearchRuntimeTools(agent: Agent<any, any>, toolSearchOutput: protocol.ToolSearchOutputItem, tools: Tool<TContext>[]): void;
|
|
2670
|
+
getToolSearchRuntimeTools(agent: Agent<any, any>): Tool<TContext>[];
|
|
2191
2671
|
/**
|
|
2192
2672
|
* Switches the active agent handling the run.
|
|
2193
2673
|
*/
|
|
@@ -2230,6 +2710,7 @@ export declare class RunState<TContext, TAgent extends Agent<any, any>> {
|
|
|
2230
2710
|
*
|
|
2231
2711
|
* @param approvalItem - The tool call approval item to approve.
|
|
2232
2712
|
* @param options - Options for the approval.
|
|
2713
|
+
* @param options.alwaysApprove - Approve this tool for all future calls in this run.
|
|
2233
2714
|
*/
|
|
2234
2715
|
approve(approvalItem: RunToolApprovalItem, options?: {
|
|
2235
2716
|
alwaysApprove?: boolean;
|
|
@@ -2240,14 +2721,21 @@ export declare class RunState<TContext, TAgent extends Agent<any, any>> {
|
|
|
2240
2721
|
* To reject the request use this method and then run the agent again with the same state object
|
|
2241
2722
|
* to continue the execution.
|
|
2242
2723
|
*
|
|
2243
|
-
* By default it will only reject the current tool call. To
|
|
2244
|
-
*
|
|
2724
|
+
* By default it will only reject the current tool call. To reject the tool for all future
|
|
2725
|
+
* calls throughout the run, set the `alwaysReject` option to `true`.
|
|
2726
|
+
*
|
|
2727
|
+
* When `message` is provided, it is used as the rejection text sent to the model.
|
|
2728
|
+
* Otherwise, `toolErrorFormatter` (if configured) or the SDK default is used.
|
|
2245
2729
|
*
|
|
2246
2730
|
* @param approvalItem - The tool call approval item to reject.
|
|
2247
2731
|
* @param options - Options for the rejection.
|
|
2732
|
+
* @param options.alwaysReject - Reject this tool for all future calls in this run.
|
|
2733
|
+
* @param options.message - The rejection text sent to the model.
|
|
2734
|
+
* If not provided, `toolErrorFormatter` (if configured) or the SDK default is used.
|
|
2248
2735
|
*/
|
|
2249
2736
|
reject(approvalItem: RunToolApprovalItem, options?: {
|
|
2250
2737
|
alwaysReject?: boolean;
|
|
2738
|
+
message?: string;
|
|
2251
2739
|
}): void;
|
|
2252
2740
|
/**
|
|
2253
2741
|
* Serializes the run state to a JSON object.
|