@euconform/cli 1.1.1 → 1.3.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/README.md +107 -3
- package/dist/{browser-inference-AWHXG2TB.js → browser-inference-NZ3X27GT.js} +3 -3
- package/dist/chunk-IWTPVCP2.js +9494 -0
- package/dist/chunk-OTCNLJNL.js +498 -0
- package/dist/{chunk-JQTB43B2.js → chunk-W32HNHWT.js} +29 -0
- package/dist/index.js +1482 -1310
- package/dist/{ollama-client-AJAW266L.js → ollama-client-3U7EGHLA.js} +1 -1
- package/dist/schemas/aibom-v1.1.schema.json +92 -0
- package/dist/schemas/aibom-v1.schema.json +76 -0
- package/dist/schemas/bias-v1.schema.json +138 -0
- package/dist/schemas/bias-v2.schema.json +255 -0
- package/dist/schemas/bundle-v1.schema.json +61 -0
- package/dist/schemas/ci-v1.schema.json +91 -0
- package/dist/schemas/external-observation-v1.schema.json +139 -0
- package/dist/schemas/report-v1.schema.json +199 -0
- package/dist/writer-OTMAB5JA.js +11 -0
- package/package.json +4 -2
- package/dist/chunk-AYXSWY3I.js +0 -11
- package/dist/chunk-F6VBKHY4.js +0 -186
- package/dist/chunk-FEBJZMWY.js +0 -175
- package/dist/run-bias-test-S6DIKHIY.js +0 -10
- package/dist/severity-5EZAEKDS.js +0 -7
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://euconform.eu/schemas/spec/aibom-v1.1.schema.json",
|
|
4
|
+
"title": "EuConform Evidence Format AI BOM v1.1",
|
|
5
|
+
"description": "Stage 1 inventory document for AI-relevant components and compliance capabilities. Adds optional import provenance metadata.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schemaVersion", "generatedAt", "project", "components", "complianceCapabilities"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": {
|
|
11
|
+
"const": "euconform.aibom.v1.1"
|
|
12
|
+
},
|
|
13
|
+
"generatedAt": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"format": "date-time"
|
|
16
|
+
},
|
|
17
|
+
"project": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": ["name", "rootPath"],
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"properties": {
|
|
22
|
+
"name": { "type": "string" },
|
|
23
|
+
"rootPath": { "type": "string" }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"components": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"required": ["id", "kind", "name", "source"],
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"properties": {
|
|
33
|
+
"id": { "type": "string" },
|
|
34
|
+
"kind": {
|
|
35
|
+
"enum": [
|
|
36
|
+
"framework",
|
|
37
|
+
"runtime",
|
|
38
|
+
"inference-provider",
|
|
39
|
+
"ai-framework",
|
|
40
|
+
"model",
|
|
41
|
+
"vector-store",
|
|
42
|
+
"embedding",
|
|
43
|
+
"dataset",
|
|
44
|
+
"tool"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"name": { "type": "string" },
|
|
48
|
+
"version": { "type": "string" },
|
|
49
|
+
"source": {
|
|
50
|
+
"enum": ["package.json", "lock-file", "code", "config", "docs", "sbom-import"]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"complianceCapabilities": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"required": [
|
|
58
|
+
"biasEvaluation",
|
|
59
|
+
"jsonExport",
|
|
60
|
+
"pdfExport",
|
|
61
|
+
"loggingInfrastructure",
|
|
62
|
+
"humanReviewFlow",
|
|
63
|
+
"incidentHandling"
|
|
64
|
+
],
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"properties": {
|
|
67
|
+
"biasEvaluation": { "type": "boolean" },
|
|
68
|
+
"jsonExport": { "type": "boolean" },
|
|
69
|
+
"pdfExport": { "type": "boolean" },
|
|
70
|
+
"loggingInfrastructure": { "type": "boolean" },
|
|
71
|
+
"humanReviewFlow": { "type": "boolean" },
|
|
72
|
+
"incidentHandling": { "type": "boolean" }
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"metadata": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"additionalProperties": false,
|
|
78
|
+
"properties": {
|
|
79
|
+
"importSource": {
|
|
80
|
+
"enum": ["cyclonedx", "spdx", "manual"]
|
|
81
|
+
},
|
|
82
|
+
"importTool": {
|
|
83
|
+
"type": "string"
|
|
84
|
+
},
|
|
85
|
+
"originalTimestamp": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"format": "date-time"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://euconform.eu/schemas/spec/aibom-v1.schema.json",
|
|
4
|
+
"title": "EuConform Evidence Format AI BOM v1",
|
|
5
|
+
"description": "Stage 1 inventory document for AI-relevant components and compliance capabilities.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schemaVersion", "generatedAt", "project", "components", "complianceCapabilities"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": {
|
|
11
|
+
"const": "euconform.aibom.v1"
|
|
12
|
+
},
|
|
13
|
+
"generatedAt": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"format": "date-time"
|
|
16
|
+
},
|
|
17
|
+
"project": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": ["name", "rootPath"],
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"properties": {
|
|
22
|
+
"name": { "type": "string" },
|
|
23
|
+
"rootPath": { "type": "string" }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"components": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"required": ["id", "kind", "name", "source"],
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"properties": {
|
|
33
|
+
"id": { "type": "string" },
|
|
34
|
+
"kind": {
|
|
35
|
+
"enum": [
|
|
36
|
+
"framework",
|
|
37
|
+
"runtime",
|
|
38
|
+
"inference-provider",
|
|
39
|
+
"ai-framework",
|
|
40
|
+
"model",
|
|
41
|
+
"vector-store",
|
|
42
|
+
"embedding",
|
|
43
|
+
"dataset",
|
|
44
|
+
"tool"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"name": { "type": "string" },
|
|
48
|
+
"version": { "type": "string" },
|
|
49
|
+
"source": {
|
|
50
|
+
"enum": ["package.json", "lock-file", "code", "config", "docs", "sbom-import"]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"complianceCapabilities": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"required": [
|
|
58
|
+
"biasEvaluation",
|
|
59
|
+
"jsonExport",
|
|
60
|
+
"pdfExport",
|
|
61
|
+
"loggingInfrastructure",
|
|
62
|
+
"humanReviewFlow",
|
|
63
|
+
"incidentHandling"
|
|
64
|
+
],
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"properties": {
|
|
67
|
+
"biasEvaluation": { "type": "boolean" },
|
|
68
|
+
"jsonExport": { "type": "boolean" },
|
|
69
|
+
"pdfExport": { "type": "boolean" },
|
|
70
|
+
"loggingInfrastructure": { "type": "boolean" },
|
|
71
|
+
"humanReviewFlow": { "type": "boolean" },
|
|
72
|
+
"incidentHandling": { "type": "boolean" }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://euconform.eu/schemas/bias-v1.schema.json",
|
|
4
|
+
"title": "EuConform Bias Report v1",
|
|
5
|
+
"description": "Result of a CrowS-Pairs style bias measurement, including the method and sampling parameters needed to reproduce it.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schemaVersion", "generatedAt", "model", "dataset", "result"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": {
|
|
11
|
+
"const": "euconform.bias.v1"
|
|
12
|
+
},
|
|
13
|
+
"generatedAt": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"format": "date-time"
|
|
16
|
+
},
|
|
17
|
+
"model": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"description": "Identifier of the measured model, e.g. 'phi3:3.8b'."
|
|
21
|
+
},
|
|
22
|
+
"dataset": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"minLength": 1,
|
|
25
|
+
"description": "Dataset the sentence pairs came from, e.g. 'crows_pairs_de'."
|
|
26
|
+
},
|
|
27
|
+
"result": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"required": ["score", "method", "pairsAnalyzed", "stereotypicalPreference"],
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"properties": {
|
|
32
|
+
"score": {
|
|
33
|
+
"type": "number",
|
|
34
|
+
"description": "Mean of log P(stereotype) - log P(anti-stereotype) across all analysed pairs."
|
|
35
|
+
},
|
|
36
|
+
"method": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"enum": ["logprobs_exact", "logprobs_fallback_latency"],
|
|
39
|
+
"description": "How the per-sentence probabilities were obtained. Not identical to the masked-model pseudo-log-likelihood of the original paper."
|
|
40
|
+
},
|
|
41
|
+
"pairsAnalyzed": {
|
|
42
|
+
"type": "integer",
|
|
43
|
+
"minimum": 1,
|
|
44
|
+
"description": "Pairs that produced a usable score; can be lower than the requested sample if entries were skipped."
|
|
45
|
+
},
|
|
46
|
+
"stereotypicalPreference": {
|
|
47
|
+
"type": "number",
|
|
48
|
+
"minimum": 0,
|
|
49
|
+
"maximum": 100,
|
|
50
|
+
"description": "Percentage of pairs where the stereotypical variant scored higher."
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"sampling": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"required": ["datasetSize", "maxPairs", "seed"],
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"description": "What subset of the dataset was measured. Null values mean the full dataset was used.",
|
|
59
|
+
"properties": {
|
|
60
|
+
"datasetSize": {
|
|
61
|
+
"type": "integer",
|
|
62
|
+
"minimum": 1
|
|
63
|
+
},
|
|
64
|
+
"maxPairs": {
|
|
65
|
+
"type": ["integer", "null"],
|
|
66
|
+
"minimum": 1
|
|
67
|
+
},
|
|
68
|
+
"seed": {
|
|
69
|
+
"type": ["integer", "null"],
|
|
70
|
+
"minimum": 0,
|
|
71
|
+
"description": "Replaying this seed with the same maxPairs reproduces the selection."
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"limitations": {
|
|
76
|
+
"type": "array",
|
|
77
|
+
"items": { "type": "string" },
|
|
78
|
+
"description": "Known constraints of this measurement, recorded alongside the number."
|
|
79
|
+
},
|
|
80
|
+
"catalog": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"description": "Provenance of a user-supplied question catalog. Absent when a bundled dataset was used — there is no catalog to attribute.",
|
|
83
|
+
"properties": {
|
|
84
|
+
"name": { "type": "string" },
|
|
85
|
+
"version": { "type": "string" },
|
|
86
|
+
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
87
|
+
"pairCount": { "type": "integer", "minimum": 1 }
|
|
88
|
+
},
|
|
89
|
+
"required": ["name", "version", "sha256", "pairCount"],
|
|
90
|
+
"additionalProperties": false
|
|
91
|
+
},
|
|
92
|
+
"byBiasType": {
|
|
93
|
+
"type": "array",
|
|
94
|
+
"description": "Per-category aggregates over pairResults. The overall score hides these.",
|
|
95
|
+
"items": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"properties": {
|
|
98
|
+
"biasType": { "type": "string" },
|
|
99
|
+
"pairsCount": { "type": "integer", "minimum": 1 },
|
|
100
|
+
"stereotypePreferenceCount": { "type": "integer", "minimum": 0 },
|
|
101
|
+
"stereotypePreferencePercent": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
102
|
+
"averageBiasScore": { "type": "number" }
|
|
103
|
+
},
|
|
104
|
+
"required": [
|
|
105
|
+
"biasType",
|
|
106
|
+
"pairsCount",
|
|
107
|
+
"stereotypePreferenceCount",
|
|
108
|
+
"stereotypePreferencePercent",
|
|
109
|
+
"averageBiasScore"
|
|
110
|
+
],
|
|
111
|
+
"additionalProperties": false
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"pairResults": {
|
|
115
|
+
"type": "array",
|
|
116
|
+
"description": "One entry per analysed sentence pair, enabling third-party recomputation of the aggregate score.",
|
|
117
|
+
"items": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"properties": {
|
|
120
|
+
"pairId": { "type": ["integer", "null"] },
|
|
121
|
+
"stereotype": { "type": "string" },
|
|
122
|
+
"antiStereotype": { "type": "string" },
|
|
123
|
+
"biasType": { "type": ["string", "null"] },
|
|
124
|
+
"stereotypeLogProb": { "type": "number" },
|
|
125
|
+
"antiStereotypeLogProb": { "type": "number" },
|
|
126
|
+
"biasScore": { "type": "number" },
|
|
127
|
+
"biasDirection": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"enum": ["stereotype", "anti-stereotype", "neutral"]
|
|
130
|
+
},
|
|
131
|
+
"method": { "type": "string" }
|
|
132
|
+
},
|
|
133
|
+
"required": ["stereotype", "antiStereotype", "biasScore", "biasDirection", "method"],
|
|
134
|
+
"additionalProperties": false
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://euconform.eu/schemas/bias-v2.schema.json",
|
|
4
|
+
"title": "EuConform Bias Report v2",
|
|
5
|
+
"description": "Result of the autoregressive CrowS-Pairs adaptation bias measurement. Mandatory measurement provenance and self-checkable statistics (recomputed by the shared semantic validator from pairResults). v1 is legacy: its 'logprobs_exact' method label was unreliable (see Messmotor-Sanierung Task 3).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schemaVersion",
|
|
9
|
+
"generatedAt",
|
|
10
|
+
"model",
|
|
11
|
+
"dataset",
|
|
12
|
+
"provenance",
|
|
13
|
+
"sampling",
|
|
14
|
+
"result",
|
|
15
|
+
"runStatus",
|
|
16
|
+
"selectedCount",
|
|
17
|
+
"analyzedCount",
|
|
18
|
+
"failedCount",
|
|
19
|
+
"failedPairs",
|
|
20
|
+
"statistics",
|
|
21
|
+
"pairResults"
|
|
22
|
+
],
|
|
23
|
+
"additionalProperties": false,
|
|
24
|
+
"$defs": {
|
|
25
|
+
"wilsonInterval": {
|
|
26
|
+
"type": ["object", "null"],
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": ["lower", "upper"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"lower": { "type": "number" },
|
|
31
|
+
"upper": { "type": "number" }
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"categoryStatistics": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": [
|
|
38
|
+
"biasType",
|
|
39
|
+
"analyzedCount",
|
|
40
|
+
"preferenceCount",
|
|
41
|
+
"tiesCount",
|
|
42
|
+
"preferencePercent",
|
|
43
|
+
"preferenceWilson95"
|
|
44
|
+
],
|
|
45
|
+
"properties": {
|
|
46
|
+
"biasType": { "type": "string" },
|
|
47
|
+
"analyzedCount": { "type": "integer", "minimum": 1 },
|
|
48
|
+
"preferenceCount": { "type": "integer", "minimum": 0 },
|
|
49
|
+
"tiesCount": { "type": "integer", "minimum": 0 },
|
|
50
|
+
"preferencePercent": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
51
|
+
"preferenceWilson95": { "$ref": "#/$defs/wilsonInterval" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"pairResult": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"required": [
|
|
58
|
+
"pairId",
|
|
59
|
+
"stereotype",
|
|
60
|
+
"antiStereotype",
|
|
61
|
+
"biasType",
|
|
62
|
+
"stereotypeLogProb",
|
|
63
|
+
"antiStereotypeLogProb",
|
|
64
|
+
"biasScore",
|
|
65
|
+
"biasDirection",
|
|
66
|
+
"method",
|
|
67
|
+
"stereotypeTokenCount",
|
|
68
|
+
"antiStereotypeTokenCount",
|
|
69
|
+
"tokenCountDelta",
|
|
70
|
+
"stereotypeTokenHash",
|
|
71
|
+
"antiStereotypeTokenHash"
|
|
72
|
+
],
|
|
73
|
+
"properties": {
|
|
74
|
+
"pairId": { "type": ["integer", "null"] },
|
|
75
|
+
"stereotype": { "type": "string" },
|
|
76
|
+
"antiStereotype": { "type": "string" },
|
|
77
|
+
"biasType": { "type": ["string", "null"] },
|
|
78
|
+
"stereotypeLogProb": { "type": "number" },
|
|
79
|
+
"antiStereotypeLogProb": { "type": "number" },
|
|
80
|
+
"biasScore": { "type": "number" },
|
|
81
|
+
"biasDirection": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"enum": ["stereotype", "anti-stereotype", "neutral"]
|
|
84
|
+
},
|
|
85
|
+
"method": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"enum": ["sequence_logprob_sum", "conditional_sequence_logprob_sum"]
|
|
88
|
+
},
|
|
89
|
+
"stereotypeTokenCount": { "type": "integer", "minimum": 0 },
|
|
90
|
+
"antiStereotypeTokenCount": { "type": "integer", "minimum": 0 },
|
|
91
|
+
"tokenCountDelta": { "type": "integer" },
|
|
92
|
+
"stereotypeTokenHash": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
93
|
+
"antiStereotypeTokenHash": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"failedPair": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"additionalProperties": false,
|
|
99
|
+
"required": ["pairId", "reason"],
|
|
100
|
+
"properties": {
|
|
101
|
+
"pairId": { "type": ["integer", "null"] },
|
|
102
|
+
"reason": { "type": "string" }
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"properties": {
|
|
107
|
+
"schemaVersion": { "const": "euconform.bias.v2" },
|
|
108
|
+
"generatedAt": { "type": "string", "format": "date-time" },
|
|
109
|
+
"model": { "type": "string", "minLength": 1 },
|
|
110
|
+
"dataset": { "type": "string", "minLength": 1 },
|
|
111
|
+
"provenance": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"required": [
|
|
115
|
+
"engine",
|
|
116
|
+
"modelId",
|
|
117
|
+
"modelRevision",
|
|
118
|
+
"tokenizerId",
|
|
119
|
+
"transformersVersion",
|
|
120
|
+
"onnxruntimeVersion",
|
|
121
|
+
"dtype",
|
|
122
|
+
"backend",
|
|
123
|
+
"templateStrategy"
|
|
124
|
+
],
|
|
125
|
+
"properties": {
|
|
126
|
+
"engine": { "const": "transformers" },
|
|
127
|
+
"modelId": { "type": "string", "minLength": 1 },
|
|
128
|
+
"modelRevision": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"pattern": "^[0-9a-fA-F]{40}$",
|
|
131
|
+
"description": "Resolved immutable commit SHA, never a mutable ref like 'main'."
|
|
132
|
+
},
|
|
133
|
+
"tokenizerId": { "type": "string", "minLength": 1 },
|
|
134
|
+
"transformersVersion": { "type": "string", "minLength": 1 },
|
|
135
|
+
"onnxruntimeVersion": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"minLength": 1,
|
|
138
|
+
"description": "Installed onnxruntime-node version. Ergebnisrelevant: a native ONNX Runtime version bump (e.g. 1.14.0 -> 1.24.3 across the @xenova/transformers -> @huggingface/transformers migration) has been observed to shift sequence log-probabilities at the 1e-6 relative level even with byte-identical model weights and dtype (Messmotor-Sanierung Task 4). Must be resolved from the installed package, never a placeholder."
|
|
139
|
+
},
|
|
140
|
+
"dtype": { "type": "string", "minLength": 1 },
|
|
141
|
+
"backend": { "const": "node-onnx" },
|
|
142
|
+
"templateStrategy": { "type": "string", "enum": ["none", "fixed_template_span"] },
|
|
143
|
+
"promptText": { "type": "string" },
|
|
144
|
+
"promptSha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
145
|
+
"contextTokenHash": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
|
|
146
|
+
},
|
|
147
|
+
"if": {
|
|
148
|
+
"properties": { "templateStrategy": { "const": "fixed_template_span" } }
|
|
149
|
+
},
|
|
150
|
+
"then": {
|
|
151
|
+
"required": ["promptText", "promptSha256", "contextTokenHash"]
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"sampling": {
|
|
155
|
+
"type": "object",
|
|
156
|
+
"additionalProperties": false,
|
|
157
|
+
"required": ["mode", "datasetSize", "maxPairs", "seed", "datasetSha256", "pairIds"],
|
|
158
|
+
"properties": {
|
|
159
|
+
"mode": { "type": "string", "enum": ["seeded_sample", "full"] },
|
|
160
|
+
"datasetSize": { "type": "integer", "minimum": 1 },
|
|
161
|
+
"maxPairs": { "type": ["integer", "null"], "minimum": 1 },
|
|
162
|
+
"seed": { "type": ["integer", "null"], "minimum": 0 },
|
|
163
|
+
"datasetSha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
164
|
+
"pairIds": {
|
|
165
|
+
"type": "array",
|
|
166
|
+
"items": { "type": ["integer", "null"] }
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"result": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"additionalProperties": false,
|
|
173
|
+
"required": ["score", "method", "pairsAnalyzed"],
|
|
174
|
+
"properties": {
|
|
175
|
+
"score": { "type": "number" },
|
|
176
|
+
"method": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"enum": ["sequence_logprob_sum", "conditional_sequence_logprob_sum"]
|
|
179
|
+
},
|
|
180
|
+
"pairsAnalyzed": { "type": "integer", "minimum": 1 }
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"runStatus": { "type": "string", "enum": ["complete", "partial"] },
|
|
184
|
+
"selectedCount": { "type": "integer", "minimum": 1 },
|
|
185
|
+
"analyzedCount": { "type": "integer", "minimum": 1 },
|
|
186
|
+
"failedCount": { "type": "integer", "minimum": 0 },
|
|
187
|
+
"failedPairs": {
|
|
188
|
+
"type": "array",
|
|
189
|
+
"items": { "$ref": "#/$defs/failedPair" }
|
|
190
|
+
},
|
|
191
|
+
"statistics": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"additionalProperties": false,
|
|
194
|
+
"required": [
|
|
195
|
+
"analyzedCount",
|
|
196
|
+
"preferenceCount",
|
|
197
|
+
"tiesCount",
|
|
198
|
+
"preferencePercent",
|
|
199
|
+
"preferenceWilson95",
|
|
200
|
+
"byBiasType",
|
|
201
|
+
"pairDiffQuartiles",
|
|
202
|
+
"equalTokenPairsCount",
|
|
203
|
+
"equalTokenPreferenceCount",
|
|
204
|
+
"equalTokenPreferencePercent",
|
|
205
|
+
"equalTokenPreferenceWilson95"
|
|
206
|
+
],
|
|
207
|
+
"properties": {
|
|
208
|
+
"analyzedCount": { "type": "integer", "minimum": 1 },
|
|
209
|
+
"preferenceCount": { "type": "integer", "minimum": 0 },
|
|
210
|
+
"tiesCount": { "type": "integer", "minimum": 0 },
|
|
211
|
+
"preferencePercent": { "type": "number", "minimum": 0, "maximum": 100 },
|
|
212
|
+
"preferenceWilson95": { "$ref": "#/$defs/wilsonInterval" },
|
|
213
|
+
"byBiasType": {
|
|
214
|
+
"type": "array",
|
|
215
|
+
"items": { "$ref": "#/$defs/categoryStatistics" }
|
|
216
|
+
},
|
|
217
|
+
"pairDiffQuartiles": {
|
|
218
|
+
"type": ["object", "null"],
|
|
219
|
+
"additionalProperties": false,
|
|
220
|
+
"required": ["min", "max", "median", "q1", "q3"],
|
|
221
|
+
"properties": {
|
|
222
|
+
"min": { "type": "number" },
|
|
223
|
+
"max": { "type": "number" },
|
|
224
|
+
"median": { "type": "number" },
|
|
225
|
+
"q1": { "type": "number" },
|
|
226
|
+
"q3": { "type": "number" }
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"equalTokenPairsCount": { "type": "integer", "minimum": 0 },
|
|
230
|
+
"equalTokenPreferenceCount": { "type": "integer", "minimum": 0 },
|
|
231
|
+
"equalTokenPreferencePercent": { "type": ["number", "null"], "minimum": 0, "maximum": 100 },
|
|
232
|
+
"equalTokenPreferenceWilson95": { "$ref": "#/$defs/wilsonInterval" }
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"pairResults": {
|
|
236
|
+
"type": "array",
|
|
237
|
+
"items": { "$ref": "#/$defs/pairResult" }
|
|
238
|
+
},
|
|
239
|
+
"limitations": {
|
|
240
|
+
"type": "array",
|
|
241
|
+
"items": { "type": "string" }
|
|
242
|
+
},
|
|
243
|
+
"catalog": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"additionalProperties": false,
|
|
246
|
+
"required": ["name", "version", "sha256", "pairCount"],
|
|
247
|
+
"properties": {
|
|
248
|
+
"name": { "type": "string" },
|
|
249
|
+
"version": { "type": "string" },
|
|
250
|
+
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
251
|
+
"pairCount": { "type": "integer", "minimum": 1 }
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://euconform.eu/schemas/spec/bundle-v1.schema.json",
|
|
4
|
+
"title": "EuConform Evidence Format Bundle v1",
|
|
5
|
+
"description": "Stage 2 integrity and transport manifest for EuConform Evidence Format scan artifacts.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schemaVersion", "generatedAt", "tool", "target", "artifacts"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": {
|
|
11
|
+
"const": "euconform.bundle.v1"
|
|
12
|
+
},
|
|
13
|
+
"generatedAt": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"format": "date-time"
|
|
16
|
+
},
|
|
17
|
+
"tool": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": ["name", "version"],
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"properties": {
|
|
22
|
+
"name": { "type": "string" },
|
|
23
|
+
"version": { "type": "string" }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"target": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"required": ["name", "rootPath"],
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"properties": {
|
|
31
|
+
"name": { "type": "string" },
|
|
32
|
+
"rootPath": { "type": "string" }
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"artifacts": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"minItems": 1,
|
|
38
|
+
"items": { "$ref": "#/$defs/artifactRef" }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"$defs": {
|
|
42
|
+
"artifactRef": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"required": ["role", "fileName", "sha256", "required"],
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"properties": {
|
|
47
|
+
"role": {
|
|
48
|
+
"enum": ["report", "aibom", "ci", "summary", "bias"]
|
|
49
|
+
},
|
|
50
|
+
"fileName": { "type": "string" },
|
|
51
|
+
"sha256": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
54
|
+
},
|
|
55
|
+
"schemaVersion": { "type": "string" },
|
|
56
|
+
"mimeType": { "type": "string" },
|
|
57
|
+
"required": { "type": "boolean" }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|