/**
 * Artifact Contract Registry
 *
 * 输出产物管理契约。
 * 将原型说明、需求分析、接口方案、详细设计、测试计划、迁移方案、
 * 复盘、审查报告和机制报告统一建模为 output artifact。
 * 明确默认输出位置、覆盖策略、生命周期、验收方式和后续 workflow 引用。
 */
export type ArtifactKind = "api_spec" | "design_doc" | "task_breakdown" | "root_cause" | "acceptance_checklist" | "interaction_spec" | "domain_model" | "knowledge_rule" | "prototype_spec" | "requirement_analysis" | "api_design" | "detailed_design" | "test_plan" | "migration_plan" | "incident_review" | "review_report" | "verification_report" | "tech_decision_record" | "task_plan" | "custom";
export type ArtifactFormat = "markdown" | "json" | "yaml" | "html" | "docx" | "other";
export type ArtifactStatus = "draft" | "verified" | "accepted" | "superseded" | "archived";
export type OverwritePolicy = "never" | "version" | "confirm" | "allowed";
export interface OutputArtifact {
    artifact_id: string;
    kind: ArtifactKind;
    path: string;
    format: ArtifactFormat;
    created_by: string;
    workflow_id: string;
    task_id: string;
    source_material_refs: string[];
    knowledge_refs: string[];
    evidence_refs: string[];
    status: ArtifactStatus;
    overwrite_policy: OverwritePolicy;
    hash?: string;
    created_at?: string;
    version?: number;
}
export interface ArtifactGovernanceFinding {
    severity: "hard_fail" | "advisory";
    artifact_id?: string;
    rule: string;
    message: string;
}
/** 输出产物基础目录 */
export declare const OUTPUT_BASE = ".soloforge/output";
/** 内部报告子目录 */
export declare const REPORTS_SUBDIR = "_reports";
/** 判断产物状态是否允许从 from 转换到 to
 * @param from - 当前状态
 * @param to - 目标状态
 * @returns 是否允许转换
 */
export declare function canTransition(from: ArtifactStatus, to: ArtifactStatus): boolean;
/** draft → verified 需要 verification */
export declare function transitionRequiresVerification(from: ArtifactStatus, to: ArtifactStatus): boolean;
/** → accepted 需要用户或后续 workflow 确认 */
export declare function transitionRequiresAcceptance(_from: ArtifactStatus, to: ArtifactStatus): boolean;
/** 默认输出路径: .soloforge/output/{task_id}/{NN}-{kind-name}.md */
export declare function getDefaultArtifactPath(kind: ArtifactKind, taskId: string): string;
/** 内部报告路径: .soloforge/output/{task_id}/_reports/{name}.md */
export declare function getReportPath(taskId: string, reportName: string): string;
/** 版本化路径: 同名产物 .v2.md */
export declare function versionPath(path: string, version: number): string;
/** 检查路径是否禁止写入
 * @param path - 待检查的文件路径
 * @returns 禁止结果及原因
 */
export declare function isWriteForbidden(path: string): {
    forbidden: boolean;
    reason?: string;
};
/** 外部 input material 路径禁止写回 */
export declare function isInputMaterialPath(path: string, inputMaterialPaths: string[]): boolean;
/** 创建输出产物实例
 * @param params - 产物创建参数
 * @param params.kind - 产物类型
 * @param params.task_id - 任务 ID
 * @param params.workflow_id - 工作流 ID
 * @param params.created_by - 创建者
 * @param params.path - 输出路径（可选）
 * @param params.format - 产物格式（可选）
 * @param params.source_material_refs - 源材料引用列表（可选）
 * @param params.knowledge_refs - 知识引用列表（可选）
 * @param params.evidence_refs - 证据引用列表（可选）
 * @param params.hash - 产物哈希（可选）
 * @returns 输出产物实例
 */
/**
 * 创建输出产物实例。
 * @param kind - 产物类型
 * @param taskId - 任务 ID
 * @returns 新建的产物实例
 */
export declare function createOutputArtifact(params: {
    kind: ArtifactKind;
    task_id: string;
    workflow_id: string;
    created_by: string;
    path?: string;
    format?: ArtifactFormat;
    source_material_refs?: string[];
    knowledge_refs?: string[];
    evidence_refs?: string[];
    hash?: string;
}): OutputArtifact;
/** 获取指定产物类型的默认配置
 * @param kind - 产物类型
 * @returns 默认配置（默认名称、格式、覆盖策略）
 */
export declare function getArtifactDefaults(kind: ArtifactKind): {
    defaultName: string;
    format: ArtifactFormat;
    overwritePolicy: OverwritePolicy;
};
/** 列出所有支持的产物类型
 * @returns 产物类型数组
 */
export declare function listArtifactKinds(): ArtifactKind[];
export interface ArtifactAcceptanceCheck {
    id: string;
    description: string;
    passed: boolean;
    note?: string;
    severity?: "hard_fail" | "advisory";
}
export interface ArtifactVerificationResult {
    passed: boolean;
    checks: ArtifactAcceptanceCheck[];
    summary: string;
}
/** 获取指定产物类型的验收检查项
 * @param kind - 产物类型
 * @param artifact - 待检查的产物
 * @returns 验收检查项列表
 */
export declare function getAcceptanceChecks(kind: ArtifactKind, artifact: OutputArtifact): ArtifactAcceptanceCheck[];
/** 执行验收检查并生成 ArtifactVerificationResult */
export declare function verifyArtifact(kind: ArtifactKind, artifact: OutputArtifact): ArtifactVerificationResult;
/** 执行产物治理校验
 * @param artifacts - 待校验的产物列表
 * @returns 治理发现列表
 */
export declare function validateArtifactContracts(artifacts: OutputArtifact[]): ArtifactGovernanceFinding[];
/** 验证状态转换合法性 */
export declare function validateTransition(artifact: OutputArtifact, newStatus: ArtifactStatus, hasVerification: boolean, hasAcceptance: boolean): ArtifactGovernanceFinding[];
//# sourceMappingURL=artifact_contract_registry.d.ts.map