@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.
Files changed (331) hide show
  1. package/config/cloud.json +0 -3
  2. package/config/components-ignore.json +11 -7
  3. package/config/local.json +0 -3
  4. package/config/xpod.base.json +0 -24
  5. package/dist/api/ai-config/AiConfigStore.d.ts +2 -2
  6. package/dist/api/ai-config/AiConfigStore.js +4 -1
  7. package/dist/api/ai-gateway/auth/CallerPodAccess.d.ts +2 -5
  8. package/dist/api/ai-gateway/auth/CallerPodAccess.js +3 -42
  9. package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.d.ts +2 -1
  10. package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.js +1 -1
  11. package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.d.ts +3 -8
  12. package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.js +9 -32
  13. package/dist/api/ai-gateway/connect/index.d.ts +3 -3
  14. package/dist/api/ai-gateway/connect/index.js +9 -38
  15. package/dist/api/ai-gateway/errors.js +2 -1
  16. package/dist/api/ai-gateway/models/PodModelSelectionRepository.d.ts +3 -3
  17. package/dist/api/ai-gateway/models/PodModelSelectionRepository.js +7 -11
  18. package/dist/api/ai-gateway/pod/HostedPodRoute.d.ts +27 -0
  19. package/dist/api/ai-gateway/pod/HostedPodRoute.js +47 -0
  20. package/dist/api/ai-gateway/pod/OwnerPodAccess.d.ts +79 -0
  21. package/dist/api/ai-gateway/pod/OwnerPodAccess.js +192 -0
  22. package/dist/api/ai-gateway/pod/PodInterfaceKeyStore.d.ts +52 -0
  23. package/dist/api/ai-gateway/pod/PodInterfaceKeyStore.js +61 -0
  24. package/dist/api/ai-gateway/providers/ProviderRegistry.js +1 -1
  25. package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.d.ts +3 -3
  26. package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.js +7 -32
  27. package/dist/api/ai-gateway/service-access/AiConnectionsServiceAccess.d.ts +1 -1
  28. package/dist/api/ai-gateway/service-access/AiConnectionsServiceAccess.js +1 -1
  29. package/dist/api/auth/ClientCredentialsAuthenticator.js +5 -28
  30. package/dist/api/auth/TokenEndpointRoute.d.ts +18 -0
  31. package/dist/api/auth/TokenEndpointRoute.js +36 -0
  32. package/dist/api/chatkit/pod-store.d.ts +4 -4
  33. package/dist/api/chatkit/pod-store.js +24 -95
  34. package/dist/api/container/common.js +36 -23
  35. package/dist/api/container/index.js +1 -0
  36. package/dist/api/container/local.js +88 -37
  37. package/dist/api/container/routes.js +41 -7
  38. package/dist/api/container/types.d.ts +4 -2
  39. package/dist/api/handlers/AdminHandler.d.ts +17 -1
  40. package/dist/api/handlers/AdminHandler.js +40 -3
  41. package/dist/api/handlers/AiGatewayManagementHandler.d.ts +6 -0
  42. package/dist/api/handlers/AiGatewayManagementHandler.js +17 -4
  43. package/dist/api/handlers/EdgeNodeSignalHandler.js +10 -2
  44. package/dist/api/handlers/NetworkSettingsHandler.d.ts +44 -5
  45. package/dist/api/handlers/NetworkSettingsHandler.js +46 -11
  46. package/dist/api/handlers/PodSettingsHandler.d.ts +3 -3
  47. package/dist/api/handlers/PodSettingsHandler.js +3 -3
  48. package/dist/api/handlers/ProvisionHandler.d.ts +35 -1
  49. package/dist/api/handlers/ProvisionHandler.js +53 -2
  50. package/dist/api/handlers/ReachabilityHandler.d.ts +6 -0
  51. package/dist/api/handlers/ReachabilityHandler.js +25 -6
  52. package/dist/api/network/NetworkEnvironmentConfigurationStore.d.ts +6 -1
  53. package/dist/api/network/NetworkEnvironmentConfigurationStore.js +72 -16
  54. package/dist/api/runtime.d.ts +18 -0
  55. package/dist/api/runtime.js +28 -2
  56. package/dist/api/service/AiClientConfigurationService.d.ts +1 -1
  57. package/dist/api/service/AiClientConfigurationService.js +1 -1
  58. package/dist/cli/commands/start.d.ts +26 -1
  59. package/dist/cli/commands/start.js +69 -5
  60. package/dist/components/components.jsonld +1 -1
  61. package/dist/components/context.jsonld +35 -42
  62. package/dist/edge/EdgeNodeAgent.d.ts +16 -0
  63. package/dist/edge/EdgeNodeAgent.js +56 -1
  64. package/dist/edge/EdgeNodeAgent.jsonld +8 -0
  65. package/dist/edge/EdgeNodeAgentInitializer.d.ts +2 -0
  66. package/dist/edge/EdgeNodeAgentInitializer.js +1 -0
  67. package/dist/edge/EdgeNodeAgentInitializer.jsonld +19 -0
  68. package/dist/edge/EdgeNodeDnsCoordinator.d.ts +11 -1
  69. package/dist/edge/EdgeNodeDnsCoordinator.js +12 -2
  70. package/dist/edge/EdgeNodeHealthProbeService.d.ts +15 -0
  71. package/dist/edge/EdgeNodeHealthProbeService.js +44 -12
  72. package/dist/edge/EdgeNodeHealthProbeService.jsonld +77 -0
  73. package/dist/edge/ProbeTargetGuard.d.ts +35 -0
  74. package/dist/edge/ProbeTargetGuard.js +142 -0
  75. package/dist/edge/reachability/NodeAccessResolver.d.ts +16 -0
  76. package/dist/edge/reachability/NodeAccessResolver.js +30 -0
  77. package/dist/edge/reachability/ReachabilitySessionService.js +4 -1
  78. package/dist/edge/reachability/RouteSetBuilder.d.ts +18 -1
  79. package/dist/edge/reachability/RouteSetBuilder.js +47 -0
  80. package/dist/edge/reachability/RouteSetBuilder.jsonld +29 -0
  81. package/dist/edge/reachability/types.d.ts +8 -2
  82. package/dist/http/SubgraphSparqlHttpHandler.d.ts +1 -25
  83. package/dist/http/SubgraphSparqlHttpHandler.js +0 -100
  84. package/dist/http/SubgraphSparqlHttpHandler.jsonld +0 -8
  85. package/dist/identity/drizzle/PodInterfaceKeyRepository.d.ts +33 -0
  86. package/dist/identity/drizzle/PodInterfaceKeyRepository.js +78 -0
  87. package/dist/identity/drizzle/db.d.ts +7 -0
  88. package/dist/identity/drizzle/db.js +30 -0
  89. package/dist/identity/drizzle/schema.pg.d.ts +9 -0
  90. package/dist/identity/drizzle/schema.pg.js +16 -1
  91. package/dist/identity/drizzle/schema.sqlite.d.ts +106 -0
  92. package/dist/identity/drizzle/schema.sqlite.js +16 -1
  93. package/dist/index.d.ts +3 -2
  94. package/dist/index.js +9 -5
  95. package/dist/main.js +7 -0
  96. package/dist/runtime/GatewayAdminProxyAuth.d.ts +1 -16
  97. package/dist/runtime/GatewayAdminProxyAuth.js +2 -71
  98. package/dist/runtime/Proxy.d.ts +32 -1
  99. package/dist/runtime/Proxy.js +125 -31
  100. package/dist/runtime/bootstrap.d.ts +21 -0
  101. package/dist/runtime/bootstrap.js +45 -1
  102. package/dist/runtime/css-process.d.ts +1 -0
  103. package/dist/runtime/css-process.js +1 -0
  104. package/dist/runtime/host/node/NodeRuntimeHost.js +6 -1
  105. package/dist/runtime/host/types.d.ts +6 -0
  106. package/dist/runtime/index.d.ts +1 -1
  107. package/dist/runtime/index.js +4 -1
  108. package/dist/runtime/js-runtime.js +10 -3
  109. package/dist/runtime/lifecycle.js +6 -4
  110. package/dist/runtime/port-finder.d.ts +26 -0
  111. package/dist/runtime/port-finder.js +64 -0
  112. package/dist/runtime/runner/node/NodeGatewayRuntimeRunner.js +1 -0
  113. package/dist/runtime/runner/types.d.ts +5 -0
  114. package/dist/runtime/runtime-types.d.ts +1 -0
  115. package/dist/test-utils/local-managed-client-p2p-e2e-smoke.js +1 -1
  116. package/dist/tunnel/AutoTunnelProvider.d.ts +56 -0
  117. package/dist/tunnel/AutoTunnelProvider.js +181 -0
  118. package/dist/tunnel/LocalTunnelProvider.d.ts +15 -0
  119. package/dist/tunnel/LocalTunnelProvider.js +87 -18
  120. package/dist/tunnel/LocalTunnelProvider.jsonld +27 -0
  121. package/dist/tunnel/NgrokTunnelProvider.d.ts +4 -0
  122. package/dist/tunnel/NgrokTunnelProvider.js +117 -43
  123. package/dist/tunnel/NgrokTunnelProvider.jsonld +4 -0
  124. package/dist/tunnel/SakuraFrpTunnelProvider.d.ts +65 -3
  125. package/dist/tunnel/SakuraFrpTunnelProvider.js +268 -25
  126. package/dist/tunnel/TunnelLifecycle.d.ts +14 -0
  127. package/dist/tunnel/TunnelLifecycle.js +34 -0
  128. package/dist/tunnel/TunnelProfiles.d.ts +33 -3
  129. package/dist/tunnel/TunnelProfiles.js +105 -78
  130. package/dist/tunnel/TunnelProvider.d.ts +15 -2
  131. package/dist/tunnel/TunnelProvider.jsonld +8 -0
  132. package/dist/tunnel/TunnelProviderCatalog.d.ts +62 -0
  133. package/dist/tunnel/TunnelProviderCatalog.js +130 -0
  134. package/dist/tunnel/index.d.ts +1 -0
  135. package/dist/tunnel/index.js +3 -1
  136. package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.d.ts +1 -1
  137. package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.js +1 -1
  138. package/node_modules/@undefineds.co/ai-connections/dist/AiAuthorizationActions.d.ts +1 -1
  139. package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.d.ts +1 -1
  140. package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.js +1 -1
  141. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectDialog.d.ts +1 -1
  142. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.d.ts +1 -1
  143. package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialPoolSection.d.ts +1 -1
  144. package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialRow.d.ts +1 -1
  145. package/node_modules/@undefineds.co/ai-connections/dist/AiCustomProviderDialog.d.ts +1 -1
  146. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeyRow.d.ts +1 -1
  147. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.d.ts +1 -1
  148. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayModelsSection.d.ts +1 -1
  149. package/node_modules/@undefineds.co/ai-connections/dist/AiOfferingDetails.d.ts +1 -1
  150. package/node_modules/@undefineds.co/ai-connections/dist/AiProviderCard.d.ts +1 -1
  151. package/node_modules/@undefineds.co/ai-connections/dist/AiQuotaCard.d.ts +1 -1
  152. package/node_modules/@undefineds.co/ai-connections/dist/AiSortableCredentialList.d.ts +1 -1
  153. package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.d.ts +1 -1
  154. package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.d.ts +1 -1
  155. package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.js +3 -3
  156. package/node_modules/@undefineds.co/ai-connections/dist/collections.d.ts +1 -1
  157. package/node_modules/@undefineds.co/ai-connections/dist/collections.js +3 -3
  158. package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/ai-connections-client.d.ts +1 -1
  159. package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/ai-connections-client.js +1 -1
  160. package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/index.cjs +8 -8
  161. package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/index.d.ts +1 -1
  162. package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/index.js +1 -1
  163. package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/provider-catalog.cjs +3 -3
  164. package/node_modules/@undefineds.co/ai-connections/dist/controller.d.ts +1 -1
  165. package/node_modules/@undefineds.co/ai-connections/dist/controller.js +1 -1
  166. package/node_modules/@undefineds.co/ai-connections/dist/credential-labels.d.ts +1 -1
  167. package/node_modules/@undefineds.co/ai-connections/dist/display-wording.d.ts +1 -1
  168. package/node_modules/@undefineds.co/ai-connections/dist/error-wording.d.ts +1 -1
  169. package/node_modules/@undefineds.co/ai-connections/dist/error-wording.js +8 -3
  170. package/node_modules/@undefineds.co/ai-connections/dist/gateway-endpoints.js +1 -1
  171. package/node_modules/@undefineds.co/ai-connections/dist/offering-endpoints.d.ts +1 -1
  172. package/node_modules/@undefineds.co/ai-connections/dist/offering-label.d.ts +1 -1
  173. package/node_modules/@undefineds.co/ai-connections/dist/provider-visuals.d.ts +1 -1
  174. package/node_modules/@undefineds.co/ai-connections/dist/service-access.js +1 -1
  175. package/node_modules/@undefineds.co/ai-connections/dist/useAiConnectDialog.d.ts +1 -1
  176. package/node_modules/@undefineds.co/ai-connections/package.json +31 -1
  177. package/node_modules/@undefineds.co/solid-sdk/dist/access-route.cjs +230 -0
  178. package/node_modules/@undefineds.co/solid-sdk/dist/access-route.d.ts +76 -0
  179. package/node_modules/@undefineds.co/solid-sdk/dist/access-route.js +115 -0
  180. package/node_modules/@undefineds.co/solid-sdk/dist/index.cjs +89 -0
  181. package/node_modules/@undefineds.co/solid-sdk/dist/index.d.ts +1 -0
  182. package/node_modules/@undefineds.co/solid-sdk/dist/index.js +1 -0
  183. package/node_modules/@undefineds.co/solid-sdk/package.json +6 -1
  184. package/package.json +5 -6
  185. package/static/app/assets/inrupt-smoke.js +23 -23
  186. package/static/app/assets/main.css +1 -1
  187. package/static/auth-callback/assets/{AiConfigContext-DlFyEWy9.js → AiConfigContext-Bx0HCAW5.js} +1 -1
  188. package/static/auth-callback/assets/{AiConfigPage-CkYk-SFW.js → AiConfigPage-ChQImMbm.js} +1 -1
  189. package/static/auth-callback/assets/{DocumentProcessingPanel-CqIr3JqN.js → DocumentProcessingPanel-D830H4SH.js} +1 -1
  190. package/static/auth-callback/assets/{IndexLifecyclePanel-C1GKV3Vx.js → IndexLifecyclePanel-CnlkjMF8.js} +1 -1
  191. package/static/auth-callback/assets/{IndexSubjectPanel-ro9lC6XW.js → IndexSubjectPanel-CdEfg_CO.js} +1 -1
  192. package/static/auth-callback/assets/{ModelAssignmentsPanel-DxNdyKRJ.js → ModelAssignmentsPanel-D-8A8dZx.js} +1 -1
  193. package/static/auth-callback/assets/{ModelsPage-BVtWSPBU.js → ModelsPage-Cim7cubp.js} +3 -3
  194. package/static/auth-callback/assets/NetworkPage-CfK3x-pb.js +2 -0
  195. package/static/auth-callback/assets/{PaneListHeader-ByKw8ada.js → PaneListHeader-Bf_kEd4U.js} +1 -1
  196. package/static/auth-callback/assets/{SearchIndexingPanel-CulBKcYT.js → SearchIndexingPanel-4kD4RBEQ.js} +1 -1
  197. package/static/auth-callback/assets/{StatusSubjectPanel-VOcfrt8o.js → StatusSubjectPanel-Bw9AiTSf.js} +1 -1
  198. package/static/auth-callback/assets/{StatusWorkspace-Jsz6hAdE.js → StatusWorkspace-C-301H-0.js} +1 -1
  199. package/static/auth-callback/assets/{SystemSettingsPage-BFNvGAle.js → SystemSettingsPage-BbWn-eG6.js} +1 -1
  200. package/static/auth-callback/assets/{SystemSettingsSubjectPanel-DFRdrSfK.js → SystemSettingsSubjectPanel-DA4wvNSm.js} +1 -1
  201. package/static/auth-callback/assets/{XpodAiConnectionsPodStore-C6KpvHVg.js → XpodAiConnectionsPodStore-CohdyLoX.js} +1 -1
  202. package/static/auth-callback/assets/{activity-DnTlb9iM.js → activity-CCsb9Oam.js} +1 -1
  203. package/static/auth-callback/assets/ai-connections-DexTPyfC.js +1 -0
  204. package/static/auth-callback/assets/{auth-callback-D2UkK5Xj.js → auth-callback-Ds-c62W3.js} +5 -5
  205. package/static/auth-callback/assets/auth-callback-rk080mvG.css +1 -0
  206. package/static/auth-callback/assets/{badge-D7IJuuTM.js → badge-CQm5OyzR.js} +1 -1
  207. package/static/auth-callback/assets/{collection-runtime-wT1n4GS2.js → collection-runtime-DlAuU5TW.js} +1 -1
  208. package/static/auth-callback/assets/{dialog-DickLu5z.js → dialog-CnGzg5Ff.js} +1 -1
  209. package/static/auth-callback/assets/{download-kn8WnRu3.js → download-DwMONJvm.js} +1 -1
  210. package/static/auth-callback/assets/{external-link-B6B8jfSn.js → external-link-Bu5AGqCO.js} +1 -1
  211. package/static/auth-callback/assets/{index-DHF97YLP.js → index-B0T-1YO8.js} +1 -1
  212. package/static/auth-callback/assets/{index-Dz83EEHD.js → index-C8QZf_4W.js} +1 -1
  213. package/static/auth-callback/assets/index-DwIlrIDG.js +4 -0
  214. package/static/auth-callback/assets/{index-browser-CSghinyi.js → index-browser-lRsMcP_7.js} +1 -1
  215. package/static/auth-callback/assets/{key-round-ChkOx3E1.js → key-round-BDMtU57P.js} +1 -1
  216. package/static/auth-callback/assets/{rotate-ccw-B3hE-nyd.js → rotate-ccw-CoKIGCsQ.js} +1 -1
  217. package/static/auth-callback/assets/{skeleton-kEqR7tpI.js → skeleton-CPoSWHDr.js} +1 -1
  218. package/static/auth-callback/assets/{waypoints-D6Jo-SZa.js → waypoints-BeYHxqHv.js} +1 -1
  219. package/static/auth-callback/assets/{workspace-layout-BHwT_cHd.js → workspace-layout-xA5YxiK3.js} +1 -1
  220. package/static/auth-callback/auth-callback.html +2 -2
  221. package/static/dashboard/assets/{AiConfigContext-BfC3v-x2.js → AiConfigContext-rWx4TyiH.js} +1 -1
  222. package/static/dashboard/assets/{AiConfigPage-QNS3u7Ff.js → AiConfigPage-StVJpDFT.js} +1 -1
  223. package/static/dashboard/assets/{DocumentProcessingPanel-Dr4XLeT4.js → DocumentProcessingPanel-DJ5yul2O.js} +1 -1
  224. package/static/dashboard/assets/{IndexLifecyclePanel-KtM_gpeO.js → IndexLifecyclePanel-CpjtgezK.js} +1 -1
  225. package/static/dashboard/assets/{IndexSubjectPanel-DLaiKdLc.js → IndexSubjectPanel-BVKcot1_.js} +1 -1
  226. package/static/dashboard/assets/{ModelAssignmentsPanel-Bk7TvQRq.js → ModelAssignmentsPanel-BxVgWZPc.js} +1 -1
  227. package/static/dashboard/assets/{ModelsPage-Cci3vlos.js → ModelsPage-CECBwmeO.js} +3 -3
  228. package/static/dashboard/assets/NetworkPage-zQgFscEW.js +2 -0
  229. package/static/dashboard/assets/{PaneListHeader-qHME_s08.js → PaneListHeader-DIPe8pS6.js} +1 -1
  230. package/static/dashboard/assets/{SearchIndexingPanel-HZPKj8H9.js → SearchIndexingPanel-lalFJ3c8.js} +1 -1
  231. package/static/dashboard/assets/{StatusSubjectPanel-ij7IpI8d.js → StatusSubjectPanel-CpY_KU-G.js} +1 -1
  232. package/static/dashboard/assets/{StatusWorkspace-Cp02JcaN.js → StatusWorkspace-BwWCii3A.js} +1 -1
  233. package/static/dashboard/assets/{SystemSettingsPage-BSeuvb8X.js → SystemSettingsPage-BKZxX-_n.js} +1 -1
  234. package/static/dashboard/assets/{SystemSettingsSubjectPanel-CP4_luGS.js → SystemSettingsSubjectPanel-BZrqb2C5.js} +1 -1
  235. package/static/dashboard/assets/{XpodAiConnectionsPodStore-urO6zaHL.js → XpodAiConnectionsPodStore-Bbpx9dTN.js} +1 -1
  236. package/static/dashboard/assets/{activity-DxjgQNvr.js → activity-BJ15TLVP.js} +1 -1
  237. package/static/dashboard/assets/ai-connections-GG6qkTJt.js +1 -0
  238. package/static/dashboard/assets/{badge-53qCrRbl.js → badge-BBX5FlaB.js} +1 -1
  239. package/static/dashboard/assets/{collection-runtime-BPAmHG46.js → collection-runtime-UBbHBzdf.js} +1 -1
  240. package/static/dashboard/assets/{dashboard-BcT2ByXw.js → dashboard-7Y6BHyV9.js} +62 -62
  241. package/static/dashboard/assets/dashboard-rk080mvG.css +1 -0
  242. package/static/dashboard/assets/{dialog-B28YtNhS.js → dialog-QrOJ-hB0.js} +1 -1
  243. package/static/dashboard/assets/{download-DkLNceJ4.js → download-DK9x-VOP.js} +1 -1
  244. package/static/dashboard/assets/{external-link-D3TXnlo3.js → external-link-Cnkn87mJ.js} +1 -1
  245. package/static/dashboard/assets/index-B1z84it5.js +4 -0
  246. package/static/dashboard/assets/{index-CIiBu9mr.js → index-DzjauX3N.js} +1 -1
  247. package/static/dashboard/assets/{index-CFIenkeK.js → index-cIa8_efI.js} +1 -1
  248. package/static/dashboard/assets/{key-round-B5ccp6nx.js → key-round-BoS6UqKz.js} +1 -1
  249. package/static/dashboard/assets/{rotate-ccw-DUpfkNnk.js → rotate-ccw-BeWV76i0.js} +1 -1
  250. package/static/dashboard/assets/{skeleton-BRe19fO0.js → skeleton-CypcJL07.js} +1 -1
  251. package/static/dashboard/assets/{waypoints-BKDMxEvu.js → waypoints-zHOOqfhi.js} +1 -1
  252. package/static/dashboard/assets/{workspace-layout-ZTF7C16h.js → workspace-layout-DZ9JuxnM.js} +1 -1
  253. package/static/dashboard/dashboard.html +2 -2
  254. package/static/settings/assets/{AiConfigContext-DsyWgu2i.js → AiConfigContext-D3b1l_Kw.js} +1 -1
  255. package/static/settings/assets/{AiConfigPage-CSCBckKo.js → AiConfigPage-DYKw-atP.js} +1 -1
  256. package/static/settings/assets/{DocumentProcessingPanel-w9yQDbBe.js → DocumentProcessingPanel-DguRfsIV.js} +1 -1
  257. package/static/settings/assets/{IndexLifecyclePanel-CUUXI8mP.js → IndexLifecyclePanel-B85qJJA4.js} +1 -1
  258. package/static/settings/assets/{IndexSubjectPanel-BypAU5TJ.js → IndexSubjectPanel-CsN7IxaV.js} +1 -1
  259. package/static/settings/assets/{ModelAssignmentsPanel-BetgXw1G.js → ModelAssignmentsPanel-DEp9byI6.js} +1 -1
  260. package/static/settings/assets/{ModelsPage-DZpTlTZ3.js → ModelsPage-CzTnPs_G.js} +3 -3
  261. package/static/settings/assets/NetworkPage-BDVnmUU0.js +2 -0
  262. package/static/settings/assets/{PaneListHeader-BGOqGec4.js → PaneListHeader-Cpe39N76.js} +1 -1
  263. package/static/settings/assets/{SearchIndexingPanel-DYAbpZ_9.js → SearchIndexingPanel-DA9w8lLL.js} +1 -1
  264. package/static/settings/assets/{StatusSubjectPanel-CFgzeQ8Q.js → StatusSubjectPanel-BU0Aq0CS.js} +1 -1
  265. package/static/settings/assets/{StatusWorkspace-4Z6g4Jvv.js → StatusWorkspace-D1AC1i5N.js} +1 -1
  266. package/static/settings/assets/{SystemSettingsPage-C1tlrgvI.js → SystemSettingsPage-ChKvOioO.js} +1 -1
  267. package/static/settings/assets/{SystemSettingsSubjectPanel-CcURI-1L.js → SystemSettingsSubjectPanel-DyTpOnD2.js} +1 -1
  268. package/static/settings/assets/{XpodAiConnectionsPodStore-owBQc5nY.js → XpodAiConnectionsPodStore-VU5Bsz1a.js} +1 -1
  269. package/static/settings/assets/{activity-CtBc9cNy.js → activity-DGpLfsQB.js} +1 -1
  270. package/static/settings/assets/ai-connections-DexTPyfC.js +1 -0
  271. package/static/settings/assets/{badge--r-FDIhU.js → badge-_hCrrWRP.js} +1 -1
  272. package/static/settings/assets/{collection-runtime-CnhPmwAM.js → collection-runtime-E40TZ8Cl.js} +1 -1
  273. package/static/settings/assets/{dialog-B7ZRsjN7.js → dialog-DTr2JkHn.js} +1 -1
  274. package/static/settings/assets/{download-DgQ1F8QR.js → download-B_D21DDX.js} +1 -1
  275. package/static/settings/assets/{external-link-Bz7NckNO.js → external-link-BATYaM13.js} +1 -1
  276. package/static/settings/assets/index-BAlAVi-J.js +4 -0
  277. package/static/settings/assets/{index-CkGda_Pg.js → index-Ckh4h9jj.js} +1 -1
  278. package/static/settings/assets/{index-Vv-8Vslg.js → index-DOiwLF4B.js} +1 -1
  279. package/static/settings/assets/{index-browser-Dq7omlpY.js → index-browser-DFFWN3Kr.js} +1 -1
  280. package/static/settings/assets/{key-round-CvuhloKV.js → key-round-ZTVU_1O1.js} +1 -1
  281. package/static/settings/assets/{rotate-ccw-DgFKDaz7.js → rotate-ccw-DDdw8PTU.js} +1 -1
  282. package/static/settings/assets/{settings-BvqY7K96.js → settings-CyLnISOv.js} +62 -62
  283. package/static/settings/assets/settings-rk080mvG.css +1 -0
  284. package/static/settings/assets/{skeleton-D3OeFDF6.js → skeleton-DEzA3hc2.js} +1 -1
  285. package/static/settings/assets/{waypoints-C4WbspTb.js → waypoints-BSdfNvEb.js} +1 -1
  286. package/static/settings/assets/{workspace-layout-B9H1Tqrk.js → workspace-layout-BOQnl_3d.js} +1 -1
  287. package/static/settings/settings.html +2 -2
  288. package/dist/api/ai-gateway/pod/HostedPodDataAccess.d.ts +0 -31
  289. package/dist/api/ai-gateway/pod/HostedPodDataAccess.js +0 -330
  290. package/dist/http/InternalPodDataHttpHandler.d.ts +0 -57
  291. package/dist/http/InternalPodDataHttpHandler.js +0 -551
  292. package/dist/http/InternalPodDataHttpHandler.jsonld +0 -243
  293. package/node_modules/@undefineds.co/ai-connections-core/package.json +0 -61
  294. package/static/auth-callback/assets/NetworkPage-cEvxRMAl.js +0 -2
  295. package/static/auth-callback/assets/ai-connections-C6yaE6WQ.js +0 -1
  296. package/static/auth-callback/assets/auth-callback-Cx9D_1qj.css +0 -1
  297. package/static/auth-callback/assets/index-Cu0EguPo.js +0 -4
  298. package/static/dashboard/assets/NetworkPage-Ot4G2dX5.js +0 -2
  299. package/static/dashboard/assets/ai-connections-CXp5gd1J.js +0 -1
  300. package/static/dashboard/assets/dashboard-Cx9D_1qj.css +0 -1
  301. package/static/dashboard/assets/index-Gp3cLolR.js +0 -4
  302. package/static/settings/assets/NetworkPage-BVkasFGM.js +0 -2
  303. package/static/settings/assets/ai-connections-C6yaE6WQ.js +0 -1
  304. package/static/settings/assets/index-BdXwm8nh.js +0 -4
  305. package/static/settings/assets/settings-Cx9D_1qj.css +0 -1
  306. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client/normalize.d.ts +0 -0
  307. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client/normalize.js +0 -0
  308. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client/request.d.ts +0 -0
  309. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client/request.js +0 -0
  310. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client/types.d.ts +0 -0
  311. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client/types.js +0 -0
  312. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/base-adapter.d.ts +0 -0
  313. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/base-adapter.js +0 -0
  314. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/codex.d.ts +0 -0
  315. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/codex.js +0 -0
  316. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/index.d.ts +0 -0
  317. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/index.js +0 -0
  318. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/json-env-adapter.d.ts +0 -0
  319. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/json-env-adapter.js +0 -0
  320. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/pi.d.ts +0 -0
  321. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/pi.js +0 -0
  322. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/transaction.d.ts +0 -0
  323. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/transaction.js +0 -0
  324. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/types.d.ts +0 -0
  325. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/client-config/types.js +0 -0
  326. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/credential-storage.d.ts +0 -0
  327. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/credential-storage.js +0 -0
  328. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/endpoint-urls.d.ts +0 -0
  329. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/endpoint-urls.js +0 -0
  330. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/provider-catalog.d.ts +0 -0
  331. /package/node_modules/@undefineds.co/{ai-connections-core/dist → ai-connections/dist/contract}/provider-catalog.js +0 -0
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.isPublicIpAddress = isPublicIpAddress;
7
+ exports.resolveHostAddresses = resolveHostAddresses;
8
+ exports.assertPublicProbeTarget = assertPublicProbeTarget;
9
+ exports.createPinnedHeadProbeRequest = createPinnedHeadProbeRequest;
10
+ const node_http_1 = __importDefault(require("node:http"));
11
+ const node_https_1 = __importDefault(require("node:https"));
12
+ const node_net_1 = require("node:net");
13
+ const node_dns_1 = __importDefault(require("node:dns"));
14
+ /**
15
+ * Address ranges a Cloud probe must never contact: the probe target comes from node
16
+ * metadata, so without this an edge node could make the cluster fetch its own private
17
+ * network, loopback services or the cloud metadata endpoint.
18
+ */
19
+ const BLOCKED_IPV4 = new node_net_1.BlockList();
20
+ for (const [network, prefix] of [
21
+ ['0.0.0.0', 8],
22
+ ['10.0.0.0', 8],
23
+ ['100.64.0.0', 10],
24
+ ['127.0.0.0', 8],
25
+ ['169.254.0.0', 16],
26
+ ['172.16.0.0', 12],
27
+ ['192.0.0.0', 24],
28
+ ['192.0.2.0', 24],
29
+ ['192.168.0.0', 16],
30
+ ['198.18.0.0', 15],
31
+ ['198.51.100.0', 24],
32
+ ['203.0.113.0', 24],
33
+ ['224.0.0.0', 4],
34
+ ['240.0.0.0', 4],
35
+ ]) {
36
+ BLOCKED_IPV4.addSubnet(network, prefix, 'ipv4');
37
+ }
38
+ // IPv4-mapped addresses are normalized to IPv4 before checking, so the two families stay
39
+ // in separate lists: a mixed list makes `check(ipv4Address, 'ipv4')` match IPv6 rules.
40
+ const BLOCKED_IPV6 = new node_net_1.BlockList();
41
+ for (const [network, prefix] of [
42
+ ['::', 128],
43
+ ['::1', 128],
44
+ ['64:ff9b::', 96],
45
+ ['fc00::', 7],
46
+ ['fe80::', 10],
47
+ ['ff00::', 8],
48
+ ['2001:db8::', 32],
49
+ ]) {
50
+ BLOCKED_IPV6.addSubnet(network, prefix, 'ipv6');
51
+ }
52
+ /** Whether an address is a public unicast address a Cloud probe may contact. */
53
+ function isPublicIpAddress(address) {
54
+ const normalized = normalizeMappedIpv4(address);
55
+ const family = (0, node_net_1.isIP)(normalized);
56
+ if (family === 4) {
57
+ return !BLOCKED_IPV4.check(normalized, 'ipv4');
58
+ }
59
+ if (family === 6) {
60
+ return !BLOCKED_IPV6.check(normalized, 'ipv6');
61
+ }
62
+ return false;
63
+ }
64
+ function normalizeMappedIpv4(address) {
65
+ const match = /^::ffff:(\d{1,3}(?:\.\d{1,3}){3})$/iu.exec(address);
66
+ return match ? match[1] : address;
67
+ }
68
+ /** Resolves every address of a probe hostname; injected in tests. */
69
+ async function resolveHostAddresses(hostname) {
70
+ const records = await node_dns_1.default.promises.lookup(hostname, { all: true });
71
+ return records.map((record) => record.address);
72
+ }
73
+ /**
74
+ * Decides whether a probe target may be contacted.
75
+ *
76
+ * Every resolved address has to be public, so a hostname that mixes public and private
77
+ * records is refused instead of racing whichever record the connection picks.
78
+ */
79
+ async function assertPublicProbeTarget(url, resolveAddresses = resolveHostAddresses) {
80
+ if (url.protocol !== 'http:' && url.protocol !== 'https:') {
81
+ return { allowed: false, reason: `unsupported-scheme:${url.protocol}` };
82
+ }
83
+ const hostname = url.hostname.replace(/^\[/u, '').replace(/\]$/u, '');
84
+ if ((0, node_net_1.isIP)(hostname) !== 0) {
85
+ return isPublicIpAddress(hostname)
86
+ ? { allowed: true, address: hostname }
87
+ : { allowed: false, reason: `non-public-address:${hostname}` };
88
+ }
89
+ let addresses;
90
+ try {
91
+ addresses = await resolveAddresses(hostname);
92
+ }
93
+ catch (error) {
94
+ return { allowed: false, reason: `unresolvable:${error.message}` };
95
+ }
96
+ if (addresses.length === 0) {
97
+ return { allowed: false, reason: 'unresolvable' };
98
+ }
99
+ const blocked = addresses.find((address) => !isPublicIpAddress(address));
100
+ if (blocked) {
101
+ return { allowed: false, reason: `non-public-address:${blocked}` };
102
+ }
103
+ return { allowed: true, address: addresses[0] };
104
+ }
105
+ /**
106
+ * HEAD request pinned to a validated address.
107
+ *
108
+ * Pinning is what makes the DNS check meaningful: without it the client would resolve the
109
+ * hostname a second time and a rebinding answer could still reach a private address.
110
+ */
111
+ function createPinnedHeadProbeRequest() {
112
+ return (url, { address, timeoutMs }) => new Promise((resolve, reject) => {
113
+ const transport = url.protocol === 'https:' ? node_https_1.default : node_http_1.default;
114
+ const request = transport.request({
115
+ protocol: url.protocol,
116
+ hostname: url.hostname,
117
+ port: url.port || (url.protocol === 'https:' ? 443 : 80),
118
+ path: `${url.pathname}${url.search}`,
119
+ method: 'HEAD',
120
+ timeout: timeoutMs,
121
+ lookup: (_hostname, options, callback) => {
122
+ const entry = { address, family: (0, node_net_1.isIP)(address) === 6 ? 6 : 4 };
123
+ // Node asks for every family when happy-eyeballs is enabled.
124
+ if (options && typeof options === 'object' && options.all) {
125
+ callback(null, [entry]);
126
+ return;
127
+ }
128
+ callback(null, entry.address, entry.family);
129
+ },
130
+ }, (response) => {
131
+ response.resume();
132
+ resolve({
133
+ status: response.statusCode ?? 0,
134
+ location: typeof response.headers.location === 'string' ? response.headers.location : undefined,
135
+ });
136
+ });
137
+ request.on('timeout', () => request.destroy(new Error('probe-timeout')));
138
+ request.on('error', reject);
139
+ request.end();
140
+ });
141
+ }
142
+ //# sourceMappingURL=ProbeTargetGuard.js.map
@@ -0,0 +1,16 @@
1
+ import type { PodLookupRepository } from '../../identity/drizzle/PodLookupRepository';
2
+ /**
3
+ * Whether a Solid principal may act on an edge node.
4
+ *
5
+ * Reachability sessions expose a node's private candidates, so "is authenticated" is not
6
+ * enough: the caller has to be related to that node (Pod ownership, or an explicit grant
7
+ * once one exists).
8
+ */
9
+ export type NodeAccessResolver = (nodeId: string, webId: string) => Promise<boolean>;
10
+ /**
11
+ * Authorizes a WebID for a node when one of the node's Pods is owned by that WebID.
12
+ *
13
+ * A missing repository resolves to "no access" rather than "no restriction": the caller
14
+ * decides what to do with an unprovable relationship, and the reachability handler denies.
15
+ */
16
+ export declare function createPodOwnershipNodeAccessResolver(podLookupRepository: Pick<PodLookupRepository, 'listAllPods'> | undefined): NodeAccessResolver;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPodOwnershipNodeAccessResolver = createPodOwnershipNodeAccessResolver;
4
+ const global_logger_factory_1 = require("global-logger-factory");
5
+ /**
6
+ * Authorizes a WebID for a node when one of the node's Pods is owned by that WebID.
7
+ *
8
+ * A missing repository resolves to "no access" rather than "no restriction": the caller
9
+ * decides what to do with an unprovable relationship, and the reachability handler denies.
10
+ */
11
+ function createPodOwnershipNodeAccessResolver(podLookupRepository) {
12
+ const logger = (0, global_logger_factory_1.getLoggerFor)('NodeAccessResolver');
13
+ return async (nodeId, webId) => {
14
+ if (!podLookupRepository) {
15
+ return false;
16
+ }
17
+ try {
18
+ const pods = await podLookupRepository.listAllPods();
19
+ return pods.some((pod) => {
20
+ const hosted = pod.nodeId === nodeId || pod.edgeNodeId === nodeId;
21
+ return hosted && (pod.webId === webId || (pod.webIds ?? []).includes(webId));
22
+ });
23
+ }
24
+ catch (error) {
25
+ logger.warn(`Failed to resolve node access for ${nodeId}/${webId}: ${error.message}`);
26
+ return false;
27
+ }
28
+ };
29
+ }
30
+ //# sourceMappingURL=NodeAccessResolver.js.map
@@ -38,7 +38,10 @@ class ReachabilitySessionService {
38
38
  throw new P2PCandidateSessionLimitExceededError('P2P candidate session limit exceeded');
39
39
  }
