Skip to content

Releases: petermueller/bibbidi

v0.3.0

21 Mar 04:18
8e4ce5f

Choose a tag to compare

Features

  • Type modules (Bibbidi.Types.*) — all named BiDi protocol types now have generated modules under Bibbidi.Types.* with Zoi schemas (schema/0), @type t, and ExDoc documentation. Covers primitive aliases, string enums, struct-like maps, and choice/union types (~163 modules).
  • Improved command struct documentation — moduledocs include spec links, field descriptions with ExDoc cross-references to type modules (e.g. t:Bibbidi.Types.Script.Target.t/0), and required/optional annotations.
  • Typed schemas on command structs@schema fields now reference type module schemas (e.g. Bibbidi.Types.BrowsingContext.schema()) instead of Zoi.any(), providing real validation and introspection for command fields.
  • Event structs — BiDi events are parsed into typed structs (one per event method). Subscribers receive {:bibbidi_event, method, %EventStruct{}} instead of raw maps.
  • Telemetry correlation — command start/stop events include :meta, event received includes :context/:navigation/:request when present
  • :connection_mod option — all generated facade functions accept connection_mod: MyMod for clean Mox-based testing
  • Bibbidi.Keys — maps human-friendly key names to BiDi Unicode codepoints for keyboard actions

Breaking

  • Event subscribers receive structs instead of raw maps
  • All facade functions accept opts \\ []
  • Command structs have a :meta field (defaults to nil)

See CHANGELOG.md for full details.

v0.2.0

18 Mar 21:10
24798ae

Choose a tag to compare

Features

  • Encodable protocolBibbidi.Encodable with method/1 and params/1 for 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, and result_schema/0 for runtime validation, introspection, and auto-generated documentation
  • Typed facade specs — facade functions use real CDDL-derived typespecs (e.g. String.t()) instead of term(), and CommandName.opts() / CommandName.result() instead of keyword() / map()
  • Opts validation — facade functions validate keyword options via Zoi.parse!/2 before constructing command structs
  • Connection.execute/2,3 — accepts Encodable structs directly; existing function-based API is fully backwards-compatible
  • Telemetry[:bibbidi, :command, :start|:stop|:exception] events on Connection.execute/2 and [: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 Runner
  • mix 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/4 is now a documented low-level escape hatch — use Connection.execute/2 for normal usage
  • Commands.Session.end_session/1 renamed to Commands.Session.session_end/1Bibbidi.Session.end_session/1 is unchanged
  • Commands.Session.unsubscribe/3 changed to Commands.Session.unsubscribe/2events moved into keyword opts. Bibbidi.Session.unsubscribe/3 is unchanged
  • Script.evaluate/4Script.evaluate/5await_promise is now a required positional arg
  • Script.call_function/4Script.call_function/5await_promise is now a required positional arg, inserted before target
  • Bibbidi.Transport behaviour — added required send_pong/1 callback
  • 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/1 and Zoi.Struct.struct_fields/1

Fixed

  • Session.Unsubscribe struct now correctly includes events and subscriptions fields from the CDDL choice type
  • Bibbidi.Session.unsubscribe/3 no longer passes subscriptions: nil when the option is not provided

📦 Hex package · 📖 HexDocs

v0.1.0

06 Mar 06:56
0ff8ffd

Choose a tag to compare

Initial release of Bibbidi — a low-level Elixir implementation of the W3C WebDriver BiDi Protocol.