Interface ExecutorRunRequest

One call of a forged tool, as the forge hands it to an executor.

interface ExecutorRunRequest {
    code: string;
    input: unknown;
    globals: Readonly<Record<string, unknown>>;
    timeoutMs: number;
    memoryMB: number;
    signal?: AbortSignal;
}

Properties

code: string

The forged source, already validated; it defines execute(input) or run(input).

input: unknown

The call's argument. The forge passes it on as JSON.

globals: Readonly<Record<string, unknown>>

The functions the grant allows, under the global names forged code calls them by (fetch, fs, crypto). Under a ceiling they are the broker's.

timeoutMs: number

The call's wall-clock limit, in milliseconds.

memoryMB: number

The call's memory budget, in megabytes. An executor that cannot enforce it reports usage only.

signal?: AbortSignal

Under a ceiling, aborted when the call's handle ends (its deadline or its end). An executor may stop the guest on it; the broker refuses capability calls after it either way.