Kino.Qx.SmartCell (Kino.Qx v0.2.0)

Copy Markdown View Source

Livebook Smart Cell that browses a user's Qx Portal snippets and injects the chosen one's source into the notebook.

Registered automatically when :kino_qx is loaded — no setup beyond Mix.install([{:kino_qx, "~> 0.1"}]) is required.

Security invariant

The API token lives ONLY in the cell's transient state. It is never written to to_attrs/1, which means it is never persisted into the .livemd file. Sharing a notebook does NOT leak the token.

Persisted across notebook reopens:

  • base_url — portal URL (default https://qxportal.dev)
  • snippet_name — display name of the most recently selected snippet
  • source_kind"qasm" or "elixir"
  • source — the chosen snippet's body (so the notebook is
                    self-contained on next open, no token needed)

The token is required only to browse the snippet list and refresh the body of the selected snippet.

Summary

Functions

child_spec(map)