@thanh01.pmt/curriculum-kit 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.
Files changed (68) hide show
  1. package/README.md +22 -0
  2. package/dist/ai/index.cjs +4980 -0
  3. package/dist/ai/index.cjs.map +1 -0
  4. package/dist/ai/index.d.cts +1287 -0
  5. package/dist/ai/index.d.ts +1287 -0
  6. package/dist/ai/index.mjs +4924 -0
  7. package/dist/ai/index.mjs.map +1 -0
  8. package/dist/index.cjs +15308 -0
  9. package/dist/index.cjs.map +1 -0
  10. package/dist/index.d.cts +747 -0
  11. package/dist/index.d.ts +747 -0
  12. package/dist/index.mjs +14965 -0
  13. package/dist/index.mjs.map +1 -0
  14. package/dist/media/index.cjs +1238 -0
  15. package/dist/media/index.cjs.map +1 -0
  16. package/dist/media/index.d.cts +254 -0
  17. package/dist/media/index.d.ts +254 -0
  18. package/dist/media/index.mjs +1221 -0
  19. package/dist/media/index.mjs.map +1 -0
  20. package/dist/milestoneBundleGenerator-CbXhs1CP.d.ts +62 -0
  21. package/dist/milestoneBundleGenerator-DrBtHzBO.d.cts +62 -0
  22. package/dist/pipeline/index.cjs +4894 -0
  23. package/dist/pipeline/index.cjs.map +1 -0
  24. package/dist/pipeline/index.d.cts +161 -0
  25. package/dist/pipeline/index.d.ts +161 -0
  26. package/dist/pipeline/index.mjs +4869 -0
  27. package/dist/pipeline/index.mjs.map +1 -0
  28. package/dist/provider-factory-DH3udYlN.d.cts +25 -0
  29. package/dist/provider-factory-DH3udYlN.d.ts +25 -0
  30. package/dist/publishers/index.cjs +575 -0
  31. package/dist/publishers/index.cjs.map +1 -0
  32. package/dist/publishers/index.d.cts +85 -0
  33. package/dist/publishers/index.d.ts +85 -0
  34. package/dist/publishers/index.mjs +561 -0
  35. package/dist/publishers/index.mjs.map +1 -0
  36. package/dist/schemas/index.cjs +1640 -0
  37. package/dist/schemas/index.cjs.map +1 -0
  38. package/dist/schemas/index.d.cts +14194 -0
  39. package/dist/schemas/index.d.ts +14194 -0
  40. package/dist/schemas/index.mjs +1517 -0
  41. package/dist/schemas/index.mjs.map +1 -0
  42. package/dist/standards/index.cjs +910 -0
  43. package/dist/standards/index.cjs.map +1 -0
  44. package/dist/standards/index.d.cts +130 -0
  45. package/dist/standards/index.d.ts +130 -0
  46. package/dist/standards/index.mjs +890 -0
  47. package/dist/standards/index.mjs.map +1 -0
  48. package/dist/standardsCoverageGate-BWAkXY76.d.cts +767 -0
  49. package/dist/standardsCoverageGate-BWAkXY76.d.ts +767 -0
  50. package/dist/storage/index.cjs +595 -0
  51. package/dist/storage/index.cjs.map +1 -0
  52. package/dist/storage/index.d.cts +77 -0
  53. package/dist/storage/index.d.ts +77 -0
  54. package/dist/storage/index.mjs +583 -0
  55. package/dist/storage/index.mjs.map +1 -0
  56. package/dist/streamRunner-C7j5LKon.d.cts +60 -0
  57. package/dist/streamRunner-C7j5LKon.d.ts +60 -0
  58. package/dist/supabasePublisher-C627qXFT.d.cts +63 -0
  59. package/dist/supabasePublisher-C627qXFT.d.ts +63 -0
  60. package/dist/types-BUJGYiep.d.cts +89 -0
  61. package/dist/types-BUJGYiep.d.ts +89 -0
  62. package/dist/workflow/index.cjs +5266 -0
  63. package/dist/workflow/index.cjs.map +1 -0
  64. package/dist/workflow/index.d.cts +295 -0
  65. package/dist/workflow/index.d.ts +295 -0
  66. package/dist/workflow/index.mjs +5216 -0
  67. package/dist/workflow/index.mjs.map +1 -0
  68. package/package.json +105 -0
