conversation-session-dynamic-workflow-holes.json 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-dynamic-workflow-holes",
  4. "spec": "./test/e2e/conversation-session/workflows/conversation-session-dynamic-workflow-holes.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "dwh-title",
  8. "metadata": {
  9. "kind": "common",
  10. "source": "synthetic",
  11. "timingPolicy": "fast-text",
  12. "syntheticReason": "固定 Skill/CreateWorkflow/FillWorkflowHole 模型选择;真实工作流编译、运行、留白通知、批准与补全由 Agent 执行,run ID 从真实通知读取。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/messages",
  17. "bodyExcludes": [],
  18. "bodyIncludes": ["Generate a concise title", "E2E_DWH_"]
  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": "dwh-skill",
  30. "metadata": {
  31. "kind": "main",
  32. "source": "synthetic",
  33. "timingPolicy": "fast-text",
  34. "syntheticReason": "固定 Skill/CreateWorkflow/FillWorkflowHole 模型选择;真实工作流编译、运行、留白通知、批准与补全由 Agent 执行,run ID 从真实通知读取。"
  35. },
  36. "match": {
  37. "method": "POST",
  38. "pathIncludes": "/messages",
  39. "bodyExcludes": [
  40. "Generate a concise title",
  41. "CRITICAL: Respond with TEXT ONLY",
  42. "toolu_dwh_skill"
  43. ],
  44. "lastUserMessageIncludes": ["E2E_DWH_START"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "toolUse": {
  49. "id": "toolu_dwh_skill",
  50. "name": "Skill",
  51. "input": {
  52. "skill": "dynamic-workflows"
  53. }
  54. }
  55. }
  56. },
  57. {
  58. "id": "dwh-create",
  59. "metadata": {
  60. "kind": "main",
  61. "source": "synthetic",
  62. "timingPolicy": "fast-text",
  63. "syntheticReason": "固定 Skill/CreateWorkflow/FillWorkflowHole 模型选择;真实工作流编译、运行、留白通知、批准与补全由 Agent 执行,run ID 从真实通知读取。"
  64. },
  65. "match": {
  66. "method": "POST",
  67. "pathIncludes": "/messages",
  68. "bodyExcludes": [
  69. "Generate a concise title",
  70. "CRITICAL: Respond with TEXT ONLY",
  71. "toolu_dwh_create"
  72. ],
  73. "bodyIncludes": ["E2E_DWH_START", "toolu_dwh_skill"]
  74. },
  75. "response": {
  76. "statusCode": 200,
  77. "toolUse": {
  78. "id": "toolu_dwh_create",
  79. "name": "CreateWorkflow",
  80. "input": {
  81. "name": "E2E 留白工作流",
  82. "script": "interface Plan { groups: string[][] }\ninterface Verdict { passed: boolean }\nphase(\"准备\");\nconst plan = await hole<Plan>(\"决定分组\", \"补全须返回 Plan\");\nphase(\"汇总\");\nreturn await hole<Verdict>(\"评判\", \"请判断分组是否完整\");"
  83. }
  84. }
  85. }
  86. },
  87. {
  88. "id": "dwh-created",
  89. "metadata": {
  90. "kind": "main",
  91. "source": "synthetic",
  92. "timingPolicy": "fast-text",
  93. "syntheticReason": "固定 Skill/CreateWorkflow/FillWorkflowHole 模型选择;真实工作流编译、运行、留白通知、批准与补全由 Agent 执行,run ID 从真实通知读取。"
  94. },
  95. "match": {
  96. "method": "POST",
  97. "pathIncludes": "/messages",
  98. "bodyExcludes": [
  99. "Generate a concise title",
  100. "CRITICAL: Respond with TEXT ONLY",
  101. "<workflow-hole>",
  102. "toolu_dwh_fill"
  103. ],
  104. "bodyIncludes": ["E2E_DWH_START", "toolu_dwh_create"]
  105. },
  106. "response": {
  107. "statusCode": 200,
  108. "text": "E2E_DWH_STARTED 工作流已启动。"
  109. }
  110. },
  111. {
  112. "id": "dwh-hole-waiting",
  113. "metadata": {
  114. "kind": "main",
  115. "source": "synthetic",
  116. "timingPolicy": "fast-text",
  117. "syntheticReason": "固定 Skill/CreateWorkflow/FillWorkflowHole 模型选择;真实工作流编译、运行、留白通知、批准与补全由 Agent 执行,run ID 从真实通知读取。"
  118. },
  119. "match": {
  120. "method": "POST",
  121. "pathIncludes": "/messages",
  122. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  123. "lastUserMessageIncludes": ["<workflow-hole>"]
  124. },
  125. "response": {
  126. "statusCode": 200,
  127. "text": "E2E_DWH_WAITING 等待补全。"
  128. }
  129. },
  130. {
  131. "id": "dwh-fill",
  132. "metadata": {
  133. "kind": "main",
  134. "source": "synthetic",
  135. "timingPolicy": "fast-text",
  136. "syntheticReason": "固定 Skill/CreateWorkflow/FillWorkflowHole 模型选择;真实工作流编译、运行、留白通知、批准与补全由 Agent 执行,run ID 从真实通知读取。"
  137. },
  138. "match": {
  139. "method": "POST",
  140. "pathIncludes": "/messages",
  141. "bodyExcludes": [
  142. "Generate a concise title",
  143. "CRITICAL: Respond with TEXT ONLY",
  144. "toolu_dwh_fill"
  145. ],
  146. "lastUserMessageIncludes": ["E2E_DWH_FILL_NOW"]
  147. },
  148. "response": {
  149. "statusCode": 200,
  150. "toolUse": {
  151. "id": "toolu_dwh_fill",
  152. "name": "FillWorkflowHole",
  153. "input": {
  154. "run_id": "{{latestWorkflowRunId}}",
  155. "hole_id": "hole#21b40fca",
  156. "script": "phase(\"收集\");\nphase(\"分组\");\nreturn { groups: [[\"one\"]] };"
  157. }
  158. }
  159. }
  160. },
  161. {
  162. "id": "dwh-filled",
  163. "metadata": {
  164. "kind": "main",
  165. "source": "synthetic",
  166. "timingPolicy": "fast-text",
  167. "syntheticReason": "固定 Skill/CreateWorkflow/FillWorkflowHole 模型选择;真实工作流编译、运行、留白通知、批准与补全由 Agent 执行,run ID 从真实通知读取。"
  168. },
  169. "match": {
  170. "method": "POST",
  171. "pathIncludes": "/messages",
  172. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  173. "bodyIncludes": ["toolu_dwh_fill"]
  174. },
  175. "response": {
  176. "statusCode": 200,
  177. "text": "E2E_DWH_FILLED 留白已补全。"
  178. }
  179. }
  180. ]
  181. }