// SPDX-FileCopyrightText: 2026 FocusFlow contributors
// SPDX-License-Identifier: AGPL-3.0-only

/// In-memory implementations of the scheduler persistence repository contracts.
///
/// These repositories are intended for core tests, local integration tests, and
/// adapter conformance checks. They model optimistic compare-and-set behavior
/// but do not provide durable storage.
library;

import 'dart:convert';

import 'package:scheduler_core/scheduler_core.dart' as core;
import 'package:scheduler_persistence/persistence.dart';
part 'persistence_memory/repositories/in_memory_task_repository.dart';
part 'persistence_memory/repositories/in_memory_project_repository.dart';
part 'persistence_memory/repositories/in_memory_locked_block_repository.dart';
part 'persistence_memory/repositories/in_memory_settings_repository.dart';
part 'persistence_memory/repositories/in_memory_schedule_snapshot_repository.dart';
part 'persistence_memory/records/identified_record.dart';
part 'persistence_memory/records/record.dart';
part 'persistence_memory/records/snapshot_record.dart';

/// Private file-level value for `_snapshotRetention`.
/// Keeping this value near the helpers that use it avoids hidden global configuration while still preventing duplicate literals.
const _snapshotRetention = Duration(days: 30);

/// Private file-level value for `_epoch`.
/// Keeping this value near the helpers that use it avoids hidden global configuration while still preventing duplicate literals.
final _epoch = DateTime.fromMillisecondsSinceEpoch(0, isUtc: true);
