UNPKG

@code-yeongyu/senpi

Version:

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

42 lines • 2.77 kB
import type { MountSnapshot } from "./mount-table.ts"; import type { CanonicalPath, CanonicalRule } from "./path-identity.ts"; import { type BreakerState, type ResolverStateEvent } from "./path-identity-breaker.ts"; import { type ResolverRequestOptions, type ResolverTransport } from "./path-identity-transport.ts"; export { BREAKER_BACKOFF_MAX_MS, BREAKER_BACKOFF_MS, type BreakerState, LEAK_GRACE_MS, MAX_LEAKED_WORKERS, type ResolverStateEvent, } from "./path-identity-breaker.ts"; export { type ResolverRequestOptions, type ResolverTransport } from "./path-identity-transport.ts"; export declare const RULE_FILL_DEADLINE_MS = 250; /** One derivation for the resolver deadline: three quarters of the slot deadline, capped at 1.5 s. */ export declare function resolverDeadlineMs(checkDeadlineMs?: number): number; export interface PathIdentityResolver { canonicalize(executed: string, cwd?: string, options?: ResolverRequestOptions): Promise<CanonicalPath>; canonicalizeRule(pattern: string, cwd?: string, options?: ResolverRequestOptions): Promise<CanonicalRule | undefined>; /** True when an alias may be in play for the path; every error, timeout or budget miss answers true. */ detect(path: string, options?: ResolverRequestOptions): Promise<boolean>; walk(path: string, options?: ResolverRequestOptions): Promise<string>; volumeKey(path: string): string; breakerState(key: string): BreakerState; onState(handler: (event: ResolverStateEvent) => void): () => void; /** How many state subscriptions are live; a retired service must not be among them. */ readonly listenerCount: number; /** Spawn the worker now (it is otherwise started by the first request). */ start(): void; /** Set once a worker failed to START (never from a stall): path rules then match by spelling only. */ readonly unavailable: string | undefined; readonly leaked: number; readonly snapshot: MountSnapshot | undefined; close(): Promise<void>; } export interface ResolverHostOptions { readonly checkDeadlineMs?: number; readonly spawn?: () => ResolverTransport; /** The worker script the default transport starts; tests point it at a missing file. */ readonly workerEntry?: string | URL; readonly onState?: (event: ResolverStateEvent) => void; readonly log?: (line: string) => void; /** Where a startup failure is reported, once; defaults to console.error. */ readonly fatal?: (line: string) => void; } export declare function createPathIdentityResolver(options?: ResolverHostOptions): PathIdentityResolver; /** One worker per process serves every session (design 6.7). */ export declare function sharedPathIdentityResolver(): PathIdentityResolver; //# sourceMappingURL=path-identity-host.d.ts.map