import type { TaskIntakeEnforcementMode, TaskIntakeFieldRule, TaskIntakePolicyConfig } from "./policy-config.js";
import { TASK_POLICY_OVERRIDE_PRECEDENCE } from "./policy-config.js";
import type { TaskEntity, TaskStatus } from "./types.js";
export type TaskIntakeContextAction = "create-task" | "create-ready" | "accept" | string;
export type TaskIntakeExplainSource = "task-metadata" | "module-override" | "context-match" | "workspace-default" | "built-in-default";
export type TaskIntakeExplainEntry = {
    key: string;
    value: unknown;
    source: TaskIntakeExplainSource;
};
export type TaskIntakePolicyWarning = {
    code: string;
    message: string;
};
export type TaskIntakeFieldRuleViolation = {
    field: string;
    rule: keyof TaskIntakeFieldRule;
    message: string;
};
export type ResolveTaskIntakePolicyArgs = {
    effectiveConfig: Record<string, unknown> | undefined;
    task?: TaskEntity | null;
    taskId?: string | null;
    type?: string | null;
    targetStatus?: TaskStatus | string | null;
    action?: TaskIntakeContextAction | null;
    moduleId?: string | null;
    category?: string | null;
    phaseKey?: string | null;
    metadata?: Record<string, unknown> | null;
    fields?: Record<string, unknown> | null;
};
export type ResolvedTaskIntakePolicyV1 = {
    schemaVersion: 1;
    profileName: string;
    enforcementMode: TaskIntakeEnforcementMode;
    action: string;
    context: {
        taskId: string | null;
        type: string | null;
        targetStatus: string | null;
        moduleId: string | null;
        category: string | null;
        phaseKey: string | null;
    };
    requiredFields: string[];
    recommendedFields: string[];
    forbiddenFields: string[];
    fieldRules: Record<string, TaskIntakeFieldRule>;
};
export declare function parseTaskIntakePolicyConfig(effective: Record<string, unknown> | undefined): TaskIntakePolicyConfig;
export declare function resolveTaskIntakePolicy(input: ResolveTaskIntakePolicyArgs): {
    resolvedPolicy: ResolvedTaskIntakePolicyV1;
    missingRequiredFields: string[];
    missingRecommendedFields: string[];
    forbiddenPresentFields: string[];
    fieldRuleViolations: TaskIntakeFieldRuleViolation[];
    explain: TaskIntakeExplainEntry[];
    warnings: TaskIntakePolicyWarning[];
    precedenceOrder: typeof TASK_POLICY_OVERRIDE_PRECEDENCE;
};
