conversation-session-dynamic-workflow-gray-always-on-snippet.json 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-dynamic-workflow-gray-always-on-snippet",
  4. "spec": "./test/e2e/conversation-session/workflows/conversation-session-dynamic-workflow-gray-always-on-snippet.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "dwy-title",
  8. "description": "E2E_DWY_ 各会话首发的 case-local 标题生成响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "E2E_DWY_ 各会话首发会触发默认 title sidecar;固定 case-local 标题响应,并用 marker 隔离跨 case 匹配。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_DWY_"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "headers": {
  23. "content-type": "application/json; charset=utf-8"
  24. },
  25. "body": "{\"id\":\"dwy-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\": \\\"Workflow Snippet 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": "dwy-value-skill",
  30. "description": "DWY-01:先加载工作流 Skill。",
  31. "metadata": {
  32. "kind": "main",
  33. "timingPolicy": "fast-text",
  34. "source": "synthetic",
  35. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  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_dwy_value_skill"
  45. ],
  46. "lastUserMessageIncludes": ["E2E_DWY_VALUE_START"]
  47. },
  48. "response": {
  49. "statusCode": 200,
  50. "toolUse": {
  51. "id": "toolu_dwy_value_skill",
  52. "name": "Skill",
  53. "input": {
  54. "skill": "dynamic-workflows"
  55. }
  56. }
  57. }
  58. },
  59. {
  60. "id": "dwy-value-eval",
  61. "description": "DWY-01:只读片段:两行日志、返回一个对象。",
  62. "metadata": {
  63. "kind": "main",
  64. "timingPolicy": "fast-text",
  65. "source": "synthetic",
  66. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  67. },
  68. "maxMatches": 1,
  69. "match": {
  70. "method": "POST",
  71. "pathIncludes": "/messages",
  72. "bodyIncludes": ["E2E_DWY_VALUE_START", "toolu_dwy_value_skill"],
  73. "bodyExcludes": [
  74. "Generate a concise title",
  75. "CRITICAL: Respond with TEXT ONLY",
  76. "toolu_dwy_value_eval"
  77. ]
  78. },
  79. "response": {
  80. "statusCode": 200,
  81. "toolUse": {
  82. "id": "toolu_dwy_value_eval",
  83. "name": "EvalWorkflowSnippet",
  84. "input": {
  85. "code": "log(\"E2E_DWY_LOG_FIRST\");\nlog(\"E2E_DWY_LOG_SECOND\");\nreturn { marker: \"E2E_DWY_VALUE\", sum: 1 + 2 };"
  86. }
  87. }
  88. }
  89. },
  90. {
  91. "id": "dwy-value-empty",
  92. "description": "DWY-01:只写日志、没有返回值的片段。",
  93. "metadata": {
  94. "kind": "main",
  95. "timingPolicy": "fast-text",
  96. "source": "synthetic",
  97. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  98. },
  99. "maxMatches": 1,
  100. "match": {
  101. "method": "POST",
  102. "pathIncludes": "/messages",
  103. "bodyIncludes": ["E2E_DWY_VALUE_START", "toolu_dwy_value_eval"],
  104. "bodyExcludes": [
  105. "Generate a concise title",
  106. "CRITICAL: Respond with TEXT ONLY",
  107. "toolu_dwy_value_empty"
  108. ]
  109. },
  110. "response": {
  111. "statusCode": 200,
  112. "toolUse": {
  113. "id": "toolu_dwy_value_empty",
  114. "name": "EvalWorkflowSnippet",
  115. "input": {
  116. "code": "log(\"E2E_DWY_LOG_ONLY\");"
  117. }
  118. }
  119. }
  120. },
  121. {
  122. "id": "dwy-value-final",
  123. "description": "E2E_DWY_VALUE_START:工具结果回到模型后收尾。",
  124. "metadata": {
  125. "kind": "main",
  126. "timingPolicy": "fast-text",
  127. "source": "synthetic",
  128. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  129. },
  130. "maxMatches": 1,
  131. "match": {
  132. "method": "POST",
  133. "pathIncludes": "/messages",
  134. "bodyIncludes": ["E2E_DWY_VALUE_START", "toolu_dwy_value_empty"],
  135. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  136. },
  137. "response": {
  138. "statusCode": 200,
  139. "text": {
  140. "id": "dwy-value-final",
  141. "inputTokens": 80,
  142. "outputTokens": 8,
  143. "text": "E2E_DWY_VALUE_DONE 片段跑通了。"
  144. }
  145. }
  146. },
  147. {
  148. "id": "dwy-fail-skill",
  149. "description": "DWY-02:先加载工作流 Skill。",
  150. "metadata": {
  151. "kind": "main",
  152. "timingPolicy": "fast-text",
  153. "source": "synthetic",
  154. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  155. },
  156. "maxMatches": 1,
  157. "match": {
  158. "method": "POST",
  159. "pathIncludes": "/messages",
  160. "bodyExcludes": [
  161. "Generate a concise title",
  162. "CRITICAL: Respond with TEXT ONLY",
  163. "toolu_dwy_fail_skill"
  164. ],
  165. "lastUserMessageIncludes": ["E2E_DWY_FAIL_START"]
  166. },
  167. "response": {
  168. "statusCode": 200,
  169. "toolUse": {
  170. "id": "toolu_dwy_fail_skill",
  171. "name": "Skill",
  172. "input": {
  173. "skill": "dynamic-workflows"
  174. }
  175. }
  176. }
  177. },
  178. {
  179. "id": "dwy-fail-throw",
  180. "description": "DWY-02:先写一行日志再抛错的片段。",
  181. "metadata": {
  182. "kind": "main",
  183. "timingPolicy": "fast-text",
  184. "source": "synthetic",
  185. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  186. },
  187. "maxMatches": 1,
  188. "match": {
  189. "method": "POST",
  190. "pathIncludes": "/messages",
  191. "bodyIncludes": ["E2E_DWY_FAIL_START", "toolu_dwy_fail_skill"],
  192. "bodyExcludes": [
  193. "Generate a concise title",
  194. "CRITICAL: Respond with TEXT ONLY",
  195. "toolu_dwy_fail_throw"
  196. ]
  197. },
  198. "response": {
  199. "statusCode": 200,
  200. "toolUse": {
  201. "id": "toolu_dwy_fail_throw",
  202. "name": "EvalWorkflowSnippet",
  203. "input": {
  204. "code": "log(\"E2E_DWY_BEFORE_THROW\");\nthrow new Error(\"E2E_DWY_BOOM\");"
  205. }
  206. }
  207. }
  208. },
  209. {
  210. "id": "dwy-fail-compile",
  211. "description": "DWY-02:用了片段 facade 没有的 agent(),编不过。",
  212. "metadata": {
  213. "kind": "main",
  214. "timingPolicy": "fast-text",
  215. "source": "synthetic",
  216. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  217. },
  218. "maxMatches": 1,
  219. "match": {
  220. "method": "POST",
  221. "pathIncludes": "/messages",
  222. "bodyIncludes": ["E2E_DWY_FAIL_START", "toolu_dwy_fail_throw"],
  223. "bodyExcludes": [
  224. "Generate a concise title",
  225. "CRITICAL: Respond with TEXT ONLY",
  226. "toolu_dwy_fail_compile"
  227. ]
  228. },
  229. "response": {
  230. "statusCode": 200,
  231. "toolUse": {
  232. "id": "toolu_dwy_fail_compile",
  233. "name": "EvalWorkflowSnippet",
  234. "input": {
  235. "code": "log(\"E2E_DWY_NEVER_LOGGED\");\nconst answer = agent(\"E2E_DWY_ACTOR\");\nreturn answer;"
  236. }
  237. }
  238. }
  239. },
  240. {
  241. "id": "dwy-fail-large",
  242. "description": "DWY-02:返回值超过 256KB。",
  243. "metadata": {
  244. "kind": "main",
  245. "timingPolicy": "fast-text",
  246. "source": "synthetic",
  247. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  248. },
  249. "maxMatches": 1,
  250. "match": {
  251. "method": "POST",
  252. "pathIncludes": "/messages",
  253. "bodyIncludes": ["E2E_DWY_FAIL_START", "toolu_dwy_fail_compile"],
  254. "bodyExcludes": [
  255. "Generate a concise title",
  256. "CRITICAL: Respond with TEXT ONLY",
  257. "toolu_dwy_fail_large"
  258. ]
  259. },
  260. "response": {
  261. "statusCode": 200,
  262. "toolUse": {
  263. "id": "toolu_dwy_fail_large",
  264. "name": "EvalWorkflowSnippet",
  265. "input": {
  266. "code": "return \"x\".repeat(300 * 1024);"
  267. }
  268. }
  269. }
  270. },
  271. {
  272. "id": "dwy-fail-outside",
  273. "description": "DWY-02:files.read 读工作区之外的文件。",
  274. "metadata": {
  275. "kind": "main",
  276. "timingPolicy": "fast-text",
  277. "source": "synthetic",
  278. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  279. },
  280. "maxMatches": 1,
  281. "match": {
  282. "method": "POST",
  283. "pathIncludes": "/messages",
  284. "bodyIncludes": ["E2E_DWY_FAIL_START", "toolu_dwy_fail_large"],
  285. "bodyExcludes": [
  286. "Generate a concise title",
  287. "CRITICAL: Respond with TEXT ONLY",
  288. "toolu_dwy_fail_outside"
  289. ]
  290. },
  291. "response": {
  292. "statusCode": 200,
  293. "toolUse": {
  294. "id": "toolu_dwy_fail_outside",
  295. "name": "EvalWorkflowSnippet",
  296. "input": {
  297. "code": "return await files.read(\"{{e2eRuntimeRoot}}/dwy-ok-snippet.ts\");"
  298. }
  299. }
  300. }
  301. },
  302. {
  303. "id": "dwy-fail-timeout",
  304. "description": "DWY-02:死循环撞上 1000ms 墙钟(允许的最小值)。",
  305. "metadata": {
  306. "kind": "main",
  307. "timingPolicy": "fast-text",
  308. "source": "synthetic",
  309. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  310. },
  311. "maxMatches": 1,
  312. "match": {
  313. "method": "POST",
  314. "pathIncludes": "/messages",
  315. "bodyIncludes": ["E2E_DWY_FAIL_START", "toolu_dwy_fail_outside"],
  316. "bodyExcludes": [
  317. "Generate a concise title",
  318. "CRITICAL: Respond with TEXT ONLY",
  319. "toolu_dwy_fail_timeout"
  320. ]
  321. },
  322. "response": {
  323. "statusCode": 200,
  324. "toolUse": {
  325. "id": "toolu_dwy_fail_timeout",
  326. "name": "EvalWorkflowSnippet",
  327. "input": {
  328. "code": "while (true) {}",
  329. "timeoutMs": 1000
  330. }
  331. }
  332. }
  333. },
  334. {
  335. "id": "dwy-fail-final",
  336. "description": "E2E_DWY_FAIL_START:工具结果回到模型后收尾。",
  337. "metadata": {
  338. "kind": "main",
  339. "timingPolicy": "fast-text",
  340. "source": "synthetic",
  341. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  342. },
  343. "maxMatches": 1,
  344. "match": {
  345. "method": "POST",
  346. "pathIncludes": "/messages",
  347. "bodyIncludes": ["E2E_DWY_FAIL_START", "toolu_dwy_fail_timeout"],
  348. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  349. },
  350. "response": {
  351. "statusCode": 200,
  352. "text": {
  353. "id": "dwy-fail-final",
  354. "inputTokens": 80,
  355. "outputTokens": 8,
  356. "text": "E2E_DWY_FAIL_DONE 片段的失败都看到了。"
  357. }
  358. }
  359. },
  360. {
  361. "id": "dwy-gate-eval-1",
  362. "description": "DWY-03:没加载 Skill 就调用片段(带 world.run,能跑就会弹窗写文件)。",
  363. "metadata": {
  364. "kind": "main",
  365. "timingPolicy": "fast-text",
  366. "source": "synthetic",
  367. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  368. },
  369. "maxMatches": 1,
  370. "match": {
  371. "method": "POST",
  372. "pathIncludes": "/messages",
  373. "bodyExcludes": [
  374. "Generate a concise title",
  375. "CRITICAL: Respond with TEXT ONLY",
  376. "toolu_dwy_gate_eval_1"
  377. ],
  378. "lastUserMessageIncludes": ["E2E_DWY_GATE_START"]
  379. },
  380. "response": {
  381. "statusCode": 200,
  382. "toolUse": {
  383. "id": "toolu_dwy_gate_eval_1",
  384. "name": "EvalWorkflowSnippet",
  385. "input": {
  386. "code": "const result = await world.run(\"node\", [\"-e\", \"require(\\\"node:fs\\\").writeFileSync(\\\"{{e2eRuntimeRoot}}/dwy-gate-output.txt\\\", \\\"ran\\\\n\\\")\"]);\nreturn { marker: \"E2E_DWY_GATE_VALUE\", exitCode: result.exitCode };"
  387. }
  388. }
  389. }
  390. },
  391. {
  392. "id": "dwy-gate-skill",
  393. "description": "DWY-03:读到技能门的拒绝后加载 Skill。",
  394. "metadata": {
  395. "kind": "main",
  396. "timingPolicy": "fast-text",
  397. "source": "synthetic",
  398. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  399. },
  400. "maxMatches": 1,
  401. "match": {
  402. "method": "POST",
  403. "pathIncludes": "/messages",
  404. "bodyIncludes": ["E2E_DWY_GATE_START", "toolu_dwy_gate_eval_1"],
  405. "bodyExcludes": [
  406. "Generate a concise title",
  407. "CRITICAL: Respond with TEXT ONLY",
  408. "toolu_dwy_gate_skill"
  409. ]
  410. },
  411. "response": {
  412. "statusCode": 200,
  413. "toolUse": {
  414. "id": "toolu_dwy_gate_skill",
  415. "name": "Skill",
  416. "input": {
  417. "skill": "dynamic-workflows"
  418. }
  419. }
  420. }
  421. },
  422. {
  423. "id": "dwy-gate-eval-2",
  424. "description": "DWY-03:加载 Skill 后重发同一片段,确认门询问。",
  425. "metadata": {
  426. "kind": "main",
  427. "timingPolicy": "fast-text",
  428. "source": "synthetic",
  429. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  430. },
  431. "maxMatches": 1,
  432. "match": {
  433. "method": "POST",
  434. "pathIncludes": "/messages",
  435. "bodyIncludes": ["E2E_DWY_GATE_START", "toolu_dwy_gate_skill"],
  436. "bodyExcludes": [
  437. "Generate a concise title",
  438. "CRITICAL: Respond with TEXT ONLY",
  439. "toolu_dwy_gate_eval_2"
  440. ]
  441. },
  442. "response": {
  443. "statusCode": 200,
  444. "toolUse": {
  445. "id": "toolu_dwy_gate_eval_2",
  446. "name": "EvalWorkflowSnippet",
  447. "input": {
  448. "code": "const result = await world.run(\"node\", [\"-e\", \"require(\\\"node:fs\\\").writeFileSync(\\\"{{e2eRuntimeRoot}}/dwy-gate-output.txt\\\", \\\"ran\\\\n\\\")\"]);\nreturn { marker: \"E2E_DWY_GATE_VALUE\", exitCode: result.exitCode };"
  449. }
  450. }
  451. }
  452. },
  453. {
  454. "id": "dwy-gate-final",
  455. "description": "E2E_DWY_GATE_START:工具结果回到模型后收尾。",
  456. "metadata": {
  457. "kind": "main",
  458. "timingPolicy": "fast-text",
  459. "source": "synthetic",
  460. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  461. },
  462. "maxMatches": 1,
  463. "match": {
  464. "method": "POST",
  465. "pathIncludes": "/messages",
  466. "bodyIncludes": ["E2E_DWY_GATE_START", "toolu_dwy_gate_eval_2"],
  467. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  468. },
  469. "response": {
  470. "statusCode": 200,
  471. "text": {
  472. "id": "dwy-gate-final",
  473. "inputTokens": 80,
  474. "outputTokens": 8,
  475. "text": "E2E_DWY_GATE_DONE 片段跑通了。"
  476. }
  477. }
  478. },
  479. {
  480. "id": "dwy-running-skill",
  481. "description": "DWY-04:先加载工作流 Skill。",
  482. "metadata": {
  483. "kind": "main",
  484. "timingPolicy": "fast-text",
  485. "source": "synthetic",
  486. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  487. },
  488. "maxMatches": 1,
  489. "match": {
  490. "method": "POST",
  491. "pathIncludes": "/messages",
  492. "bodyExcludes": [
  493. "Generate a concise title",
  494. "CRITICAL: Respond with TEXT ONLY",
  495. "toolu_dwy_running_skill"
  496. ],
  497. "lastUserMessageIncludes": ["E2E_DWY_RUNNING_START"]
  498. },
  499. "response": {
  500. "statusCode": 200,
  501. "toolUse": {
  502. "id": "toolu_dwy_running_skill",
  503. "name": "Skill",
  504. "input": {
  505. "skill": "dynamic-workflows"
  506. }
  507. }
  508. }
  509. },
  510. {
  511. "id": "dwy-running-eval",
  512. "description": "DWY-04:等闸文件的片段,停在运行中。",
  513. "metadata": {
  514. "kind": "main",
  515. "timingPolicy": "fast-text",
  516. "source": "synthetic",
  517. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  518. },
  519. "maxMatches": 1,
  520. "match": {
  521. "method": "POST",
  522. "pathIncludes": "/messages",
  523. "bodyIncludes": ["E2E_DWY_RUNNING_START", "toolu_dwy_running_skill"],
  524. "bodyExcludes": [
  525. "Generate a concise title",
  526. "CRITICAL: Respond with TEXT ONLY",
  527. "toolu_dwy_running_eval"
  528. ]
  529. },
  530. "response": {
  531. "statusCode": 200,
  532. "toolUse": {
  533. "id": "toolu_dwy_running_eval",
  534. "name": "EvalWorkflowSnippet",
  535. "input": {
  536. "code": "const result = await world.run(\"node\", [\"-e\", \"const fs = require(\\\"node:fs\\\"); const timer = setInterval(() => { if (fs.existsSync(\\\"{{e2eRuntimeRoot}}/dwy-gate-running\\\")) { clearInterval(timer); fs.writeFileSync(\\\"dwy-running.txt\\\", \\\"E2E_DWY_WRITTEN\\\\n\\\"); console.log(\\\"E2E_DWY_RUNNING_STDOUT\\\"); } }, 100);\"], { timeoutMs: 120000 });\nconst found = await files.glob(\"*.txt\");\nconst written = await files.read(\"dwy-running.txt\");\nreturn { marker: \"E2E_DWY_RUNNING_VALUE\", out: result.stdout.trim(), found, written: written.trim() };"
  537. }
  538. }
  539. }
  540. },
  541. {
  542. "id": "dwy-running-final",
  543. "description": "E2E_DWY_RUNNING_START:工具结果回到模型后收尾。",
  544. "metadata": {
  545. "kind": "main",
  546. "timingPolicy": "fast-text",
  547. "source": "synthetic",
  548. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  549. },
  550. "maxMatches": 1,
  551. "match": {
  552. "method": "POST",
  553. "pathIncludes": "/messages",
  554. "bodyIncludes": ["E2E_DWY_RUNNING_START", "toolu_dwy_running_eval"],
  555. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  556. },
  557. "response": {
  558. "statusCode": 200,
  559. "text": {
  560. "id": "dwy-running-final",
  561. "inputTokens": 80,
  562. "outputTokens": 8,
  563. "text": "E2E_DWY_RUNNING_DONE 片段跑通了。"
  564. }
  565. }
  566. },
  567. {
  568. "id": "dwy-path-skill",
  569. "description": "DWY-05:先加载工作流 Skill。",
  570. "metadata": {
  571. "kind": "main",
  572. "timingPolicy": "fast-text",
  573. "source": "synthetic",
  574. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  575. },
  576. "maxMatches": 1,
  577. "match": {
  578. "method": "POST",
  579. "pathIncludes": "/messages",
  580. "bodyExcludes": [
  581. "Generate a concise title",
  582. "CRITICAL: Respond with TEXT ONLY",
  583. "toolu_dwy_path_skill"
  584. ],
  585. "lastUserMessageIncludes": ["E2E_DWY_PATH_START"]
  586. },
  587. "response": {
  588. "statusCode": 200,
  589. "toolUse": {
  590. "id": "toolu_dwy_path_skill",
  591. "name": "Skill",
  592. "input": {
  593. "skill": "dynamic-workflows"
  594. }
  595. }
  596. }
  597. },
  598. {
  599. "id": "dwy-path-ok",
  600. "description": "DWY-05:按 path 提交一个能跑的片段文件。",
  601. "metadata": {
  602. "kind": "main",
  603. "timingPolicy": "fast-text",
  604. "source": "synthetic",
  605. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  606. },
  607. "maxMatches": 1,
  608. "match": {
  609. "method": "POST",
  610. "pathIncludes": "/messages",
  611. "bodyIncludes": ["E2E_DWY_PATH_START", "toolu_dwy_path_skill"],
  612. "bodyExcludes": [
  613. "Generate a concise title",
  614. "CRITICAL: Respond with TEXT ONLY",
  615. "toolu_dwy_path_ok"
  616. ]
  617. },
  618. "response": {
  619. "statusCode": 200,
  620. "toolUse": {
  621. "id": "toolu_dwy_path_ok",
  622. "name": "EvalWorkflowSnippet",
  623. "input": {
  624. "path": "{{e2eRuntimeRoot}}/dwy-ok-snippet.ts"
  625. }
  626. }
  627. }
  628. },
  629. {
  630. "id": "dwy-path-bad",
  631. "description": "DWY-05:按 path 提交一个编不过的片段文件。",
  632. "metadata": {
  633. "kind": "main",
  634. "timingPolicy": "fast-text",
  635. "source": "synthetic",
  636. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  637. },
  638. "maxMatches": 1,
  639. "match": {
  640. "method": "POST",
  641. "pathIncludes": "/messages",
  642. "bodyIncludes": ["E2E_DWY_PATH_START", "toolu_dwy_path_ok"],
  643. "bodyExcludes": [
  644. "Generate a concise title",
  645. "CRITICAL: Respond with TEXT ONLY",
  646. "toolu_dwy_path_bad"
  647. ]
  648. },
  649. "response": {
  650. "statusCode": 200,
  651. "toolUse": {
  652. "id": "toolu_dwy_path_bad",
  653. "name": "EvalWorkflowSnippet",
  654. "input": {
  655. "path": "{{e2eRuntimeRoot}}/dwy-bad-snippet.ts"
  656. }
  657. }
  658. }
  659. },
  660. {
  661. "id": "dwy-path-missing",
  662. "description": "DWY-05:path 指向不存在的文件。",
  663. "metadata": {
  664. "kind": "main",
  665. "timingPolicy": "fast-text",
  666. "source": "synthetic",
  667. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  668. },
  669. "maxMatches": 1,
  670. "match": {
  671. "method": "POST",
  672. "pathIncludes": "/messages",
  673. "bodyIncludes": ["E2E_DWY_PATH_START", "toolu_dwy_path_bad"],
  674. "bodyExcludes": [
  675. "Generate a concise title",
  676. "CRITICAL: Respond with TEXT ONLY",
  677. "toolu_dwy_path_missing"
  678. ]
  679. },
  680. "response": {
  681. "statusCode": 200,
  682. "toolUse": {
  683. "id": "toolu_dwy_path_missing",
  684. "name": "EvalWorkflowSnippet",
  685. "input": {
  686. "path": "{{e2eRuntimeRoot}}/dwy-absent.ts"
  687. }
  688. }
  689. }
  690. },
  691. {
  692. "id": "dwy-path-both",
  693. "description": "DWY-05:code 与 path 都给。",
  694. "metadata": {
  695. "kind": "main",
  696. "timingPolicy": "fast-text",
  697. "source": "synthetic",
  698. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  699. },
  700. "maxMatches": 1,
  701. "match": {
  702. "method": "POST",
  703. "pathIncludes": "/messages",
  704. "bodyIncludes": ["E2E_DWY_PATH_START", "toolu_dwy_path_missing"],
  705. "bodyExcludes": [
  706. "Generate a concise title",
  707. "CRITICAL: Respond with TEXT ONLY",
  708. "toolu_dwy_path_both"
  709. ]
  710. },
  711. "response": {
  712. "statusCode": 200,
  713. "toolUse": {
  714. "id": "toolu_dwy_path_both",
  715. "name": "EvalWorkflowSnippet",
  716. "input": {
  717. "code": "return 1;",
  718. "path": "{{e2eRuntimeRoot}}/dwy-ok-snippet.ts"
  719. }
  720. }
  721. }
  722. },
  723. {
  724. "id": "dwy-path-neither",
  725. "description": "DWY-05:code 与 path 都不给。",
  726. "metadata": {
  727. "kind": "main",
  728. "timingPolicy": "fast-text",
  729. "source": "synthetic",
  730. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  731. },
  732. "maxMatches": 1,
  733. "match": {
  734. "method": "POST",
  735. "pathIncludes": "/messages",
  736. "bodyIncludes": ["E2E_DWY_PATH_START", "toolu_dwy_path_both"],
  737. "bodyExcludes": [
  738. "Generate a concise title",
  739. "CRITICAL: Respond with TEXT ONLY",
  740. "toolu_dwy_path_neither"
  741. ]
  742. },
  743. "response": {
  744. "statusCode": 200,
  745. "toolUse": {
  746. "id": "toolu_dwy_path_neither",
  747. "name": "EvalWorkflowSnippet",
  748. "input": {}
  749. }
  750. }
  751. },
  752. {
  753. "id": "dwy-path-final",
  754. "description": "E2E_DWY_PATH_START:工具结果回到模型后收尾。",
  755. "metadata": {
  756. "kind": "main",
  757. "timingPolicy": "fast-text",
  758. "source": "synthetic",
  759. "syntheticReason": "片段工具只由模型的 Skill / EvalWorkflowSnippet 选择触发;回放只固定这些选择与收尾文本,真实 Skill 加载、技能门、片段编译、沙箱执行、world 读写、确认门与工具结果都走产品链路。"
  760. },
  761. "maxMatches": 1,
  762. "match": {
  763. "method": "POST",
  764. "pathIncludes": "/messages",
  765. "bodyIncludes": ["E2E_DWY_PATH_START", "toolu_dwy_path_neither"],
  766. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  767. },
  768. "response": {
  769. "statusCode": 200,
  770. "text": {
  771. "id": "dwy-path-final",
  772. "inputTokens": 80,
  773. "outputTokens": 8,
  774. "text": "E2E_DWY_PATH_DONE 来源的拒绝都看到了。"
  775. }
  776. }
  777. }
  778. ]
  779. }