/**
 * OwlCoda Task Execution Policy — Slice 4, Task Execution Mode v1
 *
 * Builds conversation-loop nudges for structured task plans.
 *
 * Five nudge kinds:
 *   create_plan        — task looks like it needs a structured plan but none was created
 *   continue_step      — a step is in_progress but no recent progress has been made
 *   verify_step        — a step completed without running TaskVerify
 *   completion_blocked — model claims completion but open required steps remain
 *   edit_now           — granted risky tool has no post-grant evidence yet
 *
 * Rate limit: max MAX_NUDGES_PER_KIND injections per (taskId, kind) pair per
 * conversation run — tracked in a caller-owned NudgeCounter.
 *
 * Suppression:
 *   - read_only_review / text_deliverable deliverables do NOT get create_plan
 *   - user text matching SUPPRESS_PLAN_RE suppresses create_plan
 *   - completion_blocked only fires when detectCompletionClaim() is true
 */
import type { DeliverableContractClassification } from './deliverable-contract.js';
import type { DerivedTurnPhase, EditNowNudge, ProposedToolCall } from './protocol/task-permission-types.js';
import type { ProjectMapVerificationProfile } from './protocol/project-map-types.js';
export declare const MAX_NUDGES_PER_KIND = 2;
export type NudgeKind = 'create_plan' | 'continue_step' | 'verify_step' | 'completion_blocked' | 'edit_now';
/** Opaque per-conversation counter for nudge rate-limiting. */
export type NudgeCounter = Map<string, number>;
export declare function createNudgeCounter(): NudgeCounter;
export declare function isNudgeExhausted(counter: NudgeCounter, taskId: string, kind: NudgeKind): boolean;
/** Result from buildTaskExecutionNudge — null when no nudge should fire. */
export interface TaskNudgeResult {
    kind: NudgeKind;
    taskId: string;
    text: string;
}
export interface NudgeContext {
    /**
     * The latest assistant message text from this turn.
     */
    assistantText: string;
    /**
     * The latest substantive user text (used for create_plan suppression).
     * Can be null if no user message was found.
     */
    latestUserText: string | null;
    /**
     * Deliverable contract for the current task (used for create_plan suppression).
     * Pass null if no contract is available.
     */
    deliverable: DeliverableContractClassification | null;
    /**
     * The per-conversation nudge counter — caller maintains this across turns.
     */
    counter: NudgeCounter;
    /**
     * The current active task ID. When provided, limits search to that task.
     */
    activeTaskId?: string | null;
    /**
     * GATE_V2: proposed tool calls recorded for the current active task.
     * Used to suppress create_plan nudges when the assistant has not proposed
     * any risky action that would need durable evidence.
     */
    proposedToolCalls?: ProposedToolCall[];
    /**
     * PHASE_RUNTIME: derived phase for the current turn. When enabled, generic
     * plan/continue pressure should not interrupt verification/report/final
     * phases that already have evidence.
     */
    phaseVerdict?: DerivedTurnPhase;
    /**
     * True only while the internal phase-aware runtime flag is enabled.
     */
    phaseRuntimeEnabled?: boolean;
    /**
     * Project Map / Runtime Harness Slice E: verification profiles derived from
     * bounded project evidence. These improve nudges only; commands are not
     * executed automatically.
     */
    projectMapVerificationProfiles?: ProjectMapVerificationProfile[];
}
/**
 * Evaluate whether a task-step nudge should be injected this turn.
 *
 * Returns null when:
 *   - No open task with steps exists
 *   - The appropriate nudge kind has been exhausted
 *   - The nudge condition is not met
 *
 * When a nudge is returned, the caller MUST call `consumeNudge()` to record the
 * injection before appending the message; otherwise the rate limit won't fire.
 */
export declare function buildTaskExecutionNudge(ctx: NudgeContext): TaskNudgeResult | null;
/**
 * Record that a nudge was consumed. Must be called after the caller
 * appends the nudge text to the conversation.
 */
export declare function consumeNudge(counter: NudgeCounter, taskId: string, kind: NudgeKind): void;
/**
 * Check whether a task's required steps are all satisfied.
 * Returns true only when every required step is completed.
 * (Convenience wrapper over the store's taskHasOpenRequiredSteps.)
 */
export declare function allRequiredStepsDone(taskId: string): boolean;
export declare function buildEditNowNudgePrompt(nudge: EditNowNudge): string;
