@openai/agents-core 0.9.0 → 0.9.1
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/memory/session.d.ts +7 -0
- package/dist/memory/session.js.map +1 -1
- package/dist/memory/session.mjs.map +1 -1
- package/dist/metadata.js +2 -2
- package/dist/metadata.mjs +2 -2
- package/dist/run.js +36 -0
- package/dist/run.js.map +1 -1
- package/dist/run.mjs +36 -0
- package/dist/run.mjs.map +1 -1
- package/dist/runState.d.ts +28 -3
- package/dist/runState.js +321 -45
- package/dist/runState.js.map +1 -1
- package/dist/runState.mjs +320 -45
- package/dist/runState.mjs.map +1 -1
- package/dist/runner/sessionPersistence.js +33 -12
- package/dist/runner/sessionPersistence.js.map +1 -1
- package/dist/runner/sessionPersistence.mjs +33 -12
- package/dist/runner/sessionPersistence.mjs.map +1 -1
- package/dist/runner/streamReconciliation.d.ts +14 -0
- package/dist/runner/streamReconciliation.js +80 -0
- package/dist/runner/streamReconciliation.js.map +1 -0
- package/dist/runner/streamReconciliation.mjs +72 -0
- package/dist/runner/streamReconciliation.mjs.map +1 -0
- package/dist/runner/toolUseTracker.d.ts +3 -1
- package/dist/runner/toolUseTracker.js +2 -2
- package/dist/runner/toolUseTracker.js.map +1 -1
- package/dist/runner/toolUseTracker.mjs +2 -2
- package/dist/runner/toolUseTracker.mjs.map +1 -1
- package/package.json +1 -1
package/dist/runState.d.ts
CHANGED
|
@@ -36,8 +36,10 @@ import type { AgentToolInvocation } from './agentToolInvocation';
|
|
|
36
36
|
* aliasing to serialized run state payloads.
|
|
37
37
|
* - 1.9: Adds optional sandbox session persistence with a versioned session-state
|
|
38
38
|
* envelope for sandbox-agent resume.
|
|
39
|
+
* - 1.10: Adds optional stable agent identity keys so duplicate-name agent graphs can
|
|
40
|
+
* serialize and resume without ambiguous name resolution.
|
|
39
41
|
*/
|
|
40
|
-
export declare const CURRENT_SCHEMA_VERSION: "1.
|
|
42
|
+
export declare const CURRENT_SCHEMA_VERSION: "1.10";
|
|
41
43
|
type ContextOverrideStrategy = 'merge' | 'replace';
|
|
42
44
|
declare const serializedSpanBase: z.ZodObject<{
|
|
43
45
|
object: z.ZodLiteral<"trace.span">;
|
|
@@ -101,10 +103,12 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
101
103
|
1.7: "1.7";
|
|
102
104
|
1.8: "1.8";
|
|
103
105
|
1.9: "1.9";
|
|
106
|
+
"1.10": "1.10";
|
|
104
107
|
}>;
|
|
105
108
|
currentTurn: z.ZodNumber;
|
|
106
109
|
currentAgent: z.ZodObject<{
|
|
107
110
|
name: z.ZodString;
|
|
111
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
108
112
|
}, z.core.$strip>;
|
|
109
113
|
originalInput: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
110
114
|
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
@@ -867,6 +871,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
867
871
|
agentOutput: z.ZodAny;
|
|
868
872
|
agent: z.ZodObject<{
|
|
869
873
|
name: z.ZodString;
|
|
874
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
870
875
|
}, z.core.$strip>;
|
|
871
876
|
output: z.ZodObject<{
|
|
872
877
|
tripwireTriggered: z.ZodBoolean;
|
|
@@ -1298,6 +1303,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1298
1303
|
}, z.core.$strip>;
|
|
1299
1304
|
agent: z.ZodObject<{
|
|
1300
1305
|
name: z.ZodString;
|
|
1306
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
1301
1307
|
}, z.core.$strip>;
|
|
1302
1308
|
}, z.core.$strip>, z.ZodObject<{
|
|
1303
1309
|
type: z.ZodLiteral<"tool_search_call_item">;
|
|
@@ -1316,6 +1322,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1316
1322
|
}, z.core.$strip>;
|
|
1317
1323
|
agent: z.ZodObject<{
|
|
1318
1324
|
name: z.ZodString;
|
|
1325
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
1319
1326
|
}, z.core.$strip>;
|
|
1320
1327
|
}, z.core.$strip>, z.ZodObject<{
|
|
1321
1328
|
type: z.ZodLiteral<"tool_search_output_item">;
|
|
@@ -1334,6 +1341,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1334
1341
|
}, z.core.$strip>;
|
|
1335
1342
|
agent: z.ZodObject<{
|
|
1336
1343
|
name: z.ZodString;
|
|
1344
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
1337
1345
|
}, z.core.$strip>;
|
|
1338
1346
|
}, z.core.$strip>, z.ZodObject<{
|
|
1339
1347
|
type: z.ZodLiteral<"tool_call_item">;
|
|
@@ -1500,6 +1508,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1500
1508
|
}, z.core.$strip>]>;
|
|
1501
1509
|
agent: z.ZodObject<{
|
|
1502
1510
|
name: z.ZodString;
|
|
1511
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
1503
1512
|
}, z.core.$strip>;
|
|
1504
1513
|
}, z.core.$strip>, z.ZodObject<{
|
|
1505
1514
|
type: z.ZodLiteral<"tool_call_output_item">;
|
|
@@ -1605,6 +1614,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1605
1614
|
}, z.core.$strip>]>;
|
|
1606
1615
|
agent: z.ZodObject<{
|
|
1607
1616
|
name: z.ZodString;
|
|
1617
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
1608
1618
|
}, z.core.$strip>;
|
|
1609
1619
|
output: z.ZodString;
|
|
1610
1620
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1626,6 +1636,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1626
1636
|
}, z.core.$strip>;
|
|
1627
1637
|
agent: z.ZodObject<{
|
|
1628
1638
|
name: z.ZodString;
|
|
1639
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
1629
1640
|
}, z.core.$strip>;
|
|
1630
1641
|
}, z.core.$strip>, z.ZodObject<{
|
|
1631
1642
|
type: z.ZodLiteral<"handoff_call_item">;
|
|
@@ -1645,6 +1656,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1645
1656
|
}, z.core.$strip>;
|
|
1646
1657
|
agent: z.ZodObject<{
|
|
1647
1658
|
name: z.ZodString;
|
|
1659
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
1648
1660
|
}, z.core.$strip>;
|
|
1649
1661
|
}, z.core.$strip>, z.ZodObject<{
|
|
1650
1662
|
type: z.ZodLiteral<"handoff_output_item">;
|
|
@@ -1714,9 +1726,11 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1714
1726
|
}, z.core.$strip>;
|
|
1715
1727
|
sourceAgent: z.ZodObject<{
|
|
1716
1728
|
name: z.ZodString;
|
|
1729
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
1717
1730
|
}, z.core.$strip>;
|
|
1718
1731
|
targetAgent: z.ZodObject<{
|
|
1719
1732
|
name: z.ZodString;
|
|
1733
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
1720
1734
|
}, z.core.$strip>;
|
|
1721
1735
|
}, z.core.$strip>, z.ZodObject<{
|
|
1722
1736
|
type: z.ZodLiteral<"tool_approval_item">;
|
|
@@ -1875,6 +1889,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1875
1889
|
}, z.core.$strip>]>;
|
|
1876
1890
|
agent: z.ZodObject<{
|
|
1877
1891
|
name: z.ZodString;
|
|
1892
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
1878
1893
|
}, z.core.$strip>;
|
|
1879
1894
|
toolName: z.ZodOptional<z.ZodString>;
|
|
1880
1895
|
}, z.core.$strip>], "type">>;
|
|
@@ -1916,6 +1931,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1916
1931
|
}, z.core.$strip>;
|
|
1917
1932
|
agent: z.ZodObject<{
|
|
1918
1933
|
name: z.ZodString;
|
|
1934
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
1919
1935
|
}, z.core.$strip>;
|
|
1920
1936
|
}, z.core.$strip>, z.ZodObject<{
|
|
1921
1937
|
type: z.ZodLiteral<"tool_search_call_item">;
|
|
@@ -1934,6 +1950,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1934
1950
|
}, z.core.$strip>;
|
|
1935
1951
|
agent: z.ZodObject<{
|
|
1936
1952
|
name: z.ZodString;
|
|
1953
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
1937
1954
|
}, z.core.$strip>;
|
|
1938
1955
|
}, z.core.$strip>, z.ZodObject<{
|
|
1939
1956
|
type: z.ZodLiteral<"tool_search_output_item">;
|
|
@@ -1952,6 +1969,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
1952
1969
|
}, z.core.$strip>;
|
|
1953
1970
|
agent: z.ZodObject<{
|
|
1954
1971
|
name: z.ZodString;
|
|
1972
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
1955
1973
|
}, z.core.$strip>;
|
|
1956
1974
|
}, z.core.$strip>, z.ZodObject<{
|
|
1957
1975
|
type: z.ZodLiteral<"tool_call_item">;
|
|
@@ -2118,6 +2136,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
2118
2136
|
}, z.core.$strip>]>;
|
|
2119
2137
|
agent: z.ZodObject<{
|
|
2120
2138
|
name: z.ZodString;
|
|
2139
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
2121
2140
|
}, z.core.$strip>;
|
|
2122
2141
|
}, z.core.$strip>, z.ZodObject<{
|
|
2123
2142
|
type: z.ZodLiteral<"tool_call_output_item">;
|
|
@@ -2223,6 +2242,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
2223
2242
|
}, z.core.$strip>]>;
|
|
2224
2243
|
agent: z.ZodObject<{
|
|
2225
2244
|
name: z.ZodString;
|
|
2245
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
2226
2246
|
}, z.core.$strip>;
|
|
2227
2247
|
output: z.ZodString;
|
|
2228
2248
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -2244,6 +2264,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
2244
2264
|
}, z.core.$strip>;
|
|
2245
2265
|
agent: z.ZodObject<{
|
|
2246
2266
|
name: z.ZodString;
|
|
2267
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
2247
2268
|
}, z.core.$strip>;
|
|
2248
2269
|
}, z.core.$strip>, z.ZodObject<{
|
|
2249
2270
|
type: z.ZodLiteral<"handoff_call_item">;
|
|
@@ -2263,6 +2284,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
2263
2284
|
}, z.core.$strip>;
|
|
2264
2285
|
agent: z.ZodObject<{
|
|
2265
2286
|
name: z.ZodString;
|
|
2287
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
2266
2288
|
}, z.core.$strip>;
|
|
2267
2289
|
}, z.core.$strip>, z.ZodObject<{
|
|
2268
2290
|
type: z.ZodLiteral<"handoff_output_item">;
|
|
@@ -2332,9 +2354,11 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
2332
2354
|
}, z.core.$strip>;
|
|
2333
2355
|
sourceAgent: z.ZodObject<{
|
|
2334
2356
|
name: z.ZodString;
|
|
2357
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
2335
2358
|
}, z.core.$strip>;
|
|
2336
2359
|
targetAgent: z.ZodObject<{
|
|
2337
2360
|
name: z.ZodString;
|
|
2361
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
2338
2362
|
}, z.core.$strip>;
|
|
2339
2363
|
}, z.core.$strip>, z.ZodObject<{
|
|
2340
2364
|
type: z.ZodLiteral<"tool_approval_item">;
|
|
@@ -2493,6 +2517,7 @@ export declare const SerializedRunState: z.ZodObject<{
|
|
|
2493
2517
|
}, z.core.$strip>]>;
|
|
2494
2518
|
agent: z.ZodObject<{
|
|
2495
2519
|
name: z.ZodString;
|
|
2520
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
2496
2521
|
}, z.core.$strip>;
|
|
2497
2522
|
toolName: z.ZodOptional<z.ZodString>;
|
|
2498
2523
|
}, z.core.$strip>], "type">>;
|
|
@@ -2727,10 +2752,10 @@ export declare class RunState<TContext, TAgent extends Agent<any, any>> {
|
|
|
2727
2752
|
*/
|
|
2728
2753
|
_trace: Trace | null;
|
|
2729
2754
|
/**
|
|
2730
|
-
* Runtime-only tool_search-loaded tools, scoped by agent
|
|
2755
|
+
* Runtime-only tool_search-loaded tools, scoped by agent object and preserved across turns for
|
|
2731
2756
|
* the lifetime of this in-memory run.
|
|
2732
2757
|
*/
|
|
2733
|
-
|
|
2758
|
+
_toolSearchRuntimeToolsByAgent: Map<Agent<any, any>, ToolSearchRuntimeToolState<TContext>>;
|
|
2734
2759
|
/**
|
|
2735
2760
|
* Persisted sandbox session metadata for sandbox-agent resume.
|
|
2736
2761
|
*/
|