@undefineds.co/xpod 0.4.14 → 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 (202) hide show
  1. package/config/cloud.json +0 -3
  2. package/config/local.json +0 -3
  3. package/config/xpod.base.json +0 -24
  4. package/dist/api/ai-config/AiConfigStore.d.ts +2 -2
  5. package/dist/api/ai-config/AiConfigStore.js +4 -1
  6. package/dist/api/ai-gateway/auth/CallerPodAccess.d.ts +2 -5
  7. package/dist/api/ai-gateway/auth/CallerPodAccess.js +3 -42
  8. package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.d.ts +2 -1
  9. package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.js +1 -1
  10. package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.d.ts +3 -8
  11. package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.js +9 -32
  12. package/dist/api/ai-gateway/connect/index.d.ts +3 -3
  13. package/dist/api/ai-gateway/connect/index.js +9 -38
  14. package/dist/api/ai-gateway/errors.js +2 -1
  15. package/dist/api/ai-gateway/models/PodModelSelectionRepository.d.ts +3 -3
  16. package/dist/api/ai-gateway/models/PodModelSelectionRepository.js +7 -11
  17. package/dist/api/ai-gateway/pod/HostedPodRoute.d.ts +27 -0
  18. package/dist/api/ai-gateway/pod/HostedPodRoute.js +47 -0
  19. package/dist/api/ai-gateway/pod/OwnerPodAccess.d.ts +79 -0
  20. package/dist/api/ai-gateway/pod/OwnerPodAccess.js +192 -0
  21. package/dist/api/ai-gateway/pod/PodInterfaceKeyStore.d.ts +52 -0
  22. package/dist/api/ai-gateway/pod/PodInterfaceKeyStore.js +61 -0
  23. package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.d.ts +3 -3
  24. package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.js +7 -32
  25. package/dist/api/auth/ClientCredentialsAuthenticator.js +5 -28
  26. package/dist/api/auth/TokenEndpointRoute.d.ts +18 -0
  27. package/dist/api/auth/TokenEndpointRoute.js +36 -0
  28. package/dist/api/chatkit/pod-store.d.ts +4 -4
  29. package/dist/api/chatkit/pod-store.js +24 -95
  30. package/dist/api/container/common.js +36 -23
  31. package/dist/api/container/local.js +62 -29
  32. package/dist/api/container/routes.js +39 -7
  33. package/dist/api/container/types.d.ts +2 -2
  34. package/dist/api/handlers/AiGatewayManagementHandler.d.ts +6 -0
  35. package/dist/api/handlers/AiGatewayManagementHandler.js +17 -4
  36. package/dist/api/handlers/NetworkSettingsHandler.d.ts +7 -0
  37. package/dist/api/handlers/NetworkSettingsHandler.js +7 -0
  38. package/dist/api/handlers/PodSettingsHandler.d.ts +3 -3
  39. package/dist/api/handlers/PodSettingsHandler.js +3 -3
  40. package/dist/api/handlers/ProvisionHandler.d.ts +29 -0
  41. package/dist/api/handlers/ProvisionHandler.js +46 -0
  42. package/dist/api/handlers/ReachabilityHandler.js +3 -1
  43. package/dist/api/runtime.d.ts +9 -0
  44. package/dist/api/runtime.js +16 -3
  45. package/dist/cli/commands/start.d.ts +9 -2
  46. package/dist/cli/commands/start.js +15 -17
  47. package/dist/components/components.jsonld +1 -1
  48. package/dist/components/context.jsonld +5 -42
  49. package/dist/edge/EdgeNodeAgent.d.ts +10 -0
  50. package/dist/edge/EdgeNodeAgent.js +55 -0
  51. package/dist/edge/EdgeNodeAgent.jsonld +8 -0
  52. package/dist/edge/reachability/ReachabilitySessionService.js +4 -1
  53. package/dist/edge/reachability/RouteSetBuilder.d.ts +18 -1
  54. package/dist/edge/reachability/RouteSetBuilder.js +47 -0
  55. package/dist/edge/reachability/RouteSetBuilder.jsonld +29 -0
  56. package/dist/edge/reachability/types.d.ts +8 -2
  57. package/dist/http/SubgraphSparqlHttpHandler.d.ts +1 -25
  58. package/dist/http/SubgraphSparqlHttpHandler.js +0 -100
  59. package/dist/http/SubgraphSparqlHttpHandler.jsonld +0 -8
  60. package/dist/identity/drizzle/PodInterfaceKeyRepository.d.ts +33 -0
  61. package/dist/identity/drizzle/PodInterfaceKeyRepository.js +78 -0
  62. package/dist/identity/drizzle/db.d.ts +7 -0
  63. package/dist/identity/drizzle/db.js +30 -0
  64. package/dist/identity/drizzle/schema.pg.d.ts +9 -0
  65. package/dist/identity/drizzle/schema.pg.js +16 -1
  66. package/dist/identity/drizzle/schema.sqlite.d.ts +106 -0
  67. package/dist/identity/drizzle/schema.sqlite.js +16 -1
  68. package/dist/index.d.ts +1 -2
  69. package/dist/index.js +3 -5
  70. package/dist/runtime/GatewayAdminProxyAuth.d.ts +1 -16
  71. package/dist/runtime/GatewayAdminProxyAuth.js +2 -71
  72. package/dist/runtime/Proxy.d.ts +10 -1
  73. package/dist/runtime/Proxy.js +95 -28
  74. package/dist/runtime/bootstrap.d.ts +10 -0
  75. package/dist/runtime/bootstrap.js +24 -0
  76. package/dist/runtime/host/node/NodeRuntimeHost.js +5 -3
  77. package/dist/runtime/index.d.ts +1 -1
  78. package/dist/runtime/index.js +2 -3
  79. package/dist/runtime/js-runtime.js +10 -3
  80. package/dist/runtime/lifecycle.js +5 -4
  81. package/dist/runtime/port-finder.d.ts +9 -13
  82. package/dist/runtime/port-finder.js +18 -37
  83. package/dist/tunnel/AutoTunnelProvider.d.ts +56 -0
  84. package/dist/tunnel/AutoTunnelProvider.js +181 -0
  85. package/dist/tunnel/index.d.ts +1 -0
  86. package/dist/tunnel/index.js +3 -1
  87. package/node_modules/@undefineds.co/ai-connections/dist/error-wording.js +7 -2
  88. package/node_modules/@undefineds.co/solid-sdk/dist/access-route.cjs +230 -0
  89. package/node_modules/@undefineds.co/solid-sdk/dist/access-route.d.ts +76 -0
  90. package/node_modules/@undefineds.co/solid-sdk/dist/access-route.js +115 -0
  91. package/node_modules/@undefineds.co/solid-sdk/dist/index.cjs +89 -0
  92. package/node_modules/@undefineds.co/solid-sdk/dist/index.d.ts +1 -0
  93. package/node_modules/@undefineds.co/solid-sdk/dist/index.js +1 -0
  94. package/node_modules/@undefineds.co/solid-sdk/package.json +6 -1
  95. package/package.json +2 -2
  96. package/static/app/assets/inrupt-smoke.js +23 -23
  97. package/static/auth-callback/assets/{AiConfigContext-DCXpjzpj.js → AiConfigContext-Bx0HCAW5.js} +1 -1
  98. package/static/auth-callback/assets/{AiConfigPage-fe-xMIXa.js → AiConfigPage-ChQImMbm.js} +1 -1
  99. package/static/auth-callback/assets/{DocumentProcessingPanel-BGnkfMuU.js → DocumentProcessingPanel-D830H4SH.js} +1 -1
  100. package/static/auth-callback/assets/{IndexLifecyclePanel-42Jups0j.js → IndexLifecyclePanel-CnlkjMF8.js} +1 -1
  101. package/static/auth-callback/assets/{IndexSubjectPanel-CYyLOlQU.js → IndexSubjectPanel-CdEfg_CO.js} +1 -1
  102. package/static/auth-callback/assets/{ModelAssignmentsPanel-BOvUH4yr.js → ModelAssignmentsPanel-D-8A8dZx.js} +1 -1
  103. package/static/auth-callback/assets/{ModelsPage-DwyITxt7.js → ModelsPage-Cim7cubp.js} +3 -3
  104. package/static/auth-callback/assets/{NetworkPage-CG9RelJA.js → NetworkPage-CfK3x-pb.js} +2 -2
  105. package/static/auth-callback/assets/{PaneListHeader-yvd5ohs6.js → PaneListHeader-Bf_kEd4U.js} +1 -1
  106. package/static/auth-callback/assets/{SearchIndexingPanel-2_a6ezzj.js → SearchIndexingPanel-4kD4RBEQ.js} +1 -1
  107. package/static/auth-callback/assets/{StatusSubjectPanel-8qtVxnzC.js → StatusSubjectPanel-Bw9AiTSf.js} +1 -1
  108. package/static/auth-callback/assets/{StatusWorkspace-CBdRahCF.js → StatusWorkspace-C-301H-0.js} +1 -1
  109. package/static/auth-callback/assets/{SystemSettingsPage-BZJ6vWkg.js → SystemSettingsPage-BbWn-eG6.js} +1 -1
  110. package/static/auth-callback/assets/{SystemSettingsSubjectPanel-xm08UhXP.js → SystemSettingsSubjectPanel-DA4wvNSm.js} +1 -1
  111. package/static/auth-callback/assets/{XpodAiConnectionsPodStore-V6vgGfuw.js → XpodAiConnectionsPodStore-CohdyLoX.js} +1 -1
  112. package/static/auth-callback/assets/{activity-CeM7xly8.js → activity-CCsb9Oam.js} +1 -1
  113. package/static/auth-callback/assets/ai-connections-DexTPyfC.js +1 -0
  114. package/static/auth-callback/assets/{auth-callback-DTG8cSj7.js → auth-callback-Ds-c62W3.js} +5 -5
  115. package/static/auth-callback/assets/{badge-qJo2Zr4d.js → badge-CQm5OyzR.js} +1 -1
  116. package/static/auth-callback/assets/{collection-runtime-Bztsz31a.js → collection-runtime-DlAuU5TW.js} +1 -1
  117. package/static/auth-callback/assets/{dialog-D-h6x5x0.js → dialog-CnGzg5Ff.js} +1 -1
  118. package/static/auth-callback/assets/{download-C2ir4lmR.js → download-DwMONJvm.js} +1 -1
  119. package/static/auth-callback/assets/{external-link-THLDL4On.js → external-link-Bu5AGqCO.js} +1 -1
  120. package/static/auth-callback/assets/{index-BlVZb9A7.js → index-B0T-1YO8.js} +1 -1
  121. package/static/auth-callback/assets/{index-BRpv4yO3.js → index-C8QZf_4W.js} +1 -1
  122. package/static/auth-callback/assets/{index-D983R1FV.js → index-DwIlrIDG.js} +1 -1
  123. package/static/auth-callback/assets/{index-browser-3FvR0aaf.js → index-browser-lRsMcP_7.js} +1 -1
  124. package/static/auth-callback/assets/{key-round-C9U5j1Ly.js → key-round-BDMtU57P.js} +1 -1
  125. package/static/auth-callback/assets/{rotate-ccw-DP45cD4o.js → rotate-ccw-CoKIGCsQ.js} +1 -1
  126. package/static/auth-callback/assets/{skeleton-Dn4EiSCS.js → skeleton-CPoSWHDr.js} +1 -1
  127. package/static/auth-callback/assets/{waypoints-uqFQ3uEG.js → waypoints-BeYHxqHv.js} +1 -1
  128. package/static/auth-callback/assets/{workspace-layout-DLYK0Wwu.js → workspace-layout-xA5YxiK3.js} +1 -1
  129. package/static/auth-callback/auth-callback.html +1 -1
  130. package/static/dashboard/assets/{AiConfigContext-DJcMECNw.js → AiConfigContext-rWx4TyiH.js} +1 -1
  131. package/static/dashboard/assets/{AiConfigPage-BvE7dOTy.js → AiConfigPage-StVJpDFT.js} +1 -1
  132. package/static/dashboard/assets/{DocumentProcessingPanel-D9780krf.js → DocumentProcessingPanel-DJ5yul2O.js} +1 -1
  133. package/static/dashboard/assets/{IndexLifecyclePanel-SjsUcnbM.js → IndexLifecyclePanel-CpjtgezK.js} +1 -1
  134. package/static/dashboard/assets/{IndexSubjectPanel-C-ym2Tqi.js → IndexSubjectPanel-BVKcot1_.js} +1 -1
  135. package/static/dashboard/assets/{ModelAssignmentsPanel-BRjZ-arB.js → ModelAssignmentsPanel-BxVgWZPc.js} +1 -1
  136. package/static/dashboard/assets/{ModelsPage-BtTU6du3.js → ModelsPage-CECBwmeO.js} +3 -3
  137. package/static/dashboard/assets/{NetworkPage-CV9qpkDg.js → NetworkPage-zQgFscEW.js} +2 -2
  138. package/static/dashboard/assets/{PaneListHeader-KyPTTBsv.js → PaneListHeader-DIPe8pS6.js} +1 -1
  139. package/static/dashboard/assets/{SearchIndexingPanel-DolHGawg.js → SearchIndexingPanel-lalFJ3c8.js} +1 -1
  140. package/static/dashboard/assets/{StatusSubjectPanel-_YZvKiYi.js → StatusSubjectPanel-CpY_KU-G.js} +1 -1
  141. package/static/dashboard/assets/{StatusWorkspace-Dlbh_G40.js → StatusWorkspace-BwWCii3A.js} +1 -1
  142. package/static/dashboard/assets/{SystemSettingsPage-Be7QSIoz.js → SystemSettingsPage-BKZxX-_n.js} +1 -1
  143. package/static/dashboard/assets/{SystemSettingsSubjectPanel-DBp0gja7.js → SystemSettingsSubjectPanel-BZrqb2C5.js} +1 -1
  144. package/static/dashboard/assets/{XpodAiConnectionsPodStore-ClpSjzpP.js → XpodAiConnectionsPodStore-Bbpx9dTN.js} +1 -1
  145. package/static/dashboard/assets/{activity-lsNbTXJu.js → activity-BJ15TLVP.js} +1 -1
  146. package/static/dashboard/assets/ai-connections-GG6qkTJt.js +1 -0
  147. package/static/dashboard/assets/{badge-CVatKjaG.js → badge-BBX5FlaB.js} +1 -1
  148. package/static/dashboard/assets/{collection-runtime-Ec4UnY28.js → collection-runtime-UBbHBzdf.js} +1 -1
  149. package/static/dashboard/assets/{dashboard-BEzsRsvF.js → dashboard-7Y6BHyV9.js} +62 -62
  150. package/static/dashboard/assets/{dialog-BuyelQ4V.js → dialog-QrOJ-hB0.js} +1 -1
  151. package/static/dashboard/assets/{download-B4Nf678F.js → download-DK9x-VOP.js} +1 -1
  152. package/static/dashboard/assets/{external-link-PYv9CvKL.js → external-link-Cnkn87mJ.js} +1 -1
  153. package/static/dashboard/assets/{index-C9XPE-mI.js → index-B1z84it5.js} +1 -1
  154. package/static/dashboard/assets/{index-awr7ulur.js → index-DzjauX3N.js} +1 -1
  155. package/static/dashboard/assets/{index-Cx69bTNh.js → index-cIa8_efI.js} +1 -1
  156. package/static/dashboard/assets/{key-round-VsY80U1Z.js → key-round-BoS6UqKz.js} +1 -1
  157. package/static/dashboard/assets/{rotate-ccw-Cz1K4vE9.js → rotate-ccw-BeWV76i0.js} +1 -1
  158. package/static/dashboard/assets/{skeleton-BhNv_8tO.js → skeleton-CypcJL07.js} +1 -1
  159. package/static/dashboard/assets/{waypoints-DYS9XFYV.js → waypoints-zHOOqfhi.js} +1 -1
  160. package/static/dashboard/assets/{workspace-layout-OZJAFx5V.js → workspace-layout-DZ9JuxnM.js} +1 -1
  161. package/static/dashboard/dashboard.html +1 -1
  162. package/static/settings/assets/{AiConfigContext-B8JS3MXF.js → AiConfigContext-D3b1l_Kw.js} +1 -1
  163. package/static/settings/assets/{AiConfigPage-C3Zl8LUl.js → AiConfigPage-DYKw-atP.js} +1 -1
  164. package/static/settings/assets/{DocumentProcessingPanel-DpDZAQvf.js → DocumentProcessingPanel-DguRfsIV.js} +1 -1
  165. package/static/settings/assets/{IndexLifecyclePanel-Ec1XF88t.js → IndexLifecyclePanel-B85qJJA4.js} +1 -1
  166. package/static/settings/assets/{IndexSubjectPanel-BulT9BmO.js → IndexSubjectPanel-CsN7IxaV.js} +1 -1
  167. package/static/settings/assets/{ModelAssignmentsPanel-BcGSmYjb.js → ModelAssignmentsPanel-DEp9byI6.js} +1 -1
  168. package/static/settings/assets/{ModelsPage-CvTCKy1T.js → ModelsPage-CzTnPs_G.js} +3 -3
  169. package/static/settings/assets/{NetworkPage-DQF5u9Bn.js → NetworkPage-BDVnmUU0.js} +2 -2
  170. package/static/settings/assets/{PaneListHeader-D40hqcVl.js → PaneListHeader-Cpe39N76.js} +1 -1
  171. package/static/settings/assets/{SearchIndexingPanel-iCUPOx_0.js → SearchIndexingPanel-DA9w8lLL.js} +1 -1
  172. package/static/settings/assets/{StatusSubjectPanel-E--ZHSql.js → StatusSubjectPanel-BU0Aq0CS.js} +1 -1
  173. package/static/settings/assets/{StatusWorkspace-YjDAx1II.js → StatusWorkspace-D1AC1i5N.js} +1 -1
  174. package/static/settings/assets/{SystemSettingsPage-CDdV3mC9.js → SystemSettingsPage-ChKvOioO.js} +1 -1
  175. package/static/settings/assets/{SystemSettingsSubjectPanel-Br8WazDq.js → SystemSettingsSubjectPanel-DyTpOnD2.js} +1 -1
  176. package/static/settings/assets/{XpodAiConnectionsPodStore-CLr38P_Z.js → XpodAiConnectionsPodStore-VU5Bsz1a.js} +1 -1
  177. package/static/settings/assets/{activity-C5DAHHTE.js → activity-DGpLfsQB.js} +1 -1
  178. package/static/settings/assets/ai-connections-DexTPyfC.js +1 -0
  179. package/static/settings/assets/{badge-D8eIyxKt.js → badge-_hCrrWRP.js} +1 -1
  180. package/static/settings/assets/{collection-runtime-DLc9zil8.js → collection-runtime-E40TZ8Cl.js} +1 -1
  181. package/static/settings/assets/{dialog-CyuR7Va4.js → dialog-DTr2JkHn.js} +1 -1
  182. package/static/settings/assets/{download-c0oxZrCz.js → download-B_D21DDX.js} +1 -1
  183. package/static/settings/assets/{external-link-D3Z34fP_.js → external-link-BATYaM13.js} +1 -1
  184. package/static/settings/assets/{index-CSr3-2Cj.js → index-BAlAVi-J.js} +1 -1
  185. package/static/settings/assets/{index-ComidxAm.js → index-Ckh4h9jj.js} +1 -1
  186. package/static/settings/assets/{index-CKGbRFlc.js → index-DOiwLF4B.js} +1 -1
  187. package/static/settings/assets/{index-browser-CAscEbae.js → index-browser-DFFWN3Kr.js} +1 -1
  188. package/static/settings/assets/{key-round-DyjLmXuB.js → key-round-ZTVU_1O1.js} +1 -1
  189. package/static/settings/assets/{rotate-ccw-679HF_ec.js → rotate-ccw-DDdw8PTU.js} +1 -1
  190. package/static/settings/assets/{settings-DKknqu4C.js → settings-CyLnISOv.js} +62 -62
  191. package/static/settings/assets/{skeleton-CkopNkPB.js → skeleton-DEzA3hc2.js} +1 -1
  192. package/static/settings/assets/{waypoints-CrqfAftE.js → waypoints-BSdfNvEb.js} +1 -1
  193. package/static/settings/assets/{workspace-layout-UN6c4qTG.js → workspace-layout-BOQnl_3d.js} +1 -1
  194. package/static/settings/settings.html +1 -1
  195. package/dist/api/ai-gateway/pod/HostedPodDataAccess.d.ts +0 -31
  196. package/dist/api/ai-gateway/pod/HostedPodDataAccess.js +0 -330
  197. package/dist/http/InternalPodDataHttpHandler.d.ts +0 -57
  198. package/dist/http/InternalPodDataHttpHandler.js +0 -551
  199. package/dist/http/InternalPodDataHttpHandler.jsonld +0 -243
  200. package/static/auth-callback/assets/ai-connections-C6yaE6WQ.js +0 -1
  201. package/static/dashboard/assets/ai-connections-CXp5gd1J.js +0 -1
  202. package/static/settings/assets/ai-connections-C6yaE6WQ.js +0 -1
