Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/security / / SandboxResult

Type Alias: SandboxResult<TOutput>

ts
type SandboxResult<TOutput> = 
  | {
  durationMs: number;
  ok: true;
  output: TOutput;
}
  | {
  durationMs: number;
  error: {
     cause?: unknown;
     kind:   | "timeout"
        | "memory-exceeded"
        | "sandbox-violation"
        | "aborted"
        | "execution-failed";
     message: string;
  };
  ok: false;
};

Defined in: packages/core/dist/contracts/sandbox.d.ts:53

Result of a sandboxed run. The shape mirrors the ToolOutcome union — the runtime maps SandboxResult to ToolOutcome after the call.

Type Parameters

Type ParameterDefault type
TOutputunknown

Stable