Plugins
AlphaBase plugins are runtime extensions that can register hooks, auth integrations, and tool definitions.
Plugins run code inside the active AlphaBase runtime and may observe or influence chat, tool, permission, command, shell, and authentication flows. Install only reviewed, trusted, version-pinned plugins. Plugin permissions are not a sandbox; use a separate execution boundary for untrusted code.
Obtain a compatible @alphabase/plugin package from your distributor. A public package registry release is deployment-dependent; do
not treat this page as a promise that npm install @alphabase/plugin will work.
Plugin Capabilities
Plugins can hook into:
- chat lifecycle (
chat.message,chat.params,chat.headers) - tool lifecycle (
tool.execute.before,tool.execute.after) - permission flow (
permission.ask) - command flow (
command.execute.before) - shell environment (
shell.env) - experimental transforms
Tool Registration
Plugins can provide tools using @alphabase/plugin:
import { tool } from "@alphabase/plugin"
export default tool({ description: "Example plugin tool", args: { query: tool.schema.string(), }, async execute(args) { return `received: ${args.query}` },})Auth Extensions
Plugins can also register provider-specific auth methods (oauth or api) with guided prompts.
Guidance
Use plugins for cross-cutting runtime behavior. Use Custom Tools for workspace-specific task helpers.