@undefineds.co/xpod 0.3.58 → 0.3.61
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/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 +32 -12
- 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
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.evaluateRdfBenchmarkReportGate = evaluateRdfBenchmarkReportGate;
|
|
4
|
+
const DEFAULT_MIN_TARGET_QUADS = 1_000_000;
|
|
5
|
+
const DEFAULT_MIN_ITERATIONS = 1;
|
|
6
|
+
const DEFAULT_MIN_WARMUP_ITERATIONS = 0;
|
|
7
|
+
const DEFAULT_MIN_CONCURRENCY = 4;
|
|
8
|
+
function evaluateRdfBenchmarkReportGate(snapshot, options = {}) {
|
|
9
|
+
const required = normalizeGateOptions(options);
|
|
10
|
+
const candidates = snapshot.reports.map((report) => evaluateCandidate(report, required));
|
|
11
|
+
const matched = candidates.find((candidate) => candidate.matched);
|
|
12
|
+
const matchedReport = matched
|
|
13
|
+
? snapshot.reports.find((report) => report.path === matched.path)
|
|
14
|
+
: undefined;
|
|
15
|
+
return {
|
|
16
|
+
matched: Boolean(matched),
|
|
17
|
+
evaluatedAt: new Date().toISOString(),
|
|
18
|
+
checkedReportCount: snapshot.reports.length,
|
|
19
|
+
required,
|
|
20
|
+
matchedReport,
|
|
21
|
+
failedReasons: matched ? [] : topLevelFailedReasons(snapshot, candidates),
|
|
22
|
+
candidates,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function normalizeGateOptions(options) {
|
|
26
|
+
const minTargetQuadCount = positiveOrDefault(options.minTargetQuadCount, DEFAULT_MIN_TARGET_QUADS);
|
|
27
|
+
return {
|
|
28
|
+
requiredScale: options.requiredScale ?? 'large',
|
|
29
|
+
requiredDriver: options.requiredDriver ?? 'pg',
|
|
30
|
+
requiredCaseProfile: options.requiredCaseProfile,
|
|
31
|
+
requiredRdfAccelerationProfile: options.requiredRdfAccelerationProfile,
|
|
32
|
+
requiredTextSearchBackend: options.requiredTextSearchBackend,
|
|
33
|
+
minTargetQuadCount,
|
|
34
|
+
minSeedQuadCount: positiveOrDefault(options.minSeedQuadCount, minTargetQuadCount),
|
|
35
|
+
minIterations: positiveOrDefault(options.minIterations, DEFAULT_MIN_ITERATIONS),
|
|
36
|
+
minWarmupIterations: nonNegativeOrDefault(options.minWarmupIterations, DEFAULT_MIN_WARMUP_ITERATIONS),
|
|
37
|
+
minConcurrency: positiveOrDefault(options.minConcurrency, DEFAULT_MIN_CONCURRENCY),
|
|
38
|
+
requireFullScale: options.requireFullScale ?? true,
|
|
39
|
+
requireCopyIngest: options.requireCopyIngest ?? true,
|
|
40
|
+
allowCopyFallbacks: options.allowCopyFallbacks ?? false,
|
|
41
|
+
requirePlannerStats: options.requirePlannerStats ?? true,
|
|
42
|
+
requireColdWarmTimings: options.requireColdWarmTimings ?? true,
|
|
43
|
+
requireStorageRatio: options.requireStorageRatio ?? true,
|
|
44
|
+
requireServingRegressionGate: options.requireServingRegressionGate ?? false,
|
|
45
|
+
requireServingRegressionThresholds: options.requireServingRegressionThresholds ?? false,
|
|
46
|
+
requireFusionBenchmarkGate: options.requireFusionBenchmarkGate ?? false,
|
|
47
|
+
requireFusionBenchmarkThresholds: options.requireFusionBenchmarkThresholds ?? false,
|
|
48
|
+
requireFusionBaselineComparison: options.requireFusionBaselineComparison ?? false,
|
|
49
|
+
requireBenchmarkGateConfigSources: options.requireBenchmarkGateConfigSources ?? false,
|
|
50
|
+
requireFusionBaselineReportSource: options.requireFusionBaselineReportSource ?? false,
|
|
51
|
+
requireFusionBaselineSourceBaselineProfile: options.requireFusionBaselineSourceBaselineProfile ?? false,
|
|
52
|
+
requireFusionHardFilterEvidence: options.requireFusionHardFilterEvidence ?? false,
|
|
53
|
+
requireFusionBatchedBroadCandidateJoinEvidence: options.requireFusionBatchedBroadCandidateJoinEvidence ?? false,
|
|
54
|
+
requireNativeTextFtsEvidence: options.requireNativeTextFtsEvidence ?? false,
|
|
55
|
+
requireNativeVectorEvidence: options.requireNativeVectorEvidence ?? false,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function evaluateCandidate(report, required) {
|
|
59
|
+
const failedReasons = [];
|
|
60
|
+
requireEqual(failedReasons, 'scale', report.scale, required.requiredScale);
|
|
61
|
+
requireEqual(failedReasons, 'driver', report.driver, required.requiredDriver);
|
|
62
|
+
if (required.requiredCaseProfile) {
|
|
63
|
+
requireEqual(failedReasons, 'caseProfile', report.caseProfile, required.requiredCaseProfile);
|
|
64
|
+
}
|
|
65
|
+
if (required.requiredRdfAccelerationProfile) {
|
|
66
|
+
requireEqual(failedReasons, 'rdfAccelerationProfile', report.rdfAccelerationProfile, required.requiredRdfAccelerationProfile);
|
|
67
|
+
}
|
|
68
|
+
if (required.requiredTextSearchBackend) {
|
|
69
|
+
requireEqual(failedReasons, 'textSearchBackend', report.textSearchBackend, required.requiredTextSearchBackend);
|
|
70
|
+
}
|
|
71
|
+
requireAtLeast(failedReasons, 'targetQuadCount', report.targetQuadCount, required.minTargetQuadCount);
|
|
72
|
+
requireAtLeast(failedReasons, 'seedQuadCount', report.seedQuadCount, required.minSeedQuadCount);
|
|
73
|
+
requireAtLeast(failedReasons, 'iterations', report.iterations, required.minIterations);
|
|
74
|
+
requireAtLeast(failedReasons, 'warmupIterations', report.warmupIterations, required.minWarmupIterations);
|
|
75
|
+
if (required.requireFullScale && report.fullScale !== true) {
|
|
76
|
+
failedReasons.push(`fullScale expected true, got ${String(report.fullScale)}`);
|
|
77
|
+
}
|
|
78
|
+
if (report.planMatched !== true || report.failedPlanCases.length > 0) {
|
|
79
|
+
failedReasons.push(`plan gate failed: ${report.failedPlanCases.join(', ') || 'planMatched is not true'}`);
|
|
80
|
+
}
|
|
81
|
+
requireAtLeast(failedReasons, 'concurrency', report.concurrency, required.minConcurrency);
|
|
82
|
+
if (report.concurrencyMatched !== true || report.failedConcurrencyCases.length > 0) {
|
|
83
|
+
failedReasons.push(`concurrency gate failed: ${report.failedConcurrencyCases.join(', ') || 'concurrencyMatched is not true'}`);
|
|
84
|
+
}
|
|
85
|
+
if (required.requireServingRegressionGate && (report.servingRegressionMatched !== true || report.failedServingRegressionCases.length > 0)) {
|
|
86
|
+
failedReasons.push(`serving regression gate failed: ${report.failedServingRegressionCases.join(', ') || 'servingRegressionMatched is not true'}`);
|
|
87
|
+
}
|
|
88
|
+
if (required.requireServingRegressionThresholds && report.servingRegressionThresholdsConfigured !== true) {
|
|
89
|
+
failedReasons.push('serving regression thresholds are not configured');
|
|
90
|
+
}
|
|
91
|
+
if (required.requireFusionBenchmarkGate && (report.fusionBenchmarkMatched !== true || report.failedFusionBenchmarkCases.length > 0)) {
|
|
92
|
+
failedReasons.push(`fusion benchmark gate failed: ${report.failedFusionBenchmarkCases.join(', ') || 'fusionBenchmarkMatched is not true'}`);
|
|
93
|
+
}
|
|
94
|
+
if (required.requireFusionBenchmarkThresholds && report.fusionBenchmarkThresholdsConfigured !== true) {
|
|
95
|
+
failedReasons.push('fusion benchmark thresholds are not configured');
|
|
96
|
+
}
|
|
97
|
+
if (required.requireFusionBaselineComparison &&
|
|
98
|
+
(report.fusionBaselineComparisonMatched !== true || report.failedFusionBaselineComparisonCases.length > 0)) {
|
|
99
|
+
failedReasons.push(`fusion baseline comparison gate failed: ${report.failedFusionBaselineComparisonCases.join(', ') || 'fusionBaselineComparisonMatched is not true'}`);
|
|
100
|
+
}
|
|
101
|
+
if (required.requireBenchmarkGateConfigSources && report.benchmarkGateConfigSourcesConfigured !== true) {
|
|
102
|
+
failedReasons.push('benchmark gate config sources are not configured');
|
|
103
|
+
}
|
|
104
|
+
if (required.requireFusionBaselineReportSource && report.fusionBaselineReportSourceConfigured !== true) {
|
|
105
|
+
failedReasons.push('fusion baseline report source is not configured');
|
|
106
|
+
}
|
|
107
|
+
if (required.requireFusionBaselineSourceBaselineProfile &&
|
|
108
|
+
report.fusionBaselineReportSourceBaselineProfileConfigured !== true) {
|
|
109
|
+
failedReasons.push('fusion baseline source baseline profile is not configured');
|
|
110
|
+
}
|
|
111
|
+
if (required.requireBenchmarkGateConfigSources && report.benchmarkGateConfigSourceShapeMismatches.length > 0) {
|
|
112
|
+
failedReasons.push(`benchmark gate config source shape mismatch: ${report.benchmarkGateConfigSourceShapeMismatches.join('; ')}`);
|
|
113
|
+
}
|
|
114
|
+
if (required.requireFusionHardFilterEvidence) {
|
|
115
|
+
requirePositive(failedReasons, 'fusion hard-filter-before-rank evidence', report.fusionHardFiltersBeforeRankCaseCount);
|
|
116
|
+
}
|
|
117
|
+
if (required.requireFusionBatchedBroadCandidateJoinEvidence) {
|
|
118
|
+
requirePositive(failedReasons, 'fusion batched broad candidate join evidence', report.fusionBatchedBroadCandidateJoinCaseCount);
|
|
119
|
+
}
|
|
120
|
+
if (required.requireNativeTextFtsEvidence) {
|
|
121
|
+
requirePositive(failedReasons, 'native text FTS evidence', report.nativeTextFtsCaseCount);
|
|
122
|
+
}
|
|
123
|
+
if (required.requireNativeVectorEvidence) {
|
|
124
|
+
requirePositive(failedReasons, 'native vector evidence', report.nativeVectorCaseCount);
|
|
125
|
+
}
|
|
126
|
+
if (required.requireCopyIngest) {
|
|
127
|
+
requirePositive(failedReasons, 'copyRows', report.copyRows);
|
|
128
|
+
if (!required.allowCopyFallbacks && (report.copyFallbacks ?? 0) > 0) {
|
|
129
|
+
failedReasons.push(`copyFallbacks expected 0, got ${report.copyFallbacks}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (required.requirePlannerStats) {
|
|
133
|
+
requirePositive(failedReasons, 'refreshDurationMs', report.refreshDurationMs);
|
|
134
|
+
requireNonNegative(failedReasons, 'plannerStatsDurationMs', report.plannerStatsDurationMs);
|
|
135
|
+
if (report.plannerStatsAnalyzedTables.length === 0) {
|
|
136
|
+
failedReasons.push('plannerStatsAnalyzedTables is empty');
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (required.requireColdWarmTimings) {
|
|
140
|
+
requirePositive(failedReasons, 'coldStartDurationMs', report.coldStartDurationMs);
|
|
141
|
+
requirePositive(failedReasons, 'firstQueryDurationMs', report.firstQueryDurationMs);
|
|
142
|
+
requirePositive(failedReasons, 'warmP50DurationMs', report.warmP50DurationMs);
|
|
143
|
+
requirePositive(failedReasons, 'warmP95DurationMs', report.warmP95DurationMs);
|
|
144
|
+
}
|
|
145
|
+
if (required.requireStorageRatio) {
|
|
146
|
+
requirePositive(failedReasons, 'storageFactsBytes', report.storageFactsBytes);
|
|
147
|
+
requirePositive(failedReasons, 'storageTotalBytes', report.storageTotalBytes);
|
|
148
|
+
requirePositive(failedReasons, 'storageTotalToFactsRatio', report.storageTotalToFactsRatio);
|
|
149
|
+
}
|
|
150
|
+
return {
|
|
151
|
+
id: report.id,
|
|
152
|
+
path: report.path,
|
|
153
|
+
generatedAt: report.generatedAt,
|
|
154
|
+
matched: failedReasons.length === 0,
|
|
155
|
+
failedReasons,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function topLevelFailedReasons(snapshot, candidates) {
|
|
159
|
+
if (snapshot.reports.length === 0) {
|
|
160
|
+
return ['no benchmark reports found'];
|
|
161
|
+
}
|
|
162
|
+
const newest = candidates[0];
|
|
163
|
+
if (!newest) {
|
|
164
|
+
return ['no benchmark reports found'];
|
|
165
|
+
}
|
|
166
|
+
return [
|
|
167
|
+
`no report satisfied the gate; newest report ${newest.path} failed`,
|
|
168
|
+
...newest.failedReasons,
|
|
169
|
+
];
|
|
170
|
+
}
|
|
171
|
+
function requireEqual(failedReasons, label, actual, expected) {
|
|
172
|
+
if (actual !== expected) {
|
|
173
|
+
failedReasons.push(`${label} expected ${expected}, got ${actual ?? 'missing'}`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function requireAtLeast(failedReasons, label, actual, expected) {
|
|
177
|
+
if (!Number.isFinite(actual) || (actual ?? 0) < expected) {
|
|
178
|
+
failedReasons.push(`${label} expected >= ${expected}, got ${actual ?? 'missing'}`);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
function requirePositive(failedReasons, label, actual) {
|
|
182
|
+
if (!Number.isFinite(actual) || (actual ?? 0) <= 0) {
|
|
183
|
+
failedReasons.push(`${label} expected > 0, got ${actual ?? 'missing'}`);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
function requireNonNegative(failedReasons, label, actual) {
|
|
187
|
+
if (!Number.isFinite(actual) || (actual ?? -1) < 0) {
|
|
188
|
+
failedReasons.push(`${label} expected >= 0, got ${actual ?? 'missing'}`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
function positiveOrDefault(value, defaultValue) {
|
|
192
|
+
return typeof value === 'number' && Number.isFinite(value) && value > 0 ? Math.floor(value) : defaultValue;
|
|
193
|
+
}
|
|
194
|
+
function nonNegativeOrDefault(value, defaultValue) {
|
|
195
|
+
return typeof value === 'number' && Number.isFinite(value) && value >= 0 ? Math.floor(value) : defaultValue;
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=RdfBenchmarkReportGate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RdfBenchmarkReportGate.js","sourceRoot":"","sources":["../../../src/api/service/RdfBenchmarkReportGate.ts"],"names":[],"mappings":";;AA0FA,wEAoBC;AAzBD,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAC3C,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACjC,MAAM,6BAA6B,GAAG,CAAC,CAAC;AACxC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAElC,SAAgB,8BAA8B,CAC5C,QAA2C,EAC3C,UAAyC,EAAE;IAE3C,MAAM,QAAQ,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC/C,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IACzF,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,C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,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;AAC9G,CAAC","sourcesContent":["import type {\n RdfBenchmarkReportCatalogSnapshot,\n RdfBenchmarkReportSummary,\n} from './RdfBenchmarkReportCatalog';\n\nexport interface RdfBenchmarkReportGateOptions {\n requiredScale?: string;\n requiredDriver?: string;\n requiredCaseProfile?: string;\n requiredRdfAccelerationProfile?: string;\n requiredTextSearchBackend?: string;\n minTargetQuadCount?: number;\n minSeedQuadCount?: number;\n minIterations?: number;\n minWarmupIterations?: number;\n minConcurrency?: number;\n requireFullScale?: boolean;\n requireCopyIngest?: boolean;\n allowCopyFallbacks?: boolean;\n requirePlannerStats?: boolean;\n requireColdWarmTimings?: boolean;\n requireStorageRatio?: boolean;\n requireServingRegressionGate?: boolean;\n requireServingRegressionThresholds?: boolean;\n requireFusionBenchmarkGate?: boolean;\n requireFusionBenchmarkThresholds?: boolean;\n requireFusionBaselineComparison?: boolean;\n requireBenchmarkGateConfigSources?: boolean;\n requireFusionBaselineReportSource?: boolean;\n requireFusionBaselineSourceBaselineProfile?: boolean;\n requireFusionHardFilterEvidence?: boolean;\n requireFusionBatchedBroadCandidateJoinEvidence?: boolean;\n requireNativeTextFtsEvidence?: boolean;\n requireNativeVectorEvidence?: boolean;\n}\n\nexport interface RdfBenchmarkReportGateResult {\n matched: boolean;\n evaluatedAt: string;\n checkedReportCount: number;\n required: RequiredRdfBenchmarkReportGateOptions;\n matchedReport?: RdfBenchmarkReportSummary;\n failedReasons: string[];\n candidates: RdfBenchmarkReportGateCandidate[];\n}\n\nexport interface RdfBenchmarkReportGateCandidate {\n id: string;\n path: string;\n generatedAt: string;\n matched: boolean;\n failedReasons: string[];\n}\n\nexport interface RequiredRdfBenchmarkReportGateOptions {\n requiredScale: string;\n requiredDriver: string;\n requiredCaseProfile?: string;\n requiredRdfAccelerationProfile?: string;\n requiredTextSearchBackend?: string;\n minTargetQuadCount: number;\n minSeedQuadCount: number;\n minIterations: number;\n minWarmupIterations: number;\n minConcurrency: number;\n requireFullScale: boolean;\n requireCopyIngest: boolean;\n allowCopyFallbacks: boolean;\n requirePlannerStats: boolean;\n requireColdWarmTimings: boolean;\n requireStorageRatio: boolean;\n requireServingRegressionGate: boolean;\n requireServingRegressionThresholds: boolean;\n requireFusionBenchmarkGate: boolean;\n requireFusionBenchmarkThresholds: boolean;\n requireFusionBaselineComparison: boolean;\n requireBenchmarkGateConfigSources: boolean;\n requireFusionBaselineReportSource: boolean;\n requireFusionBaselineSourceBaselineProfile: boolean;\n requireFusionHardFilterEvidence: boolean;\n requireFusionBatchedBroadCandidateJoinEvidence: boolean;\n requireNativeTextFtsEvidence: boolean;\n requireNativeVectorEvidence: boolean;\n}\n\nconst DEFAULT_MIN_TARGET_QUADS = 1_000_000;\nconst DEFAULT_MIN_ITERATIONS = 1;\nconst DEFAULT_MIN_WARMUP_ITERATIONS = 0;\nconst DEFAULT_MIN_CONCURRENCY = 4;\n\nexport function evaluateRdfBenchmarkReportGate(\n snapshot: RdfBenchmarkReportCatalogSnapshot,\n options: RdfBenchmarkReportGateOptions = {},\n): RdfBenchmarkReportGateResult {\n const required = normalizeGateOptions(options);\n const candidates = snapshot.reports.map((report) => evaluateCandidate(report, required));\n const matched = candidates.find((candidate) => candidate.matched);\n const matchedReport = matched\n ? snapshot.reports.find((report) => report.path === matched.path)\n : undefined;\n\n return {\n matched: Boolean(matched),\n evaluatedAt: new Date().toISOString(),\n checkedReportCount: snapshot.reports.length,\n required,\n matchedReport,\n failedReasons: matched ? [] : topLevelFailedReasons(snapshot, candidates),\n candidates,\n };\n}\n\nfunction normalizeGateOptions(options: RdfBenchmarkReportGateOptions): RequiredRdfBenchmarkReportGateOptions {\n const minTargetQuadCount = positiveOrDefault(options.minTargetQuadCount, DEFAULT_MIN_TARGET_QUADS);\n return {\n requiredScale: options.requiredScale ?? 'large',\n requiredDriver: options.requiredDriver ?? 'pg',\n requiredCaseProfile: options.requiredCaseProfile,\n requiredRdfAccelerationProfile: options.requiredRdfAccelerationProfile,\n requiredTextSearchBackend: options.requiredTextSearchBackend,\n minTargetQuadCount,\n minSeedQuadCount: positiveOrDefault(options.minSeedQuadCount, minTargetQuadCount),\n minIterations: positiveOrDefault(options.minIterations, DEFAULT_MIN_ITERATIONS),\n minWarmupIterations: nonNegativeOrDefault(options.minWarmupIterations, DEFAULT_MIN_WARMUP_ITERATIONS),\n minConcurrency: positiveOrDefault(options.minConcurrency, DEFAULT_MIN_CONCURRENCY),\n requireFullScale: options.requireFullScale ?? true,\n requireCopyIngest: options.requireCopyIngest ?? true,\n allowCopyFallbacks: options.allowCopyFallbacks ?? false,\n requirePlannerStats: options.requirePlannerStats ?? true,\n requireColdWarmTimings: options.requireColdWarmTimings ?? true,\n requireStorageRatio: options.requireStorageRatio ?? true,\n requireServingRegressionGate: options.requireServingRegressionGate ?? false,\n requireServingRegressionThresholds: options.requireServingRegressionThresholds ?? false,\n requireFusionBenchmarkGate: options.requireFusionBenchmarkGate ?? false,\n requireFusionBenchmarkThresholds: options.requireFusionBenchmarkThresholds ?? false,\n requireFusionBaselineComparison: options.requireFusionBaselineComparison ?? false,\n requireBenchmarkGateConfigSources: options.requireBenchmarkGateConfigSources ?? false,\n requireFusionBaselineReportSource: options.requireFusionBaselineReportSource ?? false,\n requireFusionBaselineSourceBaselineProfile: options.requireFusionBaselineSourceBaselineProfile ?? false,\n requireFusionHardFilterEvidence: options.requireFusionHardFilterEvidence ?? false,\n requireFusionBatchedBroadCandidateJoinEvidence: options.requireFusionBatchedBroadCandidateJoinEvidence ?? false,\n requireNativeTextFtsEvidence: options.requireNativeTextFtsEvidence ?? false,\n requireNativeVectorEvidence: options.requireNativeVectorEvidence ?? false,\n };\n}\n\nfunction evaluateCandidate(\n report: RdfBenchmarkReportSummary,\n required: RequiredRdfBenchmarkReportGateOptions,\n): RdfBenchmarkReportGateCandidate {\n const failedReasons: string[] = [];\n requireEqual(failedReasons, 'scale', report.scale, required.requiredScale);\n requireEqual(failedReasons, 'driver', report.driver, required.requiredDriver);\n if (required.requiredCaseProfile) {\n requireEqual(failedReasons, 'caseProfile', report.caseProfile, required.requiredCaseProfile);\n }\n if (required.requiredRdfAccelerationProfile) {\n requireEqual(\n failedReasons,\n 'rdfAccelerationProfile',\n report.rdfAccelerationProfile,\n required.requiredRdfAccelerationProfile,\n );\n }\n if (required.requiredTextSearchBackend) {\n requireEqual(\n failedReasons,\n 'textSearchBackend',\n report.textSearchBackend,\n required.requiredTextSearchBackend,\n );\n }\n requireAtLeast(failedReasons, 'targetQuadCount', report.targetQuadCount, required.minTargetQuadCount);\n requireAtLeast(failedReasons, 'seedQuadCount', report.seedQuadCount, required.minSeedQuadCount);\n requireAtLeast(failedReasons, 'iterations', report.iterations, required.minIterations);\n requireAtLeast(failedReasons, 'warmupIterations', report.warmupIterations, required.minWarmupIterations);\n if (required.requireFullScale && report.fullScale !== true) {\n failedReasons.push(`fullScale expected true, got ${String(report.fullScale)}`);\n }\n if (report.planMatched !== true || report.failedPlanCases.length > 0) {\n failedReasons.push(`plan gate failed: ${report.failedPlanCases.join(', ') || 'planMatched is not true'}`);\n }\n requireAtLeast(failedReasons, 'concurrency', report.concurrency, required.minConcurrency);\n if (report.concurrencyMatched !== true || report.failedConcurrencyCases.length > 0) {\n failedReasons.push(`concurrency gate failed: ${report.failedConcurrencyCases.join(', ') || 'concurrencyMatched is not true'}`);\n }\n if (required.requireServingRegressionGate && (report.servingRegressionMatched !== true || report.failedServingRegressionCases.length > 0)) {\n failedReasons.push(`serving regression gate failed: ${report.failedServingRegressionCases.join(', ') || 'servingRegressionMatched is not true'}`);\n }\n if (required.requireServingRegressionThresholds && report.servingRegressionThresholdsConfigured !== true) {\n failedReasons.push('serving regression thresholds are not configured');\n }\n if (required.requireFusionBenchmarkGate && (report.fusionBenchmarkMatched !== true || report.failedFusionBenchmarkCases.length > 0)) {\n failedReasons.push(`fusion benchmark gate failed: ${report.failedFusionBenchmarkCases.join(', ') || 'fusionBenchmarkMatched is not true'}`);\n }\n if (required.requireFusionBenchmarkThresholds && report.fusionBenchmarkThresholdsConfigured !== true) {\n failedReasons.push('fusion benchmark thresholds are not configured');\n }\n if (\n required.requireFusionBaselineComparison &&\n (report.fusionBaselineComparisonMatched !== true || report.failedFusionBaselineComparisonCases.length > 0)\n ) {\n failedReasons.push(`fusion baseline comparison gate failed: ${report.failedFusionBaselineComparisonCases.join(', ') || 'fusionBaselineComparisonMatched is not true'}`);\n }\n if (required.requireBenchmarkGateConfigSources && report.benchmarkGateConfigSourcesConfigured !== true) {\n failedReasons.push('benchmark gate config sources are not configured');\n }\n if (required.requireFusionBaselineReportSource && report.fusionBaselineReportSourceConfigured !== true) {\n failedReasons.push('fusion baseline report source is not configured');\n }\n if (\n required.requireFusionBaselineSourceBaselineProfile &&\n report.fusionBaselineReportSourceBaselineProfileConfigured !== true\n ) {\n failedReasons.push('fusion baseline source baseline profile is not configured');\n }\n if (required.requireBenchmarkGateConfigSources && report.benchmarkGateConfigSourceShapeMismatches.length > 0) {\n failedReasons.push(`benchmark gate config source shape mismatch: ${report.benchmarkGateConfigSourceShapeMismatches.join('; ')}`);\n }\n if (required.requireFusionHardFilterEvidence) {\n requirePositive(\n failedReasons,\n 'fusion hard-filter-before-rank evidence',\n report.fusionHardFiltersBeforeRankCaseCount,\n );\n }\n if (required.requireFusionBatchedBroadCandidateJoinEvidence) {\n requirePositive(\n failedReasons,\n 'fusion batched broad candidate join evidence',\n report.fusionBatchedBroadCandidateJoinCaseCount,\n );\n }\n if (required.requireNativeTextFtsEvidence) {\n requirePositive(failedReasons, 'native text FTS evidence', report.nativeTextFtsCaseCount);\n }\n if (required.requireNativeVectorEvidence) {\n requirePositive(failedReasons, 'native vector evidence', report.nativeVectorCaseCount);\n }\n if (required.requireCopyIngest) {\n requirePositive(failedReasons, 'copyRows', report.copyRows);\n if (!required.allowCopyFallbacks && (report.copyFallbacks ?? 0) > 0) {\n failedReasons.push(`copyFallbacks expected 0, got ${report.copyFallbacks}`);\n }\n }\n if (required.requirePlannerStats) {\n requirePositive(failedReasons, 'refreshDurationMs', report.refreshDurationMs);\n requireNonNegative(failedReasons, 'plannerStatsDurationMs', report.plannerStatsDurationMs);\n if (report.plannerStatsAnalyzedTables.length === 0) {\n failedReasons.push('plannerStatsAnalyzedTables is empty');\n }\n }\n if (required.requireColdWarmTimings) {\n requirePositive(failedReasons, 'coldStartDurationMs', report.coldStartDurationMs);\n requirePositive(failedReasons, 'firstQueryDurationMs', report.firstQueryDurationMs);\n requirePositive(failedReasons, 'warmP50DurationMs', report.warmP50DurationMs);\n requirePositive(failedReasons, 'warmP95DurationMs', report.warmP95DurationMs);\n }\n if (required.requireStorageRatio) {\n requirePositive(failedReasons, 'storageFactsBytes', report.storageFactsBytes);\n requirePositive(failedReasons, 'storageTotalBytes', report.storageTotalBytes);\n requirePositive(failedReasons, 'storageTotalToFactsRatio', report.storageTotalToFactsRatio);\n }\n\n return {\n id: report.id,\n path: report.path,\n generatedAt: report.generatedAt,\n matched: failedReasons.length === 0,\n failedReasons,\n };\n}\n\nfunction topLevelFailedReasons(\n snapshot: RdfBenchmarkReportCatalogSnapshot,\n candidates: RdfBenchmarkReportGateCandidate[],\n): string[] {\n if (snapshot.reports.length === 0) {\n return ['no benchmark reports found'];\n }\n const newest = candidates[0];\n if (!newest) {\n return ['no benchmark reports found'];\n }\n return [\n `no report satisfied the gate; newest report ${newest.path} failed`,\n ...newest.failedReasons,\n ];\n}\n\nfunction requireEqual(\n failedReasons: string[],\n label: string,\n actual: string | undefined,\n expected: string,\n): void {\n if (actual !== expected) {\n failedReasons.push(`${label} expected ${expected}, got ${actual ?? 'missing'}`);\n }\n}\n\nfunction requireAtLeast(\n failedReasons: string[],\n label: string,\n actual: number | undefined,\n expected: number,\n): void {\n if (!Number.isFinite(actual) || (actual ?? 0) < expected) {\n failedReasons.push(`${label} expected >= ${expected}, got ${actual ?? 'missing'}`);\n }\n}\n\nfunction requirePositive(failedReasons: string[], label: string, actual: number | undefined): void {\n if (!Number.isFinite(actual) || (actual ?? 0) <= 0) {\n failedReasons.push(`${label} expected > 0, got ${actual ?? 'missing'}`);\n }\n}\n\nfunction requireNonNegative(failedReasons: string[], label: string, actual: number | undefined): void {\n if (!Number.isFinite(actual) || (actual ?? -1) < 0) {\n failedReasons.push(`${label} expected >= 0, got ${actual ?? 'missing'}`);\n }\n}\n\nfunction positiveOrDefault(value: number | undefined, defaultValue: number): number {\n return typeof value === 'number' && Number.isFinite(value) && value > 0 ? Math.floor(value) : defaultValue;\n}\n\nfunction nonNegativeOrDefault(value: number | undefined, defaultValue: number): number {\n return typeof value === 'number' && Number.isFinite(value) && value >= 0 ? Math.floor(value) : defaultValue;\n}\n"]}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { EmbeddingService } from '../../ai/service';
|
|
2
|
+
import type { RdfEngineLike, RdfTextChunkInput, RdfTextSourceInput, RdfVectorSourceInput } from '../../storage/rdf/types';
|
|
3
|
+
import type { StoreContext } from '../chatkit/store';
|
|
4
|
+
export type RdfVectorIndexingSkippedReason = 'rdf_engine_unavailable' | 'vector_index_unavailable' | 'ai_config_unavailable' | 'embedding_model_unavailable' | 'embedding_provider_failed';
|
|
5
|
+
export interface RdfSearchIndexingServiceOptions {
|
|
6
|
+
rdfEngine?: Pick<RdfEngineLike, 'indexVectorSource' | 'deleteVectorSource'>;
|
|
7
|
+
store: {
|
|
8
|
+
getAiConfig(context: StoreContext): Promise<RdfSearchAiConfig | undefined> | RdfSearchAiConfig | undefined;
|
|
9
|
+
};
|
|
10
|
+
embeddingService: Pick<EmbeddingService, 'embedBatch'>;
|
|
11
|
+
maxChunks?: number;
|
|
12
|
+
maxEmbeddingInputChars?: number;
|
|
13
|
+
embeddingInputKinds?: RdfEmbeddingInputKind[];
|
|
14
|
+
projectionPolicyVersion?: string;
|
|
15
|
+
summaryService?: RdfEmbeddingSummaryService;
|
|
16
|
+
summaryPromptVersion?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface RdfSearchAiConfig {
|
|
19
|
+
providerId: string;
|
|
20
|
+
baseUrl: string;
|
|
21
|
+
proxyUrl?: string;
|
|
22
|
+
defaultModel?: string;
|
|
23
|
+
embeddingModel?: string;
|
|
24
|
+
embeddingModelVersion?: string;
|
|
25
|
+
apiKey: string;
|
|
26
|
+
credentialId: string;
|
|
27
|
+
}
|
|
28
|
+
export interface IndexRdfVectorSourceInput {
|
|
29
|
+
context: StoreContext;
|
|
30
|
+
source: RdfTextSourceInput & RdfVectorSourceInput;
|
|
31
|
+
text?: string;
|
|
32
|
+
chunks?: RdfTextChunkInput[];
|
|
33
|
+
}
|
|
34
|
+
export interface DeleteRdfVectorSourceInput {
|
|
35
|
+
source: string;
|
|
36
|
+
}
|
|
37
|
+
export type RdfVectorIndexingResult = {
|
|
38
|
+
status: 'indexed';
|
|
39
|
+
source: string;
|
|
40
|
+
model?: string;
|
|
41
|
+
chunkCount: number;
|
|
42
|
+
skippedInputs?: RdfSkippedEmbeddingInput[];
|
|
43
|
+
summarizedInputs?: RdfSummarizedEmbeddingInput[];
|
|
44
|
+
} | {
|
|
45
|
+
status: 'skipped';
|
|
46
|
+
source: string;
|
|
47
|
+
reason: RdfVectorIndexingSkippedReason;
|
|
48
|
+
message?: string;
|
|
49
|
+
};
|
|
50
|
+
export interface RdfVectorDeleteResult {
|
|
51
|
+
status: 'deleted' | 'skipped';
|
|
52
|
+
source: string;
|
|
53
|
+
deletedChunks: number;
|
|
54
|
+
reason?: 'rdf_engine_unavailable' | 'vector_index_unavailable';
|
|
55
|
+
}
|
|
56
|
+
export type RdfEmbeddingInputKind = 'locator' | 'semantic';
|
|
57
|
+
export interface RdfSkippedEmbeddingInput {
|
|
58
|
+
chunkKey: string;
|
|
59
|
+
inputKind: RdfEmbeddingInputKind;
|
|
60
|
+
reason: 'input_too_large' | 'summary_failed' | 'summary_too_large';
|
|
61
|
+
inputChars: number;
|
|
62
|
+
maxChars: number;
|
|
63
|
+
summaryChars?: number;
|
|
64
|
+
message?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface RdfEmbeddingSummaryRequest {
|
|
67
|
+
content: string;
|
|
68
|
+
inputKind: RdfEmbeddingInputKind;
|
|
69
|
+
chunkKey: string;
|
|
70
|
+
sourceHash?: string;
|
|
71
|
+
maxChars: number;
|
|
72
|
+
promptVersion: string;
|
|
73
|
+
}
|
|
74
|
+
export interface RdfEmbeddingSummaryResult {
|
|
75
|
+
content: string;
|
|
76
|
+
provider: string;
|
|
77
|
+
model: string;
|
|
78
|
+
promptVersion?: string;
|
|
79
|
+
rounds?: number;
|
|
80
|
+
}
|
|
81
|
+
export interface RdfEmbeddingSummaryService {
|
|
82
|
+
summarize(request: RdfEmbeddingSummaryRequest): Promise<RdfEmbeddingSummaryResult> | RdfEmbeddingSummaryResult;
|
|
83
|
+
}
|
|
84
|
+
export interface RdfSummarizedEmbeddingInput {
|
|
85
|
+
chunkKey: string;
|
|
86
|
+
inputKind: RdfEmbeddingInputKind;
|
|
87
|
+
originalChars: number;
|
|
88
|
+
summaryChars: number;
|
|
89
|
+
rounds: number;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Product-level bridge from Pod-owned AI credentials to the RDF vector index.
|
|
93
|
+
*
|
|
94
|
+
* CSS storage writes can keep text search sources current because they already
|
|
95
|
+
* have the resource bytes. Vector writes need user Pod AI credentials, so they
|
|
96
|
+
* live here at the product/service boundary instead of inside MixDataAccessor.
|
|
97
|
+
*/
|
|
98
|
+
export declare class RdfSearchIndexingService {
|
|
99
|
+
private readonly options;
|
|
100
|
+
constructor(options: RdfSearchIndexingServiceOptions);
|
|
101
|
+
indexVectorSource(input: IndexRdfVectorSourceInput): Promise<RdfVectorIndexingResult>;
|
|
102
|
+
deleteVectorSource(input: DeleteRdfVectorSourceInput): Promise<RdfVectorDeleteResult>;
|
|
103
|
+
private sourceWithHash;
|
|
104
|
+
private textChunks;
|
|
105
|
+
private embeddingInputs;
|
|
106
|
+
private embeddingInputKinds;
|
|
107
|
+
private projectionPolicyVersion;
|
|
108
|
+
private embeddingInputContent;
|
|
109
|
+
private resolveEmbeddingInputBudget;
|
|
110
|
+
private summarizeEmbeddingInput;
|
|
111
|
+
private skippedEmbeddingInput;
|
|
112
|
+
private indexedResult;
|
|
113
|
+
}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RdfSearchIndexingService = void 0;
|
|
4
|
+
const node_crypto_1 = require("node:crypto");
|
|
5
|
+
const RdfTextIndex_1 = require("../../storage/rdf/RdfTextIndex");
|
|
6
|
+
const DEFAULT_EMBEDDING_INPUT_KINDS = ['semantic'];
|
|
7
|
+
const DEFAULT_PROJECTION_POLICY_VERSION = 'rdf-vector-projection-v1';
|
|
8
|
+
const DEFAULT_SUMMARY_PROMPT_VERSION = 'rdf-embedding-summary-v1';
|
|
9
|
+
/**
|
|
10
|
+
* Product-level bridge from Pod-owned AI credentials to the RDF vector index.
|
|
11
|
+
*
|
|
12
|
+
* CSS storage writes can keep text search sources current because they already
|
|
13
|
+
* have the resource bytes. Vector writes need user Pod AI credentials, so they
|
|
14
|
+
* live here at the product/service boundary instead of inside MixDataAccessor.
|
|
15
|
+
*/
|
|
16
|
+
class RdfSearchIndexingService {
|
|
17
|
+
constructor(options) {
|
|
18
|
+
this.options = options;
|
|
19
|
+
}
|
|
20
|
+
async indexVectorSource(input) {
|
|
21
|
+
if (!this.options.rdfEngine) {
|
|
22
|
+
return { status: 'skipped', source: input.source.source, reason: 'rdf_engine_unavailable' };
|
|
23
|
+
}
|
|
24
|
+
if (!this.options.rdfEngine.indexVectorSource) {
|
|
25
|
+
return { status: 'skipped', source: input.source.source, reason: 'vector_index_unavailable' };
|
|
26
|
+
}
|
|
27
|
+
const source = this.sourceWithHash(input.source, input.text);
|
|
28
|
+
const textChunks = this.textChunks(source, input);
|
|
29
|
+
if (textChunks.length === 0) {
|
|
30
|
+
await this.options.rdfEngine.indexVectorSource(source, []);
|
|
31
|
+
return { status: 'indexed', source: source.source, chunkCount: 0 };
|
|
32
|
+
}
|
|
33
|
+
const { accepted: embeddingInputs, skipped: skippedInputs, summarized: summarizedInputs } = await this.resolveEmbeddingInputBudget(source, this.embeddingInputs(source, textChunks));
|
|
34
|
+
if (embeddingInputs.length === 0) {
|
|
35
|
+
await this.options.rdfEngine.indexVectorSource(source, []);
|
|
36
|
+
return this.indexedResult(source.source, undefined, 0, skippedInputs, summarizedInputs);
|
|
37
|
+
}
|
|
38
|
+
const config = await this.options.store.getAiConfig(input.context);
|
|
39
|
+
if (!config?.apiKey) {
|
|
40
|
+
return { status: 'skipped', source: source.source, reason: 'ai_config_unavailable' };
|
|
41
|
+
}
|
|
42
|
+
if (!config.embeddingModel) {
|
|
43
|
+
return { status: 'skipped', source: source.source, reason: 'embedding_model_unavailable' };
|
|
44
|
+
}
|
|
45
|
+
const contents = embeddingInputs.map((embeddingInput) => embeddingInput.content);
|
|
46
|
+
let embeddings;
|
|
47
|
+
try {
|
|
48
|
+
embeddings = await this.options.embeddingService.embedBatch(contents, {
|
|
49
|
+
provider: config.providerId,
|
|
50
|
+
apiKey: config.apiKey,
|
|
51
|
+
baseUrl: config.baseUrl,
|
|
52
|
+
proxyUrl: config.proxyUrl,
|
|
53
|
+
}, config.embeddingModel);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
return {
|
|
57
|
+
status: 'skipped',
|
|
58
|
+
source: source.source,
|
|
59
|
+
reason: 'embedding_provider_failed',
|
|
60
|
+
message: error instanceof Error ? error.message : String(error),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
if (embeddings.length !== embeddingInputs.length) {
|
|
64
|
+
throw new Error(`Embedding batch returned ${embeddings.length} vectors for ${embeddingInputs.length} RDF embedding inputs`);
|
|
65
|
+
}
|
|
66
|
+
const projectionPolicyVersion = this.projectionPolicyVersion();
|
|
67
|
+
await this.options.rdfEngine.indexVectorSource(source, embeddingInputs.map(({ chunk, kind, content, inputHash, summaryMetadata }, index) => ({
|
|
68
|
+
chunkKey: chunk.chunkKey,
|
|
69
|
+
ordinal: chunk.ordinal,
|
|
70
|
+
level: chunk.level,
|
|
71
|
+
embedding: embeddings[index],
|
|
72
|
+
provider: config.providerId,
|
|
73
|
+
model: config.embeddingModel,
|
|
74
|
+
modelVersion: config.embeddingModelVersion,
|
|
75
|
+
inputKind: kind,
|
|
76
|
+
inputHash,
|
|
77
|
+
projectionPolicyVersion,
|
|
78
|
+
heading: chunk.heading,
|
|
79
|
+
path: chunk.path,
|
|
80
|
+
content,
|
|
81
|
+
startOffset: chunk.startOffset,
|
|
82
|
+
endOffset: chunk.endOffset,
|
|
83
|
+
summaryMetadata,
|
|
84
|
+
})));
|
|
85
|
+
return this.indexedResult(source.source, config.embeddingModel, embeddingInputs.length, skippedInputs, summarizedInputs);
|
|
86
|
+
}
|
|
87
|
+
async deleteVectorSource(input) {
|
|
88
|
+
if (!this.options.rdfEngine) {
|
|
89
|
+
return {
|
|
90
|
+
status: 'skipped',
|
|
91
|
+
source: input.source,
|
|
92
|
+
deletedChunks: 0,
|
|
93
|
+
reason: 'rdf_engine_unavailable',
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
if (!this.options.rdfEngine.deleteVectorSource) {
|
|
97
|
+
return {
|
|
98
|
+
status: 'skipped',
|
|
99
|
+
source: input.source,
|
|
100
|
+
deletedChunks: 0,
|
|
101
|
+
reason: 'vector_index_unavailable',
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
const deletedChunks = await this.options.rdfEngine.deleteVectorSource(input.source);
|
|
105
|
+
return {
|
|
106
|
+
status: 'deleted',
|
|
107
|
+
source: input.source,
|
|
108
|
+
deletedChunks,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
sourceWithHash(source, text) {
|
|
112
|
+
if (source.sourceHash || text === undefined) {
|
|
113
|
+
return source;
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
...source,
|
|
117
|
+
sourceHash: (0, node_crypto_1.createHash)('sha256').update(text).digest('hex'),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
textChunks(source, input) {
|
|
121
|
+
const chunks = input.chunks ?? (input.text !== undefined ? (0, RdfTextIndex_1.chunkRdfTextSource)(source, input.text) : []);
|
|
122
|
+
const maxChunks = this.options.maxChunks;
|
|
123
|
+
const filtered = chunks.filter((chunk) => chunk.content.trim().length > 0);
|
|
124
|
+
return maxChunks && maxChunks > 0 ? filtered.slice(0, maxChunks) : filtered;
|
|
125
|
+
}
|
|
126
|
+
embeddingInputs(source, chunks) {
|
|
127
|
+
const kinds = this.embeddingInputKinds();
|
|
128
|
+
const inputs = [];
|
|
129
|
+
for (const chunk of chunks) {
|
|
130
|
+
for (const kind of kinds) {
|
|
131
|
+
const content = this.embeddingInputContent(source, chunk, kind);
|
|
132
|
+
if (!content) {
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
inputs.push({
|
|
136
|
+
kind,
|
|
137
|
+
chunk,
|
|
138
|
+
content,
|
|
139
|
+
inputHash: (0, node_crypto_1.createHash)('sha256').update(content).digest('hex'),
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return inputs;
|
|
144
|
+
}
|
|
145
|
+
embeddingInputKinds() {
|
|
146
|
+
const configured = this.options.embeddingInputKinds?.length
|
|
147
|
+
? this.options.embeddingInputKinds
|
|
148
|
+
: DEFAULT_EMBEDDING_INPUT_KINDS;
|
|
149
|
+
return [...new Set(configured)];
|
|
150
|
+
}
|
|
151
|
+
projectionPolicyVersion() {
|
|
152
|
+
return this.options.projectionPolicyVersion ?? DEFAULT_PROJECTION_POLICY_VERSION;
|
|
153
|
+
}
|
|
154
|
+
embeddingInputContent(source, chunk, kind) {
|
|
155
|
+
if (kind === 'semantic') {
|
|
156
|
+
return chunk.content.trim();
|
|
157
|
+
}
|
|
158
|
+
const sections = [];
|
|
159
|
+
const path = source.localPath?.split(/[\\/]+/).filter(Boolean).join(' / ');
|
|
160
|
+
if (path) {
|
|
161
|
+
sections.push(`Path: ${path}`);
|
|
162
|
+
}
|
|
163
|
+
const headingPath = chunk.path?.length ? chunk.path : (chunk.heading ? [chunk.heading] : []);
|
|
164
|
+
if (headingPath.length > 0) {
|
|
165
|
+
sections.push(`Heading: ${headingPath.join(' / ')}`);
|
|
166
|
+
}
|
|
167
|
+
return sections.join('\n').trim();
|
|
168
|
+
}
|
|
169
|
+
async resolveEmbeddingInputBudget(source, inputs) {
|
|
170
|
+
const maxChars = this.options.maxEmbeddingInputChars;
|
|
171
|
+
if (!maxChars || maxChars <= 0) {
|
|
172
|
+
return { accepted: inputs, skipped: [], summarized: [] };
|
|
173
|
+
}
|
|
174
|
+
const accepted = [];
|
|
175
|
+
const skipped = [];
|
|
176
|
+
const summarized = [];
|
|
177
|
+
for (const input of inputs) {
|
|
178
|
+
if (input.content.length > maxChars) {
|
|
179
|
+
const summary = await this.summarizeEmbeddingInput(source, input, maxChars);
|
|
180
|
+
if ('input' in summary) {
|
|
181
|
+
accepted.push(summary.input);
|
|
182
|
+
summarized.push(summary.summary);
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
skipped.push(summary.skipped);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
accepted.push(input);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return { accepted, skipped, summarized };
|
|
193
|
+
}
|
|
194
|
+
async summarizeEmbeddingInput(source, input, maxChars) {
|
|
195
|
+
const service = this.options.summaryService;
|
|
196
|
+
if (!service) {
|
|
197
|
+
return { skipped: this.skippedEmbeddingInput(input, maxChars, 'input_too_large') };
|
|
198
|
+
}
|
|
199
|
+
const promptVersion = this.options.summaryPromptVersion ?? DEFAULT_SUMMARY_PROMPT_VERSION;
|
|
200
|
+
let result;
|
|
201
|
+
try {
|
|
202
|
+
result = await service.summarize({
|
|
203
|
+
content: input.content,
|
|
204
|
+
inputKind: input.kind,
|
|
205
|
+
chunkKey: input.chunk.chunkKey,
|
|
206
|
+
sourceHash: source.sourceHash,
|
|
207
|
+
maxChars,
|
|
208
|
+
promptVersion,
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
catch (error) {
|
|
212
|
+
return {
|
|
213
|
+
skipped: this.skippedEmbeddingInput(input, maxChars, 'summary_failed', error instanceof Error ? error.message : String(error)),
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
const content = result.content.trim();
|
|
217
|
+
if (!content || content.length > maxChars) {
|
|
218
|
+
return {
|
|
219
|
+
skipped: this.skippedEmbeddingInput(input, maxChars, 'summary_too_large', undefined, content.length),
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
const rounds = result.rounds ?? 1;
|
|
223
|
+
const summaryMetadata = {
|
|
224
|
+
status: 'summarized',
|
|
225
|
+
provider: result.provider,
|
|
226
|
+
model: result.model,
|
|
227
|
+
promptVersion: result.promptVersion ?? promptVersion,
|
|
228
|
+
...(source.sourceHash ? { sourceHash: source.sourceHash } : {}),
|
|
229
|
+
originalChars: input.content.length,
|
|
230
|
+
summaryChars: content.length,
|
|
231
|
+
rounds,
|
|
232
|
+
};
|
|
233
|
+
return {
|
|
234
|
+
input: {
|
|
235
|
+
...input,
|
|
236
|
+
content,
|
|
237
|
+
inputHash: (0, node_crypto_1.createHash)('sha256').update(content).digest('hex'),
|
|
238
|
+
summaryMetadata,
|
|
239
|
+
},
|
|
240
|
+
summary: {
|
|
241
|
+
chunkKey: input.chunk.chunkKey,
|
|
242
|
+
inputKind: input.kind,
|
|
243
|
+
originalChars: input.content.length,
|
|
244
|
+
summaryChars: content.length,
|
|
245
|
+
rounds,
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
skippedEmbeddingInput(input, maxChars, reason, message, summaryChars) {
|
|
250
|
+
return {
|
|
251
|
+
chunkKey: input.chunk.chunkKey,
|
|
252
|
+
inputKind: input.kind,
|
|
253
|
+
reason,
|
|
254
|
+
inputChars: input.content.length,
|
|
255
|
+
maxChars,
|
|
256
|
+
...(summaryChars !== undefined ? { summaryChars } : {}),
|
|
257
|
+
...(message ? { message } : {}),
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
indexedResult(source, model, chunkCount, skippedInputs, summarizedInputs = []) {
|
|
261
|
+
return {
|
|
262
|
+
status: 'indexed',
|
|
263
|
+
source,
|
|
264
|
+
...(model ? { model } : {}),
|
|
265
|
+
chunkCount,
|
|
266
|
+
...(skippedInputs.length > 0 ? { skippedInputs } : {}),
|
|
267
|
+
...(summarizedInputs.length > 0 ? { summarizedInputs } : {}),
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
exports.RdfSearchIndexingService = RdfSearchIndexingService;
|
|
272
|
+
//# sourceMappingURL=RdfSearchIndexingService.js.map
|