import type { ApplicationUnderstanding, ObservedEvidenceInput } from "./application-understanding.js"; import { type FeltDBContractSnapshot } from "./application-development.js"; import { type ModuleImplementationPlan } from "./module-intent.js"; import { FeltDBProposalService, type FeltDBProposalPreviewArtifact, type FeltDBProposalRecord, type ProposalContext, type ProposalStore } from "./proposal.js"; export declare const FELTDB_INTENT_COLLECTION = "_feltdb.Intent"; export declare const FELTDB_INTENT_EVENT_COLLECTION = "_feltdb.IntentEvent"; export type IntentStatus = "received" | "resolving" | "understanding" | "planning" | "proposal_created" | "completed" | "blocked" | "failed"; export interface IntentAmbiguity { code: "requires_selection" | "module_not_available" | "clarification_required"; message: string; candidates: string[]; } export interface Intent { id: string; application_id: string; environment: string; raw_request: string; action: "implement" | "extend" | "unknown"; target: "module" | "billing" | "unknown"; module?: string; module_version?: string; parent_intent_id?: string; contract_hash: string; flow_hash: string; status: IntentStatus; ambiguities: IntentAmbiguity[]; created_at: string; understanding?: ApplicationUnderstanding; plan?: ImplementationPlan; proposal_id?: string; } export interface IntentEvent { id: string; intent_id: string; status: IntentStatus; created_at: string; metadata: Record; } export interface ConfidenceRule { claim: string; minimum_confidence: number; allowed_authority: Array<"authoritative" | "observed" | "inferred">; clarification: "block" | "warn"; } export declare const DEFAULT_CONFIDENCE_POLICY: ConfidenceRule[]; export interface ImplementationPlan { intent: Intent; module: ModuleImplementationPlan["module"]; already_installed: boolean; state_changes: ModuleImplementationPlan["applicationModels"]; relationships: string[]; events: string[]; workflows: string[]; capabilities: string[]; authorization: ModuleImplementationPlan["authorization"]; configuration: string[]; secrets: string[]; dependencies: ModuleImplementationPlan["dependencies"]; ownership: Record; assumptions: ApplicationUnderstanding["assumptions"]; evidence: string[]; source_plan: { files: Array<{ path: string; operation: "add" | "modify" | "delete"; role?: string; }>; }; warnings: string[]; } export interface IntentExecutionResult { intent: Intent; understanding?: ApplicationUnderstanding; plan?: ImplementationPlan; proposal?: FeltDBProposalRecord; preview?: FeltDBProposalPreviewArtifact; blockers: string[]; warnings: string[]; } export declare function resolveIntent(request: string, context: { snapshot: FeltDBContractSnapshot; flowHash: string; parentIntentId?: string; }): Intent; export declare function validateImplementationPlan(plan: ImplementationPlan, understanding: ApplicationUnderstanding, policy?: ConfidenceRule[]): string[]; export declare class IntentService { private store; private context; private proposals; private observations?; constructor(store: ProposalStore, context: () => Promise, proposals: FeltDBProposalService, observations?: (() => ObservedEvidenceInput[] | Promise) | undefined); execute(rawRequest: string, actor?: string): Promise; list(): Promise; get(id: string): Promise; history(id: string): Promise; private event; } //# sourceMappingURL=intent.d.ts.map