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 Details

    • register

      void register(String pageUrl, DiagnosticDigestGenerator generator)
      Register a generator for the given page URL, replacing any prior registration for that URL.
      Parameters:
      pageUrl - the exact Mount.url() string for the page or tab.
      generator - the generator to invoke when a digest is requested for pageUrl.
    • hasGenerator

      boolean hasGenerator(String pageUrl)
      Parameters:
      pageUrl - the exact Mount.url() string for the page or tab.
      Returns:
      true if a generator is currently registered for pageUrl.
    • getGenerator

      Optional<DiagnosticDigestGenerator> getGenerator(String pageUrl)
      Parameters:
      pageUrl - the exact Mount.url() string for the page or tab.
      Returns:
      the generator registered for pageUrl, or empty if none is registered.
    • getSummaryModel

      default Optional<AiContext.ProvidedModel> getSummaryModel()
      The preferred model for the page-load summary flow. Callers should fall back to AiContext.getDefaultModel() when this is empty.
      Returns:
      the preferred AiContext.ProvidedModel for the summary flow, or empty if no preference is configured.
    • getAnalysisModel

      default Optional<AiContext.ProvidedModel> getAnalysisModel()
      The preferred model for the click-driven analysis flow. Callers should fall back to AiContext.getDefaultModel() when this is empty.
      Returns:
      the preferred AiContext.ProvidedModel for the analysis flow, or empty if no preference is configured.
    • getModeHint

      default Optional<String> 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". The DISABLED mode is already covered by hasGenerator(String) short-circuiting.
      Returns:
      the mode hint token, or empty for the default (auto) behavior.
    • getTranscriptPolicy

      default TranscriptPolicy 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 TranscriptPolicy digest harnesses should be built with; TranscriptPolicy.DISABLED unless an operator has opted in.