/** * @blankstate/mcp - IBF API Client * * Handles communication with the Blankstate IBF API. * * Uses the unified /api/v1/sense endpoint. * Metrics are calculated client-side by aggregating protocol results. */ import type { IBFSenseRequest, IBFSenseResponse, IBFStatusResponse, SenseTarget } from '../types/index.js'; /** * Parse a protocol config ID (e.g. "proto-xxx:0.2") into SenseTarget */ export declare function parseProtocolId(protocolIdWithVersion: string): SenseTarget; /** * Client for the Blankstate IBF API v1 */ export declare class IBFClient { private readonly apiToken; private readonly apiUrl; constructor(apiToken: string, apiUrl?: string); /** * Sense an interaction against a single Protocol * * POST /api/v1/sense */ sense(request: IBFSenseRequest): Promise; /** * Sense a single protocol by its config ID (e.g. "proto-xxx:0.2") * * Convenience method that parses the protocol ID and calls /api/v1/sense */ senseSingle(protocolIdWithVersion: string, content: string, languageOrOpts?: string | { language?: string; profile?: string; sessionContext?: string[]; }, sessionContext?: string[]): Promise; /** * Sense content against multiple Protocols in parallel */ senseMultiple(content: string, protocolIds: string[], language?: string, sessionContext?: string[]): Promise>; /** * Get API status and capabilities * * GET /api/v1/status */ status(): Promise; /** * Health check for the API * * GET /api/health */ healthCheck(): Promise; } /** * Custom error class for IBF API errors */ export declare class IBFAPIError extends Error { readonly statusCode: number; readonly responseBody: string; readonly detail: Record | null; constructor(message: string, statusCode: number, responseBody: string); private static tryParseDetail; get code(): string | undefined; get errorMessage(): string; get icsInfo(): { quota?: number; used?: number; remaining?: number; } | undefined; /** Check if error is an authentication error */ isAuthError(): boolean; /** Check if error is an ICS quota exceeded error */ isQuotaError(): boolean; /** Check if error is a rate limit error */ isRateLimitError(): boolean; /** Check if error is a server error (retryable) */ isServerError(): boolean; } //# sourceMappingURL=ibfClient.d.ts.map