@undefineds.co/xpod 0.4.10 → 0.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/components-ignore.json +5 -1
- package/config/notifications.json +68 -0
- package/config/xpod.base.json +9 -11
- package/dist/ai/service/AiCredentialSecret.d.ts +30 -0
- package/dist/ai/service/AiCredentialSecret.js +120 -0
- package/dist/ai/service/CredentialReaderImpl.d.ts +18 -0
- package/dist/ai/service/CredentialReaderImpl.js +81 -5
- package/dist/ai/service/CredentialReaderImpl.jsonld +42 -2
- package/dist/ai/service/EmbeddingModelPolicy.d.ts +79 -0
- package/dist/ai/service/EmbeddingModelPolicy.js +134 -0
- package/dist/ai/service/EmbeddingProviderError.js +6 -0
- package/dist/ai/service/EmbeddingServiceImpl.d.ts +13 -1
- package/dist/ai/service/EmbeddingServiceImpl.js +18 -5
- package/dist/ai/service/EmbeddingServiceImpl.jsonld +35 -0
- package/dist/ai/service/index.d.ts +2 -0
- package/dist/ai/service/index.js +2 -0
- package/dist/api/ai-gateway/connect/index.d.ts +20 -2
- package/dist/api/ai-gateway/connect/index.js +162 -16
- package/dist/api/ai-gateway/credentials/AiCredentialSecretDecoder.d.ts +12 -0
- package/dist/api/ai-gateway/credentials/AiCredentialSecretDecoder.js +30 -0
- package/dist/api/ai-gateway/errors.d.ts +1 -1
- package/dist/api/ai-gateway/models/GatewayEmbeddingModelCatalog.d.ts +11 -0
- package/dist/api/ai-gateway/models/GatewayEmbeddingModelCatalog.js +31 -0
- package/dist/api/ai-gateway/models/PodModelSelectionRepository.js +7 -3
- package/dist/api/ai-gateway/models/ProviderCustomModelsService.d.ts +18 -0
- package/dist/api/ai-gateway/models/ProviderCustomModelsService.js +23 -0
- package/dist/api/ai-gateway/models/ProviderModelDiscoveryAdapters.d.ts +3 -1
- package/dist/api/ai-gateway/models/ProviderModelDiscoveryAdapters.js +2 -45
- package/dist/api/ai-gateway/models/ProviderModelSelectionService.d.ts +10 -0
- package/dist/api/ai-gateway/models/ProviderModelSelectionService.js +57 -20
- package/dist/api/ai-gateway/models/ProviderModelType.d.ts +28 -0
- package/dist/api/ai-gateway/models/ProviderModelType.js +34 -0
- package/dist/api/ai-gateway/models/ProviderModelsAdapter.d.ts +10 -0
- package/dist/api/ai-gateway/models/ProviderModelsAdapter.js +3 -4
- package/dist/api/ai-gateway/models/index.d.ts +1 -0
- package/dist/api/ai-gateway/models/index.js +3 -1
- package/dist/api/ai-gateway/providers/CustomRuntimeAdapter.d.ts +7 -0
- package/dist/api/ai-gateway/providers/CustomRuntimeAdapter.js +9 -2
- package/dist/api/ai-gateway/providers/ModelsDevCatalog.d.ts +7 -1
- package/dist/api/ai-gateway/providers/ModelsDevCatalog.js +4 -10
- package/dist/api/ai-gateway/providers/ProviderRegistry.d.ts +107 -0
- package/dist/api/ai-gateway/providers/ProviderRegistry.js +244 -21
- package/dist/api/ai-gateway/providers/ProviderRuntimeRegistry.d.ts +5 -0
- package/dist/api/ai-gateway/providers/ProviderRuntimeRegistry.js +5 -1
- package/dist/api/ai-gateway/quota/SubscriptionQuotaAdapters.d.ts +12 -4
- package/dist/api/ai-gateway/quota/SubscriptionQuotaAdapters.js +11 -11
- package/dist/api/ai-gateway/routing/ModelRouter.d.ts +14 -0
- package/dist/api/ai-gateway/routing/ModelRouter.js +43 -4
- package/dist/api/ai-gateway/service-access/AiConnectionsServiceAccess.d.ts +9 -1
- package/dist/api/ai-gateway/service-access/AiConnectionsServiceAccess.js +3 -27
- package/dist/api/auth/ClientCredentialsAuthenticator.d.ts +0 -1
- package/dist/api/auth/ClientCredentialsAuthenticator.js +0 -3
- package/dist/api/auth/index.d.ts +1 -0
- package/dist/api/auth/index.js +1 -1
- package/dist/api/chatkit/pod-store.d.ts +31 -0
- package/dist/api/chatkit/pod-store.js +132 -8
- package/dist/api/container/common.js +24 -4
- package/dist/api/container/routes.js +17 -2
- package/dist/api/container/types.d.ts +3 -1
- package/dist/api/handlers/AdminHandler.d.ts +13 -0
- package/dist/api/handlers/AdminHandler.js +47 -18
- package/dist/api/handlers/AiConfigHandler.d.ts +6 -0
- package/dist/api/handlers/AiConfigHandler.js +28 -0
- package/dist/api/handlers/AiGatewayManagementHandler.js +36 -0
- package/dist/api/runs/RdfRunContextRetriever.d.ts +14 -0
- package/dist/api/runs/RdfRunContextRetriever.js +41 -5
- package/dist/api/runtime.js +2 -1
- package/dist/cli/commands/secret.d.ts +1 -0
- package/dist/cli/commands/secret.js +25 -7
- package/dist/components/components.jsonld +3 -1
- package/dist/components/context.jsonld +53 -1
- package/dist/http/SubgraphSparqlHttpHandler.d.ts +59 -2
- package/dist/http/SubgraphSparqlHttpHandler.js +145 -13
- package/dist/http/SubgraphSparqlHttpHandler.jsonld +37 -0
- package/dist/identity/drizzle/AccountRoleRepository.d.ts +30 -2
- package/dist/identity/drizzle/AccountRoleRepository.js +163 -15
- package/dist/identity/drizzle/EdgeNodeRepository.d.ts +0 -12
- package/dist/identity/drizzle/EdgeNodeRepository.js +5 -13
- package/dist/identity/drizzle/PodLookupRepository.d.ts +58 -4
- package/dist/identity/drizzle/PodLookupRepository.js +248 -105
- package/dist/identity/drizzle/db.d.ts +19 -0
- package/dist/identity/drizzle/db.js +39 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -3
- package/dist/logging/log-file.d.ts +17 -0
- package/dist/logging/log-file.js +69 -0
- package/dist/main.js +2 -1
- package/dist/notifications/NotificationChannelSweeper.d.ts +50 -0
- package/dist/notifications/NotificationChannelSweeper.js +131 -0
- package/dist/notifications/NotificationChannelSweeper.jsonld +136 -0
- package/dist/notifications/ReclaimingWebSocket2023Storer.d.ts +25 -0
- package/dist/notifications/ReclaimingWebSocket2023Storer.js +56 -0
- package/dist/notifications/ReclaimingWebSocket2023Storer.jsonld +77 -0
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.js +2 -0
- package/dist/runtime/Proxy.d.ts +37 -0
- package/dist/runtime/Proxy.js +88 -16
- package/dist/runtime/bootstrap.js +2 -1
- package/dist/runtime/upgrade/BunNativeUpgradeRelay.d.ts +116 -0
- package/dist/runtime/upgrade/BunNativeUpgradeRelay.js +423 -0
- package/dist/runtime/upgrade/UpgradeHandshake.d.ts +63 -0
- package/dist/runtime/upgrade/UpgradeHandshake.js +199 -0
- package/dist/runtime/upgrade/WebSocketFrames.d.ts +67 -0
- package/dist/runtime/upgrade/WebSocketFrames.js +224 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.js +8 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiAuthorizationActions.d.ts +11 -2
- package/node_modules/@undefineds.co/ai-connections/dist/AiAuthorizationActions.js +27 -10
- package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.d.ts +7 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.js +13 -11
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectDialog.js +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsList.js +10 -6
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsMain.d.ts +15 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsMain.js +29 -3
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsMainHeader.js +18 -3
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.d.ts +16 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.js +92 -20
- package/node_modules/@undefineds.co/ai-connections/dist/AiCopyButton.d.ts +35 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiCopyButton.js +45 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialPoolSection.js +71 -11
- package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialRow.js +9 -7
- package/node_modules/@undefineds.co/ai-connections/dist/AiEndpointList.d.ts +23 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiEndpointList.js +24 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.d.ts +13 -4
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.js +35 -38
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayModelsSection.d.ts +21 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayModelsSection.js +51 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiInfoTooltip.d.ts +15 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiInfoTooltip.js +16 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiModelCatalog.d.ts +175 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiModelCatalog.js +133 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiOfferingDetails.js +2 -2
- package/node_modules/@undefineds.co/ai-connections/dist/AiProviderCard.js +13 -64
- package/node_modules/@undefineds.co/ai-connections/dist/AiProviderHeader.d.ts +21 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiProviderHeader.js +12 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiRowAction.d.ts +15 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiRowAction.js +12 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiSortableCredentialList.js +2 -1
- package/node_modules/@undefineds.co/ai-connections/dist/ai-connections-client.d.ts +7 -0
- package/node_modules/@undefineds.co/ai-connections/dist/ai-connections-client.js +6 -0
- package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.d.ts +36 -5
- package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.js +52 -9
- package/node_modules/@undefineds.co/ai-connections/dist/client/normalize.js +30 -3
- package/node_modules/@undefineds.co/ai-connections/dist/client/types.d.ts +21 -1
- package/node_modules/@undefineds.co/ai-connections/dist/client-config/base-adapter.d.ts +1 -3
- package/node_modules/@undefineds.co/ai-connections/dist/client-config/base-adapter.js +3 -7
- package/node_modules/@undefineds.co/ai-connections/dist/client-config/index.cjs +9 -7
- package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.d.ts +46 -0
- package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.js +231 -0
- package/node_modules/@undefineds.co/ai-connections/dist/collections.d.ts +119 -0
- package/node_modules/@undefineds.co/ai-connections/dist/collections.js +173 -0
- package/node_modules/@undefineds.co/ai-connections/dist/controller.d.ts +71 -5
- package/node_modules/@undefineds.co/ai-connections/dist/controller.js +285 -16
- package/node_modules/@undefineds.co/ai-connections/dist/credential-labels.d.ts +5 -0
- package/node_modules/@undefineds.co/ai-connections/dist/credential-labels.js +8 -3
- package/node_modules/@undefineds.co/ai-connections/dist/credential-storage.d.ts +59 -0
- package/node_modules/@undefineds.co/ai-connections/dist/credential-storage.js +131 -0
- package/node_modules/@undefineds.co/ai-connections/dist/endpoint-urls.d.ts +15 -0
- package/node_modules/@undefineds.co/ai-connections/dist/endpoint-urls.js +20 -0
- package/node_modules/@undefineds.co/ai-connections/dist/gateway-endpoints.d.ts +14 -0
- package/node_modules/@undefineds.co/ai-connections/dist/gateway-endpoints.js +20 -0
- package/node_modules/@undefineds.co/ai-connections/dist/index.d.ts +8 -0
- package/node_modules/@undefineds.co/ai-connections/dist/index.js +8 -0
- package/node_modules/@undefineds.co/ai-connections/dist/manifest.js +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/offering-endpoints.d.ts +14 -0
- package/node_modules/@undefineds.co/ai-connections/dist/offering-endpoints.js +17 -0
- package/node_modules/@undefineds.co/ai-connections/dist/provider-catalog.cjs +68 -1
- package/node_modules/@undefineds.co/ai-connections/dist/provider-catalog.d.ts +75 -1
- package/node_modules/@undefineds.co/ai-connections/dist/provider-catalog.js +119 -0
- package/node_modules/@undefineds.co/ai-connections/dist/provider-visuals.d.ts +5 -0
- package/node_modules/@undefineds.co/ai-connections/dist/provider-visuals.js +5 -0
- package/node_modules/@undefineds.co/ai-connections/dist/service-access.js +2 -27
- package/node_modules/@undefineds.co/ai-connections/package.json +1 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/manifest.d.ts +1 -1
- package/node_modules/@undefineds.co/extension-sdk/dist/manifest.js +2 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/web.d.ts +150 -0
- package/node_modules/@undefineds.co/extension-sdk/package.json +2 -1
- package/node_modules/@undefineds.co/models/README.md +1 -1
- package/node_modules/@undefineds.co/models/dist/ai-config/index.d.ts +3 -3
- package/node_modules/@undefineds.co/models/dist/ai-gateway.schema.d.ts +5 -0
- package/node_modules/@undefineds.co/models/dist/ai-gateway.schema.js +9 -0
- package/node_modules/@undefineds.co/models/dist/ai-runtime.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/approval.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/audit.presentation.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/capture.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/chat-project.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/chat.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/control-request.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/conversation-share.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/credential.schema.d.ts +12 -0
- package/node_modules/@undefineds.co/models/dist/credential.schema.js +15 -1
- package/node_modules/@undefineds.co/models/dist/discovery/index.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/discovery/providers.json +248 -7
- package/node_modules/@undefineds.co/models/dist/discovery/types.d.ts +31 -0
- package/node_modules/@undefineds.co/models/dist/extension/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/favorite/index.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/fixtures/contracts-chat-contact.d.ts +5 -5
- package/node_modules/@undefineds.co/models/dist/import/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/index.d.ts +73 -73
- package/node_modules/@undefineds.co/models/dist/index.js +1 -1
- package/node_modules/@undefineds.co/models/dist/input-request.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/knowledge/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/message.repository.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/namespaces.js +5 -0
- package/node_modules/@undefineds.co/models/dist/pod-storage-descriptor.d.ts +4815 -26
- package/node_modules/@undefineds.co/models/dist/pod-storage-descriptor.js +482 -132
- package/node_modules/@undefineds.co/models/dist/schema.d.ts +4 -0
- package/node_modules/@undefineds.co/models/dist/session/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/settings/index.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/sidecar/persistence-mapping.d.ts +5 -5
- package/node_modules/@undefineds.co/models/dist/thread.repository.d.ts +2 -2
- package/node_modules/@undefineds.co/models/dist/types/message-block.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/vocab/_namespaces.d.ts +1 -1
- package/node_modules/@undefineds.co/models/dist/vocab/index.d.ts +10 -10
- package/node_modules/@undefineds.co/models/dist/vocab/sidecar.vocab.d.ts +1 -0
- package/node_modules/@undefineds.co/models/dist/vocab/sidecar.vocab.js +1 -0
- package/node_modules/@undefineds.co/models/package.json +4 -2
- package/node_modules/@undefineds.co/pod-collections/README.md +71 -0
- package/node_modules/@undefineds.co/pod-collections/dist/diff.d.ts +85 -0
- package/node_modules/@undefineds.co/pod-collections/dist/diff.js +166 -0
- package/node_modules/@undefineds.co/pod-collections/dist/feed.d.ts +17 -0
- package/node_modules/@undefineds.co/pod-collections/dist/feed.js +27 -0
- package/node_modules/@undefineds.co/pod-collections/dist/index.cjs +1042 -0
- package/node_modules/@undefineds.co/pod-collections/dist/index.d.ts +37 -0
- package/node_modules/@undefineds.co/pod-collections/dist/index.js +89 -0
- package/node_modules/@undefineds.co/pod-collections/dist/layout.d.ts +75 -0
- package/node_modules/@undefineds.co/pod-collections/dist/layout.js +173 -0
- package/node_modules/@undefineds.co/pod-collections/dist/mapping.d.ts +78 -0
- package/node_modules/@undefineds.co/pod-collections/dist/mapping.js +287 -0
- package/node_modules/@undefineds.co/pod-collections/dist/mutations.d.ts +83 -0
- package/node_modules/@undefineds.co/pod-collections/dist/mutations.js +273 -0
- package/node_modules/@undefineds.co/pod-collections/dist/react.d.ts +21 -0
- package/node_modules/@undefineds.co/pod-collections/dist/react.js +22 -0
- package/node_modules/@undefineds.co/pod-collections/dist/read.d.ts +65 -0
- package/node_modules/@undefineds.co/pod-collections/dist/read.js +31 -0
- package/node_modules/@undefineds.co/pod-collections/dist/sync.d.ts +66 -0
- package/node_modules/@undefineds.co/pod-collections/dist/sync.js +260 -0
- package/node_modules/@undefineds.co/pod-collections/dist/types.d.ts +155 -0
- package/node_modules/@undefineds.co/pod-collections/dist/types.js +9 -0
- package/node_modules/@undefineds.co/pod-collections/package.json +42 -0
- package/node_modules/@undefineds.co/shared-ui/dist/index.d.ts +0 -1
- package/node_modules/@undefineds.co/shared-ui/dist/index.js +0 -1
- package/package.json +15 -7
- package/static/app/assets/main.css +1 -1
- package/static/app/assets/main.js +12 -13
- package/static/auth-callback/assets/AiConfigContext-DnQs1ZpW.js +1 -0
- package/static/auth-callback/assets/AiConfigPage-DOtvlxH0.js +1 -0
- package/static/auth-callback/assets/DocumentProcessingPanel-BS2voQgL.js +1 -0
- package/static/auth-callback/assets/IndexLifecyclePanel-Cvt0cJtN.js +1 -0
- package/static/auth-callback/assets/{IndexSubjectPanel-C4YG0whI.js → IndexSubjectPanel-Dhf01GqF.js} +1 -1
- package/static/auth-callback/assets/ModelAssignmentsPanel-BJutWaAF.js +1 -0
- package/static/auth-callback/assets/ModelsPage-BRS0sje3.js +11 -0
- package/static/auth-callback/assets/{NetworkPage-Cbdn_P1e.js → NetworkPage-B3qBfANA.js} +2 -2
- package/static/auth-callback/assets/{PaneListHeader-jy70Q00L.js → PaneListHeader-QQeJGTp4.js} +1 -1
- package/static/auth-callback/assets/SearchIndexingPanel-MyNUSEwT.js +1 -0
- package/static/auth-callback/assets/{StatusSubjectPanel-hfjoB5aS.js → StatusSubjectPanel-DQkEVsFs.js} +1 -1
- package/static/{settings/assets/StatusWorkspace-CKD_Rzdr.js → auth-callback/assets/StatusWorkspace-Dkv63Uwk.js} +1 -1
- package/static/auth-callback/assets/SystemSettingsPage-TIsUfX5d.js +1 -0
- package/static/auth-callback/assets/SystemSettingsSubjectPanel-BJWEt2-7.js +33 -0
- package/static/auth-callback/assets/XpodAiConnectionsPodStore-BJiXm-PF.js +3 -0
- package/static/auth-callback/assets/{activity-BcsZZxxw.js → activity-5hNeNKnL.js} +1 -1
- package/static/auth-callback/assets/admin-C6qCRFiY.js +1 -0
- package/static/auth-callback/assets/ai-connections-CryuHGKW.js +1 -0
- package/static/auth-callback/assets/{auth-callback-atKg_oig.js → auth-callback-CAFZ3R0B.js} +80 -84
- package/static/auth-callback/assets/auth-callback-rk080mvG.css +1 -0
- package/static/auth-callback/assets/{badge-BWbRHThQ.js → badge-CAIPI0CB.js} +1 -1
- package/static/auth-callback/assets/collection-runtime-D9s7h9YA.js +1 -0
- package/static/auth-callback/assets/dialog-BjA109aX.js +1 -0
- package/static/auth-callback/assets/{download-BmvG1Vya.js → download-B3Up5W2G.js} +1 -1
- package/static/auth-callback/assets/{external-link-DZ34d3g3.js → external-link-BTXgSPzB.js} +1 -1
- package/static/auth-callback/assets/index-BppXlxcp.js +41 -0
- package/static/auth-callback/assets/index-CirW4CJf.js +1 -0
- package/static/auth-callback/assets/index-DlLYWOhw.js +4 -0
- package/static/auth-callback/assets/{index-browser-B9Z7GU-T.js → index-browser-DtU38ni3.js} +1 -1
- package/static/auth-callback/assets/{key-round-tjP76Se-.js → key-round-CQCOrZ7x.js} +1 -1
- package/static/auth-callback/assets/layout-DB3pMyTl.js +1 -0
- package/static/auth-callback/assets/pod-collections-host-KnnGFZHL.js +8 -0
- package/static/auth-callback/assets/{rotate-ccw-C_L5ZLx1.js → rotate-ccw-C1zM2KtS.js} +1 -1
- package/static/auth-callback/assets/settings-projection-CUkyprDQ.js +1 -0
- package/static/auth-callback/assets/{skeleton-C7tGDQIs.js → skeleton-Cqp7_M9-.js} +1 -1
- package/static/auth-callback/assets/{waypoints-VMNQlWdU.js → waypoints-Bj6gAUSQ.js} +1 -1
- package/static/auth-callback/assets/{workspace-layout-SAp6BtYK.js → workspace-layout-DK8mDzrY.js} +1 -1
- package/static/auth-callback/auth-callback.html +2 -2
- package/static/dashboard/assets/AiConfigContext-BsE7MqX8.js +1 -0
- package/static/dashboard/assets/AiConfigPage-DvM-lRXa.js +1 -0
- package/static/dashboard/assets/DocumentProcessingPanel-BPfdlfuf.js +1 -0
- package/static/dashboard/assets/IndexLifecyclePanel--m0AGxvh.js +1 -0
- package/static/dashboard/assets/{IndexSubjectPanel-DQFPP6-p.js → IndexSubjectPanel-Bb7m1k3d.js} +1 -1
- package/static/dashboard/assets/ModelAssignmentsPanel-BLi_zbMa.js +1 -0
- package/static/dashboard/assets/ModelsPage-CxdpgnfR.js +11 -0
- package/static/dashboard/assets/{NetworkPage-CHQ3YxIB.js → NetworkPage-BAIPw-D_.js} +2 -2
- package/static/dashboard/assets/{PaneListHeader-DsXemAdR.js → PaneListHeader-BBCMei0r.js} +1 -1
- package/static/dashboard/assets/SearchIndexingPanel-Ck4Y-xjR.js +1 -0
- package/static/dashboard/assets/{StatusSubjectPanel-D3PGEYT4.js → StatusSubjectPanel-D1KWfAXE.js} +1 -1
- package/static/dashboard/assets/{StatusWorkspace-BcpePYUW.js → StatusWorkspace-JbA5gzXx.js} +1 -1
- package/static/dashboard/assets/SystemSettingsPage-BbwQWsSR.js +1 -0
- package/static/dashboard/assets/SystemSettingsSubjectPanel-N117nMt5.js +33 -0
- package/static/dashboard/assets/XpodAiConnectionsPodStore-CdDOb4SV.js +18 -0
- package/static/dashboard/assets/{activity-j5zrznu-.js → activity-DX1I96o_.js} +1 -1
- package/static/dashboard/assets/admin-C6qCRFiY.js +1 -0
- package/static/dashboard/assets/ai-connections-DwCRqOQa.js +1 -0
- package/static/dashboard/assets/{badge-CzeBdG7h.js → badge-k2vhtDqH.js} +1 -1
- package/static/dashboard/assets/collection-runtime-BFQ8teQJ.js +1 -0
- package/static/dashboard/assets/{dashboard-D-xANHk1.js → dashboard-DWZ-fmCT.js} +105 -109
- package/static/dashboard/assets/dashboard-rk080mvG.css +1 -0
- package/static/dashboard/assets/dialog-1CCw-iHT.js +1 -0
- package/static/dashboard/assets/{download-IcNdEZWi.js → download-C6-SNY1q.js} +1 -1
- package/static/dashboard/assets/{external-link-DxBxK8Vu.js → external-link-BgPcZ_j2.js} +1 -1
- package/static/dashboard/assets/index-6LcIUIYO.js +1 -0
- package/static/dashboard/assets/index-D7A8U6Pt.js +41 -0
- package/static/dashboard/assets/index-UD6QOE7H.js +4 -0
- package/static/dashboard/assets/{key-round-D1K7warM.js → key-round-BOd7Jo0Q.js} +1 -1
- package/static/dashboard/assets/layout-DB3pMyTl.js +1 -0
- package/static/dashboard/assets/pod-collections-host-KnnGFZHL.js +8 -0
- package/static/dashboard/assets/{rotate-ccw-CcN1N6p9.js → rotate-ccw-CCgJqsvx.js} +1 -1
- package/static/dashboard/assets/settings-projection-CUkyprDQ.js +1 -0
- package/static/dashboard/assets/{skeleton-CKnmJMUH.js → skeleton-Bc7abAn5.js} +1 -1
- package/static/dashboard/assets/{waypoints-DuZPO_wu.js → waypoints-s-opmJxx.js} +1 -1
- package/static/dashboard/assets/{workspace-layout-BUj3wZ_m.js → workspace-layout-DqIQeTBV.js} +1 -1
- package/static/dashboard/dashboard.html +2 -2
- package/static/settings/assets/AiConfigContext-BB9KZySa.js +1 -0
- package/static/settings/assets/AiConfigPage-DGSXUkLs.js +1 -0
- package/static/settings/assets/DocumentProcessingPanel-Da2Re6Rg.js +1 -0
- package/static/settings/assets/IndexLifecyclePanel-BSZuIzgr.js +1 -0
- package/static/settings/assets/{IndexSubjectPanel-73sM16Ma.js → IndexSubjectPanel-CFd0ay-r.js} +1 -1
- package/static/settings/assets/ModelAssignmentsPanel-CSAryvWJ.js +1 -0
- package/static/settings/assets/ModelsPage-BQwCwLHU.js +11 -0
- package/static/settings/assets/{NetworkPage-i6j-M2RY.js → NetworkPage-BKymvsQc.js} +2 -2
- package/static/settings/assets/{PaneListHeader-DpqC0jd5.js → PaneListHeader-Bjh3hRdQ.js} +1 -1
- package/static/settings/assets/SearchIndexingPanel-MjKL5QLU.js +1 -0
- package/static/settings/assets/{StatusSubjectPanel-Dv4q3PGh.js → StatusSubjectPanel-Bvl6K4mx.js} +1 -1
- package/static/settings/assets/StatusWorkspace-B0NzrP--.js +1 -0
- package/static/settings/assets/SystemSettingsPage-D2z6Z4FE.js +1 -0
- package/static/settings/assets/SystemSettingsSubjectPanel-4sxma4X4.js +33 -0
- package/static/settings/assets/XpodAiConnectionsPodStore-BkNQ8fZx.js +3 -0
- package/static/settings/assets/{activity-DaFkk8f3.js → activity-CgJJGpjx.js} +1 -1
- package/static/settings/assets/admin-C6qCRFiY.js +1 -0
- package/static/settings/assets/ai-connections-CryuHGKW.js +1 -0
- package/static/settings/assets/{badge-d5SHdc-x.js → badge-C4NypVyT.js} +1 -1
- package/static/settings/assets/collection-runtime-CTLCDxAi.js +1 -0
- package/static/settings/assets/dialog-Csq0vWUi.js +1 -0
- package/static/settings/assets/{download-CpkwomDr.js → download-DaLJJ-Wp.js} +1 -1
- package/static/settings/assets/{external-link-_4YT42Mf.js → external-link--w_iW5Au.js} +1 -1
- package/static/settings/assets/index-B0mQa59b.js +4 -0
- package/static/settings/assets/index-BukHiu4y.js +1 -0
- package/static/settings/assets/index-COmVnZi2.js +41 -0
- package/static/settings/assets/{index-browser-B06xjBdZ.js → index-browser-BGpvHwD0.js} +1 -1
- package/static/settings/assets/{key-round-Dlqmp1Kq.js → key-round-Bk4YRjBu.js} +1 -1
- package/static/settings/assets/layout-DB3pMyTl.js +1 -0
- package/static/settings/assets/pod-collections-host-KnnGFZHL.js +8 -0
- package/static/settings/assets/{rotate-ccw-TAY65xWT.js → rotate-ccw-TCabbqsr.js} +1 -1
- package/static/settings/assets/{settings-ExBXGgbj.js → settings-CJWpdbNC.js} +105 -109
- package/static/settings/assets/settings-projection-CUkyprDQ.js +1 -0
- package/static/settings/assets/settings-rk080mvG.css +1 -0
- package/static/settings/assets/{skeleton-DKIWjNr9.js → skeleton-JDHYVe7t.js} +1 -1
- package/static/settings/assets/{waypoints-9erLIxyR.js → waypoints-DDvEl-MU.js} +1 -1
- package/static/settings/assets/{workspace-layout-CYXfYIa3.js → workspace-layout-DV5QU30U.js} +1 -1
- package/static/settings/settings.html +2 -2
- package/node_modules/@undefineds.co/shared-ui/dist/oidc-consent.d.ts +0 -54
- package/node_modules/@undefineds.co/shared-ui/dist/oidc-consent.js +0 -21
- package/static/auth-callback/assets/AiConfigContext-C81deMM9.js +0 -1
- package/static/auth-callback/assets/AiConfigPage-evWI8T56.js +0 -1
- package/static/auth-callback/assets/DocumentProcessingPanel-B9GrDEMe.js +0 -1
- package/static/auth-callback/assets/IndexLifecyclePanel-qCo8ABQZ.js +0 -1
- package/static/auth-callback/assets/ModelAssignmentsPanel-DG7Lxh3t.js +0 -1
- package/static/auth-callback/assets/ModelsPage-CgEuqE6p.js +0 -10
- package/static/auth-callback/assets/SearchIndexingPanel-ByU3u7kp.js +0 -1
- package/static/auth-callback/assets/StatusWorkspace-BZd617sV.js +0 -1
- package/static/auth-callback/assets/SystemSettingsPage-BirzWAQM.js +0 -1
- package/static/auth-callback/assets/SystemSettingsSubjectPanel-CmsVWNCx.js +0 -31
- package/static/auth-callback/assets/admin-BU4m6Ko2.js +0 -1
- package/static/auth-callback/assets/ai-connections-CHNTKemd.js +0 -1
- package/static/auth-callback/assets/auth-callback-C_7MUXJb.css +0 -1
- package/static/auth-callback/assets/index-BpV1hsqs.js +0 -4
- package/static/auth-callback/assets/index-D9oE6FXK.js +0 -41
- package/static/dashboard/assets/AiConfigContext-De-OtAWo.js +0 -1
- package/static/dashboard/assets/AiConfigPage-macP4Mop.js +0 -1
- package/static/dashboard/assets/DocumentProcessingPanel-C5ObvCCl.js +0 -1
- package/static/dashboard/assets/IndexLifecyclePanel-xVNa2l40.js +0 -1
- package/static/dashboard/assets/ModelAssignmentsPanel-DMOATFpQ.js +0 -1
- package/static/dashboard/assets/ModelsPage-91UbnETA.js +0 -25
- package/static/dashboard/assets/SearchIndexingPanel-Dh70PNFZ.js +0 -1
- package/static/dashboard/assets/SystemSettingsPage-BiN5GcKx.js +0 -1
- package/static/dashboard/assets/SystemSettingsSubjectPanel-B9QrSiFp.js +0 -31
- package/static/dashboard/assets/admin-BU4m6Ko2.js +0 -1
- package/static/dashboard/assets/ai-connections-CHNTKemd.js +0 -1
- package/static/dashboard/assets/dashboard-C_7MUXJb.css +0 -1
- package/static/dashboard/assets/index-FWZ-s52O.js +0 -41
- package/static/dashboard/assets/index-ZiQZ96oC.js +0 -4
- package/static/settings/assets/AiConfigContext-C0cQMPfG.js +0 -1
- package/static/settings/assets/AiConfigPage-CPhB4iFb.js +0 -1
- package/static/settings/assets/DocumentProcessingPanel-sYI7OpuH.js +0 -1
- package/static/settings/assets/IndexLifecyclePanel-yj8iyiT8.js +0 -1
- package/static/settings/assets/ModelAssignmentsPanel-BFIgUX5v.js +0 -1
- package/static/settings/assets/ModelsPage-BdppXl7E.js +0 -10
- package/static/settings/assets/SearchIndexingPanel-BlPnrkT3.js +0 -1
- package/static/settings/assets/SystemSettingsPage-CiOm2NzV.js +0 -1
- package/static/settings/assets/SystemSettingsSubjectPanel-Cd-GECon.js +0 -31
- package/static/settings/assets/admin-BU4m6Ko2.js +0 -1
- package/static/settings/assets/ai-connections-CHNTKemd.js +0 -1
- package/static/settings/assets/index-BFi9yn7_.js +0 -41
- package/static/settings/assets/index-BGgEhIUy.js +0 -4
- package/static/settings/assets/settings-C_7MUXJb.css +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { AiEndpointEntry } from './offering-endpoints';
|
|
2
|
+
/**
|
|
3
|
+
* The protocols the Xpod gateway serves, as registered by
|
|
4
|
+
* `src/api/handlers/AiGatewayHandler.ts`:
|
|
5
|
+
*
|
|
6
|
+
* - `POST /v1/chat/completions` (OpenAI Chat Completions)
|
|
7
|
+
* - `POST /v1/responses` (OpenAI Responses)
|
|
8
|
+
* - `POST /v1/messages` (Anthropic Messages)
|
|
9
|
+
*
|
|
10
|
+
* Each base URL comes from the same rule the coding-client adapters use, so what
|
|
11
|
+
* this page advertises is exactly what `AiClientConfigurationService` writes into
|
|
12
|
+
* a client.
|
|
13
|
+
*/
|
|
14
|
+
export declare function xpodProtocolEndpoints(apiBase: string): AiEndpointEntry[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { normalizeMessagesEndpoint, normalizeV1Endpoint } from './endpoint-urls.js';
|
|
2
|
+
/**
|
|
3
|
+
* The protocols the Xpod gateway serves, as registered by
|
|
4
|
+
* `src/api/handlers/AiGatewayHandler.ts`:
|
|
5
|
+
*
|
|
6
|
+
* - `POST /v1/chat/completions` (OpenAI Chat Completions)
|
|
7
|
+
* - `POST /v1/responses` (OpenAI Responses)
|
|
8
|
+
* - `POST /v1/messages` (Anthropic Messages)
|
|
9
|
+
*
|
|
10
|
+
* Each base URL comes from the same rule the coding-client adapters use, so what
|
|
11
|
+
* this page advertises is exactly what `AiClientConfigurationService` writes into
|
|
12
|
+
* a client.
|
|
13
|
+
*/
|
|
14
|
+
export function xpodProtocolEndpoints(apiBase) {
|
|
15
|
+
return [
|
|
16
|
+
{ protocol: 'chatCompletions', baseUrl: normalizeV1Endpoint(apiBase) },
|
|
17
|
+
{ protocol: 'responses', baseUrl: normalizeV1Endpoint(apiBase) },
|
|
18
|
+
{ protocol: 'anthropic', baseUrl: normalizeMessagesEndpoint(apiBase) },
|
|
19
|
+
];
|
|
20
|
+
}
|
|
@@ -3,7 +3,11 @@ import { type AiConnectionsController } from './controller';
|
|
|
3
3
|
export * from './ai-connections-client';
|
|
4
4
|
export * from './AiClientConfigurationSection';
|
|
5
5
|
export * from './AiConnectionsPanel';
|
|
6
|
+
export * from './AiCopyButton';
|
|
7
|
+
export * from './AiEndpointList';
|
|
6
8
|
export * from './AiGatewayKeysSection';
|
|
9
|
+
export * from './AiInfoTooltip';
|
|
10
|
+
export * from './AiProviderHeader';
|
|
7
11
|
export * from './AiConnectionsList';
|
|
8
12
|
export * from './AiConnectionsMain';
|
|
9
13
|
export * from './AiConnectionsHeader';
|
|
@@ -11,6 +15,10 @@ export * from './AiConnectionsMainHeader';
|
|
|
11
15
|
export * from './AiCustomProviderDialog';
|
|
12
16
|
export * from './AiModelEditorDialog';
|
|
13
17
|
export * from './controller';
|
|
18
|
+
export * from './collections';
|
|
19
|
+
export * from './credential-storage';
|
|
20
|
+
export * from './endpoint-urls';
|
|
21
|
+
export * from './gateway-endpoints';
|
|
14
22
|
export * from './AiProviderCard';
|
|
15
23
|
export * from './AiCredentialPoolSection';
|
|
16
24
|
export * from './offering-label';
|
|
@@ -9,7 +9,11 @@ import { createElement } from 'react';
|
|
|
9
9
|
export * from './ai-connections-client.js';
|
|
10
10
|
export * from './AiClientConfigurationSection.js';
|
|
11
11
|
export * from './AiConnectionsPanel.js';
|
|
12
|
+
export * from './AiCopyButton.js';
|
|
13
|
+
export * from './AiEndpointList.js';
|
|
12
14
|
export * from './AiGatewayKeysSection.js';
|
|
15
|
+
export * from './AiInfoTooltip.js';
|
|
16
|
+
export * from './AiProviderHeader.js';
|
|
13
17
|
export * from './AiConnectionsList.js';
|
|
14
18
|
export * from './AiConnectionsMain.js';
|
|
15
19
|
export * from './AiConnectionsHeader.js';
|
|
@@ -17,6 +21,10 @@ export * from './AiConnectionsMainHeader.js';
|
|
|
17
21
|
export * from './AiCustomProviderDialog.js';
|
|
18
22
|
export * from './AiModelEditorDialog.js';
|
|
19
23
|
export * from './controller.js';
|
|
24
|
+
export * from './collections.js';
|
|
25
|
+
export * from './credential-storage.js';
|
|
26
|
+
export * from './endpoint-urls.js';
|
|
27
|
+
export * from './gateway-endpoints.js';
|
|
20
28
|
export * from './AiProviderCard.js';
|
|
21
29
|
export * from './AiCredentialPoolSection.js';
|
|
22
30
|
export * from './offering-label.js';
|
|
@@ -14,5 +14,5 @@ export const aiConnectionManifest = validateExtensionManifest({
|
|
|
14
14
|
}],
|
|
15
15
|
},
|
|
16
16
|
dataModels: [],
|
|
17
|
-
hostCapabilities: ['navigation.openExternal', 'aiClientConfiguration'],
|
|
17
|
+
hostCapabilities: ['navigation.openExternal', 'aiClientConfiguration', 'solidNotifications', 'podCollections'],
|
|
18
18
|
});
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import type { AiProviderOffering } from './ai-connections-client';
|
|
2
|
+
/** One protocol the user can point a client at: the `protocol → base URL` pair the UI lists. */
|
|
3
|
+
export interface AiEndpointEntry {
|
|
4
|
+
protocol: string;
|
|
5
|
+
baseUrl: string;
|
|
6
|
+
}
|
|
2
7
|
/** Endpoint the offering actually talks to: the discovery protocol wins, first endpoint is the fallback. */
|
|
3
8
|
export declare function offeringEndpoint(offering: AiProviderOffering): string | undefined;
|
|
4
9
|
export declare function endpointDisplayValue(value: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* How a provider's own endpoint is described: by the API it serves.
|
|
12
|
+
*
|
|
13
|
+
* Used where the reader is inspecting what an upstream offering speaks. Xpod's
|
|
14
|
+
* own endpoints are named by {@link compatibleProtocolLabel} instead, because a
|
|
15
|
+
* client arrives already speaking a protocol rather than asking what Xpod uses.
|
|
16
|
+
*/
|
|
5
17
|
export declare function endpointProtocolLabel(protocol: string): string;
|
|
18
|
+
/** The client protocols Xpod accepts, named the way the client's own docs name them. */
|
|
19
|
+
export declare function compatibleProtocolLabel(protocol: string): string;
|
|
@@ -13,6 +13,13 @@ export function endpointDisplayValue(value) {
|
|
|
13
13
|
return value;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* How a provider's own endpoint is described: by the API it serves.
|
|
18
|
+
*
|
|
19
|
+
* Used where the reader is inspecting what an upstream offering speaks. Xpod's
|
|
20
|
+
* own endpoints are named by {@link compatibleProtocolLabel} instead, because a
|
|
21
|
+
* client arrives already speaking a protocol rather than asking what Xpod uses.
|
|
22
|
+
*/
|
|
16
23
|
export function endpointProtocolLabel(protocol) {
|
|
17
24
|
if (protocol === 'responses')
|
|
18
25
|
return 'Responses API';
|
|
@@ -22,3 +29,13 @@ export function endpointProtocolLabel(protocol) {
|
|
|
22
29
|
return 'Anthropic API';
|
|
23
30
|
return protocol;
|
|
24
31
|
}
|
|
32
|
+
/** The client protocols Xpod accepts, named the way the client's own docs name them. */
|
|
33
|
+
export function compatibleProtocolLabel(protocol) {
|
|
34
|
+
if (protocol === 'responses')
|
|
35
|
+
return 'OpenAI Responses 兼容';
|
|
36
|
+
if (protocol === 'chatCompletions')
|
|
37
|
+
return 'OpenAI Chat 兼容';
|
|
38
|
+
if (protocol === 'anthropic')
|
|
39
|
+
return 'Anthropic Messages 兼容';
|
|
40
|
+
return `${protocol} 兼容`;
|
|
41
|
+
}
|
|
@@ -39,19 +39,52 @@ var __export = (target, all) => {
|
|
|
39
39
|
// src/provider-catalog.ts
|
|
40
40
|
var exports_provider_catalog = {};
|
|
41
41
|
__export(exports_provider_catalog, {
|
|
42
|
+
storedOfferingIdFor: () => storedOfferingIdFor,
|
|
42
43
|
providerOfferings: () => providerOfferings,
|
|
43
44
|
providerName: () => providerName,
|
|
44
45
|
offeringBaseUrl: () => offeringBaseUrl,
|
|
45
46
|
defaultOfferingFor: () => defaultOfferingFor,
|
|
46
47
|
customCompatibilityValue: () => customCompatibilityValue,
|
|
48
|
+
credentialOfferingMetadata: () => credentialOfferingMetadata,
|
|
47
49
|
PROVIDER_OFFERINGS: () => PROVIDER_OFFERINGS,
|
|
48
50
|
DEFAULT_PROVIDER_OFFERINGS: () => DEFAULT_PROVIDER_OFFERINGS,
|
|
49
|
-
CUSTOM_DEFAULT_OFFERINGS: () => CUSTOM_DEFAULT_OFFERINGS
|
|
51
|
+
CUSTOM_DEFAULT_OFFERINGS: () => CUSTOM_DEFAULT_OFFERINGS,
|
|
52
|
+
BROWSER_LOGIN_METHOD: () => BROWSER_LOGIN_METHOD,
|
|
53
|
+
API_KEY_METHOD: () => API_KEY_METHOD,
|
|
54
|
+
AI_CONNECTIONS_PROVIDER_DOCUMENT_IDS: () => AI_CONNECTIONS_PROVIDER_DOCUMENT_IDS
|
|
50
55
|
});
|
|
51
56
|
module.exports = __toCommonJS(exports_provider_catalog);
|
|
57
|
+
|
|
58
|
+
// src/client/types.ts
|
|
59
|
+
var AI_CONNECTIONS_PROVIDERS = [
|
|
60
|
+
"openai",
|
|
61
|
+
"anthropic",
|
|
62
|
+
"kimi",
|
|
63
|
+
"bailian",
|
|
64
|
+
"deepseek",
|
|
65
|
+
"zhipu",
|
|
66
|
+
"ollama",
|
|
67
|
+
"custom"
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
// src/provider-catalog.ts
|
|
52
71
|
var DEFAULT_PROVIDER_OFFERINGS = [
|
|
53
72
|
{ id: "api-platform", label: "API Platform", kind: "api-platform", lifecycle: "active", authModes: ["apiKey"] }
|
|
54
73
|
];
|
|
74
|
+
var API_KEY_METHOD = {
|
|
75
|
+
id: "api-key",
|
|
76
|
+
authMode: "apiKey",
|
|
77
|
+
label: "添加 API Key",
|
|
78
|
+
lifecycle: "active"
|
|
79
|
+
};
|
|
80
|
+
var BROWSER_LOGIN_METHOD = {
|
|
81
|
+
id: "browser-login",
|
|
82
|
+
authMode: "apiKey",
|
|
83
|
+
connectMode: "browserAssistedApiKey",
|
|
84
|
+
label: "浏览器登录",
|
|
85
|
+
lifecycle: "active"
|
|
86
|
+
};
|
|
87
|
+
var API_KEY_METHODS = [API_KEY_METHOD, BROWSER_LOGIN_METHOD];
|
|
55
88
|
var CUSTOM_DEFAULT_OFFERINGS = [
|
|
56
89
|
{
|
|
57
90
|
id: "openai-compatible",
|
|
@@ -119,6 +152,7 @@ var PROVIDER_OFFERINGS = {
|
|
|
119
152
|
kind: "api-platform",
|
|
120
153
|
lifecycle: "active",
|
|
121
154
|
authModes: ["apiKey"],
|
|
155
|
+
authorizationMethods: API_KEY_METHODS,
|
|
122
156
|
productLabel: "OpenAI",
|
|
123
157
|
runtimeProviderIds: ["openai"],
|
|
124
158
|
credentialPrefixHints: ["sk-"],
|
|
@@ -158,6 +192,7 @@ var PROVIDER_OFFERINGS = {
|
|
|
158
192
|
kind: "api-platform",
|
|
159
193
|
lifecycle: "active",
|
|
160
194
|
authModes: ["apiKey"],
|
|
195
|
+
authorizationMethods: API_KEY_METHODS,
|
|
161
196
|
productLabel: "Anthropic",
|
|
162
197
|
runtimeProviderIds: ["anthropic"],
|
|
163
198
|
credentialPrefixHints: ["sk-ant-"],
|
|
@@ -255,6 +290,7 @@ var PROVIDER_OFFERINGS = {
|
|
|
255
290
|
kind: "api-platform",
|
|
256
291
|
lifecycle: "active",
|
|
257
292
|
authModes: ["apiKey"],
|
|
293
|
+
authorizationMethods: API_KEY_METHODS,
|
|
258
294
|
productLabel: "智谱 AI",
|
|
259
295
|
runtimeProviderIds: ["zhipu"],
|
|
260
296
|
credentialPrefixHints: ["id."],
|
|
@@ -272,6 +308,7 @@ var PROVIDER_OFFERINGS = {
|
|
|
272
308
|
kind: "token-plan",
|
|
273
309
|
lifecycle: "active",
|
|
274
310
|
authModes: ["apiKey"],
|
|
311
|
+
authorizationMethods: API_KEY_METHODS,
|
|
275
312
|
productLabel: "智谱 AI",
|
|
276
313
|
runtimeProviderIds: ["zhipu"],
|
|
277
314
|
credentialPrefixHints: ["id."],
|
|
@@ -292,6 +329,7 @@ function kimiOffering(input) {
|
|
|
292
329
|
kind: input.kind,
|
|
293
330
|
lifecycle: "active",
|
|
294
331
|
authModes: input.authModes,
|
|
332
|
+
authorizationMethods: API_KEY_METHODS,
|
|
295
333
|
productLabel: input.productLabel,
|
|
296
334
|
runtimeProviderIds: input.runtimeProviderIds,
|
|
297
335
|
credentialPrefixHints: input.credentialPrefixHints,
|
|
@@ -312,6 +350,7 @@ function bailianOffering(input) {
|
|
|
312
350
|
productLabel: "Alibaba Bailian",
|
|
313
351
|
kind: input.kind,
|
|
314
352
|
authModes: ["apiKey"],
|
|
353
|
+
authorizationMethods: API_KEY_METHODS,
|
|
315
354
|
runtimeProviderIds: input.runtimeProviderIds,
|
|
316
355
|
credentialPrefixHints: input.credentialPrefixHints,
|
|
317
356
|
consoleUrl: input.consoleUrl,
|
|
@@ -350,6 +389,15 @@ function providerOfferings(provider, openAiSubscriptionImportAvailable = false)
|
|
|
350
389
|
return { ...offering };
|
|
351
390
|
});
|
|
352
391
|
}
|
|
392
|
+
var AI_CONNECTIONS_PROVIDER_DOCUMENT_IDS = AI_CONNECTIONS_PROVIDERS.flatMap((provider) => [
|
|
393
|
+
provider,
|
|
394
|
+
...builtinOfferings(provider).map((offering) => `${provider}-${offering.id}`)
|
|
395
|
+
]);
|
|
396
|
+
function builtinOfferings(provider) {
|
|
397
|
+
if (provider === "custom")
|
|
398
|
+
return CUSTOM_DEFAULT_OFFERINGS;
|
|
399
|
+
return PROVIDER_OFFERINGS[provider] ?? DEFAULT_PROVIDER_OFFERINGS;
|
|
400
|
+
}
|
|
353
401
|
function customCompatibilityValue(value, offeringId) {
|
|
354
402
|
if (value === "anthropic" || offeringId === "anthropic-compatible")
|
|
355
403
|
return "anthropic";
|
|
@@ -397,3 +445,22 @@ function offeringBaseUrl(provider, offeringId) {
|
|
|
397
445
|
const discoveryProtocol = offering.modelDiscovery?.endpointProtocol;
|
|
398
446
|
return offering.endpoints?.find((endpoint) => endpoint.protocol === discoveryProtocol)?.baseUrl ?? offering.endpoints?.[0]?.baseUrl;
|
|
399
447
|
}
|
|
448
|
+
function storedOfferingIdFor(provider, offeringId) {
|
|
449
|
+
const normalized = offeringId.trim().toLowerCase();
|
|
450
|
+
if (provider === "bailian") {
|
|
451
|
+
if (normalized === "token-plan-personal")
|
|
452
|
+
return "token-plan";
|
|
453
|
+
if (normalized === "coding-plan-pro")
|
|
454
|
+
return "coding-plan";
|
|
455
|
+
}
|
|
456
|
+
return normalized;
|
|
457
|
+
}
|
|
458
|
+
function credentialOfferingMetadata(input) {
|
|
459
|
+
return {
|
|
460
|
+
offeringId: input.offeringId,
|
|
461
|
+
priority: input.priority ?? 100,
|
|
462
|
+
enabled: input.enabled ?? true,
|
|
463
|
+
health: input.health ?? "unknown",
|
|
464
|
+
...input.baseUrl ? { baseUrl: input.baseUrl } : {}
|
|
465
|
+
};
|
|
466
|
+
}
|
|
@@ -1,9 +1,83 @@
|
|
|
1
|
-
import type { AiConnectionsProvider, AiProviderCredentialSummary, AiProviderOffering } from './ai-connections-client';
|
|
1
|
+
import type { AiConnectionsProvider, AiProviderAuthorizationMethod, AiProviderCredentialSummary, AiProviderOffering } from './ai-connections-client';
|
|
2
2
|
export declare const DEFAULT_PROVIDER_OFFERINGS: AiProviderOffering[];
|
|
3
|
+
/**
|
|
4
|
+
* How an offering accepts a key: typed into Xpod's own form (this entry) or
|
|
5
|
+
* minted in the provider's console (the browser-assisted entry below). An
|
|
6
|
+
* offering that declares its actions declares this one too - the catalog is the
|
|
7
|
+
* single source of the wording, and the server only decides whether the entry is
|
|
8
|
+
* usable in a given deployment.
|
|
9
|
+
*/
|
|
10
|
+
export declare const API_KEY_METHOD: AiProviderAuthorizationMethod;
|
|
11
|
+
/**
|
|
12
|
+
* The connect entry that opens the provider's own console so the user signs in
|
|
13
|
+
* there and mints a key. Which ways in exist is offering data, so the entry is
|
|
14
|
+
* declared on the offerings that accept a key (`authModes` keeps the mechanical
|
|
15
|
+
* truth, `apiKey`) instead of on a provider-level label, and it points at the
|
|
16
|
+
* `consoleUrl` the offering already carries.
|
|
17
|
+
*
|
|
18
|
+
* Providers without one say something real by not declaring it: DeepSeek has no
|
|
19
|
+
* account console to sign into, Ollama is a local service, and `custom` is
|
|
20
|
+
* configured inside Xpod rather than at a provider.
|
|
21
|
+
*
|
|
22
|
+
* The label is 浏览器登录 rather than the legacy 「登录」 because it names the
|
|
23
|
+
* action the way its siblings do (浏览器登录 / 设备码登录 / 已有登录态); 「登录」
|
|
24
|
+
* named the provider instead, which is what let a provider-level string claim a
|
|
25
|
+
* capability no offering declared.
|
|
26
|
+
*/
|
|
27
|
+
export declare const BROWSER_LOGIN_METHOD: AiProviderAuthorizationMethod;
|
|
3
28
|
export declare const CUSTOM_DEFAULT_OFFERINGS: AiProviderOffering[];
|
|
4
29
|
export declare const PROVIDER_OFFERINGS: Partial<Record<AiConnectionsProvider, AiProviderOffering[]>>;
|
|
5
30
|
export declare function providerOfferings(provider: AiConnectionsProvider, openAiSubscriptionImportAvailable?: boolean): AiProviderOffering[];
|
|
31
|
+
/**
|
|
32
|
+
* Provider documents the AI Connection service is granted access to: the
|
|
33
|
+
* provider container document plus one document per built-in offering, named
|
|
34
|
+
* `<provider>-<offeringId>` by the Pod layout.
|
|
35
|
+
*
|
|
36
|
+
* This is the single program-side authority for that list. The Gateway's
|
|
37
|
+
* service-access descriptor and this package's descriptor validator both read
|
|
38
|
+
* it, so the granted surface and the validator cannot drift from the catalogue
|
|
39
|
+
* or from each other. Adding an offering to the catalogue adds its document
|
|
40
|
+
* here, which is exactly the program capability the service is allowed to
|
|
41
|
+
* reach.
|
|
42
|
+
*/
|
|
43
|
+
export declare const AI_CONNECTIONS_PROVIDER_DOCUMENT_IDS: readonly string[];
|
|
6
44
|
export declare function customCompatibilityValue(value: unknown, offeringId?: string): 'openai' | 'anthropic';
|
|
7
45
|
export declare function providerName(provider: AiConnectionsProvider): string;
|
|
8
46
|
export declare function defaultOfferingFor(provider: AiConnectionsProvider, authMode: AiProviderCredentialSummary['authMode']): string;
|
|
9
47
|
export declare function offeringBaseUrl(provider: AiConnectionsProvider, offeringId?: string): string | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* The offering id a credential records.
|
|
50
|
+
*
|
|
51
|
+
* An offering id is catalog content, so this stores the catalog's own id
|
|
52
|
+
* (`token-plan`, `coding-plan`, `pay-as-you-go`, …) lower-cased. The bootstrap
|
|
53
|
+
* naming turned two Bailian ids into document-name variants; those are folded
|
|
54
|
+
* back so the attribute never carries a storage-layout artefact.
|
|
55
|
+
*
|
|
56
|
+
* It lives in the capability package rather than in the Pod adapter that first
|
|
57
|
+
* needed it: the adapter, the collection runtime and the read emulation in tests
|
|
58
|
+
* all have to agree on this column, and a second copy would drift on the first
|
|
59
|
+
* catalog change (AGENTS.md: 目录内容跟能力走, 不得保留第二份副本).
|
|
60
|
+
*/
|
|
61
|
+
export declare function storedOfferingIdFor(provider: AiConnectionsProvider, offeringId: string): string;
|
|
62
|
+
/**
|
|
63
|
+
* The offering-derived part of a credential row's `metadata`.
|
|
64
|
+
*
|
|
65
|
+
* MIGRATION WINDOW: the offering is written both as the credential's
|
|
66
|
+
* `udfs:offeringId` attribute and inside the `metadata` JSON.
|
|
67
|
+
* `@undefineds.co/models` releases before the one that declares `offeringId`
|
|
68
|
+
* persist neither (drizzle-solid drops values whose key is not a declared
|
|
69
|
+
* column), so a bundle built against such a release would lose it. Drop the
|
|
70
|
+
* `metadata` copy once every consumer is built against the declaring release and
|
|
71
|
+
* no reader needs the fallback in `credentialOfferingIdFromRow`.
|
|
72
|
+
*
|
|
73
|
+
* Shared for the same reason as {@link storedOfferingIdFor}: a credential's row
|
|
74
|
+
* has exactly one shape, and the collection would read its own confirmation as a
|
|
75
|
+
* change if the writer and the projection disagreed on it.
|
|
76
|
+
*/
|
|
77
|
+
export declare function credentialOfferingMetadata(input: {
|
|
78
|
+
offeringId: string;
|
|
79
|
+
baseUrl?: string;
|
|
80
|
+
priority?: number;
|
|
81
|
+
enabled?: boolean;
|
|
82
|
+
health?: string;
|
|
83
|
+
}): Record<string, unknown>;
|
|
@@ -1,9 +1,48 @@
|
|
|
1
|
+
import { AI_CONNECTIONS_PROVIDERS } from './client/types.js';
|
|
1
2
|
// Built-in provider and offering catalog. This is the single place that names a
|
|
2
3
|
// provider or an offering; display layers project from it instead of keeping a
|
|
3
4
|
// second copy, which is how the same offering used to appear under two names.
|
|
4
5
|
export const DEFAULT_PROVIDER_OFFERINGS = [
|
|
5
6
|
{ id: 'api-platform', label: 'API Platform', kind: 'api-platform', lifecycle: 'active', authModes: ['apiKey'] },
|
|
6
7
|
];
|
|
8
|
+
/**
|
|
9
|
+
* How an offering accepts a key: typed into Xpod's own form (this entry) or
|
|
10
|
+
* minted in the provider's console (the browser-assisted entry below). An
|
|
11
|
+
* offering that declares its actions declares this one too - the catalog is the
|
|
12
|
+
* single source of the wording, and the server only decides whether the entry is
|
|
13
|
+
* usable in a given deployment.
|
|
14
|
+
*/
|
|
15
|
+
export const API_KEY_METHOD = {
|
|
16
|
+
id: 'api-key',
|
|
17
|
+
authMode: 'apiKey',
|
|
18
|
+
label: '添加 API Key',
|
|
19
|
+
lifecycle: 'active',
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The connect entry that opens the provider's own console so the user signs in
|
|
23
|
+
* there and mints a key. Which ways in exist is offering data, so the entry is
|
|
24
|
+
* declared on the offerings that accept a key (`authModes` keeps the mechanical
|
|
25
|
+
* truth, `apiKey`) instead of on a provider-level label, and it points at the
|
|
26
|
+
* `consoleUrl` the offering already carries.
|
|
27
|
+
*
|
|
28
|
+
* Providers without one say something real by not declaring it: DeepSeek has no
|
|
29
|
+
* account console to sign into, Ollama is a local service, and `custom` is
|
|
30
|
+
* configured inside Xpod rather than at a provider.
|
|
31
|
+
*
|
|
32
|
+
* The label is 浏览器登录 rather than the legacy 「登录」 because it names the
|
|
33
|
+
* action the way its siblings do (浏览器登录 / 设备码登录 / 已有登录态); 「登录」
|
|
34
|
+
* named the provider instead, which is what let a provider-level string claim a
|
|
35
|
+
* capability no offering declared.
|
|
36
|
+
*/
|
|
37
|
+
export const BROWSER_LOGIN_METHOD = {
|
|
38
|
+
id: 'browser-login',
|
|
39
|
+
authMode: 'apiKey',
|
|
40
|
+
connectMode: 'browserAssistedApiKey',
|
|
41
|
+
label: '浏览器登录',
|
|
42
|
+
lifecycle: 'active',
|
|
43
|
+
};
|
|
44
|
+
/** Both ways a key arrives, for an offering whose provider has a console. */
|
|
45
|
+
const API_KEY_METHODS = [API_KEY_METHOD, BROWSER_LOGIN_METHOD];
|
|
7
46
|
export const CUSTOM_DEFAULT_OFFERINGS = [
|
|
8
47
|
{
|
|
9
48
|
id: 'openai-compatible',
|
|
@@ -79,6 +118,7 @@ export const PROVIDER_OFFERINGS = {
|
|
|
79
118
|
kind: 'api-platform',
|
|
80
119
|
lifecycle: 'active',
|
|
81
120
|
authModes: ['apiKey'],
|
|
121
|
+
authorizationMethods: API_KEY_METHODS,
|
|
82
122
|
productLabel: 'OpenAI',
|
|
83
123
|
runtimeProviderIds: ['openai'],
|
|
84
124
|
credentialPrefixHints: ['sk-'],
|
|
@@ -118,6 +158,7 @@ export const PROVIDER_OFFERINGS = {
|
|
|
118
158
|
kind: 'api-platform',
|
|
119
159
|
lifecycle: 'active',
|
|
120
160
|
authModes: ['apiKey'],
|
|
161
|
+
authorizationMethods: API_KEY_METHODS,
|
|
121
162
|
productLabel: 'Anthropic',
|
|
122
163
|
runtimeProviderIds: ['anthropic'],
|
|
123
164
|
credentialPrefixHints: ['sk-ant-'],
|
|
@@ -217,6 +258,7 @@ export const PROVIDER_OFFERINGS = {
|
|
|
217
258
|
kind: 'api-platform',
|
|
218
259
|
lifecycle: 'active',
|
|
219
260
|
authModes: ['apiKey'],
|
|
261
|
+
authorizationMethods: API_KEY_METHODS,
|
|
220
262
|
productLabel: '智谱 AI',
|
|
221
263
|
runtimeProviderIds: ['zhipu'],
|
|
222
264
|
credentialPrefixHints: ['id.'],
|
|
@@ -234,6 +276,7 @@ export const PROVIDER_OFFERINGS = {
|
|
|
234
276
|
kind: 'token-plan',
|
|
235
277
|
lifecycle: 'active',
|
|
236
278
|
authModes: ['apiKey'],
|
|
279
|
+
authorizationMethods: API_KEY_METHODS,
|
|
237
280
|
productLabel: '智谱 AI',
|
|
238
281
|
runtimeProviderIds: ['zhipu'],
|
|
239
282
|
credentialPrefixHints: ['id.'],
|
|
@@ -254,6 +297,7 @@ function kimiOffering(input) {
|
|
|
254
297
|
kind: input.kind,
|
|
255
298
|
lifecycle: 'active',
|
|
256
299
|
authModes: input.authModes,
|
|
300
|
+
authorizationMethods: API_KEY_METHODS,
|
|
257
301
|
productLabel: input.productLabel,
|
|
258
302
|
runtimeProviderIds: input.runtimeProviderIds,
|
|
259
303
|
credentialPrefixHints: input.credentialPrefixHints,
|
|
@@ -274,6 +318,7 @@ function bailianOffering(input) {
|
|
|
274
318
|
productLabel: 'Alibaba Bailian',
|
|
275
319
|
kind: input.kind,
|
|
276
320
|
authModes: ['apiKey'],
|
|
321
|
+
authorizationMethods: API_KEY_METHODS,
|
|
277
322
|
runtimeProviderIds: input.runtimeProviderIds,
|
|
278
323
|
credentialPrefixHints: input.credentialPrefixHints,
|
|
279
324
|
consoleUrl: input.consoleUrl,
|
|
@@ -314,6 +359,33 @@ export function providerOfferings(provider, openAiSubscriptionImportAvailable =
|
|
|
314
359
|
return { ...offering };
|
|
315
360
|
});
|
|
316
361
|
}
|
|
362
|
+
/**
|
|
363
|
+
* Provider documents the AI Connection service is granted access to: the
|
|
364
|
+
* provider container document plus one document per built-in offering, named
|
|
365
|
+
* `<provider>-<offeringId>` by the Pod layout.
|
|
366
|
+
*
|
|
367
|
+
* This is the single program-side authority for that list. The Gateway's
|
|
368
|
+
* service-access descriptor and this package's descriptor validator both read
|
|
369
|
+
* it, so the granted surface and the validator cannot drift from the catalogue
|
|
370
|
+
* or from each other. Adding an offering to the catalogue adds its document
|
|
371
|
+
* here, which is exactly the program capability the service is allowed to
|
|
372
|
+
* reach.
|
|
373
|
+
*/
|
|
374
|
+
export const AI_CONNECTIONS_PROVIDER_DOCUMENT_IDS = AI_CONNECTIONS_PROVIDERS.flatMap((provider) => [
|
|
375
|
+
provider,
|
|
376
|
+
...builtinOfferings(provider).map((offering) => `${provider}-${offering.id}`),
|
|
377
|
+
]);
|
|
378
|
+
/**
|
|
379
|
+
* Built-in offerings of one provider as the catalogue declares them. `custom`
|
|
380
|
+
* keeps its placeholder offerings in their own table because its endpoints are
|
|
381
|
+
* intentionally invalid; every other provider declares its own list above.
|
|
382
|
+
* This mirrors the Gateway's `ProviderRegistry.offeringsForProduct`.
|
|
383
|
+
*/
|
|
384
|
+
function builtinOfferings(provider) {
|
|
385
|
+
if (provider === 'custom')
|
|
386
|
+
return CUSTOM_DEFAULT_OFFERINGS;
|
|
387
|
+
return PROVIDER_OFFERINGS[provider] ?? DEFAULT_PROVIDER_OFFERINGS;
|
|
388
|
+
}
|
|
317
389
|
export function customCompatibilityValue(value, offeringId) {
|
|
318
390
|
if (value === 'anthropic' || offeringId === 'anthropic-compatible')
|
|
319
391
|
return 'anthropic';
|
|
@@ -362,3 +434,50 @@ export function offeringBaseUrl(provider, offeringId) {
|
|
|
362
434
|
return offering.endpoints?.find((endpoint) => endpoint.protocol === discoveryProtocol)?.baseUrl
|
|
363
435
|
?? offering.endpoints?.[0]?.baseUrl;
|
|
364
436
|
}
|
|
437
|
+
/**
|
|
438
|
+
* The offering id a credential records.
|
|
439
|
+
*
|
|
440
|
+
* An offering id is catalog content, so this stores the catalog's own id
|
|
441
|
+
* (`token-plan`, `coding-plan`, `pay-as-you-go`, …) lower-cased. The bootstrap
|
|
442
|
+
* naming turned two Bailian ids into document-name variants; those are folded
|
|
443
|
+
* back so the attribute never carries a storage-layout artefact.
|
|
444
|
+
*
|
|
445
|
+
* It lives in the capability package rather than in the Pod adapter that first
|
|
446
|
+
* needed it: the adapter, the collection runtime and the read emulation in tests
|
|
447
|
+
* all have to agree on this column, and a second copy would drift on the first
|
|
448
|
+
* catalog change (AGENTS.md: 目录内容跟能力走, 不得保留第二份副本).
|
|
449
|
+
*/
|
|
450
|
+
export function storedOfferingIdFor(provider, offeringId) {
|
|
451
|
+
const normalized = offeringId.trim().toLowerCase();
|
|
452
|
+
if (provider === 'bailian') {
|
|
453
|
+
if (normalized === 'token-plan-personal')
|
|
454
|
+
return 'token-plan';
|
|
455
|
+
if (normalized === 'coding-plan-pro')
|
|
456
|
+
return 'coding-plan';
|
|
457
|
+
}
|
|
458
|
+
return normalized;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* The offering-derived part of a credential row's `metadata`.
|
|
462
|
+
*
|
|
463
|
+
* MIGRATION WINDOW: the offering is written both as the credential's
|
|
464
|
+
* `udfs:offeringId` attribute and inside the `metadata` JSON.
|
|
465
|
+
* `@undefineds.co/models` releases before the one that declares `offeringId`
|
|
466
|
+
* persist neither (drizzle-solid drops values whose key is not a declared
|
|
467
|
+
* column), so a bundle built against such a release would lose it. Drop the
|
|
468
|
+
* `metadata` copy once every consumer is built against the declaring release and
|
|
469
|
+
* no reader needs the fallback in `credentialOfferingIdFromRow`.
|
|
470
|
+
*
|
|
471
|
+
* Shared for the same reason as {@link storedOfferingIdFor}: a credential's row
|
|
472
|
+
* has exactly one shape, and the collection would read its own confirmation as a
|
|
473
|
+
* change if the writer and the projection disagreed on it.
|
|
474
|
+
*/
|
|
475
|
+
export function credentialOfferingMetadata(input) {
|
|
476
|
+
return {
|
|
477
|
+
offeringId: input.offeringId,
|
|
478
|
+
priority: input.priority ?? 100,
|
|
479
|
+
enabled: input.enabled ?? true,
|
|
480
|
+
health: input.health ?? 'unknown',
|
|
481
|
+
...(input.baseUrl ? { baseUrl: input.baseUrl } : {}),
|
|
482
|
+
};
|
|
483
|
+
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { AiConnectionsProvider } from './ai-connections-client';
|
|
2
|
+
/**
|
|
3
|
+
* The Xpod shield (`ui/src/assets/xpod-shield.svg`), inlined like the provider
|
|
4
|
+
* marks: from a coding client's point of view Xpod is just another provider.
|
|
5
|
+
*/
|
|
6
|
+
export declare const XPOD_AVATAR = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSI+CiAgPHBhdGgKICAgIGQ9Ik0zMiA3IDUxIDE2LjV2MTMuOGMwIDEyLjQtNy40IDIxLjItMTkgMjcuNy0xMS42LTYuNS0xOS0xNS4zLTE5LTI3LjdWMTYuNUwzMiA3WiIKICAgIHN0cm9rZT0iIzhBNzJCRSIKICAgIHN0cm9rZS13aWR0aD0iNSIKICAgIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIKICAgIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgLz4KPC9zdmc+Cg==";
|
|
2
7
|
export declare function getProviderAvatar(provider: AiConnectionsProvider | string): string | undefined;
|
|
3
8
|
export declare function getProviderAvatarBackground(provider: AiConnectionsProvider | string): string | undefined;
|
|
@@ -7,6 +7,11 @@ const bailianAvatar = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAY
|
|
|
7
7
|
const zhipuAvatar = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAYAAAA4qEECAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAABRxJREFUeAHtnaFTG0EUxh9MLQy1YK4KJMyAT1EoKAYDM23BgKIGFDOFwaFSBQamzIDBdFDgGoMCgQTVGNAM/AF0v8tee9lsQjbZt7m929/MJtcjaciXl7dvv+PuEQUCgYAxfdQBr6+vkbgriTEkRxF4EqOK0dfXd0uGtC20EBeCrovxRYyIik1VjJ9iHAvRq+08oS2hhcgQeJtk9N7f39P19TU9Pj7Sy8sLFYHh4WEaGBigqakpGh0dTXYjystC7J23nt9SaBnFv6iWJuj8/JxOT0/p7u6OigxEX1tbo7m5uWRXRYyvraK7qdBS5N9ijCNy19fX40gO/AeCHx0dxfdUSycTQuwn3WNbCQ2RSxB3eXm5MCnCFKSTw8NDGhsbwz8rQuiPusf163YKkb+LuxIiOYjcGmizsrKSpNOS0O6b7nENES1LN0RzNDMzE094gbdB+ri8vMQmUscHNYXoIvqTGBEmviBy+0Cr/f19bGJua4hqXUT/oRDNHYF8fXV1hc0nEdHv0z+ri2iZNiJMgEFkc5Cvb25usDkktfyHmjrGcYPFSKAzUmuMUnq/KnSEm1BldE4qE0Tp/arQQ8qDA4Y0C9J+CjghCO2IILQjgtCOeEeWgGWYsg3Z2dvbq7Nrl5aWaHp6mmyDUleu+LrCmtBY609OTpIL8MbTIsOM39zcJNug+oIVYQPvUkfKU4gZGRmh3d1d4gCvY6vU9U5o2LZpVldXE+PdKohkW9EMvBJajTDkZY55Qf3W2MAboWHWqCkDx+04wGE726tjL4SGyFtbW3X7cPgItqRt8GFyHBu1VnUgn0mL0CrPz88NbxyRzJGXOVJGgjWh8Uu6MKO4UgbMIHWitYlXk+Hg4GCcMjiwWcrp8EpozlLu5OSEOPFGaJRxKOdsw5mX03ghNGcpx50yErwQGktsjpSBdGFz9deKzAuNSOYwqxDFcABdkWmhOVMGZymnI9NC+1rK6cis0FyrP9UzcUUmhYaRz5EyEMWqZ+KKzAnti5FvSuaE9sXINyVTQvtk5JuSGaF9M/JNyYzQvhn5pmRCaB+NfFN6LrSvRr4pPRXaZyPflJ4K7bORb0rPhPbdyDelJ0Lnwcg3pSdC58HIN8W50Hkx8k1xKnSejHxTnApdlFJOhzOh82bkm+JE6Dwa+aawC51XI98UdqHzauSbwip0no18U9iEzruRb4q1v49WcWnk48JRHK+FD/Ph4YFswCK0KyM/mWi5zm/Ea9lKUdZTh0sjf2Njw9lJpN1iVWiXRj4+TI5TkrmwKrQrI59zouXCmtAujXyubw0nVoR2aeRzTbTcWKk6ZmdnWU5/wyUc0qs/fKDwTTjOZ9Rh8/1YEdpmGdQK1LRZ952bEa5A44ggtCOC0I4IQjtCFTq+5jGHQVMUmmmnFdrHOjUrpLSr69WiCl3BDWrVQGektKum99cJLdtbVNFnRDYHCBiABZXs0dLQfUg3GR7jZnFxkQJmwFSTHKs/0116Hpc2xuXnhxYWFgrf3KZdEM0XFxfYxDw3oTa/aYho2W0hbklULpdjjznQGsWH/6HrMNRWwxv0GcFFpAKNJCLL3GzW8EYyL8Yt/oOzs7P4qxGoBwUDtEkmQKpppsW4KdnBwYG1I8O+AmGVv1mpiDHfrE8WaLfN3ra4+0yyQUDSZg8HTIvSDwArPixGNG32doTA5beeb9I4MqJa1yH0Noyo2FSpVsKVW0Vxmm5aoaJnC+6L1AoVo9JuV85AIBDokr8WvnnavEglMwAAAABJRU5ErkJggg==';
|
|
8
8
|
'data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%20200%20200%27%3E%3Cdefs%3E%3ClinearGradient%20id%3D%27g%27%20x1%3D%270%27%20y1%3D%270%27%20x2%3D%271%27%20y2%3D%271%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%237A5CFF%27/%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%234A6CF7%27/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect%20width%3D%27200%27%20height%3D%27200%27%20fill%3D%27url%28%23g%29%27/%3E%3Cpath%20fill%3D%27%23FFFFFF%27%20fill-rule%3D%27evenodd%27%20d%3D%27M100%2036%20L156%2068%20L156%20132%20L100%20164%20L44%20132%20L44%2068%20Z%20M100%2064%20C102.5%2086%20114%2097.5%20136%20100%20C114%20102.5%20102.5%20114%20100%20136%20C97.5%20114%2086%20102.5%2064%20100%20C86%2097.5%2097.5%2086%20100%2064%20Z%27/%3E%3C/svg%3E';
|
|
9
9
|
const ollamaAvatar = 'data:image/svg+xml;utf8,%3Csvg%20viewBox%3D%220%200%2024%2024%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M16.361%2010.26a.894.894%200%200%200-.558.47l-.072.148.001.207c0%20.193.004.217.059.353.076.193.152.312.291.448.24.238.51.3.872.205a.86.86%200%200%200%20.517-.436.752.752%200%200%200%20.08-.498c-.064-.453-.33-.782-.724-.897a1.06%201.06%200%200%200-.466%200zm-9.203.005c-.305.096-.533.32-.65.639a1.187%201.187%200%200%200-.06.52c.057.309.31.59.598.667.362.095.632.033.872-.205.14-.136.215-.255.291-.448.055-.136.059-.16.059-.353l.001-.207-.072-.148a.894.894%200%200%200-.565-.472%201.02%201.02%200%200%200-.474.007Zm4.184%202c-.131.071-.223.25-.195.383.031.143.157.288.353.407.105.063.112.072.117.136.004.038-.01.146-.029.243-.02.094-.036.194-.036.222.002.074.07.195.143.253.064.052.076.054.255.059.164.005.198.001.264-.03.169-.082.212-.234.15-.525-.052-.243-.042-.28.087-.355.137-.08.281-.219.324-.314a.365.365%200%200%200-.175-.48.394.394%200%200%200-.181-.033c-.126%200-.207.03-.355.124l-.085.053-.053-.032c-.219-.13-.259-.145-.391-.143a.396.396%200%200%200-.193.032zm.39-2.195c-.373.036-.475.05-.654.086-.291.06-.68.195-.951.328-.94.46-1.589%201.226-1.787%202.114-.04.176-.045.234-.045.53%200%20.294.005.357.043.524.264%201.16%201.332%202.017%202.714%202.173.3.033%201.596.033%201.896%200%201.11-.125%202.064-.727%202.493-1.571.114-.226.169-.372.22-.602.039-.167.044-.23.044-.523%200-.297-.005-.355-.045-.531-.288-1.29-1.539-2.304-3.072-2.497a6.873%206.873%200%200%200-.855-.031zm.645.937a3.283%203.283%200%200%201%201.44.514c.223.148.537.458.671.662.166.251.26.508.303.82.02.143.01.251-.043.482-.08.345-.332.705-.672.957a3.115%203.115%200%200%201-.689.348c-.382.122-.632.144-1.525.138-.582-.006-.686-.01-.853-.042-.57-.107-1.022-.334-1.35-.68-.264-.28-.385-.535-.45-.946-.03-.192.025-.509.137-.776.136-.326.488-.73.836-.963.403-.269.934-.46%201.422-.512.187-.02.586-.02.773-.002zm-5.503-11a1.653%201.653%200%200%200-.683.298C5.617.74%205.173%201.666%204.985%202.819c-.07.436-.119%201.04-.119%201.503%200%20.544.064%201.24.155%201.721.02.107.031.202.023.208a8.12%208.12%200%200%201-.187.152%205.324%205.324%200%200%200-.949%201.02%205.49%205.49%200%200%200-.94%202.339%206.625%206.625%200%200%200-.023%201.357c.091.78.325%201.438.727%202.04l.13.195-.037.064c-.269.452-.498%201.105-.605%201.732-.084.496-.095.629-.095%201.294%200%20.67.009.803.088%201.266.095.555.288%201.143.503%201.534.071.128.243.393.264.407.007.003-.014.067-.046.141a7.405%207.405%200%200%200-.548%201.873c-.062.417-.071.552-.071.991%200%20.56.031.832.148%201.279L3.42%2024h1.478l-.05-.091c-.297-.552-.325-1.575-.068-2.597.117-.472.25-.819.498-1.296l.148-.29v-.177c0-.165-.003-.184-.057-.293a.915.915%200%200%200-.194-.25%201.74%201.74%200%200%201-.385-.543c-.424-.92-.506-2.286-.208-3.451.124-.486.329-.918.544-1.154a.787.787%200%200%200%20.223-.531c0-.195-.07-.355-.224-.522a3.136%203.136%200%200%201-.817-1.729c-.14-.96.114-2.005.69-2.834.563-.814%201.353-1.336%202.237-1.475.199-.033.57-.028.776.01.226.04.367.028.512-.041.179-.085.268-.19.374-.431.093-.215.165-.333.36-.576.234-.29.46-.489.822-.729.413-.27.884-.467%201.352-.561.17-.035.25-.04.569-.04.319%200%20.398.005.569.04a4.07%204.07%200%200%201%201.914.997c.117.109.398.457.488.602.034.057.095.177.132.267.105.241.195.346.374.43.14.068.286.082.503.045.343-.058.607-.053.943.016%201.144.23%202.14%201.173%202.581%202.437.385%201.108.276%202.267-.296%203.153-.097.15-.193.27-.333.419-.301.322-.301.722-.001%201.053.493.539.801%201.866.708%203.036-.062.772-.26%201.463-.533%201.854a2.096%202.096%200%200%201-.224.258.916.916%200%200%200-.194.25c-.054.109-.057.128-.057.293v.178l.148.29c.248.476.38.823.498%201.295.253%201.008.231%202.01-.059%202.581a.845.845%200%200%200-.044.098c0%20.006.329.009.732.009h.73l.02-.074.036-.134c.019-.076.057-.3.088-.516.029-.217.029-1.016%200-1.258-.11-.875-.295-1.57-.597-2.226-.032-.074-.053-.138-.046-.141.008-.005.057-.074.108-.152.376-.569.607-1.284.724-2.228.031-.26.031-1.378%200-1.628-.083-.645-.182-1.082-.348-1.525a6.083%206.083%200%200%200-.329-.7l-.038-.064.131-.194c.402-.604.636-1.262.727-2.04a6.625%206.625%200%200%200-.024-1.358%205.512%205.512%200%200%200-.939-2.339%205.325%205.325%200%200%200-.95-1.02%208.097%208.097%200%200%201-.186-.152.692.692%200%200%201%20.023-.208c.208-1.087.201-2.443-.017-3.503-.19-.924-.535-1.658-.98-2.082-.354-.338-.716-.482-1.15-.455-.996.059-1.8%201.205-2.116%203.01a6.805%206.805%200%200%200-.097.726c0%20.036-.007.066-.015.066a.96.96%200%200%201-.149-.078A4.857%204.857%200%200%200%2012%203.03c-.832%200-1.687.243-2.456.698a.958.958%200%200%201-.148.078c-.008%200-.015-.03-.015-.066a6.71%206.71%200%200%200-.097-.725C8.997%201.392%208.337.319%207.46.048a2.096%202.096%200%200%200-.585-.041Zm.293%201.402c.248.197.523.759.682%201.388.03.113.06.244.069.292.007.047.026.152.041.233.067.365.098.76.102%201.24l.002.475-.12.175-.118.178h-.278c-.324%200-.646.041-.954.124l-.238.06c-.033.007-.038-.003-.057-.144a8.438%208.438%200%200%201%20.016-2.323c.124-.788.413-1.501.696-1.711.067-.05.079-.049.157.013zm9.825-.012c.17.126.358.46.498.888.28.854.36%202.028.212%203.145-.019.14-.024.151-.057.144l-.238-.06a3.693%203.693%200%200%200-.954-.124h-.278l-.119-.178-.119-.175.002-.474c.004-.669.066-1.19.214-1.772.157-.623.434-1.185.68-1.382.078-.062.09-.063.159-.012z%22/%3E%3C/svg%3E';
|
|
10
|
+
/**
|
|
11
|
+
* The Xpod shield (`ui/src/assets/xpod-shield.svg`), inlined like the provider
|
|
12
|
+
* marks: from a coding client's point of view Xpod is just another provider.
|
|
13
|
+
*/
|
|
14
|
+
export const XPOD_AVATAR = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSI+CiAgPHBhdGgKICAgIGQ9Ik0zMiA3IDUxIDE2LjV2MTMuOGMwIDEyLjQtNy40IDIxLjItMTkgMjcuNy0xMS42LTYuNS0xOS0xNS4zLTE5LTI3LjdWMTYuNUwzMiA3WiIKICAgIHN0cm9rZT0iIzhBNzJCRSIKICAgIHN0cm9rZS13aWR0aD0iNSIKICAgIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIKICAgIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgLz4KPC9zdmc+Cg==';
|
|
10
15
|
const providerAvatars = {
|
|
11
16
|
openai: openaiAvatar,
|
|
12
17
|
anthropic: anthropicAvatar,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AI_CONNECTIONS_PROVIDER_DOCUMENT_IDS } from './provider-catalog.js';
|
|
1
2
|
export const AI_CONNECTIONS_APPLET_ID = 'co.undefineds.ai-connections';
|
|
2
3
|
const KNOWN_RESOURCE_PATHS = {
|
|
3
4
|
providerCredentials: 'settings/credentials.ttl',
|
|
@@ -5,33 +6,7 @@ const KNOWN_RESOURCE_PATHS = {
|
|
|
5
6
|
gatewayAccessKeys: '.data/ai/gateway/access-keys.ttl',
|
|
6
7
|
quotaSnapshots: '.data/ai/gateway/quota.ttl',
|
|
7
8
|
};
|
|
8
|
-
const
|
|
9
|
-
'openai',
|
|
10
|
-
'openai-official-subscription',
|
|
11
|
-
'openai-api-platform',
|
|
12
|
-
'anthropic',
|
|
13
|
-
'anthropic-official-subscription',
|
|
14
|
-
'anthropic-api-platform',
|
|
15
|
-
'kimi',
|
|
16
|
-
'kimi-subscription-key',
|
|
17
|
-
'kimi-api-platform',
|
|
18
|
-
'bailian',
|
|
19
|
-
'bailian-pay-as-you-go',
|
|
20
|
-
'bailian-token-plan',
|
|
21
|
-
'bailian-token-plan-team',
|
|
22
|
-
'bailian-coding-plan',
|
|
23
|
-
'deepseek',
|
|
24
|
-
'deepseek-api-platform',
|
|
25
|
-
'zhipu',
|
|
26
|
-
'zhipu-api-platform',
|
|
27
|
-
'zhipu-coding-plan',
|
|
28
|
-
'ollama',
|
|
29
|
-
'ollama-local',
|
|
30
|
-
'custom',
|
|
31
|
-
'custom-openai-compatible',
|
|
32
|
-
'custom-anthropic-compatible',
|
|
33
|
-
];
|
|
34
|
-
const PROVIDER_DOCUMENT_ID_SET = new Set(PROVIDER_DOCUMENT_IDS);
|
|
9
|
+
const PROVIDER_DOCUMENT_ID_SET = new Set(AI_CONNECTIONS_PROVIDER_DOCUMENT_IDS);
|
|
35
10
|
export function parseAiConnectionsServiceAccess(value, currentPodUrl) {
|
|
36
11
|
if (!isRecord(value))
|
|
37
12
|
throw new Error('invalid_descriptor');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const HOST_CAPABILITY_NAMES: readonly ["navigation.openExternal", "aiClientConfiguration"];
|
|
1
|
+
export declare const HOST_CAPABILITY_NAMES: readonly ["navigation.openExternal", "aiClientConfiguration", "solidNotifications", "podCollections"];
|
|
2
2
|
export type HostCapabilityName = (typeof HOST_CAPABILITY_NAMES)[number];
|
|
3
3
|
export type AppletLayoutKind = 'single-pane' | 'two-pane';
|
|
4
4
|
export interface AppletCommandDeclaration {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export const HOST_CAPABILITY_NAMES = [
|
|
2
2
|
'navigation.openExternal',
|
|
3
3
|
'aiClientConfiguration',
|
|
4
|
+
'solidNotifications',
|
|
5
|
+
'podCollections',
|
|
4
6
|
];
|
|
5
7
|
export function deriveAppletRouteId(manifest) {
|
|
6
8
|
const segments = new URL(manifest.appId).pathname.split('/').filter(Boolean);
|