@ag-ui/core 0.0.40-alpha.3 → 0.0.40-alpha.4

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/index.d.mts CHANGED
@@ -1213,18 +1213,375 @@ declare const RunStartedEventSchema: z.ZodObject<{
1213
1213
  type: z.ZodLiteral<EventType.RUN_STARTED>;
1214
1214
  threadId: z.ZodString;
1215
1215
  runId: z.ZodString;
1216
+ parentRunId: z.ZodOptional<z.ZodString>;
1217
+ input: z.ZodOptional<z.ZodObject<{
1218
+ threadId: z.ZodString;
1219
+ runId: z.ZodString;
1220
+ state: z.ZodAny;
1221
+ messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
1222
+ id: z.ZodString;
1223
+ name: z.ZodOptional<z.ZodString>;
1224
+ } & {
1225
+ role: z.ZodLiteral<"developer">;
1226
+ content: z.ZodString;
1227
+ }, "strip", z.ZodTypeAny, {
1228
+ id: string;
1229
+ role: "developer";
1230
+ content: string;
1231
+ name?: string | undefined;
1232
+ }, {
1233
+ id: string;
1234
+ role: "developer";
1235
+ content: string;
1236
+ name?: string | undefined;
1237
+ }>, z.ZodObject<{
1238
+ id: z.ZodString;
1239
+ name: z.ZodOptional<z.ZodString>;
1240
+ } & {
1241
+ role: z.ZodLiteral<"system">;
1242
+ content: z.ZodString;
1243
+ }, "strip", z.ZodTypeAny, {
1244
+ id: string;
1245
+ role: "system";
1246
+ content: string;
1247
+ name?: string | undefined;
1248
+ }, {
1249
+ id: string;
1250
+ role: "system";
1251
+ content: string;
1252
+ name?: string | undefined;
1253
+ }>, z.ZodObject<{
1254
+ id: z.ZodString;
1255
+ name: z.ZodOptional<z.ZodString>;
1256
+ } & {
1257
+ role: z.ZodLiteral<"assistant">;
1258
+ content: z.ZodOptional<z.ZodString>;
1259
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
1260
+ id: z.ZodString;
1261
+ type: z.ZodLiteral<"function">;
1262
+ function: z.ZodObject<{
1263
+ name: z.ZodString;
1264
+ arguments: z.ZodString;
1265
+ }, "strip", z.ZodTypeAny, {
1266
+ name: string;
1267
+ arguments: string;
1268
+ }, {
1269
+ name: string;
1270
+ arguments: string;
1271
+ }>;
1272
+ }, "strip", z.ZodTypeAny, {
1273
+ function: {
1274
+ name: string;
1275
+ arguments: string;
1276
+ };
1277
+ type: "function";
1278
+ id: string;
1279
+ }, {
1280
+ function: {
1281
+ name: string;
1282
+ arguments: string;
1283
+ };
1284
+ type: "function";
1285
+ id: string;
1286
+ }>, "many">>;
1287
+ }, "strip", z.ZodTypeAny, {
1288
+ id: string;
1289
+ role: "assistant";
1290
+ name?: string | undefined;
1291
+ content?: string | undefined;
1292
+ toolCalls?: {
1293
+ function: {
1294
+ name: string;
1295
+ arguments: string;
1296
+ };
1297
+ type: "function";
1298
+ id: string;
1299
+ }[] | undefined;
1300
+ }, {
1301
+ id: string;
1302
+ role: "assistant";
1303
+ name?: string | undefined;
1304
+ content?: string | undefined;
1305
+ toolCalls?: {
1306
+ function: {
1307
+ name: string;
1308
+ arguments: string;
1309
+ };
1310
+ type: "function";
1311
+ id: string;
1312
+ }[] | undefined;
1313
+ }>, z.ZodObject<{
1314
+ id: z.ZodString;
1315
+ name: z.ZodOptional<z.ZodString>;
1316
+ } & {
1317
+ role: z.ZodLiteral<"user">;
1318
+ content: z.ZodString;
1319
+ }, "strip", z.ZodTypeAny, {
1320
+ id: string;
1321
+ role: "user";
1322
+ content: string;
1323
+ name?: string | undefined;
1324
+ }, {
1325
+ id: string;
1326
+ role: "user";
1327
+ content: string;
1328
+ name?: string | undefined;
1329
+ }>, z.ZodObject<{
1330
+ id: z.ZodString;
1331
+ content: z.ZodString;
1332
+ role: z.ZodLiteral<"tool">;
1333
+ toolCallId: z.ZodString;
1334
+ error: z.ZodOptional<z.ZodString>;
1335
+ }, "strip", z.ZodTypeAny, {
1336
+ id: string;
1337
+ role: "tool";
1338
+ content: string;
1339
+ toolCallId: string;
1340
+ error?: string | undefined;
1341
+ }, {
1342
+ id: string;
1343
+ role: "tool";
1344
+ content: string;
1345
+ toolCallId: string;
1346
+ error?: string | undefined;
1347
+ }>]>, "many">;
1348
+ tools: z.ZodArray<z.ZodObject<{
1349
+ name: z.ZodString;
1350
+ description: z.ZodString;
1351
+ parameters: z.ZodAny;
1352
+ }, "strip", z.ZodTypeAny, {
1353
+ name: string;
1354
+ description: string;
1355
+ parameters?: any;
1356
+ }, {
1357
+ name: string;
1358
+ description: string;
1359
+ parameters?: any;
1360
+ }>, "many">;
1361
+ context: z.ZodArray<z.ZodObject<{
1362
+ description: z.ZodString;
1363
+ value: z.ZodString;
1364
+ }, "strip", z.ZodTypeAny, {
1365
+ value: string;
1366
+ description: string;
1367
+ }, {
1368
+ value: string;
1369
+ description: string;
1370
+ }>, "many">;
1371
+ forwardedProps: z.ZodAny;
1372
+ }, "strip", z.ZodTypeAny, {
1373
+ threadId: string;
1374
+ runId: string;
1375
+ messages: ({
1376
+ id: string;
1377
+ role: "developer";
1378
+ content: string;
1379
+ name?: string | undefined;
1380
+ } | {
1381
+ id: string;
1382
+ role: "system";
1383
+ content: string;
1384
+ name?: string | undefined;
1385
+ } | {
1386
+ id: string;
1387
+ role: "assistant";
1388
+ name?: string | undefined;
1389
+ content?: string | undefined;
1390
+ toolCalls?: {
1391
+ function: {
1392
+ name: string;
1393
+ arguments: string;
1394
+ };
1395
+ type: "function";
1396
+ id: string;
1397
+ }[] | undefined;
1398
+ } | {
1399
+ id: string;
1400
+ role: "user";
1401
+ content: string;
1402
+ name?: string | undefined;
1403
+ } | {
1404
+ id: string;
1405
+ role: "tool";
1406
+ content: string;
1407
+ toolCallId: string;
1408
+ error?: string | undefined;
1409
+ })[];
1410
+ tools: {
1411
+ name: string;
1412
+ description: string;
1413
+ parameters?: any;
1414
+ }[];
1415
+ context: {
1416
+ value: string;
1417
+ description: string;
1418
+ }[];
1419
+ state?: any;
1420
+ forwardedProps?: any;
1421
+ }, {
1422
+ threadId: string;
1423
+ runId: string;
1424
+ messages: ({
1425
+ id: string;
1426
+ role: "developer";
1427
+ content: string;
1428
+ name?: string | undefined;
1429
+ } | {
1430
+ id: string;
1431
+ role: "system";
1432
+ content: string;
1433
+ name?: string | undefined;
1434
+ } | {
1435
+ id: string;
1436
+ role: "assistant";
1437
+ name?: string | undefined;
1438
+ content?: string | undefined;
1439
+ toolCalls?: {
1440
+ function: {
1441
+ name: string;
1442
+ arguments: string;
1443
+ };
1444
+ type: "function";
1445
+ id: string;
1446
+ }[] | undefined;
1447
+ } | {
1448
+ id: string;
1449
+ role: "user";
1450
+ content: string;
1451
+ name?: string | undefined;
1452
+ } | {
1453
+ id: string;
1454
+ role: "tool";
1455
+ content: string;
1456
+ toolCallId: string;
1457
+ error?: string | undefined;
1458
+ })[];
1459
+ tools: {
1460
+ name: string;
1461
+ description: string;
1462
+ parameters?: any;
1463
+ }[];
1464
+ context: {
1465
+ value: string;
1466
+ description: string;
1467
+ }[];
1468
+ state?: any;
1469
+ forwardedProps?: any;
1470
+ }>>;
1216
1471
  }, "strip", z.ZodTypeAny, {
1217
1472
  type: EventType.RUN_STARTED;
1218
1473
  threadId: string;
1219
1474
  runId: string;
1220
1475
  timestamp?: number | undefined;
1221
1476
  rawEvent?: any;
1477
+ parentRunId?: string | undefined;
1478
+ input?: {
1479
+ threadId: string;
1480
+ runId: string;
1481
+ messages: ({
1482
+ id: string;
1483
+ role: "developer";
1484
+ content: string;
1485
+ name?: string | undefined;
1486
+ } | {
1487
+ id: string;
1488
+ role: "system";
1489
+ content: string;
1490
+ name?: string | undefined;
1491
+ } | {
1492
+ id: string;
1493
+ role: "assistant";
1494
+ name?: string | undefined;
1495
+ content?: string | undefined;
1496
+ toolCalls?: {
1497
+ function: {
1498
+ name: string;
1499
+ arguments: string;
1500
+ };
1501
+ type: "function";
1502
+ id: string;
1503
+ }[] | undefined;
1504
+ } | {
1505
+ id: string;
1506
+ role: "user";
1507
+ content: string;
1508
+ name?: string | undefined;
1509
+ } | {
1510
+ id: string;
1511
+ role: "tool";
1512
+ content: string;
1513
+ toolCallId: string;
1514
+ error?: string | undefined;
1515
+ })[];
1516
+ tools: {
1517
+ name: string;
1518
+ description: string;
1519
+ parameters?: any;
1520
+ }[];
1521
+ context: {
1522
+ value: string;
1523
+ description: string;
1524
+ }[];
1525
+ state?: any;
1526
+ forwardedProps?: any;
1527
+ } | undefined;
1222
1528
  }, {
1223
1529
  type: EventType.RUN_STARTED;
1224
1530
  threadId: string;
1225
1531
  runId: string;
1226
1532
  timestamp?: number | undefined;
1227
1533
  rawEvent?: any;
1534
+ parentRunId?: string | undefined;
1535
+ input?: {
1536
+ threadId: string;
1537
+ runId: string;
1538
+ messages: ({
1539
+ id: string;
1540
+ role: "developer";
1541
+ content: string;
1542
+ name?: string | undefined;
1543
+ } | {
1544
+ id: string;
1545
+ role: "system";
1546
+ content: string;
1547
+ name?: string | undefined;
1548
+ } | {
1549
+ id: string;
1550
+ role: "assistant";
1551
+ name?: string | undefined;
1552
+ content?: string | undefined;
1553
+ toolCalls?: {
1554
+ function: {
1555
+ name: string;
1556
+ arguments: string;
1557
+ };
1558
+ type: "function";
1559
+ id: string;
1560
+ }[] | undefined;
1561
+ } | {
1562
+ id: string;
1563
+ role: "user";
1564
+ content: string;
1565
+ name?: string | undefined;
1566
+ } | {
1567
+ id: string;
1568
+ role: "tool";
1569
+ content: string;
1570
+ toolCallId: string;
1571
+ error?: string | undefined;
1572
+ })[];
1573
+ tools: {
1574
+ name: string;
1575
+ description: string;
1576
+ parameters?: any;
1577
+ }[];
1578
+ context: {
1579
+ value: string;
1580
+ description: string;
1581
+ }[];
1582
+ state?: any;
1583
+ forwardedProps?: any;
1584
+ } | undefined;
1228
1585
  }>;
