/** * setup-contract.ts, what the platform owes anyone who asks it to set * something up. Any service, not one enumerated list of them. * * THE ASK IS NOT THE GOAL. * * "Set up the wake word" was answered literally: models provisioned, flag set, * and a product that could hear its name and do nothing with the sentence that * followed, because speech-to-text was never configured, which is obviously * why a person wants a wake word. Nobody asked what the request was FOR. The * same shape recurs everywhere: connect an account, add a channel, enable a * device. The literal ask is a step; the goal behind it is the job. * * THREE KINDS OF STEP, AND THE DISTINCTION IS THE DESIGN * * - DO, the literal ask, plus everything the environment already answers. * Performed, then reported as done. Never ask about something already * known: which device is plugged in, which credential is already stored, * whether the files are on disk. Asking a question the environment answers * is friction with a helpful face on it. * - PROPOSE, an extension INFERRED from the goal, offered as ONE short * approval question. The platform noticing on its own initiative is the * zero-friction experience; doing it silently is overreach, and stopping at * the literal ask is the failure this contract exists to end. * - ASK, a GENUINE fork, where both paths are reasonable and the choice is * the user's (a local engine versus their paid account, say). Each option * gets ONE line naming its trade, so the answer is a word. * * THE REPERTOIRE, PICK OR COMPOSE A SHAPE, DO NOT ENUMERATE CASES * * Nobody can list every service and every edge case in advance, and a platform * that tries ships a maze for the one nobody listed. Setups generalise into a * few SHAPES ({@link SETUP_SOLUTION_SHAPES}); the job is to pick or compose the * ones that fit, then execute them: * * 1. a guided walkthrough the PLATFORM executes, step by step; * 2. managed browser automation, where pages the user must personally see, * sign-in, consent, stay theirs and everything else is driven for them; * 3. installing and configuring the service's official CLI; * 4. question-driven setup, up to an outright interview when the desired end * state is itself what needs discovering. * * AND NEVER A COMMAND. No reply tells the user to type anything. Slash commands * exist for self-service; they are never the platform's answer to a stated * want. The platform does the thing and reports what it did. * {@link mentionsUserTypedCommand} is asserted over the strings setup flows * produce. */ /** The shapes a setup can take. Composed, not chosen from a menu of services. */ export type SetupSolutionShape = 'guided-walkthrough' | 'browser-automation' | 'official-cli' | 'question-driven'; /** Each shape, and when it is the right one. */ export declare const SETUP_SOLUTION_SHAPES: Readonly>; /** What one step of a setup is: performed, proposed, or asked. */ export type SetupStepKind = 'do' | 'propose' | 'ask'; /** One side of a genuine fork. */ export interface SetupOption { readonly id: string; readonly label: string; /** The trade, in one line: what it costs and what it buys. */ readonly trade: string; } /** One step in a resolved setup plan. */ export interface SetupStep { readonly kind: SetupStepKind; /** Short subject, for grouping and tests. */ readonly subject: string; /** The line shown to the user. A question for `propose` and `ask`. */ readonly message: string; /** For `ask`: the fork's options, one line of trade each. */ readonly options?: readonly SetupOption[] | undefined; } /** A resolved plan: what was done, what is proposed, what must be asked. */ export interface SetupPlan { /** What the user asked for, as the entry point understood it. */ readonly intent: string; /** The shape(s) this plan is executed as. */ readonly shapes: readonly SetupSolutionShape[]; readonly steps: readonly SetupStep[]; } /** The steps of one kind, in order. */ export declare function setupStepsOfKind(plan: SetupPlan, kind: SetupStepKind): readonly SetupStep[]; /** Every user-facing string in a plan, for assertions and rendering. */ export declare function setupPlanStrings(plan: SetupPlan): readonly string[]; /** * Does this text tell the user to type a command? * * The shapes that matter: a slash command presented as the user's next action, * a bare slash command in reply prose (which reads as an instruction with or * without a verb), and a config key handed over as a chore. Used by the tests * that keep setup replies free of them. */ export declare function mentionsUserTypedCommand(text: string): boolean; /** Render a plan as the reply a surface prints. */ export declare function renderSetupPlan(plan: SetupPlan): string; /** * The setup contract, as instruction text for a conversational turn. * * Deliberately GENERAL: it names no service. A service nobody has thought of * yet gets the same treatment as the ones that prompted it, which is the whole * point, enumerating cases guarantees the unenumerated one ships a maze. * * Kept terse because it is paid on every turn that reaches it. */ export declare const SETUP_INTENT_CONTRACT_PROMPT: string; //# sourceMappingURL=setup-contract.d.ts.map