Skip to main content

Typed Python builders + single-file HTML renderer for a2ui v0.9 surfaces. palin- (again) + nexus (bond) — surfaces get rewritten.

Project description

palinex

palin- (Greek, "again") + nexus (Latin, "bond") — surfaces get rewritten.

A small library + reference renderer for a2ui v0.9 surfaces. Each updateComponents and updateDataModel rewrites what came before; the rendering surface is the bond that the agent revises in place.

What's in here

  • palinex/ — Python package. Typed builders that emit v0.9-conformant payloads from native Python; structural validation built in, optional jsonschema deep validation via pip install palinex[validate].
  • index.html — single-file HTML renderer. Open in a browser. Accepts v0.9 message envelopes via URL param, file picker, or postMessage. lit-html from CDN, no build step.
  • host-bridge.html — reference wrapper that embeds the renderer in an iframe and implements the a2ui.request / a2ui.response postMessage protocol. For hosts (Claude Code MCP UI resources, custom web shells) that bridge agent-side data sources to the renderer.
  • inspector.html — single-file Pyodide-loaded surface validator. Paste/drop/URL-load a payload; get structural validation, component table with role inference (root / child of X / template / orphan), data-path walker, and (opt-in) deep schema validation + markdown sidecar via palinex[validate] running in-browser.
  • A2UI-V09-DIVERGENCE.md — audit notes against the v0.9 spec; documents the structural choices the renderer and producer make.

Install

pip install palinex                  # builders only
pip install palinex[validate]        # + jsonschema for deep validation

Or clone for the renderer + host bridge:

git clone https://github.com/Hellblazer/palinex

Quick start

Renderer with the built-in demo:

open index.html?demo=1

Generate a payload from Python and pipe it in:

from palinex import Surface, DataPath

s = Surface(surface_id="demo", catalog_id="a2ui.basic.v0_9")
s.data["greeting"] = "Hello, surface."
body = s.column([
    s.text(path="/greeting", variant="h2"),
    s.divider(),
    s.button(s.text("Click me"), action=s.open_url("https://example.com")),
])
s.set_root(body)
print(s.to_json())               # v0.9 message-envelope payload
print(s.to_markdown())           # lossless markdown sidecar
s.validate()                     # structural pass

The hosted renderer at https://hellblazer.github.io/palinex/ accepts payloads via:

Param Effect
?surface=<url> Fetch payload JSON from URL
?payload=<base64> Decode inline payload (good for sharing)
?demo=1 Render the built-in demo

Component coverage

All 18 a2ui v0.9 Basic Catalog components: Text · Image · Icon · Video · AudioPlayer · Row · Column · List · Card · Tabs · Modal · Divider · Button · TextField · CheckBox · ChoicePicker · Slider · DateTimeInput.

License

Apache 2.0 — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

palinex-0.0.5.tar.gz (31.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

palinex-0.0.5-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file palinex-0.0.5.tar.gz.

File metadata

  • Download URL: palinex-0.0.5.tar.gz
  • Upload date:
  • Size: 31.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for palinex-0.0.5.tar.gz
Algorithm Hash digest
SHA256 20ef9ccdde33ec27816c2ae42f876d2b6303d3af69f86b6584b17bdb993a5f2c
MD5 85f136b861df1d968e995168f2e2fb91
BLAKE2b-256 e8b1253b2bd4924d660aa9167262f4a79e2bdb257f98a2003b1fc2636375780c

See more details on using hashes here.

Provenance

The following attestation bundles were made for palinex-0.0.5.tar.gz:

Publisher: release.yml on Hellblazer/palinex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file palinex-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: palinex-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for palinex-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9e5f63f6c9c1874748da84a25d26572b3f8abd9d09016d3a3806df5a8e59edf4
MD5 058d3adcec81fa4790418cb3841a1b1f
BLAKE2b-256 edde048ec03017c9c12ee2881f7c2ee53efd4de257f04d18d54beb506efc40bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for palinex-0.0.5-py3-none-any.whl:

Publisher: release.yml on Hellblazer/palinex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page