UNPKG

@adonis-agora/agent

Version:

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

36 lines • 1.53 kB
import type { CompanyClient } from './company.js'; import type { PoppyApiEntry } from './types.js'; /** API types this client understands (section 6). Others are skipped. */ export declare const KNOWN_API_TYPES: string[]; export declare function listApis(company: CompanyClient): PoppyApiEntry[]; export declare function pickApi(company: CompanyClient, type: 'openapi' | 'mcp', index?: number | undefined): PoppyApiEntry; export interface OpenApiDoc { servers?: { url: string; }[] | undefined; paths?: Record<string, Record<string, { summary?: string | undefined; operationId?: string | undefined; }>>; [k: string]: unknown; } /** Loads an OpenAPI description. Tried without a token first; with DPoP if that's refused. */ export declare function loadOpenApi(company: CompanyClient, api: PoppyApiEntry): Promise<OpenApiDoc>; /** The API's base URL: `servers[0].url` resolved against the description's URL. */ export declare function apiBaseUrl(doc: OpenApiDoc, api: PoppyApiEntry): string; /** * Calls an endpoint of a listed OpenAPI API with a DPoP Session Token (section 6). Refuses * absolute URLs outside the API's own origin, so tokens never go to a third party. */ export declare function callOpenApi(company: CompanyClient, input: { method: string; path: string; body?: unknown | undefined; apiIndex?: number | undefined; scope?: string | undefined; }): Promise<{ status: number; headers: Headers; body: unknown; }>; //# sourceMappingURL=api.d.ts.map