acf-mcp 1.0.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/LICENSE +21 -0
- package/README.md +87 -0
- package/content/fiches/.gitkeep +0 -0
- package/content/fiches/ACF-00.en.md +59 -0
- package/content/fiches/ACF-00.fr.md +59 -0
- package/content/fiches/ACF-01.en.md +32 -0
- package/content/fiches/ACF-01.fr.md +32 -0
- package/content/fiches/ACF-02.en.md +32 -0
- package/content/fiches/ACF-02.fr.md +32 -0
- package/content/fiches/ACF-03.en.md +78 -0
- package/content/fiches/ACF-03.fr.md +78 -0
- package/content/fiches/ACF-04.en.md +32 -0
- package/content/fiches/ACF-04.fr.md +32 -0
- package/content/fiches/ACF-05.en.md +32 -0
- package/content/fiches/ACF-05.fr.md +32 -0
- package/content/fiches/ACF-06.en.md +32 -0
- package/content/fiches/ACF-06.fr.md +32 -0
- package/content/fiches/ACF-07.en.md +32 -0
- package/content/fiches/ACF-07.fr.md +32 -0
- package/content/fiches/ACF-08.en.md +32 -0
- package/content/fiches/ACF-08.fr.md +32 -0
- package/content/fiches/ACF-09.en.md +32 -0
- package/content/fiches/ACF-09.fr.md +32 -0
- package/content/fiches/ACF-10.en.md +32 -0
- package/content/fiches/ACF-10.fr.md +32 -0
- package/content/fiches/ACF-11.en.md +32 -0
- package/content/fiches/ACF-11.fr.md +32 -0
- package/content/fiches/ACF-12.en.md +32 -0
- package/content/fiches/ACF-12.fr.md +32 -0
- package/content/fiches/ACF-13.en.md +32 -0
- package/content/fiches/ACF-13.fr.md +32 -0
- package/content/fiches/ACF-14.en.md +32 -0
- package/content/fiches/ACF-14.fr.md +32 -0
- package/content/fiches/ACF-15.en.md +32 -0
- package/content/fiches/ACF-15.fr.md +32 -0
- package/content/fiches/ACF-16.en.md +32 -0
- package/content/fiches/ACF-16.fr.md +32 -0
- package/content/framework/.gitkeep +0 -0
- package/content/framework/autonomy-levels.json +73 -0
- package/content/framework/ddao.json +16 -0
- package/content/framework/dimensions.json +83 -0
- package/content/framework/principles.json +77 -0
- package/content/glossary/.gitkeep +0 -0
- package/content/glossary/en.json +96 -0
- package/content/glossary/fr.json +96 -0
- package/content/guides/.gitkeep +0 -0
- package/content/manual/.gitkeep +0 -0
- package/content/meta.json +23 -0
- package/content/rules/.gitkeep +0 -0
- package/content/rules/ai-act-annex-i.json +54 -0
- package/content/rules/ai-act-annex-iii.json +165 -0
- package/content/rules/ai-act-roles.json +52 -0
- package/content/rules/autonomy-inference.json +38 -0
- package/content/rules/criticality-matrix.json +83 -0
- package/content/rules/ddao-controls-mapping.json +148 -0
- package/content/rules/gdpr-qualification.json +58 -0
- package/content/rules/gpai-triggers.json +41 -0
- package/content/rules/rules-meta.json +5 -0
- package/content/rules/sign-off-matrix.json +84 -0
- package/content/whitepaper/.gitkeep +0 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +2898 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/rate-limit.d.ts +24 -0
- package/dist/lib/rate-limit.js +89 -0
- package/dist/lib/rate-limit.js.map +1 -0
- package/dist/search-index.json +1 -0
- package/dist/server-DxztThU5.d.ts +931 -0
- package/dist/transport/http.d.ts +27 -0
- package/dist/transport/http.js +2908 -0
- package/dist/transport/http.js.map +1 -0
- package/dist/transport/stdio.d.ts +1 -0
- package/dist/transport/stdio.js +2907 -0
- package/dist/transport/stdio.js.map +1 -0
- package/package.json +81 -0
|
@@ -0,0 +1,931 @@
|
|
|
1
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Supported locales — V1.0 ships FR + EN translated; 11 others fall back to EN
|
|
6
|
+
* (cf. spec §8.3). Infrastructure supports all 13 codes uniformly.
|
|
7
|
+
*/
|
|
8
|
+
declare const SUPPORTED_LOCALES: readonly ["fr", "en", "es", "de", "pt", "it", "nl", "ru", "ar", "tr", "ja", "zh", "ko"];
|
|
9
|
+
declare const AcfLocaleSchema: z.ZodEnum<["fr", "en", "es", "de", "pt", "it", "nl", "ru", "ar", "tr", "ja", "zh", "ko"]>;
|
|
10
|
+
type AcfLocale = z.infer<typeof AcfLocaleSchema>;
|
|
11
|
+
/**
|
|
12
|
+
* Localized string: at minimum FR + EN must be provided.
|
|
13
|
+
*/
|
|
14
|
+
declare const LocalizedStringSchema: z.ZodObject<{
|
|
15
|
+
fr: z.ZodString;
|
|
16
|
+
en: z.ZodString;
|
|
17
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
18
|
+
fr: z.ZodString;
|
|
19
|
+
en: z.ZodString;
|
|
20
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
21
|
+
fr: z.ZodString;
|
|
22
|
+
en: z.ZodString;
|
|
23
|
+
}, z.ZodString, "strip">>;
|
|
24
|
+
type LocalizedString = z.infer<typeof LocalizedStringSchema>;
|
|
25
|
+
declare const PrincipleSchema: z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
code: z.ZodString;
|
|
28
|
+
title: z.ZodObject<{
|
|
29
|
+
fr: z.ZodString;
|
|
30
|
+
en: z.ZodString;
|
|
31
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
32
|
+
fr: z.ZodString;
|
|
33
|
+
en: z.ZodString;
|
|
34
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
35
|
+
fr: z.ZodString;
|
|
36
|
+
en: z.ZodString;
|
|
37
|
+
}, z.ZodString, "strip">>;
|
|
38
|
+
summary: z.ZodObject<{
|
|
39
|
+
fr: z.ZodString;
|
|
40
|
+
en: z.ZodString;
|
|
41
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
42
|
+
fr: z.ZodString;
|
|
43
|
+
en: z.ZodString;
|
|
44
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
45
|
+
fr: z.ZodString;
|
|
46
|
+
en: z.ZodString;
|
|
47
|
+
}, z.ZodString, "strip">>;
|
|
48
|
+
doctrine: z.ZodObject<{
|
|
49
|
+
fr: z.ZodString;
|
|
50
|
+
en: z.ZodString;
|
|
51
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
52
|
+
fr: z.ZodString;
|
|
53
|
+
en: z.ZodString;
|
|
54
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
55
|
+
fr: z.ZodString;
|
|
56
|
+
en: z.ZodString;
|
|
57
|
+
}, z.ZodString, "strip">>;
|
|
58
|
+
related_fiches: z.ZodArray<z.ZodString, "many">;
|
|
59
|
+
related_dimensions: z.ZodArray<z.ZodString, "many">;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
code: string;
|
|
62
|
+
id: string;
|
|
63
|
+
title: {
|
|
64
|
+
fr: string;
|
|
65
|
+
en: string;
|
|
66
|
+
} & {
|
|
67
|
+
[k: string]: string;
|
|
68
|
+
};
|
|
69
|
+
summary: {
|
|
70
|
+
fr: string;
|
|
71
|
+
en: string;
|
|
72
|
+
} & {
|
|
73
|
+
[k: string]: string;
|
|
74
|
+
};
|
|
75
|
+
doctrine: {
|
|
76
|
+
fr: string;
|
|
77
|
+
en: string;
|
|
78
|
+
} & {
|
|
79
|
+
[k: string]: string;
|
|
80
|
+
};
|
|
81
|
+
related_fiches: string[];
|
|
82
|
+
related_dimensions: string[];
|
|
83
|
+
}, {
|
|
84
|
+
code: string;
|
|
85
|
+
id: string;
|
|
86
|
+
title: {
|
|
87
|
+
fr: string;
|
|
88
|
+
en: string;
|
|
89
|
+
} & {
|
|
90
|
+
[k: string]: string;
|
|
91
|
+
};
|
|
92
|
+
summary: {
|
|
93
|
+
fr: string;
|
|
94
|
+
en: string;
|
|
95
|
+
} & {
|
|
96
|
+
[k: string]: string;
|
|
97
|
+
};
|
|
98
|
+
doctrine: {
|
|
99
|
+
fr: string;
|
|
100
|
+
en: string;
|
|
101
|
+
} & {
|
|
102
|
+
[k: string]: string;
|
|
103
|
+
};
|
|
104
|
+
related_fiches: string[];
|
|
105
|
+
related_dimensions: string[];
|
|
106
|
+
}>;
|
|
107
|
+
type Principle = z.infer<typeof PrincipleSchema>;
|
|
108
|
+
declare const AutonomyLevelSchema: z.ZodObject<{
|
|
109
|
+
id: z.ZodString;
|
|
110
|
+
code: z.ZodString;
|
|
111
|
+
title: z.ZodObject<{
|
|
112
|
+
fr: z.ZodString;
|
|
113
|
+
en: z.ZodString;
|
|
114
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
115
|
+
fr: z.ZodString;
|
|
116
|
+
en: z.ZodString;
|
|
117
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
118
|
+
fr: z.ZodString;
|
|
119
|
+
en: z.ZodString;
|
|
120
|
+
}, z.ZodString, "strip">>;
|
|
121
|
+
description: z.ZodObject<{
|
|
122
|
+
fr: z.ZodString;
|
|
123
|
+
en: z.ZodString;
|
|
124
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
125
|
+
fr: z.ZodString;
|
|
126
|
+
en: z.ZodString;
|
|
127
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
128
|
+
fr: z.ZodString;
|
|
129
|
+
en: z.ZodString;
|
|
130
|
+
}, z.ZodString, "strip">>;
|
|
131
|
+
controls: z.ZodObject<{
|
|
132
|
+
fr: z.ZodString;
|
|
133
|
+
en: z.ZodString;
|
|
134
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
135
|
+
fr: z.ZodString;
|
|
136
|
+
en: z.ZodString;
|
|
137
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
138
|
+
fr: z.ZodString;
|
|
139
|
+
en: z.ZodString;
|
|
140
|
+
}, z.ZodString, "strip">>;
|
|
141
|
+
examples: z.ZodObject<{
|
|
142
|
+
fr: z.ZodString;
|
|
143
|
+
en: z.ZodString;
|
|
144
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
145
|
+
fr: z.ZodString;
|
|
146
|
+
en: z.ZodString;
|
|
147
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
148
|
+
fr: z.ZodString;
|
|
149
|
+
en: z.ZodString;
|
|
150
|
+
}, z.ZodString, "strip">>;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
code: string;
|
|
153
|
+
id: string;
|
|
154
|
+
title: {
|
|
155
|
+
fr: string;
|
|
156
|
+
en: string;
|
|
157
|
+
} & {
|
|
158
|
+
[k: string]: string;
|
|
159
|
+
};
|
|
160
|
+
description: {
|
|
161
|
+
fr: string;
|
|
162
|
+
en: string;
|
|
163
|
+
} & {
|
|
164
|
+
[k: string]: string;
|
|
165
|
+
};
|
|
166
|
+
controls: {
|
|
167
|
+
fr: string;
|
|
168
|
+
en: string;
|
|
169
|
+
} & {
|
|
170
|
+
[k: string]: string;
|
|
171
|
+
};
|
|
172
|
+
examples: {
|
|
173
|
+
fr: string;
|
|
174
|
+
en: string;
|
|
175
|
+
} & {
|
|
176
|
+
[k: string]: string;
|
|
177
|
+
};
|
|
178
|
+
}, {
|
|
179
|
+
code: string;
|
|
180
|
+
id: string;
|
|
181
|
+
title: {
|
|
182
|
+
fr: string;
|
|
183
|
+
en: string;
|
|
184
|
+
} & {
|
|
185
|
+
[k: string]: string;
|
|
186
|
+
};
|
|
187
|
+
description: {
|
|
188
|
+
fr: string;
|
|
189
|
+
en: string;
|
|
190
|
+
} & {
|
|
191
|
+
[k: string]: string;
|
|
192
|
+
};
|
|
193
|
+
controls: {
|
|
194
|
+
fr: string;
|
|
195
|
+
en: string;
|
|
196
|
+
} & {
|
|
197
|
+
[k: string]: string;
|
|
198
|
+
};
|
|
199
|
+
examples: {
|
|
200
|
+
fr: string;
|
|
201
|
+
en: string;
|
|
202
|
+
} & {
|
|
203
|
+
[k: string]: string;
|
|
204
|
+
};
|
|
205
|
+
}>;
|
|
206
|
+
type AutonomyLevel = z.infer<typeof AutonomyLevelSchema>;
|
|
207
|
+
declare const DimensionSchema: z.ZodObject<{
|
|
208
|
+
id: z.ZodString;
|
|
209
|
+
code: z.ZodString;
|
|
210
|
+
title: z.ZodObject<{
|
|
211
|
+
fr: z.ZodString;
|
|
212
|
+
en: z.ZodString;
|
|
213
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
214
|
+
fr: z.ZodString;
|
|
215
|
+
en: z.ZodString;
|
|
216
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
217
|
+
fr: z.ZodString;
|
|
218
|
+
en: z.ZodString;
|
|
219
|
+
}, z.ZodString, "strip">>;
|
|
220
|
+
description: z.ZodObject<{
|
|
221
|
+
fr: z.ZodString;
|
|
222
|
+
en: z.ZodString;
|
|
223
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
224
|
+
fr: z.ZodString;
|
|
225
|
+
en: z.ZodString;
|
|
226
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
227
|
+
fr: z.ZodString;
|
|
228
|
+
en: z.ZodString;
|
|
229
|
+
}, z.ZodString, "strip">>;
|
|
230
|
+
practices: z.ZodObject<{
|
|
231
|
+
fr: z.ZodString;
|
|
232
|
+
en: z.ZodString;
|
|
233
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
234
|
+
fr: z.ZodString;
|
|
235
|
+
en: z.ZodString;
|
|
236
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
237
|
+
fr: z.ZodString;
|
|
238
|
+
en: z.ZodString;
|
|
239
|
+
}, z.ZodString, "strip">>;
|
|
240
|
+
}, "strip", z.ZodTypeAny, {
|
|
241
|
+
code: string;
|
|
242
|
+
id: string;
|
|
243
|
+
title: {
|
|
244
|
+
fr: string;
|
|
245
|
+
en: string;
|
|
246
|
+
} & {
|
|
247
|
+
[k: string]: string;
|
|
248
|
+
};
|
|
249
|
+
description: {
|
|
250
|
+
fr: string;
|
|
251
|
+
en: string;
|
|
252
|
+
} & {
|
|
253
|
+
[k: string]: string;
|
|
254
|
+
};
|
|
255
|
+
practices: {
|
|
256
|
+
fr: string;
|
|
257
|
+
en: string;
|
|
258
|
+
} & {
|
|
259
|
+
[k: string]: string;
|
|
260
|
+
};
|
|
261
|
+
}, {
|
|
262
|
+
code: string;
|
|
263
|
+
id: string;
|
|
264
|
+
title: {
|
|
265
|
+
fr: string;
|
|
266
|
+
en: string;
|
|
267
|
+
} & {
|
|
268
|
+
[k: string]: string;
|
|
269
|
+
};
|
|
270
|
+
description: {
|
|
271
|
+
fr: string;
|
|
272
|
+
en: string;
|
|
273
|
+
} & {
|
|
274
|
+
[k: string]: string;
|
|
275
|
+
};
|
|
276
|
+
practices: {
|
|
277
|
+
fr: string;
|
|
278
|
+
en: string;
|
|
279
|
+
} & {
|
|
280
|
+
[k: string]: string;
|
|
281
|
+
};
|
|
282
|
+
}>;
|
|
283
|
+
type Dimension = z.infer<typeof DimensionSchema>;
|
|
284
|
+
declare const DdaoSchema: z.ZodObject<{
|
|
285
|
+
title: z.ZodObject<{
|
|
286
|
+
fr: z.ZodString;
|
|
287
|
+
en: z.ZodString;
|
|
288
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
289
|
+
fr: z.ZodString;
|
|
290
|
+
en: z.ZodString;
|
|
291
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
292
|
+
fr: z.ZodString;
|
|
293
|
+
en: z.ZodString;
|
|
294
|
+
}, z.ZodString, "strip">>;
|
|
295
|
+
expansion: z.ZodLiteral<"Delegated Decision Agent Officer">;
|
|
296
|
+
definition: z.ZodObject<{
|
|
297
|
+
fr: z.ZodString;
|
|
298
|
+
en: z.ZodString;
|
|
299
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
300
|
+
fr: z.ZodString;
|
|
301
|
+
en: z.ZodString;
|
|
302
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
303
|
+
fr: z.ZodString;
|
|
304
|
+
en: z.ZodString;
|
|
305
|
+
}, z.ZodString, "strip">>;
|
|
306
|
+
responsibilities: z.ZodObject<{
|
|
307
|
+
fr: z.ZodString;
|
|
308
|
+
en: z.ZodString;
|
|
309
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
310
|
+
fr: z.ZodString;
|
|
311
|
+
en: z.ZodString;
|
|
312
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
313
|
+
fr: z.ZodString;
|
|
314
|
+
en: z.ZodString;
|
|
315
|
+
}, z.ZodString, "strip">>;
|
|
316
|
+
not_to_be_confused_with: z.ZodObject<{
|
|
317
|
+
fr: z.ZodString;
|
|
318
|
+
en: z.ZodString;
|
|
319
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
320
|
+
fr: z.ZodString;
|
|
321
|
+
en: z.ZodString;
|
|
322
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
323
|
+
fr: z.ZodString;
|
|
324
|
+
en: z.ZodString;
|
|
325
|
+
}, z.ZodString, "strip">>;
|
|
326
|
+
}, "strip", z.ZodTypeAny, {
|
|
327
|
+
title: {
|
|
328
|
+
fr: string;
|
|
329
|
+
en: string;
|
|
330
|
+
} & {
|
|
331
|
+
[k: string]: string;
|
|
332
|
+
};
|
|
333
|
+
expansion: "Delegated Decision Agent Officer";
|
|
334
|
+
definition: {
|
|
335
|
+
fr: string;
|
|
336
|
+
en: string;
|
|
337
|
+
} & {
|
|
338
|
+
[k: string]: string;
|
|
339
|
+
};
|
|
340
|
+
responsibilities: {
|
|
341
|
+
fr: string;
|
|
342
|
+
en: string;
|
|
343
|
+
} & {
|
|
344
|
+
[k: string]: string;
|
|
345
|
+
};
|
|
346
|
+
not_to_be_confused_with: {
|
|
347
|
+
fr: string;
|
|
348
|
+
en: string;
|
|
349
|
+
} & {
|
|
350
|
+
[k: string]: string;
|
|
351
|
+
};
|
|
352
|
+
}, {
|
|
353
|
+
title: {
|
|
354
|
+
fr: string;
|
|
355
|
+
en: string;
|
|
356
|
+
} & {
|
|
357
|
+
[k: string]: string;
|
|
358
|
+
};
|
|
359
|
+
expansion: "Delegated Decision Agent Officer";
|
|
360
|
+
definition: {
|
|
361
|
+
fr: string;
|
|
362
|
+
en: string;
|
|
363
|
+
} & {
|
|
364
|
+
[k: string]: string;
|
|
365
|
+
};
|
|
366
|
+
responsibilities: {
|
|
367
|
+
fr: string;
|
|
368
|
+
en: string;
|
|
369
|
+
} & {
|
|
370
|
+
[k: string]: string;
|
|
371
|
+
};
|
|
372
|
+
not_to_be_confused_with: {
|
|
373
|
+
fr: string;
|
|
374
|
+
en: string;
|
|
375
|
+
} & {
|
|
376
|
+
[k: string]: string;
|
|
377
|
+
};
|
|
378
|
+
}>;
|
|
379
|
+
type Ddao = z.infer<typeof DdaoSchema>;
|
|
380
|
+
declare const RelatedArticleSchema: z.ZodObject<{
|
|
381
|
+
regulation: z.ZodEnum<["ai-act", "gdpr", "dora", "nis2", "iso-42001"]>;
|
|
382
|
+
article: z.ZodString;
|
|
383
|
+
paragraph: z.ZodOptional<z.ZodString>;
|
|
384
|
+
}, "strip", z.ZodTypeAny, {
|
|
385
|
+
regulation: "ai-act" | "gdpr" | "dora" | "nis2" | "iso-42001";
|
|
386
|
+
article: string;
|
|
387
|
+
paragraph?: string | undefined;
|
|
388
|
+
}, {
|
|
389
|
+
regulation: "ai-act" | "gdpr" | "dora" | "nis2" | "iso-42001";
|
|
390
|
+
article: string;
|
|
391
|
+
paragraph?: string | undefined;
|
|
392
|
+
}>;
|
|
393
|
+
declare const FicheFrontmatterSchema: z.ZodObject<{
|
|
394
|
+
code: z.ZodString;
|
|
395
|
+
slug: z.ZodString;
|
|
396
|
+
title: z.ZodString;
|
|
397
|
+
title_en: z.ZodOptional<z.ZodString>;
|
|
398
|
+
order: z.ZodNumber;
|
|
399
|
+
maturity_dimension: z.ZodOptional<z.ZodString>;
|
|
400
|
+
related_principles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
401
|
+
related_articles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
402
|
+
regulation: z.ZodEnum<["ai-act", "gdpr", "dora", "nis2", "iso-42001"]>;
|
|
403
|
+
article: z.ZodString;
|
|
404
|
+
paragraph: z.ZodOptional<z.ZodString>;
|
|
405
|
+
}, "strip", z.ZodTypeAny, {
|
|
406
|
+
regulation: "ai-act" | "gdpr" | "dora" | "nis2" | "iso-42001";
|
|
407
|
+
article: string;
|
|
408
|
+
paragraph?: string | undefined;
|
|
409
|
+
}, {
|
|
410
|
+
regulation: "ai-act" | "gdpr" | "dora" | "nis2" | "iso-42001";
|
|
411
|
+
article: string;
|
|
412
|
+
paragraph?: string | undefined;
|
|
413
|
+
}>, "many">>;
|
|
414
|
+
related_fiches: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
415
|
+
keywords: z.ZodArray<z.ZodString, "many">;
|
|
416
|
+
version: z.ZodString;
|
|
417
|
+
pdf_url: z.ZodOptional<z.ZodString>;
|
|
418
|
+
}, "strip", z.ZodTypeAny, {
|
|
419
|
+
code: string;
|
|
420
|
+
title: string;
|
|
421
|
+
slug: string;
|
|
422
|
+
order: number;
|
|
423
|
+
keywords: string[];
|
|
424
|
+
version: string;
|
|
425
|
+
related_fiches?: string[] | undefined;
|
|
426
|
+
title_en?: string | undefined;
|
|
427
|
+
maturity_dimension?: string | undefined;
|
|
428
|
+
related_principles?: string[] | undefined;
|
|
429
|
+
related_articles?: {
|
|
430
|
+
regulation: "ai-act" | "gdpr" | "dora" | "nis2" | "iso-42001";
|
|
431
|
+
article: string;
|
|
432
|
+
paragraph?: string | undefined;
|
|
433
|
+
}[] | undefined;
|
|
434
|
+
pdf_url?: string | undefined;
|
|
435
|
+
}, {
|
|
436
|
+
code: string;
|
|
437
|
+
title: string;
|
|
438
|
+
slug: string;
|
|
439
|
+
order: number;
|
|
440
|
+
keywords: string[];
|
|
441
|
+
version: string;
|
|
442
|
+
related_fiches?: string[] | undefined;
|
|
443
|
+
title_en?: string | undefined;
|
|
444
|
+
maturity_dimension?: string | undefined;
|
|
445
|
+
related_principles?: string[] | undefined;
|
|
446
|
+
related_articles?: {
|
|
447
|
+
regulation: "ai-act" | "gdpr" | "dora" | "nis2" | "iso-42001";
|
|
448
|
+
article: string;
|
|
449
|
+
paragraph?: string | undefined;
|
|
450
|
+
}[] | undefined;
|
|
451
|
+
pdf_url?: string | undefined;
|
|
452
|
+
}>;
|
|
453
|
+
type FicheFrontmatter = z.infer<typeof FicheFrontmatterSchema>;
|
|
454
|
+
interface FicheDocument {
|
|
455
|
+
frontmatter: FicheFrontmatter;
|
|
456
|
+
body: string;
|
|
457
|
+
served_locale: AcfLocale;
|
|
458
|
+
is_fallback: boolean;
|
|
459
|
+
}
|
|
460
|
+
declare const ApplicableDateSchema: z.ZodObject<{
|
|
461
|
+
obligation: z.ZodString;
|
|
462
|
+
date: z.ZodString;
|
|
463
|
+
}, "strip", z.ZodTypeAny, {
|
|
464
|
+
date: string;
|
|
465
|
+
obligation: string;
|
|
466
|
+
}, {
|
|
467
|
+
date: string;
|
|
468
|
+
obligation: string;
|
|
469
|
+
}>;
|
|
470
|
+
declare const GuideFrontmatterSchema: z.ZodObject<{
|
|
471
|
+
regulation: z.ZodEnum<["ai-act", "gdpr", "dora", "nis2", "iso-42001"]>;
|
|
472
|
+
title: z.ZodString;
|
|
473
|
+
title_en: z.ZodOptional<z.ZodString>;
|
|
474
|
+
version: z.ZodString;
|
|
475
|
+
last_update: z.ZodString;
|
|
476
|
+
applicable_dates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
477
|
+
obligation: z.ZodString;
|
|
478
|
+
date: z.ZodString;
|
|
479
|
+
}, "strip", z.ZodTypeAny, {
|
|
480
|
+
date: string;
|
|
481
|
+
obligation: string;
|
|
482
|
+
}, {
|
|
483
|
+
date: string;
|
|
484
|
+
obligation: string;
|
|
485
|
+
}>, "many">>;
|
|
486
|
+
}, "strip", z.ZodTypeAny, {
|
|
487
|
+
title: string;
|
|
488
|
+
regulation: "ai-act" | "gdpr" | "dora" | "nis2" | "iso-42001";
|
|
489
|
+
version: string;
|
|
490
|
+
last_update: string;
|
|
491
|
+
title_en?: string | undefined;
|
|
492
|
+
applicable_dates?: {
|
|
493
|
+
date: string;
|
|
494
|
+
obligation: string;
|
|
495
|
+
}[] | undefined;
|
|
496
|
+
}, {
|
|
497
|
+
title: string;
|
|
498
|
+
regulation: "ai-act" | "gdpr" | "dora" | "nis2" | "iso-42001";
|
|
499
|
+
version: string;
|
|
500
|
+
last_update: string;
|
|
501
|
+
title_en?: string | undefined;
|
|
502
|
+
applicable_dates?: {
|
|
503
|
+
date: string;
|
|
504
|
+
obligation: string;
|
|
505
|
+
}[] | undefined;
|
|
506
|
+
}>;
|
|
507
|
+
type GuideFrontmatter = z.infer<typeof GuideFrontmatterSchema>;
|
|
508
|
+
interface GuideDocument {
|
|
509
|
+
frontmatter: GuideFrontmatter;
|
|
510
|
+
body: string;
|
|
511
|
+
served_locale: AcfLocale;
|
|
512
|
+
is_fallback: boolean;
|
|
513
|
+
}
|
|
514
|
+
declare const GlossaryEntrySchema: z.ZodObject<{
|
|
515
|
+
term: z.ZodString;
|
|
516
|
+
expansion: z.ZodOptional<z.ZodString>;
|
|
517
|
+
definition: z.ZodString;
|
|
518
|
+
related_principles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
519
|
+
related_fiches: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
520
|
+
}, "strip", z.ZodTypeAny, {
|
|
521
|
+
definition: string;
|
|
522
|
+
term: string;
|
|
523
|
+
related_fiches?: string[] | undefined;
|
|
524
|
+
expansion?: string | undefined;
|
|
525
|
+
related_principles?: string[] | undefined;
|
|
526
|
+
}, {
|
|
527
|
+
definition: string;
|
|
528
|
+
term: string;
|
|
529
|
+
related_fiches?: string[] | undefined;
|
|
530
|
+
expansion?: string | undefined;
|
|
531
|
+
related_principles?: string[] | undefined;
|
|
532
|
+
}>;
|
|
533
|
+
type GlossaryEntry = z.infer<typeof GlossaryEntrySchema>;
|
|
534
|
+
declare const WhitepaperSectionSchema: z.ZodObject<{
|
|
535
|
+
slug: z.ZodString;
|
|
536
|
+
title: z.ZodString;
|
|
537
|
+
level: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
538
|
+
body: z.ZodString;
|
|
539
|
+
}, "strip", z.ZodTypeAny, {
|
|
540
|
+
title: string;
|
|
541
|
+
slug: string;
|
|
542
|
+
level: 1 | 2 | 3;
|
|
543
|
+
body: string;
|
|
544
|
+
}, {
|
|
545
|
+
title: string;
|
|
546
|
+
slug: string;
|
|
547
|
+
level: 1 | 2 | 3;
|
|
548
|
+
body: string;
|
|
549
|
+
}>;
|
|
550
|
+
type WhitepaperSection = z.infer<typeof WhitepaperSectionSchema>;
|
|
551
|
+
interface WhitepaperDocument {
|
|
552
|
+
toc: WhitepaperSection[];
|
|
553
|
+
full_body: string;
|
|
554
|
+
served_locale: AcfLocale;
|
|
555
|
+
is_fallback: boolean;
|
|
556
|
+
}
|
|
557
|
+
declare const MetaSchema: z.ZodObject<{
|
|
558
|
+
framework_version: z.ZodString;
|
|
559
|
+
content_build: z.ZodString;
|
|
560
|
+
content_hash: z.ZodString;
|
|
561
|
+
doctrine_signature: z.ZodOptional<z.ZodString>;
|
|
562
|
+
permanent_archive_url: z.ZodString;
|
|
563
|
+
rules_version: z.ZodString;
|
|
564
|
+
locales: z.ZodArray<z.ZodEnum<["fr", "en", "es", "de", "pt", "it", "nl", "ru", "ar", "tr", "ja", "zh", "ko"]>, "many">;
|
|
565
|
+
fallback_locale: z.ZodEnum<["fr", "en", "es", "de", "pt", "it", "nl", "ru", "ar", "tr", "ja", "zh", "ko"]>;
|
|
566
|
+
}, "strip", z.ZodTypeAny, {
|
|
567
|
+
framework_version: string;
|
|
568
|
+
content_build: string;
|
|
569
|
+
content_hash: string;
|
|
570
|
+
permanent_archive_url: string;
|
|
571
|
+
rules_version: string;
|
|
572
|
+
locales: ("fr" | "en" | "es" | "de" | "pt" | "it" | "nl" | "ru" | "ar" | "tr" | "ja" | "zh" | "ko")[];
|
|
573
|
+
fallback_locale: "fr" | "en" | "es" | "de" | "pt" | "it" | "nl" | "ru" | "ar" | "tr" | "ja" | "zh" | "ko";
|
|
574
|
+
doctrine_signature?: string | undefined;
|
|
575
|
+
}, {
|
|
576
|
+
framework_version: string;
|
|
577
|
+
content_build: string;
|
|
578
|
+
content_hash: string;
|
|
579
|
+
permanent_archive_url: string;
|
|
580
|
+
rules_version: string;
|
|
581
|
+
locales: ("fr" | "en" | "es" | "de" | "pt" | "it" | "nl" | "ru" | "ar" | "tr" | "ja" | "zh" | "ko")[];
|
|
582
|
+
fallback_locale: "fr" | "en" | "es" | "de" | "pt" | "it" | "nl" | "ru" | "ar" | "tr" | "ja" | "zh" | "ko";
|
|
583
|
+
doctrine_signature?: string | undefined;
|
|
584
|
+
}>;
|
|
585
|
+
type Meta = z.infer<typeof MetaSchema>;
|
|
586
|
+
type ResolvedContent = {
|
|
587
|
+
kind: "principle";
|
|
588
|
+
data: Principle;
|
|
589
|
+
} | {
|
|
590
|
+
kind: "autonomy_level";
|
|
591
|
+
data: AutonomyLevel;
|
|
592
|
+
} | {
|
|
593
|
+
kind: "dimension";
|
|
594
|
+
data: Dimension;
|
|
595
|
+
} | {
|
|
596
|
+
kind: "ddao";
|
|
597
|
+
data: Ddao;
|
|
598
|
+
} | {
|
|
599
|
+
kind: "fiche";
|
|
600
|
+
data: FicheDocument;
|
|
601
|
+
} | {
|
|
602
|
+
kind: "guide";
|
|
603
|
+
data: GuideDocument;
|
|
604
|
+
} | {
|
|
605
|
+
kind: "whitepaper";
|
|
606
|
+
data: WhitepaperDocument;
|
|
607
|
+
} | {
|
|
608
|
+
kind: "glossary_entry";
|
|
609
|
+
data: GlossaryEntry;
|
|
610
|
+
} | {
|
|
611
|
+
kind: "glossary_index";
|
|
612
|
+
data: GlossaryEntry[];
|
|
613
|
+
} | {
|
|
614
|
+
kind: "meta";
|
|
615
|
+
data: Meta;
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
interface ContentLoaderOptions {
|
|
619
|
+
contentRoot: string;
|
|
620
|
+
}
|
|
621
|
+
declare class ContentLoader {
|
|
622
|
+
private readonly root;
|
|
623
|
+
private metaCache;
|
|
624
|
+
constructor(opts: ContentLoaderOptions);
|
|
625
|
+
loadMeta(): Promise<Meta>;
|
|
626
|
+
loadPrinciples(): Promise<Principle[]>;
|
|
627
|
+
loadAutonomyLevels(): Promise<AutonomyLevel[]>;
|
|
628
|
+
loadDimensions(): Promise<Dimension[]>;
|
|
629
|
+
loadDdao(): Promise<Ddao>;
|
|
630
|
+
/**
|
|
631
|
+
* Load a fiche by code with locale fallback chain.
|
|
632
|
+
*
|
|
633
|
+
* **Caller contract:** `code` MUST be pre-validated against `/^ACF-(0[0-9]|1[0-6])$/`
|
|
634
|
+
* before calling this method. ContentLoader does NOT sanitise the code and relies
|
|
635
|
+
* on Zod validation at the tool boundary (Phase 5+). Skipping pre-validation is a
|
|
636
|
+
* path traversal risk.
|
|
637
|
+
*/
|
|
638
|
+
loadFiche(code: string, locale: AcfLocale): Promise<FicheDocument>;
|
|
639
|
+
/**
|
|
640
|
+
* Load a regulatory guide markdown with locale fallback chain.
|
|
641
|
+
*
|
|
642
|
+
* **Caller contract:** `regulation` MUST be pre-validated against the
|
|
643
|
+
* `["ai-act", "gdpr", "dora", "nis2", "iso-42001"]` enum before calling
|
|
644
|
+
* this method. ContentLoader does NOT sanitise the regulation string.
|
|
645
|
+
*/
|
|
646
|
+
loadGuide(regulation: string, locale: AcfLocale): Promise<GuideDocument>;
|
|
647
|
+
loadGlossary(locale: AcfLocale): Promise<{
|
|
648
|
+
entries: GlossaryEntry[];
|
|
649
|
+
served_locale: AcfLocale;
|
|
650
|
+
is_fallback: boolean;
|
|
651
|
+
}>;
|
|
652
|
+
/**
|
|
653
|
+
* Lookup a glossary entry by `term` or `expansion` (case-insensitive).
|
|
654
|
+
*
|
|
655
|
+
* **Caller contract:** `term` is matched against entry strings, not used as a
|
|
656
|
+
* file path, so path traversal is not a concern here. But callers should
|
|
657
|
+
* still validate length/format to avoid pathological inputs.
|
|
658
|
+
*
|
|
659
|
+
* Returns null if no entry matches.
|
|
660
|
+
*/
|
|
661
|
+
loadGlossaryEntry(term: string, locale: AcfLocale): Promise<{
|
|
662
|
+
entry: GlossaryEntry;
|
|
663
|
+
served_locale: AcfLocale;
|
|
664
|
+
is_fallback: boolean;
|
|
665
|
+
} | null>;
|
|
666
|
+
/**
|
|
667
|
+
* Load the whitepaper raw markdown body with locale fallback chain.
|
|
668
|
+
*
|
|
669
|
+
* Returns the file contents AS-IS. If the file contains a YAML frontmatter
|
|
670
|
+
* block, that block is included verbatim in `body` (this method does NOT
|
|
671
|
+
* strip it). The Phase 5 whitepaper section parser is responsible for
|
|
672
|
+
* walking H1/H2 and discarding any frontmatter prefix.
|
|
673
|
+
*/
|
|
674
|
+
loadWhitepaperRaw(locale: AcfLocale): Promise<{
|
|
675
|
+
body: string;
|
|
676
|
+
served_locale: AcfLocale;
|
|
677
|
+
is_fallback: boolean;
|
|
678
|
+
}>;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
interface RulesLoaderOptions {
|
|
682
|
+
rulesRoot: string;
|
|
683
|
+
}
|
|
684
|
+
declare class RulesLoader {
|
|
685
|
+
private readonly root;
|
|
686
|
+
constructor(opts: RulesLoaderOptions);
|
|
687
|
+
private loadJson;
|
|
688
|
+
loadRulesMeta(): Promise<{
|
|
689
|
+
last_update: string;
|
|
690
|
+
rules_version: string;
|
|
691
|
+
applicable_jurisdictions: string[];
|
|
692
|
+
}>;
|
|
693
|
+
loadAiActAnnexIII(): Promise<{
|
|
694
|
+
version: string;
|
|
695
|
+
last_update: string;
|
|
696
|
+
applicable_dates: {
|
|
697
|
+
category: string;
|
|
698
|
+
applicable_from: string;
|
|
699
|
+
deferred: boolean;
|
|
700
|
+
}[];
|
|
701
|
+
categories: {
|
|
702
|
+
id: string;
|
|
703
|
+
title: string;
|
|
704
|
+
fiches: string[];
|
|
705
|
+
triggers: {
|
|
706
|
+
negation_aware: boolean;
|
|
707
|
+
structured_flags?: string[] | undefined;
|
|
708
|
+
keyword_patterns?: string[] | undefined;
|
|
709
|
+
enum_match?: Record<string, string[]> | undefined;
|
|
710
|
+
};
|
|
711
|
+
obligations: string[];
|
|
712
|
+
confidence_base: "low" | "medium" | "high";
|
|
713
|
+
requires_human_review: true;
|
|
714
|
+
}[];
|
|
715
|
+
}>;
|
|
716
|
+
loadAiActAnnexI(): Promise<{
|
|
717
|
+
version: string;
|
|
718
|
+
last_update: string;
|
|
719
|
+
applicable_dates: {
|
|
720
|
+
category: string;
|
|
721
|
+
applicable_from: string;
|
|
722
|
+
deferred: boolean;
|
|
723
|
+
}[];
|
|
724
|
+
categories: {
|
|
725
|
+
id: string;
|
|
726
|
+
title: string;
|
|
727
|
+
fiches: string[];
|
|
728
|
+
triggers: {
|
|
729
|
+
negation_aware: boolean;
|
|
730
|
+
structured_flags?: string[] | undefined;
|
|
731
|
+
keyword_patterns?: string[] | undefined;
|
|
732
|
+
enum_match?: Record<string, string[]> | undefined;
|
|
733
|
+
};
|
|
734
|
+
obligations: string[];
|
|
735
|
+
confidence_base: "low" | "medium" | "high";
|
|
736
|
+
requires_human_review: true;
|
|
737
|
+
}[];
|
|
738
|
+
}>;
|
|
739
|
+
loadGpaiTriggers(): Promise<{
|
|
740
|
+
version: string;
|
|
741
|
+
last_update: string;
|
|
742
|
+
triggers: {
|
|
743
|
+
negation_aware: boolean;
|
|
744
|
+
structured_flags?: string[] | undefined;
|
|
745
|
+
keyword_patterns?: string[] | undefined;
|
|
746
|
+
enum_match?: Record<string, string[]> | undefined;
|
|
747
|
+
};
|
|
748
|
+
obligations: {
|
|
749
|
+
article: string;
|
|
750
|
+
requirement: string;
|
|
751
|
+
applicable_date: string;
|
|
752
|
+
systemic_risk_only?: boolean | undefined;
|
|
753
|
+
}[];
|
|
754
|
+
}>;
|
|
755
|
+
loadAutonomyInference(): Promise<{
|
|
756
|
+
version: string;
|
|
757
|
+
last_update: string;
|
|
758
|
+
thresholds: {
|
|
759
|
+
level: "N0" | "N1" | "N2" | "N3";
|
|
760
|
+
rationale_template: string;
|
|
761
|
+
conditions: Record<string, string[]>;
|
|
762
|
+
}[];
|
|
763
|
+
}>;
|
|
764
|
+
loadCriticalityMatrix(): Promise<{
|
|
765
|
+
version: string;
|
|
766
|
+
last_update: string;
|
|
767
|
+
cells: {
|
|
768
|
+
personal_data_level: "none" | "standard" | "sensitive_special";
|
|
769
|
+
financial_exposure: "none" | "low_operation" | "medium_contract" | "high_corporate";
|
|
770
|
+
sector_modifier: number;
|
|
771
|
+
score: "low" | "medium" | "high" | "critical";
|
|
772
|
+
rationale_template: string;
|
|
773
|
+
}[];
|
|
774
|
+
}>;
|
|
775
|
+
loadDdaoControlsMapping(): Promise<{
|
|
776
|
+
version: string;
|
|
777
|
+
last_update: string;
|
|
778
|
+
mappings: {
|
|
779
|
+
level: "N0" | "N1" | "N2" | "N3";
|
|
780
|
+
risk: "low" | "medium" | "high" | "critical";
|
|
781
|
+
recommended_controls: {
|
|
782
|
+
title: string;
|
|
783
|
+
description: string;
|
|
784
|
+
owner_role: "ddao" | "dpo" | "ciso" | "business_owner" | "auditor";
|
|
785
|
+
frequency: "one_time" | "monthly" | "quarterly" | "annual" | "on_event";
|
|
786
|
+
evidence_artifact: string;
|
|
787
|
+
}[];
|
|
788
|
+
ddao_controls: {
|
|
789
|
+
control_id: string;
|
|
790
|
+
control_type: "preventive" | "detective" | "corrective" | "governance";
|
|
791
|
+
fiche_reference: string;
|
|
792
|
+
implementation_note: string;
|
|
793
|
+
}[];
|
|
794
|
+
}[];
|
|
795
|
+
}>;
|
|
796
|
+
loadSignOffMatrix(): Promise<{
|
|
797
|
+
version: string;
|
|
798
|
+
last_update: string;
|
|
799
|
+
rules: {
|
|
800
|
+
personal_data_level: "none" | "standard" | "sensitive_special";
|
|
801
|
+
financial_exposure: "none" | "low_operation" | "medium_contract" | "high_corporate";
|
|
802
|
+
criticality: "low" | "medium" | "high" | "critical";
|
|
803
|
+
required: {
|
|
804
|
+
security: boolean;
|
|
805
|
+
privacy: boolean;
|
|
806
|
+
compliance: boolean;
|
|
807
|
+
legal: boolean;
|
|
808
|
+
business_sponsor: boolean;
|
|
809
|
+
board: boolean;
|
|
810
|
+
};
|
|
811
|
+
}[];
|
|
812
|
+
}>;
|
|
813
|
+
loadGdprQualification(): Promise<{
|
|
814
|
+
version: string;
|
|
815
|
+
last_update: string;
|
|
816
|
+
cases: {
|
|
817
|
+
id: string;
|
|
818
|
+
triggers: {
|
|
819
|
+
negation_aware: boolean;
|
|
820
|
+
structured_flags?: string[] | undefined;
|
|
821
|
+
keyword_patterns?: string[] | undefined;
|
|
822
|
+
enum_match?: Record<string, string[]> | undefined;
|
|
823
|
+
};
|
|
824
|
+
confidence_base: "low" | "medium" | "high";
|
|
825
|
+
rationale_template: string;
|
|
826
|
+
role: "not_applicable" | "controller" | "processor" | "joint_controller";
|
|
827
|
+
}[];
|
|
828
|
+
}>;
|
|
829
|
+
loadAiActRoles(): Promise<{
|
|
830
|
+
version: string;
|
|
831
|
+
last_update: string;
|
|
832
|
+
rules: {
|
|
833
|
+
id: string;
|
|
834
|
+
triggers: {
|
|
835
|
+
negation_aware: boolean;
|
|
836
|
+
structured_flags?: string[] | undefined;
|
|
837
|
+
keyword_patterns?: string[] | undefined;
|
|
838
|
+
enum_match?: Record<string, string[]> | undefined;
|
|
839
|
+
};
|
|
840
|
+
confidence_base: "low" | "medium" | "high";
|
|
841
|
+
rationale_template: string;
|
|
842
|
+
role: "provider" | "deployer" | "importer" | "distributor" | "not_applicable";
|
|
843
|
+
}[];
|
|
844
|
+
}>;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* Flat structure indexed by lunr. One doc per Resource (principle, fiche, guide,
|
|
849
|
+
* glossary entry…). The same doc is added once per locale (FR + EN) — the lunr
|
|
850
|
+
* tokenizer is generic enough; per-locale fine-tuning is V1.1.
|
|
851
|
+
*/
|
|
852
|
+
declare const SearchDocSchema: z.ZodObject<{
|
|
853
|
+
uri: z.ZodString;
|
|
854
|
+
title: z.ZodString;
|
|
855
|
+
snippet: z.ZodString;
|
|
856
|
+
body: z.ZodString;
|
|
857
|
+
category: z.ZodEnum<["principle", "autonomy_level", "dimension", "ddao", "fiche", "guide", "whitepaper", "glossary", "meta"]>;
|
|
858
|
+
locale: z.ZodEnum<["fr", "en"]>;
|
|
859
|
+
}, "strip", z.ZodTypeAny, {
|
|
860
|
+
title: string;
|
|
861
|
+
body: string;
|
|
862
|
+
category: "principle" | "autonomy_level" | "dimension" | "ddao" | "fiche" | "guide" | "whitepaper" | "meta" | "glossary";
|
|
863
|
+
uri: string;
|
|
864
|
+
snippet: string;
|
|
865
|
+
locale: "fr" | "en";
|
|
866
|
+
}, {
|
|
867
|
+
title: string;
|
|
868
|
+
body: string;
|
|
869
|
+
category: "principle" | "autonomy_level" | "dimension" | "ddao" | "fiche" | "guide" | "whitepaper" | "meta" | "glossary";
|
|
870
|
+
uri: string;
|
|
871
|
+
snippet: string;
|
|
872
|
+
locale: "fr" | "en";
|
|
873
|
+
}>;
|
|
874
|
+
type SearchDoc = z.infer<typeof SearchDocSchema>;
|
|
875
|
+
|
|
876
|
+
interface SearchInput {
|
|
877
|
+
query: string;
|
|
878
|
+
scope: "all" | "framework" | "fiche" | "guide" | "whitepaper" | "glossary";
|
|
879
|
+
locale: AcfLocale;
|
|
880
|
+
limit: number;
|
|
881
|
+
}
|
|
882
|
+
interface SearchHit {
|
|
883
|
+
uri: string;
|
|
884
|
+
title: string;
|
|
885
|
+
snippet: string;
|
|
886
|
+
score: number;
|
|
887
|
+
category: SearchDoc["category"];
|
|
888
|
+
locale: AcfLocale;
|
|
889
|
+
}
|
|
890
|
+
interface SerialisedIndex {
|
|
891
|
+
index: object;
|
|
892
|
+
docs: Record<string, SearchDoc>;
|
|
893
|
+
built_at: string;
|
|
894
|
+
doc_count: number;
|
|
895
|
+
}
|
|
896
|
+
declare class SearchEngine {
|
|
897
|
+
private readonly idx;
|
|
898
|
+
private readonly docs;
|
|
899
|
+
private constructor();
|
|
900
|
+
static fromFile(file: string): Promise<SearchEngine>;
|
|
901
|
+
static fromMemory(serialised: SerialisedIndex): SearchEngine;
|
|
902
|
+
/**
|
|
903
|
+
* Normalise a query string the same way lunr normalises indexed tokens:
|
|
904
|
+
* - strip combining diacritics (é → e, ü → u, ç → c, etc.)
|
|
905
|
+
* - lower-case
|
|
906
|
+
* This ensures "souveraineté" matches the stored token "souverainete".
|
|
907
|
+
*/
|
|
908
|
+
private static normaliseQuery;
|
|
909
|
+
search(input: SearchInput): SearchHit[];
|
|
910
|
+
private matchesScope;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
interface AcfRegistry {
|
|
914
|
+
content: ContentLoader;
|
|
915
|
+
rules: RulesLoader;
|
|
916
|
+
search: SearchEngine;
|
|
917
|
+
meta: Meta;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
interface CreateAcfServerOptions {
|
|
921
|
+
contentRoot: string;
|
|
922
|
+
rulesRoot: string;
|
|
923
|
+
indexPath: string;
|
|
924
|
+
}
|
|
925
|
+
declare const ACF_MCP_NAME = "acf-mcp";
|
|
926
|
+
declare function createAcfServer(opts: CreateAcfServerOptions): Promise<{
|
|
927
|
+
server: Server;
|
|
928
|
+
registry: AcfRegistry;
|
|
929
|
+
}>;
|
|
930
|
+
|
|
931
|
+
export { type AcfLocale as A, type CreateAcfServerOptions as C, type Ddao as D, type FicheDocument as F, type GlossaryEntry as G, type LocalizedString as L, type Meta as M, type Principle as P, RelatedArticleSchema as R, SUPPORTED_LOCALES as S, type WhitepaperDocument as W, ACF_MCP_NAME as a, AcfLocaleSchema as b, type AcfRegistry as c, ApplicableDateSchema as d, type AutonomyLevel as e, AutonomyLevelSchema as f, DdaoSchema as g, type Dimension as h, DimensionSchema as i, type FicheFrontmatter as j, FicheFrontmatterSchema as k, GlossaryEntrySchema as l, type GuideDocument as m, type GuideFrontmatter as n, GuideFrontmatterSchema as o, LocalizedStringSchema as p, MetaSchema as q, PrincipleSchema as r, type ResolvedContent as s, type WhitepaperSection as t, WhitepaperSectionSchema as u, createAcfServer as v };
|