openmausbot 0.1.91 → 0.1.93

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 (164) hide show
  1. package/dist/assets/DesktopViewer-CKNR3SEW.js +5 -0
  2. package/dist/assets/{abnfDiagram-O67JEVCF-yP-w8pRq.js → abnfDiagram-O67JEVCF-Ckrm1I1X.js} +1 -1
  3. package/dist/assets/{arc-DsivfZEh.js → arc-BBdBuCgB.js} +1 -1
  4. package/dist/assets/{architectureDiagram-NJMV4G6O-CILw7lzT.js → architectureDiagram-NJMV4G6O-CDdA3Hjs.js} +1 -1
  5. package/dist/assets/{blockDiagram-BEXU5L5S-DEQUV3HF.js → blockDiagram-BEXU5L5S-AUrsx1YR.js} +1 -1
  6. package/dist/assets/{c4Diagram-YGBWAQC7-lSXCZoKA.js → c4Diagram-YGBWAQC7-BEqQ0Unh.js} +1 -1
  7. package/dist/assets/channel-BU94VpxE.js +1 -0
  8. package/dist/assets/{chunk-2Q5K7J3B-QCD5bgWP.js → chunk-2Q5K7J3B-CEEuvd4C.js} +1 -1
  9. package/dist/assets/{chunk-3FUC2YCW-C5-iZJuL.js → chunk-3FUC2YCW-DyANCiHl.js} +2 -2
  10. package/dist/assets/{chunk-5VM5RSS4-cxsawMpY.js → chunk-5VM5RSS4-Dx_Slpw9.js} +1 -1
  11. package/dist/assets/{chunk-GTNCS2PH-DV8tV8H7.js → chunk-GTNCS2PH-Dl7h7iiD.js} +1 -1
  12. package/dist/assets/{chunk-GWA4HPMP-CJFZyfbW.js → chunk-GWA4HPMP-BLx07SPb.js} +1 -1
  13. package/dist/assets/{chunk-JWPE2WC7-BigbMXco.js → chunk-JWPE2WC7-BMxDj3n7.js} +1 -1
  14. package/dist/assets/{chunk-NETBCI7D-oVxTfpDy.js → chunk-NETBCI7D-CN66PT4H.js} +1 -1
  15. package/dist/assets/{chunk-WEXAMYUT-CH4BiroW.js → chunk-WEXAMYUT-6HwhsDKw.js} +1 -1
  16. package/dist/assets/{chunk-XXDRQBXY-KEDa6gax.js → chunk-XXDRQBXY-gWnLt7SN.js} +1 -1
  17. package/dist/assets/{classDiagram-v2-NBCMYWYE-BiPjfqVv.js → classDiagram-v2-NBCMYWYE-CMS5l2ea.js} +1 -1
  18. package/dist/assets/{cose-bilkent-JH36ORCC-Caxew3OY.js → cose-bilkent-JH36ORCC-CV7sQwIG.js} +1 -1
  19. package/dist/assets/{cynefin-OW5HDTMX-B_Pui369.js → cynefin-OW5HDTMX-CSyl-7vl.js} +1 -1
  20. package/dist/assets/{cynefinDiagram-VND7K2PF-X64ydIhP.js → cynefinDiagram-VND7K2PF-BCLKL6az.js} +1 -1
  21. package/dist/assets/{dagre-6A5THRUB-TqYCI1E1.js → dagre-6A5THRUB-DiaZs6S1.js} +1 -1
  22. package/dist/assets/{diagram-22UHCM2B-TeOt3rAQ.js → diagram-22UHCM2B-BeTtmt3I.js} +1 -1
  23. package/dist/assets/{diagram-3UASUU5V-D70BLhDA.js → diagram-3UASUU5V-CsdBG-QQ.js} +1 -1
  24. package/dist/assets/{diagram-ATOU4E4O-BbQDLwUC.js → diagram-ATOU4E4O-BczvdbR1.js} +1 -1
  25. package/dist/assets/{diagram-CDSNMT55-ChNJZ1u-.js → diagram-CDSNMT55-DHTTTMhi.js} +1 -1
  26. package/dist/assets/{diagram-MLGK6HIB-DMBl2APa.js → diagram-MLGK6HIB-RTjHyd8z.js} +1 -1
  27. package/dist/assets/{diagram-MPIPVDR6-CEqDchOp.js → diagram-MPIPVDR6-BDenHEH_.js} +1 -1
  28. package/dist/assets/{ebnfDiagram-ZINNZB2B-BVDKRp_-.js → ebnfDiagram-ZINNZB2B-BSiRSbtL.js} +1 -1
  29. package/dist/assets/{elk-276RUBZZ-CRkofO9B.js → elk-276RUBZZ-BCAElss-.js} +1 -1
  30. package/dist/assets/{erDiagram-OPXOYQCR-DruOMh5e.js → erDiagram-OPXOYQCR-C4_1ZPJe.js} +1 -1
  31. package/dist/assets/{flowDiagram-KWPJA3E3-8GMQeB7t.js → flowDiagram-KWPJA3E3-Bcb4Z75S.js} +1 -1
  32. package/dist/assets/{ganttDiagram-FUAMR5RP-ORE9jcsM.js → ganttDiagram-FUAMR5RP-BiPOzxzb.js} +1 -1
  33. package/dist/assets/{gitGraphDiagram-X574FWY7-BmsedsWh.js → gitGraphDiagram-X574FWY7-B1wtF3ZS.js} +1 -1
  34. package/dist/assets/index-Biji-bfL.css +1 -0
  35. package/dist/assets/{index-DKNEM8Q6.js → index-BkYwilkG.js} +1 -1
  36. package/dist/assets/index-DZlhoES0.js +597 -0
  37. package/dist/assets/{infoDiagram-VRGFBTTK-E_p7AooJ.js → infoDiagram-VRGFBTTK-A19No71U.js} +1 -1
  38. package/dist/assets/{ishikawaDiagram-OU5B5YK6-Y-B2mKda.js → ishikawaDiagram-OU5B5YK6-BQsqJ_cV.js} +1 -1
  39. package/dist/assets/{journeyDiagram-ZHPQQLJL-eA8RELcK.js → journeyDiagram-ZHPQQLJL-DAO0pVan.js} +1 -1
  40. package/dist/assets/{kanban-definition-PNTS6WVX-DqIL2e8e.js → kanban-definition-PNTS6WVX-NepmKEe2.js} +1 -1
  41. package/dist/assets/{linear-yC_29R6e.js → linear-bq1PTDTW.js} +1 -1
  42. package/dist/assets/{mermaid.core-VhEMkSND.js → mermaid.core-s4LTbQle.js} +5 -5
  43. package/dist/assets/{mindmap-definition-NLK3R4M7-oJ7kyQZy.js → mindmap-definition-NLK3R4M7-LtdbgHFH.js} +1 -1
  44. package/dist/assets/{pegDiagram-GJSIUBJH-BmfYcY0O.js → pegDiagram-GJSIUBJH-tdbaCxiK.js} +1 -1
  45. package/dist/assets/{pieDiagram-5QR66LMP-DKvgP7w9.js → pieDiagram-5QR66LMP-DvkbpW8l.js} +1 -1
  46. package/dist/assets/{quadrantDiagram-O4NWA36T-BEKL3W0L.js → quadrantDiagram-O4NWA36T-Do4KaH-E.js} +1 -1
  47. package/dist/assets/{railroadDiagram-XR7U4H2S-BEsiqR5s.js → railroadDiagram-XR7U4H2S-BQWULOAs.js} +1 -1
  48. package/dist/assets/{requirementDiagram-PLB6GJNP-DWBcWvAP.js → requirementDiagram-PLB6GJNP-w9kei1FU.js} +1 -1
  49. package/dist/assets/{sankeyDiagram-IPEJSGJF-rpZ2_O4s.js → sankeyDiagram-IPEJSGJF-D2gRy0e8.js} +1 -1
  50. package/dist/assets/{sequenceDiagram-PO4LG4MO-B99HQdJR.js → sequenceDiagram-PO4LG4MO-a2sO5_Eo.js} +1 -1
  51. package/dist/assets/{sizeCapture-INFHLROL-BjN0qT5T.js → sizeCapture-INFHLROL-CiPJmFEB.js} +1 -1
  52. package/dist/assets/{stateDiagram-v2-GCMORJYK-BbsVgGsC.js → stateDiagram-v2-GCMORJYK-DAkUUlL7.js} +1 -1
  53. package/dist/assets/{swimlanes-2SLR337P-DG3gKkeR.js → swimlanes-2SLR337P-DANf2R8Y.js} +1 -1
  54. package/dist/assets/swimlanesDiagram-TC7HE7FX-CdHxG8aM.js +8 -0
  55. package/dist/assets/{timeline-definition-EJHVYXUP-BTHOdtF_.js → timeline-definition-EJHVYXUP-BKpQmzrT.js} +1 -1
  56. package/dist/assets/{usecaseDiagram-POWQR4AR-acLSLFwc.js → usecaseDiagram-POWQR4AR-BtI7qLN-.js} +1 -1
  57. package/dist/assets/{vennDiagram-UO4OBE2U-C5JzNX9G.js → vennDiagram-UO4OBE2U-gXJXrAG_.js} +1 -1
  58. package/dist/assets/{wardleyDiagram-VNRHLVJA-DL1-PrR_.js → wardleyDiagram-VNRHLVJA-GU8Po5-n.js} +1 -1
  59. package/dist/assets/{xychartDiagram-PMCCYNJV-Bvr1477p.js → xychartDiagram-PMCCYNJV-BF4J30g6.js} +1 -1
  60. package/dist/index.html +2 -2
  61. package/dist/novnc-NOTICE.txt +118 -0
  62. package/dist-server/cloud-home-start.js +112 -14
  63. package/dist-server/companion/src/routes.js +24 -1
  64. package/dist-server/container-mcp.js +201 -16
  65. package/dist-server/drivers/agents-proxy.js +7 -4
  66. package/dist-server/enterprise/server/index.js +5 -1
  67. package/dist-server/index.js +10698 -4737
  68. package/dist-server/local-computer-proxy.js +133 -8
  69. package/dist-server/mcp-gate.js +16 -6
  70. package/dist-server/model-catalog/models-dev.snapshot.json +7299 -0
  71. package/dist-server/openmausbot.js +4656 -1258
  72. package/dist-server/pair-cli.js +4656 -1258
  73. package/dist-server/server/boat.js +5 -5
  74. package/dist-server/server/browser-engine.js +10 -1
  75. package/dist-server/server/browser-live.js +46 -2
  76. package/dist-server/server/browser-runtime.js +74 -8
  77. package/dist-server/server/browser-tool-shape.js +6 -4
  78. package/dist-server/server/chief-of-staff.js +1 -1
  79. package/dist-server/server/cloud-home-start.js +118 -26
  80. package/dist-server/server/cloud-home.js +39 -3
  81. package/dist-server/server/cloud-lending.js +74 -10
  82. package/dist-server/server/cloud-owner.js +196 -0
  83. package/dist-server/server/cloud-secrets-boot.js +6 -0
  84. package/dist-server/server/cloud-secrets.js +65 -0
  85. package/dist-server/server/computer-control.js +6 -0
  86. package/dist-server/server/config.js +187 -14
  87. package/dist-server/server/container-computer.js +46 -34
  88. package/dist-server/server/desktop-viewer-targets.js +26 -0
  89. package/dist-server/server/digest.js +12 -2
  90. package/dist-server/server/drivers/acp/core.js +339 -33
  91. package/dist-server/server/drivers/acp/cursor.js +13 -1
  92. package/dist-server/server/drivers/acp/opencode-go.js +614 -85
  93. package/dist-server/server/drivers/acp/quiet-status.js +257 -0
  94. package/dist-server/server/drivers/acp/qwen.js +18 -0
  95. package/dist-server/server/drivers/agents-catalog.js +6 -6
  96. package/dist-server/server/drivers/antigravity-acp.js +69 -11
  97. package/dist-server/server/drivers/antigravity-temp.js +360 -0
  98. package/dist-server/server/drivers/antigravity.js +21 -0
  99. package/dist-server/server/drivers/builtIn.js +2 -0
  100. package/dist-server/server/drivers/cerebras.js +108 -0
  101. package/dist-server/server/drivers/chat-mcp-tools.js +20 -3
  102. package/dist-server/server/drivers/chatgpt-plan-auth.js +481 -0
  103. package/dist-server/server/drivers/claude.js +329 -37
  104. package/dist-server/server/drivers/codex.js +228 -18
  105. package/dist-server/server/drivers/grok.js +2 -2
  106. package/dist-server/server/drivers/mistral.js +4 -3
  107. package/dist-server/server/drivers/openai-chat-protocol.js +4 -3
  108. package/dist-server/server/drivers/openai-chat.js +66 -4
  109. package/dist-server/server/drivers/openai-compat.js +73 -23
  110. package/dist-server/server/drivers/prompt-split.js +2 -0
  111. package/dist-server/server/engine-install.js +46 -12
  112. package/dist-server/server/env-path.js +21 -5
  113. package/dist-server/server/harness/registry.js +2 -2
  114. package/dist-server/server/index.js +1545 -238
  115. package/dist-server/server/lending-memory.js +479 -0
  116. package/dist-server/server/local-vm-idle.js +24 -6
  117. package/dist-server/server/local-vm-stop-reason.js +26 -0
  118. package/dist-server/server/managed-desktop.js +3 -0
  119. package/dist-server/server/mcp-bridge.js +5 -3
  120. package/dist-server/server/mcp-http.js +6 -3
  121. package/dist-server/server/mcp-oauth-discovery.js +133 -0
  122. package/dist-server/server/mcp-oauth-store.js +70 -0
  123. package/dist-server/server/mcp-oauth.js +550 -0
  124. package/dist-server/server/mcp-probe.js +14 -1
  125. package/dist-server/server/mcp-registry.js +43 -0
  126. package/dist-server/server/memory-upkeep.js +94 -84
  127. package/dist-server/server/model-catalog/catalog.js +374 -0
  128. package/dist-server/server/model-catalog/presets.js +176 -0
  129. package/dist-server/server/model-catalog/trim.js +219 -0
  130. package/dist-server/server/provider-key-check.js +5 -2
  131. package/dist-server/server/recent-work.js +1 -1
  132. package/dist-server/server/request-auth.js +23 -0
  133. package/dist-server/server/routes/antigravity-leftovers.js +45 -0
  134. package/dist-server/server/routes/bot-memory.js +31 -6
  135. package/dist-server/server/routes/desktop-viewer.js +238 -0
  136. package/dist-server/server/routine-requests.js +1 -1
  137. package/dist-server/server/routines.js +6 -3
  138. package/dist-server/server/sessions.js +56 -9
  139. package/dist-server/server/skills.js +25 -10
  140. package/dist-server/server/store.js +116 -122
  141. package/dist-server/server/thread-events.js +2 -0
  142. package/dist-server/server/thread-starters.js +33 -0
  143. package/dist-server/server/thread-title.js +46 -0
  144. package/dist-server/server/tts/fish.js +4 -5
  145. package/dist-server/server/tts/index.js +5 -3
  146. package/dist-server/server/vps-computer.js +80 -13
  147. package/dist-server/server/webhooks.js +18 -1
  148. package/dist-server/server/workspace-backup-policy.js +3 -0
  149. package/dist-server/server/workspace-backup.js +25 -0
  150. package/dist-server/server/workspace.js +66 -16
  151. package/dist-server/shared/approval-mode.js +1 -1
  152. package/dist-server/shared/redact.js +1 -0
  153. package/dist-server/shared/tool-name.js +22 -0
  154. package/dist-server/shared/workspace-backup-client.js +1 -0
  155. package/dist-server/src/lib/citations.js +177 -0
  156. package/dist-server/src/lib/composer-attachments.js +7 -1
  157. package/dist-server/vps-container-mcp.js +202 -16
  158. package/dist-server/workspace-backup.worker.js +87 -9
  159. package/enterprise/server/index.js +5 -1
  160. package/package.json +1 -1
  161. package/dist/assets/channel-DrfGMu7X.js +0 -1
  162. package/dist/assets/index-BlnCEcU6.js +0 -588
  163. package/dist/assets/index-DVxjOvID.css +0 -1
  164. package/dist/assets/swimlanesDiagram-TC7HE7FX-BCZhxl7e.js +0 -8
