limixbot 0.3.48 → 0.3.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/dist/assets/{ActivityPanel-XlvWcNh9.js → ActivityPanel-DOLj6vdX.js} +1 -1
  2. package/dist/assets/{App-ChCSOxIp.js → App-D81V4ldd.js} +111 -111
  3. package/dist/assets/{AppEventEditor-BVUu_Lcx.js → AppEventEditor-ab3UR4LS.js} +1 -1
  4. package/dist/assets/BotSettingsDialog-D_cLgiH4.js +16 -0
  5. package/dist/assets/{BrowserPanel-BCIfyKnn.js → BrowserPanel-BMzs1O8G.js} +1 -1
  6. package/dist/assets/{BrowserProfilesManager-DbgSvM0f.js → BrowserProfilesManager-DOVv9QX0.js} +1 -1
  7. package/dist/assets/{CloudAddDialog-Dl9Oshym.js → CloudAddDialog-DrhnkBjW.js} +1 -1
  8. package/dist/assets/{ComputerFilesPane-Cgj-gSm4.js → ComputerFilesPane-CN8QMnw3.js} +1 -1
  9. package/dist/assets/{ComputerPanel-CWt6-5YN.js → ComputerPanel-CaIt9MKD.js} +2 -2
  10. package/dist/assets/{DataPanel-S3D8uZov.js → DataPanel-BNVcp6of.js} +1 -1
  11. package/dist/assets/{DesktopViewer-D1ZJW3yu.js → DesktopViewer-DFhYwHIq.js} +1 -1
  12. package/dist/assets/{FilesView-DUUdJ-mW.js → FilesView-DW9SCyV-.js} +1 -1
  13. package/dist/assets/{GrokMoveDialog-DgUr2ErY.js → GrokMoveDialog-mHb6IcFC.js} +1 -1
  14. package/dist/assets/{InspectorPanel-D0oeNabp.js → InspectorPanel-Ce4_qW9h.js} +1 -1
  15. package/dist/assets/{KeyboardShortcutsModal-DDjFDnGN.js → KeyboardShortcutsModal-CLNFMSjb.js} +1 -1
  16. package/dist/assets/{LiveDesktop-CqifRkl1.js → LiveDesktop-BjRurHnb.js} +1 -1
  17. package/dist/assets/{LocalVmWorkspace-BQbtgJKn.js → LocalVmWorkspace-CqsCtYlw.js} +1 -1
  18. package/dist/assets/{MacLocalControl-CfV-X14C.js → MacLocalControl-CKBC29SJ.js} +1 -1
  19. package/dist/assets/{MarkdownFilePreview-X0MehVrM.js → MarkdownFilePreview-Dmulebe8.js} +1 -1
  20. package/dist/assets/{MenuMotion-BNVn5GSt.js → MenuMotion-CtV49YrJ.js} +1 -1
  21. package/dist/assets/{NewBotDialog-_J5mh-JV.js → NewBotDialog-D9rstuqs.js} +1 -1
  22. package/dist/assets/{PhoneAppDialog-C5EDNXE1.js → PhoneAppDialog-CaCKkATB.js} +1 -1
  23. package/dist/assets/{PlacesRail-CIHIyPoQ.js → PlacesRail-COZEZH0n.js} +1 -1
  24. package/dist/assets/{PluginsPanel-Uf4xxYLo.js → PluginsPanel-DYY_IXSa.js} +1 -1
  25. package/dist/assets/{ProIntroduction-C1ZjYkae.js → ProIntroduction-DfpCTBHe.js} +1 -1
  26. package/dist/assets/{RemoteAgentSettingsPanel-C2ii1ptH.js → RemoteAgentSettingsPanel-OSSdthdZ.js} +1 -1
  27. package/dist/assets/{RoomPanel-rpY6VUWk.js → RoomPanel-BQA73L-t.js} +1 -1
  28. package/dist/assets/{RoutinesPage-D3s9tF-X.js → RoutinesPage-CXOMn_kl.js} +1 -1
  29. package/dist/assets/{SettingsModal-BGxaTJg5.js → SettingsModal-BsiCQwg6.js} +1 -1
  30. package/dist/assets/{ShareTeamDialog-BcXftoRN.js → ShareTeamDialog-IqLImhjS.js} +1 -1
  31. package/dist/assets/{SignedInSites-BGTefeLy.js → SignedInSites-BpHOfApd.js} +1 -1
  32. package/dist/assets/{TeamLibraryPanel-BGrOgQek.js → TeamLibraryPanel-4ktTFM-N.js} +1 -1
  33. package/dist/assets/{TeamMapPage-C6S7_ma-.js → TeamMapPage-9nuEqxdk.js} +1 -1
  34. package/dist/assets/{TriggersPage-CtgQCp6P.js → TriggersPage-CS8Xxzuy.js} +1 -1
  35. package/dist/assets/VisibilitySection-DNZ4sulC.js +22 -0
  36. package/dist/assets/{WebhookTrigger-DwY5yBvw.js → WebhookTrigger-CwZdLciz.js} +1 -1
  37. package/dist/assets/{WorksOnGrid-BQiI1n3L.js → WorksOnGrid-CYzp7YXl.js} +1 -1
  38. package/dist/assets/{abnfDiagram-YUKMZFIV-E5u2FY-u.js → abnfDiagram-YUKMZFIV-DmWI1Mtg.js} +1 -1
  39. package/dist/assets/{activity-CBC39k-I.js → activity-WfPBvs3Z.js} +1 -1
  40. package/dist/assets/{architectureDiagram-47P4ROYG-HbRi9-3s.js → architectureDiagram-47P4ROYG-rzc3-Q0w.js} +1 -1
  41. package/dist/assets/{blockDiagram-E7TT5TSB-BvbJQxRJ.js → blockDiagram-E7TT5TSB-VPDyKlQ7.js} +1 -1
  42. package/dist/assets/{c4Diagram-CRA5TL53-6XQ7PCr5.js → c4Diagram-CRA5TL53-C9OGckku.js} +1 -1
  43. package/dist/assets/{calendar-days-uVdUhtRr.js → calendar-days-W4JHp6-m.js} +1 -1
  44. package/dist/assets/channel-DAFePtOr.js +1 -0
  45. package/dist/assets/{chunk-2Q5K7J3B-KKy_GF1y.js → chunk-2Q5K7J3B-EpYkwMC8.js} +1 -1
  46. package/dist/assets/{chunk-5VM5RSS4-CAqDmDHS.js → chunk-5VM5RSS4-DyJEI8X6.js} +1 -1
  47. package/dist/assets/{chunk-7TKQ45FW-Y_lWu8VB.js → chunk-7TKQ45FW-CJvVxQ2I.js} +1 -1
  48. package/dist/assets/{chunk-AW2ZBBNX-BO3PAeWa.js → chunk-AW2ZBBNX-s78zNrhy.js} +1 -1
  49. package/dist/assets/{chunk-FVRAUYC3-BEy6ZFro.js → chunk-FVRAUYC3-CUPjaz9e.js} +2 -2
  50. package/dist/assets/{chunk-HTAEGDNF-ge9hH-_c.js → chunk-HTAEGDNF-BhuM2dxl.js} +1 -1
  51. package/dist/assets/{chunk-JWPE2WC7-D_lI4aTU.js → chunk-JWPE2WC7-DAj1UgJ8.js} +1 -1
  52. package/dist/assets/{chunk-KQW6MTUR-DPMJ2vJV.js → chunk-KQW6MTUR-BgfdtkJI.js} +1 -1
  53. package/dist/assets/{chunk-XXDRQBXY-C4mYjNRr.js → chunk-XXDRQBXY-Vak43p0S.js} +1 -1
  54. package/dist/assets/{classDiagram-v2-K4WV4PDN-DlGliqAX.js → classDiagram-v2-K4WV4PDN-Cjvbs86l.js} +1 -1
  55. package/dist/assets/{coins-C5bat6u2.js → coins-B1tpScHw.js} +1 -1
  56. package/dist/assets/{core-BIk0hYPX.js → core-CmGeFi0y.js} +1 -1
  57. package/dist/assets/{cose-bilkent-JH36ORCC-DVNjr33T.js → cose-bilkent-JH36ORCC-BEekB3gO.js} +1 -1
  58. package/dist/assets/{cynefin-EF2NZ3EQ-B6NBBGhM.js → cynefin-EF2NZ3EQ-D3g3_jPk.js} +1 -1
  59. package/dist/assets/{cynefinDiagram-3GCD6N5R-xdyPjX9I.js → cynefinDiagram-3GCD6N5R-13xmjXZj.js} +1 -1
  60. package/dist/assets/{dagre-W4DXFKR2-Cj9fToJq.js → dagre-W4DXFKR2-CHAV8s2t.js} +1 -1
  61. package/dist/assets/de-CJcRve_J.js +8 -0
  62. package/dist/assets/{diagram-2UJZ2QOL-FQ9YmfPr.js → diagram-2UJZ2QOL-DgwdzZN7.js} +1 -1
  63. package/dist/assets/{diagram-OVF4WLC6-DjjDmsSv.js → diagram-OVF4WLC6-DobmWwa_.js} +1 -1
  64. package/dist/assets/{diagram-PFPMY2P6-DMa8rvdp.js → diagram-PFPMY2P6-CWjTVc0N.js} +1 -1
  65. package/dist/assets/{diagram-UMYRVEAY-BzFwDQTx.js → diagram-UMYRVEAY-CAruZkhk.js} +1 -1
  66. package/dist/assets/{diagram-YEKJPTXX-D2oM-7uQ.js → diagram-YEKJPTXX-Bcs89mQN.js} +1 -1
  67. package/dist/assets/{diagram-ZIFT7M5P-BDIMPZpL.js → diagram-ZIFT7M5P-Dz-O18tl.js} +1 -1
  68. package/dist/assets/{ebnfDiagram-VR2GEFS7-5YsbZGCa.js → ebnfDiagram-VR2GEFS7-CJX4rMIs.js} +1 -1
  69. package/dist/assets/{elk-IJKZMXRS-DSZEAjKl.js → elk-IJKZMXRS-Byop6FtW.js} +1 -1
  70. package/dist/assets/{erDiagram-O2IAPWRE-BeXzxJfj.js → erDiagram-O2IAPWRE-ChpLnNCF.js} +1 -1
  71. package/dist/assets/es-DL-LT7LK.js +6 -0
  72. package/dist/assets/{file-up-pts79DW9.js → file-up-G3qWGpEB.js} +1 -1
  73. package/dist/assets/{flowDiagram-OXPTDLAJ-D05KXhfA.js → flowDiagram-OXPTDLAJ-CWWhkNOE.js} +1 -1
  74. package/dist/assets/fr-Cqgsh6FT.js +8 -0
  75. package/dist/assets/{ganttDiagram-R7TSEDQI-9IKnYcFv.js → ganttDiagram-R7TSEDQI-DMXicWgq.js} +1 -1
  76. package/dist/assets/{gitGraphDiagram-XJZIOB7I-De1Fj8FH.js → gitGraphDiagram-XJZIOB7I-CpiCnPUQ.js} +1 -1
  77. package/dist/assets/hi-DRlAa-mm.js +1 -0
  78. package/dist/assets/{import-name-BfYhMg1y.js → import-name-bz0My-IU.js} +1 -1
  79. package/dist/assets/{index-up1CA0zX.js → index-D_0hmaNc.js} +2 -2
  80. package/dist/assets/{index-PhXpx5mv.js → index-arIlKsXK.js} +1 -1
  81. package/dist/assets/{infoDiagram-5W2HQ5XZ-BB9tseML.js → infoDiagram-5W2HQ5XZ-BU9zbv9f.js} +1 -1
  82. package/dist/assets/{ishikawaDiagram-K3B6WC7H-zQATL5V8.js → ishikawaDiagram-K3B6WC7H-KEjUVvmG.js} +1 -1
  83. package/dist/assets/it-BapR4fyG.js +13 -0
  84. package/dist/assets/ja-rH-EVVS5.js +13 -0
  85. package/dist/assets/{journeyDiagram-COXZFDF6-DWl-s77q.js → journeyDiagram-COXZFDF6-DGU1V_40.js} +1 -1
  86. package/dist/assets/{kanban-definition-P3RFRI5V-0gNFYf4b.js → kanban-definition-P3RFRI5V-weJ2OFB2.js} +1 -1
  87. package/dist/assets/ko-DXzDBiEb.js +13 -0
  88. package/dist/assets/{mcp-servers-CkHO2yG6.js → mcp-servers-DJbj8A-F.js} +1 -1
  89. package/dist/assets/{mermaid.core-aRNMQk5-.js → mermaid.core-DhSRukyE.js} +4 -4
  90. package/dist/assets/{mindmap-definition-LZFPQGKD-Bof3P1eD.js → mindmap-definition-LZFPQGKD-DKKO0DWj.js} +1 -1
  91. package/dist/assets/{minimize-B2-pCESw.js → minimize-C16JX5N8.js} +1 -1
  92. package/dist/assets/{monitor-ET_fUXyt.js → monitor-Bben4nuu.js} +1 -1
  93. package/dist/assets/{new-bot-D-yMiT7M.js → new-bot-Dr5oueeD.js} +1 -1
  94. package/dist/assets/{org-library-D_E7GVek.js → org-library-kDl9eWm6.js} +1 -1
  95. package/dist/assets/{package-format-B5SXvrHy.js → package-format-DigdVa67.js} +1 -1
  96. package/dist/assets/{pegDiagram-BGZESJAR-DDlKwD4R.js → pegDiagram-BGZESJAR-CNNprTkt.js} +1 -1
  97. package/dist/assets/{pieDiagram-CAPJLFHJ-DtwDw9NT.js → pieDiagram-CAPJLFHJ-pS8U8zdK.js} +1 -1
  98. package/dist/assets/pl-BV7GtmiM.js +13 -0
  99. package/dist/assets/pt-br-Dr9a700a.js +13 -0
  100. package/dist/assets/{quadrantDiagram-GDMTTRAM-CDeSRO7Z.js → quadrantDiagram-GDMTTRAM-CLk_fr2j.js} +1 -1
  101. package/dist/assets/{rail-DdyH9Fje.js → rail-CpM5o3ti.js} +1 -1
  102. package/dist/assets/{railroadDiagram-SM67HX2B-DJAwC8qS.js → railroadDiagram-SM67HX2B-DH8VPMJG.js} +1 -1
  103. package/dist/assets/{remote-desktop-panel-DN2__781.js → remote-desktop-panel-B0yyDRuX.js} +1 -1
  104. package/dist/assets/{requirementDiagram-X7JNWC4A-WsM1ryr2.js → requirementDiagram-X7JNWC4A-CoHRI7dx.js} +1 -1
  105. package/dist/assets/ru-DSSPfQyi.js +13 -0
  106. package/dist/assets/{sankeyDiagram-UM26HJRW-BaRMQhWI.js → sankeyDiagram-UM26HJRW-2zcVfvWw.js} +1 -1
  107. package/dist/assets/{sequenceDiagram-ZO4K6R2Y-BaxysqoC.js → sequenceDiagram-ZO4K6R2Y-B0d21eid.js} +1 -1
  108. package/dist/assets/{sizeCapture-INFHLROL-BI5Y1n1O.js → sizeCapture-INFHLROL-CcYkvoh7.js} +1 -1
  109. package/dist/assets/{stateDiagram-v2-TBUQTH76-DqD0Wnx3.js → stateDiagram-v2-TBUQTH76-B5EilR72.js} +1 -1
  110. package/dist/assets/{styles-CxbuKpLq.js → styles-Cbtcp5Re.js} +2 -2
  111. package/dist/assets/styles-rYmbSF4Y.css +1 -0
  112. package/dist/assets/{swimlanes-N4OXWK64-pCvU3flP.js → swimlanes-N4OXWK64-xM7mNll9.js} +1 -1
  113. package/dist/assets/swimlanesDiagram-K3J5GTZL-CnVwW_RC.js +8 -0
  114. package/dist/assets/{team-share-C-EjLBgR.js → team-share-Bp69YR8I.js} +1 -1
  115. package/dist/assets/{timeline-definition-YOQAKGHF-BEpkjZWs.js → timeline-definition-YOQAKGHF-DM6SmhCQ.js} +1 -1
  116. package/dist/assets/tr-DJNxAMAd.js +6 -0
  117. package/dist/assets/uk-SbiO0vE9.js +1 -0
  118. package/dist/assets/{usecaseDiagram-VIAY4XPW-DUBT_yZ3.js → usecaseDiagram-VIAY4XPW-DiUdGN3G.js} +1 -1
  119. package/dist/assets/{vennDiagram-BLWOH2XV-CxArldGE.js → vennDiagram-BLWOH2XV-DrtmNBp4.js} +1 -1
  120. package/dist/assets/{vi-BYSU3aaD.js → vi-vTat5qyz.js} +1 -1
  121. package/dist/assets/{wardleyDiagram-YMQ3BMBF-BQIk4Vh2.js → wardleyDiagram-YMQ3BMBF-D7jihWm5.js} +1 -1
  122. package/dist/assets/{xychartDiagram-TAQBALBS-BcBrHX_m.js → xychartDiagram-TAQBALBS-BCk-D9Uj.js} +1 -1
  123. package/dist/assets/zh-Ce8h_nYy.js +13 -0
  124. package/dist/assets/zh-tw-DXbqGzsI.js +13 -0
  125. package/dist/index.html +3 -3
  126. package/dist/rail.html +5 -5
  127. package/dist-server/container-mcp.js +2 -2
  128. package/dist-server/drivers/agents-proxy.js +92 -89
  129. package/dist-server/index.js +1614 -1568
  130. package/dist-server/openmausbot.js +561 -632
  131. package/dist-server/package.json +1 -1
  132. package/dist-server/pair-cli.js +65 -62
  133. package/dist-server/server/activity.js +1 -0
  134. package/dist-server/server/chief-of-staff.js +3 -2
  135. package/dist-server/server/container-computer.js +31 -4
  136. package/dist-server/server/default-bot.js +2 -2
  137. package/dist-server/server/drivers/agents-call.js +3 -0
  138. package/dist-server/server/drivers/agents-catalog.js +16 -6
  139. package/dist-server/server/index.js +76 -15
  140. package/dist-server/server/limix-assistant-name.js +18 -0
  141. package/dist-server/server/limix-channel-identity.js +1 -0
  142. package/dist-server/server/limix-channel-media.js +1 -0
  143. package/dist-server/server/limix-desktop-resources.js +26 -0
  144. package/dist-server/server/limix-diagnose.js +41 -0
  145. package/dist-server/server/limix-gateway-sidecar.js +23 -0
  146. package/dist-server/server/limix-managed-grant.js +110 -0
  147. package/dist-server/server/limix-team-desktop.js +32 -0
  148. package/dist-server/server/routes/bot-messages.js +2 -2
  149. package/dist-server/server/routes/bot-patch.js +24 -0
  150. package/dist-server/server/routes/internal-chief-team.js +15 -5
  151. package/dist-server/server/team-setup-requests.js +60 -5
  152. package/dist-server/shared/default-bot.js +3 -1
  153. package/dist-server/shared/new-bot-defaults.js +1 -0
  154. package/dist-server/shared/ready-bots.js +331 -0
  155. package/dist-server/vps-container-mcp.js +8 -8
  156. package/package.json +1 -1
  157. package/dist/assets/BotSettingsDialog-DITlFmzw.js +0 -16
  158. package/dist/assets/VisibilitySection-CLj2_C44.js +0 -22
  159. package/dist/assets/channel-CeBX8eSw.js +0 -1
  160. package/dist/assets/de-BZ9nuzrz.js +0 -8
  161. package/dist/assets/es-BxLq0ePd.js +0 -6
  162. package/dist/assets/fr-BoXnQ5F8.js +0 -8
  163. package/dist/assets/hi-CcIxinfW.js +0 -1
  164. package/dist/assets/it-I6t2VEkh.js +0 -13
  165. package/dist/assets/ja-XTlk5V47.js +0 -13
  166. package/dist/assets/ko-BplWTKGd.js +0 -13
  167. package/dist/assets/pl-Bv2R8H4r.js +0 -13
  168. package/dist/assets/pt-br-CM02ONwa.js +0 -15
  169. package/dist/assets/ru-CJcyvxC6.js +0 -13
  170. package/dist/assets/styles-3v-vHlNV.css +0 -1
  171. package/dist/assets/swimlanesDiagram-K3J5GTZL-Bt5R1mJd.js +0 -8
  172. package/dist/assets/tr-CTl25e95.js +0 -6
  173. package/dist/assets/uk-B_psMXqm.js +0 -1
  174. package/dist/assets/zh-BPHbGe7C.js +0 -13
  175. package/dist/assets/zh-tw-BMYbS8NC.js +0 -15
@@ -354,7 +354,7 @@ const TOOL_DEFINITIONS = [
354
354
  },
355
355
  {
356
356
  name: "create_bot",
357
- description: "Chief of Staff only: add a specialist to your section now; the person can undo it. instructions become its soul. Omit modelSelection for the workspace default, or use exact IDs from list_team_setup. It starts with your connected apps, at the default access level. Assign work with coordinate_bots. At most four per turn.",
357
+ description: "Chief of Staff only: propose one specialist for your section on a review card; it is added only if the person approves. Prefer propose_team_setup for ready-made bots, several bots or a group chat. instructions become its soul. Omit modelSelection for the workspace default, or use exact IDs from list_team_setup. It starts with your connected apps, at the default access level. Assign work with coordinate_bots. At most four per turn.",
358
358
  inputSchema: {
359
359
  type: "object",
360
360
  properties: {
@@ -379,14 +379,19 @@ const TOOL_DEFINITIONS = [
379
379
  description: "Chief of Staff only: list authorized teams, teammate IDs, and exact engine/model choices for team setup. Call before proposing configuration; never invent model IDs. Existing thread models are independent of bot defaults.",
380
380
  inputSchema: { type: "object", additionalProperties: false, properties: {} },
381
381
  },
382
+ {
383
+ name: "diagnose_limix",
384
+ description: "Chief of Staff only: read-only health check of Limix Bot: Telegram/Zalo/Discord connection status (running, stopped, token refused, conflict), AI engines that are signed out or missing, and whether any bot exists, each problem with a suggested fix. Call it when the person reports a bot or chat connection not answering, before guessing. It changes nothing: tell the person what is wrong and the fix, and use propose_team_setup for any bot change. Secrets are never included.",
385
+ inputSchema: { type: "object", additionalProperties: false, properties: {} },
386
+ },
382
387
  {
383
388
  name: "list_team_library",
384
- description: "Chief of Staff only: ready-made teams, each with a summary and roles (lead = the team's Chief). Create roles with create_bot.",
389
+ description: "Chief of Staff only: ready-made teams, each with a summary and roles (lead = the team's Chief), and botTemplates: ready-made single bots. Propose either with propose_team_setup (template = a botTemplates id).",
385
390
  inputSchema: { type: "object", additionalProperties: false, properties: {} },
386
391
  },
387
392
  {
388
393
  name: "propose_team_setup",
389
- description: "Chief of Staff only: submit all requested specialist creation, profile/model configuration, Chief assignments, and authorized team moves in ONE combined plan. Use exact catalog engine/model IDs from list_team_setup. Combine all fields for each bot; use the same create key or botId to coalesce repeated entries. New teams must be named explicitly in newTeams and have a specialist in this plan; access is granted only to those new teams. Existing unauthorized teams cannot be included. Models change bot defaults for groups/new threads; existing threads and execution permissions stay unchanged. If review is pending, the decision and structured result automatically resume you once; do not ask again, poll, or repeat the proposal." + APPLIES_OUTCOME,
394
+ description: "Chief of Staff only: submit all requested specialist creation, profile/model configuration, Chief assignments, and authorized team moves in ONE combined plan. Use exact catalog engine/model IDs from list_team_setup. Combine all fields for each bot; use the same create key or botId to coalesce repeated entries. New teams must be named explicitly in newTeams and have a specialist in this plan; access is granted only to those new teams. Existing unauthorized teams cannot be included. Models change bot defaults for groups/new threads; existing threads and execution permissions stay unchanged. Every setup waits for the person's decision on a card: end your turn; the decision and structured result automatically resume you once. Do not ask again, poll, or repeat the proposal. Never claim success without an applied result.",
390
395
  inputSchema: {
391
396
  type: "object", additionalProperties: false,
392
397
  properties: {
@@ -397,19 +402,24 @@ const TOOL_DEFINITIONS = [
397
402
  properties: {
398
403
  action: { type: "string", enum: ["create", "update"] },
399
404
  key: { type: "string", description: "For create: your stable short name for this new bot in this plan." },
405
+ template: { type: "string", description: "For create: a botTemplates id from list_team_library. Fills name, title, description and soul; fields you give override them." },
400
406
  botId: { type: "string", description: "For update: exact existing bot ID from list_team_setup." },
401
407
  fields: { type: "object", additionalProperties: false, properties: {
402
408
  name: { type: "string", maxLength: 100 }, title: { type: "string", maxLength: 200 },
403
409
  chiefOfStaff: { type: "boolean", description: "Appoint or remove this team's Chief. At most one Chief per team: explicitly demote the current Chief in the same plan when replacing them. Does not grant access to other teams or change execution permissions." },
404
- description: { type: "string", maxLength: 4000 }, soul: { type: "string", description: "Standing instructions; required with name/title/modelSelection for every new bot." },
410
+ description: { type: "string", maxLength: 4000 }, soul: { type: "string", description: "Standing instructions; every new bot needs name, title and soul (a template fills them). modelSelection defaults to yours." },
405
411
  cwd: { type: "string", maxLength: 1024, description: "Create only: absolute path of the folder the new bot's tools read and write in. It must already exist. Leave it out for a private workspace." },
406
412
  section: { type: "string", maxLength: 60, description: "Exact authorized existing team, or a team explicitly named in newTeams. Empty string means General." },
407
413
  modelSelection: { type: "object", additionalProperties: false, properties: {
408
414
  instanceId: { type: "string" }, model: { type: "string" }, effort: { type: "string" }, variant: { type: "string" },
409
415
  }, required: ["instanceId", "model"] },
410
416
  } },
411
- }, required: ["action", "fields"],
417
+ }, required: ["action"],
412
418
  } },
419
+ room: { type: "object", additionalProperties: false, description: "Offer a group chat with these bots, led by you; the person chooses on the card whether to create it.", properties: {
420
+ name: { type: "string", minLength: 1, maxLength: 100 },
421
+ members: { type: "array", maxItems: 24, items: { type: "string" }, description: "Create keys from this plan or existing bot IDs; omit for every bot this plan creates." },
422
+ }, required: ["name"] },
413
423
  }, required: ["reason", "operations"],
414
424
  },
415
425
  },
@@ -857,7 +867,7 @@ const SKILL_TOOL_NAMES = new Set(["skills_list", "skill_manage"]);
857
867
  export const SHARED_COMPUTER_TOOL_NAMES = new Set(["list_shared_computers", "shared_computer"]);
858
868
  const VOICE_TOOL_NAMES = new Set(["send_voice_note"]);
859
869
  const CHIEF_ONLY_TOOL_NAMES = new Set([
860
- "create_bot", "list_team_setup", "list_team_library", "propose_team_setup", "propose_bot_deletion", "manage_room", "retry_thread",
870
+ "create_bot", "list_team_setup", "diagnose_limix", "list_team_library", "propose_team_setup", "propose_bot_deletion", "manage_room", "retry_thread",
861
871
  ]);
862
872
  const CHIEF_TARGET_TOOL_NAMES = new Set(["propose_profile", "propose_model"]);
863
873
  const WATCHER_TOOL_NAMES = new Set(["create_options_card"]);
@@ -154,6 +154,9 @@ import { coordinateTooLong } from "./too-long.js";
154
154
  import { chiefAbsentFrom, createChiefRooms } from "./host/chief-rooms.js";
155
155
  import { chiefLevel, readTeamRolesWith } from "./chief-level.js";
156
156
  import { defaultBotRefusal, ensureDefaultBot } from "./default-bot.js";
157
+ import { renameLegacyDefaultBots } from "./limix-assistant-name.js";
158
+ import { withBotDesktopResources } from "./limix-desktop-resources.js";
159
+ import { teamDesktopKey, teamDesktopMembers, teamDesktopResources } from "./limix-team-desktop.js";
157
160
  import { buildRecall, recallRooms, recallThreadIds, withRecalled } from "./recall.js";
158
161
  import { hostTimeZone, takesTurnClock, turnClockLine, withTurnClock } from "./turn-clock.js";
159
162
  import { createMemoryUpkeep, dreamConversations, upkeepEnabled } from "./memory-upkeep.js";
@@ -165,7 +168,7 @@ import { createPersonPreference } from "./host/person-preference.js";
165
168
  import { botMemoryUpdate, ownersOwnAsk } from "./memory-forget.js";
166
169
  import { canManage, canReach, hasTeamAuthority, livePeerRoster, livePeerRosterBlock, peerName, peerRosterSystemPrompt, peerStatus, peerStatusWords, reachablePeers, resolveTeammate, roomPeerRosterSystemPrompt, roomRosterLine } from "./peer-roster.js";
167
170
  import { roomPostRefusal, sharedNamesNote, unreachedMentionLines } from "./same-name-mentions.js";
168
- import { containerComputerAction, containerComputerFrame, containerComputerStatus, containerExec, containerRuntimeStatus, localVmWakeAction, perBotLocalVmTarget, poolLocalVmTarget, SHARED_LOCAL_VM_TARGET, setupCommands, VM_WORKSPACE_GUEST, } from "./container-computer.js";
171
+ import { containerComputerAction, containerComputerFrame, containerComputerStatus, containerExec, containerRuntimeStatus, localVmWakeAction, perBotLocalVmTarget, teamLocalVmTarget, teamFolderDir, TEAM_FOLDER_GUEST, poolLocalVmTarget, SHARED_LOCAL_VM_TARGET, setupCommands, VM_WORKSPACE_GUEST, } from "./container-computer.js";
169
172
  import { containerComputerMcp } from "./local-vm-box.js";
170
173
  import { attachForTurn, saveBotAttachment } from "./bot-attachment.js";
171
174
  import { cacheUntilConfigChanges, ensureDirs, instanceConfigs, loadConfig, changedInstanceIds, engineLaunches, localVmIdleTimeoutMinutes, localVmMaxInstances, localVmMode, localVmPreservesInstalledApps, localVmResources, roomTurnTimeoutMinutes, mcpCallTimeoutMinutes, cacheKeepWarmSettings, threadEventLogMaxBytes, threadEventLogRetentionDays, saveConfig, showToolCallsEnabled, claudeUserMcpEnabled, skillAuthoringEnabled, skillAutoApplyEnabled, skillReviewEnabled, skillReviewSteps, autoRecallEnabled, captureQuietMs, roomMemoryCaptureEnabled, tidyHour, sharedComputersEnabled, ownerLendingEnabled, builtInBrowserEnabled, persistableInstanceConfigs, vpsSshAlias, DATA_DIR, EVENTS_DIR, onConfigSaved, CLAUDE_API_INSTANCE, openCodeProviderKeys, } from "./config.js";
@@ -523,7 +526,8 @@ import { createGroupOrderRoutes } from "./routes/group-order.js";
523
526
  import { createBotLifecycleRoutes } from "./routes/bot-lifecycle.js";
524
527
  import { createBotSkillsRoutes } from "./routes/bot-skills.js";
525
528
  import { startHubAutoSync } from "./limix-skill-hub.js";
526
- import { startLimixGatewaySidecar } from "./limix-gateway-sidecar.js";
529
+ import { limixGatewayConnections, startLimixGatewaySidecar } from "./limix-gateway-sidecar.js";
530
+ import { createLimixManagedGrant, limixManagedGrantConfig } from "./limix-managed-grant.js";
527
531
  import { limixBundledFor, limixSelectBundled, limixSkillDefaultsMigration } from "./limix-skill-store.js";
528
532
  import { createSkillShareRoutes } from "./routes/skill-share.js";
529
533
  import { createTeamContextRoutes } from "./routes/team-context.js";
@@ -682,6 +686,10 @@ if (CLOUD_HOME) {
682
686
  repairMovedWorkspacePaths(DATA_DIR);
683
687
  acceptLegacyOrigins(CLOUD_HOME.legacyOrigins);
684
688
  }
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]);
685
693
  if (CLOUD_PERSONAL)
