import { z } from "zod"; import { type FailureClass } from "../protocol/foundation/failure-class"; import { ActionContractProposedOutcomeSchema, type SurfaceOutcome, type SurfaceOutcomeBaseInput } from "../surfaces/outcome"; export declare const MCP_SCHEMA_VERSION: "handshake.surface-outcome.v0.1"; export declare const McpStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ schemaVersion: z.ZodLiteral<"handshake.surface-outcome.v0.1">; 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; greenlightRef: z.ZodNull; gatewayCheckRef: z.ZodNull; mutationAttemptRef: z.ZodNull; proofRef: z.ZodNullable; refusalRef: z.ZodNullable; reasonCodes: z.ZodArray; nextAction: z.ZodEnum<{ read_evidence: "read_evidence"; request_review: "request_review"; recraft_request: "recraft_request"; stop: "stop"; reload_metadata: "reload_metadata"; fix_install: "fix_install"; wait_for_gateway: "wait_for_gateway"; }>; retryability: z.ZodEnum<{ not_retryable: "not_retryable"; retryable_after_recraft: "retryable_after_recraft"; retryable_after_reload: "retryable_after_reload"; }>; commitState: z.ZodEnum<{ ambiguous: "ambiguous"; not_started: "not_started"; protocol_recorded: "protocol_recorded"; }>; metadataRef: z.ZodNullable; evidenceRefs: z.ZodArray; challengeRef: z.ZodNullable; correlationRef: z.ZodNullable; idempotencyKey: z.ZodNullable; outcome: z.ZodLiteral<"action_contract_proposed">; phase: z.ZodLiteral<"proposal">; actionContractId: z.ZodString; contractDigest: z.ZodString; paramsDigest: z.ZodNullable; runtimeExecutionId: z.ZodString; toolCallDraftId: z.ZodString; intentCompilationId: z.ZodString; generatedExecutionGraphId: z.ZodNull; generatedExecutionGraphPosture: z.ZodLiteral<"not_exposed_by_role_scoped_runtime_surface">; }, z.core.$strict>, z.ZodObject<{ schemaVersion: z.ZodLiteral<"handshake.surface-outcome.v0.1">; phase: z.ZodEnum<{ metadata: "metadata"; freshness: "freshness"; evidence: "evidence"; readiness: "readiness"; bypass: "bypass"; replay: "replay"; proposal: "proposal"; tool_execution: "tool_execution"; }>; 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; greenlightRef: z.ZodNull; gatewayCheckRef: z.ZodNull; mutationAttemptRef: z.ZodNull; proofRef: z.ZodNullable; refusalRef: z.ZodNullable; reasonCodes: z.ZodArray; nextAction: z.ZodEnum<{ read_evidence: "read_evidence"; request_review: "request_review"; recraft_request: "recraft_request"; stop: "stop"; reload_metadata: "reload_metadata"; fix_install: "fix_install"; wait_for_gateway: "wait_for_gateway"; }>; retryability: z.ZodEnum<{ not_retryable: "not_retryable"; retryable_after_recraft: "retryable_after_recraft"; retryable_after_reload: "retryable_after_reload"; }>; commitState: z.ZodEnum<{ ambiguous: "ambiguous"; not_started: "not_started"; protocol_recorded: "protocol_recorded"; }>; metadataRef: z.ZodNullable; evidenceRefs: z.ZodArray; challengeRef: z.ZodNullable; correlationRef: z.ZodNullable; idempotencyKey: z.ZodNullable; outcome: z.ZodEnum<{ review_required: "review_required"; proof_gap: "proof_gap"; replay_refused: "replay_refused"; refused: "refused"; raw_sibling_bypass_detected: "raw_sibling_bypass_detected"; install_not_ready: "install_not_ready"; gateway_offline: "gateway_offline"; metadata_stale: "metadata_stale"; tools_list_changed: "tools_list_changed"; tool_execution_error: "tool_execution_error"; }>; }, z.core.$strict>], "outcome">; export declare const McpToolResultSchema: z.ZodObject<{ structuredContent: z.ZodDiscriminatedUnion<[z.ZodObject<{ schemaVersion: z.ZodLiteral<"handshake.surface-outcome.v0.1">; 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; greenlightRef: z.ZodNull; gatewayCheckRef: z.ZodNull; mutationAttemptRef: z.ZodNull; proofRef: z.ZodNullable; refusalRef: z.ZodNullable; reasonCodes: z.ZodArray; nextAction: z.ZodEnum<{ read_evidence: "read_evidence"; request_review: "request_review"; recraft_request: "recraft_request"; stop: "stop"; reload_metadata: "reload_metadata"; fix_install: "fix_install"; wait_for_gateway: "wait_for_gateway"; }>; retryability: z.ZodEnum<{ not_retryable: "not_retryable"; retryable_after_recraft: "retryable_after_recraft"; retryable_after_reload: "retryable_after_reload"; }>; commitState: z.ZodEnum<{ ambiguous: "ambiguous"; not_started: "not_started"; protocol_recorded: "protocol_recorded"; }>; metadataRef: z.ZodNullable; evidenceRefs: z.ZodArray; challengeRef: z.ZodNullable; correlationRef: z.ZodNullable; idempotencyKey: z.ZodNullable; outcome: z.ZodLiteral<"action_contract_proposed">; phase: z.ZodLiteral<"proposal">; actionContractId: z.ZodString; contractDigest: z.ZodString; paramsDigest: z.ZodNullable; runtimeExecutionId: z.ZodString; toolCallDraftId: z.ZodString; intentCompilationId: z.ZodString; generatedExecutionGraphId: z.ZodNull; generatedExecutionGraphPosture: z.ZodLiteral<"not_exposed_by_role_scoped_runtime_surface">; }, z.core.$strict>, z.ZodObject<{ schemaVersion: z.ZodLiteral<"handshake.surface-outcome.v0.1">; phase: z.ZodEnum<{ metadata: "metadata"; freshness: "freshness"; evidence: "evidence"; readiness: "readiness"; bypass: "bypass"; replay: "replay"; proposal: "proposal"; tool_execution: "tool_execution"; }>; 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; greenlightRef: z.ZodNull; gatewayCheckRef: z.ZodNull; mutationAttemptRef: z.ZodNull; proofRef: z.ZodNullable; refusalRef: z.ZodNullable; reasonCodes: z.ZodArray; nextAction: z.ZodEnum<{ read_evidence: "read_evidence"; request_review: "request_review"; recraft_request: "recraft_request"; stop: "stop"; reload_metadata: "reload_metadata"; fix_install: "fix_install"; wait_for_gateway: "wait_for_gateway"; }>; retryability: z.ZodEnum<{ not_retryable: "not_retryable"; retryable_after_recraft: "retryable_after_recraft"; retryable_after_reload: "retryable_after_reload"; }>; commitState: z.ZodEnum<{ ambiguous: "ambiguous"; not_started: "not_started"; protocol_recorded: "protocol_recorded"; }>; metadataRef: z.ZodNullable; evidenceRefs: z.ZodArray; challengeRef: z.ZodNullable; correlationRef: z.ZodNullable; idempotencyKey: z.ZodNullable; outcome: z.ZodEnum<{ review_required: "review_required"; proof_gap: "proof_gap"; replay_refused: "replay_refused"; refused: "refused"; raw_sibling_bypass_detected: "raw_sibling_bypass_detected"; install_not_ready: "install_not_ready"; gateway_offline: "gateway_offline"; metadata_stale: "metadata_stale"; tools_list_changed: "tools_list_changed"; tool_execution_error: "tool_execution_error"; }>; }, z.core.$strict>], "outcome">; failureClass: z.ZodOptional>>; content: z.ZodArray; text: z.ZodString; }, z.core.$strict>>; isError: z.ZodDefault; }, z.core.$strict>; export type McpToolResult = z.infer; export declare function mcpToolResult(structuredContent: SurfaceOutcome, isError?: boolean, failureClass?: FailureClass | null): McpToolResult; export declare function mcpNonContractOutcome(input: SurfaceOutcomeBaseInput, isError?: boolean): { structuredContent: { schemaVersion: "handshake.surface-outcome.v0.1"; authorityCreated: false; authorityCertificateMinted: false; credentialMaterialIncluded: false; gatewayCheckPerformed: false; greenlightCreated: false; mutationAttempted: false; mutationCommandIncluded: false; rawInternalRecordIncluded: false; receiptExportCreated: false; greenlightRef: null; gatewayCheckRef: null; mutationAttemptRef: null; proofRef: string | null; refusalRef: string | null; reasonCodes: string[]; nextAction: "read_evidence" | "request_review" | "recraft_request" | "stop" | "reload_metadata" | "fix_install" | "wait_for_gateway"; retryability: "not_retryable" | "retryable_after_recraft" | "retryable_after_reload"; commitState: "ambiguous" | "not_started" | "protocol_recorded"; metadataRef: string | null; evidenceRefs: string[]; challengeRef: string | null; correlationRef: string | null; idempotencyKey: string | null; outcome: "action_contract_proposed"; phase: "proposal"; actionContractId: string; contractDigest: string; paramsDigest: string | null; runtimeExecutionId: string; toolCallDraftId: string; intentCompilationId: string; generatedExecutionGraphId: null; generatedExecutionGraphPosture: "not_exposed_by_role_scoped_runtime_surface"; } | { schemaVersion: "handshake.surface-outcome.v0.1"; phase: "metadata" | "freshness" | "evidence" | "readiness" | "bypass" | "replay" | "proposal" | "tool_execution"; authorityCreated: false; authorityCertificateMinted: false; credentialMaterialIncluded: false; gatewayCheckPerformed: false; greenlightCreated: false; mutationAttempted: false; mutationCommandIncluded: false; rawInternalRecordIncluded: false; receiptExportCreated: false; greenlightRef: null; gatewayCheckRef: null; mutationAttemptRef: null; proofRef: string | null; refusalRef: string | null; reasonCodes: string[]; nextAction: "read_evidence" | "request_review" | "recraft_request" | "stop" | "reload_metadata" | "fix_install" | "wait_for_gateway"; retryability: "not_retryable" | "retryable_after_recraft" | "retryable_after_reload"; commitState: "ambiguous" | "not_started" | "protocol_recorded"; metadataRef: string | null; evidenceRefs: string[]; challengeRef: string | null; correlationRef: string | null; idempotencyKey: string | null; outcome: "review_required" | "proof_gap" | "replay_refused" | "refused" | "raw_sibling_bypass_detected" | "install_not_ready" | "gateway_offline" | "metadata_stale" | "tools_list_changed" | "tool_execution_error"; }; content: { type: "text"; text: string; }[]; isError: boolean; failureClass?: "proof_gap" | "replay_refusal" | "auth" | "hosted_admission" | "protected_action_refusal" | "stale_admission" | "internal" | null | undefined; }; export declare function mcpActionContractProposedOutcome(input: Omit, "schemaVersion">): SurfaceOutcome;