/** * setup-chain.ts, VOICE as an instance of the platform's setup contract. * * The rules this follows are not voice's: they live in * runtime/setup-contract.ts, which states them for any service, DO the literal * ask and everything the environment already answers, PROPOSE each inferred * extension as one short approval question, ASK only at genuine forks, pick a * solution shape rather than reasoning case by case, and never hand the user a * command to type. * * What is voice-specific is only the domain knowledge: that a wake word with no * speech-to-text hears its name and can do nothing with the sentence after it * (so STT is the inferred extension), that an empty input device means the * operating system default (so it is stated, never asked), and that local * versus a hosted voice account is a real trade the user owns (so it is the * fork). Another service fills in its own equivalents against the same shape. */ import type { WakeSurface } from './wake/settings.js'; import { type SetupOption, type SetupPlan, type SetupStep } from '../runtime/setup-contract.js'; /** What the user asked for, as far as the entry point could tell. */ export type VoiceSetupIntent = 'wake' | 'stt' | 'tts' | 'voice'; /** One step in a resolved setup chain, the platform's general step shape. */ export type VoiceSetupStep = SetupStep; /** One side of a genuine fork. */ export type VoiceSetupOption = SetupOption; /** Everything known about the host when the request arrived. */ export interface VoiceSetupContext { /** The surface the request came from, the one that must end up listening. */ readonly surface: WakeSurface; /** `voice.wake.enabled`. */ readonly wakeEnabled: boolean; /** `voice.wake.surfaces.`. */ readonly surfaceEnabled: boolean; /** Wake models present and verified on disk. */ readonly wakeProvisioned: boolean; /** Managed speech-to-text present and pointed at by config. */ readonly sttReady: boolean; /** Managed text-to-speech present and pointed at by config. */ readonly ttsReady: boolean; /** `voice.wake.inputDevice`; empty means the operating system default source. */ readonly inputDevice: string; /** * A cloud voice credential this host already holds (ElevenLabs, OpenAI...). * Present means the local-vs-hosted fork is real; absent means local is the * only path that needs no new secret, so it is chosen rather than asked. */ readonly cloudVoiceProviders?: readonly string[] | undefined; } /** A resolved chain: what was done, what is proposed, what must be asked. */ export type VoiceSetupChain = SetupPlan; /** The steps of one kind, in order. */ export declare function voiceSetupStepsOfKind(chain: VoiceSetupChain, kind: VoiceSetupStep['kind']): readonly VoiceSetupStep[]; /** * Resolve a setup request into the chain the platform owes. * * Pure: it decides what to do, propose and ask. Performing the `done` steps is * the caller's job, because only the caller holds the installer and the config * writer. */ export declare function planVoiceSetupChain(intent: VoiceSetupIntent, context: VoiceSetupContext): VoiceSetupChain; /** * Does this text tell the user to type a command? * * The shapes that matter: a slash command presented as the user's next action, * and the imperative verbs that introduce one. Used by the test that keeps * setup replies free of them, the platform does the thing, then says what it * did. */ export declare function voiceSetupStepMentionsUserCommand(text: string): boolean; /** Every user-facing string in a chain, for assertions and rendering. */ export declare function voiceSetupChainStrings(chain: VoiceSetupChain): readonly string[]; /** Render the chain as the reply a surface prints. */ export declare function renderVoiceSetupChain(chain: VoiceSetupChain): string; //# sourceMappingURL=setup-chain.d.ts.map