/**
 * 通用决策研讨机制 — 覆盖所有高影响/不确定任务的决策前置确认。
 *
 * 问题六十一要求:
 * - DecisionPackRegistry 支持独立、可组合的决策包
 * - business_process 和 delivery_validation 可独立触发
 * - 同一任务可组合多个 pack
 * - 架构决策六域作为 builtin 子包
 */
import { type ArchitectureDecisionWorkshopContract, type ArchitectureDecisionDomain, type ArchitectureDecisionStatus, type ArchitectureProjectContext } from "./architecture_decision_workshop.js";
export declare const DECISION_PACKS: {
    readonly architecture: {
        readonly pack_id: "architecture";
        readonly domains: string[];
        readonly trigger_patterns: readonly [RegExp];
        readonly trigger_intent: readonly ["architecture_design"];
        readonly reason: "架构设计任务需要六域决策研讨";
    };
    readonly technology_selection: {
        readonly pack_id: "technology_selection";
        readonly domains: readonly ["technology_selection"];
        readonly trigger_patterns: readonly [RegExp];
        readonly trigger_intent: readonly [];
        readonly reason: "技术选型需要决策研讨与用户确认";
    };
    readonly data_migration: {
        readonly pack_id: "data_migration";
        readonly domains: readonly ["data_migration"];
        readonly trigger_patterns: readonly [RegExp];
        readonly trigger_intent: readonly [];
        readonly reason: "数据迁移需要决策研讨";
    };
    readonly security_policy: {
        readonly pack_id: "security_policy";
        readonly domains: readonly ["security_policy"];
        readonly trigger_patterns: readonly [RegExp];
        readonly trigger_intent: readonly [];
        readonly reason: "安全策略变更需要决策研讨";
    };
    readonly deployment_infrastructure: {
        readonly pack_id: "deployment_infrastructure";
        readonly domains: readonly ["deployment_infrastructure"];
        readonly trigger_patterns: readonly [RegExp];
        readonly trigger_intent: readonly [];
        readonly reason: "部署基础设施变更需要决策研讨";
    };
    readonly product_scope: {
        readonly pack_id: "product_scope";
        readonly domains: readonly ["product_scope"];
        readonly trigger_patterns: readonly [RegExp];
        readonly trigger_intent: readonly [];
        readonly reason: "产品范围变更需要决策研讨";
    };
    readonly business_process: {
        readonly pack_id: "business_process";
        readonly domains: readonly ["business_process"];
        readonly trigger_patterns: readonly [RegExp];
        readonly trigger_intent: readonly [];
        readonly reason: "业务流程变更需要决策研讨";
    };
    readonly delivery_validation: {
        readonly pack_id: "delivery_validation";
        readonly domains: readonly ["delivery_validation"];
        readonly trigger_patterns: readonly [RegExp];
        readonly trigger_intent: readonly [];
        readonly reason: "交付验证策略需要决策研讨";
    };
    readonly refactor_migration: {
        readonly pack_id: "refactor_migration";
        readonly domains: readonly ["refactor_migration"];
        readonly trigger_patterns: readonly [RegExp];
        readonly trigger_intent: readonly [];
        readonly reason: "重构/迁移需要决策研讨";
    };
    readonly third_party_integration: {
        readonly pack_id: "third_party_integration";
        readonly domains: readonly ["third_party_integration", "security_policy"];
        readonly trigger_patterns: readonly [RegExp];
        readonly trigger_intent: readonly [];
        readonly reason: "第三方集成需要决策研讨";
    };
};
export type DecisionPackId = keyof typeof DECISION_PACKS;
export declare const EXTENDED_DECISION_DOMAINS: readonly ["technology_selection", "data_migration", "security_policy", "deployment_infrastructure", "product_scope", "business_process", "delivery_validation", "refactor_migration", "third_party_integration"];
export type ExtendedDecisionDomain = typeof EXTENDED_DECISION_DOMAINS[number];
export type DecisionDomain = ArchitectureDecisionDomain | ExtendedDecisionDomain;
export interface DecisionRecord {
    decision_id: string;
    domain: DecisionDomain;
    status: ArchitectureDecisionStatus;
    required: boolean;
    facts_and_constraints: string[];
    evidence_refs: string[];
    options: Array<{
        option_id: string;
        summary: string;
        benefits: string[];
        risks: string[];
        rejected_reason?: string;
    }>;
    recommendation?: {
        option_id: string;
        rationale: string[];
    };
    user_confirmation_ref?: string;
    not_applicable_reason?: string;
    deferred_impact?: string[];
}
export interface DecisionWorkshopContract {
    task_id: string;
    /** 已激活的决策包列表（可组合多个） */
    activated_packs: DecisionPackId[];
    status: "draft" | "awaiting_confirmation" | "confirmed" | "rework_required" | "blocked";
    project_context: ArchitectureProjectContext;
    /** 架构子包 — 当 activated_packs 包含 architecture 时使用 */
    architecture_subpack?: ArchitectureDecisionWorkshopContract;
    /** 扩展域记录（所有激活包的域合并） */
    extended_domains: Partial<Record<ExtendedDecisionDomain, DecisionRecord>>;
    /** 触发原因 */
    trigger_reason: string;
    prerequisite_evidence_refs: string[];
    generation_allowed: boolean;
    blocking_findings: string[];
}
/** @deprecated 使用 activated_packs 替代 */
export type DecisionWorkshopType = "architecture" | "technology_selection" | "data_migration" | "security_policy" | "deployment" | "product_scope" | "refactor" | "third_party_integration" | "multi_domain";
export interface DecisionWorkshopGateResult {
    allowed: boolean;
    status: DecisionWorkshopContract["status"];
    blocking_findings: string[];
    missing_domains: string[];
    next_domain?: string;
}
export declare function matchDecisionPacks(params: {
    workflow_intent?: string;
    intent?: string;
    route_decision?: string;
    task_type?: string;
}): {
    packs: DecisionPackId[];
    reasons: string[];
};
/**
 * 旧接口兼容 — 返回第一个匹配的包类型。
 * 新代码应使用 matchDecisionPacks 获取所有匹配包。
 */
export declare function requiresDecisionWorkshop(params: {
    workflow_intent?: string;
    intent?: string;
    route_decision?: string;
    task_type?: string;
}): {
    required: boolean;
    workshop_type: DecisionWorkshopType;
    reason: string;
};
export declare function createDecisionWorkshop(taskId: string, activatedPacks: DecisionPackId | DecisionPackId[], projectContext?: ArchitectureProjectContext, triggerReason?: string): DecisionWorkshopContract;
/**
 * 兼容 MCP 客户端自然 JSON 回传的研讨结构。
 *
 * AI 常会把 `{ delivery_validation: {...}, status: ... }` 这样的领域字典
 * 当作合同回传。这里把可恢复结构规范化成正式合同；不可恢复结构交给
 * evaluateDecisionWorkshop 返回字段级阻断，避免死锁或 JS 运行时异常。
 */
export declare function normalizeDecisionWorkshopContract(input: unknown, fallbackTaskId?: string): DecisionWorkshopContract | undefined;
export declare function evaluateDecisionWorkshop(contract: DecisionWorkshopContract | undefined): DecisionWorkshopGateResult;
export declare function applyDecisionWorkshopGate(contract: DecisionWorkshopContract | undefined): DecisionWorkshopContract | undefined;
//# sourceMappingURL=decision_workshop.d.ts.map