NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
child_synthesis.h
Go to the documentation of this file.
1
2#pragma once
3
5
6namespace neograph::program {
7
8enum class ProgramChildSynthesisState {
9 Reserved,
10 Compiling,
11 Compiled,
12 Validating,
13 Validated,
14 Admitting,
15 Admitted,
16 Bound,
17 Dispatching,
18 Spawned,
19 Failed,
20 ReconciliationRequired
21};
22
23struct ProgramChildSynthesisRecordData {
24 ProgramSynthesisProposal proposal;
25 ProgramChildSynthesisGrant grant;
26 ProgramChildSynthesisParent parent;
27 ProgramSynthesisReservation reservation;
28 std::string binding_name;
29 std::uint64_t revision = 1;
30 std::string previous_id;
31 ProgramChildSynthesisState state = ProgramChildSynthesisState::Reserved;
33 json artifacts = json::object();
34 std::string error_code;
35};
36
38class NEOGRAPH_PROGRAM_API ProgramChildSynthesisRecord final {
39public:
40 static constexpr std::size_t MAX_RECORD_BYTES = 8 * 1024 * 1024;
41 static ProgramChildSynthesisRecord create(ProgramChildSynthesisRecordData data);
42 static ProgramChildSynthesisRecord parse(std::string_view bytes);
43 const ProgramChildSynthesisRecordData& data() const noexcept;
44 const std::string& id() const noexcept;
45 std::string serialize_canonical() const;
46
47private:
48 struct Impl;
49 explicit ProgramChildSynthesisRecord(std::shared_ptr<const Impl> impl);
50 std::shared_ptr<const Impl> impl_;
51};
52
55 const std::vector<ProgramChildSynthesisRecord>& heads,
56 const ProgramChildSynthesisRecord& next) noexcept;
57
58struct ProgramTransitionPublication;
59NEOGRAPH_PROGRAM_API bool is_valid_program_child_synthesis_publication(
60 const std::vector<ProgramChildSynthesisRecord>& heads,
61 const ProgramRunRecord* previous_run,
62 const ProgramTransitionPublication& publication) noexcept;
63
64} // namespace neograph::program
NEOGRAPH_PROGRAM_API bool is_valid_program_child_synthesis_append(const std::vector< ProgramChildSynthesisRecord > &heads, const ProgramChildSynthesisRecord &next) noexcept
Checks only immutable stage history; publication additionally verifies the live debit.
Stored grants are evidence only; recovery must reselect them through host policy.
Deep-owned, content-addressed run snapshot used for reconnect and CAS publication.
Definition run_record.h:119
Host-owned bounded Program synthesis gateway.