conversation-session-dynamic-workflow-gray-always-on-restart.json 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-dynamic-workflow-gray-always-on-restart",
  4. "spec": "./test/e2e/conversation-session/workflows/conversation-session-dynamic-workflow-gray-always-on-restart.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "dwp-title",
  8. "metadata": {
  9. "kind": "common",
  10. "source": "synthetic",
  11. "timingPolicy": "fast-text",
  12. "syntheticReason": "固定 Skill/CreateWorkflow 与子代理回答的模型选择;真实工作流编译、审批、运行、重启时的引擎收口、冷回放与通知由产品链路执行。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/messages",
  17. "bodyExcludes": [],
  18. "bodyIncludes": ["Generate a concise title", "E2E_DWP_"]
  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": "dwp-a-agent",
  30. "metadata": {
  31. "kind": "main",
  32. "source": "synthetic",
  33. "timingPolicy": "fast-text",
  34. "syntheticReason": "固定 Skill/CreateWorkflow 与子代理回答的模型选择;真实工作流编译、审批、运行、重启时的引擎收口、冷回放与通知由产品链路执行。"
  35. },
  36. "match": {
  37. "method": "POST",
  38. "pathIncludes": "/messages",
  39. "bodyExcludes": [
  40. "Generate a concise title",
  41. "CRITICAL: Respond with TEXT ONLY",
  42. "E2E_DWP_A_START"
  43. ],
  44. "lastUserMessageIncludes": ["E2E_DWP_AGENT_NOTE"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "text": "E2E_DWP_NOTE_DONE 准备完成。"
  49. }
  50. },
  51. {
  52. "id": "dwp-a-skill",
  53. "metadata": {
  54. "kind": "main",
  55. "source": "synthetic",
  56. "timingPolicy": "fast-text",
  57. "syntheticReason": "固定 Skill/CreateWorkflow 与子代理回答的模型选择;真实工作流编译、审批、运行、重启时的引擎收口、冷回放与通知由产品链路执行。"
  58. },
  59. "match": {
  60. "method": "POST",
  61. "pathIncludes": "/messages",
  62. "bodyExcludes": [
  63. "Generate a concise title",
  64. "CRITICAL: Respond with TEXT ONLY",
  65. "toolu_dwp_a_skill"
  66. ],
  67. "lastUserMessageIncludes": ["E2E_DWP_A_START"]
  68. },
  69. "response": {
  70. "statusCode": 200,
  71. "toolUse": {
  72. "id": "toolu_dwp_a_skill",
  73. "name": "Skill",
  74. "input": {
  75. "skill": "dynamic-workflows"
  76. }
  77. }
  78. }
  79. },
  80. {
  81. "id": "dwp-a-create",
  82. "metadata": {
  83. "kind": "main",
  84. "source": "synthetic",
  85. "timingPolicy": "fast-text",
  86. "syntheticReason": "固定 Skill/CreateWorkflow 与子代理回答的模型选择;真实工作流编译、审批、运行、重启时的引擎收口、冷回放与通知由产品链路执行。"
  87. },
  88. "match": {
  89. "method": "POST",
  90. "pathIncludes": "/messages",
  91. "bodyExcludes": [
  92. "Generate a concise title",
  93. "CRITICAL: Respond with TEXT ONLY",
  94. "toolu_dwp_a_create"
  95. ],
  96. "bodyIncludes": ["E2E_DWP_A_START", "toolu_dwp_a_skill"]
  97. },
  98. "response": {
  99. "statusCode": 200,
  100. "toolUse": {
  101. "id": "toolu_dwp_a_create",
  102. "name": "CreateWorkflow",
  103. "input": {
  104. "name": "E2E 重启工作流",
  105. "script": "phase(\"准备\");\nconst note = await agent(\"记录员\").ask(\"E2E_DWP_AGENT_NOTE 写一句准备完成的记录\");\nphase(\"等待放行\");\nawait world.run(\"node\", [\"-e\", \"const fs=require('fs');const t=setInterval(()=>{if(fs.existsSync('.e2e-dwp-release'))clearInterval(t)},100)\"], { timeoutMs: 600000 });\nreturn { note };"
  106. }
  107. }
  108. }
  109. },
  110. {
  111. "id": "dwp-a-notified",
  112. "metadata": {
  113. "kind": "main",
  114. "source": "synthetic",
  115. "timingPolicy": "fast-text",
  116. "syntheticReason": "固定 Skill/CreateWorkflow 与子代理回答的模型选择;真实工作流编译、审批、运行、重启时的引擎收口、冷回放与通知由产品链路执行。"
  117. },
  118. "match": {
  119. "method": "POST",
  120. "pathIncludes": "/messages",
  121. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  122. "bodyIncludes": ["E2E_DWP_A_START"],
  123. "lastUserMessageIncludes": ["<task-notification>"]
  124. },
  125. "response": {
  126. "statusCode": 200,
  127. "text": "E2E_DWP_A_DONE 工作流已跑完。"
  128. }
  129. },
  130. {
  131. "id": "dwp-a-created",
  132. "metadata": {
  133. "kind": "main",
  134. "source": "synthetic",
  135. "timingPolicy": "fast-text",
  136. "syntheticReason": "固定 Skill/CreateWorkflow 与子代理回答的模型选择;真实工作流编译、审批、运行、重启时的引擎收口、冷回放与通知由产品链路执行。"
  137. },
  138. "match": {
  139. "method": "POST",
  140. "pathIncludes": "/messages",
  141. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  142. "bodyIncludes": ["E2E_DWP_A_START", "toolu_dwp_a_create"],
  143. "lastUserMessageExcludes": ["<task-notification>"]
  144. },
  145. "response": {
  146. "statusCode": 200,
  147. "text": "E2E_DWP_A_STARTED 工作流已启动。"
  148. }
  149. },
  150. {
  151. "id": "dwp-b-skill",
  152. "metadata": {
  153. "kind": "main",
  154. "source": "synthetic",
  155. "timingPolicy": "fast-text",
  156. "syntheticReason": "固定 Skill/CreateWorkflow 与子代理回答的模型选择;真实工作流编译、审批、运行、重启时的引擎收口、冷回放与通知由产品链路执行。"
  157. },
  158. "match": {
  159. "method": "POST",
  160. "pathIncludes": "/messages",
  161. "bodyExcludes": [
  162. "Generate a concise title",
  163. "CRITICAL: Respond with TEXT ONLY",
  164. "toolu_dwp_b_skill"
  165. ],
  166. "lastUserMessageIncludes": ["E2E_DWP_B_START"]
  167. },
  168. "response": {
  169. "statusCode": 200,
  170. "toolUse": {
  171. "id": "toolu_dwp_b_skill",
  172. "name": "Skill",
  173. "input": {
  174. "skill": "dynamic-workflows"
  175. }
  176. }
  177. }
  178. },
  179. {
  180. "id": "dwp-b-create",
  181. "metadata": {
  182. "kind": "main",
  183. "source": "synthetic",
  184. "timingPolicy": "fast-text",
  185. "syntheticReason": "固定 Skill/CreateWorkflow 与子代理回答的模型选择;真实工作流编译、审批、运行、重启时的引擎收口、冷回放与通知由产品链路执行。"
  186. },
  187. "match": {
  188. "method": "POST",
  189. "pathIncludes": "/messages",
  190. "bodyExcludes": [
  191. "Generate a concise title",
  192. "CRITICAL: Respond with TEXT ONLY",
  193. "toolu_dwp_b_create"
  194. ],
  195. "bodyIncludes": ["E2E_DWP_B_START", "toolu_dwp_b_skill"]
  196. },
  197. "response": {
  198. "statusCode": 200,
  199. "toolUse": {
  200. "id": "toolu_dwp_b_create",
  201. "name": "CreateWorkflow",
  202. "input": {
  203. "name": "E2E 中断工作流",
  204. "script": "phase(\"长等待\");\nawait world.run(\"sleep\", [\"600\"], { timeoutMs: 900000 });\nreturn \"unreachable\";"
  205. }
  206. }
  207. }
  208. },
  209. {
  210. "id": "dwp-b-created",
  211. "metadata": {
  212. "kind": "main",
  213. "source": "synthetic",
  214. "timingPolicy": "fast-text",
  215. "syntheticReason": "固定 Skill/CreateWorkflow 与子代理回答的模型选择;真实工作流编译、审批、运行、重启时的引擎收口、冷回放与通知由产品链路执行。"
  216. },
  217. "match": {
  218. "method": "POST",
  219. "pathIncludes": "/messages",
  220. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  221. "bodyIncludes": ["E2E_DWP_B_START", "toolu_dwp_b_create"],
  222. "lastUserMessageExcludes": ["<task-notification>"]
  223. },
  224. "response": {
  225. "statusCode": 200,
  226. "text": "E2E_DWP_B_STARTED 工作流已启动。"
  227. }
  228. }
  229. ]
  230. }