export declare const TITLE_MAX = 200; export declare const HEADLINE_MAX = 280; export declare const LINK_TITLE_MAX = 200; export declare const LINK_URL_MAX = 2048; export declare const LINKS_MAX = 50; export declare const OPTIONS_MAX = 20; export declare const OPTION_MAX = 200; /** What a link points at, so a dashboard can group it and give it an icon. The cloud protocol repeats the list (`LINK_KINDS`). */ export declare const LINK_KINDS: readonly ["source", "pull_request", "commit", "issue", "message", "document", "deploy", "test", "log", "result", "other"]; export type LinkKind = (typeof LINK_KINDS)[number]; export declare const LINK_KIND_DESCRIPTIONS: Record; export interface ReportLink { url: string; title?: string; kind?: LinkKind; } /** A link as stored: a bare URL (what earlier versions wrote) or a URL with a title and a kind. */ export type ResponseLink = string | ReportLink; export interface Choices { /** What a person can pick from: unique labels. */ options?: string[]; /** The option the agent suggests (one of `options`). */ recommended?: string; /** The person may pick several options; the answer then lists them one per line. */ multiple?: boolean; } export declare function isLinkKind(value: unknown): value is LinkKind; /** One line of text: trimmed, inner line breaks turned into spaces, capped; undefined when nothing is left. */ export declare function cleanLine(value: unknown, max: number): string | undefined; /** A link from any front end, or undefined when it has no usable URL. Unknown kinds are dropped (a dashboard guesses one from the URL). */ export declare function normalizeLink(value: unknown): ResponseLink | undefined; export declare function linkUrl(link: ResponseLink): string; /** The links of a report: usable ones only, the first of each URL, at most `LINKS_MAX`; undefined when none are left. */ export declare function normalizeLinks(value: unknown): ResponseLink[] | undefined; /** * A `--link` argument: `URL` or `[title](URL)`, either one optionally prefixed with a kind and a colon * (`pull_request:https://github.com/acme/api/pull/7`, `source:[Weekly sync](https://notes.granola.ai/d/…)`). * Parsed with string operations, not a regex over the whole argument. */ export declare function parseLinkArg(text: string): ResponseLink | undefined; /** A link on one line of terminal output: `title (kind)`, or the bare URL. */ export declare function formatLink(link: ResponseLink): string; /** Choices on one line: `[A* | B]` with the recommended one starred, `(pick several)` when multiple. */ export declare function formatChoices(choices: Choices): string; /** The choices of a question or of a `needs_human` outcome: unique, non-empty labels; a recommendation only when it is one of them. */ export declare function normalizeChoices(input: { options?: unknown; recommended?: unknown; multiple?: unknown; }): Choices; /** The options a multiple-choice answer picked: the lines of its text that are options, each once, in the order given. */ export declare function pickedOptions(text: string, options: readonly string[]): string[];