cli host#264
Draft
pgherveou wants to merge 183 commits into
Draft
Conversation
Adds the canonical testing module (api/testing.rs) and its v01/v02/versioned wiring used by the Rust host runtime and generated clients.
New crate defining the host syscall traits (storage, navigation, consent, permissions, ...) that host runtimes implement. Types are re-exported from truapi::versioned/v01 rather than redefined.
WASM host runtime that hosts implement: dispatcher, SCALE frames, subscription streams, chain runtime, host logic (sessions, SSO pairing, permissions, statement store, dotns) and the wasm bindings. Includes the committed generated dispatcher/wire-table under src/generated/.
…backs Extends the rustdoc-JSON code generator to emit the Rust dispatcher and wire table consumed by truapi-server, plus the TS host-callbacks adapter. Golden tests pin the emitted shapes.
New WASM-backed host runtime package embedding the Rust core, with web iframe and Web Worker entry points. Updates the @parity/truapi client (SCALE, sandbox, transport) and drops the obsolete explorer 0.3.2 codegen snapshot.
Updates CLAUDE.md/README, CI workflows, Makefile, deny.toml, changesets, and linguist attributes for generated code, and bumps the dotli submodule to the host integration that consumes the WASM runtime.
Adds the canonical testing module (api/testing.rs) and its v01/v02/versioned wiring used by the Rust host runtime and generated clients.
New crate defining the host syscall traits (storage, navigation, consent, permissions, ...) that host runtimes implement. Types are re-exported from truapi::versioned/v01 rather than redefined.
…backs Extends the rustdoc-JSON code generator to emit the Rust dispatcher and wire table consumed by truapi-server, plus the TS host-callbacks adapter. Golden tests pin the emitted shapes.
BREAKING CHANGE: use bare /script for the editable getUserId template, or run whoami.ts explicitly by path.
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What this adds
truapi-hostis a native CLI for running TrUAPI without a browser or mobile app. It provides both sides of the host flow:Both roles use the real Paseo Next v2 services, including LitePeople identity, the People-chain Statement Store, and Bulletin preimages.
Get started
Build and install the CLI once, then launch the signing host:
The CLI selects or creates an attested account and waits for ring readiness. If an auto-managed account has no free Statement Store slot during pairing, it retries with another account. From the command bar you can:
polkadotapp://pairing link or use/deeplink <link>;/scriptto create or run a TypeScript product script;/sessionto keep separate local host profiles;/helpto discover the remaining commands and shortcuts.Product scripts run with Bun and receive a ready-to-use global
truapiclient. They can import npm dependencies directly; Bun installs missing packages automatically.Run a script directly when an interactive session is unnecessary:
User experience
End-to-end coverage
The Playground's generated examples are also the headless compatibility suite. The battery discovers and executes all 64 exposed TrUAPI examples.
It is measured independently against both host topologies and writes browser-compatible reports consumed by the compatibility explorer.
Signing host
This command generates
explorer/diagnosis-reports/signing-host-cli.md:Pairing host
Start the product-facing host, then answer its emitted link from a signing host. The pairing-host process generates
explorer/diagnosis-reports/pairing-host-cli.mdwhen the battery completes:The live coverage exercises pairing, permissions, account and legacy signing, transaction construction, chain RPC, Statement Store proofs and subscriptions, resource allocation, push notifications, and Bulletin preimages. Remaining failures are isolated to the Chat and Payment APIs that are not currently implemented by the host.
The PR also includes Rust unit/integration coverage, generated-client parity checks, and Bun tests for diagnosis discovery and reporting.