| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- {
- "version": 1,
- "caseName": "conversation-session-tool-history-order",
- "spec": "./test/e2e/conversation-session/tools/conversation-session-tool-history-order.test.ts",
- "fixtures": [
- {
- "id": "d19-title",
- "description": "D19 工具历史顺序:d19-title。",
- "metadata": {
- "kind": "common",
- "source": "synthetic",
- "timingPolicy": "fast-text",
- "syntheticReason": "固定 Bash→Read 声明,比较 live 与 latest-user edit 后的 provider tool_use/tool_result 顺序和内容。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["Generate a concise title", "E2E_TOOL_ORDER_SOURCE"]
- },
- "response": {
- "statusCode": 200,
- "headers": {
- "content-type": "application/json; charset=utf-8"
- },
- "body": "{\"id\":\"d19-title\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[{\"type\":\"text\",\"text\":\"{\\\"title\\\":\\\"Tool history order\\\"}\"}],\"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": "d19-tools",
- "description": "D19 工具历史顺序:d19-tools。",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "tool-use",
- "syntheticReason": "固定 Bash→Read 声明,比较 live 与 latest-user edit 后的 provider tool_use/tool_result 顺序和内容。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_TOOL_ORDER_SOURCE"],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "toolu_d19_bash"
- ]
- },
- "response": {
- "statusCode": 200,
- "toolUses": [
- {
- "id": "toolu_d19_bash",
- "name": "Bash",
- "input": {
- "command": "node -e \"console.log(12345)\""
- }
- },
- {
- "id": "toolu_d19_read",
- "name": "Read",
- "input": {
- "file_path": "{{e2eRuntimeRoot}}/conversation-session-tool-history-order/read.txt"
- }
- }
- ]
- }
- },
- {
- "id": "d19-followup",
- "description": "D19 工具历史顺序:d19-followup。",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "fast-text",
- "syntheticReason": "固定 Bash→Read 声明,比较 live 与 latest-user edit 后的 provider tool_use/tool_result 顺序和内容。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": [
- "E2E_TOOL_ORDER_SOURCE",
- "tool_result",
- "toolu_d19_bash",
- "toolu_d19_read"
- ],
- "bodyExcludes": [
- "Generate a concise title",
- "CRITICAL: Respond with TEXT ONLY",
- "E2E_TOOL_ORDER_LATER",
- "E2E_TOOL_ORDER_EDITED"
- ]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "d19-followup",
- "inputTokens": 64,
- "outputTokens": 8,
- "text": "D19_SOURCE_DONE"
- }
- }
- },
- {
- "id": "d19-later",
- "description": "D19 工具历史顺序:d19-later。",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "fast-text",
- "syntheticReason": "固定 Bash→Read 声明,比较 live 与 latest-user edit 后的 provider tool_use/tool_result 顺序和内容。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_TOOL_ORDER_LATER"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "d19-later",
- "inputTokens": 64,
- "outputTokens": 8,
- "text": "D19_LATER_DONE"
- }
- }
- },
- {
- "id": "d19-edited",
- "description": "D19 工具历史顺序:d19-edited。",
- "metadata": {
- "kind": "main",
- "source": "synthetic",
- "timingPolicy": "fast-text",
- "syntheticReason": "固定 Bash→Read 声明,比较 live 与 latest-user edit 后的 provider tool_use/tool_result 顺序和内容。"
- },
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_TOOL_ORDER_EDITED"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "d19-edited",
- "inputTokens": 64,
- "outputTokens": 8,
- "text": "D19_EDITED_DONE"
- }
- }
- }
- ]
- }
|