/** * Parallel AI Provider Adapter. * * Implements Search, Research, and Diagnostics capabilities for Parallel AI. * * Field mapping (Parallel API → Provider-neutral): * results[].title -> title * results[].url -> url * results[].excerpts[] -> summary (joined with double newlines) * results[].publish_date -> date * * Reader (Extract API): * results[].full_content -> content (primary; excerpts are a degraded fallback) * results[].title -> title * results[].url -> finalUrl * Request: advanced_settings.full_content = true (8P.2) * retainImages:false -> strip ![alt](url) tokens locally (no server-side toggle; #52) * * Research (Task / Deep Research API — 8P.1): * POST /v1/tasks/runs → create async task run (pro/ultra processor) * GET /v1/tasks/runs/{id}/result → long-poll until terminal * output.content -> report (markdown report string) * output.basis[].citations -> sources (flattened + deduplicated by URL) * run.processor -> model (echoed) * * Control mapping (SearchControls → Parallel-native API params): * topic -> appended to query string (Parallel has no native topic field) * type -> REJECTED (UnsupportedOptionError) * domain -> advanced_settings.source_policy.include_domains (8P.3) * recency -> advanced_settings.source_policy.after_date (RFC 3339) (8P.3) * location -> advanced_settings.location (8P.3; only "us" accepted) * contentSize -> advanced_settings.excerpt_settings.max_chars_per_result (8P.3) * * Control mapping (ResearchRequest → Parallel Task API params): * model -> processor (mini→pro-fast, pro→ultra, auto→pro) * domain -> source_policy.include_domains * outputLength -> task_spec.output_schema.description (length steering) * citationFormat -> task_spec.output_schema.description (format steering) */ import type { ProviderAdapter, ProviderContext, ProviderDescriptor, ProviderId } from "../types.js"; import type { SearchCapability } from "../../capabilities/search.js"; import type { ResearchCapability } from "../../capabilities/research.js"; import type { ReaderCapability } from "../../capabilities/reader.js"; import type { DiagnosticsCapability } from "../../capabilities/diagnostics.js"; import type { AsyncJobStateFile } from "../../lib/async-job-state.js"; import { type ParallelTransportDeps } from "./client.js"; export interface ParallelAdapterDependencies { readonly transport?: ParallelTransportDeps; /** * Optional Research state-file port (8P.1). Production defaults to the * on-disk implementation under `~/.scoutline/research/`; tests inject * in-memory doubles to exercise the lifecycle deterministically. */ readonly researchStateFile?: AsyncJobStateFile; /** * Disk dir for the research create-lock (Cubic P1); defaults to * `asyncJobStateDir("research")`. When undefined (in-memory test * mode), the lock is a no-op. */ readonly researchStateDir?: string; } export declare class ParallelAdapter implements ProviderAdapter { private readonly context; readonly id: ProviderId; readonly search: SearchCapability; readonly research: ResearchCapability; readonly reader: ReaderCapability; readonly diagnostics: DiagnosticsCapability; constructor(context: ProviderContext, deps?: ParallelAdapterDependencies); } export declare function createParallelDescriptor(dependencies?: ParallelAdapterDependencies): ProviderDescriptor; //# sourceMappingURL=adapter.d.ts.map