/** * Caller-owned error messages for full block name validation. */ export interface FullBlockNameDiagnostics { /** * Message returned when the candidate block name is empty. */ empty: () => string; /** * Message returned when the candidate is not `namespace/block-slug`. */ invalidFormat: () => string; } export interface WorkspaceBlockTargetName { blockName: string; blockSlug: string; } export interface WorkspaceBlockTargetDiagnostics { empty: () => string; emptySegment: (input: string) => string; invalidFormat: (input: string) => string; namespaceMismatch: (input: string, actualNamespace: string, expectedNamespace: string) => string; } /** * Validate a full `namespace/block-slug` block name. * * @param blockName Candidate block name. * @param diagnostics CLI flag name or diagnostic builders for caller-owned UX. * @returns The trimmed full block name. * @throws {Error} When the block name is empty or not a full block name. */ export declare function assertFullBlockName(blockName: string, diagnostics: string | FullBlockNameDiagnostics): string; /** * Resolve a workspace block target from either `block-slug` or * `namespace/block-slug` input while preserving caller-owned diagnostics. * * @param blockName Candidate block target. * @param namespace Expected workspace namespace. * @param diagnostics Error message builders for the caller's UX context. * @returns The normalized workspace block target. * @throws {Error} When the target is empty, malformed, or references another namespace. */ export declare function resolveWorkspaceBlockTargetName(blockName: string, namespace: string, diagnostics: WorkspaceBlockTargetDiagnostics): WorkspaceBlockTargetName; /** * Resolve the standard `--to` style workspace block target used by add flows. * * @param blockName Candidate block target. * @param namespace Expected workspace namespace. * @param flagName CLI flag name used in diagnostics. * @returns The normalized workspace block target. * @throws {Error} When the target is empty, malformed, or references another namespace. */ export declare function resolveWorkspaceTargetBlockName(blockName: string, namespace: string, flagName: string): WorkspaceBlockTargetName;