40
40
  const routeSet = (0, RouteSetBuilder_1.buildRouteSet)(source, {
41
- audience: 'managed',
41
+ // The node publishes its own access points, loopback included: a client on this host
42
+ // reaches the node there, and a client elsewhere ranks the path out by probing it
43
+ // (`docs/multi-channel-access.md`).
44
+ audience: 'local',
42
45
  baseStorageDomain: this.options.baseStorageDomain,
43
46
  now: createdAt,
44
47
  });
@@ -1,2 +1,19 @@
1
- import type { BuildRouteSetOptions, BuildRouteSetSource, RouteSet } from './types';
1
+ import type { AccessRoute, BuildRouteSetOptions, BuildRouteSetSource, RouteSet } from './types';
2
2
  export declare function buildRouteSet(source: BuildRouteSetSource, options?: BuildRouteSetOptions): RouteSet;
3
+ export interface BuildPublicAccessRoutesOptions {
4
+ /** The node's canonical public URL, when it has one. */
5
+ canonicalUrl?: string;
6
+ /** A provider confirmed the canonical URL is proxy-ready right now. */
7
+ publicRouteAvailable?: boolean;
8
+ /** Endpoint of the user's own tunnel, when one is connected. */
9
+ tunnelEndpoint?: string;
10
+ }
11
+ /**
12
+ * Access points a node can prove from its own configuration: the canonical public
13
+ * URL and the user's tunnel endpoint.
14
+ *
15
+ * Loopback and LAN are deliberately absent: whether either works depends on where
16
+ * the client stands, so the client derives them from its own position instead of
17
+ * being told about paths it may not have (`docs/multi-channel-access.md`).
18
+ */
19
+ export declare function buildPublicAccessRoutes(options: BuildPublicAccessRoutesOptions): AccessRoute[];
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildRouteSet = buildRouteSet;
4
+ exports.buildPublicAccessRoutes = buildPublicAccessRoutes;
4
5
  const DEFAULT_PRIORITY = {
5
6
  loopback: 10,
6
7
  lan: 20,
@@ -34,6 +35,44 @@ function buildRouteSet(source, options = {}) {
34
35
  routes,
35
36
  };
36
37
  }
