openmausbot 0.1.76 → 0.1.77

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 (45) hide show
  1. package/dist/assets/{index-C6blGSq5.js → index-DeK-z9ld.js} +1 -1
  2. package/dist/assets/index-XdHJ-9CF.css +1 -0
  3. package/dist/assets/index-lhqE1umn.js +305 -0
  4. package/dist/index.html +2 -2
  5. package/dist-server/container-mcp.js +5 -1
  6. package/dist-server/drivers/agents-proxy.js +52 -1
  7. package/dist-server/enterprise/server/index.js +387 -29
  8. package/dist-server/index.js +1377 -459
  9. package/dist-server/openmausbot.js +725 -522
  10. package/dist-server/pair-cli.js +725 -522
  11. package/dist-server/server/agent-tool-policy.js +1 -0
  12. package/dist-server/server/browser-live.js +3 -0
  13. package/dist-server/server/config.js +16 -0
  14. package/dist-server/server/drivers/acp/core.js +3 -1
  15. package/dist-server/server/drivers/agents-proxy.js +58 -2
  16. package/dist-server/server/drivers/boxagent.js +1 -1
  17. package/dist-server/server/drivers/claude.js +3 -2
  18. package/dist-server/server/drivers/codex.js +3 -1
  19. package/dist-server/server/drivers/pi.js +4 -0
  20. package/dist-server/server/enterprise.js +38 -0
  21. package/dist-server/server/environment.js +3 -0
  22. package/dist-server/server/fleet-agent.js +57 -13
  23. package/dist-server/server/fleet-cli.js +248 -31
  24. package/dist-server/server/fleet.js +88 -14
  25. package/dist-server/server/hosted-contract.js +16 -0
  26. package/dist-server/server/index.js +671 -100
  27. package/dist-server/server/message-file.js +4 -0
  28. package/dist-server/server/provider-key-check.js +18 -1
  29. package/dist-server/server/request-auth.js +14 -5
  30. package/dist-server/server/sessions.js +115 -8
  31. package/dist-server/server/shared-computer-control.js +24 -0
  32. package/dist-server/server/shared-computers.js +131 -0
  33. package/dist-server/server/steer-queue.js +2 -0
  34. package/dist-server/server/store.js +20 -7
  35. package/dist-server/server/team-computers.js +108 -0
  36. package/dist-server/server/tool-summary.js +53 -1
  37. package/dist-server/server/workspace-backup.js +1 -0
  38. package/dist-server/shared/approval-mode.js +4 -1
  39. package/dist-server/shared/team-computer.js +1 -0
  40. package/dist-server/vps-container-mcp.js +5 -1
  41. package/enterprise/README.md +21 -3
  42. package/enterprise/server/index.js +387 -29
  43. package/package.json +1 -1
  44. package/dist/assets/index-BtT047dk.css +0 -1
  45. package/dist/assets/index-fKXFpB_J.js +0 -305
package/dist/index.html CHANGED
@@ -5,8 +5,8 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <link rel="icon" type="image/svg+xml" href="/app-icon.svg" />
7
7
  <title>OpenMausBot</title>
8
- <script type="module" crossorigin src="/assets/index-fKXFpB_J.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-BtT047dk.css">
8
+ <script type="module" crossorigin src="/assets/index-lhqE1umn.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-XdHJ-9CF.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
@@ -14810,7 +14810,11 @@ var featureConfigSchema = external_exports.object({
14810
14810
  showToolCalls: external_exports.boolean().optional(),
14811
14811
  /** Experimental built-in browser. Off until explicitly enabled; each bot
14812
14812
  * also has its own switch. */
14813
- browser: external_exports.boolean().optional()
14813
+ browser: external_exports.boolean().optional(),
14814
+ /** Opt-in computer sharing (a desktop lending folders, a terminal or
14815
+ * computer control to a workspace). Off until explicitly enabled; there is
14816
+ * no Settings toggle — see sharedComputersEnabled. */
14817
+ sharedComputers: external_exports.boolean().optional()
14814
14818
  });
