/**
 * MVI (Minimum-Viable-Information) progressive-disclosure primitive.
 *
 * CLEO historically grew three *separate* "expansion-hint" conventions, each
 * answering the same question — *"the agent got a lean result; how does it
 * drill deeper?"* — in a different wire shape:
 *
 * 1. **`_next`** (`core/src/mvi-helpers.ts`) — `Record<string, string>`: a map
 *    of follow-up *name* → copy-pasteable CLI command
 *    (`{ full: "cleo show T1", children: "cleo find --parent T1" }`).
 * 2. **`meta.suggestedNext`** (`core/src/dispatch/suggested-next.ts`, T9920) — a
 *    flat `ReadonlyArray<string>` of copy-pasteable CLI commands.
 * 3. **`_nexus.suggestedNext`** (`contracts/operations/nexus-scope.ts`) — a
 *    `ReadonlyArray<SuggestedNextOp>` of machine-readable, structured operations.
 *
 * {@link MviDigest} is the single primitive that unifies them. A digest
 * describes a *collapsed* collection: a one-line `summary`, the total `count`,
 * an optional bounded `preview` sample, and exactly one {@link ExpansionHint}
 * describing how to fetch the rest. The hint is a discriminated union whose
 * variants are the three legacy conventions — so existing producers can emit a
 * digest and existing consumers can read one *without any `any` casts*.
 *
 * @packageDocumentation
 * @module @cleocode/contracts/mvi
 *
 * @epic T11285 EP-MVI-PRIMITIVE
 * @task T11349
 * @saga T11283 SG-COGNITIVE-SUBSTRATE
 */
/**
 * Adapt a legacy `_next` directives map into the unified {@link ExpansionHint}.
 *
 * Lets existing `core/src/mvi-helpers.ts` producers feed a digest without
 * re-shaping their output by hand.
 *
 * @param directives - The `_next`-style name → CLI command map.
 * @returns A {@link NextDirectivesHint} wrapping the directives verbatim.
 *
 * @public
 */
export function expansionFromNextDirectives(directives) {
    return { kind: 'next-directives', directives };
}
/**
 * Adapt a legacy `meta.suggestedNext` command list into an {@link ExpansionHint}.
 *
 * @param commands - The flat `ReadonlyArray<string>` of CLI commands.
 * @returns A {@link SuggestedCommandsHint} wrapping the commands verbatim.
 *
 * @public
 */
export function expansionFromSuggestedCommands(commands) {
    return { kind: 'suggested-commands', commands };
}
/**
 * Adapt a legacy `_nexus.suggestedNext` op list into an {@link ExpansionHint}.
 *
 * @param ops - The structured `ReadonlyArray<SuggestedNextOp>`.
 * @returns A {@link StructuredOpsHint} wrapping the ops verbatim.
 *
 * @public
 */
export function expansionFromStructuredOps(ops) {
    return { kind: 'structured-ops', ops };
}
/**
 * Type guard: narrow an {@link ExpansionHint} to its `_next`-directives variant.
 *
 * @param hint - The hint to test.
 * @returns `true` when `hint.kind === 'next-directives'`.
 *
 * @public
 */
export function isNextDirectivesHint(hint) {
    return hint.kind === 'next-directives';
}
/**
 * Type guard: narrow an {@link ExpansionHint} to its suggested-commands variant.
 *
 * @param hint - The hint to test.
 * @returns `true` when `hint.kind === 'suggested-commands'`.
 *
 * @public
 */
export function isSuggestedCommandsHint(hint) {
    return hint.kind === 'suggested-commands';
}
/**
 * Type guard: narrow an {@link ExpansionHint} to its structured-ops variant.
 *
 * @param hint - The hint to test.
 * @returns `true` when `hint.kind === 'structured-ops'`.
 *
 * @public
 */
export function isStructuredOpsHint(hint) {
    return hint.kind === 'structured-ops';
}
//# sourceMappingURL=mvi.js.map