openmausbot 0.1.72 → 0.1.74

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 (36) hide show
  1. package/dist/assets/index-BRLHsQ5g.js +298 -0
  2. package/dist/assets/index-ByLQ7a3F.css +1 -0
  3. package/dist/assets/{index-Bpai86ua.js → index-CwoQdM0z.js} +1 -1
  4. package/dist/index.html +2 -2
  5. package/dist-server/container-mcp.js +9 -0
  6. package/dist-server/drivers/agents-proxy.js +2 -2
  7. package/dist-server/index.js +721 -484
  8. package/dist-server/mcp-gate.js +58 -16
  9. package/dist-server/openmausbot.js +236 -80
  10. package/dist-server/pair-cli.js +236 -80
  11. package/dist-server/server/auto-approve.js +30 -206
  12. package/dist-server/server/channel-queue.js +20 -2
  13. package/dist-server/server/config.js +36 -1
  14. package/dist-server/server/drivers/acp/core.js +56 -3
  15. package/dist-server/server/drivers/acp/grok.js +3 -1
  16. package/dist-server/server/drivers/agents-proxy.js +2 -2
  17. package/dist-server/server/drivers/antigravity-acp.js +5 -4
  18. package/dist-server/server/drivers/antigravity.js +9 -4
  19. package/dist-server/server/drivers/claude.js +54 -11
  20. package/dist-server/server/drivers/codex.js +86 -27
  21. package/dist-server/server/engine-install.js +9 -5
  22. package/dist-server/server/index.js +210 -231
  23. package/dist-server/server/message-db.js +70 -3
  24. package/dist-server/server/procs.js +82 -23
  25. package/dist-server/server/routines.js +67 -8
  26. package/dist-server/server/steer-queue.js +27 -7
  27. package/dist-server/server/team-manifest.js +1 -1
  28. package/dist-server/server/vps-computer.js +81 -12
  29. package/dist-server/server/webhooks.js +4 -1
  30. package/dist-server/server/workspace-backup.js +24 -9
  31. package/dist-server/shared/approval-mode.js +11 -10
  32. package/dist-server/vps-container-mcp.js +9 -0
  33. package/package.json +1 -1
  34. package/dist/assets/index-BFPYw6P-.js +0 -296
  35. package/dist/assets/index-D1odUdTi.css +0 -1
  36. package/dist-server/server/auto-review.js +0 -79
@@ -32,7 +32,7 @@ const EXCLUSION_NOTES = [
32
32
  "External project folders, CLI login homes, browser session homes, OS keychains, companion devices and other servers.",
33
33
  "VM/container disk layers and remote cloud data; durable files inside this workspace are included.",
34
34
  ];
35
- const RESTORE_WARNING = "Restoring pauses routines, webhooks and calendar calls, and does not resume pending delegations or queued runs. Definitions and historical receipts are retained; review before enabling them again.";
35
+ const RESTORE_WARNING = "Restoring pauses routines, webhooks and calendar calls, and does not resume pending delegations, queued chat messages or queued runs. Definitions and historical receipts are retained; review before enabling them again.";
36
36
  function excluded(name) {
37
37
  return EXCLUDED.has(name) || excludedWorkspaceAuthPath(name) || name.startsWith("openmausbot-server.lease.") || name.startsWith("box-create-requests.lock.") || /^perm-[A-Za-z0-9_-]+\.sock$/.test(name);
38
38
  }
@@ -887,17 +887,32 @@ function prepareRestore(dataDir, id, manifest) {
887
887
  });
888
888
  }
889
889
  const dbPath = join(prepared, "messages.db");
