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
src/palinex/— Python package. Typed builders that emit v0.9-conformant payloads from native Python; structural validation built in, optional jsonschema deep validation viapip install palinex[validate]. Also ships an MCP server (python -m palinex.mcp) and an HTTP sidecar (palinex serve).web/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.web/host-bridge.html— reference wrapper that embeds the renderer in an iframe and implements thea2ui.request/a2ui.responsepostMessage protocol. For hosts (Claude Code MCP UI resources, custom web shells) that bridge agent-side data sources to the renderer.web/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 viapalinex[validate]running in-browser.plugin/— Claude Code plugin (manifest + MCP server registration + skills + commands). Installable directly from the GitHub URL; auto-starts the palinex MCP server at Claude Code session boot.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 web/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.
Release files for palinex 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| palinex-0.4.2.tar.gz | 137.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| palinex-0.4.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 167.2 kB
Release files / palinex-0.4.2.tar.gz
| Download URL | palinex-0.4.2.tar.gz |
|---|---|
| Size | 137.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd95d2242e72196a91cf1cfb1ec3a648fa95c27f7a3c91484a05ce0f0d93ea3c
|
|
BLAKE2b-256 checksum How to use checksums |
689d131d9ae2e51630f3590b44f967fb7f66f60d604652adb975f037d952080d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency logRelease files / palinex-0.4.2-py3-none-any.whl
| Download URL | palinex-0.4.2-py3-none-any.whl |
|---|---|
| Size | 29.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
235a90dadcaea05a0eb8f9152c0d4b6108e3e60bab79fa61983e35fd9a69d13f
|
|
BLAKE2b-256 checksum How to use checksums |
401d1d2e1242b6bd8392dcad47d3c2bd163370a7dcab3f0ddd407d0745288f42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 23, 2026.
Transparency log