cards2pack-core
cards2pack-core is a pure-Rust library that converts Adaptive Card JSON sequences into
YGTc 2.0 flow YAML for use in Greentic bundles.
It is deliberately free of async runtimes, filesystem I/O, and subprocess calls so that
it can be compiled to wasm32-wasip2 without modifications.
Features
- Parses card sequences (AdaptiveCard + HTTP node entries) from JSON
- Builds a routing graph that respects
routeToCardIdand preserves back-edges - Emits deterministic YGTc 2.0 YAML with
when:conditional routes - Fixes four bugs present in the legacy
greentic-cards2packv0.4 converter:- Alphabetical-ordering instead of
routeToCardId-driven routing demo_wrapupincorrectly chosen as flow startrouteToCardIdfield silently ignored in some card shapes- Schema bloat duplicating flat fields outside
card.call.payload
- Alphabetical-ordering instead of
Usage
use ;
let cards = parse_cards?;
let result = convert?;
println!;