/**
 * Research commands and manifest operations.
 * @task T4465
 * @epic T4454
 */
import type { DataAccessor } from '../store/data-accessor.js';
/** Research entry attached to a task. */
export interface ResearchEntry {
    id: string;
    taskId: string;
    topic: string;
    findings: string[];
    sources: string[];
    status: 'pending' | 'complete' | 'partial';
    createdAt: string;
    updatedAt: string;
}
/** Manifest entry (JSONL line). */
export interface ManifestEntry {
    id: string;
    file: string;
    title: string;
    date: string;
    status: 'completed' | 'partial' | 'blocked';
    agent_type: string;
    topics: string[];
    key_findings: string[];
    actionable: boolean;
    needs_followup: string[];
    linked_tasks: string[];
}
/** Options for adding research. */
export interface AddResearchOptions {
    taskId: string;
    topic: string;
    findings?: string[];
    sources?: string[];
}
/** Options for listing research. */
export interface ListResearchOptions {
    taskId?: string;
    status?: 'pending' | 'complete' | 'partial';
}
/** Manifest query options. */
export interface ManifestQueryOptions {
    status?: string;
    agentType?: string;
    topic?: string;
    taskId?: string;
    limit?: number;
}
/**
 * Add a research entry.
 * @task T4465
 */
export declare function addResearch(options: AddResearchOptions, cwd?: string, accessor?: DataAccessor): Promise<ResearchEntry>;
/**
 * Show a specific research entry.
 * @task T4465
 */
export declare function showResearch(researchId: string, cwd?: string): Promise<ResearchEntry>;
/**
 * List research entries with optional filtering.
 * @task T4465
 */
export declare function listResearch(options?: ListResearchOptions, cwd?: string): Promise<ResearchEntry[]>;
/**
 * List pending research entries.
 * @task T4465
 */
export declare function pendingResearch(cwd?: string): Promise<ResearchEntry[]>;
/**
 * Link a research entry to a task.
 * @task T4465
 */
export declare function linkResearch(researchId: string, taskId: string, cwd?: string, accessor?: DataAccessor): Promise<{
    researchId: string;
    taskId: string;
}>;
/**
 * Update research findings.
 * @task T4465
 */
export declare function updateResearch(researchId: string, updates: {
    findings?: string[];
    sources?: string[];
    status?: 'pending' | 'complete' | 'partial';
}, cwd?: string): Promise<ResearchEntry>;
/**
 * Get research statistics.
 * @task T4474
 */
export declare function statsResearch(cwd?: string): Promise<{
    total: number;
    byStatus: Record<string, number>;
    byTopic: Record<string, number>;
}>;
/**
 * Get research entries linked to a specific task.
 * @task T4474
 */
export declare function linksResearch(taskId: string, cwd?: string): Promise<ResearchEntry[]>;
/**
 * Archive old research entries by status.
 * Moves 'complete' entries older than a threshold to an archive,
 * or returns summary of archivable entries.
 * @task T4474
 */
export declare function archiveResearch(cwd?: string): Promise<{
    action: string;
    entriesArchived: number;
    entriesRemaining: number;
}>;
/**
 * Read manifest entries from MANIFEST.jsonl.
 * @task T4465
 */
export declare function readManifest(cwd?: string): Promise<ManifestEntry[]>;
/**
 * Append a manifest entry.
 * @task T4465
 */
export declare function appendManifest(entry: ManifestEntry, cwd?: string): Promise<void>;
/**
 * Query manifest entries.
 * @task T4465
 */
export declare function queryManifest(options?: ManifestQueryOptions, cwd?: string): Promise<ManifestEntry[]>;
/** Extended manifest entry with optional fields used by the engine. */
export interface ExtendedManifestEntry extends ManifestEntry {
    confidence?: number;
    file_checksum?: string;
    duration_seconds?: number;
}
/** Research filter criteria used by the engine. */
export interface ResearchFilter {
    taskId?: string;
    status?: string;
    agent_type?: string;
    topic?: string;
    limit?: number;
    offset?: number;
    actionable?: boolean;
    dateAfter?: string;
    dateBefore?: string;
}
/**
 * Read all manifest entries as extended entries.
 * @task T4787
 */
export declare function readExtendedManifest(cwd?: string): Promise<ExtendedManifestEntry[]>;
/**
 * Filter manifest entries by criteria.
 * @task T4787
 */
