autowonder 0.2.153 → 0.2.154

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 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.153 connect --ws-url <wss-endpoint> --token <executor-token> --executor-id <executor-id> --provider qoder --model qmodel_latest --reasoning-effort medium --context-window 260000
9
+ npx -y autowonder@0.2.154 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.153 connect --ws-url <wss-endpoint> --token <executor-token> --executor-id <executor-id> --provider qodercn
12
+ npx -y autowonder@0.2.154 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 登录状态。
@@ -20,6 +20,8 @@ Qoder 的 Context Window 只能使用 `1000000`、`400000` 或 `260000`,Reason
20
20
 
21
21
  daemon 会响应服务端的 `QODER_MODEL_CATALOG_REQUEST` 帧,用当前 provider 对应的本机 Qoder CLI 发现可用模型目录,只回传 `{id, name}`,让执行器页面展示这台机器真实可选的模型。该请求仅在 `executorId` 与 `provider` 都与本机一致时处理,发现超时 20 秒,并发请求合并为一次发现,`qoder` 与 `qodercn` 的发现互相隔离、不共享配置根。
22
22
 
23
+ daemon 还会响应服务端的 `CONVERSATION_COMMANDS_PROBE` 帧,用独立会话抓取该会话工作目录下可用的斜杠命令,回传 `CONVERSATION_COMMANDS_RESULT` 帧,让会话面板在用户输入 `/` 时列出真实可用的命令。该探测与回合执行完全隔离:任何失败只产生 `FAILED` / `TIMEOUT` 帧,不影响进行中的会话;provider 后端不支持抓取时同样降级为 `FAILED` 帧。帧里的 `executorId` 与本机不一致或非正数时直接忽略,避免在别的执行器工作区里建目录或启动 CLI。daemon 侧给整个探测 25 秒硬上限,刻意长于 agent 侧的 20 秒预算,使 agent 自己的超时先触发并可被归类。
24
+
23
25
  给 `connect` 追加 `--token-aware-enable` 可开启 qoder / qodercn 的 token 用量采集:CLI 会以 sidecar 方式启动本地 HTTPS 转发代理(`bin/token-proxy.js`),从 Qoder API 的 SSE 响应流中提取 usage 数据并按 dispatch ID 归属上报。该功能旁路设计、不阻塞任务执行,代理启动失败时仅告警并继续。代理端口可用 `TOKEN_PROXY_PORT` 环境变量调整(默认 19876);CA 证书位于 `~/.autowonder/token-tap/ca-cert.pem`。daemon 退出时 sidecar 一并停止。
24
26
 
25
27
  `connect` 支持 `--workspace-root <path>` 指定 dispatch 仓库与任务工作区所在目录(默认 `~/autowonder_workspaces`)。该参数会转发给 daemon,等价于设置 `AUTOWONDER_WORKSPACE_ROOT` 环境变量,适合把工作区放在非默认路径的执行机上(如 Windows 的 `D:\autowonder`)。
@@ -62,7 +64,7 @@ mv "$queue/.assignment.tmp" "$queue/assignment.json"
62
64
  也可以直接提交到本地 API:
63
65
 
64
66
  ```bash
65
- npx -y autowonder@0.2.153 dispatch ./assignment.json
67
+ npx -y autowonder@0.2.154 dispatch ./assignment.json
66
68
  ```
67
69
 
68
70
  ## 上传工单附件
@@ -70,7 +72,7 @@ npx -y autowonder@0.2.153 dispatch ./assignment.json
70
72
  把本地需求/设计文档直接上传到工单,避免在会话里传递大文件:
71
73
 
72
74
  ```bash
73
- npx -y autowonder@0.2.153 workitem upload --server-url <autowonder-server-url> --workitem-id <id> --file <filepath-1> --file <filepath-2> --json
75
+ npx -y autowonder@0.2.154 workitem upload --server-url <autowonder-server-url> --workitem-id <id> --file <filepath-1> --file <filepath-2> --json
74
76
  ```
75
77
 
76
78
  上传令牌通过 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)。
@@ -80,7 +82,7 @@ npx -y autowonder@0.2.153 workitem upload --server-url <autowonder-server-url> -
80
82
  把工单上已有的需求/设计文档下载到本地目录,再用本地文件工具阅读,避免把大文件或二进制附件搬进会话上下文:
