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

Method get

packages/computer/src/workspace.ts:1042–1057  ·  view source on GitHub ↗
(id: string, options: { backend?: string } & Record<string, unknown> = {})

Source from the content-addressed store, hash-verified

1040 }
1041
1042 async get(id: string, options: { backend?: string } & Record<string, unknown> = {}) {
1043 const backendId = this.#resolveId(options.backend) || this.#defaultId;
1044 const { shell, handle: dispatchHandle } = await this.#shellFor(backendId);
1045 const { backend: _backend, ...rest } = options;
1046 let execHandle: unknown;
1047 try {
1048 execHandle = await (shell.get as unknown as (e: string, o: typeof rest) => Promise<unknown>)(
1049 id,
1050 rest,
1051 );
1052 } catch (error) {
1053 this.#onError(backendId, dispatchHandle, error);
1054 throw error;
1055 }
1056 return this.#wrapHandle(backendId, dispatchHandle, execHandle);
1057 }
1058
1059 async kill(
1060 id: string,

Callers

nothing calls this directly

Calls 2

#wrapHandleMethod · 0.95
#shellForMethod · 0.80

Tested by

no test coverage detected