feat: add plugin command API for LLM-free auto-reply commands

This adds a new `api.registerCommand()` method to the plugin API, allowing
plugins to register slash commands that execute without invoking the AI agent.

Features:
- Plugin commands are processed before built-in commands and the agent
- Commands can optionally require authorization
- Commands can accept arguments
- Async handlers are supported

Use case: plugins can implement toggle commands (like /tts_on, /tts_off)
that respond immediately without consuming LLM API calls.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Glucksberg
2026-01-23 03:17:10 +00:00
committed by Peter Steinberger
parent 66eec295b8
commit 4ee808dbcb
11 changed files with 355 additions and 0 deletions

View File

@@ -147,6 +147,7 @@ function createPluginRecord(params: {
gatewayMethods: [],
cliCommands: [],
services: [],
commands: [],
httpHandlers: 0,
hookCount: 0,
configSchema: params.configSchema,