conversation-session-dynamic-workflow-gray-always-on-overflow.json 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-dynamic-workflow-gray-always-on-overflow",
  4. "spec": "./test/e2e/conversation-session/workflows/conversation-session-dynamic-workflow-gray-always-on-overflow.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "dwv-title",
  8. "metadata": {
  9. "kind": "common",
  10. "source": "synthetic",
  11. "timingPolicy": "fast-text",
  12. "syntheticReason": "固定 Skill/CreateWorkflow 与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话与完成通知由 Agent 执行。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/messages",
  17. "bodyExcludes": [],
  18. "bodyIncludes": ["Generate a concise title", "E2E_DWV_"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "headers": {
  23. "content-type": "application/json; charset=utf-8"
  24. },
  25. "body": "{\"id\":\"msg_upstream_e2e_text\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"工作流时间线 E2E\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":128,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":12,\"service_tier\":\"standard\"}}"
  26. }
  27. },
  28. {
  29. "id": "dwv-agent-1",
  30. "metadata": {
  31. "kind": "main",
  32. "source": "synthetic",
  33. "timingPolicy": "fast-text",
  34. "syntheticReason": "固定工作流子代理的回答;子代理会话、并行调度、阶段推进、流水线条目传递与结果回传仍走真实 run 引擎。"
  35. },
  36. "match": {
  37. "method": "POST",
  38. "pathIncludes": "/messages",
  39. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  40. "bodyExcludes": [
  41. "Generate a concise title",
  42. "CRITICAL: Respond with TEXT ONLY",
  43. "You are now acting as the memory extraction subagent"
  44. ],
  45. "lastUserMessageIncludes": ["E2E_DWV_TASK_1"]
  46. },
  47. "response": {
  48. "statusCode": 200,
  49. "text": "E2E_DWV_ANSWER_1 第一项无误。"
  50. }
  51. },
  52. {
  53. "id": "dwv-agent-2",
  54. "metadata": {
  55. "kind": "main",
  56. "source": "synthetic",
  57. "timingPolicy": "fast-text",
  58. "syntheticReason": "固定工作流子代理的回答;子代理会话、并行调度、阶段推进、流水线条目传递与结果回传仍走真实 run 引擎。"
  59. },
  60. "match": {
  61. "method": "POST",
  62. "pathIncludes": "/messages",
  63. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  64. "bodyExcludes": [
  65. "Generate a concise title",
  66. "CRITICAL: Respond with TEXT ONLY",
  67. "You are now acting as the memory extraction subagent"
  68. ],
  69. "lastUserMessageIncludes": ["E2E_DWV_TASK_2"]
  70. },
  71. "response": {
  72. "statusCode": 200,
  73. "text": "E2E_DWV_ANSWER_2 第二项无误。"
  74. }
  75. },
  76. {
  77. "id": "dwv-agent-3",
  78. "metadata": {
  79. "kind": "main",
  80. "source": "synthetic",
  81. "timingPolicy": "fast-text",
  82. "syntheticReason": "固定工作流子代理的回答;子代理会话、并行调度、阶段推进、流水线条目传递与结果回传仍走真实 run 引擎。"
  83. },
  84. "match": {
  85. "method": "POST",
  86. "pathIncludes": "/messages",
  87. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  88. "bodyExcludes": [
  89. "Generate a concise title",
  90. "CRITICAL: Respond with TEXT ONLY",
  91. "You are now acting as the memory extraction subagent"
  92. ],
  93. "lastUserMessageIncludes": ["E2E_DWV_TASK_3"]
  94. },
  95. "response": {
  96. "statusCode": 200,
  97. "text": "E2E_DWV_ANSWER_3 第三项无误。"
  98. }
  99. },
  100. {
  101. "id": "dwv-agent-fail",
  102. "metadata": {
  103. "kind": "main",
  104. "source": "synthetic",
  105. "timingPolicy": "fast-text",
  106. "syntheticReason": "固定带类型 ask 的子代理只回文字、不调用 submit_result;催交一轮后由真实 run 引擎判定该节点失败(ResultNotSubmitted)。"
  107. },
  108. "match": {
  109. "method": "POST",
  110. "pathIncludes": "/messages",
  111. "bodyIncludes": ["You are a subagent inside a dynamic workflow run", "E2E_DWV_FAIL_"],
  112. "bodyExcludes": [
  113. "Generate a concise title",
  114. "CRITICAL: Respond with TEXT ONLY",
  115. "You are now acting as the memory extraction subagent"
  116. ]
  117. },
  118. "response": {
  119. "statusCode": 200,
  120. "text": "E2E_DWV_NO_SUBMIT 这一项我只能用文字回答。"
  121. }
  122. },
  123. {
  124. "id": "dwv-produce-1",
  125. "metadata": {
  126. "kind": "main",
  127. "source": "synthetic",
  128. "timingPolicy": "fast-text",
  129. "syntheticReason": "固定工作流子代理的回答;子代理会话、并行调度、阶段推进、流水线条目传递与结果回传仍走真实 run 引擎。"
  130. },
  131. "match": {
  132. "method": "POST",
  133. "pathIncludes": "/messages",
  134. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  135. "bodyExcludes": [
  136. "Generate a concise title",
  137. "CRITICAL: Respond with TEXT ONLY",
  138. "You are now acting as the memory extraction subagent"
  139. ],
  140. "lastUserMessageIncludes": ["E2E_DWV_TASK_PRODUCE_1"]
  141. },
  142. "response": {
  143. "statusCode": 200,
  144. "text": "E2E_DWV_ITEM_1 第一条条目。"
  145. }
  146. },
  147. {
  148. "id": "dwv-produce-2",
  149. "metadata": {
  150. "kind": "main",
  151. "source": "synthetic",
  152. "timingPolicy": "controlled-stream",
  153. "syntheticReason": "子代理的回答以门闩挂起,在运行态断言完成后由测试显式释放,不依赖固定响应延时。"
  154. },
  155. "match": {
  156. "method": "POST",
  157. "pathIncludes": "/messages",
  158. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  159. "bodyExcludes": [
  160. "Generate a concise title",
  161. "CRITICAL: Respond with TEXT ONLY",
  162. "You are now acting as the memory extraction subagent"
  163. ],
  164. "lastUserMessageIncludes": ["E2E_DWV_TASK_PRODUCE_2"]
  165. },
  166. "response": {
  167. "statusCode": 200,
  168. "headers": {
  169. "content-type": "text/event-stream; charset=utf-8"
  170. },
  171. "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_e2e_dwv_produce_2\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"usage\":{\"input_tokens\":256,\"output_tokens\":0}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_DWV_ITEM_2 第二条条目。\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\"},\"usage\":{\"output_tokens\":32}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
  172. "chunks": [
  173. {
  174. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_e2e_dwv_produce_2\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"usage\":{\"input_tokens\":256,\"output_tokens\":0}}}\n\n",
  175. "delayMs": 0
  176. },
  177. {
  178. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n",
  179. "delayMs": 0
  180. },
  181. {
  182. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_DWV_ITEM_2 第二条条目。\"}}\n\n",
  183. "delayMs": 0
  184. },
  185. {
  186. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n",
  187. "delayMs": 0
  188. },
  189. {
  190. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\"},\"usage\":{\"output_tokens\":32}}\n\n",
  191. "delayMs": 0
  192. },
  193. {
  194. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
  195. "delayMs": 0
  196. }
  197. ],
  198. "releaseAfterChunks": 2
  199. },
  200. "maxMatches": 1
  201. },
  202. {
  203. "id": "dwv-digest-1",
  204. "metadata": {
  205. "kind": "main",
  206. "source": "synthetic",
  207. "timingPolicy": "controlled-stream",
  208. "syntheticReason": "子代理的回答以门闩挂起,在运行态断言完成后由测试显式释放,不依赖固定响应延时。"
  209. },
  210. "match": {
  211. "method": "POST",
  212. "pathIncludes": "/messages",
  213. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  214. "bodyExcludes": [
  215. "Generate a concise title",
  216. "CRITICAL: Respond with TEXT ONLY",
  217. "You are now acting as the memory extraction subagent"
  218. ],
  219. "lastUserMessageIncludes": ["E2E_DWV_TASK_DIGEST", "E2E_DWV_ITEM_1"]
  220. },
  221. "response": {
  222. "statusCode": 200,
  223. "headers": {
  224. "content-type": "text/event-stream; charset=utf-8"
  225. },
  226. "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_e2e_dwv_digest_1\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"usage\":{\"input_tokens\":256,\"output_tokens\":0}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_DWV_NOTE_1 第一条读完。\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\"},\"usage\":{\"output_tokens\":32}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
  227. "chunks": [
  228. {
  229. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_e2e_dwv_digest_1\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"usage\":{\"input_tokens\":256,\"output_tokens\":0}}}\n\n",
  230. "delayMs": 0
  231. },
  232. {
  233. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n",
  234. "delayMs": 0
  235. },
  236. {
  237. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_DWV_NOTE_1 第一条读完。\"}}\n\n",
  238. "delayMs": 0
  239. },
  240. {
  241. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n",
  242. "delayMs": 0
  243. },
  244. {
  245. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\"},\"usage\":{\"output_tokens\":32}}\n\n",
  246. "delayMs": 0
  247. },
  248. {
  249. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
  250. "delayMs": 0
  251. }
  252. ],
  253. "releaseAfterChunks": 2
  254. },
  255. "maxMatches": 1
  256. },
  257. {
  258. "id": "dwv-digest-2",
  259. "metadata": {
  260. "kind": "main",
  261. "source": "synthetic",
  262. "timingPolicy": "fast-text",
  263. "syntheticReason": "固定工作流子代理的回答;子代理会话、并行调度、阶段推进、流水线条目传递与结果回传仍走真实 run 引擎。"
  264. },
  265. "match": {
  266. "method": "POST",
  267. "pathIncludes": "/messages",
  268. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  269. "bodyExcludes": [
  270. "Generate a concise title",
  271. "CRITICAL: Respond with TEXT ONLY",
  272. "You are now acting as the memory extraction subagent"
  273. ],
  274. "lastUserMessageIncludes": ["E2E_DWV_TASK_DIGEST", "E2E_DWV_ITEM_2"]
  275. },
  276. "response": {
  277. "statusCode": 200,
  278. "text": "E2E_DWV_NOTE_2 第二条读完。"
  279. }
  280. },
  281. {
  282. "id": "dwv-draft-1",
  283. "metadata": {
  284. "kind": "main",
  285. "source": "synthetic",
  286. "timingPolicy": "fast-text",
  287. "syntheticReason": "固定工作流子代理的回答;子代理会话、并行调度、阶段推进、流水线条目传递与结果回传仍走真实 run 引擎。"
  288. },
  289. "match": {
  290. "method": "POST",
  291. "pathIncludes": "/messages",
  292. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  293. "bodyExcludes": [
  294. "Generate a concise title",
  295. "CRITICAL: Respond with TEXT ONLY",
  296. "You are now acting as the memory extraction subagent"
  297. ],
  298. "lastUserMessageIncludes": ["E2E_DWV_TASK_DRAFT_1"]
  299. },
  300. "response": {
  301. "statusCode": 200,
  302. "text": "E2E_DWV_DRAFT_A 初稿。"
  303. }
  304. },
  305. {
  306. "id": "dwv-review-1",
  307. "metadata": {
  308. "kind": "main",
  309. "source": "synthetic",
  310. "timingPolicy": "fast-text",
  311. "syntheticReason": "固定工作流子代理的回答;子代理会话、并行调度、阶段推进、流水线条目传递与结果回传仍走真实 run 引擎。"
  312. },
  313. "match": {
  314. "method": "POST",
  315. "pathIncludes": "/messages",
  316. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  317. "bodyExcludes": [
  318. "Generate a concise title",
  319. "CRITICAL: Respond with TEXT ONLY",
  320. "You are now acting as the memory extraction subagent"
  321. ],
  322. "lastUserMessageIncludes": ["E2E_DWV_TASK_REVIEW_1"]
  323. },
  324. "response": {
  325. "statusCode": 200,
  326. "text": "E2E_DWV_REVIEW_A 初稿需要再改一轮。"
  327. }
  328. },
  329. {
  330. "id": "dwv-draft-2",
  331. "metadata": {
  332. "kind": "main",
  333. "source": "synthetic",
  334. "timingPolicy": "fast-text",
  335. "syntheticReason": "固定工作流子代理的回答;子代理会话、并行调度、阶段推进、流水线条目传递与结果回传仍走真实 run 引擎。"
  336. },
  337. "match": {
  338. "method": "POST",
  339. "pathIncludes": "/messages",
  340. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  341. "bodyExcludes": [
  342. "Generate a concise title",
  343. "CRITICAL: Respond with TEXT ONLY",
  344. "You are now acting as the memory extraction subagent"
  345. ],
  346. "lastUserMessageIncludes": ["E2E_DWV_TASK_DRAFT_2"]
  347. },
  348. "response": {
  349. "statusCode": 200,
  350. "text": "E2E_DWV_DRAFT_B 二稿。"
  351. }
  352. },
  353. {
  354. "id": "dwv-review-2",
  355. "metadata": {
  356. "kind": "main",
  357. "source": "synthetic",
  358. "timingPolicy": "controlled-stream",
  359. "syntheticReason": "子代理的回答以门闩挂起,在运行态断言完成后由测试显式释放,不依赖固定响应延时。"
  360. },
  361. "match": {
  362. "method": "POST",
  363. "pathIncludes": "/messages",
  364. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  365. "bodyExcludes": [
  366. "Generate a concise title",
  367. "CRITICAL: Respond with TEXT ONLY",
  368. "You are now acting as the memory extraction subagent"
  369. ],
  370. "lastUserMessageIncludes": ["E2E_DWV_TASK_REVIEW_2"]
  371. },
  372. "response": {
  373. "statusCode": 200,
  374. "headers": {
  375. "content-type": "text/event-stream; charset=utf-8"
  376. },
  377. "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_e2e_dwv_review_2\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"usage\":{\"input_tokens\":256,\"output_tokens\":0}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_DWV_REVIEW_B 二稿通过。\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\"},\"usage\":{\"output_tokens\":32}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
  378. "chunks": [
  379. {
  380. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_e2e_dwv_review_2\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"usage\":{\"input_tokens\":256,\"output_tokens\":0}}}\n\n",
  381. "delayMs": 0
  382. },
  383. {
  384. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n",
  385. "delayMs": 0
  386. },
  387. {
  388. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_DWV_REVIEW_B 二稿通过。\"}}\n\n",
  389. "delayMs": 0
  390. },
  391. {
  392. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n",
  393. "delayMs": 0
  394. },
  395. {
  396. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\"},\"usage\":{\"output_tokens\":32}}\n\n",
  397. "delayMs": 0
  398. },
  399. {
  400. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
  401. "delayMs": 0
  402. }
  403. ],
  404. "releaseAfterChunks": 2
  405. },
  406. "maxMatches": 1
  407. },
  408. {
  409. "id": "dwv-final",
  410. "metadata": {
  411. "kind": "main",
  412. "source": "synthetic",
  413. "timingPolicy": "fast-text",
  414. "syntheticReason": "固定工作流子代理的回答;子代理会话、并行调度、阶段推进、流水线条目传递与结果回传仍走真实 run 引擎。"
  415. },
  416. "match": {
  417. "method": "POST",
  418. "pathIncludes": "/messages",
  419. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  420. "bodyExcludes": [
  421. "Generate a concise title",
  422. "CRITICAL: Respond with TEXT ONLY",
  423. "You are now acting as the memory extraction subagent"
  424. ],
  425. "lastUserMessageIncludes": ["E2E_DWV_TASK_FINAL"]
  426. },
  427. "response": {
  428. "statusCode": 200,
  429. "text": "E2E_DWV_FINAL 定稿完成。"
  430. }
  431. },
  432. {
  433. "id": "dwv-skill",
  434. "metadata": {
  435. "kind": "main",
  436. "source": "synthetic",
  437. "timingPolicy": "fast-text",
  438. "syntheticReason": "固定 Skill/CreateWorkflow 与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话与完成通知由 Agent 执行。"
  439. },
  440. "match": {
  441. "method": "POST",
  442. "pathIncludes": "/messages",
  443. "bodyExcludes": [
  444. "Generate a concise title",
  445. "CRITICAL: Respond with TEXT ONLY",
  446. "You are now acting as the memory extraction subagent",
  447. "You are a subagent inside a dynamic workflow run",
  448. "toolu_dwv_skill"
  449. ],
  450. "lastUserMessageIncludes": ["E2E_DWV_START"]
  451. },
  452. "response": {
  453. "statusCode": 200,
  454. "toolUse": {
  455. "id": "toolu_dwv_skill",
  456. "name": "Skill",
  457. "input": {
  458. "skill": "dynamic-workflows"
  459. }
  460. }
  461. }
  462. },
  463. {
  464. "id": "dwv-create",
  465. "metadata": {
  466. "kind": "main",
  467. "source": "synthetic",
  468. "timingPolicy": "fast-text",
  469. "syntheticReason": "固定 Skill/CreateWorkflow 与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话与完成通知由 Agent 执行。"
  470. },
  471. "match": {
  472. "method": "POST",
  473. "pathIncludes": "/messages",
  474. "bodyExcludes": [
  475. "Generate a concise title",
  476. "CRITICAL: Respond with TEXT ONLY",
  477. "You are now acting as the memory extraction subagent",
  478. "You are a subagent inside a dynamic workflow run",
  479. "toolu_dwv_create"
  480. ],
  481. "bodyIncludes": ["E2E_DWV_START", "toolu_dwv_skill"]
  482. },
  483. "response": {
  484. "statusCode": 200,
  485. "toolUse": {
  486. "id": "toolu_dwv_create",
  487. "name": "CreateWorkflow",
  488. "input": {
  489. "name": "E2E 检查流水线",
  490. "script": "interface Verdict {\n /** 这一项是否通过核验。 */\n ok: boolean;\n}\n// 一个检查员失败不拖垮整个阶段:失败折成一句话,其余结论照常汇合。\nasync function settle<T>(work: PromiseLike<T>): Promise<T | string> {\n try {\n return await work;\n } catch {\n return \"未通过\";\n }\n}\nconst items = channel<string>(\"条目\");\nphase(\"铺开\");\nconst checks = await Promise.all([\n settle(agent(\"检查员一\").ask(\"E2E_DWV_TASK_1 核对第一项,给出一句结论。\")),\n settle(agent(\"检查员二\").ask(\"E2E_DWV_TASK_2 核对第二项,给出一句结论。\")),\n settle(agent(\"检查员三\").ask(\"E2E_DWV_TASK_3 核对第三项,给出一句结论。\")),\n settle(agent(\"检查员四\").ask<Verdict>(\"E2E_DWV_FAIL_4 核验第四项并提交结果。\")),\n settle(agent(\"检查员五\").ask<Verdict>(\"E2E_DWV_FAIL_5 核验第五项并提交结果。\")),\n settle(agent(\"检查员六\").ask<Verdict>(\"E2E_DWV_FAIL_6 核验第六项并提交结果。\")),\n settle(agent(\"检查员七\").ask<Verdict>(\"E2E_DWV_FAIL_7 核验第七项并提交结果。\")),\n settle(agent(\"检查员八\").ask<Verdict>(\"E2E_DWV_FAIL_8 核验第八项并提交结果。\")),\n settle(agent(\"检查员九\").ask<Verdict>(\"E2E_DWV_FAIL_9 核验第九项并提交结果。\")),\n]);\n// 两段流水:产出边找边送,消化边收边读;两段都先启动,再一次性汇合。\nconst produce = future(async () => {\n phase(\"产出\");\n const producer = agent(\"产出员\");\n try {\n items.send(await producer.ask(\"E2E_DWV_TASK_PRODUCE_1 产出第一条条目。\"));\n items.send(await producer.ask(\"E2E_DWV_TASK_PRODUCE_2 产出第二条条目。\"));\n } finally {\n items.close();\n }\n});\nconst digest = future(async () => {\n phase(\"消化\");\n const reader = agent(\"消化员\");\n const notes: string[] = [];\n for await (const item of items) {\n notes.push(await reader.ask(`E2E_DWV_TASK_DIGEST 消化这条条目:${item}`));\n }\n return notes;\n});\nconst [, notes] = await Promise.all([produce, digest]);\nlet draft = notes.join(\";\");\nfor (let round = 1; round <= 2; round++) {\n phase(\"起草\");\n draft = await agent(`起草员${round}`).ask(`E2E_DWV_TASK_DRAFT_${round} 按材料起草:${draft}`);\n phase(\"复核\");\n await agent(`复核员${round}`).ask(`E2E_DWV_TASK_REVIEW_${round} 复核这一稿:${draft}`);\n}\nphase(\"收尾\");\nconst final = await agent(\"收尾员\").ask(`E2E_DWV_TASK_FINAL 定稿:${draft}`);\nreturn { final, checks };"
  491. }
  492. }
  493. }
  494. },
  495. {
  496. "id": "dwv-notified",
  497. "metadata": {
  498. "kind": "main",
  499. "source": "synthetic",
  500. "timingPolicy": "fast-text",
  501. "syntheticReason": "固定 Skill/CreateWorkflow 与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话与完成通知由 Agent 执行。"
  502. },
  503. "match": {
  504. "method": "POST",
  505. "pathIncludes": "/messages",
  506. "bodyExcludes": [
  507. "Generate a concise title",
  508. "CRITICAL: Respond with TEXT ONLY",
  509. "You are now acting as the memory extraction subagent",
  510. "You are a subagent inside a dynamic workflow run"
  511. ],
  512. "bodyIncludes": ["E2E_DWV_START"],
  513. "lastUserMessageIncludes": ["<task-notification>", "<status>completed</status>"]
  514. },
  515. "response": {
  516. "statusCode": 200,
  517. "text": "E2E_DWV_DONE 工作流已完成。"
  518. }
  519. },
  520. {
  521. "id": "dwv-created",
  522. "metadata": {
  523. "kind": "main",
  524. "source": "synthetic",
  525. "timingPolicy": "fast-text",
  526. "syntheticReason": "固定 Skill/CreateWorkflow 与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话与完成通知由 Agent 执行。"
  527. },
  528. "match": {
  529. "method": "POST",
  530. "pathIncludes": "/messages",
  531. "bodyExcludes": [
  532. "Generate a concise title",
  533. "CRITICAL: Respond with TEXT ONLY",
  534. "You are now acting as the memory extraction subagent",
  535. "You are a subagent inside a dynamic workflow run"
  536. ],
  537. "bodyIncludes": ["E2E_DWV_START", "toolu_dwv_create"]
  538. },
  539. "response": {
  540. "statusCode": 200,
  541. "text": "E2E_DWV_STARTED 工作流已启动,结果会以通知送达。"
  542. }
  543. }
  544. ]
  545. }