riksdagsmonitor 0.8.14 β 0.8.15
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/dist/lib/cia/dashboard-init.d.ts +26 -0
- package/dist/lib/cia/dashboard-init.d.ts.map +1 -0
- package/dist/lib/cia/dashboard-init.js +108 -0
- package/dist/lib/cia/dashboard-init.js.map +1 -0
- package/dist/lib/cia/data-loader.d.ts +408 -0
- package/dist/lib/cia/data-loader.d.ts.map +1 -0
- package/dist/lib/cia/data-loader.js +867 -0
- package/dist/lib/cia/data-loader.js.map +1 -0
- package/dist/lib/cia/election-predictions.d.ts +78 -0
- package/dist/lib/cia/election-predictions.d.ts.map +1 -0
- package/dist/lib/cia/election-predictions.js +259 -0
- package/dist/lib/cia/election-predictions.js.map +1 -0
- package/dist/lib/cia/i18n-translations.d.ts +111 -0
- package/dist/lib/cia/i18n-translations.d.ts.map +1 -0
- package/dist/lib/cia/i18n-translations.js +619 -0
- package/dist/lib/cia/i18n-translations.js.map +1 -0
- package/dist/lib/cia/visualizations.d.ts +64 -0
- package/dist/lib/cia/visualizations.d.ts.map +1 -0
- package/dist/lib/cia/visualizations.js +662 -0
- package/dist/lib/cia/visualizations.js.map +1 -0
- package/dist/lib/dashboards/anomaly-detection.d.ts +44 -0
- package/dist/lib/dashboards/anomaly-detection.d.ts.map +1 -0
- package/dist/lib/dashboards/anomaly-detection.js +1017 -0
- package/dist/lib/dashboards/anomaly-detection.js.map +1 -0
- package/dist/lib/dashboards/coalition-dashboard.d.ts +36 -0
- package/dist/lib/dashboards/coalition-dashboard.d.ts.map +1 -0
- package/dist/lib/dashboards/coalition-dashboard.js +629 -0
- package/dist/lib/dashboards/coalition-dashboard.js.map +1 -0
- package/dist/lib/dashboards/coalition-loader.d.ts +43 -0
- package/dist/lib/dashboards/coalition-loader.d.ts.map +1 -0
- package/dist/lib/dashboards/coalition-loader.js +665 -0
- package/dist/lib/dashboards/coalition-loader.js.map +1 -0
- package/dist/lib/dashboards/committees-dashboard.d.ts +23 -0
- package/dist/lib/dashboards/committees-dashboard.d.ts.map +1 -0
- package/dist/lib/dashboards/committees-dashboard.js +886 -0
- package/dist/lib/dashboards/committees-dashboard.js.map +1 -0
- package/dist/lib/dashboards/election-cycle.d.ts +62 -0
- package/dist/lib/dashboards/election-cycle.d.ts.map +1 -0
- package/dist/lib/dashboards/election-cycle.js +484 -0
- package/dist/lib/dashboards/election-cycle.js.map +1 -0
- package/dist/lib/dashboards/ministry-dashboard.d.ts +46 -0
- package/dist/lib/dashboards/ministry-dashboard.d.ts.map +1 -0
- package/dist/lib/dashboards/ministry-dashboard.js +1114 -0
- package/dist/lib/dashboards/ministry-dashboard.js.map +1 -0
- package/dist/lib/dashboards/party-dashboard.d.ts +56 -0
- package/dist/lib/dashboards/party-dashboard.d.ts.map +1 -0
- package/dist/lib/dashboards/party-dashboard.js +981 -0
- package/dist/lib/dashboards/party-dashboard.js.map +1 -0
- package/dist/lib/dashboards/politician-dashboard.d.ts +41 -0
- package/dist/lib/dashboards/politician-dashboard.d.ts.map +1 -0
- package/dist/lib/dashboards/politician-dashboard.js +611 -0
- package/dist/lib/dashboards/politician-dashboard.js.map +1 -0
- package/dist/lib/dashboards/pre-election.d.ts +64 -0
- package/dist/lib/dashboards/pre-election.d.ts.map +1 -0
- package/dist/lib/dashboards/pre-election.js +604 -0
- package/dist/lib/dashboards/pre-election.js.map +1 -0
- package/dist/lib/dashboards/risk-dashboard.d.ts +37 -0
- package/dist/lib/dashboards/risk-dashboard.d.ts.map +1 -0
- package/dist/lib/dashboards/risk-dashboard.js +863 -0
- package/dist/lib/dashboards/risk-dashboard.js.map +1 -0
- package/dist/lib/dashboards/seasonal-patterns.d.ts +24 -0
- package/dist/lib/dashboards/seasonal-patterns.d.ts.map +1 -0
- package/dist/lib/dashboards/seasonal-patterns.js +535 -0
- package/dist/lib/dashboards/seasonal-patterns.js.map +1 -0
- package/dist/lib/dashboards/stats-loader.d.ts +35 -0
- package/dist/lib/dashboards/stats-loader.d.ts.map +1 -0
- package/dist/lib/dashboards/stats-loader.js +145 -0
- package/dist/lib/dashboards/stats-loader.js.map +1 -0
- package/dist/lib/shared/chart-factory.d.ts.map +1 -0
- package/dist/lib/shared/chart-factory.js.map +1 -0
- package/dist/lib/shared/data-loader.d.ts.map +1 -0
- package/dist/lib/shared/data-loader.js.map +1 -0
- package/dist/lib/shared/dom-utils.d.ts.map +1 -0
- package/dist/lib/shared/dom-utils.js.map +1 -0
- package/dist/lib/shared/error-boundary.d.ts.map +1 -0
- package/dist/lib/shared/error-boundary.js.map +1 -0
- package/dist/lib/shared/fallback-ui.d.ts.map +1 -0
- package/dist/lib/shared/fallback-ui.js.map +1 -0
- package/dist/lib/shared/index.d.ts.map +1 -0
- package/dist/lib/shared/index.js.map +1 -0
- package/dist/lib/shared/logger.d.ts.map +1 -0
- package/dist/lib/shared/logger.js.map +1 -0
- package/dist/lib/shared/register-globals.d.ts +14 -0
- package/dist/lib/shared/register-globals.d.ts.map +1 -0
- package/dist/lib/shared/register-globals.js +21 -0
- package/dist/lib/shared/register-globals.js.map +1 -0
- package/dist/lib/shared/theme.d.ts.map +1 -0
- package/dist/lib/shared/theme.js.map +1 -0
- package/dist/lib/shared/types.d.ts.map +1 -0
- package/dist/lib/shared/types.js.map +1 -0
- package/dist/lib/ui/back-to-top.d.ts +13 -0
- package/dist/lib/ui/back-to-top.d.ts.map +1 -0
- package/dist/lib/ui/back-to-top.js +48 -0
- package/dist/lib/ui/back-to-top.js.map +1 -0
- package/dist/scripts/ai-analysis/coalition-detector.d.ts +28 -0
- package/dist/scripts/ai-analysis/coalition-detector.d.ts.map +1 -0
- package/dist/scripts/ai-analysis/coalition-detector.js +242 -0
- package/dist/scripts/ai-analysis/coalition-detector.js.map +1 -0
- package/dist/scripts/ai-analysis/dashboard-analyzer.d.ts +73 -0
- package/dist/scripts/ai-analysis/dashboard-analyzer.d.ts.map +1 -0
- package/dist/scripts/ai-analysis/dashboard-analyzer.js +511 -0
- package/dist/scripts/ai-analysis/dashboard-analyzer.js.map +1 -0
- package/dist/scripts/ai-analysis/document-analyzer.d.ts +196 -0
- package/dist/scripts/ai-analysis/document-analyzer.d.ts.map +1 -0
- package/dist/scripts/ai-analysis/document-analyzer.js +1001 -0
- package/dist/scripts/ai-analysis/document-analyzer.js.map +1 -0
- package/dist/scripts/ai-analysis/domains/index.d.ts +15 -0
- package/dist/scripts/ai-analysis/domains/index.d.ts.map +1 -0
- package/dist/scripts/ai-analysis/domains/index.js +494 -0
- package/dist/scripts/ai-analysis/domains/index.js.map +1 -0
- package/dist/scripts/ai-analysis/helpers.d.ts +43 -0
- package/dist/scripts/ai-analysis/helpers.d.ts.map +1 -0
- package/dist/scripts/ai-analysis/helpers.js +79 -0
- package/dist/scripts/ai-analysis/helpers.js.map +1 -0
- package/dist/scripts/ai-analysis/index.d.ts +15 -0
- package/dist/scripts/ai-analysis/index.d.ts.map +1 -0
- package/dist/scripts/ai-analysis/index.js +14 -0
- package/dist/scripts/ai-analysis/index.js.map +1 -0
- package/dist/scripts/ai-analysis/pipeline.d.ts +41 -0
- package/dist/scripts/ai-analysis/pipeline.d.ts.map +1 -0
- package/dist/scripts/ai-analysis/pipeline.js +208 -0
- package/dist/scripts/ai-analysis/pipeline.js.map +1 -0
- package/dist/scripts/ai-analysis/political-significance.d.ts +63 -0
- package/dist/scripts/ai-analysis/political-significance.d.ts.map +1 -0
- package/dist/scripts/ai-analysis/political-significance.js +227 -0
- package/dist/scripts/ai-analysis/political-significance.js.map +1 -0
- package/dist/scripts/ai-analysis/quality-assessor.d.ts +104 -0
- package/dist/scripts/ai-analysis/quality-assessor.d.ts.map +1 -0
- package/dist/scripts/ai-analysis/quality-assessor.js +554 -0
- package/dist/scripts/ai-analysis/quality-assessor.js.map +1 -0
- package/dist/scripts/ai-analysis/swot/index.d.ts +56 -0
- package/dist/scripts/ai-analysis/swot/index.d.ts.map +1 -0
- package/dist/scripts/ai-analysis/swot/index.js +360 -0
- package/dist/scripts/ai-analysis/swot/index.js.map +1 -0
- package/dist/scripts/ai-analysis/swot/placeholders.d.ts +30 -0
- package/dist/scripts/ai-analysis/swot/placeholders.d.ts.map +1 -0
- package/dist/scripts/ai-analysis/swot/placeholders.js +381 -0
- package/dist/scripts/ai-analysis/swot/placeholders.js.map +1 -0
- package/dist/scripts/ai-analysis/types.d.ts +333 -0
- package/dist/scripts/ai-analysis/types.d.ts.map +1 -0
- package/dist/scripts/ai-analysis/types.js +19 -0
- package/dist/scripts/ai-analysis/types.js.map +1 -0
- package/dist/scripts/ai-analysis/visualisation/index.d.ts +15 -0
- package/dist/scripts/ai-analysis/visualisation/index.d.ts.map +1 -0
- package/dist/scripts/ai-analysis/visualisation/index.js +179 -0
- package/dist/scripts/ai-analysis/visualisation/index.js.map +1 -0
- package/dist/scripts/analysis-framework/cross-reference.d.ts +35 -0
- package/dist/scripts/analysis-framework/cross-reference.d.ts.map +1 -0
- package/dist/scripts/analysis-framework/cross-reference.js +290 -0
- package/dist/scripts/analysis-framework/cross-reference.js.map +1 -0
- package/dist/scripts/analysis-framework/index.d.ts +79 -0
- package/dist/scripts/analysis-framework/index.d.ts.map +1 -0
- package/dist/scripts/analysis-framework/index.js +133 -0
- package/dist/scripts/analysis-framework/index.js.map +1 -0
- package/dist/scripts/analysis-framework/lenses/citizen.d.ts +29 -0
- package/dist/scripts/analysis-framework/lenses/citizen.d.ts.map +1 -0
- package/dist/scripts/analysis-framework/lenses/citizen.js +220 -0
- package/dist/scripts/analysis-framework/lenses/citizen.js.map +1 -0
- package/dist/scripts/analysis-framework/lenses/economic.d.ts +29 -0
- package/dist/scripts/analysis-framework/lenses/economic.d.ts.map +1 -0
- package/dist/scripts/analysis-framework/lenses/economic.js +227 -0
- package/dist/scripts/analysis-framework/lenses/economic.js.map +1 -0
- package/dist/scripts/analysis-framework/lenses/government.d.ts +32 -0
- package/dist/scripts/analysis-framework/lenses/government.d.ts.map +1 -0
- package/dist/scripts/analysis-framework/lenses/government.js +265 -0
- package/dist/scripts/analysis-framework/lenses/government.js.map +1 -0
- package/dist/scripts/analysis-framework/lenses/international.d.ts +29 -0
- package/dist/scripts/analysis-framework/lenses/international.d.ts.map +1 -0
- package/dist/scripts/analysis-framework/lenses/international.js +248 -0
- package/dist/scripts/analysis-framework/lenses/international.js.map +1 -0
- package/dist/scripts/analysis-framework/lenses/media.d.ts +29 -0
- package/dist/scripts/analysis-framework/lenses/media.d.ts.map +1 -0
- package/dist/scripts/analysis-framework/lenses/media.js +211 -0
- package/dist/scripts/analysis-framework/lenses/media.js.map +1 -0
- package/dist/scripts/analysis-framework/lenses/opposition.d.ts +29 -0
- package/dist/scripts/analysis-framework/lenses/opposition.d.ts.map +1 -0
- package/dist/scripts/analysis-framework/lenses/opposition.js +234 -0
- package/dist/scripts/analysis-framework/lenses/opposition.js.map +1 -0
- package/dist/scripts/analysis-framework/methodology-types.d.ts +309 -0
- package/dist/scripts/analysis-framework/methodology-types.d.ts.map +1 -0
- package/dist/scripts/analysis-framework/methodology-types.js +38 -0
- package/dist/scripts/analysis-framework/methodology-types.js.map +1 -0
- package/dist/scripts/analysis-framework/political-classification.d.ts +58 -0
- package/dist/scripts/analysis-framework/political-classification.d.ts.map +1 -0
- package/dist/scripts/analysis-framework/political-classification.js +414 -0
- package/dist/scripts/analysis-framework/political-classification.js.map +1 -0
- package/dist/scripts/analysis-framework/political-risk-assessment.d.ts +74 -0
- package/dist/scripts/analysis-framework/political-risk-assessment.d.ts.map +1 -0
- package/dist/scripts/analysis-framework/political-risk-assessment.js +656 -0
- package/dist/scripts/analysis-framework/political-risk-assessment.js.map +1 -0
- package/dist/scripts/analysis-framework/political-threat-analysis.d.ts +65 -0
- package/dist/scripts/analysis-framework/political-threat-analysis.d.ts.map +1 -0
- package/dist/scripts/analysis-framework/political-threat-analysis.js +553 -0
- package/dist/scripts/analysis-framework/political-threat-analysis.js.map +1 -0
- package/dist/scripts/analysis-framework/significance-scorer.d.ts +62 -0
- package/dist/scripts/analysis-framework/significance-scorer.d.ts.map +1 -0
- package/dist/scripts/analysis-framework/significance-scorer.js +196 -0
- package/dist/scripts/analysis-framework/significance-scorer.js.map +1 -0
- package/dist/scripts/analysis-framework/types.d.ts +138 -0
- package/dist/scripts/analysis-framework/types.d.ts.map +1 -0
- package/dist/scripts/analysis-framework/types.js +12 -0
- package/dist/scripts/analysis-framework/types.js.map +1 -0
- package/dist/scripts/analysis-reader.d.ts +240 -0
- package/dist/scripts/analysis-reader.d.ts.map +1 -0
- package/dist/scripts/analysis-reader.js +495 -0
- package/dist/scripts/analysis-reader.js.map +1 -0
- package/dist/scripts/article-quality-enhancer.d.ts +148 -0
- package/dist/scripts/article-quality-enhancer.d.ts.map +1 -0
- package/dist/scripts/article-quality-enhancer.js +430 -0
- package/dist/scripts/article-quality-enhancer.js.map +1 -0
- package/dist/scripts/article-template/constants.d.ts +104 -0
- package/dist/scripts/article-template/constants.d.ts.map +1 -0
- package/dist/scripts/article-template/constants.js +225 -0
- package/dist/scripts/article-template/constants.js.map +1 -0
- package/dist/scripts/article-template/helpers.d.ts +83 -0
- package/dist/scripts/article-template/helpers.d.ts.map +1 -0
- package/dist/scripts/article-template/helpers.js +236 -0
- package/dist/scripts/article-template/helpers.js.map +1 -0
- package/dist/scripts/article-template/index.d.ts +39 -0
- package/dist/scripts/article-template/index.d.ts.map +1 -0
- package/dist/scripts/article-template/index.js +37 -0
- package/dist/scripts/article-template/index.js.map +1 -0
- package/dist/scripts/article-template/registry.d.ts +64 -0
- package/dist/scripts/article-template/registry.d.ts.map +1 -0
- package/dist/scripts/article-template/registry.js +405 -0
- package/dist/scripts/article-template/registry.js.map +1 -0
- package/dist/scripts/article-template/template.d.ts +18 -0
- package/dist/scripts/article-template/template.d.ts.map +1 -0
- package/dist/scripts/article-template/template.js +359 -0
- package/dist/scripts/article-template/template.js.map +1 -0
- package/dist/scripts/article-template/types.d.ts +90 -0
- package/dist/scripts/article-template/types.d.ts.map +1 -0
- package/dist/scripts/article-template/types.js +96 -0
- package/dist/scripts/article-template/types.js.map +1 -0
- package/dist/scripts/article-template.d.ts +18 -0
- package/dist/scripts/article-template.d.ts.map +1 -0
- package/dist/scripts/article-template.js +18 -0
- package/dist/scripts/article-template.js.map +1 -0
- package/dist/scripts/catalog-downloaded-data.d.ts +66 -0
- package/dist/scripts/catalog-downloaded-data.d.ts.map +1 -0
- package/dist/scripts/catalog-downloaded-data.js +239 -0
- package/dist/scripts/catalog-downloaded-data.js.map +1 -0
- package/dist/scripts/check-cia-schema-updates.d.ts +186 -0
- package/dist/scripts/check-cia-schema-updates.d.ts.map +1 -0
- package/dist/scripts/check-cia-schema-updates.js +363 -0
- package/dist/scripts/check-cia-schema-updates.js.map +1 -0
- package/dist/scripts/data-transformers/calendar.d.ts +16 -0
- package/dist/scripts/data-transformers/calendar.d.ts.map +1 -0
- package/dist/scripts/data-transformers/calendar.js +137 -0
- package/dist/scripts/data-transformers/calendar.js.map +1 -0
- package/dist/scripts/data-transformers/constants/committee-names.d.ts +15 -0
- package/dist/scripts/data-transformers/constants/committee-names.d.ts.map +1 -0
- package/dist/scripts/data-transformers/constants/committee-names.js +30 -0
- package/dist/scripts/data-transformers/constants/committee-names.js.map +1 -0
- package/dist/scripts/data-transformers/constants/content-labels-part1.d.ts +11 -0
- package/dist/scripts/data-transformers/constants/content-labels-part1.d.ts.map +1 -0
- package/dist/scripts/data-transformers/constants/content-labels-part1.js +900 -0
- package/dist/scripts/data-transformers/constants/content-labels-part1.js.map +1 -0
- package/dist/scripts/data-transformers/constants/content-labels-part2.d.ts +11 -0
- package/dist/scripts/data-transformers/constants/content-labels-part2.d.ts.map +1 -0
- package/dist/scripts/data-transformers/constants/content-labels-part2.js +900 -0
- package/dist/scripts/data-transformers/constants/content-labels-part2.js.map +1 -0
- package/dist/scripts/data-transformers/constants/content-labels.d.ts +13 -0
- package/dist/scripts/data-transformers/constants/content-labels.d.ts.map +1 -0
- package/dist/scripts/data-transformers/constants/content-labels.js +18 -0
- package/dist/scripts/data-transformers/constants/content-labels.js.map +1 -0
- package/dist/scripts/data-transformers/constants/index.d.ts +15 -0
- package/dist/scripts/data-transformers/constants/index.d.ts.map +1 -0
- package/dist/scripts/data-transformers/constants/index.js +15 -0
- package/dist/scripts/data-transformers/constants/index.js.map +1 -0
- package/dist/scripts/data-transformers/constants/locale-map.d.ts +13 -0
- package/dist/scripts/data-transformers/constants/locale-map.d.ts.map +1 -0
- package/dist/scripts/data-transformers/constants/locale-map.js +17 -0
- package/dist/scripts/data-transformers/constants/locale-map.js.map +1 -0
- package/dist/scripts/data-transformers/constants.d.ts +14 -0
- package/dist/scripts/data-transformers/constants.d.ts.map +1 -0
- package/dist/scripts/data-transformers/constants.js +14 -0
- package/dist/scripts/data-transformers/constants.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/ai-mindmap-analyzer.d.ts +64 -0
- package/dist/scripts/data-transformers/content-generators/ai-mindmap-analyzer.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/ai-mindmap-analyzer.js +805 -0
- package/dist/scripts/data-transformers/content-generators/ai-mindmap-analyzer.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/ai-swot-analyzer.d.ts +89 -0
- package/dist/scripts/data-transformers/content-generators/ai-swot-analyzer.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/ai-swot-analyzer.js +667 -0
- package/dist/scripts/data-transformers/content-generators/ai-swot-analyzer.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/cia-overview-section.d.ts +50 -0
- package/dist/scripts/data-transformers/content-generators/cia-overview-section.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/cia-overview-section.js +310 -0
- package/dist/scripts/data-transformers/content-generators/cia-overview-section.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/committee.d.ts +12 -0
- package/dist/scripts/data-transformers/content-generators/committee.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/committee.js +247 -0
- package/dist/scripts/data-transformers/content-generators/committee.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/dashboard-section.d.ts +124 -0
- package/dist/scripts/data-transformers/content-generators/dashboard-section.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/dashboard-section.js +564 -0
- package/dist/scripts/data-transformers/content-generators/dashboard-section.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/economic-dashboard-section.d.ts +82 -0
- package/dist/scripts/data-transformers/content-generators/economic-dashboard-section.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/economic-dashboard-section.js +321 -0
- package/dist/scripts/data-transformers/content-generators/economic-dashboard-section.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/generic.d.ts +12 -0
- package/dist/scripts/data-transformers/content-generators/generic.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/generic.js +295 -0
- package/dist/scripts/data-transformers/content-generators/generic.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/index.d.ts +56 -0
- package/dist/scripts/data-transformers/content-generators/index.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/index.js +45 -0
- package/dist/scripts/data-transformers/content-generators/index.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/interpellations.d.ts +12 -0
- package/dist/scripts/data-transformers/content-generators/interpellations.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/interpellations.js +124 -0
- package/dist/scripts/data-transformers/content-generators/interpellations.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/mindmap-section.d.ts +137 -0
- package/dist/scripts/data-transformers/content-generators/mindmap-section.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/mindmap-section.js +286 -0
- package/dist/scripts/data-transformers/content-generators/mindmap-section.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/month-ahead.d.ts +17 -0
- package/dist/scripts/data-transformers/content-generators/month-ahead.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/month-ahead.js +212 -0
- package/dist/scripts/data-transformers/content-generators/month-ahead.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/monthly-review.d.ts +17 -0
- package/dist/scripts/data-transformers/content-generators/monthly-review.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/monthly-review.js +173 -0
- package/dist/scripts/data-transformers/content-generators/monthly-review.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/motions.d.ts +12 -0
- package/dist/scripts/data-transformers/content-generators/motions.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/motions.js +158 -0
- package/dist/scripts/data-transformers/content-generators/motions.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/newsworthiness.d.ts +52 -0
- package/dist/scripts/data-transformers/content-generators/newsworthiness.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/newsworthiness.js +244 -0
- package/dist/scripts/data-transformers/content-generators/newsworthiness.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/propositions.d.ts +12 -0
- package/dist/scripts/data-transformers/content-generators/propositions.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/propositions.js +263 -0
- package/dist/scripts/data-transformers/content-generators/propositions.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/sankey-section.d.ts +92 -0
- package/dist/scripts/data-transformers/content-generators/sankey-section.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/sankey-section.js +257 -0
- package/dist/scripts/data-transformers/content-generators/sankey-section.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/shared.d.ts +81 -0
- package/dist/scripts/data-transformers/content-generators/shared.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/shared.js +913 -0
- package/dist/scripts/data-transformers/content-generators/shared.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/stakeholder-swot-section.d.ts +83 -0
- package/dist/scripts/data-transformers/content-generators/stakeholder-swot-section.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/stakeholder-swot-section.js +219 -0
- package/dist/scripts/data-transformers/content-generators/stakeholder-swot-section.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/swot-section.d.ts +50 -0
- package/dist/scripts/data-transformers/content-generators/swot-section.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/swot-section.js +177 -0
- package/dist/scripts/data-transformers/content-generators/swot-section.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators/week-ahead.d.ts +12 -0
- package/dist/scripts/data-transformers/content-generators/week-ahead.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators/week-ahead.js +332 -0
- package/dist/scripts/data-transformers/content-generators/week-ahead.js.map +1 -0
- package/dist/scripts/data-transformers/content-generators.d.ts +15 -0
- package/dist/scripts/data-transformers/content-generators.d.ts.map +1 -0
- package/dist/scripts/data-transformers/content-generators.js +14 -0
- package/dist/scripts/data-transformers/content-generators.js.map +1 -0
- package/dist/scripts/data-transformers/document-analysis.d.ts +58 -0
- package/dist/scripts/data-transformers/document-analysis.d.ts.map +1 -0
- package/dist/scripts/data-transformers/document-analysis.js +396 -0
- package/dist/scripts/data-transformers/document-analysis.js.map +1 -0
- package/dist/scripts/data-transformers/helpers.d.ts +144 -0
- package/dist/scripts/data-transformers/helpers.d.ts.map +1 -0
- package/dist/scripts/data-transformers/helpers.js +408 -0
- package/dist/scripts/data-transformers/helpers.js.map +1 -0
- package/dist/scripts/data-transformers/index.d.ts +45 -0
- package/dist/scripts/data-transformers/index.d.ts.map +1 -0
- package/dist/scripts/data-transformers/index.js +66 -0
- package/dist/scripts/data-transformers/index.js.map +1 -0
- package/dist/scripts/data-transformers/metadata.d.ts +42 -0
- package/dist/scripts/data-transformers/metadata.d.ts.map +1 -0
- package/dist/scripts/data-transformers/metadata.js +385 -0
- package/dist/scripts/data-transformers/metadata.js.map +1 -0
- package/dist/scripts/data-transformers/policy-analysis.d.ts +105 -0
- package/dist/scripts/data-transformers/policy-analysis.d.ts.map +1 -0
- package/dist/scripts/data-transformers/policy-analysis.js +686 -0
- package/dist/scripts/data-transformers/policy-analysis.js.map +1 -0
- package/dist/scripts/data-transformers/risk-analysis.d.ts +104 -0
- package/dist/scripts/data-transformers/risk-analysis.d.ts.map +1 -0
- package/dist/scripts/data-transformers/risk-analysis.js +279 -0
- package/dist/scripts/data-transformers/risk-analysis.js.map +1 -0
- package/dist/scripts/data-transformers/types.d.ts +260 -0
- package/dist/scripts/data-transformers/types.d.ts.map +1 -0
- package/dist/scripts/data-transformers/types.js +11 -0
- package/dist/scripts/data-transformers/types.js.map +1 -0
- package/dist/scripts/data-transformers.d.ts +23 -0
- package/dist/scripts/data-transformers.d.ts.map +1 -0
- package/dist/scripts/data-transformers.js +35 -0
- package/dist/scripts/data-transformers.js.map +1 -0
- package/dist/scripts/deep-inspection/index.d.ts +55 -0
- package/dist/scripts/deep-inspection/index.d.ts.map +1 -0
- package/dist/scripts/deep-inspection/index.js +66 -0
- package/dist/scripts/deep-inspection/index.js.map +1 -0
- package/dist/scripts/detect-swedish-leakage.d.ts +69 -0
- package/dist/scripts/detect-swedish-leakage.d.ts.map +1 -0
- package/dist/scripts/detect-swedish-leakage.js +417 -0
- package/dist/scripts/detect-swedish-leakage.js.map +1 -0
- package/dist/scripts/editorial-framework.d.ts +121 -0
- package/dist/scripts/editorial-framework.d.ts.map +1 -0
- package/dist/scripts/editorial-framework.js +364 -0
- package/dist/scripts/editorial-framework.js.map +1 -0
- package/dist/scripts/editorial-pillars.d.ts +43 -0
- package/dist/scripts/editorial-pillars.d.ts.map +1 -0
- package/dist/scripts/editorial-pillars.js +215 -0
- package/dist/scripts/editorial-pillars.js.map +1 -0
- package/dist/scripts/extract-news-metadata.d.ts +12 -0
- package/dist/scripts/extract-news-metadata.d.ts.map +1 -0
- package/dist/scripts/extract-news-metadata.js +107 -0
- package/dist/scripts/extract-news-metadata.js.map +1 -0
- package/dist/scripts/extract-vocabulary.d.ts +15 -0
- package/dist/scripts/extract-vocabulary.d.ts.map +1 -0
- package/dist/scripts/extract-vocabulary.js +255 -0
- package/dist/scripts/extract-vocabulary.js.map +1 -0
- package/dist/scripts/fix-article-navigation.d.ts +37 -0
- package/dist/scripts/fix-article-navigation.d.ts.map +1 -0
- package/dist/scripts/fix-article-navigation.js +198 -0
- package/dist/scripts/fix-article-navigation.js.map +1 -0
- package/dist/scripts/fix-keywords-localization.d.ts +18 -0
- package/dist/scripts/fix-keywords-localization.d.ts.map +1 -0
- package/dist/scripts/fix-keywords-localization.js +270 -0
- package/dist/scripts/fix-keywords-localization.js.map +1 -0
- package/dist/scripts/fix-old-articles-branding.d.ts +17 -0
- package/dist/scripts/fix-old-articles-branding.d.ts.map +1 -0
- package/dist/scripts/fix-old-articles-branding.js +229 -0
- package/dist/scripts/fix-old-articles-branding.js.map +1 -0
- package/dist/scripts/generate-news-backport.d.ts +16 -0
- package/dist/scripts/generate-news-backport.d.ts.map +1 -0
- package/dist/scripts/generate-news-backport.js +379 -0
- package/dist/scripts/generate-news-backport.js.map +1 -0
- package/dist/scripts/generate-news-enhanced/ai-analysis-pipeline.d.ts +124 -0
- package/dist/scripts/generate-news-enhanced/ai-analysis-pipeline.d.ts.map +1 -0
- package/dist/scripts/generate-news-enhanced/ai-analysis-pipeline.js +529 -0
- package/dist/scripts/generate-news-enhanced/ai-analysis-pipeline.js.map +1 -0
- package/dist/scripts/generate-news-enhanced/analysis-cache.d.ts +59 -0
- package/dist/scripts/generate-news-enhanced/analysis-cache.d.ts.map +1 -0
- package/dist/scripts/generate-news-enhanced/analysis-cache.js +116 -0
- package/dist/scripts/generate-news-enhanced/analysis-cache.js.map +1 -0
- package/dist/scripts/generate-news-enhanced/analysis-labels.d.ts +58 -0
- package/dist/scripts/generate-news-enhanced/analysis-labels.d.ts.map +1 -0
- package/dist/scripts/generate-news-enhanced/analysis-labels.js +144 -0
- package/dist/scripts/generate-news-enhanced/analysis-labels.js.map +1 -0
- package/dist/scripts/generate-news-enhanced/config.d.ts +57 -0
- package/dist/scripts/generate-news-enhanced/config.d.ts.map +1 -0
- package/dist/scripts/generate-news-enhanced/config.js +286 -0
- package/dist/scripts/generate-news-enhanced/config.js.map +1 -0
- package/dist/scripts/generate-news-enhanced/generators.d.ts +119 -0
- package/dist/scripts/generate-news-enhanced/generators.d.ts.map +1 -0
- package/dist/scripts/generate-news-enhanced/generators.js +2108 -0
- package/dist/scripts/generate-news-enhanced/generators.js.map +1 -0
- package/dist/scripts/generate-news-enhanced/helpers.d.ts +123 -0
- package/dist/scripts/generate-news-enhanced/helpers.d.ts.map +1 -0
- package/dist/scripts/generate-news-enhanced/helpers.js +438 -0
- package/dist/scripts/generate-news-enhanced/helpers.js.map +1 -0
- package/dist/scripts/generate-news-enhanced/index.d.ts +19 -0
- package/dist/scripts/generate-news-enhanced/index.d.ts.map +1 -0
- package/dist/scripts/generate-news-enhanced/index.js +221 -0
- package/dist/scripts/generate-news-enhanced/index.js.map +1 -0
- package/dist/scripts/generate-news-enhanced/swot-analyzer.d.ts +35 -0
- package/dist/scripts/generate-news-enhanced/swot-analyzer.d.ts.map +1 -0
- package/dist/scripts/generate-news-enhanced/swot-analyzer.js +1179 -0
- package/dist/scripts/generate-news-enhanced/swot-analyzer.js.map +1 -0
- package/dist/scripts/generate-news-enhanced/types.d.ts +34 -0
- package/dist/scripts/generate-news-enhanced/types.d.ts.map +1 -0
- package/dist/scripts/generate-news-enhanced/types.js +9 -0
- package/dist/scripts/generate-news-enhanced/types.js.map +1 -0
- package/dist/scripts/generate-news-enhanced.d.ts +25 -0
- package/dist/scripts/generate-news-enhanced.d.ts.map +1 -0
- package/dist/scripts/generate-news-enhanced.js +37 -0
- package/dist/scripts/generate-news-enhanced.js.map +1 -0
- package/dist/scripts/generate-news-indexes/constants.d.ts +20 -0
- package/dist/scripts/generate-news-indexes/constants.d.ts.map +1 -0
- package/dist/scripts/generate-news-indexes/constants.js +308 -0
- package/dist/scripts/generate-news-indexes/constants.js.map +1 -0
- package/dist/scripts/generate-news-indexes/helpers.d.ts +73 -0
- package/dist/scripts/generate-news-indexes/helpers.d.ts.map +1 -0
- package/dist/scripts/generate-news-indexes/helpers.js +352 -0
- package/dist/scripts/generate-news-indexes/helpers.js.map +1 -0
- package/dist/scripts/generate-news-indexes/index.d.ts +20 -0
- package/dist/scripts/generate-news-indexes/index.d.ts.map +1 -0
- package/dist/scripts/generate-news-indexes/index.js +75 -0
- package/dist/scripts/generate-news-indexes/index.js.map +1 -0
- package/dist/scripts/generate-news-indexes/template.d.ts +25 -0
- package/dist/scripts/generate-news-indexes/template.d.ts.map +1 -0
- package/dist/scripts/generate-news-indexes/template.js +644 -0
- package/dist/scripts/generate-news-indexes/template.js.map +1 -0
- package/dist/scripts/generate-news-indexes/types.d.ts +96 -0
- package/dist/scripts/generate-news-indexes/types.d.ts.map +1 -0
- package/dist/scripts/generate-news-indexes/types.js +9 -0
- package/dist/scripts/generate-news-indexes/types.js.map +1 -0
- package/dist/scripts/generate-news-indexes.d.ts +20 -0
- package/dist/scripts/generate-news-indexes.d.ts.map +1 -0
- package/dist/scripts/generate-news-indexes.js +19 -0
- package/dist/scripts/generate-news-indexes.js.map +1 -0
- package/dist/scripts/generate-rss.d.ts +48 -0
- package/dist/scripts/generate-rss.d.ts.map +1 -0
- package/dist/scripts/generate-rss.js +299 -0
- package/dist/scripts/generate-rss.js.map +1 -0
- package/dist/scripts/generate-sitemap-html.d.ts +79 -0
- package/dist/scripts/generate-sitemap-html.d.ts.map +1 -0
- package/dist/scripts/generate-sitemap-html.js +878 -0
- package/dist/scripts/generate-sitemap-html.js.map +1 -0
- package/dist/scripts/generate-sitemap.d.ts +23 -0
- package/dist/scripts/generate-sitemap.d.ts.map +1 -0
- package/dist/scripts/generate-sitemap.js +476 -0
- package/dist/scripts/generate-sitemap.js.map +1 -0
- package/dist/scripts/generate-types-from-cia-schemas.d.ts +176 -0
- package/dist/scripts/generate-types-from-cia-schemas.d.ts.map +1 -0
- package/dist/scripts/generate-types-from-cia-schemas.js +318 -0
- package/dist/scripts/generate-types-from-cia-schemas.js.map +1 -0
- package/dist/scripts/government-role-validator.d.ts +65 -0
- package/dist/scripts/government-role-validator.d.ts.map +1 -0
- package/dist/scripts/government-role-validator.js +217 -0
- package/dist/scripts/government-role-validator.js.map +1 -0
- package/dist/scripts/html-utils.d.ts +17 -0
- package/dist/scripts/html-utils.d.ts.map +1 -0
- package/dist/scripts/html-utils.js +29 -0
- package/dist/scripts/html-utils.js.map +1 -0
- package/dist/scripts/load-cia-stats.d.ts +89 -0
- package/dist/scripts/load-cia-stats.d.ts.map +1 -0
- package/dist/scripts/load-cia-stats.js +400 -0
- package/dist/scripts/load-cia-stats.js.map +1 -0
- package/dist/scripts/mcp-client/client.d.ts +73 -0
- package/dist/scripts/mcp-client/client.d.ts.map +1 -0
- package/dist/scripts/mcp-client/client.js +526 -0
- package/dist/scripts/mcp-client/client.js.map +1 -0
- package/dist/scripts/mcp-client/document-types.d.ts +23 -0
- package/dist/scripts/mcp-client/document-types.d.ts.map +1 -0
- package/dist/scripts/mcp-client/document-types.js +62 -0
- package/dist/scripts/mcp-client/document-types.js.map +1 -0
- package/dist/scripts/mcp-client/index.d.ts +34 -0
- package/dist/scripts/mcp-client/index.d.ts.map +1 -0
- package/dist/scripts/mcp-client/index.js +67 -0
- package/dist/scripts/mcp-client/index.js.map +1 -0
- package/dist/scripts/mcp-client/transport.d.ts +32 -0
- package/dist/scripts/mcp-client/transport.d.ts.map +1 -0
- package/dist/scripts/mcp-client/transport.js +102 -0
- package/dist/scripts/mcp-client/transport.js.map +1 -0
- package/dist/scripts/mcp-client.d.ts +18 -0
- package/dist/scripts/mcp-client.d.ts.map +1 -0
- package/dist/scripts/mcp-client.js +18 -0
- package/dist/scripts/mcp-client.js.map +1 -0
- package/dist/scripts/mcp-query-cli.d.ts +25 -0
- package/dist/scripts/mcp-query-cli.d.ts.map +1 -0
- package/dist/scripts/mcp-query-cli.js +66 -0
- package/dist/scripts/mcp-query-cli.js.map +1 -0
- package/dist/scripts/news-types/breaking-news.d.ts +178 -0
- package/dist/scripts/news-types/breaking-news.d.ts.map +1 -0
- package/dist/scripts/news-types/breaking-news.js +428 -0
- package/dist/scripts/news-types/breaking-news.js.map +1 -0
- package/dist/scripts/news-types/committee-reports.d.ts +212 -0
- package/dist/scripts/news-types/committee-reports.d.ts.map +1 -0
- package/dist/scripts/news-types/committee-reports.js +404 -0
- package/dist/scripts/news-types/committee-reports.js.map +1 -0
- package/dist/scripts/news-types/month-ahead.d.ts +71 -0
- package/dist/scripts/news-types/month-ahead.d.ts.map +1 -0
- package/dist/scripts/news-types/month-ahead.js +392 -0
- package/dist/scripts/news-types/month-ahead.js.map +1 -0
- package/dist/scripts/news-types/monthly-review.d.ts +61 -0
- package/dist/scripts/news-types/monthly-review.d.ts.map +1 -0
- package/dist/scripts/news-types/monthly-review.js +417 -0
- package/dist/scripts/news-types/monthly-review.js.map +1 -0
- package/dist/scripts/news-types/motions.d.ts +214 -0
- package/dist/scripts/news-types/motions.d.ts.map +1 -0
- package/dist/scripts/news-types/motions.js +447 -0
- package/dist/scripts/news-types/motions.js.map +1 -0
- package/dist/scripts/news-types/propositions.d.ts +204 -0
- package/dist/scripts/news-types/propositions.d.ts.map +1 -0
- package/dist/scripts/news-types/propositions.js +401 -0
- package/dist/scripts/news-types/propositions.js.map +1 -0
- package/dist/scripts/news-types/week-ahead.d.ts +231 -0
- package/dist/scripts/news-types/week-ahead.d.ts.map +1 -0
- package/dist/scripts/news-types/week-ahead.js +441 -0
- package/dist/scripts/news-types/week-ahead.js.map +1 -0
- package/dist/scripts/news-types/weekly-review/analysis.d.ts +47 -0
- package/dist/scripts/news-types/weekly-review/analysis.d.ts.map +1 -0
- package/dist/scripts/news-types/weekly-review/analysis.js +276 -0
- package/dist/scripts/news-types/weekly-review/analysis.js.map +1 -0
- package/dist/scripts/news-types/weekly-review/data-loader.d.ts +51 -0
- package/dist/scripts/news-types/weekly-review/data-loader.d.ts.map +1 -0
- package/dist/scripts/news-types/weekly-review/data-loader.js +298 -0
- package/dist/scripts/news-types/weekly-review/data-loader.js.map +1 -0
- package/dist/scripts/news-types/weekly-review/generator.d.ts +18 -0
- package/dist/scripts/news-types/weekly-review/generator.d.ts.map +1 -0
- package/dist/scripts/news-types/weekly-review/generator.js +284 -0
- package/dist/scripts/news-types/weekly-review/generator.js.map +1 -0
- package/dist/scripts/news-types/weekly-review/index.d.ts +20 -0
- package/dist/scripts/news-types/weekly-review/index.d.ts.map +1 -0
- package/dist/scripts/news-types/weekly-review/index.js +23 -0
- package/dist/scripts/news-types/weekly-review/index.js.map +1 -0
- package/dist/scripts/news-types/weekly-review/types.d.ts +72 -0
- package/dist/scripts/news-types/weekly-review/types.d.ts.map +1 -0
- package/dist/scripts/news-types/weekly-review/types.js +20 -0
- package/dist/scripts/news-types/weekly-review/types.js.map +1 -0
- package/dist/scripts/news-types/weekly-review/validation.d.ts +10 -0
- package/dist/scripts/news-types/weekly-review/validation.d.ts.map +1 -0
- package/dist/scripts/news-types/weekly-review/validation.js +95 -0
- package/dist/scripts/news-types/weekly-review/validation.js.map +1 -0
- package/dist/scripts/news-types/weekly-review.d.ts +15 -0
- package/dist/scripts/news-types/weekly-review.d.ts.map +1 -0
- package/dist/scripts/news-types/weekly-review.js +14 -0
- package/dist/scripts/news-types/weekly-review.js.map +1 -0
- package/dist/scripts/party-variants.d.ts +23 -0
- package/dist/scripts/party-variants.d.ts.map +1 -0
- package/dist/scripts/party-variants.js +50 -0
- package/dist/scripts/party-variants.js.map +1 -0
- package/dist/scripts/pipeline/index.d.ts +19 -0
- package/dist/scripts/pipeline/index.d.ts.map +1 -0
- package/dist/scripts/pipeline/index.js +17 -0
- package/dist/scripts/pipeline/index.js.map +1 -0
- package/dist/scripts/pipeline/orchestrator.d.ts +56 -0
- package/dist/scripts/pipeline/orchestrator.d.ts.map +1 -0
- package/dist/scripts/pipeline/orchestrator.js +147 -0
- package/dist/scripts/pipeline/orchestrator.js.map +1 -0
- package/dist/scripts/pipeline/types.d.ts +117 -0
- package/dist/scripts/pipeline/types.d.ts.map +1 -0
- package/dist/scripts/pipeline/types.js +13 -0
- package/dist/scripts/pipeline/types.js.map +1 -0
- package/dist/scripts/pipeline/validation.d.ts +66 -0
- package/dist/scripts/pipeline/validation.d.ts.map +1 -0
- package/dist/scripts/pipeline/validation.js +129 -0
- package/dist/scripts/pipeline/validation.js.map +1 -0
- package/dist/scripts/populate-analysis-data.d.ts +41 -0
- package/dist/scripts/populate-analysis-data.d.ts.map +1 -0
- package/dist/scripts/populate-analysis-data.js +255 -0
- package/dist/scripts/populate-analysis-data.js.map +1 -0
- package/dist/scripts/pre-article-analysis/data-downloader.d.ts +80 -0
- package/dist/scripts/pre-article-analysis/data-downloader.d.ts.map +1 -0
- package/dist/scripts/pre-article-analysis/data-downloader.js +230 -0
- package/dist/scripts/pre-article-analysis/data-downloader.js.map +1 -0
- package/dist/scripts/pre-article-analysis/data-persistence.d.ts +141 -0
- package/dist/scripts/pre-article-analysis/data-persistence.d.ts.map +1 -0
- package/dist/scripts/pre-article-analysis/data-persistence.js +345 -0
- package/dist/scripts/pre-article-analysis/data-persistence.js.map +1 -0
- package/dist/scripts/pre-article-analysis/markdown-serializer.d.ts +95 -0
- package/dist/scripts/pre-article-analysis/markdown-serializer.d.ts.map +1 -0
- package/dist/scripts/pre-article-analysis/markdown-serializer.js +648 -0
- package/dist/scripts/pre-article-analysis/markdown-serializer.js.map +1 -0
- package/dist/scripts/pre-article-analysis/pdf-converter.d.ts +58 -0
- package/dist/scripts/pre-article-analysis/pdf-converter.d.ts.map +1 -0
- package/dist/scripts/pre-article-analysis/pdf-converter.js +142 -0
- package/dist/scripts/pre-article-analysis/pdf-converter.js.map +1 -0
- package/dist/scripts/pre-article-analysis.d.ts +41 -0
- package/dist/scripts/pre-article-analysis.d.ts.map +1 -0
- package/dist/scripts/pre-article-analysis.js +578 -0
- package/dist/scripts/pre-article-analysis.js.map +1 -0
- package/dist/scripts/scb-client.d.ts +104 -0
- package/dist/scripts/scb-client.d.ts.map +1 -0
- package/dist/scripts/scb-client.js +286 -0
- package/dist/scripts/scb-client.js.map +1 -0
- package/dist/scripts/scb-context.d.ts +88 -0
- package/dist/scripts/scb-context.d.ts.map +1 -0
- package/dist/scripts/scb-context.js +307 -0
- package/dist/scripts/scb-context.js.map +1 -0
- package/dist/scripts/shared/version.d.ts +9 -0
- package/dist/scripts/shared/version.d.ts.map +1 -0
- package/dist/scripts/shared/version.js +28 -0
- package/dist/scripts/shared/version.js.map +1 -0
- package/dist/scripts/statistical-claims-detector.d.ts +119 -0
- package/dist/scripts/statistical-claims-detector.d.ts.map +1 -0
- package/dist/scripts/statistical-claims-detector.js +391 -0
- package/dist/scripts/statistical-claims-detector.js.map +1 -0
- package/dist/scripts/sync-cia-schemas.d.ts +52 -0
- package/dist/scripts/sync-cia-schemas.d.ts.map +1 -0
- package/dist/scripts/sync-cia-schemas.js +195 -0
- package/dist/scripts/sync-cia-schemas.js.map +1 -0
- package/dist/scripts/translation-dictionary.d.ts +45 -0
- package/dist/scripts/translation-dictionary.d.ts.map +1 -0
- package/dist/scripts/translation-dictionary.js +3642 -0
- package/dist/scripts/translation-dictionary.js.map +1 -0
- package/dist/scripts/types/article.d.ts +362 -0
- package/dist/scripts/types/article.d.ts.map +1 -0
- package/dist/scripts/types/article.js +6 -0
- package/dist/scripts/types/article.js.map +1 -0
- package/dist/scripts/types/content.d.ts +167 -0
- package/dist/scripts/types/content.d.ts.map +1 -0
- package/dist/scripts/types/content.js +6 -0
- package/dist/scripts/types/content.js.map +1 -0
- package/dist/scripts/types/editorial.d.ts +17 -0
- package/dist/scripts/types/editorial.d.ts.map +1 -0
- package/dist/scripts/types/editorial.js +6 -0
- package/dist/scripts/types/editorial.js.map +1 -0
- package/dist/scripts/types/language.d.ts +7 -0
- package/dist/scripts/types/language.d.ts.map +1 -0
- package/dist/scripts/types/language.js +6 -0
- package/dist/scripts/types/language.js.map +1 -0
- package/dist/scripts/types/mcp.d.ts +117 -0
- package/dist/scripts/types/mcp.d.ts.map +1 -0
- package/dist/scripts/types/mcp.js +6 -0
- package/dist/scripts/types/mcp.js.map +1 -0
- package/dist/scripts/types/party.d.ts +9 -0
- package/dist/scripts/types/party.d.ts.map +1 -0
- package/dist/scripts/types/party.js +6 -0
- package/dist/scripts/types/party.js.map +1 -0
- package/dist/scripts/types/validation.d.ts +136 -0
- package/dist/scripts/types/validation.d.ts.map +1 -0
- package/dist/scripts/types/validation.js +6 -0
- package/dist/scripts/types/validation.js.map +1 -0
- package/dist/scripts/types/workflow.d.ts +78 -0
- package/dist/scripts/types/workflow.d.ts.map +1 -0
- package/dist/scripts/types/workflow.js +6 -0
- package/dist/scripts/types/workflow.js.map +1 -0
- package/dist/scripts/update-stats-from-cia.d.ts +44 -0
- package/dist/scripts/update-stats-from-cia.d.ts.map +1 -0
- package/dist/scripts/update-stats-from-cia.js +310 -0
- package/dist/scripts/update-stats-from-cia.js.map +1 -0
- package/dist/scripts/validate-against-cia-schemas.d.ts +126 -0
- package/dist/scripts/validate-against-cia-schemas.d.ts.map +1 -0
- package/dist/scripts/validate-against-cia-schemas.js +299 -0
- package/dist/scripts/validate-against-cia-schemas.js.map +1 -0
- package/dist/scripts/validate-cross-references.d.ts +49 -0
- package/dist/scripts/validate-cross-references.d.ts.map +1 -0
- package/dist/scripts/validate-cross-references.js +183 -0
- package/dist/scripts/validate-cross-references.js.map +1 -0
- package/dist/scripts/validate-file-ownership.d.ts +68 -0
- package/dist/scripts/validate-file-ownership.d.ts.map +1 -0
- package/dist/scripts/validate-file-ownership.js +135 -0
- package/dist/scripts/validate-file-ownership.js.map +1 -0
- package/dist/scripts/validate-news-translations.d.ts +27 -0
- package/dist/scripts/validate-news-translations.d.ts.map +1 -0
- package/dist/scripts/validate-news-translations.js +258 -0
- package/dist/scripts/validate-news-translations.js.map +1 -0
- package/dist/scripts/validate-translations.d.ts +162 -0
- package/dist/scripts/validate-translations.d.ts.map +1 -0
- package/dist/scripts/validate-translations.js +378 -0
- package/dist/scripts/validate-translations.js.map +1 -0
- package/dist/scripts/workflow-state-coordinator.d.ts +354 -0
- package/dist/scripts/workflow-state-coordinator.d.ts.map +1 -0
- package/dist/scripts/workflow-state-coordinator.js +876 -0
- package/dist/scripts/workflow-state-coordinator.js.map +1 -0
- package/dist/scripts/world-bank-client.d.ts +122 -0
- package/dist/scripts/world-bank-client.d.ts.map +1 -0
- package/dist/scripts/world-bank-client.js +192 -0
- package/dist/scripts/world-bank-client.js.map +1 -0
- package/dist/scripts/world-bank-context.d.ts +88 -0
- package/dist/scripts/world-bank-context.d.ts.map +1 -0
- package/dist/scripts/world-bank-context.js +331 -0
- package/dist/scripts/world-bank-context.js.map +1 -0
- package/package.json +31 -6
- package/dist/lib/chart-factory.d.ts.map +0 -1
- package/dist/lib/chart-factory.js.map +0 -1
- package/dist/lib/data-loader.d.ts.map +0 -1
- package/dist/lib/data-loader.js.map +0 -1
- package/dist/lib/dom-utils.d.ts.map +0 -1
- package/dist/lib/dom-utils.js.map +0 -1
- package/dist/lib/error-boundary.d.ts.map +0 -1
- package/dist/lib/error-boundary.js.map +0 -1
- package/dist/lib/fallback-ui.d.ts.map +0 -1
- package/dist/lib/fallback-ui.js.map +0 -1
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/logger.d.ts.map +0 -1
- package/dist/lib/logger.js.map +0 -1
- package/dist/lib/theme.d.ts.map +0 -1
- package/dist/lib/theme.js.map +0 -1
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/types.js.map +0 -1
- /package/dist/lib/{chart-factory.d.ts β shared/chart-factory.d.ts} +0 -0
- /package/dist/lib/{chart-factory.js β shared/chart-factory.js} +0 -0
- /package/dist/lib/{data-loader.d.ts β shared/data-loader.d.ts} +0 -0
- /package/dist/lib/{data-loader.js β shared/data-loader.js} +0 -0
- /package/dist/lib/{dom-utils.d.ts β shared/dom-utils.d.ts} +0 -0
- /package/dist/lib/{dom-utils.js β shared/dom-utils.js} +0 -0
- /package/dist/lib/{error-boundary.d.ts β shared/error-boundary.d.ts} +0 -0
- /package/dist/lib/{error-boundary.js β shared/error-boundary.js} +0 -0
- /package/dist/lib/{fallback-ui.d.ts β shared/fallback-ui.d.ts} +0 -0
- /package/dist/lib/{fallback-ui.js β shared/fallback-ui.js} +0 -0
- /package/dist/lib/{index.d.ts β shared/index.d.ts} +0 -0
- /package/dist/lib/{index.js β shared/index.js} +0 -0
- /package/dist/lib/{logger.d.ts β shared/logger.d.ts} +0 -0
- /package/dist/lib/{logger.js β shared/logger.js} +0 -0
- /package/dist/lib/{theme.d.ts β shared/theme.d.ts} +0 -0
- /package/dist/lib/{theme.js β shared/theme.js} +0 -0
- /package/dist/lib/{types.d.ts β shared/types.d.ts} +0 -0
- /package/dist/lib/{types.js β shared/types.js} +0 -0
|
@@ -0,0 +1,648 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module pre-article-analysis/markdown-serializer
|
|
3
|
+
* @description Serializes analysis framework results as structured markdown
|
|
4
|
+
* files for persistence in `analysis/daily/YYYY-MM-DD/`.
|
|
5
|
+
*
|
|
6
|
+
* Each output file follows the standard analysis template:
|
|
7
|
+
* ```markdown
|
|
8
|
+
* # [Analysis Type] β YYYY-MM-DD
|
|
9
|
+
* **Generated**: YYYY-MM-DD HH:MM UTC
|
|
10
|
+
* **Data Sources**: [list]
|
|
11
|
+
* **Documents Analyzed**: N
|
|
12
|
+
* **Confidence**: HIGH/MEDIUM/LOW
|
|
13
|
+
* ## Summary / ## Detailed Analysis / ## Key Findings / ## Implications
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @author Hack23 AB
|
|
17
|
+
* @license Apache-2.0
|
|
18
|
+
*/
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
// Helpers
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
/**
|
|
23
|
+
* Map a numeric confidence score (0β100) to a categorical label.
|
|
24
|
+
* - β₯70: HIGH β strong evidence, full-text content available for most documents
|
|
25
|
+
* - 40β69: MEDIUM β moderate evidence, mix of full-text and metadata-only
|
|
26
|
+
* - <40: LOW β weak evidence, metadata-only documents or small batch
|
|
27
|
+
*/
|
|
28
|
+
function confidenceLabel(score) {
|
|
29
|
+
if (score >= 70)
|
|
30
|
+
return 'HIGH';
|
|
31
|
+
if (score >= 40)
|
|
32
|
+
return 'MEDIUM';
|
|
33
|
+
return 'LOW';
|
|
34
|
+
}
|
|
35
|
+
/** Maximum number of documents shown in the detailed analysis section */
|
|
36
|
+
const MAX_DETAILED_RESULTS = 20;
|
|
37
|
+
function significanceLabel(score) {
|
|
38
|
+
if (score >= 8)
|
|
39
|
+
return 'π΄ Critical';
|
|
40
|
+
if (score >= 6)
|
|
41
|
+
return 'π High';
|
|
42
|
+
if (score >= 4)
|
|
43
|
+
return 'π‘ Medium';
|
|
44
|
+
return 'π’ Low';
|
|
45
|
+
}
|
|
46
|
+
function escapeMarkdownTableCell(value) {
|
|
47
|
+
return value
|
|
48
|
+
.replace(/\\/g, '\\\\')
|
|
49
|
+
.replace(/\r?\n/g, ' ')
|
|
50
|
+
.replace(/\|/g, '\\|')
|
|
51
|
+
.trim();
|
|
52
|
+
}
|
|
53
|
+
/** Escape user-sourced text for safe inline Markdown rendering. */
|
|
54
|
+
function escapeMarkdownInline(value) {
|
|
55
|
+
return value
|
|
56
|
+
.replace(/\r?\n/g, ' ')
|
|
57
|
+
.replace(/[#*_`[\]<>|\\~]/g, '\\$&')
|
|
58
|
+
.trim();
|
|
59
|
+
}
|
|
60
|
+
function frontmatter(ctx, title, docCount, confidenceScore) {
|
|
61
|
+
return [
|
|
62
|
+
`# ${title} β ${ctx.date}`,
|
|
63
|
+
'',
|
|
64
|
+
`**Generated**: ${ctx.generatedAt}`,
|
|
65
|
+
`**Data Sources**: ${ctx.dataSources.join(', ')}`,
|
|
66
|
+
`**Documents Analyzed**: ${docCount}`,
|
|
67
|
+
`**Confidence**: ${confidenceLabel(confidenceScore)}`,
|
|
68
|
+
'',
|
|
69
|
+
].join('\n');
|
|
70
|
+
}
|
|
71
|
+
// ---------------------------------------------------------------------------
|
|
72
|
+
// Data-download manifest
|
|
73
|
+
// ---------------------------------------------------------------------------
|
|
74
|
+
export function serializeDataManifest(ctx, docCounts, dateFilteredTotal) {
|
|
75
|
+
const totalDocs = Object.values(docCounts).reduce((a, b) => a + b, 0);
|
|
76
|
+
const analyzedCount = dateFilteredTotal ?? totalDocs;
|
|
77
|
+
const lines = [
|
|
78
|
+
frontmatter(ctx, 'Data Download Manifest', analyzedCount, 100),
|
|
79
|
+
'## Summary',
|
|
80
|
+
'',
|
|
81
|
+
`Downloaded **${totalDocs}** documents (session-wide) from ${ctx.dataSources.length} MCP data sources.`,
|
|
82
|
+
'',
|
|
83
|
+
];
|
|
84
|
+
if (dateFilteredTotal !== undefined) {
|
|
85
|
+
lines.push(`After date filtering to **${ctx.date}**: **${dateFilteredTotal}** documents selected for analysis.`, '');
|
|
86
|
+
}
|
|
87
|
+
lines.push('## Document Counts by Type', '');
|
|
88
|
+
for (const [type, count] of Object.entries(docCounts)) {
|
|
89
|
+
lines.push(`- **${type}**: ${count} documents`);
|
|
90
|
+
}
|
|
91
|
+
lines.push('', '## Data Quality Notes', '', 'All documents sourced from official riksdag-regering-mcp API.');
|
|
92
|
+
return lines.join('\n');
|
|
93
|
+
}
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
// Classification results
|
|
96
|
+
// ---------------------------------------------------------------------------
|
|
97
|
+
export function serializeClassificationResults(ctx, results) {
|
|
98
|
+
const avgConfidence = results.length > 0
|
|
99
|
+
? results.reduce((sum, r) => sum + r.confidenceScore, 0) / results.length
|
|
100
|
+
: 0;
|
|
101
|
+
const lines = [
|
|
102
|
+
frontmatter(ctx, 'Political Classification Results', results.length, avgConfidence),
|
|
103
|
+
'## Summary',
|
|
104
|
+
'',
|
|
105
|
+
`Classified **${results.length}** parliamentary documents by sensitivity, impact, urgency, and domain.`,
|
|
106
|
+
'',
|
|
107
|
+
'## Detailed Analysis',
|
|
108
|
+
'',
|
|
109
|
+
];
|
|
110
|
+
for (const result of results.slice(0, MAX_DETAILED_RESULTS)) {
|
|
111
|
+
const title = result.document.titel || result.document.title || result.document.dok_id || 'Unknown';
|
|
112
|
+
const dokId = result.document.dok_id || 'N/A';
|
|
113
|
+
const domains = result.perspectives
|
|
114
|
+
.flatMap(p => p.relatedPolicies)
|
|
115
|
+
.filter((v, i, arr) => arr.indexOf(v) === i)
|
|
116
|
+
.slice(0, 3);
|
|
117
|
+
lines.push(`### ${title}`);
|
|
118
|
+
lines.push(`- **dok_id**: ${dokId}`);
|
|
119
|
+
lines.push(`- **Type**: ${result.document.doktyp || 'unknown'}`);
|
|
120
|
+
lines.push(`- **Significance**: ${significanceLabel(result.overallSignificance)} (${result.overallSignificance}/10)`);
|
|
121
|
+
lines.push(`- **Domains**: ${domains.join(', ') || 'General'}`);
|
|
122
|
+
lines.push(`- **Confidence**: ${confidenceLabel(result.confidenceScore)} (${Math.round(result.confidenceScore)}%)`);
|
|
123
|
+
lines.push('');
|
|
124
|
+
}
|
|
125
|
+
lines.push('## Key Findings', '');
|
|
126
|
+
const topDocs = [...results].sort((a, b) => b.overallSignificance - a.overallSignificance).slice(0, 5);
|
|
127
|
+
topDocs.forEach((r, i) => {
|
|
128
|
+
const title = r.document.titel || r.document.title || r.document.dok_id || 'Unknown';
|
|
129
|
+
lines.push(`${i + 1}. **${title}** (dok_id: ${r.document.dok_id || 'N/A'}) β Significance: ${r.overallSignificance}/10`);
|
|
130
|
+
});
|
|
131
|
+
lines.push('', '## Implications', '');
|
|
132
|
+
lines.push('Classification drives article prioritisation. High-significance documents should receive deep-inspection treatment.');
|
|
133
|
+
lines.push('', '## Data Quality Notes', '');
|
|
134
|
+
lines.push(`Classification confidence: ${confidenceLabel(avgConfidence)}. Higher confidence when full-text content is available.`);
|
|
135
|
+
return lines.join('\n');
|
|
136
|
+
}
|
|
137
|
+
// ---------------------------------------------------------------------------
|
|
138
|
+
// Risk assessment
|
|
139
|
+
// ---------------------------------------------------------------------------
|
|
140
|
+
export function serializeRiskAssessment(ctx, docCount, risk) {
|
|
141
|
+
const confidenceScore = risk.riskLevel === 'LOW' ? 80 : risk.riskLevel === 'MEDIUM' ? 60 : 40;
|
|
142
|
+
const lines = [
|
|
143
|
+
frontmatter(ctx, 'Political Risk Assessment', docCount, confidenceScore),
|
|
144
|
+
'## Summary',
|
|
145
|
+
'',
|
|
146
|
+
risk.riskSummary,
|
|
147
|
+
'',
|
|
148
|
+
'## Detailed Analysis',
|
|
149
|
+
'',
|
|
150
|
+
`**Coalition Risk Score**: ${risk.coalitionRiskScore}/100`,
|
|
151
|
+
`**Risk Level**: ${risk.riskLevel}`,
|
|
152
|
+
'',
|
|
153
|
+
'### Anomaly Flags',
|
|
154
|
+
'',
|
|
155
|
+
];
|
|
156
|
+
if (risk.anomalyFlags.length > 0) {
|
|
157
|
+
for (const flag of risk.anomalyFlags) {
|
|
158
|
+
lines.push(`- **[${flag.severity}]** ${flag.type}: ${flag.description}`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
lines.push('No anomalous patterns detected in current data.');
|
|
163
|
+
}
|
|
164
|
+
lines.push('', '## Key Findings', '');
|
|
165
|
+
lines.push(`1. Coalition stability at risk score **${risk.coalitionRiskScore}** (${risk.riskLevel})`);
|
|
166
|
+
if (risk.anomalyFlags.length > 0) {
|
|
167
|
+
lines.push(`2. **${risk.anomalyFlags.length}** anomaly flag(s) detected requiring monitoring`);
|
|
168
|
+
}
|
|
169
|
+
lines.push('', '## Implications', '');
|
|
170
|
+
for (const impl of risk.implications) {
|
|
171
|
+
lines.push(`- ${impl}`);
|
|
172
|
+
}
|
|
173
|
+
lines.push('', '## Data Quality Notes', '');
|
|
174
|
+
lines.push('Risk assessment derived from CIA coalition metrics and document significance scores.');
|
|
175
|
+
return lines.join('\n');
|
|
176
|
+
}
|
|
177
|
+
// ---------------------------------------------------------------------------
|
|
178
|
+
// SWOT analysis
|
|
179
|
+
// ---------------------------------------------------------------------------
|
|
180
|
+
export function serializeSwotAnalysis(ctx, docCount, swots) {
|
|
181
|
+
const lines = [
|
|
182
|
+
frontmatter(ctx, 'Political SWOT Analysis', docCount, 70),
|
|
183
|
+
'## Summary',
|
|
184
|
+
'',
|
|
185
|
+
`Generated SWOT analysis for **${swots.length}** political actor(s) based on ${docCount} documents.`,
|
|
186
|
+
'',
|
|
187
|
+
'## Detailed Analysis',
|
|
188
|
+
'',
|
|
189
|
+
];
|
|
190
|
+
for (const swot of swots) {
|
|
191
|
+
lines.push(`### ${swot.forStakeholder}`, '');
|
|
192
|
+
lines.push('**Strengths**');
|
|
193
|
+
swot.strengths.forEach(s => lines.push(`- ${s}`));
|
|
194
|
+
lines.push('');
|
|
195
|
+
lines.push('**Weaknesses**');
|
|
196
|
+
swot.weaknesses.forEach(s => lines.push(`- ${s}`));
|
|
197
|
+
lines.push('');
|
|
198
|
+
lines.push('**Opportunities**');
|
|
199
|
+
swot.opportunities.forEach(s => lines.push(`- ${s}`));
|
|
200
|
+
lines.push('');
|
|
201
|
+
lines.push('**Threats**');
|
|
202
|
+
swot.threats.forEach(s => lines.push(`- ${s}`));
|
|
203
|
+
lines.push('');
|
|
204
|
+
}
|
|
205
|
+
lines.push('## Key Findings', '');
|
|
206
|
+
lines.push('1. SWOT entries derived from all six perspective analyses across downloaded documents.');
|
|
207
|
+
lines.push('', '## Implications', '');
|
|
208
|
+
lines.push('SWOT insights should inform stakeholder framing in generated articles.');
|
|
209
|
+
lines.push('', '## Data Quality Notes', '');
|
|
210
|
+
lines.push('SWOT confidence is proportional to document richness (full-text vs metadata-only).');
|
|
211
|
+
return lines.join('\n');
|
|
212
|
+
}
|
|
213
|
+
// ---------------------------------------------------------------------------
|
|
214
|
+
// Threat analysis
|
|
215
|
+
// ---------------------------------------------------------------------------
|
|
216
|
+
export function serializeThreatAnalysis(ctx, results) {
|
|
217
|
+
const threatEntries = results.flatMap(r => r.perspectives.flatMap(p => p.swotContribution
|
|
218
|
+
.filter(c => c.quadrant === 'threat')
|
|
219
|
+
.map(c => ({ title: r.document.titel || r.document.title || r.document.dok_id || 'Unknown', text: c.text, forStakeholder: c.forStakeholder }))));
|
|
220
|
+
const avgConfidence = results.length > 0
|
|
221
|
+
? results.reduce((sum, r) => sum + r.confidenceScore, 0) / results.length
|
|
222
|
+
: 0;
|
|
223
|
+
const lines = [
|
|
224
|
+
frontmatter(ctx, 'Political Threat Analysis', results.length, avgConfidence),
|
|
225
|
+
'## Summary',
|
|
226
|
+
'',
|
|
227
|
+
`Identified **${threatEntries.length}** threat indicators across ${results.length} documents.`,
|
|
228
|
+
'',
|
|
229
|
+
'## Detailed Analysis',
|
|
230
|
+
'',
|
|
231
|
+
];
|
|
232
|
+
const grouped = new Map();
|
|
233
|
+
for (const entry of threatEntries) {
|
|
234
|
+
const arr = grouped.get(entry.forStakeholder) ?? [];
|
|
235
|
+
arr.push(`[${entry.title}] ${entry.text}`);
|
|
236
|
+
grouped.set(entry.forStakeholder, arr);
|
|
237
|
+
}
|
|
238
|
+
for (const [stakeholder, threats] of grouped) {
|
|
239
|
+
lines.push(`### Threats for: ${stakeholder}`, '');
|
|
240
|
+
threats.slice(0, 5).forEach(t => lines.push(`- ${t}`));
|
|
241
|
+
lines.push('');
|
|
242
|
+
}
|
|
243
|
+
lines.push('## Key Findings', '');
|
|
244
|
+
lines.push(`1. **${threatEntries.length}** threat indicators identified targeting ${grouped.size} stakeholder group(s)`);
|
|
245
|
+
lines.push('', '## Implications', '');
|
|
246
|
+
lines.push('Threat analysis should inform risk-focused article framing and editorial prioritisation.');
|
|
247
|
+
lines.push('', '## Data Quality Notes', '');
|
|
248
|
+
lines.push(`Analysis confidence: ${confidenceLabel(avgConfidence)}.`);
|
|
249
|
+
return lines.join('\n');
|
|
250
|
+
}
|
|
251
|
+
// ---------------------------------------------------------------------------
|
|
252
|
+
// Stakeholder perspectives
|
|
253
|
+
// ---------------------------------------------------------------------------
|
|
254
|
+
export function serializeStakeholderPerspectives(ctx, results) {
|
|
255
|
+
const avgConfidence = results.length > 0
|
|
256
|
+
? results.reduce((sum, r) => sum + r.confidenceScore, 0) / results.length
|
|
257
|
+
: 0;
|
|
258
|
+
// Aggregate perspectives by lens across all documents
|
|
259
|
+
const lensMap = new Map();
|
|
260
|
+
for (const result of results) {
|
|
261
|
+
for (const p of result.perspectives) {
|
|
262
|
+
const arr = lensMap.get(p.lens) ?? [];
|
|
263
|
+
arr.push(p);
|
|
264
|
+
lensMap.set(p.lens, arr);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
const lines = [
|
|
268
|
+
frontmatter(ctx, 'Stakeholder Perspective Analysis', results.length, avgConfidence),
|
|
269
|
+
'## Summary',
|
|
270
|
+
'',
|
|
271
|
+
`Applied **6 analysis lenses** to **${results.length}** documents.`,
|
|
272
|
+
'',
|
|
273
|
+
'## Detailed Analysis',
|
|
274
|
+
'',
|
|
275
|
+
];
|
|
276
|
+
const lensEmoji = {
|
|
277
|
+
government: 'ποΈ',
|
|
278
|
+
opposition: 'βοΈ',
|
|
279
|
+
citizen: 'π₯',
|
|
280
|
+
economic: 'π°',
|
|
281
|
+
international: 'π',
|
|
282
|
+
media: 'π°',
|
|
283
|
+
};
|
|
284
|
+
for (const [lens, perspectives] of lensMap) {
|
|
285
|
+
const emoji = lensEmoji[lens] || 'π';
|
|
286
|
+
const high = perspectives.filter(p => p.impact === 'high').length;
|
|
287
|
+
const avgConf = perspectives.reduce((s, p) => s + p.confidence, 0) / perspectives.length;
|
|
288
|
+
const topActors = [...new Set(perspectives.flatMap(p => p.keyActors))].slice(0, 5);
|
|
289
|
+
lines.push(`### ${emoji} ${lens.charAt(0).toUpperCase() + lens.slice(1)} Perspective`, '');
|
|
290
|
+
lines.push(`- **Documents with High Impact**: ${high}/${perspectives.length}`);
|
|
291
|
+
lines.push(`- **Avg Confidence**: ${Math.round(avgConf)}%`);
|
|
292
|
+
lines.push(`- **Key Actors**: ${topActors.join(', ') || 'N/A'}`);
|
|
293
|
+
lines.push('');
|
|
294
|
+
// Show top 3 summaries
|
|
295
|
+
const topThree = [...perspectives].sort((a, b) => b.confidence - a.confidence).slice(0, 3);
|
|
296
|
+
for (const p of topThree) {
|
|
297
|
+
if (p.summary) {
|
|
298
|
+
lines.push(`> ${p.summary}`);
|
|
299
|
+
lines.push('');
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
lines.push('## Key Findings', '');
|
|
304
|
+
lines.push('1. All six stakeholder perspectives applied consistently across the document batch.');
|
|
305
|
+
lines.push('2. Cross-perspective conflicts indicate politically contentious documents.');
|
|
306
|
+
lines.push('', '## Implications', '');
|
|
307
|
+
lines.push('Perspective analysis feeds directly into article stakeholder framing and balance.');
|
|
308
|
+
lines.push('', '## Data Quality Notes', '');
|
|
309
|
+
lines.push(`Aggregate confidence: ${confidenceLabel(avgConfidence)}.`);
|
|
310
|
+
return lines.join('\n');
|
|
311
|
+
}
|
|
312
|
+
// ---------------------------------------------------------------------------
|
|
313
|
+
// Significance scoring
|
|
314
|
+
// ---------------------------------------------------------------------------
|
|
315
|
+
export function serializeSignificanceScoring(ctx, entries) {
|
|
316
|
+
const lines = [
|
|
317
|
+
frontmatter(ctx, 'Document Significance Scoring', entries.length, 80),
|
|
318
|
+
'## Summary',
|
|
319
|
+
'',
|
|
320
|
+
`Scored **${entries.length}** documents for political significance (0β10 scale).`,
|
|
321
|
+
'',
|
|
322
|
+
'## Detailed Analysis',
|
|
323
|
+
'',
|
|
324
|
+
'| Score | Level | Type | dok_id | Title |',
|
|
325
|
+
'|-------|-------|------|--------|-------|',
|
|
326
|
+
];
|
|
327
|
+
const sorted = [...entries].sort((a, b) => b.score - a.score);
|
|
328
|
+
for (const entry of sorted.slice(0, 30)) {
|
|
329
|
+
const level = escapeMarkdownTableCell(significanceLabel(entry.score).replace(/π΄|π |π‘|π’/g, '').trim());
|
|
330
|
+
const titleValue = entry.title.length > 50 ? entry.title.slice(0, 47) + '...' : entry.title;
|
|
331
|
+
const doctype = escapeMarkdownTableCell(entry.doctype);
|
|
332
|
+
const dokId = escapeMarkdownTableCell(entry.dok_id);
|
|
333
|
+
const title = escapeMarkdownTableCell(titleValue);
|
|
334
|
+
lines.push(`| ${entry.score}/10 | ${level} | ${doctype} | ${dokId} | ${title} |`);
|
|
335
|
+
}
|
|
336
|
+
lines.push('', '## Key Findings', '');
|
|
337
|
+
const critical = sorted.filter(e => e.score >= 8);
|
|
338
|
+
lines.push(`1. **${critical.length}** document(s) rated Critical (score β₯ 8)`);
|
|
339
|
+
const high = sorted.filter(e => e.score >= 6 && e.score < 8);
|
|
340
|
+
lines.push(`2. **${high.length}** document(s) rated High (score 6β7)`);
|
|
341
|
+
lines.push('', '## Implications', '');
|
|
342
|
+
lines.push('High-significance documents should be prioritised for deep-inspection article generation.');
|
|
343
|
+
lines.push('', '## Data Quality Notes', '');
|
|
344
|
+
lines.push('Significance scores use document type, committee tier, domain breadth, coalition context, and content richness.');
|
|
345
|
+
return lines.join('\n');
|
|
346
|
+
}
|
|
347
|
+
// ---------------------------------------------------------------------------
|
|
348
|
+
// Cross-reference map
|
|
349
|
+
// ---------------------------------------------------------------------------
|
|
350
|
+
export function serializeCrossReferenceMap(ctx, summary) {
|
|
351
|
+
const lines = [
|
|
352
|
+
frontmatter(ctx, 'Cross-Reference Map', summary.docCount, 75),
|
|
353
|
+
'## Summary',
|
|
354
|
+
'',
|
|
355
|
+
`Detected **${summary.totalLinks}** cross-document relationships.`,
|
|
356
|
+
'',
|
|
357
|
+
'## Detailed Analysis',
|
|
358
|
+
'',
|
|
359
|
+
];
|
|
360
|
+
if (summary.links.length === 0) {
|
|
361
|
+
lines.push('No cross-document relationships detected in current batch.');
|
|
362
|
+
}
|
|
363
|
+
else {
|
|
364
|
+
const byType = new Map();
|
|
365
|
+
for (const link of summary.links) {
|
|
366
|
+
const arr = byType.get(link.type) ?? [];
|
|
367
|
+
arr.push(link);
|
|
368
|
+
byType.set(link.type, arr);
|
|
369
|
+
}
|
|
370
|
+
for (const [type, links] of byType) {
|
|
371
|
+
lines.push(`### ${type}`, '');
|
|
372
|
+
for (const link of links.slice(0, 10)) {
|
|
373
|
+
lines.push(`- **${link.sourceId}** β **${link.targetId}** (confidence: ${link.confidence}%)`);
|
|
374
|
+
lines.push(` _${link.reason}_`);
|
|
375
|
+
}
|
|
376
|
+
lines.push('');
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
lines.push('## Key Findings', '');
|
|
380
|
+
lines.push(`1. **${summary.totalLinks}** inter-document relationships mapped`);
|
|
381
|
+
lines.push('', '## Implications', '');
|
|
382
|
+
lines.push('Cross-references enrich article narratives by linking related legislative developments.');
|
|
383
|
+
lines.push('', '## Data Quality Notes', '');
|
|
384
|
+
lines.push('Cross-reference confidence is driven by shared policy domains and textual similarity.');
|
|
385
|
+
return lines.join('\n');
|
|
386
|
+
}
|
|
387
|
+
// ---------------------------------------------------------------------------
|
|
388
|
+
// Synthesis summary
|
|
389
|
+
// ---------------------------------------------------------------------------
|
|
390
|
+
export function serializeSynthesisSummary(ctx, synthesis) {
|
|
391
|
+
const confScore = synthesis.overallConfidence === 'HIGH' ? 80 : synthesis.overallConfidence === 'MEDIUM' ? 55 : 30;
|
|
392
|
+
const lines = [
|
|
393
|
+
frontmatter(ctx, 'Analysis Synthesis Summary', synthesis.totalDocs, confScore),
|
|
394
|
+
'## Summary',
|
|
395
|
+
'',
|
|
396
|
+
synthesis.executiveSummary,
|
|
397
|
+
'',
|
|
398
|
+
'## Key Findings',
|
|
399
|
+
'',
|
|
400
|
+
];
|
|
401
|
+
synthesis.keyFindings.forEach((f, i) => lines.push(`${i + 1}. ${f}`));
|
|
402
|
+
lines.push('', '## Top Documents by Significance', '', '| Score | Type | dok_id | Title |', '|-------|------|--------|-------|');
|
|
403
|
+
for (const doc of synthesis.topDocuments.slice(0, 10)) {
|
|
404
|
+
const titleValue = doc.title.length > 50 ? doc.title.slice(0, 47) + '...' : doc.title;
|
|
405
|
+
const doctype = escapeMarkdownTableCell(doc.doctype);
|
|
406
|
+
const dokId = escapeMarkdownTableCell(doc.dok_id);
|
|
407
|
+
const title = escapeMarkdownTableCell(titleValue);
|
|
408
|
+
lines.push(`| ${doc.score}/10 | ${doctype} | ${dokId} | ${title} |`);
|
|
409
|
+
}
|
|
410
|
+
lines.push('', '## Implications', '');
|
|
411
|
+
lines.push(`Overall political risk level: **${synthesis.aggregateRiskLevel}**`);
|
|
412
|
+
lines.push('Articles should reference this synthesis to ensure analytical depth and consistency.');
|
|
413
|
+
lines.push('', '## Data Quality Notes', '');
|
|
414
|
+
lines.push(`Overall confidence: **${synthesis.overallConfidence}**. All analysis results are available in sibling files.`);
|
|
415
|
+
return lines.join('\n');
|
|
416
|
+
}
|
|
417
|
+
// ---------------------------------------------------------------------------
|
|
418
|
+
// Per-document analysis (full AI-quality SWOT + intelligence per document)
|
|
419
|
+
// ---------------------------------------------------------------------------
|
|
420
|
+
/**
|
|
421
|
+
* Serialize a per-document analysis markdown file.
|
|
422
|
+
*
|
|
423
|
+
* Each document gets its own analysis file with:
|
|
424
|
+
* - Full document metadata
|
|
425
|
+
* - Detailed SWOT analysis
|
|
426
|
+
* - Multi-lens stakeholder perspective analysis
|
|
427
|
+
* - Significance scoring factors
|
|
428
|
+
* - Cross-document references (where available)
|
|
429
|
+
* - Key insights
|
|
430
|
+
* - Data quality / methodology notes
|
|
431
|
+
*
|
|
432
|
+
* Note: Explicit risk indicator extraction and implications sections are
|
|
433
|
+
* produced at the synthesis level rather than by this per-document serializer.
|
|
434
|
+
*/
|
|
435
|
+
export function serializeDocumentAnalysis(ctx, result) {
|
|
436
|
+
const doc = result.document;
|
|
437
|
+
const title = escapeMarkdownInline(doc.titel || doc.title || doc.dok_id || 'Unknown Document');
|
|
438
|
+
const dokId = escapeMarkdownInline(doc.dok_id || 'N/A');
|
|
439
|
+
const docType = escapeMarkdownInline(doc.doktyp || 'unknown');
|
|
440
|
+
const committee = escapeMarkdownInline(doc.organ || doc.committee || 'N/A');
|
|
441
|
+
const date = escapeMarkdownInline(doc.datum || ctx.date);
|
|
442
|
+
const author = escapeMarkdownInline(doc.intressent_namn || doc.author || 'N/A');
|
|
443
|
+
const party = escapeMarkdownInline(doc.parti || 'N/A');
|
|
444
|
+
const rm = escapeMarkdownInline(doc.rm || 'N/A');
|
|
445
|
+
const lines = [
|
|
446
|
+
`# Document Analysis: ${title}`,
|
|
447
|
+
'',
|
|
448
|
+
`**Generated**: ${ctx.generatedAt}`,
|
|
449
|
+
`**dok_id**: ${dokId}`,
|
|
450
|
+
`**Document Type**: ${docType}`,
|
|
451
|
+
`**Committee**: ${committee}`,
|
|
452
|
+
`**Date**: ${date}`,
|
|
453
|
+
`**Author**: ${author}`,
|
|
454
|
+
`**Party**: ${party}`,
|
|
455
|
+
`**RiksmΓΆte**: ${rm}`,
|
|
456
|
+
`**Significance**: ${significanceLabel(result.overallSignificance)} (${result.overallSignificance}/10)`,
|
|
457
|
+
`**Confidence**: ${confidenceLabel(result.confidenceScore)} (${Math.round(result.confidenceScore)}%)`,
|
|
458
|
+
'',
|
|
459
|
+
'---',
|
|
460
|
+
'',
|
|
461
|
+
];
|
|
462
|
+
// ββ Executive Summary ββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
463
|
+
lines.push('## Executive Summary', '');
|
|
464
|
+
if (result.keyInsights.length > 0) {
|
|
465
|
+
for (const insight of result.keyInsights) {
|
|
466
|
+
lines.push(`- ${escapeMarkdownInline(insight)}`);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
lines.push('No key insights extracted β document may be metadata-only.');
|
|
471
|
+
}
|
|
472
|
+
lines.push('');
|
|
473
|
+
// ββ Document Content Summary βββββββββββββββββββββββββββββββββββββββββββ
|
|
474
|
+
lines.push('## Document Content', '');
|
|
475
|
+
if (doc.summary) {
|
|
476
|
+
lines.push(`**Summary**: ${escapeMarkdownInline(doc.summary)}`);
|
|
477
|
+
lines.push('');
|
|
478
|
+
}
|
|
479
|
+
if (doc.rubrik) {
|
|
480
|
+
lines.push(`**Rubrik**: ${escapeMarkdownInline(doc.rubrik)}`);
|
|
481
|
+
lines.push('');
|
|
482
|
+
}
|
|
483
|
+
if (doc.undertitel) {
|
|
484
|
+
lines.push(`**Undertitel**: ${escapeMarkdownInline(doc.undertitel)}`);
|
|
485
|
+
lines.push('');
|
|
486
|
+
}
|
|
487
|
+
if (doc.notis) {
|
|
488
|
+
lines.push(`**Notis**: ${escapeMarkdownInline(doc.notis)}`);
|
|
489
|
+
lines.push('');
|
|
490
|
+
}
|
|
491
|
+
if (doc.mottagare) {
|
|
492
|
+
lines.push(`**Mottagare (Recipient)**: ${escapeMarkdownInline(doc.mottagare)}`);
|
|
493
|
+
lines.push('');
|
|
494
|
+
}
|
|
495
|
+
const hasFullText = !!(doc.fullText || doc.fullContent);
|
|
496
|
+
lines.push(`**Full-text available**: ${hasFullText ? 'Yes β
' : 'No β metadata-only β οΈ'}`);
|
|
497
|
+
lines.push('');
|
|
498
|
+
// ββ SWOT Analysis ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
499
|
+
lines.push('## SWOT Analysis', '');
|
|
500
|
+
const swotMap = new Map();
|
|
501
|
+
for (const p of result.perspectives) {
|
|
502
|
+
for (const c of p.swotContribution) {
|
|
503
|
+
if (!swotMap.has(c.forStakeholder)) {
|
|
504
|
+
swotMap.set(c.forStakeholder, { strengths: [], weaknesses: [], opportunities: [], threats: [] });
|
|
505
|
+
}
|
|
506
|
+
const entry = swotMap.get(c.forStakeholder);
|
|
507
|
+
switch (c.quadrant) {
|
|
508
|
+
case 'strength':
|
|
509
|
+
entry.strengths.push(c.text);
|
|
510
|
+
break;
|
|
511
|
+
case 'weakness':
|
|
512
|
+
entry.weaknesses.push(c.text);
|
|
513
|
+
break;
|
|
514
|
+
case 'opportunity':
|
|
515
|
+
entry.opportunities.push(c.text);
|
|
516
|
+
break;
|
|
517
|
+
case 'threat':
|
|
518
|
+
entry.threats.push(c.text);
|
|
519
|
+
break;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
if (swotMap.size === 0) {
|
|
524
|
+
lines.push('_No SWOT contributions extracted. Document may lack sufficient content for structured analysis._');
|
|
525
|
+
lines.push('');
|
|
526
|
+
}
|
|
527
|
+
for (const [stakeholder, swot] of swotMap) {
|
|
528
|
+
lines.push(`### SWOT: ${escapeMarkdownInline(stakeholder)}`, '');
|
|
529
|
+
lines.push('#### Strengths πͺ');
|
|
530
|
+
if (swot.strengths.length > 0) {
|
|
531
|
+
[...new Set(swot.strengths)].forEach(s => lines.push(`- ${escapeMarkdownInline(s)}`));
|
|
532
|
+
}
|
|
533
|
+
else {
|
|
534
|
+
lines.push('- _No strengths identified_');
|
|
535
|
+
}
|
|
536
|
+
lines.push('');
|
|
537
|
+
lines.push('#### Weaknesses β οΈ');
|
|
538
|
+
if (swot.weaknesses.length > 0) {
|
|
539
|
+
[...new Set(swot.weaknesses)].forEach(s => lines.push(`- ${escapeMarkdownInline(s)}`));
|
|
540
|
+
}
|
|
541
|
+
else {
|
|
542
|
+
lines.push('- _No weaknesses identified_');
|
|
543
|
+
}
|
|
544
|
+
lines.push('');
|
|
545
|
+
lines.push('#### Opportunities π');
|
|
546
|
+
if (swot.opportunities.length > 0) {
|
|
547
|
+
[...new Set(swot.opportunities)].forEach(s => lines.push(`- ${escapeMarkdownInline(s)}`));
|
|
548
|
+
}
|
|
549
|
+
else {
|
|
550
|
+
lines.push('- _No opportunities identified_');
|
|
551
|
+
}
|
|
552
|
+
lines.push('');
|
|
553
|
+
lines.push('#### Threats π΄');
|
|
554
|
+
if (swot.threats.length > 0) {
|
|
555
|
+
[...new Set(swot.threats)].forEach(s => lines.push(`- ${escapeMarkdownInline(s)}`));
|
|
556
|
+
}
|
|
557
|
+
else {
|
|
558
|
+
lines.push('- _No threats identified_');
|
|
559
|
+
}
|
|
560
|
+
lines.push('');
|
|
561
|
+
}
|
|
562
|
+
// ββ Stakeholder Perspective Analysis βββββββββββββββββββββββββββββββββββ
|
|
563
|
+
lines.push('## Stakeholder Perspective Analysis', '');
|
|
564
|
+
const lensEmoji = {
|
|
565
|
+
government: 'ποΈ',
|
|
566
|
+
opposition: 'βοΈ',
|
|
567
|
+
citizen: 'π₯',
|
|
568
|
+
economic: 'π°',
|
|
569
|
+
international: 'π',
|
|
570
|
+
media: 'π°',
|
|
571
|
+
};
|
|
572
|
+
for (const p of result.perspectives) {
|
|
573
|
+
const emoji = lensEmoji[p.lens] || 'π';
|
|
574
|
+
lines.push(`### ${emoji} ${p.lens.charAt(0).toUpperCase() + p.lens.slice(1)} Perspective`, '');
|
|
575
|
+
lines.push(`- **Impact**: ${escapeMarkdownInline(p.impact)}`);
|
|
576
|
+
lines.push(`- **Sentiment**: ${escapeMarkdownInline(p.sentiment)}`);
|
|
577
|
+
lines.push(`- **Confidence**: ${Math.round(p.confidence)}%`);
|
|
578
|
+
lines.push(`- **Key Actors**: ${p.keyActors.map(a => escapeMarkdownInline(a)).join(', ') || 'N/A'}`);
|
|
579
|
+
lines.push(`- **Related Policies**: ${p.relatedPolicies.map(r => escapeMarkdownInline(r)).join(', ') || 'N/A'}`);
|
|
580
|
+
lines.push('');
|
|
581
|
+
if (p.summary) {
|
|
582
|
+
lines.push(`> ${escapeMarkdownInline(p.summary)}`);
|
|
583
|
+
lines.push('');
|
|
584
|
+
}
|
|
585
|
+
// Dashboard metrics
|
|
586
|
+
if (p.dashboardMetrics.length > 0) {
|
|
587
|
+
lines.push('**Dashboard Metrics**:');
|
|
588
|
+
for (const m of p.dashboardMetrics) {
|
|
589
|
+
lines.push(`- ${escapeMarkdownInline(m.metricName)}: ${m.value}${m.unit ? ' ' + escapeMarkdownInline(m.unit) : ''}`);
|
|
590
|
+
}
|
|
591
|
+
lines.push('');
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
// ββ Cross-Document References ββββββββββββββββββββββββββββββββββββββββββ
|
|
595
|
+
lines.push('## Cross-Document References', '');
|
|
596
|
+
if (result.crossDocumentLinks.length > 0) {
|
|
597
|
+
for (const link of result.crossDocumentLinks) {
|
|
598
|
+
lines.push(`- **${escapeMarkdownInline(link.type)}**: ${escapeMarkdownInline(link.sourceId)} β ${escapeMarkdownInline(link.targetId)} (confidence: ${link.confidence}%)`);
|
|
599
|
+
lines.push(` _${escapeMarkdownInline(link.reason)}_`);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
else {
|
|
603
|
+
lines.push('_No cross-document references detected for this document._');
|
|
604
|
+
}
|
|
605
|
+
lines.push('');
|
|
606
|
+
// ββ Significance Assessment ββββββββββββββββββββββββββββββββββββββββββββ
|
|
607
|
+
lines.push('## Significance Assessment', '');
|
|
608
|
+
lines.push(`**Overall Score**: ${result.overallSignificance}/10 β ${significanceLabel(result.overallSignificance)}`);
|
|
609
|
+
lines.push('');
|
|
610
|
+
lines.push('**Scoring Factors**:');
|
|
611
|
+
lines.push(`- Document type tier (${docType})`);
|
|
612
|
+
lines.push(`- Committee tier (${committee})`);
|
|
613
|
+
const domains = [...new Set(result.perspectives.flatMap(p => p.relatedPolicies))].slice(0, 5);
|
|
614
|
+
lines.push(`- Policy domain breadth: ${domains.length} domain(s) β ${domains.join(', ') || 'N/A'}`);
|
|
615
|
+
lines.push(`- Content richness: ${hasFullText ? 'Full-text available' : 'Metadata-only'}`);
|
|
616
|
+
lines.push(`- Perspective impact: ${result.perspectives.filter(p => p.impact === 'high').length}/6 high-impact perspectives`);
|
|
617
|
+
lines.push('');
|
|
618
|
+
// ββ Key Insights βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
619
|
+
lines.push('## Key Insights', '');
|
|
620
|
+
if (result.keyInsights.length > 0) {
|
|
621
|
+
result.keyInsights.forEach((insight, i) => lines.push(`${i + 1}. ${escapeMarkdownInline(insight)}`));
|
|
622
|
+
}
|
|
623
|
+
else {
|
|
624
|
+
lines.push('_No key insights extracted._');
|
|
625
|
+
}
|
|
626
|
+
lines.push('');
|
|
627
|
+
// ββ Data Quality Notes βββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
628
|
+
lines.push('## Data Quality Notes', '');
|
|
629
|
+
lines.push(`- **Analysis confidence**: ${confidenceLabel(result.confidenceScore)} (${Math.round(result.confidenceScore)}%)`);
|
|
630
|
+
lines.push(`- **Full-text content**: ${hasFullText ? 'Available β high confidence' : 'Unavailable β analysis based on metadata only'}`);
|
|
631
|
+
lines.push(`- **Data sources**: ${ctx.dataSources.map(escapeMarkdownInline).join(', ')}`);
|
|
632
|
+
lines.push(`- **Analysis method**: 6-lens stakeholder analysis with SWOT extraction`);
|
|
633
|
+
lines.push('');
|
|
634
|
+
return lines.join('\n');
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Sanitize a document identifier for use as a safe filename.
|
|
638
|
+
* Replaces non-alphanumeric characters with hyphens and lowercases.
|
|
639
|
+
*/
|
|
640
|
+
export function sanitizeDokId(dokId) {
|
|
641
|
+
return dokId
|
|
642
|
+
.toLowerCase()
|
|
643
|
+
.replace(/[^a-z0-9Γ₯Àâ-]/g, '-')
|
|
644
|
+
.replace(/-+/g, '-')
|
|
645
|
+
.replace(/^-|-$/g, '')
|
|
646
|
+
.slice(0, 100);
|
|
647
|
+
}
|
|
648
|
+
//# sourceMappingURL=markdown-serializer.js.map
|