Member Junction
    Preparing search index...

    Configuration for a Computer Use test. Stored as JSON in TestEntity.Configuration.

    interface ComputerUseTestConfig {
        actions?: { actionId?: string; actionName?: string }[];
        agentRunId?: string;
        browserArgs?: string[];
        browserSession?: string;
        connect?: string;
        connectType?: "auto" | "cdp" | "server";
        controllerModel?: { driverClass?: string; model: string; vendor: string };
        controllerPromptName?: string;
        headless?: boolean;
        judgeFrequency?: string;
        judgeModel?: { driverClass?: string; model: string; vendor: string };
        judgePromptName?: string;
        maxExecutionTime?: number;
        maxSteps?: number;
        oracles?: ComputerUseOracleConfig[];
        reuseExistingContext?: boolean;
        scoringWeights?: Record<string, number>;
        screenshotHistoryDepth?: number;
        viewportHeight?: number;
        viewportWidth?: number;
    }
    Index

    Properties

    actions?: { actionId?: string; actionName?: string }[]

    MJ Actions to expose as tools to the controller LLM (resolved by MJComputerUseEngine)

    agentRunId?: string

    Agent run ID to link prompt runs to (optional, typically set at runtime)

    browserArgs?: string[]

    Additional Chromium launch arguments (e.g., ["--unsafely-treat-insecure-origin-as-secure=http://example:4200"])

    browserSession?: string

    Browser session strategy. Controls how the browser context is managed.

    • "new" — Fresh context every test (default for sequential execution)
    • "shared:suite" — Shared context per suite run + worker (default for parallel execution)
    • "shared:global" — Shared context globally per worker
    • Any other string — Used as a literal key for HeadlessBrowserEngine.GetRecycled()

    When running in parallel (workerIndex is set on context), defaults to "shared:suite" so that auth state persists between tests in the same worker.

    connect?: string

    Attach to an already-running browser instead of launching one. Auto-detects the connect method from the URL scheme:

    • http(s)://… → Chrome DevTools Protocol (chromium.connectOverCDP)
    • ws(s)://… → Playwright browser server (chromium.connect)

    When set, the test driver does NOT close the browser at shutdown — the caller owns its lifecycle. headless is ignored (the external browser already decided).

    In parallel-worker test runs, HeadlessBrowserEngine is a process-global singleton — the first worker to initialize wins. All workers in a suite must agree on this endpoint or behavior is undefined.

    connectType?: "auto" | "cdp" | "server"

    Force the connect method. A raw CDP websocket also uses ws://, which auto-detect would treat as a Playwright server; set 'cdp' to override. Defaults to 'auto' (scheme-based detection). Ignored when connect is unset.

    controllerModel?: { driverClass?: string; model: string; vendor: string }

    Direct model override for controller (bypasses auto-select and prompt lookup)

    controllerPromptName?: string

    MJ AI Prompt entity name for controller

    headless?: boolean

    Run browser in headless mode (default: true)

    judgeFrequency?: string

    Judge evaluation frequency. Formats: "EveryStep", "EveryNSteps:N", "OnStagnation:N"

    judgeModel?: { driverClass?: string; model: string; vendor: string }

    Direct model override for judge

    judgePromptName?: string

    MJ AI Prompt entity name for judge

    maxExecutionTime?: number

    Maximum execution time in milliseconds (default: 300000 / 5 min)

    maxSteps?: number

    Maximum number of controller loop steps (default: 30)

    Oracles to run for evaluation

    reuseExistingContext?: boolean

    When attached, reuse the running browser's first existing context so its cookies / auth / session are shared, instead of creating a fresh isolated context. Defaults to false. Breaks per-test isolation. Ignored when connect is unset.

    Only honored on the engine.Run() path (sequential / "new-clean" strategy). The parallel path (HeadlessBrowserEngine.GetIsolated/GetRecycled) always creates its own contexts under the attached browser.

    scoringWeights?: Record<string, number>

    Scoring weights by oracle type

    screenshotHistoryDepth?: number

    Number of recent screenshots to include in controller context

    viewportHeight?: number

    Browser viewport height (default: 720)

    viewportWidth?: number

    Browser viewport width (default: 1280)