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

Function composite

packages/computer/src/workspace.test.ts:30–41  ·  view source on GitHub ↗
(
  sync: import("@cloudflare/computer-rpc").SyncRPC,
)

Source from the content-addressed store, hash-verified

28// code; the backend's only contract is "produce a SyncRPC
29// stub that computerd would speak". A plain object is enough.
30function composite(
31 sync: import("@cloudflare/computer-rpc").SyncRPC,
32): import("@cloudflare/computer-rpc").WorkspaceRPC {
33 const notWired = () => Promise.reject(new Error("shell not wired in this test"));
34 const shell: import("@cloudflare/computer-rpc").ShellRPC = {
35 exec: notWired,
36 getExec: notWired,
37 killExec: notWired,
38 disposeExec: notWired,
39 };
40 return { sync, shell };
41}
42
43function fakeRpc(): import("@cloudflare/computer-rpc").SyncRPC {
44 const blobs = new Map<string, Uint8Array>();

Callers 2

connectFunction · 0.70
workspace.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected