libre-webui 0.36.0 → 0.37.1

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 (379) hide show
  1. package/README.md +59 -0
  2. package/backend/dist/cordis/contracts.d.ts +270 -0
  3. package/backend/dist/cordis/contracts.d.ts.map +1 -0
  4. package/backend/dist/cordis/contracts.js +32 -0
  5. package/backend/dist/cordis/contracts.js.map +1 -0
  6. package/backend/dist/cordis/dsh/chat-model.d.ts +16 -0
  7. package/backend/dist/cordis/dsh/chat-model.d.ts.map +1 -0
  8. package/backend/dist/cordis/dsh/chat-model.js +104 -0
  9. package/backend/dist/cordis/dsh/chat-model.js.map +1 -0
  10. package/backend/dist/cordis/dsh/engine-plugin.d.ts +186 -0
  11. package/backend/dist/cordis/dsh/engine-plugin.d.ts.map +1 -0
  12. package/backend/dist/cordis/dsh/engine-plugin.js +1116 -0
  13. package/backend/dist/cordis/dsh/engine-plugin.js.map +1 -0
  14. package/backend/dist/cordis/dsh/librewebui-llm-adapter.d.ts +175 -0
  15. package/backend/dist/cordis/dsh/librewebui-llm-adapter.d.ts.map +1 -0
  16. package/backend/dist/cordis/dsh/librewebui-llm-adapter.js +480 -0
  17. package/backend/dist/cordis/dsh/librewebui-llm-adapter.js.map +1 -0
  18. package/backend/dist/cordis/dsh/model-identity.d.ts +12 -0
  19. package/backend/dist/cordis/dsh/model-identity.d.ts.map +1 -0
  20. package/backend/dist/cordis/dsh/model-identity.js +87 -0
  21. package/backend/dist/cordis/dsh/model-identity.js.map +1 -0
  22. package/backend/dist/cordis/dsh/native-provider-client.d.ts +44 -0
  23. package/backend/dist/cordis/dsh/native-provider-client.d.ts.map +1 -0
  24. package/backend/dist/cordis/dsh/native-provider-client.js +524 -0
  25. package/backend/dist/cordis/dsh/native-provider-client.js.map +1 -0
  26. package/backend/dist/cordis/dsh/native-provider-plugin.d.ts +11 -0
  27. package/backend/dist/cordis/dsh/native-provider-plugin.d.ts.map +1 -0
  28. package/backend/dist/cordis/dsh/native-provider-plugin.js +416 -0
  29. package/backend/dist/cordis/dsh/native-provider-plugin.js.map +1 -0
  30. package/backend/dist/cordis/dsh/native-provider-protocol.d.ts +37 -0
  31. package/backend/dist/cordis/dsh/native-provider-protocol.d.ts.map +1 -0
  32. package/backend/dist/cordis/dsh/native-provider-protocol.js +325 -0
  33. package/backend/dist/cordis/dsh/native-provider-protocol.js.map +1 -0
  34. package/backend/dist/cordis/dsh/provider-handler.d.ts +36 -0
  35. package/backend/dist/cordis/dsh/provider-handler.d.ts.map +1 -0
  36. package/backend/dist/cordis/dsh/provider-handler.js +582 -0
  37. package/backend/dist/cordis/dsh/provider-handler.js.map +1 -0
  38. package/backend/dist/cordis/dsh/session-files.d.ts +9 -0
  39. package/backend/dist/cordis/dsh/session-files.d.ts.map +1 -0
  40. package/backend/dist/cordis/dsh/session-files.js +60 -0
  41. package/backend/dist/cordis/dsh/session-files.js.map +1 -0
  42. package/backend/dist/cordis/dsh/session-settings.d.ts +15 -0
  43. package/backend/dist/cordis/dsh/session-settings.d.ts.map +1 -0
  44. package/backend/dist/cordis/dsh/session-settings.js +51 -0
  45. package/backend/dist/cordis/dsh/session-settings.js.map +1 -0
  46. package/backend/dist/cordis/dsh/work-driver.d.ts +12 -0
  47. package/backend/dist/cordis/dsh/work-driver.d.ts.map +1 -0
  48. package/backend/dist/cordis/dsh/work-driver.js +402 -0
  49. package/backend/dist/cordis/dsh/work-driver.js.map +1 -0
  50. package/backend/dist/cordis/dsh/workspace-policy.d.ts +10 -0
  51. package/backend/dist/cordis/dsh/workspace-policy.d.ts.map +1 -0
  52. package/backend/dist/cordis/dsh/workspace-policy.js +44 -0
  53. package/backend/dist/cordis/dsh/workspace-policy.js.map +1 -0
  54. package/backend/dist/cordis/host/composition.d.ts +73 -0
  55. package/backend/dist/cordis/host/composition.d.ts.map +1 -0
  56. package/backend/dist/cordis/host/composition.js +205 -0
  57. package/backend/dist/cordis/host/composition.js.map +1 -0
  58. package/backend/dist/cordis/host/config.d.ts +159 -0
  59. package/backend/dist/cordis/host/config.d.ts.map +1 -0
  60. package/backend/dist/cordis/host/config.js +184 -0
  61. package/backend/dist/cordis/host/config.js.map +1 -0
  62. package/backend/dist/cordis/host/host.d.ts +74 -0
  63. package/backend/dist/cordis/host/host.d.ts.map +1 -0
  64. package/backend/dist/cordis/host/host.js +420 -0
  65. package/backend/dist/cordis/host/host.js.map +1 -0
  66. package/backend/dist/cordis/host/loader-entry.d.ts +41 -0
  67. package/backend/dist/cordis/host/loader-entry.d.ts.map +1 -0
  68. package/backend/dist/cordis/host/loader-entry.js +52 -0
  69. package/backend/dist/cordis/host/loader-entry.js.map +1 -0
  70. package/backend/dist/cordis/host/model.d.ts +45 -0
  71. package/backend/dist/cordis/host/model.d.ts.map +1 -0
  72. package/backend/dist/cordis/host/model.js +54 -0
  73. package/backend/dist/cordis/host/model.js.map +1 -0
  74. package/backend/dist/cordis/host/privacy.d.ts +8 -0
  75. package/backend/dist/cordis/host/privacy.d.ts.map +1 -0
  76. package/backend/dist/cordis/host/privacy.js +73 -0
  77. package/backend/dist/cordis/host/privacy.js.map +1 -0
  78. package/backend/dist/cordis/index.d.ts +14 -0
  79. package/backend/dist/cordis/index.d.ts.map +1 -0
  80. package/backend/dist/cordis/index.js +30 -0
  81. package/backend/dist/cordis/index.js.map +1 -0
  82. package/backend/dist/cordis/runtime.d.ts +97 -0
  83. package/backend/dist/cordis/runtime.d.ts.map +1 -0
  84. package/backend/dist/cordis/runtime.js +231 -0
  85. package/backend/dist/cordis/runtime.js.map +1 -0
  86. package/backend/dist/cordis/work-model.d.ts +7 -0
  87. package/backend/dist/cordis/work-model.d.ts.map +1 -0
  88. package/backend/dist/cordis/work-model.js +30 -0
  89. package/backend/dist/cordis/work-model.js.map +1 -0
  90. package/backend/dist/db.js +1 -1
  91. package/backend/dist/index.d.ts.map +1 -1
  92. package/backend/dist/index.js +9 -0
  93. package/backend/dist/index.js.map +1 -1
  94. package/backend/dist/main.js +12 -0
  95. package/backend/dist/main.js.map +1 -1
  96. package/backend/dist/persistence/extensionTypes.d.ts +2 -0
  97. package/backend/dist/persistence/extensionTypes.d.ts.map +1 -1
  98. package/backend/dist/persistence/extensionTypes.js.map +1 -1
  99. package/backend/dist/persistence/postgresExtensionRepositories.d.ts.map +1 -1
  100. package/backend/dist/persistence/postgresExtensionRepositories.js +38 -0
  101. package/backend/dist/persistence/postgresExtensionRepositories.js.map +1 -1
  102. package/backend/dist/persistence/postgresResourceRepositories.d.ts.map +1 -1
  103. package/backend/dist/persistence/postgresResourceRepositories.js +6 -1
  104. package/backend/dist/persistence/postgresResourceRepositories.js.map +1 -1
  105. package/backend/dist/persistence/resourceTypes.d.ts +3 -1
  106. package/backend/dist/persistence/resourceTypes.d.ts.map +1 -1
  107. package/backend/dist/persistence/resourceTypes.js.map +1 -1
  108. package/backend/dist/persistence/sqliteExtensionRepositories.d.ts.map +1 -1
  109. package/backend/dist/persistence/sqliteExtensionRepositories.js +40 -0
  110. package/backend/dist/persistence/sqliteExtensionRepositories.js.map +1 -1
  111. package/backend/dist/persistence/sqliteResourceRepositories.d.ts.map +1 -1
  112. package/backend/dist/persistence/sqliteResourceRepositories.js +7 -1
  113. package/backend/dist/persistence/sqliteResourceRepositories.js.map +1 -1
  114. package/backend/dist/routes/agentCli.d.ts.map +1 -1
  115. package/backend/dist/routes/agentCli.js +34 -2
  116. package/backend/dist/routes/agentCli.js.map +1 -1
  117. package/backend/dist/routes/chat.d.ts.map +1 -1
  118. package/backend/dist/routes/chat.js +9 -1
  119. package/backend/dist/routes/chat.js.map +1 -1
  120. package/backend/dist/routes/cordis.d.ts +3 -0
  121. package/backend/dist/routes/cordis.d.ts.map +1 -0
  122. package/backend/dist/routes/cordis.js +440 -0
  123. package/backend/dist/routes/cordis.js.map +1 -0
  124. package/backend/dist/routes/libreClaw.js +1 -1
  125. package/backend/dist/routes/libreClaw.js.map +1 -1
  126. package/backend/dist/routes/work.d.ts.map +1 -1
  127. package/backend/dist/routes/work.js +23 -8
  128. package/backend/dist/routes/work.js.map +1 -1
  129. package/backend/dist/services/agentAccessService.d.ts +4 -0
  130. package/backend/dist/services/agentAccessService.d.ts.map +1 -1
  131. package/backend/dist/services/agentAccessService.js +48 -16
  132. package/backend/dist/services/agentAccessService.js.map +1 -1
  133. package/backend/dist/services/agentCliService.d.ts +42 -1
  134. package/backend/dist/services/agentCliService.d.ts.map +1 -1
  135. package/backend/dist/services/agentCliService.js +206 -7
  136. package/backend/dist/services/agentCliService.js.map +1 -1
  137. package/backend/dist/services/agentCliUsage.d.ts +22 -0
  138. package/backend/dist/services/agentCliUsage.d.ts.map +1 -0
  139. package/backend/dist/services/agentCliUsage.js +192 -0
  140. package/backend/dist/services/agentCliUsage.js.map +1 -0
  141. package/backend/dist/services/authService.d.ts +3 -0
  142. package/backend/dist/services/authService.d.ts.map +1 -1
  143. package/backend/dist/services/authService.js +4 -1
  144. package/backend/dist/services/authService.js.map +1 -1
  145. package/backend/dist/services/chatGenerationService.d.ts +7 -0
  146. package/backend/dist/services/chatGenerationService.d.ts.map +1 -1
  147. package/backend/dist/services/chatGenerationService.js +32 -1
  148. package/backend/dist/services/chatGenerationService.js.map +1 -1
  149. package/backend/dist/services/cordisAccessService.d.ts +56 -0
  150. package/backend/dist/services/cordisAccessService.d.ts.map +1 -0
  151. package/backend/dist/services/cordisAccessService.js +98 -0
  152. package/backend/dist/services/cordisAccessService.js.map +1 -0
  153. package/backend/dist/services/durableChatGenerationService.d.ts.map +1 -1
  154. package/backend/dist/services/durableChatGenerationService.js +9 -1
  155. package/backend/dist/services/durableChatGenerationService.js.map +1 -1
  156. package/backend/dist/services/emailService.d.ts.map +1 -1
  157. package/backend/dist/services/emailService.js +8 -1
  158. package/backend/dist/services/emailService.js.map +1 -1
  159. package/backend/dist/services/pluginService.d.ts.map +1 -1
  160. package/backend/dist/services/pluginService.js +7 -26
  161. package/backend/dist/services/pluginService.js.map +1 -1
  162. package/backend/dist/services/pluginUsageService.d.ts +52 -0
  163. package/backend/dist/services/pluginUsageService.d.ts.map +1 -1
  164. package/backend/dist/services/pluginUsageService.js +89 -1
  165. package/backend/dist/services/pluginUsageService.js.map +1 -1
  166. package/backend/dist/services/systemSettingsService.d.ts +1 -1
  167. package/backend/dist/services/systemSettingsService.d.ts.map +1 -1
  168. package/backend/dist/services/systemSettingsService.js +1 -1
  169. package/backend/dist/services/systemSettingsService.js.map +1 -1
  170. package/backend/dist/services/thinkingSummaryService.d.ts +3 -0
  171. package/backend/dist/services/thinkingSummaryService.d.ts.map +1 -1
  172. package/backend/dist/services/thinkingSummaryService.js +56 -17
  173. package/backend/dist/services/thinkingSummaryService.js.map +1 -1
  174. package/backend/dist/services/titleGenerationService.d.ts +22 -2
  175. package/backend/dist/services/titleGenerationService.d.ts.map +1 -1
  176. package/backend/dist/services/titleGenerationService.js +63 -8
  177. package/backend/dist/services/titleGenerationService.js.map +1 -1
  178. package/backend/dist/services/workAgentService.d.ts +1 -1
  179. package/backend/dist/services/workAgentService.d.ts.map +1 -1
  180. package/backend/dist/services/workAgentService.js +76 -12
  181. package/backend/dist/services/workAgentService.js.map +1 -1
  182. package/backend/dist/services/workModelProviderService.d.ts +5 -0
  183. package/backend/dist/services/workModelProviderService.d.ts.map +1 -1
  184. package/backend/dist/services/workModelProviderService.js +52 -3
  185. package/backend/dist/services/workModelProviderService.js.map +1 -1
  186. package/backend/dist/services/workRuntimeService.d.ts.map +1 -1
  187. package/backend/dist/services/workRuntimeService.js +4 -1
  188. package/backend/dist/services/workRuntimeService.js.map +1 -1
  189. package/backend/dist/services/workTaskService.d.ts.map +1 -1
  190. package/backend/dist/services/workTaskService.js +6 -6
  191. package/backend/dist/services/workTaskService.js.map +1 -1
  192. package/backend/dist/types/work.d.ts +12 -1
  193. package/backend/dist/types/work.d.ts.map +1 -1
  194. package/backend/dist/utils/pluginStreamAdapter.d.ts.map +1 -1
  195. package/backend/dist/utils/pluginStreamAdapter.js +18 -4
  196. package/backend/dist/utils/pluginStreamAdapter.js.map +1 -1
  197. package/backend/dist/utils/pluginStreaming.d.ts +6 -0
  198. package/backend/dist/utils/pluginStreaming.d.ts.map +1 -1
  199. package/backend/dist/utils/pluginStreaming.js +10 -0
  200. package/backend/dist/utils/pluginStreaming.js.map +1 -1
  201. package/backend/dist/utils/smtpClient.d.ts +5 -1
  202. package/backend/dist/utils/smtpClient.d.ts.map +1 -1
  203. package/backend/dist/utils/smtpClient.js +29 -3
  204. package/backend/dist/utils/smtpClient.js.map +1 -1
  205. package/backend/dist/websocketServer.d.ts.map +1 -1
  206. package/backend/dist/websocketServer.js +4 -0
  207. package/backend/dist/websocketServer.js.map +1 -1
  208. package/backend/package.json +37 -2
  209. package/frontend/dist/artifact-runtime/.build-fingerprint +1 -1
  210. package/frontend/dist/artifact-runtime/framer-motion.js +3 -3
  211. package/frontend/dist/artifact-runtime/lucide-react.js +1 -1
  212. package/frontend/dist/artifact-runtime/react.js +5 -5
  213. package/frontend/dist/artifact-runtime/recharts.js +45 -45
  214. package/frontend/dist/assets/index-BrDSO609.js +20 -0
  215. package/frontend/dist/assets/index-C8_AByBq.css +1 -0
  216. package/frontend/dist/index.html +33 -31
  217. package/frontend/dist/js/{ArtifactContainer-B8tyPtWd.js → ArtifactContainer-B1-GVzVf.js} +1 -1
  218. package/frontend/dist/js/{ArtifactDemoPage-BwRfWoSK.js → ArtifactDemoPage-goftRHdk.js} +1 -1
  219. package/frontend/dist/js/{ArtifactSandboxFrame-Ctcwt_l2.js → ArtifactSandboxFrame-_8RA8_JV.js} +1 -1
  220. package/frontend/dist/js/ArtifactSlideOutPanel-DlkOZI5N.js +1 -0
  221. package/frontend/dist/js/{AutomationModal-mTYs9LrJ.js → AutomationModal-BaaxZF1M.js} +1 -1
  222. package/frontend/dist/js/AutomationsPage-DY2x7zVm.js +1 -0
  223. package/frontend/dist/js/{AvatarUpload-wWUAi3e2.js → AvatarUpload-CH_n1Ef0.js} +1 -1
  224. package/frontend/dist/js/{Button-ZQ6BePid.js → Button-CGMYia4g.js} +1 -1
  225. package/frontend/dist/js/{CalendarPage-Ch4racU2.js → CalendarPage-DLo5nm3Q.js} +1 -1
  226. package/frontend/dist/js/ChannelsPage-DnQI7mzq.js +1 -0
  227. package/frontend/dist/js/ChatPage-BaDkJnEC.js +14 -0
  228. package/frontend/dist/js/ConnectModels-B4dGb5yc.js +1 -0
  229. package/frontend/dist/js/CordisPage-CPiYn2Bx.js +1 -0
  230. package/frontend/dist/js/{EvaluationsPage-DHPnNBkW.js → EvaluationsPage-DpdGpd7x.js} +2 -2
  231. package/frontend/dist/js/{FirstTimeSetup-CoF83yY8.js → FirstTimeSetup-By8OE1JS.js} +1 -1
  232. package/frontend/dist/js/GalleryPage-ByZyIhZQ.js +1 -0
  233. package/frontend/dist/js/HomePage-Btc-Mvin.js +1 -0
  234. package/frontend/dist/js/{LanguageSwitcher-CogfczNm.js → LanguageSwitcher-B3CxRW6J.js} +1 -1
  235. package/frontend/dist/js/LibreClawPage-3Sonm1gu.js +1 -0
  236. package/frontend/dist/js/{Logo-C9fsEUaY.js → Logo-HZvdAk2c.js} +1 -1
  237. package/frontend/dist/js/{LogoMark-Cvu5CQOW.js → LogoMark-GJnfMXsk.js} +1 -1
  238. package/frontend/dist/js/{ModelManagerModals-Bc2Woor7.js → ModelManagerModals-Bk6OQzJI.js} +1 -1
  239. package/frontend/dist/js/NotesPage-lFhfjMqJ.js +3 -0
  240. package/frontend/dist/js/{OptimizedSyntaxHighlighter-aKWyHj_c.js → OptimizedSyntaxHighlighter-CzzV6ONG.js} +1 -1
  241. package/frontend/dist/js/OptimizedSyntaxHighlighter-ajqwyBQm.js +1 -0
  242. package/frontend/dist/js/{PasswordStrengthMeter-BJr4eBbo.js → PasswordStrengthMeter-DasfJa4P.js} +1 -1
  243. package/frontend/dist/js/{PersonasPage-ff5opf9B.js → PersonasPage-nOThOpXp.js} +2 -2
  244. package/frontend/dist/js/PluginUsagePage-BRbHeRf7.js +1 -0
  245. package/frontend/dist/js/{RichMessageContent-BNNylVAb.js → RichMessageContent-BZ7KKJKK.js} +2 -2
  246. package/frontend/dist/js/RichMessageContent-oyydJjgc.js +1 -0
  247. package/frontend/dist/js/SettingsModal-VpsAx2Ns.js +19 -0
  248. package/frontend/dist/js/{SettingsToggle-CKLHOUt-.js → SettingsToggle-oxvw7ulA.js} +1 -1
  249. package/frontend/dist/js/{ShareDialog-DykD70uB.js → ShareDialog-CnxPGPb_.js} +1 -1
  250. package/frontend/dist/js/SystemPage-D2ikvhDp.js +1 -0
  251. package/frontend/dist/js/{TurnstileWidget-BO2ceTt8.js → TurnstileWidget-CVepEMEQ.js} +1 -1
  252. package/frontend/dist/js/{UserManagementPage-Ch-PvYQ9.js → UserManagementPage-2yHv89ZA.js} +1 -1
  253. package/frontend/dist/js/UserManagementPanel-vxpiyiTZ.js +1 -0
  254. package/frontend/dist/js/{WhatsNewModal-Bu4H4MEb.js → WhatsNewModal-DAAFzY0d.js} +1 -1
  255. package/frontend/dist/js/WorkPage-BYpYD9mr.js +8 -0
  256. package/frontend/dist/js/api-C0ligMmL.js +1 -0
  257. package/frontend/dist/js/api-CVUaOaq4.js +14 -0
  258. package/frontend/dist/js/{appNavigation-CVsQuDI1.js → appNavigation-CqtrZ9bm.js} +1 -1
  259. package/frontend/dist/js/{appStore-Din-tTD9.js → appStore-Biw63DtJ.js} +2 -2
  260. package/frontend/dist/js/appVersion-D78eXAb-.js +1 -0
  261. package/frontend/dist/js/ar-Cq-DrSYL.js +2 -0
  262. package/frontend/dist/js/authStore-2DsDTcIu.js +1 -0
  263. package/frontend/dist/js/{authStore-Cm8P6rYs.js → authStore-C5qKrmn4.js} +3 -3
  264. package/frontend/dist/js/bn-BqxLh-KL.js +2 -0
  265. package/frontend/dist/js/chatStore-DQhEqb9F.js +3 -0
  266. package/frontend/dist/js/client-gf5bjBrn.js +2 -0
  267. package/frontend/dist/js/composerStyles-C83jssgZ.js +1 -0
  268. package/frontend/dist/js/{config-DHea4b8N.js → config-CNvgxwAm.js} +1 -1
  269. package/frontend/dist/js/cordisApi-BYjA4EOQ.js +2 -0
  270. package/frontend/dist/js/cs-D2DDNZf-.js +2 -0
  271. package/frontend/dist/js/da-BciY-TSG.js +2 -0
  272. package/frontend/dist/js/de-DjU_eXQ-.js +2 -0
  273. package/frontend/dist/js/es-ChIEs80I.js +2 -0
  274. package/frontend/dist/js/{estree-DCT3Jm65.js → estree-DGmLqopC.js} +17 -17
  275. package/frontend/dist/js/evaluationsApi-Bg12ekHo.js +1 -0
  276. package/frontend/dist/js/fr-Bi8BGRW4.js +2 -0
  277. package/frontend/dist/js/hi-BMsCnWg7.js +2 -0
  278. package/frontend/dist/js/{html-CBXMuS97.js → html-BryNQ_yx.js} +6 -6
  279. package/frontend/dist/js/id-CpcN1vhk.js +2 -0
  280. package/frontend/dist/js/is-DkUy2cmP.js +2 -0
  281. package/frontend/dist/js/it-BglK9DRZ.js +2 -0
  282. package/frontend/dist/js/ja-IrprzwLJ.js +2 -0
  283. package/frontend/dist/js/ko--wwEsMPi.js +2 -0
  284. package/frontend/dist/js/{markdown-Bo71X2X2.js → markdown-CZ1tYEW8.js} +17 -17
  285. package/frontend/dist/js/{markdown-core-BFkBYv2v.js → markdown-core-KjS96SYW.js} +1 -1
  286. package/frontend/dist/js/{markdown-html-CwjnwJbl.js → markdown-html-DQEwrWcf.js} +1 -1
  287. package/frontend/dist/js/{markdown-math-CJvHdD1l.js → markdown-math-CKi32S5d.js} +1 -1
  288. package/frontend/dist/js/{markdownHtml-egpK3_YY.js → markdownHtml-lrXhxBhK.js} +1 -1
  289. package/frontend/dist/js/markdownMath-B0BpyFBS.js +1 -0
  290. package/frontend/dist/js/{messageCodeStyles-euWoxwoo.js → messageCodeStyles-DJZ4QMVq.js} +2 -2
  291. package/frontend/dist/js/ms-BWj59y7-.js +2 -0
  292. package/frontend/dist/js/nl-D-QndW_A.js +2 -0
  293. package/frontend/dist/js/pl-Dw7d7iDV.js +2 -0
  294. package/frontend/dist/js/pt-BI53uHJw.js +2 -0
  295. package/frontend/dist/js/react-vendor-wiHys0m2.js +9 -0
  296. package/frontend/dist/js/router-vendor-HZm4FR0A.js +1 -0
  297. package/frontend/dist/js/ru-JKyTgPg9.js +2 -0
  298. package/frontend/dist/js/{standalone-6z5x8CWe.js → standalone-DbyFjvTU.js} +1 -1
  299. package/frontend/dist/js/sv-BIkBLPSQ.js +2 -0
  300. package/frontend/dist/js/{syntax-highlight-7t8DGG2n.js → syntax-highlight-DNc3FFCa.js} +1 -1
  301. package/frontend/dist/js/{teamEventStream-DGgjrVqw.js → teamEventStream-PXiwR5Kr.js} +1 -1
  302. package/frontend/dist/js/th-CZ_LcCU0.js +2 -0
  303. package/frontend/dist/js/tr-B265byx1.js +2 -0
  304. package/frontend/dist/js/{typescript-CslHIgIJ.js → typescript-DUM5niRM.js} +1 -1
  305. package/frontend/dist/js/{ui-CNcEDQ95.js → ui-DDMjO5dd.js} +2 -2
  306. package/frontend/dist/js/ui-vendor-BhHHyHk3.js +1 -0
  307. package/frontend/dist/js/uk-VTAlChwf.js +2 -0
  308. package/frontend/dist/js/{useChat-YRODF1y1.js → useChat-DaIZ2Dbu.js} +1 -1
  309. package/frontend/dist/js/{useDialogFocus-BQLdAGYH.js → useDialogFocus-BPTG_Zmy.js} +1 -1
  310. package/frontend/dist/js/useDictation-BXyX1U8r.js +1 -0
  311. package/frontend/dist/js/useQuery-hWmQjdLu.js +1 -0
  312. package/frontend/dist/js/{useTranslation-Kn7_iLGj.js → useTranslation-B9kflK9S.js} +1 -1
  313. package/frontend/dist/js/{utils-Dq1w7K0c.js → utils-p8Gt72YP.js} +1 -1
  314. package/frontend/dist/js/{utils-vendor-dx9vGAt3.js → utils-vendor-DISWt2y9.js} +1 -1
  315. package/frontend/dist/js/vi-D8rXh-53.js +2 -0
  316. package/frontend/dist/js/{workStatus-oU04ZrUq.js → work-DmJpVPPO.js} +1 -1
  317. package/frontend/dist/js/workApi-BIS9RxRi.js +1 -0
  318. package/frontend/dist/js/workApi-C3Td_lFD.js +5 -0
  319. package/frontend/dist/js/workModels-MzU2Ab7l.js +1 -0
  320. package/frontend/dist/js/zh-BEGd9iBD.js +2 -0
  321. package/package.json +43 -8
  322. package/scripts/prepare-dsh-provider.mjs +124 -0
  323. package/frontend/dist/assets/index-BXTzjRcS.js +0 -92
  324. package/frontend/dist/assets/index-uzzNXp5R.css +0 -1
  325. package/frontend/dist/js/ArtifactSlideOutPanel-DPWGjHhp.js +0 -1
  326. package/frontend/dist/js/AutomationsPage-DvsLZWtg.js +0 -1
  327. package/frontend/dist/js/ChannelsPage-D252gXwf.js +0 -1
  328. package/frontend/dist/js/ChatPage-D_CzOiHw.js +0 -14
  329. package/frontend/dist/js/ConnectModels-DYOtIOEY.js +0 -1
  330. package/frontend/dist/js/GalleryPage-BpK-vrvd.js +0 -1
  331. package/frontend/dist/js/HomePage-zJkkDNJl.js +0 -1
  332. package/frontend/dist/js/LibreClawPage-CAgNj9GM.js +0 -1
  333. package/frontend/dist/js/NotesPage-CNTqlwNc.js +0 -3
  334. package/frontend/dist/js/OptimizedSyntaxHighlighter-BFjOBavF.js +0 -1
  335. package/frontend/dist/js/PluginUsagePage-Cp4j4-VZ.js +0 -1
  336. package/frontend/dist/js/RichMessageContent-BOY5jqj-.js +0 -1
  337. package/frontend/dist/js/SettingsModal-WAdVG4-g.js +0 -19
  338. package/frontend/dist/js/SystemPage-Dwi8leEQ.js +0 -1
  339. package/frontend/dist/js/UserManagementPanel-CfG67c_k.js +0 -1
  340. package/frontend/dist/js/WorkPage-D_cL9wp4.js +0 -8
  341. package/frontend/dist/js/api-29NO19CP.js +0 -14
  342. package/frontend/dist/js/api-DhafOTdF.js +0 -1
  343. package/frontend/dist/js/appVersion-BNuquyI6.js +0 -1
  344. package/frontend/dist/js/ar-WHne6B0o.js +0 -2
  345. package/frontend/dist/js/authStore-snvjjOuX.js +0 -1
  346. package/frontend/dist/js/bn-BZvCjqwO.js +0 -2
  347. package/frontend/dist/js/chatStore-BPpcL4I5.js +0 -3
  348. package/frontend/dist/js/composerStyles-bNlrIugf.js +0 -1
  349. package/frontend/dist/js/cs-DfSqWQ9V.js +0 -2
  350. package/frontend/dist/js/da-BmMLW4Dl.js +0 -2
  351. package/frontend/dist/js/de-BQMiQwQT.js +0 -2
  352. package/frontend/dist/js/es-DXf6jt4Z.js +0 -2
  353. package/frontend/dist/js/evaluationsApi-Btc9Mg9z.js +0 -1
  354. package/frontend/dist/js/fr-BD6nT1oc.js +0 -2
  355. package/frontend/dist/js/hi-BSuNic-8.js +0 -2
  356. package/frontend/dist/js/id-wodbwt3B.js +0 -2
  357. package/frontend/dist/js/is-CEjw-OJE.js +0 -2
  358. package/frontend/dist/js/it-X_pq8C7q.js +0 -2
  359. package/frontend/dist/js/ja-DWM2HZZd.js +0 -2
  360. package/frontend/dist/js/ko-DFi2khBB.js +0 -2
  361. package/frontend/dist/js/markdownMath-mesq3ZcY.js +0 -1
  362. package/frontend/dist/js/ms-DNQateTR.js +0 -2
  363. package/frontend/dist/js/nl-DSWhi8W8.js +0 -2
  364. package/frontend/dist/js/pl-W9WEDpZ3.js +0 -2
  365. package/frontend/dist/js/pt-DCCGvdNt.js +0 -2
  366. package/frontend/dist/js/react-vendor-D0Ec-185.js +0 -9
  367. package/frontend/dist/js/router-vendor-CM0PhOMl.js +0 -1
  368. package/frontend/dist/js/ru-D-Ww6dXe.js +0 -2
  369. package/frontend/dist/js/sv-B0Iry-H3.js +0 -2
  370. package/frontend/dist/js/th-CEZS0WeE.js +0 -2
  371. package/frontend/dist/js/tr-BFJ8TeYb.js +0 -2
  372. package/frontend/dist/js/ui-vendor-LatG6rFF.js +0 -177
  373. package/frontend/dist/js/uk-BmW3yDel.js +0 -2
  374. package/frontend/dist/js/useQuery-C3O4CZ54.js +0 -1
  375. package/frontend/dist/js/vi-Cu25FXnp.js +0 -2
  376. package/frontend/dist/js/work-DVgm81bJ.js +0 -1
  377. package/frontend/dist/js/workApi-BdUNugC3.js +0 -1
  378. package/frontend/dist/js/workApi-OieM8qEL.js +0 -6
  379. package/frontend/dist/js/zh-CuCAx3oH.js +0 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/cordis/host/model.ts"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAExE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAQ/C;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,kBAAkB,GACzB,MAAM,GAAG,SAAS,CAEpB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAIzE"}
