import type { JobRow, JobStateName } from "./protocol.js"; /** NT-2 event names on pi.events. */ export declare const JOB_NEEDS_INPUT = "agents:job_needs_input"; export declare const JOB_COMPLETED = "agents:job_completed"; export interface JobEventPayload { id: string; name: string; cwd: string; state: JobStateName; summary: string | null; question: string | null; error: string | null; } export type NotifyMode = "auto" | "osc9" | "osc777" | "bell" | "off"; interface Bus { emit(channel: string, data: unknown): void; } /** The pi.events bus of this process (set once by the extension). */ export declare function setJobEventBus(bus: Bus | undefined): void; /** "needs input" for a blocked row, "completed" for done/failed, else nothing. */ export declare function transitionKind(before: JobStateName | undefined, row: JobRow): "needs_input" | "completed" | undefined; /** * Note a row's state. Returns what it changed into when that is news: the first * sighting of a job only records it, and the same state is never announced twice. */ export declare function observeJob(row: JobRow): "needs_input" | "completed" | undefined; export declare const forgetJob: (id: string) => boolean; /** The terminal's notification for "auto": OSC 9 where it is known to work, else the bell. */ export declare function resolveNotify(mode: NotifyMode | undefined, env?: NodeJS.ProcessEnv): Exclude; /** NT-1: the bytes that make the terminal notify (empty for "off"). */ export declare function notifySequence(mode: Exclude, title: string, body: string): string; export declare function notifyText(row: JobRow, kind: "needs_input" | "completed"): { title: string; body: string; }; export {};