agentworkshop 0.17.1 → 0.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/e534f0d1-3bc5-444b-a033-3e437b713fc0.json +1 -0
- package/.output/server/chunks/_/nitro.mjs +909 -909
- package/.output/server/package.json +1 -1
- package/README-zh.md +20 -7
- package/README.md +20 -7
- package/config.yml +1 -1
- package/desktop/main.mjs +19 -15
- package/desktop/update.mjs +29 -1
- package/docs/cli.en.md +1 -1
- package/docs/cli.md +1 -1
- package/docs/desktop.md +2 -2
- package/docs/plugins.en.md +1 -1
- package/docs/plugins.md +1 -1
- package/docs/sdk.en.md +1 -1
- package/docs/sdk.md +1 -1
- package/package.json +1 -1
- package/.output/public/_nuxt/builds/meta/8d794b8c-cf0b-44f9-b3af-4332fc81fdf6.json +0 -1
package/README-zh.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
[](https://www.npmjs.com/package/agentworkshop)
|
|
12
12
|
[](https://www.npmjs.com/package/agentworkshop)
|
|
13
|
-
[](https://github.com/kingdol666/AgentWorkShop/releases/tag/v0.17.
|
|
13
|
+
[](https://github.com/kingdol666/AgentWorkShop/releases/tag/v0.17.3)
|
|
14
14
|
[](https://github.com/kingdol666/AgentWorkShop/stargazers)
|
|
15
15
|
[](https://github.com/kingdol666/AgentWorkShop/commits)
|
|
16
16
|
[](https://github.com/kingdol666/AgentWorkShop/issues)
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
**[English](./README.md)** · **[在线文档](https://kingdol666.github.io/AgentWorkShop)** · **[版本发布](https://github.com/kingdol666/AgentWorkShop/releases)** · **[更新日志](./changelog.md)** · **[插件 API](./docs/plugins.md)** · **[SDK](./docs/sdk.md)**
|
|
30
30
|
|
|
31
|
-
<sub><b>源码 v0.17.
|
|
31
|
+
<sub><b>源码 v0.17.3(2026-11-23 发布)</b> · 一体化桌面壳与应用内更新 · 桌面/Web 共用 <code>~/.AgentWorkShop</code> · 14 个执行引擎 · 6 种现场协议(5 内置 + 串口插件)+ MES REST(镜像与直连双路径)· **项目中心** · **RSI 经验演化** · **受治理产品经验** · **IDD/RAG 插件集成** · **AgentPrefab / Skill / MCP 能力供应链** · 双语文档(简体中文 / English)</sub>
|
|
32
32
|
|
|
33
33
|
<br />
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
</div>
|
|
38
38
|
|
|
39
|
-
[快速开始](#快速开始) · [当前源码](#当前源码-v0-17-
|
|
39
|
+
[快速开始](#快速开始) · [当前源码](#当前源码-v0-17-3) · [0.17.3 发布说明](#whats-new-in-0173) · [Agent 团队模型](#agent-团队模型) · [核心能力](#核心能力) · [设计架构](#设计架构) · [验证与验收](#验证与验收) · [文档站](https://kingdol666.github.io/AgentWorkShop)
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
@@ -49,17 +49,30 @@
|
|
|
49
49
|
- **交付是一等概念**:**Project 模式**把蓝图变成计划、带依赖的 WBS、L1 技术复核、L2 Owner 验收与真实交付物——交付物不通过,项目不算完成;
|
|
50
50
|
- **作业链按治理阶段实现**:读取 → 分析 → 提案 → 按有效策略审批(如适用)→ 下发 → 回读/审计;每份验收证据应注明实际覆盖范围及使用模拟器还是物理设备。
|
|
51
51
|
|
|
52
|
-
## 当前源码 v0.17.
|
|
52
|
+
## 当前源码 v0.17.3
|
|
53
53
|
|
|
54
|
-
当前源码版本为 **0.17.
|
|
54
|
+
当前源码版本为 **0.17.3**(npm + GitHub Release,2026-11-23)。本版新增一体化桌面壳(40px 标题导轨 + 原样网页内容视图)、桌面/Web/CLI 共用 `~/.AgentWorkShop` 数据目录,以及基于 GitHub Releases 的应用内更新(SHA-256 校验、静默安装并重启)。0.17.3 真正修复了安装步骤:改由独立无控制台 WSH 助手(`wscript.exe` + 固定 VBS,路径走环境变量)在应用退出后执行静默安装并重启。此前 `cmd.exe` 命令串会被 Windows 引号规则破坏,而 Windows PowerShell 以 `DETACHED_PROCESS` 启动时立即退出(均在 Windows 11 实测)。0.17.1 将更新下载改为 GitHub API 资产端点,并把安装包传输预算提升到 30 分钟,使受限网络与慢速链路也能完成更新。同时保留 0.16.x 全部内容——0.15.x 的「AgentPrefab 能力装配」计划(#252–#258)加上 **Leader 自主管理 Worker 的 AgentPrefab 能力**(合并 PR #262/#264/#265):Channel Leader 创建 Worker 时可携带已发布 revision 选择器并原子固定 `(prefabId, revision, slotValues, contentHash)`;名册带 `manageable`/`protected` 标记;可按 revision 切换/解绑绑定;且只能移除自己创建的 Worker。Worker 创建来源持久化(`created_by_kind`/`created_by_id`/`created_via`/`created_reason`);人类绑定 Worker、其他 Leader 的 Worker、Lead、Project Leader 与未关闭 Session 克隆均受删除保护,移除时回收任务、同事务取消待投递并清理实例节点绑定,不动全局模板与不可变 revision。native/REST/MCP/Project 各路径 dispatch 对损坏/哈希不匹配绑定、停用成员、角色/版本不匹配与模板可见性越界一律 fail-closed;Project 任务实例重试复用首次固定的快照并做 CAS/哈希校验。已发布 Prefab profile 按字段应用到受支持 harness(OMP thinking level 走 RPC);唯一 Skill 别名解析为 canonical revision id。数据库契约 **v10** 新增来源列(存量行保守迁移为 `system`/`protected`)。
|
|
55
55
|
|
|
56
56
|
v0.16.0 验证:#262/#264/#265/#263/#266 PR quick-gate 全绿;focused 套件 **38/38**、合并后 **22/22** 与 **13/13**、Project/Prefab/Session 回归集 **235/235**;发布构建实机隔离验收——Leader/Prefab 全链 **30/30 ×2**(创建带 Prefab 的 Worker → SQLite 来源核验 → 名册标记 → 目录收窄 → dispatch 放行/拒绝 → 用户路径 Worker 保护 → lead 自改拒绝 → revision 切换即收窄 → 解绑 → 移除保留模板与 revision → REST 删 lead 409),官方 L10 全新实例 **21/21**,AgentTeam CRUD/部署/派发 **25/25**,前端 SSR 路由 200。Mimosa 深扫有封印(`sha256:a91957e0…`,54 findings,依赖风险 0)——findings 如实呈报,不作安全通过声明。边界:外部 MCP 正向实网联通、Prefab 指导下的真实 OMP 模型作业、浏览器 UI 点击验收为 NOT_RUN。见[全流程验收报告](docs/audit/evidence/2026-11-21-fullflow-round/REPORT.md)与[Prefab/Skills/MCP 实机报告](docs/audit/evidence/2026-11-21-agent-prefab-acceptance/REPORT.md)。
|
|
57
57
|
|
|
58
|
+
## What's new in 0.17.3
|
|
59
|
+
|
|
60
|
+
- **更新安装助手(最终)**:静默安装 + 重启改由独立的无控制台 WSH 助手执行——`wscript.exe //B //NoLogo <固定 VBS>`。VBS 通过 `AW_UPDATE_INSTALLER`/`AW_UPDATE_EXE` 读取安装包与可执行文件路径,等待 6 秒后以 `/S` 运行 NSIS 安装包并等待其结束,再重启应用。该助手以 `DETACHED_PROCESS` 启动且能在应用退出后存活;`cmd.exe`(不识别 Node 的 `\"` 转义)与 Windows PowerShell(分离启动即退出,Windows 11 实测)都不可行。更新安装改由独立无控制台 WSH 助手执行;`cmd.exe` 与分离式 PowerShell 两条路均已实测不可用。
|
|
61
|
+
- **验收钩子**:`AW_UPDATE_AUTOINSTALL=1` 仅供自动化验收跳过确认对话框;常规使用仍显示对话框。
|
|
62
|
+
- **回归测试**:固定助手宿主与参数、VBS 不含绝对路径、缺失安装包/可执行文件/脚本路径必须拒绝。
|
|
63
|
+
- **验证**:0.17.3 验收实测检查发布 → 经 API 端点下载 → SHA-256 校验 → 助手就地在当前安装目录完成静默安装并重启应用。安装版实测:检查 → 下载 → SHA-256 → 安装 → 重启。
|
|
64
|
+
|
|
65
|
+
## What's new in 0.17.2
|
|
66
|
+
|
|
67
|
+
- **更新安装助手(已被取代)**:第一次修复改用独立 PowerShell 助手,因为此前的 `cmd.exe` 命令串内嵌带引号路径、会被 Node 的 `\"` 转义破坏。但 PowerShell 以 `DETACHED_PROCESS` 启动时立即退出,该版同样未能安装任何内容,已由 0.17.3 的 WSH 助手取代。该版 PowerShell 助手在分离启动时立即退出,已由 0.17.3 取代。
|
|
68
|
+
- **回归测试**:助手调用不得把路径拼进命令行;缺失安装包/可执行文件路径必须拒绝。
|
|
69
|
+
- **验证**:安装版 0.17.1 实测检查发布 → 经 API 端点下载安装包(416,549,162 字节,SHA-256 与 `SHA256SUMS.txt` 一致)→「重启安装」;该轮复现了旧 `cmd.exe` 助手缺陷(无安装进程、安装目录未变)。随后 0.17.2 的 PowerShell 方案被复现为静默空操作。安装版实测:检查 → 下载 → SHA-256 → 安装 → 重启。
|
|
70
|
+
|
|
58
71
|
## What's new in 0.17.1
|
|
59
72
|
|
|
60
73
|
- **更新端点加固**:下载改用 GitHub API 资产端点(`/releases/assets/:id` + `Accept: application/octet-stream`),不再从 `github.com` 的 `browser_download_url` 起步;重定向仍只允许固定 `release-assets.githubusercontent.com`,SHA-256 校验不变。受限网络下 `github.com` 不可达而 `api.github.com` 可用时仍可更新。
|
|
61
74
|
- **传输预算**:安装包下载预算从 60 秒提升到 30 分钟,约 500 MB 的资产在慢速链路也能完成;校验文件仍限长。
|
|
62
|
-
- **验证**:真实 0.17.0 资产经 API 端点下载并通过 `SHA256SUMS.txt` 校验;0.17.1
|
|
75
|
+
- **验证**:真实 0.17.0 资产经 API 端点下载并通过 `SHA256SUMS.txt` 校验;0.17.1 的「下载到就绪」流程见发布证据,安装步骤本身在 0.17.2/0.17.3 修复。
|
|
63
76
|
|
|
64
77
|
## What's new in 0.17.0
|
|
65
78
|
|
|
@@ -483,7 +496,7 @@ curl -X POST http://localhost:3001/api/workshop/projects/instantiate \
|
|
|
483
496
|
|
|
484
497
|
**如果这个项目对你有用,点一个 ⭐ 能让更多人找到它。**
|
|
485
498
|
|
|
486
|
-
当前源码版本:**v0.17.
|
|
499
|
+
当前源码版本:**v0.17.3(已发布 2026-11-23)** —— [最新版本 v0.17.3](https://github.com/kingdol666/AgentWorkShop/releases/tag/v0.17.3) · [更新日志](./changelog.md) · [在线文档](https://kingdol666.github.io/AgentWorkShop)
|
|
487
500
|
|
|
488
501
|
<a href="https://star-history.com/#kingdol666/AgentWorkShop&Date">
|
|
489
502
|
<img src="https://api.star-history.com/svg?repos=kingdol666/AgentWorkShop&type=Date" alt="Star history" width="70%" />
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
[](https://www.npmjs.com/package/agentworkshop)
|
|
12
12
|
[](https://www.npmjs.com/package/agentworkshop)
|
|
13
|
-
[](https://github.com/kingdol666/AgentWorkShop/releases/tag/v0.17.
|
|
13
|
+
[](https://github.com/kingdol666/AgentWorkShop/releases/tag/v0.17.3)
|
|
14
14
|
[](https://github.com/kingdol666/AgentWorkShop/stargazers)
|
|
15
15
|
[](https://github.com/kingdol666/AgentWorkShop/commits)
|
|
16
16
|
[](https://github.com/kingdol666/AgentWorkShop/issues)
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
**[简体中文](./README-zh.md)** · **[Documentation](https://kingdol666.github.io/AgentWorkShop)** · **[Releases](https://github.com/kingdol666/AgentWorkShop/releases)** · **[Changelog](./changelog.md)** · **[Plugin API](./docs/plugins.md)** · **[SDK](./docs/sdk.md)**
|
|
30
30
|
|
|
31
|
-
<sub><b>source v0.17.
|
|
31
|
+
<sub><b>source v0.17.3 (released 2026-11-23)</b> · integrated desktop shell with in-app updates · shared <code>~/.AgentWorkShop</code> home · 14 engines · 6 field protocols (5 built-in + serial plugin) + MES REST (mirror & live) · **Project center** · **RSI experience evolution** · **governed product experience** · **IDD/RAG plugin integration** · **AgentPrefab / Skills / MCP capability supply chain** · bilingual docs (简体中文 / English)</sub>
|
|
32
32
|
|
|
33
33
|
<br />
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
</div>
|
|
38
38
|
|
|
39
|
-
[Quick start](#quick-start) · [Current source](#current-source-v0-17-
|
|
39
|
+
[Quick start](#quick-start) · [Current source](#current-source-v0-17-3) · [0.17.3 release notes](#whats-new-in-0173) · [Agent team model](#the-agent-team-model) · [Capabilities](#capabilities) · [Architecture](#architecture) · [Verification](#verification) · [Docs site](https://kingdol666.github.io/AgentWorkShop)
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
@@ -49,17 +49,30 @@ A configuration-driven platform where **AI agent teams** and industrial systems
|
|
|
49
49
|
- **Delivery is a first-class concept**: **Project mode** turns a blueprint into a plan, a WBS with dependencies, L1 technical review, L2 owner acceptance and real deliverables — the project closes only when the deliverables pass;
|
|
50
50
|
- **The loop is implemented in governed stages**: read → analyze → propose → policy-controlled approval where required → write → readback/audit; the scope of each test and whether it used a simulator or physical equipment are stated with its evidence.
|
|
51
51
|
|
|
52
|
-
## Current source: v0.17.
|
|
52
|
+
## Current source: v0.17.3
|
|
53
53
|
|
|
54
|
-
The source version is **0.17.
|
|
54
|
+
The source version is **0.17.3** (npm + GitHub Release, 2026-11-23). It adds the integrated desktop shell (40px title rail with the unchanged web content in a separate view), the shared `~/.AgentWorkShop` data home for Web/CLI/desktop, and an in-app GitHub-release update channel with SHA-256 verification. 0.17.3 fixes the install step for real: a detached console-free WSH helper (`wscript.exe` + a fixed VBS, paths carried by the environment) waits for the app to exit, runs the NSIS installer with `/S`, then relaunches the app. The earlier `cmd.exe` command string was mangled by Windows quoting, and Windows PowerShell exits immediately when spawned with `DETACHED_PROCESS` (both verified on Windows 11). 0.17.1 routes update downloads through the GitHub API asset endpoint and raises the installer transfer budget to 30 minutes, so updates work where `github.com` web is blocked and on slow links. It retains the 0.16.x baseline — everything in 0.15.x — the AgentPrefab capability-assembly plan (#252–#258) plus **Leader-managed worker Prefabs** (merged PRs #262/#264/#265): a Channel Leader can create workers with a published AgentPrefab selector atomically pinned to `(prefabId, revision, slotValues, contentHash)`, inspect the roster with `manageable`/`protected` flags, switch or detach bindings per revision, and remove only the workers it created. Worker creation provenance is durable (`created_by_kind`/`created_by_id`/`created_via`/`created_reason`); human-bound workers, other leaders' workers, leads, Project Leaders and open Session clones are protected from removal, and removal recycles tasks, cancels pending chat deliveries and clears instance node bindings without touching global templates or immutable revisions. Dispatch (native/REST/MCP/Project) fails closed on malformed or hash-mismatched bindings, disabled members, role/version mismatches and template visibility crossings; Project task-instance retries reuse the originally pinned snapshot with CAS/hash validation. Published Prefab profiles apply to supported harness fields (OMP thinking level via RPC); unique Skill aliases resolve to canonical revision ids. Database schema contract v10 adds the provenance columns (existing rows migrate conservatively as `system`/`protected`).
|
|
55
55
|
|
|
56
56
|
v0.16.0 verification: PR quick-gates green on #262/#264/#265/#263/#266; focused suites **38/38**, post-merge **22/22** and **13/13**, Project/Prefab/Session regression set **235/235**; live isolated-instance acceptance on the release build — Leader/Prefab full chain **30/30 ×2** (create-with-prefab → provenance in SQLite → roster flags → catalog narrowing → dispatch allow/deny → user-worker protection → lead self-op denial → revision switch drops capability → unbind → remove preserves template+revisions → REST lead-delete 409), official L10 **21/21** on a fresh instance, AgentTeam CRUD/deploy/dispatch **25/25**, frontend SSR routes 200. Mimosa deep scan sealed (`sha256:a91957e0…`, 54 findings, dependency risk 0) — findings reported, not a security pass. Boundaries: external MCP positive live trace, real-OMP-model work under a prefab, and browser UI click-through remain NOT_RUN. See the [full-flow acceptance report](docs/audit/evidence/2026-11-21-fullflow-round/REPORT.md) and the [Prefab/Skills/MCP live report](docs/audit/evidence/2026-11-21-agent-prefab-acceptance/REPORT.md).
|
|
57
57
|
|
|
58
|
+
## What's new in 0.17.3
|
|
59
|
+
|
|
60
|
+
- **Update install helper (final)**: the silent install + relaunch step now runs through a detached, console-free WSH helper — `wscript.exe //B //NoLogo <fixed VBS>`. The VBS receives the installer and executable paths through `AW_UPDATE_INSTALLER`/`AW_UPDATE_EXE`, sleeps 6 s, runs the NSIS installer with `/S` and waits, then restarts the executable. This host is started with `DETACHED_PROCESS` and survives the app's exit, which neither `cmd.exe` (Node's `\"` quoting is not understood) nor Windows PowerShell (exits immediately when detached, verified on Windows 11) does. 更新安装改由独立无控制台 WSH 助手执行;`cmd.exe` 与分离式 PowerShell 两条路均已实测不可用。
|
|
61
|
+
- **Acceptance hook**: `AW_UPDATE_AUTOINSTALL=1` skips the confirmation dialog for automated acceptance only; the dialog remains in normal use.
|
|
62
|
+
- **Regression tests**: helper host and arguments are pinned, the VBS carries no absolute paths, and missing installer/executable/script paths are rejected.
|
|
63
|
+
- **Verification**: the 0.17.3 acceptance run checks the release, downloads the installer through the API endpoint, verifies SHA-256, then lets the helper install over the current install directory and relaunch the app. 安装版实测:检查 → 下载 → SHA-256 → 安装 → 重启。
|
|
64
|
+
|
|
65
|
+
## What's new in 0.17.2
|
|
66
|
+
|
|
67
|
+
- **Update install helper (superseded)**: the first fix routed the install through a detached PowerShell helper, because the previous `cmd.exe` command string embedded quoted paths that Node escapes as `\"`. PowerShell itself exits immediately when spawned with `DETACHED_PROCESS`, so this release never installed anything either; it is superseded by 0.17.3's WSH helper. 该版 PowerShell 助手在分离启动时立即退出,已由 0.17.3 取代。
|
|
68
|
+
- **Regression test**: the helper invocation must not embed paths in a command line, and missing installer/executable paths are rejected.
|
|
69
|
+
- **Verification**: an installed 0.17.1 build checked the release, downloaded the 0.17.1 installer through the API endpoint (416,549,162 bytes, SHA-256 matched `SHA256SUMS.txt`) and reached 「重启安装」; that run reproduced the broken `cmd.exe` helper (no installer process, install directory untouched). The 0.17.2 PowerShell attempt was then reproduced as a silent no-op. 安装版实测:检查 → 下载 → SHA-256 → 安装 → 重启。
|
|
70
|
+
|
|
58
71
|
## What's new in 0.17.1
|
|
59
72
|
|
|
60
73
|
- **Update endpoint robustness**: downloads use the GitHub API asset endpoint (`/releases/assets/:id` + `Accept: application/octet-stream`) rather than `browser_download_url` on `github.com`; redirects still validate to the fixed `release-assets.githubusercontent.com` host. 更新下载改走 API 资产端点,避免受限网络下 `github.com` 不可达。
|
|
61
74
|
- **Transfer budget**: the installer download budget is 30 minutes (was 60 seconds), so ~500 MB assets can finish on slow links; the checksum file remains bounded. 安装包下载预算 30 分钟,慢速链路不再中途中止。
|
|
62
|
-
- **Verification**: a real 0.17.0 asset downloaded through the API endpoint and matched `SHA256SUMS.txt`; the 0.17.1
|
|
75
|
+
- **Verification**: a real 0.17.0 asset downloaded through the API endpoint and matched `SHA256SUMS.txt`; the 0.17.1 download-to-ready flow was covered by the release evidence, while the install step itself was fixed in 0.17.2/0.17.3. 实网资产经 API 端点下载并通过 SHA-256 校验。
|
|
63
76
|
|
|
64
77
|
## What's new in 0.17.0
|
|
65
78
|
|
|
@@ -479,7 +492,7 @@ Please **do not** open public issues for vulnerabilities — report privately vi
|
|
|
479
492
|
|
|
480
493
|
**If this project is useful to you, a ⭐ helps others find it.**
|
|
481
494
|
|
|
482
|
-
Current source version: **v0.17.
|
|
495
|
+
Current source version: **v0.17.3 (released 2026-11-23)** — [Latest release v0.17.3](https://github.com/kingdol666/AgentWorkShop/releases/tag/v0.17.3) · [Changelog](./changelog.md) · [Documentation](https://kingdol666.github.io/AgentWorkShop)
|
|
483
496
|
|
|
484
497
|
<a href="https://star-history.com/#kingdol666/AgentWorkShop&Date">
|
|
485
498
|
<img src="https://api.star-history.com/svg?repos=kingdol666/AgentWorkShop&type=Date" alt="Star history" width="70%" />
|
package/config.yml
CHANGED
package/desktop/main.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { app, BrowserWindow, WebContentsView, dialog, ipcMain, Menu, session } from 'electron'
|
|
2
2
|
import { spawn } from 'node:child_process'
|
|
3
|
-
import { createWriteStream, existsSync, mkdirSync, readFileSync } from 'node:fs'
|
|
3
|
+
import { createWriteStream, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'
|
|
4
4
|
import { tmpdir } from 'node:os'
|
|
5
5
|
import { dirname, join, resolve } from 'node:path'
|
|
6
6
|
import { fileURLToPath, pathToFileURL } from 'node:url'
|
|
7
7
|
import { isAppUrl, startSidecar } from './sidecar.mjs'
|
|
8
|
-
import { checkForUpdate, downloadUpdate, UPDATE_REPO } from './update.mjs'
|
|
8
|
+
import { checkForUpdate, downloadUpdate, buildInstallHelper, INSTALL_HELPER_SCRIPT, UPDATE_REPO } from './update.mjs'
|
|
9
9
|
import {
|
|
10
10
|
CHROME_CHANNELS,
|
|
11
11
|
TITLEBAR_HEIGHT,
|
|
@@ -212,22 +212,26 @@ async function installUpdate() {
|
|
|
212
212
|
setUpdateState({ status: 'error', error: '更新包不存在,请重新下载' })
|
|
213
213
|
return
|
|
214
214
|
}
|
|
215
|
-
const choice =
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
215
|
+
const choice = process.env.AW_UPDATE_AUTOINSTALL === '1'
|
|
216
|
+
? { response: 0 }
|
|
217
|
+
: await dialog.showMessageBox(shell, {
|
|
218
|
+
type: 'question',
|
|
219
|
+
title: '安装更新',
|
|
220
|
+
message: `安装 AgentWorkShop v${updateRelease.version} 并重启?`,
|
|
221
|
+
detail: (updateRelease.notes || '更新完成后应用会自动重启。').slice(0, 1_200),
|
|
222
|
+
buttons: ['重启并安装', '稍后'],
|
|
223
|
+
defaultId: 0,
|
|
224
|
+
cancelId: 1,
|
|
225
|
+
})
|
|
224
226
|
if (choice.response !== 0) return
|
|
225
227
|
const installer = updateInstaller
|
|
226
228
|
const exe = process.execPath
|
|
227
|
-
// The app stops its sidecar first; the helper waits
|
|
228
|
-
// silently, then starts the updated executable.
|
|
229
|
-
const
|
|
230
|
-
|
|
229
|
+
// The app stops its sidecar first; the detached helper waits for our files to
|
|
230
|
+
// unlock, runs the NSIS installer silently, then starts the updated executable.
|
|
231
|
+
const helperScript = join(tmpdir(), 'agentworkshop-update-helper.vbs')
|
|
232
|
+
writeFileSync(helperScript, INSTALL_HELPER_SCRIPT, 'ascii')
|
|
233
|
+
const helper = buildInstallHelper({ installer, executable: exe, scriptPath: helperScript, env: process.env })
|
|
234
|
+
spawn(helper.file, helper.args, { detached: true, stdio: 'ignore', windowsHide: true, env: helper.env }).unref()
|
|
231
235
|
quit()
|
|
232
236
|
}
|
|
233
237
|
|
package/desktop/update.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { createWriteStream } from 'node:fs'
|
|
|
5
5
|
import { unlink } from 'node:fs/promises'
|
|
6
6
|
import { lookup as dnsLookup } from 'node:dns/promises'
|
|
7
7
|
import { once } from 'node:events'
|
|
8
|
-
import { join } from 'node:path'
|
|
8
|
+
import { join, win32 } from 'node:path'
|
|
9
9
|
|
|
10
10
|
export const UPDATE_REPO = 'kingdol666/AgentWorkShop'
|
|
11
11
|
export const UPDATE_HOSTS = Object.freeze([
|
|
@@ -218,3 +218,31 @@ export async function downloadUpdate(release, { dir, fetchImpl = fetch, timeoutM
|
|
|
218
218
|
}
|
|
219
219
|
return { path: dest, sha256, bytes }
|
|
220
220
|
}
|
|
221
|
+
|
|
222
|
+
// The installer must run after this process exits (its files are locked while we
|
|
223
|
+
// live), so a detached console-free WSH helper waits, installs silently, then
|
|
224
|
+
// restarts the app. Paths travel through the environment: cmd.exe mangles Node's
|
|
225
|
+
// \" quoting, and Windows PowerShell exits immediately when spawned with
|
|
226
|
+
// DETACHED_PROCESS (verified on Windows 11). wscript.exe needs no console.
|
|
227
|
+
export const INSTALL_HELPER_SCRIPT = [
|
|
228
|
+
'Set sh = CreateObject("WScript.Shell")',
|
|
229
|
+
'Set env = sh.Environment("PROCESS")',
|
|
230
|
+
'WScript.Sleep 6000',
|
|
231
|
+
'sh.Run """" & env("AW_UPDATE_INSTALLER") & """ /S", 0, True',
|
|
232
|
+
'sh.Run """" & env("AW_UPDATE_EXE") & """", 1, False',
|
|
233
|
+
'',
|
|
234
|
+
].join('\r\n')
|
|
235
|
+
|
|
236
|
+
/** Fixed helper invocation for the silent install + relaunch step. */
|
|
237
|
+
export function buildInstallHelper({ installer, executable, scriptPath, env = process.env } = {}) {
|
|
238
|
+
if (typeof installer !== 'string' || !installer) throw new Error('installer path is required')
|
|
239
|
+
if (typeof executable !== 'string' || !executable) throw new Error('executable path is required')
|
|
240
|
+
if (typeof scriptPath !== 'string' || !scriptPath) throw new Error('helper script path is required')
|
|
241
|
+
const root = env.SystemRoot || env.SYSTEMROOT || 'C:\\Windows'
|
|
242
|
+
return {
|
|
243
|
+
// Windows executable path: keep win32 separators even when tests run on another OS.
|
|
244
|
+
file: win32.join(root, 'System32', 'wscript.exe'),
|
|
245
|
+
args: ['//B', '//NoLogo', scriptPath],
|
|
246
|
+
env: { ...env, AW_UPDATE_INSTALLER: installer, AW_UPDATE_EXE: executable },
|
|
247
|
+
}
|
|
248
|
+
}
|
package/docs/cli.en.md
CHANGED
|
@@ -79,7 +79,7 @@ npx -p agentworkshop aw doctor # use -p when you want the name aw
|
|
|
79
79
|
| Package manager | `pnpm@11.9.0` (`packageManager`, needed only for source development) |
|
|
80
80
|
| Module format | ESM (`type: module`) |
|
|
81
81
|
| License | `Apache-2.0` |
|
|
82
|
-
| Current version | `0.17.
|
|
82
|
+
| Current version | `0.17.3` (`package.json`) |
|
|
83
83
|
|
|
84
84
|
## 2. First start (the Claude Code experience)
|
|
85
85
|
|
package/docs/cli.md
CHANGED
|
@@ -76,7 +76,7 @@ npx -p agentworkshop aw doctor # 需要 aw 这个名字时用 -p 指定包
|
|
|
76
76
|
| 包管理器 | `pnpm@11.9.0`(`packageManager`,仅源码开发需要) |
|
|
77
77
|
| 模块形态 | ESM(`type: module`) |
|
|
78
78
|
| 许可证 | `Apache-2.0` |
|
|
79
|
-
| 当前版本 | `0.17.
|
|
79
|
+
| 当前版本 | `0.17.3`(`package.json`) |
|
|
80
80
|
|
|
81
81
|
## 二、首次启动(Claude Code 式)
|
|
82
82
|
|
package/docs/desktop.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
## 更新通道
|
|
22
22
|
|
|
23
|
-
桌面版启动 4 秒后检查 GitHub Releases 最新版本,此后每 30 分钟检查一次;发现比当前版本更新的 release 时,标题栏出现「更新 vX.Y.Z」。点击后把安装包下载到系统临时目录,并用 release 附带的 `SHA256SUMS.txt` 校验 SHA-256;再次确认后退出应用、静默运行 NSIS
|
|
23
|
+
桌面版启动 4 秒后检查 GitHub Releases 最新版本,此后每 30 分钟检查一次;发现比当前版本更新的 release 时,标题栏出现「更新 vX.Y.Z」。点击后把安装包下载到系统临时目录,并用 release 附带的 `SHA256SUMS.txt` 校验 SHA-256;再次确认后退出应用、静默运行 NSIS 安装包并重启。安装/重启由一个独立的无控制台 WSH 助手(`wscript.exe` + 固定 VBS,路径经环境变量传入)执行:应用先退出以释放被占用的文件,助手等待 6 秒后以 `/S` 安装并重新启动当前安装目录中的可执行文件。不使用 `cmd.exe` 命令串(引号会被 Node 转义破坏),也不使用 PowerShell(以 `DETACHED_PROCESS` 启动时立即退出)。`AW_UPDATE_AUTOINSTALL=1` 只用于验收测试,跳过确认对话框。下载只允许 `api.github.com`、`github.com`、`objects.githubusercontent.com`、`release-assets.githubusercontent.com` 四个 HTTPS 主机,逐跳校验重定向、拒绝凭据/非常规端口/非公网 DNS,校验失败不会执行安装包。`AW_UPDATE_CHECK=0` 可关闭检查;`AW_UPDATE_TEST_VERSION` 只用于验收测试。安装包当前未签名,信任锚是 HTTPS + 固定仓库 + SHA-256,不是 Authenticode。
|
|
24
24
|
|
|
25
25
|
发布 release 时需上传安装器 `AgentWorkShop-Setup-<version>-win-x64.exe`、`SHA256SUMS.txt` 和 npm tarball。
|
|
26
26
|
|
|
@@ -40,7 +40,7 @@ Node/TypeScript 负责数据集、作业与评估调度、门禁和模型注册
|
|
|
40
40
|
pnpm install --frozen-lockfile
|
|
41
41
|
pnpm build
|
|
42
42
|
npm pack --ignore-scripts --pack-destination D:\aw-artifacts
|
|
43
|
-
npm install -g --ignore-scripts --prefix D:\aw-artifacts\prefix D:\aw-artifacts\agentworkshop-0.17.
|
|
43
|
+
npm install -g --ignore-scripts --prefix D:\aw-artifacts\prefix D:\aw-artifacts\agentworkshop-0.17.3.tgz
|
|
44
44
|
npm --prefix desktop ci
|
|
45
45
|
npm --prefix desktop run build -- --backend D:\aw-artifacts\prefix\node_modules\agentworkshop --out D:\aw-artifacts\desktop
|
|
46
46
|
```
|
package/docs/plugins.en.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
>
|
|
10
10
|
> Applies to: plugin system v2 has been available since **v0.7.29** (frontend component
|
|
11
11
|
> injection / plugin settings / plugin i18n / runtime services surface); this document
|
|
12
|
-
> describes **v0.17.
|
|
12
|
+
> describes **v0.17.3**. `ctx.sdkVersion` is currently `0.3.0`.
|
|
13
13
|
|
|
14
14
|
## 1. Folder layout & quick start
|
|
15
15
|
|
package/docs/plugins.md
CHANGED
package/docs/sdk.en.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
**SDK version constants**: server-side `SDK_VERSION = '0.3.0'`, browser-side `CLIENT_SDK_VERSION = '0.3.0'`.
|
|
9
9
|
These two constants are the **interface version of the SDK itself** and evolve **independently**
|
|
10
|
-
from the npm package version (the `version` field in `package.json`, currently 0.17.
|
|
10
|
+
from the npm package version (the `version` field in `package.json`, currently 0.17.3) —
|
|
11
11
|
them being out of sync is expected. Never use `SDK_VERSION` to infer the package version, or the reverse.
|
|
12
12
|
**Module format**: ESM only (only `import` / `export`; there is no CJS entry).
|
|
13
13
|
**Types**: `sdk/index.d.mts` and `sdk/client.d.mts` ship with the package, so TypeScript projects
|
package/docs/sdk.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
> 零第三方运行时依赖,Node ≥ 23.4 与现代浏览器双端可用。
|
|
6
6
|
|
|
7
7
|
**SDK 版本常量**:服务端 `SDK_VERSION = '0.3.0'`,浏览器端 `CLIENT_SDK_VERSION = '0.3.0'`。
|
|
8
|
-
这两个常量是 **SDK 自身接口的版本号**,与 npm 包版本(`package.json` 的 `version`,当前 0.17.
|
|
8
|
+
这两个常量是 **SDK 自身接口的版本号**,与 npm 包版本(`package.json` 的 `version`,当前 0.17.3)
|
|
9
9
|
**各自独立演进** —— 常数不同步是预期行为,不要拿 `SDK_VERSION` 去推断包版本,反之亦然。
|
|
10
10
|
**模块形态**:ESM only(只有 `import` / `export`,没有 CJS 入口)。
|
|
11
11
|
**类型**:`sdk/index.d.mts`、`sdk/client.d.mts` 随包发布,TS 项目零配置获得提示(覆盖范围见 §7)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentworkshop",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AgentWorkShop — a configuration-driven industrial agent runtime: agent teams, Channel sessions, Project delivery and governed plant writes",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"8d794b8c-cf0b-44f9-b3af-4332fc81fdf6","timestamp":1795358395740,"prerendered":[]}
|