@@ -0,0 +1,118 @@
1
+ noVNC 1.7.0
2
+ Copyright (C) 2022 The noVNC authors
3
+
4
+ OpenMausBot bundles the unmodified noVNC core library under the Mozilla
5
+ Public License 2.0 (MPL-2.0). The corresponding source, including its
6
+ original copyright and license notices, is available at:
7
+ https://github.com/novnc/noVNC/tree/v1.7.0
8
+
9
+ MPL-2.0 license: https://www.mozilla.org/MPL/2.0/
10
+ Authors: https://github.com/novnc/noVNC/blob/v1.7.0/AUTHORS
11
+
12
+ The bundled library also includes the following third-party components.
13
+ Their notices are reproduced below.
14
+
15
+ Pako (vendor/pako/LICENSE)
16
+ =========================
17
+
18
+ (The MIT License)
19
+
20
+ Copyright (C) 2014-2016 by Vitaly Puzrin
21
+
22
+ Permission is hereby granted, free of charge, to any person obtaining a copy
23
+ of this software and associated documentation files (the "Software"), to deal
24
+ in the Software without restriction, including without limitation the rights
25
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
26
+ copies of the Software, and to permit persons to whom the Software is
27
+ furnished to do so, subject to the following conditions:
28
+
29
+ The above copyright notice and this permission notice shall be included in
30
+ all copies or substantial portions of the Software.
31
+
32
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
38
+ THE SOFTWARE.
39
+
40
+ DES (core/crypto/des.js)
41
+ ========================
42
+
43
+ /*
44
+ * Ported from Flashlight VNC ActionScript implementation:
45
+ * http://www.wizhelp.com/flashlight-vnc/
46
+ *
47
+ * Full attribution follows:
48
+ *
49
+ * -------------------------------------------------------------------------
50
+ *
51
+ * This DES class has been extracted from package Acme.Crypto for use in VNC.
52
+ * The unnecessary odd parity code has been removed.
53
+ *
54
+ * These changes are:
55
+ * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
56
+ *
57
+ * This software is distributed in the hope that it will be useful,
58
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
59
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
60
+ *
61
+
62
+ * DesCipher - the DES encryption method
63
+ *
64
+ * The meat of this code is by Dave Zimmerman <dzimm@widget.com>, and is:
65
+ *
66
+ * Copyright (c) 1996 Widget Workshop, Inc. All Rights Reserved.
67
+ *
68
+ * Permission to use, copy, modify, and distribute this software
69
+ * and its documentation for NON-COMMERCIAL or COMMERCIAL purposes and
70
+ * without fee is hereby granted, provided that this copyright notice is kept
71
+ * intact.
72
+ *
73
+ * WIDGET WORKSHOP MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY
74
+ * OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
75
+ * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
76
+ * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. WIDGET WORKSHOP SHALL NOT BE LIABLE
77
+ * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
78
+ * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
79
+ *
80
+ * THIS SOFTWARE IS NOT DESIGNED OR INTENDED FOR USE OR RESALE AS ON-LINE
81
+ * CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE
82
+ * PERFORMANCE, SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT
83
+ * NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE
84
+ * SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE
85
+ * SOFTWARE COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE
86
+ * PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES"). WIDGET WORKSHOP
87
+ * SPECIFICALLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR
88
+ * HIGH RISK ACTIVITIES.
89
+ *
90
+ *
91
+ * The rest is:
92
+ *
93
+ * Copyright (C) 1996 by Jef Poskanzer <jef@acme.com>. All rights reserved.
94
+ *
95
+ * Redistribution and use in source and binary forms, with or without
96
+ * modification, are permitted provided that the following conditions
97
+ * are met:
98
+ * 1. Redistributions of source code must retain the above copyright
99
+ * notice, this list of conditions and the following disclaimer.
100
+ * 2. Redistributions in binary form must reproduce the above copyright
101
+ * notice, this list of conditions and the following disclaimer in the
102
+ * documentation and/or other materials provided with the distribution.
103
+ *
104
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
105
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
106
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
107
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
108
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
109
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
110
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
111
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
112
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
113
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
114
+ * SUCH DAMAGE.
115
+ *
116
+ * Visit the ACME Labs Java page for up-to-date versions of this and other
117
+ * fine Java utilities: http://www.acme.com/java/
118
+ */
@@ -14635,10 +14635,26 @@ var sessionSchema = external_exports.object({
14635
14635
  userId: external_exports.string().max(256).optional(),
14636
14636
  email: external_exports.string().max(320).optional(),
14637
14637
  /** Set only by the internal verified-portal issuance path, never by email or pairing input. */
14638
- membershipAuthority: external_exports.literal("portal").optional()
14638
+ membershipAuthority: external_exports.literal("portal").optional(),
14639
+ /** A browser sign-in (PairingCode `browser`): accepted only as its browser's cookie, never as a bearer token. */
14640
+ cookieOnly: external_exports.literal(true).optional(),
14641
+ /** Whose OMB Cloud a browser sign-in signed in to (its PairingCode `owner`). */
14642
+ owner: external_exports.string().max(254).optional()
14639
14643
  });
