happy2 0.0.9 → 0.0.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/README.md +29 -0
- package/package.json +7 -3
- package/packages/happy2-server/PLUGINS.md +402 -0
- package/packages/happy2-server/README.md +39 -0
- package/packages/happy2-server/dist/daemon.d.ts +39 -0
- package/packages/happy2-server/dist/daemon.d.ts.map +1 -0
- package/packages/happy2-server/dist/daemon.js +302 -0
- package/packages/happy2-server/dist/daemon.js.map +1 -0
- package/packages/happy2-server/dist/daemon.test.d.ts +2 -0
- package/packages/happy2-server/dist/daemon.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/daemon.test.js +245 -0
- package/packages/happy2-server/dist/daemon.test.js.map +1 -0
- package/packages/happy2-server/dist/index.d.ts +7 -1
- package/packages/happy2-server/dist/index.d.ts.map +1 -1
- package/packages/happy2-server/dist/index.js +5 -1
- package/packages/happy2-server/dist/index.js.map +1 -1
- package/packages/happy2-server/dist/modules/agents/daemon.d.ts +10 -13
- package/packages/happy2-server/dist/modules/agents/daemon.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agents/daemon.js +19 -5
- package/packages/happy2-server/dist/modules/agents/daemon.js.map +1 -1
- package/packages/happy2-server/dist/modules/agents/service.d.ts +9 -1
- package/packages/happy2-server/dist/modules/agents/service.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/agents/service.js +59 -2
- package/packages/happy2-server/dist/modules/agents/service.js.map +1 -1
- package/packages/happy2-server/dist/modules/auth/tokens.d.ts +7 -0
- package/packages/happy2-server/dist/modules/auth/tokens.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/auth/tokens.js +33 -0
- package/packages/happy2-server/dist/modules/auth/tokens.js.map +1 -1
- package/packages/happy2-server/dist/modules/auth/tokens.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/auth/tokens.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/tokens.test.js +28 -0
- package/packages/happy2-server/dist/modules/auth/tokens.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/chat/types.d.ts +1 -1
- package/packages/happy2-server/dist/modules/chat/types.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/config/defaults.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/config/defaults.js +5 -0
- package/packages/happy2-server/dist/modules/config/defaults.js.map +1 -1
- package/packages/happy2-server/dist/modules/config/loader.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/config/loader.js +9 -0
- package/packages/happy2-server/dist/modules/config/loader.js.map +1 -1
- package/packages/happy2-server/dist/modules/config/loader.test.js +15 -0
- package/packages/happy2-server/dist/modules/config/loader.test.js.map +1 -1
- package/packages/happy2-server/dist/modules/config/paths.d.ts +1 -0
- package/packages/happy2-server/dist/modules/config/paths.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/config/paths.js +1 -0
- package/packages/happy2-server/dist/modules/config/paths.js.map +1 -1
- package/packages/happy2-server/dist/modules/config/paths.test.js +1 -0
- package/packages/happy2-server/dist/modules/config/paths.test.js.map +1 -1
- package/packages/happy2-server/dist/modules/config/type.d.ts +5 -0
- package/packages/happy2-server/dist/modules/config/type.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/integrations/transport.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/integrations/transport.js +8 -1
- package/packages/happy2-server/dist/modules/integrations/transport.js.map +1 -1
- package/packages/happy2-server/dist/modules/integrations/types.d.ts +2 -0
- package/packages/happy2-server/dist/modules/integrations/types.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/integrations/types.js.map +1 -1
- package/packages/happy2-server/dist/modules/plugin/catalog.d.ts +13 -0
- package/packages/happy2-server/dist/modules/plugin/catalog.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/catalog.js +400 -0
- package/packages/happy2-server/dist/modules/plugin/catalog.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/catalog.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/plugin/catalog.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/catalog.test.js +172 -0
- package/packages/happy2-server/dist/modules/plugin/catalog.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/functions.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/plugin/functions.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/functions.test.js +123 -0
- package/packages/happy2-server/dist/modules/plugin/functions.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/httpBridge.d.ts +19 -0
- package/packages/happy2-server/dist/modules/plugin/httpBridge.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/httpBridge.js +206 -0
- package/packages/happy2-server/dist/modules/plugin/httpBridge.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/asInstallation.d.ts +3 -0
- package/packages/happy2-server/dist/modules/plugin/impl/asInstallation.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/asInstallation.js +47 -0
- package/packages/happy2-server/dist/modules/plugin/impl/asInstallation.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/asPlugin.d.ts +3 -0
- package/packages/happy2-server/dist/modules/plugin/impl/asPlugin.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/asPlugin.js +82 -0
- package/packages/happy2-server/dist/modules/plugin/impl/asPlugin.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/effectiveContainer.d.ts +3 -0
- package/packages/happy2-server/dist/modules/plugin/impl/effectiveContainer.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/effectiveContainer.js +12 -0
- package/packages/happy2-server/dist/modules/plugin/impl/effectiveContainer.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installationSelection.d.ts +288 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installationSelection.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installationSelection.js +19 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installationSelection.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.d.ts +3 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.js +63 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.test.js +17 -0
- package/packages/happy2-server/dist/modules/plugin/impl/installedManifest.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/pluginFunctionResult.d.ts +3 -0
- package/packages/happy2-server/dist/modules/plugin/impl/pluginFunctionResult.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/pluginFunctionResult.js +16 -0
- package/packages/happy2-server/dist/modules/plugin/impl/pluginFunctionResult.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/pluginSelection.d.ts +339 -0
- package/packages/happy2-server/dist/modules/plugin/impl/pluginSelection.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/impl/pluginSelection.js +22 -0
- package/packages/happy2-server/dist/modules/plugin/impl/pluginSelection.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/index.d.ts +3 -0
- package/packages/happy2-server/dist/modules/plugin/index.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/index.js +3 -0
- package/packages/happy2-server/dist/modules/plugin/index.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/packageStore.d.ts +15 -0
- package/packages/happy2-server/dist/modules/plugin/packageStore.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/packageStore.js +90 -0
- package/packages/happy2-server/dist/modules/plugin/packageStore.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginAuthorizeManagement.d.ts +7 -0
- package/packages/happy2-server/dist/modules/plugin/pluginAuthorizeManagement.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginAuthorizeManagement.js +9 -0
- package/packages/happy2-server/dist/modules/plugin/pluginAuthorizeManagement.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginCatalogList.d.ts +9 -0
- package/packages/happy2-server/dist/modules/plugin/pluginCatalogList.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginCatalogList.js +64 -0
- package/packages/happy2-server/dist/modules/plugin/pluginCatalogList.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceAuthorize.d.ts +10 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceAuthorize.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceAuthorize.js +20 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceAuthorize.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceInvalidate.d.ts +12 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceInvalidate.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceInvalidate.js +44 -0
- package/packages/happy2-server/dist/modules/plugin/pluginContainerInstanceInvalidate.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginFindBySource.d.ts +9 -0
- package/packages/happy2-server/dist/modules/plugin/pluginFindBySource.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginFindBySource.js +15 -0
- package/packages/happy2-server/dist/modules/plugin/pluginFindBySource.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultAcquire.d.ts +23 -0
- package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultAcquire.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultAcquire.js +54 -0
- package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultAcquire.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultComplete.d.ts +13 -0
- package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultComplete.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultComplete.js +37 -0
- package/packages/happy2-server/dist/modules/plugin/pluginFunctionResultComplete.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginGetImage.d.ts +17 -0
- package/packages/happy2-server/dist/modules/plugin/pluginGetImage.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginGetImage.js +29 -0
- package/packages/happy2-server/dist/modules/plugin/pluginGetImage.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstall.d.ts +27 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstall.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstall.js +180 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstall.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.d.ts +9 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.js +122 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetStatus.d.ts +11 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetStatus.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetStatus.js +18 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetStatus.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationList.d.ts +8 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationList.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationList.js +19 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationList.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListForHost.d.ts +14 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListForHost.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListForHost.js +20 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListForHost.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListIds.d.ts +7 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListIds.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListIds.js +13 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListIds.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListReadyMcpIds.d.ts +7 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListReadyMcpIds.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListReadyMcpIds.js +16 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationListReadyMcpIds.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationUpdateStatus.d.ts +16 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationUpdateStatus.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationUpdateStatus.js +38 -0
- package/packages/happy2-server/dist/modules/plugin/pluginInstallationUpdateStatus.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginList.d.ts +8 -0
- package/packages/happy2-server/dist/modules/plugin/pluginList.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginList.js +17 -0
- package/packages/happy2-server/dist/modules/plugin/pluginList.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsList.d.ts +11 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsList.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsList.js +43 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsList.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsListReady.d.ts +15 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsListReady.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsListReady.js +37 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsListReady.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsReplace.d.ts +16 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsReplace.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsReplace.js +71 -0
- package/packages/happy2-server/dist/modules/plugin/pluginMcpToolsReplace.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginRemoveMissingBuiltins.d.ts +14 -0
- package/packages/happy2-server/dist/modules/plugin/pluginRemoveMissingBuiltins.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/pluginRemoveMissingBuiltins.js +51 -0
- package/packages/happy2-server/dist/modules/plugin/pluginRemoveMissingBuiltins.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/runtime.d.ts +56 -0
- package/packages/happy2-server/dist/modules/plugin/runtime.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/runtime.js +147 -0
- package/packages/happy2-server/dist/modules/plugin/runtime.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/secrets.d.ts +17 -0
- package/packages/happy2-server/dist/modules/plugin/secrets.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/secrets.js +56 -0
- package/packages/happy2-server/dist/modules/plugin/secrets.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/secrets.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/plugin/secrets.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/secrets.test.js +14 -0
- package/packages/happy2-server/dist/modules/plugin/secrets.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/service.d.ts +60 -0
- package/packages/happy2-server/dist/modules/plugin/service.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/service.js +584 -0
- package/packages/happy2-server/dist/modules/plugin/service.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/types.d.ts +194 -0
- package/packages/happy2-server/dist/modules/plugin/types.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/types.js +10 -0
- package/packages/happy2-server/dist/modules/plugin/types.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.d.ts +19 -0
- package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.js +97 -0
- package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.test.js +74 -0
- package/packages/happy2-server/dist/modules/plugin/utils/ndjsonStreamTransport.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.d.ts +29 -0
- package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.js +126 -0
- package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.js.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.test.js +75 -0
- package/packages/happy2-server/dist/modules/plugin/utils/remoteMcpTransport.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/sandbox/index.d.ts +1 -1
- package/packages/happy2-server/dist/modules/sandbox/index.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.d.ts +9 -1
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.js +218 -4
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.js.map +1 -1
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.test.js +157 -2
- package/packages/happy2-server/dist/modules/sandbox/localOciSandboxProvider.test.js.map +1 -1
- package/packages/happy2-server/dist/modules/sandbox/types.d.ts +24 -0
- package/packages/happy2-server/dist/modules/sandbox/types.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/schema.d.ts +7781 -5489
- package/packages/happy2-server/dist/modules/schema.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/schema.js +87 -1
- package/packages/happy2-server/dist/modules/schema.js.map +1 -1
- package/packages/happy2-server/dist/modules/sync/syncGetDifference.d.ts.map +1 -1
- package/packages/happy2-server/dist/modules/sync/syncGetDifference.js +2 -0
- package/packages/happy2-server/dist/modules/sync/syncGetDifference.js.map +1 -1
- package/packages/happy2-server/dist/routes/pluginHost.d.ts +6 -0
- package/packages/happy2-server/dist/routes/pluginHost.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/pluginHost.js +37 -0
- package/packages/happy2-server/dist/routes/pluginHost.js.map +1 -0
- package/packages/happy2-server/dist/routes/plugins.d.ts +8 -0
- package/packages/happy2-server/dist/routes/plugins.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/plugins.js +198 -0
- package/packages/happy2-server/dist/routes/plugins.js.map +1 -0
- package/packages/happy2-server/dist/runner.js +64 -19
- package/packages/happy2-server/dist/runner.js.map +1 -1
- package/packages/happy2-server/dist/server.d.ts +8 -0
- package/packages/happy2-server/dist/server.d.ts.map +1 -1
- package/packages/happy2-server/dist/server.js +65 -3
- package/packages/happy2-server/dist/server.js.map +1 -1
- package/packages/happy2-server/dist/systemService.d.ts +48 -0
- package/packages/happy2-server/dist/systemService.d.ts.map +1 -0
- package/packages/happy2-server/dist/systemService.js +323 -0
- package/packages/happy2-server/dist/systemService.js.map +1 -0
- package/packages/happy2-server/dist/systemService.test.d.ts +2 -0
- package/packages/happy2-server/dist/systemService.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/systemService.test.js +280 -0
- package/packages/happy2-server/dist/systemService.test.js.map +1 -0
- package/packages/happy2-server/dist/web/assets/index-9SGCQLg7.js +46 -0
- package/packages/happy2-server/dist/web/assets/{index-DZ1uRLgV.css → index-DWXBQDJB.css} +1 -1
- package/packages/happy2-server/dist/web/index.html +2 -2
- package/packages/happy2-server/drizzle/0020_plugins.sql +61 -0
- package/packages/happy2-server/drizzle/0021_plugin_function_results.sql +11 -0
- package/packages/happy2-server/drizzle/0022_plugin_container_runtime_tools.sql +16 -0
- package/packages/happy2-server/drizzle/meta/_journal.json +21 -0
- package/packages/happy2-server/happy2.example.toml +13 -0
- package/packages/happy2-server/plugins/README.md +7 -0
- package/packages/happy2-server/plugins/hello/container/Dockerfile +6 -0
- package/packages/happy2-server/plugins/hello/plugin.json +16 -0
- package/packages/happy2-server/plugins/hello/plugin.png +0 -0
- package/packages/happy2-server/plugins/hello/server.mjs +75 -0
- package/packages/happy2-server/plugins/hello/skills/hello/SKILL.md +11 -0
- package/packages/happy2-server/dist/web/assets/index-DH1SOwNV.js +0 -46
package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.js
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { eq } from "drizzle-orm";
|
|
2
|
+
import { agentImages, pluginInstallations, pluginInstallationVariables, plugins, } from "../schema.js";
|
|
3
|
+
import { PluginError } from "./types.js";
|
|
4
|
+
import { installedManifest } from "./impl/installedManifest.js";
|
|
5
|
+
import { effectiveContainer } from "./impl/effectiveContainer.js";
|
|
6
|
+
/**
|
|
7
|
+
* Resolves one installed manifest into its private runtime configuration, revealing encrypted values only for process environment or remote header materialization.
|
|
8
|
+
* This read-only boundary does not mutate durable state and keeps secret recovery out of routes, catalog projections, and lifecycle orchestration.
|
|
9
|
+
*/
|
|
10
|
+
export async function pluginInstallationGetRuntimeConfiguration(executor, secretProtector, installationId) {
|
|
11
|
+
const [row] = await executor
|
|
12
|
+
.select({
|
|
13
|
+
id: pluginInstallations.id,
|
|
14
|
+
pluginId: plugins.id,
|
|
15
|
+
shortName: plugins.shortName,
|
|
16
|
+
manifestJson: plugins.manifestJson,
|
|
17
|
+
packageDigest: plugins.packageDigest,
|
|
18
|
+
packageDirectory: plugins.packageDirectory,
|
|
19
|
+
containerName: pluginInstallations.containerName,
|
|
20
|
+
containerInstanceId: pluginInstallations.containerInstanceId,
|
|
21
|
+
containerImageId: pluginInstallations.containerImageId,
|
|
22
|
+
selectedImageTag: agentImages.dockerTag,
|
|
23
|
+
selectedImageStatus: agentImages.status,
|
|
24
|
+
})
|
|
25
|
+
.from(pluginInstallations)
|
|
26
|
+
.innerJoin(plugins, eq(pluginInstallations.pluginId, plugins.id))
|
|
27
|
+
.leftJoin(agentImages, eq(agentImages.id, pluginInstallations.containerImageId))
|
|
28
|
+
.where(eq(pluginInstallations.id, installationId))
|
|
29
|
+
.limit(1);
|
|
30
|
+
if (!row)
|
|
31
|
+
throw new PluginError("not_found", "Plugin installation was not found");
|
|
32
|
+
const manifest = installedManifest(row.manifestJson);
|
|
33
|
+
const installedPackage = {
|
|
34
|
+
installationId: row.id,
|
|
35
|
+
pluginId: row.pluginId,
|
|
36
|
+
shortName: row.shortName,
|
|
37
|
+
packageDirectory: row.packageDirectory,
|
|
38
|
+
packageDigest: row.packageDigest,
|
|
39
|
+
};
|
|
40
|
+
if (!manifest.container && !manifest.mcp)
|
|
41
|
+
return { ...installedPackage, type: "skills_only" };
|
|
42
|
+
const variableRows = await executor
|
|
43
|
+
.select({
|
|
44
|
+
key: pluginInstallationVariables.key,
|
|
45
|
+
kind: pluginInstallationVariables.kind,
|
|
46
|
+
textValue: pluginInstallationVariables.textValue,
|
|
47
|
+
secretCiphertext: pluginInstallationVariables.secretCiphertext,
|
|
48
|
+
})
|
|
49
|
+
.from(pluginInstallationVariables)
|
|
50
|
+
.where(eq(pluginInstallationVariables.installationId, installationId));
|
|
51
|
+
const environment = {};
|
|
52
|
+
for (const definition of manifest.variables) {
|
|
53
|
+
const variable = variableRows.find(({ key }) => key === definition.key);
|
|
54
|
+
if (!variable || variable.kind !== definition.kind)
|
|
55
|
+
throw new PluginError("broken_configuration", `Plugin variable ${definition.key} is missing or has the wrong kind`);
|
|
56
|
+
if (definition.kind === "secret") {
|
|
57
|
+
if (!variable.secretCiphertext)
|
|
58
|
+
throw new PluginError("broken_configuration", `Plugin secret ${definition.key} is missing`);
|
|
59
|
+
try {
|
|
60
|
+
environment[definition.key] = await secretProtector.reveal(variable.secretCiphertext, { installationId, key: definition.key });
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
throw new PluginError("broken_configuration", `Plugin secret ${definition.key} cannot be decrypted`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
if (!variable.textValue)
|
|
68
|
+
throw new PluginError("broken_configuration", `Plugin variable ${definition.key} is missing`);
|
|
69
|
+
environment[definition.key] = variable.textValue;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (manifest.mcp?.type === "remote") {
|
|
73
|
+
const headers = Object.fromEntries(Object.entries(manifest.mcp.headers).map(([key, template]) => [
|
|
74
|
+
key,
|
|
75
|
+
template.replace(/\$\{([^}]+)\}/g, (_match, variable) => {
|
|
76
|
+
const value = environment[variable];
|
|
77
|
+
if (value === undefined)
|
|
78
|
+
throw new PluginError("broken_configuration", `Remote MCP header references missing variable ${variable}`);
|
|
79
|
+
return value;
|
|
80
|
+
}),
|
|
81
|
+
]));
|
|
82
|
+
if (Object.values(headers).some((value) => /\r|\n/.test(value)))
|
|
83
|
+
throw new PluginError("broken_configuration", "Resolved remote MCP headers may not contain newlines");
|
|
84
|
+
return {
|
|
85
|
+
...installedPackage,
|
|
86
|
+
type: "remote",
|
|
87
|
+
url: manifest.mcp.url,
|
|
88
|
+
headers,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
const localContainer = effectiveContainer(manifest);
|
|
92
|
+
if (!localContainer)
|
|
93
|
+
throw new PluginError("broken_configuration", "Plugin container definition is missing");
|
|
94
|
+
if (!row.containerName)
|
|
95
|
+
throw new PluginError("broken_configuration", "Plugin container name is missing");
|
|
96
|
+
let imageTag;
|
|
97
|
+
if (localContainer.dockerfile) {
|
|
98
|
+
imageTag = `happy2-plugin:${row.packageDigest.replace(/^sha256:/, "")}`;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
if (!row.containerImageId || !row.selectedImageTag || row.selectedImageStatus !== "ready")
|
|
102
|
+
throw new PluginError("broken_configuration", "Selected plugin container image is missing or not ready");
|
|
103
|
+
imageTag = row.selectedImageTag;
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
...installedPackage,
|
|
107
|
+
type: "local",
|
|
108
|
+
...(localContainer.command
|
|
109
|
+
? { command: { command: localContainer.command, args: localContainer.args } }
|
|
110
|
+
: {}),
|
|
111
|
+
...(manifest.mcp?.type === "stdio"
|
|
112
|
+
? { mcp: { command: manifest.mcp.command, args: manifest.mcp.args } }
|
|
113
|
+
: {}),
|
|
114
|
+
environment,
|
|
115
|
+
containerName: row.containerName,
|
|
116
|
+
containerInstanceId: row.containerInstanceId ?? undefined,
|
|
117
|
+
imageTag,
|
|
118
|
+
...(localContainer.dockerfile ? { bundledDockerfile: localContainer.dockerfile } : {}),
|
|
119
|
+
permissions: localContainer.permissions,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=pluginInstallationGetRuntimeConfiguration.js.map
|
package/packages/happy2-server/dist/modules/plugin/pluginInstallationGetRuntimeConfiguration.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginInstallationGetRuntimeConfiguration.js","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginInstallationGetRuntimeConfiguration.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DrizzleExecutor } from "../drizzle.js";
|
|
2
|
+
import { type PluginInstallationStatus } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Returns the current status and identity needed to authorize one installed plugin MCP connection without exposing its configuration.
|
|
5
|
+
* This read-only lookup does not mutate durable state and keeps MCP readiness enforcement at the installation boundary.
|
|
6
|
+
*/
|
|
7
|
+
export declare function pluginInstallationGetStatus(executor: DrizzleExecutor, installationId: string): Promise<{
|
|
8
|
+
id: string;
|
|
9
|
+
status: PluginInstallationStatus;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=pluginInstallationGetStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginInstallationGetStatus.d.ts","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginInstallationGetStatus.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAe,KAAK,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAExE;;;GAGG;AACH,wBAAsB,2BAA2B,CAC7C,QAAQ,EAAE,eAAe,EACzB,cAAc,EAAE,MAAM,GACvB,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,wBAAwB,CAAA;CAAE,CAAC,CAQ3D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { eq } from "drizzle-orm";
|
|
2
|
+
import { pluginInstallations } from "../schema.js";
|
|
3
|
+
import { PluginError } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Returns the current status and identity needed to authorize one installed plugin MCP connection without exposing its configuration.
|
|
6
|
+
* This read-only lookup does not mutate durable state and keeps MCP readiness enforcement at the installation boundary.
|
|
7
|
+
*/
|
|
8
|
+
export async function pluginInstallationGetStatus(executor, installationId) {
|
|
9
|
+
const [row] = await executor
|
|
10
|
+
.select({ id: pluginInstallations.id, status: pluginInstallations.status })
|
|
11
|
+
.from(pluginInstallations)
|
|
12
|
+
.where(eq(pluginInstallations.id, installationId))
|
|
13
|
+
.limit(1);
|
|
14
|
+
if (!row)
|
|
15
|
+
throw new PluginError("not_found", "Plugin installation was not found");
|
|
16
|
+
return { id: row.id, status: row.status };
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=pluginInstallationGetStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginInstallationGetStatus.js","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginInstallationGetStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,WAAW,EAAiC,MAAM,YAAY,CAAC;AAExE;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC7C,QAAyB,EACzB,cAAsB;IAEtB,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,QAAQ;SACvB,MAAM,CAAC,EAAE,EAAE,EAAE,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,mBAAmB,CAAC,MAAM,EAAE,CAAC;SAC1E,IAAI,CAAC,mBAAmB,CAAC;SACzB,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;SACjD,KAAK,CAAC,CAAC,CAAC,CAAC;IACd,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,WAAW,CAAC,WAAW,EAAE,mCAAmC,CAAC,CAAC;IAClF,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAkC,EAAE,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DrizzleExecutor } from "../drizzle.js";
|
|
2
|
+
import type { PluginInstallationSummary } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Lists durable system plugin installations and their latest lifecycle state for an active server administrator.
|
|
5
|
+
* This read-only action does not mutate durable state and centralizes authorization before installation health is joined into the catalog.
|
|
6
|
+
*/
|
|
7
|
+
export declare function pluginInstallationList(executor: DrizzleExecutor, actorUserId: string): Promise<PluginInstallationSummary[]>;
|
|
8
|
+
//# sourceMappingURL=pluginInstallationList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginInstallationList.d.ts","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginInstallationList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAIrD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAI5D;;;GAGG;AACH,wBAAsB,sBAAsB,CACxC,QAAQ,EAAE,eAAe,EACzB,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAQtC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { eq } from "drizzle-orm";
|
|
2
|
+
import { pluginInstallations, plugins } from "../schema.js";
|
|
3
|
+
import { userRequireServerAdmin } from "../chat/userRequireServerAdmin.js";
|
|
4
|
+
import { pluginInstallationSelection } from "./impl/installationSelection.js";
|
|
5
|
+
import { asPluginInstallation } from "./impl/asInstallation.js";
|
|
6
|
+
/**
|
|
7
|
+
* Lists durable system plugin installations and their latest lifecycle state for an active server administrator.
|
|
8
|
+
* This read-only action does not mutate durable state and centralizes authorization before installation health is joined into the catalog.
|
|
9
|
+
*/
|
|
10
|
+
export async function pluginInstallationList(executor, actorUserId) {
|
|
11
|
+
await userRequireServerAdmin(executor, actorUserId);
|
|
12
|
+
const rows = await executor
|
|
13
|
+
.select(pluginInstallationSelection)
|
|
14
|
+
.from(pluginInstallations)
|
|
15
|
+
.innerJoin(plugins, eq(pluginInstallations.pluginId, plugins.id))
|
|
16
|
+
.orderBy(pluginInstallations.installedAt, pluginInstallations.id);
|
|
17
|
+
return rows.map(asPluginInstallation);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=pluginInstallationList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginInstallationList.js","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginInstallationList.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CACxC,QAAyB,EACzB,WAAmB;IAEnB,MAAM,sBAAsB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,MAAM,QAAQ;SACtB,MAAM,CAAC,2BAA2B,CAAC;SACnC,IAAI,CAAC,mBAAmB,CAAC;SACzB,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;SAChE,OAAO,CAAC,mBAAmB,CAAC,WAAW,EAAE,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACtE,OAAO,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DrizzleExecutor } from "../drizzle.js";
|
|
2
|
+
export interface PluginHostInstalledPlugin {
|
|
3
|
+
id: string;
|
|
4
|
+
pluginId: string;
|
|
5
|
+
shortName: string;
|
|
6
|
+
version: string;
|
|
7
|
+
status: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Lists the non-secret pluginInstallations identity and health projection for a capability-authorized plugin runtime.
|
|
11
|
+
* The caller authenticates the runtime grant before this read; this action deliberately exposes no variables, users, paths, or package internals.
|
|
12
|
+
*/
|
|
13
|
+
export declare function pluginInstallationListForHost(executor: DrizzleExecutor): Promise<PluginHostInstalledPlugin[]>;
|
|
14
|
+
//# sourceMappingURL=pluginInstallationListForHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginInstallationListForHost.d.ts","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginInstallationListForHost.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,MAAM,WAAW,yBAAyB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAsB,6BAA6B,CAC/C,QAAQ,EAAE,eAAe,GAC1B,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAYtC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { eq } from "drizzle-orm";
|
|
2
|
+
import { pluginInstallations, plugins } from "../schema.js";
|
|
3
|
+
/**
|
|
4
|
+
* Lists the non-secret pluginInstallations identity and health projection for a capability-authorized plugin runtime.
|
|
5
|
+
* The caller authenticates the runtime grant before this read; this action deliberately exposes no variables, users, paths, or package internals.
|
|
6
|
+
*/
|
|
7
|
+
export async function pluginInstallationListForHost(executor) {
|
|
8
|
+
return executor
|
|
9
|
+
.select({
|
|
10
|
+
id: pluginInstallations.id,
|
|
11
|
+
pluginId: pluginInstallations.pluginId,
|
|
12
|
+
shortName: plugins.shortName,
|
|
13
|
+
version: plugins.sourceVersion,
|
|
14
|
+
status: pluginInstallations.status,
|
|
15
|
+
})
|
|
16
|
+
.from(pluginInstallations)
|
|
17
|
+
.innerJoin(plugins, eq(pluginInstallations.pluginId, plugins.id))
|
|
18
|
+
.orderBy(plugins.shortName, pluginInstallations.id);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=pluginInstallationListForHost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginInstallationListForHost.js","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginInstallationListForHost.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAU5D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,6BAA6B,CAC/C,QAAyB;IAEzB,OAAO,QAAQ;SACV,MAAM,CAAC;QACJ,EAAE,EAAE,mBAAmB,CAAC,EAAE;QAC1B,QAAQ,EAAE,mBAAmB,CAAC,QAAQ;QACtC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,OAAO,EAAE,OAAO,CAAC,aAAa;QAC9B,MAAM,EAAE,mBAAmB,CAAC,MAAM;KACrC,CAAC;SACD,IAAI,CAAC,mBAAmB,CAAC;SACzB,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;SAChE,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,mBAAmB,CAAC,EAAE,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DrizzleExecutor } from "../drizzle.js";
|
|
2
|
+
/**
|
|
3
|
+
* Lists every durable plugin installation id so the lifecycle worker can reconcile all runtimes after server startup.
|
|
4
|
+
* This read-only worker boundary does not mutate durable state and avoids coupling restart recovery to catalog availability.
|
|
5
|
+
*/
|
|
6
|
+
export declare function pluginInstallationListIds(executor: DrizzleExecutor): Promise<string[]>;
|
|
7
|
+
//# sourceMappingURL=pluginInstallationListIds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginInstallationListIds.d.ts","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginInstallationListIds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD;;;GAGG;AACH,wBAAsB,yBAAyB,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAM5F"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { pluginInstallations } from "../schema.js";
|
|
2
|
+
/**
|
|
3
|
+
* Lists every durable plugin installation id so the lifecycle worker can reconcile all runtimes after server startup.
|
|
4
|
+
* This read-only worker boundary does not mutate durable state and avoids coupling restart recovery to catalog availability.
|
|
5
|
+
*/
|
|
6
|
+
export async function pluginInstallationListIds(executor) {
|
|
7
|
+
const rows = await executor
|
|
8
|
+
.select({ id: pluginInstallations.id })
|
|
9
|
+
.from(pluginInstallations)
|
|
10
|
+
.orderBy(pluginInstallations.installedAt, pluginInstallations.id);
|
|
11
|
+
return rows.map(({ id }) => id);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=pluginInstallationListIds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginInstallationListIds.js","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginInstallationListIds.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,QAAyB;IACrE,MAAM,IAAI,GAAG,MAAM,QAAQ;SACtB,MAAM,CAAC,EAAE,EAAE,EAAE,mBAAmB,CAAC,EAAE,EAAE,CAAC;SACtC,IAAI,CAAC,mBAAmB,CAAC;SACzB,OAAO,CAAC,mBAAmB,CAAC,WAAW,EAAE,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACtE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DrizzleExecutor } from "../drizzle.js";
|
|
2
|
+
/**
|
|
3
|
+
* Lists ready MCP-backed plugin installation identities for agent function discovery and execution.
|
|
4
|
+
* This worker-facing read excludes skills-only and unhealthy installations so Rig receives only callable durable functions.
|
|
5
|
+
*/
|
|
6
|
+
export declare function pluginInstallationListReadyMcpIds(executor: DrizzleExecutor): Promise<string[]>;
|
|
7
|
+
//# sourceMappingURL=pluginInstallationListReadyMcpIds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginInstallationListReadyMcpIds.d.ts","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginInstallationListReadyMcpIds.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD;;;GAGG;AACH,wBAAsB,iCAAiC,CACnD,QAAQ,EAAE,eAAe,GAC1B,OAAO,CAAC,MAAM,EAAE,CAAC,CAanB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { and, eq, sql } from "drizzle-orm";
|
|
2
|
+
import { pluginInstallations, plugins } from "../schema.js";
|
|
3
|
+
/**
|
|
4
|
+
* Lists ready MCP-backed plugin installation identities for agent function discovery and execution.
|
|
5
|
+
* This worker-facing read excludes skills-only and unhealthy installations so Rig receives only callable durable functions.
|
|
6
|
+
*/
|
|
7
|
+
export async function pluginInstallationListReadyMcpIds(executor) {
|
|
8
|
+
const rows = await executor
|
|
9
|
+
.select({ id: pluginInstallations.id })
|
|
10
|
+
.from(pluginInstallations)
|
|
11
|
+
.innerJoin(plugins, eq(pluginInstallations.pluginId, plugins.id))
|
|
12
|
+
.where(and(eq(pluginInstallations.status, "ready"), sql `json_type(${plugins.manifestJson}, '$.mcp') IS NOT NULL`))
|
|
13
|
+
.orderBy(pluginInstallations.installedAt, pluginInstallations.id);
|
|
14
|
+
return rows.map(({ id }) => id);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=pluginInstallationListReadyMcpIds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginInstallationListReadyMcpIds.js","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginInstallationListReadyMcpIds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,iCAAiC,CACnD,QAAyB;IAEzB,MAAM,IAAI,GAAG,MAAM,QAAQ;SACtB,MAAM,CAAC,EAAE,EAAE,EAAE,mBAAmB,CAAC,EAAE,EAAE,CAAC;SACtC,IAAI,CAAC,mBAAmB,CAAC;SACzB,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;SAChE,KAAK,CACF,GAAG,CACC,EAAE,CAAC,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,GAAG,CAAA,aAAa,OAAO,CAAC,YAAY,wBAAwB,CAC/D,CACJ;SACA,OAAO,CAAC,mBAAmB,CAAC,WAAW,EAAE,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACtE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DrizzleExecutor } from "../drizzle.js";
|
|
2
|
+
import type { MutationHint } from "../chat/types.js";
|
|
3
|
+
import type { PluginInstallationStatus } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Commits a worker-observed lifecycle state to pluginInstallations and appends its matching sync event.
|
|
6
|
+
* The transaction makes asynchronous preparation and health transitions durable and reactive without letting the worker mutate tables directly.
|
|
7
|
+
*/
|
|
8
|
+
export declare function pluginInstallationUpdateStatus(executor: DrizzleExecutor, input: {
|
|
9
|
+
installationId: string;
|
|
10
|
+
status: PluginInstallationStatus;
|
|
11
|
+
detail: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
runtimeImageTag?: string;
|
|
14
|
+
containerInstanceId?: string | null;
|
|
15
|
+
}): Promise<MutationHint>;
|
|
16
|
+
//# sourceMappingURL=pluginInstallationUpdateStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginInstallationUpdateStatus.d.ts","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginInstallationUpdateStatus.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAMrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE3D;;;GAGG;AACH,wBAAsB,8BAA8B,CAChD,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE;IACH,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,wBAAwB,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC,GACF,OAAO,CAAC,YAAY,CAAC,CAyBvB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { eq, sql } from "drizzle-orm";
|
|
2
|
+
import { withTransaction } from "../drizzle.js";
|
|
3
|
+
import { pluginInstallations } from "../schema.js";
|
|
4
|
+
import { syncSequenceNext } from "../sync/syncSequenceNext.js";
|
|
5
|
+
import { syncEventInsert } from "../sync/syncEventInsert.js";
|
|
6
|
+
import { areaHint } from "../chat/areaHint.js";
|
|
7
|
+
/**
|
|
8
|
+
* Commits a worker-observed lifecycle state to pluginInstallations and appends its matching sync event.
|
|
9
|
+
* The transaction makes asynchronous preparation and health transitions durable and reactive without letting the worker mutate tables directly.
|
|
10
|
+
*/
|
|
11
|
+
export async function pluginInstallationUpdateStatus(executor, input) {
|
|
12
|
+
return withTransaction(executor, async (tx) => {
|
|
13
|
+
const sequence = await syncSequenceNext(tx);
|
|
14
|
+
const [updated] = await tx
|
|
15
|
+
.update(pluginInstallations)
|
|
16
|
+
.set({
|
|
17
|
+
status: input.status,
|
|
18
|
+
statusDetail: input.detail,
|
|
19
|
+
lastError: input.error ?? null,
|
|
20
|
+
runtimeImageTag: input.runtimeImageTag,
|
|
21
|
+
containerInstanceId: input.containerInstanceId,
|
|
22
|
+
syncSequence: sequence,
|
|
23
|
+
updatedAt: sql `CURRENT_TIMESTAMP`,
|
|
24
|
+
readyAt: input.status === "ready" ? sql `CURRENT_TIMESTAMP` : null,
|
|
25
|
+
})
|
|
26
|
+
.where(eq(pluginInstallations.id, input.installationId))
|
|
27
|
+
.returning({ id: pluginInstallations.id });
|
|
28
|
+
if (!updated)
|
|
29
|
+
throw new Error("Plugin installation disappeared during status update");
|
|
30
|
+
await syncEventInsert(tx, {
|
|
31
|
+
sequence,
|
|
32
|
+
kind: `plugin.${input.status}`,
|
|
33
|
+
entityId: input.installationId,
|
|
34
|
+
});
|
|
35
|
+
return areaHint(sequence, "plugins");
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=pluginInstallationUpdateStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginInstallationUpdateStatus.js","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginInstallationUpdateStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI/C;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAChD,QAAyB,EACzB,KAOC;IAED,OAAO,eAAe,CAAC,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE;QAC1C,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,EAAE,CAAC,CAAC;QAC5C,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE;aACrB,MAAM,CAAC,mBAAmB,CAAC;aAC3B,GAAG,CAAC;YACD,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,YAAY,EAAE,KAAK,CAAC,MAAM;YAC1B,SAAS,EAAE,KAAK,CAAC,KAAK,IAAI,IAAI;YAC9B,eAAe,EAAE,KAAK,CAAC,eAAe;YACtC,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;YAC9C,YAAY,EAAE,QAAQ;YACtB,SAAS,EAAE,GAAG,CAAA,mBAAmB;YACjC,OAAO,EAAE,KAAK,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAA,mBAAmB,CAAC,CAAC,CAAC,IAAI;SACpE,CAAC;aACD,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAAC,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;aACvD,SAAS,CAAC,EAAE,EAAE,EAAE,mBAAmB,CAAC,EAAE,EAAE,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;QACtF,MAAM,eAAe,CAAC,EAAE,EAAE;YACtB,QAAQ;YACR,IAAI,EAAE,UAAU,KAAK,CAAC,MAAM,EAAE;YAC9B,QAAQ,EAAE,KAAK,CAAC,cAAc;SACjC,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DrizzleExecutor } from "../drizzle.js";
|
|
2
|
+
import type { SystemPluginSummary } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Lists durable system plugins and their persisted package-image metadata for an active server administrator.
|
|
5
|
+
* This read-only boundary does not mutate durable state and keeps catalog packages distinct from reusable installed plugin identities.
|
|
6
|
+
*/
|
|
7
|
+
export declare function pluginList(executor: DrizzleExecutor, actorUserId: string): Promise<SystemPluginSummary[]>;
|
|
8
|
+
//# sourceMappingURL=pluginList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginList.d.ts","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAKrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD;;;GAGG;AACH,wBAAsB,UAAU,CAC5B,QAAQ,EAAE,eAAe,EACzB,WAAW,EAAE,MAAM,GACpB,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAOhC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { plugins } from "../schema.js";
|
|
2
|
+
import { userRequireServerAdmin } from "../chat/userRequireServerAdmin.js";
|
|
3
|
+
import { asSystemPlugin } from "./impl/asPlugin.js";
|
|
4
|
+
import { pluginSelection } from "./impl/pluginSelection.js";
|
|
5
|
+
/**
|
|
6
|
+
* Lists durable system plugins and their persisted package-image metadata for an active server administrator.
|
|
7
|
+
* This read-only boundary does not mutate durable state and keeps catalog packages distinct from reusable installed plugin identities.
|
|
8
|
+
*/
|
|
9
|
+
export async function pluginList(executor, actorUserId) {
|
|
10
|
+
await userRequireServerAdmin(executor, actorUserId);
|
|
11
|
+
const rows = await executor
|
|
12
|
+
.select(pluginSelection)
|
|
13
|
+
.from(plugins)
|
|
14
|
+
.orderBy(plugins.installedAt, plugins.id);
|
|
15
|
+
return rows.map(asSystemPlugin);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=pluginList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginList.js","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginList.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAG5D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC5B,QAAyB,EACzB,WAAmB;IAEnB,MAAM,sBAAsB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,MAAM,QAAQ;SACtB,MAAM,CAAC,eAAe,CAAC;SACvB,IAAI,CAAC,OAAO,CAAC;SACb,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IAC9C,OAAO,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DrizzleExecutor } from "../drizzle.js";
|
|
2
|
+
import { type PluginMcpToolSummary } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Lists the last successfully discovered MCP tools for one installation from durable storage for a server administrator.
|
|
5
|
+
* This boundary never contacts the plugin runtime, so ordinary tool discovery remains available while the runtime is busy or restarting.
|
|
6
|
+
*/
|
|
7
|
+
export declare function pluginMcpToolsList(executor: DrizzleExecutor, actorUserId: string, installationId: string): Promise<{
|
|
8
|
+
syncedAt?: string;
|
|
9
|
+
tools: PluginMcpToolSummary[];
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=pluginMcpToolsList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginMcpToolsList.d.ts","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginMcpToolsList.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,OAAO,EAAe,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEpE;;;GAGG;AACH,wBAAsB,kBAAkB,CACpC,QAAQ,EAAE,eAAe,EACzB,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,GACvB,OAAO,CAAC;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,oBAAoB,EAAE,CAAA;CAAE,CAAC,CA0B/D"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { eq } from "drizzle-orm";
|
|
2
|
+
import { userRequireServerAdmin } from "../chat/userRequireServerAdmin.js";
|
|
3
|
+
import { pluginInstallations, pluginMcpTools } from "../schema.js";
|
|
4
|
+
import { PluginError } from "./types.js";
|
|
5
|
+
/**
|
|
6
|
+
* Lists the last successfully discovered MCP tools for one installation from durable storage for a server administrator.
|
|
7
|
+
* This boundary never contacts the plugin runtime, so ordinary tool discovery remains available while the runtime is busy or restarting.
|
|
8
|
+
*/
|
|
9
|
+
export async function pluginMcpToolsList(executor, actorUserId, installationId) {
|
|
10
|
+
await userRequireServerAdmin(executor, actorUserId);
|
|
11
|
+
const [installation] = await executor
|
|
12
|
+
.select({ id: pluginInstallations.id, syncedAt: pluginInstallations.mcpToolsSyncedAt })
|
|
13
|
+
.from(pluginInstallations)
|
|
14
|
+
.where(eq(pluginInstallations.id, installationId))
|
|
15
|
+
.limit(1);
|
|
16
|
+
if (!installation)
|
|
17
|
+
throw new PluginError("not_found", "Plugin installation was not found");
|
|
18
|
+
const rows = await executor
|
|
19
|
+
.select()
|
|
20
|
+
.from(pluginMcpTools)
|
|
21
|
+
.where(eq(pluginMcpTools.installationId, installationId))
|
|
22
|
+
.orderBy(pluginMcpTools.name);
|
|
23
|
+
return {
|
|
24
|
+
...(installation.syncedAt ? { syncedAt: installation.syncedAt } : {}),
|
|
25
|
+
tools: rows.map((row) => ({
|
|
26
|
+
installationId: row.installationId,
|
|
27
|
+
name: row.name,
|
|
28
|
+
...(row.title ? { title: row.title } : {}),
|
|
29
|
+
...(row.description ? { description: row.description } : {}),
|
|
30
|
+
inputSchema: jsonObject(row.inputSchemaJson),
|
|
31
|
+
...(row.outputSchemaJson ? { outputSchema: jsonObject(row.outputSchemaJson) } : {}),
|
|
32
|
+
...(row.annotationsJson ? { annotations: jsonObject(row.annotationsJson) } : {}),
|
|
33
|
+
syncedAt: row.syncedAt,
|
|
34
|
+
})),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function jsonObject(source) {
|
|
38
|
+
const value = JSON.parse(source);
|
|
39
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
40
|
+
throw new Error("Persisted plugin MCP tool schema is invalid");
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=pluginMcpToolsList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginMcpToolsList.js","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginMcpToolsList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,WAAW,EAA6B,MAAM,YAAY,CAAC;AAEpE;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACpC,QAAyB,EACzB,WAAmB,EACnB,cAAsB;IAEtB,MAAM,sBAAsB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IACpD,MAAM,CAAC,YAAY,CAAC,GAAG,MAAM,QAAQ;SAChC,MAAM,CAAC,EAAE,EAAE,EAAE,mBAAmB,CAAC,EAAE,EAAE,QAAQ,EAAE,mBAAmB,CAAC,gBAAgB,EAAE,CAAC;SACtF,IAAI,CAAC,mBAAmB,CAAC;SACzB,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;SACjD,KAAK,CAAC,CAAC,CAAC,CAAC;IACd,IAAI,CAAC,YAAY;QAAE,MAAM,IAAI,WAAW,CAAC,WAAW,EAAE,mCAAmC,CAAC,CAAC;IAC3F,MAAM,IAAI,GAAG,MAAM,QAAQ;SACtB,MAAM,EAAE;SACR,IAAI,CAAC,cAAc,CAAC;SACpB,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;SACxD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO;QACH,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YACtB,cAAc,EAAE,GAAG,CAAC,cAAc;YAClC,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC1C,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5D,WAAW,EAAE,UAAU,CAAC,GAAG,CAAC,eAAe,CAAC;YAC5C,GAAG,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,UAAU,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnF,GAAG,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAChF,QAAQ,EAAE,GAAG,CAAC,QAAQ;SACzB,CAAC,CAAC;KACN,CAAC;AACN,CAAC;AAED,SAAS,UAAU,CAAC,MAAc;IAC9B,MAAM,KAAK,GAAY,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACnE,OAAO,KAAgC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DrizzleExecutor } from "../drizzle.js";
|
|
2
|
+
export interface ReadyPluginMcpTool {
|
|
3
|
+
installationId: string;
|
|
4
|
+
shortName: string;
|
|
5
|
+
name: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
inputSchema: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Lists pluginMcpTools cached for ready MCP-backed pluginInstallations so Rig discovery and execution resolve function identities without contacting MCP servers.
|
|
12
|
+
* The stable installation and plugin ordering makes the durable cache the single function-catalog source for each agent submission.
|
|
13
|
+
*/
|
|
14
|
+
export declare function pluginMcpToolsListReady(executor: DrizzleExecutor): Promise<ReadyPluginMcpTool[]>;
|
|
15
|
+
//# sourceMappingURL=pluginMcpToolsListReady.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginMcpToolsListReady.d.ts","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginMcpToolsListReady.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,MAAM,WAAW,kBAAkB;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CACzC,QAAQ,EAAE,eAAe,GAC1B,OAAO,CAAC,kBAAkB,EAAE,CAAC,CA4B/B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { and, eq, sql } from "drizzle-orm";
|
|
2
|
+
import { pluginInstallations, pluginMcpTools, plugins } from "../schema.js";
|
|
3
|
+
/**
|
|
4
|
+
* Lists pluginMcpTools cached for ready MCP-backed pluginInstallations so Rig discovery and execution resolve function identities without contacting MCP servers.
|
|
5
|
+
* The stable installation and plugin ordering makes the durable cache the single function-catalog source for each agent submission.
|
|
6
|
+
*/
|
|
7
|
+
export async function pluginMcpToolsListReady(executor) {
|
|
8
|
+
const rows = await executor
|
|
9
|
+
.select({
|
|
10
|
+
installationId: pluginMcpTools.installationId,
|
|
11
|
+
shortName: plugins.shortName,
|
|
12
|
+
name: pluginMcpTools.name,
|
|
13
|
+
title: pluginMcpTools.title,
|
|
14
|
+
description: pluginMcpTools.description,
|
|
15
|
+
inputSchemaJson: pluginMcpTools.inputSchemaJson,
|
|
16
|
+
})
|
|
17
|
+
.from(pluginMcpTools)
|
|
18
|
+
.innerJoin(pluginInstallations, eq(pluginInstallations.id, pluginMcpTools.installationId))
|
|
19
|
+
.innerJoin(plugins, eq(plugins.id, pluginInstallations.pluginId))
|
|
20
|
+
.where(and(eq(pluginInstallations.status, "ready"), sql `json_type(${plugins.manifestJson}, '$.mcp') IS NOT NULL`))
|
|
21
|
+
.orderBy(pluginInstallations.installedAt, pluginInstallations.id, pluginMcpTools.name);
|
|
22
|
+
return rows.map((row) => ({
|
|
23
|
+
installationId: row.installationId,
|
|
24
|
+
shortName: row.shortName,
|
|
25
|
+
name: row.name,
|
|
26
|
+
...(row.title ? { title: row.title } : {}),
|
|
27
|
+
...(row.description ? { description: row.description } : {}),
|
|
28
|
+
inputSchema: jsonObject(row.inputSchemaJson),
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
function jsonObject(source) {
|
|
32
|
+
const value = JSON.parse(source);
|
|
33
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
34
|
+
throw new Error("Persisted plugin MCP tool input schema is invalid");
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=pluginMcpToolsListReady.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginMcpToolsListReady.js","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginMcpToolsListReady.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAW5E;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CACzC,QAAyB;IAEzB,MAAM,IAAI,GAAG,MAAM,QAAQ;SACtB,MAAM,CAAC;QACJ,cAAc,EAAE,cAAc,CAAC,cAAc;QAC7C,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,IAAI,EAAE,cAAc,CAAC,IAAI;QACzB,KAAK,EAAE,cAAc,CAAC,KAAK;QAC3B,WAAW,EAAE,cAAc,CAAC,WAAW;QACvC,eAAe,EAAE,cAAc,CAAC,eAAe;KAClD,CAAC;SACD,IAAI,CAAC,cAAc,CAAC;SACpB,SAAS,CAAC,mBAAmB,EAAE,EAAE,CAAC,mBAAmB,CAAC,EAAE,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;SACzF,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;SAChE,KAAK,CACF,GAAG,CACC,EAAE,CAAC,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,GAAG,CAAA,aAAa,OAAO,CAAC,YAAY,wBAAwB,CAC/D,CACJ;SACA,OAAO,CAAC,mBAAmB,CAAC,WAAW,EAAE,mBAAmB,CAAC,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC;IAC3F,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACtB,cAAc,EAAE,GAAG,CAAC,cAAc;QAClC,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1C,GAAG,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,WAAW,EAAE,UAAU,CAAC,GAAG,CAAC,eAAe,CAAC;KAC/C,CAAC,CAAC,CAAC;AACR,CAAC;AAED,SAAS,UAAU,CAAC,MAAc;IAC9B,MAAM,KAAK,GAAY,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAC3D,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACzE,OAAO,KAAgC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DrizzleExecutor } from "../drizzle.js";
|
|
2
|
+
import type { MutationHint } from "../chat/types.js";
|
|
3
|
+
export interface PluginMcpToolInput {
|
|
4
|
+
name: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
inputSchema: Record<string, unknown>;
|
|
8
|
+
outputSchema?: Record<string, unknown>;
|
|
9
|
+
annotations?: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Atomically replaces one installation's pluginMcpTools rows and pluginInstallations sync timestamp after a successful runtime discovery.
|
|
13
|
+
* The complete replacement and matching plugin sync event share one transaction so readers never observe a partial tool set.
|
|
14
|
+
*/
|
|
15
|
+
export declare function pluginMcpToolsReplace(executor: DrizzleExecutor, installationId: string, tools: readonly PluginMcpToolInput[]): Promise<MutationHint>;
|
|
16
|
+
//# sourceMappingURL=pluginMcpToolsReplace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginMcpToolsReplace.d.ts","sourceRoot":"","sources":["../../../sources/modules/plugin/pluginMcpToolsReplace.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMrD,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAID;;;GAGG;AACH,wBAAsB,qBAAqB,CACvC,QAAQ,EAAE,eAAe,EACzB,cAAc,EAAE,MAAM,EACtB,KAAK,EAAE,SAAS,kBAAkB,EAAE,GACrC,OAAO,CAAC,YAAY,CAAC,CA8CvB"}
|