UNPKG

@adonis-agora/agent

Version:

Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.

51 lines • 2.22 kB
/** Base error for everything this client raises on a protocol-level failure. */ export declare class PoppyError extends Error { readonly code: string; readonly status?: number | undefined; readonly description?: string | undefined; readonly details?: Record<string, unknown> | undefined; constructor(code: string, message?: string | undefined, opts?: { status?: number | undefined; description?: string | undefined; details?: Record<string, unknown> | undefined; }); } /** Discovery failed or a document didn't pass the checks of section 3. */ export declare class DiscoveryError extends PoppyError { constructor(code: string, message: string); } /** OAuth error response from the token, device, or revocation endpoint (4.7). */ export declare class OAuthError extends PoppyError { readonly retryAfter?: number | undefined; constructor(code: string, opts?: { status?: number | undefined; description?: string | undefined; retryAfter?: number | undefined; details?: Record<string, unknown> | undefined; }); } /** * A resource (API, conversation, MCP server) refused the access token, or wants one, through * `WWW-Authenticate` (section 7): `invalid_token`, `insufficient_scope`, DPoP errors. A challenge * without an error code is reported as `insufficient_scope`, as the spec says to handle it. */ export declare class ResourceAuthError extends PoppyError { /** Scopes the Company says are needed, for `insufficient_scope`. */ readonly scope?: string | undefined; constructor(code: string, opts?: { status?: number | undefined; description?: string | undefined; scope?: string | undefined; }); } /** A request refused with a JSON `error` body (5.3, 8.13), such as `invalid_session`. */ export declare class ConversationError extends PoppyError { /** For `direct_conversation_open`: the open Direct Conversation. */ readonly conversationId?: string | undefined; constructor(code: string, opts?: { status?: number | undefined; description?: string | undefined; conversationId?: string | undefined; }); } //# sourceMappingURL=errors.d.ts.map