Rework the runtime delta experiment to the agreed shape: graph-craft structural deltas, an editor metadata wrapper, and diff-derived metadata ops

This commit is contained in:
Keavon Chambers
2026-07-28 01:20:01 -07:00
parent 3114c57ec2
commit c7d91fe7f2
8 changed files with 695 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ pub use core_types::{ProtoNodeIdentifier, Type, TypeDescriptor, concrete, descri
pub mod application_io;
pub mod document;
pub mod runtime_delta;
pub use document::{DocumentNode, NodeNetwork};
pub mod graphene_compiler;
pub mod proto;

View File

@@ -0,0 +1,30 @@
use crate::document::{DocumentNode, NodeId, NodeInput};
#[derive(Debug, Clone, PartialEq)]
pub enum RuntimeDelta {
AddNode {
network_path: Vec<NodeId>,
node_id: NodeId,
node: Box<DocumentNode>,
},
ReplaceNode {
network_path: Vec<NodeId>,
node_id: NodeId,
node: Box<DocumentNode>,
},
RemoveNode {
network_path: Vec<NodeId>,
node_id: NodeId,
},
SetInput {
network_path: Vec<NodeId>,
node_id: NodeId,
input_index: usize,
input: NodeInput,
},
SetExport {
network_path: Vec<NodeId>,
export_index: usize,
input: NodeInput,
},
}