{ "version": 1, "caseName": "conversation-session-ssh-remote-app-exit-running", "spec": "./test/e2e/conversation-session/remote/connection/conversation-session-ssh-remote-app-exit-running.test.ts", "fixtures": [ { "id": "ssh-exit-title", "description": "标题辅助响应", "metadata": { "kind": "common", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "独立回放服务在 Desktop 全部退出后释放响应,验证远端运行与历史接续。" }, "maxMatches": 8, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["Generate a concise title", "E2E_SSH_APP_EXIT_RUNNING"] }, "response": { "statusCode": 200, "headers": { "content-type": "application/json; charset=utf-8" }, "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\"}}" } }, { "id": "ssh-exit-slow", "description": "保持远端任务运行直到更新守卫出现且用户取消;明确释放后才允许普通更新", "metadata": { "kind": "main", "timingPolicy": "controlled-stream", "source": "synthetic", "syntheticReason": "独立回放服务在 Desktop 全部退出后释放响应,验证远端运行与历史接续。" }, "maxMatches": 4, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_SSH_APP_EXIT_RUNNING_SLOW"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "statusMessage": "OK", "headers": { "cache-control": "no-cache", "content-type": "text/event-stream; charset=utf-8" }, "chunks": [ { "offsetMs": 0, "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" }, { "offsetMs": 250, "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n" }, { "offsetMs": 500, "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"SSH_EXIT_STREAMING \"}}\n\n" }, { "offsetMs": 1000, "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n" }, { "offsetMs": 1100, "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" }, { "offsetMs": 1200, "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n" } ], "text": { "id": "v4-queue-slow", "inputTokens": 80, "outputTokens": 4, "text": "V4_QUEUE_STREAMING" }, "releaseAfterChunks": 3 } }, { "id": "ssh-exit-main-fallback", "description": "其它本 case 请求(续发历史可含 SLOW/Q/PERMISSION,只按最后一条用户消息排除)", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "固定回复准备真实远端历史并验证退出后的续聊。" }, "maxMatches": 10, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["E2E_SSH_APP_EXIT_RUNNING_"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"], "lastUserMessageExcludes": [ "E2E_SSH_APP_EXIT_RUNNING_SLOW", "E2E_SSH_APP_EXIT_RUNNING_Q", "E2E_SSH_APP_EXIT_RUNNING_PERMISSION" ] }, "response": { "statusCode": 200, "text": { "id": "ssh-exit-main", "inputTokens": 64, "outputTokens": 8, "text": "SSH_APP_EXIT_RUNNING_REPLY" } } } ] }