feat(truapi-server): add host logic primitives#255
Conversation
Adds the canonical testing module (api/testing.rs) and its v01/v02/versioned wiring used by the Rust host runtime and generated clients.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
2cc45b1 to
8ad3cf9
Compare
a5e9e7c to
a2f623f
Compare
|
Boundary question before this layer settles: #254 looks like protocol/runtime mechanics, but this PR makes The concern is mostly architectural, not a correctness nit. If the intended architecture is that
That would let the stack land without locking us into two competing host SDKs. The app migration path can then be: generated TrUAPI dispatcher -> useragent-kit implementation -> platform callbacks only for UI/storage/permissions/navigation. |
8ad3cf9 to
8ddbe78
Compare
a2f623f to
96bec3b
Compare
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.
96bec3b to
8035a9d
Compare
8ddbe78 to
3202591
Compare
3202591 to
fb3e219
Compare
8035a9d to
a696d4e
Compare
|
@replghost
|
a696d4e to
a3e6efa
Compare
valentinfernandez1
left a comment
There was a problem hiding this comment.
Just small nit about versioned enums but aside from that this PR looks solid
|
Thought I would past one "potential" security finding with claude: "SSO pairing (ECDH + HKDF + AES-GCM), entropy derivation, sessions, permissions, account derivation, dotNS. But these functions have essentially no non-test callers on this branch — the dispatcher that wires them lands in 04b+. The verify pass proved this repeatedly, which is why even the "security-critical" finding got downgraded to latent. So: real hardening issues in not-yet-reachable code — and that's the ideal moment to fix them, before the wiring makes them live. Nothing here is a confirmed present-day exploit; the crypto that is exercised tested clean." |
…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.
934973c to
7bd57b8
Compare
a3e6efa to
fa642c1
Compare
Adds the host-agnostic
truapi-serverlogic primitives for session state, permissions, product accounts, SSO pairing/messages, dotns routing, and statement-store handling.Stack
Part of the Rust core runtime port (umbrella: #104), split into a reviewable stack. Merge bottom-up.
Local verification
cargo build --workspace --all-targets --all-featurescargo +nightly fmt --checkcargo +nightly clippy --workspace --all-targets --all-features -- -D warningscargo test --workspace --all-features