feat(web): full-power RPC access + typed JSON proxy endpoint (#1983)

- extend web controller bindings to cover full RPC service set
- update rpc_service API wiring and session/controller integration
- generate trait-level json_call_method in rpc codegen
- route restful proxy-rpc requests via scoped typed clients
- add json-call regression tests and required Sync bound fixes~
This commit is contained in:
KKRainbow
2026-03-11 20:32:37 +08:00
committed by GitHub
parent 80043df292
commit 330659e449
14 changed files with 546 additions and 61 deletions
+6 -2
View File
@@ -339,10 +339,14 @@ impl Session {
self.data.clone()
}
pub fn scoped_rpc_client(&self) -> SessionRpcClient {
pub fn scoped_client<F: rpc_types::__rt::RpcClientFactory>(&self) -> F::ClientImpl {
self.rpc_mgr
.rpc_client()
.scoped_client::<WebClientServiceClientFactory<BaseController>>(1, 1, "".to_string())
.scoped_client::<F>(1, 1, "".to_string())
}
pub fn scoped_rpc_client(&self) -> SessionRpcClient {
self.scoped_client::<WebClientServiceClientFactory<BaseController>>()
}
pub async fn get_token(&self) -> Option<StorageToken> {