mu-agent-bridge 1.0.54 → 1.0.56

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.
Files changed (48) hide show
  1. package/dist/src-ts/plugins/abweb/index.js +1 -1
  2. package/dist/src-ts/plugins/aun/index.js +1 -1
  3. package/dist/src-ts/plugins/chatgpt/index.js +1 -1
  4. package/dist/src-ts/plugins/claude-cli/index.js +1 -1
  5. package/dist/src-ts/plugins/codex-cli/index.js +1 -1
  6. package/dist/src-ts/plugins/doubao/index.js +1 -1
  7. package/dist/src-ts/plugins/dsh/index.js +1 -1
  8. package/dist/src-ts/plugins/feishu/index.js +1 -1
  9. package/dist/src-ts/plugins/qwenwork/index.js +1 -1
  10. package/dist/src-ts/plugins/workbuddy/cdp-client.js +13 -1
  11. package/dist/src-ts/plugins/workbuddy/desktop-launch.js +1 -1
  12. package/dist/src-ts/plugins/workbuddy/index.js +6 -6
  13. package/dist/tests-ts/aun-plugin.test.js +1 -1
  14. package/dist/tests-ts/installer-assets.test.js +1 -1
  15. package/dist/tests-ts/workbuddy-plugin.test.js +21 -1
  16. package/package.json +1 -1
  17. package/plugins/abweb/dist/src-ts/plugins/abweb/index.js +1 -1
  18. package/plugins/abweb/package.json +1 -1
  19. package/plugins/abweb/plugin.json +1 -1
  20. package/plugins/aun/dist/src-ts/plugins/aun/index.js +1 -1
  21. package/plugins/aun/package.json +1 -1
  22. package/plugins/aun/plugin.json +1 -1
  23. package/plugins/chatgpt/dist/src-ts/plugins/chatgpt/index.js +1 -1
  24. package/plugins/chatgpt/package.json +1 -1
  25. package/plugins/chatgpt/plugin.json +1 -1
  26. package/plugins/claude-cli/dist/src-ts/plugins/claude-cli/index.js +1 -1
  27. package/plugins/claude-cli/package.json +1 -1
  28. package/plugins/claude-cli/plugin.json +1 -1
  29. package/plugins/codex-cli/dist/src-ts/plugins/codex-cli/index.js +1 -1
  30. package/plugins/codex-cli/package.json +1 -1
  31. package/plugins/codex-cli/plugin.json +1 -1
  32. package/plugins/doubao/dist/src-ts/plugins/doubao/index.js +1 -1
  33. package/plugins/doubao/package.json +1 -1
  34. package/plugins/doubao/plugin.json +1 -1
  35. package/plugins/dsh/dist/src-ts/plugins/dsh/index.js +1 -1
  36. package/plugins/dsh/package.json +1 -1
  37. package/plugins/dsh/plugin.json +1 -1
  38. package/plugins/feishu/dist/src-ts/plugins/feishu/index.js +1 -1
  39. package/plugins/feishu/package.json +1 -1
  40. package/plugins/feishu/plugin.json +1 -1
  41. package/plugins/qwenwork/dist/src-ts/plugins/qwenwork/index.js +1 -1
  42. package/plugins/qwenwork/package.json +1 -1
  43. package/plugins/qwenwork/plugin.json +1 -1
  44. package/plugins/workbuddy/dist/src-ts/plugins/workbuddy/cdp-client.js +13 -1
  45. package/plugins/workbuddy/dist/src-ts/plugins/workbuddy/desktop-launch.js +1 -1
  46. package/plugins/workbuddy/dist/src-ts/plugins/workbuddy/index.js +6 -6
  47. package/plugins/workbuddy/package.json +1 -1
  48. package/plugins/workbuddy/plugin.json +1 -1
@@ -5,7 +5,7 @@ const node_fs_1 = require("node:fs");
5
5
  const node_path_1 = require("node:path");
