@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
19 lines • 969 B
TypeScript
import { type Protected } from "./protected.ts";
import { type Situation } from "./situation.ts";
import type { KillGuardContext, KillGuardVerdict, ProcessRow } from "./types.ts";
export type KillTarget = {
readonly kind: "pid";
readonly pid: number;
} | {
readonly kind: "group";
readonly pgid: number;
} | {
readonly kind: "all";
};
export declare const refuseAll: () => KillGuardVerdict;
/** `kill` (builtin or external): R3 on `-1`, R2 on protected pids, R4 on groups holding a protected process. */
export declare function judgeKill(situation: Situation, context: KillGuardContext): KillGuardVerdict;
/** Literal pids and groups, resolved against the caller's vantage. */
export declare function judgeTargets(targets: readonly KillTarget[], context: KillGuardContext): KillGuardVerdict;
export declare function judgeGroup(pgid: number, rows: readonly ProcessRow[], protectedPids: Protected): KillGuardVerdict;
//# sourceMappingURL=kill.d.ts.map