MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / convert_node_kind

Function convert_node_kind

atomic-agent/src/provenance/accumulator/helpers.rs:11–29  ·  view source on GitHub ↗

Convert from agent-side `NodeKind` to core `ProvenanceNodeKind`.

(kind: NodeKind)

Source from the content-addressed store, hash-verified

9
10/// Convert from agent-side `NodeKind` to core `ProvenanceNodeKind`.
11pub(crate) fn convert_node_kind(kind: NodeKind) -> pg::ProvenanceNodeKind {
12 match kind {
13 NodeKind::Goal => pg::ProvenanceNodeKind::Goal,
14 NodeKind::Exploration => pg::ProvenanceNodeKind::Exploration,
15 NodeKind::Decision => pg::ProvenanceNodeKind::Decision,
16 NodeKind::Commitment => pg::ProvenanceNodeKind::Commitment,
17 NodeKind::Verification => pg::ProvenanceNodeKind::Verification,
18 NodeKind::Execution => pg::ProvenanceNodeKind::Execution,
19 NodeKind::HumanGate => pg::ProvenanceNodeKind::HumanGate,
20 NodeKind::PatchProposal => pg::ProvenanceNodeKind::PatchProposal,
21 NodeKind::Error => pg::ProvenanceNodeKind::Error,
22 NodeKind::Todo => pg::ProvenanceNodeKind::Todo,
23 NodeKind::TodoStatusChange => pg::ProvenanceNodeKind::TodoStatusChange,
24 NodeKind::PhaseTransition => pg::ProvenanceNodeKind::PhaseTransition,
25 NodeKind::Lesson => pg::ProvenanceNodeKind::Lesson,
26 NodeKind::LlmResponse => pg::ProvenanceNodeKind::LlmResponse,
27 NodeKind::HumanGateResolution => pg::ProvenanceNodeKind::HumanGateResolution,
28 }
29}
30
31/// Convert from agent-side `EdgeKind` to core `ProvenanceEdgeKind`.
32pub(crate) fn convert_edge_kind(kind: EdgeKind) -> pg::ProvenanceEdgeKind {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected