@euconform/core 1.0.0 → 1.2.0
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +13 -0
- package/README.md +109 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/inference/ollama-client.d.ts +1 -0
- package/dist/inference/ollama-client.d.ts.map +1 -1
- package/dist/inference/ollama-client.js +15 -5
- package/dist/legal-checks/annex-iv-report.d.ts +3 -0
- package/dist/legal-checks/annex-iv-report.d.ts.map +1 -1
- package/dist/legal-checks/annex-iv-report.js +1 -0
- package/dist/legal-checks/deadline-timeline.d.ts +57 -0
- package/dist/legal-checks/deadline-timeline.d.ts.map +1 -0
- package/dist/legal-checks/deadline-timeline.js +265 -0
- package/dist/legal-checks/gap-analysis.d.ts +48 -0
- package/dist/legal-checks/gap-analysis.d.ts.map +1 -0
- package/dist/legal-checks/gap-analysis.js +397 -0
- package/dist/legal-checks/gpai-classifier.d.ts +49 -0
- package/dist/legal-checks/gpai-classifier.d.ts.map +1 -0
- package/dist/legal-checks/gpai-classifier.js +197 -0
- package/dist/legal-checks/index.d.ts +6 -0
- package/dist/legal-checks/index.d.ts.map +1 -1
- package/dist/legal-checks/index.js +3 -0
- package/package.json +20 -1
- package/src/index.ts +25 -0
- package/src/inference/ollama-client.ts +21 -5
- package/src/legal-checks/annex-iv-report.ts +4 -0
- package/src/legal-checks/deadline-timeline.ts +313 -0
- package/src/legal-checks/gap-analysis.ts +454 -0
- package/src/legal-checks/gpai-classifier.ts +281 -0
- package/src/legal-checks/index.ts +33 -0
- package/tests/gpai-classifier.test.ts +125 -0
- package/tests/gpai-timeline.test.ts +55 -0
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @euconform/core
|
|
2
|
+
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 50566c7: Add GPAI compliance module (Art. 53-55) with dedicated quiz flow, classifier, and results checklist for Foundation Model providers. Add compliance gap analysis with prioritized action plans for both Annex III and GPAI paths. Fix open-source unsure flag,
|
|
8
|
+
|
|
9
|
+
## 1.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Add README files for npm package pages with installation instructions, usage examples, and license information.
|
package/README.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# @euconform/core
|
|
2
|
+
|
|
3
|
+
Core engine for EU AI Act compliance, risk classification, and fairness metrics.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@euconform/core)
|
|
6
|
+
[](https://github.com/Hiepler/EuConform/blob/main/LICENSE)
|
|
7
|
+
[](https://github.com/Hiepler/EuConform/blob/main/LICENSE-EUPL)
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @euconform/core
|
|
13
|
+
# or
|
|
14
|
+
pnpm add @euconform/core
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
- 🎯 **Risk Classification** – Implements EU AI Act Article 5 (prohibited), Article 6 + Annex III (high-risk)
|
|
20
|
+
- 📊 **Bias Detection** – [CrowS-Pairs](https://huggingface.co/datasets/crows_pairs) methodology ([CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)) with log-probability analysis
|
|
21
|
+
- 📄 **Report Generation** – Annex IV-compliant technical documentation
|
|
22
|
+
- 🔒 **Privacy-First** – All processing happens client-side
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
### Risk Classification
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { RiskEngine, type RiskClassification } from "@euconform/core";
|
|
30
|
+
|
|
31
|
+
const engine = new RiskEngine();
|
|
32
|
+
|
|
33
|
+
const result: RiskClassification = engine.classify({
|
|
34
|
+
useCase: "hiring-automation",
|
|
35
|
+
dataTypes: ["biometric", "personal"],
|
|
36
|
+
autonomyLevel: "high",
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
console.log(result.riskLevel); // "high-risk" | "limited-risk" | "minimal-risk" | "prohibited"
|
|
40
|
+
console.log(result.articles); // ["Article 6", "Annex III.4"]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Bias Testing (CrowS-Pairs)
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
import { calculateCrowsPairsBias } from "@euconform/core";
|
|
47
|
+
|
|
48
|
+
const result = await calculateCrowsPairsBias({
|
|
49
|
+
dataset: crowsPairsData,
|
|
50
|
+
engine: inferenceEngine,
|
|
51
|
+
onProgress: (progress) => console.log(`${progress}% complete`),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
console.log(result.overallBias); // 0.0 - 1.0 (0 = no bias)
|
|
55
|
+
console.log(result.categoryResults); // Bias breakdown by category
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Annex IV Report Generation
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
import { generateAnnexIVReport } from "@euconform/core";
|
|
62
|
+
|
|
63
|
+
const report = generateAnnexIVReport({
|
|
64
|
+
systemName: "My AI System",
|
|
65
|
+
provider: "My Company",
|
|
66
|
+
riskClassification: riskResult,
|
|
67
|
+
biasResults: biasResult,
|
|
68
|
+
version: "1.0.0",
|
|
69
|
+
});
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## API Reference
|
|
73
|
+
|
|
74
|
+
### Risk Engine
|
|
75
|
+
|
|
76
|
+
| Method | Description |
|
|
77
|
+
|--------|-------------|
|
|
78
|
+
| `classify(input)` | Classify AI system risk level |
|
|
79
|
+
| `getApplicableArticles(input)` | Get relevant EU AI Act articles |
|
|
80
|
+
| `generateCompliance(input)` | Generate compliance checklist |
|
|
81
|
+
|
|
82
|
+
### Fairness Metrics
|
|
83
|
+
|
|
84
|
+
| Function | Description |
|
|
85
|
+
|----------|-------------|
|
|
86
|
+
| `calculateCrowsPairsBias()` | CrowS-Pairs bias calculation |
|
|
87
|
+
| `calculateLogProbBias()` | Log-probability bias measurement |
|
|
88
|
+
| `validateCrowsPairsDataset()` | Validate dataset format |
|
|
89
|
+
|
|
90
|
+
### Report Generation
|
|
91
|
+
|
|
92
|
+
| Function | Description |
|
|
93
|
+
|----------|-------------|
|
|
94
|
+
| `generateAnnexIVReport()` | Generate Annex IV documentation |
|
|
95
|
+
|
|
96
|
+
## Legal Disclaimer
|
|
97
|
+
|
|
98
|
+
> **⚠️ Important:** This package provides technical guidance only. It does not constitute legal advice and does not replace legally binding conformity assessments. Always consult qualified legal professionals for compliance decisions.
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
Dual-licensed under [MIT](https://github.com/Hiepler/EuConform/blob/main/LICENSE) and [EUPL-1.2](https://github.com/Hiepler/EuConform/blob/main/LICENSE-EUPL).
|
|
103
|
+
|
|
104
|
+
## Links
|
|
105
|
+
|
|
106
|
+
- [GitHub Repository](https://github.com/Hiepler/EuConform)
|
|
107
|
+
- [Full Documentation](https://github.com/Hiepler/EuConform#readme)
|
|
108
|
+
- [Report Issues](https://github.com/Hiepler/EuConform/issues)
|
|
109
|
+
|
package/dist/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Risk classification engine and fairness metrics for AI systems
|
|
5
5
|
*/
|
|
6
6
|
export type { AnnexIVReport, BiasTestResult, CrowsPairsEntry, FairnessMetric, HighRiskCategory, PredictionData, QuizAnswer, QuizOption, QuizQuestion, RiskAssessment, RiskFlag, RiskLevel, BiasCalculationMethod, BiasTestConfig, CrowsPairsBiasResult, ModelCapabilityCache, } from "./types";
|
|
7
|
-
export { ANNEX_III_QUESTIONS, PROHIBITED_AI_SCREENING_QUESTIONS, classifyAnnexIIIRisk, getAnnexIIIQuestions, getProhibitedAIScreeningQuestions, AI_ACT_SOURCES, METRIC_SOURCES, createPerspectiveApiToxicityScorer, createTransformersRegardScorer, createTransformersToxicityScorer, runDataGovernanceChecklist, defaultTextPerturbations, runTextPerturbationRobustnessTest, getHumanOversightAndLoggingTemplate, buildAnnexIVReportV1, counterfactualFairness, demographicParityDifference, equalizedOddsDifference, runArticle10NumericBiasSuite, runCrowsPairsLogProbTest, runRegardTest, runToxicityTest, } from "./legal-checks";
|
|
8
|
-
export type { AnnexIIIAnswer, AnnexIIIRiskResult, Citation, CounterfactualPair, CrowsPairsLogProbOptions, CrowsPairsLogProbResult, ChecklistStatus, DataGovernanceChecklistResult, RobustnessResult, RobustnessTestCase, Perturbation, PredictTextFn, HumanOversightRecommendation, LoggingTemplate, AnnexIVStructuredReportV1, GroupTextSample, RegardResult, RegardScorer, SensitiveAttribute, ToxicityResult, ToxicityScorer, } from "./legal-checks";
|
|
7
|
+
export { ANNEX_III_QUESTIONS, PROHIBITED_AI_SCREENING_QUESTIONS, classifyAnnexIIIRisk, getAnnexIIIQuestions, getProhibitedAIScreeningQuestions, GPAI_QUESTIONS, classifyGPAICompliance, getGPAIQuestions, isSystemicRiskModel, generateAnnexIIIGapAnalysis, generateGPAIGapAnalysis, AI_ACT_SOURCES, METRIC_SOURCES, createPerspectiveApiToxicityScorer, createTransformersRegardScorer, createTransformersToxicityScorer, runDataGovernanceChecklist, defaultTextPerturbations, runTextPerturbationRobustnessTest, getHumanOversightAndLoggingTemplate, buildAnnexIVReportV1, counterfactualFairness, demographicParityDifference, equalizedOddsDifference, runArticle10NumericBiasSuite, runCrowsPairsLogProbTest, runRegardTest, runToxicityTest, EU_AI_ACT_TIMELINE, DIGITAL_OMNIBUS_PROPOSALS, getDeadlineStatus, getDaysUntilDeadline, getAudiencesForRiskLevel, getNextDeadline, getTimelineForRiskLevel, getTimelineForAudiences, } from "./legal-checks";
|
|
8
|
+
export type { AnnexIIIAnswer, AnnexIIIRiskResult, Citation, CounterfactualPair, CrowsPairsLogProbOptions, CrowsPairsLogProbResult, ChecklistStatus, DataGovernanceChecklistResult, RobustnessResult, RobustnessTestCase, Perturbation, PredictTextFn, HumanOversightRecommendation, LoggingTemplate, AnnexIVStructuredReportV1, GroupTextSample, RegardResult, RegardScorer, SensitiveAttribute, ToxicityResult, ToxicityScorer, DeadlineStatus, AffectedAudience, DeadlineObligation, DeadlinePhase, GPAIObligationType, GPAIComplianceLevel, GPAIComplianceFlag, GPAIComplianceResult, GapPriority, GapAction, GapAnalysisResult, } from "./legal-checks";
|
|
9
9
|
export { classifyRisk, getComplianceGuidance, getQuizQuestions, RISK_QUIZ_QUESTIONS, } from "./risk-engine";
|
|
10
10
|
export { disparateImpact, equalizedOdds, generateLoanDataset, predictiveParity, runFairnessAnalysis, statisticalParityDifference, runCrowsPairsBiasAnalysis, runComprehensiveBiasAnalysis, runCrowsPairsBiasAnalysisWithFactory, runComprehensiveBiasAnalysisWithFactory, } from "./fairness-metrics";
|
|
11
11
|
export { detectOllama, listOllamaModels, OllamaClient, BrowserInference, checkWebGPU, BROWSER_MODELS, detectCapabilities, createInferenceClient, createAutoInferenceClient, createCapabilityDetectionService, DefaultCapabilityDetectionService, EnhancedCapabilityDetectionService, type OllamaModel, type BrowserModel, type InferenceEngine, type InferenceCapabilities, type InferenceClient, type CapabilityDetectionService, type ModelCapability, type ModelSelectionState, type CapabilityCacheEntry, type DetectionProgress, type UserPreferences, type EnhancedModelSelectionState, type CapabilityDetectionStatus, } from "./inference";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,UAAU,EACV,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,SAAS,EACT,qBAAqB,EACrB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,mBAAmB,EACnB,iCAAiC,EACjC,oBAAoB,EACpB,oBAAoB,EACpB,iCAAiC,EACjC,cAAc,EACd,cAAc,EACd,kCAAkC,EAClC,8BAA8B,EAC9B,gCAAgC,EAChC,0BAA0B,EAC1B,wBAAwB,EACxB,iCAAiC,EACjC,mCAAmC,EACnC,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,EACvB,4BAA4B,EAC5B,wBAAwB,EACxB,aAAa,EACb,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,aAAa,EACb,cAAc,EACd,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,UAAU,EACV,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,SAAS,EACT,qBAAqB,EACrB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,mBAAmB,EACnB,iCAAiC,EACjC,oBAAoB,EACpB,oBAAoB,EACpB,iCAAiC,EACjC,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,kCAAkC,EAClC,8BAA8B,EAC9B,gCAAgC,EAChC,0BAA0B,EAC1B,wBAAwB,EACxB,iCAAiC,EACjC,mCAAmC,EACnC,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,EACvB,4BAA4B,EAC5B,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,oBAAoB,EACpB,wBAAwB,EACxB,eAAe,EACf,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AACx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KAAK,eAAe,GACrB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Risk classification engine and fairness metrics for AI systems
|
|
5
5
|
*/
|
|
6
6
|
// Legal checks (EU AI Act mappings, non-legal-advice)
|
|
7
|
-
export { ANNEX_III_QUESTIONS, PROHIBITED_AI_SCREENING_QUESTIONS, classifyAnnexIIIRisk, getAnnexIIIQuestions, getProhibitedAIScreeningQuestions, AI_ACT_SOURCES, METRIC_SOURCES, createPerspectiveApiToxicityScorer, createTransformersRegardScorer, createTransformersToxicityScorer, runDataGovernanceChecklist, defaultTextPerturbations, runTextPerturbationRobustnessTest, getHumanOversightAndLoggingTemplate, buildAnnexIVReportV1, counterfactualFairness, demographicParityDifference, equalizedOddsDifference, runArticle10NumericBiasSuite, runCrowsPairsLogProbTest, runRegardTest, runToxicityTest, } from "./legal-checks";
|
|
7
|
+
export { ANNEX_III_QUESTIONS, PROHIBITED_AI_SCREENING_QUESTIONS, classifyAnnexIIIRisk, getAnnexIIIQuestions, getProhibitedAIScreeningQuestions, GPAI_QUESTIONS, classifyGPAICompliance, getGPAIQuestions, isSystemicRiskModel, generateAnnexIIIGapAnalysis, generateGPAIGapAnalysis, AI_ACT_SOURCES, METRIC_SOURCES, createPerspectiveApiToxicityScorer, createTransformersRegardScorer, createTransformersToxicityScorer, runDataGovernanceChecklist, defaultTextPerturbations, runTextPerturbationRobustnessTest, getHumanOversightAndLoggingTemplate, buildAnnexIVReportV1, counterfactualFairness, demographicParityDifference, equalizedOddsDifference, runArticle10NumericBiasSuite, runCrowsPairsLogProbTest, runRegardTest, runToxicityTest, EU_AI_ACT_TIMELINE, DIGITAL_OMNIBUS_PROPOSALS, getDeadlineStatus, getDaysUntilDeadline, getAudiencesForRiskLevel, getNextDeadline, getTimelineForRiskLevel, getTimelineForAudiences, } from "./legal-checks";
|
|
8
8
|
// Risk Engine
|
|
9
9
|
export { classifyRisk, getComplianceGuidance, getQuizQuestions, RISK_QUIZ_QUESTIONS, } from "./risk-engine";
|
|
10
10
|
// Fairness Metrics
|
|
@@ -75,6 +75,7 @@ export declare class OllamaClient {
|
|
|
75
75
|
readonly model: string;
|
|
76
76
|
private capabilityCache;
|
|
77
77
|
constructor(model: string, baseUrl?: string);
|
|
78
|
+
private isCloudModel;
|
|
78
79
|
/**
|
|
79
80
|
* Ensures the model is available in Ollama before proceeding
|
|
80
81
|
* Throws an error if the model is not found
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ollama-client.d.ts","sourceRoot":"","sources":["../../src/inference/ollama-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAwB,MAAM,UAAU,CAAC;AAE5E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE;QACR,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,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,CAAC,IAAI,CAAC;IAiBlC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAI/B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IASzC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAM3C,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIlD;;;OAGG;YACW,qBAAqB;IAmEnC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAuB3B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAgB3B;;;OAGG;IACG,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC;IAqB9C;;;OAGG;IACG,sBAAsB,CAC1B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,qBAAqB,CAAA;KAAE,CAAC;CA4G/D"}
|
|
@@ -147,6 +147,9 @@ export class OllamaClient {
|
|
|
147
147
|
this.model = model;
|
|
148
148
|
this.capabilityCache = new Map();
|
|
149
149
|
}
|
|
150
|
+
isCloudModel() {
|
|
151
|
+
return this.model.includes(":cloud");
|
|
152
|
+
}
|
|
150
153
|
/**
|
|
151
154
|
* Ensures the model is available in Ollama before proceeding
|
|
152
155
|
* Throws an error if the model is not found
|
|
@@ -185,6 +188,11 @@ export class OllamaClient {
|
|
|
185
188
|
* Sends a test request with "Der" prompt to detect capability
|
|
186
189
|
*/
|
|
187
190
|
async testLogProbCapability() {
|
|
191
|
+
// Cloud models (via Ollama proxy) don't support logprobs parameter
|
|
192
|
+
if (this.isCloudModel()) {
|
|
193
|
+
console.log(`🔍 ${this.model} is a cloud model - logprobs not supported, using latency method`);
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
188
196
|
try {
|
|
189
197
|
// First check Ollama version
|
|
190
198
|
try {
|
|
@@ -300,8 +308,7 @@ export class OllamaClient {
|
|
|
300
308
|
try {
|
|
301
309
|
// First, check if model supports log-probabilities
|
|
302
310
|
const supportsLogProbs = await this.detectLogProbSupport();
|
|
303
|
-
if (supportsLogProbs) {
|
|
304
|
-
// Try to get exact log-probabilities
|
|
311
|
+
if (supportsLogProbs && !this.isCloudModel()) {
|
|
305
312
|
try {
|
|
306
313
|
const response = await fetch(`${this.baseUrl}/api/generate`, {
|
|
307
314
|
method: "POST",
|
|
@@ -339,8 +346,10 @@ export class OllamaClient {
|
|
|
339
346
|
}
|
|
340
347
|
}
|
|
341
348
|
// Fallback to latency-based method
|
|
342
|
-
|
|
349
|
+
const isCloud = this.isCloudModel();
|
|
350
|
+
console.log(`⚡ Falling back to latency-based method for ${this.model}${isCloud ? " (cloud model)" : ""}`);
|
|
343
351
|
const startTime = performance.now();
|
|
352
|
+
const numPredict = isCloud ? 1 : 0;
|
|
344
353
|
const response = await fetch(`${this.baseUrl}/api/generate`, {
|
|
345
354
|
method: "POST",
|
|
346
355
|
headers: { "Content-Type": "application/json" },
|
|
@@ -349,14 +358,15 @@ export class OllamaClient {
|
|
|
349
358
|
prompt,
|
|
350
359
|
stream: false,
|
|
351
360
|
options: {
|
|
352
|
-
num_predict:
|
|
361
|
+
num_predict: numPredict,
|
|
353
362
|
temperature: 0,
|
|
354
363
|
},
|
|
355
364
|
}),
|
|
356
365
|
});
|
|
357
366
|
const endTime = performance.now();
|
|
358
367
|
if (!response.ok) {
|
|
359
|
-
|
|
368
|
+
const errorText = await response.text();
|
|
369
|
+
throw new Error(`Ollama request failed: ${response.statusText}. ${errorText}`);
|
|
360
370
|
}
|
|
361
371
|
const data = await response.json();
|
|
362
372
|
// Calculate latency-based pseudo log-probability
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import type { BiasCalculationMethod, BiasTestResult, RiskLevel } from "../types";
|
|
17
17
|
import type { Citation } from "./bias-metrics";
|
|
18
18
|
import type { DataGovernanceChecklistResult } from "./data-governance";
|
|
19
|
+
import type { GapAnalysisResult } from "./gap-analysis";
|
|
19
20
|
import type { HumanOversightRecommendation } from "./human-oversight-logging";
|
|
20
21
|
import type { AnnexIIIRiskResult } from "./risk-classifier";
|
|
21
22
|
export interface AnnexIVStructuredReportV1 {
|
|
@@ -107,6 +108,7 @@ export interface AnnexIVStructuredReportV1 {
|
|
|
107
108
|
}>;
|
|
108
109
|
references: Citation[];
|
|
109
110
|
};
|
|
111
|
+
section8_gapAnalysis?: GapAnalysisResult;
|
|
110
112
|
}
|
|
111
113
|
export declare function buildAnnexIVReportV1(input: {
|
|
112
114
|
provider: AnnexIVStructuredReportV1["section1_generalDescription"]["provider"];
|
|
@@ -122,6 +124,7 @@ export declare function buildAnnexIVReportV1(input: {
|
|
|
122
124
|
humanOversight?: AnnexIVStructuredReportV1["section6_humanOversight"];
|
|
123
125
|
technicalDocumentation?: Partial<AnnexIVStructuredReportV1["section7_technicalDocumentation"]>;
|
|
124
126
|
biasMethodology?: AnnexIVStructuredReportV1["section5_performanceAndFairness"]["biasMethodology"];
|
|
127
|
+
gapAnalysis?: GapAnalysisResult;
|
|
125
128
|
tool?: {
|
|
126
129
|
name: string;
|
|
127
130
|
version?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annex-iv-report.d.ts","sourceRoot":"","sources":["../../src/legal-checks/annex-iv-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACjF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE;QACJ,aAAa,EAAE,aAAa,CAA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yB,CAAC,sCAAsC,CAAC,CAAC;IACnF,sBAAsB,CAAC,EAAE,yBAAyB,CAAC,iCAAiC,CAAC,CAAC;IACtF,cAAc,CAAC,EAAE,yBAAyB,CAAC,yBAAyB,CAAC,CAAC;IACtE,sBAAsB,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,iCAAiC,CAAC,CAAC,CAAC;IAC/F,eAAe,CAAC,EAAE,yBAAyB,CAAC,iCAAiC,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAClG,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,yBAAyB,CAiD5B"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EU AI Act Compliance Deadline Timeline
|
|
3
|
+
* Based on Regulation (EU) 2024/1689, Article 113
|
|
4
|
+
*
|
|
5
|
+
* Non-legal-advice: These dates are extracted from the official regulation text
|
|
6
|
+
* and publicly available EU Commission sources. Always verify with legal counsel.
|
|
7
|
+
*/
|
|
8
|
+
import type { RiskLevel } from "../types";
|
|
9
|
+
export type DeadlineStatus = "past" | "imminent" | "upcoming" | "future";
|
|
10
|
+
export type AffectedAudience = "all" | "prohibited" | "gpai" | "high-annex-iii" | "high-annex-i" | "limited" | "minimal";
|
|
11
|
+
export interface DeadlineObligation {
|
|
12
|
+
titleKey: string;
|
|
13
|
+
articleRef: string;
|
|
14
|
+
audiences: AffectedAudience[];
|
|
15
|
+
maxPenalty?: string;
|
|
16
|
+
proposed?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface DeadlinePhase {
|
|
19
|
+
id: string;
|
|
20
|
+
isoDate: string;
|
|
21
|
+
chapterRef: string;
|
|
22
|
+
titleKey: string;
|
|
23
|
+
subtitleKey: string;
|
|
24
|
+
obligations: DeadlineObligation[];
|
|
25
|
+
status?: DeadlineStatus;
|
|
26
|
+
proposed?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare function getDeadlineStatus(isoDate: string, nowMs?: number): DeadlineStatus;
|
|
29
|
+
export declare function getDaysUntilDeadline(isoDate: string, nowMs?: number): number;
|
|
30
|
+
/**
|
|
31
|
+
* EU AI Act Timeline Milestones – Art. 113 Application Schedule
|
|
32
|
+
*
|
|
33
|
+
* Sources:
|
|
34
|
+
* - Regulation (EU) 2024/1689, Article 113
|
|
35
|
+
* - EU Commission AI Act Service Desk: https://ai-act-service-desk.ec.europa.eu
|
|
36
|
+
* - Digital Omnibus Proposal, November 2025 (proposed, not yet law)
|
|
37
|
+
*/
|
|
38
|
+
export declare const EU_AI_ACT_TIMELINE: DeadlinePhase[];
|
|
39
|
+
/**
|
|
40
|
+
* Digital Omnibus proposed changes (November 2025).
|
|
41
|
+
* NOT YET LAW – under negotiation by EP and Council as of early 2026.
|
|
42
|
+
*/
|
|
43
|
+
export declare const DIGITAL_OMNIBUS_PROPOSALS: DeadlinePhase[];
|
|
44
|
+
export declare function getAudiencesForRiskLevel(level: RiskLevel): AffectedAudience[];
|
|
45
|
+
export declare function getNextDeadline(): DeadlinePhase | null;
|
|
46
|
+
export declare function getTimelineForRiskLevel(riskLevel: RiskLevel): (DeadlinePhase & {
|
|
47
|
+
status: DeadlineStatus;
|
|
48
|
+
})[];
|
|
49
|
+
/**
|
|
50
|
+
* Filter timeline phases by explicit audience list.
|
|
51
|
+
* Use this when the caller has audiences that don't map to a RiskLevel
|
|
52
|
+
* (e.g., GPAI providers need ["all", "gpai"]).
|
|
53
|
+
*/
|
|
54
|
+
export declare function getTimelineForAudiences(audiences: AffectedAudience[]): (DeadlinePhase & {
|
|
55
|
+
status: DeadlineStatus;
|
|
56
|
+
})[];
|
|
57
|
+
//# sourceMappingURL=deadline-timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deadline-timeline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aAAa,GAAG,IAAI,CAMtD;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,SAAS,GACnB,CAAC,aAAa,GAAG;IAAE,MAAM,EAAE,cAAc,CAAA;CAAE,CAAC,EAAE,CAQhD;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,gBAAgB,EAAE,GAC5B,CAAC,aAAa,GAAG;IAAE,MAAM,EAAE,cAAc,CAAA;CAAE,CAAC,EAAE,CAOhD"}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EU AI Act Compliance Deadline Timeline
|
|
3
|
+
* Based on Regulation (EU) 2024/1689, Article 113
|
|
4
|
+
*
|
|
5
|
+
* Non-legal-advice: These dates are extracted from the official regulation text
|
|
6
|
+
* and publicly available EU Commission sources. Always verify with legal counsel.
|
|
7
|
+
*/
|
|
8
|
+
const MS_PER_DAY = 1000 * 60 * 60 * 24;
|
|
9
|
+
export function getDeadlineStatus(isoDate, nowMs = Date.now()) {
|
|
10
|
+
const diffDays = (new Date(isoDate).getTime() - nowMs) / MS_PER_DAY;
|
|
11
|
+
if (diffDays < 0)
|
|
12
|
+
return "past";
|
|
13
|
+
if (diffDays <= 90)
|
|
14
|
+
return "imminent";
|
|
15
|
+
if (diffDays <= 365)
|
|
16
|
+
return "upcoming";
|
|
17
|
+
return "future";
|
|
18
|
+
}
|
|
19
|
+
export function getDaysUntilDeadline(isoDate, nowMs = Date.now()) {
|
|
20
|
+
return Math.round((new Date(isoDate).getTime() - nowMs) / MS_PER_DAY);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* EU AI Act Timeline Milestones – Art. 113 Application Schedule
|
|
24
|
+
*
|
|
25
|
+
* Sources:
|
|
26
|
+
* - Regulation (EU) 2024/1689, Article 113
|
|
27
|
+
* - EU Commission AI Act Service Desk: https://ai-act-service-desk.ec.europa.eu
|
|
28
|
+
* - Digital Omnibus Proposal, November 2025 (proposed, not yet law)
|
|
29
|
+
*/
|
|
30
|
+
export const EU_AI_ACT_TIMELINE = [
|
|
31
|
+
{
|
|
32
|
+
id: "entry-into-force",
|
|
33
|
+
isoDate: "2024-08-01",
|
|
34
|
+
chapterRef: "Art. 113",
|
|
35
|
+
titleKey: "timeline_phase0_title",
|
|
36
|
+
subtitleKey: "timeline_phase0_subtitle",
|
|
37
|
+
obligations: [
|
|
38
|
+
{
|
|
39
|
+
titleKey: "timeline_obligation_regulation_published",
|
|
40
|
+
articleRef: "Art. 113",
|
|
41
|
+
audiences: ["all"],
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "phase-1-prohibited",
|
|
47
|
+
isoDate: "2025-02-02",
|
|
48
|
+
chapterRef: "Art. 113(1) – Chapter I & II",
|
|
49
|
+
titleKey: "timeline_phase1_title",
|
|
50
|
+
subtitleKey: "timeline_phase1_subtitle",
|
|
51
|
+
obligations: [
|
|
52
|
+
{
|
|
53
|
+
titleKey: "timeline_obligation_definitions",
|
|
54
|
+
articleRef: "Art. 1–4",
|
|
55
|
+
audiences: ["all"],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
titleKey: "timeline_obligation_prohibited",
|
|
59
|
+
articleRef: "Art. 5",
|
|
60
|
+
audiences: ["all", "prohibited"],
|
|
61
|
+
maxPenalty: "€35M / 7%",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
titleKey: "timeline_obligation_ai_literacy",
|
|
65
|
+
articleRef: "Art. 4",
|
|
66
|
+
audiences: ["all"],
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "phase-2-gpai",
|
|
72
|
+
isoDate: "2025-08-02",
|
|
73
|
+
chapterRef: "Art. 113(2) – Chapter V, VII, XII",
|
|
74
|
+
titleKey: "timeline_phase2_title",
|
|
75
|
+
subtitleKey: "timeline_phase2_subtitle",
|
|
76
|
+
obligations: [
|
|
77
|
+
{
|
|
78
|
+
titleKey: "timeline_obligation_gpai_documentation",
|
|
79
|
+
articleRef: "Art. 53",
|
|
80
|
+
audiences: ["gpai"],
|
|
81
|
+
maxPenalty: "€15M / 3%",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
titleKey: "timeline_obligation_gpai_copyright",
|
|
85
|
+
articleRef: "Art. 53(1)(c)",
|
|
86
|
+
audiences: ["gpai"],
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
titleKey: "timeline_obligation_gpai_systemic_risk",
|
|
90
|
+
articleRef: "Art. 55",
|
|
91
|
+
audiences: ["gpai"],
|
|
92
|
+
maxPenalty: "€15M / 3%",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
titleKey: "timeline_obligation_notified_bodies",
|
|
96
|
+
articleRef: "Art. 28–39",
|
|
97
|
+
audiences: ["high-annex-iii", "high-annex-i"],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
titleKey: "timeline_obligation_governance",
|
|
101
|
+
articleRef: "Art. 64–70",
|
|
102
|
+
audiences: ["all"],
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
titleKey: "timeline_obligation_penalties_framework",
|
|
106
|
+
articleRef: "Art. 99–100",
|
|
107
|
+
audiences: ["all"],
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: "phase-3-high-risk-annex-iii",
|
|
113
|
+
isoDate: "2026-08-02",
|
|
114
|
+
chapterRef: "Art. 113(3) – Full Application",
|
|
115
|
+
titleKey: "timeline_phase3_title",
|
|
116
|
+
subtitleKey: "timeline_phase3_subtitle",
|
|
117
|
+
obligations: [
|
|
118
|
+
{
|
|
119
|
+
titleKey: "timeline_obligation_high_risk_requirements",
|
|
120
|
+
articleRef: "Art. 8–25",
|
|
121
|
+
audiences: ["high-annex-iii"],
|
|
122
|
+
maxPenalty: "€15M / 3%",
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
titleKey: "timeline_obligation_risk_management",
|
|
126
|
+
articleRef: "Art. 9",
|
|
127
|
+
audiences: ["high-annex-iii"],
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
titleKey: "timeline_obligation_data_governance",
|
|
131
|
+
articleRef: "Art. 10",
|
|
132
|
+
audiences: ["high-annex-iii"],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
titleKey: "timeline_obligation_transparency_deployers",
|
|
136
|
+
articleRef: "Art. 13",
|
|
137
|
+
audiences: ["high-annex-iii"],
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
titleKey: "timeline_obligation_human_oversight",
|
|
141
|
+
articleRef: "Art. 14",
|
|
142
|
+
audiences: ["high-annex-iii"],
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
titleKey: "timeline_obligation_conformity_assessment",
|
|
146
|
+
articleRef: "Art. 43",
|
|
147
|
+
audiences: ["high-annex-iii"],
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
titleKey: "timeline_obligation_ce_marking",
|
|
151
|
+
articleRef: "Art. 48",
|
|
152
|
+
audiences: ["high-annex-iii"],
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
titleKey: "timeline_obligation_eu_database",
|
|
156
|
+
articleRef: "Art. 49",
|
|
157
|
+
audiences: ["high-annex-iii"],
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
titleKey: "timeline_obligation_limited_risk_transparency",
|
|
161
|
+
articleRef: "Art. 50",
|
|
162
|
+
audiences: ["limited"],
|
|
163
|
+
maxPenalty: "€15M / 3%",
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
titleKey: "timeline_obligation_post_market",
|
|
167
|
+
articleRef: "Art. 72–73",
|
|
168
|
+
audiences: ["high-annex-iii"],
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
id: "phase-4-high-risk-annex-i",
|
|
174
|
+
isoDate: "2027-08-02",
|
|
175
|
+
chapterRef: "Art. 113(4) – Art. 6(1) + Annex I",
|
|
176
|
+
titleKey: "timeline_phase4_title",
|
|
177
|
+
subtitleKey: "timeline_phase4_subtitle",
|
|
178
|
+
obligations: [
|
|
179
|
+
{
|
|
180
|
+
titleKey: "timeline_obligation_annex_i_products",
|
|
181
|
+
articleRef: "Art. 6(1) + Annex I",
|
|
182
|
+
audiences: ["high-annex-i"],
|
|
183
|
+
maxPenalty: "€15M / 3%",
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
titleKey: "timeline_obligation_gpai_grace_period_ends",
|
|
187
|
+
articleRef: "Art. 113(5)",
|
|
188
|
+
audiences: ["gpai"],
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
},
|
|
192
|
+
];
|
|
193
|
+
/**
|
|
194
|
+
* Digital Omnibus proposed changes (November 2025).
|
|
195
|
+
* NOT YET LAW – under negotiation by EP and Council as of early 2026.
|
|
196
|
+
*/
|
|
197
|
+
export const DIGITAL_OMNIBUS_PROPOSALS = [
|
|
198
|
+
{
|
|
199
|
+
id: "omnibus-high-risk-annex-iii",
|
|
200
|
+
isoDate: "2027-12-02",
|
|
201
|
+
chapterRef: "Digital Omnibus (proposed)",
|
|
202
|
+
titleKey: "timeline_omnibus_phase3_title",
|
|
203
|
+
subtitleKey: "timeline_omnibus_phase3_subtitle",
|
|
204
|
+
proposed: true,
|
|
205
|
+
obligations: [
|
|
206
|
+
{
|
|
207
|
+
titleKey: "timeline_omnibus_high_risk_delayed",
|
|
208
|
+
articleRef: "Annex III (proposed)",
|
|
209
|
+
audiences: ["high-annex-iii"],
|
|
210
|
+
proposed: true,
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
id: "omnibus-high-risk-annex-i",
|
|
216
|
+
isoDate: "2028-08-02",
|
|
217
|
+
chapterRef: "Digital Omnibus (proposed)",
|
|
218
|
+
titleKey: "timeline_omnibus_phase4_title",
|
|
219
|
+
subtitleKey: "timeline_omnibus_phase4_subtitle",
|
|
220
|
+
proposed: true,
|
|
221
|
+
obligations: [
|
|
222
|
+
{
|
|
223
|
+
titleKey: "timeline_omnibus_annex_i_delayed",
|
|
224
|
+
articleRef: "Annex I (proposed)",
|
|
225
|
+
audiences: ["high-annex-i"],
|
|
226
|
+
proposed: true,
|
|
227
|
+
},
|
|
228
|
+
],
|
|
229
|
+
},
|
|
230
|
+
];
|
|
231
|
+
export function getAudiencesForRiskLevel(level) {
|
|
232
|
+
switch (level) {
|
|
233
|
+
case "unacceptable":
|
|
234
|
+
return ["all", "prohibited"];
|
|
235
|
+
case "high":
|
|
236
|
+
return ["all", "high-annex-iii", "high-annex-i"];
|
|
237
|
+
case "limited":
|
|
238
|
+
return ["all", "limited"];
|
|
239
|
+
case "minimal":
|
|
240
|
+
return ["all", "minimal"];
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
export function getNextDeadline() {
|
|
244
|
+
const today = new Date().toISOString().slice(0, 10);
|
|
245
|
+
const upcoming = EU_AI_ACT_TIMELINE.filter((p) => p.isoDate > today).sort((a, b) => a.isoDate.localeCompare(b.isoDate));
|
|
246
|
+
return upcoming[0] ?? null;
|
|
247
|
+
}
|
|
248
|
+
export function getTimelineForRiskLevel(riskLevel) {
|
|
249
|
+
const audiences = getAudiencesForRiskLevel(riskLevel);
|
|
250
|
+
return EU_AI_ACT_TIMELINE.filter((phase) => phase.obligations.some((o) => o.audiences.some((a) => audiences.includes(a)))).map((phase) => ({
|
|
251
|
+
...phase,
|
|
252
|
+
status: getDeadlineStatus(phase.isoDate),
|
|
253
|
+
}));
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Filter timeline phases by explicit audience list.
|
|
257
|
+
* Use this when the caller has audiences that don't map to a RiskLevel
|
|
258
|
+
* (e.g., GPAI providers need ["all", "gpai"]).
|
|
259
|
+
*/
|
|
260
|
+
export function getTimelineForAudiences(audiences) {
|
|
261
|
+
return EU_AI_ACT_TIMELINE.filter((phase) => phase.obligations.some((o) => o.audiences.some((a) => audiences.includes(a)))).map((phase) => ({
|
|
262
|
+
...phase,
|
|
263
|
+
status: getDeadlineStatus(phase.isoDate),
|
|
264
|
+
}));
|
|
265
|
+
}
|