/**
 * User Feedback Contract
 *
 * 用户可见反馈体验结构化契约。
 * 将澄清、进度、降级、失败、人工确认、验证摘要、产物就绪、
 * 交付许可、交付结果、阻塞和完成统一建模为用户可见反馈。
 * 确保 SoloForge 不把 partial / manual_required / degraded 误说成 completed。
 */
export type UserFeedbackKind = "clarification" | "progress" | "degradation" | "failure" | "human_required" | "verification_summary" | "artifact_ready" | "delivery_readiness" | "delivery_result" | "blocked" | "completed";
export type FeedbackSeverity = "info" | "warning" | "blocking" | "success";
export type ReferenceType = "artifact" | "evidence" | "report" | "file" | "command";
export interface FeedbackReference {
    type: ReferenceType;
    ref: string;
}
export interface UserFeedbackMessage {
    kind: UserFeedbackKind;
    task_id?: string;
    severity: FeedbackSeverity;
    title: string;
    summary: string;
    verified: string[];
    unverified: string[];
    risks: string[];
    requires_user_action: boolean;
    user_action?: string;
    default_recommendation?: string;
    references: FeedbackReference[];
}
export interface UserFeedbackGovernanceFinding {
    severity: "hard_fail" | "warning";
    rule: string;
    kind?: UserFeedbackKind;
    message: string;
}
export interface ClarificationDetail {
    blocking_question: string;
    default_recommendation: string;
    impact_if_unanswered: string;
    references: FeedbackReference[];
}
export interface DegradationDetail {
    component_id: string;
    degraded_mode: string;
    unavailable_capabilities: string[];
    allowed_actions: string[];
    forbidden_actions: string[];
    recovery_hint: string;
}
export interface FailureDetail {
    failure_class: string;
    evidence_refs: string[];
    retry_allowed: boolean;
    next_action: string;
    side_effects_occurred: string[];
}
export interface HumanRequiredDetail {
    decision_scope: string;
    options: string[];
    recommended_option: string;
    reason: string;
    blocking: boolean;
}
export interface VerificationSummaryDetail {
    verification_status: "passed" | "partial" | "failed";
    passed_checks: string[];
    failed_checks: string[];
    manual_required: string[];
    evidence_refs: string[];
}
export interface ArtifactReadyDetail {
    artifact_id: string;
    artifact_kind: string;
    path: string;
    status: string;
    verification_status: string;
    next_action: string;
}
export interface DeliveryReadinessDetail {
    delivery_allowed: boolean;
    blocking_items: string[];
    unresolved_risks: string[];
    allowed_actions: string[];
    explicit_authorization_required: boolean;
}
export interface DeliveryResultDetail {
    commit_hash?: string;
    push_status: "executed" | "not_executed" | "failed";
    pr_url?: string;
    deploy_status: "executed" | "not_executed" | "failed";
    rollback_ref?: string;
    delivery_evidence_refs: string[];
}
export interface BlockedDetail {
    block_reason: string;
    blocking_contract: string;
    unblock_condition: string;
    recommended_next_action: string;
}
export interface CompletedDetail {
    completed_scope: string[];
    verified: string[];
    unverified: string[];
    risks: string[];
    artifacts: string[];
    next_optional_actions: string[];
}
export type SoloForgeTool = "sf_classify" | "sf_expand" | "sf_verify" | "sf_review" | "sf_learn" | "sf_status" | "sf_plan" | "sf_explore" | "sf_knowledge_audit" | "sf_sync_templates" | "sf_contract_check" | "sf_debug";
/** 获取指定工具允许的反馈类型列表 */
export declare function getAllowedFeedbackKinds(tool: SoloForgeTool): UserFeedbackKind[];
/** 检查指定反馈类型是否允许用于某工具 */
export declare function isFeedbackKindAllowedForTool(tool: SoloForgeTool, kind: UserFeedbackKind): boolean;
/** 列出所有注册的 SoloForge 工具 */
export declare function listTools(): SoloForgeTool[];
/** 获取指定反馈类型的默认严重级别 */
export declare function getDefaultSeverity(kind: UserFeedbackKind): FeedbackSeverity;
/** 获取指定反馈类型是否默认需要用户操作 */
export declare function getDefaultRequiresAction(kind: UserFeedbackKind): boolean;
/** 检查消息中是否包含禁用措辞 */
export declare function checkForbiddenWording(message: UserFeedbackMessage): Array<{
    forbidden: boolean;
    reason: string;
}>;
/** 获取指定反馈类型的中文状态模板 */
export declare function getStatusTemplate(kind: UserFeedbackKind): string;
/** 检测文本是否为技术内容（路径/命令/错误码），不应翻译 */
export declare function isTechnicalContent(text: string): boolean;
/** 创建用户反馈消息 */
export declare function createUserFeedbackMessage(params: {
    kind: UserFeedbackKind;
    severity?: FeedbackSeverity;
    title: string;
    summary: string;
    task_id?: string;
    verified?: string[];
    unverified?: string[];
    risks?: string[];
    user_action?: string;
    default_recommendation?: string;
    references?: FeedbackReference[];
}): UserFeedbackMessage;
/** 验证澄清详情的必填字段 */
export declare function validateClarificationDetail(detail: ClarificationDetail): string[];
/** 验证降级详情的必填字段 */
export declare function validateDegradationDetail(detail: DegradationDetail): string[];
/** 验证失败详情的必填字段 */
export declare function validateFailureDetail(detail: FailureDetail): string[];
/** 验证人工确认详情的必填字段 */
export declare function validateHumanRequiredDetail(detail: HumanRequiredDetail): string[];
/** 验证交付结果详情的状态字段 */
export declare function validateDeliveryResultDetail(detail: DeliveryResultDetail): string[];
/** 验证阻塞详情的必填字段 */
export declare function validateBlockedDetail(detail: BlockedDetail): string[];
/** 验证完成详情的一致性 */
export declare function validateCompletedDetail(detail: CompletedDetail): string[];
/** 格式化交付操作状态为中文描述 */
export declare function formatDeliveryActionStatus(label: string, status: string): string;
/** 构建交付结果的反馈文本 */
export declare function buildDeliveryResultFeedback(detail: DeliveryResultDetail): string;
/** 验证用户反馈契约合规性，返回治理发现列表 */
export declare function validateUserFeedbackContract(messages: UserFeedbackMessage[]): UserFeedbackGovernanceFinding[];
//# sourceMappingURL=user_feedback_contract.d.ts.map