62 virtual ContextStoreAppendResult append_history(
65 const std::optional<std::string>& expected_head_id) = 0;
70 std::string_view message_id)
const;
73 std::uint64_t from_sequence,
74 std::uint64_t through_sequence)
const = 0;
80 virtual ContextArtifactPutResult put_artifact(
81 std::string_view owner_id,
83 virtual std::optional<ContextArtifact> get_artifact(
84 std::string_view owner_id,
85 std::string_view artifact_id)
const = 0;
97 static constexpr std::size_t MAX_OWNER_ID_BYTES = 256;
98 static constexpr std::size_t MAX_FEED_ID_BYTES = 256;
99 static constexpr std::size_t MAX_RECORD_BYTES = 1024 * 1024;
100 static constexpr std::size_t MAX_ARTIFACT_BYTES = 1024 * 1024;
101 static constexpr std::size_t MAX_RANGE_RECORDS = 4096;
102 static constexpr std::size_t MAX_RANGE_BYTES = 8 * 1024 * 1024;
111 ContextStoreAppendResult append_history(
114 const std::optional<std::string>& expected_head_id)
override;
118 std::string_view message_id)
const override;
121 std::uint64_t from_sequence,
122 std::uint64_t through_sequence)
const override;
126 ContextArtifactPutResult put_artifact(
127 std::string_view owner_id,
129 std::optional<ContextArtifact> get_artifact(
130 std::string_view owner_id,
131 std::string_view artifact_id)
const override;
135 std::unique_ptr<Impl> impl_;
Immutable context material.
Durable contract for owner-isolated runtime history and context artifacts.
virtual std::vector< RuntimeHistoryRecord > hydrate_records(const ContextHistoryRange &range) const
Hydrate full typed records; native seals require trusted storage custody.
virtual std::optional< RuntimeHistoryRecord > history_record_by_message_id(const ContextStoreFeed &feed, std::string_view message_id) const
Exact host message identity lookup; default is a bounded reverse scan.
Opt-in marker for ContextStore implementations that survive process restart.
Thread-safe in-memory implementation of the ContextStore durable contract.
std::vector< RuntimeHistoryRecord > hydrate_records(const ContextHistoryRange &range) const override
Hydrate full typed records; native seals require trusted storage custody.
std::optional< RuntimeHistoryRecord > history_record_by_message_id(const ContextStoreFeed &feed, std::string_view message_id) const override
Exact host message identity lookup; default is a bounded reverse scan.
One immutable, content-addressed line in the authoritative RAW history feed.
Immutable reference to an exact contiguous history range, not a feed copy.
Owner-scoped identity of one append-only runtime-history feed.
The current durable head of a feed.