22namespace neograph::program {
35NEOGRAPH_PROGRAM_API std::string_view to_string(InvocationTerminalStatus status)
noexcept;
37NEOGRAPH_PROGRAM_API InvocationTerminalStatus
39NEOGRAPH_PROGRAM_API
bool invocation_terminal_status_succeeded(
41NEOGRAPH_PROGRAM_API
bool invocation_terminal_status_failed(
52NEOGRAPH_PROGRAM_API std::string_view to_string(InvocationDiagnosticSeverity severity)
noexcept;
53NEOGRAPH_PROGRAM_API InvocationDiagnosticSeverity
54invocation_diagnostic_severity_from_string(std::string_view value)
noexcept;
61 std::string severity_value;
63 json witness = json::object();
73 static constexpr std::uint32_t STORAGE_SCHEMA_VERSION = 1;
76 std::string status_value =
"unknown";
77 std::vector<InvocationDiagnostic> diagnostics;
78 json output = json::object();
81 json output = json::object(),
82 std::vector<InvocationDiagnostic> diagnostics = {});
85 bool succeeded()
const noexcept;
86 bool failed()
const noexcept;
87 std::string serialize_canonical()
const;
99 std::string artifact_identity;
101 std::string media_type;
102 std::uint64_t size_bytes = 0;
116 static constexpr std::uint32_t PROTOCOL_REVISION = 1;
117 static constexpr std::uint32_t STORAGE_SCHEMA_VERSION = 1;
119 std::uint32_t protocol_revision = PROTOCOL_REVISION;
120 std::string owner_scope;
121 std::string agent_id;
122 std::string program_version_id;
124 std::string parent_run_id;
126 json input = json::object();
127 std::uint64_t message_sequence = 0;
128 std::string idempotency_key;
129 std::string correlation_id;
130 std::optional<InvocationArtifactReference> artifact;
141 std::string content_hash()
const {
return canonical_identity(); }
142 std::string id()
const {
return canonical_identity(); }
144 std::string serialize_canonical()
const;
145 static RunInvocation parse(std::string_view stored_bytes);
146 std::string canonical_id()
const {
return canonical_identity(); }
147 static RunInvocation from_canonical(std::string_view stored_bytes) {
return parse(stored_bytes); }
149 bool operator==(
const RunInvocation& other)
const;
153NEOGRAPH_PROGRAM_API
void to_json(json& value,
const RunInvocation& invocation);
154NEOGRAPH_PROGRAM_API
void from_json(
const json& value, RunInvocation& invocation);
162using IdempotencyResult = InvocationIdempotencyResult;
164NEOGRAPH_PROGRAM_API std::string_view to_string(InvocationIdempotencyResult result)
noexcept;
Owner-scoped activation records for immutable Program versions.
NEOGRAPH_API export/import macro for shared-library builds.
Thin C++ RAII wrapper around yyjson with nlohmann-compatible API.
InvocationIdempotencyResult
Strict result for comparing one idempotency key in an owner mailbox.
InvocationTerminalStatus
Terminal states accepted by the invocation contract.
NEOGRAPH_PROGRAM_API InvocationTerminalStatus invocation_terminal_status_from_string(std::string_view value) noexcept
Unknown wire values return Unknown; callers must not treat that as success.
NEOGRAPH_PROGRAM_API InvocationIdempotencyResult compare_invocations(const RunInvocation &existing, const RunInvocation &incoming)
Compare requests at the durable boundary.
InvocationDiagnosticSeverity
Severity is also open-ended on the wire; unknown values remain unknown.
Immutable outcome of one Program run attempt.
A transport-neutral artifact witness attached to one invocation.
A diagnostic is retained even when its severity is not known locally.
Terminal publication is separate from the request.
One owner-scoped Program request.
std::string canonical_payload() const
Canonical payload excludes the idempotency key and envelope metadata.
std::optional< ProgramActivation > selected_activation
Present only for an activation-selected top-level start.
void validate() const
Validate ownership, identity, sequence and required request fields.
std::string canonical_identity() const
Content-addressed identity of the canonical payload.