@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
60 lines • 2.67 kB
TypeScript
/** 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`. Later versions
* may add codes: one this client doesn't know is handled by its HTTP `status` (8.13).
*/
export declare class ConversationError extends PoppyError {
/** For `direct_conversation_open`: the open Direct Conversation. */
readonly conversationId?: string | undefined;
/** For `version_mismatch`: the protocol version the conversation started in (8.2). */
readonly protocolVersion?: string | undefined;
/** For `extension_required`: the extension the request needs (3.3). */
readonly extension?: string | undefined;
constructor(code: string, opts?: {
status?: number | undefined;
description?: string | undefined;
conversationId?: string | undefined;
protocolVersion?: string | undefined;
extension?: string | undefined;
});
}
//# sourceMappingURL=errors.d.ts.map