Integrate typed ports and schema 3 migration

# Conflicts:
#	crates/oa-core/src/projection.rs
This commit is contained in:
2026-09-05 18:26:48 +03:00
34 changed files with 9915 additions and 408 deletions
+18
View File
@@ -453,6 +453,24 @@ fn apply_command(p: &mut Project, c: &Command, depth: usize) -> Result<Option<Id
Some(*id)
}
Command::Connect(kind, name, source, target) => {
if *kind == RelationKind::FunctionalExchange {
let id = Id::new_v4();
let commands = crate::ports::functional_exchange_commands(
p,
&FunctionalExchangeRequest {
id,
alias: p.fresh_alias(name, "relation", id),
name: name.clone(),
description: String::new(),
source: *source,
target: *target,
source_port: PortChoice::Auto,
target_port: PortChoice::Auto,
items: vec![],
},
)?;
return apply_command(p, &Command::Batch(commands), depth + 1);
}
Some(p.relate(*kind, name, *source, *target))
}
Command::Delete(id) => {