/** * Direct CLI parity with the MCP tool surface — `apiclaw discover|call| * details|balance`. Thin wrappers over the gateway so a CLI user has the * same control plane as the MCP user. */ export interface DirectGatewayRequest { path: string; method: "GET" | "POST"; body?: unknown; } interface GatewayTransportOptions { fetchImpl?: typeof fetch; gatewayUrl?: string; authHeaders?: Record; idempotencyKey?: string; } export declare class GatewayOutcomeUnknownError extends Error { readonly idempotencyKey: string; readonly requestPath: string; readonly requestId?: string | undefined; readonly gatewayCode: string; readonly code = "outcome_unknown"; constructor(idempotencyKey: string, requestPath: string, requestId?: string | undefined, gatewayCode?: string); } export declare class GatewayNonRetryableError extends Error { readonly code: string; readonly idempotencyKey: string; readonly requestPath: string; readonly requestId?: string | undefined; readonly outcomeUnknown = false; constructor(code: string, idempotencyKey: string, requestPath: string, requestId?: string | undefined, message?: string); } /** * Map the public CLI call contract to the correct gateway endpoint. An exact, * traversal-safe `provider/action` target is a managed execution request; * catalog API names retain the legacy `/v1/call` shape. */ export declare function buildCallGatewayRequest(api: string, opts: { path?: string; method?: string; params?: unknown; body?: unknown; }): DirectGatewayRequest; /** Send one gateway request without retrying an ambiguous transport failure. */ export declare function sendGatewayRequest(request: DirectGatewayRequest, auth?: boolean, transport?: GatewayTransportOptions): Promise; export declare function discoverCommand(query: string, opts: { category?: string; callable?: boolean; limit?: number; }): Promise; export declare function callCommand(api: string, opts: { path?: string; method?: string; params?: string; body?: string; async?: boolean; idempotencyKey?: string; }): Promise; export declare function detailsCommand(api: string): Promise; export declare function balanceCommand(): Promise; export {}; //# sourceMappingURL=direct.d.ts.map