import { z } from 'zod'; import type { DappDeploymentLockV3 } from './deploymentLockV3.ts'; import { type DappInfrastructureAdapterDescriptorV1 } from './infrastructureDescriptor.ts'; import { type DappTargetPlanIssue } from './targetPlanEnvelope.ts'; /** * Target Composition V3 (plan Section 4.5, MI1D). The composition binds the * immutable infrastructure IDs of one Lock V3 to the target plans that * consume its slices, and binds every thing, non-external resource, host * partition, managed capability, and target object exactly once. Neither an * alias, a connection profile, a credential grant, nor a scope commitment * enters it. The unsuffixed and V2 compositions remain unchanged. */ export declare const DappTargetCompositionInfrastructureV3Zod: z.ZodObject<{ infrastructureId: z.ZodString; kind: z.ZodEnum<{ vercel: "vercel"; cloudflare: "cloudflare"; kubernetes: "kubernetes"; proxmox: "proxmox"; }>; adapterId: z.ZodString; adapterVersion: z.ZodString; adapterDescriptorHash: z.ZodString; infrastructureDescriptorHash: z.ZodString; infrastructurePolicyHash: z.ZodString; targetPlanId: z.ZodString; }, z.core.$strict>; export type DappTargetCompositionInfrastructureV3 = z.infer; export declare const DappThingInfrastructureBindingV3Zod: z.ZodObject<{ thingId: z.ZodString; infrastructureId: z.ZodString; }, z.core.$strict>; export declare const DappResourceOwnerBindingV3Zod: z.ZodObject<{ resourceId: z.ZodString; owningInfrastructureId: z.ZodString; }, z.core.$strict>; export declare const DappHostInfrastructureBindingV3Zod: z.ZodObject<{ hostPartitionId: z.ZodString; infrastructureId: z.ZodString; }, z.core.$strict>; /** One producer export matched to one consumer import, bound to both target plans. */ export declare const DappManagedCapabilityBindingV3Zod: z.ZodObject<{ exportIdentityHash: z.ZodString; exportContractId: z.ZodString; exportContractVersion: z.ZodNumber; exportContractHash: z.ZodString; exportNormalizationId: z.ZodString; resourceId: z.ZodString; owningInfrastructureId: z.ZodString; consumerInfrastructureId: z.ZodString; producerTargetPlanId: z.ZodString; consumerTargetPlanId: z.ZodString; }, z.core.$strict>; export type DappManagedCapabilityBindingV3 = z.infer; export declare function compareDappManagedCapabilityBindingsV3(left: DappManagedCapabilityBindingV3, right: DappManagedCapabilityBindingV3): number; export declare const DappTargetCompositionV3PreimageZod: z.ZodObject<{ schema: z.ZodLiteral<"network.xyo.dapp.target.composition" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<3>; hashAlgorithm: z.ZodLiteral<"jcs-sha256-v1">; lockId: z.ZodString; infrastructure: z.ZodArray; adapterId: z.ZodString; adapterVersion: z.ZodString; adapterDescriptorHash: z.ZodString; infrastructureDescriptorHash: z.ZodString; infrastructurePolicyHash: z.ZodString; targetPlanId: z.ZodString; }, z.core.$strict>>; thingBindings: z.ZodArray>; resourceBindings: z.ZodArray>; hostBindings: z.ZodArray>; managedCapabilityBindings: z.ZodArray>; targetObjects: z.ZodArray; thingId: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"resource">; resourceId: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"host-partition">; hostPartitionId: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"deployment-role">; role: z.ZodString; partitionId: z.ZodString; }, z.core.$strict>], "kind">; thingIds: z.ZodArray; resourceIds: z.ZodArray; hostPartitionIds: z.ZodArray; }, z.core.$strict>>; }, z.core.$strict>; export type DappTargetCompositionV3Preimage = z.infer; export declare const DappTargetCompositionV3Zod: z.ZodObject<{ schema: z.ZodLiteral<"network.xyo.dapp.target.composition" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<3>; hashAlgorithm: z.ZodLiteral<"jcs-sha256-v1">; lockId: z.ZodString; infrastructure: z.ZodArray; adapterId: z.ZodString; adapterVersion: z.ZodString; adapterDescriptorHash: z.ZodString; infrastructureDescriptorHash: z.ZodString; infrastructurePolicyHash: z.ZodString; targetPlanId: z.ZodString; }, z.core.$strict>>; thingBindings: z.ZodArray>; resourceBindings: z.ZodArray>; hostBindings: z.ZodArray>; managedCapabilityBindings: z.ZodArray>; targetObjects: z.ZodArray; thingId: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"resource">; resourceId: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"host-partition">; hostPartitionId: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"deployment-role">; role: z.ZodString; partitionId: z.ZodString; }, z.core.$strict>], "kind">; thingIds: z.ZodArray; resourceIds: z.ZodArray; hostPartitionIds: z.ZodArray; }, z.core.$strict>>; compositionId: z.ZodString; }, z.core.$strict>; export type DappTargetCompositionV3 = z.infer; /** D-002 kind `target-composition` version 3: `xyo-dapp-kit:target-composition:v3\n`. */ export declare function hashDappTargetCompositionV3(preimage: unknown): string; export declare const DappTargetCompositionV3IssueCodes: readonly ["target-composition.invalid", "target-composition.plan-invalid", "target-composition.plan-mismatch", "target-composition.lock-mismatch", "target-composition.capability-mismatch", "target-composition.adapter-unpinned"]; export type DappTargetCompositionV3IssueCode = (typeof DappTargetCompositionV3IssueCodes)[number]; export interface DappTargetCompositionV3Issue { code: DappTargetCompositionV3IssueCode; message: string; path: (number | string)[]; } export type DappTargetCompositionV3Result = { issues: DappTargetCompositionV3Issue[]; success: false; } | { success: true; value: DappTargetCompositionV3; }; /** The common envelope of any provider target plan plus its identity; provider-specific fields are dropped. */ declare const TargetPlanProjectionZod: z.ZodObject<{ targetPlanId: z.ZodString; lockId: z.ZodString; deploymentIntentId: z.ZodString; projectId: z.ZodString; deploymentName: z.ZodString; deploymentTargetNamespaceId: z.ZodString; infrastructure: z.ZodObject<{ infrastructureId: z.ZodString; kind: z.ZodEnum<{ vercel: "vercel"; cloudflare: "cloudflare"; kubernetes: "kubernetes"; proxmox: "proxmox"; }>; adapterId: z.ZodString; adapterVersion: z.ZodString; adapterDescriptorHash: z.ZodString; infrastructureDescriptorHash: z.ZodString; infrastructurePolicyHash: z.ZodString; expectedScopeCommitment: z.ZodString; }, z.core.$strict>; slice: z.ZodObject<{ thingIds: z.ZodArray; resourceIds: z.ZodArray; hostPartitionIds: z.ZodArray; externalResourceIds: z.ZodArray; }, z.core.$strict>; exportedManagedCapabilities: z.ZodArray; }, z.core.$strict>>; importedManagedCapabilities: z.ZodArray; consumerHostPartitionIds: z.ZodArray; }, z.core.$strict>>; targetArtifacts: z.ZodArray>; credentialRequirements: z.ZodArray; actionClass: z.ZodEnum<{ create: "create"; replace: "replace"; delete: "delete"; inspect: "inspect"; "narrow-update": "narrow-update"; "read-back": "read-back"; publish: "publish"; adopt: "adopt"; power: "power"; }>; }, z.core.$strict>>; targetObjects: z.ZodArray; thingId: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"resource">; resourceId: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"host-partition">; hostPartitionId: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"deployment-role">; role: z.ZodString; partitionId: z.ZodString; }, z.core.$strict>], "kind">; thingIds: z.ZodArray; resourceIds: z.ZodArray; hostPartitionIds: z.ZodArray; }, z.core.$strict>>; providerPrerequisites: z.ZodArray; }, z.core.$strict>>; requestTemplates: z.ZodArray; schemaVersion: z.ZodLiteral<1>; hashAlgorithm: z.ZodLiteral<"jcs-sha256-v1">; adapterDescriptorHash: z.ZodString; actionKind: z.ZodString; method: z.ZodEnum<{ GET: "GET"; HEAD: "HEAD"; POST: "POST"; PUT: "PUT"; PATCH: "PATCH"; DELETE: "DELETE"; }>; pathTemplate: z.ZodString; queryTemplate: z.ZodArray>; semanticHeaders: z.ZodArray; }, z.core.$strict>>; bodyTemplateHash: z.ZodNullable; placeholders: z.ZodArray; bindingClass: z.ZodEnum<{ "target-object": "target-object"; "provider-prerequisite": "provider-prerequisite"; "registry-repository": "registry-repository"; "protected-material": "protected-material"; }>; bindingId: z.ZodString; commitment: z.ZodNullable; }, z.core.$strict>>; requestTemplateHash: z.ZodString; }, z.core.$strict>>; }, z.core.$strip>; export type DappTargetPlanProjectionV1 = z.infer; /** * Projects a provider target plan onto the common envelope and verifies that * envelope as one slice of the lock. Provider rules are not checked here. */ export declare function projectDappTargetPlanV1(lock: DappDeploymentLockV3, plan: unknown, index: number): DappTargetCompositionV3Issue[] | DappTargetPlanProjectionV1; export interface CreateDappTargetCompositionV3Input { readonly lock: DappDeploymentLockV3; readonly targetPlans: readonly unknown[]; } /** * Builds the composition of a verified Lock V3 and exactly one target plan per * selected infrastructure. The bindings come from the lock's placements, the * target objects from the union of the plans, and the managed-capability * bindings from matched exports and imports; the plan IDs are taken from the * plans and are reproduced only by `verifyDappTargetCompositionV3`. */ export declare function createDappTargetCompositionV3(input: CreateDappTargetCompositionV3Input): DappTargetCompositionV3Result; /** The result shape every provider target-plan verifier returns. */ export type DappTargetPlanVerificationLikeV1 = { readonly issues: readonly DappTargetPlanIssue[]; readonly success: false; } | { readonly success: true; readonly value: { readonly targetPlanId: string; }; }; /** A pinned adapter: its public descriptor and the provider verifier that reproduces its target plans. */ export interface DappTargetCompositionAdapterV3 { readonly descriptor: DappInfrastructureAdapterDescriptorV1; readonly verifyTargetPlan: (lock: DappDeploymentLockV3, plan: unknown) => DappTargetPlanVerificationLikeV1; } export interface VerifyDappTargetCompositionV3Options { readonly adapters: readonly DappTargetCompositionAdapterV3[]; } /** * The exhaustive Composition V3 verifier: every target plan is reproduced by * its pinned adapter, one plan selects each lock infrastructure, every * selected-infrastructure field agrees, the bindings are exactly the lock's * placements, the target objects are exactly the plan union, every managed * capability binding matches one export and one import whose contract both * pinned descriptors list, and only then must `compositionId` reproduce. */ export declare function verifyDappTargetCompositionV3(lock: DappDeploymentLockV3, targetPlans: readonly unknown[], value: unknown, options: VerifyDappTargetCompositionV3Options): DappTargetCompositionV3Result; export {}; //# sourceMappingURL=targetCompositionV3.d.ts.map