export declare function expandTilde(p: string): string; /** Shortens a path under the home directory to `~/…` for display. */ export declare function displayPath(p: string, home?: string): string; export declare function ensureDir(dir: string): void; export declare function exists(p: string): boolean; export declare function isDirectory(p: string): boolean; export declare function readJsonFile(file: string): T; export declare function readJsonFileOr(file: string, fallback: T): T; /** Atomic JSON write (write to a sibling temp file, then rename). */ export declare function writeJsonFile(file: string, value: unknown): void; export declare function isPlainObject(value: unknown): value is Record; export declare function truncate(text: string, max: number, note?: string): string; export declare function tail(text: string, maxChars: number): string; /** Removes every trailing occurrence of `char` in linear time (a regex such as `/x*$/` backtracks quadratically on long runs). */ export declare function trimTrailing(text: string, char: string): string; export declare function sleep(ms: number): Promise; export declare function nowIso(): string; /** Dotted-path lookup (`a.b.0.c`) into plain data. Returns undefined when any segment is missing. */ export declare function getPath(value: unknown, dotted: string): unknown; export declare function errorMessage(error: unknown): string; /** * Text from machines, senders and the cloud as a terminal should show it: without control characters (C0 but newlines * and tabs, DEL, C1), which could drive the terminal, and bidirectional overrides and isolates, which reorder what it shows. */ export declare function printable(value: string): string; /** JSON as the CLI prints it: the characters printable() drops but JSON.stringify keeps (DEL, C1, bidi) escaped, the value unchanged. */ export declare function jsonForTerminal(value: unknown): string; /** Stringifies for humans: strings as-is, everything else as JSON. */ export declare function display(value: unknown): string; export declare function slugify(text: string): string; export declare const SKILL_NAME_RE: RegExp; export declare function isValidSkillName(name: string): boolean;