libre-webui 0.37.2 → 0.38.0

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 (355) hide show
  1. package/README.md +28 -65
  2. package/backend/dist/db.js +1 -1
  3. package/backend/dist/index.d.ts.map +1 -1
  4. package/backend/dist/index.js +13 -36
  5. package/backend/dist/index.js.map +1 -1
  6. package/backend/dist/main.js +0 -12
  7. package/backend/dist/main.js.map +1 -1
  8. package/backend/dist/middleware/cors.d.ts.map +1 -1
  9. package/backend/dist/middleware/cors.js +5 -0
  10. package/backend/dist/middleware/cors.js.map +1 -1
  11. package/backend/dist/persistence/postgresExtensionRepositories.d.ts.map +1 -1
  12. package/backend/dist/persistence/postgresExtensionRepositories.js +2 -4
  13. package/backend/dist/persistence/postgresExtensionRepositories.js.map +1 -1
  14. package/backend/dist/persistence/sqliteExtensionRepositories.d.ts.map +1 -1
  15. package/backend/dist/persistence/sqliteExtensionRepositories.js +2 -4
  16. package/backend/dist/persistence/sqliteExtensionRepositories.js.map +1 -1
  17. package/backend/dist/routes/agentCli.d.ts.map +1 -1
  18. package/backend/dist/routes/agentCli.js +8 -3
  19. package/backend/dist/routes/agentCli.js.map +1 -1
  20. package/backend/dist/routes/{cordis.d.ts → strands.d.ts} +1 -1
  21. package/backend/dist/routes/strands.d.ts.map +1 -0
  22. package/backend/dist/routes/strands.js +300 -0
  23. package/backend/dist/routes/strands.js.map +1 -0
  24. package/backend/dist/routes/work.d.ts.map +1 -1
  25. package/backend/dist/routes/work.js +9 -21
  26. package/backend/dist/routes/work.js.map +1 -1
  27. package/backend/dist/services/agentAccessService.d.ts +0 -5
  28. package/backend/dist/services/agentAccessService.d.ts.map +1 -1
  29. package/backend/dist/services/agentAccessService.js +7 -35
  30. package/backend/dist/services/agentAccessService.js.map +1 -1
  31. package/backend/dist/services/agentCliService.d.ts +16 -23
  32. package/backend/dist/services/agentCliService.d.ts.map +1 -1
  33. package/backend/dist/services/agentCliService.js +84 -112
  34. package/backend/dist/services/agentCliService.js.map +1 -1
  35. package/backend/dist/services/authService.d.ts +3 -3
  36. package/backend/dist/services/authService.d.ts.map +1 -1
  37. package/backend/dist/services/authService.js +3 -4
  38. package/backend/dist/services/authService.js.map +1 -1
  39. package/backend/dist/services/authorizationService.d.ts +1 -1
  40. package/backend/dist/services/authorizationService.d.ts.map +1 -1
  41. package/backend/dist/services/authorizationService.js +17 -8
  42. package/backend/dist/services/authorizationService.js.map +1 -1
  43. package/backend/dist/services/pluginUsageService.d.ts +0 -34
  44. package/backend/dist/services/pluginUsageService.d.ts.map +1 -1
  45. package/backend/dist/services/pluginUsageService.js +0 -62
  46. package/backend/dist/services/pluginUsageService.js.map +1 -1
  47. package/backend/dist/services/strandsAccessService.d.ts +26 -0
  48. package/backend/dist/services/strandsAccessService.d.ts.map +1 -0
  49. package/backend/dist/services/strandsAccessService.js +95 -0
  50. package/backend/dist/services/strandsAccessService.js.map +1 -0
  51. package/backend/dist/services/thinkingSummaryService.d.ts +2 -3
  52. package/backend/dist/services/thinkingSummaryService.d.ts.map +1 -1
  53. package/backend/dist/services/thinkingSummaryService.js +13 -27
  54. package/backend/dist/services/thinkingSummaryService.js.map +1 -1
  55. package/backend/dist/services/titleGenerationService.d.ts +7 -18
  56. package/backend/dist/services/titleGenerationService.d.ts.map +1 -1
  57. package/backend/dist/services/titleGenerationService.js +15 -36
  58. package/backend/dist/services/titleGenerationService.js.map +1 -1
  59. package/backend/dist/services/workAgentService.d.ts +1 -1
  60. package/backend/dist/services/workAgentService.d.ts.map +1 -1
  61. package/backend/dist/services/workAgentService.js +14 -60
  62. package/backend/dist/services/workAgentService.js.map +1 -1
  63. package/backend/dist/services/workModelProviderService.d.ts +1 -4
  64. package/backend/dist/services/workModelProviderService.d.ts.map +1 -1
  65. package/backend/dist/services/workModelProviderService.js +17 -37
  66. package/backend/dist/services/workModelProviderService.js.map +1 -1
  67. package/backend/dist/services/workTaskService.js +1 -1
  68. package/backend/dist/services/workTaskService.js.map +1 -1
  69. package/backend/dist/strands/catalog.d.ts +57 -0
  70. package/backend/dist/strands/catalog.d.ts.map +1 -0
  71. package/backend/dist/strands/catalog.js +241 -0
  72. package/backend/dist/strands/catalog.js.map +1 -0
  73. package/backend/dist/strands/engine.d.ts +131 -0
  74. package/backend/dist/strands/engine.d.ts.map +1 -0
  75. package/backend/dist/strands/engine.js +477 -0
  76. package/backend/dist/strands/engine.js.map +1 -0
  77. package/backend/dist/strands/harness.d.ts +14 -0
  78. package/backend/dist/strands/harness.d.ts.map +1 -0
  79. package/backend/dist/strands/harness.js +41 -0
  80. package/backend/dist/strands/harness.js.map +1 -0
  81. package/backend/dist/strands/model.d.ts +24 -0
  82. package/backend/dist/strands/model.d.ts.map +1 -0
  83. package/backend/dist/strands/model.js +381 -0
  84. package/backend/dist/strands/model.js.map +1 -0
  85. package/backend/dist/strands/runtime.d.ts +4 -0
  86. package/backend/dist/strands/runtime.d.ts.map +1 -0
  87. package/backend/dist/{cordis/work-model.js → strands/runtime.js} +16 -12
  88. package/backend/dist/strands/runtime.js.map +1 -0
  89. package/backend/dist/strands/sandbox.d.ts +24 -0
  90. package/backend/dist/strands/sandbox.d.ts.map +1 -0
  91. package/backend/dist/strands/sandbox.js +156 -0
  92. package/backend/dist/strands/sandbox.js.map +1 -0
  93. package/backend/dist/strands/work-driver.d.ts +11 -0
  94. package/backend/dist/strands/work-driver.d.ts.map +1 -0
  95. package/backend/dist/strands/work-driver.js +443 -0
  96. package/backend/dist/strands/work-driver.js.map +1 -0
  97. package/backend/dist/strands/work-model.d.ts +7 -0
  98. package/backend/dist/strands/work-model.d.ts.map +1 -0
  99. package/backend/dist/strands/work-model.js +42 -0
  100. package/backend/dist/strands/work-model.js.map +1 -0
  101. package/backend/dist/types/work.d.ts +4 -11
  102. package/backend/dist/types/work.d.ts.map +1 -1
  103. package/backend/dist/utils/corsOriginPolicy.d.ts +10 -0
  104. package/backend/dist/utils/corsOriginPolicy.d.ts.map +1 -0
  105. package/backend/dist/utils/corsOriginPolicy.js +70 -0
  106. package/backend/dist/utils/corsOriginPolicy.js.map +1 -0
  107. package/backend/package.json +4 -34
  108. package/frontend/dist/artifact-runtime/.build-fingerprint +1 -1
  109. package/frontend/dist/assets/index-CJHJxwjA.js +68 -0
  110. package/frontend/dist/assets/index-DSHdOZRK.css +1 -0
  111. package/frontend/dist/index.html +30 -30
  112. package/frontend/dist/js/{ArtifactContainer-D4v4l15L.js → ArtifactContainer-BWTN4QSW.js} +1 -1
  113. package/frontend/dist/js/{ArtifactDemoPage-B2uaVpsi.js → ArtifactDemoPage-CCh7lQEw.js} +1 -1
  114. package/frontend/dist/js/{ArtifactSandboxFrame-DlWJHI-r.js → ArtifactSandboxFrame-D1ntMsqe.js} +1 -1
  115. package/frontend/dist/js/{ArtifactSlideOutPanel-laZ98QKB.js → ArtifactSlideOutPanel-zPEBPoMh.js} +1 -1
  116. package/frontend/dist/js/AutomationModal-DN98Eyym.js +1 -0
  117. package/frontend/dist/js/AutomationsPage-3DBwRKME.js +1 -0
  118. package/frontend/dist/js/{AvatarUpload-KaBaTKoG.js → AvatarUpload-D5_wGUb5.js} +1 -1
  119. package/frontend/dist/js/{Button-CGMYia4g.js → Button-CTwi9N3d.js} +1 -1
  120. package/frontend/dist/js/{CalendarPage-Dc7r-86c.js → CalendarPage-CUbGH3Tl.js} +1 -1
  121. package/frontend/dist/js/ChannelsPage-B1hC1rRS.js +1 -0
  122. package/frontend/dist/js/ChatPage-B7mEg5z2.js +14 -0
  123. package/frontend/dist/js/{ConnectModels-aUTD6s9B.js → ConnectModels-Cby89_Mc.js} +1 -1
  124. package/frontend/dist/js/{EvaluationsPage-BB7sPhIR.js → EvaluationsPage-BaND2qQM.js} +2 -2
  125. package/frontend/dist/js/{FirstTimeSetup-elqSi9JH.js → FirstTimeSetup-D8ktLJKO.js} +1 -1
  126. package/frontend/dist/js/GalleryPage-DXQLoU0l.js +1 -0
  127. package/frontend/dist/js/HomePage-WVug1vWc.js +1 -0
  128. package/frontend/dist/js/LanguageSwitcher-DHHTrDBR.js +1 -0
  129. package/frontend/dist/js/{Logo-HZvdAk2c.js → Logo-D1o5k_wt.js} +1 -1
  130. package/frontend/dist/js/{LogoMark-GJnfMXsk.js → LogoMark-lnmc98jv.js} +1 -1
  131. package/frontend/dist/js/{ModelManagerModals-Bk6OQzJI.js → ModelManagerModals-BPALNMDH.js} +1 -1
  132. package/frontend/dist/js/NotesPage-CRzX2Wa8.js +3 -0
  133. package/frontend/dist/js/{PasswordStrengthMeter-DasfJa4P.js → PasswordStrengthMeter-BGrHWG0B.js} +1 -1
  134. package/frontend/dist/js/{PersonasPage-CIJINcQK.js → PersonasPage-BRU9151f.js} +2 -2
  135. package/frontend/dist/js/PluginUsagePage-BlhYZq1l.js +1 -0
  136. package/frontend/dist/js/RichMessageContent-FiuPwDG7.js +1 -0
  137. package/frontend/dist/js/{RichMessageContent-DxCHlUlY.js → RichMessageContent-OGBLO64L.js} +1 -1
  138. package/frontend/dist/js/SettingsModal-sLkxG-lW.js +19 -0
  139. package/frontend/dist/js/{SettingsToggle-oxvw7ulA.js → SettingsToggle-Du2FSUPO.js} +1 -1
  140. package/frontend/dist/js/{ShareDialog-Bhpt_Y1N.js → ShareDialog-DEhxnLfn.js} +1 -1
  141. package/frontend/dist/js/StrandsPage-DWnUKSb0.js +1 -0
  142. package/frontend/dist/js/{SystemPage-BfhVXqar.js → SystemPage-cqq8lSxB.js} +1 -1
  143. package/frontend/dist/js/UserManagementPanel-NZmoTk6V.js +1 -0
  144. package/frontend/dist/js/{WhatsNewModal-Dl69bG2T.js → WhatsNewModal-5SwIdmU1.js} +1 -1
  145. package/frontend/dist/js/WorkPage-BIuaVNEC.js +8 -0
  146. package/frontend/dist/js/api-C2k0OqEk.js +1 -0
  147. package/frontend/dist/js/api-CnJYEbRz.js +14 -0
  148. package/frontend/dist/js/{appNavigation-R8iKverf.js → appNavigation-BXNRwrN-.js} +1 -1
  149. package/frontend/dist/js/appStore-DULGAJnH.js +2 -0
  150. package/frontend/dist/js/appVersion-DooVk4c_.js +1 -0
  151. package/frontend/dist/js/ar-Bp843BgG.js +2 -0
  152. package/frontend/dist/js/authStore-CaLdzyAr.js +1 -0
  153. package/frontend/dist/js/{authStore-D8fc-Hl0.js → authStore-DwaPsICv.js} +3 -3
  154. package/frontend/dist/js/bn-DmSGkklY.js +2 -0
  155. package/frontend/dist/js/chatStore-j8bGpkeT.js +3 -0
  156. package/frontend/dist/js/{client-BeJbHHWx.js → client-DQy1iGRM.js} +2 -2
  157. package/frontend/dist/js/{config-D6Kcp5n3.js → config-BbrsmDn2.js} +1 -1
  158. package/frontend/dist/js/cs-BcauIRyG.js +2 -0
  159. package/frontend/dist/js/da-CJ14DPJ_.js +2 -0
  160. package/frontend/dist/js/de-ajswyAhq.js +2 -0
  161. package/frontend/dist/js/es-rlf8FsMZ.js +2 -0
  162. package/frontend/dist/js/{evaluationsApi-2YwZBPk5.js → evaluationsApi-KVsH7yXe.js} +1 -1
  163. package/frontend/dist/js/fr-BwkM1wie.js +2 -0
  164. package/frontend/dist/js/hi-B3eId9-I.js +2 -0
  165. package/frontend/dist/js/id-BcgPFJh2.js +2 -0
  166. package/frontend/dist/js/is-Crvd3K7f.js +2 -0
  167. package/frontend/dist/js/it-DrLx24hb.js +2 -0
  168. package/frontend/dist/js/ja-DZMcf-oB.js +2 -0
  169. package/frontend/dist/js/ko-Cm0NiOE8.js +2 -0
  170. package/frontend/dist/js/{messageCodeStyles-D4haBw80.js → messageCodeStyles-CDnMKLgo.js} +1 -1
  171. package/frontend/dist/js/ms-ymaG59hx.js +2 -0
  172. package/frontend/dist/js/nl-CdIdeA9d.js +2 -0
  173. package/frontend/dist/js/pl-CuO0b605.js +2 -0
  174. package/frontend/dist/js/pt-Vy413FG5.js +2 -0
  175. package/frontend/dist/js/ru-D0zOEVrL.js +2 -0
  176. package/frontend/dist/js/strandsApi-SeoX_IsY.js +2 -0
  177. package/frontend/dist/js/sv-JoS4krpk.js +2 -0
  178. package/frontend/dist/js/{teamEventStream-omPy51va.js → teamEventStream-CZYdpbVw.js} +1 -1
  179. package/frontend/dist/js/th-afhelaqR.js +2 -0
  180. package/frontend/dist/js/tr-BhSy9UrR.js +2 -0
  181. package/frontend/dist/js/{ui-D5-4niRk.js → ui-CW3gJ4Kl.js} +2 -2
  182. package/frontend/dist/js/ui-vendor-_fvLnmDx.js +1 -0
  183. package/frontend/dist/js/uk-CibXypnZ.js +2 -0
  184. package/frontend/dist/js/{useChat-DnGClJeX.js → useChat-CBySqLqR.js} +4 -4
  185. package/frontend/dist/js/useDialogFocus-DbW0oA9H.js +1 -0
  186. package/frontend/dist/js/useDictation-DEAp64eu.js +1 -0
  187. package/frontend/dist/js/{useTranslation-B9kflK9S.js → useTranslation-UHEMTEHd.js} +1 -1
  188. package/frontend/dist/js/utils-DaXuqmQm.js +1 -0
  189. package/frontend/dist/js/utils-vendor-CvhktdS_.js +1 -0
  190. package/frontend/dist/js/vi-Cg0WKHtb.js +2 -0
  191. package/frontend/dist/js/{work-DmJpVPPO.js → work-CdbmBok5.js} +1 -1
  192. package/frontend/dist/js/{workApi-C5InfT8x.js → workApi-BqkCbCLQ.js} +1 -1
  193. package/frontend/dist/js/workApi-gpxrWwCm.js +1 -0
  194. package/frontend/dist/js/workModels-BM2Zyiba.js +1 -0
  195. package/frontend/dist/js/zh-DTqys9TE.js +2 -0
  196. package/package.json +10 -39
  197. package/backend/dist/cordis/contracts.d.ts +0 -270
  198. package/backend/dist/cordis/contracts.d.ts.map +0 -1
  199. package/backend/dist/cordis/contracts.js +0 -32
  200. package/backend/dist/cordis/contracts.js.map +0 -1
  201. package/backend/dist/cordis/dsh/chat-model.d.ts +0 -16
  202. package/backend/dist/cordis/dsh/chat-model.d.ts.map +0 -1
  203. package/backend/dist/cordis/dsh/chat-model.js +0 -104
  204. package/backend/dist/cordis/dsh/chat-model.js.map +0 -1
  205. package/backend/dist/cordis/dsh/engine-plugin.d.ts +0 -186
  206. package/backend/dist/cordis/dsh/engine-plugin.d.ts.map +0 -1
  207. package/backend/dist/cordis/dsh/engine-plugin.js +0 -1116
  208. package/backend/dist/cordis/dsh/engine-plugin.js.map +0 -1
  209. package/backend/dist/cordis/dsh/librewebui-llm-adapter.d.ts +0 -175
  210. package/backend/dist/cordis/dsh/librewebui-llm-adapter.d.ts.map +0 -1
  211. package/backend/dist/cordis/dsh/librewebui-llm-adapter.js +0 -480
  212. package/backend/dist/cordis/dsh/librewebui-llm-adapter.js.map +0 -1
  213. package/backend/dist/cordis/dsh/model-identity.d.ts +0 -12
  214. package/backend/dist/cordis/dsh/model-identity.d.ts.map +0 -1
  215. package/backend/dist/cordis/dsh/model-identity.js +0 -87
  216. package/backend/dist/cordis/dsh/model-identity.js.map +0 -1
  217. package/backend/dist/cordis/dsh/native-provider-client.d.ts +0 -44
  218. package/backend/dist/cordis/dsh/native-provider-client.d.ts.map +0 -1
  219. package/backend/dist/cordis/dsh/native-provider-client.js +0 -524
  220. package/backend/dist/cordis/dsh/native-provider-client.js.map +0 -1
  221. package/backend/dist/cordis/dsh/native-provider-plugin.d.ts +0 -11
  222. package/backend/dist/cordis/dsh/native-provider-plugin.d.ts.map +0 -1
  223. package/backend/dist/cordis/dsh/native-provider-plugin.js +0 -416
  224. package/backend/dist/cordis/dsh/native-provider-plugin.js.map +0 -1
  225. package/backend/dist/cordis/dsh/native-provider-protocol.d.ts +0 -37
  226. package/backend/dist/cordis/dsh/native-provider-protocol.d.ts.map +0 -1
  227. package/backend/dist/cordis/dsh/native-provider-protocol.js +0 -325
  228. package/backend/dist/cordis/dsh/native-provider-protocol.js.map +0 -1
  229. package/backend/dist/cordis/dsh/provider-handler.d.ts +0 -36
  230. package/backend/dist/cordis/dsh/provider-handler.d.ts.map +0 -1
  231. package/backend/dist/cordis/dsh/provider-handler.js +0 -582
  232. package/backend/dist/cordis/dsh/provider-handler.js.map +0 -1
  233. package/backend/dist/cordis/dsh/session-files.d.ts +0 -9
  234. package/backend/dist/cordis/dsh/session-files.d.ts.map +0 -1
  235. package/backend/dist/cordis/dsh/session-files.js +0 -60
  236. package/backend/dist/cordis/dsh/session-files.js.map +0 -1
  237. package/backend/dist/cordis/dsh/session-settings.d.ts +0 -15
  238. package/backend/dist/cordis/dsh/session-settings.d.ts.map +0 -1
  239. package/backend/dist/cordis/dsh/session-settings.js +0 -51
  240. package/backend/dist/cordis/dsh/session-settings.js.map +0 -1
  241. package/backend/dist/cordis/dsh/work-driver.d.ts +0 -12
  242. package/backend/dist/cordis/dsh/work-driver.d.ts.map +0 -1
  243. package/backend/dist/cordis/dsh/work-driver.js +0 -402
  244. package/backend/dist/cordis/dsh/work-driver.js.map +0 -1
  245. package/backend/dist/cordis/dsh/workspace-policy.d.ts +0 -10
  246. package/backend/dist/cordis/dsh/workspace-policy.d.ts.map +0 -1
  247. package/backend/dist/cordis/dsh/workspace-policy.js +0 -44
  248. package/backend/dist/cordis/dsh/workspace-policy.js.map +0 -1
  249. package/backend/dist/cordis/host/composition.d.ts +0 -73
  250. package/backend/dist/cordis/host/composition.d.ts.map +0 -1
  251. package/backend/dist/cordis/host/composition.js +0 -205
  252. package/backend/dist/cordis/host/composition.js.map +0 -1
  253. package/backend/dist/cordis/host/config.d.ts +0 -159
  254. package/backend/dist/cordis/host/config.d.ts.map +0 -1
  255. package/backend/dist/cordis/host/config.js +0 -184
  256. package/backend/dist/cordis/host/config.js.map +0 -1
  257. package/backend/dist/cordis/host/host.d.ts +0 -74
  258. package/backend/dist/cordis/host/host.d.ts.map +0 -1
  259. package/backend/dist/cordis/host/host.js +0 -420
  260. package/backend/dist/cordis/host/host.js.map +0 -1
  261. package/backend/dist/cordis/host/loader-entry.d.ts +0 -41
  262. package/backend/dist/cordis/host/loader-entry.d.ts.map +0 -1
  263. package/backend/dist/cordis/host/loader-entry.js +0 -52
  264. package/backend/dist/cordis/host/loader-entry.js.map +0 -1
  265. package/backend/dist/cordis/host/model.d.ts +0 -45
  266. package/backend/dist/cordis/host/model.d.ts.map +0 -1
  267. package/backend/dist/cordis/host/model.js +0 -54
  268. package/backend/dist/cordis/host/model.js.map +0 -1
  269. package/backend/dist/cordis/host/privacy.d.ts +0 -8
  270. package/backend/dist/cordis/host/privacy.d.ts.map +0 -1
  271. package/backend/dist/cordis/host/privacy.js +0 -73
  272. package/backend/dist/cordis/host/privacy.js.map +0 -1
  273. package/backend/dist/cordis/index.d.ts +0 -14
  274. package/backend/dist/cordis/index.d.ts.map +0 -1
  275. package/backend/dist/cordis/index.js +0 -30
  276. package/backend/dist/cordis/index.js.map +0 -1
  277. package/backend/dist/cordis/runtime.d.ts +0 -97
  278. package/backend/dist/cordis/runtime.d.ts.map +0 -1
  279. package/backend/dist/cordis/runtime.js +0 -231
  280. package/backend/dist/cordis/runtime.js.map +0 -1
  281. package/backend/dist/cordis/work-model.d.ts +0 -7
  282. package/backend/dist/cordis/work-model.d.ts.map +0 -1
  283. package/backend/dist/cordis/work-model.js.map +0 -1
  284. package/backend/dist/routes/cordis.d.ts.map +0 -1
  285. package/backend/dist/routes/cordis.js +0 -440
  286. package/backend/dist/routes/cordis.js.map +0 -1
  287. package/backend/dist/routes/libreClaw.d.ts +0 -3
  288. package/backend/dist/routes/libreClaw.d.ts.map +0 -1
  289. package/backend/dist/routes/libreClaw.js +0 -200
  290. package/backend/dist/routes/libreClaw.js.map +0 -1
  291. package/backend/dist/services/cordisAccessService.d.ts +0 -56
  292. package/backend/dist/services/cordisAccessService.d.ts.map +0 -1
  293. package/backend/dist/services/cordisAccessService.js +0 -98
  294. package/backend/dist/services/cordisAccessService.js.map +0 -1
  295. package/backend/dist/services/libreClawService.d.ts +0 -105
  296. package/backend/dist/services/libreClawService.d.ts.map +0 -1
  297. package/backend/dist/services/libreClawService.js +0 -169
  298. package/backend/dist/services/libreClawService.js.map +0 -1
  299. package/frontend/dist/assets/index-C8_AByBq.css +0 -1
  300. package/frontend/dist/assets/index-DWLnkKwj.js +0 -16
  301. package/frontend/dist/js/AutomationModal-CjjiEZFA.js +0 -1
  302. package/frontend/dist/js/AutomationsPage-jnWmD58y.js +0 -1
  303. package/frontend/dist/js/ChannelsPage-DHPabX1e.js +0 -1
  304. package/frontend/dist/js/ChatPage-ZvGp-iqV.js +0 -14
  305. package/frontend/dist/js/CordisPage-DZKcpPVj.js +0 -1
  306. package/frontend/dist/js/GalleryPage-CrlNRnkn.js +0 -1
  307. package/frontend/dist/js/HomePage-lR9h7_a1.js +0 -1
  308. package/frontend/dist/js/LanguageSwitcher-CWkbzpxT.js +0 -1
  309. package/frontend/dist/js/LibreClawPage-P19FnNlu.js +0 -1
  310. package/frontend/dist/js/NotesPage-DopG0M4B.js +0 -3
  311. package/frontend/dist/js/PluginUsagePage-Cj0mUxD8.js +0 -1
  312. package/frontend/dist/js/RichMessageContent-BZndQSJU.js +0 -1
  313. package/frontend/dist/js/SettingsModal-wAuFQOE4.js +0 -19
  314. package/frontend/dist/js/UserManagementPanel-BU95ZPOv.js +0 -1
  315. package/frontend/dist/js/WorkPage-CSderbeT.js +0 -8
  316. package/frontend/dist/js/api-CU-JXx2u.js +0 -1
  317. package/frontend/dist/js/api-DPXCtanG.js +0 -14
  318. package/frontend/dist/js/appStore-BD70bvas.js +0 -2
  319. package/frontend/dist/js/appVersion-C7sxqgMd.js +0 -1
  320. package/frontend/dist/js/ar-Cq-DrSYL.js +0 -2
  321. package/frontend/dist/js/authStore-FNKLFUQp.js +0 -1
  322. package/frontend/dist/js/bn-BqxLh-KL.js +0 -2
  323. package/frontend/dist/js/chatStore-CK5ojwft.js +0 -3
  324. package/frontend/dist/js/cordisApi-BS8QMSV4.js +0 -2
  325. package/frontend/dist/js/cs-D2DDNZf-.js +0 -2
  326. package/frontend/dist/js/da-BciY-TSG.js +0 -2
  327. package/frontend/dist/js/de-DjU_eXQ-.js +0 -2
  328. package/frontend/dist/js/es-ChIEs80I.js +0 -2
  329. package/frontend/dist/js/fr-Bi8BGRW4.js +0 -2
  330. package/frontend/dist/js/hi-BMsCnWg7.js +0 -2
  331. package/frontend/dist/js/i18next-DOICz7ZY.js +0 -1
  332. package/frontend/dist/js/id-CpcN1vhk.js +0 -2
  333. package/frontend/dist/js/is-DkUy2cmP.js +0 -2
  334. package/frontend/dist/js/it-BglK9DRZ.js +0 -2
  335. package/frontend/dist/js/ja-IrprzwLJ.js +0 -2
  336. package/frontend/dist/js/ko--wwEsMPi.js +0 -2
  337. package/frontend/dist/js/ms-BWj59y7-.js +0 -2
  338. package/frontend/dist/js/nl-D-QndW_A.js +0 -2
  339. package/frontend/dist/js/pl-Dw7d7iDV.js +0 -2
  340. package/frontend/dist/js/pt-BI53uHJw.js +0 -2
  341. package/frontend/dist/js/ru-JKyTgPg9.js +0 -2
  342. package/frontend/dist/js/sv-BIkBLPSQ.js +0 -2
  343. package/frontend/dist/js/th-CZ_LcCU0.js +0 -2
  344. package/frontend/dist/js/tr-B265byx1.js +0 -2
  345. package/frontend/dist/js/ui-vendor-BhHHyHk3.js +0 -1
  346. package/frontend/dist/js/uk-VTAlChwf.js +0 -2
  347. package/frontend/dist/js/useDialogFocus-BPTG_Zmy.js +0 -1
  348. package/frontend/dist/js/useDictation-D7zVBjDJ.js +0 -1
  349. package/frontend/dist/js/utils-p8Gt72YP.js +0 -1
  350. package/frontend/dist/js/utils-vendor-DISWt2y9.js +0 -1
  351. package/frontend/dist/js/vi-D8rXh-53.js +0 -2
  352. package/frontend/dist/js/workApi-FV75LKJn.js +0 -1
  353. package/frontend/dist/js/workModels-MzU2Ab7l.js +0 -1
  354. package/frontend/dist/js/zh-BEGd9iBD.js +0 -2
  355. package/scripts/prepare-dsh-provider.mjs +0 -124
