autowonder 0.2.157 → 0.2.158
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 +11 -9
- package/lib/workitem-upload.js +11 -7
- 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.158 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.158 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 登录状态。
|
|
@@ -94,7 +94,7 @@ mv "$queue/.assignment.tmp" "$queue/assignment.json"
|
|
|
94
94
|
也可以直接提交到本地 API:
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
|
-
npx -y autowonder@0.2.
|
|
97
|
+
npx -y autowonder@0.2.158 dispatch ./assignment.json
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
## 上传工单附件
|
|
@@ -102,17 +102,19 @@ npx -y autowonder@0.2.157 dispatch ./assignment.json
|
|
|
102
102
|
把本地需求/设计文档直接上传到工单,避免在会话里传递大文件:
|
|
103
103
|
|
|
104
104
|
```bash
|
|
105
|
-
npx -y autowonder@0.2.
|
|
105
|
+
npx -y autowonder@0.2.158 workitem upload --server-url <autowonder-server-url> --workitem-id <id> --file <filepath-1> --file <filepath-2> --json
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
上传令牌通过 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
109
|
|
|
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
|
+
|
|
110
112
|
## 下载工单附件
|
|
111
113
|
|
|
112
114
|
把工单上已有的需求/设计文档下载到本地目录,再用本地文件工具阅读,避免把大文件或二进制附件搬进会话上下文:
|
|
113
115
|
|
|
114
116
|
```bash
|
|
115
|
-
npx -y autowonder@0.2.
|
|
117
|
+
npx -y autowonder@0.2.158 workitem download --server-url <autowonder-server-url> --workitem-id <id> --file <name-or-id> --output-dir <dir> --json
|
|
116
118
|
```
|
|
117
119
|
|
|
118
120
|
下载令牌通过 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)。
|
|
@@ -122,7 +124,7 @@ npx -y autowonder@0.2.157 workitem download --server-url <autowonder-server-url>
|
|
|
122
124
|
把需求/设计文档上传到 7x24 定时任务,用法与工单附件一致(同一套上传令牌与预检规则):
|
|
123
125
|
|
|
124
126
|
```bash
|
|
125
|
-
npx -y autowonder@0.2.
|
|
127
|
+
npx -y autowonder@0.2.158 scheduled-task upload --server-url <autowonder-server-url> --scheduled-task-id <id> --file <filepath-1> --file <filepath-2> --json
|
|
126
128
|
```
|
|
127
129
|
|
|
128
130
|
上传令牌同样通过 `autowonder.workitem_cli_upload_token` 签发(令牌为用户级,对当前可修改的任意定时任务生效),经 `--token` 或 `AUTOWONDER_UPLOAD_TOKEN` 传入;退出码约定与 `workitem upload` 相同。
|
|
@@ -130,8 +132,8 @@ npx -y autowonder@0.2.157 scheduled-task upload --server-url <autowonder-server-
|
|
|
130
132
|
## 管理 daemon
|
|
131
133
|
|
|
132
134
|
```bash
|
|
133
|
-
npx -y autowonder@0.2.
|
|
134
|
-
npx -y autowonder@0.2.
|
|
135
|
+
npx -y autowonder@0.2.158 status
|
|
136
|
+
npx -y autowonder@0.2.158 stop
|
|
135
137
|
```
|
|
136
138
|
|
|
137
139
|
默认 API 是 `http://127.0.0.1:34989`,日志位于 `~/.autowonder/daemon.log`。npm 包不包含任何 agent、MCP 或服务端凭证。
|
|
@@ -139,7 +141,7 @@ npx -y autowonder@0.2.157 stop
|
|
|
139
141
|
## 调试
|
|
140
142
|
|
|
141
143
|
```bash
|
|
142
|
-
npx -y autowonder@0.2.
|
|
144
|
+
npx -y autowonder@0.2.158 connect ... --debug
|
|
143
145
|
```
|
|
144
146
|
|
|
145
147
|
`--debug` 会让 CLI 以 `AUTOWONDER_DEBUG=1` 启动 daemon,把完整的 daemon 与 agent 活动(runtime 事件流、provider 事件解码、重试退避与会话门等待、空闲时的阻塞点)同时输出到控制台和会话调试日志。调试日志不做脱敏,仅用于本机排障;不传 `--debug` 时该环境变量不会注入。
|
package/lib/workitem-upload.js
CHANGED
|
@@ -10,13 +10,6 @@ const http = require("node:http");
|
|
|
10
10
|
const https = require("node:https");
|
|
11
11
|
const path = require("node:path");
|
|
12
12
|
|
|
13
|
-
const ALLOWED_EXTENSIONS = [".md", ".markdown", ".txt", ".html", ".pdf", ".png", ".jpg", ".jpeg", ".webp"];
|
|
14
|
-
const MAX_FILES = 10;
|
|
15
|
-
const MAX_FILE_SIZE_BYTES = 5 * 1024 * 1024;
|
|
16
|
-
const MAX_TOTAL_SIZE_BYTES = 20 * 1024 * 1024;
|
|
17
|
-
const UPLOAD_PATH_PREFIX = "/api/cli/workitems/";
|
|
18
|
-
const UPLOAD_PATH_SUFFIX = "/requirement-documents";
|
|
19
|
-
|
|
20
13
|
const CONTENT_TYPES = {
|
|
21
14
|
".md": "text/markdown",
|
|
22
15
|
".markdown": "text/markdown",
|
|
@@ -27,7 +20,18 @@ const CONTENT_TYPES = {
|
|
|
27
20
|
".jpg": "image/jpeg",
|
|
28
21
|
".jpeg": "image/jpeg",
|
|
29
22
|
".webp": "image/webp",
|
|
23
|
+
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
24
|
+
".doc": "application/msword",
|
|
25
|
+
".java": "text/x-java-source",
|
|
26
|
+
".py": "text/x-python",
|
|
27
|
+
".zip": "application/zip",
|
|
30
28
|
};
|
|
29
|
+
const ALLOWED_EXTENSIONS = Object.keys(CONTENT_TYPES);
|
|
30
|
+
const MAX_FILES = 10;
|
|
31
|
+
const MAX_FILE_SIZE_BYTES = 5 * 1024 * 1024;
|
|
32
|
+
const MAX_TOTAL_SIZE_BYTES = 20 * 1024 * 1024;
|
|
33
|
+
const UPLOAD_PATH_PREFIX = "/api/cli/workitems/";
|
|
34
|
+
const UPLOAD_PATH_SUFFIX = "/requirement-documents";
|
|
31
35
|
|
|
32
36
|
class UploadError extends Error {
|
|
33
37
|
constructor(message, details = {}) {
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|