using System.Collections.Immutable; namespace StellaOps.AirGap.Bundle.Models; /// /// Manifest for an offline bundle, inventorying all components with content digests. /// Used for integrity verification and completeness checking in air-gapped environments. /// Sprint: SPRINT_20260118_018 (TASK-018-001) - Updated to v2.0.0 /// public sealed record BundleManifest { public required string BundleId { get; init; } public string SchemaVersion { get; init; } = "2.0.0"; public required string Name { get; init; } public required string Version { get; init; } public required DateTimeOffset CreatedAt { get; init; } public DateTimeOffset? ExpiresAt { get; init; } public required ImmutableArray Feeds { get; init; } public required ImmutableArray Policies { get; init; } public required ImmutableArray CryptoMaterials { get; init; } public ImmutableArray Catalogs { get; init; } = []; public RekorSnapshot? RekorSnapshot { get; init; } public ImmutableArray CryptoProviders { get; init; } = []; public ImmutableArray RuleBundles { get; init; } = []; public long TotalSizeBytes { get; init; } public string? BundleDigest { get; init; } /// /// Export mode indicator: "light" or "full". /// Sprint: SPRINT_20260122_040 (040-04) /// public string? ExportMode { get; init; } // ------------------------------------------------------------------------- // v2.0.0 Additions - Sprint: SPRINT_20260118_018 (TASK-018-001) // ------------------------------------------------------------------------- /// /// Image reference this bundle is for (advisory-specified format). /// Example: "registry.example.com/app@sha256:..." /// public string? Image { get; init; } /// /// List of artifacts in the bundle with path and type information. /// public ImmutableArray Artifacts { get; init; } = []; /// /// Verification section with keys and expectations. /// public BundleVerifySection? Verify { get; init; } /// /// Canonical manifest hash (sha256 over canonical JSON). /// public string? CanonicalManifestHash { get; init; } /// /// Subject digests for the bundle target. /// public BundleSubject? Subject { get; init; } /// /// Timestamp entries for offline verification. /// public ImmutableArray Timestamps { get; init; } = []; /// /// Rekor proof entries for offline verification. /// public ImmutableArray RekorProofs { get; init; } = []; }