UNPKG

@code-yeongyu/senpi

Version:

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

25 lines • 1.17 kB
import type { DecisionOptions } from "./decide-target.ts"; import type { PermissionEventEmitter } from "./events.ts"; import { type ReplyInput, type Request, type Rule } from "./types.ts"; export interface PendingRequestsDeps { readonly emitter: PermissionEventEmitter; /** Remembers an "Always" answer as an approved rule. */ approve(rule: Rule): void; decide(permission: string, pattern: string, options: DecisionOptions): Rule["action"]; } /** The requests waiting on a user reply, with the options each was decided with. */ export declare class PendingRequests { private pending; /** How each pending request was decided, so a re-check after an "Always" reply decides it the same way. */ private pendingOptions; private readonly deps; constructor(deps: PendingRequestsDeps); register(info: Request, options: DecisionOptions): Promise<void>; /** Reply to a pending permission request */ reply(input: ReplyInput): void; /** List all pending permission requests */ list(): Request[]; private rejectPendingInSession; private resolveCoveredPendingInSession; } //# sourceMappingURL=pending-requests.d.ts.map