What to build
A thin, reusable MethodRegistry<Key, Value> utility module in packages/contracts/src/. Behaves like a Map but validates at registration time — rejects duplicate keys with a clear error. Accepts register(key, value) and exposes get(key) / has(key) / entries().
This is the shared infrastructure that both the RPC method registry (Candidate 1) and the command handler registry (Candidate 2) will use.
Acceptance criteria
Blocked by
None — can start immediately.
What to build
A thin, reusable
MethodRegistry<Key, Value>utility module inpackages/contracts/src/. Behaves like aMapbut validates at registration time — rejects duplicate keys with a clear error. Acceptsregister(key, value)and exposesget(key)/has(key)/entries().This is the shared infrastructure that both the RPC method registry (Candidate 1) and the command handler registry (Candidate 2) will use.
Acceptance criteria
MethodRegistrysupportsregister(key, value)— throws on duplicate keyMethodRegistrysupportsget(key)→Value | undefinedMethodRegistrysupportshas(key)→booleanMethodRegistrysupportsentries()→Iterable<[Key, Value]>packages/contracts/src/alongside existing exportsvp checkandvp run typecheckpassBlocked by
None — can start immediately.