/**
 * Intent Router — 意图路由器
 *
 * 根据用户意图文本确定语义通道 (route) 和执行形态 (execution_shape)。
 * 零 AI 依赖，纯规则匹配。
 *
 * 替代旧的 task_type -> strategy 入口裁决链路。
 * task_type 保留为辅助描述，不再单独决定是否进入 SoloForge。
 *
 * v2: 模块化拆分 — 路由判定由"信号提取 + 归一化 + 打分 + 冲突仲裁"完成，
 *     不再依赖单条整句正则。
 */
import { type IngestionStatus } from "./input_material_contract_registry.js";
import { type ArtifactKind } from "../contracts/artifact_contract_registry.js";
import type { OperationType } from "../../types/pipeline.js";
import { type MaterialExtractionResult } from "./input_material_extractor.js";
import { type IntentSignals, type WorkflowIntent } from "./intent_signal_extractor.js";
import { type ScoredRouteResult } from "./intent_route_scorer.js";
export type { IntentRoute, ExecutionShape } from "./route_types.js";
import type { IntentRoute, ExecutionShape } from "./route_types.js";
/** 输入材料类型 */
export type InputMaterialKind = "repo" | "file" | "directory" | "archive" | "log" | "doc" | "url" | "unknown";
/** @deprecated 请使用 ArtifactKind（来自 artifact_contract_registry） */
export type OutputArtifactKind = ArtifactKind | "unknown";
/** 意图路由决策结果 */
export interface IntentRouteDecision {
    /** 语义路由 */
    route: IntentRoute;
    /** 执行形态 */
    execution_shape: ExecutionShape;
    /** 是否允许代码变更 */
    mutation_allowed: boolean;
    /** 输入材料列表 */
    input_materials: Array<{
        kind: InputMaterialKind;
        path?: string;
        required: boolean;
        ingestion_status?: IngestionStatus;
    }>;
    /** 推断的补充材料（无路径时推断的缺失材料） */
    inferred_materials?: Array<{
        kind: InputMaterialKind;
        required: boolean;
    }>;
    /** 输出产物 */
    output_artifact?: {
        kind: OutputArtifactKind;
        path?: string;
        template?: string;
        taskId?: string;
    };
    /** 流水线提示 */
    pipeline_hint?: string;
    /** 缺失的必要输入 */
    missing_required_inputs: string[];
    /** 路由范围约束 */
    scope: {
        read_only: boolean;
        allowed_paths?: string[];
        description?: string;
    };
    /** 路由约束列表 */
    constraints: string[];
    /** 语言策略 */
    language_policy: {
        primary: string;
        fallback?: string;
    };
    /** 路由置信度 */
    confidence: number;
    /** 是否需要澄清 */
    needs_clarification?: boolean;
    /** 路由原因 */
    route_reason?: string;
    /** 信号证据 */
    signal_evidence?: string[];
    /** 证据链（signal_evidence 的规范化别名） */
    evidence: string[];
    /** 拒绝的路由候选及原因 */
    rejected_routes: Array<{
        route: IntentRoute;
        reason: string;
        score: number;
    }>;
    /** 路由冲突 */
    conflicts: Array<{
        description: string;
        resolution: string;
    }>;
    /** 跳过原因 */
    skip_reason?: string;
    /** 决策版本 */
    decision_version?: number;
    /** 工作流意图 */
    workflow_intent?: WorkflowIntent;
    /** 系统类型：新系统（绿场）/ 老系统（增量改造），决定走哪条管线 */
    system_type?: SystemType;
    /** 从路由和动作信号推导的产物操作类型 */
    operation_type?: OperationType;
}
/** 路由输入参数 */
export interface RouteInput {
    /** 用户意图文本 */
    intent: string;
    /** 可选，项目路径 */
    project_path?: string;
    /** 可选，任务 ID */
    task_id?: string;
}
export declare function routeIntent(input: RouteInput): IntentRouteDecision;
import type { SystemType } from "../../types/base.js";
/** 获取路由消费追踪 */
export declare function getRouterConsumptionTrace(): ReadonlyArray<{
    route: string;
    execution_shape: string;
    consumed_triggers: string[];
    consumed_at: string;
}>;
export declare function shouldEnterSoloForge(decision: IntentRouteDecision): boolean;
/** Prompt 模板名称 */
export type PromptTemplateName = "code_execution_prompt" | "single_artifact_prompt" | "source_extraction_prompt" | "read_only_analysis_prompt" | "acceptance_prompt" | "verification_only_prompt" | "direct_answer_prompt" | "architecture_design_prompt" | "gap_analysis_prompt" | "test_first_coding_prompt" | "local_acceptance_prompt";
export declare function selectPromptTemplate(decision: IntentRouteDecision): PromptTemplateName;
export interface RouteDebugInfo {
    intent: string;
    extracted_materials: MaterialExtractionResult;
    signals: IntentSignals;
    scored: ScoredRouteResult;
    final_decision: IntentRouteDecision;
    why_not_skip: string;
}
export declare function debugRouteIntent(input: RouteInput): RouteDebugInfo;
//# sourceMappingURL=intent_router.d.ts.map