@wu529778790/open-im 1.6.6-beta.1 → 1.6.6

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/dist/cli.js CHANGED
@@ -111,20 +111,32 @@ async function cmdDev() {
111
111
  }
112
112
  await main();
113
113
  }
114
+ async function cmdDashboard() {
115
+ // Start web config server in persistent mode (no timeout)
116
+ const { startWebConfigServer, openWebConfigUrl } = await import("./config-web.js");
117
+ const server = await startWebConfigServer({ mode: "dev", cwd: process.cwd(), persistent: true });
118
+ console.log(`\nDashboard: ${server.url}`);
119
+ console.log("Press Ctrl+C to close.\n");
120
+ openWebConfigUrl();
121
+ await server.waitForResult;
122
+ }
114
123
  function showHelp(exitCode = 0) {
115
124
  console.log(`
116
125
  Usage: open-im <command>
117
126
 
118
127
  Commands:
119
- start Run the full app in the background and serve the local config page
120
- stop Stop the full app
121
- restart Restart the full app in the background
122
- init Run CLI setup
123
- dev Run in the foreground for debugging
128
+ start Run the full app in the background and serve the dashboard
129
+ stop Stop the full app
130
+ restart Restart the full app in the background
131
+ init Run CLI setup
132
+ dev Run in the foreground for debugging
133
+ dashboard Open the web dashboard (keeps running until Ctrl+C)
124
134
 
125
- Local config page:
135
+ Local dashboard:
126
136
  http://127.0.0.1:39282
127
- start keeps it available; dev opens it only during initial setup
137
+ - "start" keeps it available while the service runs
138
+ - "dashboard" opens it standalone (use to modify existing config)
139
+ - "dev" opens it only during initial setup
128
140
 
129
141
  Options:
130
142
  -h, --help Show this help message
@@ -138,6 +150,7 @@ const commands = {
138
150
  restart: cmdRestart,
139
151
  init: cmdInit,
140
152
  dev: cmdDev,
153
+ dashboard: cmdDashboard,
141
154
  };
142
155
  if (cmd === "--help" || cmd === "-h") {
143
156
  showHelp(0);
@@ -7,6 +7,7 @@ export declare const PAGE_TEXTS: {
7
7
  readonly heroBodyFull: "One local bridge for Telegram, Feishu, QQ, WeWork, and DingTalk.";
8
8
  readonly heroKicker: "Local AI bridge";
9
9
  readonly langButton: "中文";
10
+ readonly darkModeToggle: "Toggle dark mode";
10
11
  readonly controlCenter: "Control center";
11
12
  readonly sidebarNoteTitle: "Local workflow";
12
13
  readonly sidebarNoteBody: "Configure at least one platform, save the config, then start the bridge from Service.";
@@ -68,7 +69,7 @@ export declare const PAGE_TEXTS: {
68
69
  readonly weworkHelp: "Get credentials: visit <a href=\"https://work.weixin.qq.com/\" target=\"_blank\">WeWork Admin Console</a>, create an app, and copy the Bot ID (Corp ID) / Secret";
69
70
  readonly clientId: "Client ID / AppKey";
70
71
  readonly clientSecret: "Client Secret / AppSecret";
71
- readonly dingtalkHelp: "Get credentials: Create an enterprise internal app on DingTalk Open Platform, enable Stream Mode, and get Client ID / Client Secret";
72
+ readonly dingtalkHelp: "Get credentials: Create an enterprise internal app on <a href=\"https://open-dev.dingtalk.com/\" target=\"_blank\">DingTalk Open Platform</a>, enable Stream Mode, and get Client ID / Client Secret";
72
73
  readonly secret: "Secret";
73
74
  readonly cardTemplateId: "Card template ID";
74
75
  readonly optional: "Optional";
@@ -89,14 +90,17 @@ export declare const PAGE_TEXTS: {
89
90
  readonly codebuddyCli: "CodeBuddy CLI path";
90
91
  readonly codexProxy: "Codex proxy";
91
92
  readonly claudeTimeout: "Claude timeout (ms)";
93
+ readonly claudeConfigPath: "Config file location";
94
+ readonly claudeAuthToken: "ANTHROPIC_AUTH_TOKEN";
95
+ readonly claudeBaseUrl: "ANTHROPIC_BASE_URL";
96
+ readonly claudeModel: "ANTHROPIC_MODEL";
97
+ readonly claudeProxy: "Proxy (optional)";
92
98
  readonly codexTimeout: "Codex timeout (ms)";
93
99
  readonly codebuddyTimeout: "CodeBuddy timeout (ms)";
94
- readonly claudeModel: "Claude model";
100
+ readonly cursorProxy: "Proxy (optional)";
95
101
  readonly hookPort: "Hook port";
96
102
  readonly logLevel: "Log level";
97
103
  readonly logLevelDefault: "default (app default)";
98
- readonly autoApprove: "Auto-approve tool permissions";
99
- readonly sdkMode: "Use Claude SDK mode";
100
104
  readonly validate: "Validate";
101
105
  readonly test: "Check config";
102
106
  readonly testing: "Checking...";
@@ -125,6 +129,7 @@ export declare const PAGE_TEXTS: {
125
129
  readonly heroBodyFull: "一个本地桥接入口,统一连接 Telegram、Feishu、QQ、WeWork 和 DingTalk。";
126
130
  readonly heroKicker: "本地 AI 桥接";
127
131
  readonly langButton: "EN";
132
+ readonly darkModeToggle: "切换暗黑模式";
128
133
  readonly controlCenter: "控制中心";
129
134
  readonly sidebarNoteTitle: "本地工作流";
130
135
  readonly sidebarNoteBody: "至少配置一个平台,保存配置,然后在服务控制区启动桥接。";
@@ -184,7 +189,7 @@ export declare const PAGE_TEXTS: {
184
189
  readonly weworkHelp: "获取凭证:访问 <a href=\"https://work.weixin.qq.com/\" target=\"_blank\">企业微信管理后台</a>,创建应用并拿到 Bot ID(Corp ID)/ Secret";
185
190
  readonly clientId: "Client ID / AppKey";
186
191
  readonly clientSecret: "Client Secret / AppSecret";
187
- readonly dingtalkHelp: "获取凭证:在钉钉开放平台创建企业内部应用,启用 Stream Mode,并拿到 Client ID / Client Secret";
192
+ readonly dingtalkHelp: "获取凭证:在 <a href=\"https://open-dev.dingtalk.com/\" target=\"_blank\">钉钉开放平台</a> 创建企业内部应用,启用 Stream Mode,并拿到 Client ID / Client Secret";
188
193
  readonly cardTemplateId: "卡片模板 ID";
189
194
  readonly optional: "可选";
190
195
  readonly commaSeparatedIds: "多个 ID 用逗号分隔";
@@ -204,14 +209,17 @@ export declare const PAGE_TEXTS: {
204
209
  readonly codebuddyCli: "CodeBuddy CLI 路径";
205
210
  readonly codexProxy: "Codex 代理";
206
211
  readonly claudeTimeout: "Claude 超时(毫秒)";
212
+ readonly claudeConfigPath: "配置文件位置";
213
+ readonly claudeAuthToken: "ANTHROPIC_AUTH_TOKEN";
214
+ readonly claudeBaseUrl: "ANTHROPIC_BASE_URL";
215
+ readonly claudeModel: "ANTHROPIC_MODEL";
216
+ readonly claudeProxy: "代理(可选)";
207
217
  readonly codexTimeout: "Codex 超时(毫秒)";
208
218
  readonly codebuddyTimeout: "CodeBuddy 超时(毫秒)";
209
- readonly claudeModel: "Claude 模型";
219
+ readonly cursorProxy: "代理(可选)";
210
220
  readonly hookPort: "Hook 端口";
211
221
  readonly logLevel: "日志级别";
212
222
  readonly logLevelDefault: "default(程序默认)";
213
- readonly autoApprove: "自动批准工具权限";
214
- readonly sdkMode: "使用 Claude SDK 模式";
215
223
  readonly validate: "校验配置";
216
224
  readonly test: "校验配置";
217
225
  readonly testing: "校验中...";
@@ -7,6 +7,7 @@ export const PAGE_TEXTS = {
7
7
  heroBodyFull: "One local bridge for Telegram, Feishu, QQ, WeWork, and DingTalk.",
8
8
  heroKicker: "Local AI bridge",
9
9
  langButton: "\u4e2d\u6587",
10
+ darkModeToggle: "Toggle dark mode",
10
11
  controlCenter: "Control center",
11
12
  sidebarNoteTitle: "Local workflow",
12
13
  sidebarNoteBody: "Configure at least one platform, save the config, then start the bridge from Service.",
@@ -68,7 +69,7 @@ export const PAGE_TEXTS = {
68
69
  weworkHelp: 'Get credentials: visit <a href="https://work.weixin.qq.com/" target="_blank">WeWork Admin Console</a>, create an app, and copy the Bot ID (Corp ID) / Secret',
69
70
  clientId: "Client ID / AppKey",
70
71
  clientSecret: "Client Secret / AppSecret",
71
- dingtalkHelp: 'Get credentials: Create an enterprise internal app on DingTalk Open Platform, enable Stream Mode, and get Client ID / Client Secret',
72
+ dingtalkHelp: 'Get credentials: Create an enterprise internal app on <a href="https://open-dev.dingtalk.com/" target="_blank">DingTalk Open Platform</a>, enable Stream Mode, and get Client ID / Client Secret',
72
73
  secret: "Secret",
73
74
  cardTemplateId: "Card template ID",
74
75
  optional: "Optional",
@@ -89,14 +90,17 @@ export const PAGE_TEXTS = {
89
90
  codebuddyCli: "CodeBuddy CLI path",
90
91
  codexProxy: "Codex proxy",
91
92
  claudeTimeout: "Claude timeout (ms)",
93
+ claudeConfigPath: "Config file location",
94
+ claudeAuthToken: "ANTHROPIC_AUTH_TOKEN",
95
+ claudeBaseUrl: "ANTHROPIC_BASE_URL",
96
+ claudeModel: "ANTHROPIC_MODEL",
97
+ claudeProxy: "Proxy (optional)",
92
98
  codexTimeout: "Codex timeout (ms)",
93
99
  codebuddyTimeout: "CodeBuddy timeout (ms)",
94
- claudeModel: "Claude model",
100
+ cursorProxy: "Proxy (optional)",
95
101
  hookPort: "Hook port",
96
102
  logLevel: "Log level",
97
103
  logLevelDefault: "default (app default)",
98
- autoApprove: "Auto-approve tool permissions",
99
- sdkMode: "Use Claude SDK mode",
100
104
  validate: "Validate",
101
105
  test: "Check config",
102
106
  testing: "Checking...",
@@ -125,6 +129,7 @@ export const PAGE_TEXTS = {
125
129
  heroBodyFull: "\u4e00\u4e2a\u672c\u5730\u6865\u63a5\u5165\u53e3\uff0c\u7edf\u4e00\u8fde\u63a5 Telegram\u3001Feishu\u3001QQ\u3001WeWork \u548c DingTalk\u3002",
126
130
  heroKicker: "\u672c\u5730 AI \u6865\u63a5",
127
131
  langButton: "EN",
132
+ darkModeToggle: "\u5207\u6362\u6697\u9ed1\u6a21\u5f0f",
128
133
  controlCenter: "\u63a7\u5236\u4e2d\u5fc3",
129
134
  sidebarNoteTitle: "\u672c\u5730\u5de5\u4f5c\u6d41",
130
135
  sidebarNoteBody: "\u81f3\u5c11\u914d\u7f6e\u4e00\u4e2a\u5e73\u53f0\uff0c\u4fdd\u5b58\u914d\u7f6e\uff0c\u7136\u540e\u5728\u670d\u52a1\u63a7\u5236\u533a\u542f\u52a8\u6865\u63a5\u3002",
@@ -184,7 +189,7 @@ export const PAGE_TEXTS = {
184
189
  weworkHelp: '\u83b7\u53d6\u51ed\u8bc1\uff1a\u8bbf\u95ee <a href="https://work.weixin.qq.com/" target="_blank">\u4f01\u4e1a\u5fae\u4fe1\u7ba1\u7406\u540e\u53f0</a>\uff0c\u521b\u5efa\u5e94\u7528\u5e76\u62ff\u5230 Bot ID\uff08Corp ID\uff09/ Secret',
185
190
  clientId: "Client ID / AppKey",
186
191
  clientSecret: "Client Secret / AppSecret",
187
- dingtalkHelp: "\u83b7\u53d6\u51ed\u8bc1\uff1a\u5728\u9489\u9489\u5f00\u653e\u5e73\u53f0\u521b\u5efa\u4f01\u4e1a\u5185\u90e8\u5e94\u7528\uff0c\u542f\u7528 Stream Mode\uff0c\u5e76\u62ff\u5230 Client ID / Client Secret",
192
+ dingtalkHelp: '\u83b7\u53d6\u51ed\u8bc1\uff1a\u5728 <a href="https://open-dev.dingtalk.com/" target="_blank">\u9489\u9489\u5f00\u653e\u5e73\u53f0</a> \u521b\u5efa\u4f01\u4e1a\u5185\u90e8\u5e94\u7528\uff0c\u542f\u7528 Stream Mode\uff0c\u5e76\u62ff\u5230 Client ID / Client Secret',
188
193
  cardTemplateId: "\u5361\u7247\u6a21\u677f ID",
189
194
  optional: "\u53ef\u9009",
190
195
  commaSeparatedIds: "\u591a\u4e2a ID \u7528\u9017\u53f7\u5206\u9694",
@@ -204,14 +209,17 @@ export const PAGE_TEXTS = {
204
209
  codebuddyCli: "CodeBuddy CLI \u8def\u5f84",
205
210
  codexProxy: "Codex \u4ee3\u7406",
206
211
  claudeTimeout: "Claude \u8d85\u65f6\uff08\u6beb\u79d2\uff09",
212
+ claudeConfigPath: "\u914d\u7f6e\u6587\u4ef6\u4f4d\u7f6e",
213
+ claudeAuthToken: "ANTHROPIC_AUTH_TOKEN",
214
+ claudeBaseUrl: "ANTHROPIC_BASE_URL",
215
+ claudeModel: "ANTHROPIC_MODEL",
216
+ claudeProxy: "\u4ee3\u7406\uff08\u53ef\u9009\uff09",
207
217
  codexTimeout: "Codex \u8d85\u65f6\uff08\u6beb\u79d2\uff09",
208
218
  codebuddyTimeout: "CodeBuddy \u8d85\u65f6\uff08\u6beb\u79d2\uff09",
209
- claudeModel: "Claude \u6a21\u578b",
219
+ cursorProxy: "\u4ee3\u7406\uff08\u53ef\u9009\uff09",
210
220
  hookPort: "Hook \u7aef\u53e3",
211
221
  logLevel: "\u65e5\u5fd7\u7ea7\u522b",
212
222
  logLevelDefault: "default\uff08\u7a0b\u5e8f\u9ed8\u8ba4\uff09",
213
- autoApprove: "\u81ea\u52a8\u6279\u51c6\u5de5\u5177\u6743\u9650",
214
- sdkMode: "\u4f7f\u7528 Claude SDK \u6a21\u5f0f",
215
223
  validate: "\u6821\u9a8c\u914d\u7f6e",
216
224
  test: "\u6821\u9a8c\u914d\u7f6e",
217
225
  testing: "\u6821\u9a8c\u4e2d...",