/** * Shared helpers for TS skill handlers. * * These were previously copy-pasted across gen-image / gen-video / * gen-digital-human / gen-voice. Centralizing them keeps argument coercion and * image-input resolution identical across every atomic generator. * * Lives under handlers/ (not src/ root) so the compiled `dist/handlers/shared.js` * travels with the rest of the handler bundle when ab-agent copies `dist/`. */ /** Truthy check tolerant of CLI string values (`--flag` → true, `--flag true` → 'true'). */ export declare function isTrue(value: unknown): boolean; /** * Coerce a flag value into a finite number, or `undefined` when absent/empty. * Throws SkillError on a non-numeric value so callers fail fast with a clear msg. */ export declare function toNumber(value: unknown, name: string): number | undefined; /** Coerce a repeatable flag (string | string[] | undefined) into a string array. */ export declare function toStringArray(value: unknown): string[]; /** * Resolve an image reference into a value the backend accepts: * - http(s) URLs and data: URIs pass through unchanged * - local file paths are read and base64-encoded into a `data:;base64,…` URI * Throws SkillError when a local path does not exist or is not a file. */ export declare function resolveImageInput(pathOrUrl: string): string;