openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
29 lines (28 loc) • 1.39 kB
JavaScript
import { o as getPluginRuntimeGatewayRequestScope } from "./gateway-request-scope-BvvDhs5D.mjs";
import { f as resolveAgentWorkspaceDir } from "./agent-scope-config-DmXgFGKP.mjs";
import { Li as validateHooksStatusParams } from "./src-BX8OAe1J.mjs";
import "./agent-scope-BwB8YH6y.mjs";
import { l as getActivePluginRegistry } from "./runtime-ezCEpumg.mjs";
import { t as assertValidParams } from "./validation-DwNk6A-B.mjs";
import { t as loadWorkspaceHookEntries } from "./workspace-DyN-emhI.mjs";
import { t as buildWorkspaceHookStatus } from "./hooks-status-BhCdWZTN.mjs";
import { t as resolveAgentIdOrRespondError } from "./agent-id-shared-YyMfd879.mjs";
//#region 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);
} };
//#endregion
export { hooksStatusHandlers };