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
@@ -1,7 +1,59 @@
1
1
  // What a tool call is about to do, in words a chip or a permission card can
2
2
  // show. Redacted before it is cut: a command line is where credentials get
3
3
  // pasted, and a key sliced in half would slip past the shapes redaction knows.
4
- import { redactSecretsInText } from "./redact.js";
4
+ import { redactSecrets, redactSecretsInText } from "./redact.js";
5
+ /** Display-only excerpt, never the raw protocol payload. Bound traversal and
6
+ * omit binary bodies before redacting; truncate only AFTER redaction so a
7
+ * credential cannot be cut in half and escape detection. */
8
+ export function toolDetailPreview(value) {
9
+ if (value === undefined)
10
+ return undefined;
11
+ let budget = 200;
12
+ let textBudget = 256_000;
13
+ const bounded = (item, depth = 0) => {
14
+ if (--budget < 0 || depth > 6)
15
+ return "[additional data omitted]";
16
+ if (typeof item === "string") {
17
+ if (item.length > textBudget)
18
+ return "[large content omitted]";
19
+ if (/^data:[^,\s]+;base64,/i.test(item))
20
+ return "[binary content omitted]";
21
+ // MCP frequently puts JSON inside text content. Recover its field
22
+ // names so short credentials get the same masking as native objects.
23
+ if (/^\s*[[{]/.test(item)) {
24
+ try {
25
+ return bounded(JSON.parse(item), depth + 1);
26
+ }
27
+ catch { /* ordinary text/code: use the content redactor below */ }
28
+ }
29
+ textBudget -= item.length;
30
+ return item;
31
+ }
32
+ if (typeof item === "bigint")
33
+ return String(item);
34
+ if (item === null || typeof item !== "object")
35
+ return item;
36
+ if (Array.isArray(item))
37
+ return item.slice(0, 40).map((child) => bounded(child, depth + 1)).concat(item.length > 40 ? ["[additional items omitted]"] : []);
38
+ const entries = Object.entries(item);
39
+ const result = Object.create(null);
40
+ for (const [key, child] of entries.slice(0, 40)) {
41
+ result[key] = /token|secret|password|passwd|cookie|authorization|api.?key|(^|[_.-])keys?$/i.test(key)
42
+ ? "[redacted]"
43
+ : /^(data|base64|blob)$/i.test(key) && typeof child === "string"
44
+ ? "[binary content omitted]"
45
+ : bounded(child, depth + 1);
46
+ }
47
+ if (entries.length > 40)
48
+ result["…"] = "[additional fields omitted]";
49
+ return result;
50
+ };
51
+ const safe = redactSecrets(bounded(value));
52
+ const text = typeof safe === "string" ? safe : JSON.stringify(safe, null, 2);
53
+ if (!text?.trim() || text === "{}" || text === "[]")
54
+ return undefined;
55
+ return text.length > 6_000 ? `${text.slice(0, 6_000)}\n[… preview shortened]` : text;
56
+ }
5
57
  const QUESTION_LIMIT = 300;
6
58
  const LIMIT = 200;
7
59
  function fieldsOf(input) {
@@ -23,6 +23,7 @@ const ID = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}
23
23
  const EXCLUDED = new Set([
24
24
  ".backups", "tools", "cache", ".cache", "tmp", ".tmp", "dist-native", "tunnel-runtime",
25
25
  ".openmausbot-server-child", "environment-id", "sessions.json", "tunnel-account.json",
26
+ "team-computers.json",
26
27
  "openmausbot-server.lease", "box-create-requests.lock", "messages.db-wal", "messages.db-shm",
27
28
  ]);
28
29
  const EXCLUSION_NOTES = [
@@ -34,7 +34,10 @@ export function isApprovalMode(value) {
34
34
  * behavior: autoApprove=true is safe Auto; everything else asks. Unknown
35
35
  * persisted values also fail closed to that legacy behavior. */
36
36
  export function approvalModeFor(bot) {
37
- if (bot.approvalGrant)
37
+ const grant = bot.approvalGrant;
38
+ const otherThread = grant && typeof grant === "object" && "threadOnly" in grant && grant.threadOnly === true &&
39
+ "threadId" in grant && typeof grant.threadId === "string" && typeof bot.threadId === "string" && grant.threadId !== bot.threadId;
40
+ if (grant && !otherThread)
38
41
  return "ask";
39
42
  if (isApprovalMode(bot.approvalMode))
40
43
  return bot.approvalMode;
@@ -0,0 +1 @@
1
+ export {};
@@ -15112,7 +15112,11 @@ var featureConfigSchema = external_exports.object({
15112
15112
  showToolCalls: external_exports.boolean().optional(),
15113
15113
  /** Experimental built-in browser. Off until explicitly enabled; each bot
15114
15114
  * also has its own switch. */
15115
- browser: external_exports.boolean().optional()
15115
+ browser: external_exports.boolean().optional(),
15116
+ /** Opt-in computer sharing (a desktop lending folders, a terminal or
15117
+ * computer control to a workspace). Off until explicitly enabled; there is
15118
+ * no Settings toggle — see sharedComputersEnabled. */
15119
+ sharedComputers: external_exports.boolean().optional()
15116
15120
  });
15117
15121
  var onboardingConfigSchema = external_exports.object({
15118
15122
  /** ISO timestamp of finishing (or skipping to the end of) the welcome flow. */
@@ -23,8 +23,11 @@ customer, because the key decides the feature set rather than the code.
23
23
  { "edition": "oss", "features": [], "notice": "OMB_LICENSE_KEY expired on 2027-09-02; renew it to keep enterprise features" }
24
24
  ```
25
25
 
26
- A missing, altered, or expired key never stops the server: it runs the
27
- open-source edition and the notice says what to fix.
26
+ A missing, altered, or expired key does not stop an ordinary standalone
27
+ server: it runs the open-source edition and the notice says what to fix.
28
+ A workspace explicitly configured for hosted sign-in fails closed for remote
29
+ access when its `admin` entitlement or identity service is unavailable. It
30
+ must not silently fall back to standalone email or pairing credentials.
28
31
 
29
32
  ## Entitlement ids
30
33
 
@@ -32,7 +35,7 @@ open-source edition and the notice says what to fix.
32
35
  |---|---|
33
36
  | `whitelabel` | product name, tagline, accent colour, logo, favicon and support link from `brand.json` (below) |
34
37
  | `sso` | identity-header trust behind an OIDC proxy |
35
- | `admin` | the admin panel routes |
38
+ | `admin` | Settings → Workspaces and the optional hosted workspace sign-in adapter |
36
39
  | `budgets` | per-bot and per-section spend limits |
37
40
 
38
41
  Core gates a feature with `entitled("id")` from `server/enterprise.ts`.
@@ -59,6 +62,21 @@ working until they expire.
59
62
  - Customer-specific brand, skills, packages, connectors? The customer's own
60
63
  repo: data and config, never a fork.
61
64
 
65
+ ## Hosted workspace sign-in (`admin`)
66
+
67
+ The workspace-side adapter in `server/workspace-access.ts` connects to an
68
+ independently deployed identity service over HTTPS. The service's console,
69
+ invitations, provider gateway and deployment automation are not shipped in
70
+ this repository. The desktop and ordinary self-hosted server do not start
71
+ or depend on a hosted console.
72
+
73
+ Operators opt a workspace into this protocol using `OMB_ADMIN_URL`,
74
+ `OMB_ADMIN_WORKSPACE` and `OMB_PUBLIC_URL`; a valid `admin` entitlement is
75
+ required. The default keeps the local sign-in allow-list as an additional,
76
+ narrowing check. Operators may explicitly delegate membership for verified
77
+ portal sessions with `OMB_ADMIN_MEMBERSHIP=portal`; this never exempts ordinary
78
+ email or pairing sessions. See the [protocol and isolated verification recipe](../docs/verification/hosted-workspaces.md).
79
+
62
80
  ## White-label (`whitelabel`)
63
81
 
64
82
  Put a `brand.json` in the server's data dir (`OMB_DATA_DIR`, the `/data`