1#ifndef ARACHNE_PHEIDIPPIDES_TRANSPORT_HPP
2#define ARACHNE_PHEIDIPPIDES_TRANSPORT_HPP
8#include <nlohmann/json_fwd.hpp>
50
51
52
83 std::chrono::milliseconds
timeout { 30'000 };
153
154
155
156
157
158
159class transport
final {
161 explicit transport(std::filesystem::path artifact_root);
164 return artifact_root_;
172 execute(
const nlohmann::json& request_contract)
const;
int exit_code() const noexcept
cli_error(std::string message, const int exit_code=2)
bool flag(const std::string_view name) const
const std::string & require(const std::string_view name) const
std::map< std::string, std::string, std::less<> > values_
std::optional< std::string > optional(const std::string_view name) const
std::set< std::string, std::less<> > present_flags_
options(const std::vector< std::string > &arguments, const std::size_t first, const std::initializer_list< std::string_view > allowed, const std::initializer_list< std::string_view > flags={})
envelope_record intake(const intake_request &request)
void capture_inbox_baseline(const std::filesystem::path &inbox_root)
snapshot_result replace_candidate_snapshot(const candidate_snapshot_request &request)
const std::filesystem::path & root() const noexcept
std::filesystem::path root_
store(std::filesystem::path root)
std::optional< snapshot_result > active_snapshot(graph_domain domain) const
void checkpoint_staging(graph_domain domain, const std::filesystem::path &database_path) const
integrity_report integrity_check(graph_domain domain, const std::filesystem::path &database_path) const
std::string export_jsonl(graph_domain domain, const std::filesystem::path &database_path, const std::filesystem::path &destination) const
acquired_artifact_v1 execute(const fetch_request_v1 &request) const
acquired_artifact_v1 execute(const nlohmann::json &request_contract) const
hardened_transport(std::filesystem::path artifact_root, const nlohmann::json &transport_configuration)
hardened_transport(const hardened_transport &)=delete
hardened_transport(hardened_transport &&) noexcept
hardened_transport & operator=(hardened_transport &&) noexcept
std::unique_ptr< implementation > implementation_
hardened_transport & operator=(const hardened_transport &)=delete
const std::filesystem::path & artifact_root() const noexcept
std::filesystem::path artifact_root_
transport(std::filesystem::path artifact_root)
acquired_artifact_v1 execute(const nlohmann::json &request_contract) const
acquired_artifact_v1 execute(const fetch_request_v1 &request) const
int main(const int argc, char **argv)
std::string join_strings(const std::span< const std::string > values, const std::string_view separator)
int command_inbox_baseline(const options &arguments)
const json & required_object(const json &parent, const std::string_view key)
std::string validation_details(const arachnespace::contracts::validation_result &result, const std::string_view description)
int command_fetch(const options &arguments)
std::size_t size_value(const json &object, const std::string_view key, const std::size_t fallback)
written_run_manifest write_graph_run_manifest(const configuration &config, const std::string_view domain_directory, const std::string_view graph_domain, const std::string_view run_id, ordered_json configuration_hashes, ordered_json inputs, const arachne::penelope::snapshot_result &snapshot)
void emit(const json &document)
void atomic_write(const fs::path &destination, const std::string_view bytes, const bool replace)
int command_contract_validate(const options &arguments)
ordered_json envelope_json(const arachne::coordination::envelope_record &envelope)
json candidate_tables_for_viewer(const json &tables)
fs::path resolved_path(const fs::path &path, const fs::path &relative_root)
ordered_json wikidata_point_fetch_request(const configuration &config, const json &plan, const json &planned, const std::span< const std::string > entities, const std::string &request_id)
std::string read_bytes(const fs::path &path, const std::uintmax_t maximum_bytes, const std::string_view description)
constexpr std::uintmax_t maximum_config_bytes
resolved_snapshot_export resolve_snapshot_export(const configuration &config, const fs::path &control_path, const arachnespace::contracts::contract_name expected_contract, const std::string_view expected_kind)
std::string form_encode(const std::string_view value)
void write_immutable_exact(const fs::path &destination, const std::string_view bytes, const std::string_view description)
ordered_json snapshot_json(const arachne::penelope::snapshot_result &snapshot)
int command_candidate_rebuild(const options &arguments)
int command_fetch_plan(const options &arguments)
void verify_external_source_snapshot(const configuration &config, const json &external_graph)
arachne::ariadne::candidate_configuration candidate_configuration_from(const configuration &config)
constexpr std::uintmax_t maximum_export_bytes
std::optional< fs::path > conventional_legacy_inbox()
int command_intake(const options &arguments)
int command_cocoon_transition(const options &arguments)
json materialize_jsonl_export(const fs::path &path, const bool candidate)
ordered_json actor_inbox_issues(const arachne::coordination::operational_ledger &ledger, const fs::path &inbox)
int dispatch(const std::vector< std::string > &arguments)
std::string policy_configuration_hash(const configuration &config, const std::string_view section)
bool path_is_in_protected_legacy(const fs::path &path, const configuration &config)
ordered_json wikidata_bulk_fetch_request(const json &plan, const json &planned, std::string request_id, std::string locator)
fs::path resolve_plan_artifact(const configuration &config, const fs::path &control_path, const std::string_view storage_ref)
bool wikidata_entity_id(const std::string_view value)
configuration load_configuration(const fs::path &input_path)
fs::path repository_root()
std::atomic< std::uint64_t > temporary_sequence
ordered_json capabilities()
bool valid_logical_date(const std::string_view value)
int command_candidate_plan(const options &arguments)
int command_product_rebuild_merge_hints()
int command_viewer_build(const options &arguments)
json parse_embedded_json(const json &row, const std::string_view key, json fallback)
ordered_json issue_json(std::string path, std::string message)
bool path_has_symlink(const fs::path &root, const fs::path &candidate)
void verify_product_coverage(const json &external_graph, const json &product_tables)
int command_inbox_verify(const options &arguments)
std::uint64_t unsigned_value(const json &object, const std::string_view key, const std::uint64_t default_value, const bool positive)
int command_product_inbox(const bool apply)
fs::path command_path(const std::string &value)
json read_json(const fs::path &path, const std::uintmax_t maximum_bytes, const std::string_view description)
constexpr std::uintmax_t maximum_control_bytes
std::string sha256(std::span< const std::byte > bytes)
std::string sha256_file(const std::filesystem::path &path)
inbox_result apply_product_inbox(const std::filesystem::path &repository_root)
const char * to_string(inbox_batch_status status) noexcept
inbox_result check_product_inbox(const std::filesystem::path &repository_root)
std::size_t rebuild_product_merge_hints(const std::filesystem::path &repository_root)
fetch_request_v1 from_contract(const nlohmann::json &document)
nlohmann::ordered_json to_contract(const acquired_artifact_v1 &artifact)
@ redirect_limit_exceeded
std::string_view to_string(freshness_policy value) noexcept
std::string_view to_string(delivery_mode value) noexcept
std::string_view to_string(transport_operation value) noexcept
@ research_candidate_graph_plan
std::optional< fs::path > legacy_inbox
fs::path viewer_templates
std::uintmax_t submission_max_bytes
std::vector< fs::path > protected_legacy_inboxes
std::chrono::seconds product_lock_stale
std::chrono::seconds candidate_lock_stale
int gray_bonus_basis_points
std::uintmax_t byte_length
std::string submission_ref
std::string payload_sha256
std::filesystem::path resolved_plan_payload_path
std::filesystem::path control_contract_path
candidate_plan_descriptor plan
inbox_batch_status status
std::vector< inbox_issue > issues
std::vector< inbox_batch_report > batches
std::size_t applied_count
std::size_t rejected_count
std::size_t already_applied_count
std::vector< std::string > problems
std::filesystem::path metadata_path
std::filesystem::path export_path
std::string export_sha256
std::size_t skipped_inputs
std::size_t applied_inputs
std::filesystem::path database_path
std::string database_sha256
std::string effective_url
std::vector< http_header > response_headers
std::optional< std::chrono::milliseconds > retry_after
std::string error_message
std::chrono::system_clock::time_point completed_at
delivery_mode delivered_via
std::vector< std::string > redirect_chain
bool delivered() const noexcept
std::uint32_t format_version
std::chrono::system_clock::time_point started_at
transport_operation operation
std::uint64_t byte_length
std::chrono::milliseconds total_retry_delay_budget
std::chrono::milliseconds connect_timeout
std::string target_artifact_ref
std::uint32_t format_version
std::chrono::milliseconds maximum_retry_delay
freshness_policy freshness
redirect_policy redirects
std::size_t maximum_attempts
std::chrono::milliseconds read_timeout
std::chrono::milliseconds initial_retry_delay
std::optional< body_artifact_reference > resume_artifact
transport_operation operation
std::optional< std::string > expected_sha256
std::vector< http_header > headers
std::chrono::milliseconds timeout
std::chrono::milliseconds write_timeout
std::string idempotency_key
std::optional< body_artifact_reference > body_artifact
std::vector< std::string > allowed_hosts
std::size_t maximum_redirects