conversation-session-dynamic-workflow-gray-always-on-amend.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-dynamic-workflow-gray-always-on-amend",
  4. "spec": "./test/e2e/conversation-session/workflows/conversation-session-dynamic-workflow-gray-always-on-amend.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "dwa-title",
  8. "metadata": {
  9. "kind": "common",
  10. "source": "synthetic",
  11. "timingPolicy": "fast-text",
  12. "syntheticReason": "固定 Skill/CreateWorkflow/AmendWorkflow 模型选择与子代理回复;真实工作流编译、审批、运行、留白通知、就地调并发、修订与替代由 Agent 执行,run ID 从真实留白通知读取。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/messages",
  17. "bodyExcludes": [],
  18. "bodyIncludes": ["Generate a concise title", "E2E_DWA_"]
  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": "dwa-subagent-prep",
  30. "metadata": {
  31. "kind": "main",
  32. "source": "synthetic",
  33. "timingPolicy": "fast-text",
  34. "syntheticReason": "固定 Skill/CreateWorkflow/AmendWorkflow 模型选择与子代理回复;真实工作流编译、审批、运行、留白通知、就地调并发、修订与替代由 Agent 执行,run ID 从真实留白通知读取。"
  35. },
  36. "match": {
  37. "method": "POST",
  38. "pathIncludes": "/messages",
  39. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  40. "lastUserMessageIncludes": ["E2E_DWA_PREP"]
  41. },
  42. "response": {
  43. "statusCode": 200,
  44. "text": "条目整理完毕:一、二。"
  45. }
  46. },
  47. {
  48. "id": "dwa-done",
  49. "metadata": {
  50. "kind": "main",
  51. "source": "synthetic",
  52. "timingPolicy": "fast-text",
  53. "syntheticReason": "固定 Skill/CreateWorkflow/AmendWorkflow 模型选择与子代理回复;真实工作流编译、审批、运行、留白通知、就地调并发、修订与替代由 Agent 执行,run ID 从真实留白通知读取。"
  54. },
  55. "match": {
  56. "method": "POST",
  57. "pathIncludes": "/messages",
  58. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  59. "bodyIncludes": ["E2E_DWA_START", "toolu_dwa_amend"],
  60. "lastUserMessageIncludes": ["<task-notification>"]
  61. },
  62. "response": {
  63. "statusCode": 200,
  64. "text": "E2E_DWA_DONE 调整后的工作流已完成。"
  65. }
  66. },
  67. {
  68. "id": "dwa-hole-waiting",
  69. "metadata": {
  70. "kind": "main",
  71. "source": "synthetic",
  72. "timingPolicy": "fast-text",
  73. "syntheticReason": "固定 Skill/CreateWorkflow/AmendWorkflow 模型选择与子代理回复;真实工作流编译、审批、运行、留白通知、就地调并发、修订与替代由 Agent 执行,run ID 从真实留白通知读取。"
  74. },
  75. "match": {
  76. "method": "POST",
  77. "pathIncludes": "/messages",
  78. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  79. "bodyIncludes": ["E2E_DWA_START"],
  80. "lastUserMessageIncludes": ["<workflow-hole>"]
  81. },
  82. "response": {
  83. "statusCode": 200,
  84. "text": "E2E_DWA_WAITING 工作流在等你决定下一步。"
  85. }
  86. },
  87. {
  88. "id": "dwa-skill",
  89. "metadata": {
  90. "kind": "main",
  91. "source": "synthetic",
  92. "timingPolicy": "fast-text",
  93. "syntheticReason": "固定 Skill/CreateWorkflow/AmendWorkflow 模型选择与子代理回复;真实工作流编译、审批、运行、留白通知、就地调并发、修订与替代由 Agent 执行,run ID 从真实留白通知读取。"
  94. },
  95. "match": {
  96. "method": "POST",
  97. "pathIncludes": "/messages",
  98. "bodyExcludes": [
  99. "Generate a concise title",
  100. "CRITICAL: Respond with TEXT ONLY",
  101. "toolu_dwa_skill"
  102. ],
  103. "lastUserMessageIncludes": ["E2E_DWA_START"]
  104. },
  105. "response": {
  106. "statusCode": 200,
  107. "toolUse": {
  108. "id": "toolu_dwa_skill",
  109. "name": "Skill",
  110. "input": {
  111. "skill": "dynamic-workflows"
  112. }
  113. }
  114. }
  115. },
  116. {
  117. "id": "dwa-create",
  118. "metadata": {
  119. "kind": "main",
  120. "source": "synthetic",
  121. "timingPolicy": "fast-text",
  122. "syntheticReason": "固定 Skill/CreateWorkflow/AmendWorkflow 模型选择与子代理回复;真实工作流编译、审批、运行、留白通知、就地调并发、修订与替代由 Agent 执行,run ID 从真实留白通知读取。"
  123. },
  124. "match": {
  125. "method": "POST",
  126. "pathIncludes": "/messages",
  127. "bodyExcludes": [
  128. "Generate a concise title",
  129. "CRITICAL: Respond with TEXT ONLY",
  130. "toolu_dwa_create"
  131. ],
  132. "bodyIncludes": ["E2E_DWA_START", "toolu_dwa_skill"]
  133. },
  134. "response": {
  135. "statusCode": 200,
  136. "toolUse": {
  137. "id": "toolu_dwa_create",
  138. "name": "CreateWorkflow",
  139. "input": {
  140. "name": "E2E 调整工作流",
  141. "script": "interface Next { note: string }\nphase(\"准备\");\nconst prep = await agent(\"整理员\").ask(\"E2E_DWA_PREP 列出要处理的条目\");\nphase(\"等待\");\nconst next = await hole<Next>(\"等待调整\", \"等用户决定下一步\");\nreturn { prep, next };"
  142. }
  143. }
  144. }
  145. },
  146. {
  147. "id": "dwa-retune",
  148. "metadata": {
  149. "kind": "main",
  150. "source": "synthetic",
  151. "timingPolicy": "fast-text",
  152. "syntheticReason": "固定 Skill/CreateWorkflow/AmendWorkflow 模型选择与子代理回复;真实工作流编译、审批、运行、留白通知、就地调并发、修订与替代由 Agent 执行,run ID 从真实留白通知读取。"
  153. },
  154. "match": {
  155. "method": "POST",
  156. "pathIncludes": "/messages",
  157. "bodyExcludes": [
  158. "Generate a concise title",
  159. "CRITICAL: Respond with TEXT ONLY",
  160. "toolu_dwa_retune"
  161. ],
  162. "lastUserMessageIncludes": ["E2E_DWA_RETUNE"]
  163. },
  164. "response": {
  165. "statusCode": 200,
  166. "toolUse": {
  167. "id": "toolu_dwa_retune",
  168. "name": "AmendWorkflow",
  169. "input": {
  170. "run_id": "{{latestWorkflowRunId}}",
  171. "max_concurrency": 2
  172. }
  173. }
  174. }
  175. },
  176. {
  177. "id": "dwa-amend",
  178. "metadata": {
  179. "kind": "main",
  180. "source": "synthetic",
  181. "timingPolicy": "fast-text",
  182. "syntheticReason": "固定 Skill/CreateWorkflow/AmendWorkflow 模型选择与子代理回复;真实工作流编译、审批、运行、留白通知、就地调并发、修订与替代由 Agent 执行,run ID 从真实留白通知读取。"
  183. },
  184. "match": {
  185. "method": "POST",
  186. "pathIncludes": "/messages",
  187. "bodyExcludes": [
  188. "Generate a concise title",
  189. "CRITICAL: Respond with TEXT ONLY",
  190. "toolu_dwa_amend"
  191. ],
  192. "lastUserMessageIncludes": ["E2E_DWA_AMEND"]
  193. },
  194. "response": {
  195. "statusCode": 200,
  196. "toolUse": {
  197. "id": "toolu_dwa_amend",
  198. "name": "AmendWorkflow",
  199. "input": {
  200. "run_id": "{{latestWorkflowRunId}}",
  201. "script": "phase(\"准备\");\nconst prep = await agent(\"整理员\").ask(\"E2E_DWA_PREP 列出要处理的条目\");\nphase(\"收尾\");\nreturn { prep, amended: true };"
  202. }
  203. }
  204. }
  205. },
  206. {
  207. "id": "dwa-amended",
  208. "metadata": {
  209. "kind": "main",
  210. "source": "synthetic",
  211. "timingPolicy": "fast-text",
  212. "syntheticReason": "固定 Skill/CreateWorkflow/AmendWorkflow 模型选择与子代理回复;真实工作流编译、审批、运行、留白通知、就地调并发、修订与替代由 Agent 执行,run ID 从真实留白通知读取。"
  213. },
  214. "match": {
  215. "method": "POST",
  216. "pathIncludes": "/messages",
  217. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  218. "bodyIncludes": ["E2E_DWA_START", "toolu_dwa_amend"],
  219. "lastUserMessageExcludes": ["<task-notification>"]
  220. },
  221. "response": {
  222. "statusCode": 200,
  223. "text": "E2E_DWA_AMENDED 已按新脚本调整工作流。"
  224. }
  225. },
  226. {
  227. "id": "dwa-retuned",
  228. "metadata": {
  229. "kind": "main",
  230. "source": "synthetic",
  231. "timingPolicy": "fast-text",
  232. "syntheticReason": "固定 Skill/CreateWorkflow/AmendWorkflow 模型选择与子代理回复;真实工作流编译、审批、运行、留白通知、就地调并发、修订与替代由 Agent 执行,run ID 从真实留白通知读取。"
  233. },
  234. "match": {
  235. "method": "POST",
  236. "pathIncludes": "/messages",
  237. "bodyExcludes": [
  238. "Generate a concise title",
  239. "CRITICAL: Respond with TEXT ONLY",
  240. "toolu_dwa_amend"
  241. ],
  242. "bodyIncludes": ["E2E_DWA_START", "toolu_dwa_retune"],
  243. "lastUserMessageExcludes": ["E2E_DWA_AMEND"]
  244. },
  245. "response": {
  246. "statusCode": 200,
  247. "text": "E2E_DWA_RETUNED 并发已改为 2。"
  248. }
  249. },
  250. {
  251. "id": "dwa-created",
  252. "metadata": {
  253. "kind": "main",
  254. "source": "synthetic",
  255. "timingPolicy": "fast-text",
  256. "syntheticReason": "固定 Skill/CreateWorkflow/AmendWorkflow 模型选择与子代理回复;真实工作流编译、审批、运行、留白通知、就地调并发、修订与替代由 Agent 执行,run ID 从真实留白通知读取。"
  257. },
  258. "match": {
  259. "method": "POST",
  260. "pathIncludes": "/messages",
  261. "bodyExcludes": [
  262. "Generate a concise title",
  263. "CRITICAL: Respond with TEXT ONLY",
  264. "toolu_dwa_retune",
  265. "toolu_dwa_amend"
  266. ],
  267. "bodyIncludes": ["E2E_DWA_START", "toolu_dwa_create"],
  268. "lastUserMessageExcludes": [
  269. "<workflow-hole>",
  270. "E2E_DWA_RETUNE",
  271. "E2E_DWA_AMEND",
  272. "<task-notification>"
  273. ]
  274. },
  275. "response": {
  276. "statusCode": 200,
  277. "text": "E2E_DWA_STARTED 工作流已启动。"
  278. }
  279. }
  280. ]
  281. }