81
83
 
82
84
  ```bash
83
- npx -y autowonder@0.2.153 workitem download --server-url <autowonder-server-url> --workitem-id <id> --file <name-or-id> --output-dir <dir> --json
85
+ npx -y autowonder@0.2.154 workitem download --server-url <autowonder-server-url> --workitem-id <id> --file <name-or-id> --output-dir <dir> --json
84
86
  ```
85
87
 
86
88
  下载令牌通过 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)。
@@ -90,7 +92,7 @@ npx -y autowonder@0.2.153 workitem download --server-url <autowonder-server-url>
90
92
  把需求/设计文档上传到 7x24 定时任务,用法与工单附件一致(同一套上传令牌与预检规则):
91
93
 
92
94
  ```bash
93
- npx -y autowonder@0.2.153 scheduled-task upload --server-url <autowonder-server-url> --scheduled-task-id <id> --file <filepath-1> --file <filepath-2> --json
95
+ npx -y autowonder@0.2.154 scheduled-task upload --server-url <autowonder-server-url> --scheduled-task-id <id> --file <filepath-1> --file <filepath-2> --json
94
96
  ```
95
97
 
96
98
  上传令牌同样通过 `autowonder.workitem_cli_upload_token` 签发(令牌为用户级,对当前可修改的任意定时任务生效),经 `--token` 或 `AUTOWONDER_UPLOAD_TOKEN` 传入;退出码约定与 `workitem upload` 相同。
@@ -98,8 +100,8 @@ npx -y autowonder@0.2.153 scheduled-task upload --server-url <autowonder-server-
98
100
  ## 管理 daemon
99
101
 
100
102
  ```bash
101
- npx -y autowonder@0.2.153 status
102
- npx -y autowonder@0.2.153 stop
103
+ npx -y autowonder@0.2.154 status
104
+ npx -y autowonder@0.2.154 stop
103
105
  ```
104
106
 
105
107
  默认 API 是 `http://127.0.0.1:34989`,日志位于 `~/.autowonder/daemon.log`。npm 包不包含任何 agent、MCP 或服务端凭证。
@@ -107,7 +109,9 @@ npx -y autowonder@0.2.153 stop
107
109
  ## 调试
108
110
 
109
111
  ```bash
110
- npx -y autowonder@0.2.153 connect ... --debug
112
+ npx -y autowonder@0.2.154 connect ... --debug
111
113
  ```
112
114
 
113
115
  `--debug` 会让 CLI 以 `AUTOWONDER_DEBUG=1` 启动 daemon,把完整的 daemon 与 agent 活动(runtime 事件流、provider 事件解码、重试退避与会话门等待、空闲时的阻塞点)同时输出到控制台和会话调试日志。调试日志不做脱敏,仅用于本机排障;不传 `--debug` 时该环境变量不会注入。
116
+
117
+ `--debug` 之外还有一条由服务端驱动的班组调试日志采集通道,两者互不依赖。runtime 在 `protocolFeatures` 中声明 `DEBUG_LOG_V1`,服务端只会给声明了该能力位的 runtime 下发 `debugLog` 策略;策略在打包时冻结进 assignment(`enabled` / `maxBytes` / `uploadUrl`),执行期不再变化。开启后 runtime 会把本轮完整调试日志写到 capsule 内,单轮硬上限默认 200MB(可由 `debugLog.maxBytes` 覆盖),所在卷剩余空间低于 2GB 时停止写入,单条记录超过 8MB 会被截断并打标记。它是旁路设计:写入队列满时丢行而不反压任务热路径,收尾等待最多 5 秒。回合结束时按 `DIRECT`(对象存储预签名 PUT)或 `RELAY`(服务端中转)通道上传,结果以 `debugLog` 段附在 `TASK_RESULT` 上(`status` 为 `UPLOADED` / `FAILED`,含字节数与 SHA-256);报告里的错误文本会把 URL 查询串替换为 `<redacted>`,避免执行器令牌或对象存储签名外泄。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autowonder",
3
- "version": "0.2.153",
3
+ "version": "0.2.154",
4
4
  "description": "AutoWonder local runtime — execute AI agent dispatch packages on your machine",
5
5
  "bin": {
6
6
  "autowonder": "bin/cli.js"