@undefineds.co/xpod 0.3.58 → 0.3.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/config/cli.json +88 -0
- package/config/cloud.json +32 -1
- package/config/components-ignore.json +3 -0
- package/config/extensions.local.initializer.json +44 -0
- package/config/resolver.json +86 -0
- package/config/xpod.base.json +4 -0
- package/dist/agents/AgentExecutorFactory.d.ts +3 -3
- package/dist/agents/AgentExecutorFactory.js +28 -15
- package/dist/agents/AgentExecutorFactory.js.map +1 -1
- package/dist/agents/BaseAgentExecutor.d.ts +2 -1
- package/dist/agents/BaseAgentExecutor.js +1 -0
- package/dist/agents/BaseAgentExecutor.js.map +1 -1
- package/dist/agents/ClaudeExecutor.d.ts +3 -1
- package/dist/agents/ClaudeExecutor.js +18 -12
- package/dist/agents/ClaudeExecutor.js.map +1 -1
- package/dist/agents/config/resolve.js +0 -21
- package/dist/agents/config/resolve.js.map +1 -1
- package/dist/agents/config/types.d.ts +2 -7
- package/dist/agents/config/types.js +2 -1
- package/dist/agents/config/types.js.map +1 -1
- package/dist/agents/types.d.ts +18 -0
- package/dist/agents/types.js.map +1 -1
- package/dist/ai/schema/types.d.ts +2 -1
- package/dist/ai/schema/types.js +1 -0
- package/dist/ai/schema/types.js.map +1 -1
- package/dist/ai/service/CredentialReader.d.ts +3 -1
- package/dist/ai/service/CredentialReader.js.map +1 -1
- package/dist/ai/service/CredentialReaderImpl.d.ts +3 -1
- package/dist/ai/service/CredentialReaderImpl.js +24 -2
- package/dist/ai/service/CredentialReaderImpl.js.map +1 -1
- package/dist/ai/service/EmbeddingServiceImpl.js +13 -2
- package/dist/ai/service/EmbeddingServiceImpl.js.map +1 -1
- package/dist/ai/service/ProviderRegistry.d.ts +4 -0
- package/dist/ai/service/ProviderRegistry.js.map +1 -1
- package/dist/ai/service/ProviderRegistry.jsonld +4 -0
- package/dist/ai/service/ProviderRegistryImpl.d.ts +4 -1
- package/dist/ai/service/ProviderRegistryImpl.js +26 -4
- package/dist/ai/service/ProviderRegistryImpl.js.map +1 -1
- package/dist/ai/service/ProviderRegistryImpl.jsonld +12 -0
- package/dist/ai/service/defaultEmbeddingProfile.d.ts +5 -0
- package/dist/ai/service/defaultEmbeddingProfile.js +31 -0
- package/dist/ai/service/defaultEmbeddingProfile.js.map +1 -0
- package/dist/ai/service/index.d.ts +1 -0
- package/dist/ai/service/index.js +1 -0
- package/dist/ai/service/index.js.map +1 -1
- package/dist/ai/service/types.d.ts +1 -0
- package/dist/ai/service/types.js.map +1 -1
- package/dist/api/ApiServer.js +17 -2
- package/dist/api/ApiServer.js.map +1 -1
- package/dist/api/ai-gateway/AiGatewayService.d.ts +106 -0
- package/dist/api/ai-gateway/AiGatewayService.js +527 -0
- package/dist/api/ai-gateway/AiGatewayService.js.map +1 -0
- package/dist/api/ai-gateway/auth/AiConnectionInvocationKeyIssuer.d.ts +38 -0
- package/dist/api/ai-gateway/auth/AiConnectionInvocationKeyIssuer.js +128 -0
- package/dist/api/ai-gateway/auth/AiConnectionInvocationKeyIssuer.js.map +1 -0
- package/dist/api/ai-gateway/auth/ClientCredentialsInternalPodAccessTokenProvider.d.ts +25 -0
- package/dist/api/ai-gateway/auth/ClientCredentialsInternalPodAccessTokenProvider.js +91 -0
- package/dist/api/ai-gateway/auth/ClientCredentialsInternalPodAccessTokenProvider.js.map +1 -0
- package/dist/api/ai-gateway/auth/GatewayApiKey.d.ts +28 -0
- package/dist/api/ai-gateway/auth/GatewayApiKey.js +162 -0
- package/dist/api/ai-gateway/auth/GatewayApiKey.js.map +1 -0
- package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.d.ts +56 -0
- package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.js +143 -0
- package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.js.map +1 -0
- package/dist/api/ai-gateway/auth/GatewayKeyLocatorCodec.d.ts +26 -0
- package/dist/api/ai-gateway/auth/GatewayKeyLocatorCodec.js +97 -0
- package/dist/api/ai-gateway/auth/GatewayKeyLocatorCodec.js.map +1 -0
- package/dist/api/ai-gateway/auth/GatewayPrincipal.d.ts +20 -0
- package/dist/api/ai-gateway/auth/GatewayPrincipal.js +37 -0
- package/dist/api/ai-gateway/auth/GatewayPrincipal.js.map +1 -0
- package/dist/api/ai-gateway/auth/InvocationTokenCodec.d.ts +41 -0
- package/dist/api/ai-gateway/auth/InvocationTokenCodec.js +221 -0
- package/dist/api/ai-gateway/auth/InvocationTokenCodec.js.map +1 -0
- package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.d.ts +54 -0
- package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.js +152 -0
- package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.js.map +1 -0
- package/dist/api/ai-gateway/connect/index.d.ts +367 -0
- package/dist/api/ai-gateway/connect/index.js +1061 -0
- package/dist/api/ai-gateway/connect/index.js.map +1 -0
- package/dist/api/ai-gateway/credentials/CloudKmsWrapper.d.ts +40 -0
- package/dist/api/ai-gateway/credentials/CloudKmsWrapper.js +59 -0
- package/dist/api/ai-gateway/credentials/CloudKmsWrapper.js.map +1 -0
- package/dist/api/ai-gateway/credentials/CredentialVault.d.ts +14 -0
- package/dist/api/ai-gateway/credentials/CredentialVault.js +11 -0
- package/dist/api/ai-gateway/credentials/CredentialVault.js.map +1 -0
- package/dist/api/ai-gateway/credentials/KeyWrapper.d.ts +27 -0
- package/dist/api/ai-gateway/credentials/KeyWrapper.js +3 -0
- package/dist/api/ai-gateway/credentials/KeyWrapper.js.map +1 -0
- package/dist/api/ai-gateway/credentials/LocalKeychainWrapper.d.ts +27 -0
- package/dist/api/ai-gateway/credentials/LocalKeychainWrapper.js +145 -0
- package/dist/api/ai-gateway/credentials/LocalKeychainWrapper.js.map +1 -0
- package/dist/api/ai-gateway/credentials/SecretCellCredentialVault.d.ts +13 -0
- package/dist/api/ai-gateway/credentials/SecretCellCredentialVault.js +133 -0
- package/dist/api/ai-gateway/credentials/SecretCellCredentialVault.js.map +1 -0
- package/dist/api/ai-gateway/credentials/SecretCellKeyWrapper.d.ts +23 -0
- package/dist/api/ai-gateway/credentials/SecretCellKeyWrapper.js +62 -0
- package/dist/api/ai-gateway/credentials/SecretCellKeyWrapper.js.map +1 -0
- package/dist/api/ai-gateway/credentials/WebCryptoCredentialVault.d.ts +23 -0
- package/dist/api/ai-gateway/credentials/WebCryptoCredentialVault.js +173 -0
- package/dist/api/ai-gateway/credentials/WebCryptoCredentialVault.js.map +1 -0
- package/dist/api/ai-gateway/errors.d.ts +21 -0
- package/dist/api/ai-gateway/errors.js +50 -0
- package/dist/api/ai-gateway/errors.js.map +1 -0
- package/dist/api/ai-gateway/protocol/ChatCompletionsFrontend.d.ts +6 -0
- package/dist/api/ai-gateway/protocol/ChatCompletionsFrontend.js +111 -0
- package/dist/api/ai-gateway/protocol/ChatCompletionsFrontend.js.map +1 -0
- package/dist/api/ai-gateway/protocol/MessagesFrontend.d.ts +6 -0
- package/dist/api/ai-gateway/protocol/MessagesFrontend.js +99 -0
- package/dist/api/ai-gateway/protocol/MessagesFrontend.js.map +1 -0
- package/dist/api/ai-gateway/protocol/ResponsesFrontend.d.ts +6 -0
- package/dist/api/ai-gateway/protocol/ResponsesFrontend.js +232 -0
- package/dist/api/ai-gateway/protocol/ResponsesFrontend.js.map +1 -0
- package/dist/api/ai-gateway/protocol/index.d.ts +3 -0
- package/dist/api/ai-gateway/protocol/index.js +10 -0
- package/dist/api/ai-gateway/protocol/index.js.map +1 -0
- package/dist/api/ai-gateway/providers/AnthropicRuntimeAdapter.d.ts +7 -0
- package/dist/api/ai-gateway/providers/AnthropicRuntimeAdapter.js +37 -0
- package/dist/api/ai-gateway/providers/AnthropicRuntimeAdapter.js.map +1 -0
- package/dist/api/ai-gateway/providers/BailianRuntimeAdapter.d.ts +9 -0
- package/dist/api/ai-gateway/providers/BailianRuntimeAdapter.js +127 -0
- package/dist/api/ai-gateway/providers/BailianRuntimeAdapter.js.map +1 -0
- package/dist/api/ai-gateway/providers/DeepSeekRuntimeAdapter.d.ts +8 -0
- package/dist/api/ai-gateway/providers/DeepSeekRuntimeAdapter.js +47 -0
- package/dist/api/ai-gateway/providers/DeepSeekRuntimeAdapter.js.map +1 -0
- package/dist/api/ai-gateway/providers/KimiRuntimeAdapter.d.ts +8 -0
- package/dist/api/ai-gateway/providers/KimiRuntimeAdapter.js +57 -0
- package/dist/api/ai-gateway/providers/KimiRuntimeAdapter.js.map +1 -0
- package/dist/api/ai-gateway/providers/OpenAiCompatibleRuntimeAdapter.d.ts +1 -0
- package/dist/api/ai-gateway/providers/OpenAiCompatibleRuntimeAdapter.js +6 -0
- package/dist/api/ai-gateway/providers/OpenAiCompatibleRuntimeAdapter.js.map +1 -0
- package/dist/api/ai-gateway/providers/OpenAiRuntimeAdapter.d.ts +13 -0
- package/dist/api/ai-gateway/providers/OpenAiRuntimeAdapter.js +34 -0
- package/dist/api/ai-gateway/providers/OpenAiRuntimeAdapter.js.map +1 -0
- package/dist/api/ai-gateway/providers/ProviderRegistry.d.ts +68 -0
- package/dist/api/ai-gateway/providers/ProviderRegistry.js +288 -0
- package/dist/api/ai-gateway/providers/ProviderRegistry.js.map +1 -0
- package/dist/api/ai-gateway/providers/ProviderRuntimeAdapter.d.ts +88 -0
- package/dist/api/ai-gateway/providers/ProviderRuntimeAdapter.js +645 -0
- package/dist/api/ai-gateway/providers/ProviderRuntimeAdapter.js.map +1 -0
- package/dist/api/ai-gateway/providers/ProviderRuntimeRegistry.d.ts +13 -0
- package/dist/api/ai-gateway/providers/ProviderRuntimeRegistry.js +48 -0
- package/dist/api/ai-gateway/providers/ProviderRuntimeRegistry.js.map +1 -0
- package/dist/api/ai-gateway/providers/index.d.ts +9 -0
- package/dist/api/ai-gateway/providers/index.js +26 -0
- package/dist/api/ai-gateway/providers/index.js.map +1 -0
- package/dist/api/ai-gateway/quota/AnthropicQuotaAdapter.d.ts +5 -0
- package/dist/api/ai-gateway/quota/AnthropicQuotaAdapter.js +21 -0
- package/dist/api/ai-gateway/quota/AnthropicQuotaAdapter.js.map +1 -0
- package/dist/api/ai-gateway/quota/BailianQuotaAdapter.d.ts +5 -0
- package/dist/api/ai-gateway/quota/BailianQuotaAdapter.js +21 -0
- package/dist/api/ai-gateway/quota/BailianQuotaAdapter.js.map +1 -0
- package/dist/api/ai-gateway/quota/DeepSeekQuotaAdapter.d.ts +10 -0
- package/dist/api/ai-gateway/quota/DeepSeekQuotaAdapter.js +83 -0
- package/dist/api/ai-gateway/quota/DeepSeekQuotaAdapter.js.map +1 -0
- package/dist/api/ai-gateway/quota/KimiQuotaAdapter.d.ts +10 -0
- package/dist/api/ai-gateway/quota/KimiQuotaAdapter.js +70 -0
- package/dist/api/ai-gateway/quota/KimiQuotaAdapter.js.map +1 -0
- package/dist/api/ai-gateway/quota/OpenAiQuotaAdapter.d.ts +5 -0
- package/dist/api/ai-gateway/quota/OpenAiQuotaAdapter.js +21 -0
- package/dist/api/ai-gateway/quota/OpenAiQuotaAdapter.js.map +1 -0
- package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.d.ts +214 -0
- package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.js +511 -0
- package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.js.map +1 -0
- package/dist/api/ai-gateway/quota/index.d.ts +6 -0
- package/dist/api/ai-gateway/quota/index.js +23 -0
- package/dist/api/ai-gateway/quota/index.js.map +1 -0
- package/dist/api/ai-gateway/routing/InMemorySessionAffinityStore.d.ts +26 -0
- package/dist/api/ai-gateway/routing/InMemorySessionAffinityStore.js +67 -0
- package/dist/api/ai-gateway/routing/InMemorySessionAffinityStore.js.map +1 -0
- package/dist/api/ai-gateway/routing/ModelRouter.d.ts +84 -0
- package/dist/api/ai-gateway/routing/ModelRouter.js +274 -0
- package/dist/api/ai-gateway/routing/ModelRouter.js.map +1 -0
- package/dist/api/ai-gateway/routing/RedisSessionAffinityStore.d.ts +39 -0
- package/dist/api/ai-gateway/routing/RedisSessionAffinityStore.js +122 -0
- package/dist/api/ai-gateway/routing/RedisSessionAffinityStore.js.map +1 -0
- package/dist/api/ai-gateway/routing/SessionAffinityStore.d.ts +49 -0
- package/dist/api/ai-gateway/routing/SessionAffinityStore.js +66 -0
- package/dist/api/ai-gateway/routing/SessionAffinityStore.js.map +1 -0
- package/dist/api/ai-gateway/service-access/AiConnectionServiceAccess.d.ts +25 -0
- package/dist/api/ai-gateway/service-access/AiConnectionServiceAccess.js +50 -0
- package/dist/api/ai-gateway/service-access/AiConnectionServiceAccess.js.map +1 -0
- package/dist/api/ai-gateway/types.d.ts +112 -0
- package/dist/api/ai-gateway/types.js +305 -0
- package/dist/api/ai-gateway/types.js.map +1 -0
- package/dist/api/auth/AuthContext.d.ts +18 -3
- package/dist/api/auth/AuthContext.js +13 -2
- package/dist/api/auth/AuthContext.js.map +1 -1
- package/dist/api/auth/Authenticator.d.ts +3 -0
- package/dist/api/auth/Authenticator.js.map +1 -1
- package/dist/api/auth/ClientCredentialsAuthenticator.d.ts +2 -6
- package/dist/api/auth/ClientCredentialsAuthenticator.js +12 -30
- package/dist/api/auth/ClientCredentialsAuthenticator.js.map +1 -1
- package/dist/api/auth/SolidTokenAuthenticator.d.ts +2 -0
- package/dist/api/auth/SolidTokenAuthenticator.js +88 -2
- package/dist/api/auth/SolidTokenAuthenticator.js.map +1 -1
- package/dist/api/auth/TokenIdentity.d.ts +6 -0
- package/dist/api/auth/TokenIdentity.js +31 -0
- package/dist/api/auth/TokenIdentity.js.map +1 -0
- package/dist/api/chatkit/ai-provider.d.ts +9 -23
- package/dist/api/chatkit/ai-provider.js +30 -153
- package/dist/api/chatkit/ai-provider.js.map +1 -1
- package/dist/api/chatkit/default-agent.d.ts +24 -15
- package/dist/api/chatkit/default-agent.js +24 -83
- package/dist/api/chatkit/default-agent.js.map +1 -1
- package/dist/api/chatkit/index.d.ts +2 -1
- package/dist/api/chatkit/index.js +3 -1
- package/dist/api/chatkit/index.js.map +1 -1
- package/dist/api/chatkit/pod-store.d.ts +13 -1
- package/dist/api/chatkit/pod-store.js +127 -7
- package/dist/api/chatkit/pod-store.js.map +1 -1
- package/dist/api/chatkit/runtime/AcpAgentRuntime.d.ts +0 -1
- package/dist/api/chatkit/runtime/AcpAgentRuntime.js +14 -51
- package/dist/api/chatkit/runtime/AcpAgentRuntime.js.map +1 -1
- package/dist/api/chatkit/runtime/AcpRunner.js +2 -1
- package/dist/api/chatkit/runtime/AcpRunner.js.map +1 -1
- package/dist/api/chatkit/runtime/CodexRuntimeProjector.d.ts +15 -1
- package/dist/api/chatkit/runtime/CodexRuntimeProjector.js +52 -34
- package/dist/api/chatkit/runtime/CodexRuntimeProjector.js.map +1 -1
- package/dist/api/chatkit/service.d.ts +8 -1
- package/dist/api/chatkit/service.js +46 -5
- package/dist/api/chatkit/service.js.map +1 -1
- package/dist/api/chatkit/store.d.ts +23 -1
- package/dist/api/chatkit/store.js +56 -0
- package/dist/api/chatkit/store.js.map +1 -1
- package/dist/api/chatkit/types.d.ts +1 -0
- package/dist/api/chatkit/types.js.map +1 -1
- package/dist/api/container/common.js +286 -13
- package/dist/api/container/common.js.map +1 -1
- package/dist/api/container/index.js +126 -6
- package/dist/api/container/index.js.map +1 -1
- package/dist/api/container/local.js +50 -6
- package/dist/api/container/local.js.map +1 -1
- package/dist/api/container/rdf.d.ts +15 -0
- package/dist/api/container/rdf.js +90 -0
- package/dist/api/container/rdf.js.map +1 -0
- package/dist/api/container/routes.js +151 -11
- package/dist/api/container/routes.js.map +1 -1
- package/dist/api/container/types.d.ts +96 -0
- package/dist/api/container/types.js.map +1 -1
- package/dist/api/handlers/AdminHandler.d.ts +25 -2
- package/dist/api/handlers/AdminHandler.js +60 -10
- package/dist/api/handlers/AdminHandler.js.map +1 -1
- package/dist/api/handlers/AiClientConfigurationHandler.d.ts +7 -0
- package/dist/api/handlers/AiClientConfigurationHandler.js +202 -0
- package/dist/api/handlers/AiClientConfigurationHandler.js.map +1 -0
- package/dist/api/handlers/AiGatewayHandler.d.ts +23 -0
- package/dist/api/handlers/AiGatewayHandler.js +231 -0
- package/dist/api/handlers/AiGatewayHandler.js.map +1 -0
- package/dist/api/handlers/AiGatewayManagementHandler.d.ts +24 -0
- package/dist/api/handlers/AiGatewayManagementHandler.js +503 -0
- package/dist/api/handlers/AiGatewayManagementHandler.js.map +1 -0
- package/dist/api/handlers/ChatHandler.d.ts +11 -12
- package/dist/api/handlers/ChatHandler.js +12 -219
- package/dist/api/handlers/ChatHandler.js.map +1 -1
- package/dist/api/handlers/DashboardHandler.js +22 -116
- package/dist/api/handlers/DashboardHandler.js.map +1 -1
- package/dist/api/handlers/NetworkSettingsHandler.d.ts +97 -0
- package/dist/api/handlers/NetworkSettingsHandler.js +511 -0
- package/dist/api/handlers/NetworkSettingsHandler.js.map +1 -0
- package/dist/api/handlers/PodSettingsHandler.d.ts +79 -0
- package/dist/api/handlers/PodSettingsHandler.js +162 -0
- package/dist/api/handlers/PodSettingsHandler.js.map +1 -0
- package/dist/api/handlers/ProvisionHandler.d.ts +3 -1
- package/dist/api/handlers/ProvisionHandler.js +22 -87
- package/dist/api/handlers/ProvisionHandler.js.map +1 -1
- package/dist/api/handlers/RdfStatsHandler.d.ts +6 -0
- package/dist/api/handlers/RdfStatsHandler.js +85 -0
- package/dist/api/handlers/RdfStatsHandler.js.map +1 -0
- package/dist/api/handlers/SettingsHandler.d.ts +5 -0
- package/dist/api/handlers/SettingsHandler.js +13 -0
- package/dist/api/handlers/SettingsHandler.js.map +1 -0
- package/dist/api/handlers/StaticSpaHandler.d.ts +8 -0
- package/dist/api/handlers/StaticSpaHandler.js +102 -0
- package/dist/api/handlers/StaticSpaHandler.js.map +1 -0
- package/dist/api/handlers/index.d.ts +1 -0
- package/dist/api/handlers/index.js +1 -0
- package/dist/api/handlers/index.js.map +1 -1
- package/dist/api/http/readBoundedJsonBody.d.ts +14 -0
- package/dist/api/http/readBoundedJsonBody.js +58 -0
- package/dist/api/http/readBoundedJsonBody.js.map +1 -0
- package/dist/api/middleware/AuthMiddleware.d.ts +1 -0
- package/dist/api/middleware/AuthMiddleware.js +33 -4
- package/dist/api/middleware/AuthMiddleware.js.map +1 -1
- package/dist/api/runs/AgentRuntimeTypes.d.ts +18 -3
- package/dist/api/runs/AgentRuntimeTypes.js +61 -0
- package/dist/api/runs/AgentRuntimeTypes.js.map +1 -1
- package/dist/api/runs/InngestRunExecutionBackend.d.ts +28 -3
- package/dist/api/runs/InngestRunExecutionBackend.js +26 -3
- package/dist/api/runs/InngestRunExecutionBackend.js.map +1 -1
- package/dist/api/runs/ManagedRunWorker.d.ts +4 -1
- package/dist/api/runs/ManagedRunWorker.js +39 -8
- package/dist/api/runs/ManagedRunWorker.js.map +1 -1
- package/dist/api/runs/PiAgentRuntimeDriver.d.ts +5 -1
- package/dist/api/runs/PiAgentRuntimeDriver.js +94 -57
- package/dist/api/runs/PiAgentRuntimeDriver.js.map +1 -1
- package/dist/api/runs/RdfRunContextRetriever.d.ts +46 -0
- package/dist/api/runs/RdfRunContextRetriever.js +277 -0
- package/dist/api/runs/RdfRunContextRetriever.js.map +1 -0
- package/dist/api/runs/RunExecutionBackend.d.ts +38 -0
- package/dist/api/runs/RunExecutionBackend.js.map +1 -1
- package/dist/api/runs/RunStateCenter.d.ts +18 -3
- package/dist/api/runs/RunStateCenter.js +85 -24
- package/dist/api/runs/RunStateCenter.js.map +1 -1
- package/dist/api/runtime.js +163 -3
- package/dist/api/runtime.js.map +1 -1
- package/dist/api/service/AiClientConfigurationService.d.ts +97 -0
- package/dist/api/service/AiClientConfigurationService.js +379 -0
- package/dist/api/service/AiClientConfigurationService.js.map +1 -0
- package/dist/api/service/RdfBenchmarkReportCatalog.d.ts +86 -0
- package/dist/api/service/RdfBenchmarkReportCatalog.js +349 -0
- package/dist/api/service/RdfBenchmarkReportCatalog.js.map +1 -0
- package/dist/api/service/RdfBenchmarkReportGate.d.ts +78 -0
- package/dist/api/service/RdfBenchmarkReportGate.js +197 -0
- package/dist/api/service/RdfBenchmarkReportGate.js.map +1 -0
- package/dist/api/service/RdfSearchIndexingService.d.ts +113 -0
- package/dist/api/service/RdfSearchIndexingService.js +272 -0
- package/dist/api/service/RdfSearchIndexingService.js.map +1 -0
- package/dist/api/service/RdfSearchIndexingSolidFsSyncer.d.ts +27 -0
- package/dist/api/service/RdfSearchIndexingSolidFsSyncer.js +90 -0
- package/dist/api/service/RdfSearchIndexingSolidFsSyncer.js.map +1 -0
- package/dist/api/service/RdfStorageStatsService.d.ts +31 -0
- package/dist/api/service/RdfStorageStatsService.js +97 -0
- package/dist/api/service/RdfStorageStatsService.js.map +1 -0
- package/dist/api/service/VectorStoreService.d.ts +2 -0
- package/dist/api/service/VectorStoreService.js +70 -2
- package/dist/api/service/VectorStoreService.js.map +1 -1
- package/dist/api/service/VercelChatService.d.ts +27 -38
- package/dist/api/service/VercelChatService.js +153 -505
- package/dist/api/service/VercelChatService.js.map +1 -1
- package/dist/api/service/provider-http-transport.d.ts +21 -0
- package/dist/api/service/provider-http-transport.js +108 -2
- package/dist/api/service/provider-http-transport.js.map +1 -1
- package/dist/api/service/provider-registry.d.ts +5 -7
- package/dist/api/service/provider-registry.js +81 -64
- package/dist/api/service/provider-registry.js.map +1 -1
- package/dist/api/tasks/InngestTaskScheduler.d.ts +44 -4
- package/dist/api/tasks/TaskMaterializer.d.ts +10 -1
- package/dist/api/tasks/TaskMaterializer.js +39 -4
- package/dist/api/tasks/TaskMaterializer.js.map +1 -1
- package/dist/api/tasks/TaskService.d.ts +5 -1
- package/dist/api/tasks/TaskService.js +3 -0
- package/dist/api/tasks/TaskService.js.map +1 -1
- package/dist/cli/commands/rdf.d.ts +9 -0
- package/dist/cli/commands/rdf.js +66 -1
- package/dist/cli/commands/rdf.js.map +1 -1
- package/dist/cli/commands/start.js +3 -0
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/lib/solid-auth.d.ts +3 -3
- package/dist/cli/lib/solid-auth.js +4 -4
- package/dist/cli/lib/solid-auth.js.map +1 -1
- package/dist/components/components.jsonld +16 -0
- package/dist/components/context.jsonld +815 -28
- package/dist/document/Chunker.jsonld +110 -0
- package/dist/document/{DocumentParser.d.ts → DocumentReader.d.ts} +23 -11
- package/dist/document/{DocumentParser.js → DocumentReader.js} +2 -2
- package/dist/document/DocumentReader.js.map +1 -0
- package/dist/document/DocumentReader.jsonld +82 -0
- package/dist/document/HeadingChunker.jsonld +41 -0
- package/dist/document/{JinaDocumentParser.d.ts → JinaReader.d.ts} +7 -7
- package/dist/document/{JinaDocumentParser.js → JinaReader.js} +12 -12
- package/dist/document/JinaReader.js.map +1 -0
- package/dist/document/JinaReader.jsonld +133 -0
- package/dist/document/L0SourceSummary.d.ts +103 -0
- package/dist/document/L0SourceSummary.js +157 -0
- package/dist/document/L0SourceSummary.js.map +1 -0
- package/dist/document/L0SourceSummary.jsonld +326 -0
- package/dist/document/PaddleOcrReader.d.ts +40 -0
- package/dist/document/PaddleOcrReader.js +53 -0
- package/dist/document/PaddleOcrReader.js.map +1 -0
- package/dist/document/PaddleOcrReader.jsonld +234 -0
- package/dist/document/ReaderAiConfig.d.ts +50 -0
- package/dist/document/ReaderAiConfig.js +109 -0
- package/dist/document/ReaderAiConfig.js.map +1 -0
- package/dist/document/ReaderAiConfig.jsonld +185 -0
- package/dist/document/ReaderPolicy.d.ts +89 -0
- package/dist/document/ReaderPolicy.js +158 -0
- package/dist/document/ReaderPolicy.js.map +1 -0
- package/dist/document/ReaderPolicy.jsonld +218 -0
- package/dist/document/index.d.ts +6 -2
- package/dist/document/index.js +6 -2
- package/dist/document/index.js.map +1 -1
- package/dist/edge/DdnsManager.d.ts +1 -1
- package/dist/edge/DdnsManager.js.map +1 -1
- package/dist/edge/EdgeNodeAgent.d.ts +4 -0
- package/dist/edge/EdgeNodeAgent.js +6 -0
- package/dist/edge/EdgeNodeAgent.js.map +1 -1
- package/dist/edge/EdgeNodeAgent.jsonld +8 -0
- package/dist/edge/EdgeNodeAgentInitializer.d.ts +16 -0
- package/dist/edge/EdgeNodeAgentInitializer.js +51 -0
- package/dist/edge/EdgeNodeAgentInitializer.js.map +1 -1
- package/dist/edge/EdgeNodeAgentInitializer.jsonld +250 -0
- package/dist/edge/EdgeNodeCertificateCapabilityBridge.d.ts +34 -0
- package/dist/edge/EdgeNodeCertificateCapabilityBridge.js +111 -0
- package/dist/edge/EdgeNodeCertificateCapabilityBridge.js.map +1 -0
- package/dist/edge/acme/AcmeCertificateManager.d.ts +14 -1
- package/dist/edge/acme/AcmeCertificateManager.js +67 -7
- package/dist/edge/acme/AcmeCertificateManager.js.map +1 -1
- package/dist/edge/acme/AcmeCertificateManager.jsonld +22 -2
- package/dist/edge/acme/ClusterCertificateManager.d.ts +12 -0
- package/dist/edge/acme/ClusterCertificateManager.js +38 -0
- package/dist/edge/acme/ClusterCertificateManager.js.map +1 -1
- package/dist/extensions/ExtensionRuntime.d.ts +17 -0
- package/dist/extensions/ExtensionRuntime.js +171 -0
- package/dist/extensions/ExtensionRuntime.js.map +1 -0
- package/dist/extensions/PodCredentialResolver.d.ts +23 -0
- package/dist/extensions/PodCredentialResolver.js +139 -0
- package/dist/extensions/PodCredentialResolver.js.map +1 -0
- package/dist/extensions/index.d.ts +3 -0
- package/dist/extensions/index.js +20 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/types.d.ts +73 -0
- package/dist/extensions/types.js +3 -0
- package/dist/extensions/types.js.map +1 -0
- package/dist/http/SubgraphSparqlHttpHandler.d.ts +20 -1
- package/dist/http/SubgraphSparqlHttpHandler.js +324 -43
- package/dist/http/SubgraphSparqlHttpHandler.js.map +1 -1
- package/dist/http/SubgraphSparqlHttpHandler.jsonld +87 -0
- package/dist/identity/drizzle/EdgeNodeRepository.js +3 -2
- package/dist/identity/drizzle/EdgeNodeRepository.js.map +1 -1
- package/dist/identity/drizzle/schema.pg.js +1 -1
- package/dist/identity/drizzle/schema.pg.js.map +1 -1
- package/dist/identity/drizzle/schema.sqlite.js +1 -1
- package/dist/identity/drizzle/schema.sqlite.js.map +1 -1
- package/dist/identity/oidc/ScopedPickWebIdHandler.js +5 -5
- package/dist/identity/oidc/ScopedPickWebIdHandler.js.map +1 -1
- package/dist/index.d.ts +12 -2
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/main.js +3 -0
- package/dist/main.js.map +1 -1
- package/dist/provision/LocalProvisionState.d.ts +28 -0
- package/dist/provision/LocalProvisionState.js +124 -0
- package/dist/provision/LocalProvisionState.js.map +1 -0
- package/dist/provision/ProvisionCodeCodec.d.ts +7 -3
- package/dist/provision/ProvisionCodeCodec.js +10 -3
- package/dist/provision/ProvisionCodeCodec.js.map +1 -1
- package/dist/provision/ProvisionPodCreator.d.ts +15 -1
- package/dist/provision/ProvisionPodCreator.js +68 -1
- package/dist/provision/ProvisionPodCreator.js.map +1 -1
- package/dist/provision/ProvisionPodCreator.jsonld +31 -0
- package/dist/provision/ServiceAccessTokenCodec.d.ts +45 -0
- package/dist/provision/ServiceAccessTokenCodec.js +86 -0
- package/dist/provision/ServiceAccessTokenCodec.js.map +1 -0
- package/dist/runtime/GatewayAdminProxyAuth.d.ts +29 -0
- package/dist/runtime/GatewayAdminProxyAuth.js +108 -0
- package/dist/runtime/GatewayAdminProxyAuth.js.map +1 -0
- package/dist/runtime/Proxy.d.ts +10 -0
- package/dist/runtime/Proxy.js +64 -6
- package/dist/runtime/Proxy.js.map +1 -1
- package/dist/runtime/XpodRuntime.js +1 -0
- package/dist/runtime/XpodRuntime.js.map +1 -1
- package/dist/runtime/bootstrap.d.ts +1 -0
- package/dist/runtime/bootstrap.js +29 -0
- package/dist/runtime/bootstrap.js.map +1 -1
- package/dist/runtime/css-process.d.ts +1 -0
- package/dist/runtime/css-process.js +1 -0
- package/dist/runtime/css-process.js.map +1 -1
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +3 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/lifecycle.d.ts +3 -1
- package/dist/runtime/lifecycle.js +3 -1
- package/dist/runtime/lifecycle.js.map +1 -1
- package/dist/runtime/runner/node/NodeGatewayRuntimeRunner.js +2 -0
- package/dist/runtime/runner/node/NodeGatewayRuntimeRunner.js.map +1 -1
- package/dist/runtime/runner/types.d.ts +3 -0
- package/dist/runtime/runner/types.js.map +1 -1
- package/dist/runtime/runtime-types.d.ts +2 -0
- package/dist/runtime/runtime-types.js.map +1 -1
- package/dist/runtime/safe-env.d.ts +15 -0
- package/dist/runtime/safe-env.js +109 -0
- package/dist/runtime/safe-env.js.map +1 -0
- package/dist/security/index.d.ts +1 -0
- package/dist/security/index.js +18 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/secret-cell/DeploymentRootKeyProvider.d.ts +17 -0
- package/dist/security/secret-cell/DeploymentRootKeyProvider.js +61 -0
- package/dist/security/secret-cell/DeploymentRootKeyProvider.js.map +1 -0
- package/dist/security/secret-cell/DeploymentRootKeyProvider.jsonld +124 -0
- package/dist/security/secret-cell/SecretCellVault.d.ts +55 -0
- package/dist/security/secret-cell/SecretCellVault.js +242 -0
- package/dist/security/secret-cell/SecretCellVault.js.map +1 -0
- package/dist/security/secret-cell/SecretCellVault.jsonld +207 -0
- package/dist/security/secret-cell/index.d.ts +2 -0
- package/dist/security/secret-cell/index.js +11 -0
- package/dist/security/secret-cell/index.js.map +1 -0
- package/dist/solidfs/CompositeSolidFsSyncer.d.ts +18 -0
- package/dist/solidfs/CompositeSolidFsSyncer.js +32 -0
- package/dist/solidfs/CompositeSolidFsSyncer.js.map +1 -0
- package/dist/solidfs/LocalSolidFS.js +25 -1
- package/dist/solidfs/LocalSolidFS.js.map +1 -1
- package/dist/solidfs/RdfIndexSolidFsSyncer.d.ts +41 -2
- package/dist/solidfs/RdfIndexSolidFsSyncer.js +331 -21
- package/dist/solidfs/RdfIndexSolidFsSyncer.js.map +1 -1
- package/dist/solidfs/SolidFsMetaNotes.d.ts +25 -0
- package/dist/solidfs/SolidFsMetaNotes.js +103 -0
- package/dist/solidfs/SolidFsMetaNotes.js.map +1 -0
- package/dist/solidfs/SolidFsSyncJournal.d.ts +2 -2
- package/dist/solidfs/SolidFsSyncJournal.js +9 -4
- package/dist/solidfs/SolidFsSyncJournal.js.map +1 -1
- package/dist/solidfs/SolidFsSyncJournal.jsonld +119 -0
- package/dist/solidfs/WorkspacePrompt.d.ts +13 -0
- package/dist/solidfs/WorkspacePrompt.js +42 -0
- package/dist/solidfs/WorkspacePrompt.js.map +1 -0
- package/dist/solidfs/index.d.ts +3 -0
- package/dist/solidfs/index.js +3 -0
- package/dist/solidfs/index.js.map +1 -1
- package/dist/solidfs/types.d.ts +12 -2
- package/dist/solidfs/types.js.map +1 -1
- package/dist/storage/accessors/MixDataAccessor.d.ts +36 -4
- package/dist/storage/accessors/MixDataAccessor.js +222 -23
- package/dist/storage/accessors/MixDataAccessor.js.map +1 -1
- package/dist/storage/accessors/MixDataAccessor.jsonld +89 -0
- package/dist/storage/accessors/SolidRdfDataAccessor.d.ts +6 -1
- package/dist/storage/accessors/SolidRdfDataAccessor.js +35 -0
- package/dist/storage/accessors/SolidRdfDataAccessor.js.map +1 -1
- package/dist/storage/accessors/SolidRdfDataAccessor.jsonld +20 -0
- package/dist/storage/database/PostgresPoolManager.d.ts +1 -0
- package/dist/storage/database/PostgresPoolManager.js +2 -2
- package/dist/storage/database/PostgresPoolManager.js.map +1 -1
- package/dist/storage/locking/UrlAwareRedisLocker.d.ts +2 -0
- package/dist/storage/locking/UrlAwareRedisLocker.js +65 -0
- package/dist/storage/locking/UrlAwareRedisLocker.js.map +1 -1
- package/dist/storage/locking/UrlAwareRedisLocker.jsonld +19 -0
- package/dist/storage/rdf/PostgresRdfEngine.d.ts +286 -9
- package/dist/storage/rdf/PostgresRdfEngine.js +10773 -2084
- package/dist/storage/rdf/PostgresRdfEngine.js.map +1 -1
- package/dist/storage/rdf/PostgresRdfEngine.jsonld +1693 -89
- package/dist/storage/rdf/PostgresRdfSqlExecutor.d.ts +24 -0
- package/dist/storage/rdf/PostgresRdfSqlExecutor.js +131 -0
- package/dist/storage/rdf/PostgresRdfSqlExecutor.js.map +1 -0
- package/dist/storage/rdf/PostgresRdfTextIndex.d.ts +54 -0
- package/dist/storage/rdf/PostgresRdfTextIndex.js +1255 -0
- package/dist/storage/rdf/PostgresRdfTextIndex.js.map +1 -0
- package/dist/storage/rdf/PostgresRdfTextIndex.jsonld +487 -0
- package/dist/storage/rdf/PostgresRdfVectorIndex.d.ts +46 -0
- package/dist/storage/rdf/PostgresRdfVectorIndex.js +1165 -0
- package/dist/storage/rdf/PostgresRdfVectorIndex.js.map +1 -0
- package/dist/storage/rdf/PostgresRdfVectorIndex.jsonld +423 -0
- package/dist/storage/rdf/Rdf3xIndex.d.ts +14 -1
- package/dist/storage/rdf/Rdf3xIndex.js +286 -2
- package/dist/storage/rdf/Rdf3xIndex.js.map +1 -1
- package/dist/storage/rdf/Rdf3xIndex.jsonld +36 -0
- package/dist/storage/rdf/Rdf3xSchema.d.ts +5 -1
- package/dist/storage/rdf/Rdf3xSchema.js +17 -3
- package/dist/storage/rdf/Rdf3xSchema.js.map +1 -1
- package/dist/storage/rdf/RdfAccessScope.d.ts +22 -0
- package/dist/storage/rdf/RdfAccessScope.js +345 -0
- package/dist/storage/rdf/RdfAccessScope.js.map +1 -0
- package/dist/storage/rdf/RdfAccessScope.jsonld +45 -0
- package/dist/storage/rdf/RdfFusionRankPlan.d.ts +2 -0
- package/dist/storage/rdf/RdfFusionRankPlan.js +186 -0
- package/dist/storage/rdf/RdfFusionRankPlan.js.map +1 -0
- package/dist/storage/rdf/RdfJoinShape.d.ts +8 -0
- package/dist/storage/rdf/RdfJoinShape.js +31 -0
- package/dist/storage/rdf/RdfJoinShape.js.map +1 -0
- package/dist/storage/rdf/RdfQuadIndex.d.ts +5 -2
- package/dist/storage/rdf/RdfQuadIndex.js +94 -6
- package/dist/storage/rdf/RdfQuadIndex.js.map +1 -1
- package/dist/storage/rdf/RdfQuadIndex.jsonld +12 -0
- package/dist/storage/rdf/RdfQueryExecutor.d.ts +3 -4
- package/dist/storage/rdf/RdfQueryExecutor.js +235 -8
- package/dist/storage/rdf/RdfQueryExecutor.js.map +1 -1
- package/dist/storage/rdf/RdfSearchSourceFilter.d.ts +10 -0
- package/dist/storage/rdf/RdfSearchSourceFilter.js +83 -0
- package/dist/storage/rdf/RdfSearchSourceFilter.js.map +1 -0
- package/dist/storage/rdf/RdfSparqlAdapter.d.ts +27 -1
- package/dist/storage/rdf/RdfSparqlAdapter.js +265 -3
- package/dist/storage/rdf/RdfSparqlAdapter.js.map +1 -1
- package/dist/storage/rdf/RdfSparqlAdapter.jsonld +8 -0
- package/dist/storage/rdf/RdfTermDictionary.d.ts +7 -1
- package/dist/storage/rdf/RdfTermDictionary.js +139 -0
- package/dist/storage/rdf/RdfTermDictionary.js.map +1 -1
- package/dist/storage/rdf/RdfTermDictionary.jsonld +4 -0
- package/dist/storage/rdf/RdfTextIndex.d.ts +45 -2
- package/dist/storage/rdf/RdfTextIndex.js +810 -114
- package/dist/storage/rdf/RdfTextIndex.js.map +1 -1
- package/dist/storage/rdf/RdfTextIndex.jsonld +193 -0
- package/dist/storage/rdf/RdfTextProjection.d.ts +10 -0
- package/dist/storage/rdf/RdfTextProjection.js +258 -0
- package/dist/storage/rdf/RdfTextProjection.js.map +1 -0
- package/dist/storage/rdf/RdfVectorIndex.d.ts +30 -2
- package/dist/storage/rdf/RdfVectorIndex.js +461 -38
- package/dist/storage/rdf/RdfVectorIndex.js.map +1 -1
- package/dist/storage/rdf/RdfVectorIndex.jsonld +163 -0
- package/dist/storage/rdf/SolidRdfEngine.d.ts +12 -9
- package/dist/storage/rdf/SolidRdfEngine.js +48 -22
- package/dist/storage/rdf/SolidRdfEngine.js.map +1 -1
- package/dist/storage/rdf/SolidRdfEngine.jsonld +33 -43
- package/dist/storage/rdf/SolidRdfSparqlEngine.d.ts +19 -8
- package/dist/storage/rdf/SolidRdfSparqlEngine.js +674 -44
- package/dist/storage/rdf/SolidRdfSparqlEngine.js.map +1 -1
- package/dist/storage/rdf/SolidRdfSparqlEngine.jsonld +51 -0
- package/dist/storage/rdf/index.d.ts +9 -5
- package/dist/storage/rdf/index.js +42 -1
- package/dist/storage/rdf/index.js.map +1 -1
- package/dist/storage/rdf/models-benchmark.d.ts +264 -2
- package/dist/storage/rdf/models-benchmark.js +4207 -155
- package/dist/storage/rdf/models-benchmark.js.map +1 -1
- package/dist/storage/rdf/types.d.ts +833 -4
- package/dist/storage/rdf/types.js.map +1 -1
- package/dist/storage/rdf/types.jsonld +348 -0
- package/dist/storage/sparql/CompatibilitySparqlEngine.d.ts +14 -13
- package/dist/storage/sparql/CompatibilitySparqlEngine.js +24 -24
- package/dist/storage/sparql/CompatibilitySparqlEngine.js.map +1 -1
- package/dist/storage/sparql/CompatibilitySparqlEngineImpl.d.ts +14 -13
- package/dist/storage/sparql/CompatibilitySparqlEngineImpl.js +30 -18
- package/dist/storage/sparql/CompatibilitySparqlEngineImpl.js.map +1 -1
- package/dist/storage/sparql/SubgraphQueryEngine.d.ts +21 -12
- package/dist/storage/sparql/SubgraphQueryEngine.js +12 -12
- package/dist/storage/sparql/SubgraphQueryEngine.js.map +1 -1
- package/dist/terminal/sandbox/MacOSSandbox.js +2 -1
- package/dist/terminal/sandbox/MacOSSandbox.js.map +1 -1
- package/dist/terminal/sandbox/index.js +2 -1
- package/dist/terminal/sandbox/index.js.map +1 -1
- package/dist/test-utils/no-auth-xpod.js +3 -0
- package/dist/test-utils/no-auth-xpod.js.map +1 -1
- package/dist/tunnel/LocalTunnelProvider.d.ts +3 -0
- package/dist/tunnel/LocalTunnelProvider.js +17 -1
- package/dist/tunnel/LocalTunnelProvider.js.map +1 -1
- package/dist/tunnel/LocalTunnelProvider.jsonld +23 -0
- package/dist/tunnel/SakuraFrpTunnelProvider.d.ts +3 -0
- package/dist/tunnel/SakuraFrpTunnelProvider.js +18 -2
- package/dist/tunnel/SakuraFrpTunnelProvider.js.map +1 -1
- package/dist/tunnel/TunnelProfiles.d.ts +22 -0
- package/dist/tunnel/TunnelProfiles.js +208 -0
- package/dist/tunnel/TunnelProfiles.js.map +1 -0
- package/dist/tunnel/index.d.ts +2 -0
- package/dist/tunnel/index.js +4 -1
- package/dist/tunnel/index.js.map +1 -1
- package/dist/util/identifiers/ClusterIdentifierStrategy.d.ts +3 -0
- package/dist/util/identifiers/ClusterIdentifierStrategy.js +18 -2
- package/dist/util/identifiers/ClusterIdentifierStrategy.js.map +1 -1
- package/dist/util/identifiers/ClusterIdentifierStrategy.jsonld +5 -1
- package/node_modules/@undefineds.co/ai-connection/dist/AiClientConfigurationSection.d.ts +55 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiClientConfigurationSection.js +167 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionHeader.d.ts +3 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionHeader.js +8 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionList.d.ts +4 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionList.js +36 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionMain.d.ts +4 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionMain.js +37 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionMainHeader.d.ts +3 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionMainHeader.js +7 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionPanel.d.ts +14 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionPanel.js +333 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiProviderCard.d.ts +22 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiProviderCard.js +43 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiQuotaCard.d.ts +8 -0
- package/node_modules/@undefineds.co/ai-connection/dist/AiQuotaCard.js +6 -0
- package/node_modules/@undefineds.co/ai-connection/dist/ai-connection-client.d.ts +120 -0
- package/node_modules/@undefineds.co/ai-connection/dist/ai-connection-client.js +414 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/base-adapter.d.ts +32 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/base-adapter.js +212 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/codex.d.ts +14 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/codex.js +90 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/index.cjs +668 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/index.d.ts +6 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/index.js +6 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/json-env-adapter.d.ts +21 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/json-env-adapter.js +82 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/pi.d.ts +13 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/pi.js +83 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/transaction.d.ts +17 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/transaction.js +153 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/types.d.ts +40 -0
- package/node_modules/@undefineds.co/ai-connection/dist/client-config/types.js +1 -0
- package/node_modules/@undefineds.co/ai-connection/dist/controller.d.ts +42 -0
- package/node_modules/@undefineds.co/ai-connection/dist/controller.js +289 -0
- package/node_modules/@undefineds.co/ai-connection/dist/index.d.ts +16 -0
- package/node_modules/@undefineds.co/ai-connection/dist/index.js +41 -0
- package/node_modules/@undefineds.co/ai-connection/dist/manifest.d.ts +1 -0
- package/node_modules/@undefineds.co/ai-connection/dist/manifest.js +18 -0
- package/node_modules/@undefineds.co/ai-connection/dist/service-access.d.ts +3 -0
- package/node_modules/@undefineds.co/ai-connection/dist/service-access.js +133 -0
- package/node_modules/@undefineds.co/ai-connection/package.json +50 -0
- package/node_modules/@undefineds.co/extension-sdk/README.md +299 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/index.d.ts +5 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/index.js +5 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/layout.d.ts +16 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/layout.js +36 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/manifest.d.ts +27 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/manifest.js +79 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/react/app-layout.d.ts +7 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/react/app-layout.js +8 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/react/auth-boundary.d.ts +27 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/react/auth-boundary.js +49 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/react/layout-context.d.ts +11 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/react/layout-context.js +9 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/react/workspace-layout.d.ts +38 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/react/workspace-layout.js +132 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/react.d.ts +12 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/react.js +19 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/testing.d.ts +7 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/testing.js +27 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/web.d.ts +225 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/web.js +142 -0
- package/node_modules/@undefineds.co/extension-sdk/package.json +49 -0
- package/node_modules/@undefineds.co/extensions/README.md +101 -0
- package/node_modules/@undefineds.co/extensions/dist/adapters/langchain.d.ts +25 -0
- package/node_modules/@undefineds.co/extensions/dist/adapters/langchain.d.ts.map +1 -0
- package/node_modules/@undefineds.co/extensions/dist/adapters/langchain.js +45 -0
- package/node_modules/@undefineds.co/extensions/dist/adapters/langchain.js.map +1 -0
- package/node_modules/@undefineds.co/extensions/dist/adapters/llamaindex.d.ts +31 -0
- package/node_modules/@undefineds.co/extensions/dist/adapters/llamaindex.d.ts.map +1 -0
- package/node_modules/@undefineds.co/extensions/dist/adapters/llamaindex.js +50 -0
- package/node_modules/@undefineds.co/extensions/dist/adapters/llamaindex.js.map +1 -0
- package/node_modules/@undefineds.co/extensions/dist/index.d.ts +7 -0
- package/node_modules/@undefineds.co/extensions/dist/index.d.ts.map +1 -0
- package/node_modules/@undefineds.co/extensions/dist/index.js +7 -0
- package/node_modules/@undefineds.co/extensions/dist/index.js.map +1 -0
- package/node_modules/@undefineds.co/extensions/dist/paddleocr.d.ts +16 -0
- package/node_modules/@undefineds.co/extensions/dist/paddleocr.d.ts.map +1 -0
- package/node_modules/@undefineds.co/extensions/dist/paddleocr.js +267 -0
- package/node_modules/@undefineds.co/extensions/dist/paddleocr.js.map +1 -0
- package/node_modules/@undefineds.co/extensions/dist/reader.d.ts +18 -0
- package/node_modules/@undefineds.co/extensions/dist/reader.d.ts.map +1 -0
- package/node_modules/@undefineds.co/extensions/dist/reader.js +39 -0
- package/node_modules/@undefineds.co/extensions/dist/reader.js.map +1 -0
- package/node_modules/@undefineds.co/extensions/dist/registry.d.ts +16 -0
- package/node_modules/@undefineds.co/extensions/dist/registry.d.ts.map +1 -0
- package/node_modules/@undefineds.co/extensions/dist/registry.js +97 -0
- package/node_modules/@undefineds.co/extensions/dist/registry.js.map +1 -0
- package/node_modules/@undefineds.co/extensions/dist/types.d.ts +141 -0
- package/node_modules/@undefineds.co/extensions/dist/types.d.ts.map +1 -0
- package/node_modules/@undefineds.co/extensions/dist/types.js +2 -0
- package/node_modules/@undefineds.co/extensions/dist/types.js.map +1 -0
- package/node_modules/@undefineds.co/extensions/package.json +38 -0
- package/node_modules/@undefineds.co/shared-ui/dist/badge.d.ts +8 -0
- package/node_modules/@undefineds.co/shared-ui/dist/badge.js +17 -0
- package/node_modules/@undefineds.co/shared-ui/dist/button.d.ts +10 -0
- package/node_modules/@undefineds.co/shared-ui/dist/button.js +30 -0
- package/node_modules/@undefineds.co/shared-ui/dist/card.d.ts +7 -0
- package/node_modules/@undefineds.co/shared-ui/dist/card.js +15 -0
- package/node_modules/@undefineds.co/shared-ui/dist/index.d.ts +6 -0
- package/node_modules/@undefineds.co/shared-ui/dist/index.js +6 -0
- package/node_modules/@undefineds.co/shared-ui/dist/input.d.ts +4 -0
- package/node_modules/@undefineds.co/shared-ui/dist/input.js +5 -0
- package/node_modules/@undefineds.co/shared-ui/dist/theme.css +121 -0
- package/node_modules/@undefineds.co/shared-ui/dist/utils.d.ts +2 -0
- package/node_modules/@undefineds.co/shared-ui/dist/utils.js +5 -0
- package/node_modules/@undefineds.co/shared-ui/dist/workspace.d.ts +23 -0
- package/node_modules/@undefineds.co/shared-ui/dist/workspace.js +38 -0
- package/node_modules/@undefineds.co/shared-ui/package.json +39 -0
- package/node_modules/@undefineds.co/solid-sdk/dist/index.d.ts +3 -0
- package/node_modules/@undefineds.co/solid-sdk/dist/index.js +3 -0
- package/node_modules/@undefineds.co/solid-sdk/dist/pod-runtime.d.ts +45 -0
- package/node_modules/@undefineds.co/solid-sdk/dist/pod-runtime.js +147 -0
- package/node_modules/@undefineds.co/solid-sdk/dist/react.d.ts +15 -0
- package/node_modules/@undefineds.co/solid-sdk/dist/react.js +15 -0
- package/node_modules/@undefineds.co/solid-sdk/dist/session.d.ts +42 -0
- package/node_modules/@undefineds.co/solid-sdk/dist/session.js +127 -0
- package/node_modules/@undefineds.co/solid-sdk/package.json +45 -0
- package/package.json +31 -13
- package/static/app/assets/index-BoYHJ6si.js +230 -0
- package/static/app/assets/inrupt-smoke.js +2 -2
- package/static/app/assets/main.css +1 -1
- package/static/app/assets/main.js +9 -9
- package/static/dashboard/assets/NetworkPage-Brt79fuQ.js +2 -0
- package/static/dashboard/assets/PaneListHeader-57nvMwH6.js +1 -0
- package/static/dashboard/assets/PodPage-CM6do1vB.js +2 -0
- package/static/dashboard/assets/ServicesPage-BUNxGJRz.js +1 -0
- package/static/dashboard/assets/card-B9Zjf_2p.js +1 -0
- package/static/dashboard/assets/dashboard-8C6o666W.js +305 -0
- package/static/dashboard/assets/dashboard-CSdewNeA.css +1 -0
- package/static/dashboard/assets/database-DPh9wDY9.js +1 -0
- package/static/dashboard/assets/external-link-VbMQvVMz.js +1 -0
- package/static/dashboard/assets/index-RfiFckzb.js +51 -0
- package/static/dashboard/assets/refresh-cw-BxVxNxNr.js +1 -0
- package/static/dashboard/assets/services-status-context-DKmJ7ISr.js +1 -0
- package/static/dashboard/dashboard.html +2 -2
- package/static/settings/assets/ModelsPage-D_IH7AH3.js +1 -0
- package/static/settings/assets/PaneListHeader-Bgaze006.js +1 -0
- package/static/settings/assets/PodPage-Cy1VNObw.js +2 -0
- package/static/settings/assets/ServicesPage-BsFaxVWC.js +1 -0
- package/static/settings/assets/SettingsPage-UafNWE_p.js +48 -0
- package/static/settings/assets/card-B_bXSIn-.js +1 -0
- package/static/settings/assets/services-status-context-DiX-AbrP.js +1 -0
- package/static/settings/assets/settings-B30oMfZq.js +305 -0
- package/static/settings/assets/settings-CSdewNeA.css +1 -0
- package/static/settings/assets/workspace-layout-Dv1Yn9Ci.js +1 -0
- package/static/settings/auth.html +21 -0
- package/static/settings/reachability.html +221 -0
- package/static/settings/reachability.svg +7 -0
- package/static/settings/reachability.webmanifest +18 -0
- package/static/settings/settings.html +13 -0
- package/static/settings/signal-pod.html +293 -0
- package/static/settings/vite.svg +1 -0
- package/dist/api/service/ai-gateway-transport.d.ts +0 -25
- package/dist/api/service/ai-gateway-transport.js +0 -136
- package/dist/api/service/ai-gateway-transport.js.map +0 -1
- package/dist/api/service/chat-protocol-adapters.d.ts +0 -5
- package/dist/api/service/chat-protocol-adapters.js +0 -146
- package/dist/api/service/chat-protocol-adapters.js.map +0 -1
- package/dist/api/service/chat-routing.d.ts +0 -8
- package/dist/api/service/chat-routing.js +0 -16
- package/dist/api/service/chat-routing.js.map +0 -1
- package/dist/api/service/platform-ai-config.d.ts +0 -10
- package/dist/api/service/platform-ai-config.js +0 -76
- package/dist/api/service/platform-ai-config.js.map +0 -1
- package/dist/document/DocumentParser.js.map +0 -1
- package/dist/document/JinaDocumentParser.js.map +0 -1
- package/static/app/assets/index-C1yksyT4.js +0 -171
- package/static/dashboard/assets/dashboard-BssaVKTn.css +0 -1
- package/static/dashboard/assets/dashboard-Ckuadl3C.js +0 -54
|
@@ -16,7 +16,7 @@ const UsageRepository_1 = require("../storage/quota/UsageRepository");
|
|
|
16
16
|
const BandwidthThrottleTransform_1 = require("../util/stream/BandwidthThrottleTransform");
|
|
17
17
|
const ALLOWED_METHODS = ['GET', 'POST', 'OPTIONS'];
|
|
18
18
|
class SubgraphSparqlHttpHandler extends community_server_1.HttpHandler {
|
|
19
|
-
constructor(queryEngine, credentialsExtractor, permissionReader, authorizer, options = {}) {
|
|
19
|
+
constructor(queryEngine, credentialsExtractor, permissionReader, authorizer, options = {}, updateAuthority) {
|
|
20
20
|
super();
|
|
21
21
|
this.logger = (0, global_logger_factory_1.getLoggerFor)(this);
|
|
22
22
|
this.generator = new sparqljs_1.Generator();
|
|
@@ -26,6 +26,7 @@ class SubgraphSparqlHttpHandler extends community_server_1.HttpHandler {
|
|
|
26
26
|
this.authorizer = authorizer;
|
|
27
27
|
this.sidecarPath = options.sidecarPath ?? '/-/sparql';
|
|
28
28
|
this.defaultBandwidthLimit = this.normalizeLimit(options.defaultAccountBandwidthLimitBps);
|
|
29
|
+
this.updateAuthority = updateAuthority;
|
|
29
30
|
// Identity DB is used for pod lookup (to resolve accountId/podId from URL)
|
|
30
31
|
if (options.identityDbUrl) {
|
|
31
32
|
const db = (0, db_1.getIdentityDatabase)(options.identityDbUrl);
|
|
@@ -97,17 +98,48 @@ class SubgraphSparqlHttpHandler extends community_server_1.HttpHandler {
|
|
|
97
98
|
const errorName = error.name || error.constructor.name || 'HttpError';
|
|
98
99
|
const errorMessage = error.message || 'No message';
|
|
99
100
|
this.logger.error(`SPARQL sidecar error ${error.statusCode} (${this.getRequestId(request)}): ${errorName} - ${errorMessage}`);
|
|
100
|
-
this.sendErrorResponse(response, error.statusCode, errorMessage
|
|
101
|
+
this.sendErrorResponse(request, response, error.statusCode, errorMessage, {
|
|
102
|
+
error: {
|
|
103
|
+
code: `http.${error.statusCode}`,
|
|
104
|
+
message: errorMessage,
|
|
105
|
+
},
|
|
106
|
+
});
|
|
101
107
|
return;
|
|
102
108
|
}
|
|
103
109
|
if (error instanceof RdfSparqlAdapter_1.DisabledSparqlFeatureError) {
|
|
104
110
|
this.logger.warn(`SPARQL sidecar disabled feature (${this.getRequestId(request)}): ${error.message}`);
|
|
105
|
-
this.sendErrorResponse(response, 403, error.message
|
|
111
|
+
this.sendErrorResponse(request, response, 403, error.message, {
|
|
112
|
+
error: {
|
|
113
|
+
code: 'rdf.sparql.disabled_feature',
|
|
114
|
+
message: error.message,
|
|
115
|
+
capability: 'sparql.federation.service',
|
|
116
|
+
hint: 'Disable SERVICE federation for server-owned Pod queries, or execute it from a trusted client-side/federated query layer.',
|
|
117
|
+
correction: (0, RdfSparqlAdapter_1.sparqlCorrectionForCapability)('sparql.federation.service'),
|
|
118
|
+
},
|
|
119
|
+
});
|
|
106
120
|
return;
|
|
107
121
|
}
|
|
108
122
|
if (error instanceof RdfSparqlAdapter_1.UnsupportedSparqlQueryError) {
|
|
109
123
|
this.logger.warn(`SPARQL sidecar unsupported query (${this.getRequestId(request)}): ${error.message}`);
|
|
110
|
-
this.sendErrorResponse(response, 400, error.message
|
|
124
|
+
this.sendErrorResponse(request, response, 400, error.message, {
|
|
125
|
+
error: {
|
|
126
|
+
code: error.code,
|
|
127
|
+
message: error.message,
|
|
128
|
+
capability: error.capability,
|
|
129
|
+
hint: error.hint,
|
|
130
|
+
correction: error.correction,
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (error instanceof RdfSparqlAdapter_1.NativeSparqlExecutionError) {
|
|
136
|
+
this.logger.error(`SPARQL sidecar native execution error (${this.getRequestId(request)}): ${error.message}`);
|
|
137
|
+
this.sendErrorResponse(request, response, 500, error.message, {
|
|
138
|
+
error: {
|
|
139
|
+
code: error.code,
|
|
140
|
+
message: error.message,
|
|
141
|
+
},
|
|
142
|
+
});
|
|
111
143
|
return;
|
|
112
144
|
}
|
|
113
145
|
// Re-throw unknown errors for CSS error handling
|
|
@@ -115,18 +147,28 @@ class SubgraphSparqlHttpHandler extends community_server_1.HttpHandler {
|
|
|
115
147
|
throw error;
|
|
116
148
|
}
|
|
117
149
|
}
|
|
118
|
-
sendErrorResponse(response, statusCode, message) {
|
|
150
|
+
sendErrorResponse(request, response, statusCode, message, jsonPayload) {
|
|
119
151
|
response.statusCode = statusCode;
|
|
152
|
+
if (this.acceptsJson(request)) {
|
|
153
|
+
response.setHeader('Content-Type', 'application/json; charset=utf-8');
|
|
154
|
+
response.end(JSON.stringify(jsonPayload));
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
120
157
|
response.setHeader('Content-Type', 'text/plain; charset=utf-8');
|
|
121
158
|
response.end(message);
|
|
122
159
|
}
|
|
160
|
+
acceptsJson(request) {
|
|
161
|
+
const accept = request.headers.accept;
|
|
162
|
+
const values = Array.isArray(accept) ? accept : [accept];
|
|
163
|
+
return values.some(value => typeof value === 'string' && /\bapplication\/json\b/i.test(value));
|
|
164
|
+
}
|
|
123
165
|
async executeSelect(request, { query, basePath, baseUrl }, response, context) {
|
|
124
|
-
await this.
|
|
166
|
+
const accessScope = await this.resolveReadAccessScope(baseUrl, request);
|
|
125
167
|
let vars = [];
|
|
126
168
|
const results = [];
|
|
127
169
|
const seenVars = new Set();
|
|
128
170
|
try {
|
|
129
|
-
const bindingsStream = await this.engine.queryBindings(query, baseUrl);
|
|
171
|
+
const bindingsStream = await this.engine.queryBindings(query, baseUrl, accessScope);
|
|
130
172
|
const metadata = typeof bindingsStream.metadata === 'function' ? await bindingsStream.metadata() : undefined;
|
|
131
173
|
vars = metadata?.variables?.map((variable) => variable.value) ?? [];
|
|
132
174
|
for await (const binding of bindingsStream) {
|
|
@@ -167,8 +209,8 @@ class SubgraphSparqlHttpHandler extends community_server_1.HttpHandler {
|
|
|
167
209
|
await this.sendPayload(response, JSON.stringify(payload), 'application/sparql-results+json; charset=utf-8', context);
|
|
168
210
|
}
|
|
169
211
|
async executeAsk(request, { query, basePath, baseUrl }, response, context) {
|
|
170
|
-
await this.
|
|
171
|
-
const result = await this.engine.queryBoolean(query, baseUrl);
|
|
212
|
+
const accessScope = await this.resolveReadAccessScope(baseUrl, request);
|
|
213
|
+
const result = await this.engine.queryBoolean(query, baseUrl, accessScope);
|
|
172
214
|
const payload = {
|
|
173
215
|
head: {},
|
|
174
216
|
boolean: result,
|
|
@@ -176,8 +218,8 @@ class SubgraphSparqlHttpHandler extends community_server_1.HttpHandler {
|
|
|
176
218
|
await this.sendPayload(response, JSON.stringify(payload), 'application/sparql-results+json; charset=utf-8', context);
|
|
177
219
|
}
|
|
178
220
|
async executeConstruct(request, { query, basePath, baseUrl }, response, context) {
|
|
179
|
-
await this.
|
|
180
|
-
const quadStream = await this.engine.queryQuads(query, baseUrl);
|
|
221
|
+
const accessScope = await this.resolveReadAccessScope(baseUrl, request);
|
|
222
|
+
const quadStream = await this.engine.queryQuads(query, baseUrl, accessScope);
|
|
181
223
|
const writer = new n3_1.Writer({ format: 'N-Quads' });
|
|
182
224
|
for await (const quad of quadStream) {
|
|
183
225
|
writer.addQuad(quad);
|
|
@@ -198,18 +240,67 @@ class SubgraphSparqlHttpHandler extends community_server_1.HttpHandler {
|
|
|
198
240
|
if (queryRequest.method !== 'POST') {
|
|
199
241
|
throw new community_server_2.MethodNotAllowedHttpError(['POST']);
|
|
200
242
|
}
|
|
201
|
-
const
|
|
243
|
+
const accessPlan = this.inspectUpdateGraphs(parsed, queryRequest.baseUrl);
|
|
202
244
|
const modes = [];
|
|
203
|
-
if (
|
|
245
|
+
if (accessPlan.needsReadScope) {
|
|
246
|
+
modes.push(policy_engine_1.PERMISSIONS.Read);
|
|
247
|
+
}
|
|
248
|
+
if (accessPlan.hasInsert) {
|
|
204
249
|
modes.push(policy_engine_1.PERMISSIONS.Append);
|
|
205
250
|
}
|
|
206
|
-
if (hasDelete) {
|
|
251
|
+
if (accessPlan.hasDelete) {
|
|
207
252
|
modes.push(policy_engine_1.PERMISSIONS.Delete);
|
|
208
253
|
}
|
|
209
|
-
await this.authorizeFor(queryRequest.baseUrl, request, modes);
|
|
210
|
-
const
|
|
254
|
+
const credentials = await this.authorizeFor(queryRequest.baseUrl, request, modes);
|
|
255
|
+
for (const source of accessPlan.readTargets) {
|
|
256
|
+
if (source === queryRequest.baseUrl) {
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
await this.authorizeIdentifier(source, credentials, [policy_engine_1.PERMISSIONS.Read]);
|
|
260
|
+
}
|
|
261
|
+
for (const [graph, graphModes] of accessPlan.writeTargets) {
|
|
262
|
+
const resourceUrl = this.resourceUrlForGraphValue(graph);
|
|
263
|
+
if (resourceUrl === queryRequest.baseUrl) {
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
await this.authorizeIdentifier(resourceUrl, credentials, [...graphModes]);
|
|
267
|
+
}
|
|
268
|
+
const readAccessScope = accessPlan.needsReadScope
|
|
269
|
+
? await this.resolveReadAccessScopeForCredentials(queryRequest.baseUrl, credentials)
|
|
270
|
+
: undefined;
|
|
271
|
+
const loadDocumentPlan = accessPlan.loadDocuments[0];
|
|
272
|
+
const clearGraph = accessPlan.clearGraphs[0];
|
|
273
|
+
const graphCopyPlan = accessPlan.graphCopies[0];
|
|
274
|
+
let nativeOptions;
|
|
275
|
+
if (loadDocumentPlan) {
|
|
276
|
+
try {
|
|
277
|
+
nativeOptions = { loadDocument: await this.readLoadDocument(loadDocumentPlan, queryRequest.baseUrl, readAccessScope) };
|
|
278
|
+
}
|
|
279
|
+
catch (error) {
|
|
280
|
+
if (!loadDocumentPlan.silent) {
|
|
281
|
+
throw error;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
const rewritten = loadDocumentPlan
|
|
286
|
+
? this.updateAuthority && nativeOptions?.loadDocument
|
|
287
|
+
? this.rewriteLoadedDocumentUpdate(loadDocumentPlan, nativeOptions.loadDocument)
|
|
288
|
+
: this.rewriteLoadUpdate(loadDocumentPlan)
|
|
289
|
+
: clearGraph
|
|
290
|
+
? this.rewriteClearGraphUpdate(clearGraph)
|
|
291
|
+
: graphCopyPlan
|
|
292
|
+
? this.rewriteGraphCopyUpdate(graphCopyPlan)
|
|
293
|
+
: this.rewriteDefaultGraphUpdates(parsed, queryRequest.baseUrl);
|
|
211
294
|
this.logger.verbose(`[SubgraphSPARQL] Rewritten Query: ${rewritten}`);
|
|
212
|
-
|
|
295
|
+
const skippedSilentAuthorityLoad = Boolean(this.updateAuthority && loadDocumentPlan?.silent && !nativeOptions?.loadDocument);
|
|
296
|
+
if (!skippedSilentAuthorityLoad) {
|
|
297
|
+
if (this.updateAuthority) {
|
|
298
|
+
await this.updateAuthority.executeSparqlUpdate(rewritten, queryRequest.baseUrl, readAccessScope);
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
await this.engine.queryVoid(rewritten, queryRequest.baseUrl, readAccessScope, nativeOptions);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
213
304
|
await this.refreshUsage(queryRequest.baseUrl);
|
|
214
305
|
response.statusCode = 204;
|
|
215
306
|
response.setHeader('Cache-Control', 'no-store');
|
|
@@ -311,42 +402,161 @@ class SubgraphSparqlHttpHandler extends community_server_1.HttpHandler {
|
|
|
311
402
|
}
|
|
312
403
|
return Math.trunc(value);
|
|
313
404
|
}
|
|
405
|
+
async resolveReadAccessScope(baseUrl, request) {
|
|
406
|
+
const credentials = await this.authorizeFor(baseUrl, request, [policy_engine_1.PERMISSIONS.Read]);
|
|
407
|
+
return this.resolveReadAccessScopeForCredentials(baseUrl, credentials);
|
|
408
|
+
}
|
|
409
|
+
async resolveReadAccessScopeForCredentials(baseUrl, credentials) {
|
|
410
|
+
const graphs = await this.engine.listGraphs(baseUrl);
|
|
411
|
+
const deniedGraphUrls = [];
|
|
412
|
+
for (const graph of graphs) {
|
|
413
|
+
const resourceUrl = this.resourceUrlForGraphValue(graph);
|
|
414
|
+
if (!resourceUrl.startsWith(baseUrl)) {
|
|
415
|
+
continue;
|
|
416
|
+
}
|
|
417
|
+
const allowed = await this.canAuthorizeFor(resourceUrl, credentials, [policy_engine_1.PERMISSIONS.Read]);
|
|
418
|
+
if (!allowed) {
|
|
419
|
+
deniedGraphUrls.push(graph);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
deniedGraphUrls.sort();
|
|
423
|
+
return {
|
|
424
|
+
basePath: baseUrl,
|
|
425
|
+
mode: 'read',
|
|
426
|
+
principal: credentials.agent?.webId ?? credentials.client?.clientId ?? 'anonymous',
|
|
427
|
+
...(deniedGraphUrls.length > 0 ? { deniedGraphUrls } : {}),
|
|
428
|
+
version: deniedGraphUrls.length > 0
|
|
429
|
+
? `graphs:${graphs.size}:denied:${deniedGraphUrls.join(',')}`
|
|
430
|
+
: `graphs:${graphs.size}:inherited`,
|
|
431
|
+
};
|
|
432
|
+
}
|
|
314
433
|
async authorizeFor(basePath, request, modes) {
|
|
315
434
|
if (modes.length === 0) {
|
|
316
|
-
return;
|
|
435
|
+
return this.credentialsExtractor.handleSafe(request);
|
|
436
|
+
}
|
|
437
|
+
const credentials = await this.credentialsExtractor.handleSafe(request);
|
|
438
|
+
await this.authorizeIdentifier(basePath, credentials, modes);
|
|
439
|
+
return credentials;
|
|
440
|
+
}
|
|
441
|
+
async canAuthorizeFor(basePath, credentials, modes) {
|
|
442
|
+
try {
|
|
443
|
+
await this.authorizeIdentifier(basePath, credentials, modes);
|
|
444
|
+
return true;
|
|
445
|
+
}
|
|
446
|
+
catch (error) {
|
|
447
|
+
this.logger.debug(`ACL/ACR graph denied for ${basePath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
448
|
+
return false;
|
|
317
449
|
}
|
|
450
|
+
}
|
|
451
|
+
async authorizeIdentifier(basePath, credentials, modes) {
|
|
318
452
|
const identifier = { path: basePath };
|
|
319
453
|
const requestedModes = new community_server_2.IdentifierSetMultiMap();
|
|
320
454
|
for (const mode of modes) {
|
|
321
455
|
requestedModes.add(identifier, mode);
|
|
322
456
|
}
|
|
323
|
-
const credentials = await this.credentialsExtractor.handleSafe(request);
|
|
324
457
|
const availablePermissions = await this.permissionReader.handleSafe({ credentials, requestedModes });
|
|
325
458
|
await this.authorizer.handleSafe({ credentials, requestedModes, availablePermissions });
|
|
326
459
|
}
|
|
327
460
|
inspectUpdateGraphs(update, basePath) {
|
|
328
|
-
|
|
329
|
-
|
|
461
|
+
const plan = {
|
|
462
|
+
hasInsert: false,
|
|
463
|
+
hasDelete: false,
|
|
464
|
+
needsReadScope: false,
|
|
465
|
+
readTargets: new Set(),
|
|
466
|
+
writeTargets: new Map(),
|
|
467
|
+
loadDocuments: [],
|
|
468
|
+
clearGraphs: [],
|
|
469
|
+
graphCopies: [],
|
|
470
|
+
};
|
|
330
471
|
for (const operation of update.updates ?? []) {
|
|
472
|
+
if (this.isLoadOperation(operation)) {
|
|
473
|
+
if ((update.updates?.length ?? 0) !== 1) {
|
|
474
|
+
throw new community_server_2.BadRequestHttpError('SPARQL LOAD cannot be mixed with other update operations on the /-/sparql endpoint.');
|
|
475
|
+
}
|
|
476
|
+
plan.hasInsert = true;
|
|
477
|
+
plan.needsReadScope = true;
|
|
478
|
+
const sourceUri = this.assertGraphTermInScope(operation.source, basePath);
|
|
479
|
+
if (!sourceUri) {
|
|
480
|
+
throw new community_server_2.BadRequestHttpError('SPARQL LOAD source must be an explicit in-pod IRI.');
|
|
481
|
+
}
|
|
482
|
+
const targetGraph = operation.destination
|
|
483
|
+
? this.assertGraphTermInScope(operation.destination, basePath)
|
|
484
|
+
: basePath;
|
|
485
|
+
plan.readTargets.add(sourceUri);
|
|
486
|
+
this.addWriteTarget(plan, targetGraph ?? basePath, [policy_engine_1.PERMISSIONS.Append]);
|
|
487
|
+
plan.loadDocuments.push({
|
|
488
|
+
sourceUri,
|
|
489
|
+
targetGraph: targetGraph ?? basePath,
|
|
490
|
+
...(operation.silent ? { silent: true } : {}),
|
|
491
|
+
});
|
|
492
|
+
continue;
|
|
493
|
+
}
|
|
494
|
+
if (this.isClearGraphOperation(operation) || this.isDropGraphOperation(operation)) {
|
|
495
|
+
if ((update.updates?.length ?? 0) !== 1) {
|
|
496
|
+
throw new community_server_2.BadRequestHttpError('SPARQL graph deletion operations cannot be mixed with other update operations on the /-/sparql endpoint.');
|
|
497
|
+
}
|
|
498
|
+
plan.hasDelete = true;
|
|
499
|
+
plan.needsReadScope = true;
|
|
500
|
+
const graph = this.assertGraphInScope(operation.graph, basePath) ?? basePath;
|
|
501
|
+
this.addWriteTarget(plan, graph, [policy_engine_1.PERMISSIONS.Delete]);
|
|
502
|
+
plan.clearGraphs.push(graph);
|
|
503
|
+
continue;
|
|
504
|
+
}
|
|
505
|
+
if (this.isGraphCopyOperation(operation)) {
|
|
506
|
+
if ((update.updates?.length ?? 0) !== 1) {
|
|
507
|
+
throw new community_server_2.BadRequestHttpError('SPARQL graph copy operations cannot be mixed with other update operations on the /-/sparql endpoint.');
|
|
508
|
+
}
|
|
509
|
+
const sourceGraph = this.assertGraphInScope(operation.source, basePath) ?? basePath;
|
|
510
|
+
const targetGraph = this.assertGraphInScope(operation.destination, basePath) ?? basePath;
|
|
511
|
+
plan.hasInsert = true;
|
|
512
|
+
plan.needsReadScope = true;
|
|
513
|
+
plan.readTargets.add(sourceGraph);
|
|
514
|
+
if (operation.type === 'add') {
|
|
515
|
+
this.addWriteTarget(plan, targetGraph, [policy_engine_1.PERMISSIONS.Append]);
|
|
516
|
+
}
|
|
517
|
+
else if (operation.type === 'copy') {
|
|
518
|
+
plan.hasDelete = true;
|
|
519
|
+
this.addWriteTarget(plan, targetGraph, [policy_engine_1.PERMISSIONS.Delete, policy_engine_1.PERMISSIONS.Append]);
|
|
520
|
+
}
|
|
521
|
+
else {
|
|
522
|
+
plan.hasDelete = true;
|
|
523
|
+
this.addWriteTarget(plan, targetGraph, [policy_engine_1.PERMISSIONS.Delete, policy_engine_1.PERMISSIONS.Append]);
|
|
524
|
+
this.addWriteTarget(plan, sourceGraph, [policy_engine_1.PERMISSIONS.Delete]);
|
|
525
|
+
}
|
|
526
|
+
plan.graphCopies.push({ operation: operation.type, sourceGraph, targetGraph });
|
|
527
|
+
continue;
|
|
528
|
+
}
|
|
529
|
+
if (this.isCreateGraphOperation(operation)) {
|
|
530
|
+
plan.hasInsert = true;
|
|
531
|
+
const graph = this.assertGraphInScope(operation.graph, basePath) ?? basePath;
|
|
532
|
+
this.addWriteTarget(plan, graph, [policy_engine_1.PERMISSIONS.Append]);
|
|
533
|
+
continue;
|
|
534
|
+
}
|
|
331
535
|
if (!this.isInsertDeleteOperation(operation)) {
|
|
332
536
|
throw new community_server_2.BadRequestHttpError('SPARQL update management operations are not supported.');
|
|
333
537
|
}
|
|
334
538
|
if (operation.updateType === 'insert' ||
|
|
335
539
|
(operation.updateType === 'insertdelete' && (operation.insert?.length ?? 0) > 0)) {
|
|
336
|
-
hasInsert = true;
|
|
540
|
+
plan.hasInsert = true;
|
|
337
541
|
}
|
|
338
542
|
if (operation.updateType === 'delete' || operation.updateType === 'deletewhere' ||
|
|
339
543
|
(operation.updateType === 'insertdelete' && (operation.delete?.length ?? 0) > 0)) {
|
|
340
|
-
hasDelete = true;
|
|
544
|
+
plan.hasDelete = true;
|
|
341
545
|
}
|
|
546
|
+
const defaultGraph = operation.graph
|
|
547
|
+
? this.assertGraphInScope(operation.graph, basePath) ?? basePath
|
|
548
|
+
: basePath;
|
|
342
549
|
if (operation.graph) {
|
|
343
550
|
this.assertGraphInScope(operation.graph, basePath);
|
|
344
551
|
}
|
|
345
552
|
if (operation.updateType === 'insert' || operation.updateType === 'insertdelete') {
|
|
346
|
-
this.inspectQuads(operation.insert ?? [], basePath);
|
|
553
|
+
this.inspectQuads(operation.insert ?? [], basePath, defaultGraph, plan, [policy_engine_1.PERMISSIONS.Append]);
|
|
347
554
|
}
|
|
348
555
|
if (operation.updateType === 'delete' || operation.updateType === 'insertdelete' || operation.updateType === 'deletewhere') {
|
|
349
|
-
this.inspectQuads(operation.delete ?? [], basePath);
|
|
556
|
+
this.inspectQuads(operation.delete ?? [], basePath, defaultGraph, plan, [policy_engine_1.PERMISSIONS.Delete]);
|
|
557
|
+
}
|
|
558
|
+
if (operation.updateType === 'insertdelete' || operation.updateType === 'deletewhere') {
|
|
559
|
+
plan.needsReadScope = true;
|
|
350
560
|
}
|
|
351
561
|
if (operation.updateType === 'insertdelete') {
|
|
352
562
|
this.inspectPatterns(operation.where ?? [], basePath);
|
|
@@ -360,12 +570,18 @@ class SubgraphSparqlHttpHandler extends community_server_1.HttpHandler {
|
|
|
360
570
|
}
|
|
361
571
|
}
|
|
362
572
|
}
|
|
363
|
-
return
|
|
573
|
+
return plan;
|
|
364
574
|
}
|
|
365
|
-
inspectQuads(quads, basePath) {
|
|
575
|
+
inspectQuads(quads, basePath, defaultGraph, plan, modes) {
|
|
366
576
|
for (const quad of quads) {
|
|
367
577
|
if (quad.type === 'graph') {
|
|
368
|
-
this.assertGraphTermInScope(quad.name, basePath);
|
|
578
|
+
const graph = this.assertGraphTermInScope(quad.name, basePath);
|
|
579
|
+
if (graph) {
|
|
580
|
+
this.addWriteTarget(plan, graph, modes);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
else {
|
|
584
|
+
this.addWriteTarget(plan, defaultGraph, modes);
|
|
369
585
|
}
|
|
370
586
|
}
|
|
371
587
|
}
|
|
@@ -382,45 +598,90 @@ class SubgraphSparqlHttpHandler extends community_server_1.HttpHandler {
|
|
|
382
598
|
}
|
|
383
599
|
assertGraphInScope(graph, basePath) {
|
|
384
600
|
if ('default' in graph && graph.default) {
|
|
385
|
-
return;
|
|
601
|
+
return undefined;
|
|
386
602
|
}
|
|
387
603
|
if ('name' in graph) {
|
|
388
604
|
const name = graph.name;
|
|
389
605
|
if (name) {
|
|
390
|
-
this.assertGraphTermInScope(name, basePath);
|
|
606
|
+
return this.assertGraphTermInScope(name, basePath);
|
|
391
607
|
}
|
|
392
608
|
}
|
|
393
609
|
else if ('value' in graph) {
|
|
394
|
-
this.assertGraphTermInScope(graph, basePath);
|
|
610
|
+
return this.assertGraphTermInScope(graph, basePath);
|
|
395
611
|
}
|
|
612
|
+
return undefined;
|
|
396
613
|
}
|
|
397
614
|
assertGraphTermInScope(term, basePath) {
|
|
398
615
|
if (!term) {
|
|
399
|
-
return;
|
|
616
|
+
return undefined;
|
|
400
617
|
}
|
|
401
618
|
if (term.termType === 'Variable') {
|
|
402
619
|
throw new community_server_2.BadRequestHttpError('Graph IRIs must be explicit when using the /-/sparql update endpoint.');
|
|
403
620
|
}
|
|
404
621
|
if (term.termType === 'NamedNode') {
|
|
405
|
-
// Graph can be either basePath or prefix:basePath (e.g., meta:http://...)
|
|
406
|
-
// Extract the path part after optional prefix (anything before first colon that's not part of http:)
|
|
407
622
|
const graphValue = term.value;
|
|
408
|
-
|
|
409
|
-
// Check if it has a prefix like "meta:" or "acl:" (not "http:" or "https:")
|
|
410
|
-
const prefixMatch = graphValue.match(/^([a-z]+):(?!\/\/)/i);
|
|
411
|
-
if (prefixMatch) {
|
|
412
|
-
pathPart = graphValue.slice(prefixMatch[0].length);
|
|
413
|
-
}
|
|
623
|
+
const pathPart = this.resourceUrlForGraphValue(graphValue);
|
|
414
624
|
if (!pathPart.startsWith(basePath)) {
|
|
415
625
|
throw new community_server_2.BadRequestHttpError(`Graph ${term.value} is outside of ${basePath}.`);
|
|
416
626
|
}
|
|
417
|
-
return;
|
|
627
|
+
return graphValue;
|
|
418
628
|
}
|
|
419
629
|
if (term.default === true) {
|
|
420
|
-
return;
|
|
630
|
+
return undefined;
|
|
421
631
|
}
|
|
422
632
|
throw new community_server_2.BadRequestHttpError('Unsupported graph target in SPARQL update.');
|
|
423
633
|
}
|
|
634
|
+
addWriteTarget(plan, graph, modes) {
|
|
635
|
+
const existing = plan.writeTargets.get(graph) ?? new Set();
|
|
636
|
+
for (const mode of modes) {
|
|
637
|
+
existing.add(mode);
|
|
638
|
+
}
|
|
639
|
+
plan.writeTargets.set(graph, existing);
|
|
640
|
+
}
|
|
641
|
+
async readLoadDocument(plan, basePath, accessScope) {
|
|
642
|
+
const quads = await this.engine.constructGraph(plan.sourceUri, basePath, accessScope);
|
|
643
|
+
const lines = [];
|
|
644
|
+
for await (const quad of quads) {
|
|
645
|
+
lines.push([
|
|
646
|
+
SubgraphSparqlHttpHandler.termToNQuads(quad.subject),
|
|
647
|
+
SubgraphSparqlHttpHandler.termToNQuads(quad.predicate),
|
|
648
|
+
SubgraphSparqlHttpHandler.termToNQuads(quad.object),
|
|
649
|
+
'.',
|
|
650
|
+
].join(' '));
|
|
651
|
+
}
|
|
652
|
+
return {
|
|
653
|
+
sourceUri: plan.sourceUri,
|
|
654
|
+
body: lines.length > 0 ? `${lines.join('\n')}\n` : '',
|
|
655
|
+
mediaType: 'application/n-triples',
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
rewriteLoadUpdate(plan) {
|
|
659
|
+
return `LOAD ${plan.silent ? 'SILENT ' : ''}<${plan.sourceUri}> INTO GRAPH <${plan.targetGraph}>`;
|
|
660
|
+
}
|
|
661
|
+
rewriteLoadedDocumentUpdate(plan, document) {
|
|
662
|
+
return `INSERT DATA { GRAPH <${plan.targetGraph}> {\n${document.body}\n} }`;
|
|
663
|
+
}
|
|
664
|
+
rewriteClearGraphUpdate(graph) {
|
|
665
|
+
return `DELETE WHERE { GRAPH <${graph}> { ?s ?p ?o } }`;
|
|
666
|
+
}
|
|
667
|
+
rewriteGraphCopyUpdate(plan) {
|
|
668
|
+
if (plan.sourceGraph === plan.targetGraph) {
|
|
669
|
+
return `CREATE SILENT GRAPH <${plan.targetGraph}>`;
|
|
670
|
+
}
|
|
671
|
+
const insert = `INSERT { GRAPH <${plan.targetGraph}> { ?s ?p ?o } } WHERE { GRAPH <${plan.sourceGraph}> { ?s ?p ?o } }`;
|
|
672
|
+
if (plan.operation === 'add') {
|
|
673
|
+
return insert;
|
|
674
|
+
}
|
|
675
|
+
const clearTarget = this.rewriteClearGraphUpdate(plan.targetGraph);
|
|
676
|
+
if (plan.operation === 'copy') {
|
|
677
|
+
return `${clearTarget}; ${insert}`;
|
|
678
|
+
}
|
|
679
|
+
return `${clearTarget}; ${insert}; ${this.rewriteClearGraphUpdate(plan.sourceGraph)}`;
|
|
680
|
+
}
|
|
681
|
+
resourceUrlForGraphValue(graphValue) {
|
|
682
|
+
const prefixMatch = graphValue.match(/^([a-z][a-z0-9-]*):(?!\/\/)/i);
|
|
683
|
+
return prefixMatch ? graphValue.slice(prefixMatch[0].length) : graphValue;
|
|
684
|
+
}
|
|
424
685
|
/**
|
|
425
686
|
* Rewrites INSERT/DELETE/INSERT+DELETE that target the default graph (or BGP without GRAPH)
|
|
426
687
|
* so they write to the resource graph (graphIri).
|
|
@@ -644,11 +905,31 @@ class SubgraphSparqlHttpHandler extends community_server_1.HttpHandler {
|
|
|
644
905
|
.replace(/\r/g, '\\r')
|
|
645
906
|
.replace(/\t/g, '\\t')
|
|
646
907
|
.replace(/\f/g, '\\f')
|
|
647
|
-
.replace(/\
|
|
908
|
+
.replace(/\u0008/g, '\\b');
|
|
648
909
|
}
|
|
649
910
|
isInsertDeleteOperation(operation) {
|
|
650
911
|
return typeof operation.updateType === 'string';
|
|
651
912
|
}
|
|
913
|
+
isLoadOperation(operation) {
|
|
914
|
+
const candidate = operation;
|
|
915
|
+
return candidate.type === 'load' &&
|
|
916
|
+
candidate.source?.termType === 'NamedNode' &&
|
|
917
|
+
(!candidate.destination || candidate.destination.termType === 'NamedNode');
|
|
918
|
+
}
|
|
919
|
+
isClearGraphOperation(operation) {
|
|
920
|
+
return operation.type === 'clear' && 'graph' in operation;
|
|
921
|
+
}
|
|
922
|
+
isDropGraphOperation(operation) {
|
|
923
|
+
return operation.type === 'drop' && 'graph' in operation;
|
|
924
|
+
}
|
|
925
|
+
isGraphCopyOperation(operation) {
|
|
926
|
+
const candidate = operation;
|
|
927
|
+
return (candidate.type === 'add' || candidate.type === 'copy' || candidate.type === 'move') &&
|
|
928
|
+
'source' in operation && 'destination' in operation;
|
|
929
|
+
}
|
|
930
|
+
isCreateGraphOperation(operation) {
|
|
931
|
+
return operation.type === 'create' && 'graph' in operation;
|
|
932
|
+
}
|
|
652
933
|
getRequestId(request) {
|
|
653
934
|
const header = (request.headers['x-request-id'] ?? request.headers['X-Request-Id']);
|
|
654
935
|
return header?.toString() ?? 'no-request-id';
|