@@ -0,0 +1,54 @@
1
+ /*
2
+ * Libre WebUI
3
+ * Copyright (C) 2025 Kroonen AI, Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at:
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Route the engine addresses Libre WebUI's provider layer by.
19
+ *
20
+ * The engine must always name a route: an agent with no provider refuses every
21
+ * turn. In `libre-webui` mode this is the route regardless of what `route`
22
+ * says, because that field describes a provider package's own route.
23
+ */
24
+ export const LIBRE_WEBUI_ROUTE = 'libre-webui';
25
+ /** Provider modes that expect a package to be installed. */
26
+ const PACKAGE_MODES = {
27
+ deepseek: '@deepseek-ai/dsh-llm-deepseek',
28
+ 'pi-ai': '@deepseek-ai/dsh-llm-pi-ai',
29
+ };
30
+ /**
31
+ * Describe a model configuration the host cannot serve itself.
32
+ *
33
+ * The provider packages are not dependencies of this backend: carrying every
34
+ * provider SDK pulled in a large tree, including deprecated packages for
35
+ * capabilities the engine never reaches. A deployment that wants one installs
36
+ * it and mounts it through the composition, so the fix belongs in the message
37
+ * rather than in a hard dependency.
38
+ *
39
+ * @param config - the resolved adapter configuration.
40
+ * @returns the package that must be installed, or undefined when nothing is
41
+ * required beyond the provider layer.
42
+ */
43
+ export function requiredProviderPackage(config) {
44
+ return PACKAGE_MODES[config.provider];
45
+ }
46
+ /**
47
+ * Whether a configuration is served without an extra provider package.
48
+ * @param config - the resolved host configuration.
49
+ * @returns true when the host can serve the configured route as it stands.
50
+ */
51
+ export function isServedByProviderLayer(config) {
52
+ return (config.model.provider === 'none' || config.model.provider === 'libre-webui');
53
+ }
54
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/cordis/host/model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAoBH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAE/C,4DAA4D;AAC5D,MAAM,aAAa,GAAqC;IACtD,QAAQ,EAAE,+BAA+B;IACzC,OAAO,EAAE,4BAA4B;CACtC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAA0B;IAE1B,OAAO,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AACxC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,MAAwB;IAC9D,OAAO,CACL,MAAM,CAAC,KAAK,CAAC,QAAQ,KAAK,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,KAAK,aAAa,CAC5E,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ /** Recognize the known uploader packages and their normal module paths. */
3
+ export declare function isDshUploadPackage(specifier: string): boolean;
4
+ /** Check direct host imports as well as imports initiated through the Loader. */
5
+ export declare function assertDshModuleAllowed(specifier: string): void;
6
+ /** Install before mounting any entries, including nested Include trees. */
7
+ export declare function enforceDshPrivacy(context: Context): void;
8
+ //# sourceMappingURL=privacy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"privacy.d.ts","sourceRoot":"","sources":["../../../src/cordis/host/privacy.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AASnD,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAiB7D;AAED,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAM9D;AAcD,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAexD"}
@@ -0,0 +1,73 @@
1
+ /*
2
+ * Libre WebUI
3
+ * Copyright (C) 2025 Kroonen AI, Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at:
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Prevent configured DSH data-upload plugins from activating in LWUI's host.
19
+ * This guards Loader imports, not arbitrary code inside trusted plugins.
20
+ */
21
+ import { fileURLToPath } from 'node:url';
22
+ const UPLOAD_PACKAGES = [
23
+ '@deepseek-ai/dsh-session-telemetry-otel',
24
+ '@deepseek-ai/dsh-session-log-deepseek',
25
+ '@deepseek-ai/dsh-plugin-package-inventory-deepseek',
26
+ ];
27
+ /** Recognize the known uploader packages and their normal module paths. */
28
+ export function isDshUploadPackage(specifier) {
29
+ let normalized = specifier;
30
+ if (specifier.startsWith('file:')) {
31
+ try {
32
+ normalized = fileURLToPath(specifier);
33
+ }
34
+ catch {
35
+ // Leave invalid active specifiers to the Loader. Disabled rows are inert.
36
+ return false;
37
+ }
38
+ }
39
+ normalized = normalized.replace(/\\/g, '/');
40
+ return UPLOAD_PACKAGES.some(name => normalized === name ||
41
+ normalized.startsWith(`${name}/`) ||
42
+ normalized.includes(`/node_modules/${name}/`));
43
+ }
44
+ /** Check direct host imports as well as imports initiated through the Loader. */
45
+ export function assertDshModuleAllowed(specifier) {
46
+ if (isDshUploadPackage(specifier)) {
47
+ throw new Error(`Libre WebUI disables DSH data-upload plugin "${specifier}". Set its Loader row to disabled: true.`);
48
+ }
49
+ }
50
+ function requirePrivateEntry(options, allowDisabled = true) {
51
+ if (typeof options.name !== 'string' ||
52
+ (allowDisabled && options.disabled === true && !options.group))
53
+ return;
54
+ assertDshModuleAllowed(options.name);
55
+ }
56
+ /** Install before mounting any entries, including nested Include trees. */
57
+ export function enforceDshPrivacy(context) {
58
+ context.on('loader/entry-init', entry => {
59
+ // Name changes on active entries import directly from update(), while
60
+ // refresh() uses init(). Guard both public entry lifecycle methods.
61
+ const update = entry.update.bind(entry);
62
+ entry.update = async (options, create, force) => {
63
+ requirePrivateEntry(create ? options : { ...entry.options, ...options });
64
+ await update(options, create, force);
65
+ };
66
+ const init = entry.init.bind(entry);
67
+ entry.init = async () => {
68
+ requirePrivateEntry(entry.options, false);
69
+ await init();
70
+ };
71
+ });
72
+ }
73
+ //# sourceMappingURL=privacy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"privacy.js","sourceRoot":"","sources":["../../../src/cordis/host/privacy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;GAGG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIzC,MAAM,eAAe,GAAG;IACtB,yCAAyC;IAC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,oEAAoE;QACpE,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxC,KAAK,CAAC,MAAM,GAAG,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE;YAC9C,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;YACzE,MAAM,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QACvC,CAAC,CAAC;QACF,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpC,KAAK,CAAC,IAAI,GAAG,KAAK,IAAI,EAAE;YACtB,mBAAmB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAC1C,MAAM,IAAI,EAAE,CAAC;QACf,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Public surface of the Libre WebUI Cordis bridge.
3
+ *
4
+ * Route handlers import from here and nowhere deeper: the host, the bridge
5
+ * plugin, and the contract types are one unit of API so that the internal file
6
+ * layout stays free to change.
7
+ *
8
+ * @module cordis
9
+ */
10
+ export { DSH_ENGINE_SERVICE, type DshEngine, type EngineAgentSummary, type EngineCreateAgentOptions, type EngineCreateSessionOptions, type EngineMessage, type EngineMessageRole, type EngineServiceState, type EngineServiceStatus, type EngineSession, type EngineSessionSummary, type EngineStreamChunk, type EngineStreamHandle, type EngineStreamSubscription, type EngineToolSummary, } from './contracts.js';
11
+ export { CORDIS_PATCH_FILENAME, readConfigDocument, resolveCordisHostConfig, type CordisHostConfig, type EngineFeatures, type ModelAdapterConfig, type ModelProviderMode, } from './host/config.js';
12
+ export { ENGINE_ENTRY_ID, requiredServices, startCordisHost, type CordisHost, type CordisHostStatus, type RequiredService, } from './host/host.js';
13
+ export { isServedByProviderLayer, requiredProviderPackage, } from './host/model.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cordis/index.ts"],"names":[],"mappings":"AAiBA;;;;;;;;GAQG;AAEH,OAAO,EACL,kBAAkB,EAClB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,GACvB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,GACvB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Libre WebUI
3
+ * Copyright (C) 2025 Kroonen AI, Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at:
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Public surface of the Libre WebUI Cordis bridge.
19
+ *
20
+ * Route handlers import from here and nowhere deeper: the host, the bridge
21
+ * plugin, and the contract types are one unit of API so that the internal file
22
+ * layout stays free to change.
23
+ *
24
+ * @module cordis
25
+ */
26
+ export { DSH_ENGINE_SERVICE, } from './contracts.js';
27
+ export { CORDIS_PATCH_FILENAME, readConfigDocument, resolveCordisHostConfig, } from './host/config.js';
28
+ export { ENGINE_ENTRY_ID, requiredServices, startCordisHost, } from './host/host.js';
29
+ export { isServedByProviderLayer, requiredProviderPackage, } from './host/model.js';
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cordis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;GAQG;AAEH,OAAO,EACL,kBAAkB,GAenB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,GAKxB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,GAIhB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Process-wide owner of the Cordis host.
3
+ *
4
+ * The host is started lazily rather than during boot: an operator who has not
5
+ * enabled the bridge must not pay for an engine they do not run, and a failure
6
+ * inside the engine must not be able to stop Libre WebUI from serving the rest
7
+ * of its features. Startup therefore happens on first use and reports its own
8
+ * failure through the route layer, where an operator can see it.
9
+ *
10
+ * @module cordis/runtime
11
+ */
12
+ import type { CordisHost, CordisHostConfig, DshEngine } from './index.js';
13
+ import type { CordisAccessState } from '../services/cordisAccessService.js';
14
+ /** Why the bridge cannot serve a request. */
15
+ export type CordisUnavailableReason =
16
+ /** The operator has not enabled the bridge. */
17
+ 'disabled'
18
+ /** Startup is still in flight. */
19
+ | 'starting'
20
+ /** Startup failed; `detail` carries the reason. */
21
+ | 'failed';
22
+ /** Result of asking the runtime for the engine. */
23
+ export type CordisEngineResult = {
24
+ readonly ok: true;
25
+ readonly engine: DshEngine;
26
+ } | {
27
+ readonly ok: false;
28
+ readonly reason: CordisUnavailableReason;
29
+ readonly detail?: string;
30
+ };
31
+ /**
32
+ * Override resolution inputs, for tests and for callers that own their own
33
+ * paths. Values are merged over the resolved configuration.
34
+ * @param next - partial configuration overriding resolved values.
35
+ */
36
+ export declare function configureCordisRuntime(next: Partial<CordisHostConfig> | undefined): void;
37
+ /**
38
+ * Resolve the configuration this runtime would start with.
39
+ *
40
+ * Overridden paths are handed to the resolver rather than only spread over its
41
+ * result: a caller that owns its own composition and settings paths expects the
42
+ * *parsed* values to come from those files. Spreading alone would leave
43
+ * file-derived fields — such as whether the file declared `features.enabled` —
44
+ * describing whatever document the environment happened to point at.
45
+ * @returns the fully resolved configuration for this runtime.
46
+ */
47
+ export declare function cordisRuntimeConfig(): CordisHostConfig;
48
+ /**
49
+ * Install the provider capability for the engine's adapter row.
50
+ * @param handler - the handler implementing Libre WebUI's provider layer.
51
+ */
52
+ export declare function setCordisProviderCapability(handler: unknown): void;
53
+ /**
54
+ * Whether the engine is offered.
55
+ *
56
+ * The administrator's persisted opt-in is the live switch, and
57
+ * `LIBRE_CORDIS_ENABLED` can pin it. The settings document's
58
+ * `features.enabled` pins it only when the file states it and no override is in
59
+ * force: an override is a caller stating the answer, so consulting the file's
60
+ * lock alongside it would make the seam unusable.
61
+ * @returns the effective boolean.
62
+ */
63
+ export declare function isCordisBridgeEnabled(): Promise<boolean>;
64
+ /**
65
+ * Resolve the effective access state for this runtime.
66
+ *
67
+ * The runtime's own resolved configuration is the one that matters: a caller
68
+ * that supplied overrides expects the decision to describe those paths, and the
69
+ * settings document's lock is only visible through them.
70
+ * @returns the decision and whether a deployment-level source pinned it.
71
+ */
72
+ export declare function cordisAccessState(): Promise<CordisAccessState>;
73
+ /**
74
+ * Start the host if it is enabled and not already running.
75
+ *
76
+ * Concurrent callers share one startup: the first request begins the mount and
77
+ * every other waiter observes the same promise, so the engine is never mounted
78
+ * twice.
79
+ * @returns the running host, or undefined when the bridge is disabled.
80
+ * @throws when startup fails.
81
+ */
82
+ export declare function ensureCordisHost(): Promise<CordisHost | undefined>;
83
+ /**
84
+ * Read the engine contract, starting the host on first use.
85
+ * @returns the engine, or a typed reason the bridge cannot serve the request.
86
+ */
87
+ export declare function getCordisEngine(): Promise<CordisEngineResult>;
88
+ /** The running host, if any. Used by diagnostics and tests. */
89
+ export declare function cordisHost(): CordisHost | undefined;
90
+ /**
91
+ * Stop the host and release every engine effect.
92
+ *
93
+ * Safe to call when the bridge was never started or is already stopped.
94
+ * @returns a promise resolving once teardown has completed.
95
+ */
96
+ export declare function stopCordisHost(): Promise<void>;
97
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/cordis/runtime.ts"],"names":[],"mappings":"AAiBA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAM1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAS5E,6CAA6C;AAC7C,MAAM,MAAM,uBAAuB;AACjC,+CAA+C;AAC7C,UAAU;AACZ,kCAAkC;GAChC,UAAU;AACZ,mDAAmD;GACjD,QAAQ,CAAC;AAEb,mDAAmD;AACnD,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;CAAE,GACjD;IACE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AASN;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,SAAS,GAC1C,IAAI,CAEN;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,IAAI,gBAAgB,CA+BtD;AAYD;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAElE;AAED;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC,CAG9D;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAEpE;AAED;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAmCxE;AAED;;;GAGG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,kBAAkB,CAAC,CA4BnE;AAED,+DAA+D;AAC/D,wBAAgB,UAAU,IAAI,UAAU,GAAG,SAAS,CAEnD;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAiBpD"}
@@ -0,0 +1,231 @@
1
+ /*
2
+ * Libre WebUI
3
+ * Copyright (C) 2025 Kroonen AI, Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at:
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { resolveCordisHostConfig, startCordisHost, DSH_ENGINE_SERVICE, } from './index.js';
18
+ import { getCordisAccess, getCordisEnabled, } from '../services/cordisAccessService.js';
19
+ import { createLogger } from '../utils/logger.js';
20
+ const logger = createLogger('cordis-runtime');
21
+ let host;
22
+ let startPromise;
23
+ let stopPromise;
24
+ let generation = 0;
25
+ let failure;
26
+ let overrides;
27
+ /**
28
+ * Override resolution inputs, for tests and for callers that own their own
29
+ * paths. Values are merged over the resolved configuration.
30
+ * @param next - partial configuration overriding resolved values.
31
+ */
32
+ export function configureCordisRuntime(next) {
33
+ overrides = next;
34
+ }
35
+ /**
36
+ * Resolve the configuration this runtime would start with.
37
+ *
38
+ * Overridden paths are handed to the resolver rather than only spread over its
39
+ * result: a caller that owns its own composition and settings paths expects the
40
+ * *parsed* values to come from those files. Spreading alone would leave
41
+ * file-derived fields — such as whether the file declared `features.enabled` —
42
+ * describing whatever document the environment happened to point at.
43
+ * @returns the fully resolved configuration for this runtime.
44
+ */
45
+ export function cordisRuntimeConfig() {
46
+ const resolved = resolveCordisHostConfig({
47
+ ...(overrides?.configPath ? { configPath: overrides.configPath } : {}),
48
+ ...(overrides?.settingsPath
49
+ ? { settingsPath: overrides.settingsPath }
50
+ : {}),
51
+ ...(overrides?.workspacePath
52
+ ? { workspacePath: overrides.workspacePath }
53
+ : {}),
54
+ ...(overrides?.sessionStorePath
55
+ ? { sessionStorePath: overrides.sessionStorePath }
56
+ : {}),
57
+ });
58
+ const effective = overrides
59
+ ? {
60
+ ...resolved,
61
+ ...overrides,
62
+ // These overrides were resolved above. Keep their canonical values so
63
+ // blank or relative inputs cannot restore a cwd-dependent directory.
64
+ configPath: resolved.configPath,
65
+ settingsPath: resolved.settingsPath,
66
+ workspacePath: resolved.workspacePath,
67
+ sessionStorePath: resolved.sessionStorePath,
68
+ }
69
+ : resolved;
70
+ // Attach the runtime capability the host hands to the adapter row. It is not
71
+ // configuration and never reaches the composed document, so it is added here
72
+ // rather than resolved from a file.
73
+ return providerCapability
74
+ ? { ...effective, providerHandler: providerCapability }
75
+ : effective;
76
+ }
77
+ /**
78
+ * The provider capability the host passes to the adapter row.
79
+ *
80
+ * Installed by the application at startup. It is held here rather than in the
81
+ * adapter module because that module is loaded twice — once by path for the
82
+ * application and once by URL for the plugin row — and a registration on one
83
+ * copy is invisible to the other.
84
+ */
85
+ let providerCapability;
86
+ /**
87
+ * Install the provider capability for the engine's adapter row.
88
+ * @param handler - the handler implementing Libre WebUI's provider layer.
89
+ */
90
+ export function setCordisProviderCapability(handler) {
91
+ providerCapability = handler;
92
+ }
93
+ /**
94
+ * Whether the engine is offered.
95
+ *
96
+ * The administrator's persisted opt-in is the live switch, and
97
+ * `LIBRE_CORDIS_ENABLED` can pin it. The settings document's
98
+ * `features.enabled` pins it only when the file states it and no override is in
99
+ * force: an override is a caller stating the answer, so consulting the file's
100
+ * lock alongside it would make the seam unusable.
101
+ * @returns the effective boolean.
102
+ */
103
+ export async function isCordisBridgeEnabled() {
104
+ if (overrides?.features)
105
+ return overrides.features.enabled;
106
+ return getCordisEnabled(cordisRuntimeConfig());
107
+ }
108
+ /**
109
+ * Resolve the effective access state for this runtime.
110
+ *
111
+ * The runtime's own resolved configuration is the one that matters: a caller
112
+ * that supplied overrides expects the decision to describe those paths, and the
113
+ * settings document's lock is only visible through them.
114
+ * @returns the decision and whether a deployment-level source pinned it.
115
+ */
116
+ export async function cordisAccessState() {
117
+ return getCordisAccess(cordisRuntimeConfig());
118
+ }
119
+ /**
120
+ * Start the host if it is enabled and not already running.
121
+ *
122
+ * Concurrent callers share one startup: the first request begins the mount and
123
+ * every other waiter observes the same promise, so the engine is never mounted
124
+ * twice.
125
+ * @returns the running host, or undefined when the bridge is disabled.
126
+ * @throws when startup fails.
127
+ */
128
+ export async function ensureCordisHost() {
129
+ await stopPromise;
130
+ if (!(await isCordisBridgeEnabled()))
131
+ return undefined;
132
+ if (host)
133
+ return host;
134
+ if (!startPromise) {
135
+ const currentGeneration = generation;
136
+ const config = cordisRuntimeConfig();
137
+ const pending = (async () => {
138
+ try {
139
+ const candidate = await startCordisHost(config);
140
+ if (currentGeneration !== generation ||
141
+ !(await isCordisBridgeEnabled())) {
142
+ await candidate.stop();
143
+ return;
144
+ }
145
+ host = candidate;
146
+ failure = undefined;
147
+ }
148
+ catch (error) {
149
+ if (currentGeneration === generation)
150
+ failure = error instanceof Error ? error.message : String(error);
151
+ logger.error('Cordis host failed to start', { error: String(error) });
152
+ throw error;
153
+ }
154
+ })();
155
+ startPromise = pending;
156
+ void pending
157
+ .finally(() => {
158
+ if (startPromise === pending)
159
+ startPromise = undefined;
160
+ })
161
+ .catch(() => undefined);
162
+ }
163
+ await startPromise;
164
+ return host;
165
+ }
166
+ /**
167
+ * Read the engine contract, starting the host on first use.
168
+ * @returns the engine, or a typed reason the bridge cannot serve the request.
169
+ */
170
+ export async function getCordisEngine() {
171
+ if (!(await isCordisBridgeEnabled())) {
172
+ return { ok: false, reason: 'disabled' };
173
+ }
174
+ if (!host && !startPromise && failure !== undefined) {
175
+ return { ok: false, reason: 'failed', detail: failure };
176
+ }
177
+ try {
178
+ const running = await ensureCordisHost();
179
+ if (!running)
180
+ return { ok: false, reason: 'disabled' };
181
+ const engine = running.context.get(DSH_ENGINE_SERVICE);
182
+ if (!engine) {
183
+ return {
184
+ ok: false,
185
+ reason: 'failed',
186
+ detail: 'the composition mounted no libreDshEngine service; check the bridge row',
187
+ };
188
+ }
189
+ return { ok: true, engine };
190
+ }
191
+ catch (error) {
192
+ return {
193
+ ok: false,
194
+ reason: 'failed',
195
+ detail: error instanceof Error ? error.message : String(error),
196
+ };
197
+ }
198
+ }
199
+ /** The running host, if any. Used by diagnostics and tests. */
200
+ export function cordisHost() {
201
+ return host;
202
+ }
203
+ /**
204
+ * Stop the host and release every engine effect.
205
+ *
206
+ * Safe to call when the bridge was never started or is already stopped.
207
+ * @returns a promise resolving once teardown has completed.
208
+ */
209
+ export async function stopCordisHost() {
210
+ if (stopPromise)
211
+ return stopPromise;
212
+ generation += 1;
213
+ const pending = startPromise;
214
+ const running = host;
215
+ host = undefined;
216
+ failure = undefined;
217
+ const stopping = (async () => {
218
+ await pending?.catch(() => undefined);
219
+ if (running)
220
+ await running.stop();
221
+ })();
222
+ stopPromise = stopping;
223
+ try {
224
+ await stopping;
225
+ }
226
+ finally {
227
+ if (stopPromise === stopping)
228
+ stopPromise = undefined;
229
+ }
230
+ }
231
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/cordis/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAeH,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,eAAe,EACf,gBAAgB,GACjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,MAAM,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC;AAoB9C,IAAI,IAA4B,CAAC;AACjC,IAAI,YAAuC,CAAC;AAC5C,IAAI,WAAsC,CAAC;AAC3C,IAAI,UAAU,GAAG,CAAC,CAAC;AACnB,IAAI,OAA2B,CAAC;AAChC,IAAI,SAAgD,CAAC;AAErD;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CACpC,IAA2C;IAE3C,SAAS,GAAG,IAAI,CAAC;AACnB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB;IACjC,MAAM,QAAQ,GAAG,uBAAuB,CAAC;QACvC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtE,GAAG,CAAC,SAAS,EAAE,YAAY;YACzB,CAAC,CAAC,EAAE,YAAY,EAAE,SAAS,CAAC,YAAY,EAAE;YAC1C,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,SAAS,EAAE,aAAa;YAC1B,CAAC,CAAC,E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AAI,WAAW;QAAE,OAAO,WAAW,CAAC;IACpC,UAAU,IAAI,CAAC,CAAC;IAChB,MAAM,OAAO,GAAG,YAAY,CAAC;IAC7B,MAAM,OAAO,GAAG,IAAI,CAAC;IACrB,IAAI,GAAG,SAAS,CAAC;IACjB,OAAO,GAAG,SAAS,CAAC;IACpB,MAAM,QAAQ,GAAG,CAAC,KAAK,IAAI,EAAE;QAC3B,MAAM,OAAO,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACtC,IAAI,OAAO;YAAE,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;IACpC,CAAC,CAAC,EAAE,CAAC;IACL,WAAW,GAAG,QAAQ,CAAC;IACvB,IAAI,CAAC;QACH,MAAM,QAAQ,CAAC;IACjB,CAAC;YAAS,CAAC;QACT,IAAI,WAAW,KAAK,QAAQ;YAAE,WAAW,GAAG,SAAS,CAAC;IACxD,CAAC;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ /** Engine selection stored alongside the model in existing Work records. */
2
+ export declare const WORK_DSH_MODEL_PREFIX = "dsh:";
3
+ /** Whether Work should use its isolated DSH driver for this model selection. */
4
+ export declare function isWorkDshModel(model: string): boolean;
5
+ /** Recover the provider's exact model id without changing provider identity. */
6
+ export declare function workProviderModel(model: string): string;
7
+ //# sourceMappingURL=work-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work-model.d.ts","sourceRoot":"","sources":["../../src/cordis/work-model.ts"],"names":[],"mappings":"AAiBA,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,SAAS,CAAC;AAE5C,gFAAgF;AAChF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,gFAAgF;AAChF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKvD"}
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Libre WebUI
3
+ * Copyright (C) 2025 Kroonen AI, Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at:
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /** Engine selection stored alongside the model in existing Work records. */
18
+ export const WORK_DSH_MODEL_PREFIX = 'dsh:';
19
+ /** Whether Work should use its isolated DSH driver for this model selection. */
20
+ export function isWorkDshModel(model) {
21
+ return model.trim().startsWith(WORK_DSH_MODEL_PREFIX);
22
+ }
23
+ /** Recover the provider's exact model id without changing provider identity. */
24
+ export function workProviderModel(model) {
25
+ const selected = model.trim();
26
+ return isWorkDshModel(selected)
27
+ ? selected.slice(WORK_DSH_MODEL_PREFIX.length).trim()
28
+ : selected;
29
+ }
30
+ //# sourceMappingURL=work-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work-model.js","sourceRoot":"","sources":["../../src/cordis/work-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,4EAA4E;AAC5E,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE5C,gFAAgF;AAChF,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;AACxD,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC9B,OAAO,cAAc,CAAC,QAAQ,CAAC;QAC7B,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE;QACrD,CAAC,CAAC,QAAQ,CAAC;AACf,CAAC"}
@@ -1074,7 +1074,7 @@ function runMigrations() {
1074
1074
  db.prepare(`UPDATE ${table}
1075
1075
  SET provider_type = 'ollama', provider_id = NULL
1076
1076
  WHERE provider_type IS NULL
1077
- OR provider_type NOT IN ('ollama', 'plugin')
1077
+ OR provider_type NOT IN ('ollama', 'plugin', 'dsh')
1078
1078
  OR (provider_type = 'ollama' AND provider_id IS NOT NULL)`).run();
1079
1079
  }
