MCPcopy Create free account
hub / github.com/cloudflare/computer / createWorkspaceServer

Function createWorkspaceServer

packages/rpc/src/server.ts:326–332  ·  view source on GitHub ↗
(
  db: Database,
  runner: RunnerLike,
  options: ServerOptions = {},
)

Source from the content-addressed store, hash-verified

324// Construct the composite WorkspaceRPC. The wire serves this on
325// /ws so clients reach `.sync` and `.shell` through one session.
326export 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

Callers 2

mainFunction · 0.90
startCompositeHarnessFunction · 0.85

Calls 2

createSyncServerFunction · 0.85
createShellServerFunction · 0.85

Tested by 1

startCompositeHarnessFunction · 0.68