UNPKG

@code-yeongyu/senpi

Version:

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

27 lines • 1.61 kB
import { type ExtensionUiResponseReply, settleExtensionUiResponse } from "./extension-ui-response.ts"; import type { RpcExtensionUIResponse } from "./rpc-types.ts"; import type { SecretInputRequests } from "./secret-input-requests.ts"; import type { UiAnswerLedger } from "./ui-answer-ledger.ts"; type SettleTargets = Parameters<typeof settleExtensionUiResponse>[1]; export type AnswerTargets = { readonly secretInputs: Pick<SecretInputRequests, "has" | "respond">; readonly grantRequests: ReadonlyMap<string, string | undefined>; /** A worker's security bridge answers grant selections itself; this connection never checks them. */ readonly workerSecurityBridge: boolean; /** The connection that sent the answer; undefined on a single-session stdio connection. */ readonly sender: string | undefined; readonly grantCapable: () => boolean; readonly questions: SettleTargets["questions"]; readonly dialogs: SettleTargets["dialogs"]; readonly routed: boolean; readonly ledger: UiAnswerLedger; readonly beforeAnswer: () => void; }; /** * The `answer`-class entry point: settles one `extension_ui_response` and returns its reply, or undefined when * a single-session stdio connection ignores an unnamed response that matches none of its requests. The first * answer to settle a request wins; a later one is refused (see `SessionExtensionUiRequests.resolve`). */ export declare function answerExtensionUiResponse(response: RpcExtensionUIResponse, targets: AnswerTargets): ExtensionUiResponseReply | undefined; export {}; //# sourceMappingURL=handlers-answer.d.ts.map