Skip to main content

@omniscribe/plugin-api

@omniscribe/plugin-api

Plugin API contracts for Omniscribe. This package defines the interfaces, types, and base classes that plugins implement to integrate with the Omniscribe platform.

Zero runtime dependencies. Pure TypeScript types and thin abstract classes.

Classes

ClassDescription
BaseFrontendPluginFrontend plugin interface for UI contributions.
BaseFullPluginFrontend plugin interface for UI contributions.
BaseProviderPluginAI Provider Plugin interface.

Interfaces

InterfaceDescription
ActionBarItemRegistrationRegistration for an action bar item.
ActivationEventWithModeParameterized activation event for mode-specific activation. Used by provider plugins to activate only when their specific AI mode is used.
AiProviderPluginAI Provider Plugin interface.
CliCommandConfigConfiguration for a shell command to execute. Used by buildLaunchCommand, buildResumeCommand, and other command builders.
CliDetectionResultResult of detecting whether a provider's CLI is installed and configured.
DisposableA resource that can be disposed to free up resources. Follows the VS Code Disposable convention for cleanup management.
FrontendPluginFrontend plugin interface for UI contributions.
FrontendPluginContextExtended plugin context for frontend plugins. Provides registration methods for each UI extension point. Every registerXxx method returns a Disposable that removes the registration.
LaunchContextContext provided to command builders when launching a new session. Contains all the information a provider needs to construct the CLI command.
ManifestValidationResultResult of validating a plugin manifest. Contains a list of human-readable error messages when validation fails.
McpConfigContributionMCP configuration contribution from a provider. Providers that support MCP can contribute configuration that gets written to the appropriate location before session launch.
MoreMenuItemRegistrationRegistration for a "More" menu item.
OmniscribePluginBase interface for all Omniscribe plugins.
PluginContextContext provided to a plugin during activation. Contains the plugin's identity, a scoped logger, and a subscriptions array for tracking disposables that should be cleaned up on deactivation.
PluginLoggerLogger interface for plugins. Each plugin receives a scoped logger that prefixes output with the plugin ID.
PluginManifestPlugin manifest declared in a package's omniscribe field in package.json.
ProviderCapabilitiesDeclares what optional features a provider supports.
ProviderSessionEntryA session history entry read from the provider's local storage. Providers that support session history map their native format to this type.
ProviderUsageDataProvider-agnostic usage data. Returned by the optional parseUsage() method on providers that declare supportsUsage: true.
SessionStatusPropsProps passed to session status renderer components.
SessionStatusRendererRegistrationRegistration for a custom session status renderer.
SettingsCategoryRegistrationRegistration for a settings category (group of sections).
SettingsSectionRegistrationRegistration for a settings section within a category.
TerminalActionContextContext passed to terminal action, action bar, and more menu callbacks.
TerminalHeaderActionRegistrationRegistration for a terminal header action button.
ThemeRegistrationRegistration for a plugin-provided theme.
UsageMetricA single named usage metric with percentage and optional reset information.
UsagePanelPropsProps passed to usage panel components.
UsagePanelRegistrationRegistration for a usage panel component.

Type Aliases

Type AliasDescription
ActivationEventSimple activation event triggers.
PluginActivationA plugin activation trigger. Can be a simple event string or a parameterized event with additional data.
PluginComponentTypeA component type that is compatible with React components without importing React. Plugin authors will use actual React components; this type is the API contract.
PluginTypeWhat a plugin provides.
ProviderPluginContextExtended plugin context for AI provider plugins. Inherits the base PluginContext with provider-specific additions. Currently identical to PluginContext but provides a dedicated type for future provider-specific context extensions.
ProviderSessionStatusNormalized session status as reported by a provider.
SessionOperationSession operations that a provider can support. Each operation is declared individually via supportedOperations.

Variables

VariableDescription
ALLOWED_PROVIDER_INVOKE_METHODS-

Functions

FunctionDescription
getCapabilitiesGet the full capabilities object from a provider plugin. Simple accessor for consistent capability access patterns.
hasCapabilityCheck if a provider plugin has a specific capability enabled.
isFrontendPluginCheck if a plugin is a frontend plugin (type 'frontend' or 'both'). When true, the plugin implements FrontendPlugin with UI registration methods.
isFullPluginCheck if a plugin is a full plugin (type 'both'). When true, the plugin implements both AiProviderPlugin and FrontendPlugin.
isProviderPluginCheck if a plugin is a provider plugin (type 'provider' or 'both'). When true, the plugin implements AiProviderPlugin with capabilities, detectCli, buildLaunchCommand, and parseTerminalStatus.
supportsOperationCheck if a provider plugin supports a specific session operation.
validateManifestValidate a plugin manifest object.