feat(core): add command, intent, and routing primitives

This commit is contained in:
William Valentin
2026-02-12 22:47:22 -08:00
parent 7ae0fb51c2
commit 6e8984f788
25 changed files with 1469 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
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;
getUsage?: () => Promise<string> | string;
getModel?: () => Promise<string> | string;
setModel?: (tier: string) => Promise<string> | string;
compact?: () => Promise<string> | string;
reset?: () => Promise<string> | string;
}