Ummm, I am not sure about the lack of await just because of service bindings?
But yes, you can get back to the DO “address” either with fetch or non-callback Cloudflare native RPC.
As a side note, my “address” goes all of the way back to a particular browser using JSON RPC. I currently use HTTP between Cloudflare contexts but if I were building it today I would probably use Cloudflare native RPC between Cloudflare contexts. Regardless, it is WebSockets between DO and the browser using Partykit via the Agents DO base class and AgentClient in the browser.
Ignore the word "Agent". I'm not doing anything with LLM agents. I'm just using Agent and AgentClient because the Cloudflare acquisition of PartyKit showed up there and it provides robust WebSocket handling (reconnects, etc.). Plus the Agent scheduler has infinitely better DX than the DO native alarms.
Expose the public methods of your class as JSON-RPC methods over HTTP or WebSockets. Latest version: 0.0.5, last published: a month ago. Start using json-rpc-mixin in your project by running
npm i json-rpc-mixin
npm i json-rpc-mixin
. There are no other projects in the npm registry using json-rpc-mixin.