UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

23 lines (22 loc) 657 B
import { n as normalizeAgentId } from "./agent-id-CeT3w4ap.js"; import "./session-key-BnWWjqNc.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 };