1080
1080
  // Work networking is now an implementation detail instead of a task-level
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkBA,OAAO,UAAU,CAAC;AAyIlB,QAAA,MAAM,GAAG,6CAAY,CAAC;eAy2BP,GAAG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkBA,OAAO,UAAU,CAAC;AA2IlB,QAAA,MAAM,GAAG,6CAAY,CAAC;eAg3BP,GAAG"}
@@ -83,6 +83,8 @@ import artifactsRoutes from './routes/artifacts.js';
83
83
  import searchRoutes from './routes/search.js';
84
84
  import openaiCompatRoutes from './routes/openaiCompat.js';
85
85
  import healthRoutes from './routes/health.js';
86
+ import cordisRoutes from './routes/cordis.js';
87
+ import { stopCordisHost } from './cordis/runtime.js';
86
88
  import jobsRoutes from './routes/jobs.js';
87
89
  import groupsRoutes from './routes/groups.js';
88
90
  import accessRoutes from './routes/access.js';
@@ -572,6 +574,10 @@ app.use('/api/artifacts', artifactsRoutes);
572
574
  app.use('/api/search', chatRateLimiter, searchRoutes);
573
575
  // The OpenAI-compatible public API answers on the canonical /v1 base.
574
576
  app.use('/v1', chatRateLimiter, openaiCompatRoutes);
577
+ // The embedded Cordis/DSH engine. Every route answers 503 until an
578
+ // operator enables the bridge, so mounting it unconditionally keeps the
579
+ // feature behind configuration rather than behind a build variant.
580
+ app.use('/api/cordis', chatRateLimiter, cordisRoutes);
575
581
  app.use('/api/jobs', jobsRoutes);
576
582
  app.use('/api/groups', groupsRoutes);
577
583
  app.use('/api/access', accessRoutes);
@@ -846,6 +852,9 @@ const shutdown = async (signal) => {
846
852
  : Promise.resolve();
847
853
  const cleanup = Promise.allSettled([
848
854
  registeredWebSockets.close(),
855
+ // Disposing the Cordis root releases every engine effect, listener, and
856
+ // open session store handle instead of relying on process exit.
857
+ stopCordisHost(),
849
858
  stopWork,
850
859
  closeDurableJobRuntime(),
851
860
  httpClosed,