export type FeedbackMode = "interactive" | "auto-approve" | "defer"; /** * How a modal dialog blocking the editor is handled. * * interactive - put the dialog to the user in an MCP elicitation form, with * its own buttons as the choices, and press only what they pick. * auto - hand the dialog back in full and let the agent choose and * answer it. The server presses nothing. * defer - suspend: press nothing, elicit nothing, and tell the user a * dialog is blocking the editor and needs answering by hand. * Procedurally interactive with the editor's own window as the * form, which is where a client that cannot be elicited lands. * * Who may press is the whole difference, and it is ENFORCED, not described: * only auto accepts editor(respond_to_dialog) from an agent, and only auto is * told the calls that press the buttons. In the other two the answer is a * person's to give, so a press arriving as a tool call is refused. See * DialogGuard.handsOverPressCalls, which is the one place that rule lives. * * Same three-value shape as FeedbackMode, read the same way, defaulted in one * place (resolveDialogMode in editor-control.ts). */ export type DialogMode = "interactive" | "auto" | "defer"; export declare function getInstalledHooks(projectRoot: string): string[]; export declare function setInstalledHooks(projectRoot: string, hooks: string[]): void; /** * The feedback approval mode, for one project or for this user. * * A project's own preference wins over the user-wide one when it has been set * (#817): with more than one editor registered, one of them can be a long * unattended run while the user sits in front of another, and a single * per-device answer cannot describe both. Nothing here reads project yaml - * this is a per-user preference either way, and where a collaborator would see * it is exactly where it does not belong. */ export declare function getFeedbackMode(projectRoot?: string | null): FeedbackMode | undefined; /** Set or clear the feedback mode preference. Pass undefined to clear. */ export declare function setFeedbackMode(mode: FeedbackMode | undefined, projectRoot?: string | null): void; /** * The dialog handling mode, for one project or for this user. * * Read exactly like the feedback mode above, and stored in the same file under * `dialog.mode`: a project's own preference wins over the user-wide one when it * has been set, and nothing here reads project yaml, because whether somebody * is at the keyboard to answer a modal is a property of the machine and the * session rather than of the project. * * Returns undefined when nothing is stored. The default is NOT decided here: * it depends on whether the connected client advertised elicitation, which this * module cannot see. resolveDialogMode in editor-control.ts owns it. */ export declare function getDialogMode(projectRoot?: string | null): DialogMode | undefined; /** * The dialog mode each scope holds, without the fallback. * * getDialogMode answers "what applies", which is the right question for the * server and the wrong one for a display: it falls back to the user preference, * so a caller printing its result as the project's own value reports a value * the project never set. This answers "what is set where". */ export declare function getDialogModeScopes(projectRoot?: string | null): { project?: DialogMode; user?: DialogMode; }; /** Set or clear the dialog mode preference. Pass undefined to clear. */ export declare function setDialogMode(mode: DialogMode | undefined, projectRoot?: string | null): void; export declare function getUserStatePath(): string;