3 files changed
+26
-6
No files matched your search
@@ -800,8 +800,11 @@ object HermesWsClient {
|
||||
* The deferred is completed on the matching [WsEvent.RpcResult] /
|
||||
* [WsEvent.RpcError], rejected after [timeoutMs] (no response), or
|
||||
* rejected by [rejectAllPending] when the socket closes.
|
||||
*
|
||||
* Untyped escape hatch, module-internal on purpose: gateway methods in the contract go through
|
||||
* [call] / [requestTyped] with an `RpcMethods` descriptor. Only `gateway.ping` and tests use this.
|
||||
*/
|
||||
fun request(
|
||||
internal fun request(
|
||||
method: String,
|
||||
params: Map<String, Any> = emptyMap(),
|
||||
timeoutMs: Long = REQUEST_TIMEOUT_MS,
|
||||
@@ -975,9 +978,12 @@ object HermesWsClient {
|
||||
|
||||
/**
|
||||
* Send a JSON-RPC request with the given [method] and optional [params].
|
||||
*
|
||||
* Untyped escape hatch, module-internal on purpose: contract methods use the typed [send] overload.
|
||||
* Kept for the legacy `*.respond` fallbacks (clarify, sudo, secret, vault) that have no contract entry.
|
||||
* @return the request id used (can be matched against [WsEvent.RpcResult]).
|
||||
*/
|
||||
fun send(
|
||||
internal fun send(
|
||||
method: String,
|
||||
params: Map<String, Any> = emptyMap(),
|
||||
onSent: ((String) -> Unit)? = null,
|
||||
|
||||
@@ -309,10 +309,9 @@ class RawRpcParamsRatchetTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiset of remaining unmigrated raw RPC call sites in `app/src/main/java/com/m57/hermescontrol/`.
|
||||
* Excludes `data/ws/HermesWsClient.kt::SESSION_EVENTS_SINCE` which is migrated to typed `RpcMethods`.
|
||||
* Notice HermesWsClient.kt retains its other raw uses: `CLIENT_CAPABILITIES`, `PROMPT_SUBMIT`,
|
||||
* and `SESSION_REDIRECT`.
|
||||
* Multiset of remaining raw RPC call sites for contract methods in `app/src/main/java/com/m57/hermescontrol/`.
|
||||
* Empty: every contract method goes through `RpcMethods`. Keep it empty; new contract methods must be typed.
|
||||
* The untyped `request`/`send` stay module-internal for `gateway.ping` and the legacy `*.respond` fallbacks.
|
||||
*/
|
||||
val BASELINE: List<String> = emptyList()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user