From 1b5281e0c1ab3f3b81982e12bef04ad69cca12e0 Mon Sep 17 00:00:00 2001 From: tone Date: Fri, 28 Nov 2025 11:08:03 +0800 Subject: [PATCH] feat: add session and request handling to CallIncomingBeforeCtx and CallIncomingCtx interfaces --- src/core/RPCPlugin.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/RPCPlugin.ts b/src/core/RPCPlugin.ts index 31e0b85..96207d9 100644 --- a/src/core/RPCPlugin.ts +++ b/src/core/RPCPlugin.ts @@ -21,11 +21,14 @@ export interface CallOutgoingCtx extends CallOutgoingBeforeCtx { } export interface CallIncomingBeforeCtx extends BaseHookCtx { - + session: RPCSession; + request: unknown; + setRequest: (req: unknown) => void; } export interface CallIncomingCtx extends CallIncomingBeforeCtx { - + response: unknown; + setResponse: (res: unknown) => void; } export type NormalMethodReturn = Promise | void;