@contractspec/example.policy-safe-knowledge-assistant 1.46.1 → 1.48.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.
Files changed (50) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +50 -30
  2. package/.turbo/turbo-build.log +49 -29
  3. package/CHANGELOG.md +66 -0
  4. package/README.md +7 -8
  5. package/dist/example.d.ts +2 -2
  6. package/dist/example.d.ts.map +1 -1
  7. package/dist/example.js +5 -3
  8. package/dist/example.js.map +1 -1
  9. package/dist/handlers/index.d.ts +2 -0
  10. package/dist/handlers/index.js +3 -0
  11. package/dist/handlers/policy-safe-knowledge-assistant.handlers.d.ts +127 -0
  12. package/dist/handlers/policy-safe-knowledge-assistant.handlers.d.ts.map +1 -0
  13. package/dist/handlers/policy-safe-knowledge-assistant.handlers.js +264 -0
  14. package/dist/handlers/policy-safe-knowledge-assistant.handlers.js.map +1 -0
  15. package/dist/index.d.ts +5 -2
  16. package/dist/index.js +5 -2
  17. package/dist/orchestrator/buildAnswer.js.map +1 -1
  18. package/dist/policy-safe-knowledge-assistant.feature.d.ts +7 -0
  19. package/dist/policy-safe-knowledge-assistant.feature.d.ts.map +1 -0
  20. package/dist/{feature.js → policy-safe-knowledge-assistant.feature.js} +6 -4
  21. package/dist/policy-safe-knowledge-assistant.feature.js.map +1 -0
  22. package/dist/seeders/index.d.ts +10 -0
  23. package/dist/seeders/index.d.ts.map +1 -0
  24. package/dist/seeders/index.js +16 -0
  25. package/dist/seeders/index.js.map +1 -0
  26. package/dist/ui/PolicySafeKnowledgeAssistantDashboard.d.ts +7 -0
  27. package/dist/ui/PolicySafeKnowledgeAssistantDashboard.d.ts.map +1 -0
  28. package/dist/ui/PolicySafeKnowledgeAssistantDashboard.js +231 -0
  29. package/dist/ui/PolicySafeKnowledgeAssistantDashboard.js.map +1 -0
  30. package/dist/ui/hooks/usePolicySafeKnowledgeAssistant.d.ts +55 -0
  31. package/dist/ui/hooks/usePolicySafeKnowledgeAssistant.d.ts.map +1 -0
  32. package/dist/ui/hooks/usePolicySafeKnowledgeAssistant.js +193 -0
  33. package/dist/ui/hooks/usePolicySafeKnowledgeAssistant.js.map +1 -0
  34. package/dist/ui/index.d.ts +2 -0
  35. package/dist/ui/index.js +3 -0
  36. package/package.json +27 -15
  37. package/src/example.ts +4 -4
  38. package/src/handlers/index.ts +1 -0
  39. package/src/handlers/policy-safe-knowledge-assistant.handlers.ts +476 -0
  40. package/src/index.ts +3 -1
  41. package/src/{feature.ts → policy-safe-knowledge-assistant.feature.ts} +3 -3
  42. package/src/seeders/index.ts +20 -0
  43. package/src/ui/PolicySafeKnowledgeAssistantDashboard.tsx +206 -0
  44. package/src/ui/hooks/usePolicySafeKnowledgeAssistant.ts +229 -0
  45. package/src/ui/index.ts +1 -0
  46. package/tsconfig.tsbuildinfo +1 -1
  47. package/IMPLEMENTATION_SKETCH.md +0 -40
  48. package/dist/feature.d.ts +0 -7
  49. package/dist/feature.d.ts.map +0 -1
  50. package/dist/feature.js.map +0 -1
