Member Junction
    Preparing search index...

    The default engine: a thin ComputerUseEngine subclass that forwards each completed step to ComputerUseGoalRun.OnProgress. It runs the real loop, so it requires a controller model — bind MJComputerUseEngine via CdpRemoteBrowserSession.SetGoalEngineFactory in production for automatic vision-model selection through MJ metadata.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    authHandler: AuthHandler
    browserAdapter: BaseBrowserAdapter
    cancelled: boolean

    Whether Stop() has been called — checked at the top of each step and at the finer-grained checkpoints inside a step.

    judge: BaseJudge
    navigationGuard: NavigationGuard
    OnProgress?: (progress: ComputerUseGoalProgress) => void

    Per-run progress hook.

    toolProvider: ToolProvider

    Accessors

    • get IsStopped(): boolean

      Whether the run has been stopped — by Stop or by its own expiry.

      Exposed because "the engine stopped waiting" and "the engine stopped working" are different things: a step blocked in a page call keeps running after the run is scored, and this is what says whether it has been told to unwind at its next cooperative checkpoint.

      Returns boolean

    Methods

    • Self-heal a diverged replay step. Only selector drift is healable here: re-resolve the recorded target's role+name against a fresh element list, with ambiguous cases escalating to the healTargetViaLLM seam and low-confidence matches failing rather than guessing. On a confident match, execute the corrected action, verify the postcondition, rewrite the trace step's selector in place, and return true.

      Flow drift (a failed postcondition) is not selector-healable and returns false, so the run falls back to the LLM tier.

      ReplayHeal: 'off' skips all of this — the step diverges as recorded. 'deterministic' keeps the role+name re-resolution but never asks a model.

      Parameters

      Returns Promise<boolean>

    • Focused LLM disambiguation seam for a heal (leg 1b). Called ONLY when the deterministic role+name re-resolution is ambiguous (multiple candidates) or failed. A subclass with an LLM controller overrides this to ask a cheap model "given these elements + this instruction, which index is the intended target?" and return { index, confidence }. The base layer has no model, so it returns confidence 0 (no disambiguation) — heal then only succeeds on the deterministic path.

      Parameters

      Returns Promise<{ confidence: number; index?: number }>

    • Parameters

      • message: string

      Returns void

    • Parameters

      • message: string
      • Optionalerror: unknown

      Returns void

    • Inject a shared judge-verdict cache. When set, the engine reuses a cached verdict for an identical (goal, URL, visible-state) key instead of calling the LLM judge — the cross-attempt generalization of within-run gating. The driver owns the instance so verdicts survive attempt boundaries; unset → no cross-attempt caching (behavior unchanged).

      Parameters

      Returns void

    • Request cancellation of a running run. Cooperative: sets the flag the engine's checkpoints observe AND aborts the shared signal so in-flight LLM calls and settle/backoff delays return promptly. The run unwinds to a Cancelled result within seconds — at the next checkpoint — rather than running the current step to completion.

      Returns void