What to build
Migrate the five h-code RPC methods to use RpcMethodRegistry.register() instead of the static WS_METHODS / WsRpcGroup / RPC_REQUIRED_SCOPE / handler switch pattern:
todo.load — schema in packages/contracts/src/todos.ts, handler in apps/server/src/ws.ts
todo.mutate — same files
mcp.listServers — handler in apps/server/src/ws.ts
mcp.toggleServer — handler in apps/server/src/ws.ts
review.getDiffPreview — handler in apps/server/src/ws.ts
Each method migrates by calling registry.register() from its domain file (or a dedicated registration file). The handler moves out of the giant switch in ws.ts into a standalone function.
This is the vertical-slice proof that the registry pattern works end-to-end: contracts → server handler → client types.
Acceptance criteria
Blocked by
What to build
Migrate the five h-code RPC methods to use
RpcMethodRegistry.register()instead of the staticWS_METHODS/WsRpcGroup/RPC_REQUIRED_SCOPE/ handler switch pattern:todo.load— schema inpackages/contracts/src/todos.ts, handler inapps/server/src/ws.tstodo.mutate— same filesmcp.listServers— handler inapps/server/src/ws.tsmcp.toggleServer— handler inapps/server/src/ws.tsreview.getDiffPreview— handler inapps/server/src/ws.tsEach method migrates by calling
registry.register()from its domain file (or a dedicated registration file). The handler moves out of the giant switch inws.tsinto a standalone function.This is the vertical-slice proof that the registry pattern works end-to-end: contracts → server handler → client types.
Acceptance criteria
todo.loadregistered viaregistry.register()with schema, scope, and handlertodo.mutateregistered via same patternmcp.listServersandmcp.toggleServerregistered via same patternreview.getDiffPreviewregistered via same patternws.ts)WS_METHODSconstant for these 5 methodsRPC_REQUIRED_SCOPEmap for these 5 methodswsRpcScopes.test.tsstill passes (checking remaining old entries)vp checkandvp run typecheckpassBlocked by