{ "version": 1, "caseName": "conversation-session-preinstalled-tools-startup", "spec": "./test/e2e/conversation-session/conversation-session-preinstalled-tools-startup.test.ts", "fixtures": [ { "id": "lop-startup-title", "description": "固定标题", "metadata": { "kind": "common", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "标题不属于环境变量行为,固定返回。" }, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["Generate a concise title", "E2E_LOP_STARTUP"] }, "response": { "statusCode": 200, "text": { "id": "lop-startup-title", "text": "{\"title\":\"Preinstalled tools\"}", "inputTokens": 100, "outputTokens": 10 } } }, { "id": "lop-startup-continue-call", "description": "continue 读取环境与记录", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "固定触发真实 Bash 环境读取;不依赖模型选择命令。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["E2E_LOP_STARTUP_CONTINUE"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "toolUse": { "id": "toolu_lop_startup_continue", "name": "Bash", "input": { "command": "node -e \"const fs=require('node:fs/promises');const path=require('node:path');const p=path.join(process.env.PATH.split(path.delimiter)[0],'zcode-soffice'+(process.platform==='win32'?'.shim':''));fs.readFile(p,'utf8').then(content=>console.log(JSON.stringify({entryPath:p,available:process.env.ZCODE_PREINSTALLED_TOOLS_AVAILABLE,exists:true,content})),()=>console.log(JSON.stringify({entryPath:p,available:process.env.ZCODE_PREINSTALLED_TOOLS_AVAILABLE,exists:false})))\"", "description": "Read the fixed preinstalled entry and availability" } } } }, { "id": "lop-startup-continue-done", "description": "continue 返回完成", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "固定触发真实 Bash 环境读取;不依赖模型选择命令。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["E2E_LOP_STARTUP_CONTINUE", "toolu_lop_startup_continue"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": { "id": "lop-startup-continue-done", "text": "E2E_LOP_STARTUP_CONTINUE_DONE", "inputTokens": 100, "outputTokens": 10 } } }, { "id": "lop-startup-before-call", "description": "before 读取环境与记录", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "固定触发真实 Bash 环境读取;不依赖模型选择命令。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["E2E_LOP_STARTUP_BEFORE"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "toolUse": { "id": "toolu_lop_startup_before", "name": "Bash", "input": { "command": "node -e \"const fs=require('node:fs/promises');const path=require('node:path');const p=path.join(process.env.PATH.split(path.delimiter)[0],'zcode-soffice'+(process.platform==='win32'?'.shim':''));fs.readFile(p,'utf8').then(content=>console.log(JSON.stringify({entryPath:p,available:process.env.ZCODE_PREINSTALLED_TOOLS_AVAILABLE,exists:true,content})),()=>console.log(JSON.stringify({entryPath:p,available:process.env.ZCODE_PREINSTALLED_TOOLS_AVAILABLE,exists:false})))\"", "description": "Read the fixed preinstalled entry and availability" } } } }, { "id": "lop-startup-before-done", "description": "before 返回完成", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "固定触发真实 Bash 环境读取;不依赖模型选择命令。" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["E2E_LOP_STARTUP_BEFORE", "toolu_lop_startup_before"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": { "id": "lop-startup-before-done", "text": "E2E_LOP_STARTUP_BEFORE_DONE", "inputTokens": 100, "outputTokens": 10 } } } ] }