import { AgentApplicationType } from '@baserow/modules/agent/applicationTypes' import { AgentChatRunType } from '@baserow/modules/agent/chatRunTypes' import { AgentLastViewedItemType } from '@baserow/modules/agent/lastViewedItemTypes' import { AgentApplicationSearchType } from '@baserow/modules/agent/searchTypes' import { agentToolPresentationTypes } from '@baserow/modules/agent/toolPresentationTypes' import { TriggerDataProviderType, ActionInputDataProviderType, } from '@baserow/modules/agent/dataProviderTypes' import { HTTPAgentTriggerType, InboundEmailAgentTriggerType, RowsCreatedAgentTriggerType, RowsDeletedAgentTriggerType, RowsUpdatedAgentTriggerType, } from '@baserow/modules/agent/agentTriggerTypes' import { searchTypeRegistry } from '@baserow/modules/core/search/types/registry' import { AgentParticipationPermissionManagerType } from '@baserow/modules/agent/permissionManagerTypes' import { ActionsAgentConfigurationSectionType, ConnectedAppsAgentConfigurationSectionType, InstructionsAgentConfigurationSectionType, SettingsAgentConfigurationSectionType, WhenItRunsAgentConfigurationSectionType, WorkspaceAccessAgentConfigurationSectionType, } from '@baserow/modules/agent/configurationSectionTypes' export default defineNuxtPlugin({ name: 'agent', dependsOn: ['core'], setup(nuxtApp) { const context = { app: nuxtApp } for (const ToolPresentation of agentToolPresentationTypes) { nuxtApp.$registry.register( 'toolPresentation', new ToolPresentation(context) ) } nuxtApp.$registry.register( 'permissionManager', new AgentParticipationPermissionManagerType(context) ) nuxtApp.$registry.registerNamespace('agentConfigurationSection') nuxtApp.$registry.registerNamespace('agentDataProvider') nuxtApp.$registry.registerNamespace('agentTriggerType') nuxtApp.$registry.registerNamespace('agentChannelType') for (const TriggerType of [ HTTPAgentTriggerType, InboundEmailAgentTriggerType, RowsCreatedAgentTriggerType, RowsUpdatedAgentTriggerType, RowsDeletedAgentTriggerType, ]) { nuxtApp.$registry.register('agentTriggerType', new TriggerType(context)) } nuxtApp.$registry.register( 'agentDataProvider', new TriggerDataProviderType(context) ) nuxtApp.$registry.register( 'agentDataProvider', new ActionInputDataProviderType(context) ) nuxtApp.$registry.register( 'agentConfigurationSection', new ActionsAgentConfigurationSectionType(context) ) nuxtApp.$registry.register( 'agentConfigurationSection', new InstructionsAgentConfigurationSectionType(context) ) nuxtApp.$registry.register( 'agentConfigurationSection', new WhenItRunsAgentConfigurationSectionType(context) ) nuxtApp.$registry.register( 'agentConfigurationSection', new WorkspaceAccessAgentConfigurationSectionType(context) ) nuxtApp.$registry.register( 'agentConfigurationSection', new ConnectedAppsAgentConfigurationSectionType(context) ) nuxtApp.$registry.register( 'agentConfigurationSection', new SettingsAgentConfigurationSectionType(context) ) nuxtApp.$registry.register('application', new AgentApplicationType(context)) nuxtApp.$registry.register('chatRunType', new AgentChatRunType(context)) nuxtApp.$registry.register( 'lastViewedItem', new AgentLastViewedItemType(context) ) searchTypeRegistry.register(new AgentApplicationSearchType(context)) }, })