openmausbot 0.1.91 → 0.1.92
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.
- package/dist/assets/DesktopViewer-Do6lBa4C.js +5 -0
- package/dist/assets/{abnfDiagram-O67JEVCF-yP-w8pRq.js → abnfDiagram-O67JEVCF-Cd3X7Hxc.js} +1 -1
- package/dist/assets/{arc-DsivfZEh.js → arc-DIYc7Ymx.js} +1 -1
- package/dist/assets/{architectureDiagram-NJMV4G6O-CILw7lzT.js → architectureDiagram-NJMV4G6O-DBmRGVyP.js} +1 -1
- package/dist/assets/{blockDiagram-BEXU5L5S-DEQUV3HF.js → blockDiagram-BEXU5L5S-CPFePSEE.js} +1 -1
- package/dist/assets/{c4Diagram-YGBWAQC7-lSXCZoKA.js → c4Diagram-YGBWAQC7-DD_DO1qy.js} +1 -1
- package/dist/assets/channel-Dtk5Mtic.js +1 -0
- package/dist/assets/{chunk-2Q5K7J3B-QCD5bgWP.js → chunk-2Q5K7J3B-BNEeNSjX.js} +1 -1
- package/dist/assets/{chunk-3FUC2YCW-C5-iZJuL.js → chunk-3FUC2YCW-BbinLaqH.js} +2 -2
- package/dist/assets/{chunk-5VM5RSS4-cxsawMpY.js → chunk-5VM5RSS4-BBgYrgDR.js} +1 -1
- package/dist/assets/{chunk-GTNCS2PH-DV8tV8H7.js → chunk-GTNCS2PH-ezXj-kA-.js} +1 -1
- package/dist/assets/{chunk-GWA4HPMP-CJFZyfbW.js → chunk-GWA4HPMP-9FxZ3diV.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-BigbMXco.js → chunk-JWPE2WC7-CO-40JpI.js} +1 -1
- package/dist/assets/{chunk-NETBCI7D-oVxTfpDy.js → chunk-NETBCI7D-BEhjslYE.js} +1 -1
- package/dist/assets/{chunk-WEXAMYUT-CH4BiroW.js → chunk-WEXAMYUT-CNeq4n7_.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-KEDa6gax.js → chunk-XXDRQBXY-OsCY7KSi.js} +1 -1
- package/dist/assets/{classDiagram-v2-NBCMYWYE-BiPjfqVv.js → classDiagram-v2-NBCMYWYE-CloRUEtk.js} +1 -1
- package/dist/assets/{cose-bilkent-JH36ORCC-Caxew3OY.js → cose-bilkent-JH36ORCC-D1BGZhp4.js} +1 -1
- package/dist/assets/{cynefin-OW5HDTMX-B_Pui369.js → cynefin-OW5HDTMX-CUf4T2CN.js} +1 -1
- package/dist/assets/{cynefinDiagram-VND7K2PF-X64ydIhP.js → cynefinDiagram-VND7K2PF-DPEZrFGA.js} +1 -1
- package/dist/assets/{dagre-6A5THRUB-TqYCI1E1.js → dagre-6A5THRUB-bDe6GIv5.js} +1 -1
- package/dist/assets/{diagram-22UHCM2B-TeOt3rAQ.js → diagram-22UHCM2B-CdcUQz55.js} +1 -1
- package/dist/assets/{diagram-3UASUU5V-D70BLhDA.js → diagram-3UASUU5V-BZpqGg7c.js} +1 -1
- package/dist/assets/{diagram-ATOU4E4O-BbQDLwUC.js → diagram-ATOU4E4O-DvGM6ugp.js} +1 -1
- package/dist/assets/{diagram-CDSNMT55-ChNJZ1u-.js → diagram-CDSNMT55-DSTmMm0s.js} +1 -1
- package/dist/assets/{diagram-MLGK6HIB-DMBl2APa.js → diagram-MLGK6HIB-15cucnMn.js} +1 -1
- package/dist/assets/{diagram-MPIPVDR6-CEqDchOp.js → diagram-MPIPVDR6-tMbuaE6n.js} +1 -1
- package/dist/assets/{ebnfDiagram-ZINNZB2B-BVDKRp_-.js → ebnfDiagram-ZINNZB2B-BYxYzjHI.js} +1 -1
- package/dist/assets/{elk-276RUBZZ-CRkofO9B.js → elk-276RUBZZ-v6bj852W.js} +1 -1
- package/dist/assets/{erDiagram-OPXOYQCR-DruOMh5e.js → erDiagram-OPXOYQCR-5lBBlnd2.js} +1 -1
- package/dist/assets/{flowDiagram-KWPJA3E3-8GMQeB7t.js → flowDiagram-KWPJA3E3-CZyl1zIj.js} +1 -1
- package/dist/assets/{ganttDiagram-FUAMR5RP-ORE9jcsM.js → ganttDiagram-FUAMR5RP-BiAI-ltZ.js} +1 -1
- package/dist/assets/{gitGraphDiagram-X574FWY7-BmsedsWh.js → gitGraphDiagram-X574FWY7-BAZISkj3.js} +1 -1
- package/dist/assets/index-Cdmjrl28.css +1 -0
- package/dist/assets/{index-DKNEM8Q6.js → index-DGBaEXrM.js} +1 -1
- package/dist/assets/index-DR7YPMkW.js +597 -0
- package/dist/assets/{infoDiagram-VRGFBTTK-E_p7AooJ.js → infoDiagram-VRGFBTTK-B6ooOy-Z.js} +1 -1
- package/dist/assets/{ishikawaDiagram-OU5B5YK6-Y-B2mKda.js → ishikawaDiagram-OU5B5YK6-BZ9ksi-B.js} +1 -1
- package/dist/assets/{journeyDiagram-ZHPQQLJL-eA8RELcK.js → journeyDiagram-ZHPQQLJL-DWqlzIEe.js} +1 -1
- package/dist/assets/{kanban-definition-PNTS6WVX-DqIL2e8e.js → kanban-definition-PNTS6WVX-JX6piDwL.js} +1 -1
- package/dist/assets/{linear-yC_29R6e.js → linear-CmOWzX0P.js} +1 -1
- package/dist/assets/{mermaid.core-VhEMkSND.js → mermaid.core-CF1zwoQ-.js} +5 -5
- package/dist/assets/{mindmap-definition-NLK3R4M7-oJ7kyQZy.js → mindmap-definition-NLK3R4M7-CGh2K4fW.js} +1 -1
- package/dist/assets/{pegDiagram-GJSIUBJH-BmfYcY0O.js → pegDiagram-GJSIUBJH-CDwYN0s7.js} +1 -1
- package/dist/assets/{pieDiagram-5QR66LMP-DKvgP7w9.js → pieDiagram-5QR66LMP-1rfjJocB.js} +1 -1
- package/dist/assets/{quadrantDiagram-O4NWA36T-BEKL3W0L.js → quadrantDiagram-O4NWA36T-tKPvPiok.js} +1 -1
- package/dist/assets/{railroadDiagram-XR7U4H2S-BEsiqR5s.js → railroadDiagram-XR7U4H2S-BHLm5vXR.js} +1 -1
- package/dist/assets/{requirementDiagram-PLB6GJNP-DWBcWvAP.js → requirementDiagram-PLB6GJNP-CB45STp7.js} +1 -1
- package/dist/assets/{sankeyDiagram-IPEJSGJF-rpZ2_O4s.js → sankeyDiagram-IPEJSGJF-55QA_huC.js} +1 -1
- package/dist/assets/{sequenceDiagram-PO4LG4MO-B99HQdJR.js → sequenceDiagram-PO4LG4MO-BckFmQHn.js} +1 -1
- package/dist/assets/{sizeCapture-INFHLROL-BjN0qT5T.js → sizeCapture-INFHLROL-BFCOJF11.js} +1 -1
- package/dist/assets/{stateDiagram-v2-GCMORJYK-BbsVgGsC.js → stateDiagram-v2-GCMORJYK-CZvmiVVN.js} +1 -1
- package/dist/assets/{swimlanes-2SLR337P-DG3gKkeR.js → swimlanes-2SLR337P-BpDUCEKy.js} +1 -1
- package/dist/assets/swimlanesDiagram-TC7HE7FX-M0GYW9Y3.js +8 -0
- package/dist/assets/{timeline-definition-EJHVYXUP-BTHOdtF_.js → timeline-definition-EJHVYXUP-BpxHq6IK.js} +1 -1
- package/dist/assets/{usecaseDiagram-POWQR4AR-acLSLFwc.js → usecaseDiagram-POWQR4AR-Cj66vm02.js} +1 -1
- package/dist/assets/{vennDiagram-UO4OBE2U-C5JzNX9G.js → vennDiagram-UO4OBE2U-C9nRkWE_.js} +1 -1
- package/dist/assets/{wardleyDiagram-VNRHLVJA-DL1-PrR_.js → wardleyDiagram-VNRHLVJA-D-me_nWj.js} +1 -1
- package/dist/assets/{xychartDiagram-PMCCYNJV-Bvr1477p.js → xychartDiagram-PMCCYNJV-Dc_fL4mk.js} +1 -1
- package/dist/index.html +2 -2
- package/dist/novnc-NOTICE.txt +118 -0
- package/dist-server/cloud-home-start.js +112 -14
- package/dist-server/container-mcp.js +195 -15
- package/dist-server/drivers/agents-proxy.js +5 -4
- package/dist-server/enterprise/server/index.js +5 -1
- package/dist-server/index.js +9300 -4155
- package/dist-server/local-computer-proxy.js +128 -7
- package/dist-server/mcp-gate.js +11 -5
- package/dist-server/model-catalog/models-dev.snapshot.json +7299 -0
- package/dist-server/openmausbot.js +3910 -1182
- package/dist-server/pair-cli.js +3910 -1182
- package/dist-server/server/boat.js +2 -2
- package/dist-server/server/browser-engine.js +10 -1
- package/dist-server/server/browser-live.js +46 -2
- package/dist-server/server/browser-runtime.js +74 -8
- package/dist-server/server/browser-tool-shape.js +6 -4
- package/dist-server/server/chief-of-staff.js +1 -1
- package/dist-server/server/cloud-home-start.js +118 -26
- package/dist-server/server/cloud-home.js +39 -3
- package/dist-server/server/cloud-lending.js +74 -10
- package/dist-server/server/cloud-owner.js +196 -0
- package/dist-server/server/cloud-secrets-boot.js +6 -0
- package/dist-server/server/cloud-secrets.js +65 -0
- package/dist-server/server/config.js +174 -14
- package/dist-server/server/container-computer.js +3 -2
- package/dist-server/server/desktop-viewer-targets.js +26 -0
- package/dist-server/server/drivers/acp/core.js +167 -21
- package/dist-server/server/drivers/acp/opencode-go.js +614 -85
- package/dist-server/server/drivers/agents-catalog.js +6 -6
- package/dist-server/server/drivers/antigravity-acp.js +69 -11
- package/dist-server/server/drivers/antigravity-temp.js +360 -0
- package/dist-server/server/drivers/antigravity.js +21 -0
- package/dist-server/server/drivers/chatgpt-plan-auth.js +481 -0
- package/dist-server/server/drivers/claude.js +312 -34
- package/dist-server/server/drivers/codex.js +228 -18
- package/dist-server/server/drivers/grok.js +2 -2
- package/dist-server/server/drivers/mistral.js +4 -3
- package/dist-server/server/drivers/openai-chat-protocol.js +4 -3
- package/dist-server/server/drivers/openai-chat.js +41 -3
- package/dist-server/server/drivers/openai-compat.js +73 -23
- package/dist-server/server/engine-install.js +46 -12
- package/dist-server/server/env-path.js +15 -3
- package/dist-server/server/harness/registry.js +2 -2
- package/dist-server/server/index.js +1338 -184
- package/dist-server/server/lending-memory.js +479 -0
- package/dist-server/server/local-vm-idle.js +24 -6
- package/dist-server/server/managed-desktop.js +3 -0
- package/dist-server/server/mcp-bridge.js +5 -3
- package/dist-server/server/mcp-http.js +6 -3
- package/dist-server/server/mcp-oauth-discovery.js +133 -0
- package/dist-server/server/mcp-oauth-store.js +70 -0
- package/dist-server/server/mcp-oauth.js +550 -0
- package/dist-server/server/mcp-probe.js +14 -1
- package/dist-server/server/mcp-registry.js +43 -0
- package/dist-server/server/memory-upkeep.js +94 -84
- package/dist-server/server/model-catalog/catalog.js +374 -0
- package/dist-server/server/model-catalog/presets.js +176 -0
- package/dist-server/server/model-catalog/trim.js +219 -0
- package/dist-server/server/provider-key-check.js +4 -2
- package/dist-server/server/recent-work.js +1 -1
- package/dist-server/server/request-auth.js +23 -0
- package/dist-server/server/routes/antigravity-leftovers.js +45 -0
- package/dist-server/server/routes/bot-memory.js +31 -6
- package/dist-server/server/routes/desktop-viewer.js +194 -0
- package/dist-server/server/routine-requests.js +1 -1
- package/dist-server/server/routines.js +1 -1
- package/dist-server/server/sessions.js +56 -9
- package/dist-server/server/skills.js +25 -10
- package/dist-server/server/store.js +62 -122
- package/dist-server/server/thread-events.js +2 -0
- package/dist-server/server/thread-starters.js +33 -0
- package/dist-server/server/thread-title.js +46 -0
- package/dist-server/server/tts/fish.js +4 -5
- package/dist-server/server/tts/index.js +5 -3
- package/dist-server/server/vps-computer.js +79 -12
- package/dist-server/server/webhooks.js +18 -1
- package/dist-server/server/workspace-backup-policy.js +3 -0
- package/dist-server/server/workspace-backup.js +3 -0
- package/dist-server/server/workspace.js +65 -15
- package/dist-server/shared/workspace-backup-client.js +1 -0
- package/dist-server/src/lib/citations.js +177 -0
- package/dist-server/src/lib/composer-attachments.js +7 -1
- package/dist-server/vps-container-mcp.js +196 -15
- package/dist-server/workspace-backup.worker.js +73 -9
- package/enterprise/server/index.js +5 -1
- package/package.json +1 -1
- package/dist/assets/channel-DrfGMu7X.js +0 -1
- package/dist/assets/index-BlnCEcU6.js +0 -588
- package/dist/assets/index-DVxjOvID.css +0 -1
- 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
|
-
...
|
|
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
|
-
|
|
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.
|
|
14758
|
-
process.
|
|
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
|
|
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
|
|
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 = () =>
|
|
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
|
-
|
|
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
|
};
|
|
@@ -22,6 +22,9 @@ function nvmBinDirs() {
|
|
|
22
22
|
return [];
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
function sealedFixture() {
|
|
26
|
+
return process.env.OMB_TEST_SEALED_PATH === "1";
|
|
27
|
+
}
|
|
25
28
|
function knownDirs() {
|
|
26
29
|
const home = homedir();
|
|
27
30
|
return [
|
|
@@ -37,10 +40,13 @@ function knownDirs() {
|
|
|
37
40
|
// opencode installer
|
|
38
41
|
join(home, ".claude", "local"),
|
|
39
42
|
// claude "local install"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
// Machine-wide rather than under the (possibly temporary) home.
|
|
44
|
+
...sealedFixture() ? [] : [
|
|
45
|
+
"/opt/homebrew/bin",
|
|
46
|
+
// brew, Apple silicon
|
|
47
|
+
"/usr/local/bin"
|
|
48
|
+
// brew Intel / classic installs
|
|
49
|
+
],
|
|
44
50
|
join(home, ".volta", "bin"),
|
|
45
51
|
join(home, ".bun", "bin"),
|
|
46
52
|
join(home, ".asdf", "shims"),
|
|
@@ -92,7 +98,7 @@ function augmentedPath() {
|
|
|
92
98
|
...(process.platform === "win32" ? windowsKnownDirs() : knownDirs()).filter((d) => existsSync(d))
|
|
93
99
|
]);
|
|
94
100
|
}
|
|
95
|
-
if (!probed && !process.env.VITEST && process.platform !== "win32") {
|
|
101
|
+
if (!probed && !process.env.VITEST && !sealedFixture() && process.platform !== "win32") {
|
|
96
102
|
probed = true;
|
|
97
103
|
probeLoginShellPath();
|
|
98
104
|
}
|
|
@@ -116,6 +122,119 @@ function probeLoginShellPath() {
|
|
|
116
122
|
}
|
|
117
123
|
);
|
|
118
124
|
}
|
|
125
|
+
function splitCliString(cli) {
|
|
126
|
+
const out = [];
|
|
127
|
+
let cur = "";
|
|
128
|
+
let quote = null;
|
|
129
|
+
for (const ch of cli.trim()) {
|
|
130
|
+
if (quote) {
|
|
131
|
+
if (ch === quote) quote = null;
|
|
132
|
+
else cur += ch;
|
|
133
|
+
} else if (ch === '"' || ch === "'") {
|
|
134
|
+
quote = ch;
|
|
135
|
+
} else if (/\s/.test(ch)) {
|
|
136
|
+
if (cur) out.push(cur);
|
|
137
|
+
cur = "";
|
|
138
|
+
} else {
|
|
139
|
+
cur += ch;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (cur) out.push(cur);
|
|
143
|
+
return out;
|
|
144
|
+
}
|
|
145
|
+
function isFile(p2) {
|
|
146
|
+
try {
|
|
147
|
+
return statSync(p2, { throwIfNoEntry: false })?.isFile() ?? false;
|
|
148
|
+
} catch {
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
function whichWin(cli, env) {
|
|
153
|
+
const exts = ((env ?? process.env).PATHEXT ?? ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean);
|
|
154
|
+
const probe = (base) => {
|
|
155
|
+
const order = extname(base) ? [base, ...exts.map((e) => base + e)] : [...exts.map((e) => base + e), base];
|
|
156
|
+
return order.find(isFile) ?? null;
|
|
157
|
+
};
|
|
158
|
+
if (/[\\/]/.test(cli) || /^[a-zA-Z]:/.test(cli)) return probe(cli);
|
|
159
|
+
const path = env ? env.PATH ?? env.Path ?? "" : augmentedPath();
|
|
160
|
+
for (const dir of path.split(delimiter)) {
|
|
161
|
+
if (!dir) continue;
|
|
162
|
+
const hit = probe(join(dir, cli));
|
|
163
|
+
if (hit) return hit;
|
|
164
|
+
}
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
function nodeExe(near, env) {
|
|
168
|
+
const local = join(near, "node.exe");
|
|
169
|
+
if (isFile(local)) return local;
|
|
170
|
+
const onPath = whichWin("node.exe", env);
|
|
171
|
+
if (onPath && extname(onPath).toLowerCase() === ".exe") return onPath;
|
|
172
|
+
return process.versions.electron ? null : process.execPath;
|
|
173
|
+
}
|
|
174
|
+
function parseCmdShim(shim, env) {
|
|
175
|
+
let text;
|
|
176
|
+
try {
|
|
177
|
+
text = readFileSync(shim, "utf8");
|
|
178
|
+
} catch {
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
const dir = dirname(shim);
|
|
182
|
+
const npmEntry = /^SET "NP[MX]_CLI_JS=%~dp0\\([^"]+)"/im.exec(text);
|
|
183
|
+
const targets = [...npmEntry ? [npmEntry] : [], ...text.matchAll(/"%~?dp0%?\\?([^"]+)"/g)].map((m2) => join(dir, m2[1])).filter((p2) => isFile(p2) && basename(p2).toLowerCase() !== "node.exe");
|
|
184
|
+
const script = targets.find((p2) => /\.[cm]?js$/i.test(p2));
|
|
185
|
+
if (script) {
|
|
186
|
+
const node = nodeExe(dir, env);
|
|
187
|
+
if (node) return { command: node, args: [script] };
|
|
188
|
+
}
|
|
189
|
+
const exe = targets.find((p2) => extname(p2).toLowerCase() === ".exe");
|
|
190
|
+
return exe ? { command: exe, args: [] } : null;
|
|
191
|
+
}
|
|
192
|
+
function parseNodeShebang(file2, env) {
|
|
193
|
+
let head = "";
|
|
194
|
+
let fd = null;
|
|
195
|
+
try {
|
|
196
|
+
fd = openSync(file2, "r");
|
|
197
|
+
const buf = Buffer.alloc(128);
|
|
198
|
+
const n = readSync(fd, buf, 0, buf.length, 0);
|
|
199
|
+
head = buf.subarray(0, n).toString("utf8").split("\n", 1)[0];
|
|
200
|
+
} catch {
|
|
201
|
+
return null;
|
|
202
|
+
} finally {
|
|
203
|
+
if (fd !== null) {
|
|
204
|
+
try {
|
|
205
|
+
closeSync(fd);
|
|
206
|
+
} catch {
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
if (!/^#!.*\bnode(\.exe)?\b/.test(head)) return null;
|
|
211
|
+
const node = nodeExe(dirname(file2), env);
|
|
212
|
+
return node ? { command: node, args: [file2] } : null;
|
|
213
|
+
}
|
|
214
|
+
function resolveWord(cli, args, env) {
|
|
215
|
+
if (process.platform !== "win32") return { command: cli, args };
|
|
216
|
+
const file2 = whichWin(cli, env);
|
|
217
|
+
if (!file2) return { command: cli, args };
|
|
218
|
+
const ext = extname(file2).toLowerCase();
|
|
219
|
+
if (ext === ".cmd" || ext === ".bat") {
|
|
220
|
+
const direct = parseCmdShim(file2, env);
|
|
221
|
+
return direct ? { command: direct.command, args: [...direct.args, ...args] } : { command: file2, args };
|
|
222
|
+
}
|
|
223
|
+
if (ext === ".exe" || ext === ".com") return { command: file2, args };
|
|
224
|
+
const viaNode = parseNodeShebang(file2, env);
|
|
225
|
+
return viaNode ? { command: viaNode.command, args: [...viaNode.args, ...args] } : { command: file2, args };
|
|
226
|
+
}
|
|
227
|
+
function resolveCliSpawn(cli, args, env) {
|
|
228
|
+
const trimmed = cli.trim();
|
|
229
|
+
if (trimmed.includes(" ") && existsSync(trimmed)) return resolveWord(trimmed, args, env);
|
|
230
|
+
const split = splitCliString(cli);
|
|
231
|
+
if (split.length > 1 || split[0] !== trimmed) {
|
|
232
|
+
const [head, ...fixed] = split;
|
|
233
|
+
if (!head) return { command: cli, args };
|
|
234
|
+
return resolveWord(head, [...fixed, ...args], env);
|
|
235
|
+
}
|
|
236
|
+
return resolveWord(cli, args, env);
|
|
237
|
+
}
|
|
119
238
|
|
|
120
239
|
// server/config.ts
|
|
121
240
|
import { homedir as homedir2 } from "node:os";
|
|
@@ -15624,15 +15743,27 @@ var stdioEntrySchema = external_exports.object({
|
|
|
15624
15743
|
var stdioMutationSchema = stdioEntrySchema.extend({
|
|
15625
15744
|
env: external_exports.record(external_exports.string(), external_exports.union([external_exports.string().max(16384), external_exports.literal(true)])).optional()
|
|
15626
15745
|
});
|
|
15746
|
+
var CLIENT_ID = /^[\x20-\x7e]+$/;
|
|
15747
|
+
var SCOPE = /^[\x21\x23-\x5b\x5d-\x7e]+$/;
|
|
15748
|
+
var CLIENT_SECRET_MAX = 4096;
|
|
15749
|
+
var oauthClientSchema = external_exports.object({
|
|
15750
|
+
clientId: external_exports.string().trim().min(1, "Enter the client ID of the app registered with this server's sign-in provider.").max(512).regex(CLIENT_ID, "A client ID is printable text on one line."),
|
|
15751
|
+
clientSecret: external_exports.string().min(1).max(CLIENT_SECRET_MAX).regex(CLIENT_ID, "A client secret is printable text on one line.").optional(),
|
|
15752
|
+
scopes: external_exports.array(external_exports.string().max(256).regex(SCOPE, "Scopes are single words, like offline_access or api://my-app/mcp.read.")).max(32).optional()
|
|
15753
|
+
}).strict();
|
|
15627
15754
|
var remoteEntrySchema = external_exports.object({
|
|
15628
15755
|
/** Streamable HTTP unless the entry says the older SSE transport. */
|
|
15629
15756
|
type: external_exports.enum(["http", "sse"]).optional(),
|
|
15630
15757
|
url: external_exports.string().trim().min(1).max(2048),
|
|
15631
15758
|
headers: external_exports.record(external_exports.string(), external_exports.string().max(16384)).optional(),
|
|
15759
|
+
oauth: oauthClientSchema.optional(),
|
|
15632
15760
|
enabled: external_exports.boolean().optional()
|
|
15633
15761
|
}).strict();
|
|
15634
15762
|
var remoteMutationSchema = remoteEntrySchema.extend({
|
|
15635
|
-
headers: external_exports.record(external_exports.string(), external_exports.union([external_exports.string().max(16384), external_exports.literal(true)])).optional()
|
|
15763
|
+
headers: external_exports.record(external_exports.string(), external_exports.union([external_exports.string().max(16384), external_exports.literal(true)])).optional(),
|
|
15764
|
+
oauth: oauthClientSchema.extend({
|
|
15765
|
+
clientSecret: external_exports.union([external_exports.string().min(1).max(CLIENT_SECRET_MAX).regex(CLIENT_ID, "A client secret is printable text on one line."), external_exports.literal(true)]).optional()
|
|
15766
|
+
}).optional()
|
|
15636
15767
|
});
|
|
15637
15768
|
|
|
15638
15769
|
// server/cloud-overflow.ts
|
|
@@ -15698,7 +15829,11 @@ var sessionSchema = external_exports.object({
|
|
|
15698
15829
|
userId: external_exports.string().max(256).optional(),
|
|
15699
15830
|
email: external_exports.string().max(320).optional(),
|
|
15700
15831
|
/** Set only by the internal verified-portal issuance path, never by email or pairing input. */
|
|
15701
|
-
membershipAuthority: external_exports.literal("portal").optional()
|
|
15832
|
+
membershipAuthority: external_exports.literal("portal").optional(),
|
|
15833
|
+
/** A browser sign-in (PairingCode `browser`): accepted only as its browser's cookie, never as a bearer token. */
|
|
15834
|
+
cookieOnly: external_exports.literal(true).optional(),
|
|
15835
|
+
/** Whose OMB Cloud a browser sign-in signed in to (its PairingCode `owner`). */
|
|
15836
|
+
owner: external_exports.string().max(254).optional()
|
|
15702
15837
|
});
|
|
15703
15838
|
var fileSchema = external_exports.object({ version: external_exports.literal(1), sessions: external_exports.array(sessionSchema) });
|
|
15704
15839
|
|
|
@@ -15710,6 +15845,7 @@ var optionalText = external_exports.string().optional();
|
|
|
15710
15845
|
var SSH_ALIAS = /^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$/;
|
|
15711
15846
|
var LEGACY_BROWSER_PROFILE_ID = /^[A-Za-z0-9_-]{1,40}$/;
|
|
15712
15847
|
var BROWSER_PROFILE_ID = /^[a-z0-9_-]{1,40}$/;
|
|
15848
|
+
var FISH_TTS_MODELS = ["s2.1-pro", "s2.1-pro-free"];
|
|
15713
15849
|
var MIN_ROOM_TURN_TIMEOUT_MINUTES = 1;
|
|
15714
15850
|
var MAX_ROOM_TURN_TIMEOUT_MINUTES = 1440;
|
|
15715
15851
|
var DEFAULT_ROOM_HANDOFF_LIFETIME_MINUTES = 30;
|
|
@@ -15720,6 +15856,8 @@ var MIN_THREAD_EVENT_LOG_BYTES = 256 * 1024;
|
|
|
15720
15856
|
var MAX_THREAD_EVENT_LOG_BYTES = 4 * 1024 * 1024 * 1024;
|
|
15721
15857
|
var MIN_LOCAL_VM_MAX_INSTANCES = 1;
|
|
15722
15858
|
var MAX_LOCAL_VM_MAX_INSTANCES = 8;
|
|
15859
|
+
var MIN_LOCAL_VM_IDLE_TIMEOUT_MINUTES = 5;
|
|
15860
|
+
var MAX_LOCAL_VM_IDLE_TIMEOUT_MINUTES = 1440;
|
|
15723
15861
|
function isValidSshAlias(value) {
|
|
15724
15862
|
return typeof value === "string" && SSH_ALIAS.test(value);
|
|
15725
15863
|
}
|
|
@@ -15757,7 +15895,8 @@ var roomConfigSchema = external_exports.object({
|
|
|
15757
15895
|
);
|
|
15758
15896
|
var localVmConfigSchema = external_exports.object({
|
|
15759
15897
|
mode: external_exports.enum(["shared", "per-bot", "pool"]).optional(),
|
|
15760
|
-
maxInstances: external_exports.number().int().min(MIN_LOCAL_VM_MAX_INSTANCES).max(MAX_LOCAL_VM_MAX_INSTANCES).optional()
|
|
15898
|
+
maxInstances: external_exports.number().int().min(MIN_LOCAL_VM_MAX_INSTANCES).max(MAX_LOCAL_VM_MAX_INSTANCES).optional(),
|
|
15899
|
+
idleTimeoutMinutes: external_exports.number().int().min(MIN_LOCAL_VM_IDLE_TIMEOUT_MINUTES).max(MAX_LOCAL_VM_IDLE_TIMEOUT_MINUTES).optional()
|
|
15761
15900
|
});
|
|
15762
15901
|
var browserProfileSchema = external_exports.object({
|
|
15763
15902
|
// "guest" is the throwaway session's reserved id, never a saved profile
|
|
@@ -15916,7 +16055,11 @@ var onboardingConfigSchema = external_exports.object({
|
|
|
15916
16055
|
/** Which welcome flow was completed; a newer flow may re-show itself. */
|
|
15917
16056
|
version: external_exports.number().int().min(0).max(1e3).optional(),
|
|
15918
16057
|
reelSeen: external_exports.boolean().optional(),
|
|
15919
|
-
hintsSeen: external_exports.array(external_exports.string().trim().min(1).max(60)).max(100).optional()
|
|
16058
|
+
hintsSeen: external_exports.array(external_exports.string().trim().min(1).max(60)).max(100).optional(),
|
|
16059
|
+
/** OMB Cloud home only: when a bot's turn first finished on this machine
|
|
16060
|
+
* (cloud-home.ts firstCloudTurnPatch). Written by the server, read by the
|
|
16061
|
+
* Cloud's setup checklist. */
|
|
16062
|
+
firstTurnAt: external_exports.string().trim().max(40).optional()
|
|
15920
16063
|
}).strict();
|
|
15921
16064
|
var instanceConfigSchema = external_exports.object({
|
|
15922
16065
|
driver: external_exports.string().min(1),
|
|
@@ -15928,6 +16071,7 @@ var instanceConfigSchema = external_exports.object({
|
|
|
15928
16071
|
]).optional(),
|
|
15929
16072
|
environment: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
15930
16073
|
enabled: external_exports.boolean().optional(),
|
|
16074
|
+
access: external_exports.enum(["subscription", "custom", "api"]).optional(),
|
|
15931
16075
|
config: external_exports.json().optional()
|
|
15932
16076
|
});
|
|
15933
16077
|
var instanceConfigMapSchema = external_exports.record(external_exports.string(), instanceConfigSchema);
|
|
@@ -15989,7 +16133,12 @@ var appConfigSchema = external_exports.object({
|
|
|
15989
16133
|
/** Anthropic API key for Claude Code billed per token, handed only to
|
|
15990
16134
|
* Claude instances; `url` only for a proxy or a test double. Never a
|
|
15991
16135
|
* personal-login OAuth token. */
|
|
15992
|
-
anthropic: external_exports.object({ key: optionalText, url: optionalText }).optional(),
|
|
16136
|
+
anthropic: external_exports.object({ key: optionalText, url: optionalText, everyClaudeBot: external_exports.boolean().optional() }).optional(),
|
|
16137
|
+
/** OpenAI's own API key, for the `openai` instance only. Codex keeps its
|
|
16138
|
+
* own ChatGPT or API login and never reads this. */
|
|
16139
|
+
openai: external_exports.object({ key: optionalText }).optional(),
|
|
16140
|
+
/** OpenRouter key, for the `openrouter` instance only. */
|
|
16141
|
+
openrouter: external_exports.object({ key: optionalText }).optional(),
|
|
15993
16142
|
/** Monthly spend limit for the whole workspace, against the cost engines
|
|
15994
16143
|
* report to the usage ledger. Enforced only with the `budgets` entitlement. */
|
|
15995
16144
|
budgets: external_exports.object({
|
|
@@ -16023,8 +16172,8 @@ var appConfigSchema = external_exports.object({
|
|
|
16023
16172
|
opencodeGo: external_exports.object({ apiKey: optionalText }).optional(),
|
|
16024
16173
|
/** Voice settings and the selected voice id. `provider` picks the
|
|
16025
16174
|
* engine: "elevenlabs" (default; needs `key`), "fish" (needs its own
|
|
16026
|
-
* `fishKey`), "system" (the Mac's
|
|
16027
|
-
* "xai" (Grok TTS, reusing `xai.key`), or
|
|
16175
|
+
* `fishKey`; `fishModel` picks its speech model), "system" (the Mac's
|
|
16176
|
+
* built-in voices, no key), "xai" (Grok TTS, reusing `xai.key`), or
|
|
16028
16177
|
* "chatterbox" (a local OpenAI-compatible Chatterbox server; `baseUrl`
|
|
16029
16178
|
* and `model` are settings, not secrets). Cloud keys stay separate so
|
|
16030
16179
|
* switching providers never overwrites or misuses the other key. */
|
|
@@ -16034,7 +16183,8 @@ var appConfigSchema = external_exports.object({
|
|
|
16034
16183
|
voice: optionalText,
|
|
16035
16184
|
provider: external_exports.enum(["elevenlabs", "fish", "system", "chatterbox", "xai"]).optional(),
|
|
16036
16185
|
baseUrl: external_exports.string().trim().max(2048).refine((value) => !value || /^https?:\/\//i.test(value), "the Chatterbox server address must start with http:// or https://").optional(),
|
|
16037
|
-
model: optionalText
|
|
16186
|
+
model: optionalText,
|
|
16187
|
+
fishModel: external_exports.enum(FISH_TTS_MODELS).optional()
|
|
16038
16188
|
}).optional(),
|
|
16039
16189
|
/** The decision model (server/decider): a fast classifier that picks
|
|
16040
16190
|
* things for bots, starting with who answers a room message. `key` is
|
|
@@ -16122,6 +16272,34 @@ var DATA_DIR = process.env.OMB_DATA_DIR ?? join3(homedir2(), ".openmausbot");
|
|
|
16122
16272
|
var LEGACY_DATA_DIR = join3(homedir2(), ".opengrokbot");
|
|
16123
16273
|
var EVENTS_DIR = join3(DATA_DIR, "events");
|
|
16124
16274
|
var NATIVE_DIR = join3(DATA_DIR, "native");
|
|
16275
|
+
var OPENAI_API_INSTANCE = "openai";
|
|
16276
|
+
var OPENROUTER_API_INSTANCE = "openrouter";
|
|
16277
|
+
var XAI_API_INSTANCE = "xaiApi";
|
|
16278
|
+
var CLAUDE_API_INSTANCE = "claudeApi";
|
|
16279
|
+
var API_KEY_FLEET = {
|
|
16280
|
+
[OPENAI_API_INSTANCE]: {
|
|
16281
|
+
driver: "openai-compat",
|
|
16282
|
+
displayName: "OpenAI",
|
|
16283
|
+
access: "api",
|
|
16284
|
+
icon: { kind: "preset", preset: "openai" },
|
|
16285
|
+
config: { url: "https://api.openai.com/v1", apiKeyEnv: "OMB_OPENAI_API_KEY", catalog: "openai" }
|
|
16286
|
+
},
|
|
16287
|
+
[CLAUDE_API_INSTANCE]: {
|
|
16288
|
+
driver: "claudeAgent",
|
|
16289
|
+
displayName: "Claude (API key)",
|
|
16290
|
+
access: "api",
|
|
16291
|
+
icon: { kind: "preset", preset: "anthropic" },
|
|
16292
|
+
config: { requireApiKey: true }
|
|
16293
|
+
},
|
|
16294
|
+
[XAI_API_INSTANCE]: { driver: "grok", displayName: "xAI", access: "api", icon: { kind: "preset", preset: "xai" } },
|
|
16295
|
+
[OPENROUTER_API_INSTANCE]: {
|
|
16296
|
+
driver: "openai-compat",
|
|
16297
|
+
displayName: "OpenRouter",
|
|
16298
|
+
access: "api",
|
|
16299
|
+
icon: { kind: "preset", preset: "openrouter" },
|
|
16300
|
+
config: { url: "https://openrouter.ai/api/v1", apiKeyEnv: "OMB_OPENROUTER_API_KEY" }
|
|
16301
|
+
}
|
|
16302
|
+
};
|
|
16125
16303
|
|
|
16126
16304
|
// server/container-computer.ts
|
|
16127
16305
|
var run = promisify(execFile2);
|
|
@@ -16454,9 +16632,11 @@ function createMcpBridgeInterceptor(options) {
|
|
|
16454
16632
|
};
|
|
16455
16633
|
}
|
|
16456
16634
|
function runMcpBridge(options) {
|
|
16457
|
-
const
|
|
16635
|
+
const env = options.env ?? { ...process.env, PATH: augmentedPath() };
|
|
16636
|
+
const { command, args } = resolveCliSpawn(options.command, options.args, env);
|
|
16637
|
+
const child = spawn(command, args, {
|
|
16458
16638
|
shell: false,
|
|
16459
|
-
env
|
|
16639
|
+
env,
|
|
16460
16640
|
stdio: ["pipe", "pipe", "pipe"]
|
|
16461
16641
|
});
|
|
16462
16642
|
child.stdin.on("error", () => {
|