@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
31 lines • 1.51 kB
TypeScript
import type { CliRuntimeConfiguration } from "../../main.ts";
import { type LooplessWorker } from "./loopless-worker-client.ts";
import type { WorkerCapacity } from "./worker-capacity.ts";
export interface LooplessWorkerPoolOptions {
readonly configuration: CliRuntimeConfiguration;
/** The process's one worker budget; the session registry of the same process shares it. */
readonly capacity: WorkerCapacity;
/** How long a closing worker may dispose its runtime before it is terminated (as session workers' close grace). */
readonly closeGraceMs: number;
/** Production starts a real isolate; a caller may supply one to drive admission deterministically. */
readonly createWorker?: () => LooplessWorker;
}
export interface OpenLooplessWorker {
readonly id: string;
readonly tools: readonly string[];
}
/**
* Loopless workers (senpi#5413): one session-worker isolate per session, each hosting a runtime with the agent
* loop removed. Every worker, opening ones included, counts against the process's worker cap, so a process
* serving many sessions admits at most `SESSION_WORKER_LIMITS.workers` workers across all of them (Z2).
*/
export declare class LooplessWorkerPool {
private readonly workers;
private readonly options;
private serial;
constructor(options: LooplessWorkerPoolOptions);
get size(): number;
open(cwd: string): Promise<OpenLooplessWorker>;
close(id: string): Promise<void>;
}
//# sourceMappingURL=loopless-worker-pool.d.ts.map