Skip to main content

Function: memberIdOf()

memberIdOf(familyId, memberKey): string

Defined in: packages/core/src/types.ts:47

A family member's instance id: ${familyId}-${memberKey}, with the delimiter escaped in both halves.

The escaping is not decoration. Plain concatenation is not injective — family a-b member c and family a member b-c both spell a-b-c — and because instance overrides and family-wide overrides share one flat string keyspace, that collision let an override aimed at one bot silently apply to an unrelated bot in a different family. Hyphens in tenant slugs and team names are entirely ordinary, so it was reachable without trying.

The common case is untouched: support + billing is still support-billing. Only a part that actually contains - or `` grows an escape.

Lives here rather than in family.ts because Baleybot mints the id in its constructor, and family.ts imports Baleybot.

Parameters

familyId

string

memberKey

string

Returns

string