/** * Base class for all SDK-specific errors. * This allows consumers to catch all Jules SDK errors with a single `catch` block. */ export declare class JulesError extends Error { /** The original error that caused this error, if any. */ readonly cause?: Error; constructor(message: string, options?: { cause?: Error; }); } /** * Thrown for fundamental network issues like fetch failures or timeouts. */ export declare class JulesNetworkError extends JulesError { readonly url: string; constructor(url: string, options?: { cause?: Error; }); } /** * A generic wrapper for non-2xx API responses that don't match other specific errors. */ export declare class JulesApiError extends JulesError { readonly url: string; readonly status: number; readonly statusText: string; constructor(url: string, status: number, statusText: string, message?: string, // optional override options?: { cause?: Error; }); } /** * Thrown for 401 Unauthorized or 403 Forbidden API responses. */ export declare class JulesAuthenticationError extends JulesApiError { constructor(url: string, status: number, statusText: string); } /** * Thrown for 429 Too Many Requests API responses. */ export declare class JulesRateLimitError extends JulesApiError { constructor(url: string, status: number, statusText: string); } /** * Thrown when an API key is required but not provided. */ export declare class MissingApiKeyError extends JulesError { constructor(); } /** * Thrown when a requested source cannot be found. */ export declare class SourceNotFoundError extends JulesError { constructor(sourceIdentifier: string); } /** * Thrown when a jules.run() operation terminates in a FAILED state. */ export declare class AutomatedSessionFailedError extends JulesError { constructor(reason?: string); } /** * Thrown when attempting to start a sync while another sync is already in progress. * This prevents data corruption and thundering herd issues. */ export declare class SyncInProgressError extends JulesError { constructor(); } /** * Thrown when an operation is attempted on a session that is not in a * valid state for that operation. */ export declare class InvalidStateError extends JulesError { constructor(message: string); }