Files
Chronos/src/Titano.Core/Archiving/ArchiveManifest.cs
T
Claude 55895e8474 feat(core): archive layout, sidecars, leases and thumbnail packs
archive.json and sequence.json with source-generated JSON, forward-compatible
reading (unknown fields kept, unknown enum names tolerated) and atomic writes;
lease files with expiry and stale takeover; thumbs.pack with index, crash-safe
append and random access; folder scanning, in-place adoption, reconcile,
verify, index snapshot, rename planning and thumbnail/proxy rendering.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
2026-10-02 12:30:14 +00:00

50 lines
1.6 KiB
C#

using System.Text.Json;
using System.Text.Json.Serialization;
using Titano.Core.Naming;
namespace Titano.Core.Archiving;
/// <summary>
/// <c>.titano/archive.json</c> at the archive root (BRIEF §7). Fields this build does not know are kept in
/// <see cref="Extra"/> and written back unchanged.
/// </summary>
public sealed record ArchiveManifest
{
public const int CurrentSchemaVersion = 1;
public int SchemaVersion { get; init; } = CurrentSchemaVersion;
public required Guid Id { get; init; }
public required string Name { get; init; }
public DateTimeOffset Created { get; init; }
public LayoutTemplates LayoutTemplates { get; init; } = new();
public ProxyPolicy ProxyPolicy { get; init; } = new();
[JsonExtensionData]
public Dictionary<string, JsonElement>? Extra { get; set; }
}
/// <summary>Naming templates used when frames enter the archive (BRIEF §7.1).</summary>
public sealed record LayoutTemplates
{
public string Folder { get; init; } = TemplateDefaults.Folder;
public string File { get; init; } = TemplateDefaults.File;
[JsonExtensionData]
public Dictionary<string, JsonElement>? Extra { get; set; }
}
/// <summary>Proxy generation policy (BRIEF §8.5).</summary>
public sealed record ProxyPolicy
{
public const int Disabled = -1;
public const int FullSize = 0;
/// <summary>Long edge in pixels: 1280, 1920 (default) or 2560; <see cref="FullSize"/> or <see cref="Disabled"/>.</summary>
public int LongEdge { get; init; } = 1920;
public int Quality { get; init; } = 92;
[JsonExtensionData]
public Dictionary<string, JsonElement>? Extra { get; set; }
}