limixbot 0.3.51 → 0.3.52
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/{ActivityPanel-C74ksK5_.js → ActivityPanel-DoWrjUz7.js} +1 -1
- package/dist/assets/App-DmJM-bVw.js +243 -0
- package/dist/assets/{AppEventEditor-Derw3FHd.js → AppEventEditor-emHq_cA0.js} +1 -1
- package/dist/assets/BotSettingsDialog-BshbTnT_.js +16 -0
- package/dist/assets/{BrowserPanel-BUwH6i3q.js → BrowserPanel-PLHN7znJ.js} +2 -2
- package/dist/assets/{BrowserProfilesManager-LPWaNOTL.js → BrowserProfilesManager-ChG7MrYQ.js} +1 -1
- package/dist/assets/CloudAddDialog-CyKmG4VN.js +1 -0
- package/dist/assets/ComputerFilesPane-BPu6_l8N.js +1 -0
- package/dist/assets/{ComputerPanel-BKSAp5BV.js → ComputerPanel-Df-QaAS2.js} +2 -2
- package/dist/assets/{DataPanel-C8JFQXPW.js → DataPanel-QSdW8P4h.js} +1 -1
- package/dist/assets/{DesktopViewer-DFhYwHIq.js → DesktopViewer-Du64Zar0.js} +1 -1
- package/dist/assets/{FilesView-uvhFDVLX.js → FilesView-0Ijtj6CN.js} +1 -1
- package/dist/assets/{GrokMoveDialog-DqtBggcO.js → GrokMoveDialog-BVG5-cPU.js} +1 -1
- package/dist/assets/{InspectorPanel-B9946G8k.js → InspectorPanel-CtBr7aZo.js} +2 -2
- package/dist/assets/{KeyboardShortcutsModal-3p8-Y0gj.js → KeyboardShortcutsModal-Co3LHjUp.js} +1 -1
- package/dist/assets/{LimixChannelReview-BDF1Ho_G.js → LimixChannelReview-LNSDJ-cn.js} +1 -1
- package/dist/assets/{LiveDesktop-csn9EgQr.js → LiveDesktop-DPs1lypu.js} +1 -1
- package/dist/assets/{LocalVmWorkspace-CY-cK25P.js → LocalVmWorkspace-Bf2EXh1s.js} +1 -1
- package/dist/assets/{MacLocalControl-tjDKmfaz.js → MacLocalControl-BGeq2FOD.js} +1 -1
- package/dist/assets/{MarkdownFilePreview-C9270gON.js → MarkdownFilePreview-BDNgFKxV.js} +1 -1
- package/dist/assets/{MenuMotion-CtV49YrJ.js → MenuMotion-DFWzLAOE.js} +1 -1
- package/dist/assets/{NewBotDialog-QR0H-5OX.js → NewBotDialog-itNxT2iU.js} +1 -1
- package/dist/assets/{PhoneAppDialog-4jvBw2u6.js → PhoneAppDialog-CMtCT9Xu.js} +1 -1
- package/dist/assets/PlacesRail-i-4ph-KR.js +1 -0
- package/dist/assets/{PluginsPanel-DHUbnE7N.js → PluginsPanel-49ZWw79q.js} +2 -2
- package/dist/assets/ProIntroduction-CyKL7OF8.js +1 -0
- package/dist/assets/{RemoteAgentSettingsPanel-Dllevm4e.js → RemoteAgentSettingsPanel-Bbp1t8mD.js} +1 -1
- package/dist/assets/{RoomPanel-Bd_Xtwqu.js → RoomPanel-Gw0rFOk7.js} +1 -1
- package/dist/assets/{RoutinesPage-QcfeQgTy.js → RoutinesPage-Bo4NVg7D.js} +2 -2
- package/dist/assets/SettingsModal-D4XZMVXS.js +19 -0
- package/dist/assets/{ShareTeamDialog-DMqi3pEn.js → ShareTeamDialog-CeT0rE7W.js} +1 -1
- package/dist/assets/{SignedInSites-DayALoO-.js → SignedInSites-BGpe1m04.js} +1 -1
- package/dist/assets/{TeamLibraryPanel-DMAGl5Yz.js → TeamLibraryPanel-SJebr72G.js} +1 -1
- package/dist/assets/{TeamMapPage-MEkKU-EN.js → TeamMapPage-DIiHaEPP.js} +1 -1
- package/dist/assets/{TriggersPage-D3KTWX3z.js → TriggersPage-Dz_RBgRC.js} +1 -1
- package/dist/assets/VisibilitySection-BLgOrAop.js +22 -0
- package/dist/assets/{WebhookTrigger-DJlTvzBb.js → WebhookTrigger-Cw7eIur5.js} +1 -1
- package/dist/assets/{WorksOnGrid-CW82h_3C.js → WorksOnGrid-DJiQ_gRM.js} +1 -1
- package/dist/assets/{abnfDiagram-YUKMZFIV-DmWI1Mtg.js → abnfDiagram-YUKMZFIV-CAhmS2rs.js} +1 -1
- package/dist/assets/{activity-WfPBvs3Z.js → activity-Bi0tXcsw.js} +1 -1
- package/dist/assets/{architectureDiagram-47P4ROYG-rzc3-Q0w.js → architectureDiagram-47P4ROYG-B6w0Yu0g.js} +1 -1
- package/dist/assets/{blockDiagram-E7TT5TSB-VPDyKlQ7.js → blockDiagram-E7TT5TSB-BYtaJu6s.js} +1 -1
- package/dist/assets/{c4Diagram-CRA5TL53-C9OGckku.js → c4Diagram-CRA5TL53-B_FsOyDV.js} +1 -1
- package/dist/assets/{calendar-days-W4JHp6-m.js → calendar-days-B8SfZLZO.js} +1 -1
- package/dist/assets/channel-DVwNbGUM.js +1 -0
- package/dist/assets/{chunk-2Q5K7J3B-EpYkwMC8.js → chunk-2Q5K7J3B-BdKiuWEd.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-DyJEI8X6.js → chunk-5VM5RSS4-CgItQr02.js} +1 -1
- package/dist/assets/{chunk-7TKQ45FW-CJvVxQ2I.js → chunk-7TKQ45FW-BFsWqiRT.js} +1 -1
- package/dist/assets/{chunk-AW2ZBBNX-s78zNrhy.js → chunk-AW2ZBBNX-Cnj5ddTo.js} +1 -1
- package/dist/assets/{chunk-FVRAUYC3-CUPjaz9e.js → chunk-FVRAUYC3-BCqqreNP.js} +2 -2
- package/dist/assets/{chunk-HTAEGDNF-BhuM2dxl.js → chunk-HTAEGDNF-BOE8LQps.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-DAj1UgJ8.js → chunk-JWPE2WC7-DhA4nyzx.js} +1 -1
- package/dist/assets/{chunk-KQW6MTUR-BgfdtkJI.js → chunk-KQW6MTUR-DzXl5ZXS.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-Vak43p0S.js → chunk-XXDRQBXY-C6tPSut7.js} +1 -1
- package/dist/assets/{classDiagram-v2-K4WV4PDN-Cjvbs86l.js → classDiagram-v2-K4WV4PDN-DQW9NJQl.js} +1 -1
- package/dist/assets/{core-x2kyD7fr.js → core-B3WlSEbe.js} +1 -1
- package/dist/assets/{cose-bilkent-JH36ORCC-BEekB3gO.js → cose-bilkent-JH36ORCC-6jNO5GSL.js} +1 -1
- package/dist/assets/{cynefin-EF2NZ3EQ-D3g3_jPk.js → cynefin-EF2NZ3EQ-mnQt4_3K.js} +1 -1
- package/dist/assets/{cynefinDiagram-3GCD6N5R-13xmjXZj.js → cynefinDiagram-3GCD6N5R-DoEMDFuf.js} +1 -1
- package/dist/assets/{dagre-W4DXFKR2-CHAV8s2t.js → dagre-W4DXFKR2-DoKMCbtK.js} +1 -1
- package/dist/assets/de-C8GllVmL.js +8 -0
- package/dist/assets/{diagram-2UJZ2QOL-DgwdzZN7.js → diagram-2UJZ2QOL-dVwBPQ-y.js} +1 -1
- package/dist/assets/{diagram-OVF4WLC6-DobmWwa_.js → diagram-OVF4WLC6-xIwVUznT.js} +1 -1
- package/dist/assets/{diagram-PFPMY2P6-CWjTVc0N.js → diagram-PFPMY2P6-DAkRkPXu.js} +1 -1
- package/dist/assets/{diagram-UMYRVEAY-CAruZkhk.js → diagram-UMYRVEAY-YE49n-np.js} +1 -1
- package/dist/assets/{diagram-YEKJPTXX-Bcs89mQN.js → diagram-YEKJPTXX-DQkmy5qU.js} +1 -1
- package/dist/assets/{diagram-ZIFT7M5P-Dz-O18tl.js → diagram-ZIFT7M5P-u9Uj06_B.js} +1 -1
- package/dist/assets/{ebnfDiagram-VR2GEFS7-CJX4rMIs.js → ebnfDiagram-VR2GEFS7-DoxIDWDW.js} +1 -1
- package/dist/assets/{elk-IJKZMXRS-Byop6FtW.js → elk-IJKZMXRS-DPDeQQIg.js} +1 -1
- package/dist/assets/{erDiagram-O2IAPWRE-ChpLnNCF.js → erDiagram-O2IAPWRE-BHdTvU5H.js} +1 -1
- package/dist/assets/{file-up-G3qWGpEB.js → file-up-BkYyRMzo.js} +1 -1
- package/dist/assets/{flowDiagram-OXPTDLAJ-CWWhkNOE.js → flowDiagram-OXPTDLAJ-ChNmwKMG.js} +1 -1
- package/dist/assets/{ganttDiagram-R7TSEDQI-DMXicWgq.js → ganttDiagram-R7TSEDQI-3Sx3AKf_.js} +1 -1
- package/dist/assets/{gitGraphDiagram-XJZIOB7I-CpiCnPUQ.js → gitGraphDiagram-XJZIOB7I-C67fsohV.js} +1 -1
- package/dist/assets/{import-name-Dob2tT-n.js → import-name-zOg5ckYf.js} +1 -1
- package/dist/assets/index-DhTEAf1-.js +3 -0
- package/dist/assets/{index-B7zM90O2.js → index-Uvk6r9xX.js} +1 -1
- package/dist/assets/{infoDiagram-5W2HQ5XZ-BU9zbv9f.js → infoDiagram-5W2HQ5XZ-CBtxWn_a.js} +1 -1
- package/dist/assets/{ishikawaDiagram-K3B6WC7H-KEjUVvmG.js → ishikawaDiagram-K3B6WC7H-B0368JQ8.js} +1 -1
- package/dist/assets/{journeyDiagram-COXZFDF6-DGU1V_40.js → journeyDiagram-COXZFDF6-BlyoIOJv.js} +1 -1
- package/dist/assets/{kanban-definition-P3RFRI5V-weJ2OFB2.js → kanban-definition-P3RFRI5V-Cn5CUDI2.js} +1 -1
- package/dist/assets/{mcp-servers-Cki_Gh83.js → mcp-servers-BffOs9kX.js} +1 -1
- package/dist/assets/{mermaid.core-DhSRukyE.js → mermaid.core-BitzuZjJ.js} +4 -4
- package/dist/assets/{mindmap-definition-LZFPQGKD-DKKO0DWj.js → mindmap-definition-LZFPQGKD-Jg9lbPrn.js} +1 -1
- package/dist/assets/{minimize-C16JX5N8.js → minimize-CIbeUlkc.js} +1 -1
- package/dist/assets/{monitor-Bben4nuu.js → monitor-CQgH3Q9j.js} +1 -1
- package/dist/assets/{new-bot-Cdx_YpVT.js → new-bot-D75cIR6C.js} +2 -2
- package/dist/assets/org-library-pEzmTM3q.js +1 -0
- package/dist/assets/{package-format-C4A5Q4UD.js → package-format-C8RU0HIi.js} +2 -2
- package/dist/assets/{pegDiagram-BGZESJAR-CNNprTkt.js → pegDiagram-BGZESJAR-CnAlnJHt.js} +1 -1
- package/dist/assets/{pieDiagram-CAPJLFHJ-pS8U8zdK.js → pieDiagram-CAPJLFHJ-DaL17-zU.js} +1 -1
- package/dist/assets/pt-br-DiNqB940.js +13 -0
- package/dist/assets/{quadrantDiagram-GDMTTRAM-CLk_fr2j.js → quadrantDiagram-GDMTTRAM-BJHzyXHs.js} +1 -1
- package/dist/assets/rail-BDfsZpav.js +1 -0
- package/dist/assets/{railroadDiagram-SM67HX2B-DH8VPMJG.js → railroadDiagram-SM67HX2B-Cw9re6eo.js} +1 -1
- package/dist/assets/{remote-desktop-panel-XKcfTfrc.js → remote-desktop-panel-BI4lP7pc.js} +1 -1
- package/dist/assets/{requirementDiagram-X7JNWC4A-CoHRI7dx.js → requirementDiagram-X7JNWC4A-Cd7X7PJA.js} +1 -1
- package/dist/assets/{sankeyDiagram-UM26HJRW-2zcVfvWw.js → sankeyDiagram-UM26HJRW-nufeOHip.js} +1 -1
- package/dist/assets/{sequenceDiagram-ZO4K6R2Y-B0d21eid.js → sequenceDiagram-ZO4K6R2Y-CMZoHw7j.js} +1 -1
- package/dist/assets/{sizeCapture-INFHLROL-CcYkvoh7.js → sizeCapture-INFHLROL-DPZOqMVW.js} +1 -1
- package/dist/assets/{stateDiagram-v2-TBUQTH76-B5EilR72.js → stateDiagram-v2-TBUQTH76-BpWOIyFw.js} +1 -1
- package/dist/assets/styles-BvB4UlHn.js +79 -0
- package/dist/assets/styles-Ce5Qc_2r.css +1 -0
- package/dist/assets/{swimlanes-N4OXWK64-xM7mNll9.js → swimlanes-N4OXWK64-BNx8ZaTX.js} +1 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-BO73RuC_.js +8 -0
- package/dist/assets/{team-share-Bp69YR8I.js → team-share-CNY994iy.js} +1 -1
- package/dist/assets/{timeline-definition-YOQAKGHF-DM6SmhCQ.js → timeline-definition-YOQAKGHF-L78B2xWx.js} +1 -1
- package/dist/assets/{usecaseDiagram-VIAY4XPW-DiUdGN3G.js → usecaseDiagram-VIAY4XPW-gU5zWpPp.js} +1 -1
- package/dist/assets/{vennDiagram-BLWOH2XV-DrtmNBp4.js → vennDiagram-BLWOH2XV-pdiz8880.js} +1 -1
- package/dist/assets/vi-Cbg_srO_.js +15 -0
- package/dist/assets/{wardleyDiagram-YMQ3BMBF-D7jihWm5.js → wardleyDiagram-YMQ3BMBF-F-D92MhK.js} +1 -1
- package/dist/assets/{xychartDiagram-TAQBALBS-BCk-D9Uj.js → xychartDiagram-TAQBALBS-DKMdsWWR.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/rail.html +5 -5
- package/dist-server/bot-box/box-check.js +10 -10
- package/dist-server/cloud-home-start.js +5 -5
- package/dist-server/container-mcp.js +2 -2
- package/dist-server/drivers/agents-proxy.js +128 -126
- package/dist-server/index.js +8241 -7922
- package/dist-server/mcp-gate.js +18 -17
- package/dist-server/openmausbot.js +1153 -1119
- package/dist-server/package.json +1 -1
- package/dist-server/pair-cli.js +1028 -997
- package/dist-server/server/activity.js +1 -0
- package/dist-server/server/agents-turn.js +2 -1
- package/dist-server/server/app-settings/host.js +187 -0
- package/dist-server/server/app-settings/picture-file.js +62 -0
- package/dist-server/server/app-settings/registry-bots.js +147 -0
- package/dist-server/server/app-settings/registry-config.js +190 -0
- package/dist-server/server/app-settings/registry-pictures.js +59 -0
- package/dist-server/server/app-settings/registry-window.js +35 -0
- package/dist-server/server/app-settings/registry.js +287 -0
- package/dist-server/server/attachments.js +16 -12
- package/dist-server/server/automation-reports.js +11 -1
- package/dist-server/server/bot-attachment.js +34 -10
- package/dist-server/server/bot-box/env.js +2 -2
- package/dist-server/server/bot-box/plan.js +1 -1
- package/dist-server/server/cloud-home-start.js +2 -0
- package/dist-server/server/config.js +1 -0
- package/dist-server/server/drivers/acp/client-path.js +39 -0
- package/dist-server/server/drivers/acp/core.js +9 -37
- package/dist-server/server/drivers/agents-app-settings-tool.js +22 -0
- package/dist-server/server/drivers/agents-call.js +8 -3
- package/dist-server/server/drivers/agents-catalog-profile.js +2 -1
- package/dist-server/server/drivers/agents-catalog.js +19 -2
- package/dist-server/server/drivers/agents-claude-defer.js +38 -0
- package/dist-server/server/drivers/agents-mcp-env.js +2 -2
- package/dist-server/server/drivers/agents-mcp.js +2 -1
- package/dist-server/server/drivers/agents-proxy.js +0 -1
- package/dist-server/server/drivers/agents-tool-groups.js +45 -0
- package/dist-server/server/drivers/antigravity-acp.js +6 -2
- package/dist-server/server/drivers/antigravity-skills.js +107 -0
- package/dist-server/server/drivers/antigravity.js +9 -1
- package/dist-server/server/drivers/claude-bot-settings.js +22 -1
- package/dist-server/server/drivers/claude-tool-search.js +20 -2
- package/dist-server/server/drivers/claude.js +12 -12
- package/dist-server/server/drivers/ollama-context.js +5 -2
- package/dist-server/server/drivers/openai-chat.js +10 -10
- package/dist-server/server/drivers/retry.js +3 -2
- package/dist-server/server/email/host.js +6 -2
- package/dist-server/server/engine-handshake.js +1 -0
- package/dist-server/server/generated-image.js +1 -1
- package/dist-server/server/host/bot-holds.js +76 -0
- package/dist-server/server/host/fill-login-turn.js +2 -2
- package/dist-server/server/host/handoff-limits.js +30 -0
- package/dist-server/server/host/limit-takeover.js +11 -0
- package/dist-server/server/host/peer-limit-resend.js +147 -0
- package/dist-server/server/host/skills-library.js +15 -1
- package/dist-server/server/host/trust-answers.js +42 -0
- package/dist-server/server/imported-skills.js +15 -4
- package/dist-server/server/index.js +109 -125
- package/dist-server/server/limit-poll.js +32 -0
- package/dist-server/server/limit-reset-owed.js +15 -0
- package/dist-server/server/limit-resets.js +33 -8
- package/dist-server/server/login-fill.js +37 -9
- package/dist-server/server/mcp-gate-config.js +28 -0
- package/dist-server/server/mcp-gate.js +8 -2
- package/dist-server/server/message-file.js +10 -1
- package/dist-server/server/quota-switch.js +7 -5
- package/dist-server/server/replies.js +1 -1
- package/dist-server/server/request-auth.js +7 -4
- package/dist-server/server/routes/app-settings.js +46 -0
- package/dist-server/server/routes/bot-holds.js +24 -0
- package/dist-server/server/routes/bot-patch.js +7 -0
- package/dist-server/server/routes/call-route.js +16 -0
- package/dist-server/server/routes/channels.js +45 -38
- package/dist-server/server/routes/custom-domain.js +36 -0
- package/dist-server/server/routes/sidebar-sections.js +1 -0
- package/dist-server/server/routes/threads.js +1 -1
- package/dist-server/server/routine-lines.js +25 -0
- package/dist-server/server/routines.js +9 -5
- package/dist-server/server/runtime/envelope.js +3 -0
- package/dist-server/server/runtime/store.js +1 -0
- package/dist-server/server/send-idempotency.js +43 -0
- package/dist-server/server/shared-computers.js +35 -6
- package/dist-server/server/themes/history.js +54 -0
- package/dist-server/server/themes/routes.js +136 -0
- package/dist-server/server/themes/store.js +266 -0
- package/dist-server/server/themes/tool.js +151 -0
- package/dist-server/server/tool-groups.js +12 -0
- package/dist-server/server/turn-continuation.js +6 -6
- package/dist-server/shared/app-settings.js +60 -0
- package/dist-server/shared/bot-limit.js +2 -0
- package/dist-server/shared/plain-preview.js +3 -2
- package/dist-server/shared/theme.js +240 -0
- package/dist-server/shared/tool-groups.js +27 -0
- package/dist-server/src/lib/composer-attachments.js +22 -6
- package/dist-server/vps-container-mcp.js +12 -12
- package/dist-server/workspace-backup.worker.js +2 -2
- package/package.json +1 -1
- package/dist/assets/App-BjHYb_ps.js +0 -243
- package/dist/assets/BotSettingsDialog-D8LUP9Jn.js +0 -16
- package/dist/assets/CloudAddDialog-BbmxUPbT.js +0 -1
- package/dist/assets/ComputerFilesPane-Df6Y0sr2.js +0 -1
- package/dist/assets/PlacesRail-COZEZH0n.js +0 -57
- package/dist/assets/ProIntroduction-Cc_7SVv1.js +0 -1
- package/dist/assets/SettingsModal-MzznkaJe.js +0 -19
- package/dist/assets/VisibilitySection-ajWCQrhN.js +0 -22
- package/dist/assets/channel-DAFePtOr.js +0 -1
- package/dist/assets/de-CJcRve_J.js +0 -8
- package/dist/assets/index-C2Sr_aMA.js +0 -2
- package/dist/assets/org-library-tRxkixxQ.js +0 -1
- package/dist/assets/pt-br-Dr9a700a.js +0 -13
- package/dist/assets/rail-CpM5o3ti.js +0 -1
- package/dist/assets/styles-Cbtcp5Re.js +0 -23
- package/dist/assets/styles-rYmbSF4Y.css +0 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-CnVwW_RC.js +0 -8
- package/dist/assets/vi-vTat5qyz.js +0 -15
- package/dist-server/server/limix-managed-grant.js +0 -110
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
// The server's own settings from the Settings pages, each applied with Undo. Writes go through PUT /api/config (or the one
|
|
2
|
+
// route the page itself calls), so that route's checks, side effects and broadcasts still run.
|
|
3
|
+
import { randomUUID } from "node:crypto";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { IMAGE_PROVIDERS } from "../../shared/image-generation.js";
|
|
6
|
+
import { EFFORT_LEVELS } from "../../shared/wire.js";
|
|
7
|
+
import { DEFAULT_WINDOW_MINUTES } from "../cache-keepwarm.js";
|
|
8
|
+
import { botsTowardLimit } from "../../shared/bot-limit.js";
|
|
9
|
+
import { CONFIG_PATCH_FIELDS as F, MAX_THREAD_EVENT_LOG_BYTES, MIN_THREAD_EVENT_LOG_BYTES } from "../config.js";
|
|
10
|
+
import { display, withoutKeys } from "./registry.js";
|
|
11
|
+
/** Security: what a bot or card reads of a section never carries a key, token, secret or password field. */
|
|
12
|
+
const visible = (value) => (value && typeof value === "object" && !Array.isArray(value)
|
|
13
|
+
? Object.fromEntries(Object.entries(value).filter(([field]) => !/key|token|secret|password/i.test(field)).map(([field, inner]) => [field, visible(inner)]))
|
|
14
|
+
: value);
|
|
15
|
+
const fields = (value) => Object.entries(value).map(([field, inner]) => `${field} ${display(inner) || "cleared"}`).join(", ");
|
|
16
|
+
const quoted = (text) => `"${text.length > 160 ? `${text.slice(0, 160)}…` : text}"`;
|
|
17
|
+
const nonEmpty = (schema) => schema.refine((value) => Object.keys(value).length > 0, "name at least one field");
|
|
18
|
+
const imageSlot = z.object({ provider: z.enum(IMAGE_PROVIDERS), model: z.string().trim().max(200).optional() }).strict();
|
|
19
|
+
export function configEntries(deps, writable) {
|
|
20
|
+
const cfg = deps.cfg;
|
|
21
|
+
/** A setting saved with PUT /api/config; `says` is the applied card's line, else it shows before → after. */
|
|
22
|
+
const section = (spec) => writable({
|
|
23
|
+
id: spec.id, label: spec.label, help: spec.help, where: spec.where, synonyms: spec.synonyms, value: spec.value, allowed: spec.allowed,
|
|
24
|
+
current: spec.current, read: spec.read ?? (() => display(visible(spec.current()))), write: (value) => deps.saveConfig(spec.patch(value)),
|
|
25
|
+
...(spec.says ? { describe: (value) => ({ change: spec.says(value) }) } : {}),
|
|
26
|
+
});
|
|
27
|
+
const feature = (id, label, help, where, synonyms, field, onUnlessFalse, yes, no) => section({
|
|
28
|
+
id, label, help, where, synonyms, value: z.boolean(), allowed: "true or false",
|
|
29
|
+
current: () => { const set = cfg().features?.[field]; return onUnlessFalse ? set !== false : set === true; },
|
|
30
|
+
patch: (on) => ({ features: { [field]: on } }), says: (on) => (on ? yes : no),
|
|
31
|
+
});
|
|
32
|
+
const libraryList = async () => ((await deps.read("skills", "/api/skills-library"))?.skills ?? []);
|
|
33
|
+
/** The bots a Starter Cloud's limit counts that are awake now, as POST /api/starter/awake takes them. */
|
|
34
|
+
const awakeNow = () => { const paused = deps.paused(); return deps.bots().filter((bot) => botsTowardLimit([bot]) === 1 && !bot.chiefOfStaff && !paused.includes(bot.id)).map((bot) => bot.id); };
|
|
35
|
+
const botName = (id) => deps.bots().find((bot) => bot.id === id)?.name;
|
|
36
|
+
return [
|
|
37
|
+
section({
|
|
38
|
+
id: "ai.backupModel", label: "Automatic recovery", help: "When a bot's engine fails before any work starts, try once more on a backup model.", where: "Settings → AI",
|
|
39
|
+
synonyms: ["backup model", "fallback", "recovery", "automatic recovery"], value: F.automaticRecovery.unwrap(), allowed: '{"enabled":false} or {"enabled":true,"backup":{"instanceId","model"}} from list_models',
|
|
40
|
+
current: () => cfg().automaticRecovery ?? { enabled: false }, patch: (automaticRecovery) => ({ automaticRecovery }),
|
|
41
|
+
says: ({ enabled, backup }) => (enabled && backup ? `Turn on automatic recovery: a bot whose engine fails before any work starts tries once more on ${backup.instanceId} / ${backup.model}` : "Turn off automatic recovery"),
|
|
42
|
+
}),
|
|
43
|
+
section({
|
|
44
|
+
id: "ai.routing", label: "Decision and extraction", help: "The small model that decides who answers in rooms and sorts the inbox (Jev or OpenRouter). Its keys are set with keys.* or in Settings.", where: "Settings → AI",
|
|
45
|
+
synonyms: ["decision", "extraction", "routing", "who answers", "jev", "openrouter", "workers ai", "cloudflare"],
|
|
46
|
+
value: nonEmpty(withoutKeys(F.decider.unwrap().omit({ key: true, openrouterKey: true, workersAiToken: true }).strict())),
|
|
47
|
+
allowed: '{"enabled"?,"provider"?:"jev"|"openrouter"|"off","openrouterModel"?,"openrouterApi"?:"chat"|"decisions","jobs"?:{"roomRouting"?,"inboxTriage"?},"workersAiAccountId"?, addresses?}',
|
|
48
|
+
current: () => cfg().decider ?? {}, patch: (decider) => ({ decider }),
|
|
49
|
+
says: (decider) => `Decision and extraction: ${fields(decider)}. Decisions send conversation text to the chosen provider, off this computer`,
|
|
50
|
+
}),
|
|
51
|
+
section({
|
|
52
|
+
id: "ai.images", label: "Image generation", help: "Which provider and model make images, a fallback, and how many images one turn may make. Keys are set with keys.* or in Settings.", where: "Settings → AI",
|
|
53
|
+
synonyms: ["images", "image generation", "picture", "generate"],
|
|
54
|
+
value: nonEmpty(withoutKeys(z.object({ primary: imageSlot.optional(), fallback: imageSlot.nullable().optional(), maxPerTurn: z.number().int().min(1).max(10).optional(), customUrl: z.string().trim().max(2048).optional() }).strict())),
|
|
55
|
+
allowed: `{"primary"?:{"provider","model"?},"fallback"?:{...}|null,"maxPerTurn"?:1-10,"customUrl"?} with provider one of ${IMAGE_PROVIDERS.join(", ")}`,
|
|
56
|
+
current: () => cfg().imageGen ?? {}, patch: (imageGen) => ({ imageGen }),
|
|
57
|
+
says: (imageGen) => `Image generation: ${fields(imageGen)}. Image prompts go to the chosen provider, off this computer`,
|
|
58
|
+
}),
|
|
59
|
+
section({
|
|
60
|
+
id: "profile.name", label: "Your name", help: "What bots call you.", where: "Settings → You and your bots", synonyms: ["my name", "name", "profile", "about me"],
|
|
61
|
+
value: z.string().trim().max(200), allowed: "your name, or empty to clear", current: () => cfg().profile?.name ?? "", patch: (name) => ({ profile: { name } }),
|
|
62
|
+
}),
|
|
63
|
+
section({
|
|
64
|
+
id: "profile.email", label: "Your email", help: "Your email address, for bots that write on your behalf. It stays on this computer.", where: "Settings → You and your bots", synonyms: ["email", "my email", "profile"],
|
|
65
|
+
value: z.union([z.literal(""), z.string().trim().email().max(320)]), allowed: "an email address, or empty to clear", current: () => cfg().profile?.email ?? "", patch: (email) => ({ profile: { email } }),
|
|
66
|
+
}),
|
|
67
|
+
section({
|
|
68
|
+
id: "profile.aboutMe", label: "About you", help: "What every bot knows about you.", where: "Settings → You and your bots", synonyms: ["about me", "about you", "profile", "bio"],
|
|
69
|
+
value: z.string().max(4000), allowed: "text up to 4000 characters, or empty to clear", current: () => cfg().profile?.aboutMe ?? "", read: () => cfg().profile?.aboutMe ?? "",
|
|
70
|
+
patch: (aboutMe) => ({ profile: { aboutMe } }), says: (text) => (text ? `Tell every bot this about you: ${quoted(text)}` : "Clear what every bot knows about you"),
|
|
71
|
+
}),
|
|
72
|
+
section({
|
|
73
|
+
id: "bots.everyBotRules", label: "Rules for every bot", help: "Instructions every bot follows, ahead of its own.", where: "Settings → You and your bots", synonyms: ["rules", "rules for every bot", "instructions", "every bot"],
|
|
74
|
+
value: z.string().max(4000), allowed: "text up to 4000 characters, or empty to clear", current: () => cfg().everyBotRules ?? "", read: () => cfg().everyBotRules ?? "",
|
|
75
|
+
patch: (everyBotRules) => ({ everyBotRules }), says: (text) => (text ? `Make every bot follow: ${quoted(text)}` : "Clear the rules every bot follows"),
|
|
76
|
+
}),
|
|
77
|
+
section({
|
|
78
|
+
id: "bots.newBotEffort", label: "Effort for new bots", help: "The reasoning effort a new bot starts with when its model names none; null uses the engine's own.", where: "Settings → You and your bots",
|
|
79
|
+
synonyms: ["effort", "reasoning", "new bots", "thinking"], value: z.enum(EFFORT_LEVELS).nullable(), allowed: `${EFFORT_LEVELS.join(", ")}, or null`,
|
|
80
|
+
current: () => cfg().newBots?.effort ?? null, patch: (effort) => ({ newBots: { effort } }),
|
|
81
|
+
}),
|
|
82
|
+
section({
|
|
83
|
+
id: "bots.newBotTemplate", label: "New-bot template", help: "Everything a new bot starts with (profile, model, approval level, skills), as the new-bot dialog saves it. get shows the current template.", where: "Settings → You and your bots",
|
|
84
|
+
synonyms: ["new bots", "defaults", "template", "preset"], value: withoutKeys(F.newBotDefaults.unwrap()), allowed: "the whole template object, as get shows it",
|
|
85
|
+
current: () => cfg().newBotDefaults, patch: (newBotDefaults) => ({ newBotDefaults }),
|
|
86
|
+
says: (template) => `Replace the template every new bot starts from with: ${display(visible(template)).slice(0, 400)}`,
|
|
87
|
+
}),
|
|
88
|
+
section({
|
|
89
|
+
id: "bots.keepWarm", label: "Keep caches warm", help: "After a turn, keep each bot's prompt cache warm so its next reply is faster and cheaper; it costs a few tokens.", where: "Settings → You and your bots",
|
|
90
|
+
synonyms: ["keep warm", "cache", "prompt cache"], value: F.cacheKeepWarm.unwrap(), allowed: '{"enabled":true|false,"windowMinutes"?:15-1440}',
|
|
91
|
+
current: () => cfg().cacheKeepWarm ?? { enabled: false }, patch: (cacheKeepWarm) => ({ cacheKeepWarm }),
|
|
92
|
+
says: ({ enabled, windowMinutes }) => (enabled ? `Keep prompt caches warm for ${windowMinutes ?? DEFAULT_WINDOW_MINUTES} minutes after each turn (spends tokens)` : "Stop keeping prompt caches warm"),
|
|
93
|
+
}),
|
|
94
|
+
feature("bots.skillAuthoring", "Bots write their own skills", "Bots may draft skills for your review.", "Settings → You and your bots", ["skills", "write skills", "early", "experimental"], "skillAuthoring", true, "Let bots draft skills for your review", "Stop bots drafting skills"),
|
|
95
|
+
section({
|
|
96
|
+
id: "bots.skillReview", label: "Skill review", help: "The bot's engine reviews long conversations and updates its learned skills, every so many tool steps.", where: "Settings → You and your bots",
|
|
97
|
+
synonyms: ["skill review", "learned skills", "early"], value: z.object({ enabled: z.boolean(), steps: z.number().int().min(3).max(100).optional() }).strict(), allowed: '{"enabled":true|false,"steps"?:3-100}',
|
|
98
|
+
current: () => ({ enabled: cfg().features?.skillReview === true, ...(cfg().features?.skillReviewSteps ? { steps: cfg().features?.skillReviewSteps } : {}) }),
|
|
99
|
+
patch: ({ enabled, steps }) => ({ features: { skillReview: enabled, ...(steps ? { skillReviewSteps: steps } : {}) } }),
|
|
100
|
+
says: ({ enabled, steps }) => (enabled ? `Let each bot's engine review long conversations${steps ? ` every ${steps} tool steps` : ""} and update its skills` : "Stop reviewing conversations for skills"),
|
|
101
|
+
}),
|
|
102
|
+
section({
|
|
103
|
+
id: "bots.shareLearnedSkills", label: "Share learned skills", help: "Whether a skill one bot learns goes to the shared library: off, ask you first, or automatically.", where: "Settings → You and your bots",
|
|
104
|
+
synonyms: ["share skills", "skills library", "learned skills"], value: z.enum(["off", "ask", "auto"]), allowed: "off, ask or auto",
|
|
105
|
+
current: () => cfg().features?.shareLearnedSkills ?? "off", patch: (shareLearnedSkills) => ({ features: { shareLearnedSkills } }),
|
|
106
|
+
}),
|
|
107
|
+
section({
|
|
108
|
+
id: "threads.eventLogMaxBytes", label: "Thread log size limit", help: "The most bytes each conversation's event log keeps; null keeps it all.", where: "Settings → Data",
|
|
109
|
+
synonyms: ["log size", "storage", "event log", "cleanup"], value: z.number().int().min(MIN_THREAD_EVENT_LOG_BYTES).max(MAX_THREAD_EVENT_LOG_BYTES).nullable(),
|
|
110
|
+
allowed: `${MIN_THREAD_EVENT_LOG_BYTES} to ${MAX_THREAD_EVENT_LOG_BYTES} bytes, or null for no limit`,
|
|
111
|
+
current: () => cfg().threads?.eventLogMaxBytes ?? null, read: () => display(cfg().threads?.eventLogMaxBytes ?? "no limit"), patch: (eventLogMaxBytes) => ({ threads: { eventLogMaxBytes } }),
|
|
112
|
+
}),
|
|
113
|
+
feature("appearance.toolCalls", "Show tool calls", "Show each tool a bot runs in the conversation.", "Settings → Appearance", ["tool calls", "tools", "show tools"], "showToolCalls", false, "Show each tool a bot runs in its conversation", "Hide tool runs from conversations"),
|
|
114
|
+
feature("desktops.browser", "Built-in browser", "Bots may use the built-in browser; each bot also has its own switch.", "Settings → Desktops & browser", ["browser", "built-in browser"], "browser", true, "Let bots use the built-in browser", "Turn off the built-in browser for every bot"),
|
|
115
|
+
section({
|
|
116
|
+
id: "desktops.browserLocalNetwork", label: "Browser on your local network", help: "Whether bots' browsers may open sites on this computer's local network.", where: "Settings → Desktops & browser",
|
|
117
|
+
synonyms: ["local network", "lan", "browser sites", "intranet"], value: z.boolean(), allowed: "true or false",
|
|
118
|
+
current: () => cfg().browserEngine?.egress?.localNetwork === true, patch: (localNetwork) => ({ browserEngine: { egress: { localNetwork } } }),
|
|
119
|
+
says: (on) => (on ? "Let bots' browsers open sites on your local network" : "Keep bots' browsers off your local network"),
|
|
120
|
+
}),
|
|
121
|
+
section({
|
|
122
|
+
id: "desktops.browserEngine", label: "Browser engine", help: "What runs bots' browsers: agent-browser (the default) or MausBot's own Chrome driver (early).", where: "Settings → Desktops & browser",
|
|
123
|
+
synonyms: ["browser engine", "chrome", "new browser", "agent-browser"], value: z.enum(["agent-browser", "chrome"]), allowed: "agent-browser or chrome",
|
|
124
|
+
current: () => cfg().browserEngine?.engine ?? "agent-browser", patch: (engine) => ({ browserEngine: { engine } }),
|
|
125
|
+
}),
|
|
126
|
+
feature("desktops.savedSteps", "Saved steps", "Bots may repeat saved browser steps without AI.", "Settings → Desktops & browser", ["saved steps", "repeat", "without ai"], "savedSteps", true, "Let bots repeat saved steps without AI", "Turn off saved steps"),
|
|
127
|
+
section({
|
|
128
|
+
id: "desktops.privateDesktop", label: "Private desktops", help: "How bots share private desktops on this computer: one shared, one per bot, or a pool; how many; and minutes before an idle one stops.", where: "Settings → Desktops & browser",
|
|
129
|
+
synonyms: ["private desktop", "vm", "docker", "podman", "container", "sandbox"],
|
|
130
|
+
value: nonEmpty(F.localVm.unwrap().pick({ mode: true, maxInstances: true, idleTimeoutMinutes: true }).strict()), allowed: '{"mode"?:"shared"|"per-bot"|"pool","maxInstances"?,"idleTimeoutMinutes"?}',
|
|
131
|
+
current: () => cfg().localVm ?? {}, patch: (localVm) => ({ localVm }), says: (localVm) => `Private desktops: ${fields(localVm)}`,
|
|
132
|
+
}),
|
|
133
|
+
feature("computer.sharing", "Computer sharing", "Whether every paired device may lend its computer to bots here. Each lent folder or app is still picked and confirmed on that device.", "Settings → Desktops & browser", ["share computer", "shared computers", "lend", "lending"], "sharedComputers", false, "Let every paired device lend its computer to bots here, not only your own. A lent folder can be used to reach a shell", "Stop every device, your own included, lending its computer to bots here"),
|
|
134
|
+
writable({
|
|
135
|
+
id: "desktops.browserProfiles", label: "Browser profiles", help: "Named browser profiles bots use, each keeping its own logins. Send the full list; leave out id for a new one. Removing one deletes its logins, so only the user does that.",
|
|
136
|
+
where: "Settings → Desktops & browser", synonyms: ["browser profiles", "profiles", "my chrome", "logins"],
|
|
137
|
+
value: z.array(z.object({ id: z.string().regex(/^[a-z0-9-]{1,80}$/).optional(), name: z.string().trim().min(1).max(40), browser: z.literal("chrome").optional() }).strict()).max(20),
|
|
138
|
+
allowed: '[{"id"?,"name","browser"?:"chrome"}]; "chrome" uses your own running Chrome',
|
|
139
|
+
current: () => (cfg().browserProfiles ?? []).map(({ id, name, browser }) => ({ id, name, ...(browser ? { browser } : {}) })),
|
|
140
|
+
read: () => (cfg().browserProfiles ?? []).map((profile) => `${profile.id}: ${profile.name}${profile.browser ? " (your Chrome)" : ""}`).join("; "),
|
|
141
|
+
describe: (next) => {
|
|
142
|
+
const current = cfg().browserProfiles ?? [];
|
|
143
|
+
const gone = current.find((profile) => !next.some((wanted) => wanted.id === profile.id));
|
|
144
|
+
if (gone)
|
|
145
|
+
return { refusal: `Removing the browser profile "${gone.name}" deletes its saved logins, so only the user does that, in Settings → Desktops & browser. Send every current profile.` };
|
|
146
|
+
const unknown = next.find((wanted) => wanted.id && !current.some((profile) => profile.id === wanted.id));
|
|
147
|
+
if (unknown)
|
|
148
|
+
return { refusal: `No browser profile has the id ${unknown.id}. Leave out id for a new profile.` };
|
|
149
|
+
const where = (profile) => (profile.browser ? "your own running Chrome, with its logins" : "the built-in browser");
|
|
150
|
+
const lines = next.flatMap((wanted) => {
|
|
151
|
+
const before = current.find((profile) => profile.id === wanted.id);
|
|
152
|
+
if (!before)
|
|
153
|
+
return [`add the profile "${wanted.name}" on ${where(wanted)}`];
|
|
154
|
+
return [...(before.name !== wanted.name ? [`rename "${before.name}" to "${wanted.name}"`] : []), ...(Boolean(before.browser) !== Boolean(wanted.browser) ? [`move "${wanted.name}" to ${where(wanted)}`] : [])];
|
|
155
|
+
});
|
|
156
|
+
return lines.length ? { change: `Browser profiles: ${lines.join("; ")}` } : { refusal: "That list is the same as the current one." };
|
|
157
|
+
},
|
|
158
|
+
write: (next) => {
|
|
159
|
+
const current = (cfg().browserProfiles ?? []).map(({ id, name, browser }) => ({ id, name, ...(browser ? { browser } : {}) }));
|
|
160
|
+
const browserProfiles = next.map((profile) => ({ ...profile, id: profile.id ?? `profile-${randomUUID().replaceAll("-", "")}` }));
|
|
161
|
+
return deps.saveConfig({ browserProfiles, expectedBrowserProfiles: current });
|
|
162
|
+
},
|
|
163
|
+
}),
|
|
164
|
+
writable({
|
|
165
|
+
id: "bots.awake", label: "Bots kept awake", help: "On a Starter Cloud, which bots stay awake past the plan's limit; the rest pause. Send exactly as many as the plan keeps.", where: "Settings → You and your bots",
|
|
166
|
+
synonyms: ["awake", "paused bots", "starter", "limit"], value: z.array(z.string().regex(/^[\w-]{1,120}$/)).min(1).max(100), allowed: "a list of bot ids",
|
|
167
|
+
current: awakeNow, read: () => (deps.paused().length ? `awake: ${awakeNow().map(botName).join(", ")}` : ""), describe: (ids) => { const missing = ids.find((id) => !botName(id)); return missing ? { refusal: `No bot has the id ${missing}. Use list_bots for the ids.` } : { change: `Keep ${ids.map(botName).join(", ")} awake; your other bots pause` }; },
|
|
168
|
+
write: (awake) => deps.call("starterAwake", "POST", "/api/starter/awake", { awake }),
|
|
169
|
+
}),
|
|
170
|
+
writable({
|
|
171
|
+
id: "skills.library", label: "Skills library", help: "Turn a library skill on or off, or give it to every bot. Library skills are listed in Settings.", where: "Settings → You and your bots",
|
|
172
|
+
synonyms: ["skills", "skill library", "library", "every bot skill"],
|
|
173
|
+
value: z.object({ name: z.string().regex(/^[a-z0-9-]{1,64}$/), enabled: z.boolean().optional(), everyBot: z.boolean().optional() }).strict().refine((value) => (value.enabled === undefined) !== (value.everyBot === undefined), "send enabled or everyBot, one of them"),
|
|
174
|
+
allowed: '{"name","enabled":true|false} or {"name","everyBot":true|false}', read: () => "",
|
|
175
|
+
current: async ({ name, enabled }) => {
|
|
176
|
+
const skill = (await libraryList()).find((one) => one.name === name);
|
|
177
|
+
return skill ? (enabled !== undefined ? { name, enabled: skill.enabled } : { name, everyBot: skill.everyBot }) : undefined;
|
|
178
|
+
},
|
|
179
|
+
describe: ({ name, enabled, everyBot }) => ({ change: enabled !== undefined ? `${enabled ? "Turn on" : "Turn off"} the library skill ${name}` : `${everyBot ? "Give" : "Stop giving"} the library skill ${name} to every bot` }),
|
|
180
|
+
write: ({ name, ...change }) => deps.call("skills", "PATCH", `/api/skills-library/${name}`, change),
|
|
181
|
+
}),
|
|
182
|
+
writable({
|
|
183
|
+
id: "bots.skills", label: "A bot's library skills", help: "Which library skills one bot uses. Send the full list.", where: "a bot's Settings", synonyms: ["skills", "assign skills", "bot skills"],
|
|
184
|
+
value: z.object({ botId: z.string().regex(/^[\w-]{1,120}$/), skills: z.array(z.string().min(1).max(64)).max(200) }).strict(), allowed: '{"botId","skills":[names]}', read: () => "",
|
|
185
|
+
current: ({ botId }) => { const bot = deps.bots().find((one) => one.id === botId); return bot ? { botId, skills: bot.assignedSkills ?? [] } : undefined; },
|
|
186
|
+
describe: ({ botId, skills }) => { const name = botName(botId); return name ? { change: skills.length ? `Give ${name} the library skills ${skills.join(", ")}` : `Take every library skill from ${name}` } : { refusal: `No bot has the id ${botId}. Use list_bots for the ids.` }; },
|
|
187
|
+
write: ({ botId, skills }) => deps.call("skills", "PUT", `/api/bots/${encodeURIComponent(botId)}/skills-library`, { skills }),
|
|
188
|
+
}),
|
|
189
|
+
];
|
|
190
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// A bot's picture and the person's own, from a picture file the bot names; each applies with Undo through the same
|
|
2
|
+
// routes Settings uses, so their checks still run.
|
|
3
|
+
import { basename } from "node:path";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { AVATAR_FOCUS_CENTER, AVATAR_ZOOM_MIN, botAvatarProfile } from "../../shared/bot-avatar.js";
|
|
6
|
+
import { PICTURE_FILE_KINDS, PICTURE_FILE_MAX_BYTES } from "./picture-file.js";
|
|
7
|
+
import { withoutKeys } from "./registry.js";
|
|
8
|
+
const path = z.string().trim().max(4096);
|
|
9
|
+
const SOURCE = `${PICTURE_FILE_KINDS} of up to ${PICTURE_FILE_MAX_BYTES / 1024 / 1024} MB in your workspace, your working folder or this conversation's files`;
|
|
10
|
+
const pictureShown = (one) => Boolean(botAvatarProfile(one).avatarUrl) && botAvatarProfile(one).avatarCrop !== "mascot";
|
|
11
|
+
const MASCOT_LOOK = { avatarUrl: null, avatarCrop: "mascot", avatarZoom: AVATAR_ZOOM_MIN, avatarFocusX: AVATAR_FOCUS_CENTER, avatarFocusY: AVATAR_FOCUS_CENTER };
|
|
12
|
+
export function pictureEntries(deps, writable) {
|
|
13
|
+
const bot = (id) => deps.bots().find((candidate) => candidate.id === id);
|
|
14
|
+
const missing = (id) => `No bot has the id ${id}. Use list_bots for the ids.`;
|
|
15
|
+
const ownPicture = () => deps.cfg().profile?.avatarUrl ?? "";
|
|
16
|
+
return [
|
|
17
|
+
writable({
|
|
18
|
+
id: "bots.picture", label: "Bot picture", where: "a bot's Settings", fromFile: true,
|
|
19
|
+
help: "A bot's own picture, shown instead of its mascot face wherever the bot appears. Use a picture file you have: one you made or downloaded, or one the person sent in this conversation.",
|
|
20
|
+
synonyms: ["picture", "avatar", "photo", "image", "profile picture", "icon", "face", "pfp", "bot picture"],
|
|
21
|
+
value: withoutKeys(z.object({ botId: z.string().regex(/^[\w-]{1,120}$/), path }).strict()),
|
|
22
|
+
allowed: `{"botId","path"}: path is ${SOURCE}; an empty path takes the picture off and brings back the mascot face`,
|
|
23
|
+
read: () => deps.bots().map((one) => `${one.name}: ${pictureShown(one) ? one.avatarUrl : "mascot face"}`).join("; "),
|
|
24
|
+
describe: ({ botId, path: file }) => {
|
|
25
|
+
const one = bot(botId);
|
|
26
|
+
if (!one)
|
|
27
|
+
return { refusal: missing(botId) };
|
|
28
|
+
if (file)
|
|
29
|
+
return { change: `Give ${one.name} the picture ${basename(file)}` };
|
|
30
|
+
return pictureShown(one) ? { change: `Take ${one.name}'s picture off; it shows its mascot face again` } : { refusal: `${one.name} has no picture; it already shows its mascot face.` };
|
|
31
|
+
},
|
|
32
|
+
current: ({ botId }) => {
|
|
33
|
+
const one = bot(botId);
|
|
34
|
+
return one && { botId, avatarUrl: one.avatarUrl ?? "", avatarCrop: one.avatarCrop ?? "mascot", avatarZoom: one.avatarZoom ?? AVATAR_ZOOM_MIN,
|
|
35
|
+
avatarFocusX: one.avatarFocusX ?? AVATAR_FOCUS_CENTER, avatarFocusY: one.avatarFocusY ?? AVATAR_FOCUS_CENTER };
|
|
36
|
+
},
|
|
37
|
+
write: async (value) => {
|
|
38
|
+
const one = bot(value.botId);
|
|
39
|
+
if (!one)
|
|
40
|
+
return missing(value.botId);
|
|
41
|
+
if (value.path !== undefined)
|
|
42
|
+
return deps.patchBot(one.id, { ...MASCOT_LOOK });
|
|
43
|
+
const crop = one.avatarCrop && one.avatarCrop !== "mascot" ? one.avatarCrop : "circle";
|
|
44
|
+
return deps.patchBot(one.id, { avatarUrl: value.avatarUrl || null, avatarCrop: value.avatarCrop ?? crop, avatarZoom: value.avatarZoom ?? AVATAR_ZOOM_MIN,
|
|
45
|
+
avatarFocusX: value.avatarFocusX ?? AVATAR_FOCUS_CENTER, avatarFocusY: value.avatarFocusY ?? AVATAR_FOCUS_CENTER });
|
|
46
|
+
},
|
|
47
|
+
}),
|
|
48
|
+
writable({
|
|
49
|
+
id: "profile.photo", label: "Your photo", where: "Settings → You and your bots", fromFile: true,
|
|
50
|
+
help: "The person's own picture, shown wherever the app shows them. Use a picture file you have: one you made or downloaded, or one the person sent in this conversation.",
|
|
51
|
+
synonyms: ["photo", "avatar", "profile picture", "my picture", "my photo", "pfp", "picture of me"],
|
|
52
|
+
value: z.object({ path }).strict(), allowed: `{"path"}: path is ${SOURCE}; an empty path takes the photo off`,
|
|
53
|
+
read: ownPicture, current: () => ({ avatarUrl: ownPicture() }),
|
|
54
|
+
describe: ({ path: file }) => (file ? { change: `Make ${basename(file)} your photo` }
|
|
55
|
+
: ownPicture() ? { change: "Take your photo off" } : { refusal: "The person has no photo to take off." }),
|
|
56
|
+
write: (value) => deps.saveConfig({ profile: { avatarUrl: value.path !== undefined ? "" : value.avatarUrl ?? "" } }),
|
|
57
|
+
}),
|
|
58
|
+
];
|
|
59
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// More preferences the app window keeps, or reaches through the desktop app's bridge, each applied with Undo on a card
|
|
2
|
+
// saying what it does. A window that can't apply one (a browser has no desktop bridge) refuses it.
|
|
3
|
+
import { PLACE_SWATCHES, TALK_KEYS } from "../../shared/app-settings.js";
|
|
4
|
+
import { personOnly } from "./registry.js";
|
|
5
|
+
const turn = (on, yes, no) => (on ? yes : no);
|
|
6
|
+
export function windowEntries(windowPref) {
|
|
7
|
+
const flag = (id, label, help, where, synonyms, yes, no) => windowPref(id, label, help, where, synonyms, "true or false", { says: (on) => turn(on, yes, no) });
|
|
8
|
+
/** A way in to this computer: a bot may turn it on, but turning it off can cut off the device the person is using now. */
|
|
9
|
+
const wayIn = (id, label, help, synonyms, yes) => windowPref(id, label, help, "Settings → Phone & devices", synonyms, "true (turning it off is done by the person, in Settings)", { says: () => yes, refusal: (on) => (on ? null : personOnly(`Turning off ${label}`, "Settings → Phone & devices")) });
|
|
10
|
+
return [
|
|
11
|
+
flag("appearance.userBubbles", "Coloured messages", "Your own messages take the bot's colour.", "Settings → Appearance", ["bubbles", "message color", "my messages"], "Colour your messages with each bot's colour", "Show your messages in plain grey"),
|
|
12
|
+
flag("appearance.runCard", "This run card", "Show the card that follows a bot's run while it works.", "Settings → Appearance", ["this run", "run card", "progress"], "Show the card that follows each run", "Hide the card that follows each run"),
|
|
13
|
+
flag("appearance.showThreads", "Threads in the sidebar", "List each bot's conversations under it in the sidebar.", "Settings → Appearance", ["threads", "conversations", "sidebar"], "List each bot's threads in the sidebar", "Hide threads from the sidebar"),
|
|
14
|
+
windowPref("appearance.toolsLayout", "Sidebar tools layout", "How the sidebar shows its tools: rows, or a toolbar of icons.", "Settings → Appearance", ["tools layout", "toolbar", "rows"], "rows or toolbar", { says: (layout) => (layout === "rows" ? "Show the sidebar's tools as rows" : "Show the sidebar's tools as a toolbar of icons") }),
|
|
15
|
+
flag("appearance.pinnedCircles", "Pinned bots as circles", "Pinned bots show as a row of circles at the top of the sidebar.", "Settings → Appearance", ["pinned", "circles", "pins"], "Show pinned bots as circles", "Show pinned bots as rows"),
|
|
16
|
+
flag("appearance.universalPins", "Universal pins", "Pinned bots stay pinned in every place on the rail.", "Settings → Appearance", ["universal pins", "pins everywhere"], "Keep pinned bots pinned in every place", "Pin bots in each place on its own"),
|
|
17
|
+
windowPref("appearance.pinnedPages", "Pinned pages", "Web pages pinned beside the chat. Send the full list; chat pages pinned from a conversation stay.", "Settings → Appearance", ["pinned panels", "pinned pages", "web panel", "side page"], 'a list of up to 6 {"name","url"} with http(s) addresses; an empty list unpins every web page', { says: (pages) => (pages.length ? `Pin these pages beside the chat: ${pages.map((page) => `${page.name} (${page.url})`).join(", ")}` : "Unpin every web page beside the chat") }),
|
|
18
|
+
flag("appearance.showComputers", "Show your computers", "The rail of places down the side of the window (desktop app).", "Settings → Appearance", ["rail", "show your computers", "places"], "Show the rail of your computers and Clouds", "Hide the rail of your computers and Clouds"),
|
|
19
|
+
flag("appearance.windowFrame", "Window frame", "Draw the system's own title bar around the window (desktop app; on Windows after a restart).", "Settings → Appearance", ["window frame", "title bar"], "Draw the system title bar around the window", "Draw the window without the system title bar"),
|
|
20
|
+
windowPref("appearance.sidebarColor", "Sidebar colour", "This place's colour, tinting its sidebar and its circle on the rail (desktop app).", "Settings → Overview", ["sidebar color", "sidebar colour", "tint", "cloud color", "place color"], `${PLACE_SWATCHES.join(", ")} or none`, { says: (swatch) => (swatch === "none" ? "Take the colour off this place's sidebar" : `Tint this place's sidebar ${swatch}`) }),
|
|
21
|
+
windowPref("general.followUp", "Follow-up while a bot works", "What sending does while a bot is busy: steer its current run, or queue the message.", "Settings → General", ["follow up", "steer", "queue"], "steer or queue", { says: (choice) => (choice === "steer" ? "Send follow-ups into the bot's current run" : "Queue follow-ups until the bot's run ends") }),
|
|
22
|
+
flag("general.finishedNotifications", "Notifications on this device", "A system notification when a bot finishes or needs you; turning it on asks the system first.", "Settings → General", ["notify", "system notifications", "desktop notifications"], "Show a system notification when a bot finishes or needs you", "Stop system notifications from bots"),
|
|
23
|
+
flag("general.notificationFeed", "Notification feed", "Keep a feed of what bots did in the notifications panel.", "Settings → General", ["feed", "notification feed", "inbox"], "Keep a feed of bot updates", "Turn off the feed of bot updates"),
|
|
24
|
+
flag("general.analytics", "Usage analytics", "Send anonymous usage data to MausBot (PostHog) to improve the app.", "Settings → General", ["analytics", "telemetry", "privacy", "tracking"], "Send anonymous usage data from this app to MausBot's analytics (PostHog), off this computer", "Stop sending usage analytics"),
|
|
25
|
+
flag("general.openAtLogin", "Open at login", "Start MausBot when you log in to this computer (desktop app).", "Settings → General", ["startup", "launch", "login", "open at login"], "Open MausBot when you log in", "Don't open MausBot at login"),
|
|
26
|
+
windowPref("general.talkShortcut", "Talk shortcut", "A key held anywhere on this Mac to talk to MausBot (desktop app).", "Settings → General", ["talk", "voice", "dictation", "microphone", "hotkey"], `{"enabled":true|false,"key":${TALK_KEYS.map((key) => `"${key}"`).join(" | ")}}`, {
|
|
27
|
+
says: ({ enabled, key }) => (enabled ? `Hold ${key.replaceAll("-", "+")} anywhere to talk to MausBot` : "Turn off the talk shortcut"),
|
|
28
|
+
}),
|
|
29
|
+
flag("account.productEmails", "Product update emails", "MausBot emails you product updates.", "Settings → Your account", ["emails", "newsletter", "product updates", "email updates"], "Get MausBot product update emails (your email address is sent to MausBot)", "Stop MausBot product update emails"),
|
|
30
|
+
wayIn("remote.wifi", "Same Wi-Fi", "Paired phones reach this computer on the same Wi-Fi network.", ["wifi", "wi-fi", "lan", "local network", "remote access"], "Let your paired phones reach this computer on the same Wi-Fi"),
|
|
31
|
+
wayIn("remote.relay", "Reach from anywhere", "Paired phones reach this computer from anywhere through MausBot's relay (needs a MausBot sign-in).", ["relay", "anywhere", "away", "remote access"], "Let your paired phones reach this computer from anywhere, through MausBot's relay"),
|
|
32
|
+
wayIn("remote.tailscale", "Tailscale", "Paired devices reach this computer over your Tailscale network (Tailscale must be installed and signed in).", ["tailscale", "tailnet", "remote access"], "Let your devices reach this computer over Tailscale"),
|
|
33
|
+
flag("remote.keepAwake", "Keep awake", "Keep this computer awake while a way in is on, so paired phones can reach it.", "Settings → Phone & devices", ["sleep", "awake", "overnight"], "Keep this computer awake so paired phones can reach it", "Let this computer sleep"),
|
|
34
|
+
];
|
|
35
|
+
}
|