import { type FeltDBContractSnapshot } from './application-development.js'; import { type ApplicationUnderstanding, type ObservedEvidenceInput } from './application-understanding.js'; export declare const FELTDB_PROPOSAL_COLLECTION = "_feltdb.Proposal"; export declare const FELTDB_PROPOSAL_EVENT_COLLECTION = "_feltdb.ProposalEvent"; export declare const FELTDB_PROPOSAL_PREVIEW_COLLECTION = "_feltdb.ProposalPreview"; export declare const FELTDB_CONVERGENCE_COLLECTION = "_feltdb.Convergence"; export declare const FELTDB_PROPOSAL_VERSION = 1; export type ProposalStatus = 'proposed' | 'validated' | 'previewed' | 'approved' | 'applied' | 'rejected' | 'expired'; export interface ProposalSourceOperation { path: string; operation: 'add' | 'modify' | 'delete'; role?: string; } export interface FeltDBProposalRecord { id: string; application_id: string; environment: string; status: ProposalStatus; proposal_version: 1; base_contract_version: number; base_contract_hash: string; base_flow_hash: string; proposed_flow: string; contract_diff: string[]; source_plan: { files: ProposalSourceOperation[]; }; summary: string; warnings: string[]; created_by: string; created_at: string | number; approved_by?: string; approved_at?: string | number; applied_at?: string | number; preview_id?: string; expires_at?: string | number; metadata: Record; parent_proposal_id?: string; module_versions: { id: string; provider: string; version: string; }[]; base_module_versions?: { id: string; provider: string; version: string; }[]; evidence_hash?: string; understanding_hash?: string; understanding?: ApplicationUnderstanding; module_impact: { modules: string[]; models: string[]; relationships: string[]; events: string[]; workflows: string[]; capabilities: string[]; authorization: string[]; configuration: string[]; secrets: string[]; ownership: Record; state_flow: string[]; }; } export interface FeltDBProposalEvent { id: string; proposal_id: string; from_status?: ProposalStatus; to_status: ProposalStatus; actor: string; created_at: string | number; metadata: Record; } export interface ProposalReadiness { status: ProposalStatus; readiness: 'ready' | 'blocked'; blockers: ('contract_changed' | 'flow_changed' | 'module_versions_changed' | 'evidence_changed' | 'expired')[]; notes: string[]; current_contract_hash: string; proposal_contract_hash: string; current_flow_hash: string; proposal_flow_hash: string; stale: boolean; expires_at?: string | number; } export interface FeltDBProposalPreviewArtifact { preview_id: string; proposal_id: string; application_id: string; environment: string; proposal_hash: string; created_at: string; expires_at: string; status: 'ready'; current: FeltDBContractSnapshot; proposed: FeltDBContractSnapshot; current_contract: FeltDBContractSnapshot; proposed_contract: FeltDBContractSnapshot; semantic_diff: string[]; state_flow: string[]; capabilities: unknown[]; workflows: unknown[]; authorization: unknown[]; configuration: string[]; secrets: string[]; modules: string[]; ownership: Record; relationships: string[]; events: string[]; seeded_records: { collection: string; id: string; preview_data: true; }[]; data_classification: 'synthetic_preview'; external_side_effects: 'simulated'; readiness: ProposalReadiness; proposal: FeltDBProposalRecord; } /** Canonical human diagnostic used by CLI and Studio text surfaces. */ export declare function renderProposalDiagnostic(proposal: FeltDBProposalRecord, options?: { readiness?: ProposalReadiness; history?: FeltDBProposalEvent[]; preview?: FeltDBProposalPreviewArtifact; }): string[]; export interface ProposalStore { get(collection: string, id: string): Promise; list(collection: string): Promise; create(collection: string, id: string, value: T): Promise; replace(collection: string, id: string, value: T): Promise; } export interface ProposalContext { source: string; snapshot: FeltDBContractSnapshot; observations?: ObservedEvidenceInput[]; } export declare class FeltDBProposalService { private store; private context; private repositoryAuthority?; constructor(store: ProposalStore, context: () => Promise, repositoryAuthority?: string | undefined); create(input: { application_id: string; environment: string; base_contract_hash: string; base_flow_hash: string; proposed_flow: string; summary: string; warnings?: string[]; actor: string; metadata?: Record; parent_proposal_id?: string; expires_at?: string | number; understanding?: ApplicationUnderstanding; contract_diff?: string[]; source_plan?: { files: ProposalSourceOperation[]; }; }): Promise; list(): Promise; get(id: string): Promise; history(id: string): Promise; readiness(id: string): Promise; validate(id: string, actor: string): Promise; preview(id: string, actor: string): Promise; getPreview(id: string): Promise; transition(id: string, status: 'approved' | 'rejected' | 'expired' | 'applied', actor: string, authority?: string, approveAuthorization?: boolean): Promise; private assertMutable; private move; private event; } //# sourceMappingURL=proposal.d.ts.map