conversation-session-remote-data-sync-builtin-subagent-runtime.json 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-remote-data-sync-builtin-subagent-runtime",
  4. "spec": "./test/e2e/conversation-session/remote/data-sync/conversation-session-remote-data-sync-builtin-subagent-runtime.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "dsync-09-title",
  8. "description": "标题生成请求",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "推送内置子智能体模型覆盖后的运行时验证,只需要可区分的标记文本与 Agent 工具调用"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/chat/completions",
  18. "bodyIncludes": ["Generate a concise title", "E2E_DSYNC_09_BUILTIN_RUNTIME"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "headers": {
  23. "content-type": "text/event-stream; charset=utf-8"
  24. },
  25. "body": "data: {\"id\": \"t\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {\"content\": \"{\\\"title\\\":\\\"DSYNC 09\\\"}\"}, \"finish_reason\": null}]}\n\ndata: {\"id\": \"t\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": {\"prompt_tokens\": 64, \"completion_tokens\": 8, \"total_tokens\": 72}}\n\ndata: [DONE]\n\n"
  26. },
  27. "maxMatches": 6
  28. },
  29. {
  30. "id": "dsync-09-child-before",
  31. "description": "BEFORE 轮 Explore 子请求",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "fast-text",
  35. "source": "synthetic",
  36. "syntheticReason": "推送内置子智能体模型覆盖后的运行时验证,只需要可区分的标记文本与 Agent 工具调用"
  37. },
  38. "match": {
  39. "method": "POST",
  40. "pathIncludes": "/chat/completions",
  41. "lastUserMessageIncludes": ["E2E_EXPLORE_PROBE_BEFORE"],
  42. "bodyExcludes": ["Generate a concise title"]
  43. },
  44. "response": {
  45. "statusCode": 200,
  46. "headers": {
  47. "content-type": "text/event-stream; charset=utf-8"
  48. },
  49. "body": "data: {\"id\": \"cBEFORE\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {\"content\": \"E2E_EXPLORE_DONE_BEFORE\"}, \"finish_reason\": null}]}\n\ndata: {\"id\": \"cBEFORE\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": {\"prompt_tokens\": 64, \"completion_tokens\": 8, \"total_tokens\": 72}}\n\ndata: [DONE]\n\n"
  50. }
  51. },
  52. {
  53. "id": "dsync-09-child-after",
  54. "description": "AFTER 轮 Explore 子请求",
  55. "metadata": {
  56. "kind": "main",
  57. "timingPolicy": "fast-text",
  58. "source": "synthetic",
  59. "syntheticReason": "推送内置子智能体模型覆盖后的运行时验证,只需要可区分的标记文本与 Agent 工具调用"
  60. },
  61. "match": {
  62. "method": "POST",
  63. "pathIncludes": "/chat/completions",
  64. "lastUserMessageIncludes": ["E2E_EXPLORE_PROBE_AFTER"],
  65. "bodyExcludes": ["Generate a concise title"]
  66. },
  67. "response": {
  68. "statusCode": 200,
  69. "headers": {
  70. "content-type": "text/event-stream; charset=utf-8"
  71. },
  72. "body": "data: {\"id\": \"cAFTER\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {\"content\": \"E2E_EXPLORE_DONE_AFTER\"}, \"finish_reason\": null}]}\n\ndata: {\"id\": \"cAFTER\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": {\"prompt_tokens\": 64, \"completion_tokens\": 8, \"total_tokens\": 72}}\n\ndata: [DONE]\n\n"
  73. }
  74. },
  75. {
  76. "id": "dsync-09-final-before",
  77. "description": "BEFORE 轮 Explore 返回后的最终回复",
  78. "metadata": {
  79. "kind": "main",
  80. "timingPolicy": "fast-text",
  81. "source": "synthetic",
  82. "syntheticReason": "推送内置子智能体模型覆盖后的运行时验证,只需要可区分的标记文本与 Agent 工具调用"
  83. },
  84. "match": {
  85. "method": "POST",
  86. "pathIncludes": "/chat/completions",
  87. "bodyIncludes": ["E2E_DSYNC_09_BUILTIN_RUNTIME", "call_dsync_09_before"],
  88. "bodyExcludes": ["Generate a concise title", "E2E_DSYNC_09_BUILTIN_RUNTIME_RUN_AFTER"]
  89. },
  90. "response": {
  91. "statusCode": 200,
  92. "headers": {
  93. "content-type": "text/event-stream; charset=utf-8"
  94. },
  95. "body": "data: {\"id\": \"fBEFORE\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {\"content\": \"DSYNC_09_RUN_BEFORE_DONE\"}, \"finish_reason\": null}]}\n\ndata: {\"id\": \"fBEFORE\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": {\"prompt_tokens\": 64, \"completion_tokens\": 8, \"total_tokens\": 72}}\n\ndata: [DONE]\n\n"
  96. }
  97. },
  98. {
  99. "id": "dsync-09-final-after",
  100. "description": "AFTER 轮 Explore 返回后的最终回复",
  101. "metadata": {
  102. "kind": "main",
  103. "timingPolicy": "fast-text",
  104. "source": "synthetic",
  105. "syntheticReason": "推送内置子智能体模型覆盖后的运行时验证,只需要可区分的标记文本与 Agent 工具调用"
  106. },
  107. "match": {
  108. "method": "POST",
  109. "pathIncludes": "/chat/completions",
  110. "bodyIncludes": ["E2E_DSYNC_09_BUILTIN_RUNTIME", "call_dsync_09_after"],
  111. "bodyExcludes": ["Generate a concise title"]
  112. },
  113. "response": {
  114. "statusCode": 200,
  115. "headers": {
  116. "content-type": "text/event-stream; charset=utf-8"
  117. },
  118. "body": "data: {\"id\": \"fAFTER\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {\"content\": \"DSYNC_09_RUN_AFTER_DONE\"}, \"finish_reason\": null}]}\n\ndata: {\"id\": \"fAFTER\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": {\"prompt_tokens\": 64, \"completion_tokens\": 8, \"total_tokens\": 72}}\n\ndata: [DONE]\n\n"
  119. }
  120. },
  121. {
  122. "id": "dsync-09-call-before",
  123. "description": "BEFORE 轮调用 Explore",
  124. "metadata": {
  125. "kind": "main",
  126. "timingPolicy": "fast-text",
  127. "source": "synthetic",
  128. "syntheticReason": "推送内置子智能体模型覆盖后的运行时验证,只需要可区分的标记文本与 Agent 工具调用"
  129. },
  130. "match": {
  131. "method": "POST",
  132. "pathIncludes": "/chat/completions",
  133. "lastUserMessageIncludes": ["E2E_DSYNC_09_BUILTIN_RUNTIME_RUN_BEFORE"],
  134. "bodyExcludes": ["Generate a concise title", "call_dsync_09_before"]
  135. },
  136. "response": {
  137. "statusCode": 200,
  138. "headers": {
  139. "content-type": "text/event-stream; charset=utf-8"
  140. },
  141. "body": "data: {\"id\": \"kBEFORE\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}]}\n\ndata: {\"id\": \"kBEFORE\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"id\": \"call_dsync_09_before\", \"type\": \"function\", \"function\": {\"name\": \"Agent\", \"arguments\": \"{\\\"description\\\": \\\"explore probe\\\", \\\"prompt\\\": \\\"E2E_EXPLORE_PROBE_BEFORE: 只回复 E2E_EXPLORE_DONE_BEFORE\\\", \\\"subagent_type\\\": \\\"Explore\\\"}\"}}]}, \"finish_reason\": null}]}\n\ndata: {\"id\": \"kBEFORE\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": {\"prompt_tokens\": 64, \"completion_tokens\": 8, \"total_tokens\": 72}}\n\ndata: [DONE]\n\n"
  142. }
  143. },
  144. {
  145. "id": "dsync-09-call-after",
  146. "description": "AFTER 轮调用 Explore",
  147. "metadata": {
  148. "kind": "main",
  149. "timingPolicy": "fast-text",
  150. "source": "synthetic",
  151. "syntheticReason": "推送内置子智能体模型覆盖后的运行时验证,只需要可区分的标记文本与 Agent 工具调用"
  152. },
  153. "match": {
  154. "method": "POST",
  155. "pathIncludes": "/chat/completions",
  156. "lastUserMessageIncludes": ["E2E_DSYNC_09_BUILTIN_RUNTIME_RUN_AFTER"],
  157. "bodyExcludes": ["Generate a concise title", "call_dsync_09_after"]
  158. },
  159. "response": {
  160. "statusCode": 200,
  161. "headers": {
  162. "content-type": "text/event-stream; charset=utf-8"
  163. },
  164. "body": "data: {\"id\": \"kAFTER\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {\"role\": \"assistant\"}, \"finish_reason\": null}]}\n\ndata: {\"id\": \"kAFTER\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {\"tool_calls\": [{\"index\": 0, \"id\": \"call_dsync_09_after\", \"type\": \"function\", \"function\": {\"name\": \"Agent\", \"arguments\": \"{\\\"description\\\": \\\"explore probe\\\", \\\"prompt\\\": \\\"E2E_EXPLORE_PROBE_AFTER: 只回复 E2E_EXPLORE_DONE_AFTER\\\", \\\"subagent_type\\\": \\\"Explore\\\"}\"}}]}, \"finish_reason\": null}]}\n\ndata: {\"id\": \"kAFTER\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"tool_calls\"}], \"usage\": {\"prompt_tokens\": 64, \"completion_tokens\": 8, \"total_tokens\": 72}}\n\ndata: [DONE]\n\n"
  165. }
  166. },
  167. {
  168. "id": "dsync-09-first-turn",
  169. "description": "task A 首轮",
  170. "metadata": {
  171. "kind": "main",
  172. "timingPolicy": "fast-text",
  173. "source": "synthetic",
  174. "syntheticReason": "推送内置子智能体模型覆盖后的运行时验证,只需要可区分的标记文本与 Agent 工具调用"
  175. },
  176. "match": {
  177. "method": "POST",
  178. "pathIncludes": "/chat/completions",
  179. "lastUserMessageIncludes": ["E2E_DSYNC_09_BUILTIN_RUNTIME_A_FIRST_PROMPT"],
  180. "bodyExcludes": ["Generate a concise title"]
  181. },
  182. "response": {
  183. "statusCode": 200,
  184. "headers": {
  185. "content-type": "text/event-stream; charset=utf-8"
  186. },
  187. "body": "data: {\"id\": \"first\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {\"content\": \"DSYNC_09_BUILTIN_RUNTIME_REPLY\"}, \"finish_reason\": null}]}\n\ndata: {\"id\": \"first\", \"object\": \"chat.completion.chunk\", \"created\": 0, \"model\": \"e2e-ssh-remote-lifecycle-model\", \"choices\": [{\"index\": 0, \"delta\": {}, \"finish_reason\": \"stop\"}], \"usage\": {\"prompt_tokens\": 64, \"completion_tokens\": 8, \"total_tokens\": 72}}\n\ndata: [DONE]\n\n"
  188. }
  189. }
  190. ]
  191. }