@@ -0,0 +1,476 @@
1
+ /**
2
+ * Runtime-local handlers for the Policy-safe Knowledge Assistant template.
3
+ *
4
+ * These handlers are intentionally minimal and deterministic:
5
+ * - No external LLM calls
6
+ * - No web fetching as primary truth
7
+ * - Answers are derived from KB snapshots and must include citations
8
+ */
9
+ import type { DatabasePort, DbRow } from '@contractspec/lib.runtime-sandbox';
10
+ import { web } from '@contractspec/lib.runtime-sandbox';
11
+ const { generateId } = web;
12
+
13
+ import { buildPolicySafeAnswer } from '../orchestrator/buildAnswer';
14
+
15
+ type AllowedScope = 'education_only' | 'generic_info' | 'escalation_required';
16
+ type RiskLevel = 'low' | 'medium' | 'high';
17
+ type ReviewRole = 'curator' | 'expert';
18
+
19
+ interface UserContextRow extends Record<string, unknown> {
20
+ projectId: string;
21
+ locale: string;
22
+ jurisdiction: string;
23
+ allowedScope: AllowedScope;
24
+ kbSnapshotId: string | null;
25
+ }
26
+
27
+ interface RuleRow extends Record<string, unknown> {
28
+ id: string;
29
+ projectId: string;
30
+ jurisdiction: string;
31
+ topicKey: string;
32
+ }
33
+
34
+ interface RuleVersionRow extends Record<string, unknown> {
35
+ id: string;
36
+ ruleId: string;
37
+ jurisdiction: string;
38
+ topicKey: string;
39
+ version: number;
40
+ content: string;
41
+ status: string;
42
+ sourceRefsJson: string;
43
+ approvedBy: string | null;
44
+ approvedAt: string | null;
45
+ createdAt: string;
46
+ }
47
+
48
+ interface SnapshotRow extends Record<string, unknown> {
49
+ id: string;
50
+ jurisdiction: string;
51
+ asOfDate: string;
52
+ includedRuleVersionIdsJson: string;
53
+ publishedAt: string;
54
+ }
55
+
56
+ interface ChangeCandidateRow extends Record<string, unknown> {
57
+ id: string;
58
+ projectId: string;
59
+ jurisdiction: string;
60
+ detectedAt: string;
61
+ diffSummary: string;
62
+ riskLevel: RiskLevel;
63
+ proposedRuleVersionIdsJson: string;
64
+ }
65
+
66
+ interface ReviewTaskRow extends Record<string, unknown> {
67
+ id: string;
68
+ changeCandidateId: string;
69
+ status: string;
70
+ assignedRole: ReviewRole;
71
+ decision: string | null;
72
+ decidedAt: string | null;
73
+ decidedBy: string | null;
74
+ }
75
+
76
+ function parseJsonArray(value: string | null): string[] {
77
+ if (!value) return [];
78
+ try {
79
+ const parsed = JSON.parse(value) as unknown;
80
+ return Array.isArray(parsed)
81
+ ? parsed.filter((v) => typeof v === 'string')
82
+ : [];
83
+ } catch {
84
+ return [];
85
+ }
86
+ }
87
+
88
+ function nowIso(): string {
89
+ return new Date().toISOString();
90
+ }
91
+
92
+ export function createPolicySafeKnowledgeAssistantHandlers(db: DatabasePort) {
93
+ async function getUserContext(input: { projectId: string }) {
94
+ const result = await db.query(
95
+ `SELECT * FROM psa_user_context WHERE "projectId" = $1 LIMIT 1`,
96
+ [input.projectId]
97
+ );
98
+ const row = result.rows[0] as UserContextRow | undefined;
99
+ if (!row) {
100
+ return {
101
+ projectId: input.projectId,
102
+ locale: 'en-GB',
103
+ jurisdiction: 'EU',
104
+ allowedScope: 'education_only' as const,
105
+ kbSnapshotId: null as string | null,
106
+ };
107
+ }
108
+ return {
109
+ projectId: row.projectId,
110
+ locale: row.locale,
111
+ jurisdiction: row.jurisdiction,
112
+ allowedScope: row.allowedScope,
113
+ kbSnapshotId: row.kbSnapshotId,
114
+ };
115
+ }
116
+
117
+ async function setUserContext(input: {
118
+ projectId: string;
119
+ locale: string;
120
+ jurisdiction: string;
121
+ allowedScope: AllowedScope;
122
+ }) {
123
+ const existing = await db.query(
124
+ `SELECT "projectId" FROM psa_user_context WHERE "projectId" = $1 LIMIT 1`,
125
+ [input.projectId]
126
+ );
127
+ if (existing.rows.length) {
128
+ await db.execute(
129
+ `UPDATE psa_user_context SET locale = $1, jurisdiction = $2, "allowedScope" = $3 WHERE "projectId" = $4`,
130
+ [input.locale, input.jurisdiction, input.allowedScope, input.projectId]
131
+ );
132
+ } else {
133
+ await db.execute(
134
+ `INSERT INTO psa_user_context ("projectId", locale, jurisdiction, "allowedScope", "kbSnapshotId") VALUES ($1, $2, $3, $4, $5)`,
135
+ [
136
+ input.projectId,
137
+ input.locale,
138
+ input.jurisdiction,
139
+ input.allowedScope,
140
+ null,
141
+ ]
142
+ );
143
+ }
144
+ return await getUserContext({ projectId: input.projectId });
145
+ }
146
+
147
+ async function createRule(input: {
148
+ projectId: string;
149
+ jurisdiction: string;
150
+ topicKey: string;
151
+ }) {
152
+ const id = generateId('psa_rule');
153
+ await db.execute(
154
+ `INSERT INTO psa_rule (id, "projectId", jurisdiction, "topicKey") VALUES ($1, $2, $3, $4)`,
155
+ [id, input.projectId, input.jurisdiction, input.topicKey]
156
+ );
157
+ return { id, ...input };
158
+ }
159
+
160
+ async function upsertRuleVersion(input: {
161
+ projectId: string;
162
+ ruleId: string;
163
+ content: string;
164
+ sourceRefs: { sourceDocumentId: string; excerpt?: string }[];
165
+ }) {
166
+ if (!input.sourceRefs.length) throw new Error('SOURCE_REFS_REQUIRED');
167
+ const rulesResult = await db.query(
168
+ `SELECT * FROM psa_rule WHERE id = $1 LIMIT 1`,
169
+ [input.ruleId]
170
+ );
171
+ const rule = rulesResult.rows[0] as RuleRow | undefined;
172
+ if (!rule) throw new Error('RULE_NOT_FOUND');
173
+
174
+ const maxResult = await db.query(
175
+ `SELECT MAX(version) as maxVersion FROM psa_rule_version WHERE "ruleId" = $1`,
176
+ [input.ruleId]
177
+ );
178
+ const maxVersion = Number(
179
+ (maxResult.rows[0] as Record<string, unknown>)?.maxVersion ?? 0
180
+ );
181
+ const version = maxVersion + 1;
182
+ const id = generateId('psa_rv');
183
+ const createdAt = nowIso();
184
+ await db.execute(
185
+ `INSERT INTO psa_rule_version (id, "ruleId", jurisdiction, "topicKey", version, content, status, "sourceRefsJson", "approvedBy", "approvedAt", "createdAt")
186
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)`,
187
+ [
188
+ id,
189
+ input.ruleId,
190
+ rule.jurisdiction,
191
+ rule.topicKey,
192
+ version,
193
+ input.content,
194
+ 'draft',
195
+ JSON.stringify(input.sourceRefs),
196
+ null,
197
+ null,
198
+ createdAt,
199
+ ]
200
+ );
201
+ return {
202
+ id,
203
+ ruleId: input.ruleId,
204
+ jurisdiction: rule.jurisdiction,
205
+ topicKey: rule.topicKey,
206
+ version,
207
+ content: input.content,
208
+ status: 'draft',
209
+ sourceRefs: input.sourceRefs,
210
+ createdAt: new Date(createdAt),
211
+ };
212
+ }
213
+
214
+ async function approveRuleVersion(input: {
215
+ ruleVersionId: string;
216
+ approver: string;
217
+ }) {
218
+ const approvedAt = nowIso();
219
+ await db.execute(
220
+ `UPDATE psa_rule_version SET status = $1, "approvedBy" = $2, "approvedAt" = $3 WHERE id = $4`,
221
+ ['approved', input.approver, approvedAt, input.ruleVersionId]
222
+ );
223
+ return { ruleVersionId: input.ruleVersionId, status: 'approved' as const };
224
+ }
225
+
226
+ async function publishSnapshot(input: {
227
+ projectId: string;
228
+ jurisdiction: string;
229
+ asOfDate: Date;
230
+ }) {
231
+ const approvedResult = await db.query(
232
+ `SELECT id FROM psa_rule_version WHERE jurisdiction = $1 AND status = 'approved' ORDER BY id ASC`,
233
+ [input.jurisdiction]
234
+ );
235
+ const includedIds = approvedResult.rows
236
+ .map((r: DbRow) => (r as { id: string }).id)
237
+ .filter(Boolean);
238
+ if (!includedIds.length) throw new Error('NO_APPROVED_RULES');
239
+ const id = generateId('psa_snap');
240
+ const publishedAt = nowIso();
241
+ await db.execute(
242
+ `INSERT INTO psa_snapshot (id, jurisdiction, "asOfDate", "includedRuleVersionIdsJson", "publishedAt")
243
+ VALUES ($1, $2, $3, $4, $5)`,
244
+ [
245
+ id,
246
+ input.jurisdiction,
247
+ input.asOfDate.toISOString(),
248
+ JSON.stringify(includedIds),
249
+ publishedAt,
250
+ ]
251
+ );
252
+ // update user context snapshot pointer (single-profile demo)
253
+ await db.execute(
254
+ `UPDATE psa_user_context SET "kbSnapshotId" = $1 WHERE "projectId" = $2`,
255
+ [id, input.projectId]
256
+ );
257
+ return {
258
+ id,
259
+ jurisdiction: input.jurisdiction,
260
+ includedRuleVersionIds: includedIds,
261
+ };
262
+ }
263
+
264
+ async function searchKb(input: {
265
+ snapshotId: string;
266
+ jurisdiction: string;
267
+ query: string;
268
+ }) {
269
+ const snapResult = await db.query(
270
+ `SELECT * FROM psa_snapshot WHERE id = $1 LIMIT 1`,
271
+ [input.snapshotId]
272
+ );
273
+ const snap = snapResult.rows[0] as SnapshotRow | undefined;
274
+ if (!snap) throw new Error('SNAPSHOT_NOT_FOUND');
275
+ if (snap.jurisdiction !== input.jurisdiction)
276
+ throw new Error('JURISDICTION_MISMATCH');
277
+
278
+ const includedIds = parseJsonArray(snap.includedRuleVersionIdsJson);
279
+ const tokens = input.query
280
+ .toLowerCase()
281
+ .split(/\s+/)
282
+ .map((t) => t.trim())
283
+ .filter(Boolean);
284
+
285
+ const items: { ruleVersionId: string; excerpt?: string }[] = [];
286
+ for (const id of includedIds) {
287
+ const rvResult = await db.query(
288
+ `SELECT * FROM psa_rule_version WHERE id = $1 LIMIT 1`,
289
+ [id]
290
+ );
291
+ const rv = rvResult.rows[0] as RuleVersionRow | undefined;
292
+ if (!rv) continue;
293
+ const hay = rv.content.toLowerCase();
294
+ const match = tokens.length ? tokens.every((t) => hay.includes(t)) : true;
295
+ if (!match) continue;
296
+ items.push({ ruleVersionId: rv.id, excerpt: rv.content.slice(0, 140) });
297
+ }
298
+ return { items };
299
+ }
300
+
301
+ async function answer(input: { projectId: string; question: string }) {
302
+ const ctx = await getUserContext({ projectId: input.projectId });
303
+ if (!ctx.kbSnapshotId) {
304
+ // fail closed: no snapshot id => refuse via gate
305
+ const refused = await buildPolicySafeAnswer({
306
+ envelope: {
307
+ traceId: generateId('trace'),
308
+ locale: ctx.locale,
309
+ kbSnapshotId: '',
310
+ allowedScope: ctx.allowedScope,
311
+ regulatoryContext: { jurisdiction: ctx.jurisdiction },
312
+ },
313
+ question: input.question,
314
+ kbSearch: async () => ({ items: [] }),
315
+ });
316
+ return refused;
317
+ }
318
+ return await buildPolicySafeAnswer({
319
+ envelope: {
320
+ traceId: generateId('trace'),
321
+ locale: ctx.locale,
322
+ kbSnapshotId: ctx.kbSnapshotId,
323
+ allowedScope: ctx.allowedScope,
324
+ regulatoryContext: { jurisdiction: ctx.jurisdiction },
325
+ },
326
+ question: input.question,
327
+ kbSearch: async (q) => await searchKb(q),
328
+ });
329
+ }
330
+
331
+ async function createChangeCandidate(input: {
332
+ projectId: string;
333
+ jurisdiction: string;
334
+ diffSummary: string;
335
+ riskLevel: RiskLevel;
336
+ proposedRuleVersionIds: string[];
337
+ }) {
338
+ const id = generateId('psa_change');
339
+ await db.execute(
340
+ `INSERT INTO psa_change_candidate (id, "projectId", jurisdiction, "detectedAt", "diffSummary", "riskLevel", "proposedRuleVersionIdsJson")
341
+ VALUES ($1, $2, $3, $4, $5, $6, $7)`,
342
+ [
343
+ id,
344
+ input.projectId,
345
+ input.jurisdiction,
346
+ nowIso(),
347
+ input.diffSummary,
348
+ input.riskLevel,
349
+ JSON.stringify(input.proposedRuleVersionIds),
350
+ ]
351
+ );
352
+ return { id };
353
+ }
354
+
355
+ async function createReviewTask(input: { changeCandidateId: string }) {
356
+ const candResult = await db.query(
357
+ `SELECT * FROM psa_change_candidate WHERE id = $1 LIMIT 1`,
358
+ [input.changeCandidateId]
359
+ );
360
+ const candidate = candResult.rows[0] as ChangeCandidateRow | undefined;
361
+ if (!candidate) throw new Error('CHANGE_CANDIDATE_NOT_FOUND');
362
+ const assignedRole: ReviewRole =
363
+ candidate.riskLevel === 'high' ? 'expert' : 'curator';
364
+ const id = generateId('psa_review');
365
+ await db.execute(
366
+ `INSERT INTO psa_review_task (id, "changeCandidateId", status, "assignedRole", decision, "decidedAt", "decidedBy")
367
+ VALUES ($1, $2, $3, $4, $5, $6, $7)`,
368
+ [id, input.changeCandidateId, 'open', assignedRole, null, null, null]
369
+ );
370
+ return { id, assignedRole };
371
+ }
372
+
373
+ async function submitDecision(input: {
374
+ reviewTaskId: string;
375
+ decision: 'approve' | 'reject';
376
+ decidedByRole: ReviewRole;
377
+ decidedBy: string;
378
+ }) {
379
+ const reviewResult = await db.query(
380
+ `SELECT * FROM psa_review_task WHERE id = $1 LIMIT 1`,
381
+ [input.reviewTaskId]
382
+ );
383
+ const task = reviewResult.rows[0] as ReviewTaskRow | undefined;
384
+ if (!task) throw new Error('REVIEW_TASK_NOT_FOUND');
385
+
386
+ const candidateResult = await db.query(
387
+ `SELECT * FROM psa_change_candidate WHERE id = $1 LIMIT 1`,
388
+ [task.changeCandidateId]
389
+ );
390
+ const candidate = candidateResult.rows[0] as ChangeCandidateRow | undefined;
391
+ if (!candidate) throw new Error('CHANGE_CANDIDATE_NOT_FOUND');
392
+ if (
393
+ candidate.riskLevel === 'high' &&
394
+ input.decision === 'approve' &&
395
+ input.decidedByRole !== 'expert'
396
+ ) {
397
+ throw new Error('FORBIDDEN_ROLE');
398
+ }
399
+
400
+ const decidedAt = nowIso();
401
+ await db.execute(
402
+ `UPDATE psa_review_task SET status = $1, decision = $2, "decidedAt" = $3, "decidedBy" = $4 WHERE id = $5`,
403
+ [
404
+ 'decided',
405
+ input.decision,
406
+ decidedAt,
407
+ input.decidedBy,
408
+ input.reviewTaskId,
409
+ ]
410
+ );
411
+ return { id: input.reviewTaskId, status: 'decided' as const };
412
+ }
413
+
414
+ async function publishIfReady(input: { jurisdiction: string }) {
415
+ const openResult = await db.query(
416
+ `SELECT COUNT(*) as count FROM psa_review_task WHERE status != 'decided'`,
417
+ []
418
+ );
419
+ const openCount = Number(
420
+ (openResult.rows[0] as Record<string, unknown>)?.count ?? 0
421
+ );
422
+ if (openCount > 0) throw new Error('NOT_READY');
423
+
424
+ // Ensure for each approved review, all proposed rule versions are approved in KB.
425
+ const decidedResult = await db.query(`SELECT * FROM psa_review_task`, []);
426
+ for (const row of decidedResult.rows as ReviewTaskRow[]) {
427
+ if (row.decision !== 'approve') continue;
428
+ const candQueryResult = await db.query(
429
+ `SELECT * FROM psa_change_candidate WHERE id = $1 LIMIT 1`,
430
+ [row.changeCandidateId]
431
+ );
432
+ const cand = candQueryResult.rows[0] as ChangeCandidateRow | undefined;
433
+ if (!cand) continue;
434
+ if (cand.jurisdiction !== input.jurisdiction) continue;
435
+ const proposedIds = parseJsonArray(cand.proposedRuleVersionIdsJson);
436
+ for (const rvId of proposedIds) {
437
+ const rvQueryResult = await db.query(
438
+ `SELECT status FROM psa_rule_version WHERE id = $1 LIMIT 1`,
439
+ [rvId]
440
+ );
441
+ const status = String(
442
+ (rvQueryResult.rows[0] as Record<string, unknown> | undefined)
443
+ ?.status ?? ''
444
+ );
445
+ if (status !== 'approved') throw new Error('NOT_READY');
446
+ }
447
+ }
448
+ return { published: true as const };
449
+ }
450
+
451
+ return {
452
+ // Onboarding
453
+ getUserContext,
454
+ setUserContext,
455
+
456
+ // KB
457
+ createRule,
458
+ upsertRuleVersion,
459
+ approveRuleVersion,
460
+ publishSnapshot,
461
+ searchKb,
462
+
463
+ // Assistant
464
+ answer,
465
+
466
+ // Pipeline
467
+ createChangeCandidate,
468
+ createReviewTask,
469
+ submitDecision,
470
+ publishIfReady,
471
+ };
472
+ }
473
+
474
+ export type PolicySafeKnowledgeAssistantHandlers = ReturnType<
475
+ typeof createPolicySafeKnowledgeAssistantHandlers
476
+ >;
package/src/index.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  /**
2
2
  * Policy-safe Knowledge Assistant (all-in-one template) — spec-first exports.
3
3
  */
