feat(hooks): add IntentHookEngine with Pre-Hook, Gatekeeper enforcement, and XML intent_context injection

This commit is contained in:
Rediet Bekele 2026-02-20 16:51:29 +00:00
parent 9587081ab1
commit fcea38d432

View file

@ -126,11 +126,6 @@ export function formatToolOutput(toolInfo: Record<string, unknown>): string {
const reason = toolInfo.reason as string
return `${mode} mode${reason ? `\n ${reason}` : ""}`
}
case "select_active_intent": {
const intentId = toolInfo.intent_id as string;
return `🔑 Selected Intent: ${intentId || "(none)"}`;
}
case "switch_mode": {
const mode = (toolInfo.mode_slug as string) || (toolInfo.mode as string) || "unknown"
@ -227,12 +222,6 @@ export function formatToolAskMessage(toolInfo: Record<string, unknown>): string
return `Switch to ${mode} mode?${reason ? `\nReason: ${reason}` : ""}`
}
case "select_active_intent": {
const intentId = toolInfo.intent_id as string;
return `Load context for intent: ${intentId}?`;
}
case "execute_command": {
const command = toolInfo.command as string
return `Run command?\n$ ${command || "(no command)"}`