test: seal working memory U release and retrospective

This commit is contained in:
Agent Workbench Dev
2026-11-04 08:39:17 +08:00
parent 7e77fd65c3
commit 13849d038f
639 changed files with 1612445 additions and 29 deletions
+7
View File
@@ -241,3 +241,10 @@ docs/live-delivery-t-evidence/**/*.log binary
docs/live-delivery-t-evidence/**/*.txt binary
docs/live-delivery-t-offline.txt binary
docs/live-delivery-t-git-index.txt binary
docs/working-memory-u-evidence/** -text -whitespace
docs/working-memory-u-evidence/**/*.log binary
docs/working-memory-u-evidence/**/*.txt binary
docs/working-memory-u-offline.txt binary
docs/working-memory-u-git-index.txt binary
docs/working-memory-u-release-identity.json -text
+5 -1
View File
@@ -1,5 +1,9 @@
# Agent Workbench项目执行规范
U已本地交付1.24.8/source7e77fd65/候选20261103235313371:同SHA/原范围页聚合、完整小源码/最新纯读组保留、修改前当前检查事实与routine/latest去重完成。114相关、569输入独立重建22/22、三归档/便携、12实际安装和安装副本16+9文件流程,以及源码/便携/安装三载荷各7请求工作记忆夹具通过。正式原PID36552/Provider、65项目81会话6377记录13484事件及outbox/3720工件、全部原表行/导出/工件和公开模型中心在网页/原生回看后再次精确保持,9229关闭。本轮真实请求0,原T九测试仍失败,未证明真实交付或Purge收益。证据620份/100126636字节离线核验通过,身份见docs/working-memory-u-release-identity.json,回顾见docs/RETROSPECTIVE-WORKING-MEMORY-U.md。下一按docs/LIVE-DELIVERY-V-PLAN.md另冻新诊断/单次预检/Node,旧T/R/P/O不续跑;Node后才React/Python/Purge,1.25及更新性能独立排期。不委派、不提取/复制/解密/重存Key、不推送。
以下U开发中及更早“当前/下一”段落按历史时点理解;当前状态以上段和V计划为准。
U开发中:已实现同SHA/原范围真实片段聚合与view4来源核验、首次修改前当前检查事实和routine/latest3去重。原T候选1643→2584,原第7/8实际离线正文在16K/2048/1600内保留四文件及9失败/build通过。实际编译宿主新隔离HTTP夹具7请求、第6/7完整来源且重开验证,原11文件未改、原9测试仍失败、0交付/真实请求。最终114/114相关及升级安装单元通过,1.24.8独立载荷/保留状态正式升级尚在进行,正式仍1.24.7/PID36552/Provider。详见docs/QA-WORKING-MEMORY-U.md。不要续跑T/R/P/O,不提取/复制/解密/重存Key,不委派、不推送。
T已完成新有界实测与回顾,未交付Node:唯一诊断462ms/DNS与三TLS通过,0HTTP/模型/凭据;新无工具预检1请求/112报告tokens/strict matched。新Node8请求/76062报告tokens/0未知、16工具/1原检查审批、原九测试全失败/build通过、0提案/修改/交付,step_limit原样封存。测试2584字符第6轮已全部返回,但第7/8实际结构化文件视图仅27/421字符,原检查job UUID在第6–8原请求不存在;原16tool行离线重现最长页+最新页在预算前丢[0,473]和[2089,2557]。203份/77773746字节证据离线通过,见docs/QA-LIVE-DELIVERY-T.md及回顾。正式仍1.24.7/source5dcd6d7c/原PID36552/Provider;原63项目79导出3660工件216尝试和原行保持(项目位置仅2自有前插逆算),当前65项目81会话6377记录13484事件及outbox/3720工件,74自有工件全SHA核对。预算/高性能池恢复,目标7→8→9/凭据1、全局69→73,9229关闭,无产品改动/重复发行。下一先docs/WORKING-MEMORY-U-PLAN.md离线修复片段聚合和真实当前事实持续保留,阶段真实模型预算0;交付后另冻新Node,不续跑T/R/P/O。Node后才React/Python/Purge;1.25/更新性能仍单列。不委派、不提取/复制/解密/重存Key、不重启原Provider、不推送。
@@ -128,7 +132,7 @@ D固定可信来源生产策略已完成:实现9106655/最终验收d05a741,6
## 当前本地服务与Windows
- 正式服务入口http://127.0.0.1:4318,当前1.24.7,沿用原PID36552与Provider;不可变程序身份以docs/reading-s-release-identity.json为准,S正式保留状态与网页/原生回看见docs/QA-READING-RELIABILITY-S.md。最近T新Node未交付,原8请求和原状态恢复见docs/QA-LIVE-DELIVERY-T.md;当前65项目81会话。普通源码/规划/Git工作不重启服务、不读取或复制Key。下一先docs/WORKING-MEMORY-U-PLAN.md离线修复,不重放T;旧F的Escape失败保持历史含义。
- 正式服务入口http://127.0.0.1:4318,当前1.24.8,沿用原PID36552与Provider;不可变身份见docs/working-memory-u-release-identity.json,U验收/回顾已完成。当前65项目81会话,原表/导出/工件/公开配置精确保持。普通开发不重启服务,不提取/复制/解密/重存Key;下一按docs/LIVE-DELIVERY-V-PLAN.md另冻新诊断/单次预检/Node,旧T/R/P/O不续跑。
- 浏览器/fixture验证使用独立端口与数据目录;用户项目与研究对象的登录/会话配置不用于测试凭据。
- Windows执行环境以实测shell为准。现有工具使用PowerShell 5.1和UTF-8;不用&&/||拼接命令,使用换行和$LASTEXITCODE核对结果。
- 桌面与移动共用执行宿主。手机127.0.0.1指手机,远程接入通过未来经验证的配对网关。
+2 -2
View File
@@ -1,11 +1,11 @@
# Agent Workbench 更新记录
## 1.24.8 · 已读文件与当前检查的工作记忆(开发验收中)
## 1.24.8 · 已读文件与当前检查的工作记忆(已本地交付)
- 同一版本、同一原范围的已返回文件页连续聚合,保留全部原调用和工件来源;空洞不补造、重叠冲突拒绝,旧请求继续按原视图核对。
- 首次修改前也持续携带当前工程指纹、检查计划、实际失败数量和日志指针;源码变化、未知操作或损坏日志不能被当作当前通过。
- 去除常规模型请求中的重复成功摘录与定位开销,保留完整诊断和原错误。实际正文独立核对,保留目标、16K预算、输出和安全预留。
- 离线原T记录与本机HTTP回放已分别验证;本轮不调用真实模型,不将读取改善写成真实工程交付或Purge收益。正式发行验收完成后另记身份。
- 离线原T记录与本机HTTP回放已分别验证;本轮不调用真实模型,不将读取改善写成真实工程交付或Purge收益。独立重建22/22、便携/12实际安装及正式网页/原生回看通过;原PID/Provider和全部原数据保持。身份见docs/working-memory-u-release-identity.json。
## T 实测记录 · 正式仍为1.24.7
+14
View File
@@ -0,0 +1,14 @@
# V:工作记忆修复后的新有界真实交付
U 的 1.24.8 只证明工作记忆修复与发行可靠性,真实模型请求为 0。V 须在 U 独立发行、原状态回核和本地 Git 完成后另冻契约;本计划不允许续跑 T/R/P/O。
1. 只读确认当前实际版本/source/候选、PID/Provider、公开配置、原表每行/全导出/全部工件 SHA,当前选线和预算以新快照为准。预选启用的 jojocode GPT Chat JSON;不自动启用旧连接,不提取、复制、解密或重存真实 Key。
2. 同一连接作一次所属 DNS/TCP/TLS 有界观察,0 HTTP/模型/凭据操作。证书、代理、IP 族和路由策略保持;观察异常即保存结束,不推断唯一根因。
3. 新建无工具单次身份预检,固定连接/端点/协议/严格报告身份,最大一次请求,失败停止。完整原请求/响应、URL、报告型号和真实/未知用量封存;不重试、切池或补造别名,不把报告型号当权重认证。
4. 通过后,新建隔离 Node 费用报表工程和新 Task,原三源码/九测试、11 文件基线、目标和所有约束不变。16K/2048/1600;最多 8 请求、90000 tokens、600000ms。单连接,所有预留与上游原报告保持,不以本地估算覆盖实际用量。
5. 模型独立实现。监督只核对/批准原检查计划、审查应用完整允许文件变更集及确认本地 Git;不提供实现/答案/追加指导,不改测试、配置和 owner 文件/暂存,不扩大预算,不允许 run_command。
6. 本次新增观测:逐请求记录累计真实已读范围、实际正文范围和缺失范围;完整四文件何时同时出现;当前失败 job/日志 SHA 是否持续携带;无新工程状态的重复观察次数。只分析原件,不为收集数据重放模型或工具。
7. 成功需原九测试和 build 通过、当前源码/检查/变更集/Git计划一致,以及仅三个允许模块的已确认本地提交。读完、口头完成和基线 build 通过都不算交付。错误/暂停/身份拒绝/未知结果即封存,不续跑旧样本。
8. 结束后恢复本次明确允许临时修改的公开预算/池/身份策略;逐原行、导出、工件及公开中心精确核对。只对自有新增项目/会话、请求/用量、修订单调增长作事先声明;关闭调试端口,回顾后本地提交,不推送。
Node 通过后才扩展 React/Python。原版 Purge 使用独立同工程/模型/预算的 AB/BA,锁定 Harness/Purge/profile、真实提示/工具输入,统计交付、请求、时间和全部已报告/未知消费。插件加载或单次工程成功不能证明收益。1.25 任务要求/交付复核和更新重复目录核验性能仍独立排期。
+4
View File
@@ -1,5 +1,9 @@
# 后续执行计划
U已本地交付1.24.8/source7e77fd65/候选20261103235313371:同SHA/原范围页聚合、完整小源码/最新纯读组保留、修改前当前检查事实与routine/latest去重完成。114相关、569输入独立重建22/22、三归档/便携、12实际安装和安装副本16+9文件流程,以及源码/便携/安装三载荷各7请求工作记忆夹具通过。正式原PID36552/Provider、65项目81会话6377记录13484事件及outbox/3720工件、全部原表行/导出/工件和公开模型中心在网页/原生回看后再次精确保持,9229关闭。本轮真实请求0,原T九测试仍失败,未证明真实交付或Purge收益。证据620份/100126636字节,见docs/QA-WORKING-MEMORY-U.md、docs/RETROSPECTIVE-WORKING-MEMORY-U.md及docs/working-memory-u-release-identity.json。下一另冻docs/LIVE-DELIVERY-V-PLAN.md的新诊断/单次预检/Node,不续跑T/R/P/O;Node后才React/Python/Purge。1.25/更新重复核验性能仍单列。不委派、不提取/复制/解密/重存Key、不推送。
下一按[V新有界真实交付](LIVE-DELIVERY-V-PLAN.md),U已完成;下方T/S及更早状态按历史时点理解。
T新实测已结束:预检通过,新Node8请求/76062报告tokens/0未知,原九测试全失败/build通过,0提案/修改/交付,step_limit。已读2584字符但后续实际请求未持续携带,原16tool行离线重现最长/最新候选丢页和当前检查事实缺失。203份证据离线通过,正式仍1.24.7/原PID36552/Provider,原63项目79导出3660工件216尝试及声明原行/配置恢复保持,当前65项目81会话。见[T验收](QA-LIVE-DELIVERY-T.md)及[回顾](RETROSPECTIVE-LIVE-DELIVERY-T.md)。
下一优先[U工作记忆修复](WORKING-MEMORY-U-PLAN.md):开发/离线验收真实模型预算0,先复现同SHA片段丢失和当前检查未携带,修复聚合/容量优先级/真实事实视图与历史版本,再独立验收发行;之后另冻新预检/Node。T/R/P/O不续跑,不扩大16K/原预算或提供实现答案。Node后才React/Python和独立原版PurgeAB/BA。1.25和更新869425ms重复核验性能仍单列。下方S及更早“下一/当前”均按历史时点理解。
+29 -17
View File
@@ -1,31 +1,43 @@
# U 工作记忆修复:验收与交付记录
# U 工作记忆修复:1.24.8 已本地交付
当前为1.24.8开发验收。正式仍1.24.7/PID36552/原Provider。最终发行身份、独立载荷和正式保留状态验收完成后补充;本阶段真实模型请求为0。
U已本地交付1.24.8/source7e77fd65/候选20261103235313371:同SHA/原范围页聚合、完整小源码/最新纯读组保留、修改前当前检查事实与routine/latest去重完成。114相关、569输入独立重建22/22、三归档/便携、12实际安装和安装副本16+9文件流程,以及源码/便携/安装三载荷各7请求工作记忆夹具通过。正式原PID36552/Provider、65项目81会话6377记录13484事件及outbox/3720工件、全部原表行/导出/工件和公开模型中心在网页/原生回看后再次精确保持,9229关闭。本轮真实请求0,原T九测试仍失败,未证明真实交付或Purge收益。
原T样本保存在 [T验收](QA-LIVE-DELIVERY-T.md),八请求未交付的结论不改写。U只修复已经定位的系统问题,不续跑旧Task、不提供实现答案、不扩大16K/2048/1600预算。
不可变发行候选为 D:\Ai-project\REA逆向\Agent-Workbench\releases\Agent-Workbench-1.24.8-win-x64-20261103235313371,产品源码提交为 7e77fd65c367b711a9a59b30ef216f5fdf7feb11。维护文档和验收器的后续提交不改变此产品身份。原 T 的八请求未交付结论保持,见 [T验收](QA-LIVE-DELIVERY-T.md)。
## 已实现
## 产品修复
`working-set`观察版本3仅合并同路径/SHA/原行范围/总字符数的实际返回页。每个片段保留原调用、消息组和原结果SHA;连续且重叠字节一致才合并,空洞独立、不同版本不继承、损坏坐标与冲突拒绝。旧版本1/2及发送视图1–3保持。新发送view4精简完整页的重复来源,截取时明确实际发送区间、缺失已读区间和原工件恢复入口。
working-set 观察版本3只合并同路径/SHA/原行范围/总字符数的真实返回页,每片段保留原调用、消息组和结果SHA。连续且重叠一致才合并,空洞独立、不同版本不继承、损坏坐标与冲突拒绝。新发送view4精简重复来源,部分发送明确实际区间、未发送已读区间和原工件恢复入口。旧观察与发送视图按原版本独立核对。
`delivery-progress`版本2在真实工程识别/检查活动后、首次修改前携带当前fingerprint、计划/job、实际测试数量和所属日志SHA。当前源码和原日志都验证;无修改的通过基线不会进入Git,未知/待审/损坏来源不授予新操作。纯文件读取不触发额外工程扫描。实际Git/检查/审批原契约保持。
delivery-progress版本2在真实工程识别/检查后、首次修改前持续携带当前源码fingerprint、有效计划/job、九测试数量和日志SHA。源码和原日志独立验证;纯read_file不触发工程扫描,无修改的通过基线不能进入Git,未知/待审/损坏来源不授权重跑。latest-tools view3和routine context2只减少重复成功读取摘录与相同已匹配路由回声,完整诊断API、错误、原件和不同/不匹配身份仍保留。
新latest-tools view3和routine context2去除重复成功读取摘录与相同已匹配路由回声。完整诊断API、原工件/错误/未知结果/不同路由和不匹配身份仍保留。
## 验收范围与实际结果
## 已观察结果
- 最终16相关测试文件114/114通过,构建通过;包含片段/Unicode/空洞/重叠冲突/改版/损坏原件、旧视图、实际分页、完整目标/工具配对/预算、原基线事实及安装/升级单元。未重复全仓测试。
- 原T16工具行重放:旧候选1643/2584字符,新候选2584/2584、范围[0,2584]。原第7/8请求以原23工具/完整目标/16K/2048/1600离线重建,实际输入12307/12086均不超过12352;测试2584字符和51/93/52三个模块全文、原9失败/build通过job和日志SHA均实际存在,来源独立核验。
- 原T八份历史请求继续使用原view3/latest2核对,原字节未改写。
- 源码归档569输入(564跟踪输入及5例示dist)独立提取/离线安装/重建,22份编译文件逐字节一致;5例示dist也从归档源码独立重建核对。三归档、实际便携验证通过。
- 源码、便携及实际安装副本各7次本地HTTP夹具请求,第6/7请求保留全部四文件及当前九失败/build通过事实;三组实际请求工件重开核验,11文件原字节/Git状态保持、0提案/修改/交付。原前三助手响应仅重绑动态原计划ID,后续声明为确定性续读;没有监督提供实现答案。
- Windows实际隔离安装12组生命周期通过,覆盖活动窗口/请求/原审批阻止、损坏清单拒绝、指针故障回退、原宿主保留、独立窗口崩溃、fixture凭据重启恢复和保留数据卸载;安装副本16组成果/9组文件流程及3组工作记忆证据通过。
- 原产品安装器完成1.24.7→1.24.8本地保留状态升级。正式Edge1440/390只读回看、原生安装入口窗口与高性能池回看通过,网页拦截所有写API且无写入尝试。回看后再次核对原65项目/81导出/全部原表每行和schema/3720工件字节/公开模型配置,精确保持;原PID36552/Provider和hasKey保持,未读取Key,9229关闭。
- 最终源码相关16文件114/114通过,包含聚合、Unicode/空洞/冲突/改版/损坏原件、旧视图、实际分页、预算/完整目标/工具配对、原基线事实和安装/热升级单元;构建通过。完整全仓测试未重复,不将相关检查称作全仓验收。
## 首失败和修正
- 原T16工具行的确定性重放:第六轮后旧候选1643/2584字符,新候选2584/2584。
- 原T第7/8请求离线重建:原23工具、完整原目标、16K/2048/1600,实际正文同时携带2584测试+51/93/52三个模块和原9失败/build通过事实。首通过输入12307/12086,均不超过12352;实际SHA工件和聚合来源验证通过。
- 实际编译宿主HTTP夹具:原T目标/11文件/前三个原助手响应,只将动态原计划ID绑定到本机;后续确定性续读,7请求,在第6/7正文保留四文件全文及原失败检查,经重开Store独立核验所有发送工件。原源码未改、九测试仍失败、0提案/交付。不是模型能力测试。
首58项56通过2失败:纯长文件新页被累计观察挤出,以及legacy宽读取排序回退;修复最新纯读原组优先和稳定路径/宽页排序。第二21项19通过2失败、第三37项36通过1失败还包含新增fixture使用无效tool ID,改用真实UUID。随后82项81通过1失败为旧测试只在latest.content_excerpt寻找源码,改为核对实际配对消息/working-set/旧视图的原字节,未放宽保留目标。
## 中间失败与修复
原wire首驱动误猜money.mjs,真实为amount.mjs;第二至第四容量检验确实拒绝完整覆盖。精简重复诊断、定位和成功摘录后第五/最终实际请求通过。编译宿主首夹具误用不存在approval.kind,后按原checkPlanId、test/build和原命令核对。所有原失败日志与中间请求保留。
首58项56通过2失败:完整长文件新页被累计观察挤走,以及legacy无坐标的宽读取排序回退;保留首TAP,修复纯read_file原配对优先和稳定路径/宽读取排序。第二21项19通过2失败包含同一分页路径及新测试虚拟tool使用无效ID,后者按真实UUID修复。第三37项36通过1失败仍是虚拟ID;下一82项81通过1失败为旧回归只在latest.content_excerpt寻找源码,修改为核对实际配对消息/working_set/旧视图的完整原字节,未放宽保留目标。
正式升级首轮before只读检查发现一个最小化原生窗口而拒绝,安装器尚未执行;通过Computer Use恢复观察并关闭后,新before-recheck再次确认全部原状态精确保持,再执行唯一正式安装。首before失败原件保留。
原T wire驱动首轮误猜money.mjs、真实为amount.mjs。第二至第四容量验证真实拒绝完整覆盖,保留输出;精简重复诊断/来源/成功摘录后第五轮实际正文通过。实际编译宿主首夹具误断言不存在的approval.kind,按真实checkPlanId/checkScripts/原命令核对后新隔离项目通过。其它只读路径查找失败、输出截断及一次PowerShell转义失败均未计为验收,不影响正式服务或重放外部操作。
便携首轮验收漏列1.24.8,误用旧示例目录规则;第二轮受控引擎helper也漏列版本。保留两次原失败,在忽略目录适配器中仅补七个便携和一个受控版本入口、相应相对import,原断言保持。第三轮同一不可变包完整通过,未重打包。正式升级后将相同QA入口修正写回源码,属于验收维护,不改变已发行二进制。离线核验器初版对可空/复用工件和公开导出隐藏的内部元数据作了错误假设,修正为可空语义、严格旧SHA来源及只读隔离fixture记录;未重放模型/安装。其它只读路径查找、转义和输出截断不计为通过。
## 待完成
## 证据、限制与下一步
最终相关回归、独立源码重建、不可变便携/安装载荷核对、保留正式PID/Provider/全部原行/导出/工件/公开模型配置升级和实际窗口回看,随后封存回顾与本地Git。后续真实模型样本另立冻结契约,仍不将本轮离线通过当作收益。
证据620份/100126636字节,见docs/QA-WORKING-MEMORY-U.md、docs/RETROSPECTIVE-WORKING-MEMORY-U.md及docs/working-memory-u-release-identity.json。下一另冻docs/LIVE-DELIVERY-V-PLAN.md的新诊断/单次预检/Node,不续跑T/R/P/O;Node后才React/Python/Purge。1.25/更新重复核验性能仍单列。不委派、不提取/复制/解密/重存Key、不推送。
发行的历史证据归档保持冻结时字节;本次最终U验收在仓库单独封存,不覆盖原ZIP。
封存目录 [working-memory-u-evidence](working-memory-u-evidence/manifest.json),可用 node scripts/verify-working-memory-u.mjs 独立离线核对实际正文覆盖、旧/新来源、编译身份和原状态;--index另外核对Git索引原字节。驱动按惰性文本封存,禁止把其内容自动当重放授权。
本轮真实模型调用0,原九测试在夹具中仍失败,未完成真实Node交付,也未衡量Purge收益。下一按 [V计划](LIVE-DELIVERY-V-PLAN.md)另立有界新样本,保留原预算和监督边界;Node通过后才扩React/Python与独立Purge AB/BA。
Git索引首核对因通用忽略规则未包含部分.log/.tap而拒绝;按原不可变清单精确补入被忽略原件,未修改清单或证据字节。首结果见working-memory-u-index-first.json,随后索引全字节核对另存。
+15
View File
@@ -0,0 +1,15 @@
# U回顾:读过的源码必须真的留在下一请求
T暴露的是两件可验证的系统问题:同文件的已读页在进入预算前被候选规则丢弃;首次修改前,真实失败检查没有持续带入模型。U分别修复了有来源的同版本页聚合和当前工程事实,并减少重复定位/成功摘录。在原16K/2048/1600内,原第7/8请求现在完整保留四文件和原检查。这个结论来自实际正文,不能只由候选包含或界面显示推出。
聚合不等于补全文。只接受真实返回、同SHA/原范围、连续或一致重叠的字节;空洞、冲突和版本变化保持可见。当前事实也不是执行授权:计划、日志、源码和任务归属需要独立验证,损坏、未知和待审状态保留原门禁,旧请求不按新算法重写。
114相关测试、原八历史请求、两次离线重建及三个编译载荷的七请求夹具,分别回答边界、兼容、容量和实际接入问题;没有任何一项能代替真实模型独立写出实现。九测试仍失败且零源码修改是本轮刻意保持的边界,不能将其包装成工程交付。
发行检查中,两处显式版本清单漏列1.24.8导致验收脚本失败;改正入口后用原包复验,保留首失败和严格断言。后续维护应让发行版本入口有集中校验,但不在本次冻结后再扩大产品修改。实际安装与正式升级仍完成逐文件、指针、活动保护和回退核验,未以加速为由删除检查。本次唯一正式更新operation耗时707602ms,重复full-manifest和directory-inventory原阶段已封存到update-cost.json;更新重复目录核验仍是独立性能任务。
U已本地交付1.24.8/source7e77fd65/候选20261103235313371:同SHA/原范围页聚合、完整小源码/最新纯读组保留、修改前当前检查事实与routine/latest去重完成。114相关、569输入独立重建22/22、三归档/便携、12实际安装和安装副本16+9文件流程,以及源码/便携/安装三载荷各7请求工作记忆夹具通过。正式原PID36552/Provider、65项目81会话6377记录13484事件及outbox/3720工件、全部原表行/导出/工件和公开模型中心在网页/原生回看后再次精确保持,9229关闭。本轮真实请求0,原T九测试仍失败,未证明真实交付或Purge收益。证据620份/100126636字节,见docs/QA-WORKING-MEMORY-U.md、docs/RETROSPECTIVE-WORKING-MEMORY-U.md及docs/working-memory-u-release-identity.json。下一另冻docs/LIVE-DELIVERY-V-PLAN.md的新诊断/单次预检/Node,不续跑T/R/P/O;Node后才React/Python/Purge。1.25/更新重复核验性能仍单列。不委派、不提取/复制/解密/重存Key、不推送。
下一采用新的V样本,除原交付标准外,逐请求量化累计已读和实际发送覆盖、当前job保留、无新工程状态的重复调用;不追加提示或答案影响模型。先以同预算Node完成真实闭环,再研究React/Python和原版Purge。旧T/R/P/O继续封存,不用新成功覆盖旧失败。
Git索引首核对因通用忽略规则未包含部分.log/.tap而拒绝;按原不可变清单精确补入被忽略原件,未修改清单或证据字节。首结果见working-memory-u-index-first.json,随后索引全字节核对另存。
+1 -1
View File
@@ -1,6 +1,6 @@
# U:已读片段与当前执行事实的持续保留
这是T结束后的下一开发切片,现已实现并在独立发行验收中;交付状态见[U验收](QA-WORKING-MEMORY-U.md)。T的原字节和结果见[验收](QA-LIVE-DELIVERY-T.md)。正式保持1.24.7/原PID36552/Provider,U开发和离线验收阶段真实模型预算为0;不续跑T/R/P/O、不提取/复制/解密/重存Key、不推送。修复范围围绕当前Node交付阻塞,不扩展无关能力。
这是T结束后的下一开发切片,现已完成独立验收并本地交付1.24.8;交付状态见[U验收](QA-WORKING-MEMORY-U.md)。T的原字节和结果见[验收](QA-LIVE-DELIVERY-T.md)。正式为1.24.8,保留原PID36552/Provider,U开发和离线验收阶段真实模型预算为0;不续跑T/R/P/O、不提取/复制/解密/重存Key、不推送。修复范围围绕当前Node交付阻塞,不扩展无关能力。
## 目标和实现范围
@@ -0,0 +1,30 @@
{
"_approval-presentation-QyCkfhWb.js": {
"file": "assets/approval-presentation-QyCkfhWb.js",
"name": "approval-presentation"
},
"index.html": {
"file": "assets/desktop-CwtjTp8K.js",
"name": "desktop",
"src": "index.html",
"isEntry": true,
"imports": [
"_approval-presentation-QyCkfhWb.js"
],
"css": [
"assets/desktop-DC8YSCxQ.css"
]
},
"mobile.html": {
"file": "assets/mobile-DdtBN08G.js",
"name": "mobile",
"src": "mobile.html",
"isEntry": true,
"imports": [
"_approval-presentation-QyCkfhWb.js"
],
"css": [
"assets/mobile-joLHctQw.css"
]
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect x="2" y="2" width="60" height="60" rx="14" fill="#154b4a"/><path d="M12 44l8-25h6l8 25h-6l-2-6H18l-2 6zm8-11h5l-2.5-8zm14-14h5l3 17 3-13h5l3 13 3-17h5l-5 25h-6l-2.5-13L45 44h-6z" fill="#fcfdfc"/></svg>

After

Width:  |  Height:  |  Size: 268 B

@@ -0,0 +1,8 @@
<!doctype html>
<html lang="zh-CN">
<head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="theme-color" content="#154b4a" /><link rel="icon" type="image/svg+xml" href="/favicon.svg" /><title>Agent Workbench · 本地编程工作台</title> <script type="module" crossorigin src="/assets/desktop-CwtjTp8K.js"></script>
<link rel="modulepreload" crossorigin href="/assets/approval-presentation-QyCkfhWb.js">
<link rel="stylesheet" crossorigin href="/assets/desktop-DC8YSCxQ.css">
</head>
<body><div id="root"></div></body>
</html>
@@ -0,0 +1,5 @@
[
"/assets/approval-presentation-QyCkfhWb.js",
"/assets/mobile-DdtBN08G.js",
"/assets/mobile-joLHctQw.css"
]
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 192"><rect width="192" height="192" rx="36" fill="#172b43"/><path d="M42 55h108v82H42z" fill="none" stroke="#f3f6fa" stroke-width="9"/><path d="m60 78 16 18-16 18m32 0h35" fill="none" stroke="#8bd0b9" stroke-width="9" stroke-linecap="square"/></svg>

After

Width:  |  Height:  |  Size: 307 B

@@ -0,0 +1,12 @@
const CACHE = 'workbench-mobile-65469da75610f50cf284';
const FILES = ["/","/mobile.webmanifest","/mobile-icon.svg","/mobile-touch-icon.png","/assets/approval-presentation-QyCkfhWb.js","/assets/mobile-DdtBN08G.js","/assets/mobile-joLHctQw.css"];
self.addEventListener('install', event => event.waitUntil(caches.open(CACHE).then(cache => cache.addAll(FILES)).then(() => self.skipWaiting())));
self.addEventListener('activate', event => event.waitUntil(caches.keys().then(names => Promise.all(names.filter(name => name.startsWith('workbench-mobile-') && name !== CACHE).map(name => caches.delete(name)))).then(() => self.clients.claim())));
self.addEventListener('fetch', event => {
const url = new URL(event.request.url);
if (event.request.method !== 'GET' || url.origin !== self.location.origin || url.search || !FILES.includes(url.pathname)) return;
event.respondWith(fetch(event.request).then(response => {
if (response.ok) { const copy = response.clone(); event.waitUntil(caches.open(CACHE).then(cache => cache.put(event.request, copy))); }
return response;
}).catch(async () => (await caches.match(event.request)) || Response.error()));
});
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

@@ -0,0 +1,5 @@
<!doctype html>
<html lang="zh-CN"><head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /><meta name="theme-color" content="#172b43" /><meta name="apple-mobile-web-app-capable" content="yes" /><meta name="apple-mobile-web-app-title" content="Workbench" /><link rel="manifest" href="/mobile.webmanifest" /><link rel="icon" type="image/svg+xml" href="/mobile-icon.svg" /><link rel="apple-touch-icon" href="/mobile-touch-icon.png" /><title>Agent Workbench · 手机伴随端</title> <script type="module" crossorigin src="/assets/mobile-DdtBN08G.js"></script>
<link rel="modulepreload" crossorigin href="/assets/approval-presentation-QyCkfhWb.js">
<link rel="stylesheet" crossorigin href="/assets/mobile-joLHctQw.css">
</head><body><div id="mobile-root"></div></body></html>
@@ -0,0 +1 @@
{"id":"/","name":"Agent Workbench 手机伴随端","short_name":"Workbench","lang":"zh-CN","start_url":"/","scope":"/","display":"standalone","background_color":"#f1f4f7","theme_color":"#172b43","icons":[{"src":"/mobile-icon.svg","sizes":"any","type":"image/svg+xml","purpose":"any"},{"src":"/mobile-touch-icon.png","sizes":"256x256","type":"image/png","purpose":"any"}]}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

File diff suppressed because it is too large Load Diff
@@ -0,0 +1,15 @@
"use strict";
// src/desktop/preload.cjs
var { contextBridge, ipcRenderer } = require("electron");
contextBridge.exposeInMainWorld("desktopWorkbench", Object.freeze({
protocol: "agent-workbench-desktop-v1",
status: () => ipcRenderer.invoke("awb:desktop-status"),
pickProject: () => ipcRenderer.invoke("awb:desktop-pick-project"),
projectFolder: (projectId) => ipcRenderer.invoke("awb:desktop-project-folder", { projectId }),
openFilePreview: (input) => ipcRenderer.invoke("awb:desktop-file-preview", input),
reviewTask: (input) => ipcRenderer.invoke("awb:desktop-review-task", input),
revealFile: (input) => ipcRenderer.invoke("awb:desktop-reveal-file", input),
stopHost: () => ipcRenderer.invoke("awb:desktop-stop-host"),
browsingLayout: (input) => ipcRenderer.invoke("awb:browsing-layout", input)
}));
@@ -0,0 +1,453 @@
// src/desktop/host-cli.mjs
import fs5 from "node:fs";
import path6 from "node:path";
import os from "node:os";
import { fileURLToPath } from "node:url";
// src/core/desktop/host-controller.mjs
import fs4 from "node:fs";
import path5 from "node:path";
import { spawn, execFileSync as execFileSync2 } from "node:child_process";
import { randomBytes, randomUUID as randomUUID2 } from "node:crypto";
import { setTimeout as delay } from "node:timers/promises";
// src/shared/contracts/desktop-host.mjs
import { createHmac, timingSafeEqual } from "node:crypto";
var HOST_PROTOCOL = "agent-workbench-host-v1";
var HOST_REGISTRATION_FILE = "host-authority-v1.json";
var hostError = (message, code = "HOST_IDENTITY_REJECTED", status = 409) => Object.assign(new Error(message), { code, status });
var canonicalHost = (value) => Array.isArray(value) ? value.map(canonicalHost) : value && typeof value === "object" ? Object.fromEntries(Object.keys(value).sort().map((key) => [key, canonicalHost(value[key])])) : value;
function hostProof(identity, challenge, secret) {
if (!/^[a-f0-9]{64}$/.test(challenge) || !Buffer.isBuffer(secret) || secret.length !== 32) throw hostError("\u5BBF\u4E3B\u6838\u9A8C\u6311\u6218\u683C\u5F0F\u65E0\u6548\u3002", "HOST_CHALLENGE_INVALID", 400);
return createHmac("sha256", secret).update(JSON.stringify(canonicalHost({ identity, challenge }))).digest("hex");
}
function verifyHostProof(reply, challenge, secret) {
if (!reply?.identity || reply.challenge !== challenge || !/^[a-f0-9]{64}$/.test(reply.proof ?? "")) throw hostError("\u5BBF\u4E3B\u6CA1\u6709\u63D0\u4F9B\u5339\u914D\u7684\u5B9E\u4F8B\u6838\u9A8C\u3002");
const actual = Buffer.from(reply.proof, "hex"), expected = Buffer.from(hostProof(reply.identity, challenge, secret), "hex");
if (!timingSafeEqual(actual, expected)) throw hostError("\u7AEF\u53E3\u54CD\u5E94\u4E0D\u5C5E\u4E8E\u767B\u8BB0\u7684\u6267\u884C\u5BBF\u4E3B\u3002");
return reply.identity;
}
// src/core/process-environment.mjs
import path from "node:path";
function projectEnvironment(extra = {}) {
const allowed = /^(path|pathext|systemroot|systemdrive|windir|comspec|temp|tmp|userprofile|homedrive|homepath|home|appdata|localappdata|programfiles(?:\(x86\))?|commonprogramfiles(?:\(x86\))?|lang|lc_all)$/i;
const environment = Object.fromEntries(Object.entries(process.env).filter(([name]) => allowed.test(name)));
const inheritedPath = Object.entries(environment).find(([name]) => name.toLowerCase() === "path")?.[1] || "";
for (const name of Object.keys(environment)) if (name.toLowerCase() === "path") delete environment[name];
return { ...environment, PATH: [path.dirname(process.execPath), inheritedPath].filter(Boolean).join(path.delimiter), ...extra };
}
// src/core/desktop/process-identity.mjs
import fs2 from "node:fs";
import path3 from "node:path";
import { execFileSync } from "node:child_process";
import { createHash } from "node:crypto";
// src/core/desktop/file-state.mjs
import fs from "node:fs";
import path2 from "node:path";
import { randomUUID } from "node:crypto";
var normalized = (value) => process.platform === "win32" ? value.toLowerCase() : value;
var samePath = (a, b) => normalized(path2.resolve(a)) === normalized(path2.resolve(b));
function assertLocalTree(absolute, { missing = false } = {}) {
const resolved = path2.resolve(absolute), parsed = path2.parse(resolved);
let current = parsed.root;
const components = resolved.slice(parsed.root.length).split(path2.sep).filter(Boolean);
for (const component of components) {
if (component.includes(":") || component.includes("\0")) throw hostError("\u672C\u673A\u72B6\u6001\u8DEF\u5F84\u683C\u5F0F\u65E0\u6548\u3002");
current = path2.join(current, component);
let stat;
try {
stat = fs.lstatSync(current);
} catch (cause) {
if (missing && cause.code === "ENOENT") return resolved;
throw cause;
}
if (stat.isSymbolicLink() || !samePath(current, fs.realpathSync.native(current))) throw hostError("\u672C\u673A\u72B6\u6001\u4E0D\u63A5\u53D7\u94FE\u63A5\u6216\u91CD\u89E3\u6790\u76EE\u5F55\u3002");
if (stat.isFile() && stat.nlink !== 1) throw hostError("\u672C\u673A\u72B6\u6001\u6587\u4EF6\u5177\u6709\u591A\u4E2A\u8DEF\u5F84\u3002");
}
return resolved;
}
function ownedChild(root, relative, { missing = false } = {}) {
if (typeof relative !== "string") throw hostError("\u672C\u673A\u72B6\u6001\u8DEF\u5F84\u65E0\u6548\u3002");
assertLocalTree(root);
const base = fs.realpathSync.native(root), target = path2.resolve(base, relative);
if (path2.isAbsolute(relative) || path2.win32.isAbsolute(relative) || relative.includes("\0") || !normalized(target).startsWith(normalized(base + path2.sep))) throw hostError("\u672C\u673A\u72B6\u6001\u8DEF\u5F84\u8D85\u51FA\u6240\u5C5E\u76EE\u5F55\u3002");
let existing = target;
while (!fs.existsSync(existing)) {
if (!missing) throw hostError("\u672C\u673A\u72B6\u6001\u6587\u4EF6\u4E0D\u5B58\u5728\u3002", "HOST_REGISTRATION_MISSING");
const parent = path2.dirname(existing);
if (parent === existing) throw hostError("\u672C\u673A\u72B6\u6001\u8DEF\u5F84\u65E0\u6CD5\u6838\u5BF9\u3002");
existing = parent;
}
const real = fs.realpathSync.native(existing);
if (!samePath(base, real) && !normalized(real).startsWith(normalized(base + path2.sep))) throw hostError("\u672C\u673A\u72B6\u6001\u94FE\u63A5\u8D85\u51FA\u6240\u5C5E\u76EE\u5F55\u3002");
if (fs.lstatSync(existing).isSymbolicLink()) throw hostError("\u672C\u673A\u72B6\u6001\u4E0D\u63A5\u53D7\u94FE\u63A5\u6216\u91CD\u89E3\u6790\u76EE\u5F55\u3002");
const stat = fs.statSync(existing);
if (stat.isFile() && stat.nlink !== 1) throw hostError("\u672C\u673A\u72B6\u6001\u6587\u4EF6\u5177\u6709\u591A\u4E2A\u8DEF\u5F84\u3002");
return assertLocalTree(target, { missing });
}
function readState(file, maximum = 4 * 1024 * 1024) {
assertLocalTree(file);
const stat = fs.lstatSync(file);
if (!stat.isFile() || stat.isSymbolicLink() || stat.nlink !== 1 || stat.size > maximum) throw hostError("\u672C\u673A\u72B6\u6001\u6587\u4EF6\u683C\u5F0F\u6216\u4F5C\u7528\u8303\u56F4\u65E0\u6548\u3002");
try {
return JSON.parse(fs.readFileSync(file, "utf8").replace(/^\uFEFF/, ""));
} catch {
throw hostError("\u672C\u673A\u72B6\u6001\u6587\u4EF6\u635F\u574F\uFF0C\u8BF7\u6838\u5BF9\u539F\u8BB0\u5F55\u3002");
}
}
function writeState(file, value) {
assertLocalTree(file, { missing: true });
const directory = path2.dirname(file), temporary = path2.join(directory, "." + path2.basename(file) + "-" + randomUUID() + ".tmp");
if (fs.existsSync(file)) readState(file);
try {
const descriptor = fs.openSync(temporary, "wx", 384);
try {
fs.writeFileSync(descriptor, JSON.stringify(value, null, 2) + "\n");
fs.fsyncSync(descriptor);
} finally {
fs.closeSync(descriptor);
}
assertLocalTree(file, { missing: true });
fs.renameSync(temporary, file);
} finally {
if (fs.existsSync(temporary)) fs.unlinkSync(temporary);
}
}
// src/core/desktop/process-identity.mjs
function windowsProcessObservationScript(pid) {
if (!Number.isInteger(pid) || pid < 1 || pid > 2147483647) throw hostError("\u5BBF\u4E3BPID\u65E0\u6548\u3002");
const query = 'Get-CimInstance Win32_Process -Filter "ProcessId=' + pid + '"';
return "$ErrorActionPreference='Stop';$ProgressPreference='SilentlyContinue';[Console]::OutputEncoding=New-Object System.Text.UTF8Encoding($false);$awbProcess=" + query + ';if($null -eq $awbProcess){Write-Output "null";exit 0};try{$awbOwner=Invoke-CimMethod -InputObject $awbProcess -MethodName GetOwnerSid;if($awbOwner.ReturnValue -ne 0 -or -not $awbOwner.Sid){throw "Owner identity unavailable"};}catch{$awbRemaining=' + query + ';if($null -eq $awbRemaining){Write-Output "null";exit 0};throw};[pscustomobject]@{pid=[int]$awbProcess.ProcessId;parentPid=[int]$awbProcess.ParentProcessId;createdAt=$awbProcess.CreationDate.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffZ");executable=$awbProcess.ExecutablePath;userSid=$awbOwner.Sid}|ConvertTo-Json -Compress';
}
function observeWindowsProcess(pid) {
if (process.platform !== "win32") throw hostError("\u6B64\u684C\u9762\u5BBF\u4E3B\u6838\u9A8C\u9700\u8981Windows\u3002", "HOST_PLATFORM_UNSUPPORTED");
const script = windowsProcessObservationScript(pid);
try {
const shell = path3.join(process.env.SystemRoot || "C:\\Windows", "System32/WindowsPowerShell/v1.0/powershell.exe");
const output = execFileSync(
shell,
["-NoProfile", "-NonInteractive", "-EncodedCommand", Buffer.from(script, "utf16le").toString("base64")],
{ windowsHide: true, encoding: "utf8", stdio: ["pipe", "pipe", "pipe"], timeout: 15e3, maxBuffer: 65536, env: projectEnvironment() }
);
const value = JSON.parse(output.trim().replace(/^\uFEFF/, ""));
if (value === null) return null;
if (value.pid !== pid || !Number.isFinite(Date.parse(value.createdAt)) || !/^S-1-\d+(?:-\d+)+$/.test(value.userSid) || !value.executable || !fs2.existsSync(value.executable)) throw new Error("Invalid observation");
return { ...value, executable: fs2.realpathSync.native(value.executable) };
} catch {
throw hostError("\u65E0\u6CD5\u6838\u5BF9Windows\u5BBF\u4E3B\u521B\u5EFA\u3001\u7528\u6237\u6216\u53EF\u6267\u884C\u8EAB\u4EFD\uFF1B\u4E0D\u4F1A\u590D\u7528\u6216\u505C\u6B62\u672A\u77E5\u8FDB\u7A0B\u3002", "HOST_PROCESS_UNVERIFIED");
}
}
function binaryIdentity(file) {
assertLocalTree(file);
const absolute = fs2.realpathSync.native(file), stat = fs2.lstatSync(absolute);
if (!stat.isFile() || stat.isSymbolicLink() || stat.nlink !== 1 || stat.size > 256 * 1024 * 1024) throw hostError("\u5BBF\u4E3B\u53EF\u6267\u884C\u6587\u4EF6\u8EAB\u4EFD\u65E0\u6548\u3002");
return { path: absolute, bytes: stat.size, sha256: createHash("sha256").update(fs2.readFileSync(absolute)).digest("hex") };
}
// src/core/desktop/app-installation.mjs
import fs3 from "node:fs";
import path4 from "node:path";
import { createHash as createHash2 } from "node:crypto";
function inspectHostInstallation(directory, { full = false, onProgress = null } = {}) {
assertLocalTree(directory);
const root = fs3.realpathSync.native(path4.resolve(directory));
if (!fs3.statSync(root).isDirectory()) throw hostError("\u5BBF\u4E3B\u5B89\u88C5\u76EE\u5F55\u65E0\u6548\u3002");
const digest = (value) => createHash2("sha256").update(value).digest("hex");
const manifestFile = path4.join(root, "MANIFEST.json"), manifest = fs3.existsSync(manifestFile) ? readState(manifestFile, 16 * 1024 * 1024) : null;
if (manifest && (manifest.app !== "agent-workbench" || !Array.isArray(manifest.files) || manifest.files.length > 6e4)) throw hostError("\u5BBF\u4E3B\u53D1\u884C\u6E05\u5355\u65E0\u6548\u3002");
const version = manifest?.version ?? (fs3.existsSync(path4.join(root, "package.json")) ? readState(path4.join(root, "package.json")).version : null);
if (typeof version !== "string" || !/^\d+\.\d+\.\d+$/.test(version)) throw hostError("\u5BBF\u4E3B\u5B89\u88C5\u7248\u672C\u65E0\u6548\u3002");
const files = /* @__PURE__ */ new Set(["dist-server/server.mjs", "dist-server/hot-upgrade.mjs", "dist-client/index.html"]);
if (!manifest || fs3.existsSync(path4.join(root, "dist-server/host-launcher.mjs"))) files.add("dist-server/host-launcher.mjs");
if (fs3.existsSync(path4.join(root, "dist-server/install-manager.mjs"))) files.add("dist-server/install-manager.mjs");
for (const relative of ["dist-desktop/main.cjs", "dist-desktop/preload.cjs"]) if (fs3.existsSync(path4.join(root, relative))) files.add(relative);
const names = /* @__PURE__ */ new Map();
for (const row of manifest?.files ?? []) {
if (!row || typeof row.path !== "string" || row.path.includes("\\") || row.path.split("/").includes("..") || names.has(row.path) || !/^[a-f0-9]{64}$/.test(row.sha256 ?? "") || !Number.isSafeInteger(row.bytes) || row.bytes < 0) throw hostError("\u5BBF\u4E3B\u6E05\u5355\u5305\u542B\u91CD\u590D\u6216\u8D8A\u754C\u8F93\u5165\u3002");
names.set(row.path, row);
if (full || /^(dist-client|dist-server|dist-desktop)\//.test(row.path)) files.add(row.path);
}
if (!manifest || manifest.kind === "source") for (const entry of fs3.readdirSync(path4.join(root, "dist-client/assets"))) files.add("dist-client/assets/" + entry);
const selected = [...files].sort(), totalBytes = selected.reduce((sum, name) => sum + (names.get(name)?.bytes ?? 0), 0);
let completedFiles = 0, completedBytes = 0;
const report = (currentPath) => onProgress?.({ scope: full ? "full-manifest" : "loaded-inputs", root, totalFiles: selected.length, totalBytes: manifest ? totalBytes : null, completedFiles, completedBytes, currentPath });
report(null);
const inputs = selected.map((relative) => {
const file = ownedChild(root, relative), identity = binaryIdentity(file), declared = names.get(relative);
if (manifest?.kind === "portable" && !declared) throw hostError("\u5B9E\u9645\u5BBF\u4E3B\u7A0B\u5E8F\u4E0D\u5728\u539F\u53D1\u884C\u6E05\u5355\u4E2D\u3002");
if (declared && (identity.bytes !== declared.bytes || identity.sha256 !== declared.sha256)) throw hostError("\u5B9E\u9645\u5BBF\u4E3B\u7A0B\u5E8F\u4E0E\u539F\u53D1\u884C\u6E05\u5355\u4E0D\u4E00\u81F4\u3002");
completedFiles++;
completedBytes += identity.bytes;
report(relative);
return { path: relative, bytes: identity.bytes, sha256: identity.sha256 };
});
const result = {
root,
version,
kind: manifest?.kind ?? "development-build",
manifestSha256: manifest ? digest(fs3.readFileSync(manifestFile)) : null,
inputs,
verification: full ? "full-manifest" : "loaded-host-and-client-inputs"
};
return { ...result, identitySha256: digest(JSON.stringify(canonicalHost(result))) };
}
// src/core/desktop/host-controller.mjs
var HOST_ENVIRONMENT = Object.freeze(["AGENT_WORKBENCH_DEEPSEEK_ROOT", "AGENT_WORKBENCH_PURGE_ROOT", "AGENT_WORKBENCH_PYTHON_PATH", "AGENT_WORKBENCH_TEST_PYTHON"]);
async function jsonResponse(response) {
if (!response.ok) throw hostError("\u672C\u673A\u5BBF\u4E3B\u63A5\u53E3\u62D2\u7EDD\u64CD\u4F5C\uFF08HTTP " + response.status + "\uFF09\u3002", "HOST_API_REJECTED", response.status);
const chunks = [];
let length = 0;
for await (const chunk of response.body) {
length += chunk.length;
if (length > 4 * 1024 * 1024) throw hostError("\u672C\u673A\u5BBF\u4E3B\u54CD\u5E94\u8FC7\u5927\u3002");
chunks.push(chunk);
}
try {
return JSON.parse(Buffer.concat(chunks).toString("utf8"));
} catch {
throw hostError("\u7AEF\u53E3\u672A\u8FD4\u56DE\u6709\u6548\u7684\u5BBF\u4E3B\u534F\u8BAE\u3002");
}
}
var HostController = class {
constructor({ appRoot: appRoot2, dataRoot: dataRoot2, port = 4318, nodePath: nodePath2 = null, timeoutMs = 45e3, environment = {} }) {
if (!Number.isInteger(port) || port < 1 || port > 65535 || typeof dataRoot2 !== "string" || !path5.isAbsolute(dataRoot2)) throw hostError("\u684C\u9762\u5BBF\u4E3B\u76EE\u5F55\u6216\u7AEF\u53E3\u65E0\u6548\u3002");
this.installation = inspectHostInstallation(appRoot2);
this.appRoot = this.installation.root;
assertLocalTree(dataRoot2, { missing: true });
fs4.mkdirSync(dataRoot2, { recursive: true });
this.dataRoot = fs4.realpathSync.native(dataRoot2);
const bundled = path5.join(this.appRoot, "runtime/node.exe");
const executable = nodePath2 ?? (fs4.existsSync(bundled) ? bundled : !process.versions.electron ? process.execPath : null);
if (!executable) throw hostError("\u684C\u9762\u5B89\u88C5\u7F3A\u5C11\u72EC\u7ACBNode\u5BBF\u4E3B\u3002");
this.node = binaryIdentity(executable);
const version = execFileSync2(this.node.path, ["--version"], { encoding: "utf8", windowsHide: true, timeout: 1e4, env: projectEnvironment() }).trim();
if (!/^v24\./.test(version)) throw hostError("\u684C\u9762\u5BBF\u4E3B\u9700\u8981\u5DF2\u7ECF\u6838\u9A8C\u7684Node24\u8FD0\u884C\u5668\u3002");
this.node.version = version;
this.port = port;
this.url = "http://127.0.0.1:" + port;
this.timeoutMs = Math.min(6e4, Math.max(1e3, timeoutMs));
const allowed = new Set(HOST_ENVIRONMENT);
if (Object.keys(environment).some((key) => !allowed.has(key) || typeof environment[key] !== "string" || !path5.isAbsolute(environment[key]))) throw hostError("\u5BBF\u4E3B\u542F\u52A8\u53EA\u63A5\u53D7\u5DF2\u58F0\u660E\u7684\u672C\u673A\u8FD0\u884C\u5668\u8DEF\u5F84\u3002");
this.environment = environment;
}
async api(route, { method = "GET", input = null, timeoutMs = 15e3 } = {}) {
if (typeof route !== "string" || !route.startsWith("/") || route.startsWith("//")) throw hostError("\u5BBF\u4E3B\u63A5\u53E3\u8DEF\u5F84\u65E0\u6548\u3002");
return jsonResponse(await fetch(this.url + "/api" + route, {
method,
headers: {
Connection: "close",
...this.token ? { "X-Workbench-Token": this.token } : {},
...input ? { "Content-Type": "application/json" } : {}
},
body: input ? JSON.stringify(input) : void 0,
signal: AbortSignal.timeout(timeoutMs)
}));
}
async health() {
try {
return await this.api("/health", { timeoutMs: 1500 });
} catch (cause) {
if (cause.cause?.code === "ECONNREFUSED" || cause.cause?.errors?.every((value) => value.code === "ECONNREFUSED")) return null;
throw hostError("\u7AEF\u53E3\u88AB\u5360\u7528\u6216\u54CD\u5E94\u65E0\u6CD5\u6838\u5BF9\uFF1B\u4E0D\u4F1A\u542F\u52A8\u53E6\u4E00\u5957\u5BBF\u4E3B\u3002", "HOST_PORT_UNVERIFIED");
}
}
async connect() {
const health = await this.health();
if (!health) return null;
if (health.app !== "agent-workbench" || health.ready !== true || !Number.isInteger(health.pid)) throw hostError("\u7AEF\u53E3\u5C5E\u4E8E\u672A\u77E5\u670D\u52A1\u3002");
const bootstrap = await this.api("/bootstrap");
if (bootstrap.version !== this.installation.version || typeof bootstrap.token !== "string") throw hostError("\u8FD0\u884C\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u8BF7\u4F7F\u7528\u660E\u786E\u7684\u5347\u7EA7\u6D41\u7A0B\u3002", "HOST_VERSION_MISMATCH");
this.token = bootstrap.token;
const challenge = randomBytes(32).toString("hex"), reply = await this.api("/host/identity?challenge=" + challenge);
ownedChild(this.dataRoot, ".secrets");
const registration = readState(ownedChild(this.dataRoot, ".secrets/" + HOST_REGISTRATION_FILE), 16384);
if (registration.schema !== 1 || registration.protocol !== HOST_PROTOCOL || !/^[A-Za-z0-9+/]{43}=$/.test(registration.secret ?? "")) throw hostError("\u672C\u673A\u539F\u6CE8\u518C\u683C\u5F0F\u65E0\u6CD5\u6838\u5BF9\u3002");
const identity = verifyHostProof(reply, challenge, Buffer.from(registration.secret, "base64"));
const actual = observeWindowsProcess(identity.pid), caller = observeWindowsProcess(process.pid);
if (!actual || !caller || identity.pid !== health.pid || identity.pid !== registration.pid || identity.createdAt !== actual.createdAt || identity.createdAt !== registration.createdAt || identity.instanceId !== registration.instanceId || identity.ownerId !== registration.ownerId || identity.userSid !== actual.userSid || identity.userSid !== registration.userSid || identity.userSid !== caller.userSid || identity.protocol !== HOST_PROTOCOL || identity.version !== this.installation.version || identity.port !== this.port || !samePath(identity.dataRoot, this.dataRoot) || !samePath(identity.runtimeRoot, this.appRoot) || identity.runtimeIdentity !== this.installation.identitySha256 || !samePath(identity.executable.path, actual.executable) || identity.executable.sha256 !== this.node.sha256 || binaryIdentity(actual.executable).sha256 !== this.node.sha256) throw hostError("\u5B9E\u9645PID\u521B\u5EFA\u3001\u7528\u6237\u3001\u7A0B\u5E8F\u3001\u5B89\u88C5\u6216\u6570\u636E\u76EE\u5F55\u4E0E\u539F\u5BBF\u4E3B\u767B\u8BB0\u4E0D\u4E00\u81F4\u3002");
const info = readState(ownedChild(this.dataRoot, "service-info.json"));
if (info.pid !== identity.pid || info.instanceId !== identity.instanceId || info.createdAt !== identity.createdAt || info.port !== this.port || info.userSid !== identity.userSid || info.ownerId !== identity.ownerId || info.runtimeIdentity !== identity.runtimeIdentity || !samePath(info.appRoot, identity.appRoot) || !samePath(info.dataRoot, this.dataRoot) || !samePath(info.runtimeRoot, this.appRoot)) throw hostError("\u672C\u673A\u5BBF\u4E3B\u7D22\u5F15\u4E0E\u5B9E\u9645\u5B9E\u4F8B\u4E0D\u4E00\u81F4\u3002");
this.identity = identity;
return { url: this.url, identity };
}
async lock(action) {
const lockDirectory = ownedChild(this.dataRoot, ".desktop-launch.lock", { missing: true }), nonce = randomUUID2(), observed = observeWindowsProcess(process.pid);
const deadline = Date.now() + this.timeoutMs;
while (true) {
try {
fs4.mkdirSync(lockDirectory, { mode: 448 });
break;
} catch (cause) {
if (cause.code !== "EEXIST") throw cause;
ownedChild(this.dataRoot, ".desktop-launch.lock");
const ownerFile2 = path5.join(lockDirectory, "owner.json");
if (fs4.existsSync(ownerFile2)) {
ownedChild(this.dataRoot, ".desktop-launch.lock/owner.json");
const owner = readState(ownerFile2, 16384);
if (!Number.isInteger(owner.pid) || typeof owner.createdAt !== "string" || typeof owner.nonce !== "string") throw hostError("\u542F\u52A8\u9501\u7684\u539F\u8EAB\u4EFD\u65E0\u6CD5\u6838\u5BF9\u3002");
const active = observeWindowsProcess(owner.pid);
if (active && active.createdAt === owner.createdAt && (owner.userSid !== active.userSid || owner.userSid !== observed.userSid)) throw hostError("\u542F\u52A8\u9501\u4E0D\u5C5E\u4E8E\u5F53\u524DWindows\u7528\u6237\u3002");
if (!active || active.createdAt !== owner.createdAt) {
if (readState(ownerFile2).nonce !== owner.nonce) continue;
const archive = ownedChild(this.dataRoot, ".desktop-launch-stale-" + randomUUID2(), { missing: true });
try {
fs4.renameSync(lockDirectory, archive);
} catch (error) {
if (!["ENOENT", "EEXIST"].includes(error.code)) throw error;
}
continue;
}
} else if (Date.now() - fs4.statSync(lockDirectory).mtimeMs > 1e4) throw hostError("\u542F\u52A8\u9501\u7F3A\u5C11\u539F\u8BB0\u5F55\uFF0C\u8BF7\u6838\u5BF9\u8BE5\u76EE\u5F55\u3002");
if (Date.now() >= deadline) throw hostError("\u6B63\u5728\u7B49\u5F85\u539F\u542F\u52A8\u64CD\u4F5C\uFF0C\u8BF7\u6838\u5BF9\u5F53\u524D\u5BBF\u4E3B\u3002", "HOST_START_PENDING");
await delay(100);
}
}
const ownerFile = path5.join(lockDirectory, "owner.json");
try {
writeState(ownerFile, { schema: 1, pid: process.pid, createdAt: observed.createdAt, userSid: observed.userSid, nonce });
return await action();
} finally {
if (fs4.existsSync(ownerFile) && readState(ownerFile).nonce === nonce) {
fs4.unlinkSync(ownerFile);
fs4.rmdirSync(lockDirectory);
}
}
}
async start() {
return this.lock(async () => {
const existing = await this.connect();
if (existing) return { ...existing, reused: true };
const intentFile = ownedChild(this.dataRoot, "desktop-launch-state.json", { missing: true });
if (fs4.existsSync(intentFile)) {
const intent = readState(intentFile);
if (intent.pid && !["exited", "failed"].includes(intent.state)) {
const actual = observeWindowsProcess(intent.pid);
if (actual && actual.createdAt === intent.createdAt) throw hostError("\u539F\u542F\u52A8\u8FDB\u7A0B\u4ECD\u6D3B\u52A8\u4F46\u6CA1\u6709\u53EF\u6838\u9A8C\u63A5\u53E3\uFF0C\u8BF7\u6838\u5BF9\u539F\u65E5\u5FD7\uFF1B\u4E0D\u4F1A\u518D\u542F\u52A8\u53E6\u4E00\u8FDB\u7A0B\u3002", "HOST_START_UNVERIFIED");
}
}
const logs = ownedChild(this.dataRoot, "logs", { missing: true });
if (!fs4.existsSync(logs)) fs4.mkdirSync(logs);
const id = randomUUID2(), stdoutPath = path5.join(logs, "desktop-host-" + id + "-stdout.log"), stderrPath = path5.join(logs, "desktop-host-" + id + "-stderr.log");
let output, errors, child;
try {
output = fs4.openSync(stdoutPath, "wx", 384);
errors = fs4.openSync(stderrPath, "wx", 384);
child = spawn(this.node.path, [ownedChild(this.appRoot, "dist-server/server.mjs")], {
cwd: this.appRoot,
windowsHide: true,
detached: true,
env: projectEnvironment({ ...this.environment, AGENT_WORKBENCH_APP_DIR: this.appRoot, AGENT_WORKBENCH_DATA_DIR: this.dataRoot, AGENT_WORKBENCH_PORT: String(this.port) }),
stdio: ["ignore", output, errors]
});
} finally {
if (output !== void 0) fs4.closeSync(output);
if (errors !== void 0) fs4.closeSync(errors);
}
let failure = null;
child.on("error", (cause) => {
failure = cause;
});
child.unref();
const observedChild = child.pid ? observeWindowsProcess(child.pid) : null;
writeState(intentFile, {
schema: 1,
state: observedChild ? "starting" : "failed",
id,
pid: child.pid ?? null,
createdAt: observedChild?.createdAt ?? null,
appRoot: this.appRoot,
dataRoot: this.dataRoot,
port: this.port,
stdoutPath,
stderrPath
});
const deadline = Date.now() + this.timeoutMs;
while (Date.now() < deadline) {
if (failure || child.exitCode !== null) throw hostError("\u6240\u5C5E\u5BBF\u4E3B\u542F\u52A8\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B\u672C\u673A\u542F\u52A8\u8BB0\u5F55\u3002", "HOST_START_FAILED");
await delay(100);
let health;
try {
health = await this.health();
} catch (cause) {
if (cause.code !== "HOST_PORT_UNVERIFIED") throw cause;
const waiting = observeWindowsProcess(child.pid);
if (!waiting || !observedChild || waiting.createdAt !== observedChild.createdAt || waiting.userSid !== observedChild.userSid || !samePath(waiting.executable, this.node.path)) throw hostError("\u6240\u5C5E\u5BBF\u4E3B\u542F\u52A8\u8FDB\u7A0B\u5DF2\u7ED3\u675F\u6216\u8EAB\u4EFD\u53D8\u5316\uFF0C\u8BF7\u6838\u5BF9\u539F\u65E5\u5FD7\u3002", "HOST_START_FAILED");
continue;
}
if (!health) continue;
if (health.pid !== child.pid) throw hostError("\u542F\u52A8\u671F\u95F4\u7AEF\u53E3\u88AB\u5176\u4ED6\u8FDB\u7A0B\u5360\u7528\u3002");
const connected = await this.connect();
if (connected) {
writeState(intentFile, { ...readState(intentFile), state: "ready", instanceId: connected.identity.instanceId });
return { ...connected, reused: false, logs: { stdoutPath, stderrPath } };
}
}
throw hostError("\u6240\u5C5E\u5BBF\u4E3B\u5C1A\u672A\u5B8C\u6210\u6CE8\u518C\uFF1B\u4E0D\u4F1A\u91CD\u65B0\u542F\u52A8\u6216\u7ED3\u675F\u672A\u77E5\u8FDB\u7A0B\u3002", "HOST_START_UNVERIFIED");
});
}
async status() {
if (!await this.connect()) return { state: "not-running", url: this.url };
return this.api("/host/status");
}
async stop() {
return this.lock(async () => {
const connection = await this.connect();
if (!connection) return { state: "not-running", url: this.url };
const original = connection.identity;
await this.api("/host/stop", { method: "POST", input: {
instanceId: original.instanceId,
createdAt: original.createdAt,
runtimeIdentity: original.runtimeIdentity,
confirmation: "stop-owned-host"
}, timeoutMs: this.timeoutMs });
const deadline = Date.now() + this.timeoutMs;
while (Date.now() < deadline) {
await delay(200);
const observed = observeWindowsProcess(original.pid);
if (!observed) {
if (await this.health()) throw hostError("\u539F\u5BBF\u4E3B\u5DF2\u7ED3\u675F\uFF0C\u4F46\u7AEF\u53E3\u5B58\u5728\u5176\u4ED6\u670D\u52A1\u3002");
return { state: "stopped", identity: original, processExited: true };
}
if (observed.createdAt !== original.createdAt) throw hostError("\u539FPID\u5DF2\u88AB\u590D\u7528\uFF0C\u4E0D\u4F1A\u7ED3\u675F\u65B0\u7684\u8FDB\u7A0B\u3002");
}
throw hostError("\u6240\u5C5E\u5BBF\u4E3B\u9000\u51FA\u4ECD\u5F85\u6838\u5BF9\uFF0C\u8BF7\u4FDD\u7559\u539F\u5B9E\u4F8B\u8BB0\u5F55\u3002", "HOST_STOP_UNVERIFIED");
});
}
};
// src/desktop/host-cli.mjs
var args = process.argv.slice(2);
if (args.includes("--help")) {
console.log("node host-launcher.mjs <start|status|stop> [--app-root <absolute>] [--data-root <absolute>] [--node <absolute>] [--port <1..65535>]");
process.exit(0);
}
var command = args.shift();
if (!["start", "status", "stop"].includes(command)) throw new Error("Use --help for a supported desktop host operation.");
var options = {};
while (args.length) {
const flag = args.shift(), value = args.shift();
if (!["--app-root", "--data-root", "--node", "--port"].includes(flag) || !value || options[flag] !== void 0) throw new Error("Invalid or repeated host option.");
options[flag] = value;
}
var defaultRoot = path6.resolve(path6.dirname(fileURLToPath(import.meta.url)), "..");
var appRoot = options["--app-root"] || process.env.AGENT_WORKBENCH_APP_DIR || defaultRoot;
var dataRoot = options["--data-root"] || process.env.AGENT_WORKBENCH_DATA_DIR || path6.join(process.env.LOCALAPPDATA || path6.join(os.homedir(), ".local/share"), "AgentWorkbench");
var nodePath = options["--node"] || (fs5.existsSync(path6.join(appRoot, "runtime/node.exe")) ? path6.join(appRoot, "runtime/node.exe") : process.execPath);
try {
const controller = new HostController({
appRoot,
dataRoot,
nodePath,
port: Number(options["--port"] || process.env.AGENT_WORKBENCH_PORT || 4318),
environment: Object.fromEntries(HOST_ENVIRONMENT.filter((key) => process.env[key]).map((key) => [key, process.env[key]]))
});
console.log(JSON.stringify(await controller[command]()));
} catch (cause) {
console.error(JSON.stringify({ success: false, code: cause.code || "HOST_FAILED", message: cause.message }));
process.exitCode = 1;
}
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,62 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { createHash } from 'node:crypto';
import { DatabaseSync } from 'node:sqlite';
import { snapshotPersistentData } from '../src/core/desktop/install-manager.mjs';
export const hash = bytes => createHash('sha256').update(bytes).digest('hex');
export const canonical = value => Array.isArray(value) ? value.map(canonical) : value && typeof value === 'object' ? Object.fromEntries(Object.keys(value).sort().map(key => [key, canonical(value[key])])) : value;
export const digest = value => hash(JSON.stringify(canonical(value)));
export function databaseSnapshot(dataRoot) {
const database = new DatabaseSync(path.join(dataRoot, 'workbench.sqlite'), { readOnly: true }); database.exec('BEGIN');
try {
assert.equal(database.prepare('PRAGMA quick_check').get().quick_check, 'ok');
const tables = {};
for (const { name, sql } of database.prepare("SELECT name,sql FROM sqlite_schema WHERE type='table' ORDER BY name").all()) {
assert.match(name, /^[a-z_]+$/);
const rows = database.prepare('SELECT * FROM "' + name + '" ORDER BY rowid').all().filter(row => !(name === 'metadata' && row.key === 'runtimeOwner'));
tables[name] = { count: rows.length, schemaSha256: hash(sql), sha256: digest(rows), rows: rows.map((row, index) => ({ id: row.id ?? row.key ?? row.seq ?? index, ...(row.kind ? { kind: row.kind } : {}), sha256: digest(row) })) };
}
const sessionIds = database.prepare('SELECT id FROM sessions ORDER BY id').all().map(row => row.id);
const owner = database.prepare("SELECT value FROM metadata WHERE key='runtimeOwner'").get();
return { tables, sessionIds, ownerSha256: owner ? digest(owner) : null, scope: 'Every original table schema and row field hashed, excluding only runtimeOwner lifecycle metadata. No row payload or credential is returned.' };
} finally { database.exec('ROLLBACK'); database.close(); }
}
export async function publicSnapshot(url, dataRoot) {
const healthResponse = await fetch(url + '/api/health', { headers: { Connection: 'close' }, signal: AbortSignal.timeout(20000) }); assert.equal(healthResponse.status, 200);
const health = await healthResponse.json(), bootResponse = await fetch(url + '/api/bootstrap', { headers: { Connection: 'close' }, signal: AbortSignal.timeout(20000) }); assert.equal(bootResponse.status, 200);
const bootstrap = await bootResponse.json(); const token = bootstrap.token;
const api = async route => { const response = await fetch(url + '/api' + route, { headers: { 'X-Workbench-Token': token, Connection: 'close' }, signal: AbortSignal.timeout(20000) }); assert.ok(response.ok, route + ': HTTP ' + response.status); return response.json(); };
const database = databaseSnapshot(dataRoot), exports = [];
for (const id of database.sessionIds) {
const report = await api('/sessions/' + id + '/export');
exports.push({ id, project: digest(report.project), session: digest(report.session), execution: digest(report.execution) });
}
const center = await api('/model-center');
// This is the documented public model-center view; Provider's private map and
// API key are never accessed. Only this public object is retained for schema-aware comparison.
const modelCenter = structuredClone(center);
return { observedAt: new Date().toISOString(), version: health.version, pid: health.pid, runtimeRoot: bootstrap.runtimeRoot,
configSha256: digest(bootstrap.config), projectsSha256: digest(bootstrap.projects), sessionsSha256: digest(bootstrap.sessions), modelCenterSha256: digest(modelCenter), modelCenter,
projects: bootstrap.projects.length, visibleSessions: bootstrap.sessions.length, hasKey: !!bootstrap.config.hasKey,
active: bootstrap.sessions.filter(value => ['running', 'awaiting_approval', 'stopping'].includes(value.status)).map(value => ({ id: value.id, status: value.status })),
storage: bootstrap.storage, eventCursor: bootstrap.eventCursor, database, exports, persistent: snapshotPersistentData(dataRoot),
scope: 'Read-only public state, every original session export digest, original table/row/schema hashes and every original artifact byte hash. No credential extraction, model probe, execution or mutation.' };
}
export function compareOriginalState(before, after, { modelCenterSchemaChange = false } = {}) {
for (const field of ['pid', 'hasKey', 'configSha256', 'projectsSha256', 'sessionsSha256', 'eventCursor']) assert.deepEqual(after[field], before[field], field);
assert.deepEqual(canonical(after.database.tables), canonical(before.database.tables), 'All original table schemas and every persistent row');
assert.deepEqual(after.database.sessionIds, before.database.sessionIds); assert.deepEqual(after.exports, before.exports);
assert.deepEqual(after.persistent, before.persistent, 'Every original artifact byte, persistent row and public disk config');
if (modelCenterSchemaChange) {
const original = structuredClone(before.modelCenter), next = structuredClone(after.modelCenter);
// 1.15 changes only the public explanatory text about optional DPAPI storage.
// Existing IDs, routes, revisions, credentials-present bits and all original attempts remain exact.
assert.match(next.storage.restart, /临时凭据.*已明确本机加密保存/);
next.storage.restart = original.storage.restart;
assert.deepEqual(next, original, 'Original public model center, except versioned storage explanation');
return { modelCenterChange: { path: '/storage/restart', original: before.modelCenter.storage.restart, actual: after.modelCenter.storage.restart }, originalRows: 'exact', originalExports: 'exact', originalArtifactBytes: 'exact' };
}
assert.equal(after.modelCenterSha256, before.modelCenterSha256);
return { originalRows: 'exact', originalExports: 'exact', originalArtifactBytes: 'exact', originalModelCenter: 'exact' };
}
@@ -0,0 +1,64 @@
// A local HTTP fixture exercises the shipped host. No production config or
// credentials, no implementation supplied, no real-model delivery claim.
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import {randomUUID,createHash} from 'node:crypto';
import {execFileSync} from 'node:child_process';
import {Store} from '../src/server/store.mjs';
import {verifyPlanEvidence} from '../src/core/context/request-plan.mjs';
import {compatibleFixture,completion,call,until,assertToolPairs,launchWorkbench} from '../tests/helpers.mjs';
const root=path.resolve('.qa','working-memory-host-'+randomUUID()),data=path.join(root,'data'),projectRoot=path.join(root,'project');
const appRoot=path.resolve(process.env.AGENT_WORKBENCH_QA_APP_ROOT??'.');
const input=JSON.parse(fs.readFileSync(new URL('../tests/fixtures/working-memory-t.json',import.meta.url)));
const sha=value=>createHash('sha256').update(value).digest('hex'),disposers=[],t={after:fn=>disposers.push(fn)};
fs.mkdirSync(projectRoot,{recursive:true});
for(const file of input.files){assert.equal(sha(file.content),file.sha256);const target=path.resolve(projectRoot,file.path);assert.ok(target.startsWith(projectRoot+path.sep));fs.mkdirSync(path.dirname(target),{recursive:true});fs.writeFileSync(target,file.content);}
const git=args=>execFileSync('git',['-C',projectRoot,...args],{encoding:'utf8',windowsHide:true});
git(['init','--initial-branch=main']);git(['config','core.autocrlf','false']);git(['add','.']);git(['-c','user.name=QA','-c','user.email=qa@workbench.invalid','commit','--no-gpg-sign','-m','Original read-only T fixture']);
const requests=[],facts=[],checks=[],files=input.files.filter(f=>['test/expense.test.mjs','src/amount.mjs','src/summary.mjs','src/report.mjs'].includes(f.path));
let host,sessionId,report,version,extraInspection=false;
try{
const model=await compatibleFixture(t,async(_route,body)=>{
assertToolPairs(body.messages);requests.push(body);const number=requests.length;assert.ok(number<=8);assert.ok(body.messages[0].content.includes(JSON.stringify(input.goal)));
if(number<=3){const message=structuredClone(input.replies[number-1]);for(const tool of message.tool_calls??[])if(tool.function.name==='run_checks'){
const current=await host.api('/sessions/'+sessionId);tool.function.arguments=JSON.stringify({plan_id:current.execution.plans.at(-1).id});}
return{body:{...completion(),choices:[{message,finish_reason:'tool_calls'}]}};}
const marker='当前工程执行依据(每次请求重新核对,非操作授权):\n';
const fact=JSON.parse(body.messages[0].content.split(marker)[1].split('\n')[0]);facts.push(fact);
assert.equal(fact.has_applied_changes,false);assert.equal(fact.stage,'checks_need_repair');assert.equal(fact.latest_check.current_source,true);
assert.equal(fact.latest_check.results[0].tests.failed,9);assert.equal(fact.latest_check.results[1].status,'passed');
const original=await host.api('/sessions/'+sessionId+'/export'),pages=original.session.providerMessages.filter(m=>m.role==='tool').map(m=>JSON.parse(m.content)).filter(v=>v.path==='test/expense.test.mjs'&&typeof v.content==='string');
const text=files.find(f=>f.path==='test/expense.test.mjs').content,covered=new Set();
for(const p of pages){assert.equal(p.content,text.slice(p.offset,p.next_offset));for(let n=p.offset;n<p.next_offset;n++)covered.add(n);}
let next=0;while(covered.has(next))next++;
if(next<text.length){const latest=pages.at(-1);return{body:completion([call('u-continue-'+number,'read_file',{path:latest.path,start_line:latest.range_start_line,end_line:latest.range_end_line,offset:next,expected_sha256:latest.sha256,limit:16000})])};}
for(const file of files){const positions=new Set();for(const m of body.messages){let view;
if(m.role==='tool'){const v=JSON.parse(m.content);if(v.path===file.path&&typeof v.content==='string')view={offset:v.offset??0,content:v.content};}
if(view){assert.equal(view.content,file.content.slice(view.offset,view.offset+view.content.length));for(let n=view.offset;n<view.offset+view.content.length;n++)positions.add(n);}
if(m.role==='system'){let v;try{v=JSON.parse(m.content.split('\n').at(-1));}catch{}for(const e of v?.data?.entries??[])if(e.observation?.path===file.path){const start=e.observation.offset??0;assert.equal(e.content,file.content.slice(start,start+e.content.length));for(let n=start;n<start+e.content.length;n++)positions.add(n);}}}
assert.equal(positions.size,file.content.length,'Actual request lost previously returned file bytes: '+file.path);}
checks.push('request '+number+': all four original files and current nine failures/build pass actually present');
if(!extraInspection){extraInspection=true;return{body:completion([call('u-inspect-original-state','inspect_session',{})])};}
return{body:completion([],'Offline read-only coverage verified; no engineering delivery claimed.')};
});
const store=new Store(data),project=store.addProject(projectRoot),session=store.createSession(project.id);sessionId=session.id;
store.saveConfig({mode:'compatible',baseUrl:model.baseUrl,model:'working-memory-fixture',contextLimit:16000,maxOutputTokens:2048,maxSteps:8,maxRunTokens:90000,maxTaskTokens:90000,maxRunDurationMs:600000});store.close();
host=await launchWorkbench(t,data,{}, {appRoot});assert.notEqual(new URL(host.url).port,'4318');version=(await host.api('/health')).version;
await host.api('/sessions/'+sessionId+'/messages',{content:input.goal});
let current;
await until(async()=>{current=await host.api('/sessions/'+sessionId);for(const approval of current.approvals.filter(a=>a.status==='pending')){
assert.ok(approval.checkPlanId);assert.deepEqual(approval.checkScripts.map(value=>value.name),['test','build']);
assert.equal(approval.command,'npm run test\nnpm run build');await host.api('/sessions/'+sessionId+'/approvals/'+approval.id,{allow:true});}
return !['running','awaiting_approval','stopping'].includes(current.status);},60000);
assert.equal(current.execution.run.stopReason,'verification_incomplete',JSON.stringify(current.lastFailure));assert.ok(extraInspection);assert.ok(checks.length>=2);assert.equal(current.changes.length,0);
const exported=await host.api('/sessions/'+sessionId+'/export');fs.writeFileSync(path.join(root,'export.json'),JSON.stringify(exported,null,2));
await host.close();host=null;
const reopened=new Store(data);try{const saved=reopened.session(sessionId);for(const plan of reopened.core.context_plan.values()){
verifyPlanEvidence(reopened,saved,plan);assert.equal(plan.budget.contextLimit,16000);assert.equal(plan.budget.outputReservation,2048);assert.equal(plan.budget.safetyTokens,1600);assert.ok(plan.estimatedInputTokens<=12352);}
checks.push('all actual request artifacts independently verified after reopening');}finally{reopened.close();}
for(const file of input.files)assert.equal(sha(fs.readFileSync(path.join(projectRoot,file.path))),file.sha256);assert.equal(git(['status','--porcelain']),'');
report={success:true,version,appRoot,checks,errors:[],requests:requests.length,facts,originalSourceUnchanged:true,originalNineTestsFailed:true,realModelDeliveryPassed:false,purgeBenefitMeasured:false,realModelRequests:0};
}catch(error){report={success:false,appRoot,checks,error:error.stack,requests:requests.length,realModelRequests:0};process.exitCode=1;}
finally{await host?.close();for(const dispose of disposers.reverse())await dispose();fs.writeFileSync(path.join(root,'requests.json'),JSON.stringify(requests,null,2));fs.writeFileSync(path.join(root,'result.json'),JSON.stringify(report,null,2));console.log(JSON.stringify({success:report.success,appRoot,root,checks:checks.length,requests:requests.length,realModelRequests:0,error:report.error}));}
@@ -0,0 +1,10 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { publicSnapshot } from './desktop-f-state.mjs';
const root=path.resolve('.qa/working-memory-u');fs.mkdirSync(root,{recursive:true});
const dest=path.join(root,'production-before.json');assert.ok(!fs.existsSync(dest),'immutable U baseline');
const state=await publicSnapshot('http://127.0.0.1:4318','C:/Users/wangy/AppData/Local/Packages/OpenAI.Codex_2p2nqsd0c76g0/LocalCache/Local/AgentWorkbench');
assert.equal(state.pid,36552);assert.equal(state.version,'1.24.7');assert.deepEqual(state.active,[]);
fs.writeFileSync(dest,JSON.stringify(state,null,2)+'\n');
console.log(JSON.stringify({version:state.version,pid:state.pid,hasKey:state.hasKey,projects:state.projects,sessions:state.database.sessionIds.length,rows:Object.fromEntries(Object.entries(state.database.tables).map(([k,v])=>[k,v.count])),artifactFiles:state.persistent.artifacts?.length,active:state.active}));
@@ -0,0 +1,51 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { chromium } from 'playwright';
const root = path.resolve('.qa/working-memory-u/release/browser-review');
assert.equal(fs.existsSync(root), false); fs.mkdirSync(root);
const origin = 'http://127.0.0.1:4318', errors = [], rejectedWrites = [], views = [];
const health = await (await fetch(origin + '/api/health')).json();
assert.equal(health.version, '1.24.8'); assert.equal(health.pid, 36552);
const browser = await chromium.launch({ channel: 'msedge', headless: true }); let result;
try {
for (const [name, viewport] of [['desktop', { width:1440, height:1000 }], ['narrow', { width:390, height:844 }]]) {
const context=await browser.newContext({viewport}), page=await context.newPage();
page.on('pageerror', error=>errors.push({name,message:error.message}));
await page.route('**/api/**',async route=>{
if (['GET','HEAD'].includes(route.request().method())) await route.continue();
else {rejectedWrites.push({name,method:route.request().method(),url:route.request().url()}); await route.abort();}
});
await page.goto(origin+'/?release=1.24.8',{waitUntil:'domcontentloaded'});
await page.locator('.connection.connected').waitFor({state:'attached',timeout:20000});
assert.match(await page.locator('.version-entry').textContent(),/1\.24\.8/);
const project=page.getByLabel('当前项目',{exact:true});
if(!await project.isVisible()) await page.getByRole('button',{name:'展开项目栏',exact:true}).click();
await project.selectOption('45aa4368-bd4f-4a43-8785-3853fe0c9eb1');
const panel=page.getByLabel('任务预算诊断',{exact:true});
await panel.getByRole('heading',{name:'下一次请求超出运行余额',exact:true}).waitFor({timeout:20000});
const diagnosis=await panel.innerText();
for(const pattern of [/输入可容纳/,/29,623/,/17,429/,/12,352/]) assert.match(diagnosis,pattern);
assert.equal(await page.getByRole('textbox',{name:'任务内容',exact:true}).inputValue(),'');
await panel.scrollIntoViewIfNeeded();
const screenshot=path.join(root,name+'.png'); await page.screenshot({path:screenshot,fullPage:true});
fs.writeFileSync(path.join(root,name+'-diagnosis.txt'),diagnosis,{flag:'wx'});
fs.writeFileSync(path.join(root,name+'-body.txt'),await page.locator('body').innerText(),{flag:'wx'});
const overflow=await page.evaluate(()=>({viewport:innerWidth,document:document.documentElement.scrollWidth}));
assert.ok(overflow.document<=viewport.width+1);
await page.getByRole('button',{name:'打开模型中心',exact:true}).click();
const dialog=page.getByRole('dialog',{name:'模型中心',exact:true}); await dialog.waitFor();
await dialog.getByText('高性能',{exact:true}).first().waitFor({state:'visible',timeout:15000});
assert.match(await dialog.innerText(),/高性能/);
const selectionScreenshot=path.join(root,name+'-model-center.png'); await page.screenshot({path:selectionScreenshot,fullPage:true});
views.push({name,viewport,screenshot,selectionScreenshot,overflow,connected:true,
originalSession:'966d83cb-d1d7-44b7-be53-9d850270e34e',originalTask:'e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4',
originalRun:'cf10d58a-d3af-4b03-9bef-77fb54837878',reservation:29623,remaining:17429,input:12352});
await context.close();
}
assert.deepEqual(errors,[]); assert.deepEqual(rejectedWrites,[]);
result={success:true,version:health.version,pid:health.pid,views,errors,rejectedWrites,realModelRequests:0,
scope:'Read-only actual production Edge render at 1440 and 390. Original R pause is displayed accurately without resuming or mutating original history. Every API write blocked; none attempted.'};
}catch(error){result={success:false,error:error.stack,views,errors,rejectedWrites,realModelRequests:0};process.exitCode=1;}
finally{await browser.close();fs.writeFileSync(path.join(root,'result.json'),JSON.stringify(result,null,2)+'\n',{flag:'wx'});}
console.log(JSON.stringify(result));
@@ -0,0 +1,8 @@
import fs from 'node:fs';import {workingDocument,workingEntry,workingMessage} from '../src/core/context/working-set.mjs';import {requestMetrics} from '../src/shared/contracts/model-request.mjs';
const read=p=>JSON.parse(fs.readFileSync(p,'utf8')),body=read('.qa/working-memory-u/wire-7-third/request.json'),candidates=read('.qa/working-memory-u/replay-after.json').candidates;
const original=read('.qa/live-delivery-t/node/export.json'),run=original.execution.run;
const entries=candidates.filter(c=>c.observation.kind==='file').map(c=>workingEntry(c,c.observation.content.length));
const current=body.messages.find(m=>m.content?.includes('{"working_set"'));
const all=workingMessage({id:'00000000-0000-0000-0000-000000000000',sha256:'0'.repeat(64)},workingDocument(original.session,run,entries,3),4);
const last=body.messages.filter(m=>['system','user'].includes(m.role)&&!m.content.includes('{"working_set"'));
console.log(JSON.stringify({original:requestMetrics(body),fullFiles:requestMetrics({...body,messages:body.messages.map(m=>m===current?all:m)}),noRawFullFiles:requestMetrics({...body,messages:[...last,all]}),allSourceBytes:Buffer.byteLength(all.content),fixedAndTools:requestMetrics({...body,messages:[body.messages[0]]}),files:entries.map(e=>[e.observation.path,e.content.length])}));
@@ -0,0 +1,199 @@
import fs from 'node:fs';
import path from 'node:path';
import os from 'node:os';
import http from 'node:http';
import assert from 'node:assert/strict';
import { spawn, execFileSync } from 'node:child_process';
import { createHash, randomUUID } from 'node:crypto';
import { fileURLToPath } from 'node:url';
import { gitEnvironment } from '../src/core/git-process.mjs';
import { assertToolPairs, call } from '../tests/helpers.mjs';
const sha = bytes => createHash('sha256').update(bytes).digest('hex');
const wait = milliseconds => new Promise(resolve => setTimeout(resolve, milliseconds));
async function until(predicate, timeout = 45000) {
const deadline = Date.now() + timeout;
while (!await predicate()) { if (Date.now() > deadline) throw new Error('Owned compiled-engine acceptance timed out.'); await wait(50); }
}
// This verifier supplies a declared local response algorithm. The executing
// Runtime/Store/permissions/native bridge all belong to the compiled host.
export async function verifyControlledApi({ api, url, token, directory, appRoot, contained = false }) {
const origin = new URL(url);
assert.equal(origin.hostname, '127.0.0.1'); assert.notEqual(origin.port, '4318');
const expectedVersion = JSON.parse(fs.readFileSync(path.join(appRoot, fs.existsSync(path.join(appRoot, 'MANIFEST.json')) ? 'MANIFEST.json' : 'package.json'), 'utf8')).version;
assert.ok(['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1', '1.20.2', '1.20.3', '1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(expectedVersion));
const bootstrap = await api('/bootstrap'); assert.equal(bootstrap.version, expectedVersion);
assert.equal(bootstrap.config.mode, 'demo'); assert.equal(bootstrap.config.hasKey, false);
const root = path.join(directory, 'compiled-controlled-node'), hooks = path.join(directory, 'disabled-hooks');
fs.mkdirSync(root); fs.mkdirSync(hooks);
fs.cpSync(path.join(appRoot, 'benchmarks/workers-delivery-v1/node'), root, { recursive: true });
fs.writeFileSync(path.join(root, '.gitignore'), 'dist/\nnode_modules/\n.awb-*\n');
for (const name of ['owner-staged.txt', 'owner-unstaged.txt']) fs.writeFileSync(path.join(root, name), 'Owner baseline\n');
const git = args => execFileSync('git', ['-c', 'core.hooksPath=' + hooks, ...args], { cwd: root, env: gitEnvironment(), encoding: 'utf8', windowsHide: true, timeout: 15000 });
git(['init', '--initial-branch=main']); git(['config', 'core.autocrlf', 'false']); git(['config', 'user.name', 'Workbench QA']); git(['config', 'user.email', 'qa@workbench.invalid']);
git(['add', '--', '.']); git(['commit', '--no-gpg-sign', '-m', 'Seal compiled controlled-engine acceptance']);
const initialHead = git(['rev-parse', 'HEAD']).trim(), writable = ['src/add.mjs', 'src/range.mjs'];
const protectedFiles = Object.fromEntries(git(['ls-files', '-z']).split('\0').filter(name => name && !writable.includes(name) && !name.startsWith('owner-'))
.map(name => [name, fs.readFileSync(path.join(root, name))]));
fs.writeFileSync(path.join(root, 'owner-staged.txt'), 'Owner staged change\n'); git(['add', '--', 'owner-staged.txt']);
fs.writeFileSync(path.join(root, 'owner-staged.txt'), 'Owner working copy after staging\n'); fs.writeFileSync(path.join(root, 'owner-unstaged.txt'), 'Owner unstaged change\n');
fs.writeFileSync(path.join(root, 'owner-untracked.txt'), 'Owner untracked file\n');
const owner = () => ({ staged: git(['show', ':owner-staged.txt']), stagedDiff: git(['diff', '--cached', '--binary', '--', 'owner-staged.txt']),
files: Object.fromEntries(['owner-staged.txt', 'owner-unstaged.txt', 'owner-untracked.txt'].map(name => [name, fs.readFileSync(path.join(root, name)).toString('base64')])) });
const originalOwner = owner(), verifyProtected = target => { for (const [name, bytes] of Object.entries(protectedFiles)) assert.deepEqual(fs.readFileSync(path.join(target, name)), bytes, name); };
const requests = [], reviews = [], cases = [], originalRuns = [], exports = [];
const mark = text => { cases.push(text); console.log('PASS ' + text); };
let phase = 'new', childRoute, parentRoute, group;
const modelServer = http.createServer(async (request, response) => {
try {
assert.equal(request.url, '/v1/chat/completions'); assert.equal(request.headers.authorization, 'Bearer owned-compiled-engine-fixture');
const chunks = []; for await (const chunk of request) chunks.push(chunk);
const input = JSON.parse(Buffer.concat(chunks)); assert.equal(input.model, 'owned-compiled-engineering'); assertToolPairs(input.messages);
const session = await api(childRoute), job = session.execution.checks.at(-1), plan = session.execution.plans.at(-1);
let calls = [];
if (session.changes.some(value => value.status === 'pending')) { /* Host review follows native completion. */ }
else if (phase !== 'fixed' && job) {
assert.equal(job.status, 'failed'); assert.ok(job.results.some(value => value.tests?.failed > 0)); phase = 'fixed';
const fixes = { 'src/add.mjs': 'export function add(left, right) {\n if (!Number.isFinite(left) || !Number.isFinite(right)) throw new TypeError("finite numeric inputs required");\n return left + right;\n}\n',
'src/range.mjs': 'export function inclusiveRange(start, end) {\n if (!Number.isSafeInteger(start) || !Number.isSafeInteger(end) || end < start || end - start >= 10000) throw new RangeError("bounded ascending integer range required");\n return Array.from({ length: end - start + 1 }, (_, index) => start + index);\n}\n' };
calls = Object.entries(fixes).map(([name, content]) => call(randomUUID(), 'propose_file', { path: name, content, reason: 'Declared local acceptance repair; retain protected tests and configuration.' }));
} else if (phase === 'fixed' && job?.status === 'passed') assert.equal(job.results[0].tests.passed, 8);
else if (!plan || job?.planId === plan.id) calls = [call(randomUUID(), 'plan_checks', { names: ['test', 'build'] })];
else calls = [call(randomUUID(), 'run_checks', { plan_id: plan.id })];
requests.push({ input, phase, calls });
response.writeHead(200, { 'Content-Type': 'application/json' }); response.end(JSON.stringify({ choices: [{ message: { role: 'assistant', content: calls.length ? '' : 'Owned compiled native run complete; host proof remains required.',
...(calls.length ? { tool_calls: calls } : {}) }, finish_reason: calls.length ? 'tool_calls' : 'stop' }], usage: { prompt_tokens: 123, completion_tokens: 45, total_tokens: 168 } }));
} catch (error) { response.writeHead(500, { 'Content-Type': 'application/json' }); response.end(JSON.stringify({ error: { message: error.message } })); }
});
await new Promise(resolve => modelServer.listen(0, '127.0.0.1', resolve));
try {
await api('/config', { mode: 'compatible', model: 'owned-compiled-engineering', baseUrl: 'http://127.0.0.1:' + modelServer.address().port + '/v1', apiKey: 'owned-compiled-engine-fixture', contextLimit: 64000 });
const project = await api('/projects', { root }), parent = await api('/sessions', { projectId: project.id }); parentRoute = '/sessions/' + parent.id;
const installation = await api('/engines/deepseek/controlled-availability'); assert.equal(installation.controlledStatus, 'available', installation.message);
assert.equal(installation.version, '0.2.1-rc.2');
if (contained) assert.equal(fs.realpathSync.native(installation.node.path), fs.realpathSync.native(path.join(appRoot, 'runtime/node.exe')));
const source = await api('/engines/purge/source'); assert.equal(source.status, 'available', source.message); assert.equal(source.defaultEnabled, false);
const planned = await api(parentRoute + '/collaborations', { goal: 'Deliver compiled controlled-engine Node library with retained failures, review, checks and Git.',
engine: { id: 'deepseek-harness', root: installation.root, controlledSha256: installation.controlledSha256,
strategy: { kind: 'purge-prompt-experiment', root: source.root, sourceSha256: source.sourceSha256, prompt: '保留原测试与 {{compiled_literal}},按实际失败修复已允许源码,等待宿主审批。' } },
budget: { maxTokens: 200000, maxSteps: 64, maxToolCalls: 128, maxDurationMs: 600000 },
children: [{ label: 'engine-compiled-node', goal: 'Repair two source modules and pass the original 8 tests and build.', paths: writable }] });
group = planned.group;
const groupState = async () => (await api(parentRoute + '/collaborations')).groups.find(value => value.id === group.id);
const operation = name => api(parentRoute + '/collaborations/' + group.id + '/' + name, { fingerprint: group.fingerprint });
await operation('prepare'); await until(async () => { group = await groupState(); return !['preparing', 'planned'].includes(group.status); });
assert.equal(group.status, 'ready', group.summary); const child = group.children[0]; childRoute = '/sessions/' + child.sessionId;
const childProject = (await api('/bootstrap')).projects.find(value => value.id === child.projectId);
assert.notEqual(childProject.root, root); verifyProtected(childProject.root); assert.deepEqual(owner(), originalOwner); assert.equal(requests.length, 0);
mark('compiled host seals actual Harness/source identities and prepares one owned worktree while retaining parent bytes and staging');
const apply = async (route, set) => { reviews.push({ action: 'apply reviewed change set', id: set.id, fingerprint: set.fingerprint, paths: set.files.map(value => value.path) });
await api(route + '/change-sets/' + set.id + '/apply', { fingerprint: set.fingerprint });
let state; await until(async () => { state = await api(route + '/change-sets/' + set.id); return !['prepared', 'applying'].includes(state.status); }); assert.equal(state.status, 'completed', state.summary); };
for (let turn = 0; turn < 4 && group.status !== 'ready_to_collect'; turn++) {
let current = await api(childRoute); const pending = current.changes.filter(value => value.status === 'pending');
if (pending.length) { assert.equal(group.status, 'awaiting_review'); const next = await api(childRoute + '/change-sets', { changeIds: pending.map(value => value.id) }); await apply(childRoute, next.execution.changeSets.at(-1)); }
await operation('start');
await until(async () => {
current = await api(childRoute);
for (const approval of current.approvals.filter(value => value.status === 'pending')) {
const event = current.events.find(value => value.id === approval.eventId); assert.equal(event.tool, 'run_checks');
const plan = current.execution.plans.at(-1); assert.deepEqual(plan.checks.map(value => value.name), ['test', 'build']);
reviews.push({ action: 'approve original check', id: approval.id, taskId: approval.taskId, invocationId: approval.invocationId, planId: plan.id, contractSha256: plan.contractSha256 });
await api(childRoute + '/approvals/' + approval.id, { allow: true });
}
group = await groupState(); return ['ready_to_collect', 'awaiting_review', 'paused', 'unknown', 'failed', 'stale'].includes(group.status);
}, 120000);
const run = (await api(childRoute + '/engine-runs')).at(-1); assert.equal(run.status, 'completed', run.error); assert.equal(run.nativeSummary.treeConfirmed, true);
const response = await fetch(url + '/api' + childRoute + '/engine-runs/' + run.id + '/download', { headers: { 'X-Workbench-Token': token, Connection: 'close' } });
assert.equal(response.status, 200); const bytes = Buffer.from(await response.arrayBuffer()); assert.equal(sha(bytes), run.reportSha256);
const original = JSON.parse(bytes); assert.equal(original.native.stderr, ''); assert.equal(original.native.cleanup.treeConfirmed, true);
assert.equal(original.native.activity.endEvents[0].data.reason.kind, 'completed');
assert.equal(original.native.readiness.promptExperimentSha256, run.installation.strategy.sha256);
const saved = path.join(directory, 'compiled-engine-original-' + run.id + '.json'); fs.writeFileSync(saved, bytes); originalRuns.push({ run, original, reportPath: saved, sha256: sha(bytes) });
}
assert.equal(group.status, 'ready_to_collect', group.summary); const current = await api(childRoute);
assert.ok(current.execution.checks.some(value => value.status === 'failed' && value.results.some(result => result.tests?.failed > 0)));
assert.equal(current.execution.checks.at(-1).status, 'passed'); assert.equal(current.execution.checks.at(-1).results[0].tests.passed, 8);
assert.equal(current.execution.task.usage.requests, requests.length); assert.equal(current.execution.task.usage.totalTokens, requests.length * 168);
for (const request of requests) assert.equal(request.input.messages.filter(value => value.role === 'system').map(value => value.content).join('').split(group.children[0].engine.strategy.section.text).length - 1, 1);
verifyProtected(childProject.root); assert.deepEqual(owner(), originalOwner);
mark('compiled native execution retains failing tests, requires original check approvals, seals literal prompt/model/receipts/results and accounts each owned HTTP request once');
await operation('collect'); await until(async () => { group = await groupState(); return group.status !== 'collecting'; }); assert.equal(group.status, 'collected', group.summary);
const collection = await api(parentRoute + '/collaborations/' + group.id + '/collection'); assert.deepEqual(collection.conflicts, []); assert.deepEqual(collection.paths, writable);
await operation('merge'); await until(async () => { group = await groupState(); return ['merge_prepared', 'unknown', 'stale'].includes(group.status); }); assert.equal(group.status, 'merge_prepared', group.summary);
await apply(parentRoute, (await api(parentRoute + '/change-sets/' + group.merge.changeSetId)));
const checkPlan = (await api(parentRoute + '/check-plans', { names: ['test', 'build'] })).execution.plans.at(-1);
const accepted = (await api(parentRoute + '/check-jobs', { planId: checkPlan.id })).execution.checks.at(-1); let check;
await until(async () => { check = await api(parentRoute + '/check-jobs/' + accepted.id); return !['queued', 'running'].includes(check.status); });
assert.equal(check.status, 'passed', check.summary); assert.equal(check.results[0].tests.passed, 8); verifyProtected(root);
mark('compiled parent review and immutable merge pass the original 8 functional tests and actual ESM build');
const deliveryPlan = (await api(parentRoute + '/delivery-plans', { message: 'feat: deliver compiled controlled-engine Node repair' })).execution.deliveryPlans.at(-1);
assert.deepEqual(deliveryPlan.paths, writable);
const deliveryId = (await api(parentRoute + '/delivery-jobs', { planId: deliveryPlan.id })).execution.deliveries.at(-1).id; let delivery;
await until(async () => { delivery = await api(parentRoute + '/delivery-jobs/' + deliveryId); return ['completed', 'failed', 'cancelled', 'unknown'].includes(delivery.status); });
assert.equal(delivery.status, 'completed', delivery.summary); assert.equal(git(['rev-parse', 'HEAD^']).trim(), initialHead);
assert.deepEqual(git(['diff-tree', '--no-commit-id', '--name-only', '-r', 'HEAD']).trim().split('\n'), writable);
assert.deepEqual(owner(), originalOwner); verifyProtected(root); await operation('finalize'); group = await groupState(); assert.equal(group.status, 'completed', group.summary);
for (const route of [parentRoute, childRoute]) { const value = await api(route); const file = path.join(directory, value.id + '-session.json'); fs.writeFileSync(file, JSON.stringify(value, null, 2)); exports.push({ id: value.id, file, sha256: sha(fs.readFileSync(file)) }); }
mark('compiled Git delivery contains only reviewed modules, preserves staged/unstaged/untracked owner bytes and completes the parent with sealed original evidence');
return { success: true, version: bootstrap.version, appRoot, contained, cases, root, group, requests, reviews, originalRuns, exports,
protectedFiles: Object.fromEntries(Object.entries(protectedFiles).map(([name, bytes]) => [name, sha(bytes)])), owner: originalOwner, installation, purgeSource: source,
checks: check, delivery, fixtureModelRequests: requests.length, realModelRequests: 0,
scope: 'Actual compiled host, local native Harness, checks/reviews/Git and an explicitly owned HTTP response fixture. No configured model or upstream Purge plugin executes; real inference benefit remains unmeasured.' };
} catch (error) {
const sessions = [];
for (const route of [parentRoute, childRoute].filter(Boolean)) { try { sessions.push(await api(route)); } catch {} }
fs.writeFileSync(path.join(directory, 'compiled-api-failure.json'), JSON.stringify({ success: false, error: error.stack, cases, group, requests, reviews, originalRuns, sessions, realModelRequests: 0 }, null, 2));
throw error;
} finally {
if (group?.status === 'running') { try { await api(parentRoute + '/collaborations/' + group.id + '/stop', { fingerprint: group.fingerprint }); } catch {} }
modelServer.closeAllConnections(); await new Promise(resolve => modelServer.close(resolve));
}
}
export async function verifyControlledRelease(appRoot = process.cwd()) {
appRoot = fs.realpathSync.native(appRoot);
// Keep the synthetic Git project independent of the installation/extraction
// depth. The production workspace path guard remains responsible for users'
// actual project roots. Retain this exclusive directory as original evidence.
const directory = fs.mkdtempSync(path.join(os.tmpdir(), 'awb-controlled-'));
const node = fs.existsSync(path.join(appRoot, 'runtime/node.exe')) ? path.join(appRoot, 'runtime/node.exe') : process.execPath;
const env = { ...gitEnvironment(), ...Object.fromEntries(['AGENT_WORKBENCH_DEEPSEEK_ROOT', 'AGENT_WORKBENCH_PURGE_ROOT'].filter(name => process.env[name]).map(name => [name, process.env[name]])),
AGENT_WORKBENCH_APP_DIR: appRoot, AGENT_WORKBENCH_DATA_DIR: path.join(directory, 'data'), AGENT_WORKBENCH_PORT: '0' };
const child = spawn(node, [path.join(appRoot, 'dist-server/server.mjs')], { cwd: appRoot, env, windowsHide: true, stdio: ['ignore', 'pipe', 'pipe'] });
let output = '', errors = '', url = '', result, bootstrap;
child.stdout.on('data', bytes => { output += bytes.toString('utf8'); for (const line of output.split('\n')) { try { const value = JSON.parse(line); if (value.ready) url = value.url; } catch {} } });
child.stderr.on('data', bytes => { errors += bytes.toString('utf8'); });
const api = async (route, input) => {
const response = await fetch(url + '/api' + route, { method: input === undefined ? 'GET' : 'POST', signal: AbortSignal.timeout(30000),
headers: { 'Content-Type': 'application/json', 'X-Workbench-Token': bootstrap.token, Connection: 'close' }, ...(input === undefined ? {} : { body: JSON.stringify(input) }) });
const value = await response.json(); assert.equal(response.ok, true, value.error); return value;
};
try {
await until(() => url || child.exitCode !== null, 15000); assert.ok(url, errors);
bootstrap = await (await fetch(url + '/api/bootstrap', { signal: AbortSignal.timeout(5000) })).json();
const health = await api('/health'); assert.equal(health.pid, child.pid);
result = await verifyControlledApi({ api, url, token: bootstrap.token, directory, appRoot, contained: node !== process.execPath });
} catch (error) { result = { success: false, appRoot, directory, error: error.stack, realModelRequests: 0 }; throw error; }
finally {
try { if (url && bootstrap && child.exitCode === null) { await api('/shutdown', {}); await until(() => child.exitCode !== null || child.signalCode !== null, 15000); } }
finally {
if (child.exitCode === null && child.signalCode === null) {
if (process.platform === 'win32') { try { execFileSync('taskkill.exe', ['/PID', String(child.pid), '/T', '/F'], { windowsHide: true, timeout: 10000 }); } catch { child.kill(); } } else child.kill();
}
fs.writeFileSync(path.join(directory, 'host-stdout-log.txt'), output); fs.writeFileSync(path.join(directory, 'host-stderr-log.txt'), errors);
Object.assign(result ??= { success: false }, { directory, pid: child.pid, rootExited: child.exitCode !== null || child.signalCode !== null, exit: { code: child.exitCode, signal: child.signalCode } });
fs.writeFileSync(path.join(directory, 'result.json'), JSON.stringify(result, null, 2));
console.log('EVIDENCE ' + directory);
}
}
assert.equal(result.rootExited, true); assert.equal(result.exit.code, 0); return result;
}
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
const args = process.argv.slice(2);
if (args.length === 1 && args[0] === '--help') { console.log('node scripts/verify-controlled-release.mjs [--app-root DIR] - run an actual compiled local host/native Harness/owned model/Node repair/check/review/Git/prompt acceptance in independent data. Requires explicit Harness and Purge source paths.'); process.exit(0); }
assert.ok(!args.length || args.length === 2 && args[0] === '--app-root' && path.isAbsolute(args[1]), 'Unsupported argument; use --help.');
const result = await verifyControlledRelease(args[1]); console.log(JSON.stringify({ success: result.success, version: result.version, directory: result.directory, cases: result.cases.length,
rootExited: result.rootExited, fixtureModelRequests: result.fixtureModelRequests, realModelRequests: 0 }));
}
@@ -0,0 +1,20 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { execFileSync } from 'node:child_process';
import { createHash } from 'node:crypto';
const read = file => JSON.parse(fs.readFileSync(file, 'utf8'));
const hash = file => createHash('sha256').update(fs.readFileSync(file)).digest('hex');
const root = '.qa/working-memory-u/release';
const freeze = read(root + '/product-freeze.json'), build = read(root + '/rebuild.json').result;
assert.equal(build.success, true);
const extra = build.inputs.filter(row => !freeze.files.some(input => input.path === row.path));
assert.deepEqual(extra.map(row => row.path).sort(), ['cli.mjs','normalize.mjs','package.json','render.mjs','summary.mjs'].map(name => 'examples/delivery-report/dist/' + name).sort());
for (const input of freeze.files) assert.equal(build.inputs.find(row => row.path === input.path)?.sha256, input.sha256);
execFileSync(process.execPath, ['scripts/build.mjs'], { cwd: path.join(build.destination, 'examples/delivery-report'), windowsHide: true });
for (const input of extra) assert.equal(hash(path.join(build.destination, input.path)), input.sha256);
const result = { success: true, trackedInputs: freeze.files.length, archiveInputs: build.inputCount, extra, unchanged: true,
sourceCommit: freeze.sourceCommit, realModelRequests: 0,
scope: 'Five declared ignored example dist inputs rebuilt independently from exact extracted source ZIP and matched byte hashes. No immutable payload changes.' };
fs.writeFileSync(root + '/extra-example-inputs.json', JSON.stringify(result, null, 2) + '\n', { flag: 'wx' });
console.log(JSON.stringify(result));
@@ -0,0 +1,79 @@
import fs from 'node:fs';
import assert from 'node:assert/strict';
const read=p=>JSON.parse(fs.readFileSync(p,'utf8'));
const root='.qa/working-memory-u';
assert.equal(read(root+'/formal-release/final.json').success,true);
assert.equal(read(root+'/native/result.json').success,true);
const manifest=read('docs/working-memory-u-evidence/manifest.json'),release=read(root+'/release/candidate.json');
const headline='U已本地交付1.24.8/source7e77fd65/候选20261103235313371:同SHA/原范围页聚合、完整小源码/最新纯读组保留、修改前当前检查事实与routine/latest去重完成。114相关、569输入独立重建22/22、三归档/便携、12实际安装和安装副本16+9文件流程,以及源码/便携/安装三载荷各7请求工作记忆夹具通过。正式原PID36552/Provider、65项目81会话6377记录13484事件及outbox/3720工件、全部原表行/导出/工件和公开模型中心在网页/原生回看后再次精确保持,9229关闭。本轮真实请求0,原T九测试仍失败,未证明真实交付或Purge收益。';
const evidence=`证据${manifest.count}份/${manifest.bytes}字节,见docs/QA-WORKING-MEMORY-U.md、docs/RETROSPECTIVE-WORKING-MEMORY-U.md及docs/working-memory-u-release-identity.json。下一另冻docs/LIVE-DELIVERY-V-PLAN.md的新诊断/单次预检/Node,不续跑T/R/P/O;Node后才React/Python/Purge。1.25/更新重复核验性能仍单列。不委派、不提取/复制/解密/重存Key、不推送。`;
const qa=`# U 工作记忆修复:1.24.8 已本地交付
${headline}
不可变发行候选为 ${release.portableRoot},产品源码提交为 ${release.documentation.sourceCommit}。维护文档和验收器的后续提交不改变此产品身份。原 T 的八请求未交付结论保持,见 [T验收](QA-LIVE-DELIVERY-T.md)。
## 产品修复
working-set 观察版本3只合并同路径/SHA/原行范围/总字符数的真实返回页,每片段保留原调用、消息组和结果SHA。连续且重叠一致才合并,空洞独立、不同版本不继承、损坏坐标与冲突拒绝。新发送view4精简重复来源,部分发送明确实际区间、未发送已读区间和原工件恢复入口。旧观察与发送视图按原版本独立核对。
delivery-progress版本2在真实工程识别/检查后、首次修改前持续携带当前源码fingerprint、有效计划/job、九测试数量和日志SHA。源码和原日志独立验证;纯read_file不触发工程扫描,无修改的通过基线不能进入Git,未知/待审/损坏来源不授权重跑。latest-tools view3和routine context2只减少重复成功读取摘录与相同已匹配路由回声,完整诊断API、错误、原件和不同/不匹配身份仍保留。
## 验收范围与实际结果
- 最终16相关测试文件114/114通过,构建通过;包含片段/Unicode/空洞/重叠冲突/改版/损坏原件、旧视图、实际分页、完整目标/工具配对/预算、原基线事实及安装/升级单元。未重复全仓测试。
- 原T16工具行重放:旧候选1643/2584字符,新候选2584/2584、范围[0,2584]。原第7/8请求以原23工具/完整目标/16K/2048/1600离线重建,实际输入12307/12086均不超过12352;测试2584字符和51/93/52三个模块全文、原9失败/build通过job和日志SHA均实际存在,来源独立核验。
- 原T八份历史请求继续使用原view3/latest2核对,原字节未改写。
- 源码归档569输入(564跟踪输入及5例示dist)独立提取/离线安装/重建,22份编译文件逐字节一致;5例示dist也从归档源码独立重建核对。三归档、实际便携验证通过。
- 源码、便携及实际安装副本各7次本地HTTP夹具请求,第6/7请求保留全部四文件及当前九失败/build通过事实;三组实际请求工件重开核验,11文件原字节/Git状态保持、0提案/修改/交付。原前三助手响应仅重绑动态原计划ID,后续声明为确定性续读;没有监督提供实现答案。
- Windows实际隔离安装12组生命周期通过,覆盖活动窗口/请求/原审批阻止、损坏清单拒绝、指针故障回退、原宿主保留、独立窗口崩溃、fixture凭据重启恢复和保留数据卸载;安装副本16组成果/9组文件流程及3组工作记忆证据通过。
- 原产品安装器完成1.24.7→1.24.8本地保留状态升级。正式Edge1440/390只读回看、原生安装入口窗口与高性能池回看通过,网页拦截所有写API且无写入尝试。回看后再次核对原65项目/81导出/全部原表每行和schema/3720工件字节/公开模型配置,精确保持;原PID36552/Provider和hasKey保持,未读取Key,9229关闭。
## 首失败和修正
首58项56通过2失败:纯长文件新页被累计观察挤出,以及legacy宽读取排序回退;修复最新纯读原组优先和稳定路径/宽页排序。第二21项19通过2失败、第三37项36通过1失败还包含新增fixture使用无效tool ID,改用真实UUID。随后82项81通过1失败为旧测试只在latest.content_excerpt寻找源码,改为核对实际配对消息/working-set/旧视图的原字节,未放宽保留目标。
原wire首驱动误猜money.mjs,真实为amount.mjs;第二至第四容量检验确实拒绝完整覆盖。精简重复诊断、定位和成功摘录后第五/最终实际请求通过。编译宿主首夹具误用不存在approval.kind,后按原checkPlanId、test/build和原命令核对。所有原失败日志与中间请求保留。
正式升级首轮before只读检查发现一个最小化原生窗口而拒绝,安装器尚未执行;通过Computer Use恢复观察并关闭后,新before-recheck再次确认全部原状态精确保持,再执行唯一正式安装。首before失败原件保留。
便携首轮验收漏列1.24.8,误用旧示例目录规则;第二轮受控引擎helper也漏列版本。保留两次原失败,在忽略目录适配器中仅补七个便携和一个受控版本入口、相应相对import,原断言保持。第三轮同一不可变包完整通过,未重打包。正式升级后将相同QA入口修正写回源码,属于验收维护,不改变已发行二进制。离线核验器初版对可空/复用工件和公开导出隐藏的内部元数据作了错误假设,修正为可空语义、严格旧SHA来源及只读隔离fixture记录;未重放模型/安装。其它只读路径查找、转义和输出截断不计为通过。
## 证据、限制与下一步
${evidence}
发行的历史证据归档保持冻结时字节;本次最终U验收在仓库单独封存,不覆盖原ZIP。
封存目录 [working-memory-u-evidence](working-memory-u-evidence/manifest.json),可用 node scripts/verify-working-memory-u.mjs 独立离线核对实际正文覆盖、旧/新来源、编译身份和原状态;--index另外核对Git索引原字节。驱动按惰性文本封存,禁止把其内容自动当重放授权。
本轮真实模型调用0,原九测试在夹具中仍失败,未完成真实Node交付,也未衡量Purge收益。下一按 [V计划](LIVE-DELIVERY-V-PLAN.md)另立有界新样本,保留原预算和监督边界;Node通过后才扩React/Python与独立Purge AB/BA。
`;
fs.writeFileSync('docs/QA-WORKING-MEMORY-U.md',qa);
fs.writeFileSync('docs/RETROSPECTIVE-WORKING-MEMORY-U.md',`# U回顾:读过的源码必须真的留在下一请求
T暴露的是两件可验证的系统问题:同文件的已读页在进入预算前被候选规则丢弃;首次修改前,真实失败检查没有持续带入模型。U分别修复了有来源的同版本页聚合和当前工程事实,并减少重复定位/成功摘录。在原16K/2048/1600内,原第7/8请求现在完整保留四文件和原检查。这个结论来自实际正文,不能只由候选包含或界面显示推出。
聚合不等于补全文。只接受真实返回、同SHA/原范围、连续或一致重叠的字节;空洞、冲突和版本变化保持可见。当前事实也不是执行授权:计划、日志、源码和任务归属需要独立验证,损坏、未知和待审状态保留原门禁,旧请求不按新算法重写。
114相关测试、原八历史请求、两次离线重建及三个编译载荷的七请求夹具,分别回答边界、兼容、容量和实际接入问题;没有任何一项能代替真实模型独立写出实现。九测试仍失败且零源码修改是本轮刻意保持的边界,不能将其包装成工程交付。
发行检查中,两处显式版本清单漏列1.24.8导致验收脚本失败;改正入口后用原包复验,保留首失败和严格断言。后续维护应让发行版本入口有集中校验,但不在本次冻结后再扩大产品修改。实际安装与正式升级仍完成逐文件、指针、活动保护和回退核验,未以加速为由删除检查。本次唯一正式更新operation耗时707602ms,重复full-manifest和directory-inventory原阶段已封存到update-cost.json;更新重复目录核验仍是独立性能任务。
${headline}${evidence}
下一采用新的V样本,除原交付标准外,逐请求量化累计已读和实际发送覆盖、当前job保留、无新工程状态的重复调用;不追加提示或答案影响模型。先以同预算Node完成真实闭环,再研究React/Python和原版Purge。旧T/R/P/O继续封存,不用新成功覆盖旧失败。
`);
fs.copyFileSync(root+'/next-live-plan-draft.md','docs/LIVE-DELIVERY-V-PLAN.md');
let p=fs.readFileSync('docs/WORKING-MEMORY-U-PLAN.md','utf8');
p=p.replace('现已实现并在独立发行验收中','现已完成独立验收并本地交付1.24.8').replace('正式保持1.24.7/原PID36552/Provider','正式为1.24.8,保留原PID36552/Provider');
fs.writeFileSync('docs/WORKING-MEMORY-U-PLAN.md',p);
p=fs.readFileSync('AGENTS.md','utf8');p=p.replace('# Agent Workbench项目执行规范\n','# Agent Workbench项目执行规范\n\n'+headline+evidence+'\n');
p=p.replace(/^- 正式服务入口http:\/\/127\.0\.0\.1:4318.*$/m,'- 正式服务入口http://127.0.0.1:4318,当前1.24.8,沿用原PID36552与Provider;不可变身份见docs/working-memory-u-release-identity.json,U验收/回顾已完成。当前65项目81会话,原表/导出/工件/公开配置精确保持。普通开发不重启服务,不提取/复制/解密/重存Key;下一按docs/LIVE-DELIVERY-V-PLAN.md另冻新诊断/单次预检/Node,旧T/R/P/O不续跑。');fs.writeFileSync('AGENTS.md',p);
for(const name of ['task_plan.md','findings.md','progress.md']){const text=fs.readFileSync(name,'utf8'),i=text.indexOf('\n');fs.writeFileSync(name,text.slice(0,i+1)+'\n## U最终交付与回顾\n\n'+headline+evidence+'\n\n全部U节点完成;下方开发/待完成记录保留其历史时点。下一为V的新冻结契约,本轮不调用模型。\n'+text.slice(i+1));}
p=fs.readFileSync('docs/NEXT-STEPS.md','utf8');const nl=p.indexOf('\n');fs.writeFileSync('docs/NEXT-STEPS.md',p.slice(0,nl+1)+'\n'+headline+evidence+'\n\n下一按[V新有界真实交付](LIVE-DELIVERY-V-PLAN.md),U已完成;下方T/S及更早状态按历史时点理解。\n'+p.slice(nl+1));
p=fs.readFileSync('CHANGELOG.md','utf8').replace('## 1.24.8 · 已读文件与当前检查的工作记忆(开发验收中)','## 1.24.8 · 已读文件与当前检查的工作记忆(已本地交付)').replace('正式发行验收完成后另记身份。','独立重建22/22、便携/12实际安装及正式网页/原生回看通过;原PID/Provider和全部原数据保持。身份见docs/working-memory-u-release-identity.json。');fs.writeFileSync('CHANGELOG.md',p);
for(const name of ['scripts/verify-release.mjs','scripts/verify-controlled-release.mjs']){const t=fs.readFileSync(name,'utf8');assert.equal(t.includes("'1.24.8'"),false);fs.writeFileSync(name,t.replaceAll("'1.24.7'","'1.24.7', '1.24.8'"));}
fs.copyFileSync('.qa/working-memory-u-offline-draft.mjs','scripts/verify-working-memory-u.mjs');
fs.appendFileSync('.gitattributes','\ndocs/working-memory-u-evidence/** -text -whitespace\ndocs/working-memory-u-evidence/**/*.log binary\ndocs/working-memory-u-evidence/**/*.txt binary\ndocs/working-memory-u-offline.txt binary\ndocs/working-memory-u-git-index.txt binary\ndocs/working-memory-u-release-identity.json -text\n');
console.log(JSON.stringify({success:true,version:'1.24.8',sourceCommit:release.documentation.sourceCommit,evidence:manifest.count,realModelRequests:0}));
@@ -0,0 +1,8 @@
import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict';import {createHash}from'node:crypto';import{DatabaseSync}from'node:sqlite';import{verifyPlanEvidence}from'../src/core/context/request-plan.mjs';
const portable=JSON.parse(fs.readFileSync('.qa/working-memory-u/release/memory.json'));
for(const directory of ['.qa/working-memory-host-cd805518-be14-44fe-a4d5-1eb4cf422768',path.dirname(portable.resultPath)]){
const e=JSON.parse(fs.readFileSync(path.join(directory,'export.json'))),db=new DatabaseSync(path.join(directory,'data/workbench.sqlite'),{readOnly:true}),core={artifact:new Map(e.execution.artifacts.map(a=>[a.id,a])),tool:new Map(),run:new Map(),task:new Map()};
for(const r of db.prepare("SELECT kind,payload FROM records WHERE kind IN ('artifact','tool','run','task')").all()){const v=JSON.parse(r.payload);core[r.kind].set(v.id,v);}db.close();
const store={core,owned(k,id,sid){const v=core[k].get(id);assert.ok(v);assert.equal(v.sessionId,sid);return v;},artifactStore:{read(a){const b=fs.readFileSync(path.join(directory,'data/artifacts',a.relative));assert.equal(createHash('sha256').update(b).digest('hex'),a.sha256);return b.toString('utf8');}}};
for(const p of e.execution.contextPlans)verifyPlanEvidence(store,e.session,p);console.log(JSON.stringify({success:true,directory,plans:e.execution.contextPlans.length,realModelRequests:0}));
}
@@ -0,0 +1,85 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import net from 'node:net';
import { spawn, execFileSync } from 'node:child_process';
import { publicSnapshot, compareOriginalState, hash } from './desktop-f-state.mjs';
import { inspectHostInstallation } from '../src/core/desktop/app-installation.mjs';
const root = path.resolve('.qa/working-memory-u/formal-release'); fs.mkdirSync(root, { recursive: true });
const read = file => JSON.parse(fs.readFileSync(file, 'utf8'));
const save = (name, value) => fs.writeFileSync(path.join(root, name), JSON.stringify(value, null, 2) + '\n', { flag: 'wx' });
const release = read('releases/latest.json'), sourceCommit = release.documentation.sourceCommit;
const manifest = read(path.join(release.portableRoot, 'MANIFEST.json')); assert.equal(manifest.version, '1.24.8');
const url = 'http://127.0.0.1:4318', installRoot = 'C:/Users/wangy/AppData/Local/Programs/AgentWorkbench';
const dataRoot = 'C:/Users/wangy/AppData/Local/Packages/OpenAI.Codex_2p2nqsd0c76g0/LocalCache/Local/AgentWorkbench';
const mode = process.argv[2]; assert.ok(['before', 'before-recheck', 'install', 'final'].includes(mode));
assert.ok(!fs.existsSync(path.join(root, mode + '.json')), 'Keep prior receipts; do not retry unknown installation.');
const startedAt = new Date().toISOString();
async function api(route) {
const boot = await (await fetch(url + '/api/bootstrap', { signal: AbortSignal.timeout(20000) })).json();
const response = await fetch(url + '/api' + route, { headers: { 'X-Workbench-Token': boot.token, Connection: 'close' }, signal: AbortSignal.timeout(20000) });
assert.equal(response.status, 200, route); return response.json();
}
async function inspectorClosed() {
await new Promise((resolve, reject) => {
const socket = net.createConnection({ host: '127.0.0.1', port: 9229 }); socket.setTimeout(1500);
socket.once('connect', () => { socket.destroy(); reject(Error('Inspector open.')); });
socket.once('error', error => { socket.destroy(); error.code === 'ECONNREFUSED' ? resolve() : reject(error); });
socket.once('timeout', () => { socket.destroy(); reject(Error('Inspector state unknown.')); });
});
}
let result;
try {
assert.equal(execFileSync('git', ['rev-parse', 'HEAD'], { encoding: 'utf8' }).trim(), sourceCommit);
assert.equal(execFileSync('git', ['status', '--porcelain'], { encoding: 'utf8' }).trim(), '');
await inspectorClosed();
const current = await publicSnapshot(url, dataRoot), host = await api('/host/status');
assert.equal(current.pid, 36552); assert.equal(current.hasKey, true); assert.deepEqual(current.active, []); assert.equal(host.activity.active, false);
if (mode === 'before' || mode === 'before-recheck') {
compareOriginalState(read('.qa/working-memory-u/production-before.json'), current);
assert.equal(current.version, '1.24.7'); assert.equal(host.desktopWindows.count, 0);
assert.match(current.runtimeRoot.replaceAll('\\', '/'), /\/versions\/Agent-Workbench-1\.24\.7-win-x64-20261103164618190$/);
assert.equal(read('.qa/working-memory-u/release/preinstall-review.json').success, true);
const archived = read('.qa/archives-validation.json'), portable = read('.qa/release-validation.json');
assert.equal(archived.success, true); assert.equal(portable.success, true); assert.equal(portable.appRoot, release.portableRoot);
save('private-before.json', current); save('pointer-before.json', read(path.join(installRoot, 'current.json'))); save('release.json', release);
result = { success: true, version: current.version, pid: current.pid, projects: current.projects,
sessions: current.database.sessionIds.length, tables: Object.fromEntries(Object.entries(current.database.tables).map(([name, table]) => [name, table.count])),
runtimeRoot: current.runtimeRoot, sourceCommit, hasKey: current.hasKey, active: current.active };
} else {
const before = read(path.join(root, 'private-before.json')); compareOriginalState(before, current);
assert.deepEqual(release, read(path.join(root, 'release.json')));
if (mode === 'install') {
assert.equal(current.version, '1.24.7'); assert.equal(host.desktopWindows.count, 0);
assert.deepEqual(read(path.join(installRoot, 'current.json')), read(path.join(root, 'pointer-before.json')));
assert.equal(hash(fs.readFileSync(release.installer.path)), release.installer.sha256);
const logFile = path.join(root, 'installer.log'), fd = fs.openSync(path.join(root, 'installer-process.log'), 'wx'); let code;
try {
code = await new Promise((resolve, reject) => {
const child = spawn(release.installer.path, ['/VERYSILENT', '/SUPPRESSMSGBOXES', '/NORESTART', '/LOG=' + logFile,
'/DIR=' + installRoot, '/DATA_ROOT=' + dataRoot, '/PORT=4318'], { windowsHide: true, stdio: ['ignore', fd, fd] });
child.once('error', reject); child.once('close', resolve);
});
} finally { fs.closeSync(fd); }
save('installer-exit.json', { code, finishedAt: new Date().toISOString() }); assert.equal(code, 0, 'Unknown/failed install is not automatically replayed.');
} else assert.equal(read(path.join(root, 'install.json')).success, true);
const after = await publicSnapshot(url, dataRoot), retention = compareOriginalState(before, after);
assert.equal(after.version, '1.24.8'); assert.equal(after.pid, before.pid); assert.equal(after.hasKey, true);
const candidate = path.join(installRoot, 'versions', path.basename(release.portableRoot));
assert.equal(fs.realpathSync.native(after.runtimeRoot), fs.realpathSync.native(candidate));
const identity = inspectHostInstallation(candidate), pointer = read(path.join(installRoot, 'current.json'));
assert.equal(pointer.active.directory, path.basename(candidate)); assert.equal(pointer.active.manifestSha256, identity.manifestSha256);
assert.equal(pointer.active.runtimeIdentity, identity.identitySha256);
const operation = fs.readdirSync(path.join(installRoot, '.installation')).filter(name => /^progress-.*\.json$/.test(name))
.map(name => read(path.join(installRoot, '.installation', name))).sort((a, b) => b.updatedAt.localeCompare(a.updatedAt))[0];
assert.equal(operation.state, 'completed'); assert.equal(operation.candidate.manifestSha256, identity.manifestSha256);
save(mode + '-private-after.json', after);
result = { success: true, version: after.version, pid: after.pid, runtimeRoot: after.runtimeRoot, projects: after.projects,
sessions: after.database.sessionIds.length, hasKey: after.hasKey, retention, pointer, operation,
desktopWindows: (await api('/host/status')).desktopWindows.count, inspectorClosed: true, sourceCommit };
}
} catch (error) { result = { success: false, error: error.stack }; process.exitCode = 1; }
result = { ...result, mode, startedAt, finishedAt: new Date().toISOString(), realModelRequests: 0,
scope: 'Public API/full original row/export/artifact hashes; installer retains original running host and Provider. No credential extraction or task replay.' };
save(mode + '.json', result); console.log(JSON.stringify(result));
@@ -0,0 +1,15 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { execFileSync } from 'node:child_process';
import { createHash } from 'node:crypto';
const root = '.qa/working-memory-u/release'; fs.mkdirSync(root, { recursive: true });
assert.equal(execFileSync('git', ['status', '--porcelain'], { encoding: 'utf8' }).trim(), '');
const names = execFileSync('git', ['ls-files', '-z', '--', 'src', 'public', 'scripts', 'tests', 'examples', 'benchmarks', 'research', 'package.json', 'package-lock.json', 'vite.config.ts', 'tsconfig.json', 'index.html', 'mobile.html'], { encoding: 'utf8' }).split('\0').filter(Boolean);
const record = file => { const bytes = fs.readFileSync(file); return { path: file.replaceAll('\\', '/'), bytes: bytes.length, sha256: createHash('sha256').update(bytes).digest('hex') }; };
const walk = folder => fs.readdirSync(folder, { withFileTypes: true }).flatMap(entry => entry.isDirectory() ? walk(path.join(folder, entry.name)) : [path.join(folder, entry.name)]);
const value = { sourceCommit: execFileSync('git', ['rev-parse', 'HEAD'], { encoding: 'utf8' }).trim(), version: '1.24.8',
files: names.sort().map(record), compiled: ['dist-client', 'dist-server', 'dist-desktop'].flatMap(walk).sort().map(record),
createdAt: new Date().toISOString(), realModelRequests: 0 };
fs.writeFileSync(path.join(root, 'product-freeze.json'), JSON.stringify(value, null, 2) + '\n', { flag: 'wx' });
console.log(JSON.stringify({ sourceCommit: value.sourceCommit, sourceInputs: value.files.length, compiled: value.compiled.length }));
@@ -0,0 +1,59 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { spawn } from 'node:child_process';
const root = '.qa/working-memory-u/release';
const read = file => JSON.parse(fs.readFileSync(file, 'utf8').replace(/^\uFEFF/, ''));
const mode = process.argv[2];
const freeze = read(root + '/product-freeze.json'), release = read('releases/latest.json');
assert.equal(release.documentation.sourceCommit, freeze.sourceCommit);
assert.equal(read(path.join(release.portableRoot, 'MANIFEST.json')).version, '1.24.8');
if (mode === 'register') {
fs.writeFileSync(root + '/candidate.json', JSON.stringify(release, null, 2) + '\n', { flag: 'wx' });
console.log(JSON.stringify({ candidate: release.portableRoot, sourceCommit: freeze.sourceCommit }));
process.exit(0);
}
assert.deepEqual(release, read(root + '/candidate.json'));
const commands = {
rebuild: [process.execPath, ['scripts/verify-packaged-build.mjs']],
archives: ['C:/Users/wangy/AppData/Local/Programs/Python/Python312/python.exe', ['-I', 'scripts/verify-archives.py']],
portable: [process.execPath, ['scripts/verify-release.mjs']],
'portable-recheck': [process.execPath, ['.qa/working-memory-u-portable-recheck.mjs']],
'portable-final': [process.execPath, ['.qa/working-memory-u-portable-final.mjs']],
'memory': [process.execPath, ['scripts/verify-working-memory.mjs']],
install: [process.execPath, ['.qa/working-memory-u-install.mjs']]
};
assert.ok(commands[mode]);
const output = root + '/' + mode + '.json';
assert.equal(fs.existsSync(output), false, 'Do not replay unknown or failed result.');
const log = root + '/' + mode + '.log', fd = fs.openSync(log, 'wx');
const env = { ...process.env, AGENT_WORKBENCH_TEST_PYTHON: 'C:/Users/wangy/AppData/Local/Programs/Python/Python312/python.exe',
...(['memory', 'install'].includes(mode) ? { AGENT_WORKBENCH_QA_APP_ROOT: release.portableRoot } : {}) };
let code, report; const startedAt = new Date().toISOString();
try {
console.log('START ' + mode);
code = await new Promise((resolve, reject) => {
const child = spawn(...commands[mode], { env, windowsHide: true, stdio: ['ignore', fd, fd] });
child.once('error', reject); child.once('close', resolve);
});
fs.closeSync(fd);
assert.equal(code, 0, 'Inspect preserved log ' + log);
assert.deepEqual(read('releases/latest.json'), release);
const lines = fs.readFileSync(log, 'utf8').trim().split(/\r?\n/);
let resultPath;
if (mode === 'archives') resultPath = '.qa/archives-validation.json';
else if (['portable', 'portable-recheck', 'portable-final'].includes(mode)) resultPath = '.qa/release-validation.json';
else if (mode === 'install') resultPath = read('.qa/desktop-install-location.json').result;
else {
const summary = JSON.parse(lines.findLast(line => line.startsWith('{"success":')));
resultPath = summary.output ?? path.join(summary.root, 'result.json');
}
const result = read(resultPath); assert.equal(result.success, true);
if (mode === 'rebuild') assert.equal(result.sourceCommit, freeze.sourceCommit);
if (mode === 'install') assert.equal(fs.realpathSync.native(result.packagedSource), fs.realpathSync.native(release.portableRoot));
report = { success: true, resultPath, result };
} catch (error) { report = { success: false, code, error: error.stack }; process.exitCode = 1; }
report = { ...report, mode, startedAt, finishedAt: new Date().toISOString(), log,
sourceCommit: freeze.sourceCommit, candidate: release.portableRoot, realModelRequests: 0 };
fs.writeFileSync(output, JSON.stringify(report, null, 2) + '\n', { flag: 'wx' });
console.log(JSON.stringify({ success: report.success, mode, output, resultPath: report.resultPath, error: report.error }));
@@ -0,0 +1,8 @@
import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict';import{createHash}from'node:crypto';
import{verifyPlanEvidence}from'../src/core/context/request-plan.mjs';
const root='.qa/live-delivery-t',read=n=>JSON.parse(fs.readFileSync(path.join(root,n),'utf8')),sha=b=>createHash('sha256').update(b).digest('hex');
const original=read('node/export.json'),e=read('node/session.json').execution,artifacts=read('analysis/artifact-index.json').artifacts;
const core={artifact:new Map(artifacts.map(a=>[a.id,a])),tool:new Map(read('analysis/owned-tool-rows.json').map(r=>{const v=JSON.parse(r.payload);return[v.id,v];})),run:new Map([[e.run.id,e.run]]),task:new Map([[e.task.id,e.task]])};
const store={core,owned(kind,id,sid){const v=core[kind].get(id);assert.ok(v);assert.equal(v.sessionId,sid);return v;},artifactStore:{read(a){const b=fs.readFileSync(path.join(root,a.capturedPath));assert.equal(sha(b),a.sha256);return b.toString('utf8');}}};
const results=[];for(const plan of e.contextPlans){verifyPlanEvidence(store,original.session,plan);results.push({id:plan.id,requestSha256:plan.requestSha256,workingSetViewVersion:plan.workingSetViewVersion,latestToolsViewVersion:plan.latestToolsViewVersion,passed:true});}
assert.equal(results.length,8);fs.writeFileSync('.qa/working-memory-u/history-result.json',JSON.stringify({passed:true,results,externalModelRequests:0,originalRequestsRewritten:0},null,2),{flag:'wx'});console.log(JSON.stringify({passed:true,historicalRequests:8,originalRequestsRewritten:0}));
@@ -0,0 +1,182 @@
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import net from 'node:net';
import http from 'node:http';
import { spawn, execFile } from 'node:child_process';
import { promisify } from 'node:util';
import { createHash, randomUUID } from 'node:crypto';
import { _electron } from 'playwright';
import { planDesktopBundle, copyDesktopBundle, buildNativeLauncher } from '../scripts/bundle-desktop.mjs';
import { buildWindowsInstaller } from '../scripts/build-installer.mjs';
import { HostController } from '../src/core/desktop/host-controller.mjs';
import { InstallationManager, snapshotPersistentData } from '../src/core/desktop/install-manager.mjs';
import { observeWindowsProcess } from '../src/core/desktop/process-identity.mjs';
import { projectEnvironment } from '../src/core/process-environment.mjs';
if (process.argv.includes('--help')) { console.log('node scripts/verify-desktop-install.mjs — isolated actual user-level setup/update/uninstall, full data retention, owned DPAPI/HTTP fixture, active-window and request guards, fault rollback and original PID retention. No configured-model credentials.'); process.exit(0); }
assert.equal(process.argv.length, 2);
const appRoot = process.cwd(), root = path.resolve('.qa', 'desktop-install-' + randomUUID()), installRoot = path.join(root, 'program'), dataRoot = path.join(root, 'user-data');
const packagedSource = process.env.AGENT_WORKBENCH_QA_APP_ROOT ? fs.realpathSync.native(process.env.AGENT_WORKBENCH_QA_APP_ROOT) : null;
const version = JSON.parse(fs.readFileSync('package.json')).version, results = [], appId = randomUUID(), hash = value => createHash('sha256').update(value).digest('hex');
fs.mkdirSync(root, { recursive: true });
const reserved = net.createServer(); await new Promise(resolve => reserved.listen(0, '127.0.0.1', resolve)); const port = reserved.address().port; await new Promise(resolve => reserved.close(resolve));
const record = (name, detail = {}) => { results.push({ name, passed: true, ...detail }); console.log('PASS ' + name); };
const until = async (action, timeout = 60000) => { const end = Date.now() + timeout; while (!await action()) { if (Date.now() > end) throw Error('Timeout: ' + stage); await new Promise(resolve => setTimeout(resolve, 100)); } };
const run = promisify(execFile), env = projectEnvironment();
let stage = 'prepare owned full releases', controller, application, ownedModel, report, heldRequest, releaseRequest, original, installedUI = null;
const launcher = path.resolve('.qa/native-launcher/AgentWorkbench.exe'); buildNativeLauncher(appRoot, launcher); const desktop = planDesktopBundle(appRoot);
function payload(name) {
const directory = path.join(root, name); fs.mkdirSync(directory);
if (packagedSource) {
const original = JSON.parse(fs.readFileSync(path.join(packagedSource, 'MANIFEST.json')));
assert.equal(original.kind, 'portable'); assert.equal(original.version, version);
for (const entry of original.files) { const file = path.join(packagedSource, entry.path); assert.equal(hash(fs.readFileSync(file)), entry.sha256, entry.path); }
fs.cpSync(packagedSource, directory, { recursive: true }); fs.unlinkSync(path.join(directory, 'MANIFEST.json'));
} else {
for (const item of ['dist-client', 'dist-server', 'dist-desktop', 'public', 'examples']) fs.cpSync(path.join(appRoot, item), path.join(directory, item), { recursive: true });
fs.mkdirSync(path.join(directory, 'scripts')); fs.copyFileSync('scripts/python-check-runner.py', path.join(directory, 'scripts/python-check-runner.py'));
fs.mkdirSync(path.join(directory, 'runtime')); fs.copyFileSync(process.execPath, path.join(directory, 'runtime/node.exe'));
fs.cpSync(path.join(path.dirname(process.execPath), 'node_modules/npm'), path.join(directory, 'runtime/node_modules/npm'), { recursive: true });
copyDesktopBundle(appRoot, directory, desktop, { launcher });
}
fs.writeFileSync(path.join(directory, 'owned-release.txt'), name + '\n');
// A valid PE overlay explicitly models a future owned native bootstrap with
// different bytes. The updated root entry must follow it and roll back with it.
if (name.startsWith('owned-b-')) fs.appendFileSync(path.join(directory, 'AgentWorkbench.exe'), '\nowned-native-bootstrap-update-fixture\n');
const walk = relative => fs.readdirSync(path.join(directory, relative), { withFileTypes: true }).flatMap(entry => {
const next = path.posix.join(relative, entry.name), file = path.join(directory, next); return entry.isDirectory() ? walk(next) : [{ path: next, bytes: fs.statSync(file).size, sha256: hash(fs.readFileSync(file)) }];
});
fs.writeFileSync(path.join(directory, 'MANIFEST.json'), JSON.stringify({ app: 'agent-workbench', kind: 'portable', version, platform: 'win32-x64', nodeVersion: process.version, files: walk('') }, null, 2)); return directory;
}
async function setup(installer, label, expected = 0) {
const log = path.join(root, label + '-setup.log');
let code = 0, output = '';
try { const result = await run(installer.path, ['/VERYSILENT', '/SUPPRESSMSGBOXES', '/NORESTART', '/LOG=' + log, '/DIR=' + installRoot, '/DATA_ROOT=' + dataRoot, '/PORT=' + port], { windowsHide: true, timeout: 300000, maxBuffer: 1024 * 1024, env }); output = result.stdout + result.stderr; }
catch (error) { code = typeof error.code === 'number' ? error.code : -1; output = String(error.stdout ?? '') + String(error.stderr ?? ''); }
fs.writeFileSync(path.join(root, label + '-process.txt'), output);
if (expected === 0) assert.equal(code, 0, 'Actual installer failed; inspect ' + log); else assert.notEqual(code, 0, 'Actual installer unexpectedly accepted the rejected condition.');
const logText = fs.readFileSync(log, 'utf8'); assert.match(logText, /AWBPROGRESS /, 'Actual installer must receive original stage output.');
const records = fs.readdirSync(path.join(installRoot, '.installation')).filter(name => /^progress-.*\.json$/.test(name)).map(name => JSON.parse(fs.readFileSync(path.join(installRoot, '.installation', name)))).sort((a, b) => b.updatedAt.localeCompare(a.updatedAt));
assert.equal(records[0].state, expected === 0 ? 'completed' : 'failed');
if (expected === 0) { assert.ok(records[0].history.some(row => row.stage === 'verify-candidate' && row.scope === 'full-manifest' && row.counts.completedFiles === row.counts.totalFiles)); assert.match(logText, /AWBFILES \d+\/\d+/); }
return { code, log, sha256: hash(fs.readFileSync(log)) };
}
async function launchElectron() {
const current = JSON.parse(fs.readFileSync(path.join(installRoot, 'current.json'))), directory = path.join(installRoot, 'versions', current.active.directory);
const client = await _electron.launch({ executablePath: path.join(directory, 'desktop/AgentWorkbench.exe'), args: ['--app-root', directory, '--data-root', dataRoot, '--port', String(port), '--hidden-window'], cwd: directory, env, timeout: 60000 });
const page = await client.firstWindow(); await page.locator('.connection.connected').waitFor({ timeout: 30000 }); return client;
}
function ownedManager(candidateRoot) { return new InstallationManager({ installRoot, dataRoot, candidateRoot, port }); }
try {
const a = payload('owned-a-' + version), b = payload('owned-b-' + version), fault = payload('owned-fault-' + version);
stage = 'compile isolated actual installers';
const firstSetup = buildWindowsInstaller({ root: appRoot, portableRoot: a, outputRoot: root, qaFixture: { appId } });
const secondSetup = buildWindowsInstaller({ root: appRoot, portableRoot: b, outputRoot: root, qaFixture: { appId } });
const faultSetup = buildWindowsInstaller({ root: appRoot, portableRoot: fault, outputRoot: root, qaFixture: { appId, fault: 'corrupt-installed-candidate' } });
stage = 'actual clean user-level installation'; const installed = await setup(firstSetup, 'clean');
const activeA = path.join(installRoot, 'versions', path.basename(a)); controller = new HostController({ appRoot: activeA, dataRoot, port, nodePath: process.execPath });
original = (await controller.start()).identity; application = await launchElectron();
assert.equal((await controller.status()).desktopWindows.count, 1); record(stage, { installer: firstSetup, ...installed, hostPid: original.pid, electronPid: await application.evaluate(() => process.pid) });
stage = 'actual installer rejects an open attested desktop window'; const windowRejection = await setup(secondSetup, 'window-block', 1);
assert.equal(ownedManager(null).current().active.directory, path.basename(a)); assert.equal((await controller.connect()).identity.pid, original.pid); record(stage, windowRejection);
await application.close(); application = null; await until(async () => (await controller.status()).desktopWindows.count === 0);
const key = 'owned-install-credential-' + randomUUID(); let authenticated = 0, hold = false;
ownedModel = http.createServer(async (request, response) => {
const chunks = []; for await (const bytes of request) chunks.push(bytes);
assert.equal(request.headers.authorization, 'Bearer ' + key); authenticated++;
if (hold) { heldRequest = true; await new Promise(resolve => { releaseRequest = resolve; request.on('close', resolve); }); }
response.writeHead(200, { 'Content-Type': 'application/json' }); response.end(JSON.stringify({ choices: [{ message: { role: 'assistant', content: 'OK' }, finish_reason: 'stop' }], usage: { prompt_tokens: 4, completion_tokens: 1, total_tokens: 5 } }));
}); await new Promise(resolve => ownedModel.listen(0, '127.0.0.1', resolve));
const connection = await controller.api('/model-center/connections', { method: 'POST', input: { name: 'Owned desktop install credential', model: 'owned', baseUrl: 'http://127.0.0.1:' + ownedModel.address().port + '/v1', apiKey: key, persistKey: true } });
const connectionId = connection.id ?? connection.connection?.id ?? connection.center?.connections.at(-1).id;
assert.ok(connectionId); await controller.api('/model-center/probe', { method: 'POST', input: { id: connectionId } }); assert.equal(authenticated, 1);
stage = 'actual update rejects a pending owned model request'; hold = true;
// Manifest verification is synchronous and can occupy this fixture's event
// loop. Keep the explicitly held local response pending across that work;
// this is the QA client's deadline, not a product/model timeout override.
const pendingStarted = Date.now();
const pending = controller.api('/model-center/probe', { method: 'POST', input: { id: connectionId }, timeoutMs: 300000 }); pending.catch(() => {});
await until(() => heldRequest); await assert.rejects(ownedManager(null).preflight(), /任务|请求/);
assert.equal((await controller.connect()).identity.pid, original.pid);
assert.equal(authenticated, 2, 'Exactly the initial and explicitly held owned requests; no retry.');
record(stage, { fixture: 'Actual owned HTTP response held until full manifest/preflight and original PID verification settle. No configured-model call or product timeout change.', elapsedMs: Date.now() - pendingStarted });
releaseRequest?.(); hold = false; assert.equal((await pending).ok, true);
stage = 'actual installer rejects a persistent original task approval';
const projectRoot = path.join(root, 'approval-project'); fs.mkdirSync(projectRoot); fs.writeFileSync(path.join(projectRoot, 'README.md'), '# Owned installer approval project\n');
const project = await controller.api('/projects', { method: 'POST', input: { root: projectRoot } }), session = await controller.api('/sessions', { method: 'POST', input: { projectId: project.id } });
await controller.api('/sessions/' + session.id + '/messages', { method: 'POST', input: { content: 'Read this owned project and prepare the offline demonstration proposal.' } });
await until(async () => (await controller.api('/sessions/' + session.id)).approvals.some(value => value.status === 'pending'));
const approval = (await controller.api('/sessions/' + session.id)).approvals.find(value => value.status === 'pending');
const approvalRejection = await setup(secondSetup, 'approval-block', 1); assert.equal((await controller.api('/sessions/' + session.id)).approvals.find(value => value.status === 'pending').id, approval.id);
await controller.api('/sessions/' + session.id + '/stop', { method: 'POST', input: {} }); record(stage, { ...approvalRejection, approvalId: approval.id });
stage = 'actual manifest fault installer preserves original pointer, PID and all data'; const snapshot = snapshotPersistentData(dataRoot), pointer = fs.readFileSync(path.join(installRoot, 'current.json'));
const faultResult = await setup(faultSetup, 'candidate-fault', 1);
assert.deepEqual(fs.readFileSync(path.join(installRoot, 'current.json')), pointer); assert.deepEqual(snapshotPersistentData(dataRoot), snapshot); assert.equal((await controller.connect()).identity.pid, original.pid); assert.ok(fs.existsSync(path.join(installRoot, 'AgentWorkbench.exe'))); record(stage, faultResult);
stage = 'actual pointer-published fault rolls original host and pointer back';
const originalBootstrap = fs.readFileSync(path.join(installRoot, 'AgentWorkbench.exe'));
const faultCandidate = path.join(installRoot, 'versions', 'owned-pointer-fault'); fs.cpSync(b, faultCandidate, { recursive: true });
await assert.rejects(ownedManager(faultCandidate).activate({ afterPointer: () => { throw Error('owned-post-pointer-fault'); } }), /owned-post-pointer-fault/);
assert.deepEqual(fs.readFileSync(path.join(installRoot, 'current.json')), pointer); assert.deepEqual(snapshotPersistentData(dataRoot), snapshot); assert.equal((await controller.connect()).identity.pid, original.pid); record(stage, { fixture: 'Explicit in-process afterPointer error with real retained host; original pointer bytes, database rows and artifact bytes checked.' });
assert.deepEqual(fs.readFileSync(path.join(installRoot, 'AgentWorkbench.exe')), originalBootstrap);
stage = 'actual update retains original PID, instance, DPAPI ciphertext and every persistent byte';
const updated = await setup(secondSetup, 'update'); const activeB = path.join(installRoot, 'versions', path.basename(b));
controller = new HostController({ appRoot: activeB, dataRoot, port, nodePath: process.execPath }); const after = (await controller.connect()).identity;
assert.equal(after.pid, original.pid); assert.equal(after.instanceId, original.instanceId); assert.deepEqual(snapshotPersistentData(dataRoot), snapshot); record(stage, { ...updated, hostPid: after.pid, instanceId: after.instanceId, data: snapshot });
assert.notDeepEqual(fs.readFileSync(path.join(installRoot, 'AgentWorkbench.exe')), originalBootstrap);
assert.deepEqual(fs.readFileSync(path.join(installRoot, 'AgentWorkbench.exe')), fs.readFileSync(path.join(activeB, 'AgentWorkbench.exe')));
stage = 'installed native bootstrap verifies and opens the registered release';
const nativeLauncher = spawn(path.join(installRoot, 'AgentWorkbench.exe'), ['--hidden-window'], { windowsHide: true, stdio: 'ignore', env });
await new Promise((resolve, reject) => { nativeLauncher.once('error', reject); nativeLauncher.once('exit', code => code === 0 ? resolve() : reject(Error('Owned native bootstrap failed (' + code + ')'))); });
await until(async () => (await controller.status()).desktopWindows.count === 1);
const nativeWindow = (await controller.status()).desktopWindows.entries[0], nativeProcess = observeWindowsProcess(nativeWindow.pid); assert.ok(nativeProcess); assert.equal((await controller.connect()).identity.pid, original.pid);
// A controlled WM_CLOSE to the owned main window is delegated to Electron by
// a separate automation connection below; no unknown process is terminated.
const child = spawn(path.join(activeB, 'desktop/AgentWorkbench.exe'), ['--app-root', activeB, '--data-root', dataRoot, '--port', String(port), '--hidden-window'], { cwd: activeB, env, windowsHide: true, stdio: 'ignore' });
await new Promise(resolve => child.once('exit', resolve)); assert.equal((await controller.status()).desktopWindows.count, 1);
record(stage, { electronPid: nativeWindow.pid, hostPid: original.pid, repeatLaunchReusedWindow: true });
// The native process has no debugger. Its owned renderer closes itself through
// the product's browser window action using a localhost, attested stop below.
stage = 'native desktop remains registered before explicit owned cleanup';
// Closing only this exactly observed test Electron tree after the launch check
// models a desktop crash. Host/persistent results remain; stale registration is
// removed through the normal identity check, without signalling a reused PID.
const observed = observeWindowsProcess(nativeWindow.pid); assert.equal(observed.createdAt, nativeWindow.createdAt);
await run('taskkill.exe', ['/PID', String(observed.pid), '/T', '/F'], { windowsHide: true, timeout: 15000, env });
await until(async () => (await controller.status()).desktopWindows.count === 0); assert.equal((await controller.connect()).identity.pid, original.pid);
record(stage, { fixture: 'Explicit owned Electron crash after exact actual PID/creation check; independent host retained.' });
stage = 'real host restart restores the owned saved credential and actual HTTP authentication';
const beforeRestart = snapshotPersistentData(dataRoot); await controller.stop(); const restarted = (await controller.start()).identity;
assert.notEqual(restarted.pid, original.pid); assert.deepEqual(snapshotPersistentData(dataRoot), beforeRestart);
await controller.api('/model-center/probe', { method: 'POST', input: { id: connectionId } }); assert.equal(authenticated, 3); record(stage, { originalPid: original.pid, restartedPid: restarted.pid, authenticatedRequests: authenticated });
if (['1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(version)) {
stage = 'actual installed current results and saved HTML user paths';
const pointer = JSON.parse(fs.readFileSync(path.join(installRoot, 'current.json')));
const installedRoot = fs.realpathSync.native(path.join(installRoot, 'versions', pointer.active.directory)), proofs = [];
for (const script of ['verify-file-results-ui.mjs', 'verify-local-files.mjs', 'verify-working-memory.mjs']) {
const output = await run(process.execPath, [path.join(appRoot, 'scripts', script)], { cwd: appRoot,
env: { ...env, AGENT_WORKBENCH_QA_APP_ROOT: installedRoot }, windowsHide: true, timeout: 180000, maxBuffer: 1024 * 1024 });
const log = path.join(root, 'installed-' + script + '.log'); fs.writeFileSync(log, output.stdout + output.stderr);
const summary = JSON.parse(output.stdout.trim().split(/\r?\n/).findLast(line => line.startsWith('{"success":')));
const proofRoot = summary.directory ?? summary.root; assert.ok(proofRoot && path.resolve(proofRoot).startsWith(path.join(appRoot, '.qa') + path.sep));
const proof = JSON.parse(fs.readFileSync(path.join(proofRoot, 'result.json'), 'utf8'));
assert.equal(proof.success, true); assert.equal(proof.version, version); assert.equal(fs.realpathSync.native(proof.appRoot), installedRoot);
assert.equal(proof.checks.length, script === 'verify-file-results-ui.mjs' ? 16 : script === 'verify-local-files.mjs' ? 9 : 3); assert.deepEqual(proof.errors, []);
assert.equal(proof.realModelRequests, 0); proofs.push({ script, proof, log, sha256: hash(fs.readFileSync(log)) });
}
installedUI = { success: true, version, installedRoot, packagedSource, proofs, realModelRequests: 0 };
fs.writeFileSync('.qa/existing-results-installed-ui.json', JSON.stringify(installedUI, null, 2)); record(stage, installedUI);
}
stage = 'actual uninstall closes only the idle owned host and preserves user data';
const uninstallSnapshot = snapshotPersistentData(dataRoot), uninstallLog = path.join(root, 'uninstall.log');
await run(path.join(installRoot, 'unins000.exe'), ['/VERYSILENT', '/SUPPRESSMSGBOXES', '/NORESTART', '/LOG=' + uninstallLog], { windowsHide: true, timeout: 180000, env });
assert.equal(observeWindowsProcess(restarted.pid), null); assert.deepEqual(snapshotPersistentData(dataRoot), uninstallSnapshot); assert.equal(fs.existsSync(path.join(installRoot, 'AgentWorkbench.exe')), false); assert.equal(fs.existsSync(path.join(installRoot, 'current.json')), false);
record(stage, { log: uninstallLog, originalDataRoot: dataRoot, data: uninstallSnapshot });
report = { success: true, version, root, installRoot, dataRoot, port, appId, packagedSource, results, installedUI, realModelRequests: 0, scope: 'Actual isolated user-level Windows installers and shipped Electron/Node runtimes; own credentials and HTTP fixture only. QA appId, corruption, pointer-fault and crash fixtures explicitly recorded.' };
} catch (error) { report = { success: false, version, root, installRoot, dataRoot, port, stage, error: error.stack, results, realModelRequests: 0 }; throw error; }
finally {
releaseRequest?.(); await application?.close().catch(() => {});
if (controller) { try { const status = await controller.status(); if (!status.desktopWindows.count) await controller.stop(); } catch {} }
if (ownedModel) { ownedModel.closeAllConnections(); await new Promise(resolve => ownedModel.close(resolve)); }
fs.writeFileSync(path.join(root, 'result.json'), JSON.stringify(report, null, 2)); fs.writeFileSync('.qa/desktop-install-location.json', JSON.stringify({ root, result: path.join(root, 'result.json') })); console.log('EVIDENCE ' + root);
}
@@ -0,0 +1,15 @@
import fs from 'node:fs';
import assert from 'node:assert/strict';
const root='.qa/working-memory-u/native',origin='http://127.0.0.1:4318';
const bootstrap=await(await fetch(origin+'/api/bootstrap')).json();
const health=await(await fetch(origin+'/api/health')).json();
const status=await(await fetch(origin+'/api/host/status',{headers:{'X-Workbench-Token':bootstrap.token}})).json();
assert.equal(health.version,'1.24.8');assert.equal(health.pid,36552);assert.equal(status.desktopWindows.count,1);assert.equal(status.activity.active,false);
const initial=fs.readFileSync(root+'/after.txt','utf8'),center=fs.readFileSync(root+'/model-center.txt','utf8');
assert.match(initial,/release=1\.24\.8/);assert.match(initial,/v1\.24\.8/);assert.match(center,/高性能/);
for(const file of['after.jpg','model-center.jpg'])assert.equal(fs.readFileSync(root+'/'+file).subarray(0,3).toString('hex'),'ffd8ff');
const result={success:true,version:health.version,pid:health.pid,desktopWindows:status.desktopWindows.count,runtimeRoot:bootstrap.runtimeRoot,
observed:['Actual formal installed launcher opens unique 1.24.8 native window','Connected UI and original high-performance pool visible','No model dispatch, settings save, task start or original history mutation'],
screenshots:['after.jpg','model-center.jpg'],realModelRequests:0,
scope:'Computer Use observation from the actual installed original entry, not Electron fixture. Original R budget behavior is separately verified by write-blocked production web UI. State reconciliation follows after native review.'};
fs.writeFileSync(root+'/result.json',JSON.stringify(result,null,2)+'\n',{flag:'wx'});console.log(JSON.stringify(result));
@@ -0,0 +1,96 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import {createHash} from 'node:crypto';
import {execFileSync} from 'node:child_process';
import {verifyPlanEvidence} from '../src/core/context/request-plan.mjs';
import {assertToolPairs} from '../tests/helpers.mjs';
if(process.argv.includes('--help')){console.log('node scripts/verify-working-memory-u.mjs [--index] — offline sealed bytes, actual request coverage/provenance and retained state. No model, installer or task replay.');process.exit(0);}
assert.ok(process.argv.length===2||process.argv.length===3&&process.argv[2]==='--index');
const root=path.resolve('docs/working-memory-u-evidence'),index=process.argv.includes('--index');
const sha=b=>createHash('sha256').update(b).digest('hex'),read=r=>JSON.parse(fs.readFileSync(path.join(root,r),'utf8').replace(/^\uFEFF/,''));
const manifest=read('manifest.json'),names=new Set();let bytes=0,indexBytes=0;
for(const e of manifest.entries){
assert.equal(names.has(e.path),false);names.add(e.path);const p=path.resolve(root,e.path);assert.ok(p.startsWith(root+path.sep));
const b=fs.readFileSync(p);assert.equal(b.length,e.bytes,e.path);assert.equal(sha(b),e.sha256,e.path);bytes+=b.length;
if(e.path.endsWith('.png'))assert.equal(b.subarray(0,8).toString('hex'),'89504e470d0a1a0a');
if(/\.jpe?g$/.test(e.path))assert.equal(b.subarray(0,3).toString('hex'),'ffd8ff');
}
const walk=d=>fs.readdirSync(d,{withFileTypes:true}).flatMap(e=>{const p=path.join(d,e.name);assert.equal(fs.lstatSync(p).isSymbolicLink(),false);return e.isDirectory()?walk(p):[path.relative(root,p).replaceAll('\\','/')];});
assert.deepEqual(walk(root).filter(p=>p!=='manifest.json').sort(),[...names].sort());
assert.equal(manifest.count,names.size);assert.equal(manifest.bytes,bytes);assert.equal(manifest.realModelRequests,0);
const freeze=read('receipts/release/product-freeze.json'),identity=read('release-identity.json');
assert.equal(identity.sourceCommit,manifest.sourceCommit);assert.equal(freeze.sourceCommit,manifest.sourceCommit);assert.equal(identity.version,'1.24.8');
assert.equal(freeze.files.length,564);assert.equal(freeze.compiled.length,22);
for(const v of freeze.compiled)assert.equal(sha(fs.readFileSync(path.join(root,'compiled',v.path))),v.sha256);
for(const v of freeze.files.filter(v=>names.has('source-bytes/'+v.path)))assert.equal(sha(fs.readFileSync(path.join(root,'source-bytes',v.path))),v.sha256);
const build=read('validation/rebuild/result.json');assert.equal(build.success,true);assert.equal(build.sourceCommit,manifest.sourceCommit);
assert.equal(build.inputCount,569);assert.equal(build.compiled.length,22);assert.deepEqual(build.mismatches,[]);
for(const v of freeze.files)assert.equal(build.inputs.find(b=>b.path===v.path)?.sha256,v.sha256);
for(const v of build.compiled)assert.deepEqual(v.actual,v.expected);
assert.equal(read('receipts/release/extra-example-inputs.json').extra.length,5);
for(const mode of ['archives','memory','install','portable-final']){const r=read('receipts/release/'+mode+'.json');assert.equal(r.success,true,mode);assert.equal(r.sourceCommit,manifest.sourceCommit);}
for(const mode of ['portable','portable-recheck'])assert.equal(read('receipts/release/'+mode+'.json').success,false,'Preserve original verifier version-list failures');
for(const name of ['archives','portable'])assert.equal(read('validation/'+name+'.json').success,true);
const install=read('validation/install/result.json');assert.equal(install.success,true);assert.equal(install.version,'1.24.8');assert.equal(install.results.length,12);assert.ok(install.results.every(v=>v.passed));
for(const [name,count]of [['installed-results',16],['installed-files',9]]){const r=read('validation/'+name+'/result.json');assert.equal(r.success,true);assert.equal(r.checks.length,count);assert.deepEqual(r.errors,[]);}
const tap=fs.readFileSync(path.join(root,'receipts/final-core.tap'),'utf8');assert.match(tap,/pass 114\b/);assert.match(tap,/fail 0\b/);
const before=read('receipts/replay-before.json'),after=read('receipts/replay-after.json');assert.equal(before.covered,1643);assert.equal(after.covered,2584);assert.deepEqual(after.candidateRanges,[[0,2584]]);assert.equal(after.sourceSha256,before.sourceSha256);
const reference=read('original-t-reference.json'),oldRoot=path.resolve('docs/live-delivery-t-evidence');
assert.equal(sha(fs.readFileSync(reference.path)),reference.sha256);const oldManifest=JSON.parse(fs.readFileSync(reference.path));
for(const e of oldManifest.files){const p=path.resolve(oldRoot,e.path);assert.ok(p.startsWith(oldRoot+path.sep));const b=fs.readFileSync(p);assert.equal(sha(b),e.sha256);assert.equal(b.length,e.bytes);}
const oldRead=r=>JSON.parse(fs.readFileSync(path.join(oldRoot,'run',r),'utf8'));
const original=oldRead('node/export.json'),state=oldRead('node/session.json').execution,oldArtifacts=oldRead('analysis/artifact-index.json').artifacts;
function makeStore(core,load){return{core,owned(kind,id,sid){const v=core[kind]?.get(id);assert.ok(v,kind+':'+id);assert.equal(v.sessionId,sid);return v;},artifactStore:{read(a){const b=load(a);assert.equal(sha(b),a.sha256);return b.toString('utf8');}}};}
const oldCore={artifact:new Map(oldArtifacts.map(a=>[a.id,a])),tool:new Map(oldRead('analysis/owned-tool-rows.json').map(r=>{const v=JSON.parse(r.payload);return[v.id,v];})),run:new Map([[state.run.id,state.run]]),task:new Map([[state.task.id,state.task]])};
const oldLoad=a=>fs.readFileSync(path.join(oldRoot,'run',a.capturedPath));
for(const p of state.contextPlans)verifyPlanEvidence(makeStore(oldCore,oldLoad),original.session,p);
assert.equal(state.contextPlans.length,8);assert.equal(read('receipts/history-result.json').originalRequestsRewritten,0);
const fixture=read('original-t-fixture.json'),files=fixture.files.filter(f=>['test/expense.test.mjs','src/amount.mjs','src/summary.mjs','src/report.mjs'].includes(f.path));
function coverage(body){
assertToolPairs(body.messages);assert.ok(body.messages[0].content.includes(JSON.stringify(fixture.goal)));
for(const file of files){assert.equal(sha(file.content),file.sha256);const positions=new Set();
for(const m of body.messages){const spans=[];
if(m.role==='tool'){const v=JSON.parse(m.content);if(v.path===file.path&&typeof v.content==='string')spans.push({offset:v.offset??0,content:v.content});}
if(m.role==='system'){let v;try{v=JSON.parse(m.content.split('\n').at(-1));}catch{}for(const e of v?.data?.entries??[])if(e.observation?.path===file.path)spans.push({offset:e.observation.offset??0,content:e.content});}
for(const s of spans){assert.equal(s.content,file.content.slice(s.offset,s.offset+s.content.length));for(let i=s.offset;i<s.offset+s.content.length;i++)positions.add(i);}
}assert.equal(positions.size,file.content.length,file.path);
}
const marker='当前工程执行依据(每次请求重新核对,非操作授权):\n';const facts=JSON.parse(body.messages[0].content.split(marker)[1].split('\n')[0]);
assert.equal(facts.stage,'checks_need_repair');assert.equal(facts.has_applied_changes,false);assert.equal(facts.latest_check.current_source,true);
assert.equal(facts.latest_check.results[0].tests.failed,9);assert.equal(facts.latest_check.results[1].status,'passed');
return facts;
}
function verifyFacts(facts,execution,store){
const job=execution.checks.find(j=>j.id===facts.latest_check.id),plan=execution.plans.find(p=>p.id===facts.check_plan.id);
assert.ok(job&&plan);assert.equal(job.planId,plan.id);assert.equal(job.status,facts.latest_check.status);assert.equal(plan.sourceFingerprint,facts.source_fingerprint);
for(const f of facts.latest_check.results){const r=job.results.find(v=>v.name===f.name);assert.ok(r);assert.equal(r.status,f.status);assert.deepEqual(r.tests??null,f.tests);assert.equal(r.logArtifactId,f.log_artifact_id);const a=store.owned('artifact',f.log_artifact_id,job.sessionId);assert.equal(a.sha256,f.log_sha256);store.artifactStore.read(a);}
}
for(const number of [7,8]){
const prefix='receipts/wire-'+number+'-final/',plan=read(prefix+'record.json'),core={...oldCore,artifact:new Map(oldCore.artifact)};
const mapping=[['requestArtifactId','model-request'],['artifactId','context-plan'],['workingSetArtifactId','context-working-set'],['latestToolsArtifactId','context-latest-tools'],['historyIndexArtifactId','context-history-index']];
for(const [field,kind]of mapping){const id=plan[field];if(!id)continue;if(!fs.existsSync(path.join(root,prefix,id+'.json'))){assert.equal(core.artifact.get(id)?.kind,kind);continue;}const b=fs.readFileSync(path.join(root,prefix,id+'.json'));core.artifact.set(id,{id,kind,sha256:sha(b),sessionId:plan.sessionId,projectId:plan.projectId,taskId:plan.taskId,runId:plan.runId,sealedPath:prefix+id+'.json'});}
const wireStore=makeStore(core,a=>a.sealedPath?fs.readFileSync(path.join(root,a.sealedPath)):oldLoad(a));verifyPlanEvidence(wireStore,original.session,plan);
assert.deepEqual(read(prefix+'request.json'),read(prefix+plan.requestArtifactId+'.json'));verifyFacts(coverage(read(prefix+'request.json')),state,wireStore);
assert.ok(plan.estimatedInputTokens<=12352);assert.equal(plan.budget.contextLimit,16000);assert.equal(plan.budget.outputReservation,2048);assert.equal(plan.budget.safetyTokens,1600);
}
let fixturePlans=0;
for(const name of ['source-memory','portable-memory','installed-memory']){
const prefix='validation/'+name+'/',r=read(prefix+'result.json'),e=read(prefix+'export.json'),bodies=read(prefix+'requests.json');
assert.equal(r.success,true);assert.equal(r.version,'1.24.8');assert.equal(r.requests,7);assert.equal(r.checks.length,3);assert.deepEqual(r.errors,[]);
assert.equal(r.originalSourceUnchanged,true);assert.equal(r.originalNineTestsFailed,true);assert.equal(r.realModelDeliveryPassed,false);assert.equal(r.realModelRequests,0);
const core={artifact:new Map(e.execution.artifacts.map(a=>[a.id,a])),tool:new Map(),run:new Map(),task:new Map()};
for(const row of read(prefix+'owned-records.json'))if(core[row.kind]){const v=JSON.parse(row.payload);core[row.kind].set(v.id,v);}
const store=makeStore(core,a=>fs.readFileSync(path.join(root,prefix,'artifacts',a.relative)));
for(const p of e.execution.contextPlans){verifyPlanEvidence(store,e.session,p);assert.ok(p.estimatedInputTokens<=12352);fixturePlans++;}
assert.equal(e.execution.contextPlans.length,7);for(const body of bodies.slice(5))verifyFacts(coverage(body),e.execution,store);assert.equal(e.session.changes.length,0);
}
assert.equal(read('receipts/formal-release/before.json').success,false);assert.equal(read('receipts/formal-release/before-recheck.json').success,true);
const initial=read('receipts/production-before.json'),pre=read('receipts/formal-release/private-before.json');
function same(a,b){for(const key of ['pid','hasKey','configSha256','projectsSha256','sessionsSha256','eventCursor','exports','persistent','modelCenterSha256'])assert.deepEqual(b[key],a[key],key);assert.deepEqual(b.database.tables,a.database.tables);assert.deepEqual(b.database.sessionIds,a.database.sessionIds);}
same(initial,pre);
for(const mode of ['install','final']){const r=read('receipts/formal-release/'+mode+'.json');assert.equal(r.success,true);assert.equal(r.version,'1.24.8');assert.equal(r.pid,36552);assert.equal(r.inspectorClosed,true);same(pre,read('receipts/formal-release/'+mode+'-private-after.json'));}
const browser=read('receipts/release/browser-review/result.json');assert.equal(browser.success,true);assert.equal(browser.views.length,2);assert.deepEqual(browser.errors,[]);assert.deepEqual(browser.rejectedWrites,[]);
assert.equal(read('receipts/native/result.json').success,true);
if(index)for(const relative of [...names,'manifest.json']){const b=fs.readFileSync(path.join(root,relative)),blob=execFileSync('git',['cat-file','blob',':docs/working-memory-u-evidence/'+relative],{maxBuffer:Math.max(1024*1024,b.length+1024)});assert.deepEqual(blob,b,relative);indexBytes+=blob.length;}
console.log(JSON.stringify({success:true,version:identity.version,sourceCommit:manifest.sourceCommit,count:names.size,bytes,manifestSha256:sha(fs.readFileSync(path.join(root,'manifest.json'))),independentInputs:569,compiled:22,relatedTests:114,fixturePlans,historicalPlans:8,reconstructedPlans:2,realModelRequests:0,realDeliveryPassed:false,purgeBenefitMeasured:false,formalPid:36552,originalProjects:pre.projects,originalSessions:pre.database.sessionIds.length,...(index?{indexFiles:names.size+1,indexBytes}:{}),scope:'Read-only actual sealed bytes, typed request coverage and provenance; no configured-model calls or original driver replay.'}));
@@ -0,0 +1,182 @@
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import { randomUUID, createHash } from 'node:crypto';
import { spawn, execFileSync } from 'node:child_process';
import net from 'node:net';
import { createResearchSamples } from '../scripts/research-fixtures.mjs';
import { verifyBrowserApi } from '../scripts/verify-browser.mjs';
import { verifyControlledApi } from './working-memory-u-controlled-release.mjs';
import { gitEnvironment } from '../src/core/git-process.mjs';
if (process.argv.includes('--help')) { console.log('node scripts/verify-release.mjs [--native-engines] - validate the latest immutable portable release in an isolated host.'); process.exit(0); }
if (process.argv.slice(2).some(value => value !== '--native-engines')) throw new Error('Unsupported argument; use --help.');
const release = JSON.parse(fs.readFileSync('releases/latest.json', 'utf8'));
const appRoot = release.portableRoot;
const manifest = JSON.parse(fs.readFileSync(path.join(appRoot, 'MANIFEST.json'), 'utf8'));
for (const file of manifest.files) {
const absolute = path.resolve(appRoot, file.path);
assert.ok(absolute.startsWith(appRoot + path.sep));
const bytes = fs.readFileSync(absolute);
assert.equal(bytes.length, file.bytes);
assert.equal(createHash('sha256').update(bytes).digest('hex'), file.sha256, file.path);
}
const data = path.resolve('.qa', 'release-' + randomUUID());
fs.mkdirSync(data, { recursive: true });
const portProbe = net.createServer();
await new Promise((resolve, reject) => { portProbe.once('error', reject); portProbe.listen(0, '127.0.0.1', resolve); });
const port = portProbe.address().port;
await new Promise(resolve => portProbe.close(resolve));
const env = { ...gitEnvironment(), ...Object.fromEntries(['AGENT_WORKBENCH_DEEPSEEK_ROOT', 'AGENT_WORKBENCH_PURGE_ROOT'].filter(name => process.env[name]).map(name => [name, process.env[name]])), AGENT_WORKBENCH_DATA_DIR: data, AGENT_WORKBENCH_PORT: String(port) };
delete env.AGENT_WORKBENCH_API_KEY;
for (const name of Object.keys(env)) if (name.toLowerCase() === 'path') delete env[name];
const windowsRoot = process.env.SystemRoot || 'C:\\Windows';
env.PATH = [windowsRoot, path.join(windowsRoot, 'System32'), path.join(windowsRoot, 'System32', 'WindowsPowerShell', 'v1.0')].join(path.delimiter);
let externalGit = null;
if (['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version)) {
// The controlled project requires external Git. Preserve its observed binary
// directory while keeping system Node/npm unavailable to the packaged host.
const binary = fs.realpathSync.native(execFileSync('where.exe', ['git.exe'], { env: gitEnvironment(), encoding: 'utf8', windowsHide: true, timeout: 10000 }).trim().split(/\r?\n/)[0]);
const directory = path.dirname(binary);
assert.equal(fs.existsSync(path.join(directory, 'node.exe')), false); assert.equal(fs.existsSync(path.join(directory, 'npm.cmd')), false);
env.PATH = directory + path.delimiter + env.PATH;
externalGit = { path: binary, version: execFileSync('git', ['--version'], { env, windowsHide: true, encoding: 'utf8', timeout: 10000 }).trim(),
sha256: createHash('sha256').update(fs.readFileSync(binary)).digest('hex') };
}
function runPowerShell(script, extra = []) {
return new Promise((resolve, reject) => {
const child = spawn('powershell.exe', ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', path.join(appRoot, 'scripts', script), '-Port', String(port), ...extra], { windowsHide: true, env, stdio: ['ignore', 'pipe', 'pipe'] });
let output = '', errors = '';
child.stdout.on('data', bytes => { output += bytes.toString('utf8'); });
child.stderr.on('data', bytes => { errors += bytes.toString('utf8'); });
const timeout = setTimeout(() => { child.kill(); reject(new Error('Launcher did not exit in time.')); }, 20000);
child.on('error', error => { clearTimeout(timeout); reject(error); });
// Windows descendants can inherit pipe handles after the launcher exits.
// Wait for the launcher itself, then close this test's readers.
child.on('exit', code => {
clearTimeout(timeout); child.stdout.destroy(); child.stderr.destroy();
if (code === 0) resolve(output); else reject(new Error('Launcher failed: ' + errors));
});
});
}
const launch = () => runPowerShell('Start-Workbench.ps1', ['-NoBrowser']);
const stop = () => runPowerShell('Stop-Workbench.ps1');
const url = 'http://127.0.0.1:' + port;
const until = async (predicate, timeoutMs = 10000) => {
const deadline = Date.now() + timeoutMs;
while (!(await predicate())) {
if (Date.now() > deadline) throw new Error('Release state timeout');
await new Promise(resolve => setTimeout(resolve, 50));
}
};
let started = false;
try {
console.log((await launch()).trim());
const firstInfo = JSON.parse(fs.readFileSync(path.join(data, 'service-info.json'), 'utf8'));
assert.equal(path.resolve(firstInfo.appRoot), path.resolve(appRoot));
const health = await (await fetch(url + '/api/health')).json();
assert.equal(health.pid, firstInfo.pid, 'The test must own the launched service.');
started = true;
const bootstrap = await (await fetch(url + '/api/bootstrap')).json();
const api = async (route, input) => {
const response = await fetch(url + '/api' + route, { method: input === undefined ? 'GET' : 'POST', headers: { 'Content-Type': 'application/json', 'X-Workbench-Token': bootstrap.token, Connection: 'close' },
...(input === undefined ? {} : { body: JSON.stringify(input) }) });
const result = await response.json(); assert.ok(response.ok, result.error); return result;
};
assert.equal(bootstrap.version, manifest.version); assert.equal(bootstrap.config.mode, 'demo');
console.log((await launch()).trim());
assert.equal(JSON.parse(fs.readFileSync(path.join(data, 'service-info.json'), 'utf8')).pid, firstInfo.pid);
const example = bootstrap.projects.find(project => project.id === bootstrap.exampleProjectId);
if (['1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version)) {
assert.equal(path.resolve(example.root).toLowerCase(), path.join(data, 'projects', 'starter-project').toLowerCase());
const compareTemplate = relative => { for (const entry of fs.readdirSync(path.join(appRoot, 'examples/starter-project', relative), { withFileTypes: true })) {
const next = path.join(relative, entry.name); if (entry.isDirectory()) compareTemplate(next);
else assert.deepEqual(fs.readFileSync(path.join(example.root, next)), fs.readFileSync(path.join(appRoot, 'examples/starter-project', next)), next);
} }; compareTemplate('');
} else assert.ok(example.root.toLowerCase().startsWith(appRoot.toLowerCase() + path.sep));
const session = await api('/sessions', { projectId: example.id });
await api('/sessions/' + session.id + '/messages', { content: '便携包工具与随附 Node 验证' });
let current;
await until(async () => { current = await api('/sessions/' + session.id); return current.status === 'awaiting_approval'; });
assert.equal(current.approvals[0].command, 'node --version');
assert.equal(fs.existsSync(path.join(example.root, 'WORKBENCH-NOTES.md')), false);
await api('/sessions/' + session.id + '/approvals/' + current.approvals[0].id, { allow: true });
await until(async () => { current = await api('/sessions/' + session.id); return current.status === 'needs_review'; });
const command = current.events.find(event => event.tool === 'run_command');
assert.equal(command.phase, 'completed'); assert.match(command.output, new RegExp(manifest.nodeVersion.replaceAll('.', '\\.')));
for (const proposal of current.changes.filter(change => change.status === 'pending')) await api('/sessions/' + session.id + '/changes/' + proposal.id + '/reject', {});
const planned = await api('/sessions/' + session.id + '/check-plans', { names: ['test'] });
const plan = planned.execution.plans.at(-1); assert.ok(plan.checks.some(check => check.name === 'test'));
const accepted = await api('/sessions/' + session.id + '/check-jobs', { planId: plan.id }); const jobId = accepted.execution.checks.at(-1).id;
let checked; await until(async () => { checked = await api('/sessions/' + session.id + '/check-jobs/' + jobId); return !['queued', 'running'].includes(checked.status); });
assert.equal(checked.status, 'passed'); assert.equal(checked.results[0].tests.total, 4); assert.equal(checked.results[0].tests.passed, 4);
const checkLog = await api('/artifacts/' + checked.results[0].logArtifactId + '?session=' + session.id); assert.match(checkLog.content, /tests 4/);
assert.ok(fs.existsSync(path.join(appRoot, 'runtime/node_modules/npm/bin/npm-cli.js')));
const actualRea = [];
if (['1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version)) {
const installation = await api('/research/availability'); assert.equal(installation.status, 'available'); assert.equal(installation.version, '6.8.0');
assert.equal(fs.realpathSync.native(installation.packageRoot), fs.realpathSync.native(path.join(appRoot, 'runtime/node_modules/rea-agents')));
assert.equal(fs.realpathSync.native(installation.node.path), fs.realpathSync.native(path.join(appRoot, 'runtime/node.exe')));
const runtimeManifest = JSON.parse(fs.readFileSync(path.join(appRoot, 'runtime/REA-RUNTIME.json'), 'utf8'));
assert.equal(runtimeManifest.version, '6.8.0'); assert.equal(runtimeManifest.protocolVersion, '2025-03-26');
assert.equal(createHash('sha256').update(fs.readFileSync(path.join(appRoot, 'runtime', runtimeManifest.installationLock.path))).digest('hex'), runtimeManifest.installationLock.sha256);
const projectRoot = path.join(data, 'research-project'); fs.mkdirSync(projectRoot); fs.writeFileSync(path.join(projectRoot, 'README.md'), '# Owned portable REA project\n');
const samples = createResearchSamples(path.join(data, 'research-samples')), researchProject = await api('/projects', { root: projectRoot });
const researchSession = await api('/sessions', { projectId: researchProject.id }), researchRoute = '/sessions/' + researchSession.id;
for (const [operation, filename] of [['javascript', samples.asar], ['pe-imports', samples.pe], ['pe-resources', samples.pe]]) {
const registered = await api(researchRoute + '/research/targets', { path: filename, label: 'Owned portable ' + operation });
const target = registered.target, startedJob = await api(researchRoute + '/research/jobs', { targetId: target.id, operation });
let job; await until(async () => { job = await api(researchRoute + '/research/jobs/' + startedJob.job.id); return !!job.finishedAt; }, 45000);
assert.equal(job.status, 'completed', job.summary); assert.equal(job.cleanup.rootExited, true);
const response = await fetch(url + '/api' + researchRoute + '/research/jobs/' + job.id + '/download?kind=bundle', { headers: { 'X-Workbench-Token': bootstrap.token, Connection: 'close' } });
assert.equal(response.status, 200); const bytes = Buffer.from(await response.arrayBuffer());
assert.equal(createHash('sha256').update(bytes).digest('hex'), job.bundle.documentSha256);
const evidence = JSON.parse(bytes.toString('utf8')).records.find(record => record.evidence_id === job.evidenceId);
assert.equal(evidence.subject.digest.sha256, target.sha256);
if (operation === 'javascript') assert.equal(evidence.normalized_result.statistics.parsed_javascript_files, 2);
if (operation === 'pe-imports') { assert.match(JSON.stringify(evidence.normalized_result), /KERNEL32\.dll/); assert.match(JSON.stringify(evidence.normalized_result), /ExitProcess/); }
if (operation === 'pe-resources') assert.match(JSON.stringify(evidence.normalized_result), new RegExp(createHash('sha256').update('REA-DATA').digest('hex')));
const reused = await api(researchRoute + '/research/jobs', { targetId: target.id, operation });
let reuseJob; await until(async () => { reuseJob = await api(researchRoute + '/research/jobs/' + reused.job.id); return !!reuseJob.finishedAt; });
assert.equal(reuseJob.reusedFromJobId, job.id); assert.equal(reuseJob.traceArtifactId, undefined);
actualRea.push({ operation, jobId: job.id, evidenceId: job.evidenceId, targetSha256: target.sha256, bundleSha256: job.bundle.documentSha256, rootExited: true, reusedJobId: reuseJob.id });
}
assert.equal((await api(researchRoute)).execution.task.usage.requests, 0); assert.equal(fs.existsSync(samples.marker), false);
console.log('PASS actual contained REA: ASAR, PE imports and PE resources; zero target execution/model requests');
}
let actualEngine = null;
if (['1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version) && process.argv.includes('--native-engines')) {
const installation = await api('/engines/deepseek/availability'); assert.equal(installation.status, 'available', installation.message);
assert.equal(fs.realpathSync.native(installation.node.path), fs.realpathSync.native(path.join(appRoot, 'runtime/node.exe')));
const engineRoot = path.join(data, 'engine-project'); fs.mkdirSync(engineRoot); fs.writeFileSync(path.join(engineRoot, 'README.md'), '# Owned portable engine connection\n');
const project = await api('/projects', { root: engineRoot }), engineSession = await api('/sessions', { projectId: project.id }), route = '/sessions/' + engineSession.id;
const started = await api(route + '/engines/jobs', { root: installation.root, identitySha256: installation.identitySha256 });
let job; await until(async () => { job = await api(route + '/engines/jobs/' + started.job.id); return !!job.reportArtifactId; }, 30000);
assert.equal(job.status, 'completed', job.summary); assert.equal(job.reportSummary.rootExited, true); assert.equal(job.reportSummary.modelRequests, 0);
const response = await fetch(url + '/api' + route + '/engines/jobs/' + job.id + '/download', { headers: { 'X-Workbench-Token': bootstrap.token, Connection: 'close' } });
assert.equal(response.status, 200); const bytes = Buffer.from(await response.arrayBuffer());
assert.equal(createHash('sha256').update(bytes).digest('hex'), job.reportSha256);
const original = JSON.parse(bytes.toString('utf8')); assert.equal(original.owner.taskId, job.taskId); assert.equal(original.report.responses.length, 6);
assert.equal(original.report.providerRequests, 0); assert.equal(original.report.cleanup.exit.code, 0);
actualEngine = { packageVersion: installation.version, profile: installation.profile, installationSha256: installation.identitySha256,
reportSha256: job.reportSha256, rootExited: true, modelRequests: 0, nativeMethods: original.report.responses.map(value => value.method), node: installation.node };
console.log('PASS compiled portable engine adapter: actual local SDK, contained Node, six native methods and sealed original report');
}
assert.equal((await api('/research')).length, 4);
const page = await fetch(url); assert.equal(page.status, 200);
assert.match(await page.text(), /Agent Workbench/);
const actualBrowser = ['1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version) ? await verifyBrowserApi({ api, url, token: bootstrap.token, directory: data, appRoot, contained: true }) : null;
const actualControlled = ['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version) ? await verifyControlledApi({ api, url, token: bootstrap.token, directory: data, appRoot, contained: true }) : null;
console.log((await stop()).trim()); started = false;
await until(async () => { try { await fetch(url + '/api/health'); return false; } catch { return true; } });
for (const file of manifest.files) {
const bytes = fs.readFileSync(path.join(appRoot, file.path)); assert.equal(bytes.length, file.bytes);
assert.equal(createHash('sha256').update(bytes).digest('hex'), file.sha256, file.path);
}
const result = { success: true, date: new Date().toISOString(), appRoot, version: manifest.version, nodeVersion: manifest.nodeVersion,
verifiedFiles: manifest.files.length, url, reusedPid: firstInfo.pid, checks: { jobId, status: checked.status, tests: checked.results[0].tests }, actualRea, actualEngine, actualBrowser, actualControlled, externalGit,
steps: ['manifest hashes', 'bundled Node launch', 'same-service reuse', 'packaged example and static page', ...(['1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version) ? ['starter project copied to owned user data; original template bytes matched'] : []), 'explicit command consent', 'actual bundled Node version', 'actual bundled npm check without system Node/npm', 'check log artifact', ...(actualRea.length ? ['contained REA installation and Node identity', 'actual ASAR/imports/resources', 'original Bundle and target hash binding', 'verified reuse without producer replay'] : []), 'report availability', 'graceful stop', 'every original packaged file remains unchanged'], realModel: false };
fs.writeFileSync('.qa/release-validation.json', JSON.stringify(result, null, 2));
console.log(JSON.stringify(result, null, 2));
} finally { if (started) { try { await stop(); } catch {} } }
@@ -0,0 +1,182 @@
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import { randomUUID, createHash } from 'node:crypto';
import { spawn, execFileSync } from 'node:child_process';
import net from 'node:net';
import { createResearchSamples } from '../scripts/research-fixtures.mjs';
import { verifyBrowserApi } from '../scripts/verify-browser.mjs';
import { verifyControlledApi } from '../scripts/verify-controlled-release.mjs';
import { gitEnvironment } from '../src/core/git-process.mjs';
if (process.argv.includes('--help')) { console.log('node scripts/verify-release.mjs [--native-engines] - validate the latest immutable portable release in an isolated host.'); process.exit(0); }
if (process.argv.slice(2).some(value => value !== '--native-engines')) throw new Error('Unsupported argument; use --help.');
const release = JSON.parse(fs.readFileSync('releases/latest.json', 'utf8'));
const appRoot = release.portableRoot;
const manifest = JSON.parse(fs.readFileSync(path.join(appRoot, 'MANIFEST.json'), 'utf8'));
for (const file of manifest.files) {
const absolute = path.resolve(appRoot, file.path);
assert.ok(absolute.startsWith(appRoot + path.sep));
const bytes = fs.readFileSync(absolute);
assert.equal(bytes.length, file.bytes);
assert.equal(createHash('sha256').update(bytes).digest('hex'), file.sha256, file.path);
}
const data = path.resolve('.qa', 'release-' + randomUUID());
fs.mkdirSync(data, { recursive: true });
const portProbe = net.createServer();
await new Promise((resolve, reject) => { portProbe.once('error', reject); portProbe.listen(0, '127.0.0.1', resolve); });
const port = portProbe.address().port;
await new Promise(resolve => portProbe.close(resolve));
const env = { ...gitEnvironment(), ...Object.fromEntries(['AGENT_WORKBENCH_DEEPSEEK_ROOT', 'AGENT_WORKBENCH_PURGE_ROOT'].filter(name => process.env[name]).map(name => [name, process.env[name]])), AGENT_WORKBENCH_DATA_DIR: data, AGENT_WORKBENCH_PORT: String(port) };
delete env.AGENT_WORKBENCH_API_KEY;
for (const name of Object.keys(env)) if (name.toLowerCase() === 'path') delete env[name];
const windowsRoot = process.env.SystemRoot || 'C:\\Windows';
env.PATH = [windowsRoot, path.join(windowsRoot, 'System32'), path.join(windowsRoot, 'System32', 'WindowsPowerShell', 'v1.0')].join(path.delimiter);
let externalGit = null;
if (['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version)) {
// The controlled project requires external Git. Preserve its observed binary
// directory while keeping system Node/npm unavailable to the packaged host.
const binary = fs.realpathSync.native(execFileSync('where.exe', ['git.exe'], { env: gitEnvironment(), encoding: 'utf8', windowsHide: true, timeout: 10000 }).trim().split(/\r?\n/)[0]);
const directory = path.dirname(binary);
assert.equal(fs.existsSync(path.join(directory, 'node.exe')), false); assert.equal(fs.existsSync(path.join(directory, 'npm.cmd')), false);
env.PATH = directory + path.delimiter + env.PATH;
externalGit = { path: binary, version: execFileSync('git', ['--version'], { env, windowsHide: true, encoding: 'utf8', timeout: 10000 }).trim(),
sha256: createHash('sha256').update(fs.readFileSync(binary)).digest('hex') };
}
function runPowerShell(script, extra = []) {
return new Promise((resolve, reject) => {
const child = spawn('powershell.exe', ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', path.join(appRoot, 'scripts', script), '-Port', String(port), ...extra], { windowsHide: true, env, stdio: ['ignore', 'pipe', 'pipe'] });
let output = '', errors = '';
child.stdout.on('data', bytes => { output += bytes.toString('utf8'); });
child.stderr.on('data', bytes => { errors += bytes.toString('utf8'); });
const timeout = setTimeout(() => { child.kill(); reject(new Error('Launcher did not exit in time.')); }, 20000);
child.on('error', error => { clearTimeout(timeout); reject(error); });
// Windows descendants can inherit pipe handles after the launcher exits.
// Wait for the launcher itself, then close this test's readers.
child.on('exit', code => {
clearTimeout(timeout); child.stdout.destroy(); child.stderr.destroy();
if (code === 0) resolve(output); else reject(new Error('Launcher failed: ' + errors));
});
});
}
const launch = () => runPowerShell('Start-Workbench.ps1', ['-NoBrowser']);
const stop = () => runPowerShell('Stop-Workbench.ps1');
const url = 'http://127.0.0.1:' + port;
const until = async (predicate, timeoutMs = 10000) => {
const deadline = Date.now() + timeoutMs;
while (!(await predicate())) {
if (Date.now() > deadline) throw new Error('Release state timeout');
await new Promise(resolve => setTimeout(resolve, 50));
}
};
let started = false;
try {
console.log((await launch()).trim());
const firstInfo = JSON.parse(fs.readFileSync(path.join(data, 'service-info.json'), 'utf8'));
assert.equal(path.resolve(firstInfo.appRoot), path.resolve(appRoot));
const health = await (await fetch(url + '/api/health')).json();
assert.equal(health.pid, firstInfo.pid, 'The test must own the launched service.');
started = true;
const bootstrap = await (await fetch(url + '/api/bootstrap')).json();
const api = async (route, input) => {
const response = await fetch(url + '/api' + route, { method: input === undefined ? 'GET' : 'POST', headers: { 'Content-Type': 'application/json', 'X-Workbench-Token': bootstrap.token, Connection: 'close' },
...(input === undefined ? {} : { body: JSON.stringify(input) }) });
const result = await response.json(); assert.ok(response.ok, result.error); return result;
};
assert.equal(bootstrap.version, manifest.version); assert.equal(bootstrap.config.mode, 'demo');
console.log((await launch()).trim());
assert.equal(JSON.parse(fs.readFileSync(path.join(data, 'service-info.json'), 'utf8')).pid, firstInfo.pid);
const example = bootstrap.projects.find(project => project.id === bootstrap.exampleProjectId);
if (['1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version)) {
assert.equal(path.resolve(example.root).toLowerCase(), path.join(data, 'projects', 'starter-project').toLowerCase());
const compareTemplate = relative => { for (const entry of fs.readdirSync(path.join(appRoot, 'examples/starter-project', relative), { withFileTypes: true })) {
const next = path.join(relative, entry.name); if (entry.isDirectory()) compareTemplate(next);
else assert.deepEqual(fs.readFileSync(path.join(example.root, next)), fs.readFileSync(path.join(appRoot, 'examples/starter-project', next)), next);
} }; compareTemplate('');
} else assert.ok(example.root.toLowerCase().startsWith(appRoot.toLowerCase() + path.sep));
const session = await api('/sessions', { projectId: example.id });
await api('/sessions/' + session.id + '/messages', { content: '便携包工具与随附 Node 验证' });
let current;
await until(async () => { current = await api('/sessions/' + session.id); return current.status === 'awaiting_approval'; });
assert.equal(current.approvals[0].command, 'node --version');
assert.equal(fs.existsSync(path.join(example.root, 'WORKBENCH-NOTES.md')), false);
await api('/sessions/' + session.id + '/approvals/' + current.approvals[0].id, { allow: true });
await until(async () => { current = await api('/sessions/' + session.id); return current.status === 'needs_review'; });
const command = current.events.find(event => event.tool === 'run_command');
assert.equal(command.phase, 'completed'); assert.match(command.output, new RegExp(manifest.nodeVersion.replaceAll('.', '\\.')));
for (const proposal of current.changes.filter(change => change.status === 'pending')) await api('/sessions/' + session.id + '/changes/' + proposal.id + '/reject', {});
const planned = await api('/sessions/' + session.id + '/check-plans', { names: ['test'] });
const plan = planned.execution.plans.at(-1); assert.ok(plan.checks.some(check => check.name === 'test'));
const accepted = await api('/sessions/' + session.id + '/check-jobs', { planId: plan.id }); const jobId = accepted.execution.checks.at(-1).id;
let checked; await until(async () => { checked = await api('/sessions/' + session.id + '/check-jobs/' + jobId); return !['queued', 'running'].includes(checked.status); });
assert.equal(checked.status, 'passed'); assert.equal(checked.results[0].tests.total, 4); assert.equal(checked.results[0].tests.passed, 4);
const checkLog = await api('/artifacts/' + checked.results[0].logArtifactId + '?session=' + session.id); assert.match(checkLog.content, /tests 4/);
assert.ok(fs.existsSync(path.join(appRoot, 'runtime/node_modules/npm/bin/npm-cli.js')));
const actualRea = [];
if (['1.8.0', '1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version)) {
const installation = await api('/research/availability'); assert.equal(installation.status, 'available'); assert.equal(installation.version, '6.8.0');
assert.equal(fs.realpathSync.native(installation.packageRoot), fs.realpathSync.native(path.join(appRoot, 'runtime/node_modules/rea-agents')));
assert.equal(fs.realpathSync.native(installation.node.path), fs.realpathSync.native(path.join(appRoot, 'runtime/node.exe')));
const runtimeManifest = JSON.parse(fs.readFileSync(path.join(appRoot, 'runtime/REA-RUNTIME.json'), 'utf8'));
assert.equal(runtimeManifest.version, '6.8.0'); assert.equal(runtimeManifest.protocolVersion, '2025-03-26');
assert.equal(createHash('sha256').update(fs.readFileSync(path.join(appRoot, 'runtime', runtimeManifest.installationLock.path))).digest('hex'), runtimeManifest.installationLock.sha256);
const projectRoot = path.join(data, 'research-project'); fs.mkdirSync(projectRoot); fs.writeFileSync(path.join(projectRoot, 'README.md'), '# Owned portable REA project\n');
const samples = createResearchSamples(path.join(data, 'research-samples')), researchProject = await api('/projects', { root: projectRoot });
const researchSession = await api('/sessions', { projectId: researchProject.id }), researchRoute = '/sessions/' + researchSession.id;
for (const [operation, filename] of [['javascript', samples.asar], ['pe-imports', samples.pe], ['pe-resources', samples.pe]]) {
const registered = await api(researchRoute + '/research/targets', { path: filename, label: 'Owned portable ' + operation });
const target = registered.target, startedJob = await api(researchRoute + '/research/jobs', { targetId: target.id, operation });
let job; await until(async () => { job = await api(researchRoute + '/research/jobs/' + startedJob.job.id); return !!job.finishedAt; }, 45000);
assert.equal(job.status, 'completed', job.summary); assert.equal(job.cleanup.rootExited, true);
const response = await fetch(url + '/api' + researchRoute + '/research/jobs/' + job.id + '/download?kind=bundle', { headers: { 'X-Workbench-Token': bootstrap.token, Connection: 'close' } });
assert.equal(response.status, 200); const bytes = Buffer.from(await response.arrayBuffer());
assert.equal(createHash('sha256').update(bytes).digest('hex'), job.bundle.documentSha256);
const evidence = JSON.parse(bytes.toString('utf8')).records.find(record => record.evidence_id === job.evidenceId);
assert.equal(evidence.subject.digest.sha256, target.sha256);
if (operation === 'javascript') assert.equal(evidence.normalized_result.statistics.parsed_javascript_files, 2);
if (operation === 'pe-imports') { assert.match(JSON.stringify(evidence.normalized_result), /KERNEL32\.dll/); assert.match(JSON.stringify(evidence.normalized_result), /ExitProcess/); }
if (operation === 'pe-resources') assert.match(JSON.stringify(evidence.normalized_result), new RegExp(createHash('sha256').update('REA-DATA').digest('hex')));
const reused = await api(researchRoute + '/research/jobs', { targetId: target.id, operation });
let reuseJob; await until(async () => { reuseJob = await api(researchRoute + '/research/jobs/' + reused.job.id); return !!reuseJob.finishedAt; });
assert.equal(reuseJob.reusedFromJobId, job.id); assert.equal(reuseJob.traceArtifactId, undefined);
actualRea.push({ operation, jobId: job.id, evidenceId: job.evidenceId, targetSha256: target.sha256, bundleSha256: job.bundle.documentSha256, rootExited: true, reusedJobId: reuseJob.id });
}
assert.equal((await api(researchRoute)).execution.task.usage.requests, 0); assert.equal(fs.existsSync(samples.marker), false);
console.log('PASS actual contained REA: ASAR, PE imports and PE resources; zero target execution/model requests');
}
let actualEngine = null;
if (['1.9.0', '1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version) && process.argv.includes('--native-engines')) {
const installation = await api('/engines/deepseek/availability'); assert.equal(installation.status, 'available', installation.message);
assert.equal(fs.realpathSync.native(installation.node.path), fs.realpathSync.native(path.join(appRoot, 'runtime/node.exe')));
const engineRoot = path.join(data, 'engine-project'); fs.mkdirSync(engineRoot); fs.writeFileSync(path.join(engineRoot, 'README.md'), '# Owned portable engine connection\n');
const project = await api('/projects', { root: engineRoot }), engineSession = await api('/sessions', { projectId: project.id }), route = '/sessions/' + engineSession.id;
const started = await api(route + '/engines/jobs', { root: installation.root, identitySha256: installation.identitySha256 });
let job; await until(async () => { job = await api(route + '/engines/jobs/' + started.job.id); return !!job.reportArtifactId; }, 30000);
assert.equal(job.status, 'completed', job.summary); assert.equal(job.reportSummary.rootExited, true); assert.equal(job.reportSummary.modelRequests, 0);
const response = await fetch(url + '/api' + route + '/engines/jobs/' + job.id + '/download', { headers: { 'X-Workbench-Token': bootstrap.token, Connection: 'close' } });
assert.equal(response.status, 200); const bytes = Buffer.from(await response.arrayBuffer());
assert.equal(createHash('sha256').update(bytes).digest('hex'), job.reportSha256);
const original = JSON.parse(bytes.toString('utf8')); assert.equal(original.owner.taskId, job.taskId); assert.equal(original.report.responses.length, 6);
assert.equal(original.report.providerRequests, 0); assert.equal(original.report.cleanup.exit.code, 0);
actualEngine = { packageVersion: installation.version, profile: installation.profile, installationSha256: installation.identitySha256,
reportSha256: job.reportSha256, rootExited: true, modelRequests: 0, nativeMethods: original.report.responses.map(value => value.method), node: installation.node };
console.log('PASS compiled portable engine adapter: actual local SDK, contained Node, six native methods and sealed original report');
}
assert.equal((await api('/research')).length, 4);
const page = await fetch(url); assert.equal(page.status, 200);
assert.match(await page.text(), /Agent Workbench/);
const actualBrowser = ['1.10.0', '1.10.1', '1.11.0', '1.12.0', '1.12.1', '1.13.0', '1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version) ? await verifyBrowserApi({ api, url, token: bootstrap.token, directory: data, appRoot, contained: true }) : null;
const actualControlled = ['1.14.0', '1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version) ? await verifyControlledApi({ api, url, token: bootstrap.token, directory: data, appRoot, contained: true }) : null;
console.log((await stop()).trim()); started = false;
await until(async () => { try { await fetch(url + '/api/health'); return false; } catch { return true; } });
for (const file of manifest.files) {
const bytes = fs.readFileSync(path.join(appRoot, file.path)); assert.equal(bytes.length, file.bytes);
assert.equal(createHash('sha256').update(bytes).digest('hex'), file.sha256, file.path);
}
const result = { success: true, date: new Date().toISOString(), appRoot, version: manifest.version, nodeVersion: manifest.nodeVersion,
verifiedFiles: manifest.files.length, url, reusedPid: firstInfo.pid, checks: { jobId, status: checked.status, tests: checked.results[0].tests }, actualRea, actualEngine, actualBrowser, actualControlled, externalGit,
steps: ['manifest hashes', 'bundled Node launch', 'same-service reuse', 'packaged example and static page', ...(['1.15.0', '1.16.0', '1.17.0', '1.18.0', '1.19.0', '1.20.0', '1.20.1','1.21.0', '1.22.0', '1.22.1', '1.23.0', '1.24.0', '1.24.1', '1.24.2', '1.24.3', '1.24.4', '1.24.5', '1.24.6', '1.24.7', '1.24.8'].includes(manifest.version) ? ['starter project copied to owned user data; original template bytes matched'] : []), 'explicit command consent', 'actual bundled Node version', 'actual bundled npm check without system Node/npm', 'check log artifact', ...(actualRea.length ? ['contained REA installation and Node identity', 'actual ASAR/imports/resources', 'original Bundle and target hash binding', 'verified reuse without producer replay'] : []), 'report availability', 'graceful stop', 'every original packaged file remains unchanged'], realModel: false };
fs.writeFileSync('.qa/release-validation.json', JSON.stringify(result, null, 2));
console.log(JSON.stringify(result, null, 2));
} finally { if (started) { try { await stop(); } catch {} } }
@@ -0,0 +1,48 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import {createHash} from 'node:crypto';
import {execFileSync} from 'node:child_process';
import {verifyPlanEvidence} from '../src/core/context/request-plan.mjs';
import {assertToolPairs} from '../tests/helpers.mjs';
const root=path.resolve('.qa/working-memory-u');const sha=b=>createHash('sha256').update(b).digest('hex');const read=r=>JSON.parse(fs.readFileSync(r==='original-t-fixture.json'?'tests/fixtures/working-memory-t.json':path.join(root,r.replace(/^receipts\//,'')),'utf8'));
const reference={path:'docs/live-delivery-t-evidence/manifest.json',sha256:sha(fs.readFileSync('docs/live-delivery-t-evidence/manifest.json'))},oldRoot=path.resolve('docs/live-delivery-t-evidence');
assert.equal(sha(fs.readFileSync(reference.path)),reference.sha256);const oldManifest=JSON.parse(fs.readFileSync(reference.path));
for(const e of oldManifest.files){const p=path.resolve(oldRoot,e.path);assert.ok(p.startsWith(oldRoot+path.sep));const b=fs.readFileSync(p);assert.equal(sha(b),e.sha256);assert.equal(b.length,e.bytes);}
const oldRead=r=>JSON.parse(fs.readFileSync(path.join(oldRoot,'run',r),'utf8'));
const original=oldRead('node/export.json'),state=oldRead('node/session.json').execution,oldArtifacts=oldRead('analysis/artifact-index.json').artifacts;
function makeStore(core,load){return{core,owned(kind,id,sid){const v=core[kind]?.get(id);assert.ok(v,kind+':'+id);assert.equal(v.sessionId,sid);return v;},artifactStore:{read(a){const b=load(a);assert.equal(sha(b),a.sha256);return b.toString('utf8');}}};}
const oldCore={artifact:new Map(oldArtifacts.map(a=>[a.id,a])),tool:new Map(oldRead('analysis/owned-tool-rows.json').map(r=>{const v=JSON.parse(r.payload);return[v.id,v];})),run:new Map([[state.run.id,state.run]]),task:new Map([[state.task.id,state.task]])};
const oldLoad=a=>fs.readFileSync(path.join(oldRoot,'run',a.capturedPath));
for(const p of state.contextPlans)verifyPlanEvidence(makeStore(oldCore,oldLoad),original.session,p);
assert.equal(state.contextPlans.length,8);assert.equal(read('receipts/history-result.json').originalRequestsRewritten,0);
const fixture=read('original-t-fixture.json'),files=fixture.files.filter(f=>['test/expense.test.mjs','src/amount.mjs','src/summary.mjs','src/report.mjs'].includes(f.path));
function coverage(body){
assertToolPairs(body.messages);assert.ok(body.messages[0].content.includes(JSON.stringify(fixture.goal)));
for(const file of files){assert.equal(sha(file.content),file.sha256);const positions=new Set();
for(const m of body.messages){const spans=[];
if(m.role==='tool'){const v=JSON.parse(m.content);if(v.path===file.path&&typeof v.content==='string')spans.push({offset:v.offset??0,content:v.content});}
if(m.role==='system'){let v;try{v=JSON.parse(m.content.split('\n').at(-1));}catch{}for(const e of v?.data?.entries??[])if(e.observation?.path===file.path)spans.push({offset:e.observation.offset??0,content:e.content});}
for(const s of spans){assert.equal(s.content,file.content.slice(s.offset,s.offset+s.content.length));for(let i=s.offset;i<s.offset+s.content.length;i++)positions.add(i);}
}assert.equal(positions.size,file.content.length,file.path);
}
const marker='当前工程执行依据(每次请求重新核对,非操作授权):\n';const facts=JSON.parse(body.messages[0].content.split(marker)[1].split('\n')[0]);
assert.equal(facts.stage,'checks_need_repair');assert.equal(facts.has_applied_changes,false);assert.equal(facts.latest_check.current_source,true);
assert.equal(facts.latest_check.results[0].tests.failed,9);assert.equal(facts.latest_check.results[1].status,'passed');
return facts;
}
function verifyFacts(facts,execution,store){
const job=execution.checks.find(j=>j.id===facts.latest_check.id),plan=execution.plans.find(p=>p.id===facts.check_plan.id);
assert.ok(job&&plan);assert.equal(job.planId,plan.id);assert.equal(job.status,facts.latest_check.status);assert.equal(plan.sourceFingerprint,facts.source_fingerprint);
for(const f of facts.latest_check.results){const r=job.results.find(v=>v.name===f.name);assert.ok(r);assert.equal(r.status,f.status);assert.deepEqual(r.tests??null,f.tests);assert.equal(r.logArtifactId,f.log_artifact_id);const a=store.owned('artifact',f.log_artifact_id,job.sessionId);assert.equal(a.sha256,f.log_sha256);store.artifactStore.read(a);}
}
for(const number of [7,8]){
const prefix='wire-'+number+'-final/',plan=read(prefix+'record.json'),core={...oldCore,artifact:new Map(oldCore.artifact)};
const mapping=[['requestArtifactId','model-request'],['artifactId','context-plan'],['workingSetArtifactId','context-working-set'],['latestToolsArtifactId','context-latest-tools'],['historyIndexArtifactId','context-history-index']];
for(const [field,kind]of mapping){const id=plan[field];if(!id)continue;if(!fs.existsSync(path.join(root,prefix,id+'.json'))){assert.equal(core.artifact.get(id)?.kind,kind);continue;}const b=fs.readFileSync(path.join(root,prefix,id+'.json'));core.artifact.set(id,{id,kind,sha256:sha(b),sessionId:plan.sessionId,projectId:plan.projectId,taskId:plan.taskId,runId:plan.runId,sealedPath:prefix+id+'.json'});}
const wireStore=makeStore(core,a=>a.sealedPath?fs.readFileSync(path.join(root,a.sealedPath)):oldLoad(a));verifyPlanEvidence(wireStore,original.session,plan);
assert.deepEqual(read(prefix+'request.json'),read(prefix+plan.requestArtifactId+'.json'));verifyFacts(coverage(read(prefix+'request.json')),state,wireStore);
assert.ok(plan.estimatedInputTokens<=12352);assert.equal(plan.budget.contextLimit,16000);assert.equal(plan.budget.outputReservation,2048);assert.equal(plan.budget.safetyTokens,1600);
}
console.log(JSON.stringify({success:true,historicalPlans:8,reconstructedPlans:2,currentFactsLogs:true,realModelRequests:0}));
@@ -0,0 +1,43 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import {createHash} from 'node:crypto';
import {execFileSync} from 'node:child_process';
import {verifyPlanEvidence} from '../src/core/context/request-plan.mjs';
import {assertToolPairs} from '../tests/helpers.mjs';
const root=path.resolve('.qa/working-memory-u');const sha=b=>createHash('sha256').update(b).digest('hex');const read=r=>JSON.parse(fs.readFileSync(r==='original-t-fixture.json'?'tests/fixtures/working-memory-t.json':path.join(root,r.replace(/^receipts\//,'')),'utf8'));
const reference={path:'docs/live-delivery-t-evidence/manifest.json',sha256:sha(fs.readFileSync('docs/live-delivery-t-evidence/manifest.json'))},oldRoot=path.resolve('docs/live-delivery-t-evidence');
assert.equal(sha(fs.readFileSync(reference.path)),reference.sha256);const oldManifest=JSON.parse(fs.readFileSync(reference.path));
for(const e of oldManifest.files){const p=path.resolve(oldRoot,e.path);assert.ok(p.startsWith(oldRoot+path.sep));const b=fs.readFileSync(p);assert.equal(sha(b),e.sha256);assert.equal(b.length,e.bytes);}
const oldRead=r=>JSON.parse(fs.readFileSync(path.join(oldRoot,'run',r),'utf8'));
const original=oldRead('node/export.json'),state=oldRead('node/session.json').execution,oldArtifacts=oldRead('analysis/artifact-index.json').artifacts;
function makeStore(core,load){return{core,owned(kind,id,sid){const v=core[kind]?.get(id);assert.ok(v,kind+':'+id);assert.equal(v.sessionId,sid);return v;},artifactStore:{read(a){const b=load(a);assert.equal(sha(b),a.sha256);return b.toString('utf8');}}};}
const oldCore={artifact:new Map(oldArtifacts.map(a=>[a.id,a])),tool:new Map(oldRead('analysis/owned-tool-rows.json').map(r=>{const v=JSON.parse(r.payload);return[v.id,v];})),run:new Map([[state.run.id,state.run]]),task:new Map([[state.task.id,state.task]])};
const oldLoad=a=>fs.readFileSync(path.join(oldRoot,'run',a.capturedPath));
for(const p of state.contextPlans)verifyPlanEvidence(makeStore(oldCore,oldLoad),original.session,p);
assert.equal(state.contextPlans.length,8);assert.equal(read('receipts/history-result.json').originalRequestsRewritten,0);
const fixture=read('original-t-fixture.json'),files=fixture.files.filter(f=>['test/expense.test.mjs','src/amount.mjs','src/summary.mjs','src/report.mjs'].includes(f.path));
function coverage(body){
assertToolPairs(body.messages);assert.ok(body.messages[0].content.includes(JSON.stringify(fixture.goal)));
for(const file of files){assert.equal(sha(file.content),file.sha256);const positions=new Set();
for(const m of body.messages){const spans=[];
if(m.role==='tool'){const v=JSON.parse(m.content);if(v.path===file.path&&typeof v.content==='string')spans.push({offset:v.offset??0,content:v.content});}
if(m.role==='system'){let v;try{v=JSON.parse(m.content.split('\n').at(-1));}catch{}for(const e of v?.data?.entries??[])if(e.observation?.path===file.path)spans.push({offset:e.observation.offset??0,content:e.content});}
for(const s of spans){assert.equal(s.content,file.content.slice(s.offset,s.offset+s.content.length));for(let i=s.offset;i<s.offset+s.content.length;i++)positions.add(i);}
}assert.equal(positions.size,file.content.length,file.path);
}
const marker='当前工程执行依据(每次请求重新核对,非操作授权):\n';const facts=JSON.parse(body.messages[0].content.split(marker)[1].split('\n')[0]);
assert.equal(facts.stage,'checks_need_repair');assert.equal(facts.has_applied_changes,false);assert.equal(facts.latest_check.current_source,true);
assert.equal(facts.latest_check.results[0].tests.failed,9);assert.equal(facts.latest_check.results[1].status,'passed');
return facts;
}
for(const number of [7,8]){
const prefix='wire-'+number+'-final/',plan=read(prefix+'record.json'),core={...oldCore,artifact:new Map(oldCore.artifact)};
const mapping=[['requestArtifactId','model-request'],['artifactId','context-plan'],['workingSetArtifactId','context-working-set'],['latestToolsArtifactId','context-latest-tools'],['historyIndexArtifactId','context-history-index']];
for(const [field,kind]of mapping){const id=plan[field];if(!id)continue;if(!fs.existsSync(path.join(root,prefix,id+'.json'))){assert.equal(core.artifact.get(id)?.kind,kind);continue;}const b=fs.readFileSync(path.join(root,prefix,id+'.json'));core.artifact.set(id,{id,kind,sha256:sha(b),sessionId:plan.sessionId,projectId:plan.projectId,taskId:plan.taskId,runId:plan.runId,sealedPath:prefix+id+'.json'});}
verifyPlanEvidence(makeStore(core,a=>a.sealedPath?fs.readFileSync(path.join(root,a.sealedPath)):oldLoad(a)),original.session,plan);
assert.deepEqual(read(prefix+'request.json'),read(prefix+plan.requestArtifactId+'.json'));coverage(read(prefix+'request.json'));
assert.ok(plan.estimatedInputTokens<=12352);assert.equal(plan.budget.contextLimit,16000);assert.equal(plan.budget.outputReservation,2048);assert.equal(plan.budget.safetyTokens,1600);
}
console.log(JSON.stringify({success:true,historicalPlans:8,reconstructedPlans:2,realModelRequests:0}));
@@ -0,0 +1,22 @@
// Prepare fresh U drivers. Earlier sealed S/T scripts and outputs stay intact.
import fs from 'node:fs';import assert from 'node:assert/strict';
const root='.qa/working-memory-u/release';fs.mkdirSync(root,{recursive:true});
let freeze=fs.readFileSync('.qa/reading-s-freeze.mjs','utf8').replaceAll('.qa/reading-reliability-s/release',root).replaceAll('1.24.7','1.24.8');
fs.writeFileSync('.qa/working-memory-u-freeze.mjs',freeze,{flag:'wx'});
let gate=fs.readFileSync('.qa/reading-s-candidate-gate.mjs','utf8').replaceAll('.qa/reading-reliability-s/release',root).replaceAll('1.24.7','1.24.8')
.replaceAll("'portable-ui'","'memory'").replaceAll('scripts/verify-reading-reliability-ui.mjs','scripts/verify-working-memory.mjs').replaceAll('.qa/reading-s-install-lifecycle.mjs','.qa/working-memory-u-install.mjs');
fs.writeFileSync('.qa/working-memory-u-gate.mjs',gate,{flag:'wx'});
const original=fs.readFileSync('scripts/verify-desktop-install.mjs','utf8');let install=original;
const edits=[
["from './bundle-desktop.mjs'","from '../scripts/bundle-desktop.mjs'"],
["from './build-installer.mjs'","from '../scripts/build-installer.mjs'"],
["['verify-file-results-ui.mjs', 'verify-local-files.mjs']","['verify-file-results-ui.mjs', 'verify-local-files.mjs', 'verify-working-memory.mjs']"],
["script === 'verify-file-results-ui.mjs' ? 16 : 9","script === 'verify-file-results-ui.mjs' ? 16 : script === 'verify-local-files.mjs' ? 9 : 3"]
];for(const[a,b]of edits){assert.equal(install.split(a).length,2);install=install.replace(a,b);}
fs.writeFileSync('.qa/working-memory-u-install.mjs',install,{flag:'wx'});
fs.writeFileSync(root+'/install-adaptation.json',JSON.stringify({source:'scripts/verify-desktop-install.mjs',target:'.qa/working-memory-u-install.mjs',edits,scope:'Exact lifecycle plus actual installed U read-only fixture; no integrity or failure thresholds relaxed.'},null,2),{flag:'wx'});
let formal=fs.readFileSync('.qa/reading-s-formal-release.mjs','utf8');
formal=formal.replaceAll('.qa/reading-reliability-s','.qa/working-memory-u').replaceAll('1.24.7','1.24.8').replaceAll('1.24.6','1.24.7')
.replaceAll('1\\.24\\.6-win-x64-20261103151145294','1\\.24\\.7-win-x64-20261103164618190');
fs.writeFileSync('.qa/working-memory-u-formal.mjs',formal,{flag:'wx'});
console.log('Prepared fresh U freeze, candidate, isolated-install and formal state-retention drivers.');
@@ -0,0 +1,27 @@
// Original T owned records only. No production DB, model request or credentials.
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import {createHash} from 'node:crypto';
import {workingCandidates} from '../src/core/context/working-set.mjs';
import {historyGroups} from '../src/core/context/request-plan.mjs';
const root=path.resolve('.qa/live-delivery-t'),out=path.resolve('.qa/working-memory-u');
const read=n=>JSON.parse(fs.readFileSync(path.join(root,n),'utf8'));
const sha=b=>createHash('sha256').update(b).digest('hex');
const session=read('node/export.json').session,state=read('node/session.json');
const rows=read('analysis/owned-tool-rows.json'),artifacts=read('analysis/artifact-index.json').artifacts;
const map=new Map(artifacts.map(a=>[a.id,a]));
const store={core:{tool:new Map(rows.map(r=>{const v=JSON.parse(r.payload);return[v.id,v];})),check_job:new Map(state.execution.checks.map(r=>[r.id,r]))},
owned(kind,id,sid){assert.equal(kind,'artifact');const a=map.get(id);assert.equal(a.sessionId,sid);return a;},
artifactStore:{read(a){const b=fs.readFileSync(path.join(root,a.capturedPath));assert.equal(sha(b),a.sha256);return b.toString('utf8');}}};
const version=Number(process.argv[2]??2),groups=historyGroups(session.providerMessages).slice(0,7);
const candidates=workingCandidates(store,session,state.execution.run,groups,version);
const files=candidates.filter(c=>c.observation.path==='test/expense.test.mjs');
const source=fs.readFileSync(path.join(root,'node/source-before/test/expense.test.mjs'),'utf8');
const covered=new Set();for(const c of files){const o=c.observation;assert.equal(o.content,source.slice(o.offset,o.offset+o.content.length));for(let n=o.offset;n<o.offset+o.content.length;n++)covered.add(n);}
const result={observationVersion:version,originalToolsSha256:sha(fs.readFileSync(path.join(root,'analysis/owned-tool-rows.json'))),sourceSha256:sha(source),sourceCharacters:source.length,
candidateRanges:files.map(c=>[c.observation.offset,c.observation.offset+c.observation.content.length]),covered:covered.size,fullCoverage:covered.size===source.length,
candidates,externalModelRequests:0};
fs.writeFileSync(path.join(out,version===2?'replay-before.json':'replay-after.json'),JSON.stringify(result,null,2)+'\n',{flag:'wx'});
console.log(JSON.stringify({version,ranges:result.candidateRanges,covered:result.covered,fullCoverage:result.fullCoverage,externalModelRequests:0}));
if(version===2)assert.equal(result.fullCoverage,false);else assert.equal(result.fullCoverage,true);
@@ -0,0 +1,18 @@
import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict';import{createHash}from'node:crypto';
const root='.qa/working-memory-u',read=p=>JSON.parse(fs.readFileSync(p,'utf8').replace(/^\uFEFF/,'')),sha=b=>createHash('sha256').update(b).digest('hex');
const freeze=read(root+'/release/product-freeze.json'),candidate=read(root+'/release/candidate.json');
assert.deepEqual(read('releases/latest.json'),candidate);assert.equal(candidate.documentation.sourceCommit,freeze.sourceCommit);assert.equal(freeze.version,'1.24.8');
for(const file of freeze.compiled)assert.equal(sha(fs.readFileSync(path.join(candidate.portableRoot,file.path))),file.sha256);
const receipts={};for(const mode of['rebuild','archives','portable','memory','install']){const v=read(root+'/release/'+(mode==='portable'?'portable-final':mode)+'.json');assert.equal(v.success,true,mode);assert.equal(v.sourceCommit,freeze.sourceCommit);assert.equal(v.candidate,candidate.portableRoot);receipts[mode]=v;}
const build=receipts.rebuild.result;assert.equal(build.compiled.length,22);assert.deepEqual(build.mismatches,[]);assert.equal(build.inputCount,freeze.files.length+5);
assert.equal(read(root+'/release/extra-example-inputs.json').success,true);
const install=receipts.install.result;assert.equal(install.results.length,12);assert.ok(install.results.every(r=>r.passed));
assert.equal(install.installedUI.proofs.length,3);for(const p of install.installedUI.proofs){assert.equal(p.proof.success,true);assert.equal(p.proof.version,'1.24.8');assert.equal(p.proof.realModelRequests,0);}
const memory=receipts.memory.result;assert.equal(memory.checks.length,3);assert.equal(memory.requests,7);assert.equal(memory.originalSourceUnchanged,true);assert.equal(memory.realModelDeliveryPassed,false);
const core=fs.readFileSync(root+'/final-core.tap','utf8');assert.match(core,/pass 114\b/);assert.match(core,/fail 0\b/);
const wire=read(root+'/wire-result-final.json');assert.equal(wire.passed,true);assert.ok(wire.results.every(r=>r.covered.every(v=>v.covered===v.characters)&&r.estimatedInputTokens<=12352));
assert.equal(read(root+'/history-result.json').passed,true);
const result={success:true,version:'1.24.8',sourceCommit:freeze.sourceCommit,candidate:candidate.portableRoot,trackedInputs:freeze.files.length,independentInputs:build.inputCount,compiled:22,
relatedTests:114,isolatedInstallGroups:12,sourcePortableInstalledWorkingMemory:'three groups each; seven local fixture requests each',historicalTRequests:8,realModelRequests:0,
scope:'Exact immutable U payload gates. Original production state retention and native review remain separately required.'};
fs.writeFileSync(root+'/release/preinstall-review.json',JSON.stringify(result,null,2)+'\n',{flag:'wx'});console.log(JSON.stringify(result));
@@ -0,0 +1,67 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import {createHash} from 'node:crypto';
import {DatabaseSync} from 'node:sqlite';
const sha=b=>createHash('sha256').update(b).digest('hex');
const read=p=>JSON.parse(fs.readFileSync(p,'utf8').replace(/^\uFEFF/,''));
const root='.qa/working-memory-u',base=path.resolve('docs/working-memory-u-evidence');
assert.equal(fs.existsSync(base),false);fs.mkdirSync(base);
const freeze=read(root+'/release/product-freeze.json'),release=read(root+'/release/candidate.json');
assert.equal(read(root+'/formal-release/final.json').success,true);
assert.equal(read(root+'/native/result.json').success,true);
assert.deepEqual(read('releases/latest.json'),release);
const entries=[];
function put(bytes,relative,source){
const target=path.resolve(base,relative);assert.ok(target.startsWith(base+path.sep));
fs.mkdirSync(path.dirname(target),{recursive:true});fs.writeFileSync(target,bytes,{flag:'wx'});
entries.push({path:relative.replaceAll('\\','/'),bytes:bytes.length,sha256:sha(bytes),source});
}
function copy(file,relative){assert.equal(fs.lstatSync(file).isSymbolicLink(),false);put(fs.readFileSync(file),relative,path.resolve(file));}
function walk(directory,destination){for(const e of fs.readdirSync(directory,{withFileTypes:true})){
const p=path.join(directory,e.name),r=path.posix.join(destination,e.name);assert.equal(fs.lstatSync(p).isSymbolicLink(),false,'No junctions');
if(e.isDirectory())walk(p,r);else copy(p,r);
}}
function top(directory,destination){for(const e of fs.readdirSync(directory,{withFileTypes:true}))if(e.isFile()&&/\.(?:json|log|txt|png|jpg)$/.test(e.name))copy(path.join(directory,e.name),destination+'/'+e.name);}
walk(root,'receipts');
for(const name of fs.readdirSync('.qa').filter(n=>/^working-memory-u.*\.mjs$/.test(n)))copy('.qa/'+name,'drivers/'+name+'.txt');
copy('.qa/desktop-f-state.mjs','drivers/desktop-f-state.mjs.txt');
copy('scripts/verify-working-memory.mjs','drivers/verify-working-memory.mjs.txt');
copy('tests/fixtures/working-memory-t.json','original-t-fixture.json');
for(const item of freeze.compiled){const p=path.join(release.portableRoot,item.path);assert.equal(sha(fs.readFileSync(p)),item.sha256);copy(p,'compiled/'+item.path);}
for(const item of freeze.files.filter(v=>/^src\//.test(v.path)||/working-memory|working-set|task-delivery-progress|task-context|tool-feedback/.test(v.path))){
assert.equal(sha(fs.readFileSync(item.path)),item.sha256,item.path);copy(item.path,'source-bytes/'+item.path);
}
function memory(directory,name){
const report=read(path.join(directory,'result.json'));assert.equal(report.success,true);assert.equal(report.requests,7);
top(directory,'validation/'+name);walk(path.join(directory,'data/artifacts'),'validation/'+name+'/artifacts');
const db=new DatabaseSync(path.join(directory,'data/workbench.sqlite'),{readOnly:true});
try{const rows=db.prepare("SELECT kind,payload FROM records WHERE kind IN ('artifact','tool','run','task','context_plan') ORDER BY rowid").all();
put(Buffer.from(JSON.stringify(rows,null,2)+'\n'),'validation/'+name+'/owned-records.json',path.resolve(directory,'data/workbench.sqlite')+' (read-only selected fixture rows)');
}finally{db.close();}
}
memory('.qa/working-memory-host-cd805518-be14-44fe-a4d5-1eb4cf422768','source-memory');
const pm=read(root+'/release/memory.json');memory(path.dirname(pm.resultPath),'portable-memory');
const build=read(root+'/release/rebuild.json').result;top(build.root,'validation/rebuild');
const install=read(root+'/release/install.json').result;top(install.root,'validation/install');
for(const p of install.installedUI.proofs){
const lines=fs.readFileSync(p.log,'utf8').trim().split(/\r?\n/),summary=JSON.parse(lines.findLast(l=>l.startsWith('{"success":')));
const directory=summary.directory??summary.root;
if(p.script==='verify-working-memory.mjs')memory(directory,'installed-memory');
else top(directory,p.script==='verify-file-results-ui.mjs'?'validation/installed-results':'validation/installed-files');
}
copy('.qa/archives-validation.json','validation/archives.json');copy('.qa/release-validation.json','validation/portable.json');
copy('releases/latest.json','release-latest.json');
copy(path.join(release.portableRoot,'MANIFEST.json'),'portable-manifest.json');copy(path.join(release.sourceRoot,'MANIFEST.json'),'source-manifest.json');
const oldManifest='docs/live-delivery-t-evidence/manifest.json';
const reference={path:oldManifest,sha256:sha(fs.readFileSync(oldManifest)),scope:'Immutable original T bytes remain in their committed manifest; no old task is resumed or historical artifact rewritten.'};
put(Buffer.from(JSON.stringify(reference,null,2)+'\n'),'original-t-reference.json','immutable committed T evidence');
const identity={version:'1.24.8',sourceCommit:freeze.sourceCommit,candidate:path.basename(release.portableRoot),
portableManifestSha256:sha(fs.readFileSync(path.join(release.portableRoot,'MANIFEST.json'))),sourceManifestSha256:sha(fs.readFileSync(path.join(release.sourceRoot,'MANIFEST.json'))),
installer:release.installer,archives:Object.fromEntries(['portable','source','evidence'].map(kind=>[kind,release[kind]])),realModelRequests:0};
fs.writeFileSync('docs/working-memory-u-release-identity.json',JSON.stringify(identity,null,2)+'\n',{flag:'wx'});copy('docs/working-memory-u-release-identity.json','release-identity.json');
const manifest={schemaVersion:1,version:'1.24.8',sourceCommit:freeze.sourceCommit,createdAt:new Date().toISOString(),realModelRequests:0,
scope:'U actual read-page retention and current check facts; original failures, frozen source/portable/installed bytes and requests, exact original production state. Only public real config and hashes, no real credential values. Drivers are inert evidence, never replay instructions.',
count:entries.length,bytes:entries.reduce((n,e)=>n+e.bytes,0),entries:entries.sort((a,b)=>a.path.localeCompare(b.path))};
fs.writeFileSync(path.join(base,'manifest.json'),JSON.stringify(manifest,null,2)+'\n',{flag:'wx'});
console.log(JSON.stringify({success:true,count:manifest.count,bytes:manifest.bytes,manifestSha256:sha(fs.readFileSync(path.join(base,'manifest.json')))}));
@@ -0,0 +1,54 @@
// Rebuild bounded requests from frozen T inputs/owned records. Never dispatch.
import fs from 'node:fs';import path from 'node:path';import assert from 'node:assert/strict';import {createHash,randomUUID} from 'node:crypto';
import {RequestPlanner,historyGroups,verifyPlanEvidence} from '../src/core/context/request-plan.mjs';
import {taskDeliveryProgress} from '../src/core/context/delivery-progress.mjs';
import {CheckRunner} from '../src/core/check-runner.mjs';
import {compactRoutineSnapshot,sessionContext} from '../src/server/diagnostics.mjs';
const root=path.resolve('.qa/live-delivery-t'),out=path.resolve('.qa/working-memory-u');
const read=n=>JSON.parse(fs.readFileSync(path.join(root,n),'utf8')),sha=b=>createHash('sha256').update(b).digest('hex');
const original=read('node/export.json'),state=read('node/session.json').execution,rows=read('analysis/owned-tool-rows.json').map(r=>JSON.parse(r.payload));
const index=read('analysis/artifact-index.json').artifacts,results=[];
for(const number of [7,8]){
const folder=path.join(out,'wire-'+number+'-'+(process.argv[2]??'final'));assert.ok(!fs.existsSync(folder));fs.mkdirSync(folder);
const allGroups=historyGroups(original.session.providerMessages),session=structuredClone(original.session);
session.providerMessages=allGroups.slice(0,number).flatMap(g=>g.messages);
const calls=new Set(session.providerMessages.flatMap(m=>(m.tool_calls??[]).map(c=>c.id))),run=structuredClone(state.run),task=structuredClone(state.task);
run.consumption=run.consumption.slice(0,number-1);run.usage={requests:run.consumption.length,totalTokens:run.consumption.reduce((sum,c)=>sum+c.usage.total_tokens,0),estimatedUnknownTokens:0};task.usage=run.usage;
const originalPlan=state.contextPlans.find(p=>p.requestIndex===number),wire=JSON.parse(fs.readFileSync(path.join(root,index.find(a=>a.id===originalPlan.requestArtifactId).capturedPath),'utf8'));
const time=originalPlan.createdAt;session.events=session.events.filter(e=>(e.createdAt??e.startedAt??'')<=time);
const core={tool:new Map(rows.filter(r=>calls.has(r.callId)).map(r=>[r.id,r])),run:new Map([[run.id,run]]),task:new Map([[task.id,task]]),
artifact:new Map(index.map(a=>[a.id,a])),check_plan:new Map(state.plans.filter(p=>p.createdAt<=time).map(p=>[p.id,p])),
check_job:new Map(state.checks.filter(j=>j.finishedAt<=time).map(j=>[j.id,j])),context_plan:new Map(),step:new Map(),delivery_plan:new Map(),change_set:new Map()};
const project={id:session.projectId,name:'T frozen Node project',root:run.workspaceIdentity.root};
const store={core,project(id){assert.equal(id,project.id);return project;},owned(kind,id,sid){assert.equal(sid,session.id);const v=core[kind].get(id);assert.ok(v,kind+':'+id);assert.equal(v.sessionId,sid);return v;},
putRecord(kind,s,row){core[kind].set(row.id,row);},artifactStore:{
read(a){const b=fs.readFileSync(a.uPath??path.join(root,a.capturedPath));assert.equal(sha(b),a.sha256);return b.toString('utf8');},
write(s,r,text,options){const id=randomUUID(),uPath=path.join(folder,id+'.json');fs.writeFileSync(uPath,text);return{id,sha256:sha(text),bytes:Buffer.byteLength(text),kind:options.kind,taskId:r.taskId,runId:r.id,sessionId:s.id,projectId:s.projectId,uPath};}
}};
const facts=await taskDeliveryProgress(store,session,run,{checks:new CheckRunner(store)});
assert.equal(facts.stage,'checks_need_repair');assert.equal(facts.latest_check.current_source,true);
assert.equal(facts.latest_check.results[0].tests.failed,9);assert.equal(facts.latest_check.results[1].status,'passed');
let system=wire.messages[0].content;const lines=system.split('\n'),snapshotIndex=lines.findIndex(l=>l.startsWith('{"source":"agent_workbench_runtime"'));
assert.ok(snapshotIndex>=0);const snapshot=compactRoutineSnapshot(JSON.parse(lines[snapshotIndex]));
const routine=sessionContext(session,project,{...run.model},String,{executionFactsIncluded:true});
const routineIntro=routine.split('\n').slice(0,-1);
const introStart=lines.findIndex(line=>line.startsWith('以下是工作台保存的当前执行状态。'));
assert.ok(introStart>=0);lines.splice(introStart,snapshotIndex-introStart+1,...routineIntro,JSON.stringify(snapshot));
system=lines.join('\n')+'\n当前工程执行依据(每次请求重新核对,非操作授权):\n'+JSON.stringify(facts);
const config={...run.model,modelRouting:run.model.routing};const planned=new RequestPlanner(store).prepare(session,run,config,{system,tools:wire.tools});
verifyPlanEvidence(store,session,planned.record);fs.writeFileSync(path.join(folder,'request.json'),JSON.stringify(planned.body,null,2));
fs.writeFileSync(path.join(folder,'record.json'),JSON.stringify(planned.record,null,2));fs.writeFileSync(path.join(folder,'facts.json'),JSON.stringify(facts,null,2));
const files=['test/expense.test.mjs','src/amount.mjs','src/summary.mjs','src/report.mjs'];const covered=[];
for(const name of files){const source=fs.readFileSync(path.join(root,'node/source-before',name),'utf8');const spans=[];
for(const m of planned.messages){if(m.role==='tool'){const v=JSON.parse(m.content);if(v.path===name&&typeof v.content==='string')spans.push({offset:v.offset??0,content:v.content});}
if(m.role==='system'){let v;try{v=JSON.parse(m.content.split('\n').at(-1));}catch{}for(const e of v?.data?.entries??[])if(e.observation?.path===name)spans.push({offset:e.observation.offset??0,content:e.content});}}
const positions=new Set();for(const span of spans){assert.equal(span.content,source.slice(span.offset,span.offset+span.content.length));for(let n=span.offset;n<span.offset+span.content.length;n++)positions.add(n);}
covered.push({path:name,characters:source.length,covered:positions.size,sha256:sha(source)});
}
const result={requestNumber:number,budget:planned.record.budget,estimatedInputTokens:planned.record.estimatedInputTokens,requestSha256:planned.record.requestSha256,
covered,facts,originalGoalPreserved:system.includes(JSON.stringify(task.goal)),provenanceVerified:true,externalModelRequests:0};
fs.writeFileSync(path.join(folder,'result.json'),JSON.stringify(result,null,2));results.push(result);
console.log(JSON.stringify({requestNumber:number,input:result.estimatedInputTokens,budget:result.budget.inputBudget,covered,checkStage:facts.stage,requests:0}));
assert.ok(result.originalGoalPreserved);assert.ok(covered.every(f=>f.characters===f.covered),'All original source must be in the actual bounded request');
}
fs.writeFileSync(path.join(out,'wire-result-'+(process.argv[2]??'final')+'.json'),JSON.stringify({passed:true,results,externalModelRequests:0},null,2),{flag:'wx'});
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,137 @@
{
"scope": "Frozen T goal, first three original assistant turns and original unchanged project inputs. Offline fixture only; no model implementation.",
"goal": "修复这个Node费用报表工程的amount、summary、report三个模块。金额用精确分单位处理,接受测试约定的十进制字符串/有限数字、退款、0及空白;拒绝格式错误、超精度和不安全金额。按独立币种规范化/排序汇总并保留原数组,计数准确、安全求和,报表两位小数含负分金额。以原九项测试为完整契约。先inspect_project,再plan_checks选择[\"test\",\"build\"]并run_checks保留真实基线失败,读取原测试和相关源码。只允许修改src/amount.mjs、src/summary.mjs、src/report.mjs;不改测试、配置、README、构建脚本、owner文件或原暂存,不使用run_command,不直接提交Git。propose_file/propose_patch准备完整三个模块后,用prepare_change_set一次封存全部三文件,等待审查应用。应用后继续同一个Task,重新plan_checks/run_checks,通过原9项测试和build后,用plan_delivery为三个文件准备本地Git预览并等待确认。模型必须自己实现,禁止用口头完成替代检查。预算最多8次模型请求、90000tokens,输出2048,上下文16K,请合并独立工具调用并避免重复观察。",
"replies": [
{
"role": "assistant",
"content": "我会先读取项目识别结果并按你指定的顺序封存 `test`、`build` 基线计划;随后读取九项测试及三个目标模块,依据实际契约准备完整改动提案。",
"tool_calls": [
{
"id": "call_5eb7405a2e6a4fb2bd2e2acf4d775dcb",
"type": "function",
"function": {
"name": "inspect_project",
"arguments": "{}"
}
}
]
},
{
"role": "assistant",
"content": "",
"tool_calls": [
{
"id": "call_56fb7fe30f7a48c0a466eedca7cb1c33",
"type": "function",
"function": {
"name": "plan_checks",
"arguments": "{\"names\":[\"test\",\"build\"]}"
}
}
]
},
{
"role": "assistant",
"content": "",
"tool_calls": [
{
"id": "call_12f66bde19464121a617329f20484c0d",
"type": "function",
"function": {
"name": "run_checks",
"arguments": "{\"plan_id\": \"1c46ffc1-3b24-4fb8-b207-3305ccd14fd1\"}"
}
},
{
"id": "call_40d0588adc6b4abb8352fcd04c9abfbb",
"type": "function",
"function": {
"name": "read_file",
"arguments": "{\"path\": \"test/expense.test.mjs\"}"
}
},
{
"id": "call_7ca0aaf713a34fb6b06af412a0806774",
"type": "function",
"function": {
"name": "read_file",
"arguments": "{\"path\": \"src/amount.mjs\"}"
}
},
{
"id": "call_bba7c0bbdc874767a61a735efda0f601",
"type": "function",
"function": {
"name": "read_file",
"arguments": "{\"path\": \"src/summary.mjs\"}"
}
},
{
"id": "call_dbec88442f9f43469ad0cef99c0534f6",
"type": "function",
"function": {
"name": "read_file",
"arguments": "{\"path\": \"src/report.mjs\"}"
}
}
]
}
],
"files": [
{
"path": ".gitignore",
"content": "dist/\n.awb-*\nnode_modules/\n",
"sha256": "cab0bc87cad1b1214d71b023eee742986044093ff4b4331cd6a51098af6bdce6"
},
{
"path": "owner-staged.txt",
"content": "Owner working copy differs from staging\n",
"sha256": "56b0dda452eaf9aead80f0e4ad971d7befa3cf152c3553923f8fde46e1fd336a"
},
{
"path": "owner-unstaged.txt",
"content": "Owner unstaged change\n",
"sha256": "468bfb2956a4ac040508fc5ffd915cf8057fb7420e22c41a3cc2d094785f0d3e"
},
{
"path": "owner-untracked.txt",
"content": "Owner untracked change\n",
"sha256": "e32ab29a12ed13d72c2ed603b2360e1b4e35afb0fe4280db2e523ad2c6c5bc8d"
},
{
"path": "package.json",
"content": "{\n \"name\": \"owned-live-expense-report\",\n \"private\": true,\n \"type\": \"module\",\n \"scripts\": {\n \"test\": \"node --test test/expense.test.mjs\",\n \"build\": \"node scripts/build.mjs\"\n }\n}\n",
"sha256": "6ad63026b2fe9de7513a4f6704c372a86108ee3d018a1f04883dc0a409ea4c24"
},
{
"path": "README.md",
"content": "# Expense report acceptance\nRepair the three source modules using the immutable original nine tests; do not edit checks or owner files.\n",
"sha256": "5e35a4dace9537e7c4cc815ce7054f73c171f053f1cccb9ff141f49ecb3c013e"
},
{
"path": "scripts/build.mjs",
"content": "import { spawnSync } from 'node:child_process';\nimport { readFileSync } from 'node:fs';\nfor (const file of ['src/amount.mjs','src/summary.mjs','src/report.mjs']) {\n const result=spawnSync(process.execPath,['--check',file],{encoding:'utf8'});\n if(result.status!==0) { process.stderr.write(result.stderr);process.exit(result.status??1); }\n if(!readFileSync(file,'utf8').trim()) throw new Error('Empty business module');\n}\nconsole.log('All three business modules compile.');\n",
"sha256": "7279bc7c707c0f3ccbae63b14f0abed248ad3755be14f9e37128124ae9267526"
},
{
"path": "src/amount.mjs",
"content": "export function amountToCents(value) { return 0; }\n",
"sha256": "84cb647328ec52dad27d288f3a6127ff3e1ad87274ae2d227ad44daa49cbb2ed"
},
{
"path": "src/report.mjs",
"content": "export function formatReport(groups) { return ''; }\n",
"sha256": "ba0a014e6e9df710d66e255a3a6f970f4e1c8af48accc81f33627029dcded7c0"
},
{
"path": "src/summary.mjs",
"content": "import { amountToCents } from './amount.mjs';\nexport function summarize(rows) { return []; }\n",
"sha256": "48829850c11ca0cd0ab5e86bbac69a0c5f90297292168c1ba6dc338e2eae6ee7"
},
{
"path": "test/expense.test.mjs",
"content": "import test from 'node:test';\nimport assert from 'node:assert/strict';\nimport { amountToCents } from '../src/amount.mjs';\nimport { summarize } from '../src/summary.mjs';\nimport { formatReport } from '../src/report.mjs';\ntest('decimal strings become exact cents including zero and refunds',()=>{\n for(const [input,expected] of [['0',0],[' 12.34 ',1234],['+2.5',250],['-1.05',-105],['-0.00',0],['0009.10',910]]) assert.equal(amountToCents(input),expected);\n});\ntest('finite decimal numbers use the same cents contract',()=>{\n for(const [input,expected] of [[0,0],[1.01,101],[2.5,250],[-4.32,-432]]) assert.equal(amountToCents(input),expected);\n});\ntest('malformed overprecision nonfinite and unsafe amounts are rejected',()=>{\n for(const input of ['',null,undefined,true,{},'1e2','1,000','.50','1.234',1.234,NaN,Infinity,'900719925474099.99']) assert.throws(()=>amountToCents(input),TypeError,String(input));\n});\ntest('independent currencies are sorted and summed without floating point loss',()=>{\n assert.deepEqual(summarize([{currency:'usd',amount:'0.10'},{currency:' CNY ',amount:3},{currency:'USD',amount:'0.20'}]),[\n {currency:'CNY',cents:300,count:1},{currency:'USD',cents:30,count:2}]);\n});\ntest('refunds cancel totals while counting every original record',()=>{\n assert.deepEqual(summarize([{currency:'eur',amount:'1.20'},{currency:'EUR',amount:'-1.20'}]),[{currency:'EUR',cents:0,count:2}]);\n});\ntest('summarizing retains caller rows and handles an empty list',()=>{\n const rows=Object.freeze([Object.freeze({currency:'usd',amount:'2.00'})]);\n assert.deepEqual(summarize(rows),[{currency:'USD',cents:200,count:1}]);assert.deepEqual(summarize([]),[]);\n});\ntest('invalid rows currency and unsafe aggregate totals are rejected',()=>{\n for(const rows of [null,{},[null],[{currency:'US',amount:'1'}],[{currency:'U1D',amount:'1'}],[{currency:'USD',amount:'1.234'}],\n [{currency:'USD',amount:'90071992547409.91'},{currency:'USD',amount:'0.01'}]]) assert.throws(()=>summarize(rows),TypeError);\n});\ntest('reports use two decimals and render negative subunit amounts',()=>{\n assert.equal(formatReport([{currency:'CNY',cents:300,count:2},{currency:'USD',cents:-105,count:1}]),'CNY 3.00 (2)\\nUSD -1.05 (1)');\n assert.equal(formatReport([{currency:'EUR',cents:-5,count:1}]),'EUR -0.05 (1)');assert.equal(formatReport([]),'');\n});\ntest('complete expense flow preserves exact decimal sums',()=>{\n assert.equal(formatReport(summarize([{currency:'usd',amount:'0.29'},{currency:'USD',amount:'-0.30'},{currency:'CNY',amount:'10.50'}])),\n 'CNY 10.50 (1)\\nUSD -0.01 (2)');\n});\n",
"sha256": "0bcda551dbaeafad9a6e3df8024492ab67d7c09956f4676c393b78249ab44839"
}
]
}
@@ -0,0 +1,5 @@
{
"path": "docs/live-delivery-t-evidence/manifest.json",
"sha256": "840623121cb5579564f0bbd4f0ef5ae924fd7432d5b7d0e32cef9f28cd436bb3",
"scope": "Immutable original T bytes remain in their committed manifest; no old task is resumed or historical artifact rewritten."
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,20 @@
> local-agent-workbench@1.24.8 build
> tsc --noEmit && vite build && node scripts/build-mobile.mjs && node scripts/build-server.mjs
vite v7.3.7 building client environment for production...
transforming...
✓ 1761 modules transformed.
rendering chunks...
computing gzip size...
dist-client/index.html 0.60 kB │ gzip: 0.41 kB
dist-client/.vite/manifest.json 0.65 kB │ gzip: 0.24 kB
dist-client/mobile.html 0.84 kB │ gzip: 0.47 kB
dist-client/assets/mobile-joLHctQw.css 12.39 kB │ gzip: 3.22 kB
dist-client/assets/desktop-DC8YSCxQ.css 173.13 kB │ gzip: 32.79 kB
dist-client/assets/mobile-DdtBN08G.js 26.97 kB │ gzip: 9.31 kB
dist-client/assets/approval-presentation-QyCkfhWb.js 227.03 kB │ gzip: 71.74 kB
dist-client/assets/desktop-CwtjTp8K.js 414.44 kB │ gzip: 117.80 kB
✓ built in 1.36s
Mobile shell built: 3 allowed assets; API and project data are never cached.
Server bundle built.
@@ -0,0 +1,122 @@
✔ reviewed application invalidates old checks, names current SHA and advances through a new approved check to Git preview (6864.5397ms)
✔ skip-tests, foreign task, unknown operations, diagnostic and parent review retain their boundaries (3154.029ms)
✔ before the first change, real baseline failures persist across later reads; passed baselines and changed sources cannot certify delivery (6887.6708ms)
✔ a rebuilt source archive binds actual generated client assets and retains its original running identity after disk changes (1739.8698ms)
✔ host challenge proof rejects a stale challenge, changed identity and changed signature (0.7458ms)
✔ stop confirmation binds the original instance, creation and loaded runtime (0.3211ms)
✔ state paths reject escaping, linked ancestors, ambiguous hardlinks and damaged JSON (734.3534ms)
✔ failed registration publishes no initialized memory and can complete after its actual inputs are supplied (2468.4879ms)
✔ host shutdown cancels an un-signalled HTTP model request and refuses later requests until recovered (2.0413ms)
✔ host shutdown cancels model-pool acquisition and releases queue ownership without inventing attempts (488.4646ms)
✔ full candidate validation returns the exact loaded-input host identity and rejects undeclared or altered files (799.5002ms)
✔ installation requires separate absolute program/data directories and a candidate in its own versions namespace (820.9922ms)
✔ staging retains the original data and pointer without querying or restarting a host (3334.5141ms)
✔ a post-pointer failure restores every original pointer byte and persistent row; a first-install failure removes only its published pointer (10905.5224ms)
✔ changed active manifest and concurrent pointer changes are rejected without overwriting the unknown record (4368.0178ms)
✔ an unregistered non-HTTP listener blocks preflight even when service-info is absent (2580.9201ms)
✔ uninstall archives its original pointer and preserves every data row/artifact instead of recursively deleting data (6809.5422ms)
✔ preflight rejects an unrelated program root or changed native bootstrap while preserving its original bytes (4273.1133ms)
✔ a changed owned bootstrap follows its candidate and a post-pointer fault restores both original bytes (17755.0158ms)
✔ an external bootstrap change after preflight is preserved and never overwritten as an update or rollback (8916.9373ms)
✔ routine engineering facts remove duplicate success excerpts while complete diagnostics and errors remain available (566.4639ms)
✔ a question about the previous workbench error receives local error context and current change states (1381.8356ms)
✔ an unknown model request stops, and explicit resume never replays the approved command (3308.1658ms)
✔ exhausted refused connections preserve tool results, and explicit resume adds no new user turn or replay (2549.4193ms)
✔ stopping during model backoff cancels further requests and clears the running request state (1361.8918ms)
✔ HTTP authentication errors are classified, redacted and never automatically retried (21.315ms)
✔ temporary HTTP service errors retry and recover with recorded attempt counts (22.9827ms)
✔ invalid and oversized protocol responses fail once with a useful response-format diagnosis (5.221ms)
✔ HTTP rate limits expose their source and obey the service retry interval before recovery (1020.2343ms)
✔ Windows commands preserve Chinese through a PowerShell pipeline into Node (781.9272ms)
✔ Windows shell syntax errors stay readable and native command exit codes are retained (907.4369ms)
✔ review and completed states do not turn a generic continue click into a new model request (467.6046ms)
✔ old session data receives a truthful historical connection diagnosis without rewriting history (627.8576ms)
✔ sealed r1-off failure fits its original 16K config with authentic latest status and readable source (12.6625ms)
✔ sealed r1-on failure fits its original 16K config with authentic latest status and readable source (9.324ms)
✔ sealed r2-on failure fits its original 16K config with authentic latest status and readable source (7.6075ms)
✔ sealed r2-off failure fits its original 16K config with authentic latest status and readable source (6.9809ms)
✔ archived native call pairs require exact saved arguments/results rather than model-written summaries (8.262ms)
✔ full system/user requirements and mandatory current failure can refuse rather than be trimmed (11.5162ms)
✔ small native input is byte-preserving; developer instructions remain mandatory after compaction (0.1716ms)
✔ older failing checks and pending proposals remain visible after a later large file read (14.5945ms)
✔ bounded result keeps every check status and cuts Unicode only on whole characters (0.5239ms)
✔ continuation reads advance through historical pages without a false pause while repeated current-Run pages still pause (1.8973ms)
✔ a new tool page replaces old latest-feedback space and still obeys its escaped protocol budget (0.4812ms)
✔ budgeted artifact pages count escaped protocol bytes and reconstruct original multilingual JSON without losing characters (9.3458ms)
✔ known artifact coverage detects semantic repeats despite changing limits, and advancing pages or direct evidence restore progress (0.3846ms)
✔ actual large artifact reads are present in the next bounded HTTP request and next_offset progresses without redoing tools (3445.4308ms)
✔ a real repeated artifact loop pauses the same Task after recorded results, survives reload and only resumes explicitly (4637.9102ms)
✔ actual HTTP continuation after reload sends distinct historically covered pages without false no_progress or replay (5097.4127ms)
✔ continuations distinguish unread source, later original line ranges and already returned result wrappers (589.2815ms)
✔ pure-file batch returns unused small-page space while mixed and historical allocation stays conservative (0.2957ms)
✔ observed upstream high input pauses before a new request, preserves reported usage and distinguishes the limiting ledger (400.1686ms)
✔ chat-completions: complete actual Unicode/CRLF pages and small source survive the next bounded wire request (2875.3915ms)
✔ responses: complete actual Unicode/CRLF pages and small source survive the next bounded wire request (2303.0569ms)
✔ anthropic-messages: complete actual Unicode/CRLF pages and small source survive the next bounded wire request (2370.8532ms)
✔ context APIs retain exact request identity, paginate archived groups and reject foreign sessions/runs (3431.5041ms)
✔ delivery reports verify request body, sealed plan and original archived bytes, and show corruption as needing verification (2218.1593ms)
✔ native seed framing reserves capacity before optional history without changing the selected window (941.0632ms)
✔ direct code evidence remains selected while recent historical-index browsing is archived within the complete request budget (1795.5499ms)
✔ one long user turn becomes bounded complete groups with exact UTF-8 history and recent JSON arguments (2985.2411ms)
✔ tool definitions, exact system bytes, output reserve and remaining Run/Task budget are accounted before requests (805.3436ms)
✔ oversized required user instructions pause intact and can be explicitly resumed after increasing the window (1440.027ms)
✔ all task instructions, constraints and acceptance remain in the runtime system instead of an eight-item or byte prefix (1232.0588ms)
✔ a newest manageable multi-tool group stays exact even beyond the working target; oversized earlier groups are archived (1014.7081ms)
✔ invalid orphan result is rejected before archive or network preparation (626.6728ms)
✔ invalid missing result is rejected before archive or network preparation (608.9599ms)
✔ invalid wrong result is rejected before archive or network preparation (604.0791ms)
✔ invalid duplicate call is rejected before archive or network preparation (774.9324ms)
✔ a group larger than the artifact limit uses verified Unicode-safe chunks without replacing tool JSON (1705.1633ms)
✔ changed or missing archived evidence stops reuse and is never silently recreated (802.9099ms)
✔ transaction failure prevents publishing a plan and any corresponding model request (1038.3653ms)
✔ the Provider rejects body mutation after a sealed plan before calling HTTP (1151.0103ms)
✔ HTTP failure and explicit same-Task resume reuse exact completed results and request hashes without repeating a command (11341.1042ms)
✔ a real process exit after plan persistence marks interruption and never issues an automatic model request (1847.457ms)
✔ a real two-reply failure replay reaches request three at 16K with complete goal, original sources and sealed tool evidence (8521.7767ms)
✔ request deduplication retains long original intent, extra requirements, constraints and acceptance without changing the stored contract (2126.4967ms)
✔ only the routine context avoids plan echoes; diagnostic API and requests without an included plan keep original observations (586.6441ms)
✔ the latest oversized session result reaches the next request together with already read source modules (2427.9074ms)
✔ every call in a large latest group keeps its actual outcome, including denied and unknown results (1955.3216ms)
✔ a small complete latest tool group is sent once and needs no duplicate feedback view (2156.5231ms)
✔ real HTTP repeated state inspection pauses after three identical engineering outcomes and preserves tool pairing (5616.1522ms)
✔ a live SQLite host with the actual 1.9 artifact object upgrades, keeps its original blobs and verifies real browser PNG bytes (4224.2785ms)
✔ failed upgrade restores the original artifact object, provider and request handler (1486.5063ms)
✔ claiming the same runtime owner twice preserves its original metadata and every database row (681.1189ms)
✔ sessions without controlled-engine history retain their prior export shape and never expose another session record (750.1556ms)
✔ live workers, controlled drivers, or MCP operations refuse an upgrade before changing handlers, managers or database rows (624.409ms)
✔ an idle upgrade loads the newly introduced engine record map, resets obsolete managers and preserves original rows, sessions and provider objects (735.229ms)
✔ an installation failure restores old managers, original record maps, handlers and all existing database rows (1557.1742ms)
✔ the owned controlled driver remains an active session and project even after outer task activity has ended (585.503ms)
✔ release and upgrade help or invalid arguments have no file or network setup side effects in an independent directory (846.8793ms)
✔ hot upgrade adopts a retained virtual data root without reopening SQLite or changing rows, Provider or routing (1504.0352ms)
✔ failed adoption restores the original virtual data-root name and original open database (516.4362ms)
✔ hot upgrade refreshes retained model and importer methods while preserving credential and routing objects (716.2492ms)
✔ hot upgrade refuses active probes and restores retained model methods if installation fails (507.9207ms)
✔ a directly started compiled host upgrades twice with the same PID, sessions, applied bytes and volatile provider (3886.2484ms)
✔ the running 0.1.0 process upgrades in place and retains its project, session, files and volatile model connection (20341.3187ms)
✔ all actually returned same-version fragments reach the bounded request, including overlap and Unicode, with independent original provenance (5262.3316ms)
✔ unread gaps and different range origins remain separate; partial sending names the precise missing already-observed range (1194.7914ms)
✔ same-SHA conflicting overlaps and invalid coordinates fail closed, while a new SHA never inherits old fragments (1147.3536ms)
✔ versioned old views keep the original single-page semantics and verification (990.9956ms)
✔ small code and actual failed command stay visible when their original multi-tool group cannot fit (1833.9844ms)
✔ mixed group retains six distinct small file observations with exact multilingual text and bounded request bytes (1897.6474ms)
✔ working observations are bound to the current Task and stop treating a pre-application file revision as current evidence (1993.9137ms)
✔ a sealed observation rejects changed or missing original result artifacts instead of recreating evidence (1356.0559ms)
✔ a real passed-check observation is excluded after a source edit invalidates the check, while its historical sent evidence remains valid (5435.4657ms)
✔ budgeted file pages reconstruct UTF-8 text including long single lines and surrogate boundaries (4.6735ms)
✔ actual HTTP multi-tool reads survive an oversized runtime snapshot and the sealed evidence survives reopening (8374.5734ms)
✔ actual HTTP file pagination advances over a long file with each returned page visible in the next request (5569.6567ms)
✔ later mixed history pages cannot displace the actual module sources and complete requirements (4923.7259ms)
✔ a later narrow page of the same file revision cannot evict the wider actual observation (2939.382ms)
✔ six small source files stay complete across metadata turns even when mandatory evidence exceeds the soft target (3015.729ms)
✔ historical read-artifact navigation points to the original artifact and next page, never its result wrapper (1137.3347ms)
✔ a 1.6.1 full-provenance sent view remains verifiable after introducing the compact view (1089.6751ms)
✔ actual HTTP requests keep four observed modules after a later large history read and preserve all source bytes (9273.3434ms)
ℹ tests 114
ℹ suites 0
ℹ pass 114
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 156379.869
@@ -0,0 +1,113 @@
✔ reviewed application invalidates old checks, names current SHA and advances through a new approved check to Git preview (7284.684ms)
✔ skip-tests, foreign task, unknown operations, diagnostic and parent review retain their boundaries (3218.4222ms)
✔ before the first change, real baseline failures persist across later reads; passed baselines and changed sources cannot certify delivery (7160.4744ms)
✔ routine engineering facts remove duplicate success excerpts while complete diagnostics and errors remain available (712.9723ms)
✔ a question about the previous workbench error receives local error context and current change states (1798.8529ms)
✔ an unknown model request stops, and explicit resume never replays the approved command (2495.5897ms)
✔ exhausted refused connections preserve tool results, and explicit resume adds no new user turn or replay (2118.0037ms)
✔ stopping during model backoff cancels further requests and clears the running request state (1411.9489ms)
✔ HTTP authentication errors are classified, redacted and never automatically retried (17.9515ms)
✔ temporary HTTP service errors retry and recover with recorded attempt counts (20.8087ms)
✔ invalid and oversized protocol responses fail once with a useful response-format diagnosis (4.8117ms)
✔ HTTP rate limits expose their source and obey the service retry interval before recovery (1006.6042ms)
✔ Windows commands preserve Chinese through a PowerShell pipeline into Node (631.3626ms)
✔ Windows shell syntax errors stay readable and native command exit codes are retained (1090.6304ms)
✔ review and completed states do not turn a generic continue click into a new model request (769.0763ms)
✔ old session data receives a truthful historical connection diagnosis without rewriting history (557.1476ms)
✔ sealed r1-off failure fits its original 16K config with authentic latest status and readable source (12.9877ms)
✔ sealed r1-on failure fits its original 16K config with authentic latest status and readable source (9.785ms)
✔ sealed r2-on failure fits its original 16K config with authentic latest status and readable source (7.5316ms)
✔ sealed r2-off failure fits its original 16K config with authentic latest status and readable source (7.0282ms)
✔ archived native call pairs require exact saved arguments/results rather than model-written summaries (8.7903ms)
✔ full system/user requirements and mandatory current failure can refuse rather than be trimmed (11.9071ms)
✔ small native input is byte-preserving; developer instructions remain mandatory after compaction (0.1657ms)
✔ older failing checks and pending proposals remain visible after a later large file read (14.4164ms)
✔ bounded result keeps every check status and cuts Unicode only on whole characters (0.4407ms)
✔ continuation reads advance through historical pages without a false pause while repeated current-Run pages still pause (1.9157ms)
✔ a new tool page replaces old latest-feedback space and still obeys its escaped protocol budget (0.4401ms)
✔ budgeted artifact pages count escaped protocol bytes and reconstruct original multilingual JSON without losing characters (9.0476ms)
✔ known artifact coverage detects semantic repeats despite changing limits, and advancing pages or direct evidence restore progress (0.352ms)
✔ actual large artifact reads are present in the next bounded HTTP request and next_offset progresses without redoing tools (3213.2698ms)
✔ a real repeated artifact loop pauses the same Task after recorded results, survives reload and only resumes explicitly (5474.5038ms)
✔ actual HTTP continuation after reload sends distinct historically covered pages without false no_progress or replay (6483.9596ms)
✔ continuations distinguish unread source, later original line ranges and already returned result wrappers (638.5985ms)
✔ pure-file batch returns unused small-page space while mixed and historical allocation stays conservative (0.3198ms)
✔ observed upstream high input pauses before a new request, preserves reported usage and distinguishes the limiting ledger (629.2444ms)
✔ chat-completions: complete actual Unicode/CRLF pages and small source survive the next bounded wire request (3452.7194ms)
✔ responses: complete actual Unicode/CRLF pages and small source survive the next bounded wire request (3265.5433ms)
✔ anthropic-messages: complete actual Unicode/CRLF pages and small source survive the next bounded wire request (3291.3409ms)
✔ context APIs retain exact request identity, paginate archived groups and reject foreign sessions/runs (4112.6712ms)
✔ delivery reports verify request body, sealed plan and original archived bytes, and show corruption as needing verification (2447.7783ms)
✔ native seed framing reserves capacity before optional history without changing the selected window (979.7585ms)
✔ direct code evidence remains selected while recent historical-index browsing is archived within the complete request budget (1403.987ms)
✔ one long user turn becomes bounded complete groups with exact UTF-8 history and recent JSON arguments (3953.0325ms)
✔ tool definitions, exact system bytes, output reserve and remaining Run/Task budget are accounted before requests (818.0986ms)
✔ oversized required user instructions pause intact and can be explicitly resumed after increasing the window (1595.8903ms)
✔ all task instructions, constraints and acceptance remain in the runtime system instead of an eight-item or byte prefix (992.4166ms)
✔ a newest manageable multi-tool group stays exact even beyond the working target; oversized earlier groups are archived (843.6233ms)
✔ invalid orphan result is rejected before archive or network preparation (577.5376ms)
✔ invalid missing result is rejected before archive or network preparation (552.2745ms)
✔ invalid wrong result is rejected before archive or network preparation (528.6487ms)
✔ invalid duplicate call is rejected before archive or network preparation (707.636ms)
✔ a group larger than the artifact limit uses verified Unicode-safe chunks without replacing tool JSON (1990.2654ms)
✔ changed or missing archived evidence stops reuse and is never silently recreated (750.5565ms)
✔ transaction failure prevents publishing a plan and any corresponding model request (803.6148ms)
✔ the Provider rejects body mutation after a sealed plan before calling HTTP (686.4617ms)
✔ HTTP failure and explicit same-Task resume reuse exact completed results and request hashes without repeating a command (8326.1142ms)
✔ a real process exit after plan persistence marks interruption and never issues an automatic model request (1430.2479ms)
✖ a real two-reply failure replay reaches request three at 16K with complete goal, original sources and sealed tool evidence (8241.1699ms)
✔ request deduplication retains long original intent, extra requirements, constraints and acceptance without changing the stored contract (1805.2576ms)
✔ only the routine context avoids plan echoes; diagnostic API and requests without an included plan keep original observations (591.1168ms)
✔ the latest oversized session result reaches the next request together with already read source modules (2105.1189ms)
✔ every call in a large latest group keeps its actual outcome, including denied and unknown results (1473.6871ms)
✔ a small complete latest tool group is sent once and needs no duplicate feedback view (1091.0731ms)
✔ real HTTP repeated state inspection pauses after three identical engineering outcomes and preserves tool pairing (4195.8245ms)
✔ all actually returned same-version fragments reach the bounded request, including overlap and Unicode, with independent original provenance (4300.9099ms)
✔ unread gaps and different range origins remain separate; partial sending names the precise missing already-observed range (927.5518ms)
✔ same-SHA conflicting overlaps and invalid coordinates fail closed, while a new SHA never inherits old fragments (1022.0439ms)
✔ versioned old views keep the original single-page semantics and verification (731.3504ms)
✔ small code and actual failed command stay visible when their original multi-tool group cannot fit (1091.5887ms)
✔ mixed group retains six distinct small file observations with exact multilingual text and bounded request bytes (1540.3818ms)
✔ working observations are bound to the current Task and stop treating a pre-application file revision as current evidence (1569.4472ms)
✔ a sealed observation rejects changed or missing original result artifacts instead of recreating evidence (1030.1386ms)
✔ a real passed-check observation is excluded after a source edit invalidates the check, while its historical sent evidence remains valid (4062.1428ms)
✔ budgeted file pages reconstruct UTF-8 text including long single lines and surrogate boundaries (4.9987ms)
✔ actual HTTP multi-tool reads survive an oversized runtime snapshot and the sealed evidence survives reopening (8150.4621ms)
✔ actual HTTP file pagination advances over a long file with each returned page visible in the next request (5260.514ms)
✔ later mixed history pages cannot displace the actual module sources and complete requirements (4840.5539ms)
✔ a later narrow page of the same file revision cannot evict the wider actual observation (3012.1338ms)
✔ six small source files stay complete across metadata turns even when mandatory evidence exceeds the soft target (3093.7698ms)
✔ historical read-artifact navigation points to the original artifact and next page, never its result wrapper (960.0703ms)
✔ a 1.6.1 full-provenance sent view remains verifiable after introducing the compact view (1087.7071ms)
✔ actual HTTP requests keep four observed modules after a later large history read and preserve all source bytes (9154.7472ms)
ℹ tests 82
ℹ suites 0
ℹ pass 81
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 106880.438
✖ failing tests:
test at tests\task-context.test.mjs:19:1
✖ a real two-reply failure replay reaches request three at 16K with complete goal, original sources and sealed tool evidence (8241.1699ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ undefined
- 'export function amountToCents(value) { return 0; }\n'
at TestContext.<anonymous> (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/tests/task-context.test.mjs:55:12)
at runNextTicks (node:internal/process/task_queues:65:5)
at process.processTimers (node:internal/timers:615:9)
at async Test.run (node:internal/test_runner/test:1409:7)
at async startSubtestAfterBootstrap (node:internal/test_runner/harness:387:3) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: undefined,
expected: 'export function amountToCents(value) { return 0; }\n',
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,64 @@
✔ reviewed application invalidates old checks, names current SHA and advances through a new approved check to Git preview (7491.5646ms)
✔ skip-tests, foreign task, unknown operations, diagnostic and parent review retain their boundaries (3299.0221ms)
✖ before the first change, real baseline failures persist across later reads; passed baselines and changed sources cannot certify delivery (4893.1984ms)
✔ all actually returned same-version fragments reach the bounded request, including overlap and Unicode, with independent original provenance (3764.9091ms)
✔ unread gaps and different range origins remain separate; partial sending names the precise missing already-observed range (943.5399ms)
✔ same-SHA conflicting overlaps and invalid coordinates fail closed, while a new SHA never inherits old fragments (1122.0816ms)
✔ versioned old views keep the original single-page semantics and verification (707.7797ms)
✔ small code and actual failed command stay visible when their original multi-tool group cannot fit (1270.005ms)
✔ mixed group retains six distinct small file observations with exact multilingual text and bounded request bytes (2019.3812ms)
✔ working observations are bound to the current Task and stop treating a pre-application file revision as current evidence (1534.7001ms)
✔ a sealed observation rejects changed or missing original result artifacts instead of recreating evidence (1326.0995ms)
✔ a real passed-check observation is excluded after a source edit invalidates the check, while its historical sent evidence remains valid (4645.4632ms)
✔ budgeted file pages reconstruct UTF-8 text including long single lines and surrogate boundaries (4.6538ms)
✔ actual HTTP multi-tool reads survive an oversized runtime snapshot and the sealed evidence survives reopening (7785.1614ms)
✖ actual HTTP file pagination advances over a long file with each returned page visible in the next request (4283.4ms)
✔ later mixed history pages cannot displace the actual module sources and complete requirements (4303.1888ms)
✔ a later narrow page of the same file revision cannot evict the wider actual observation (2431.8756ms)
✔ six small source files stay complete across metadata turns even when mandatory evidence exceeds the soft target (2508.1888ms)
✔ historical read-artifact navigation points to the original artifact and next page, never its result wrapper (835.6546ms)
✔ a 1.6.1 full-provenance sent view remains verifiable after introducing the compact view (996.5334ms)
✔ actual HTTP requests keep four observed modules after a later large history read and preserve all source bytes (9214.8238ms)
ℹ tests 21
ℹ suites 0
ℹ pass 19
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 49894.844
✖ failing tests:
test at tests\delivery-progress.test.mjs:39:1
✖ before the first change, real baseline failures persist across later reads; passed baselines and changed sources cannot certify delivery (4893.1984ms)
Error: 执行记录的身份或项目归属无效。
at ownedRecord (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/src/shared/contracts/execution.mjs:87:11)
at file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/src/server/store.mjs:173:22
at Array.map (<anonymous>)
at file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/src/server/store.mjs:172:117
at Array.flatMap (<anonymous>)
at Store.recordsFor (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/src/server/store.mjs:172:23)
at Store.save (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/src/server/store.mjs:386:55)
at Store.putRecord (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/src/server/store.mjs:665:10)
at CheckRunner.plan (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/src/core/check-runner.mjs:98:23)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
test at tests\working-set.test.mjs:222:1
✖ actual HTTP file pagination advances over a long file with each returned page visible in the next request (4283.4ms)
AssertionError [ERR_ASSERTION]: {"id":"8db3d380-b4fd-47e1-9897-cf63df466d18","source":"model_connection","origin":"upstream","stage":"model_request","kind":"service","httpStatus":500,"endpoint":"http://127.0.0.1:57716/v1","model":"file-page-fixture","route":"/chat/completions","attempts":3,"occurredAt":"2026-11-03T23:35:44.351Z","retryable":true,"title":"模型服务暂时无法处理请求","upstream":{"schema":1,"scope":"http-body","httpStatus":500,"code":null,"type":null,"message":"The newest actual budgeted page must be sent","param":null,"reason":null,"requestId":null,"responseId":null,"eventType":null,"headers":{"content-type":"application/json","date":"Tue, 03 Nov 2026 23:35:44 GMT"},"retryAfter":null,"retryAfterMs":null,"rawPreview":"{\"error\":{\"message\":\"The newest actual budgeted page must be sent\"}}","previewTruncated":false,"capture":{"scope":"http-body","receivedBytes":68,"capturedBytes":68,"storedBytes":68,"retention":"artifact","complete":true,"truncated":false,"interrupted":false,"capturedRange":[0,68],"redacted":false,"sha256":"5a2c893c215663a6b01fd3d9a8a17d6746589c9b3d5fee24ec78c4c699e01ed7"},"artifactId":"f938e728-5eb5-494e-a048-0eecf8dba0a2","artifactSha256":"5a2c893c215663a6b01fd3d9a8a17d6746589c9b3d5fee24ec78c4c699e01ed7","artifactScope":"http-body","sessionId":"8a00489b-882d-41b9-b388-3896d49e6263"},"upstreamRequestId":null,"code":null,"type":null,"limitReason":null,"wireAttemptId":"2a42c137-01cb-415f-93e0-632ea9265f9d","message":"模型服务暂时无法处理请求(HTTP 500)。 The newest actual budgeted page must be sent","detail":"The newest actual budgeted page must be sent","suggestion":"稍后重试,或检查模型服务状态。","requestUrl":"http://127.0.0.1:57716/v1/chat/completions","responseUrl":"http://127.0.0.1:57716/v1/chat/completions","redirected":false,"redirectMode":"manual","retryDecision":"attempt_limit","remainingWaitBudgetMs":297488,"runId":"8d9e7aa2-736a-4e38-adcf-059c8ac6a70e","messageId":"f2b03502-7dd7-4515-a68b-4db40b4a42d9"}
+ actual - expected
+ 'failed'
- 'completed'
at TestContext.<anonymous> (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/tests/working-set.test.mjs:240:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: 'failed',
expected: 'completed',
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,61 @@
✔ reviewed application invalidates old checks, names current SHA and advances through a new approved check to Git preview (7142.3386ms)
✔ skip-tests, foreign task, unknown operations, diagnostic and parent review retain their boundaries (2848.1591ms)
✖ before the first change, real baseline failures persist across later reads; passed baselines and changed sources cannot certify delivery (5088.5983ms)
✔ a question about the previous workbench error receives local error context and current change states (1625.3057ms)
✔ an unknown model request stops, and explicit resume never replays the approved command (2670.744ms)
✔ exhausted refused connections preserve tool results, and explicit resume adds no new user turn or replay (2076.6573ms)
✔ stopping during model backoff cancels further requests and clears the running request state (1232.15ms)
✔ HTTP authentication errors are classified, redacted and never automatically retried (18.2276ms)
✔ temporary HTTP service errors retry and recover with recorded attempt counts (7.4302ms)
✔ invalid and oversized protocol responses fail once with a useful response-format diagnosis (5.4312ms)
✔ HTTP rate limits expose their source and obey the service retry interval before recovery (1013.389ms)
✔ Windows commands preserve Chinese through a PowerShell pipeline into Node (780.9756ms)
✔ Windows shell syntax errors stay readable and native command exit codes are retained (734.556ms)
✔ review and completed states do not turn a generic continue click into a new model request (497.458ms)
✔ old session data receives a truthful historical connection diagnosis without rewriting history (722.6187ms)
✔ the latest oversized session result reaches the next request together with already read source modules (1505.3271ms)
✔ every call in a large latest group keeps its actual outcome, including denied and unknown results (1214.2756ms)
✔ a small complete latest tool group is sent once and needs no duplicate feedback view (1091.5978ms)
✔ real HTTP repeated state inspection pauses after three identical engineering outcomes and preserves tool pairing (3592.788ms)
✔ all actually returned same-version fragments reach the bounded request, including overlap and Unicode, with independent original provenance (4466.257ms)
✔ unread gaps and different range origins remain separate; partial sending names the precise missing already-observed range (776.9782ms)
✔ same-SHA conflicting overlaps and invalid coordinates fail closed, while a new SHA never inherits old fragments (939.5615ms)
✔ versioned old views keep the original single-page semantics and verification (650.005ms)
✔ small code and actual failed command stay visible when their original multi-tool group cannot fit (947.0277ms)
✔ mixed group retains six distinct small file observations with exact multilingual text and bounded request bytes (1511.7982ms)
✔ working observations are bound to the current Task and stop treating a pre-application file revision as current evidence (1644.6622ms)
✔ a sealed observation rejects changed or missing original result artifacts instead of recreating evidence (1129.2701ms)
✔ a real passed-check observation is excluded after a source edit invalidates the check, while its historical sent evidence remains valid (4193.5591ms)
✔ budgeted file pages reconstruct UTF-8 text including long single lines and surrogate boundaries (4.4328ms)
✔ actual HTTP multi-tool reads survive an oversized runtime snapshot and the sealed evidence survives reopening (7936.4707ms)
✔ actual HTTP file pagination advances over a long file with each returned page visible in the next request (4975.0468ms)
✔ later mixed history pages cannot displace the actual module sources and complete requirements (4365.3575ms)
✔ a later narrow page of the same file revision cannot evict the wider actual observation (2370.8145ms)
✔ six small source files stay complete across metadata turns even when mandatory evidence exceeds the soft target (2455.1951ms)
✔ historical read-artifact navigation points to the original artifact and next page, never its result wrapper (1006.5186ms)
✔ a 1.6.1 full-provenance sent view remains verifiable after introducing the compact view (1015.8284ms)
✔ actual HTTP requests keep four observed modules after a later large history read and preserve all source bytes (9118.6557ms)
ℹ tests 37
ℹ suites 0
ℹ pass 36
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 64878.891
✖ failing tests:
test at tests\delivery-progress.test.mjs:39:1
✖ before the first change, real baseline failures persist across later reads; passed baselines and changed sources cannot certify delivery (5088.5983ms)
Error: 执行记录的身份或项目归属无效。
at ownedRecord (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/src/shared/contracts/execution.mjs:87:11)
at file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/src/server/store.mjs:173:22
at Array.map (<anonymous>)
at file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/src/server/store.mjs:172:117
at Array.flatMap (<anonymous>)
at Store.recordsFor (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/src/server/store.mjs:172:23)
at Store.save (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/src/server/store.mjs:386:55)
at Store.putRecord (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/src/server/store.mjs:665:10)
at CheckRunner.plan (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/src/core/check-runner.mjs:98:23)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
@@ -0,0 +1,25 @@
{
"success": true,
"version": "1.24.7",
"pid": 36552,
"projects": 65,
"sessions": 81,
"tables": {
"events": 13484,
"metadata": 7,
"outbox": 13484,
"projects": 65,
"records": 6377,
"sessions": 81,
"sqlite_sequence": 1
},
"runtimeRoot": "C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench\\versions\\Agent-Workbench-1.24.7-win-x64-20261103164618190",
"sourceCommit": "7e77fd65c367b711a9a59b30ef216f5fdf7feb11",
"hasKey": true,
"active": [],
"mode": "before-recheck",
"startedAt": "2026-11-04T00:19:43.089Z",
"finishedAt": "2026-11-04T00:19:50.878Z",
"realModelRequests": 0,
"scope": "Public API/full original row/export/artifact hashes; installer retains original running host and Provider. No credential extraction or task replay."
}
@@ -0,0 +1,9 @@
{
"success": false,
"error": "AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:\n\n1 !== 0\n\n at file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/.qa/working-memory-u-formal.mjs:41:53\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)",
"mode": "before",
"startedAt": "2026-11-04T00:18:14.597Z",
"finishedAt": "2026-11-04T00:18:22.960Z",
"realModelRequests": 0,
"scope": "Public API/full original row/export/artifact hashes; installer retains original running host and Provider. No credential extraction or task replay."
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,401 @@
{
"success": true,
"version": "1.24.8",
"pid": 36552,
"runtimeRoot": "C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench\\versions\\Agent-Workbench-1.24.8-win-x64-20261103235313371",
"projects": 65,
"sessions": 81,
"hasKey": true,
"retention": {
"originalRows": "exact",
"originalExports": "exact",
"originalArtifactBytes": "exact",
"originalModelCenter": "exact"
},
"pointer": {
"schema": 1,
"app": "agent-workbench-installation",
"installId": "74c11bdd-4895-459b-8403-097f79980b41",
"revision": 24,
"dataRoot": "C:\\Users\\wangy\\AppData\\Local\\Packages\\OpenAI.Codex_2p2nqsd0c76g0\\LocalCache\\Local\\AgentWorkbench",
"port": 4318,
"active": {
"directory": "Agent-Workbench-1.24.8-win-x64-20261103235313371",
"version": "1.24.8",
"manifestSha256": "66e4f5aa52334affb39abacbbce2d4126e0701e5cf85fff101e9d4d4a2ae7e3c",
"runtimeIdentity": "6f4b7681e8393fe0c7b7441264b806662741f59c7dc818f2632ad7ceb6e67c99"
},
"previous": {
"directory": "Agent-Workbench-1.24.7-win-x64-20261103164618190",
"version": "1.24.7",
"manifestSha256": "03683cabd6b88cabdb3eb4cd159ffbabdf1b37e1576354ec3d6433d4ca773be9",
"runtimeIdentity": "212aba55ceb5eb08bb7985dd346bfb3967f5c7a36b2bc848b7e149adb50edf85"
},
"activatedAt": "2026-11-04T00:31:49.690Z"
},
"operation": {
"schema": 1,
"id": "cf21375c1777543410a2f43b2d92c4ddfbdcbed646b4b494d4281c2a79271243",
"installRoot": "C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench",
"dataRoot": "C:\\Users\\wangy\\AppData\\Local\\Packages\\OpenAI.Codex_2p2nqsd0c76g0\\LocalCache\\Local\\AgentWorkbench",
"command": "activate",
"expectedManifestSha256": "66e4f5aa52334affb39abacbbce2d4126e0701e5cf85fff101e9d4d4a2ae7e3c",
"startedAt": "2026-11-04T00:20:02.141Z",
"sequence": 1303,
"history": [
{
"stage": "preparing",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:20:02.751Z",
"finishedAt": "2026-11-04T00:20:02.757Z",
"elapsedMs": 5
},
{
"stage": "verify-current",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:20:02.757Z",
"finishedAt": "2026-11-04T00:20:02.786Z",
"elapsedMs": 29
},
{
"stage": "verify-current",
"scope": "full-manifest",
"counts": {
"completedFiles": 10949,
"totalFiles": 10949,
"completedBytes": 657252428,
"totalBytes": 657252428,
"currentPath": "scripts/upgrade-running.mjs"
},
"startedAt": "2026-11-04T00:20:02.786Z",
"finishedAt": "2026-11-04T00:21:49.309Z",
"elapsedMs": 106524
},
{
"stage": "verify-current",
"scope": "directory-inventory",
"counts": {
"completedFiles": 10950,
"totalFiles": 10950,
"completedBytes": null,
"totalBytes": null,
"currentPath": "THIRD_PARTY_NOTICES.txt"
},
"startedAt": "2026-11-04T00:21:49.309Z",
"finishedAt": "2026-11-04T00:22:30.003Z",
"elapsedMs": 40694
},
{
"stage": "verify-current",
"scope": "loaded-inputs",
"counts": {
"completedFiles": 22,
"totalFiles": 22,
"completedBytes": 9321617,
"totalBytes": 9321617,
"currentPath": "dist-server/server.mjs"
},
"startedAt": "2026-11-04T00:22:30.003Z",
"finishedAt": "2026-11-04T00:22:30.133Z",
"elapsedMs": 130
},
{
"stage": "inspect-root",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:22:30.133Z",
"finishedAt": "2026-11-04T00:22:30.162Z",
"elapsedMs": 29
},
{
"stage": "inspect-host",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:22:30.162Z",
"finishedAt": "2026-11-04T00:22:33.859Z",
"elapsedMs": 3697
},
{
"stage": "preparing",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:23:08.801Z",
"finishedAt": "2026-11-04T00:23:08.807Z",
"elapsedMs": 6
},
{
"stage": "verify-candidate",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:23:08.807Z",
"finishedAt": "2026-11-04T00:23:08.838Z",
"elapsedMs": 30
},
{
"stage": "verify-candidate",
"scope": "full-manifest",
"counts": {
"completedFiles": 10956,
"totalFiles": 10956,
"completedBytes": 657527143,
"totalBytes": 657527143,
"currentPath": "scripts/upgrade-running.mjs"
},
"startedAt": "2026-11-04T00:23:08.838Z",
"finishedAt": "2026-11-04T00:25:35.871Z",
"elapsedMs": 147033
},
{
"stage": "verify-candidate",
"scope": "directory-inventory",
"counts": {
"completedFiles": 10957,
"totalFiles": 10957,
"completedBytes": null,
"totalBytes": null,
"currentPath": "THIRD_PARTY_NOTICES.txt"
},
"startedAt": "2026-11-04T00:25:35.871Z",
"finishedAt": "2026-11-04T00:26:17.397Z",
"elapsedMs": 41527
},
{
"stage": "verify-candidate",
"scope": "loaded-inputs",
"counts": {
"completedFiles": 22,
"totalFiles": 22,
"completedBytes": 9345700,
"totalBytes": 9345700,
"currentPath": "dist-server/server.mjs"
},
"startedAt": "2026-11-04T00:26:17.397Z",
"finishedAt": "2026-11-04T00:26:17.539Z",
"elapsedMs": 141
},
{
"stage": "verify-current",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:26:17.539Z",
"finishedAt": "2026-11-04T00:26:17.567Z",
"elapsedMs": 28
},
{
"stage": "verify-current",
"scope": "full-manifest",
"counts": {
"completedFiles": 10949,
"totalFiles": 10949,
"completedBytes": 657252428,
"totalBytes": 657252428,
"currentPath": "scripts/upgrade-running.mjs"
},
"startedAt": "2026-11-04T00:26:17.567Z",
"finishedAt": "2026-11-04T00:27:19.742Z",
"elapsedMs": 62176
},
{
"stage": "verify-current",
"scope": "directory-inventory",
"counts": {
"completedFiles": 10950,
"totalFiles": 10950,
"completedBytes": null,
"totalBytes": null,
"currentPath": "THIRD_PARTY_NOTICES.txt"
},
"startedAt": "2026-11-04T00:27:19.742Z",
"finishedAt": "2026-11-04T00:28:00.996Z",
"elapsedMs": 41255
},
{
"stage": "verify-current",
"scope": "loaded-inputs",
"counts": {
"completedFiles": 22,
"totalFiles": 22,
"completedBytes": 9321617,
"totalBytes": 9321617,
"currentPath": "dist-server/server.mjs"
},
"startedAt": "2026-11-04T00:28:00.996Z",
"finishedAt": "2026-11-04T00:28:04.517Z",
"elapsedMs": 3521
},
{
"stage": "snapshot-data",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:28:04.517Z",
"finishedAt": "2026-11-04T00:28:11.360Z",
"elapsedMs": 6843
},
{
"stage": "retain-host",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:28:11.360Z",
"finishedAt": "2026-11-04T00:28:15.423Z",
"elapsedMs": 4063
},
{
"stage": "verify-data",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:28:15.423Z",
"finishedAt": "2026-11-04T00:28:22.208Z",
"elapsedMs": 6786
},
{
"stage": "verify-current",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:28:22.208Z",
"finishedAt": "2026-11-04T00:28:22.236Z",
"elapsedMs": 28
},
{
"stage": "verify-current",
"scope": "full-manifest",
"counts": {
"completedFiles": 10949,
"totalFiles": 10949,
"completedBytes": 657252428,
"totalBytes": 657252428,
"currentPath": "scripts/upgrade-running.mjs"
},
"startedAt": "2026-11-04T00:28:22.236Z",
"finishedAt": "2026-11-04T00:29:24.330Z",
"elapsedMs": 62094
},
{
"stage": "verify-current",
"scope": "directory-inventory",
"counts": {
"completedFiles": 10950,
"totalFiles": 10950,
"completedBytes": null,
"totalBytes": null,
"currentPath": "THIRD_PARTY_NOTICES.txt"
},
"startedAt": "2026-11-04T00:29:24.330Z",
"finishedAt": "2026-11-04T00:30:05.834Z",
"elapsedMs": 41505
},
{
"stage": "verify-current",
"scope": "loaded-inputs",
"counts": {
"completedFiles": 22,
"totalFiles": 22,
"completedBytes": 9321617,
"totalBytes": 9321617,
"currentPath": "dist-server/server.mjs"
},
"startedAt": "2026-11-04T00:30:05.834Z",
"finishedAt": "2026-11-04T00:30:05.968Z",
"elapsedMs": 134
},
{
"stage": "verify-candidate",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:30:05.968Z",
"finishedAt": "2026-11-04T00:30:05.996Z",
"elapsedMs": 28
},
{
"stage": "verify-candidate",
"scope": "full-manifest",
"counts": {
"completedFiles": 10956,
"totalFiles": 10956,
"completedBytes": 657527143,
"totalBytes": 657527143,
"currentPath": "scripts/upgrade-running.mjs"
},
"startedAt": "2026-11-04T00:30:05.996Z",
"finishedAt": "2026-11-04T00:31:08.115Z",
"elapsedMs": 62120
},
{
"stage": "verify-candidate",
"scope": "directory-inventory",
"counts": {
"completedFiles": 10957,
"totalFiles": 10957,
"completedBytes": null,
"totalBytes": null,
"currentPath": "THIRD_PARTY_NOTICES.txt"
},
"startedAt": "2026-11-04T00:31:08.115Z",
"finishedAt": "2026-11-04T00:31:49.545Z",
"elapsedMs": 41430
},
{
"stage": "verify-candidate",
"scope": "loaded-inputs",
"counts": {
"completedFiles": 22,
"totalFiles": 22,
"completedBytes": 9345700,
"totalBytes": 9345700,
"currentPath": "dist-server/server.mjs"
},
"startedAt": "2026-11-04T00:31:49.545Z",
"finishedAt": "2026-11-04T00:31:49.681Z",
"elapsedMs": 137
},
{
"stage": "publish-pointer",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:31:49.681Z",
"finishedAt": "2026-11-04T00:31:49.695Z",
"elapsedMs": 13
},
{
"stage": "verify-publication",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:31:49.695Z",
"finishedAt": "2026-11-04T00:31:49.743Z",
"elapsedMs": 49
}
],
"process": {
"pid": 56464,
"createdAt": "2026-11-04T00:23:07.126Z"
},
"candidate": {
"root": "C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench\\versions\\Agent-Workbench-1.24.8-win-x64-20261103235313371",
"version": "1.24.8",
"manifestSha256": "66e4f5aa52334affb39abacbbce2d4126e0701e5cf85fff101e9d4d4a2ae7e3c",
"runtimeIdentity": "6f4b7681e8393fe0c7b7441264b806662741f59c7dc818f2632ad7ceb6e67c99"
},
"state": "completed",
"stage": "completed",
"scope": null,
"counts": null,
"interruptible": false,
"label": "版本激活完成",
"detail": {
"activeVersion": "1.24.8",
"receiptFile": "C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench\\.installation\\operation-e3284edf-7f3f-4931-b156-b4c9361bbdf5.json"
},
"stageStartedAt": "2026-11-04T00:31:49.743Z",
"updatedAt": "2026-11-04T00:31:49.743Z",
"elapsedMs": 707602
},
"desktopWindows": 1,
"inspectorClosed": true,
"sourceCommit": "7e77fd65c367b711a9a59b30ef216f5fdf7feb11",
"mode": "final",
"startedAt": "2026-11-04T00:34:51.175Z",
"finishedAt": "2026-11-04T00:35:07.865Z",
"realModelRequests": 0,
"scope": "Public API/full original row/export/artifact hashes; installer retains original running host and Provider. No credential extraction or task replay."
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,401 @@
{
"success": true,
"version": "1.24.8",
"pid": 36552,
"runtimeRoot": "C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench\\versions\\Agent-Workbench-1.24.8-win-x64-20261103235313371",
"projects": 65,
"sessions": 81,
"hasKey": true,
"retention": {
"originalRows": "exact",
"originalExports": "exact",
"originalArtifactBytes": "exact",
"originalModelCenter": "exact"
},
"pointer": {
"schema": 1,
"app": "agent-workbench-installation",
"installId": "74c11bdd-4895-459b-8403-097f79980b41",
"revision": 24,
"dataRoot": "C:\\Users\\wangy\\AppData\\Local\\Packages\\OpenAI.Codex_2p2nqsd0c76g0\\LocalCache\\Local\\AgentWorkbench",
"port": 4318,
"active": {
"directory": "Agent-Workbench-1.24.8-win-x64-20261103235313371",
"version": "1.24.8",
"manifestSha256": "66e4f5aa52334affb39abacbbce2d4126e0701e5cf85fff101e9d4d4a2ae7e3c",
"runtimeIdentity": "6f4b7681e8393fe0c7b7441264b806662741f59c7dc818f2632ad7ceb6e67c99"
},
"previous": {
"directory": "Agent-Workbench-1.24.7-win-x64-20261103164618190",
"version": "1.24.7",
"manifestSha256": "03683cabd6b88cabdb3eb4cd159ffbabdf1b37e1576354ec3d6433d4ca773be9",
"runtimeIdentity": "212aba55ceb5eb08bb7985dd346bfb3967f5c7a36b2bc848b7e149adb50edf85"
},
"activatedAt": "2026-11-04T00:31:49.690Z"
},
"operation": {
"schema": 1,
"id": "cf21375c1777543410a2f43b2d92c4ddfbdcbed646b4b494d4281c2a79271243",
"installRoot": "C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench",
"dataRoot": "C:\\Users\\wangy\\AppData\\Local\\Packages\\OpenAI.Codex_2p2nqsd0c76g0\\LocalCache\\Local\\AgentWorkbench",
"command": "activate",
"expectedManifestSha256": "66e4f5aa52334affb39abacbbce2d4126e0701e5cf85fff101e9d4d4a2ae7e3c",
"startedAt": "2026-11-04T00:20:02.141Z",
"sequence": 1303,
"history": [
{
"stage": "preparing",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:20:02.751Z",
"finishedAt": "2026-11-04T00:20:02.757Z",
"elapsedMs": 5
},
{
"stage": "verify-current",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:20:02.757Z",
"finishedAt": "2026-11-04T00:20:02.786Z",
"elapsedMs": 29
},
{
"stage": "verify-current",
"scope": "full-manifest",
"counts": {
"completedFiles": 10949,
"totalFiles": 10949,
"completedBytes": 657252428,
"totalBytes": 657252428,
"currentPath": "scripts/upgrade-running.mjs"
},
"startedAt": "2026-11-04T00:20:02.786Z",
"finishedAt": "2026-11-04T00:21:49.309Z",
"elapsedMs": 106524
},
{
"stage": "verify-current",
"scope": "directory-inventory",
"counts": {
"completedFiles": 10950,
"totalFiles": 10950,
"completedBytes": null,
"totalBytes": null,
"currentPath": "THIRD_PARTY_NOTICES.txt"
},
"startedAt": "2026-11-04T00:21:49.309Z",
"finishedAt": "2026-11-04T00:22:30.003Z",
"elapsedMs": 40694
},
{
"stage": "verify-current",
"scope": "loaded-inputs",
"counts": {
"completedFiles": 22,
"totalFiles": 22,
"completedBytes": 9321617,
"totalBytes": 9321617,
"currentPath": "dist-server/server.mjs"
},
"startedAt": "2026-11-04T00:22:30.003Z",
"finishedAt": "2026-11-04T00:22:30.133Z",
"elapsedMs": 130
},
{
"stage": "inspect-root",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:22:30.133Z",
"finishedAt": "2026-11-04T00:22:30.162Z",
"elapsedMs": 29
},
{
"stage": "inspect-host",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:22:30.162Z",
"finishedAt": "2026-11-04T00:22:33.859Z",
"elapsedMs": 3697
},
{
"stage": "preparing",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:23:08.801Z",
"finishedAt": "2026-11-04T00:23:08.807Z",
"elapsedMs": 6
},
{
"stage": "verify-candidate",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:23:08.807Z",
"finishedAt": "2026-11-04T00:23:08.838Z",
"elapsedMs": 30
},
{
"stage": "verify-candidate",
"scope": "full-manifest",
"counts": {
"completedFiles": 10956,
"totalFiles": 10956,
"completedBytes": 657527143,
"totalBytes": 657527143,
"currentPath": "scripts/upgrade-running.mjs"
},
"startedAt": "2026-11-04T00:23:08.838Z",
"finishedAt": "2026-11-04T00:25:35.871Z",
"elapsedMs": 147033
},
{
"stage": "verify-candidate",
"scope": "directory-inventory",
"counts": {
"completedFiles": 10957,
"totalFiles": 10957,
"completedBytes": null,
"totalBytes": null,
"currentPath": "THIRD_PARTY_NOTICES.txt"
},
"startedAt": "2026-11-04T00:25:35.871Z",
"finishedAt": "2026-11-04T00:26:17.397Z",
"elapsedMs": 41527
},
{
"stage": "verify-candidate",
"scope": "loaded-inputs",
"counts": {
"completedFiles": 22,
"totalFiles": 22,
"completedBytes": 9345700,
"totalBytes": 9345700,
"currentPath": "dist-server/server.mjs"
},
"startedAt": "2026-11-04T00:26:17.397Z",
"finishedAt": "2026-11-04T00:26:17.539Z",
"elapsedMs": 141
},
{
"stage": "verify-current",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:26:17.539Z",
"finishedAt": "2026-11-04T00:26:17.567Z",
"elapsedMs": 28
},
{
"stage": "verify-current",
"scope": "full-manifest",
"counts": {
"completedFiles": 10949,
"totalFiles": 10949,
"completedBytes": 657252428,
"totalBytes": 657252428,
"currentPath": "scripts/upgrade-running.mjs"
},
"startedAt": "2026-11-04T00:26:17.567Z",
"finishedAt": "2026-11-04T00:27:19.742Z",
"elapsedMs": 62176
},
{
"stage": "verify-current",
"scope": "directory-inventory",
"counts": {
"completedFiles": 10950,
"totalFiles": 10950,
"completedBytes": null,
"totalBytes": null,
"currentPath": "THIRD_PARTY_NOTICES.txt"
},
"startedAt": "2026-11-04T00:27:19.742Z",
"finishedAt": "2026-11-04T00:28:00.996Z",
"elapsedMs": 41255
},
{
"stage": "verify-current",
"scope": "loaded-inputs",
"counts": {
"completedFiles": 22,
"totalFiles": 22,
"completedBytes": 9321617,
"totalBytes": 9321617,
"currentPath": "dist-server/server.mjs"
},
"startedAt": "2026-11-04T00:28:00.996Z",
"finishedAt": "2026-11-04T00:28:04.517Z",
"elapsedMs": 3521
},
{
"stage": "snapshot-data",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:28:04.517Z",
"finishedAt": "2026-11-04T00:28:11.360Z",
"elapsedMs": 6843
},
{
"stage": "retain-host",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:28:11.360Z",
"finishedAt": "2026-11-04T00:28:15.423Z",
"elapsedMs": 4063
},
{
"stage": "verify-data",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:28:15.423Z",
"finishedAt": "2026-11-04T00:28:22.208Z",
"elapsedMs": 6786
},
{
"stage": "verify-current",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:28:22.208Z",
"finishedAt": "2026-11-04T00:28:22.236Z",
"elapsedMs": 28
},
{
"stage": "verify-current",
"scope": "full-manifest",
"counts": {
"completedFiles": 10949,
"totalFiles": 10949,
"completedBytes": 657252428,
"totalBytes": 657252428,
"currentPath": "scripts/upgrade-running.mjs"
},
"startedAt": "2026-11-04T00:28:22.236Z",
"finishedAt": "2026-11-04T00:29:24.330Z",
"elapsedMs": 62094
},
{
"stage": "verify-current",
"scope": "directory-inventory",
"counts": {
"completedFiles": 10950,
"totalFiles": 10950,
"completedBytes": null,
"totalBytes": null,
"currentPath": "THIRD_PARTY_NOTICES.txt"
},
"startedAt": "2026-11-04T00:29:24.330Z",
"finishedAt": "2026-11-04T00:30:05.834Z",
"elapsedMs": 41505
},
{
"stage": "verify-current",
"scope": "loaded-inputs",
"counts": {
"completedFiles": 22,
"totalFiles": 22,
"completedBytes": 9321617,
"totalBytes": 9321617,
"currentPath": "dist-server/server.mjs"
},
"startedAt": "2026-11-04T00:30:05.834Z",
"finishedAt": "2026-11-04T00:30:05.968Z",
"elapsedMs": 134
},
{
"stage": "verify-candidate",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:30:05.968Z",
"finishedAt": "2026-11-04T00:30:05.996Z",
"elapsedMs": 28
},
{
"stage": "verify-candidate",
"scope": "full-manifest",
"counts": {
"completedFiles": 10956,
"totalFiles": 10956,
"completedBytes": 657527143,
"totalBytes": 657527143,
"currentPath": "scripts/upgrade-running.mjs"
},
"startedAt": "2026-11-04T00:30:05.996Z",
"finishedAt": "2026-11-04T00:31:08.115Z",
"elapsedMs": 62120
},
{
"stage": "verify-candidate",
"scope": "directory-inventory",
"counts": {
"completedFiles": 10957,
"totalFiles": 10957,
"completedBytes": null,
"totalBytes": null,
"currentPath": "THIRD_PARTY_NOTICES.txt"
},
"startedAt": "2026-11-04T00:31:08.115Z",
"finishedAt": "2026-11-04T00:31:49.545Z",
"elapsedMs": 41430
},
{
"stage": "verify-candidate",
"scope": "loaded-inputs",
"counts": {
"completedFiles": 22,
"totalFiles": 22,
"completedBytes": 9345700,
"totalBytes": 9345700,
"currentPath": "dist-server/server.mjs"
},
"startedAt": "2026-11-04T00:31:49.545Z",
"finishedAt": "2026-11-04T00:31:49.681Z",
"elapsedMs": 137
},
{
"stage": "publish-pointer",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:31:49.681Z",
"finishedAt": "2026-11-04T00:31:49.695Z",
"elapsedMs": 13
},
{
"stage": "verify-publication",
"scope": null,
"counts": null,
"startedAt": "2026-11-04T00:31:49.695Z",
"finishedAt": "2026-11-04T00:31:49.743Z",
"elapsedMs": 49
}
],
"process": {
"pid": 56464,
"createdAt": "2026-11-04T00:23:07.126Z"
},
"candidate": {
"root": "C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench\\versions\\Agent-Workbench-1.24.8-win-x64-20261103235313371",
"version": "1.24.8",
"manifestSha256": "66e4f5aa52334affb39abacbbce2d4126e0701e5cf85fff101e9d4d4a2ae7e3c",
"runtimeIdentity": "6f4b7681e8393fe0c7b7441264b806662741f59c7dc818f2632ad7ceb6e67c99"
},
"state": "completed",
"stage": "completed",
"scope": null,
"counts": null,
"interruptible": false,
"label": "版本激活完成",
"detail": {
"activeVersion": "1.24.8",
"receiptFile": "C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench\\.installation\\operation-e3284edf-7f3f-4931-b156-b4c9361bbdf5.json"
},
"stageStartedAt": "2026-11-04T00:31:49.743Z",
"updatedAt": "2026-11-04T00:31:49.743Z",
"elapsedMs": 707602
},
"desktopWindows": 0,
"inspectorClosed": true,
"sourceCommit": "7e77fd65c367b711a9a59b30ef216f5fdf7feb11",
"mode": "install",
"startedAt": "2026-11-04T00:19:50.952Z",
"finishedAt": "2026-11-04T00:31:57.696Z",
"realModelRequests": 0,
"scope": "Public API/full original row/export/artifact hashes; installer retains original running host and Provider. No credential extraction or task replay."
}
@@ -0,0 +1,4 @@
{
"code": 0,
"finishedAt": "2026-11-04T00:31:49.847Z"
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,16 @@
{
"observedAt": "2026-11-04T00:23:42.656Z",
"version": "1.24.7",
"pid": 36552,
"stage": "verify-candidate",
"state": "running",
"updatedAt": "2026-11-04T00:23:42.518Z",
"counts": {
"completedFiles": 2966,
"totalFiles": 10956,
"completedBytes": 525232843,
"totalBytes": 657527143,
"currentPath": "runtime/node_modules/fast-uri/test/serialize.test.js"
},
"realModelRequests": 0
}
@@ -0,0 +1,21 @@
{
"schema": 1,
"app": "agent-workbench-installation",
"installId": "74c11bdd-4895-459b-8403-097f79980b41",
"revision": 23,
"dataRoot": "C:\\Users\\wangy\\AppData\\Local\\Packages\\OpenAI.Codex_2p2nqsd0c76g0\\LocalCache\\Local\\AgentWorkbench",
"port": 4318,
"active": {
"directory": "Agent-Workbench-1.24.7-win-x64-20261103164618190",
"version": "1.24.7",
"manifestSha256": "03683cabd6b88cabdb3eb4cd159ffbabdf1b37e1576354ec3d6433d4ca773be9",
"runtimeIdentity": "212aba55ceb5eb08bb7985dd346bfb3967f5c7a36b2bc848b7e149adb50edf85"
},
"previous": {
"directory": "Agent-Workbench-1.24.6-win-x64-20261103151145294",
"version": "1.24.6",
"manifestSha256": "64aa8b2ae90df30eb33b9d2f60b458c3fcf61de7cbc778ac2d08fd0f7437127d",
"runtimeIdentity": "2c662dee28c0c61b57e2f77dbb546667af7b6938aaf848e5a6facde973cad2e1"
},
"activatedAt": "2026-11-03T17:26:38.020Z"
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,84 @@
{
"portableRoot": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.8-win-x64-20261103235313371",
"sourceRoot": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.8-source-20261103235313371",
"evidenceRoot": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.8-evidence-20261103235313371",
"portable": {
"path": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.8-win-x64-20261103235313371.zip",
"bytes": 242965056,
"sha256": "794fb13c414fb6fce5993a5b97803d1e9a818dbbe54d22700e1a4c46dfa590ec"
},
"source": {
"path": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.8-source-20261103235313371.zip",
"bytes": 1078515810,
"sha256": "066cdceb91204441d40738e87a884a749f21ad9378a0130f33309c77483f1d3d"
},
"evidence": {
"path": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.8-evidence-20261103235313371.zip",
"bytes": 837283975,
"sha256": "996c553c3b92420ae01e0eed4089e1a0f7ccef05e1004a361d79d9393e4bca6c"
},
"documentation": {
"sourceCommit": "7e77fd65c367b711a9a59b30ef216f5fdf7feb11",
"originalFiles": 21717,
"originalBytes": 2628903514,
"shippedFiles": 161,
"shippedBytes": 1205417,
"evidenceManifestSha256": "f7a58804c3628737306cbf4416147836718e7aa9882a6b9166e931f5c6ce707e"
},
"installer": {
"path": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.8-win-x64-20261103235313371-Setup.exe",
"bytes": 213358969,
"sha256": "ed429e0ccd75d06db792f5785c7e4438b4cdd989c8892be938780fc555460fe5",
"compiler": {
"version": "6.3.1",
"sha256": "3b22d36fc7e7c421d8caf780008ecdb42b14b3f0371b9bafe3cad64e6648d9cf"
},
"source": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\installer-build-d96977bd-18ff-4418-ad72-10883bd06df6\\installer.iss",
"version": "1.24.8",
"candidateDirectory": "Agent-Workbench-1.24.8-win-x64-20261103235313371",
"qaFixture": null
},
"desktopRuntime": {
"version": "45.2.0",
"sha256": "010ea51bfb528c8143513439aa93fb40754403daa2023f9decd4517da71706ab",
"bytes": 249810432,
"executable": "desktop/AgentWorkbench.exe",
"scope": "Fixed original Windows Electron runtime, full license texts, isolated application loader and native bootstrap; original executable hash unchanged."
},
"nativeLauncher": {
"bytes": 12288,
"sha256": "e3d31cb7ce5009d3ca5a96d04dc16b1add0bd1f5cde7e1304461de6713d37463",
"inputs": {
"compiler": "46809206887326d2d24db1eff1f3064de972c3451abe766b49111450a5e08e00",
"source": "1c8e7d7ee5c383897bec48e9aadb8051b47c09686f74bbf34e0b6b695cd01ae5",
"icon": "f1879074e45f01c480ad9bf50b818637cc60ad56526056c886f808a4812d7b0c"
},
"compiler": "Windows .NET Framework C# compiler; source-bound cached original output, no deterministic-build claim."
},
"nodeVersion": "v24.22.1",
"reaRuntime": {
"version": "6.8.0",
"protocolVersion": "2025-03-26",
"packages": 149,
"files": 8413,
"bytes": 142395402,
"lockSha256": "687fb3fa3089a12f239dd5e87d9fa07df55a87df4935931d495a92600a1b0f6e"
},
"portableFiles": 10956,
"licenseTexts": 135,
"browserRuntime": {
"playwrightVersion": "1.64.1",
"packages": [
{
"name": "playwright",
"version": "1.64.1",
"files": 60
},
{
"name": "playwright-core",
"version": "1.64.1",
"files": 115
}
]
}
}
@@ -0,0 +1,33 @@
{
"success": true,
"operationElapsedMs": 707602,
"driverElapsedMs": 726744,
"scopes": {
"verify-current/full-manifest": {
"count": 3,
"elapsedMs": 230794
},
"verify-current/directory-inventory": {
"count": 3,
"elapsedMs": 123454
},
"verify-current/loaded-inputs": {
"count": 3,
"elapsedMs": 3785
},
"verify-candidate/full-manifest": {
"count": 2,
"elapsedMs": 209153
},
"verify-candidate/directory-inventory": {
"count": 2,
"elapsedMs": 82957
},
"verify-candidate/loaded-inputs": {
"count": 2,
"elapsedMs": 278
}
},
"realModelRequests": 0,
"scope": "Timing from this single actual successful update; no additional installer replay. Repeated inventory/hash performance remains a separate plan."
}
@@ -0,0 +1,63 @@
{
"passed": true,
"results": [
{
"id": "26a57941-93d6-41e8-a94d-fa651d548973",
"requestSha256": "5949bebb196bd6669cb37f08cda67de760da3d8c3da196938adb5cff7f03cc99",
"workingSetViewVersion": 3,
"latestToolsViewVersion": 2,
"passed": true
},
{
"id": "e563a13e-55c7-4383-8206-558095402968",
"requestSha256": "205f0b4873ba4dfdd160cc8ad89d926448c571bf4e7d7ae4a3e85e6c217f1e48",
"workingSetViewVersion": 3,
"latestToolsViewVersion": 2,
"passed": true
},
{
"id": "925b963a-7530-4a76-a4e0-79f05b9edad9",
"requestSha256": "657d7d990d3ab49b3e49d3bd979acd845a755f58c65f026cdc4ac078010e8842",
"workingSetViewVersion": 3,
"latestToolsViewVersion": 2,
"passed": true
},
{
"id": "e649c2d4-473b-439d-b547-e27ac76e78b8",
"requestSha256": "f196299dcfc8916f6825c7b04f2f728ed107cd7599d6a01cbcc36f9f4e991df0",
"workingSetViewVersion": 3,
"latestToolsViewVersion": 2,
"passed": true
},
{
"id": "d0afcd6a-edfb-41a8-8f8f-754ebbc4e2f3",
"requestSha256": "7730a738a187d49d7875c8bb37325e06d5c5f267585a734f356d9b3d8af05c26",
"workingSetViewVersion": 3,
"latestToolsViewVersion": 2,
"passed": true
},
{
"id": "d52424c1-8fe4-464c-8e73-434bf77e2663",
"requestSha256": "6ca6f8a9e207279d25229316044518fa2a97692568e7fa2ac9497b5430d3071b",
"workingSetViewVersion": 3,
"latestToolsViewVersion": 2,
"passed": true
},
{
"id": "60c19ef8-ea40-441b-a578-e63c0f1288f2",
"requestSha256": "99bb1800ae57968fb7d984abfc1a2d7e7ed45a1cf4103783214a911003c1f747",
"workingSetViewVersion": 3,
"latestToolsViewVersion": 2,
"passed": true
},
{
"id": "aeea5541-c7fa-485c-9e58-f0eb06da126f",
"requestSha256": "4b055539bb7c2a63fe0a2b791baea54e18a976b45c853bcdf3548657e7098527",
"workingSetViewVersion": 3,
"latestToolsViewVersion": 2,
"passed": true
}
],
"externalModelRequests": 0,
"originalRequestsRewritten": 0
}
@@ -0,0 +1 @@
{"success":false,"appRoot":"D:\\Ai-project\\REA逆向\\Agent-Workbench","checks":[],"error":"AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:\n+ actual - expected\n\n+ undefined\n- 'checks'\n\n at file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/scripts/verify-working-memory.mjs:52:11\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async until (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/tests/helpers.mjs:38:12)\n at async file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/scripts/verify-working-memory.mjs:51:2","requests":3,"realModelRequests":0,"root":"D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\working-memory-host-6b23c8f2-3311-4f41-9d8a-5d74424b76f0"}
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

@@ -0,0 +1,558 @@
Window: "Agent Workbench · 本地编程工作台", App: AgentWorkbench.exe.
0 窗口 Agent Workbench · 本地编程工作台 Secondary Actions: Raise
1 窗格 (disabled)
2 区域 Agent Workbench · 本地编程工作台
3 区域
4 区域
5 区域
6 区域
7 菜单栏
8 按钮 工作台
9 按钮 编辑 ID: view_1
10 区域
11 区域
13 文档 Agent Workbench · 本地编程工作台 Value: http://127.0.0.1:4318/?desktop=1&release=1.24.8 ID: RootWebArea
14 组 ID: root
15 补充
16 文本 AW
17 文本 Agent Workbench
18 文本 本地编程工作台 · 正式版
19 按钮 收起项目栏 Description: 收起项目栏
20 文本 当前项目
21 组合框 (settable, string) 当前项目 Value: starter-project
22 按钮 打开项目 Description: 打开项目
88 文本 D:\Ai-project\REA逆向\Agent-Workbench\releases\Agent-Workbench-0.1.0-win-x64\examples\starter-project
23 文本 任务会话
24 按钮 新建任务 Description: 新建任务
25 按钮 新建任务 ↵
89 按钮 创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D
90 按钮 归档会话 创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D Description: 归档会话 创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D
91 按钮 了解这个项目,并提出一项改进
92 按钮 归档会话 了解这个项目,并提出一项改进 Description: 归档会话 了解这个项目,并提出一项改进
27 文本 项目文件
28 文本 5
29 按钮 刷新文件 Description: 刷新文件
30 编辑 (settable, string) 筛选文件 Description: 筛选文件
31 文本 ⌃ K
93 按钮 src Description: src
94 按钮 catalog.js Description: src/catalog.js
95 按钮 tests Description: tests
96 按钮 catalog.test.mjs Description: tests/catalog.test.mjs
97 按钮 package.json Description: package.json
98 按钮 pelican-cycle.html Description: pelican-cycle.html
99 按钮 README.md Description: README.md
32 按钮 机制研究与设计
33 按钮 项目记忆
34 按钮 运行诊断
35 按钮 选择与管理模型
36 文本 本地服务已连接
37 按钮 版本与更新
38 主要
39 章节标题
40 文本 starter-project
41 文本 任务
42 标题 创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D
43 按钮 手机连接
44 按钮 桌面宿主
45 按钮 打开模型中心
46 按钮 切换当前模型 Description: 选择模型、模型池或添加连接
47 文本 本地项目
100 文本 已完成
49 按钮 运行诊断 Description: 运行诊断
50 按钮 项目技能 Description: 项目技能
51 按钮 项目MCP工具 Description: 项目MCP工具
52 按钮 查看任务记录 Description: 查看任务记录
53 按钮 隔离协作 Description: 隔离协作
54 按钮 工程评测 Description: 工程评测
55 按钮 本地代理引擎 Description: 本地代理引擎
56 按钮 REA 工件研究 Description: REA 工件研究
101 按钮 导出会话 Description: 导出会话
57 区域 任务对话
102 文本 你
103 文本 你的任务
104 time
105 文本 20:08
106 文本 创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D动画,无需测试。
107 按钮 模型响应已收到 模型服务 5.6s
108 文本 AW
109 文本 编程助手
110 time
111 文本 20:09
112 文本 我会制作一个可直接在浏览器打开的独立 HTML,用 SVG 绘制鹈鹕、自行车和沿途风景,加入踩踏、车轮转动与背景移动动画。按你的要求,不运行测试。
113 按钮 识别工程与Git基线 0.1s
114 按钮 模型连接失败 模型服务 · 第 2 次 60.0s
115 组 模型输出片段
116 文本 输出未完成
117 文本 Chat Completions
118 文本 ·
119 文本 0
120 文本 字符
121 文本 · 1 个工具参数片段
122 文本 片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
123 文本 ·
124 文本 工作台
125 time
126 文本 20:11
127 警报
128 文本 模型连接
129 文本 模型服务响应超时
130 文本 模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
131 文本 可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
132 文本 发生在请求模型响应时
133 文本 1
134 文本 次请求
135 详细信息
136 开合三角标记 查看错误详情
137 文本 查看错误详情
138 按钮 查看运行诊断
139 文本 ·
140 文本 工作台
141 time
142 文本 20:47
143 文本 从已保存的执行记录继续,已完成的工具结果保留。
144 按钮 模型连接失败 模型服务 · 第 2 次 60.0s
145 组 模型输出片段
146 文本 输出未完成
147 文本 Chat Completions
148 文本 ·
149 文本 0
150 文本 字符
151 文本 · 1 个工具参数片段
152 文本 片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
153 文本 ·
154 文本 工作台
155 time
156 文本 20:49
157 警报
158 文本 模型连接
159 文本 模型服务响应超时
160 文本 模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
161 文本 可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
162 文本 发生在请求模型响应时
163 文本 1
164 文本 次请求
165 详细信息
166 开合三角标记 查看错误详情
167 文本 查看错误详情
168 按钮 查看运行诊断
169 文本 ·
170 文本 工作台
171 time
172 文本 21:03
173 文本 从已保存的执行记录继续,已完成的工具结果保留。
174 按钮 模型连接失败 模型服务 · 第 2 次 60.0s
175 组 模型输出片段
176 文本 输出未完成
177 文本 Chat Completions
178 文本 ·
179 文本 0
180 文本 字符
181 文本 · 1 个工具参数片段
182 文本 片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
183 文本 ·
184 文本 工作台
185 time
186 文本 21:05
187 警报
188 文本 模型连接
189 文本 模型服务响应超时
190 文本 模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
191 文本 可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
192 文本 发生在请求模型响应时
193 文本 1
194 文本 次请求
195 详细信息
196 开合三角标记 查看错误详情
197 文本 查看错误详情
198 按钮 查看运行诊断
199 文本 ·
200 文本 工作台
201 time
202 文本 21:26
203 文本 从已保存的执行记录继续,已完成的工具结果保留。
204 按钮 模型响应已收到 模型服务 121.1s
205 按钮 准备文件改动 pelican-cycle.html 0.0s
206 文本 整理请求上下文
207 文本 完整请求输入估算 13568 → 8741 tokens;省略 1 个完整消息组,原历史和参数已保存为SHA256工件。估算与服务实际用量分别记录。
208 按钮 模型响应已收到 模型服务 8.6s
209 文本 AW
210 文本 编程助手
211 time
212 文本 21:28
213 文本 已准备好
214 文本 pelican-cycle.html
215 文本 的文件提案,内容为 SVG 绘制的鹈鹕骑自行车 2D 动画。
216 文本 请在改动面板查看差异并点击“应用”;应用后即可用浏览器打开该 HTML。当前提案尚未写入项目。
217 文本 按你的要求,未运行测试。
218 文本 ·
219 文本 工作台
220 time
221 文本 21:28
222 文本 文件已审查并应用:pelican-cycle.html。按照原要求未运行测试,可在文件列表打开结果。
223 文本 已应用 pelican-cycle.html
224 文本 写入前基线检查通过,已创建新文件。
67 章节页脚
68 按钮 添加截图
69 文本 每任务1张 · PNG/JPEG · 原图≤2MB
70 编辑 (settable, string) 任务内容 Description: 描述项目任务,或询问工作台的执行状态与报错…
71 文本 starter-project
72 文本 高性能
73 按钮 (disabled) 发送任务
74 文本 Ctrl + Enter 发送 · 会话自动保存
75 文本 上下文估算 8,741 tokens
76 补充
77 缩略图 调整检视区宽度 Value: 50
78 按钮 文件
79 按钮 改动
80 按钮 轨迹
81 按钮 任务
82 按钮 索引
83 按钮 浏览
84 按钮 放大检视区 Description: 放大检视区
85 标题 查看项目文件
86 文本 从左侧打开文件,或让助手先读取项目。
87 文本 读取范围限定在当前项目
12 区域
Document text: ```
AW
Agent Workbench
本地编程工作台 · 正式版
收起项目栏
当前项目
当前项目
打开项目
D:\Ai-project\REA逆向\Agent-Workbench\releases\Agent-Workbench-0.1.0-win-x64\examples\starter-projectD:\Ai-project\REA逆向\Agent-Wor…
任务会话
新建任务
新建任务
↵
创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D创建一个HTML,内容是SVG…
归档会话 创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D
了解这个项目,并提出一项改进了解这个项目,并提出一项…
归档会话 了解这个项目,并提出一项改进
项目文件 5
刷新文件
筛选文件
⌃ K
src
catalog.js
tests
catalog.test.mjs
package.json
pelican-cycle.html
README.md
机制研究与设计
项目记忆
运行诊断
模型与连接
高性能
本地服务已连接
v1.24.8
starter-project任务
创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D创建一个HTML,内容是SVG绘制一…
手机连接
桌面宿主
模型中心
高性能
本地项目
已完成
运行诊断
项目技能
项目MCP工具
查看任务记录
隔离协作
工程评测
本地代理引擎
REA 工件研究
导出会话
你
你的任务
20:08
创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D动画,无需测试。
模型响应已收到
模型服务
5.6s
AW
编程助手
20:09
我会制作一个可直接在浏览器打开的独立 HTML,用 SVG 绘制鹈鹕、自行车和沿途风景,加入踩踏、车轮转动与背景移动动画。按你的要求,不运行测试。
识别工程与Git基线
0.1s
模型连接失败
模型服务 · 第 2 次
60.0s
输出未完成
Chat Completions · 0 字符 · 1 个工具参数片段
片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
·
工作台
20:11
模型连接
模型服务响应超时
模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
发生在请求模型响应时
1 次请求
查看错误详情
查看运行诊断
·
工作台
20:47
从已保存的执行记录继续,已完成的工具结果保留。
模型连接失败
模型服务 · 第 2 次
60.0s
输出未完成
Chat Completions · 0 字符 · 1 个工具参数片段
片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
·
工作台
20:49
模型连接
模型服务响应超时
模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
发生在请求模型响应时
1 次请求
查看错误详情
查看运行诊断
·
工作台
21:03
从已保存的执行记录继续,已完成的工具结果保留。
模型连接失败
模型服务 · 第 2 次
60.0s
输出未完成
Chat Completions · 0 字符 · 1 个工具参数片段
片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
·
工作台
21:05
模型连接
模型服务响应超时
模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
发生在请求模型响应时
1 次请求
查看错误详情
查看运行诊断
·
工作台
21:26
从已保存的执行记录继续,已完成的工具结果保留。
模型响应已收到
模型服务
121.1s
准备文件改动
pelican-cycle.html
0.0s
整理请求上下文
完整请求输入估算 13568 → 8741 tokens;省略 1 个完整消息组,原历史和参数已保存为SHA256工件。估算与服务实际用量分别记录。
模型响应已收到
模型服务
8.6s
AW
编程助手
21:28
已准备好 pelican-cycle.html 的文件提案,内容为 SVG 绘制的鹈鹕骑自行车 2D 动画。
请在改动面板查看差异并点击“应用”;应用后即可用浏览器打开该 HTML。当前提案尚未写入项目。
按你的要求,未运行测试。
·
工作台
21:28
文件已审查并应用:pelican-cycle.html。按照原要求未运行测试,可在文件列表打开结果。
已应用 pelican-cycle.html
写入前基线检查通过,已创建新文件。
添加截图
每任务1张 · PNG/JPEG · 原图≤2MB
任务内容
starter-project
高性能
发送任务
Ctrl + Enter 发送 · 会话自动保存
上下文估算 8,741 tokens
调整检视区宽度
文件
改动
轨迹
任务
索引
浏览
放大检视区

查看项目文件
从左侧打开文件,或让助手先读取项目。
读取范围限定在当前项目
```
AW
Agent Workbench
本地编程工作台 · 正式版
收起项目栏
当前项目
当前项目
打开项目
D:\Ai-project\REA逆向\Agent-Workbench\releases\Agent-Workbench-0.1.0-win-x64\examples\starter-projectD:\Ai-project\REA逆向\Agent-Wor…
任务会话
新建任务
新建任务
↵
创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D创建一个HTML,内容是SVG…
归档会话 创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D
了解这个项目,并提出一项改进了解这个项目,并提出一项…
归档会话 了解这个项目,并提出一项改进
项目文件 5
刷新文件
筛选文件
⌃ K
src
catalog.js
tests
catalog.test.mjs
package.json
pelican-cycle.html
README.md
机制研究与设计
项目记忆
运行诊断
模型与连接
高性能
本地服务已连接
v1.24.8
starter-project任务
创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D创建一个HTML,内容是SVG绘制一…
手机连接
桌面宿主
模型中心
高性能
本地项目
已完成
运行诊断
项目技能
项目MCP工具
查看任务记录
隔离协作
工程评测
本地代理引擎
REA 工件研究
导出会话
你
你的任务
20:08
创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D动画,无需测试。
模型响应已收到
模型服务
5.6s
AW
编程助手
20:09
我会制作一个可直接在浏览器打开的独立 HTML,用 SVG 绘制鹈鹕、自行车和沿途风景,加入踩踏、车轮转动与背景移动动画。按你的要求,不运行测试。
识别工程与Git基线
0.1s
模型连接失败
模型服务 · 第 2 次
60.0s
输出未完成
Chat Completions · 0 字符 · 1 个工具参数片段
片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
·
工作台
20:11
模型连接
模型服务响应超时
模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
发生在请求模型响应时
1 次请求
查看错误详情
查看运行诊断
·
工作台
20:47
从已保存的执行记录继续,已完成的工具结果保留。
模型连接失败
模型服务 · 第 2 次
60.0s
输出未完成
Chat Completions · 0 字符 · 1 个工具参数片段
片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
·
工作台
20:49
模型连接
模型服务响应超时
模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
发生在请求模型响应时
1 次请求
查看错误详情
查看运行诊断
·
工作台
21:03
从已保存的执行记录继续,已完成的工具结果保留。
模型连接失败
模型服务 · 第 2 次
60.0s
输出未完成
Chat Completions · 0 字符 · 1 个工具参数片段
片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
·
工作台
21:05
模型连接
模型服务响应超时
模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
发生在请求模型响应时
1 次请求
查看错误详情
查看运行诊断
·
工作台
21:26
从已保存的执行记录继续,已完成的工具结果保留。
模型响应已收到
模型服务
121.1s
准备文件改动
pelican-cycle.html
0.0s
整理请求上下文
完整请求输入估算 13568 → 8741 tokens;省略 1 个完整消息组,原历史和参数已保存为SHA256工件。估算与服务实际用量分别记录。
模型响应已收到
模型服务
8.6s
AW
编程助手
21:28
已准备好 pelican-cycle.html 的文件提案,内容为 SVG 绘制的鹈鹕骑自行车 2D 动画。
请在改动面板查看差异并点击“应用”;应用后即可用浏览器打开该 HTML。当前提案尚未写入项目。
按你的要求,未运行测试。
·
工作台
21:28
文件已审查并应用:pelican-cycle.html。按照原要求未运行测试,可在文件列表打开结果。
已应用 pelican-cycle.html
写入前基线检查通过,已创建新文件。
添加截图
每任务1张 · PNG/JPEG · 原图≤2MB
任务内容
starter-project
高性能
发送任务
Ctrl + Enter 发送 · 会话自动保存
上下文估算 8,741 tokens
调整检视区宽度
文件
改动
轨迹
任务
索引
浏览
放大检视区

查看项目文件
从左侧打开文件,或让助手先读取项目。
读取范围限定在当前项目
Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

@@ -0,0 +1,559 @@
Window: "Agent Workbench · 本地编程工作台", App: AgentWorkbench.exe.
0 窗口 Agent Workbench · 本地编程工作台 Secondary Actions: Raise
1 窗格 (disabled)
2 区域 Agent Workbench · 本地编程工作台
3 区域
4 区域
5 区域
6 区域
7 菜单栏
8 按钮 工作台
9 按钮 编辑 ID: view_1
10 区域
11 区域
12 文档 Agent Workbench · 本地编程工作台 Value: http://127.0.0.1:4318/?desktop=1&release=1.24.7 ID: RootWebArea
13 组
14 组 ID: root
15 补充
16 文本 AW
17 文本 Agent Workbench
18 文本 本地编程工作台 · 正式版
19 按钮 收起项目栏 Description: 收起项目栏
20 文本 当前项目
21 组合框 (settable, string) 当前项目 Value: starter-project
22 按钮 打开项目 Description: 打开项目
23 文本 D:\Ai-project\REA逆向\Agent-Workbench\releases\Agent-Workbench-0.1.0-win-x64\examples\starter-project
24 文本 任务会话
25 按钮 新建任务 Description: 新建任务
26 按钮 新建任务 ↵
27 按钮 创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D
28 按钮 归档会话 创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D Description: 归档会话 创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D
29 按钮 了解这个项目,并提出一项改进
30 按钮 归档会话 了解这个项目,并提出一项改进 Description: 归档会话 了解这个项目,并提出一项改进
31 文本 项目文件
32 文本 5
33 按钮 刷新文件 Description: 刷新文件
34 编辑 (settable, string) 筛选文件 Description: 筛选文件
35 文本 ⌃ K
36 按钮 src Description: src
37 按钮 catalog.js Description: src/catalog.js
38 按钮 tests Description: tests
39 按钮 catalog.test.mjs Description: tests/catalog.test.mjs
40 按钮 package.json Description: package.json
41 按钮 pelican-cycle.html Description: pelican-cycle.html
42 按钮 README.md Description: README.md
43 按钮 机制研究与设计
44 按钮 项目记忆
45 按钮 运行诊断
46 按钮 选择与管理模型
47 文本 本地服务已连接
48 按钮 版本与更新
49 主要
50 章节标题
51 文本 starter-project
52 文本 任务
53 标题 创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D
54 按钮 手机连接
55 按钮 桌面宿主
56 按钮 打开模型中心
57 按钮 切换当前模型 Description: 选择模型、模型池或添加连接
58 文本 本地项目
59 文本 已完成
60 按钮 运行诊断 Description: 运行诊断
61 按钮 项目技能 Description: 项目技能
62 按钮 项目MCP工具 Description: 项目MCP工具
63 按钮 查看任务记录 Description: 查看任务记录
64 按钮 隔离协作 Description: 隔离协作
65 按钮 工程评测 Description: 工程评测
66 按钮 本地代理引擎 Description: 本地代理引擎
67 按钮 REA 工件研究 Description: REA 工件研究
68 按钮 导出会话 Description: 导出会话
69 区域 任务对话
70 文本 你
71 文本 你的任务
72 time
73 文本 20:08
74 文本 创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D动画,无需测试。
75 按钮 模型响应已收到 模型服务 5.6s
76 文本 AW
77 文本 编程助手
78 time
79 文本 20:09
80 文本 我会制作一个可直接在浏览器打开的独立 HTML,用 SVG 绘制鹈鹕、自行车和沿途风景,加入踩踏、车轮转动与背景移动动画。按你的要求,不运行测试。
81 按钮 识别工程与Git基线 0.1s
82 按钮 模型连接失败 模型服务 · 第 2 次 60.0s
83 组 模型输出片段
84 文本 输出未完成
85 文本 Chat Completions
86 文本 ·
87 文本 0
88 文本 字符
89 文本 · 1 个工具参数片段
90 文本 片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
91 文本 ·
92 文本 工作台
93 time
94 文本 20:11
95 警报
96 文本 模型连接
97 文本 模型服务响应超时
98 文本 模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
99 文本 可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
100 文本 发生在请求模型响应时
101 文本 1
102 文本 次请求
103 详细信息
104 开合三角标记 查看错误详情
105 文本 查看错误详情
106 按钮 查看运行诊断
107 文本 ·
108 文本 工作台
109 time
110 文本 20:47
111 文本 从已保存的执行记录继续,已完成的工具结果保留。
112 按钮 模型连接失败 模型服务 · 第 2 次 60.0s
113 组 模型输出片段
114 文本 输出未完成
115 文本 Chat Completions
116 文本 ·
117 文本 0
118 文本 字符
119 文本 · 1 个工具参数片段
120 文本 片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
121 文本 ·
122 文本 工作台
123 time
124 文本 20:49
125 警报
126 文本 模型连接
127 文本 模型服务响应超时
128 文本 模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
129 文本 可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
130 文本 发生在请求模型响应时
131 文本 1
132 文本 次请求
133 详细信息
134 开合三角标记 查看错误详情
135 文本 查看错误详情
136 按钮 查看运行诊断
137 文本 ·
138 文本 工作台
139 time
140 文本 21:03
141 文本 从已保存的执行记录继续,已完成的工具结果保留。
142 按钮 模型连接失败 模型服务 · 第 2 次 60.0s
143 组 模型输出片段
144 文本 输出未完成
145 文本 Chat Completions
146 文本 ·
147 文本 0
148 文本 字符
149 文本 · 1 个工具参数片段
150 文本 片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
151 文本 ·
152 文本 工作台
153 time
154 文本 21:05
155 警报
156 文本 模型连接
157 文本 模型服务响应超时
158 文本 模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
159 文本 可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
160 文本 发生在请求模型响应时
161 文本 1
162 文本 次请求
163 详细信息
164 开合三角标记 查看错误详情
165 文本 查看错误详情
166 按钮 查看运行诊断
167 文本 ·
168 文本 工作台
169 time
170 文本 21:26
171 文本 从已保存的执行记录继续,已完成的工具结果保留。
172 按钮 模型响应已收到 模型服务 121.1s
173 按钮 准备文件改动 pelican-cycle.html 0.0s
174 文本 整理请求上下文
175 文本 完整请求输入估算 13568 → 8741 tokens;省略 1 个完整消息组,原历史和参数已保存为SHA256工件。估算与服务实际用量分别记录。
176 按钮 模型响应已收到 模型服务 8.6s
177 文本 AW
178 文本 编程助手
179 time
180 文本 21:28
181 文本 已准备好
182 文本 pelican-cycle.html
183 文本 的文件提案,内容为 SVG 绘制的鹈鹕骑自行车 2D 动画。
184 文本 请在改动面板查看差异并点击“应用”;应用后即可用浏览器打开该 HTML。当前提案尚未写入项目。
185 文本 按你的要求,未运行测试。
186 文本 ·
187 文本 工作台
188 time
189 文本 21:28
190 文本 文件已审查并应用:pelican-cycle.html。按照原要求未运行测试,可在文件列表打开结果。
191 文本 已应用 pelican-cycle.html
192 文本 写入前基线检查通过,已创建新文件。
193 章节页脚
194 按钮 添加截图
195 文本 每任务1张 · PNG/JPEG · 原图≤2MB
196 编辑 (settable, string) 任务内容 Description: 描述项目任务,或询问工作台的执行状态与报错…
197 文本 starter-project
198 文本 高性能
199 按钮 (disabled) 发送任务
200 文本 Ctrl + Enter 发送 · 会话自动保存
201 文本 上下文估算 8,741 tokens
202 补充
203 缩略图 调整检视区宽度 Value: 50
204 按钮 文件
205 按钮 改动
206 按钮 轨迹
207 按钮 任务
208 按钮 索引
209 按钮 浏览
210 按钮 放大检视区 Description: 放大检视区
211 标题 查看项目文件
212 文本 从左侧打开文件,或让助手先读取项目。
213 文本 读取范围限定在当前项目
214 区域
Document text: ```
AW
Agent Workbench
本地编程工作台 · 正式版
收起项目栏
当前项目
当前项目
打开项目
D:\Ai-project\REA逆向\Agent-Workbench\releases\Agent-Workbench-0.1.0-win-x64\examples\starter-projectD:\Ai-project\REA逆向\Agent-Wor…
任务会话
新建任务
新建任务
↵
创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D创建一个HTML,内容是SVG…
归档会话 创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D
了解这个项目,并提出一项改进了解这个项目,并提出一项…
归档会话 了解这个项目,并提出一项改进
项目文件 5
刷新文件
筛选文件
⌃ K
src
catalog.js
tests
catalog.test.mjs
package.json
pelican-cycle.html
README.md
机制研究与设计
项目记忆
运行诊断
模型与连接
高性能
本地服务已连接
v1.24.7
starter-project任务
创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D创建一个HTML,内容是SVG绘制一…
手机连接
桌面宿主
模型中心
高性能
本地项目
已完成
运行诊断
项目技能
项目MCP工具
查看任务记录
隔离协作
工程评测
本地代理引擎
REA 工件研究
导出会话
你
你的任务
20:08
创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D动画,无需测试。
模型响应已收到
模型服务
5.6s
AW
编程助手
20:09
我会制作一个可直接在浏览器打开的独立 HTML,用 SVG 绘制鹈鹕、自行车和沿途风景,加入踩踏、车轮转动与背景移动动画。按你的要求,不运行测试。
识别工程与Git基线
0.1s
模型连接失败
模型服务 · 第 2 次
60.0s
输出未完成
Chat Completions · 0 字符 · 1 个工具参数片段
片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
·
工作台
20:11
模型连接
模型服务响应超时
模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
发生在请求模型响应时
1 次请求
查看错误详情
查看运行诊断
·
工作台
20:47
从已保存的执行记录继续,已完成的工具结果保留。
模型连接失败
模型服务 · 第 2 次
60.0s
输出未完成
Chat Completions · 0 字符 · 1 个工具参数片段
片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
·
工作台
20:49
模型连接
模型服务响应超时
模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
发生在请求模型响应时
1 次请求
查看错误详情
查看运行诊断
·
工作台
21:03
从已保存的执行记录继续,已完成的工具结果保留。
模型连接失败
模型服务 · 第 2 次
60.0s
输出未完成
Chat Completions · 0 字符 · 1 个工具参数片段
片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
·
工作台
21:05
模型连接
模型服务响应超时
模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
发生在请求模型响应时
1 次请求
查看错误详情
查看运行诊断
·
工作台
21:26
从已保存的执行记录继续,已完成的工具结果保留。
模型响应已收到
模型服务
121.1s
准备文件改动
pelican-cycle.html
0.0s
整理请求上下文
完整请求输入估算 13568 → 8741 tokens;省略 1 个完整消息组,原历史和参数已保存为SHA256工件。估算与服务实际用量分别记录。
模型响应已收到
模型服务
8.6s
AW
编程助手
21:28
已准备好 pelican-cycle.html 的文件提案,内容为 SVG 绘制的鹈鹕骑自行车 2D 动画。
请在改动面板查看差异并点击“应用”;应用后即可用浏览器打开该 HTML。当前提案尚未写入项目。
按你的要求,未运行测试。
·
工作台
21:28
文件已审查并应用:pelican-cycle.html。按照原要求未运行测试,可在文件列表打开结果。
已应用 pelican-cycle.html
写入前基线检查通过,已创建新文件。
添加截图
每任务1张 · PNG/JPEG · 原图≤2MB
任务内容
starter-project
高性能
发送任务
Ctrl + Enter 发送 · 会话自动保存
上下文估算 8,741 tokens
调整检视区宽度
文件
改动
轨迹
任务
索引
浏览
放大检视区

查看项目文件
从左侧打开文件,或让助手先读取项目。
读取范围限定在当前项目
```
AW
Agent Workbench
本地编程工作台 · 正式版
收起项目栏
当前项目
当前项目
打开项目
D:\Ai-project\REA逆向\Agent-Workbench\releases\Agent-Workbench-0.1.0-win-x64\examples\starter-projectD:\Ai-project\REA逆向\Agent-Wor…
任务会话
新建任务
新建任务
↵
创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D创建一个HTML,内容是SVG…
归档会话 创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D
了解这个项目,并提出一项改进了解这个项目,并提出一项…
归档会话 了解这个项目,并提出一项改进
项目文件 5
刷新文件
筛选文件
⌃ K
src
catalog.js
tests
catalog.test.mjs
package.json
pelican-cycle.html
README.md
机制研究与设计
项目记忆
运行诊断
模型与连接
高性能
本地服务已连接
v1.24.7
starter-project任务
创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D创建一个HTML,内容是SVG绘制一…
手机连接
桌面宿主
模型中心
高性能
本地项目
已完成
运行诊断
项目技能
项目MCP工具
查看任务记录
隔离协作
工程评测
本地代理引擎
REA 工件研究
导出会话
你
你的任务
20:08
创建一个HTML,内容是SVG绘制一个鹈鹕骑自行车的2D动画,无需测试。
模型响应已收到
模型服务
5.6s
AW
编程助手
20:09
我会制作一个可直接在浏览器打开的独立 HTML,用 SVG 绘制鹈鹕、自行车和沿途风景,加入踩踏、车轮转动与背景移动动画。按你的要求,不运行测试。
识别工程与Git基线
0.1s
模型连接失败
模型服务 · 第 2 次
60.0s
输出未完成
Chat Completions · 0 字符 · 1 个工具参数片段
片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
·
工作台
20:11
模型连接
模型服务响应超时
模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
发生在请求模型响应时
1 次请求
查看错误详情
查看运行诊断
·
工作台
20:47
从已保存的执行记录继续,已完成的工具结果保留。
模型连接失败
模型服务 · 第 2 次
60.0s
输出未完成
Chat Completions · 0 字符 · 1 个工具参数片段
片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
·
工作台
20:49
模型连接
模型服务响应超时
模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
发生在请求模型响应时
1 次请求
查看错误详情
查看运行诊断
·
工作台
21:03
从已保存的执行记录继续,已完成的工具结果保留。
模型连接失败
模型服务 · 第 2 次
60.0s
输出未完成
Chat Completions · 0 字符 · 1 个工具参数片段
片段仅供查看。完整响应核对前不执行工具;中断后保留原记录。
·
工作台
21:05
模型连接
模型服务响应超时
模型服务响应超时。项目文件和已完成的工具记录已保留。 已接收的流片段保留,请求不会自动重发。
可以重试上次模型请求;若持续失败,在模型连接中检查服务地址和连接状态。
发生在请求模型响应时
1 次请求
查看错误详情
查看运行诊断
·
工作台
21:26
从已保存的执行记录继续,已完成的工具结果保留。
模型响应已收到
模型服务
121.1s
准备文件改动
pelican-cycle.html
0.0s
整理请求上下文
完整请求输入估算 13568 → 8741 tokens;省略 1 个完整消息组,原历史和参数已保存为SHA256工件。估算与服务实际用量分别记录。
模型响应已收到
模型服务
8.6s
AW
编程助手
21:28
已准备好 pelican-cycle.html 的文件提案,内容为 SVG 绘制的鹈鹕骑自行车 2D 动画。
请在改动面板查看差异并点击“应用”;应用后即可用浏览器打开该 HTML。当前提案尚未写入项目。
按你的要求,未运行测试。
·
工作台
21:28
文件已审查并应用:pelican-cycle.html。按照原要求未运行测试,可在文件列表打开结果。
已应用 pelican-cycle.html
写入前基线检查通过,已创建新文件。
添加截图
每任务1张 · PNG/JPEG · 原图≤2MB
任务内容
starter-project
高性能
发送任务
Ctrl + Enter 发送 · 会话自动保存
上下文估算 8,741 tokens
调整检视区宽度
文件
改动
轨迹
任务
索引
浏览
放大检视区

查看项目文件
从左侧打开文件,或让助手先读取项目。
读取范围限定在当前项目
Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

File diff suppressed because it is too large Load Diff
@@ -0,0 +1,18 @@
{
"success": true,
"observations": [
{
"stage": "old window",
"result": "First before guard found one minimized window; activate/get_window recovered it, evidence captured and idle window closed. New before-recheck passed before sole installer run."
},
{
"stage": "new launch",
"result": "launch_app reported no targetable window during startup; fresh list_apps found the single real 1.24.8 process. No second launch."
},
{
"stage": "capture",
"result": "First new screenshot did not match target accessibility tree; not saved or used as evidence. activate/get_window then fresh capture showed actual Agent Workbench; only matching captures saved."
}
],
"realModelRequests": 0
}
@@ -0,0 +1,18 @@
{
"success": true,
"version": "1.24.8",
"pid": 36552,
"desktopWindows": 1,
"runtimeRoot": "C:\\Users\\wangy\\AppData\\Local\\Programs\\AgentWorkbench\\versions\\Agent-Workbench-1.24.8-win-x64-20261103235313371",
"observed": [
"Actual formal installed launcher opens unique 1.24.8 native window",
"Connected UI and original high-performance pool visible",
"No model dispatch, settings save, task start or original history mutation"
],
"screenshots": [
"after.jpg",
"model-center.jpg"
],
"realModelRequests": 0,
"scope": "Computer Use observation from the actual installed original entry, not Electron fixture. Original R budget behavior is separately verified by write-blocked production web UI. State reconciliation follows after native review."
}
@@ -0,0 +1,14 @@
# V:工作记忆修复后的新有界真实交付
U 的 1.24.8 只证明工作记忆修复与发行可靠性,真实模型请求为 0。V 须在 U 独立发行、原状态回核和本地 Git 完成后另冻契约;本计划不允许续跑 T/R/P/O。
1. 只读确认当前实际版本/source/候选、PID/Provider、公开配置、原表每行/全导出/全部工件 SHA,当前选线和预算以新快照为准。预选启用的 jojocode GPT Chat JSON;不自动启用旧连接,不提取、复制、解密或重存真实 Key。
2. 同一连接作一次所属 DNS/TCP/TLS 有界观察,0 HTTP/模型/凭据操作。证书、代理、IP 族和路由策略保持;观察异常即保存结束,不推断唯一根因。
3. 新建无工具单次身份预检,固定连接/端点/协议/严格报告身份,最大一次请求,失败停止。完整原请求/响应、URL、报告型号和真实/未知用量封存;不重试、切池或补造别名,不把报告型号当权重认证。
4. 通过后,新建隔离 Node 费用报表工程和新 Task,原三源码/九测试、11 文件基线、目标和所有约束不变。16K/2048/1600;最多 8 请求、90000 tokens、600000ms。单连接,所有预留与上游原报告保持,不以本地估算覆盖实际用量。
5. 模型独立实现。监督只核对/批准原检查计划、审查应用完整允许文件变更集及确认本地 Git;不提供实现/答案/追加指导,不改测试、配置和 owner 文件/暂存,不扩大预算,不允许 run_command。
6. 本次新增观测:逐请求记录累计真实已读范围、实际正文范围和缺失范围;完整四文件何时同时出现;当前失败 job/日志 SHA 是否持续携带;无新工程状态的重复观察次数。只分析原件,不为收集数据重放模型或工具。
7. 成功需原九测试和 build 通过、当前源码/检查/变更集/Git计划一致,以及仅三个允许模块的已确认本地提交。读完、口头完成和基线 build 通过都不算交付。错误/暂停/身份拒绝/未知结果即封存,不续跑旧样本。
8. 结束后恢复本次明确允许临时修改的公开预算/池/身份策略;逐原行、导出、工件及公开中心精确核对。只对自有新增项目/会话、请求/用量、修订单调增长作事先声明;关闭调试端口,回顾后本地提交,不推送。
Node 通过后才扩展 React/Python。原版 Purge 使用独立同工程/模型/预算的 AB/BA,锁定 Harness/Purge/profile、真实提示/工具输入,统计交付、请求、时间和全部已报告/未知消费。插件加载或单次工程成功不能证明收益。1.25 任务要求/交付复核和更新重复目录核验性能仍独立排期。
File diff suppressed because one or more lines are too long
@@ -0,0 +1,152 @@
✔ reviewed application invalidates old checks, names current SHA and advances through a new approved check to Git preview (8116.9218ms)
✔ skip-tests, foreign task, unknown operations, diagnostic and parent review retain their boundaries (2965.204ms)
✔ a question about the previous workbench error receives local error context and current change states (1341.4906ms)
✔ an unknown model request stops, and explicit resume never replays the approved command (2131.6929ms)
✔ exhausted refused connections preserve tool results, and explicit resume adds no new user turn or replay (2227.0125ms)
✔ stopping during model backoff cancels further requests and clears the running request state (914.8183ms)
✔ HTTP authentication errors are classified, redacted and never automatically retried (17.4279ms)
✔ temporary HTTP service errors retry and recover with recorded attempt counts (7.4365ms)
✔ invalid and oversized protocol responses fail once with a useful response-format diagnosis (5.2664ms)
✔ HTTP rate limits expose their source and obey the service retry interval before recovery (1015.9125ms)
✔ Windows commands preserve Chinese through a PowerShell pipeline into Node (983.9238ms)
✔ Windows shell syntax errors stay readable and native command exit codes are retained (1032.8241ms)
✔ review and completed states do not turn a generic continue click into a new model request (422.9744ms)
✔ old session data receives a truthful historical connection diagnosis without rewriting history (551.5989ms)
✔ continuation reads advance through historical pages without a false pause while repeated current-Run pages still pause (2.2003ms)
✔ a new tool page replaces old latest-feedback space and still obeys its escaped protocol budget (0.5209ms)
✔ budgeted artifact pages count escaped protocol bytes and reconstruct original multilingual JSON without losing characters (9.1926ms)
✔ known artifact coverage detects semantic repeats despite changing limits, and advancing pages or direct evidence restore progress (0.3538ms)
✔ actual large artifact reads are present in the next bounded HTTP request and next_offset progresses without redoing tools (4618.3986ms)
✔ a real repeated artifact loop pauses the same Task after recorded results, survives reload and only resumes explicitly (5999.1068ms)
✔ actual HTTP continuation after reload sends distinct historically covered pages without false no_progress or replay (5915.4917ms)
✔ continuations distinguish unread source, later original line ranges and already returned result wrappers (590.0577ms)
✔ pure-file batch returns unused small-page space while mixed and historical allocation stays conservative (0.3084ms)
✔ observed upstream high input pauses before a new request, preserves reported usage and distinguishes the limiting ledger (558.7255ms)
✔ chat-completions: complete actual Unicode/CRLF pages and small source survive the next bounded wire request (3265.8259ms)
✔ responses: complete actual Unicode/CRLF pages and small source survive the next bounded wire request (3413.1852ms)
✔ anthropic-messages: complete actual Unicode/CRLF pages and small source survive the next bounded wire request (3396.7732ms)
✔ native seed framing reserves capacity before optional history without changing the selected window (826.4653ms)
✔ direct code evidence remains selected while recent historical-index browsing is archived within the complete request budget (1753.7547ms)
✔ one long user turn becomes bounded complete groups with exact UTF-8 history and recent JSON arguments (3765.4129ms)
✔ tool definitions, exact system bytes, output reserve and remaining Run/Task budget are accounted before requests (711.6512ms)
✔ oversized required user instructions pause intact and can be explicitly resumed after increasing the window (1533.4787ms)
✔ all task instructions, constraints and acceptance remain in the runtime system instead of an eight-item or byte prefix (1312.9184ms)
✔ a newest manageable multi-tool group stays exact even beyond the working target; oversized earlier groups are archived (923.5828ms)
✔ invalid orphan result is rejected before archive or network preparation (571.7966ms)
✔ invalid missing result is rejected before archive or network preparation (645.4569ms)
✔ invalid wrong result is rejected before archive or network preparation (549.2025ms)
✔ invalid duplicate call is rejected before archive or network preparation (603.0141ms)
✔ a group larger than the artifact limit uses verified Unicode-safe chunks without replacing tool JSON (1638.1392ms)
✔ changed or missing archived evidence stops reuse and is never silently recreated (751.1586ms)
✔ transaction failure prevents publishing a plan and any corresponding model request (683.0362ms)
✔ the Provider rejects body mutation after a sealed plan before calling HTTP (552.2518ms)
✔ HTTP failure and explicit same-Task resume reuse exact completed results and request hashes without repeating a command (8666.2995ms)
✔ a real process exit after plan persistence marks interruption and never issues an automatic model request (1482.3823ms)
✔ small code and actual failed command stay visible when their original multi-tool group cannot fit (1703.9666ms)
✔ mixed group retains six distinct small file observations with exact multilingual text and bounded request bytes (2338.1549ms)
✔ working observations are bound to the current Task and stop treating a pre-application file revision as current evidence (2292.7081ms)
✔ a sealed observation rejects changed or missing original result artifacts instead of recreating evidence (1395.0718ms)
✔ a real passed-check observation is excluded after a source edit invalidates the check, while its historical sent evidence remains valid (5573.5312ms)
✔ budgeted file pages reconstruct UTF-8 text including long single lines and surrogate boundaries (4.5082ms)
✔ actual HTTP multi-tool reads survive an oversized runtime snapshot and the sealed evidence survives reopening (10048.7649ms)
✖ actual HTTP file pagination advances over a long file with each returned page visible in the next request (4146.3631ms)
✔ later mixed history pages cannot displace the actual module sources and complete requirements (4580.2189ms)
✖ a later narrow page of the same file revision cannot evict the wider actual observation (2651.8243ms)
✔ six small source files stay complete across metadata turns even when mandatory evidence exceeds the soft target (2968.2269ms)
✔ historical read-artifact navigation points to the original artifact and next page, never its result wrapper (989.7483ms)
✔ a 1.6.1 full-provenance sent view remains verifiable after introducing the compact view (1145.1304ms)
✔ actual HTTP requests keep four observed modules after a later large history read and preserve all source bytes (8159.6506ms)
ℹ tests 58
ℹ suites 0
ℹ pass 56
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 76114.4173
✖ failing tests:
test at tests\working-set.test.mjs:167:1
✖ actual HTTP file pagination advances over a long file with each returned page visible in the next request (4146.3631ms)
AssertionError [ERR_ASSERTION]: {"id":"4fee52eb-0c33-4554-8ae8-c6399a0270bf","source":"model_connection","origin":"upstream","stage":"model_request","kind":"service","httpStatus":500,"endpoint":"http://127.0.0.1:62975/v1","model":"file-page-fixture","route":"/chat/completions","attempts":3,"occurredAt":"2026-11-03T23:31:54.583Z","retryable":true,"title":"模型服务暂时无法处理请求","upstream":{"schema":1,"scope":"http-body","httpStatus":500,"code":null,"type":null,"message":"The newest actual budgeted page must be sent","param":null,"reason":null,"requestId":null,"responseId":null,"eventType":null,"headers":{"content-type":"application/json","date":"Tue, 03 Nov 2026 23:31:54 GMT"},"retryAfter":null,"retryAfterMs":null,"rawPreview":"{\"error\":{\"message\":\"The newest actual budgeted page must be sent\"}}","previewTruncated":false,"capture":{"scope":"http-body","receivedBytes":68,"capturedBytes":68,"storedBytes":68,"retention":"artifact","complete":true,"truncated":false,"interrupted":false,"capturedRange":[0,68],"redacted":false,"sha256":"5a2c893c215663a6b01fd3d9a8a17d6746589c9b3d5fee24ec78c4c699e01ed7"},"artifactId":"6d27c170-f9eb-45e9-9d52-fe214a87b143","artifactSha256":"5a2c893c215663a6b01fd3d9a8a17d6746589c9b3d5fee24ec78c4c699e01ed7","artifactScope":"http-body","sessionId":"4906d316-54fe-4084-a02d-4253bc683800"},"upstreamRequestId":null,"code":null,"type":null,"limitReason":null,"wireAttemptId":"45bd8afb-3fc4-413e-b679-df99edc9cb12","message":"模型服务暂时无法处理请求(HTTP 500)。 The newest actual budgeted page must be sent","detail":"The newest actual budgeted page must be sent","suggestion":"稍后重试,或检查模型服务状态。","requestUrl":"http://127.0.0.1:62975/v1/chat/completions","responseUrl":"http://127.0.0.1:62975/v1/chat/completions","redirected":false,"redirectMode":"manual","retryDecision":"attempt_limit","remainingWaitBudgetMs":297493,"runId":"3de3e8e3-5e9c-49b7-9407-71ef2e857685","messageId":"bda902da-4848-4b52-980f-b476b5aed982"}
+ actual - expected
+ 'failed'
- 'completed'
at TestContext.<anonymous> (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/tests/working-set.test.mjs:185:10)
at async Test.run (node:internal/test_runner/test:1409:7)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: 'failed',
expected: 'completed',
operator: 'strictEqual',
diff: 'simple'
}
test at tests\working-set.test.mjs:217:1
✖ a later narrow page of the same file revision cannot evict the wider actual observation (2651.8243ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
+ 'usly read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
'An actual previously read complete source line.\n' +
'An actual previously read complete source line.\n' +
'An actual previously read complete source line.\n' +
+ 'An a'
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n' +
- 'An actual previously read complete source line.\n'
at TestContext.<anonymous> (file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/tests/working-set.test.mjs:227:10)
at Test.runInAsyncScope (node:async_hooks:227:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 'usly read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn a',
expected: 'An actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\nAn actual previously read complete source line.\n',
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,43 @@
{
"success": true,
"resultPath": ".qa/archives-validation.json",
"result": {
"success": true,
"version": "1.24.8",
"testedAt": "2026-11-03T23:59:25.279711+00:00",
"archives": [
{
"kind": "portable",
"path": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.8-win-x64-20261103235313371.zip",
"files": 10956,
"crcPassed": true,
"manifestAndDirectoryMatch": true,
"sha256": "794fb13c414fb6fce5993a5b97803d1e9a818dbbe54d22700e1a4c46dfa590ec"
},
{
"kind": "source",
"path": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.8-source-20261103235313371.zip",
"files": 32984,
"crcPassed": true,
"manifestAndDirectoryMatch": true,
"sha256": "066cdceb91204441d40738e87a884a749f21ad9378a0130f33309c77483f1d3d"
},
{
"kind": "evidence",
"path": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.8-evidence-20261103235313371.zip",
"files": 21717,
"crcPassed": true,
"manifestAndDirectoryMatch": true,
"sha256": "996c553c3b92420ae01e0eed4089e1a0f7ccef05e1004a361d79d9393e4bca6c"
}
],
"extractionRoot": null
},
"mode": "archives",
"startedAt": "2026-11-03T23:58:34.088Z",
"finishedAt": "2026-11-03T23:59:25.341Z",
"log": ".qa/working-memory-u/release/archives.log",
"sourceCommit": "7e77fd65c367b711a9a59b30ef216f5fdf7feb11",
"candidate": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.24.8-win-x64-20261103235313371",
"realModelRequests": 0
}
@@ -0,0 +1 @@
{"success": true, "version": "1.24.8", "testedAt": "2026-11-03T23:59:25.279711+00:00", "archives": [{"kind": "portable", "path": "D:\\Ai-project\\REA\u9006\u5411\\Agent-Workbench\\releases\\Agent-Workbench-1.24.8-win-x64-20261103235313371.zip", "files": 10956, "crcPassed": true, "manifestAndDirectoryMatch": true, "sha256": "794fb13c414fb6fce5993a5b97803d1e9a818dbbe54d22700e1a4c46dfa590ec"}, {"kind": "source", "path": "D:\\Ai-project\\REA\u9006\u5411\\Agent-Workbench\\releases\\Agent-Workbench-1.24.8-source-20261103235313371.zip", "files": 32984, "crcPassed": true, "manifestAndDirectoryMatch": true, "sha256": "066cdceb91204441d40738e87a884a749f21ad9378a0130f33309c77483f1d3d"}, {"kind": "evidence", "path": "D:\\Ai-project\\REA\u9006\u5411\\Agent-Workbench\\releases\\Agent-Workbench-1.24.8-evidence-20261103235313371.zip", "files": 21717, "crcPassed": true, "manifestAndDirectoryMatch": true, "sha256": "996c553c3b92420ae01e0eed4089e1a0f7ccef05e1004a361d79d9393e4bca6c"}], "extractionRoot": null}
@@ -0,0 +1 @@
{"success":true,"version":"1.24.8","pid":36552,"views":[{"name":"desktop","viewport":{"width":1440,"height":1000},"screenshot":"D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\working-memory-u\\release\\browser-review\\desktop.png","selectionScreenshot":"D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\working-memory-u\\release\\browser-review\\desktop-model-center.png","overflow":{"viewport":1440,"document":1440},"connected":true,"originalSession":"966d83cb-d1d7-44b7-be53-9d850270e34e","originalTask":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","originalRun":"cf10d58a-d3af-4b03-9bef-77fb54837878","reservation":29623,"remaining":17429,"input":12352},{"name":"narrow","viewport":{"width":390,"height":844},"screenshot":"D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\working-memory-u\\release\\browser-review\\narrow.png","selectionScreenshot":"D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\working-memory-u\\release\\browser-review\\narrow-model-center.png","overflow":{"viewport":390,"document":390},"connected":true,"originalSession":"966d83cb-d1d7-44b7-be53-9d850270e34e","originalTask":"e7ebf0d5-8ac6-47ec-bbb2-74ddefba23f4","originalRun":"cf10d58a-d3af-4b03-9bef-77fb54837878","reservation":29623,"remaining":17429,"input":12352}],"errors":[],"rejectedWrites":[],"realModelRequests":0,"scope":"Read-only actual production Edge render at 1440 and 390. Original R pause is displayed accurately without resuming or mutating original history. Every API write blocked; none attempted."}
@@ -0,0 +1,242 @@
AW
Agent Workbench
本地编程工作台 · 正式版
当前项目
expense-project
identity-only
expense-project
identity-only
expense-project
identity-only
expense-project
expense-project
identity-only
identity-only
identity-only
source · 真实收支报告
source
source · 真实收支报告
source
source · 真实收支报告
source
source · 真实收支报告
source
python-source · python actual engineering
python-source
react-source · react actual engineering
react-source
source · 真实收支报告
source
source · 真实收支报告
source
source · 真实收支报告
source
source · 真实收支报告
source
python-source · python actual engineering
python-source
react-source · react actual engineering
react-source
测试
source · 真实收支报告
source
source · 真实收支报告
source
source · 真实收支报告
source
source · 真实收支报告
source
python-source · python actual engineering
python-source
react-source · react actual engineering
react-source
starter-project(示例)
starter-project
starter-project
python-source · python actual engineering
python-source
react-source · react actual engineering
react-source
来源工程 · 四模块真实模型独立交付
来源工程
多文件变更集交付工程
多文件变更集交付工程
精确补丁交付工程
交付报告工程
交付报告工程
vLLM-MVP
模型连接验证
starter-project
D:\Ai-project\REA逆向\Agent-Workbench\.qa\live-delivery-r\node\expense-project
任务会话
新建任务
↵
修复这个Node费用报表工程的amount、summar
项目文件 11
⌃ K
scripts
build.mjs
src
amount.mjs
report.mjs
summary.mjs
test
expense.test.mjs
.gitignore
owner-staged.txt
owner-unstaged.txt
owner-untracked.txt
package.json
README.md
机制研究与设计
项目记忆
运行诊断
模型与连接
高性能
本地服务已连接
v1.24.8
expense-project
任务
修复这个Node费用报表工程的amount、summar
手机连接
模型中心
高性能
本地项目
已暂停
继续任务
你
你的任务
00:02
修复这个Node费用报表工程的amount、summary、report三个模块。金额用精确分单位处理,接受测试约定的十进制字符串/有限数字、退款、0及空白;拒绝格式错误、超精度和不安全金额。按独立币种规范化/排序汇总并保留原数组,计数准确、安全求和,报表两位小数含负分金额。以原九项测试为完整契约。先inspect_project,再plan_checks选择["test","build"]并run_checks保留真实基线失败,读取原测试和相关源码。只允许修改src/amount.mjs、src/summary.mjs、src/report.mjs;不改测试、配置、README、构建脚本、owner文件或原暂存,不使用run_command,不直接提交Git。propose_file/propose_patch准备完整三个模块后,用prepare_change_set一次封存全部三文件,等待审查应用。应用后继续同一个Task,重新plan_checks/run_checks,通过原9项测试和build后,用plan_delivery为三个文件准备本地Git预览并等待确认。模型必须自己实现,禁止用口头完成替代检查。预算最多8次模型请求、90000tokens,输出2048,上下文16K,请合并独立工具调用并避免重复观察。
模型响应已收到
模型服务
5.9s
识别工程与Git基线
0.3s
模型响应已收到
模型服务
8.7s
AW
编程助手
00:03
准备工程检查计划
0.3s
建立工程符号索引
当前项目 · 声明与导入
0.6s
整理请求上下文
完整请求输入估算 13077 → 10626 tokens;省略 1 个完整消息组,原历史和参数已保存为SHA256工件。估算与服务实际用量分别记录。
模型响应已收到
模型服务
14.1s
AW
编程助手
00:03
已识别到 test 和 build 脚本,Git 中已有 owner 文件改动。接下来运行已准备的基线检查,并读取原九项测试及三个模块,以测试契约确定修复内容。
执行工程检查
2.9s
读取文件
test/expense.test.mjs
3.0s
读取文件
src/amount.mjs
3.0s
读取文件
src/summary.mjs
3.0s
读取文件
src/report.mjs
3.0s
保存任务依赖计划
3.0s
模型响应已收到
模型服务
67.6s
AW
编程助手
00:04
基线结果已保留:原九项测试全部失败,构建通过。现在补齐原测试的完整契约内容,并据此准备三个模块的完整提案;提案阶段不会写入文件。
读取执行日志工件
0.0s
模型响应已收到
模型服务
5.5s
读取文件
test/expense.test.mjs
0.0s
模型响应已收到
模型服务
6.5s
AW
编程助手
00:04
我会接着已有读取和基线记录推进,补齐测试契约后准备三个模块的统一审查批次。
读取文件
test/expense.test.mjs
0.0s
·
工作台
00:04
任务目标、完整追加要求与必需请求开销超过剩余token预算。完整历史已保留;请核对模型上下文或任务预算后继续。
下一次请求超出运行余额
完整要求与必需输入估算 12,352 tokens;当前窗口可用输入 12,352。请求已暂停,原任务和工具结果保留。
请求格式与图片说明
34
目标、全部要求及工程上下文
5,151
工具定义
4,571
必需历史及实际依据
2,596
图像本地预留
0
所选上下文窗口
16,000
响应预留 / 安全余量
2,048 / 1,600
运行 / 任务剩余
17,429 / 17,429
必需输入可容纳于当前窗口;下一次请求的用量预留超过剩余预算。原上游用量保持,请核对运行和任务预算后显式续接。
依据同一模型线路的 6 次已知响应校准,下一次请求需预留 29,623 tokens,剩余 17,429。已在发送前暂停;这项预留用于后续预算,原始用量记录保持。
本次运行上游报告用量
72,571
用量未知请求 / 本地预留
0 / 0
本次运行预算 / 记账超出
90,000 / 0
任务累计预算 / 记账超出
90,000 / 0
单个在途响应可能超过预估。超额后停止后续请求;用量未知的请求仍按本地预留控制预算,不补造实际计费。
核对预算并续接原任务
添加截图
每任务1张 · PNG/JPEG · 原图≤2MB
expense-project
高性能
Ctrl + Enter 发送 · 会话自动保存
上下文估算 12,352 tokens
文件
改动
轨迹
任务
索引
浏览
查看项目文件
从左侧打开文件,或让助手先读取项目。
读取范围限定在当前项目
@@ -0,0 +1,37 @@
下一次请求超出运行余额
完整要求与必需输入估算 12,352 tokens;当前窗口可用输入 12,352。请求已暂停,原任务和工具结果保留。
请求格式与图片说明
34
目标、全部要求及工程上下文
5,151
工具定义
4,571
必需历史及实际依据
2,596
图像本地预留
0
所选上下文窗口
16,000
响应预留 / 安全余量
2,048 / 1,600
运行 / 任务剩余
17,429 / 17,429
必需输入可容纳于当前窗口;下一次请求的用量预留超过剩余预算。原上游用量保持,请核对运行和任务预算后显式续接。
依据同一模型线路的 6 次已知响应校准,下一次请求需预留 29,623 tokens,剩余 17,429。已在发送前暂停;这项预留用于后续预算,原始用量记录保持。
本次运行上游报告用量
72,571
用量未知请求 / 本地预留
0 / 0
本次运行预算 / 记账超出
90,000 / 0
任务累计预算 / 记账超出
90,000 / 0
单个在途响应可能超过预估。超额后停止后续请求;用量未知的请求仍按本地预留控制预算,不补造实际计费。
核对预算并续接原任务
Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

@@ -0,0 +1,131 @@
expense-project
任务
修复这个Node费用报表工程的amount、summar
高性能
已暂停
继续任务
你
你的任务
00:02
修复这个Node费用报表工程的amount、summary、report三个模块。金额用精确分单位处理,接受测试约定的十进制字符串/有限数字、退款、0及空白;拒绝格式错误、超精度和不安全金额。按独立币种规范化/排序汇总并保留原数组,计数准确、安全求和,报表两位小数含负分金额。以原九项测试为完整契约。先inspect_project,再plan_checks选择["test","build"]并run_checks保留真实基线失败,读取原测试和相关源码。只允许修改src/amount.mjs、src/summary.mjs、src/report.mjs;不改测试、配置、README、构建脚本、owner文件或原暂存,不使用run_command,不直接提交Git。propose_file/propose_patch准备完整三个模块后,用prepare_change_set一次封存全部三文件,等待审查应用。应用后继续同一个Task,重新plan_checks/run_checks,通过原9项测试和build后,用plan_delivery为三个文件准备本地Git预览并等待确认。模型必须自己实现,禁止用口头完成替代检查。预算最多8次模型请求、90000tokens,输出2048,上下文16K,请合并独立工具调用并避免重复观察。
模型响应已收到
模型服务
5.9s
识别工程与Git基线
0.3s
模型响应已收到
模型服务
8.7s
AW
编程助手
00:03
准备工程检查计划
0.3s
建立工程符号索引
当前项目 · 声明与导入
0.6s
整理请求上下文
完整请求输入估算 13077 → 10626 tokens;省略 1 个完整消息组,原历史和参数已保存为SHA256工件。估算与服务实际用量分别记录。
模型响应已收到
模型服务
14.1s
AW
编程助手
00:03
已识别到 test 和 build 脚本,Git 中已有 owner 文件改动。接下来运行已准备的基线检查,并读取原九项测试及三个模块,以测试契约确定修复内容。
执行工程检查
2.9s
读取文件
test/expense.test.mjs
3.0s
读取文件
src/amount.mjs
3.0s
读取文件
src/summary.mjs
3.0s
读取文件
src/report.mjs
3.0s
保存任务依赖计划
3.0s
模型响应已收到
模型服务
67.6s
AW
编程助手
00:04
基线结果已保留:原九项测试全部失败,构建通过。现在补齐原测试的完整契约内容,并据此准备三个模块的完整提案;提案阶段不会写入文件。
读取执行日志工件
0.0s
模型响应已收到
模型服务
5.5s
读取文件
test/expense.test.mjs
0.0s
模型响应已收到
模型服务
6.5s
AW
编程助手
00:04
我会接着已有读取和基线记录推进,补齐测试契约后准备三个模块的统一审查批次。
读取文件
test/expense.test.mjs
0.0s
·
工作台
00:04
任务目标、完整追加要求与必需请求开销超过剩余token预算。完整历史已保留;请核对模型上下文或任务预算后继续。
下一次请求超出运行余额
完整要求与必需输入估算 12,352 tokens;当前窗口可用输入 12,352。请求已暂停,原任务和工具结果保留。
请求格式与图片说明
34
目标、全部要求及工程上下文
5,151
工具定义
4,571
必需历史及实际依据
2,596
图像本地预留
0
所选上下文窗口
16,000
响应预留 / 安全余量
2,048 / 1,600
运行 / 任务剩余
17,429 / 17,429
必需输入可容纳于当前窗口;下一次请求的用量预留超过剩余预算。原上游用量保持,请核对运行和任务预算后显式续接。
依据同一模型线路的 6 次已知响应校准,下一次请求需预留 29,623 tokens,剩余 17,429。已在发送前暂停;这项预留用于后续预算,原始用量记录保持。
本次运行上游报告用量
72,571
用量未知请求 / 本地预留
0 / 0
本次运行预算 / 记账超出
90,000 / 0
任务累计预算 / 记账超出
90,000 / 0
单个在途响应可能超过预估。超额后停止后续请求;用量未知的请求仍按本地预留控制预算,不补造实际计费。
核对预算并续接原任务
添加截图
每任务1张 · PNG/JPEG · 原图≤2MB
expense-project
高性能
Ctrl + Enter 发送 · 会话自动保存
上下文估算 12,352 tokens

Some files were not shown because too many files have changed in this diff Show More