4
- export * from './feature';
4
+ export * from './policy-safe-knowledge-assistant.feature';
5
5
  export * from './seed';
6
6
  export * from './orchestrator/buildAnswer';
7
+ export * from './handlers/policy-safe-knowledge-assistant.handlers';
8
+ export * from './ui';
7
9
  export { default as example } from './example';
8
10
 
9
11
  import './docs';
@@ -1,6 +1,6 @@
1
- import type { FeatureModuleSpec } from '@contractspec/lib.contracts';
1
+ import { defineFeature } from '@contractspec/lib.contracts';
2
2
 
3
- export const PolicySafeKnowledgeAssistantFeature: FeatureModuleSpec = {
3
+ export const PolicySafeKnowledgeAssistantFeature = defineFeature({
4
4
  meta: {
5
5
  key: 'policy-safe-knowledge-assistant',
6
6
  version: '1.0.0',
@@ -55,4 +55,4 @@ export const PolicySafeKnowledgeAssistantFeature: FeatureModuleSpec = {
55
55
  { key: 'learning-journey', version: '1.0.0' },
56
56
  ],
57
57
  },
58
- };
58
+ });
@@ -0,0 +1,20 @@
1
+ import type { DatabasePort } from '@contractspec/lib.runtime-sandbox';
2
+
3
+ export async function seedPolicyKnowledgeAssistant(params: {
4
+ projectId: string;
5
+ db: DatabasePort;
6
+ }) {
7
+ const { projectId, db } = params;
8
+
9
+ const existing = await db.query(
10
+ `SELECT COUNT(*) as count FROM psa_user_context WHERE "projectId" = $1`,
11
+ [projectId]
12
+ );
13
+ if ((existing.rows[0]?.count as number) > 0) return;
14
+
15
+ await db.execute(
16
+ `INSERT INTO psa_user_context ("projectId", locale, jurisdiction, "allowedScope")
17
+ VALUES ($1, $2, $3, $4)`,
18
+ [projectId, 'en-GB', 'EU', 'education_only']
19
+ );
20
+ }