6
6
  const MANIFEST = {
7
7
  id: "abweb",
8
- version: "1.0.7",
8
+ version: "1.0.9",
9
9
  displayName: "Agent Bridge Web",
10
10
  entry: "dist/index.js",
11
11
  apiVersion: "1",
@@ -11,7 +11,7 @@ const node_url_1 = require("node:url");
11
11
  const messages_1 = require("./messages");
12
12
  const attachments_1 = require("./attachments");
13
13
  const manifest = {
14
- id: "aun", version: "1.0.30", type: "channel", displayName: "AUN 通道",
14
+ id: "aun", version: "1.0.31", type: "channel", displayName: "AUN 通道",
15
15
  entry: "dist/src-ts/plugins/aun/index.js", apiVersion: "1", process: "in-process",
16
16
  capabilities: ["channel", "channel.identity.create", "channel.receive", "channel.send", "health", "cli"],
17
17
  configSchema: "config.schema.json",
@@ -9,7 +9,7 @@ const node_path_1 = require("node:path");
9
9
  const node_os_1 = require("node:os");
10
10
  exports.chatgptManifest = {
11
11
  id: "chatgpt",
12
- version: "1.0.10",
12
+ version: "1.0.11",
13
13
  displayName: "ChatGPT(Codex)",
14
14
  type: "agent",
15
15
  entry: "dist/index.js",
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ClaudeCliPlugin = exports.manifest = void 0;
4
4
  const agent_1 = require("../local-cli/agent");
5
5
  exports.manifest = {
6
- id: "claude-cli", version: "1.0.0", displayName: "Claude Code CLI", type: "agent", executionMode: "cli",
6
+ id: "claude-cli", version: "1.0.1", displayName: "Claude Code CLI", type: "agent", executionMode: "cli",
7
7
  entry: "dist/src-ts/plugins/claude-cli/index.js", apiVersion: "1", process: "in-process",
8
8
  capabilities: ["chat", "health"], configSchema: "config.schema.json",
9
9
  };
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CodexCliPlugin = exports.manifest = void 0;
4
4
  const agent_1 = require("../local-cli/agent");
5
5
  exports.manifest = {
6
- id: "codex-cli", version: "1.0.0", displayName: "Codex CLI", type: "agent", executionMode: "cli",
6
+ id: "codex-cli", version: "1.0.1", displayName: "Codex CLI", type: "agent", executionMode: "cli",
7
7
  entry: "dist/src-ts/plugins/codex-cli/index.js", apiVersion: "1", process: "in-process",
8
8
  capabilities: ["chat", "health"], configSchema: "config.schema.json",
9
9
  };
@@ -10,7 +10,7 @@ const desktop_launch_1 = require("../desktop-launch");
10
10
  const node_os_1 = require("node:os");
11
11
  exports.doubaoManifest = {
12
12
  id: "doubao",
13
- version: "1.0.20",
13
+ version: "1.0.21",
14
14
  displayName: "豆包",
15
15
  entry: "dist/index.js",
16
16
  apiVersion: "1",
@@ -7,7 +7,7 @@ const openai_adapter_1 = require("../qwenwork/openai-adapter");
7
7
  const session_history_1 = require("./session-history");
8
8
  exports.dshManifest = {
9
9
  id: "dsh",
10
- version: "1.0.9",
10
+ version: "1.0.10",
11
11
  displayName: "DeepSeek Harness",
12
12
  entry: "dist/index.js",
13
13
  apiVersion: "1",
@@ -5,7 +5,7 @@ const promises_1 = require("node:fs/promises");
5
5
  const node_path_1 = require("node:path");
6
6
  const qrcode_1 = require("qrcode");
7
7
  const client_1 = require("./client");
8
- const manifest = { id: "feishu", version: "1.0.5", type: "channel", displayName: "飞书通道", entry: "dist/src-ts/plugins/feishu/index.js", apiVersion: "1", process: "in-process", capabilities: ["channel", "channel.bot.setup", "channel.receive", "channel.send", "health", "cli"], configSchema: "config.schema.json", managementPage: "/abweb/channels/feishu" };
8
+ const manifest = { id: "feishu", version: "1.0.7", type: "channel", displayName: "飞书通道", entry: "dist/src-ts/plugins/feishu/index.js", apiVersion: "1", process: "in-process", capabilities: ["channel", "channel.bot.setup", "channel.receive", "channel.send", "health", "cli"], configSchema: "config.schema.json", managementPage: "/abweb/channels/feishu" };
9
9
  const newSessionCommand = /^\/new(?:[ \t]+[^\r\n]+)?$/;
10
10
  const commands = [
11
11
  { name: "status", summary: "查看飞书通道状态", usage: "mab feishu status" },
@@ -12,7 +12,7 @@ const session_history_1 = require("./session-history");
12
12
  const CHAT_HEARTBEAT_INTERVAL_MS = 2 * 60 * 60_000;
13
13
  exports.qwenworkManifest = {
14
14
  id: "qwenwork",
15
- version: "1.0.20",
15
+ version: "1.0.21",
16
16
  displayName: "千问办公",
17
17
  entry: "dist/index.js",
18
18
  apiVersion: "1",
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WorkbuddyCdpClient = exports.assistantSelector = exports.editorSelector = void 0;
3
+ exports.WorkbuddyCdpClient = exports.chineseLocaleScript = exports.assistantSelector = exports.editorSelector = void 0;
4
4
  const node_crypto_1 = require("node:crypto");
5
5
  const attachments_1 = require("../../attachments");
6
6
  function sleep(ms) { return new Promise((resolve) => setTimeout(resolve, ms)); }
@@ -17,6 +17,16 @@ function interactionChoice(value, options) {
17
17
  }
18
18
  exports.editorSelector = '[data-slate-editor][contenteditable="true"]';
19
19
  exports.assistantSelector = '.cr-agent[data-message-id] [data-assistant-content]';
20
+ exports.chineseLocaleScript = `(() => {
21
+ const key = 'CODEBUDDY_IDE_STORAGE_LANG';
22
+ const legacyKey = 'workbuddy-language';
23
+ const locale = 'zh-CN';
24
+ const changed = localStorage.getItem(key) !== locale || localStorage.getItem(legacyKey) !== locale || /[?&]locale=en-US(?:&|$)/i.test(location.search);
25
+ localStorage.setItem(key, locale);
26
+ localStorage.setItem(legacyKey, locale);
27
+ if (changed) setTimeout(() => location.reload(), 0);
28
+ return changed;
29
+ })()`;
20
30
  class WorkbuddyCdpClient {
21
31
  attachmentInput = true;
22
32
  socket;
@@ -95,6 +105,8 @@ class WorkbuddyCdpClient {
95
105
  this.socket.onmessage = (event) => this.onMessage(String(event.data));
96
106
  try {
97
107
  await new Promise((resolve, reject) => { const socket = this.socket; socket.onopen = () => resolve(); socket.onerror = () => reject(new Error("WorkBuddy CDP WebSocket 连接失败")); });
108
+ if (await this.evaluate(exports.chineseLocaleScript))
109
+ await this.waitFor("!/[?&]locale=en-US(?:&|$)/i.test(location.search)", "WorkBuddy 中文界面切换超时");
98
110
  }
99
111
  catch (error) {
100
112
  this.close();
@@ -6,5 +6,5 @@ function launchWorkbuddyDesktop(executable, args, profileDirectory, port) {
6
6
  // WorkBuddy 会覆盖 Chromium 的用户目录参数,必须使用它自己的环境变量隔离实例。
7
7
  const env = { ...process.env, WORKBUDDY_USER_DATA_DIR: profileDirectory, WORKBUDDY_REMOTE_DEBUGGING_PORT: String(port) };
8
8
  delete env.ELECTRON_RUN_AS_NODE;
9
- return (0, node_child_process_1.spawn)(executable, args, { env, detached: true, stdio: "ignore", windowsHide: false });
9
+ return (0, node_child_process_1.spawn)(executable, [...args, "--lang=zh-CN", "--accept-lang=zh-CN,zh"], { env, detached: true, stdio: "ignore", windowsHide: false });
10
10
  }
@@ -15,7 +15,7 @@ const session_history_1 = require("./session-history");
15
15
  const desktop_launch_1 = require("../desktop-launch");
16
16
  const desktop_launch_2 = require("./desktop-launch");
17
17
  exports.workbuddyManifest = {
18
- id: "workbuddy", version: "1.1.14", displayName: "WorkBuddy", type: "agent",
18
+ id: "workbuddy", version: "1.1.18", displayName: "WorkBuddy", type: "agent",
19
19
  entry: "dist/index.js", apiVersion: "1", process: "in-process",
20
20
  capabilities: ["chat", "health"], configSchema: "config.schema.json",
21
21
  };
@@ -265,22 +265,22 @@ class WorkbuddyPlugin {
265
265
  const timeout = request.timeoutMs ?? this.timeoutMs;
266
266
  const expert = extractExpertQuery(request.task);
267
267
  const usesCli = Boolean(this.cliPath && this.transport !== "cdp" && !expert);
268
+ // 内部恢复消息可能没有 sessionId,沿用当前桌面会话,避免恢复任务被会话保护拒绝。
269
+ const sessionId = request.sessionId ?? this.activeSessionId;
268
270
  const hasAttachments = Array.isArray(request.attachments) && request.attachments.length > 0;
269
271
  if (hasAttachments && !this.attachmentInput)
270
272
  throw new Error("WorkBuddy 当前传输不支持附件输入");
271
273
  if (!usesCli && !this.client?.connected())
272
274
  await this.reconnect?.();
273
275
  const pendingInteractionSessionId = this.client?.pendingInteractionSessionId?.();
274
- if (!usesCli && pendingInteractionSessionId && pendingInteractionSessionId !== request.sessionId)
276
+ if (!usesCli && pendingInteractionSessionId && pendingInteractionSessionId !== sessionId)
275
277
  throw new Error("WorkBuddy 正在等待另一个会话的选择");
276
278
  if (usesCli && request.sessionId)
277
279
  throw new Error("CodeBuddy CLI 会话隔离未验证,不能处理带 sessionId 的请求");
278
- if (!usesCli && !request.sessionId && this.activeSessionId)
279
- throw new Error("WorkBuddy 已绑定逻辑会话,请使用相同 sessionId 或先执行 /new");
280
- if (!usesCli && !request.sessionId && !this.desktopSessionValid)
280
+ if (!usesCli && !sessionId && !this.desktopSessionValid)
281
281
  throw new Error("WorkBuddy 桌面任务状态未知,请先创建新会话");
282
282
  if (!usesCli)
283
- await this.ensureSession(request.sessionId);
283
+ await this.ensureSession(sessionId);
284
284
  if (expert) {
285
285
  if (!this.client?.connected())
286
286
  throw new Error(`专家请求需要已连接的 WorkBuddy 桌面端:${expert}`);
@@ -536,7 +536,7 @@ async function withAunAttachmentPlugin(run, publish, config = { allow_from: "pee
536
536
  await routes.get(`GET ${commandPath}`)({}, manifestResponse);
537
537
  strict_1.default.equal(manifestResponse.body.protocolVersion, 1);
538
538
  strict_1.default.equal(manifestResponse.body.plugin, "aun");
539
- strict_1.default.equal(manifestResponse.body.version, "1.0.30");
539
+ strict_1.default.equal(manifestResponse.body.version, "1.0.31");
540
540
  strict_1.default.deepEqual(manifestResponse.body.commands.map((command) => command.name), ["status", "list", "agents", "default-owner", "create", "bind", "unbind"]);
541
541
  strict_1.default.ok(manifestResponse.body.commands.every((command) => command.summary && command.usage));
542
542
  const status = await runAunCommand(routes, commandResponse(), ["status"]);
@@ -54,7 +54,7 @@ const node_util_1 = require("node:util");
54
54
  strict_1.default.match(setup, /显示详细信息/);
55
55
  strict_1.default.match(setup, /WizardBusyTimer/);
56
56
  strict_1.default.match(setup, /timer\.Interval = 120/);
57
- strict_1.default.match(setup, /⟳/);
57
+ strict_1.default.match(setup, /◴/);
58
58
  strict_1.default.match(setup, /function Wait-WizardTask/);
59
59
  strict_1.default.match(setup, /DownloadFileTaskAsync/);
60
60
  strict_1.default.match(setup, /while \(-not \$process\.HasExited\)/);
@@ -51,6 +51,12 @@ const node_test_1 = __importDefault(require("node:test"));
51
51
  const node_vm_1 = require("node:vm");
52
52
  const workbuddy_1 = require("../src-ts/plugins/workbuddy");
53
53
  const cdp_client_1 = require("../src-ts/plugins/workbuddy/cdp-client");
54
+ (0, node_test_1.default)("WorkBuddy CDP 启动后固定中文语言偏好", () => {
55
+ strict_1.default.match(cdp_client_1.chineseLocaleScript, /CODEBUDDY_IDE_STORAGE_LANG/);
56
+ strict_1.default.match(cdp_client_1.chineseLocaleScript, /workbuddy-language/);
57
+ strict_1.default.match(cdp_client_1.chineseLocaleScript, /zh-CN/);
58
+ strict_1.default.match(cdp_client_1.chineseLocaleScript, /location\.reload/);
59
+ });
54
60
  (0, node_test_1.default)("workbuddy CDP 拒绝连接其他应用的调试页面", async () => {
55
61
  const client = new cdp_client_1.WorkbuddyCdpClient({ fetchImpl: async () => new Response(JSON.stringify([{ type: "page", title: "Other App", webSocketDebuggerUrl: "ws://127.0.0.1:9229/devtools/page/1" }])) });
56
62
  await strict_1.default.rejects(() => client.connect(), /未找到 WorkBuddy 页面 target/);
@@ -203,6 +209,19 @@ const cdp_client_1 = require("../src-ts/plugins/workbuddy/cdp-client");
203
209
  strict_1.default.equal((await plugin.health()).status, "ready");
204
210
  await plugin.deactivate("stop");
205
211
  });
212
+ (0, node_test_1.default)("workbuddy 内部恢复消息无 sessionId 时沿用当前桌面会话", async () => {
213
+ const calls = [];
214
+ const client = {
215
+ connect: async () => undefined, close() { }, connected: () => true,
216
+ direct: async (task) => { calls.push(task); return "恢复成功"; },
217
+ };
218
+ const plugin = new workbuddy_1.WorkbuddyPlugin({ client });
219
+ await plugin.activate({ config: { transport: "cdp" }, logger: { info() { }, warn() { }, error() { } } });
220
+ plugin.activeSessionId = "session-active";
221
+ await strict_1.default.doesNotReject(() => plugin.handle({ task: "继续当前任务" }));
222
+ strict_1.default.deepEqual(calls, ["继续当前任务"]);
223
+ await plugin.deactivate("stop");
224
+ });
206
225
  (0, node_test_1.default)("workbuddy 结构化客户端接收附件并保留附件响应和逻辑会话", async () => {
207
226
  const attachment = { kind: "file", data: new Uint8Array([1, 2]), filename: "输入.txt", contentType: "text/plain" };
208
227
  const output = { kind: "file", data: new Uint8Array([3]), filename: "输出.txt", contentType: "text/plain" };
@@ -922,7 +941,7 @@ const cdp_client_1 = require("../src-ts/plugins/workbuddy/cdp-client");
922
941
  querySelectorAll: (selector) => selector === '.cr-agent[data-message-id]' ? Array(messages).fill({}) : selector === '[data-conversation-id]' ? home && clicked ? [] : [{ className: "_selected_old", getAttribute: () => conversationId }] : [button],
923
942
  querySelector: () => editor,
924
943
  };
925
- const client = new cdp_client_1.WorkbuddyCdpClient({ timeoutMs: 1 });
944
+ const client = new cdp_client_1.WorkbuddyCdpClient({ timeoutMs: 50 });
926
945
  const evaluator = client;
927
946
  evaluator.evaluate = async (expression) => (0, node_vm_1.runInNewContext)(expression, { document, location: { href: "app://workbuddy/task/old" } });
928
947
  evaluator.pendingInteraction = { prompt: "请选择项目", options: ["项目甲"], sessionId: "old-session" };
@@ -1193,6 +1212,7 @@ const cdp_client_1 = require("../src-ts/plugins/workbuddy/cdp-client");
1193
1212
  });
1194
1213
  try {
1195
1214
  launchWorkbuddyDesktop("WorkBuddy.exe", ["--remote-debugging-port=19329"], "bridge-profile", 19329);
1215
+ strict_1.default.deepEqual(launch.args, ["--remote-debugging-port=19329", "--lang=zh-CN", "--accept-lang=zh-CN,zh"]);
1196
1216
  strict_1.default.equal(launch.options.env.WORKBUDDY_USER_DATA_DIR, "bridge-profile");
1197
1217
  strict_1.default.equal(launch.options.env.WORKBUDDY_REMOTE_DEBUGGING_PORT, "19329");
1198
1218
  strict_1.default.equal(launch.options.env.ELECTRON_RUN_AS_NODE, undefined);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mu-agent-bridge",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "description": "将 AUN Agent 连接到本地桌面 AI 客户端的插件平台。",
5
5
  "main": "dist/src-ts/cli.js",
6
6
  "bin": {
@@ -5,7 +5,7 @@ const node_fs_1 = require("node:fs");
5
5
  const node_path_1 = require("node:path");
6
6
  const MANIFEST = {
7
7
  id: "abweb",
8
- version: "1.0.7",
8
+ version: "1.0.9",
9
9
  displayName: "Agent Bridge Web",
10
10
  entry: "dist/index.js",
11
11
  apiVersion: "1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-bridge-abweb",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "agent-bridge 的网页管理插件。",
5
5
  "keywords": [
6
6
  "mu-agent-bridge-plugin",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "abweb",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "type": "management",
5
5
  "displayName": "Agent Bridge Web",
6
6
  "entry": "dist/src-ts/plugins/abweb/index.js",
@@ -11,7 +11,7 @@ const node_url_1 = require("node:url");
11
11
  const messages_1 = require("./messages");
12
12
  const attachments_1 = require("./attachments");
13
13
  const manifest = {
14
- id: "aun", version: "1.0.30", type: "channel", displayName: "AUN 通道",
14
+ id: "aun", version: "1.0.31", type: "channel", displayName: "AUN 通道",
15
15
  entry: "dist/src-ts/plugins/aun/index.js", apiVersion: "1", process: "in-process",
16
16
  capabilities: ["channel", "channel.identity.create", "channel.receive", "channel.send", "health", "cli"],
17
17
  configSchema: "config.schema.json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-bridge-aun",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "mu-agent-bridge 的 AUN 通道插件。",
5
5
  "keywords": [
6
6
  "mu-agent-bridge-plugin",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "aun",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "type": "channel",
5
5
  "displayName": "AUN 通道",
6
6
  "entry": "dist/src-ts/plugins/aun/index.js",
@@ -9,7 +9,7 @@ const node_path_1 = require("node:path");
9
9
  const node_os_1 = require("node:os");
10
10
  exports.chatgptManifest = {
11
11
  id: "chatgpt",
12
- version: "1.0.10",
12
+ version: "1.0.11",
13
13
  displayName: "ChatGPT(Codex)",
14
14
  type: "agent",
15
15
  entry: "dist/index.js",
@@ -1 +1 @@
1
- {"name":"agent-bridge-chatgpt","version":"1.0.10","description":"agent-bridge 的 ChatGPT Codex CDP 插件。","keywords":["mu-agent-bridge-plugin","mu-agent-bridge-agent"],"main":"dist/src-ts/plugins/chatgpt/index.js","files":["dist/","plugin.json","config.schema.json","README.md"],"agentBridge":{"plugin":"./plugin.json","type":"agent"},"engines":{"node":">=22"}}
1
+ {"name":"agent-bridge-chatgpt","version":"1.0.11","description":"agent-bridge 的 ChatGPT Codex CDP 插件。","keywords":["mu-agent-bridge-plugin","mu-agent-bridge-agent"],"main":"dist/src-ts/plugins/chatgpt/index.js","files":["dist/","plugin.json","config.schema.json","README.md"],"agentBridge":{"plugin":"./plugin.json","type":"agent"},"engines":{"node":">=22"}}
@@ -1 +1 @@
1
- {"id":"chatgpt","version":"1.0.10","type":"agent","displayName":"ChatGPT(Codex)","entry":"dist/src-ts/plugins/chatgpt/index.js","apiVersion":"1","process":"in-process","capabilities":["chat","health"],"configSchema":"config.schema.json"}
1
+ {"id":"chatgpt","version":"1.0.11","type":"agent","displayName":"ChatGPT(Codex)","entry":"dist/src-ts/plugins/chatgpt/index.js","apiVersion":"1","process":"in-process","capabilities":["chat","health"],"configSchema":"config.schema.json"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ClaudeCliPlugin = exports.manifest = void 0;
4
4
  const agent_1 = require("../local-cli/agent");
5
5
  exports.manifest = {
6
- id: "claude-cli", version: "1.0.0", displayName: "Claude Code CLI", type: "agent", executionMode: "cli",
6
+ id: "claude-cli", version: "1.0.1", displayName: "Claude Code CLI", type: "agent", executionMode: "cli",
7
7
  entry: "dist/src-ts/plugins/claude-cli/index.js", apiVersion: "1", process: "in-process",
8
8
  capabilities: ["chat", "health"], configSchema: "config.schema.json",
9
9
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-bridge-claude-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "mu-agent-bridge 的本地 Claude Code CLI 独立插件,沿用 CLI 默认模型与登录。",
5
5
  "keywords": [
6
6
  "mu-agent-bridge-plugin",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "claude-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "agent",
5
5
  "executionMode": "cli",
6
6
  "displayName": "Claude Code CLI",
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CodexCliPlugin = exports.manifest = void 0;
4
4
  const agent_1 = require("../local-cli/agent");
5
5
  exports.manifest = {
6
- id: "codex-cli", version: "1.0.0", displayName: "Codex CLI", type: "agent", executionMode: "cli",
6
+ id: "codex-cli", version: "1.0.1", displayName: "Codex CLI", type: "agent", executionMode: "cli",
7
7
  entry: "dist/src-ts/plugins/codex-cli/index.js", apiVersion: "1", process: "in-process",
8
8
  capabilities: ["chat", "health"], configSchema: "config.schema.json",
9
9
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-bridge-codex-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "mu-agent-bridge 的本地 Codex CLI 独立插件,沿用 CLI 默认模型与登录。",
5
5
  "keywords": [
6
6
  "mu-agent-bridge-plugin",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "codex-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "agent",
5
5
  "executionMode": "cli",
6
6
  "displayName": "Codex CLI",
@@ -10,7 +10,7 @@ const desktop_launch_1 = require("../desktop-launch");
10
10
  const node_os_1 = require("node:os");
11
11
  exports.doubaoManifest = {
12
12
  id: "doubao",
13
- version: "1.0.20",
13
+ version: "1.0.21",
14
14
  displayName: "豆包",
15
15
  entry: "dist/index.js",
16
16
  apiVersion: "1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-bridge-doubao",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "agent-bridge 的豆包插件。",
5
5
  "keywords": [
6
6
  "mu-agent-bridge-plugin",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "doubao",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "type": "agent",
5
5
  "displayName": "豆包",
6
6
  "entry": "dist/src-ts/plugins/doubao/index.js",
@@ -7,7 +7,7 @@ const openai_adapter_1 = require("../qwenwork/openai-adapter");
7
7
  const session_history_1 = require("./session-history");
8
8
  exports.dshManifest = {
9
9
  id: "dsh",
10
- version: "1.0.9",
10
+ version: "1.0.10",
11
11
  displayName: "DeepSeek Harness",
12
12
  entry: "dist/index.js",
13
13
  apiVersion: "1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-bridge-dsh",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "agent-bridge 的 DeepSeek Harness 插件,支持后台定时自动升级验证。",
5
5
  "keywords": [
6
6
  "mu-agent-bridge-plugin",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "type": "agent",
5
5
  "displayName": "DeepSeek Harness",
6
6
  "entry": "dist/src-ts/plugins/dsh/index.js",
@@ -5,7 +5,7 @@ const promises_1 = require("node:fs/promises");
5
5
  const node_path_1 = require("node:path");
6
6
  const qrcode_1 = require("qrcode");
7
7
  const client_1 = require("./client");
8
- const manifest = { id: "feishu", version: "1.0.5", type: "channel", displayName: "飞书通道", entry: "dist/src-ts/plugins/feishu/index.js", apiVersion: "1", process: "in-process", capabilities: ["channel", "channel.bot.setup", "channel.receive", "channel.send", "health", "cli"], configSchema: "config.schema.json", managementPage: "/abweb/channels/feishu" };
8
+ const manifest = { id: "feishu", version: "1.0.7", type: "channel", displayName: "飞书通道", entry: "dist/src-ts/plugins/feishu/index.js", apiVersion: "1", process: "in-process", capabilities: ["channel", "channel.bot.setup", "channel.receive", "channel.send", "health", "cli"], configSchema: "config.schema.json", managementPage: "/abweb/channels/feishu" };
9
9
  const newSessionCommand = /^\/new(?:[ \t]+[^\r\n]+)?$/;
10
10
  const commands = [
11
11
  { name: "status", summary: "查看飞书通道状态", usage: "mab feishu status" },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-bridge-feishu",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "agent-bridge 的飞书通道插件。",
5
5
  "keywords": [
6
6
  "mu-agent-bridge-plugin",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "feishu",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "type": "channel",
5
5
  "displayName": "飞书通道",
6
6
  "entry": "dist/src-ts/plugins/feishu/index.js",
@@ -12,7 +12,7 @@ const session_history_1 = require("./session-history");
12
12
  const CHAT_HEARTBEAT_INTERVAL_MS = 2 * 60 * 60_000;
13
13
  exports.qwenworkManifest = {
14
14
  id: "qwenwork",
15
- version: "1.0.20",
15
+ version: "1.0.21",
16
16
  displayName: "千问办公",
17
17
  entry: "dist/index.js",
18
18
  apiVersion: "1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-bridge-qwenwork",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "agent-bridge 的千问办公插件。",
5
5
  "keywords": [
6
6
  "mu-agent-bridge-plugin",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "qwenwork",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "type": "agent",
5
5
  "displayName": "千问办公",
6
6
  "entry": "dist/src-ts/plugins/qwenwork/index.js",
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WorkbuddyCdpClient = exports.assistantSelector = exports.editorSelector = void 0;
3
+ exports.WorkbuddyCdpClient = exports.chineseLocaleScript = exports.assistantSelector = exports.editorSelector = void 0;
4
4
  const node_crypto_1 = require("node:crypto");
5
5
  const attachments_1 = require("../../attachments");
6
6
  function sleep(ms) { return new Promise((resolve) => setTimeout(resolve, ms)); }
@@ -17,6 +17,16 @@ function interactionChoice(value, options) {
17
17
  }
18
18
  exports.editorSelector = '[data-slate-editor][contenteditable="true"]';
19
19
  exports.assistantSelector = '.cr-agent[data-message-id] [data-assistant-content]';
20
+ exports.chineseLocaleScript = `(() => {
21
+ const key = 'CODEBUDDY_IDE_STORAGE_LANG';
22
+ const legacyKey = 'workbuddy-language';
23
+ const locale = 'zh-CN';
24
+ const changed = localStorage.getItem(key) !== locale || localStorage.getItem(legacyKey) !== locale || /[?&]locale=en-US(?:&|$)/i.test(location.search);
25
+ localStorage.setItem(key, locale);
26
+ localStorage.setItem(legacyKey, locale);
27
+ if (changed) setTimeout(() => location.reload(), 0);
28
+ return changed;
29
+ })()`;
20
30
  class WorkbuddyCdpClient {
21
31
  attachmentInput = true;
22
32
  socket;
@@ -95,6 +105,8 @@ class WorkbuddyCdpClient {
95
105
  this.socket.onmessage = (event) => this.onMessage(String(event.data));
96
106
  try {
97
107
  await new Promise((resolve, reject) => { const socket = this.socket; socket.onopen = () => resolve(); socket.onerror = () => reject(new Error("WorkBuddy CDP WebSocket 连接失败")); });
108
+ if (await this.evaluate(exports.chineseLocaleScript))
109
+ await this.waitFor("!/[?&]locale=en-US(?:&|$)/i.test(location.search)", "WorkBuddy 中文界面切换超时");
98
110
  }
99
111
  catch (error) {
100
112
  this.close();
@@ -6,5 +6,5 @@ function launchWorkbuddyDesktop(executable, args, profileDirectory, port) {
6
6
  // WorkBuddy 会覆盖 Chromium 的用户目录参数,必须使用它自己的环境变量隔离实例。
7
7
  const env = { ...process.env, WORKBUDDY_USER_DATA_DIR: profileDirectory, WORKBUDDY_REMOTE_DEBUGGING_PORT: String(port) };
8
8
  delete env.ELECTRON_RUN_AS_NODE;
9
- return (0, node_child_process_1.spawn)(executable, args, { env, detached: true, stdio: "ignore", windowsHide: false });
9
+ return (0, node_child_process_1.spawn)(executable, [...args, "--lang=zh-CN", "--accept-lang=zh-CN,zh"], { env, detached: true, stdio: "ignore", windowsHide: false });
10
10
  }
@@ -15,7 +15,7 @@ const session_history_1 = require("./session-history");
15
15
  const desktop_launch_1 = require("../desktop-launch");
16
16
  const desktop_launch_2 = require("./desktop-launch");
17
17
  exports.workbuddyManifest = {
18
- id: "workbuddy", version: "1.1.14", displayName: "WorkBuddy", type: "agent",
18
+ id: "workbuddy", version: "1.1.18", displayName: "WorkBuddy", type: "agent",
19
19
  entry: "dist/index.js", apiVersion: "1", process: "in-process",
20
20
  capabilities: ["chat", "health"], configSchema: "config.schema.json",
21
21
  };
@@ -265,22 +265,22 @@ class WorkbuddyPlugin {
265
265
  const timeout = request.timeoutMs ?? this.timeoutMs;
266
266
  const expert = extractExpertQuery(request.task);
267
267
  const usesCli = Boolean(this.cliPath && this.transport !== "cdp" && !expert);
268
+ // 内部恢复消息可能没有 sessionId,沿用当前桌面会话,避免恢复任务被会话保护拒绝。
269
+ const sessionId = request.sessionId ?? this.activeSessionId;
268
270
  const hasAttachments = Array.isArray(request.attachments) && request.attachments.length > 0;
269
271
  if (hasAttachments && !this.attachmentInput)
270
272
  throw new Error("WorkBuddy 当前传输不支持附件输入");
271
273
  if (!usesCli && !this.client?.connected())
272
274
  await this.reconnect?.();
273
275
  const pendingInteractionSessionId = this.client?.pendingInteractionSessionId?.();
274
- if (!usesCli && pendingInteractionSessionId && pendingInteractionSessionId !== request.sessionId)
276
+ if (!usesCli && pendingInteractionSessionId && pendingInteractionSessionId !== sessionId)
275
277
  throw new Error("WorkBuddy 正在等待另一个会话的选择");
276
278
  if (usesCli && request.sessionId)
277
279
  throw new Error("CodeBuddy CLI 会话隔离未验证,不能处理带 sessionId 的请求");
278
- if (!usesCli && !request.sessionId && this.activeSessionId)
279
- throw new Error("WorkBuddy 已绑定逻辑会话,请使用相同 sessionId 或先执行 /new");
280
- if (!usesCli && !request.sessionId && !this.desktopSessionValid)
280
+ if (!usesCli && !sessionId && !this.desktopSessionValid)
281
281
  throw new Error("WorkBuddy 桌面任务状态未知,请先创建新会话");
282
282
  if (!usesCli)
283
- await this.ensureSession(request.sessionId);
283
+ await this.ensureSession(sessionId);
284
284
  if (expert) {
285
285
  if (!this.client?.connected())
286
286
  throw new Error(`专家请求需要已连接的 WorkBuddy 桌面端:${expert}`);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-bridge-workbuddy",
3
- "version": "1.1.15",
3
+ "version": "1.1.18",
4
4
  "description": "mu-agent-bridge 的 WorkBuddy 桌面端插件。",
5
5
  "keywords": [
6
6
  "mu-agent-bridge-plugin",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "workbuddy",
3
- "version": "1.1.15",
3
+ "version": "1.1.18",
4
4
  "type": "agent",
5
5
  "displayName": "WorkBuddy",
6
6
  "entry": "dist/src-ts/plugins/workbuddy/index.js",