fix: refresh artifact API when upgrading a live SQLite host

This commit is contained in:
Agent Workbench Dev
2026-10-30 09:12:49 +08:00
parent 5921b8efdc
commit 6bc3ce442d
27 changed files with 2232 additions and 203 deletions
+5
View File
@@ -1,5 +1,10 @@
# Agent Workbench 更新记录
## 1.10.1 · 2026-10-30
- 修复保留SQLite宿主升级后仍调用旧工件API,导致页面验收读取原PNG失败的问题。升级重新打开同一工件目录,旧记录和原字节保留;升级失败恢复原对象。
- 增加真实1.9存储对象、原JSON、实际Edge与PNG读取及回滚验证;保留首轮实模失败,继续以实际页面任务验证修复。
## 1.10.0 · 2026-10-30
- 内置实际页面验收:封存静态构建、桌面/手机视口及交互步骤,审查后在独立Edge中填写、选择、点击并核对文字、数量和可见性。
+3 -1
View File
@@ -1,6 +1,8 @@
# 本地 Agent 工作台
Agent Workbench 1.10.0 将 Claude Code 与 Cursor 的机制研究整合为独立的本地 AI 编程工作台,并内置 REA 工件研究、本地DeepSeek Harness连接核验和实际页面验收。工程索引、精确补丁、多文件整批审查、Node/Python实际检查、浏览器交互、本地Git提交及交付报告可以在同一个Task中完成。
Agent Workbench 1.10.1 将 Claude Code 与 Cursor 的机制研究整合为独立的本地 AI 编程工作台,并内置 REA 工件研究、本地DeepSeek Harness连接核验和实际页面验收。工程索引、精确补丁、多文件整批审查、Node/Python实际检查、浏览器交互、本地Git提交及交付报告可以在同一个Task中完成。
1.10.1修复保留旧SQLite宿主升级后页面工件读取失败的问题。独立源码、发行与真实配置模型结果各自登记,当前状态见[1.10验收](docs/QA-1.10.md)。
1.10.0在任务记录中增加「页面验收」:封存构建目录、桌面或手机视口和检查步骤,审查后使用独立Edge实际填写、选择、点击与断言。原页面、请求、步骤和PNG截图绑定当前任务;失败原值保留,构建变化后重新检查。配置了页面验收的Task必须取得当前构建断言通过记录才能Git交付。使用范围见[页面验收契约](docs/BROWSER-CHECKS.md),发行与验收状态见[1.10记录](docs/QA-1.10.md)。
+2 -1
View File
@@ -12,13 +12,14 @@
## 2. 能力矩阵
### 1.10.0 内置页面验收切片(最终发行验收中)
### 1.10.0 / 1.10.1 内置页面验收与升级修复
- C06/C20:构建文件清单/SHA256与源码指纹双绑定,固定Playwright及本机Edge关键身份;独立静态预览和浏览器执行填写、选择、点击及可见性/文字/数量断言。
- C02/C04/C07:每次计划/执行的Task、Run、原DOM、请求、步骤、PNG原字节与进程结束可核验;成功同版本复用,失败保留原实际值,停止/重启不自动重放。
- C13/C20:页面验收接入Git预览、提交与JSON/Markdown报告;来源测试通过但页面失败或构建变化会阻止交付,实际浏览器/Git专项2项通过。
- C17/C23:10组实际桌面/390px界面通过;新任务选定后,旧来源错误立即失效,原截图/JSON可查看和完整下载。完整源码、随包和真实模型验收分别见[1.10记录](QA-1.10.md)。
- 当前覆盖项目静态Web构建;动态后端联调、远程登录页面、桌面安装端、手机配对和完整业务需求验收继续开发。
- 1.10.0独立274项及118组界面通过,原Provider升级完成;实模另暴露旧工件API兼容问题。1.10.1修复后16项相关回归通过,独立源码与实模复验分别记录,不能把旧完整回归当修复版结果。
### 1.9.0 引擎连接切片(已完成发行与正式本地升级)
+1 -1
View File
@@ -1,6 +1,6 @@
# Agent Workbench 后续产品与执行开发方案
日期:2026-10-30。本文保留完整产品规划;1.8.0已交付内置REA与真实Node工程修复,1.9.0已完成DeepSeek Harness连接核验、独立发行和真实React/Python工程样本。1.10.0将实际页面验收内置自有Harness、任务界面及Git交付,正在完成最终发行验收。实际实现、验收与部署分别见[能力矩阵](CAPABILITIES.md)及[验证记录](VALIDATION.md),完整阶段目标继续实施。
日期:2026-10-30。本文保留完整产品规划;1.8.0已交付内置REA与真实Node工程修复,1.9.0已完成DeepSeek Harness连接核验、独立发行和真实React/Python工程样本。1.10.0内置实际页面验收并完成独立发行与原Provider升级;实模另发现旧工件API兼容问题,1.10.1修复及16项相关回归已通过,最终修复包与实模复验继续执行。实际实现、验收与部署分别见[能力矩阵](CAPABILITIES.md)及[验证记录](VALIDATION.md),完整阶段目标继续实施。
## 1. 产品目标
+3 -1
View File
@@ -2,7 +2,9 @@
微调前完整273/273源码回归、13类118组界面均通过,原记录分别保存在browser-engine-pre-refinement-tests-validation.json和browser-engine-pre-refinement-all-ui-validation.json。代码审查另用实际浏览器复现旧job停止请求误停新job,现按所属jobId限定停止,新增HTTP回归后最终独立源码以274项重新验收;原界面结果和修复后的浏览器追加复验分别记录。
当前实现已构建,正式4318仍为1.9.0/PID23080,原模型连接保留。1.10.0最终完整源码、界面、不可变发行、独立源码与原Provider升级正在验收;未完成项目不登记为成功。
1.10.0候选20261030004653739完成274/274独立源码回归、离线构建6份一致和170份冻结输入核对;随包REA三操作、DeepSeek六方法及1280px/390px浏览器通过,见[browser源码](browser-engine-source-package-validation.json)、[便携](browser-engine-release-validation.json)和[归档](browser-engine-archives-validation.json)。正式4318保留PID23080/原Provider升级至1.10.0,14项目及23会话(含7归档)完整核对,见[原进程升级](browser-engine-upgrade-initial-validation.json)。
真实配置模型的首轮页面Task发现此前SQLite宿主保留旧ArtifactStore,新增readBytes不可用;原错误与模型失败保存在[首轮实模失败](browser-engine-live-model-initial-failure.json)。1.10.1改为在升级时用当前API重新打开同一工件目录,失败恢复原对象,不迁移或改写原字节;真实1.9对象回归修复前1/2、修复后2/2,包含实际浏览器PNG和失败回滚。1.10.1独立源码、不可变发行及实模复验继续执行,未完成项目不登记为成功。验收器也修正为只续接paused/step_limit的原Task,不把completed后的内容请求误当同Task续接。
12项核心/API/协议/恢复/交付专项通过。真实Edge核对填写、选择、点击与断言,PNG原字节和实际PID结束、同版本复用、失败原值、输入变化、停止、工件损坏、HTTP归属与真实宿主重启均验证。协议夹具证明模型先准备计划、经审批执行、读取同Task原字段;夹具结果不计真实模型成功率。
+2 -2
View File
@@ -1,8 +1,8 @@
# Agent Workbench 验收记录
## 1.10.0 · 实际页面验收与Git交付(最终发行验收中)
## 1.10.0 / 1.10.1 · 实际页面验收与升级兼容性
12项核心/API/协议/恢复/交付专项和10组实际桌面/390px浏览器界面通过。原DOM/请求/步骤/PNG、失败实际值和进程结束与当前Task绑定;来源测试通过但页面失败会阻止交付,构建变化后旧预览失效。根级错误即时核对选择身份,避免旧来源错误进入新任务。完整源码/界面与不可变发行分别验收,正式4318仍保持1.9.0/原模型连接;见[QA-1.10](QA-1.10.md)。
1.10.0完成274/274独立源码、13类118组界面、170份冻结输入及不可变源码/便携验证,正式4318保留PID23080/Provider与全部23会话升级。实模首轮另发现旧SQLite工件对象缺少新增字节读取API,原失败保留;1.10.1修复同目录当前API与回滚,16项升级/浏览器/API/Git专项通过。修复版的独立完整源码及实模页面复验继续执行,见[QA-1.10](QA-1.10.md)。
## 1.6.2 · 工作依据保留与旧发送视图兼容
@@ -0,0 +1,24 @@
{
"success": true,
"version": "1.10.0",
"testedAt": "2026-10-30T00:50:56.654263+00:00",
"archives": [
{
"kind": "portable",
"path": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.10.0-win-x64-20261030004653739.zip",
"files": 10972,
"crcPassed": true,
"manifestAndDirectoryMatch": true,
"sha256": "2c5f1bcbf467923baeaf8745b0f418aaef2a46a1157fb99908a11a09b962da27"
},
{
"kind": "source",
"path": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.10.0-source-20261030004653739.zip",
"files": 9203,
"crcPassed": true,
"manifestAndDirectoryMatch": true,
"sha256": "6773b97908f03bd4d36a5d8fc831d805d353e9e3e21ebcdf3411d8e2cc835a13"
}
],
"extractionRoot": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\source-check-0cf50e0248224590906a9e42807e83a8\\Agent-Workbench-1.10.0-source-20261030004653739"
}
@@ -0,0 +1,71 @@
{
"success": false,
"version": "1.10.0",
"testedAt": "2026-10-30T01:04:21.744Z",
"directory": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\live-browser-30e2ec5a-bf63-4fb7-9a71-3525c640da59",
"sessionId": "87a48440-804e-4ac4-8a9f-5ba38a55c082",
"taskId": "2469ce27-895f-45cd-8370-f1ed427dec92",
"modelStatus": "paused",
"usage": {
"requests": 0,
"inputTokens": 0,
"outputTokens": 0,
"totalTokens": 0,
"unknownRequests": 0,
"estimatedUnknownTokens": 0
},
"decisions": [
{
"id": "809f2d4e-0a26-4791-93a3-296efd9919c6",
"taskId": "2469ce27-895f-45cd-8370-f1ed427dec92",
"planId": "be3d4ef6-fd36-4656-b93e-891c2d251b04",
"fingerprint": "d149233247755615a6f7c270e3c6e76bc65d2a778ddd76fb7bbf412430f760d9",
"viewport": {
"width": 1280,
"height": 900
},
"steps": 0
}
],
"continuations": [
{
"previousRunId": "e4e0995f-a7ca-44d6-b837-6eb9a62480ce",
"reason": null,
"at": "2026-10-30T01:04:21.606Z"
}
],
"error": "AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:\n+ actual - expected\n\n+ 'abdb8666-60b2-4b48-a2b3-d5a9827f0299'\n- '2469ce27-895f-45cd-8370-f1ed427dec92'\n\n at file:///D:/Ai-project/REA%E9%80%86%E5%90%91/Agent-Workbench/.qa/verify-live-browser.mjs:54:99\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)",
"originalTaskId": "2469ce27-895f-45cd-8370-f1ed427dec92",
"productError": "store.artifactStore.readBytes is not a function",
"originalRuns": [
{
"id": "e4e0995f-a7ca-44d6-b837-6eb9a62480ce",
"taskId": "2469ce27-895f-45cd-8370-f1ed427dec92",
"status": "completed",
"usage": {
"requests": 6,
"inputTokens": 34774,
"outputTokens": 564,
"totalTokens": 35338,
"unknownRequests": 0,
"estimatedUnknownTokens": 0
},
"stopReason": null
},
{
"id": "51d278e8-8849-4e72-8b94-33571760fea7",
"taskId": "abdb8666-60b2-4b48-a2b3-d5a9827f0299",
"status": "paused",
"usage": {
"requests": 0,
"inputTokens": 0,
"outputTokens": 0,
"totalTokens": 0,
"unknownRequests": 0,
"estimatedUnknownTokens": 0
},
"stopReason": "cancelled"
}
],
"verifierError": "A completed Task was followed by a content resume, which starts a new Task under the existing API contract. The validator now continues only a paused Task without changing its original goal."
}
+139
View File
@@ -0,0 +1,139 @@
{
"success": true,
"date": "2026-10-30T00:51:13.197Z",
"appRoot": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.10.0-win-x64-20261030004653739",
"version": "1.10.0",
"nodeVersion": "v24.22.1",
"verifiedFiles": 10972,
"url": "http://127.0.0.1:63423",
"reusedPid": 10540,
"checks": {
"jobId": "68bcd7e5-ad59-4f28-8da0-cf2e6255f0bd",
"status": "passed",
"tests": {
"total": 4,
"passed": 4,
"failed": 0,
"cancelled": 0,
"skipped": 0
}
},
"actualRea": [
{
"operation": "javascript",
"jobId": "feaa093e-ae62-4389-bee2-718caefab253",
"evidenceId": "ev_eb9cc5359489e7f25bf9373e78ba083ba08632b4a45b4eda6909fed12dcbcf82",
"targetSha256": "57e8e1e2b3e595d357cc0eccdbe204fd21c1537d4ae9a3e8f967d483bf1d8b10",
"bundleSha256": "d281e32d9f0c37168703872a1b9ed82bfb035397414c1e839064b74441d80e49",
"rootExited": true,
"reusedJobId": "ec59e802-f508-4711-921f-d494740de5f6"
},
{
"operation": "pe-imports",
"jobId": "33b9f864-1cc6-4eed-bf9d-17e745b26f5e",
"evidenceId": "ev_2cc0adfd573710b9295cc5880f4d455b01b27e68022598ad0d4f2f3bc4822b16",
"targetSha256": "7102754492d544b471ff84afdb3bbec983824049e4c2118bd0e240f8e7cbe973",
"bundleSha256": "e80d9fd9b9dd52920579d1a847526a12734572487b1bd1a856a1b23a78c52cfd",
"rootExited": true,
"reusedJobId": "eddefb3f-3437-4ce3-90ab-2780476bc73a"
},
{
"operation": "pe-resources",
"jobId": "1e30eb59-1bc0-45e4-a7d6-e3708efd91a1",
"evidenceId": "ev_7768111704d76f84f8d89da6baecc66d66d7a6ea2d780139d0d1198ce3832d84",
"targetSha256": "7102754492d544b471ff84afdb3bbec983824049e4c2118bd0e240f8e7cbe973",
"bundleSha256": "dd77ad4da0bf9d43f071b757caca41d1a95cc085db9bbf7be1ebef9025dc37b6",
"rootExited": true,
"reusedJobId": "c1f77243-3897-4bf8-9cc7-2383e5bfe47b"
}
],
"actualEngine": {
"packageVersion": "0.2.1-rc.2",
"profile": "sdk-minimal",
"installationSha256": "a311f34a77f417417ba68942527f1903893507b604be77d5e32eccd4e1f615d7",
"reportSha256": "a507fcf3da5b3fa4131ec9cd3cf753cd35411d28493c0cfff690a7196767e4c4",
"rootExited": true,
"modelRequests": 0,
"nativeMethods": [
"initialize",
"session/working-directory/get",
"session/wait",
"session/resume",
"session/cancel",
"shutdown"
],
"node": {
"path": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.10.0-win-x64-20261030004653739\\runtime\\node.exe",
"bytes": 93915464,
"sha256": "d702daa815eabbff763c7d3808e235cf031cf2ca70211b56847bc72f51e240e5",
"version": "24.22.1"
}
},
"actualBrowser": {
"success": true,
"installation": {
"status": "available",
"engine": "Microsoft Edge",
"playwrightVersion": "1.64.1"
},
"results": [
{
"jobId": "e7b3378a-347e-4fbc-8cb6-358ff4874e14",
"taskId": "672bf38a-5415-4252-b4af-a36be373ed4f",
"viewport": {
"width": 1280,
"height": 900
},
"status": "passed",
"assertions": {
"total": 3,
"passed": 3,
"failed": 0
},
"resultSha256": "ae7ca9c34bcaae6996eb3e1d818a15bbdf47b0b94516c00af4bc267d54111b48",
"buildSha256": "1128c86f9108e72bc1ada18b7c48c9f865283f46d5e530b99caa04d7507f46cd",
"screenshotSha256": "a0b9187034642bb65372f74db669b60f07c0888d7ce86deb60a4a202b505ca54",
"browserExited": true,
"reusedOriginalJob": true
},
{
"jobId": "9bcfcb8e-cb32-416c-8cb6-e28d855ecfac",
"taskId": "672bf38a-5415-4252-b4af-a36be373ed4f",
"viewport": {
"width": 390,
"height": 844
},
"status": "passed",
"assertions": {
"total": 3,
"passed": 3,
"failed": 0
},
"resultSha256": "63528408fb179f763e2a871e70bcd1622546b579a7a326028abc66a157510ea8",
"buildSha256": "1128c86f9108e72bc1ada18b7c48c9f865283f46d5e530b99caa04d7507f46cd",
"screenshotSha256": "590ef1090d857bc7a7eb30ed790f918d76ebabe4d53b54b82948de4db20cfb4f",
"browserExited": true,
"reusedOriginalJob": true
}
],
"modelRequests": 0,
"scope": "Actual API, locked browser runtime, two isolated Edge processes, CSS interactions, original DOM and PNG bytes. The task is created through the offline demonstration; no remote model is used."
},
"steps": [
"manifest hashes",
"bundled Node launch",
"same-service reuse",
"packaged example and static page",
"explicit command consent",
"actual bundled Node version",
"actual bundled npm check without system Node/npm",
"check log artifact",
"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"
],
"realModel": false
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,174 @@
{
"success": true,
"testedAt": "2026-10-30T01:03:29.628Z",
"version": "1.10.0",
"pid": 23080,
"hasKey": true,
"projects": 14,
"sessions": 23,
"appDirectory": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.10.0-win-x64-20261030004653739",
"verified": true,
"connectionPreserved": true,
"url": "http://127.0.0.1:4318",
"previousVersion": "1.9.0",
"model": "gpt-6.1-sol",
"appRoot": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.10.0-win-x64-20261030004653739",
"dataRoot": "C:\\Users\\wangy\\AppData\\Local\\AgentWorkbench",
"projectsPreserved": true,
"preservedSessionSnapshots": [
{
"id": "03d6acd3-01ee-46fb-aa1c-90483307737e",
"session": "ce12fab8fa32c200b16851a66d7af6eea99ddb4783aa5c2ebd2211f7fbbfcb4b",
"project": "4eaa22c28bc011f866c6fd49ad44169d8c6eb14e3e3a6a23e916d25545d5e3fa",
"execution": "2a60abba8cfa47818937fe733170500bbedc448248e600d6d55b1e951ecf9582"
},
{
"id": "0c9601a4-cc20-476c-aa28-ea010c222f70",
"session": "ed40337c7e51140540dfc7fbbae065e04cf9b49d8bad1e02f61aa922859eeba7",
"project": "8de47871c83677c90f046ab4ef11b10f2bf6602e4e7683a68034f91665f18ae7",
"execution": "32346c10d95f71e2b5a82ac06d8bc76c9c45af5b9798815ea9ba13d578e1a0d8"
},
{
"id": "0f3ace68-4988-4370-bf22-aac01f33a8ab",
"session": "462ab9235f6132141aab9b6fc9c03966d256970c8e19b98a17a38d1a0812b4b4",
"project": "b62f016403188e605f211acf90e6435af951fa772e339f5a967078dc49341dc9",
"execution": "889846e378aa03c9e26f57ba6a818e2d4762690d1c6524ae3af5adb7a6435294"
},
{
"id": "1102be26-9799-4f0f-9a28-7a4ce552f3a9",
"session": "3303bc0113392be74ba3091f133a247b86acf7fdd935a9d3d7692a12a555f928",
"project": "4eaa22c28bc011f866c6fd49ad44169d8c6eb14e3e3a6a23e916d25545d5e3fa",
"execution": "2a60abba8cfa47818937fe733170500bbedc448248e600d6d55b1e951ecf9582"
},
{
"id": "1cf22a27-ac13-4c95-a878-9b4356ccb5b3",
"session": "519eea1e103fd081279a82d4b4e72d17857a18b027eb0b156972855c90349552",
"project": "0a1d247fb4e3fc9dfc35ec2e4902e107c8ccc8efcc33e61e556cd5230e4777d1",
"execution": "bd26cba0a2cffcbbb32bb6f36bbd914b266c57d2d2e7c7edc505cdedbf5a68fa"
},
{
"id": "4442eee6-8b68-4bb5-a39c-9cafbaeb9eb8",
"session": "7c45225f6ace5f5397584a92e5303db762acdb2bfa311cc3d16e8fd6aaeb5253",
"project": "5ec499d561c29586cc0f4d4237d361d144bcbee14c1fc262479172a77d93b1a1",
"execution": "4ce5df2162054e94de1468a70bf40efad9216e749ec25920ca95d7294537755d"
},
{
"id": "4abc4201-549e-46e0-947c-3d3f5b53ffae",
"session": "7f76d7f6ea57b3b842b8289b0fbba5d196df03df7cdc8ae0c6594816f103ae4d",
"project": "91f80e1c4cec343d0b632ad7e0b9eb8f732ca39c8290e40a8dc085f113339ffd",
"execution": "ce1831ebe9eb59cc3784d4803f574e29cf1c356967330e5589cb9d69036261a6"
},
{
"id": "50c279be-66ad-48b8-a483-4e11c814db47",
"session": "9abdcf0865de6578dbfda995836e7e913f4f65ee38c0f40af90f7bb8a9f0ae87",
"project": "4eaa22c28bc011f866c6fd49ad44169d8c6eb14e3e3a6a23e916d25545d5e3fa",
"execution": "2a60abba8cfa47818937fe733170500bbedc448248e600d6d55b1e951ecf9582"
},
{
"id": "569c9457-d399-46e6-b53e-4b1fdbb02109",
"session": "11614934261d3c1c7b2134d9ffaf70bcca207876b2e8dff76e596afe48c1be3c",
"project": "91f80e1c4cec343d0b632ad7e0b9eb8f732ca39c8290e40a8dc085f113339ffd",
"execution": "390674ad40f55fd0ed37cbcf087d1c0f1c992480e7b8d8b3cb7282575a10ac5f"
},
{
"id": "72d3d22f-14d9-4bca-bb6a-ab686bc96b26",
"session": "1ba568d537e40edf8400dbb0c6bdce5a13ed4e71a3634c38a563b468b8a309aa",
"project": "4eaa22c28bc011f866c6fd49ad44169d8c6eb14e3e3a6a23e916d25545d5e3fa",
"execution": "1d57f5926ec3e1e47ccfbf6db301fe3519b3b26f10359850df984cd91d2525cd"
},
{
"id": "776d488f-18a7-41aa-96a4-91dd1f19d374",
"session": "dc9824b3cd6e7203e6e805ab7291bd6c4b514c7524637a937e487c32853aab1d",
"project": "bcaad9ff6ce07b52fbe8f23009bc72f8928c2f2a4859099bfbd3121d52d0bca3",
"execution": "d65517746df52b6c0be3e2e08dba5f2ba969e48fff28c94b66cd2971650d24b5"
},
{
"id": "77f7237d-b7b4-4725-b82b-0781a669740b",
"session": "27f35a1b6db0905f20b758abc68c79286a703c6557eeef7bcb95bc17c13eafa0",
"project": "d881bf752b0e14b37c0325d077a459b08be741605aef0db775195d2de66c4595",
"execution": "fbb3b475561fac29ac8ac793f91176254b5b1a3fce476f3e2a70d13182e273f8"
},
{
"id": "997213e9-ccd7-485e-a099-ad348b626610",
"session": "7edddb9135e4c0694e9e375d00d0db38f889b47c3cd8ce9c118873e3ab17c9a8",
"project": "4eaa22c28bc011f866c6fd49ad44169d8c6eb14e3e3a6a23e916d25545d5e3fa",
"execution": "2a60abba8cfa47818937fe733170500bbedc448248e600d6d55b1e951ecf9582"
},
{
"id": "af2827eb-b31c-456e-b9ab-6f34ab8f600e",
"session": "8b5fcd43f63f2dcb5a2bf65c9503b02147f3e0a76ca5da6c84cb588b53b1714c",
"project": "4eaa22c28bc011f866c6fd49ad44169d8c6eb14e3e3a6a23e916d25545d5e3fa",
"execution": "2a60abba8cfa47818937fe733170500bbedc448248e600d6d55b1e951ecf9582"
},
{
"id": "b045829c-377b-4f69-ad0b-513fe797b421",
"session": "44040c046fd23053228a203745112b277acfcb191ae5a5ce957dd7090c983a2f",
"project": "0a1d247fb4e3fc9dfc35ec2e4902e107c8ccc8efcc33e61e556cd5230e4777d1",
"execution": "a83ff26c46d72d5f4bc11716fb5073fcd1685dcf5a30740d9becddb78e273d19"
},
{
"id": "c25669d5-9c3b-4548-80d5-51c58a3c5e73",
"session": "e662f26079c573528662fe5a144142fc938f8a316a74afea9a4eaffd4fa25e69",
"project": "e5048b792e2681faf68f83b4cd35a7e321dce4ac0dafd07d8b6007d430db66bf",
"execution": "5f08a4c7a4c2209c10a1e540ea4873cae70a501f0a5dd05b2d8f3a79da9fcc31"
},
{
"id": "c32c9c87-8239-4606-a4c0-783529603bc7",
"session": "5a9d028a1054136e85c2037d4151709c3d835d9edb2e67476e3dd9becb493e83",
"project": "6b00a6786f0a47fc81edbcdb39300b0d486deea338d1c4c327395da64238f331",
"execution": "7035206125b8fbd14a6b6e2450c4be439fd43a6557e07ed7e3a5cfeb74f26a15"
},
{
"id": "c52d620a-dbaa-4bbd-9039-0eabe53ba03d",
"session": "019799045a657a75bf74f2cb659ca00aa31e55a8c1609df64ac007ee4b1a9c61",
"project": "4eaa22c28bc011f866c6fd49ad44169d8c6eb14e3e3a6a23e916d25545d5e3fa",
"execution": "2a60abba8cfa47818937fe733170500bbedc448248e600d6d55b1e951ecf9582"
},
{
"id": "dccf608f-44c9-4031-a58c-5ba87fe3b3f8",
"session": "00018e8b18ba8311b139cce9ab5c5414c26b8893b3234efd8f54804711978ed1",
"project": "844f1c9a520e159edb9e76a169d674484386ca30a141e47de720a8c2ec4d4acd",
"execution": "544d05e27c12bf22ece5cff61642f2d62ca210935473fbeb8db010bba55f238a"
},
{
"id": "e8846c6e-1ba2-497e-b0db-ca5778181eb0",
"session": "81477eeefcdf965fdd9091e05670df99e3817f7cbc6ab56605c215262ec3cd5c",
"project": "0a1d247fb4e3fc9dfc35ec2e4902e107c8ccc8efcc33e61e556cd5230e4777d1",
"execution": "4154c4490e5ed0ff19004f5c95cce946620aeefdc4402db7aef149888abfa62e"
},
{
"id": "ea5ec3cb-b074-41ac-989c-34c6515bd742",
"session": "983e92750affa53234ea805de39889e58c5a2a1b4e016e8a84d1ff15d83bb918",
"project": "3b83f6c68b0af564e8732559ff71514f738252a0fd2d097db61c9a023f179d79",
"execution": "6f811eaed0dc1cf0af7d9568dfea7a94a745e05f57e820802806918dc5269ba9"
},
{
"id": "f8a5a714-183d-4d6c-af27-ed56c60225b2",
"session": "cff80cd569d20f8294703ad3fce75555a21b911e07339220a5bb2a31c01eb78d",
"project": "d3025c877b071c0815d63323d883f68be4e778ba4392ab2bae91cf24cd34e29f",
"execution": "e708ce8a2e1ff83110818db1bac7180483da9dd92801facb0652ee77fd64e0be"
},
{
"id": "fc87c3f6-a108-4095-ae41-4ef56bc789c3",
"session": "49dbf09c02b74d867df47a65185c60f5fac173ed114ccd6e7adf261a93e71b1f",
"project": "72cc4e0235d860965503c3b4f7d0a59f5f8a8720592e10578c4da7ab36bf1af1",
"execution": "96b629b8b3c9a22e3a67ad97f6fabea1c1d077aa64c618dab2329645b3827043"
}
],
"inspectorClosed": true,
"comparedFiles": 8745,
"allSessionCount": 23,
"activeSessionCount": 16,
"archivedSessionCount": 7,
"independentSourceRoot": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\.qa\\source-check-0cf50e0248224590906a9e42807e83a8\\Agent-Workbench-1.10.0-source-20261030004653739",
"independentSourceTests": {
"tests": 274,
"pass": 274,
"fail": 0,
"cancelled": 0,
"skipped": 0,
"todo": 0
},
"comparison": "Canonical JSON order; only missing execution.engineJobs=[], browserPlans=[] and browserJobs=[] are projected. Every existing session/project/execution field and public model budget is compared.",
"credentialsHandling": "The original Provider keeps the original model connection in memory; no model key was read, copied, printed or saved."
}
+3 -3
View File
@@ -1,14 +1,14 @@
{
"ready": true,
"url": "http://127.0.0.1:4318",
"version": "1.9.0",
"version": "1.10.0",
"mode": "compatible",
"model": "gpt-6.1-sol",
"hasKey": true,
"pid": 23080,
"appRoot": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.9.0-win-x64-20261029232509970",
"appRoot": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-1.10.0-win-x64-20261030004653739",
"originalAppRoot": "D:\\Ai-project\\REA逆向\\Agent-Workbench\\releases\\Agent-Workbench-0.1.0-win-x64",
"dataRoot": "C:\\Users\\wangy\\AppData\\Local\\AgentWorkbench",
"upgradedAt": "2026-10-29T23:37:41.374Z",
"upgradedAt": "2026-10-30T01:03:29.628Z",
"storage": "sqlite"
}
+4
View File
@@ -2,6 +2,10 @@
## 2026-10-30 真实工程与浏览器能力恢复
- 1.10.0独立274/274及170份输入通过,原PID/Provider升级保存14项目/23会话。实模首轮实际浏览器工具暴露旧SQLite ArtifactStore对象没有readBytes,旧write也不支持PNG原Buffer;原错误及原Task保留。新增回归使用91981c1原ArtifactStore,修复前明确readBytes失败,修复后真实Edge/原PNG和升级失败恢复原对象2/2通过。热升级必须重新打开当前工件API,不能只更新Store原型。
- 本轮恢复实际HEAD5921b8e/package1.10.0,原服务health仍为1.9.0/PID23080。候选与独立解压目录已存在,源码验收PID44208仍执行;当前TAP114项已返回,没有把中间输出当最终通过。原ModelProvider连接保持。恢复搜索误扫.qa历次源码副本造成截断,后续限定具体目录和短段读取,不重复已有验收。
- 上一轮浏览器UI失败发生在新会话已写入数据库、前端切换与旧请求返回的交界;BrowserPanel已有被动effect清理,但根级onError未即时核对已选择的Session/Task。需要以实际选择身份拦截旧来源错误,并让验收分别核对竞态和已完成导航,不能仅凭会话数判定导航完成。
- C20采用构建manifest/SHA256与工程源码指纹双绑定,执行已复制的独立静态快照。固定Playwright1.64.1和本机Edge可执行文件身份;浏览器仅访问所属预览源、独立无凭据上下文,实际交互和原截图字节独立保存。SQLite通用records可增加browser_plan/browser_job而不重写旧历史。
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "local-agent-workbench",
"version": "1.10.0",
"version": "1.10.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "local-agent-workbench",
"version": "1.10.0",
"version": "1.10.1",
"dependencies": {
"@babel/parser": "7.29.11",
"diff": "^8.0.2",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "local-agent-workbench",
"version": "1.10.0",
"version": "1.10.1",
"private": true,
"type": "module",
"description": "A local coding workbench with explicit tool execution, reviewable changes and recoverable sessions.",
+8
View File
@@ -1,5 +1,13 @@
# 统一执行进度
## 2026-10-30 本轮全量接续
- 1.10.0独立源码274/274、6份构建及170份冻结输入通过;原PID23080/Provider升级核对14项目、23会话(7归档),调试端口关闭。实模首轮发现旧ArtifactStore.readBytes缺失,原失败另存而非标成功。1.10.1同目录当前API及回滚回归先1/2失败、修复后2/2通过;继续修复包验收。验收器用带内容resume造成新Task的错误也已按既有API改为只续接原paused/step_limit任务。
- 恢复到5921b8e,源码1.10.0/工作区干净;正式1.9.0/PID23080及原模型连接保持。候选20261030004653739与独立解压目录已有,便携/归档/随包REA、DeepSeek和桌面/390px浏览器结果保留。源码验收PID44208继续原274项回归,不重复启动。
- 下一核心切片采用有依赖的持久任务拆解:原目标与追加要求完整保留,步骤验收绑定同Task实际工具/变更集/检查/浏览器证据;未完成或失效不允许被文字收尾掩盖。先完成1.10独立包和原Provider升级再改运行输入,按小步本地提交。
- 恢复输出曾误扫.qa历次副本并触发截断,改为确切目录与短段读取;一次进度文件标题锚点错误整体拒绝,按真实标题修正,未影响源码和正在运行的验收。
## 2026-10-30 全量推进:真实工程与浏览器切片
- 停止修复后的4项HTTP/API和原失败直接回归共5/5通过;10组浏览器UI追加复验、独立原页面验收器桌面/390px两次实际执行通过。完整13类118组界面的原记录保留,最终客户端源码与原冻结输入相同;下一步提交并用新不可变包做274项完整独立源码验收。
+1 -1
View File
@@ -64,7 +64,7 @@ export async function upgradeRunning({ url, pid, currentRoot, newRoot, handlerRo
if (!fs.existsSync(originalScript) || !fs.existsSync(upgradeScript) || !fs.existsSync(path.join(next, 'dist-client', 'index.html'))) throw new Error('Upgrade bundles are incomplete.');
if (!Number.isInteger(pid) || pid < 1 || pid === process.pid) throw new Error('Invalid target process.');
const before = await readUpgradeJson(origin + '/api/bootstrap', 5000, 'Read original Workbench');
if (!before.token || !['0.1.0', '1.0.0', '1.1.0', '1.2.0', '1.3.0', '1.4.0', '1.5.0', '1.5.1', '1.6.0', '1.6.1', '1.6.2', '1.7.0', '1.8.0', '1.9.0', '1.10.0'].includes(before.version)) throw new Error('This migration accepts a supported existing Workbench.');
if (!before.token || !['0.1.0', '1.0.0', '1.1.0', '1.2.0', '1.3.0', '1.4.0', '1.5.0', '1.5.1', '1.6.0', '1.6.1', '1.6.2', '1.7.0', '1.8.0', '1.9.0', '1.10.0', '1.10.1'].includes(before.version)) throw new Error('This migration accepts a supported existing Workbench.');
if (before.sessions.some(session => ['running', 'awaiting_approval', 'stopping'].includes(session.status))) throw new Error('Wait for existing tasks and approvals before upgrading.');
let protocol, socket, enabledHere = false, paused = false;
const breakpoints = [];
+101
View File
@@ -0,0 +1,101 @@
import fs from 'node:fs';
import path from 'node:path';
import assert from 'node:assert/strict';
import { createHash, randomUUID } from 'node:crypto';
import { execFileSync } from 'node:child_process';
import { gitEnvironment } from '../src/core/git-process.mjs';
const previous = JSON.parse(fs.readFileSync('docs/live-react-engineering-validation.json', 'utf8'));
const url = 'http://127.0.0.1:4318', directory = path.resolve('.qa', 'live-browser-' + randomUUID()); fs.mkdirSync(directory);
const sha = value => createHash('sha256').update(Buffer.isBuffer(value) || typeof value === 'string' ? value : JSON.stringify(value)).digest('hex');
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;
let token, sessionId, taskId, current, result; const decisions = [], continuations = [], startedAt = Date.now();
async function api(route, input) {
const response = await fetch(url + '/api' + route, { method: input === undefined ? 'GET' : 'POST', headers: { Connection: 'close', 'Content-Type': 'application/json', ...(token ? { 'X-Workbench-Token': token } : {}) },
...(input === undefined ? {} : { body: JSON.stringify(input) }), signal: AbortSignal.timeout(20000) });
const value = await response.json(); if (!response.ok) throw new Error(value.error ?? 'HTTP ' + response.status); return value;
}
const root = previous.workspaceRoot, git = args => execFileSync('git', ['--no-pager', '--no-optional-locks', '-C', root, ...args], { env: gitEnvironment(), windowsHide: true, encoding: 'utf8' }).trim();
const sourceFiles = () => {
const walk = (relative = '') => fs.readdirSync(path.join(root, relative), { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name)).flatMap(entry => {
if (entry.name.startsWith('.') || ['node_modules', 'dist', 'build', 'out'].includes(entry.name)) return [];
assert.equal(entry.isSymbolicLink(), false); const file = path.join(relative, entry.name);
return entry.isDirectory() ? walk(file) : [{ path: file, sha256: sha(fs.readFileSync(path.join(root, file))) }];
}); return walk();
};
async function original(job) {
let text = '', offset = 0, page;
do { page = await api('/sessions/' + sessionId + '/browser-jobs/' + job.id + '/record?offset=' + offset + '&limit=16000'); text += page.content; offset += page.content.length; } while (page.truncated);
assert.equal(sha(text), job.resultSha256); const value = JSON.parse(text); assert.equal(value.taskId, taskId);
fs.writeFileSync(path.join(directory, 'original-' + job.id + '.json'), text);
for (const image of job.screenshots) {
const response = await fetch(url + '/api/sessions/' + sessionId + '/browser-jobs/' + job.id + '/images/' + image.artifactId, { headers: { 'X-Workbench-Token': token }, signal: AbortSignal.timeout(15000) });
assert.equal(response.status, 200); const bytes = Buffer.from(await response.arrayBuffer()); assert.equal(sha(bytes), image.sha256);
fs.writeFileSync(path.join(directory, job.id + '-' + image.label + '.png'), bytes);
} return value;
}
try {
assert.equal(previous.success, true);
const before = await api('/bootstrap'); token = before.token; assert.equal(before.version, '1.10.1'); assert.equal(before.config.mode, 'compatible'); assert.equal(before.config.hasKey, true);
const project = before.projects.find(value => value.id === previous.projectId); assert.ok(project); assert.equal(project.root, root);
assert.ok(!before.sessions.some(value => value.projectId === project.id && ['running', 'awaiting_approval', 'stopping'].includes(value.status)));
const baseline = { source: sourceFiles(), head: git(['rev-parse', 'HEAD']), index: sha(fs.readFileSync(path.join(git(['rev-parse', '--absolute-git-dir']), 'index'))),
originalSession: sha(canonical(await api('/sessions/' + previous.sessionId + '/export'))), configuration: sha(canonical(before.config)) };
// exportedAt is a transport timestamp, not a persisted session field.
const old = await api('/sessions/' + previous.sessionId + '/export'); delete old.exportedAt; baseline.originalSession = sha(canonical(old));
const created = await api('/sessions', { projectId: project.id }); sessionId = created.id;
const prompt = '请使用工作台内置plan_browser、run_browser、read_browser_result验证当前已经完成的React工程实际页面。工程代码已经通过测试并提交,本次只检查页面,不修改文件、不执行终端、不准备Git提交。'
+ '先读取实际DOM/元素,再由你根据实际页面选择CSS交互和断言。桌面1280×900:初始3项任务,状态筛选pending为2项;搜索带空格的“ 接口 ”只显示编写接口;将该任务标为完成后待办筛选下变空,统计应变为完成2项、待办工时5小时。'
+ '再以390×844独立浏览器核对手机布局可见且没有横向溢出。每份计划最多20步,需要实际断言与原截图,observed不算通过。根据原错误准备新计划,最后基于原结果向我报告,不把截图或推测当成功。';
await api('/sessions/' + sessionId + '/messages', { content: prompt });
const decided = new Set();
while (Date.now() - startedAt < 210000) {
current = await api('/sessions/' + sessionId); taskId ??= current.execution?.task?.id; assert.equal(current.execution.task.id, taskId);
if (current.changes.some(value => ['pending', 'conflict', 'applied'].includes(value.status))) throw new Error('The page-only task proposed source changes; approval was not given.');
if (current.status === 'awaiting_approval') {
const approval = current.approvals.find(value => value.status === 'pending' && !decided.has(value.id));
if (approval) {
assert.ok(approval.browserPlanId, 'Only the explicitly scoped page execution may be approved.');
const plan = current.execution.browserPlans.find(value => value.id === approval.browserPlanId);
assert.equal(plan.taskId, taskId); assert.equal(plan.projectId, project.id); assert.equal(plan.build.directory, 'dist'); assert.equal(plan.path, '/');
assert.ok([1280, 390].includes(plan.viewport.width)); assert.ok(plan.steps.length <= 20);
decided.add(approval.id); decisions.push({ id: approval.id, taskId, planId: plan.id, fingerprint: plan.fingerprint, viewport: plan.viewport, steps: plan.steps.length });
await api('/sessions/' + sessionId + '/approvals/' + approval.id, { allow: true });
}
} else if (['failed', 'cancelled'].includes(current.status)) throw new Error(current.failure?.message ?? current.status);
else if (['completed', 'paused'].includes(current.status)) {
const passed = current.execution.browserJobs.filter(job => job.taskId === taskId && job.status === 'passed');
if (current.status === 'completed' && passed.some(job => current.execution.browserPlans.find(plan => plan.id === job.planId)?.viewport.width === 1280)
&& passed.some(job => current.execution.browserPlans.find(plan => plan.id === job.planId)?.viewport.width === 390)) break;
if (continuations.length >= 2 || current.status !== 'paused' || current.execution.run.stopReason !== 'step_limit') throw new Error('Actual model did not complete both requested page checks: ' + current.status + '/' + current.execution.run.stopReason);
continuations.push({ previousRunId: current.execution.run.id, reason: current.execution.run.stopReason, at: new Date().toISOString() });
await api('/sessions/' + sessionId + '/resume', {});
}
await new Promise(resolve => setTimeout(resolve, 75));
}
assert.equal(current.status, 'completed', 'Actual model task exceeded the acceptance time bound.');
const jobs = current.execution.browserJobs.filter(job => job.taskId === taskId), records = [];
for (const job of jobs) { assert.equal(job.cleanup?.exited, true); records.push({ job, original: await original(job), viewport: current.execution.browserPlans.find(plan => plan.id === job.planId).viewport }); }
const desktop = records.find(value => value.viewport.width === 1280 && value.job.status === 'passed' && ['fill', 'select', 'click'].every(action => value.job.steps.some(step => step.action === action)));
assert.ok(desktop, 'Desktop acceptance needs real search/filter/click, not only screenshots.');
const text = desktop.original.pages.at(-1).text; assert.match(text, /完成任务\s*2/); assert.match(text, /待办工时\s*5\s*小时/);
const mobile = records.find(value => value.viewport.width === 390 && value.job.status === 'passed'); assert.ok(mobile); assert.ok(mobile.original.pages.at(-1).viewport.scrollWidth <= 390);
assert.deepEqual(sourceFiles(), baseline.source); assert.equal(git(['rev-parse', 'HEAD']), baseline.head); assert.equal(sha(fs.readFileSync(path.join(git(['rev-parse', '--absolute-git-dir']), 'index'))), baseline.index);
const afterOld = await api('/sessions/' + previous.sessionId + '/export'); delete afterOld.exportedAt; assert.equal(sha(canonical(afterOld)), baseline.originalSession);
assert.equal(sha(canonical((await api('/bootstrap')).config)), baseline.configuration);
const exported = await api('/sessions/' + sessionId + '/export'); fs.writeFileSync(path.join(directory, 'session-export.json'), JSON.stringify(exported, null, 2) + '\n');
result = { success: true, version: '1.10.1', testedAt: new Date().toISOString(), kind: 'configured-model-inner-browser-acceptance', model: before.config.model,
directory, projectId: project.id, sessionId, taskId, root, sourceCommit: baseline.head, sourcePreserved: true, indexPreserved: true, originalEngineeringTaskPreserved: true,
modelStatus: current.status, usage: current.execution.task.usage, elapsedSeconds: (Date.now() - startedAt) / 1000, decisions, continuations,
jobs: records.map(value => ({ id: value.job.id, status: value.job.status, viewport: value.viewport, assertions: value.job.assertions, steps: value.job.steps, resultSha256: value.job.resultSha256, screenshots: value.job.screenshots, cleanup: value.job.cleanup })),
scope: 'Configured model chooses CSS plans and reads original fields through the self harness. The verifier confirms only sealed local page plans and validates original DOM/PNG, source/index and previous Task. This read-only page sample is separate from code-repair success rate and Purge benefit.',
credentialsHandling: 'The original in-memory Provider performs requests; no model key is read, copied, printed or saved.' };
} catch (error) {
if (sessionId) { await api('/sessions/' + sessionId + '/stop', {}).catch(() => {}); current = await api('/sessions/' + sessionId).catch(() => current); }
result = { success: false, version: '1.10.1', testedAt: new Date().toISOString(), directory, sessionId, taskId, modelStatus: current?.status, usage: current?.execution?.task?.usage, decisions, continuations, error: error.stack }; process.exitCode = 1;
if (sessionId) { const exported = await api('/sessions/' + sessionId + '/export').catch(() => null); if (exported) fs.writeFileSync(path.join(directory, 'session-export.json'), JSON.stringify(exported, null, 2) + '\n'); }
}
fs.writeFileSync(path.join(directory, 'result.json'), JSON.stringify(result, null, 2) + '\n');
fs.writeFileSync('docs/browser-engine-live-model-validation.json', JSON.stringify(result, null, 2) + '\n');
console.log(JSON.stringify({ success: result.success, sessionId, taskId, modelStatus: result.modelStatus, usage: result.usage, elapsedSeconds: result.elapsedSeconds, jobs: result.jobs?.map(value => ({ id: value.id, status: value.status, viewport: value.viewport, assertions: value.assertions })), error: result.error, directory }));
+3 -3
View File
@@ -92,7 +92,7 @@ try {
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'].includes(manifest.version)) {
if (['1.8.0', '1.9.0', '1.10.0', '1.10.1'].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')));
@@ -124,7 +124,7 @@ try {
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'].includes(manifest.version) && process.argv.includes('--native-engines')) {
if (['1.9.0', '1.10.0', '1.10.1'].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');
@@ -144,7 +144,7 @@ try {
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 = manifest.version === '1.10.0' ? await verifyBrowserApi({ api, url, token: bootstrap.token, directory: data, appRoot, contained: true }) : null;
const actualBrowser = ['1.10.0', '1.10.1'].includes(manifest.version) ? await verifyBrowserApi({ 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; } });
const result = { success: true, date: new Date().toISOString(), appRoot, version: manifest.version, nodeVersion: manifest.nodeVersion,
+3 -3
View File
@@ -42,7 +42,7 @@ try {
assert.deepEqual(actualFiles.slice().sort(), Object.keys(expected).sort());
for (const [relative, sha256] of Object.entries(expected)) assert.equal(digest(path.join(sourceRoot, relative)), sha256, relative);
let actualRea = null;
if (['1.8.0', '1.9.0', '1.10.0'].includes(evidence.version)) {
if (['1.8.0', '1.9.0', '1.10.0', '1.10.1'].includes(evidence.version)) {
stage = 'contained REA';
const reaOutput = await run(['scripts/verify-rea.mjs', '--app-root', sourceRoot, '--contained'], 'rea.log');
actualRea = JSON.parse(reaOutput.trim().split('\n').at(-1));
@@ -50,7 +50,7 @@ try {
assert.ok(actualRea.results.every(item => item.rootExited === true));
}
let actualEngine = null;
if (['1.9.0', '1.10.0'].includes(evidence.version) && process.argv.includes('--native-engines')) {
if (['1.9.0', '1.10.0', '1.10.1'].includes(evidence.version) && process.argv.includes('--native-engines')) {
stage = 'native DeepSeek SDK';
const output = await run(['scripts/verify-engines.mjs'], 'engines.log');
actualEngine = JSON.parse(output.trim().split('\n').at(-1));
@@ -58,7 +58,7 @@ try {
assert.equal(actualEngine.modelRequests, 0); assert.equal(actualEngine.rootExited, true); assert.equal(actualEngine.nativeMethods.length, 6);
}
let actualBrowser = null;
if (evidence.version === '1.10.0') {
if (['1.10.0', '1.10.1'].includes(evidence.version)) {
stage = 'contained browser runtime';
const output = await run(['scripts/verify-browser.mjs', '--app-root', sourceRoot, '--contained'], 'browser.log');
actualBrowser = JSON.parse(output.trim().split('\n').at(-1));
+1 -1
View File
@@ -1,6 +1,6 @@
import { randomUUID, createHash } from 'node:crypto';
export const APP_VERSION = '1.10.0';
export const APP_VERSION = '1.10.1';
export function executionEnvironment() {
const windows = process.platform === 'win32';
+7 -1
View File
@@ -3,6 +3,7 @@ import fs from 'node:fs';
import { Provider } from './provider.mjs';
import { Runtime } from './runtime.mjs';
import { Store, atomicJson, readJson } from './store.mjs';
import { ArtifactStore } from '../core/storage/artifact-store.mjs';
import { createRequestHandler, createSessionPublisher } from './app.mjs';
import { APP_VERSION } from './diagnostics.mjs';
@@ -28,7 +29,12 @@ export function installUpgrade(context, { appDirectory, updateServiceInfo = true
Object.setPrototypeOf(provider, Provider.prototype);
Object.setPrototypeOf(runtime, Runtime.prototype);
runtime.appDirectory = root; runtime.checks = null; runtime.deliveries = null; runtime.codeIndex = null; runtime.changeSets = null; runtime.contextPlans = null; runtime.workspaces = null; runtime.research = null; runtime.engines = null; runtime.browser = null;
store.ensureStorage(); store.claimRuntime();
store.ensureStorage();
// A SQLite host can retain an artifact object from an earlier bundle.
// Reopen the same blobs through the new API without mutating that object;
// oldStoreProperties restores it if installing this handler fails.
store.artifactStore = new ArtifactStore(store.directory);
store.claimRuntime();
store.removeAllListeners('update'); store.on('update', createSessionPublisher(clients));
server.removeAllListeners('request'); server.on('request', handler);
server.prependOnceListener('close', closeStorage);
+4 -1
View File
@@ -2,11 +2,14 @@
## 当前执行:真实工程交付与内置浏览器验证(2026-10-30)
本轮全量接续:HEAD=5921b8e,工作区干净。正式服务实测1.9.0/PID23080;1.10.0不可变候选20261030004653739已生成,便携归档/真实随包浏览器通过。独立源码验收PID44208仍执行已有274项完整回归,不重复启动;完成后封存输入、升级原Provider并验证工作台实际页面任务,继续下一项核心能力。
1. [complete] 恢复到ddf178c,正式4318实测1.9.0/PID23080;独立源码261项、108组界面与原Provider保留证据已有,继续沿用。
2. [complete] 已有React四文件/9项测试/typecheck/build/实际页面/Git通过;新Python三文件/6项测试/编译/Git通过,分别保存原Task、审查、输入和用量,准备本地封存提交。
3. [complete] C20构建快照、固定Playwright/Edge身份、独立浏览器、有界交互及原结果/PNG字节绑定;10项核心/API/恢复专项通过。
4. [complete] 三项模型工具、HTTP、任务界面与交付报告已接入;13类118组界面通过,最后停止job绑定修复后4项API及原失败回归5/5、10组浏览器UI追加复验通过;Git交付和原记录核验已验证。
5. [in_progress] 微调前273项完整源码通过,最终源码新增旧stop归属回归后需274项独立包验收;diff审查、本地提交、新不可变发行/独立源码/随包运行与原Provider升级继续执行。
5. [complete] 1.10.0不可变候选274/274独立源码、6份离线构建及170份输入核对通过;正式4318保留PID23080/Provider和23会话升级,原273项及118组界面不改写。
6. [in_progress] 首轮实模发现旧ArtifactStore缺少readBytes,1.10.1补同目录当前API及失败回滚;真实1.9对象修复前1/2、之后2/2通过。完成不可变修复包、276项独立源码和实模页面验收,再接续任务依赖计划。
本轮接续不重复旧工程运行,不修改已有真实模型连接;不把连接核验、外部验证器或计划中的桌面/手机连接记为已实现。外部Harness工程写入仍依赖后续受控工具桥。
+6
View File
@@ -0,0 +1,6 @@
# Owned 1.9.0 artifact storage fixture
`artifact-store.mjs` is the unchanged source at commit `91981c1`. It retains the
pre-browser text-only artifact API. Upgrade regressions use its actual object
and existing blobs to verify a new binary API after the host upgrades, and
rollback to the old object if installing the new request handler fails.
+40
View File
@@ -0,0 +1,40 @@
import fs from 'node:fs';
import path from 'node:path';
import { createHash, randomUUID } from 'node:crypto';
export class ArtifactStore {
constructor(directory) {
this.root = path.join(directory, 'artifacts'); fs.mkdirSync(this.root, { recursive: true });
if (fs.lstatSync(this.root).isSymbolicLink()) throw new Error('执行工件目录不能是链接。');
}
write(session, run, value, { kind = 'tool-result', mediaType = 'application/json' } = {}) {
const bytes = Buffer.from(typeof value === 'string' ? value : JSON.stringify(value), 'utf8');
if (bytes.length > 8 * 1024 * 1024) throw new Error('单项执行工件超过8MB,请缩小输出范围。');
const sha256 = createHash('sha256').update(bytes).digest('hex');
const relative = sha256.slice(0, 2) + '/' + sha256 + '.blob';
const file = path.join(this.root, relative);
fs.mkdirSync(path.dirname(file), { recursive: true });
if (fs.lstatSync(path.dirname(file)).isSymbolicLink() || fs.existsSync(file) && fs.lstatSync(file).isSymbolicLink()) throw new Error('执行工件不能通过链接写入。');
if (fs.existsSync(file)) {
const existing = fs.readFileSync(file);
if (existing.length !== bytes.length || createHash('sha256').update(existing).digest('hex') !== sha256) {
throw new Error('已有执行工件校验失败,实际结果需要核对。');
}
} else {
const temporary = file + '.' + randomUUID() + '.tmp';
const handle = fs.openSync(temporary, 'wx', 0o600);
try { fs.writeFileSync(handle, bytes); fs.fsyncSync(handle); } finally { fs.closeSync(handle); }
try { fs.renameSync(temporary, file); } finally { if (fs.existsSync(temporary)) fs.unlinkSync(temporary); }
}
return { id: randomUUID(), sessionId: session.id, projectId: session.projectId, taskId: run?.taskId ?? session.taskId ?? null,
runId: run?.id ?? session.runId ?? null, kind, mediaType, sha256, bytes: bytes.length, relative, createdAt: new Date().toISOString(), status: 'stored' };
}
read(artifact) {
if (!/^[a-f0-9]{2}\/[a-f0-9]{64}\.blob$/.test(artifact.relative)) throw new Error('执行工件路径无效。');
const file = path.join(this.root, artifact.relative);
if (fs.lstatSync(path.dirname(file)).isSymbolicLink() || fs.lstatSync(file).isSymbolicLink()) throw new Error('执行工件不能是链接。');
const bytes = fs.readFileSync(file);
if (bytes.length !== artifact.bytes || createHash('sha256').update(bytes).digest('hex') !== artifact.sha256) throw new Error('执行工件校验失败,实际结果需要核对。');
return bytes.toString('utf8');
}
}
+65
View File
@@ -0,0 +1,65 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import fs from 'node:fs';
import path from 'node:path';
import http from 'node:http';
import { createHash } from 'node:crypto';
import { fixture, workspace } from './helpers.mjs';
import { createBrowserProject, browserSteps } from './fixtures/browser-project.mjs';
import { ArtifactStore as LegacyArtifacts } from './fixtures/legacy-artifacts-1.9/artifact-store.mjs';
import { Provider } from '../src/server/provider.mjs';
import { Runtime } from '../src/server/runtime.mjs';
import { createRequestHandler } from '../src/server/app.mjs';
import { installUpgrade } from '../src/server/hot-upgrade.mjs';
import { verifyBrowserJob } from '../src/core/browser/browser-manager.mjs';
async function legacyContext(t) {
const f = createBrowserProject(fixture(t));
const provider = new Provider(); provider.setKey('owned-upgrade-fixture-key');
const runtime = new Runtime(f.store, provider, { appDirectory: workspace });
f.store.artifactStore = new LegacyArtifacts(f.data);
const context = { store: f.store, provider, runtime, server: http.createServer(), token: 'owned-upgrade-token',
clients: new Set(), started: Date.now(), exampleProject: null, shutdown: async () => {}, getPort: () => context.server.address().port };
context.server.on('request', createRequestHandler({ ...context, appDirectory: workspace }));
await new Promise(resolve => context.server.listen(0, '127.0.0.1', resolve));
f.onCleanup(async () => { context.server.closeAllConnections(); await new Promise(resolve => context.server.close(resolve)); });
return { f, context };
}
test('a live SQLite host with the actual 1.9 artifact object upgrades, keeps its original blobs and verifies real browser PNG bytes', { timeout: 30000 }, async t => {
const { f, context } = await legacyContext(t), original = context.store.artifactStore;
const run = f.store.core.run.get(f.session.runId), value = { original: '旧版实际 UTF-8 工件', n: 19 };
const artifact = original.write(f.session, run, value); f.store.core.artifact.set(artifact.id, artifact); f.store.save(f.session);
const bytes = fs.readFileSync(path.join(original.root, artifact.relative));
const beforeSession = structuredClone(f.store.publicSession(f.session));
assert.equal(typeof original.readBytes, 'undefined');
const upgraded = installUpgrade(context, { appDirectory: workspace, updateServiceInfo: false });
assert.equal(upgraded.hasKey, true); assert.equal(context.provider, context.runtime.provider);
assert.deepEqual(f.store.publicSession(f.session), beforeSession);
assert.deepEqual(f.store.artifactStore.readBytes(artifact), bytes);
assert.deepEqual(JSON.parse(f.store.artifactStore.read(artifact)), value);
const planned = await context.runtime.browserManager().plan(f.session, { steps: browserSteps });
const active = await context.runtime.browserManager().start(f.session, planned.id); await active.promise;
assert.equal(active.job.status, 'passed'); assert.equal(active.job.cleanup.exited, true);
const record = verifyBrowserJob(f.store, f.session, active.job); assert.equal(record.assertions.passed, record.assertions.total);
const image = active.job.screenshots[0], stored = f.store.owned('artifact', image.artifactId, f.session.id);
const response = await fetch('http://127.0.0.1:' + context.server.address().port + '/api/sessions/' + f.session.id + '/browser-jobs/' + active.job.id + '/images/' + image.artifactId,
{ headers: { 'X-Workbench-Token': context.token, Connection: 'close' } });
assert.equal(response.status, 200); assert.equal(response.headers.get('content-type'), 'image/png');
const actual = Buffer.from(await response.arrayBuffer());
assert.ok(actual.subarray(0, 8).equals(Buffer.from([137, 80, 78, 71, 13, 10, 26, 10])));
assert.equal(createHash('sha256').update(actual).digest('hex'), stored.sha256);
assert.equal(fs.readFileSync(path.join(original.root, artifact.relative)).equals(bytes), true);
});
test('failed upgrade restores the original artifact object, provider and request handler', async t => {
const { f, context } = await legacyContext(t), original = f.store.artifactStore, handlers = context.server.listeners('request');
const runtimeProperties = { appDirectory: context.runtime.appDirectory, browser: context.runtime.browser };
fs.mkdirSync(path.join(f.data, 'service-info.json'));
assert.throws(() => installUpgrade(context, { appDirectory: workspace }));
assert.equal(f.store.artifactStore, original); assert.equal(typeof f.store.artifactStore.readBytes, 'undefined');
assert.deepEqual(context.server.listeners('request'), handlers); assert.equal(context.provider.hasKey(), true);
assert.equal(context.runtime.appDirectory, runtimeProperties.appDirectory); assert.equal(context.runtime.browser, runtimeProperties.browser);
const artifact = original.write(f.session, f.store.core.run.get(f.session.runId), { rollback: true });
assert.deepEqual(JSON.parse(original.read(artifact)), { rollback: true });
});