@openai/agents-core 0.0.15 → 0.0.17

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.
Files changed (138) hide show
  1. package/dist/agent.d.ts +1 -1
  2. package/dist/agent.js +34 -22
  3. package/dist/agent.js.map +1 -1
  4. package/dist/agent.mjs +6 -1
  5. package/dist/agent.mjs.map +1 -1
  6. package/dist/computer.js +2 -1
  7. package/dist/config.js +12 -6
  8. package/dist/config.js.map +1 -1
  9. package/dist/errors.js +21 -9
  10. package/dist/errors.js.map +1 -1
  11. package/dist/events.js +9 -3
  12. package/dist/events.js.map +1 -1
  13. package/dist/extensions/handoffFilters.js +9 -6
  14. package/dist/extensions/handoffFilters.js.map +1 -1
  15. package/dist/extensions/handoffPrompt.js +7 -3
  16. package/dist/extensions/handoffPrompt.js.map +1 -1
  17. package/dist/extensions/index.js +8 -2
  18. package/dist/extensions/index.js.map +1 -1
  19. package/dist/guardrail.js +6 -2
  20. package/dist/guardrail.js.map +1 -1
  21. package/dist/handoff.js +28 -18
  22. package/dist/handoff.js.map +1 -1
  23. package/dist/helpers/message.js +8 -3
  24. package/dist/helpers/message.js.map +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +121 -25
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.mjs +1 -1
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/items.d.ts +0 -32
  31. package/dist/items.js +23 -11
  32. package/dist/items.js.map +1 -1
  33. package/dist/lifecycle.js +12 -6
  34. package/dist/lifecycle.js.map +1 -1
  35. package/dist/logger.js +15 -8
  36. package/dist/logger.js.map +1 -1
  37. package/dist/mcp.d.ts +14 -7
  38. package/dist/mcp.js +119 -96
  39. package/dist/mcp.js.map +1 -1
  40. package/dist/mcp.mjs +65 -57
  41. package/dist/mcp.mjs.map +1 -1
  42. package/dist/mcpUtil.js +4 -1
  43. package/dist/mcpUtil.js.map +1 -1
  44. package/dist/metadata.d.ts +0 -1
  45. package/dist/metadata.js +7 -5
  46. package/dist/metadata.js.map +1 -1
  47. package/dist/metadata.mjs +2 -3
  48. package/dist/metadata.mjs.map +1 -1
  49. package/dist/model.js +2 -1
  50. package/dist/providers.js +6 -2
  51. package/dist/providers.js.map +1 -1
  52. package/dist/result.js +22 -14
  53. package/dist/result.js.map +1 -1
  54. package/dist/run.js +106 -95
  55. package/dist/run.js.map +1 -1
  56. package/dist/runContext.js +13 -6
  57. package/dist/runContext.js.map +1 -1
  58. package/dist/runImplementation.d.ts +1 -1
  59. package/dist/runImplementation.js +106 -89
  60. package/dist/runImplementation.js.map +1 -1
  61. package/dist/runImplementation.mjs +1 -1
  62. package/dist/runImplementation.mjs.map +1 -1
  63. package/dist/runState.d.ts +7 -186
  64. package/dist/runState.js +204 -151
  65. package/dist/runState.js.map +1 -1
  66. package/dist/runState.mjs +10 -1
  67. package/dist/runState.mjs.map +1 -1
  68. package/dist/shims/interface.js +2 -1
  69. package/dist/shims/mcp-server/browser.js +10 -4
  70. package/dist/shims/mcp-server/browser.js.map +1 -1
  71. package/dist/shims/mcp-server/node.js +68 -25
  72. package/dist/shims/mcp-server/node.js.map +1 -1
  73. package/dist/shims/mcp-server/node.mjs +1 -0
  74. package/dist/shims/mcp-server/node.mjs.map +1 -1
  75. package/dist/shims/shims-browser.js +25 -13
  76. package/dist/shims/shims-browser.js.map +1 -1
  77. package/dist/shims/shims-node.js +72 -15
  78. package/dist/shims/shims-node.js.map +1 -1
  79. package/dist/shims/shims-node.mjs +11 -3
  80. package/dist/shims/shims-node.mjs.map +1 -1
  81. package/dist/shims/shims-workerd.d.ts +1 -1
  82. package/dist/shims/shims-workerd.js +77 -18
  83. package/dist/shims/shims-workerd.js.map +1 -1
  84. package/dist/shims/shims-workerd.mjs +12 -4
  85. package/dist/shims/shims-workerd.mjs.map +1 -1
  86. package/dist/shims/shims.js +17 -1
  87. package/dist/shims/shims.js.map +1 -1
  88. package/dist/tool.d.ts +1 -1
  89. package/dist/tool.js +37 -29
  90. package/dist/tool.js.map +1 -1
  91. package/dist/tracing/context.js +25 -14
  92. package/dist/tracing/context.js.map +1 -1
  93. package/dist/tracing/createSpans.js +52 -38
  94. package/dist/tracing/createSpans.js.map +1 -1
  95. package/dist/tracing/index.js +51 -15
  96. package/dist/tracing/index.js.map +1 -1
  97. package/dist/tracing/processor.js +31 -20
  98. package/dist/tracing/processor.js.map +1 -1
  99. package/dist/tracing/provider.js +53 -45
  100. package/dist/tracing/provider.js.map +1 -1
  101. package/dist/tracing/spans.js +18 -10
  102. package/dist/tracing/spans.js.map +1 -1
  103. package/dist/tracing/traces.js +11 -6
  104. package/dist/tracing/traces.js.map +1 -1
  105. package/dist/tracing/utils.js +16 -9
  106. package/dist/tracing/utils.js.map +1 -1
  107. package/dist/types/aliases.js +2 -1
  108. package/dist/types/helpers.d.ts +1 -1
  109. package/dist/types/helpers.js +2 -1
  110. package/dist/types/index.js +44 -5
  111. package/dist/types/index.js.map +1 -1
  112. package/dist/types/protocol.d.ts +1 -221
  113. package/dist/types/protocol.js +188 -186
  114. package/dist/types/protocol.js.map +1 -1
  115. package/dist/types/protocol.mjs +1 -2
  116. package/dist/types/protocol.mjs.map +1 -1
  117. package/dist/types/providerData.js +2 -1
  118. package/dist/usage.d.ts +10 -3
  119. package/dist/usage.js +16 -10
  120. package/dist/usage.js.map +1 -1
  121. package/dist/usage.mjs +9 -7
  122. package/dist/usage.mjs.map +1 -1
  123. package/dist/utils/index.js +9 -3
  124. package/dist/utils/index.js.map +1 -1
  125. package/dist/utils/messages.js +6 -2
  126. package/dist/utils/messages.js.map +1 -1
  127. package/dist/utils/safeExecute.js +4 -1
  128. package/dist/utils/safeExecute.js.map +1 -1
  129. package/dist/utils/serialize.js +6 -2
  130. package/dist/utils/serialize.js.map +1 -1
  131. package/dist/utils/smartString.js +4 -1
  132. package/dist/utils/smartString.js.map +1 -1
  133. package/dist/utils/tools.js +16 -11
  134. package/dist/utils/tools.js.map +1 -1
  135. package/dist/utils/typeGuards.d.ts +1 -1
  136. package/dist/utils/typeGuards.js +6 -2
  137. package/dist/utils/typeGuards.js.map +1 -1
  138. package/package.json +23 -42
