UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

22 lines (21 loc) 624 B
import { u as normalizeAgentId } from "./session-key-B_NoIfpX.js"; //#region src/gateway/hooks-policy.ts /** Resolves configured hook agent ids, or undefined when all agents are allowed. */ function resolveAllowedAgentIds(raw) { if (!Array.isArray(raw)) return; const allowed = /* @__PURE__ */ new Set(); let hasWildcard = false; for (const entry of raw) { const trimmed = entry.trim(); if (!trimmed) continue; if (trimmed === "*") { hasWildcard = true; break; } allowed.add(normalizeAgentId(trimmed)); } if (hasWildcard) return; return allowed; } //#endregion export { resolveAllowedAgentIds as t };