/** * Triage Queue Management * * Handles the intake queue for new knowledge submissions from webhooks * and other sources. Items go through pending -> processing -> accepted/dismissed. * * All operations are scoped by kbId for multi-tenant isolation. */ import type { TriageItem, TriageAction, TriageProcessOptions } from '../types.ts'; /** * Submit a new item to the triage queue. * * @param kbId - Knowledge base identifier * @param source - Source identifier (e.g., "github-webhook", "slack-bot", "manual") * @param summary - Brief summary of the knowledge to triage * @param rawPayload - Original raw payload from the source * @param sourceId - Optional deduplication key from the source system * @returns The created triage item */ export declare function submitTriage(kbId: string, source: string, summary: string, rawPayload?: unknown, sourceId?: string): Promise; /** * Find a triage item by its source-specific ID for deduplication. * * @param kbId - Knowledge base identifier * @param sourceId - The source-specific identifier * @returns The matching triage item, or null if not found */ export declare function findBySourceId(kbId: string, sourceId: string): Promise; /** * Process a triage item with the given action. * * - "accepted": Optionally creates a new knowledge entry from provided data * - "dismissed": Marks the item as dismissed * - "linked": Links the triage item to an existing knowledge entry * * @param id - Triage item ID * @param action - Action to take * @param processedBy - Who processed this item * @param options - Additional options (entry data for accept, linked entry ID) * @returns The updated triage item * @throws Error if the triage item does not exist */ export declare function processTriage(id: string, action: TriageAction, processedBy: string, options?: TriageProcessOptions): Promise; /** * List pending triage items for a specific knowledge base. * * @param kbId - Knowledge base identifier * @param limit - Maximum number of items to return (default 200) * @returns Array of triage items with status "pending" */ export declare function listPending(kbId: string, limit?: number): Promise; /** * Dismiss a triage item. * * Convenience method that calls processTriage with action "dismissed". * * @param id - Triage item ID * @param processedBy - Who dismissed this item */ export declare function dismissTriage(id: string, processedBy: string): Promise; //# sourceMappingURL=triage.d.ts.map