//
// Copyright (c) StellaOps. Licensed under BUSL-1.1.
//
using System.Collections.Immutable;
namespace StellaOps.Facet;
///
/// Options for facet extraction operations.
///
public sealed record FacetExtractionOptions
{
///
/// Gets the facets to extract. If empty, all built-in facets are used.
///
public ImmutableArray Facets { get; init; } = [];
///
/// Gets whether to include individual file entries in the result.
///
///
/// When false, only Merkle roots are computed (more compact).
/// When true, all file details are preserved for audit.
///
public bool IncludeFileDetails { get; init; } = true;
///
/// Gets whether to compute Merkle proofs for each file.
///
///
/// Enabling proofs allows individual file verification against the facet root.
///
public bool ComputeMerkleProofs { get; init; }
///
/// Gets glob patterns for files to exclude from extraction.
///
public ImmutableArray ExcludePatterns { get; init; } = [];
///
/// Gets the hash algorithm to use (default: SHA256).
///
public string HashAlgorithm { get; init; } = "SHA256";
///
/// Gets whether to follow symlinks.
///
public bool FollowSymlinks { get; init; }
///
/// Gets the maximum file size to hash (larger files are skipped with placeholder).
///
public long MaxFileSizeBytes { get; init; } = 100 * 1024 * 1024; // 100MB
///
/// Gets the default options.
///
public static FacetExtractionOptions Default { get; } = new();
///
/// Gets options for compact sealing (no file details, just roots).
///
public static FacetExtractionOptions Compact { get; } = new()
{
IncludeFileDetails = false,
ComputeMerkleProofs = false
};
///
/// Gets options for full audit (all details and proofs).
///
public static FacetExtractionOptions FullAudit { get; } = new()
{
IncludeFileDetails = true,
ComputeMerkleProofs = true
};
}