@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
19 lines • 1.14 kB
TypeScript
import { Worker, type WorkerOptions } from "node:worker_threads";
import type { LaunchGate } from "./launch-gate.ts";
import { WorkerLaunchClient } from "./worker-launch.ts";
export interface GatedWorkerData {
readonly barrierClock: SharedArrayBuffer;
readonly jobId: string;
/** The tool child's re-entry command: scrubbed from every environment, so it travels in the worker data. */
readonly reentry?: string | undefined;
}
export declare function startGatedWorker(gate: LaunchGate, file: string | URL, jobId: string, options?: Omit<WorkerOptions, "workerData"> & {
readonly workerData?: Record<string, unknown>;
}): Worker;
export declare function installWorkerBarrier(data: GatedWorkerData, env?: NodeJS.ProcessEnv): WorkerLaunchClient;
/**
* A worker entry beside the calling module, named by its source path: the built package ships `.js`, so the extension
* follows the caller's own file. Keep the `"./x.ts"` literal - the single-writer audit follows it into the worker.
*/
export declare function siblingWorkerUrl(sourceSpecifier: string, callerUrl: string): URL;
//# sourceMappingURL=gated-worker.d.ts.map