conversation-session-dynamic-workflow-gray-always-on-run-permissions.json 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-dynamic-workflow-gray-always-on-run-permissions",
  4. "spec": "./test/e2e/conversation-session/workflows/conversation-session-dynamic-workflow-gray-always-on-run-permissions.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "dwm-title",
  8. "metadata": {
  9. "kind": "common",
  10. "source": "synthetic",
  11. "timingPolicy": "fast-text",
  12. "syntheticReason": "固定会话标题,避免标题请求落到通用回放;与权限链路无关。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/messages",
  17. "bodyIncludes": ["Generate a concise title", "E2E_DWM_"]
  18. },
  19. "response": {
  20. "statusCode": 200,
  21. "headers": {
  22. "content-type": "application/json; charset=utf-8"
  23. },
  24. "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\"}}"
  25. }
  26. },
  27. {
  28. "id": "dwm-ask-notified",
  29. "metadata": {
  30. "kind": "main",
  31. "source": "synthetic",
  32. "timingPolicy": "fast-text",
  33. "syntheticReason": "固定 Skill/CreateWorkflow、切换模式那一轮与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、权限判定与完成通知由 Agent 执行。"
  34. },
  35. "match": {
  36. "method": "POST",
  37. "pathIncludes": "/messages",
  38. "bodyExcludes": [
  39. "Generate a concise title",
  40. "CRITICAL: Respond with TEXT ONLY",
  41. "You are now acting as the memory extraction subagent",
  42. "You are a subagent inside a dynamic workflow run"
  43. ],
  44. "lastUserMessageIncludes": ["<task-notification>", "E2E_DWM_ASK_RESULT"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "text": "E2E_DWM_ASK_DONE 工作流已结束。"
  49. }
  50. },
  51. {
  52. "id": "dwm-yolo-notified",
  53. "metadata": {
  54. "kind": "main",
  55. "source": "synthetic",
  56. "timingPolicy": "fast-text",
  57. "syntheticReason": "固定 Skill/CreateWorkflow、切换模式那一轮与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、权限判定与完成通知由 Agent 执行。"
  58. },
  59. "match": {
  60. "method": "POST",
  61. "pathIncludes": "/messages",
  62. "bodyExcludes": [
  63. "Generate a concise title",
  64. "CRITICAL: Respond with TEXT ONLY",
  65. "You are now acting as the memory extraction subagent",
  66. "You are a subagent inside a dynamic workflow run"
  67. ],
  68. "lastUserMessageIncludes": ["<task-notification>", "E2E_DWM_YOLO_RESULT"]
  69. },
  70. "response": {
  71. "statusCode": 200,
  72. "text": "E2E_DWM_YOLO_DONE 工作流已结束。"
  73. }
  74. },
  75. {
  76. "id": "dwm-keep-notified",
  77. "metadata": {
  78. "kind": "main",
  79. "source": "synthetic",
  80. "timingPolicy": "fast-text",
  81. "syntheticReason": "固定 Skill/CreateWorkflow、切换模式那一轮与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、权限判定与完成通知由 Agent 执行。"
  82. },
  83. "match": {
  84. "method": "POST",
  85. "pathIncludes": "/messages",
  86. "bodyExcludes": [
  87. "Generate a concise title",
  88. "CRITICAL: Respond with TEXT ONLY",
  89. "You are now acting as the memory extraction subagent",
  90. "You are a subagent inside a dynamic workflow run"
  91. ],
  92. "lastUserMessageIncludes": ["<task-notification>", "E2E_DWM_KEEP_RESULT"]
  93. },
  94. "response": {
  95. "statusCode": 200,
  96. "text": "E2E_DWM_KEEP_DONE 工作流已结束。"
  97. }
  98. },
  99. {
  100. "id": "dwm-ask-agent-bash",
  101. "metadata": {
  102. "kind": "main",
  103. "source": "synthetic",
  104. "timingPolicy": "fast-text",
  105. "syntheticReason": "固定工作流子代理调用 Bash 与随后的回答;子代理会话、按 run 记录的权限模式判定、父会话权限窗与工具执行仍走真实产品链路。"
  106. },
  107. "match": {
  108. "method": "POST",
  109. "pathIncludes": "/messages",
  110. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  111. "bodyExcludes": [
  112. "Generate a concise title",
  113. "CRITICAL: Respond with TEXT ONLY",
  114. "You are now acting as the memory extraction subagent",
  115. "toolu_dwm_ask_agent_bash"
  116. ],
  117. "lastUserMessageIncludes": ["E2E_DWM_ASK_TASK"]
  118. },
  119. "response": {
  120. "statusCode": 200,
  121. "toolUse": {
  122. "id": "toolu_dwm_ask_agent_bash",
  123. "name": "Bash",
  124. "input": {
  125. "command": "mkdir -p .zcode-e2e && printf 'E2E_DWM_ASK_OUTPUT\\n' > .zcode-e2e/dwm-ask.txt && cat .zcode-e2e/dwm-ask.txt",
  126. "description": "Write E2E_DWM_ASK_OUTPUT"
  127. }
  128. }
  129. },
  130. "maxMatches": 1
  131. },
  132. {
  133. "id": "dwm-ask-agent-final",
  134. "metadata": {
  135. "kind": "main",
  136. "source": "synthetic",
  137. "timingPolicy": "fast-text",
  138. "syntheticReason": "固定工作流子代理调用 Bash 与随后的回答;子代理会话、按 run 记录的权限模式判定、父会话权限窗与工具执行仍走真实产品链路。"
  139. },
  140. "match": {
  141. "method": "POST",
  142. "pathIncludes": "/messages",
  143. "bodyIncludes": [
  144. "You are a subagent inside a dynamic workflow run",
  145. "toolu_dwm_ask_agent_bash"
  146. ],
  147. "bodyExcludes": [
  148. "Generate a concise title",
  149. "CRITICAL: Respond with TEXT ONLY",
  150. "You are now acting as the memory extraction subagent"
  151. ]
  152. },
  153. "response": {
  154. "statusCode": 200,
  155. "text": "E2E_DWM_ASK_ANSWER 子代理已处理 Bash 的结果。"
  156. },
  157. "maxMatches": 1
  158. },
  159. {
  160. "id": "dwm-yolo-agent-bash",
  161. "metadata": {
  162. "kind": "main",
  163. "source": "synthetic",
  164. "timingPolicy": "fast-text",
  165. "syntheticReason": "固定工作流子代理调用 Bash 与随后的回答;子代理会话、按 run 记录的权限模式判定、父会话权限窗与工具执行仍走真实产品链路。"
  166. },
  167. "match": {
  168. "method": "POST",
  169. "pathIncludes": "/messages",
  170. "bodyIncludes": ["You are a subagent inside a dynamic workflow run"],
  171. "bodyExcludes": [
  172. "Generate a concise title",
  173. "CRITICAL: Respond with TEXT ONLY",
  174. "You are now acting as the memory extraction subagent",
  175. "toolu_dwm_yolo_agent_bash"
  176. ],
  177. "lastUserMessageIncludes": ["E2E_DWM_YOLO_TASK"]
  178. },
  179. "response": {
  180. "statusCode": 200,
  181. "toolUse": {
  182. "id": "toolu_dwm_yolo_agent_bash",
  183. "name": "Bash",
  184. "input": {
  185. "command": "mkdir -p .zcode-e2e && printf 'E2E_DWM_YOLO_OUTPUT\\n' > .zcode-e2e/dwm-yolo.txt && cat .zcode-e2e/dwm-yolo.txt",
  186. "description": "Write E2E_DWM_YOLO_OUTPUT"
  187. }
  188. }
  189. },
  190. "maxMatches": 1
  191. },
  192. {
  193. "id": "dwm-yolo-agent-final",
  194. "metadata": {
  195. "kind": "main",
  196. "source": "synthetic",
  197. "timingPolicy": "fast-text",
  198. "syntheticReason": "固定工作流子代理调用 Bash 与随后的回答;子代理会话、按 run 记录的权限模式判定、父会话权限窗与工具执行仍走真实产品链路。"
  199. },
  200. "match": {
  201. "method": "POST",
  202. "pathIncludes": "/messages",
  203. "bodyIncludes": [
  204. "You are a subagent inside a dynamic workflow run",
  205. "toolu_dwm_yolo_agent_bash"
  206. ],
  207. "bodyExcludes": [
  208. "Generate a concise title",
  209. "CRITICAL: Respond with TEXT ONLY",
  210. "You are now acting as the memory extraction subagent"
  211. ]
  212. },
  213. "response": {
  214. "statusCode": 200,
  215. "text": "E2E_DWM_YOLO_ANSWER 子代理已处理 Bash 的结果。"
  216. },
  217. "maxMatches": 1
  218. },
  219. {
  220. "id": "dwm-keep-agent-bash",
  221. "metadata": {
  222. "kind": "main",
  223. "source": "synthetic",
  224. "timingPolicy": "fast-text",
  225. "syntheticReason": "固定工作流子代理调用 Bash 与随后的回答;子代理会话、按 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. "toolu_dwm_keep_agent_bash"
  236. ],
  237. "lastUserMessageIncludes": ["E2E_DWM_KEEP_TASK"]
  238. },
  239. "response": {
  240. "statusCode": 200,
  241. "toolUse": {
  242. "id": "toolu_dwm_keep_agent_bash",
  243. "name": "Bash",
  244. "input": {
  245. "command": "mkdir -p .zcode-e2e && printf 'E2E_DWM_KEEP_OUTPUT\\n' > .zcode-e2e/dwm-keep.txt && cat .zcode-e2e/dwm-keep.txt",
  246. "description": "Write E2E_DWM_KEEP_OUTPUT"
  247. }
  248. }
  249. },
  250. "maxMatches": 1
  251. },
  252. {
  253. "id": "dwm-keep-agent-final",
  254. "metadata": {
  255. "kind": "main",
  256. "source": "synthetic",
  257. "timingPolicy": "fast-text",
  258. "syntheticReason": "固定工作流子代理调用 Bash 与随后的回答;子代理会话、按 run 记录的权限模式判定、父会话权限窗与工具执行仍走真实产品链路。"
  259. },
  260. "match": {
  261. "method": "POST",
  262. "pathIncludes": "/messages",
  263. "bodyIncludes": [
  264. "You are a subagent inside a dynamic workflow run",
  265. "toolu_dwm_keep_agent_bash"
  266. ],
  267. "bodyExcludes": [
  268. "Generate a concise title",
  269. "CRITICAL: Respond with TEXT ONLY",
  270. "You are now acting as the memory extraction subagent"
  271. ]
  272. },
  273. "response": {
  274. "statusCode": 200,
  275. "text": "E2E_DWM_KEEP_ANSWER 子代理已处理 Bash 的结果。"
  276. },
  277. "maxMatches": 1
  278. },
  279. {
  280. "id": "dwm-keep-switch-bash",
  281. "metadata": {
  282. "kind": "main",
  283. "source": "synthetic",
  284. "timingPolicy": "fast-text",
  285. "syntheticReason": "固定 Skill/CreateWorkflow、切换模式那一轮与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、权限判定与完成通知由 Agent 执行。"
  286. },
  287. "match": {
  288. "method": "POST",
  289. "pathIncludes": "/messages",
  290. "bodyExcludes": [
  291. "Generate a concise title",
  292. "CRITICAL: Respond with TEXT ONLY",
  293. "You are now acting as the memory extraction subagent",
  294. "You are a subagent inside a dynamic workflow run",
  295. "toolu_dwm_keep_main_bash"
  296. ],
  297. "lastUserMessageIncludes": ["E2E_DWM_KEEP_SWITCH"]
  298. },
  299. "response": {
  300. "statusCode": 200,
  301. "toolUse": {
  302. "id": "toolu_dwm_keep_main_bash",
  303. "name": "Bash",
  304. "input": {
  305. "command": "mkdir -p .zcode-e2e && printf 'E2E_DWM_KEEP_MAIN_OUTPUT\\n' > .zcode-e2e/dwm-keep-main.txt && cat .zcode-e2e/dwm-keep-main.txt",
  306. "description": "Write E2E_DWM_KEEP_MAIN_OUTPUT"
  307. }
  308. }
  309. },
  310. "maxMatches": 1
  311. },
  312. {
  313. "id": "dwm-keep-switch-final",
  314. "metadata": {
  315. "kind": "main",
  316. "source": "synthetic",
  317. "timingPolicy": "fast-text",
  318. "syntheticReason": "固定 Skill/CreateWorkflow、切换模式那一轮与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、权限判定与完成通知由 Agent 执行。"
  319. },
  320. "match": {
  321. "method": "POST",
  322. "pathIncludes": "/messages",
  323. "bodyIncludes": ["toolu_dwm_keep_main_bash"],
  324. "bodyExcludes": [
  325. "Generate a concise title",
  326. "CRITICAL: Respond with TEXT ONLY",
  327. "You are now acting as the memory extraction subagent",
  328. "You are a subagent inside a dynamic workflow run"
  329. ],
  330. "lastUserMessageIncludes": ["E2E_DWM_KEEP_MAIN_OUTPUT"]
  331. },
  332. "response": {
  333. "statusCode": 200,
  334. "text": "E2E_DWM_KEEP_SWITCHED 已在完全访问下执行。"
  335. },
  336. "maxMatches": 1
  337. },
  338. {
  339. "id": "dwm-ask-skill",
  340. "metadata": {
  341. "kind": "main",
  342. "source": "synthetic",
  343. "timingPolicy": "fast-text",
  344. "syntheticReason": "固定 Skill/CreateWorkflow、切换模式那一轮与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、权限判定与完成通知由 Agent 执行。"
  345. },
  346. "match": {
  347. "method": "POST",
  348. "pathIncludes": "/messages",
  349. "bodyExcludes": [
  350. "Generate a concise title",
  351. "CRITICAL: Respond with TEXT ONLY",
  352. "You are now acting as the memory extraction subagent",
  353. "You are a subagent inside a dynamic workflow run",
  354. "toolu_dwm_ask_skill"
  355. ],
  356. "lastUserMessageIncludes": ["E2E_DWM_ASK_START"]
  357. },
  358. "response": {
  359. "statusCode": 200,
  360. "toolUse": {
  361. "id": "toolu_dwm_ask_skill",
  362. "name": "Skill",
  363. "input": {
  364. "skill": "dynamic-workflows"
  365. }
  366. }
  367. },
  368. "maxMatches": 1
  369. },
  370. {
  371. "id": "dwm-ask-create",
  372. "metadata": {
  373. "kind": "main",
  374. "source": "synthetic",
  375. "timingPolicy": "fast-text",
  376. "syntheticReason": "固定 Skill/CreateWorkflow、切换模式那一轮与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、权限判定与完成通知由 Agent 执行。"
  377. },
  378. "match": {
  379. "method": "POST",
  380. "pathIncludes": "/messages",
  381. "bodyIncludes": ["E2E_DWM_ASK_START", "toolu_dwm_ask_skill"],
  382. "bodyExcludes": [
  383. "Generate a concise title",
  384. "CRITICAL: Respond with TEXT ONLY",
  385. "You are now acting as the memory extraction subagent",
  386. "You are a subagent inside a dynamic workflow run",
  387. "toolu_dwm_ask_create"
  388. ]
  389. },
  390. "response": {
  391. "statusCode": 200,
  392. "toolUse": {
  393. "id": "toolu_dwm_ask_create",
  394. "name": "CreateWorkflow",
  395. "input": {
  396. "name": "E2E 权限询问工作流",
  397. "script": "phase(\"写入\");\nconst answer = await agent(\"写手甲\").ask(\"E2E_DWM_ASK_TASK 用 Bash 把 E2E_DWM_ASK_OUTPUT 写进 .zcode-e2e/dwm-ask.txt,再用一句话说明结果。\");\nreturn { verdict: \"E2E_DWM_ASK_RESULT\", answer };"
  398. }
  399. }
  400. },
  401. "maxMatches": 1
  402. },
  403. {
  404. "id": "dwm-ask-created",
  405. "metadata": {
  406. "kind": "main",
  407. "source": "synthetic",
  408. "timingPolicy": "fast-text",
  409. "syntheticReason": "固定 Skill/CreateWorkflow、切换模式那一轮与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、权限判定与完成通知由 Agent 执行。"
  410. },
  411. "match": {
  412. "method": "POST",
  413. "pathIncludes": "/messages",
  414. "bodyIncludes": ["E2E_DWM_ASK_START", "toolu_dwm_ask_create"],
  415. "bodyExcludes": [
  416. "Generate a concise title",
  417. "CRITICAL: Respond with TEXT ONLY",
  418. "You are now acting as the memory extraction subagent",
  419. "You are a subagent inside a dynamic workflow run"
  420. ]
  421. },
  422. "response": {
  423. "statusCode": 200,
  424. "text": "E2E_DWM_ASK_STARTED 工作流已启动,结果会以通知送达。"
  425. },
  426. "maxMatches": 1
  427. },
  428. {
  429. "id": "dwm-yolo-skill",
  430. "metadata": {
  431. "kind": "main",
  432. "source": "synthetic",
  433. "timingPolicy": "fast-text",
  434. "syntheticReason": "固定 Skill/CreateWorkflow、切换模式那一轮与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、权限判定与完成通知由 Agent 执行。"
  435. },
  436. "match": {
  437. "method": "POST",
  438. "pathIncludes": "/messages",
  439. "bodyExcludes": [
  440. "Generate a concise title",
  441. "CRITICAL: Respond with TEXT ONLY",
  442. "You are now acting as the memory extraction subagent",
  443. "You are a subagent inside a dynamic workflow run",
  444. "toolu_dwm_yolo_skill"
  445. ],
  446. "lastUserMessageIncludes": ["E2E_DWM_YOLO_START"]
  447. },
  448. "response": {
  449. "statusCode": 200,
  450. "toolUse": {
  451. "id": "toolu_dwm_yolo_skill",
  452. "name": "Skill",
  453. "input": {
  454. "skill": "dynamic-workflows"
  455. }
  456. }
  457. },
  458. "maxMatches": 1
  459. },
  460. {
  461. "id": "dwm-yolo-create",
  462. "metadata": {
  463. "kind": "main",
  464. "source": "synthetic",
  465. "timingPolicy": "fast-text",
  466. "syntheticReason": "固定 Skill/CreateWorkflow、切换模式那一轮与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、权限判定与完成通知由 Agent 执行。"
  467. },
  468. "match": {
  469. "method": "POST",
  470. "pathIncludes": "/messages",
  471. "bodyIncludes": ["E2E_DWM_YOLO_START", "toolu_dwm_yolo_skill"],
  472. "bodyExcludes": [
  473. "Generate a concise title",
  474. "CRITICAL: Respond with TEXT ONLY",
  475. "You are now acting as the memory extraction subagent",
  476. "You are a subagent inside a dynamic workflow run",
  477. "toolu_dwm_yolo_create"
  478. ]
  479. },
  480. "response": {
  481. "statusCode": 200,
  482. "toolUse": {
  483. "id": "toolu_dwm_yolo_create",
  484. "name": "CreateWorkflow",
  485. "input": {
  486. "name": "E2E 完全访问工作流",
  487. "script": "phase(\"写入\");\nconst answer = await agent(\"写手乙\").ask(\"E2E_DWM_YOLO_TASK 用 Bash 把 E2E_DWM_YOLO_OUTPUT 写进 .zcode-e2e/dwm-yolo.txt,再用一句话说明结果。\");\nreturn { verdict: \"E2E_DWM_YOLO_RESULT\", answer };"
  488. }
  489. }
  490. },
  491. "maxMatches": 1
  492. },
  493. {
  494. "id": "dwm-yolo-created",
  495. "metadata": {
  496. "kind": "main",
  497. "source": "synthetic",
  498. "timingPolicy": "fast-text",
  499. "syntheticReason": "固定 Skill/CreateWorkflow、切换模式那一轮与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、权限判定与完成通知由 Agent 执行。"
  500. },
  501. "match": {
  502. "method": "POST",
  503. "pathIncludes": "/messages",
  504. "bodyIncludes": ["E2E_DWM_YOLO_START", "toolu_dwm_yolo_create"],
  505. "bodyExcludes": [
  506. "Generate a concise title",
  507. "CRITICAL: Respond with TEXT ONLY",
  508. "You are now acting as the memory extraction subagent",
  509. "You are a subagent inside a dynamic workflow run"
  510. ]
  511. },
  512. "response": {
  513. "statusCode": 200,
  514. "text": "E2E_DWM_YOLO_STARTED 工作流已启动,结果会以通知送达。"
  515. },
  516. "maxMatches": 1
  517. },
  518. {
  519. "id": "dwm-keep-skill",
  520. "metadata": {
  521. "kind": "main",
  522. "source": "synthetic",
  523. "timingPolicy": "fast-text",
  524. "syntheticReason": "固定 Skill/CreateWorkflow、切换模式那一轮与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、权限判定与完成通知由 Agent 执行。"
  525. },
  526. "match": {
  527. "method": "POST",
  528. "pathIncludes": "/messages",
  529. "bodyExcludes": [
  530. "Generate a concise title",
  531. "CRITICAL: Respond with TEXT ONLY",
  532. "You are now acting as the memory extraction subagent",
  533. "You are a subagent inside a dynamic workflow run",
  534. "toolu_dwm_keep_skill"
  535. ],
  536. "lastUserMessageIncludes": ["E2E_DWM_KEEP_START"]
  537. },
  538. "response": {
  539. "statusCode": 200,
  540. "toolUse": {
  541. "id": "toolu_dwm_keep_skill",
  542. "name": "Skill",
  543. "input": {
  544. "skill": "dynamic-workflows"
  545. }
  546. }
  547. },
  548. "maxMatches": 1
  549. },
  550. {
  551. "id": "dwm-keep-create",
  552. "metadata": {
  553. "kind": "main",
  554. "source": "synthetic",
  555. "timingPolicy": "fast-text",
  556. "syntheticReason": "固定 Skill/CreateWorkflow、切换模式那一轮与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、权限判定与完成通知由 Agent 执行。"
  557. },
  558. "match": {
  559. "method": "POST",
  560. "pathIncludes": "/messages",
  561. "bodyIncludes": ["E2E_DWM_KEEP_START", "toolu_dwm_keep_skill"],
  562. "bodyExcludes": [
  563. "Generate a concise title",
  564. "CRITICAL: Respond with TEXT ONLY",
  565. "You are now acting as the memory extraction subagent",
  566. "You are a subagent inside a dynamic workflow run",
  567. "toolu_dwm_keep_create"
  568. ]
  569. },
  570. "response": {
  571. "statusCode": 200,
  572. "toolUse": {
  573. "id": "toolu_dwm_keep_create",
  574. "name": "CreateWorkflow",
  575. "input": {
  576. "name": "E2E 模式固定工作流",
  577. "script": "phase(\"等待放行\");\nawait world.run(\"node\", [\"-e\", \"const fs = require(\\\"node:fs\\\"); const timer = setInterval(() => { if (fs.existsSync(\\\"{{e2eRuntimeRoot}}/dwm-gate-keep\\\")) clearInterval(timer); }, 100);\"], { output: \"discard\", timeoutMs: 600000 });\nphase(\"写入\");\nconst answer = await agent(\"写手丙\").ask(\"E2E_DWM_KEEP_TASK 用 Bash 把 E2E_DWM_KEEP_OUTPUT 写进 .zcode-e2e/dwm-keep.txt,再用一句话说明结果。\");\nreturn { verdict: \"E2E_DWM_KEEP_RESULT\", answer };"
  578. }
  579. }
  580. },
  581. "maxMatches": 1
  582. },
  583. {
  584. "id": "dwm-keep-created",
  585. "metadata": {
  586. "kind": "main",
  587. "source": "synthetic",
  588. "timingPolicy": "fast-text",
  589. "syntheticReason": "固定 Skill/CreateWorkflow、切换模式那一轮与收尾回复的模型选择;真实 Skill 加载、工作流编译、确认窗、run 引擎、权限判定与完成通知由 Agent 执行。"
  590. },
  591. "match": {
  592. "method": "POST",
  593. "pathIncludes": "/messages",
  594. "bodyIncludes": ["E2E_DWM_KEEP_START", "toolu_dwm_keep_create"],
  595. "bodyExcludes": [
  596. "Generate a concise title",
  597. "CRITICAL: Respond with TEXT ONLY",
  598. "You are now acting as the memory extraction subagent",
  599. "You are a subagent inside a dynamic workflow run"
  600. ]
  601. },
  602. "response": {
  603. "statusCode": 200,
  604. "text": "E2E_DWM_KEEP_STARTED 工作流已启动,结果会以通知送达。"
  605. },
  606. "maxMatches": 1
  607. }
  608. ]
  609. }