686
694
  sessions.requireAdmin(userError("serverError.cloud.personal"));
687
695
  const lendingEnabled = () => sharedComputersEnabled(cfg) || CLOUD_HOME !== null || ownHome.here();
@@ -2892,6 +2900,7 @@ for (const pending of startupCatalogs) {
2892
2900
  }
2893
2901
  const firstHourFresh = Boolean(CLOUD_PERSONAL) && store.needsSeed();
2894
2902
  testedAi.seed({ defaultBot: !CLOUD_TEAM, ...(firstHourFresh ? { intro: (bot) => greetingMessage(bot, { name: cfg.profile?.name }, cfg.language) } : {}) });
2903
+ renameLegacyDefaultBots(store);
2895
2904
  moveFreeze.hold(() => { if (!CLOUD_TEAM)
2896
2905
  ensureDefaultBot(store, { dataDir: DATA_DIR }); }, () => { });
2897
2906
  if (CLOUD_TEAM)
@@ -2939,7 +2948,7 @@ const wireTask = (task, botModel, awaiting = threadsAwaitingTeammates()) => {
2939
2948
  // Snoozes heal on read against the server clock; the 0 sentinel ("until new activity") survives reads.
2940
2949
  const { snoozedUntil, ...base } = toWireTask(task, botModel);
2941
2950
  const keepWarm = cacheKeepWarmStatus(task.threadId);
2942
- const coordinated = { ...base, waitingForTeammates: awaiting.has(task.threadId) && !task.busy, ...(keepWarm ? { cacheKeepWarm: keepWarm } : {}), ...(teamHost.ownTurn(task.threadId) ? { private: true } : {}), ...teamMessages.inbox.wire(task.threadId), ...runOwners.askedBy(task) };
2951
+ const coordinated = { ...base, ...(task.botApi && isLimixOwnerThread(task.threadId) ? { channelOwner: true } : {}), waitingForTeammates: awaiting.has(task.threadId) && !task.busy, ...(keepWarm ? { cacheKeepWarm: keepWarm } : {}), ...(teamHost.ownTurn(task.threadId) ? { private: true } : {}), ...teamMessages.inbox.wire(task.threadId), ...runOwners.askedBy(task) };
2943
2952
  const asleep = snoozedUntil === 0 || (snoozedUntil !== undefined && snoozedUntil > Date.now());
2944
2953
  return asleep ? { ...coordinated, snoozedUntil } : coordinated;
2945
2954
  };
