/** * Runtime investigation supervisor. * * Reads durable runtime observations out of the Development Workspace, opens * investigations for the ones that represent actionable defects, builds the * evidence and the finding, produces the agent-executable remediation * contract, tracks the repository change, and verifies the outcome against a * later runtime observation. * * The architectural boundary is enforced here: this supervisor observes, * investigates, contracts, verifies, and remembers. It never edits source and * it never decides that a defect is fixed on any basis other than a runtime * observation. */ import type { RemediationContract, RepositoryIdentity, RuntimeInvestigation, RuntimeRequestObservation, VerificationCriterion } from './workspace-types.js'; import { InvestigationLifecycleManager } from './investigation-lifecycle-manager.js'; export interface SupervisorOptions { /** Directory containing `.feltdb/`. */ projectDir: string; /** Workspace authority endpoint. */ endpoint: string; workspaceId: string; /** Directory the coding agent will modify. Defaults to the application directory. */ repositoryDir?: string; } /** The artifact handed to the coding agent. */ export interface AgentHandoffArtifact { investigationId: string; /** Machine-readable contract. */ contract: RemediationContract; /** Human-readable briefing. */ markdown: string; /** Where the artifact was written for the agent to pick up. */ jsonPath: string; markdownPath: string; } export declare class RuntimeInvestigationSupervisor { readonly investigations: InvestigationLifecycleManager; private readonly options; private connection; private readonly seenObservations; constructor(options: SupervisorOptions); connect(): Promise; disconnect(): Promise; private require; /** Every runtime observation the workspace has persisted. */ observations(): Promise; /** * Wait for a runtime observation matching a verification criterion. * * Returns undefined on timeout, which is what produces an INCONCLUSIVE * verification rather than a false VERIFIED. */ awaitObservation(criterion: VerificationCriterion, options?: { after: number; timeoutMs?: number; intervalMs?: number; }): Promise; /** * Open investigations for actionable defects that do not have one yet. * * Successful requests are persisted as observations but never open an * investigation. */ ingestObservations(): Promise; /** * Drive a single observation through investigation and analysis. * * Ends in PROPOSED with evidence, a finding, and a remediation contract, and * with the repository baseline recorded so the change can be attributed. */ openInvestigation(observation: RuntimeRequestObservation): RuntimeInvestigation; /** Repository state, used as the remediation baseline. */ repositoryIdentity(): RepositoryIdentity; /** Source files that exist on disk and could implement the observed route. */ private relevantSource; /** * Write the agent handoff artifact. * * FeltDB stops here: it produces a complete, machine-readable engineering * contract and hands it over. Inspecting the repository and editing source * is the coding agent's job, not FeltDB's. */ writeAgentHandoff(investigationId: string): AgentHandoffArtifact; /** Whether the repository moved since the investigation baseline. */ detectRepositoryChange(investigationId: string): RuntimeInvestigation; /** * Verify the contract against the runtime. * * Waits for a matching runtime observation produced after the code change * and evaluates it. No observation means INCONCLUSIVE. */ verify(investigationId: string, options?: { after: number; timeoutMs?: number; }): Promise; /** One-line description of why an investigation exists. */ describe(investigation: RuntimeInvestigation): string; } //# sourceMappingURL=investigation-supervisor.d.ts.map