conversation-session-ssh-remote-new-project-sidebar.json 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-ssh-remote-new-project-sidebar",
  4. "spec": "./test/e2e/conversation-session/remote/navigation/conversation-session-ssh-remote-new-project-sidebar.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "ssh-new-project-existing-title",
  8. "description": "A 项目前置会话标题。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "固定 A 已完成会话的准备响应,使新建 B 不触发草稿项目自动切换;不替换远端会话和项目状态。"
  14. },
  15. "match": {
  16. "method": "POST",
  17. "pathIncludes": "/messages",
  18. "bodyIncludes": ["Generate a concise title", "E2E_SSH_NEW_PROJECT_SIDEBAR_EXISTING"]
  19. },
  20. "response": {
  21. "statusCode": 200,
  22. "headers": {
  23. "content-type": "application/json; charset=utf-8"
  24. },
  25. "body": "{\"id\":\"ssh-new-project-existing-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"SSH existing task\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":8,\"service_tier\":\"standard\"}}"
  26. }
  27. },
  28. {
  29. "id": "ssh-new-project-existing",
  30. "description": "A 项目已完成会话,创建 B 时保持当前会话。",
  31. "metadata": {
  32. "kind": "main",
  33. "timingPolicy": "fast-text",
  34. "source": "synthetic",
  35. "syntheticReason": "固定 A 已完成会话的准备响应,使新建 B 不触发草稿项目自动切换;不替换远端会话和项目状态。"
  36. },
  37. "match": {
  38. "method": "POST",
  39. "pathIncludes": "/messages",
  40. "lastUserMessageIncludes": ["E2E_SSH_NEW_PROJECT_SIDEBAR_EXISTING"],
  41. "bodyExcludes": ["Generate a concise title"]
  42. },
  43. "response": {
  44. "statusCode": 200,
  45. "text": {
  46. "id": "ssh-new-project-existing",
  47. "inputTokens": 64,
  48. "outputTokens": 8,
  49. "text": "SSH_NEW_PROJECT_EXISTING_DONE"
  50. }
  51. }
  52. },
  53. {
  54. "id": "ssh-new-project-title",
  55. "description": "首发标题辅助请求。",
  56. "metadata": {
  57. "kind": "common",
  58. "timingPolicy": "fast-text",
  59. "source": "synthetic",
  60. "syntheticReason": "标题不参与状态语义,仅固定新任务名称。"
  61. },
  62. "match": {
  63. "method": "POST",
  64. "pathIncludes": "/messages",
  65. "bodyIncludes": ["Generate a concise title", "E2E_SSH_NEW_PROJECT_SIDEBAR_WRITE"]
  66. },
  67. "response": {
  68. "statusCode": 200,
  69. "headers": {
  70. "content-type": "application/json; charset=utf-8"
  71. },
  72. "body": "{\"id\":\"ssh-new-project-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"SSH sidebar first task\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":8,\"service_tier\":\"standard\"}}"
  73. }
  74. },
  75. {
  76. "id": "ssh-new-project-write",
  77. "description": "首发真实 Write 工具请求,触发权限审批。",
  78. "metadata": {
  79. "kind": "main",
  80. "timingPolicy": "fast-text",
  81. "source": "synthetic",
  82. "syntheticReason": "固定首发工具请求验证真实远端审批和侧栏订阅,未伪造 runtime 状态。"
  83. },
  84. "match": {
  85. "method": "POST",
  86. "pathIncludes": "/messages",
  87. "lastUserMessageIncludes": ["E2E_SSH_NEW_PROJECT_SIDEBAR_WRITE"],
  88. "bodyExcludes": ["Generate a concise title", "toolu_ssh_new_project_write"]
  89. },
  90. "response": {
  91. "statusCode": 200,
  92. "headers": {
  93. "content-type": "text/event-stream; charset=utf-8"
  94. },
  95. "body": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"ssh-new-project-write\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"fixture\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"output_tokens\":1}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"tool_use\",\"id\":\"toolu_ssh_new_project_write\",\"name\":\"Write\",\"input\":{}}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"input_json_delta\",\"partial_json\":\"{\\\"file_path\\\": \\\".zcode-e2e/ssh-new-project-sidebar/output.txt\\\", \\\"content\\\": \\\"SSH_NEW_PROJECT_FILE\\\\n\\\"}\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"tool_use\",\"stop_sequence\":null},\"usage\":{\"output_tokens\":50}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  96. }
  97. },
  98. {
  99. "id": "ssh-new-project-complete",
  100. "description": "审批后真实工具回灌,切到草稿后才释放完成。",
  101. "metadata": {
  102. "kind": "main",
  103. "timingPolicy": "controlled-stream",
  104. "source": "synthetic",
  105. "syntheticReason": "固定切走先于后台完成的顺序,断言完成事件自动创建未读,不依赖模型时延。"
  106. },
  107. "match": {
  108. "method": "POST",
  109. "pathIncludes": "/messages",
  110. "bodyIncludes": ["E2E_SSH_NEW_PROJECT_SIDEBAR_WRITE", "toolu_ssh_new_project_write"],
  111. "bodyExcludes": [
  112. "Generate a concise title",
  113. "E2E_SSH_NEW_PROJECT_SIDEBAR_FOREGROUND",
  114. "E2E_SSH_NEW_PROJECT_SIDEBAR_NAVIGATION"
  115. ]
  116. },
  117. "response": {
  118. "statusCode": 200,
  119. "headers": {
  120. "content-type": "text/event-stream; charset=utf-8"
  121. },
  122. "chunks": [
  123. {
  124. "offsetMs": 0,
  125. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"ssh-new-project-complete\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"fixture\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"output_tokens\":1}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"SSH_NEW_PROJECT_SIDEBAR_DONE\"}}\n\n"
  126. },
  127. {
  128. "offsetMs": 10,
  129. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"output_tokens\":50}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  130. }
  131. ],
  132. "releaseAfterChunks": 1
  133. }
  134. },
  135. {
  136. "id": "ssh-new-project-foreground",
  137. "description": "同一远程任务前台续发完成,再切新草稿保持已读。",
  138. "metadata": {
  139. "kind": "main",
  140. "timingPolicy": "controlled-stream",
  141. "source": "synthetic",
  142. "syntheticReason": "固定前台完成先于用户切走,真实 SSH 与持久未读链路不替换;Host 读取在途竞态由集成单测控制。"
  143. },
  144. "match": {
  145. "method": "POST",
  146. "pathIncludes": "/messages",
  147. "lastUserMessageIncludes": ["E2E_SSH_NEW_PROJECT_SIDEBAR_FOREGROUND"],
  148. "bodyExcludes": ["Generate a concise title"]
  149. },
  150. "response": {
  151. "statusCode": 200,
  152. "headers": {
  153. "content-type": "text/event-stream; charset=utf-8"
  154. },
  155. "chunks": [
  156. {
  157. "offsetMs": 0,
  158. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"ssh-new-project-foreground\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"fixture\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"output_tokens\":1}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"SSH_NEW_PROJECT_FOREGROUND_DONE\"}}\n\n"
  159. },
  160. {
  161. "offsetMs": 10,
  162. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"output_tokens\":50}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  163. }
  164. ],
  165. "releaseAfterChunks": 1
  166. }
  167. },
  168. {
  169. "id": "ssh-new-project-sibling-title",
  170. "description": "首发标题辅助请求。",
  171. "metadata": {
  172. "kind": "common",
  173. "timingPolicy": "fast-text",
  174. "source": "synthetic",
  175. "syntheticReason": "标题不参与状态语义,仅固定新任务名称。"
  176. },
  177. "match": {
  178. "method": "POST",
  179. "pathIncludes": "/messages",
  180. "bodyIncludes": ["Generate a concise title", "E2E_SSH_NEW_PROJECT_SIDEBAR_SIBLING"]
  181. },
  182. "response": {
  183. "statusCode": 200,
  184. "headers": {
  185. "content-type": "application/json; charset=utf-8"
  186. },
  187. "body": "{\"id\":\"ssh-new-project-sibling-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"SSH sidebar sibling task\\\"}\"}],\"stop_reason\":\"end_turn\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":64,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":8,\"service_tier\":\"standard\"}}"
  188. }
  189. },
  190. {
  191. "id": "ssh-new-project-sibling",
  192. "description": "创建同一工作区的 T2,作为跨工作区点击目标。",
  193. "metadata": {
  194. "kind": "main",
  195. "timingPolicy": "fast-text",
  196. "source": "synthetic",
  197. "syntheticReason": "固定 T2 内容作为导航可见性断言,不参与后台完成时序。"
  198. },
  199. "match": {
  200. "method": "POST",
  201. "pathIncludes": "/messages",
  202. "lastUserMessageIncludes": ["E2E_SSH_NEW_PROJECT_SIDEBAR_SIBLING"],
  203. "bodyExcludes": ["Generate a concise title"]
  204. },
  205. "response": {
  206. "statusCode": 200,
  207. "text": {
  208. "id": "ssh-new-project-sibling",
  209. "inputTokens": 64,
  210. "outputTokens": 8,
  211. "text": "SSH_NEW_PROJECT_SIBLING_DONE"
  212. }
  213. }
  214. },
  215. {
  216. "id": "ssh-new-project-navigation",
  217. "description": "T1 后台完成时暂挂未读命令,跨工作区选择 B/T2 后释放。",
  218. "metadata": {
  219. "kind": "main",
  220. "timingPolicy": "controlled-stream",
  221. "source": "synthetic",
  222. "syntheticReason": "固定后台完成先于跨工作区任务点击;只控制 provider 终态与未读命令发送顺序,使用真实 SSH、Host 和 SQLite。"
  223. },
  224. "match": {
  225. "method": "POST",
  226. "pathIncludes": "/messages",
  227. "lastUserMessageIncludes": ["E2E_SSH_NEW_PROJECT_SIDEBAR_NAVIGATION"],
  228. "bodyExcludes": ["Generate a concise title"]
  229. },
  230. "response": {
  231. "statusCode": 200,
  232. "headers": {
  233. "content-type": "text/event-stream; charset=utf-8"
  234. },
  235. "chunks": [
  236. {
  237. "offsetMs": 0,
  238. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"ssh-new-project-navigation\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"fixture\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"output_tokens\":1}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"SSH_NEW_PROJECT_NAVIGATION_DONE\"}}\n\n"
  239. },
  240. {
  241. "offsetMs": 10,
  242. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"output_tokens\":50}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  243. }
  244. ],
  245. "releaseAfterChunks": 1
  246. }
  247. }
  248. ]
  249. }