ReadonlyAgentObservable stream of agent context updates from resource components. The shell subscribes to this to update the ComponentCacheManager and push changes to the chat overlay's AppContextSnapshot.DashboardContext.
ReadonlyAppLatest AppContextSnapshot published by the Explorer app shell.
Why: any embedded <mj-conversation-chat-area> instance outside the
floating chat overlay (Form Builder cockpit, future domain dashboards
that pop their own AI pane) needs to feed the SAME context the overlay
does so the agent sees what app + view + dashboard state the user is
looking at. Without this, the agent only sees the embedder's narrow
AdditionalContext slice and treats the user as if they have no app
context at all — which is the bug we just fixed.
MJExplorerAppComponent is the canonical publisher (it owns the
snapshot construction); consumers SUBSCRIBE and bind the value to
their chat-area's [appContext]. Non-Explorer apps (custom MJ apps
that don't include explorer-app at all) build their own snapshot via
BuildAppContextSnapshot() in @memberjunction/ai-core-plus.
Initial value is null; the publisher emits the first real snapshot
after the active app + nav state resolve on bootstrap.
Observable that emits when query params change on a tab (back/forward navigation).
Clears the cached Home app info. Call this if apps are reloaded or user logs out.
Drop a destroyed component's captured tools (e.g. on LRU eviction), so the map doesn't retain references to dead component instances.
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
Notify subscribers that query params changed on a specific tab. Called by the shell when back/forward navigation changes query params on the active tab. The notification includes the tab ID so only the component in that tab reacts.
Capture + clear the active client tools when a resource component's tab is detached (navigated away from), so the previous surface's tools aren't offered to the agent on the next surface. We snapshot whatever tools are CURRENTLY active and key them by the detaching component, so NotifyResourceReattached can replay them — robust to a wrapper component being the one cached/reattached while an inner child actually registered the tools (e.g. Data Explorer).
Re-publish a cached resource component's tools when its tab is re-focused. Cached components keep
their Angular instance but do NOT re-run ngAfterViewInit, so they never re-register on reattach
— the shell calls this so the just-reactivated surface's tools become the agent's active set
again. Replays the set captured for this component at its last detach; no-op (lets a fresh
component register itself) when none was captured (e.g. a component's very first attach).
Reactively observe the query params for a specific tab.
Backed by the workspace BehaviorSubject, so a subscriber receives the current params immediately on subscribe AND every subsequent change — including the deep-link params that the ResourceResolver merges into the tab configuration on a cold/direct URL load.
This is the race-free counterpart to NotifyQueryParamsChanged (a plain Subject that drops events fired before a component has subscribed). A resource component that mounts from workspace restoration can subscribe here and still pick up its initial deep-link state regardless of whether the params landed in the tab config before or after it mounted.
Open an artifact Artifacts are versioned content containers (reports, dashboards, UI components, etc.) Uses Home app if available, otherwise falls back to active app or system app
OptionalartifactName: stringOptionaloptions: NavigationOptionsOpen a dashboard Uses Home app if available, otherwise falls back to active app or system app
Optionaloptions: NavigationOptionsOpen a dynamic view Dynamic views are entity-based views with custom filters, not saved views Uses Home app if available, otherwise falls back to active app or system app
OptionalextraFilter: stringOptionaloptions: NavigationOptionsOpen an entity record view Uses Home app if available, otherwise falls back to active app or system app
Optionaloptions: NavigationOptionsOpen a navigation item within an app
Optionaloptions: NavigationOptionsNavigate to a nav item by name within the current or specified application. Allows passing additional configuration parameters to merge with the nav item's config. This is useful for cross-resource navigation where a component needs to navigate to another nav item with specific parameters (e.g., navigate to Conversations with a specific conversationId).
The label/name of the nav item to navigate to
Optionalconfiguration: Record<string, unknown>Additional configuration to merge (e.g., conversationId, artifactId)
OptionalappId: stringOptional app ID (defaults to current active app)
Optionaloptions: NavigationOptionsNavigation options
The tab ID if successful, null if nav item not found
Open a new entity record creation form Uses Home app if available, otherwise falls back to active app or system app
The name of the entity to create a new record for
Optionaloptions: NavigationOptionsNavigation options including optional newRecordValues for pre-populating fields
Open a query Uses Home app if available, otherwise falls back to active app or system app
Optionaloptions: NavigationOptionsOpen a report Uses Home app if available, otherwise falls back to active app or system app
Optionaloptions: NavigationOptionsOpen a universal search results tab for the given query. This is the primary way to open search results from anywhere in the application.
The search query text
OptionalsearchOptions: { minRelevance?: number; scopeIDs?: string[] }Optional search-specific options (e.g., minRelevance, scopeIDs)
Optionaloptions: NavigationOptionsNavigation options
Open a view Uses Home app if available, otherwise falls back to active app or system app
Optionaloptions: NavigationOptionsPush a fresh AppContextSnapshot. Called by MJExplorerAppComponent
after each (a) app/tab change, (b) handleAgentContextUpdate
merging in AdditionalContext from a dashboard. Idempotent — no
de-duplication; embedders should treat the stream as "the latest
value is canonical."
Register the client tools available from a resource component. Call this on component init and whenever the available tools change. Tools are automatically unregistered when the component becomes inactive (tab switch) and re-registered when it becomes active again.
Pass this from the calling component.
Array of tool definitions with Name, Description, ParameterSchema (JSON Schema), and Handler function.
Report the current agent-visible state from a resource component. Call this whenever the dashboard's internal state changes (tab switch, filter change, pipeline status change, drill-down, etc.).
Pass this from the calling component. Used to match
against the ComponentCacheManager to identify which cached component
this update belongs to.
Key-value pairs representing dashboard state the agent should know about. Each dashboard defines its own shape.
Switch to an application by ID. This sets the app as active and either opens a specific nav item or creates a default tab. If the requested nav item already has an open tab, switches to that tab instead of creating a new one.
The application ID to switch to
OptionalnavItemName: stringOptional name of a nav item to open within the app. If provided, opens that nav item.
OptionalqueryParams: Record<string, string | null>Optional query params to apply to the target tab. Applied SYNCHRONOUSLY once the target tab is active — critical when navigating (e.g. from a Home pin) to an app whose resource component is cached: the params must be in the tab config BEFORE the tab-container reattaches the cached component, otherwise the cache restores its own (stale) saved params and the navigation intent is lost.
Update the query params for the currently active tab. This updates the tab's configuration and triggers a URL sync via the shell's workspace configuration subscription.
Use this instead of directly calling router.navigate() to ensure proper URL management that respects app-scoped routes.
Object containing query param key-value pairs. Use null values to remove a query param.
Update query params for a specific tab, optionally only if the tab still hosts the expected resource identity. This matters in single-resource mode where a tab ID can be reused for a different resource while the previous component is detached but still alive in the cache.
Optionalguard: TabQueryParamUpdateGuard
Centralized navigation service that handles all navigation operations with automatic shift-key detection for power user workflows