conversation-session-ssh-remote-app-exit-running.json 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-ssh-remote-app-exit-running",
  4. "spec": "./test/e2e/conversation-session/remote/connection/conversation-session-ssh-remote-app-exit-running.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "ssh-exit-title",
  8. "description": "标题辅助响应",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "独立回放服务在 Desktop 全部退出后释放响应,验证远端运行与历史接续。"
  14. },
  15. "maxMatches": 8,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": ["Generate a concise title", "E2E_SSH_APP_EXIT_RUNNING"]
  20. },
  21. "response": {
  22. "statusCode": 200,
  23. "headers": {
  24. "content-type": "application/json; charset=utf-8"
  25. },
  26. "body": "{\"id\":\"r3-update-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"R3 task control\\\"}\"}],\"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\"}}"
  27. }
  28. },
  29. {
  30. "id": "ssh-exit-slow",
  31. "description": "保持远端任务运行直到更新守卫出现且用户取消;明确释放后才允许普通更新",
  32. "metadata": {
  33. "kind": "main",
  34. "timingPolicy": "controlled-stream",
  35. "source": "synthetic",
  36. "syntheticReason": "独立回放服务在 Desktop 全部退出后释放响应,验证远端运行与历史接续。"
  37. },
  38. "maxMatches": 4,
  39. "match": {
  40. "method": "POST",
  41. "pathIncludes": "/messages",
  42. "lastUserMessageIncludes": ["E2E_SSH_APP_EXIT_RUNNING_SLOW"],
  43. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  44. },
  45. "response": {
  46. "statusCode": 200,
  47. "statusMessage": "OK",
  48. "headers": {
  49. "cache-control": "no-cache",
  50. "content-type": "text/event-stream; charset=utf-8"
  51. },
  52. "chunks": [
  53. {
  54. "offsetMs": 0,
  55. "text": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"r3-update-slow\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":80,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
  56. },
  57. {
  58. "offsetMs": 250,
  59. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  60. },
  61. {
  62. "offsetMs": 500,
  63. "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"SSH_EXIT_STREAMING \"}}\n\n"
  64. },
  65. {
  66. "offsetMs": 1000,
  67. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  68. },
  69. {
  70. "offsetMs": 1100,
  71. "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":80,\"output_tokens\":4,\"service_tier\":\"standard\"}}\n\n"
  72. },
  73. {
  74. "offsetMs": 1200,
  75. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  76. }
  77. ],
  78. "text": {
  79. "id": "v4-queue-slow",
  80. "inputTokens": 80,
  81. "outputTokens": 4,
  82. "text": "V4_QUEUE_STREAMING"
  83. },
  84. "releaseAfterChunks": 3
  85. }
  86. },
  87. {
  88. "id": "ssh-exit-main-fallback",
  89. "description": "其它本 case 请求(续发历史可含 SLOW/Q/PERMISSION,只按最后一条用户消息排除)",
  90. "metadata": {
  91. "kind": "main",
  92. "timingPolicy": "fast-text",
  93. "source": "synthetic",
  94. "syntheticReason": "固定回复准备真实远端历史并验证退出后的续聊。"
  95. },
  96. "maxMatches": 10,
  97. "match": {
  98. "method": "POST",
  99. "pathIncludes": "/messages",
  100. "bodyIncludes": ["E2E_SSH_APP_EXIT_RUNNING_"],
  101. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"],
  102. "lastUserMessageExcludes": [
  103. "E2E_SSH_APP_EXIT_RUNNING_SLOW",
  104. "E2E_SSH_APP_EXIT_RUNNING_Q",
  105. "E2E_SSH_APP_EXIT_RUNNING_PERMISSION"
  106. ]
  107. },
  108. "response": {
  109. "statusCode": 200,
  110. "text": {
  111. "id": "ssh-exit-main",
  112. "inputTokens": 64,
  113. "outputTokens": 8,
  114. "text": "SSH_APP_EXIT_RUNNING_REPLY"
  115. }
  116. }
  117. }
  118. ]
  119. }