conversation-session-dynamic-workflow-gray-always-on-compile.json 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-dynamic-workflow-gray-always-on-compile",
  4. "spec": "./test/e2e/conversation-session/workflows/conversation-session-dynamic-workflow-gray-always-on-compile.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "dwe-title",
  8. "description": "E2E_DWE_ 各会话首发的 case-local 标题生成响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "E2E_DWE_ 各会话首发会触发默认 title sidecar;固定 case-local 标题响应,并用 marker 隔离跨 case 匹配。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_DWE_"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "headers": {
  23. "content-type": "application/json; charset=utf-8"
  24. },
  25. "body": "{\"id\":\"dwe-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\": \\\"Workflow Compile E2E\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":8,\"service_tier\":\"standard\"}}"
  26. }
  27. },
  28. {
  29. "id": "dwe-inline-skill",
  30. "description": "DWE-01:先加载工作流 Skill。",
  31. "metadata": {
  32. "kind": "main",
  33. "timingPolicy": "fast-text",
  34. "source": "synthetic",
  35. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  36. },
  37. "maxMatches": 1,
  38. "match": {
  39. "method": "POST",
  40. "pathIncludes": "/messages",
  41. "bodyExcludes": [
  42. "Generate a concise title",
  43. "CRITICAL: Respond with TEXT ONLY",
  44. "toolu_dwe_inline_skill"
  45. ],
  46. "lastUserMessageIncludes": ["E2E_DWE_INLINE"]
  47. },
  48. "response": {
  49. "statusCode": 200,
  50. "toolUse": {
  51. "id": "toolu_dwe_inline_skill",
  52. "name": "Skill",
  53. "input": {
  54. "skill": "dynamic-workflows"
  55. }
  56. }
  57. }
  58. },
  59. {
  60. "id": "dwe-inline-create",
  61. "description": "DWE-01:内联提交一份编不过的脚本(三个 agent 同名,分析器报两条 9005)。",
  62. "metadata": {
  63. "kind": "main",
  64. "timingPolicy": "fast-text",
  65. "source": "synthetic",
  66. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  67. },
  68. "maxMatches": 1,
  69. "match": {
  70. "method": "POST",
  71. "pathIncludes": "/messages",
  72. "bodyIncludes": ["E2E_DWE_INLINE", "toolu_dwe_inline_skill"],
  73. "bodyExcludes": [
  74. "Generate a concise title",
  75. "CRITICAL: Respond with TEXT ONLY",
  76. "toolu_dwe_inline_create"
  77. ]
  78. },
  79. "response": {
  80. "statusCode": 200,
  81. "toolUse": {
  82. "id": "toolu_dwe_inline_create",
  83. "name": "CreateWorkflow",
  84. "input": {
  85. "name": "E2E_DWE_INLINE",
  86. "script": "phase(\"检查\");\nconst first = agent(\"E2E_DWE_REVIEWER\");\nconst second = agent(\"E2E_DWE_REVIEWER\");\nconst third = agent(\"E2E_DWE_REVIEWER\");\nreturn \"E2E_DWE_INLINE_RESULT\";"
  87. }
  88. }
  89. }
  90. },
  91. {
  92. "id": "dwe-inline-final",
  93. "description": "DWE-01:模型读到编译诊断后先停下,turn 收口。",
  94. "metadata": {
  95. "kind": "main",
  96. "timingPolicy": "fast-text",
  97. "source": "synthetic",
  98. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  99. },
  100. "maxMatches": 1,
  101. "match": {
  102. "method": "POST",
  103. "pathIncludes": "/messages",
  104. "bodyIncludes": ["E2E_DWE_INLINE", "toolu_dwe_inline_create"],
  105. "bodyExcludes": [
  106. "Generate a concise title",
  107. "CRITICAL: Respond with TEXT ONLY",
  108. "E2E_DWE_INLINE_FIX"
  109. ]
  110. },
  111. "response": {
  112. "statusCode": 200,
  113. "text": {
  114. "id": "dwe-inline-final",
  115. "inputTokens": 80,
  116. "outputTokens": 8,
  117. "text": "E2E_DWE_INLINE_DONE 脚本有类型错误,稍后修正。"
  118. }
  119. }
  120. },
  121. {
  122. "id": "dwe-inline-edit",
  123. "description": "DWE-01:下一轮直接 Edit 内联草稿(不先 Read)。",
  124. "metadata": {
  125. "kind": "main",
  126. "timingPolicy": "fast-text",
  127. "source": "synthetic",
  128. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  129. },
  130. "maxMatches": 1,
  131. "match": {
  132. "method": "POST",
  133. "pathIncludes": "/messages",
  134. "bodyExcludes": [
  135. "Generate a concise title",
  136. "CRITICAL: Respond with TEXT ONLY",
  137. "toolu_dwe_inline_edit"
  138. ],
  139. "lastUserMessageIncludes": ["E2E_DWE_INLINE_FIX"]
  140. },
  141. "response": {
  142. "statusCode": 200,
  143. "toolUse": {
  144. "id": "toolu_dwe_inline_edit",
  145. "name": "Edit",
  146. "input": {
  147. "file_path": ".zcode/workflow-drafts/E2E_DWE_INLINE.dwf.ts",
  148. "old_string": "const second = agent(\"E2E_DWE_REVIEWER\");\nconst third = agent(\"E2E_DWE_REVIEWER\");",
  149. "new_string": "const second = agent(\"E2E_DWE_CHECKER\");\nconst third = agent(\"E2E_DWE_WRITER\");"
  150. }
  151. }
  152. }
  153. },
  154. {
  155. "id": "dwe-inline-resubmit",
  156. "description": "DWE-01:按 path 重提改过的草稿,确认窗出现。",
  157. "metadata": {
  158. "kind": "main",
  159. "timingPolicy": "fast-text",
  160. "source": "synthetic",
  161. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  162. },
  163. "maxMatches": 1,
  164. "match": {
  165. "method": "POST",
  166. "pathIncludes": "/messages",
  167. "bodyIncludes": ["E2E_DWE_INLINE", "toolu_dwe_inline_edit"],
  168. "bodyExcludes": [
  169. "Generate a concise title",
  170. "CRITICAL: Respond with TEXT ONLY",
  171. "toolu_dwe_inline_resubmit"
  172. ]
  173. },
  174. "response": {
  175. "statusCode": 200,
  176. "toolUse": {
  177. "id": "toolu_dwe_inline_resubmit",
  178. "name": "CreateWorkflow",
  179. "input": {
  180. "name": "E2E_DWE_INLINE_FIXED",
  181. "path": ".zcode/workflow-drafts/E2E_DWE_INLINE.dwf.ts"
  182. }
  183. }
  184. }
  185. },
  186. {
  187. "id": "dwe-inline-resubmit-final",
  188. "description": "DWE-01:重提的确认窗被拒绝,给出终态文本。",
  189. "metadata": {
  190. "kind": "main",
  191. "timingPolicy": "fast-text",
  192. "source": "synthetic",
  193. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  194. },
  195. "maxMatches": 1,
  196. "match": {
  197. "method": "POST",
  198. "pathIncludes": "/messages",
  199. "bodyIncludes": ["E2E_DWE_INLINE", "toolu_dwe_inline_resubmit"],
  200. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  201. },
  202. "response": {
  203. "statusCode": 200,
  204. "text": {
  205. "id": "dwe-inline-resubmit-final",
  206. "inputTokens": 80,
  207. "outputTokens": 8,
  208. "text": "E2E_DWE_INLINE_FIX_DONE 好的,不运行。"
  209. }
  210. }
  211. },
  212. {
  213. "id": "dwe-gate-create-1",
  214. "description": "DWE-02:没加载 Skill 就调用 CreateWorkflow。",
  215. "metadata": {
  216. "kind": "main",
  217. "timingPolicy": "fast-text",
  218. "source": "synthetic",
  219. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  220. },
  221. "maxMatches": 1,
  222. "match": {
  223. "method": "POST",
  224. "pathIncludes": "/messages",
  225. "bodyExcludes": [
  226. "Generate a concise title",
  227. "CRITICAL: Respond with TEXT ONLY",
  228. "toolu_dwe_gate_create_1"
  229. ],
  230. "lastUserMessageIncludes": ["E2E_DWE_GATE"]
  231. },
  232. "response": {
  233. "statusCode": 200,
  234. "toolUse": {
  235. "id": "toolu_dwe_gate_create_1",
  236. "name": "CreateWorkflow",
  237. "input": {
  238. "name": "E2E_DWE_GATE_RUN_1",
  239. "script": "phase(\"检查\");\nreturn \"E2E_DWE_GATE_RESULT\";"
  240. }
  241. }
  242. }
  243. },
  244. {
  245. "id": "dwe-gate-skill",
  246. "description": "DWE-02:读到技能门的拒绝后加载 Skill。",
  247. "metadata": {
  248. "kind": "main",
  249. "timingPolicy": "fast-text",
  250. "source": "synthetic",
  251. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  252. },
  253. "maxMatches": 1,
  254. "match": {
  255. "method": "POST",
  256. "pathIncludes": "/messages",
  257. "bodyIncludes": ["E2E_DWE_GATE", "toolu_dwe_gate_create_1"],
  258. "bodyExcludes": [
  259. "Generate a concise title",
  260. "CRITICAL: Respond with TEXT ONLY",
  261. "toolu_dwe_gate_skill"
  262. ]
  263. },
  264. "response": {
  265. "statusCode": 200,
  266. "toolUse": {
  267. "id": "toolu_dwe_gate_skill",
  268. "name": "Skill",
  269. "input": {
  270. "skill": "dynamic-workflows"
  271. }
  272. }
  273. }
  274. },
  275. {
  276. "id": "dwe-gate-create-2",
  277. "description": "DWE-02:加载 Skill 后再调用 CreateWorkflow,确认窗出现。",
  278. "metadata": {
  279. "kind": "main",
  280. "timingPolicy": "fast-text",
  281. "source": "synthetic",
  282. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  283. },
  284. "maxMatches": 1,
  285. "match": {
  286. "method": "POST",
  287. "pathIncludes": "/messages",
  288. "bodyIncludes": ["E2E_DWE_GATE", "toolu_dwe_gate_skill"],
  289. "bodyExcludes": [
  290. "Generate a concise title",
  291. "CRITICAL: Respond with TEXT ONLY",
  292. "toolu_dwe_gate_create_2"
  293. ]
  294. },
  295. "response": {
  296. "statusCode": 200,
  297. "toolUse": {
  298. "id": "toolu_dwe_gate_create_2",
  299. "name": "CreateWorkflow",
  300. "input": {
  301. "name": "E2E_DWE_GATE_RUN_2",
  302. "script": "phase(\"检查\");\nreturn \"E2E_DWE_GATE_RESULT\";"
  303. }
  304. }
  305. }
  306. },
  307. {
  308. "id": "dwe-gate-final",
  309. "description": "DWE-02:确认窗被拒绝,给出终态文本。",
  310. "metadata": {
  311. "kind": "main",
  312. "timingPolicy": "fast-text",
  313. "source": "synthetic",
  314. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  315. },
  316. "maxMatches": 1,
  317. "match": {
  318. "method": "POST",
  319. "pathIncludes": "/messages",
  320. "bodyIncludes": ["E2E_DWE_GATE", "toolu_dwe_gate_create_2"],
  321. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  322. },
  323. "response": {
  324. "statusCode": 200,
  325. "text": {
  326. "id": "dwe-gate-final",
  327. "inputTokens": 80,
  328. "outputTokens": 8,
  329. "text": "E2E_DWE_GATE_DONE 好的,不运行。"
  330. }
  331. }
  332. },
  333. {
  334. "id": "dwe-path-skill",
  335. "description": "DWE-03:先加载工作流 Skill。",
  336. "metadata": {
  337. "kind": "main",
  338. "timingPolicy": "fast-text",
  339. "source": "synthetic",
  340. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  341. },
  342. "maxMatches": 1,
  343. "match": {
  344. "method": "POST",
  345. "pathIncludes": "/messages",
  346. "bodyExcludes": [
  347. "Generate a concise title",
  348. "CRITICAL: Respond with TEXT ONLY",
  349. "toolu_dwe_path_skill"
  350. ],
  351. "lastUserMessageIncludes": ["E2E_DWE_PATH"]
  352. },
  353. "response": {
  354. "statusCode": 200,
  355. "toolUse": {
  356. "id": "toolu_dwe_path_skill",
  357. "name": "Skill",
  358. "input": {
  359. "skill": "dynamic-workflows"
  360. }
  361. }
  362. }
  363. },
  364. {
  365. "id": "dwe-path-write",
  366. "description": "DWE-03:在草稿目录里写一份带元数据块的脚本文件。",
  367. "metadata": {
  368. "kind": "main",
  369. "timingPolicy": "fast-text",
  370. "source": "synthetic",
  371. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  372. },
  373. "maxMatches": 1,
  374. "match": {
  375. "method": "POST",
  376. "pathIncludes": "/messages",
  377. "bodyIncludes": ["E2E_DWE_PATH", "toolu_dwe_path_skill"],
  378. "bodyExcludes": [
  379. "Generate a concise title",
  380. "CRITICAL: Respond with TEXT ONLY",
  381. "toolu_dwe_path_write"
  382. ]
  383. },
  384. "response": {
  385. "statusCode": 200,
  386. "toolUse": {
  387. "id": "toolu_dwe_path_write",
  388. "name": "Write",
  389. "input": {
  390. "file_path": ".zcode/workflow-drafts/e2e-dwe-path.dwf.ts",
  391. "content": "/* zcode-workflow\ndescription: E2E_DWE_PATH draft\n*/\nphase(\"检查\");\nconst total: number = \"E2E_DWE_PATH_BAD\";\nreturn String(total);\n"
  392. }
  393. }
  394. }
  395. },
  396. {
  397. "id": "dwe-path-create-1",
  398. "description": "DWE-03:按 path 提交草稿,编不过。",
  399. "metadata": {
  400. "kind": "main",
  401. "timingPolicy": "fast-text",
  402. "source": "synthetic",
  403. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  404. },
  405. "maxMatches": 1,
  406. "match": {
  407. "method": "POST",
  408. "pathIncludes": "/messages",
  409. "bodyIncludes": ["E2E_DWE_PATH", "toolu_dwe_path_write"],
  410. "bodyExcludes": [
  411. "Generate a concise title",
  412. "CRITICAL: Respond with TEXT ONLY",
  413. "toolu_dwe_path_create_1"
  414. ]
  415. },
  416. "response": {
  417. "statusCode": 200,
  418. "toolUse": {
  419. "id": "toolu_dwe_path_create_1",
  420. "name": "CreateWorkflow",
  421. "input": {
  422. "name": "E2E_DWE_PATH_RUN",
  423. "path": ".zcode/workflow-drafts/e2e-dwe-path.dwf.ts"
  424. }
  425. }
  426. }
  427. },
  428. {
  429. "id": "dwe-path-edit",
  430. "description": "DWE-03:按诊断改草稿。",
  431. "metadata": {
  432. "kind": "main",
  433. "timingPolicy": "fast-text",
  434. "source": "synthetic",
  435. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  436. },
  437. "maxMatches": 1,
  438. "match": {
  439. "method": "POST",
  440. "pathIncludes": "/messages",
  441. "bodyIncludes": ["E2E_DWE_PATH", "toolu_dwe_path_create_1"],
  442. "bodyExcludes": [
  443. "Generate a concise title",
  444. "CRITICAL: Respond with TEXT ONLY",
  445. "toolu_dwe_path_edit"
  446. ]
  447. },
  448. "response": {
  449. "statusCode": 200,
  450. "toolUse": {
  451. "id": "toolu_dwe_path_edit",
  452. "name": "Edit",
  453. "input": {
  454. "file_path": ".zcode/workflow-drafts/e2e-dwe-path.dwf.ts",
  455. "old_string": "const total: number = \"E2E_DWE_PATH_BAD\";",
  456. "new_string": "const total: number = 2;"
  457. }
  458. }
  459. }
  460. },
  461. {
  462. "id": "dwe-path-create-2",
  463. "description": "DWE-03:改完按 path 重提,确认窗出现。",
  464. "metadata": {
  465. "kind": "main",
  466. "timingPolicy": "fast-text",
  467. "source": "synthetic",
  468. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  469. },
  470. "maxMatches": 1,
  471. "match": {
  472. "method": "POST",
  473. "pathIncludes": "/messages",
  474. "bodyIncludes": ["E2E_DWE_PATH", "toolu_dwe_path_edit"],
  475. "bodyExcludes": [
  476. "Generate a concise title",
  477. "CRITICAL: Respond with TEXT ONLY",
  478. "toolu_dwe_path_create_2"
  479. ]
  480. },
  481. "response": {
  482. "statusCode": 200,
  483. "toolUse": {
  484. "id": "toolu_dwe_path_create_2",
  485. "name": "CreateWorkflow",
  486. "input": {
  487. "name": "E2E_DWE_PATH_RUN",
  488. "path": ".zcode/workflow-drafts/e2e-dwe-path.dwf.ts"
  489. }
  490. }
  491. }
  492. },
  493. {
  494. "id": "dwe-path-final",
  495. "description": "DWE-03:确认窗被拒绝,给出终态文本。",
  496. "metadata": {
  497. "kind": "main",
  498. "timingPolicy": "fast-text",
  499. "source": "synthetic",
  500. "syntheticReason": "编译反馈、技能门与草稿文件只由模型的 Skill / Write / Edit / CreateWorkflow 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、编译、草稿落盘、免确认判定、确认窗与应答都走产品链路。"
  501. },
  502. "maxMatches": 1,
  503. "match": {
  504. "method": "POST",
  505. "pathIncludes": "/messages",
  506. "bodyIncludes": ["E2E_DWE_PATH", "toolu_dwe_path_create_2"],
  507. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  508. },
  509. "response": {
  510. "statusCode": 200,
  511. "text": {
  512. "id": "dwe-path-final",
  513. "inputTokens": 80,
  514. "outputTokens": 8,
  515. "text": "E2E_DWE_PATH_DONE 好的,不运行。"
  516. }
  517. }
  518. }
  519. ]
  520. }