11import type { OpenClawConfig } from "../config/types.openclaw.js" ;
2+ import { attachPluginApiFacades } from "./api-facades.js" ;
23import type { PluginRuntime } from "./runtime/types.js" ;
34import type { OpenClawPluginApi , PluginLogger } from "./types.js" ;
45
@@ -176,7 +177,7 @@ const noopOn: OpenClawPluginApi["on"] = () => {};
176177export function buildPluginApi ( params : BuildPluginApiParams ) : OpenClawPluginApi {
177178 const handlers = params . handlers ?? { } ;
178179 const registerCli = handlers . registerCli ?? noopRegisterCli ;
179- return {
180+ return attachPluginApiFacades ( {
180181 id : params . id ,
181182 name : params . name ,
182183 version : params . version ,
@@ -260,9 +261,6 @@ export function buildPluginApi(params: BuildPluginApiParams): OpenClawPluginApi
260261 clearRunContext : handlers . clearRunContext ?? noopClearRunContext ,
261262 registerSessionSchedulerJob :
262263 handlers . registerSessionSchedulerJob ?? noopRegisterSessionSchedulerJob ,
263- scheduleSessionTurn : handlers . scheduleSessionTurn ?? noopScheduleSessionTurn ,
264- unscheduleSessionTurnsByTag :
265- handlers . unscheduleSessionTurnsByTag ?? noopUnscheduleSessionTurnsByTag ,
266264 registerSessionAction : handlers . registerSessionAction ?? noopRegisterSessionAction ,
267265 sendSessionAttachment : handlers . sendSessionAttachment ?? noopSendSessionAttachment ,
268266 scheduleSessionTurn : handlers . scheduleSessionTurn ?? noopScheduleSessionTurn ,
@@ -283,5 +281,5 @@ export function buildPluginApi(params: BuildPluginApiParams): OpenClawPluginApi
283281 handlers . registerMemoryEmbeddingProvider ?? noopRegisterMemoryEmbeddingProvider ,
284282 resolvePath : params . resolvePath ,
285283 on : handlers . on ?? noopOn ,
286- } ;
284+ } ) ;
287285}
0 commit comments