euparliamentmonitor 0.8.31 → 0.8.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -124,7 +124,7 @@ import {
124
124
 
125
125
  **MCP Server Integration**: The project uses the
126
126
  [European-Parliament-MCP-Server](https://github.com/Hack23/European-Parliament-MCP-Server)
127
- v1.2.7 for accessing real EU Parliament data via the Model Context Protocol.
127
+ v1.2.8 for accessing real EU Parliament data via the Model Context Protocol.
128
128
 
129
129
  - **MCP Server Status**: ✅ Fully operational — 60+ EP data tools available
130
130
  (feeds, direct lookups, analytical tools, intelligence correlation)
@@ -984,7 +984,7 @@ Projected workflow counts below include all CI/CD workflow definitions, agentic
984
984
 
985
985
  | Year | Projected Workflow Definitions | AI Model | Key Capability |
986
986
  |------|-------------------------------|----------|----------------|
987
- | **2026** | 44–50 | Opus 4.6–4.9 | 🟢 Agentic news generation |
987
+ | **2026** | 44–50 | Opus 4.7–4.9 | 🟢 Agentic news generation |
988
988
  | **2027** | 50–55 | Opus 5.x | 🔵 Predictive analytics |
989
989
  | **2028** | 55–65 | Opus 6.x | 🟣 Multi-modal content |
990
990
  | **2029** | 65–75 | Opus 7.x | 🟠 Autonomous pipeline |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "euparliamentmonitor",
3
- "version": "0.8.31",
3
+ "version": "0.8.33",
4
4
  "type": "module",
5
5
  "description": "European Parliament Intelligence Platform - Monitor political activity with systematic transparency",
6
6
  "main": "scripts/index.js",
@@ -152,7 +152,7 @@
152
152
  "eslint-config-prettier": "10.1.8",
153
153
  "eslint-plugin-jsdoc": "62.9.0",
154
154
  "eslint-plugin-security": "4.0.0",
155
- "eslint-plugin-sonarjs": "4.0.2",
155
+ "eslint-plugin-sonarjs": "4.0.3",
156
156
  "happy-dom": "20.9.0",
157
157
  "htmlhint": "1.9.2",
158
158
  "husky": "9.1.7",
@@ -170,7 +170,7 @@
170
170
  "node": ">=25"
171
171
  },
172
172
  "dependencies": {
173
- "european-parliament-mcp-server": "1.2.7"
173
+ "european-parliament-mcp-server": "1.2.8"
174
174
  },
175
175
  "optionalDependencies": {
176
176
  "worldbank-mcp": "1.0.1"
@@ -15,7 +15,7 @@
15
15
  * Any narrative or interpretive analysis text (for example: why, outlook,
16
16
  * impact assessments, stakeholder reasoning, or mistake/consequence
17
17
  * explanations) that is LEFT AS THIS MARKER is expected to be generated by
18
- * the AI agent (Opus 4.6) in the agentic workflow, not by code.
18
+ * the AI agent in the agentic workflow, not by code.
19
19
  */
20
20
  export declare const AI_MARKER = "[AI_ANALYSIS_REQUIRED]";
21
21
  /**
@@ -17,7 +17,7 @@
17
17
  * Any narrative or interpretive analysis text (for example: why, outlook,
18
18
  * impact assessments, stakeholder reasoning, or mistake/consequence
19
19
  * explanations) that is LEFT AS THIS MARKER is expected to be generated by
20
- * the AI agent (Opus 4.6) in the agentic workflow, not by code.
20
+ * the AI agent in the agentic workflow, not by code.
21
21
  */
22
22
  export const AI_MARKER = '[AI_ANALYSIS_REQUIRED]';
23
23
  /**
@@ -3140,7 +3140,7 @@ export const WEEK_AHEAD_STAKEHOLDER_STRINGS = {
3140
3140
  reasonInstitutionsCoordination: '需要机构间协调',
3141
3141
  },
3142
3142
  };
3143
- // ─── AI analysis marker — all analysis text is produced by the AI agent (Opus 4.6) ───
3143
+ // ─── AI analysis marker — all analysis text is produced by the AI agent ───
3144
3144
  const AI_ANALYSIS_MARKER = '[AI_ANALYSIS_REQUIRED]';
3145
3145
  const BRK_WHY_ANOMALIES = AI_ANALYSIS_MARKER;
3146
3146
  const BRK_WHY_NORMAL = AI_ANALYSIS_MARKER;
@@ -26,13 +26,13 @@ export declare const runId: string;
26
26
  /**
27
27
  * AI-generated article title passed by the agentic workflow.
28
28
  * When provided, this OVERRIDES any script-generated title.
29
- * The AI agent (Opus 4.6) must analyse the content and produce this.
29
+ * The AI agent must analyse the content and produce this.
30
30
  */
31
31
  export declare const aiTitle: string;
32
32
  /**
33
33
  * AI-generated article description/subtitle passed by the agentic workflow.
34
34
  * When provided, this OVERRIDES any script-generated description.
35
- * The AI agent (Opus 4.6) must analyse the content and produce this.
35
+ * The AI agent must analyse the content and produce this.
36
36
  */
37
37
  export declare const aiDescription: string;
38
38
  /**
@@ -96,13 +96,13 @@ export const runId = (runIdArg?.slice('--run-id='.length).trim() ||
96
96
  /**
97
97
  * AI-generated article title passed by the agentic workflow.
98
98
  * When provided, this OVERRIDES any script-generated title.
99
- * The AI agent (Opus 4.6) must analyse the content and produce this.
99
+ * The AI agent must analyse the content and produce this.
100
100
  */
101
101
  export const aiTitle = titleArg ? titleArg.slice('--title='.length).trim() : '';
102
102
  /**
103
103
  * AI-generated article description/subtitle passed by the agentic workflow.
104
104
  * When provided, this OVERRIDES any script-generated description.
105
- * The AI agent (Opus 4.6) must analyse the content and produce this.
105
+ * The AI agent must analyse the content and produce this.
106
106
  */
107
107
  export const aiDescription = descriptionArg
108
108
  ? descriptionArg.slice('--description='.length).trim()
@@ -378,7 +378,7 @@ async function runAnalysisWithGuard(date, client) {
378
378
  }
379
379
  /**
380
380
  * Wire AI-provided title/description from CLI `--title` and `--description` flags.
381
- * The AI agent (Opus 4.6) passes these after analysing the content.
381
+ * The AI agent passes these after analysing the content.
382
382
  * They override ALL script-generated metadata for the English version.
383
383
  */
384
384
  function wireAIMetadata() {
@@ -437,7 +437,7 @@ export async function fetchWeekAheadData(client, dateRange) {
437
437
  limit: 20,
438
438
  }),
439
439
  client.getParliamentaryQuestions({ dateFrom: dateRange.start, limit: 20 }),
440
- client.getEvents({ dateFrom: dateRange.start, dateTo: dateRange.end, limit: 20 }),
440
+ client.getEvents({ limit: 20 }),
441
441
  ]);