@@ -2978,7 +2987,7 @@ function previewSystemPrompt(bot) {
2978
2987
  const computerPromptKind = resolveComputerPromptKind({
2979
2988
  kind: previewComputer === "vm" ? "vm" : previewComputer === "cloud"
2980
2989
  ? bot.cloudBackend === "vps" ? "vps" : "box" : previewComputer === "local" ? "local" : null,
2981
- vmPrivate: localVmMode(cfg) === "per-bot",
2990
+ vmPrivate: localVmMode(cfg) === "per-bot" && !bot.desktopTeam,
2982
2991
  });
2983
2992
  const peers = reachablePeers(store.bots, bot);
2984
2993
  const coordination = chiefLevel(bot)
@@ -3004,7 +3013,7 @@ function previewSystemPrompt(bot) {
3004
3013
  }),
3005
3014
  },
3006
3015
  { id: "shell", label: "Long-running commands", text: privateWorkspace ? longCommandsPrompt(computerPromptKind) : "" },
3007
- { id: "computer", label: "Computer", text: computerPrompt(computerPromptKind) },
3016
+ { id: "computer", label: "Computer", text: computerPrompt(computerPromptKind) + (computerPromptKind === "vm-private" || computerPromptKind === "vm-shared" ? limixTeamDesktopNote(bot) : "") },
3008
3017
  { id: "team-computer", label: "Team computer", text: teamComputerPrompt(teamComputer) },
