MCPcopy Create free account
hub / github.com/TanStack/ai / exec

Method exec

packages/ai-sandbox-cloudflare/src/handle.ts:195–208  ·  view source on GitHub ↗
(
    command: string,
    opts?: ProcessOptions,
  )

Source from the content-addressed store, hash-verified

193 }
194
195 private async exec(
196 command: string,
197 opts?: ProcessOptions,
198 ): Promise<ExecResult> {
199 const result = await this.sandbox.exec(command, {
200 ...(opts?.cwd ? { cwd: this.abs(opts.cwd) } : { cwd: this.workdir }),
201 ...(opts?.env ? { env: opts.env } : {}),
202 })
203 return {
204 stdout: result.stdout,
205 stderr: result.stderr,
206 exitCode: result.exitCode,
207 }
208 }
209
210 private spawnProcess(
211 command: string,

Callers 1

constructorMethod · 0.95

Calls 2

absMethod · 0.95
execMethod · 0.65

Tested by

no test coverage detected