UNPKG

@adonis-agora/agent

Version:

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

37 lines • 1.59 kB
import type { CompanyClient } from './company.js'; import type { PoppyApiEntry } from './types.js'; /** API types this client understands (section 7). 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 as a public document first; through the Session 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 (section 7), through the Session and, when signed in, * with an access token. Refuses absolute URLs outside the API's own origin, so nothing goes 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