panproto

panproto

@panproto.dev

Schematic version control. panproto.dev

34 followers8 following36 posts

panproto reposted

We have a new release (v0.13.0) that introduces a bunch of new community management tooling. There is now one portable path from a governed definition change through consequence analysis, review, verification, signed release, resumable migration, federation, and exit.

github.comRelease v0.13.0 · idiolect-dev/idiolectAdded Community control plane for 0.13.0. The new idiolect-community crate and CLI lifecycle provide versioned idiolect.toml workspaces, role-aware maintainer/consent/vote/steward/hybrid governanc...
View full thread

Implicit indices now work in eliminator equations. head : Vec(succ n) → A can omit n at the call site. panproto can infer it from the vector. The nil case is impossible. Including it is rejected as unreachable.

Didactic can attach an indexed family to Model fields. For example, a record with kind="number" can require a numeric body, and kind="text" can require text. Construction, JSON decoding, and immutable updates enforce the same cross-field dependency.

View full thread

Constructors may refine result indices. For instance: nil : Vec(0) and cons : A × Vec(n) → Vec(succ n). Panproto uses those refinements during type checking. A constructor or branch at the wrong index is rejected.

User-defined eliminators may have dependent motives. eval : Expr(t) → El(t) is checked branch by branch after refining t. Returning an integer carrier from a Boolean expression branch is a type error.

You can now declare arbitrary indexed families, such Vec(n), Expr(t), Matrix(rows, columns), or Term(context, type). Family parameters form dependent telescopes, so a later parameter may depend on an earlier one.

The panproto book has been expanded across all four sections: tutorials, how-to guides, reference, and explanation. New material covers morphism search, alignment evidence, and schema spans. Existing pages have been revised against the current APIs and command-line behavior.

panproto.devpanproto | schematic version controlOne engine for schematic version control within and across any schema language. Built on generalized algebraic theories for provably correct migrations.

The network has one variable per source vertex. Its domain contains kind-compatible target vertices plus ⊥, which means the vertex is omitted from the span. Each choice has an integer cost. The solver returns the minimum-cost complete assignment without enumerating every candidate.

Four solvers are available: bucket elimination in the (min, plus) semiring; hybrid best-first search with EDAC*; the same search with a counting Hall propagator for injective maps; and weighted partitioning for maximum common induced sub-schemas.

Given two schemas, automated migration discovery now builds a cost function network and minimizes its integer cost. The result includes a certificate stating whether optimality was proved and which solver ran.

We have a new release (v0.70.0) that adds a Swift SDK. Every entry point of the C ABI is now reachable from Swift, so iOS or macOS apps can migrate records between schema versions, check compatibility, and keep a local schema history with no server in the path.

github.comRelease v0.70.0 · panproto/panprotoAdded panproto is reachable from Swift (bindings/swift): a SwiftPM package linking libpanproto_c, binding all 120 C ABI entry points, which is the same surface the Haskell binding consumes, so th...

We're applying for grant funding to support further panproto development (including hiring a developer and a postdoc) and are looking for users who would be willing to write a letter of support. If that sounds like you, please get in touch with @aaronstevenwhite.io!

We have a new release (v0.55.0) that expands panproto's C ABI to 123 entry points and brings the Haskell bindings to full parity with the Python and TypeScript bindings. Schemas, migrations, lenses, the expression language, version control, and source parsing are all now reachable from Haskell.

github.comRelease v0.55.0 · panproto/panprotoAdded Haskell bindings at full parity with the Python SDK (bindings/haskell, crates/panproto-c): the Haskell panproto package now reaches the whole engine, matching the Python SDK across schema c...

We have a new release (v0.48.0) that adds the put-direction of the parse-emit lens: decorate takes an abstract schema and attaches the desired layout so the emitter renders byte-for-byte. The release also adds a sealed AbstractSchema/DecoratedSchema typed surface.

github.comRelease v0.48.0 · panproto/panprotoAdded decorate as the put-direction of the parse / decorate / emit lens (panproto-parse, panproto-schema, panproto-lens, panproto-gat): a generator that takes an abstract schema (vertex kinds, ch...

We have a new release (v0.44.0) that adds dependent sorts to the panproto GAT macros (class!, inductive!, derive_theory!) and exposes JSON/YAML/Nickel theory DSL loaders on the Python bindings as Theory.{from_json, from_yaml, from_nickel, from_path}.

github.comRelease v0.44.0 · panproto/panprotoAdded panproto-gat-macros::class!, inductive!, and derive_theory! accept dependent sorts in argument and output positions (closes #59). The macros previously parsed each argument and output as a s...

We have a new release (v0.41.0) that includes our first Haskell bindings via two new packages: (i) a panic-safe C ABI (panproto-c) generated by safer-ffi; and (ii) a cabal package that links against it. Bindings currently handle protocols and schemas. Migrations, instances, and lenses to follow.

github.comRelease v0.41.0 · panproto/panprotoAdded panproto-c (new crate): panic-safe C ABI for non-Rust language bindings. Generated by safer-ffi; every #[ffi_export] entry point runs through std::panic::catch_unwind and converts panics, in...

We have a new release (v0.40.0) that adds a generic AST walker and uses it to implement parse-emit pairs as asymmetric lenses. The walker is parameterized by a tree-sitter grammar.json, so it will work for any language that has one.

github.comRelease v0.40.0 · panproto/panprotoAdded panproto-parse (AstParser::emit_pretty): new trait method that renders a by-construction Schema (no parse-recovered byte positions, no interstitials) to source bytes by walking the language'...
View full thread

Source code in any programming language supported by treesitter also parses into the same graph format. So refactoring a Rust codebase and migrating an OpenAPI spec can be viewed as the same operation underneath.

This setup allows schemas to have a git-style history of their own as part of panproto's VCS. Merges work on schema structure rather than file text, so conflicts hit when two branches edit the same schema file can be surfaced in a legible way.

View full thread

Everything above runs on the schema language-general graph. So the same machinery composes lenses across schema language boundaries, like OpenAPI to AsyncAPI or MongoDB to Cassandra.

The system flags what survives cleanly and what loses information when one language has no analogue for a construct in the other.

View full thread

You can also ask what changed without generating a migration. Panproto classifies each diff entry as breaking or non-breaking, using the rules of the specific schema language. This classification can be run from the panproto CLI in CI to gate PRs that touch a schema before they reach review.

Very importantly, migrations are composable. You can chain v1 to v2 to v3 to v4 into a single converter that walks records all the way through. When auto-generation needs help on a particular field, you can drop in a value-level transform written in a small built-in expression language.

View full thread

What's even better is that adding support for a new schema language just involves writing a description of it. Nothing about the underlying engine needs to change.

The generated converter goes both directions. The forward direction turns an old record into a new one; the backward direction converts it back, recovering whatever the forward path dropped (if anything) via a side channel called a complement.

That means you can hand it two versions of a schema in any of the languages it supports, and it'll computes the diff, classify whether the change is breaking, and generate a converter that turns old records into new ones.

You are up to date.