@undefineds.co/xpod 0.4.12 → 0.4.14

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 (272) hide show
  1. package/config/components-ignore.json +11 -7
  2. package/dist/acceptance/QleverSemanticConformance.js +7 -0
  3. package/dist/api/ai-gateway/providers/OfferingAuthorization.d.ts +6 -1
  4. package/dist/api/ai-gateway/providers/OfferingAuthorization.js +0 -3
  5. package/dist/api/ai-gateway/providers/ProviderRegistry.js +1 -1
  6. package/dist/api/container/index.js +1 -0
  7. package/dist/api/container/local.js +30 -12
  8. package/dist/api/container/routes.js +2 -0
  9. package/dist/api/container/types.d.ts +2 -0
  10. package/dist/api/handlers/AdminHandler.d.ts +17 -1
  11. package/dist/api/handlers/AdminHandler.js +40 -3
  12. package/dist/api/handlers/EdgeNodeSignalHandler.js +10 -2
  13. package/dist/api/handlers/NetworkSettingsHandler.d.ts +37 -5
  14. package/dist/api/handlers/NetworkSettingsHandler.js +39 -11
  15. package/dist/api/handlers/ProvisionHandler.d.ts +6 -1
  16. package/dist/api/handlers/ProvisionHandler.js +7 -2
  17. package/dist/api/handlers/ReachabilityHandler.d.ts +6 -0
  18. package/dist/api/handlers/ReachabilityHandler.js +22 -5
  19. package/dist/api/network/NetworkEnvironmentConfigurationStore.d.ts +6 -1
  20. package/dist/api/network/NetworkEnvironmentConfigurationStore.js +72 -16
  21. package/dist/api/runtime.d.ts +9 -0
  22. package/dist/api/runtime.js +15 -2
  23. package/dist/cli/commands/start.d.ts +19 -1
  24. package/dist/cli/commands/start.js +71 -5
  25. package/dist/components/context.jsonld +30 -0
  26. package/dist/edge/EdgeNodeAgent.d.ts +6 -0
  27. package/dist/edge/EdgeNodeAgent.js +1 -1
  28. package/dist/edge/EdgeNodeAgentInitializer.d.ts +2 -0
  29. package/dist/edge/EdgeNodeAgentInitializer.js +1 -0
  30. package/dist/edge/EdgeNodeAgentInitializer.jsonld +19 -0
  31. package/dist/edge/EdgeNodeDnsCoordinator.d.ts +11 -1
  32. package/dist/edge/EdgeNodeDnsCoordinator.js +12 -2
  33. package/dist/edge/EdgeNodeHealthProbeService.d.ts +15 -0
  34. package/dist/edge/EdgeNodeHealthProbeService.js +44 -12
  35. package/dist/edge/EdgeNodeHealthProbeService.jsonld +77 -0
  36. package/dist/edge/ProbeTargetGuard.d.ts +35 -0
  37. package/dist/edge/ProbeTargetGuard.js +142 -0
  38. package/dist/edge/reachability/NodeAccessResolver.d.ts +16 -0
  39. package/dist/edge/reachability/NodeAccessResolver.js +30 -0
  40. package/dist/index.d.ts +3 -1
  41. package/dist/index.js +9 -3
  42. package/dist/main.js +7 -0
  43. package/dist/runtime/Proxy.d.ts +22 -0
  44. package/dist/runtime/Proxy.js +34 -7
  45. package/dist/runtime/bootstrap.d.ts +11 -0
  46. package/dist/runtime/bootstrap.js +21 -1
  47. package/dist/runtime/css-process.d.ts +1 -0
  48. package/dist/runtime/css-process.js +1 -0
  49. package/dist/runtime/host/node/NodeRuntimeHost.js +4 -1
  50. package/dist/runtime/host/types.d.ts +6 -0
  51. package/dist/runtime/index.d.ts +1 -1
  52. package/dist/runtime/index.js +5 -1
  53. package/dist/runtime/lifecycle.js +1 -0
  54. package/dist/runtime/port-finder.d.ts +30 -0
  55. package/dist/runtime/port-finder.js +83 -0
  56. package/dist/runtime/runner/node/NodeGatewayRuntimeRunner.js +1 -0
  57. package/dist/runtime/runner/types.d.ts +5 -0
  58. package/dist/runtime/runtime-types.d.ts +1 -0
  59. package/dist/storage/rdf/PostgresRdfEngine.js +10 -4
  60. package/dist/storage/rdf/RdfAccessScope.js +15 -1
  61. package/dist/storage/rdf/RdfEngineRdfJsSource.js +10 -2
  62. package/dist/test-utils/local-managed-client-p2p-e2e-smoke.js +1 -1
  63. package/dist/tunnel/LocalTunnelProvider.d.ts +15 -0
  64. package/dist/tunnel/LocalTunnelProvider.js +87 -18
  65. package/dist/tunnel/LocalTunnelProvider.jsonld +27 -0
  66. package/dist/tunnel/NgrokTunnelProvider.d.ts +4 -0
  67. package/dist/tunnel/NgrokTunnelProvider.js +117 -43
  68. package/dist/tunnel/NgrokTunnelProvider.jsonld +4 -0
  69. package/dist/tunnel/SakuraFrpTunnelProvider.d.ts +65 -3
  70. package/dist/tunnel/SakuraFrpTunnelProvider.js +268 -25
  71. package/dist/tunnel/TunnelLifecycle.d.ts +14 -0
  72. package/dist/tunnel/TunnelLifecycle.js +34 -0
  73. package/dist/tunnel/TunnelProfiles.d.ts +33 -3
  74. package/dist/tunnel/TunnelProfiles.js +105 -78
  75. package/dist/tunnel/TunnelProvider.d.ts +15 -2
  76. package/dist/tunnel/TunnelProvider.jsonld +8 -0
  77. package/dist/tunnel/TunnelProviderCatalog.d.ts +62 -0
  78. package/dist/tunnel/TunnelProviderCatalog.js +130 -0
  79. package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.d.ts +1 -1
  80. package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.js +1 -1
  81. package/node_modules/@undefineds.co/ai-connections/dist/AiAuthorizationActions.d.ts +1 -1
  82. package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.d.ts +1 -1
  83. package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.js +3 -3
  84. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectDialog.d.ts +1 -1
  85. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.d.ts +1 -1
  86. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.js +2 -2
  87. package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialPoolSection.d.ts +1 -1
  88. package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialRow.d.ts +1 -1
  89. package/node_modules/@undefineds.co/ai-connections/dist/AiCustomProviderDialog.d.ts +1 -1
  90. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeyRow.d.ts +1 -1
  91. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.d.ts +1 -1
  92. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayModelsSection.d.ts +1 -1
  93. package/node_modules/@undefineds.co/ai-connections/dist/AiOfferingDetails.d.ts +1 -1
  94. package/node_modules/@undefineds.co/ai-connections/dist/AiProviderCard.d.ts +1 -1
  95. package/node_modules/@undefineds.co/ai-connections/dist/AiQuotaCard.d.ts +1 -1
  96. package/node_modules/@undefineds.co/ai-connections/dist/AiSortableCredentialList.d.ts +1 -1
  97. package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.d.ts +13 -11
  98. package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.js +16 -13
  99. package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.d.ts +1 -1
  100. package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.js +3 -3
  101. package/node_modules/@undefineds.co/ai-connections/dist/collections.d.ts +1 -1
  102. package/node_modules/@undefineds.co/ai-connections/dist/collections.js +3 -3
  103. package/node_modules/@undefineds.co/ai-connections/dist/{ai-connections-client.d.ts → contract/ai-connections-client.d.ts} +4 -2
  104. package/node_modules/@undefineds.co/ai-connections/dist/{ai-connections-client.js → contract/ai-connections-client.js} +4 -2
  105. package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/normalize.d.ts +17 -7
  106. package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/normalize.js +18 -213
  107. package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/request.js +3 -3
  108. package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/types.d.ts +11 -2
  109. package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/index.cjs +8 -8
  110. package/node_modules/@undefineds.co/ai-connections/dist/contract/index.d.ts +9 -0
  111. package/node_modules/@undefineds.co/ai-connections/dist/contract/index.js +9 -0
  112. package/node_modules/@undefineds.co/ai-connections/dist/{provider-catalog.cjs → contract/provider-catalog.cjs} +5 -28
  113. package/node_modules/@undefineds.co/ai-connections/dist/{provider-catalog.d.ts → contract/provider-catalog.d.ts} +9 -8
  114. package/node_modules/@undefineds.co/ai-connections/dist/{provider-catalog.js → contract/provider-catalog.js} +11 -31
  115. package/node_modules/@undefineds.co/ai-connections/dist/controller.d.ts +1 -1
  116. package/node_modules/@undefineds.co/ai-connections/dist/controller.js +3 -2
  117. package/node_modules/@undefineds.co/ai-connections/dist/credential-labels.d.ts +1 -1
  118. package/node_modules/@undefineds.co/ai-connections/dist/display-wording.d.ts +20 -0
  119. package/node_modules/@undefineds.co/ai-connections/dist/display-wording.js +73 -0
  120. package/node_modules/@undefineds.co/ai-connections/dist/error-wording.d.ts +24 -0
  121. package/node_modules/@undefineds.co/ai-connections/dist/error-wording.js +253 -0
  122. package/node_modules/@undefineds.co/ai-connections/dist/gateway-endpoints.js +1 -1
  123. package/node_modules/@undefineds.co/ai-connections/dist/index.d.ts +2 -3
  124. package/node_modules/@undefineds.co/ai-connections/dist/index.js +2 -3
  125. package/node_modules/@undefineds.co/ai-connections/dist/offering-endpoints.d.ts +1 -1
  126. package/node_modules/@undefineds.co/ai-connections/dist/offering-label.d.ts +1 -1
  127. package/node_modules/@undefineds.co/ai-connections/dist/provider-visuals.d.ts +1 -1
  128. package/node_modules/@undefineds.co/ai-connections/dist/service-access.js +1 -1
  129. package/node_modules/@undefineds.co/ai-connections/dist/useAiConnectDialog.d.ts +1 -1
  130. package/node_modules/@undefineds.co/ai-connections/package.json +25 -18
  131. package/node_modules/@undefineds.co/shared-ui/dist/index.d.ts +4 -2
  132. package/node_modules/@undefineds.co/shared-ui/dist/index.js +4 -2
  133. package/node_modules/@undefineds.co/shared-ui/dist/login/LoginModal.d.ts +4 -1
  134. package/node_modules/@undefineds.co/shared-ui/dist/login/LoginModal.js +12 -6
  135. package/node_modules/@undefineds.co/shared-ui/dist/login/LoginView.d.ts +1 -1
  136. package/node_modules/@undefineds.co/shared-ui/dist/login/host-types.d.ts +7 -1
  137. package/node_modules/@undefineds.co/shared-ui/dist/login/login-branding.d.ts +6 -0
  138. package/node_modules/@undefineds.co/shared-ui/dist/login/login-branding.js +18 -0
  139. package/node_modules/@undefineds.co/shared-ui/dist/user-facing-errors.d.ts +14 -2
  140. package/node_modules/@undefineds.co/shared-ui/dist/user-facing-errors.js +26 -17
  141. package/node_modules/@undefineds.co/solid-sdk/dist/login-store.d.ts +3 -3
  142. package/node_modules/@undefineds.co/solid-sdk/dist/login-store.js +3 -3
  143. package/package.json +4 -3
  144. package/static/auth-callback/assets/{AiConfigContext-DnQs1ZpW.js → AiConfigContext-DCXpjzpj.js} +1 -1
  145. package/static/auth-callback/assets/{AiConfigPage-DOtvlxH0.js → AiConfigPage-fe-xMIXa.js} +1 -1
  146. package/static/auth-callback/assets/{DocumentProcessingPanel-BS2voQgL.js → DocumentProcessingPanel-BGnkfMuU.js} +1 -1
  147. package/static/auth-callback/assets/{IndexLifecyclePanel-Cvt0cJtN.js → IndexLifecyclePanel-42Jups0j.js} +1 -1
  148. package/static/auth-callback/assets/{IndexSubjectPanel-Dhf01GqF.js → IndexSubjectPanel-CYyLOlQU.js} +1 -1
  149. package/static/auth-callback/assets/{ModelAssignmentsPanel-BJutWaAF.js → ModelAssignmentsPanel-BOvUH4yr.js} +1 -1
  150. package/static/auth-callback/assets/{ModelsPage-BRS0sje3.js → ModelsPage-DwyITxt7.js} +6 -6
  151. package/static/auth-callback/assets/NetworkPage-CG9RelJA.js +2 -0
  152. package/static/auth-callback/assets/{PaneListHeader-QQeJGTp4.js → PaneListHeader-yvd5ohs6.js} +1 -1
  153. package/static/auth-callback/assets/{SearchIndexingPanel-MyNUSEwT.js → SearchIndexingPanel-2_a6ezzj.js} +1 -1
  154. package/static/auth-callback/assets/{StatusSubjectPanel-DQkEVsFs.js → StatusSubjectPanel-8qtVxnzC.js} +1 -1
  155. package/static/auth-callback/assets/{StatusWorkspace-Dkv63Uwk.js → StatusWorkspace-CBdRahCF.js} +1 -1
  156. package/static/auth-callback/assets/{SystemSettingsPage-TIsUfX5d.js → SystemSettingsPage-BZJ6vWkg.js} +1 -1
  157. package/static/auth-callback/assets/{SystemSettingsSubjectPanel-BJWEt2-7.js → SystemSettingsSubjectPanel-xm08UhXP.js} +1 -1
  158. package/static/auth-callback/assets/XpodAiConnectionsPodStore-V6vgGfuw.js +3 -0
  159. package/static/auth-callback/assets/{activity-5hNeNKnL.js → activity-CeM7xly8.js} +1 -1
  160. package/static/auth-callback/assets/ai-connections-C6yaE6WQ.js +1 -0
  161. package/static/auth-callback/assets/{auth-callback-CAFZ3R0B.js → auth-callback-DTG8cSj7.js} +3 -3
  162. package/static/auth-callback/assets/{badge-CAIPI0CB.js → badge-qJo2Zr4d.js} +1 -1
  163. package/static/auth-callback/assets/{collection-runtime-D9s7h9YA.js → collection-runtime-Bztsz31a.js} +1 -1
  164. package/static/auth-callback/assets/{dialog-BjA109aX.js → dialog-D-h6x5x0.js} +1 -1
  165. package/static/auth-callback/assets/{download-B3Up5W2G.js → download-C2ir4lmR.js} +1 -1
  166. package/static/auth-callback/assets/{external-link-BTXgSPzB.js → external-link-THLDL4On.js} +1 -1
  167. package/static/auth-callback/assets/{index-CirW4CJf.js → index-BRpv4yO3.js} +1 -1
  168. package/static/auth-callback/assets/{index-BppXlxcp.js → index-BlVZb9A7.js} +1 -1
  169. package/static/auth-callback/assets/index-D983R1FV.js +4 -0
  170. package/static/auth-callback/assets/{index-browser-DtU38ni3.js → index-browser-3FvR0aaf.js} +1 -1
  171. package/static/auth-callback/assets/{key-round-CQCOrZ7x.js → key-round-C9U5j1Ly.js} +1 -1
  172. package/static/auth-callback/assets/{rotate-ccw-C1zM2KtS.js → rotate-ccw-DP45cD4o.js} +1 -1
  173. package/static/auth-callback/assets/{skeleton-Cqp7_M9-.js → skeleton-Dn4EiSCS.js} +1 -1
  174. package/static/auth-callback/assets/{waypoints-Bj6gAUSQ.js → waypoints-uqFQ3uEG.js} +1 -1
  175. package/static/auth-callback/assets/{workspace-layout-DK8mDzrY.js → workspace-layout-DLYK0Wwu.js} +1 -1
  176. package/static/auth-callback/auth-callback.html +1 -1
  177. package/static/dashboard/assets/{AiConfigContext-BsE7MqX8.js → AiConfigContext-DJcMECNw.js} +1 -1
  178. package/static/dashboard/assets/{AiConfigPage-DvM-lRXa.js → AiConfigPage-BvE7dOTy.js} +1 -1
  179. package/static/dashboard/assets/{DocumentProcessingPanel-BPfdlfuf.js → DocumentProcessingPanel-D9780krf.js} +1 -1
  180. package/static/dashboard/assets/{IndexLifecyclePanel--m0AGxvh.js → IndexLifecyclePanel-SjsUcnbM.js} +1 -1
  181. package/static/dashboard/assets/{IndexSubjectPanel-Bb7m1k3d.js → IndexSubjectPanel-C-ym2Tqi.js} +1 -1
  182. package/static/dashboard/assets/{ModelAssignmentsPanel-BLi_zbMa.js → ModelAssignmentsPanel-BRjZ-arB.js} +1 -1
  183. package/static/dashboard/assets/{ModelsPage-CxdpgnfR.js → ModelsPage-BtTU6du3.js} +6 -6
  184. package/static/dashboard/assets/NetworkPage-CV9qpkDg.js +2 -0
  185. package/static/dashboard/assets/{PaneListHeader-BBCMei0r.js → PaneListHeader-KyPTTBsv.js} +1 -1
  186. package/static/dashboard/assets/{SearchIndexingPanel-Ck4Y-xjR.js → SearchIndexingPanel-DolHGawg.js} +1 -1
  187. package/static/dashboard/assets/{StatusSubjectPanel-D1KWfAXE.js → StatusSubjectPanel-_YZvKiYi.js} +1 -1
  188. package/static/dashboard/assets/{StatusWorkspace-JbA5gzXx.js → StatusWorkspace-Dlbh_G40.js} +1 -1
  189. package/static/dashboard/assets/{SystemSettingsPage-BbwQWsSR.js → SystemSettingsPage-Be7QSIoz.js} +1 -1
  190. package/static/dashboard/assets/{SystemSettingsSubjectPanel-N117nMt5.js → SystemSettingsSubjectPanel-DBp0gja7.js} +1 -1
  191. package/static/dashboard/assets/{XpodAiConnectionsPodStore-CdDOb4SV.js → XpodAiConnectionsPodStore-ClpSjzpP.js} +7 -7
  192. package/static/dashboard/assets/{activity-DX1I96o_.js → activity-lsNbTXJu.js} +1 -1
  193. package/static/dashboard/assets/ai-connections-CXp5gd1J.js +1 -0
  194. package/static/dashboard/assets/{badge-k2vhtDqH.js → badge-CVatKjaG.js} +1 -1
  195. package/static/dashboard/assets/{collection-runtime-BFQ8teQJ.js → collection-runtime-Ec4UnY28.js} +1 -1
  196. package/static/dashboard/assets/{dashboard-DWZ-fmCT.js → dashboard-BEzsRsvF.js} +2 -2
  197. package/static/dashboard/assets/{dialog-1CCw-iHT.js → dialog-BuyelQ4V.js} +1 -1
  198. package/static/dashboard/assets/{download-C6-SNY1q.js → download-B4Nf678F.js} +1 -1
  199. package/static/dashboard/assets/{external-link-BgPcZ_j2.js → external-link-PYv9CvKL.js} +1 -1
  200. package/static/dashboard/assets/index-C9XPE-mI.js +4 -0
  201. package/static/dashboard/assets/{index-D7A8U6Pt.js → index-Cx69bTNh.js} +1 -1
  202. package/static/dashboard/assets/{index-6LcIUIYO.js → index-awr7ulur.js} +1 -1
  203. package/static/dashboard/assets/{key-round-BOd7Jo0Q.js → key-round-VsY80U1Z.js} +1 -1
  204. package/static/dashboard/assets/{rotate-ccw-CCgJqsvx.js → rotate-ccw-Cz1K4vE9.js} +1 -1
  205. package/static/dashboard/assets/{skeleton-Bc7abAn5.js → skeleton-BhNv_8tO.js} +1 -1
  206. package/static/dashboard/assets/{waypoints-s-opmJxx.js → waypoints-DYS9XFYV.js} +1 -1
  207. package/static/dashboard/assets/{workspace-layout-DqIQeTBV.js → workspace-layout-OZJAFx5V.js} +1 -1
  208. package/static/dashboard/dashboard.html +1 -1
  209. package/static/settings/assets/{AiConfigContext-BB9KZySa.js → AiConfigContext-B8JS3MXF.js} +1 -1
  210. package/static/settings/assets/{AiConfigPage-DGSXUkLs.js → AiConfigPage-C3Zl8LUl.js} +1 -1
  211. package/static/settings/assets/{DocumentProcessingPanel-Da2Re6Rg.js → DocumentProcessingPanel-DpDZAQvf.js} +1 -1
  212. package/static/settings/assets/{IndexLifecyclePanel-BSZuIzgr.js → IndexLifecyclePanel-Ec1XF88t.js} +1 -1
  213. package/static/settings/assets/{IndexSubjectPanel-CFd0ay-r.js → IndexSubjectPanel-BulT9BmO.js} +1 -1
  214. package/static/settings/assets/{ModelAssignmentsPanel-CSAryvWJ.js → ModelAssignmentsPanel-BcGSmYjb.js} +1 -1
  215. package/static/settings/assets/{ModelsPage-BQwCwLHU.js → ModelsPage-CvTCKy1T.js} +6 -6
  216. package/static/settings/assets/NetworkPage-DQF5u9Bn.js +2 -0
  217. package/static/settings/assets/{PaneListHeader-Bjh3hRdQ.js → PaneListHeader-D40hqcVl.js} +1 -1
  218. package/static/settings/assets/{SearchIndexingPanel-MjKL5QLU.js → SearchIndexingPanel-iCUPOx_0.js} +1 -1
  219. package/static/settings/assets/{StatusSubjectPanel-Bvl6K4mx.js → StatusSubjectPanel-E--ZHSql.js} +1 -1
  220. package/static/settings/assets/{StatusWorkspace-B0NzrP--.js → StatusWorkspace-YjDAx1II.js} +1 -1
  221. package/static/settings/assets/{SystemSettingsPage-D2z6Z4FE.js → SystemSettingsPage-CDdV3mC9.js} +1 -1
  222. package/static/settings/assets/{SystemSettingsSubjectPanel-4sxma4X4.js → SystemSettingsSubjectPanel-Br8WazDq.js} +1 -1
  223. package/static/settings/assets/XpodAiConnectionsPodStore-CLr38P_Z.js +3 -0
  224. package/static/settings/assets/{activity-CgJJGpjx.js → activity-C5DAHHTE.js} +1 -1
  225. package/static/settings/assets/ai-connections-C6yaE6WQ.js +1 -0
  226. package/static/settings/assets/{badge-C4NypVyT.js → badge-D8eIyxKt.js} +1 -1
  227. package/static/settings/assets/{collection-runtime-CTLCDxAi.js → collection-runtime-DLc9zil8.js} +1 -1
  228. package/static/settings/assets/{dialog-Csq0vWUi.js → dialog-CyuR7Va4.js} +1 -1
  229. package/static/settings/assets/{download-DaLJJ-Wp.js → download-c0oxZrCz.js} +1 -1
  230. package/static/settings/assets/{external-link--w_iW5Au.js → external-link-D3Z34fP_.js} +1 -1
  231. package/static/settings/assets/{index-BukHiu4y.js → index-CKGbRFlc.js} +1 -1
  232. package/static/settings/assets/index-CSr3-2Cj.js +4 -0
  233. package/static/settings/assets/{index-COmVnZi2.js → index-ComidxAm.js} +1 -1
  234. package/static/settings/assets/{index-browser-BGpvHwD0.js → index-browser-CAscEbae.js} +1 -1
  235. package/static/settings/assets/{key-round-Bk4YRjBu.js → key-round-DyjLmXuB.js} +1 -1
  236. package/static/settings/assets/{rotate-ccw-TCabbqsr.js → rotate-ccw-679HF_ec.js} +1 -1
  237. package/static/settings/assets/{settings-CJWpdbNC.js → settings-DKknqu4C.js} +3 -3
  238. package/static/settings/assets/{skeleton-JDHYVe7t.js → skeleton-CkopNkPB.js} +1 -1
  239. package/static/settings/assets/{waypoints-DDvEl-MU.js → waypoints-CrqfAftE.js} +1 -1
  240. package/static/settings/assets/{workspace-layout-DV5QU30U.js → workspace-layout-UN6c4qTG.js} +1 -1
  241. package/static/settings/settings.html +1 -1
  242. package/static/auth-callback/assets/NetworkPage-B3qBfANA.js +0 -2
  243. package/static/auth-callback/assets/XpodAiConnectionsPodStore-BJiXm-PF.js +0 -3
  244. package/static/auth-callback/assets/ai-connections-CryuHGKW.js +0 -1
  245. package/static/auth-callback/assets/index-DlLYWOhw.js +0 -4
  246. package/static/dashboard/assets/NetworkPage-BAIPw-D_.js +0 -2
  247. package/static/dashboard/assets/ai-connections-DwCRqOQa.js +0 -1
  248. package/static/dashboard/assets/index-UD6QOE7H.js +0 -4
  249. package/static/settings/assets/NetworkPage-BKymvsQc.js +0 -2
  250. package/static/settings/assets/XpodAiConnectionsPodStore-BkNQ8fZx.js +0 -3
  251. package/static/settings/assets/ai-connections-CryuHGKW.js +0 -1
  252. package/static/settings/assets/index-B0mQa59b.js +0 -4
  253. /package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/request.d.ts +0 -0
  254. /package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/types.js +0 -0
  255. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/base-adapter.d.ts +0 -0
  256. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/base-adapter.js +0 -0
  257. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/codex.d.ts +0 -0
  258. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/codex.js +0 -0
  259. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/index.d.ts +0 -0
  260. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/index.js +0 -0
  261. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/json-env-adapter.d.ts +0 -0
  262. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/json-env-adapter.js +0 -0
  263. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/pi.d.ts +0 -0
  264. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/pi.js +0 -0
  265. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/transaction.d.ts +0 -0
  266. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/transaction.js +0 -0
  267. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/types.d.ts +0 -0
  268. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/types.js +0 -0
  269. /package/node_modules/@undefineds.co/ai-connections/dist/{credential-storage.d.ts → contract/credential-storage.d.ts} +0 -0
  270. /package/node_modules/@undefineds.co/ai-connections/dist/{credential-storage.js → contract/credential-storage.js} +0 -0
  271. /package/node_modules/@undefineds.co/ai-connections/dist/{endpoint-urls.d.ts → contract/endpoint-urls.d.ts} +0 -0
  272. /package/node_modules/@undefineds.co/ai-connections/dist/{endpoint-urls.js → contract/endpoint-urls.js} +0 -0
