conversation-session-dynamic-workflow-gray-always-on-stop.json 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-dynamic-workflow-gray-always-on-stop",
  4. "spec": "./test/e2e/conversation-session/workflows/conversation-session-dynamic-workflow-gray-always-on-stop.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "dwx-title",
  8. "metadata": {
  9. "kind": "common",
  10. "source": "synthetic",
  11. "timingPolicy": "fast-text",
  12. "syntheticReason": "固定 Skill/CreateWorkflow 与通知回复的模型选择;真实工作流编译、审批、运行、用户停止与停止通知由 Agent 执行。"
  13. },
  14. "match": {
  15. "method": "POST",
  16. "pathIncludes": "/messages",
  17. "bodyExcludes": [],
  18. "bodyIncludes": ["Generate a concise title", "E2E_DWX_"]
  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": "dwx-skill",
  30. "metadata": {
  31. "kind": "main",
  32. "source": "synthetic",
  33. "timingPolicy": "fast-text",
  34. "syntheticReason": "固定 Skill/CreateWorkflow 与通知回复的模型选择;真实工作流编译、审批、运行、用户停止与停止通知由 Agent 执行。"
  35. },
  36. "match": {
  37. "method": "POST",
  38. "pathIncludes": "/messages",
  39. "bodyExcludes": [
  40. "Generate a concise title",
  41. "CRITICAL: Respond with TEXT ONLY",
  42. "toolu_dwx_skill"
  43. ],
  44. "lastUserMessageIncludes": ["E2E_DWX_START"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "toolUse": {
  49. "id": "toolu_dwx_skill",
  50. "name": "Skill",
  51. "input": {
  52. "skill": "dynamic-workflows"
  53. }
  54. }
  55. }
  56. },
  57. {
  58. "id": "dwx-create",
  59. "metadata": {
  60. "kind": "main",
  61. "source": "synthetic",
  62. "timingPolicy": "fast-text",
  63. "syntheticReason": "固定 Skill/CreateWorkflow 与通知回复的模型选择;真实工作流编译、审批、运行、用户停止与停止通知由 Agent 执行。"
  64. },
  65. "match": {
  66. "method": "POST",
  67. "pathIncludes": "/messages",
  68. "bodyExcludes": [
  69. "Generate a concise title",
  70. "CRITICAL: Respond with TEXT ONLY",
  71. "toolu_dwx_create"
  72. ],
  73. "bodyIncludes": ["E2E_DWX_START", "toolu_dwx_skill"]
  74. },
  75. "response": {
  76. "statusCode": 200,
  77. "toolUse": {
  78. "id": "toolu_dwx_create",
  79. "name": "CreateWorkflow",
  80. "input": {
  81. "name": "E2E 停止工作流",
  82. "script": "phase(\"等待\");\nawait world.run(\"node\", [\"-e\", \"setTimeout(() => {}, 240000)\"]);\nreturn { ok: true };"
  83. }
  84. }
  85. }
  86. },
  87. {
  88. "id": "dwx-created",
  89. "metadata": {
  90. "kind": "main",
  91. "source": "synthetic",
  92. "timingPolicy": "fast-text",
  93. "syntheticReason": "固定 Skill/CreateWorkflow 与通知回复的模型选择;真实工作流编译、审批、运行、用户停止与停止通知由 Agent 执行。"
  94. },
  95. "match": {
  96. "method": "POST",
  97. "pathIncludes": "/messages",
  98. "bodyExcludes": [
  99. "Generate a concise title",
  100. "CRITICAL: Respond with TEXT ONLY",
  101. "<stop-reason>user</stop-reason>",
  102. "E2E_DWX_AFTER"
  103. ],
  104. "bodyIncludes": ["E2E_DWX_START", "toolu_dwx_create"]
  105. },
  106. "response": {
  107. "statusCode": 200,
  108. "text": "E2E_DWX_STARTED 工作流已启动。"
  109. }
  110. },
  111. {
  112. "id": "dwx-stopped-notified",
  113. "metadata": {
  114. "kind": "main",
  115. "source": "synthetic",
  116. "timingPolicy": "fast-text",
  117. "syntheticReason": "固定 Skill/CreateWorkflow 与通知回复的模型选择;真实工作流编译、审批、运行、用户停止与停止通知由 Agent 执行。"
  118. },
  119. "match": {
  120. "method": "POST",
  121. "pathIncludes": "/messages",
  122. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  123. "bodyIncludes": ["E2E_DWX_START"],
  124. "lastUserMessageIncludes": ["<stop-reason>user</stop-reason>"]
  125. },
  126. "response": {
  127. "statusCode": 200,
  128. "text": "E2E_DWX_NOTIFIED 工作流已按你的要求停止。"
  129. }
  130. },
  131. {
  132. "id": "dwx-after",
  133. "metadata": {
  134. "kind": "main",
  135. "source": "synthetic",
  136. "timingPolicy": "fast-text",
  137. "syntheticReason": "固定 Skill/CreateWorkflow 与通知回复的模型选择;真实工作流编译、审批、运行、用户停止与停止通知由 Agent 执行。"
  138. },
  139. "match": {
  140. "method": "POST",
  141. "pathIncludes": "/messages",
  142. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  143. "lastUserMessageIncludes": ["E2E_DWX_AFTER"]
  144. },
  145. "response": {
  146. "statusCode": 200,
  147. "text": "E2E_DWX_AFTER_OK 对话继续。"
  148. }
  149. }
  150. ]
  151. }