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
|
@@ -145,7 +145,9 @@ import { vpsLeftBehindNotice } from "./cloud-backend.js";
|
|
|
145
145
|
import * as composio from "./composio.js";
|
|
146
146
|
import { appSandboxRule, connectorCallFromFrame, connectorRefusalText, connectorScopeRefusalText, connectorUnrecognizedText, evaluateConnectorTools } from "./connector-verdict.js";
|
|
147
147
|
import { signInCardText } from "./connector-card-text.js";
|
|
148
|
-
import { BOT_PAUSED_CODE } from "../shared/bot-limit.js";
|
|
148
|
+
import { BOT_HELD_CODE, BOT_PAUSED_CODE } from "../shared/bot-limit.js";
|
|
149
|
+
import { createBotHolds } from "./host/bot-holds.js";
|
|
150
|
+
import { createBotHoldRoutes } from "./routes/bot-holds.js";
|
|
149
151
|
import { createStarterAwake } from "./host/starter-awake.js";
|
|
150
152
|
import { createStarterCaps } from "./host/starter-caps.js";
|
|
151
153
|
import { createStarterAwakeRoutes } from "./routes/starter-awake.js";
|
|
@@ -195,10 +197,12 @@ import { RETRY_MAX_ATTEMPTS } from "./drivers/retry.js";
|
|
|
195
197
|
import { recoveryCapabilityError, startupBackups } from "./automatic-recovery.js";
|
|
196
198
|
import { createQuotaSwitchHost } from "./host/quota-switch.js";
|
|
197
199
|
import { quotaSwitchEnabled } from "./quota-switch.js";
|
|
200
|
+
import { createPeerLimitResend } from "./host/peer-limit-resend.js";
|
|
198
201
|
import { decodeGeneratedImage } from "./generated-image.js";
|
|
199
202
|
import { createMcpServersHost } from "./host/mcp-servers-host.js";
|
|
200
203
|
import { createMcpKeys } from "./vault/mcp-keys.js";
|
|
201
|
-
import { createLimitTakeover, signedOutStop } from "./host/limit-takeover.js";
|
|
204
|
+
import { createLimitTakeover, signedOutStop, turnRefusal } from "./host/limit-takeover.js";
|
|
205
|
+
import { createHandoffLimits } from "./host/handoff-limits.js";
|
|
202
206
|
import { isRemoteMcpServer, parseStoredMcpServer, } from "./mcp-registry.js";
|
|
203
207
|
import { attachCustomMcp } from "./mcp-result-budget.js";
|
|
204
208
|
import { mcpToolProblem } from "./mcp-failure.js";
|
|
@@ -368,7 +372,7 @@ import { LocalVmSeatPool } from "./local-vm-seat-pool.js";
|
|
|
368
372
|
import { createLoopGuard, loopGuardSettings } from "./host/loop-guard.js";
|
|
369
373
|
import { createPersonFirst } from "./host/person-first.js";
|
|
370
374
|
import { createRunOwners, runActorOf } from "./host/run-owner.js";
|
|
371
|
-
import { claudeUserSkillsEnabled
|
|
375
|
+
import { claudeUserSkillsEnabled } from "./turn-settings.js";
|
|
372
376
|
import { addHeldSecretScrubber, redactSecretsInText, scrubHeldSecrets } from "./redact.js";
|
|
373
377
|
import * as vps from "./vps-computer.js";
|
|
374
378
|
import { vpsConfigForBot, vpsSshAliasForBot } from "./vps-hosts.js";
|
|
@@ -405,7 +409,7 @@ import { ownerSpokeOnly } from "./cloud-routine-level.js";
|
|
|
405
409
|
import { routineRunCard, routineRunFallbackText } from "./routine-run-card.js";
|
|
406
410
|
import { activeRoutinesContext } from "./active-routines-context.js";
|
|
407
411
|
import { createRefusedHandoffs } from "./host/refused-handoffs.js";
|
|
408
|
-
import { automationContextText, createAutomationReports, newestAutomationLines } from "./automation-reports.js";
|
|
412
|
+
import { automationContextText, createAutomationReports, newestAutomationLines, routineRunNeedsReview } from "./automation-reports.js";
|
|
409
413
|
import { createAutomationDestinations } from "./automation-destinations.js";
|
|
410
414
|
import { createTeamRoutines } from "./host/team-routines.js";
|
|
411
415
|
import { botOwner } from "../shared/bot-owner.js";
|
|
@@ -453,6 +457,8 @@ import { cancelWaitFromCard, createWaitHost, waitRunChat } from "./wait-host.js"
|
|
|
453
457
|
import { createWaitRoutes, findWaitPeer, hostWaitRefusal, waitSourceRefusal } from "./routes/waits.js";
|
|
454
458
|
import { AGENTS_NODE_FLAG, SPAWNED_PROXIES } from "./proxy-paths.js";
|
|
455
459
|
import { agentsProxyLaunch, agentsToolBridgeEnv, applyAgentsBridge, bridgedToolTitle, turnEngine } from "./agents-bridge-switch.js";
|
|
460
|
+
import { serverTurnedOff } from "./drivers/agents-tool-groups.js";
|
|
461
|
+
import { availableToolGroups, toolsOffPart } from "./tool-groups.js";
|
|
456
462
|
import { agentsServerEnv, botDrivenConversation, COMPUTER_OFF_REFUSAL, computerPickRefusal, directTurnKind, roomSkillsRefusal } from "./agents-turn.js";
|
|
457
463
|
import { harnessMcpTokenEnv } from "./harness-mcp-token.js";
|
|
458
464
|
import { loadBundledSkills, loadUserSkills, mergeSkills, renderSkillInstructions, skillsLibraryEnabled, readSkillLibraryIndex, } from "./skill-library.js";
|
|
@@ -527,7 +533,6 @@ import { createBotLifecycleRoutes } from "./routes/bot-lifecycle.js";
|
|
|
527
533
|
import { createBotSkillsRoutes } from "./routes/bot-skills.js";
|
|
528
534
|
import { startHubAutoSync } from "./limix-skill-hub.js";
|
|
529
535
|
import { limixGatewayConnections, startLimixGatewaySidecar } from "./limix-gateway-sidecar.js";
|
|
530
|
-
import { createLimixManagedGrant, limixManagedGrantConfig } from "./limix-managed-grant.js";
|
|
531
536
|
import { limixBundledFor, limixSelectBundled, limixSkillDefaultsMigration } from "./limix-skill-store.js";
|
|
532
537
|
import { createSkillShareRoutes } from "./routes/skill-share.js";
|
|
533
538
|
import { createTeamContextRoutes } from "./routes/team-context.js";
|
|
@@ -545,6 +550,15 @@ import { createTimeZoneRoutes } from "./routes/time-zone.js";
|
|
|
545
550
|
import { createBrowserSiteRoutes } from "./routes/browser-sites.js";
|
|
546
551
|
import { createInternalSignInRoutes } from "./routes/sign-in.js";
|
|
547
552
|
import { createInternalMcpRoutes } from "./routes/internal-mcp.js";
|
|
553
|
+
import { createInternalAppSettingsRoutes, createWindowPrefs } from "./routes/app-settings.js";
|
|
554
|
+
import { createCustomDomainRoutes } from "./routes/custom-domain.js";
|
|
555
|
+
import { createThemeRoutes } from "./themes/routes.js";
|
|
556
|
+
import { createThemeStore } from "./themes/store.js";
|
|
557
|
+
import { createThemeTool } from "./themes/tool.js";
|
|
558
|
+
import { createAppSettings } from "./app-settings/host.js";
|
|
559
|
+
import { createPictureFiles } from "./app-settings/picture-file.js";
|
|
560
|
+
import { routeBackedRegistry } from "./app-settings/registry.js";
|
|
561
|
+
import { createTrustAnswers } from "./host/trust-answers.js";
|
|
548
562
|
import { createInternalThreadRoutes } from "./routes/internal-threads.js";
|
|
549
563
|
import { createBrowserEvidenceRoutes } from "./routes/browser-evidence.js";
|
|
550
564
|
import { createSignInCardRoutes } from "./routes/sign-in-cards.js";
|
|
@@ -686,10 +700,6 @@ if (CLOUD_HOME) {
|
|
|
686
700
|
repairMovedWorkspacePaths(DATA_DIR);
|
|
687
701
|
acceptLegacyOrigins(CLOUD_HOME.legacyOrigins);
|
|
688
702
|
}
|
|
689
|
-
const LIMIX_MANAGED_GRANT = limixManagedGrantConfig();
|
|
690
|
-
const limixManagedGrant = LIMIX_MANAGED_GRANT ? createLimixManagedGrant(LIMIX_MANAGED_GRANT, sessions) : null;
|
|
691
|
-
if (LIMIX_MANAGED_GRANT && !CLOUD_HOME)
|
|
692
|
-
acceptLegacyOrigins([LIMIX_MANAGED_GRANT.origin]);
|
|
693
703
|
if (CLOUD_PERSONAL)
|
|
694
704
|
sessions.requireAdmin(userError("serverError.cloud.personal"));
|
|
695
705
|
const lendingEnabled = () => sharedComputersEnabled(cfg) || CLOUD_HOME !== null || ownHome.here();
|
|
@@ -807,7 +817,6 @@ const customDomainVerifier = createCustomDomainVerifier({ environmentId: ENVIRON
|
|
|
807
817
|
const emailSignIn = createEmailSignIn({
|
|
808
818
|
allow: signInAllowList,
|
|
809
819
|
});
|
|
810
|
-
let customDomainRevision = 0;
|
|
811
820
|
function savedCustomDomain() {
|
|
812
821
|
if (DESKTOP_MANAGED || !cfg.customDomain)
|
|
813
822
|
return null;
|
|
@@ -1688,8 +1697,10 @@ function beginInternalCapabilityGeneration(threadId, generation = randomUUID())
|
|
|
1688
1697
|
return generation;
|
|
1689
1698
|
}
|
|
1690
1699
|
// The bearer is part of the engine's launch contract, so it stays stable per bot, thread and grants; the record behind it is per turn and honoured only during one.
|
|
1700
|
+
// Security invariant: a turn's depth, the hand-off it runs for and whether it may author skills are read from that record on every call, never
|
|
1701
|
+
// from the engine, so a person's message and a teammate's report keep one bearer.
|
|
1691
1702
|
const sessionCredentials = new Map();
|
|
1692
|
-
function sessionGrants({ generation: _turn, ...grants }) {
|
|
1703
|
+
function sessionGrants({ generation: _turn, depth: _depth, roomHandoffId: _handoff, skillAuthoring: _skills, ...grants }) {
|
|
1693
1704
|
const thread = botForThread(grants.botId, grants.threadId);
|
|
1694
1705
|
return JSON.stringify({ ...grants, approval: thread ? approvalModeFor(thread) : null });
|
|
1695
1706
|
}
|
|
@@ -1997,7 +2008,7 @@ function hostTurnResult(node, generation, outcome) {
|
|
|
1997
2008
|
computerParks.delete(generation);
|
|
1998
2009
|
if (!node)
|
|
1999
2010
|
return outcome;
|
|
2000
|
-
const result = { ...outcome, evidence: { ...outcome.evidence, ...turnEvidence(turnRows(node)) } };
|
|
2011
|
+
const result = { ...outcome, evidence: { ...outcome.evidence, ...turnEvidence(turnRows(node)), ...handoffLimits.servedBy(node) } };
|
|
2001
2012
|
if (outcome.ok && !node.groupId)
|
|
2002
2013
|
signInSettle.verified(node.botId, node.threadId, node.startedAt ?? node.createdAt);
|
|
2003
2014
|
const cards = resumableCards(node.threadId, node.startedAt ?? node.createdAt, node.groupId ? node.botId : undefined).filter((card) => !coordinator.active().some((other) => other.id !== node.id && other.threadId === node.threadId && other.status === "waiting" && other.cards?.includes(card.id)));
|
|
@@ -2011,15 +2022,18 @@ function hostTurnResult(node, generation, outcome) {
|
|
|
2011
2022
|
const { okToolCalls: _unknown, ...evidence } = result.evidence ?? {};
|
|
2012
2023
|
return { ...result, evidence, cap: { note: COMPUTER_FREE_NOTE } };
|
|
2013
2024
|
}
|
|
2025
|
+
const carried = handoffLimits.carriedOn(node, result);
|
|
2026
|
+
if (carried)
|
|
2027
|
+
return carried;
|
|
2014
2028
|
if (result.cap || result.stalled || !cards.length)
|
|
2015
2029
|
return result;
|
|
2016
2030
|
parkedNodesToReconcile.add(node.id);
|
|
2017
2031
|
return { ...result, cards: { question: `Waiting on the person: ${cards.map((card) => card.waits).join("; ")}`, ids: cards.map((card) => card.id) } };
|
|
2018
2032
|
}
|
|
2019
2033
|
function settleDirectCoordination(generation, settled) {
|
|
2020
|
-
if (!generation)
|
|
2034
|
+
if (!generation || (directCoordinationSettlers.has(generation) && peerLimitResend.hold(generation, settled)))
|
|
2021
2035
|
return;
|
|
2022
|
-
const outcome = stoppedHandoffs.settle(generation, settled); // a hand-off given up before its outcome arrived
|
|
2036
|
+
const outcome = stoppedHandoffs.settle(generation, settled); // a hand-off given up before its outcome arrived; a held one waits for its resend on the backup AI
|
|
2023
2037
|
const moving = [...computerSelectionTurns.values()].find(turn => turn.generation === generation && turn.handoff && turn.selected);
|
|
2024
2038
|
if (moving && directCoordinationSettlers.has(generation)) {
|
|
2025
2039
|
moving.handoff.outcome ??= outcome;
|
|
@@ -2421,6 +2435,8 @@ function dataExportRoots(bot) {
|
|
|
2421
2435
|
let dataUnavailableLogged = false;
|
|
2422
2436
|
function dataIntegration(botId, turn) {
|
|
2423
2437
|
const unavailable = dataEngine.unavailable();
|
|
2438
|
+
if (serverTurnedOff(store.bot(botId)?.toolsOff, "data"))
|
|
2439
|
+
return null;
|
|
2424
2440
|
if (unavailable !== null) {
|
|
2425
2441
|
if (!dataUnavailableLogged) {
|
|
2426
2442
|
dataUnavailableLogged = true;
|
|
@@ -2862,6 +2878,7 @@ const cloudPlanTier = createCloudPlanTier({ dataDir: DATA_DIR, cloudHome: Boolea
|
|
|
2862
2878
|
const starterAwake = createStarterAwake({ dataDir: DATA_DIR, starter: () => cloudPlanTier.starter(), bots: () => store.bots, changed: () => broadcast({ kind: "config", ...configStatus() }) });
|
|
2863
2879
|
const starterCaps = createStarterCaps({ starter: () => cloudPlanTier.starter(), awake: starterAwake, waitsOnOthers: (threadId) => coordinator.outstandingFor(threadId).length > 0, laneOwned: (threadId) => burst.laneOwned(threadId), botName: (botId) => store.bot(botId)?.name, pausedLine: (language, limit) => serverLine(language, "server.botPaused", { limit }), refused: () => broadcast({ kind: "config", ...configStatus() }) });
|
|
2864
2880
|
engineMemory.useCap(starterCaps.engine);
|
|
2881
|
+
const botHolds = createBotHolds({ dataDir: DATA_DIR, bots: () => store.bots, line: (language, key, params) => serverLine(language, key, params), changed: () => broadcast({ kind: "config", ...configStatus() }) });
|
|
2865
2882
|
let cloudPower = null; // The sleep handshake of a plan that sleeps (server/cloud-power.ts), made just before the server listens.
|
|
2866
2883
|
const teamWelcome = createTeamWelcomeStore(DATA_DIR);
|
|
2867
2884
|
const { cloudHealth, cloudSigned } = createCloudSignedHost({ cloudHome: CLOUD_HOME, sessions, power: () => cloudPower, box: () => botBox.report(), teamAdmin: teamAdminHost(), policyChanged: nudgeCloudTeamPolicy, invited: (email, by) => teamWelcome.invited(personKey({ id: "", email }), by), memberBrowserOff: () => managedPolicy.remoteAccessRefusal() !== undefined, plan: (cancelled) => routineHolds?.plan(cancelled), planTier: (tier) => cloudPlanTier.set(tier), memberLeft: (email) => leaveTeam ? leaveTeam(email).then((result) => { botApi.manager.revokeMintedBy(personKey({ id: "", email })); teamOwners.left(email); teamMessages.inbox.forget(personKey({ id: "", email })); forgetSetupPresser(store, personKey({ id: "", email })); devsReports.forget(personKey({ id: "", email })); return result; }) : Promise.reject(new Error("not a team")), health: { store, bus, dataDir: DATA_DIR, eventsDir: EVENTS_DIR, version: serverVersion(), image: process.env.OMB_CLOUD_IMAGE,
|
|
@@ -3021,7 +3038,7 @@ function previewSystemPrompt(bot) {
|
|
|
3021
3038
|
}, { note: previewPlan.note, cloudHome: Boolean(CLOUD_HOME), ownComputer: CLOUD_HOME && agentsMounted && lendingEnabled() ? sharedComputers.known(CLOUD_HOME_LENDER) : undefined }) },
|
|
3022
3039
|
{ id: "cloud-home", label: "My Cloud", text: CLOUD_HOME ? cloudHomePrompt(agentsMounted && lendingEnabled(), syncedFolders(DATA_DIR), sharedComputers.known(CLOUD_HOME_LENDER), CLOUD_PERSONAL) + firstHourHooks.prompt(bot.id, bot.threadId) : "" }, phoneLinkPart(),
|
|
3023
3040
|
{ id: "composio", label: "Connected apps", text: caps?.composioMcp && bot.composio !== false && composio.configured(cfg) ? composioSystemPrompt(bot.connectorTools) + describeConnectorScopes(bot.connectorScopes) : "" },
|
|
3024
|
-
{ id: "email", label: "Email", text: caps?.emailMcp === true ? emailHost.prompt(bot) : "" }, { id: "meetings", label: "Meetings", text: meetingsUnavailablePrompt({ agentsTools: agentsMounted, cloudComputer: boat.boatConfigured(cfg) }) },
|
|
3041
|
+
{ id: "email", label: "Email", text: caps?.emailMcp === true ? emailHost.prompt(bot) : "" }, { id: "meetings", label: "Meetings", text: meetingsUnavailablePrompt({ agentsTools: agentsMounted, cloudComputer: boat.boatConfigured(cfg) }) }, toolsOffPart(bot),
|
|
3025
3042
|
...phones.previewParts(bot, caps?.deviceMcp === true),
|
|
3026
3043
|
{ id: "mcp", label: "MCP servers", text: caps?.customMcp ? customMcpPrompt(Object.keys(engineMcpServers(bot)), mcpServersHost.off(bot)) : "" }, { id: "to-connect", label: "Connections to make", text: cloudConnections.prompt(bot) },
|
|
3027
3044
|
{ id: "browser", label: "Browser", text: previewPlan.browser ? browserPromptFor(bot, agentsMounted) : "" },
|
|
@@ -3969,7 +3986,7 @@ const questionRouting = createQuestionRouting({ store, handedInUnproven, active:
|
|
|
3969
3986
|
steer: async (threadId, text) => canSteerThread(threadId) && (await steerThread(threadId, text)) !== "refused", mayReach: outsideLineage.mayReach });
|
|
3970
3987
|
const handoffTicks = createHandoffTicks(), coordinator = createCoordinator({
|
|
3971
3988
|
dataDir: DATA_DIR,
|
|
3972
|
-
now: Date.now, wrote: handoffTicks.kick, handoffLimit: starterCaps.handoffs,
|
|
3989
|
+
now: Date.now, wrote: handoffTicks.kick, handoffLimit: { refusal: (botId, open) => botHolds.handoff(botId) ?? starterCaps.handoffs.refusal(botId, open) },
|
|
3973
3990
|
log: line => console.error("coordinator:", line),
|
|
3974
3991
|
legacyThreads: {
|
|
3975
3992
|
standingThreadOf: botId => botMainThread(botId) ?? store.bot(botId)?.threadId,
|
|
@@ -5155,6 +5172,7 @@ const watchdog = new TurnWatchdog({
|
|
|
5155
5172
|
});
|
|
5156
5173
|
watchdog.start();
|
|
5157
5174
|
const idleThreads = createIdleThreads({ store, claims: directTurnDispatchClaims, generations: directTurnGenerationByThread, drain: drainQueuedSends, engineTurn: (threadId) => runningTurnEngines.has(threadId) || liveTurns.running(threadId) !== undefined || settlingTurns.has(threadId), settle: (botId, threadId) => { watchdog.settle(threadId); settleDirectFollowup(directTurnGenerationByThread.get(threadId)); stopScreenPoller(botId, threadId); directTurnBots.delete(threadId); }, releaseComputer: (botId, threadId) => { releaseTurnResources(turnResourceOwners.get(threadId)); releaseLocalVmThread(threadId); vpsThreadEnded(botId, threadId); } });
|
|
5175
|
+
const peerLimitResend = createPeerLimitResend({ store, registry, takeover: () => limitTakeover, turnStops, hostedModels, providerConfigs, quotaSwitchEnabled: () => quotaSwitchEnabled(), policyModelRefusal, checkedTaskModelSwitch, assertWithinBudget: () => assertWithinBudget(cfg, DATA_DIR), handedOff: (id) => coordinator.node(id)?.parentId !== undefined, guest: (threadId) => guestDrivenTurns.has(threadId) || cloudGuestDriven(threadId), generation: (threadId) => directTurnGenerationByThread.get(threadId), blocked: (botId, threadId) => botHolds.held(botId) || threadBusy(botId, threadId) || hasQueuedSteeredMessages(botId, threadId) || Boolean(directRequestOwners.get(threadId)?.stopped), settle: settleDirectCoordination, release: (generation) => directCoordinationSettlers.delete(generation), failedLine: (threadId, detail) => serverLine(threadLanguage(threadId), "server.peerResend.failed", { detail }), startTurn }); // bot-to-bot turns whose AI met its usage limit before anything ran go once to the backup AI
|
|
5158
5176
|
bus.subscribe((event) => {
|
|
5159
5177
|
if (shouldIgnoreProviderEvent(event))
|
|
5160
5178
|
return;
|
|
@@ -5174,14 +5192,17 @@ bus.subscribe((event) => {
|
|
|
5174
5192
|
const reply = event.ok ? store.messagesFor(event.threadId).findLast(message => message.role === "bot" && message.kind === "text" && message.turnId === event.turnId)?.text : undefined;
|
|
5175
5193
|
const text = event.ok ? reply || event.stopReason || "The bot finished without a text reply"
|
|
5176
5194
|
: stoppedTurnText(event.threadId, event.turnId, undefined, event.stopReason);
|
|
5177
|
-
const
|
|
5195
|
+
const stop = event.ok ? undefined : turnStops.read(event.threadId, event.turnId), handoffPath = stop?.handoffPath, refusedBy = event.ok ? undefined : turnRefusal(event.stopReason, turnStops.failureCause(event), stop?.flags);
|
|
5178
5196
|
const outcome = { ok: event.ok, text: unansweredApprovals.annotate(event.threadId, event.turnId, text.slice(0, 12_000), event.ok), ...approvalAsk(store.botByThread(event.threadId)?.id, event.threadId, event.turnId),
|
|
5179
|
-
...(handoffPath ? { cap: { note: STEP_CAP_NOTE, handoffPath } } : {}) };
|
|
5197
|
+
...(handoffPath ? { cap: { note: STEP_CAP_NOTE, handoffPath } } : {}), ...(refusedBy ? { refusedBy } : {}) };
|
|
5180
5198
|
const owner = directFollowupTurns.complete(event.threadId, event.turnId, outcome);
|
|
5181
5199
|
if (owner) {
|
|
5200
|
+
peerLimitResend.ended(event, owner.generation, Boolean(handoffPath));
|
|
5182
5201
|
settleDirectCoordination(owner.generation, outcome);
|
|
5183
5202
|
settleDirectFollowup(owner.generation);
|
|
5184
5203
|
}
|
|
5204
|
+
else
|
|
5205
|
+
peerLimitResend.endedUnbound(event, Boolean(handoffPath));
|
|
5185
5206
|
}
|
|
5186
5207
|
}
|
|
5187
5208
|
else if (event.type !== "session.exited") {
|
|
@@ -5226,7 +5247,7 @@ const setupSuggestions = setupSuggestionsFor({ store, config: () => cfg, shared:
|
|
|
5226
5247
|
return false;
|
|
5227
5248
|
} }, writer: (botId) => sideJobs.text("setup-suggestions", botId), apps: { configured: () => composio.configured(cfg), mode: () => composio.connectionMode(cfg), connected: () => composio.connectedServices(cfg) }, log: (line) => console.log(line) });
|
|
5228
5249
|
const memoryUpkeep = createMemoryUpkeep({
|
|
5229
|
-
bots: () => { const paused = new Set(starterAwake.paused()); return store.bots.filter((bot) => !paused.has(bot.id)); },
|
|
5250
|
+
bots: () => { const paused = new Set(starterAwake.paused()); return store.bots.filter((bot) => !paused.has(bot.id) && !botHolds.held(bot.id)); },
|
|
5230
5251
|
bot: (id) => store.bot(teamHost.baseBotId(id)) ?? undefined,
|
|
5231
5252
|
engine: (botId) => sideJobs.text("memory", teamHost.baseBotId(botId)),
|
|
5232
5253
|
busy: (botId) => botHasActiveTurn(teamHost.baseBotId(botId)),
|
|
@@ -6988,12 +7009,12 @@ bus.subscribe((event) => {
|
|
|
6988
7009
|
}
|
|
6989
7010
|
releaseTurnResources(resourceOwner);
|
|
6990
7011
|
if (!isCurrent())
|
|
6991
|
-
return;
|
|
7012
|
+
return void peerLimitResend.resend(event.threadId, generation);
|
|
6992
7013
|
if (store.taskByThread(bot.id, event.threadId)?.activity !== "dead") {
|
|
6993
7014
|
store.setTaskActivity(bot.id, event.threadId, resourceOwner?.computerParkedOn !== undefined ? "parked.computer" : "idle");
|
|
6994
7015
|
}
|
|
6995
7016
|
directTurnBots.delete(event.threadId);
|
|
6996
|
-
if (continueComputerSelection(event.threadId, generation, event.ok))
|
|
7017
|
+
if (continueComputerSelection(event.threadId, generation, event.ok) || peerLimitResend.resend(event.threadId, generation))
|
|
6997
7018
|
return;
|
|
6998
7019
|
// An asynchronous screenshot finishes after the bus subscribers that normally drain have run.
|
|
6999
7020
|
if (resumeQueued) {
|
|
@@ -7054,7 +7075,7 @@ bus.subscribe((event) => {
|
|
|
7054
7075
|
settlingTurns.add(event.threadId);
|
|
7055
7076
|
liveTurnByThread.delete(event.threadId);
|
|
7056
7077
|
const routineReportThread = routineRun ? routineSourceThread(routineRun) : null;
|
|
7057
|
-
if (!routineReportThread && (!internal || reviewAnswer))
|
|
7078
|
+
if (!routineReportThread && (!internal || reviewAnswer) && (!routineRun || routineRunNeedsReview(routineRun, reply) || personWaits.open(event.threadId)))
|
|
7058
7079
|
store.patchTask(bot.id, event.threadId, { unread: true });
|
|
7059
7080
|
if (routineRun && routineReportThread !== event.threadId)
|
|
7060
7081
|
automationReports.runSettled(routineRun, completedTurnId);
|
|
@@ -7772,9 +7793,9 @@ async function beginTurn(botId, text, opts) {
|
|
|
7772
7793
|
assertBotHere(profile);
|
|
7773
7794
|
if (!profile)
|
|
7774
7795
|
throw Object.assign(new Error("no such bot"), { status: 404 });
|
|
7775
|
-
const threadId = opts?.threadId ?? profile.threadId, paused = starterCaps.pausedText(botId, threadLanguage(threadId));
|
|
7796
|
+
const threadId = opts?.threadId ?? profile.threadId, paused = botHolds.text(botId, threadLanguage(threadId)) ?? starterCaps.pausedText(botId, threadLanguage(threadId));
|
|
7776
7797
|
if (paused)
|
|
7777
|
-
throw Object.assign(new Error(paused), { status: 409, code: BOT_PAUSED_CODE });
|
|
7798
|
+
throw Object.assign(new Error(paused), { status: 409, code: botHolds.held(botId) ? BOT_HELD_CODE : BOT_PAUSED_CODE });
|
|
7778
7799
|
const continuingRoutine = opts?.cardContinuation ? activeRoutineRunForThread(threadId) : null;
|
|
7779
7800
|
if (continuingRoutine) {
|
|
7780
7801
|
const onDispatchError = opts?.onDispatchError;
|
|
@@ -7996,6 +8017,7 @@ async function beginTurn(botId, text, opts) {
|
|
|
7996
8017
|
if (settleOutcome)
|
|
7997
8018
|
directCoordinationSettlers.set(dispatchClaimId, { nodeId: opts?.coordination?.id ?? dispatchClaimId, settle: settleOutcome });
|
|
7998
8019
|
directFollowupSettlers.set(dispatchClaimId, { threadId, settle: opts?.onTurnSettled });
|
|
8020
|
+
peerLimitResend.track({ generation: dispatchClaimId, botId: bot.id, threadId, text, opts: opts ?? {}, userMessage, latestUser: recoveryUserMessageId });
|
|
7999
8021
|
directTurnDispatchClaims.set(threadId, { id: dispatchClaimId, botId, threadId, phase: "setup" });
|
|
8000
8022
|
liveTurns.dispatchStarted(threadId);
|
|
8001
8023
|
directTurnBots.set(threadId, bot);
|
|
@@ -8658,7 +8680,7 @@ async function beginTurn(botId, text, opts) {
|
|
|
8658
8680
|
{ id: "mcp", label: "MCP servers", text: customMcpPrompt(Object.keys(integrations.custom ?? {}), mcpServersHost.off(bot)) }, { id: "to-connect", label: "Connections to make", text: cloudConnections.prompt(liveBot ?? bot, lentMcp.lines(liveBot ?? bot, { botId: bot.id, threadId, generation: dispatchClaimId })) + teamConnections.prompt(threadId, dispatchClaimId, integrations) },
|
|
8659
8681
|
{ id: "browser", label: "Browser", text: integrations.browser ? browserPromptFor(bot, Boolean(integrations.agents)) : "" },
|
|
8660
8682
|
{ id: "data", label: "Data", text: integrations.data ? BUILT_IN_DATA_SYSTEM_PROMPT : "" },
|
|
8661
|
-
{ id: "email", label: "Email", text: instance.adapter.capabilities.emailMcp === true ? emailHost.prompt(liveBot ?? bot) : "" }, { id: "meetings", label: "Meetings", text: meetingsUnavailablePrompt({ agentsTools: Boolean(integrations.agents), cloudComputer: boat.boatConfigured(cfg) }) },
|
|
8683
|
+
{ id: "email", label: "Email", text: instance.adapter.capabilities.emailMcp === true ? emailHost.prompt(liveBot ?? bot) : "" }, { id: "meetings", label: "Meetings", text: meetingsUnavailablePrompt({ agentsTools: Boolean(integrations.agents), cloudComputer: boat.boatConfigured(cfg) }) }, toolsOffPart(liveBot ?? bot),
|
|
8662
8684
|
...phones.promptParts(liveBot ?? bot, {
|
|
8663
8685
|
mounted: Boolean(integrations.device), offered: instance.adapter.capabilities.deviceMcp === true, turn: { botId: bot.id, threadId, generation: dispatchClaimId },
|
|
8664
8686
|
place: phones.place(threadId, !(commsDepth > 0 || opts?.automationSource !== undefined || opts?.unattended || opts?.peerAsk || opts?.coordination)),
|
|
@@ -8739,7 +8761,7 @@ async function beginTurn(botId, text, opts) {
|
|
|
8739
8761
|
mentionTurn: tagged.length > 0,
|
|
8740
8762
|
integrations,
|
|
8741
8763
|
...(integrations.browser && browserIsThePlace(turnSurfacePlan(bot, undefined, threadId, true)) ? { preloadBrowserTools: true } : {}),
|
|
8742
|
-
...
|
|
8764
|
+
...skillsHost.turnSettings(bot, threadId, instance, managedPolicy.restrictsMcp()),
|
|
8743
8765
|
cwd, ...(worksInWorkspace || guestConfined || cloudGuestOpened(threadId) ? {} : { toolResultFolder: messageFileRootsForThread(bot.id, threadId).find((root) => root !== ATTACHMENTS_DIR) }),
|
|
8744
8766
|
botSettingsFile: botSettingsFile(bot),
|
|
8745
8767
|
}, (input) => quickFallback.sendTurn(instance, input, route.quickModel ? { model, own: bot.modelSelection, onFallback: () => store.patchMessage(threadId, userMessage.id, { quickModel: undefined }) } : undefined))), () => companyShutdown || !directTurnClaimExists(bot.id, dispatchClaimId, threadId), async () => {
|
|
@@ -8762,8 +8784,10 @@ async function beginTurn(botId, text, opts) {
|
|
|
8762
8784
|
if (directFollowupSettlers.has(dispatchClaimId) && dispatch.value.turnId &&
|
|
8763
8785
|
!directFollowupTurns.bind(threadId, dispatchClaimId, dispatch.value.turnId)) {
|
|
8764
8786
|
const outcome = directFollowupTurns.takeEarlyCompletion(threadId, dispatch.value.turnId);
|
|
8765
|
-
if (outcome)
|
|
8787
|
+
if (outcome) {
|
|
8788
|
+
peerLimitResend.bound(threadId, dispatch.value.turnId, dispatchClaimId);
|
|
8766
8789
|
settleDirectCoordination(dispatchClaimId, outcome);
|
|
8790
|
+
}
|
|
8767
8791
|
settleDirectFollowup(dispatchClaimId);
|
|
8768
8792
|
}
|
|
8769
8793
|
clearDirectTurnDispatch(threadId, dispatchClaimId);
|
|
@@ -8965,7 +8989,7 @@ function syncRoutineRunToSource(run) {
|
|
|
8965
8989
|
if (execution?.routineRunId === run.id) {
|
|
8966
8990
|
store.patchTask(run.botId, execution.threadId, {
|
|
8967
8991
|
routineRunId: undefined,
|
|
8968
|
-
...(
|
|
8992
|
+
...(routineRunNeedsReview(run) ? { unread: true } : {}),
|
|
8969
8993
|
});
|
|
8970
8994
|
}
|
|
8971
8995
|
return null;
|
|
@@ -8997,7 +9021,7 @@ function syncRoutineRunToSource(run) {
|
|
|
8997
9021
|
store.patchTask(run.botId, run.threadId, { unread: false });
|
|
8998
9022
|
}
|
|
8999
9023
|
}
|
|
9000
|
-
if (statusChanged && ["waiting", "completed", "failed", "missed"].includes(run.status)) {
|
|
9024
|
+
if (statusChanged && (source.group ? ["waiting", "completed", "failed", "missed"].includes(run.status) : routineRunNeedsReview(run))) {
|
|
9001
9025
|
if (source.group)
|
|
9002
9026
|
store.patchGroup(source.group.id, { unread: true });
|
|
9003
9027
|
else
|
|
@@ -9072,6 +9096,7 @@ const limitFailovers = new LimitFailovers({ file: join(DATA_DIR, "limit-failover
|
|
|
9072
9096
|
const current = store.projectBotForTask(botId, threadId), checked = current ? checkedTaskModelSwitch(current, from, false, false, true) : null;
|
|
9073
9097
|
return Boolean(checked?.ok && store.switchTaskModel(botId, threadId, checked.selection, false, false, { ...hostedModels?.resetTask(to, checked.selection), rewound: true }));
|
|
9074
9098
|
} });
|
|
9099
|
+
const handoffLimits = createHandoffLimits({ store, limitClock, takeover: limitTakeover, enabled: quotaSwitchEnabled, engineName });
|
|
9075
9100
|
const automationDestinations = createAutomationDestinations({ store, mainThread: botMainThread, runs: () => routines?.listRuns() ?? [],
|
|
9076
9101
|
cloud: CLOUD_HOME ? { owner: CLOUD_OWNER_KEY, opener: (id, routine) => (routine && teamRoutines.opener(routine)) || routineOpener(id), reportFromOthers: cloudReportFromOthers, opened: (threadId, person) => threadStarters.set(threadId, person), outside: (threadId) => outsideLineage.mark(threadId) } : null });
|
|
9077
9102
|
const routineModelChecks = { check: (raw) => checkedModelSelection(raw), bot: (botId) => store.bot(botId), engineSwitchNeedsAsk };
|
|
@@ -9083,7 +9108,7 @@ routines = new RoutineManager({
|
|
|
9083
9108
|
skipStartupRuns: (startedFromSleep = Boolean(CLOUD_HOME) && wokeFromSleep(DATA_DIR)), // a Cloud home waking from a sleep it was stopped for
|
|
9084
9109
|
hasPendingDelegations: runtimeWorkPending, refusedHandoff: refusedHandoffs.take, handedOffWorkLive: (threadId) => coordinator.outstandingFor(threadId).length > 0,
|
|
9085
9110
|
routineTurn: (threadId) => directRequestOwners.get(threadId)?.automation !== undefined,
|
|
9086
|
-
botState: unattendedDispatchState, pausedText: (botId) => starterCaps.pausedText(botId, threadLanguage(store.bot(botId)?.threadId ?? "")),
|
|
9111
|
+
botState: unattendedDispatchState, pausedText: (botId) => botHolds.text(botId, threadLanguage(store.bot(botId)?.threadId ?? "")) ?? starterCaps.pausedText(botId, threadLanguage(store.bot(botId)?.threadId ?? "")), held: (botId) => botHolds.held(botId),
|
|
9087
9112
|
goalState: (groupId, coordinatorBotId) => {
|
|
9088
9113
|
if (!groupId)
|
|
9089
9114
|
return unattendedDispatchState(coordinatorBotId);
|
|
@@ -9523,40 +9548,7 @@ const outsideWrites = createOutsideWrites({ store, notify, language: (threadId)
|
|
|
9523
9548
|
writeMemory: (botId, threadId, change) => { const written = botMemoryUpdate(teamHost.layer(botId, threadId), change, { source: memorySourceLabel({ room: store.groupByThread(threadId), task: store.taskByThread(teamHost.baseBotId(botId), threadId), threadId }), aboutMe: null, prefer: null }); return written.ok ? null : written.error; } });
|
|
9524
9549
|
const outboundRequests = new OutboundRequestService();
|
|
9525
9550
|
const outboundHold = createOutboundHold({ store, dataDir: DATA_DIR, outboundRequests, holdMs: OUTBOUND_HOLD_MS, connectorThread, activeGroupTurnForBot, notify });
|
|
9526
|
-
|
|
9527
|
-
const remembered = teamMemoryRequests.resolve(threadId, requestId, behavior) ?? outsideWrites.resolve(threadId, requestId, behavior);
|
|
9528
|
-
if (remembered) {
|
|
9529
|
-
json(res, 200, remembered);
|
|
9530
|
-
return true;
|
|
9531
|
-
}
|
|
9532
|
-
const outboundCard = store.messagesFor(threadId).find((message) => message.card?.requestId === requestId && message.card.outboundRequest);
|
|
9533
|
-
if (outboundCard?.card?.outboundRequest) {
|
|
9534
|
-
const outboundBot = outboundCard.from?.botId ? store.bot(outboundCard.from.botId) : store.botByThread(threadId);
|
|
9535
|
-
const result = outboundRequests.resolve({ threadId, requestId, behavior });
|
|
9536
|
-
if (!result.claimed) {
|
|
9537
|
-
if (!outboundCard.card.answered) {
|
|
9538
|
-
store.patchMessage(threadId, outboundCard.id, { card: { ...outboundCard.card, answered: "unavailable", dismissed: true } });
|
|
9539
|
-
}
|
|
9540
|
-
json(res, 200, { ok: true, outcome: "unavailable" });
|
|
9541
|
-
return true;
|
|
9542
|
-
}
|
|
9543
|
-
if (result.state === "already_settled") {
|
|
9544
|
-
json(res, 200, { ok: true, outcome: result.behavior === "allow" ? "allowed-once" : "rejected", alreadySettled: true });
|
|
9545
|
-
return true;
|
|
9546
|
-
}
|
|
9547
|
-
store.patchMessage(threadId, outboundCard.id, {
|
|
9548
|
-
card: { ...outboundCard.card, answered: result.state === "allowed" ? "allow" : "deny" },
|
|
9549
|
-
});
|
|
9550
|
-
appendDecision(DATA_DIR, {
|
|
9551
|
-
threadId, requestId, botId: outboundBot?.id, botName: outboundBot?.name,
|
|
9552
|
-
tool: outboundCard.card.tool, summary: outboundCard.card.subtitle,
|
|
9553
|
-
decision: result.state === "allowed" ? "user-approved" : "user-denied", source: "user",
|
|
9554
|
-
});
|
|
9555
|
-
json(res, 200, { ok: true, outcome: result.state === "allowed" ? "allowed-once" : "rejected" });
|
|
9556
|
-
return true;
|
|
9557
|
-
}
|
|
9558
|
-
return false;
|
|
9559
|
-
}
|
|
9551
|
+
const { resolveAndSendTrust } = createTrustAnswers({ store, dataDir: DATA_DIR, teamMemoryRequests, outsideWrites, outboundRequests });
|
|
9560
9552
|
const profileRequests = new ProfileRequestService({
|
|
9561
9553
|
store,
|
|
9562
9554
|
autoApply: appliesDirectly,
|
|
@@ -9828,6 +9820,9 @@ async function undoAppliedChange(res, threadId, requestId) {
|
|
|
9828
9820
|
else if (card.teamSetupRequest) {
|
|
9829
9821
|
result = await teamSetupRequests.undo({ botId, threadId, requestId });
|
|
9830
9822
|
}
|
|
9823
|
+
else if (card.appSettingRequest) {
|
|
9824
|
+
result = await appSettings.undo({ threadId, requestId });
|
|
9825
|
+
}
|
|
9831
9826
|
if (!result.claimed)
|
|
9832
9827
|
return json(res, 409, { error: "Only a change that applied on its own can be undone here." });
|
|
9833
9828
|
if (result.state === "invalid") {
|
|
@@ -9985,11 +9980,11 @@ setupRetry = 0) {
|
|
|
9985
9980
|
: Boolean(group && store.groupTaskByThread(group.id, threadId));
|
|
9986
9981
|
if (!group || !bot || !ownsThread)
|
|
9987
9982
|
return false;
|
|
9988
|
-
if (roomHeld(group, bot.id)) {
|
|
9983
|
+
if (roomHeld(group, bot.id) || botHolds.held(bot.id)) {
|
|
9989
9984
|
noteHeldSkip(group.id, threadId, bot, latestRoomTextId(threadId));
|
|
9990
9985
|
if (orchestration) {
|
|
9991
9986
|
orchestration.result.outcome = "unavailable";
|
|
9992
|
-
orchestration.result.stopReason = heldMemberLine(bot.name);
|
|
9987
|
+
orchestration.result.stopReason = roomHeld(group, bot.id) ? heldMemberLine(bot.name) : botHolds.text(bot.id, threadLanguage(threadId));
|
|
9993
9988
|
}
|
|
9994
9989
|
return true;
|
|
9995
9990
|
}
|
|
@@ -10430,7 +10425,7 @@ setupRetry = 0) {
|
|
|
10430
10425
|
bot.description && `About: ${bot.description}`,
|
|
10431
10426
|
`Room members: ${roster}, and ${typeof userName === "string" ? `${userName} (the human)` : roomPeople(threadId, userName)}.`,
|
|
10432
10427
|
readyGroup.bulletin.trim() && `Room bulletin (shared instructions for everyone):\n${readyGroup.bulletin.trim()}`,
|
|
10433
|
-
`Reply as yourself, briefly and conversationally. To bring a teammate in, mention them like @Name — they'll see the conversation and respond.${readyGroup.dm ? "" : ` To get ${typeof userName === "string" ? `${userName}'s` : "a person's"} attention or ask them something blocking, write @you.`} A "[reacted 👍 to …]" line is that person's whole reply to the message it names: 👍 means yes, go ahead, and 👎 means no.`,
|
|
10428
|
+
`Reply as yourself, briefly and conversationally. To bring a teammate in, mention them like @Name — they'll see the conversation and respond.${readyGroup.dm ? "" : ` To get ${typeof userName === "string" ? `${userName}'s` : "a person's"} attention or ask them something blocking, write @you.`} A "[reacted 👍 to …]" line is that person's whole reply to the message it names: 👍 means yes, go ahead when that message asked them something or offered to do something, and only got it (start no new work) when it just told them something; 👎 means no.`,
|
|
10434
10429
|
outsideRoom.length > 0 && roomPeerRosterSystemPrompt(outsideRoom), sharedNamesNote(roomMembers.filter((member) => member.id !== bot.id), Boolean(integrations.agents)),
|
|
10435
10430
|
integrations.agents && (CREDENTIAL_PROMPT + savedSecretsPrompt(botLogins.secretNamesFor(bot.id)) + (orchestration && !orchestration.roomHandoffId ? THREADS_PROMPT : "")).trim(),
|
|
10436
10431
|
integrations.agents && (!orchestration || orchestration.roomHandoffId) && "For actual Limix Bot teamwork, discover IDs with list_room_targets and use coordinate_bots for advice or work in this or another room. Do not substitute native coding helpers for these named bots. Consult only when needed to make a decision; no discussion step is mandatory. Give concrete responsibilities, exact accessible paths and acceptance checks. End your turn after assigning; busy teammates queue and results automatically resume you. When they return, finish the requested verification and give the user one final answer. Native helper names are not evidence that an Limix Bot teammate participated. Plain @mentions are only for conversational replies in this room." + requesterRule,
|
|
@@ -10512,7 +10507,7 @@ setupRetry = 0) {
|
|
|
10512
10507
|
{ id: "cloud-home", label: "My Cloud", text: CLOUD_HOME ? cloudHomePrompt(Boolean(integrations.agents) && lendingEnabled(), syncedFolders(DATA_DIR), sharedComputers.known(CLOUD_HOME_LENDER), CLOUD_PERSONAL) : "" }, phoneLinkPart(),
|
|
10513
10508
|
{ id: "browser", label: "Browser", text: integrations.browser ? browserPromptFor(bot, Boolean(integrations.agents)) : "" },
|
|
10514
10509
|
{ id: "data", label: "Data", text: integrations.data ? BUILT_IN_DATA_SYSTEM_PROMPT : "" },
|
|
10515
|
-
{ id: "email", label: "Email", text: instance.adapter.capabilities.emailMcp === true ? emailHost.prompt(readyBot) : "" },
|
|
10510
|
+
{ id: "email", label: "Email", text: instance.adapter.capabilities.emailMcp === true ? emailHost.prompt(readyBot) : "" }, toolsOffPart(readyBot),
|
|
10516
10511
|
...phones.promptParts(readyBot, {
|
|
10517
10512
|
mounted: Boolean(integrations.device), offered: instance.adapter.capabilities.deviceMcp === true,
|
|
10518
10513
|
turn: { botId: readyBot.id, threadId, generation: internalGeneration }, place: "computer",
|
|
@@ -10680,7 +10675,7 @@ setupRetry = 0) {
|
|
|
10680
10675
|
cwd, ...(worksInWorkspace || roomGuestConfined || cloudGuestOpened(threadId) ? {} : { toolResultFolder: messageFileRootsForThread(readyBot.id, threadId).find((root) => root !== ATTACHMENTS_DIR) }),
|
|
10681
10676
|
integrations,
|
|
10682
10677
|
...(integrations.browser && browserIsThePlace(roomPlan) ? { preloadBrowserTools: true } : {}),
|
|
10683
|
-
...
|
|
10678
|
+
...skillsHost.turnSettings(readyBot, threadId, instance, managedPolicy.restrictsMcp()),
|
|
10684
10679
|
botSettingsFile: botSettingsFile(readyBot),
|
|
10685
10680
|
...(instance.instanceId === readyBot.modelSelection.instanceId
|
|
10686
10681
|
? memberTurnSelection(readyBot.modelSelection)
|
|
@@ -10797,7 +10792,7 @@ setupRetry = 0) {
|
|
|
10797
10792
|
if (heldMidTurn) {
|
|
10798
10793
|
if (orchestration) {
|
|
10799
10794
|
orchestration.result.outcome = "unavailable";
|
|
10800
|
-
orchestration.result.stopReason = heldMemberLine(bot.name);
|
|
10795
|
+
orchestration.result.stopReason = botHolds.text(bot.id, threadLanguage(threadId)) ?? heldMemberLine(bot.name);
|
|
10801
10796
|
}
|
|
10802
10797
|
return true;
|
|
10803
10798
|
}
|
|
@@ -11985,7 +11980,7 @@ function configStatus() {
|
|
|
11985
11980
|
const eventLogMaxBytes = threadEventLogMaxBytes(cfg);
|
|
11986
11981
|
const eventLogRetentionDays = threadEventLogRetentionDays(cfg);
|
|
11987
11982
|
return {
|
|
11988
|
-
cloudStarter: cloudPlanTier.starter(), waitingForRoom: engineMemory.waiting(), planTurns: starterCaps.status(), awakeLimit: starterAwake.limit(), pausedBots: starterAwake.paused(), xai: keyStatus(cfg.xai?.key),
|
|
11983
|
+
cloudStarter: cloudPlanTier.starter(), waitingForRoom: engineMemory.waiting(), planTurns: starterCaps.status(), awakeLimit: starterAwake.limit(), pausedBots: starterAwake.paused(), pausedByPerson: botHolds.state(), heldBots: botHolds.heldBots(), xai: keyStatus(cfg.xai?.key),
|
|
11989
11984
|
mistral: keyStatus(cfg.mistral?.key),
|
|
11990
11985
|
cerebras: keyStatus(cfg.cerebras?.key),
|
|
11991
11986
|
groq: keyStatus(cfg.groq?.key), greenference: keyStatus(cfg.greenference?.key), modelgo: keyStatus(cfg.modelgo?.key),
|
|
@@ -11994,7 +11989,7 @@ function configStatus() {
|
|
|
11994
11989
|
anthropic: { ...keyStatus(cfg.anthropic?.key), everyClaudeBot: cfg.anthropic?.everyClaudeBot !== false },
|
|
11995
11990
|
openai: keyStatus(cfg.openai?.key),
|
|
11996
11991
|
openrouter: keyStatus(cfg.openrouter?.key),
|
|
11997
|
-
fleet: { available: fleetAvailable(fleetSocketPath()) },
|
|
11992
|
+
fleet: { available: fleetAvailable(fleetSocketPath()) }, toolGroups: availableToolGroups({ meetings: boat.boatConfigured(cfg), data: dataEngine.unavailable() === null, images: imageGenerationReady(cfg), email: emailHost.available() }),
|
|
11998
11993
|
edition: editionForSettings(editionStatus()),
|
|
11999
11994
|
budgets: {
|
|
12000
11995
|
...(cfg.budgets?.monthlyUsd !== undefined ? { monthlyUsd: cfg.budgets.monthlyUsd } : {}),
|
|
@@ -12388,8 +12383,22 @@ ROUTES.push(createHostedSlackRoutes({ bot: (id) => store.bot(id), hostedReady: (
|
|
|
12388
12383
|
ROUTES.push(createStopLineRoutes());
|
|
12389
12384
|
const orgInstallStatuses = () => orgLibrary?.installStatuses() ?? new Map();
|
|
12390
12385
|
ROUTES.push(createBotPresetRoutes({ presets: presetStore, orgStatuses: orgInstallStatuses }));
|
|
12386
|
+
ROUTES.push(createBotHoldRoutes({ holds: botHolds, named: (kind, id) => (kind === "bot" ? store.bot(id)?.name ?? null : store.sections.includes(id.trim()) ? id.trim() : null), stop: async (botIds) => { let stopped = 0; for (const botId of botIds) {
|
|
12387
|
+
for (const { threadId } of store.tasks(botId))
|
|
12388
|
+
if (threadBusy(botId, threadId) || coordinator.activeDirect(threadId)) {
|
|
12389
|
+
await stopThreadForPerson(botId, threadId);
|
|
12390
|
+
stopped++;
|
|
12391
|
+
}
|
|
12392
|
+
for (const group of store.groups)
|
|
12393
|
+
if (roomThreadIds(group).some((threadId) => groupSpeakers.get(threadId)?.botId === botId)) {
|
|
12394
|
+
await interruptHeldMember(group.id, botId);
|
|
12395
|
+
stopped++;
|
|
12396
|
+
}
|
|
12397
|
+
} return stopped; }, audit: (entry, auth, req) => { if (!DESKTOP_MANAGED && adminActivityRecording())
|
|
12398
|
+
appendAdminAction(DATA_DIR, { category: "bot", action: `${entry.kind}.${entry.paused ? "pause" : "resume"}`, target: { kind: entry.kind, id: entry.id, name: entry.name }, actor: adminActorFor(auth, req) }); } }));
|
|
12391
12399
|
ROUTES.push(createWorkspaceBannerRoutes({ changed: () => broadcast({ kind: "config", ...configStatus() }) }));
|
|
12392
|
-
|
|
12400
|
+
const starterAwakeRoutes = createStarterAwakeRoutes({ awake: starterAwake });
|
|
12401
|
+
ROUTES.push(starterAwakeRoutes);
|
|
12393
12402
|
ROUTES.push(createSharedComputerRoutes({ enabled: (auth) => lendingEnabled() || (ownerLends() && ownHome.owner(auth)), computers: sharedComputers, sessionLive: (id) => sessions.isLive(id), environmentId: ENVIRONMENT_ID,
|
|
12394
12403
|
cloudHomeLender: CLOUD_HOME ? CLOUD_HOME_LENDER : null, principal: sessionLendingPrincipal, personKey, power: () => cloudPower, links: CLOUD_HOME ? deviceLinks : null, upgrades, asks: computerAsks?.asks ?? null, answerer: cardAnswererFor }));
|
|
12395
12404
|
// `routines` is assigned at boot, so it is read per request.
|
|
@@ -12454,20 +12463,23 @@ ROUTES.push(createBotSettingsRoutes({
|
|
|
12454
12463
|
requestedTaskBot, threadBusy, activeGroupTurnForBot, checkedModelSelection, engineSwitchNeedsAsk, readCursor,
|
|
12455
12464
|
canManageCommandAllowlist, commandAllowlistResponse, cardAnswerRefusal, threadRead: teamMessages.seen, levelOf, personMarkThread: personRooms.personMarkThread,
|
|
12456
12465
|
}));
|
|
12457
|
-
|
|
12458
|
-
ROUTES.push(
|
|
12466
|
+
const botOrderRoutes = createBotOrderRoutes({ store, visibleFor: (auth) => visibleTo(viewerFor(auth)), ...(botOrders ? { own: { person: botOrders.personOf, order: botOrders, told: (person, botIds) => broadcast({ kind: "bots.order", botIds }, { person }) } } : {}) });
|
|
12467
|
+
ROUTES.push(createGroupOrderRoutes({ store, visibleFor: (auth) => visibleTo(viewerFor(auth)) }), botOrderRoutes, createBotAccessRoutes({ team: CLOUD_TEAM, people: teamOwners.people, store, levelOf, wireBot, publicGroupState, broadcast, audienceChanged, record: (auth, row) => appendAdminAction(DATA_DIR, { ...row, actor: decisionActorFor(auth) }) }), accessRequests.routes);
|
|
12468
|
+
const botPatchRoutes = createBotPatchRoutes({
|
|
12459
12469
|
store, cfg, registry, sessions, browserRuntime, browserLive, memoryUpkeep, cacheKeepWarm, hostedModels, supportsApprovalMode,
|
|
12460
12470
|
routines: () => routines, activeVpsThreads,
|
|
12461
12471
|
hostedWorkspace: HOSTED_WORKSPACE, hostedFullAccessRefusal: HOSTED_FULL_ACCESS_REFUSAL, desktopManaged: DESKTOP_MANAGED,
|
|
12462
12472
|
broadcast, wireBot, publicGroupState, audienceChanged, storedAvatarExists, requestedTaskBot, threadBusy, activeGroupTurnForBot,
|
|
12463
12473
|
checkedModelSelection, engineSwitchNeedsAsk, currentBrowserSession, interruptAllDirectThreads, cancelGroupTurnOperations,
|
|
12464
12474
|
revokeInternalCapabilitiesForThread, runningTurnInstance, closeOpenApprovals, assertTeamComputerChangeIdle, forgetTemporaryBrowser, levelOf, team: Boolean(CLOUD_TEAM), mainThreadTasks, chiefChanged: (changed) => chiefRooms.moved(changed), ...(personRooms.personMarkThread ? { personMarkThread: personRooms.personMarkThread, shownThread: (auth, bot) => memberBot(wireBot(bot), visibleTo(viewerFor(auth))).threadId } : {}),
|
|
12465
|
-
})
|
|
12475
|
+
});
|
|
12476
|
+
ROUTES.push(botPatchRoutes);
|
|
12466
12477
|
ROUTES.push(createBotLifecycleRoutes({
|
|
12467
12478
|
store, routines: () => routines, interruptAllDirectThreads, cancelDirectTurnDispatch, revokeInternalCapabilitiesForThread,
|
|
12468
12479
|
activeGroupTurnForBot, cancelGroupTurnOperations, runningTurnInstance, closeOpenApprovals, deleteBotWithLifecycle,
|
|
12469
12480
|
}));
|
|
12470
|
-
|
|
12481
|
+
const skillsRoutes = createBotSkillsRoutes({ store, cfg, listBotSkills, readBotSkillFile, stagedSkillListing });
|
|
12482
|
+
ROUTES.push(skillsRoutes);
|
|
12471
12483
|
startHubAutoSync();
|
|
12472
12484
|
ROUTES.push(createEmailRoutes({ service: emailService }));
|
|
12473
12485
|
ROUTES.push(phones.routes);
|
|
@@ -12529,7 +12541,8 @@ ROUTES.push(createDeciderRoutes({ decider, extractor, config: () => cfg }), crea
|
|
|
12529
12541
|
} : {}) }), createTtsRoutes({ config: () => cfg }), createHelperSuggestionRoutes({ notNow: proactive.suggestionNotNow }), createSetupRequestRoutes({ store, language: () => appLanguage() ?? Intl.DateTimeFormat().resolvedOptions().locale, sendRefusal: cloudGuestSendRefusal, presser: (auth) => setupPresser(sharedMembership(), auth, messageSender(auth)), canSetUp: (botId, threadId) => registry.get(store.projectBotForTask(botId, threadId)?.modelSelection.instanceId ?? "")?.adapter.capabilities.agentsMcp === true, send: (auth, botId, threadId, text) => acceptDirectSend({ botId, threadId, text, sender: messageSender(auth), trigger: usageTriggerFor(auth), personPresent: auth.kind === "session" || DESKTOP_MANAGED }) }), createNotificationRoutes(undefined, notificationListed), createUpdateCheckRoutes({ check: serverUpdateChecker({ desktopManaged: DESKTOP_MANAGED, managed: Boolean(CLOUD_HOME || HOSTED_WORKSPACE) }) }), createSeatsRoutes({ signInList: signInAllowList, sessions: () => sessions.list() }), createTimeZoneRoutes({ adopts: Boolean(CLOUD_HOME), dataDir: DATA_DIR, changed: () => routines?.rescheduleLocalTimes() }), createCloudSendRoutes({ appVersion: serverVersion(), ...(CLOUD_TEAM ? { refusal: personalMoveRefusal(CLOUD_TEAM), scope: (auth) => teamMoveIn?.scope(auth) ?? null } : {}), bots: () => store.bots, messagesTail: (threadId, limit) => store.messagesTail(threadId, limit), skills: (bot) => listSkills(bot.id), logins, config: () => cfg, lineLanguage: personLanguages.forLine, chats: { store, dataDir: DATA_DIR, owner: cloudSendOwner, ...(CLOUD_OWNER_KEY ? { ownerKey: CLOUD_OWNER_KEY } : {}), stamped: (threadId) => ownerOnlyCache.delete(threadId), instanceExists: (id) => Boolean(registry.get(id)), approvalSupported: (selection, mode) => supportsApprovalMode(selection, mode) }, cloudHome: Boolean(CLOUD_HOME), ownHome: ownHome.owner, automations: { routines: () => routines, calls: () => calendarCalls, webhooks: () => webhooks, appEvents: () => appTriggers.manager, waits: () => botWaits }, connectionsMoved: (language) => cloudConnections.moved(language), connections: () => cloudConnections.connections(), connectionFingerprints: (nonce) => cloudConnections.fingerprints(nonce), move: { dataDir: DATA_DIR, store, routines: () => routines, calls: () => calendarCalls, webhooks: () => webhooks, appEvents: () => appTriggers.manager, claudeCodeSkills: () => (claudeUserSkillsEnabled(cfg) ? claudeCodeSkillInputs() : []), instanceExists: (id) => Boolean(registry.get(id)), owner: cloudSendOwner, ownRoutine: (routine, person) => { cloudRoutineAuthors?.record(routine.id, routine); cloudRoutineAuthors?.wrote(routine.id, person); }, arrived: () => ownerOnlyCache.clear(), teamMemory, aboutMe: () => cfg.profile?.aboutMe ?? "", saveAboutMe: (text) => { saveConfig({ profile: { ...cfg.profile, aboutMe: text } }); Object.assign(cfg, loadConfig()); broadcast({ kind: "config", ...configStatus() }); } } }), cloudConnections.routes, createTodayRoutes({ visibleFor: (auth) => visibleTo(viewerFor(auth)), ...(teamOwners.asks ? { asks: teamOwners.asks, messages: teamMessages.needsYou } : {}), sources: () => ({ bots: store.bots, groups: store.groups, routines, parked: coordinator.active(), engines: registry.instances().map((instance) => ({ instanceId: instance.instanceId, snapshot: registry.lastSnapshot(instance.instanceId) })) }) }), createInboxRoutes(teamMessages));
|
|
12530
12542
|
if (CLOUD_TEAM)
|
|
12531
12543
|
teamHost.adoptServerProfile(sessions.list().flatMap((session) => session.email ? [session.email] : []));
|
|
12532
|
-
|
|
12544
|
+
const sidebarRoutes = createSidebarSectionRoutes({ store, teamComputers, maxBots: MAX_WORKSPACE_BOTS, assertTeamComputerChangeIdle, wireBot, renamed: (from, to) => (to ? botHolds.rename(from, to) : botHolds.forget("department", from)) });
|
|
12545
|
+
ROUTES.push(teamPresence.routes, sidebarRoutes, createPresenceRoutes({ isOwner: ownerOrAdmin, heard: (auth, language) => personLanguages.heard(auth.kind === "session" ? actorKey(auth) : THIS_COMPUTER, language), sawChat: (_auth, threadId) => { if (store.botByThread(threadId))
|
|
12533
12546
|
sawThread(threadId); }, active: async (source, zone, language) => { const answer = await proactive.brief.active(source, zone, language); firstHourHooks.arrived(); return answer; }, ...(CLOUD_TEAM ? { member: (auth) => { noAiNotice.flush(); return teamMessages.arrived(auth); } } : {}) }), createMeRoutes({ team: CLOUD_TEAM, session: (auth) => (auth.kind === "session" ? auth.session : null), welcome: teamWelcome, profile: teamHost.memberProfile, save: teamHost.saveMemberProfile, seed: teamHost.seedMemberProfile, seeded: teamHost.seededFields, changed: () => broadcast({ kind: "config", ...configStatus() }) }), teamAway.routes, createTeamPhoneRoutes({ team: CLOUD_TEAM, sessions, publicBase: (req, auth) => pairingLinkBase(publicUrl(), auth.kind === "session" ? requestOrigin(req) : null) }), createTeamConnectionRoutes({ host: teamConnections, cfg: () => cfg, composio, policy: managedPolicy, publicOrigin: CLOUD_HOME?.publicOrigin ?? null, record: (auth, row) => appendAdminAction(DATA_DIR, { ...row, actor: decisionActorFor(auth) }) }), createSignInCardRoutes({ settle: signInSettle.settle, saveLogin: (botId, threadId, messageId, body, auth) => CLOUD_TEAM && !auth.scopes.includes("admin") ? Promise.resolve({ status: 403, body: memberLoginRefusal(CLOUD_TEAM) }) : saveLoginFromCard(botId, threadId, messageId, body), saveTarget: signInSaveTarget, threadVisible: (auth, threadId) => visibleTo(viewerFor(auth)).thread(threadId), vault: createSignInVaultChoices({ logins, cardBots: (id) => botLogins.cardBots(id), settle: signInSettle.settle, openCard: (botId, threadId, messageId) => { const card = signInMessage(botId, threadId, messageId)?.signIn; return card && card.place === "browser" && !card.superseded && !card.answeredInChat && !card.stopped && !signInOutcome(card) ? card : null; } }) }));
|
|
12534
12547
|
const appSuggestions = createAppSuggestions({ dataDir: DATA_DIR, store, configured: () => composio.configured(cfg), catalog: () => composio.listToolkits(cfg), services: () => composio.connectedServices(cfg), offerable: (slug) => !managedPolicy.appRefusal(slug) && !managedConnectorUnavailableReason(composio.connectionMode(cfg), slug) && !teamConnections.personApps().includes(slug), pickAvailable: () => appPickAvailable(cfg), decider });
|
|
12535
12548
|
ROUTES.push(createAppSuggestionRoutes(appSuggestions));
|
|
@@ -12705,7 +12718,7 @@ const mcpConfig = createMcpConfig({
|
|
|
12705
12718
|
});
|
|
12706
12719
|
const persistAnnouncedMcpServers = (next) => { persistMcpServers(next); broadcast({ kind: "mcp.changed" }); };
|
|
12707
12720
|
const postiz = createPostiz({ cfg: () => cfg, mcpOAuth, persistMcpServers: persistAnnouncedMcpServers, mcpConfigBusy: mcpConfig.busy, mcpPolicyRefusal, appCatalog: chatAppsMcp, team: teamConnections, loopback: !CLOUD_HOME && !HOSTED_WORKSPACE });
|
|
12708
|
-
|
|
12721
|
+
const configRoutes = createConfigRoutes({
|
|
12709
12722
|
store, cfg, registry, sessions, browserCleanup, browserLive, browserRuntime, usedBrowserSessions, decider,
|
|
12710
12723
|
sharedComputers, sharedComputerControl, closeBrowser, browserEngineSwitched,
|
|
12711
12724
|
hostedModels: Boolean(hostedModels),
|
|
@@ -12719,14 +12732,23 @@ ROUTES.push(createPostizRoutes({ postiz }), createConfigRoutes({
|
|
|
12719
12732
|
configForAccess: (status, auth) => configForAccess(status, auth.scopes.includes("admin"), auth.kind === "session" ? auth.session : null),
|
|
12720
12733
|
...(CLOUD_TEAM ? { ownProfile: (auth, profile) => auth.kind === "session" ? (teamHost.saveMemberProfile(auth.session, profile), true) : false, ownHints: (auth, hints) => auth.kind === "session" ? (teamWelcome.save(personKey(auth.session), { hints }), true) : false } : {}),
|
|
12721
12734
|
resyncOpenCodeProviderKeys, revokeEngineCapabilities, reloadProviders, broadcast, drainQueuedSends, postiz,
|
|
12722
|
-
})
|
|
12723
|
-
ROUTES.push(
|
|
12735
|
+
});
|
|
12736
|
+
ROUTES.push(createPostizRoutes({ postiz }), configRoutes);
|
|
12737
|
+
const instanceRoutes = createInstanceRoutes({
|
|
12724
12738
|
store, cfg, registry, sessions, providerAuthSessions,
|
|
12725
12739
|
hostedModels: Boolean(hostedModels),
|
|
12726
12740
|
providerConfigBusy: { get: () => providerConfigBusy, set: (busy) => { providerConfigBusy = busy; } },
|
|
12727
12741
|
providerInstancesChanging, describeInstances, persistProviderInstance, configStatus, broadcast, testCliBinary,
|
|
12728
12742
|
cliProbeEnvironment, threadBusy, botForThread, activeGroupTurnForBot, checkInstance: testedAi.check,
|
|
12729
|
-
})
|
|
12743
|
+
});
|
|
12744
|
+
ROUTES.push(createCustomDomainRoutes({ desktopManaged: DESKTOP_MANAGED, status: customDomainStatus, verify: (domain) => customDomainVerifier.verify(domain), save: (origin) => { saveConfig({ customDomain: origin }); cfg.customDomain = origin; }, sessionEnded: (auth) => auth.kind === "session" && !sessions.isLive(auth.session.id) }));
|
|
12745
|
+
const windowPrefs = createWindowPrefs({ broadcast, ownerOrAdmin, windowOpen: () => [...sseClients].some((client) => client.admin && client.appWindow) });
|
|
12746
|
+
const themeStore = createThemeStore({ dataDir: DATA_DIR });
|
|
12747
|
+
const themeChanged = (person, skin) => broadcast({ kind: "theme", ...(skin ? { skin } : {}) }, CLOUD_TEAM ? { person } : { adminOnly: true });
|
|
12748
|
+
ROUTES.push(createThemeRoutes({ store: themeStore, changed: themeChanged, person: (auth) => (CLOUD_TEAM ? (auth.kind === "session" ? personKey(auth.session) : null) : ownerOrAdmin(auth) ? "owner" : null) }));
|
|
12749
|
+
const themeTool = createThemeTool({ store: themeStore, changed: themeChanged, person: (turn) => (CLOUD_TEAM ? actingPeople.requester(turn.threadId, turn.generation) : phones.turnOwner(turn) ? "owner" : null), sources: (turn) => ({ roots: messageFileRootsForThread(turn.botId, turn.threadId).filter((root) => root !== ATTACHMENTS_DIR), attachments: store.messagesFor(turn.threadId).flatMap((message) => (message.attachments ?? []).flatMap((file) => (file.kind === "audio" ? [] : [file.path]))) }) });
|
|
12750
|
+
const appSettings = createAppSettings({ themes: themeTool, store, dataDir: DATA_DIR, entries: routeBackedRegistry({ cfg: () => cfg, store, routes: { config: configRoutes, botOrder: botOrderRoutes, botPatch: botPatchRoutes, sections: sidebarRoutes, instances: instanceRoutes, starterAwake: starterAwakeRoutes, skills: skillsRoutes }, providers: registry, credentials: () => botLogins.credentialConfig(cfg), window: windowPrefs, paused: () => starterAwake.paused() }), turnOwner: (turn) => phones.turnOwner(turn), guestDriven: cloudGuestDriven, requestCredential: (bot, threadId, body) => secretCards.requestCredential(bot, threadId, body), connectorThread, language: threadLanguage, pictures: createPictureFiles({ attachmentsDir: ATTACHMENTS_DIR, ownFolders: (turn) => messageFileRootsForThread(turn.botId, turn.threadId).filter((root) => root !== ATTACHMENTS_DIR), inConversation: (turn, name) => threadsReferencing(name).includes(turn.threadId), save: (bytes, mime) => saveImage(bytes, mime).path, remove: deleteAttachment }) });
|
|
12751
|
+
ROUTES.push(instanceRoutes, windowPrefs.routes);
|
|
12730
12752
|
ROUTES.push(createMcpServerRoutes({
|
|
12731
12753
|
cfg, bot: (id) => store.bot(id), sessions, mcpOAuth, teamConnections,
|
|
12732
12754
|
cloudHome: CLOUD_HOME,
|
|
@@ -12963,8 +12985,6 @@ const handleRequest = async (req, res) => {
|
|
|
12963
12985
|
if (await emailSignInRoute({ cloudHome: Boolean(CLOUD_HOME), emailSignIn, sessions, cookieName: SESSION_COOKIE, target: (r) => signInMailTarget(publicUrl(), requestOrigin(r)),
|
|
12964
12986
|
environment: () => environmentDescriptor({ environmentId: ENVIRONMENT_ID, ...TEAM_LABEL, desktopManaged: DESKTOP_MANAGED, emailSignIn: true, sharedComputers: lendingEnabled() }) }, req, res, path, method))
|
|
12965
12987
|
return;
|
|
12966
|
-
if (limixManagedGrant && await limixManagedGrant.handle(req, res, path, method))
|
|
12967
|
-
return;
|
|
12968
12988
|
if ((cloudSigned && await cloudSigned({ req, res, url, path, method })) || chatApps.serveFile(req, res, path, method))
|
|
12969
12989
|
return;
|
|
12970
12990
|
if (method === "POST" && path === "/api/auth/pair") {
|
|
@@ -13178,39 +13198,6 @@ const handleRequest = async (req, res) => {
|
|
|
13178
13198
|
}
|
|
13179
13199
|
if (method === "GET" && path === "/api/auth/pairing")
|
|
13180
13200
|
return json(res, 200, { pairings: sessions.openPairings(), publicUrl: publicUrl(), ...(phoneRelay ? { relay: phoneRelay.status() } : {}) });
|
|
13181
|
-
// Admin-only by request-auth's default deny; only future pairing links change.
|
|
13182
|
-
if (path === "/api/settings/custom-domain") {
|
|
13183
|
-
res.setHeader("cache-control", "no-store");
|
|
13184
|
-
if (method === "GET")
|
|
13185
|
-
return json(res, 200, customDomainStatus());
|
|
13186
|
-
if (method === "POST" || method === "DELETE") {
|
|
13187
|
-
if (DESKTOP_MANAGED)
|
|
13188
|
-
return json(res, 409, { error: "Custom domains are configured on a self-hosted Limix Bot server, not the desktop companion." });
|
|
13189
|
-
if (!/^application\/json\b/i.test(String(req.headers["content-type"] ?? ""))) {
|
|
13190
|
-
return json(res, 415, { error: "content-type must be application/json" });
|
|
13191
|
-
}
|
|
13192
|
-
if (method === "DELETE") {
|
|
13193
|
-
saveConfig({ customDomain: "" });
|
|
13194
|
-
cfg.customDomain = "";
|
|
13195
|
-
customDomainRevision++;
|
|
13196
|
-
return json(res, 200, customDomainStatus());
|
|
13197
|
-
}
|
|
13198
|
-
const body = await readBody(req, 4096);
|
|
13199
|
-
if (typeof body?.domain !== "string")
|
|
13200
|
-
return json(res, 400, { error: "Enter your domain name." });
|
|
13201
|
-
const revision = customDomainRevision;
|
|
13202
|
-
const verified = await customDomainVerifier.verify(body.domain);
|
|
13203
|
-
if (auth.kind === "session" && !sessions.isLive(auth.session.id)) {
|
|
13204
|
-
return json(res, 401, { error: "Your session ended. Sign in again before connecting a domain." });
|
|
13205
|
-
}
|
|
13206
|
-
if (revision !== customDomainRevision)
|
|
13207
|
-
return json(res, 409, { error: "Domain settings changed during verification. Try again." });
|
|
13208
|
-
saveConfig({ customDomain: verified.origin });
|
|
13209
|
-
cfg.customDomain = verified.origin;
|
|
13210
|
-
customDomainRevision++;
|
|
13211
|
-
return json(res, 200, customDomainStatus());
|
|
13212
|
-
}
|
|
13213
|
-
}
|
|
13214
13201
|
m = path.match(/^\/api\/auth\/pairing\/([\w-]+)$/);
|
|
13215
13202
|
if (m && method === "DELETE") {
|
|
13216
13203
|
const cancelled = sessions.cancelPairing(m[1]);
|
|
@@ -14638,10 +14625,6 @@ const handleRequest = async (req, res) => {
|
|
|
14638
14625
|
return json(res, 403, { error: "source conversation does not belong to sender" });
|
|
14639
14626
|
if (outsideWorkStaysHere(fromThreadId))
|
|
14640
14627
|
return json(res, 403, { error: "This work came in from outside, so it can't open a new thread. Finish it here." });
|
|
14641
|
-
if (body.depth !== undefined &&
|
|
14642
|
-
(!Number.isInteger(body.depth) || body.depth < 0 || body.depth !== internalCapability.depth)) {
|
|
14643
|
-
return json(res, 403, { error: "the recursion depth does not match this turn" });
|
|
14644
|
-
}
|
|
14645
14628
|
const title = String(body.title ?? "").trim();
|
|
14646
14629
|
const message = String(body.message ?? "").trim();
|
|
14647
14630
|
if (!title || !message)
|
|
@@ -14917,7 +14900,7 @@ const handleRequest = async (req, res) => {
|
|
|
14917
14900
|
}
|
|
14918
14901
|
if (await dispatchRoutes([createInternalMcpRoutes({
|
|
14919
14902
|
...mcpServerDeps(internalSender, internalCapability.threadId, internalCapability.generation), readBody: readInternalBody,
|
|
14920
|
-
})], { req, res, url, path, method, auth, json, readBody }))
|
|
14903
|
+
}), createInternalAppSettingsRoutes({ readBody: readInternalBody, handle: (body) => appSettings.handle(body, internalCapability) })], { req, res, url, path, method, auth, json, readBody }))
|
|
14921
14904
|
return;
|
|
14922
14905
|
if (await dispatchRoutes([createInternalCredentialRequestRoutes({ readBody: readInternalBody, request: (body) => secretCards.requestCredential(internalSender, internalCapability.threadId, body) })], { req, res, url, path, method, auth, json, readBody }))
|
|
14923
14906
|
return;
|
|
@@ -15333,7 +15316,7 @@ const handleRequest = async (req, res) => {
|
|
|
15333
15316
|
const client = {
|
|
15334
15317
|
res,
|
|
15335
15318
|
admin: auth.scopes.includes("admin"),
|
|
15336
|
-
screens: url.searchParams.get("screens") !== "off",
|
|
15319
|
+
screens: url.searchParams.get("screens") !== "off", appWindow: url.searchParams.get("window") === "1",
|
|
15337
15320
|
backpressured: false,
|
|
15338
15321
|
viewer, ask: teamOwners.viewer(auth),
|
|
15339
15322
|
seen: viewer.kind === "all" && !visibleNow.filtersThreads ? { bots: new Set(), groups: new Set() } : {
|
|
@@ -16006,7 +15989,7 @@ const handleRequest = async (req, res) => {
|
|
|
16006
15989
|
catch (e) {
|
|
16007
15990
|
const status = e?.status ?? 500;
|
|
16008
15991
|
const candidateCode = e?.code;
|
|
16009
|
-
const code = typeof candidateCode === "string" && ["guarded_busy", "guarded_branch", "guarded_permissions", "guarded_request_changed", "guarded_request_untracked", "outside_workspace", "file_too_large", "no_ai", BOT_PAUSED_CODE].includes(candidateCode)
|
|
15992
|
+
const code = typeof candidateCode === "string" && ["guarded_busy", "guarded_branch", "guarded_permissions", "guarded_request_changed", "guarded_request_untracked", "outside_workspace", "file_too_large", "no_ai", BOT_PAUSED_CODE, BOT_HELD_CODE].includes(candidateCode)
|
|
16010
15993
|
? candidateCode : undefined;
|
|
16011
15994
|
return json(res, status, { error: e instanceof Error ? e.message : String(e), ...(code ? { code } : {}), ...userErrorFields(e) });
|
|
16012
15995
|
}
|
|
@@ -16099,7 +16082,8 @@ if (CLOUD_HOME)
|
|
|
16099
16082
|
maintenance: () => workspaceMaintenance.active || providerFleetReloading || providerAuthSessions.active || browserEngineInstall !== null
|
|
16100
16083
|
} }));
|
|
16101
16084
|
let pausedSent = starterAwake.paused().join();
|
|
16102
|
-
store.onChange((change) => { if (change.type
|
|
16085
|
+
store.onChange((change) => { if (change.type === "bot.deleted")
|
|
16086
|
+
botHolds.forget("bot", change.botId); if (change.type !== "bot" && change.type !== "bot.deleted")
|
|
16103
16087
|
return; const paused = starterAwake.paused().join(); if (paused !== pausedSent) {
|
|
16104
16088
|
pausedSent = paused;
|
|
16105
16089
|
broadcast({ kind: "config", ...configStatus() });
|