1229
1586
  declare const RunFinishedEventSchema: z.ZodObject<{
1230
1587
  timestamp: z.ZodOptional<z.ZodNumber>;
@@ -1847,18 +2204,375 @@ declare const EventSchemas: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1847
2204
  type: z.ZodLiteral<EventType.RUN_STARTED>;
1848
2205
  threadId: z.ZodString;
1849
2206
  runId: z.ZodString;
2207
+ parentRunId: z.ZodOptional<z.ZodString>;
2208
+ input: z.ZodOptional<z.ZodObject<{
2209
+ threadId: z.ZodString;
2210
+ runId: z.ZodString;
2211
+ state: z.ZodAny;
2212
+ messages: z.ZodArray<z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
2213
+ id: z.ZodString;
2214
+ name: z.ZodOptional<z.ZodString>;
2215
+ } & {
2216
+ role: z.ZodLiteral<"developer">;
2217
+ content: z.ZodString;
2218
+ }, "strip", z.ZodTypeAny, {
2219
+ id: string;
2220
+ role: "developer";
2221
+ content: string;
2222
+ name?: string | undefined;
2223
+ }, {
2224
+ id: string;
2225
+ role: "developer";
2226
+ content: string;
2227
+ name?: string | undefined;
2228
+ }>, z.ZodObject<{
2229
+ id: z.ZodString;
2230
+ name: z.ZodOptional<z.ZodString>;
2231
+ } & {
2232
+ role: z.ZodLiteral<"system">;
2233
+ content: z.ZodString;
2234
+ }, "strip", z.ZodTypeAny, {
2235
+ id: string;
2236
+ role: "system";
2237
+ content: string;
2238
+ name?: string | undefined;
2239
+ }, {
2240
+ id: string;
2241
+ role: "system";
2242
+ content: string;
2243
+ name?: string | undefined;
2244
+ }>, z.ZodObject<{
2245
+ id: z.ZodString;
2246
+ name: z.ZodOptional<z.ZodString>;
2247
+ } & {
2248
+ role: z.ZodLiteral<"assistant">;
2249
+ content: z.ZodOptional<z.ZodString>;
2250
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
2251
+ id: z.ZodString;
2252
+ type: z.ZodLiteral<"function">;
2253
+ function: z.ZodObject<{
2254
+ name: z.ZodString;
2255
+ arguments: z.ZodString;
2256
+ }, "strip", z.ZodTypeAny, {
2257
+ name: string;
2258
+ arguments: string;
2259
+ }, {
2260
+ name: string;
2261
+ arguments: string;
2262
+ }>;
2263
+ }, "strip", z.ZodTypeAny, {
2264
+ function: {
2265
+ name: string;
2266
+ arguments: string;
2267
+ };
2268
+ type: "function";
2269
+ id: string;
2270
+ }, {
2271
+ function: {
2272
+ name: string;
2273
+ arguments: string;
2274
+ };
2275
+ type: "function";
2276
+ id: string;
2277
+ }>, "many">>;
2278
+ }, "strip", z.ZodTypeAny, {
2279
+ id: string;
2280
+ role: "assistant";
2281
+ name?: string | undefined;
2282
+ content?: string | undefined;
2283
+ toolCalls?: {
2284
+ function: {
2285
+ name: string;
2286
+ arguments: string;
2287
+ };
2288
+ type: "function";
2289
+ id: string;
2290
+ }[] | undefined;
2291
+ }, {
2292
+ id: string;
2293
+ role: "assistant";
2294
+ name?: string | undefined;
2295
+ content?: string | undefined;
2296
+ toolCalls?: {
2297
+ function: {
2298
+ name: string;
2299
+ arguments: string;
2300
+ };
2301
+ type: "function";
2302
+ id: string;
2303
+ }[] | undefined;
2304
+ }>, z.ZodObject<{
2305
+ id: z.ZodString;
2306
+ name: z.ZodOptional<z.ZodString>;
2307
+ } & {
2308
+ role: z.ZodLiteral<"user">;
2309
+ content: z.ZodString;
2310
+ }, "strip", z.ZodTypeAny, {
2311
+ id: string;
2312
+ role: "user";
2313
+ content: string;
2314
+ name?: string | undefined;
2315
+ }, {
2316
+ id: string;
2317
+ role: "user";
2318
+ content: string;
2319
+ name?: string | undefined;
2320
+ }>, z.ZodObject<{
2321
+ id: z.ZodString;
2322
+ content: z.ZodString;
2323
+ role: z.ZodLiteral<"tool">;
2324
+ toolCallId: z.ZodString;
2325
+ error: z.ZodOptional<z.ZodString>;
2326
+ }, "strip", z.ZodTypeAny, {
2327
+ id: string;
2328
+ role: "tool";
2329
+ content: string;
2330
+ toolCallId: string;
2331
+ error?: string | undefined;
2332
+ }, {
2333
+ id: string;
2334
+ role: "tool";
2335
+ content: string;
2336
+ toolCallId: string;
2337
+ error?: string | undefined;
2338
+ }>]>, "many">;
2339
+ tools: z.ZodArray<z.ZodObject<{
2340
+ name: z.ZodString;
2341
+ description: z.ZodString;
2342
+ parameters: z.ZodAny;
2343
+ }, "strip", z.ZodTypeAny, {
2344
+ name: string;
2345
+ description: string;
2346
+ parameters?: any;
2347
+ }, {
2348
+ name: string;
2349
+ description: string;
2350
+ parameters?: any;
2351
+ }>, "many">;
2352
+ context: z.ZodArray<z.ZodObject<{
2353
+ description: z.ZodString;
2354
+ value: z.ZodString;
2355
+ }, "strip", z.ZodTypeAny, {
2356
+ value: string;
2357
+ description: string;
2358
+ }, {
2359
+ value: string;
2360
+ description: string;
2361
+ }>, "many">;
2362
+ forwardedProps: z.ZodAny;
2363
+ }, "strip", z.ZodTypeAny, {
2364
+ threadId: string;
2365
+ runId: string;
2366
+ messages: ({
2367
+ id: string;
2368
+ role: "developer";
2369
+ content: string;
2370
+ name?: string | undefined;
2371
+ } | {
2372
+ id: string;
2373
+ role: "system";
2374
+ content: string;
2375
+ name?: string | undefined;
2376
+ } | {
2377
+ id: string;
2378
+ role: "assistant";
2379
+ name?: string | undefined;
2380
+ content?: string | undefined;
2381
+ toolCalls?: {
2382
+ function: {
2383
+ name: string;
2384
+ arguments: string;
2385
+ };
2386
+ type: "function";
2387
+ id: string;
2388
+ }[] | undefined;
2389
+ } | {
2390
+ id: string;
2391
+ role: "user";
2392
+ content: string;
2393
+ name?: string | undefined;
2394
+ } | {
2395
+ id: string;
2396
+ role: "tool";
2397
+ content: string;
2398
+ toolCallId: string;
2399
+ error?: string | undefined;
2400
+ })[];
2401
+ tools: {
2402
+ name: string;
2403
+ description: string;
2404
+ parameters?: any;
2405
+ }[];
2406
+ context: {
2407
+ value: string;
2408
+ description: string;
2409
+ }[];
2410
+ state?: any;
2411
+ forwardedProps?: any;
2412
+ }, {
2413
+ threadId: string;
2414
+ runId: string;
2415
+ messages: ({
2416
+ id: string;
2417
+ role: "developer";
2418
+ content: string;
2419
+ name?: string | undefined;
2420
+ } | {
2421
+ id: string;
2422
+ role: "system";
2423
+ content: string;
2424
+ name?: string | undefined;
2425
+ } | {
2426
+ id: string;
2427
+ role: "assistant";
2428
+ name?: string | undefined;
2429
+ content?: string | undefined;
2430
+ toolCalls?: {
2431
+ function: {
2432
+ name: string;
2433
+ arguments: string;
2434
+ };
2435
+ type: "function";
2436
+ id: string;
2437
+ }[] | undefined;
2438
+ } | {
2439
+ id: string;
2440
+ role: "user";
2441
+ content: string;
2442
+ name?: string | undefined;
2443
+ } | {
2444
+ id: string;
2445
+ role: "tool";
2446
+ content: string;
2447
+ toolCallId: string;
2448
+ error?: string | undefined;
2449
+ })[];
2450
+ tools: {
2451
+ name: string;
2452
+ description: string;
2453
+ parameters?: any;
2454
+ }[];
2455
+ context: {
2456
+ value: string;
2457
+ description: string;
2458
+ }[];
2459
+ state?: any;
2460
+ forwardedProps?: any;
2461
+ }>>;
1850
2462
  }, "strip", z.ZodTypeAny, {
1851
2463
  type: EventType.RUN_STARTED;
1852
2464
  threadId: string;
1853
2465
  runId: string;
1854
2466
  timestamp?: number | undefined;
1855
2467
  rawEvent?: any;
2468
+ parentRunId?: string | undefined;
2469
+ input?: {
2470
+ threadId: string;
2471
+ runId: string;
2472
+ messages: ({
2473
+ id: string;
2474
+ role: "developer";
2475
+ content: string;
2476
+ name?: string | undefined;
2477
+ } | {
2478
+ id: string;
2479
+ role: "system";
2480
+ content: string;
2481
+ name?: string | undefined;
2482
+ } | {
2483
+ id: string;
2484
+ role: "assistant";
2485
+ name?: string | undefined;
2486
+ content?: string | undefined;
2487
+ toolCalls?: {
2488
+ function: {
2489
+ name: string;
2490
+ arguments: string;
2491
+ };
2492
+ type: "function";
2493
+ id: string;
2494
+ }[] | undefined;
2495
+ } | {
2496
+ id: string;
2497
+ role: "user";
2498
+ content: string;
2499
+ name?: string | undefined;
2500
+ } | {
2501
+ id: string;
2502
+ role: "tool";
2503
+ content: string;
2504
+ toolCallId: string;
2505
+ error?: string | undefined;
2506
+ })[];
2507
+ tools: {
2508
+ name: string;
2509
+ description: string;
2510
+ parameters?: any;
2511
+ }[];
2512
+ context: {
2513
+ value: string;
2514
+ description: string;
2515
+ }[];
2516
+ state?: any;
2517
+ forwardedProps?: any;
2518
+ } | undefined;
1856
2519
  }, {
1857
2520
  type: EventType.RUN_STARTED;
1858
2521
  threadId: string;
1859
2522
  runId: string;
1860
2523
  timestamp?: number | undefined;
1861
2524
  rawEvent?: any;
2525
+ parentRunId?: string | undefined;
2526
+ input?: {
2527
+ threadId: string;
2528
+ runId: string;
2529
+ messages: ({
2530
+ id: string;
2531
+ role: "developer";
2532
+ content: string;
2533
+ name?: string | undefined;
2534
+ } | {
2535
+ id: string;
2536
+ role: "system";
2537
+ content: string;
2538
+ name?: string | undefined;
2539
+ } | {
2540
+ id: string;
2541
+ role: "assistant";
2542
+ name?: string | undefined;
2543
+ content?: string | undefined;
2544
+ toolCalls?: {
2545
+ function: {
2546
+ name: string;
2547
+ arguments: string;
2548
+ };
2549
+ type: "function";
2550
+ id: string;
2551
+ }[] | undefined;
2552
+ } | {
2553
+ id: string;
2554
+ role: "user";
2555
+ content: string;
2556
+ name?: string | undefined;
2557
+ } | {
2558
+ id: string;
2559
+ role: "tool";
2560
+ content: string;
2561
+ toolCallId: string;
2562
+ error?: string | undefined;
2563
+ })[];
2564
+ tools: {
2565
+ name: string;
2566
+ description: string;
2567
+ parameters?: any;
2568
+ }[];
2569
+ context: {
2570
+ value: string;
2571
+ description: string;
2572
+ }[];
2573
+ state?: any;
2574
+ forwardedProps?: any;
2575
+ } | undefined;
1862
2576
  }>, z.ZodObject<{
1863
2577
  timestamp: z.ZodOptional<z.ZodNumber>;
1864
2578
  rawEvent: z.ZodOptional<z.ZodAny>;