euparliamentmonitor 0.8.4
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/LICENSE +201 -0
- package/README.md +1005 -0
- package/SECURITY.md +151 -0
- package/package.json +131 -0
- package/scripts/constants/committee-indicator-map.d.ts +199 -0
- package/scripts/constants/committee-indicator-map.d.ts.map +1 -0
- package/scripts/constants/committee-indicator-map.js +1224 -0
- package/scripts/constants/committee-indicator-map.js.map +1 -0
- package/scripts/constants/config.d.ts +38 -0
- package/scripts/constants/config.d.ts.map +1 -0
- package/scripts/constants/config.js +66 -0
- package/scripts/constants/config.js.map +1 -0
- package/scripts/constants/language-articles.d.ts +84 -0
- package/scripts/constants/language-articles.d.ts.map +1 -0
- package/scripts/constants/language-articles.js +6771 -0
- package/scripts/constants/language-articles.js.map +1 -0
- package/scripts/constants/language-core.d.ts +38 -0
- package/scripts/constants/language-core.d.ts.map +1 -0
- package/scripts/constants/language-core.js +90 -0
- package/scripts/constants/language-core.js.map +1 -0
- package/scripts/constants/language-ui.d.ts +82 -0
- package/scripts/constants/language-ui.d.ts.map +1 -0
- package/scripts/constants/language-ui.js +889 -0
- package/scripts/constants/language-ui.js.map +1 -0
- package/scripts/constants/languages.d.ts +14 -0
- package/scripts/constants/languages.d.ts.map +1 -0
- package/scripts/constants/languages.js +15 -0
- package/scripts/constants/languages.js.map +1 -0
- package/scripts/generators/analysis-builders.d.ts +266 -0
- package/scripts/generators/analysis-builders.d.ts.map +1 -0
- package/scripts/generators/analysis-builders.js +2903 -0
- package/scripts/generators/analysis-builders.js.map +1 -0
- package/scripts/generators/breaking-content.d.ts +45 -0
- package/scripts/generators/breaking-content.d.ts.map +1 -0
- package/scripts/generators/breaking-content.js +530 -0
- package/scripts/generators/breaking-content.js.map +1 -0
- package/scripts/generators/committee-helpers.d.ts +54 -0
- package/scripts/generators/committee-helpers.d.ts.map +1 -0
- package/scripts/generators/committee-helpers.js +154 -0
- package/scripts/generators/committee-helpers.js.map +1 -0
- package/scripts/generators/dashboard-content.d.ts +95 -0
- package/scripts/generators/dashboard-content.d.ts.map +1 -0
- package/scripts/generators/dashboard-content.js +630 -0
- package/scripts/generators/dashboard-content.js.map +1 -0
- package/scripts/generators/deep-analysis-content.d.ts +23 -0
- package/scripts/generators/deep-analysis-content.d.ts.map +1 -0
- package/scripts/generators/deep-analysis-content.js +831 -0
- package/scripts/generators/deep-analysis-content.js.map +1 -0
- package/scripts/generators/mindmap-content.d.ts +55 -0
- package/scripts/generators/mindmap-content.d.ts.map +1 -0
- package/scripts/generators/mindmap-content.js +512 -0
- package/scripts/generators/mindmap-content.js.map +1 -0
- package/scripts/generators/motions-content.d.ts +50 -0
- package/scripts/generators/motions-content.d.ts.map +1 -0
- package/scripts/generators/motions-content.js +391 -0
- package/scripts/generators/motions-content.js.map +1 -0
- package/scripts/generators/news-enhanced.d.ts +14 -0
- package/scripts/generators/news-enhanced.d.ts.map +1 -0
- package/scripts/generators/news-enhanced.js +169 -0
- package/scripts/generators/news-enhanced.js.map +1 -0
- package/scripts/generators/news-indexes.d.ts +31 -0
- package/scripts/generators/news-indexes.d.ts.map +1 -0
- package/scripts/generators/news-indexes.js +410 -0
- package/scripts/generators/news-indexes.js.map +1 -0
- package/scripts/generators/pipeline/fetch-stage.d.ts +352 -0
- package/scripts/generators/pipeline/fetch-stage.d.ts.map +1 -0
- package/scripts/generators/pipeline/fetch-stage.js +1522 -0
- package/scripts/generators/pipeline/fetch-stage.js.map +1 -0
- package/scripts/generators/pipeline/generate-stage.d.ts +43 -0
- package/scripts/generators/pipeline/generate-stage.d.ts.map +1 -0
- package/scripts/generators/pipeline/generate-stage.js +204 -0
- package/scripts/generators/pipeline/generate-stage.js.map +1 -0
- package/scripts/generators/pipeline/output-stage.d.ts +48 -0
- package/scripts/generators/pipeline/output-stage.d.ts.map +1 -0
- package/scripts/generators/pipeline/output-stage.js +145 -0
- package/scripts/generators/pipeline/output-stage.js.map +1 -0
- package/scripts/generators/pipeline/transform-stage.d.ts +57 -0
- package/scripts/generators/pipeline/transform-stage.d.ts.map +1 -0
- package/scripts/generators/pipeline/transform-stage.js +111 -0
- package/scripts/generators/pipeline/transform-stage.js.map +1 -0
- package/scripts/generators/propositions-content.d.ts +29 -0
- package/scripts/generators/propositions-content.d.ts.map +1 -0
- package/scripts/generators/propositions-content.js +90 -0
- package/scripts/generators/propositions-content.js.map +1 -0
- package/scripts/generators/sankey-content.d.ts +45 -0
- package/scripts/generators/sankey-content.d.ts.map +1 -0
- package/scripts/generators/sankey-content.js +227 -0
- package/scripts/generators/sankey-content.js.map +1 -0
- package/scripts/generators/sitemap.d.ts +66 -0
- package/scripts/generators/sitemap.d.ts.map +1 -0
- package/scripts/generators/sitemap.js +562 -0
- package/scripts/generators/sitemap.js.map +1 -0
- package/scripts/generators/strategies/article-strategy.d.ts +146 -0
- package/scripts/generators/strategies/article-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/article-strategy.js +4 -0
- package/scripts/generators/strategies/article-strategy.js.map +1 -0
- package/scripts/generators/strategies/breaking-news-strategy.d.ts +64 -0
- package/scripts/generators/strategies/breaking-news-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/breaking-news-strategy.js +246 -0
- package/scripts/generators/strategies/breaking-news-strategy.js.map +1 -0
- package/scripts/generators/strategies/committee-reports-strategy.d.ts +93 -0
- package/scripts/generators/strategies/committee-reports-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/committee-reports-strategy.js +447 -0
- package/scripts/generators/strategies/committee-reports-strategy.js.map +1 -0
- package/scripts/generators/strategies/month-ahead-strategy.d.ts +60 -0
- package/scripts/generators/strategies/month-ahead-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/month-ahead-strategy.js +175 -0
- package/scripts/generators/strategies/month-ahead-strategy.js.map +1 -0
- package/scripts/generators/strategies/monthly-review-strategy.d.ts +66 -0
- package/scripts/generators/strategies/monthly-review-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/monthly-review-strategy.js +204 -0
- package/scripts/generators/strategies/monthly-review-strategy.js.map +1 -0
- package/scripts/generators/strategies/motions-strategy.d.ts +61 -0
- package/scripts/generators/strategies/motions-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/motions-strategy.js +215 -0
- package/scripts/generators/strategies/motions-strategy.js.map +1 -0
- package/scripts/generators/strategies/propositions-strategy.d.ts +60 -0
- package/scripts/generators/strategies/propositions-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/propositions-strategy.js +257 -0
- package/scripts/generators/strategies/propositions-strategy.js.map +1 -0
- package/scripts/generators/strategies/week-ahead-strategy.d.ts +57 -0
- package/scripts/generators/strategies/week-ahead-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/week-ahead-strategy.js +178 -0
- package/scripts/generators/strategies/week-ahead-strategy.js.map +1 -0
- package/scripts/generators/strategies/weekly-review-strategy.d.ts +63 -0
- package/scripts/generators/strategies/weekly-review-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/weekly-review-strategy.js +211 -0
- package/scripts/generators/strategies/weekly-review-strategy.js.map +1 -0
- package/scripts/generators/swot-content.d.ts +42 -0
- package/scripts/generators/swot-content.d.ts.map +1 -0
- package/scripts/generators/swot-content.js +366 -0
- package/scripts/generators/swot-content.js.map +1 -0
- package/scripts/generators/week-ahead-content.d.ts +103 -0
- package/scripts/generators/week-ahead-content.d.ts.map +1 -0
- package/scripts/generators/week-ahead-content.js +610 -0
- package/scripts/generators/week-ahead-content.js.map +1 -0
- package/scripts/index.d.ts +40 -0
- package/scripts/index.d.ts.map +1 -0
- package/scripts/index.js +53 -0
- package/scripts/index.js.map +1 -0
- package/scripts/mcp/ep-mcp-client.d.ts +471 -0
- package/scripts/mcp/ep-mcp-client.d.ts.map +1 -0
- package/scripts/mcp/ep-mcp-client.js +734 -0
- package/scripts/mcp/ep-mcp-client.js.map +1 -0
- package/scripts/mcp/mcp-connection.d.ts +264 -0
- package/scripts/mcp/mcp-connection.d.ts.map +1 -0
- package/scripts/mcp/mcp-connection.js +790 -0
- package/scripts/mcp/mcp-connection.js.map +1 -0
- package/scripts/mcp/mcp-health.d.ts +75 -0
- package/scripts/mcp/mcp-health.d.ts.map +1 -0
- package/scripts/mcp/mcp-health.js +78 -0
- package/scripts/mcp/mcp-health.js.map +1 -0
- package/scripts/mcp/mcp-retry.d.ts +94 -0
- package/scripts/mcp/mcp-retry.d.ts.map +1 -0
- package/scripts/mcp/mcp-retry.js +127 -0
- package/scripts/mcp/mcp-retry.js.map +1 -0
- package/scripts/mcp/wb-mcp-client.d.ts +38 -0
- package/scripts/mcp/wb-mcp-client.d.ts.map +1 -0
- package/scripts/mcp/wb-mcp-client.js +112 -0
- package/scripts/mcp/wb-mcp-client.js.map +1 -0
- package/scripts/templates/article-template.d.ts +9 -0
- package/scripts/templates/article-template.d.ts.map +1 -0
- package/scripts/templates/article-template.js +378 -0
- package/scripts/templates/article-template.js.map +1 -0
- package/scripts/templates/section-builders.d.ts +28 -0
- package/scripts/templates/section-builders.d.ts.map +1 -0
- package/scripts/templates/section-builders.js +142 -0
- package/scripts/templates/section-builders.js.map +1 -0
- package/scripts/types/analysis.d.ts +115 -0
- package/scripts/types/analysis.d.ts.map +1 -0
- package/scripts/types/analysis.js +4 -0
- package/scripts/types/analysis.js.map +1 -0
- package/scripts/types/common.d.ts +584 -0
- package/scripts/types/common.d.ts.map +1 -0
- package/scripts/types/common.js +96 -0
- package/scripts/types/common.js.map +1 -0
- package/scripts/types/generation.d.ts +104 -0
- package/scripts/types/generation.d.ts.map +1 -0
- package/scripts/types/generation.js +4 -0
- package/scripts/types/generation.js.map +1 -0
- package/scripts/types/index.d.ts +24 -0
- package/scripts/types/index.d.ts.map +1 -0
- package/scripts/types/index.js +16 -0
- package/scripts/types/index.js.map +1 -0
- package/scripts/types/intelligence.d.ts +129 -0
- package/scripts/types/intelligence.d.ts.map +1 -0
- package/scripts/types/intelligence.js +4 -0
- package/scripts/types/intelligence.js.map +1 -0
- package/scripts/types/mcp.d.ts +418 -0
- package/scripts/types/mcp.d.ts.map +1 -0
- package/scripts/types/mcp.js +4 -0
- package/scripts/types/mcp.js.map +1 -0
- package/scripts/types/parliament.d.ts +388 -0
- package/scripts/types/parliament.d.ts.map +1 -0
- package/scripts/types/parliament.js +4 -0
- package/scripts/types/parliament.js.map +1 -0
- package/scripts/types/quality.d.ts +114 -0
- package/scripts/types/quality.d.ts.map +1 -0
- package/scripts/types/quality.js +4 -0
- package/scripts/types/quality.js.map +1 -0
- package/scripts/types/stakeholder.d.ts +88 -0
- package/scripts/types/stakeholder.d.ts.map +1 -0
- package/scripts/types/stakeholder.js +16 -0
- package/scripts/types/stakeholder.js.map +1 -0
- package/scripts/types/visualization.d.ts +708 -0
- package/scripts/types/visualization.d.ts.map +1 -0
- package/scripts/types/visualization.js +4 -0
- package/scripts/types/visualization.js.map +1 -0
- package/scripts/types/world-bank.d.ts +85 -0
- package/scripts/types/world-bank.d.ts.map +1 -0
- package/scripts/types/world-bank.js +4 -0
- package/scripts/types/world-bank.js.map +1 -0
- package/scripts/utils/article-category.d.ts +18 -0
- package/scripts/utils/article-category.d.ts.map +1 -0
- package/scripts/utils/article-category.js +49 -0
- package/scripts/utils/article-category.js.map +1 -0
- package/scripts/utils/article-quality-scorer.d.ts +87 -0
- package/scripts/utils/article-quality-scorer.d.ts.map +1 -0
- package/scripts/utils/article-quality-scorer.js +1048 -0
- package/scripts/utils/article-quality-scorer.js.map +1 -0
- package/scripts/utils/content-metadata.d.ts +34 -0
- package/scripts/utils/content-metadata.d.ts.map +1 -0
- package/scripts/utils/content-metadata.js +249 -0
- package/scripts/utils/content-metadata.js.map +1 -0
- package/scripts/utils/content-validator.d.ts +94 -0
- package/scripts/utils/content-validator.d.ts.map +1 -0
- package/scripts/utils/content-validator.js +489 -0
- package/scripts/utils/content-validator.js.map +1 -0
- package/scripts/utils/copy-test-reports.d.ts +9 -0
- package/scripts/utils/copy-test-reports.d.ts.map +1 -0
- package/scripts/utils/copy-test-reports.js +508 -0
- package/scripts/utils/copy-test-reports.js.map +1 -0
- package/scripts/utils/file-utils.d.ts +144 -0
- package/scripts/utils/file-utils.d.ts.map +1 -0
- package/scripts/utils/file-utils.js +374 -0
- package/scripts/utils/file-utils.js.map +1 -0
- package/scripts/utils/fix-articles.d.ts +27 -0
- package/scripts/utils/fix-articles.d.ts.map +1 -0
- package/scripts/utils/fix-articles.js +510 -0
- package/scripts/utils/fix-articles.js.map +1 -0
- package/scripts/utils/generate-docs-index.d.ts +8 -0
- package/scripts/utils/generate-docs-index.d.ts.map +1 -0
- package/scripts/utils/generate-docs-index.js +275 -0
- package/scripts/utils/generate-docs-index.js.map +1 -0
- package/scripts/utils/html-sanitize.d.ts +18 -0
- package/scripts/utils/html-sanitize.d.ts.map +1 -0
- package/scripts/utils/html-sanitize.js +57 -0
- package/scripts/utils/html-sanitize.js.map +1 -0
- package/scripts/utils/intelligence-analysis.d.ts +173 -0
- package/scripts/utils/intelligence-analysis.d.ts.map +1 -0
- package/scripts/utils/intelligence-analysis.js +936 -0
- package/scripts/utils/intelligence-analysis.js.map +1 -0
- package/scripts/utils/intelligence-index.d.ts +126 -0
- package/scripts/utils/intelligence-index.d.ts.map +1 -0
- package/scripts/utils/intelligence-index.js +731 -0
- package/scripts/utils/intelligence-index.js.map +1 -0
- package/scripts/utils/metadata-utils.d.ts +14 -0
- package/scripts/utils/metadata-utils.d.ts.map +1 -0
- package/scripts/utils/metadata-utils.js +18 -0
- package/scripts/utils/metadata-utils.js.map +1 -0
- package/scripts/utils/news-metadata.d.ts +47 -0
- package/scripts/utils/news-metadata.d.ts.map +1 -0
- package/scripts/utils/news-metadata.js +259 -0
- package/scripts/utils/news-metadata.js.map +1 -0
- package/scripts/utils/validate-articles.d.ts +2 -0
- package/scripts/utils/validate-articles.d.ts.map +1 -0
- package/scripts/utils/validate-articles.js +284 -0
- package/scripts/utils/validate-articles.js.map +1 -0
- package/scripts/utils/validate-ep-api.d.ts +51 -0
- package/scripts/utils/validate-ep-api.d.ts.map +1 -0
- package/scripts/utils/validate-ep-api.js +160 -0
- package/scripts/utils/validate-ep-api.js.map +1 -0
- package/scripts/utils/world-bank-data.d.ts +84 -0
- package/scripts/utils/world-bank-data.d.ts.map +1 -0
- package/scripts/utils/world-bank-data.js +311 -0
- package/scripts/utils/world-bank-data.js.map +1 -0
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Types/Parliament
|
|
3
|
+
* @description Domain types for European Parliament entities — events, committees,
|
|
4
|
+
* documents, procedures, questions, and voting data.
|
|
5
|
+
*/
|
|
6
|
+
/** Event data from MCP or fallback */
|
|
7
|
+
export interface ParliamentEvent {
|
|
8
|
+
date: string;
|
|
9
|
+
title: string;
|
|
10
|
+
type: string;
|
|
11
|
+
description: string;
|
|
12
|
+
}
|
|
13
|
+
/** Committee meeting data from MCP */
|
|
14
|
+
export interface CommitteeMeeting {
|
|
15
|
+
id?: string | undefined;
|
|
16
|
+
committee: string;
|
|
17
|
+
committeeName?: string | undefined;
|
|
18
|
+
date: string;
|
|
19
|
+
time?: string | undefined;
|
|
20
|
+
location?: string | undefined;
|
|
21
|
+
agenda?: Array<{
|
|
22
|
+
item?: number | undefined;
|
|
23
|
+
title: string;
|
|
24
|
+
type?: string | undefined;
|
|
25
|
+
}> | undefined;
|
|
26
|
+
}
|
|
27
|
+
/** Legislative document from MCP */
|
|
28
|
+
export interface LegislativeDocument {
|
|
29
|
+
id?: string | undefined;
|
|
30
|
+
type?: string | undefined;
|
|
31
|
+
title: string;
|
|
32
|
+
date?: string | undefined;
|
|
33
|
+
status?: string | undefined;
|
|
34
|
+
committee?: string | undefined;
|
|
35
|
+
rapporteur?: string | undefined;
|
|
36
|
+
}
|
|
37
|
+
/** Legislative pipeline procedure */
|
|
38
|
+
export interface LegislativeProcedure {
|
|
39
|
+
id?: string | undefined;
|
|
40
|
+
title: string;
|
|
41
|
+
stage?: string | undefined;
|
|
42
|
+
committee?: string | undefined;
|
|
43
|
+
status?: string | undefined;
|
|
44
|
+
bottleneck?: boolean | undefined;
|
|
45
|
+
}
|
|
46
|
+
/** Parliamentary question */
|
|
47
|
+
export interface ParliamentaryQuestion {
|
|
48
|
+
id?: string | undefined;
|
|
49
|
+
type?: string | undefined;
|
|
50
|
+
author?: string | undefined;
|
|
51
|
+
subject: string;
|
|
52
|
+
date?: string | undefined;
|
|
53
|
+
status?: string | undefined;
|
|
54
|
+
}
|
|
55
|
+
/** Aggregated week-ahead data from multiple MCP sources */
|
|
56
|
+
export interface WeekAheadData {
|
|
57
|
+
events: ParliamentEvent[];
|
|
58
|
+
committees: CommitteeMeeting[];
|
|
59
|
+
documents: LegislativeDocument[];
|
|
60
|
+
pipeline: LegislativeProcedure[];
|
|
61
|
+
questions: ParliamentaryQuestion[];
|
|
62
|
+
}
|
|
63
|
+
/** Committee document with type, title and date */
|
|
64
|
+
export interface CommitteeDocument {
|
|
65
|
+
title: string;
|
|
66
|
+
type: string;
|
|
67
|
+
date: string;
|
|
68
|
+
}
|
|
69
|
+
/** Committee report data aggregated from MCP sources */
|
|
70
|
+
export interface CommitteeData {
|
|
71
|
+
name: string;
|
|
72
|
+
abbreviation: string;
|
|
73
|
+
chair: string;
|
|
74
|
+
members: number;
|
|
75
|
+
documents: CommitteeDocument[];
|
|
76
|
+
effectiveness: string | null;
|
|
77
|
+
}
|
|
78
|
+
/** Voting record from MCP or fallback */
|
|
79
|
+
export interface VotingRecord {
|
|
80
|
+
title: string;
|
|
81
|
+
date: string;
|
|
82
|
+
result: string;
|
|
83
|
+
votes: {
|
|
84
|
+
for: number;
|
|
85
|
+
against: number;
|
|
86
|
+
abstain: number;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/** Voting pattern (party cohesion) from MCP or fallback */
|
|
90
|
+
export interface VotingPattern {
|
|
91
|
+
group: string;
|
|
92
|
+
cohesion: number;
|
|
93
|
+
participation: number;
|
|
94
|
+
}
|
|
95
|
+
/** Voting anomaly from MCP or fallback */
|
|
96
|
+
export interface VotingAnomaly {
|
|
97
|
+
type: string;
|
|
98
|
+
description: string;
|
|
99
|
+
severity: string;
|
|
100
|
+
}
|
|
101
|
+
/** Parliamentary question for motions article (simplified MCP/fallback shape) */
|
|
102
|
+
export interface MotionsQuestion {
|
|
103
|
+
author: string;
|
|
104
|
+
topic: string;
|
|
105
|
+
date: string;
|
|
106
|
+
status: string;
|
|
107
|
+
}
|
|
108
|
+
/** Intelligence analysis for a detected voting anomaly */
|
|
109
|
+
export interface VotingAnomalyIntelligence {
|
|
110
|
+
anomalyId: string;
|
|
111
|
+
significance: 'critical' | 'high' | 'medium' | 'low';
|
|
112
|
+
description: string;
|
|
113
|
+
affectedGroups: string[];
|
|
114
|
+
deviationPercentage: number;
|
|
115
|
+
historicalContext: string;
|
|
116
|
+
implication: string;
|
|
117
|
+
}
|
|
118
|
+
/** Coalition cohesion and alignment intelligence */
|
|
119
|
+
export interface CoalitionIntelligence {
|
|
120
|
+
coalitionId: string;
|
|
121
|
+
groups: string[];
|
|
122
|
+
cohesionScore: number;
|
|
123
|
+
alignmentTrend: 'strengthening' | 'weakening' | 'stable';
|
|
124
|
+
keyVotes: number;
|
|
125
|
+
riskLevel: 'high' | 'medium' | 'low';
|
|
126
|
+
}
|
|
127
|
+
/** MEP influence score across multiple parliamentary dimensions */
|
|
128
|
+
export interface MEPInfluenceScore {
|
|
129
|
+
mepId: string;
|
|
130
|
+
mepName: string;
|
|
131
|
+
overallScore: number;
|
|
132
|
+
votingActivity: number;
|
|
133
|
+
legislativeOutput: number;
|
|
134
|
+
committeeEngagement: number;
|
|
135
|
+
rank: string;
|
|
136
|
+
}
|
|
137
|
+
/** Legislative velocity for procedure pipeline monitoring */
|
|
138
|
+
export interface LegislativeVelocity {
|
|
139
|
+
procedureId: string;
|
|
140
|
+
title: string;
|
|
141
|
+
stage: string;
|
|
142
|
+
daysInCurrentStage: number;
|
|
143
|
+
velocityScore: number;
|
|
144
|
+
bottleneckRisk: 'high' | 'medium' | 'low';
|
|
145
|
+
predictedCompletion: string;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Quantified political significance score for breaking news prioritization.
|
|
149
|
+
* Each dimension contributes a weighted sub-score to an overall 0–100 composite.
|
|
150
|
+
*/
|
|
151
|
+
export interface PoliticalSignificanceScore {
|
|
152
|
+
/** Sub-score for adopted texts / legislative activity (0–100) */
|
|
153
|
+
readonly adoptedTextsScore: number;
|
|
154
|
+
/** Sub-score for affected MEP updates (0–100) */
|
|
155
|
+
readonly affectedMEPsScore: number;
|
|
156
|
+
/** Sub-score for legislative stage proximity to final reading (0–100) */
|
|
157
|
+
readonly legislativeStageScore: number;
|
|
158
|
+
/** Sub-score for event / committee involvement breadth (0–100) */
|
|
159
|
+
readonly committeeInvolvementScore: number;
|
|
160
|
+
/** Weighted composite score (0–100) */
|
|
161
|
+
readonly overallScore: number;
|
|
162
|
+
}
|
|
163
|
+
/** Voting intensity metrics for a set of voting records */
|
|
164
|
+
export interface VotingIntensity {
|
|
165
|
+
/** Largest-position share (including abstentions): 0 = perfect three-way split, 1 = unanimous */
|
|
166
|
+
unanimity: number;
|
|
167
|
+
/** Polarization among for/against voters: 0 = one-sided, 1 = perfectly split (abstain-only records excluded) */
|
|
168
|
+
polarization: number;
|
|
169
|
+
/** Average margin of victory across votes */
|
|
170
|
+
averageMargin: number;
|
|
171
|
+
/** Number of close votes (margin < 10%) */
|
|
172
|
+
closeVoteCount: number;
|
|
173
|
+
/** Number of decisive votes (margin > 60%) */
|
|
174
|
+
decisiveVoteCount: number;
|
|
175
|
+
}
|
|
176
|
+
/** Coalition shift detection result */
|
|
177
|
+
export interface CoalitionShift {
|
|
178
|
+
/** Name of the political group */
|
|
179
|
+
group: string;
|
|
180
|
+
/** Previous cohesion (or baseline) */
|
|
181
|
+
previousCohesion: number;
|
|
182
|
+
/** Current cohesion */
|
|
183
|
+
currentCohesion: number;
|
|
184
|
+
/** Signed change in cohesion (currentCohesion - previousCohesion) */
|
|
185
|
+
cohesionDelta: number;
|
|
186
|
+
/** Direction of the shift */
|
|
187
|
+
direction: 'strengthening' | 'weakening' | 'stable';
|
|
188
|
+
/** Severity of the shift for political intelligence */
|
|
189
|
+
significance: 'critical' | 'high' | 'medium' | 'low';
|
|
190
|
+
}
|
|
191
|
+
/** Polarization index for a parliamentary period */
|
|
192
|
+
export interface PolarizationIndex {
|
|
193
|
+
/** Overall index 0-1 (0 = consensus, 1 = completely polarized) */
|
|
194
|
+
overallIndex: number;
|
|
195
|
+
/** Effective number of voting blocs (Laakso-Taagepera style) */
|
|
196
|
+
effectiveBlocs: number;
|
|
197
|
+
/** Groups above 80% cohesion — potential blocking minorities */
|
|
198
|
+
highCohesionGroups: string[];
|
|
199
|
+
/** Groups below 50% cohesion — internally divided */
|
|
200
|
+
fragmentedGroups: string[];
|
|
201
|
+
/** Assessment label */
|
|
202
|
+
assessment: 'consensus' | 'moderate' | 'polarized' | 'highly-polarized';
|
|
203
|
+
}
|
|
204
|
+
/** Detected voting trend across multiple sessions */
|
|
205
|
+
export interface VotingTrend {
|
|
206
|
+
/** Identifier for the trend (e.g. "increasing-polarization") */
|
|
207
|
+
trendId: string;
|
|
208
|
+
/** Human-readable description of the trend */
|
|
209
|
+
description: string;
|
|
210
|
+
/** Direction of the trend */
|
|
211
|
+
direction: 'increasing' | 'decreasing' | 'stable';
|
|
212
|
+
/** Confidence in the detection (0-1) */
|
|
213
|
+
confidence: number;
|
|
214
|
+
/** Number of records contributing to this trend */
|
|
215
|
+
recordCount: number;
|
|
216
|
+
/** Representative metric value (e.g. average margin change) */
|
|
217
|
+
metricValue: number;
|
|
218
|
+
}
|
|
219
|
+
/** Coalition stability report from cross-session pattern analysis */
|
|
220
|
+
export interface CoalitionStabilityReport {
|
|
221
|
+
/** Overall stability score (0-1, higher = more stable) */
|
|
222
|
+
overallStability: number;
|
|
223
|
+
/** Number of patterns analysed */
|
|
224
|
+
patternCount: number;
|
|
225
|
+
/** Groups with consistently high cohesion */
|
|
226
|
+
stableGroups: string[];
|
|
227
|
+
/** Groups showing declining cohesion */
|
|
228
|
+
decliningGroups: string[];
|
|
229
|
+
/** Forecast assessment label */
|
|
230
|
+
forecast: 'stable' | 'at-risk' | 'volatile';
|
|
231
|
+
}
|
|
232
|
+
/** Legislative velocity report with stage-by-stage timing analysis */
|
|
233
|
+
export interface LegislativeVelocityReport {
|
|
234
|
+
/** Total documents analysed */
|
|
235
|
+
documentCount: number;
|
|
236
|
+
/** Breakdown of documents by stage */
|
|
237
|
+
stageBreakdown: Record<string, number>;
|
|
238
|
+
/** Average days per stage (where data available) */
|
|
239
|
+
averageDaysPerStage: number;
|
|
240
|
+
/** Number of stages identified as bottlenecks (stage-level count, not document-level) */
|
|
241
|
+
bottleneckCount: number;
|
|
242
|
+
/** Overall throughput assessment */
|
|
243
|
+
throughputAssessment: 'fast' | 'normal' | 'slow';
|
|
244
|
+
}
|
|
245
|
+
/** A single item from any EP API v2 feed response (`data[]` array) */
|
|
246
|
+
export interface EPFeedItem {
|
|
247
|
+
/** Full ELI identifier (e.g. `"eli/dl/doc/TA-10-2025-0281"`) */
|
|
248
|
+
id: string;
|
|
249
|
+
/** RDF type (usually `"Work"`) */
|
|
250
|
+
type?: string | undefined;
|
|
251
|
+
/** EP document type URI (e.g. `"def/ep-document-types/TEXT_ADOPTED"`) */
|
|
252
|
+
work_type?: string | undefined;
|
|
253
|
+
/** Short document identifier (e.g. `"TA-10-2025-0281"`) */
|
|
254
|
+
identifier?: string | undefined;
|
|
255
|
+
/** Human-readable label (e.g. `"T10-0281/2025"`) */
|
|
256
|
+
label?: string | undefined;
|
|
257
|
+
/** Title, when available */
|
|
258
|
+
title?: string | undefined;
|
|
259
|
+
/** Date string (ISO 8601 or free-form) */
|
|
260
|
+
date?: string | undefined;
|
|
261
|
+
/** URL link to the source document */
|
|
262
|
+
url?: string | undefined;
|
|
263
|
+
}
|
|
264
|
+
/** A single adopted-text item from the EP adopted-texts feed */
|
|
265
|
+
export interface AdoptedTextFeedItem {
|
|
266
|
+
id: string;
|
|
267
|
+
title: string;
|
|
268
|
+
date: string;
|
|
269
|
+
type?: string | undefined;
|
|
270
|
+
url?: string | undefined;
|
|
271
|
+
/** Short identifier (e.g. `"TA-10-2025-0281"`) */
|
|
272
|
+
identifier?: string | undefined;
|
|
273
|
+
/** Human-readable label (e.g. `"T10-0281/2025"`) */
|
|
274
|
+
label?: string | undefined;
|
|
275
|
+
}
|
|
276
|
+
/** A single event item from the EP events feed */
|
|
277
|
+
export interface EventFeedItem {
|
|
278
|
+
id: string;
|
|
279
|
+
title: string;
|
|
280
|
+
date: string;
|
|
281
|
+
type?: string | undefined;
|
|
282
|
+
location?: string | undefined;
|
|
283
|
+
url?: string | undefined;
|
|
284
|
+
identifier?: string | undefined;
|
|
285
|
+
label?: string | undefined;
|
|
286
|
+
}
|
|
287
|
+
/** A single procedure item from the EP procedures feed */
|
|
288
|
+
export interface ProcedureFeedItem {
|
|
289
|
+
id: string;
|
|
290
|
+
title: string;
|
|
291
|
+
date: string;
|
|
292
|
+
stage?: string | undefined;
|
|
293
|
+
type?: string | undefined;
|
|
294
|
+
url?: string | undefined;
|
|
295
|
+
identifier?: string | undefined;
|
|
296
|
+
label?: string | undefined;
|
|
297
|
+
}
|
|
298
|
+
/** A single MEP update item from the EP MEPs feed */
|
|
299
|
+
export interface MEPFeedItem {
|
|
300
|
+
id: string;
|
|
301
|
+
name: string;
|
|
302
|
+
date: string;
|
|
303
|
+
country?: string | undefined;
|
|
304
|
+
group?: string | undefined;
|
|
305
|
+
url?: string | undefined;
|
|
306
|
+
identifier?: string | undefined;
|
|
307
|
+
label?: string | undefined;
|
|
308
|
+
}
|
|
309
|
+
/** A single document item from EP document feeds */
|
|
310
|
+
export interface DocumentFeedItem {
|
|
311
|
+
id: string;
|
|
312
|
+
title: string;
|
|
313
|
+
date: string;
|
|
314
|
+
type?: string | undefined;
|
|
315
|
+
url?: string | undefined;
|
|
316
|
+
identifier?: string | undefined;
|
|
317
|
+
label?: string | undefined;
|
|
318
|
+
}
|
|
319
|
+
/** A single parliamentary question item from the EP questions feed */
|
|
320
|
+
export interface QuestionFeedItem {
|
|
321
|
+
id: string;
|
|
322
|
+
title: string;
|
|
323
|
+
date: string;
|
|
324
|
+
type?: string | undefined;
|
|
325
|
+
url?: string | undefined;
|
|
326
|
+
identifier?: string | undefined;
|
|
327
|
+
label?: string | undefined;
|
|
328
|
+
}
|
|
329
|
+
/** A single MEP declaration item from the EP declarations feed */
|
|
330
|
+
export interface DeclarationFeedItem {
|
|
331
|
+
id: string;
|
|
332
|
+
title: string;
|
|
333
|
+
date: string;
|
|
334
|
+
type?: string | undefined;
|
|
335
|
+
url?: string | undefined;
|
|
336
|
+
identifier?: string | undefined;
|
|
337
|
+
label?: string | undefined;
|
|
338
|
+
}
|
|
339
|
+
/** A single corporate body item from the EP corporate bodies feed */
|
|
340
|
+
export interface CorporateBodyFeedItem {
|
|
341
|
+
id: string;
|
|
342
|
+
title: string;
|
|
343
|
+
date: string;
|
|
344
|
+
type?: string | undefined;
|
|
345
|
+
url?: string | undefined;
|
|
346
|
+
identifier?: string | undefined;
|
|
347
|
+
label?: string | undefined;
|
|
348
|
+
}
|
|
349
|
+
/** Aggregated feed data for breaking news articles (legacy compat) */
|
|
350
|
+
export interface BreakingNewsFeedData {
|
|
351
|
+
adoptedTexts: readonly AdoptedTextFeedItem[];
|
|
352
|
+
events: readonly EventFeedItem[];
|
|
353
|
+
procedures: readonly ProcedureFeedItem[];
|
|
354
|
+
mepUpdates: readonly MEPFeedItem[];
|
|
355
|
+
/** Total number of MEP updates reported by the feed API (may exceed the fetched/displayed count) */
|
|
356
|
+
totalMEPUpdates?: number | undefined;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Comprehensive feed data aggregation from all EP API v2 feed endpoints.
|
|
360
|
+
* Used by all article strategies as the primary data source for current/recent events.
|
|
361
|
+
*/
|
|
362
|
+
export interface EPFeedData {
|
|
363
|
+
/** Recently adopted texts (resolutions, directives, regulations) */
|
|
364
|
+
adoptedTexts: readonly AdoptedTextFeedItem[];
|
|
365
|
+
/** Recent parliamentary events, hearings, conferences */
|
|
366
|
+
events: readonly EventFeedItem[];
|
|
367
|
+
/** Recently updated legislative procedures */
|
|
368
|
+
procedures: readonly ProcedureFeedItem[];
|
|
369
|
+
/** Recent MEP updates (new members, departures, changes) */
|
|
370
|
+
mepUpdates: readonly MEPFeedItem[];
|
|
371
|
+
/** Recently published or updated documents */
|
|
372
|
+
documents: readonly DocumentFeedItem[];
|
|
373
|
+
/** Recently published plenary documents */
|
|
374
|
+
plenaryDocuments: readonly DocumentFeedItem[];
|
|
375
|
+
/** Recently published committee documents */
|
|
376
|
+
committeeDocuments: readonly DocumentFeedItem[];
|
|
377
|
+
/** Recently published plenary session documents */
|
|
378
|
+
plenarySessionDocuments: readonly DocumentFeedItem[];
|
|
379
|
+
/** Recently published external documents */
|
|
380
|
+
externalDocuments: readonly DocumentFeedItem[];
|
|
381
|
+
/** Recently tabled parliamentary questions */
|
|
382
|
+
questions: readonly QuestionFeedItem[];
|
|
383
|
+
/** Recently updated MEP declarations */
|
|
384
|
+
declarations: readonly DeclarationFeedItem[];
|
|
385
|
+
/** Recently updated corporate bodies */
|
|
386
|
+
corporateBodies: readonly CorporateBodyFeedItem[];
|
|
387
|
+
}
|
|
388
|
+
//# sourceMappingURL=parliament.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parliament.d.ts","sourceRoot":"","sources":["../../src/types/parliament.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH,sCAAsC;AACtC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,sCAAsC;AACtC,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,C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MAAM,EAAE,SAAS,aAAa,EAAE,CAAC;IACjC,8CAA8C;IAC9C,UAAU,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACzC,4DAA4D;IAC5D,UAAU,EAAE,SAAS,WAAW,EAAE,CAAC;IACnC,8CAA8C;IAC9C,SAAS,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACvC,2CAA2C;IAC3C,gBAAgB,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC9C,6CAA6C;IAC7C,kBAAkB,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAChD,mDAAmD;IACnD,uBAAuB,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACrD,4CAA4C;IAC5C,iBAAiB,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC/C,8CAA8C;IAC9C,SAAS,EAAE,SAAS,gBAAgB,EAAE,CAAC;IACvC,wCAAwC;IACxC,YAAY,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC7C,wCAAwC;IACxC,eAAe,EAAE,SAAS,qBAAqB,EAAE,CAAC;CACnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parliament.js","sourceRoot":"","sources":["../../src/types/parliament.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,sCAAsC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Types/Quality
|
|
3
|
+
* @description Type definitions for the Article Quality Assurance Pipeline.
|
|
4
|
+
*
|
|
5
|
+
* Provides interfaces for quality scoring, analysis depth assessment,
|
|
6
|
+
* stakeholder coverage evaluation, and visualization quality metrics
|
|
7
|
+
* used by the article-quality-scorer utility.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Measures how deeply an article analyses the political situation.
|
|
11
|
+
* Each boolean dimension maps to a detected signal in the article text.
|
|
12
|
+
*/
|
|
13
|
+
export interface AnalysisDepthScore {
|
|
14
|
+
/** Whether political context (coalitions, majorities, opposition) is discussed */
|
|
15
|
+
readonly politicalContextPresent: boolean;
|
|
16
|
+
/** Whether coalition dynamics and inter-group alliances are analysed */
|
|
17
|
+
readonly coalitionDynamicsAnalyzed: boolean;
|
|
18
|
+
/** Whether historical comparison or timeline context is provided */
|
|
19
|
+
readonly historicalContextProvided: boolean;
|
|
20
|
+
/** Whether conclusions are backed by data, figures, or cited evidence */
|
|
21
|
+
readonly evidenceBasedConclusions: boolean;
|
|
22
|
+
/** Whether forward-looking scenarios or projections are presented */
|
|
23
|
+
readonly scenarioPlanning: boolean;
|
|
24
|
+
/** Whether uncertainty or confidence levels are explicitly stated */
|
|
25
|
+
readonly confidenceLevelsIndicated: boolean;
|
|
26
|
+
/** Composite 0–100 score derived from the boolean dimensions above */
|
|
27
|
+
readonly score: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Measures the breadth and balance of stakeholder perspectives in an article.
|
|
31
|
+
*/
|
|
32
|
+
export interface StakeholderCoverage {
|
|
33
|
+
/** Stakeholder categories whose perspectives are detected in the article */
|
|
34
|
+
readonly perspectivesPresent: readonly string[];
|
|
35
|
+
/** Stakeholder categories whose perspectives appear absent from the article */
|
|
36
|
+
readonly perspectivesMissing: readonly string[];
|
|
37
|
+
/** 0–100 score based on how many of the known stakeholder types are covered */
|
|
38
|
+
readonly balanceScore: number;
|
|
39
|
+
/** 0–100 score based on analytical reasoning quality inferred from text signals */
|
|
40
|
+
readonly reasoningQuality: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Measures the quality and completeness of embedded visual elements
|
|
44
|
+
* (SWOT, dashboards, mindmaps, and deep-analysis sections).
|
|
45
|
+
*/
|
|
46
|
+
export interface VisualizationQuality {
|
|
47
|
+
/** Whether a SWOT analysis section is present */
|
|
48
|
+
readonly swotPresent: boolean;
|
|
49
|
+
/** Number of distinct SWOT dimension elements detected */
|
|
50
|
+
readonly swotDimensions: number;
|
|
51
|
+
/** Whether a data dashboard section is present */
|
|
52
|
+
readonly dashboardPresent: boolean;
|
|
53
|
+
/** Number of individual metrics detected in the dashboard */
|
|
54
|
+
readonly dashboardMetrics: number;
|
|
55
|
+
/** Whether trend indicators (arrows or CSS classes) are present in the dashboard */
|
|
56
|
+
readonly dashboardTrends: boolean;
|
|
57
|
+
/** Whether a mindmap section is present */
|
|
58
|
+
readonly mindmapPresent: boolean;
|
|
59
|
+
/** Number of mindmap branch elements detected (breadth indicator) */
|
|
60
|
+
readonly mindmapBranches: number;
|
|
61
|
+
/** Whether deep-analysis sections are present */
|
|
62
|
+
readonly deepAnalysisPresent: boolean;
|
|
63
|
+
/** Number of evidence items detected inside deep-analysis sections */
|
|
64
|
+
readonly deepAnalysisEvidence: number;
|
|
65
|
+
/** Composite 0–100 score derived from the dimensions above */
|
|
66
|
+
readonly score: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Letter grade assigned to an article based on its overall quality score.
|
|
70
|
+
*
|
|
71
|
+
* | Grade | Score range |
|
|
72
|
+
* |-------|-------------|
|
|
73
|
+
* | A | ≥ 80 |
|
|
74
|
+
* | B | ≥ 65 |
|
|
75
|
+
* | C | ≥ 40 |
|
|
76
|
+
* | D | ≥ 25 |
|
|
77
|
+
* | F | < 25 |
|
|
78
|
+
*/
|
|
79
|
+
export type ArticleGrade = 'A' | 'B' | 'C' | 'D' | 'F';
|
|
80
|
+
/**
|
|
81
|
+
* Comprehensive quality report for a single generated article.
|
|
82
|
+
* Produced by {@link scoreArticleQuality} in article-quality-scorer.
|
|
83
|
+
*/
|
|
84
|
+
export interface ArticleQualityReport {
|
|
85
|
+
/** Unique identifier for the article (typically the filename slug) */
|
|
86
|
+
readonly articleId: string;
|
|
87
|
+
/** ISO date string (YYYY-MM-DD) of the article */
|
|
88
|
+
readonly date: string;
|
|
89
|
+
/** Article type / category (e.g. "week-ahead") */
|
|
90
|
+
readonly type: string;
|
|
91
|
+
/** Language code of the article (e.g. "en", "de") */
|
|
92
|
+
readonly lang: string;
|
|
93
|
+
/** Plain-text word count of the main article content */
|
|
94
|
+
readonly wordCount: number;
|
|
95
|
+
/** Number of analysis-content sections detected (e.g. analysis, deep-analysis, SWOT, dashboard, mindmap) */
|
|
96
|
+
readonly analysisSections: number;
|
|
97
|
+
/** Number of evidence or document references detected */
|
|
98
|
+
readonly evidenceReferences: number;
|
|
99
|
+
/** Detailed analysis-depth scoring */
|
|
100
|
+
readonly analysisDepth: AnalysisDepthScore;
|
|
101
|
+
/** Stakeholder coverage assessment */
|
|
102
|
+
readonly stakeholderCoverage: StakeholderCoverage;
|
|
103
|
+
/** Visualization quality assessment */
|
|
104
|
+
readonly visualizationQuality: VisualizationQuality;
|
|
105
|
+
/** Composite quality score 0–100 */
|
|
106
|
+
readonly overallScore: number;
|
|
107
|
+
/** Letter grade derived from overallScore */
|
|
108
|
+
readonly grade: ArticleGrade;
|
|
109
|
+
/** Actionable improvement recommendations */
|
|
110
|
+
readonly recommendations: readonly string[];
|
|
111
|
+
/** true when overallScore ≥ 40 (Grade C or better) */
|
|
112
|
+
readonly passesQualityGate: boolean;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=quality.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality.d.ts","sourceRoot":"","sources":["../../src/types/quality.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAIH;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,kFAAkF;IAClF,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;IAC1C,wEAAwE;IACxE,QAAQ,CAAC,yBAAyB,EAAE,OAAO,CAAC;IAC5C,oEAAoE;IACpE,QAAQ,CAAC,yBAAyB,EAAE,OAAO,CAAC;IAC5C,yEAAyE;IACzE,QAAQ,CAAC,wBAAwB,EAAE,OAAO,CAAC;IAC3C,qEAAqE;IACrE,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,qEAAqE;IACrE,QAAQ,CAAC,yBAAyB,EAAE,OAAO,CAAC;IAC5C,sEAAsE;I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,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,4GAA4G;IAC5G,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,yDAAyD;IACzD,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,sCAAsC;IACtC,QAAQ,CAAC,aAAa,EAAE,kBAAkB,CAAC;IAC3C,sCAAsC;IACtC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAClD,uCAAuC;IACvC,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IACpD,oCAAoC;IACpC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,6CAA6C;IAC7C,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,sDAAsD;IACtD,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;CACrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality.js","sourceRoot":"","sources":["../../src/types/quality.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,sCAAsC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Types/Stakeholder
|
|
3
|
+
* @description Multi-stakeholder perspective types for the enhanced political
|
|
4
|
+
* analysis engine. These types model how parliamentary actions affect each
|
|
5
|
+
* major stakeholder group and support iterative multi-pass analysis.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* The six major stakeholder groups that are assessed for every parliamentary action.
|
|
9
|
+
* - **political_groups**: EP political groups and their electoral blocs
|
|
10
|
+
* - **civil_society**: NGOs, advocacy organisations, think-tanks
|
|
11
|
+
* - **industry**: Business associations, trade bodies, chambers of commerce
|
|
12
|
+
* - **national_govts**: Member state governments and their ministries
|
|
13
|
+
* - **citizens**: EU citizens in general; voters and rights-holders
|
|
14
|
+
* - **eu_institutions**: Commission, Council, Court of Justice, ECB etc.
|
|
15
|
+
*/
|
|
16
|
+
export type AnalysisStakeholderType = 'political_groups' | 'civil_society' | 'industry' | 'national_govts' | 'citizens' | 'eu_institutions';
|
|
17
|
+
/**
|
|
18
|
+
* Stable iteration order for all six stakeholder types.
|
|
19
|
+
* Use this constant in any code that needs to iterate over all groups
|
|
20
|
+
* to avoid duplicating the list in multiple files.
|
|
21
|
+
*/
|
|
22
|
+
export declare const ALL_STAKEHOLDER_TYPES: readonly AnalysisStakeholderType[];
|
|
23
|
+
/**
|
|
24
|
+
* The direction of impact on a stakeholder group.
|
|
25
|
+
* - **positive**: The action clearly benefits the stakeholder
|
|
26
|
+
* - **negative**: The action clearly harms or disadvantages the stakeholder
|
|
27
|
+
* - **neutral**: The action has no material effect
|
|
28
|
+
* - **mixed**: The action has both positive and negative consequences
|
|
29
|
+
*/
|
|
30
|
+
export type StakeholderImpact = 'positive' | 'negative' | 'neutral' | 'mixed';
|
|
31
|
+
/**
|
|
32
|
+
* How important the impact is for the stakeholder group.
|
|
33
|
+
*/
|
|
34
|
+
export type StakeholderSeverity = 'high' | 'medium' | 'low';
|
|
35
|
+
/**
|
|
36
|
+
* A detailed perspective on how a parliamentary action affects one
|
|
37
|
+
* specific stakeholder group. Used in multi-stakeholder analysis to
|
|
38
|
+
* map every action to its full range of societal consequences.
|
|
39
|
+
*/
|
|
40
|
+
export interface StakeholderPerspective {
|
|
41
|
+
/** Which stakeholder group this perspective describes */
|
|
42
|
+
readonly stakeholder: AnalysisStakeholderType;
|
|
43
|
+
/** Direction of the impact on this stakeholder */
|
|
44
|
+
readonly impact: StakeholderImpact;
|
|
45
|
+
/** Magnitude of the impact */
|
|
46
|
+
readonly severity: StakeholderSeverity;
|
|
47
|
+
/** Human-readable reasoning explaining the impact */
|
|
48
|
+
readonly reasoning: string;
|
|
49
|
+
/** Evidence strings supporting the reasoning (data points, text references) */
|
|
50
|
+
readonly evidence: readonly string[];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Identifies which analysis pass produced a finding.
|
|
54
|
+
* Mirrors the four-pass iterative refinement flow:
|
|
55
|
+
* 1. `initial` — Baseline assessment from MCP data
|
|
56
|
+
* 2. `stakeholder_challenge` — How each group's interests are affected
|
|
57
|
+
* 3. `cross_perspective` — Conflicts and alignments across groups
|
|
58
|
+
* 4. `final_refinement` — Balanced evidence-based conclusions
|
|
59
|
+
*/
|
|
60
|
+
export type AnalysisIterationType = 'initial' | 'stakeholder_challenge' | 'cross_perspective' | 'final_refinement';
|
|
61
|
+
/**
|
|
62
|
+
* A single pass in the iterative multi-pass analysis cycle.
|
|
63
|
+
* Captures the intermediate thinking at each stage of refinement.
|
|
64
|
+
*/
|
|
65
|
+
export interface AnalysisIteration {
|
|
66
|
+
/** Which pass number this is (1–4) */
|
|
67
|
+
readonly pass: number;
|
|
68
|
+
/** The type of analysis pass */
|
|
69
|
+
readonly type: AnalysisIterationType;
|
|
70
|
+
/** Short summary of what this pass adds or changes */
|
|
71
|
+
readonly summary: string;
|
|
72
|
+
/** Key findings produced in this pass */
|
|
73
|
+
readonly findings: readonly string[];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A row in the stakeholder outcome matrix: one parliamentary action mapped
|
|
77
|
+
* to an outcome (winner / loser / neutral) for each of the six stakeholder
|
|
78
|
+
* groups, plus a confidence rating.
|
|
79
|
+
*/
|
|
80
|
+
export interface StakeholderOutcomeMatrix {
|
|
81
|
+
/** The parliamentary action being assessed */
|
|
82
|
+
readonly action: string;
|
|
83
|
+
/** How each stakeholder group fares as a result of the action */
|
|
84
|
+
readonly outcomes: Readonly<Record<AnalysisStakeholderType, 'winner' | 'loser' | 'neutral'>>;
|
|
85
|
+
/** Confidence in the outcome assessments */
|
|
86
|
+
readonly confidence: 'high' | 'medium' | 'low';
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=stakeholder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stakeholder.d.ts","sourceRoot":"","sources":["../../src/types/stakeholder.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,uBAAuB,GAC/B,kBAAkB,GAClB,eAAe,GACf,UAAU,GACV,gBAAgB,GAChB,UAAU,GACV,iBAAiB,CAAC;AAEtB;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,uBAAuB,EAOnE,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC;AAE9E;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE5D;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,yDAAyD;IACzD,QAAQ,CAAC,WAAW,EAAE,uBAAuB,CAAC;IAC9C,kDAAkD;IAClD,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,8BAA8B;IAC9B,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IACvC,qDAAqD;IACrD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,+EAA+E;IAC/E,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAC7B,SAAS,GACT,uBAAuB,GACvB,mBAAmB,GACnB,kBAAkB,CAAC;AAEvB;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,sDAAsD;IACtD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,uBAAuB,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC;IAC7F,4CAA4C;IAC5C,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;CAChD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2024-2026 Hack23 AB
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
/**
|
|
4
|
+
* Stable iteration order for all six stakeholder types.
|
|
5
|
+
* Use this constant in any code that needs to iterate over all groups
|
|
6
|
+
* to avoid duplicating the list in multiple files.
|
|
7
|
+
*/
|
|
8
|
+
export const ALL_STAKEHOLDER_TYPES = [
|
|
9
|
+
'political_groups',
|
|
10
|
+
'civil_society',
|
|
11
|
+
'industry',
|
|
12
|
+
'national_govts',
|
|
13
|
+
'citizens',
|
|
14
|
+
'eu_institutions',
|
|
15
|
+
];
|
|
16
|
+
//# sourceMappingURL=stakeholder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stakeholder.js","sourceRoot":"","sources":["../../src/types/stakeholder.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,sCAAsC;AA0BtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAuC;IACvE,kBAAkB;IAClB,eAAe;IACf,UAAU;IACV,gBAAgB;IAChB,UAAU;IACV,iBAAiB;CAClB,CAAC"}
|