Runtime context providing live access to the registered IActiveTaskTracker. Read on every event dispatch so adapter swaps after construction are picked up immediately.
ReadonlyCompletionObservable for components to subscribe to completion events in real-time. Emits enriched completion data once per agent finish.
ReadonlyStreamFires when the push-status subscription is re-established after having dropped — never on the first successful subscribe.
Events published while the subscription was down are gone: the server's topic is an
in-memory PubSub with no replay, and the client's Subject is explicitly unbuffered.
A listener must therefore reconcile against durable state rather than assume the stream
resumed seamlessly. Consumed by ConversationLiveness (MJ #4222).
ReadonlyTaskObservable for components to subscribe to durable task-graph step & workflow frames in real-time.
Use CompletionEvents$.
Clear a recent completion after the late-mounting component has handled it.
Tear down subscriptions and clear state. Call at app shutdown or in tests between cases.
Use GetConnectionStatus.
Current connection status value (synchronous).
Use GetConnectionStatus$.
Current connection status as an observable.
Diagnostic snapshot for a specific message — used by debugging tools to dump live in-memory state.
Use GetRecentCompletion.
Replay a recently completed event so a late-mounting component can pick it up.
Returns undefined if no completion is in the 5-minute replay window.
Total number of registered callbacks (diagnostic).
Number of distinct messages currently being tracked (diagnostic).
Use Initialize.
Initialize the global PubSub subscription. Idempotent — safe to call multiple times. Should be called once at app startup (e.g., the Angular widget calls this when the workspace mounts).
Browser time (ms since epoch) at which the last push frame that names this message arrived.
Covers a row with no MJ agent run to look up, such as one written by a host's own turn handler that reports progress through the same publisher.
undefined when nothing has named the message, or it has completed.
Browser time (ms since epoch) at which the last push frame for this agent run arrived: progress, streamed content, or the server's liveness pulse.
This is the reliable "still running" signal. The run object inside progress frames is the server's in-memory entity, whose timestamps do not move until the run ends.
undefined when nothing has been heard for the run, or it has completed.
Register a callback for a specific conversation detail (message). The callback is invoked whenever progress updates arrive for that message.
Optionalcallback: MessageProgressCallbackUnregister a callback for a specific conversation detail. When callback is
omitted, ALL callbacks for that message are removed.
Optionalcallback: MessageProgressCallback
Global streaming service that manages PubSub subscriptions for all conversations.
Maintains a single GraphQL subscription and routes updates to registered per-message callbacks, regardless of which conversation is currently visible. This ensures messages update correctly even when users navigate away and return.
Usually accessed via
ConversationsRuntime.Instance.Streaming.