@@ -1,4 +1,4 @@
1
- import { z } from '@openai/zod/v3';
1
+ import { z } from 'zod';
2
2
  import { Agent } from './agent';
3
3
  import { RunItem, RunToolApprovalItem } from './items';
4
4
  import type { ModelResponse } from './model';
@@ -279,19 +279,6 @@ export declare const SerializedRunState: z.ZodObject<{
279
279
  providerData?: Record<string, any> | undefined;
280
280
  }>, z.ZodObject<{
281
281
  providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
282
- } & {
283
- type: z.ZodLiteral<"input_text">;
284
- text: z.ZodString;
285
- }, "strip", z.ZodTypeAny, {
286
- type: "input_text";
287
- text: string;
288
- providerData?: Record<string, any> | undefined;
289
- }, {
290
- type: "input_text";
291
- text: string;
292
- providerData?: Record<string, any> | undefined;
293
- }>, z.ZodObject<{
294
- providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
295
282
  } & {
296
283
  type: z.ZodLiteral<"audio">;
297
284
  audio: z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -344,10 +331,6 @@ export declare const SerializedRunState: z.ZodObject<{
344
331
  type: "output_text";
345
332
  text: string;
346
333
  providerData?: Record<string, any> | undefined;
347
- } | {
348
- type: "input_text";
349
- text: string;
350
- providerData?: Record<string, any> | undefined;
351
334
  } | {
352
335
  type: "audio";
353
336
  audio: string | {
@@ -375,10 +358,6 @@ export declare const SerializedRunState: z.ZodObject<{
375
358
  type: "output_text";
376
359
  text: string;
377
360
  providerData?: Record<string, any> | undefined;
378
- } | {
379
- type: "input_text";
380
- text: string;
381
- providerData?: Record<string, any> | undefined;
382
361
  } | {
383
362
  type: "audio";
384
363
  audio: string | {
@@ -916,19 +895,6 @@ export declare const SerializedRunState: z.ZodObject<{
916
895
  providerData?: Record<string, any> | undefined;
917
896
  }>, z.ZodObject<{
918
897
  providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
919
- } & {
920
- type: z.ZodLiteral<"input_text">;
921
- text: z.ZodString;
922
- }, "strip", z.ZodTypeAny, {
923
- type: "input_text";
924
- text: string;
925
- providerData?: Record<string, any> | undefined;
926
- }, {
927
- type: "input_text";
928
- text: string;
929
- providerData?: Record<string, any> | undefined;
930
- }>, z.ZodObject<{
931
- providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
932
898
  } & {
933
899
  type: z.ZodLiteral<"audio">;
934
900
  audio: z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -981,10 +947,6 @@ export declare const SerializedRunState: z.ZodObject<{
981
947
  type: "output_text";
982
948
  text: string;
983
949
  providerData?: Record<string, any> | undefined;
984
- } | {
985
- type: "input_text";
986
- text: string;
987
- providerData?: Record<string, any> | undefined;
988
950
  } | {
989
951
  type: "audio";
990
952
  audio: string | {
@@ -1012,10 +974,6 @@ export declare const SerializedRunState: z.ZodObject<{
1012
974
  type: "output_text";
1013
975
  text: string;
1014
976
  providerData?: Record<string, any> | undefined;
1015
- } | {
1016
- type: "input_text";
1017
- text: string;
1018
- providerData?: Record<string, any> | undefined;
1019
977
  } | {
1020
978
  type: "audio";
1021
979
  audio: string | {
@@ -1378,10 +1336,6 @@ export declare const SerializedRunState: z.ZodObject<{
1378
1336
  type: "output_text";
1379
1337
  text: string;
1380
1338
  providerData?: Record<string, any> | undefined;
1381
- } | {
1382
- type: "input_text";
1383
- text: string;
1384
- providerData?: Record<string, any> | undefined;
1385
1339
  } | {
1386
1340
  type: "audio";
1387
1341
  audio: string | {
@@ -1495,10 +1449,6 @@ export declare const SerializedRunState: z.ZodObject<{
1495
1449
  type: "output_text";
1496
1450
  text: string;
1497
1451
  providerData?: Record<string, any> | undefined;
1498
- } | {
1499
- type: "input_text";
1500
- text: string;
1501
- providerData?: Record<string, any> | undefined;
1502
1452
  } | {
1503
1453
  type: "audio";
1504
1454
  audio: string | {
@@ -1842,19 +1792,6 @@ export declare const SerializedRunState: z.ZodObject<{
1842
1792
  providerData?: Record<string, any> | undefined;
1843
1793
  }>, z.ZodObject<{
1844
1794
  providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1845
- } & {
1846
- type: z.ZodLiteral<"input_text">;
1847
- text: z.ZodString;
1848
- }, "strip", z.ZodTypeAny, {
1849
- type: "input_text";
1850
- text: string;
1851
- providerData?: Record<string, any> | undefined;
1852
- }, {
1853
- type: "input_text";
1854
- text: string;
1855
- providerData?: Record<string, any> | undefined;
1856
- }>, z.ZodObject<{
1857
- providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1858
1795
  } & {
1859
1796
  type: z.ZodLiteral<"audio">;
1860
1797
  audio: z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -1907,10 +1844,6 @@ export declare const SerializedRunState: z.ZodObject<{
1907
1844
  type: "output_text";
1908
1845
  text: string;
1909
1846
  providerData?: Record<string, any> | undefined;
1910
- } | {
1911
- type: "input_text";
1912
- text: string;
1913
- providerData?: Record<string, any> | undefined;
1914
1847
  } | {
1915
1848
  type: "audio";
1916
1849
  audio: string | {
@@ -1938,10 +1871,6 @@ export declare const SerializedRunState: z.ZodObject<{
1938
1871
  type: "output_text";
1939
1872
  text: string;
1940
1873
  providerData?: Record<string, any> | undefined;
1941
- } | {
1942
- type: "input_text";
1943
- text: string;
1944
- providerData?: Record<string, any> | undefined;
1945
1874
  } | {
1946
1875
  type: "audio";
1947
1876
  audio: string | {
@@ -2304,10 +2233,6 @@ export declare const SerializedRunState: z.ZodObject<{
2304
2233
  type: "output_text";
2305
2234
  text: string;
2306
2235
  providerData?: Record<string, any> | undefined;
2307
- } | {
2308
- type: "input_text";
2309
- text: string;
2310
- providerData?: Record<string, any> | undefined;
2311
2236
  } | {
2312
2237
  type: "audio";
2313
2238
  audio: string | {
@@ -2421,10 +2346,6 @@ export declare const SerializedRunState: z.ZodObject<{
2421
2346
  type: "output_text";
2422
2347
  text: string;
2423
2348
  providerData?: Record<string, any> | undefined;
2424
- } | {
2425
- type: "input_text";
2426
- text: string;
2427
- providerData?: Record<string, any> | undefined;
2428
2349
  } | {
2429
2350
  type: "audio";
2430
2351
  audio: string | {
@@ -2566,19 +2487,6 @@ export declare const SerializedRunState: z.ZodObject<{
2566
2487
  providerData?: Record<string, any> | undefined;
2567
2488
  }>, z.ZodObject<{
2568
2489
  providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2569
- } & {
2570
- type: z.ZodLiteral<"input_text">;
2571
- text: z.ZodString;
2572
- }, "strip", z.ZodTypeAny, {
2573
- type: "input_text";
2574
- text: string;
2575
- providerData?: Record<string, any> | undefined;
2576
- }, {
2577
- type: "input_text";
2578
- text: string;
2579
- providerData?: Record<string, any> | undefined;
2580
- }>, z.ZodObject<{
2581
- providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2582
2490
  } & {
2583
2491
  type: z.ZodLiteral<"audio">;
2584
2492
  audio: z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -2631,10 +2539,6 @@ export declare const SerializedRunState: z.ZodObject<{
2631
2539
  type: "output_text";
2632
2540
  text: string;
2633
2541
  providerData?: Record<string, any> | undefined;
2634
- } | {
2635
- type: "input_text";
2636
- text: string;
2637
- providerData?: Record<string, any> | undefined;
2638
2542
  } | {
2639
2543
  type: "audio";
2640
2544
  audio: string | {
@@ -2662,10 +2566,6 @@ export declare const SerializedRunState: z.ZodObject<{
2662
2566
  type: "output_text";
2663
2567
  text: string;
2664
2568
  providerData?: Record<string, any> | undefined;
2665
- } | {
2666
- type: "input_text";
2667
- text: string;
2668
- providerData?: Record<string, any> | undefined;
2669
2569
  } | {
2670
2570
  type: "audio";
2671
2571
  audio: string | {
@@ -2706,10 +2606,6 @@ export declare const SerializedRunState: z.ZodObject<{
2706
2606
  type: "output_text";
2707
2607
  text: string;
2708
2608
  providerData?: Record<string, any> | undefined;
2709
- } | {
2710
- type: "input_text";
2711
- text: string;
2712
- providerData?: Record<string, any> | undefined;
2713
2609
  } | {
2714
2610
  type: "audio";
2715
2611
  audio: string | {
@@ -2743,10 +2639,6 @@ export declare const SerializedRunState: z.ZodObject<{
2743
2639
  type: "output_text";
2744
2640
  text: string;
2745
2641
  providerData?: Record<string, any> | undefined;
2746
- } | {
2747
- type: "input_text";
2748
- text: string;
2749
- providerData?: Record<string, any> | undefined;
2750
2642
  } | {
2751
2643
  type: "audio";
2752
2644
  audio: string | {
@@ -3780,19 +3672,6 @@ export declare const SerializedRunState: z.ZodObject<{
3780
3672
  providerData?: Record<string, any> | undefined;
3781
3673
  }>, z.ZodObject<{
3782
3674
  providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3783
- } & {
3784
- type: z.ZodLiteral<"input_text">;
3785
- text: z.ZodString;
3786
- }, "strip", z.ZodTypeAny, {
3787
- type: "input_text";
3788
- text: string;
3789
- providerData?: Record<string, any> | undefined;
3790
- }, {
3791
- type: "input_text";
3792
- text: string;
3793
- providerData?: Record<string, any> | undefined;
3794
- }>, z.ZodObject<{
3795
- providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3796
3675
  } & {
3797
3676
  type: z.ZodLiteral<"audio">;
3798
3677
  audio: z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -3845,10 +3724,6 @@ export declare const SerializedRunState: z.ZodObject<{
3845
3724
  type: "output_text";
3846
3725
  text: string;
3847
3726
  providerData?: Record<string, any> | undefined;
3848
- } | {
3849
- type: "input_text";
3850
- text: string;
3851
- providerData?: Record<string, any> | undefined;
3852
3727
  } | {
3853
3728
  type: "audio";
3854
3729
  audio: string | {
@@ -3876,10 +3751,6 @@ export declare const SerializedRunState: z.ZodObject<{
3876
3751
  type: "output_text";
3877
3752
  text: string;
3878
3753
  providerData?: Record<string, any> | undefined;
3879
- } | {
3880
- type: "input_text";
3881
- text: string;
3882
- providerData?: Record<string, any> | undefined;
3883
3754
  } | {
3884
3755
  type: "audio";
3885
3756
  audio: string | {
@@ -3920,10 +3791,6 @@ export declare const SerializedRunState: z.ZodObject<{
3920
3791
  type: "output_text";
3921
3792
  text: string;
3922
3793
  providerData?: Record<string, any> | undefined;
3923
- } | {
3924
- type: "input_text";
3925
- text: string;
3926
- providerData?: Record<string, any> | undefined;
3927
3794
  } | {
3928
3795
  type: "audio";
3929
3796
  audio: string | {
@@ -3957,10 +3824,6 @@ export declare const SerializedRunState: z.ZodObject<{
3957
3824
  type: "output_text";
3958
3825
  text: string;
3959
3826
  providerData?: Record<string, any> | undefined;
3960
- } | {
3961
- type: "input_text";
3962
- text: string;
3963
- providerData?: Record<string, any> | undefined;
3964
3827
  } | {
3965
3828
  type: "audio";
3966
3829
  audio: string | {
@@ -5095,10 +4958,6 @@ export declare const SerializedRunState: z.ZodObject<{
5095
4958
  type: "output_text";
5096
4959
  text: string;
5097
4960
  providerData?: Record<string, any> | undefined;
5098
- } | {
5099
- type: "input_text";
5100
- text: string;
5101
- providerData?: Record<string, any> | undefined;
5102
4961
  } | {
5103
4962
  type: "audio";
5104
4963
  audio: string | {
@@ -5334,10 +5193,6 @@ export declare const SerializedRunState: z.ZodObject<{
5334
5193
  type: "output_text";
5335
5194
  text: string;
5336
5195
  providerData?: Record<string, any> | undefined;
5337
- } | {
5338
- type: "input_text";
5339
- text: string;
5340
- providerData?: Record<string, any> | undefined;
5341
5196
  } | {
5342
5197
  type: "audio";
5343
5198
  audio: string | {
@@ -5589,10 +5444,6 @@ export declare const SerializedRunState: z.ZodObject<{
5589
5444
  type: "output_text";
5590
5445
  text: string;
5591
5446
  providerData?: Record<string, any> | undefined;
5592
- } | {
5593
- type: "input_text";
5594
- text: string;
5595
- providerData?: Record<string, any> | undefined;
5596
5447
  } | {
5597
5448
  type: "audio";
5598
5449
  audio: string | {
@@ -5763,10 +5614,6 @@ export declare const SerializedRunState: z.ZodObject<{
5763
5614
  type: "output_text";
5764
5615
  text: string;
5765
5616
  providerData?: Record<string, any> | undefined;
5766
- } | {
5767
- type: "input_text";
5768
- text: string;
5769
- providerData?: Record<string, any> | undefined;
5770
5617
  } | {
5771
5618
  type: "audio";
5772
5619
  audio: string | {
@@ -5925,10 +5772,6 @@ export declare const SerializedRunState: z.ZodObject<{
5925
5772
  type: "output_text";
5926
5773
  text: string;
5927
5774
  providerData?: Record<string, any> | undefined;
5928
- } | {
5929
- type: "input_text";
5930
- text: string;
5931
- providerData?: Record<string, any> | undefined;
5932
5775
  } | {
5933
5776
  type: "audio";
5934
5777
  audio: string | {
@@ -6149,10 +5992,6 @@ export declare const SerializedRunState: z.ZodObject<{
6149
5992
  type: "output_text";
6150
5993
  text: string;
6151
5994
  providerData?: Record<string, any> | undefined;
6152
- } | {
6153
- type: "input_text";
6154
- text: string;
6155
- providerData?: Record<string, any> | undefined;
6156
5995
  } | {
6157
5996
  type: "audio";
6158
5997
  audio: string | {
@@ -6276,10 +6115,6 @@ export declare const SerializedRunState: z.ZodObject<{
6276
6115
  type: "output_text";
6277
6116
  text: string;
6278
6117
  providerData?: Record<string, any> | undefined;
6279
- } | {
6280
- type: "input_text";
6281
- text: string;
6282
- providerData?: Record<string, any> | undefined;
6283
6118
  } | {
6284
6119
  type: "audio";
6285
6120
  audio: string | {
@@ -6512,10 +6347,6 @@ export declare const SerializedRunState: z.ZodObject<{
6512
6347
  type: "output_text";
6513
6348
  text: string;
6514
6349
  providerData?: Record<string, any> | undefined;
6515
- } | {
6516
- type: "input_text";
6517
- text: string;
6518
- providerData?: Record<string, any> | undefined;
6519
6350
  } | {
6520
6351
  type: "audio";
6521
6352
  audio: string | {
@@ -6686,10 +6517,6 @@ export declare const SerializedRunState: z.ZodObject<{
6686
6517
  type: "output_text";
6687
6518
  text: string;
6688
6519
  providerData?: Record<string, any> | undefined;
6689
- } | {
6690
- type: "input_text";
6691
- text: string;
6692
- providerData?: Record<string, any> | undefined;
6693
6520
  } | {
6694
6521
  type: "audio";
6695
6522
  audio: string | {
@@ -6848,10 +6675,6 @@ export declare const SerializedRunState: z.ZodObject<{
6848
6675
  type: "output_text";
6849
6676
  text: string;
6850
6677
  providerData?: Record<string, any> | undefined;
6851
- } | {
6852
- type: "input_text";
6853
- text: string;
6854
- providerData?: Record<string, any> | undefined;
6855
6678
  } | {
6856
6679
  type: "audio";
6857
6680
  audio: string | {
@@ -7072,10 +6895,6 @@ export declare const SerializedRunState: z.ZodObject<{
7072
6895
  type: "output_text";
7073
6896
  text: string;
7074
6897
  providerData?: Record<string, any> | undefined;
7075
- } | {
7076
- type: "input_text";
7077
- text: string;
7078
- providerData?: Record<string, any> | undefined;
7079
6898
  } | {
7080
6899
  type: "audio";
7081
6900
  audio: string | {
@@ -7199,10 +7018,6 @@ export declare const SerializedRunState: z.ZodObject<{
7199
7018
  type: "output_text";
7200
7019
  text: string;
7201
7020
  providerData?: Record<string, any> | undefined;
7202
- } | {
7203
- type: "input_text";
7204
- text: string;
7205
- providerData?: Record<string, any> | undefined;
7206
7021
  } | {
7207
7022
  type: "audio";
7208
7023
  audio: string | {
@@ -7493,6 +7308,12 @@ export declare class RunState<TContext, TAgent extends Agent<any, any>> {
7493
7308
  */
7494
7309
  _trace: Trace | null;
7495
7310
  constructor(context: RunContext<TContext>, originalInput: string | AgentInputItem[], startingAgent: TAgent, maxTurns: number);
7311
+ /**
7312
+ * The history of the agent run. This includes the input items and the new items generated during the run.
7313
+ *
7314
+ * This can be used as inputs for the next agent run.
7315
+ */
7316
+ get history(): AgentInputItem[];
7496
7317
  /**
7497
7318
  * Returns all interruptions if the current step is an interruption otherwise returns an empty array.
7498
7319
  */