Skip to content

About

Unified API Adapter — joins the boj-server protocol taxonomy (MCP, LSP, DAP, BSP, NeSy, Agentic, Fleet, gRPC, REST) into one Idris2-proven ABI with a Zig transport dispatch table: every named protocol either works or refuses (UAPI_ERR_UNSUPPORTED); C headers generated from the Idris2 ABI.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Unified API Adapter

Code licence: MPL-2.0 Docs licence: CC-BY-SA-4.0 Quantum-Safe Provenance

Rhodium Standard Repository K9 conformance OpenSSF Scorecard SonarQube Quality Gate Archived in Software Heritage

Idris Inside Zig Zero-overhead FFI Green Web

An Idris2-defined ABI with pure Zig FFI and API implementations for estate service protocols. The current shared library dispatches synchronous calls to caller-supplied REST and MCP callbacks through C-compatible declarations.

Important

Status: experimental callback registry implemented. The Zig shared library supports registration, calls, unregistration and destruction, with explicit refusals for unsupported tags and invalid state. Hosted checks compare 1,024 runtime cases with a fresh Idris2 oracle and exercise lifetime/reentrancy contracts. Built-in HTTP/MCP clients and complete source-to-boundary refinement remain open. See Layers and plan for the distinction between current and planned work.

What this is

This adapter connects two parts of the estate; connector-pool integration is still planned:

  • the protocol taxonomy from boj-server (Boj.Protocol): nine wire protocols (MCP, LSP, DAP, BSP, NeSy, Agentic, Fleet, gRPC, REST) with an Idris2-proven tag encoding (mirrored in Zig and seam-tested in boj-server; here both the Idris2 model and Zig runtime classifier exist);

  • the HTTP connector pool from developer-ecosystem/zig-api (connector.zig, uapi_connector_*), the only one of those protocols with a working client today.

In boj-server the taxonomy is a column of the cartridge catalogue: it records which protocols a cartridge exposes, and nothing routes a call by it. This adapter makes it a dispatch table.

The design rule: every protocol the ABI names either works or refuses. The current registry supports caller-supplied REST/MCP handlers; other known tags refuse. See the installed uaa_registry.h for operation-specific status values. A successful callback does not establish remote delivery.

Layers and plan

Layer Content Source

Idris2 ABI (src/interface/Abi/)

Protocol tag set and round-trip proofs; open endpoint registry; proof that dispatch is total and an unimplemented protocol maps to UAPI_ERR_UNSUPPORTED

boj-server Boj.Protocol, zig-api ZigApi.ABI.Connector

Zig runtime (src/interface/ffi/)

Implemented: synchronous borrowed callback registry for REST/MCP; other tags refuse. Planned: integrate the REST connector and add MCP HTTP/stdio clients.

zig-api connector.zig, core.zig; MCP is new

Foreign declarations (src/interface/ffi/include/uaa_registry.h)

Implemented C-compatible declarations for the Zig runtime. Full mechanical generation and correspondence with Idris2 remain proof obligations.

Idris2 ABI contracts; Zig implementation

Once the adapter is published, developer-ecosystem/zig-api and boj-server take it as a pinned dependency instead of carrying their own copies, and UNIFIED-ZIG-API-STACK.adoc points here. Its first new consumer is svalinn (the stapeln edge gateway), which reaches vordr over MCP through it.

Proof obligations follow the estate proof policy (standards/3-practice/PROOF-POLICY.adoc): Idris2 for the ABI, Kani for the unsafe and FFI seams of Rust callers.

Proof scope: see the proof ledger. Idris2 model proofs, exhaustive native checks and Atoma’s closed scalar source interpretation are distinct evidence. The scalar classifier is checked over all 256 byte tags against the Idris2 decoder; compiler refinement, pointer provenance and the stateful callback boundary remain open. Consumers must serialize access, retain borrowed callback/context lifetimes and destroy each live handle exactly once.

Where to go next

  • The repository map: generated; what every directory is for.

  • ROADMAP: milestones and next actions.

  • unified-api-adapter_chora.deed: the repo deed. It says what this repository is and is not, and where it sits in the estate.

Licence

Code, configuration and scripts are Mozilla Public License 2.0 (MPL-2.0); prose documentation is CC-BY-SA-4.0. Both texts live in LICENSES/, and per-file SPDX-License-Identifier headers are authoritative. The GitHub-detected licence is MPL-2.0 (the root LICENSE). Long-term attribution uses Quantum-Safe Provenance — see the Quantum-Safe Provenance exhibit.

About

Unified API Adapter — joins the boj-server protocol taxonomy (MCP, LSP, DAP, BSP, NeSy, Agentic, Fleet, gRPC, REST) into one Idris2-proven ABI with a Zig transport dispatch table: every named protocol either works or refuses (UAPI_ERR_UNSUPPORTED); C headers generated from the Idris2 ABI.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages