All files / scripts mcp-client.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37                                                                         
/**
 * @module Intelligence/MCPClient
 * @description Barrel re-export for backward compatibility.
 *
 * This file was previously an 810-line monolith. It has been decomposed
 * into focused modules under `./mcp-client/`:
 *
 * | Module            | Lines | Responsibility                           |
 * |------------------ |-------|------------------------------------------|
 * | transport.ts      | ~120  | HTTP POST abstraction (fetch + Node.js)  |
 * | document-types.ts |  ~65  | doktyp → English type normalisation      |
 * | client.ts         | ~500  | MCPClient class (JSON-RPC 2.0)           |
 * | index.ts          | ~105  | singleton + convenience functions         |
 *
 * All public exports are preserved — existing consumers require no changes.
 *
 * @author Hack23 AB
 * @license Apache-2.0
 */
export {
  MCPClient,
  normalizeDocumentType,
  getDefaultClient,
  fetchCalendarEvents,
  fetchCommitteeReports,
  fetchPropositions,
  fetchMotions,
  searchDocuments,
  searchSpeeches,
  fetchMPs,
  fetchVotingRecords,
  fetchVotingGroup,
  fetchGovernmentDocuments,
  fetchDocumentDetails,
  enrichDocumentsWithContent,
} from './mcp-client/index.js';