import type { Result } from '../../domain/result.js'; import type { CommandCategory, Command, CommandMeta } from './command-types.js'; import type { CommandManifest } from './docs-render.js'; export type DocsError = { type: 'unknown_command'; readonly name: string; readonly available: ReadonlyArray; }; /** * Terse manifest entry — only the fields an LLM needs to *discover* a command * (i.e. "does this CLI do X?"). Drops `options`, `example`, `graphPathTemplate`, * `graphDocsUrl`, `responseShape`, `bodyTemplate`, `paginationStrategy`, * `scopesRequired` — everything the LLM only needs once it's already decided * to invoke. `stability` is kept (it's a discovery-time concern: LLMs prefer * stable siblings when they exist, so they need to see the tag at discovery * time, not after a second full-manifest fetch). Audit Hervé-session §B/§6. */ export type TerseManifestEntry = { readonly name: string; readonly summary: string; readonly category: CommandCategory; readonly stability?: CommandMeta['stability']; }; export type TerseManifest = { readonly package: string; readonly version: string; readonly generatedAt: string; readonly commands: ReadonlyArray; }; export type ManifestFilterError = { readonly type: 'unknown_category'; readonly category: string; readonly available: ReadonlyArray; }; export declare const buildManifest: (registry: Readonly>, packageName: string, version: string, now?: () => Date) => CommandManifest; /** * Terse manifest — `{ name, summary, category }` per command. Roughly 95% * smaller than the full manifest (no options/example/Graph endpoint per entry). * Use `help-json --terse` to surface this to an LLM as the discovery view. */ export declare const buildTerseManifest: (registry: Readonly>, packageName: string, version: string, now?: () => Date) => TerseManifest; /** * Filter a `CommandManifest` (or terse variant) down to a single category. * Returns `err({ type: 'unknown_category', ... })` if the requested category * isn't a known one — the CLI surfaces this through the standard error * envelope rather than silently returning an empty list. */ export declare const filterManifestByCategory: ; }>(manifest: M, category: string) => Result; export declare const renderSingleCommand: (registry: Readonly>, name: string) => Result;