/** * Emergency stop — bypass all queues and debouncing. * Called at the earliest ingress point (before debouncer) to guarantee immediate execution. */ import type { IdleHandsConfig } from "../../config/config.js"; import type { SessionEntry } from "../../config/sessions.js"; import { isAbortRequestText } from "./abort.js"; export { isAbortRequestText }; export type EmergencyStopResult = { aborted: boolean; replyText: string; sessionKey?: string; }; /** * Execute an emergency stop for a session. * Clears all queues, aborts embedded runs, and stops subagents. * Returns the reply text to send to the user. */ export declare function emergencyStop(params: { cfg: IdleHandsConfig; sessionKey?: string; sessionId?: string; sessionStore?: Record; }): EmergencyStopResult; /** * Resolve session info from the session store for emergency stop. * Lightweight — just reads the store, no locks. */ export declare function resolveSessionForEmergencyStop(sessionKey: string): { sessionId?: string; store?: Record; };