/** * `/model`'s subagent authorization editor, opened with `ctrl-k`. * * The Host entry `subagent-model-selection-settings` — the profile row this * bundle inserts for * `@deepseek-ai/dsh-tool-subagent/model-selection-settings`, and therefore the * namespace name under the adopted generation's entry-id rule — is the only * durable authorization authority, and the generic `ctx.settings` document is * the only way this module reads or writes it. Nothing here reads * `ctx.subagentModelSelection`, records a Session event, or routes a child: * Harness samples the setting for the next composed top-level Session and its * delegation executor enforces the recorded policy. * * The editor is a staged draft against the revision it opened on. `esc` writes * nothing; only Save performs the one mutation, which sets both fields * together under that revision so a concurrent change is refused rather than * merged. * @module dshline/subagent-model-selection */ import type { Context } from '@deepseek-ai/cordis'; /** What opening the editor needs from the window it opens over. */ export interface SubagentModelSelectionSpec { /** Context carrying the generic settings document and the llm registry. */ readonly ctx: Context; /** Write the acknowledgement into the terminal's scrollback. */ readonly commit: (lines: readonly string[]) => void; /** * Whether the gesture that opened the editor still has authority to mount UI * or write window state. * * The editor is opened from inside the `/model` picker, so its lifetime is the * attachment epoch that began THAT gesture — not the editor's own. Without * this it outlives its parent: withdrawing the model picker removes only that * picker's registration, and the child keeps its overlay, its catalog read, * and its settings write. */ readonly mayAct?: () => boolean; /** Withdraw the editor when the initiating attachment retires. */ readonly signal?: AbortSignal; } /** * Show the subagent authorization editor and stay until the reader closes it. * * Pushed on top of the `/model` picker, so closing it returns to the picker. * @param spec - the context and where the acknowledgement goes. * @returns when the editor is closed. */ export declare function openSubagentModelSelection(spec: SubagentModelSelectionSpec): Promise; //# sourceMappingURL=index.d.ts.map