38
+ /**
39
+ * Access points a node can prove from its own configuration: the canonical public
40
+ * URL and the user's tunnel endpoint.
41
+ *
42
+ * Loopback and LAN are deliberately absent: whether either works depends on where
43
+ * the client stands, so the client derives them from its own position instead of
44
+ * being told about paths it may not have (`docs/multi-channel-access.md`).
45
+ */
46
+ function buildPublicAccessRoutes(options) {
47
+ const canonicalUrl = normalizeUrlString(options.canonicalUrl);
48
+ const tunnelEndpoint = normalizeUrlString(options.tunnelEndpoint);
49
+ const routes = [];
50
+ if (canonicalUrl) {
51
+ routes.push({
52
+ id: 'public-direct',
53
+ kind: 'public-direct',
54
+ canonicalUrl,
55
+ targetUrl: canonicalUrl,
56
+ priority: DEFAULT_PRIORITY['public-direct'],
57
+ requiresManagedClient: false,
58
+ visibility: 'public',
59
+ health: options.publicRouteAvailable ? 'healthy' : 'unknown',
60
+ });
61
+ }
62
+ if (tunnelEndpoint && tunnelEndpoint !== canonicalUrl) {
63
+ routes.push({
64
+ id: 'user-tunnel',
65
+ kind: 'user-tunnel',
66
+ canonicalUrl: canonicalUrl ?? tunnelEndpoint,
67
+ targetUrl: tunnelEndpoint,
68
+ priority: DEFAULT_PRIORITY['user-tunnel'],
69
+ requiresManagedClient: false,
70
+ visibility: 'public',
71
+ health: 'healthy',
72
+ });
73
+ }
74
+ return routes;
75
+ }
37
76
  function routesFromMetadata(source, canonicalUrl, metadata) {
38
77
  const rawRoutes = Array.isArray(metadata.routes) ? metadata.routes : [];
39
78
  return rawRoutes
@@ -165,6 +204,14 @@ function defaultVisibility(kind) {
165
204
  return PUBLIC_KINDS.has(kind) ? 'public' : 'authorized-client';
166
205
  }
167
206
  function isVisibleToAudience(route, audience) {
207
+ if (audience === 'local') {
208
+ return true;
209
+ }
210
+ // `local-only` means loopback: usable on the node's own host and nowhere else,
211
+ // so it is never offered to a client on another machine.
212
+ if (route.visibility === 'local-only') {
213
+ return false;
214
+ }
168
215
  if (audience === 'managed') {
169
216
  return true;
170
217
  }
@@ -0,0 +1,29 @@
1
+ {
2
+ "@context": [
3
+ "https://linkedsoftwaredependencies.org/bundles/npm/@undefineds.co/xpod/^0.0.0/components/context.jsonld"
4
+ ],
5
+ "@id": "npmd:@undefineds.co/xpod",
6
+ "components": [
7
+ {
8
+ "@id": "undefineds:dist/edge/reachability/RouteSetBuilder.jsonld#BuildPublicAccessRoutesOptions",
9
+ "@type": "AbstractClass",
10
+ "requireElement": "BuildPublicAccessRoutesOptions",
11
+ "parameters": [],
12
+ "memberFields": [
13
+ {
14
+ "@id": "undefineds:dist/edge/reachability/RouteSetBuilder.jsonld#BuildPublicAccessRoutesOptions__member_canonicalUrl",
15
+ "memberFieldName": "canonicalUrl"
16
+ },
17
+ {
18
+ "@id": "undefineds:dist/edge/reachability/RouteSetBuilder.jsonld#BuildPublicAccessRoutesOptions__member_publicRouteAvailable",
19
+ "memberFieldName": "publicRouteAvailable"
20
+ },
21
+ {
22
+ "@id": "undefineds:dist/edge/reachability/RouteSetBuilder.jsonld#BuildPublicAccessRoutesOptions__member_tunnelEndpoint",
23
+ "memberFieldName": "tunnelEndpoint"
24
+ }
25
+ ],
26
+ "constructorArguments": []
27
+ }
28
+ ]
29
+ }
@@ -3,7 +3,8 @@ export type AccessRouteVisibility = 'local-only' | 'same-account' | 'authorized-
3
3
  export type AccessRouteHealth = 'unknown' | 'healthy' | 'degraded' | 'unreachable';
4
4
  export interface AccessRoute {
5
5
  id: string;
6
- nodeId: string;
6
+ /** Absent while the node has no identity yet, as on a standalone Local runtime. */
7
+ nodeId?: string;
7
8
  canonicalUrl: string;
8
9
  kind: AccessRouteKind;
9
10
  targetUrl: string;
@@ -21,7 +22,12 @@ export interface RouteSet {
21
22
  generatedAt: string;
22
23
  routes: AccessRoute[];
23
24
  }
24
- export type RouteAudience = 'public' | 'managed';
25
+ /**
26
+ * Who is asking for routes. `local` is the node's own host, which is the only
27
+ * place a loopback access point means anything; `managed` is an authorized
28
+ * client elsewhere, and `public` is unauthenticated discovery.
29
+ */
30
+ export type RouteAudience = 'public' | 'managed' | 'local';
25
31
  export interface BuildRouteSetSource {
26
32
  nodeId: string;
27
33
  canonicalUrl?: string;
@@ -1,5 +1,5 @@
1
1
  import { HttpHandler } from '@solid/community-server';
2
- import type { HttpHandlerInput, HttpRequest, HttpResponse } from '@solid/community-server';
2
+ import type { HttpHandlerInput } from '@solid/community-server';
3
3
  import type { ActivityEmitter, CredentialsExtractor, PermissionReader, Authorizer } from '@solid/community-server';
4
4
  import { SubgraphQueryEngine } from '../storage/sparql/SubgraphQueryEngine';
5
5
  import { MixDataAccessor } from '../storage/accessors/MixDataAccessor';
@@ -14,22 +14,6 @@ interface SubgraphSparqlHttpHandlerOptions {
14
14
  usageDbUrl?: string;
15
15
  defaultAccountBandwidthLimitBps?: number | null;
16
16
  }
17
- export interface TrustedSubgraphSparqlHandler {
18
- handleTrustedInternalSelect(input: {
19
- ownerWebId: string;
20
- endpointUrl: string;
21
- query: string;
22
- request: HttpRequest;
23
- response: HttpResponse;
24
- }): Promise<void>;
25
- handleTrustedInternalUpdate(input: {
26
- ownerWebId: string;
27
- endpointUrl: string;
28
- query: string;
29
- request: HttpRequest;
30
- response: HttpResponse;
31
- }): Promise<void>;
32
- }
33
17
  export declare class SubgraphSparqlHttpHandler extends HttpHandler {
34
18
  protected readonly logger: import("global-logger-factory").Logger<unknown>;
35
19
  private readonly engine;
@@ -47,14 +31,6 @@ export declare class SubgraphSparqlHttpHandler extends HttpHandler {
47
31
  constructor(queryEngine: SubgraphQueryEngine, credentialsExtractor: CredentialsExtractor, permissionReader: PermissionReader, authorizer: Authorizer, options?: SubgraphSparqlHttpHandlerOptions, updateAuthority?: MixDataAccessor, emitter?: ActivityEmitter);
48
32
  canHandle({ request }: HttpHandlerInput): Promise<void>;
49
33
  handle({ request, response }: HttpHandlerInput): Promise<void>;
50
- /**
51
- * Execute the model collection SELECT after InternalPodDataHttpHandler has
52
- * verified the signed owner intent. This is deliberately not reachable from
53
- * the normal HTTP routing path and performs its own exact owner/endpoint
54
- * validation before bypassing caller credentials.
55
- */
56
- handleTrustedInternalSelect(input: Parameters<TrustedSubgraphSparqlHandler['handleTrustedInternalSelect']>[0]): Promise<void>;
57
- handleTrustedInternalUpdate(input: Parameters<TrustedSubgraphSparqlHandler['handleTrustedInternalUpdate']>[0]): Promise<void>;
58
34
  private sendErrorResponse;
59
35
  private acceptsJson;
60
36
  private executeSelect;
@@ -14,7 +14,6 @@ const db_1 = require("../identity/drizzle/db");
14
14
  const PodLookupRepository_1 = require("../identity/drizzle/PodLookupRepository");
15
15
  const UsageRepository_1 = require("../storage/quota/UsageRepository");
16
16
  const BandwidthThrottleTransform_1 = require("../util/stream/BandwidthThrottleTransform");
17
- const AiConnectionsServiceAccess_1 = require("../api/ai-gateway/service-access/AiConnectionsServiceAccess");
18
17
  const ALLOWED_METHODS = ['GET', 'POST', 'OPTIONS'];
19
18
  const MODEL_COLLECTION_SUFFIX = '/settings/providers/-/sparql';
20
19
  const SETTINGS_COLLECTION_SUFFIX = '/settings/-/sparql';
@@ -141,64 +140,6 @@ class SubgraphSparqlHttpHandler extends community_server_1.HttpHandler {
141
140
  throw error;
142
141
  }
143
142
  }
144
- /**
145
- * Execute the model collection SELECT after InternalPodDataHttpHandler has
146
- * verified the signed owner intent. This is deliberately not reachable from
147
- * the normal HTTP routing path and performs its own exact owner/endpoint
148
- * validation before bypassing caller credentials.
149
- */
150
- async handleTrustedInternalSelect(input) {
151
- const target = trustedSelectTarget(input.ownerWebId, input.endpointUrl);
152
- if (!target) {
153
- throw new community_server_2.BadRequestHttpError('Trusted SPARQL endpoint is outside the owner Pod.');
154
- }
155
- const query = input.query.trim();
156
- if (!query || (target.query && query !== target.query)) {
157
- throw new community_server_2.BadRequestHttpError('A trusted SPARQL query is required.');
158
- }
159
- const parsed = new sparqljs_1.Parser({ baseIRI: target.baseUrl }).parse(query);
160
- if (parsed.type !== 'query' || parsed.queryType !== 'SELECT') {
161
- throw new community_server_2.BadRequestHttpError('Trusted SPARQL access only supports SELECT queries.');
162
- }
163
- const context = await this.resolveUsageContext(target.basePath);
164
- await this.recordBandwidth(context, Buffer.byteLength(query, 'utf8'), 0);
165
- await this.executeSelect(input.request, {
166
- basePath: target.basePath,
167
- baseUrl: target.baseUrl,
168
- ...(target.sourceUri === undefined ? {} : { sourceUri: target.sourceUri }),
169
- defaultDataset: target.defaultDataset,
170
- query,
171
- origin: target.origin,
172
- method: 'GET',
173
- ingressBytes: Buffer.byteLength(query, 'utf8'),
174
- }, input.response, context, true);
175
- }
176
- async handleTrustedInternalUpdate(input) {
177
- const target = trustedSettingsCollectionTarget(input.ownerWebId, input.endpointUrl, false);
178
- if (!target) {
179
- throw new community_server_2.BadRequestHttpError('Trusted settings update endpoint is outside the owner Pod.');
180
- }
181
- const query = input.query.trim();
182
- if (!query) {
183
- throw new community_server_2.BadRequestHttpError('A trusted settings update is required.');
184
- }
185
- const parsed = new sparqljs_1.Parser({ baseIRI: target.baseUrl }).parse(query);
186
- if (parsed.type !== 'update') {
187
- throw new community_server_2.BadRequestHttpError('Trusted settings access only supports UPDATE operations.');
188
- }
189
- const context = await this.resolveUsageContext(target.basePath);
190
- const ingressBytes = Buffer.byteLength(query, 'utf8');
191
- await this.recordBandwidth(context, ingressBytes, 0);
192
- await this.executeUpdate({
193
- basePath: target.basePath,
194
- baseUrl: target.baseUrl,
195
- defaultDataset: target.defaultDataset,
196
- query,
197
- origin: target.origin,
198
- method: 'POST',
199
- ingressBytes,
200
- }, parsed, input.request, input.response, context, true);
201
- }
202
143
  sendErrorResponse(request, response, statusCode, message, jsonPayload) {
203
144
  response.statusCode = statusCode;
204
145
  if (this.acceptsJson(request)) {
@@ -1127,47 +1068,6 @@ class SubgraphSparqlHttpHandler extends community_server_1.HttpHandler {
1127
1068
  }
1128
1069
  exports.SubgraphSparqlHttpHandler = SubgraphSparqlHttpHandler;
1129
1070
  SubgraphSparqlHttpHandler.XSD_STRING = 'http://www.w3.org/2001/XMLSchema#string';
1130
- function trustedSelectTarget(ownerWebId, endpointUrl) {
1131
- return trustedGatewayAccessKeyDocumentTarget(ownerWebId, endpointUrl) ??
1132
- trustedModelCollectionTarget(ownerWebId, endpointUrl) ??
1133
- trustedSettingsCollectionTarget(ownerWebId, endpointUrl, true);
1134
- }
1135
- function trustedGatewayAccessKeyDocumentTarget(ownerWebId, endpointUrl) {
1136
- let owner;
1137
- let endpoint;
1138
- try {
1139
- owner = new URL(ownerWebId);
1140
- endpoint = new URL(endpointUrl);
1141
- }
1142
- catch {
1143
- return undefined;
1144
- }
1145
- if ((owner.protocol !== 'http:' && owner.protocol !== 'https:') ||
1146
- owner.hash !== '#me' || !owner.pathname.endsWith('/profile/card') ||
1147
- endpoint.username || endpoint.password || endpoint.hash ||
1148
- !(0, AiConnectionsServiceAccess_1.isGatewayAccessKeySparqlEndpoint)(ownerWebId, endpoint)) {
1149
- return undefined;
1150
- }
1151
- const keys = Array.from(endpoint.searchParams.keys());
1152
- if (keys.length > 0 && (keys.length !== 1 || keys[0] !== 'query' || !endpoint.searchParams.get('query')?.trim())) {
1153
- return undefined;
1154
- }
1155
- const basePath = endpoint.pathname.slice(0, -'/-/sparql'.length);
1156
- return {
1157
- basePath,
1158
- baseUrl: `${endpoint.origin}${basePath}`,
1159
- sourceUri: `${endpoint.origin}${basePath}`,
1160
- defaultDataset: 'exactSource',
1161
- origin: endpoint.origin,
1162
- query: endpoint.searchParams.get('query')?.trim() ?? '',
1163
- };
1164
- }
1165
- function trustedModelCollectionTarget(ownerWebId, endpointUrl) {
1166
- return trustedCollectionTarget(ownerWebId, endpointUrl, MODEL_COLLECTION_SUFFIX, true);
1167
- }
1168
- function trustedSettingsCollectionTarget(ownerWebId, endpointUrl, allowQuery) {
1169
- return trustedCollectionTarget(ownerWebId, endpointUrl, SETTINGS_COLLECTION_SUFFIX, allowQuery);
1170
- }
1171
1071
  function trustedCollectionTarget(ownerWebId, endpointUrl, suffix, allowQuery) {
1172
1072
  let owner;
1173
1073
  let endpoint;
@@ -200,14 +200,6 @@
200
200
  "@id": "undefineds:dist/http/SubgraphSparqlHttpHandler.jsonld#SubgraphSparqlHttpHandler__member_handle",
201
201
  "memberFieldName": "handle"
202
202
  },
203
- {
204
- "@id": "undefineds:dist/http/SubgraphSparqlHttpHandler.jsonld#SubgraphSparqlHttpHandler__member_handleTrustedInternalSelect",
205
- "memberFieldName": "handleTrustedInternalSelect"
206
- },
207
- {
208
- "@id": "undefineds:dist/http/SubgraphSparqlHttpHandler.jsonld#SubgraphSparqlHttpHandler__member_handleTrustedInternalUpdate",
209
- "memberFieldName": "handleTrustedInternalUpdate"
210
- },
211
203
  {
212
204
  "@id": "undefineds:dist/http/SubgraphSparqlHttpHandler.jsonld#SubgraphSparqlHttpHandler__member_sendErrorResponse",
213
205
  "memberFieldName": "sendErrorResponse"
@@ -0,0 +1,33 @@
1
+ import type { IdentityDatabase } from './db';
2
+ /**
3
+ * The interface access key a Pod grants its owner's server-side components.
4
+ *
5
+ * It is an ordinary Pod credential - the same kind a browser holds - so the server reaches the
6
+ * Pod through the standard interface as that user. The ciphertext lives here rather than in the
7
+ * Pod, because this key is what opens the Pod.
8
+ */
9
+ export interface PodInterfaceKeyRecord {
10
+ ownerWebId: string;
11
+ clientId: string;
12
+ /** Vault-sealed JSON `{ clientSecret }`. */
13
+ sealedSecret: string;
14
+ createdAt: Date;
15
+ updatedAt: Date;
16
+ }
17
+ export interface PodInterfaceKeyRepositoryPort {
18
+ read(ownerWebId: string): Promise<PodInterfaceKeyRecord | undefined>;
19
+ write(record: Omit<PodInterfaceKeyRecord, 'createdAt' | 'updatedAt'>): Promise<void>;
20
+ remove(ownerWebId: string): Promise<void>;
21
+ }
22
+ export declare class PodInterfaceKeyRepository implements PodInterfaceKeyRepositoryPort {
23
+ private readonly db;
24
+ private readonly logger;
25
+ private readonly schema;
26
+ private readonly ready;
27
+ private initError?;
28
+ constructor(db: IdentityDatabase);
29
+ read(ownerWebId: string): Promise<PodInterfaceKeyRecord | undefined>;
30
+ write(record: Omit<PodInterfaceKeyRecord, 'createdAt' | 'updatedAt'>): Promise<void>;
31
+ remove(ownerWebId: string): Promise<void>;
32
+ private ensureReady;
33
+ }
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PodInterfaceKeyRepository = void 0;
4
+ const drizzle_orm_1 = require("drizzle-orm");
5
+ const global_logger_factory_1 = require("global-logger-factory");
6
+ const db_1 = require("./db");
7
+ class PodInterfaceKeyRepository {
8
+ constructor(db) {
9
+ this.db = db;
10
+ this.logger = (0, global_logger_factory_1.getLoggerFor)(this);
11
+ this.schema = (0, db_1.getSchema)(db);
12
+ // Bootstrap is lazy, and its failure belongs to the first caller that needs the table.
13
+ // Leaving the rejection unobserved would surface as an unhandled rejection from a
14
+ // constructor nobody awaits, which is both louder and less useful than a read error.
15
+ this.ready = (0, db_1.ensurePodInterfaceKeyTable)(db).catch((error) => {
16
+ this.initError = error;
17
+ });
18
+ }
19
+ async read(ownerWebId) {
20
+ await this.ensureReady();
21
+ const rows = await this.db
22
+ .select()
23
+ .from(this.schema.podInterfaceKeys)
24
+ .where((0, drizzle_orm_1.eq)(this.schema.podInterfaceKeys.ownerWebId, ownerWebId))
25
+ .limit(1);
26
+ const row = rows[0];
27
+ if (!row) {
28
+ return undefined;
29
+ }
30
+ return {
31
+ ownerWebId: String(row.ownerWebId),
32
+ clientId: String(row.clientId),
33
+ sealedSecret: String(row.sealedSecret),
34
+ createdAt: (0, db_1.fromDbTimestamp)(row.createdAt) ?? new Date(),
35
+ updatedAt: (0, db_1.fromDbTimestamp)(row.updatedAt) ?? new Date(),
36
+ };
37
+ }
38
+ async write(record) {
39
+ await this.ensureReady();
40
+ const existing = await this.read(record.ownerWebId);
41
+ if (existing) {
42
+ await this.db
43
+ .update(this.schema.podInterfaceKeys)
44
+ .set({
45
+ clientId: record.clientId,
46
+ sealedSecret: record.sealedSecret,
47
+ updatedAt: (0, db_1.toDbTimestamp)(this.db, new Date()),
48
+ })
49
+ .where((0, drizzle_orm_1.eq)(this.schema.podInterfaceKeys.ownerWebId, record.ownerWebId));
50
+ this.logger.info(`Rotated the Pod interface key for ${record.ownerWebId}`);
51
+ return;
52
+ }
53
+ await this.db.insert(this.schema.podInterfaceKeys).values({
54
+ ownerWebId: record.ownerWebId,
55
+ clientId: record.clientId,
56
+ sealedSecret: record.sealedSecret,
57
+ createdAt: (0, db_1.toDbTimestamp)(this.db, new Date()),
58
+ updatedAt: (0, db_1.toDbTimestamp)(this.db, new Date()),
59
+ });
60
+ this.logger.info(`Stored a Pod interface key for ${record.ownerWebId}`);
61
+ }
62
+ async remove(ownerWebId) {
63
+ await this.ensureReady();
64
+ await this.db
65
+ .delete(this.schema.podInterfaceKeys)
66
+ .where((0, drizzle_orm_1.eq)(this.schema.podInterfaceKeys.ownerWebId, ownerWebId));
67
+ }
68
+ async ensureReady() {
69
+ await this.ready;
70
+ if (this.initError) {
71
+ throw this.initError instanceof Error
72
+ ? this.initError
73
+ : new Error(`pod_interface_key_table_unavailable:${String(this.initError)}`);
74
+ }
75
+ }
76
+ }
77
+ exports.PodInterfaceKeyRepository = PodInterfaceKeyRepository;
78
+ //# sourceMappingURL=PodInterfaceKeyRepository.js.map
@@ -58,6 +58,13 @@ export declare function executeQuery<T = Record<string, unknown>>(db: IdentityDa
58
58
  */
59
59
  export declare function executeStatement(db: IdentityDatabase, query: SQL): Promise<void>;
60
60
  export declare function executePostgresLockedStatements(db: IdentityDatabase, lockKey: number, statements: string[]): Promise<void>;
61
+ /**
62
+ * Creates the per-owner interface-key table.
63
+ *
64
+ * The table holds the owner's Pod credential, which the runtime needs *before* it can read
65
+ * anything inside that Pod, so it is created on first use rather than by a Pod-side migration.
66
+ */
67
+ export declare function ensurePodInterfaceKeyTable(db: IdentityDatabase): Promise<void>;
61
68
  export declare function ensureCloudClusterTables(db: IdentityDatabase): Promise<void>;
62
69
  /**
63
70
  * Convert a Date to a value suitable for the database.