import { z } from "zod"; import type { ActionContract, ProposeActionContractInput } from "../../protocol/areas/action-contract"; import type { CreateGeneratedExecutionGraphInput, GeneratedExecutionGraph, GraphEvidenceIssuerContext } from "../../protocol/areas/generated-execution-graph"; import type { CompileIntentInput, IntentCompilationRecord } from "../../protocol/areas/intent-compilation"; import type { CreateRuntimeExecutionInput, RuntimeExecutionRecord } from "../../protocol/areas/runtime-evidence"; import type { CreateToolCallDraftInput, ToolCallDraft, TransitionToolCallDraftInput } from "../../protocol/areas/tool-call-draft"; import type { Refusal } from "../../protocol/areas/refusal"; import { type RuntimeIngressConfig } from "./families"; import { type RuntimeIngressDispatchBlock } from "./schemas"; export { RuntimeIngressDispatchBlockSchema, RuntimeIngressObservedDispatchSchema } from "./schemas"; export { runtimeIngressDispatchNodeId } from "./node-ids"; export type { RuntimeIngressConfig } from "./families"; export type { ParsedAuthMdProtectedApiCallDispatch, ParsedPackageInstallDispatch, ParsedRuntimeIngressDispatchBlock, ParsedRuntimeIngressObservedDispatch, ParsedX402PaymentDispatch, RuntimeIngressDispatchBlock, RuntimeIngressDispatchBlockRefs, RuntimeIngressObservedDispatch, } from "./schemas"; export declare const RuntimeIngressConfigSchema: z.ZodObject<{ packageInstall: z.ZodOptional; }, z.core.$strict>>; x402Payment: z.ZodOptional>; requiredCredentialCustodyStatus: z.ZodEnum<{ unknown: "unknown"; gateway_held: "gateway_held"; fixture_gateway_held: "fixture_gateway_held"; gateway_resolved_from_vault: "gateway_resolved_from_vault"; provider_gateway_held: "provider_gateway_held"; unsafe_agent_visible: "unsafe_agent_visible"; unsafe_runtime_visible: "unsafe_runtime_visible"; agent_has_raw_credential: "agent_has_raw_credential"; shared_or_unknown: "shared_or_unknown"; no_mutation_credential: "no_mutation_credential"; }>; evidenceExpectationRefs: z.ZodDefault>; }, z.core.$strict>; delegatedAuthorityBinding: z.ZodObject<{ authorityUseName: z.ZodString; delegatedAuthorityRefId: z.ZodString; delegatedAuthorityRefDigest: z.ZodString; requiredGrantStatus: z.ZodDefault>; authorityKind: z.ZodEnum<{ mutation: "mutation"; spend: "spend"; api_call: "api_call"; }>; policyPackRef: z.ZodString; policyPackVersion: z.ZodString; evidenceExpectationRefs: z.ZodDefault>; }, z.core.$strict>; maxAtomicAmountPerCall: z.ZodString; contractExpiresAt: z.ZodString; signingSecret: z.ZodOptional; }, z.core.$strict>>; authMdProtectedApiCall: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>; export declare const RuntimeIngressProposalInputSchema: z.ZodObject<{ tenantId: z.ZodString; organizationId: z.ZodString; config: z.ZodObject<{ packageInstall: z.ZodOptional; }, z.core.$strict>>; x402Payment: z.ZodOptional>; requiredCredentialCustodyStatus: z.ZodEnum<{ unknown: "unknown"; gateway_held: "gateway_held"; fixture_gateway_held: "fixture_gateway_held"; gateway_resolved_from_vault: "gateway_resolved_from_vault"; provider_gateway_held: "provider_gateway_held"; unsafe_agent_visible: "unsafe_agent_visible"; unsafe_runtime_visible: "unsafe_runtime_visible"; agent_has_raw_credential: "agent_has_raw_credential"; shared_or_unknown: "shared_or_unknown"; no_mutation_credential: "no_mutation_credential"; }>; evidenceExpectationRefs: z.ZodDefault>; }, z.core.$strict>; delegatedAuthorityBinding: z.ZodObject<{ authorityUseName: z.ZodString; delegatedAuthorityRefId: z.ZodString; delegatedAuthorityRefDigest: z.ZodString; requiredGrantStatus: z.ZodDefault>; authorityKind: z.ZodEnum<{ mutation: "mutation"; spend: "spend"; api_call: "api_call"; }>; policyPackRef: z.ZodString; policyPackVersion: z.ZodString; evidenceExpectationRefs: z.ZodDefault>; }, z.core.$strict>; maxAtomicAmountPerCall: z.ZodString; contractExpiresAt: z.ZodString; signingSecret: z.ZodOptional; }, z.core.$strict>>; authMdProtectedApiCall: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>; dispatchBlock: z.ZodObject<{ principalIntentRef: z.ZodString; generatedCodeOrSpecRef: z.ZodString; dispatchBoundaryRef: z.ZodString; executionBlockRef: z.ZodDefault>; graphNonce: z.ZodDefault>; truncationStatus: z.ZodDefault>; unobservedRegionRefs: z.ZodDefault>; evidenceRefs: z.ZodDefault>; dispatches: z.ZodArray; registryRef: z.ZodDefault; workspaceRef: z.ZodDefault>; manifestRef: z.ZodDefault>; lockfileRef: z.ZodDefault>; installFlags: z.ZodDefault>; lifecycleScriptPolicy: z.ZodDefault>; resolvedMaterialDigest: z.ZodDefault>; resolvedMaterialEvidenceRefs: z.ZodDefault>; dispatchRef: z.ZodString; generatedCodeOrSpecRef: z.ZodDefault>; dynamicToolConstructionDetected: z.ZodDefault; lateBoundParameterRefs: z.ZodDefault>; retryOfDispatchRef: z.ZodDefault>; branchRef: z.ZodDefault>; loopIteration: z.ZodDefault>; evidenceRefs: z.ZodDefault>; dispatchKind: z.ZodLiteral<"wrapped_package_install">; }, z.core.$strict>, z.ZodObject<{ package: z.ZodString; versionRange: z.ZodString; packageManager: z.ZodDefault; registryRef: z.ZodDefault; workspaceRef: z.ZodDefault>; manifestRef: z.ZodDefault>; lockfileRef: z.ZodDefault>; installFlags: z.ZodDefault>; lifecycleScriptPolicy: z.ZodDefault>; resolvedMaterialDigest: z.ZodDefault>; resolvedMaterialEvidenceRefs: z.ZodDefault>; rawCommandRef: z.ZodString; rawCommandSummary: z.ZodDefault>; dispatchRef: z.ZodString; generatedCodeOrSpecRef: z.ZodDefault>; dynamicToolConstructionDetected: z.ZodDefault; lateBoundParameterRefs: z.ZodDefault>; retryOfDispatchRef: z.ZodDefault>; branchRef: z.ZodDefault>; loopIteration: z.ZodDefault>; evidenceRefs: z.ZodDefault>; dispatchKind: z.ZodLiteral<"raw_sibling_package_install">; }, z.core.$strict>, z.ZodObject<{ package: z.ZodString; versionRange: z.ZodString; packageManager: z.ZodDefault; registryRef: z.ZodDefault; workspaceRef: z.ZodDefault>; manifestRef: z.ZodDefault>; lockfileRef: z.ZodDefault>; installFlags: z.ZodDefault>; lifecycleScriptPolicy: z.ZodDefault>; resolvedMaterialDigest: z.ZodDefault>; resolvedMaterialEvidenceRefs: z.ZodDefault>; ambiguousReasonCodes: z.ZodDefault>; dispatchRef: z.ZodString; generatedCodeOrSpecRef: z.ZodDefault>; dynamicToolConstructionDetected: z.ZodDefault; lateBoundParameterRefs: z.ZodDefault>; retryOfDispatchRef: z.ZodDefault>; branchRef: z.ZodDefault>; loopIteration: z.ZodDefault>; evidenceRefs: z.ZodDefault>; dispatchKind: z.ZodLiteral<"ambiguous_package_install">; }, z.core.$strict>, z.ZodObject<{ endpointUrl: z.ZodString; payee: z.ZodString; network: z.ZodString; token: z.ZodString; atomicAmount: z.ZodString; x402EvidenceProfile: z.ZodDefault>; paymentRequirementsDigest: z.ZodString; paymentRequiredEvidenceRef: z.ZodOptional; facilitatorRef: z.ZodDefault>; intendedHttpMethod: z.ZodDefault>; intendedRequestUrl: z.ZodDefault>; intendedRequestBodyPosture: z.ZodDefault>; intendedRequestBodyDigest: z.ZodDefault>; selectedHeadersDigest: z.ZodDefault>; providerEnvironmentPosture: z.ZodDefault>; providerEnvironmentRef: z.ZodDefault>; x402Version: z.ZodDefault>; x402Scheme: z.ZodDefault>; asset: z.ZodDefault>; payTo: z.ZodDefault>; maxTimeoutSeconds: z.ZodDefault>; selectedPaymentRequirementDigest: z.ZodDefault>; selectedPaymentRequirementIndex: z.ZodDefault>; sdkPackageVersions: z.ZodDefault>; extensionKeys: z.ZodDefault>; dispatchRef: z.ZodString; generatedCodeOrSpecRef: z.ZodDefault>; dynamicToolConstructionDetected: z.ZodDefault; lateBoundParameterRefs: z.ZodDefault>; retryOfDispatchRef: z.ZodDefault>; branchRef: z.ZodDefault>; loopIteration: z.ZodDefault>; evidenceRefs: z.ZodDefault>; dispatchKind: z.ZodLiteral<"wrapped_x402_payment">; }, z.core.$strict>, z.ZodObject<{ endpointUrl: z.ZodString; payee: z.ZodString; network: z.ZodString; token: z.ZodString; atomicAmount: z.ZodString; x402EvidenceProfile: z.ZodDefault>; paymentRequirementsDigest: z.ZodString; paymentRequiredEvidenceRef: z.ZodOptional; facilitatorRef: z.ZodDefault>; intendedHttpMethod: z.ZodDefault>; intendedRequestUrl: z.ZodDefault>; intendedRequestBodyPosture: z.ZodDefault>; intendedRequestBodyDigest: z.ZodDefault>; selectedHeadersDigest: z.ZodDefault>; providerEnvironmentPosture: z.ZodDefault>; providerEnvironmentRef: z.ZodDefault>; x402Version: z.ZodDefault>; x402Scheme: z.ZodDefault>; asset: z.ZodDefault>; payTo: z.ZodDefault>; maxTimeoutSeconds: z.ZodDefault>; selectedPaymentRequirementDigest: z.ZodDefault>; selectedPaymentRequirementIndex: z.ZodDefault>; sdkPackageVersions: z.ZodDefault>; extensionKeys: z.ZodDefault>; rawCommandRef: z.ZodString; rawCommandSummary: z.ZodDefault>; dispatchRef: z.ZodString; generatedCodeOrSpecRef: z.ZodDefault>; dynamicToolConstructionDetected: z.ZodDefault; lateBoundParameterRefs: z.ZodDefault>; retryOfDispatchRef: z.ZodDefault>; branchRef: z.ZodDefault>; loopIteration: z.ZodDefault>; evidenceRefs: z.ZodDefault>; dispatchKind: z.ZodLiteral<"raw_sibling_x402_payment">; }, z.core.$strict>, z.ZodObject<{ endpointUrl: z.ZodString; payee: z.ZodString; network: z.ZodString; token: z.ZodString; atomicAmount: z.ZodString; x402EvidenceProfile: z.ZodDefault>; paymentRequirementsDigest: z.ZodString; paymentRequiredEvidenceRef: z.ZodOptional; facilitatorRef: z.ZodDefault>; intendedHttpMethod: z.ZodDefault>; intendedRequestUrl: z.ZodDefault>; intendedRequestBodyPosture: z.ZodDefault>; intendedRequestBodyDigest: z.ZodDefault>; selectedHeadersDigest: z.ZodDefault>; providerEnvironmentPosture: z.ZodDefault>; providerEnvironmentRef: z.ZodDefault>; x402Version: z.ZodDefault>; x402Scheme: z.ZodDefault>; asset: z.ZodDefault>; payTo: z.ZodDefault>; maxTimeoutSeconds: z.ZodDefault>; selectedPaymentRequirementDigest: z.ZodDefault>; selectedPaymentRequirementIndex: z.ZodDefault>; sdkPackageVersions: z.ZodDefault>; extensionKeys: z.ZodDefault>; ambiguousReasonCodes: z.ZodDefault>; dispatchRef: z.ZodString; generatedCodeOrSpecRef: z.ZodDefault>; dynamicToolConstructionDetected: z.ZodDefault; lateBoundParameterRefs: z.ZodDefault>; retryOfDispatchRef: z.ZodDefault>; branchRef: z.ZodDefault>; loopIteration: z.ZodDefault>; evidenceRefs: z.ZodDefault>; dispatchKind: z.ZodLiteral<"ambiguous_x402_payment">; }, z.core.$strict>, z.ZodObject<{ protectedResource: z.ZodString; protectedResourceMetadataDigest: z.ZodString; authorizationServerMetadataDigest: z.ZodString; authorizationServer: z.ZodString; targetHttpMethod: z.ZodString; endpointUrl: z.ZodString; pathTemplate: z.ZodString; requestBodyDigest: z.ZodDefault>; selectedHeadersDigest: z.ZodString; requiredScopes: z.ZodArray; gatewayCredentialRefId: z.ZodString; gatewayCredentialRefDigest: z.ZodString; providerRegistryRef: z.ZodString; providerRegistryDigest: z.ZodDefault>; requiredCredentialCustodyStatus: z.ZodDefault>; operationId: z.ZodString; idempotencyMaterialRef: z.ZodDefault>; metadataCachePosture: z.ZodDefault>; gatewayCredentialRefPosture: z.ZodDefault>; rawAuthorizationHeaderObserved: z.ZodDefault; dynamicEndpointConstructionObserved: z.ZodDefault; dynamicHostConstructionObserved: z.ZodDefault; retryAuthorityReuseDetected: z.ZodDefault; dispatchRef: z.ZodString; generatedCodeOrSpecRef: z.ZodDefault>; dynamicToolConstructionDetected: z.ZodDefault; lateBoundParameterRefs: z.ZodDefault>; retryOfDispatchRef: z.ZodDefault>; branchRef: z.ZodDefault>; loopIteration: z.ZodDefault>; evidenceRefs: z.ZodDefault>; dispatchKind: z.ZodLiteral<"wrapped_auth_md_protected_api_call">; }, z.core.$strict>, z.ZodObject<{ protectedResource: z.ZodString; protectedResourceMetadataDigest: z.ZodString; authorizationServerMetadataDigest: z.ZodString; authorizationServer: z.ZodString; targetHttpMethod: z.ZodString; endpointUrl: z.ZodString; pathTemplate: z.ZodString; requestBodyDigest: z.ZodDefault>; selectedHeadersDigest: z.ZodString; requiredScopes: z.ZodArray; gatewayCredentialRefId: z.ZodString; gatewayCredentialRefDigest: z.ZodString; providerRegistryRef: z.ZodString; providerRegistryDigest: z.ZodDefault>; requiredCredentialCustodyStatus: z.ZodDefault>; operationId: z.ZodString; idempotencyMaterialRef: z.ZodDefault>; metadataCachePosture: z.ZodDefault>; gatewayCredentialRefPosture: z.ZodDefault>; rawAuthorizationHeaderObserved: z.ZodDefault; dynamicEndpointConstructionObserved: z.ZodDefault; dynamicHostConstructionObserved: z.ZodDefault; retryAuthorityReuseDetected: z.ZodDefault; rawCommandRef: z.ZodString; rawCommandSummary: z.ZodDefault>; dispatchRef: z.ZodString; generatedCodeOrSpecRef: z.ZodDefault>; dynamicToolConstructionDetected: z.ZodDefault; lateBoundParameterRefs: z.ZodDefault>; retryOfDispatchRef: z.ZodDefault>; branchRef: z.ZodDefault>; loopIteration: z.ZodDefault>; evidenceRefs: z.ZodDefault>; dispatchKind: z.ZodLiteral<"raw_sibling_auth_md_protected_api_call">; }, z.core.$strict>, z.ZodObject<{ protectedResource: z.ZodString; protectedResourceMetadataDigest: z.ZodString; authorizationServerMetadataDigest: z.ZodString; authorizationServer: z.ZodString; targetHttpMethod: z.ZodString; endpointUrl: z.ZodString; pathTemplate: z.ZodString; requestBodyDigest: z.ZodDefault>; selectedHeadersDigest: z.ZodString; requiredScopes: z.ZodArray; gatewayCredentialRefId: z.ZodString; gatewayCredentialRefDigest: z.ZodString; providerRegistryRef: z.ZodString; providerRegistryDigest: z.ZodDefault>; requiredCredentialCustodyStatus: z.ZodDefault>; operationId: z.ZodString; idempotencyMaterialRef: z.ZodDefault>; metadataCachePosture: z.ZodDefault>; gatewayCredentialRefPosture: z.ZodDefault>; rawAuthorizationHeaderObserved: z.ZodDefault; dynamicEndpointConstructionObserved: z.ZodDefault; dynamicHostConstructionObserved: z.ZodDefault; retryAuthorityReuseDetected: z.ZodDefault; ambiguousReasonCodes: z.ZodDefault>; dispatchRef: z.ZodString; generatedCodeOrSpecRef: z.ZodDefault>; dynamicToolConstructionDetected: z.ZodDefault; lateBoundParameterRefs: z.ZodDefault>; retryOfDispatchRef: z.ZodDefault>; branchRef: z.ZodDefault>; loopIteration: z.ZodDefault>; evidenceRefs: z.ZodDefault>; dispatchKind: z.ZodLiteral<"ambiguous_auth_md_protected_api_call">; }, z.core.$strict>], "dispatchKind">>; }, z.core.$strict>; }, z.core.$strict>; export type RuntimeIngressProposalInput = z.input; export type RuntimeIngressResponsePosture = { schemaVersion: "handshake.runtime-ingress.outcome.v1"; authorityCreated: false; authorityCertificateMinted: false; credentialMaterialIncluded: false; gatewayCheckPerformed: false; greenlightCreated: false; mutationAttempted: false; mutationCommandIncluded: false; rawInternalRecordIncluded: false; receiptExportCreated: false; reasonCodes: string[]; nextAction: "read_evidence" | "recraft_request" | "stop"; retryability: "not_retryable" | "retryable_after_recraft"; redactionProfileRef: "runtime-ingress:v0.1-redacted"; evidenceRefs: string[]; runtimeExecutionRef: string | null; generatedExecutionGraphRef: string | null; graphCoverageStatus: GeneratedExecutionGraph["coverageStatus"]; toolCallDraftRefs: string[]; intentCompilationRefs: string[]; actionContractRefs: string[]; refusalRefs: string[]; dispatchCount: number; }; export type RuntimeIngressProtocol = { compileIntent(input: CompileIntentInput): Promise; proposeActionContract(input: ProposeActionContractInput): Promise; createRuntimeExecution(input: CreateRuntimeExecutionInput): Promise; createGeneratedExecutionGraph(input: CreateGeneratedExecutionGraphInput, issuerContext: GraphEvidenceIssuerContext): Promise; createToolCallDraft(input: CreateToolCallDraftInput): Promise; transitionToolCallDraft(input: TransitionToolCallDraftInput): Promise; commitIngressRefusal(input: { tenantId: string; organizationId: string; createdAt: string; phase: "compilation"; refusedObjectRef: string; reasonCode: string; reason: string; evidenceRefs?: string[]; refusedAt: string; }): Promise; }; export type RuntimeIngressActionProposal = { outcome: "action_contract_proposed"; dispatchRef: string; sequenceNumber: number; toolCallDraft: ToolCallDraft; intentCompilation: IntentCompilationRecord; actionContract: ActionContract; refusalReasonCodes: []; } | { outcome: "intent_compilation_refused"; dispatchRef: string; sequenceNumber: number; toolCallDraft: ToolCallDraft; intentCompilation: IntentCompilationRecord; actionContract: null; refusalReasonCodes: string[]; refusalRef: string | null; }; export type RuntimeIngressResult = { outcome: "action_contracts_proposed" | "one_or_more_dispatches_refused"; responsePosture: RuntimeIngressResponsePosture; runtimeExecution: RuntimeExecutionRecord | null; generatedExecutionGraph: GeneratedExecutionGraph | null; proposals: RuntimeIngressActionProposal[]; }; export declare function proposeRuntimeIngressActionContracts(protocol: RuntimeIngressProtocol, config: RuntimeIngressConfig, blockValue: RuntimeIngressDispatchBlock): Promise;