InstanceId
InstanceId: (
value) =>InstanceId
Defined in: packages/protocol/src/lib/instance.ts:8
Brands a string as an InstanceId without changing its value.
Unlike SessionId and MessageId, this factory has no auto-gen path:
an InstanceId always originates from an external source (LLM execution
plan, persisted layout, wire frame) where the ID is already chosen.
Generating one client-side would mean inventing an identity for an entity
Maelstrom didn’t create, which is never what callers want.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Example
Section titled “Example”const id = InstanceId('calendar-main');const byId = new Map<InstanceId, Vessel>();