EU Parliament Monitor — API Documentation - v0.8.20
    Preparing search index...
    • Load analysis context from the analysis pipeline output directory.

      Scans {baseDir}/{date}/{articleTypeSlug}/ for a manifest.json and analysis markdown files in known subdirectories. When the directory does not exist or contains no analysis files, returns null for graceful degradation — strategies then behave exactly as before.

      Handles suffixed directories (e.g. breaking-2, breaking-3) by scanning for the latest match.

      Resolution order for base directory:

      1. Explicit baseDir parameter (when non-default)
      2. EP_ANALYSIS_DIR environment variable (set by orchestration)
      3. Default 'analysis'

      Resolution order for slug:

      1. EP_ANALYSIS_SLUG environment variable (set by orchestration)
      2. The articleTypeSlug parameter passed by each strategy

      Parameters

      • date: string

        ISO 8601 date (YYYY-MM-DD) of the analysis run

      • articleTypeSlug: string

        Article type slug (e.g. 'breaking', 'week-ahead')

      • baseDir: string = DEFAULT_ANALYSIS_BASE_DIR

        Base analysis directory (defaults to 'analysis')

      Returns LoadedAnalysisContext | null

      Loaded analysis context or null when unavailable