3009
3018
  { id: "plan", label: "Surface", text: previewPlan.computer === undefined ? "" : surfacePrompt({
3010
3019
  computer: previewPlan.computer && previewPlan.computer !== "off" && computerPromptKind ? previewPlan.computer : null,
@@ -3115,6 +3124,42 @@ function sourceApprovalMode(botId, threadId) {
3115
3124
  function fullAccessForSource(botId, threadId) {
3116
3125
  return sourceApprovalMode(botId, threadId) === "full";
3117
3126
  }
3127
+ /** Limix: tells a bot which teammates share its desktop or its department folder, so they can split work on the same files. */
3128
+ function limixTeamDesktopNote(bot) {
3129
+ if (localVmMode(cfg) !== "per-bot")
3130
+ return "";
3131
+ const team = teamDesktopKey(bot);
3132
+ const mates = (shared) => store.bots.filter((other) => other.id !== bot.id && !other.hidden && teamDesktopKey(other) === team
3133
+ && (shared ? other.desktopTeam : other.desktopTeamFolder && !other.desktopTeam)).map((other) => `@${other.name}`);
3134
+ if (bot.desktopTeam) {
3135
+ const names = mates(true);
3136
+ return ` This desktop is your department's: ${names.length ? names.join(", ") + " use" : "teammates who join use"} it too, one at a time, so leave files and windows tidy for them.`;
3137
+ }
3138
+ if (!bot.desktopTeamFolder)
3139
+ return "";
3140
+ const names = mates(false);
3141
+ return ` Your desktop also has ${TEAM_FOLDER_GUEST}, a folder shared with ${names.length ? names.join(", ") : "your department's bots that join it"}, each on their own desktop; work there on shared files and tell them with coordinate_bots what you changed.`;
3142
+ }
3143
+ /** Limix: a bot with its own desktop that joined its department's folder gets that folder mounted when the desktop is created. */
3144
+ function localVmTeamFolderFor(target) {
3145
+ if (!target.key.startsWith("bot:"))
3146
+ return undefined;
3147
+ const bot = store.bots.find((candidate) => perBotLocalVmTarget(candidate.id).key === target.key);
3148
+ return bot?.desktopTeamFolder && !bot.desktopTeam ? teamFolderDir(teamDesktopKey(bot)) : undefined;
3149
+ }
3150
+ /** Limix: a bot's own desktop takes that bot's size when it set one; the shared and pooled desktops keep the workspace's. */
3151
+ function localVmResourcesFor(target) {
3152
+ if (target.key.startsWith("team:")) {
3153
+ const team = [...new Set(store.bots.filter((candidate) => candidate.desktopTeam).map(teamDesktopKey))].find((key) => teamLocalVmTarget(key).key === target.key);
3154
+ const capacity = limixVmCapacity(localVmResources(cfg));
3155
+ const { chosen: _chosen, ...size } = teamDesktopResources(localVmResources(cfg), team === undefined ? [] : teamDesktopMembers(store.bots, team), capacity);
3156
+ return size;
3157
+ }
3158
+ const bot = target.key.startsWith("bot:") ? store.bots.find((candidate) => perBotLocalVmTarget(candidate.id).key === target.key) : undefined;
3159
+ return withBotDesktopResources(localVmResources(cfg), bot);
3160
+ }
3161
+ /** Limix: bot and team changes the assistant proposes always wait for the person's decision on a card. */
3162
+ function limixProposalsWaitForReview() { return null; }
3118
3163
  function appliesDirectly(botId, threadId) {
3119
3164
  return appliesNow({ fullAccess: fullAccessForSource(botId, threadId), ownerMustConfirm: cloudGuestDriven(threadId) || !connectorThread(botId, threadId) });
3120
3165
  }
@@ -5751,7 +5796,7 @@ let localVmProvisionBusy = false;
5751
5796
  let localVmModeChangeBusy = false;
5752
5797
  const localVmUpdates = createLocalVmUpdater({
5753
5798
  status: (target) => containerComputerStatus(undefined, undefined, target),
5754
- act: (action, target) => containerComputerAction(action, undefined, undefined, target, localVmResources(cfg), () => localVmMaxInstances(cfg)),
5799
+ act: (action, target) => containerComputerAction(action, undefined, undefined, target, localVmResourcesFor(target), () => localVmMaxInstances(cfg), localVmTeamFolderFor(target)),
5755
5800
  imageBusy: { get: () => localVmImageBusy, set: (busy) => { localVmImageBusy = busy; } },
5756
5801
  provisionBusy: { get: () => localVmProvisionBusy, set: (busy) => { localVmProvisionBusy = busy; } },
5757
5802
  lifecycleBusy: localVmLifecycleBusy,
@@ -6349,7 +6394,11 @@ function claimManagedVpsMutation(containerName) {
6349
6394
  return claimBotComputerLifecycle(owner.id);
6350
6395
  }
6351
6396
  function localVmTargetForBot(botId) {
6352
- return localVmMode(cfg) === "per-bot" ? perBotLocalVmTarget(botId) : SHARED_LOCAL_VM_TARGET;
6397
+ if (localVmMode(cfg) !== "per-bot")
6398
+ return SHARED_LOCAL_VM_TARGET;
6399
+ const bot = store.bot(botId);
6400
+ // Limix: a bot that opted in shares its department's desktop with the others that did.
6401
+ return bot?.desktopTeam ? teamLocalVmTarget(teamDesktopKey(bot)) : perBotLocalVmTarget(botId);
6353
6402
  }
6354
6403
  function localVmPoolSeatHolder(seat) {
6355
6404
  return localVmLeases.forTarget(poolLocalVmTarget(seat).key).current(localVmOwnerBusy);
@@ -8579,7 +8628,7 @@ async function beginTurn(botId, text, opts) {
8579
8628
  }
8580
8629
  const computerPromptKind = resolveComputerPromptKind({
8581
8630
  kind: computerKind,
8582
- vmPrivate: localVmMode(cfg) === "per-bot",
8631
+ vmPrivate: localVmMode(cfg) === "per-bot" && !bot.desktopTeam,
8583
8632
  });
8584
8633
  const coordinationNode = opts?.coordination ? coordinator.node(opts.coordination.id) : undefined;
8585
8634
  if (opts?.coordination && (!coordinationNode || coordinationNode.status !== "running" || roomHandoffProblem(coordinationNode, coordinationNode.parentId ? coordinator.node(coordinationNode.parentId) : undefined))) {
@@ -8601,7 +8650,7 @@ async function beginTurn(botId, text, opts) {
8601
8650
  }) },
8602
8651
  { id: "files", label: "File locations", text: worksInWorkspace ? workspaceLocationsPrompt(bot.id, cwd, liveBot?.cwd ?? bot.cwd, { attachFile: Boolean(integrations.agents) && !CLOUD_HOME && !HOSTED_WORKSPACE }) : "" },
8603
8652
  { id: "shell", label: "Long-running commands", text: worksInWorkspace ? longCommandsPrompt(computerPromptKind) : "" },
8604
- { id: "computer", label: "Computer", text: computerPrompt(computerPromptKind) },
8653
+ { id: "computer", label: "Computer", text: computerPrompt(computerPromptKind) + (computerPromptKind === "vm-private" || computerPromptKind === "vm-shared" ? limixTeamDesktopNote(bot) : "") },
8605
8654
  { id: "team-computer", label: "Team computer", text: teamComputerPrompt(teamComputer) },
8606
8655
  { id: "plan", label: "Surface", text: surfacePrompt({ computer: mountedComputer, browser: Boolean(integrations.browser) }, { pinned: plan.pinned, note: plan.note + vpsUnavailableNote + vmUpdateNote + (computerSkipped && plan.computer !== "off" ? computerSkippedNote(redactSecretsInText(computerSkipped)) : "") + (computerSelectionTurns.get(threadId)?.handoff && !integrations.browser ? HANDOFF_BROWSER_NOTE : ""), canSelect: computerSelectionTurns.has(threadId) && !computerSelectionTurns.get(threadId)?.handoff, cloudHome: Boolean(CLOUD_HOME), botOpened: plan.botOpened, ownComputer: CLOUD_HOME && integrations.agents && lendingEnabled() ? sharedComputers.known(CLOUD_HOME_LENDER) : undefined }) },
8607
8656
  { id: "cloud-home", label: "My Cloud", text: CLOUD_HOME ? cloudHomePrompt(Boolean(integrations.agents) && lendingEnabled(), syncedFolders(DATA_DIR), sharedComputers.known(CLOUD_HOME_LENDER), CLOUD_PERSONAL) + firstHourHooks.prompt(bot.id, threadId) : "" }, phoneLinkPart(),
@@ -9525,7 +9574,16 @@ const modelRequests = new ModelRequestService({
9525
9574
  const teamSetupTeams = () => [...new Set(["", ...readSections(), ...store.bots.map((bot) => sectionKey(bot.section)), ...store.groups.map((group) => sectionKey(group.section))])];
9526
9575
  const teamSetupRequests = new TeamSetupRequestService({
9527
9576
  store, teams: teamSetupTeams, hasTeamAuthority, canPersist: proposalPersistence, maxBots: MAX_WORKSPACE_BOTS,
9528
- autoApply: appliesDirectly,
9577
+ autoApply: limixProposalsWaitForReview,
9578
+ createRoom: (request, botIds) => {
9579
+ const chief = store.bot(request.botId);
9580
+ if (!chief || chief.hidden)
9581
+ throw new TeamSetupError("The assistant that proposed this group chat is no longer active", 409);
9582
+ const group = createChannel({ name: redactSecretsInText(request.room.name), memberIds: [...new Set([chief.id, ...botIds])], section: chief.section,
9583
+ setup: { bulletin: "", defaultResponder: deciderReady(cfg, "roomRouting") ? { kind: "auto", fallbackBotId: chief.id } : { kind: "member", botId: chief.id } } });
9584
+ broadcast({ kind: "group", group: publicGroupState(group) });
9585
+ return { id: group.id, name: group.name };
9586
+ },
9529
9587
  validateChange: (before, fields) => assertTeamComputerChangeIdle(before, { ...before, ...fields }),
9530
9588
  ownsThread: (botId, threadId) => Boolean(connectorThread(botId, threadId)),
9531
9589
  targetBusy: (botId, sourceThreadId) => {
@@ -10425,7 +10483,7 @@ setupRetry = 0) {
10425
10483
  recordTurnPlace(bot.id, threadId, (roomTeamComputer ? "cloud" : roomVmTarget ? "vm" : surfaceOfComputerKind(roomComputerKind)) ?? (integrations.browser ? "browser" : null));
10426
10484
  const roomComputerPromptKind = resolveComputerPromptKind({
10427
10485
  kind: roomTeamComputer || roomComputerKind === "box" ? "box" : roomVmTarget ? "vm" : roomComputerKind,
10428
- vmPrivate: localVmMode(cfg) === "per-bot",
10486
+ vmPrivate: localVmMode(cfg) === "per-bot" && !bot.desktopTeam,
10429
10487
  });
10430
10488
  {
10431
10489
  const crossing = claimRecallCrossings(threadId, recentLines.filter((line) => line.private).map((line) => line.threadId));
@@ -10448,7 +10506,7 @@ setupRetry = 0) {
10448
10506
  { id: "files", label: "File locations", text: workspace ? workspaceLocationsPrompt(bot.id, cwd, readyBot.cwd, { attachFile: Boolean(integrations.agents) && !CLOUD_HOME && !HOSTED_WORKSPACE }) : "" },
10449
10507
  { id: "shell", label: "Long-running commands", text: workspace ? longCommandsPrompt(roomComputerPromptKind) : "" },
10450
10508
  { id: "mcp", label: "MCP servers", text: customMcpPrompt(Object.keys(integrations.custom ?? {}), mcpServersHost.off(bot)) + teamConnections.prompt(threadId, internalGeneration, integrations) },
10451
- { id: "computer", label: "Computer", text: computerPrompt(roomComputerPromptKind) },
10509
+ { id: "computer", label: "Computer", text: computerPrompt(roomComputerPromptKind) + (roomComputerPromptKind === "vm-private" || roomComputerPromptKind === "vm-shared" ? limixTeamDesktopNote(bot) : "") },
10452
10510
  { id: "team-computer", label: "Team computer", text: teamComputerPrompt(roomTeamComputer) },
10453
10511
  { id: "plan", label: "Surface", text: surfacePrompt({ computer: roomTeamComputer ? "cloud" : roomVmTarget ? "vm" : surfaceOfComputerKind(roomComputerKind), browser: Boolean(integrations.browser) }, { note: roomPlan.note, cloudHome: Boolean(CLOUD_HOME), ownComputer: CLOUD_HOME && integrations.agents && lendingEnabled() ? sharedComputers.known(CLOUD_HOME_LENDER) : undefined }) },
10454
10512
  { 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(),
@@ -11882,7 +11940,7 @@ async function readyLocalVmForTurn(botId, target, isCurrent = () => true) {
11882
11940
  return status;
11883
11941
  broadcast({ kind: "computer", botId, state: "provisioning" });
11884
11942
  try {
11885
- status = await containerComputerAction(action, undefined, undefined, target, localVmResources(cfg), () => localVmMaxInstances(cfg));
11943
+ status = await containerComputerAction(action, undefined, undefined, target, localVmResourcesFor(target), () => localVmMaxInstances(cfg), localVmTeamFolderFor(target));
11886
11944
  }
11887
11945
  catch {
11888
11946
  // `run` can throw after the container exists, so arm the idle backstop anyway.
@@ -11977,6 +12035,7 @@ function configStatus() {
11977
12035
  automaticCapacity: localVmAutomaticCapacity(cfg),
11978
12036
  idleTimeoutMinutes: localVmIdleTimeoutMinutes(cfg),
11979
12037
  preserveInstalledApps: localVmPreservesInstalledApps(cfg),
12038
+ resources: localVmResources(cfg),
11980
12039
  },
11981
12040
  features: {
11982
12041
  skillAuthoring: skillAuthoringEnabled(cfg),
@@ -12904,6 +12963,8 @@ const handleRequest = async (req, res) => {
12904
12963
  if (await emailSignInRoute({ cloudHome: Boolean(CLOUD_HOME), emailSignIn, sessions, cookieName: SESSION_COOKIE, target: (r) => signInMailTarget(publicUrl(), requestOrigin(r)),
12905
12964
  environment: () => environmentDescriptor({ environmentId: ENVIRONMENT_ID, ...TEAM_LABEL, desktopManaged: DESKTOP_MANAGED, emailSignIn: true, sharedComputers: lendingEnabled() }) }, req, res, path, method))
12906
12965
  return;
12966
+ if (limixManagedGrant && await limixManagedGrant.handle(req, res, path, method))
12967
+ return;
12907
12968
  if ((cloudSigned && await cloudSigned({ req, res, url, path, method })) || chatApps.serveFile(req, res, path, method))
12908
12969
  return;
12909
12970
  if (method === "POST" && path === "/api/auth/pair") {
@@ -13914,7 +13975,7 @@ const handleRequest = async (req, res) => {
13914
13975
  return json(res, 201, proposed);
13915
13976
  }
13916
13977
  if (await dispatchRoutes([createBurstProposalRoutes({ requireActive: requireActiveInternalCapability, readBody: readInternalBody, refusal: () => burstProposalRefusal({ owner: connectorThread(internalSender.id, internalCapability.threadId), outside: outsideWorkStaysHere(internalCapability.threadId), self: selfThreadRefusal({ handoff: Boolean(internalCapability.roomHandoffId), requestLine: store.activePath(internalCapability.threadId).findLast((line) => line.role === "user" && line.kind === "text") }) }), model: () => burst.model(internalSender, internalCapability.threadId), propose: (plan) => burst.propose({ ...plan, botId: internalSender.id, threadId: internalCapability.threadId }) }), createInternalChiefTeamRoutes({ bot: () => store.bot(internalCapability.botId), requireActive: requireActiveInternalCapability,
13917
- teams: teamSetupTeams, bots: () => store.bots, instances: () => registry.describe() }), createInternalModelRoutes({ requireActive: requireActiveInternalCapability, menu: (search) => ownThreads.menu(internalCapability.botId, internalCapability.threadId, search) })], { req, res, url, path, method, auth, json, readBody }))
13978
+ teams: teamSetupTeams, bots: () => store.bots, instances: () => registry.describe(), channels: limixGatewayConnections }), createInternalModelRoutes({ requireActive: requireActiveInternalCapability, menu: (search) => ownThreads.menu(internalCapability.botId, internalCapability.threadId, search) })], { req, res, url, path, method, auth, json, readBody }))
13918
13979
  return;
13919
13980
  if (method === "POST" && path === "/api/internal/team-setup-requests") {
13920
13981
  const parsed = z.object({ fromBotId: z.string().optional(), fromThreadId: z.string().optional(), plan: z.unknown() }).strict().safeParse(await readInternalBody());
@@ -14750,7 +14811,7 @@ const handleRequest = async (req, res) => {
14750
14811
  source: "appliedBy" in proposed ? proposed.appliedBy : "profile" });
14751
14812
  }
14752
14813
  if (proposed.state === "pending")
14753
- return json(res, 201, proposed);
14814
+ return json(res, 201, { ...proposed, ...(botNameClash.warning(name) ? { warning: botNameClash.warning(name) } : {}) });
14754
14815
  const createdId = "result" in proposed ? proposed.result.bots.find((bot) => bot.action === "created")?.id : undefined;
14755
14816
  const created = createdId ? store.bot(createdId) : undefined;
14756
14817
  if (!created)
@@ -0,0 +1,18 @@
1
+ import { DEFAULT_BOT_NAME, LEGACY_DEFAULT_BOT_NAMES } from "../shared/default-bot.js";
2
+ const plain = (name) => name.trim().toLowerCase();
3
+ /** The built-in helper takes the current name only while it still has an old default one; a name the person chose stays. */
4
+ export function renameLegacyDefaultBots(store) {
5
+ const legacy = new Set(LEGACY_DEFAULT_BOT_NAMES.map(plain));
6
+ const renamed = [];
7
+ for (const bot of store.bots) {
8
+ if (!bot.defaultBot || !legacy.has(plain(bot.name)))
9
+ continue;
10
+ const section = bot.section?.trim() ?? "";
11
+ const taken = store.bots.some((other) => other.id !== bot.id && !other.defaultBot && !other.hidden && (other.section?.trim() ?? "") === section && plain(other.name) === plain(DEFAULT_BOT_NAME));
12
+ if (taken)
13
+ continue;
14
+ store.patchBot(bot.id, { name: DEFAULT_BOT_NAME });
15
+ renamed.push(bot.id);
16
+ }
17
+ return renamed;
18
+ }
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { readFileSync, writeFileSync, renameSync, mkdirSync, existsSync } from "node:fs";
3
3
  import { dirname } from "node:path";
4
+ // oxlint-disable-next-line no-control-regex -- control characters are exactly what this refuses
4
5
  const id = z.string().min(1).max(200).regex(/^[^\x00-\x1f]+$/);
5
6
  export const channelConversationSchema = z.object({
6
7
  connectionId: id, platform: z.enum(["telegram", "zalo", "discord", "facebook"]),
@@ -4,6 +4,7 @@ import { z } from "zod";
4
4
  import { ATTACHMENTS_DIR, deleteAttachment, saveFile, saveImage } from "./attachments.js";
5
5
  export const CHANNEL_MEDIA_MAX_BYTES = 10 * 1024 * 1024;
6
6
  export const channelAttachmentSchema = z.object({
7
+ // oxlint-disable-next-line no-control-regex -- control characters are exactly what this refuses
7
8
  name: z.string().min(1).max(200).refine((s) => !/[\\/\x00-\x1f]/.test(s), "Use a filename, not a path"),
8
9
  mime: z.string().min(1).max(128),
9
10
  data: z.string().min(4).max(Math.ceil(CHANNEL_MEDIA_MAX_BYTES / 3) * 4).regex(/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/),
@@ -0,0 +1,26 @@
1
+ // Limix: a bot's own Private desktop size. Used when each bot has its own desktop; a field it leaves out follows the
2
+ // workspace setting. A running desktop takes a change when it is next created or started.
3
+ import { MAX_DESKTOP_CPUS, MAX_DESKTOP_MEMORY_GB, MIN_DESKTOP_CPUS, MIN_DESKTOP_MEMORY_GB } from "./container-limits.js";
4
+ /** null clears the bot's own limits. */
5
+ export function limixDesktopResources(raw) {
6
+ if (raw === null)
7
+ return { value: undefined };
8
+ if (typeof raw !== "object" || Array.isArray(raw))
9
+ return { error: "desktopResources must be an object or null" };
10
+ const out = {};
11
+ for (const [key, value] of Object.entries(raw)) {
12
+ if (value === null || value === undefined)
13
+ continue;
14
+ const [min, max] = key === "memoryGb" ? [MIN_DESKTOP_MEMORY_GB, MAX_DESKTOP_MEMORY_GB] : key === "cpus" ? [MIN_DESKTOP_CPUS, MAX_DESKTOP_CPUS] : [NaN, NaN];
15
+ if (Number.isNaN(min))
16
+ return { error: `desktopResources takes memoryGb and cpus, not ${key}` };
17
+ if (!Number.isInteger(value) || value < min || value > max)
18
+ return { error: `desktopResources.${key} must be a whole number from ${min} to ${max}` };
19
+ out[key] = value;
20
+ }
21
+ return { value: Object.keys(out).length ? out : undefined };
22
+ }
23
+ /** The workspace size with this bot's own limits laid over it. */
24
+ export function withBotDesktopResources(workspace, bot) {
25
+ return { memoryGb: bot?.desktopResources?.memoryGb ?? workspace.memoryGb, cpus: bot?.desktopResources?.cpus ?? workspace.cpus };
26
+ }
@@ -0,0 +1,41 @@
1
+ const CHANNEL_FIX = {
2
+ credential_invalid: "The token was refused. Make a fresh token in the platform's bot settings and paste it in the connection (the person does this; never ask them to send it in chat).",
3
+ conflict: "Another program is reading the same bot's messages. Stop that program or remove its webhook, then press Run again on the connection.",
4
+ degraded: "The connection is retrying after errors. If it persists, check the internet connection and the platform's status.",
5
+ error: "The connection stopped on an error. Press Run again; if it fails again, re-create the connection with a new token.",
6
+ stopped: "The connection is switched off. Press Run on it to start answering again.",
7
+ };
8
+ const CHANNEL_NAME = { telegram: "Telegram", zalo: "Zalo", discord: "Discord", facebook: "Facebook Page" };
9
+ export function diagnoseLimix(input) {
10
+ const findings = [];
11
+ const notes = [];
12
+ for (const channel of input.channels ?? []) {
13
+ const label = `${CHANNEL_NAME[channel.platform] ?? channel.platform}${channel.name ? ` · ${channel.name}` : ""}`;
14
+ if (channel.status === "running" && !channel.statusDetail)
15
+ continue;
16
+ if (channel.status === "running") {
17
+ findings.push({ area: "channel", subject: label, problem: `Connected, with a warning: ${channel.statusDetail}`, fix: "The channel works; the warning is about the AI it uses. Check that bot's engine sign-in." });
18
+ continue;
19
+ }
20
+ if (channel.status === "starting")
21
+ continue;
22
+ findings.push({ area: "channel", subject: label, problem: `Not answering (${channel.status})${channel.statusDetail ? `: ${channel.statusDetail}` : ""}`,
23
+ fix: CHANNEL_FIX[channel.status] ?? "Open the connection and press Run again." });
24
+ }
25
+ if (input.channels === null)
26
+ notes.push("Telegram and Zalo connections can't be read from here (they run in the desktop app or in another service). Ask the person to open Connections and say what status each one shows.");
27
+ else if (!input.channels.length)
28
+ notes.push("No Telegram, Zalo, Discord or Facebook connection is set up yet.");
29
+ for (const engine of input.engines) {
30
+ if (engine.state === "available")
31
+ continue;
32
+ findings.push({ area: "engine", subject: engine.displayName, problem: `The AI engine is ${engine.state}${engine.reason ? `: ${engine.reason}` : ""}`, fix: "Open Settings > AI, sign in again or install the engine; bots that use it can't answer until then." });
33
+ }
34
+ const visible = input.bots.filter((bot) => !bot.hidden);
35
+ if (!visible.length)
36
+ findings.push({ area: "setup", subject: "Bots", problem: "There is no active bot", fix: "Propose a bot or a ready-made team with propose_team_setup." });
37
+ return { ok: findings.length === 0, botCount: visible.length, findings, notes,
38
+ channels: (input.channels ?? []).map((c) => ({ platform: c.platform, name: c.name, status: c.status, running: c.running, enabled: c.enabled })),
39
+ engines: input.engines.map((e) => ({ name: e.displayName, state: e.state })),
40
+ summary: findings.length ? `${findings.length} problem${findings.length === 1 ? "" : "s"} found` : "Nothing wrong found in what this assistant can see" };
41
+ }
@@ -112,3 +112,26 @@ export function proxyLimixGateway(req, res, path) {
112
112
  req.pipe(upstream);
113
113
  return true;
114
114
  }
115
+ /** The connections the connector reports (secrets are already masked there); null when this server has no connector or it doesn't answer. */
116
+ export function limixGatewayConnections() {
117
+ if (!limixGatewaySidecarOn() || !child)
118
+ return Promise.resolve(null);
119
+ return new Promise((resolve) => {
120
+ const upstream = httpRequest({ host: "127.0.0.1", port: GATEWAY_PORT, method: "GET", path: "/api/state", timeout: 5_000,
121
+ headers: { host: `127.0.0.1:${GATEWAY_PORT}`, "x-limix-admin": ADMIN } }, (response) => {
122
+ const chunks = [];
123
+ response.on("data", (chunk) => chunks.push(chunk));
124
+ response.on("end", () => {
125
+ try {
126
+ resolve(response.statusCode === 200 ? (JSON.parse(Buffer.concat(chunks).toString("utf8")).connections ?? null) : null);
127
+ }
128
+ catch {
129
+ resolve(null);
130
+ }
131
+ });
132
+ });
133
+ upstream.on("error", () => resolve(null));
134
+ upstream.on("timeout", () => { upstream.destroy(); resolve(null); });
135
+ upstream.end();
136
+ });
137
+ }
@@ -0,0 +1,110 @@
1
+ // A Limix Cloud beta home (deploy/managed-beta): the desktop brings a grant the account Worker signed for this workspace
2
+ // and gets one pairing credential for it. Only the public key is here; a home cannot mint grants for itself or another.
3
+ // Security: signature, workspace, audience (this home's own https origin, as the request reached it), expiry and
4
+ // single use are all checked before a pairing opens; a bad signature counts toward the pairing lockout.
5
+ import { createPublicKey, verify } from "node:crypto";
6
+ import { readSignedBody } from "./cloud-home.js";
7
+ import { json } from "./harness/http.js";
8
+ import { requestOrigin, requestSource } from "./request-auth.js";
9
+ export const LIMIX_MANAGED_GRANT_PATH = "/api/limix/managed/grant";
10
+ const SIGNED_PREFIX = "limix-managed-grant.v1.";
11
+ const MAX_LIFETIME_S = 120;
12
+ const SKEW_S = 60;
13
+ const PAIRING_TTL_MS = 120_000;
14
+ const UUID = /^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/;
15
+ /** Null unless all three settings are present and valid; a half-configured home refuses to start. */
16
+ export function limixManagedGrantConfig(env = process.env) {
17
+ const workspaceId = env.LIMIX_MANAGED_WORKSPACE?.trim() ?? "", rawKey = env.LIMIX_MANAGED_GRANT_KEY?.trim() ?? "";
18
+ const rawOrigin = env.OMB_PUBLIC_URL?.trim().replace(/\/+$/, "") ?? "";
19
+ if (!workspaceId && !rawKey)
20
+ return null;
21
+ if (!UUID.test(workspaceId))
22
+ throw new Error("LIMIX_MANAGED_WORKSPACE must be the workspace UUID.");
23
+ if (!/^[A-Za-z0-9_-]{43}$/.test(rawKey))
24
+ throw new Error("LIMIX_MANAGED_GRANT_KEY must be an Ed25519 public key (base64url).");
25
+ let origin;
26
+ try {
27
+ origin = new URL(rawOrigin);
28
+ }
29
+ catch {
30
+ throw new Error("OMB_PUBLIC_URL must be this home's https origin.");
31
+ }
32
+ if (origin.protocol !== "https:" || origin.origin !== rawOrigin)
33
+ throw new Error("OMB_PUBLIC_URL must be this home's https origin.");
34
+ return { workspaceId, origin: origin.origin, key: createPublicKey({ key: { kty: "OKP", crv: "Ed25519", x: rawKey }, format: "jwk" }) };
35
+ }
36
+ export function createLimixManagedGrant(config, sessions, now = Date.now) {
37
+ const used = new Map();
38
+ const redeem = (grant, origin, source) => {
39
+ const lock = sessions.attemptAllowed(source);
40
+ if (!lock.ok)
41
+ return { status: 429, body: { error: "rate_limited", retryAfterSeconds: Math.ceil(lock.retryAfterMs / 1000) } };
42
+ const [payload, signature, extra] = typeof grant === "string" && grant.length < 2048 ? grant.split(".") : [];
43
+ let signed = false;
44
+ try {
45
+ signed = Boolean(payload && signature && extra === undefined) && verify(null, Buffer.from(SIGNED_PREFIX + payload), config.key, Buffer.from(signature, "base64url"));
46
+ }
47
+ catch {
48
+ signed = false;
49
+ }
50
+ if (!signed) {
51
+ sessions.noteFailure(source);
52
+ return { status: 401, body: { error: "invalid_grant" } };
53
+ }
54
+ sessions.clearFailures(source);
55
+ let claims;
56
+ try {
57
+ claims = JSON.parse(Buffer.from(payload, "base64url").toString("utf8"));
58
+ }
59
+ catch {
60
+ return { status: 400, body: { error: "invalid_grant" } };
61
+ }
62
+ const at = now() / 1000, iat = Number(claims.iat), exp = Number(claims.exp), nonce = claims.nonce;
63
+ if (claims.v !== 1 || claims.ws !== config.workspaceId)
64
+ return { status: 403, body: { error: "wrong_workspace" } };
65
+ // cloudflared keeps the public Host; the scheme it reports is not relied on, the name is.
66
+ if (claims.aud !== config.origin || origin?.replace(/^https?:/, "") !== config.origin.replace(/^https:/, ""))
67
+ return { status: 403, body: { error: "wrong_origin" } };
68
+ if (!Number.isFinite(iat) || !Number.isFinite(exp) || exp - iat > MAX_LIFETIME_S || iat > at + SKEW_S || exp < at) {
69
+ return { status: 401, body: { error: "expired_grant" } };
70
+ }
71
+ if (typeof nonce !== "string" || !/^[A-Za-z0-9_-]{16,64}$/.test(nonce))
72
+ return { status: 400, body: { error: "invalid_grant" } };
73
+ for (const [seen, until] of used)
74
+ if (until < at)
75
+ used.delete(seen);
76
+ if (used.has(nonce))
77
+ return { status: 401, body: { error: "grant_used" } };
78
+ used.set(nonce, exp + SKEW_S);
79
+ const label = typeof claims.sub === "string" ? `Limix Cloud · ${claims.sub.replace(/^limix:/, "")}`.slice(0, 80) : "Limix Cloud";
80
+ const opened = sessions.openPairing({ scopes: ["admin", "client"], label, ttlMs: PAIRING_TTL_MS });
81
+ return { status: 200, body: { credential: opened.credential, expiresAt: opened.expiresAt } };
82
+ };
83
+ return {
84
+ redeem,
85
+ async handle(req, res, path, method) {
86
+ if (path !== LIMIX_MANAGED_GRANT_PATH)
87
+ return false;
88
+ res.setHeader("cache-control", "no-store");
89
+ if (method !== "POST") {
90
+ json(res, 405, { error: "method_not_allowed" });
91
+ return true;
92
+ }
93
+ if (!/^application\/json\b/i.test(String(req.headers["content-type"] ?? ""))) {
94
+ json(res, 415, { error: "json_required" });
95
+ return true;
96
+ }
97
+ let body;
98
+ try {
99
+ body = JSON.parse((await readSignedBody(req)).toString("utf8"));
100
+ }
101
+ catch {
102
+ json(res, 400, { error: "invalid_body" });
103
+ return true;
104
+ }
105
+ const result = redeem(body?.grant, requestOrigin(req), requestSource(req));
106
+ json(res, result.status, result.body);
107
+ return true;
108
+ },
109
+ };
110
+ }
@@ -0,0 +1,32 @@
1
+ // Limix: bots of one department can share one Private desktop (when each bot otherwise has its own). One screen, so
2
+ // they take turns on it. Its size grows with the number of bots unless someone set a size; it never asks for more than
3
+ // the machine can give a desktop.
4
+ import { MAX_DESKTOP_CPUS, MAX_DESKTOP_MEMORY_GB, MIN_DESKTOP_CPUS, MIN_DESKTOP_MEMORY_GB } from "./container-limits.js";
5
+ export const TEAM_DESKTOP_EXTRA_MEMORY_GB = 2;
6
+ export const TEAM_DESKTOP_EXTRA_CPUS = 1;
7
+ /** The department key ("" is General). */
8
+ export const teamDesktopKey = (bot) => (bot.section ?? "").trim().toLowerCase();
9
+ export function teamDesktopMembers(bots, team) {
10
+ return bots.filter((bot) => bot.desktopTeam && !bot.hidden && teamDesktopKey(bot) === team);
11
+ }
12
+ /** Suggested: the workspace size plus a share for each bot past the first. */
13
+ export function suggestedTeamDesktop(workspace, members) {
14
+ const extra = Math.max(0, members - 1);
15
+ return { memoryGb: workspace.memoryGb + extra * TEAM_DESKTOP_EXTRA_MEMORY_GB, cpus: workspace.cpus + extra * TEAM_DESKTOP_EXTRA_CPUS };
16
+ }
17
+ /** The size the shared desktop runs with: the largest size a member set, otherwise the suggestion, within the machine. */
18
+ export function teamDesktopResources(workspace, members, machine) {
19
+ const set = members.filter((bot) => bot.desktopResources?.memoryGb || bot.desktopResources?.cpus);
20
+ const suggested = suggestedTeamDesktop(workspace, members.length);
21
+ const want = set.length
22
+ ? { memoryGb: Math.max(...set.map((bot) => bot.desktopResources?.memoryGb ?? workspace.memoryGb)), cpus: Math.max(...set.map((bot) => bot.desktopResources?.cpus ?? workspace.cpus)) }
23
+ : suggested;
24
+ const roomMemory = machine ? Math.floor(machine.memoryGb - machine.reservedMemoryGb) : MAX_DESKTOP_MEMORY_GB;
25
+ const roomCpus = machine ? Math.floor(machine.cpus - machine.reservedCpus) : MAX_DESKTOP_CPUS;
26
+ const clamp = (value, min, max, room) => Math.max(min, Math.min(value, max, Math.max(min, room)));
27
+ return {
28
+ memoryGb: clamp(want.memoryGb, MIN_DESKTOP_MEMORY_GB, MAX_DESKTOP_MEMORY_GB, roomMemory),
29
+ cpus: clamp(want.cpus, MIN_DESKTOP_CPUS, MAX_DESKTOP_CPUS, roomCpus),
30
+ chosen: set.length ? "set" : "suggested",
31
+ };
32
+ }
@@ -522,7 +522,7 @@ export function createBotMessageRoutes(deps) {
522
522
  if (resolveAndSendTrust(res, bot.threadId, String(body.requestId), behavior))
523
523
  return;
524
524
  const answer = { botId: bot.id, threadId: bot.threadId, requestId: String(body.requestId), behavior };
525
- if (await resolveAndSendTeamSetup(res, answer, ownerReview(auth, req)))
525
+ if (await resolveAndSendTeamSetup(res, { ...answer, ...(body.room === false ? { room: false } : {}) }, ownerReview(auth, req)))
526
526
  return;
527
527
  if (await resolveAndSendMcp(res, answer, ownerReview(auth, req)))
528
528
  return;
@@ -645,7 +645,7 @@ export function createBotMessageRoutes(deps) {
645
645
  const setupBotId = setupCard.from?.botId ?? store.botByThread(threadId)?.id;
646
646
  if (!setupBotId)
647
647
  return json(res, 400, { error: "This team setup has no valid owner" });
648
- if (await resolveAndSendTeamSetup(res, { botId: setupBotId, threadId, requestId, behavior }, ownerReview(auth, req)))
648
+ if (await resolveAndSendTeamSetup(res, { botId: setupBotId, threadId, requestId, behavior, ...(body.room === false ? { room: false } : {}) }, ownerReview(auth, req)))
649
649
  return;
650
650
  }
651
651
  const mcpCard = store.messagesFor(threadId).find((message) => message.card?.requestId === requestId && message.card.mcpRequest);