@wu529778790/open-im 1.11.11-beta.0 → 1.11.11

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
@@ -74,6 +74,8 @@ open-im start
74
74
  | `/context` | 查看上下文用量 |
75
75
  | `/plugins` | 查看已安装插件 |
76
76
  | `/status` | 显示状态信息 |
77
+ | `/a` | 查看当前 AI 工具及可选列表 |
78
+ | `/a <工具名>` | 切换当前平台的 AI 工具(claude/codex/codebuddy/opencode) |
77
79
  | `/cd <路径>` / `/pwd` | 切换/查看工作目录 |
78
80
 
79
81
  ### 快捷命令
@@ -90,29 +92,26 @@ open-im start
90
92
 
91
93
  ### 权限与确认
92
94
 
93
- Claude 使用 Agent SDK 集成,open-im 默认不替 Claude 做额外的允许/拒绝协议。Claude 需要用户确认时,会按它自己的原生交互语义发问;你在 IM 里回复选项、确认或补充说明即可继续同一个会话。
95
+ ClaudeAgent SDK)、Codex、CodeBuddy、OpenCode 默认都进入**自动执行模式**:AI 工具需要权限时直接放行,不会在 IM 里卡住等待确认。
94
96
 
95
- 如果你希望 Claude 也进入自动执行模式,可以在 Web 控制台的 **AI 工具配置 → Claude Code 跳过 Claude 权限确认** 打开,或在配置文件里设置:
97
+ > ⚠️ open-im 目前没有把 Claude SDK 的权限确认弹窗转发到 IM。一旦开启原生确认流程,请求会因无人应答而卡死,所以默认全部跳过。未来接入权限 hook 后会提供细粒度控制。
98
+
99
+ 如果需要恢复 Claude 的原生确认流程,可在配置文件里设置:
96
100
 
97
101
  ```json
98
102
  {
99
103
  "tools": {
100
104
  "claude": {
101
- "skipPermissions": true
105
+ "skipPermissions": false
102
106
  }
103
107
  }
104
108
  }
105
109
  ```
106
110
 
107
- 也可以用环境变量临时覆盖:
108
-
109
111
  ```bash
110
- OPEN_IM_SKIP_PERMISSIONS=true open-im start # 跳过权限确认
111
- OPEN_IM_SKIP_PERMISSIONS=false open-im start # 使用 Claude 原生确认
112
+ OPEN_IM_SKIP_PERMISSIONS=false open-im start # 恢复 Claude 原生确认
112
113
  ```
113
114
 
114
- Codex、CodeBuddy、OpenCode 仍保持原来的自动执行默认行为。
115
-
116
115
  ## 会话接力
117
116
 
118
117
  open-im 和 Claude Code CLI 共享 session 存储。同一目录下,手机和电脑无缝切换:
@@ -136,11 +135,14 @@ claude -c # 接上手机端的对话
136
135
 
137
136
  - 配置所有平台凭证
138
137
  - 启动/停止桥接服务
139
- - 编辑配置文件
138
+ - 编辑配置文件(open-im / Claude / Codex / CodeBuddy / OpenCode,含 Codex 的 `auth.json` 与 `config.toml`)
139
+ - API 保活设置(定期发送请求延续 5 小时滚动配额,避免 token 浪费)
140
140
  - 首次运行自动弹出设置向导
141
141
  - 平台卡片支持展开/折叠
142
142
  - 一键保存并启动
143
143
 
144
+ > 💡 通过 IM 命令 `/a <工具名>` 切换 AI 工具,或 Web 控制台修改平台配置后,**下一条消息立即生效,无需重启**桥接服务。
145
+
144
146
  局域网访问:`export OPEN_IM_WEB_HOST=0.0.0.0`
145
147
 
146
148
  ## CLI 命令
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { main, needsSetup, runInteractiveSetup } from "./index.js";
2
+ import { main, needsSetup } from "./index.js";
3
3
  import { loadConfig } from "./config.js";
4
4
  import { checkAndUpdate } from "./check-update.js";
5
5
  import { getPublicWebDashboardUrl } from "./constants.js";
@@ -20,23 +20,6 @@ function logWebDashboardAndApi() {
20
20
  }
21
21
  }
22
22
  async function ensureConfigured(mode) {
23
- if (mode === "init") {
24
- if (!process.stdin.isTTY) {
25
- console.error("CLI setup requires an interactive terminal.");
26
- return false;
27
- }
28
- const saved = await runInteractiveSetup();
29
- if (!saved)
30
- return false;
31
- try {
32
- loadConfig();
33
- return true;
34
- }
35
- catch (error) {
36
- console.error(error instanceof Error ? error.message : String(error));
37
- return false;
38
- }
39
- }
40
23
  if (!needsSetup()) {
41
24
  try {
42
25
  loadConfig();
@@ -123,18 +106,6 @@ async function cmdRestart() {
123
106
  logWebDashboardAndApi();
124
107
  process.exit(0);
125
108
  }
126
- async function cmdInit() {
127
- console.log("\nopen-im CLI setup\n");
128
- const saved = await ensureConfigured("init");
129
- if (!saved) {
130
- console.log("\nConfiguration was not completed.");
131
- process.exit(1);
132
- }
133
- console.log("\nConfiguration saved.");
134
- console.log("\nYou can start the app with:");
135
- console.log(" open-im start");
136
- console.log(" open-im dev");
137
- }
138
109
  async function cmdDev() {
139
110
  if (!(await ensureConfigured("dev"))) {
140
111
  console.log("Configuration was not completed.");
@@ -165,7 +136,6 @@ Commands:
165
136
  start Run the full app in the background and serve the dashboard
166
137
  stop Stop the full app
167
138
  restart Restart the full app in the background
168
- init Run CLI setup
169
139
  dev Run in the foreground for debugging
170
140
  dashboard Open the web dashboard (keeps running until Ctrl+C)
171
141
 
@@ -185,7 +155,6 @@ const commands = {
185
155
  start: cmdStart,
186
156
  stop: cmdStop,
187
157
  restart: cmdRestart,
188
- init: cmdInit,
189
158
  dev: cmdDev,
190
159
  dashboard: cmdDashboard,
191
160
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wu529778790/open-im",
3
- "version": "1.11.11-beta.0",
3
+ "version": "1.11.11",
4
4
  "description": "Your AI coding assistant, in every chat app. Multi-platform IM bridge for Claude Code, Codex, and CodeBuddy.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",