Repository navigation
Recognise TrUAPI hosts that inject only the frame transport - #48
Merged
Merged
Conversation
Since trinity-user-agents #2193 the TrUAPI container no longer publishes window.__HOST_API_CLIENT__. It publishes window.__HOST_API_TRANSPORT__ instead, keeps a legacy __HOST_API_PORT__ for SDKs below 0.32, and still consumes __truapi_localhost. awaitHostRuntime() saw none of its markers, waited 3 s and picked the codec-1 client, which the Rust core does not answer. Treat __HOST_API_TRANSPORT__ as a TrUAPI marker. Our SDK (truapi 0.26) then talks over the legacy port, which the host keeps for SDKs like it.
|
pr48-terminal.paseo · logs |
This branch was successfully deployed
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.
Why
trinity-user-agents #2193 (merged 2026-11-19) changes what the TrUAPI container puts on
window:window.__HOST_API_CLIENT__.window.__HOST_API_TRANSPORT__instead.window.__HOST_API_PORT__for SDKs below 0.32, and still consumes__truapi_localhost.awaitHostRuntime()recognised TrUAPI only by__HOST_API_CLIENT__or__truapi_localhost. On a host with #2193 it would see neither marker, wait 3 s and load the codec-1 client, which the Rust core does not answer. Account, payments and storage would all fail. The first nightlies with #2193 are expected tonight. The current nightlies (2ad4a9e) and release builds (codec 1) are not affected.What
lib/host/detect.ts:__HOST_API_TRANSPORT__now counts as a TrUAPI marker, alongside the existing two.product-sdk-host0.30.1 /truapi0.26) then talks over the legacy__HOST_API_PORT__, which the host keeps for SDKs like it. No dependency change: the latest publishedtruapi(0.31.0) does not know the new transport either. We move to 0.32 once it is out, before the host drops the port.lib/host/sdk.ts: comment only.Testing
tests/host-runtime-codec.test.ts: a host that injects only the transport, and a transport that lands late. Both fail on the olddetect.ts.tscand lint are clean.