@alicloud/autowonder 0.3.35 → 0.3.37
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/README.md +14 -10
- package/package.json +1 -1
- package/vendor/autowonder-daemon-darwin-amd64 +0 -0
- package/vendor/autowonder-daemon-darwin-arm64 +0 -0
- package/vendor/autowonder-daemon-linux-amd64 +0 -0
- package/vendor/autowonder-daemon-linux-arm64 +0 -0
- package/vendor/autowonder-daemon-win32-amd64.exe +0 -0
- package/vendor/autowonder-daemon-win32-arm64.exe +0 -0
package/README.md
CHANGED
|
@@ -6,10 +6,10 @@ AutoWonder 本地 agent runtime。安装后启动 daemon,持续轮询本地 as
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# Qoder CLI(模型使用 provider model ID;Context Window 使用固定档位)
|
|
9
|
-
npx -y @alicloud/autowonder@0.3.
|
|
9
|
+
npx -y @alicloud/autowonder@0.3.37 connect --ws-url <wss-endpoint> --token <executor-token> --executor-id <executor-id> --provider qoder --model qmodel_latest --reasoning-effort medium --context-window 260000
|
|
10
10
|
|
|
11
11
|
# Qoder CLI CN
|
|
12
|
-
npx -y @alicloud/autowonder@0.3.
|
|
12
|
+
npx -y @alicloud/autowonder@0.3.37 connect --ws-url <wss-endpoint> --token <executor-token> --executor-id <executor-id> --provider qodercn
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
`connect` 会安装当前 npm 包内置的 daemon,并使用页面生成的 WebSocket endpoint、Token 和执行器 ID 建立连接。客户端只支持通过 Qoder 系列 CLI 启动(`qoder` 对应 `qodercli`,`qodercn` 对应 `qodercn`),其他 `--provider` 取值会在启动 daemon 前直接报错拦截并提示 `Unsupported provider`。选择 Qoder CLI 或 Qoder CLI CN 时需要 Node.js 20+;runtime 会在缺少对应 CLI 时自动通过 npm 安装,并在尚未登录时打开浏览器登录。runtime 会继承当前用户的 HOME、环境变量和 CLI 登录状态。
|
|
@@ -27,7 +27,7 @@ runtime 启动时始终只拉取一次 Platform 环境变量快照,即使已
|
|
|
27
27
|
|
|
28
28
|
出于安全考虑,命令行 token 可能出现在 shell 历史和操作系统进程列表中,建议优先使用环境变量或 Platform 绑定。
|
|
29
29
|
|
|
30
|
-
`connect` 和 `start` 都要求 Qoder CLI / Qoder CLI CN 版本至少为 `1.1.65`。检测到旧版、无法解析的版本,或共享安装被其他进程的安装锁占用时,runtime 不再原位升级共享 CLI,而是安装到独立的私有 generation(`~/.autowonder/qoder-generations/<provider>/gen-*`):先校验候选二进制版本,再原子发布 `current.json` 指向已验证的 generation,启动时直接使用该 generation 的具体路径。候选安装或校验失败不会被选中,上一代保留为回退;旧 generation 不自动删除。显式指定的外部可执行文件(`AUTOWONDER_QODER_CLI` / `AUTOWONDER_QODERCN_CLI`)在校验通过后仍直接使用,runtime 不会原地修改它。daemon 退出与 re-exec 前会取消并等待进行中的 Qoder
|
|
30
|
+
`connect` 和 `start` 都要求 Qoder CLI / Qoder CLI CN 版本至少为 `1.1.65`。检测到旧版、无法解析的版本,或共享安装被其他进程的安装锁占用时,runtime 不再原位升级共享 CLI,而是安装到独立的私有 generation(`~/.autowonder/qoder-generations/<provider>/gen-*`):先校验候选二进制版本,再原子发布 `current.json` 指向已验证的 generation,启动时直接使用该 generation 的具体路径。候选安装或校验失败不会被选中,上一代保留为回退;旧 generation 不自动删除。显式指定的外部可执行文件(`AUTOWONDER_QODER_CLI` / `AUTOWONDER_QODERCN_CLI`)在校验通过后仍直接使用,runtime 不会原地修改它。daemon 退出与 re-exec 前会取消并等待进行中的 Qoder 安装/升级维护任务,避免遗留共享安装票据让同机其他执行器的版本预检持续失败。已缓存的热会话 ACP 子进程也在这道闸门里登记:re-exec 前先关闭并等待退出,避免旧进程池与空闲回收定时器被直接丢弃。所有 Qoder 系列子进程(普通任务、conversation、warm 会话、恢复回退、命令与模型探测)都会强制注入固定的 `QODER_INTEGRATION_ID`,调用方环境不能覆盖该流量归因标识。
|
|
31
31
|
|
|
32
32
|
`qodercn` 是国内版 Qoder CLI。runtime 会在缺少 `qodercn` 时自动把 `@qodercn-ai/qoderclicn` 安装到独立 generation `~/.autowonder/qoder-generations/qodercn/`(旧版本写入的 `~/.autowonder/qoder-cn-cli` 安装仍会被识别),并在尚未登录时打开浏览器登录。它使用自己的配置根(`QODERCN_CONFIG_DIR`,默认 `~/.qoder-cn`),与国际版 `qoder` 不共享可执行文件、凭证和会话。可用 `AUTOWONDER_QODERCN_CLI` 指定自定义可执行文件路径。
|
|
33
33
|
|
|
@@ -67,6 +67,8 @@ Qoder 系列执行器的跨派单记忆由平台托管。服务端在派单里
|
|
|
67
67
|
|
|
68
68
|
daemon 默认启用本地工作区 GC:启动 30 秒后开始检查,之后每 15 分钟开始一次检查。尚有健康的分片工作时每 250 毫秒继续,错误仍按退避重试;每次操作保持有限的节点和时间预算。非会话任务在终态且最后活动时间超过所配置的任务 TTL(默认 48 小时)后符合清理条件;会话目录的 TTL 仍为 720 小时。清理单位是整个 attempt capsule 或 conversation capsule。未知或格式异常、非终态(包括 uploading)、仍在运行、由恢复流程持有、结果仍待确认,或结果状态查询失败的 capsule 都会保留。只有 package 缓存、没有可信终态证据的历史目录不会按目录年龄删除,恢复扫描也不会为它们凭空创建 assigned 状态。
|
|
69
69
|
|
|
70
|
+
启动时的恢复清单扫描失败不再让 GC 永久停摆:扫描每 30 秒重试,期间接单入口保持关闭、GC 以 `recovery_pending` 结束本轮检查,清单确认安全后才开始文件操作。删除前的复核令牌额外包含 `upload-state.json`,扫描过程中交付状态发生变化的任务保持原样。Windows 上目录枚举把 `NtCreateFile` 的 NTSTATUS 归一为 Go 错误,缺失条目按「不存在」处理,权限拒绝与共享冲突仍按错误上报,重命名或删除失败不再被误判为可清理。
|
|
71
|
+
|
|
70
72
|
磁盘使用率达到 85% 或可用空间低于 10 GiB 时进入压力模式,恢复目标是使用率不高于 75% 且可用空间至少 15 GiB。压力模式还允许清理未满 TTL 的 completed attempt;符合条件的 attempt 按最后活动时间从旧到新清理。近期 failed/cancelled 和会话目录的 TTL 不变。每次实际删除后检查恢复目标,隔离重命名不算释放空间。删除前不为统计额外遍历目录;文件数和逻辑字节估算直接从删除操作取得。
|
|
71
73
|
|
|
72
74
|
工作区 GC 另写独立审计日志 `~/.autowonder/gc/gc_exector_<executorId>.log`(文件名单词拼写如此),每文件上限 50 MiB、共保留 5 个文件,不改变下面托管日志的保留设置。
|
|
@@ -99,6 +101,8 @@ daemon 重启或崩溃后重新接管未完成的派单时,runtime 不会直
|
|
|
99
101
|
|
|
100
102
|
恢复时只有存在与步骤 attempt 匹配的持久化完成回执(`state/step-uploads/<step>/attempt-N.json`,即该步骤已发布并被远端 ref 代表)才会复用已完成的步骤;只存在于本地进度快照里的「已完成」不再被采信,无法证明的步骤会回退为待执行并重新运行,同时发出 `recovery_unproven_step_completions` 事件。恢复执行与首次派发一样上报步骤与运行事件,保留的完成步骤会显式发出 `step_reused`,时间线不需要客户端从游标推断。
|
|
101
103
|
|
|
104
|
+
步骤在等待人工审批期间被重启或升级执行器后,恢复不会重跑该步骤:本地完成回执与同一步骤、同一 attempt 对应时,直接复用那次已封存的发布(产物清单与产物字节),只在确认后继续上传与后续步骤;原审批记录与原执行身份保持不变,批准后在同一执行内完成,不产生第二次执行或第二次审批。恢复清理接受 daemon 自身进程组为 1 的布局(launchd 与容器 init 的常见情形,筛选时已排除自身组);清理仍被阻塞时除保留恢复归属并按退避重试外,还会以 `workspace.processes_reaped` 事件(`phase=recovery_cleanup`、`retrying=true`)上报阻塞原因,同一原因只上报一次。checkpoint 会为本机保留 `handoff/metadata.json` 的字节而不是只存远端引用,因此恢复后的交接路由不依赖远端产物可读。
|
|
105
|
+
|
|
102
106
|
恢复执行前会把工作目录规范化为绝对路径并解析符号链接(Qoder 会话按物理目录索引),因此通过符号链接别名派发的任务在重启后仍能找到并续接原会话。
|
|
103
107
|
|
|
104
108
|
完成交付进入 `uploading` 后,永久性上传失败(产物超限、权限拒绝或其他已判定的终态错误)不再被外层自动重试循环持续重投:runtime 记录终态失败、停止该派单的重试,并保留本次业务结果与产物责任等待平台处置;只有可恢复错误才按 30 秒退避继续。取消请求贯穿完成交付与启动恢复——上传阶段的取消会立即把该派单标记为已取消并释放待发布结果,恢复 worker 在启动前或上传重试过程中被取消时不再继续投递,对已进入终态且没有活跃处理器的派单会按幂等成功回应该取消。启动恢复中只做纯上传/发布结果的派单状态显示为 `uploading`,其被拒绝的上传仍以服务端权威所有权栅栏为准,不在本地凭空创建新的业务失败或结果身份。
|
|
@@ -197,7 +201,7 @@ mv "$queue/.assignment.tmp" "$queue/assignment.json"
|
|
|
197
201
|
也可以直接提交到本地 API:
|
|
198
202
|
|
|
199
203
|
```bash
|
|
200
|
-
npx -y @alicloud/autowonder@0.3.
|
|
204
|
+
npx -y @alicloud/autowonder@0.3.37 dispatch ./assignment.json
|
|
201
205
|
```
|
|
202
206
|
|
|
203
207
|
## 上传工单附件
|
|
@@ -205,7 +209,7 @@ npx -y @alicloud/autowonder@0.3.35 dispatch ./assignment.json
|
|
|
205
209
|
把本地需求/设计文档直接上传到工单,避免在会话里传递大文件:
|
|
206
210
|
|
|
207
211
|
```bash
|
|
208
|
-
npx -y @alicloud/autowonder@0.3.
|
|
212
|
+
npx -y @alicloud/autowonder@0.3.37 workitem upload --server-url <autowonder-server-url> --workitem-id <id> --file <filepath-1> --file <filepath-2> --json
|
|
209
213
|
```
|
|
210
214
|
|
|
211
215
|
上传令牌通过 MCP 工具 `autowonder.workitem_cli_upload_token` 签发,经 `--token` 或 `AUTOWONDER_UPLOAD_TOKEN` 环境变量传入。`--file` 可重复指定多个文件;`--json` 输出机器可读结果。失败时按错误类型返回不同退出码(401→3、403→4、404→5、409→6、413→7、其他 4xx→8、网络/重定向→9)。
|
|
@@ -215,7 +219,7 @@ npx -y @alicloud/autowonder@0.3.35 workitem upload --server-url <autowonder-serv
|
|
|
215
219
|
把工单上已有的需求/设计文档下载到本地目录,再用本地文件工具阅读,避免把大文件或二进制附件搬进会话上下文:
|
|
216
220
|
|
|
217
221
|
```bash
|
|
218
|
-
npx -y @alicloud/autowonder@0.3.
|
|
222
|
+
npx -y @alicloud/autowonder@0.3.37 workitem download --server-url <autowonder-server-url> --workitem-id <id> --file <name-or-id> --output-dir <dir> --json
|
|
219
223
|
```
|
|
220
224
|
|
|
221
225
|
下载令牌通过 MCP 工具 `autowonder.workitem_cli_download_token` 签发(与上传令牌相互独立),经 `--token` 或 `AUTOWONDER_DOWNLOAD_TOKEN` 环境变量传入。`--file` 可重复指定文档名或 artifact id,省略则下载该工单的全部附件;`--output-dir` 默认为当前目录;`--json` 输出机器可读结果,含每个文件的 `id`、`name`、`path`、`size`。退出码约定与 `workitem upload` 相同(401→3、403→4、404→5、409→6、413→7、其他 4xx→8、网络/重定向→9)。
|
|
@@ -225,7 +229,7 @@ npx -y @alicloud/autowonder@0.3.35 workitem download --server-url <autowonder-se
|
|
|
225
229
|
把需求/设计文档上传到 7x24 定时任务,用法与工单附件一致(同一套上传令牌与预检规则):
|
|
226
230
|
|
|
227
231
|
```bash
|
|
228
|
-
npx -y @alicloud/autowonder@0.3.
|
|
232
|
+
npx -y @alicloud/autowonder@0.3.37 scheduled-task upload --server-url <autowonder-server-url> --scheduled-task-id <id> --file <filepath-1> --file <filepath-2> --json
|
|
229
233
|
```
|
|
230
234
|
|
|
231
235
|
上传令牌同样通过 `autowonder.workitem_cli_upload_token` 签发(令牌为用户级,对当前可修改的任意定时任务生效),经 `--token` 或 `AUTOWONDER_UPLOAD_TOKEN` 传入;退出码约定与 `workitem upload` 相同。
|
|
@@ -233,8 +237,8 @@ npx -y @alicloud/autowonder@0.3.35 scheduled-task upload --server-url <autowonde
|
|
|
233
237
|
## 管理 daemon
|
|
234
238
|
|
|
235
239
|
```bash
|
|
236
|
-
npx -y @alicloud/autowonder@0.3.
|
|
237
|
-
npx -y @alicloud/autowonder@0.3.
|
|
240
|
+
npx -y @alicloud/autowonder@0.3.37 status
|
|
241
|
+
npx -y @alicloud/autowonder@0.3.37 stop
|
|
238
242
|
```
|
|
239
243
|
|
|
240
244
|
默认 API 是 `http://127.0.0.1:34989`,日志位于 `~/.autowonder/daemon.log`。npm 包不包含任何 agent、MCP 或服务端凭证。
|
|
@@ -257,7 +261,7 @@ daemon 内置独立于工作区 GC 的保留清扫:默认每小时运行一次
|
|
|
257
261
|
## 调试
|
|
258
262
|
|
|
259
263
|
```bash
|
|
260
|
-
npx -y @alicloud/autowonder@0.3.
|
|
264
|
+
npx -y @alicloud/autowonder@0.3.37 connect ... --debug
|
|
261
265
|
```
|
|
262
266
|
|
|
263
267
|
`--debug` 会让 CLI 以 `AUTOWONDER_DEBUG=1` 启动 daemon,把完整的 daemon 与 agent 活动(runtime 事件流、provider 事件解码、重试退避与会话门等待、空闲时的阻塞点)同时输出到控制台和会话调试日志。调试日志不做脱敏,仅用于本机排障;不传 `--debug` 时该环境变量不会注入。
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|