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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
  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": "fast-text",
  231. "source": "synthetic",
  232. "syntheticReason": "稳定给出 Unicode/空格文件引用和出现顺序,文件存在性与 renderer 仍走真实产品链路。"
  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. "text": {
  244. "id": "assistant-preview-cards-office-pptx",
  245. "inputTokens": 128,
  246. "outputTokens": 48,
  247. "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"
  248. }
  249. }
  250. },
  251. {
  252. "id": "assistant-preview-cards-reveal",
  253. "description": "APC15 同一轮输出一份预置 DOCX 与一个无本地文件的 localhost 网址,验证文件卡菜单「在 Finder 中打开」与纯网址卡不显示该项。",
  254. "metadata": {
  255. "kind": "main",
  256. "timingPolicy": "fast-text",
  257. "source": "synthetic",
  258. "syntheticReason": "固定文件引用与动态端口 URL,文件存在性、卡片菜单与主进程 IPC 仍走真实产品链路。"
  259. },
  260. "maxMatches": 1,
  261. "match": {
  262. "method": "POST",
  263. "pathIncludes": "/messages",
  264. "lastUserMessageIncludes": [
  265. "E2E_ASSISTANT_PREVIEW_CARDS_REVEAL",
  266. "E2E_BROWSER_FIXTURE_URL:"
  267. ],
  268. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  269. },
  270. "response": {
  271. "statusCode": 200,
  272. "text": {
  273. "id": "assistant-preview-cards-reveal",
  274. "inputTokens": 96,
  275. "outputTokens": 24,
  276. "text": "assistant-preview-e2e/office/项目 简介.docx\n[APC Reveal Link]({{browserFixtureUrl}})\nE2E_ASSISTANT_PREVIEW_CARDS_REVEAL_DONE"
  277. }
  278. }
  279. },
  280. {
  281. "id": "assistant-preview-cards-body-link-reveal",
  282. "description": "APC15 正文输出一个预置 DOCX 的 Markdown 文件链接和一个 office 目录链接,验证正文链接右键「在 Finder 中打开」:文件定位并选中、目录直接打开。",
  283. "metadata": {
  284. "kind": "main",
  285. "timingPolicy": "fast-text",
  286. "source": "synthetic",
  287. "syntheticReason": "固定正文 Markdown 文件与目录链接;文件存在性、正文链接右键菜单与主进程 IPC 仍走真实产品链路。"
  288. },
  289. "maxMatches": 1,
  290. "match": {
  291. "method": "POST",
  292. "pathIncludes": "/messages",
  293. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_BODY_LINK_REVEAL"],
  294. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  295. },
  296. "response": {
  297. "statusCode": 200,
  298. "text": {
  299. "id": "assistant-preview-cards-body-link-reveal",
  300. "inputTokens": 96,
  301. "outputTokens": 32,
  302. "text": "文件:[APC 正文文件链接](./assistant-preview-e2e/office/项目%20简介.docx)\n目录:[APC 正文目录链接](./assistant-preview-e2e/office/)\nE2E_ASSISTANT_PREVIEW_CARDS_BODY_LINK_REVEAL_DONE"
  303. }
  304. }
  305. },
  306. {
  307. "id": "assistant-preview-cards-local-source-write",
  308. "description": "APC15 真实 Write 一份 HTML,建立本轮 active fileChanges,供 localhost 预览卡映射 sourcePath。",
  309. "metadata": {
  310. "kind": "main",
  311. "timingPolicy": "fast-text",
  312. "source": "synthetic",
  313. "syntheticReason": "固定 Write 工具选择;文件写入、fileChanges 与卡片 sourcePath 映射仍走真实产品链路。"
  314. },
  315. "maxMatches": 1,
  316. "match": {
  317. "method": "POST",
  318. "pathIncludes": "/messages",
  319. "lastUserMessageIncludes": [
  320. "E2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SOURCE",
  321. "E2E_BROWSER_FIXTURE_URL:"
  322. ],
  323. "bodyExcludes": ["Generate a concise title", "toolu_apc_local_source_write"]
  324. },
  325. "response": {
  326. "statusCode": 200,
  327. "toolUse": {
  328. "id": "toolu_apc_local_source_write",
  329. "name": "Write",
  330. "input": {
  331. "file_path": "assistant-preview-e2e/预览 源码/app 页面.html",
  332. "content": "<!doctype html><html><body>APC15_SOURCE_HTML</body></html>"
  333. }
  334. }
  335. }
  336. },
  337. {
  338. "id": "assistant-preview-cards-local-source-final",
  339. "description": "APC15 提到本轮写出的 HTML,并给出路径与之对应的 localhost 预览 URL(HTML 卡被 localhost 抑制,只剩网站卡)。",
  340. "metadata": {
  341. "kind": "main",
  342. "timingPolicy": "fast-text",
  343. "source": "synthetic",
  344. "syntheticReason": "动态端口 URL 由用户 marker 回填;localhost 路径与本轮 Write 路径一致,验证 sourcePath 定位与 URL 打开分离。"
  345. },
  346. "maxMatches": 1,
  347. "match": {
  348. "method": "POST",
  349. "pathIncludes": "/messages",
  350. "bodyIncludes": [
  351. "E2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SOURCE",
  352. "toolu_apc_local_source_write"
  353. ],
  354. "bodyExcludes": ["Generate a concise title"]
  355. },
  356. "response": {
  357. "statusCode": 200,
  358. "text": {
  359. "id": "assistant-preview-cards-local-source-final",
  360. "inputTokens": 96,
  361. "outputTokens": 24,
  362. "text": "已生成 assistant-preview-e2e/预览 源码/app 页面.html。\n本地预览:{{browserFixtureUrl}}\nE2E_ASSISTANT_PREVIEW_CARDS_LOCAL_SOURCE_DONE"
  363. }
  364. }
  365. },
  366. {
  367. "id": "assistant-preview-cards-audio",
  368. "description": "APC12 独立消息只输出预置 WAV 媒体文件。",
  369. "metadata": {
  370. "kind": "main",
  371. "timingPolicy": "fast-text",
  372. "source": "synthetic",
  373. "syntheticReason": "将音频从 PPTX 自动打开轮拆出,避免 side pane active tab 竞争。"
  374. },
  375. "maxMatches": 1,
  376. "match": {
  377. "method": "POST",
  378. "pathIncludes": "/messages",
  379. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_OFFICE_AUDIO"],
  380. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  381. },
  382. "response": {
  383. "statusCode": 200,
  384. "text": {
  385. "id": "assistant-preview-cards-audio",
  386. "inputTokens": 128,
  387. "outputTokens": 16,
  388. "text": "assistant-preview-e2e/media/生成 音频.wav\nE2E_ASSISTANT_PREVIEW_CARDS_OFFICE_AUDIO_DONE"
  389. }
  390. }
  391. },
  392. {
  393. "id": "assistant-preview-cards-video",
  394. "description": "APC12 独立消息只输出预置 MP4 媒体文件。",
  395. "metadata": {
  396. "kind": "main",
  397. "timingPolicy": "fast-text",
  398. "source": "synthetic",
  399. "syntheticReason": "将视频从 PPTX 自动打开轮拆出,避免 side pane active tab 竞争。"
  400. },
  401. "maxMatches": 1,
  402. "match": {
  403. "method": "POST",
  404. "pathIncludes": "/messages",
  405. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_OFFICE_VIDEO"],
  406. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  407. },
  408. "response": {
  409. "statusCode": 200,
  410. "text": {
  411. "id": "assistant-preview-cards-video",
  412. "inputTokens": 128,
  413. "outputTokens": 16,
  414. "text": "assistant-preview-e2e/media/生成 视频.mp4\nE2E_ASSISTANT_PREVIEW_CARDS_OFFICE_VIDEO_DONE"
  415. }
  416. }
  417. },
  418. {
  419. "id": "assistant-preview-cards-max-ten",
  420. "description": "APC08 输出 12 个均存在的 PDF,验证逆序最多 10 张。",
  421. "metadata": {
  422. "kind": "main",
  423. "timingPolicy": "fast-text",
  424. "source": "synthetic",
  425. "syntheticReason": "固定候选数量和文本顺序,真实存在性继续由 Host stat 决定。"
  426. },
  427. "maxMatches": 1,
  428. "match": {
  429. "method": "POST",
  430. "pathIncludes": "/messages",
  431. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_MAX_TEN"],
  432. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  433. },
  434. "response": {
  435. "statusCode": 200,
  436. "text": {
  437. "id": "assistant-preview-cards-max-ten",
  438. "inputTokens": 128,
  439. "outputTokens": 64,
  440. "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"
  441. }
  442. }
  443. },
  444. {
  445. "id": "assistant-preview-cards-no-backfill",
  446. "description": "APC08 输出 16 个 PDF;逆序前 15 个仅 9 个存在,第 16 个候选存在但不得回填。",
  447. "metadata": {
  448. "kind": "main",
  449. "timingPolicy": "fast-text",
  450. "source": "synthetic",
  451. "syntheticReason": "固定 15 候选边界和缺失分布,验证产品不会为了凑满 10 张继续探测。"
  452. },
  453. "maxMatches": 1,
  454. "match": {
  455. "method": "POST",
  456. "pathIncludes": "/messages",
  457. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_NO_BACKFILL"],
  458. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  459. },
  460. "response": {
  461. "statusCode": 200,
  462. "text": {
  463. "id": "assistant-preview-cards-no-backfill",
  464. "inputTokens": 128,
  465. "outputTokens": 72,
  466. "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"
  467. }
  468. }
  469. },
  470. {
  471. "id": "assistant-preview-cards-source-write-html",
  472. "description": "APC05/APC09/APC11 首步真实 Write Unicode/空格 HTML。",
  473. "metadata": {
  474. "kind": "main",
  475. "timingPolicy": "fast-text",
  476. "source": "synthetic",
  477. "syntheticReason": "固定 Write 工具选择,建立可持久化的当前轮 HTML fileChanges。"
  478. },
  479. "maxMatches": 1,
  480. "match": {
  481. "method": "POST",
  482. "pathIncludes": "/messages",
  483. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD"],
  484. "bodyExcludes": ["Generate a concise title", "toolu_apc_source_write_html"]
  485. },
  486. "response": {
  487. "statusCode": 200,
  488. "toolUse": {
  489. "id": "toolu_apc_source_write_html",
  490. "name": "Write",
  491. "input": {
  492. "file_path": "assistant-preview-e2e/本轮 输出/index 页面.html",
  493. "content": "<!doctype html><html><head><title>APC05 HTML</title></head><body>APC05_HTML_PAGE</body></html>"
  494. }
  495. }
  496. }
  497. },
  498. {
  499. "id": "assistant-preview-cards-source-write-markdown",
  500. "description": "APC05/APC09/APC11 第二步真实 Write Unicode/空格 Markdown。",
  501. "metadata": {
  502. "kind": "main",
  503. "timingPolicy": "fast-text",
  504. "source": "synthetic",
  505. "syntheticReason": "固定第二次 Write,确保 HTML/Markdown 都属于同一 turn 的 active fileChanges。"
  506. },
  507. "maxMatches": 1,
  508. "match": {
  509. "method": "POST",
  510. "pathIncludes": "/messages",
  511. "bodyIncludes": [
  512. "E2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD",
  513. "toolu_apc_source_write_html"
  514. ],
  515. "bodyExcludes": ["Generate a concise title", "toolu_apc_source_write_markdown"]
  516. },
  517. "response": {
  518. "statusCode": 200,
  519. "toolUse": {
  520. "id": "toolu_apc_source_write_markdown",
  521. "name": "Write",
  522. "input": {
  523. "file_path": "assistant-preview-e2e/本轮 输出/说明 文档.md",
  524. "content": "# Assistant Preview Markdown\n\nAPC05 Markdown renderer marker\n"
  525. }
  526. }
  527. }
  528. },
  529. {
  530. "id": "assistant-preview-cards-source-auto-compact",
  531. "description": "APC05/APC09 双 Write 后的自动 compact 固定保留文件变更上下文。",
  532. "metadata": {
  533. "kind": "main",
  534. "timingPolicy": "fast-text",
  535. "source": "synthetic",
  536. "syntheticReason": "E2E provider 的极小 context window 会在第二次 Write 后触发自动 compact;固定 summary,避免 replay 缺口打断文件预览与 cold resume 语义。"
  537. },
  538. "maxMatches": 1,
  539. "match": {
  540. "method": "POST",
  541. "pathIncludes": "/messages",
  542. "bodyIncludes": [
  543. "CRITICAL: Respond with TEXT ONLY",
  544. "E2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD",
  545. "\"stream\":true"
  546. ],
  547. "bodyExcludes": ["Generate a concise title"]
  548. },
  549. "response": {
  550. "statusCode": 200,
  551. "text": {
  552. "id": "assistant-preview-cards-source-auto-compact",
  553. "inputTokens": 200,
  554. "outputTokens": 56,
  555. "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>"
  556. }
  557. }
  558. },
  559. {
  560. "id": "assistant-preview-cards-source-final",
  561. "description": "APC05/APC09 最终按 HTML 后 Markdown 的顺序输出路径。",
  562. "metadata": {
  563. "kind": "main",
  564. "timingPolicy": "fast-text",
  565. "source": "synthetic",
  566. "syntheticReason": "固定文本顺序,验证卡片逆序、打开目标和 cold resume 重建。"
  567. },
  568. "maxMatches": 1,
  569. "match": {
  570. "method": "POST",
  571. "pathIncludes": "/messages",
  572. "bodyIncludes": [
  573. "E2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD",
  574. "toolu_apc_source_write_markdown"
  575. ],
  576. "bodyExcludes": ["Generate a concise title"]
  577. },
  578. "response": {
  579. "statusCode": 200,
  580. "text": {
  581. "id": "assistant-preview-cards-source-final",
  582. "inputTokens": 160,
  583. "outputTokens": 32,
  584. "text": "已生成 assistant-preview-e2e/本轮 输出/index 页面.html。\n已生成 [说明 文档](assistant-preview-e2e/本轮 输出/说明 文档.md)。\nE2E_ASSISTANT_PREVIEW_CARDS_SOURCE_AND_COLD_DONE"
  585. }
  586. }
  587. },
  588. {
  589. "id": "assistant-preview-cards-parking",
  590. "description": "APC09/APC11 切换或冷恢复前创建另一条已完成 parking session。",
  591. "metadata": {
  592. "kind": "main",
  593. "timingPolicy": "fast-text",
  594. "source": "synthetic",
  595. "syntheticReason": "冷启动后显式选择目标历史 task,避免把自动恢复当前 task 误算成 cold resume 证据。"
  596. },
  597. "maxMatches": 1,
  598. "match": {
  599. "method": "POST",
  600. "pathIncludes": "/messages",
  601. "lastUserMessageIncludes": ["E2E_ASSISTANT_PREVIEW_CARDS_PARKING"],
  602. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  603. },
  604. "response": {
  605. "statusCode": 200,
  606. "text": {
  607. "id": "assistant-preview-cards-parking",
  608. "inputTokens": 80,
  609. "outputTokens": 12,
  610. "text": "E2E_ASSISTANT_PREVIEW_CARDS_PARKING_DONE"
  611. }
  612. }
  613. }
  614. ]
  615. }