Lispex Images

A Lispex Image is a machine-readable picture of exact .lspx source bytes, fixed down to the byte. Native, npm, and the browser Playground handle them.

How to reason about it

  • Create one page with lispex image encode --source rule.lspx --out rule.lspx.png. Sources that need several pages require the fixed .lspx-images.zip destination. A mismatched suffix fails before output.
  • Inspect format/profile identifiers, page count, exact-source identity, and every integrity commitment with lispex image inspect --image rule.lspx.png. Inspection never prints the source.
  • Recover byte-for-byte source with lispex image decode --image rule.lspx.png --out recovered.lspx. Existing outputs are never overwritten.
  • Run only after full decoding, integrity checks, parity checks, and a rebuild that matches the stored bytes exactly, with lispex run --image rule.lspx.png.
  • Line endings, comments, spacing, and Unicode bytes survive the round trip exactly. The image represents source bytes, not only parsed forms.
  • In the Playground, Create image uses the editor bytes, Open image proves a local PNG/ZIP before preview, page controls extract only proved PNG pages, Recover source changes the editor without running it, and Run image remains a separate explicit action.
  • After the image is fully proved, use it as Vouch source context with --source-image. Vouch adds producer authentication, recipient trust policy, request binding, current replay, and the local gate decision.

Exact image commands

1. Encode exact source

SH
lispex image encode --source refund-window.lspx --out refund-window.lspx.png

2. Inspect public commitments

SH
lispex image inspect --image refund-window.lspx.png

3. Recover the exact bytes

SH
lispex image decode --image refund-window.lspx.png --out recovered.lspx

4. Prove and run explicitly

SH
lispex run --image refund-window.lspx.png

A common mistake

Screenshots, resizing, color conversion, metadata injection, recompression, page removal, and page reordering are rejected. This is an exact digital interchange format, not OCR or a camera-readable code.

Product roles

  • A Lispex Image is source-equivalent public data with exact-byte integrity.
  • Native and npm expose the same file commands. The public WebAssembly build exposes the same Rust image operations for embedding, and the Playground wraps them in a local file UI.
  • Native accepts --source-image throughout Vouch identity, policy, issue, inspect, authentication, re-execution, and gate. npm accepts it for identity, policy, and authenticated verification. The recipient supplies the exact input and applies the request-bound authority chain.

Keep going

Once the workflow is comfortable, check the runtime chooser before moving it into a local tool or deployment.

Learning Path · Choosing Where to Run