import { fail } from 'peaks-loop-shared/result'; import type { WebOp } from '../../services/web/web-protocol.js'; /** * What a caller can do after a refused `--profile` — the same sentence `login` * gives, because it is the same mistake and the same verb fixes it. */ export declare const PROFILE_NEXT_ACTIONS: string[]; /** * The resolver's own message begins with the code, and `fail()` puts the code in * front of the message again — strip it, so human output does not read * `WEB_PROFILE_NAME_INVALID: WEB_PROFILE_NAME_INVALID: …` (the `login` verb does * the same). */ export declare function profileRefusal(error: unknown): string; /** Every daemon warning, capped and wrapped. Empty entries are dropped. */ export declare function wrapDiagnostics(values: readonly string[]): string[]; /** * Our own static sentence, then the daemon's own words as a wrapped, capped * block. The daemon's `nextActions` are folded into that block rather than * forwarded: `printResult` prints `nextActions` to STDOUT as `next: …`, the * channel the notice calls instruction, and the daemon's text is not ours to * promote there. */ export declare function failureMessage(op: WebOp, message: unknown, nextActions: readonly string[]): string; /** * A daemon-supplied `code` is printed on the envelope's first line, so only a * protocol-shaped identifier is accepted; anything else falls back to ours. */ export declare function safeDaemonCode(value: unknown): string; /** The unusable-daemon envelope: a named code, or the generic op failure. */ export declare function daemonFailureEnvelope(input: { readonly op: WebOp; readonly command: string; readonly code: string; readonly message: unknown; readonly nextActions: readonly string[]; }): ReturnType;