Plugins
Extend AlphaBase runtime behavior with plugin hooks.
AlphaBase plugins are runtime extensions that can register hooks, auth integrations, and tool definitions.
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.