openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
21 lines (20 loc) • 1.13 kB
TypeScript
import { clearPluginCommands, clearPluginCommandsForPlugin, getPluginCommandSpecs, type RegisteredPluginCommand } from "./command-registry-state.js";
import type { OpenClawPluginCommandDefinition } from "./types.js";
export type CommandRegistrationResult = {
ok: boolean;
error?: string;
};
export declare function validateCommandName(name: string): string | null;
/**
* Validate a plugin command definition without registering it.
* Returns an error message if invalid, or null if valid.
* Shared by both the global registration path and snapshot (non-activating) loads.
*/
export declare function validatePluginCommandDefinition(command: OpenClawPluginCommandDefinition): string | null;
export declare function listPluginInvocationKeys(command: OpenClawPluginCommandDefinition): string[];
export declare function registerPluginCommand(pluginId: string, command: OpenClawPluginCommandDefinition, opts?: {
pluginName?: string;
pluginRoot?: string;
}): CommandRegistrationResult;
export { clearPluginCommands, clearPluginCommandsForPlugin, getPluginCommandSpecs };
export type { RegisteredPluginCommand };