Interface ForgedCodeExecutor

Runs forged JavaScript for SandboxedToolForge.

isolates is the executor's own claim that forged code reaches nothing of the host (its memory, globals or modules) except through the functions it is handed. The library's in-process executor declares false. The library does not check another executor's claim; it is what that executor's author says.

interface ForgedCodeExecutor {
    name: string;
    isolates: boolean;
    run(request): Promise<ExecutorRunResult>;
    ready?(): Promise<void>;
}

Implemented by

Methods

Properties

Methods

  • Optional. Resolves once the executor can run code and rejects with the reason when it cannot. The engine awaits it before a forge's test cases, so a forge on an executor that cannot run is refused with that reason before any test or review.

    Returns Promise<void>

Properties

name: string

A short name for logs and reports, such as in-process.

isolates: boolean

Whether forged code reaches the host only through the functions it is handed.