autowonder 0.2.97 → 0.2.99
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
|
@@ -9,10 +9,10 @@ AutoWonder 本地 agent runtime。安装后启动 daemon,持续轮询本地 as
|
|
|
9
9
|
npx -y autowonder@latest 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
|
# Claude Code
|
|
12
|
-
npx -y autowonder@0.2.
|
|
12
|
+
npx -y autowonder@0.2.99 connect --ws-url <wss-endpoint> --token <executor-token> --executor-id <executor-id> --provider claude
|
|
13
13
|
|
|
14
14
|
# Codex CLI
|
|
15
|
-
npx -y autowonder@0.2.
|
|
15
|
+
npx -y autowonder@0.2.99 connect --ws-url <wss-endpoint> --token <executor-token> --executor-id <executor-id> --provider codex --model gpt-5.5 --reasoning-effort medium
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
`connect` 会安装当前 npm 包内置的 daemon,并使用页面生成的 WebSocket endpoint、Token 和执行器 ID 建立连接。选择 Qoder 时需要 Node.js 20+;runtime 会在缺少 `qodercli` 时自动通过 npm 安装,并在尚未登录时打开 Qoder 浏览器登录。Claude Code 和 Codex CLI 仍需提前安装并登录。runtime 会继承当前用户的 HOME、环境变量和 CLI 登录状态。
|
|
@@ -57,14 +57,14 @@ mv "$queue/.assignment.tmp" "$queue/assignment.json"
|
|
|
57
57
|
也可以直接提交到本地 API:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
npx -y autowonder@0.2.
|
|
60
|
+
npx -y autowonder@0.2.99 dispatch ./assignment.json
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
## 管理 daemon
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
npx -y autowonder@0.2.
|
|
67
|
-
npx -y autowonder@0.2.
|
|
66
|
+
npx -y autowonder@0.2.99 status
|
|
67
|
+
npx -y autowonder@0.2.99 stop
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
默认 API 是 `http://127.0.0.1:34989`,日志位于 `~/.autowonder/daemon.log`。npm 包不包含任何 agent、MCP 或服务端凭证。
|
package/bin/cli.js
CHANGED
|
@@ -104,7 +104,29 @@ function qoderNodeVersion() {
|
|
|
104
104
|
return process.versions.node;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
const QODER_AUTH_RECHECK_ATTEMPTS = 3;
|
|
108
|
+
|
|
109
|
+
function qoderAuthRecheckDelayMs() {
|
|
110
|
+
if (process.env.NODE_ENV === "test" && process.env.AUTOWONDER_TEST_QODER_AUTH_RECHECK_DELAY_MS) {
|
|
111
|
+
return Number.parseInt(process.env.AUTOWONDER_TEST_QODER_AUTH_RECHECK_DELAY_MS, 10) || 0;
|
|
112
|
+
}
|
|
113
|
+
return 3000;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Credentials written by `qodercli login` may not be readable immediately,
|
|
117
|
+
// so the post-login authentication check retries before declaring failure.
|
|
118
|
+
async function qoderAuthenticatedAfterLogin(executable) {
|
|
119
|
+
for (let attempt = 1; attempt <= QODER_AUTH_RECHECK_ATTEMPTS; attempt++) {
|
|
120
|
+
if (qoderAuthenticated(executable)) return true;
|
|
121
|
+
if (attempt < QODER_AUTH_RECHECK_ATTEMPTS) {
|
|
122
|
+
log("Waiting for Qoder login to finish...");
|
|
123
|
+
await new Promise((resolve) => setTimeout(resolve, qoderAuthRecheckDelayMs()));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
async function ensureQoderReady() {
|
|
108
130
|
if (process.env.AUTOWONDER_SKIP_QODER_BOOTSTRAP === "1") return true;
|
|
109
131
|
const nodeVersion = qoderNodeVersion();
|
|
110
132
|
const nodeMajor = Number.parseInt(nodeVersion.split(".")[0], 10);
|
|
@@ -118,7 +140,7 @@ function ensureQoderReady() {
|
|
|
118
140
|
if (!qoderAuthenticated(executable)) {
|
|
119
141
|
log("Qoder login is required. Opening browser login...");
|
|
120
142
|
const login = spawnSync(executable, ["login"], { stdio: "inherit" });
|
|
121
|
-
if (login.status !== 0 || !
|
|
143
|
+
if (login.status !== 0 || !(await qoderAuthenticatedAfterLogin(executable))) {
|
|
122
144
|
error("Qoder login did not complete. Run `qodercli login` and retry.");
|
|
123
145
|
return false;
|
|
124
146
|
}
|
|
@@ -411,7 +433,7 @@ async function cmdConnect(args) {
|
|
|
411
433
|
error(`No agent CLI detected. Install one of: claude, codex, qodercli`);
|
|
412
434
|
process.exit(1);
|
|
413
435
|
}
|
|
414
|
-
if (provider === "qoder" && !ensureQoderReady()) process.exit(1);
|
|
436
|
+
if (provider === "qoder" && !(await ensureQoderReady())) process.exit(1);
|
|
415
437
|
|
|
416
438
|
// A version-pinned npx command must always run the binary bundled with that package.
|
|
417
439
|
const installed = await installBinary({ force: true });
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|