@@ -60,7 +60,7 @@ var __export = (target, all) => {
60
60
  });
61
61
  };
62
62
 
63
- // src/client-config/index.ts
63
+ // src/contract/client-config/index.ts
64
64
  var exports_client_config = {};
65
65
  __export(exports_client_config, {
66
66
  stripLegacyXpodObject: () => stripLegacyXpodObject,
@@ -85,12 +85,12 @@ __export(exports_client_config, {
85
85
  });
86
86
  module.exports = __toCommonJS(exports_client_config);
87
87
 
88
- // src/client-config/base-adapter.ts
88
+ // src/contract/client-config/base-adapter.ts
89
89
  var crypto2 = __toESM(require("node:crypto"));
90
90
  var fs2 = __toESM(require("node:fs"));
91
91
  var path2 = __toESM(require("node:path"));
92
92
 
93
- // src/client-config/transaction.ts
93
+ // src/contract/client-config/transaction.ts
94
94
  var crypto = __toESM(require("node:crypto"));
95
95
  var fs = __toESM(require("node:fs"));
96
96
  var path = __toESM(require("node:path"));
@@ -269,7 +269,7 @@ class AiClientConfigTransaction {
269
269
  }
270
270
  }
271
271
 
272
- // src/endpoint-urls.ts
272
+ // src/contract/endpoint-urls.ts
273
273
  function normalizeV1Endpoint(endpoint) {
274
274
  const normalized = endpoint.trim().replace(/\/+$/, "");
275
275
  return normalized.endsWith("/v1") ? normalized : `${normalized}/v1`;
@@ -278,7 +278,7 @@ function normalizeMessagesEndpoint(endpoint) {
278
278
  return endpoint.trim().replace(/\/+$/, "").replace(/\/v1$/, "");
279
279
  }
280
280
 
281
- // src/client-config/base-adapter.ts
281
+ // src/contract/client-config/base-adapter.ts
282
282
  class AiClientConfigError extends Error {
283
283
  code;
284
284
  constructor(code, message = code) {
@@ -587,7 +587,7 @@ class BaseAiClientConfigAdapter {
587
587
  return false;
588
588
  }
589
589
  }
590
- // src/client-config/codex.ts
590
+ // src/contract/client-config/codex.ts
591
591
  var fs3 = __toESM(require("node:fs"));
592
592
  var os = __toESM(require("node:os"));
593
593
  var path3 = __toESM(require("node:path"));
@@ -998,7 +998,7 @@ function readCatalogModels(content, label) {
998
998
  }
999
999
  return catalog.models;
1000
1000
  }
1001
- // src/client-config/json-env-adapter.ts
1001
+ // src/contract/client-config/json-env-adapter.ts
1002
1002
  var fs4 = __toESM(require("node:fs"));
1003
1003
  var os2 = __toESM(require("node:os"));
1004
1004
  var path4 = __toESM(require("node:path"));
@@ -1090,7 +1090,7 @@ class CodeBuddyConfigAdapter extends JsonEnvAdapter {
1090
1090
  }));
