v0.2.0
Features
- Encodable protocol —
Bibbidi.Encodablewithmethod/1andparams/1for encoding command structs into BiDi wire format - Command structs — one struct per BiDi command (~60 total), each implementing
Encodable, generated from the CDDL spec - Zoi schemas on command structs — every command struct exposes
schema/0,opts_schema/0, andresult_schema/0for runtime validation, introspection, and auto-generated documentation - Typed facade specs — facade functions use real CDDL-derived typespecs (e.g.
String.t()) instead ofterm(), andCommandName.opts()/CommandName.result()instead ofkeyword()/map() - Opts validation — facade functions validate keyword options via
Zoi.parse!/2before constructing command structs Connection.execute/2,3— acceptsEncodablestructs directly; existing function-based API is fully backwards-compatible- Telemetry —
[:bibbidi, :command, :start|:stop|:exception]events onConnection.execute/2and[:bibbidi, :event, :received]on incoming BiDi events mix bibbidi.gen.workflow— Igniter generator that scaffolds a Multi-style Op pipeline builder, Operation record, and sequential Runnermix bibbidi.cddl.inspect— dev task for inspecting parsed CDDL rules, resolved fields, and extracted commands; now shows CDDL type info
Breaking
Bibbidi.Types.*modules removed — type information now lives directly on command structs (@type t,@type opts,@type result)Connection.send_command/4is now a documented low-level escape hatch — useConnection.execute/2for normal usageCommands.Session.end_session/1renamed toCommands.Session.session_end/1—Bibbidi.Session.end_session/1is unchangedCommands.Session.unsubscribe/3changed toCommands.Session.unsubscribe/2—eventsmoved into keyword opts.Bibbidi.Session.unsubscribe/3is unchangedScript.evaluate/4→Script.evaluate/5—await_promiseis now a required positional argScript.call_function/4→Script.call_function/5—await_promiseis now a required positional arg, inserted beforetargetBibbidi.Transportbehaviour — added requiredsend_pong/1callback- All facade functions now validate opts with Zoi — unrecognized or wrongly-typed options will raise instead of being silently ignored
Changed
- CDDL code generator migrated to Igniter for proper diffing, dry-run support, and formatting
- Command module functions now construct structs internally and route through
Connection.execute/2 - Command structs use
Zoi.Struct.enforce_keys/1andZoi.Struct.struct_fields/1
Fixed
Session.Unsubscribestruct now correctly includeseventsandsubscriptionsfields from the CDDL choice typeBibbidi.Session.unsubscribe/3no longer passessubscriptions: nilwhen the option is not provided
📦 Hex package · 📖 HexDocs