442
442
  const allFailed = [
443
443
  plenarySessions,
@@ -19,7 +19,7 @@ import { writeSingleArticle } from './output-stage.js';
19
19
  /**
20
20
  * AI-generated article title provided by the agentic workflow.
21
21
  * When non-empty, this OVERRIDES any script-generated title for the
22
- * English version. The AI agent (Opus 4.6) must analyse the article
22
+ * English version. The AI agent must analyse the article
23
23
  * content and produce this — titles must NEVER be generated by code.
24
24
  */
25
25
  let _aiTitle = '';
@@ -130,7 +130,7 @@ function generateSingleLanguageArticle(strategy, data, lang, dateStr, slug, outp
130
130
  // preserved, but title and description enrichment is now subordinate
131
131
  // to AI-provided values from --title and --description CLI flags.
132
132
  //
133
- // Architecture: The AI agent (Opus 4.6) analyses the content and
133
+ // Architecture: The AI agent analyses the content and
134
134
  // provides titles/descriptions via CLI flags. Script code NEVER
135
135
  // generates final titles or descriptions — it only provides fallbacks.
136
136
  const enrichedMetadata = enrichMetadataFromContent(content, baseMetadata);
@@ -77,7 +77,7 @@ export declare class EuropeanParliamentMCPClient extends MCPConnection {
77
77
  /**
78
78
  * Search legislative documents
79
79
  *
80
- * @param options - Search options using v1.2.7 parameters: keyword, documentType, docId, etc.
80
+ * @param options - Search options using v1.2.8 parameters: keyword, documentType, docId, etc.
81
81
  * @returns Search results
82
82
  */
83
83
  searchDocuments(options?: SearchDocumentsOptions): Promise<MCPToolResult>;
@@ -210,14 +210,14 @@ export declare class EuropeanParliamentMCPClient extends MCPConnection {
210
210
  /**
211
211
  * Get plenary speeches and debate contributions
212
212
  *
213
- * @param options - Filter options including optional speechId or date range
213
+ * @param options - Filter options including optional speechId, dateFrom/dateTo (v1.2.8: year removed)
214
214
  * @returns Speeches data
215
215
  */
216
216
  getSpeeches(options?: GetSpeechesOptions): Promise<MCPToolResult>;
217
217
  /**
218
218
  * Get legislative procedures
219
219
  *
220
- * @param options - Filter options including optional processId or year
220
+ * @param options - Filter options including optional processId (v1.2.8: year removed)
221
221
  * @returns Procedures data
222
222
  */
223
223
  getProcedures(options?: GetProceduresOptions): Promise<MCPToolResult>;
@@ -231,7 +231,7 @@ export declare class EuropeanParliamentMCPClient extends MCPConnection {
231
231
  /**
232
232
  * Get European Parliament events (hearings, conferences, seminars)
233
233
  *
234
- * @param options - Filter options including optional eventId or date range
234
+ * @param options - Filter options including optional eventId, pagination only (v1.2.8: year/dateFrom/dateTo removed — EP API /events has no date filtering)
235
235
  * @returns Events data
236
236
  */
237
237
  getEvents(options?: GetEventsOptions): Promise<MCPToolResult>;
@@ -287,7 +287,7 @@ export declare class EuropeanParliamentMCPClient extends MCPConnection {
287
287
  /**
288
288
  * Get committee documents
289
289
  *
290
- * @param options - Filter options including optional docId or year
290
+ * @param options - Filter options including optional docId (v1.2.8: year removed)
291
291
  * @returns Committee documents data
292
292
  */
293
293
  getCommitteeDocuments(options?: GetCommitteeDocumentsOptions): Promise<MCPToolResult>;
@@ -315,7 +315,7 @@ export declare class EuropeanParliamentMCPClient extends MCPConnection {
315
315
  /**
316
316
  * Get external documents (non-EP documents such as Council positions)
317
317
  *
318
- * @param options - Filter options including optional docId or year
318
+ * @param options - Filter options including optional docId (v1.2.8: year removed)
319
319
  * @returns External documents data
320
320
  */
321
321
  getExternalDocuments(options?: GetExternalDocumentsOptions): Promise<MCPToolResult>;
@@ -29,7 +29,7 @@ const SERVER_HEALTH_FALLBACK = '{"server": null, "feeds": []}';
29
29
  /**
30
30
  * Classify an error message into a diagnostic error category.
31
31
  *
32
- * Maps EP MCP Server v1.2.7 structured error codes and generic HTTP/network
32
+ * Maps EP MCP Server v1.2.8 structured error codes and generic HTTP/network
33
33
  * errors into one of six broad categories used for logging and retry decisions:
34
34
  *
35
35
  * Returned categories (priority order):
@@ -45,7 +45,7 @@ const SERVER_HEALTH_FALLBACK = '{"server": null, "feeds": []}';
45
45
  */
46
46
  function classifyToolError(message) {
47
47
  const lowerMsg = message.toLowerCase();
48
- // EP MCP Server v1.2.7 structured error codes (matched case-insensitively)
48
+ // EP MCP Server v1.2.8 structured error codes (matched case-insensitively)
49
49
  if (lowerMsg.includes('internal_error')) {
50
50
  return 'INTERNAL_ERROR';
51
51
  }
@@ -214,7 +214,7 @@ export class EuropeanParliamentMCPClient extends MCPConnection {
214
214
  /**
215
215
  * Search legislative documents
216
216
  *
217
- * @param options - Search options using v1.2.7 parameters: keyword, documentType, docId, etc.
217
+ * @param options - Search options using v1.2.8 parameters: keyword, documentType, docId, etc.
218
218
  * @returns Search results
219
219
  */
220
220
  async searchDocuments(options = {}) {
@@ -423,7 +423,7 @@ export class EuropeanParliamentMCPClient extends MCPConnection {
423
423
  /**
424
424
  * Get plenary speeches and debate contributions
425
425
  *
426
- * @param options - Filter options including optional speechId or date range
426
+ * @param options - Filter options including optional speechId, dateFrom/dateTo (v1.2.8: year removed)
427
427
  * @returns Speeches data
428
428
  */
429
429
  async getSpeeches(options = {}) {
@@ -432,7 +432,7 @@ export class EuropeanParliamentMCPClient extends MCPConnection {
432
432
  /**
433
433
  * Get legislative procedures
434
434
  *
435
- * @param options - Filter options including optional processId or year
435
+ * @param options - Filter options including optional processId (v1.2.8: year removed)
436
436
  * @returns Procedures data
437
437
  */
438
438
  async getProcedures(options = {}) {
@@ -450,7 +450,7 @@ export class EuropeanParliamentMCPClient extends MCPConnection {
450
450
  /**
451
451
  * Get European Parliament events (hearings, conferences, seminars)
452
452
  *
453
- * @param options - Filter options including optional eventId or date range
453
+ * @param options - Filter options including optional eventId, pagination only (v1.2.8: year/dateFrom/dateTo removed — EP API /events has no date filtering)
454
454
  * @returns Events data
455
455
  */
456
456
  async getEvents(options = {}) {
@@ -530,7 +530,7 @@ export class EuropeanParliamentMCPClient extends MCPConnection {
530
530
  /**
531
531
  * Get committee documents
532
532
  *
533
- * @param options - Filter options including optional docId or year
533
+ * @param options - Filter options including optional docId (v1.2.8: year removed)
534
534
  * @returns Committee documents data
535
535
  */
536
536
  async getCommitteeDocuments(options = {}) {
@@ -566,7 +566,7 @@ export class EuropeanParliamentMCPClient extends MCPConnection {
566
566
  /**
567
567
  * Get external documents (non-EP documents such as Council positions)
568
568
  *
569
- * @param options - Filter options including optional docId or year
569
+ * @param options - Filter options including optional docId (v1.2.8: year removed)
570
570
  * @returns External documents data
571
571
  */
572
572
  async getExternalDocuments(options = {}) {
@@ -218,20 +218,19 @@ export interface GetCurrentMEPsOptions {
218
218
  limit?: number | undefined;
219
219
  offset?: number | undefined;
220
220
  }
221
- /** Options for getSpeeches */
221
+ /** Options for getSpeeches — v1.2.8 removed `year` (EP API ignores it for /speeches) */
222
222
  export interface GetSpeechesOptions {
223
223
  speechId?: string | undefined;
224
- /** Filter by calendar year (recommended for annual counts) */
225
- year?: number | undefined;
224
+ /** Filter by sitting date start (maps to sitting-date in EP API) */
226
225
  dateFrom?: string | undefined;
226
+ /** Filter by sitting date end (maps to sitting-date-end in EP API) */
227
227
  dateTo?: string | undefined;
228
228
  limit?: number | undefined;
229
229
  offset?: number | undefined;
230
230
  }
231
- /** Options for getProcedures */
231
+ /** Options for getProcedures — v1.2.8 removed `year` (EP API ignores it for /procedures) */
232
232
  export interface GetProceduresOptions {
233
233
  processId?: string | undefined;
234
- year?: number | undefined;
235
234
  limit?: number | undefined;
236
235
  offset?: number | undefined;
237
236
  }
@@ -242,13 +241,9 @@ export interface GetAdoptedTextsOptions {
242
241
  limit?: number | undefined;
243
242
  offset?: number | undefined;
244
243
  }
245
- /** Options for getEvents */
244
+ /** Options for getEvents — v1.2.8 removed `year`, `dateFrom`, `dateTo` (EP API /events has no date filtering) */
246
245
  export interface GetEventsOptions {
247
246
  eventId?: string | undefined;
248
- /** Filter by calendar year (recommended for annual counts) */
249
- year?: number | undefined;
250
- dateFrom?: string | undefined;
251
- dateTo?: string | undefined;
252
247
  limit?: number | undefined;
253
248
  offset?: number | undefined;
254
249
  }
@@ -293,10 +288,9 @@ export interface GetPlenaryDocumentsOptions {
293
288
  limit?: number | undefined;
294
289
  offset?: number | undefined;
295
290
  }
296
- /** Options for getCommitteeDocuments */
291
+ /** Options for getCommitteeDocuments — v1.2.8 removed `year` (EP API ignores it for /committee-documents) */
297
292
  export interface GetCommitteeDocumentsOptions {
298
293
  docId?: string | undefined;
299
- year?: number | undefined;
300
294
  limit?: number | undefined;
301
295
  offset?: number | undefined;
302
296
  }
@@ -317,10 +311,9 @@ export interface GetControlledVocabulariesOptions {
317
311
  limit?: number | undefined;
318
312
  offset?: number | undefined;
319
313
  }
320
- /** Options for getExternalDocuments */
314
+ /** Options for getExternalDocuments — v1.2.8 removed `year` (EP API ignores it for /external-documents) */
321
315
  export interface GetExternalDocumentsOptions {
322
316
  docId?: string | undefined;
323
- year?: number | undefined;
324
317
  limit?: number | undefined;
325
318
  offset?: number | undefined;
326
319
  }