@undefineds.co/xpod 0.4.12 → 0.4.13

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 (207) hide show
  1. package/dist/acceptance/QleverSemanticConformance.js +7 -0
  2. package/dist/api/ai-gateway/providers/OfferingAuthorization.d.ts +6 -1
  3. package/dist/api/ai-gateway/providers/OfferingAuthorization.js +0 -3
  4. package/dist/api/ai-gateway/providers/ProviderRegistry.js +2 -2
  5. package/dist/api/ai-gateway/service-access/AiConnectionsServiceAccess.d.ts +1 -1
  6. package/dist/api/ai-gateway/service-access/AiConnectionsServiceAccess.js +1 -1
  7. package/dist/api/service/AiClientConfigurationService.d.ts +1 -1
  8. package/dist/api/service/AiClientConfigurationService.js +1 -1
  9. package/dist/storage/rdf/PostgresRdfEngine.js +10 -4
  10. package/dist/storage/rdf/RdfAccessScope.js +15 -1
  11. package/dist/storage/rdf/RdfEngineRdfJsSource.js +10 -2
  12. package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.d.ts +1 -1
  13. package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.js +1 -1
  14. package/node_modules/@undefineds.co/ai-connections/dist/AiAuthorizationActions.d.ts +1 -1
  15. package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.d.ts +1 -1
  16. package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.js +3 -3
  17. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectDialog.d.ts +1 -1
  18. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.d.ts +1 -1
  19. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.js +2 -2
  20. package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialPoolSection.d.ts +1 -1
  21. package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialRow.d.ts +1 -1
  22. package/node_modules/@undefineds.co/ai-connections/dist/AiCustomProviderDialog.d.ts +1 -1
  23. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeyRow.d.ts +1 -1
  24. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.d.ts +1 -1
  25. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayModelsSection.d.ts +1 -1
  26. package/node_modules/@undefineds.co/ai-connections/dist/AiOfferingDetails.d.ts +1 -1
  27. package/node_modules/@undefineds.co/ai-connections/dist/AiProviderCard.d.ts +1 -1
  28. package/node_modules/@undefineds.co/ai-connections/dist/AiQuotaCard.d.ts +1 -1
  29. package/node_modules/@undefineds.co/ai-connections/dist/AiSortableCredentialList.d.ts +1 -1
  30. package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.d.ts +13 -11
  31. package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.js +16 -13
  32. package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.d.ts +1 -1
  33. package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.js +3 -3
  34. package/node_modules/@undefineds.co/ai-connections/dist/collections.d.ts +1 -1
  35. package/node_modules/@undefineds.co/ai-connections/dist/collections.js +3 -3
  36. package/node_modules/@undefineds.co/ai-connections/dist/controller.d.ts +1 -1
  37. package/node_modules/@undefineds.co/ai-connections/dist/controller.js +3 -2
  38. package/node_modules/@undefineds.co/ai-connections/dist/credential-labels.d.ts +1 -1
  39. package/node_modules/@undefineds.co/ai-connections/dist/display-wording.d.ts +20 -0
  40. package/node_modules/@undefineds.co/ai-connections/dist/display-wording.js +73 -0
  41. package/node_modules/@undefineds.co/ai-connections/dist/error-wording.d.ts +24 -0
  42. package/node_modules/@undefineds.co/ai-connections/dist/error-wording.js +253 -0
  43. package/node_modules/@undefineds.co/ai-connections/dist/gateway-endpoints.js +1 -1
  44. package/node_modules/@undefineds.co/ai-connections/dist/index.d.ts +2 -3
  45. package/node_modules/@undefineds.co/ai-connections/dist/index.js +2 -3
  46. package/node_modules/@undefineds.co/ai-connections/dist/offering-endpoints.d.ts +1 -1
  47. package/node_modules/@undefineds.co/ai-connections/dist/offering-label.d.ts +1 -1
  48. package/node_modules/@undefineds.co/ai-connections/dist/provider-visuals.d.ts +1 -1
  49. package/node_modules/@undefineds.co/ai-connections/dist/service-access.js +1 -1
  50. package/node_modules/@undefineds.co/ai-connections/dist/useAiConnectDialog.d.ts +1 -1
  51. package/node_modules/@undefineds.co/ai-connections/package.json +1 -24
  52. package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/ai-connections-client.d.ts +5 -3
  53. package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/ai-connections-client.js +5 -3
  54. package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client/normalize.d.ts +17 -7
  55. package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client/normalize.js +18 -213
  56. package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client/request.js +3 -3
  57. package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client/types.d.ts +11 -2
  58. package/node_modules/@undefineds.co/ai-connections-core/dist/index.d.ts +9 -0
  59. package/node_modules/@undefineds.co/ai-connections-core/dist/index.js +9 -0
  60. package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/provider-catalog.cjs +2 -25
  61. package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/provider-catalog.d.ts +9 -8
  62. package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/provider-catalog.js +11 -31
  63. package/node_modules/@undefineds.co/ai-connections-core/package.json +61 -0
  64. package/node_modules/@undefineds.co/shared-ui/dist/index.d.ts +4 -2
  65. package/node_modules/@undefineds.co/shared-ui/dist/index.js +4 -2
  66. package/node_modules/@undefineds.co/shared-ui/dist/login/LoginModal.d.ts +4 -1
  67. package/node_modules/@undefineds.co/shared-ui/dist/login/LoginModal.js +12 -6
  68. package/node_modules/@undefineds.co/shared-ui/dist/login/LoginView.d.ts +1 -1
  69. package/node_modules/@undefineds.co/shared-ui/dist/login/host-types.d.ts +7 -1
  70. package/node_modules/@undefineds.co/shared-ui/dist/login/login-branding.d.ts +6 -0
  71. package/node_modules/@undefineds.co/shared-ui/dist/login/login-branding.js +18 -0
  72. package/node_modules/@undefineds.co/shared-ui/dist/user-facing-errors.d.ts +14 -2
  73. package/node_modules/@undefineds.co/shared-ui/dist/user-facing-errors.js +26 -17
  74. package/node_modules/@undefineds.co/solid-sdk/dist/login-store.d.ts +3 -3
  75. package/node_modules/@undefineds.co/solid-sdk/dist/login-store.js +3 -3
  76. package/package.json +5 -3
  77. package/static/app/assets/main.css +1 -1
  78. package/static/auth-callback/assets/{AiConfigContext-DnQs1ZpW.js → AiConfigContext-DlFyEWy9.js} +1 -1
  79. package/static/auth-callback/assets/{AiConfigPage-DOtvlxH0.js → AiConfigPage-CkYk-SFW.js} +1 -1
  80. package/static/auth-callback/assets/{DocumentProcessingPanel-BS2voQgL.js → DocumentProcessingPanel-CqIr3JqN.js} +1 -1
  81. package/static/auth-callback/assets/{IndexLifecyclePanel-Cvt0cJtN.js → IndexLifecyclePanel-C1GKV3Vx.js} +1 -1
  82. package/static/auth-callback/assets/{IndexSubjectPanel-Dhf01GqF.js → IndexSubjectPanel-ro9lC6XW.js} +1 -1
  83. package/static/auth-callback/assets/{ModelAssignmentsPanel-BJutWaAF.js → ModelAssignmentsPanel-DxNdyKRJ.js} +1 -1
  84. package/static/auth-callback/assets/{ModelsPage-BRS0sje3.js → ModelsPage-BVtWSPBU.js} +6 -6
  85. package/static/auth-callback/assets/{NetworkPage-B3qBfANA.js → NetworkPage-cEvxRMAl.js} +1 -1
  86. package/static/auth-callback/assets/{PaneListHeader-QQeJGTp4.js → PaneListHeader-ByKw8ada.js} +1 -1
  87. package/static/auth-callback/assets/{SearchIndexingPanel-MyNUSEwT.js → SearchIndexingPanel-CulBKcYT.js} +1 -1
  88. package/static/auth-callback/assets/{StatusSubjectPanel-DQkEVsFs.js → StatusSubjectPanel-VOcfrt8o.js} +1 -1
  89. package/static/auth-callback/assets/{StatusWorkspace-Dkv63Uwk.js → StatusWorkspace-Jsz6hAdE.js} +1 -1
  90. package/static/auth-callback/assets/{SystemSettingsPage-TIsUfX5d.js → SystemSettingsPage-BFNvGAle.js} +1 -1
  91. package/static/auth-callback/assets/{SystemSettingsSubjectPanel-BJWEt2-7.js → SystemSettingsSubjectPanel-DFRdrSfK.js} +1 -1
  92. package/static/auth-callback/assets/XpodAiConnectionsPodStore-C6KpvHVg.js +3 -0
  93. package/static/auth-callback/assets/{activity-5hNeNKnL.js → activity-DnTlb9iM.js} +1 -1
  94. package/static/auth-callback/assets/ai-connections-C6yaE6WQ.js +1 -0
  95. package/static/auth-callback/assets/auth-callback-Cx9D_1qj.css +1 -0
  96. package/static/auth-callback/assets/{auth-callback-CAFZ3R0B.js → auth-callback-D2UkK5Xj.js} +3 -3
  97. package/static/auth-callback/assets/{badge-CAIPI0CB.js → badge-D7IJuuTM.js} +1 -1
  98. package/static/auth-callback/assets/{collection-runtime-D9s7h9YA.js → collection-runtime-wT1n4GS2.js} +1 -1
  99. package/static/auth-callback/assets/{dialog-BjA109aX.js → dialog-DickLu5z.js} +1 -1
  100. package/static/auth-callback/assets/{download-B3Up5W2G.js → download-kn8WnRu3.js} +1 -1
  101. package/static/auth-callback/assets/{external-link-BTXgSPzB.js → external-link-B6B8jfSn.js} +1 -1
  102. package/static/auth-callback/assets/{index-DlLYWOhw.js → index-Cu0EguPo.js} +2 -2
  103. package/static/auth-callback/assets/{index-BppXlxcp.js → index-DHF97YLP.js} +1 -1
  104. package/static/auth-callback/assets/{index-CirW4CJf.js → index-Dz83EEHD.js} +1 -1
  105. package/static/auth-callback/assets/{index-browser-DtU38ni3.js → index-browser-CSghinyi.js} +1 -1
  106. package/static/auth-callback/assets/{key-round-CQCOrZ7x.js → key-round-ChkOx3E1.js} +1 -1
  107. package/static/auth-callback/assets/{rotate-ccw-C1zM2KtS.js → rotate-ccw-B3hE-nyd.js} +1 -1
  108. package/static/auth-callback/assets/{skeleton-Cqp7_M9-.js → skeleton-kEqR7tpI.js} +1 -1
  109. package/static/auth-callback/assets/{waypoints-Bj6gAUSQ.js → waypoints-D6Jo-SZa.js} +1 -1
  110. package/static/auth-callback/assets/{workspace-layout-DK8mDzrY.js → workspace-layout-BHwT_cHd.js} +1 -1
  111. package/static/auth-callback/auth-callback.html +2 -2
  112. package/static/dashboard/assets/{AiConfigContext-BsE7MqX8.js → AiConfigContext-BfC3v-x2.js} +1 -1
  113. package/static/dashboard/assets/{AiConfigPage-DvM-lRXa.js → AiConfigPage-QNS3u7Ff.js} +1 -1
  114. package/static/dashboard/assets/{DocumentProcessingPanel-BPfdlfuf.js → DocumentProcessingPanel-Dr4XLeT4.js} +1 -1
  115. package/static/dashboard/assets/{IndexLifecyclePanel--m0AGxvh.js → IndexLifecyclePanel-KtM_gpeO.js} +1 -1
  116. package/static/dashboard/assets/{IndexSubjectPanel-Bb7m1k3d.js → IndexSubjectPanel-DLaiKdLc.js} +1 -1
  117. package/static/dashboard/assets/{ModelAssignmentsPanel-BLi_zbMa.js → ModelAssignmentsPanel-Bk7TvQRq.js} +1 -1
  118. package/static/dashboard/assets/{ModelsPage-CxdpgnfR.js → ModelsPage-Cci3vlos.js} +6 -6
  119. package/static/dashboard/assets/{NetworkPage-BAIPw-D_.js → NetworkPage-Ot4G2dX5.js} +1 -1
  120. package/static/dashboard/assets/{PaneListHeader-BBCMei0r.js → PaneListHeader-qHME_s08.js} +1 -1
  121. package/static/dashboard/assets/{SearchIndexingPanel-Ck4Y-xjR.js → SearchIndexingPanel-HZPKj8H9.js} +1 -1
  122. package/static/dashboard/assets/{StatusSubjectPanel-D1KWfAXE.js → StatusSubjectPanel-ij7IpI8d.js} +1 -1
  123. package/static/dashboard/assets/{StatusWorkspace-JbA5gzXx.js → StatusWorkspace-Cp02JcaN.js} +1 -1
  124. package/static/dashboard/assets/{SystemSettingsPage-BbwQWsSR.js → SystemSettingsPage-BSeuvb8X.js} +1 -1
  125. package/static/dashboard/assets/{SystemSettingsSubjectPanel-N117nMt5.js → SystemSettingsSubjectPanel-CP4_luGS.js} +1 -1
  126. package/static/dashboard/assets/{XpodAiConnectionsPodStore-CdDOb4SV.js → XpodAiConnectionsPodStore-urO6zaHL.js} +7 -7
  127. package/static/dashboard/assets/{activity-DX1I96o_.js → activity-DxjgQNvr.js} +1 -1
  128. package/static/dashboard/assets/ai-connections-CXp5gd1J.js +1 -0
  129. package/static/dashboard/assets/{badge-k2vhtDqH.js → badge-53qCrRbl.js} +1 -1
  130. package/static/dashboard/assets/{collection-runtime-BFQ8teQJ.js → collection-runtime-BPAmHG46.js} +1 -1
  131. package/static/dashboard/assets/{dashboard-DWZ-fmCT.js → dashboard-BcT2ByXw.js} +2 -2
  132. package/static/dashboard/assets/dashboard-Cx9D_1qj.css +1 -0
  133. package/static/dashboard/assets/{dialog-1CCw-iHT.js → dialog-B28YtNhS.js} +1 -1
  134. package/static/dashboard/assets/{download-C6-SNY1q.js → download-DkLNceJ4.js} +1 -1
  135. package/static/dashboard/assets/{external-link-BgPcZ_j2.js → external-link-D3TXnlo3.js} +1 -1
  136. package/static/dashboard/assets/{index-D7A8U6Pt.js → index-CFIenkeK.js} +1 -1
  137. package/static/dashboard/assets/{index-6LcIUIYO.js → index-CIiBu9mr.js} +1 -1
  138. package/static/dashboard/assets/{index-UD6QOE7H.js → index-Gp3cLolR.js} +2 -2
  139. package/static/dashboard/assets/{key-round-BOd7Jo0Q.js → key-round-B5ccp6nx.js} +1 -1
  140. package/static/dashboard/assets/{rotate-ccw-CCgJqsvx.js → rotate-ccw-DUpfkNnk.js} +1 -1
  141. package/static/dashboard/assets/{skeleton-Bc7abAn5.js → skeleton-BRe19fO0.js} +1 -1
  142. package/static/dashboard/assets/{waypoints-s-opmJxx.js → waypoints-BKDMxEvu.js} +1 -1
  143. package/static/dashboard/assets/{workspace-layout-DqIQeTBV.js → workspace-layout-ZTF7C16h.js} +1 -1
  144. package/static/dashboard/dashboard.html +2 -2
  145. package/static/settings/assets/{AiConfigContext-BB9KZySa.js → AiConfigContext-DsyWgu2i.js} +1 -1
  146. package/static/settings/assets/{AiConfigPage-DGSXUkLs.js → AiConfigPage-CSCBckKo.js} +1 -1
  147. package/static/settings/assets/{DocumentProcessingPanel-Da2Re6Rg.js → DocumentProcessingPanel-w9yQDbBe.js} +1 -1
  148. package/static/settings/assets/{IndexLifecyclePanel-BSZuIzgr.js → IndexLifecyclePanel-CUUXI8mP.js} +1 -1
  149. package/static/settings/assets/{IndexSubjectPanel-CFd0ay-r.js → IndexSubjectPanel-BypAU5TJ.js} +1 -1
  150. package/static/settings/assets/{ModelAssignmentsPanel-CSAryvWJ.js → ModelAssignmentsPanel-BetgXw1G.js} +1 -1
  151. package/static/settings/assets/{ModelsPage-BQwCwLHU.js → ModelsPage-DZpTlTZ3.js} +6 -6
  152. package/static/settings/assets/{NetworkPage-BKymvsQc.js → NetworkPage-BVkasFGM.js} +1 -1
  153. package/static/settings/assets/{PaneListHeader-Bjh3hRdQ.js → PaneListHeader-BGOqGec4.js} +1 -1
  154. package/static/settings/assets/{SearchIndexingPanel-MjKL5QLU.js → SearchIndexingPanel-DYAbpZ_9.js} +1 -1
  155. package/static/settings/assets/{StatusSubjectPanel-Bvl6K4mx.js → StatusSubjectPanel-CFgzeQ8Q.js} +1 -1
  156. package/static/settings/assets/{StatusWorkspace-B0NzrP--.js → StatusWorkspace-4Z6g4Jvv.js} +1 -1
  157. package/static/settings/assets/{SystemSettingsPage-D2z6Z4FE.js → SystemSettingsPage-C1tlrgvI.js} +1 -1
  158. package/static/settings/assets/{SystemSettingsSubjectPanel-4sxma4X4.js → SystemSettingsSubjectPanel-CcURI-1L.js} +1 -1
  159. package/static/settings/assets/XpodAiConnectionsPodStore-owBQc5nY.js +3 -0
  160. package/static/settings/assets/{activity-CgJJGpjx.js → activity-CtBc9cNy.js} +1 -1
  161. package/static/settings/assets/ai-connections-C6yaE6WQ.js +1 -0
  162. package/static/settings/assets/{badge-C4NypVyT.js → badge--r-FDIhU.js} +1 -1
  163. package/static/settings/assets/{collection-runtime-CTLCDxAi.js → collection-runtime-CnhPmwAM.js} +1 -1
  164. package/static/settings/assets/{dialog-Csq0vWUi.js → dialog-B7ZRsjN7.js} +1 -1
  165. package/static/settings/assets/{download-DaLJJ-Wp.js → download-DgQ1F8QR.js} +1 -1
  166. package/static/settings/assets/{external-link--w_iW5Au.js → external-link-Bz7NckNO.js} +1 -1
  167. package/static/settings/assets/{index-B0mQa59b.js → index-BdXwm8nh.js} +2 -2
  168. package/static/settings/assets/{index-COmVnZi2.js → index-CkGda_Pg.js} +1 -1
  169. package/static/settings/assets/{index-BukHiu4y.js → index-Vv-8Vslg.js} +1 -1
  170. package/static/settings/assets/{index-browser-BGpvHwD0.js → index-browser-Dq7omlpY.js} +1 -1
  171. package/static/settings/assets/{key-round-Bk4YRjBu.js → key-round-CvuhloKV.js} +1 -1
  172. package/static/settings/assets/{rotate-ccw-TCabbqsr.js → rotate-ccw-DgFKDaz7.js} +1 -1
  173. package/static/settings/assets/{settings-CJWpdbNC.js → settings-BvqY7K96.js} +3 -3
  174. package/static/settings/assets/settings-Cx9D_1qj.css +1 -0
  175. package/static/settings/assets/{skeleton-JDHYVe7t.js → skeleton-D3OeFDF6.js} +1 -1
  176. package/static/settings/assets/{waypoints-DDvEl-MU.js → waypoints-C4WbspTb.js} +1 -1
  177. package/static/settings/assets/{workspace-layout-DV5QU30U.js → workspace-layout-B9H1Tqrk.js} +1 -1
  178. package/static/settings/settings.html +2 -2
  179. package/static/auth-callback/assets/XpodAiConnectionsPodStore-BJiXm-PF.js +0 -3
  180. package/static/auth-callback/assets/ai-connections-CryuHGKW.js +0 -1
  181. package/static/auth-callback/assets/auth-callback-rk080mvG.css +0 -1
  182. package/static/dashboard/assets/ai-connections-DwCRqOQa.js +0 -1
  183. package/static/dashboard/assets/dashboard-rk080mvG.css +0 -1
  184. package/static/settings/assets/XpodAiConnectionsPodStore-BkNQ8fZx.js +0 -3
  185. package/static/settings/assets/ai-connections-CryuHGKW.js +0 -1
  186. package/static/settings/assets/settings-rk080mvG.css +0 -1
  187. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client/request.d.ts +0 -0
  188. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client/types.js +0 -0
  189. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/base-adapter.d.ts +0 -0
  190. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/base-adapter.js +0 -0
  191. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/codex.d.ts +0 -0
  192. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/codex.js +0 -0
  193. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/index.cjs +0 -0
  194. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/index.d.ts +0 -0
  195. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/index.js +0 -0
  196. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/json-env-adapter.d.ts +0 -0
  197. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/json-env-adapter.js +0 -0
  198. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/pi.d.ts +0 -0
  199. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/pi.js +0 -0
  200. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/transaction.d.ts +0 -0
  201. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/transaction.js +0 -0
  202. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/types.d.ts +0 -0
  203. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/client-config/types.js +0 -0
  204. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/credential-storage.d.ts +0 -0
  205. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/credential-storage.js +0 -0
  206. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/endpoint-urls.d.ts +0 -0
  207. /package/node_modules/@undefineds.co/{ai-connections → ai-connections-core}/dist/endpoint-urls.js +0 -0
@@ -8,7 +8,6 @@ import { AI_CONNECTIONS_PROVIDERS } from './types.js';
8
8
  * within this module family. The published surface is the explicit list in
9
9
  * `ai-connections-client.ts`, not this file.
10
10
  */
11
- export const AI_CONNECTIONS_GENERIC_ERROR_MESSAGE = 'AI Connection request failed. Please try again.';
12
11
  /**
13
12
  * Validate and normalize a user supplied upstream proxy URL. Proxy credentials
14
13
  * are intentionally rejected because proxy auth is not stored in the Pod
@@ -49,109 +48,29 @@ export function redactProxyUrl(value) {
49
48
  parsed.hash = '';
50
49
  return parsed.href.replace(/\/$/u, '');
51
50
  }
51
+ /**
52
+ * A failed AI Connection request.
53
+ *
54
+ * It carries the facts a caller needs to decide what to say - the wire code, the
55
+ * upstream status, the payload itself - and a diagnostic message that names the
56
+ * code. The sentence a user reads is the applet's (`error-wording.ts`): a shared
57
+ * client must not pick the wording for whoever happens to render it.
58
+ */
52
59
  export class AiConnectionsRequestError extends Error {
53
- constructor(message, payload) {
54
- super(message);
60
+ constructor(payload, status, context = {}) {
61
+ const code = aiConnectionsErrorCode(payload);
62
+ super(code ? `AI Connection request failed: ${code}` : `AI Connection request failed (HTTP ${status})`);
55
63
  this.name = 'AiConnectionsRequestError';
56
- this.code = errorCodeFromPayload(payload);
64
+ this.code = code;
65
+ this.status = status;
57
66
  this.providerStatus = isRecord(payload) && typeof payload.providerStatus === 'number'
58
67
  ? payload.providerStatus : undefined;
68
+ this.payload = payload;
69
+ this.provider = context.provider;
70
+ this.authMode = context.authMode;
59
71
  }
60
72
  }
61
- export function normalizeAiConnectionsThrownError(error) {
62
- if (error instanceof Error) {
63
- return normalizeAiConnectionsErrorText(error.message);
64
- }
65
- return normalizeAiConnectionsErrorText(String(error));
66
- }
67
- export function normalizeAiConnectionsErrorMessage(payload, status, context = {}) {
68
- const code = errorCodeFromPayload(payload);
69
- if (code === 'provider_models_response_error') {
70
- const message = isRecord(payload) && typeof payload.message === 'string'
71
- ? sanitizeProviderResponseMessage(payload.message)
72
- : undefined;
73
- if (message)
74
- return message;
75
- return '模型列表获取失败。请检查密钥、服务地址或网络后重试。';
76
- }
77
- if (code === 'provider_models_fetch_failed') {
78
- const providerStatus = isRecord(payload) && typeof payload.providerStatus === 'number'
79
- ? payload.providerStatus
80
- : undefined;
81
- const providerMessage = isRecord(payload) && typeof payload.providerMessage === 'string'
82
- ? payload.providerMessage.trim()
83
- : undefined;
84
- return withProviderMessage(modelDiscoveryErrorMessage(providerStatus, context.authMode), providerMessage);
85
- }
86
- const coded = code ? messageForSafeErrorCode(code, context.provider) : undefined;
87
- if (coded)
88
- return coded;
89
- const text = isRecord(payload) && typeof payload.error === 'string'
90
- ? payload.error
91
- : undefined;
92
- if (text) {
93
- const exact = messageForSafeErrorCode(text, context.provider);
94
- if (exact)
95
- return exact;
96
- if (text === 'AI Connection service identity is unavailable') {
97
- return text;
98
- }
99
- if (text === 'Provider credential not found for current identity') {
100
- return '当前身份没有可用的额度凭证。';
101
- }
102
- if (text === 'Provider quota adapter not found' || text === 'Provider quota lookup failed') {
103
- return '该接入方式不支持查询官方额度。';
104
- }
105
- }
106
- if (status === 401)
107
- return 'Please sign in again to continue.';
108
- if (status === 403)
109
- return 'AI Connection permission was denied.';
110
- if (status === 404 && context.provider) {
111
- return `${providerLabel(context.provider)} connection is not configured.`;
112
- }
113
- if (status === 429)
114
- return 'AI Connection is rate limited. Please try again later.';
115
- if (status === 503)
116
- return 'AI Connection service is unavailable.';
117
- return AI_CONNECTIONS_GENERIC_ERROR_MESSAGE;
118
- }
119
- const LOCAL_SESSION_REFRESH_FAILED_MESSAGE = '订阅登录态自动刷新失败,请稍后重试。';
120
- const LOCAL_SESSION_REAUTH_REQUIRED_MESSAGE = '订阅登录态已失效,请在原客户端重新登录后重读,或使用设备码登录。';
121
- const OAUTH_MODEL_AUTH_FAILED_MESSAGE = '订阅登录态不可用,请重读登录态或重新登录后再同步模型。';
122
- const MODEL_DISCOVERY_SAFE_MESSAGES = new Set([
123
- OAUTH_MODEL_AUTH_FAILED_MESSAGE,
124
- LOCAL_SESSION_REFRESH_FAILED_MESSAGE,
125
- LOCAL_SESSION_REAUTH_REQUIRED_MESSAGE,
126
- '密钥不可用。请检查密钥是否填写正确,或换一个密钥后重试。',
127
- '模型服务地址不正确。请检查服务地址后重试。',
128
- '请求太频繁。请稍等一会儿再试。',
129
- '模型服务暂时没有响应。请稍后重试。',
130
- '模型列表获取失败。请检查密钥、服务地址或网络后重试。',
131
- ]);
132
- function normalizeAiConnectionsErrorText(message) {
133
- if (message.startsWith('provider_models_response_error:')) {
134
- return sanitizeProviderResponseMessage(message.slice('provider_models_response_error:'.length))
135
- ?? '模型列表获取失败。请检查密钥、服务地址或网络后重试。';
136
- }
137
- const exact = messageForSafeErrorCode(message);
138
- if (exact)
139
- return exact;
140
- const prefix = message.split(':', 1)[0]?.trim();
141
- const prefixed = prefix ? messageForSafeErrorCode(prefix) : undefined;
142
- if (prefixed)
143
- return prefixed;
144
- if (message === 'AI Connection service identity is unavailable')
145
- return message;
146
- if (MODEL_DISCOVERY_SAFE_MESSAGES.has(message))
147
- return message;
148
- if (isModelDiscoveryMessageWithProviderDetail(message))
149
- return message;
150
- if (message.startsWith('invalid_'))
151
- return 'AI Connection returned an invalid response.';
152
- return AI_CONNECTIONS_GENERIC_ERROR_MESSAGE;
153
- }
154
- function errorCodeFromPayload(payload) {
73
+ export function aiConnectionsErrorCode(payload) {
155
74
  if (!isRecord(payload))
156
75
  return undefined;
157
76
  if (typeof payload.code === 'string')
@@ -163,107 +82,6 @@ function errorCodeFromPayload(payload) {
163
82
  }
164
83
  return undefined;
165
84
  }
166
- function messageForSafeErrorCode(code, provider) {
167
- switch (code.trim().toLowerCase().replace(/-/g, '_')) {
168
- case 'not_configured':
169
- case 'notconfigured':
170
- return provider
171
- ? `${providerLabel(provider)} connection is not configured.`
172
- : 'AI provider connection is not configured.';
173
- case 'unsupported':
174
- return provider
175
- ? `${providerLabel(provider)} does not support this operation.`
176
- : 'This AI Connection operation is not supported.';
177
- case 'service_identity_unavailable':
178
- return 'AI Connection service identity is unavailable';
179
- case 'unauthorized':
180
- return 'Please sign in again to continue.';
181
- case 'forbidden':
182
- case 'permission_denied':
183
- return 'AI Connection permission was denied.';
184
- case 'rate_limited':
185
- return 'AI Connection is rate limited. Please try again later.';
186
- case 'service_unavailable':
187
- return 'AI Connection service is unavailable.';
188
- case 'unsafe_provider_base_url':
189
- return '该服务地址指向 Xpod 不允许访问的网络,请改用公网 HTTPS 地址。';
190
- case 'invalid_proxy_url':
191
- return '代理地址必须是无账号密码的 HTTP 或 HTTPS 地址。';
192
- case 'oauth_refresh_failed':
193
- case 'oauth_refresh_unavailable':
194
- case 'local_session_refresh_failed':
195
- return LOCAL_SESSION_REFRESH_FAILED_MESSAGE;
196
- case 'oauth_session_reauth_required':
197
- case 'oauth_refresh_token_required':
198
- case 'local_session_reauth_required':
199
- case 'local_session_missing_refresh_token':
200
- return LOCAL_SESSION_REAUTH_REQUIRED_MESSAGE;
201
- case 'models_persistence_failed':
202
- return '模型已获取,但保存到 Pod 失败。请重试同步模型。';
203
- case 'quota_credential_not_found':
204
- return '当前身份没有可用的额度凭证。';
205
- case 'credential_secret_unavailable':
206
- return '当前凭证密钥不可用,请重新保存后再查询额度。';
207
- case 'gateway_api_key_plaintext_unavailable':
208
- return 'Pod 中未找到此 API Key 的原文,无法复制配置。请创建新的 Key,更新客户端后再删除旧 Key。';
209
- case 'quota_adapter_not_found':
210
- return '该接入方式不支持查询官方额度。';
211
- default:
212
- return undefined;
213
- }
214
- }
215
- function modelDiscoveryErrorMessage(providerStatus, authMode) {
216
- if (providerStatus === 401 || providerStatus === 403) {
217
- if (authMode === 'deviceCodeOAuth')
218
- return OAUTH_MODEL_AUTH_FAILED_MESSAGE;
219
- return '密钥不可用。请检查密钥是否填写正确,或换一个密钥后重试。';
220
- }
221
- if (providerStatus === 404) {
222
- return '模型服务地址不正确。请检查服务地址后重试。';
223
- }
224
- if (providerStatus === 429) {
225
- return '请求太频繁。请稍等一会儿再试。';
226
- }
227
- if (providerStatus !== undefined && providerStatus >= 500) {
228
- return '模型服务暂时没有响应。请稍后重试。';
229
- }
230
- return '模型列表获取失败。请检查密钥、服务地址或网络后重试。';
231
- }
232
- function withProviderMessage(message, providerMessage) {
233
- const sanitized = providerMessage ? sanitizeProviderResponseMessage(providerMessage) : undefined;
234
- if (!sanitized)
235
- return message;
236
- return `${message} 上游返回:${sanitized}`;
237
- }
238
- function isModelDiscoveryMessageWithProviderDetail(message) {
239
- const marker = ' 上游返回:';
240
- const index = message.indexOf(marker);
241
- if (index <= 0)
242
- return false;
243
- return MODEL_DISCOVERY_SAFE_MESSAGES.has(message.slice(0, index));
244
- }
245
- function sanitizeProviderResponseMessage(value) {
246
- const sanitized = value
247
- .replace(/[\u0000-\u001f\u007f]/gu, ' ')
248
- .replace(/\bBearer\s+[^\s,;]+/giu, 'Bearer [REDACTED]')
249
- .replace(/(?:sk|id)[._-][A-Za-z0-9._-]{8,}/gu, '[REDACTED]')
250
- .replace(/https?:\/\/[^\s]+/giu, '[URL]')
251
- .trim()
252
- .slice(0, 240);
253
- return sanitized || undefined;
254
- }
255
- function providerLabel(provider) {
256
- switch (provider) {
257
- case 'openai': return 'OpenAI';
258
- case 'anthropic': return 'Anthropic';
259
- case 'kimi': return 'Kimi';
260
- case 'bailian': return 'Bailian';
261
- case 'deepseek': return 'DeepSeek';
262
- case 'zhipu': return 'Zhipu';
263
- case 'ollama': return 'Ollama';
264
- case 'custom': return 'Custom';
265
- }
266
- }
267
85
  export async function readJson(response) {
268
86
  const text = await response.text();
269
87
  if (!text)
@@ -535,7 +353,7 @@ function parseAuthorizationMethod(value) {
535
353
  id: value.id,
536
354
  authMode,
537
355
  connectMode,
538
- label: stringValue(value.label) ?? authorizationMethodFallbackLabel(value.id, authMode),
356
+ label: stringValue(value.label),
539
357
  lifecycle,
540
358
  reason: stringValue(value.reason),
541
359
  });
@@ -543,19 +361,6 @@ function parseAuthorizationMethod(value) {
543
361
  function authorizationMethodLifecycleValue(value) {
544
362
  return value === 'active' || value === 'unavailable' ? value : undefined;
545
363
  }
546
- function authorizationMethodFallbackLabel(id, authMode) {
547
- if (id === 'device-code')
548
- return '设备码登录';
549
- if (id === 'local-session-import')
550
- return '已有登录态';
551
- if (id === 'local-service')
552
- return '本地服务';
553
- if (id === 'api-key' || authMode === 'apiKey')
554
- return 'API Key';
555
- if (authMode === 'local')
556
- return '本地服务';
557
- return '浏览器登录';
558
- }
559
364
  function offeringLifecycleValue(value) {
560
365
  return value === 'active' || value === 'legacy' || value === 'unavailable'
561
366
  ? value
@@ -1,4 +1,4 @@
1
- import { AiConnectionsRequestError, assertProvider, compactObject, isDefined, isRecord, normalizeAiConnectionsErrorMessage, parseAuthorizationMethodsSummary, parseConnectAttempt, parseCredential, parseCustomModelList, parseGatewayKeyRecord, parseGatewayModel, parseModelDiscovery, parseProviderCredentialSummary, parseProviderSummaries, readJson, sanitizePublicObject, } from './normalize.js';
1
+ import { AiConnectionsRequestError, assertProvider, compactObject, isDefined, isRecord, parseAuthorizationMethodsSummary, parseConnectAttempt, parseCredential, parseCustomModelList, parseGatewayKeyRecord, parseGatewayModel, parseModelDiscovery, parseProviderCredentialSummary, parseProviderSummaries, readJson, sanitizePublicObject, } from './normalize.js';
2
2
  /**
3
3
  * The HTTP client itself: one factory over the Pod base URL and an authenticated
4
4
  * fetch, with every response normalised by `normalize.ts`.
@@ -25,7 +25,7 @@ export function createAiConnectionsClient({ webId, podBaseUrl, authenticatedFetc
25
25
  });
26
26
  const payload = await readJson(response);
27
27
  if (!response.ok) {
28
- throw new AiConnectionsRequestError(normalizeAiConnectionsErrorMessage(payload, response.status, context), payload);
28
+ throw new AiConnectionsRequestError(payload, response.status, context);
29
29
  }
30
30
  return payload;
31
31
  };
@@ -64,7 +64,7 @@ export function createAiConnectionsClient({ webId, podBaseUrl, authenticatedFetc
64
64
  return [];
65
65
  const payload = await readJson(response);
66
66
  if (!response.ok) {
67
- throw new Error(normalizeAiConnectionsErrorMessage(payload, response.status));
67
+ throw new AiConnectionsRequestError(payload, response.status);
68
68
  }
69
69
  return isRecord(payload) && Array.isArray(payload.data)
70
70
  ? payload.data.map(parseAuthorizationMethodsSummary).filter(isDefined)
@@ -137,12 +137,21 @@ export interface ProviderModelDiscovery {
137
137
  }
138
138
  export type AiProviderAuthorizationMethodId = 'device-code' | 'local-session-import' | 'api-key' | 'local-service'
139
139
  /** Opens the provider console to sign in and mint the key the entry then stores. */
140
- | 'browser-login' | string;
140
+ | 'browser-login'
141
+ /** Starts an authorization-code browser sign-in and waits for the local callback. */
142
+ | 'browser-oauth' | string;
141
143
  export interface AiProviderAuthorizationMethod {
142
144
  id: AiProviderAuthorizationMethodId;
143
145
  authMode: 'oauth' | 'deviceCode' | 'local' | 'apiKey';
144
146
  connectMode?: AiConnectionsMode;
145
- label: string;
147
+ /**
148
+ * The wording the entry is shown under. Optional on purpose: the shared core
149
+ * names the action by `id` and the applet supplies the wording, so a payload
150
+ * carrying none is still a complete contract. A provider the user configured
151
+ * may declare its own wording here, which is what keeps a custom entry from
152
+ * rendering under a built-in name.
153
+ */
154
+ label?: string;
146
155
  lifecycle: 'active' | 'unavailable';
147
156
  reason?: string;
148
157
  }
@@ -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-core/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-core/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';
@@ -41,7 +41,6 @@ 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,
@@ -74,14 +73,12 @@ var DEFAULT_PROVIDER_OFFERINGS = [
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';
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@undefineds.co/ai-connections-core",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js"
14
+ },
15
+ "./client": {
16
+ "types": "./dist/ai-connections-client.d.ts",
17
+ "import": "./dist/ai-connections-client.js"
18
+ },
19
+ "./provider-catalog": {
20
+ "types": "./dist/provider-catalog.d.ts",
21
+ "import": "./dist/provider-catalog.js",
22
+ "require": "./dist/provider-catalog.cjs"
23
+ },
24
+ "./client-config": {
25
+ "types": "./dist/client-config/index.d.ts",
26
+ "import": "./dist/client-config/index.js",
27
+ "require": "./dist/client-config/index.cjs"
28
+ },
29
+ "./endpoint-urls": {
30
+ "types": "./dist/endpoint-urls.d.ts",
31
+ "import": "./dist/endpoint-urls.js"
32
+ }
33
+ },
34
+ "scripts": {
35
+ "build": "rm -rf dist && tsc -p tsconfig.json && bun ../../scripts/fix-dist-js-imports.mjs dist && bun build src/client-config/index.ts --target=node --format=cjs --outfile=dist/client-config/index.cjs && bun build src/provider-catalog.ts --target=node --format=cjs --outfile=dist/provider-catalog.cjs",
36
+ "test": "vitest run --config ../../vitest.packages.config.mts"
37
+ },
38
+ "dependencies": {
39
+ "@undefineds.co/models": "0.2.59"
40
+ },
41
+ "devDependencies": {
42
+ "typescript": "^6.0.3",
43
+ "vitest": "^4.1.8"
44
+ },
45
+ "typesVersions": {
46
+ "*": {
47
+ "provider-catalog": [
48
+ "dist/provider-catalog.d.ts"
49
+ ],
50
+ "client": [
51
+ "dist/ai-connections-client.d.ts"
52
+ ],
53
+ "client-config": [
54
+ "dist/client-config/index.d.ts"
55
+ ],
56
+ "endpoint-urls": [
57
+ "dist/endpoint-urls.d.ts"
58
+ ]
59
+ }
60
+ }
61
+ }
@@ -9,9 +9,11 @@ export * from './user-facing-errors';
9
9
  export * from './input';
10
10
  export * from './label';
11
11
  export { LoginAccountView, LoginAvatar, LoginCardShell, LoginConnectingView, LoginErrorBanner, LoginFailureView, LoginRestoringView, RememberedLoginView, type RememberedLoginIdentity, type RememberedLoginViewCopy, type SessionLoginPresentationState, type SessionLoginStatus, } from './login';
12
- /** LinX product login surface. Xpod does not render this. */
12
+ /**
13
+ * Shared login surface. Hosts inject their brand and product name;
14
+ * the component itself assumes neither.
15
+ */
13
16
  export { LoginModal, } from './login/LoginModal';
14
- /** LinX product login surface. Xpod does not render this. */
15
17
  export { LoginView, type LoginViewActions, type LoginViewProps, type LoginViewState, } from './login/LoginView';
16
18
  export { LocalReachabilitySummary, } from './login/LocalReachabilitySummary';
17
19
  export { getProviderActionLabel, getProviderDisplayLabel, getProviderInfoText, getProviderSourceLabel, getProviderStatusBadge, getProviderSubtitle, type ProviderStatusBadge, } from './login/presentation';
@@ -9,9 +9,11 @@ export * from './user-facing-errors.js';
9
9
  export * from './input.js';
10
10
  export * from './label.js';
11
11
  export { LoginAccountView, LoginAvatar, LoginCardShell, LoginConnectingView, LoginErrorBanner, LoginFailureView, LoginRestoringView, RememberedLoginView, } from './login.js';
12
- /** LinX product login surface. Xpod does not render this. */
12
+ /**
13
+ * Shared login surface. Hosts inject their brand and product name;
14
+ * the component itself assumes neither.
15
+ */
13
16
  export { LoginModal, } from './login/LoginModal.js';
14
- /** LinX product login surface. Xpod does not render this. */
15
17
  export { LoginView, } from './login/LoginView.js';
16
18
  export { LocalReachabilitySummary, } from './login/LocalReachabilitySummary.js';
17
19
  export { getProviderActionLabel, getProviderDisplayLabel, getProviderInfoText, getProviderSourceLabel, getProviderStatusBadge, getProviderSubtitle, } from './login/presentation.js';
@@ -1,3 +1,6 @@
1
1
  import type { LoginModalProps } from './types';
2
- /** LinX product login modal. Xpod does not render this component. */
2
+ /**
3
+ * Shared login modal. The host supplies the brand and, optionally, the product
4
+ * name that user-facing messages refer to.
5
+ */
3
6
  export declare function LoginModal(props: LoginModalProps): import("react").JSX.Element | null;