14640
14644
  var fileSchema = external_exports.object({ version: external_exports.literal(1), sessions: external_exports.array(sessionSchema) });
14641
14645
 
14646
+ // server/cloud-secrets.ts
14647
+ var CLOUD_HOME_SECRET_KEYS = ["OMB_CLOUD_BOOTSTRAP_SECRET", "OMB_CLOUD_BOAT_TOKEN", "OMB_CLOUD_VOICE_TOKEN", "OMB_CLOUD_DECIDER_TOKEN"];
14648
+ var CLOUD_SECRETS_FD_ENV = "OMB_CLOUD_SECRETS_FD";
14649
+ function cloudHomeSecrets(env) {
14650
+ return Object.fromEntries(CLOUD_HOME_SECRET_KEYS.flatMap((key) => env[key] ? [[key, env[key]]] : []));
14651
+ }
14652
+ function withoutCloudSecrets(env) {
14653
+ const kept = { ...env };
14654
+ for (const key of CLOUD_HOME_SECRET_KEYS) delete kept[key];
14655
+ return kept;
14656
+ }
14657
+
14642
14658
  // server/cloud-home.ts
14643
14659
  var CLOUD_HOME_KEYS = ["OMB_CLOUD_ROLE", "OMB_CLOUD_MACHINE_ID", "OMB_CLOUD_ADMIN_URL", "OMB_CLOUD_BOOTSTRAP_SECRET"];
