autowonder 0.2.160 → 0.2.162
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 +21 -9
- 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.162 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.162 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 登录状态。
|
|
@@ -76,6 +76,18 @@ daemon 建立连接时和每次心跳定时检查时发出的 `HEARTBEAT` 帧都
|
|
|
76
76
|
|
|
77
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
78
|
|
|
79
|
+
同一批 `HEARTBEAT` 帧还会声明派单清单能力位 `dispatch_inventory_v1` 并带上权威派单清单:`ownedDispatchIds` 是本机仍持有的全部非终态派单(含启动恢复候选,完整时上限 1000),`runningDispatchIds` 是其中正在占用执行槽位的子集(上限 50,且每个 running 必须同时 owned),`dispatchInventoryReady` 只有在启动恢复完成后才为 `true`。清单不完整时不会把 owned 集合当成完整视图下发,而是回执 `dispatchInventoryError`(`OWNED_DISPATCH_LIMIT_EXCEEDED`)并保持 `dispatchInventoryReady=false`,只发布完整的 running 子集,由服务端按失败关闭处理;清单快照只绑定当前 WebSocket 会话,旧连接不能覆盖接替它的 runtime。普通任务与启动恢复任务的暂停共用同一个 pause broker,暂停时发布带持久化 checkpoint 回执的 `TASK_PAUSED` 帧。该协议没有调度降级路径:服务端会拒绝并关闭未声明 `dispatch_inventory_v1` 的 runtime 连接,因此升级本客户端要先于部署配套服务端。对执行机用户无新增参数或环境变量。
|
|
80
|
+
|
|
81
|
+
## 任务环境变量快照
|
|
82
|
+
|
|
83
|
+
平台可在派单(`dispatch` 帧)与会话回合(`CONVERSATION_TURN` 帧)里附带任务级环境变量快照(`environmentVariables`),经已认证的执行器 WebSocket 下发;runtime 会把快照叠加到 provider 子进程环境之上,任务按平台下发的取值运行。同名变量按不区分大小写的方式覆盖,保证同一任务在 Linux/macOS 与 Windows 上取值一致。
|
|
84
|
+
|
|
85
|
+
- 变量名必须是合法标识符(`[A-Za-z_][A-Za-z0-9_]*`),否则派单在执行任何副作用之前失败。
|
|
86
|
+
- runtime 与 provider 自有的变量不接受快照覆盖:`AUTOWONDER_*` 前缀(如 `AUTOWONDER_SCRATCH_DIR`、`AUTOWONDER_WORKSPACE_ROOT`),以及 `CODEX_HOME`、`CLAUDE_CONFIG_DIR`、`QODER_CONFIG_DIR`、`QODERCN_CONFIG_DIR`、`QODER_INTEGRATION_ID`、`QODER_HOST_SERVICE_NAME`。
|
|
87
|
+
- 快照取值不写入本机磁盘:assignment 信封只保留 `ABSENT` / `EMPTY` / `REQUIRED` 状态标记,崩溃恢复时标记为 `REQUIRED` 的派单需要平台重新下发快照;本机历史遗留的明文信封会在读取时被改写为不含取值的标记形式。
|
|
88
|
+
- 会话回合适用同一套规则,并把快照摘要并入 Qoder 进程复用指纹:快照变化时不会复用带旧环境的热进程。
|
|
89
|
+
- 对执行机用户无新增命令行参数或环境变量。
|
|
90
|
+
|
|
79
91
|
## 产物发布边界
|
|
80
92
|
|
|
81
93
|
daemon 默认启用显式发布边界(`explicit_refs_v1`):上传集合由完成请求里的精确引用与平台已知的交付契约推导,不再对 typed 产物目录做整树扫描,目录层级本身不再是发布依据。
|
|
@@ -109,7 +121,7 @@ mv "$queue/.assignment.tmp" "$queue/assignment.json"
|
|
|
109
121
|
也可以直接提交到本地 API:
|
|
110
122
|
|
|
111
123
|
```bash
|
|
112
|
-
npx -y autowonder@0.2.
|
|
124
|
+
npx -y autowonder@0.2.162 dispatch ./assignment.json
|
|
113
125
|
```
|
|
114
126
|
|
|
115
127
|
## 上传工单附件
|
|
@@ -117,7 +129,7 @@ npx -y autowonder@0.2.160 dispatch ./assignment.json
|
|
|
117
129
|
把本地需求/设计文档直接上传到工单,避免在会话里传递大文件:
|
|
118
130
|
|
|
119
131
|
```bash
|
|
120
|
-
npx -y autowonder@0.2.
|
|
132
|
+
npx -y autowonder@0.2.162 workitem upload --server-url <autowonder-server-url> --workitem-id <id> --file <filepath-1> --file <filepath-2> --json
|
|
121
133
|
```
|
|
122
134
|
|
|
123
135
|
上传令牌通过 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)。
|
|
@@ -127,7 +139,7 @@ npx -y autowonder@0.2.160 workitem upload --server-url <autowonder-server-url> -
|
|
|
127
139
|
把工单上已有的需求/设计文档下载到本地目录,再用本地文件工具阅读,避免把大文件或二进制附件搬进会话上下文:
|
|
128
140
|
|
|
129
141
|
```bash
|
|
130
|
-
npx -y autowonder@0.2.
|
|
142
|
+
npx -y autowonder@0.2.162 workitem download --server-url <autowonder-server-url> --workitem-id <id> --file <name-or-id> --output-dir <dir> --json
|
|
131
143
|
```
|
|
132
144
|
|
|
133
145
|
下载令牌通过 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)。
|
|
@@ -137,7 +149,7 @@ npx -y autowonder@0.2.160 workitem download --server-url <autowonder-server-url>
|
|
|
137
149
|
把需求/设计文档上传到 7x24 定时任务,用法与工单附件一致(同一套上传令牌与预检规则):
|
|
138
150
|
|
|
139
151
|
```bash
|
|
140
|
-
npx -y autowonder@0.2.
|
|
152
|
+
npx -y autowonder@0.2.162 scheduled-task upload --server-url <autowonder-server-url> --scheduled-task-id <id> --file <filepath-1> --file <filepath-2> --json
|
|
141
153
|
```
|
|
142
154
|
|
|
143
155
|
上传令牌同样通过 `autowonder.workitem_cli_upload_token` 签发(令牌为用户级,对当前可修改的任意定时任务生效),经 `--token` 或 `AUTOWONDER_UPLOAD_TOKEN` 传入;退出码约定与 `workitem upload` 相同。
|
|
@@ -145,8 +157,8 @@ npx -y autowonder@0.2.160 scheduled-task upload --server-url <autowonder-server-
|
|
|
145
157
|
## 管理 daemon
|
|
146
158
|
|
|
147
159
|
```bash
|
|
148
|
-
npx -y autowonder@0.2.
|
|
149
|
-
npx -y autowonder@0.2.
|
|
160
|
+
npx -y autowonder@0.2.162 status
|
|
161
|
+
npx -y autowonder@0.2.162 stop
|
|
150
162
|
```
|
|
151
163
|
|
|
152
164
|
默认 API 是 `http://127.0.0.1:34989`,日志位于 `~/.autowonder/daemon.log`。npm 包不包含任何 agent、MCP 或服务端凭证。
|
|
@@ -154,7 +166,7 @@ npx -y autowonder@0.2.160 stop
|
|
|
154
166
|
## 调试
|
|
155
167
|
|
|
156
168
|
```bash
|
|
157
|
-
npx -y autowonder@0.2.
|
|
169
|
+
npx -y autowonder@0.2.162 connect ... --debug
|
|
158
170
|
```
|
|
159
171
|
|
|
160
172
|
`--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
|