Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/core / / Sandbox

Interface: Sandbox

Defined in: packages/core/src/contracts/sandbox.ts:8

Pluggable sandbox interface for tool / skill execution. Concrete implementations live in @graphorin/security (worker-threads, isolated-vm, docker, none).

Stable

Extended by

Properties

PropertyModifierTypeDescriptionDefined in
idreadonlystringIdentifier of the sandbox flavor ('worker-threads', 'isolated-vm', …).packages/core/src/contracts/sandbox.ts:10

Methods

run()

ts
run<TInput, TOutput>(code, opts): Promise<SandboxResult<TOutput>>;

Defined in: packages/core/src/contracts/sandbox.ts:11

Type Parameters

Type Parameter
TInput
TOutput

Parameters

ParameterType
codeSandboxCode
optsSandboxRunOptions&lt;TInput&gt;

Returns

Promise<SandboxResult&lt;TOutput&gt;>