Member Junction
    Preparing search index...

    Creates and finalizes child Prompt steps under a parent agent-run step for the prompts a Computer Use goal executes. Constructed only when the run is linked to a parent step (agent run id + parent step id); absent that linkage the engine skips step tracking entirely.

    Index

    Constructors

    Methods

    • Creates a Running child Prompt step for a prompt about to execute, linked to its definition via TargetID and nested under the goal's parent step via ParentID. The "started" INSERT is fire-and-forget (queued, not awaited — the PK is client-generated by NewRecord() so the returned step's id is valid immediately). Returns the step to finalize later, or null if entity creation threw (step tracking is best-effort and never aborts the goal).

      Parameters

      Returns Promise<MJAIAgentRunStepEntity | null>

      The step entity (its INSERT in flight), or null on failure.

    • Finalizes a child step with its prompt-run id (TargetLogID) and outcome. The UPDATE is queued fire-and-forget (chained after the step's INSERT, force-persisted). A no-op when step is null (creation had failed).

      Parameters

      • step: MJAIAgentRunStepEntity | null

        The step returned by BeginPromptStep (or null).

      • promptRunID: string | undefined

        The produced AIPromptRun id, when known.

      • success: boolean

        Whether the prompt succeeded.

      • OptionalerrorMessage: string

        Optional failure detail.

      Returns void

    • Awaits every queued step save (INSERT + finalize UPDATE). Call once the goal completes so the nested prompt steps are durably persisted before the run returns. Failures are logged, never thrown.

      Returns Promise<void>

    • Seeds the step-number counter from the run's current step count so child steps continue the run's sequence (best-effort; a query failure just starts numbering from the goal's first prompt).

      Returns Promise<void>