1091
1091
  }
1092
1092
  }
1093
- // src/client-config/pi.ts
1093
+ // src/contract/client-config/pi.ts
1094
1094
  var fs5 = __toESM(require("node:fs"));
1095
1095
  var os3 = __toESM(require("node:os"));
1096
1096
  var path5 = __toESM(require("node:path"));
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Root entry of the shared core.
3
+ *
4
+ * The client protocol is what most consumers want, and it is the same surface
5
+ * `@undefineds.co/ai-connections/client` publishes. The catalog and the
6
+ * client-configuration adapters stay on their own subpaths because they are
7
+ * larger and only some consumers need them.
8
+ */
9
+ export * from './ai-connections-client';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Root entry of the shared core.
3
+ *
4
+ * The client protocol is what most consumers want, and it is the same surface
5
+ * `@undefineds.co/ai-connections/client` publishes. The catalog and the
6
+ * client-configuration adapters stay on their own subpaths because they are
7
+ * larger and only some consumers need them.
8
+ */
9
+ export * from './ai-connections-client.js';
@@ -36,12 +36,11 @@ var __export = (target, all) => {
36
36
  });
37
37
  };
38
38
 
39
- // src/provider-catalog.ts
39
+ // src/contract/provider-catalog.ts
40
40
  var exports_provider_catalog = {};
