import { u as normalizeAgentId } from "./session-key-CnPsoqi2.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 };
