| 324 | // Construct the composite WorkspaceRPC. The wire serves this on |
| 325 | // /ws so clients reach `.sync` and `.shell` through one session. |
| 326 | export function createWorkspaceServer( |
| 327 | db: Database, |
| 328 | runner: RunnerLike, |
| 329 | options: ServerOptions = {}, |
| 330 | ): WorkspaceRPC { |
| 331 | return new WorkspaceRPCServer(createSyncServer(db, options), createShellServer(runner)); |
| 332 | } |
| 333 | |
| 334 | // Attach a capnweb RPC session to a WHATWG-shaped WebSocket. The |
| 335 | // node `ws` package's server-side sockets implement the WHATWG |