refactor(#1375): type process list and kill RPC params (#1390)

This commit is contained in:
m57 authored and GitHub committed 2026-09-29 22:36:35 +03:00
1 parent 27ce528005
commit 9a09974081
6 files changed
+113 -56

No files matched your search

@@ -0,0 +1,10 @@
package com.m57.hermescontrol.data.ws.contract
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class ProcessKillParams(
@SerialName("session_id") val sessionId: String,
@SerialName("process_id") val processId: String,
)
@@ -347,6 +347,22 @@ object RpcMethods {
JsonElement.serializer(),
)
// Passthrough JsonElement results: callers keep their existing legacy decoders.
val PROCESS_LIST: RpcMethod<SessionIdParams, JsonElement> =
RpcMethod(
WsMethods.PROCESS_LIST,
SessionIdParams.serializer(),
JsonElement.serializer(),
)
// Passthrough JsonElement results: callers keep their existing legacy decoders.
val PROCESS_KILL: RpcMethod<ProcessKillParams, JsonElement> =
RpcMethod(
WsMethods.PROCESS_KILL,
ProcessKillParams.serializer(),
JsonElement.serializer(),
)
/** Every typed method. GatewayContractTest iterates this; future migrations append here. */
val all: List<RpcMethod<*, *>> =
listOf(
@@ -392,5 +408,7 @@ object RpcMethods {
CONNECTORS_OPERATION_WAKE,
SUBAGENT_LIST,
SUBAGENT_TAIL,
PROCESS_LIST,
PROCESS_KILL,
)
}