Member Junction
    Preparing search index...

    MJ-aware extension of RunComputerUseParams.

    Adds:

    • Prompt entity references for controller and judge (resolved by engine, routed through AIPromptRunner)
    • MJ Action references that get auto-wrapped as tools
    • Context user for entity operations and audit logging
    • Agent run ID for linking to the parent agent execution

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Actions?: ActionRef[]

    MJ Actions to expose as tools to the controller LLM. Each action is auto-wrapped into a ComputerUseTool with:

    • Schema derived from ActionParam metadata
    • Handler that routes to ActionEngineBase.RunAction()
    AgentRunId?: string

    Parent agent run ID for linking prompt runs and media to the agent execution. When set, all AIPromptRun records created during the run will have their AgentRunID field set to this value.

    AgentRunStepID?: string

    Parent agent-run STEP ID under which to nest a child Prompt step per controller/judge prompt this run executes. Requires AgentRunId to also be set. When both are present, the engine creates a child MJ: AI Agent Run Steps row (ParentID = this) for each prompt — grouping the run's many prompt runs under the single parent step the caller created for the goal. Absent this, prompt runs are only linked to the run (via AgentRunId), not nested under a step.

    AllowedDomains?: string[]

    Domains the browser is allowed to visit. If set, all other domains are blocked. If empty/undefined, all domains are allowed (open navigation).

    ApplicationContext?: string

    Free-form markdown context about the application being tested. Rendered into the controller's system prompt under an "## Application Context" heading so the LLM doesn't rediscover navigation landmarks, route conventions, etc. on every test. When the engine is driven by the TestingFramework, this is typically sourced from TestSuite.Configuration. applicationContext and optionally extended per-test.

    Per-domain authentication configuration

    BlockedDomains?: string[]

    Domains explicitly blocked. Evaluated AFTER AllowedDomains — blocked always wins.

    BrowserConfig?: BrowserConfig

    Browser-specific configuration (viewport, user agent, timeouts)

    ContextUser?: UserInfo

    User context for all MJ entity operations. Required on the server side for:

    • Row-level security
    • Permission checks
    • Audit logging
    ControllerModel?: ModelConfig

    Model selection for the controller LLM

    ControllerPrompt?: string

    Override for the controller system prompt

    ControllerPromptRef?: PromptEntityRef

    Reference to an MJ AI Prompt entity for the controller LLM. When set, MJComputerUseEngine resolves this to a full AIPromptEntityExtended and routes ExecuteControllerPrompt() through AIPromptRunner. This gives us:

    • Template rendering (Nunjucks)
    • Prompt run logging
    • Model failover
    • Token and cost tracking
    Goal: string

    Natural-language goal for the agent to accomplish

    Headless: boolean

    Run browser in headless mode (default: true)

    JudgeFrequency?: JudgeFrequency

    Judge evaluation frequency (default: EveryStep). Use EveryNSteps or OnStagnation to reduce LLM costs.

    JudgeModel?: ModelConfig

    Model selection for the judge LLM

    JudgePrompt?: string

    Override for the judge prompt

    JudgePromptRef?: PromptEntityRef

    Reference to an MJ AI Prompt entity for the judge LLM. Same resolution and benefits as ControllerPromptRef.

    LogCallback?: (level: "info" | "warn" | "error", message: string) => void

    Optional callback for logging engine messages. If provided, all log messages will be sent to this callback in addition to (or instead of) console output. Useful for test drivers to capture logs for test run records.

    MaxSteps: number

    Maximum number of controller loop steps before forced termination (default: 30)

    ScreenshotDelayMs: number

    Delay in milliseconds before each screenshot capture. Gives the page time to render after actions (clicks, navigation, typing) before the screenshot is taken for the next LLM reasoning step. Set to 0 to disable. (default: 500)

    ScreenshotHistoryDepth: number

    Number of recent screenshots to include in controller context. Acts as a ring buffer — older screenshots are dropped. Higher values give more context but increase token usage. (default: 20)

    StartUrl?: string

    Starting URL to navigate to

    Tools?: ComputerUseTool<Record<string, unknown>, unknown>[]

    Tools the LLM can invoke during execution