@@ -1,74 +0,0 @@
1
- import { Context } from '@deepseek-ai/cordis';
2
- import type { CordisHostConfig } from './config.js';
3
- /**
4
- * Loader entry id of the composed engine tree. Stable because operators and
5
- * diagnostics address the tree by this id when they remove or inspect it.
6
- */
7
- export declare const ENGINE_ENTRY_ID = "libre-webui-engine";
8
- /** Loader entry id of the row that mounts the Libre WebUI bridge. */
9
- export declare const BRIDGE_ENTRY_ID = "libre-webui-bridge";
10
- /** File name of the host-composed copy of the operator's composition. */
11
- export declare const COMPOSED_FILENAME = "cordis.composed.yml";
12
- /** One service the host requires the composition to provide. */
13
- export interface RequiredService {
14
- /** Cordis service name as registered on the context. */
15
- readonly name: string;
16
- /** Whether the composition must provide it for the host to report ready. */
17
- readonly required: boolean;
18
- }
19
- /**
20
- * Services the host expects from the DSH composition.
21
- *
22
- * `agents` and `tools` are required for a functioning engine. `sessionPersistence`
23
- * is required only when persistence is enabled, because an in-memory engine is a
24
- * legitimate configuration for tests and ephemeral deployments.
25
- */
26
- export declare function requiredServices(config: CordisHostConfig): RequiredService[];
27
- /** Observability snapshot of the running host. */
28
- export interface CordisHostStatus {
29
- /** Whether the composition is mounted and the root fiber is active. */
30
- readonly started: boolean;
31
- /** Absolute path of the composition document in use. */
32
- readonly configPath: string;
33
- /** Services the composition provides, in requirement order. */
34
- readonly services: readonly {
35
- readonly name: string;
36
- readonly required: boolean;
37
- readonly available: boolean;
38
- }[];
39
- /** Names of required services that the composition did not provide. */
40
- readonly missing: readonly string[];
41
- }
42
- /** A mounted Cordis host. */
43
- export interface CordisHost {
44
- /** Root context of the embedded runtime. */
45
- readonly context: Context;
46
- /** Configuration the host was resolved with. */
47
- readonly config: CordisHostConfig;
48
- /** Snapshot the current state of the host and its services. */
49
- status(): CordisHostStatus;
50
- /**
51
- * Dispose the whole Cordis tree, rolling back every service, listener, and
52
- * effect the composition installed.
53
- */
54
- stop(): Promise<void>;
55
- }
56
- /**
57
- * Install the resolver for the engine's fallback model.
58
- * @param resolve - the resolver, or undefined to clear it.
59
- */
60
- export declare function setEngineDefaultModelResolver(resolve: (() => Promise<string | undefined>) | undefined): void;
61
- /**
62
- * Start the Cordis host and mount the configured DSH composition.
63
- *
64
- * The returned host is live: its services are reachable through
65
- * `host.context.get(name)`. Callers that need the engine contract should read
66
- * the `libreDshEngine` service instead of touching the context directly.
67
- *
68
- * @param config - fully resolved host configuration.
69
- * @returns the started host.
70
- * @throws when the composition document is missing, malformed, or fails to
71
- * mount; a failed start disposes whatever was partially mounted first.
72
- */
73
- export declare function startCordisHost(config: CordisHostConfig): Promise<CordisHost>;
74
- //# sourceMappingURL=host.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../../src/cordis/host/host.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAW9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAepD;;;GAGG;AACH,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAEpD,qEAAqE;AACrE,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAuCpD,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAevD,gEAAgE;AAChE,MAAM,WAAW,eAAe;IAC9B,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,eAAe,EAAE,CAa5E;AAED,kDAAkD;AAClD,MAAM,WAAW,gBAAgB;IAC/B,uEAAuE;IACvE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,wDAAwD;IACxD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,EAAE,SAAS;QAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;QAC3B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;KAC7B,EAAE,CAAC;IACJ,uEAAuE;IACvE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,6BAA6B;AAC7B,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,gDAAgD;IAChD,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,+DAA+D;IAC/D,MAAM,IAAI,gBAAgB,CAAC;IAC3B;;;OAGG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AA2FD;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,CAAC,MAAM,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,GAAG,SAAS,GACvD,IAAI,CAEN;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,UAAU,CAAC,CAsMrB"}
@@ -1,420 +0,0 @@
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
- * The Libre WebUI Cordis host.
19
- *
20
- * This module owns the embedded Cordis runtime: it creates the root context,
21
- * installs the Loader, and mounts a composition document (`cordis.patch.yml`)
22
- * whose rows name the DSH engine plugins. Every service, event listener, and
23
- * route the composition installs is owned by the root fiber, so disposing the
24
- * root rolls all of it back — that single ownership edge is what makes the DSH
25
- * engine removable at runtime instead of merely disabled.
26
- *
27
- * The host deliberately does not import any `@deepseek-ai/dsh-*` module. It
28
- * names those packages only as strings inside the composition document, so the
29
- * DSH dependency stays configurable data rather than a compile-time import
30
- * graph, and an operator can mount a different engine by editing YAML.
31
- *
32
- * @module cordis/host/host
33
- */
34
- import { mkdirSync, writeFileSync } from 'node:fs';
35
- import path from 'node:path';
36
- import { pathToFileURL } from 'node:url';
37
- import { Context } from '@deepseek-ai/cordis';
38
- import Loader from '@deepseek-ai/cordis-plugin-loader';
39
- import Include from '@deepseek-ai/cordis-plugin-include';
40
- import Group from '@deepseek-ai/cordis-plugin-group';
41
- import { createLogger } from '../../utils/logger.js';
42
- import { applyHostDefaults, readCompositionFile, stringifyComposition, } from './composition.js';
43
- import { createLoaderEntry } from './loader-entry.js';
44
- import { assertDshModuleAllowed, enforceDshPrivacy, isDshUploadPackage, } from './privacy.js';
45
- import { isServedByProviderLayer, LIBRE_WEBUI_ROUTE, requiredProviderPackage, } from './model.js';
46
- const logger = createLogger('cordis-host');
47
- /**
48
- * Loader entry id of the composed engine tree. Stable because operators and
49
- * diagnostics address the tree by this id when they remove or inspect it.
50
- */
51
- export const ENGINE_ENTRY_ID = 'libre-webui-engine';
52
- /** Loader entry id of the row that mounts the Libre WebUI bridge. */
53
- export const BRIDGE_ENTRY_ID = 'libre-webui-bridge';
54
- /**
55
- * Row id of the composition's Libre WebUI provider adapter.
56
- *
57
- * Referenced only in the startup diagnostic, so an operator whose composition
58
- * predates the row is told exactly what to add.
59
- */
60
- const MODEL_ADAPTER_ROW_ID = 'libre-webui-llm-adapter';
61
- /**
62
- * Hand the provider capability to the composition's adapter module.
63
- *
64
- * The module is imported through the Loader's own base URL rather than by the
65
- * application, because a module imported by URL and one imported by path are
66
- * separate instances: registering the capability on the application's copy
67
- * would leave the row's copy without it, and the row would register no route.
68
- *
69
- * @param config - host configuration carrying the capability.
70
- */
71
- async function installProviderCapability(config, entries) {
72
- const handler = config.providerHandler;
73
- if (!handler)
74
- return;
75
- const row = entries.find(entry => entry.id === MODEL_ADAPTER_ROW_ID);
76
- if (!row || row.disabled === true)
77
- return;
78
- const specifier = row.name;
79
- assertDshModuleAllowed(specifier);
80
- const url = specifier.startsWith('.')
81
- ? pathToFileURL(specifier).href
82
- : specifier;
83
- const adapter = (await import(url));
84
- adapter.setLibreWebUiProvider?.(handler);
85
- }
86
- /** File name of the host-composed copy of the operator's composition. */
87
- export const COMPOSED_FILENAME = 'cordis.composed.yml';
88
- /**
89
- * Header written above the host-composed document.
90
- *
91
- * The composed file lives in host-owned state and is regenerated on every
92
- * start, so a reader who finds it must be told not to edit it as if it were the
93
- * operator's composition.
94
- */
95
- const COMPOSITION_HEADER = `# Generated by the Libre WebUI Cordis host. Do not edit.
96
- # This is the host's copy of the operator's composition, with host-owned
97
- # defaults merged into the engine bridge row. The authoritative document is
98
- # cordis.patch.yml; edit that instead and restart the host.
99
- `;
100
- /**
101
- * Services the host expects from the DSH composition.
102
- *
103
- * `agents` and `tools` are required for a functioning engine. `sessionPersistence`
104
- * is required only when persistence is enabled, because an in-memory engine is a
105
- * legitimate configuration for tests and ephemeral deployments.
106
- */
107
- export function requiredServices(config) {
108
- return [
109
- { name: 'llm', required: false },
110
- { name: 'systemPrompt', required: true },
111
- { name: 'sessions', required: true },
112
- { name: 'tools', required: true },
113
- { name: 'agents', required: true },
114
- { name: 'sessionProjections', required: true },
115
- {
116
- name: 'sessionPersistence',
117
- required: config.features.persistence,
118
- },
119
- ];
120
- }
121
- /**
122
- * Base URL the composition resolves against.
123
- *
124
- * This is the backend package root, so a row may name a bundled plugin with a
125
- * relative specifier (`./dist/cordis/dsh/engine-plugin.js`) or a package with a
126
- * bare one (`@deepseek-ai/dsh-tools`). Pinning it here rather than deriving it
127
- * per row keeps one documented rule for both cases.
128
- */
129
- const HOST_BASE_URL = new URL('../../../', import.meta.url).href;
130
- /**
131
- * Fail startup when the configured model route has no adapter.
132
- *
133
- * A configured route with no adapter fails every turn with a message about a
134
- * missing adapter, which does not tell an operator that their composition
135
- * predates the row that provides it. Naming the gap at startup is the
136
- * difference between a fixable pointer and a mystery.
137
- *
138
- * Rows register as their dependencies become available, so the tree is given a
139
- * chance to quiesce first: a row merely slower than this check must not be
140
- * reported as absent.
141
- *
142
- * @param context - the mounted tree's root context.
143
- * @param config - the host configuration naming the route.
144
- * @throws when the route has no adapter, naming what to add.
145
- */
146
- async function assertConfiguredRouteAvailable(context, config) {
147
- const route = config.model.provider === 'libre-webui'
148
- ? LIBRE_WEBUI_ROUTE
149
- : config.model.route;
150
- if (route === '')
151
- return;
152
- let routes = [];
153
- for (let attempt = 0; attempt < 20; attempt += 1) {
154
- routes = (context.get('llm')?.listProviders?.() ?? []).map((provider) => provider.id);
155
- if (routes.includes(route))
156
- return;
157
- // Yield so a row still activating can finish before it is called missing.
158
- await new Promise(resolve => setTimeout(resolve, 25));
159
- }
160
- throw new Error(`cordis host: the composition provides no adapter for model route ` +
161
- `"${route}" (available: ${routes.join(', ') || 'none'}). ` +
162
- 'Add the row that serves it — the shipped example mounts ' +
163
- `"${MODEL_ADAPTER_ROW_ID}" for the "libre-webui" route — or point ` +
164
- 'model.route at a route the composition provides.');
165
- }
166
- /**
167
- * Rewrite relative module specifiers to absolute file URLs.
168
- *
169
- * The host writes the composed document into its own runtime directory, and the
170
- * Cordis loader resolves a relative specifier against the document that named
171
- * it. A row writing `./dist/...` therefore resolved under the runtime directory
172
- * instead of the directory the operator wrote it in, and the row silently
173
- * failed to import — which surfaced only as every service it published being
174
- * reported missing. Resolving the names here keeps an operator's relative paths
175
- * meaning what they appear to mean, wherever the composed copy is written.
176
- *
177
- * @param entries - the composed entry list.
178
- * @param documentDirectory - directory of the operator's document.
179
- * @returns entries with relative names replaced by absolute file URLs.
180
- */
181
- function absolutizeEntryNames(entries, documentDirectory) {
182
- return entries.map(entry => {
183
- const name = entry.name;
184
- if (!name.startsWith('./') && !name.startsWith('../'))
185
- return entry;
186
- return {
187
- ...entry,
188
- name: pathToFileURL(path.resolve(documentDirectory, name)).href,
189
- };
190
- });
191
- }
192
- /**
193
- * Resolver for the model the engine should use when its configuration names
194
- * none. Installed by the application, so the host does not import an
195
- * application module and the dependency keeps pointing one way.
196
- */
197
- let engineDefaultModel;
198
- /**
199
- * Install the resolver for the engine's fallback model.
200
- * @param resolve - the resolver, or undefined to clear it.
201
- */
202
- export function setEngineDefaultModelResolver(resolve) {
203
- engineDefaultModel = resolve;
204
- }
205
- /**
206
- * Start the Cordis host and mount the configured DSH composition.
207
- *
208
- * The returned host is live: its services are reachable through
209
- * `host.context.get(name)`. Callers that need the engine contract should read
210
- * the `libreDshEngine` service instead of touching the context directly.
211
- *
212
- * @param config - fully resolved host configuration.
213
- * @returns the started host.
214
- * @throws when the composition document is missing, malformed, or fails to
215
- * mount; a failed start disposes whatever was partially mounted first.
216
- */
217
- export async function startCordisHost(config) {
218
- if (process.env.LIBRE_PLATFORM_MODE?.trim().toLowerCase() === 'team') {
219
- throw new Error('The embedded Cordis engine requires the single-replica solo profile. Use the sandboxed Work integration in team deployments.');
220
- }
221
- const context = new Context();
222
- enforceDshPrivacy(context);
223
- if (config.providerHandler)
224
- context.provide('libreCordisProvider', config.providerHandler);
225
- // Parse the document before creating any runtime state, so a malformed
226
- // composition fails without leaving a partially built context behind.
227
- const entries = readCompositionFile(config.configPath);
228
- if (entries.some(entry => entry.id === BRIDGE_ENTRY_ID) &&
229
- !entries.some(entry => entry.name === '@deepseek-ai/dsh-user-approval')) {
230
- entries.push({
231
- id: 'libre-webui-approval',
232
- name: '@deepseek-ai/dsh-user-approval',
233
- });
234
- }
235
- const entryCount = entries.length;
236
- // The bridge needs the model route and model to pin on the agents it creates;
237
- // an agent with neither produces turns with no assistant response. Those two
238
- // values are host settings, so the host merges them into the row it names.
239
- // A model must be pinned on the bridge row: an agent with no provider/model
240
- // refuses every turn. When the settings document names none, the app's own
241
- // default is used so the engine behaves like the Chat surface.
242
- const defaultModel = config.model.model !== ''
243
- ? config.model.model
244
- : config.providerHandler
245
- ? undefined
246
- : await engineDefaultModel?.().catch(() => undefined);
247
- const composed = absolutizeEntryNames(applyHostDefaults(entries, BRIDGE_ENTRY_ID, {
248
- workspacePath: config.workspacePath,
249
- streaming: config.features.streaming,
250
- // The engine must always name a route, and in the provider-layer mode
251
- // that route is this deployment's own adapter — `route` describes a
252
- // provider package's route and is empty here.
253
- defaultProvider: config.model.provider === 'libre-webui'
254
- ? LIBRE_WEBUI_ROUTE
255
- : config.model.route,
256
- ...(defaultModel ? { defaultModel } : {}),
257
- }).map(entry => {
258
- const rowConfig = entry.config && typeof entry.config === 'object'
259
- ? entry.config
260
- : {};
261
- if (entry.id === BRIDGE_ENTRY_ID)
262
- return {
263
- ...entry,
264
- config: {
265
- ...rowConfig,
266
- workspacePath: config.workspacePath,
267
- streaming: config.features.streaming,
268
- tools: config.features.tools,
269
- sessionStorePath: config.features.persistence &&
270
- entries.some(row => row.name === '@deepseek-ai/dsh-session-persistence-jsonl')
271
- ? config.sessionStorePath
272
- : undefined,
273
- },
274
- };
275
- if (entry.name === '@deepseek-ai/dsh-session-persistence-jsonl')
276
- return {
277
- ...entry,
278
- disabled: !config.features.persistence || entry.disabled === true,
279
- config: { ...rowConfig, root: config.sessionStorePath },
280
- };
281
- return entry;
282
- }), path.dirname(config.configPath));
283
- const composedPath = path.join(config.runtimePath, COMPOSED_FILENAME);
284
- let contextDisposed = false;
285
- const host = {
286
- context,
287
- config,
288
- status: () => describeStatus(context, config, !contextDisposed),
289
- stop: async () => {
290
- if (contextDisposed)
291
- return;
292
- contextDisposed = true;
293
- await stopContext(context);
294
- },
295
- };
296
- try {
297
- // Materialize the composed document before the Loader reads it. The
298
- // directory is host-owned runtime state, recreated on every start so a
299
- // stale composition can never be picked up.
300
- mkdirSync(config.runtimePath, { recursive: true });
301
- writeFileSync(composedPath, `${COMPOSITION_HEADER}${stringifyComposition(composed)}`, 'utf8');
302
- // Hand the provider capability to the exact module the composition names.
303
- // A row is imported by URL while the application imports its own modules by
304
- // path, and those are separate module instances: a registration made on the
305
- // application's copy is invisible to the row's, so the row would register no
306
- // route and every turn would fail with "no adapter".
307
- await installProviderCapability(config, composed);
308
- await context.plugin(Loader, { baseUrl: HOST_BASE_URL });
309
- const loader = context.get('loader');
310
- if (!loader) {
311
- throw new Error('cordis host: the Loader service did not start');
312
- }
313
- // `cordis:group` is how one composition row gives a provider and its
314
- // consumers a shared isolate realm. The DSH bundle patches rely on it, so a
315
- // composition copied from DSH would fail to resolve it without this.
316
- loader.builtins.group = Group;
317
- // `cordis:include` is the tree carrier that turns a `plugins:` list into
318
- // loader entries. The host registers both carriers itself rather than
319
- // requiring every composition to list them.
320
- loader.builtins.include = Include;
321
- await createLoaderEntry(loader, {
322
- id: ENGINE_ENTRY_ID,
323
- name: 'cordis:include',
324
- config: {
325
- // Include reads this file itself and owns writing it back when an
326
- // entry changes. The host writes a composed copy into its own runtime
327
- // directory rather than the operator's file, so host-supplied defaults
328
- // never overwrite a document a human maintains, and Include's own
329
- // write-backs land somewhere disposable.
330
- path: pathToFileURL(composedPath).href,
331
- },
332
- });
333
- await loader.await();
334
- const requiredPackage = requiredProviderPackage(config.model);
335
- if (requiredPackage && !isServedByProviderLayer(config)) {
336
- throw new Error(`cordis host: model provider "${config.model.provider}" needs the ` +
337
- `"${requiredPackage}" package, which is not a dependency of this ` +
338
- 'backend. Install it and mount its row in the composition, or set ' +
339
- 'model.provider to "libre-webui" to use the providers this ' +
340
- 'deployment already has.');
341
- }
342
- await assertConfiguredRouteAvailable(context, config);
343
- const missing = host
344
- .status()
345
- .missing.filter(name => name !== 'sessionPersistence' || config.features.persistence);
346
- if (missing.length > 0) {
347
- // A service is missing because the row that provides it never activated,
348
- // and the most common cause is that the row failed to import — a wrong
349
- // path, or a package that is not installed. Naming that cause here is the
350
- // difference between "the engine is broken" and "fix this one row".
351
- const inactive = [...loader.entries()]
352
- .filter(entry => entry.fiber === undefined &&
353
- // Disabled uploaders never provide a required engine service.
354
- !isDshUploadPackage(entry.options.name))
355
- .map(entry => entry.options.id)
356
- .filter((id) => typeof id === 'string');
357
- throw new Error(`cordis host: composition "${config.configPath}" did not provide required ` +
358
- `service(s): ${missing.join(', ')}` +
359
- (inactive.length > 0
360
- ? `. Row(s) that did not activate: ${inactive.join(', ')}. ` +
361
- 'A row that failed to import never provides its service; run with ' +
362
- 'LIBRE_CORDIS_TRACE=true for the activation log.'
363
- : '.'));
364
- }
365
- logger.info('Cordis host started', {
366
- configPath: config.configPath,
367
- entries: entryCount,
368
- provider: config.model.provider,
369
- route: config.model.route,
370
- workspace: config.workspacePath,
371
- persistence: config.features.persistence,
372
- });
373
- return host;
374
- }
375
- catch (error) {
376
- // A partially mounted tree still owns live services, timers, and file
377
- // handles. Roll it back before reporting, so a failed start never leaves a
378
- // half-composed engine attached to the process.
379
- contextDisposed = true;
380
- await stopContext(context);
381
- throw error;
382
- }
383
- }
384
- /**
385
- * Dispose a root context, containing failures so teardown always completes.
386
- *
387
- * Cordis already contains per-observer cleanup failures; this wrapper covers
388
- * the case where the root fiber itself rejects, which must not mask the
389
- * original startup error or leave the caller without a teardown result.
390
- * @param context - the root context to dispose.
391
- */
392
- async function stopContext(context) {
393
- try {
394
- await context.fiber.dispose();
395
- logger.info('Cordis host stopped; all engine effects rolled back');
396
- }
397
- catch (error) {
398
- // Teardown is best-effort by contract: a plugin that throws while unloading
399
- // must not prevent the remaining plugins from being disposed.
400
- logger.error('Cordis host teardown reported an error', {
401
- error: error instanceof Error ? error.message : String(error),
402
- });
403
- }
404
- }
405
- /** Build the status snapshot for a host. */
406
- function describeStatus(context, config, started) {
407
- const services = requiredServices(config).map(service => ({
408
- ...service,
409
- available: context.get(service.name) !== undefined,
410
- }));
411
- return {
412
- started,
413
- configPath: config.configPath,
414
- services,
415
- missing: services
416
- .filter(service => service.required && !service.available)
417
- .map(service => service.name),
418
- };
419
- }
420
- //# sourceMappingURL=host.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"host.js","sourceRoot":"","sources":["../../../src/cordis/host/host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,IAAI,MAAM,WAAW,CAAC;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AG,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;KAChC,CAAC;AACJ,CAAC"}
@@ -1,41 +0,0 @@
1
- /**
2
- * Loader entry helpers.
3
- *
4
- * @module cordis/host/loader-entry
5
- */
6
- import type Loader from '@deepseek-ai/cordis-plugin-loader';
7
- /** One loader entry the host wants to create. */
8
- export interface LoaderEntryInput {
9
- /** Stable id, used later to resolve, update, or remove the entry. */
10
- readonly id: string;
11
- /** Module specifier the loader imports. */
12
- readonly name: string;
13
- /** Config passed to the plugin. */
14
- readonly config?: unknown;
15
- }
16
- /**
17
- * Create a loader entry.
18
- *
19
- * The published Loader types declare `create(options: Omit<EntryOptions, 'id'>)`
20
- * while `EntryOptions` requires `id` and the implementation reads it, so the
21
- * declared parameter type contradicts both the documented usage and the code.
22
- * This helper carries the one cast that bridges the discrepancy, so the
23
- * workaround lives in a single documented place rather than at every call site.
24
- * It is also what keeps the host and the model-adapter controller from
25
- * importing each other just to share the cast.
26
- *
27
- * @param loader - the Loader service reached from the host context.
28
- * @param entry - the entry to create, including its stable id.
29
- */
30
- export declare function createLoaderEntry(loader: Loader, entry: LoaderEntryInput): Promise<void>;
31
- /**
32
- * Test whether a loader entry exists.
33
- *
34
- * `Loader.resolve()` throws for an unknown id instead of returning undefined,
35
- * so a plain truthiness check on its result is not a safe existence test.
36
- * @param loader - the Loader service reached from the host context.
37
- * @param id - the entry id to look for.
38
- * @returns true when an entry with that id is mounted.
39
- */
40
- export declare function hasLoaderEntry(loader: Loader, id: string): boolean;
41
- //# sourceMappingURL=loader-entry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loader-entry.d.ts","sourceRoot":"","sources":["../../../src/cordis/host/loader-entry.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,MAAM,mCAAmC,CAAC;AAE5D,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B,qEAAqE;IACrE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,IAAI,CAAC,CAKf;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAMlE"}
@@ -1,52 +0,0 @@
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
- * Create a loader entry.
19
- *
20
- * The published Loader types declare `create(options: Omit<EntryOptions, 'id'>)`
21
- * while `EntryOptions` requires `id` and the implementation reads it, so the
22
- * declared parameter type contradicts both the documented usage and the code.
23
- * This helper carries the one cast that bridges the discrepancy, so the
24
- * workaround lives in a single documented place rather than at every call site.
25
- * It is also what keeps the host and the model-adapter controller from
26
- * importing each other just to share the cast.
27
- *
28
- * @param loader - the Loader service reached from the host context.
29
- * @param entry - the entry to create, including its stable id.
30
- */
31
- export async function createLoaderEntry(loader, entry) {
32
- const create = loader.create.bind(loader);
33
- await create(entry);
34
- }
35
- /**
36
- * Test whether a loader entry exists.
37
- *
38
- * `Loader.resolve()` throws for an unknown id instead of returning undefined,
39
- * so a plain truthiness check on its result is not a safe existence test.
40
- * @param loader - the Loader service reached from the host context.
41
- * @param id - the entry id to look for.
42
- * @returns true when an entry with that id is mounted.
43
- */
44
- export function hasLoaderEntry(loader, id) {
45
- try {
46
- return loader.resolve(id) !== undefined;
47
- }
48
- catch {
49
- return false;
50
- }
51
- }
52
- //# sourceMappingURL=loader-entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loader-entry.js","sourceRoot":"","sources":["../../../src/cordis/host/loader-entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAoBH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,MAAc,EACd,KAAuB;IAEvB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAEnB,CAAC;IACtB,MAAM,MAAM,CAAC,KAAK,CAAC,CAAC;AACtB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,EAAU;IACvD,IAAI,CAAC;QACH,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,SAAS,CAAC;IAC1C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -1,45 +0,0 @@
1
- /**
2
- * Model-provider selection for the embedded engine.
3
- *
4
- * The engine reaches models through the provider layer this deployment already
5
- * has: the composition mounts an adapter row that registers the `libre-webui`
6
- * route, and the host asks that route's provider for calls. Nothing else needs
7
- * mounting, which is why there is no adapter controller here any more —
8
- * swapping providers is a matter of what the provider layer serves, not of
9
- * reloading a provider package.
10
- *
11
- * A provider package can still be mounted directly by naming it in the
12
- * composition. That is the composition's business, not the host's.
13
- *
14
- * @module cordis/host/model
15
- */
16
- import type { CordisHostConfig, ModelAdapterConfig } from './config.js';
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 declare const LIBRE_WEBUI_ROUTE = "libre-webui";
25
- /**
26
- * Describe a model configuration the host cannot serve itself.
27
- *
28
- * The provider packages are not dependencies of this backend: carrying every
29
- * provider SDK pulled in a large tree, including deprecated packages for
30
- * capabilities the engine never reaches. A deployment that wants one installs
31
- * it and mounts it through the composition, so the fix belongs in the message
32
- * rather than in a hard dependency.
33
- *
34
- * @param config - the resolved adapter configuration.
35
- * @returns the package that must be installed, or undefined when nothing is
36
- * required beyond the provider layer.
37
- */
38
- export declare function requiredProviderPackage(config: ModelAdapterConfig): string | undefined;
39
- /**
40
- * Whether a configuration is served without an extra provider package.
41
- * @param config - the resolved host configuration.
42
- * @returns true when the host can serve the configured route as it stands.
43
- */
44
- export declare function isServedByProviderLayer(config: CordisHostConfig): boolean;
45
- //# sourceMappingURL=model.d.ts.map