21 lines
1.1 KiB
Text
21 lines
1.1 KiB
Text
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||
|
|
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
||
|
|
|
||
|
|
export module Crafter.Review:Dispositions;
|
||
|
|
import std;
|
||
|
|
import :Json;
|
||
|
|
|
||
|
|
// The disposition register: which entries are in force (a hash match),
|
||
|
|
// carried (every anchor text still occurs its recorded number of times) or
|
||
|
|
// lapsed, and the DISPOSITIONS IN FORCE prompt block. Entries are the
|
||
|
|
// owner's JSON, kept as it is.
|
||
|
|
export namespace Crafter::Review::Dispositions {
|
||
|
|
// The register's entries with an id; empty `path`: none.
|
||
|
|
std::vector<Json> Load(std::string_view path);
|
||
|
|
// [{id, status, detail}], statuses in-force | carried | lapsed.
|
||
|
|
std::vector<Json> Classify(std::span<const Json> entries, std::string_view hash, const std::filesystem::path& artifact);
|
||
|
|
// The entries the rows say are in force or carried.
|
||
|
|
std::vector<Json> InForce(std::span<const Json> entries, std::span<const Json> rows);
|
||
|
|
// The DISPOSITIONS IN FORCE block for one lens.
|
||
|
|
std::string Block(std::span<const Json> inForce, std::span<const Json> rows, std::string_view lensFile, std::string_view hash);
|
||
|
|
}
|