/** * Typed registry errors (T12512 ยท T12513). A registry read that fails must * reach the caller as a coded error, never as an empty list or `null` that * looks like "no projects". * * @task T12512 * @task T12513 * @epic T12496 */ import { CleoError } from '../errors.js'; /** * The global project registry could not be read (the store is unreadable, * locked past its timeout, corrupt, or missing a table). Carries the * underlying error as `cause` and its message in `details.actual`. * * @example * ```ts * try { await nexusList(); } * catch (e) { if (e instanceof NexusRegistryReadError) console.error(e.codeName, e.message); } * ``` */ export declare class NexusRegistryReadError extends CleoError { /** Stable machine-readable error code. */ readonly codeName = "E_NEXUS_REGISTRY_READ"; /** * @param operation - What was being read (e.g. `list projects`). * @param cause - The underlying failure. */ constructor(operation: string, cause: unknown); } /** * Wrap a registry read failure in {@link NexusRegistryReadError}, passing * errors that are already typed through unchanged. * * @param operation - What was being read. * @param error - The caught value. * @returns A typed error to throw. */ export declare function toRegistryReadError(operation: string, error: unknown): CleoError; /** * A `--device` filter named no known device (neither a device id, a hostname, * nor `current`). Lists the known devices so the caller can pick one. * * @example * ```ts * throw new NexusDeviceNotFoundError('laptop', [{ deviceId: 'd1', hostname: 'desk' }]); * ``` */ export declare class NexusDeviceNotFoundError extends CleoError { /** Stable machine-readable error code. */ readonly codeName = "E_NEXUS_DEVICE_NOT_FOUND"; /** * @param device - The value that matched nothing. * @param known - Every known device. */ constructor(device: string, known: ReadonlyArray<{ deviceId: string; hostname: string | null; }>); } //# sourceMappingURL=registry-errors.d.ts.map