@agent-phonon/protocol 0.6.1 → 0.8.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/schemas/methods.d.ts +1071 -3
- package/dist/schemas/methods.d.ts.map +1 -1
- package/dist/schemas/methods.js +55 -2
- package/dist/schemas/methods.js.map +1 -1
- package/dist/schemas/project.d.ts +447 -0
- package/dist/schemas/project.d.ts.map +1 -1
- package/dist/schemas/project.js +165 -0
- package/dist/schemas/project.js.map +1 -1
- package/dist/schemas/workflow.d.ts +927 -3
- package/dist/schemas/workflow.d.ts.map +1 -1
- package/dist/schemas/workflow.js +93 -0
- package/dist/schemas/workflow.js.map +1 -1
- package/package.json +1 -1
- package/src/schemas/methods.ts +67 -0
- package/src/schemas/project.ts +198 -0
- package/src/schemas/workflow.ts +111 -0
|
@@ -1311,6 +1311,55 @@ export declare const WorkflowResumeFrom: z.ZodObject<{
|
|
|
1311
1311
|
rerunNodes?: string[] | undefined;
|
|
1312
1312
|
}>;
|
|
1313
1313
|
export type WorkflowResumeFrom = z.infer<typeof WorkflowResumeFrom>;
|
|
1314
|
+
/**
|
|
1315
|
+
* workflow.resume:独立 method(v0.7),取代之前用 workflow.run.resumeFrom 偷渡的方式。
|
|
1316
|
+
* resumeFrom 字段保留向后兼容,但 SDK 优先使用 workflow.resume。
|
|
1317
|
+
*/
|
|
1318
|
+
export declare const WorkflowResumeParams: z.ZodObject<{
|
|
1319
|
+
workflowId: z.ZodString;
|
|
1320
|
+
strategy: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"last_success_dependents">, z.ZodLiteral<"failed_node">, z.ZodString]>>;
|
|
1321
|
+
rerunNodes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1322
|
+
/** 可选:附加给 executor 的反馈文本(HITL 后特别有用) */
|
|
1323
|
+
feedback: z.ZodOptional<z.ZodString>;
|
|
1324
|
+
/** 可选:恢复时调整 sharedContext */
|
|
1325
|
+
sharedContextPatch: z.ZodOptional<z.ZodObject<{
|
|
1326
|
+
/** 直接文本:phonon 原样追加到每个 node 的 systemPrompt。 */
|
|
1327
|
+
text: z.ZodOptional<z.ZodString>;
|
|
1328
|
+
/** workspace 相对路径列表(受 policy 沙箱);phonon 读取后拼成 markdown 段追加到 systemPrompt。 */
|
|
1329
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1330
|
+
/** 注入位置:prepend 在最前,append 在最后,默认 append。 */
|
|
1331
|
+
placement: z.ZodDefault<z.ZodEnum<["prepend", "append"]>>;
|
|
1332
|
+
}, "strip", z.ZodTypeAny, {
|
|
1333
|
+
placement: "prepend" | "append";
|
|
1334
|
+
text?: string | undefined;
|
|
1335
|
+
files?: string[] | undefined;
|
|
1336
|
+
}, {
|
|
1337
|
+
text?: string | undefined;
|
|
1338
|
+
files?: string[] | undefined;
|
|
1339
|
+
placement?: "prepend" | "append" | undefined;
|
|
1340
|
+
}>>;
|
|
1341
|
+
}, "strip", z.ZodTypeAny, {
|
|
1342
|
+
strategy: string;
|
|
1343
|
+
workflowId: string;
|
|
1344
|
+
rerunNodes?: string[] | undefined;
|
|
1345
|
+
feedback?: string | undefined;
|
|
1346
|
+
sharedContextPatch?: {
|
|
1347
|
+
placement: "prepend" | "append";
|
|
1348
|
+
text?: string | undefined;
|
|
1349
|
+
files?: string[] | undefined;
|
|
1350
|
+
} | undefined;
|
|
1351
|
+
}, {
|
|
1352
|
+
workflowId: string;
|
|
1353
|
+
strategy?: string | undefined;
|
|
1354
|
+
rerunNodes?: string[] | undefined;
|
|
1355
|
+
feedback?: string | undefined;
|
|
1356
|
+
sharedContextPatch?: {
|
|
1357
|
+
text?: string | undefined;
|
|
1358
|
+
files?: string[] | undefined;
|
|
1359
|
+
placement?: "prepend" | "append" | undefined;
|
|
1360
|
+
} | undefined;
|
|
1361
|
+
}>;
|
|
1362
|
+
export type WorkflowResumeParams = z.infer<typeof WorkflowResumeParams>;
|
|
1314
1363
|
export declare const WorkflowRunParams: z.ZodObject<{
|
|
1315
1364
|
/**
|
|
1316
1365
|
* 默认 project。可以省略,但如果某个 node 也没传 project,phonon 会拒接。
|
|
@@ -2167,12 +2216,42 @@ export declare const WorkflowNodeResult: z.ZodObject<{
|
|
|
2167
2216
|
usage: z.ZodOptional<z.ZodObject<{
|
|
2168
2217
|
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
2169
2218
|
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
2219
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
2220
|
+
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
2221
|
+
toolCalls: z.ZodOptional<z.ZodNumber>;
|
|
2222
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
2223
|
+
costEstimate: z.ZodOptional<z.ZodObject<{
|
|
2224
|
+
amount: z.ZodNumber;
|
|
2225
|
+
currency: z.ZodEnum<["USD", "CNY"]>;
|
|
2226
|
+
}, "strip", z.ZodTypeAny, {
|
|
2227
|
+
amount: number;
|
|
2228
|
+
currency: "USD" | "CNY";
|
|
2229
|
+
}, {
|
|
2230
|
+
amount: number;
|
|
2231
|
+
currency: "USD" | "CNY";
|
|
2232
|
+
}>>;
|
|
2170
2233
|
}, "strip", z.ZodTypeAny, {
|
|
2171
2234
|
inputTokens?: number | undefined;
|
|
2172
2235
|
outputTokens?: number | undefined;
|
|
2236
|
+
durationMs?: number | undefined;
|
|
2237
|
+
cachedTokens?: number | undefined;
|
|
2238
|
+
reasoningTokens?: number | undefined;
|
|
2239
|
+
toolCalls?: number | undefined;
|
|
2240
|
+
costEstimate?: {
|
|
2241
|
+
amount: number;
|
|
2242
|
+
currency: "USD" | "CNY";
|
|
2243
|
+
} | undefined;
|
|
2173
2244
|
}, {
|
|
2174
2245
|
inputTokens?: number | undefined;
|
|
2175
2246
|
outputTokens?: number | undefined;
|
|
2247
|
+
durationMs?: number | undefined;
|
|
2248
|
+
cachedTokens?: number | undefined;
|
|
2249
|
+
reasoningTokens?: number | undefined;
|
|
2250
|
+
toolCalls?: number | undefined;
|
|
2251
|
+
costEstimate?: {
|
|
2252
|
+
amount: number;
|
|
2253
|
+
currency: "USD" | "CNY";
|
|
2254
|
+
} | undefined;
|
|
2176
2255
|
}>>;
|
|
2177
2256
|
}, "strip", z.ZodTypeAny, {
|
|
2178
2257
|
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
@@ -2180,6 +2259,14 @@ export declare const WorkflowNodeResult: z.ZodObject<{
|
|
|
2180
2259
|
usage?: {
|
|
2181
2260
|
inputTokens?: number | undefined;
|
|
2182
2261
|
outputTokens?: number | undefined;
|
|
2262
|
+
durationMs?: number | undefined;
|
|
2263
|
+
cachedTokens?: number | undefined;
|
|
2264
|
+
reasoningTokens?: number | undefined;
|
|
2265
|
+
toolCalls?: number | undefined;
|
|
2266
|
+
costEstimate?: {
|
|
2267
|
+
amount: number;
|
|
2268
|
+
currency: "USD" | "CNY";
|
|
2269
|
+
} | undefined;
|
|
2183
2270
|
} | undefined;
|
|
2184
2271
|
}, {
|
|
2185
2272
|
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
@@ -2187,6 +2274,14 @@ export declare const WorkflowNodeResult: z.ZodObject<{
|
|
|
2187
2274
|
usage?: {
|
|
2188
2275
|
inputTokens?: number | undefined;
|
|
2189
2276
|
outputTokens?: number | undefined;
|
|
2277
|
+
durationMs?: number | undefined;
|
|
2278
|
+
cachedTokens?: number | undefined;
|
|
2279
|
+
reasoningTokens?: number | undefined;
|
|
2280
|
+
toolCalls?: number | undefined;
|
|
2281
|
+
costEstimate?: {
|
|
2282
|
+
amount: number;
|
|
2283
|
+
currency: "USD" | "CNY";
|
|
2284
|
+
} | undefined;
|
|
2190
2285
|
} | undefined;
|
|
2191
2286
|
}>;
|
|
2192
2287
|
export type WorkflowNodeResult = z.infer<typeof WorkflowNodeResult>;
|
|
@@ -2207,12 +2302,42 @@ export declare const WorkflowNodeRuntime: z.ZodObject<{
|
|
|
2207
2302
|
usage: z.ZodOptional<z.ZodObject<{
|
|
2208
2303
|
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
2209
2304
|
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
2305
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
2306
|
+
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
2307
|
+
toolCalls: z.ZodOptional<z.ZodNumber>;
|
|
2308
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
2309
|
+
costEstimate: z.ZodOptional<z.ZodObject<{
|
|
2310
|
+
amount: z.ZodNumber;
|
|
2311
|
+
currency: z.ZodEnum<["USD", "CNY"]>;
|
|
2312
|
+
}, "strip", z.ZodTypeAny, {
|
|
2313
|
+
amount: number;
|
|
2314
|
+
currency: "USD" | "CNY";
|
|
2315
|
+
}, {
|
|
2316
|
+
amount: number;
|
|
2317
|
+
currency: "USD" | "CNY";
|
|
2318
|
+
}>>;
|
|
2210
2319
|
}, "strip", z.ZodTypeAny, {
|
|
2211
2320
|
inputTokens?: number | undefined;
|
|
2212
2321
|
outputTokens?: number | undefined;
|
|
2322
|
+
durationMs?: number | undefined;
|
|
2323
|
+
cachedTokens?: number | undefined;
|
|
2324
|
+
reasoningTokens?: number | undefined;
|
|
2325
|
+
toolCalls?: number | undefined;
|
|
2326
|
+
costEstimate?: {
|
|
2327
|
+
amount: number;
|
|
2328
|
+
currency: "USD" | "CNY";
|
|
2329
|
+
} | undefined;
|
|
2213
2330
|
}, {
|
|
2214
2331
|
inputTokens?: number | undefined;
|
|
2215
2332
|
outputTokens?: number | undefined;
|
|
2333
|
+
durationMs?: number | undefined;
|
|
2334
|
+
cachedTokens?: number | undefined;
|
|
2335
|
+
reasoningTokens?: number | undefined;
|
|
2336
|
+
toolCalls?: number | undefined;
|
|
2337
|
+
costEstimate?: {
|
|
2338
|
+
amount: number;
|
|
2339
|
+
currency: "USD" | "CNY";
|
|
2340
|
+
} | undefined;
|
|
2216
2341
|
}>>;
|
|
2217
2342
|
}, "strip", z.ZodTypeAny, {
|
|
2218
2343
|
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
@@ -2220,6 +2345,14 @@ export declare const WorkflowNodeRuntime: z.ZodObject<{
|
|
|
2220
2345
|
usage?: {
|
|
2221
2346
|
inputTokens?: number | undefined;
|
|
2222
2347
|
outputTokens?: number | undefined;
|
|
2348
|
+
durationMs?: number | undefined;
|
|
2349
|
+
cachedTokens?: number | undefined;
|
|
2350
|
+
reasoningTokens?: number | undefined;
|
|
2351
|
+
toolCalls?: number | undefined;
|
|
2352
|
+
costEstimate?: {
|
|
2353
|
+
amount: number;
|
|
2354
|
+
currency: "USD" | "CNY";
|
|
2355
|
+
} | undefined;
|
|
2223
2356
|
} | undefined;
|
|
2224
2357
|
}, {
|
|
2225
2358
|
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
@@ -2227,6 +2360,14 @@ export declare const WorkflowNodeRuntime: z.ZodObject<{
|
|
|
2227
2360
|
usage?: {
|
|
2228
2361
|
inputTokens?: number | undefined;
|
|
2229
2362
|
outputTokens?: number | undefined;
|
|
2363
|
+
durationMs?: number | undefined;
|
|
2364
|
+
cachedTokens?: number | undefined;
|
|
2365
|
+
reasoningTokens?: number | undefined;
|
|
2366
|
+
toolCalls?: number | undefined;
|
|
2367
|
+
costEstimate?: {
|
|
2368
|
+
amount: number;
|
|
2369
|
+
currency: "USD" | "CNY";
|
|
2370
|
+
} | undefined;
|
|
2230
2371
|
} | undefined;
|
|
2231
2372
|
}>>;
|
|
2232
2373
|
/** 该节点完成的轮次计数(discussion 用;DAG/Graph 一次执行 = 1)。 */
|
|
@@ -2245,6 +2386,14 @@ export declare const WorkflowNodeRuntime: z.ZodObject<{
|
|
|
2245
2386
|
usage?: {
|
|
2246
2387
|
inputTokens?: number | undefined;
|
|
2247
2388
|
outputTokens?: number | undefined;
|
|
2389
|
+
durationMs?: number | undefined;
|
|
2390
|
+
cachedTokens?: number | undefined;
|
|
2391
|
+
reasoningTokens?: number | undefined;
|
|
2392
|
+
toolCalls?: number | undefined;
|
|
2393
|
+
costEstimate?: {
|
|
2394
|
+
amount: number;
|
|
2395
|
+
currency: "USD" | "CNY";
|
|
2396
|
+
} | undefined;
|
|
2248
2397
|
} | undefined;
|
|
2249
2398
|
} | undefined;
|
|
2250
2399
|
error?: string | undefined;
|
|
@@ -2265,6 +2414,14 @@ export declare const WorkflowNodeRuntime: z.ZodObject<{
|
|
|
2265
2414
|
usage?: {
|
|
2266
2415
|
inputTokens?: number | undefined;
|
|
2267
2416
|
outputTokens?: number | undefined;
|
|
2417
|
+
durationMs?: number | undefined;
|
|
2418
|
+
cachedTokens?: number | undefined;
|
|
2419
|
+
reasoningTokens?: number | undefined;
|
|
2420
|
+
toolCalls?: number | undefined;
|
|
2421
|
+
costEstimate?: {
|
|
2422
|
+
amount: number;
|
|
2423
|
+
currency: "USD" | "CNY";
|
|
2424
|
+
} | undefined;
|
|
2268
2425
|
} | undefined;
|
|
2269
2426
|
} | undefined;
|
|
2270
2427
|
error?: string | undefined;
|
|
@@ -2304,12 +2461,42 @@ export declare const WorkflowStatusResult: z.ZodObject<{
|
|
|
2304
2461
|
usage: z.ZodOptional<z.ZodObject<{
|
|
2305
2462
|
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
2306
2463
|
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
2464
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
2465
|
+
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
2466
|
+
toolCalls: z.ZodOptional<z.ZodNumber>;
|
|
2467
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
2468
|
+
costEstimate: z.ZodOptional<z.ZodObject<{
|
|
2469
|
+
amount: z.ZodNumber;
|
|
2470
|
+
currency: z.ZodEnum<["USD", "CNY"]>;
|
|
2471
|
+
}, "strip", z.ZodTypeAny, {
|
|
2472
|
+
amount: number;
|
|
2473
|
+
currency: "USD" | "CNY";
|
|
2474
|
+
}, {
|
|
2475
|
+
amount: number;
|
|
2476
|
+
currency: "USD" | "CNY";
|
|
2477
|
+
}>>;
|
|
2307
2478
|
}, "strip", z.ZodTypeAny, {
|
|
2308
2479
|
inputTokens?: number | undefined;
|
|
2309
2480
|
outputTokens?: number | undefined;
|
|
2481
|
+
durationMs?: number | undefined;
|
|
2482
|
+
cachedTokens?: number | undefined;
|
|
2483
|
+
reasoningTokens?: number | undefined;
|
|
2484
|
+
toolCalls?: number | undefined;
|
|
2485
|
+
costEstimate?: {
|
|
2486
|
+
amount: number;
|
|
2487
|
+
currency: "USD" | "CNY";
|
|
2488
|
+
} | undefined;
|
|
2310
2489
|
}, {
|
|
2311
2490
|
inputTokens?: number | undefined;
|
|
2312
2491
|
outputTokens?: number | undefined;
|
|
2492
|
+
durationMs?: number | undefined;
|
|
2493
|
+
cachedTokens?: number | undefined;
|
|
2494
|
+
reasoningTokens?: number | undefined;
|
|
2495
|
+
toolCalls?: number | undefined;
|
|
2496
|
+
costEstimate?: {
|
|
2497
|
+
amount: number;
|
|
2498
|
+
currency: "USD" | "CNY";
|
|
2499
|
+
} | undefined;
|
|
2313
2500
|
}>>;
|
|
2314
2501
|
}, "strip", z.ZodTypeAny, {
|
|
2315
2502
|
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
@@ -2317,6 +2504,14 @@ export declare const WorkflowStatusResult: z.ZodObject<{
|
|
|
2317
2504
|
usage?: {
|
|
2318
2505
|
inputTokens?: number | undefined;
|
|
2319
2506
|
outputTokens?: number | undefined;
|
|
2507
|
+
durationMs?: number | undefined;
|
|
2508
|
+
cachedTokens?: number | undefined;
|
|
2509
|
+
reasoningTokens?: number | undefined;
|
|
2510
|
+
toolCalls?: number | undefined;
|
|
2511
|
+
costEstimate?: {
|
|
2512
|
+
amount: number;
|
|
2513
|
+
currency: "USD" | "CNY";
|
|
2514
|
+
} | undefined;
|
|
2320
2515
|
} | undefined;
|
|
2321
2516
|
}, {
|
|
2322
2517
|
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
@@ -2324,6 +2519,14 @@ export declare const WorkflowStatusResult: z.ZodObject<{
|
|
|
2324
2519
|
usage?: {
|
|
2325
2520
|
inputTokens?: number | undefined;
|
|
2326
2521
|
outputTokens?: number | undefined;
|
|
2522
|
+
durationMs?: number | undefined;
|
|
2523
|
+
cachedTokens?: number | undefined;
|
|
2524
|
+
reasoningTokens?: number | undefined;
|
|
2525
|
+
toolCalls?: number | undefined;
|
|
2526
|
+
costEstimate?: {
|
|
2527
|
+
amount: number;
|
|
2528
|
+
currency: "USD" | "CNY";
|
|
2529
|
+
} | undefined;
|
|
2327
2530
|
} | undefined;
|
|
2328
2531
|
}>>;
|
|
2329
2532
|
/** 该节点完成的轮次计数(discussion 用;DAG/Graph 一次执行 = 1)。 */
|
|
@@ -2342,6 +2545,14 @@ export declare const WorkflowStatusResult: z.ZodObject<{
|
|
|
2342
2545
|
usage?: {
|
|
2343
2546
|
inputTokens?: number | undefined;
|
|
2344
2547
|
outputTokens?: number | undefined;
|
|
2548
|
+
durationMs?: number | undefined;
|
|
2549
|
+
cachedTokens?: number | undefined;
|
|
2550
|
+
reasoningTokens?: number | undefined;
|
|
2551
|
+
toolCalls?: number | undefined;
|
|
2552
|
+
costEstimate?: {
|
|
2553
|
+
amount: number;
|
|
2554
|
+
currency: "USD" | "CNY";
|
|
2555
|
+
} | undefined;
|
|
2345
2556
|
} | undefined;
|
|
2346
2557
|
} | undefined;
|
|
2347
2558
|
error?: string | undefined;
|
|
@@ -2362,6 +2573,14 @@ export declare const WorkflowStatusResult: z.ZodObject<{
|
|
|
2362
2573
|
usage?: {
|
|
2363
2574
|
inputTokens?: number | undefined;
|
|
2364
2575
|
outputTokens?: number | undefined;
|
|
2576
|
+
durationMs?: number | undefined;
|
|
2577
|
+
cachedTokens?: number | undefined;
|
|
2578
|
+
reasoningTokens?: number | undefined;
|
|
2579
|
+
toolCalls?: number | undefined;
|
|
2580
|
+
costEstimate?: {
|
|
2581
|
+
amount: number;
|
|
2582
|
+
currency: "USD" | "CNY";
|
|
2583
|
+
} | undefined;
|
|
2365
2584
|
} | undefined;
|
|
2366
2585
|
} | undefined;
|
|
2367
2586
|
error?: string | undefined;
|
|
@@ -2396,6 +2615,14 @@ export declare const WorkflowStatusResult: z.ZodObject<{
|
|
|
2396
2615
|
usage?: {
|
|
2397
2616
|
inputTokens?: number | undefined;
|
|
2398
2617
|
outputTokens?: number | undefined;
|
|
2618
|
+
durationMs?: number | undefined;
|
|
2619
|
+
cachedTokens?: number | undefined;
|
|
2620
|
+
reasoningTokens?: number | undefined;
|
|
2621
|
+
toolCalls?: number | undefined;
|
|
2622
|
+
costEstimate?: {
|
|
2623
|
+
amount: number;
|
|
2624
|
+
currency: "USD" | "CNY";
|
|
2625
|
+
} | undefined;
|
|
2399
2626
|
} | undefined;
|
|
2400
2627
|
} | undefined;
|
|
2401
2628
|
error?: string | undefined;
|
|
@@ -2428,6 +2655,14 @@ export declare const WorkflowStatusResult: z.ZodObject<{
|
|
|
2428
2655
|
usage?: {
|
|
2429
2656
|
inputTokens?: number | undefined;
|
|
2430
2657
|
outputTokens?: number | undefined;
|
|
2658
|
+
durationMs?: number | undefined;
|
|
2659
|
+
cachedTokens?: number | undefined;
|
|
2660
|
+
reasoningTokens?: number | undefined;
|
|
2661
|
+
toolCalls?: number | undefined;
|
|
2662
|
+
costEstimate?: {
|
|
2663
|
+
amount: number;
|
|
2664
|
+
currency: "USD" | "CNY";
|
|
2665
|
+
} | undefined;
|
|
2431
2666
|
} | undefined;
|
|
2432
2667
|
} | undefined;
|
|
2433
2668
|
error?: string | undefined;
|
|
@@ -2511,12 +2746,42 @@ export declare const WorkflowListResult: z.ZodObject<{
|
|
|
2511
2746
|
usage: z.ZodOptional<z.ZodObject<{
|
|
2512
2747
|
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
2513
2748
|
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
2749
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
2750
|
+
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
2751
|
+
toolCalls: z.ZodOptional<z.ZodNumber>;
|
|
2752
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
2753
|
+
costEstimate: z.ZodOptional<z.ZodObject<{
|
|
2754
|
+
amount: z.ZodNumber;
|
|
2755
|
+
currency: z.ZodEnum<["USD", "CNY"]>;
|
|
2756
|
+
}, "strip", z.ZodTypeAny, {
|
|
2757
|
+
amount: number;
|
|
2758
|
+
currency: "USD" | "CNY";
|
|
2759
|
+
}, {
|
|
2760
|
+
amount: number;
|
|
2761
|
+
currency: "USD" | "CNY";
|
|
2762
|
+
}>>;
|
|
2514
2763
|
}, "strip", z.ZodTypeAny, {
|
|
2515
2764
|
inputTokens?: number | undefined;
|
|
2516
2765
|
outputTokens?: number | undefined;
|
|
2766
|
+
durationMs?: number | undefined;
|
|
2767
|
+
cachedTokens?: number | undefined;
|
|
2768
|
+
reasoningTokens?: number | undefined;
|
|
2769
|
+
toolCalls?: number | undefined;
|
|
2770
|
+
costEstimate?: {
|
|
2771
|
+
amount: number;
|
|
2772
|
+
currency: "USD" | "CNY";
|
|
2773
|
+
} | undefined;
|
|
2517
2774
|
}, {
|
|
2518
2775
|
inputTokens?: number | undefined;
|
|
2519
2776
|
outputTokens?: number | undefined;
|
|
2777
|
+
durationMs?: number | undefined;
|
|
2778
|
+
cachedTokens?: number | undefined;
|
|
2779
|
+
reasoningTokens?: number | undefined;
|
|
2780
|
+
toolCalls?: number | undefined;
|
|
2781
|
+
costEstimate?: {
|
|
2782
|
+
amount: number;
|
|
2783
|
+
currency: "USD" | "CNY";
|
|
2784
|
+
} | undefined;
|
|
2520
2785
|
}>>;
|
|
2521
2786
|
}, "strip", z.ZodTypeAny, {
|
|
2522
2787
|
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
@@ -2524,6 +2789,14 @@ export declare const WorkflowListResult: z.ZodObject<{
|
|
|
2524
2789
|
usage?: {
|
|
2525
2790
|
inputTokens?: number | undefined;
|
|
2526
2791
|
outputTokens?: number | undefined;
|
|
2792
|
+
durationMs?: number | undefined;
|
|
2793
|
+
cachedTokens?: number | undefined;
|
|
2794
|
+
reasoningTokens?: number | undefined;
|
|
2795
|
+
toolCalls?: number | undefined;
|
|
2796
|
+
costEstimate?: {
|
|
2797
|
+
amount: number;
|
|
2798
|
+
currency: "USD" | "CNY";
|
|
2799
|
+
} | undefined;
|
|
2527
2800
|
} | undefined;
|
|
2528
2801
|
}, {
|
|
2529
2802
|
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
@@ -2531,6 +2804,14 @@ export declare const WorkflowListResult: z.ZodObject<{
|
|
|
2531
2804
|
usage?: {
|
|
2532
2805
|
inputTokens?: number | undefined;
|
|
2533
2806
|
outputTokens?: number | undefined;
|
|
2807
|
+
durationMs?: number | undefined;
|
|
2808
|
+
cachedTokens?: number | undefined;
|
|
2809
|
+
reasoningTokens?: number | undefined;
|
|
2810
|
+
toolCalls?: number | undefined;
|
|
2811
|
+
costEstimate?: {
|
|
2812
|
+
amount: number;
|
|
2813
|
+
currency: "USD" | "CNY";
|
|
2814
|
+
} | undefined;
|
|
2534
2815
|
} | undefined;
|
|
2535
2816
|
}>>;
|
|
2536
2817
|
/** 该节点完成的轮次计数(discussion 用;DAG/Graph 一次执行 = 1)。 */
|
|
@@ -2549,6 +2830,14 @@ export declare const WorkflowListResult: z.ZodObject<{
|
|
|
2549
2830
|
usage?: {
|
|
2550
2831
|
inputTokens?: number | undefined;
|
|
2551
2832
|
outputTokens?: number | undefined;
|
|
2833
|
+
durationMs?: number | undefined;
|
|
2834
|
+
cachedTokens?: number | undefined;
|
|
2835
|
+
reasoningTokens?: number | undefined;
|
|
2836
|
+
toolCalls?: number | undefined;
|
|
2837
|
+
costEstimate?: {
|
|
2838
|
+
amount: number;
|
|
2839
|
+
currency: "USD" | "CNY";
|
|
2840
|
+
} | undefined;
|
|
2552
2841
|
} | undefined;
|
|
2553
2842
|
} | undefined;
|
|
2554
2843
|
error?: string | undefined;
|
|
@@ -2569,6 +2858,14 @@ export declare const WorkflowListResult: z.ZodObject<{
|
|
|
2569
2858
|
usage?: {
|
|
2570
2859
|
inputTokens?: number | undefined;
|
|
2571
2860
|
outputTokens?: number | undefined;
|
|
2861
|
+
durationMs?: number | undefined;
|
|
2862
|
+
cachedTokens?: number | undefined;
|
|
2863
|
+
reasoningTokens?: number | undefined;
|
|
2864
|
+
toolCalls?: number | undefined;
|
|
2865
|
+
costEstimate?: {
|
|
2866
|
+
amount: number;
|
|
2867
|
+
currency: "USD" | "CNY";
|
|
2868
|
+
} | undefined;
|
|
2572
2869
|
} | undefined;
|
|
2573
2870
|
} | undefined;
|
|
2574
2871
|
error?: string | undefined;
|
|
@@ -2603,6 +2900,14 @@ export declare const WorkflowListResult: z.ZodObject<{
|
|
|
2603
2900
|
usage?: {
|
|
2604
2901
|
inputTokens?: number | undefined;
|
|
2605
2902
|
outputTokens?: number | undefined;
|
|
2903
|
+
durationMs?: number | undefined;
|
|
2904
|
+
cachedTokens?: number | undefined;
|
|
2905
|
+
reasoningTokens?: number | undefined;
|
|
2906
|
+
toolCalls?: number | undefined;
|
|
2907
|
+
costEstimate?: {
|
|
2908
|
+
amount: number;
|
|
2909
|
+
currency: "USD" | "CNY";
|
|
2910
|
+
} | undefined;
|
|
2606
2911
|
} | undefined;
|
|
2607
2912
|
} | undefined;
|
|
2608
2913
|
error?: string | undefined;
|
|
@@ -2635,6 +2940,14 @@ export declare const WorkflowListResult: z.ZodObject<{
|
|
|
2635
2940
|
usage?: {
|
|
2636
2941
|
inputTokens?: number | undefined;
|
|
2637
2942
|
outputTokens?: number | undefined;
|
|
2943
|
+
durationMs?: number | undefined;
|
|
2944
|
+
cachedTokens?: number | undefined;
|
|
2945
|
+
reasoningTokens?: number | undefined;
|
|
2946
|
+
toolCalls?: number | undefined;
|
|
2947
|
+
costEstimate?: {
|
|
2948
|
+
amount: number;
|
|
2949
|
+
currency: "USD" | "CNY";
|
|
2950
|
+
} | undefined;
|
|
2638
2951
|
} | undefined;
|
|
2639
2952
|
} | undefined;
|
|
2640
2953
|
error?: string | undefined;
|
|
@@ -2670,6 +2983,14 @@ export declare const WorkflowListResult: z.ZodObject<{
|
|
|
2670
2983
|
usage?: {
|
|
2671
2984
|
inputTokens?: number | undefined;
|
|
2672
2985
|
outputTokens?: number | undefined;
|
|
2986
|
+
durationMs?: number | undefined;
|
|
2987
|
+
cachedTokens?: number | undefined;
|
|
2988
|
+
reasoningTokens?: number | undefined;
|
|
2989
|
+
toolCalls?: number | undefined;
|
|
2990
|
+
costEstimate?: {
|
|
2991
|
+
amount: number;
|
|
2992
|
+
currency: "USD" | "CNY";
|
|
2993
|
+
} | undefined;
|
|
2673
2994
|
} | undefined;
|
|
2674
2995
|
} | undefined;
|
|
2675
2996
|
error?: string | undefined;
|
|
@@ -2705,6 +3026,14 @@ export declare const WorkflowListResult: z.ZodObject<{
|
|
|
2705
3026
|
usage?: {
|
|
2706
3027
|
inputTokens?: number | undefined;
|
|
2707
3028
|
outputTokens?: number | undefined;
|
|
3029
|
+
durationMs?: number | undefined;
|
|
3030
|
+
cachedTokens?: number | undefined;
|
|
3031
|
+
reasoningTokens?: number | undefined;
|
|
3032
|
+
toolCalls?: number | undefined;
|
|
3033
|
+
costEstimate?: {
|
|
3034
|
+
amount: number;
|
|
3035
|
+
currency: "USD" | "CNY";
|
|
3036
|
+
} | undefined;
|
|
2708
3037
|
} | undefined;
|
|
2709
3038
|
} | undefined;
|
|
2710
3039
|
error?: string | undefined;
|
|
@@ -2724,7 +3053,7 @@ export type WorkflowListResult = z.infer<typeof WorkflowListResult>;
|
|
|
2724
3053
|
export declare const WorkflowEvent: z.ZodObject<{
|
|
2725
3054
|
workflowId: z.ZodString;
|
|
2726
3055
|
seq: z.ZodNumber;
|
|
2727
|
-
type: z.ZodEnum<["workflow.status", "node.status", "edge.route", "executor.decision", "round.started", "round.completed", "discussion.terminated"]>;
|
|
3056
|
+
type: z.ZodEnum<["workflow.status", "node.status", "edge.route", "executor.decision", "round.started", "round.completed", "discussion.terminated", "human_review.requested", "human_review.resolved", "artifact.written", "node.diagnostic"]>;
|
|
2728
3057
|
nodeId: z.ZodOptional<z.ZodString>;
|
|
2729
3058
|
sessionId: z.ZodOptional<z.ZodBranded<z.ZodString, "SessionId">>;
|
|
2730
3059
|
turnId: z.ZodOptional<z.ZodString>;
|
|
@@ -2738,12 +3067,42 @@ export declare const WorkflowEvent: z.ZodObject<{
|
|
|
2738
3067
|
usage: z.ZodOptional<z.ZodObject<{
|
|
2739
3068
|
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
2740
3069
|
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
3070
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
3071
|
+
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
3072
|
+
toolCalls: z.ZodOptional<z.ZodNumber>;
|
|
3073
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
3074
|
+
costEstimate: z.ZodOptional<z.ZodObject<{
|
|
3075
|
+
amount: z.ZodNumber;
|
|
3076
|
+
currency: z.ZodEnum<["USD", "CNY"]>;
|
|
3077
|
+
}, "strip", z.ZodTypeAny, {
|
|
3078
|
+
amount: number;
|
|
3079
|
+
currency: "USD" | "CNY";
|
|
3080
|
+
}, {
|
|
3081
|
+
amount: number;
|
|
3082
|
+
currency: "USD" | "CNY";
|
|
3083
|
+
}>>;
|
|
2741
3084
|
}, "strip", z.ZodTypeAny, {
|
|
2742
3085
|
inputTokens?: number | undefined;
|
|
2743
3086
|
outputTokens?: number | undefined;
|
|
3087
|
+
durationMs?: number | undefined;
|
|
3088
|
+
cachedTokens?: number | undefined;
|
|
3089
|
+
reasoningTokens?: number | undefined;
|
|
3090
|
+
toolCalls?: number | undefined;
|
|
3091
|
+
costEstimate?: {
|
|
3092
|
+
amount: number;
|
|
3093
|
+
currency: "USD" | "CNY";
|
|
3094
|
+
} | undefined;
|
|
2744
3095
|
}, {
|
|
2745
3096
|
inputTokens?: number | undefined;
|
|
2746
3097
|
outputTokens?: number | undefined;
|
|
3098
|
+
durationMs?: number | undefined;
|
|
3099
|
+
cachedTokens?: number | undefined;
|
|
3100
|
+
reasoningTokens?: number | undefined;
|
|
3101
|
+
toolCalls?: number | undefined;
|
|
3102
|
+
costEstimate?: {
|
|
3103
|
+
amount: number;
|
|
3104
|
+
currency: "USD" | "CNY";
|
|
3105
|
+
} | undefined;
|
|
2747
3106
|
}>>;
|
|
2748
3107
|
}, "strip", z.ZodTypeAny, {
|
|
2749
3108
|
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
@@ -2751,6 +3110,14 @@ export declare const WorkflowEvent: z.ZodObject<{
|
|
|
2751
3110
|
usage?: {
|
|
2752
3111
|
inputTokens?: number | undefined;
|
|
2753
3112
|
outputTokens?: number | undefined;
|
|
3113
|
+
durationMs?: number | undefined;
|
|
3114
|
+
cachedTokens?: number | undefined;
|
|
3115
|
+
reasoningTokens?: number | undefined;
|
|
3116
|
+
toolCalls?: number | undefined;
|
|
3117
|
+
costEstimate?: {
|
|
3118
|
+
amount: number;
|
|
3119
|
+
currency: "USD" | "CNY";
|
|
3120
|
+
} | undefined;
|
|
2754
3121
|
} | undefined;
|
|
2755
3122
|
}, {
|
|
2756
3123
|
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
@@ -2758,13 +3125,21 @@ export declare const WorkflowEvent: z.ZodObject<{
|
|
|
2758
3125
|
usage?: {
|
|
2759
3126
|
inputTokens?: number | undefined;
|
|
2760
3127
|
outputTokens?: number | undefined;
|
|
3128
|
+
durationMs?: number | undefined;
|
|
3129
|
+
cachedTokens?: number | undefined;
|
|
3130
|
+
reasoningTokens?: number | undefined;
|
|
3131
|
+
toolCalls?: number | undefined;
|
|
3132
|
+
costEstimate?: {
|
|
3133
|
+
amount: number;
|
|
3134
|
+
currency: "USD" | "CNY";
|
|
3135
|
+
} | undefined;
|
|
2761
3136
|
} | undefined;
|
|
2762
3137
|
}>>;
|
|
2763
3138
|
/** 自由载荷。常见字段:iteration, from, to, reason, terminationReason 等。 */
|
|
2764
3139
|
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2765
3140
|
timestamp: z.ZodString;
|
|
2766
3141
|
}, "strip", z.ZodTypeAny, {
|
|
2767
|
-
type: "workflow.status" | "node.status" | "edge.route" | "executor.decision" | "round.started" | "round.completed" | "discussion.terminated";
|
|
3142
|
+
type: "workflow.status" | "node.status" | "edge.route" | "executor.decision" | "round.started" | "round.completed" | "discussion.terminated" | "human_review.requested" | "human_review.resolved" | "artifact.written" | "node.diagnostic";
|
|
2768
3143
|
seq: number;
|
|
2769
3144
|
workflowId: string;
|
|
2770
3145
|
timestamp: string;
|
|
@@ -2780,12 +3155,20 @@ export declare const WorkflowEvent: z.ZodObject<{
|
|
|
2780
3155
|
usage?: {
|
|
2781
3156
|
inputTokens?: number | undefined;
|
|
2782
3157
|
outputTokens?: number | undefined;
|
|
3158
|
+
durationMs?: number | undefined;
|
|
3159
|
+
cachedTokens?: number | undefined;
|
|
3160
|
+
reasoningTokens?: number | undefined;
|
|
3161
|
+
toolCalls?: number | undefined;
|
|
3162
|
+
costEstimate?: {
|
|
3163
|
+
amount: number;
|
|
3164
|
+
currency: "USD" | "CNY";
|
|
3165
|
+
} | undefined;
|
|
2783
3166
|
} | undefined;
|
|
2784
3167
|
} | undefined;
|
|
2785
3168
|
nodeId?: string | undefined;
|
|
2786
3169
|
payload?: Record<string, unknown> | undefined;
|
|
2787
3170
|
}, {
|
|
2788
|
-
type: "workflow.status" | "node.status" | "edge.route" | "executor.decision" | "round.started" | "round.completed" | "discussion.terminated";
|
|
3171
|
+
type: "workflow.status" | "node.status" | "edge.route" | "executor.decision" | "round.started" | "round.completed" | "discussion.terminated" | "human_review.requested" | "human_review.resolved" | "artifact.written" | "node.diagnostic";
|
|
2789
3172
|
seq: number;
|
|
2790
3173
|
workflowId: string;
|
|
2791
3174
|
timestamp: string;
|
|
@@ -2801,6 +3184,14 @@ export declare const WorkflowEvent: z.ZodObject<{
|
|
|
2801
3184
|
usage?: {
|
|
2802
3185
|
inputTokens?: number | undefined;
|
|
2803
3186
|
outputTokens?: number | undefined;
|
|
3187
|
+
durationMs?: number | undefined;
|
|
3188
|
+
cachedTokens?: number | undefined;
|
|
3189
|
+
reasoningTokens?: number | undefined;
|
|
3190
|
+
toolCalls?: number | undefined;
|
|
3191
|
+
costEstimate?: {
|
|
3192
|
+
amount: number;
|
|
3193
|
+
currency: "USD" | "CNY";
|
|
3194
|
+
} | undefined;
|
|
2804
3195
|
} | undefined;
|
|
2805
3196
|
} | undefined;
|
|
2806
3197
|
nodeId?: string | undefined;
|
|
@@ -2818,6 +3209,430 @@ export declare const WorkflowAckParams: z.ZodObject<{
|
|
|
2818
3209
|
lastSeq: number;
|
|
2819
3210
|
}>;
|
|
2820
3211
|
export type WorkflowAckParams = z.infer<typeof WorkflowAckParams>;
|
|
3212
|
+
export declare const WorkflowEventsListParams: z.ZodObject<{
|
|
3213
|
+
workflowId: z.ZodString;
|
|
3214
|
+
afterSeq: z.ZodOptional<z.ZodNumber>;
|
|
3215
|
+
limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
3216
|
+
}, "strip", z.ZodTypeAny, {
|
|
3217
|
+
workflowId: string;
|
|
3218
|
+
limit?: number | undefined;
|
|
3219
|
+
afterSeq?: number | undefined;
|
|
3220
|
+
}, {
|
|
3221
|
+
workflowId: string;
|
|
3222
|
+
limit?: number | undefined;
|
|
3223
|
+
afterSeq?: number | undefined;
|
|
3224
|
+
}>;
|
|
3225
|
+
export type WorkflowEventsListParams = z.infer<typeof WorkflowEventsListParams>;
|
|
3226
|
+
export declare const WorkflowEventsListResult: z.ZodObject<{
|
|
3227
|
+
events: z.ZodArray<z.ZodObject<{
|
|
3228
|
+
workflowId: z.ZodString;
|
|
3229
|
+
seq: z.ZodNumber;
|
|
3230
|
+
type: z.ZodEnum<["workflow.status", "node.status", "edge.route", "executor.decision", "round.started", "round.completed", "discussion.terminated", "human_review.requested", "human_review.resolved", "artifact.written", "node.diagnostic"]>;
|
|
3231
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
3232
|
+
sessionId: z.ZodOptional<z.ZodBranded<z.ZodString, "SessionId">>;
|
|
3233
|
+
turnId: z.ZodOptional<z.ZodString>;
|
|
3234
|
+
agent: z.ZodOptional<z.ZodBranded<z.ZodString, "AgentId">>;
|
|
3235
|
+
model: z.ZodOptional<z.ZodString>;
|
|
3236
|
+
role: z.ZodOptional<z.ZodString>;
|
|
3237
|
+
status: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["queued", "running", "completed", "failed", "cancelled", "timeout"]>, z.ZodEnum<["pending", "ready", "running", "completed", "failed", "skipped", "cancelled"]>]>>;
|
|
3238
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
3239
|
+
text: z.ZodOptional<z.ZodString>;
|
|
3240
|
+
status: z.ZodEnum<["completed", "interrupted", "aborted", "failed", "timeout"]>;
|
|
3241
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
3242
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
3243
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
3244
|
+
cachedTokens: z.ZodOptional<z.ZodNumber>;
|
|
3245
|
+
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
3246
|
+
toolCalls: z.ZodOptional<z.ZodNumber>;
|
|
3247
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
3248
|
+
costEstimate: z.ZodOptional<z.ZodObject<{
|
|
3249
|
+
amount: z.ZodNumber;
|
|
3250
|
+
currency: z.ZodEnum<["USD", "CNY"]>;
|
|
3251
|
+
}, "strip", z.ZodTypeAny, {
|
|
3252
|
+
amount: number;
|
|
3253
|
+
currency: "USD" | "CNY";
|
|
3254
|
+
}, {
|
|
3255
|
+
amount: number;
|
|
3256
|
+
currency: "USD" | "CNY";
|
|
3257
|
+
}>>;
|
|
3258
|
+
}, "strip", z.ZodTypeAny, {
|
|
3259
|
+
inputTokens?: number | undefined;
|
|
3260
|
+
outputTokens?: number | undefined;
|
|
3261
|
+
durationMs?: number | undefined;
|
|
3262
|
+
cachedTokens?: number | undefined;
|
|
3263
|
+
reasoningTokens?: number | undefined;
|
|
3264
|
+
toolCalls?: number | undefined;
|
|
3265
|
+
costEstimate?: {
|
|
3266
|
+
amount: number;
|
|
3267
|
+
currency: "USD" | "CNY";
|
|
3268
|
+
} | undefined;
|
|
3269
|
+
}, {
|
|
3270
|
+
inputTokens?: number | undefined;
|
|
3271
|
+
outputTokens?: number | undefined;
|
|
3272
|
+
durationMs?: number | undefined;
|
|
3273
|
+
cachedTokens?: number | undefined;
|
|
3274
|
+
reasoningTokens?: number | undefined;
|
|
3275
|
+
toolCalls?: number | undefined;
|
|
3276
|
+
costEstimate?: {
|
|
3277
|
+
amount: number;
|
|
3278
|
+
currency: "USD" | "CNY";
|
|
3279
|
+
} | undefined;
|
|
3280
|
+
}>>;
|
|
3281
|
+
}, "strip", z.ZodTypeAny, {
|
|
3282
|
+
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
3283
|
+
text?: string | undefined;
|
|
3284
|
+
usage?: {
|
|
3285
|
+
inputTokens?: number | undefined;
|
|
3286
|
+
outputTokens?: number | undefined;
|
|
3287
|
+
durationMs?: number | undefined;
|
|
3288
|
+
cachedTokens?: number | undefined;
|
|
3289
|
+
reasoningTokens?: number | undefined;
|
|
3290
|
+
toolCalls?: number | undefined;
|
|
3291
|
+
costEstimate?: {
|
|
3292
|
+
amount: number;
|
|
3293
|
+
currency: "USD" | "CNY";
|
|
3294
|
+
} | undefined;
|
|
3295
|
+
} | undefined;
|
|
3296
|
+
}, {
|
|
3297
|
+
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
3298
|
+
text?: string | undefined;
|
|
3299
|
+
usage?: {
|
|
3300
|
+
inputTokens?: number | undefined;
|
|
3301
|
+
outputTokens?: number | undefined;
|
|
3302
|
+
durationMs?: number | undefined;
|
|
3303
|
+
cachedTokens?: number | undefined;
|
|
3304
|
+
reasoningTokens?: number | undefined;
|
|
3305
|
+
toolCalls?: number | undefined;
|
|
3306
|
+
costEstimate?: {
|
|
3307
|
+
amount: number;
|
|
3308
|
+
currency: "USD" | "CNY";
|
|
3309
|
+
} | undefined;
|
|
3310
|
+
} | undefined;
|
|
3311
|
+
}>>;
|
|
3312
|
+
/** 自由载荷。常见字段:iteration, from, to, reason, terminationReason 等。 */
|
|
3313
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3314
|
+
timestamp: z.ZodString;
|
|
3315
|
+
}, "strip", z.ZodTypeAny, {
|
|
3316
|
+
type: "workflow.status" | "node.status" | "edge.route" | "executor.decision" | "round.started" | "round.completed" | "discussion.terminated" | "human_review.requested" | "human_review.resolved" | "artifact.written" | "node.diagnostic";
|
|
3317
|
+
seq: number;
|
|
3318
|
+
workflowId: string;
|
|
3319
|
+
timestamp: string;
|
|
3320
|
+
status?: "running" | "queued" | "completed" | "failed" | "timeout" | "pending" | "cancelled" | "ready" | "skipped" | undefined;
|
|
3321
|
+
sessionId?: (string & z.BRAND<"SessionId">) | undefined;
|
|
3322
|
+
agent?: (string & z.BRAND<"AgentId">) | undefined;
|
|
3323
|
+
role?: string | undefined;
|
|
3324
|
+
model?: string | undefined;
|
|
3325
|
+
turnId?: string | undefined;
|
|
3326
|
+
result?: {
|
|
3327
|
+
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
3328
|
+
text?: string | undefined;
|
|
3329
|
+
usage?: {
|
|
3330
|
+
inputTokens?: number | undefined;
|
|
3331
|
+
outputTokens?: number | undefined;
|
|
3332
|
+
durationMs?: number | undefined;
|
|
3333
|
+
cachedTokens?: number | undefined;
|
|
3334
|
+
reasoningTokens?: number | undefined;
|
|
3335
|
+
toolCalls?: number | undefined;
|
|
3336
|
+
costEstimate?: {
|
|
3337
|
+
amount: number;
|
|
3338
|
+
currency: "USD" | "CNY";
|
|
3339
|
+
} | undefined;
|
|
3340
|
+
} | undefined;
|
|
3341
|
+
} | undefined;
|
|
3342
|
+
nodeId?: string | undefined;
|
|
3343
|
+
payload?: Record<string, unknown> | undefined;
|
|
3344
|
+
}, {
|
|
3345
|
+
type: "workflow.status" | "node.status" | "edge.route" | "executor.decision" | "round.started" | "round.completed" | "discussion.terminated" | "human_review.requested" | "human_review.resolved" | "artifact.written" | "node.diagnostic";
|
|
3346
|
+
seq: number;
|
|
3347
|
+
workflowId: string;
|
|
3348
|
+
timestamp: string;
|
|
3349
|
+
status?: "running" | "queued" | "completed" | "failed" | "timeout" | "pending" | "cancelled" | "ready" | "skipped" | undefined;
|
|
3350
|
+
sessionId?: string | undefined;
|
|
3351
|
+
agent?: string | undefined;
|
|
3352
|
+
role?: string | undefined;
|
|
3353
|
+
model?: string | undefined;
|
|
3354
|
+
turnId?: string | undefined;
|
|
3355
|
+
result?: {
|
|
3356
|
+
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
3357
|
+
text?: string | undefined;
|
|
3358
|
+
usage?: {
|
|
3359
|
+
inputTokens?: number | undefined;
|
|
3360
|
+
outputTokens?: number | undefined;
|
|
3361
|
+
durationMs?: number | undefined;
|
|
3362
|
+
cachedTokens?: number | undefined;
|
|
3363
|
+
reasoningTokens?: number | undefined;
|
|
3364
|
+
toolCalls?: number | undefined;
|
|
3365
|
+
costEstimate?: {
|
|
3366
|
+
amount: number;
|
|
3367
|
+
currency: "USD" | "CNY";
|
|
3368
|
+
} | undefined;
|
|
3369
|
+
} | undefined;
|
|
3370
|
+
} | undefined;
|
|
3371
|
+
nodeId?: string | undefined;
|
|
3372
|
+
payload?: Record<string, unknown> | undefined;
|
|
3373
|
+
}>, "many">;
|
|
3374
|
+
nextSeq: z.ZodOptional<z.ZodNumber>;
|
|
3375
|
+
}, "strip", z.ZodTypeAny, {
|
|
3376
|
+
events: {
|
|
3377
|
+
type: "workflow.status" | "node.status" | "edge.route" | "executor.decision" | "round.started" | "round.completed" | "discussion.terminated" | "human_review.requested" | "human_review.resolved" | "artifact.written" | "node.diagnostic";
|
|
3378
|
+
seq: number;
|
|
3379
|
+
workflowId: string;
|
|
3380
|
+
timestamp: string;
|
|
3381
|
+
status?: "running" | "queued" | "completed" | "failed" | "timeout" | "pending" | "cancelled" | "ready" | "skipped" | undefined;
|
|
3382
|
+
sessionId?: (string & z.BRAND<"SessionId">) | undefined;
|
|
3383
|
+
agent?: (string & z.BRAND<"AgentId">) | undefined;
|
|
3384
|
+
role?: string | undefined;
|
|
3385
|
+
model?: string | undefined;
|
|
3386
|
+
turnId?: string | undefined;
|
|
3387
|
+
result?: {
|
|
3388
|
+
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
3389
|
+
text?: string | undefined;
|
|
3390
|
+
usage?: {
|
|
3391
|
+
inputTokens?: number | undefined;
|
|
3392
|
+
outputTokens?: number | undefined;
|
|
3393
|
+
durationMs?: number | undefined;
|
|
3394
|
+
cachedTokens?: number | undefined;
|
|
3395
|
+
reasoningTokens?: number | undefined;
|
|
3396
|
+
toolCalls?: number | undefined;
|
|
3397
|
+
costEstimate?: {
|
|
3398
|
+
amount: number;
|
|
3399
|
+
currency: "USD" | "CNY";
|
|
3400
|
+
} | undefined;
|
|
3401
|
+
} | undefined;
|
|
3402
|
+
} | undefined;
|
|
3403
|
+
nodeId?: string | undefined;
|
|
3404
|
+
payload?: Record<string, unknown> | undefined;
|
|
3405
|
+
}[];
|
|
3406
|
+
nextSeq?: number | undefined;
|
|
3407
|
+
}, {
|
|
3408
|
+
events: {
|
|
3409
|
+
type: "workflow.status" | "node.status" | "edge.route" | "executor.decision" | "round.started" | "round.completed" | "discussion.terminated" | "human_review.requested" | "human_review.resolved" | "artifact.written" | "node.diagnostic";
|
|
3410
|
+
seq: number;
|
|
3411
|
+
workflowId: string;
|
|
3412
|
+
timestamp: string;
|
|
3413
|
+
status?: "running" | "queued" | "completed" | "failed" | "timeout" | "pending" | "cancelled" | "ready" | "skipped" | undefined;
|
|
3414
|
+
sessionId?: string | undefined;
|
|
3415
|
+
agent?: string | undefined;
|
|
3416
|
+
role?: string | undefined;
|
|
3417
|
+
model?: string | undefined;
|
|
3418
|
+
turnId?: string | undefined;
|
|
3419
|
+
result?: {
|
|
3420
|
+
status: "aborted" | "interrupted" | "completed" | "failed" | "timeout";
|
|
3421
|
+
text?: string | undefined;
|
|
3422
|
+
usage?: {
|
|
3423
|
+
inputTokens?: number | undefined;
|
|
3424
|
+
outputTokens?: number | undefined;
|
|
3425
|
+
durationMs?: number | undefined;
|
|
3426
|
+
cachedTokens?: number | undefined;
|
|
3427
|
+
reasoningTokens?: number | undefined;
|
|
3428
|
+
toolCalls?: number | undefined;
|
|
3429
|
+
costEstimate?: {
|
|
3430
|
+
amount: number;
|
|
3431
|
+
currency: "USD" | "CNY";
|
|
3432
|
+
} | undefined;
|
|
3433
|
+
} | undefined;
|
|
3434
|
+
} | undefined;
|
|
3435
|
+
nodeId?: string | undefined;
|
|
3436
|
+
payload?: Record<string, unknown> | undefined;
|
|
3437
|
+
}[];
|
|
3438
|
+
nextSeq?: number | undefined;
|
|
3439
|
+
}>;
|
|
3440
|
+
export type WorkflowEventsListResult = z.infer<typeof WorkflowEventsListResult>;
|
|
3441
|
+
export declare const WorkflowArtifact: z.ZodObject<{
|
|
3442
|
+
artifactId: z.ZodString;
|
|
3443
|
+
workflowId: z.ZodString;
|
|
3444
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
3445
|
+
kind: z.ZodEnum<["report", "diff", "spec", "log", "patch", "image", "binary", "other"]>;
|
|
3446
|
+
path: z.ZodString;
|
|
3447
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3448
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
3449
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
3450
|
+
createdAt: z.ZodString;
|
|
3451
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3452
|
+
}, "strip", z.ZodTypeAny, {
|
|
3453
|
+
path: string;
|
|
3454
|
+
kind: "patch" | "image" | "other" | "report" | "diff" | "spec" | "log" | "binary";
|
|
3455
|
+
createdAt: string;
|
|
3456
|
+
workflowId: string;
|
|
3457
|
+
artifactId: string;
|
|
3458
|
+
nodeId?: string | undefined;
|
|
3459
|
+
mimeType?: string | undefined;
|
|
3460
|
+
title?: string | undefined;
|
|
3461
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3462
|
+
size?: number | undefined;
|
|
3463
|
+
}, {
|
|
3464
|
+
path: string;
|
|
3465
|
+
kind: "patch" | "image" | "other" | "report" | "diff" | "spec" | "log" | "binary";
|
|
3466
|
+
createdAt: string;
|
|
3467
|
+
workflowId: string;
|
|
3468
|
+
artifactId: string;
|
|
3469
|
+
nodeId?: string | undefined;
|
|
3470
|
+
mimeType?: string | undefined;
|
|
3471
|
+
title?: string | undefined;
|
|
3472
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3473
|
+
size?: number | undefined;
|
|
3474
|
+
}>;
|
|
3475
|
+
export type WorkflowArtifact = z.infer<typeof WorkflowArtifact>;
|
|
3476
|
+
export declare const WorkflowArtifactRegisterParams: z.ZodObject<{
|
|
3477
|
+
workflowId: z.ZodString;
|
|
3478
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
3479
|
+
kind: z.ZodEnum<["report", "diff", "spec", "log", "patch", "image", "binary", "other"]>;
|
|
3480
|
+
path: z.ZodString;
|
|
3481
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3482
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
3483
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3484
|
+
}, "strip", z.ZodTypeAny, {
|
|
3485
|
+
path: string;
|
|
3486
|
+
kind: "patch" | "image" | "other" | "report" | "diff" | "spec" | "log" | "binary";
|
|
3487
|
+
workflowId: string;
|
|
3488
|
+
nodeId?: string | undefined;
|
|
3489
|
+
mimeType?: string | undefined;
|
|
3490
|
+
title?: string | undefined;
|
|
3491
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3492
|
+
}, {
|
|
3493
|
+
path: string;
|
|
3494
|
+
kind: "patch" | "image" | "other" | "report" | "diff" | "spec" | "log" | "binary";
|
|
3495
|
+
workflowId: string;
|
|
3496
|
+
nodeId?: string | undefined;
|
|
3497
|
+
mimeType?: string | undefined;
|
|
3498
|
+
title?: string | undefined;
|
|
3499
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3500
|
+
}>;
|
|
3501
|
+
export type WorkflowArtifactRegisterParams = z.infer<typeof WorkflowArtifactRegisterParams>;
|
|
3502
|
+
export declare const WorkflowArtifactRegisterResult: z.ZodObject<{
|
|
3503
|
+
artifact: z.ZodObject<{
|
|
3504
|
+
artifactId: z.ZodString;
|
|
3505
|
+
workflowId: z.ZodString;
|
|
3506
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
3507
|
+
kind: z.ZodEnum<["report", "diff", "spec", "log", "patch", "image", "binary", "other"]>;
|
|
3508
|
+
path: z.ZodString;
|
|
3509
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3510
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
3511
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
3512
|
+
createdAt: z.ZodString;
|
|
3513
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3514
|
+
}, "strip", z.ZodTypeAny, {
|
|
3515
|
+
path: string;
|
|
3516
|
+
kind: "patch" | "image" | "other" | "report" | "diff" | "spec" | "log" | "binary";
|
|
3517
|
+
createdAt: string;
|
|
3518
|
+
workflowId: string;
|
|
3519
|
+
artifactId: string;
|
|
3520
|
+
nodeId?: string | undefined;
|
|
3521
|
+
mimeType?: string | undefined;
|
|
3522
|
+
title?: string | undefined;
|
|
3523
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3524
|
+
size?: number | undefined;
|
|
3525
|
+
}, {
|
|
3526
|
+
path: string;
|
|
3527
|
+
kind: "patch" | "image" | "other" | "report" | "diff" | "spec" | "log" | "binary";
|
|
3528
|
+
createdAt: string;
|
|
3529
|
+
workflowId: string;
|
|
3530
|
+
artifactId: string;
|
|
3531
|
+
nodeId?: string | undefined;
|
|
3532
|
+
mimeType?: string | undefined;
|
|
3533
|
+
title?: string | undefined;
|
|
3534
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3535
|
+
size?: number | undefined;
|
|
3536
|
+
}>;
|
|
3537
|
+
}, "strip", z.ZodTypeAny, {
|
|
3538
|
+
artifact: {
|
|
3539
|
+
path: string;
|
|
3540
|
+
kind: "patch" | "image" | "other" | "report" | "diff" | "spec" | "log" | "binary";
|
|
3541
|
+
createdAt: string;
|
|
3542
|
+
workflowId: string;
|
|
3543
|
+
artifactId: string;
|
|
3544
|
+
nodeId?: string | undefined;
|
|
3545
|
+
mimeType?: string | undefined;
|
|
3546
|
+
title?: string | undefined;
|
|
3547
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3548
|
+
size?: number | undefined;
|
|
3549
|
+
};
|
|
3550
|
+
}, {
|
|
3551
|
+
artifact: {
|
|
3552
|
+
path: string;
|
|
3553
|
+
kind: "patch" | "image" | "other" | "report" | "diff" | "spec" | "log" | "binary";
|
|
3554
|
+
createdAt: string;
|
|
3555
|
+
workflowId: string;
|
|
3556
|
+
artifactId: string;
|
|
3557
|
+
nodeId?: string | undefined;
|
|
3558
|
+
mimeType?: string | undefined;
|
|
3559
|
+
title?: string | undefined;
|
|
3560
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3561
|
+
size?: number | undefined;
|
|
3562
|
+
};
|
|
3563
|
+
}>;
|
|
3564
|
+
export type WorkflowArtifactRegisterResult = z.infer<typeof WorkflowArtifactRegisterResult>;
|
|
3565
|
+
export declare const WorkflowArtifactsListParams: z.ZodObject<{
|
|
3566
|
+
workflowId: z.ZodString;
|
|
3567
|
+
}, "strip", z.ZodTypeAny, {
|
|
3568
|
+
workflowId: string;
|
|
3569
|
+
}, {
|
|
3570
|
+
workflowId: string;
|
|
3571
|
+
}>;
|
|
3572
|
+
export type WorkflowArtifactsListParams = z.infer<typeof WorkflowArtifactsListParams>;
|
|
3573
|
+
export declare const WorkflowArtifactsListResult: z.ZodObject<{
|
|
3574
|
+
artifacts: z.ZodArray<z.ZodObject<{
|
|
3575
|
+
artifactId: z.ZodString;
|
|
3576
|
+
workflowId: z.ZodString;
|
|
3577
|
+
nodeId: z.ZodOptional<z.ZodString>;
|
|
3578
|
+
kind: z.ZodEnum<["report", "diff", "spec", "log", "patch", "image", "binary", "other"]>;
|
|
3579
|
+
path: z.ZodString;
|
|
3580
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3581
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
3582
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
3583
|
+
createdAt: z.ZodString;
|
|
3584
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3585
|
+
}, "strip", z.ZodTypeAny, {
|
|
3586
|
+
path: string;
|
|
3587
|
+
kind: "patch" | "image" | "other" | "report" | "diff" | "spec" | "log" | "binary";
|
|
3588
|
+
createdAt: string;
|
|
3589
|
+
workflowId: string;
|
|
3590
|
+
artifactId: string;
|
|
3591
|
+
nodeId?: string | undefined;
|
|
3592
|
+
mimeType?: string | undefined;
|
|
3593
|
+
title?: string | undefined;
|
|
3594
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3595
|
+
size?: number | undefined;
|
|
3596
|
+
}, {
|
|
3597
|
+
path: string;
|
|
3598
|
+
kind: "patch" | "image" | "other" | "report" | "diff" | "spec" | "log" | "binary";
|
|
3599
|
+
createdAt: string;
|
|
3600
|
+
workflowId: string;
|
|
3601
|
+
artifactId: string;
|
|
3602
|
+
nodeId?: string | undefined;
|
|
3603
|
+
mimeType?: string | undefined;
|
|
3604
|
+
title?: string | undefined;
|
|
3605
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3606
|
+
size?: number | undefined;
|
|
3607
|
+
}>, "many">;
|
|
3608
|
+
}, "strip", z.ZodTypeAny, {
|
|
3609
|
+
artifacts: {
|
|
3610
|
+
path: string;
|
|
3611
|
+
kind: "patch" | "image" | "other" | "report" | "diff" | "spec" | "log" | "binary";
|
|
3612
|
+
createdAt: string;
|
|
3613
|
+
workflowId: string;
|
|
3614
|
+
artifactId: string;
|
|
3615
|
+
nodeId?: string | undefined;
|
|
3616
|
+
mimeType?: string | undefined;
|
|
3617
|
+
title?: string | undefined;
|
|
3618
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3619
|
+
size?: number | undefined;
|
|
3620
|
+
}[];
|
|
3621
|
+
}, {
|
|
3622
|
+
artifacts: {
|
|
3623
|
+
path: string;
|
|
3624
|
+
kind: "patch" | "image" | "other" | "report" | "diff" | "spec" | "log" | "binary";
|
|
3625
|
+
createdAt: string;
|
|
3626
|
+
workflowId: string;
|
|
3627
|
+
artifactId: string;
|
|
3628
|
+
nodeId?: string | undefined;
|
|
3629
|
+
mimeType?: string | undefined;
|
|
3630
|
+
title?: string | undefined;
|
|
3631
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3632
|
+
size?: number | undefined;
|
|
3633
|
+
}[];
|
|
3634
|
+
}>;
|
|
3635
|
+
export type WorkflowArtifactsListResult = z.infer<typeof WorkflowArtifactsListResult>;
|
|
2821
3636
|
/** route:派新任务给目标 worker(v0.4 既有语义)。 */
|
|
2822
3637
|
export declare const WorkflowRouteDirective: z.ZodObject<{
|
|
2823
3638
|
kind: z.ZodLiteral<"workflow.route">;
|
|
@@ -2895,6 +3710,75 @@ export declare const WorkflowDoneDirective: z.ZodObject<{
|
|
|
2895
3710
|
finalSummary?: string | undefined;
|
|
2896
3711
|
}>;
|
|
2897
3712
|
export type WorkflowDoneDirective = z.infer<typeof WorkflowDoneDirective>;
|
|
3713
|
+
/**
|
|
3714
|
+
* human_review: 请求 server 进行人工审查(v0.7 新增)。
|
|
3715
|
+
*
|
|
3716
|
+
* Executor emit 这个 directive 后,phonon 暂停 workflow,通过 `interaction.request`
|
|
3717
|
+
* 反向问 server;server 返回 { approved, feedback? } 后:
|
|
3718
|
+
* - approved=true → 当作 workflow.done 处理(finalSummary = feedback ?? executor 文本)
|
|
3719
|
+
* - approved=false → 把 feedback 文本作为 executor 下一轮的输入("revise based on review")
|
|
3720
|
+
* phonon 同时 emit workflow.event { type: "human_review.requested" / "human_review.resolved" }。
|
|
3721
|
+
*
|
|
3722
|
+
* 这是设备侧底层 HITL 机制;UI 渲染、表单字段、文档关联、Feishu 集成等业务由 server 实现。
|
|
3723
|
+
*/
|
|
3724
|
+
export declare const WorkflowHumanReviewDirective: z.ZodObject<{
|
|
3725
|
+
kind: z.ZodLiteral<"workflow.human_review">;
|
|
3726
|
+
/** 审查标题(短,给 UI 显示用) */
|
|
3727
|
+
title: z.ZodString;
|
|
3728
|
+
/** 审查内容/摘要(长,给 reviewer 看) */
|
|
3729
|
+
summary: z.ZodString;
|
|
3730
|
+
/** 关联的产物文件路径(workspace 相对) */
|
|
3731
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3732
|
+
path: z.ZodString;
|
|
3733
|
+
role: z.ZodDefault<z.ZodEnum<["report", "diff", "spec", "log", "other"]>>;
|
|
3734
|
+
}, "strip", z.ZodTypeAny, {
|
|
3735
|
+
path: string;
|
|
3736
|
+
role: "other" | "report" | "diff" | "spec" | "log";
|
|
3737
|
+
}, {
|
|
3738
|
+
path: string;
|
|
3739
|
+
role?: "other" | "report" | "diff" | "spec" | "log" | undefined;
|
|
3740
|
+
}>, "many">>;
|
|
3741
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
3742
|
+
/** 等待 server 响应的超时秒数,默认 1800 (30min) */
|
|
3743
|
+
timeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
3744
|
+
}, "strip", z.ZodTypeAny, {
|
|
3745
|
+
kind: "workflow.human_review";
|
|
3746
|
+
summary: string;
|
|
3747
|
+
title: string;
|
|
3748
|
+
timeoutSeconds: number;
|
|
3749
|
+
reason?: string | undefined;
|
|
3750
|
+
artifacts?: {
|
|
3751
|
+
path: string;
|
|
3752
|
+
role: "other" | "report" | "diff" | "spec" | "log";
|
|
3753
|
+
}[] | undefined;
|
|
3754
|
+
}, {
|
|
3755
|
+
kind: "workflow.human_review";
|
|
3756
|
+
summary: string;
|
|
3757
|
+
title: string;
|
|
3758
|
+
reason?: string | undefined;
|
|
3759
|
+
timeoutSeconds?: number | undefined;
|
|
3760
|
+
artifacts?: {
|
|
3761
|
+
path: string;
|
|
3762
|
+
role?: "other" | "report" | "diff" | "spec" | "log" | undefined;
|
|
3763
|
+
}[] | undefined;
|
|
3764
|
+
}>;
|
|
3765
|
+
export type WorkflowHumanReviewDirective = z.infer<typeof WorkflowHumanReviewDirective>;
|
|
3766
|
+
/** server 对 human_review 的响应 schema(通过 interaction.respond 走 form value) */
|
|
3767
|
+
export declare const WorkflowHumanReviewResponse: z.ZodObject<{
|
|
3768
|
+
approved: z.ZodBoolean;
|
|
3769
|
+
/** 反馈文字。approved=true 时可作 finalSummary;approved=false 时作 executor 下一轮输入 */
|
|
3770
|
+
feedback: z.ZodOptional<z.ZodString>;
|
|
3771
|
+
reviewer: z.ZodOptional<z.ZodString>;
|
|
3772
|
+
}, "strip", z.ZodTypeAny, {
|
|
3773
|
+
approved: boolean;
|
|
3774
|
+
feedback?: string | undefined;
|
|
3775
|
+
reviewer?: string | undefined;
|
|
3776
|
+
}, {
|
|
3777
|
+
approved: boolean;
|
|
3778
|
+
feedback?: string | undefined;
|
|
3779
|
+
reviewer?: string | undefined;
|
|
3780
|
+
}>;
|
|
3781
|
+
export type WorkflowHumanReviewResponse = z.infer<typeof WorkflowHumanReviewResponse>;
|
|
2898
3782
|
export declare const WorkflowRoutingDirective: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
2899
3783
|
kind: z.ZodLiteral<"workflow.route">;
|
|
2900
3784
|
to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
@@ -2960,6 +3844,46 @@ export declare const WorkflowRoutingDirective: z.ZodDiscriminatedUnion<"kind", [
|
|
|
2960
3844
|
kind: "workflow.done";
|
|
2961
3845
|
reason?: string | undefined;
|
|
2962
3846
|
finalSummary?: string | undefined;
|
|
3847
|
+
}>, z.ZodObject<{
|
|
3848
|
+
kind: z.ZodLiteral<"workflow.human_review">;
|
|
3849
|
+
/** 审查标题(短,给 UI 显示用) */
|
|
3850
|
+
title: z.ZodString;
|
|
3851
|
+
/** 审查内容/摘要(长,给 reviewer 看) */
|
|
3852
|
+
summary: z.ZodString;
|
|
3853
|
+
/** 关联的产物文件路径(workspace 相对) */
|
|
3854
|
+
artifacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3855
|
+
path: z.ZodString;
|
|
3856
|
+
role: z.ZodDefault<z.ZodEnum<["report", "diff", "spec", "log", "other"]>>;
|
|
3857
|
+
}, "strip", z.ZodTypeAny, {
|
|
3858
|
+
path: string;
|
|
3859
|
+
role: "other" | "report" | "diff" | "spec" | "log";
|
|
3860
|
+
}, {
|
|
3861
|
+
path: string;
|
|
3862
|
+
role?: "other" | "report" | "diff" | "spec" | "log" | undefined;
|
|
3863
|
+
}>, "many">>;
|
|
3864
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
3865
|
+
/** 等待 server 响应的超时秒数,默认 1800 (30min) */
|
|
3866
|
+
timeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
3867
|
+
}, "strip", z.ZodTypeAny, {
|
|
3868
|
+
kind: "workflow.human_review";
|
|
3869
|
+
summary: string;
|
|
3870
|
+
title: string;
|
|
3871
|
+
timeoutSeconds: number;
|
|
3872
|
+
reason?: string | undefined;
|
|
3873
|
+
artifacts?: {
|
|
3874
|
+
path: string;
|
|
3875
|
+
role: "other" | "report" | "diff" | "spec" | "log";
|
|
3876
|
+
}[] | undefined;
|
|
3877
|
+
}, {
|
|
3878
|
+
kind: "workflow.human_review";
|
|
3879
|
+
summary: string;
|
|
3880
|
+
title: string;
|
|
3881
|
+
reason?: string | undefined;
|
|
3882
|
+
timeoutSeconds?: number | undefined;
|
|
3883
|
+
artifacts?: {
|
|
3884
|
+
path: string;
|
|
3885
|
+
role?: "other" | "report" | "diff" | "spec" | "log" | undefined;
|
|
3886
|
+
}[] | undefined;
|
|
2963
3887
|
}>]>;
|
|
2964
3888
|
export type WorkflowRoutingDirective = z.infer<typeof WorkflowRoutingDirective>;
|
|
2965
3889
|
//# sourceMappingURL=workflow.d.ts.map
|