codexpanel 0.1.2 → 0.1.3
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 +2 -2
- package/README.zh.md +2 -2
- package/bin/codexpanel.cjs +2 -2
- package/docs/desktop-npx-install-flow.md +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ The public npm entrypoint is the primary one-line installer for Windows desktop
|
|
|
34
34
|
npx -y codexpanel
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
By default it connects to production at `https://codexpanel.com`. The installer first downloads and verifies the desktop resources, then asks the user to press Enter before opening the browser sign-in and device binding flow. After binding succeeds it installs or updates the desktop agent under `%LOCALAPPDATA%\CodexPanelAgent`, starts the agent, and opens a local status panel on `127.0.0.1` with a dynamic free port.
|
|
37
|
+
By default it connects to production at `https://codexpanel.com`. The installer first downloads and verifies the desktop resources, then asks the user to press Enter before opening the browser sign-in and device binding flow. The setup page shows browser sign-in, an 8-digit binding code, and a QR code; a user who is already signed in to `/console/` can type the code or scan the QR code to approve the same pending device binding. After binding succeeds it installs or updates the desktop agent under `%LOCALAPPDATA%\CodexPanelAgent`, starts the agent, and opens a local status panel on `127.0.0.1` with a dynamic free port.
|
|
38
38
|
|
|
39
39
|
Use `--server` to target another relay:
|
|
40
40
|
|
|
@@ -48,7 +48,7 @@ npx -y codexpanel --server https://example.com
|
|
|
48
48
|
|
|
49
49
|
For terminal token login, open the printed `/desktop/setup?flowId=...` link, sign in, click the one-time terminal token button, then run `npx -y codexpanel login --token-login` and paste the token. The token is scoped to the current setup flow and expires quickly.
|
|
50
50
|
|
|
51
|
-
Desktop setup no longer uses
|
|
51
|
+
Desktop setup no longer uses retired access codes as an authentication mechanism. The 8-digit binding code only points a signed-in user to a short-lived pending setup flow; the installed agent receives a long-lived device token, and the server stores only the token hash.
|
|
52
52
|
|
|
53
53
|
See [docs/desktop-npx-install-flow.md](docs/desktop-npx-install-flow.md) for the full Chinese explanation of the desktop npx install and binding flow.
|
|
54
54
|
|
package/README.zh.md
CHANGED
|
@@ -34,7 +34,7 @@ Windows 电脑端的公开 npm 入口是一条命令:
|
|
|
34
34
|
npx -y codexpanel
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
默认连接正式生产域 `https://codexpanel.com`。安装器会先下载并校验电脑端资源,然后提示用户按 Enter
|
|
37
|
+
默认连接正式生产域 `https://codexpanel.com`。安装器会先下载并校验电脑端资源,然后提示用户按 Enter 打开浏览器登录和绑定设备。绑定页会同时展示浏览器登录、8 位数字绑定码和二维码;已经登录 `/console/` 控制端的用户,可以输入绑定码或扫码来批准同一个待绑定设备。绑定成功后,安装器会把 agent 安装或更新到 `%LOCALAPPDATA%\CodexPanelAgent`,启动 agent,并在 `127.0.0.1` 的动态可用端口打开本地状态面板。
|
|
38
38
|
|
|
39
39
|
切换 relay:
|
|
40
40
|
|
|
@@ -48,7 +48,7 @@ npx -y codexpanel --server https://example.com
|
|
|
48
48
|
|
|
49
49
|
终端 token 登录的使用方式是:打开安装器打印的 `/desktop/setup?flowId=...` 链接,在浏览器登录后点击一次性终端 token 按钮,再运行 `npx -y codexpanel login --token-login` 并粘贴 token。该 token 只绑定当前安装流,过期很快。
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
电脑端安装不再使用旧访问码做鉴权。8 位绑定码只用于让已登录用户找到短时待审批安装流;安装后的 agent 使用长期 device token,服务端只保存 token hash,不保存明文 token。
|
|
52
52
|
|
|
53
53
|
完整中文安装与工作原理说明见 [docs/desktop-npx-install-flow.md](docs/desktop-npx-install-flow.md)。
|
|
54
54
|
|
package/bin/codexpanel.cjs
CHANGED
|
@@ -11,7 +11,7 @@ const crypto = require("crypto");
|
|
|
11
11
|
const readline = require("readline");
|
|
12
12
|
const { spawn, spawnSync } = require("child_process");
|
|
13
13
|
|
|
14
|
-
const VERSION = "0.1.
|
|
14
|
+
const VERSION = "0.1.3";
|
|
15
15
|
const PROD_URL = "https://codexpanel.com";
|
|
16
16
|
const TEST_URL = "https://jd.6a.gs";
|
|
17
17
|
const LOCAL_HOST = "127.0.0.1";
|
|
@@ -466,7 +466,7 @@ async function install(options) {
|
|
|
466
466
|
console.log("\n资源已准备好。按 Enter 拉起浏览器登录并绑定这台电脑。");
|
|
467
467
|
console.log("Resources are ready. Press Enter to open your browser and sign in.");
|
|
468
468
|
console.log(`Login URL / 登录链接: ${start.loginUrl}`);
|
|
469
|
-
if (start.oneTimeCode) console.log(`
|
|
469
|
+
if (start.oneTimeCode) console.log(`Binding code / 8 位绑定码: ${start.oneTimeCode}`);
|
|
470
470
|
|
|
471
471
|
let approval;
|
|
472
472
|
if (options.terminalLogin) {
|
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
|
|
21
21
|
浏览器会打开 `/desktop/setup?flowId=...`。这个页面会先让你登录或注册,然后展示这台电脑的名称、系统用户、deviceId、目标账号和设备额度。
|
|
22
22
|
|
|
23
|
+
从 `0.1.3` 开始,绑定页还会同时显示一个 8 位数字绑定码和一个二维码。如果你已经在手机或另一个浏览器里登录了 CodexPanel 控制端,可以直接在 `/console/` 的“绑定电脑”面板里输入 8 位绑定码,或在手机竖屏模式打开“扫码绑定”开关扫描二维码。这样不一定要在电脑端浏览器里重新登录,也能把这台电脑绑定到当前登录账号。
|
|
24
|
+
|
|
25
|
+
这个 8 位绑定码不是旧访问码,也不是长期凭证。它只指向当前这一次 pending setup flow;真正的审批仍然依赖控制端或绑定页里的已登录用户 session。绑定完成后,agent 后续使用的是服务端签发的 device token。
|
|
26
|
+
|
|
23
27
|
登录成功后,页面会检查这台设备是否已经绑定过其他账号。如果已经绑定,它不会自动抢绑,而是让你选择:
|
|
24
28
|
|
|
25
29
|
- 保持原绑定并退出
|
|
@@ -197,7 +201,7 @@ CLI 此时打印:
|
|
|
197
201
|
Resources are ready. Press Enter to open your browser and sign in.
|
|
198
202
|
```
|
|
199
203
|
|
|
200
|
-
用户按 Enter 后,CLI 才打开浏览器。如果用户传了 `--no-browser`,CLI 不打开浏览器,只显示登录 URL
|
|
204
|
+
用户按 Enter 后,CLI 才打开浏览器。如果用户传了 `--no-browser`,CLI 不打开浏览器,只显示登录 URL 和 8 位绑定码,方便用户手动打开或在控制端输码绑定。
|
|
201
205
|
|
|
202
206
|
### 4. 浏览器登录和绑定审批
|
|
203
207
|
|