export declare function filterManifestEntries(entries: ExtendedManifestEntry[], filter: ResearchFilter): ExtendedManifestEntry[];
/**
 * Show a manifest entry by ID with optional file content.
 * @task T4787
 */
export declare function showManifestEntry(researchId: string, cwd?: string): Promise<ExtendedManifestEntry & {
    fileContent: string | null;
    fileExists: boolean;
}>;
/**
 * Search manifest entries by text with relevance scoring.
 * @task T4787
 */
export declare function searchManifest(query: string, options?: {
    confidence?: number;
    limit?: number;
}, cwd?: string): Promise<Array<ExtendedManifestEntry & {
    relevanceScore: number;
}>>;
/**
 * Get pending manifest entries (partial, blocked, or needing followup).
 * @task T4787
 */
export declare function pendingManifestEntries(epicId?: string, cwd?: string): Promise<{
    entries: ExtendedManifestEntry[];
    total: number;
    byStatus: {
        partial: number;
        blocked: number;
        needsFollowup: number;
    };
}>;
/**
 * Get manifest-based research statistics.
 * @task T4787
 */
export declare function manifestStats(epicId?: string, cwd?: string): Promise<{
    total: number;
    byStatus: Record<string, number>;
    byType: Record<string, number>;
    actionable: number;
    needsFollowup: number;
    averageFindings: number;
}>;
/**
 * Link a manifest entry to a task (adds taskId to linked_tasks array).
 * @task T4787
 */
export declare function linkManifestEntry(taskId: string, researchId: string, cwd?: string): Promise<{
    taskId: string;
    researchId: string;
    alreadyLinked: boolean;
}>;
/**
 * Append an extended manifest entry.
 * Validates required fields before appending.
 * @task T4787
 */
export declare function appendExtendedManifest(entry: ExtendedManifestEntry, cwd?: string): Promise<{
    entryId: string;
    file: string;
}>;
/**
 * Archive manifest entries older than a date.
 * @task T4787
 */
export declare function archiveManifestEntries(beforeDate: string, cwd?: string): Promise<{
    archived: number;
    remaining: number;
    archiveFile: string;
}>;
/** Contradiction detail between two manifest entries. */
export interface ContradictionDetail {
    entryA: ExtendedManifestEntry;
    entryB: ExtendedManifestEntry;
    topic: string;
    conflictDetails: string;
}
/**
 * Find manifest entries with overlapping topics but conflicting key_findings.
 * @task T4787
 */
export declare function findContradictions(cwd?: string, params?: {
    topic?: string;
}): Promise<ContradictionDetail[]>;
/** Superseded entry detail. */
export interface SupersededDetail {
    old: ExtendedManifestEntry;
    replacement: ExtendedManifestEntry;
    topic: string;
}
/**
 * Identify research entries replaced by newer work on same topic.
 * @task T4787
 */
export declare function findSuperseded(cwd?: string, params?: {
    topic?: string;
}): Promise<SupersededDetail[]>;
/**
 * Read protocol injection content for a given protocol type.
 * @task T4787
 */
export declare function readProtocolInjection(protocolType: string, params?: {
    taskId?: string;
    variant?: string;
}, cwd?: string): Promise<{
    protocolType: string;
    content: string;
    path: string;
    contentLength: number;
    estimatedTokens: number;
    taskId: string | null;
    variant: string | null;
}>;
/**
 * Compact MANIFEST.jsonl by removing duplicate/stale entries.
 * @task T4787
 */
export declare function compactManifest(cwd?: string): Promise<{
    compacted: boolean;
    originalLines: number;
    malformedRemoved: number;
    duplicatesRemoved: number;
    remainingEntries: number;
}>;
/**
 * Validate research entries for a task.
 * @task T4787
 */
export declare function validateManifestEntries(taskId: string, cwd?: string): Promise<{
    taskId: string;
    valid: boolean;
    entriesFound: number;
    issues: Array<{
        entryId: string;
        issue: string;
        severity: 'error' | 'warning';
    }>;
    errorCount: number;
    warningCount: number;
}>;
export * from './brain-lifecycle.js';
export * from './brain-links.js';
export * from './brain-migration.js';
export * from './brain-retrieval.js';
export * from './brain-search.js';
export * from './decisions.js';
export * from './learnings.js';
export * from './patterns.js';
//# sourceMappingURL=index.d.ts.map