@tunnelbox/claude-code 0.1.3 → 0.1.5

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.
@@ -3,7 +3,7 @@
3
3
  * tunnelbox 官方 Claude Code 插件 的 bin 工具(自包含 Node,无第三方依赖)。
4
4
  *
5
5
  * 子命令:
6
- * pair —— 向中继申请配对码并打印(二维码可选由 qrcode 提供,缺省降级为链接)
6
+ * pair —— 向中继申请配对码并打印(二维码可选由 qrcode 提供,缺省降级为配对码)
7
7
  * status —— 打印中继/agent/绑定状态
8
8
  * ask —— 供 hooks/PermissionRequest 调用:把当回合工具审批转发到手机
9
9
  *
@@ -146,11 +146,6 @@ function connect(url, agentId) {
146
146
  async function runPair() {
147
147
  const state = loadState();
148
148
  const relay = state.relayUrl.replace(/\/+$/, "");
149
- const httpBase = relay.replace(/^ws/, "http");
150
- const link = (code) => {
151
- const p = new URLSearchParams({ code, type: AGENT_TYPE, name: hostname() });
152
- return `${httpBase}/app/#/pages/index/index?${p.toString()}`;
153
- };
154
149
 
155
150
  if (state.claimed) {
156
151
  console.log("本机已绑定手机账号,可直接在手机「我的电脑」里连接;如需重新配对,请先在手机端解绑。");
@@ -180,15 +175,13 @@ async function runPair() {
180
175
  const code = m.payload?.code;
181
176
  if (!code) return;
182
177
  clearTimeout(t);
183
- const l = link(code);
184
178
  console.log("");
185
179
  console.log("tunnelbox 手机配对");
186
180
  console.log(" 配对码: " + code);
187
- console.log(" 链接 : " + l);
188
- console.log("手机浏览器打开链接,或打开 tunnelbox 应用输入配对码(一次性)。");
181
+ console.log("打开 tunnelbox App,用「扫一扫配对」扫描二维码,或手动输入配对码(一次性)。");
189
182
  try {
190
183
  mkdirSync(dirname(PAIRING_PATH()), { recursive: true });
191
- writeFileSync(PAIRING_PATH(), `配对码: ${code}\n配对链接: ${l}\n`, "utf8");
184
+ writeFileSync(PAIRING_PATH(), `配对码: ${code}\n`, "utf8");
192
185
  } catch {
193
186
  /* ignore */
194
187
  }
@@ -8,5 +8,5 @@ disable-model-invocation: true
8
8
  本技能用于把本机 Claude Code 绑定到手机上的 tunnelbox。
9
9
 
10
10
  1. 运行命令:`tunnelbox pair`
11
- 2. 把命令输出的**配对码**与**配对链接**完整、原样展示给用户(保留代码格式)。
12
- 3. 向用户说明:手机浏览器打开链接,或打开 tunnelbox 应用输入配对码;配对码为一次性,使用后即失效。
11
+ 2. 把命令输出的**配对码**原样、完整地展示给用户(保留代码格式)。
12
+ 3. 向用户说明:打开手机上的 tunnelbox App,用「扫一扫配对」扫描二维码,或输入配对码;配对码为一次性,使用后即失效。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tunnelbox/claude-code",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "tunnelbox 的 Claude Code 集成(官方 Agent SDK 桥 + 官方插件 official-plugin):手机远程驱动 Claude Code(会话/流式/审批/中止)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -10,7 +10,8 @@
10
10
  "files": [
11
11
  "dist",
12
12
  "official-plugin",
13
- "README.md"
13
+ "README.md",
14
+ "README.zh-CN.md"
14
15
  ],
15
16
  "publishConfig": {
16
17
  "access": "public"