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

Method getRuntime

packages/computer/tests/script-runner-worker.ts:111–125  ·  view source on GitHub ↗
(id: string, resume?: "tail")

Source from the content-addressed store, hash-verified

109 }
110
111 async getRuntime(id: string, resume?: "tail") {
112 try {
113 const handle = await this.#workspace.runtime.getExec(id, {
114 backend: "worker-javascript",
115 encoding: "utf8",
116 resume,
117 });
118 return { ok: true as const, result: await handle.result() };
119 } catch (error) {
120 return {
121 ok: false as const,
122 error: error instanceof Error ? error.message : String(error),
123 };
124 }
125 }
126
127 killRuntime(id: string) {
128 return this.#workspace.runtime.killExec(id, { backend: "worker-javascript" });

Callers 1

fetchMethod · 0.80

Calls 2

getExecMethod · 0.65
resultMethod · 0.65

Tested by

no test coverage detected