NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
tenant.h
Go to the documentation of this file.
1
5#pragma once
6
8#include <neograph/tenant.h>
9
10#include <memory>
11#include <optional>
12#include <string>
13#include <string_view>
14#include <vector>
15
16namespace neograph::mcp {
17using TenantScope = tenant::TenantScope;
18
20class NEOGRAPH_HARNESS_API ScopedHarnessStore final : public HarnessRecordStore,
21 public HarnessJournal,
23public:
24 ScopedHarnessStore(tenant::TenantScope scope, std::shared_ptr<HarnessRecordStore> records,
25 std::shared_ptr<HarnessJournal> journal = {},
26 std::shared_ptr<HarnessRetentionStore> retention = {});
27
28 const tenant::TenantScope& scope() const noexcept { return scope_; }
29 static std::string private_id(const tenant::TenantScope& scope, std::string_view id);
30 static std::string private_uri(const tenant::TenantScope& scope, std::string_view uri);
31
32 void save_artifact(const std::string& artifact_id, const json& record) override;
33 std::optional<json> load_artifact(const std::string& artifact_id) override;
34 void save_run(const std::string& run_id, const json& record) override;
35 std::optional<json> load_run(const std::string& run_id) override;
36 void append_event(const json& event) override;
37 std::vector<json> list_events(const std::string& run_id,
38 std::size_t after_sequence = 0,
39 std::size_t limit = 1000) override;
41
42private:
44 std::shared_ptr<HarnessRecordStore> records_;
45 std::shared_ptr<HarnessJournal> journal_;
46 std::shared_ptr<HarnessRetentionStore> retention_;
47};
48
50
51} // namespace neograph::mcp
Append-only causal event boundary, separate from mutable run snapshots.
Definition harness.h:112
Durable storage boundary for retained Harness artifacts and run records.
Definition harness.h:123
Optional sibling boundary; HarnessRecordStore's stable vtable remains unchanged.
Definition harness.h:151
Shared-backend Harness adapter that exposes only one tenant's IDs.
Definition tenant.h:22
HarnessRetentionResult cleanup_retained(const HarnessRetentionPolicy &policy) override
Namespace filtering, reference checks and deletion must share one transaction.
Immutable identity and authorization binding supplied by trusted ingress.
Definition tenant.h:30
Compiler-backed subagent Harness service for the MCP server.
Count-bounded cleanup policy for stores that support durable retention.
Definition harness.h:134
Records removed by one atomic record-store cleanup pass.
Definition harness.h:145
Trusted-ingress tenant identity, quotas, and scoped persistence.