@perstack/core 0.0.52 → 0.0.53
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/src/index.d.ts +217 -79
- package/dist/src/index.js +86 -18
- package/dist/src/index.js.map +1 -1
- package/package.json +2 -2
package/dist/src/index.d.ts
CHANGED
|
@@ -601,14 +601,13 @@ declare const usageSchema: z.ZodObject<{
|
|
|
601
601
|
//#endregion
|
|
602
602
|
//#region src/schemas/checkpoint.d.ts
|
|
603
603
|
/** Status of a checkpoint in the execution lifecycle */
|
|
604
|
-
type CheckpointStatus = "init" | "proceeding" | "completed" | "stoppedByInteractiveTool" | "stoppedByDelegate" | "
|
|
604
|
+
type CheckpointStatus = "init" | "proceeding" | "completed" | "stoppedByInteractiveTool" | "stoppedByDelegate" | "stoppedByError" | "stoppedByCancellation";
|
|
605
605
|
declare const checkpointStatusSchema: z.ZodEnum<{
|
|
606
|
-
completed: "completed";
|
|
607
606
|
init: "init";
|
|
608
607
|
proceeding: "proceeding";
|
|
608
|
+
completed: "completed";
|
|
609
609
|
stoppedByInteractiveTool: "stoppedByInteractiveTool";
|
|
610
610
|
stoppedByDelegate: "stoppedByDelegate";
|
|
611
|
-
stoppedByExceededMaxSteps: "stoppedByExceededMaxSteps";
|
|
612
611
|
stoppedByError: "stoppedByError";
|
|
613
612
|
stoppedByCancellation: "stoppedByCancellation";
|
|
614
613
|
}>;
|
|
@@ -699,12 +698,11 @@ declare const checkpointSchema: z.ZodObject<{
|
|
|
699
698
|
jobId: z.ZodString;
|
|
700
699
|
runId: z.ZodString;
|
|
701
700
|
status: z.ZodEnum<{
|
|
702
|
-
completed: "completed";
|
|
703
701
|
init: "init";
|
|
704
702
|
proceeding: "proceeding";
|
|
703
|
+
completed: "completed";
|
|
705
704
|
stoppedByInteractiveTool: "stoppedByInteractiveTool";
|
|
706
705
|
stoppedByDelegate: "stoppedByDelegate";
|
|
707
|
-
stoppedByExceededMaxSteps: "stoppedByExceededMaxSteps";
|
|
708
706
|
stoppedByError: "stoppedByError";
|
|
709
707
|
stoppedByCancellation: "stoppedByCancellation";
|
|
710
708
|
}>;
|
|
@@ -1202,7 +1200,11 @@ interface Expert {
|
|
|
1202
1200
|
/** Provider tool options (e.g., webSearch maxUses, allowedDomains) */
|
|
1203
1201
|
providerToolOptions?: ProviderToolOptions;
|
|
1204
1202
|
}
|
|
1205
|
-
|
|
1203
|
+
/**
|
|
1204
|
+
* Base object schema for Expert. Use this for `.omit()` / `.pick()` operations.
|
|
1205
|
+
* For parsing with delegation validation, use `expertSchema` instead.
|
|
1206
|
+
*/
|
|
1207
|
+
declare const expertBaseSchema: z.ZodObject<{
|
|
1206
1208
|
key: z.ZodString;
|
|
1207
1209
|
name: z.ZodString;
|
|
1208
1210
|
version: z.ZodString;
|
|
@@ -1210,13 +1212,13 @@ declare const expertSchema: z.ZodObject<{
|
|
|
1210
1212
|
instruction: z.ZodString;
|
|
1211
1213
|
skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1212
1214
|
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
1213
|
-
command: z.ZodString;
|
|
1214
|
-
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1215
1215
|
description: z.ZodOptional<z.ZodString>;
|
|
1216
1216
|
rule: z.ZodOptional<z.ZodString>;
|
|
1217
1217
|
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1218
1218
|
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1219
|
+
command: z.ZodString;
|
|
1219
1220
|
packageName: z.ZodOptional<z.ZodString>;
|
|
1221
|
+
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1220
1222
|
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1221
1223
|
}, z.core.$strip>, z.ZodObject<{
|
|
1222
1224
|
type: z.ZodLiteral<"mcpSseSkill">;
|
|
@@ -1227,6 +1229,8 @@ declare const expertSchema: z.ZodObject<{
|
|
|
1227
1229
|
endpoint: z.ZodString;
|
|
1228
1230
|
}, z.core.$strip>, z.ZodObject<{
|
|
1229
1231
|
type: z.ZodLiteral<"interactiveSkill">;
|
|
1232
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1233
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
1230
1234
|
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1231
1235
|
description: z.ZodOptional<z.ZodString>;
|
|
1232
1236
|
inputJsonSchema: z.ZodString;
|
|
@@ -1240,8 +1244,6 @@ declare const expertSchema: z.ZodObject<{
|
|
|
1240
1244
|
inputJsonSchema: string;
|
|
1241
1245
|
description?: string | undefined;
|
|
1242
1246
|
}>>>;
|
|
1243
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1244
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
1245
1247
|
}, z.core.$strip>], "type">>>>, z.ZodTransform<{
|
|
1246
1248
|
[k: string]: {
|
|
1247
1249
|
type: "mcpStdioSkill";
|
|
@@ -1277,10 +1279,147 @@ declare const expertSchema: z.ZodObject<{
|
|
|
1277
1279
|
};
|
|
1278
1280
|
}, Record<string, {
|
|
1279
1281
|
type: "mcpStdioSkill";
|
|
1282
|
+
pick: string[];
|
|
1283
|
+
omit: string[];
|
|
1280
1284
|
command: string;
|
|
1281
1285
|
args: string[];
|
|
1286
|
+
requiredEnv: string[];
|
|
1287
|
+
description?: string | undefined;
|
|
1288
|
+
rule?: string | undefined;
|
|
1289
|
+
packageName?: string | undefined;
|
|
1290
|
+
} | {
|
|
1291
|
+
type: "mcpSseSkill";
|
|
1282
1292
|
pick: string[];
|
|
1283
1293
|
omit: string[];
|
|
1294
|
+
endpoint: string;
|
|
1295
|
+
description?: string | undefined;
|
|
1296
|
+
rule?: string | undefined;
|
|
1297
|
+
} | {
|
|
1298
|
+
type: "interactiveSkill";
|
|
1299
|
+
tools: {
|
|
1300
|
+
[k: string]: {
|
|
1301
|
+
name: string;
|
|
1302
|
+
inputJsonSchema: string;
|
|
1303
|
+
description?: string | undefined;
|
|
1304
|
+
};
|
|
1305
|
+
};
|
|
1306
|
+
description?: string | undefined;
|
|
1307
|
+
rule?: string | undefined;
|
|
1308
|
+
}>>>;
|
|
1309
|
+
delegates: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1310
|
+
tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1311
|
+
minRuntimeVersion: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<`v${number}.${number}`, string>>>;
|
|
1312
|
+
providerTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1313
|
+
providerSkills: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1314
|
+
type: z.ZodLiteral<"builtin">;
|
|
1315
|
+
skillId: z.ZodEnum<{
|
|
1316
|
+
pdf: "pdf";
|
|
1317
|
+
docx: "docx";
|
|
1318
|
+
pptx: "pptx";
|
|
1319
|
+
xlsx: "xlsx";
|
|
1320
|
+
}>;
|
|
1321
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1322
|
+
type: z.ZodLiteral<"custom">;
|
|
1323
|
+
name: z.ZodString;
|
|
1324
|
+
definition: z.ZodString;
|
|
1325
|
+
}, z.core.$strip>], "type">>>;
|
|
1326
|
+
providerToolOptions: z.ZodOptional<z.ZodObject<{
|
|
1327
|
+
webSearch: z.ZodOptional<z.ZodObject<{
|
|
1328
|
+
maxUses: z.ZodOptional<z.ZodNumber>;
|
|
1329
|
+
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1330
|
+
}, z.core.$strip>>;
|
|
1331
|
+
webFetch: z.ZodOptional<z.ZodObject<{
|
|
1332
|
+
maxUses: z.ZodOptional<z.ZodNumber>;
|
|
1333
|
+
}, z.core.$strip>>;
|
|
1334
|
+
fileSearch: z.ZodOptional<z.ZodObject<{
|
|
1335
|
+
vectorStoreIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1336
|
+
maxNumResults: z.ZodOptional<z.ZodNumber>;
|
|
1337
|
+
}, z.core.$strip>>;
|
|
1338
|
+
}, z.core.$strip>>;
|
|
1339
|
+
}, z.core.$strip>;
|
|
1340
|
+
/**
|
|
1341
|
+
* Expert schema with delegation rule validation.
|
|
1342
|
+
* Rejects self-delegation, out-of-scope delegates, and delegate-to-own-coordinator.
|
|
1343
|
+
*/
|
|
1344
|
+
declare const expertSchema: z.ZodObject<{
|
|
1345
|
+
key: z.ZodString;
|
|
1346
|
+
name: z.ZodString;
|
|
1347
|
+
version: z.ZodString;
|
|
1348
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1349
|
+
instruction: z.ZodString;
|
|
1350
|
+
skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1351
|
+
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
1352
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1353
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
1354
|
+
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1355
|
+
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1356
|
+
command: z.ZodString;
|
|
1357
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
1358
|
+
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1359
|
+
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1360
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1361
|
+
type: z.ZodLiteral<"mcpSseSkill">;
|
|
1362
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1363
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
1364
|
+
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1365
|
+
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1366
|
+
endpoint: z.ZodString;
|
|
1367
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1368
|
+
type: z.ZodLiteral<"interactiveSkill">;
|
|
1369
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1370
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
1371
|
+
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1372
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1373
|
+
inputJsonSchema: z.ZodString;
|
|
1374
|
+
}, z.core.$strip>>, z.ZodTransform<{
|
|
1375
|
+
[k: string]: {
|
|
1376
|
+
name: string;
|
|
1377
|
+
inputJsonSchema: string;
|
|
1378
|
+
description?: string | undefined;
|
|
1379
|
+
};
|
|
1380
|
+
}, Record<string, {
|
|
1381
|
+
inputJsonSchema: string;
|
|
1382
|
+
description?: string | undefined;
|
|
1383
|
+
}>>>;
|
|
1384
|
+
}, z.core.$strip>], "type">>>>, z.ZodTransform<{
|
|
1385
|
+
[k: string]: {
|
|
1386
|
+
type: "mcpStdioSkill";
|
|
1387
|
+
name: string;
|
|
1388
|
+
pick: string[];
|
|
1389
|
+
omit: string[];
|
|
1390
|
+
command: string;
|
|
1391
|
+
args: string[];
|
|
1392
|
+
requiredEnv: string[];
|
|
1393
|
+
description?: string | undefined;
|
|
1394
|
+
rule?: string | undefined;
|
|
1395
|
+
packageName?: string | undefined;
|
|
1396
|
+
} | {
|
|
1397
|
+
type: "mcpSseSkill";
|
|
1398
|
+
name: string;
|
|
1399
|
+
pick: string[];
|
|
1400
|
+
omit: string[];
|
|
1401
|
+
endpoint: string;
|
|
1402
|
+
description?: string | undefined;
|
|
1403
|
+
rule?: string | undefined;
|
|
1404
|
+
} | {
|
|
1405
|
+
type: "interactiveSkill";
|
|
1406
|
+
name: string;
|
|
1407
|
+
tools: {
|
|
1408
|
+
[k: string]: {
|
|
1409
|
+
name: string;
|
|
1410
|
+
inputJsonSchema: string;
|
|
1411
|
+
description?: string | undefined;
|
|
1412
|
+
};
|
|
1413
|
+
};
|
|
1414
|
+
description?: string | undefined;
|
|
1415
|
+
rule?: string | undefined;
|
|
1416
|
+
};
|
|
1417
|
+
}, Record<string, {
|
|
1418
|
+
type: "mcpStdioSkill";
|
|
1419
|
+
pick: string[];
|
|
1420
|
+
omit: string[];
|
|
1421
|
+
command: string;
|
|
1422
|
+
args: string[];
|
|
1284
1423
|
requiredEnv: string[];
|
|
1285
1424
|
description?: string | undefined;
|
|
1286
1425
|
rule?: string | undefined;
|
|
@@ -1552,8 +1691,6 @@ interface PerstackConfig {
|
|
|
1552
1691
|
model?: string;
|
|
1553
1692
|
/** Reasoning budget for native LLM reasoning (extended thinking) */
|
|
1554
1693
|
reasoningBudget?: ReasoningBudget;
|
|
1555
|
-
/** Maximum steps per run */
|
|
1556
|
-
maxSteps?: number;
|
|
1557
1694
|
/** Maximum retries on generation failure */
|
|
1558
1695
|
maxRetries?: number;
|
|
1559
1696
|
/** Timeout per generation in milliseconds */
|
|
@@ -1632,7 +1769,6 @@ declare const perstackConfigSchema: z.ZodObject<{
|
|
|
1632
1769
|
medium: "medium";
|
|
1633
1770
|
high: "high";
|
|
1634
1771
|
}>, z.ZodNumber]>>;
|
|
1635
|
-
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
1636
1772
|
maxRetries: z.ZodOptional<z.ZodNumber>;
|
|
1637
1773
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
1638
1774
|
experts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -2323,8 +2459,6 @@ interface RunSetting {
|
|
|
2323
2459
|
experts: Record<string, Expert>;
|
|
2324
2460
|
/** Reasoning budget for native LLM reasoning (extended thinking). Defaults to "low". Use "none" or 0 to disable. */
|
|
2325
2461
|
reasoningBudget: ReasoningBudget;
|
|
2326
|
-
/** Maximum steps before stopping (applies to Job's totalSteps) */
|
|
2327
|
-
maxSteps: number;
|
|
2328
2462
|
/** Maximum retries on generation failure */
|
|
2329
2463
|
maxRetries: number;
|
|
2330
2464
|
/** Timeout per generation in milliseconds */
|
|
@@ -2374,7 +2508,6 @@ type RunParamsInput = {
|
|
|
2374
2508
|
input: RunInput;
|
|
2375
2509
|
experts?: Record<string, ExpertInput>;
|
|
2376
2510
|
reasoningBudget?: ReasoningBudget;
|
|
2377
|
-
maxSteps?: number;
|
|
2378
2511
|
maxRetries?: number;
|
|
2379
2512
|
timeout?: number;
|
|
2380
2513
|
startedAt?: number;
|
|
@@ -2458,13 +2591,13 @@ declare const runSettingSchema: z.ZodObject<{
|
|
|
2458
2591
|
instruction: z.ZodString;
|
|
2459
2592
|
skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2460
2593
|
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
2461
|
-
command: z.ZodString;
|
|
2462
|
-
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2463
2594
|
description: z.ZodOptional<z.ZodString>;
|
|
2464
2595
|
rule: z.ZodOptional<z.ZodString>;
|
|
2465
2596
|
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2466
2597
|
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2598
|
+
command: z.ZodString;
|
|
2467
2599
|
packageName: z.ZodOptional<z.ZodString>;
|
|
2600
|
+
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2468
2601
|
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2469
2602
|
}, z.core.$strip>, z.ZodObject<{
|
|
2470
2603
|
type: z.ZodLiteral<"mcpSseSkill">;
|
|
@@ -2475,6 +2608,8 @@ declare const runSettingSchema: z.ZodObject<{
|
|
|
2475
2608
|
endpoint: z.ZodString;
|
|
2476
2609
|
}, z.core.$strip>, z.ZodObject<{
|
|
2477
2610
|
type: z.ZodLiteral<"interactiveSkill">;
|
|
2611
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2612
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
2478
2613
|
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2479
2614
|
description: z.ZodOptional<z.ZodString>;
|
|
2480
2615
|
inputJsonSchema: z.ZodString;
|
|
@@ -2488,8 +2623,6 @@ declare const runSettingSchema: z.ZodObject<{
|
|
|
2488
2623
|
inputJsonSchema: string;
|
|
2489
2624
|
description?: string | undefined;
|
|
2490
2625
|
}>>>;
|
|
2491
|
-
description: z.ZodOptional<z.ZodString>;
|
|
2492
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
2493
2626
|
}, z.core.$strip>], "type">>>>, z.ZodTransform<{
|
|
2494
2627
|
[k: string]: {
|
|
2495
2628
|
type: "mcpStdioSkill";
|
|
@@ -2525,10 +2658,10 @@ declare const runSettingSchema: z.ZodObject<{
|
|
|
2525
2658
|
};
|
|
2526
2659
|
}, Record<string, {
|
|
2527
2660
|
type: "mcpStdioSkill";
|
|
2528
|
-
command: string;
|
|
2529
|
-
args: string[];
|
|
2530
2661
|
pick: string[];
|
|
2531
2662
|
omit: string[];
|
|
2663
|
+
command: string;
|
|
2664
|
+
args: string[];
|
|
2532
2665
|
requiredEnv: string[];
|
|
2533
2666
|
description?: string | undefined;
|
|
2534
2667
|
rule?: string | undefined;
|
|
@@ -2590,7 +2723,6 @@ declare const runSettingSchema: z.ZodObject<{
|
|
|
2590
2723
|
medium: "medium";
|
|
2591
2724
|
high: "high";
|
|
2592
2725
|
}>, z.ZodNumber]>>;
|
|
2593
|
-
maxSteps: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
2594
2726
|
maxRetries: z.ZodNumber;
|
|
2595
2727
|
timeout: z.ZodNumber;
|
|
2596
2728
|
startedAt: z.ZodNumber;
|
|
@@ -2666,9 +2798,6 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2666
2798
|
}, z.core.$strip>>;
|
|
2667
2799
|
}, z.core.$strip>;
|
|
2668
2800
|
experts: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2669
|
-
name: z.ZodString;
|
|
2670
|
-
description: z.ZodOptional<z.ZodString>;
|
|
2671
|
-
version: z.ZodString;
|
|
2672
2801
|
providerToolOptions: z.ZodOptional<z.ZodObject<{
|
|
2673
2802
|
webSearch: z.ZodOptional<z.ZodObject<{
|
|
2674
2803
|
maxUses: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2682,16 +2811,19 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2682
2811
|
maxNumResults: z.ZodOptional<z.ZodNumber>;
|
|
2683
2812
|
}, z.core.$strip>>;
|
|
2684
2813
|
}, z.core.$strip>>;
|
|
2814
|
+
name: z.ZodString;
|
|
2815
|
+
version: z.ZodString;
|
|
2816
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2685
2817
|
instruction: z.ZodString;
|
|
2686
2818
|
skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2687
2819
|
type: z.ZodLiteral<"mcpStdioSkill">;
|
|
2688
|
-
command: z.ZodString;
|
|
2689
|
-
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2690
2820
|
description: z.ZodOptional<z.ZodString>;
|
|
2691
2821
|
rule: z.ZodOptional<z.ZodString>;
|
|
2692
2822
|
pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2693
2823
|
omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2824
|
+
command: z.ZodString;
|
|
2694
2825
|
packageName: z.ZodOptional<z.ZodString>;
|
|
2826
|
+
args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2695
2827
|
requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
2696
2828
|
}, z.core.$strip>, z.ZodObject<{
|
|
2697
2829
|
type: z.ZodLiteral<"mcpSseSkill">;
|
|
@@ -2702,6 +2834,8 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2702
2834
|
endpoint: z.ZodString;
|
|
2703
2835
|
}, z.core.$strip>, z.ZodObject<{
|
|
2704
2836
|
type: z.ZodLiteral<"interactiveSkill">;
|
|
2837
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2838
|
+
rule: z.ZodOptional<z.ZodString>;
|
|
2705
2839
|
tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
2706
2840
|
description: z.ZodOptional<z.ZodString>;
|
|
2707
2841
|
inputJsonSchema: z.ZodString;
|
|
@@ -2715,8 +2849,6 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2715
2849
|
inputJsonSchema: string;
|
|
2716
2850
|
description?: string | undefined;
|
|
2717
2851
|
}>>>;
|
|
2718
|
-
description: z.ZodOptional<z.ZodString>;
|
|
2719
|
-
rule: z.ZodOptional<z.ZodString>;
|
|
2720
2852
|
}, z.core.$strip>], "type">>>>, z.ZodTransform<{
|
|
2721
2853
|
[k: string]: {
|
|
2722
2854
|
type: "mcpStdioSkill";
|
|
@@ -2752,10 +2884,10 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2752
2884
|
};
|
|
2753
2885
|
}, Record<string, {
|
|
2754
2886
|
type: "mcpStdioSkill";
|
|
2755
|
-
command: string;
|
|
2756
|
-
args: string[];
|
|
2757
2887
|
pick: string[];
|
|
2758
2888
|
omit: string[];
|
|
2889
|
+
command: string;
|
|
2890
|
+
args: string[];
|
|
2759
2891
|
requiredEnv: string[];
|
|
2760
2892
|
description?: string | undefined;
|
|
2761
2893
|
rule?: string | undefined;
|
|
@@ -2904,7 +3036,6 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2904
3036
|
delegates: string[];
|
|
2905
3037
|
tags: string[];
|
|
2906
3038
|
minRuntimeVersion: `v${number}.${number}`;
|
|
2907
|
-
description?: string | undefined;
|
|
2908
3039
|
providerToolOptions?: {
|
|
2909
3040
|
webSearch?: {
|
|
2910
3041
|
maxUses?: number | undefined;
|
|
@@ -2918,6 +3049,7 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2918
3049
|
maxNumResults?: number | undefined;
|
|
2919
3050
|
} | undefined;
|
|
2920
3051
|
} | undefined;
|
|
3052
|
+
description?: string | undefined;
|
|
2921
3053
|
providerTools?: string[] | undefined;
|
|
2922
3054
|
providerSkills?: ({
|
|
2923
3055
|
type: "builtin";
|
|
@@ -2935,7 +3067,6 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2935
3067
|
medium: "medium";
|
|
2936
3068
|
high: "high";
|
|
2937
3069
|
}>, z.ZodNumber]>>>;
|
|
2938
|
-
maxSteps: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
2939
3070
|
maxRetries: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
2940
3071
|
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
2941
3072
|
startedAt: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -2952,12 +3083,11 @@ declare const runParamsSchema: z.ZodObject<{
|
|
|
2952
3083
|
jobId: z.ZodString;
|
|
2953
3084
|
runId: z.ZodString;
|
|
2954
3085
|
status: z.ZodEnum<{
|
|
2955
|
-
completed: "completed";
|
|
2956
3086
|
init: "init";
|
|
2957
3087
|
proceeding: "proceeding";
|
|
3088
|
+
completed: "completed";
|
|
2958
3089
|
stoppedByInteractiveTool: "stoppedByInteractiveTool";
|
|
2959
3090
|
stoppedByDelegate: "stoppedByDelegate";
|
|
2960
|
-
stoppedByExceededMaxSteps: "stoppedByExceededMaxSteps";
|
|
2961
3091
|
stoppedByError: "stoppedByError";
|
|
2962
3092
|
stoppedByCancellation: "stoppedByCancellation";
|
|
2963
3093
|
}>;
|
|
@@ -3239,10 +3369,6 @@ type ExpertStatePayloads = {
|
|
|
3239
3369
|
checkpoint: Checkpoint;
|
|
3240
3370
|
step: Step;
|
|
3241
3371
|
};
|
|
3242
|
-
stopRunByExceededMaxSteps: {
|
|
3243
|
-
checkpoint: Checkpoint;
|
|
3244
|
-
step: Step;
|
|
3245
|
-
};
|
|
3246
3372
|
stopRunByError: {
|
|
3247
3373
|
checkpoint: Checkpoint;
|
|
3248
3374
|
step: Step;
|
|
@@ -3332,7 +3458,7 @@ declare const startRun: (setting: RunSetting, checkpoint: Checkpoint, data: Omit
|
|
|
3332
3458
|
} & {
|
|
3333
3459
|
initialCheckpoint: Checkpoint;
|
|
3334
3460
|
inputMessages: (InstructionMessage | UserMessage | ToolMessage)[];
|
|
3335
|
-
}, "
|
|
3461
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3336
3462
|
type: "startRun";
|
|
3337
3463
|
} & {
|
|
3338
3464
|
initialCheckpoint: Checkpoint;
|
|
@@ -3342,7 +3468,7 @@ declare const resumeFromStop: (setting: RunSetting, checkpoint: Checkpoint, data
|
|
|
3342
3468
|
type: "resumeFromStop";
|
|
3343
3469
|
} & {
|
|
3344
3470
|
checkpoint: Checkpoint;
|
|
3345
|
-
}, "
|
|
3471
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3346
3472
|
type: "resumeFromStop";
|
|
3347
3473
|
} & {
|
|
3348
3474
|
checkpoint: Checkpoint;
|
|
@@ -3352,7 +3478,7 @@ declare const proceedToInteractiveTools: (setting: RunSetting, checkpoint: Check
|
|
|
3352
3478
|
} & {
|
|
3353
3479
|
pendingToolCalls: ToolCall[];
|
|
3354
3480
|
partialToolResults: ToolResult[];
|
|
3355
|
-
}, "
|
|
3481
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3356
3482
|
type: "proceedToInteractiveTools";
|
|
3357
3483
|
} & {
|
|
3358
3484
|
pendingToolCalls: ToolCall[];
|
|
@@ -3362,7 +3488,7 @@ declare const startGeneration: (setting: RunSetting, checkpoint: Checkpoint, dat
|
|
|
3362
3488
|
type: "startGeneration";
|
|
3363
3489
|
} & {
|
|
3364
3490
|
messages: Message[];
|
|
3365
|
-
}, "
|
|
3491
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3366
3492
|
type: "startGeneration";
|
|
3367
3493
|
} & {
|
|
3368
3494
|
messages: Message[];
|
|
@@ -3375,7 +3501,7 @@ declare const retry: (setting: RunSetting, checkpoint: Checkpoint, data: Omit<Ba
|
|
|
3375
3501
|
toolCalls?: ToolCall[];
|
|
3376
3502
|
toolResults?: ToolResult[];
|
|
3377
3503
|
usage: Usage;
|
|
3378
|
-
}, "
|
|
3504
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3379
3505
|
type: "retry";
|
|
3380
3506
|
} & {
|
|
3381
3507
|
reason: string;
|
|
@@ -3390,7 +3516,7 @@ declare const callTools: (setting: RunSetting, checkpoint: Checkpoint, data: Omi
|
|
|
3390
3516
|
newMessage: ExpertMessage;
|
|
3391
3517
|
toolCalls: ToolCall[];
|
|
3392
3518
|
usage: Usage;
|
|
3393
|
-
}, "
|
|
3519
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3394
3520
|
type: "callTools";
|
|
3395
3521
|
} & {
|
|
3396
3522
|
newMessage: ExpertMessage;
|
|
@@ -3402,7 +3528,7 @@ declare const finishMcpTools: (setting: RunSetting, checkpoint: Checkpoint, data
|
|
|
3402
3528
|
} & {
|
|
3403
3529
|
partialToolResults: ToolResult[];
|
|
3404
3530
|
pendingToolCalls: ToolCall[];
|
|
3405
|
-
}, "
|
|
3531
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3406
3532
|
type: "finishMcpTools";
|
|
3407
3533
|
} & {
|
|
3408
3534
|
partialToolResults: ToolResult[];
|
|
@@ -3410,14 +3536,14 @@ declare const finishMcpTools: (setting: RunSetting, checkpoint: Checkpoint, data
|
|
|
3410
3536
|
};
|
|
3411
3537
|
declare const skipDelegates: (setting: RunSetting, checkpoint: Checkpoint, data: Omit<BaseEvent & {
|
|
3412
3538
|
type: "skipDelegates";
|
|
3413
|
-
} & object, "
|
|
3539
|
+
} & object, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3414
3540
|
type: "skipDelegates";
|
|
3415
3541
|
} & object;
|
|
3416
3542
|
declare const resolveToolResults: (setting: RunSetting, checkpoint: Checkpoint, data: Omit<BaseEvent & {
|
|
3417
3543
|
type: "resolveToolResults";
|
|
3418
3544
|
} & {
|
|
3419
3545
|
toolResults: ToolResult[];
|
|
3420
|
-
}, "
|
|
3546
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3421
3547
|
type: "resolveToolResults";
|
|
3422
3548
|
} & {
|
|
3423
3549
|
toolResults: ToolResult[];
|
|
@@ -3426,7 +3552,7 @@ declare const finishToolCall: (setting: RunSetting, checkpoint: Checkpoint, data
|
|
|
3426
3552
|
type: "finishToolCall";
|
|
3427
3553
|
} & {
|
|
3428
3554
|
newMessages: (UserMessage | ToolMessage)[];
|
|
3429
|
-
}, "
|
|
3555
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3430
3556
|
type: "finishToolCall";
|
|
3431
3557
|
} & {
|
|
3432
3558
|
newMessages: (UserMessage | ToolMessage)[];
|
|
@@ -3436,7 +3562,7 @@ declare const resumeToolCalls: (setting: RunSetting, checkpoint: Checkpoint, dat
|
|
|
3436
3562
|
} & {
|
|
3437
3563
|
pendingToolCalls: ToolCall[];
|
|
3438
3564
|
partialToolResults: ToolResult[];
|
|
3439
|
-
}, "
|
|
3565
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3440
3566
|
type: "resumeToolCalls";
|
|
3441
3567
|
} & {
|
|
3442
3568
|
pendingToolCalls: ToolCall[];
|
|
@@ -3449,7 +3575,7 @@ declare const completeRun: (setting: RunSetting, checkpoint: Checkpoint, data: O
|
|
|
3449
3575
|
step: Step;
|
|
3450
3576
|
text: string;
|
|
3451
3577
|
usage: Usage;
|
|
3452
|
-
}, "
|
|
3578
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3453
3579
|
type: "completeRun";
|
|
3454
3580
|
} & {
|
|
3455
3581
|
checkpoint: Checkpoint;
|
|
@@ -3462,7 +3588,7 @@ declare const stopRunByInteractiveTool: (setting: RunSetting, checkpoint: Checkp
|
|
|
3462
3588
|
} & {
|
|
3463
3589
|
checkpoint: Checkpoint;
|
|
3464
3590
|
step: Step;
|
|
3465
|
-
}, "
|
|
3591
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3466
3592
|
type: "stopRunByInteractiveTool";
|
|
3467
3593
|
} & {
|
|
3468
3594
|
checkpoint: Checkpoint;
|
|
@@ -3473,23 +3599,12 @@ declare const stopRunByDelegate: (setting: RunSetting, checkpoint: Checkpoint, d
|
|
|
3473
3599
|
} & {
|
|
3474
3600
|
checkpoint: Checkpoint;
|
|
3475
3601
|
step: Step;
|
|
3476
|
-
}, "
|
|
3602
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3477
3603
|
type: "stopRunByDelegate";
|
|
3478
3604
|
} & {
|
|
3479
3605
|
checkpoint: Checkpoint;
|
|
3480
3606
|
step: Step;
|
|
3481
3607
|
};
|
|
3482
|
-
declare const stopRunByExceededMaxSteps: (setting: RunSetting, checkpoint: Checkpoint, data: Omit<BaseEvent & {
|
|
3483
|
-
type: "stopRunByExceededMaxSteps";
|
|
3484
|
-
} & {
|
|
3485
|
-
checkpoint: Checkpoint;
|
|
3486
|
-
step: Step;
|
|
3487
|
-
}, "id" | "expertKey" | "runId" | "type" | "jobId" | "stepNumber" | "timestamp">) => BaseEvent & {
|
|
3488
|
-
type: "stopRunByExceededMaxSteps";
|
|
3489
|
-
} & {
|
|
3490
|
-
checkpoint: Checkpoint;
|
|
3491
|
-
step: Step;
|
|
3492
|
-
};
|
|
3493
3608
|
declare const stopRunByError: (setting: RunSetting, checkpoint: Checkpoint, data: Omit<BaseEvent & {
|
|
3494
3609
|
type: "stopRunByError";
|
|
3495
3610
|
} & {
|
|
@@ -3501,7 +3616,7 @@ declare const stopRunByError: (setting: RunSetting, checkpoint: Checkpoint, data
|
|
|
3501
3616
|
statusCode?: number;
|
|
3502
3617
|
isRetryable: boolean;
|
|
3503
3618
|
};
|
|
3504
|
-
}, "
|
|
3619
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3505
3620
|
type: "stopRunByError";
|
|
3506
3621
|
} & {
|
|
3507
3622
|
checkpoint: Checkpoint;
|
|
@@ -3519,7 +3634,7 @@ declare const continueToNextStep: (setting: RunSetting, checkpoint: Checkpoint,
|
|
|
3519
3634
|
checkpoint: Checkpoint;
|
|
3520
3635
|
step: Step;
|
|
3521
3636
|
nextCheckpoint: Checkpoint;
|
|
3522
|
-
}, "
|
|
3637
|
+
}, "type" | "id" | "jobId" | "runId" | "stepNumber" | "expertKey" | "timestamp">) => BaseEvent & {
|
|
3523
3638
|
type: "continueToNextStep";
|
|
3524
3639
|
} & {
|
|
3525
3640
|
checkpoint: Checkpoint;
|
|
@@ -3544,7 +3659,6 @@ type RuntimeEventPayloads = {
|
|
|
3544
3659
|
expertName: string;
|
|
3545
3660
|
experts: string[];
|
|
3546
3661
|
model: string;
|
|
3547
|
-
maxSteps?: number;
|
|
3548
3662
|
maxRetries: number;
|
|
3549
3663
|
timeout: number;
|
|
3550
3664
|
query?: string;
|
|
@@ -3626,7 +3740,6 @@ declare const expertNameRegex: RegExp;
|
|
|
3626
3740
|
declare const expertVersionRegex: RegExp;
|
|
3627
3741
|
declare const tagNameRegex: RegExp;
|
|
3628
3742
|
declare const maxExpertNameLength = 255;
|
|
3629
|
-
declare const defaultMaxSteps = 100;
|
|
3630
3743
|
declare const defaultMaxRetries = 5;
|
|
3631
3744
|
declare const defaultTimeout: number;
|
|
3632
3745
|
declare const maxSkillNameLength = 255;
|
|
@@ -5805,14 +5918,13 @@ declare const activityOrGroupSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnio
|
|
|
5805
5918
|
}, z.core.$strip>]>;
|
|
5806
5919
|
//#endregion
|
|
5807
5920
|
//#region src/schemas/job.d.ts
|
|
5808
|
-
type JobStatus = "running" | "completed" | "
|
|
5921
|
+
type JobStatus = "running" | "completed" | "stoppedByInteractiveTool" | "stoppedByError" | "stoppedByCancellation";
|
|
5809
5922
|
declare const jobStatusSchema: z.ZodEnum<{
|
|
5810
5923
|
completed: "completed";
|
|
5811
5924
|
stoppedByInteractiveTool: "stoppedByInteractiveTool";
|
|
5812
5925
|
stoppedByError: "stoppedByError";
|
|
5813
5926
|
stoppedByCancellation: "stoppedByCancellation";
|
|
5814
5927
|
running: "running";
|
|
5815
|
-
stoppedByMaxSteps: "stoppedByMaxSteps";
|
|
5816
5928
|
}>;
|
|
5817
5929
|
interface Job {
|
|
5818
5930
|
id: string;
|
|
@@ -5820,7 +5932,6 @@ interface Job {
|
|
|
5820
5932
|
coordinatorExpertKey: string;
|
|
5821
5933
|
runtimeVersion: RuntimeVersion;
|
|
5822
5934
|
totalSteps: number;
|
|
5823
|
-
maxSteps?: number;
|
|
5824
5935
|
usage: Usage;
|
|
5825
5936
|
startedAt: number;
|
|
5826
5937
|
finishedAt?: number;
|
|
@@ -5833,12 +5944,10 @@ declare const jobSchema: z.ZodObject<{
|
|
|
5833
5944
|
stoppedByError: "stoppedByError";
|
|
5834
5945
|
stoppedByCancellation: "stoppedByCancellation";
|
|
5835
5946
|
running: "running";
|
|
5836
|
-
stoppedByMaxSteps: "stoppedByMaxSteps";
|
|
5837
5947
|
}>;
|
|
5838
5948
|
coordinatorExpertKey: z.ZodString;
|
|
5839
5949
|
runtimeVersion: z.ZodPipe<z.ZodString, z.ZodTransform<`v${number}.${number}`, string>>;
|
|
5840
5950
|
totalSteps: z.ZodNumber;
|
|
5841
|
-
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
5842
5951
|
usage: z.ZodObject<{
|
|
5843
5952
|
inputTokens: z.ZodNumber;
|
|
5844
5953
|
outputTokens: z.ZodNumber;
|
|
@@ -6003,8 +6112,6 @@ interface CommandOptions {
|
|
|
6003
6112
|
model?: string;
|
|
6004
6113
|
/** Reasoning budget for native LLM reasoning (extended thinking) */
|
|
6005
6114
|
reasoningBudget?: ReasoningBudget;
|
|
6006
|
-
/** Maximum steps */
|
|
6007
|
-
maxSteps?: number;
|
|
6008
6115
|
/** Maximum retries */
|
|
6009
6116
|
maxRetries?: number;
|
|
6010
6117
|
/** Timeout in milliseconds */
|
|
@@ -6060,7 +6167,6 @@ declare const runCommandInputSchema: z.ZodObject<{
|
|
|
6060
6167
|
medium: "medium";
|
|
6061
6168
|
high: "high";
|
|
6062
6169
|
}>, z.ZodNumber]>>>;
|
|
6063
|
-
maxSteps: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
6064
6170
|
maxRetries: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
6065
6171
|
timeout: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
6066
6172
|
jobId: z.ZodOptional<z.ZodString>;
|
|
@@ -6106,7 +6212,6 @@ declare const startCommandInputSchema: z.ZodObject<{
|
|
|
6106
6212
|
medium: "medium";
|
|
6107
6213
|
high: "high";
|
|
6108
6214
|
}>, z.ZodNumber]>>>;
|
|
6109
|
-
maxSteps: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
6110
6215
|
maxRetries: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
6111
6216
|
timeout: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | undefined, string | undefined>>;
|
|
6112
6217
|
jobId: z.ZodOptional<z.ZodString>;
|
|
@@ -6212,9 +6317,42 @@ declare function validateEventFilter(filter: string[]): string[];
|
|
|
6212
6317
|
*/
|
|
6213
6318
|
declare function createFilteredEventListener(listener: (event: PerstackEvent) => void, allowedTypes: Set<string>): (event: PerstackEvent) => void;
|
|
6214
6319
|
//#endregion
|
|
6320
|
+
//#region src/utils/expert-type.d.ts
|
|
6321
|
+
type ExpertType = "coordinator" | "delegate";
|
|
6322
|
+
declare function getExpertType(expertName: string): ExpertType;
|
|
6323
|
+
declare function isCoordinatorExpert(expertName: string): boolean;
|
|
6324
|
+
declare function isDelegateExpert(expertName: string): boolean;
|
|
6325
|
+
/**
|
|
6326
|
+
* Returns the scope of an expert.
|
|
6327
|
+
* - Coordinator "game-producer" -> "game-producer"
|
|
6328
|
+
* - Delegate "@game-producer/designer" -> "game-producer"
|
|
6329
|
+
*/
|
|
6330
|
+
declare function getExpertScope(expertName: string): string;
|
|
6331
|
+
/**
|
|
6332
|
+
* Returns the short name of an expert.
|
|
6333
|
+
* - Coordinator "game-producer" -> "game-producer"
|
|
6334
|
+
* - Delegate "@game-producer/designer" -> "designer"
|
|
6335
|
+
*/
|
|
6336
|
+
declare function getExpertShortName(expertName: string): string;
|
|
6337
|
+
/**
|
|
6338
|
+
* Validates whether a delegation from source to target is allowed.
|
|
6339
|
+
* Returns null if valid, an error message string if invalid.
|
|
6340
|
+
*
|
|
6341
|
+
* Rules:
|
|
6342
|
+
* - No self-delegation
|
|
6343
|
+
* - If target is a delegate (@scope/name), source must be in the same scope
|
|
6344
|
+
* - A delegate cannot delegate to its own coordinator
|
|
6345
|
+
*/
|
|
6346
|
+
declare function validateDelegation(source: string, target: string): string | null;
|
|
6347
|
+
/**
|
|
6348
|
+
* Validates all delegations for an expert.
|
|
6349
|
+
* Returns an array of error messages (empty if all valid).
|
|
6350
|
+
*/
|
|
6351
|
+
declare function validateAllDelegations(expertName: string, delegates: string[]): string[];
|
|
6352
|
+
//#endregion
|
|
6215
6353
|
//#region src/utils/zod-error.d.ts
|
|
6216
6354
|
declare function formatZodError(error: ZodError): string;
|
|
6217
6355
|
declare function parseWithFriendlyError<T>(schema: ZodSchema<T>, data: unknown, context?: string): T;
|
|
6218
6356
|
//#endregion
|
|
6219
|
-
export { Activity, ActivityOrGroup, ActivityType, AddDelegateActivity, AddSkillActivity, AmazonBedrockProviderConfig, AnthropicProviderConfig, AnthropicProviderSkill, AnthropicProviderToolName, AttemptCompletionActivity, AzureOpenAIProviderToolName, AzureOpenAiProviderConfig, BASE_SKILL_PREFIX, BaseEvent, BasePart, BuiltinAnthropicSkill, CallToolResultContent, Checkpoint, CheckpointStatus, ClearTodoActivity, CommandOptions, CompleteActivity, type CreateCheckpointParams, CreateExpertActivity, CustomAnthropicSkill, DeepseekProviderConfig, DelegateActivity, DelegateSkillManagerParams, DelegationCompleteActivity, DelegationTarget, EditTextFileActivity, ErrorActivity, EventForType, EventType, ExecActivity, Expert, ExpertMessage, ExpertStateEvent, ExpertStateEventType, FileBinaryPart, FileInlinePart, FileUrlPart, GeneralToolActivity, GetActivitiesParams, GoogleGenerativeAiProviderConfig, GoogleProviderToolName, GoogleVertexProviderConfig, Headers, ImageBinaryPart, ImageInlinePart, ImageUrlPart, InstructionMessage, InteractiveSkill, InteractiveSkillManagerParams, InteractiveTool, InteractiveToolActivity, Job, JobStatus, Lockfile, LockfileExpert, LockfileToolDefinition, McpSkillManagerParams, McpSseSkill, McpStdioSkill, Message, MessagePart, OllamaProviderConfig, OpenAIProviderToolName, OpenAiProviderConfig, ParallelActivitiesGroup, PerstackConfig, PerstackConfigExpert, PerstackConfigSkill, PerstackError, PerstackEvent, ProviderConfig, ProviderName, ProviderTable, ProviderToolOptions, QueryActivity, ReadImageFileActivity, ReadPdfFileActivity, ReadTextFileActivity, ReasoningBudget, RemoveDelegateActivity, RemoveSkillActivity, Resource, RetryActivity, RunCommandInput, RunEvent, RunInput, RunParams, RunParamsInput, RunSetting, RuntimeEvent, RuntimeEventForType, RuntimeEventType, RuntimeVersion, SAFE_ENV_VARS, Skill, SkillManagerParams, SkillType, StartCommandInput, Step, StreamingEvent, StreamingEventType, TextPart, ThinkingPart, TodoActivity, ToolCall, ToolCallPart, ToolDefinition, ToolMessage, ToolResult, ToolResultPart, Usage, UserMessage, VertexProviderToolName, WriteTextFileActivity, activityOrGroupSchema, activitySchema, addDelegateActivitySchema, addSkillActivitySchema, amazonBedrockProviderConfigSchema, anthropicProviderConfigSchema, anthropicProviderSkillSchema, anthropicProviderToolNameSchema, attemptCompletionActivitySchema, azureOpenAIProviderToolNameSchema, azureOpenAiProviderConfigSchema, basePartSchema, builtinAnthropicSkillSchema, callTools, checkpointSchema, checkpointStatusSchema, clearTodoActivitySchema, completeActivitySchema, completeRun, continueToNextStep, createBaseToolActivity, createCallToolsEvent, createCompleteRunEvent, createEmptyUsage, createEvent, createExpertActivitySchema, createFilteredEventListener, createGeneralToolActivity, createNormalizedCheckpoint, createResolveToolResultsEvent, createRuntimeEvent, createRuntimeInitEvent, createStartRunEvent, createStreamingEvent, createToolMessage, customAnthropicSkillSchema, deepseekProviderConfigSchema, defaultMaxRetries,
|
|
6357
|
+
export { Activity, ActivityOrGroup, ActivityType, AddDelegateActivity, AddSkillActivity, AmazonBedrockProviderConfig, AnthropicProviderConfig, AnthropicProviderSkill, AnthropicProviderToolName, AttemptCompletionActivity, AzureOpenAIProviderToolName, AzureOpenAiProviderConfig, BASE_SKILL_PREFIX, BaseEvent, BasePart, BuiltinAnthropicSkill, CallToolResultContent, Checkpoint, CheckpointStatus, ClearTodoActivity, CommandOptions, CompleteActivity, type CreateCheckpointParams, CreateExpertActivity, CustomAnthropicSkill, DeepseekProviderConfig, DelegateActivity, DelegateSkillManagerParams, DelegationCompleteActivity, DelegationTarget, EditTextFileActivity, ErrorActivity, EventForType, EventType, ExecActivity, Expert, ExpertMessage, ExpertStateEvent, ExpertStateEventType, ExpertType, FileBinaryPart, FileInlinePart, FileUrlPart, GeneralToolActivity, GetActivitiesParams, GoogleGenerativeAiProviderConfig, GoogleProviderToolName, GoogleVertexProviderConfig, Headers, ImageBinaryPart, ImageInlinePart, ImageUrlPart, InstructionMessage, InteractiveSkill, InteractiveSkillManagerParams, InteractiveTool, InteractiveToolActivity, Job, JobStatus, Lockfile, LockfileExpert, LockfileToolDefinition, McpSkillManagerParams, McpSseSkill, McpStdioSkill, Message, MessagePart, OllamaProviderConfig, OpenAIProviderToolName, OpenAiProviderConfig, ParallelActivitiesGroup, PerstackConfig, PerstackConfigExpert, PerstackConfigSkill, PerstackError, PerstackEvent, ProviderConfig, ProviderName, ProviderTable, ProviderToolOptions, QueryActivity, ReadImageFileActivity, ReadPdfFileActivity, ReadTextFileActivity, ReasoningBudget, RemoveDelegateActivity, RemoveSkillActivity, Resource, RetryActivity, RunCommandInput, RunEvent, RunInput, RunParams, RunParamsInput, RunSetting, RuntimeEvent, RuntimeEventForType, RuntimeEventType, RuntimeVersion, SAFE_ENV_VARS, Skill, SkillManagerParams, SkillType, StartCommandInput, Step, StreamingEvent, StreamingEventType, TextPart, ThinkingPart, TodoActivity, ToolCall, ToolCallPart, ToolDefinition, ToolMessage, ToolResult, ToolResultPart, Usage, UserMessage, VertexProviderToolName, WriteTextFileActivity, activityOrGroupSchema, activitySchema, addDelegateActivitySchema, addSkillActivitySchema, amazonBedrockProviderConfigSchema, anthropicProviderConfigSchema, anthropicProviderSkillSchema, anthropicProviderToolNameSchema, attemptCompletionActivitySchema, azureOpenAIProviderToolNameSchema, azureOpenAiProviderConfigSchema, basePartSchema, builtinAnthropicSkillSchema, callTools, checkpointSchema, checkpointStatusSchema, clearTodoActivitySchema, completeActivitySchema, completeRun, continueToNextStep, createBaseToolActivity, createCallToolsEvent, createCompleteRunEvent, createEmptyUsage, createEvent, createExpertActivitySchema, createFilteredEventListener, createGeneralToolActivity, createNormalizedCheckpoint, createResolveToolResultsEvent, createRuntimeEvent, createRuntimeInitEvent, createStartRunEvent, createStreamingEvent, createToolMessage, customAnthropicSkillSchema, deepseekProviderConfigSchema, defaultMaxRetries, defaultPerstackApiBaseUrl, defaultReasoningBudget, defaultTimeout, delegateActivitySchema, delegationCompleteActivitySchema, delegationTargetSchema, domainPatternSchema, editTextFileActivitySchema, errorActivitySchema, execActivitySchema, expertBaseSchema, expertKeyRegex, expertMessageSchema, expertNameRegex, expertSchema, expertVersionRegex, fileBinaryPartSchema, fileInlinePartSchema, fileSearchOptionsSchema, fileUrlPartSchema, finishMcpTools, finishToolCall, formatZodError, generalToolActivitySchema, getActivities, getExpertScope, getExpertShortName, getExpertType, getFilteredEnv, googleGenerativeAiProviderConfigSchema, googleProviderToolNameSchema, googleVertexProviderConfigSchema, headersSchema, imageBinaryPartSchema, imageInlinePartSchema, imageUrlPartSchema, instructionMessageSchema, interactiveSkillSchema, interactiveToolActivitySchema, interactiveToolSchema, isCoordinatorExpert, isDelegateExpert, isPrivateOrLocalIP, isValidEventType, isValidRuntimeEventType, jobSchema, jobStatusSchema, knownModels, lockfileExpertSchema, lockfileSchema, lockfileToolDefinitionSchema, maxExpertNameLength, maxSkillNameLength, maxSkillToolNameLength, mcpSseSkillSchema, mcpStdioSkillSchema, messagePartSchema, messageSchema, ollamaProviderConfigSchema, openAiProviderConfigSchema, openaiProviderToolNameSchema, parallelActivitiesGroupSchema, parseExpertKey, parseWithFriendlyError, perstackConfigSchema, proceedToInteractiveTools, providerConfigSchema, providerNameSchema, providerTableSchema, providerToolOptionsSchema, queryActivitySchema, readImageFileActivitySchema, readPdfFileActivitySchema, readTextFileActivitySchema, reasoningBudgetSchema, removeDelegateActivitySchema, removeSkillActivitySchema, resolveToolResults, resumeFromStop, resumeToolCalls, retry, retryActivitySchema, runCommandInputSchema, runParamsSchema, runSettingSchema, runtimeVersionSchema, skillSchema, skipDelegates, startCommandInputSchema, startGeneration, startRun, stepSchema, stopRunByDelegate, stopRunByError, stopRunByInteractiveTool, tagNameRegex, textPartSchema, thinkingPartSchema, todoActivitySchema, toolCallPartSchema, toolCallSchema, toolMessageSchema, toolResultPartSchema, toolResultSchema, usageSchema, userMessageSchema, validateAllDelegations, validateDelegation, validateEventFilter, vertexProviderToolNameSchema, webFetchOptionsSchema, webSearchOptionsSchema, writeTextFileActivitySchema };
|
|
6220
6358
|
//# sourceMappingURL=index.d.ts.map
|