conversation-session-dynamic-workflow-gray-on-demand.json 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-dynamic-workflow-gray-on-demand",
  4. "spec": "./test/e2e/conversation-session/workflows/conversation-session-dynamic-workflow-gray-on-demand.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "dwo-title",
  8. "metadata": {
  9. "kind": "common",
  10. "source": "synthetic",
  11. "timingPolicy": "fast-text",
  12. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/messages",
  17. "bodyExcludes": [],
  18. "bodyIncludes": ["Generate a concise title", "E2E_DWO_"]
  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": "dwo-compact",
  30. "metadata": {
  31. "kind": "synthetic",
  32. "source": "synthetic",
  33. "timingPolicy": "fast-text",
  34. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  35. },
  36. "match": {
  37. "method": "POST",
  38. "pathIncludes": "/messages",
  39. "bodyExcludes": ["Generate a concise title"],
  40. "bodyIncludes": ["CRITICAL: Respond with TEXT ONLY"]
  41. },
  42. "response": {
  43. "statusCode": 200,
  44. "text": {
  45. "id": "dwo-compact",
  46. "inputTokens": 256,
  47. "outputTokens": 64,
  48. "text": "<analysis>E2E 压缩回放。</analysis>\n\n<summary>E2E_DWO_SUMMARY 用户跑了几轮纯文本对话,没有用到文件或工具。</summary>"
  49. }
  50. }
  51. },
  52. {
  53. "id": "dwo-n1",
  54. "metadata": {
  55. "kind": "main",
  56. "source": "synthetic",
  57. "timingPolicy": "fast-text",
  58. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  59. },
  60. "match": {
  61. "method": "POST",
  62. "pathIncludes": "/messages",
  63. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  64. "lastUserMessageIncludes": ["E2E_DWO_N1_ASK"]
  65. },
  66. "response": {
  67. "statusCode": 200,
  68. "text": "E2E_DWO_N1_OK 收到。"
  69. }
  70. },
  71. {
  72. "id": "dwo-n2",
  73. "metadata": {
  74. "kind": "main",
  75. "source": "synthetic",
  76. "timingPolicy": "fast-text",
  77. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  78. },
  79. "match": {
  80. "method": "POST",
  81. "pathIncludes": "/messages",
  82. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  83. "lastUserMessageIncludes": ["E2E_DWO_N2_ASK"]
  84. },
  85. "response": {
  86. "statusCode": 200,
  87. "text": "E2E_DWO_N2_OK 收到。"
  88. }
  89. },
  90. {
  91. "id": "dwo-a1",
  92. "metadata": {
  93. "kind": "main",
  94. "source": "synthetic",
  95. "timingPolicy": "fast-text",
  96. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  97. },
  98. "match": {
  99. "method": "POST",
  100. "pathIncludes": "/messages",
  101. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  102. "lastUserMessageIncludes": ["E2E_DWO_A1_ASK"]
  103. },
  104. "response": {
  105. "statusCode": 200,
  106. "text": "E2E_DWO_A1_OK 收到。"
  107. }
  108. },
  109. {
  110. "id": "dwo-a2",
  111. "metadata": {
  112. "kind": "main",
  113. "source": "synthetic",
  114. "timingPolicy": "fast-text",
  115. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  116. },
  117. "match": {
  118. "method": "POST",
  119. "pathIncludes": "/messages",
  120. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  121. "lastUserMessageIncludes": ["E2E_DWO_A2_ASK"]
  122. },
  123. "response": {
  124. "statusCode": 200,
  125. "text": "E2E_DWO_A2_OK 收到。"
  126. }
  127. },
  128. {
  129. "id": "dwo-a3",
  130. "metadata": {
  131. "kind": "main",
  132. "source": "synthetic",
  133. "timingPolicy": "fast-text",
  134. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  135. },
  136. "match": {
  137. "method": "POST",
  138. "pathIncludes": "/messages",
  139. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  140. "lastUserMessageIncludes": ["E2E_DWO_A3_ASK"]
  141. },
  142. "response": {
  143. "statusCode": 200,
  144. "text": "E2E_DWO_A3_OK 收到。"
  145. }
  146. },
  147. {
  148. "id": "dwo-a4",
  149. "metadata": {
  150. "kind": "main",
  151. "source": "synthetic",
  152. "timingPolicy": "fast-text",
  153. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  154. },
  155. "match": {
  156. "method": "POST",
  157. "pathIncludes": "/messages",
  158. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  159. "lastUserMessageIncludes": ["E2E_DWO_A4_ASK"]
  160. },
  161. "response": {
  162. "statusCode": 200,
  163. "text": "E2E_DWO_A4_OK 收到。"
  164. }
  165. },
  166. {
  167. "id": "dwo-a5",
  168. "metadata": {
  169. "kind": "main",
  170. "source": "synthetic",
  171. "timingPolicy": "fast-text",
  172. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  173. },
  174. "match": {
  175. "method": "POST",
  176. "pathIncludes": "/messages",
  177. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  178. "lastUserMessageIncludes": ["E2E_DWO_A5_ASK"]
  179. },
  180. "response": {
  181. "statusCode": 200,
  182. "text": "E2E_DWO_A5_OK 收到。"
  183. }
  184. },
  185. {
  186. "id": "dwo-w2",
  187. "metadata": {
  188. "kind": "main",
  189. "source": "synthetic",
  190. "timingPolicy": "fast-text",
  191. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  192. },
  193. "match": {
  194. "method": "POST",
  195. "pathIncludes": "/messages",
  196. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  197. "lastUserMessageIncludes": ["E2E_DWO_W2_ASK"]
  198. },
  199. "response": {
  200. "statusCode": 200,
  201. "text": "E2E_DWO_W2_OK 收到。"
  202. }
  203. },
  204. {
  205. "id": "dwo-agent",
  206. "metadata": {
  207. "kind": "main",
  208. "source": "synthetic",
  209. "timingPolicy": "fast-text",
  210. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  211. },
  212. "match": {
  213. "method": "POST",
  214. "pathIncludes": "/messages",
  215. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  216. "lastUserMessageIncludes": ["E2E_DWO_AGENT_NOTE"]
  217. },
  218. "response": {
  219. "statusCode": 200,
  220. "text": "E2E_DWO_NOTE_DONE 记录完成。"
  221. }
  222. },
  223. {
  224. "id": "dwo-w-skill",
  225. "metadata": {
  226. "kind": "main",
  227. "source": "synthetic",
  228. "timingPolicy": "fast-text",
  229. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  230. },
  231. "match": {
  232. "method": "POST",
  233. "pathIncludes": "/messages",
  234. "bodyExcludes": [
  235. "Generate a concise title",
  236. "CRITICAL: Respond with TEXT ONLY",
  237. "toolu_dwo_w_skill"
  238. ],
  239. "lastUserMessageIncludes": ["E2E_DWO_W1_ASK"]
  240. },
  241. "response": {
  242. "statusCode": 200,
  243. "toolUse": {
  244. "id": "toolu_dwo_w_skill",
  245. "name": "Skill",
  246. "input": {
  247. "skill": "dynamic-workflows"
  248. }
  249. }
  250. }
  251. },
  252. {
  253. "id": "dwo-w-create",
  254. "metadata": {
  255. "kind": "main",
  256. "source": "synthetic",
  257. "timingPolicy": "fast-text",
  258. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  259. },
  260. "match": {
  261. "method": "POST",
  262. "pathIncludes": "/messages",
  263. "bodyExcludes": [
  264. "Generate a concise title",
  265. "CRITICAL: Respond with TEXT ONLY",
  266. "toolu_dwo_w_create"
  267. ],
  268. "bodyIncludes": ["E2E_DWO_W1_ASK", "toolu_dwo_w_skill"]
  269. },
  270. "response": {
  271. "statusCode": 200,
  272. "toolUse": {
  273. "id": "toolu_dwo_w_create",
  274. "name": "CreateWorkflow",
  275. "input": {
  276. "name": "E2E 按需工作流",
  277. "script": "phase(\"记录\");\nconst note = await agent(\"记录员\").ask(\"E2E_DWO_AGENT_NOTE 写一句记录\");\nreturn { note };"
  278. }
  279. }
  280. }
  281. },
  282. {
  283. "id": "dwo-w-notified",
  284. "metadata": {
  285. "kind": "main",
  286. "source": "synthetic",
  287. "timingPolicy": "fast-text",
  288. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  289. },
  290. "match": {
  291. "method": "POST",
  292. "pathIncludes": "/messages",
  293. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  294. "bodyIncludes": ["E2E_DWO_W1_ASK", "toolu_dwo_w_create"],
  295. "lastUserMessageIncludes": ["<task-notification>"]
  296. },
  297. "response": {
  298. "statusCode": 200,
  299. "text": "E2E_DWO_W_DONE 工作流已跑完。"
  300. }
  301. },
  302. {
  303. "id": "dwo-w-created",
  304. "metadata": {
  305. "kind": "main",
  306. "source": "synthetic",
  307. "timingPolicy": "fast-text",
  308. "syntheticReason": "固定各轮模型回答;onDemand 的灰度下发、工具面注册与激活、/workflow 展开、压缩、完整重启后的冷恢复与真实工作流运行都走产品链路,断言读的是真实发出的模型请求。"
  309. },
  310. "match": {
  311. "method": "POST",
  312. "pathIncludes": "/messages",
  313. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  314. "bodyIncludes": ["E2E_DWO_W1_ASK", "toolu_dwo_w_create"],
  315. "lastUserMessageExcludes": ["<task-notification>"]
  316. },
  317. "response": {
  318. "statusCode": 200,
  319. "text": "E2E_DWO_W_STARTED 工作流已启动。"
  320. }
  321. }
  322. ]
  323. }