41
41
  __export(exports_provider_catalog, {
42
42
  storedOfferingIdFor: () => storedOfferingIdFor,
43
43
  providerOfferings: () => providerOfferings,
44
- providerName: () => providerName,
45
44
  offeringBaseUrl: () => offeringBaseUrl,
46
45
  defaultOfferingFor: () => defaultOfferingFor,
47
46
  customCompatibilityValue: () => customCompatibilityValue,
@@ -55,7 +54,7 @@ __export(exports_provider_catalog, {
55
54
  });
56
55
  module.exports = __toCommonJS(exports_provider_catalog);
57
56
 
58
- // src/client/types.ts
57
+ // src/contract/client/types.ts
59
58
  var AI_CONNECTIONS_PROVIDERS = [
60
59
  "openai",
61
60
  "anthropic",
@@ -67,21 +66,19 @@ var AI_CONNECTIONS_PROVIDERS = [
67
66
  "custom"
68
67
  ];
69
68
 
70
- // src/provider-catalog.ts
69
+ // src/contract/provider-catalog.ts
71
70
  var DEFAULT_PROVIDER_OFFERINGS = [
72
71
  { id: "api-platform", label: "API Platform", kind: "api-platform", lifecycle: "active", authModes: ["apiKey"] }
73
72
  ];
74
73
  var API_KEY_METHOD = {
75
74
  id: "api-key",
76
75
  authMode: "apiKey",
77
- label: "添加 API Key",
78
76
  lifecycle: "active"
79
77
  };
80
78
  var BROWSER_LOGIN_METHOD = {
81
79
  id: "browser-login",
82
80
  authMode: "apiKey",
83
81
  connectMode: "browserAssistedApiKey",
84
- label: "浏览器登录",
85
82
  lifecycle: "active"
86
83
  };
87
84
  var API_KEY_METHODS = [API_KEY_METHOD, BROWSER_LOGIN_METHOD];
@@ -381,8 +378,8 @@ function providerOfferings(provider, openAiSubscriptionImportAvailable = false)
381
378
  lifecycle: "active",
382
379
  authModes: Array.from(new Set([...offering.authModes ?? [], "local"])),
383
380
  authorizationMethods: [
384
- { id: "device-code", authMode: "deviceCode", connectMode: "deviceCodeOAuth", label: "设备码登录", lifecycle: "active" },
385
- { id: "local-session-import", authMode: "local", label: "已有登录态", lifecycle: "active" }
381
+ { id: "device-code", authMode: "deviceCode", connectMode: "deviceCodeOAuth", lifecycle: "active" },
382
+ { id: "local-session-import", authMode: "local", lifecycle: "active" }
386
383
  ]
387
384
  };
388
385
  }
@@ -403,26 +400,6 @@ function customCompatibilityValue(value, offeringId) {
403
400
  return "anthropic";
404
401
  return "openai";
405
402
  }
406
- function providerName(provider) {
407
- switch (provider) {
408
- case "openai":
409
- return "OpenAI";
410
- case "anthropic":
411
- return "Anthropic";
412
- case "kimi":
413
- return "Kimi";
414
- case "bailian":
415
- return "百炼";
416
- case "deepseek":
417
- return "DeepSeek";
418
- case "zhipu":
419
- return "智谱 AI";
420
- case "ollama":
421
- return "Ollama";
422
- case "custom":
423
- return "Custom";
424
- }
425
- }
426
403
  function defaultOfferingFor(provider, authMode) {
427
404
  if (provider === "openai" && (authMode === "local" || authMode === "oauth" || authMode === "deviceCode")) {
428
405
  return "official-subscription";
@@ -3,9 +3,10 @@ export declare const DEFAULT_PROVIDER_OFFERINGS: AiProviderOffering[];
3
3
  /**
4
4
  * How an offering accepts a key: typed into Xpod's own form (this entry) or
5
5
  * minted in the provider's console (the browser-assisted entry below). An
6
- * offering that declares its actions declares this one too - the catalog is the
7
- * single source of the wording, and the server only decides whether the entry is
8
- * usable in a given deployment.
6
+ * offering that declares its actions declares this one too - the catalog names
7
+ * the action by id and the server only decides whether the entry is usable in a
8
+ * given deployment. The wording a user reads is the applet's
9
+ * (`display-wording.ts`), so the same action cannot be named three ways.
9
10
  */
10
11
  export declare const API_KEY_METHOD: AiProviderAuthorizationMethod;
11
12
  /**
@@ -19,10 +20,11 @@ export declare const API_KEY_METHOD: AiProviderAuthorizationMethod;
19
20
  * account console to sign into, Ollama is a local service, and `custom` is
20
21
  * configured inside Xpod rather than at a provider.
21
22
  *
22
- * The label is 浏览器登录 rather than the legacy 「登录」 because it names the
23
- * action the way its siblings do (浏览器登录 / 设备码登录 / 已有登录态); 「登录」
24
- * named the provider instead, which is what let a provider-level string claim a
25
- * capability no offering declared.
23
+ * The id names the action the way its siblings do (browser-login / device-code /
24
+ * local-session-import); the wording follows from the id in the applet, and the
25
+ * legacy 「登录」 was retired because it named the provider rather than the
26
+ * action - which is what let a provider-level string claim a capability no
27
+ * offering declared.
26
28
  */
27
29
  export declare const BROWSER_LOGIN_METHOD: AiProviderAuthorizationMethod;
28
30
  export declare const CUSTOM_DEFAULT_OFFERINGS: AiProviderOffering[];
@@ -42,7 +44,6 @@ export declare function providerOfferings(provider: AiConnectionsProvider, openA
42
44
  */
43
45
  export declare const AI_CONNECTIONS_PROVIDER_DOCUMENT_IDS: readonly string[];
44
46
  export declare function customCompatibilityValue(value: unknown, offeringId?: string): 'openai' | 'anthropic';
45
- export declare function providerName(provider: AiConnectionsProvider): string;
46
47
  export declare function defaultOfferingFor(provider: AiConnectionsProvider, authMode: AiProviderCredentialSummary['authMode']): string;
47
48
  export declare function offeringBaseUrl(provider: AiConnectionsProvider, offeringId?: string): string | undefined;
48
49
  /**
@@ -8,14 +8,14 @@ export const DEFAULT_PROVIDER_OFFERINGS = [
8
8
  /**
9
9
  * How an offering accepts a key: typed into Xpod's own form (this entry) or
10
10
  * minted in the provider's console (the browser-assisted entry below). An
11
- * offering that declares its actions declares this one too - the catalog is the
12
- * single source of the wording, and the server only decides whether the entry is
13
- * usable in a given deployment.
11
+ * offering that declares its actions declares this one too - the catalog names
12
+ * the action by id and the server only decides whether the entry is usable in a
13
+ * given deployment. The wording a user reads is the applet's
14
+ * (`display-wording.ts`), so the same action cannot be named three ways.
14
15
  */
15
16
  export const API_KEY_METHOD = {
16
17
  id: 'api-key',
17
18
  authMode: 'apiKey',
18
- label: '添加 API Key',
19
19
  lifecycle: 'active',
20
20
  };
21
21
  /**
@@ -29,16 +29,16 @@ export const API_KEY_METHOD = {
29
29
  * account console to sign into, Ollama is a local service, and `custom` is
30
30
  * configured inside Xpod rather than at a provider.
31
31
  *
32
- * The label is 浏览器登录 rather than the legacy 「登录」 because it names the
33
- * action the way its siblings do (浏览器登录 / 设备码登录 / 已有登录态); 「登录」
34
- * named the provider instead, which is what let a provider-level string claim a
35
- * capability no offering declared.
32
+ * The id names the action the way its siblings do (browser-login / device-code /
33
+ * local-session-import); the wording follows from the id in the applet, and the
34
+ * legacy 「登录」 was retired because it named the provider rather than the
35
+ * action - which is what let a provider-level string claim a capability no
36
+ * offering declared.
36
37
  */
37
38
  export const BROWSER_LOGIN_METHOD = {
38
39
  id: 'browser-login',
39
40
  authMode: 'apiKey',
40
41
  connectMode: 'browserAssistedApiKey',
41
- label: '浏览器登录',
42
42
  lifecycle: 'active',
43
43
  };
44
44
  /** Both ways a key arrives, for an offering whose provider has a console. */
@@ -351,8 +351,8 @@ export function providerOfferings(provider, openAiSubscriptionImportAvailable =
351
351
  lifecycle: 'active',
352
352
  authModes: Array.from(new Set([...(offering.authModes ?? []), 'local'])),
353
353
  authorizationMethods: [
354
- { id: 'device-code', authMode: 'deviceCode', connectMode: 'deviceCodeOAuth', label: '设备码登录', lifecycle: 'active' },
355
- { id: 'local-session-import', authMode: 'local', label: '已有登录态', lifecycle: 'active' },
354
+ { id: 'device-code', authMode: 'deviceCode', connectMode: 'deviceCodeOAuth', lifecycle: 'active' },
355
+ { id: 'local-session-import', authMode: 'local', lifecycle: 'active' },
356
356
  ],
357
357
  };
358
358
  }
@@ -391,26 +391,6 @@ export function customCompatibilityValue(value, offeringId) {
391
391
  return 'anthropic';
392
392
  return 'openai';
393
393
  }
394
- export function providerName(provider) {
395
- switch (provider) {
396
- case 'openai':
397
- return 'OpenAI';
398
- case 'anthropic':
399
- return 'Anthropic';
400
- case 'kimi':
401
- return 'Kimi';
402
- case 'bailian':
403
- return '百炼';
404
- case 'deepseek':
405
- return 'DeepSeek';
406
- case 'zhipu':
407
- return '智谱 AI';
408
- case 'ollama':
409
- return 'Ollama';
410
- case 'custom':
411
- return 'Custom';
412
- }
413
- }
414
394
  export function defaultOfferingFor(provider, authMode) {
415
395
  if (provider === 'openai' && (authMode === 'local' || authMode === 'oauth' || authMode === 'deviceCode')) {
416
396
  return 'official-subscription';
@@ -1,5 +1,5 @@
1
1
  import type { SolidLiveUpdateState, WebExtensionHost } from '@undefineds.co/extension-sdk/web';
2
- import { type AiConnectionsClient, type AiConnectionsProvider, type AiProviderConnectionSummary, type AiProviderSummary } from './ai-connections-client';
2
+ import { type AiConnectionsClient, type AiConnectionsProvider, type AiProviderConnectionSummary, type AiProviderSummary } from './contract/ai-connections-client';
3
3
  import type { AiClientConfigurationBridge } from './AiClientConfigurationSection';
4
4
  import { type CredentialRow } from './collections';
5
5
  import type { PodCollection } from '@undefineds.co/pod-collections';
@@ -1,5 +1,6 @@
1
1
  import { useSyncExternalStore } from 'react';
2
- import { AI_CONNECTIONS_PROVIDERS, AiConnectionsRequestError, createAiConnectionsClient, normalizeAiConnectionsThrownError, } from './ai-connections-client.js';
2
+ import { AI_CONNECTIONS_PROVIDERS, AiConnectionsRequestError, createAiConnectionsClient, } from './contract/ai-connections-client.js';
3
+ import { aiConnectionsErrorMessage } from './error-wording.js';
3
4
  import { credentialCollectionRuntime, } from './collections.js';
4
5
  /**
5
6
  * Provider pages explain themselves through the header's ⓘ tooltip, so each
@@ -1014,7 +1015,7 @@ function isDefined(value) {
1014
1015
  return value !== undefined;
1015
1016
  }
1016
1017
  function errorMessage(error) {
1017
- return normalizeAiConnectionsThrownError(error);
1018
+ return aiConnectionsErrorMessage(error);
1018
1019
  }
1019
1020
  /** The wrapper carries the OIDC client id; parsing it needs no stored secret. */
1020
1021
  function clientIdFromApiKey(apiKey) {
@@ -1,4 +1,4 @@
1
- import type { AiProviderCredentialSummary } from './ai-connections-client';
1
+ import type { AiProviderCredentialSummary } from './contract/ai-connections-client';
2
2
  /** Highest priority first: a new credential joins the end of the pool. */
3
3
  export declare function nextCredentialPriority(credentials: AiProviderCredentialSummary[]): number;
4
4
  export declare function credentialDisplayLabel(credential: AiProviderCredentialSummary): string;
@@ -0,0 +1,20 @@
1
+ import type { AiConnectionsProvider, AiProviderAuthorizationMethod } from './contract/ai-connections-client';
2
+ /**
3
+ * Wording for one connect entry.
4
+ *
5
+ * A payload that declares its own wording keeps it: the entry's own name is the
6
+ * more specific statement, and it is how a provider the user configured names
7
+ * its entry, and how one offering renames a shared action for its context. The
8
+ * table only fills the gap the shared core deliberately leaves - it names the
9
+ * action by `id` and no longer writes the button.
10
+ */
11
+ export declare function authorizationMethodLabel(method: AiProviderAuthorizationMethod): string | undefined;
12
+ /** Fills in the wording of every entry that has one. */
13
+ export declare function withAuthorizationMethodLabels(methods: readonly AiProviderAuthorizationMethod[]): AiProviderAuthorizationMethod[];
14
+ /**
15
+ * The name this applet shows for a provider. English for the providers whose
16
+ * product name is English, Chinese where the product is known by its Chinese
17
+ * name - a display decision, so it lives with the display layer instead of
18
+ * travelling in every payload.
19
+ */
20
+ export declare function providerDisplayName(provider: AiConnectionsProvider): string;
@@ -0,0 +1,73 @@
1
+ /**
2
+ * The wording this applet shows, in one place.
3
+ *
4
+ * The shared core carries what a provider *is* and how to talk to it - ids,
5
+ * auth modes, connect modes, endpoints - and deliberately carries no user-facing
6
+ * wording. A connect entry's wording is a property of the entry's id, so it
7
+ * belongs here, where it is rendered, rather than in the catalog, in the
8
+ * payload the server sends, and in this applet's own fallback derivation, which
9
+ * is where the same button used to be named three different ways.
10
+ *
11
+ * An id this table does not know keeps whatever wording its payload declared:
12
+ * a provider the user configured themselves can still name its own entry, and an
13
+ * entry that names nothing stays unrendered, which is how "the offering did not
14
+ * ask for this button" has always been expressed.
15
+ *
16
+ * The table lists only the ids the shared core stopped naming - the four connect
17
+ * actions plus the browser authorization-code entry. A declared wording always
18
+ * wins (see `authorizationMethodLabel`); this is the fallback that keeps a
19
+ * payload naming nothing renderable under the action's own name.
20
+ */
21
+ const AUTHORIZATION_METHOD_LABEL_BY_ID = {
22
+ 'api-key': '添加 API Key',
23
+ 'browser-login': '浏览器登录',
24
+ 'browser-oauth': '浏览器登录',
25
+ 'device-code': '设备码登录',
26
+ 'local-session-import': '已有登录态',
27
+ 'local-service': '本地服务',
28
+ };
29
+ /**
30
+ * Wording for one connect entry.
31
+ *
32
+ * A payload that declares its own wording keeps it: the entry's own name is the
33
+ * more specific statement, and it is how a provider the user configured names
34
+ * its entry, and how one offering renames a shared action for its context. The
35
+ * table only fills the gap the shared core deliberately leaves - it names the
36
+ * action by `id` and no longer writes the button.
37
+ */
38
+ export function authorizationMethodLabel(method) {
39
+ return method.label ?? AUTHORIZATION_METHOD_LABEL_BY_ID[method.id];
40
+ }
41
+ /** Fills in the wording of every entry that has one. */
42
+ export function withAuthorizationMethodLabels(methods) {
43
+ return methods.map((method) => {
44
+ const label = authorizationMethodLabel(method);
45
+ return label === method.label ? method : { ...method, label };
46
+ });
47
+ }
48
+ /**
49
+ * The name this applet shows for a provider. English for the providers whose
50
+ * product name is English, Chinese where the product is known by its Chinese
51
+ * name - a display decision, so it lives with the display layer instead of
52
+ * travelling in every payload.
53
+ */
54
+ export function providerDisplayName(provider) {
55
+ switch (provider) {
56
+ case 'openai':
57
+ return 'OpenAI';
58
+ case 'anthropic':
59
+ return 'Anthropic';
60
+ case 'kimi':
61
+ return 'Kimi';
62
+ case 'bailian':
63
+ return '百炼';
64
+ case 'deepseek':
65
+ return 'DeepSeek';
66
+ case 'zhipu':
67
+ return '智谱 AI';
68
+ case 'ollama':
69
+ return 'Ollama';
70
+ case 'custom':
71
+ return 'Custom';
72
+ }
73
+ }
@@ -0,0 +1,24 @@
1
+ import type { AiConnectionsClient, AiConnectionsProvider } from './contract/ai-connections-client';
2
+ /**
3
+ * The sentence to show for anything a request threw.
4
+ *
5
+ * A failed request carries the facts - the wire code, the upstream status, the
6
+ * request's provider and auth mode - so the sentence is chosen from those rather
7
+ * than parsed back out of a message. Anything that is not a request failure (a
8
+ * thrown string, an unexpected `Error`) still goes through the sanitiser, which
9
+ * is what keeps internals off the screen.
10
+ */
11
+ export declare function aiConnectionsErrorMessage(error: unknown): string;
12
+ export declare function aiConnectionsErrorMessageForPayload(payload: unknown, status: number, context?: {
13
+ provider?: AiConnectionsProvider;
14
+ authMode?: 'apiKey' | 'deviceCodeOAuth' | 'local';
15
+ }): string;
16
+ /**
17
+ * The shared client reports a failure by naming its code; the sentence a user
18
+ * reads is the applet's (`error-wording`). This app renders messages straight
19
+ * from the thrown error, so it relabels them once, at its own boundary, instead
20
+ * of letting a code reach the screen or teaching every call site to translate.
21
+ * The error object itself is rethrown unchanged, so callers that inspect it -
22
+ * `instanceof`, `code`, `providerStatus` - keep working.
23
+ */
24
+ export declare function withDisplayableErrors(client: AiConnectionsClient): AiConnectionsClient;