@@ -1 +1 @@
1
- import{j as t,f as n}from"./settings-DKknqu4C.js";function m({className:e,...s}){return t.jsx("div",{className:n("animate-pulse rounded-md bg-muted/50",e),...s})}export{m as S};
1
+ import{j as t,f as n}from"./settings-CyLnISOv.js";function m({className:e,...s}){return t.jsx("div",{className:n("animate-pulse rounded-md bg-muted/50",e),...s})}export{m as S};
@@ -1 +1 @@
1
- import{c}from"./settings-DKknqu4C.js";const e=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],r=c("network",e);const t=[["path",{d:"m10.586 5.414-5.172 5.172",key:"4mc350"}],["path",{d:"m18.586 13.414-5.172 5.172",key:"8c96vv"}],["path",{d:"M6 12h12",key:"8npq4p"}],["circle",{cx:"12",cy:"20",r:"2",key:"144qzu"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}],["circle",{cx:"20",cy:"12",r:"2",key:"1xzzfp"}],["circle",{cx:"4",cy:"12",r:"2",key:"1hvhnz"}]],h=c("waypoints",t);export{r as N,h as W};
1
+ import{c}from"./settings-CyLnISOv.js";const e=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],r=c("network",e);const t=[["path",{d:"m10.586 5.414-5.172 5.172",key:"4mc350"}],["path",{d:"m18.586 13.414-5.172 5.172",key:"8c96vv"}],["path",{d:"M6 12h12",key:"8npq4p"}],["circle",{cx:"12",cy:"20",r:"2",key:"144qzu"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}],["circle",{cx:"20",cy:"12",r:"2",key:"1xzzfp"}],["circle",{cx:"4",cy:"12",r:"2",key:"1hvhnz"}]],h=c("waypoints",t);export{r as N,h as W};
@@ -1 +1 @@
1
- import{r as t,j as s,f as w}from"./settings-DKknqu4C.js";const y=t.createContext(null);function P(){const e=t.useContext(y);if(!e)throw new Error("useWorkspaceLayout must be used inside TwoPaneLayout");return e}const g="(max-width: 767px)",v={gridTemplateColumns:"210px minmax(0, 1fr)"};function j(e){return e==="context"?"main":e}function C(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};const a=window.matchMedia(g);return a.addEventListener("change",e),()=>a.removeEventListener("change",e)}function R(){return typeof window>"u"||typeof window.matchMedia!="function"?"split":window.matchMedia(g).matches?"stack":"split"}function L(){return"split"}function M(e){const a=t.useSyncExternalStore(C,R,L);return e==="auto"?a:e}function N({resolvedMode:e,history:a,resolvePane:l}){const[f,m]=t.useState("list"),c=t.useRef(null),b=t.useRef(null),i=t.useRef(null),r=t.useRef(null),u=t.useMemo(()=>({list:b,main:i,context:r}),[]),o=t.useCallback((n,h={})=>{const d=l?.(n)??n;m(d),e==="stack"&&(c.current=d,h.fromHistory||a?.push(d))},[a,l,e]),p=t.useCallback(()=>o("list"),[o]),x=t.useCallback(()=>o("main"),[o]),k=t.useCallback(()=>o("context"),[o]);return t.useLayoutEffect(()=>{if(e!=="stack"){c.current=null;return}const n=c.current;n&&(c.current=null,u[n].current?.focus())},[f,u,e]),t.useLayoutEffect(()=>{if(!(e!=="stack"||!a))return a.subscribe(n=>{o(n,{fromHistory:!0})})},[a,o,e]),{activePane:f,paneRefs:u,openList:p,openMain:x,openContext:k}}function S({listHeader:e,list:a,mainHeader:l,main:f,mode:m="auto",history:c,className:b}){const i=M(m),{activePane:r,paneRefs:u,openList:o,openMain:p,openContext:x}=N({resolvedMode:i,history:c,resolvePane:j}),k=t.useMemo(()=>({mode:i,activePane:r,openList:o,openMain:p,openContext:x}),[r,x,o,p,i]),n=i==="stack",h=n&&r!=="list",d=n&&r!=="main";return s.jsx(y.Provider,{value:k,children:s.jsx("section",{className:w("flex min-h-0 flex-1 flex-col bg-background",b),"data-workspace-layout":"two-pane","data-workspace-mode":i,children:s.jsxs("div",{className:w("grid min-h-0 flex-1",n?"grid-cols-1":null),style:n?void 0:v,"data-workspace-layout-mode":m,"data-workspace-active-pane":r,children:[s.jsxs("aside",{ref:u.list,className:w("min-h-0 flex-col overflow-hidden bg-layout-list-item @container",h?"hidden":"flex",n?"border-r-0":"border-r border-border"),"data-testid":"workspace-list-pane","data-workspace-pane":"list",hidden:h,tabIndex:n?-1:void 0,children:[s.jsx("header",{className:"h-12 shrink-0 border-b border-border bg-layout-list-header","data-workspace-list-header":"true",children:e}),s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:a})]}),s.jsxs("main",{ref:u.main,className:w("min-h-0 flex-col overflow-hidden bg-layout-content @container",d?"hidden":"flex"),"data-testid":"workspace-main-pane","data-workspace-pane":"main",hidden:d,tabIndex:n?-1:void 0,children:[s.jsx("header",{className:"h-12 shrink-0 border-b border-border bg-layout-content","data-workspace-main-header":"true",children:l}),s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[n?s.jsx("button",{type:"button",className:"inline-flex items-center px-4 py-3 text-sm text-muted-foreground hover:text-foreground",onClick:o,children:"返回列表"}):null,f]})]})]})})})}export{S as T,y as W,P as u};
1
+ import{r as t,j as s,f as w}from"./settings-CyLnISOv.js";const y=t.createContext(null);function P(){const e=t.useContext(y);if(!e)throw new Error("useWorkspaceLayout must be used inside TwoPaneLayout");return e}const g="(max-width: 767px)",v={gridTemplateColumns:"210px minmax(0, 1fr)"};function j(e){return e==="context"?"main":e}function C(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};const a=window.matchMedia(g);return a.addEventListener("change",e),()=>a.removeEventListener("change",e)}function R(){return typeof window>"u"||typeof window.matchMedia!="function"?"split":window.matchMedia(g).matches?"stack":"split"}function L(){return"split"}function M(e){const a=t.useSyncExternalStore(C,R,L);return e==="auto"?a:e}function N({resolvedMode:e,history:a,resolvePane:l}){const[f,m]=t.useState("list"),c=t.useRef(null),b=t.useRef(null),i=t.useRef(null),r=t.useRef(null),u=t.useMemo(()=>({list:b,main:i,context:r}),[]),o=t.useCallback((n,h={})=>{const d=l?.(n)??n;m(d),e==="stack"&&(c.current=d,h.fromHistory||a?.push(d))},[a,l,e]),p=t.useCallback(()=>o("list"),[o]),x=t.useCallback(()=>o("main"),[o]),k=t.useCallback(()=>o("context"),[o]);return t.useLayoutEffect(()=>{if(e!=="stack"){c.current=null;return}const n=c.current;n&&(c.current=null,u[n].current?.focus())},[f,u,e]),t.useLayoutEffect(()=>{if(!(e!=="stack"||!a))return a.subscribe(n=>{o(n,{fromHistory:!0})})},[a,o,e]),{activePane:f,paneRefs:u,openList:p,openMain:x,openContext:k}}function S({listHeader:e,list:a,mainHeader:l,main:f,mode:m="auto",history:c,className:b}){const i=M(m),{activePane:r,paneRefs:u,openList:o,openMain:p,openContext:x}=N({resolvedMode:i,history:c,resolvePane:j}),k=t.useMemo(()=>({mode:i,activePane:r,openList:o,openMain:p,openContext:x}),[r,x,o,p,i]),n=i==="stack",h=n&&r!=="list",d=n&&r!=="main";return s.jsx(y.Provider,{value:k,children:s.jsx("section",{className:w("flex min-h-0 flex-1 flex-col bg-background",b),"data-workspace-layout":"two-pane","data-workspace-mode":i,children:s.jsxs("div",{className:w("grid min-h-0 flex-1",n?"grid-cols-1":null),style:n?void 0:v,"data-workspace-layout-mode":m,"data-workspace-active-pane":r,children:[s.jsxs("aside",{ref:u.list,className:w("min-h-0 flex-col overflow-hidden bg-layout-list-item @container",h?"hidden":"flex",n?"border-r-0":"border-r border-border"),"data-testid":"workspace-list-pane","data-workspace-pane":"list",hidden:h,tabIndex:n?-1:void 0,children:[s.jsx("header",{className:"h-12 shrink-0 border-b border-border bg-layout-list-header","data-workspace-list-header":"true",children:e}),s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:a})]}),s.jsxs("main",{ref:u.main,className:w("min-h-0 flex-col overflow-hidden bg-layout-content @container",d?"hidden":"flex"),"data-testid":"workspace-main-pane","data-workspace-pane":"main",hidden:d,tabIndex:n?-1:void 0,children:[s.jsx("header",{className:"h-12 shrink-0 border-b border-border bg-layout-content","data-workspace-main-header":"true",children:l}),s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[n?s.jsx("button",{type:"button",className:"inline-flex items-center px-4 py-3 text-sm text-muted-foreground hover:text-foreground",onClick:o,children:"返回列表"}):null,f]})]})]})})})}export{S as T,y as W,P as u};
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <script src="/settings/theme-init.js"></script>
7
7
  <title>Xpod Settings</title>
