conversation-session-subagent-runtime-catalog-reasoning.json 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-subagent-runtime-catalog-reasoning",
  4. "spec": "./test/e2e/conversation-session/subagents/conversation-session-subagent-runtime-catalog-reasoning.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "claude-catalog-title",
  8. "description": "Claude runtime catalog case 的标题生成固定响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题生成不是本 case 的产品语义,只需稳定返回。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "statusMessage": "OK",
  23. "headers": {
  24. "content-type": "application/json; charset=utf-8"
  25. },
  26. "body": "{\"id\":\"claude-catalog-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-opus-4-8\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Claude Subagent Catalog\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":125,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":24,\"service_tier\":\"standard\"}}"
  27. }
  28. },
  29. {
  30. "id": "claude-catalog-general-parent-tool",
  31. "description": "父 agent 首轮触发 general-purpose。",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "父请求只需稳定触发 general-purpose;请求本身由 capture 和 model-io 验证 low。"
  37. },
  38. "maxMatches": 1,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_CLAUDE_CATALOG_GENERAL_PARENT"],
  43. "bodyIncludes": ["E2E_CLAUDE_CATALOG_GENERAL_PARENT", "general-purpose"],
  44. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  45. },
  46. "response": {
  47. "statusCode": 200,
  48. "toolUse": {
  49. "id": "toolu_claude_catalog_general",
  50. "name": "Agent",
  51. "input": {
  52. "description": "Run the built-in general-purpose agent",
  53. "prompt": "E2E_CLAUDE_CATALOG_GENERAL_CHILD: Reply with exactly \"E2E_CLAUDE_CATALOG_GENERAL_CHILD_OK\" and no other text.",
  54. "subagent_type": "general-purpose"
  55. }
  56. }
  57. }
  58. },
  59. {
  60. "id": "claude-catalog-general-child",
  61. "description": "general-purpose child 固定回复。",
  62. "metadata": {
  63. "kind": "main",
  64. "timingPolicy": "fast-text",
  65. "source": "synthetic",
  66. "syntheticReason": "child 响应只需稳定完成;请求本身验证 high/16000。"
  67. },
  68. "maxMatches": 1,
  69. "match": {
  70. "method": "POST",
  71. "pathIncludes": "/messages",
  72. "lastUserMessageIncludes": ["E2E_CLAUDE_CATALOG_GENERAL_CHILD"],
  73. "bodyIncludes": ["E2E_CLAUDE_CATALOG_GENERAL_CHILD"],
  74. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  75. },
  76. "response": {
  77. "statusCode": 200,
  78. "statusMessage": "OK",
  79. "text": {
  80. "id": "claude-catalog-general-child-response",
  81. "inputTokens": 128,
  82. "outputTokens": 16,
  83. "text": "E2E_CLAUDE_CATALOG_GENERAL_CHILD_OK"
  84. }
  85. }
  86. },
  87. {
  88. "id": "claude-catalog-general-parent-final",
  89. "description": "父 agent 消费 general-purpose child tool_result。",
  90. "metadata": {
  91. "kind": "main",
  92. "timingPolicy": "fast-text",
  93. "source": "synthetic",
  94. "syntheticReason": "证明父会话消费 child tool_result 并回到 idle。"
  95. },
  96. "maxMatches": 1,
  97. "match": {
  98. "method": "POST",
  99. "pathIncludes": "/messages",
  100. "bodyIncludes": [
  101. "E2E_CLAUDE_CATALOG_GENERAL_PARENT",
  102. "E2E_CLAUDE_CATALOG_GENERAL_CHILD_OK"
  103. ],
  104. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  105. },
  106. "response": {
  107. "statusCode": 200,
  108. "statusMessage": "OK",
  109. "text": {
  110. "id": "claude-catalog-general-parent-final-response",
  111. "inputTokens": 160,
  112. "outputTokens": 12,
  113. "text": "claude-catalog-general-done"
  114. }
  115. }
  116. },
  117. {
  118. "id": "claude-catalog-cold-auto-compact",
  119. "description": "连续场景间可能触发的自动 compact。",
  120. "metadata": {
  121. "kind": "main",
  122. "timingPolicy": "fast-text",
  123. "source": "synthetic",
  124. "syntheticReason": "若连续场景触发自动 compact,固定摘要以免阻断目标链路。"
  125. },
  126. "maxMatches": 1,
  127. "match": {
  128. "method": "POST",
  129. "pathIncludes": "/messages",
  130. "bodyIncludes": [
  131. "E2E_CLAUDE_CATALOG_GENERAL_PARENT",
  132. "claude-catalog-general-done",
  133. "CRITICAL: Respond with TEXT ONLY",
  134. "\"stream\":true"
  135. ],
  136. "bodyExcludes": ["Generate a concise title", "E2E_CLAUDE_CATALOG_EXPLORE_PARENT"]
  137. },
  138. "response": {
  139. "statusCode": 200,
  140. "text": {
  141. "id": "claude-catalog-auto-compact-response",
  142. "inputTokens": 256,
  143. "outputTokens": 32,
  144. "text": "<summary>The Claude general-purpose E2E scenario completed. Continue with the next request.</summary>"
  145. }
  146. }
  147. },
  148. {
  149. "id": "claude-catalog-explore-parent-tool",
  150. "description": "父 agent 首轮触发 Explore。",
  151. "metadata": {
  152. "kind": "main",
  153. "timingPolicy": "fast-text",
  154. "source": "synthetic",
  155. "syntheticReason": "父请求只需稳定触发 Explore;请求本身由 capture 和 model-io 验证 low。"
  156. },
  157. "maxMatches": 1,
  158. "match": {
  159. "method": "POST",
  160. "pathIncludes": "/messages",
  161. "lastUserMessageIncludes": ["E2E_CLAUDE_CATALOG_EXPLORE_PARENT"],
  162. "bodyIncludes": ["E2E_CLAUDE_CATALOG_EXPLORE_PARENT", "Explore"],
  163. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  164. },
  165. "response": {
  166. "statusCode": 200,
  167. "toolUse": {
  168. "id": "toolu_claude_catalog_explore",
  169. "name": "Agent",
  170. "input": {
  171. "description": "Run the built-in Explore agent",
  172. "prompt": "E2E_CLAUDE_CATALOG_EXPLORE_CHILD: Reply with exactly \"E2E_CLAUDE_CATALOG_EXPLORE_CHILD_OK\" and no other text.",
  173. "subagent_type": "Explore"
  174. }
  175. }
  176. }
  177. },
  178. {
  179. "id": "claude-catalog-explore-child",
  180. "description": "Explore child 固定回复。",
  181. "metadata": {
  182. "kind": "main",
  183. "timingPolicy": "fast-text",
  184. "source": "synthetic",
  185. "syntheticReason": "child 响应只需稳定完成;请求本身验证 xhigh catalog 32000、provider-visible 31999 和 Explore 工具限制。"
  186. },
  187. "maxMatches": 1,
  188. "match": {
  189. "method": "POST",
  190. "pathIncludes": "/messages",
  191. "lastUserMessageIncludes": ["E2E_CLAUDE_CATALOG_EXPLORE_CHILD"],
  192. "bodyIncludes": ["E2E_CLAUDE_CATALOG_EXPLORE_CHILD"],
  193. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  194. },
  195. "response": {
  196. "statusCode": 200,
  197. "statusMessage": "OK",
  198. "text": {
  199. "id": "claude-catalog-explore-child-response",
  200. "inputTokens": 128,
  201. "outputTokens": 16,
  202. "text": "E2E_CLAUDE_CATALOG_EXPLORE_CHILD_OK"
  203. }
  204. }
  205. },
  206. {
  207. "id": "claude-catalog-explore-auto-compact",
  208. "description": "Explore child 后可能触发的自动 compact。",
  209. "metadata": {
  210. "kind": "main",
  211. "timingPolicy": "fast-text",
  212. "source": "synthetic",
  213. "syntheticReason": "若 Explore continuation 前触发自动 compact,固定摘要以保留当前请求。"
  214. },
  215. "maxMatches": 1,
  216. "match": {
  217. "method": "POST",
  218. "pathIncludes": "/messages",
  219. "bodyIncludes": [
  220. "E2E_CLAUDE_CATALOG_EXPLORE_PARENT",
  221. "claude-catalog-explore-done",
  222. "CRITICAL: Respond with TEXT ONLY",
  223. "\"stream\":true"
  224. ],
  225. "bodyExcludes": ["Generate a concise title"]
  226. },
  227. "response": {
  228. "statusCode": 200,
  229. "text": {
  230. "id": "claude-catalog-explore-auto-compact-response",
  231. "inputTokens": 256,
  232. "outputTokens": 32,
  233. "text": "<summary>The Claude Explore E2E request must finish with claude-catalog-explore-done.</summary>"
  234. }
  235. }
  236. },
  237. {
  238. "id": "claude-catalog-explore-parent-final",
  239. "description": "父 agent 消费 Explore child tool_result。",
  240. "metadata": {
  241. "kind": "main",
  242. "timingPolicy": "fast-text",
  243. "source": "synthetic",
  244. "syntheticReason": "证明父会话消费 Explore child tool_result 并回到 idle。"
  245. },
  246. "maxMatches": 1,
  247. "match": {
  248. "method": "POST",
  249. "pathIncludes": "/messages",
  250. "bodyIncludes": [
  251. "E2E_CLAUDE_CATALOG_EXPLORE_PARENT",
  252. "E2E_CLAUDE_CATALOG_EXPLORE_CHILD_OK"
  253. ],
  254. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  255. },
  256. "response": {
  257. "statusCode": 200,
  258. "statusMessage": "OK",
  259. "text": {
  260. "id": "claude-catalog-explore-parent-final-response",
  261. "inputTokens": 160,
  262. "outputTokens": 12,
  263. "text": "claude-catalog-explore-done"
  264. }
  265. }
  266. },
  267. {
  268. "id": "claude-catalog-custom-parent-tool",
  269. "description": "父 agent 首轮触发 custom Claude catalog agent。",
  270. "metadata": {
  271. "kind": "main",
  272. "timingPolicy": "fast-text",
  273. "source": "synthetic",
  274. "syntheticReason": "父请求只需稳定触发已保存的 custom agent。"
  275. },
  276. "maxMatches": 1,
  277. "match": {
  278. "method": "POST",
  279. "pathIncludes": "/messages",
  280. "lastUserMessageIncludes": ["E2E_CLAUDE_CATALOG_CUSTOM_PARENT"],
  281. "bodyIncludes": ["E2E_CLAUDE_CATALOG_CUSTOM_PARENT", "e2e-claude-catalog-reviewer"],
  282. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  283. },
  284. "response": {
  285. "statusCode": 200,
  286. "toolUse": {
  287. "id": "toolu_claude_catalog_custom",
  288. "name": "Agent",
  289. "input": {
  290. "description": "Run the custom Claude catalog reviewer",
  291. "prompt": "E2E_CLAUDE_CATALOG_CUSTOM_CHILD: Reply with exactly \"E2E_CLAUDE_CATALOG_CUSTOM_CHILD_OK\" and no other text.",
  292. "subagent_type": "e2e-claude-catalog-reviewer"
  293. }
  294. }
  295. }
  296. },
  297. {
  298. "id": "claude-catalog-custom-child",
  299. "description": "custom Claude catalog child 固定回复。",
  300. "metadata": {
  301. "kind": "main",
  302. "timingPolicy": "fast-text",
  303. "source": "synthetic",
  304. "syntheticReason": "child 响应只需稳定完成;请求本身验证 medium/8000。"
  305. },
  306. "maxMatches": 1,
  307. "match": {
  308. "method": "POST",
  309. "pathIncludes": "/messages",
  310. "lastUserMessageIncludes": ["E2E_CLAUDE_CATALOG_CUSTOM_CHILD"],
  311. "bodyIncludes": ["E2E_CLAUDE_CATALOG_CUSTOM_CHILD"],
  312. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  313. },
  314. "response": {
  315. "statusCode": 200,
  316. "statusMessage": "OK",
  317. "text": {
  318. "id": "claude-catalog-custom-child-response",
  319. "inputTokens": 128,
  320. "outputTokens": 16,
  321. "text": "E2E_CLAUDE_CATALOG_CUSTOM_CHILD_OK"
  322. }
  323. }
  324. },
  325. {
  326. "id": "claude-catalog-custom-parent-final",
  327. "description": "父 agent 消费 custom child tool_result。",
  328. "metadata": {
  329. "kind": "main",
  330. "timingPolicy": "fast-text",
  331. "source": "synthetic",
  332. "syntheticReason": "证明父会话消费 custom child tool_result 并回到 idle。"
  333. },
  334. "maxMatches": 1,
  335. "match": {
  336. "method": "POST",
  337. "pathIncludes": "/messages",
  338. "bodyIncludes": ["E2E_CLAUDE_CATALOG_CUSTOM_PARENT", "E2E_CLAUDE_CATALOG_CUSTOM_CHILD_OK"],
  339. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  340. },
  341. "response": {
  342. "statusCode": 200,
  343. "statusMessage": "OK",
  344. "text": {
  345. "id": "claude-catalog-custom-parent-final-response",
  346. "inputTokens": 160,
  347. "outputTokens": 12,
  348. "text": "claude-catalog-custom-done"
  349. }
  350. }
  351. }
  352. ]
  353. }