import { Box } from '@earendil-works/pi-tui'; type Theme = { fg: (name: string, text: string) => string; bg: (name: string, text: string) => string; bold: (text: string) => string; }; export declare const CRTR_OUTPUT_CUSTOM_TYPE = "crtr-output"; export declare function stripHeredocBodies(command: string): string; export declare function isCrtrBashCommand(command: unknown): boolean; /** True when a crtr bash invocation's OWN argv carries a bare -h/--help * token — the dispatcher renders the leaf's schema, not a result, so it is * never useful to preview like a normal command's output (see * src/core/help.ts renderLeafArgv: schema text, not agent-facing result * text). Checked against extractCrtrInvocationTokens' tokens (scoped to the * crtr segment only, quote-aware), never the raw command string — a `-h` * appearing before the crtr segment (`echo -h && crtr canvas snapshot`), * after it (`crtr canvas snapshot && echo --help`), or inside a quoted * argument (`crtr node new "write about -h flags"`) must never count. This is * structural (every leaf's -h has the same shape), so it needs no per-leaf * metadata — unlike suppressOutput below, which is command-owned. */ export declare function isCrtrHelpInvocation(command: unknown): boolean; /** Per-render preview state for a crtr bash invocation. Both fields are * synchronous and structural: isHelp from the invocation's own argv (above), * suppressOutput from the bundle-safe static registry (preview-registry.ts — * a hand-maintained mirror of the leaf's own `help.preview.suppressOutput`, * kept in sync by preview-registry-sync.test.ts). Neither needs an async * cross-process command-tree lookup, so there is no cache/resolver/invalidate * machinery here, and no path from the attach bundle into the command tree. * Command-owned computed summaries (memory read, memory lint, ...) are a * separate lookup entirely — render() below calls summarizePath * (preview-registry.ts) directly against the invocation's tokens, so there * is no field for it here. */ export interface CrtrPreviewState { isHelp: boolean; suppressOutput: boolean; } export declare function commandPreviewMeta(command: string): CrtrPreviewState; export declare function renderCrtrOutputText(text: string, theme: Theme, preserveSyntax?: boolean): string; export declare class CrtrOutputMessageComponent extends Box { private readonly content; private readonly theme; private body; private expanded; constructor(content: string, expanded: boolean, theme: Theme); setExpanded(expanded: boolean): void; } export declare function createCrtrBashToolDefinition(args: unknown): unknown | undefined; export {};