import type { RuntimeProfile } from "./runtime-profile.js"; import { type OperatorPlan, type OperatorTask } from "./operator-runtime.js"; export declare const DEFAULT_OPERATOR_PROPOSAL_BUDGET: Readonly<{ max_reads: 45; max_submissions: 9; }>; export declare const OPERATOR_PROPOSAL_BUDGET_CAPS: Readonly<{ max_reads: 192; max_submissions: 24; }>; export declare const OPERATOR_APPROVAL_CONTRACT: string; export interface OperatorIntentRequirement { readonly id: string; readonly text: string; readonly kind: "requirement" | "negative" | "quality"; } export interface OperatorIntent { readonly schema_version: "0.1"; readonly original_request: { readonly text: string; readonly source_ref: string; }; readonly requirements: readonly OperatorIntentRequirement[]; readonly authoritative_refs: readonly string[]; readonly allow_read: readonly string[]; readonly proposal_budget: { readonly max_reads: number; readonly max_submissions: number; }; } export interface OperatorProposalPacket { readonly schema_version: "0.1"; readonly revision: number; readonly coverage: readonly { readonly requirement_id: string; readonly approach: string; readonly validation: string; }[]; /** Existing constructs each covered requirement must intercept, each one read during this investigation. */ readonly existing_surface: readonly { readonly requirement_id: string; readonly path: string; readonly form: string; }[]; readonly uncovered: readonly { readonly requirement_id: string; readonly reason: string; }[]; readonly negative_handling: readonly { readonly requirement_id: string; readonly handling: string; }[]; readonly read_scope: readonly string[]; readonly write_scope: readonly string[]; readonly budget_estimate: { readonly proposal_reads: number; readonly execution_units: number; }; readonly plan: OperatorPlan; } export interface OperatorProposalGoalBinding { readonly goal_id: string; readonly revision: number; readonly scope_epoch: number; readonly acceptance_fingerprint: string; } export interface OperatorProposalState { readonly schema_version: "0.1"; readonly profile: string; readonly root_session_id: string; readonly intent_id: string; readonly intent_hash: string; readonly intent: OperatorIntent; goal_binding: OperatorProposalGoalBinding | null; readonly created_at: string; phase: "investigating" | "submitted" | "approved"; proposal_call_id: string | null; proposal_session_id: string | null; read_count: number; /** Project-relative paths this investigation actually opened, used to check surface claims. */ read_paths: string[]; submission_count: number; proposal_id: string | null; proposal_revision: number | null; proposal_hash: string | null; proposal: OperatorProposalPacket | null; approval_rationale: string | null; } /** Durable pre-execution lane. It grants investigation and submission, never source mutation or execution. */ export declare class OperatorProposalRuntime { readonly profile: RuntimeProfile; private readonly states; private readonly pending; private serial; readonly projectRoot: string; constructor(projectRoot: string, profile: RuntimeProfile); private file; private spendFile; private readSpend; private saveSpend; read(root: string): Promise; private readUnlocked; private save; task(state: OperatorProposalState): OperatorTask; /** Root-visible bounded handle; the canonical prompt remains only in durable host state. */ referenceTask(state: OperatorProposalState): OperatorTask; isReferenceTask(args: unknown): boolean; isProposalPrompt(prompt: string): boolean; private resolveTask; begin(root: string, raw: unknown): Promise; private beginUnlocked; bindGoal(root: string, binding: OperatorProposalGoalBinding): Promise; private bindGoalUnlocked; admit(root: string, callID: string, args: unknown, reserveBudget?: () => Promise): Promise; private admitUnlocked; bind(root: string, child: string, prompt: string): Promise; private bindUnlocked; /** Atomically bind one direct native proposal child and reveal the canonical prompt only there. */ claimAdmittedPrompt(root: string, parent: string, child: string, prompt: string): Promise; accountRead(root: string, actor: string, path?: string): Promise; private accountReadUnlocked; submit(root: string, actor: string, raw: unknown): Promise; submitJSON(root: string, actor: string, source: string): Promise; private submitUnlocked; approve(root: string, raw: unknown, commit?: boolean): Promise; private approveUnlocked; /** * Release a pre-approval proposal grant on explicit root cancellation. Without this the root holds an * immutable investigating intent whose admitted child can no longer bind, so no retry path exists at all. * An approved proposal is already connected to the execution lane and stays durable. */ discardPreApproval(root: string): Promise; required(root: string): Promise; assertExecutionApproved(root: string, planHash: string): Promise; private requiredUnlocked; packet(state: OperatorProposalState): unknown; }