import { z } from "zod"; import type { RecoveryRecommendation } from "../protocol/public/schemas"; import type { SurfaceOutcome } from "./outcome"; export declare const PROTECTED_ACTION_RECOVERY_GUIDANCE_VERSION: "handshake.surface.protected-action-recovery-guidance.v1"; export declare const ProtectedActionRecoveryGuidanceSourceKindSchema: z.ZodEnum<{ protocol_recovery_projection: "protocol_recovery_projection"; pre_contract_surface_guidance: "pre_contract_surface_guidance"; }>; export declare const ProtectedActionRecoveryGuidanceOutcomeSchema: z.ZodEnum<{ read_evidence: "read_evidence"; stop: "stop"; draft_available: "draft_available"; reload_required: "reload_required"; recraft_required: "recraft_required"; abandon_required: "abandon_required"; }>; export declare const ProtectedActionRecoveryGuidanceFindingCategorySchema: z.ZodEnum<{ idempotency_or_replay_conflict: "idempotency_or_replay_conflict"; proof_gap_only_evidence: "proof_gap_only_evidence"; raw_sibling_bypass_detected: "raw_sibling_bypass_detected"; raw_sibling_posture_named_not_controlled: "raw_sibling_posture_named_not_controlled"; x402_credential_custody_unsafe: "x402_credential_custody_unsafe"; x402_gateway_posture_unknown: "x402_gateway_posture_unknown"; x402_provider_environment_untrusted: "x402_provider_environment_untrusted"; x402_metadata_stale: "x402_metadata_stale"; x402_policy_or_readiness_stale: "x402_policy_or_readiness_stale"; x402_install_not_ready: "x402_install_not_ready"; x402_gateway_offline: "x402_gateway_offline"; x402_amount_over_bound: "x402_amount_over_bound"; x402_request_body_unsupported: "x402_request_body_unsupported"; x402_custody_proof_unverified: "x402_custody_proof_unverified"; x402_selected_requirement_mismatch: "x402_selected_requirement_mismatch"; runtime_dynamic_tool_construction: "runtime_dynamic_tool_construction"; runtime_late_bound_parameters: "runtime_late_bound_parameters"; runtime_graph_coverage_gap: "runtime_graph_coverage_gap"; isolation_or_quarantine_active: "isolation_or_quarantine_active"; draft_stale_or_intent_changed: "draft_stale_or_intent_changed"; draft_superseded_by_stricter_draft: "draft_superseded_by_stricter_draft"; draft_guidance_stale: "draft_guidance_stale"; surface_next_action_projection: "surface_next_action_projection"; protocol_recovery_recommendation_present: "protocol_recovery_recommendation_present"; }>; export declare const ProtectedActionRecoveryAbandonQualityClassSchema: z.ZodEnum<{ good_abandon: "good_abandon"; avoidable_abandon: "avoidable_abandon"; ambiguous_abandon: "ambiguous_abandon"; stale_abandon: "stale_abandon"; operator_abandon: "operator_abandon"; }>; export declare const ProtectedActionRecoveryFindingSchema: z.ZodObject<{ category: z.ZodEnum<{ idempotency_or_replay_conflict: "idempotency_or_replay_conflict"; proof_gap_only_evidence: "proof_gap_only_evidence"; raw_sibling_bypass_detected: "raw_sibling_bypass_detected"; raw_sibling_posture_named_not_controlled: "raw_sibling_posture_named_not_controlled"; x402_credential_custody_unsafe: "x402_credential_custody_unsafe"; x402_gateway_posture_unknown: "x402_gateway_posture_unknown"; x402_provider_environment_untrusted: "x402_provider_environment_untrusted"; x402_metadata_stale: "x402_metadata_stale"; x402_policy_or_readiness_stale: "x402_policy_or_readiness_stale"; x402_install_not_ready: "x402_install_not_ready"; x402_gateway_offline: "x402_gateway_offline"; x402_amount_over_bound: "x402_amount_over_bound"; x402_request_body_unsupported: "x402_request_body_unsupported"; x402_custody_proof_unverified: "x402_custody_proof_unverified"; x402_selected_requirement_mismatch: "x402_selected_requirement_mismatch"; runtime_dynamic_tool_construction: "runtime_dynamic_tool_construction"; runtime_late_bound_parameters: "runtime_late_bound_parameters"; runtime_graph_coverage_gap: "runtime_graph_coverage_gap"; isolation_or_quarantine_active: "isolation_or_quarantine_active"; draft_stale_or_intent_changed: "draft_stale_or_intent_changed"; draft_superseded_by_stricter_draft: "draft_superseded_by_stricter_draft"; draft_guidance_stale: "draft_guidance_stale"; surface_next_action_projection: "surface_next_action_projection"; protocol_recovery_recommendation_present: "protocol_recovery_recommendation_present"; }>; reasonCodes: z.ZodArray; sourceEvidenceRefs: z.ZodArray; affectedFields: z.ZodArray; guidanceOutcome: z.ZodEnum<{ read_evidence: "read_evidence"; stop: "stop"; draft_available: "draft_available"; reload_required: "reload_required"; recraft_required: "recraft_required"; abandon_required: "abandon_required"; }>; draftEligible: z.ZodBoolean; }, z.core.$strict>; export declare const ProtectedActionRecoveryCandidateDraftSchema: z.ZodObject<{ draftId: z.ZodString; draftDigest: z.ZodString; sourceRefs: z.ZodArray; digestInputsToPreserve: z.ZodArray; missingInputs: z.ZodArray; requiredFreshProposalPath: z.ZodString; supersedesDraftRefs: z.ZodArray; recoveryRecommendationId: z.ZodNullable; redactionProfile: z.ZodString; }, z.core.$strict>; export declare const ProtectedActionRecoveryAgentHandoffSchema: z.ZodObject<{ outcome: z.ZodEnum<{ read_evidence: "read_evidence"; stop: "stop"; draft_available: "draft_available"; reload_required: "reload_required"; recraft_required: "recraft_required"; abandon_required: "abandon_required"; }>; readback: z.ZodString; requiredRefs: z.ZodArray; missingInputs: z.ZodArray; allowedNextMechanism: z.ZodEnum<{ read_evidence: "read_evidence"; recraft_request: "recraft_request"; submit_fresh_proposal: "submit_fresh_proposal"; reload_evidence: "reload_evidence"; abandon_current_material: "abandon_current_material"; stop_and_escalate: "stop_and_escalate"; }>; disallowedActions: z.ZodArray; stopReasons: z.ZodArray; nonClaims: z.ZodArray; }, z.core.$strict>; export declare const ProtectedActionRecoverySourceErrorSchema: z.ZodObject<{ code: z.ZodString; failureClass: z.ZodString; failurePhase: z.ZodNullable; requiresNewContract: z.ZodBoolean; status: z.ZodNumber; }, z.core.$strict>; export declare const ProtectedActionRecoveryGuidanceSchema: z.ZodObject<{ schemaVersion: z.ZodLiteral<"handshake.surface.protected-action-recovery-guidance.v1">; guidanceId: z.ZodString; sourceKind: z.ZodEnum<{ protocol_recovery_projection: "protocol_recovery_projection"; pre_contract_surface_guidance: "pre_contract_surface_guidance"; }>; protectedSurfaceKind: z.ZodString; sourceEvidenceRefs: z.ZodArray; sourceReceiptRef: z.ZodNullable; sourceProofGapRef: z.ZodNullable; sourceRefusalRef: z.ZodNullable; recoveryRecommendationId: z.ZodNullable; recommendationDigest: z.ZodNullable; sourceTerminalEvidenceRefs: z.ZodArray; reasonCodes: z.ZodArray; findings: z.ZodArray; reasonCodes: z.ZodArray; sourceEvidenceRefs: z.ZodArray; affectedFields: z.ZodArray; guidanceOutcome: z.ZodEnum<{ read_evidence: "read_evidence"; stop: "stop"; draft_available: "draft_available"; reload_required: "reload_required"; recraft_required: "recraft_required"; abandon_required: "abandon_required"; }>; draftEligible: z.ZodBoolean; }, z.core.$strict>>; outcome: z.ZodEnum<{ read_evidence: "read_evidence"; stop: "stop"; draft_available: "draft_available"; reload_required: "reload_required"; recraft_required: "recraft_required"; abandon_required: "abandon_required"; }>; abandonQuality: z.ZodNullable>; unsafeSalvageAttemptPrevented: z.ZodBoolean; sourceError: z.ZodNullable; requiresNewContract: z.ZodBoolean; status: z.ZodNumber; }, z.core.$strict>>; mustCreateNewActionContract: z.ZodLiteral; mayReuseGreenlight: z.ZodLiteral; authorityCreated: z.ZodLiteral; authorityCertificateMinted: z.ZodLiteral; credentialMaterialIncluded: z.ZodLiteral; gatewayCheckPerformed: z.ZodLiteral; greenlightCreated: z.ZodLiteral; mutationAttempted: z.ZodLiteral; mutationCommandIncluded: z.ZodLiteral; rawInternalRecordIncluded: z.ZodLiteral; receiptExportCreated: z.ZodLiteral; policyDecisionRef: z.ZodNull; greenlightRef: z.ZodNull; gatewayCheckRef: z.ZodNull; receiptRef: z.ZodNull; authorityCertificateRef: z.ZodNull; mutationAttemptRef: z.ZodNull; agentHandoff: z.ZodObject<{ outcome: z.ZodEnum<{ read_evidence: "read_evidence"; stop: "stop"; draft_available: "draft_available"; reload_required: "reload_required"; recraft_required: "recraft_required"; abandon_required: "abandon_required"; }>; readback: z.ZodString; requiredRefs: z.ZodArray; missingInputs: z.ZodArray; allowedNextMechanism: z.ZodEnum<{ read_evidence: "read_evidence"; recraft_request: "recraft_request"; submit_fresh_proposal: "submit_fresh_proposal"; reload_evidence: "reload_evidence"; abandon_current_material: "abandon_current_material"; stop_and_escalate: "stop_and_escalate"; }>; disallowedActions: z.ZodArray; stopReasons: z.ZodArray; nonClaims: z.ZodArray; }, z.core.$strict>; candidateDraft: z.ZodOptional; digestInputsToPreserve: z.ZodArray; missingInputs: z.ZodArray; requiredFreshProposalPath: z.ZodString; supersedesDraftRefs: z.ZodArray; recoveryRecommendationId: z.ZodNullable; redactionProfile: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>; export type ProtectedActionRecoveryGuidance = z.infer; export type ProtectedActionRecoveryFinding = z.infer; export type ProtectedActionRecoveryCandidateDraft = z.infer; export type ProtectedActionRecoveryGuidanceOutcome = z.infer; export type ProtectedActionRecoveryGuidanceFindingCategory = z.infer; export type ProtectedActionRecoveryAbandonQualityClass = z.infer; export type ProtectedActionRecoveryGuidanceSourceKind = z.infer; export type ProtectedActionRecoveryGuidancePostureInput = { refreshSufficient?: boolean; exactRequiredFieldsKnown?: boolean; proofGapOnly?: boolean; rawSiblingPostureNamedNotControlled?: boolean; rawSiblingBypassDetected?: boolean; unsafeCredentialCustody?: boolean; replayOrIdempotencyConflict?: boolean; activeIsolationOrQuarantine?: boolean; ambiguousRuntimeGraph?: boolean; unknownGatewayPosture?: boolean; liveOrUnknownProviderPosture?: boolean; unsafeSalvageAttempted?: boolean; }; export type ProtectedActionRecoveryGuidanceClassificationInput = { guidanceId: string; sourceKind?: ProtectedActionRecoveryGuidanceSourceKind; protectedSurfaceKind: string; sourceEvidenceRefs?: readonly string[]; sourceReceiptRef?: string | null; sourceProofGapRef?: string | null; sourceRefusalRef?: string | null; recoveryRecommendationId?: string | null; recommendationDigest?: string | null; sourceTerminalEvidenceRefs?: readonly string[]; reasonCodes?: readonly string[]; affectedFields?: readonly string[]; posture?: ProtectedActionRecoveryGuidancePostureInput; abandonQuality?: ProtectedActionRecoveryAbandonQualityClass | null; sourceError?: z.infer | null; candidateDraft?: ProtectedActionRecoveryCandidateDraft; readback?: string; missingInputs?: readonly string[]; }; export type ProtectedActionRecoveryGuidanceInput = Omit; export declare function parseProtectedActionRecoveryGuidance(value: unknown): ProtectedActionRecoveryGuidance; export declare function buildProtectedActionRecoveryGuidance(input: ProtectedActionRecoveryGuidanceInput): ProtectedActionRecoveryGuidance; export declare function classifyProtectedActionRecoveryGuidance(input: ProtectedActionRecoveryGuidanceClassificationInput): ProtectedActionRecoveryGuidance; export declare function recoveryGuidanceFromRecoveryRecommendation(recommendation: RecoveryRecommendation): ProtectedActionRecoveryGuidance; export declare function recoveryGuidanceFromSurfaceOutcome(surfaceOutcome: SurfaceOutcome): ProtectedActionRecoveryGuidance; export type HandshakeErrorRecoveryGuidanceSource = { code: string; failureClass: string; failurePhase: string | null; status: number; message?: string; proofRef?: string | null; refusalRef?: string | null; requiresNewContract?: boolean; }; export declare function recoveryGuidanceFromHandshakeError(error: unknown): ProtectedActionRecoveryGuidance | null;