OptionalAgentParent agent-run id the CDP session sets before Run (links the goal's prompt runs to it).
OptionalAgentParent agent-run-step id the CDP session sets before Run (nests child prompt steps under it).
ProtectedauthProtectedbrowserProtectedcancelledWhether Stop() has been called — checked at the top of each step
OptionalContextThe MJ user the goal run executes as; the CDP session sets it from the session's context user.
ProtectedjudgeProtectednavigationOptionalOnPer-step progress hook the CDP session sets before Run (drives live narration).
ProtectedtoolOptional metadata provider override. Callers should set
instance.Provider = providerToUse before invoking Run()
in multi-provider contexts. Falls back to the global default provider when unset.
ProtectedexecuteRoute controller prompt through MJ AIPromptRunner.
If a ControllerPromptRef was resolved to an entity, uses AIPromptRunner for full MJ integration (template rendering, model selection, prompt run logging, token tracking). Otherwise falls back to the base implementation (direct LLM call).
ProtectedexecuteRoute judge prompt through MJ AIPromptRunner.
If a JudgePromptRef was resolved to an entity, uses AIPromptRunner. Otherwise falls back to the base implementation.
ProtectedlogProtectedlogOptionalerror: unknownProtectedonHook for run completion. Currently logs completion status. Can be extended to update agent run records or trigger post-run workflows.
ProtectedonPersist step screenshot as AIPromptRunMedia entity.
Links the screenshot to the most recent prompt run (from the controller call in this step). Fire-and-forget — media persistence errors are logged but don't fail the run.
Adapts the transport-neutral base params into MJRunComputerUseParams (carrying the acting user
The base computer-use params the CDP session built (goal + step cap + start url).
The computer-use run result.
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 MJ-aware goal engine bound in production. Extends MJComputerUseEngine (prompt-runner routing, vision-model auto-selection, credential resolution, media persistence) and satisfies the ComputerUseGoalRun seam: