@undefineds.co/xpod 0.4.13 → 0.4.15
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.
- package/config/cloud.json +0 -3
- package/config/components-ignore.json +11 -7
- package/config/local.json +0 -3
- package/config/xpod.base.json +0 -24
- package/dist/api/ai-config/AiConfigStore.d.ts +2 -2
- package/dist/api/ai-config/AiConfigStore.js +4 -1
- package/dist/api/ai-gateway/auth/CallerPodAccess.d.ts +2 -5
- package/dist/api/ai-gateway/auth/CallerPodAccess.js +3 -42
- package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.d.ts +2 -1
- package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.js +1 -1
- package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.d.ts +3 -8
- package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.js +9 -32
- package/dist/api/ai-gateway/connect/index.d.ts +3 -3
- package/dist/api/ai-gateway/connect/index.js +9 -38
- package/dist/api/ai-gateway/errors.js +2 -1
- package/dist/api/ai-gateway/models/PodModelSelectionRepository.d.ts +3 -3
- package/dist/api/ai-gateway/models/PodModelSelectionRepository.js +7 -11
- package/dist/api/ai-gateway/pod/HostedPodRoute.d.ts +27 -0
- package/dist/api/ai-gateway/pod/HostedPodRoute.js +47 -0
- package/dist/api/ai-gateway/pod/OwnerPodAccess.d.ts +79 -0
- package/dist/api/ai-gateway/pod/OwnerPodAccess.js +192 -0
- package/dist/api/ai-gateway/pod/PodInterfaceKeyStore.d.ts +52 -0
- package/dist/api/ai-gateway/pod/PodInterfaceKeyStore.js +61 -0
- package/dist/api/ai-gateway/providers/ProviderRegistry.js +1 -1
- package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.d.ts +3 -3
- package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.js +7 -32
- package/dist/api/ai-gateway/service-access/AiConnectionsServiceAccess.d.ts +1 -1
- package/dist/api/ai-gateway/service-access/AiConnectionsServiceAccess.js +1 -1
- package/dist/api/auth/ClientCredentialsAuthenticator.js +5 -28
- package/dist/api/auth/TokenEndpointRoute.d.ts +18 -0
- package/dist/api/auth/TokenEndpointRoute.js +36 -0
- package/dist/api/chatkit/pod-store.d.ts +4 -4
- package/dist/api/chatkit/pod-store.js +24 -95
- package/dist/api/container/common.js +36 -23
- package/dist/api/container/index.js +1 -0
- package/dist/api/container/local.js +88 -37
- package/dist/api/container/routes.js +41 -7
- package/dist/api/container/types.d.ts +4 -2
- package/dist/api/handlers/AdminHandler.d.ts +17 -1
- package/dist/api/handlers/AdminHandler.js +40 -3
- package/dist/api/handlers/AiGatewayManagementHandler.d.ts +6 -0
- package/dist/api/handlers/AiGatewayManagementHandler.js +17 -4
- package/dist/api/handlers/EdgeNodeSignalHandler.js +10 -2
- package/dist/api/handlers/NetworkSettingsHandler.d.ts +44 -5
- package/dist/api/handlers/NetworkSettingsHandler.js +46 -11
- package/dist/api/handlers/PodSettingsHandler.d.ts +3 -3
- package/dist/api/handlers/PodSettingsHandler.js +3 -3
- package/dist/api/handlers/ProvisionHandler.d.ts +35 -1
- package/dist/api/handlers/ProvisionHandler.js +53 -2
- package/dist/api/handlers/ReachabilityHandler.d.ts +6 -0
- package/dist/api/handlers/ReachabilityHandler.js +25 -6
- package/dist/api/network/NetworkEnvironmentConfigurationStore.d.ts +6 -1
- package/dist/api/network/NetworkEnvironmentConfigurationStore.js +72 -16
- package/dist/api/runtime.d.ts +18 -0
- package/dist/api/runtime.js +28 -2
- package/dist/api/service/AiClientConfigurationService.d.ts +1 -1
- package/dist/api/service/AiClientConfigurationService.js +1 -1
- package/dist/cli/commands/start.d.ts +26 -1
- package/dist/cli/commands/start.js +69 -5
- package/dist/components/components.jsonld +1 -1
- package/dist/components/context.jsonld +35 -42
- package/dist/edge/EdgeNodeAgent.d.ts +16 -0
- package/dist/edge/EdgeNodeAgent.js +56 -1
- package/dist/edge/EdgeNodeAgent.jsonld +8 -0
- package/dist/edge/EdgeNodeAgentInitializer.d.ts +2 -0
- package/dist/edge/EdgeNodeAgentInitializer.js +1 -0
- package/dist/edge/EdgeNodeAgentInitializer.jsonld +19 -0
- package/dist/edge/EdgeNodeDnsCoordinator.d.ts +11 -1
- package/dist/edge/EdgeNodeDnsCoordinator.js +12 -2
- package/dist/edge/EdgeNodeHealthProbeService.d.ts +15 -0
- package/dist/edge/EdgeNodeHealthProbeService.js +44 -12
- package/dist/edge/EdgeNodeHealthProbeService.jsonld +77 -0
- package/dist/edge/ProbeTargetGuard.d.ts +35 -0
- package/dist/edge/ProbeTargetGuard.js +142 -0
- package/dist/edge/reachability/NodeAccessResolver.d.ts +16 -0
- package/dist/edge/reachability/NodeAccessResolver.js +30 -0
- package/dist/edge/reachability/ReachabilitySessionService.js +4 -1
- package/dist/edge/reachability/RouteSetBuilder.d.ts +18 -1
- package/dist/edge/reachability/RouteSetBuilder.js +47 -0
- package/dist/edge/reachability/RouteSetBuilder.jsonld +29 -0
- package/dist/edge/reachability/types.d.ts +8 -2
- package/dist/http/SubgraphSparqlHttpHandler.d.ts +1 -25
- package/dist/http/SubgraphSparqlHttpHandler.js +0 -100
- package/dist/http/SubgraphSparqlHttpHandler.jsonld +0 -8
- package/dist/identity/drizzle/PodInterfaceKeyRepository.d.ts +33 -0
- package/dist/identity/drizzle/PodInterfaceKeyRepository.js +78 -0
- package/dist/identity/drizzle/db.d.ts +7 -0
- package/dist/identity/drizzle/db.js +30 -0
- package/dist/identity/drizzle/schema.pg.d.ts +9 -0
- package/dist/identity/drizzle/schema.pg.js +16 -1
- package/dist/identity/drizzle/schema.sqlite.d.ts +106 -0
- package/dist/identity/drizzle/schema.sqlite.js +16 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +9 -5
- package/dist/main.js +7 -0
- package/dist/runtime/GatewayAdminProxyAuth.d.ts +1 -16
- package/dist/runtime/GatewayAdminProxyAuth.js +2 -71
- package/dist/runtime/Proxy.d.ts +32 -1
- package/dist/runtime/Proxy.js +125 -31
- package/dist/runtime/bootstrap.d.ts +21 -0
- package/dist/runtime/bootstrap.js +45 -1
- package/dist/runtime/css-process.d.ts +1 -0
- package/dist/runtime/css-process.js +1 -0
- package/dist/runtime/host/node/NodeRuntimeHost.js +6 -1
- package/dist/runtime/host/types.d.ts +6 -0
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +4 -1
- package/dist/runtime/js-runtime.js +10 -3
- package/dist/runtime/lifecycle.js +6 -4
- package/dist/runtime/port-finder.d.ts +26 -0
- package/dist/runtime/port-finder.js +64 -0
- package/dist/runtime/runner/node/NodeGatewayRuntimeRunner.js +1 -0
- package/dist/runtime/runner/types.d.ts +5 -0
- package/dist/runtime/runtime-types.d.ts +1 -0
- package/dist/test-utils/local-managed-client-p2p-e2e-smoke.js +1 -1
- package/dist/tunnel/AutoTunnelProvider.d.ts +56 -0
- package/dist/tunnel/AutoTunnelProvider.js +181 -0
- package/dist/tunnel/LocalTunnelProvider.d.ts +15 -0
- package/dist/tunnel/LocalTunnelProvider.js +87 -18
- package/dist/tunnel/LocalTunnelProvider.jsonld +27 -0
- package/dist/tunnel/NgrokTunnelProvider.d.ts +4 -0
- package/dist/tunnel/NgrokTunnelProvider.js +117 -43
- package/dist/tunnel/NgrokTunnelProvider.jsonld +4 -0
- package/dist/tunnel/SakuraFrpTunnelProvider.d.ts +65 -3
- package/dist/tunnel/SakuraFrpTunnelProvider.js +268 -25
- package/dist/tunnel/TunnelLifecycle.d.ts +14 -0
- package/dist/tunnel/TunnelLifecycle.js +34 -0
- package/dist/tunnel/TunnelProfiles.d.ts +33 -3
- package/dist/tunnel/TunnelProfiles.js +105 -78
- package/dist/tunnel/TunnelProvider.d.ts +15 -2
- package/dist/tunnel/TunnelProvider.jsonld +8 -0
- package/dist/tunnel/TunnelProviderCatalog.d.ts +62 -0
- package/dist/tunnel/TunnelProviderCatalog.js +130 -0
- package/dist/tunnel/index.d.ts +1 -0
- package/dist/tunnel/index.js +3 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.js +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiAuthorizationActions.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.js +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectDialog.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialPoolSection.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialRow.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiCustomProviderDialog.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeyRow.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayModelsSection.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiOfferingDetails.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiProviderCard.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiQuotaCard.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiSortableCredentialList.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.js +3 -3
- package/node_modules/@undefineds.co/ai-connections/dist/collections.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/collections.js +3 -3
- package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/ai-connections-client.d.ts +1 -1
- package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/ai-connections-client.js +1 -1
- package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/index.cjs +8 -8
- package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/index.d.ts +1 -1
- package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/index.js +1 -1
- package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/provider-catalog.cjs +3 -3
- package/node_modules/@undefineds.co/ai-connections/dist/controller.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/controller.js +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/credential-labels.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/display-wording.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/error-wording.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/error-wording.js +8 -3
- package/node_modules/@undefineds.co/ai-connections/dist/gateway-endpoints.js +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/offering-endpoints.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/offering-label.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/provider-visuals.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/service-access.js +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/useAiConnectDialog.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/package.json +31 -1
- package/node_modules/@undefineds.co/solid-sdk/dist/access-route.cjs +230 -0
- package/node_modules/@undefineds.co/solid-sdk/dist/access-route.d.ts +76 -0
- package/node_modules/@undefineds.co/solid-sdk/dist/access-route.js +115 -0
- package/node_modules/@undefineds.co/solid-sdk/dist/index.cjs +89 -0
- package/node_modules/@undefineds.co/solid-sdk/dist/index.d.ts +1 -0
- package/node_modules/@undefineds.co/solid-sdk/dist/index.js +1 -0
- package/node_modules/@undefineds.co/solid-sdk/package.json +6 -1
- package/package.json +5 -6
- package/static/app/assets/inrupt-smoke.js +23 -23
- package/static/app/assets/main.css +1 -1
- package/static/auth-callback/assets/{AiConfigContext-DlFyEWy9.js → AiConfigContext-Bx0HCAW5.js} +1 -1
- package/static/auth-callback/assets/{AiConfigPage-CkYk-SFW.js → AiConfigPage-ChQImMbm.js} +1 -1
- package/static/auth-callback/assets/{DocumentProcessingPanel-CqIr3JqN.js → DocumentProcessingPanel-D830H4SH.js} +1 -1
- package/static/auth-callback/assets/{IndexLifecyclePanel-C1GKV3Vx.js → IndexLifecyclePanel-CnlkjMF8.js} +1 -1
- package/static/auth-callback/assets/{IndexSubjectPanel-ro9lC6XW.js → IndexSubjectPanel-CdEfg_CO.js} +1 -1
- package/static/auth-callback/assets/{ModelAssignmentsPanel-DxNdyKRJ.js → ModelAssignmentsPanel-D-8A8dZx.js} +1 -1
- package/static/auth-callback/assets/{ModelsPage-BVtWSPBU.js → ModelsPage-Cim7cubp.js} +3 -3
- package/static/auth-callback/assets/NetworkPage-CfK3x-pb.js +2 -0
- package/static/auth-callback/assets/{PaneListHeader-ByKw8ada.js → PaneListHeader-Bf_kEd4U.js} +1 -1
- package/static/auth-callback/assets/{SearchIndexingPanel-CulBKcYT.js → SearchIndexingPanel-4kD4RBEQ.js} +1 -1
- package/static/auth-callback/assets/{StatusSubjectPanel-VOcfrt8o.js → StatusSubjectPanel-Bw9AiTSf.js} +1 -1
- package/static/auth-callback/assets/{StatusWorkspace-Jsz6hAdE.js → StatusWorkspace-C-301H-0.js} +1 -1
- package/static/auth-callback/assets/{SystemSettingsPage-BFNvGAle.js → SystemSettingsPage-BbWn-eG6.js} +1 -1
- package/static/auth-callback/assets/{SystemSettingsSubjectPanel-DFRdrSfK.js → SystemSettingsSubjectPanel-DA4wvNSm.js} +1 -1
- package/static/auth-callback/assets/{XpodAiConnectionsPodStore-C6KpvHVg.js → XpodAiConnectionsPodStore-CohdyLoX.js} +1 -1
- package/static/auth-callback/assets/{activity-DnTlb9iM.js → activity-CCsb9Oam.js} +1 -1
- package/static/auth-callback/assets/ai-connections-DexTPyfC.js +1 -0
- package/static/auth-callback/assets/{auth-callback-D2UkK5Xj.js → auth-callback-Ds-c62W3.js} +5 -5
- package/static/auth-callback/assets/auth-callback-rk080mvG.css +1 -0
- package/static/auth-callback/assets/{badge-D7IJuuTM.js → badge-CQm5OyzR.js} +1 -1
- package/static/auth-callback/assets/{collection-runtime-wT1n4GS2.js → collection-runtime-DlAuU5TW.js} +1 -1
- package/static/auth-callback/assets/{dialog-DickLu5z.js → dialog-CnGzg5Ff.js} +1 -1
- package/static/auth-callback/assets/{download-kn8WnRu3.js → download-DwMONJvm.js} +1 -1
- package/static/auth-callback/assets/{external-link-B6B8jfSn.js → external-link-Bu5AGqCO.js} +1 -1
- package/static/auth-callback/assets/{index-DHF97YLP.js → index-B0T-1YO8.js} +1 -1
- package/static/auth-callback/assets/{index-Dz83EEHD.js → index-C8QZf_4W.js} +1 -1
- package/static/auth-callback/assets/index-DwIlrIDG.js +4 -0
- package/static/auth-callback/assets/{index-browser-CSghinyi.js → index-browser-lRsMcP_7.js} +1 -1
- package/static/auth-callback/assets/{key-round-ChkOx3E1.js → key-round-BDMtU57P.js} +1 -1
- package/static/auth-callback/assets/{rotate-ccw-B3hE-nyd.js → rotate-ccw-CoKIGCsQ.js} +1 -1
- package/static/auth-callback/assets/{skeleton-kEqR7tpI.js → skeleton-CPoSWHDr.js} +1 -1
- package/static/auth-callback/assets/{waypoints-D6Jo-SZa.js → waypoints-BeYHxqHv.js} +1 -1
- package/static/auth-callback/assets/{workspace-layout-BHwT_cHd.js → workspace-layout-xA5YxiK3.js} +1 -1
- package/static/auth-callback/auth-callback.html +2 -2
- package/static/dashboard/assets/{AiConfigContext-BfC3v-x2.js → AiConfigContext-rWx4TyiH.js} +1 -1
- package/static/dashboard/assets/{AiConfigPage-QNS3u7Ff.js → AiConfigPage-StVJpDFT.js} +1 -1
- package/static/dashboard/assets/{DocumentProcessingPanel-Dr4XLeT4.js → DocumentProcessingPanel-DJ5yul2O.js} +1 -1
- package/static/dashboard/assets/{IndexLifecyclePanel-KtM_gpeO.js → IndexLifecyclePanel-CpjtgezK.js} +1 -1
- package/static/dashboard/assets/{IndexSubjectPanel-DLaiKdLc.js → IndexSubjectPanel-BVKcot1_.js} +1 -1
- package/static/dashboard/assets/{ModelAssignmentsPanel-Bk7TvQRq.js → ModelAssignmentsPanel-BxVgWZPc.js} +1 -1
- package/static/dashboard/assets/{ModelsPage-Cci3vlos.js → ModelsPage-CECBwmeO.js} +3 -3
- package/static/dashboard/assets/NetworkPage-zQgFscEW.js +2 -0
- package/static/dashboard/assets/{PaneListHeader-qHME_s08.js → PaneListHeader-DIPe8pS6.js} +1 -1
- package/static/dashboard/assets/{SearchIndexingPanel-HZPKj8H9.js → SearchIndexingPanel-lalFJ3c8.js} +1 -1
- package/static/dashboard/assets/{StatusSubjectPanel-ij7IpI8d.js → StatusSubjectPanel-CpY_KU-G.js} +1 -1
- package/static/dashboard/assets/{StatusWorkspace-Cp02JcaN.js → StatusWorkspace-BwWCii3A.js} +1 -1
- package/static/dashboard/assets/{SystemSettingsPage-BSeuvb8X.js → SystemSettingsPage-BKZxX-_n.js} +1 -1
- package/static/dashboard/assets/{SystemSettingsSubjectPanel-CP4_luGS.js → SystemSettingsSubjectPanel-BZrqb2C5.js} +1 -1
- package/static/dashboard/assets/{XpodAiConnectionsPodStore-urO6zaHL.js → XpodAiConnectionsPodStore-Bbpx9dTN.js} +1 -1
- package/static/dashboard/assets/{activity-DxjgQNvr.js → activity-BJ15TLVP.js} +1 -1
- package/static/dashboard/assets/ai-connections-GG6qkTJt.js +1 -0
- package/static/dashboard/assets/{badge-53qCrRbl.js → badge-BBX5FlaB.js} +1 -1
- package/static/dashboard/assets/{collection-runtime-BPAmHG46.js → collection-runtime-UBbHBzdf.js} +1 -1
- package/static/dashboard/assets/{dashboard-BcT2ByXw.js → dashboard-7Y6BHyV9.js} +62 -62
- package/static/dashboard/assets/dashboard-rk080mvG.css +1 -0
- package/static/dashboard/assets/{dialog-B28YtNhS.js → dialog-QrOJ-hB0.js} +1 -1
- package/static/dashboard/assets/{download-DkLNceJ4.js → download-DK9x-VOP.js} +1 -1
- package/static/dashboard/assets/{external-link-D3TXnlo3.js → external-link-Cnkn87mJ.js} +1 -1
- package/static/dashboard/assets/index-B1z84it5.js +4 -0
- package/static/dashboard/assets/{index-CIiBu9mr.js → index-DzjauX3N.js} +1 -1
- package/static/dashboard/assets/{index-CFIenkeK.js → index-cIa8_efI.js} +1 -1
- package/static/dashboard/assets/{key-round-B5ccp6nx.js → key-round-BoS6UqKz.js} +1 -1
- package/static/dashboard/assets/{rotate-ccw-DUpfkNnk.js → rotate-ccw-BeWV76i0.js} +1 -1
- package/static/dashboard/assets/{skeleton-BRe19fO0.js → skeleton-CypcJL07.js} +1 -1
- package/static/dashboard/assets/{waypoints-BKDMxEvu.js → waypoints-zHOOqfhi.js} +1 -1
- package/static/dashboard/assets/{workspace-layout-ZTF7C16h.js → workspace-layout-DZ9JuxnM.js} +1 -1
- package/static/dashboard/dashboard.html +2 -2
- package/static/settings/assets/{AiConfigContext-DsyWgu2i.js → AiConfigContext-D3b1l_Kw.js} +1 -1
- package/static/settings/assets/{AiConfigPage-CSCBckKo.js → AiConfigPage-DYKw-atP.js} +1 -1
- package/static/settings/assets/{DocumentProcessingPanel-w9yQDbBe.js → DocumentProcessingPanel-DguRfsIV.js} +1 -1
- package/static/settings/assets/{IndexLifecyclePanel-CUUXI8mP.js → IndexLifecyclePanel-B85qJJA4.js} +1 -1
- package/static/settings/assets/{IndexSubjectPanel-BypAU5TJ.js → IndexSubjectPanel-CsN7IxaV.js} +1 -1
- package/static/settings/assets/{ModelAssignmentsPanel-BetgXw1G.js → ModelAssignmentsPanel-DEp9byI6.js} +1 -1
- package/static/settings/assets/{ModelsPage-DZpTlTZ3.js → ModelsPage-CzTnPs_G.js} +3 -3
- package/static/settings/assets/NetworkPage-BDVnmUU0.js +2 -0
- package/static/settings/assets/{PaneListHeader-BGOqGec4.js → PaneListHeader-Cpe39N76.js} +1 -1
- package/static/settings/assets/{SearchIndexingPanel-DYAbpZ_9.js → SearchIndexingPanel-DA9w8lLL.js} +1 -1
- package/static/settings/assets/{StatusSubjectPanel-CFgzeQ8Q.js → StatusSubjectPanel-BU0Aq0CS.js} +1 -1
- package/static/settings/assets/{StatusWorkspace-4Z6g4Jvv.js → StatusWorkspace-D1AC1i5N.js} +1 -1
- package/static/settings/assets/{SystemSettingsPage-C1tlrgvI.js → SystemSettingsPage-ChKvOioO.js} +1 -1
- package/static/settings/assets/{SystemSettingsSubjectPanel-CcURI-1L.js → SystemSettingsSubjectPanel-DyTpOnD2.js} +1 -1
- package/static/settings/assets/{XpodAiConnectionsPodStore-owBQc5nY.js → XpodAiConnectionsPodStore-VU5Bsz1a.js} +1 -1
- package/static/settings/assets/{activity-CtBc9cNy.js → activity-DGpLfsQB.js} +1 -1
- package/static/settings/assets/ai-connections-DexTPyfC.js +1 -0
- package/static/settings/assets/{badge--r-FDIhU.js → badge-_hCrrWRP.js} +1 -1
- package/static/settings/assets/{collection-runtime-CnhPmwAM.js → collection-runtime-E40TZ8Cl.js} +1 -1
- package/static/settings/assets/{dialog-B7ZRsjN7.js → dialog-DTr2JkHn.js} +1 -1
- package/static/settings/assets/{download-DgQ1F8QR.js → download-B_D21DDX.js} +1 -1
- package/static/settings/assets/{external-link-Bz7NckNO.js → external-link-BATYaM13.js} +1 -1
- package/static/settings/assets/index-BAlAVi-J.js +4 -0
- package/static/settings/assets/{index-CkGda_Pg.js → index-Ckh4h9jj.js} +1 -1
- package/static/settings/assets/{index-Vv-8Vslg.js → index-DOiwLF4B.js} +1 -1
- package/static/settings/assets/{index-browser-Dq7omlpY.js → index-browser-DFFWN3Kr.js} +1 -1
- package/static/settings/assets/{key-round-CvuhloKV.js → key-round-ZTVU_1O1.js} +1 -1
- package/static/settings/assets/{rotate-ccw-DgFKDaz7.js → rotate-ccw-DDdw8PTU.js} +1 -1
- package/static/settings/assets/{settings-BvqY7K96.js → settings-CyLnISOv.js} +62 -62
- package/static/settings/assets/settings-rk080mvG.css +1 -0
- package/static/settings/assets/{skeleton-D3OeFDF6.js → skeleton-DEzA3hc2.js} +1 -1
- package/static/settings/assets/{waypoints-C4WbspTb.js → waypoints-BSdfNvEb.js} +1 -1
- package/static/settings/assets/{workspace-layout-B9H1Tqrk.js → workspace-layout-BOQnl_3d.js} +1 -1
- package/static/settings/settings.html +2 -2
- package/dist/api/ai-gateway/pod/HostedPodDataAccess.d.ts +0 -31
- package/dist/api/ai-gateway/pod/HostedPodDataAccess.js +0 -330
- package/dist/http/InternalPodDataHttpHandler.d.ts +0 -57
- package/dist/http/InternalPodDataHttpHandler.js +0 -551
- package/dist/http/InternalPodDataHttpHandler.jsonld +0 -243
- package/node_modules/@undefineds.co/ai-connections-core/package.json +0 -61
- package/static/auth-callback/assets/NetworkPage-cEvxRMAl.js +0 -2
- package/static/auth-callback/assets/ai-connections-C6yaE6WQ.js +0 -1
- package/static/auth-callback/assets/auth-callback-Cx9D_1qj.css +0 -1
- package/static/auth-callback/assets/index-Cu0EguPo.js +0 -4
- package/static/dashboard/assets/NetworkPage-Ot4G2dX5.js +0 -2
- package/static/dashboard/assets/ai-connections-CXp5gd1J.js +0 -1
- package/static/dashboard/assets/dashboard-Cx9D_1qj.css +0 -1
- package/static/dashboard/assets/index-Gp3cLolR.js +0 -4
- package/static/settings/assets/NetworkPage-BVkasFGM.js +0 -2
- package/static/settings/assets/ai-connections-C6yaE6WQ.js +0 -1
- package/static/settings/assets/index-BdXwm8nh.js +0 -4
- package/static/settings/assets/settings-Cx9D_1qj.css +0 -1
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client/normalize.d.ts +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client/normalize.js +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client/request.d.ts +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client/request.js +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client/types.d.ts +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client/types.js +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/base-adapter.d.ts +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/base-adapter.js +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/codex.d.ts +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/codex.js +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/index.d.ts +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/index.js +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/json-env-adapter.d.ts +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/json-env-adapter.js +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/pi.d.ts +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/pi.js +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/transaction.d.ts +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/transaction.js +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/types.d.ts +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/types.js +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/credential-storage.d.ts +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/credential-storage.js +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/endpoint-urls.d.ts +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/endpoint-urls.js +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/provider-catalog.d.ts +0 -0
- /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/provider-catalog.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GatewayKeyRecord } from '
|
|
1
|
+
import type { GatewayKeyRecord } from './contract/ai-connections-client';
|
|
2
2
|
import { type AiConnectionsClientId } from './AiClientConfigurationSection';
|
|
3
3
|
export interface AiGatewayKeyBinding {
|
|
4
4
|
clientId?: AiConnectionsClientId;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiConnectionsClient, AiGatewayModel } from '
|
|
1
|
+
import type { AiConnectionsClient, AiGatewayModel } from './contract/ai-connections-client';
|
|
2
2
|
import { type AiClientConfigurationBridge } from './AiClientConfigurationSection';
|
|
3
3
|
import { type GatewayModelSelection } from './AiGatewayModelsSection';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiProviderAuthorizationMethod, AiProviderOffering } from '
|
|
1
|
+
import type { AiProviderAuthorizationMethod, AiProviderOffering } from './contract/ai-connections-client';
|
|
2
2
|
export declare function AiOfferingDetails({ offering, methods }: {
|
|
3
3
|
offering: AiProviderOffering;
|
|
4
4
|
methods?: AiProviderAuthorizationMethod[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiConnectAttempt, AiConnectionsMode, AiGatewayModel, AiProviderCredentialSummary, AiProviderAuthorizationMethod, AiProviderOffering, AiProviderSummary } from '
|
|
1
|
+
import type { AiConnectAttempt, AiConnectionsMode, AiGatewayModel, AiProviderCredentialSummary, AiProviderAuthorizationMethod, AiProviderOffering, AiProviderSummary } from './contract/ai-connections-client';
|
|
2
2
|
import { type AiOfferingActionError, type AiOfferingQuotaState } from './AiCredentialPoolSection';
|
|
3
3
|
export type { AiProviderDefinition } from './controller';
|
|
4
4
|
import type { AiProviderDefinition } from './controller';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiQuotaSnapshot } from '
|
|
1
|
+
import type { AiQuotaSnapshot } from './contract/ai-connections-client';
|
|
2
2
|
export declare function AiQuotaCard({ providerName, offeringName, quota, busy, disabled, credentialLabel, multiple, compact, paused, error, onRefresh, }: {
|
|
3
3
|
providerName: string;
|
|
4
4
|
offeringName: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type { AiProviderCredentialSummary } from '
|
|
2
|
+
import type { AiProviderCredentialSummary } from './contract/ai-connections-client';
|
|
3
3
|
export declare function AiSortableCredentialList({ credentials, disabled, onMove, children }: {
|
|
4
4
|
credentials: AiProviderCredentialSummary[];
|
|
5
5
|
disabled: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiConnectAttempt, AiConnectionsMode, AiProviderAuthorizationMethod, AiProviderOffering } from '
|
|
1
|
+
import type { AiConnectAttempt, AiConnectionsMode, AiProviderAuthorizationMethod, AiProviderOffering } from './contract/ai-connections-client';
|
|
2
2
|
/**
|
|
3
3
|
* Authorization methods an offering exposes, worded for display.
|
|
4
4
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AiConnectionsPodStore, WebExtensionHost } from '@undefineds.co/extension-sdk/web';
|
|
2
|
-
import type { AiConnectionsClient } from '
|
|
2
|
+
import type { AiConnectionsClient } from './contract/ai-connections-client';
|
|
3
3
|
import { type CredentialCollection } from './collections';
|
|
4
4
|
/**
|
|
5
5
|
* The half of the credentials table that needs the collection layer at runtime.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { credentialDescriptor, credentialResource } from '@undefineds.co/models';
|
|
2
2
|
import { rowKeyOf } from '@undefineds.co/pod-collections';
|
|
3
|
-
import { credentialProviderRelation, credentialRowKeyFor, customCredentialProviderRelation, } from '
|
|
3
|
+
import { credentialProviderRelation, credentialRowKeyFor, customCredentialProviderRelation, } from './contract/ai-connections-client.js';
|
|
4
4
|
import { credentialSummaryFromRow } from './collections.js';
|
|
5
|
-
import { normalizeProxyUrl } from '
|
|
6
|
-
import { credentialOfferingMetadata, defaultOfferingFor, offeringBaseUrl, storedOfferingIdFor, } from '
|
|
5
|
+
import { normalizeProxyUrl } from './contract/ai-connections-client.js';
|
|
6
|
+
import { credentialOfferingMetadata, defaultOfferingFor, offeringBaseUrl, storedOfferingIdFor, } from './contract/provider-catalog.js';
|
|
7
7
|
/**
|
|
8
8
|
* The half of the credentials table that needs the collection layer at runtime.
|
|
9
9
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { credentialDescriptor } from '@undefineds.co/models';
|
|
2
2
|
import type { PodCollection, RowOf } from '@undefineds.co/pod-collections';
|
|
3
|
-
import type { AiConnectionsProvider, AiProviderCredentialSummary, AiProviderSummary } from '
|
|
3
|
+
import type { AiConnectionsProvider, AiProviderCredentialSummary, AiProviderSummary } from './contract/ai-connections-client';
|
|
4
4
|
/**
|
|
5
5
|
* The credentials table, declared once (`docs/pod-collections.md` §6.4-2).
|
|
6
6
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { credentialResource } from '@undefineds.co/models';
|
|
2
2
|
import { useSyncExternalStore } from 'react';
|
|
3
|
-
import { AI_CONNECTIONS_PROVIDERS } from '
|
|
4
|
-
import { defaultOfferingFor } from '
|
|
5
|
-
import { providerOfCredentialKey, providerResourceKey } from '
|
|
3
|
+
import { AI_CONNECTIONS_PROVIDERS } from './contract/ai-connections-client.js';
|
|
4
|
+
import { defaultOfferingFor } from './contract/provider-catalog.js';
|
|
5
|
+
import { providerOfCredentialKey, providerResourceKey } from './contract/ai-connections-client.js';
|
|
6
6
|
/**
|
|
7
7
|
* Live rows for the credentials table. Re-renders on sync and on optimistic
|
|
8
8
|
* writes, because the source is the collection's own change feed.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Public entry point of the AI Connections client protocol. This package is
|
|
3
3
|
* the shared core: the gateway and the applet both consume it, and the applet
|
|
4
4
|
* (`@undefineds.co/ai-connections`) adds the components, artwork and wording.
|
|
5
|
-
* (`@undefineds.co/ai-connections
|
|
5
|
+
* (`@undefineds.co/ai-connections/client`).
|
|
6
6
|
*
|
|
7
7
|
* The implementation lives in `./client`, split into wire types, payload
|
|
8
8
|
* normalisation and the request factory. This file stays a barrel — importers
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Public entry point of the AI Connections client protocol. This package is
|
|
3
3
|
* the shared core: the gateway and the applet both consume it, and the applet
|
|
4
4
|
* (`@undefineds.co/ai-connections`) adds the components, artwork and wording.
|
|
5
|
-
* (`@undefineds.co/ai-connections
|
|
5
|
+
* (`@undefineds.co/ai-connections/client`).
|
|
6
6
|
*
|
|
7
7
|
* The implementation lives in `./client`, split into wire types, payload
|
|
8
8
|
* normalisation and the request factory. This file stays a barrel — importers
|
|
@@ -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"));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Root entry of the shared core.
|
|
3
3
|
*
|
|
4
4
|
* The client protocol is what most consumers want, and it is the same surface
|
|
5
|
-
* `@undefineds.co/ai-connections
|
|
5
|
+
* `@undefineds.co/ai-connections/client` publishes. The catalog and the
|
|
6
6
|
* client-configuration adapters stay on their own subpaths because they are
|
|
7
7
|
* larger and only some consumers need them.
|
|
8
8
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Root entry of the shared core.
|
|
3
3
|
*
|
|
4
4
|
* The client protocol is what most consumers want, and it is the same surface
|
|
5
|
-
* `@undefineds.co/ai-connections
|
|
5
|
+
* `@undefineds.co/ai-connections/client` publishes. The catalog and the
|
|
6
6
|
* client-configuration adapters stay on their own subpaths because they are
|
|
7
7
|
* larger and only some consumers need them.
|
|
8
8
|
*/
|
|
@@ -36,7 +36,7 @@ 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,
|
|
@@ -54,7 +54,7 @@ __export(exports_provider_catalog, {
|
|
|
54
54
|
});
|
|
55
55
|
module.exports = __toCommonJS(exports_provider_catalog);
|
|
56
56
|
|
|
57
|
-
// src/client/types.ts
|
|
57
|
+
// src/contract/client/types.ts
|
|
58
58
|
var AI_CONNECTIONS_PROVIDERS = [
|
|
59
59
|
"openai",
|
|
60
60
|
"anthropic",
|
|
@@ -66,7 +66,7 @@ var AI_CONNECTIONS_PROVIDERS = [
|
|
|
66
66
|
"custom"
|
|
67
67
|
];
|
|
68
68
|
|
|
69
|
-
// src/provider-catalog.ts
|
|
69
|
+
// src/contract/provider-catalog.ts
|
|
70
70
|
var DEFAULT_PROVIDER_OFFERINGS = [
|
|
71
71
|
{ id: "api-platform", label: "API Platform", kind: "api-platform", lifecycle: "active", authModes: ["apiKey"] }
|
|
72
72
|
];
|
|
@@ -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 '
|
|
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,5 @@
|
|
|
1
1
|
import { useSyncExternalStore } from 'react';
|
|
2
|
-
import { AI_CONNECTIONS_PROVIDERS, AiConnectionsRequestError, createAiConnectionsClient, } from '
|
|
2
|
+
import { AI_CONNECTIONS_PROVIDERS, AiConnectionsRequestError, createAiConnectionsClient, } from './contract/ai-connections-client.js';
|
|
3
3
|
import { aiConnectionsErrorMessage } from './error-wording.js';
|
|
4
4
|
import { credentialCollectionRuntime, } from './collections.js';
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiProviderCredentialSummary } from '
|
|
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiConnectionsProvider, AiProviderAuthorizationMethod } from '
|
|
1
|
+
import type { AiConnectionsProvider, AiProviderAuthorizationMethod } from './contract/ai-connections-client';
|
|
2
2
|
/**
|
|
3
3
|
* Wording for one connect entry.
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiConnectionsClient, AiConnectionsProvider } from '
|
|
1
|
+
import type { AiConnectionsClient, AiConnectionsProvider } from './contract/ai-connections-client';
|
|
2
2
|
/**
|
|
3
3
|
* The sentence to show for anything a request threw.
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AiConnectionsRequestError, aiConnectionsErrorCode } from '
|
|
1
|
+
import { AiConnectionsRequestError, aiConnectionsErrorCode } from './contract/ai-connections-client.js';
|
|
2
2
|
/**
|
|
3
3
|
* The wording a failed AI Connection request is shown under.
|
|
4
4
|
*
|
|
@@ -134,8 +134,13 @@ function messageForSafeErrorCode(code, provider) {
|
|
|
134
134
|
return provider
|
|
135
135
|
? `${providerLabel(provider)} does not support this operation.`
|
|
136
136
|
: 'This AI Connection operation is not supported.';
|
|
137
|
-
case '
|
|
138
|
-
|
|
137
|
+
case 'service_access_missing':
|
|
138
|
+
case 'pod_interface_key_missing':
|
|
139
|
+
case 'pod_interface_key_rejected':
|
|
140
|
+
case 'caller_dpop_replay_unsupported':
|
|
141
|
+
// Xpod reaches the Pod with the owner's own interface key, never with a
|
|
142
|
+
// deployment identity, so the fix is always on the user's side.
|
|
143
|
+
return 'Xpod 尚未获得这个 Pod 的接口访问密钥。请在「客户端访问」中创建 API Key 并应用到客户端后重试。';
|
|
139
144
|
case 'unauthorized':
|
|
140
145
|
return 'Please sign in again to continue.';
|
|
141
146
|
case 'forbidden':
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { normalizeMessagesEndpoint, normalizeV1Endpoint } from '
|
|
1
|
+
import { normalizeMessagesEndpoint, normalizeV1Endpoint } from './contract/endpoint-urls.js';
|
|
2
2
|
/**
|
|
3
3
|
* The protocols the Xpod gateway serves, as registered by
|
|
4
4
|
* `src/api/handlers/AiGatewayHandler.ts`:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiProviderOffering } from '
|
|
1
|
+
import type { AiProviderOffering } from './contract/ai-connections-client';
|
|
2
2
|
/** One protocol the user can point a client at: the `protocol → base URL` pair the UI lists. */
|
|
3
3
|
export interface AiEndpointEntry {
|
|
4
4
|
protocol: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiProviderAuthorizationMethod, AiProviderOffering } from '
|
|
1
|
+
import type { AiProviderAuthorizationMethod, AiProviderOffering } from './contract/ai-connections-client';
|
|
2
2
|
export declare function offeringTitle(offering: AiProviderOffering): string;
|
|
3
3
|
/** Name of the offering kind. Same taxonomy as the title fallback, so it reuses the one map. */
|
|
4
4
|
export declare function offeringKindLabel(kind: string): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiConnectionsProvider } from '
|
|
1
|
+
import type { AiConnectionsProvider } from './contract/ai-connections-client';
|
|
2
2
|
/**
|
|
3
3
|
* The Xpod shield (`ui/src/assets/xpod-shield.svg`), inlined like the provider
|
|
4
4
|
* marks: from a coding client's point of view Xpod is just another provider.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AI_CONNECTIONS_PROVIDER_DOCUMENT_IDS } from '
|
|
1
|
+
import { AI_CONNECTIONS_PROVIDER_DOCUMENT_IDS } from './contract/provider-catalog.js';
|
|
2
2
|
export const AI_CONNECTIONS_APPLET_ID = 'co.undefineds.ai-connections';
|
|
3
3
|
const KNOWN_RESOURCE_PATHS = {
|
|
4
4
|
providerCredentials: 'settings/credentials.ttl',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiConnectAttempt, AiConnectionsMode, AiProviderAuthorizationMethod, AiProviderCredentialSummary, AiProviderOffering } from '
|
|
1
|
+
import type { AiConnectAttempt, AiConnectionsMode, AiProviderAuthorizationMethod, AiProviderCredentialSummary, AiProviderOffering } from './contract/ai-connections-client';
|
|
2
2
|
/**
|
|
3
3
|
* Lifecycle of the connect dialog: which offering is being connected, whether the
|
|
4
4
|
* user is creating or editing, and the busy/error state the toolbar and the
|
|
@@ -16,10 +16,28 @@
|
|
|
16
16
|
"./manifest": {
|
|
17
17
|
"types": "./dist/manifest.d.ts",
|
|
18
18
|
"import": "./dist/manifest.js"
|
|
19
|
+
},
|
|
20
|
+
"./client": {
|
|
21
|
+
"types": "./dist/contract/ai-connections-client.d.ts",
|
|
22
|
+
"import": "./dist/contract/ai-connections-client.js"
|
|
23
|
+
},
|
|
24
|
+
"./provider-catalog": {
|
|
25
|
+
"types": "./dist/contract/provider-catalog.d.ts",
|
|
26
|
+
"import": "./dist/contract/provider-catalog.js",
|
|
27
|
+
"require": "./dist/contract/provider-catalog.cjs"
|
|
28
|
+
},
|
|
29
|
+
"./client-config": {
|
|
30
|
+
"types": "./dist/contract/client-config/index.d.ts",
|
|
31
|
+
"import": "./dist/contract/client-config/index.js",
|
|
32
|
+
"require": "./dist/contract/client-config/index.cjs"
|
|
33
|
+
},
|
|
34
|
+
"./endpoint-urls": {
|
|
35
|
+
"types": "./dist/contract/endpoint-urls.d.ts",
|
|
36
|
+
"import": "./dist/contract/endpoint-urls.js"
|
|
19
37
|
}
|
|
20
38
|
},
|
|
21
39
|
"scripts": {
|
|
22
|
-
"build": "rm -rf dist && tsc -p tsconfig.json && bun ../../scripts/fix-dist-js-imports.mjs dist",
|
|
40
|
+
"build": "rm -rf dist && tsc -p tsconfig.json && bun ../../scripts/fix-dist-js-imports.mjs dist && bun build src/contract/client-config/index.ts --target=node --format=cjs --outfile=dist/contract/client-config/index.cjs && bun build src/contract/provider-catalog.ts --target=node --format=cjs --outfile=dist/contract/provider-catalog.cjs",
|
|
23
41
|
"test": "vitest run --config ../../vitest.packages.config.mts"
|
|
24
42
|
},
|
|
25
43
|
"dependencies": {
|
|
@@ -43,6 +61,18 @@
|
|
|
43
61
|
"*": {
|
|
44
62
|
"manifest": [
|
|
45
63
|
"dist/manifest.d.ts"
|
|
64
|
+
],
|
|
65
|
+
"provider-catalog": [
|
|
66
|
+
"dist/contract/provider-catalog.d.ts"
|
|
67
|
+
],
|
|
68
|
+
"client": [
|
|
69
|
+
"dist/contract/ai-connections-client.d.ts"
|
|
70
|
+
],
|
|
71
|
+
"client-config": [
|
|
72
|
+
"dist/contract/client-config/index.d.ts"
|
|
73
|
+
],
|
|
74
|
+
"endpoint-urls": [
|
|
75
|
+
"dist/contract/endpoint-urls.d.ts"
|
|
46
76
|
]
|
|
47
77
|
}
|
|
48
78
|
}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
function __accessProp(key) {
|
|
6
|
+
return this[key];
|
|
7
|
+
}
|
|
8
|
+
var __toCommonJS = (from) => {
|
|
9
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
10
|
+
if (entry)
|
|
11
|
+
return entry;
|
|
12
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (var key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(entry, key))
|
|
16
|
+
__defProp(entry, key, {
|
|
17
|
+
get: __accessProp.bind(from, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
__moduleCache.set(from, entry);
|
|
22
|
+
return entry;
|
|
23
|
+
};
|
|
24
|
+
var __moduleCache;
|
|
25
|
+
var __returnValue = (v) => v;
|
|
26
|
+
function __exportSetter(name, newValue) {
|
|
27
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
28
|
+
}
|
|
29
|
+
var __export = (target, all) => {
|
|
30
|
+
for (var name in all)
|
|
31
|
+
__defProp(target, name, {
|
|
32
|
+
get: all[name],
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
set: __exportSetter.bind(all, name)
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/access-route.ts
|
|
40
|
+
var exports_access_route = {};
|
|
41
|
+
__export(exports_access_route, {
|
|
42
|
+
usableRoutes: () => usableRoutes,
|
|
43
|
+
createSolidAccessRouteFetch: () => createSolidAccessRouteFetch,
|
|
44
|
+
chooseAccessRoute: () => chooseAccessRoute
|
|
45
|
+
});
|
|
46
|
+
module.exports = __toCommonJS(exports_access_route);
|
|
47
|
+
|
|
48
|
+
// src/local-route-fetch.ts
|
|
49
|
+
var SOLID_LOCAL_ROUTE_CANONICAL_URL_HEADER = "x-xpod-canonical-url";
|
|
50
|
+
var SOLID_LOCAL_ROUTE_CANONICAL_ORIGIN_HEADER = "x-xpod-canonical-origin";
|
|
51
|
+
var SOLID_LOCAL_ROUTE_CANONICAL_HOST_HEADER = "x-xpod-canonical-host";
|
|
52
|
+
var SOLID_LOCAL_ROUTE_LOCAL_URL_HEADER = "x-xpod-local-route-url";
|
|
53
|
+
function resolveSolidLocalRouteUrl(input, routes) {
|
|
54
|
+
let sourceUrl;
|
|
55
|
+
try {
|
|
56
|
+
sourceUrl = input instanceof URL ? new URL(input.href) : new URL(input);
|
|
57
|
+
} catch {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const route = routes.map(normalizeRoute).filter((candidate) => isInsideBase(sourceUrl, candidate.canonicalBaseUrl)).sort((left, right) => right.canonicalBaseUrl.length - left.canonicalBaseUrl.length)[0];
|
|
61
|
+
return route ? replaceBase(sourceUrl, route) : undefined;
|
|
62
|
+
}
|
|
63
|
+
function createSolidLocalRouteFetch(options) {
|
|
64
|
+
return async (input, init) => {
|
|
65
|
+
const sourceUrl = requestUrl(input);
|
|
66
|
+
if (!sourceUrl) {
|
|
67
|
+
return init === undefined ? options.fetch.call(globalThis, input) : options.fetch.call(globalThis, input, init);
|
|
68
|
+
}
|
|
69
|
+
const routes = options.routes();
|
|
70
|
+
const targetUrl = resolveSolidLocalRouteUrl(sourceUrl, routes);
|
|
71
|
+
if (!targetUrl) {
|
|
72
|
+
return init === undefined ? options.fetch.call(globalThis, input) : options.fetch.call(globalThis, input, init);
|
|
73
|
+
}
|
|
74
|
+
const headers = routedHeaders(input, init, sourceUrl, targetUrl);
|
|
75
|
+
let response;
|
|
76
|
+
if (input instanceof Request) {
|
|
77
|
+
const request = new Request(new Request(targetUrl, input), { headers });
|
|
78
|
+
response = init === undefined ? await options.fetch.call(globalThis, request) : await options.fetch.call(globalThis, request, { ...init, headers });
|
|
79
|
+
} else {
|
|
80
|
+
response = await options.fetch.call(globalThis, targetUrl, { ...init, headers });
|
|
81
|
+
}
|
|
82
|
+
const canonicalResponseUrl = resolveSolidLocalRouteUrl(response.url, routes.map((route) => ({
|
|
83
|
+
canonicalBaseUrl: route.localBaseUrl,
|
|
84
|
+
localBaseUrl: route.canonicalBaseUrl
|
|
85
|
+
})));
|
|
86
|
+
return canonicalResponseUrl ? withResponseUrl(response, canonicalResponseUrl.href) : response;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function withResponseUrl(response, url) {
|
|
90
|
+
const clone = response.clone.bind(response);
|
|
91
|
+
Object.defineProperties(response, {
|
|
92
|
+
url: { value: url, configurable: true },
|
|
93
|
+
clone: { value: () => withResponseUrl(clone(), url), configurable: true }
|
|
94
|
+
});
|
|
95
|
+
return response;
|
|
96
|
+
}
|
|
97
|
+
function requestUrl(input) {
|
|
98
|
+
if (input instanceof Request)
|
|
99
|
+
return new URL(input.url);
|
|
100
|
+
try {
|
|
101
|
+
return new URL(String(input));
|
|
102
|
+
} catch {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function normalizeRoute(route) {
|
|
107
|
+
return {
|
|
108
|
+
canonicalBaseUrl: normalizeBaseUrl(route.canonicalBaseUrl),
|
|
109
|
+
localBaseUrl: normalizeBaseUrl(route.localBaseUrl)
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function normalizeBaseUrl(value) {
|
|
113
|
+
const url = new URL(value);
|
|
114
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") {
|
|
115
|
+
throw new TypeError("Solid local routes must use http or https");
|
|
116
|
+
}
|
|
117
|
+
url.search = "";
|
|
118
|
+
url.hash = "";
|
|
119
|
+
return url.href.endsWith("/") ? url.href : `${url.href}/`;
|
|
120
|
+
}
|
|
121
|
+
function isInsideBase(url, base) {
|
|
122
|
+
const canonical = new URL(base);
|
|
123
|
+
return url.origin === canonical.origin && url.pathname.startsWith(canonical.pathname);
|
|
124
|
+
}
|
|
125
|
+
function replaceBase(url, route) {
|
|
126
|
+
const canonical = new URL(route.canonicalBaseUrl);
|
|
127
|
+
const local = new URL(route.localBaseUrl);
|
|
128
|
+
const relativePath = url.pathname.slice(canonical.pathname.length);
|
|
129
|
+
const target = new URL(relativePath, local);
|
|
130
|
+
target.search = url.search;
|
|
131
|
+
target.hash = url.hash;
|
|
132
|
+
return target;
|
|
133
|
+
}
|
|
134
|
+
function routedHeaders(input, init, canonicalUrl, localUrl) {
|
|
135
|
+
const request = input instanceof Request ? input : undefined;
|
|
136
|
+
const headers = new Headers(request?.headers ?? undefined);
|
|
137
|
+
new Headers(init?.headers ?? undefined).forEach((value, key) => headers.set(key, value));
|
|
138
|
+
headers.set(SOLID_LOCAL_ROUTE_CANONICAL_URL_HEADER, canonicalUrl.toString());
|
|
139
|
+
headers.set(SOLID_LOCAL_ROUTE_CANONICAL_ORIGIN_HEADER, canonicalUrl.origin);
|
|
140
|
+
headers.set(SOLID_LOCAL_ROUTE_CANONICAL_HOST_HEADER, canonicalUrl.host);
|
|
141
|
+
headers.set(SOLID_LOCAL_ROUTE_LOCAL_URL_HEADER, localUrl.toString());
|
|
142
|
+
return headers;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// src/access-route.ts
|
|
146
|
+
async function chooseAccessRoute(routeSet, options = {}) {
|
|
147
|
+
const candidates = usableRoutes(routeSet, options.managedClient ?? true, options.allowLocalOnlyRoutes ?? false);
|
|
148
|
+
if (candidates.length === 0) {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
const probe = options.probe ?? defaultProbe;
|
|
152
|
+
const timeoutMs = options.probeTimeoutMs ?? 1000;
|
|
153
|
+
const results = await Promise.all(candidates.map(async (route) => ({
|
|
154
|
+
route,
|
|
155
|
+
ok: await probeWithTimeout(route, probe, timeoutMs)
|
|
156
|
+
})));
|
|
157
|
+
return results.find((result) => result.ok)?.route ?? null;
|
|
158
|
+
}
|
|
159
|
+
function usableRoutes(routeSet, managedClient, allowLocalOnlyRoutes) {
|
|
160
|
+
return routeSet.routes.filter((route) => route.health !== "unreachable").filter((route) => managedClient || !route.requiresManagedClient).filter((route) => allowLocalOnlyRoutes || route.visibility !== "local-only").slice().sort((left, right) => left.priority - right.priority || left.id.localeCompare(right.id));
|
|
161
|
+
}
|
|
162
|
+
function createSolidAccessRouteFetch(options) {
|
|
163
|
+
const managedClient = options.managedClient ?? true;
|
|
164
|
+
let selected;
|
|
165
|
+
const selectRoute = async () => {
|
|
166
|
+
const routeSet = {
|
|
167
|
+
canonicalUrl: options.routes()[0]?.canonicalUrl ?? "",
|
|
168
|
+
routes: options.routes()
|
|
169
|
+
};
|
|
170
|
+
const candidate = await chooseAccessRoute(routeSet, {
|
|
171
|
+
managedClient,
|
|
172
|
+
...options.allowLocalOnlyRoutes === undefined ? {} : { allowLocalOnlyRoutes: options.allowLocalOnlyRoutes },
|
|
173
|
+
...options.probeTimeoutMs === undefined ? {} : { probeTimeoutMs: options.probeTimeoutMs },
|
|
174
|
+
...options.probe === undefined ? {} : { probe: options.probe }
|
|
175
|
+
});
|
|
176
|
+
selected = candidate ?? undefined;
|
|
177
|
+
return candidate;
|
|
178
|
+
};
|
|
179
|
+
const routeFor = async () => {
|
|
180
|
+
if (selected && options.routes().some((route) => route.id === selected?.id && route.targetUrl === selected?.targetUrl)) {
|
|
181
|
+
return selected;
|
|
182
|
+
}
|
|
183
|
+
return await selectRoute() ?? undefined;
|
|
184
|
+
};
|
|
185
|
+
const routedFetchFor = (route) => createSolidLocalRouteFetch({
|
|
186
|
+
fetch: options.fetch,
|
|
187
|
+
routes: () => [{
|
|
188
|
+
canonicalBaseUrl: route.canonicalUrl,
|
|
189
|
+
localBaseUrl: route.targetUrl
|
|
190
|
+
}]
|
|
191
|
+
});
|
|
192
|
+
return async (input, init) => {
|
|
193
|
+
const route = await routeFor();
|
|
194
|
+
if (!route) {
|
|
195
|
+
return init === undefined ? options.fetch.call(globalThis, input) : options.fetch.call(globalThis, input, init);
|
|
196
|
+
}
|
|
197
|
+
try {
|
|
198
|
+
return await routedFetchFor(route)(input, init);
|
|
199
|
+
} catch (error) {
|
|
200
|
+
selected = undefined;
|
|
201
|
+
await options.refreshRoutes?.();
|
|
202
|
+
const retryRoute = await selectRoute();
|
|
203
|
+
if (!retryRoute || retryRoute.id === route.id) {
|
|
204
|
+
throw error;
|
|
205
|
+
}
|
|
206
|
+
return routedFetchFor(retryRoute)(input, init);
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
async function probeWithTimeout(route, probe, timeoutMs) {
|
|
211
|
+
const controller = new AbortController;
|
|
212
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
213
|
+
try {
|
|
214
|
+
return await Promise.resolve(probe(route, controller.signal));
|
|
215
|
+
} catch {
|
|
216
|
+
return false;
|
|
217
|
+
} finally {
|
|
218
|
+
clearTimeout(timer);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
async function defaultProbe(route, signal) {
|
|
222
|
+
if (!route.targetUrl.startsWith("http://") && !route.targetUrl.startsWith("https://")) {
|
|
223
|
+
return route.health === "healthy";
|
|
224
|
+
}
|
|
225
|
+
const response = await fetch(new URL("/.well-known/solid", route.targetUrl), {
|
|
226
|
+
method: "HEAD",
|
|
227
|
+
signal
|
|
228
|
+
});
|
|
229
|
+
return response.ok || response.status === 401 || response.status === 403;
|
|
230
|
+
}
|