conversation-session-dynamic-workflow-gray-always-on-run-pane-details.json 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-dynamic-workflow-gray-always-on-run-pane-details",
  4. "spec": "./test/e2e/conversation-session/workflows/conversation-session-dynamic-workflow-gray-always-on-run-pane-details.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "dwd-title",
  8. "metadata": {
  9. "kind": "common",
  10. "source": "synthetic",
  11. "timingPolicy": "fast-text",
  12. "syntheticReason": "固定 Skill/CreateWorkflow 与各轮回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话、GUI 配置与完成通知由 Agent 执行。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/messages",
  17. "bodyExcludes": [],
  18. "bodyIncludes": ["Generate a concise title", "E2E_DWD_"]
  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": "dwd-agent-check",
  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_DWD_TASK_CHECK"]
  46. },
  47. "response": {
  48. "statusCode": 200,
  49. "text": "E2E_DWD_ANSWER_CHECK 材料核对无误。"
  50. }
  51. },
  52. {
  53. "id": "dwd-agent-write",
  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_DWD_TASK_WRITE"]
  70. },
  71. "response": {
  72. "statusCode": 200,
  73. "text": "E2E_DWD_ANSWER_WRITE 结论已成文。"
  74. }
  75. },
  76. {
  77. "id": "dwd-agent-probe",
  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_DWD_TASK_PROBE"]
  94. },
  95. "response": {
  96. "statusCode": 200,
  97. "text": "E2E_DWD_ANSWER_PROBE 证据不足。"
  98. }
  99. },
  100. {
  101. "id": "dwd-agent-prep",
  102. "metadata": {
  103. "kind": "main",
  104. "source": "synthetic",
  105. "timingPolicy": "fast-text",
  106. "syntheticReason": "固定工作流子代理的回答;子代理会话、模型绑定、阶段推进、缓存导入与结果回传仍走真实 run 引擎。"
  107. },
  108. "match": {
  109. "method": "POST",
  110. "pathIncludes": "/messages",
  111. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  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. "lastUserMessageIncludes": ["E2E_DWD_TASK_PREP"]
  118. },
  119. "response": {
  120. "statusCode": 200,
  121. "text": "E2E_DWD_ANSWER_PREP 准备就绪。"
  122. }
  123. },
  124. {
  125. "id": "dwd-agent-long-held",
  126. "metadata": {
  127. "kind": "main",
  128. "source": "synthetic",
  129. "timingPolicy": "controlled-stream",
  130. "syntheticReason": "长跑子代理的回答以门闩挂起,让 run 保持 running 以便在侧板上配置;旧 run 被 GUI 修订替代时这条请求随之中止,不依赖固定响应延时。"
  131. },
  132. "match": {
  133. "method": "POST",
  134. "pathIncludes": "/messages",
  135. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  136. "bodyExcludes": [
  137. "Generate a concise title",
  138. "CRITICAL: Respond with TEXT ONLY",
  139. "You are now acting as the memory extraction subagent"
  140. ],
  141. "lastUserMessageIncludes": ["E2E_DWD_TASK_LONG"]
  142. },
  143. "response": {
  144. "statusCode": 200,
  145. "headers": {
  146. "content-type": "text/event-stream; charset=utf-8"
  147. },
  148. "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_e2e_dwd_agent_long\",\"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_DWD_ANSWER_LONG_HELD 旧 run 的长跑回答(不应送达)。\"}}\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",
  149. "chunks": [
  150. {
  151. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_e2e_dwd_agent_long\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"usage\":{\"input_tokens\":256,\"output_tokens\":0}}}\n\n",
  152. "delayMs": 0
  153. },
  154. {
  155. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n",
  156. "delayMs": 0
  157. },
  158. {
  159. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_DWD_ANSWER_LONG_HELD 旧 run 的长跑回答(不应送达)。\"}}\n\n",
  160. "delayMs": 0
  161. },
  162. {
  163. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n",
  164. "delayMs": 0
  165. },
  166. {
  167. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\"},\"usage\":{\"output_tokens\":32}}\n\n",
  168. "delayMs": 0
  169. },
  170. {
  171. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
  172. "delayMs": 0
  173. }
  174. ],
  175. "releaseAfterChunks": 2
  176. },
  177. "maxMatches": 1
  178. },
  179. {
  180. "id": "dwd-agent-long",
  181. "metadata": {
  182. "kind": "main",
  183. "source": "synthetic",
  184. "timingPolicy": "fast-text",
  185. "syntheticReason": "固定工作流子代理的回答;子代理会话、模型绑定、阶段推进、缓存导入与结果回传仍走真实 run 引擎。"
  186. },
  187. "match": {
  188. "method": "POST",
  189. "pathIncludes": "/messages",
  190. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  191. "bodyExcludes": [
  192. "Generate a concise title",
  193. "CRITICAL: Respond with TEXT ONLY",
  194. "You are now acting as the memory extraction subagent"
  195. ],
  196. "lastUserMessageIncludes": ["E2E_DWD_TASK_LONG"]
  197. },
  198. "response": {
  199. "statusCode": 200,
  200. "text": "E2E_DWD_ANSWER_LONG 长跑完成。"
  201. }
  202. },
  203. {
  204. "id": "dwd-ok-notified",
  205. "metadata": {
  206. "kind": "main",
  207. "source": "synthetic",
  208. "timingPolicy": "fast-text",
  209. "syntheticReason": "固定 Skill/CreateWorkflow 与各轮回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话、GUI 配置与完成通知由 Agent 执行。"
  210. },
  211. "match": {
  212. "method": "POST",
  213. "pathIncludes": "/messages",
  214. "bodyExcludes": [
  215. "Generate a concise title",
  216. "CRITICAL: Respond with TEXT ONLY",
  217. "You are now acting as the memory extraction subagent",
  218. "You are a subagent inside a dynamic workflow run"
  219. ],
  220. "bodyIncludes": ["E2E_DWD_OK_START"],
  221. "lastUserMessageIncludes": [
  222. "<task-notification>",
  223. "<description>E2E 核对成文</description>"
  224. ]
  225. },
  226. "response": {
  227. "statusCode": 200,
  228. "text": "E2E_DWD_OK_DONE 核对成文工作流已完成。"
  229. }
  230. },
  231. {
  232. "id": "dwd-fail-notified",
  233. "metadata": {
  234. "kind": "main",
  235. "source": "synthetic",
  236. "timingPolicy": "fast-text",
  237. "syntheticReason": "固定 Skill/CreateWorkflow 与各轮回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话、GUI 配置与完成通知由 Agent 执行。"
  238. },
  239. "match": {
  240. "method": "POST",
  241. "pathIncludes": "/messages",
  242. "bodyExcludes": [
  243. "Generate a concise title",
  244. "CRITICAL: Respond with TEXT ONLY",
  245. "You are now acting as the memory extraction subagent",
  246. "You are a subagent inside a dynamic workflow run"
  247. ],
  248. "bodyIncludes": ["E2E_DWD_FAIL_START"],
  249. "lastUserMessageIncludes": [
  250. "<task-notification>",
  251. "<description>E2E 取证失败</description>"
  252. ]
  253. },
  254. "response": {
  255. "statusCode": 200,
  256. "text": "E2E_DWD_FAIL_DONE 取证工作流出错了。"
  257. }
  258. },
  259. {
  260. "id": "dwd-live-notified",
  261. "metadata": {
  262. "kind": "main",
  263. "source": "synthetic",
  264. "timingPolicy": "fast-text",
  265. "syntheticReason": "固定 Skill/CreateWorkflow 与各轮回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话、GUI 配置与完成通知由 Agent 执行。"
  266. },
  267. "match": {
  268. "method": "POST",
  269. "pathIncludes": "/messages",
  270. "bodyExcludes": [
  271. "Generate a concise title",
  272. "CRITICAL: Respond with TEXT ONLY",
  273. "You are now acting as the memory extraction subagent",
  274. "You are a subagent inside a dynamic workflow run"
  275. ],
  276. "bodyIncludes": ["E2E_DWD_LIVE_START"],
  277. "lastUserMessageIncludes": [
  278. "<task-notification>",
  279. "<tool-use-id>settings-",
  280. "<status>completed</status>"
  281. ]
  282. },
  283. "response": {
  284. "statusCode": 200,
  285. "text": "E2E_DWD_LIVE_DONE 长跑工作流已完成。"
  286. }
  287. },
  288. {
  289. "id": "dwd-skill",
  290. "metadata": {
  291. "kind": "main",
  292. "source": "synthetic",
  293. "timingPolicy": "fast-text",
  294. "syntheticReason": "固定 Skill/CreateWorkflow 与各轮回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话、GUI 配置与完成通知由 Agent 执行。"
  295. },
  296. "match": {
  297. "method": "POST",
  298. "pathIncludes": "/messages",
  299. "bodyExcludes": [
  300. "Generate a concise title",
  301. "CRITICAL: Respond with TEXT ONLY",
  302. "You are now acting as the memory extraction subagent",
  303. "You are a subagent inside a dynamic workflow run",
  304. "toolu_dwd_skill"
  305. ],
  306. "lastUserMessageIncludes": ["E2E_DWD_OK_START"]
  307. },
  308. "response": {
  309. "statusCode": 200,
  310. "toolUse": {
  311. "id": "toolu_dwd_skill",
  312. "name": "Skill",
  313. "input": {
  314. "skill": "dynamic-workflows"
  315. }
  316. }
  317. }
  318. },
  319. {
  320. "id": "dwd-create-ok",
  321. "metadata": {
  322. "kind": "main",
  323. "source": "synthetic",
  324. "timingPolicy": "fast-text",
  325. "syntheticReason": "固定 Skill/CreateWorkflow 与各轮回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话、GUI 配置与完成通知由 Agent 执行。"
  326. },
  327. "match": {
  328. "method": "POST",
  329. "pathIncludes": "/messages",
  330. "bodyExcludes": [
  331. "Generate a concise title",
  332. "CRITICAL: Respond with TEXT ONLY",
  333. "You are now acting as the memory extraction subagent",
  334. "You are a subagent inside a dynamic workflow run",
  335. "toolu_dwd_create_ok"
  336. ],
  337. "bodyIncludes": ["E2E_DWD_OK_START", "toolu_dwd_skill"]
  338. },
  339. "response": {
  340. "statusCode": 200,
  341. "toolUse": {
  342. "id": "toolu_dwd_create_ok",
  343. "name": "CreateWorkflow",
  344. "input": {
  345. "name": "E2E 核对成文",
  346. "subagent_model": "deepseek-v4-pro",
  347. "script": "phase(\"核对\");\n// 核对员的人设点名自己的模型;撰写员没点名,跟随 run 的 subagent_model。\nconst check = await agent(\"核对员\", { model: \"deepseek-v4-flash\" }).ask(\"E2E_DWD_TASK_CHECK 核对材料,给出一句结论。\");\nphase(\"成文\");\nconst text = await agent(\"撰写员\").ask(`E2E_DWD_TASK_WRITE 根据核对结论成文:${check}`);\nreturn { check, text };"
  348. }
  349. }
  350. }
  351. },
  352. {
  353. "id": "dwd-create-fail",
  354. "metadata": {
  355. "kind": "main",
  356. "source": "synthetic",
  357. "timingPolicy": "fast-text",
  358. "syntheticReason": "固定 Skill/CreateWorkflow 与各轮回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话、GUI 配置与完成通知由 Agent 执行。"
  359. },
  360. "match": {
  361. "method": "POST",
  362. "pathIncludes": "/messages",
  363. "bodyExcludes": [
  364. "Generate a concise title",
  365. "CRITICAL: Respond with TEXT ONLY",
  366. "You are now acting as the memory extraction subagent",
  367. "You are a subagent inside a dynamic workflow run",
  368. "toolu_dwd_create_fail"
  369. ],
  370. "lastUserMessageIncludes": ["E2E_DWD_FAIL_START"]
  371. },
  372. "response": {
  373. "statusCode": 200,
  374. "toolUse": {
  375. "id": "toolu_dwd_create_fail",
  376. "name": "CreateWorkflow",
  377. "input": {
  378. "name": "E2E 取证失败",
  379. "script": "phase(\"取证\");\nconst probe = await agent(\"取证员\").ask(\"E2E_DWD_TASK_PROBE 取证并给出一句结论。\");\nthrow new Error(`E2E_DWD_FAIL_REASON 证据不足,无法继续:${probe.length}`);"
  380. }
  381. }
  382. }
  383. },
  384. {
  385. "id": "dwd-create-live",
  386. "metadata": {
  387. "kind": "main",
  388. "source": "synthetic",
  389. "timingPolicy": "fast-text",
  390. "syntheticReason": "固定 Skill/CreateWorkflow 与各轮回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话、GUI 配置与完成通知由 Agent 执行。"
  391. },
  392. "match": {
  393. "method": "POST",
  394. "pathIncludes": "/messages",
  395. "bodyExcludes": [
  396. "Generate a concise title",
  397. "CRITICAL: Respond with TEXT ONLY",
  398. "You are now acting as the memory extraction subagent",
  399. "You are a subagent inside a dynamic workflow run",
  400. "toolu_dwd_create_live"
  401. ],
  402. "lastUserMessageIncludes": ["E2E_DWD_LIVE_START"]
  403. },
  404. "response": {
  405. "statusCode": 200,
  406. "toolUse": {
  407. "id": "toolu_dwd_create_live",
  408. "name": "CreateWorkflow",
  409. "input": {
  410. "name": "E2E 长跑",
  411. "script": "phase(\"准备\");\nconst prep = await agent(\"准备员\").ask(\"E2E_DWD_TASK_PREP 准备材料,给出一句结论。\");\nphase(\"长跑\");\nconst long = await agent(\"长跑员\").ask(`E2E_DWD_TASK_LONG 基于准备结论长跑:${prep}`);\nreturn { prep, long };"
  412. }
  413. }
  414. }
  415. },
  416. {
  417. "id": "dwd-ok-created",
  418. "metadata": {
  419. "kind": "main",
  420. "source": "synthetic",
  421. "timingPolicy": "fast-text",
  422. "syntheticReason": "固定 Skill/CreateWorkflow 与各轮回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话、GUI 配置与完成通知由 Agent 执行。"
  423. },
  424. "match": {
  425. "method": "POST",
  426. "pathIncludes": "/messages",
  427. "bodyExcludes": [
  428. "Generate a concise title",
  429. "CRITICAL: Respond with TEXT ONLY",
  430. "You are now acting as the memory extraction subagent",
  431. "You are a subagent inside a dynamic workflow run",
  432. "E2E_DWD_FAIL_START",
  433. "E2E_DWD_LIVE_START"
  434. ],
  435. "bodyIncludes": ["E2E_DWD_OK_START", "toolu_dwd_create_ok"],
  436. "lastUserMessageExcludes": ["<task-notification>"]
  437. },
  438. "response": {
  439. "statusCode": 200,
  440. "text": "E2E_DWD_OK_STARTED 核对成文工作流已启动。"
  441. }
  442. },
  443. {
  444. "id": "dwd-fail-created",
  445. "metadata": {
  446. "kind": "main",
  447. "source": "synthetic",
  448. "timingPolicy": "fast-text",
  449. "syntheticReason": "固定 Skill/CreateWorkflow 与各轮回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话、GUI 配置与完成通知由 Agent 执行。"
  450. },
  451. "match": {
  452. "method": "POST",
  453. "pathIncludes": "/messages",
  454. "bodyExcludes": [
  455. "Generate a concise title",
  456. "CRITICAL: Respond with TEXT ONLY",
  457. "You are now acting as the memory extraction subagent",
  458. "You are a subagent inside a dynamic workflow run",
  459. "E2E_DWD_LIVE_START"
  460. ],
  461. "bodyIncludes": ["E2E_DWD_FAIL_START", "toolu_dwd_create_fail"],
  462. "lastUserMessageExcludes": ["<task-notification>"]
  463. },
  464. "response": {
  465. "statusCode": 200,
  466. "text": "E2E_DWD_FAIL_STARTED 取证工作流已启动。"
  467. }
  468. },
  469. {
  470. "id": "dwd-live-created",
  471. "metadata": {
  472. "kind": "main",
  473. "source": "synthetic",
  474. "timingPolicy": "fast-text",
  475. "syntheticReason": "固定 Skill/CreateWorkflow 与各轮回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、子代理会话、GUI 配置与完成通知由 Agent 执行。"
  476. },
  477. "match": {
  478. "method": "POST",
  479. "pathIncludes": "/messages",
  480. "bodyExcludes": [
  481. "Generate a concise title",
  482. "CRITICAL: Respond with TEXT ONLY",
  483. "You are now acting as the memory extraction subagent",
  484. "You are a subagent inside a dynamic workflow run"
  485. ],
  486. "bodyIncludes": ["E2E_DWD_LIVE_START", "toolu_dwd_create_live"],
  487. "lastUserMessageExcludes": ["<task-notification>"]
  488. },
  489. "response": {
  490. "statusCode": 200,
  491. "text": "E2E_DWD_LIVE_STARTED 长跑工作流已启动。"
  492. }
  493. }
  494. ]
  495. }