import type { EnrichmentClient, EnrichmentRequest, EnrichmentResult, EnrichmentType, Logger } from "@onenomad/przm-cortex-core"; /** * In-memory queue of pending enrichment requests. The server creates * one queue per workspace at boot. Pipelines push requests; an MCP * client (Pyre, Claude Desktop) pulls them via the * `pending_enrichment_requests` tool and posts results back via * `submit_enrichment_result`. * * Queue is intentionally process-local — no Redis, no SQLite. Cortex * 0.2 ships a single-node enrichment plane; cross-node coordination * is a v0.3 concern. Outstanding requests at shutdown are dropped * (and their pipeline calls fall back to raw storage). */ export interface QueuedEnrichmentRequest { /** Server-generated identifier handed back via `submit_enrichment_result`. */ id: string; /** When the request was queued. */ enqueuedAt: string; request: EnrichmentRequest; } export interface EnrichmentQueueOptions { /** Per-request timeout. Default 30s. */ timeoutMs?: number; /** Max pending requests at any moment. Default 200. */ maxPending?: number; logger: Logger; } /** * Queue-backed implementation of `EnrichmentClient` for the case * where Cortex has no local LLM and a connected MCP client serves * as the enrichment provider. */ export declare class EnrichmentQueue implements EnrichmentClient { private readonly pending; private readonly timeoutMs; private readonly maxPending; private readonly logger; constructor(opts: EnrichmentQueueOptions); enrich(request: EnrichmentRequest): Promise | null>; /** Drain up to `limit` pending requests for the connected client. */ drain(limit?: number): QueuedEnrichmentRequest[]; /** * Resolve a pending request with a client-supplied result. * Returns true if the request id was outstanding, false if it had * already timed out or been answered. */ submit(id: string, result: EnrichmentResult | { error: { code: string; message: string; }; } | null): boolean; /** Drop every outstanding request — used on shutdown. */ shutdown(): void; size(): number; } /** No-op fallback: no LLM, no client. Pipelines store raw content. */ export declare class NoopEnrichmentClient implements EnrichmentClient { enrich(): Promise; } //# sourceMappingURL=enrichment.d.ts.map