Files
flynn/src/commands/types.ts
T
2026-02-21 12:39:27 -08:00

46 lines
1.5 KiB
TypeScript

export interface CommandContext {
channel: string;
senderId: string;
sessionId: string;
rawInput: string;
services?: CommandServices;
}
export interface CommandResult {
handled: boolean;
text: string;
}
export interface CommandDefinition {
name: string;
aliases?: string[];
description: string;
execute: (args: string[], ctx: CommandContext) => Promise<CommandResult>;
}
export interface CommandServices {
getStatus?: () => Promise<string> | string;
getTools?: () => Promise<string> | string;
getUsage?: () => Promise<string> | string;
getContext?: () => Promise<string> | string;
getModel?: () => Promise<string> | string;
setModel?: (tier: string) => Promise<string> | string;
compact?: () => Promise<string> | string;
reset?: () => Promise<string> | string;
delegateAgent?: (agentName: string, task: string) => Promise<string> | string;
runCouncil?: (task: string) => Promise<string> | string;
getElevation?: () => Promise<string> | string;
setElevation?: (input: string) => Promise<string> | string;
getQueue?: () => Promise<string> | string;
setQueue?: (input: string) => Promise<string> | string;
resetQueue?: () => Promise<string> | string;
cancelRun?: () => Promise<string> | string;
transferSession?: (target: string) => Promise<string> | string;
getApprovals?: () => Promise<string> | string;
approvePending?: (input: string) => Promise<string> | string;
denyPending?: (input: string) => Promise<string> | string;
skillCommand?: (input: string) => Promise<string> | string;
}