Interface DiagnosticDigestManager
public interface DiagnosticDigestManager
Registry that maps a gateway web UI page URL to a
DiagnosticDigestGenerator. Consumer
modules register a generator for any page they want to produce a diagnostic digest for; the
gateway navigation payload then advertises that availability so the front-end can show a digest
affordance without a probe round-trip.
Page URLs are the exact strings used in Mount.url() on the navigation model (e.g.
"/connections/catalyst/model-providers"); no normalization is performed. Implementations
are thread-safe: register(String, DiagnosticDigestGenerator) runs during module startup
while hasGenerator(String) runs on navigation requests.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Optional<AiContext.ProvidedModel> The preferred model for the click-driven analysis flow.getGenerator(String pageUrl) The mode hint surfaced on the nav payload so the front-end can choose between auto-fetch and on-demand UI.default Optional<AiContext.ProvidedModel> The preferred model for the page-load summary flow.default TranscriptPolicyWhether the summary and analysis harnesses write a conversation transcript.booleanhasGenerator(String pageUrl) voidregister(String pageUrl, DiagnosticDigestGenerator generator) Register a generator for the given page URL, replacing any prior registration for that URL.
-
Method Details
-
register
Register a generator for the given page URL, replacing any prior registration for that URL.- Parameters:
pageUrl- the exactMount.url()string for the page or tab.generator- the generator to invoke when a digest is requested forpageUrl.
-
hasGenerator
- Parameters:
pageUrl- the exactMount.url()string for the page or tab.- Returns:
- true if a generator is currently registered for
pageUrl.
-
getGenerator
- Parameters:
pageUrl- the exactMount.url()string for the page or tab.- Returns:
- the generator registered for
pageUrl, or empty if none is registered.
-
getSummaryModel
The preferred model for the page-load summary flow. Callers should fall back toAiContext.getDefaultModel()when this is empty.- Returns:
- the preferred
AiContext.ProvidedModelfor the summary flow, or empty if no preference is configured.
-
getAnalysisModel
The preferred model for the click-driven analysis flow. Callers should fall back toAiContext.getDefaultModel()when this is empty.- Returns:
- the preferred
AiContext.ProvidedModelfor the analysis flow, or empty if no preference is configured.
-
getModeHint
The mode hint surfaced on the nav payload so the front-end can choose between auto-fetch and on-demand UI. Returns a stable string token ("auto"/"on-demand"); empty means "no hint, treat as auto". TheDISABLEDmode is already covered byhasGenerator(String)short-circuiting.- Returns:
- the mode hint token, or empty for the default (auto) behavior.
-
getTranscriptPolicy
Whether the summary and analysis harnesses write a conversation transcript. This is opt-in: with the digest mode at auto, every status page a user browses runs digest harnesses, so transcribing them by default would churn the transcript directory and evict the sessions an operator actually wants to read.- Returns:
- the
TranscriptPolicydigest harnesses should be built with;TranscriptPolicy.DISABLEDunless an operator has opted in.
-