ProtectedauthProtectedbrowserProtectedcancelledWhether Stop() has been called — checked at the top of each step
ProtectedjudgeProtectednavigationOptionalOnPer-run progress hook.
ProtectedtoolProtectedexecuteExecute the controller LLM prompt.
Base implementation: uses MJ AI Core BaseLLM provider directly via ClassFactory. Requires that an LLM provider is registered and that ControllerModel is set on params.
ProtectedexecuteExecute the judge LLM prompt.
Base implementation: uses MJ AI Core BaseLLM provider directly. Only called when the judge strategy involves an LLM (LLMJudge or HybridJudge when heuristics are inconclusive).
ProtectedlogProtectedlogOptionalerror: unknownProtectedonHook: called when the entire run completes. Override for cleanup, final persistence, or notifications.
ProtectedonHook: called after each step completes. Override for logging, persistence, or real-time monitoring.
Execute a complete Computer Use run.
This is the main entry point. It:
Never throws — all errors are caught and returned in ComputerUseResult.
Inject a pre-created browser adapter for shared session support. When set, the engine skips Launch()/Close() — the caller owns the lifecycle. Used by parallel test execution to share browser contexts across tests.
Request cancellation of a running run. The engine checks this flag at the top of each step. Cancellation is cooperative — the current step will finish.
The default engine: a thin
ComputerUseEnginesubclass that forwards each completed step to ComputerUseGoalRun.OnProgress. It runs the real loop, so it requires a controller model — bindMJComputerUseEnginevia CdpRemoteBrowserSession.SetGoalEngineFactory in production for automatic vision-model selection through MJ metadata.