| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- {
- "version": 1,
- "caseName": "conversation-session-composer-recent-mode",
- "spec": "./test/e2e/conversation-session/composer/conversation-session-composer-recent-mode.test.ts",
- "fixtures": [
- {
- "id": "recent-mode-title",
- "description": "I74: 新任务继承最近提交权限的受控响应。",
- "metadata": {
- "kind": "common",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "隔离模型输出,验证真实 Composer 提交、新任务初始化及 Write 权限行为。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["Generate a concise title", "E2E_COMPOSER_RECENT_MODE"]
- },
- "response": {
- "statusCode": 200,
- "headers": {
- "content-type": "application/json; charset=utf-8"
- },
- "body": "{\"id\":\"recent-mode-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Recent permission E2E\\\"}\"}],\"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": "recent-mode-compact",
- "description": "切换模型后压缩现有历史的受控响应。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "实际切模型会触发压缩;保留 Write 历史供后续提交继续,避免缺少压缩 fixture 造成 500 重试。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_COMPOSER_RECENT_MODE_WRITE", "CRITICAL: Respond with TEXT ONLY"],
- "bodyExcludes": ["Generate a concise title"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "recent-mode-compact",
- "text": "<summary>The user requested E2E_COMPOSER_RECENT_MODE_WRITE. The Write tool completed successfully and the assistant replied RECENT_MODE_DONE.</summary>",
- "inputTokens": 80,
- "outputTokens": 40
- }
- }
- },
- {
- "id": "recent-mode-seed",
- "description": "I74: 新任务继承最近提交权限的受控响应。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "controlled-stream",
- "source": "synthetic",
- "syntheticReason": "隔离模型输出,验证真实 Composer 提交、新任务初始化及 Write 权限行为。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_COMPOSER_RECENT_MODE_SEED"],
- "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\":\"recent-mode-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\":\"RECENT_MODE_STREAMING \"}}\n\n"
- },
- {
- "offsetMs": 45000,
- "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
- },
- {
- "offsetMs": 45100,
- "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": 45200,
- "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
- }
- ],
- "text": {
- "id": "recent-mode-slow",
- "inputTokens": 80,
- "outputTokens": 4,
- "text": "RECENT_MODE_STREAMING"
- }
- }
- },
- {
- "id": "recent-mode-second",
- "description": "TD02 第二次切模型和权限后发送。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "固定输出验证第二次实际提交更新 Recent 后,空白页不覆盖模型与权限。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_COMPOSER_RECENT_MODE_SECOND"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "recent-mode-second",
- "text": "RECENT_MODE_SECOND_DONE",
- "inputTokens": 80,
- "outputTokens": 8
- }
- }
- },
- {
- "id": "recent-mode-write",
- "description": "I74: 新任务继承最近提交权限的受控响应。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "隔离模型输出,验证真实 Composer 提交、新任务初始化及 Write 权限行为。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_COMPOSER_RECENT_MODE_WRITE"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_recent_mode_write"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_recent_mode_write",
- "name": "Write",
- "input": {
- "file_path": "{{e2eRuntimeRoot}}/conversation-session-composer-recent-mode/result.txt",
- "content": "RECENT_MODE_WRITE_OK\n"
- }
- }
- }
- },
- {
- "id": "recent-mode-final",
- "description": "I74: Write 工具结果后回复;最后一条 user 已是工具结果,按完整历史中的提示词和工具 ID 匹配。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "隔离模型输出,验证真实 Composer 提交、新任务初始化及 Write 权限行为。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["E2E_COMPOSER_RECENT_MODE_WRITE", "toolu_recent_mode_write"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "recent-mode-final",
- "text": "RECENT_MODE_DONE",
- "inputTokens": 80,
- "outputTokens": 8
- }
- }
- }
- ]
- }
|