/** * HTTP client for SPM Cloud Functions. * * Calls the same endpoints the Chrome extension uses, authenticated via * API key (X-SPM-API-Key header) or Bearer token. */ declare const ENDPOINTS: { readonly extensionAgentV3: "/extensionAgentV3"; readonly extensionClarificationAgentV3: "/extensionClarificationAgentV3"; readonly extensionGapEvaluatorV3: "/extensionGapEvaluatorV3"; readonly extensionImproviseAgentV3: "/extensionImproviseAgentV3"; readonly extensionReviewAgainAgentV3: "/extensionReviewAgainAgentV3"; readonly classifyIntent: "/classifyIntent"; }; type EndpointName = keyof typeof ENDPOINTS; export declare function setChannel(ch: string): void; /** * Call an SPM Cloud Function endpoint. * Handles SSE stream parsing automatically. */ export declare function callEndpoint(endpoint: EndpointName, body: Record, apiKey?: string): Promise; export declare class SpmApiError extends Error { readonly code: 'AUTH_REQUIRED' | 'RATE_LIMITED' | 'UPSTREAM_ERROR' | 'INVALID_INPUT' | 'SESSION_NOT_FOUND' | 'INVALID_PHASE'; constructor(message: string, code: 'AUTH_REQUIRED' | 'RATE_LIMITED' | 'UPSTREAM_ERROR' | 'INVALID_INPUT' | 'SESSION_NOT_FOUND' | 'INVALID_PHASE'); } export declare function callExpertAgent(body: Record, apiKey?: string): Promise; export declare function callClarificationAgent(body: Record, apiKey?: string): Promise; export declare function callGapEvaluator(body: Record, apiKey?: string): Promise; export declare function callImproviser(body: Record, apiKey?: string): Promise; export declare function callClassifyIntent(text: string, apiKey?: string): Promise; export {};