/** Base class for server errors. Each carries the HTTP status the server answers with. */ export declare class ServerError extends Error { /** Stable code, such as `THREAD_BUSY`, sent in the error body. */ readonly code: string; /** HTTP status the server answers with. */ readonly status: number; constructor(message: string, /** Stable code, such as `THREAD_BUSY`, sent in the error body. */ code: string, /** HTTP status the server answers with. */ status: number); } /** Raised when a request names something that does not exist, or belongs to another tenant. */ export declare class NotFoundError extends ServerError { constructor(what: string, id: string); } /** Raised when a request is malformed: bad JSON, a missing field, or an unknown assistant. */ export declare class BadRequestError extends ServerError { constructor(message: string, code?: string); } /** Raised when a request carries no usable credentials. */ export declare class UnauthorizedError extends ServerError { constructor(message?: string); } /** Raised when a principal is known but not allowed to do this. */ export declare class ForbiddenError extends ServerError { /** The scope the route required. */ readonly scope: string; constructor( /** The scope the route required. */ scope: string); } /** Raised when a thread is already running something and the busy policy is `reject`. */ export declare class ThreadBusyError extends ServerError { /** The thread. */ readonly threadId: string; /** The run already in flight. */ readonly runId: string; constructor( /** The thread. */ threadId: string, /** The run already in flight. */ runId: string); } /** Raised when an assistant cannot do what a request needs, such as resuming or rolling back. */ export declare class AssistantCapabilityError extends ServerError { /** The assistant. */ readonly assistant: string; /** What it cannot do. */ readonly capability: string; constructor( /** The assistant. */ assistant: string, /** What it cannot do. */ capability: string); }