groups

groups.createFromClusters

createFromClusters(clusters: Record<string, string[]>, specOverrides?: Partial<GroupSpec>): string[]

Create groups from an explicit cluster map.

Each key in clusters becomes a group name; its value is the node IDs to include in that group.

Not undoable. Emits "group:created" for each created group.

clustersRecord<string, string[]>Map of clusterName → nodeIds[].
specOverridesPartial<GroupSpec>Optional partial GroupSpec applied to every created group (merged after the name is set from the cluster key).

Returns: string[]