UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

3 lines • 1.23 kB
import{o as getPluginRuntimeGatewayRequestScope}from"./gateway-request-scope-7deHmsb_.mjs";import{f as resolveAgentWorkspaceDir}from"./agent-scope-config-CG9CFpGX.mjs";import{Hi as validateHooksStatusParams}from"./src-BDZMFmKa.mjs";import"./agent-scope-Dw5XRSEh.mjs";import{l as getActivePluginRegistry}from"./runtime-Cl6PvJHC.mjs";import{t as assertValidParams}from"./validation-CM41YclJ.mjs";import{t as loadWorkspaceHookEntries}from"./workspace-BN88LYQB.mjs";import{t as buildWorkspaceHookStatus}from"./hooks-status-B5_drx-U.mjs";import{t as resolveAgentIdOrRespondError}from"./agent-id-shared-BMmKEr8l.mjs"; //!src/gateway/server-methods/hooks-status.ts const hooksStatusHandlers={"hooks.status":({params:e,respond:t,context:n})=>{if(!assertValidParams(e,validateHooksStatusParams,`hooks.status`,t))return;const r=n.getRuntimeConfig();const i=resolveAgentIdOrRespondError({rawAgentId:e.agentId,respond:t,cfg:r});if(!i)return;const a=resolveAgentWorkspaceDir(r,i.agentId);const o=[...(getPluginRuntimeGatewayRequestScope()?.pluginRegistry??getActivePluginRegistry())?.hooks.map(e=>e.entry)??[],...loadWorkspaceHookEntries(a,{config:r})];t(true,buildWorkspaceHookStatus(a,{config:r,entries:o}),void 0)}};export{hooksStatusHandlers};