A local plugin for image-heavy chats in Codex, Claude Code and other agents: earlier images stop going out with every message, and the model fetches the one it needs by its ID, also after compaction.
TypeScript ai-agentsclaude-codeclaude-code-plugincodexcodex-plugincontext-managementdeveloper-toolsimage-generationmcpmultimodal
test(eval): 加装插件和不装插件的关键帧对话评测
chipfighter0b9fbe270e76
diff --git a/AGENTS.md b/AGENTS.mdindex 0404559..a944dee 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -13,6 +13,7 @@ Context Attachment Manager(上下文素材管理器,2026-10-11 前叫 Codex- [docs/v0.8/plan.md](docs/v0.8/plan.md):v0.8 方案,模型给每张图写特征行、压缩后照样拿对图,面板改成搜索加缩略图(已发布 0.8.0)。- [docs/history/v0.1/](docs/history/v0.1/):v0.1 的开发记录(原方案、任务记录、各阶段报告、最初的构想),只作参考,不作依据。- [CHANGELOG.md](CHANGELOG.md):每个版本的更新记录,发布时就是 Release 说明。+- [eval/README_CN.md](eval/README_CN.md):评测(英文版 [eval/README.md](eval/README.md)),装插件和不装插件的对比:方法、结果和复现步骤。## 已确认的规矩@@ -21,7 +22,8 @@ Context Attachment Manager(上下文素材管理器,2026-10-11 前叫 Codex- 插件本体在 `plugin/`(`plugin/src` 是运行代码),测试和实验脚本在 `spike/`,一行命令用的安装、卸载脚本在 `scripts/`。改动运行代码后,要重新运行 `cam install`,Codex 缓存里的插件副本才会更新;不要让已安装的配置指向不存在的文件。- `scripts/*.ps1` 只用 ASCII 字符:Windows PowerShell 5.1 用 `irm … | iex` 下载时按 Latin-1 解码,中文会乱码。- 仓库里的文档和代码不写用户本机的具体路径;通用位置(如 `~/.codex`、`%LOCALAPPDATA%`)可以写。-- 对外的信息以英文为主:README.md、INSTALL.md、CONTRIBUTING.md、仓库简介、CHANGELOG.md(发布时就是 Release 说明)用英文,README_CN.md 是中文版;`docs/` 下的规格、方案和开发记录,以及本文件,保持中文(用户 2026-09-28 定)。+- 对外的信息以英文为主:README.md、INSTALL.md、CONTRIBUTING.md、eval/README.md、仓库简介、CHANGELOG.md(发布时就是 Release 说明)用英文,README_CN.md、eval/README_CN.md 是中文版;`docs/` 下的规格、方案和开发记录,以及本文件,保持中文(用户 2026-09-28 定)。+- 评测的报告和结果放在 `eval/`,脚本在 `spike/src/eval-*.ts`。README 是给所有用户看的,只在底部留一小节,用白话说两句并链接过去;评测是写给工程师看的(用户 2026-10-24 定)。- 先在 Windows 上开发和测试。技术栈用 TypeScript/Node。- 界面开发:Claude 自己截图检查效果;做到界面的关键节点时,截图给用户看,停下来等反馈再继续(用户 2026-09-24 确认)。- 测试时调用模型一律用 `gpt-6-sol`,推理强度 `low`,包括脚本自测和桌面版测试,为了省 token(用户 2026-09-24 要求)。diff --git a/README.md b/README.mdindex 14dd77c..4edd15b 100644--- a/README.md+++ b/README.md@@ -61,4 +61,8 @@ Then restart Codex, or start a new session in Claude. To install or uninstall itEverything stays on your computer. The plugin sends nothing anywhere beyond the requests Codex and Claude already make.+## How we tested++We ran a short-drama keyframe chat in Codex with and without the plugin: nine keyframes, about 32 MB of images. Without the plugin, every time Codex had to send the whole chat again (after a restart, and right after compacting it), the request was 42 MB and never got through. With the plugin, the same request was 0.12 MB, and in this test the model picked the right image both before and after compacting. The method, the numbers and how to run it yourself are in [eval](eval/README.md).+<p align="center"><sub><a href="CHANGELOG.md">Changelog</a> · <a href="CONTRIBUTING.md">Contributing</a> · <a href="LICENSE">MIT License</a></sub></p>diff --git a/README_CN.md b/README_CN.mdindex be64686..09d5cd0 100644--- a/README_CN.md+++ b/README_CN.md@@ -61,4 +61,8 @@所有东西都留在你自己的电脑上。除了 Codex 和 Claude 本来就要发的请求,插件不往任何地方发数据。+## 效果测试++我们在 Codex 里拿一段短剧关键帧的对话,比较了装插件和不装插件:9 张关键帧,图片一共约 32 MB。不装插件时,只要 Codex 需要把整段对话重新发一遍(重启之后、压缩对话之后),请求就有 42 MB,一次也没发出去。装了插件,同样的请求只有 0.12 MB,这次测试里压缩前后模型都找对了图。测试方法、数据和自己复现的步骤见 [eval](eval/README_CN.md)。+<p align="center"><sub><a href="CHANGELOG.md">更新记录</a> · <a href="CONTRIBUTING.md">参与开发</a> · <a href="LICENSE">MIT 许可证</a></sub></p>diff --git a/docs/design.md b/docs/design.mdindex 3d26031..4a98d2f 100644--- a/docs/design.md+++ b/docs/design.md@@ -226,6 +226,7 @@- F 组:上传;上传加看图工具打开的图;用户评价;三张都成了占位后提问。检查特征行齐全、评价记在对的图上、正文不提记录、记录不在回复末尾、新图在它那一轮的第一个请求里就有编号、不调工具靠占位里的特征回答;- K 组(用户的案例):角色中景、两张别的素材、近景并说“这张最好”,用 app-server 的 `thread/compact/start` 压缩,再问五官参考用哪张、压缩前那两张是什么样。检查压缩后的请求里每张图都是带特征行的占位、选的是近景、答得出压缩前的图。- 关卡的探针、结果和发布前的自测结果见 [v0.8/plan.md](v0.8/plan.md) 第 3、5 节。+- **评测**(2026-10-24,`eval-keyframes.ts`、`eval-summary.ts`):一个短剧关键帧任务,9 张合成关键帧(每张 3–4 MB),三组:不装插件(测试引擎只转发、计字节:它的勾选目录里把自动选图的起始时间写成很久以后,任务都算旧任务)、当前插件、0.7.1(从发布标签取出,没有特征行)。任务一问完后重启 app-server 再问一题,任务二压缩后再问。记下能不能发出去、压缩前后找图对不对、取了几张图、token。报告、结果和复现步骤在 [eval/](../eval/README_CN.md),README 只在底部留一小节链接过去。## 11. 依赖的 Codex 行为和已知的坑diff --git a/eval/README.md b/eval/README.mdnew file mode 100644index 0000000..d895931--- /dev/null+++ b/eval/README.md@@ -0,0 +1,138 @@+# Evaluation: a keyframe chat in Codex, with and without the plugin++**English** · [简体中文](README_CN.md)++Run on 2026-10-24. Plugin 0.9.0, plus 0.7.1 for comparison. Codex app-server from Codex desktop (`codex-cli 0.163.0-alpha.11`), model `gpt-6-sol` at low reasoning effort, Windows 11. This is a small test: one scenario, one final run per setup, plus two pilot runs that shaped it.++## In short++- **Without the plugin, the chat could not be sent whenever Codex had to send it whole.** Nine keyframes make the conversation 42.4 MB (31.8 MB compressed on the wire). That happened after a restart and right after a compaction: 6 of 6 times across three runs, the request never went out. Codex showed `Reconnecting... 1/5` to `5/5`, then kept retrying over HTTP until we stopped it.+- **With the plugin, the same requests were 0.12 MB and went through.** Turns that bring new images still send those images. The plugin leaves out the earlier ones.+- **Finding images:** with 0.9.0 the model picked the right file 6 of 6 times before the compaction and 6 of 6 after it. For the two questions that need a detail only the original shows, it fetched exactly that one image each time.+- **Tokens are not the main gain.** Input tokens were 16% lower in total and the last request's context 37% smaller. But 36% more of them missed the prompt cache, so the cost depends on the cache discount. If cached tokens cost a tenth, it comes out about even.+- **Feature lines (added in 0.8) made no difference in a task this short.** 0.7.1, which has none, also found 6 of 6 after the compaction. Most likely Codex's own compaction summary still described nine images. The long tasks that led to feature lines were not tested here; see [Limits](#limits).++## The task++A short-drama keyframe chat, in Chinese, as a user would have it. Nine synthetic keyframes, 1024×1536 PNG, 3.2–3.9 MB each, drawn by the script with grain so they weigh what generated images weigh. Each has a digit hidden in one corner. The user names the place of each scene but never says which image is which, and rates images by position:++| Turn | The user says | Images |+|---|---|---|+| 1 | The heroine wears red, long black hair; the hero wears blue, short brown hair. Scene 1 is in the study: two keyframes. | S1 heroine, medium · S2 hero, medium |+| 2 | Scene 2, a street on a rainy night: two. | R1 heroine, close-up, dark · R2 the empty street |+| 3 | The first one last turn is too dark; here is a redone version. | R3 heroine, close-up |+| 4 | Scene 3, the beach at dusk: two. | B1 hero, medium · B2 heroine, close-up |+| 5 | The second one last turn: the face is the best so far. | – |+| 6 | Scene 4, the bamboo grove: two. | Z1 heroine, medium · Z2 hero, close-up |++Then come questions with known answers. Each question is about a different image, so no answer gives away the next one:++| | Question | Answer |+|---|---|---|+| F1 | Which file is the empty shot of the rainy street, with no one in it? | R2 |+| F2 | Which one did I say had the best face? | B2 |+| F3 | The heroine's rainy-night close-up has two versions; which file is the redone one? | R3 |+| F4 | Which file is the hero's medium shot in the study? | S2 |+| F5 | Which file is the hero's medium shot on the beach? | B1 |+| F6 | Which file is the heroine's medium shot in the bamboo grove? | Z1 |+| D1 | The hero's close-up in the bamboo grove has a digit in a corner. Which digit? | 7 |+| D2 | The heroine's medium shot in the study has a digit in a corner. Which digit? | 4 |+| N1 | Translate "今天天气很好" into English. | (no image needed) |++Each setup runs two tasks in its own Codex app-server:++- **Task 1:** the six turns, then F1–F5, D1, D2 and N1. Then app-server restarts and the task is resumed, so Codex must send the whole conversation again, and F6 is asked.+- **Task 2:** the six turns, then a compaction (`thread/compact/start`), then all nine questions.++Answers are scored by matching the file name or digit. A step that fails, or gets no answer within 3 minutes (10 for an upload turn), ends its task.++## Setups++| | What runs |+|---|---|+| **No plugin** | Codex as it is. A relay of the plugin's engine sits in between only to count bytes; it rewrites nothing, and Codex keeps its WebSocket. |+| **0.9.0** | This repository's plugin: automatic selection (on by default), feature lines, `cam_view_image`. |+| **0.7.1** | The last release before feature lines, from `git archive v0.7.1`: automatic selection, but placeholders carry only the id, name, source, turn and size. |++In all three, the tools that act on the machine are off, the sandbox is read-only, and the test tasks are archived at the end.++## Results++### Could the request be sent?++| | After a restart (task 1) | After a compaction (task 2) |+|---|---|---|+| No plugin | Not sent: 42.4 MB | Compaction itself fine; the next question not sent: 42.4 MB |+| 0.9.0 | Sent: 0.13 MB | Sent: 0.12 MB |++Without the plugin, Codex sends only what is new over an open WebSocket, so the six turns themselves go through. When it has to send everything again, two things fail:++- **WebSocket:** the 31.9 MB message was refused within 6–11 seconds, every time. That is far too short to upload it, so it looks like a size limit.+- **HTTP** (Codex's fallback): each attempt was cut after about 61 seconds.++A compaction does not help. Codex keeps the user's messages and their images, and replaces only its own replies with an encrypted summary: the request after it still carries all nine images. The compaction itself went through because the WebSocket was still open, so Codex had little more than the compaction marker to send.++++### Finding the right image, before and after a compaction++| | Before the compaction (task 1) | After the compaction (task 2) | Corner digits | Images fetched |+|---|---|---|---|---|+| No plugin | 5/5; F6, after the restart, never went out | the first question never went out | 2/2 | – (sees every image) |+| **0.9.0** | **6/6** | **6/6** | **4/4** | 4: one for each digit question, none for finding a file |+| 0.7.1 | stopped at turn 5 by the network\* | 6/6 | 2/2 | 2: one for each digit question |++\* The engine's connection to the upstream through the local proxy never opened, so the request was not sent at all. It is not counted.++Without the plugin the model sees every original, so its pre-compaction score is the ceiling. With the plugin, earlier images are placeholders. The model answered the find questions from what it had noted, and fetched only the originals that the digit questions needed.++### Tokens++Task 1, the same 14 steps from the first upload to N1:++| | Input tokens | Cached | Not cached | Output | Context of the last request |+|---|---|---|---|---|---|+| No plugin | 501,803 | 471,680 | 30,123 | 326 | 38,786 |+| 0.9.0 | 421,870 | 380,928 | 40,942 | 766 | 24,421 |++Leaving the earlier images out takes about 14k tokens off the context. But every time a turn's images turn into placeholders, the cached prefix breaks at that point, so more tokens miss the cache. Output grows by the feature lines.++## What the pilot runs taught us++- **Pilot 1:** the user described every image ("the first one is the heroine, medium shot"). Codex keeps the user's messages through a compaction, so every find question after it could be answered from the user's own words. That tested nothing about memory, and the scenario was rewritten so the user never says which image is which.+- **Pilot 2:** the user never named the places. The model did not take the synthetic beach (an orange sky over blue lines) or bamboo grove (green stripes) for what they were, and its feature lines said "street" and "green wall". Asked for "the hero's medium shot on the beach", 0.9.0 twice answered "there is no such image" instead of fetching to check. 0.7.1 got those right in that run. A feature line is only as good as what the model saw in the image, and when it doesn't match, the model may say no rather than look again. The final scenario names the places, as a user would.++## Limits++- One final run per setup: no statistics.+- Synthetic images. Real keyframes are easier to recognize, and look more alike.+- One model (`gpt-6-sol`, low effort) and Codex only; Claude Code was not tested.+- A short task: nine images and one compaction. The case that led to feature lines was a long task in which, after a compaction, the model picked an early medium shot instead of the close-up the user had called the best. A test like that needs dozens of images and several compactions.+- One machine, uploading through a local proxy, where HTTP requests of 7.8 MB took 25–65 seconds. The WebSocket refusal came within seconds regardless. Whether HTTP could carry 42 MB on a faster link was not tested.++## Run it yourself++It needs Windows with Codex desktop (the script uses its bundled app-server), a ChatGPT login with access to `gpt-6-sol`, and Node 24. It creates test tasks named `[CAM测试] 评测 …` in your Codex and archives them at the end. The images are drawn by the script, so nothing needs downloading.++```bash+mkdir -p local/eval/v0.7.1 && git archive v0.7.1 plugin | tar -x -C local/eval/v0.7.1+node spike/src/eval-keyframes.ts --label run1+node spike/src/eval-summary.ts --runs run1 --out eval/results/<date>+```++`--arms off,on,v07` and `--threads X,Y` pick setups and tasks, and `--draw` only writes the images. A run stopped halfway leaves its tasks unarchived; `node spike/scripts/archive-test-threads.ts` archives them.++[results/2026-10-24](results/2026-10-24/) has every step of the final run: answers, what was fetched, request sizes and token counts. Replies keep their text; thread ids and local paths are left out.++## Earlier checks++Before this evaluation, each release was checked with self-tests on synthetic images. They run every model in Chinese and English, but only once each, so they are pass/fail checks, not measurements:++| Self-test | What it checks | Results |+|---|---|---|+| `spike/src/v01-placeholder-selftest.ts`, `v01-needs-selftest.ts` | The model keeps what it said about images that became placeholders, and asks for one by id when it needs it | [v0.1 reports](../docs/history/v0.1/) |+| `spike/src/v03-auto-selftest.ts` | With automatic selection, the model fetches when an answer needs the original and leaves the tool alone when it doesn't | [design.md §10](../docs/design.md) |+| `spike/src/v07-children-selftest.ts` | Subagents and side chats leave out and fetch images too | [v0.7 plan §5](../docs/v0.7/plan.md) |+| `spike/src/v08-features-selftest.ts` | Feature lines are written, ratings are noted on the right image, and after a compaction the model picks the close-up the user rated the best | [v0.8 plan §3, §5](../docs/v0.8/plan.md) |++Unit tests (`cd spike && node --test`) and install and upgrade smoke tests run in CI on Windows, macOS and Linux.diff --git a/eval/README_CN.md b/eval/README_CN.mdnew file mode 100644index 0000000..cd6bca7--- /dev/null+++ b/eval/README_CN.md@@ -0,0 +1,138 @@+# 评测:Codex 里一段关键帧对话,装插件和不装插件++[English](README.md) · **简体中文**++2026-10-24 测试。插件 0.9.0,另拿 0.7.1 作对照。Codex 用的是 Codex 桌面版自带的 app-server(`codex-cli 0.163.0-alpha.11`),模型 `gpt-6-sol`,推理强度 low,系统 Windows 11。这是一次小测试:只有一个场景,每组正式跑了一次,前面另有两次试跑,场景就是靠它们改出来的。++## 结论++- **不装插件时,只要 Codex 需要把整段对话重新发一遍,就发不出去。** 9 张关键帧让整段对话达到 42.4 MB(压缩后上传 31.8 MB)。这种情况出现在重启之后,以及压缩之后紧接着的那一问。三次运行里一共遇到 6 次,一次也没发出去。Codex 先显示 `Reconnecting... 1/5` 到 `5/5`,之后改走 HTTP,一直重试到我们停下来。+- **装了插件,同样的请求只有 0.12 MB,都发出去了。** 有新图的那一轮仍然要发新图,插件省掉的是之前各轮的图。+- **找图:** 0.9.0 在压缩前 6 题全对,压缩后 6 题也全对。两道细节题只有看原图才答得出,模型每次都只取回了要看的那一张。+- **token 不是主要的收益。** 输入 token 总量少了 16%,最后一次请求的上下文小了 37%。但没命中提示缓存的 token 多了 36%,所以费用怎么比,要看缓存打几折:缓存按一折计算的话,两边差不多。+- **在这么短的任务里,特征行(0.8 加的)没有显出差别。** 没有特征行的 0.7.1,压缩后也是 6 题全对。最可能的原因是 Codex 自己压缩时写的摘要还记得这 9 张图。当初加特征行,是为了长得多的任务,这次没有测,见[局限](#局限)。++## 测试场景++一段中文的短剧关键帧对话,模仿用户平时的用法。9 张合成关键帧,1024×1536 的 PNG,每张 3.2–3.9 MB,由脚本绘制并加了噪点,体积和真实生图差不多。每张图的一个角落里藏着一个数字。用户每一场都说明是在哪里,但从不说哪张是哪张;评价图时按位置说:++| 轮次 | 用户说 | 图片 |+|---|---|---|+| 1 | 这部短剧的女主穿红衣、黑色长发,男主穿蓝衣、棕色短发。第一场在书房,这是两张关键帧,先简单看一下。 | S1 女主中景 · S2 男主中景 |+| 2 | 第二场在雨夜的街上,两张,简单看一下。 | R1 女主近景(偏暗) · R2 街道空镜 |+| 3 | 上一轮第一张太暗了,这是重出的一版。 | R3 女主近景 |+| 4 | 第三场在黄昏的海边,两张。 | B1 男主中景 · B2 女主近景 |+| 5 | 上一轮第二张,脸是目前最好的。 | – |+| 6 | 第四场在竹林,两张。 | Z1 女主中景 · Z2 男主近景 |++之后提问,答案事先都定好了。每道题问的是不同的图,前一题的答案不会帮到后一题:++| | 问题 | 答案 |+|---|---|---|+| F1 | 雨夜街上、画面里没有人的那张空镜,是哪个文件? | R2 |+| F2 | 我说过脸最好的是哪张? | B2 |+| F3 | 雨夜里女主的近景有两版,我要用重出的那一版,是哪个文件? | R3 |+| F4 | 书房里男主的中景是哪个文件? | S2 |+| F5 | 海边男主的中景是哪个文件? | B1 |+| F6 | 竹林里女主的中景是哪个文件? | Z1 |+| D1 | 竹林里男主的近景,角落里有一个数字,是几? | 7 |+| D2 | 书房里女主的中景,角落里有一个数字,是几? | 4 |+| N1 | 把“今天天气很好”翻译成英文。 | (不需要看图) |++每组用各自的 Codex app-server 跑两个任务:++- **任务一:** 先跑 6 轮,再问 F1–F5、D1、D2、N1。然后重启 app-server、恢复这个任务,这时 Codex 必须把整段对话重新发一遍,再问 F6。+- **任务二:** 先跑 6 轮,再压缩一次(`thread/compact/start`),然后问全部 9 题。++答案按文件名或数字自动判分。某一步失败,或者 3 分钟内没有回答(传图那几轮是 10 分钟),这个任务就到此结束。++## 三组++| | 怎么跑 |+|---|---|+| **不装插件** | Codex 原样。中间串着插件的引擎,只用来统计字节数,什么都不改写,Codex 照常用 WebSocket。 |+| **0.9.0** | 本仓库现在的插件:自动选图(默认开启)、特征行、`cam_view_image`。 |+| **0.7.1** | 加特征行之前的最后一个版本,用 `git archive v0.7.1` 取出:有自动选图,但占位里只有编号、名称、来源、轮次和尺寸。 |++三组都关掉了会操作电脑的工具,沙箱只读,测完把测试任务归档。++## 结果++### 请求发不发得出去++| | 重启后(任务一) | 压缩后(任务二) |+|---|---|---|+| 不装插件 | 发不出去:42.4 MB | 压缩本身成功,紧接着的那一问发不出去:42.4 MB |+| 0.9.0 | 发出去了:0.13 MB | 发出去了:0.12 MB |++不装插件时,只要 WebSocket 连接一直开着,Codex 每轮只发新增的内容,所以 6 轮传图本身都能过。一旦要整段重发,两条路都走不通:++- **WebSocket:** 31.9 MB 的消息每次都在 6–11 秒内被拒。这么短的时间根本传不完,看起来是消息大小有上限。+- **HTTP**(Codex 的退路):每次传约 61 秒后被挂断。++压缩也帮不上忙。Codex 压缩时,用户的消息连同里面的图都原样保留,只把模型的回复换成一段加密的摘要,所以压缩之后的请求里仍然是 9 张图。压缩这一步本身能完成,是因为 WebSocket 连接还开着,Codex 几乎只需要发一个“开始压缩”的标记。++++### 压缩前后找图准不准++| | 压缩前(任务一) | 压缩后(任务二) | 角落数字 | 取回的图 |+|---|---|---|---|---|+| 不装插件 | 5/5;重启后的 F6 没发出去 | 第一问就没发出去 | 2/2 | –(每张原图都看得到) |+| **0.9.0** | **6/6** | **6/6** | **4/4** | 4 张:每道数字题一张,找图题一张没取 |+| 0.7.1 | 第 5 轮网络卡住\* | 6/6 | 2/2 | 2 张:每道数字题一张 |++\* 引擎经本机代理连接上游时,连接一直没建立起来,请求根本没发出去。这一项不计入结果。++不装插件时模型每张原图都看得到,它在压缩前的成绩相当于上限。装了插件,之前的图都换成了占位:找图题模型靠自己记下的内容回答,只有数字题需要的原图才取回来。++### token++任务一里同样的 14 步,从第一次传图到 N1:++| | 输入 token | 命中缓存 | 没命中缓存 | 输出 | 最后一次请求的上下文 |+|---|---|---|---|---|---|+| 不装插件 | 501,803 | 471,680 | 30,123 | 326 | 38,786 |+| 0.9.0 | 421,870 | 380,928 | 40,942 | 766 | 24,421 |++省掉之前的图,上下文少了约 1.4 万 token。但每当某一轮的图换成占位,缓存的前缀就从那里断开,没命中缓存的 token 因此变多。输出多出来的是特征行。++## 试跑学到的++- **试跑一:** 用户每次都说清楚哪张是什么(“第一张是女主中景”)。Codex 压缩时会保留用户的消息,所以压缩后的找图题,读用户自己的原话就能答,根本没测到模型记不记得图。于是改了场景:用户不再说哪张是哪张。+- **试跑二:** 用户也不说场景在哪里。合成的“海边”只是橙色天空加几道蓝线,“竹林”只是绿色竖条,模型没认出来,特征行写成了“街头”“绿墙前”。问“海边男主的中景”时,0.9.0 有两次回答“没有这张”,没有去取原图核对;那一次 0.7.1 倒是答对了。可见特征行的质量取决于模型当时看图看出了什么;对不上时,模型可能直接说没有,而不是再看一眼。正式场景按用户平时的说法,说明了每一场在哪里。++## 局限++- 每组只正式跑了一次,谈不上统计意义。+- 用的是合成图。真实关键帧更容易认出画的是什么,但彼此之间也更像。+- 只测了一个模型(`gpt-6-sol`,推理强度 low),只测了 Codex,没测 Claude Code。+- 任务很短:9 张图,压缩一次。当初加特征行,是因为一个长任务压缩后,模型拿了开头的人物中景,而不是用户说最好的那张近景。要复现那种情况,需要几十张图、压缩好几次。+- 只在一台机器上测,上传经过本机代理:7.8 MB 的 HTTP 请求要 25–65 秒。WebSocket 不管网速,几秒内就被拒。网速更快时 HTTP 能不能传完 42 MB,这次没有测。++## 自己跑一遍++需要 Windows 和 Codex 桌面版(脚本用它自带的 app-server)、能用 `gpt-6-sol` 的 ChatGPT 登录,以及 Node 24。脚本会在你的 Codex 里建名为 `[CAM测试] 评测 …` 的测试任务,测完自动归档。图片由脚本现画,不用下载。++```bash+mkdir -p local/eval/v0.7.1 && git archive v0.7.1 plugin | tar -x -C local/eval/v0.7.1+node spike/src/eval-keyframes.ts --label run1+node spike/src/eval-summary.ts --runs run1 --out eval/results/<日期>+```++`--arms off,on,v07` 和 `--threads X,Y` 用来选组和任务,`--draw` 只画图不跑。中途停掉的运行会留下没归档的任务,用 `node spike/scripts/archive-test-threads.ts` 归档。++[results/2026-10-24](results/2026-10-24/) 里是正式运行的每一步:回答、取回了哪张图、请求大小和 token 数。回复保留原文,去掉了任务编号和本机路径。++## 之前做过的检查++在这次评测之前,每个版本都用合成图跑自测。中英文、每个模型都跑,但各只跑一次,所以只能算判断通过与否的检查,不算测量:++| 自测 | 检查什么 | 结果 |+|---|---|---|+| `spike/src/v01-placeholder-selftest.ts`、`v01-needs-selftest.ts` | 图换成占位后,模型不收回之前说过的话;需要时按编号要图 | [v0.1 报告](../docs/history/v0.1/) |+| `spike/src/v03-auto-selftest.ts` | 自动选图时,回答需要原图就取,不需要就不取 | [design.md 第 10 节](../docs/design.md) |+| `spike/src/v07-children-selftest.ts` | 子代理和旁聊也会省略图片、按需取回 | [v0.7 方案第 5 节](../docs/v0.7/plan.md) |+| `spike/src/v08-features-selftest.ts` | 模型会写特征行、把评价记到对的图上;压缩后选的是用户说最好的那张近景 | [v0.8 方案第 3、5 节](../docs/v0.8/plan.md) |++单元测试(`cd spike && node --test`),以及安装、升级的冒烟测试,在 CI 里的 Windows、macOS、Linux 上运行。diff --git a/eval/results/2026-10-24/request-size-en.svg b/eval/results/2026-10-24/request-size-en.svgnew file mode 100644index 0000000..b71f369--- /dev/null+++ b/eval/results/2026-10-24/request-size-en.svg@@ -0,0 +1,82 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 860 420" width="860" height="420" role="img" aria-label="Largest request of each step (MB, uncompressed)">+<style>+ svg { --surface:#fcfcfb; --ink:#0b0b0b; --ink2:#52514e; --muted:#898781; --grid:#e1e0d9; --base:#c3c2b7; --s1:#2a78d6; --s2:#eb6834; }+ @media (prefers-color-scheme: dark) { svg { --surface:#1a1a19; --ink:#f0efec; --ink2:#c3c2b7; --muted:#898781; --grid:#2c2c2a; --base:#383835; --s1:#3987e5; --s2:#d95926; } }+ .bg { fill: var(--surface); }+ text { font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; }+ .title { font-size: 15px; font-weight: 600; fill: var(--ink); }+ .legend { font-size: 12px; fill: var(--ink2); }+ .tick { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }+ .note { font-size: 12px; fill: var(--ink2); }+ .stuck { font-size: 11px; fill: var(--ink); }+ .stuck-mark { fill: var(--ink2); }+ .leader { stroke: var(--ink2); stroke-width: 1; }+ .grid { stroke: var(--grid); stroke-width: 1; }+ .base { stroke: var(--base); stroke-width: 1; }+ .full { fill: var(--s1); }+ .sent { fill: var(--s2); }+</style>+<rect class="bg" width="860" height="420" rx="8"/>+<text class="title" x="56" y="24">Largest request of each step (MB, uncompressed)</text>+<rect class="full" x="56" y="38" width="10" height="10" rx="2"/><text class="legend" x="72" y="47">Whole conversation (what Codex sends without the plugin)</text>+<rect class="sent" x="432" y="38" width="10" height="10" rx="2"/><text class="legend" x="448" y="47">Sent with the plugin</text>+<line class="grid" x1="56" x2="844" y1="328" y2="328"/><text class="tick" x="48" y="332" text-anchor="end">0</text>+<line class="grid" x1="56" x2="844" y1="286.3333333333333" y2="286.3333333333333"/><text class="tick" x="48" y="290.3333333333333" text-anchor="end">10</text>+<line class="grid" x1="56" x2="844" y1="244.66666666666669" y2="244.66666666666669"/><text class="tick" x="48" y="248.66666666666669" text-anchor="end">20</text>+<line class="grid" x1="56" x2="844" y1="203" y2="203"/><text class="tick" x="48" y="207" text-anchor="end">30</text>+<line class="grid" x1="56" x2="844" y1="161.33333333333334" y2="161.33333333333334"/><text class="tick" x="48" y="165.33333333333334" text-anchor="end">40</text>+<line class="grid" x1="56" x2="844" y1="119.66666666666666" y2="119.66666666666666"/><text class="tick" x="48" y="123.66666666666666" text-anchor="end">50</text>+<line class="grid" x1="56" x2="844" y1="78" y2="78"/><text class="tick" x="48" y="82" text-anchor="end">60</text>+<text class="tick" x="48" y="68" text-anchor="end">MB</text>+<path class="full" d="M65.625,328 V288.6529125 Q65.625,284.6529125 69.625,284.6529125 H75.625 Q79.625,284.6529125 79.625,288.6529125 V328 Z"><title>T1: 10.40 MB</title></path>+<path class="sent" d="M81.625,328 V288.6403583333333 Q81.625,284.6403583333333 85.625,284.6403583333333 H91.625 Q95.625,284.6403583333333 95.625,288.6403583333333 V328 Z"><title>T1: 10.41 MB</title></path>+<text class="tick" x="80.625" y="346" text-anchor="middle">T1</text>+<path class="full" d="M114.875,328 V252.37787500000002 Q114.875,248.37787500000002 118.875,248.37787500000002 H124.875 Q128.875,248.37787500000002 128.875,252.37787500000002 V328 Z"><title>T2: 19.11 MB</title></path>+<path class="sent" d="M130.875,328 V295.2847791666667 Q130.875,291.2847791666667 134.875,291.2847791666667 H140.875 Q144.875,291.2847791666667 144.875,295.2847791666667 V328 Z"><title>T2: 8.81 MB</title></path>+<text class="tick" x="129.875" y="346" text-anchor="middle">T2</text>+<path class="full" d="M164.125,328 V233.03399583333334 Q164.125,229.03399583333334 168.125,229.03399583333334 H174.125 Q178.125,229.03399583333334 178.125,233.03399583333334 V328 Z"><title>T3: 23.75 MB</title></path>+<path class="sent" d="M180.125,328 V312.20965 Q180.125,308.20965 184.125,308.20965 H190.125 Q194.125,308.20965 194.125,312.20965 V328 Z"><title>T3: 4.75 MB</title></path>+<text class="tick" x="179.125" y="346" text-anchor="middle">T3</text>+<path class="full" d="M213.375,328 V195.26289166666666 Q213.375,191.26289166666666 217.375,191.26289166666666 H223.375 Q227.375,191.26289166666666 227.375,195.26289166666666 V328 Z"><title>T4: 32.82 MB</title></path>+<path class="sent" d="M229.375,328 V293.7773375 Q229.375,289.7773375 233.375,289.7773375 H239.375 Q243.375,289.7773375 243.375,293.7773375 V328 Z"><title>T4: 9.17 MB</title></path>+<text class="tick" x="228.375" y="346" text-anchor="middle">T4</text>+<path class="full" d="M262.625,328 V195.25975 Q262.625,191.25975 266.625,191.25975 H272.625 Q276.625,191.25975 276.625,195.25975 V328 Z"><title>T5: 32.82 MB</title></path>+<path class="sent" d="M278.625,328 V328 Q278.625,327 279.625,327 H291.625 Q292.625,327 292.625,328 V328 Z"><title>T5: 0.11 MB</title></path>+<text class="tick" x="277.625" y="346" text-anchor="middle">T5</text>+<path class="full" d="M311.875,328 V155.33929583333335 Q311.875,151.33929583333335 315.875,151.33929583333335 H321.875 Q325.875,151.33929583333335 325.875,155.33929583333335 V328 Z"><title>T6: 42.40 MB</title></path>+<path class="sent" d="M327.875,328 V291.6168833333333 Q327.875,287.6168833333333 331.875,287.6168833333333 H337.875 Q341.875,287.6168833333333 341.875,291.6168833333333 V328 Z"><title>T6: 9.69 MB</title></path>+<text class="tick" x="326.875" y="346" text-anchor="middle">T6</text>+<path class="full" d="M361.125,328 V155.33695833333334 Q361.125,151.33695833333334 365.125,151.33695833333334 H371.125 Q375.125,151.33695833333334 375.125,155.33695833333334 V328 Z"><title>compact: 42.40 MB</title></path>+<path class="sent" d="M377.125,328 V328 Q377.125,327 378.125,327 H390.125 Q391.125,327 391.125,328 V328 Z"><title>compact: 0.11 MB</title></path>+<text class="tick" x="376.125" y="346" text-anchor="middle">compact</text>+<path class="full" d="M410.375,328 V155.31082916666668 Q410.375,151.31082916666668 414.375,151.31082916666668 H420.375 Q424.375,151.31082916666668 424.375,155.31082916666668 V328 Z"><title>F1: 42.41 MB</title></path>+<path class="sent" d="M426.375,328 V328 Q426.375,327 427.375,327 H439.375 Q440.375,327 440.375,328 V328 Z"><title>F1: 0.12 MB</title></path>+<text class="tick" x="425.375" y="346" text-anchor="middle">F1</text>+<line class="leader" x1="425.375" x2="425.375" y1="94.66666666666666" y2="139.31082916666668"/><path class="stuck-mark" d="M420.375,139.31082916666668 l5,8 l5,-8 z"/><text class="stuck" x="431.375" y="94.5">Without the plugin: 42.4 MB, could not be sent. With it: 0.12 MB</text>+<path class="full" d="M459.625,328 V155.30895833333335 Q459.625,151.30895833333335 463.625,151.30895833333335 H469.625 Q473.625,151.30895833333335 473.625,155.30895833333335 V328 Z"><title>F2: 42.41 MB</title></path>+<path class="sent" d="M475.625,328 V328 Q475.625,327 476.625,327 H488.625 Q489.625,327 489.625,328 V328 Z"><title>F2: 0.12 MB</title></path>+<text class="tick" x="474.625" y="346" text-anchor="middle">F2</text>+<path class="full" d="M508.875,328 V155.30569583333332 Q508.875,151.30569583333332 512.875,151.30569583333332 H518.875 Q522.875,151.30569583333332 522.875,155.30569583333332 V328 Z"><title>F3: 42.41 MB</title></path>+<path class="sent" d="M524.875,328 V328 Q524.875,327 525.875,327 H537.875 Q538.875,327 538.875,328 V328 Z"><title>F3: 0.12 MB</title></path>+<text class="tick" x="523.875" y="346" text-anchor="middle">F3</text>+<path class="full" d="M558.125,328 V155.30260833333332 Q558.125,151.30260833333332 562.125,151.30260833333332 H568.125 Q572.125,151.30260833333332 572.125,155.30260833333332 V328 Z"><title>F4: 42.41 MB</title></path>+<path class="sent" d="M574.125,328 V328 Q574.125,327 575.125,327 H587.125 Q588.125,327 588.125,328 V328 Z"><title>F4: 0.12 MB</title></path>+<text class="tick" x="573.125" y="346" text-anchor="middle">F4</text>+<path class="full" d="M607.375,328 V155.29952916666664 Q607.375,151.29952916666664 611.375,151.29952916666664 H617.375 Q621.375,151.29952916666664 621.375,155.29952916666664 V328 Z"><title>F5: 42.41 MB</title></path>+<path class="sent" d="M623.375,328 V328 Q623.375,327 624.375,327 H636.375 Q637.375,327 637.375,328 V328 Z"><title>F5: 0.12 MB</title></path>+<text class="tick" x="622.375" y="346" text-anchor="middle">F5</text>+<path class="full" d="M656.625,328 V155.2964375 Q656.625,151.2964375 660.625,151.2964375 H666.625 Q670.625,151.2964375 670.625,155.2964375 V328 Z"><title>F6: 42.41 MB</title></path>+<path class="sent" d="M672.625,328 V328 Q672.625,327 673.625,327 H685.625 Q686.625,327 686.625,328 V328 Z"><title>F6: 0.12 MB</title></path>+<text class="tick" x="671.625" y="346" text-anchor="middle">F6</text>+<path class="full" d="M705.875,328 V135.40407916666666 Q705.875,131.40407916666666 709.875,131.40407916666666 H715.875 Q719.875,131.40407916666666 719.875,135.40407916666666 V328 Z"><title>D1: 47.18 MB</title></path>+<path class="sent" d="M721.875,328 V311.59608333333335 Q721.875,307.59608333333335 725.875,307.59608333333335 H731.875 Q735.875,307.59608333333335 735.875,311.59608333333335 V328 Z"><title>D1: 4.90 MB</title></path>+<text class="tick" x="720.875" y="346" text-anchor="middle">D1</text>+<path class="full" d="M755.125,328 V113.74248333333333 Q755.125,109.74248333333333 759.125,109.74248333333333 H765.125 Q769.125,109.74248333333333 769.125,113.74248333333333 V328 Z"><title>D2: 52.38 MB</title></path>+<path class="sent" d="M771.125,328 V309.8039166666667 Q771.125,305.8039166666667 775.125,305.8039166666667 H781.125 Q785.125,305.8039166666667 785.125,309.8039166666667 V328 Z"><title>D2: 5.33 MB</title></path>+<text class="tick" x="770.125" y="346" text-anchor="middle">D2</text>+<path class="full" d="M804.375,328 V113.74067916666667 Q804.375,109.74067916666667 808.375,109.74067916666667 H814.375 Q818.375,109.74067916666667 818.375,113.74067916666667 V328 Z"><title>N1: 52.38 MB</title></path>+<path class="sent" d="M820.375,328 V328 Q820.375,327 821.375,327 H833.375 Q834.375,327 834.375,328 V328 Z"><title>N1: 0.13 MB</title></path>+<text class="tick" x="819.375" y="346" text-anchor="middle">N1</text>+<line class="base" x1="56" x2="844" y1="328" y2="328"/>+<text class="note" x="56" y="380">Task 2: six turns of uploads, a compaction, nine questions. D1 and D2 need a corner digit: the plugin fetched that one original for the turn.</text>+</svg>diff --git a/eval/results/2026-10-24/request-size-zh.svg b/eval/results/2026-10-24/request-size-zh.svgnew file mode 100644index 0000000..71b40a1--- /dev/null+++ b/eval/results/2026-10-24/request-size-zh.svg@@ -0,0 +1,82 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 860 420" width="860" height="420" role="img" aria-label="每一步最大的那次请求(MB,未压缩)">+<style>+ svg { --surface:#fcfcfb; --ink:#0b0b0b; --ink2:#52514e; --muted:#898781; --grid:#e1e0d9; --base:#c3c2b7; --s1:#2a78d6; --s2:#eb6834; }+ @media (prefers-color-scheme: dark) { svg { --surface:#1a1a19; --ink:#f0efec; --ink2:#c3c2b7; --muted:#898781; --grid:#2c2c2a; --base:#383835; --s1:#3987e5; --s2:#d95926; } }+ .bg { fill: var(--surface); }+ text { font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; }+ .title { font-size: 15px; font-weight: 600; fill: var(--ink); }+ .legend { font-size: 12px; fill: var(--ink2); }+ .tick { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }+ .note { font-size: 12px; fill: var(--ink2); }+ .stuck { font-size: 11px; fill: var(--ink); }+ .stuck-mark { fill: var(--ink2); }+ .leader { stroke: var(--ink2); stroke-width: 1; }+ .grid { stroke: var(--grid); stroke-width: 1; }+ .base { stroke: var(--base); stroke-width: 1; }+ .full { fill: var(--s1); }+ .sent { fill: var(--s2); }+</style>+<rect class="bg" width="860" height="420" rx="8"/>+<text class="title" x="56" y="24">每一步最大的那次请求(MB,未压缩)</text>+<rect class="full" x="56" y="38" width="10" height="10" rx="2"/><text class="legend" x="72" y="47">完整对话(不装插件时要发的)</text>+<rect class="sent" x="282" y="38" width="10" height="10" rx="2"/><text class="legend" x="298" y="47">装插件后实际发出的</text>+<line class="grid" x1="56" x2="844" y1="328" y2="328"/><text class="tick" x="48" y="332" text-anchor="end">0</text>+<line class="grid" x1="56" x2="844" y1="286.3333333333333" y2="286.3333333333333"/><text class="tick" x="48" y="290.3333333333333" text-anchor="end">10</text>+<line class="grid" x1="56" x2="844" y1="244.66666666666669" y2="244.66666666666669"/><text class="tick" x="48" y="248.66666666666669" text-anchor="end">20</text>+<line class="grid" x1="56" x2="844" y1="203" y2="203"/><text class="tick" x="48" y="207" text-anchor="end">30</text>+<line class="grid" x1="56" x2="844" y1="161.33333333333334" y2="161.33333333333334"/><text class="tick" x="48" y="165.33333333333334" text-anchor="end">40</text>+<line class="grid" x1="56" x2="844" y1="119.66666666666666" y2="119.66666666666666"/><text class="tick" x="48" y="123.66666666666666" text-anchor="end">50</text>+<line class="grid" x1="56" x2="844" y1="78" y2="78"/><text class="tick" x="48" y="82" text-anchor="end">60</text>+<text class="tick" x="48" y="68" text-anchor="end">MB</text>+<path class="full" d="M65.625,328 V288.6529125 Q65.625,284.6529125 69.625,284.6529125 H75.625 Q79.625,284.6529125 79.625,288.6529125 V328 Z"><title>T1: 10.40 MB</title></path>+<path class="sent" d="M81.625,328 V288.6403583333333 Q81.625,284.6403583333333 85.625,284.6403583333333 H91.625 Q95.625,284.6403583333333 95.625,288.6403583333333 V328 Z"><title>T1: 10.41 MB</title></path>+<text class="tick" x="80.625" y="346" text-anchor="middle">T1</text>+<path class="full" d="M114.875,328 V252.37787500000002 Q114.875,248.37787500000002 118.875,248.37787500000002 H124.875 Q128.875,248.37787500000002 128.875,252.37787500000002 V328 Z"><title>T2: 19.11 MB</title></path>+<path class="sent" d="M130.875,328 V295.2847791666667 Q130.875,291.2847791666667 134.875,291.2847791666667 H140.875 Q144.875,291.2847791666667 144.875,295.2847791666667 V328 Z"><title>T2: 8.81 MB</title></path>+<text class="tick" x="129.875" y="346" text-anchor="middle">T2</text>+<path class="full" d="M164.125,328 V233.03399583333334 Q164.125,229.03399583333334 168.125,229.03399583333334 H174.125 Q178.125,229.03399583333334 178.125,233.03399583333334 V328 Z"><title>T3: 23.75 MB</title></path>+<path class="sent" d="M180.125,328 V312.20965 Q180.125,308.20965 184.125,308.20965 H190.125 Q194.125,308.20965 194.125,312.20965 V328 Z"><title>T3: 4.75 MB</title></path>+<text class="tick" x="179.125" y="346" text-anchor="middle">T3</text>+<path class="full" d="M213.375,328 V195.26289166666666 Q213.375,191.26289166666666 217.375,191.26289166666666 H223.375 Q227.375,191.26289166666666 227.375,195.26289166666666 V328 Z"><title>T4: 32.82 MB</title></path>+<path class="sent" d="M229.375,328 V293.7773375 Q229.375,289.7773375 233.375,289.7773375 H239.375 Q243.375,289.7773375 243.375,293.7773375 V328 Z"><title>T4: 9.17 MB</title></path>+<text class="tick" x="228.375" y="346" text-anchor="middle">T4</text>+<path class="full" d="M262.625,328 V195.25975 Q262.625,191.25975 266.625,191.25975 H272.625 Q276.625,191.25975 276.625,195.25975 V328 Z"><title>T5: 32.82 MB</title></path>+<path class="sent" d="M278.625,328 V328 Q278.625,327 279.625,327 H291.625 Q292.625,327 292.625,328 V328 Z"><title>T5: 0.11 MB</title></path>+<text class="tick" x="277.625" y="346" text-anchor="middle">T5</text>+<path class="full" d="M311.875,328 V155.33929583333335 Q311.875,151.33929583333335 315.875,151.33929583333335 H321.875 Q325.875,151.33929583333335 325.875,155.33929583333335 V328 Z"><title>T6: 42.40 MB</title></path>+<path class="sent" d="M327.875,328 V291.6168833333333 Q327.875,287.6168833333333 331.875,287.6168833333333 H337.875 Q341.875,287.6168833333333 341.875,291.6168833333333 V328 Z"><title>T6: 9.69 MB</title></path>+<text class="tick" x="326.875" y="346" text-anchor="middle">T6</text>+<path class="full" d="M361.125,328 V155.33695833333334 Q361.125,151.33695833333334 365.125,151.33695833333334 H371.125 Q375.125,151.33695833333334 375.125,155.33695833333334 V328 Z"><title>压缩: 42.40 MB</title></path>+<path class="sent" d="M377.125,328 V328 Q377.125,327 378.125,327 H390.125 Q391.125,327 391.125,328 V328 Z"><title>压缩: 0.11 MB</title></path>+<text class="tick" x="376.125" y="346" text-anchor="middle">压缩</text>+<path class="full" d="M410.375,328 V155.31082916666668 Q410.375,151.31082916666668 414.375,151.31082916666668 H420.375 Q424.375,151.31082916666668 424.375,155.31082916666668 V328 Z"><title>F1: 42.41 MB</title></path>+<path class="sent" d="M426.375,328 V328 Q426.375,327 427.375,327 H439.375 Q440.375,327 440.375,328 V328 Z"><title>F1: 0.12 MB</title></path>+<text class="tick" x="425.375" y="346" text-anchor="middle">F1</text>+<line class="leader" x1="425.375" x2="425.375" y1="94.66666666666666" y2="139.31082916666668"/><path class="stuck-mark" d="M420.375,139.31082916666668 l5,8 l5,-8 z"/><text class="stuck" x="431.375" y="94.5">不装插件:42.4 MB,发不出去;装插件:0.12 MB</text>+<path class="full" d="M459.625,328 V155.30895833333335 Q459.625,151.30895833333335 463.625,151.30895833333335 H469.625 Q473.625,151.30895833333335 473.625,155.30895833333335 V328 Z"><title>F2: 42.41 MB</title></path>+<path class="sent" d="M475.625,328 V328 Q475.625,327 476.625,327 H488.625 Q489.625,327 489.625,328 V328 Z"><title>F2: 0.12 MB</title></path>+<text class="tick" x="474.625" y="346" text-anchor="middle">F2</text>+<path class="full" d="M508.875,328 V155.30569583333332 Q508.875,151.30569583333332 512.875,151.30569583333332 H518.875 Q522.875,151.30569583333332 522.875,155.30569583333332 V328 Z"><title>F3: 42.41 MB</title></path>+<path class="sent" d="M524.875,328 V328 Q524.875,327 525.875,327 H537.875 Q538.875,327 538.875,328 V328 Z"><title>F3: 0.12 MB</title></path>+<text class="tick" x="523.875" y="346" text-anchor="middle">F3</text>+<path class="full" d="M558.125,328 V155.30260833333332 Q558.125,151.30260833333332 562.125,151.30260833333332 H568.125 Q572.125,151.30260833333332 572.125,155.30260833333332 V328 Z"><title>F4: 42.41 MB</title></path>+<path class="sent" d="M574.125,328 V328 Q574.125,327 575.125,327 H587.125 Q588.125,327 588.125,328 V328 Z"><title>F4: 0.12 MB</title></path>+<text class="tick" x="573.125" y="346" text-anchor="middle">F4</text>+<path class="full" d="M607.375,328 V155.29952916666664 Q607.375,151.29952916666664 611.375,151.29952916666664 H617.375 Q621.375,151.29952916666664 621.375,155.29952916666664 V328 Z"><title>F5: 42.41 MB</title></path>+<path class="sent" d="M623.375,328 V328 Q623.375,327 624.375,327 H636.375 Q637.375,327 637.375,328 V328 Z"><title>F5: 0.12 MB</title></path>+<text class="tick" x="622.375" y="346" text-anchor="middle">F5</text>+<path class="full" d="M656.625,328 V155.2964375 Q656.625,151.2964375 660.625,151.2964375 H666.625 Q670.625,151.2964375 670.625,155.2964375 V328 Z"><title>F6: 42.41 MB</title></path>+<path class="sent" d="M672.625,328 V328 Q672.625,327 673.625,327 H685.625 Q686.625,327 686.625,328 V328 Z"><title>F6: 0.12 MB</title></path>+<text class="tick" x="671.625" y="346" text-anchor="middle">F6</text>+<path class="full" d="M705.875,328 V135.40407916666666 Q705.875,131.40407916666666 709.875,131.40407916666666 H715.875 Q719.875,131.40407916666666 719.875,135.40407916666666 V328 Z"><title>D1: 47.18 MB</title></path>+<path class="sent" d="M721.875,328 V311.59608333333335 Q721.875,307.59608333333335 725.875,307.59608333333335 H731.875 Q735.875,307.59608333333335 735.875,311.59608333333335 V328 Z"><title>D1: 4.90 MB</title></path>+<text class="tick" x="720.875" y="346" text-anchor="middle">D1</text>+<path class="full" d="M755.125,328 V113.74248333333333 Q755.125,109.74248333333333 759.125,109.74248333333333 H765.125 Q769.125,109.74248333333333 769.125,113.74248333333333 V328 Z"><title>D2: 52.38 MB</title></path>+<path class="sent" d="M771.125,328 V309.8039166666667 Q771.125,305.8039166666667 775.125,305.8039166666667 H781.125 Q785.125,305.8039166666667 785.125,309.8039166666667 V328 Z"><title>D2: 5.33 MB</title></path>+<text class="tick" x="770.125" y="346" text-anchor="middle">D2</text>+<path class="full" d="M804.375,328 V113.74067916666667 Q804.375,109.74067916666667 808.375,109.74067916666667 H814.375 Q818.375,109.74067916666667 818.375,113.74067916666667 V328 Z"><title>N1: 52.38 MB</title></path>+<path class="sent" d="M820.375,328 V328 Q820.375,327 821.375,327 H833.375 Q834.375,327 834.375,328 V328 Z"><title>N1: 0.13 MB</title></path>+<text class="tick" x="819.375" y="346" text-anchor="middle">N1</text>+<line class="base" x1="56" x2="844" y1="328" y2="328"/>+<text class="note" x="56" y="380">任务二:6 轮传图,压缩,再问 9 个问题。D1、D2 要看角落的数字,插件当轮取回了那一张原图。</text>+</svg>diff --git a/eval/results/2026-10-24/runs/run1-off.json b/eval/results/2026-10-24/runs/run1-off.jsonnew file mode 100644index 0000000..297d238--- /dev/null+++ b/eval/results/2026-10-24/runs/run1-off.json@@ -0,0 +1,644 @@+{+ "arm": "off",+ "model": "gpt-6-sol",+ "effort": "low",+ "createdAt": "2026-10-24T13:17:11.188Z",+ "threads": {+ "X": [+ {+ "step": "T1",+ "status": "completed",+ "seconds": 24,+ "reply": "两张关键帧分别是书房里的女主和男主正面镜头:女主红衣、黑色长发,男主蓝衣、棕色短发。背景和构图一致,适合接成同一场的对话镜头。",+ "tokens": {+ "total": {+ "totalTokens": 25033,+ "inputTokens": 24969,+ "cachedInputTokens": 11904,+ "cacheWriteInputTokens": 0,+ "outputTokens": 64,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 25033,+ "inputTokens": 24969,+ "cachedInputTokens": 11904,+ "cacheWriteInputTokens": 0,+ "outputTokens": 64,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "T2",+ "status": "completed",+ "seconds": 19,+ "reply": "第一张是女主在雨中的正面特写,神情显得紧张;第二张只有雨夜天空和一处暖光,可以接在特写后,作为短暂的空镜。",+ "tokens": {+ "total": {+ "totalTokens": 53907,+ "inputTokens": 53794,+ "cachedInputTokens": 36480,+ "cacheWriteInputTokens": 0,+ "outputTokens": 113,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 28874,+ "inputTokens": 28825,+ "cachedInputTokens": 24576,+ "cacheWriteInputTokens": 0,+ "outputTokens": 49,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "T3",+ "status": "completed",+ "seconds": 11,+ "reply": "这版女主的脸和红衣清楚多了,雨夜氛围也还在;可以替换上一版的女主特写。",+ "tokens": {+ "total": {+ "totalTokens": 84728,+ "inputTokens": 84577,+ "cachedInputTokens": 64896,+ "cacheWriteInputTokens": 0,+ "outputTokens": 151,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 30821,+ "inputTokens": 30783,+ "cachedInputTokens": 28416,+ "cacheWriteInputTokens": 0,+ "outputTokens": 38,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "T4",+ "status": "completed",+ "seconds": 21,+ "reply": "第三场是黄昏海边的男女主正面镜头:先给男主中景,再切女主特写。两张的暮色和海面背景衔接得上。",+ "tokens": {+ "total": {+ "totalTokens": 119390,+ "inputTokens": 119191,+ "cachedInputTokens": 95232,+ "cacheWriteInputTokens": 0,+ "outputTokens": 199,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 34662,+ "inputTokens": 34614,+ "cachedInputTokens": 30336,+ "cacheWriteInputTokens": 0,+ "outputTokens": 48,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "T5",+ "status": "completed",+ "seconds": 4,+ "reply": "记住了:第三场海边的第二张,女主的脸以这版为参考。",+ "tokens": {+ "total": {+ "totalTokens": 154095,+ "inputTokens": 153870,+ "cachedInputTokens": 129408,+ "cacheWriteInputTokens": 0,+ "outputTokens": 225,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 34705,+ "inputTokens": 34679,+ "cachedInputTokens": 34176,+ "cacheWriteInputTokens": 0,+ "outputTokens": 26,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "T6",+ "status": "completed",+ "seconds": 21,+ "reply": "第四场两张都在竹林:先是红衣女主的正面镜头,再切蓝衣男主的面部特写。人物和场景都接得上。",+ "tokens": {+ "total": {+ "totalTokens": 192634,+ "inputTokens": 192364,+ "cachedInputTokens": 163968,+ "cacheWriteInputTokens": 0,+ "outputTokens": 270,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 38539,+ "inputTokens": 38494,+ "cachedInputTokens": 34560,+ "cacheWriteInputTokens": 0,+ "outputTokens": 45,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "F1",+ "status": "completed",+ "seconds": 5,+ "question": "F1",+ "expected": "cnlo.png",+ "said": "cnlo.png",+ "verdict": "right",+ "reply": "cnlo.png",+ "tokens": {+ "total": {+ "totalTokens": 231209,+ "inputTokens": 230932,+ "cachedInputTokens": 202112,+ "cacheWriteInputTokens": 0,+ "outputTokens": 277,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 38575,+ "inputTokens": 38568,+ "cachedInputTokens": 38144,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "F2",+ "status": "completed",+ "seconds": 5,+ "question": "F2",+ "expected": "fxai.png",+ "said": "fxai.png",+ "verdict": "right",+ "reply": "fxai.png",+ "tokens": {+ "total": {+ "totalTokens": 269811,+ "inputTokens": 269527,+ "cachedInputTokens": 240256,+ "cacheWriteInputTokens": 0,+ "outputTokens": 284,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 38602,+ "inputTokens": 38595,+ "cachedInputTokens": 38144,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "F3",+ "status": "completed",+ "seconds": 5,+ "question": "F3",+ "expected": "mtgb.png",+ "said": "mtgb.png",+ "verdict": "right",+ "reply": "mtgb.png",+ "tokens": {+ "total": {+ "totalTokens": 308454,+ "inputTokens": 308163,+ "cachedInputTokens": 278784,+ "cacheWriteInputTokens": 0,+ "outputTokens": 291,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 38643,+ "inputTokens": 38636,+ "cachedInputTokens": 38528,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "F4",+ "status": "completed",+ "seconds": 4,+ "question": "F4",+ "expected": "wdfa.png",+ "said": "wdfa.png",+ "verdict": "right",+ "reply": "wdfa.png",+ "tokens": {+ "total": {+ "totalTokens": 347127,+ "inputTokens": 346829,+ "cachedInputTokens": 317312,+ "cacheWriteInputTokens": 0,+ "outputTokens": 298,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 38673,+ "inputTokens": 38666,+ "cachedInputTokens": 38528,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "F5",+ "status": "completed",+ "seconds": 5,+ "question": "F5",+ "expected": "zrue.png",+ "said": "zrue.png",+ "verdict": "right",+ "reply": "zrue.png",+ "tokens": {+ "total": {+ "totalTokens": 385829,+ "inputTokens": 385524,+ "cachedInputTokens": 355840,+ "cacheWriteInputTokens": 0,+ "outputTokens": 305,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 38702,+ "inputTokens": 38695,+ "cachedInputTokens": 38528,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "D1",+ "status": "completed",+ "seconds": 4,+ "question": "D1",+ "expected": "7",+ "said": "7",+ "verdict": "right",+ "reply": "7",+ "tokens": {+ "total": {+ "totalTokens": 424564,+ "inputTokens": 424254,+ "cachedInputTokens": 394368,+ "cacheWriteInputTokens": 0,+ "outputTokens": 310,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 38735,+ "inputTokens": 38730,+ "cachedInputTokens": 38528,+ "cacheWriteInputTokens": 0,+ "outputTokens": 5,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "D2",+ "status": "completed",+ "seconds": 5,+ "question": "D2",+ "expected": "4",+ "said": "4",+ "verdict": "right",+ "reply": "4",+ "tokens": {+ "total": {+ "totalTokens": 463332,+ "inputTokens": 463017,+ "cachedInputTokens": 433024,+ "cacheWriteInputTokens": 0,+ "outputTokens": 315,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 38768,+ "inputTokens": 38763,+ "cachedInputTokens": 38656,+ "cacheWriteInputTokens": 0,+ "outputTokens": 5,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "N1",+ "status": "completed",+ "seconds": 5,+ "question": "N1",+ "expected": "weather",+ "said": "The weather is really nice today.",+ "verdict": "right",+ "reply": "The weather is really nice today.",+ "tokens": {+ "total": {+ "totalTokens": 502129,+ "inputTokens": 501803,+ "cachedInputTokens": 471680,+ "cacheWriteInputTokens": 0,+ "outputTokens": 326,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 38797,+ "inputTokens": 38786,+ "cachedInputTokens": 38656,+ "cacheWriteInputTokens": 0,+ "outputTokens": 11,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "F6",+ "status": "timeout",+ "seconds": 182,+ "question": "F6",+ "expected": "jbwe.png",+ "said": null,+ "verdict": "none",+ "requestMB": [+ {+ "status": 0,+ "fullMB": 42.42,+ "sentMB": 42.42,+ "sentWireMB": 31.8,+ "error": "Error: socket hang up"+ },+ {+ "status": 0,+ "fullMB": 42.42,+ "sentMB": 42.42,+ "sentWireMB": 31.8,+ "error": "Error: socket hang up"+ },+ {+ "status": 0,+ "fullMB": 42.42,+ "sentMB": 42.42,+ "sentWireMB": 31.8,+ "error": "client closed before the response ended"+ }+ ],+ "reconnects": [+ "Reconnecting... 2/5",+ "Reconnecting... 3/5",+ "Reconnecting... 4/5",+ "Reconnecting... 5/5"+ ]+ }+ ],+ "Y": [+ {+ "step": "T1",+ "status": "completed",+ "seconds": 42,+ "reply": "两张关键帧都在书房:女主穿红衣、留黑色长发,男主穿蓝衣、留棕色短发。两人分别正对镜头,画风和构图一致。",+ "tokens": {+ "total": {+ "totalTokens": 25023,+ "inputTokens": 24969,+ "cachedInputTokens": 17920,+ "cacheWriteInputTokens": 0,+ "outputTokens": 54,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 25023,+ "inputTokens": 24969,+ "cachedInputTokens": 17920,+ "cacheWriteInputTokens": 0,+ "outputTokens": 54,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "T2",+ "status": "completed",+ "seconds": 22,+ "reply": "第二场第一张是女主在雨夜中的正面近景;第二张只见斜雨和远处的暖色灯光,像是用来交代街上的环境。",+ "tokens": {+ "total": {+ "totalTokens": 53884,+ "inputTokens": 53784,+ "cachedInputTokens": 42496,+ "cacheWriteInputTokens": 0,+ "outputTokens": 100,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 28861,+ "inputTokens": 28815,+ "cachedInputTokens": 24576,+ "cacheWriteInputTokens": 0,+ "outputTokens": 46,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "T3",+ "status": "completed",+ "seconds": 12,+ "reply": "这版女主的脸和红衣明显亮了,黑色长发也能看清,雨夜氛围还在。比上一版更容易辨认人物。",+ "tokens": {+ "total": {+ "totalTokens": 84697,+ "inputTokens": 84554,+ "cachedInputTokens": 70912,+ "cacheWriteInputTokens": 0,+ "outputTokens": 143,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 30813,+ "inputTokens": 30770,+ "cachedInputTokens": 28416,+ "cacheWriteInputTokens": 0,+ "outputTokens": 43,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "T4",+ "status": "completed",+ "seconds": 19,+ "reply": "第三场是黄昏海边的正面镜头:第一张拍男主,第二张切到女主近景。橙色天空和蓝色海面让场景一眼就能辨认。",+ "tokens": {+ "total": {+ "totalTokens": 119355,+ "inputTokens": 119160,+ "cachedInputTokens": 101248,+ "cacheWriteInputTokens": 0,+ "outputTokens": 195,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 34658,+ "inputTokens": 34606,+ "cachedInputTokens": 30336,+ "cacheWriteInputTokens": 0,+ "outputTokens": 52,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "T5",+ "status": "completed",+ "seconds": 5,+ "reply": "记住了:第三场黄昏海边的第二张,女主的脸作为后续参考。",+ "tokens": {+ "total": {+ "totalTokens": 154058,+ "inputTokens": 153835,+ "cachedInputTokens": 135424,+ "cacheWriteInputTokens": 0,+ "outputTokens": 223,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 34703,+ "inputTokens": 34675,+ "cachedInputTokens": 34176,+ "cacheWriteInputTokens": 0,+ "outputTokens": 28,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "T6",+ "status": "completed",+ "seconds": 21,+ "reply": "第四场两张都以竹林为背景:第一张是红衣女主的正面镜头,第二张是蓝衣男主的面部近景。人物特征与前面几场一致。",+ "tokens": {+ "total": {+ "totalTokens": 192601,+ "inputTokens": 192327,+ "cachedInputTokens": 169984,+ "cacheWriteInputTokens": 0,+ "outputTokens": 274,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 38543,+ "inputTokens": 38492,+ "cachedInputTokens": 34560,+ "cacheWriteInputTokens": 0,+ "outputTokens": 51,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "compact",+ "status": "completed",+ "seconds": 10,+ "tokens": {+ "total": {+ "totalTokens": 192601,+ "inputTokens": 192327,+ "cachedInputTokens": 169984,+ "cacheWriteInputTokens": 0,+ "outputTokens": 274,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 30846,+ "inputTokens": 0,+ "cachedInputTokens": 0,+ "cacheWriteInputTokens": 0,+ "outputTokens": 0,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": []+ },+ {+ "step": "F1",+ "status": "timeout",+ "seconds": 182,+ "question": "F1",+ "expected": "cnlo.png",+ "said": null,+ "verdict": "none",+ "requestMB": [+ {+ "status": 0,+ "fullMB": 42.4,+ "sentMB": 42.4,+ "sentWireMB": 31.79,+ "error": "Error: socket hang up"+ },+ {+ "status": 0,+ "fullMB": 42.4,+ "sentMB": 42.4,+ "sentWireMB": 31.79,+ "error": "Error: socket hang up"+ },+ {+ "status": 0,+ "fullMB": 42.4,+ "sentMB": 42.4,+ "sentWireMB": 31.79,+ "error": "client closed before the response ended"+ }+ ],+ "reconnects": [+ "Reconnecting... 2/5",+ "Reconnecting... 3/5",+ "Reconnecting... 4/5",+ "Reconnecting... 5/5"+ ]+ }+ ]+ }+}\ No newline at end of filediff --git a/eval/results/2026-10-24/runs/run1-on.json b/eval/results/2026-10-24/runs/run1-on.jsonnew file mode 100644index 0000000..0b242c6--- /dev/null+++ b/eval/results/2026-10-24/runs/run1-on.json@@ -0,0 +1,1123 @@+{+ "arm": "on",+ "model": "gpt-6-sol",+ "effort": "low",+ "createdAt": "2026-10-24T13:27:58.501Z",+ "threads": {+ "X": [+ {+ "step": "T1",+ "status": "completed",+ "seconds": 54,+ "reply": "两张关键帧的角色外观与设定一致,书架背景也让第一场的地点保持统一。",+ "tokens": {+ "total": {+ "totalTokens": 25850,+ "inputTokens": 25761,+ "cachedInputTokens": 11904,+ "cacheWriteInputTokens": 0,+ "outputTokens": 89,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 25850,+ "inputTokens": 25761,+ "cachedInputTokens": 11904,+ "cacheWriteInputTokens": 0,+ "outputTokens": 89,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 10.4,+ "sentMB": 10.41,+ "sentWireMB": 7.77+ }+ ]+ },+ {+ "step": "T2",+ "status": "completed",+ "seconds": 27,+ "reply": "第一张是女主的雨中正面特写;第二张只有雨夜背景和一处暖光,画面里没有人物。",+ "tokens": {+ "total": {+ "totalTokens": 52351,+ "inputTokens": 52160,+ "cachedInputTokens": 29824,+ "cacheWriteInputTokens": 0,+ "outputTokens": 191,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 26501,+ "inputTokens": 26399,+ "cachedInputTokens": 17920,+ "cacheWriteInputTokens": 0,+ "outputTokens": 102,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 19.11,+ "sentMB": 8.81,+ "sentWireMB": 6.58+ }+ ]+ },+ {+ "step": "T3",+ "status": "completed",+ "seconds": 14,+ "reply": "这版女主的脸和红衣都能清楚看见,比上一版更容易辨认;雨夜氛围也还在。",+ "tokens": {+ "total": {+ "totalTokens": 77199,+ "inputTokens": 76920,+ "cachedInputTokens": 52224,+ "cacheWriteInputTokens": 0,+ "outputTokens": 279,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 24848,+ "inputTokens": 24760,+ "cachedInputTokens": 22400,+ "cacheWriteInputTokens": 0,+ "outputTokens": 88,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 23.75,+ "sentMB": 4.75,+ "sentWireMB": 3.53+ }+ ]+ },+ {+ "step": "T4",+ "status": "completed",+ "seconds": 23,+ "reply": "两张分别拍男主和女主,发型、衣服颜色都与前面一致。橙色天空和蓝色海面也让黄昏海边的场景很明确。",+ "tokens": {+ "total": {+ "totalTokens": 104191,+ "inputTokens": 103799,+ "cachedInputTokens": 74624,+ "cacheWriteInputTokens": 0,+ "outputTokens": 392,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 26992,+ "inputTokens": 26879,+ "cachedInputTokens": 22400,+ "cacheWriteInputTokens": 0,+ "outputTokens": 113,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 32.82,+ "sentMB": 9.17,+ "sentWireMB": 6.85+ }+ ]+ },+ {+ "step": "T5",+ "status": "completed",+ "seconds": 5,+ "reply": "这张女主的脸可以作为后续画面保持一致的参考。",+ "tokens": {+ "total": {+ "totalTokens": 127557,+ "inputTokens": 127126,+ "cachedInputTokens": 97536,+ "cacheWriteInputTokens": 0,+ "outputTokens": 431,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23366,+ "inputTokens": 23327,+ "cachedInputTokens": 22912,+ "cacheWriteInputTokens": 0,+ "outputTokens": 39,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 32.82,+ "sentMB": 0.11,+ "sentWireMB": 0.04+ }+ ]+ },+ {+ "step": "T6",+ "status": "completed",+ "seconds": 21,+ "reply": "两张分别是竹林里的女主中景和男主特写,发色与衣服颜色都延续了前几场的设定。",+ "tokens": {+ "total": {+ "totalTokens": 154888,+ "inputTokens": 154360,+ "cachedInputTokens": 120448,+ "cacheWriteInputTokens": 0,+ "outputTokens": 528,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 27331,+ "inputTokens": 27234,+ "cachedInputTokens": 22912,+ "cacheWriteInputTokens": 0,+ "outputTokens": 97,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.4,+ "sentMB": 9.69,+ "sentWireMB": 7.23+ }+ ]+ },+ {+ "step": "F1",+ "status": "completed",+ "seconds": 6,+ "question": "F1",+ "expected": "cnlo.png",+ "said": "cnlo.png",+ "verdict": "right",+ "reply": "cnlo.png",+ "tokens": {+ "total": {+ "totalTokens": 178565,+ "inputTokens": 178030,+ "cachedInputTokens": 143360,+ "cacheWriteInputTokens": 0,+ "outputTokens": 535,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23677,+ "inputTokens": 23670,+ "cachedInputTokens": 22912,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.4,+ "sentMB": 0.11,+ "sentWireMB": 0.04+ }+ ]+ },+ {+ "step": "F2",+ "status": "completed",+ "seconds": 8,+ "question": "F2",+ "expected": "fxai.png",+ "said": "fxai.png",+ "verdict": "right",+ "reply": "fxai.png",+ "tokens": {+ "total": {+ "totalTokens": 202269,+ "inputTokens": 201727,+ "cachedInputTokens": 166912,+ "cacheWriteInputTokens": 0,+ "outputTokens": 542,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23704,+ "inputTokens": 23697,+ "cachedInputTokens": 23552,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.4,+ "sentMB": 0.11,+ "sentWireMB": 0.04+ }+ ]+ },+ {+ "step": "F3",+ "status": "completed",+ "seconds": 7,+ "question": "F3",+ "expected": "mtgb.png",+ "said": "mtgb.png",+ "verdict": "right",+ "reply": "mtgb.png",+ "tokens": {+ "total": {+ "totalTokens": 226014,+ "inputTokens": 225465,+ "cachedInputTokens": 190464,+ "cacheWriteInputTokens": 0,+ "outputTokens": 549,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23745,+ "inputTokens": 23738,+ "cachedInputTokens": 23552,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.4,+ "sentMB": 0.11,+ "sentWireMB": 0.04+ }+ ]+ },+ {+ "step": "F4",+ "status": "completed",+ "seconds": 6,+ "question": "F4",+ "expected": "wdfa.png",+ "said": "wdfa.png",+ "verdict": "right",+ "reply": "wdfa.png",+ "tokens": {+ "total": {+ "totalTokens": 249789,+ "inputTokens": 249233,+ "cachedInputTokens": 214016,+ "cacheWriteInputTokens": 0,+ "outputTokens": 556,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23775,+ "inputTokens": 23768,+ "cachedInputTokens": 23552,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.4,+ "sentMB": 0.12,+ "sentWireMB": 0.04+ }+ ]+ },+ {+ "step": "F5",+ "status": "completed",+ "seconds": 5,+ "question": "F5",+ "expected": "zrue.png",+ "said": "zrue.png",+ "verdict": "right",+ "reply": "zrue.png",+ "tokens": {+ "total": {+ "totalTokens": 273593,+ "inputTokens": 273030,+ "cachedInputTokens": 237568,+ "cacheWriteInputTokens": 0,+ "outputTokens": 563,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23804,+ "inputTokens": 23797,+ "cachedInputTokens": 23552,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.4,+ "sentMB": 0.12,+ "sentWireMB": 0.04+ }+ ]+ },+ {+ "step": "D1",+ "status": "completed",+ "seconds": 22,+ "question": "D1",+ "expected": "7",+ "said": "7",+ "verdict": "right",+ "reply": "我会取回竹林里男主的那张图,确认角落里的数字。 7",+ "fetched": [+ "tyop.png"+ ],+ "tokens": {+ "total": {+ "totalTokens": 347669,+ "inputTokens": 346978,+ "cachedInputTokens": 308864,+ "cacheWriteInputTokens": 0,+ "outputTokens": 691,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 26045,+ "inputTokens": 26040,+ "cachedInputTokens": 23936,+ "cacheWriteInputTokens": 0,+ "outputTokens": 5,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.4,+ "sentMB": 0.12,+ "sentWireMB": 0.04+ },+ {+ "status": 200,+ "fullMB": 42.41,+ "sentMB": 0.12,+ "sentWireMB": 0.04+ },+ {+ "status": 200,+ "fullMB": 47.18,+ "sentMB": 4.89,+ "sentWireMB": 3.62+ }+ ]+ },+ {+ "step": "D2",+ "status": "completed",+ "seconds": 19,+ "question": "D2",+ "expected": "4",+ "said": "4",+ "verdict": "right",+ "reply": "4",+ "fetched": [+ "hqkm.png"+ ],+ "tokens": {+ "total": {+ "totalTokens": 398204,+ "inputTokens": 397449,+ "cachedInputTokens": 356864,+ "cacheWriteInputTokens": 0,+ "outputTokens": 755,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 26219,+ "inputTokens": 26214,+ "cachedInputTokens": 24064,+ "cacheWriteInputTokens": 0,+ "outputTokens": 5,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 47.18,+ "sentMB": 0.12,+ "sentWireMB": 0.04+ },+ {+ "status": 200,+ "fullMB": 52.37,+ "sentMB": 5.32,+ "sentWireMB": 3.95+ }+ ]+ },+ {+ "step": "N1",+ "status": "completed",+ "seconds": 7,+ "question": "N1",+ "expected": "weather",+ "said": "The weather is really nice today.",+ "verdict": "right",+ "reply": "The weather is really nice today.",+ "tokens": {+ "total": {+ "totalTokens": 422636,+ "inputTokens": 421870,+ "cachedInputTokens": 380928,+ "cacheWriteInputTokens": 0,+ "outputTokens": 766,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 24432,+ "inputTokens": 24421,+ "cachedInputTokens": 24064,+ "cacheWriteInputTokens": 0,+ "outputTokens": 11,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 52.37,+ "sentMB": 0.12,+ "sentWireMB": 0.04+ }+ ]+ },+ {+ "step": "F6",+ "status": "completed",+ "seconds": 10,+ "question": "F6",+ "expected": "jbwe.png",+ "said": "jbwe.png",+ "verdict": "right",+ "reply": "jbwe.png",+ "tokens": {+ "total": {+ "totalTokens": 447603,+ "inputTokens": 446830,+ "cachedInputTokens": 405120,+ "cacheWriteInputTokens": 0,+ "outputTokens": 773,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 24967,+ "inputTokens": 24960,+ "cachedInputTokens": 24192,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 52.38,+ "sentMB": 0.13,+ "sentWireMB": 0.04+ }+ ]+ }+ ],+ "Y": [+ {+ "step": "T1",+ "status": "completed",+ "seconds": 26,+ "reply": "两张关键帧的人物特征和书房场景都清楚,构图也一致。画面分别是女主和男主的正面单人镜头。",+ "tokens": {+ "total": {+ "totalTokens": 25872,+ "inputTokens": 25761,+ "cachedInputTokens": 25344,+ "cacheWriteInputTokens": 0,+ "outputTokens": 111,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 25872,+ "inputTokens": 25761,+ "cachedInputTokens": 25344,+ "cacheWriteInputTokens": 0,+ "outputTokens": 111,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 10.4,+ "sentMB": 10.41,+ "sentWireMB": 7.77+ }+ ]+ },+ {+ "step": "T2",+ "status": "completed",+ "seconds": 19,+ "reply": "第一张是女主在雨中的正面特写;第二张只有雨幕和灯光,没有人物。两张的雨夜氛围一致。",+ "tokens": {+ "total": {+ "totalTokens": 52401,+ "inputTokens": 52190,+ "cachedInputTokens": 43264,+ "cacheWriteInputTokens": 0,+ "outputTokens": 211,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 26529,+ "inputTokens": 26429,+ "cachedInputTokens": 17920,+ "cacheWriteInputTokens": 0,+ "outputTokens": 100,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 19.11,+ "sentMB": 8.81,+ "sentWireMB": 6.58+ }+ ]+ },+ {+ "step": "T3",+ "status": "completed",+ "seconds": 13,+ "reply": "这一版女主的脸和红衣都看得更清楚,右上方的暖光也让雨夜画面更亮了。",+ "tokens": {+ "total": {+ "totalTokens": 77272,+ "inputTokens": 76973,+ "cachedInputTokens": 61184,+ "cacheWriteInputTokens": 0,+ "outputTokens": 299,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 24871,+ "inputTokens": 24783,+ "cachedInputTokens": 17920,+ "cacheWriteInputTokens": 0,+ "outputTokens": 88,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 23.75,+ "sentMB": 4.75,+ "sentWireMB": 3.53+ }+ ]+ },+ {+ "step": "T4",+ "status": "completed",+ "seconds": 23,+ "reply": "两张都是黄昏海边的正面镜头:男主是中景,女主是特写。橙色天空和蓝色海面让场景衔接得很清楚。",+ "tokens": {+ "total": {+ "totalTokens": 104291,+ "inputTokens": 103875,+ "cachedInputTokens": 79104,+ "cacheWriteInputTokens": 0,+ "outputTokens": 416,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 27019,+ "inputTokens": 26902,+ "cachedInputTokens": 17920,+ "cacheWriteInputTokens": 0,+ "outputTokens": 117,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 32.82,+ "sentMB": 9.17,+ "sentWireMB": 6.85+ }+ ]+ },+ {+ "step": "T5",+ "status": "completed",+ "seconds": 5,+ "reply": "这张女主的脸可以作为后续镜头的参考。",+ "tokens": {+ "total": {+ "totalTokens": 127684,+ "inputTokens": 127231,+ "cachedInputTokens": 102016,+ "cacheWriteInputTokens": 0,+ "outputTokens": 453,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23393,+ "inputTokens": 23356,+ "cachedInputTokens": 22912,+ "cacheWriteInputTokens": 0,+ "outputTokens": 37,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 32.82,+ "sentMB": 0.11,+ "sentWireMB": 0.04+ }+ ]+ },+ {+ "step": "T6",+ "status": "completed",+ "seconds": 23,+ "reply": "两张都能认出角色和竹林场景。女主是中景,男主是特写;如果要让这组镜头衔接更平顺,可以再统一景别。",+ "tokens": {+ "total": {+ "totalTokens": 155050,+ "inputTokens": 154492,+ "cachedInputTokens": 124928,+ "cacheWriteInputTokens": 0,+ "outputTokens": 558,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 27366,+ "inputTokens": 27261,+ "cachedInputTokens": 22912,+ "cacheWriteInputTokens": 0,+ "outputTokens": 105,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.4,+ "sentMB": 9.69,+ "sentWireMB": 7.23+ }+ ]+ },+ {+ "step": "compact",+ "status": "completed",+ "seconds": 14,+ "tokens": {+ "total": {+ "totalTokens": 155050,+ "inputTokens": 154492,+ "cachedInputTokens": 124928,+ "cacheWriteInputTokens": 0,+ "outputTokens": 558,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 31129,+ "inputTokens": 0,+ "cachedInputTokens": 0,+ "cacheWriteInputTokens": 0,+ "outputTokens": 0,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.4,+ "sentMB": 0.11,+ "sentWireMB": 0.04+ }+ ]+ },+ {+ "step": "F1",+ "status": "completed",+ "seconds": 6,+ "question": "F1",+ "expected": "cnlo.png",+ "said": "cnlo.png",+ "verdict": "right",+ "reply": "cnlo.png",+ "tokens": {+ "total": {+ "totalTokens": 178831,+ "inputTokens": 178266,+ "cachedInputTokens": 136832,+ "cacheWriteInputTokens": 0,+ "outputTokens": 565,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23781,+ "inputTokens": 23774,+ "cachedInputTokens": 11904,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.41,+ "sentMB": 0.12,+ "sentWireMB": 0.05+ }+ ]+ },+ {+ "step": "F2",+ "status": "completed",+ "seconds": 6,+ "question": "F2",+ "expected": "fxai.png",+ "said": "fxai.png",+ "verdict": "right",+ "reply": "fxai.png",+ "tokens": {+ "total": {+ "totalTokens": 202639,+ "inputTokens": 202067,+ "cachedInputTokens": 160384,+ "cacheWriteInputTokens": 0,+ "outputTokens": 572,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23808,+ "inputTokens": 23801,+ "cachedInputTokens": 23552,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.41,+ "sentMB": 0.12,+ "sentWireMB": 0.05+ }+ ]+ },+ {+ "step": "F3",+ "status": "completed",+ "seconds": 6,+ "question": "F3",+ "expected": "mtgb.png",+ "said": "mtgb.png",+ "verdict": "right",+ "reply": "mtgb.png",+ "tokens": {+ "total": {+ "totalTokens": 226488,+ "inputTokens": 225909,+ "cachedInputTokens": 184064,+ "cacheWriteInputTokens": 0,+ "outputTokens": 579,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23849,+ "inputTokens": 23842,+ "cachedInputTokens": 23680,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.41,+ "sentMB": 0.12,+ "sentWireMB": 0.05+ }+ ]+ },+ {+ "step": "F4",+ "status": "completed",+ "seconds": 8,+ "question": "F4",+ "expected": "wdfa.png",+ "said": "wdfa.png",+ "verdict": "right",+ "reply": "wdfa.png",+ "tokens": {+ "total": {+ "totalTokens": 250367,+ "inputTokens": 249781,+ "cachedInputTokens": 207744,+ "cacheWriteInputTokens": 0,+ "outputTokens": 586,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23879,+ "inputTokens": 23872,+ "cachedInputTokens": 23680,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.41,+ "sentMB": 0.12,+ "sentWireMB": 0.05+ }+ ]+ },+ {+ "step": "F5",+ "status": "completed",+ "seconds": 6,+ "question": "F5",+ "expected": "zrue.png",+ "said": "zrue.png",+ "verdict": "right",+ "reply": "zrue.png",+ "tokens": {+ "total": {+ "totalTokens": 274275,+ "inputTokens": 273682,+ "cachedInputTokens": 231424,+ "cacheWriteInputTokens": 0,+ "outputTokens": 593,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23908,+ "inputTokens": 23901,+ "cachedInputTokens": 23680,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.41,+ "sentMB": 0.12,+ "sentWireMB": 0.05+ }+ ]+ },+ {+ "step": "F6",+ "status": "completed",+ "seconds": 6,+ "question": "F6",+ "expected": "jbwe.png",+ "said": "jbwe.png",+ "verdict": "right",+ "reply": "jbwe.png",+ "tokens": {+ "total": {+ "totalTokens": 298213,+ "inputTokens": 297613,+ "cachedInputTokens": 255104,+ "cacheWriteInputTokens": 0,+ "outputTokens": 600,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23938,+ "inputTokens": 23931,+ "cachedInputTokens": 23680,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.41,+ "sentMB": 0.12,+ "sentWireMB": 0.05+ }+ ]+ },+ {+ "step": "D1",+ "status": "completed",+ "seconds": 20,+ "question": "D1",+ "expected": "7",+ "said": "7",+ "verdict": "right",+ "reply": "7",+ "fetched": [+ "tyop.png"+ ],+ "tokens": {+ "total": {+ "totalTokens": 372635,+ "inputTokens": 371928,+ "cachedInputTokens": 326784,+ "cacheWriteInputTokens": 0,+ "outputTokens": 707,+ "reasoningOutputTokens": 11+ },+ "last": {+ "totalTokens": 26158,+ "inputTokens": 26153,+ "cachedInputTokens": 24064,+ "cacheWriteInputTokens": 0,+ "outputTokens": 5,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.41,+ "sentMB": 0.12,+ "sentWireMB": 0.05+ },+ {+ "status": 200,+ "fullMB": 42.41,+ "sentMB": 0.13,+ "sentWireMB": 0.05+ },+ {+ "status": 200,+ "fullMB": 47.18,+ "sentMB": 4.9,+ "sentWireMB": 3.63+ }+ ]+ },+ {+ "step": "D2",+ "status": "completed",+ "seconds": 22,+ "question": "D2",+ "expected": "4",+ "said": "4",+ "verdict": "right",+ "reply": "4",+ "fetched": [+ "hqkm.png"+ ],+ "tokens": {+ "total": {+ "totalTokens": 423396,+ "inputTokens": 422625,+ "cachedInputTokens": 375040,+ "cacheWriteInputTokens": 0,+ "outputTokens": 771,+ "reasoningOutputTokens": 11+ },+ "last": {+ "totalTokens": 26332,+ "inputTokens": 26327,+ "cachedInputTokens": 24192,+ "cacheWriteInputTokens": 0,+ "outputTokens": 5,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 47.18,+ "sentMB": 0.13,+ "sentWireMB": 0.05+ },+ {+ "status": 200,+ "fullMB": 52.38,+ "sentMB": 5.33,+ "sentWireMB": 3.95+ }+ ]+ },+ {+ "step": "N1",+ "status": "completed",+ "seconds": 6,+ "question": "N1",+ "expected": "weather",+ "said": "The weather is nice today.",+ "verdict": "right",+ "reply": "The weather is nice today.",+ "tokens": {+ "total": {+ "totalTokens": 447940,+ "inputTokens": 447159,+ "cachedInputTokens": 399232,+ "cacheWriteInputTokens": 0,+ "outputTokens": 781,+ "reasoningOutputTokens": 11+ },+ "last": {+ "totalTokens": 24544,+ "inputTokens": 24534,+ "cachedInputTokens": 24192,+ "cacheWriteInputTokens": 0,+ "outputTokens": 10,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 52.38,+ "sentMB": 0.13,+ "sentWireMB": 0.05+ }+ ]+ }+ ]+ }+}\ No newline at end of filediff --git a/eval/results/2026-10-24/runs/run1-v07.json b/eval/results/2026-10-24/runs/run1-v07.jsonnew file mode 100644index 0000000..043a1de--- /dev/null+++ b/eval/results/2026-10-24/runs/run1-v07.json@@ -0,0 +1,725 @@+{+ "arm": "v07",+ "model": "gpt-6-sol",+ "effort": "low",+ "createdAt": "2026-10-24T13:35:38.017Z",+ "threads": {+ "X": [+ {+ "step": "T1",+ "status": "completed",+ "seconds": 30,+ "reply": "两张关键帧都在书房,背景是彩色书架:第一张是红衣、黑色长发的女主,第二张是蓝衣、棕色短发的男主。两人都正面面对镜头,构图和表情很接近。",+ "tokens": {+ "total": {+ "totalTokens": 25037,+ "inputTokens": 24969,+ "cachedInputTokens": 11904,+ "cacheWriteInputTokens": 0,+ "outputTokens": 68,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 25037,+ "inputTokens": 24969,+ "cachedInputTokens": 11904,+ "cacheWriteInputTokens": 0,+ "outputTokens": 68,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 10.4,+ "sentMB": 10.4,+ "sentWireMB": 7.77+ }+ ]+ },+ {+ "step": "T2",+ "status": "completed",+ "seconds": 21,+ "reply": "看到了:第一张是雨中的女主正面近景,红衣和黑色长发很醒目;第二张只有雨夜天空和一处暖黄色的灯光,画面里没有人物。",+ "tokens": {+ "total": {+ "totalTokens": 50701,+ "inputTokens": 50582,+ "cachedInputTokens": 32896,+ "cacheWriteInputTokens": 0,+ "outputTokens": 119,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 25664,+ "inputTokens": 25613,+ "cachedInputTokens": 20992,+ "cacheWriteInputTokens": 0,+ "outputTokens": 51,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 19.11,+ "sentMB": 8.81,+ "sentWireMB": 6.57+ }+ ]+ },+ {+ "step": "T3",+ "status": "completed",+ "seconds": 14,+ "reply": "这版能看清女主的脸、黑色长发和红衣了,雨线也很明显。表情偏愣住或警觉,右上方的暖光让雨夜有了些层次。",+ "tokens": {+ "total": {+ "totalTokens": 74730,+ "inputTokens": 74557,+ "cachedInputTokens": 53888,+ "cacheWriteInputTokens": 0,+ "outputTokens": 173,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 24029,+ "inputTokens": 23975,+ "cachedInputTokens": 20992,+ "cacheWriteInputTokens": 0,+ "outputTokens": 54,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 23.75,+ "sentMB": 4.75,+ "sentWireMB": 3.53+ }+ ]+ },+ {+ "step": "T4",+ "status": "completed",+ "seconds": 23,+ "reply": "第三场是黄昏海边:一张是蓝衣男主的正面中景,另一张是红衣女主的正面特写。橙色天空和蓝色海面把两张画面连在了一起。",+ "tokens": {+ "total": {+ "totalTokens": 100810,+ "inputTokens": 100579,+ "cachedInputTokens": 75776,+ "cacheWriteInputTokens": 0,+ "outputTokens": 231,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 26080,+ "inputTokens": 26022,+ "cachedInputTokens": 21888,+ "cacheWriteInputTokens": 0,+ "outputTokens": 58,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 32.82,+ "sentMB": 9.17,+ "sentWireMB": 6.84+ }+ ]+ },+ {+ "step": "T5",+ "status": "timeout",+ "seconds": 602,+ "requestMB": [+ {+ "status": 0,+ "fullMB": 32.82,+ "sentMB": 32.82,+ "sentWireMB": 24.59,+ "error": "client closed before the response ended"+ }+ ]+ }+ ],+ "Y": [+ {+ "step": "T1",+ "status": "completed",+ "seconds": 23,+ "reply": "两张关键帧分别是女主和男主在书房书架前的正面镜头:红衣黑长发、蓝衣棕短发,人物特征清楚。两帧构图一致,适合接成两人对话的正反打。",+ "tokens": {+ "total": {+ "totalTokens": 25036,+ "inputTokens": 24969,+ "cachedInputTokens": 17920,+ "cacheWriteInputTokens": 0,+ "outputTokens": 67,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 25036,+ "inputTokens": 24969,+ "cachedInputTokens": 17920,+ "cacheWriteInputTokens": 0,+ "outputTokens": 67,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 10.4,+ "sentMB": 10.4,+ "sentWireMB": 7.77+ }+ ]+ },+ {+ "step": "T2",+ "status": "completed",+ "seconds": 19,+ "reply": "第一张是红衣黑长发女主在雨中的正面特写;第二张只有雨夜和一处暖色灯光,没有人物。两张连起来,像是从女主的反应切到她眼前空荡的街道。",+ "tokens": {+ "total": {+ "totalTokens": 50709,+ "inputTokens": 50581,+ "cachedInputTokens": 38912,+ "cacheWriteInputTokens": 0,+ "outputTokens": 128,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 25673,+ "inputTokens": 25612,+ "cachedInputTokens": 20992,+ "cacheWriteInputTokens": 0,+ "outputTokens": 61,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 19.11,+ "sentMB": 8.81,+ "sentWireMB": 6.57+ }+ ]+ },+ {+ "step": "T3",+ "status": "completed",+ "seconds": 13,+ "reply": "这版女主的脸和红衣都清楚多了,雨夜氛围还在;她正面直视镜头,表情有些愣住。",+ "tokens": {+ "total": {+ "totalTokens": 74736,+ "inputTokens": 74565,+ "cachedInputTokens": 59904,+ "cacheWriteInputTokens": 0,+ "outputTokens": 171,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 24027,+ "inputTokens": 23984,+ "cachedInputTokens": 20992,+ "cacheWriteInputTokens": 0,+ "outputTokens": 43,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 23.75,+ "sentMB": 4.75,+ "sentWireMB": 3.53+ }+ ]+ },+ {+ "step": "T4",+ "status": "completed",+ "seconds": 20,+ "reply": "第一张是蓝衣男主在黄昏海边的正面中景,第二张切到红衣女主的正面特写。橙色天空和蓝色海面把两帧连在一起,女主睁大的眼睛让这个切换带出一点惊讶感。",+ "tokens": {+ "total": {+ "totalTokens": 100829,+ "inputTokens": 100585,+ "cachedInputTokens": 80896,+ "cacheWriteInputTokens": 0,+ "outputTokens": 244,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 26093,+ "inputTokens": 26020,+ "cachedInputTokens": 20992,+ "cacheWriteInputTokens": 0,+ "outputTokens": 73,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 32.82,+ "sentMB": 9.17,+ "sentWireMB": 6.84+ }+ ]+ },+ {+ "step": "T5",+ "status": "completed",+ "seconds": 7,+ "reply": "记住了:第三场海边的第二张(IMG-007)是目前最好的女主脸部参考。",+ "tokens": {+ "total": {+ "totalTokens": 123371,+ "inputTokens": 123097,+ "cachedInputTokens": 101888,+ "cacheWriteInputTokens": 0,+ "outputTokens": 274,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 22542,+ "inputTokens": 22512,+ "cachedInputTokens": 20992,+ "cacheWriteInputTokens": 0,+ "outputTokens": 30,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 32.82,+ "sentMB": 0.11,+ "sentWireMB": 0.04+ }+ ]+ },+ {+ "step": "T6",+ "status": "completed",+ "seconds": 23,+ "reply": "第一张是女主站在竹林中的正面镜头,红衣很醒目;第二张切到男主的面部特写,瞪大的眼睛带出惊讶感。",+ "tokens": {+ "total": {+ "totalTokens": 149751,+ "inputTokens": 149428,+ "cachedInputTokens": 124160,+ "cacheWriteInputTokens": 0,+ "outputTokens": 323,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 26380,+ "inputTokens": 26331,+ "cachedInputTokens": 22272,+ "cacheWriteInputTokens": 0,+ "outputTokens": 49,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.4,+ "sentMB": 9.69,+ "sentWireMB": 7.23+ }+ ]+ },+ {+ "step": "compact",+ "status": "completed",+ "seconds": 13,+ "tokens": {+ "total": {+ "totalTokens": 149751,+ "inputTokens": 149428,+ "cachedInputTokens": 124160,+ "cacheWriteInputTokens": 0,+ "outputTokens": 323,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 31017,+ "inputTokens": 0,+ "cachedInputTokens": 0,+ "cacheWriteInputTokens": 0,+ "outputTokens": 0,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.4,+ "sentMB": 0.11,+ "sentWireMB": 0.04+ }+ ]+ },+ {+ "step": "F1",+ "status": "completed",+ "seconds": 9,+ "question": "F1",+ "expected": "cnlo.png",+ "said": "cnlo.png",+ "verdict": "right",+ "reply": "cnlo.png",+ "tokens": {+ "total": {+ "totalTokens": 172755,+ "inputTokens": 172425,+ "cachedInputTokens": 124160,+ "cacheWriteInputTokens": 0,+ "outputTokens": 330,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23004,+ "inputTokens": 22997,+ "cachedInputTokens": 0,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.4,+ "sentMB": 0.12,+ "sentWireMB": 0.05+ }+ ]+ },+ {+ "step": "F2",+ "status": "completed",+ "seconds": 7,+ "question": "F2",+ "expected": "fxai.png",+ "said": "fxai.png",+ "verdict": "right",+ "reply": "fxai.png",+ "tokens": {+ "total": {+ "totalTokens": 195786,+ "inputTokens": 195449,+ "cachedInputTokens": 146944,+ "cacheWriteInputTokens": 0,+ "outputTokens": 337,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23031,+ "inputTokens": 23024,+ "cachedInputTokens": 22784,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.4,+ "sentMB": 0.12,+ "sentWireMB": 0.05+ }+ ]+ },+ {+ "step": "F3",+ "status": "completed",+ "seconds": 5,+ "question": "F3",+ "expected": "mtgb.png",+ "said": "mtgb.png",+ "verdict": "right",+ "reply": "mtgb.png",+ "tokens": {+ "total": {+ "totalTokens": 218858,+ "inputTokens": 218514,+ "cachedInputTokens": 169728,+ "cacheWriteInputTokens": 0,+ "outputTokens": 344,+ "reasoningOutputTokens": 0+ },+ "last": {+ "totalTokens": 23072,+ "inputTokens": 23065,+ "cachedInputTokens": 22784,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.41,+ "sentMB": 0.12,+ "sentWireMB": 0.05+ }+ ]+ },+ {+ "step": "F4",+ "status": "completed",+ "seconds": 8,+ "question": "F4",+ "expected": "wdfa.png",+ "said": "wdfa.png",+ "verdict": "right",+ "reply": "wdfa.png",+ "tokens": {+ "total": {+ "totalTokens": 241973,+ "inputTokens": 241609,+ "cachedInputTokens": 192640,+ "cacheWriteInputTokens": 0,+ "outputTokens": 364,+ "reasoningOutputTokens": 11+ },+ "last": {+ "totalTokens": 23115,+ "inputTokens": 23095,+ "cachedInputTokens": 22912,+ "cacheWriteInputTokens": 0,+ "outputTokens": 20,+ "reasoningOutputTokens": 11+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.41,+ "sentMB": 0.12,+ "sentWireMB": 0.05+ }+ ]+ },+ {+ "step": "F5",+ "status": "completed",+ "seconds": 5,+ "question": "F5",+ "expected": "zrue.png",+ "said": "zrue.png",+ "verdict": "right",+ "reply": "zrue.png",+ "tokens": {+ "total": {+ "totalTokens": 265117,+ "inputTokens": 264746,+ "cachedInputTokens": 215552,+ "cacheWriteInputTokens": 0,+ "outputTokens": 371,+ "reasoningOutputTokens": 11+ },+ "last": {+ "totalTokens": 23144,+ "inputTokens": 23137,+ "cachedInputTokens": 22912,+ "cacheWriteInputTokens": 0,+ "outputTokens": 7,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.41,+ "sentMB": 0.12,+ "sentWireMB": 0.05+ }+ ]+ },+ {+ "step": "F6",+ "status": "completed",+ "seconds": 5,+ "question": "F6",+ "expected": "jbwe.png",+ "said": "jbwe.png",+ "verdict": "right",+ "reply": "jbwe.png",+ "tokens": {+ "total": {+ "totalTokens": 288302,+ "inputTokens": 287913,+ "cachedInputTokens": 238464,+ "cacheWriteInputTokens": 0,+ "outputTokens": 389,+ "reasoningOutputTokens": 20+ },+ "last": {+ "totalTokens": 23185,+ "inputTokens": 23167,+ "cachedInputTokens": 22912,+ "cacheWriteInputTokens": 0,+ "outputTokens": 18,+ "reasoningOutputTokens": 9+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.41,+ "sentMB": 0.12,+ "sentWireMB": 0.05+ }+ ]+ },+ {+ "step": "D1",+ "status": "completed",+ "seconds": 21,+ "question": "D1",+ "expected": "7",+ "said": "7",+ "verdict": "right",+ "reply": "7",+ "fetched": [+ "tyop.png"+ ],+ "tokens": {+ "total": {+ "totalTokens": 360456,+ "inputTokens": 359963,+ "cachedInputTokens": 307840,+ "cacheWriteInputTokens": 0,+ "outputTokens": 493,+ "reasoningOutputTokens": 28+ },+ "last": {+ "totalTokens": 25402,+ "inputTokens": 25397,+ "cachedInputTokens": 23296,+ "cacheWriteInputTokens": 0,+ "outputTokens": 5,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 42.41,+ "sentMB": 0.12,+ "sentWireMB": 0.05+ },+ {+ "status": 200,+ "fullMB": 42.42,+ "sentMB": 0.13,+ "sentWireMB": 0.05+ },+ {+ "status": 200,+ "fullMB": 47.19,+ "sentMB": 4.9,+ "sentWireMB": 3.63+ }+ ]+ },+ {+ "step": "D2",+ "status": "completed",+ "seconds": 18,+ "question": "D2",+ "expected": "4",+ "said": "4",+ "verdict": "right",+ "reply": "4",+ "fetched": [+ "hqkm.png"+ ],+ "tokens": {+ "total": {+ "totalTokens": 409705,+ "inputTokens": 409148,+ "cachedInputTokens": 354560,+ "cacheWriteInputTokens": 0,+ "outputTokens": 557,+ "reasoningOutputTokens": 28+ },+ "last": {+ "totalTokens": 25576,+ "inputTokens": 25571,+ "cachedInputTokens": 23424,+ "cacheWriteInputTokens": 0,+ "outputTokens": 5,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 47.19,+ "sentMB": 0.13,+ "sentWireMB": 0.05+ },+ {+ "status": 200,+ "fullMB": 52.38,+ "sentMB": 5.33,+ "sentWireMB": 3.95+ }+ ]+ },+ {+ "step": "N1",+ "status": "completed",+ "seconds": 5,+ "question": "N1",+ "expected": "weather",+ "said": "The weather is really nice today.",+ "verdict": "right",+ "reply": "The weather is really nice today.",+ "tokens": {+ "total": {+ "totalTokens": 433494,+ "inputTokens": 432926,+ "cachedInputTokens": 377984,+ "cacheWriteInputTokens": 0,+ "outputTokens": 568,+ "reasoningOutputTokens": 28+ },+ "last": {+ "totalTokens": 23789,+ "inputTokens": 23778,+ "cachedInputTokens": 23424,+ "cacheWriteInputTokens": 0,+ "outputTokens": 11,+ "reasoningOutputTokens": 0+ }+ },+ "requestMB": [+ {+ "status": 200,+ "fullMB": 52.38,+ "sentMB": 0.13,+ "sentWireMB": 0.05+ }+ ]+ }+ ]+ }+}\ No newline at end of filediff --git a/eval/results/2026-10-24/summary.json b/eval/results/2026-10-24/summary.jsonnew file mode 100644index 0000000..0ab93c7--- /dev/null+++ b/eval/results/2026-10-24/summary.json@@ -0,0 +1,136 @@+{+ "runs": [+ "run1"+ ],+ "arms": {+ "off": {+ "before": {+ "right": 5,+ "wrong": 0,+ "none": 0,+ "unsent": 1,+ "fetchedImages": 0,+ "asked": 6+ },+ "after": {+ "right": 0,+ "wrong": 0,+ "none": 0,+ "unsent": 1,+ "fetchedImages": 0,+ "asked": 1+ },+ "detail": {+ "right": 2,+ "wrong": 0,+ "none": 0,+ "unsent": 0,+ "fetchedImages": 0,+ "asked": 2+ },+ "none": {+ "right": 1,+ "wrong": 0,+ "none": 0,+ "unsent": 0,+ "fetchedImages": 0,+ "asked": 1+ },+ "unsent": [+ "run1 X F6",+ "run1 Y F1"+ ],+ "tokens": [+ {+ "run": "run1",+ "input": 501803,+ "cached": 471680,+ "output": 326,+ "lastContext": 38786+ }+ ]+ },+ "on": {+ "before": {+ "right": 6,+ "wrong": 0,+ "none": 0,+ "unsent": 0,+ "fetchedImages": 0,+ "asked": 6+ },+ "after": {+ "right": 6,+ "wrong": 0,+ "none": 0,+ "unsent": 0,+ "fetchedImages": 0,+ "asked": 6+ },+ "detail": {+ "right": 4,+ "wrong": 0,+ "none": 0,+ "unsent": 0,+ "fetchedImages": 4,+ "asked": 4+ },+ "none": {+ "right": 2,+ "wrong": 0,+ "none": 0,+ "unsent": 0,+ "fetchedImages": 0,+ "asked": 2+ },+ "unsent": [],+ "tokens": [+ {+ "run": "run1",+ "input": 421870,+ "cached": 380928,+ "output": 766,+ "lastContext": 24421+ }+ ]+ },+ "v07": {+ "before": {+ "right": 0,+ "wrong": 0,+ "none": 0,+ "unsent": 0,+ "fetchedImages": 0,+ "asked": 0+ },+ "after": {+ "right": 6,+ "wrong": 0,+ "none": 0,+ "unsent": 0,+ "fetchedImages": 0,+ "asked": 6+ },+ "detail": {+ "right": 2,+ "wrong": 0,+ "none": 0,+ "unsent": 0,+ "fetchedImages": 2,+ "asked": 2+ },+ "none": {+ "right": 1,+ "wrong": 0,+ "none": 0,+ "unsent": 0,+ "fetchedImages": 0,+ "asked": 1+ },+ "unsent": [+ "run1 X T5"+ ],+ "tokens": []+ }+ }+}\ No newline at end of filediff --git a/spike/scripts/archive-test-threads.ts b/spike/scripts/archive-test-threads.tsindex 0985829..2454835 100644--- a/spike/scripts/archive-test-threads.ts+++ b/spike/scripts/archive-test-threads.ts@@ -10,7 +10,7 @@ import { AppServer, findBundledCodex } from "../src/appserver.ts";import { archiveThreads } from "../src/testkit.ts";// Only the names the test scripts give their tasks; a task that merely starts with "[CAM测试]" is left alone.-const TEST_NAME = /^\[CAM测试\] (P\d|v0\.1 占位符自测 |截图编号自测 )|^\[CAM test\] (v0\.1 placeholder self-test |screenshot id self-test )/;+const TEST_NAME = /^\[CAM测试\] (P\d|v0\.1 占位符自测 |截图编号自测 |评测 [XY] (off|on|v07) )|^\[CAM test\] (v0\.1 placeholder self-test |screenshot id self-test )/;const dryRun = process.argv.includes("--dry-run");const home = codexHome();const indexFile = join(home, "session_index.jsonl");diff --git a/spike/src/eval-keyframes.ts b/spike/src/eval-keyframes.tsnew file mode 100644index 0000000..1001723--- /dev/null+++ b/spike/src/eval-keyframes.ts@@ -0,0 +1,446 @@+// Purpose: eval — the plugin against no plugin on one short keyframe task of a short drama (eval/README.md).+// Nine synthetic keyframes (1024×1536, grain added so they weigh what generated images weigh) are uploaded over six turns.+// The user says once what the two leads look like, then where each scene takes place ("scene 3, on the beach at dusk,+// two of them") but never which image is which, and rates by position ("the first one last turn is too dark"): which of+// a scene's images shows whom, how close, is only in the model's own replies, which a compaction turns into a summary+// (Codex keeps the user's messages as they were). try1 had the user describe every image, so the questions after the+// compaction could be answered from the user's words alone; try3 never named the places, and the model did not take the+// synthetic beach (an orange sky over blue lines) and bamboo (green stripes) for what they were.+// Then questions with known answers: six ask for a file by what it shows or by what the user said, two ask for a digit+// hidden in a corner (only the original shows it), one needs no image.+// Arms, each with a test engine (its own port and data folder) and its own app-server:+// - off: Codex as it is. The engine only relays: every thread counts as older than automatic selection, so nothing is+// rewritten and the WebSocket stays as Codex opens it; the engine logs how many bytes went up. No plugin server.+// - on: this checkout's plugin with automatic selection, on by default for a new task, and its plugin server for+// cam_view_image.+// - v07: the same from the v0.7.1 release, before feature lines (v0.8): placeholders carry the id, name, source, turn and+// size only. Its plugin folder comes from `git archive v0.7.1 plugin` into local/eval/v0.7.1.+// Threads per arm: X — the six turns, five of the find questions and the rest, then app-server restarts and the task is+// resumed (a new connection sends the whole conversation again) for the sixth; Y — the six turns, a compaction+// (thread/compact/start), all the questions. A step that fails or runs out of time ends its thread.+// Set up like v08-features-selftest.ts: the tools that act on the machine off, the installed plugin off, a read-only+// sandbox, the tasks archived at the end.+// Input: [--label name] [--arms off,on,v07] [--threads X,Y] [--port 17905] [--draw (write the images and stop)];+// CAM_TEST_MODEL, CAM_TEST_EFFORT. Output: local/eval/<label>/<arm>.json and a console summary (synthetic images only).++import { spawn } from "node:child_process";+import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";+import { dirname, join, resolve } from "node:path";+import { setTimeout as sleep } from "node:timers/promises";+import { fileURLToPath } from "node:url";+import { AppServer, findBundledCodex } from "./appserver.ts";+import { codexHome } from "../../plugin/src/codexconfig.ts";+import { engineHealth } from "../../plugin/src/engine.ts";+import { languageFileOf, rememberLang } from "../../plugin/src/language.ts";+import { selectionDirOf } from "../../plugin/src/paths.ts";+import { loadThreadIndex } from "../../plugin/src/thread-index.ts";+import { archiveThreads, png, TEST_EFFORT, TEST_MODEL, text } from "./testkit.ts";++type Json = Record<string, any>;+type Rgb = [number, number, number];+const here = dirname(fileURLToPath(import.meta.url));+const localRoot = join(resolve(here, "../.."), "local");+const STEP_TIMEOUT = 10 * 60_000;+// A question sends no image: try1 answered each in 30 s or less. Without the plugin, the one after a restart or a+// compaction resends the whole conversation (42.4 MB), refused every time, a retry a minute, each one uploading 32 MB+// through the user's proxy: a few refusals show it.+const QUESTION_TIMEOUT = 3 * 60_000;++// ---- The keyframes ----++const W = 1024, H = 1536;+type Scene = "study" | "rain" | "beach" | "bamboo";+type Keyframe = { key: string; file: string; scene: Scene; who: "her" | "him" | null; shot: "medium" | "close" | "wide"; dark?: boolean; digit: string; corner: "tl" | "tr" | "bl" | "br" };+// File names say nothing of the picture, so the model has to tell them apart by what it saw and what the user said.+const KEYFRAMES: Keyframe[] = [+ { key: "S1", file: "hqkm.png", scene: "study", who: "her", shot: "medium", digit: "4", corner: "tl" },+ { key: "S2", file: "wdfa.png", scene: "study", who: "him", shot: "medium", digit: "6", corner: "br" },+ { key: "R1", file: "pvrs.png", scene: "rain", who: "her", shot: "close", dark: true, digit: "9", corner: "tr" },+ { key: "R2", file: "cnlo.png", scene: "rain", who: null, shot: "wide", digit: "2", corner: "bl" },+ { key: "R3", file: "mtgb.png", scene: "rain", who: "her", shot: "close", digit: "8", corner: "br" },+ { key: "B1", file: "zrue.png", scene: "beach", who: "him", shot: "medium", digit: "3", corner: "tl" },+ { key: "B2", file: "fxai.png", scene: "beach", who: "her", shot: "close", digit: "5", corner: "tr" },+ { key: "Z1", file: "jbwe.png", scene: "bamboo", who: "her", shot: "medium", digit: "0", corner: "bl" },+ { key: "Z2", file: "tyop.png", scene: "bamboo", who: "him", shot: "close", digit: "7", corner: "br" },+];+const fileOf = (key: string) => KEYFRAMES.find((frame) => frame.key === key)!.file;++const FONT: Record<string, string[]> = {+ "0": ["01110", "10001", "10011", "10101", "11001", "10001", "01110"],+ "2": ["01110", "10001", "00001", "00010", "00100", "01000", "11111"],+ "3": ["11111", "00010", "00100", "00010", "00001", "10001", "01110"],+ "4": ["00010", "00110", "01010", "10010", "11111", "00010", "00010"],+ "5": ["11111", "10000", "11110", "00001", "00001", "10001", "01110"],+ "6": ["00110", "01000", "10000", "11110", "10001", "10001", "01110"],+ "7": ["11111", "00001", "00010", "00100", "01000", "01000", "01000"],+ "8": ["01110", "10001", "10001", "01110", "10001", "10001", "01110"],+ "9": ["01110", "10001", "10001", "01111", "00001", "00010", "01100"],+};+const SCALE = 10, MARGIN = 48;+const digitAt = (frame: Keyframe) => {+ const left = frame.corner.endsWith("l") ? MARGIN : W - MARGIN - 5 * SCALE;+ const top = frame.corner.startsWith("t") ? MARGIN : H - MARGIN - 7 * SCALE;+ return (x: number, y: number) => {+ const col = Math.floor((x - left) / SCALE), row = Math.floor((y - top) / SCALE);+ return x >= left && y >= top && col < 5 && row < 7 && FONT[frame.digit][row][col] === "1";+ };+};++const mix = (a: Rgb, b: Rgb, t: number): Rgb => [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t, a[2] + (b[2] - a[2]) * t];+const inCircle = (x: number, y: number, cx: number, cy: number, r: number) => (x - cx) ** 2 + (y - cy) ** 2 < r * r;++function background(scene: Scene, x: number, y: number): Rgb {+ switch (scene) {+ case "study": {+ // A warm wall and a bookshelf: rows of coloured spines.+ if (y < 160 || y > 1150) return [150, 105, 70];+ const row = (y - 160) % 200;+ if (row < 18) return [90, 55, 30];+ const spines: Rgb[] = [[170, 40, 40], [40, 90, 140], [200, 170, 60], [60, 120, 70], [120, 80, 140]];+ return x % 44 < 4 ? [90, 55, 30] : spines[Math.floor(x / 44 + Math.floor((y - 160) / 200) * 2) % spines.length];+ }+ case "rain": {+ // Night: dark blue, a street lamp's glow.+ const base = mix([15, 20, 45], [40, 45, 75], y / H);+ const glow = Math.max(0, 1 - Math.hypot(x - 840, y - 280) / 260);+ return mix(base, [235, 205, 120], glow * glow);+ }+ case "beach": {+ // Sunset: an orange sky, the sun on the horizon, the sea.+ if (y >= 940) return (y - 940) % 60 < 6 ? [90, 130, 170] : [40, 80, 130];+ if (inCircle(x, y, 512, 940, 170)) return [255, 222, 130];+ return mix([240, 120, 80], [252, 196, 150], y / 940);+ }+ case "bamboo": {+ // Green stalks with darker joints.+ const stalk = x % 170 < 38;+ if (!stalk) return [80, 140, 80];+ return y % 230 < 12 ? [25, 70, 30] : [40, 100, 45];+ }+ }+}++const SKIN: Rgb = [235, 195, 165], EYE: Rgb = [30, 25, 25], WHITE: Rgb = [248, 248, 248], LIPS: Rgb = [170, 70, 70];+const LOOK = { her: { hair: [25, 20, 20] as Rgb, outfit: [190, 30, 40] as Rgb, long: true }, him: { hair: [75, 48, 25] as Rgb, outfit: [40, 70, 150] as Rgb, long: false } };++// A person in a red dress with long black hair, or in blue with short brown hair; a medium shot or a close-up.+function person(frame: Keyframe, x: number, y: number): Rgb | null {+ if (!frame.who || frame.shot === "wide") return null;+ const look = LOOK[frame.who];+ const close = frame.shot === "close";+ const [cx, cy, r] = close ? [512, 700, 380] : [512, 600, 105];+ if (inCircle(x, y, cx, cy, r)) {+ const eyeY = cy + r * 0.05, eyeX = r * 0.38;+ for (const ex of [cx - eyeX, cx + eyeX]) {+ if (inCircle(x, y, ex, eyeY, r * 0.07)) return EYE;+ if (close && inCircle(x, y, ex, eyeY, r * 0.13)) return WHITE;+ }+ if (Math.abs(x - cx) < r * 0.28 && y > cy + r * 0.45 && y < cy + r * 0.53) return LIPS;+ if (y < cy - r * (look.long ? 0.35 : 0.45)) return look.hair;+ return SKIN;+ }+ const neckTop = cy + r * 0.85, shoulders = cy + r * (close ? 1.25 : 1.35);+ // Long hair: around the head, then down both sides, leaving the neck and the dress in front.+ const off = Math.abs(x - cx);+ if (look.long && off < r * 1.3 && y > cy - r * 0.9 && (y < cy + r * 0.5 || (off > r * 0.6 && y < cy + r * (close ? 1.6 : 2.6)))) return look.hair;+ if (!look.long && inCircle(x, y, cx, cy - r * 0.1, r * 1.08) && y < cy - r * 0.2) return look.hair;+ if (Math.abs(x - cx) < r * 0.3 && y >= neckTop && y < shoulders) return SKIN;+ if (y >= shoulders && Math.abs(x - cx) < r * 1.4 + (y - shoulders) * (close ? 0.8 : 0.3)) return look.outfit;+ return null;+}++function draw(frame: Keyframe): Buffer {+ let state = 0x9e3779b9 ^ frame.file.split("").reduce((sum, ch) => sum * 31 + ch.charCodeAt(0), 7);+ const grain = () => { state ^= state << 13; state ^= state >>> 17; state ^= state << 5; return ((state >>> 0) % 17) - 8; };+ const isDigit = digitAt(frame);+ const light = frame.scene === "study" || frame.scene === "beach";+ return png(W, H, (x, y) => {+ let rgb = person(frame, x, y) ?? background(frame.scene, x, y);+ // Rain falls in front of everything.+ if (frame.scene === "rain" && (x + Math.floor(y * 0.3)) % 37 < 2 && y % 90 < 60) rgb = mix(rgb, [170, 180, 210], 0.6);+ if (frame.dark) rgb = [rgb[0] * 0.38, rgb[1] * 0.38, rgb[2] * 0.38];+ if (isDigit(x, y)) rgb = light ? [15, 15, 15] : [245, 245, 245];+ return [rgb[0], rgb[1], rgb[2]].map((value) => Math.max(0, Math.min(255, Math.round(value + grain())))) as Rgb;+ });+}++// ---- The conversation ----++// The user's words say where each scene takes place, never which image is which; ratings go by position.+const SCRIPT: Array<{ prompt: string; images: string[] }> = [+ { prompt: "这部短剧的女主穿红衣、黑色长发,男主穿蓝衣、棕色短发。第一场在书房,这是两张关键帧,先简单看一下,一两句话就行。", images: ["S1", "S2"] },+ { prompt: "第二场在雨夜的街上,两张,简单看一下。", images: ["R1", "R2"] },+ { prompt: "上一轮第一张太暗了,这是重出的一版。简单看一下。", images: ["R3"] },+ { prompt: "第三场在黄昏的海边,两张,简单看一下。", images: ["B1", "B2"] },+ { prompt: "上一轮第二张,脸是目前最好的。", images: [] },+ { prompt: "第四场在竹林,两张,简单看一下。", images: ["Z1", "Z2"] },+];++// Find questions name a scene and what the image shows (or what the user said), never a position: picking among a+// scene's images takes remembering them. No question touches an image another one asks about, so one answer gives+// nothing away for the next.+type Question = { key: string; kind: "find" | "detail" | "none"; prompt: string; answer: string; needs?: string };+const FIND: Question[] = [+ { key: "F1", kind: "find", prompt: "雨夜街上、画面里没有人的那张空镜,是哪个文件?只回答文件名。", answer: fileOf("R2") },+ { key: "F2", kind: "find", prompt: "我说过脸最好的是哪张?只回答文件名。", answer: fileOf("B2") },+ { key: "F3", kind: "find", prompt: "雨夜里女主的近景有两版,我要用重出的那一版,是哪个文件?只回答文件名。", answer: fileOf("R3") },+ { key: "F4", kind: "find", prompt: "书房里男主的中景是哪个文件?只回答文件名。", answer: fileOf("S2") },+ { key: "F5", kind: "find", prompt: "海边男主的中景是哪个文件?只回答文件名。", answer: fileOf("B1") },+ { key: "F6", kind: "find", prompt: "竹林里女主的中景是哪个文件?只回答文件名。", answer: fileOf("Z1") },+];+const REST: Question[] = [+ { key: "D1", kind: "detail", prompt: "竹林里男主的近景,角落里有一个数字,是几?只回答数字。", answer: "7", needs: "Z2" },+ { key: "D2", kind: "detail", prompt: "书房里女主的中景,角落里有一个数字,是几?只回答数字。", answer: "4", needs: "S1" },+ { key: "N1", kind: "none", prompt: "把“今天天气很好”翻译成英文。", answer: "weather" },+];+// Thread X asks F6 after app-server restarts; thread Y asks them all after the compaction.+const BEFORE_RESTART = [...FIND.slice(0, 5), ...REST];+const AFTER_RESTART = FIND[5];+const AFTER_COMPACTION = [...FIND, ...REST];++// The model's record lines ([//]: # (cam …)) are not part of what the user sees.+const visible = (reply: string) => reply.replace(/\[\/\/\]:[ \t]*#[ \t]*\(cam[^)\n]*\)/g, "").trim();+const CN_DIGITS: Record<string, string> = { 零: "0", 一: "1", 二: "2", 三: "3", 四: "4", 五: "5", 六: "6", 七: "7", 八: "8", 九: "9" };++// right, wrong (another file or digit), or none (no file or digit in the answer: "I can't tell" and the like).+function score(question: Question, reply: string): { verdict: "right" | "wrong" | "none"; said: string | null } {+ const shown = visible(reply);+ if (question.kind === "find") {+ const said = /\b([a-z]{4})\.png\b/i.exec(shown)?.[0].toLowerCase() ?? null;+ return { verdict: said === null ? "none" : said === question.answer ? "right" : "wrong", said };+ }+ if (question.kind === "detail") {+ const clean = shown.replace(/\b[a-z]{4}\.png\b/gi, "").replace(/IMG-\d{3}/g, "");+ const match = /(?<![0-9])[0-9](?![0-9])|[零一二三四五六七八九]/.exec(clean)?.[0] ?? null;+ const said = match === null ? null : CN_DIGITS[match] ?? match;+ return { verdict: said === null ? "none" : said === question.answer ? "right" : "wrong", said };+ }+ return { verdict: /weather/i.test(shown) ? "right" : "wrong", said: shown.slice(0, 80) };+}++// ---- Running it ----++const megabytes = (bytes: number | null | undefined) => (typeof bytes === "number" ? Math.round(bytes / 10_000) / 100 : null);+// An HTTP request as the engine logged it: bytes on the wire and uncompressed, before and after a rewrite.+const requestOf = (entry: Json) => ({+ path: entry.path.replace(/^.*\/responses/, "responses"), status: entry.status, wire: entry.requestBytes, decoded: entry.decodedBytes, images: entry.images ?? null, error: entry.error,+ ...(entry.rewrite ? { before: entry.rewrite.decodedBefore ?? null, after: entry.rewrite.decodedAfter ?? null, wireAfter: entry.rewrite.encodedAfter ?? null, replaced: (entry.rewrite.replaced ?? []).length } : {}),+});++type Arm = "off" | "on" | "v07";+// Where each arm's engine and plugin server come from.+const pluginSrc = (arm: Arm) => (arm === "v07" ? join(localRoot, "eval", "v0.7.1", "plugin", "src") : join(here, "..", "..", "plugin", "src"));++async function runArm(arm: Arm, label: string, port: number, only: string[], work: string): Promise<Json> {+ const root = join(localRoot, "eval", label);+ const data = join(root, `data-${arm}`);+ const selections = selectionDirOf(data);+ mkdirSync(selections, { recursive: true });+ // off: every thread counts as started before automatic selection existed, so the engine rewrites nothing.+ if (arm === "off") writeFileSync(join(selections, "auto-default.json"), JSON.stringify({ since: "2999-01-01T00:00:00.000Z" }, null, 2));+ rememberLang("zh", "codex", languageFileOf(data));+ const sessionsDir = join(codexHome(), "sessions");+ const engineLog = (): Json[] => {+ const dir = join(data, "proxy");+ if (!existsSync(dir)) return [];+ return readdirSync(dir).filter((name) => name.endsWith(".jsonl")).flatMap((name) => readFileSync(join(dir, name), "utf8").split("\n"))+ .flatMap((line) => { try { return [JSON.parse(line)]; } catch { return []; } });+ };++ const engine = spawn(process.execPath, [join(pluginSrc(arm), "proxy.ts"), "--port", String(port), "--stay", ...(arm === "off" ? [] : ["--dump-requests"])], { env: { ...process.env, CAM_DATA_DIR: data }, stdio: "ignore", windowsHide: true });+ for (let i = 0; i < 50 && !(await engineHealth(port)); i++) await sleep(200);+ // Nothing that acts on the machine, and not the installed plugin: the test engine and plugin server stand in for it.+ const off = ["computer-use@openai-bundled", "unified-computer-use@openai-bundled", "chrome@openai-bundled", "browser@openai-bundled", "codex-app-tools@openai-bundled", "codex-attachment-manager@codex-attachment-manager"]+ .flatMap((plugin) => ["-c", `plugins.${plugin}.enabled=false`]);+ const env = { CODEX_HOME: codexHome(), CAM_DATA_DIR: data, CAM_NO_ENGINE: "1" };+ const plugin = arm === "off" ? [] : [+ "-c", `mcp_servers.cam_dev.command=${JSON.stringify(process.execPath)}`,+ "-c", `mcp_servers.cam_dev.args=${JSON.stringify([join(pluginSrc(arm), "plugin-server.ts")])}`,+ "-c", `mcp_servers.cam_dev.env={ ${Object.entries(env).map(([name, value]) => `${name} = ${JSON.stringify(value)}`).join(", ")} }`,+ "-c", `mcp_servers.cam_dev.default_tools_approval_mode="approve"`,+ "-c", "mcp_servers.cam_dev.startup_timeout_sec=20",+ ];+ const args = ["-c", `openai_base_url="http://localhost:${port}/backend-api/codex"`, "-c", "features.respect_system_proxy=true", "-c", "notify=[]", "-c", "mcp_servers.node_repl.enabled=false", ...off, ...plugin];+ const newServer = () => new AppServer(findBundledCodex(), args, { NO_PROXY: undefined, no_proxy: undefined }, join(root, `appserver-${arm}.log`));+ let server = newServer();+ const result: Json = { arm, createdAt: new Date().toISOString(), model: TEST_MODEL, effort: TEST_EFFORT, threads: {} };+ const created: string[] = [];++ // A turn with what it cost: the thread's token counts after it, the HTTP requests the engine saw, what was fetched.+ const step = async (threadId: string, name: string, prompt: string, images: string[] = [], timeoutMs = STEP_TIMEOUT): Promise<Json> => {+ const since = new Date().toISOString();+ const started = Date.now();+ const before = server.notifications.length;+ let turnId: string | null = null;+ let status = "failed to start";+ let error: unknown = null;+ try {+ const { turn } = await server.request<{ turn: Json }>("turn/start", { threadId, input: [text(prompt), ...images.map((key) => ({ type: "localImage", path: join(work, fileOf(key)) }))], effort: TEST_EFFORT }, 120_000);+ turnId = turn.id;+ const done = await server.waitFor((n) => n.method === "turn/completed" && n.params.turn?.id === turnId, timeoutMs);+ status = done.params.turn.status;+ error = done.params.turn.error ?? null;+ } catch (thrown) {+ error = String(thrown);+ if (turnId) {+ status = "timeout";+ try { await server.request("turn/interrupt", { threadId, turnId }, 30_000); } catch { /* the turn may be gone */ }+ }+ }+ // The engine records a request once its response has ended, which can be just after the turn completes.+ await sleep(1500);+ const mine = server.notifications.slice(before).filter((n) => turnId && (n.params?.turnId === turnId || n.params?.turn?.id === turnId));+ const items = mine.filter((n) => n.method === "item/completed").map((n) => n.params.item);+ const usage = mine.filter((n) => n.method === "thread/tokenUsage/updated").map((n) => n.params.tokenUsage).at(-1) ?? null;+ let fetched: string[] = [];+ if (arm !== "off" && turnId) {+ const index = loadThreadIndex(sessionsDir, threadId);+ const number = index.turnNumbers.get(turnId) ?? null;+ const names = new Map(index.images.map((image) => [image.id, image.name]));+ fetched = [...new Set([...index.copies.values()].filter((copy) => copy.turn === number).map((copy) => names.get(copy.of) ?? copy.of))];+ }+ const requests = engineLog().filter((entry) => entry.threadId === threadId && entry.at >= since && entry.transport === "http" && /\/responses(\/compact)?$/.test(entry.path ?? ""))+ .map(requestOf);+ return {+ name, turnId, status, error, ms: Date.now() - started,+ reply: items.filter((item) => item.type === "agentMessage").map((item) => item.text).join(" "),+ tools: items.filter((item) => !["agentMessage", "reasoning", "userMessage"].includes(item.type)).map((item) => [item.type, item.server, item.tool].filter(Boolean).join(":")),+ fetched,+ retries: mine.filter((n) => n.method === "error").map((n) => ({ message: String(n.params.error?.message ?? "error").slice(0, 200), willRetry: n.params.willRetry ?? null })),+ usage, requests,+ };+ };+ const ask = async (threadId: string, question: Question) => {+ const done = await step(threadId, question.key, question.prompt, [], QUESTION_TIMEOUT);+ return { ...done, question: question.key, kind: question.kind, expected: question.answer, ...score(question, done.reply), needed: question.needs ? fileOf(question.needs) : null };+ };+ const ok = (done: Json) => done.status === "completed";+ const start = async (thread: string) => {+ const { thread: fresh } = await server.request<{ thread: Json }>("thread/start", { model: TEST_MODEL, cwd: work, approvalPolicy: "never", sandbox: "read-only", ephemeral: false });+ created.push(fresh.id);+ await server.request("thread/name/set", { threadId: fresh.id, name: `[CAM测试] 评测 ${thread} ${arm} ${label}` });+ return fresh.id as string;+ };+ const script = async (threadId: string, steps: Json[]) => {+ for (const [i, { prompt, images }] of SCRIPT.entries()) {+ const done = await step(threadId, `T${i + 1}`, prompt, images);+ steps.push(done);+ if (!ok(done)) return false;+ }+ return true;+ };+ const questions = async (threadId: string, steps: Json[], list: Question[]) => {+ for (const question of list) {+ const done = await ask(threadId, question);+ steps.push(done);+ if (!ok(done)) return false;+ }+ return true;+ };++ try {+ await server.initialize();+ if (only.includes("X")) {+ const id = await start("X");+ const steps: Json[] = [];+ let alive = await script(id, steps) && await questions(id, steps, BEFORE_RESTART);+ if (alive) {+ // A new connection: Codex sends the whole conversation, where a WebSocket kept open only sends what is new.+ await server.stop();+ server = newServer();+ await server.initialize();+ const restarted = Date.now();+ try { await server.request("thread/resume", { threadId: id, approvalPolicy: "never", sandbox: "read-only" }, 300_000); }+ catch (thrown) { steps.push({ name: "resume", status: "failed", error: String(thrown), ms: Date.now() - restarted }); alive = false; }+ if (alive) steps.push(await ask(id, AFTER_RESTART));+ }+ result.threads.X = { threadId: id, steps };+ }+ if (only.includes("Y")) {+ const id = await start("Y");+ const steps: Json[] = [];+ if (await script(id, steps)) {+ // The compaction runs as a turn of its own: find it, wait for it to end.+ const before = server.notifications.length;+ const since = new Date().toISOString();+ const started = Date.now();+ const known = new Set(steps.map((done) => done.turnId));+ let compaction = "failed to start";+ let turnId: string | null = null;+ try {+ await server.request("thread/compact/start", { threadId: id });+ const isNew = (n: { params: Json }) => server.notifications.indexOf(n as any) >= before && n.params?.threadId === id && !known.has(n.params.turn?.id);+ turnId = await server.waitFor((n) => n.method === "turn/started" && isNew(n), 60_000).then((n) => n.params.turn.id as string, () => null);+ compaction = turnId ? await server.waitFor((n) => n.method === "turn/completed" && n.params.turn?.id === turnId, STEP_TIMEOUT).then((n) => n.params.turn.status, () => "timeout") : "no compaction turn";+ } catch (thrown) { compaction = `failed: ${String(thrown)}`; }+ await sleep(1500);+ const usage = server.notifications.slice(before).filter((n) => turnId && n.method === "thread/tokenUsage/updated" && n.params?.turnId === turnId).map((n) => n.params.tokenUsage).at(-1) ?? null;+ const requests = engineLog().filter((entry) => entry.threadId === id && entry.at >= since && entry.transport === "http")+ .map(requestOf);+ steps.push({ name: "compact", turnId, status: compaction, ms: Date.now() - started, usage, requests });+ if (compaction === "completed") await questions(id, steps, AFTER_COMPACTION);+ }+ result.threads.Y = { threadId: id, steps };+ }+ } finally {+ result.notArchived = await archiveThreads(server, created);+ await server.stop();+ // The engine logs a WebSocket when it closes: by now every connection of this arm has.+ await sleep(1500);+ engine.kill();+ }+ result.websockets = engineLog().filter((entry) => entry.transport === "websocket")+ .map((entry) => ({ at: entry.at, threadId: entry.threadId ?? null, event: entry.event ?? null, declined: entry.declined ?? null, up: entry.upBytes ?? null, down: entry.downBytes ?? null, ms: entry.ms ?? null, error: entry.error ?? null }));+ return result;+}++function summarize(result: Json): void {+ console.log(`\n== ${result.arm} (${result.model}, ${result.effort})`);+ for (const [name, thread] of Object.entries(result.threads as Record<string, Json>)) {+ let previous: Json | null = null;+ const rows = (thread.steps as Json[]).map((done) => {+ const total = done.usage?.total ?? null;+ const row = {+ step: done.name, status: done.status, s: Math.round((done.ms ?? 0) / 1000),+ inTok: total && previous ? total.inputTokens - previous.inputTokens : total?.inputTokens ?? null,+ cachedTok: total && previous ? total.cachedInputTokens - previous.cachedInputTokens : total?.cachedInputTokens ?? null,+ context: done.usage?.last?.inputTokens ?? null,+ fullMB: megabytes(Math.max(0, ...(done.requests ?? []).map((r: Json) => r.before ?? r.decoded ?? 0)) || null),+ sentMB: megabytes(Math.max(0, ...(done.requests ?? []).map((r: Json) => r.after ?? r.decoded ?? 0)) || null),+ answer: done.verdict ? `${done.verdict} ${done.said ?? ""}`.trim() : "",+ fetched: (done.fetched ?? []).join(","),+ };+ if (total) previous = total;+ return row;+ });+ console.log(`-- thread ${name}`);+ console.table(rows);+ }+ const sockets = (result.websockets as Json[]).filter((socket) => socket.up !== null);+ if (sockets.length) console.table(sockets.map((socket) => ({ at: socket.at, thread: String(socket.threadId ?? "").slice(-6), upMB: megabytes(socket.up), downMB: megabytes(socket.down), s: Math.round((socket.ms ?? 0) / 1000) })));+ const declined = (result.websockets as Json[]).filter((socket) => socket.declined);+ if (declined.length) console.log(`websockets declined: ${declined.length} (${[...new Set(declined.map((socket) => socket.declined))].join(", ")})`);+}++async function main(): Promise<void> {+ const option = (name: string, fallback: string) => (process.argv.includes(name) ? process.argv[process.argv.indexOf(name) + 1] : fallback);+ const label = option("--label", "run1");+ const arms = option("--arms", "off,on,v07").split(",") as Arm[];+ const only = option("--threads", "X,Y").split(",");+ const port = Number(option("--port", "17905"));+ const root = join(localRoot, "eval", label);+ const work = join(root, "work");+ mkdirSync(work, { recursive: true });+ for (const frame of KEYFRAMES) writeFileSync(join(work, frame.file), draw(frame));+ console.log(KEYFRAMES.map((frame) => `${frame.key} ${frame.file} ${megabytes(statSync(join(work, frame.file)).size)} MB`).join("\n"));+ if (process.argv.includes("--draw")) return;+ // Each arm its own engine; the second sits two ports up (an engine also takes the next port for its routes).+ for (const [i, arm] of arms.entries()) {+ const result = await runArm(arm, label, port + i * 2, only, work);+ result.images = KEYFRAMES.map((frame) => ({ ...frame, bytes: statSync(join(work, frame.file)).size }));+ writeFileSync(join(root, `${arm}.json`), JSON.stringify(result, null, 2));+ summarize(result);+ }+}++await main();diff --git a/spike/src/eval-summary.ts b/spike/src/eval-summary.tsnew file mode 100644index 0000000..b2dec3b--- /dev/null+++ b/spike/src/eval-summary.ts@@ -0,0 +1,183 @@+// Purpose: eval — sum up runs of eval-keyframes.ts for eval/README.md: accuracy before and after a compaction per arm,+// what was fetched, what could not be sent, tokens; a compact copy of each run; a chart of request sizes per step.+// Input: --runs label,label,… (local/eval/<label>/<arm>.json) --out <folder> [--chart-run label].+// Output: <folder>/runs/<label>-<arm>.json, <folder>/summary.json, <folder>/request-size-{en,zh}.svg, and the tables in+// Markdown on the console.++import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";+import { dirname, join, resolve } from "node:path";+import { fileURLToPath } from "node:url";+import { codexHome } from "../../plugin/src/codexconfig.ts";+import { loadThreadIndex } from "../../plugin/src/thread-index.ts";++type Json = Record<string, any>;+const localRoot = join(resolve(dirname(fileURLToPath(import.meta.url)), "../.."), "local");+const ARMS = ["off", "on", "v07"] as const;+const MB = (bytes: number | null | undefined) => (typeof bytes === "number" ? Math.round(bytes / 10_000) / 100 : null);+const visible = (reply: string) => String(reply ?? "").replace(/\[\/\/\]:[ \t]*#[ \t]*\(cam[^)\n]*\)/g, "").trim();++// The largest request of a step: as Codex built it (full) and as it went out (sent), both uncompressed JSON.+const sizes = (step: Json) => {+ const requests: Json[] = step.requests ?? [];+ const full = Math.max(0, ...requests.map((r) => r.before ?? r.decoded ?? 0)) || null;+ const sent = Math.max(0, ...requests.map((r) => r.after ?? r.decoded ?? 0)) || null;+ return { full, sent };+};++// What a run keeps for readers: no thread ids, replies without the record lines.+function compact(run: Json): Json {+ const threads: Json = {};+ for (const [name, thread] of Object.entries(run.threads as Record<string, Json>)) {+ threads[name] = (thread.steps as Json[]).map((step) => ({+ step: step.name, status: step.status, seconds: Math.round((step.ms ?? 0) / 1000),+ ...(step.question ? { question: step.question, expected: step.expected, said: step.said, verdict: step.verdict } : {}),+ reply: visible(step.reply ?? "").slice(0, 300) || undefined,+ fetched: step.fetched?.length ? step.fetched : undefined,+ tokens: step.usage ? { total: step.usage.total, last: step.usage.last } : undefined,+ // After a 200, "client closed before the response ended" is Codex closing once it has what it needs.+ requestMB: (step.requests ?? []).map((r: Json) => ({ status: r.status, fullMB: MB(r.before ?? r.decoded), sentMB: MB(r.after ?? r.decoded), sentWireMB: MB(r.wireAfter ?? r.wire), error: r.status === 200 ? undefined : r.error ?? undefined })),+ reconnects: step.retries?.length ? step.retries.map((r: Json) => r.message) : undefined,+ }));+ }+ return { arm: run.arm, model: run.model, effort: run.effort, createdAt: run.createdAt, threads };+}++type Tally = { right: number; wrong: number; none: number; unsent: number; fetchedImages: number; asked: number };+const tally = (): Tally => ({ right: 0, wrong: 0, none: 0, unsent: 0, fetchedImages: 0, asked: 0 });++function main(): void {+ const option = (name: string) => (process.argv.includes(name) ? process.argv[process.argv.indexOf(name) + 1] : undefined);+ const labels = (option("--runs") ?? "").split(",").filter(Boolean);+ const out = resolve(option("--out") ?? "eval/results");+ if (!labels.length) throw new Error("usage: eval-summary.ts --runs a,b,c --out <folder> [--chart-run a]");+ mkdirSync(join(out, "runs"), { recursive: true });++ // Per arm: find questions before the compaction (thread X, F6 after a restart) and after it (thread Y); details; the+ // question that needs no image; steps that could not be sent; tokens of thread X up to N1 (the same steps everywhere).+ const sum: Json = {};+ for (const arm of ARMS) sum[arm] = { before: tally(), after: tally(), detail: tally(), none: tally(), unsent: [] as string[], tokens: [] as Json[] };+ for (const label of labels) {+ for (const arm of ARMS) {+ const file = join(localRoot, "eval", label, `${arm}.json`);+ if (!existsSync(file)) continue;+ const run = JSON.parse(readFileSync(file, "utf8"));+ // What each step fetched, from the task's own record (archived tasks are read too): early runs counted it for+ // one arm only.+ if (arm !== "off") for (const thread of Object.values(run.threads as Record<string, Json>)) {+ const index = loadThreadIndex(join(codexHome(), "sessions"), thread.threadId);+ const names = new Map(index.images.map((image) => [image.id, image.name]));+ for (const step of thread.steps as Json[]) {+ const number = step.turnId ? index.turnNumbers.get(step.turnId) ?? null : null;+ step.fetched = [...new Set([...index.copies.values()].filter((copy) => copy.turn === number).map((copy) => names.get(copy.of) ?? copy.of))];+ }+ }+ writeFileSync(join(out, "runs", `${label}-${arm}.json`), JSON.stringify(compact(run), null, 2));+ for (const [name, thread] of Object.entries(run.threads as Record<string, Json>)) {+ const steps: Json[] = thread.steps;+ const compacted = steps.some((step) => step.name === "compact");+ for (const step of steps) {+ if (step.status !== "completed" && step.name !== "compact") sum[arm].unsent.push(`${label} ${name} ${step.name}`);+ if (!step.kind) continue;+ const bucket: Tally = step.kind === "find" ? sum[arm][compacted ? "after" : "before"] : step.kind === "detail" ? sum[arm].detail : sum[arm].none;+ bucket.asked++;+ if (step.status !== "completed") { bucket.unsent++; continue; }+ bucket[step.verdict as "right" | "wrong" | "none"]++;+ bucket.fetchedImages += step.fetched?.length ?? 0;+ }+ if (name === "X") {+ const n1 = steps.findIndex((step) => step.name === "N1");+ const upTo = n1 >= 0 ? steps.slice(0, n1 + 1) : [];+ const last = upTo.filter((step) => step.usage).at(-1)?.usage;+ if (last) sum[arm].tokens.push({ run: label, input: last.total.inputTokens, cached: last.total.cachedInputTokens, output: last.total.outputTokens, lastContext: last.last.inputTokens });+ }+ }+ }+ }+ writeFileSync(join(out, "summary.json"), JSON.stringify({ runs: labels, arms: sum }, null, 2));++ const cell = (t: Tally) => (t.asked ? `${t.right}/${t.asked}` + (t.wrong ? `, ${t.wrong} wrong` : "") + (t.none ? `, ${t.none} no answer` : "") + (t.unsent ? `, ${t.unsent} not sent` : "") : "–");+ console.log("| arm | find before compaction | find after compaction | detail | no image needed |\n|---|---|---|---|---|");+ for (const arm of ARMS) console.log(`| ${arm} | ${cell(sum[arm].before)} | ${cell(sum[arm].after)} | ${cell(sum[arm].detail)} | ${cell(sum[arm].none)} |`);+ console.log("\n| arm | images fetched: find before / after / detail / no image |\n|---|---|");+ for (const arm of ARMS) console.log(`| ${arm} | ${sum[arm].before.fetchedImages} / ${sum[arm].after.fetchedImages} / ${sum[arm].detail.fetchedImages} / ${sum[arm].none.fetchedImages} |`);+ console.log("\n| arm | runs | input tokens (mean) | cached | uncached | output | context of the last request |\n|---|---|---|---|---|---|---|");+ for (const arm of ARMS) {+ const rows: Json[] = sum[arm].tokens;+ if (!rows.length) continue;+ const mean = (key: string) => Math.round(rows.reduce((total, row) => total + row[key], 0) / rows.length);+ console.log(`| ${arm} | ${rows.length} | ${mean("input")} | ${mean("cached")} | ${mean("input") - mean("cached")} | ${mean("output")} | ${mean("lastContext")} |`);+ }+ console.log("\nnot sent:", JSON.stringify(Object.fromEntries(ARMS.map((arm) => [arm, sum[arm].unsent]))));++ // The chart: thread Y of one run of the plugin, step by step; and where the run without the plugin stopped.+ const chartRun = option("--chart-run") ?? labels[0];+ const on = JSON.parse(readFileSync(join(localRoot, "eval", chartRun, "on.json"), "utf8"));+ const off = existsSync(join(localRoot, "eval", chartRun, "off.json")) ? JSON.parse(readFileSync(join(localRoot, "eval", chartRun, "off.json"), "utf8")) : null;+ const stuck = new Set(((off?.threads.Y?.steps ?? []) as Json[]).filter((step) => step.status !== "completed" && step.name !== "compact").map((step) => step.name));+ const points = (on.threads.Y.steps as Json[]).map((step) => ({ step: step.name as string, ...sizes(step), stuck: stuck.has(step.name) }));+ for (const lang of ["en", "zh"] as const) writeFileSync(join(out, `request-size-${lang}.svg`), chart(points, lang));+ console.log(`\nchart from ${chartRun}:`, JSON.stringify(points.map((p) => [p.step, MB(p.full), MB(p.sent), p.stuck])));+}++// Grouped columns, one axis in MB: the conversation as Codex built it, and what the plugin sent. Colors from the+// dataviz reference palette (slots 1 and 2, validated light and dark); text in text tokens.+function chart(points: Array<{ step: string; full: number | null; sent: number | null; stuck: boolean }>, lang: "en" | "zh"): string {+ const words = lang === "zh"+ ? { title: "每一步最大的那次请求(MB,未压缩)", full: "完整对话(不装插件时要发的)", sent: "装插件后实际发出的", stuck: (full: string, sent: string) => `不装插件:${full} MB,发不出去;装插件:${sent} MB`, compact: "压缩", axis: "MB", note: "任务二:6 轮传图,压缩,再问 9 个问题。D1、D2 要看角落的数字,插件当轮取回了那一张原图。" }+ : { title: "Largest request of each step (MB, uncompressed)", full: "Whole conversation (what Codex sends without the plugin)", sent: "Sent with the plugin", stuck: (full: string, sent: string) => `Without the plugin: ${full} MB, could not be sent. With it: ${sent} MB`, compact: "compact", axis: "MB", note: "Task 2: six turns of uploads, a compaction, nine questions. D1 and D2 need a corner digit: the plugin fetched that one original for the turn." };+ const W = 860, H = 420, left = 56, right = 16, top = 78, bottom = 92;+ const plotW = W - left - right, plotH = H - top - bottom;+ const max = 60e6;+ const y = (bytes: number) => top + plotH - (bytes / max) * plotH;+ const band = plotW / points.length;+ const bar = Math.min(14, (band - 8) / 2);+ const ticks = [0, 10, 20, 30, 40, 50, 60];+ const label = (step: string) => (step === "compact" ? words.compact : step);+ const column = (x: number, value: number, cls: string, text: string) => {+ const h = Math.max(1, (value / max) * plotH), r = Math.min(4, h, bar / 2), x2 = x + bar, base = top + plotH, t = base - h;+ return `<path class="${cls}" d="M${x},${base} V${t + r} Q${x},${t} ${x + r},${t} H${x2 - r} Q${x2},${t} ${x2},${t + r} V${base} Z"><title>${text}</title></path>`;+ };+ const parts: string[] = [];+ parts.push(`<text class="title" x="${left}" y="24">${words.title}</text>`);+ // Legend: a swatch beside each name, text in ink.+ parts.push(`<rect class="full" x="${left}" y="38" width="10" height="10" rx="2"/><text class="legend" x="${left + 16}" y="47">${words.full}</text>`);+ const second = left + 16 + (lang === "zh" ? 210 : 360);+ parts.push(`<rect class="sent" x="${second}" y="38" width="10" height="10" rx="2"/><text class="legend" x="${second + 16}" y="47">${words.sent}</text>`);+ for (const tick of ticks) parts.push(`<line class="grid" x1="${left}" x2="${W - right}" y1="${y(tick * 1e6)}" y2="${y(tick * 1e6)}"/><text class="tick" x="${left - 8}" y="${y(tick * 1e6) + 4}" text-anchor="end">${tick}</text>`);+ parts.push(`<text class="tick" x="${left - 8}" y="${top - 10}" text-anchor="end">${words.axis}</text>`);+ points.forEach((point, i) => {+ const center = left + band * i + band / 2;+ if (point.full) parts.push(column(center - bar - 1, point.full, "full", `${label(point.step)}: ${(point.full / 1e6).toFixed(2)} MB`));+ if (point.sent) parts.push(column(center + 1, point.sent, "sent", `${label(point.step)}: ${(point.sent / 1e6).toFixed(2)} MB`));+ parts.push(`<text class="tick" x="${center}" y="${top + plotH + 18}" text-anchor="middle">${label(point.step)}</text>`);+ // The one step the story is about carries its values: the plugin's columns there are too short to read.+ // Above every column (the tallest is 52.4 MB), with a leader down to this one, so no column crosses the text.+ if (point.stuck && point.full) parts.push(`<line class="leader" x1="${center}" x2="${center}" y1="${y(56e6)}" y2="${y(point.full) - 12}"/><path class="stuck-mark" d="M${center - 5},${y(point.full) - 12} l5,8 l5,-8 z"/><text class="stuck" x="${center + 6}" y="${y(57e6) + 4}">${words.stuck((point.full / 1e6).toFixed(1), ((point.sent ?? 0) / 1e6).toFixed(2))}</text>`);+ });+ parts.push(`<line class="base" x1="${left}" x2="${W - right}" y1="${top + plotH}" y2="${top + plotH}"/>`);+ parts.push(`<text class="note" x="${left}" y="${H - 40}">${words.note}</text>`);+ return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${W} ${H}" width="${W}" height="${H}" role="img" aria-label="${words.title}">+<style>+ svg { --surface:#fcfcfb; --ink:#0b0b0b; --ink2:#52514e; --muted:#898781; --grid:#e1e0d9; --base:#c3c2b7; --s1:#2a78d6; --s2:#eb6834; }+ @media (prefers-color-scheme: dark) { svg { --surface:#1a1a19; --ink:#f0efec; --ink2:#c3c2b7; --muted:#898781; --grid:#2c2c2a; --base:#383835; --s1:#3987e5; --s2:#d95926; } }+ .bg { fill: var(--surface); }+ text { font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; }+ .title { font-size: 15px; font-weight: 600; fill: var(--ink); }+ .legend { font-size: 12px; fill: var(--ink2); }+ .tick { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }+ .note { font-size: 12px; fill: var(--ink2); }+ .stuck { font-size: 11px; fill: var(--ink); }+ .stuck-mark { fill: var(--ink2); }+ .leader { stroke: var(--ink2); stroke-width: 1; }+ .grid { stroke: var(--grid); stroke-width: 1; }+ .base { stroke: var(--base); stroke-width: 1; }+ .full { fill: var(--s1); }+ .sent { fill: var(--s2); }+</style>+<rect class="bg" width="${W}" height="${H}" rx="8"/>+${parts.join("\n")}+</svg>+`;+}++main();