conversation-session-dynamic-workflow-gray-always-on-cross-session.json 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-dynamic-workflow-gray-always-on-cross-session",
  4. "spec": "./test/e2e/conversation-session/workflows/conversation-session-dynamic-workflow-gray-always-on-cross-session.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "dww-title",
  8. "metadata": {
  9. "kind": "common",
  10. "source": "synthetic",
  11. "timingPolicy": "fast-text",
  12. "syntheticReason": "固定主代理的模型选择;真实 Skill、工作流编译、确认窗、run 引擎、会话切换与通知投递由产品链路执行。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/messages",
  17. "bodyExcludes": [],
  18. "bodyIncludes": ["Generate a concise title", "E2E_DWW_"]
  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": "dww-b-amend-notified",
  30. "metadata": {
  31. "kind": "main",
  32. "source": "synthetic",
  33. "timingPolicy": "fast-text",
  34. "syntheticReason": "固定 B 会话模型对 A 会话 run 的调用;run id 由测试把真实 id 写进用户消息,所属会话判定与确认窗由产品执行。"
  35. },
  36. "match": {
  37. "method": "POST",
  38. "pathIncludes": "/messages",
  39. "bodyExcludes": [
  40. "Generate a concise title",
  41. "CRITICAL: Respond with TEXT ONLY",
  42. "You are now acting as the memory extraction subagent",
  43. "You are a subagent inside a dynamic workflow run"
  44. ],
  45. "bodyIncludes": ["E2E_DWW_B_AMEND"],
  46. "lastUserMessageIncludes": ["<task-notification>", "<status>completed</status>"]
  47. },
  48. "response": {
  49. "statusCode": 200,
  50. "text": "E2E_DWW_B_AMEND_DONE 修订已完成。"
  51. }
  52. },
  53. {
  54. "id": "dww-b-amended",
  55. "metadata": {
  56. "kind": "main",
  57. "source": "synthetic",
  58. "timingPolicy": "fast-text",
  59. "syntheticReason": "固定 B 会话模型对 A 会话 run 的调用;run id 由测试把真实 id 写进用户消息,所属会话判定与确认窗由产品执行。"
  60. },
  61. "match": {
  62. "method": "POST",
  63. "pathIncludes": "/messages",
  64. "bodyExcludes": [
  65. "Generate a concise title",
  66. "CRITICAL: Respond with TEXT ONLY",
  67. "You are now acting as the memory extraction subagent",
  68. "You are a subagent inside a dynamic workflow run"
  69. ],
  70. "bodyIncludes": ["toolu_dww_b_amend"]
  71. },
  72. "response": {
  73. "statusCode": 200,
  74. "text": "E2E_DWW_B_AMEND_STARTED 新 run 已启动。"
  75. }
  76. },
  77. {
  78. "id": "dww-b-amend",
  79. "metadata": {
  80. "kind": "main",
  81. "source": "synthetic",
  82. "timingPolicy": "fast-text",
  83. "syntheticReason": "固定 B 会话模型对 A 会话 run 的调用;run id 由测试把真实 id 写进用户消息,所属会话判定与确认窗由产品执行。"
  84. },
  85. "match": {
  86. "method": "POST",
  87. "pathIncludes": "/messages",
  88. "bodyExcludes": [
  89. "Generate a concise title",
  90. "CRITICAL: Respond with TEXT ONLY",
  91. "You are now acting as the memory extraction subagent",
  92. "You are a subagent inside a dynamic workflow run",
  93. "toolu_dww_b_amend"
  94. ],
  95. "lastUserMessageIncludes": ["E2E_DWW_B_AMEND"]
  96. },
  97. "response": {
  98. "statusCode": 200,
  99. "toolUse": {
  100. "id": "toolu_dww_b_amend",
  101. "name": "AmendWorkflow",
  102. "input": {
  103. "run_id": "{{latestWorkflowRunId}}",
  104. "script": "phase(\"收尾\");\nreturn { passed: true };"
  105. }
  106. }
  107. }
  108. },
  109. {
  110. "id": "dww-agent-a",
  111. "metadata": {
  112. "kind": "main",
  113. "source": "synthetic",
  114. "timingPolicy": "controlled-stream",
  115. "syntheticReason": "子代理回答以门闩挂起,由测试在切换会话后显式释放,不依赖固定响应延时。"
  116. },
  117. "match": {
  118. "method": "POST",
  119. "pathIncludes": "/messages",
  120. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  121. "bodyExcludes": [
  122. "Generate a concise title",
  123. "CRITICAL: Respond with TEXT ONLY",
  124. "You are now acting as the memory extraction subagent"
  125. ],
  126. "lastUserMessageIncludes": ["E2E_DWW_TASK_A"]
  127. },
  128. "response": {
  129. "statusCode": 200,
  130. "headers": {
  131. "content-type": "text/event-stream; charset=utf-8"
  132. },
  133. "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_dww_agent_a\",\"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_DWW_ANSWER_A 材料结论成立。\"}}\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",
  134. "chunks": [
  135. {
  136. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_dww_agent_a\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"usage\":{\"input_tokens\":256,\"output_tokens\":0}}}\n\n",
  137. "delayMs": 0
  138. },
  139. {
  140. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n",
  141. "delayMs": 0
  142. },
  143. {
  144. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_DWW_ANSWER_A 材料结论成立。\"}}\n\n",
  145. "delayMs": 0
  146. },
  147. {
  148. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n",
  149. "delayMs": 0
  150. },
  151. {
  152. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\"},\"usage\":{\"output_tokens\":32}}\n\n",
  153. "delayMs": 0
  154. },
  155. {
  156. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
  157. "delayMs": 0
  158. }
  159. ],
  160. "releaseAfterChunks": 2
  161. },
  162. "maxMatches": 1
  163. },
  164. {
  165. "id": "dww-agent-c",
  166. "metadata": {
  167. "kind": "main",
  168. "source": "synthetic",
  169. "timingPolicy": "controlled-stream",
  170. "syntheticReason": "子代理回答以门闩挂起,由测试在切换会话后显式释放,不依赖固定响应延时。"
  171. },
  172. "match": {
  173. "method": "POST",
  174. "pathIncludes": "/messages",
  175. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  176. "bodyExcludes": [
  177. "Generate a concise title",
  178. "CRITICAL: Respond with TEXT ONLY",
  179. "You are now acting as the memory extraction subagent"
  180. ],
  181. "lastUserMessageIncludes": ["E2E_DWW_TASK_C"]
  182. },
  183. "response": {
  184. "statusCode": 200,
  185. "headers": {
  186. "content-type": "text/event-stream; charset=utf-8"
  187. },
  188. "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_dww_agent_c\",\"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_DWW_ANSWER_C 汇总完成。\"}}\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",
  189. "chunks": [
  190. {
  191. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_dww_agent_c\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"usage\":{\"input_tokens\":256,\"output_tokens\":0}}}\n\n",
  192. "delayMs": 0
  193. },
  194. {
  195. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n",
  196. "delayMs": 0
  197. },
  198. {
  199. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_DWW_ANSWER_C 汇总完成。\"}}\n\n",
  200. "delayMs": 0
  201. },
  202. {
  203. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n",
  204. "delayMs": 0
  205. },
  206. {
  207. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\"},\"usage\":{\"output_tokens\":32}}\n\n",
  208. "delayMs": 0
  209. },
  210. {
  211. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n",
  212. "delayMs": 0
  213. }
  214. ],
  215. "releaseAfterChunks": 2
  216. },
  217. "maxMatches": 1
  218. },
  219. {
  220. "id": "dww-agent-h",
  221. "metadata": {
  222. "kind": "main",
  223. "source": "synthetic",
  224. "timingPolicy": "fast-text",
  225. "syntheticReason": "固定补全写下的子代理的回答;子代理会话与结果回传走真实 run 引擎。"
  226. },
  227. "match": {
  228. "method": "POST",
  229. "pathIncludes": "/messages",
  230. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  231. "bodyExcludes": [
  232. "Generate a concise title",
  233. "CRITICAL: Respond with TEXT ONLY",
  234. "You are now acting as the memory extraction subagent"
  235. ],
  236. "lastUserMessageIncludes": ["E2E_DWW_TASK_H"]
  237. },
  238. "response": {
  239. "statusCode": 200,
  240. "text": "E2E_DWW_ANSWER_H 条目一。"
  241. }
  242. },
  243. {
  244. "id": "dww-skill",
  245. "metadata": {
  246. "kind": "main",
  247. "source": "synthetic",
  248. "timingPolicy": "fast-text",
  249. "syntheticReason": "固定主代理的模型选择;真实 Skill、工作流编译、确认窗、run 引擎、会话切换与通知投递由产品链路执行。"
  250. },
  251. "match": {
  252. "method": "POST",
  253. "pathIncludes": "/messages",
  254. "bodyExcludes": [
  255. "Generate a concise title",
  256. "CRITICAL: Respond with TEXT ONLY",
  257. "You are now acting as the memory extraction subagent",
  258. "You are a subagent inside a dynamic workflow run",
  259. "toolu_dww_skill"
  260. ],
  261. "lastUserMessageIncludes": ["E2E_DWW_A_START"]
  262. },
  263. "response": {
  264. "statusCode": 200,
  265. "toolUse": {
  266. "id": "toolu_dww_skill",
  267. "name": "Skill",
  268. "input": {
  269. "skill": "dynamic-workflows"
  270. }
  271. }
  272. }
  273. },
  274. {
  275. "id": "dww-create",
  276. "metadata": {
  277. "kind": "main",
  278. "source": "synthetic",
  279. "timingPolicy": "fast-text",
  280. "syntheticReason": "固定主代理的模型选择;真实 Skill、工作流编译、确认窗、run 引擎、会话切换与通知投递由产品链路执行。"
  281. },
  282. "match": {
  283. "method": "POST",
  284. "pathIncludes": "/messages",
  285. "bodyExcludes": [
  286. "Generate a concise title",
  287. "CRITICAL: Respond with TEXT ONLY",
  288. "You are now acting as the memory extraction subagent",
  289. "You are a subagent inside a dynamic workflow run",
  290. "toolu_dww_create"
  291. ],
  292. "bodyIncludes": ["E2E_DWW_A_START", "toolu_dww_skill"]
  293. },
  294. "response": {
  295. "statusCode": 200,
  296. "toolUse": {
  297. "id": "toolu_dww_create",
  298. "name": "CreateWorkflow",
  299. "input": {
  300. "name": "E2E 跨会话调研",
  301. "script": "phase(\"调研\");\nconst finding = await agent(\"调研员\").ask(\"E2E_DWW_TASK_A 调研材料,给出一句结论。\");\nphase(\"汇总\");\nconst summary = await agent(\"汇总员\").ask(`E2E_DWW_TASK_C 汇总结论:${finding}`);\nreturn { summary };"
  302. }
  303. }
  304. }
  305. },
  306. {
  307. "id": "dww-notified",
  308. "metadata": {
  309. "kind": "main",
  310. "source": "synthetic",
  311. "timingPolicy": "fast-text",
  312. "syntheticReason": "固定主代理的模型选择;真实 Skill、工作流编译、确认窗、run 引擎、会话切换与通知投递由产品链路执行。"
  313. },
  314. "match": {
  315. "method": "POST",
  316. "pathIncludes": "/messages",
  317. "bodyExcludes": [
  318. "Generate a concise title",
  319. "CRITICAL: Respond with TEXT ONLY",
  320. "You are now acting as the memory extraction subagent",
  321. "You are a subagent inside a dynamic workflow run"
  322. ],
  323. "bodyIncludes": ["E2E_DWW_A_START"],
  324. "lastUserMessageIncludes": ["<task-notification>", "<status>completed</status>"]
  325. },
  326. "response": {
  327. "statusCode": 200,
  328. "text": "E2E_DWW_A_DONE 工作流已完成。"
  329. }
  330. },
  331. {
  332. "id": "dww-created",
  333. "metadata": {
  334. "kind": "main",
  335. "source": "synthetic",
  336. "timingPolicy": "fast-text",
  337. "syntheticReason": "固定主代理的模型选择;真实 Skill、工作流编译、确认窗、run 引擎、会话切换与通知投递由产品链路执行。"
  338. },
  339. "match": {
  340. "method": "POST",
  341. "pathIncludes": "/messages",
  342. "bodyExcludes": [
  343. "Generate a concise title",
  344. "CRITICAL: Respond with TEXT ONLY",
  345. "You are now acting as the memory extraction subagent",
  346. "You are a subagent inside a dynamic workflow run"
  347. ],
  348. "bodyIncludes": ["E2E_DWW_A_START", "toolu_dww_create"]
  349. },
  350. "response": {
  351. "statusCode": 200,
  352. "text": "E2E_DWW_A_STARTED 工作流已启动。"
  353. }
  354. },
  355. {
  356. "id": "dww-b-hello",
  357. "metadata": {
  358. "kind": "main",
  359. "source": "synthetic",
  360. "timingPolicy": "fast-text",
  361. "syntheticReason": "固定主代理的模型选择;真实 Skill、工作流编译、确认窗、run 引擎、会话切换与通知投递由产品链路执行。"
  362. },
  363. "match": {
  364. "method": "POST",
  365. "pathIncludes": "/messages",
  366. "bodyExcludes": [
  367. "Generate a concise title",
  368. "CRITICAL: Respond with TEXT ONLY",
  369. "You are now acting as the memory extraction subagent",
  370. "You are a subagent inside a dynamic workflow run"
  371. ],
  372. "lastUserMessageIncludes": ["E2E_DWW_B_HELLO"]
  373. },
  374. "response": {
  375. "statusCode": 200,
  376. "text": "E2E_DWW_B_REPLY 这里是另一个会话。"
  377. }
  378. },
  379. {
  380. "id": "dww-b-after",
  381. "metadata": {
  382. "kind": "main",
  383. "source": "synthetic",
  384. "timingPolicy": "fast-text",
  385. "syntheticReason": "固定主代理的模型选择;真实 Skill、工作流编译、确认窗、run 引擎、会话切换与通知投递由产品链路执行。"
  386. },
  387. "match": {
  388. "method": "POST",
  389. "pathIncludes": "/messages",
  390. "bodyExcludes": [
  391. "Generate a concise title",
  392. "CRITICAL: Respond with TEXT ONLY",
  393. "You are now acting as the memory extraction subagent",
  394. "You are a subagent inside a dynamic workflow run"
  395. ],
  396. "lastUserMessageIncludes": ["E2E_DWW_B_AFTER"]
  397. },
  398. "response": {
  399. "statusCode": 200,
  400. "text": "E2E_DWW_B_AFTER_REPLY 这里仍没有工作流。"
  401. }
  402. },
  403. {
  404. "id": "dww-cross-amend",
  405. "metadata": {
  406. "kind": "main",
  407. "source": "synthetic",
  408. "timingPolicy": "fast-text",
  409. "syntheticReason": "固定 B 会话模型对 A 会话 run 的调用;run id 由测试把真实 id 写进用户消息,所属会话判定与确认窗由产品执行。"
  410. },
  411. "match": {
  412. "method": "POST",
  413. "pathIncludes": "/messages",
  414. "bodyExcludes": [
  415. "Generate a concise title",
  416. "CRITICAL: Respond with TEXT ONLY",
  417. "You are now acting as the memory extraction subagent",
  418. "You are a subagent inside a dynamic workflow run",
  419. "toolu_dww_cross_amend"
  420. ],
  421. "lastUserMessageIncludes": ["E2E_DWW_CROSS_AMEND"]
  422. },
  423. "response": {
  424. "statusCode": 200,
  425. "toolUse": {
  426. "id": "toolu_dww_cross_amend",
  427. "name": "AmendWorkflow",
  428. "input": {
  429. "run_id": "{{latestWorkflowRunId}}",
  430. "script": "phase(\"收尾\");\nreturn { passed: true };"
  431. }
  432. }
  433. }
  434. },
  435. {
  436. "id": "dww-cross-amended",
  437. "metadata": {
  438. "kind": "main",
  439. "source": "synthetic",
  440. "timingPolicy": "fast-text",
  441. "syntheticReason": "固定 B 会话模型对 A 会话 run 的调用;run id 由测试把真实 id 写进用户消息,所属会话判定与确认窗由产品执行。"
  442. },
  443. "match": {
  444. "method": "POST",
  445. "pathIncludes": "/messages",
  446. "bodyExcludes": [
  447. "Generate a concise title",
  448. "CRITICAL: Respond with TEXT ONLY",
  449. "You are now acting as the memory extraction subagent",
  450. "You are a subagent inside a dynamic workflow run"
  451. ],
  452. "bodyIncludes": ["toolu_dww_cross_amend"]
  453. },
  454. "response": {
  455. "statusCode": 200,
  456. "text": "E2E_DWW_CROSS_AMEND_REFUSED 这个 run 还在别的会话里跑。"
  457. }
  458. },
  459. {
  460. "id": "dww-cross-skill",
  461. "metadata": {
  462. "kind": "main",
  463. "source": "synthetic",
  464. "timingPolicy": "fast-text",
  465. "syntheticReason": "固定 B 会话模型对 A 会话 run 的调用;run id 由测试把真实 id 写进用户消息,所属会话判定与确认窗由产品执行。"
  466. },
  467. "match": {
  468. "method": "POST",
  469. "pathIncludes": "/messages",
  470. "bodyExcludes": [
  471. "Generate a concise title",
  472. "CRITICAL: Respond with TEXT ONLY",
  473. "You are now acting as the memory extraction subagent",
  474. "You are a subagent inside a dynamic workflow run",
  475. "toolu_dww_cross_skill"
  476. ],
  477. "lastUserMessageIncludes": ["E2E_DWW_CROSS_FILL"]
  478. },
  479. "response": {
  480. "statusCode": 200,
  481. "toolUse": {
  482. "id": "toolu_dww_cross_skill",
  483. "name": "Skill",
  484. "input": {
  485. "skill": "dynamic-workflows"
  486. }
  487. }
  488. }
  489. },
  490. {
  491. "id": "dww-cross-fill",
  492. "metadata": {
  493. "kind": "main",
  494. "source": "synthetic",
  495. "timingPolicy": "fast-text",
  496. "syntheticReason": "固定 B 会话模型对 A 会话 run 的调用;run id 由测试把真实 id 写进用户消息,所属会话判定与确认窗由产品执行。"
  497. },
  498. "match": {
  499. "method": "POST",
  500. "pathIncludes": "/messages",
  501. "bodyExcludes": [
  502. "Generate a concise title",
  503. "CRITICAL: Respond with TEXT ONLY",
  504. "You are now acting as the memory extraction subagent",
  505. "You are a subagent inside a dynamic workflow run",
  506. "toolu_dww_cross_fill"
  507. ],
  508. "bodyIncludes": ["E2E_DWW_CROSS_FILL", "toolu_dww_cross_skill"]
  509. },
  510. "response": {
  511. "statusCode": 200,
  512. "toolUse": {
  513. "id": "toolu_dww_cross_fill",
  514. "name": "FillWorkflowHole",
  515. "input": {
  516. "run_id": "{{latestWorkflowRunId}}",
  517. "hole_id": "hole#21b40fca",
  518. "script": "phase(\"收集\");\nconst item = await agent(\"收集员\").ask(\"E2E_DWW_TASK_H 列出一个条目。\");\nreturn { groups: [[item]] };"
  519. }
  520. }
  521. }
  522. },
  523. {
  524. "id": "dww-cross-filled",
  525. "metadata": {
  526. "kind": "main",
  527. "source": "synthetic",
  528. "timingPolicy": "fast-text",
  529. "syntheticReason": "固定 B 会话模型对 A 会话 run 的调用;run id 由测试把真实 id 写进用户消息,所属会话判定与确认窗由产品执行。"
  530. },
  531. "match": {
  532. "method": "POST",
  533. "pathIncludes": "/messages",
  534. "bodyExcludes": [
  535. "Generate a concise title",
  536. "CRITICAL: Respond with TEXT ONLY",
  537. "You are now acting as the memory extraction subagent",
  538. "You are a subagent inside a dynamic workflow run"
  539. ],
  540. "bodyIncludes": ["toolu_dww_cross_fill"]
  541. },
  542. "response": {
  543. "statusCode": 200,
  544. "text": "E2E_DWW_CROSS_FILL_REFUSED 这个留白要回到发起的会话补全。"
  545. }
  546. },
  547. {
  548. "id": "dww-h-skill",
  549. "metadata": {
  550. "kind": "main",
  551. "source": "synthetic",
  552. "timingPolicy": "fast-text",
  553. "syntheticReason": "固定主代理的模型选择;真实 Skill、工作流编译、确认窗、run 引擎、会话切换与通知投递由产品链路执行。"
  554. },
  555. "match": {
  556. "method": "POST",
  557. "pathIncludes": "/messages",
  558. "bodyExcludes": [
  559. "Generate a concise title",
  560. "CRITICAL: Respond with TEXT ONLY",
  561. "You are now acting as the memory extraction subagent",
  562. "You are a subagent inside a dynamic workflow run",
  563. "toolu_dww_h_skill"
  564. ],
  565. "lastUserMessageIncludes": ["E2E_DWW_H_START"]
  566. },
  567. "response": {
  568. "statusCode": 200,
  569. "toolUse": {
  570. "id": "toolu_dww_h_skill",
  571. "name": "Skill",
  572. "input": {
  573. "skill": "dynamic-workflows"
  574. }
  575. }
  576. }
  577. },
  578. {
  579. "id": "dww-h-create",
  580. "metadata": {
  581. "kind": "main",
  582. "source": "synthetic",
  583. "timingPolicy": "fast-text",
  584. "syntheticReason": "固定主代理的模型选择;真实 Skill、工作流编译、确认窗、run 引擎、会话切换与通知投递由产品链路执行。"
  585. },
  586. "match": {
  587. "method": "POST",
  588. "pathIncludes": "/messages",
  589. "bodyExcludes": [
  590. "Generate a concise title",
  591. "CRITICAL: Respond with TEXT ONLY",
  592. "You are now acting as the memory extraction subagent",
  593. "You are a subagent inside a dynamic workflow run",
  594. "toolu_dww_h_create"
  595. ],
  596. "bodyIncludes": ["E2E_DWW_H_START", "toolu_dww_h_skill"]
  597. },
  598. "response": {
  599. "statusCode": 200,
  600. "toolUse": {
  601. "id": "toolu_dww_h_create",
  602. "name": "CreateWorkflow",
  603. "input": {
  604. "name": "E2E 跨会话留白",
  605. "script": "interface Plan { groups: string[][] }\nphase(\"准备\");\nconst plan = await hole<Plan>(\"决定分组\", \"补全须返回 Plan\");\nphase(\"汇总\");\nreturn plan;"
  606. }
  607. }
  608. }
  609. },
  610. {
  611. "id": "dww-h-own-fill",
  612. "metadata": {
  613. "kind": "main",
  614. "source": "synthetic",
  615. "timingPolicy": "fast-text",
  616. "syntheticReason": "固定主代理的模型选择;真实 Skill、工作流编译、确认窗、run 引擎、会话切换与通知投递由产品链路执行。"
  617. },
  618. "match": {
  619. "method": "POST",
  620. "pathIncludes": "/messages",
  621. "bodyExcludes": [
  622. "Generate a concise title",
  623. "CRITICAL: Respond with TEXT ONLY",
  624. "You are now acting as the memory extraction subagent",
  625. "You are a subagent inside a dynamic workflow run",
  626. "toolu_dww_h_own_fill"
  627. ],
  628. "lastUserMessageIncludes": ["E2E_DWW_H_OWN_FILL"]
  629. },
  630. "response": {
  631. "statusCode": 200,
  632. "toolUse": {
  633. "id": "toolu_dww_h_own_fill",
  634. "name": "FillWorkflowHole",
  635. "input": {
  636. "run_id": "{{latestWorkflowRunId}}",
  637. "hole_id": "hole#21b40fca",
  638. "script": "phase(\"收集\");\nconst item = await agent(\"收集员\").ask(\"E2E_DWW_TASK_H 列出一个条目。\");\nreturn { groups: [[item]] };"
  639. }
  640. }
  641. }
  642. },
  643. {
  644. "id": "dww-h-notified",
  645. "metadata": {
  646. "kind": "main",
  647. "source": "synthetic",
  648. "timingPolicy": "fast-text",
  649. "syntheticReason": "固定主代理的模型选择;真实 Skill、工作流编译、确认窗、run 引擎、会话切换与通知投递由产品链路执行。"
  650. },
  651. "match": {
  652. "method": "POST",
  653. "pathIncludes": "/messages",
  654. "bodyExcludes": [
  655. "Generate a concise title",
  656. "CRITICAL: Respond with TEXT ONLY",
  657. "You are now acting as the memory extraction subagent",
  658. "You are a subagent inside a dynamic workflow run"
  659. ],
  660. "bodyIncludes": ["E2E_DWW_H_START"],
  661. "lastUserMessageIncludes": ["<task-notification>", "<status>completed</status>"]
  662. },
  663. "response": {
  664. "statusCode": 200,
  665. "text": "E2E_DWW_H_DONE 工作流已完成。"
  666. }
  667. },
  668. {
  669. "id": "dww-h-own-filled",
  670. "metadata": {
  671. "kind": "main",
  672. "source": "synthetic",
  673. "timingPolicy": "fast-text",
  674. "syntheticReason": "固定主代理的模型选择;真实 Skill、工作流编译、确认窗、run 引擎、会话切换与通知投递由产品链路执行。"
  675. },
  676. "match": {
  677. "method": "POST",
  678. "pathIncludes": "/messages",
  679. "bodyExcludes": [
  680. "Generate a concise title",
  681. "CRITICAL: Respond with TEXT ONLY",
  682. "You are now acting as the memory extraction subagent",
  683. "You are a subagent inside a dynamic workflow run"
  684. ],
  685. "bodyIncludes": ["toolu_dww_h_own_fill"]
  686. },
  687. "response": {
  688. "statusCode": 200,
  689. "text": "E2E_DWW_H_OWN_FILLED 留白已补全。"
  690. }
  691. },
  692. {
  693. "id": "dww-h-waiting",
  694. "metadata": {
  695. "kind": "main",
  696. "source": "synthetic",
  697. "timingPolicy": "fast-text",
  698. "syntheticReason": "固定主代理的模型选择;真实 Skill、工作流编译、确认窗、run 引擎、会话切换与通知投递由产品链路执行。"
  699. },
  700. "match": {
  701. "method": "POST",
  702. "pathIncludes": "/messages",
  703. "bodyExcludes": [
  704. "Generate a concise title",
  705. "CRITICAL: Respond with TEXT ONLY",
  706. "You are now acting as the memory extraction subagent",
  707. "You are a subagent inside a dynamic workflow run"
  708. ],
  709. "bodyIncludes": ["E2E_DWW_H_START"],
  710. "lastUserMessageIncludes": ["<workflow-hole>"]
  711. },
  712. "response": {
  713. "statusCode": 200,
  714. "text": "E2E_DWW_H_WAITING 等待补全。"
  715. }
  716. },
  717. {
  718. "id": "dww-h-created",
  719. "metadata": {
  720. "kind": "main",
  721. "source": "synthetic",
  722. "timingPolicy": "fast-text",
  723. "syntheticReason": "固定主代理的模型选择;真实 Skill、工作流编译、确认窗、run 引擎、会话切换与通知投递由产品链路执行。"
  724. },
  725. "match": {
  726. "method": "POST",
  727. "pathIncludes": "/messages",
  728. "bodyExcludes": [
  729. "Generate a concise title",
  730. "CRITICAL: Respond with TEXT ONLY",
  731. "You are now acting as the memory extraction subagent",
  732. "You are a subagent inside a dynamic workflow run",
  733. "<workflow-hole>"
  734. ],
  735. "bodyIncludes": ["E2E_DWW_H_START", "toolu_dww_h_create"]
  736. },
  737. "response": {
  738. "statusCode": 200,
  739. "text": "E2E_DWW_H_STARTED 工作流已启动。"
  740. }
  741. }
  742. ]
  743. }