@@ -0,0 +1,767 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Framework Pack Schema v1.0 — Standards Registry interchange contract.
5
+ *
6
+ * A Framework Pack is a self-contained, schema-validated data bundle describing
7
+ * ONE educational standard/framework (CSTA K-12, NGSS, GDPT 2018, an org's
8
+ * internal standard, ...) in the lowest common denominator that virtually every
9
+ * framework can map onto: a flat list of atomized statements + optional
10
+ * classifications + optional mappings to the Ontora knowledge tree.
11
+ *
12
+ * Design invariants (see docs/ideas/2026-08-29-standards-registry-framework-pack.md):
13
+ * - I1 Pack is DATA, never code. Importing a pack NEVER mutates the Ontora
14
+ * Master Tree — mappings are reference bridges, resolved (not written).
15
+ * - I2 Canonical statement text (verbatim) is immutable ground truth. Derived
16
+ * fields (translations, keywords, bloom hints) carry their own provenance.
17
+ * - I3 IDs are stable forever: keep the official source ID when present, else
18
+ * mint once from content identity (never from row position).
19
+ * - I4 gradeBand is canonical numeric (gradeModel normalizes grades/ages/bands).
20
+ * - I5 Mappings use namespaced targets (ontora:CODE, csta:1B-AP-10, ...) and are
21
+ * OPTIONAL — a pack with zero mappings still works (statement-only mode).
22
+ * - I6 Everything is versioned: specVersion (this contract) vs contentVersion
23
+ * (the framework's own content). Published content versions are immutable.
24
+ */
25
+ /** Two-axis Bloom hint (Anderson & Krathwohl). Matches Ontora's dual-axis usage. */
26
+ declare const BloomHintSchema: z.ZodObject<{
27
+ process: z.ZodEnum<["Remember", "Understand", "Apply", "Analyze", "Evaluate", "Create"]>;
28
+ knowledge: z.ZodOptional<z.ZodEnum<["FACTUAL", "CONCEPTUAL", "PROCEDURAL", "METACOGNITIVE"]>>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ process: "Create" | "Evaluate" | "Remember" | "Understand" | "Apply" | "Analyze";
31
+ knowledge?: "CONCEPTUAL" | "FACTUAL" | "PROCEDURAL" | "METACOGNITIVE" | undefined;
32
+ }, {
33
+ process: "Create" | "Evaluate" | "Remember" | "Understand" | "Apply" | "Analyze";
34
+ knowledge?: "CONCEPTUAL" | "FACTUAL" | "PROCEDURAL" | "METACOGNITIVE" | undefined;
35
+ }>;
36
+ /** How a record entered the pack — drives trust & review requirements. */
37
+ declare const RecordProvenanceSchema: z.ZodObject<{
38
+ method: z.ZodEnum<["source_official", "ai_draft", "minted_from_content", "human", "crosswalk", "imported"]>;
39
+ reviewedBy: z.ZodOptional<z.ZodString>;
40
+ reviewedAt: z.ZodOptional<z.ZodString>;
41
+ note: z.ZodOptional<z.ZodString>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
44
+ note?: string | undefined;
45
+ reviewedBy?: string | undefined;
46
+ reviewedAt?: string | undefined;
47
+ }, {
48
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
49
+ note?: string | undefined;
50
+ reviewedBy?: string | undefined;
51
+ reviewedAt?: string | undefined;
52
+ }>;
53
+ /** Numeric grade band, canonical. [6, 6] = single grade 6; [6, 8] = band. */
54
+ declare const GradeBandSchema: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>;
55
+ /** Optional free-form classification axes (strand, NGSS dimension, "Chủ đề", ...). */
56
+ declare const ClassificationSchema: z.ZodObject<{
57
+ axis: z.ZodString;
58
+ value: z.ZodString;
59
+ }, "strip", z.ZodTypeAny, {
60
+ value: string;
61
+ axis: string;
62
+ }, {
63
+ value: string;
64
+ axis: string;
65
+ }>;
66
+ declare const FrameworkPackManifestSchema: z.ZodObject<{
67
+ /** Immutable pack identifier. Never reused, never renamed. */
68
+ id: z.ZodString;
69
+ name: z.ZodString;
70
+ specVersion: z.ZodLiteral<"1.0">;
71
+ contentVersion: z.ZodString;
72
+ subject: z.ZodString;
73
+ languages: z.ZodArray<z.ZodString, "many">;
74
+ gradeModel: z.ZodObject<{
75
+ type: z.ZodEnum<["grades", "ages", "bands"]>;
76
+ range: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>;
77
+ /** Optional normalization table when type != "grades" (e.g. band "6-8" -> [6,8]). */
78
+ normalization: z.ZodOptional<z.ZodArray<z.ZodObject<{
79
+ from: z.ZodString;
80
+ to: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>;
81
+ }, "strip", z.ZodTypeAny, {
82
+ from: string;
83
+ to: number[];
84
+ }, {
85
+ from: string;
86
+ to: number[];
87
+ }>, "many">>;
88
+ }, "strip", z.ZodTypeAny, {
89
+ type: "grades" | "ages" | "bands";
90
+ range: number[];
91
+ normalization?: {
92
+ from: string;
93
+ to: number[];
94
+ }[] | undefined;
95
+ }, {
96
+ type: "grades" | "ages" | "bands";
97
+ range: number[];
98
+ normalization?: {
99
+ from: string;
100
+ to: number[];
101
+ }[] | undefined;
102
+ }>;
103
+ provenance: z.ZodObject<{
104
+ sourceRef: z.ZodString;
105
+ sourceUrl: z.ZodOptional<z.ZodString>;
106
+ license: z.ZodString;
107
+ importedBy: z.ZodString;
108
+ importedAt: z.ZodString;
109
+ originalFileHash: z.ZodOptional<z.ZodString>;
110
+ }, "strip", z.ZodTypeAny, {
111
+ sourceRef: string;
112
+ license: string;
113
+ importedBy: string;
114
+ importedAt: string;
115
+ sourceUrl?: string | undefined;
116
+ originalFileHash?: string | undefined;
117
+ }, {
118
+ sourceRef: string;
119
+ license: string;
120
+ importedBy: string;
121
+ importedAt: string;
122
+ sourceUrl?: string | undefined;
123
+ originalFileHash?: string | undefined;
124
+ }>;
125
+ trust: z.ZodDefault<z.ZodEnum<["verified", "org"]>>;
126
+ }, "strip", z.ZodTypeAny, {
127
+ name: string;
128
+ id: string;
129
+ specVersion: "1.0";
130
+ contentVersion: string;
131
+ subject: string;
132
+ languages: string[];
133
+ gradeModel: {
134
+ type: "grades" | "ages" | "bands";
135
+ range: number[];
136
+ normalization?: {
137
+ from: string;
138
+ to: number[];
139
+ }[] | undefined;
140
+ };
141
+ provenance: {
142
+ sourceRef: string;
143
+ license: string;
144
+ importedBy: string;
145
+ importedAt: string;
146
+ sourceUrl?: string | undefined;
147
+ originalFileHash?: string | undefined;
148
+ };
149
+ trust: "verified" | "org";
150
+ }, {
151
+ name: string;
152
+ id: string;
153
+ specVersion: "1.0";
154
+ contentVersion: string;
155
+ subject: string;
156
+ languages: string[];
157
+ gradeModel: {
158
+ type: "grades" | "ages" | "bands";
159
+ range: number[];
160
+ normalization?: {
161
+ from: string;
162
+ to: number[];
163
+ }[] | undefined;
164
+ };
165
+ provenance: {
166
+ sourceRef: string;
167
+ license: string;
168
+ importedBy: string;
169
+ importedAt: string;
170
+ sourceUrl?: string | undefined;
171
+ originalFileHash?: string | undefined;
172
+ };
173
+ trust?: "verified" | "org" | undefined;
174
+ }>;
175
+ declare const FrameworkStatementSchema: z.ZodObject<{
176
+ /** Canonical, forever-stable statement ID (see invariant I3). */
177
+ id: z.ZodString;
178
+ /** Optional hierarchical parent within the SAME pack (GDPT competence → requirement, CSTA strand → statement, ...). */
179
+ parentId: z.ZodOptional<z.ZodString>;
180
+ gradeBand: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>;
181
+ /** Verbatim canonical text per language. The FIRST / primary language text is judge ground truth (invariant I2). */
182
+ texts: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, Record<string, string>>;
183
+ classifications: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
184
+ axis: z.ZodString;
185
+ value: z.ZodString;
186
+ }, "strip", z.ZodTypeAny, {
187
+ value: string;
188
+ axis: string;
189
+ }, {
190
+ value: string;
191
+ axis: string;
192
+ }>, "many">>>;
193
+ bloomHint: z.ZodOptional<z.ZodObject<{
194
+ process: z.ZodEnum<["Remember", "Understand", "Apply", "Analyze", "Evaluate", "Create"]>;
195
+ knowledge: z.ZodOptional<z.ZodEnum<["FACTUAL", "CONCEPTUAL", "PROCEDURAL", "METACOGNITIVE"]>>;
196
+ }, "strip", z.ZodTypeAny, {
197
+ process: "Create" | "Evaluate" | "Remember" | "Understand" | "Apply" | "Analyze";
198
+ knowledge?: "CONCEPTUAL" | "FACTUAL" | "PROCEDURAL" | "METACOGNITIVE" | undefined;
199
+ }, {
200
+ process: "Create" | "Evaluate" | "Remember" | "Understand" | "Apply" | "Analyze";
201
+ knowledge?: "CONCEPTUAL" | "FACTUAL" | "PROCEDURAL" | "METACOGNITIVE" | undefined;
202
+ }>>;
203
+ keywords: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
204
+ sourceRef: z.ZodOptional<z.ZodString>;
205
+ provenance: z.ZodObject<{
206
+ method: z.ZodEnum<["source_official", "ai_draft", "minted_from_content", "human", "crosswalk", "imported"]>;
207
+ reviewedBy: z.ZodOptional<z.ZodString>;
208
+ reviewedAt: z.ZodOptional<z.ZodString>;
209
+ note: z.ZodOptional<z.ZodString>;
210
+ }, "strip", z.ZodTypeAny, {
211
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
212
+ note?: string | undefined;
213
+ reviewedBy?: string | undefined;
214
+ reviewedAt?: string | undefined;
215
+ }, {
216
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
217
+ note?: string | undefined;
218
+ reviewedBy?: string | undefined;
219
+ reviewedAt?: string | undefined;
220
+ }>;
221
+ }, "strip", z.ZodTypeAny, {
222
+ keywords: string[];
223
+ id: string;
224
+ provenance: {
225
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
226
+ note?: string | undefined;
227
+ reviewedBy?: string | undefined;
228
+ reviewedAt?: string | undefined;
229
+ };
230
+ gradeBand: number[];
231
+ texts: Record<string, string>;
232
+ classifications: {
233
+ value: string;
234
+ axis: string;
235
+ }[];
236
+ sourceRef?: string | undefined;
237
+ parentId?: string | undefined;
238
+ bloomHint?: {
239
+ process: "Create" | "Evaluate" | "Remember" | "Understand" | "Apply" | "Analyze";
240
+ knowledge?: "CONCEPTUAL" | "FACTUAL" | "PROCEDURAL" | "METACOGNITIVE" | undefined;
241
+ } | undefined;
242
+ }, {
243
+ id: string;
244
+ provenance: {
245
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
246
+ note?: string | undefined;
247
+ reviewedBy?: string | undefined;
248
+ reviewedAt?: string | undefined;
249
+ };
250
+ gradeBand: number[];
251
+ texts: Record<string, string>;
252
+ keywords?: string[] | undefined;
253
+ sourceRef?: string | undefined;
254
+ parentId?: string | undefined;
255
+ classifications?: {
256
+ value: string;
257
+ axis: string;
258
+ }[] | undefined;
259
+ bloomHint?: {
260
+ process: "Create" | "Evaluate" | "Remember" | "Understand" | "Apply" | "Analyze";
261
+ knowledge?: "CONCEPTUAL" | "FACTUAL" | "PROCEDURAL" | "METACOGNITIVE" | undefined;
262
+ } | undefined;
263
+ }>;
264
+ declare const MappingKindSchema: z.ZodEnum<["covers", "partial", "extends"]>;
265
+ declare const FrameworkMappingSchema: z.ZodObject<{
266
+ statementId: z.ZodString;
267
+ /** Namespaced target. Grammar: <namespace>:<ID>. e.g. "ontora:WHILE_LOOP", "ontora:PROBLEM_DECOMPOSITION". Resolved against the target registry at intake — unknown targets FAIL validation. */
268
+ targetRef: z.ZodEffects<z.ZodString, string, string>;
269
+ kind: z.ZodEnum<["covers", "partial", "extends"]>;
270
+ confidence: z.ZodNumber;
271
+ provenance: z.ZodObject<{
272
+ method: z.ZodEnum<["source_official", "ai_draft", "minted_from_content", "human", "crosswalk", "imported"]>;
273
+ reviewedBy: z.ZodOptional<z.ZodString>;
274
+ reviewedAt: z.ZodOptional<z.ZodString>;
275
+ note: z.ZodOptional<z.ZodString>;
276
+ }, "strip", z.ZodTypeAny, {
277
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
278
+ note?: string | undefined;
279
+ reviewedBy?: string | undefined;
280
+ reviewedAt?: string | undefined;
281
+ }, {
282
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
283
+ note?: string | undefined;
284
+ reviewedBy?: string | undefined;
285
+ reviewedAt?: string | undefined;
286
+ }>;
287
+ }, "strip", z.ZodTypeAny, {
288
+ kind: "covers" | "partial" | "extends";
289
+ provenance: {
290
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
291
+ note?: string | undefined;
292
+ reviewedBy?: string | undefined;
293
+ reviewedAt?: string | undefined;
294
+ };
295
+ statementId: string;
296
+ targetRef: string;
297
+ confidence: number;
298
+ }, {
299
+ kind: "covers" | "partial" | "extends";
300
+ provenance: {
301
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
302
+ note?: string | undefined;
303
+ reviewedBy?: string | undefined;
304
+ reviewedAt?: string | undefined;
305
+ };
306
+ statementId: string;
307
+ targetRef: string;
308
+ confidence: number;
309
+ }>;
310
+ declare const FrameworkPackSchema: z.ZodObject<{
311
+ manifest: z.ZodObject<{
312
+ /** Immutable pack identifier. Never reused, never renamed. */
313
+ id: z.ZodString;
314
+ name: z.ZodString;
315
+ specVersion: z.ZodLiteral<"1.0">;
316
+ contentVersion: z.ZodString;
317
+ subject: z.ZodString;
318
+ languages: z.ZodArray<z.ZodString, "many">;
319
+ gradeModel: z.ZodObject<{
320
+ type: z.ZodEnum<["grades", "ages", "bands"]>;
321
+ range: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>;
322
+ /** Optional normalization table when type != "grades" (e.g. band "6-8" -> [6,8]). */
323
+ normalization: z.ZodOptional<z.ZodArray<z.ZodObject<{
324
+ from: z.ZodString;
325
+ to: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>;
326
+ }, "strip", z.ZodTypeAny, {
327
+ from: string;
328
+ to: number[];
329
+ }, {
330
+ from: string;
331
+ to: number[];
332
+ }>, "many">>;
333
+ }, "strip", z.ZodTypeAny, {
334
+ type: "grades" | "ages" | "bands";
335
+ range: number[];
336
+ normalization?: {
337
+ from: string;
338
+ to: number[];
339
+ }[] | undefined;
340
+ }, {
341
+ type: "grades" | "ages" | "bands";
342
+ range: number[];
343
+ normalization?: {
344
+ from: string;
345
+ to: number[];
346
+ }[] | undefined;
347
+ }>;
348
+ provenance: z.ZodObject<{
349
+ sourceRef: z.ZodString;
350
+ sourceUrl: z.ZodOptional<z.ZodString>;
351
+ license: z.ZodString;
352
+ importedBy: z.ZodString;
353
+ importedAt: z.ZodString;
354
+ originalFileHash: z.ZodOptional<z.ZodString>;
355
+ }, "strip", z.ZodTypeAny, {
356
+ sourceRef: string;
357
+ license: string;
358
+ importedBy: string;
359
+ importedAt: string;
360
+ sourceUrl?: string | undefined;
361
+ originalFileHash?: string | undefined;
362
+ }, {
363
+ sourceRef: string;
364
+ license: string;
365
+ importedBy: string;
366
+ importedAt: string;
367
+ sourceUrl?: string | undefined;
368
+ originalFileHash?: string | undefined;
369
+ }>;
370
+ trust: z.ZodDefault<z.ZodEnum<["verified", "org"]>>;
371
+ }, "strip", z.ZodTypeAny, {
372
+ name: string;
373
+ id: string;
374
+ specVersion: "1.0";
375
+ contentVersion: string;
376
+ subject: string;
377
+ languages: string[];
378
+ gradeModel: {
379
+ type: "grades" | "ages" | "bands";
380
+ range: number[];
381
+ normalization?: {
382
+ from: string;
383
+ to: number[];
384
+ }[] | undefined;
385
+ };
386
+ provenance: {
387
+ sourceRef: string;
388
+ license: string;
389
+ importedBy: string;
390
+ importedAt: string;
391
+ sourceUrl?: string | undefined;
392
+ originalFileHash?: string | undefined;
393
+ };
394
+ trust: "verified" | "org";
395
+ }, {
396
+ name: string;
397
+ id: string;
398
+ specVersion: "1.0";
399
+ contentVersion: string;
400
+ subject: string;
401
+ languages: string[];
402
+ gradeModel: {
403
+ type: "grades" | "ages" | "bands";
404
+ range: number[];
405
+ normalization?: {
406
+ from: string;
407
+ to: number[];
408
+ }[] | undefined;
409
+ };
410
+ provenance: {
411
+ sourceRef: string;
412
+ license: string;
413
+ importedBy: string;
414
+ importedAt: string;
415
+ sourceUrl?: string | undefined;
416
+ originalFileHash?: string | undefined;
417
+ };
418
+ trust?: "verified" | "org" | undefined;
419
+ }>;
420
+ statements: z.ZodArray<z.ZodObject<{
421
+ /** Canonical, forever-stable statement ID (see invariant I3). */
422
+ id: z.ZodString;
423
+ /** Optional hierarchical parent within the SAME pack (GDPT competence → requirement, CSTA strand → statement, ...). */
424
+ parentId: z.ZodOptional<z.ZodString>;
425
+ gradeBand: z.ZodEffects<z.ZodArray<z.ZodNumber, "many">, number[], number[]>;
426
+ /** Verbatim canonical text per language. The FIRST / primary language text is judge ground truth (invariant I2). */
427
+ texts: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, Record<string, string>>;
428
+ classifications: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
429
+ axis: z.ZodString;
430
+ value: z.ZodString;
431
+ }, "strip", z.ZodTypeAny, {
432
+ value: string;
433
+ axis: string;
434
+ }, {
435
+ value: string;
436
+ axis: string;
437
+ }>, "many">>>;
438
+ bloomHint: z.ZodOptional<z.ZodObject<{
439
+ process: z.ZodEnum<["Remember", "Understand", "Apply", "Analyze", "Evaluate", "Create"]>;
440
+ knowledge: z.ZodOptional<z.ZodEnum<["FACTUAL", "CONCEPTUAL", "PROCEDURAL", "METACOGNITIVE"]>>;
441
+ }, "strip", z.ZodTypeAny, {
442
+ process: "Create" | "Evaluate" | "Remember" | "Understand" | "Apply" | "Analyze";
443
+ knowledge?: "CONCEPTUAL" | "FACTUAL" | "PROCEDURAL" | "METACOGNITIVE" | undefined;
444
+ }, {
445
+ process: "Create" | "Evaluate" | "Remember" | "Understand" | "Apply" | "Analyze";
446
+ knowledge?: "CONCEPTUAL" | "FACTUAL" | "PROCEDURAL" | "METACOGNITIVE" | undefined;
447
+ }>>;
448
+ keywords: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
449
+ sourceRef: z.ZodOptional<z.ZodString>;
450
+ provenance: z.ZodObject<{
451
+ method: z.ZodEnum<["source_official", "ai_draft", "minted_from_content", "human", "crosswalk", "imported"]>;
452
+ reviewedBy: z.ZodOptional<z.ZodString>;
453
+ reviewedAt: z.ZodOptional<z.ZodString>;
454
+ note: z.ZodOptional<z.ZodString>;
455
+ }, "strip", z.ZodTypeAny, {
456
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
457
+ note?: string | undefined;
458
+ reviewedBy?: string | undefined;
459
+ reviewedAt?: string | undefined;
460
+ }, {
461
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
462
+ note?: string | undefined;
463
+ reviewedBy?: string | undefined;
464
+ reviewedAt?: string | undefined;
465
+ }>;
466
+ }, "strip", z.ZodTypeAny, {
467
+ keywords: string[];
468
+ id: string;
469
+ provenance: {
470
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
471
+ note?: string | undefined;
472
+ reviewedBy?: string | undefined;
473
+ reviewedAt?: string | undefined;
474
+ };
475
+ gradeBand: number[];
476
+ texts: Record<string, string>;
477
+ classifications: {
478
+ value: string;
479
+ axis: string;
480
+ }[];
481
+ sourceRef?: string | undefined;
482
+ parentId?: string | undefined;
483
+ bloomHint?: {
484
+ process: "Create" | "Evaluate" | "Remember" | "Understand" | "Apply" | "Analyze";
485
+ knowledge?: "CONCEPTUAL" | "FACTUAL" | "PROCEDURAL" | "METACOGNITIVE" | undefined;
486
+ } | undefined;
487
+ }, {
488
+ id: string;
489
+ provenance: {
490
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
491
+ note?: string | undefined;
492
+ reviewedBy?: string | undefined;
493
+ reviewedAt?: string | undefined;
494
+ };
495
+ gradeBand: number[];
496
+ texts: Record<string, string>;
497
+ keywords?: string[] | undefined;
498
+ sourceRef?: string | undefined;
499
+ parentId?: string | undefined;
500
+ classifications?: {
501
+ value: string;
502
+ axis: string;
503
+ }[] | undefined;
504
+ bloomHint?: {
505
+ process: "Create" | "Evaluate" | "Remember" | "Understand" | "Apply" | "Analyze";
506
+ knowledge?: "CONCEPTUAL" | "FACTUAL" | "PROCEDURAL" | "METACOGNITIVE" | undefined;
507
+ } | undefined;
508
+ }>, "many">;
509
+ mappings: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
510
+ statementId: z.ZodString;
511
+ /** Namespaced target. Grammar: <namespace>:<ID>. e.g. "ontora:WHILE_LOOP", "ontora:PROBLEM_DECOMPOSITION". Resolved against the target registry at intake — unknown targets FAIL validation. */
512
+ targetRef: z.ZodEffects<z.ZodString, string, string>;
513
+ kind: z.ZodEnum<["covers", "partial", "extends"]>;
514
+ confidence: z.ZodNumber;
515
+ provenance: z.ZodObject<{
516
+ method: z.ZodEnum<["source_official", "ai_draft", "minted_from_content", "human", "crosswalk", "imported"]>;
517
+ reviewedBy: z.ZodOptional<z.ZodString>;
518
+ reviewedAt: z.ZodOptional<z.ZodString>;
519
+ note: z.ZodOptional<z.ZodString>;
520
+ }, "strip", z.ZodTypeAny, {
521
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
522
+ note?: string | undefined;
523
+ reviewedBy?: string | undefined;
524
+ reviewedAt?: string | undefined;
525
+ }, {
526
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
527
+ note?: string | undefined;
528
+ reviewedBy?: string | undefined;
529
+ reviewedAt?: string | undefined;
530
+ }>;
531
+ }, "strip", z.ZodTypeAny, {
532
+ kind: "covers" | "partial" | "extends";
533
+ provenance: {
534
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
535
+ note?: string | undefined;
536
+ reviewedBy?: string | undefined;
537
+ reviewedAt?: string | undefined;
538
+ };
539
+ statementId: string;
540
+ targetRef: string;
541
+ confidence: number;
542
+ }, {
543
+ kind: "covers" | "partial" | "extends";
544
+ provenance: {
545
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
546
+ note?: string | undefined;
547
+ reviewedBy?: string | undefined;
548
+ reviewedAt?: string | undefined;
549
+ };
550
+ statementId: string;
551
+ targetRef: string;
552
+ confidence: number;
553
+ }>, "many">>>;
554
+ }, "strip", z.ZodTypeAny, {
555
+ manifest: {
556
+ name: string;
557
+ id: string;
558
+ specVersion: "1.0";
559
+ contentVersion: string;
560
+ subject: string;
561
+ languages: string[];
562
+ gradeModel: {
563
+ type: "grades" | "ages" | "bands";
564
+ range: number[];
565
+ normalization?: {
566
+ from: string;
567
+ to: number[];
568
+ }[] | undefined;
569
+ };
570
+ provenance: {
571
+ sourceRef: string;
572
+ license: string;
573
+ importedBy: string;
574
+ importedAt: string;
575
+ sourceUrl?: string | undefined;
576
+ originalFileHash?: string | undefined;
577
+ };
578
+ trust: "verified" | "org";
579
+ };
580
+ statements: {
581
+ keywords: string[];
582
+ id: string;
583
+ provenance: {
584
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
585
+ note?: string | undefined;
586
+ reviewedBy?: string | undefined;
587
+ reviewedAt?: string | undefined;
588
+ };
589
+ gradeBand: number[];
590
+ texts: Record<string, string>;
591
+ classifications: {
592
+ value: string;
593
+ axis: string;
594
+ }[];
595
+ sourceRef?: string | undefined;
596
+ parentId?: string | undefined;
597
+ bloomHint?: {
598
+ process: "Create" | "Evaluate" | "Remember" | "Understand" | "Apply" | "Analyze";
599
+ knowledge?: "CONCEPTUAL" | "FACTUAL" | "PROCEDURAL" | "METACOGNITIVE" | undefined;
600
+ } | undefined;
601
+ }[];
602
+ mappings: {
603
+ kind: "covers" | "partial" | "extends";
604
+ provenance: {
605
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
606
+ note?: string | undefined;
607
+ reviewedBy?: string | undefined;
608
+ reviewedAt?: string | undefined;
609
+ };
610
+ statementId: string;
611
+ targetRef: string;
612
+ confidence: number;
613
+ }[];
614
+ }, {
615
+ manifest: {
616
+ name: string;
617
+ id: string;
618
+ specVersion: "1.0";
619
+ contentVersion: string;
620
+ subject: string;
621
+ languages: string[];
622
+ gradeModel: {
623
+ type: "grades" | "ages" | "bands";
624
+ range: number[];
625
+ normalization?: {
626
+ from: string;
627
+ to: number[];
628
+ }[] | undefined;
629
+ };
630
+ provenance: {
631
+ sourceRef: string;
632
+ license: string;
633
+ importedBy: string;
634
+ importedAt: string;
635
+ sourceUrl?: string | undefined;
636
+ originalFileHash?: string | undefined;
637
+ };
638
+ trust?: "verified" | "org" | undefined;
639
+ };
640
+ statements: {
641
+ id: string;
642
+ provenance: {
643
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
644
+ note?: string | undefined;
645
+ reviewedBy?: string | undefined;
646
+ reviewedAt?: string | undefined;
647
+ };
648
+ gradeBand: number[];
649
+ texts: Record<string, string>;
650
+ keywords?: string[] | undefined;
651
+ sourceRef?: string | undefined;
652
+ parentId?: string | undefined;
653
+ classifications?: {
654
+ value: string;
655
+ axis: string;
656
+ }[] | undefined;
657
+ bloomHint?: {
658
+ process: "Create" | "Evaluate" | "Remember" | "Understand" | "Apply" | "Analyze";
659
+ knowledge?: "CONCEPTUAL" | "FACTUAL" | "PROCEDURAL" | "METACOGNITIVE" | undefined;
660
+ } | undefined;
661
+ }[];
662
+ mappings?: {
663
+ kind: "covers" | "partial" | "extends";
664
+ provenance: {
665
+ method: "human" | "source_official" | "ai_draft" | "minted_from_content" | "crosswalk" | "imported";
666
+ note?: string | undefined;
667
+ reviewedBy?: string | undefined;
668
+ reviewedAt?: string | undefined;
669
+ };
670
+ statementId: string;
671
+ targetRef: string;
672
+ confidence: number;
673
+ }[] | undefined;
674
+ }>;
675
+ type FrameworkPack = z.infer<typeof FrameworkPackSchema>;
676
+ type FrameworkPackManifest = z.infer<typeof FrameworkPackManifestSchema>;
677
+ type FrameworkStatement = z.infer<typeof FrameworkStatementSchema>;
678
+ type FrameworkMapping = z.infer<typeof FrameworkMappingSchema>;
679
+ type MappingKind = z.infer<typeof MappingKindSchema>;
680
+ type RecordProvenance = z.infer<typeof RecordProvenanceSchema>;
681
+ interface PackLintIssue {
682
+ severity: 'ERROR' | 'WARNING';
683
+ code: string;
684
+ message: string;
685
+ /** statement id or manifest path the issue refers to */
686
+ ref?: string;
687
+ }
688
+ /**
689
+ * Deterministic structural lint over an already schema-valid pack.
690
+ * Pure function: no I/O, no LLM. Mirrors the ontora validator philosophy —
691
+ * assembly/validation is code, research/judgment is model.
692
+ */
693
+ declare function lintFrameworkPack(pack: FrameworkPack): PackLintIssue[];
694
+ interface PackValidationResult {
695
+ valid: boolean;
696
+ schemaErrors: string[];
697
+ lint: PackLintIssue[];
698
+ stats: {
699
+ statements: number;
700
+ mappings: number;
701
+ coveredStatements: number;
702
+ statementOnlyStatements: number;
703
+ gradeRange: [number, number];
704
+ };
705
+ }
706
+ /**
707
+ * Full validation: Zod schema → deterministic lint.
708
+ * Does NOT resolve ontora targets (network/DB concern, layered separately).
709
+ */
710
+ declare function validateFrameworkPack(input: unknown): PackValidationResult;
711
+
712
+ /**
713
+ * Standards Coverage Gate — Verification layer (tầng 3 của cơ chế bám chuẩn).
714
+ *
715
+ * Deterministic coverage matrix across the generation chain:
716
+ * standard statement → learning objective → lesson activities → quiz questions
717
+ *
718
+ * Philosophy: "bám chuẩn" must be enforced by CODE, not by prompt goodwill.
719
+ * A statement mapped with kind="covers" that has no LO / no activity / no
720
+ * assessment = a compliance hole, reported with an actionable repair hint.
721
+ *
722
+ * Pure function over already-generated artifacts. No LLM, no I/O.
723
+ */
724
+ interface CoverageGateInput {
725
+ packs: FrameworkPack[];
726
+ /** Learning objectives as generated (code + optional standardRefs anchoring). */
727
+ objectives: Array<{
728
+ code: string;
729
+ standardRefs?: string[];
730
+ conceptRefs?: string[];
731
+ }>;
732
+ /** activitySequence rows of the lesson (lo codes link activities to LOs). Optional: omitted when no structured activity-LO linkage is available. */
733
+ activities?: Array<{
734
+ seq?: number;
735
+ lo: string[];
736
+ }>;
737
+ /** Quiz questions; each links to assessment objectives → alignedLO. */
738
+ quizQuestions: Array<{
739
+ alignedLO?: string;
740
+ alignedAO?: string;
741
+ }>;
742
+ /** Assessment objectives table (AO → alignedLO). Questions may reference AOs only. */
743
+ assessmentObjectives?: Array<{
744
+ aoCode: string;
745
+ alignedLO: string;
746
+ }>;
747
+ }
748
+ interface StatementCoverageRow {
749
+ packId: string;
750
+ statementId: string;
751
+ statementText: string;
752
+ status: 'COVERED' | 'PARTIAL' | 'UNCOVERED' | 'UNMAPPED';
753
+ objectives: string[];
754
+ hasActivity: boolean;
755
+ hasAssessment: boolean;
756
+ issues: string[];
757
+ }
758
+ interface CoverageGateReport {
759
+ verdict: 'PASS' | 'WARN' | 'FAIL';
760
+ coveragePct: number;
761
+ rows: StatementCoverageRow[];
762
+ summary: string;
763
+ rawMarkdownReport: string;
764
+ }
765
+ declare function evaluateStandardsCoverage(input: CoverageGateInput): CoverageGateReport;
766
+
767
+ export { BloomHintSchema as B, ClassificationSchema as C, type FrameworkPack as F, GradeBandSchema as G, MappingKindSchema as M, type PackLintIssue as P, RecordProvenanceSchema as R, type StatementCoverageRow as S, FrameworkPackManifestSchema as a, FrameworkStatementSchema as b, FrameworkMappingSchema as c, FrameworkPackSchema as d, type FrameworkPackManifest as e, type FrameworkStatement as f, type FrameworkMapping as g, type MappingKind as h, type RecordProvenance as i, type PackValidationResult as j, type CoverageGateInput as k, lintFrameworkPack as l, type CoverageGateReport as m, evaluateStandardsCoverage as n, validateFrameworkPack as v };