import { AICompletePayload, AICompleteResult, AIRuntimeCapabilities, PiaSearchAnswerPayload, PiaSearchAnswerResult } from '../../payload.types'; /** * Capabilities of the AI completion runtime on the current platform. * * On iOS this asks the native on-device bridge (`ai.get_capabilities`); on web * it resolves statically to the online (Bedrock) runtime — no postMessage * round-trip. * * @returns {Promise} - Promise resolving with the runtime capabilities. * * @example * const capabilities = await api.aiGetCapabilities() * if (capabilities.available) { ... } */ export declare function aiGetCapabilities(): Promise; /** * Run an AI completion on the on-device model (iOS only). On web the host * rejects with a clear error — use `piaSearchAnswer` (or the next-core AI * routes) for online inference instead. * * The payload is the EXACT iOS wire contract: `{ prompt, max_tokens?, stream? }` * → `{ text, tokens_generated, elapsed_seconds, time_to_first_token_seconds }`. * * @param {AICompletePayload} payload - The completion payload. * @returns {Promise} - Promise resolving with the completion. * * @example * const completion = await api.aiComplete({ prompt: 'Summarize ...', max_tokens: 256 }) * console.log(completion.text) */ export declare function aiComplete(payload: AICompletePayload): Promise; /** * Answer a rep's natural-language question over the instance's content — the * ONE high-level PIA Search call (PIT-6863). Routing follows the * `pia_search_config` flag mode (see `resolvePiaSearchMode`): * * - `on_device` on iOS with an available local model → `aiComplete` over the * caller-assembled `context_text` (the Hub has the file metadata * client-side). Unavailable/downloading models fall through to online. * - `online` (or any on-device fallback) → POST to the next-core * `pia-prepare/pia-search` Bedrock route, which assembles its own candidate * context server-side. * - `off` → rejects. * * @param {PiaSearchAnswerPayload} payload - The question + optional context/narrowing. * @returns {Promise} - Unified answer with the serving `source`. * * @example * const result = await api.piaSearchAnswer({ query: 'What is our pricing for oncology?' }) * console.log(result.answer, result.cited_file_ids, result.source) */ export declare function piaSearchAnswer(payload: PiaSearchAnswerPayload): Promise;