8
- <script type="module" crossorigin src="/settings/assets/settings-DKknqu4C.js"></script>
8
+ <script type="module" crossorigin src="/settings/assets/settings-CyLnISOv.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/settings/assets/settings-rk080mvG.css">
10
10
  </head>
11
11
  <body class="bg-background text-foreground">
@@ -1,31 +0,0 @@
1
- import type { AuthContext } from '../../auth/AuthContext';
2
- export interface InternalPodAccessTokenProvider {
3
- getTrustedFetch(owner: string, auth?: InternalPodAccessAuthContext, context?: InternalPodAccessRequestContext): Promise<typeof fetch | undefined>;
4
- }
5
- export type InternalPodAccessAuthContext = AuthContext | undefined;
6
- export interface InternalPodAccessRequestContext {
7
- /** Opaque label recorded for internal Pod access; no longer grants implicit authorization. */
8
- reason?: string;
9
- /** Physical Pod root when the identity WebID is hosted by a separate IdP. */
10
- podBaseUrl?: string;
11
- }
12
- export interface HostedPodDataAccessOptions {
13
- cssBaseUrl: string;
14
- gatewayAdminProxyAuthSecret?: string;
15
- fetch?: typeof fetch;
16
- now?: () => number;
17
- nonce?: () => string;
18
- }
19
- export declare const HOSTED_POD_RAW_BODY_MAX_BYTES: number;
20
- export declare class HostedPodDataAccess implements InternalPodAccessTokenProvider {
21
- private readonly cssBaseUrl;
22
- private readonly gatewayAdminProxyAuthSecret?;
23
- private readonly fetch;
24
- private readonly now;
25
- private readonly nonce;
26
- constructor(options: HostedPodDataAccessOptions);
27
- getTrustedFetch(owner: string, auth?: InternalPodAccessAuthContext, context?: InternalPodAccessRequestContext): Promise<typeof fetch | undefined>;
28
- private authorize;
29
- private assertHostedAllowedResource;
30
- private headersForLoopback;
31
- }
@@ -1,330 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HostedPodDataAccess = exports.HOSTED_POD_RAW_BODY_MAX_BYTES = void 0;
4
- const node_crypto_1 = require("node:crypto");
5
- const node_crypto_2 = require("node:crypto");
6
- const node_net_1 = require("node:net");
7
- const sparqljs_1 = require("sparqljs");
8
- const AiConnectionsServiceAccess_1 = require("../service-access/AiConnectionsServiceAccess");
9
- const AiConfigServiceAccess_1 = require("../service-access/AiConfigServiceAccess");
10
- const GatewayAdminProxyAuth_1 = require("../../../runtime/GatewayAdminProxyAuth");
11
- const MODEL_QUERY_MAX_BODY_BYTES = 256 * 1024;
12
- exports.HOSTED_POD_RAW_BODY_MAX_BYTES = 1024 * 1024;
13
- const INTERNAL_POD_DATA_PATH = '/.internal/pod-data';
14
- const STRIPPED_CALLER_HEADERS = new Set([
15
- 'authorization',
16
- // The request body is buffered before signing and forwarding. Let fetch
17
- // calculate the length for the forwarded bytes instead of retaining the
18
- // caller's stream-oriented header.
19
- 'content-length',
20
- 'dpop',
21
- 'cookie',
22
- ]);
23
- class HostedPodDataAccess {
24
- constructor(options) {
25
- this.cssBaseUrl = new URL(options.cssBaseUrl);
26
- if (!isLoopbackHostname(this.cssBaseUrl.hostname)) {
27
- throw new Error('hosted_pod_css_loopback_required');
28
- }
29
- this.gatewayAdminProxyAuthSecret = options.gatewayAdminProxyAuthSecret ?? process.env.XPOD_GATEWAY_ADMIN_PROXY_AUTH_SECRET;
30
- this.fetch = options.fetch ?? fetch;
31
- this.now = options.now ?? Date.now;
32
- this.nonce = options.nonce ?? node_crypto_1.randomUUID;
33
- }
34
- async getTrustedFetch(owner, auth, context) {
35
- return async (input, init) => {
36
- const request = new Request(input, init);
37
- const method = normalizeMethod(request.method);
38
- const resourceUrl = normalizeResourceUrl(request.url);
39
- const body = method === 'POST' ? await readRequestBody(request) : undefined;
40
- const forwardedBytes = method === 'PATCH' || method === 'PUT'
41
- ? await readRequestBytes(request)
42
- : undefined;
43
- const authorization = this.authorize({ owner, auth, context, method, resourceUrl, body });
44
- const loopbackUrl = new URL(INTERNAL_POD_DATA_PATH, this.cssBaseUrl);
45
- const headers = this.headersForLoopback(request.headers, {
46
- ownerWebId: owner,
47
- ...(context?.podBaseUrl ? { podBaseUrl: context.podBaseUrl } : {}),
48
- method,
49
- resourceUrl,
50
- principalKind: authorization.principalKind,
51
- scopes: authorization.scopes,
52
- ...(body ? { bodyDigest: body.digest } : {}),
53
- });
54
- const forwardedBody = method === 'POST'
55
- ? body?.bytes
56
- : forwardedBytes ?? request.body;
57
- try {
58
- return await this.fetch(loopbackUrl, {
59
- method,
60
- headers,
61
- body: forwardedBody,
62
- signal: init?.signal ?? request.signal,
63
- ...(forwardedBody instanceof ReadableStream ? { duplex: 'half' } : {}),
64
- });
65
- }
66
- catch (error) {
67
- const message = error instanceof Error
68
- ? `${error.message}${error.cause ? `:${String(error.cause)}` : ''}`
69
- : String(error);
70
- throw new Error(`hosted_pod_loopback_fetch_failed:${loopbackUrl.href}:${message}`, { cause: error });
71
- }
72
- };
73
- }
74
- authorize(input) {
75
- this.assertHostedAllowedResource(input.owner, input.resourceUrl, input.method, input.body, input.context?.podBaseUrl);
76
- if (!input.auth && input.context?.reason === 'gateway-key-verifier') {
77
- return {
78
- principalKind: 'gateway-key-verifier',
79
- scopes: [input.method === 'PATCH' ? 'ai:gateway-key:touch' : 'ai:gateway-key:verify'],
80
- };
81
- }
82
- if (!input.auth) {
83
- throw new Error('hosted_pod_auth_required');
84
- }
85
- if (input.auth.type !== 'solid') {
86
- throw new Error('hosted_pod_solid_principal_required');
87
- }
88
- if (input.auth.webId !== input.owner) {
89
- throw new Error('hosted_pod_owner_mismatch');
90
- }
91
- return {
92
- principalKind: 'solid-user',
93
- scopes: [isReadOnlyMethod(input.method, input.resourceUrl, input.owner, input.body, input.context?.podBaseUrl)
94
- ? 'ai:credentials:read'
95
- : 'ai:credentials:write'],
96
- };
97
- }
98
- assertHostedAllowedResource(owner, resourceUrl, method, body, podBaseUrl) {
99
- const resource = parseUrl(resourceUrl, 'hosted_pod_resource_url_invalid');
100
- const ownerUrl = parseUrl(owner, 'hosted_pod_owner_url_invalid');
101
- const podRoot = podBaseUrl
102
- ? normalizePodRoot(podBaseUrl)
103
- : hostedPodRootFromOwner(ownerUrl);
104
- if (!podRoot || resource.origin !== podRoot.origin || !resource.pathname.startsWith(podRoot.pathname)) {
105
- throw new Error('hosted_pod_remote_resource');
106
- }
107
- const modelCollectionPath = `${podRoot.pathname}settings/providers/-/sparql`;
108
- const settingsCollectionPath = `${podRoot.pathname}settings/-/sparql`;
109
- const storageOwner = new URL('profile/card#me', podRoot).href;
110
- const gatewayAccessKeyEndpoint = (0, AiConnectionsServiceAccess_1.isGatewayAccessKeySparqlEndpoint)(storageOwner, resource);
111
- if (resource.pathname === modelCollectionPath || resource.pathname === settingsCollectionPath || gatewayAccessKeyEndpoint) {
112
- const queryOnlyEndpoint = resource.pathname === modelCollectionPath || gatewayAccessKeyEndpoint;
113
- if (resource.hash || (method === 'GET' && !hasExactlyOneSparqlQuery(resource)) ||
114
- (method === 'POST' && (resource.search || !body)) ||
115
- (queryOnlyEndpoint && method === 'POST' && body?.kind !== 'query')) {
116
- throw new Error('hosted_pod_resource_not_allowed');
117
- }
118
- if (method !== 'GET' && method !== 'POST') {
119
- throw new Error('hosted_pod_resource_not_allowed');
120
- }
121
- return;
122
- }
123
- if (resource.hash || resource.search) {
124
- throw new Error('hosted_pod_resource_not_allowed');
125
- }
126
- const allowed = (0, AiConnectionsServiceAccess_1.createAiConnectionsServiceAccess)({
127
- ownerWebId: storageOwner,
128
- serviceWebId: owner,
129
- }).resources.map((entry) => entry.url);
130
- allowed.push(...(0, AiConfigServiceAccess_1.createAiConfigResourceUrls)(storageOwner));
131
- if (!allowed.includes(resource.href)) {
132
- throw new Error('hosted_pod_resource_not_allowed');
133
- }
134
- }
135
- headersForLoopback(headers, intent) {
136
- const next = new Headers();
137
- headers.forEach((value, key) => {
138
- const normalized = key.toLowerCase();
139
- if (STRIPPED_CALLER_HEADERS.has(normalized)
140
- || GatewayAdminProxyAuth_1.GATEWAY_ADMIN_PROXY_HEADERS.includes(normalized)
141
- || normalized.startsWith('x-xpod-admin-proxy-')) {
142
- return;
143
- }
144
- next.set(key, value);
145
- });
146
- if (!this.gatewayAdminProxyAuthSecret) {
147
- throw new Error('XPOD_GATEWAY_ADMIN_PROXY_AUTH_SECRET is required for hosted Pod data access');
148
- }
149
- const marker = (0, GatewayAdminProxyAuth_1.createGatewayAdminProxyHeaders)({
150
- secret: this.gatewayAdminProxyAuthSecret,
151
- method: intent.method,
152
- url: INTERNAL_POD_DATA_PATH,
153
- originalClientLoopback: true,
154
- issuedAt: this.now(),
155
- nonce: this.nonce(),
156
- intent,
157
- });
158
- for (const [key, value] of Object.entries(marker)) {
159
- if (value !== undefined) {
160
- next.set(key, Array.isArray(value) ? value.join(', ') : String(value));
161
- }
162
- }
163
- return next;
164
- }
165
- }
166
- exports.HostedPodDataAccess = HostedPodDataAccess;
167
- function normalizePodRoot(value) {
168
- const root = new URL(value);
169
- root.search = '';
170
- root.hash = '';
171
- if (!root.pathname.endsWith('/'))
172
- root.pathname += '/';
173
- return root;
174
- }
175
- function hasExactlyOneSparqlQuery(resource) {
176
- const keys = Array.from(resource.searchParams.keys());
177
- const query = resource.searchParams.get('query')?.trim();
178
- return keys.length === 1 && keys[0] === 'query' && query !== undefined && sparqlKind(query) === 'query';
179
- }
180
- function normalizeMethod(method) {
181
- const upper = (method ?? 'GET').toUpperCase();
182
- if (upper === 'GET' || upper === 'HEAD' || upper === 'POST' || upper === 'PUT' || upper === 'PATCH' || upper === 'DELETE') {
183
- return upper;
184
- }
185
- throw new Error('hosted_pod_method_not_allowed');
186
- }
187
- async function readRequestBytes(request, maxBytes = exports.HOSTED_POD_RAW_BODY_MAX_BYTES) {
188
- const body = request.body;
189
- if (!body) {
190
- return undefined;
191
- }
192
- const reader = body.getReader();
193
- const chunks = [];
194
- let totalBytes = 0;
195
- try {
196
- while (true) {
197
- const { done, value } = await reader.read();
198
- if (done) {
199
- break;
200
- }
201
- const chunk = value instanceof Uint8Array ? value : new Uint8Array(value);
202
- if (chunk.byteLength > maxBytes - totalBytes) {
203
- try {
204
- await reader.cancel();
205
- }
206
- catch {
207
- // Preserve the stable size error even if the source cannot cancel cleanly.
208
- }
209
- throw new Error('hosted_pod_body_too_large');
210
- }
211
- chunks.push(chunk);
212
- totalBytes += chunk.byteLength;
213
- }
214
- }
215
- finally {
216
- reader.releaseLock();
217
- }
218
- const bytes = new Uint8Array(totalBytes);
219
- let offset = 0;
220
- for (const chunk of chunks) {
221
- bytes.set(chunk, offset);
222
- offset += chunk.byteLength;
223
- }
224
- return bytes;
225
- }
226
- async function readRequestBody(request) {
227
- const bytes = await readRequestBytes(request, MODEL_QUERY_MAX_BODY_BYTES);
228
- if (!bytes) {
229
- return undefined;
230
- }
231
- if (bytes.byteLength === 0) {
232
- return undefined;
233
- }
234
- const contentType = request.headers.get('content-type')?.split(';', 1)[0].trim().toLowerCase();
235
- let declaredKind;
236
- let sparql;
237
- if (contentType === 'application/sparql-query') {
238
- declaredKind = 'query';
239
- sparql = new TextDecoder().decode(bytes).trim();
240
- }
241
- else if (contentType === 'application/sparql-update') {
242
- declaredKind = 'update';
243
- sparql = new TextDecoder().decode(bytes).trim();
244
- }
245
- else if (contentType === 'application/x-www-form-urlencoded') {
246
- const params = new URLSearchParams(new TextDecoder().decode(bytes));
247
- const keys = Array.from(params.keys());
248
- const operation = keys.length === 1 && (keys[0] === 'query' || keys[0] === 'update')
249
- ? keys[0]
250
- : undefined;
251
- if (operation) {
252
- declaredKind = operation;
253
- sparql = params.get(operation)?.trim();
254
- }
255
- }
256
- if (!declaredKind || !sparql || sparqlKind(sparql) !== declaredKind) {
257
- return undefined;
258
- }
259
- return {
260
- kind: declaredKind,
261
- sparql,
262
- digest: (0, node_crypto_2.createHash)('sha256').update(bytes).digest('hex'),
263
- bytes,
264
- };
265
- }
266
- function sparqlKind(value) {
267
- try {
268
- const parsed = new sparqljs_1.Parser({ baseIRI: 'urn:xpod:internal-sparql:' }).parse(value);
269
- return parsed.type === 'update' ? 'update' : parsed.type === 'query' ? 'query' : undefined;
270
- }
271
- catch {
272
- return undefined;
273
- }
274
- }
275
- function isReadOnlyMethod(method, resourceUrl, ownerWebId, body, podBaseUrl) {
276
- if (method === 'GET' || method === 'HEAD') {
277
- return true;
278
- }
279
- if (method !== 'POST') {
280
- return false;
281
- }
282
- try {
283
- const resource = new URL(resourceUrl);
284
- const podRoot = podBaseUrl
285
- ? normalizePodRoot(podBaseUrl)
286
- : hostedPodRootFromOwner(new URL(ownerWebId));
287
- if (!podRoot || body?.kind !== 'query') {
288
- return false;
289
- }
290
- const storageOwnerWebId = new URL('profile/card#me', podRoot).href;
291
- return resource.pathname === `${podRoot.pathname}settings/providers/-/sparql`
292
- || resource.pathname === `${podRoot.pathname}settings/-/sparql`
293
- || (0, AiConnectionsServiceAccess_1.isGatewayAccessKeySparqlEndpoint)(storageOwnerWebId, resource);
294
- }
295
- catch {
296
- return false;
297
- }
298
- }
299
- function normalizeResourceUrl(value) {
300
- return new URL(value).href;
301
- }
302
- function parseUrl(value, errorCode) {
303
- try {
304
- return new URL(value);
305
- }
306
- catch {
307
- throw new Error(errorCode);
308
- }
309
- }
310
- function hostedPodRootFromOwner(ownerUrl) {
311
- if (ownerUrl.hash !== '#me' || !ownerUrl.pathname.endsWith('/profile/card')) {
312
- return undefined;
313
- }
314
- const podPath = ownerUrl.pathname.slice(0, -'profile/card'.length);
315
- if (!podPath || !podPath.endsWith('/')) {
316
- return undefined;
317
- }
318
- return new URL(podPath, ownerUrl.origin);
319
- }
320
- function isLoopbackHostname(hostname) {
321
- const normalized = hostname.replace(/^\[|\]$/gu, '').toLowerCase();
322
- if (normalized === 'localhost') {
323
- return true;
324
- }
325
- if ((0, node_net_1.isIP)(normalized) === 4) {
326
- return normalized.startsWith('127.');
327
- }
328
- return normalized === '::1';
329
- }
330
- //# sourceMappingURL=HostedPodDataAccess.js.map
@@ -1,57 +0,0 @@
1
- import { HttpHandler, type BodyParser, type HttpHandlerInput, type HttpRequest, type HttpResponse, type ResourceStore } from '@solid/community-server';
2
- export interface InternalPodDataHttpHandlerOptions {
3
- resourceStore: ResourceStore;
4
- gatewayAdminProxyAuthSecret?: string;
5
- patchBodyParser?: BodyParser;
6
- sparqlHandler?: InternalPodDataTrustedSparqlHandler;
7
- baseUrl?: string;
8
- basePath?: string;
9
- }
10
- /** Narrow trusted bridge used only after the signed internal intent has been
11
- * validated. The implementation must re-check the owner/collection boundary. */
12
- export interface InternalPodDataTrustedSparqlHandler {
13
- handleTrustedInternalSelect(input: {
14
- ownerWebId: string;
15
- endpointUrl: string;
16
- query: string;
17
- request: HttpRequest;
18
- response: HttpResponse;
19
- }): Promise<void>;
20
- handleTrustedInternalUpdate(input: {
21
- ownerWebId: string;
22
- endpointUrl: string;
23
- query: string;
24
- request: HttpRequest;
25
- response: HttpResponse;
26
- }): Promise<void>;
27
- }
28
- export declare class InternalPodDataHttpHandler extends HttpHandler {
29
- protected readonly logger: import("global-logger-factory").Logger<unknown>;
30
- private readonly resourceStore;
31
- private readonly gatewayAdminProxyAuthSecret?;
32
- private readonly patchBodyParser?;
33
- private readonly sparqlHandler?;
34
- private readonly deploymentBaseUrl?;
35
- private readonly basePath;
36
- private readonly seenNonces;
37
- private readonly eTagHandler;
38
- private readonly conditionsParser;
39
- constructor(options: InternalPodDataHttpHandlerOptions);
40
- canHandle({ request }: HttpHandlerInput): Promise<void>;
41
- handle({ request, response }: HttpHandlerInput): Promise<void>;
42
- private verifyRequest;
43
- private logRejectedRequest;
44
- private intentMatchesRequest;
45
- private isHostedOwnerResource;
46
- private isAllowedAiConnectionResource;
47
- private delegate;
48
- private createRepresentation;
49
- private writeETag;
50
- private createPatch;
51
- private pipeRepresentation;
52
- private writeNotFound;
53
- private writeEmptyGraph;
54
- private requestPathname;
55
- private parseOptionalUrl;
56
- private isInsideDeployment;
57
- }