export function defaultPermissionsForRole(_role) {
    return {
        canCreateAgents: true,
        canManageSkills: true,
    };
}
export function normalizeAgentPermissions(permissions, role) {
    const defaults = defaultPermissionsForRole(role);
    if (typeof permissions !== "object" || permissions === null || Array.isArray(permissions)) {
        return defaults;
    }
    const record = permissions;
    return {
        canCreateAgents: typeof record.canCreateAgents === "boolean"
            ? record.canCreateAgents
            : defaults.canCreateAgents,
        canManageSkills: typeof record.canManageSkills === "boolean"
            ? record.canManageSkills
            : defaults.canManageSkills,
    };
}
//# sourceMappingURL=agent-permissions.js.map