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

Method startRuntime

packages/computer/tests/script-runner-worker.ts:101–109  ·  view source on GitHub ↗
(input: { source: string; id: string })

Source from the content-addressed store, hash-verified

99 }
100
101 async startRuntime(input: { source: string; id: string }) {
102 await this.#workspace.fs.mkdir("/workspace", { recursive: true });
103 const handle = await this.#workspace.runtime.exec(input.source, {
104 backend: "worker-javascript",
105 id: input.id,
106 });
107 void handle.result().catch(() => undefined);
108 return handle.id;
109 }
110
111 async getRuntime(id: string, resume?: "tail") {
112 try {

Callers 1

fetchMethod · 0.80

Calls 3

mkdirMethod · 0.65
execMethod · 0.65
resultMethod · 0.65

Tested by

no test coverage detected