Polyman Documentation - v3.1.0
    Preparing search index...

    Interface ToolContext

    What a tool gets when it runs.

    interface ToolContext {
        problemDir: string | null;
        signal: AbortSignal;
        runner: CliRunner;
        sandbox: Sandbox;
        progress(line: string): void;
        setProblemDir(dir: string): void;
    }
    Index
    problemDir: string | null

    The problem folder, or null before one is created.

    signal: AbortSignal

    Aborted when the user cancels or the tool times out.

    runner: CliRunner

    Runs polyman commands.

    sandbox: Sandbox

    Checks every path the tool reads or writes.

    • Reports a line of progress, becomes a tool_progress event.

      Parameters

      • line: string

      Returns void

    • Changes the problem folder. Only create_problem uses it.

      Parameters

      • dir: string

      Returns void