@undefineds.co/xpod 0.4.12 → 0.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/components-ignore.json +11 -7
- package/dist/acceptance/QleverSemanticConformance.js +7 -0
- package/dist/api/ai-gateway/providers/OfferingAuthorization.d.ts +6 -1
- package/dist/api/ai-gateway/providers/OfferingAuthorization.js +0 -3
- package/dist/api/ai-gateway/providers/ProviderRegistry.js +1 -1
- package/dist/api/container/index.js +1 -0
- package/dist/api/container/local.js +30 -12
- package/dist/api/container/routes.js +2 -0
- package/dist/api/container/types.d.ts +2 -0
- package/dist/api/handlers/AdminHandler.d.ts +17 -1
- package/dist/api/handlers/AdminHandler.js +40 -3
- package/dist/api/handlers/EdgeNodeSignalHandler.js +10 -2
- package/dist/api/handlers/NetworkSettingsHandler.d.ts +37 -5
- package/dist/api/handlers/NetworkSettingsHandler.js +39 -11
- package/dist/api/handlers/ProvisionHandler.d.ts +6 -1
- package/dist/api/handlers/ProvisionHandler.js +7 -2
- package/dist/api/handlers/ReachabilityHandler.d.ts +6 -0
- package/dist/api/handlers/ReachabilityHandler.js +22 -5
- package/dist/api/network/NetworkEnvironmentConfigurationStore.d.ts +6 -1
- package/dist/api/network/NetworkEnvironmentConfigurationStore.js +72 -16
- package/dist/api/runtime.d.ts +9 -0
- package/dist/api/runtime.js +15 -2
- package/dist/cli/commands/start.d.ts +19 -1
- package/dist/cli/commands/start.js +71 -5
- package/dist/components/context.jsonld +30 -0
- package/dist/edge/EdgeNodeAgent.d.ts +6 -0
- package/dist/edge/EdgeNodeAgent.js +1 -1
- 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/index.d.ts +3 -1
- package/dist/index.js +9 -3
- package/dist/main.js +7 -0
- package/dist/runtime/Proxy.d.ts +22 -0
- package/dist/runtime/Proxy.js +34 -7
- package/dist/runtime/bootstrap.d.ts +11 -0
- package/dist/runtime/bootstrap.js +21 -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 +4 -1
- package/dist/runtime/host/types.d.ts +6 -0
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +5 -1
- package/dist/runtime/lifecycle.js +1 -0
- package/dist/runtime/port-finder.d.ts +30 -0
- package/dist/runtime/port-finder.js +83 -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/storage/rdf/PostgresRdfEngine.js +10 -4
- package/dist/storage/rdf/RdfAccessScope.js +15 -1
- package/dist/storage/rdf/RdfEngineRdfJsSource.js +10 -2
- package/dist/test-utils/local-managed-client-p2p-e2e-smoke.js +1 -1
- 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/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 +3 -3
- 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/AiConnectionsPanel.js +2 -2
- 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 +13 -11
- package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.js +16 -13
- 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/dist/{ai-connections-client.d.ts → contract/ai-connections-client.d.ts} +4 -2
- package/node_modules/@undefineds.co/ai-connections/dist/{ai-connections-client.js → contract/ai-connections-client.js} +4 -2
- package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/normalize.d.ts +17 -7
- package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/normalize.js +18 -213
- package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/request.js +3 -3
- package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/types.d.ts +11 -2
- package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/index.cjs +8 -8
- package/node_modules/@undefineds.co/ai-connections/dist/contract/index.d.ts +9 -0
- package/node_modules/@undefineds.co/ai-connections/dist/contract/index.js +9 -0
- package/node_modules/@undefineds.co/ai-connections/dist/{provider-catalog.cjs → contract/provider-catalog.cjs} +5 -28
- package/node_modules/@undefineds.co/ai-connections/dist/{provider-catalog.d.ts → contract/provider-catalog.d.ts} +9 -8
- package/node_modules/@undefineds.co/ai-connections/dist/{provider-catalog.js → contract/provider-catalog.js} +11 -31
- package/node_modules/@undefineds.co/ai-connections/dist/controller.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/controller.js +3 -2
- 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 +20 -0
- package/node_modules/@undefineds.co/ai-connections/dist/display-wording.js +73 -0
- package/node_modules/@undefineds.co/ai-connections/dist/error-wording.d.ts +24 -0
- package/node_modules/@undefineds.co/ai-connections/dist/error-wording.js +253 -0
- package/node_modules/@undefineds.co/ai-connections/dist/gateway-endpoints.js +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/index.d.ts +2 -3
- package/node_modules/@undefineds.co/ai-connections/dist/index.js +2 -3
- 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 +25 -18
- package/node_modules/@undefineds.co/shared-ui/dist/index.d.ts +4 -2
- package/node_modules/@undefineds.co/shared-ui/dist/index.js +4 -2
- package/node_modules/@undefineds.co/shared-ui/dist/login/LoginModal.d.ts +4 -1
- package/node_modules/@undefineds.co/shared-ui/dist/login/LoginModal.js +12 -6
- package/node_modules/@undefineds.co/shared-ui/dist/login/LoginView.d.ts +1 -1
- package/node_modules/@undefineds.co/shared-ui/dist/login/host-types.d.ts +7 -1
- package/node_modules/@undefineds.co/shared-ui/dist/login/login-branding.d.ts +6 -0
- package/node_modules/@undefineds.co/shared-ui/dist/login/login-branding.js +18 -0
- package/node_modules/@undefineds.co/shared-ui/dist/user-facing-errors.d.ts +14 -2
- package/node_modules/@undefineds.co/shared-ui/dist/user-facing-errors.js +26 -17
- package/node_modules/@undefineds.co/solid-sdk/dist/login-store.d.ts +3 -3
- package/node_modules/@undefineds.co/solid-sdk/dist/login-store.js +3 -3
- package/package.json +4 -3
- package/static/auth-callback/assets/{AiConfigContext-DnQs1ZpW.js → AiConfigContext-DCXpjzpj.js} +1 -1
- package/static/auth-callback/assets/{AiConfigPage-DOtvlxH0.js → AiConfigPage-fe-xMIXa.js} +1 -1
- package/static/auth-callback/assets/{DocumentProcessingPanel-BS2voQgL.js → DocumentProcessingPanel-BGnkfMuU.js} +1 -1
- package/static/auth-callback/assets/{IndexLifecyclePanel-Cvt0cJtN.js → IndexLifecyclePanel-42Jups0j.js} +1 -1
- package/static/auth-callback/assets/{IndexSubjectPanel-Dhf01GqF.js → IndexSubjectPanel-CYyLOlQU.js} +1 -1
- package/static/auth-callback/assets/{ModelAssignmentsPanel-BJutWaAF.js → ModelAssignmentsPanel-BOvUH4yr.js} +1 -1
- package/static/auth-callback/assets/{ModelsPage-BRS0sje3.js → ModelsPage-DwyITxt7.js} +6 -6
- package/static/auth-callback/assets/NetworkPage-CG9RelJA.js +2 -0
- package/static/auth-callback/assets/{PaneListHeader-QQeJGTp4.js → PaneListHeader-yvd5ohs6.js} +1 -1
- package/static/auth-callback/assets/{SearchIndexingPanel-MyNUSEwT.js → SearchIndexingPanel-2_a6ezzj.js} +1 -1
- package/static/auth-callback/assets/{StatusSubjectPanel-DQkEVsFs.js → StatusSubjectPanel-8qtVxnzC.js} +1 -1
- package/static/auth-callback/assets/{StatusWorkspace-Dkv63Uwk.js → StatusWorkspace-CBdRahCF.js} +1 -1
- package/static/auth-callback/assets/{SystemSettingsPage-TIsUfX5d.js → SystemSettingsPage-BZJ6vWkg.js} +1 -1
- package/static/auth-callback/assets/{SystemSettingsSubjectPanel-BJWEt2-7.js → SystemSettingsSubjectPanel-xm08UhXP.js} +1 -1
- package/static/auth-callback/assets/XpodAiConnectionsPodStore-V6vgGfuw.js +3 -0
- package/static/auth-callback/assets/{activity-5hNeNKnL.js → activity-CeM7xly8.js} +1 -1
- package/static/auth-callback/assets/ai-connections-C6yaE6WQ.js +1 -0
- package/static/auth-callback/assets/{auth-callback-CAFZ3R0B.js → auth-callback-DTG8cSj7.js} +3 -3
- package/static/auth-callback/assets/{badge-CAIPI0CB.js → badge-qJo2Zr4d.js} +1 -1
- package/static/auth-callback/assets/{collection-runtime-D9s7h9YA.js → collection-runtime-Bztsz31a.js} +1 -1
- package/static/auth-callback/assets/{dialog-BjA109aX.js → dialog-D-h6x5x0.js} +1 -1
- package/static/auth-callback/assets/{download-B3Up5W2G.js → download-C2ir4lmR.js} +1 -1
- package/static/auth-callback/assets/{external-link-BTXgSPzB.js → external-link-THLDL4On.js} +1 -1
- package/static/auth-callback/assets/{index-CirW4CJf.js → index-BRpv4yO3.js} +1 -1
- package/static/auth-callback/assets/{index-BppXlxcp.js → index-BlVZb9A7.js} +1 -1
- package/static/auth-callback/assets/index-D983R1FV.js +4 -0
- package/static/auth-callback/assets/{index-browser-DtU38ni3.js → index-browser-3FvR0aaf.js} +1 -1
- package/static/auth-callback/assets/{key-round-CQCOrZ7x.js → key-round-C9U5j1Ly.js} +1 -1
- package/static/auth-callback/assets/{rotate-ccw-C1zM2KtS.js → rotate-ccw-DP45cD4o.js} +1 -1
- package/static/auth-callback/assets/{skeleton-Cqp7_M9-.js → skeleton-Dn4EiSCS.js} +1 -1
- package/static/auth-callback/assets/{waypoints-Bj6gAUSQ.js → waypoints-uqFQ3uEG.js} +1 -1
- package/static/auth-callback/assets/{workspace-layout-DK8mDzrY.js → workspace-layout-DLYK0Wwu.js} +1 -1
- package/static/auth-callback/auth-callback.html +1 -1
- package/static/dashboard/assets/{AiConfigContext-BsE7MqX8.js → AiConfigContext-DJcMECNw.js} +1 -1
- package/static/dashboard/assets/{AiConfigPage-DvM-lRXa.js → AiConfigPage-BvE7dOTy.js} +1 -1
- package/static/dashboard/assets/{DocumentProcessingPanel-BPfdlfuf.js → DocumentProcessingPanel-D9780krf.js} +1 -1
- package/static/dashboard/assets/{IndexLifecyclePanel--m0AGxvh.js → IndexLifecyclePanel-SjsUcnbM.js} +1 -1
- package/static/dashboard/assets/{IndexSubjectPanel-Bb7m1k3d.js → IndexSubjectPanel-C-ym2Tqi.js} +1 -1
- package/static/dashboard/assets/{ModelAssignmentsPanel-BLi_zbMa.js → ModelAssignmentsPanel-BRjZ-arB.js} +1 -1
- package/static/dashboard/assets/{ModelsPage-CxdpgnfR.js → ModelsPage-BtTU6du3.js} +6 -6
- package/static/dashboard/assets/NetworkPage-CV9qpkDg.js +2 -0
- package/static/dashboard/assets/{PaneListHeader-BBCMei0r.js → PaneListHeader-KyPTTBsv.js} +1 -1
- package/static/dashboard/assets/{SearchIndexingPanel-Ck4Y-xjR.js → SearchIndexingPanel-DolHGawg.js} +1 -1
- package/static/dashboard/assets/{StatusSubjectPanel-D1KWfAXE.js → StatusSubjectPanel-_YZvKiYi.js} +1 -1
- package/static/dashboard/assets/{StatusWorkspace-JbA5gzXx.js → StatusWorkspace-Dlbh_G40.js} +1 -1
- package/static/dashboard/assets/{SystemSettingsPage-BbwQWsSR.js → SystemSettingsPage-Be7QSIoz.js} +1 -1
- package/static/dashboard/assets/{SystemSettingsSubjectPanel-N117nMt5.js → SystemSettingsSubjectPanel-DBp0gja7.js} +1 -1
- package/static/dashboard/assets/{XpodAiConnectionsPodStore-CdDOb4SV.js → XpodAiConnectionsPodStore-ClpSjzpP.js} +7 -7
- package/static/dashboard/assets/{activity-DX1I96o_.js → activity-lsNbTXJu.js} +1 -1
- package/static/dashboard/assets/ai-connections-CXp5gd1J.js +1 -0
- package/static/dashboard/assets/{badge-k2vhtDqH.js → badge-CVatKjaG.js} +1 -1
- package/static/dashboard/assets/{collection-runtime-BFQ8teQJ.js → collection-runtime-Ec4UnY28.js} +1 -1
- package/static/dashboard/assets/{dashboard-DWZ-fmCT.js → dashboard-BEzsRsvF.js} +2 -2
- package/static/dashboard/assets/{dialog-1CCw-iHT.js → dialog-BuyelQ4V.js} +1 -1
- package/static/dashboard/assets/{download-C6-SNY1q.js → download-B4Nf678F.js} +1 -1
- package/static/dashboard/assets/{external-link-BgPcZ_j2.js → external-link-PYv9CvKL.js} +1 -1
- package/static/dashboard/assets/index-C9XPE-mI.js +4 -0
- package/static/dashboard/assets/{index-D7A8U6Pt.js → index-Cx69bTNh.js} +1 -1
- package/static/dashboard/assets/{index-6LcIUIYO.js → index-awr7ulur.js} +1 -1
- package/static/dashboard/assets/{key-round-BOd7Jo0Q.js → key-round-VsY80U1Z.js} +1 -1
- package/static/dashboard/assets/{rotate-ccw-CCgJqsvx.js → rotate-ccw-Cz1K4vE9.js} +1 -1
- package/static/dashboard/assets/{skeleton-Bc7abAn5.js → skeleton-BhNv_8tO.js} +1 -1
- package/static/dashboard/assets/{waypoints-s-opmJxx.js → waypoints-DYS9XFYV.js} +1 -1
- package/static/dashboard/assets/{workspace-layout-DqIQeTBV.js → workspace-layout-OZJAFx5V.js} +1 -1
- package/static/dashboard/dashboard.html +1 -1
- package/static/settings/assets/{AiConfigContext-BB9KZySa.js → AiConfigContext-B8JS3MXF.js} +1 -1
- package/static/settings/assets/{AiConfigPage-DGSXUkLs.js → AiConfigPage-C3Zl8LUl.js} +1 -1
- package/static/settings/assets/{DocumentProcessingPanel-Da2Re6Rg.js → DocumentProcessingPanel-DpDZAQvf.js} +1 -1
- package/static/settings/assets/{IndexLifecyclePanel-BSZuIzgr.js → IndexLifecyclePanel-Ec1XF88t.js} +1 -1
- package/static/settings/assets/{IndexSubjectPanel-CFd0ay-r.js → IndexSubjectPanel-BulT9BmO.js} +1 -1
- package/static/settings/assets/{ModelAssignmentsPanel-CSAryvWJ.js → ModelAssignmentsPanel-BcGSmYjb.js} +1 -1
- package/static/settings/assets/{ModelsPage-BQwCwLHU.js → ModelsPage-CvTCKy1T.js} +6 -6
- package/static/settings/assets/NetworkPage-DQF5u9Bn.js +2 -0
- package/static/settings/assets/{PaneListHeader-Bjh3hRdQ.js → PaneListHeader-D40hqcVl.js} +1 -1
- package/static/settings/assets/{SearchIndexingPanel-MjKL5QLU.js → SearchIndexingPanel-iCUPOx_0.js} +1 -1
- package/static/settings/assets/{StatusSubjectPanel-Bvl6K4mx.js → StatusSubjectPanel-E--ZHSql.js} +1 -1
- package/static/settings/assets/{StatusWorkspace-B0NzrP--.js → StatusWorkspace-YjDAx1II.js} +1 -1
- package/static/settings/assets/{SystemSettingsPage-D2z6Z4FE.js → SystemSettingsPage-CDdV3mC9.js} +1 -1
- package/static/settings/assets/{SystemSettingsSubjectPanel-4sxma4X4.js → SystemSettingsSubjectPanel-Br8WazDq.js} +1 -1
- package/static/settings/assets/XpodAiConnectionsPodStore-CLr38P_Z.js +3 -0
- package/static/settings/assets/{activity-CgJJGpjx.js → activity-C5DAHHTE.js} +1 -1
- package/static/settings/assets/ai-connections-C6yaE6WQ.js +1 -0
- package/static/settings/assets/{badge-C4NypVyT.js → badge-D8eIyxKt.js} +1 -1
- package/static/settings/assets/{collection-runtime-CTLCDxAi.js → collection-runtime-DLc9zil8.js} +1 -1
- package/static/settings/assets/{dialog-Csq0vWUi.js → dialog-CyuR7Va4.js} +1 -1
- package/static/settings/assets/{download-DaLJJ-Wp.js → download-c0oxZrCz.js} +1 -1
- package/static/settings/assets/{external-link--w_iW5Au.js → external-link-D3Z34fP_.js} +1 -1
- package/static/settings/assets/{index-BukHiu4y.js → index-CKGbRFlc.js} +1 -1
- package/static/settings/assets/index-CSr3-2Cj.js +4 -0
- package/static/settings/assets/{index-COmVnZi2.js → index-ComidxAm.js} +1 -1
- package/static/settings/assets/{index-browser-BGpvHwD0.js → index-browser-CAscEbae.js} +1 -1
- package/static/settings/assets/{key-round-Bk4YRjBu.js → key-round-DyjLmXuB.js} +1 -1
- package/static/settings/assets/{rotate-ccw-TCabbqsr.js → rotate-ccw-679HF_ec.js} +1 -1
- package/static/settings/assets/{settings-CJWpdbNC.js → settings-DKknqu4C.js} +3 -3
- package/static/settings/assets/{skeleton-JDHYVe7t.js → skeleton-CkopNkPB.js} +1 -1
- package/static/settings/assets/{waypoints-DDvEl-MU.js → waypoints-CrqfAftE.js} +1 -1
- package/static/settings/assets/{workspace-layout-DV5QU30U.js → workspace-layout-UN6c4qTG.js} +1 -1
- package/static/settings/settings.html +1 -1
- package/static/auth-callback/assets/NetworkPage-B3qBfANA.js +0 -2
- package/static/auth-callback/assets/XpodAiConnectionsPodStore-BJiXm-PF.js +0 -3
- package/static/auth-callback/assets/ai-connections-CryuHGKW.js +0 -1
- package/static/auth-callback/assets/index-DlLYWOhw.js +0 -4
- package/static/dashboard/assets/NetworkPage-BAIPw-D_.js +0 -2
- package/static/dashboard/assets/ai-connections-DwCRqOQa.js +0 -1
- package/static/dashboard/assets/index-UD6QOE7H.js +0 -4
- package/static/settings/assets/NetworkPage-BKymvsQc.js +0 -2
- package/static/settings/assets/XpodAiConnectionsPodStore-BkNQ8fZx.js +0 -3
- package/static/settings/assets/ai-connections-CryuHGKW.js +0 -1
- package/static/settings/assets/index-B0mQa59b.js +0 -4
- /package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/request.d.ts +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/types.js +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/base-adapter.d.ts +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/base-adapter.js +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/codex.d.ts +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/codex.js +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/index.d.ts +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/index.js +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/json-env-adapter.d.ts +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/json-env-adapter.js +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/pi.d.ts +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/pi.js +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/transaction.d.ts +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/transaction.js +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/types.d.ts +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/types.js +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{credential-storage.d.ts → contract/credential-storage.d.ts} +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{credential-storage.js → contract/credential-storage.js} +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{endpoint-urls.d.ts → contract/endpoint-urls.d.ts} +0 -0
- /package/node_modules/@undefineds.co/ai-connections/dist/{endpoint-urls.js → contract/endpoint-urls.js} +0 -0
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
[
|
|
2
|
-
"
|
|
2
|
+
"ActivityEmitter",
|
|
3
3
|
"BaseQuintStore",
|
|
4
4
|
"ClaudeAuthenticationError",
|
|
5
5
|
"CliCommandError",
|
|
6
6
|
"CodeBuddyAuthError",
|
|
7
7
|
"DisabledSparqlFeatureError",
|
|
8
|
+
"Error",
|
|
8
9
|
"InvalidRelaySessionRequestError",
|
|
9
10
|
"InvalidTunnelTokenError",
|
|
10
11
|
"LEGACY_DERIVED_INDEX_CONSUMER_ID",
|
|
11
12
|
"LOG_FILE_PATTERN",
|
|
12
|
-
"normalizeContext",
|
|
13
13
|
"NodeRouteSourceNotFoundError",
|
|
14
14
|
"Omit",
|
|
15
15
|
"P2PSessionExpiredError",
|
|
16
16
|
"P2PSessionNotFoundError",
|
|
17
17
|
"P2PSignalingRequestError",
|
|
18
|
-
"registerDeviceNotificationRuntime",
|
|
19
|
-
"resolveCurrentLogFile",
|
|
20
|
-
"resolveLogFilePattern",
|
|
21
18
|
"SearchApiError",
|
|
22
19
|
"SolidFsConflictError",
|
|
23
20
|
"SolidFsNotFoundError",
|
|
24
21
|
"SubdomainClientError",
|
|
25
|
-
"UnsupportedSparqlQueryError",
|
|
26
22
|
"Uint8Array",
|
|
23
|
+
"UnsupportedSparqlQueryError",
|
|
27
24
|
"VectorApiError",
|
|
28
25
|
"WaitingRunnerError",
|
|
29
|
-
"
|
|
26
|
+
"assertPublicProbeTarget",
|
|
27
|
+
"createPinnedHeadProbeRequest",
|
|
28
|
+
"createPodOwnershipNodeAccessResolver",
|
|
29
|
+
"isPublicIpAddress",
|
|
30
|
+
"normalizeContext",
|
|
31
|
+
"registerDeviceNotificationRuntime",
|
|
32
|
+
"resolveCurrentLogFile",
|
|
33
|
+
"resolveLogFilePattern"
|
|
30
34
|
]
|
|
@@ -161,8 +161,15 @@ async function prepareAndApplyUpdate(engine, sparql, sourceUri, timeoutMs) {
|
|
|
161
161
|
}
|
|
162
162
|
const nativeSemanticCaseExecutor = {
|
|
163
163
|
prepareAndApplyUpdate,
|
|
164
|
+
// The fixture queries a container endpoint (`DEFAULT_BASE_PATH`), and every
|
|
165
|
+
// `Pod` query that is not inside `GRAPH` reads that container plus its
|
|
166
|
+
// subgraphs. `scopedUnion` is the dataset mode the product uses for a
|
|
167
|
+
// container endpoint (`SubgraphSparqlHttpHandler`), so the native authority is
|
|
168
|
+
// exercised under the same rule as the public authority, which has no dataset
|
|
169
|
+
// switch and always reads the endpoint scope.
|
|
164
170
|
query: (engine, testCase, timeoutMs) => nativeSparqlQuery(engine, testCase.query, {
|
|
165
171
|
basePath: RdfSemanticConformance_1.DEFAULT_BASE_PATH,
|
|
172
|
+
defaultDataset: 'scopedUnion',
|
|
166
173
|
operation: (0, RdfSemanticConformance_1.queryOperation)(testCase.acceptMediaType),
|
|
167
174
|
acceptMediaType: testCase.acceptMediaType,
|
|
168
175
|
timeoutMs,
|
|
@@ -3,7 +3,12 @@ export interface OfferingAuthorizationMethod {
|
|
|
3
3
|
id: string;
|
|
4
4
|
authMode: 'oauth' | 'deviceCode' | 'local' | 'apiKey';
|
|
5
5
|
connectMode?: 'authorizationCodeOAuth' | 'deviceCodeOAuth' | 'browserAssistedApiKey';
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Wording is the applet's (`display-wording.ts` in `@undefineds.co/ai-connections`),
|
|
8
|
+
* decided from the entry's id. The gateway names the entry and says whether this
|
|
9
|
+
* deployment can offer it; it does not write the button.
|
|
10
|
+
*/
|
|
11
|
+
label?: string;
|
|
7
12
|
lifecycle: 'active' | 'unavailable';
|
|
8
13
|
reason?: string;
|
|
9
14
|
}
|
|
@@ -12,7 +12,6 @@ function subscriptionAuthorizationMethods(deployment, binding) {
|
|
|
12
12
|
id: 'browser-oauth',
|
|
13
13
|
authMode: 'oauth',
|
|
14
14
|
connectMode: 'authorizationCodeOAuth',
|
|
15
|
-
label: '浏览器登录',
|
|
16
15
|
lifecycle: deployment === 'local' ? 'active' : 'unavailable',
|
|
17
16
|
...(deployment === 'local' ? {} : { reason: '浏览器登录需要本机回调,请在本机 Xpod 中使用,或选择设备码登录。' }),
|
|
18
17
|
}] : [];
|
|
@@ -22,13 +21,11 @@ function subscriptionAuthorizationMethods(deployment, binding) {
|
|
|
22
21
|
id: 'device-code',
|
|
23
22
|
authMode: 'deviceCode',
|
|
24
23
|
connectMode: 'deviceCodeOAuth',
|
|
25
|
-
label: '设备码登录',
|
|
26
24
|
lifecycle: 'active',
|
|
27
25
|
},
|
|
28
26
|
{
|
|
29
27
|
id: 'local-session-import',
|
|
30
28
|
authMode: 'local',
|
|
31
|
-
label: '已有登录态',
|
|
32
29
|
lifecycle: deployment === 'local' ? 'active' : 'unavailable',
|
|
33
30
|
...(deployment === 'local' ? {} : { reason: '请在运行本机客户端的 Xpod 上导入登录态。' }),
|
|
34
31
|
},
|
|
@@ -280,7 +280,7 @@ function providerProductsForDeployment(deployment) {
|
|
|
280
280
|
}
|
|
281
281
|
else if (offering.kind === 'local') {
|
|
282
282
|
authorizationMethods.push({
|
|
283
|
-
id: 'local-service', authMode: 'local',
|
|
283
|
+
id: 'local-service', authMode: 'local',
|
|
284
284
|
lifecycle: offering.lifecycle === 'unavailable' ? 'unavailable' : 'active',
|
|
285
285
|
});
|
|
286
286
|
}
|
|
@@ -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
|
};
|
|
@@ -15,6 +15,7 @@ const NgrokTunnelProvider_1 = require("../../tunnel/NgrokTunnelProvider");
|
|
|
15
15
|
const SakuraFrpTunnelProvider_1 = require("../../tunnel/SakuraFrpTunnelProvider");
|
|
16
16
|
const DEFAULT_CLOUD_API_ENDPOINT = 'https://api.undefineds.co';
|
|
17
17
|
const CloudflareDnsProvider_1 = require("../../dns/cloudflare/CloudflareDnsProvider");
|
|
18
|
+
const TencentDnsProvider_1 = require("../../dns/tencent/TencentDnsProvider");
|
|
18
19
|
const SubdomainService_1 = require("../../subdomain/SubdomainService");
|
|
19
20
|
const EdgeNodeDnsCoordinator_1 = require("../../edge/EdgeNodeDnsCoordinator");
|
|
20
21
|
const EdgeNodeCapabilityDetector_1 = require("../../edge/EdgeNodeCapabilityDetector");
|
|
@@ -27,7 +28,7 @@ const PodLookupRepository_1 = require("../../identity/drizzle/PodLookupRepositor
|
|
|
27
28
|
*/
|
|
28
29
|
function registerLocalServices(container) {
|
|
29
30
|
const config = container.resolve('config');
|
|
30
|
-
const { cloudApiEndpoint, nodeId, nodeToken, cloudflareTunnelToken, sakuraTunnelToken, ngrokAuthToken, ngrokUrl, ngrokPath, subdomain: subdomainConfig, } = config;
|
|
31
|
+
const { cloudApiEndpoint, nodeId, nodeToken, cloudflareTunnelToken, sakuraTunnelToken, ngrokAuthToken, ngrokUrl, ngrokPath, frpcPath, subdomain: subdomainConfig, } = config;
|
|
31
32
|
container.register({
|
|
32
33
|
podLookupRepo: (0, awilix_1.asFunction)(({ db }) => {
|
|
33
34
|
return new PodLookupRepository_1.PodLookupRepository(db);
|
|
@@ -42,11 +43,17 @@ function registerLocalServices(container) {
|
|
|
42
43
|
ngrokUrl,
|
|
43
44
|
});
|
|
44
45
|
const activeTunnelProvider = activeTunnel.provider;
|
|
46
|
+
// The settings page stores one credential per profile; the provider-global env key is
|
|
47
|
+
// only the legacy fallback. Without this the profile's own secret never reached the
|
|
48
|
+
// provider and the tunnel could not start even though the profile looked configured.
|
|
49
|
+
const activeCredential = activeTunnel.profile?.credentialEnvKey
|
|
50
|
+
? readCredential(process.env[activeTunnel.profile.credentialEnvKey])
|
|
51
|
+
: undefined;
|
|
45
52
|
if (activeTunnelProvider === 'ngrok') {
|
|
46
53
|
container.register({
|
|
47
54
|
localTunnelProvider: (0, awilix_1.asFunction)(() => {
|
|
48
55
|
return new NgrokTunnelProvider_1.NgrokTunnelProvider({
|
|
49
|
-
authtoken: ngrokAuthToken,
|
|
56
|
+
authtoken: activeCredential ?? ngrokAuthToken,
|
|
50
57
|
url: activeTunnel.profile?.publicUrl ?? ngrokUrl,
|
|
51
58
|
ngrokPath,
|
|
52
59
|
});
|
|
@@ -58,7 +65,7 @@ function registerLocalServices(container) {
|
|
|
58
65
|
container.register({
|
|
59
66
|
localTunnelProvider: (0, awilix_1.asFunction)(() => {
|
|
60
67
|
return new LocalTunnelProvider_1.LocalTunnelProvider({
|
|
61
|
-
tunnelToken: cloudflareTunnelToken,
|
|
68
|
+
tunnelToken: (activeCredential ?? cloudflareTunnelToken),
|
|
62
69
|
publicUrl: activeTunnel.profile?.publicUrl,
|
|
63
70
|
});
|
|
64
71
|
}).singleton(),
|
|
@@ -69,8 +76,9 @@ function registerLocalServices(container) {
|
|
|
69
76
|
container.register({
|
|
70
77
|
localTunnelProvider: (0, awilix_1.asFunction)(() => {
|
|
71
78
|
return new SakuraFrpTunnelProvider_1.SakuraFrpTunnelProvider({
|
|
72
|
-
token: sakuraTunnelToken,
|
|
79
|
+
token: (activeCredential ?? sakuraTunnelToken),
|
|
73
80
|
publicUrl: activeTunnel.profile?.publicUrl,
|
|
81
|
+
frpcPath,
|
|
74
82
|
});
|
|
75
83
|
}).singleton(),
|
|
76
84
|
});
|
|
@@ -81,8 +89,8 @@ function registerLocalServices(container) {
|
|
|
81
89
|
const apiToken = subdomainConfig?.cloudflareApiToken;
|
|
82
90
|
// 在 Local 模式下,强制使用 CSS_BASE_URL 作为域名来源
|
|
83
91
|
// 简化用户配置心智
|
|
84
|
-
let baseDomain;
|
|
85
|
-
if (process.env.CSS_BASE_URL) {
|
|
92
|
+
let baseDomain = process.env.XPOD_DNS_DOMAIN?.trim() || undefined;
|
|
93
|
+
if (!baseDomain && process.env.CSS_BASE_URL) {
|
|
86
94
|
try {
|
|
87
95
|
const url = new URL(process.env.CSS_BASE_URL);
|
|
88
96
|
baseDomain = url.hostname;
|
|
@@ -93,14 +101,20 @@ function registerLocalServices(container) {
|
|
|
93
101
|
}
|
|
94
102
|
// DEBUG: 打印变量状态
|
|
95
103
|
console.log(`[Local] Debug: apiToken=${apiToken ? '***' : 'undefined'}, baseDomain=${baseDomain}, CSS_BASE_URL=${process.env.CSS_BASE_URL}`);
|
|
96
|
-
|
|
97
|
-
|
|
104
|
+
// The settings page lets an operator pick the DNS provider, so the runtime honours that
|
|
105
|
+
// choice instead of always wiring Cloudflare and ignoring a saved "tencent".
|
|
106
|
+
const dnsProviderId = process.env.XPOD_DNS_PROVIDER?.trim().toLowerCase() || 'cloudflare';
|
|
107
|
+
const tencentDnsToken = process.env.XPOD_TENCENT_DNS_TOKEN?.trim();
|
|
108
|
+
const tencentDnsTokenId = process.env.XPOD_TENCENT_DNS_TOKEN_ID?.trim();
|
|
109
|
+
const dnsCredentialReady = dnsProviderId === 'tencent' ? Boolean(tencentDnsToken) : Boolean(apiToken);
|
|
110
|
+
if (dnsCredentialReady && baseDomain) {
|
|
111
|
+
console.log(`[Local] Self-hosted DNS mode detected (provider: ${dnsProviderId})`);
|
|
98
112
|
container.register({
|
|
99
|
-
// DNS Provider
|
|
113
|
+
// DNS Provider: one axis, the selected implementation.
|
|
100
114
|
dnsProvider: (0, awilix_1.asFunction)(() => {
|
|
101
|
-
return
|
|
102
|
-
|
|
103
|
-
|
|
115
|
+
return dnsProviderId === 'tencent'
|
|
116
|
+
? new TencentDnsProvider_1.TencentDnsProvider({ tokenId: tencentDnsTokenId, token: tencentDnsToken })
|
|
117
|
+
: new CloudflareDnsProvider_1.CloudflareDnsProvider({ apiToken: apiToken });
|
|
104
118
|
}).singleton(),
|
|
105
119
|
// DNS Coordinator (DnsMaintainer)
|
|
106
120
|
dnsCoordinator: (0, awilix_1.asFunction)(({ dnsProvider }) => {
|
|
@@ -230,6 +244,10 @@ function resolveActiveLocalTunnel(options) {
|
|
|
230
244
|
}),
|
|
231
245
|
};
|
|
232
246
|
}
|
|
247
|
+
/** A credential only counts when it actually carries a value. */
|
|
248
|
+
function readCredential(value) {
|
|
249
|
+
return typeof value === 'string' && value.trim() ? value.trim() : undefined;
|
|
250
|
+
}
|
|
233
251
|
function resolveLocalTunnelProvider(options) {
|
|
234
252
|
const explicit = options.explicit?.trim().toLowerCase();
|
|
235
253
|
if (explicit) {
|
|
@@ -33,6 +33,7 @@ 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");
|
|
36
37
|
const NodeHandler_1 = require("../handlers/NodeHandler");
|
|
37
38
|
const ChatHandler_1 = require("../handlers/ChatHandler");
|
|
38
39
|
const SubdomainHandler_1 = require("../handlers/SubdomainHandler");
|
|
@@ -162,6 +163,7 @@ function registerSharedRoutes(container, server) {
|
|
|
162
163
|
repository: nodeRepo,
|
|
163
164
|
baseStorageDomain: config.subdomain?.baseStorageDomain,
|
|
164
165
|
apiBaseUrl: config.cloudApiEndpoint ?? process.env.CSS_BASE_URL,
|
|
166
|
+
canAccessNode: (0, NodeAccessResolver_1.createPodOwnershipNodeAccessResolver)(podLookupRepository),
|
|
165
167
|
});
|
|
166
168
|
(0, NodeHandler_1.registerNodeRoutes)(server, { repository: nodeRepo });
|
|
167
169
|
const aiGatewayService = container.resolve('aiGatewayService');
|
|
@@ -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
|
}
|
|
@@ -40,7 +40,23 @@ export declare function createAdminServicesCapabilities(req: AuthenticatedReques
|
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
export declare function readDurableAdminEnvironment(): Record<string, string>;
|
|
43
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Tunnel profiles exactly as the runtime resolved them.
|
|
45
|
+
*
|
|
46
|
+
* `credentialEnvKey` is the profile-scoped key when one is configured, so a caller can
|
|
47
|
+
* write a secret where the runtime will actually read it.
|
|
48
|
+
*/
|
|
49
|
+
export declare function projectTunnelProfiles(): Array<{
|
|
50
|
+
id: string;
|
|
51
|
+
provider: string;
|
|
52
|
+
label?: string;
|
|
53
|
+
publicUrl?: string;
|
|
54
|
+
credentialEnvKey?: string;
|
|
55
|
+
credentialConfigured: boolean;
|
|
56
|
+
active: boolean;
|
|
57
|
+
parameters?: Record<string, string>;
|
|
58
|
+
}>;
|
|
59
|
+
export declare function writeDurableAdminEnvironmentPatch(input: Record<string, string>, removals?: string[]): void;
|
|
44
60
|
/**
|
|
45
61
|
* Why a coordinated public domain cannot be served, or `null` when nothing
|
|
46
62
|
* rules it out.
|
|
@@ -15,6 +15,7 @@ exports.sanitizeLogMessage = sanitizeLogMessage;
|
|
|
15
15
|
exports.isAdminMutationAllowed = isAdminMutationAllowed;
|
|
16
16
|
exports.createAdminServicesCapabilities = createAdminServicesCapabilities;
|
|
17
17
|
exports.readDurableAdminEnvironment = readDurableAdminEnvironment;
|
|
18
|
+
exports.projectTunnelProfiles = projectTunnelProfiles;
|
|
18
19
|
exports.writeDurableAdminEnvironmentPatch = writeDurableAdminEnvironmentPatch;
|
|
19
20
|
exports.describeUnservedPublicRoute = describeUnservedPublicRoute;
|
|
20
21
|
exports.registerAdminRoutes = registerAdminRoutes;
|
|
@@ -25,6 +26,8 @@ const fs_2 = require("fs");
|
|
|
25
26
|
const readline_1 = require("readline");
|
|
26
27
|
const runtime_1 = require("../../runtime");
|
|
27
28
|
const log_file_1 = require("../../logging/log-file");
|
|
29
|
+
const TunnelProviderCatalog_1 = require("../../tunnel/TunnelProviderCatalog");
|
|
30
|
+
const TunnelProfiles_1 = require("../../tunnel/TunnelProfiles");
|
|
28
31
|
const GatewayAdminProxyAuth_1 = require("../../runtime/GatewayAdminProxyAuth");
|
|
29
32
|
const CONFIG_DIR = path_1.default.resolve(runtime_1.PACKAGE_ROOT, 'config');
|
|
30
33
|
function getEnvFilePath() {
|
|
@@ -110,7 +113,7 @@ function sanitizeEnvForRead(env) {
|
|
|
110
113
|
function createAllowedAdminConfigPatch(input) {
|
|
111
114
|
const patch = {};
|
|
112
115
|
for (const [key, value] of Object.entries(input)) {
|
|
113
|
-
if (!ALLOWED_ADMIN_CONFIG_KEY_SET.has(key)) {
|
|
116
|
+
if (!ALLOWED_ADMIN_CONFIG_KEY_SET.has(key) && !(0, TunnelProviderCatalog_1.isTunnelProfileCredentialEnvKey)(key)) {
|
|
114
117
|
continue;
|
|
115
118
|
}
|
|
116
119
|
if (isAdminSecretEnvKey(key) && !value) {
|
|
@@ -248,11 +251,40 @@ function writeEnvFile(filePath, config) {
|
|
|
248
251
|
function readDurableAdminEnvironment() {
|
|
249
252
|
return readEnvFile(getEnvFilePath());
|
|
250
253
|
}
|
|
251
|
-
|
|
254
|
+
/**
|
|
255
|
+
* Tunnel profiles exactly as the runtime resolved them.
|
|
256
|
+
*
|
|
257
|
+
* `credentialEnvKey` is the profile-scoped key when one is configured, so a caller can
|
|
258
|
+
* write a secret where the runtime will actually read it.
|
|
259
|
+
*/
|
|
260
|
+
function projectTunnelProfiles() {
|
|
261
|
+
const state = (0, TunnelProfiles_1.resolveTunnelProfileState)(process.env);
|
|
262
|
+
return state.profiles.map((profile) => ({
|
|
263
|
+
id: profile.id,
|
|
264
|
+
provider: profile.provider,
|
|
265
|
+
...(profile.label ? { label: profile.label } : {}),
|
|
266
|
+
...(profile.publicUrl ? { publicUrl: profile.publicUrl } : {}),
|
|
267
|
+
...(profile.credentialEnvKey ? { credentialEnvKey: profile.credentialEnvKey } : {}),
|
|
268
|
+
credentialConfigured: profile.credentialConfigured === true,
|
|
269
|
+
active: state.activeProfile?.id === profile.id,
|
|
270
|
+
// Served to the console so an edit there cannot silently erase parameters the settings
|
|
271
|
+
// page wrote.
|
|
272
|
+
...(profile.parameters ? { parameters: profile.parameters } : {}),
|
|
273
|
+
}));
|
|
274
|
+
}
|
|
275
|
+
function writeDurableAdminEnvironmentPatch(input, removals = []) {
|
|
252
276
|
const filePath = getEnvFilePath();
|
|
253
277
|
const current = readEnvFile(filePath);
|
|
254
278
|
const patch = createAllowedAdminConfigPatch(input);
|
|
255
|
-
|
|
279
|
+
const next = { ...current, ...patch };
|
|
280
|
+
// Deleting a profile has to delete its credential: an empty secret value is filtered
|
|
281
|
+
// out of the patch (see createAllowedAdminConfigPatch), so removals are explicit.
|
|
282
|
+
for (const key of removals) {
|
|
283
|
+
if (ALLOWED_ADMIN_CONFIG_KEY_SET.has(key) || (0, TunnelProviderCatalog_1.isTunnelProfileCredentialEnvKey)(key)) {
|
|
284
|
+
delete next[key];
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
writeEnvFile(filePath, next);
|
|
256
288
|
}
|
|
257
289
|
/**
|
|
258
290
|
* List available config files
|
|
@@ -411,6 +443,11 @@ function registerAdminRoutes(server, options = {}) {
|
|
|
411
443
|
sendJson(res, 200, {
|
|
412
444
|
...sanitizeEnvForRead(env),
|
|
413
445
|
configFiles: listConfigFiles(),
|
|
446
|
+
// Operator pages render the same provider axis the runtime honours.
|
|
447
|
+
providers: TunnelProviderCatalog_1.TUNNEL_PROVIDERS,
|
|
448
|
+
// Profiles as the runtime resolved them, including the credential key that belongs
|
|
449
|
+
// to each profile: the operator console must not invent its own key naming.
|
|
450
|
+
tunnelProfiles: projectTunnelProfiles(),
|
|
414
451
|
});
|
|
415
452
|
}
|
|
416
453
|
catch (error) {
|
|
@@ -44,8 +44,14 @@ function registerEdgeNodeSignalRoutes(server, options) {
|
|
|
44
44
|
let metadata = mergeMetadata(existing?.metadata ?? {}, payload, now);
|
|
45
45
|
// 从 DB connectivity 列注入 subdomain/ipv4,供 dnsCoordinator 使用
|
|
46
46
|
const connectivityInfo = await repo.getNodeConnectivityInfo(nodeId);
|
|
47
|
+
// The subdomain a node may publish is assigned by the control plane, never by the
|
|
48
|
+
// node itself: a heartbeat must not be able to retarget another node's record.
|
|
49
|
+
delete metadata.subdomain;
|
|
50
|
+
if (isRecord(metadata.dns)) {
|
|
51
|
+
metadata.dns = Object.fromEntries(Object.entries(metadata.dns).filter(([key]) => key !== 'subdomain'));
|
|
52
|
+
}
|
|
47
53
|
if (connectivityInfo) {
|
|
48
|
-
if (connectivityInfo.subdomain
|
|
54
|
+
if (connectivityInfo.subdomain) {
|
|
49
55
|
metadata.subdomain = connectivityInfo.subdomain;
|
|
50
56
|
}
|
|
51
57
|
if (connectivityInfo.ipv4 && !metadata.ipv4) {
|
|
@@ -78,7 +84,9 @@ function registerEdgeNodeSignalRoutes(server, options) {
|
|
|
78
84
|
}
|
|
79
85
|
}
|
|
80
86
|
if (dnsCoordinator) {
|
|
81
|
-
|
|
87
|
+
// The control plane decides which subdomain this node owns; the coordinator gets
|
|
88
|
+
// that assignment explicitly instead of reading it back out of node metadata.
|
|
89
|
+
await dnsCoordinator.synchronize(nodeId, metadata, { subdomain: connectivityInfo?.subdomain });
|
|
82
90
|
}
|
|
83
91
|
logger.debug(`Signal received from node ${nodeId}`);
|
|
84
92
|
sendJson(response, 200, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getLoggerFor } from 'global-logger-factory';
|
|
2
2
|
import type { ApiServer } from '../ApiServer';
|
|
3
3
|
import type { AuthContext } from '../auth/AuthContext';
|
|
4
|
+
import { type TunnelProviderDescriptor } from '../../tunnel/TunnelProviderCatalog';
|
|
4
5
|
export interface NetworkSettingsStatus {
|
|
5
6
|
endpoint: string;
|
|
6
7
|
addresses: {
|
|
@@ -22,6 +23,21 @@ export interface NetworkSettingsStatus {
|
|
|
22
23
|
renewCertificate: boolean;
|
|
23
24
|
};
|
|
24
25
|
configuration?: NetworkDesiredConfiguration;
|
|
26
|
+
/**
|
|
27
|
+
* The provider axis, served so the settings page renders the same declaration the
|
|
28
|
+
* runtime honours instead of keeping its own list.
|
|
29
|
+
*/
|
|
30
|
+
providers?: readonly TunnelProviderDescriptor[];
|
|
31
|
+
/**
|
|
32
|
+
* The address a remote tunnel must forward to.
|
|
33
|
+
*
|
|
34
|
+
* Remotely-managed tunnels dial a port the operator typed into a provider console, so the
|
|
35
|
+
* page shows this value to copy rather than making the operator guess it.
|
|
36
|
+
*/
|
|
37
|
+
ingress?: {
|
|
38
|
+
port: number;
|
|
39
|
+
originUrl: string;
|
|
40
|
+
};
|
|
25
41
|
}
|
|
26
42
|
export interface NetworkDesiredConfiguration {
|
|
27
43
|
domainDns: {
|
|
@@ -51,12 +67,17 @@ export interface NetworkDesiredConfiguration {
|
|
|
51
67
|
}
|
|
52
68
|
export interface NetworkTunnelProfile {
|
|
53
69
|
id: string;
|
|
54
|
-
provider:
|
|
70
|
+
provider: string;
|
|
55
71
|
label: string;
|
|
56
|
-
|
|
72
|
+
publicUrl?: string;
|
|
57
73
|
credentialConfigured: boolean;
|
|
58
74
|
parameters?: Record<string, string>;
|
|
59
75
|
}
|
|
76
|
+
/** `publicEndpoint` is the field older settings clients sent; `publicUrl` is canonical. */
|
|
77
|
+
export type NetworkTunnelProfilePatch = Omit<NetworkTunnelProfile, 'credentialConfigured'> & {
|
|
78
|
+
credential?: string;
|
|
79
|
+
publicEndpoint?: string;
|
|
80
|
+
};
|
|
60
81
|
export type NetworkConfigurationPatch = {
|
|
61
82
|
domainDns?: Partial<Omit<NetworkDesiredConfiguration['domainDns'], 'credentialConfigured'>> & {
|
|
62
83
|
credential?: string;
|
|
@@ -64,9 +85,7 @@ export type NetworkConfigurationPatch = {
|
|
|
64
85
|
https?: Partial<NetworkDesiredConfiguration['https']>;
|
|
65
86
|
tunnelProfiles?: {
|
|
66
87
|
activeProfileId?: string;
|
|
67
|
-
profiles?:
|
|
68
|
-
credential?: string;
|
|
69
|
-
}>;
|
|
88
|
+
profiles?: NetworkTunnelProfilePatch[];
|
|
70
89
|
};
|
|
71
90
|
p2p?: Partial<NetworkDesiredConfiguration['p2p']>;
|
|
72
91
|
};
|
|
@@ -77,6 +96,12 @@ export interface NetworkConfigurationStore {
|
|
|
77
96
|
export interface CapabilityStatus {
|
|
78
97
|
supported: boolean;
|
|
79
98
|
status: string;
|
|
99
|
+
/** Readiness stage of the provider, when the provider reports one. */
|
|
100
|
+
stage?: string;
|
|
101
|
+
/** Endpoint the provider actually observed; distinct from a declared/configured address. */
|
|
102
|
+
endpoint?: string;
|
|
103
|
+
/** Redacted reason for a non-active status; absent when there is nothing to explain. */
|
|
104
|
+
detail?: string;
|
|
80
105
|
}
|
|
81
106
|
export type DiagnosticStatus = 'ok' | 'warning' | 'error' | 'unsupported';
|
|
82
107
|
export interface NetworkDiagnosticCheckResult {
|
|
@@ -138,6 +163,13 @@ export interface NetworkSettingsHandlerOptions {
|
|
|
138
163
|
internalAdminAuthSecret?: string;
|
|
139
164
|
logger?: Pick<ReturnType<typeof getLoggerFor>, 'warn' | 'error'>;
|
|
140
165
|
}
|
|
166
|
+
/** The ingress address this runtime listens on, when it published one. */
|
|
167
|
+
export declare function readIngressAddress(env?: NodeJS.ProcessEnv): {
|
|
168
|
+
ingress?: {
|
|
169
|
+
port: number;
|
|
170
|
+
originUrl: string;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
141
173
|
export declare function registerNetworkSettingsRoutes(server: ApiServer, options: NetworkSettingsHandlerOptions): void;
|
|
142
174
|
export declare function createDeploymentNetworkSettingsAuthorizer(options?: NetworkSettingsIdentityAuthorizerOptions): NetworkSettingsAuthorizer;
|
|
143
175
|
export declare function createAddressReaders(input: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readIngressAddress = readIngressAddress;
|
|
3
4
|
exports.registerNetworkSettingsRoutes = registerNetworkSettingsRoutes;
|
|
4
5
|
exports.createDeploymentNetworkSettingsAuthorizer = createDeploymentNetworkSettingsAuthorizer;
|
|
5
6
|
exports.createAddressReaders = createAddressReaders;
|
|
@@ -13,6 +14,15 @@ const node_os_1 = require("node:os");
|
|
|
13
14
|
const global_logger_factory_1 = require("global-logger-factory");
|
|
14
15
|
const readBoundedJsonBody_1 = require("../http/readBoundedJsonBody");
|
|
15
16
|
const AdminHandler_1 = require("./AdminHandler");
|
|
17
|
+
const TunnelProviderCatalog_1 = require("../../tunnel/TunnelProviderCatalog");
|
|
18
|
+
/** The ingress address this runtime listens on, when it published one. */
|
|
19
|
+
function readIngressAddress(env = process.env) {
|
|
20
|
+
const port = Number.parseInt(env.XPOD_GATEWAY_INGRESS_PORT ?? '', 10);
|
|
21
|
+
if (!Number.isInteger(port) || port <= 0 || port > 65535) {
|
|
22
|
+
return {};
|
|
23
|
+
}
|
|
24
|
+
return { ingress: { port, originUrl: `http://127.0.0.1:${port}` } };
|
|
25
|
+
}
|
|
16
26
|
function registerNetworkSettingsRoutes(server, options) {
|
|
17
27
|
const logger = options.logger ?? (0, global_logger_factory_1.getLoggerFor)('NetworkSettingsHandler');
|
|
18
28
|
const authorizer = options.authorizer ?? createDeploymentNetworkSettingsAuthorizer();
|
|
@@ -23,7 +33,12 @@ function registerNetworkSettingsRoutes(server, options) {
|
|
|
23
33
|
try {
|
|
24
34
|
const status = await readNetworkStatus(options, logger);
|
|
25
35
|
const configuration = await options.configurationStore?.read();
|
|
26
|
-
sendJson(response, 200,
|
|
36
|
+
sendJson(response, 200, {
|
|
37
|
+
...status,
|
|
38
|
+
providers: TunnelProviderCatalog_1.TUNNEL_PROVIDERS,
|
|
39
|
+
...readIngressAddress(),
|
|
40
|
+
...(configuration ? { configuration } : {}),
|
|
41
|
+
});
|
|
27
42
|
}
|
|
28
43
|
catch (error) {
|
|
29
44
|
logger.error(`Failed to read network settings status: ${redactSecretText(error)}`);
|
|
@@ -134,11 +149,16 @@ function parseNetworkConfigurationPatch(value) {
|
|
|
134
149
|
return value;
|
|
135
150
|
}
|
|
136
151
|
function validTunnelProfile(value) {
|
|
137
|
-
|
|
152
|
+
// `publicUrl` is canonical; `publicEndpoint` is what older clients sent.
|
|
153
|
+
if (!isPlainRecord(value) || hasUnknownKeys(value, ['id', 'provider', 'label', 'publicUrl', 'publicEndpoint', 'credential', 'parameters']))
|
|
138
154
|
return false;
|
|
139
155
|
if (typeof value.id !== 'string' || !value.id.trim() || typeof value.label !== 'string' || !value.label.trim())
|
|
140
156
|
return false;
|
|
141
|
-
if (!
|
|
157
|
+
if (!(0, TunnelProviderCatalog_1.isTunnelProviderId)(value.provider) || !optionalString(value.publicUrl) || !optionalString(value.publicEndpoint) || !optionalString(value.credential))
|
|
158
|
+
return false;
|
|
159
|
+
// A provider the local runtime cannot start must be refused here rather than stored and
|
|
160
|
+
// reported as "configured" while nothing can ever come up.
|
|
161
|
+
if ((0, TunnelProviderCatalog_1.tunnelProviderDescriptor)(value.provider)?.runtimeSupported === false)
|
|
142
162
|
return false;
|
|
143
163
|
return value.parameters === undefined || (isPlainRecord(value.parameters) && Object.values(value.parameters).every((item) => typeof item === 'string'));
|
|
144
164
|
}
|
|
@@ -205,16 +225,20 @@ function createTunnelStatusReader(tunnelProvider) {
|
|
|
205
225
|
return {
|
|
206
226
|
read: async () => {
|
|
207
227
|
const status = tunnelProvider.getStatus();
|
|
228
|
+
const detail = status.error ? redactSecretText(status.error) : undefined;
|
|
229
|
+
const observed = typeof status.endpoint === 'string' && status.endpoint ? { endpoint: status.endpoint } : {};
|
|
230
|
+
const stage = status.stage ? { stage: status.stage } : {};
|
|
208
231
|
if (status.connected) {
|
|
209
|
-
return { supported: true, status: 'active' };
|
|
232
|
+
return { supported: true, status: 'active', ...stage, ...observed };
|
|
210
233
|
}
|
|
211
234
|
if (status.running) {
|
|
212
|
-
|
|
235
|
+
// A running process is not a published proxy: say which stage it reached.
|
|
236
|
+
return { supported: true, status: 'starting', ...stage, ...observed };
|
|
213
237
|
}
|
|
214
|
-
if (
|
|
215
|
-
return { supported: true, status: 'error' };
|
|
238
|
+
if (detail) {
|
|
239
|
+
return { supported: true, status: 'error', ...stage, ...observed, detail };
|
|
216
240
|
}
|
|
217
|
-
return { supported: true, status: 'inactive' };
|
|
241
|
+
return { supported: true, status: 'inactive', ...observed };
|
|
218
242
|
},
|
|
219
243
|
};
|
|
220
244
|
}
|
|
@@ -302,11 +326,15 @@ function safeAddressList(reader, logger) {
|
|
|
302
326
|
function buildDefaultDiagnostics(options, logger) {
|
|
303
327
|
return [
|
|
304
328
|
{
|
|
305
|
-
|
|
306
|
-
|
|
329
|
+
// This check only proves that an address is configured. Reachability is a different
|
|
330
|
+
// fact and needs a real probe, so the result must not be rendered as one.
|
|
331
|
+
id: 'address-configuration',
|
|
332
|
+
label: 'Address configuration',
|
|
307
333
|
run: async () => {
|
|
308
334
|
const endpoint = normalizeEndpoint(resolveValue(options.endpoint));
|
|
309
|
-
return endpoint
|
|
335
|
+
return endpoint
|
|
336
|
+
? { status: 'ok', detail: `configured: ${endpoint}` }
|
|
337
|
+
: { status: 'unsupported', detail: 'endpoint_unavailable' };
|
|
310
338
|
},
|
|
311
339
|
},
|
|
312
340
|
{
|
|
@@ -18,7 +18,7 @@ import type { EdgeNodeRepository } from '../../identity/drizzle/EdgeNodeReposito
|
|
|
18
18
|
import type { ServiceTokenRepositoryPort } from '../../identity/drizzle/ServiceTokenRepository';
|
|
19
19
|
import type { DdnsRepository } from '../../identity/drizzle/DdnsRepository';
|
|
20
20
|
import type { DnsProvider } from '../../dns/DnsProvider';
|
|
21
|
-
import type { TunnelProvider } from '../../tunnel/TunnelProvider';
|
|
21
|
+
import type { TunnelProvider, TunnelConfig } from '../../tunnel/TunnelProvider';
|
|
22
22
|
export interface ProvisionHandlerOptions {
|
|
23
23
|
repository: EdgeNodeRepository;
|
|
24
24
|
ddnsRepo?: DdnsRepository;
|
|
@@ -38,6 +38,11 @@ export interface ProvisionHandlerOptions {
|
|
|
38
38
|
serviceTokenRepository?: ServiceTokenRepositoryPort;
|
|
39
39
|
}
|
|
40
40
|
export declare function registerProvisionRoutes(server: ApiServer, options: ProvisionHandlerOptions): void;
|
|
41
|
+
export declare function readManagedTunnelConfig(metadata: Record<string, unknown> | null): {
|
|
42
|
+
subdomain?: string;
|
|
43
|
+
localPort?: number;
|
|
44
|
+
config: TunnelConfig;
|
|
45
|
+
} | undefined;
|
|
41
46
|
/**
|
|
42
47
|
* Local 端 SP 状态查询路由
|
|
43
48
|
*/
|
|
@@ -16,10 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.registerProvisionRoutes = registerProvisionRoutes;
|
|
19
|
+
exports.readManagedTunnelConfig = readManagedTunnelConfig;
|
|
19
20
|
exports.registerProvisionStatusRoute = registerProvisionStatusRoute;
|
|
20
21
|
exports.createLocalSetupProvisionStateWriter = createLocalSetupProvisionStateWriter;
|
|
21
22
|
const node_crypto_1 = require("node:crypto");
|
|
22
23
|
const global_logger_factory_1 = require("global-logger-factory");
|
|
24
|
+
const TunnelProviderCatalog_1 = require("../../tunnel/TunnelProviderCatalog");
|
|
23
25
|
const ProvisionCodeCodec_1 = require("../../provision/ProvisionCodeCodec");
|
|
24
26
|
const ServiceAccessTokenCodec_1 = require("../../provision/ServiceAccessTokenCodec");
|
|
25
27
|
const LocalProvisionState_1 = require("../../provision/LocalProvisionState");
|
|
@@ -421,7 +423,10 @@ function readManagedTunnelConfig(metadata) {
|
|
|
421
423
|
const tunnelId = value.tunnelId;
|
|
422
424
|
const subdomain = typeof value.subdomain === 'string' ? value.subdomain : undefined;
|
|
423
425
|
const localPort = typeof value.localPort === 'number' ? value.localPort : undefined;
|
|
424
|
-
|
|
426
|
+
// Provision callers historically spell Sakura with a hyphen; the catalogue owns the
|
|
427
|
+
// canonical id, so accept either spelling and store one.
|
|
428
|
+
const canonicalProvider = (0, TunnelProviderCatalog_1.parseTunnelProvider)(provider);
|
|
429
|
+
if ((canonicalProvider !== 'cloudflare' && canonicalProvider !== 'frp' && canonicalProvider !== 'sakura_frp')
|
|
425
430
|
|| typeof endpoint !== 'string') {
|
|
426
431
|
return undefined;
|
|
427
432
|
}
|
|
@@ -429,7 +434,7 @@ function readManagedTunnelConfig(metadata) {
|
|
|
429
434
|
subdomain,
|
|
430
435
|
localPort,
|
|
431
436
|
config: {
|
|
432
|
-
provider,
|
|
437
|
+
provider: canonicalProvider,
|
|
433
438
|
subdomain: subdomain ?? 'local',
|
|
434
439
|
endpoint,
|
|
435
440
|
tunnelId: typeof tunnelId === 'string' ? tunnelId : undefined,
|
|
@@ -9,5 +9,11 @@ export interface ReachabilityHandlerOptions {
|
|
|
9
9
|
maxActiveP2PSessionsPerNode?: number;
|
|
10
10
|
maxP2PCandidatesPerUpdate?: number;
|
|
11
11
|
maxP2PCandidatesPerSession?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Whether a Solid principal may act on a node, e.g. through Pod ownership or an
|
|
14
|
+
* explicit grant. Absent means "cannot prove access", which denies instead of
|
|
15
|
+
* handing an unrelated WebID signaling access to the node.
|
|
16
|
+
*/
|
|
17
|
+
canAccessNode?: (nodeId: string, webId: string) => Promise<boolean> | boolean;
|
|
12
18
|
}
|
|
13
19
|
export declare function registerReachabilityRoutes(server: ApiServer, options: ReachabilityHandlerOptions): void;
|