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

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