API reference

petty.exec

permission: exec

petty.exec.run

run(command: string, args: string[], options?: ExecOptions): ExecResult

petty.exec.allowlist

allowlist(): string[]

Types referenced

ExecOptions

interface ExecOptions {
  /** Per-call timeout in milliseconds. Overrides manifest default. */
  timeout?: number;
}

ExecResult

interface ExecResult {
  stdout: string;
  stderr: string;
  exitCode: number;
}