@chenacc/agentbridge 0.1.0 → 0.1.1

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
@@ -43,33 +43,42 @@
43
43
 
44
44
  AgentBridge 不替你安装或登录任何 Agent,只检测本机**已安装且已登录**的那些;没装的显示「未安装」,不会假装可用。
45
45
 
46
- ### 四步装好
46
+ ### 两种装法
47
+
48
+ **想马上用(推荐)**:不用下载仓库,一条命令起桥并直接打印二维码。
47
49
 
48
50
  ```powershell
49
- # 1. 取代码(尚未发布到 npm,目前从仓库获取)
50
- git clone https://github.com/chenacc1/agentbridge.git
51
- cd agentbridge
51
+ npx @chenacc/agentbridge
52
+ ```
52
53
 
53
- # 2. 装依赖(运行时只有 katex 和 qrcode 两个)
54
- npm install
54
+ 要长期使用、或改配置(项目白名单、远程通道、通知推送),装成全局命令:
55
+
56
+ ```powershell
57
+ npm install -g @chenacc/agentbridge
58
+ agentbridge phone --agent claude
59
+ ```
55
60
 
56
- # 3. 声明手机可以访问的项目目录:别名=绝对路径,分号分隔
57
- $env:AGENTBRIDGE_PROJECTS = "agentbridge=D:\projects\agentbridge"
61
+ **要改代码或跑测试**:从仓库来。
58
62
 
59
- # 4. 启动
63
+ ```powershell
64
+ git clone https://github.com/chenacc1/agentbridge.git
65
+ cd agentbridge
66
+ npm install
67
+ $env:AGENTBRIDGE_PROJECTS = "agentbridge=D:\projects\agentbridge" # 可选:别名=绝对路径,分号分隔
60
68
  npm start
61
69
  ```
62
70
 
63
71
  打开 [http://127.0.0.1:8787](http://127.0.0.1:8787),桌面页会显示一次性二维码;手机连同一可信 Wi-Fi,用微信「扫一扫」扫描即可。
64
72
 
65
73
  > 二维码只用于首次配对,会过期且**只能使用一次**。配对成功后请收藏手机页显示的固定回访地址,之后从收藏进入;不要收藏 `/pair?code=...` 临时链接。
66
- > 第 3 步可以不写:不设 `AGENTBRIDGE_PROJECTS` 时默认把**启动目录**作为唯一可用项目,别名 `workspace`。别名只允许字母、数字、`_`、`-`(≤40 字符)。
74
+ > `AGENTBRIDGE_PROJECTS` 可以不写:不设时默认把**启动目录**作为唯一可用项目,别名 `workspace`。别名只允许字母、数字、`_`、`-`(≤40 字符)。
67
75
  > 这些变量必须设在**真正启动 Bridge 的那个终端**里;`.env.example` 只是一份清单,程序不会自动读取 `.env` 文件。
68
76
 
69
77
  ### 装完自检
70
78
 
71
79
  ```powershell
72
- node .\bin\agentbridge.js phone --agent echo
80
+ npx @chenacc/agentbridge phone --agent echo
81
+ # 从仓库跑的话:node .\bin\agentbridge.js phone --agent echo
73
82
  ```
74
83
 
75
84
  Echo 适配器不接触任何 AI 工具,只验证「CLI → 本机 Bridge → 生成配对二维码」整条链路。能打印二维码就说明安装正确,扫码后可看到手机与桌面同步。
@@ -166,7 +175,9 @@ node .\bin\agentbridge.js phone --agent codex --session <thread-id>
166
175
 
167
176
  前提:DSH Desktop 已安装,且存在桌面 profile `%USERPROFILE%\.dsh\profiles\desktop\package.json`(或由 `DSH_HOME` 指定)。
168
177
 
169
- **第 0 步:先把桥跑起来。** 插件是遥控器,桥是基站;没有桥,`/phone` 只会告诉你"无法连接 AgentBridge"。最省事是一条命令(自动起桥并直接打印二维码):
178
+ **第 0 步:桥。** 插件是遥控器,桥是基站。从 0.2.0 起桥随插件一起安装,**DSH Desktop 启动时插件会自己在后台把它拉起来**,正常情况你什么都不用敲。
179
+
180
+ 只有自动启动失败(沙箱限制、端口被占)才需要手动来一条:
170
181
 
171
182
  ```powershell
172
183
  npx @chenacc/agentbridge
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chenacc/agentbridge",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Control local coding agents from a phone through a secure WeChat QR web console.",
5
5
  "license": "MIT",
6
6
  "type": "module",