@wu529778790/open-im 1.10.9-beta.14 → 1.10.9-beta.15

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.
@@ -138,7 +138,11 @@ function updateState(state) {
138
138
  async function fetchApi(path, signal) {
139
139
  const url = `${apiUrl}${path}`;
140
140
  const res = await fetch(url, {
141
- headers: { Authorization: `Bearer ${apiToken}` },
141
+ headers: {
142
+ Authorization: `Bearer ${apiToken}`,
143
+ AuthorizationType: 'ilink_bot_token',
144
+ 'iLink-App-Id': 'bot',
145
+ },
142
146
  signal,
143
147
  });
144
148
  return res.json();
@@ -23,6 +23,8 @@ async function postMessage(chatId, text) {
23
23
  headers: {
24
24
  'Content-Type': 'application/json',
25
25
  Authorization: `Bearer ${apiToken}`,
26
+ AuthorizationType: 'ilink_bot_token',
27
+ 'iLink-App-Id': 'bot',
26
28
  },
27
29
  body: JSON.stringify({ chat_id: chatId, text }),
28
30
  });
@@ -59,7 +59,13 @@ export declare const PAGE_TEXTS: {
59
59
  readonly clawbotSummary: "WeChat iLink API via ClawBot.";
60
60
  readonly clawbotApiUrl: "API URL";
61
61
  readonly clawbotApiToken: "API Token (Bearer)";
62
- readonly clawbotHelp: "Scan QR code in <code>open-im init</code> or paste token from ClawBot iLink login.";
62
+ readonly clawbotHelp: "Click \"Scan QR Login\" to authenticate via WeChat, or paste token manually.";
63
+ readonly qrLoginBtn: "Scan QR Login";
64
+ readonly qrLoginScanning: "Waiting for QR code scan...";
65
+ readonly qrLoginSuccess: "Login successful! Credentials saved.";
66
+ readonly qrLoginFailed: "Login failed";
67
+ readonly qrLoginExpired: "QR code expired, please try again";
68
+ readonly qrScanHint: "Use WeChat to scan the QR code";
63
69
  readonly platformCredentialsTitle: "Credentials";
64
70
  readonly platformAccessTitle: "Routing and access";
65
71
  readonly platformTestNote: "Checks required credentials against the platform.";
@@ -218,7 +224,13 @@ export declare const PAGE_TEXTS: {
218
224
  readonly clawbotSummary: "通过 ClawBot 连接微信 iLink API。";
219
225
  readonly clawbotApiUrl: "API 地址";
220
226
  readonly clawbotApiToken: "API Token (Bearer)";
221
- readonly clawbotHelp: "在终端运行 <code>open-im init</code> 扫码登录,或粘贴 ClawBot iLink 登录后的 Token。";
227
+ readonly clawbotHelp: "点击“扫码登录”通过微信认证,或手动粘贴 Token。";
228
+ readonly qrLoginBtn: "扫码登录";
229
+ readonly qrLoginScanning: "等待扫码...";
230
+ readonly qrLoginSuccess: "登录成功!凭证已保存。";
231
+ readonly qrLoginFailed: "登录失败";
232
+ readonly qrLoginExpired: "二维码已过期,请重试";
233
+ readonly qrScanHint: "请使用微信扫描二维码";
222
234
  readonly platformCredentialsTitle: "凭证";
223
235
  readonly platformAccessTitle: "路由与访问";
224
236
  readonly platformTestNote: "只会检查该平台的必填凭证是否可用。";
@@ -59,7 +59,13 @@ export const PAGE_TEXTS = {
59
59
  clawbotSummary: "WeChat iLink API via ClawBot.",
60
60
  clawbotApiUrl: "API URL",
61
61
  clawbotApiToken: "API Token (Bearer)",
62
- clawbotHelp: 'Scan QR code in <code>open-im init</code> or paste token from ClawBot iLink login.',
62
+ clawbotHelp: 'Click "Scan QR Login" to authenticate via WeChat, or paste token manually.',
63
+ qrLoginBtn: "Scan QR Login",
64
+ qrLoginScanning: "Waiting for QR code scan...",
65
+ qrLoginSuccess: "Login successful! Credentials saved.",
66
+ qrLoginFailed: "Login failed",
67
+ qrLoginExpired: "QR code expired, please try again",
68
+ qrScanHint: "Use WeChat to scan the QR code",
63
69
  platformCredentialsTitle: "Credentials",
64
70
  platformAccessTitle: "Routing and access",
65
71
  platformTestNote: "Checks required credentials against the platform.",
@@ -218,7 +224,13 @@ export const PAGE_TEXTS = {
218
224
  clawbotSummary: "\u901a\u8fc7 ClawBot \u8fde\u63a5\u5fae\u4fe1 iLink API\u3002",
219
225
  clawbotApiUrl: "API \u5730\u5740",
220
226
  clawbotApiToken: "API Token (Bearer)",
221
- clawbotHelp: '\u5728\u7ec8\u7aef\u8fd0\u884c <code>open-im init</code> \u626b\u7801\u767b\u5f55\uff0c\u6216\u7c98\u8d34 ClawBot iLink \u767b\u5f55\u540e\u7684 Token\u3002',
227
+ clawbotHelp: '\u70b9\u51fb\u201c\u626b\u7801\u767b\u5f55\u201d\u901a\u8fc7\u5fae\u4fe1\u8ba4\u8bc1\uff0c\u6216\u624b\u52a8\u7c98\u8d34 Token\u3002',
228
+ qrLoginBtn: "\u626b\u7801\u767b\u5f55",
229
+ qrLoginScanning: "\u7b49\u5f85\u626b\u7801...",
230
+ qrLoginSuccess: "\u767b\u5f55\u6210\u529f\uff01\u51ed\u8bc1\u5df2\u4fdd\u5b58\u3002",
231
+ qrLoginFailed: "\u767b\u5f55\u5931\u8d25",
232
+ qrLoginExpired: "\u4e8c\u7ef4\u7801\u5df2\u8fc7\u671f\uff0c\u8bf7\u91cd\u8bd5",
233
+ qrScanHint: "\u8bf7\u4f7f\u7528\u5fae\u4fe1\u626b\u63cf\u4e8c\u7ef4\u7801",
222
234
  platformCredentialsTitle: "\u51ed\u8bc1",
223
235
  platformAccessTitle: "\u8def\u7531\u4e0e\u8bbf\u95ee",
224
236
  platformTestNote: "\u53ea\u4f1a\u68c0\u67e5\u8be5\u5e73\u53f0\u7684\u5fc5\u586b\u51ed\u8bc1\u662f\u5426\u53ef\u7528\u3002",
@@ -1135,7 +1135,7 @@ export async function startWebConfigServer(options) {
1135
1135
  const { waitForQRLogin } = await import("./clawbot/qr-login.js");
1136
1136
  const session = { sessionKey: body.sessionKey, qrcode: body.qrcode, qrcodeUrl: body.qrcodeUrl, startedAt: Date.now() };
1137
1137
  const result = await waitForQRLogin(session);
1138
- json(response, 200, { success: result.connected, botToken: result.botToken, userId: result.userId, message: result.message }, request);
1138
+ json(response, 200, { success: result.connected, botToken: result.botToken, baseUrl: result.baseUrl, userId: result.userId, message: result.message }, request);
1139
1139
  }
1140
1140
  catch (error) {
1141
1141
  json(response, 500, { success: false, error: toErrorMessage(error) }, request);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wu529778790/open-im",
3
- "version": "1.10.9-beta.14",
3
+ "version": "1.10.9-beta.15",
4
4
  "description": "Multi-platform IM bridge for AI CLI tools (Claude, Codex, CodeBuddy)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",