UNPKG

@code-yeongyu/senpi

Version:

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

26 lines • 1.59 kB
import { type MovedPath } from "./breadcrumb-trust.ts"; import { type PathPlatform } from "./path-match.ts"; /** Each filesystem step of a probe; strictly below the guard's whole-call deadline, so one slow step cannot use it all. */ export declare const STEP_DEADLINE_MS = 500; export interface MovedPathProbe { resolve(path: string): Promise<MovedPath | undefined>; /** Whether any filesystem step of this probe hit `STEP_DEADLINE_MS`. */ readonly timedOut: boolean; /** Whether `path` lies under a listed prefix this probe found re-used (its own `.git`): never moved. */ cleared(path: string): boolean; /** After this, every remaining step answers `failedReply` without filesystem work (the call's deadline passed). */ stop(): void; readonly stopped: boolean; } /** * Whether `path` exists: `false` only for a real absence (ENOENT, ENOTDIR), `undefined` when `access` fails any * other way (EACCES, EIO, ...), so an unreadable `.git` keeps this process's last re-used answer (fifth review nit). */ export declare function pathExists(path: string): Promise<boolean | undefined>; /** * Resolution for one tool call (senpi#2898): the same walk as `findMovedPath`, with asynchronous, deadline-bounded * I/O (`canonicalizeFilesystemPath`), so a wedged mount never blocks the session loop. A step whose I/O fails or * times out gets `failedReply`; resolution never throws into the tool call, and the probe records a timeout. */ export declare function createMovedPathProbe(platform?: PathPlatform): MovedPathProbe; //# sourceMappingURL=resolve-async.d.ts.map