14644
14660
  var CLOUD_IGNORED_KEYS = ["OMB_HOSTED_MODEL_URL", "OMB_HOSTED_MODEL_TOKEN", "OMB_HOSTED_MODELS"];
@@ -14713,6 +14729,7 @@ function cloudHomeHost(config2) {
14713
14729
 
14714
14730
  // server/cloud-home-start.ts
14715
14731
  var SERVICE_USER = "maus";
14732
+ var SECRETS_FD = 3;
14716
14733
  function passwdIds(passwd, name) {
14717
14734
  for (const line of passwd.split("\n")) {
14718
14735
  const [user, , uid, gid] = line.split(":");
@@ -14720,15 +14737,50 @@ function passwdIds(passwd, name) {
14720
14737
  }
14721
14738
  return null;
14722
14739
  }
14740
+ var SERVER_ENV_NAMES = /* @__PURE__ */ new Set([
14741
+ "PATH",
14742
+ "SHELL",
14743
+ "HOSTNAME",
14744
+ "LANG",
14745
+ "LANGUAGE",
14746
+ "TZ",
14747
+ "TERM",
14748
+ "TMPDIR",
14749
+ "NO_COLOR",
14750
+ "NODE_ENV",
14751
+ "NODE_EXTRA_CA_CERTS",
14752
+ "SSL_CERT_FILE",
14753
+ "SSL_CERT_DIR",
14754
+ "AGENT_BROWSER_EXECUTABLE_PATH",
14755
+ "OMB_STATIC_DIR",
14756
+ "OMB_DATA_DIR",
14757
+ "OMB_CLOUD_ROLE",
14758
+ "OMB_CLOUD_MACHINE_ID",
14759
+ "OMB_CLOUD_ADMIN_URL",
14760
+ "OMB_CLOUD_IMAGE",
14761
+ "OMB_PUBLIC_URL",
14762
+ "OMB_WEBHOOK_PUBLIC_URL",
14763
+ "OMB_CLOUD_BOAT_URL",
14764
+ "OMB_CLOUD_VOICE_URL",
14765
+ "OMB_CLOUD_DECIDER_URL",
14766
+ "OMB_TTS_DEFAULT_VOICE"
14767
+ ]);
14768
+ function serverEnvironmentAllowed(name) {
14769
+ return SERVER_ENV_NAMES.has(name) || name.startsWith("LC_");
14770
+ }
14723
14771
  function cloudHomeChildEnvironments(config2, env, home) {
14772
+ const offered = withoutCloudSecrets(withoutIgnoredCloudKeys(env));
14773
+ const allowed = Object.fromEntries(Object.entries(offered).filter(([name, value]) => value !== void 0 && serverEnvironmentAllowed(name)));
14774
+ const dropped = Object.keys(offered).filter((name) => !serverEnvironmentAllowed(name) && name !== "HOME").sort();
14724
14775
  const server = {
14725
- ...withoutIgnoredCloudKeys(env),
14776
+ ...allowed,
14726
14777
  HOME: home,
14727
14778
  OMB_DATA_DIR: env.OMB_DATA_DIR || posix.join(home, ".openmausbot"),
14728
14779
  OMB_PORT: "8799",
14729
14780
  OMB_WEBHOOK_PORT: "8800",
14730
14781
  OMB_PUBLIC_URL: config2.publicOrigin,
14731
- OMB_WEBHOOK_PUBLIC_URL: env.OMB_WEBHOOK_PUBLIC_URL || config2.publicOrigin
14782
+ OMB_WEBHOOK_PUBLIC_URL: env.OMB_WEBHOOK_PUBLIC_URL || config2.publicOrigin,
14783
+ [CLOUD_SECRETS_FD_ENV]: String(SECRETS_FD)
14732
14784
  };
14733
14785
  const edge = {
14734
14786
  PATH: env.PATH ?? "/usr/local/bin:/usr/bin:/bin",
@@ -14737,7 +14789,33 @@ function cloudHomeChildEnvironments(config2, env, home) {
14737
14789
  XDG_CONFIG_HOME: "/tmp/omb-edge/config",
14738
14790
  OMB_CLOUD_PUBLIC_HOST: cloudHomeHost(config2)
14739
14791
  };
14740
- return { server, edge };
14792
+ return { server, edge, secrets: cloudHomeSecrets(env), dropped };
14793
+ }
14794
+ function codeTrustProblem(files, home, stat = statSync) {
14795
+ const volume = posix.join(home, "/");
14796
+ for (const file2 of files) {
14797
+ if (file2 === home || file2.startsWith(volume)) return `${file2} is on the volume`;
14798
+ for (let path = file2; ; path = dirname2(path)) {
14799
+ let owner;
14800
+ try {
14801
+ owner = stat(path);
14802
+ } catch {
14803
+ return `${path} cannot be checked`;
14804
+ }
14805
+ if (owner.uid !== 0) return `${path} is not root's`;
14806
+ if (owner.mode & 18 && !(path !== file2 && owner.mode & 512)) return `${path} is writable by others than root`;
14807
+ if (dirname2(path) === path) break;
14808
+ }
14809
+ }
14810
+ return null;
14811
+ }
14812
+ function spawnWithSecrets(command, args, env, secrets, ids) {
14813
+ const child = spawn(command, args, { env, stdio: ["inherit", "inherit", "inherit", "pipe"], ...ids ? { uid: ids.uid, gid: ids.gid } : {} });
14814
+ const pipe2 = child.stdio[SECRETS_FD];
14815
+ pipe2?.on("error", () => {
14816
+ });
14817
+ pipe2?.end(JSON.stringify(secrets));
14818
+ return child;
14741
14819
  }
14742
14820
  function serverExitAction(code, stopping, restarts) {
14743
14821
  return !stopping && code === CLOUD_HOME_RESTART_EXIT_CODE && restarts < 5 ? "restart" : "stop";
@@ -14748,19 +14826,33 @@ function startCloudHome(env = process.env) {
14748
14826
  if (!config2) throw new Error("This image runs an OMB Cloud home machine; set its boot contract (docs/cloud-pro.md).");
14749
14827
  for (const warning of config2.warnings) console.warn(`cloud home: ${warning}`);
14750
14828
  const home = env.HOME || "/data";
14829
+ let ids = null;
14751
14830
  if (process.getuid?.() === 0) {
14752
- const ids = passwdIds(readFileSync2("/etc/passwd", "utf8"), SERVICE_USER);
14831
+ ids = passwdIds(readFileSync2("/etc/passwd", "utf8"), SERVICE_USER);
14753
14832
  if (!ids) throw new Error(`The ${SERVICE_USER} user is missing from this image.`);
14754
14833
  const stat = statSync(home);
14755
14834
  if (stat.uid !== ids.uid || stat.gid !== ids.gid) chownSync(home, ids.uid, ids.gid);
14756
14835
  process.setgroups?.([]);
14757
- process.setgid(ids.gid);
14758
- process.setuid(ids.uid);
14836
+ process.setegid(ids.gid);
14837
+ process.seteuid(ids.uid);
14838
+ try {
14839
+ prepareCloudHomeVolume(home, config2.machineId);
14840
+ } finally {
14841
+ process.seteuid(0);
14842
+ process.setegid(0);
14843
+ }
14844
+ } else {
14845
+ prepareCloudHomeVolume(home, config2.machineId);
14759
14846
  }
14760
- if (process.getuid?.() === 0) throw new Error("The Cloud home must run as an unprivileged user.");
14761
- prepareCloudHomeVolume(home, config2.machineId);
14762
14847
  const here = dirname2(fileURLToPath2(import.meta.url));
14763
- const { server, edge } = cloudHomeChildEnvironments(config2, env, home);
14848
+ const edgeBin = env.OMB_CLOUD_EDGE_BIN || "/usr/local/bin/caddy";
14849
+ const edgeConfig = env.OMB_CLOUD_EDGE_CONFIG || "/app/cloud/Caddyfile";
14850
+ if (ids) {
14851
+ const problem = codeTrustProblem([process.execPath, fileURLToPath2(import.meta.url), join3(here, "index.js"), edgeBin, edgeConfig], home);
14852
+ if (problem) throw new Error(`This image's code is not safe to run as root: ${problem}. Rebuild it from deploy/fly/Dockerfile.`);
14853
+ }
14854
+ const { server, edge, secrets, dropped } = cloudHomeChildEnvironments(config2, env, home);
14855
+ if (dropped.length) console.log(`cloud home: not passed to the server: ${dropped.join(", ")}`);
14764
14856
  const children = [];
14765
14857
  let stopping = false;
14766
14858
  const stop = (failed) => {
@@ -14773,8 +14865,7 @@ function startCloudHome(env = process.env) {
14773
14865
  }, 2e4);
14774
14866
  force.unref();
14775
14867
  };
14776
- const run = (command, args, childEnv, again) => {
14777
- const child = spawn(command, args, { env: childEnv, stdio: "inherit" });
14868
+ const watch = (child, again) => {
14778
14869
  children.push(child);
14779
14870
  child.once("error", () => stop(true));
14780
14871
  child.once("exit", (code) => {
@@ -14783,14 +14874,18 @@ function startCloudHome(env = process.env) {
14783
14874
  });
14784
14875
  };
14785
14876
  let restarts = 0;
14786
- const runServer = () => run(process.execPath, [join3(here, "index.js")], server, (code) => {
14877
+ const runServer = () => watch(spawnWithSecrets(process.execPath, [join3(here, "index.js")], server, secrets, ids), (code) => {
14787
14878
  if (serverExitAction(code, stopping, restarts) !== "restart") return false;
14788
14879
  restarts++;
14789
14880
  runServer();
14790
14881
  return true;
14791
14882
  });
14792
14883
  runServer();
14793
- run(env.OMB_CLOUD_EDGE_BIN || "/usr/local/bin/caddy", ["run", "--config", env.OMB_CLOUD_EDGE_CONFIG || "/app/cloud/Caddyfile", "--adapter", "caddyfile"], edge);
14884
+ watch(spawn(
14885
+ edgeBin,
14886
+ ["run", "--config", edgeConfig, "--adapter", "caddyfile"],
14887
+ { env: edge, stdio: "inherit", ...ids ? { uid: ids.uid, gid: ids.gid } : {} }
14888
+ ));
14794
14889
  process.once("SIGTERM", () => stop(false));
14795
14890
  process.once("SIGINT", () => stop(false));
14796
14891
  }
@@ -14804,7 +14899,10 @@ if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1]
14804
14899
  }
14805
14900
  export {
14806
14901
  cloudHomeChildEnvironments,
14902
+ codeTrustProblem,
14807
14903
  passwdIds,
14904
+ serverEnvironmentAllowed,
14808
14905
  serverExitAction,
14906
+ spawnWithSecrets,
14809
14907
  startCloudHome
14810
14908
  };
@@ -35,15 +35,32 @@ export const CLOUD_DESKTOP_CONTROL_ROUTE = {
35
35
  method: "POST",
36
36
  path: /^\/api\/bots\/[\w-]+\/computer\/(?:control|screenshot|viewer-close)$/,
37
37
  };
38
+ /** The Local VM's live desktop, relayed by the sidecar like a VPS viewer.
39
+ * The harness grants it only while a person holds that bot's computer. */
40
+ export const LOCAL_VM_JOIN_ROUTE = {
41
+ method: "POST",
42
+ path: /^\/api\/bots\/[\w-]+\/local-computer\/join$/,
43
+ };
44
+ /** A still of a bot's Local VM, on demand. The VM's lifecycle stays on the
45
+ * host; this only reads a picture of it, behind the same per-device
46
+ * computer-access capability as the cloud desktop. */
47
+ export const LOCAL_VM_SCREENSHOT_ROUTE = {
48
+ method: "POST",
49
+ path: /^\/api\/bots\/[\w-]+\/local-computer\/screenshot$/,
50
+ };
38
51
  export function isCloudDesktopJoin(method, path) {
39
52
  return method === CLOUD_DESKTOP_JOIN_ROUTE.method && CLOUD_DESKTOP_JOIN_ROUTE.path.test(path);
40
53
  }
41
54
  export function isMessageFileDownload(method, path) {
42
55
  return method === MESSAGE_FILE_ROUTE.method && MESSAGE_FILE_ROUTE.path.test(path);
43
56
  }
57
+ /** Every route that shows or drives a bot's computer — cloud or Local VM —
58
+ * and so needs the device's computer-access capability, not just a token. */
44
59
  export function isCloudDesktopAccess(method, path) {
45
60
  return isCloudDesktopJoin(method, path)
46
- || (method === CLOUD_DESKTOP_CONTROL_ROUTE.method && CLOUD_DESKTOP_CONTROL_ROUTE.path.test(path));
61
+ || (method === CLOUD_DESKTOP_CONTROL_ROUTE.method && CLOUD_DESKTOP_CONTROL_ROUTE.path.test(path))
62
+ || (method === LOCAL_VM_SCREENSHOT_ROUTE.method && LOCAL_VM_SCREENSHOT_ROUTE.path.test(path))
63
+ || (method === LOCAL_VM_JOIN_ROUTE.method && LOCAL_VM_JOIN_ROUTE.path.test(path));
47
64
  }
48
65
  /** Every request the iOS app makes, and nothing else.
49
66
  *
@@ -106,6 +123,12 @@ const ALLOWED = [
106
123
  // second, per-device capability check before it reaches the harness.
107
124
  CLOUD_DESKTOP_JOIN_ROUTE,
108
125
  CLOUD_DESKTOP_CONTROL_ROUTE,
126
+ // A picture of the Local VM — not its lifecycle, which stays on the host.
127
+ // Gated per device by the proxy like the cloud desktop above.
128
+ LOCAL_VM_SCREENSHOT_ROUTE,
129
+ // Its live desktop while a person holds the computer, relayed like the
130
+ // VPS viewer and behind the same per-device capability.
131
+ LOCAL_VM_JOIN_ROUTE,
109
132
  // rooms — making one, and talking in one
110
133
  { method: "POST", path: /^\/api\/groups$/ },
111
134
  { method: "POST", path: /^\/api\/groups\/[\w-]+\/messages$/ },