| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616 |
- {
- "version": 1,
- "caseName": "conversation-session-assistant-preview-cards",
- "spec": "./test/e2e/conversation-session/presentation/conversation-session-assistant-preview-cards.test.ts",
- "fixtures": [
- {
- "id": "assistant-preview-cards-title",
- "description": "Assistant Preview Cards 各独立 task 的标题 sidecar 固定响应。",
- "metadata": {
- "kind": "common",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "标题不属于预览卡片产品语义,只需避免 sidecar 请求误命中业务 fixture。"
- },
- "maxMatches": 20,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": ["Generate a concise title", "E2E_ASSISTANT_PREVIEW_CARDS"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "assistant-preview-cards-title",
- "inputTokens": 64,
- "outputTokens": 8,
- "text": "{\"title\":\"Assistant Preview Cards E2E\"}"
- }
- }
- },
- {
- "id": "assistant-preview-cards-local-url",
- "description": "APC01/APC04 输出两次同一本地 URL,验证完成态去重和 Browser 打开。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "固定 assistant 文本中的动态随机端口 URL,稳定验证卡片投影和 Browser side pane。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": [
- "E2E_ASSISTANT_PREVIEW_CARDS_LOCAL_URL",
- "E2E_BROWSER_FIXTURE_URL:"
- ],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "assistant-preview-cards-local-url",
- "inputTokens": 96,
- "outputTokens": 20,
- "text": "[APC Local Preview]({{browserFixtureUrl}})\n再次打开 {{browserFixtureUrl}}。\nE2E_ASSISTANT_PREVIEW_CARDS_LOCAL_URL_DONE"
- }
- }
- },
- {
- "id": "assistant-preview-cards-interrupted",
- "description": "APC02 在首段 URL 到达后保持流打开,供 spec 点击 Stop。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "controlled-stream",
- "source": "synthetic",
- "syntheticReason": "interrupted 卡片必须在可重复的半流窗口中触发 Stop,普通 fast-text 无法提供该边界。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_INTERRUPTED"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "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\":\"assistant-preview-cards-interrupted\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":96,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
- },
- {
- "offsetMs": 100,
- "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
- },
- {
- "offsetMs": 200,
- "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_ASSISTANT_PREVIEW_CARDS_INTERRUPTED_EARLY http://localhost:41789/assistant-preview-stream\"}}\n\n"
- },
- {
- "offsetMs": 20000,
- "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" E2E_ASSISTANT_PREVIEW_CARDS_INTERRUPTED_LATE\"}}\n\n"
- },
- {
- "offsetMs": 20100,
- "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
- },
- {
- "offsetMs": 20200,
- "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":96,\"output_tokens\":20,\"service_tier\":\"standard\"}}\n\n"
- },
- {
- "offsetMs": 20300,
- "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
- }
- ]
- }
- },
- {
- "id": "assistant-preview-cards-streaming",
- "description": "APC03 先输出 URL,再延迟正常完成。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "controlled-stream",
- "source": "synthetic",
- "syntheticReason": "需要在 assistant text 已可见但 row 尚未 terminal 时断言没有卡片。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_STREAMING"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "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\":\"assistant-preview-cards-streaming\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"deepseek-v4-flash\",\"content\":[],\"stop_reason\":null,\"stop_sequence\":null,\"usage\":{\"input_tokens\":96,\"cache_creation_input_tokens\":0,\"cache_read_input_tokens\":0,\"output_tokens\":0,\"service_tier\":\"standard\"}}}\n\n"
- },
- {
- "offsetMs": 100,
- "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
- },
- {
- "offsetMs": 200,
- "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"E2E_ASSISTANT_PREVIEW_CARDS_STREAMING_EARLY http://localhost:41789/assistant-preview-stream\"}}\n\n"
- },
- {
- "offsetMs": 5000,
- "text": "event: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\" E2E_ASSISTANT_PREVIEW_CARDS_STREAMING_DONE\"}}\n\n"
- },
- {
- "offsetMs": 5100,
- "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
- },
- {
- "offsetMs": 5200,
- "text": "event: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"input_tokens\":96,\"output_tokens\":20,\"service_tier\":\"standard\"}}\n\n"
- },
- {
- "offsetMs": 5300,
- "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
- }
- ]
- }
- },
- {
- "id": "assistant-preview-cards-suppression-write",
- "description": "APC04 真实 Write HTML,确保 localhost 全局抑制不是因为缺少 fileChanges。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "固定 Write 工具选择以建立本轮 active HTML fileChanges。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SUPPRESSES_HTML"],
- "bodyExcludes": ["Generate a concise title", "toolu_apc_suppression_write"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_apc_suppression_write",
- "name": "Write",
- "input": {
- "file_path": "assistant-preview-e2e/本轮 输出/index 页面.html",
- "content": "<!doctype html><html><body>APC04_HTML_PAGE</body></html>"
- }
- }
- }
- },
- {
- "id": "assistant-preview-cards-suppression-final",
- "description": "APC04 同轮输出 localhost 和已 Write 的 HTML。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "固定现有业务语义:任一本地 HTTP URL 都抑制同轮全部 HTML 卡片。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": [
- "E2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SUPPRESSES_HTML",
- "toolu_apc_suppression_write"
- ],
- "bodyExcludes": ["Generate a concise title"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "assistant-preview-cards-suppression-final",
- "inputTokens": 120,
- "outputTokens": 24,
- "text": "[APC Local Only]({{browserFixtureUrl}})\n再次访问 {{browserFixtureUrl}}。\n已生成 assistant-preview-e2e/本轮 输出/index 页面.html。\nE2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SUPPRESSES_HTML_DONE"
- }
- }
- },
- {
- "id": "assistant-preview-cards-office-pptx",
- "description": "APC06/APC07 与 APC14 分别输出预置 stale source、Office/PDF 及一个缺失 PDF;本轮包含 PPTX 自动打开。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "delayed-text",
- "source": "synthetic",
- "syntheticReason": "稳定给出 Unicode/空格文件引用和出现顺序,文件存在性与 renderer 仍走真实产品链路。延迟回复让 renderer 观察到 running 阶段:PPTX 自动打开只在本 renderer 观察到 running 边沿后才武装,整轮几十毫秒结束时 running 与 completedSuccess 会合并到同一次渲染而漏掉边沿。"
- },
- "maxMatches": 2,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_OFFICE_PPTX"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "delayMs": 2000,
- "text": {
- "id": "assistant-preview-cards-office-pptx",
- "inputTokens": 128,
- "outputTokens": 48,
- "text": "assistant-preview-e2e/stale/旧 页面.html\nassistant-preview-e2e/stale/旧 说明.md\nassistant-preview-e2e/office/项目 简介.docx\nassistant-preview-e2e/office/年度 总结.xlsx\nassistant-preview-e2e/office/产品 路线.pptx\nassistant-preview-e2e/office/审计 报告.pdf\nassistant-preview-e2e/office/不存在.pdf\nE2E_ASSISTANT_PREVIEW_CARDS_OFFICE_PPTX_DONE"
- }
- }
- },
- {
- "id": "assistant-preview-cards-reveal",
- "description": "APC15 同一轮输出一份预置 DOCX 与一个无本地文件的 localhost 网址,验证文件卡菜单「在 Finder 中打开」与纯网址卡不显示该项。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "固定文件引用与动态端口 URL,文件存在性、卡片菜单与主进程 IPC 仍走真实产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": [
- "E2E_ASSISTANT_PREVIEW_CARDS_REVEAL",
- "E2E_BROWSER_FIXTURE_URL:"
- ],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "assistant-preview-cards-reveal",
- "inputTokens": 96,
- "outputTokens": 24,
- "text": "assistant-preview-e2e/office/项目 简介.docx\n[APC Reveal Link]({{browserFixtureUrl}})\nE2E_ASSISTANT_PREVIEW_CARDS_REVEAL_DONE"
- }
- }
- },
- {
- "id": "assistant-preview-cards-body-link-reveal",
- "description": "APC15 正文输出一个预置 DOCX 的 Markdown 文件链接和一个 office 目录链接,验证正文链接右键「在 Finder 中打开」:文件定位并选中、目录直接打开。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "固定正文 Markdown 文件与目录链接;文件存在性、正文链接右键菜单与主进程 IPC 仍走真实产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_BODY_LINK_REVEAL"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "assistant-preview-cards-body-link-reveal",
- "inputTokens": 96,
- "outputTokens": 32,
- "text": "文件:[APC 正文文件链接](./assistant-preview-e2e/office/项目%20简介.docx)\n目录:[APC 正文目录链接](./assistant-preview-e2e/office/)\nE2E_ASSISTANT_PREVIEW_CARDS_BODY_LINK_REVEAL_DONE"
- }
- }
- },
- {
- "id": "assistant-preview-cards-local-source-write",
- "description": "APC15 真实 Write 一份 HTML,建立本轮 active fileChanges,供 localhost 预览卡映射 sourcePath。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "固定 Write 工具选择;文件写入、fileChanges 与卡片 sourcePath 映射仍走真实产品链路。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": [
- "E2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SOURCE",
- "E2E_BROWSER_FIXTURE_URL:"
- ],
- "bodyExcludes": ["Generate a concise title", "toolu_apc_local_source_write"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_apc_local_source_write",
- "name": "Write",
- "input": {
- "file_path": "assistant-preview-e2e/预览 源码/app 页面.html",
- "content": "<!doctype html><html><body>APC15_SOURCE_HTML</body></html>"
- }
- }
- }
- },
- {
- "id": "assistant-preview-cards-local-source-final",
- "description": "APC15 提到本轮写出的 HTML,并给出路径与之对应的 localhost 预览 URL(HTML 卡被 localhost 抑制,只剩网站卡)。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "动态端口 URL 由用户 marker 回填;localhost 路径与本轮 Write 路径一致,验证 sourcePath 定位与 URL 打开分离。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": [
- "E2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SOURCE",
- "toolu_apc_local_source_write"
- ],
- "bodyExcludes": ["Generate a concise title"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "assistant-preview-cards-local-source-final",
- "inputTokens": 96,
- "outputTokens": 24,
- "text": "已生成 assistant-preview-e2e/预览 源码/app 页面.html。\n本地预览:{{browserFixtureUrl}}\nE2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SOURCE_DONE"
- }
- }
- },
- {
- "id": "assistant-preview-cards-audio",
- "description": "APC12 独立消息只输出预置 WAV 媒体文件。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "将音频从 PPTX 自动打开轮拆出,避免 side pane active tab 竞争。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_OFFICE_AUDIO"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "assistant-preview-cards-audio",
- "inputTokens": 128,
- "outputTokens": 16,
- "text": "assistant-preview-e2e/media/生成 音频.wav\nE2E_ASSISTANT_PREVIEW_CARDS_OFFICE_AUDIO_DONE"
- }
- }
- },
- {
- "id": "assistant-preview-cards-video",
- "description": "APC12 独立消息只输出预置 MP4 媒体文件。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "将视频从 PPTX 自动打开轮拆出,避免 side pane active tab 竞争。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_OFFICE_VIDEO"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "assistant-preview-cards-video",
- "inputTokens": 128,
- "outputTokens": 16,
- "text": "assistant-preview-e2e/media/生成 视频.mp4\nE2E_ASSISTANT_PREVIEW_CARDS_OFFICE_VIDEO_DONE"
- }
- }
- },
- {
- "id": "assistant-preview-cards-max-ten",
- "description": "APC08 输出 12 个均存在的 PDF,验证逆序最多 10 张。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "固定候选数量和文本顺序,真实存在性继续由 Host stat 决定。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_MAX_TEN"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "assistant-preview-cards-max-ten",
- "inputTokens": 128,
- "outputTokens": 64,
- "text": "assistant-preview-e2e/bounds/max-01.pdf\nassistant-preview-e2e/bounds/max-02.pdf\nassistant-preview-e2e/bounds/max-03.pdf\nassistant-preview-e2e/bounds/max-04.pdf\nassistant-preview-e2e/bounds/max-05.pdf\nassistant-preview-e2e/bounds/max-06.pdf\nassistant-preview-e2e/bounds/max-07.pdf\nassistant-preview-e2e/bounds/max-08.pdf\nassistant-preview-e2e/bounds/max-09.pdf\nassistant-preview-e2e/bounds/max-10.pdf\nassistant-preview-e2e/bounds/max-11.pdf\nassistant-preview-e2e/bounds/max-12.pdf\nE2E_ASSISTANT_PREVIEW_CARDS_MAX_TEN_DONE"
- }
- }
- },
- {
- "id": "assistant-preview-cards-no-backfill",
- "description": "APC08 输出 16 个 PDF;逆序前 15 个仅 9 个存在,第 16 个候选存在但不得回填。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "固定 15 候选边界和缺失分布,验证产品不会为了凑满 10 张继续探测。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_NO_BACKFILL"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "assistant-preview-cards-no-backfill",
- "inputTokens": 128,
- "outputTokens": 72,
- "text": "assistant-preview-e2e/bounds/nofill-01.pdf\nassistant-preview-e2e/bounds/nofill-02.pdf\nassistant-preview-e2e/bounds/nofill-03.pdf\nassistant-preview-e2e/bounds/nofill-04.pdf\nassistant-preview-e2e/bounds/nofill-05.pdf\nassistant-preview-e2e/bounds/nofill-06.pdf\nassistant-preview-e2e/bounds/nofill-07.pdf\nassistant-preview-e2e/bounds/nofill-08.pdf\nassistant-preview-e2e/bounds/nofill-09.pdf\nassistant-preview-e2e/bounds/nofill-10.pdf\nassistant-preview-e2e/bounds/nofill-11.pdf\nassistant-preview-e2e/bounds/nofill-12.pdf\nassistant-preview-e2e/bounds/nofill-13.pdf\nassistant-preview-e2e/bounds/nofill-14.pdf\nassistant-preview-e2e/bounds/nofill-15.pdf\nassistant-preview-e2e/bounds/nofill-16.pdf\nE2E_ASSISTANT_PREVIEW_CARDS_NO_BACKFILL_DONE"
- }
- }
- },
- {
- "id": "assistant-preview-cards-source-write-html",
- "description": "APC05/APC09/APC11 首步真实 Write Unicode/空格 HTML。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "固定 Write 工具选择,建立可持久化的当前轮 HTML fileChanges。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD"],
- "bodyExcludes": ["Generate a concise title", "toolu_apc_source_write_html"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_apc_source_write_html",
- "name": "Write",
- "input": {
- "file_path": "assistant-preview-e2e/本轮 输出/index 页面.html",
- "content": "<!doctype html><html><head><title>APC05 HTML</title></head><body>APC05_HTML_PAGE</body></html>"
- }
- }
- }
- },
- {
- "id": "assistant-preview-cards-source-write-markdown",
- "description": "APC05/APC09/APC11 第二步真实 Write Unicode/空格 Markdown。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "固定第二次 Write,确保 HTML/Markdown 都属于同一 turn 的 active fileChanges。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": [
- "E2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD",
- "toolu_apc_source_write_html"
- ],
- "bodyExcludes": ["Generate a concise title", "toolu_apc_source_write_markdown"]
- },
- "response": {
- "statusCode": 200,
- "toolUse": {
- "id": "toolu_apc_source_write_markdown",
- "name": "Write",
- "input": {
- "file_path": "assistant-preview-e2e/本轮 输出/说明 文档.md",
- "content": "# Assistant Preview Markdown\n\nAPC05 Markdown renderer marker\n"
- }
- }
- }
- },
- {
- "id": "assistant-preview-cards-source-auto-compact",
- "description": "APC05/APC09 双 Write 后的自动 compact 固定保留文件变更上下文。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "E2E provider 的极小 context window 会在第二次 Write 后触发自动 compact;固定 summary,避免 replay 缺口打断文件预览与 cold resume 语义。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": [
- "CRITICAL: Respond with TEXT ONLY",
- "E2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD",
- "\"stream\":true"
- ],
- "bodyExcludes": ["Generate a concise title"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "assistant-preview-cards-source-auto-compact",
- "inputTokens": 200,
- "outputTokens": 56,
- "text": "<analysis>Both workspace files were written successfully.</analysis>\n\n<summary>E2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD created toolu_apc_source_write_html and toolu_apc_source_write_markdown for assistant-preview-e2e/本轮 输出/index 页面.html and assistant-preview-e2e/本轮 输出/说明 文档.md. Report both files in that order.</summary>"
- }
- }
- },
- {
- "id": "assistant-preview-cards-source-final",
- "description": "APC05/APC09 最终按 HTML 后 Markdown 的顺序输出路径。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "固定文本顺序,验证卡片逆序、打开目标和 cold resume 重建。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "bodyIncludes": [
- "E2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD",
- "toolu_apc_source_write_markdown"
- ],
- "bodyExcludes": ["Generate a concise title"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "assistant-preview-cards-source-final",
- "inputTokens": 160,
- "outputTokens": 32,
- "text": "已生成 assistant-preview-e2e/本轮 输出/index 页面.html。\n已生成 [说明 文档](assistant-preview-e2e/本轮 输出/说明 文档.md)。\nE2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD_DONE"
- }
- }
- },
- {
- "id": "assistant-preview-cards-parking",
- "description": "APC09/APC11 切换或冷恢复前创建另一条已完成 parking session。",
- "metadata": {
- "kind": "main",
- "timingPolicy": "fast-text",
- "source": "synthetic",
- "syntheticReason": "冷启动后显式选择目标历史 task,避免把自动恢复当前 task 误算成 cold resume 证据。"
- },
- "maxMatches": 1,
- "match": {
- "method": "POST",
- "pathIncludes": "/messages",
- "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_PARKING"],
- "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
- },
- "response": {
- "statusCode": 200,
- "text": {
- "id": "assistant-preview-cards-parking",
- "inputTokens": 80,
- "outputTokens": 12,
- "text": "E2E_ASSISTANT_PREVIEW_CARDS_PARKING_DONE"
- }
- }
- }
- ]
- }
|