autowonder 0.2.158 → 0.2.160
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 +24 -11
- 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 autowonder@0.2.
|
|
9
|
+
npx -y autowonder@0.2.160 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 autowonder@0.2.
|
|
12
|
+
npx -y autowonder@0.2.160 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 时需要 Node.js 20+;runtime 会在缺少 `qodercli` 时自动通过 npm 安装,并在尚未登录时打开 Qoder 浏览器登录。runtime 会继承当前用户的 HOME、环境变量和 CLI 登录状态。
|
|
@@ -74,6 +74,21 @@ daemon 建立连接时和每次心跳定时检查时发出的 `HEARTBEAT` 帧都
|
|
|
74
74
|
|
|
75
75
|
同一批 `HEARTBEAT` 帧还带上进程级固定的 `startedAt`(重连不重置)与继承自 re-exec 的 `restartRequestId`,并在能力位里声明 `EXECUTOR_RESTART_V1`(Windows 不声明);接入自动更新的 daemon 额外声明 `EXECUTOR_UPDATE_RESTART_V1`。服务端可据此下发 `EXECUTOR_RESTART`(带 `executorId`、`requestId`、ISO UTC `issuedAt` 与布尔 `update`)。本机只接受 `executorId` 与自身一致、未过期且未处理过的请求,不接收任何远端 shell 命令、可执行路径或下载地址,并以 `EXECUTOR_RESTART_RESULT`(`UPDATING` / `RESTARTING` / `FAILED`)回执,真正是否成功以下一次心跳为准。重启走既有的接单闸门:有运行中任务或结果 outbox 未确认可读时不重启,re-exec 失败会重新开放接单;`update=true` 复用既有的 registry、完整性校验、候选 self-check、安装事务与回滚,仅标准安装的正式版支持远端拉取新版本,已是最新版的请求仍会重启,且该操作不应用平台上保存的启动配置改动。对执行机用户同样无新增参数或环境变量。
|
|
76
76
|
|
|
77
|
+
标准安装还支持服务端把整批执行机升级到指定的**已发布版本**(不再依赖各台机器安装时选定的版本),能力位为 `EXECUTOR_UPDATE_V1`。服务端下发 `EXECUTOR_UPGRADE`(带 `executorId`、`requestId`、ISO UTC `issuedAt` 与 `targetVersion`),本机只接受 `executorId` 与自身一致、`requestId` 非空且不超过 80 字符、`issuedAt` 在前后 1 分钟以内、且 `targetVersion` 为三段纯数字正式版的请求。升级按 `accepted` → `downloading` → `draining` → `applying` → `success` 逐阶段回执 `EXECUTOR_UPGRADE_RESULT`(含 `requestId`、`phase` 与该进程启动时的 `currentVersion`;新版本以下一个进程的首次心跳为准),失败则以 `failed` 帧带上错误原因——目标版本不受支持、请求过期、本机构建不支持远端升级等都会显式回执而不是静默丢弃。registry 按请求的版本号解析元数据并要求返回值与请求版本严格一致;请求版本低于当前版本时拒绝执行(服务端升级永不回滚整批执行机),已缓存但版本不符的候选不会被采用。`requestId` 会跨 re-exec 传递,服务端重放的同一请求不会触发第二次升级;同一 `requestId` 同时只允许一次尝试在飞,失败后可重试。升级复用既有的接单闸门、完整性校验、候选 self-check、安装事务与回滚。对执行机用户无新增参数或环境变量。
|
|
78
|
+
|
|
79
|
+
## 产物发布边界
|
|
80
|
+
|
|
81
|
+
daemon 默认启用显式发布边界(`explicit_refs_v1`):上传集合由完成请求里的精确引用与平台已知的交付契约推导,不再对 typed 产物目录做整树扫描,目录层级本身不再是发布依据。
|
|
82
|
+
|
|
83
|
+
- `AUTOWONDER_SCRATCH_DIR` 指向当前 capsule 的 `artifacts/scratch/`,用于中间数据、临时命令输出和诊断工作文件;这些文件保持本地,不封存也不上传。
|
|
84
|
+
- `AUTOWONDER_ARTIFACTS_OUTPUT_DIR` 指向 `artifacts/output/`,是候选产物的暂存区:把文件放进该目录不等于它会发布,未被引用的文件不会被读取、哈希、复制或上传,checkpoint 也不会携带。
|
|
85
|
+
- 每一步尝试会把通过 admission 的集合封存为不可变快照(`artifacts/attempts/<step>/attempt-N/publish-manifest.json`);删除文件后重新封存,新快照不再包含它,已由远端 receipt 代表的文件只引用、不重传。
|
|
86
|
+
- 超预算的文本证据(如整段原始命令输出)会让步骤以 `fix_required` 结束,并在任何上传请求之前返回 `ARTIFACT_BUDGET_EXCEEDED`、`ARTIFACT_CLASS_REQUIRED`、`ARTIFACT_FILE_TOO_LARGE` 等稳定错误码;正确处置是发布精简报告或改用交付产物路径,而不是放宽本机限制。
|
|
87
|
+
- 服务端可在派单里下发更严格的限制(`artifactProtocolVersion` = 2,以及每请求文件数与字节数、单文件、文本证据单文件与总量上限);字段缺省时 runtime 使用保守默认值,旧服务端与旧执行器组合行为不变。
|
|
88
|
+
- `AUTOWONDER_ARTIFACT_SELECTION_MODE=legacy_all_typed` 仅供平台 operator 在线上事故回滚时使用(设置后需重启 daemon),会恢复旧的目录级收集语义及其资源放大风险,问题解除后应立即移除;不得把它下发给客户 SDLC、Agent、Soul、提示词或 assignment 配置。
|
|
89
|
+
|
|
90
|
+
checkpoint 使用 `autowonder.runtimeCheckpoint.v2`:相同 digest 的已发布字节只保存一份,恢复前在隔离 staging 中完整校验 manifest 与 payload 的对应关系。v2 reader 兼容历史 v1 checkpoint;旧版 runtime 会因 schema 不匹配拒绝 v2,需要回滚旧版时应选择保留的 v1 checkpoint,不能把 v2 改标成 v1。
|
|
91
|
+
|
|
77
92
|
## 发布构建
|
|
78
93
|
|
|
79
94
|
`npm run build` 和发布脚本只接受没有已跟踪或未跟踪改动的 Git worktree。脚本会把准确的 release commit 克隆到仓库外的 detached checkout,再从该目录构建六个平台(darwin/linux/windows × amd64/arm64)的 daemon。
|
|
@@ -94,7 +109,7 @@ mv "$queue/.assignment.tmp" "$queue/assignment.json"
|
|
|
94
109
|
也可以直接提交到本地 API:
|
|
95
110
|
|
|
96
111
|
```bash
|
|
97
|
-
npx -y autowonder@0.2.
|
|
112
|
+
npx -y autowonder@0.2.160 dispatch ./assignment.json
|
|
98
113
|
```
|
|
99
114
|
|
|
100
115
|
## 上传工单附件
|
|
@@ -102,19 +117,17 @@ npx -y autowonder@0.2.158 dispatch ./assignment.json
|
|
|
102
117
|
把本地需求/设计文档直接上传到工单,避免在会话里传递大文件:
|
|
103
118
|
|
|
104
119
|
```bash
|
|
105
|
-
npx -y autowonder@0.2.
|
|
120
|
+
npx -y autowonder@0.2.160 workitem upload --server-url <autowonder-server-url> --workitem-id <id> --file <filepath-1> --file <filepath-2> --json
|
|
106
121
|
```
|
|
107
122
|
|
|
108
123
|
上传令牌通过 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)。
|
|
109
124
|
|
|
110
|
-
客户端本地预检允许的扩展名:`.md`、`.markdown`、`.txt`、`.html`、`.pdf`、`.png`、`.jpg`、`.jpeg`、`.webp`、`.docx`、`.doc`、`.java`、`.py`、`.zip`(按扩展名匹配,大小写不敏感);单次最多 10 个文件、单文件 5 MiB、合计 20 MiB,不支持的类型或超出限额会在上传发起前直接报错,服务端仍是最终校验方。上传的 Word(`.docx` / `.doc`)、源码(`.java` / `.py`)与 `.zip` 会随派发指令按格式给出读取方式——`.docx` 取 `word/document.xml` 去标签、`.doc` 近似提取、源码按纯文本读取且不执行、`.zip` 先列条目再按需读取,数字员工侧据此解析这些材料,不再把二进制字节当文本读。
|
|
111
|
-
|
|
112
125
|
## 下载工单附件
|
|
113
126
|
|
|
114
127
|
把工单上已有的需求/设计文档下载到本地目录,再用本地文件工具阅读,避免把大文件或二进制附件搬进会话上下文:
|
|
115
128
|
|
|
116
129
|
```bash
|
|
117
|
-
npx -y autowonder@0.2.
|
|
130
|
+
npx -y autowonder@0.2.160 workitem download --server-url <autowonder-server-url> --workitem-id <id> --file <name-or-id> --output-dir <dir> --json
|
|
118
131
|
```
|
|
119
132
|
|
|
120
133
|
下载令牌通过 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)。
|
|
@@ -124,7 +137,7 @@ npx -y autowonder@0.2.158 workitem download --server-url <autowonder-server-url>
|
|
|
124
137
|
把需求/设计文档上传到 7x24 定时任务,用法与工单附件一致(同一套上传令牌与预检规则):
|
|
125
138
|
|
|
126
139
|
```bash
|
|
127
|
-
npx -y autowonder@0.2.
|
|
140
|
+
npx -y autowonder@0.2.160 scheduled-task upload --server-url <autowonder-server-url> --scheduled-task-id <id> --file <filepath-1> --file <filepath-2> --json
|
|
128
141
|
```
|
|
129
142
|
|
|
130
143
|
上传令牌同样通过 `autowonder.workitem_cli_upload_token` 签发(令牌为用户级,对当前可修改的任意定时任务生效),经 `--token` 或 `AUTOWONDER_UPLOAD_TOKEN` 传入;退出码约定与 `workitem upload` 相同。
|
|
@@ -132,8 +145,8 @@ npx -y autowonder@0.2.158 scheduled-task upload --server-url <autowonder-server-
|
|
|
132
145
|
## 管理 daemon
|
|
133
146
|
|
|
134
147
|
```bash
|
|
135
|
-
npx -y autowonder@0.2.
|
|
136
|
-
npx -y autowonder@0.2.
|
|
148
|
+
npx -y autowonder@0.2.160 status
|
|
149
|
+
npx -y autowonder@0.2.160 stop
|
|
137
150
|
```
|
|
138
151
|
|
|
139
152
|
默认 API 是 `http://127.0.0.1:34989`,日志位于 `~/.autowonder/daemon.log`。npm 包不包含任何 agent、MCP 或服务端凭证。
|
|
@@ -141,7 +154,7 @@ npx -y autowonder@0.2.158 stop
|
|
|
141
154
|
## 调试
|
|
142
155
|
|
|
143
156
|
```bash
|
|
144
|
-
npx -y autowonder@0.2.
|
|
157
|
+
npx -y autowonder@0.2.160 connect ... --debug
|
|
145
158
|
```
|
|
146
159
|
|
|
147
160
|
`--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
|