UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

35 lines • 1.68 kB
import type { ResolverRequest, ResolverValue, ResolverWorkerMessage } from "./path-identity-protocol.ts"; /** The worker transport, injectable so a test can stall it without a real wedge. */ export interface ResolverTransport { post(request: ResolverRequest): void; onMessage(handler: (message: ResolverWorkerMessage) => void): void; onError(handler: (error: Error) => void): void; onExit(handler: () => void): void; terminate(): Promise<unknown>; } export interface ResolverRequestOptions { /** An eager rule fill: its own short deadline, and a miss never terminates, rejects others or trips the breaker. */ readonly soft?: boolean; /** A soft request's answer that arrives after its deadline is still delivered here (the worker computed it anyway). */ readonly onLate?: (value: ResolverValue) => void; } export declare class ResolverTimeoutError extends Error { readonly code = "ETIMEDOUT"; constructor(detail: string); } export declare class ResolverUnavailableError extends Error { readonly code = "EUNAVAILABLE"; constructor(detail: string); } export declare class ResolverFailure extends Error { readonly code: string; constructor(code: string); } /** * Where the worker lives in each shipped layout: the compiled binary embeds it under its source path * (an explicit `bun build --compile` entry), the npm bundle emits it beside the host's chunk, and the * source tree runs the `.ts` file directly. */ export declare function workerEntryFor(moduleUrl: string): string | URL; export declare function workerTransport(entry: string | URL): ResolverTransport; //# sourceMappingURL=path-identity-transport.d.ts.map