@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
31 lines • 1.63 kB
TypeScript
import { type ExecutableResolution } from "./executable.ts";
export type ClaudeLaneDiagnostics = ExecutableResolution & {
/** The JavaScript runtime spawning the binary; Bun and Node spell and stat Windows paths differently (#1541). */
runtime: "bun" | "node";
};
/**
* What a doctor surface reports for the Claude lane: the executable the query path would hand the
* SDK (validated by the same resolver, so the report cannot disagree with a turn), every candidate
* tried when there is none, and the host runtime.
*/
export declare function describeClaudeLane(): ClaudeLaneDiagnostics;
/**
* Memoises the probe, which spawns the Claude binary and costs a few hundred
* milliseconds. Auth resolution runs per request, so an uncached probe would
* put that on every model call. Concurrent readers share one in-flight probe;
* a rejected probe is not cached.
*/
export declare function createAmbientAuthStatusReader(probe: () => Promise<boolean>, now?: () => number, ttlMs?: number): (signal?: AbortSignal) => Promise<boolean>;
type ProbeChildProcess = {
readonly pid: number | undefined;
once(event: "error" | "close", listener: (code: number | null) => void): unknown;
kill(signal: "SIGKILL"): unknown;
};
export type AmbientProbeOptions = {
timeoutMs?: number;
spawnProbe?: (command: string, args: readonly string[]) => ProbeChildProcess;
};
export declare function probeAmbientClaudeAuthStatus(options?: AmbientProbeOptions): Promise<boolean>;
export declare const readAmbientClaudeAuthStatus: (signal?: AbortSignal) => Promise<boolean>;
export {};
//# sourceMappingURL=availability.d.ts.map