/**
 * Instruction context types and edit rule generation
 *
 * Defines the context structures used by instruction builders.
 */
import type { AgentResponse, FallbackContext, Language, WorkflowMaxSteps, WorkflowState } from '../../models/types.js';
/**
 * Context for building instruction from template.
 */
export interface InstructionContext {
    /** The main task/prompt */
    task: string;
    /** Current iteration number (workflow-wide turn count) */
    iteration: number;
    /** Maximum steps allowed */
    maxSteps: WorkflowMaxSteps;
    /** Current step's iteration number (how many times this step has been executed) */
    stepIteration: number;
    /** Working directory (agent work dir, may be a clone) */
    cwd: string;
    /** Project root directory (where .takt/ lives). */
    projectCwd: string;
    /** User inputs accumulated during workflow */
    userInputs: string[];
    /** Previous step output if available */
    previousOutput?: AgentResponse;
    /** Source path for previous response snapshot */
    previousResponseSourcePath?: string;
    /** Fallback context to inject once after provider switching */
    fallbackContext?: FallbackContext;
    /** Preprocessed previous response text for template placeholder replacement */
    previousResponseText?: string;
    /** Report directory path */
    reportDir?: string;
    /** Latest report paths for the current step */
    currentReport?: string;
    /** Most recent versioned report paths for the current step */
    previousReport?: string;
    /** Versioned report history paths for the current step */
    reportHistory?: string;
    /** Latest report paths for peer steps */
    peerReports?: string;
    /** Language for metadata rendering. Defaults to 'en'. */
    language?: Language;
    /** Whether interactive-only rules are enabled */
    interactive?: boolean;
    /** Top-level workflow steps for workflow structure display */
    workflowSteps?: ReadonlyArray<{
        name: string;
        description?: string;
    }>;
    /** Index of the current step in workflowSteps (0-based) */
    currentStepIndex?: number;
    /** Workflow name */
    workflowName?: string;
    /** Workflow description (optional) */
    workflowDescription?: string;
    /** Retry note explaining why task is being retried */
    retryNote?: string;
    /** Resolved policy content strings for injection into instruction */
    policyContents?: string[];
    /** Source path for policy snapshot */
    policySourcePath?: string;
    /** Resolved knowledge content strings for injection into instruction */
    knowledgeContents?: string[];
    /** Source path for knowledge snapshot */
    knowledgeSourcePath?: string;
    /** Workflow state for context/structured/effect interpolation */
    workflowState?: WorkflowState;
}
/**
 * Build the edit rule string for the execution context section.
 *
 * Returns a localized string describing the edit permission for this step.
 * Returns empty string when edit is undefined (no explicit permission).
 */
export declare function buildEditRule(edit: boolean | undefined, language: Language): string;
type GitRulePhase = 'phase1' | 'phase2';
export declare function buildGitRules(allowGitCommit: boolean | undefined, language: Language, phase: GitRulePhase): string;
export {};
//# sourceMappingURL=instruction-context.d.ts.map