890
- if (existsSync(dbPath) && manifest.sourceDataDir !== resolve(dataDir)) {
890
+ if (existsSync(dbPath)) {
891
891
  const db = new DatabaseSync(dbPath);
892
892
  try {
893
- const update = db.prepare("UPDATE messages SET json = ?, text = ? WHERE thread_id = ? AND id = ?");
894
893
  db.exec("BEGIN");
895
- for (const row of db.prepare("SELECT thread_id, id, json FROM messages").iterate()) {
896
- const message = JSON.parse(String(row.json));
897
- rebaseMessage(message, manifest.sourceDataDir, resolve(dataDir));
898
- const json = JSON.stringify(message);
899
- if (json !== row.json)
900
- update.run(json, record(message) && typeof message.text === "string" ? message.text : null, row.thread_id, row.id);
894
+ if (manifest.sourceDataDir !== resolve(dataDir)) {
895
+ const update = db.prepare("UPDATE messages SET json = ?, text = ? WHERE thread_id = ? AND id = ?");
896
+ for (const row of db.prepare("SELECT thread_id, id, json FROM messages").iterate()) {
897
+ const message = JSON.parse(String(row.json));
898
+ rebaseMessage(message, manifest.sourceDataDir, resolve(dataDir));
899
+ const json = JSON.stringify(message);
900
+ if (json !== row.json)
901
+ update.run(json, record(message) && typeof message.text === "string" ? message.text : null, row.thread_id, row.id);
902
+ }
903
+ }
904
+ // Import is not a server restart: the source may still be running.
905
+ // Keep accepted words/receipts for review, but never execute a copy of
906
+ // its pending work (including when restoring to the original home).
907
+ if (db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'chat_followups'").get()) {
908
+ const pause = db.prepare("UPDATE chat_followups SET status = 'interrupted', payload = ? WHERE id = ?");
909
+ for (const row of db.prepare("SELECT id, payload FROM chat_followups WHERE status IN ('pending', 'dispatching', 'interrupted')").iterate()) {
910
+ const payload = JSON.parse(String(row.payload));
911
+ rebaseMessage(payload, manifest.sourceDataDir, resolve(dataDir));
912
+ if (record(payload))
913
+ delete payload.prompt;
914
+ pause.run(JSON.stringify(payload), row.id);
915
+ }
901
916
  }
902
917
  db.exec("COMMIT");
903
918
  }
@@ -1,9 +1,17 @@
1
- /** The four approval levels exposed by the desktop app. */
2
- export const APPROVAL_MODES = ["ask", "auto", "full", "custom"];
3
- /** Only providers with an implemented permission mapping may expose elevation. */
1
+ /** The approval levels exposed by the app. Each one is a provider's own
2
+ * permission mode, passed through: OpenMausBot never decides a permission
3
+ * itself (Full access aside, which answers residual prompts because that is
4
+ * what the person granted). The order is the order the selector shows. */
5
+ export const APPROVAL_MODES = ["ask", "edits", "auto", "full", "custom"];
6
+ /** Only providers with an implemented permission mapping may expose a level.
7
+ * `edits` (auto-accept edits) exists where the engine has such a mode:
8
+ * Claude and Grok `acceptEdits`, Antigravity `auto_edit`. Codex's Ask already
9
+ * runs `workspace-write`, so an edits level would change nothing there. */
4
10
  export function supportsApprovalMode(driverKind, mode) {
5
11
  if (mode === "custom")
6
12
  return driverKind === "codex";
13
+ if (mode === "edits")
14
+ return ["claudeAgent", "grokAgent", "antigravityAgent"].includes(driverKind ?? "");
7
15
  if (mode !== "full")
8
16
  return true;
9
17
  return ["codex", "claudeAgent", "antigravityAgent", "cursorAgent", "grokAgent", "opencodeGo"].includes(driverKind ?? "");
@@ -11,13 +19,6 @@ export function supportsApprovalMode(driverKind, mode) {
11
19
  export function hasNativeAutoReview(driverKind) {
12
20
  return ["codex", "claudeAgent", "cursorAgent", "grokAgent"].includes(driverKind ?? "");
13
21
  }
14
- /** A native reviewer has already declined to decide, or Auto has no native
15
- * equivalent. Never second-guess that request with the app's heuristic rules.
16
- * Antigravity and OpenCode Full approve residual ACP tool-permission requests
17
- * through the app's explicit Full-access grant. Questions remain interactive. */
18
- export function requiresNativeApproval(driverKind, mode) {
19
- return mode === "auto" || (mode === "full" && ["claudeAgent", "cursorAgent", "grokAgent"].includes(driverKind));
20
- }
21
22
  export function isApprovalMode(value) {
22
23
  return typeof value === "string" && APPROVAL_MODES.includes(value);
23
24
  }
@@ -15114,6 +15114,14 @@ var featureConfigSchema = external_exports.object({
15114
15114
  * also has its own switch. */
15115
15115
  browser: external_exports.boolean().optional()
15116
15116
  });
15117
+ var onboardingConfigSchema = external_exports.object({
15118
+ /** ISO timestamp of finishing (or skipping to the end of) the welcome flow. */
15119
+ completedAt: external_exports.string().trim().max(40).optional(),
15120
+ /** Which welcome flow was completed; a newer flow may re-show itself. */
15121
+ version: external_exports.number().int().min(0).max(1e3).optional(),
15122
+ reelSeen: external_exports.boolean().optional(),
15123
+ hintsSeen: external_exports.array(external_exports.string().trim().min(1).max(60)).max(100).optional()
15124
+ }).strict();
15117
15125
  var instanceConfigSchema = external_exports.object({
15118
15126
  driver: external_exports.string().min(1),
15119
15127
  displayName: optionalText,
@@ -15207,6 +15215,7 @@ var appConfigSchema = external_exports.object({
15207
15215
  threads: external_exports.object({ maxConcurrentPerBot: external_exports.number().int().min(1).max(MAX_CONCURRENT_BOT_THREADS) }).strict().optional(),
15208
15216
  localVm: localVmConfigSchema.optional(),
15209
15217
  features: featureConfigSchema.optional(),
15218
+ onboarding: onboardingConfigSchema.optional(),
15210
15219
  browserProfiles: browserProfilesSchema.optional(),
15211
15220
  instances: instanceConfigMapSchema.optional(),
15212
15221
  /** User-configured MCP servers, mounted into every capable engine. Kept
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmausbot",
3
- "version": "0.1.72",
3
+ "version": "0.1.74",
4
4
  "description": "Run the OpenMausBot server anywhere and pair your devices to it",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",