@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
|
@@ -22,6 +22,7 @@ const store_1 = require("../runs/store");
|
|
|
22
22
|
const schema_3 = require("../tasks/schema");
|
|
23
23
|
const store_2 = require("../tasks/store");
|
|
24
24
|
const TaskAuthBinding_1 = require("../tasks/TaskAuthBinding");
|
|
25
|
+
const OwnerPodAccess_1 = require("../ai-gateway/pod/OwnerPodAccess");
|
|
25
26
|
const AuthContext_1 = require("../auth/AuthContext");
|
|
26
27
|
const provider_1 = require("../../ai/schema/provider");
|
|
27
28
|
const model_1 = require("../../ai/schema/model");
|
|
@@ -60,7 +61,7 @@ class PodChatKitStore {
|
|
|
60
61
|
this.logger = (0, global_logger_factory_1.getLoggerFor)(this);
|
|
61
62
|
// Track recently created message IDs to avoid SELECT cache timing issues
|
|
62
63
|
this.recentlyCreatedIds = new Set();
|
|
63
|
-
this.
|
|
64
|
+
this.podAccess = options.podAccess;
|
|
64
65
|
this.credentialSecretDecoder = options.credentialSecretDecoder ?? AiCredentialSecret_1.defaultAiCredentialSecretDecoder;
|
|
65
66
|
this.deployment = options.deployment;
|
|
66
67
|
this.serverGroupReconcilerService = options.serverGroupReconcilerService;
|
|
@@ -92,110 +93,38 @@ class PodChatKitStore {
|
|
|
92
93
|
return context._cachedDb;
|
|
93
94
|
}
|
|
94
95
|
const auth = context.auth;
|
|
95
|
-
if (!auth || !(0, AuthContext_1.isSolidAuth)(auth)) {
|
|
96
|
+
if (!auth || !(0, AuthContext_1.isSolidAuth)(auth) || !auth.webId) {
|
|
96
97
|
this.logger.warn('No valid solid auth in context, cannot access Pod');
|
|
97
98
|
return null;
|
|
98
99
|
}
|
|
99
|
-
//
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
if (auth.tokenType === 'DPoP') {
|
|
103
|
-
this.logger.warn('Using DPoP access token without proof key; Pod access may fail if issuer enforces DPoP proof');
|
|
104
|
-
}
|
|
105
|
-
this.logger.info(`[getDb] Using access token path for webId: ${auth.webId}`);
|
|
106
|
-
const authFetch = this.createAccessTokenFetch(auth.accessToken, auth.tokenType);
|
|
107
|
-
const db = (0, drizzle_solid_1.drizzle)({ fetch: authFetch, info: { webId: auth.webId, isLoggedIn: true } }, { schema });
|
|
108
|
-
this.logger.info(`Initializing tables for Pod (access token): ${auth.webId}`);
|
|
109
|
-
try {
|
|
110
|
-
await db.init(schema_1.Chat, schema_1.Thread, schema_1.Message, schema_2.Run, schema_2.RunStep, schema_3.Task, config_1.AIConfig, tables_1.Credential);
|
|
111
|
-
this.logger.info('Tables initialized successfully');
|
|
112
|
-
}
|
|
113
|
-
catch (initError) {
|
|
114
|
-
this.logger.error(`Failed to init tables: ${initError}`);
|
|
115
|
-
}
|
|
116
|
-
context._cachedDb = db;
|
|
117
|
-
context._cachedFetch = authFetch;
|
|
118
|
-
context._cachedWebId = auth.webId;
|
|
119
|
-
this.ensurePodBaseUrlCache(context, db, auth.webId);
|
|
120
|
-
return db;
|
|
121
|
-
}
|
|
122
|
-
catch (error) {
|
|
123
|
-
this.logger.error(`Failed to get Pod db with access token: ${error}`);
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
if (!auth.clientId || !auth.clientSecret) {
|
|
128
|
-
this.logger.warn('No accessToken and no valid client credentials in context, cannot access Pod');
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
// Fallback path: exchange client credentials for an access token directly.
|
|
132
|
-
this.logger.info(`[getDb] Using client credentials path for clientId: ${auth.clientId}`);
|
|
100
|
+
// One credential path for every caller: the owner's own Pod key, exchanged for a
|
|
101
|
+
// token this process can prove, or the caller's reusable token.
|
|
102
|
+
let podFetch;
|
|
133
103
|
try {
|
|
134
|
-
|
|
135
|
-
const webId = auth.webId ?? this.getWebId(context);
|
|
136
|
-
if (!webId) {
|
|
137
|
-
throw new Error('Missing webId for client credentials auth');
|
|
138
|
-
}
|
|
139
|
-
this.logger.info(`[getDb] Client credentials token acquired, webId: ${webId}`);
|
|
140
|
-
const db = (0, drizzle_solid_1.drizzle)({ fetch: this.createAccessTokenFetch(token.accessToken, token.tokenType), info: { webId, isLoggedIn: true } }, { schema });
|
|
141
|
-
const authFetch = this.createAccessTokenFetch(token.accessToken, token.tokenType);
|
|
142
|
-
this.logger.info(`Initializing tables for Pod: ${webId}`);
|
|
143
|
-
try {
|
|
144
|
-
await db.init(schema_1.Chat, schema_1.Thread, schema_1.Message, schema_2.Run, schema_2.RunStep, schema_3.Task, config_1.AIConfig, tables_1.Credential);
|
|
145
|
-
this.logger.info('Tables initialized successfully');
|
|
146
|
-
}
|
|
147
|
-
catch (initError) {
|
|
148
|
-
this.logger.error(`Failed to init tables: ${initError}`);
|
|
149
|
-
}
|
|
150
|
-
context._cachedDb = db;
|
|
151
|
-
context._cachedFetch = authFetch;
|
|
152
|
-
context._cachedWebId = webId;
|
|
153
|
-
this.ensurePodBaseUrlCache(context, db, webId);
|
|
154
|
-
context._cachedAccessToken = token.accessToken;
|
|
155
|
-
context._cachedTokenType = token.tokenType;
|
|
156
|
-
return db;
|
|
104
|
+
podFetch = await this.podAccess?.getPodFetch(auth.webId, { auth });
|
|
157
105
|
}
|
|
158
106
|
catch (error) {
|
|
159
|
-
this.logger.error(`Failed to
|
|
107
|
+
this.logger.error(`Failed to obtain Pod access for ${auth.webId}: ${error}`);
|
|
160
108
|
return null;
|
|
161
109
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
method: 'POST',
|
|
166
|
-
headers: {
|
|
167
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
168
|
-
},
|
|
169
|
-
body: new URLSearchParams({
|
|
170
|
-
grant_type: 'client_credentials',
|
|
171
|
-
client_id: clientId,
|
|
172
|
-
client_secret: clientSecret,
|
|
173
|
-
}),
|
|
174
|
-
});
|
|
175
|
-
if (!response.ok) {
|
|
176
|
-
throw new Error(`Client credentials token request failed: ${response.status} ${await response.text().catch(() => '')}`);
|
|
110
|
+
if (!podFetch) {
|
|
111
|
+
this.logger.warn(`No usable Pod credential for ${auth.webId}: ${(0, OwnerPodAccess_1.podAccessError)(auth.webId, auth)}`);
|
|
112
|
+
return null;
|
|
177
113
|
}
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
|
|
114
|
+
const db = (0, drizzle_solid_1.drizzle)({ fetch: podFetch, info: { webId: auth.webId, isLoggedIn: true } }, { schema });
|
|
115
|
+
this.logger.info(`Initializing tables for Pod: ${auth.webId}`);
|
|
116
|
+
try {
|
|
117
|
+
await db.init(schema_1.Chat, schema_1.Thread, schema_1.Message, schema_2.Run, schema_2.RunStep, schema_3.Task, config_1.AIConfig, tables_1.Credential);
|
|
118
|
+
this.logger.info('Tables initialized successfully');
|
|
181
119
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
return
|
|
190
|
-
const headers = new Headers(init?.headers);
|
|
191
|
-
if (!headers.has('Authorization')) {
|
|
192
|
-
headers.set('Authorization', `${scheme} ${accessToken}`);
|
|
193
|
-
}
|
|
194
|
-
return fetch(input, {
|
|
195
|
-
...init,
|
|
196
|
-
headers,
|
|
197
|
-
});
|
|
198
|
-
};
|
|
120
|
+
catch (initError) {
|
|
121
|
+
this.logger.error(`Failed to init tables: ${initError}`);
|
|
122
|
+
}
|
|
123
|
+
context._cachedDb = db;
|
|
124
|
+
context._cachedFetch = podFetch;
|
|
125
|
+
context._cachedWebId = auth.webId;
|
|
126
|
+
this.ensurePodBaseUrlCache(context, db, auth.webId);
|
|
127
|
+
return db;
|
|
199
128
|
}
|
|
200
129
|
/**
|
|
201
130
|
* 从 context 获取 webId
|
|
@@ -27,7 +27,10 @@ const InvocationTokenCodec_1 = require("../ai-gateway/auth/InvocationTokenCodec"
|
|
|
27
27
|
const GatewayApiKeyAuthenticator_1 = require("../ai-gateway/auth/GatewayApiKeyAuthenticator");
|
|
28
28
|
const GatewayKeyLocatorCodec_1 = require("../ai-gateway/auth/GatewayKeyLocatorCodec");
|
|
29
29
|
const PodGatewayAccessKeyRepository_1 = require("../ai-gateway/auth/PodGatewayAccessKeyRepository");
|
|
30
|
-
const
|
|
30
|
+
const OwnerPodAccess_1 = require("../ai-gateway/pod/OwnerPodAccess");
|
|
31
|
+
const HostedPodRoute_1 = require("../ai-gateway/pod/HostedPodRoute");
|
|
32
|
+
const PodInterfaceKeyRepository_1 = require("../../identity/drizzle/PodInterfaceKeyRepository");
|
|
33
|
+
const PodInterfaceKeyStore_1 = require("../ai-gateway/pod/PodInterfaceKeyStore");
|
|
31
34
|
const AiGatewayService_1 = require("../ai-gateway/AiGatewayService");
|
|
32
35
|
const PlaintextCredentialVault_1 = require("../ai-gateway/credentials/PlaintextCredentialVault");
|
|
33
36
|
const AiCredentialSecretDecoder_1 = require("../ai-gateway/credentials/AiCredentialSecretDecoder");
|
|
@@ -139,10 +142,21 @@ function registerCommonServices(container) {
|
|
|
139
142
|
scopes: ['quota:write', 'usage:read', 'account:manage', 'network:read', 'network:write'],
|
|
140
143
|
});
|
|
141
144
|
}).singleton(),
|
|
142
|
-
|
|
143
|
-
return new
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
ownerPodAccess: (0, awilix_1.asFunction)(({ config, db }) => {
|
|
146
|
+
return new OwnerPodAccess_1.OwnerPodAccess({
|
|
147
|
+
keys: new PodInterfaceKeyStore_1.PodInterfaceKeyStore({
|
|
148
|
+
repository: new PodInterfaceKeyRepository_1.PodInterfaceKeyRepository(db),
|
|
149
|
+
vault: credentialVaultForConfig(config),
|
|
150
|
+
}),
|
|
151
|
+
tokenEndpoint: config.cssTokenEndpoint,
|
|
152
|
+
publicBaseUrl: config.solidBaseUrl,
|
|
153
|
+
route: (0, HostedPodRoute_1.resolveHostedPodRoute)({
|
|
154
|
+
canonicalBaseUrl: config.solidBaseUrl,
|
|
155
|
+
// API_HOST is the address the runtime bound its services to; XPOD_MAIN_PORT is the
|
|
156
|
+
// Gateway's. Both are read here, while the runtime still has its environment applied.
|
|
157
|
+
gatewayHost: process.env.API_HOST,
|
|
158
|
+
gatewayPort: process.env.XPOD_MAIN_PORT,
|
|
159
|
+
}),
|
|
146
160
|
});
|
|
147
161
|
}).singleton(),
|
|
148
162
|
invocationTokenCodec: (0, awilix_1.asFunction)(() => {
|
|
@@ -156,7 +170,7 @@ function registerCommonServices(container) {
|
|
|
156
170
|
});
|
|
157
171
|
}).singleton(),
|
|
158
172
|
gatewayAccessKeyRepository: (0, awilix_1.asFunction)((cradle) => {
|
|
159
|
-
const { config,
|
|
173
|
+
const { config, ownerPodAccess } = cradle;
|
|
160
174
|
return new PodGatewayAccessKeyRepository_1.PodGatewayAccessKeyRepository({
|
|
161
175
|
locatorCodec: new GatewayKeyLocatorCodec_1.AesGatewayKeyLocatorCodec({
|
|
162
176
|
active: {
|
|
@@ -165,7 +179,7 @@ function registerCommonServices(container) {
|
|
|
165
179
|
},
|
|
166
180
|
previous: config.gatewayPreviousLocatorSecrets,
|
|
167
181
|
}),
|
|
168
|
-
|
|
182
|
+
podAccess: ownerPodAccess,
|
|
169
183
|
podBaseUrlResolver: podBaseUrlResolver(cradle),
|
|
170
184
|
});
|
|
171
185
|
}).singleton(),
|
|
@@ -180,9 +194,8 @@ function registerCommonServices(container) {
|
|
|
180
194
|
}).singleton(),
|
|
181
195
|
providerConnectService: (0, awilix_1.asFunction)((cradle) => {
|
|
182
196
|
const { config } = cradle;
|
|
183
|
-
const internalPodAccess = cradle.hostedPodDataAccess;
|
|
184
197
|
const credentialRepository = new connect_1.PodConnectedCredentialRepository({
|
|
185
|
-
|
|
198
|
+
podAccess: cradle.ownerPodAccess,
|
|
186
199
|
podBaseUrlResolver: podBaseUrlResolver(cradle),
|
|
187
200
|
});
|
|
188
201
|
const vault = credentialVaultForConfig(config);
|
|
@@ -253,24 +266,24 @@ function registerCommonServices(container) {
|
|
|
253
266
|
systemProxy: config.edition === 'local' ? (0, provider_http_transport_1.discoverSystemProviderProxy)() : undefined,
|
|
254
267
|
})).singleton(),
|
|
255
268
|
gatewayCredentialStore: (0, awilix_1.asFunction)((cradle) => {
|
|
256
|
-
const {
|
|
269
|
+
const { ownerPodAccess } = cradle;
|
|
257
270
|
return new connect_1.PodConnectedCredentialRepository({
|
|
258
|
-
|
|
271
|
+
podAccess: ownerPodAccess,
|
|
259
272
|
podBaseUrlResolver: podBaseUrlResolver(cradle),
|
|
260
273
|
});
|
|
261
274
|
}).singleton(),
|
|
262
275
|
podModelSelectionRepository: (0, awilix_1.asFunction)((cradle) => {
|
|
263
|
-
const {
|
|
276
|
+
const { ownerPodAccess } = cradle;
|
|
264
277
|
return new PodModelSelectionRepository_1.PodModelSelectionRepository({
|
|
265
|
-
|
|
278
|
+
podAccess: ownerPodAccess,
|
|
266
279
|
podBaseUrlResolver: podBaseUrlResolver(cradle),
|
|
267
280
|
});
|
|
268
281
|
}).singleton(),
|
|
269
282
|
providerModelSelectionService: (0, awilix_1.asFunction)((cradle) => {
|
|
270
|
-
const { config, gatewayProviderRegistry,
|
|
283
|
+
const { config, gatewayProviderRegistry, ownerPodAccess, podModelSelectionRepository, providerModelsService, } = cradle;
|
|
271
284
|
return new ProviderModelSelectionService_1.ProviderModelSelectionService({
|
|
272
285
|
credentialRepository: new connect_1.PodConnectedCredentialRepository({
|
|
273
|
-
|
|
286
|
+
podAccess: ownerPodAccess,
|
|
274
287
|
podBaseUrlResolver: podBaseUrlResolver(cradle),
|
|
275
288
|
}),
|
|
276
289
|
selectionRepository: podModelSelectionRepository,
|
|
@@ -346,14 +359,14 @@ function registerCommonServices(container) {
|
|
|
346
359
|
}).singleton(),
|
|
347
360
|
providerQuotaService: (0, awilix_1.asFunction)((cradle) => {
|
|
348
361
|
const { config } = cradle;
|
|
349
|
-
const
|
|
362
|
+
const podAccess = cradle.ownerPodAccess;
|
|
350
363
|
return new quota_1.ProviderQuotaService({
|
|
351
364
|
repository: new quota_1.PodQuotaSnapshotRepository({
|
|
352
|
-
|
|
365
|
+
podAccess,
|
|
353
366
|
podBaseUrlResolver: podBaseUrlResolver(cradle),
|
|
354
367
|
}),
|
|
355
368
|
credentialRepository: new connect_1.PodConnectedCredentialRepository({
|
|
356
|
-
|
|
369
|
+
podAccess,
|
|
357
370
|
podBaseUrlResolver: podBaseUrlResolver(cradle),
|
|
358
371
|
}),
|
|
359
372
|
vault: credentialVaultForConfig(config),
|
|
@@ -373,7 +386,7 @@ function registerCommonServices(container) {
|
|
|
373
386
|
}).singleton(),
|
|
374
387
|
providerModelsService: (0, awilix_1.asFunction)((cradle) => {
|
|
375
388
|
const { config } = cradle;
|
|
376
|
-
const
|
|
389
|
+
const podAccess = cradle.ownerPodAccess;
|
|
377
390
|
const registry = cradle.gatewayProviderRegistry;
|
|
378
391
|
const safeBaseUrls = (provider) => [
|
|
379
392
|
...registry.requireProvider(provider).safeBaseUrls,
|
|
@@ -381,7 +394,7 @@ function registerCommonServices(container) {
|
|
|
381
394
|
];
|
|
382
395
|
return new models_1.ProviderModelsService({
|
|
383
396
|
credentialRepository: new connect_1.PodConnectedCredentialRepository({
|
|
384
|
-
|
|
397
|
+
podAccess,
|
|
385
398
|
podBaseUrlResolver: podBaseUrlResolver(cradle),
|
|
386
399
|
}),
|
|
387
400
|
vault: credentialVaultForConfig(config),
|
|
@@ -446,7 +459,7 @@ function registerCommonServices(container) {
|
|
|
446
459
|
providerCustomModelsService: (0, awilix_1.asFunction)((cradle) => {
|
|
447
460
|
return new models_1.ProviderCustomModelsService({
|
|
448
461
|
credentialRepository: new connect_1.PodConnectedCredentialRepository({
|
|
449
|
-
|
|
462
|
+
podAccess: cradle.ownerPodAccess,
|
|
450
463
|
podBaseUrlResolver: podBaseUrlResolver(cradle),
|
|
451
464
|
}),
|
|
452
465
|
embeddingModelPolicy: cradle.embeddingModelPolicy,
|
|
@@ -511,9 +524,9 @@ function registerCommonServices(container) {
|
|
|
511
524
|
});
|
|
512
525
|
}).singleton(),
|
|
513
526
|
// ChatKit 存储与服务
|
|
514
|
-
chatKitStore: (0, awilix_1.asFunction)(({ config, serverGroupReconcilerService }) => {
|
|
527
|
+
chatKitStore: (0, awilix_1.asFunction)(({ config, ownerPodAccess, serverGroupReconcilerService }) => {
|
|
515
528
|
return new chatkit_1.PodChatKitStore({
|
|
516
|
-
|
|
529
|
+
podAccess: ownerPodAccess,
|
|
517
530
|
serverGroupReconcilerService,
|
|
518
531
|
deployment: config.edition,
|
|
519
532
|
credentialSecretDecoder: (0, AiCredentialSecretDecoder_1.createAiCredentialSecretDecoder)({
|
|
@@ -232,6 +232,7 @@ function loadConfigFromEnv() {
|
|
|
232
232
|
ngrokAuthToken: process.env.NGROK_AUTHTOKEN,
|
|
233
233
|
ngrokUrl: process.env.NGROK_URL,
|
|
234
234
|
ngrokPath: process.env.NGROK_BIN,
|
|
235
|
+
frpcPath: process.env.FRPC_BIN,
|
|
235
236
|
// Edge 节点管理 (cloud 模式)
|
|
236
237
|
edgeNodesEnabled: process.env.XPOD_EDGE_NODES_ENABLED === 'true',
|
|
237
238
|
};
|
|
@@ -10,11 +10,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.registerLocalServices = registerLocalServices;
|
|
11
11
|
const awilix_1 = require("awilix");
|
|
12
12
|
const SubdomainClient_1 = require("../../subdomain/SubdomainClient");
|
|
13
|
+
const AutoTunnelProvider_1 = require("../../tunnel/AutoTunnelProvider");
|
|
13
14
|
const LocalTunnelProvider_1 = require("../../tunnel/LocalTunnelProvider");
|
|
14
15
|
const NgrokTunnelProvider_1 = require("../../tunnel/NgrokTunnelProvider");
|
|
15
16
|
const SakuraFrpTunnelProvider_1 = require("../../tunnel/SakuraFrpTunnelProvider");
|
|
16
17
|
const DEFAULT_CLOUD_API_ENDPOINT = 'https://api.undefineds.co';
|
|
17
18
|
const CloudflareDnsProvider_1 = require("../../dns/cloudflare/CloudflareDnsProvider");
|
|
19
|
+
const TencentDnsProvider_1 = require("../../dns/tencent/TencentDnsProvider");
|
|
18
20
|
const SubdomainService_1 = require("../../subdomain/SubdomainService");
|
|
19
21
|
const EdgeNodeDnsCoordinator_1 = require("../../edge/EdgeNodeDnsCoordinator");
|
|
20
22
|
const EdgeNodeCapabilityDetector_1 = require("../../edge/EdgeNodeCapabilityDetector");
|
|
@@ -27,7 +29,7 @@ const PodLookupRepository_1 = require("../../identity/drizzle/PodLookupRepositor
|
|
|
27
29
|
*/
|
|
28
30
|
function registerLocalServices(container) {
|
|
29
31
|
const config = container.resolve('config');
|
|
30
|
-
const { cloudApiEndpoint, nodeId, nodeToken, cloudflareTunnelToken, sakuraTunnelToken, ngrokAuthToken, ngrokUrl, ngrokPath, subdomain: subdomainConfig, } = config;
|
|
32
|
+
const { cloudApiEndpoint, nodeId, nodeToken, cloudflareTunnelToken, sakuraTunnelToken, ngrokAuthToken, ngrokUrl, ngrokPath, frpcPath, subdomain: subdomainConfig, } = config;
|
|
31
33
|
container.register({
|
|
32
34
|
podLookupRepo: (0, awilix_1.asFunction)(({ db }) => {
|
|
33
35
|
return new PodLookupRepository_1.PodLookupRepository(db);
|
|
@@ -42,47 +44,86 @@ function registerLocalServices(container) {
|
|
|
42
44
|
ngrokUrl,
|
|
43
45
|
});
|
|
44
46
|
const activeTunnelProvider = activeTunnel.provider;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
// The settings page stores one credential per profile; the provider-global env key is
|
|
48
|
+
// only the legacy fallback. Without this the profile's own secret never reached the
|
|
49
|
+
// provider and the tunnel could not start even though the profile looked configured.
|
|
50
|
+
const activeCredential = activeTunnel.profile?.credentialEnvKey
|
|
51
|
+
? readCredential(process.env[activeTunnel.profile.credentialEnvKey])
|
|
52
|
+
: undefined;
|
|
53
|
+
// Every provider the operator has credentials for is a candidate; which one
|
|
54
|
+
// can reach its control plane is a property of the network, so an implicit
|
|
55
|
+
// selection is settled by readiness instead of by list order. An explicitly
|
|
56
|
+
// pinned profile or provider still starts exactly that one - including when it
|
|
57
|
+
// has no credential, because then its own failure is the answer the operator
|
|
58
|
+
// needs rather than a silently absent provider.
|
|
59
|
+
const profileFor = (provider) => (config.tunnelProfiles ?? []).find((entry) => entry.provider === provider);
|
|
60
|
+
const profileCredential = (provider) => {
|
|
61
|
+
const key = profileFor(provider)?.credentialEnvKey;
|
|
62
|
+
return key ? readCredential(process.env[key]) : undefined;
|
|
63
|
+
};
|
|
64
|
+
const credentialFor = (provider) => (activeTunnelProvider === provider ? activeCredential : undefined) ?? profileCredential(provider);
|
|
65
|
+
const candidates = [
|
|
66
|
+
{
|
|
67
|
+
id: 'ngrok',
|
|
68
|
+
provider: 'ngrok',
|
|
69
|
+
configured: Boolean(credentialFor('ngrok') ?? ngrokAuthToken ?? ngrokUrl),
|
|
70
|
+
create: () => new NgrokTunnelProvider_1.NgrokTunnelProvider({
|
|
71
|
+
authtoken: credentialFor('ngrok') ?? ngrokAuthToken,
|
|
72
|
+
url: profileFor('ngrok')?.publicUrl ?? ngrokUrl,
|
|
73
|
+
ngrokPath,
|
|
74
|
+
}),
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'cloudflare',
|
|
78
|
+
provider: 'cloudflare',
|
|
79
|
+
configured: Boolean(credentialFor('cloudflare') ?? cloudflareTunnelToken),
|
|
80
|
+
create: () => new LocalTunnelProvider_1.LocalTunnelProvider({
|
|
81
|
+
tunnelToken: (credentialFor('cloudflare') ?? cloudflareTunnelToken),
|
|
82
|
+
publicUrl: profileFor('cloudflare')?.publicUrl,
|
|
83
|
+
}),
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 'sakura_frp',
|
|
87
|
+
provider: 'sakura_frp',
|
|
88
|
+
configured: Boolean(credentialFor('sakura_frp') ?? sakuraTunnelToken),
|
|
89
|
+
create: () => new SakuraFrpTunnelProvider_1.SakuraFrpTunnelProvider({
|
|
90
|
+
token: (credentialFor('sakura_frp') ?? sakuraTunnelToken),
|
|
91
|
+
publicUrl: profileFor('sakura_frp')?.publicUrl,
|
|
92
|
+
frpcPath,
|
|
93
|
+
}),
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
const pinnedProvider = config.tunnelActiveProfileId || config.tunnelProvider || process.env.XPOD_TUNNEL_PROVIDER
|
|
97
|
+
? activeTunnelProvider
|
|
98
|
+
: undefined;
|
|
99
|
+
const selected = pinnedProvider
|
|
100
|
+
? candidates.filter((candidate) => candidate.provider === pinnedProvider)
|
|
101
|
+
: candidates.filter((candidate) => candidate.configured);
|
|
102
|
+
if (selected.length === 1) {
|
|
103
|
+
const [only] = selected;
|
|
58
104
|
container.register({
|
|
59
|
-
localTunnelProvider: (0, awilix_1.asFunction)(()
|
|
60
|
-
return new LocalTunnelProvider_1.LocalTunnelProvider({
|
|
61
|
-
tunnelToken: cloudflareTunnelToken,
|
|
62
|
-
publicUrl: activeTunnel.profile?.publicUrl,
|
|
63
|
-
});
|
|
64
|
-
}).singleton(),
|
|
105
|
+
localTunnelProvider: (0, awilix_1.asFunction)(only.create).singleton(),
|
|
65
106
|
});
|
|
66
|
-
console.log(
|
|
107
|
+
console.log(`[Local] Tunnel provider registered (${only.id} configured)`);
|
|
67
108
|
}
|
|
68
|
-
else if (
|
|
109
|
+
else if (selected.length > 1) {
|
|
69
110
|
container.register({
|
|
70
|
-
localTunnelProvider: (0, awilix_1.asFunction)(() => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
})
|
|
75
|
-
}).singleton(),
|
|
111
|
+
localTunnelProvider: (0, awilix_1.asFunction)(() => new AutoTunnelProvider_1.AutoTunnelProvider({
|
|
112
|
+
candidates: selected.map((candidate) => ({
|
|
113
|
+
id: candidate.id,
|
|
114
|
+
provider: candidate.create(),
|
|
115
|
+
})),
|
|
116
|
+
})).singleton(),
|
|
76
117
|
});
|
|
77
|
-
console.log(
|
|
118
|
+
console.log(`[Local] Tunnel providers registered (auto: ${selected.map((candidate) => candidate.id).join(', ')})`);
|
|
78
119
|
}
|
|
79
120
|
// 2. 自适应 DNS 管理 (Self-Hosted DNS)
|
|
80
121
|
// 如果配置了 Cloudflare API Token 和 Base Domain,启用本地 DNS 管理
|
|
81
122
|
const apiToken = subdomainConfig?.cloudflareApiToken;
|
|
82
123
|
// 在 Local 模式下,强制使用 CSS_BASE_URL 作为域名来源
|
|
83
124
|
// 简化用户配置心智
|
|
84
|
-
let baseDomain;
|
|
85
|
-
if (process.env.CSS_BASE_URL) {
|
|
125
|
+
let baseDomain = process.env.XPOD_DNS_DOMAIN?.trim() || undefined;
|
|
126
|
+
if (!baseDomain && process.env.CSS_BASE_URL) {
|
|
86
127
|
try {
|
|
87
128
|
const url = new URL(process.env.CSS_BASE_URL);
|
|
88
129
|
baseDomain = url.hostname;
|
|
@@ -93,14 +134,20 @@ function registerLocalServices(container) {
|
|
|
93
134
|
}
|
|
94
135
|
// DEBUG: 打印变量状态
|
|
95
136
|
console.log(`[Local] Debug: apiToken=${apiToken ? '***' : 'undefined'}, baseDomain=${baseDomain}, CSS_BASE_URL=${process.env.CSS_BASE_URL}`);
|
|
96
|
-
|
|
97
|
-
|
|
137
|
+
// The settings page lets an operator pick the DNS provider, so the runtime honours that
|
|
138
|
+
// choice instead of always wiring Cloudflare and ignoring a saved "tencent".
|
|
139
|
+
const dnsProviderId = process.env.XPOD_DNS_PROVIDER?.trim().toLowerCase() || 'cloudflare';
|
|
140
|
+
const tencentDnsToken = process.env.XPOD_TENCENT_DNS_TOKEN?.trim();
|
|
141
|
+
const tencentDnsTokenId = process.env.XPOD_TENCENT_DNS_TOKEN_ID?.trim();
|
|
142
|
+
const dnsCredentialReady = dnsProviderId === 'tencent' ? Boolean(tencentDnsToken) : Boolean(apiToken);
|
|
143
|
+
if (dnsCredentialReady && baseDomain) {
|
|
144
|
+
console.log(`[Local] Self-hosted DNS mode detected (provider: ${dnsProviderId})`);
|
|
98
145
|
container.register({
|
|
99
|
-
// DNS Provider
|
|
146
|
+
// DNS Provider: one axis, the selected implementation.
|
|
100
147
|
dnsProvider: (0, awilix_1.asFunction)(() => {
|
|
101
|
-
return
|
|
102
|
-
|
|
103
|
-
|
|
148
|
+
return dnsProviderId === 'tencent'
|
|
149
|
+
? new TencentDnsProvider_1.TencentDnsProvider({ tokenId: tencentDnsTokenId, token: tencentDnsToken })
|
|
150
|
+
: new CloudflareDnsProvider_1.CloudflareDnsProvider({ apiToken: apiToken });
|
|
104
151
|
}).singleton(),
|
|
105
152
|
// DNS Coordinator (DnsMaintainer)
|
|
106
153
|
dnsCoordinator: (0, awilix_1.asFunction)(({ dnsProvider }) => {
|
|
@@ -230,6 +277,10 @@ function resolveActiveLocalTunnel(options) {
|
|
|
230
277
|
}),
|
|
231
278
|
};
|
|
232
279
|
}
|
|
280
|
+
/** A credential only counts when it actually carries a value. */
|
|
281
|
+
function readCredential(value) {
|
|
282
|
+
return typeof value === 'string' && value.trim() ? value.trim() : undefined;
|
|
283
|
+
}
|
|
233
284
|
function resolveLocalTunnelProvider(options) {
|
|
234
285
|
const explicit = options.explicit?.trim().toLowerCase();
|
|
235
286
|
if (explicit) {
|
|
@@ -33,6 +33,8 @@ exports.resolveCloudSignalApiUrl = resolveCloudSignalApiUrl;
|
|
|
33
33
|
exports.resolveLocalStorageProviderBaseUrl = resolveLocalStorageProviderBaseUrl;
|
|
34
34
|
const EdgeNodeSignalHandler_1 = require("../handlers/EdgeNodeSignalHandler");
|
|
35
35
|
const ReachabilityHandler_1 = require("../handlers/ReachabilityHandler");
|
|
36
|
+
const NodeAccessResolver_1 = require("../../edge/reachability/NodeAccessResolver");
|
|
37
|
+
const RouteSetBuilder_1 = require("../../edge/reachability/RouteSetBuilder");
|
|
36
38
|
const NodeHandler_1 = require("../handlers/NodeHandler");
|
|
37
39
|
const ChatHandler_1 = require("../handlers/ChatHandler");
|
|
38
40
|
const SubdomainHandler_1 = require("../handlers/SubdomainHandler");
|
|
@@ -130,7 +132,7 @@ function registerSharedRoutes(container, server) {
|
|
|
130
132
|
const rdfStorageStatsService = container.resolve('rdfStorageStatsService');
|
|
131
133
|
const rdfEngine = container.resolve('rdfEngine', { allowUnregistered: true });
|
|
132
134
|
const rdfSearchIndexingService = container.resolve('rdfSearchIndexingService', { allowUnregistered: true });
|
|
133
|
-
const
|
|
135
|
+
const ownerPodAccess = container.resolve('ownerPodAccess');
|
|
134
136
|
const aiConnectionInvocationKeyIssuer = container.resolve('aiConnectionInvocationKeyIssuer');
|
|
135
137
|
const gatewayAccessKeyRepository = container.resolve('gatewayAccessKeyRepository', { allowUnregistered: true });
|
|
136
138
|
const providerConnectService = container.resolve('providerConnectService');
|
|
@@ -162,6 +164,7 @@ function registerSharedRoutes(container, server) {
|
|
|
162
164
|
repository: nodeRepo,
|
|
163
165
|
baseStorageDomain: config.subdomain?.baseStorageDomain,
|
|
164
166
|
apiBaseUrl: config.cloudApiEndpoint ?? process.env.CSS_BASE_URL,
|
|
167
|
+
canAccessNode: (0, NodeAccessResolver_1.createPodOwnershipNodeAccessResolver)(podLookupRepository),
|
|
165
168
|
});
|
|
166
169
|
(0, NodeHandler_1.registerNodeRoutes)(server, { repository: nodeRepo });
|
|
167
170
|
const aiGatewayService = container.resolve('aiGatewayService');
|
|
@@ -193,6 +196,7 @@ function registerSharedRoutes(container, server) {
|
|
|
193
196
|
providerModelSelectionService,
|
|
194
197
|
customModelsService: providerCustomModelsService,
|
|
195
198
|
gatewayAccessKeyRepository,
|
|
199
|
+
podInterfaceKeys: ownerPodAccess,
|
|
196
200
|
validateClientCredential: (apiKey) => container.resolve('authenticator').authenticate({
|
|
197
201
|
headers: { authorization: `Bearer ${apiKey}` },
|
|
198
202
|
method: 'POST',
|
|
@@ -212,15 +216,15 @@ function registerSharedRoutes(container, server) {
|
|
|
212
216
|
(0, PodSettingsHandler_1.registerPodSettingsRoutes)(server, {
|
|
213
217
|
podLookupRepository,
|
|
214
218
|
usageRepo: new UsageRepository_1.UsageRepository(container.resolve('db')),
|
|
215
|
-
aiConnectionStatusReader: new PodSettingsHandler_1.DrizzlePodAiConnectionsStatusReader(
|
|
219
|
+
aiConnectionStatusReader: new PodSettingsHandler_1.DrizzlePodAiConnectionsStatusReader(ownerPodAccess, config.edition),
|
|
216
220
|
});
|
|
217
221
|
const aiConfigStore = new AiConfigStore_1.DrizzlePodAiConfigStore({
|
|
218
|
-
|
|
222
|
+
podAccess: ownerPodAccess,
|
|
219
223
|
});
|
|
220
|
-
const ftsRebuildAvailable = Boolean(
|
|
221
|
-
const vectorRebuildAvailable = Boolean(
|
|
224
|
+
const ftsRebuildAvailable = Boolean(ownerPodAccess && rdfEngine?.indexTextSource);
|
|
225
|
+
const vectorRebuildAvailable = Boolean(ownerPodAccess && rdfSearchIndexingService && chatKitStore.createTrustedContext);
|
|
222
226
|
const rebuildFts = async (owner) => {
|
|
223
|
-
const trustedFetch = await
|
|
227
|
+
const trustedFetch = await ownerPodAccess.getPodFetch(owner.webId, { podBaseUrl: owner.podUrl });
|
|
224
228
|
if (!trustedFetch || !rdfEngine?.indexTextSource)
|
|
225
229
|
throw new Error('fts_rebuild_unavailable');
|
|
226
230
|
const result = await new PodSearchIndexRebuilder_1.PodSearchIndexRebuilder({
|
|
@@ -233,7 +237,7 @@ function registerSharedRoutes(container, server) {
|
|
|
233
237
|
throw new Error('fts_rebuild_incomplete');
|
|
234
238
|
};
|
|
235
239
|
const rebuildVector = async (owner) => {
|
|
236
|
-
const trustedFetch = await
|
|
240
|
+
const trustedFetch = await ownerPodAccess.getPodFetch(owner.webId, { podBaseUrl: owner.podUrl });
|
|
237
241
|
if (!trustedFetch || !rdfSearchIndexingService)
|
|
238
242
|
throw new Error('vector_rebuild_unavailable');
|
|
239
243
|
const context = await chatKitStore.createTrustedContext({ ...owner, fetch: trustedFetch });
|
|
@@ -521,6 +525,8 @@ function registerLocalRoutes(container, server) {
|
|
|
521
525
|
// SP 状态查询 (供 Linx 查询 SP 配置状态)
|
|
522
526
|
try {
|
|
523
527
|
const config = container.resolve('config');
|
|
528
|
+
const statusTunnelProvider = (container.resolve('localTunnelProvider', { allowUnregistered: true })
|
|
529
|
+
?? container.resolve('tunnelProvider', { allowUnregistered: true }));
|
|
524
530
|
(0, ProvisionHandler_1.registerProvisionStatusRoute)(server, {
|
|
525
531
|
cloudUrl: config.cloudApiEndpoint,
|
|
526
532
|
nodeId: config.nodeId,
|
|
@@ -536,7 +542,35 @@ function registerLocalRoutes(container, server) {
|
|
|
536
542
|
?? process.env.SAKURA_TOKEN,
|
|
537
543
|
cloudBaseUrl: config.oidcIssuer || config.cloudApiEndpoint,
|
|
538
544
|
provisionCode: process.env.XPOD_PROVISION_CODE ?? config.provisionCode,
|
|
545
|
+
// A configured tunnel only becomes a public route once its provider
|
|
546
|
+
// reports a proxy-ready endpoint; clients use this to decide whether a
|
|
547
|
+
// canonical request can leave the machine at all.
|
|
548
|
+
readPublicRoute: () => {
|
|
549
|
+
if (!statusTunnelProvider) {
|
|
550
|
+
return { configured: false, available: false };
|
|
551
|
+
}
|
|
552
|
+
const status = statusTunnelProvider.getStatus();
|
|
553
|
+
const endpoint = status.endpoint ?? statusTunnelProvider.getEndpoint();
|
|
554
|
+
return {
|
|
555
|
+
configured: true,
|
|
556
|
+
available: Boolean(status.connected),
|
|
557
|
+
...(statusTunnelProvider.name ? { provider: statusTunnelProvider.name } : {}),
|
|
558
|
+
...(endpoint ? { endpoint } : {}),
|
|
559
|
+
};
|
|
560
|
+
},
|
|
539
561
|
persistState: (0, ProvisionHandler_1.createLocalSetupProvisionStateWriter)(config.localSetupPath, config.localSetupProviderId),
|
|
562
|
+
// A client ranks access points by where it stands, so the node reports the
|
|
563
|
+
// paths it can prove: its canonical public route, plus the tunnel endpoint
|
|
564
|
+
// whenever a provider confirms one that is not simply the canonical URL.
|
|
565
|
+
readAccessRoutes: () => {
|
|
566
|
+
const status = statusTunnelProvider?.getStatus();
|
|
567
|
+
const publicUrl = process.env.XPOD_PUBLIC_URL ?? config.publicUrl ?? process.env.CSS_BASE_URL;
|
|
568
|
+
return (0, RouteSetBuilder_1.buildPublicAccessRoutes)({
|
|
569
|
+
canonicalUrl: publicUrl,
|
|
570
|
+
publicRouteAvailable: Boolean(status?.connected),
|
|
571
|
+
tunnelEndpoint: status?.endpoint ?? statusTunnelProvider?.getEndpoint(),
|
|
572
|
+
});
|
|
573
|
+
},
|
|
540
574
|
});
|
|
541
575
|
console.log('[Local] Provision status route registered (/provision/status)');
|
|
542
576
|
}
|
|
@@ -51,7 +51,7 @@ import type { ProviderRegistry as GatewayProviderRegistry } from '../ai-gateway/
|
|
|
51
51
|
import type { SessionAffinityStore } from '../ai-gateway/routing/SessionAffinityStore';
|
|
52
52
|
import type { AiConnectionsInvocationKeyIssuer } from '../ai-gateway/auth/AiConnectionsInvocationKeyIssuer';
|
|
53
53
|
import type { InvocationTokenCodec } from '../ai-gateway/auth/InvocationTokenCodec';
|
|
54
|
-
import type {
|
|
54
|
+
import type { OwnerPodAccess } from '../ai-gateway/pod/OwnerPodAccess';
|
|
55
55
|
import type { GatewayAccessKeyRepository } from '../ai-gateway/auth/GatewayApiKeyAuthenticator';
|
|
56
56
|
import type { PodModelSelectionRepository } from '../ai-gateway/models/PodModelSelectionRepository';
|
|
57
57
|
import type { ProviderModelSelectionService } from '../ai-gateway/models/ProviderModelSelectionService';
|
|
@@ -183,6 +183,8 @@ export interface ApiContainerConfig {
|
|
|
183
183
|
ngrokUrl?: string;
|
|
184
184
|
/** ngrok executable path. */
|
|
185
185
|
ngrokPath?: string;
|
|
186
|
+
/** frpc executable path (FRPC_BIN); the SakuraFrp build is required, not the generic one. */
|
|
187
|
+
frpcPath?: string;
|
|
186
188
|
/** 是否接受 Edge 节点注册 (cloud 模式) */
|
|
187
189
|
edgeNodesEnabled?: boolean;
|
|
188
190
|
}
|
|
@@ -202,7 +204,7 @@ export interface ApiContainerCradle {
|
|
|
202
204
|
authenticator: Authenticator;
|
|
203
205
|
nodeRepo: EdgeNodeRepository;
|
|
204
206
|
serviceTokenRepo: ServiceTokenRepositoryPort;
|
|
205
|
-
|
|
207
|
+
ownerPodAccess: OwnerPodAccess;
|
|
206
208
|
invocationTokenCodec?: InvocationTokenCodec;
|
|
207
209
|
gatewayAccessKeyRepository?: GatewayAccessKeyRepository;
|
|
208
210
|
aiConnectionInvocationKeyIssuer?: AiConnectionsInvocationKeyIssuer;
|