Member Junction
    Preparing search index...

    Function FinalizeBridgeCoAgentRuns

    • The bridge-engine session-run finalizer (matches BridgeSessionRunFinalizer in @memberjunction/ai-bridge-server). Bind this onto AIBridgeEngine.SetSessionRunFinalizer(...) at startup so a bridge reaped WITHOUT a live session (a prior-boot orphan, a cross-host teardown) still finalizes its co-agent observability run — the only path where the Close()-wrapped finalizer can't run. Lives here (in ai-agents, which owns the realtime runtime) so the engine stays decoupled from it.

      Parameters

      • agentSessionID: string

        The reaped session's id.

      • success: boolean

        Whether to mark the run(s) Completed (true) or Failed (false).

      • OptionalcontextUser: UserInfo

        The user the writes run as (required — skipped without it).

      • Optionalprovider: IMetadataProvider

        The metadata provider (required — skipped without it).

      Returns Promise<void>