Titano: time-lapse ecosystem (client, server, uploader) — in progress #1

Merged
Alby96 merged 204 commits from claude/keen-knuth-uhxv8w into main 2026-10-02 16:29:53 +02:00
Showing only changes of commit ece7f1add0 - Show all commits
+30
View File
@@ -0,0 +1,30 @@
namespace Titano.Data.Archive;
/// <summary>
/// A verified file waiting in a staging folder on the archive volume, ready to become a frame (BRIEF §4.3, §14.4).
/// Exactly one of <see cref="SequenceId"/>, <see cref="NewSequenceTitle"/> or <see cref="SessionKey"/> selects the target:
/// an existing sequence, a new one with that title, or the sequence grouped automatically by session.
/// </summary>
public sealed record IngestRequest(
Guid ArchiveId,
Guid? SequenceId,
string? NewSequenceTitle,
string? SessionKey,
string StagedPath,
string OriginalFileName,
long Size,
string Sha256,
DateTime? ClientCapturedAt,
Guid? UserId);
/// <summary>The committed frame; <see cref="Duplicate"/> when the sequence already held a frame with that SHA-256.</summary>
public sealed record IngestResult(Guid SequenceId, Guid FrameId, int Index, string RelativePath, bool Duplicate);
/// <summary>
/// Commits staged files into the archive layout (originals folder, naming templates, <c>sequence.json</c> written
/// atomically) and the index. Used by the server's upload completion and by the client's card import.
/// </summary>
public interface IArchiveIngest
{
Task<IngestResult> CommitAsync(IngestRequest request, CancellationToken cancellationToken = default);
}