conversation-session-assistant-preview-cards.json 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-assistant-preview-cards",
  4. "spec": "./test/e2e/conversation-session/presentation/conversation-session-assistant-preview-cards.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "assistant-preview-cards-title",
  8. "description": "Assistant Preview Cards 各独立 task 的标题 sidecar 固定响应。",
  9. "metadata": {
  10. "kind": "common",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "标题不属于预览卡片产品语义,只需避免 sidecar 请求误命中业务 fixture。"
  14. },
  15. "maxMatches": 20,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": ["Generate a concise title", "E2E_ASSISTANT_PREVIEW_CARDS"]
  20. },
  21. "response": {
  22. "statusCode": 200,
  23. "text": {
  24. "id": "assistant-preview-cards-title",
  25. "inputTokens": 64,
  26. "outputTokens": 8,
  27. "text": "{\"title\":\"Assistant Preview Cards E2E\"}"
  28. }
  29. }
  30. },
  31. {
  32. "id": "assistant-preview-cards-local-url",
  33. "description": "APC01/APC04 输出两次同一本地 URL,验证完成态去重和 Browser 打开。",
  34. "metadata": {
  35. "kind": "main",
  36. "timingPolicy": "fast-text",
  37. "source": "synthetic",
  38. "syntheticReason": "固定 assistant 文本中的动态随机端口 URL,稳定验证卡片投影和 Browser side pane。"
  39. },
  40. "maxMatches": 1,
  41. "match": {
  42. "method": "POST",
  43. "pathIncludes": "/messages",
  44. "lastUserMessageIncludes": [
  45. "E2E_ASSISTANT_PREVIEW_CARDS_LOCAL_URL",
  46. "E2E_BROWSER_FIXTURE_URL:"
  47. ],
  48. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  49. },
  50. "response": {
  51. "statusCode": 200,
  52. "text": {
  53. "id": "assistant-preview-cards-local-url",
  54. "inputTokens": 96,
  55. "outputTokens": 20,
  56. "text": "[APC Local Preview]({{browserFixtureUrl}})\n再次打开 {{browserFixtureUrl}}。\nE2E_ASSISTANT_PREVIEW_CARDS_LOCAL_URL_DONE"
  57. }
  58. }
  59. },
  60. {
  61. "id": "assistant-preview-cards-interrupted",
  62. "description": "APC02 在首段 URL 到达后保持流打开,供 spec 点击 Stop。",
  63. "metadata": {
  64. "kind": "main",
  65. "timingPolicy": "controlled-stream",
  66. "source": "synthetic",
  67. "syntheticReason": "interrupted 卡片必须在可重复的半流窗口中触发 Stop,普通 fast-text 无法提供该边界。"
  68. },
  69. "maxMatches": 1,
  70. "match": {
  71. "method": "POST",
  72. "pathIncludes": "/messages",
  73. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_INTERRUPTED"],
  74. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  75. },
  76. "response": {
  77. "statusCode": 200,
  78. "headers": {
  79. "cache-control": "no-cache",
  80. "content-type": "text/event-stream; charset=utf-8"
  81. },
  82. "chunks": [
  83. {
  84. "offsetMs": 0,
  85. "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"
  86. },
  87. {
  88. "offsetMs": 100,
  89. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  90. },
  91. {
  92. "offsetMs": 200,
  93. "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"
  94. },
  95. {
  96. "offsetMs": 20000,
  97. "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"
  98. },
  99. {
  100. "offsetMs": 20100,
  101. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  102. },
  103. {
  104. "offsetMs": 20200,
  105. "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"
  106. },
  107. {
  108. "offsetMs": 20300,
  109. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  110. }
  111. ]
  112. }
  113. },
  114. {
  115. "id": "assistant-preview-cards-streaming",
  116. "description": "APC03 先输出 URL,再延迟正常完成。",
  117. "metadata": {
  118. "kind": "main",
  119. "timingPolicy": "controlled-stream",
  120. "source": "synthetic",
  121. "syntheticReason": "需要在 assistant text 已可见但 row 尚未 terminal 时断言没有卡片。"
  122. },
  123. "maxMatches": 1,
  124. "match": {
  125. "method": "POST",
  126. "pathIncludes": "/messages",
  127. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_STREAMING"],
  128. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  129. },
  130. "response": {
  131. "statusCode": 200,
  132. "headers": {
  133. "cache-control": "no-cache",
  134. "content-type": "text/event-stream; charset=utf-8"
  135. },
  136. "chunks": [
  137. {
  138. "offsetMs": 0,
  139. "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"
  140. },
  141. {
  142. "offsetMs": 100,
  143. "text": "event: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\n"
  144. },
  145. {
  146. "offsetMs": 200,
  147. "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"
  148. },
  149. {
  150. "offsetMs": 5000,
  151. "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"
  152. },
  153. {
  154. "offsetMs": 5100,
  155. "text": "event: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\n"
  156. },
  157. {
  158. "offsetMs": 5200,
  159. "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"
  160. },
  161. {
  162. "offsetMs": 5300,
  163. "text": "event: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
  164. }
  165. ]
  166. }
  167. },
  168. {
  169. "id": "assistant-preview-cards-suppression-write",
  170. "description": "APC04 真实 Write HTML,确保 localhost 全局抑制不是因为缺少 fileChanges。",
  171. "metadata": {
  172. "kind": "main",
  173. "timingPolicy": "fast-text",
  174. "source": "synthetic",
  175. "syntheticReason": "固定 Write 工具选择以建立本轮 active HTML fileChanges。"
  176. },
  177. "maxMatches": 1,
  178. "match": {
  179. "method": "POST",
  180. "pathIncludes": "/messages",
  181. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SUPPRESSES_HTML"],
  182. "bodyExcludes": ["Generate a concise title", "toolu_apc_suppression_write"]
  183. },
  184. "response": {
  185. "statusCode": 200,
  186. "toolUse": {
  187. "id": "toolu_apc_suppression_write",
  188. "name": "Write",
  189. "input": {
  190. "file_path": "assistant-preview-e2e/本轮 输出/index 页面.html",
  191. "content": "<!doctype html><html><body>APC04_HTML_PAGE</body></html>"
  192. }
  193. }
  194. }
  195. },
  196. {
  197. "id": "assistant-preview-cards-suppression-final",
  198. "description": "APC04 同轮输出 localhost 和已 Write 的 HTML。",
  199. "metadata": {
  200. "kind": "main",
  201. "timingPolicy": "fast-text",
  202. "source": "synthetic",
  203. "syntheticReason": "固定现有业务语义:任一本地 HTTP URL 都抑制同轮全部 HTML 卡片。"
  204. },
  205. "maxMatches": 1,
  206. "match": {
  207. "method": "POST",
  208. "pathIncludes": "/messages",
  209. "bodyIncludes": [
  210. "E2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SUPPRESSES_HTML",
  211. "toolu_apc_suppression_write"
  212. ],
  213. "bodyExcludes": ["Generate a concise title"]
  214. },
  215. "response": {
  216. "statusCode": 200,
  217. "text": {
  218. "id": "assistant-preview-cards-suppression-final",
  219. "inputTokens": 120,
  220. "outputTokens": 24,
  221. "text": "[APC Local Only]({{browserFixtureUrl}})\n再次访问 {{browserFixtureUrl}}。\n已生成 assistant-preview-e2e/本轮 输出/index 页面.html。\nE2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SUPPRESSES_HTML_DONE"
  222. }
  223. }
  224. },
  225. {
  226. "id": "assistant-preview-cards-office-pptx",
  227. "description": "APC06/APC07 与 APC14 分别输出预置 stale source、Office/PDF 及一个缺失 PDF;本轮包含 PPTX 自动打开。",
  228. "metadata": {
  229. "kind": "main",
  230. "timingPolicy": "delayed-text",
  231. "source": "synthetic",
  232. "syntheticReason": "稳定给出 Unicode/空格文件引用和出现顺序,文件存在性与 renderer 仍走真实产品链路。延迟回复让 renderer 观察到 running 阶段:PPTX 自动打开只在本 renderer 观察到 running 边沿后才武装,整轮几十毫秒结束时 running 与 completedSuccess 会合并到同一次渲染而漏掉边沿。"
  233. },
  234. "maxMatches": 2,
  235. "match": {
  236. "method": "POST",
  237. "pathIncludes": "/messages",
  238. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_OFFICE_PPTX"],
  239. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  240. },
  241. "response": {
  242. "statusCode": 200,
  243. "delayMs": 2000,
  244. "text": {
  245. "id": "assistant-preview-cards-office-pptx",
  246. "inputTokens": 128,
  247. "outputTokens": 48,
  248. "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"
  249. }
  250. }
  251. },
  252. {
  253. "id": "assistant-preview-cards-reveal",
  254. "description": "APC15 同一轮输出一份预置 DOCX 与一个无本地文件的 localhost 网址,验证文件卡菜单「在 Finder 中打开」与纯网址卡不显示该项。",
  255. "metadata": {
  256. "kind": "main",
  257. "timingPolicy": "fast-text",
  258. "source": "synthetic",
  259. "syntheticReason": "固定文件引用与动态端口 URL,文件存在性、卡片菜单与主进程 IPC 仍走真实产品链路。"
  260. },
  261. "maxMatches": 1,
  262. "match": {
  263. "method": "POST",
  264. "pathIncludes": "/messages",
  265. "lastUserMessageIncludes": [
  266. "E2E_ASSISTANT_PREVIEW_CARDS_REVEAL",
  267. "E2E_BROWSER_FIXTURE_URL:"
  268. ],
  269. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  270. },
  271. "response": {
  272. "statusCode": 200,
  273. "text": {
  274. "id": "assistant-preview-cards-reveal",
  275. "inputTokens": 96,
  276. "outputTokens": 24,
  277. "text": "assistant-preview-e2e/office/项目 简介.docx\n[APC Reveal Link]({{browserFixtureUrl}})\nE2E_ASSISTANT_PREVIEW_CARDS_REVEAL_DONE"
  278. }
  279. }
  280. },
  281. {
  282. "id": "assistant-preview-cards-body-link-reveal",
  283. "description": "APC15 正文输出一个预置 DOCX 的 Markdown 文件链接和一个 office 目录链接,验证正文链接右键「在 Finder 中打开」:文件定位并选中、目录直接打开。",
  284. "metadata": {
  285. "kind": "main",
  286. "timingPolicy": "fast-text",
  287. "source": "synthetic",
  288. "syntheticReason": "固定正文 Markdown 文件与目录链接;文件存在性、正文链接右键菜单与主进程 IPC 仍走真实产品链路。"
  289. },
  290. "maxMatches": 1,
  291. "match": {
  292. "method": "POST",
  293. "pathIncludes": "/messages",
  294. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_BODY_LINK_REVEAL"],
  295. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  296. },
  297. "response": {
  298. "statusCode": 200,
  299. "text": {
  300. "id": "assistant-preview-cards-body-link-reveal",
  301. "inputTokens": 96,
  302. "outputTokens": 32,
  303. "text": "文件:[APC 正文文件链接](./assistant-preview-e2e/office/项目%20简介.docx)\n目录:[APC 正文目录链接](./assistant-preview-e2e/office/)\nE2E_ASSISTANT_PREVIEW_CARDS_BODY_LINK_REVEAL_DONE"
  304. }
  305. }
  306. },
  307. {
  308. "id": "assistant-preview-cards-local-source-write",
  309. "description": "APC15 真实 Write 一份 HTML,建立本轮 active fileChanges,供 localhost 预览卡映射 sourcePath。",
  310. "metadata": {
  311. "kind": "main",
  312. "timingPolicy": "fast-text",
  313. "source": "synthetic",
  314. "syntheticReason": "固定 Write 工具选择;文件写入、fileChanges 与卡片 sourcePath 映射仍走真实产品链路。"
  315. },
  316. "maxMatches": 1,
  317. "match": {
  318. "method": "POST",
  319. "pathIncludes": "/messages",
  320. "lastUserMessageIncludes": [
  321. "E2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SOURCE",
  322. "E2E_BROWSER_FIXTURE_URL:"
  323. ],
  324. "bodyExcludes": ["Generate a concise title", "toolu_apc_local_source_write"]
  325. },
  326. "response": {
  327. "statusCode": 200,
  328. "toolUse": {
  329. "id": "toolu_apc_local_source_write",
  330. "name": "Write",
  331. "input": {
  332. "file_path": "assistant-preview-e2e/预览 源码/app 页面.html",
  333. "content": "<!doctype html><html><body>APC15_SOURCE_HTML</body></html>"
  334. }
  335. }
  336. }
  337. },
  338. {
  339. "id": "assistant-preview-cards-local-source-final",
  340. "description": "APC15 提到本轮写出的 HTML,并给出路径与之对应的 localhost 预览 URL(HTML 卡被 localhost 抑制,只剩网站卡)。",
  341. "metadata": {
  342. "kind": "main",
  343. "timingPolicy": "fast-text",
  344. "source": "synthetic",
  345. "syntheticReason": "动态端口 URL 由用户 marker 回填;localhost 路径与本轮 Write 路径一致,验证 sourcePath 定位与 URL 打开分离。"
  346. },
  347. "maxMatches": 1,
  348. "match": {
  349. "method": "POST",
  350. "pathIncludes": "/messages",
  351. "bodyIncludes": [
  352. "E2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SOURCE",
  353. "toolu_apc_local_source_write"
  354. ],
  355. "bodyExcludes": ["Generate a concise title"]
  356. },
  357. "response": {
  358. "statusCode": 200,
  359. "text": {
  360. "id": "assistant-preview-cards-local-source-final",
  361. "inputTokens": 96,
  362. "outputTokens": 24,
  363. "text": "已生成 assistant-preview-e2e/预览 源码/app 页面.html。\n本地预览:{{browserFixtureUrl}}\nE2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SOURCE_DONE"
  364. }
  365. }
  366. },
  367. {
  368. "id": "assistant-preview-cards-audio",
  369. "description": "APC12 独立消息只输出预置 WAV 媒体文件。",
  370. "metadata": {
  371. "kind": "main",
  372. "timingPolicy": "fast-text",
  373. "source": "synthetic",
  374. "syntheticReason": "将音频从 PPTX 自动打开轮拆出,避免 side pane active tab 竞争。"
  375. },
  376. "maxMatches": 1,
  377. "match": {
  378. "method": "POST",
  379. "pathIncludes": "/messages",
  380. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_OFFICE_AUDIO"],
  381. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  382. },
  383. "response": {
  384. "statusCode": 200,
  385. "text": {
  386. "id": "assistant-preview-cards-audio",
  387. "inputTokens": 128,
  388. "outputTokens": 16,
  389. "text": "assistant-preview-e2e/media/生成 音频.wav\nE2E_ASSISTANT_PREVIEW_CARDS_OFFICE_AUDIO_DONE"
  390. }
  391. }
  392. },
  393. {
  394. "id": "assistant-preview-cards-video",
  395. "description": "APC12 独立消息只输出预置 MP4 媒体文件。",
  396. "metadata": {
  397. "kind": "main",
  398. "timingPolicy": "fast-text",
  399. "source": "synthetic",
  400. "syntheticReason": "将视频从 PPTX 自动打开轮拆出,避免 side pane active tab 竞争。"
  401. },
  402. "maxMatches": 1,
  403. "match": {
  404. "method": "POST",
  405. "pathIncludes": "/messages",
  406. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_OFFICE_VIDEO"],
  407. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  408. },
  409. "response": {
  410. "statusCode": 200,
  411. "text": {
  412. "id": "assistant-preview-cards-video",
  413. "inputTokens": 128,
  414. "outputTokens": 16,
  415. "text": "assistant-preview-e2e/media/生成 视频.mp4\nE2E_ASSISTANT_PREVIEW_CARDS_OFFICE_VIDEO_DONE"
  416. }
  417. }
  418. },
  419. {
  420. "id": "assistant-preview-cards-max-ten",
  421. "description": "APC08 输出 12 个均存在的 PDF,验证逆序最多 10 张。",
  422. "metadata": {
  423. "kind": "main",
  424. "timingPolicy": "fast-text",
  425. "source": "synthetic",
  426. "syntheticReason": "固定候选数量和文本顺序,真实存在性继续由 Host stat 决定。"
  427. },
  428. "maxMatches": 1,
  429. "match": {
  430. "method": "POST",
  431. "pathIncludes": "/messages",
  432. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_MAX_TEN"],
  433. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  434. },
  435. "response": {
  436. "statusCode": 200,
  437. "text": {
  438. "id": "assistant-preview-cards-max-ten",
  439. "inputTokens": 128,
  440. "outputTokens": 64,
  441. "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"
  442. }
  443. }
  444. },
  445. {
  446. "id": "assistant-preview-cards-no-backfill",
  447. "description": "APC08 输出 16 个 PDF;逆序前 15 个仅 9 个存在,第 16 个候选存在但不得回填。",
  448. "metadata": {
  449. "kind": "main",
  450. "timingPolicy": "fast-text",
  451. "source": "synthetic",
  452. "syntheticReason": "固定 15 候选边界和缺失分布,验证产品不会为了凑满 10 张继续探测。"
  453. },
  454. "maxMatches": 1,
  455. "match": {
  456. "method": "POST",
  457. "pathIncludes": "/messages",
  458. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_NO_BACKFILL"],
  459. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  460. },
  461. "response": {
  462. "statusCode": 200,
  463. "text": {
  464. "id": "assistant-preview-cards-no-backfill",
  465. "inputTokens": 128,
  466. "outputTokens": 72,
  467. "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"
  468. }
  469. }
  470. },
  471. {
  472. "id": "assistant-preview-cards-source-write-html",
  473. "description": "APC05/APC09/APC11 首步真实 Write Unicode/空格 HTML。",
  474. "metadata": {
  475. "kind": "main",
  476. "timingPolicy": "fast-text",
  477. "source": "synthetic",
  478. "syntheticReason": "固定 Write 工具选择,建立可持久化的当前轮 HTML fileChanges。"
  479. },
  480. "maxMatches": 1,
  481. "match": {
  482. "method": "POST",
  483. "pathIncludes": "/messages",
  484. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD"],
  485. "bodyExcludes": ["Generate a concise title", "toolu_apc_source_write_html"]
  486. },
  487. "response": {
  488. "statusCode": 200,
  489. "toolUse": {
  490. "id": "toolu_apc_source_write_html",
  491. "name": "Write",
  492. "input": {
  493. "file_path": "assistant-preview-e2e/本轮 输出/index 页面.html",
  494. "content": "<!doctype html><html><head><title>APC05 HTML</title></head><body>APC05_HTML_PAGE</body></html>"
  495. }
  496. }
  497. }
  498. },
  499. {
  500. "id": "assistant-preview-cards-source-write-markdown",
  501. "description": "APC05/APC09/APC11 第二步真实 Write Unicode/空格 Markdown。",
  502. "metadata": {
  503. "kind": "main",
  504. "timingPolicy": "fast-text",
  505. "source": "synthetic",
  506. "syntheticReason": "固定第二次 Write,确保 HTML/Markdown 都属于同一 turn 的 active fileChanges。"
  507. },
  508. "maxMatches": 1,
  509. "match": {
  510. "method": "POST",
  511. "pathIncludes": "/messages",
  512. "bodyIncludes": [
  513. "E2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD",
  514. "toolu_apc_source_write_html"
  515. ],
  516. "bodyExcludes": ["Generate a concise title", "toolu_apc_source_write_markdown"]
  517. },
  518. "response": {
  519. "statusCode": 200,
  520. "toolUse": {
  521. "id": "toolu_apc_source_write_markdown",
  522. "name": "Write",
  523. "input": {
  524. "file_path": "assistant-preview-e2e/本轮 输出/说明 文档.md",
  525. "content": "# Assistant Preview Markdown\n\nAPC05 Markdown renderer marker\n"
  526. }
  527. }
  528. }
  529. },
  530. {
  531. "id": "assistant-preview-cards-source-auto-compact",
  532. "description": "APC05/APC09 双 Write 后的自动 compact 固定保留文件变更上下文。",
  533. "metadata": {
  534. "kind": "main",
  535. "timingPolicy": "fast-text",
  536. "source": "synthetic",
  537. "syntheticReason": "E2E provider 的极小 context window 会在第二次 Write 后触发自动 compact;固定 summary,避免 replay 缺口打断文件预览与 cold resume 语义。"
  538. },
  539. "maxMatches": 1,
  540. "match": {
  541. "method": "POST",
  542. "pathIncludes": "/messages",
  543. "bodyIncludes": [
  544. "CRITICAL: Respond with TEXT ONLY",
  545. "E2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD",
  546. "\"stream\":true"
  547. ],
  548. "bodyExcludes": ["Generate a concise title"]
  549. },
  550. "response": {
  551. "statusCode": 200,
  552. "text": {
  553. "id": "assistant-preview-cards-source-auto-compact",
  554. "inputTokens": 200,
  555. "outputTokens": 56,
  556. "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>"
  557. }
  558. }
  559. },
  560. {
  561. "id": "assistant-preview-cards-source-final",
  562. "description": "APC05/APC09 最终按 HTML 后 Markdown 的顺序输出路径。",
  563. "metadata": {
  564. "kind": "main",
  565. "timingPolicy": "fast-text",
  566. "source": "synthetic",
  567. "syntheticReason": "固定文本顺序,验证卡片逆序、打开目标和 cold resume 重建。"
  568. },
  569. "maxMatches": 1,
  570. "match": {
  571. "method": "POST",
  572. "pathIncludes": "/messages",
  573. "bodyIncludes": [
  574. "E2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD",
  575. "toolu_apc_source_write_markdown"
  576. ],
  577. "bodyExcludes": ["Generate a concise title"]
  578. },
  579. "response": {
  580. "statusCode": 200,
  581. "text": {
  582. "id": "assistant-preview-cards-source-final",
  583. "inputTokens": 160,
  584. "outputTokens": 32,
  585. "text": "已生成 assistant-preview-e2e/本轮 输出/index 页面.html。\n已生成 [说明 文档](assistant-preview-e2e/本轮 输出/说明 文档.md)。\nE2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD_DONE"
  586. }
  587. }
  588. },
  589. {
  590. "id": "assistant-preview-cards-parking",
  591. "description": "APC09/APC11 切换或冷恢复前创建另一条已完成 parking session。",
  592. "metadata": {
  593. "kind": "main",
  594. "timingPolicy": "fast-text",
  595. "source": "synthetic",
  596. "syntheticReason": "冷启动后显式选择目标历史 task,避免把自动恢复当前 task 误算成 cold resume 证据。"
  597. },
  598. "maxMatches": 1,
  599. "match": {
  600. "method": "POST",
  601. "pathIncludes": "/messages",
  602. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_PARKING"],
  603. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  604. },
  605. "response": {
  606. "statusCode": 200,
  607. "text": {
  608. "id": "assistant-preview-cards-parking",
  609. "inputTokens": 80,
  610. "outputTokens": 12,
  611. "text": "E2E_ASSISTANT_PREVIEW_CARDS_PARKING_DONE"
  612. }
  613. }
  614. }
  615. ]
  616. }