conversation-session-preinstalled-tools-agent-switch.json 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-preinstalled-tools-agent-switch",
  4. "spec": "./test/e2e/conversation-session/conversation-session-preinstalled-tools-agent-switch.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "pt-agent-restored-call",
  8. "description": "真实 Agent 选择入口 RESTORED",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "固定触发真实 Agent 的 PATH/统一入口调用,开关由实际界面操作。"
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": ["E2E_PT_AGENT_RESTORED"],
  20. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  21. },
  22. "response": {
  23. "statusCode": 200,
  24. "toolUse": {
  25. "id": "toolu_pt_agent_restored",
  26. "name": "Bash",
  27. "input": {
  28. "command": "node \"{{e2eRuntimeRoot}}/conversation-session-preinstalled-tools-agent-switch/probe.mjs\"",
  29. "description": "Read tool selection"
  30. }
  31. }
  32. }
  33. },
  34. {
  35. "id": "pt-agent-restored-done",
  36. "description": "真实 Agent 选择入口 RESTORED",
  37. "metadata": {
  38. "kind": "main",
  39. "timingPolicy": "fast-text",
  40. "source": "synthetic",
  41. "syntheticReason": "固定触发真实 Agent 的 PATH/统一入口调用,开关由实际界面操作。"
  42. },
  43. "maxMatches": 1,
  44. "match": {
  45. "method": "POST",
  46. "pathIncludes": "/messages",
  47. "bodyIncludes": ["E2E_PT_AGENT_RESTORED", "toolu_pt_agent_restored"],
  48. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  49. },
  50. "response": {
  51. "statusCode": 200,
  52. "text": {
  53. "id": "pt-agent-restored-done",
  54. "text": "E2E_PT_AGENT_RESTORED_DONE",
  55. "inputTokens": 100,
  56. "outputTokens": 10
  57. }
  58. }
  59. },
  60. {
  61. "id": "pt-agent-off-call",
  62. "description": "真实 Agent 选择入口 OFF",
  63. "metadata": {
  64. "kind": "main",
  65. "timingPolicy": "fast-text",
  66. "source": "synthetic",
  67. "syntheticReason": "固定触发真实 Agent 的 PATH/统一入口调用,开关由实际界面操作。"
  68. },
  69. "maxMatches": 1,
  70. "match": {
  71. "method": "POST",
  72. "pathIncludes": "/messages",
  73. "bodyIncludes": ["E2E_PT_AGENT_OFF"],
  74. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  75. },
  76. "response": {
  77. "statusCode": 200,
  78. "toolUse": {
  79. "id": "toolu_pt_agent_off",
  80. "name": "Bash",
  81. "input": {
  82. "command": "node \"{{e2eRuntimeRoot}}/conversation-session-preinstalled-tools-agent-switch/probe.mjs\"",
  83. "description": "Read tool selection"
  84. }
  85. }
  86. }
  87. },
  88. {
  89. "id": "pt-agent-off-done",
  90. "description": "真实 Agent 选择入口 OFF",
  91. "metadata": {
  92. "kind": "main",
  93. "timingPolicy": "fast-text",
  94. "source": "synthetic",
  95. "syntheticReason": "固定触发真实 Agent 的 PATH/统一入口调用,开关由实际界面操作。"
  96. },
  97. "maxMatches": 1,
  98. "match": {
  99. "method": "POST",
  100. "pathIncludes": "/messages",
  101. "bodyIncludes": ["E2E_PT_AGENT_OFF", "toolu_pt_agent_off"],
  102. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  103. },
  104. "response": {
  105. "statusCode": 200,
  106. "text": {
  107. "id": "pt-agent-off-done",
  108. "text": "E2E_PT_AGENT_OFF_DONE",
  109. "inputTokens": 100,
  110. "outputTokens": 10
  111. }
  112. }
  113. },
  114. {
  115. "id": "pt-agent-on-call",
  116. "description": "真实 Agent 选择入口 ON",
  117. "metadata": {
  118. "kind": "main",
  119. "timingPolicy": "fast-text",
  120. "source": "synthetic",
  121. "syntheticReason": "固定触发真实 Agent 的 PATH/统一入口调用,开关由实际界面操作。"
  122. },
  123. "maxMatches": 1,
  124. "match": {
  125. "method": "POST",
  126. "pathIncludes": "/messages",
  127. "bodyIncludes": ["E2E_PT_AGENT_ON"],
  128. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  129. },
  130. "response": {
  131. "statusCode": 200,
  132. "toolUse": {
  133. "id": "toolu_pt_agent_on",
  134. "name": "Bash",
  135. "input": {
  136. "command": "node \"{{e2eRuntimeRoot}}/conversation-session-preinstalled-tools-agent-switch/probe.mjs\"",
  137. "description": "Read tool selection"
  138. }
  139. }
  140. }
  141. },
  142. {
  143. "id": "pt-agent-on-done",
  144. "description": "真实 Agent 选择入口 ON",
  145. "metadata": {
  146. "kind": "main",
  147. "timingPolicy": "fast-text",
  148. "source": "synthetic",
  149. "syntheticReason": "固定触发真实 Agent 的 PATH/统一入口调用,开关由实际界面操作。"
  150. },
  151. "maxMatches": 1,
  152. "match": {
  153. "method": "POST",
  154. "pathIncludes": "/messages",
  155. "bodyIncludes": ["E2E_PT_AGENT_ON", "toolu_pt_agent_on"],
  156. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  157. },
  158. "response": {
  159. "statusCode": 200,
  160. "text": {
  161. "id": "pt-agent-on-done",
  162. "text": "E2E_PT_AGENT_ON_DONE",
  163. "inputTokens": 100,
  164. "outputTokens": 10
  165. }
  166. }
  167. },
  168. {
  169. "id": "pt-agent-before-call",
  170. "description": "真实 Agent 选择入口 BEFORE",
  171. "metadata": {
  172. "kind": "main",
  173. "timingPolicy": "fast-text",
  174. "source": "synthetic",
  175. "syntheticReason": "固定触发真实 Agent 的 PATH/统一入口调用,开关由实际界面操作。"
  176. },
  177. "maxMatches": 1,
  178. "match": {
  179. "method": "POST",
  180. "pathIncludes": "/messages",
  181. "bodyIncludes": ["E2E_PT_AGENT_BEFORE"],
  182. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  183. },
  184. "response": {
  185. "statusCode": 200,
  186. "toolUse": {
  187. "id": "toolu_pt_agent_before",
  188. "name": "Bash",
  189. "input": {
  190. "command": "node \"{{e2eRuntimeRoot}}/conversation-session-preinstalled-tools-agent-switch/probe.mjs\"",
  191. "description": "Read tool selection"
  192. }
  193. }
  194. }
  195. },
  196. {
  197. "id": "pt-agent-before-done",
  198. "description": "真实 Agent 选择入口 BEFORE",
  199. "metadata": {
  200. "kind": "main",
  201. "timingPolicy": "fast-text",
  202. "source": "synthetic",
  203. "syntheticReason": "固定触发真实 Agent 的 PATH/统一入口调用,开关由实际界面操作。"
  204. },
  205. "maxMatches": 1,
  206. "match": {
  207. "method": "POST",
  208. "pathIncludes": "/messages",
  209. "bodyIncludes": ["E2E_PT_AGENT_BEFORE", "toolu_pt_agent_before"],
  210. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  211. },
  212. "response": {
  213. "statusCode": 200,
  214. "text": {
  215. "id": "pt-agent-before-done",
  216. "text": "E2E_PT_AGENT_BEFORE_DONE",
  217. "inputTokens": 100,
  218. "outputTokens": 10
  219. }
  220. }
  221. }
  222. ]
  223. }