@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
22 lines • 1.02 kB
TypeScript
import type { ExtensionHandlerBudget } from "./handler-budget.ts";
export interface SessionShutdownBudget {
readonly handler: ExtensionHandlerBudget;
readonly quitMs: number;
}
export interface QuitHandlerBudget {
readonly budget: ExtensionHandlerBudget;
readonly endsAtQuitDeadline: boolean;
}
/**
* One deadline shared by every `session_shutdown` handler of a quit that ends in process exit (senpi#3711),
* counted from the moment the shutdown emission is armed. Each handler keeps its own cap
* and is still started in order; the host only stops waiting once the deadline passes. A handler that starts after
* the deadline gets 1 ms, so synchronous cleanup still completes and asynchronous work is left running.
*/
export declare class QuitDeadline {
private readonly deadline;
private readonly now;
constructor(totalMs: number, now: () => number, startedAt?: number);
budgetFor(base: ExtensionHandlerBudget): QuitHandlerBudget;
}
//# sourceMappingURL=shutdown-quit-budget.d.ts.map