14815
14819
  var onboardingConfigSchema = external_exports.object({
14816
14820
  /** ISO timestamp of finishing (or skipping to the end of) the welcome flow. */
@@ -42,6 +42,7 @@ function isCredentialTargetId(value) {
42
42
  var READ_ONLY_AGENT_TOOL_NAMES = /* @__PURE__ */ new Set([
43
43
  "list_bots",
44
44
  "list_team_setup",
45
+ "list_shared_computers",
45
46
  "list_rooms",
46
47
  "list_threads",
47
48
  "check_delegation",
@@ -90,6 +91,7 @@ var THREAD_ID = process.env.OMB_THREAD_ID ?? "";
90
91
  var TOKEN = process.env.OMB_COMMS_TOKEN ?? "";
91
92
  var DEPTH = Number(process.env.OMB_TURN_DEPTH ?? "0") || 0;
92
93
  var SKILL_AUTHORING_ENABLED = process.env.OMB_SKILL_AUTHORING_ENABLED === "1";
94
+ var SHARED_COMPUTERS_ENABLED = process.env.OMB_SHARED_COMPUTERS_ENABLED === "1";
93
95
  var MAX_CREATED_PER_TURN = 4;
94
96
  var createdThisTurn = 0;
95
97
  var MAX_ROOM_POSTS_PER_TURN = 3;
@@ -333,6 +335,27 @@ var ROUTINE_FIELDS_SCHEMA = {
333
335
  }
334
336
  };
335
337
  var TOOLS = [
338
+ {
339
+ name: "list_shared_computers",
340
+ description: "List online desktop computers explicitly shared with this workspace, and their allowed folders/capabilities. These are the user's computers, not this server. An offline or unshared computer cannot be accessed. Folder paths use opaque folder IDs and relative paths.",
341
+ inputSchema: { type: "object", properties: {}, additionalProperties: false }
342
+ },
343
+ {
344
+ name: "shared_computer",
345
+ description: "Use a desktop explicitly shared by the user. Discover computer_id and folder_id with list_shared_computers. list_files/read_file/write_file are confined to chosen folders; paths are relative. read_file returns sha256; overwriting requires expected_sha256. Binary files support base64 encoding. run_command requires a SEPARATE unrestricted terminal grant. computer_tools lists the native computer-control tools; computer_call invokes one with arguments and needs a SEPARATE computer-control grant. Never substitute the server's filesystem when this desktop is offline. Actions are not retried automatically; inspect an uncertain outcome before retrying.",
346
+ inputSchema: { type: "object", additionalProperties: false, properties: {
347
+ computer_id: { type: "string" },
348
+ action: { type: "string", enum: ["list_files", "read_file", "write_file", "run_command", "computer_tools", "computer_call"] },
349
+ folder_id: { type: "string" },
350
+ path: { type: "string" },
351
+ content: { type: "string" },
352
+ encoding: { type: "string", enum: ["utf8", "base64"] },
353
+ expected_sha256: { type: "string" },
354
+ command: { type: "string" },
355
+ tool_name: { type: "string" },
356
+ arguments: { type: "object", additionalProperties: true }
357
+ }, required: ["computer_id", "action"] }
358
+ },
336
359
  {
337
360
  name: "list_room_targets",
338
361
  description: "Discover actual OpenMausBot teammates and rooms in your allowed teams. Works in a normal bot conversation too; no room is required. Returns bot and room IDs, roles and working folders, never other conversations' history. Use these bots, not native coding helpers with similar names, when the user asks their team to work together.",
@@ -750,10 +773,20 @@ var TOOLS = [
750
773
  });
751
774
  var SKILL_TOOL_NAMES = /* @__PURE__ */ new Set(["skills_list", "skill_manage"]);
752
775
  var AUTHORING_TOOLS = SKILL_AUTHORING_ENABLED ? TOOLS : TOOLS.filter((tool) => !SKILL_TOOL_NAMES.has(tool.name));
776
+ var SHARED_COMPUTER_TOOL_NAMES = /* @__PURE__ */ new Set(["list_shared_computers", "shared_computer"]);
777
+ var SHAREABLE_TOOLS = SHARED_COMPUTERS_ENABLED ? AUTHORING_TOOLS : AUTHORING_TOOLS.filter((tool) => !SHARED_COMPUTER_TOOL_NAMES.has(tool.name));
753
778
  var ROOM_ONLY_TOOLS = /* @__PURE__ */ new Set(["list_room_targets", "coordinate_bots"]);
754
779
  var ROOM_REPLACED_TOOLS = /* @__PURE__ */ new Set(["ask_bot", "delegate_bot", "check_delegation", "wait_delegation", "start_thread", "send_to_thread", "wait_thread"]);
755
780
  var COORDINATING = process.env.OMB_ROOM_TURN === "1";
756
- var AVAILABLE_TOOLS = COORDINATING ? AUTHORING_TOOLS.filter((tool) => !ROOM_REPLACED_TOOLS.has(tool.name)) : AUTHORING_TOOLS.filter((tool) => !ROOM_ONLY_TOOLS.has(tool.name));
781
+ var OWN_THREAD_CREATION = process.env.OMB_OWN_THREAD_CREATION === "1";
782
+ var AVAILABLE_TOOLS = COORDINATING ? SHAREABLE_TOOLS.filter((tool) => !ROOM_REPLACED_TOOLS.has(tool.name) || tool.name === "start_thread" && OWN_THREAD_CREATION).map((tool) => tool.name === "start_thread" ? {
783
+ ...tool,
784
+ description: "Open a separate job on yourself with its own history and run, without switching the person's selected conversation. Use only when the user requests independent jobs (for example one review per pull request). Give a short specific title and complete instructions; you can open at most five per turn. This is not a teammate handoff: use coordinate_bots for teammates and their automatic replies. Self-opened jobs cannot recursively open more jobs. If refused, do not retry; explain what remains.",
785
+ inputSchema: { ...tool.inputSchema, properties: {
786
+ ...tool.inputSchema.properties,
787
+ bot_id: { type: "string", enum: [BOT_ID], description: "Leave out, or use your own bot ID. For teammates use coordinate_bots." }
788
+ } }
789
+ } : tool) : SHAREABLE_TOOLS.filter((tool) => !ROOM_ONLY_TOOLS.has(tool.name));
757
790
  var send = (msg) => process.stdout.write(JSON.stringify(msg) + "\n");
758
791
  var ok = (id, result) => send({ jsonrpc: "2.0", id, result });
759
792
  var rpcErr = (id, code, message) => send({ jsonrpc: "2.0", id, error: { code, message } });
@@ -1039,6 +1072,9 @@ ${lines.join("\n")}` };
1039
1072
  };
1040
1073
  }
1041
1074
  const toBotId = typeof args.bot_id === "string" ? args.bot_id.trim() : "";
1075
+ if (COORDINATING && toBotId && toBotId !== BOT_ID) {
1076
+ return { text: "Use coordinate_bots for teammates; start_thread only opens a separate job on yourself.", isError: true };
1077
+ }
1042
1078
  const folder = typeof args.folder === "string" ? args.folder.trim() : "";
1043
1079
  const body = { fromBotId: BOT_ID, fromThreadId: THREAD_ID, title, message, depth: DEPTH };
1044
1080
  if (toBotId) body.toBotId = toBotId;
@@ -1464,6 +1500,21 @@ async function handle(msg) {
1464
1500
  const name = params.name;
1465
1501
  if (!AVAILABLE_TOOLS.some((t) => t.name === name)) return rpcErr(id, -32602, `Unknown tool: ${name}`);
1466
1502
  try {
1503
+ if (SHARED_COMPUTER_TOOL_NAMES.has(name) && !SHARED_COMPUTERS_ENABLED) {
1504
+ textResult(id, "Computer sharing is turned off in this workspace. There are no shared computers to use.", true);
1505
+ return;
1506
+ }
1507
+ if (name === "list_shared_computers") {
1508
+ textResult(id, JSON.stringify(await api("/api/internal/shared-computers")));
1509
+ return;
1510
+ }
1511
+ if (name === "shared_computer") {
1512
+ const response = await api("/api/internal/shared-computers", { method: "POST", body: JSON.stringify(params.arguments ?? {}) });
1513
+ const result = response.result;
1514
+ if (Array.isArray(result?.content)) ok(id, result);
1515
+ else textResult(id, JSON.stringify(result));
1516
+ return;
1517
+ }
1467
1518
  const { text, isError } = await callTool(name, params.arguments ?? {});
1468
1519
  textResult(id, text, isError);
1469
1520
  } catch (e) {