import type { DeliveryEvidenceModeV2, EvaluateDeliveryEvidenceOptions } from "./delivery-evidence.js";
import type { MaintainerDeliveryPolicyConfig, MaintainerDeliveryProfile, TaskPolicyEnforcementMode } from "./policy-config.js";
import { TASK_POLICY_OVERRIDE_PRECEDENCE } from "./policy-config.js";
import type { TaskEntity } from "./types.js";
export type MaintainerDeliveryExplainSource = "task-metadata" | "module-override" | "workspace-default" | "built-in-default";
export type MaintainerDeliveryExplainEntry = {
    key: string;
    value: unknown;
    source: MaintainerDeliveryExplainSource;
};
export type MaintainerDeliveryPolicyWarning = {
    code: string;
    message: string;
};
export type ResolveMaintainerDeliveryPolicyArgs = {
    effectiveConfig: Record<string, unknown> | undefined;
    /** Loaded task when resolving by id. */
    task?: TaskEntity | null;
    /** When set without task, enough prospective context to expand patterns. */
    taskId?: string | null;
    phaseKey?: string | null;
    moduleId?: string | null;
    slug?: string | null;
    version?: string | null;
};
export type ResolvedMaintainerDeliveryPolicyV1 = {
    schemaVersion: 1;
    profileName: string;
    maintainerDeliveryEnforcementMode: TaskPolicyEnforcementMode;
    deliveryEvidenceEnforcementMode: TaskPolicyEnforcementMode;
    requiresPhaseBranch: boolean;
    phaseBranchPattern: string;
    phaseIntegrationBranch: string | null;
    taskBranchPattern: string;
    taskBranchExample: string | null;
    releaseTagPattern: string | null;
    releaseTagExample: string | null;
    reviewMode: MaintainerDeliveryProfile["review"];
    evidenceMode: MaintainerDeliveryProfile["evidenceKind"];
    prProvider: string;
    mergeStrategy: string;
    phaseToMainMode: string;
    mergeTarget: {
        kind: "phase-integration-branch";
        pattern: string;
        branch: string | null;
    };
    playbookPath: string;
    playbookCursorRulePath: string;
    machinePlaybooksPath: string;
};
export declare function deliveryEvidenceModesForMaintainerEvidenceKind(evidenceKind: MaintainerDeliveryProfile["evidenceKind"]): DeliveryEvidenceModeV2[] | undefined;
export declare function buildDeliveryEvidencePolicyContext(input: {
    resolvedPolicy: Pick<ResolvedMaintainerDeliveryPolicyV1, "evidenceMode" | "profileName">;
    warnings?: readonly MaintainerDeliveryPolicyWarning[];
}): EvaluateDeliveryEvidenceOptions;
/** Merge persisted maintainerDelivery with shipped defaults (profiles + overrides). */
export declare function parseMaintainerDeliveryPolicyConfig(effective: Record<string, unknown> | undefined): MaintainerDeliveryPolicyConfig;
export declare function slugifyTaskTitle(title: string): string;
/**
 * Read-only resolver: workspace + module + task metadata → concrete delivery instructions.
 */
export declare function resolveMaintainerDeliveryPolicy(input: ResolveMaintainerDeliveryPolicyArgs): {
    resolvedPolicy: ResolvedMaintainerDeliveryPolicyV1;
    explain: MaintainerDeliveryExplainEntry[];
    warnings: MaintainerDeliveryPolicyWarning[];
    precedenceOrder: typeof TASK_POLICY_OVERRIDE_PRECEDENCE;
};
