Member Junction
    Preparing search index...

    The Computer Use driver's slice of Test.Configuration.

    Two properties in that same JSON are framework-level, not driver-level, and are deliberately absent here: ReplayScript (the recorded replay script) and AllowLLMFallback. Both are typed by the entity's own JSONType and read through the generated MJTestEntity.ConfigurationObject accessor in script-store.ts, so they stay strongly typed without this driver restating them. Do not add copies here — two declarations of one field is how they drift.

    interface ComputerUseTestConfig {
        actions?: { actionId?: string; actionName?: string }[];
        agentRunId?: string;
        appProfile?: {
            auth?: { identityProviderPatterns?: string[]; maxDetours?: number };
            busyMarkers?: string[];
            readinessBeacon?: string;
            settle?: {
                maxWaitMs?: number;
                minWaitMs?: number;
                networkIdleCapMs?: number;
                pollMs?: number;
            };
            volatileParams?: string[];
        };
        browserArgs?: string[];
        browserSession?: string;
        connect?: string;
        connectType?: "auto"
        | "cdp"
        | "server";
        controllerModel?: { driverClass?: string; model: string; vendor: string };
        controllerPromptName?: string;
        elementGrounding?: boolean;
        forceTier?: ReplayTier;
        gateInlineVerdicts?: boolean;
        generation?: { effortLevel?: number; temperature?: number };
        headless?: boolean;
        judgeFrequency?: string;
        judgeModel?: { driverClass?: string; model: string; vendor: string };
        judgePromptName?: string;
        maxExecutionTime?: number;
        maxSteps?: number;
        oracles?: ComputerUseOracleConfig[];
        recordReplayScript?: boolean;
        replayHeal?: ReplayHealPolicy;
        reuseExistingContext?: boolean;
        scoringWeights?: Record<string, number>;
        screenshotHistoryDepth?: number;
        trace?: ArtifactRetentionPolicy;
        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)

    appProfile?: {
        auth?: { identityProviderPatterns?: string[]; maxDetours?: number };
        busyMarkers?: string[];
        readinessBeacon?: string;
        settle?: {
            maxWaitMs?: number;
            minWaitMs?: number;
            networkIdleCapMs?: number;
            pollMs?: number;
        };
        volatileParams?: string[];
    }

    App-specific readiness/busy signals for the adaptive settle loop . Optional — the driver applies MJ-Explorer-sensible defaults (a [data-mj-ready="true"] readiness beacon and MJ loading-spinner markers) when omitted. Provide to override when the target app under test isn't MJ Explorer, or to tune settle timing.

    Type Declaration

    • Optionalauth?: { identityProviderPatterns?: string[]; maxDetours?: number }

      Auth-detour watchdog. When the session is invalidated mid-run and the page bounces to an identity provider, the watchdog recovers it (re-auth + re-navigate) without charging the agent a step, and after maxDetours ends the run as an infrastructure AuthDetour instead of grading the agent on it. Defaults to MJ's providers (Auth0 + Entra); pass identityProviderPatterns: [] to disable.

      • OptionalidentityProviderPatterns?: string[]

        Case-insensitive URL substrings marking an identity-provider bounce.

      • OptionalmaxDetours?: number

        Terminate as AuthDetour after this many detours (default 2).

    • OptionalbusyMarkers?: string[]

      Additional busy-marker CSS selectors (merged with the engine's app-neutral defaults).

    • OptionalreadinessBeacon?: string

      CSS selector for the app's readiness beacon (polled first; wins over heuristics).

    • Optionalsettle?: {
          maxWaitMs?: number;
          minWaitMs?: number;
          networkIdleCapMs?: number;
          pollMs?: number;
      }

      Settle-loop timing overrides.

    • OptionalvolatileParams?: string[]

      Query-param names carrying a per-visit value. They are stripped before a URL is matched against a recorded pattern and before it forms a loop state signature — so a one-time login token can't make a recorded step unmatchable, and can't disguise a repeated page as a new one. Defaults to MJ's identity-provider tokens (state, code, nonce); pass [] to compare URLs verbatim.

    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

    elementGrounding?: boolean

    Element-grounded perception. When true, each step the engine extracts the page's interactive elements into an indexed list, renders it into the controller prompt, and lets the controller act by index (ClickElement/TypeIntoElement) with locator actionability auto-wait instead of estimating coordinates. Default true: a coordinate click cannot be recorded or replayed, so grounding is the precondition for the replay tier. Set false to fall back to coordinate/vision mode.

    forceTier?: ReplayTier

    Force a replay tier for this test (canary override), bypassing decideReplayTier. 'llm' runs the full agent (the rerun-failures --llm / canary escape hatch); 'replay' / 'replay-with-heal' force the deterministic tier when a script exists (no script ⇒ still falls to LLM). Unset (default) ⇒ the tier is decided per build/goal/heal-rate.

    gateInlineVerdicts?: boolean

    When true, the inline criteria verdict gates Passed/Failed. Otherwise that verdict is advisory and only the configured oracles gate.

    generation?: { effortLevel?: number; temperature?: number }

    Per-test controller generation overrides — determinism knobs threaded into the controller prompt. temperature (e.g. 0 for pinned regression runs) and effortLevel (1–100). Judge generation is unaffected.

    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

    recordReplayScript?: boolean

    Whether a green, recordable LLM run writes its replay script back to the test row. Default true. Set false to run the agent tier without ever storing a script — useful while a test is still being authored, and for a run whose trajectory should not become the baseline others replay.

    Independent of elementGrounding: a grounded run still produces the indexed element list the DOM oracles assert over, it simply is not stored.

    replayHeal?: ReplayHealPolicy

    How far a diverged replay step may be repaired. Default 'llm'.

    • 'llm' — role+name re-resolution, escalating an ambiguous or failed match to a focused model call.
    • 'deterministic' — role+name re-resolution only; never calls a model.
    • 'off' — no repair; the first failed guard diverges.

    Use 'off' once a script is trusted as the contract: any deviation is the finding, and a heal would hide the UI change the test exists to catch. With AllowLLMFallback: false the run then has no model in it at all — it passes by executing exactly what was recorded, or it fails.

    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

    trace?: ArtifactRetentionPolicy

    Failure-artifact trace policy. When enabled, the run records a Playwright trace (DOM snapshots + network + console) viewable at trace.playwright.dev, retained per this policy as a File TestRunOutput:

    • off (default) — no trace, zero overhead.
    • retain-on-failure — trace every run, keep it only when the test fails.
    • on — trace every run, always keep it. Tracing carries ~5–15% per-run overhead; measure on a smoke test before enabling suite-wide (hence the default is off).
    viewportHeight?: number

    Browser viewport height (default: 720)

    viewportWidth?: number

    Browser viewport width (default: 1280)