import type { Config } from '../config/schema.js'; import type { ProjectService } from '../projects/project-service.js'; import type { SessionIndex } from '../session/manager.js'; import type { WorkDiscoveryCandidate, WorkDiscoveryOnboardingState, WorkDiscoveryRecognitionDecision, WorkDiscoveryRun, WorkDiscoverySource } from './types.js'; export interface WorkDiscoveryServiceOptions { projects: ProjectService; sessions: SessionIndex; getConfig: () => Config; emit: (type: string, payload: unknown) => void; } export declare class WorkDiscoveryService { private readonly options; private readonly abortControllers; private readonly candidateContexts; private readonly activity; constructor(options: WorkDiscoveryServiceOptions); isEnabled(): boolean; getOnboardingState(): WorkDiscoveryOnboardingState; dismissOnboarding(): WorkDiscoveryOnboardingState; getRun(id: string): WorkDiscoveryRun | null; getInvestigation(runId: string): { investigation: import("./types.js").WorkUnderstandingInvestigation; evidence: import("./types.js").WorkUnderstandingEvidenceItem[]; }; discoverCandidates(signal?: AbortSignal): Promise; listDirectorySources(): import("./types.js").WorkDiscoveryDirectorySource[]; grantDirectorySource(rootPath: string): Promise; checkDirectorySources(): Promise; refreshDirectorySourceIfChanged(input: { id: string; idempotencyKey: string; }): Promise<{ changed: boolean; refresh: import("./types.js").WorkDiscoverySourceRefresh; reused?: undefined; run?: undefined; } | { changed: boolean; reused: boolean; refresh: import("./types.js").WorkDiscoverySourceRefresh; run: WorkDiscoveryRun; } | { changed: boolean; run: WorkDiscoveryRun; refresh: import("./types.js").WorkDiscoverySourceRefresh; reused?: undefined; }>; revokeDirectorySource(id: string): import("./types.js").WorkDiscoveryDirectorySource; importUnderstandingSources(rawItems: unknown[], signal?: AbortSignal, runId?: string, rawCheckpoints?: Record): Promise<{ profileCandidates: { status: "rejected" | "pending"; understandingId: string; id: string; category: "role" | "focus" | "technology" | "workflow" | "preference"; statement: string; confidence: "high" | "medium" | "low"; evidence: string[]; evidenceRefs?: string[]; }[]; workThreads: import("./types.js").WorkUnderstandingThread[]; focuses: import("../user-context/sources/types.js").UserFocus[]; }>; updateUnderstandingSourceProfile(input: { decisions: Array<{ understandingId: string; status: 'accepted' | 'edited' | 'rejected'; statement?: string; }>; }): { understandingId: string; status: "rejected" | "accepted" | "edited"; statement: string; }[]; rescanDirectorySource(input: { id: string; idempotencyKey: string; }): Promise; startQuickRun(input: { idempotencyKey: string; }): Promise; startRun(input: { rootPath: string; source: WorkDiscoverySource; idempotencyKey: string; candidateContext?: WorkDiscoveryCandidate[]; }): Promise; private publish; private execute; private persistProfileCandidates; updateProfileCandidates(input: { runId: string; decisions: Array<{ id: string; status: 'accepted' | 'edited' | 'rejected'; statement?: string; }>; }): WorkDiscoveryRun | null; cancelRun(id: string): WorkDiscoveryRun | null; retryRun(id: string): WorkDiscoveryRun | null; submitRecognitionFeedback(input: { runId: string; decision: WorkDiscoveryRecognitionDecision; correctedIntent?: string; }): Promise; selectSuggestion(runId: string, suggestionId: string): WorkDiscoveryRun | null; }