/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { AccessControlServer } from "#behaviors/access-control"; import { Timer } from "@matter/general"; import { GroupMessageEventInfo } from "@matter/protocol"; import { FabricIndex, GroupId } from "@matter/types"; import { Groupcast } from "@matter/types/clusters/groupcast"; declare const GroupcastBase: import("../../index.js").ClusterBehavior.Type, import("@matter/types").ClusterType.Concrete, new () => {}, "groupcast">; /** * This is the default server implementation of {@link GroupcastBehavior}. * * The Groupcast cluster is node-scoped and must be placed on the root endpoint. * Use {@link GroupcastServer.with} to enable the desired features (e.g. "Listener", "Sender"). * * Key behaviors: * - Derives the Membership attribute from its single-owner sources (groupProperties + GKM groupTable/groupKeyMap); * legacy Groups cluster groups appear automatically via their groupTable entries. * - Drives {@link FabricGroups} multicast address policy from the derived membership. * - Registers an {@link AccessControlServer.AuxAclObservable} to supply synthetic ACL entries for groups * with `hasAuxiliaryAcl=true`. AccessControlServer calls back to collect entries when needed. */ export declare class GroupcastServer extends GroupcastBase { #private; internal: GroupcastServer.Internal; readonly state: GroupcastServer.State; static readonly schema: import("@matter/model").ClusterModel; initialize(): void; joinGroup(request: Groupcast.JoinGroupRequest): Promise; leaveGroup(request: Groupcast.LeaveGroupRequest): Groupcast.LeaveGroupResponse; updateGroupKey(request: Groupcast.UpdateGroupKeyRequest): Promise; configureAuxiliaryAcl(request: Groupcast.ConfigureAuxiliaryAclRequest): void; groupcastTesting(request: Groupcast.GroupcastTestingRequest): void; [Symbol.asyncDispose](): Promise; } export declare namespace GroupcastServer { /** Non-persistent internal state for GroupcastServer. */ class Internal { /** * Observable that holds all auxiliary ACL entries supplied by this cluster. * AccessControlServer subscribes to this and rebuilds its ACL cache whenever it emits. */ auxAcl: AccessControlServer.AuxAclObservable; /** Ends GroupcastTesting once its duration elapses. */ testingTimer?: Timer; /** Handler for SessionManager.onGroupMessage, attached while fabricUnderTest is set. */ groupMessageHandler?: (info: GroupMessageEventInfo) => void; /** * `fabricIndex:groupId` keys of groups a groupcast command intentionally kept as sender-only while emptying * their endpoints. The groupTable$Changed prune consumes these so it deletes only externally-emptied groups * (legacy RemoveAllGroups = kDeleteGroupIfEmpty), never a spec-compliant sender-only survivor * (LeaveGroup with the Sender feature = kKeepGroupIfEmpty). */ retainedSenderOnly: Set; /** True while a debounced derive is scheduled but has not yet acquired the groupcast.state lock. */ derivePending: boolean; /** * `fabricIndex:groupId` keys of groups that left the GKM groupTable, awaiting the debounced derive's * kDeleteGroupIfEmpty prune. Accumulated because coalescing discards each event's oldTable. */ pendingTableRemovals: Set; /** Fabric indices of departed fabrics whose Groupcast-owned state the debounced derive must drop. */ pendingFabricCleanups: Set; } /** A single persisted {@link GroupcastServer.State.groupProperties} entry. */ type GroupPropertiesEntry = { fabricIndex: FabricIndex; groupId: GroupId; mcastAddrPolicy: Groupcast.MulticastAddrPolicy; hasAuxiliaryAcl: boolean; }; /** Default state overrides for GroupcastServer. */ class State extends GroupcastBase.State { /** * Implementation-defined maximum membership count (min 10 per spec). * Set to 2 * GKM.maxGroupsPerFabric (44) so per-fabric quota floor(44/2)=22 aligns exactly * with GKM's per-fabric cap. Even number avoids spillover semantics. */ maxMembershipCount: number; /** Implementation-defined maximum multicast address count (min 1 per spec). */ maxMcastAddrCount: number; /** Persisted per-group existence + policy metadata; the authoritative source for the derived Membership. */ groupProperties: GroupPropertiesEntry[]; } } export {}; //# sourceMappingURL=GroupcastServer.d.ts.map