Add primitive life calls to the session client
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m56s
Foundation / checks (postgres) (push) Canceled after 0s
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 2m43s
Foundation / checks (network) (push) Canceled after 39s
Foundation / checks (client) (push) Canceled after 2m49s

This commit is contained in:
dingo
2026-10-10 20:52:32 -04:00
parent 0bb8b50c9c
commit 3277b8f3cd
7 changed files with 193 additions and 56 deletions
+7
View File
@@ -23,6 +23,7 @@ namespace evo::client {
struct RegionSessionClientConfig {
network::quic::ClientConfig transport;
network::WireGrant grant{};
std::uint16_t protocol_version{network::session_protocol_version};
std::chrono::milliseconds welcome_deadline{5000}; // Connect to Welcome.
};
enum class RegionSessionState : std::uint8_t { connecting, awaiting_welcome, established, closed };
@@ -53,6 +54,12 @@ class RegionSessionClient {
[[nodiscard]] bool send_action(std::uint64_t action_id, network::ActionKind kind,
std::uint64_t tick);
[[nodiscard]] bool query_action(std::uint64_t action_id);
// Primitive profile v5 only. The account and generation are always supplied by the
// authenticated session; callers choose only a stable request id.
[[nodiscard]] bool request_primitive_life(std::uint64_t request_id);
[[nodiscard]] bool query_primitive_life(std::uint64_t request_id);
[[nodiscard]] std::vector<network::PrimitiveLifeReceipt> take_primitive_life_receipts();
[[nodiscard]] std::vector<network::PrimitiveLifeOutcome> take_primitive_life_outcomes();
[[nodiscard]] std::vector<network::IntentionReceipt> take_intention_receipts();
[[nodiscard]] std::vector<network::ActionReceipt> take_action_receipts();
[[nodiscard]] std::vector<network::ActionOutcome> take_action_outcomes();