/**
 * intent_expander — small utility / helper functions shared across modules.
 *
 * Pure helpers with no cross-file internal dependencies (except types).
 */
import type { ClassifyResult, ExpandResult, KnowledgeEntry, ScopeResult } from "../../../types/index.js";
import type { ProjectConfig } from "../../../types/index.js";
import type { IntentRouteDecision } from "../intent_router.js";
import type { BlockedResultOptions } from "./types.js";
import type { PromptInjectionPlan } from "../input_material_contract_registry.js";
import type { ArtifactKind } from "../../contracts/artifact_contract_registry.js";
import type { resolveWorkflow } from "../../workflow/workflow_contract_registry.js";
export declare function mapToArtifactKind(kind: string): ArtifactKind;
/** 将 PromptInjectionPlan 渲染为 Markdown 段落（统一注入，避免模板内重复） */
export declare function renderPromptInjectionPlan(plan: PromptInjectionPlan): string;
/**
 * 统一构造被阻断的 ExpandResult，消除 13 个 early return 的重复代码。
 */
export declare function buildBlockedResult(prompt: string, safeGoal: string, options: BlockedResultOptions): ExpandResult;
/**
 * 解析澄清答案，将路径注入 route_decision.input_materials，
 * 清除已解决的 missing_required_inputs。
 * 返回新的 route_decision（不修改原对象）。
 */
export declare function resolveClarificationAnswers(decision: IntentRouteDecision, _intent: string, answers: string[]): IntentRouteDecision;
/**
 * 获取 sf_expand 契约的 next_allowed_tools 和 forbidden_tools。
 */
export declare function getExpandContractTools(): {
    next_allowed_tools: string[];
    forbidden_tools: string[];
};
export declare function buildCheckedItems(_contract: NonNullable<ReturnType<typeof resolveWorkflow>>, routeDecision: IntentRouteDecision | undefined): string[];
export declare function mergeKnowledgeEntries(entries: KnowledgeEntry[]): KnowledgeEntry[];
export declare function extractKeywords(intent: string): string[];
/**
 * 读取分类结果中的受影响仓库。
 * 旧任务上下文或外部适配器可能缺少 affected_repos；这里统一降级为空数组，避免 sf_expand 卡死。
 */
export declare function getAffectedRepos(classification: Partial<ClassifyResult> | null | undefined): string[];
export declare function buildTechStackLabel(config: ProjectConfig): string;
/**
 * 按模板文件名精确匹配知识条目。
 * 匹配 entry.name、file basename (with/without extension)。
 */
export declare function matchesTemplateByName(entry: KnowledgeEntry, templateName: string): boolean;
export declare function normalizeTemplateName(name: string): string;
export declare function matchesOutputTemplate(entry: KnowledgeEntry, outputTemplate: string): boolean;
export declare function inferScopeFromIntentAndConfig(intent: string, classification: Partial<ClassifyResult> | null | undefined, config: ProjectConfig): string[];
/**
 * 解析 scope: 非代码任务使用简化 scope。
 */
export declare function resolveScope(config: ProjectConfig, classification: ClassifyResult, degraded: boolean, routeDecision?: IntentRouteDecision): ScopeResult;
/**
 * 缺少必需输入时返回澄清结果（不生成执行 prompt）。
 */
export declare function buildClarificationResult(_intent: string, routeDecision: IntentRouteDecision, _config: ProjectConfig, workflowContract: ReturnType<typeof resolveWorkflow> | undefined, safeIntent: string, safeGoal: string): ExpandResult;
//# sourceMappingURL=helpers.d.ts.map