@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
29 lines • 1.16 kB
TypeScript
import type { DelegationResponse } from "../delegation-wire.ts";
import { type MachineOpCommand } from "./wire.ts";
export declare class MachineOpHandler {
private readonly stateDir;
private readonly terminals;
private readonly terminalOps;
private readonly cache;
private readonly stopping;
private readonly running;
private ops;
private held;
constructor(options: {
readonly agentDir: string;
});
answer(command: MachineOpCommand, record: unknown, id: string | undefined): Promise<DelegationResponse>;
/** Review M3: an op in flight or a live terminal keeps the host from being idle (no idle handover, no empty exit). */
busy(): boolean;
/**
* The host is ending (a handover switching, an empty exit): from now on a new `machine_op` is refused
* `machine_op_unavailable` and runs nothing. Called in the same step as the idle decision, so nothing starts between.
*/
hold(): void;
/** A blocked handover: this host keeps serving machine ops. */
release(): void;
dispose(): Promise<void>;
private run;
private machineOps;
}
//# sourceMappingURL=handler.d.ts.map