@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,57 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TUNNEL_PROVIDER_VALUES = void 0;
|
|
3
|
+
exports.tunnelProfileCredentialEnvKey = exports.tunnelProviderDescriptor = exports.isTunnelProviderId = exports.TUNNEL_ACTIVE_PROFILE_NONE = exports.TUNNEL_PROVIDER_VALUES = exports.TUNNEL_PROVIDER_IDS = void 0;
|
|
4
4
|
exports.resolveTunnelProfileState = resolveTunnelProfileState;
|
|
5
5
|
exports.selectActiveTunnelProfile = selectActiveTunnelProfile;
|
|
6
|
-
exports.
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
id: 'sakura_frp',
|
|
25
|
-
label: 'Sakura FRP',
|
|
26
|
-
publicUrlKeys: ['SAKURA_TUNNEL_URL', 'XPOD_TUNNEL_PUBLIC_URL'],
|
|
27
|
-
credentialEnvKey: 'SAKURA_TUNNEL_TOKEN',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
provider: 'frp',
|
|
31
|
-
id: 'frp',
|
|
32
|
-
label: 'FRP',
|
|
33
|
-
publicUrlKeys: ['FRP_TUNNEL_URL'],
|
|
34
|
-
credentialEnvKey: 'FRP_TUNNEL_TOKEN',
|
|
35
|
-
},
|
|
36
|
-
];
|
|
37
|
-
const PROVIDER_ALIASES = {
|
|
38
|
-
none: 'none',
|
|
39
|
-
ngrok: 'ngrok',
|
|
40
|
-
cloudflare: 'cloudflare',
|
|
41
|
-
'sakura-frp': 'sakura_frp',
|
|
42
|
-
sakura_frp: 'sakura_frp',
|
|
43
|
-
frp: 'frp',
|
|
44
|
-
};
|
|
6
|
+
exports.unconsumedProfileParameters = unconsumedProfileParameters;
|
|
7
|
+
const TunnelProviderCatalog_1 = require("./TunnelProviderCatalog");
|
|
8
|
+
Object.defineProperty(exports, "TUNNEL_PROVIDER_IDS", { enumerable: true, get: function () { return TunnelProviderCatalog_1.TUNNEL_PROVIDER_IDS; } });
|
|
9
|
+
Object.defineProperty(exports, "isTunnelProviderId", { enumerable: true, get: function () { return TunnelProviderCatalog_1.isTunnelProviderId; } });
|
|
10
|
+
Object.defineProperty(exports, "tunnelProfileCredentialEnvKey", { enumerable: true, get: function () { return TunnelProviderCatalog_1.tunnelProfileCredentialEnvKey; } });
|
|
11
|
+
Object.defineProperty(exports, "tunnelProviderDescriptor", { enumerable: true, get: function () { return TunnelProviderCatalog_1.tunnelProviderDescriptor; } });
|
|
12
|
+
exports.TUNNEL_PROVIDER_VALUES = TunnelProviderCatalog_1.TUNNEL_PROVIDER_IDS;
|
|
13
|
+
/** The canonical off value: an explicit "no tunnel" is a decision, not a missing value. */
|
|
14
|
+
exports.TUNNEL_ACTIVE_PROFILE_NONE = 'none';
|
|
15
|
+
/**
|
|
16
|
+
* Resolves the tunnel profile state for a runtime environment.
|
|
17
|
+
*
|
|
18
|
+
* Authority rules (they are what stops a closed tunnel from coming back):
|
|
19
|
+
* - `XPOD_TUNNEL_PROFILES` being **present** is authoritative — an empty list means "no
|
|
20
|
+
* profiles", never "fall back to the legacy keys".
|
|
21
|
+
* - `XPOD_TUNNEL_ACTIVE_PROFILE_ID` being **present** is authoritative — an empty value or
|
|
22
|
+
* `none` means "explicitly off" and suppresses the legacy provider and the auto-pick.
|
|
23
|
+
*/
|
|
45
24
|
function resolveTunnelProfileState(env) {
|
|
25
|
+
const profilesDeclared = env.XPOD_TUNNEL_PROFILES !== undefined;
|
|
46
26
|
const explicitProfiles = parseTunnelProfiles(env.XPOD_TUNNEL_PROFILES, env);
|
|
47
|
-
const profiles =
|
|
48
|
-
const activeProfileId = resolveActiveProfileId(env, profiles);
|
|
27
|
+
const profiles = profilesDeclared ? explicitProfiles : buildLegacyTunnelProfiles(env);
|
|
28
|
+
const activeProfileId = resolveActiveProfileId(env, profiles, profilesDeclared);
|
|
49
29
|
return selectActiveTunnelProfile(profiles, activeProfileId);
|
|
50
30
|
}
|
|
51
31
|
function selectActiveTunnelProfile(inputProfiles, activeProfileId) {
|
|
52
32
|
const profiles = normalizeProfiles(inputProfiles);
|
|
53
33
|
const requestedId = readString(activeProfileId);
|
|
54
|
-
|
|
34
|
+
if (requestedId === exports.TUNNEL_ACTIVE_PROFILE_NONE) {
|
|
35
|
+
return {
|
|
36
|
+
profiles,
|
|
37
|
+
activeProfileId: exports.TUNNEL_ACTIVE_PROFILE_NONE,
|
|
38
|
+
inactiveProfiles: profiles,
|
|
39
|
+
activeProvider: 'none',
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
const requested = requestedId ? profiles.find((profile) => profile.id === requestedId) : undefined;
|
|
43
|
+
const unsupported = requested && (0, TunnelProviderCatalog_1.tunnelProviderDescriptor)(requested.provider)?.runtimeSupported === false
|
|
44
|
+
? requested
|
|
45
|
+
: undefined;
|
|
46
|
+
const activeProfile = requested && !unsupported && canActivateProfile(requested) ? requested : undefined;
|
|
55
47
|
const inactiveProfiles = profiles.filter((profile) => profile.id !== activeProfile?.id);
|
|
56
48
|
return {
|
|
57
49
|
profiles,
|
|
@@ -59,22 +51,28 @@ function selectActiveTunnelProfile(inputProfiles, activeProfileId) {
|
|
|
59
51
|
activeProfile,
|
|
60
52
|
inactiveProfiles,
|
|
61
53
|
activeProvider: activeProfile?.provider ?? 'none',
|
|
54
|
+
...(unsupported
|
|
55
|
+
? { activationError: `provider ${unsupported.provider} has no local runtime implementation` }
|
|
56
|
+
: requested && !activeProfile
|
|
57
|
+
? { activationError: `profile ${requested.id} has no credential configured` }
|
|
58
|
+
: {}),
|
|
62
59
|
};
|
|
63
60
|
}
|
|
64
61
|
function buildLegacyTunnelProfiles(env) {
|
|
62
|
+
const legacyProvider = (0, TunnelProviderCatalog_1.parseTunnelProvider)(env.XPOD_TUNNEL_PROVIDER);
|
|
65
63
|
const profiles = [];
|
|
66
|
-
for (const
|
|
67
|
-
const publicUrl = readFirstUrl(env,
|
|
68
|
-
const credentialConfigured =
|
|
69
|
-
if (!publicUrl && !credentialConfigured &&
|
|
64
|
+
for (const descriptor of TunnelProviderCatalog_1.TUNNEL_PROVIDERS) {
|
|
65
|
+
const publicUrl = readFirstUrl(env, descriptor.legacyPublicUrlKeys);
|
|
66
|
+
const credentialConfigured = Boolean(readString(env[descriptor.legacyCredentialEnvKey]));
|
|
67
|
+
if (!publicUrl && !credentialConfigured && legacyProvider !== descriptor.id) {
|
|
70
68
|
continue;
|
|
71
69
|
}
|
|
72
70
|
profiles.push({
|
|
73
|
-
id:
|
|
74
|
-
provider:
|
|
75
|
-
label:
|
|
71
|
+
id: descriptor.id,
|
|
72
|
+
provider: descriptor.id,
|
|
73
|
+
label: descriptor.label,
|
|
76
74
|
publicUrl,
|
|
77
|
-
credentialEnvKey:
|
|
75
|
+
credentialEnvKey: descriptor.legacyCredentialEnvKey,
|
|
78
76
|
credentialConfigured,
|
|
79
77
|
});
|
|
80
78
|
}
|
|
@@ -82,7 +80,7 @@ function buildLegacyTunnelProfiles(env) {
|
|
|
82
80
|
}
|
|
83
81
|
function parseTunnelProfiles(value, env) {
|
|
84
82
|
const raw = readString(value);
|
|
85
|
-
if (
|
|
83
|
+
if (raw === undefined) {
|
|
86
84
|
return [];
|
|
87
85
|
}
|
|
88
86
|
try {
|
|
@@ -96,18 +94,22 @@ function parseTunnelProfiles(value, env) {
|
|
|
96
94
|
}
|
|
97
95
|
const record = item;
|
|
98
96
|
const id = readString(record.id);
|
|
99
|
-
const provider =
|
|
97
|
+
const provider = (0, TunnelProviderCatalog_1.parseTunnelProvider)(record.provider);
|
|
100
98
|
if (!id || !provider || provider === 'none') {
|
|
101
99
|
return [];
|
|
102
100
|
}
|
|
103
|
-
const credentialEnvKey =
|
|
101
|
+
const { key: credentialEnvKey, configured: credentialConfigured } = resolveProfileCredential(id, provider, env);
|
|
102
|
+
const parameters = readStringRecord(record.parameters);
|
|
104
103
|
return [{
|
|
105
104
|
id,
|
|
106
105
|
provider,
|
|
107
106
|
label: readString(record.label),
|
|
108
|
-
publicUrl
|
|
107
|
+
// `publicUrl` is canonical; `publicEndpoint` is the field the settings page used to
|
|
108
|
+
// write, so it is still read for profiles stored before the contract was unified.
|
|
109
|
+
publicUrl: normalizeUrl(readString(record.publicUrl) ?? readString(record.publicEndpoint)),
|
|
109
110
|
credentialEnvKey,
|
|
110
|
-
credentialConfigured
|
|
111
|
+
credentialConfigured,
|
|
112
|
+
...(parameters ? { parameters } : {}),
|
|
111
113
|
}];
|
|
112
114
|
});
|
|
113
115
|
}
|
|
@@ -115,60 +117,88 @@ function parseTunnelProfiles(value, env) {
|
|
|
115
117
|
return [];
|
|
116
118
|
}
|
|
117
119
|
}
|
|
120
|
+
function resolveProfileCredential(profileId, provider, env) {
|
|
121
|
+
const scopedKey = (0, TunnelProviderCatalog_1.tunnelProfileCredentialEnvKey)(profileId);
|
|
122
|
+
if (readString(env[scopedKey])) {
|
|
123
|
+
return { key: scopedKey, configured: true };
|
|
124
|
+
}
|
|
125
|
+
const legacyKey = (0, TunnelProviderCatalog_1.tunnelProviderDescriptor)(provider)?.legacyCredentialEnvKey;
|
|
126
|
+
if (legacyKey && readString(env[legacyKey])) {
|
|
127
|
+
return { key: legacyKey, configured: true };
|
|
128
|
+
}
|
|
129
|
+
// No credential anywhere: keep the profile-scoped key as the address to write to.
|
|
130
|
+
return { key: scopedKey, configured: false };
|
|
131
|
+
}
|
|
132
|
+
/** Keeps only string-valued parameters: anything else is not a value a provider can use. */
|
|
133
|
+
function readStringRecord(value) {
|
|
134
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
const entries = Object.entries(value)
|
|
138
|
+
.map(([key, item]) => [key, readString(item)])
|
|
139
|
+
.filter((entry) => entry[1] !== undefined);
|
|
140
|
+
return entries.length > 0 ? Object.fromEntries(entries) : undefined;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Parameters a profile declares that no provider implementation consumes.
|
|
144
|
+
*
|
|
145
|
+
* Reporting them is what keeps the settings form from collecting values with no effect:
|
|
146
|
+
* the fix is either to consume the parameter or to stop declaring the field.
|
|
147
|
+
*/
|
|
148
|
+
function unconsumedProfileParameters(profile, consumed = []) {
|
|
149
|
+
return Object.keys(profile.parameters ?? {}).filter((key) => !consumed.includes(key));
|
|
150
|
+
}
|
|
118
151
|
function normalizeProfiles(inputProfiles) {
|
|
119
152
|
const seen = new Set();
|
|
120
153
|
const profiles = [];
|
|
121
154
|
for (const profile of inputProfiles) {
|
|
122
155
|
const id = readString(profile.id);
|
|
123
|
-
const provider =
|
|
156
|
+
const provider = (0, TunnelProviderCatalog_1.parseTunnelProvider)(profile.provider);
|
|
124
157
|
if (!id || !provider || provider === 'none' || seen.has(id)) {
|
|
125
158
|
continue;
|
|
126
159
|
}
|
|
127
160
|
seen.add(id);
|
|
161
|
+
const parameters = readStringRecord(profile.parameters);
|
|
128
162
|
profiles.push({
|
|
129
163
|
id,
|
|
130
164
|
provider,
|
|
131
165
|
label: readString(profile.label),
|
|
132
166
|
publicUrl: normalizeUrl(profile.publicUrl),
|
|
133
|
-
credentialEnvKey: readString(profile.credentialEnvKey) ??
|
|
167
|
+
credentialEnvKey: readString(profile.credentialEnvKey) ?? (0, TunnelProviderCatalog_1.tunnelProfileCredentialEnvKey)(id),
|
|
134
168
|
credentialConfigured: profile.credentialConfigured,
|
|
169
|
+
...(parameters ? { parameters } : {}),
|
|
135
170
|
});
|
|
136
171
|
}
|
|
137
172
|
return profiles;
|
|
138
173
|
}
|
|
139
|
-
function resolveActiveProfileId(env, profiles) {
|
|
140
|
-
const
|
|
141
|
-
if (
|
|
142
|
-
return
|
|
174
|
+
function resolveActiveProfileId(env, profiles, profilesDeclared) {
|
|
175
|
+
const declaredActiveProfileId = env.XPOD_TUNNEL_ACTIVE_PROFILE_ID;
|
|
176
|
+
if (declaredActiveProfileId !== undefined) {
|
|
177
|
+
return readString(declaredActiveProfileId) ?? exports.TUNNEL_ACTIVE_PROFILE_NONE;
|
|
143
178
|
}
|
|
144
179
|
const legacyProviderRaw = readString(env.XPOD_TUNNEL_PROVIDER);
|
|
145
|
-
const legacyProvider =
|
|
180
|
+
const legacyProvider = (0, TunnelProviderCatalog_1.parseTunnelProvider)(legacyProviderRaw);
|
|
146
181
|
if (legacyProvider === 'none') {
|
|
147
|
-
return
|
|
182
|
+
return exports.TUNNEL_ACTIVE_PROFILE_NONE;
|
|
148
183
|
}
|
|
149
184
|
const legacyProfileId = legacyProviderToProfileId(legacyProviderRaw, profiles);
|
|
150
185
|
if (legacyProfileId) {
|
|
151
186
|
return legacyProfileId;
|
|
152
187
|
}
|
|
153
|
-
|
|
188
|
+
// Only an environment that never declared profiles may fall back to the implicit pick.
|
|
189
|
+
return profilesDeclared ? undefined : profiles.find(canActivateProfile)?.id;
|
|
154
190
|
}
|
|
155
191
|
function legacyProviderToProfileId(value, profiles) {
|
|
156
|
-
const provider =
|
|
192
|
+
const provider = (0, TunnelProviderCatalog_1.parseTunnelProvider)(value);
|
|
157
193
|
if (!provider || provider === 'none') {
|
|
158
194
|
return undefined;
|
|
159
195
|
}
|
|
160
196
|
return profiles.find((profile) => profile.provider === provider)?.id ?? provider;
|
|
161
197
|
}
|
|
162
|
-
function readLegacyProvider(value) {
|
|
163
|
-
return readProvider(value);
|
|
164
|
-
}
|
|
165
|
-
function readProvider(value) {
|
|
166
|
-
if (typeof value !== 'string') {
|
|
167
|
-
return undefined;
|
|
168
|
-
}
|
|
169
|
-
return PROVIDER_ALIASES[value.trim().toLowerCase()];
|
|
170
|
-
}
|
|
171
198
|
function canActivateProfile(profile) {
|
|
199
|
+
if ((0, TunnelProviderCatalog_1.tunnelProviderDescriptor)(profile.provider)?.runtimeSupported === false) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
172
202
|
if (profile.provider === 'ngrok') {
|
|
173
203
|
return true;
|
|
174
204
|
}
|
|
@@ -183,9 +213,6 @@ function readFirstUrl(env, keys) {
|
|
|
183
213
|
}
|
|
184
214
|
return undefined;
|
|
185
215
|
}
|
|
186
|
-
function defaultCredentialEnvKey(provider) {
|
|
187
|
-
return LEGACY_PROVIDER_SPECS.find((spec) => spec.provider === provider)?.credentialEnvKey;
|
|
188
|
-
}
|
|
189
216
|
function readString(value) {
|
|
190
217
|
return typeof value === 'string' && value.trim() ? value.trim() : undefined;
|
|
191
218
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* - CloudflareTunnelProvider: Cloudflare Tunnel(阶段 1)
|
|
6
6
|
* - FrpTunnelProvider: FRP(阶段 2,自建或第三方)
|
|
7
7
|
*/
|
|
8
|
+
import type { TunnelProviderId } from './TunnelProviderCatalog';
|
|
8
9
|
/**
|
|
9
10
|
* 隧道配置
|
|
10
11
|
*/
|
|
@@ -12,7 +13,8 @@ export interface TunnelConfig {
|
|
|
12
13
|
/** 子域名 (如 mynode,完整域名为 mynode.pods.undefieds.co) */
|
|
13
14
|
subdomain: string;
|
|
14
15
|
/** 隧道类型 */
|
|
15
|
-
provider
|
|
16
|
+
/** Canonical provider id from the tunnel provider catalogue. */
|
|
17
|
+
provider: TunnelProviderId;
|
|
16
18
|
/** 公网访问端点 (如 https://mynode.pods.undefieds.co) */
|
|
17
19
|
endpoint: string;
|
|
18
20
|
/** 本地 origin 地址 (如 http://localhost:5737),供隧道客户端转发 */
|
|
@@ -41,14 +43,25 @@ export interface TunnelSetupOptions {
|
|
|
41
43
|
/** 本地服务协议 */
|
|
42
44
|
localProtocol?: 'http' | 'https';
|
|
43
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Readiness stage of a tunnel, in the order a provider actually reaches them.
|
|
48
|
+
*
|
|
49
|
+
* `process-started` and `control-connected` are not readiness: only `proxy-ready` means the
|
|
50
|
+
* provider published the proxy, and even that is a claim the Gateway probe must confirm.
|
|
51
|
+
*/
|
|
52
|
+
export type TunnelStage = 'stopped' | 'process-started' | 'control-connected' | 'proxy-ready' | 'failed';
|
|
44
53
|
/**
|
|
45
54
|
* 隧道状态
|
|
46
55
|
*/
|
|
47
56
|
export interface TunnelStatus {
|
|
48
57
|
/** 是否正在运行 */
|
|
49
58
|
running: boolean;
|
|
50
|
-
/**
|
|
59
|
+
/** 连接状态;仅在 proxy-ready 阶段为 true */
|
|
51
60
|
connected: boolean;
|
|
61
|
+
/** 当前所处阶段 */
|
|
62
|
+
stage?: TunnelStage;
|
|
63
|
+
/** 外部探测确认可达的时间;缺省表示"未验证" */
|
|
64
|
+
verifiedAt?: Date;
|
|
52
65
|
/** 公网端点 */
|
|
53
66
|
endpoint?: string;
|
|
54
67
|
/** 错误信息 */
|
|
@@ -129,6 +129,14 @@
|
|
|
129
129
|
"@id": "undefineds:dist/tunnel/TunnelProvider.jsonld#TunnelStatus__member_connected",
|
|
130
130
|
"memberFieldName": "connected"
|
|
131
131
|
},
|
|
132
|
+
{
|
|
133
|
+
"@id": "undefineds:dist/tunnel/TunnelProvider.jsonld#TunnelStatus__member_stage",
|
|
134
|
+
"memberFieldName": "stage"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"@id": "undefineds:dist/tunnel/TunnelProvider.jsonld#TunnelStatus__member_verifiedAt",
|
|
138
|
+
"memberFieldName": "verifiedAt"
|
|
139
|
+
},
|
|
132
140
|
{
|
|
133
141
|
"@id": "undefineds:dist/tunnel/TunnelProvider.jsonld#TunnelStatus__member_endpoint",
|
|
134
142
|
"memberFieldName": "endpoint"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single declaration of the tunnel provider axis.
|
|
3
|
+
*
|
|
4
|
+
* Every provider-specific fact lives here exactly once: the display label, the legacy
|
|
5
|
+
* credential key, where the public entry comes from, whether the local runtime can start
|
|
6
|
+
* it, and the extra parameters the settings form renders. The API serves this catalog to
|
|
7
|
+
* the UI, so the settings page looks a fact up instead of keeping its own copy of the
|
|
8
|
+
* provider list (the drift between those copies is what produced the audit's N09).
|
|
9
|
+
*/
|
|
10
|
+
export declare const TUNNEL_PROVIDER_IDS: readonly ["ngrok", "cloudflare", "sakura_frp", "frp"];
|
|
11
|
+
export type TunnelProviderId = (typeof TUNNEL_PROVIDER_IDS)[number];
|
|
12
|
+
export type ActiveTunnelProvider = TunnelProviderId | 'none';
|
|
13
|
+
/**
|
|
14
|
+
* Where a provider's public entry comes from:
|
|
15
|
+
* - `discovered`: the provider reports it (ngrok agent API / logs), so nobody types it.
|
|
16
|
+
* - `declared`: it is a fact of the provider's own console, so an operator may declare it
|
|
17
|
+
* for display and DNS diagnostics — a declaration is never proof that it is reachable.
|
|
18
|
+
*/
|
|
19
|
+
export type TunnelEndpointSource = 'discovered' | 'declared';
|
|
20
|
+
export interface TunnelProviderParameterField {
|
|
21
|
+
key: string;
|
|
22
|
+
label: string;
|
|
23
|
+
}
|
|
24
|
+
export interface TunnelProviderDescriptor {
|
|
25
|
+
id: TunnelProviderId;
|
|
26
|
+
label: string;
|
|
27
|
+
/** Legacy provider-scoped credential key, still honoured for single-profile setups. */
|
|
28
|
+
legacyCredentialEnvKey: string;
|
|
29
|
+
/** Legacy env keys that used to declare this provider's public entry. */
|
|
30
|
+
legacyPublicUrlKeys: readonly string[];
|
|
31
|
+
endpointSource: TunnelEndpointSource;
|
|
32
|
+
/**
|
|
33
|
+
* Who decides which local port the tunnel forwards to.
|
|
34
|
+
*
|
|
35
|
+
* `runtime` means we dial the provider, so the port is ours to choose; `console` means the
|
|
36
|
+
* provider console holds that value and the operator has to copy this runtime's ingress
|
|
37
|
+
* address into it. The settings page renders the copy affordance from this fact instead of
|
|
38
|
+
* branching on a provider id.
|
|
39
|
+
*/
|
|
40
|
+
originOwner: 'runtime' | 'console';
|
|
41
|
+
/**
|
|
42
|
+
* Where the operator creates or edits this provider's tunnel.
|
|
43
|
+
*
|
|
44
|
+
* The settings page links to it, because a remotely-managed tunnel's origin (port) is a
|
|
45
|
+
* fact of that console: the operator copies this runtime's ingress address there.
|
|
46
|
+
*/
|
|
47
|
+
consoleUrl?: string;
|
|
48
|
+
/** Whether the local runtime has an implementation that can actually start it. */
|
|
49
|
+
runtimeSupported: boolean;
|
|
50
|
+
parameterFields: readonly TunnelProviderParameterField[];
|
|
51
|
+
}
|
|
52
|
+
export declare const TUNNEL_PROVIDERS: readonly TunnelProviderDescriptor[];
|
|
53
|
+
/** Normalizes any stored/legacy spelling onto the canonical provider vocabulary. */
|
|
54
|
+
export declare function parseTunnelProvider(value: unknown): ActiveTunnelProvider | undefined;
|
|
55
|
+
export declare function isTunnelProviderId(value: unknown): value is TunnelProviderId;
|
|
56
|
+
export declare function tunnelProviderDescriptor(id: unknown): TunnelProviderDescriptor | undefined;
|
|
57
|
+
export declare function tunnelProviderIds(): TunnelProviderId[];
|
|
58
|
+
/** Credential key namespace for one profile, so two profiles never share a secret. */
|
|
59
|
+
export declare const TUNNEL_PROFILE_CREDENTIAL_PREFIX = "XPOD_TUNNEL_PROFILE_";
|
|
60
|
+
/** Env key holding one profile's credential; the `_TOKEN` suffix keeps it secret-classified. */
|
|
61
|
+
export declare function tunnelProfileCredentialEnvKey(profileId: string): string;
|
|
62
|
+
export declare function isTunnelProfileCredentialEnvKey(key: string): boolean;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The single declaration of the tunnel provider axis.
|
|
4
|
+
*
|
|
5
|
+
* Every provider-specific fact lives here exactly once: the display label, the legacy
|
|
6
|
+
* credential key, where the public entry comes from, whether the local runtime can start
|
|
7
|
+
* it, and the extra parameters the settings form renders. The API serves this catalog to
|
|
8
|
+
* the UI, so the settings page looks a fact up instead of keeping its own copy of the
|
|
9
|
+
* provider list (the drift between those copies is what produced the audit's N09).
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TUNNEL_PROFILE_CREDENTIAL_PREFIX = exports.TUNNEL_PROVIDERS = exports.TUNNEL_PROVIDER_IDS = void 0;
|
|
13
|
+
exports.parseTunnelProvider = parseTunnelProvider;
|
|
14
|
+
exports.isTunnelProviderId = isTunnelProviderId;
|
|
15
|
+
exports.tunnelProviderDescriptor = tunnelProviderDescriptor;
|
|
16
|
+
exports.tunnelProviderIds = tunnelProviderIds;
|
|
17
|
+
exports.tunnelProfileCredentialEnvKey = tunnelProfileCredentialEnvKey;
|
|
18
|
+
exports.isTunnelProfileCredentialEnvKey = isTunnelProfileCredentialEnvKey;
|
|
19
|
+
exports.TUNNEL_PROVIDER_IDS = ['ngrok', 'cloudflare', 'sakura_frp', 'frp'];
|
|
20
|
+
/**
|
|
21
|
+
* Generic FRP is the one axis whose endpoints are its own facts, so it is also the only one
|
|
22
|
+
* that declares parameters. A field may only be declared here when an implementation
|
|
23
|
+
* consumes it: a field that reaches no provider makes the settings form collect values with
|
|
24
|
+
* no effect, which is what the provider-contract audit (N09/N10) was about.
|
|
25
|
+
*/
|
|
26
|
+
const FRP_PARAMETER_FIELDS = [
|
|
27
|
+
{ key: 'serverHost', label: 'Server host' },
|
|
28
|
+
{ key: 'serverPort', label: 'Server port' },
|
|
29
|
+
{ key: 'remotePort', label: 'Remote port' },
|
|
30
|
+
];
|
|
31
|
+
exports.TUNNEL_PROVIDERS = [
|
|
32
|
+
{
|
|
33
|
+
id: 'ngrok',
|
|
34
|
+
label: 'ngrok',
|
|
35
|
+
legacyCredentialEnvKey: 'NGROK_AUTHTOKEN',
|
|
36
|
+
legacyPublicUrlKeys: ['NGROK_URL'],
|
|
37
|
+
endpointSource: 'discovered',
|
|
38
|
+
originOwner: 'runtime',
|
|
39
|
+
consoleUrl: 'https://dashboard.ngrok.com/',
|
|
40
|
+
runtimeSupported: true,
|
|
41
|
+
// Nothing to declare: ngrok 3 selects the endpoint with `--url` (already carried by
|
|
42
|
+
// `publicUrl`) and has no per-run region flag, so a "region" or "hostname" field here
|
|
43
|
+
// would be collected and ignored.
|
|
44
|
+
parameterFields: [],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 'cloudflare',
|
|
48
|
+
label: 'Cloudflare Tunnel',
|
|
49
|
+
legacyCredentialEnvKey: 'CLOUDFLARE_TUNNEL_TOKEN',
|
|
50
|
+
legacyPublicUrlKeys: ['CLOUDFLARE_TUNNEL_URL', 'XPOD_TUNNEL_PUBLIC_URL'],
|
|
51
|
+
// The hostname is configured in the Cloudflare dashboard and cloudflared is only
|
|
52
|
+
// started with `--token` plus the local origin.
|
|
53
|
+
endpointSource: 'declared',
|
|
54
|
+
originOwner: 'console',
|
|
55
|
+
consoleUrl: 'https://one.dash.cloudflare.com/',
|
|
56
|
+
runtimeSupported: true,
|
|
57
|
+
// The dashboard owns the tunnel id and hostname; the hostname is already carried by
|
|
58
|
+
// `publicUrl`, so repeating it as a parameter would be two keys for one semantic.
|
|
59
|
+
parameterFields: [],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'sakura_frp',
|
|
63
|
+
label: 'Sakura FRP',
|
|
64
|
+
legacyCredentialEnvKey: 'SAKURA_TUNNEL_TOKEN',
|
|
65
|
+
legacyPublicUrlKeys: ['SAKURA_TUNNEL_URL', 'XPOD_TUNNEL_PUBLIC_URL'],
|
|
66
|
+
// The console only asks for a node and a local port: the public entry (node host +
|
|
67
|
+
// assigned remote port, or a bound domain) is assigned by the platform, so it is read
|
|
68
|
+
// back through the SakuraFrp API instead of being typed by the operator.
|
|
69
|
+
endpointSource: 'discovered',
|
|
70
|
+
originOwner: 'console',
|
|
71
|
+
consoleUrl: 'https://www.natfrp.com/tunnel/',
|
|
72
|
+
runtimeSupported: true,
|
|
73
|
+
// Node, remote port and domain are platform-assigned, so there is nothing to declare.
|
|
74
|
+
parameterFields: [],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'frp',
|
|
78
|
+
label: 'FRP',
|
|
79
|
+
legacyCredentialEnvKey: 'FRP_TUNNEL_TOKEN',
|
|
80
|
+
legacyPublicUrlKeys: ['FRP_TUNNEL_URL'],
|
|
81
|
+
endpointSource: 'declared',
|
|
82
|
+
originOwner: 'console',
|
|
83
|
+
// Local mode registers no implementation for the generic FRP axis yet; declaring
|
|
84
|
+
// this true would let the UI save a profile that can never start.
|
|
85
|
+
runtimeSupported: false,
|
|
86
|
+
parameterFields: FRP_PARAMETER_FIELDS,
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
const PROVIDER_ALIASES = {
|
|
90
|
+
none: 'none',
|
|
91
|
+
ngrok: 'ngrok',
|
|
92
|
+
cloudflare: 'cloudflare',
|
|
93
|
+
'sakura-frp': 'sakura_frp',
|
|
94
|
+
sakura_frp: 'sakura_frp',
|
|
95
|
+
frp: 'frp',
|
|
96
|
+
};
|
|
97
|
+
/** Normalizes any stored/legacy spelling onto the canonical provider vocabulary. */
|
|
98
|
+
function parseTunnelProvider(value) {
|
|
99
|
+
if (typeof value !== 'string') {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
return PROVIDER_ALIASES[value.trim().toLowerCase()];
|
|
103
|
+
}
|
|
104
|
+
function isTunnelProviderId(value) {
|
|
105
|
+
return parseTunnelProvider(value) !== undefined && parseTunnelProvider(value) !== 'none';
|
|
106
|
+
}
|
|
107
|
+
function tunnelProviderDescriptor(id) {
|
|
108
|
+
const provider = parseTunnelProvider(id);
|
|
109
|
+
if (!provider || provider === 'none') {
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
return exports.TUNNEL_PROVIDERS.find((descriptor) => descriptor.id === provider);
|
|
113
|
+
}
|
|
114
|
+
function tunnelProviderIds() {
|
|
115
|
+
return exports.TUNNEL_PROVIDERS.map((descriptor) => descriptor.id);
|
|
116
|
+
}
|
|
117
|
+
/** Credential key namespace for one profile, so two profiles never share a secret. */
|
|
118
|
+
exports.TUNNEL_PROFILE_CREDENTIAL_PREFIX = 'XPOD_TUNNEL_PROFILE_';
|
|
119
|
+
/** Env key holding one profile's credential; the `_TOKEN` suffix keeps it secret-classified. */
|
|
120
|
+
function tunnelProfileCredentialEnvKey(profileId) {
|
|
121
|
+
const sanitized = profileId
|
|
122
|
+
.toUpperCase()
|
|
123
|
+
.replace(/[^A-Z0-9]+/gu, '_')
|
|
124
|
+
.replace(/^_+|_+$/gu, '');
|
|
125
|
+
return `${exports.TUNNEL_PROFILE_CREDENTIAL_PREFIX}${sanitized || 'DEFAULT'}_TOKEN`;
|
|
126
|
+
}
|
|
127
|
+
function isTunnelProfileCredentialEnvKey(key) {
|
|
128
|
+
return key.startsWith(exports.TUNNEL_PROFILE_CREDENTIAL_PREFIX) && key.endsWith('_TOKEN');
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=TunnelProviderCatalog.js.map
|
package/dist/tunnel/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export type { TunnelProvider, TunnelConfig, TunnelSetupOptions, TunnelStatus, }
|
|
|
2
2
|
export { CloudflareTunnelProvider, type CloudflareTunnelProviderOptions, } from './CloudflareTunnelProvider';
|
|
3
3
|
export { LocalTunnelProvider, type LocalTunnelProviderOptions, } from './LocalTunnelProvider';
|
|
4
4
|
export { NgrokTunnelProvider, type NgrokTunnelProviderOptions, } from './NgrokTunnelProvider';
|
|
5
|
+
export { AutoTunnelProvider, type AutoTunnelCandidate, type AutoTunnelProviderOptions, } from './AutoTunnelProvider';
|
|
5
6
|
export type { ActiveTunnelProvider, TunnelProfile, TunnelProfileProvider, TunnelProfileState, } from './TunnelProfiles';
|
|
6
7
|
export { resolveTunnelProfileState, selectActiveTunnelProfile, } from './TunnelProfiles';
|
package/dist/tunnel/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.selectActiveTunnelProfile = exports.resolveTunnelProfileState = exports.NgrokTunnelProvider = exports.LocalTunnelProvider = exports.CloudflareTunnelProvider = void 0;
|
|
3
|
+
exports.selectActiveTunnelProfile = exports.resolveTunnelProfileState = exports.AutoTunnelProvider = exports.NgrokTunnelProvider = exports.LocalTunnelProvider = exports.CloudflareTunnelProvider = void 0;
|
|
4
4
|
var CloudflareTunnelProvider_1 = require("./CloudflareTunnelProvider");
|
|
5
5
|
Object.defineProperty(exports, "CloudflareTunnelProvider", { enumerable: true, get: function () { return CloudflareTunnelProvider_1.CloudflareTunnelProvider; } });
|
|
6
6
|
var LocalTunnelProvider_1 = require("./LocalTunnelProvider");
|
|
7
7
|
Object.defineProperty(exports, "LocalTunnelProvider", { enumerable: true, get: function () { return LocalTunnelProvider_1.LocalTunnelProvider; } });
|
|
8
8
|
var NgrokTunnelProvider_1 = require("./NgrokTunnelProvider");
|
|
9
9
|
Object.defineProperty(exports, "NgrokTunnelProvider", { enumerable: true, get: function () { return NgrokTunnelProvider_1.NgrokTunnelProvider; } });
|
|
10
|
+
var AutoTunnelProvider_1 = require("./AutoTunnelProvider");
|
|
11
|
+
Object.defineProperty(exports, "AutoTunnelProvider", { enumerable: true, get: function () { return AutoTunnelProvider_1.AutoTunnelProvider; } });
|
|
10
12
|
var TunnelProfiles_1 = require("./TunnelProfiles");
|
|
11
13
|
Object.defineProperty(exports, "resolveTunnelProfileState", { enumerable: true, get: function () { return TunnelProfiles_1.resolveTunnelProfileState; } });
|
|
12
14
|
Object.defineProperty(exports, "selectActiveTunnelProfile", { enumerable: true, get: function () { return TunnelProfiles_1.selectActiveTunnelProfile; } });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiConnectAttempt, AiProviderCredentialSummary, AiProviderOffering } from '
|
|
1
|
+
import type { AiConnectAttempt, AiProviderCredentialSummary, AiProviderOffering } from './contract/ai-connections-client';
|
|
2
2
|
import type { AiProviderDefinition } from './controller';
|
|
3
3
|
import type { ProviderConnectionState } from './AiProviderCard';
|
|
4
4
|
export declare function AiApiKeyPool({ definition, offering, createOfferings, status, credentials, attempt, apiKey, baseUrl, busy, disabled, error, onApiKeyChange, onBaseUrlChange, onBeginApiKey, onBeginBrowser, onSaveApiKey, onDisconnect, onCreateApiKeyCredential, onUpdateCredential, initialEditing, initialCreate, onSavingChange, onCloseEdit, }: {
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { Button, Input, cn } from '@undefineds.co/shared-ui';
|
|
4
4
|
import { ExternalLink, Eye, EyeOff, KeyRound, Loader2, LogOut, Plus, RotateCw } from 'lucide-react';
|
|
5
|
-
import { normalizeProxyUrl } from '
|
|
5
|
+
import { normalizeProxyUrl } from './contract/ai-connections-client.js';
|
|
6
6
|
import { offeringTitle } from './offering-label.js';
|
|
7
7
|
import { authorizationMethodsForOffering, isApiKeyMethod } from './authorization-methods.js';
|
|
8
8
|
import { nextCredentialPriority } from './credential-labels.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiConnectionsMode, AiProviderAuthorizationMethod, AiProviderOffering } from '
|
|
1
|
+
import type { AiConnectionsMode, AiProviderAuthorizationMethod, AiProviderOffering } from './contract/ai-connections-client';
|
|
2
2
|
/**
|
|
3
3
|
* The offering's own entries, one button per declared `authorizationMethod`.
|
|
4
4
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AiClientConfigurationModel } from '@undefineds.co/extension-sdk/web';
|
|
2
|
-
import { normalizeV1Endpoint } from '
|
|
2
|
+
import { normalizeV1Endpoint } from './contract/endpoint-urls';
|
|
3
3
|
export declare const AI_CONNECTIONS_CLIENTS: readonly ["codex", "claude-code", "pi", "codebuddy"];
|
|
4
4
|
export type AiConnectionsClientId = (typeof AI_CONNECTIONS_CLIENTS)[number];
|
|
5
5
|
export interface AiClientConfigurationStatus {
|
|
@@ -4,7 +4,7 @@ import { Badge, Button, Input, } from '@undefineds.co/shared-ui';
|
|
|
4
4
|
import { RotateCcw, SquareTerminal } from 'lucide-react';
|
|
5
5
|
import { aiConnectionsErrorMessage } from './error-wording.js';
|
|
6
6
|
import { getClientAvatar } from './client-visuals.js';
|
|
7
|
-
import { normalizeMessagesEndpoint, normalizeV1Endpoint } from '
|
|
7
|
+
import { normalizeMessagesEndpoint, normalizeV1Endpoint } from './contract/endpoint-urls.js';
|
|
8
8
|
import { AiCopyButton } from './AiCopyButton.js';
|
|
9
9
|
export const AI_CONNECTIONS_CLIENTS = ['codex', 'claude-code', 'pi', 'codebuddy'];
|
|
10
10
|
export const AI_CLIENT_LABELS = {
|
|
@@ -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
|
import type { AiProviderDefinition } from './controller';
|
|
3
3
|
import type { ProviderConnectionState } from './AiProviderCard';
|
|
4
4
|
import type { AiOfferingActionError } from './AiCredentialPoolSection';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AiConnectionsClient, type AiConnectionsProvider, type AiProviderConnectionSummary, type AiProviderSummary } from '
|
|
1
|
+
import { type AiConnectionsClient, type AiConnectionsProvider, type AiProviderConnectionSummary, type AiProviderSummary } from './contract/ai-connections-client';
|
|
2
2
|
import { type AiConnectionsWorkspaceSection, type ProviderProductState } from './controller';
|
|
3
3
|
import type { AiClientConfigurationBridge } from './AiClientConfigurationSection';
|
|
4
4
|
import { type CredentialRow } from './collections';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AiConnectAttempt, AiConnectionsMode, AiProviderAuthorizationMethod, AiProviderCredentialSummary, AiProviderOffering, AiProviderSummary, AiQuotaSnapshot } from '
|
|
1
|
+
import type { AiConnectAttempt, AiConnectionsMode, AiProviderAuthorizationMethod, AiProviderCredentialSummary, AiProviderOffering, AiProviderSummary, AiQuotaSnapshot } from './contract/ai-connections-client';
|
|
2
2
|
import type { AiProviderDefinition } from './controller';
|
|
3
3
|
import type { ProviderConnectionState } from './AiProviderCard';
|
|
4
4
|
export interface AiOfferingActionError {
|
|
@@ -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 AiCredentialRow({ credential, label, busy, disabled, dragHandle, kindLabel, quota, onToggle, onTest, onEdit, onDelete, deleteAriaLabel, }: {
|
|
4
4
|
credential: AiProviderCredentialSummary;
|
|
5
5
|
label: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreateApiKeyCredentialInput } from '
|
|
1
|
+
import type { CreateApiKeyCredentialInput } from './contract/ai-connections-client';
|
|
2
2
|
export type CustomProviderCompatibility = 'auto' | 'openai' | 'anthropic';
|
|
3
3
|
export interface CustomProviderValue extends CreateApiKeyCredentialInput {
|
|
4
4
|
compatibility: CustomProviderCompatibility;
|