@thanh01.pmt/curriculum-kit 1.4.7 → 1.4.9
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/dist/index.cjs +341 -119
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -6
- package/dist/index.d.ts +9 -6
- package/dist/index.mjs +341 -120
- package/dist/index.mjs.map +1 -1
- package/dist/storage/index.cjs +37 -8
- package/dist/storage/index.cjs.map +1 -1
- package/dist/storage/index.mjs +37 -8
- package/dist/storage/index.mjs.map +1 -1
- package/dist/workflow/index.cjs +218 -84
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.mjs +218 -84
- package/dist/workflow/index.mjs.map +1 -1
- package/package.json +21 -22
package/dist/index.mjs
CHANGED
|
@@ -8406,13 +8406,16 @@ function computeContentHash(content) {
|
|
|
8406
8406
|
return "sha256:" + crypto.createHash("sha256").update(content.trim(), "utf-8").digest("hex");
|
|
8407
8407
|
}
|
|
8408
8408
|
var STANDARD_SOT_FILES = [
|
|
8409
|
-
"PROJECT_BRIEF.md",
|
|
8410
8409
|
"LEARNER_PROFILE.md",
|
|
8410
|
+
"PROJECT_BRIEF.md",
|
|
8411
|
+
"REFERENCE_PACK.md",
|
|
8412
|
+
"PROJECT_GRAPH.json",
|
|
8413
|
+
"HYBRID_GRAPH.json",
|
|
8414
|
+
"SECTION_LANGUAGE_CONTRACT.md",
|
|
8411
8415
|
"CURRICULUM_FRAMEWORK.md",
|
|
8412
|
-
"PROJECT_STATUS.md",
|
|
8413
8416
|
"CONTENT_STYLE_GUIDE.md",
|
|
8414
8417
|
"ART_DIRECTION.md",
|
|
8415
|
-
"
|
|
8418
|
+
"ALIGNMENT_MATRIX.md"
|
|
8416
8419
|
];
|
|
8417
8420
|
var FileSystemCurriculumAdapter = class {
|
|
8418
8421
|
baseDir;
|
|
@@ -8454,19 +8457,33 @@ var FileSystemCurriculumAdapter = class {
|
|
|
8454
8457
|
async listSotDocuments(projectId) {
|
|
8455
8458
|
const projectDir = this.getProjectDir(projectId);
|
|
8456
8459
|
const sotDir = path3.join(projectDir, "_sot");
|
|
8457
|
-
|
|
8460
|
+
const discoveredFiles = new Set(STANDARD_SOT_FILES);
|
|
8461
|
+
if (fs2.existsSync(sotDir)) {
|
|
8462
|
+
try {
|
|
8463
|
+
const diskFiles = fs2.readdirSync(sotDir);
|
|
8464
|
+
for (const f of diskFiles) {
|
|
8465
|
+
if (f.startsWith(".") || f.endsWith(".review.json")) continue;
|
|
8466
|
+
const fullPath = path3.join(sotDir, f);
|
|
8467
|
+
if (fs2.statSync(fullPath).isFile()) {
|
|
8468
|
+
discoveredFiles.add(f);
|
|
8469
|
+
}
|
|
8470
|
+
}
|
|
8471
|
+
} catch {
|
|
8472
|
+
}
|
|
8473
|
+
}
|
|
8474
|
+
return Array.from(discoveredFiles).map((filename) => {
|
|
8458
8475
|
const p = fs2.existsSync(path3.join(sotDir, filename)) ? path3.join(sotDir, filename) : fs2.existsSync(path3.join(projectDir, filename)) ? path3.join(projectDir, filename) : null;
|
|
8459
8476
|
if (p && fs2.existsSync(p)) {
|
|
8460
8477
|
const stats = fs2.statSync(p);
|
|
8461
8478
|
return {
|
|
8462
|
-
name: filename.replace(
|
|
8479
|
+
name: filename.replace(/\.(md|json)$/i, "").replace(/_/g, " "),
|
|
8463
8480
|
filename,
|
|
8464
8481
|
exists: true,
|
|
8465
8482
|
sizeBytes: stats.size
|
|
8466
8483
|
};
|
|
8467
8484
|
}
|
|
8468
8485
|
return {
|
|
8469
|
-
name: filename.replace(
|
|
8486
|
+
name: filename.replace(/\.(md|json)$/i, "").replace(/_/g, " "),
|
|
8470
8487
|
filename,
|
|
8471
8488
|
exists: false,
|
|
8472
8489
|
sizeBytes: 0
|
|
@@ -8712,11 +8729,23 @@ var SupabaseCurriculumAdapter = class {
|
|
|
8712
8729
|
return null;
|
|
8713
8730
|
}
|
|
8714
8731
|
async listSotDocuments(projectId) {
|
|
8732
|
+
const discoveredFiles = new Set(STANDARD_SOT_FILES);
|
|
8733
|
+
try {
|
|
8734
|
+
const { data, error } = await this.client.storage.from(this.bucketName).list(`${projectId}/_sot`);
|
|
8735
|
+
if (!error && data) {
|
|
8736
|
+
for (const item of data) {
|
|
8737
|
+
if (item.name && !item.name.startsWith(".") && !item.name.endsWith(".review.json")) {
|
|
8738
|
+
discoveredFiles.add(item.name);
|
|
8739
|
+
}
|
|
8740
|
+
}
|
|
8741
|
+
}
|
|
8742
|
+
} catch {
|
|
8743
|
+
}
|
|
8715
8744
|
const results = [];
|
|
8716
|
-
for (const filename of
|
|
8745
|
+
for (const filename of discoveredFiles) {
|
|
8717
8746
|
const content = await this.readSotDocument(projectId, filename);
|
|
8718
8747
|
results.push({
|
|
8719
|
-
name: filename.replace(
|
|
8748
|
+
name: filename.replace(/\.(md|json)$/i, "").replace(/_/g, " "),
|
|
8720
8749
|
filename,
|
|
8721
8750
|
exists: !!content,
|
|
8722
8751
|
content: content || void 0,
|
|
@@ -9093,10 +9122,12 @@ async function auditQualityReport(storage, projectId) {
|
|
|
9093
9122
|
computedScore += Math.round(bloomPassCount / total * 20);
|
|
9094
9123
|
computedScore += Math.round(Math.min(syntaxExecutableCount, total) / total * 20);
|
|
9095
9124
|
computedScore += Math.round(scopeCompletenessCount / total * 20);
|
|
9125
|
+
const sotCompletedCount = status.sotReadiness.filter((s) => s.exists).length;
|
|
9126
|
+
const sotTotalCount = status.sotReadiness.length;
|
|
9096
9127
|
if (sotReady) {
|
|
9097
|
-
details.push(
|
|
9128
|
+
details.push(`\u2705 N\u1EC1n t\u1EA3ng SOT (${sotCompletedCount}/${sotTotalCount} t\xE0i li\u1EC7u) s\u1EB5n s\xE0ng.`);
|
|
9098
9129
|
} else {
|
|
9099
|
-
details.push(
|
|
9130
|
+
details.push(`\u26A0\uFE0F C\u1EA7n ho\xE0n thi\u1EC7n \u0111\u1EA7y \u0111\u1EE7 t\xE0i li\u1EC7u SOT c\u01A1 s\u1EDF (${sotCompletedCount}/${sotTotalCount}).`);
|
|
9100
9131
|
}
|
|
9101
9132
|
details.push(`\u{1F3AF} Ph\u1EA1m vi h\u1ECDc li\u1EC7u theo SOT (Artifact Scope): [${artifactScope.join(", ")}].`);
|
|
9102
9133
|
if (pedagogy5EPass) {
|
|
@@ -9112,7 +9143,7 @@ async function auditQualityReport(storage, projectId) {
|
|
|
9112
9143
|
details.push(`\u2705 \u0110\u1ED9 ph\u1EE7 \u0111\u1EA7y \u0111\u1EE7 c\xE1c h\u1ECDc li\u1EC7u trong Artifact Scope: ${scopeCompletenessCount}/${total} b\xE0i h\u1ECDc.`);
|
|
9113
9144
|
const rawMarkdownReport = `## \u{1F6E1}\uFE0F B\xC1O C\xC1O KI\u1EC2M \u0110\u1ECANH CH\u1EA4T L\u01AF\u1EE2NG (QUALITY AUDIT): \`${projectId.toUpperCase()}\`
|
|
9114
9145
|
- **\u0110i\u1EC3m th\u1EA9m \u0111\u1ECBnh ch\u1EA5t l\u01B0\u1EE3ng:** **${computedScore}/100**
|
|
9115
|
-
- **Tr\u1EA1ng th\xE1i SOT:** ${sotReady ?
|
|
9146
|
+
- **Tr\u1EA1ng th\xE1i SOT:** ${sotReady ? `\u2705 ${sotCompletedCount}/${sotTotalCount} File SOT ho\xE0n t\u1EA5t` : `\u26A0\uFE0F C\u1EA7n b\u1ED5 sung t\xE0i li\u1EC7u SOT thi\u1EBFu (${sotCompletedCount}/${sotTotalCount})`}.
|
|
9116
9147
|
- **Ph\u1EA1m vi h\u1ECDc li\u1EC7u (SOT Artifact Scope):** \`${artifactScope.join(", ")}\`
|
|
9117
9148
|
- **C\u1EA5u tr\xFAc S\u01B0 ph\u1EA1m (5E / EDP):** ${pedagogy5ECount}/${total} b\xE0i h\u1ECDc \u0111\u1EA1t chu\u1EA9n ph\xE2n pha.
|
|
9118
9149
|
- **Thang \u0111o nh\u1EADn th\u1EE9c Bloom:** ${bloomPassCount}/${total} b\xE0i h\u1ECDc \u0111\u1EA1t ma tr\u1EADn m\u1EE5c ti\xEAu.
|
|
@@ -9214,7 +9245,9 @@ function extractScopeSequenceRows(framework) {
|
|
|
9214
9245
|
const trimmed = line.trim();
|
|
9215
9246
|
if (!trimmed.startsWith("|")) continue;
|
|
9216
9247
|
const lower = trimmed.toLowerCase();
|
|
9217
|
-
|
|
9248
|
+
const hasCodeCol = lower.includes("lesson code") || lower.includes("m\xE3 b\xE0i") || lower.includes("m\xE3 b\xE0i h\u1ECDc");
|
|
9249
|
+
const hasObjCol = lower.includes("learning objective") || lower.includes("m\u1EE5c ti\xEAu") || lower.includes("m\u1EE5c ti\xEAu h\u1ECDc t\u1EADp");
|
|
9250
|
+
if (hasCodeCol && hasObjCol) {
|
|
9218
9251
|
headerFound = true;
|
|
9219
9252
|
continue;
|
|
9220
9253
|
}
|
|
@@ -9808,6 +9841,224 @@ function gateModeFor(resolved, type) {
|
|
|
9808
9841
|
return resolved[type] ?? "OFF";
|
|
9809
9842
|
}
|
|
9810
9843
|
|
|
9844
|
+
// src/services/languageDirective.ts
|
|
9845
|
+
function resolveTargetLanguageCode(language) {
|
|
9846
|
+
const raw = String(language || "vi").trim().toLowerCase();
|
|
9847
|
+
if (raw.startsWith("vi")) return "vi";
|
|
9848
|
+
if (raw.startsWith("en")) return "en";
|
|
9849
|
+
return raw || "vi";
|
|
9850
|
+
}
|
|
9851
|
+
function targetLanguageDisplayName(code) {
|
|
9852
|
+
const map = {
|
|
9853
|
+
vi: "Vietnamese (Ti\u1EBFng Vi\u1EC7t)",
|
|
9854
|
+
en: "English (US)"
|
|
9855
|
+
};
|
|
9856
|
+
return map[code] || code;
|
|
9857
|
+
}
|
|
9858
|
+
function buildLanguageDirective(targetLanguage) {
|
|
9859
|
+
const code = resolveTargetLanguageCode(targetLanguage);
|
|
9860
|
+
const name = targetLanguageDisplayName(code);
|
|
9861
|
+
const perLanguageExamples = {
|
|
9862
|
+
vi: `- V\xED d\u1EE5 ti\xEAu \u0111\u1EC1 b\xE0i h\u1ECDc \u0111\xFAng chu\u1EA9n: "B\xE0i 1: Kh\xE1m ph\xE1 m\u1EA1ch \u0111i\u1EC7n c\u01A1 b\u1EA3n", "B\xE0i 2: \u0110i\u1EC1u khi\u1EC3n \u0111\xE8n LED nh\u1EA5p nh\xE1y" \u2014 KH\xD4NG d\xF9ng ti\xEAu \u0111\u1EC1 ti\u1EBFng Anh.`,
|
|
9863
|
+
en: `- Example compliant lesson title: "Lesson 1: Exploring Basic Circuits" \u2014 natural, idiomatic English throughout.`
|
|
9864
|
+
};
|
|
9865
|
+
const exampleLine = perLanguageExamples[code] || "";
|
|
9866
|
+
return `MANDATORY LANGUAGE DIRECTIVE (TARGET OUTPUT LANGUAGE: ${name}):
|
|
9867
|
+
- The TARGET OUTPUT LANGUAGE for this course is ${name}. You MUST author the ENTIRE document in ${name}.
|
|
9868
|
+
- All section titles, table headers, table cells, lesson names, learning objectives, pedagogical narratives, and cognitive analyses MUST be written in natural, fluent, academic ${name}.
|
|
9869
|
+
- Technical identifiers, code keywords (e.g. setup(), loop(), pinMode()), standard protocols (I2C, SPI, UART, GPIO), and component model numbers (ESP32, Arduino Uno) remain in standard technical notation, but all surrounding explanations MUST be in ${name}.
|
|
9870
|
+
- DO NOT mix in paragraphs, tables, or titles written in any other language. Strict adherence is required.${exampleLine ? `
|
|
9871
|
+
${exampleLine}` : ""}`;
|
|
9872
|
+
}
|
|
9873
|
+
function matchesArtifactType(candidate, target) {
|
|
9874
|
+
const c = candidate.trim().toUpperCase();
|
|
9875
|
+
const t = target.trim().toUpperCase();
|
|
9876
|
+
if (c === t) return true;
|
|
9877
|
+
if (c.startsWith("LESSON") && t.startsWith("LESSON")) return true;
|
|
9878
|
+
if ((c === "CODE" || c === "CODE_LAB") && (t === "CODE" || t === "CODE_LAB")) return true;
|
|
9879
|
+
if ((c === "EXPOSITION" || c === "KNOWLEDGE_EXPOSITION") && (t === "EXPOSITION" || t === "KNOWLEDGE_EXPOSITION")) return true;
|
|
9880
|
+
if ((c === "WKS" || c === "WORKSHEET") && (t === "WKS" || t === "WORKSHEET")) return true;
|
|
9881
|
+
if ((c === "EXT" || c === "EXTENSION") && (t === "EXT" || t === "EXTENSION")) return true;
|
|
9882
|
+
return false;
|
|
9883
|
+
}
|
|
9884
|
+
var DEFAULT_VIETNAMESE_SECTION_HEADINGS = {
|
|
9885
|
+
LEARNER_PROFILE: {
|
|
9886
|
+
"Foundational Info": "Th\xF4ng tin N\u1EC1n t\u1EA3ng",
|
|
9887
|
+
"Entry Level": "Tr\xECnh \u0111\u1ED9 \u0110\u1EA7u v\xE0o",
|
|
9888
|
+
"Learning Context": "B\u1ED1i c\u1EA3nh H\u1ECDc t\u1EADp",
|
|
9889
|
+
"Client Objectives": "M\u1EE5c ti\xEAu Kh\xE1ch h\xE0ng & Chu\u1EA9n \u0111\u1EA7u ra"
|
|
9890
|
+
},
|
|
9891
|
+
PROJECT_BRIEF: {
|
|
9892
|
+
"Project Overview": "T\u1ED5ng quan D\u1EF1 \xE1n",
|
|
9893
|
+
"Audience & Duration": "\u0110\u1ED1i t\u01B0\u1EE3ng & Th\u1EDDi l\u01B0\u1EE3ng",
|
|
9894
|
+
"Learning Roadmap": "L\u1ED9 tr\xECnh H\u1ECDc t\u1EADp & C\u1ED9t m\u1ED1c",
|
|
9895
|
+
"Artifact Scope": "Ph\u1EA1m vi S\u1EA3n ph\u1EA9m H\u1ECDc t\u1EADp"
|
|
9896
|
+
},
|
|
9897
|
+
CURRICULUM_FRAMEWORK: {
|
|
9898
|
+
"Course Overview": "T\u1ED5ng quan Kh\xF3a h\u1ECDc",
|
|
9899
|
+
"Global Learning Objectives": "M\u1EE5c ti\xEAu H\u1ECDc t\u1EADp To\xE0n di\u1EC7n",
|
|
9900
|
+
"Structural Hierarchy (Unit & Module)": "C\u1EA5u tr\xFAc Kh\xF3a h\u1ECDc (Unit & Module)",
|
|
9901
|
+
"Scope & Sequence (Detailed Roadmap)": "Ph\u1EA1m vi & Tr\xECnh t\u1EF1 Chi ti\u1EBFt"
|
|
9902
|
+
},
|
|
9903
|
+
CONTENT_STYLE_GUIDE: {
|
|
9904
|
+
"Voice & Tone": "Gi\u1ECDng v\u0103n & Phong c\xE1ch",
|
|
9905
|
+
"Standard Terminology (Glossary)": "Thu\u1EADt ng\u1EEF Chu\u1EA9n (B\u1EA3ng thu\u1EADt ng\u1EEF)",
|
|
9906
|
+
"Examples & Context Rules": "Quy t\u1EAFc V\xED d\u1EE5 & Ng\u1EEF c\u1EA3nh",
|
|
9907
|
+
"Lesson Content Standards": "Ti\xEAu chu\u1EA9n N\u1ED9i dung B\xE0i h\u1ECDc"
|
|
9908
|
+
},
|
|
9909
|
+
SECTION_LANGUAGE_CONTRACT: {
|
|
9910
|
+
"Metadata & Scope": "Th\xF4ng tin & Ph\u1EA1m vi H\u1EE3p \u0111\u1ED3ng",
|
|
9911
|
+
"Section Translation Matrix": "Ma tr\u1EADn Ti\xEAu \u0111\u1EC1 \u0110a ng\xF4n ng\u1EEF",
|
|
9912
|
+
"Validation Rules": "Quy t\u1EAFc X\xE1c th\u1EF1c & Kh\xF3a Chu\u1EA9n"
|
|
9913
|
+
},
|
|
9914
|
+
KNOWLEDGE_EXPOSITION: {
|
|
9915
|
+
"Session Scope": "Ph\u1EA1m vi Bu\u1ED5i h\u1ECDc",
|
|
9916
|
+
"Key Terms": "Thu\u1EADt ng\u1EEF Then ch\u1ED1t",
|
|
9917
|
+
"Concept Narratives": "Di\u1EC5n gi\u1EA3i Kh\xE1i ni\u1EC7m",
|
|
9918
|
+
"Worked Micro-Examples": "V\xED d\u1EE5 M\u1EABu Chi ti\u1EBFt",
|
|
9919
|
+
"Common Mistakes": "L\u1ED7i Th\u01B0\u1EDDng g\u1EB7p & Kh\u1EAFc ph\u1EE5c",
|
|
9920
|
+
"Self-Check Questions": "C\xE2u h\u1ECFi T\u1EF1 ki\u1EC3m tra"
|
|
9921
|
+
},
|
|
9922
|
+
LESSON: {
|
|
9923
|
+
"A. Lesson Design Plan": "A. K\u1EBF ho\u1EA1ch Thi\u1EBFt k\u1EBF B\xE0i h\u1ECDc",
|
|
9924
|
+
"Learning Objectives & Evidence": "M\u1EE5c ti\xEAu H\u1ECDc t\u1EADp & B\u1EB1ng ch\u1EE9ng N\u0103ng l\u1EF1c",
|
|
9925
|
+
"Activity Sequence": "Chu\u1ED7i Ho\u1EA1t \u0111\u1ED9ng D\u1EA1y & H\u1ECDc",
|
|
9926
|
+
"Resource Map": "B\u1EA3n \u0111\u1ED3 T\xE0i nguy\xEAn & H\u1ECDc li\u1EC7u",
|
|
9927
|
+
"Assessment Map": "B\u1EA3n \u0111\u1ED3 \u0110\xE1nh gi\xE1 N\u0103ng l\u1EF1c",
|
|
9928
|
+
"Artifact Contract": "H\u1EE3p \u0111\u1ED3ng S\u1EA3n ph\u1EA9m \u0110\u1EA7u ra",
|
|
9929
|
+
"B. Lesson Flow": "B. Ti\u1EBFn tr\xECnh Gi\u1EA3ng d\u1EA1y Chi ti\u1EBFt"
|
|
9930
|
+
},
|
|
9931
|
+
ACT: {
|
|
9932
|
+
"Computational Thinking Focus": "Tr\u1ECDng t\xE2m T\u01B0 duy M\xE1y t\xEDnh",
|
|
9933
|
+
"Materials & Setup": "V\u1EADt li\u1EC7u & Chu\u1EA9n b\u1ECB Thi\u1EBFt b\u1ECB",
|
|
9934
|
+
"Constraints & Safety": "R\xE0ng bu\u1ED9c & An to\xE0n Ph\xF2ng th\u1EF1c h\xE0nh",
|
|
9935
|
+
"Active Learning Workflow": "Quy tr\xECnh Ho\u1EA1t \u0111\u1ED9ng Tr\u1EA3i nghi\u1EC7m",
|
|
9936
|
+
"3-Tier Differentiation": "Ph\xE2n h\xF3a H\u1ECDc t\u1EADp 3 T\u1EA7ng",
|
|
9937
|
+
"Reflection": "T\u1ED5ng k\u1EBFt & \u0110\xFAc k\u1EBFt Tr\u1EA3i nghi\u1EC7m"
|
|
9938
|
+
},
|
|
9939
|
+
CODE: {
|
|
9940
|
+
"Technical Overview & Architecture Blueprint": "T\u1ED5ng quan K\u1EF9 thu\u1EADt & B\u1EA3n thi\u1EBFt k\u1EBF Ki\u1EBFn tr\xFAc",
|
|
9941
|
+
"Hardware Pinout & Wiring Configuration Matrix": "S\u01A1 \u0111\u1ED3 Ch\xE2n & Ma tr\u1EADn N\u1ED1i d\xE2y Ph\u1EA7n c\u1EE9ng",
|
|
9942
|
+
"Starter Code Sandbox": "M\xE3 ngu\u1ED3n Kh\u1EDFi \u0111\u1EA7u (Starter Code)",
|
|
9943
|
+
"Verified Reference Solution Code": "M\xE3 ngu\u1ED3n L\u1EDDi gi\u1EA3i Chu\u1EA9n (Reference Solution)",
|
|
9944
|
+
"Automated Test / Verification Script": "K\u1ECBch b\u1EA3n Ki\u1EC3m th\u1EED T\u1EF1 \u0111\u1ED9ng",
|
|
9945
|
+
"Common Syntax & Runtime Pitfalls Matrix": "Ma tr\u1EADn L\u1ED7i C\xFA ph\xE1p & Th\u1EDDi gian ch\u1EA1y Th\u01B0\u1EDDng g\u1EB7p"
|
|
9946
|
+
},
|
|
9947
|
+
CODE_LAB: {
|
|
9948
|
+
"Technical Overview & Architecture Blueprint": "T\u1ED5ng quan K\u1EF9 thu\u1EADt & B\u1EA3n thi\u1EBFt k\u1EBF Ki\u1EBFn tr\xFAc",
|
|
9949
|
+
"Hardware Pinout & Wiring Configuration Matrix": "S\u01A1 \u0111\u1ED3 Ch\xE2n & Ma tr\u1EADn N\u1ED1i d\xE2y Ph\u1EA7n c\u1EE9ng",
|
|
9950
|
+
"Starter Code Sandbox": "M\xE3 ngu\u1ED3n Kh\u1EDFi \u0111\u1EA7u (Starter Code)",
|
|
9951
|
+
"Verified Reference Solution Code": "M\xE3 ngu\u1ED3n L\u1EDDi gi\u1EA3i Chu\u1EA9n (Reference Solution)",
|
|
9952
|
+
"Automated Test / Verification Script": "K\u1ECBch b\u1EA3n Ki\u1EC3m th\u1EED T\u1EF1 \u0111\u1ED9ng",
|
|
9953
|
+
"Common Syntax & Runtime Pitfalls Matrix": "Ma tr\u1EADn L\u1ED7i C\xFA ph\xE1p & Th\u1EDDi gian ch\u1EA1y Th\u01B0\u1EDDng g\u1EB7p"
|
|
9954
|
+
},
|
|
9955
|
+
QUIZ: {
|
|
9956
|
+
"Assessment Objectives": "M\u1EE5c ti\xEAu \u0110\xE1nh gi\xE1",
|
|
9957
|
+
"Multiple-Choice Question Bank": "Ng\xE2n h\xE0ng C\xE2u h\u1ECFi Tr\u1EAFc nghi\u1EC7m",
|
|
9958
|
+
"Code Analysis / Debugging Question": "C\xE2u h\u1ECFi Ph\xE2n t\xEDch M\xE3 ngu\u1ED3n & S\u1EEDa l\u1ED7i",
|
|
9959
|
+
"Competency Rubric": "Thang \u0111o \u0110\xE1nh gi\xE1 N\u0103ng l\u1EF1c (Rubric)"
|
|
9960
|
+
},
|
|
9961
|
+
GUIDE: {
|
|
9962
|
+
"Objectives & Preparation": "M\u1EE5c ti\xEAu & Chu\u1EA9n b\u1ECB Gi\u1EA3ng d\u1EA1y",
|
|
9963
|
+
"Preparation Checklist & Workstation Setup": "Danh m\u1EE5c Ki\u1EC3m tra Chu\u1EA9n b\u1ECB & Tr\u1EA1m Th\u1EF1c h\xE0nh",
|
|
9964
|
+
"Facilitation Script & Timeline": "K\u1ECBch b\u1EA3n \u0110i\u1EC1u ph\u1ED1i & Khung Th\u1EDDi gian",
|
|
9965
|
+
"Common Misconceptions & Diagnostic Remediation Matrix": "Quan ni\u1EC7m Sai l\u1EA7m Th\u01B0\u1EDDng g\u1EB7p & Ma tr\u1EADn Kh\u1EAFc ph\u1EE5c",
|
|
9966
|
+
"Differentiated Support Strategies": "Chi\u1EBFn l\u01B0\u1EE3c H\u1ED7 tr\u1EE3 Ph\xE2n h\xF3a"
|
|
9967
|
+
},
|
|
9968
|
+
HANDOUT: {
|
|
9969
|
+
"Core Concepts": "Kh\xE1i ni\u1EC7m C\u1ED1t l\xF5i",
|
|
9970
|
+
"Core Syntax & Mechanism Cheat Sheet": "B\u1EA3ng Tra c\u1EE9u C\xFA ph\xE1p & C\u01A1 ch\u1EBF Tr\u1ECDng t\xE2m",
|
|
9971
|
+
"Visual Mental Model / Architecture Diagram": "M\xF4 h\xECnh T\u01B0 duy Tr\u1EF1c quan / S\u01A1 \u0111\u1ED3 Ki\u1EBFn tr\xFAc",
|
|
9972
|
+
"Step-by-Step Practical Quick-Start Guide": "H\u01B0\u1EDBng d\u1EABn Th\u1EF1c h\xE0nh T\u1EEBng b\u01B0\u1EDBc",
|
|
9973
|
+
"Self-Check Diagnostic Checklist": "B\u1EA3ng Ki\u1EC3m tra T\u1EF1 ch\u1EA9n \u0111o\xE1n"
|
|
9974
|
+
},
|
|
9975
|
+
WKS: {
|
|
9976
|
+
"Part 1: Knowledge Check": "Ph\u1EA7n 1: Ki\u1EC3m tra Ki\u1EBFn th\u1EE9c",
|
|
9977
|
+
"Part 2: Concept Tracing & Diagram Fill-in": "Ph\u1EA7n 2: L\u1EA7n v\u1EBFt Kh\xE1i ni\u1EC7m & \u0110i\u1EC1n S\u01A1 \u0111\u1ED3",
|
|
9978
|
+
"Part 3: Code Analysis & Bug Hunting Challenge": "Ph\u1EA7n 3: Ph\xE2n t\xEDch M\xE3 & Th\u1EED th\xE1ch S\u0103n l\u1ED7i",
|
|
9979
|
+
"Part 4: Synthesis & Problem-Solving Application": "Ph\u1EA7n 4: T\u1ED5ng h\u1EE3p & \u1EE8ng d\u1EE5ng Gi\u1EA3i quy\u1EBFt V\u1EA5n \u0111\u1EC1",
|
|
9980
|
+
"Part 5: Self-Reflection & Learning Log": "Ph\u1EA7n 5: T\u1EF1 suy ng\u1EABm & Nh\u1EADt k\xFD H\u1ECDc t\u1EADp"
|
|
9981
|
+
},
|
|
9982
|
+
EXT: {
|
|
9983
|
+
"For: Advanced Students / Extra Time": "D\xE0nh cho: H\u1ECDc sinh N\xE2ng cao / Ho\xE0n th\xE0nh S\u1EDBm",
|
|
9984
|
+
"Challenge 1: Mission Briefing & Real-World High-Stakes Scenario": "Th\u1EED th\xE1ch 1: B\u1ED1i c\u1EA3nh Nhi\u1EC7m v\u1EE5 Th\u1EF1c t\u1EBF & K\u1ECBch b\u1EA3n \u1EE8ng d\u1EE5ng",
|
|
9985
|
+
"Challenge 2: Advanced Architectural Constraints & Edge Cases": "Th\u1EED th\xE1ch 2: R\xE0ng bu\u1ED9c Ki\u1EBFn tr\xFAc N\xE2ng cao & Tr\u01B0\u1EDDng h\u1EE3p Bi\xEAn",
|
|
9986
|
+
"Challenge 3: Extension Milestones": "Th\u1EED th\xE1ch 3: C\xE1c M\u1ED1c Nhi\u1EC7m v\u1EE5 N\xE2ng cao",
|
|
9987
|
+
"Metacognitive Deep Dive & Engineering Trade-offs": "Suy ng\u1EABm Si\xEAu nh\u1EADn th\u1EE9c & \u0110\xE1nh \u0111\u1ED5i K\u1EF9 thu\u1EADt"
|
|
9988
|
+
},
|
|
9989
|
+
SLIDE: {
|
|
9990
|
+
"Title & Agenda": "Ti\xEAu \u0111\u1EC1 & M\u1EE5c l\u1EE5c",
|
|
9991
|
+
"Core Concepts": "Kh\xE1i ni\u1EC7m C\u1ED1t l\xF5i",
|
|
9992
|
+
"Guided Demonstration": "H\u01B0\u1EDBng d\u1EABn Th\u1EF1c h\xE0nh & Th\u1ECB ph\u1EA1m",
|
|
9993
|
+
"Hands-on Mission": "Nhi\u1EC7m v\u1EE5 Th\u1EF1c h\xE0nh Tr\u1EA3i nghi\u1EC7m",
|
|
9994
|
+
"Summary & Next Steps": "T\u1ED5ng k\u1EBFt & \u0110\u1ECBnh h\u01B0\u1EDBng Ti\u1EBFp theo"
|
|
9995
|
+
}
|
|
9996
|
+
};
|
|
9997
|
+
function extractSectionHeadingsFromSLC(slcInput, artifactType, targetLanguage = "vi") {
|
|
9998
|
+
const upperType = artifactType.trim().toUpperCase();
|
|
9999
|
+
const getFallback = () => {
|
|
10000
|
+
if (resolveTargetLanguageCode(targetLanguage) === "vi") {
|
|
10001
|
+
for (const [key, mapping] of Object.entries(DEFAULT_VIETNAMESE_SECTION_HEADINGS)) {
|
|
10002
|
+
if (matchesArtifactType(key, upperType)) {
|
|
10003
|
+
return mapping;
|
|
10004
|
+
}
|
|
10005
|
+
}
|
|
10006
|
+
}
|
|
10007
|
+
return {};
|
|
10008
|
+
};
|
|
10009
|
+
if (!slcInput) return getFallback();
|
|
10010
|
+
if (typeof slcInput === "object") {
|
|
10011
|
+
if (slcInput[upperType] && Object.keys(slcInput[upperType]).length > 0) return slcInput[upperType];
|
|
10012
|
+
for (const [key, mapping] of Object.entries(slcInput)) {
|
|
10013
|
+
if (matchesArtifactType(key, upperType) && Object.keys(mapping).length > 0) {
|
|
10014
|
+
return mapping;
|
|
10015
|
+
}
|
|
10016
|
+
}
|
|
10017
|
+
return getFallback();
|
|
10018
|
+
}
|
|
10019
|
+
const slcMarkdown = slcInput;
|
|
10020
|
+
const blocks = slcMarkdown.split(/\n(?=#{2,3}\s+[A-Z0-9_]+)/g);
|
|
10021
|
+
for (const block of blocks) {
|
|
10022
|
+
const headerMatch = block.match(/^#{2,3}\s+([A-Z0-9_]+)/);
|
|
10023
|
+
if (!headerMatch) continue;
|
|
10024
|
+
const blockType = headerMatch[1].trim().toUpperCase();
|
|
10025
|
+
if (matchesArtifactType(blockType, upperType)) {
|
|
10026
|
+
const mapping = {};
|
|
10027
|
+
const lines = block.split("\n");
|
|
10028
|
+
for (const line of lines) {
|
|
10029
|
+
const trimmed = line.trim();
|
|
10030
|
+
if (trimmed.startsWith("|") && !trimmed.includes("---")) {
|
|
10031
|
+
const cells = trimmed.split("|").map((c) => c.trim()).filter((_, idx, arr) => idx > 0 && idx < arr.length - 1);
|
|
10032
|
+
if (cells.length >= 2 && !cells[0].toLowerCase().includes("canonical") && !cells[1].toLowerCase().includes("localized")) {
|
|
10033
|
+
mapping[cells[0]] = cells[1];
|
|
10034
|
+
}
|
|
10035
|
+
} else {
|
|
10036
|
+
const bullet = line.match(/^[-*]\s+([^:]+):\s+(.+)$/);
|
|
10037
|
+
if (bullet) {
|
|
10038
|
+
mapping[bullet[1].trim()] = bullet[2].trim();
|
|
10039
|
+
}
|
|
10040
|
+
}
|
|
10041
|
+
}
|
|
10042
|
+
if (Object.keys(mapping).length > 0) return mapping;
|
|
10043
|
+
}
|
|
10044
|
+
}
|
|
10045
|
+
return getFallback();
|
|
10046
|
+
}
|
|
10047
|
+
function buildHeadingDirective(artifactType, slcMarkdown, targetLanguage = "vi") {
|
|
10048
|
+
const headings = extractSectionHeadingsFromSLC(slcMarkdown, artifactType, targetLanguage);
|
|
10049
|
+
if (Object.keys(headings).length === 0) {
|
|
10050
|
+
return "";
|
|
10051
|
+
}
|
|
10052
|
+
const lines = Object.entries(headings).map(
|
|
10053
|
+
([canonical, localized]) => ` - "${canonical}" -> Use Display Heading: "${localized}"`
|
|
10054
|
+
);
|
|
10055
|
+
return `MANDATORY SECTION HEADINGS FROM SECTION_LANGUAGE_CONTRACT:
|
|
10056
|
+
- The YAML frontmatter \`template_required_sections\` MUST preserve the exact English canonical keys.
|
|
10057
|
+
- In the markdown body, section headers MUST use the EXACT Localized Display Labels below (do NOT translate or paraphrase):
|
|
10058
|
+
${lines.join("\n")}
|
|
10059
|
+
- For example: if canonical section is "Computational Thinking Focus", your heading must be "## [REQUIRED] ${headings["Computational Thinking Focus"] || "Computational Thinking Focus"}".`;
|
|
10060
|
+
}
|
|
10061
|
+
|
|
9811
10062
|
// src/services/contextBuilder.ts
|
|
9812
10063
|
var DEFAULT_LESSON_PRIORITIES = [
|
|
9813
10064
|
"A. Lesson Design Plan",
|
|
@@ -10097,7 +10348,8 @@ var DEPTH_RULES = {
|
|
|
10097
10348
|
cio: "Write WHAT + WHY + HOW: include the mechanism, step by step, still technology-independent.",
|
|
10098
10349
|
sio: "Write WHAT + WHY + HOW + SPECIFIC: include concrete implementations and how the real project keywords are used."
|
|
10099
10350
|
};
|
|
10100
|
-
function buildSystemPrompt() {
|
|
10351
|
+
function buildSystemPrompt(targetLanguage = "vi") {
|
|
10352
|
+
const langDirective = buildLanguageDirective(targetLanguage);
|
|
10101
10353
|
return [
|
|
10102
10354
|
"You write KNOWLEDGE_EXPOSITION: self-study reading material for a student in a teacherless program.",
|
|
10103
10355
|
"Rules:",
|
|
@@ -10106,12 +10358,22 @@ function buildSystemPrompt() {
|
|
|
10106
10358
|
"3. Respect each concept depth target (ULO/CIO/SIO) \u2014 do not overshoot.",
|
|
10107
10359
|
"4. Student-facing only: no teacher instructions, no classroom management text.",
|
|
10108
10360
|
"5. Output the full markdown document following the provided section skeleton exactly (headers and placeholders preserved).",
|
|
10109
|
-
|
|
10361
|
+
langDirective
|
|
10110
10362
|
].join("\n");
|
|
10111
10363
|
}
|
|
10112
|
-
function buildUserPrompt(session, plan, glossary) {
|
|
10364
|
+
function buildUserPrompt(session, plan, glossary, targetLanguage = "vi", slcMarkdown) {
|
|
10113
10365
|
const depthLines = session.depth_assignments.map((d) => "- " + d.node_id + " [" + d.depth.toUpperCase() + "]: " + DEPTH_RULES[d.depth]).join("\n");
|
|
10114
10366
|
const termLines = glossary.map((g) => "- " + g.term + (g.definition ? " \u2014 " + g.definition : "") + (g.example ? " (example: " + g.example + ")" : "")).join("\n");
|
|
10367
|
+
const langCode = resolveTargetLanguageCode(targetLanguage);
|
|
10368
|
+
const headings = extractSectionHeadingsFromSLC(slcMarkdown, "KNOWLEDGE_EXPOSITION");
|
|
10369
|
+
const hScope = headings["Session Scope"] || (langCode === "vi" ? "Ph\u1EA1m vi Bu\u1ED5i h\u1ECDc" : "Session Scope");
|
|
10370
|
+
const hTerms = headings["Key Terms"] || (langCode === "vi" ? "Thu\u1EADt ng\u1EEF Then ch\u1ED1t" : "Key Terms");
|
|
10371
|
+
const hNarratives = headings["Concept Narratives"] || (langCode === "vi" ? "Di\u1EC5n gi\u1EA3i Kh\xE1i ni\u1EC7m" : "Concept Narratives");
|
|
10372
|
+
const hExamples = headings["Worked Micro-Examples"] || (langCode === "vi" ? "V\xED d\u1EE5 M\u1EABu Chi ti\u1EBFt" : "Worked Micro-Examples");
|
|
10373
|
+
const hMistakes = headings["Common Mistakes"] || (langCode === "vi" ? "L\u1ED7i Th\u01B0\u1EDDng g\u1EB7p & Kh\u1EAFc ph\u1EE5c" : "Common Mistakes");
|
|
10374
|
+
const hQuestions = headings["Self-Check Questions"] || (langCode === "vi" ? "C\xE2u h\u1ECFi T\u1EF1 ki\u1EC3m tra" : "Self-Check Questions");
|
|
10375
|
+
const skeleton = `## ${hScope} / ## ${hTerms} / ## ${hNarratives} / ## ${hExamples} / ## ${hMistakes} / ## ${hQuestions}`;
|
|
10376
|
+
const headingDirective = buildHeadingDirective("KNOWLEDGE_EXPOSITION", slcMarkdown, targetLanguage);
|
|
10115
10377
|
return [
|
|
10116
10378
|
"Session: " + session.id + " \u2014 " + session.title,
|
|
10117
10379
|
"Objective: " + session.prose_objective,
|
|
@@ -10126,9 +10388,10 @@ function buildUserPrompt(session, plan, glossary) {
|
|
|
10126
10388
|
termLines || "(none provided \u2014 write definitions and mark them for glossary sync)",
|
|
10127
10389
|
"",
|
|
10128
10390
|
"Section skeleton to fill (replace ONLY the {{placeholders}}):",
|
|
10129
|
-
|
|
10391
|
+
skeleton,
|
|
10392
|
+
headingDirective ? "\n" + headingDirective : "",
|
|
10130
10393
|
"Plan hash: " + plan.plan_hash
|
|
10131
|
-
].join("\n");
|
|
10394
|
+
].filter(Boolean).join("\n");
|
|
10132
10395
|
}
|
|
10133
10396
|
async function ensureKnowledgeExposition(options) {
|
|
10134
10397
|
const { projectId, lessonCode, plan, glossary, llmFn, storage } = options;
|
|
@@ -10144,11 +10407,18 @@ async function ensureKnowledgeExposition(options) {
|
|
|
10144
10407
|
if (plan.approval.plan_hash !== plan.plan_hash) {
|
|
10145
10408
|
throw new ExpositionApprovalError("Approval hash " + plan.approval.plan_hash + " does not match current plan hash " + plan.plan_hash + " \u2014 re-approve after plan changes");
|
|
10146
10409
|
}
|
|
10147
|
-
const
|
|
10410
|
+
const targetLanguage = options.targetLanguage || plan.translation?.target_language || "vi";
|
|
10411
|
+
const content = (await llmFn(
|
|
10412
|
+
buildSystemPrompt(targetLanguage),
|
|
10413
|
+
buildUserPrompt(session, plan, glossary, targetLanguage, options.slcMarkdown)
|
|
10414
|
+
)).trim();
|
|
10148
10415
|
if (content.length < 200) {
|
|
10149
10416
|
throw new Error("EXPOSITION too short for " + lessonCode + " (" + content.length + " chars) \u2014 refusing to save");
|
|
10150
10417
|
}
|
|
10151
|
-
|
|
10418
|
+
const hasKeyTerms = content.includes("Key Terms") || content.includes("Thu\u1EADt ng\u1EEF");
|
|
10419
|
+
const hasNarratives = content.includes("Concept Narratives") || content.includes("Kh\xE1i ni\u1EC7m") || content.includes("Di\u1EC5n gi\u1EA3i");
|
|
10420
|
+
const hasSelfCheck = content.includes("Self-Check") || content.includes("T\u1EF1 ki\u1EC3m tra") || content.includes("C\xE2u h\u1ECFi");
|
|
10421
|
+
if (!hasKeyTerms || !hasNarratives || !hasSelfCheck) {
|
|
10152
10422
|
throw new Error("EXPOSITION missing required sections for " + lessonCode + " \u2014 refusing to save");
|
|
10153
10423
|
}
|
|
10154
10424
|
const gateMode = gateModeFor(options.gates ?? {}, "KNOWLEDGE_EXPOSITION");
|
|
@@ -10210,16 +10480,20 @@ async function ensureExpositionForLesson(storage, projectId, lessonCode, options
|
|
|
10210
10480
|
const scopedTerms = new Set(plan.glossary_scope.find((g) => g.session_id === lessonCode)?.terms ?? []);
|
|
10211
10481
|
glossary = glossary.filter((g) => scopedTerms.has(g.term));
|
|
10212
10482
|
const { runCurriculumAIInference: runCurriculumAIInference2 } = await Promise.resolve().then(() => (init_streamRunner(), streamRunner_exports));
|
|
10483
|
+
const targetLang = options.targetLanguage || plan.translation?.target_language || "vi";
|
|
10213
10484
|
const result = await ensureKnowledgeExposition({
|
|
10214
10485
|
projectId,
|
|
10215
10486
|
lessonCode,
|
|
10216
10487
|
plan,
|
|
10217
10488
|
glossary,
|
|
10489
|
+
targetLanguage: targetLang,
|
|
10490
|
+
slcMarkdown: options.slcMarkdown,
|
|
10218
10491
|
llmFn: async (systemPrompt, userPrompt) => {
|
|
10492
|
+
const runnerOpts = options.customInference ? { customInference: options.customInference } : {};
|
|
10219
10493
|
const out = await runCurriculumAIInference2(
|
|
10220
10494
|
[{ role: "user", content: userPrompt + "\n\n[SYSTEM RULES]:\n" + systemPrompt }],
|
|
10221
|
-
|
|
10222
|
-
|
|
10495
|
+
`You are generating KNOWLEDGE_EXPOSITION - canonical self-study knowledge for one session in ${targetLang === "vi" ? "VIETNAMESE" : targetLang}. Output the complete markdown document only.`,
|
|
10496
|
+
runnerOpts
|
|
10223
10497
|
);
|
|
10224
10498
|
return out;
|
|
10225
10499
|
},
|
|
@@ -23967,90 +24241,6 @@ function extractStandardRefs(text) {
|
|
|
23967
24241
|
return Array.from(new Set(matches));
|
|
23968
24242
|
}
|
|
23969
24243
|
|
|
23970
|
-
// src/services/languageDirective.ts
|
|
23971
|
-
function resolveTargetLanguageCode(language) {
|
|
23972
|
-
const raw = String(language || "vi").trim().toLowerCase();
|
|
23973
|
-
if (raw.startsWith("vi")) return "vi";
|
|
23974
|
-
if (raw.startsWith("en")) return "en";
|
|
23975
|
-
return raw || "vi";
|
|
23976
|
-
}
|
|
23977
|
-
function targetLanguageDisplayName(code) {
|
|
23978
|
-
const map = {
|
|
23979
|
-
vi: "Vietnamese (Ti\u1EBFng Vi\u1EC7t)",
|
|
23980
|
-
en: "English (US)"
|
|
23981
|
-
};
|
|
23982
|
-
return map[code] || code;
|
|
23983
|
-
}
|
|
23984
|
-
function buildLanguageDirective(targetLanguage) {
|
|
23985
|
-
const code = resolveTargetLanguageCode(targetLanguage);
|
|
23986
|
-
const name = targetLanguageDisplayName(code);
|
|
23987
|
-
const perLanguageExamples = {
|
|
23988
|
-
vi: `- V\xED d\u1EE5 ti\xEAu \u0111\u1EC1 b\xE0i h\u1ECDc \u0111\xFAng chu\u1EA9n: "B\xE0i 1: Kh\xE1m ph\xE1 m\u1EA1ch \u0111i\u1EC7n c\u01A1 b\u1EA3n", "B\xE0i 2: \u0110i\u1EC1u khi\u1EC3n \u0111\xE8n LED nh\u1EA5p nh\xE1y" \u2014 KH\xD4NG d\xF9ng ti\xEAu \u0111\u1EC1 ti\u1EBFng Anh.`,
|
|
23989
|
-
en: `- Example compliant lesson title: "Lesson 1: Exploring Basic Circuits" \u2014 natural, idiomatic English throughout.`
|
|
23990
|
-
};
|
|
23991
|
-
const exampleLine = perLanguageExamples[code] || "";
|
|
23992
|
-
return `MANDATORY LANGUAGE DIRECTIVE (TARGET OUTPUT LANGUAGE: ${name}):
|
|
23993
|
-
- The TARGET OUTPUT LANGUAGE for this course is ${name}. You MUST author the ENTIRE document in ${name}.
|
|
23994
|
-
- All section titles, table headers, table cells, lesson names, learning objectives, pedagogical narratives, and cognitive analyses MUST be written in natural, fluent, academic ${name}.
|
|
23995
|
-
- Technical identifiers, code keywords (e.g. setup(), loop(), pinMode()), standard protocols (I2C, SPI, UART, GPIO), and component model numbers (ESP32, Arduino Uno) remain in standard technical notation, but all surrounding explanations MUST be in ${name}.
|
|
23996
|
-
- DO NOT mix in paragraphs, tables, or titles written in any other language. Strict adherence is required.${exampleLine ? `
|
|
23997
|
-
${exampleLine}` : ""}`;
|
|
23998
|
-
}
|
|
23999
|
-
function extractSectionHeadingsFromSLC(slcInput, artifactType) {
|
|
24000
|
-
if (!slcInput) return {};
|
|
24001
|
-
const upperType = artifactType.trim().toUpperCase();
|
|
24002
|
-
if (typeof slcInput === "object") {
|
|
24003
|
-
if (slcInput[upperType]) return slcInput[upperType];
|
|
24004
|
-
for (const [key, mapping] of Object.entries(slcInput)) {
|
|
24005
|
-
if (key.toUpperCase() === upperType || upperType.startsWith("LESSON") && key.toUpperCase().startsWith("LESSON")) {
|
|
24006
|
-
return mapping;
|
|
24007
|
-
}
|
|
24008
|
-
}
|
|
24009
|
-
return {};
|
|
24010
|
-
}
|
|
24011
|
-
const slcMarkdown = slcInput;
|
|
24012
|
-
const blocks = slcMarkdown.split(/\n(?=#{2,3}\s+[A-Z0-9_]+)/g);
|
|
24013
|
-
for (const block of blocks) {
|
|
24014
|
-
const headerMatch = block.match(/^#{2,3}\s+([A-Z0-9_]+)/);
|
|
24015
|
-
if (!headerMatch) continue;
|
|
24016
|
-
const blockType = headerMatch[1].trim().toUpperCase();
|
|
24017
|
-
if (blockType === upperType || upperType.startsWith("LESSON") && blockType.startsWith("LESSON")) {
|
|
24018
|
-
const mapping = {};
|
|
24019
|
-
const lines = block.split("\n");
|
|
24020
|
-
for (const line of lines) {
|
|
24021
|
-
const trimmed = line.trim();
|
|
24022
|
-
if (trimmed.startsWith("|") && !trimmed.includes("---")) {
|
|
24023
|
-
const cells = trimmed.split("|").map((c) => c.trim()).filter((_, idx, arr) => idx > 0 && idx < arr.length - 1);
|
|
24024
|
-
if (cells.length >= 2 && !cells[0].toLowerCase().includes("canonical") && !cells[1].toLowerCase().includes("localized")) {
|
|
24025
|
-
mapping[cells[0]] = cells[1];
|
|
24026
|
-
}
|
|
24027
|
-
} else {
|
|
24028
|
-
const bullet = line.match(/^[-*]\s+([^:]+):\s+(.+)$/);
|
|
24029
|
-
if (bullet) {
|
|
24030
|
-
mapping[bullet[1].trim()] = bullet[2].trim();
|
|
24031
|
-
}
|
|
24032
|
-
}
|
|
24033
|
-
}
|
|
24034
|
-
if (Object.keys(mapping).length > 0) return mapping;
|
|
24035
|
-
}
|
|
24036
|
-
}
|
|
24037
|
-
return {};
|
|
24038
|
-
}
|
|
24039
|
-
function buildHeadingDirective(artifactType, slcMarkdown, targetLanguage = "vi") {
|
|
24040
|
-
const headings = extractSectionHeadingsFromSLC(slcMarkdown, artifactType);
|
|
24041
|
-
if (Object.keys(headings).length === 0) {
|
|
24042
|
-
return "";
|
|
24043
|
-
}
|
|
24044
|
-
const lines = Object.entries(headings).map(
|
|
24045
|
-
([canonical, localized]) => ` - "${canonical}" -> Use Display Heading: "${localized}"`
|
|
24046
|
-
);
|
|
24047
|
-
return `MANDATORY SECTION HEADINGS FROM SECTION_LANGUAGE_CONTRACT:
|
|
24048
|
-
- The YAML frontmatter \`template_required_sections\` MUST preserve the exact English canonical keys.
|
|
24049
|
-
- In the markdown body, section headers MUST use the EXACT Localized Display Labels below (do NOT translate or paraphrase):
|
|
24050
|
-
${lines.join("\n")}
|
|
24051
|
-
- For example: if canonical section is "Computational Thinking Focus", your heading must be "## [REQUIRED] ${headings["Computational Thinking Focus"] || "Computational Thinking Focus"}".`;
|
|
24052
|
-
}
|
|
24053
|
-
|
|
24054
24244
|
// src/services/lessonProductionService.ts
|
|
24055
24245
|
var __filename2 = typeof import.meta?.url === "string" && typeof fileURLToPath === "function" ? fileURLToPath(import.meta.url) : "";
|
|
24056
24246
|
var _resolvedDir = __filename2 ? path3.dirname(__filename2) : typeof __dirname !== "undefined" ? __dirname : process.cwd();
|
|
@@ -24464,7 +24654,10 @@ async function produceSingleLesson(storage, projectId, lessonId, options = {}) {
|
|
|
24464
24654
|
try {
|
|
24465
24655
|
const exposition = await ensureExpositionForLesson(storage, projectId, lessonCode, {
|
|
24466
24656
|
gates: resolveGateSettings(options.gateSettings),
|
|
24467
|
-
force: options.force
|
|
24657
|
+
force: options.force,
|
|
24658
|
+
targetLanguage: targetLang,
|
|
24659
|
+
slcMarkdown,
|
|
24660
|
+
customInference: options.customInference
|
|
24468
24661
|
});
|
|
24469
24662
|
if (exposition) {
|
|
24470
24663
|
const expoExcerpt = buildExpositionExcerpt(exposition.rawContent || exposition.context, {
|
|
@@ -25514,6 +25707,22 @@ ${buildHeadingDirective("CODE", slcMarkdown, targetLang)}`;
|
|
|
25514
25707
|
if (artifactScope.includes("EXT") && (!await storage.readArtifact(projectId, extRelPath) || force)) {
|
|
25515
25708
|
onProgress?.("@activity", `Authoring Advanced Extension Challenge: \`EXT_${lessonCode}.md\`...`, { artifactType: "EXT" });
|
|
25516
25709
|
const extDateStr = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
25710
|
+
const isVi = targetLang === "vi";
|
|
25711
|
+
const extHeadings = isVi ? {
|
|
25712
|
+
main: "# NHI\u1EC6M V\u1EE4 N\xC2NG CAO: [TI\xCAU \u0110\u1EC0 B\xC0I H\u1ECCC]",
|
|
25713
|
+
sub: "## D\xE0nh cho: H\u1ECDc sinh N\xE2ng cao / Ho\xE0n th\xE0nh S\u1EDBm",
|
|
25714
|
+
c1: "### Th\u1EED th\xE1ch 1: [T\xEAn th\u1EED th\xE1ch] (\u0110\u1ED9 kh\xF3: \u2B50\u2B50\u2B50) \u2014 B\u1ED1i c\u1EA3nh Nhi\u1EC7m v\u1EE5 Th\u1EF1c t\u1EBF & K\u1ECBch b\u1EA3n \u1EE8ng d\u1EE5ng",
|
|
25715
|
+
c2: "### Th\u1EED th\xE1ch 2: [T\xEAn th\u1EED th\xE1ch] (\u0110\u1ED9 kh\xF3: \u2B50\u2B50\u2B50\u2B50) \u2014 R\xE0ng bu\u1ED9c Ki\u1EBFn tr\xFAc N\xE2ng cao & Tr\u01B0\u1EDDng h\u1EE3p Bi\xEAn",
|
|
25716
|
+
c3: "### Th\u1EED th\xE1ch 3: [T\xEAn th\u1EED th\xE1ch] (\u0110\u1ED9 kh\xF3: \u2B50\u2B50\u2B50\u2B50\u2B50) \u2014 C\xE1c M\u1ED1c Nhi\u1EC7m v\u1EE5 N\xE2ng cao (C\u1EA5p 1: Kh\u1EDFi \u0111\u1ED9ng \u2192 C\u1EA5p 2: N\xE2ng cao \u2192 C\u1EA5p 3: Chuy\xEAn gia)",
|
|
25717
|
+
meta: "## [REQUIRED] Suy ng\u1EABm Si\xEAu nh\u1EADn th\u1EE9c & \u0110\xE1nh \u0111\u1ED5i K\u1EF9 thu\u1EADt"
|
|
25718
|
+
} : {
|
|
25719
|
+
main: "# EXTENSION TASKS: [LESSON TITLE]",
|
|
25720
|
+
sub: "## For: Advanced Students / Extra Time",
|
|
25721
|
+
c1: "### Challenge 1: [Name] (Difficulty: \u2B50\u2B50\u2B50) \u2014 Mission Briefing & Real-World High-Stakes Scenario",
|
|
25722
|
+
c2: "### Challenge 2: [Name] (Difficulty: \u2B50\u2B50\u2B50\u2B50) \u2014 Advanced Architectural Constraints & Edge Cases",
|
|
25723
|
+
c3: "### Challenge 3: [Name] (Difficulty: \u2B50\u2B50\u2B50\u2B50\u2B50) \u2014 Extension Milestones (Level 1: Ninja \u2192 Level 2: Guru \u2192 Level 3: Master)",
|
|
25724
|
+
meta: "## [REQUIRED] Metacognitive Deep Dive & Engineering Trade-offs"
|
|
25725
|
+
};
|
|
25517
25726
|
const extPrompt = `You are @activity (Lead STEM Specialist & Differentiated Extension Designer).
|
|
25518
25727
|
Based on Master Lesson Plan \`LESSON_${lessonCode}.md\`, author the advanced extension challenge: \`EXT_${lessonCode}.md\`.
|
|
25519
25728
|
|
|
@@ -25529,16 +25738,21 @@ deliverable: "P3-T8"
|
|
|
25529
25738
|
version: "v1.0"
|
|
25530
25739
|
date: "${extDateStr}"
|
|
25531
25740
|
template_contract: "artifact-template-v1"
|
|
25741
|
+
template_required_sections:
|
|
25742
|
+
- "Challenge 1: Mission Briefing & Real-World High-Stakes Scenario"
|
|
25743
|
+
- "Challenge 2: Advanced Architectural Constraints & Edge Cases"
|
|
25744
|
+
- "Challenge 3: Extension Milestones"
|
|
25745
|
+
- "Metacognitive Deep Dive & Engineering Trade-offs"
|
|
25532
25746
|
---
|
|
25533
25747
|
|
|
25534
|
-
|
|
25535
|
-
|
|
25748
|
+
${extHeadings.main}
|
|
25749
|
+
${extHeadings.sub}
|
|
25536
25750
|
|
|
25537
25751
|
2. Mandatory sections (matching EXT_template.md):
|
|
25538
|
-
-
|
|
25539
|
-
-
|
|
25540
|
-
-
|
|
25541
|
-
-
|
|
25752
|
+
- ${extHeadings.c1}
|
|
25753
|
+
- ${extHeadings.c2}
|
|
25754
|
+
- ${extHeadings.c3}
|
|
25755
|
+
- ${extHeadings.meta}
|
|
25542
25756
|
3. Output 100% clean Markdown directly \u2014 NO code fences around the document.
|
|
25543
25757
|
|
|
25544
25758
|
${languageDirective}
|
|
@@ -27678,6 +27892,7 @@ var pad22 = (n) => String(n).padStart(2, "0");
|
|
|
27678
27892
|
var esc = (s) => s.replace(/\|/g, "/").replace(/\n/g, " ").trim();
|
|
27679
27893
|
var BLOOM_OF_DEPTH = { ulo: "Understand", cio: "Apply", sio: "Create" };
|
|
27680
27894
|
function renderFrameworkFromPlan(plan, meta) {
|
|
27895
|
+
const isVi = meta.targetLanguage === "vi";
|
|
27681
27896
|
const dateStr = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
27682
27897
|
const totalSessions = plan.sessions.length;
|
|
27683
27898
|
const totalMinutes = plan.sessions.reduce(
|
|
@@ -27695,10 +27910,16 @@ function renderFrameworkFromPlan(plan, meta) {
|
|
|
27695
27910
|
const depthTops = [...new Set(s.depth_assignments.map((d) => d.depth))].map((d) => BLOOM_OF_DEPTH[d] ?? "Apply");
|
|
27696
27911
|
const bloom = depthTops[depthTops.length - 1] ?? "Apply";
|
|
27697
27912
|
const keyConcepts = s.new_keywords.length > 0 ? s.new_keywords.join(", ") : s.depth_assignments.map((d) => d.node_id).join(", ");
|
|
27698
|
-
const prereq = s.prerequisite_decisions.length > 0 ? s.prerequisite_decisions.filter((p) => p.decision === "taught_in_prior_lesson").length + " prior-taught, " + s.prerequisite_decisions.filter((p) => p.decision === "recap_in_lesson").length + " recap" : "None";
|
|
27913
|
+
const prereq = s.prerequisite_decisions.length > 0 ? s.prerequisite_decisions.filter((p) => p.decision === "taught_in_prior_lesson").length + " prior-taught, " + s.prerequisite_decisions.filter((p) => p.decision === "recap_in_lesson").length + " recap" : isVi ? "Kh\xF4ng" : "None";
|
|
27699
27914
|
const duration = s.knowledge_minutes + s.practice_minutes + s.overhead_minutes;
|
|
27700
27915
|
return "| " + pad22(i + 1) + " | " + s.id + " | " + esc(s.title) + " | " + s.unit_id + " | " + s.unit_id + "_M01 | " + esc(s.prose_objective) + " | " + esc(keyConcepts) + " | " + esc(s.exit_evidence[0] ?? "") + " | " + esc(prereq) + " | " + bloom + " | " + duration + " |";
|
|
27701
27916
|
}).join("\n");
|
|
27917
|
+
const courseOverviewHeader = isVi ? "## [REQUIRED] T\u1ED5ng quan Kh\xF3a h\u1ECDc" : "## [REQUIRED] Course Overview";
|
|
27918
|
+
const globalObjectivesHeader = isVi ? "## [REQUIRED] M\u1EE5c ti\xEAu H\u1ECDc t\u1EADp To\xE0n di\u1EC7n" : "## [REQUIRED] Global Learning Objectives";
|
|
27919
|
+
const structuralHierarchyHeader = isVi ? "## [REQUIRED] C\u1EA5u tr\xFAc Kh\xF3a h\u1ECDc (Unit & Module)" : "## [REQUIRED] Structural Hierarchy (Unit & Module)";
|
|
27920
|
+
const scopeSequenceHeader = isVi ? "## [REQUIRED] Ph\u1EA1m vi & Tr\xECnh t\u1EF1 Chi ti\u1EBFt (Scope & Sequence)" : "## [REQUIRED] Scope & Sequence (Detailed Roadmap)";
|
|
27921
|
+
const standardFormatHeader = isVi ? "## [REQUIRED] C\u1EA5u tr\xFAc B\xE0i h\u1ECDc Chu\u1EA9n" : "## [REQUIRED] Standard Lesson Format";
|
|
27922
|
+
const scopeTableHeader = isVi ? "| # | Lesson Code | Title | Unit | Module | Learning Objective (H\u1ECDc sinh l\xE0m \u0111\u01B0\u1EE3c g\xEC...) | Key Concepts (H\u1ECDc g\xEC) | Hands-on Deliverable (S\u1EA3n ph\u1EA9m bu\u1ED5i h\u1ECDc) | Prerequisites | Bloom | Duration (mins) |" : "| # | Lesson Code | Title | Unit | Module | Learning Objective (Students will be able to...) | Key Concepts (Hoc gi) | Hands-on Deliverable (Lam duoc gi) | Prerequisites | Bloom | Duration (mins) |";
|
|
27702
27923
|
return [
|
|
27703
27924
|
"---",
|
|
27704
27925
|
'id: "CURRICULUM-FRAMEWORK"',
|
|
@@ -27720,7 +27941,7 @@ function renderFrameworkFromPlan(plan, meta) {
|
|
|
27720
27941
|
"",
|
|
27721
27942
|
"_Projection of CURRICULUM_PLAN (hash " + plan.plan_hash + "). Approving this framework approves the per-session SCOPE recorded in the plan._",
|
|
27722
27943
|
"",
|
|
27723
|
-
|
|
27944
|
+
courseOverviewHeader,
|
|
27724
27945
|
"- **Official Course Name:** " + esc(meta.courseName),
|
|
27725
27946
|
meta.shortDescription ? "- **Short Description:** " + esc(meta.shortDescription) : "",
|
|
27726
27947
|
"- **Total Units:** " + plan.units.length,
|
|
@@ -27728,20 +27949,20 @@ function renderFrameworkFromPlan(plan, meta) {
|
|
|
27728
27949
|
"- **Total Duration:** ~" + totalHours + " hours (" + totalSessions + " sessions x " + plan.constraints.session_duration_minutes + " min).",
|
|
27729
27950
|
"- **Entry Level:** " + plan.constraints.entry_level + " (age band " + plan.constraints.age_band[0] + "-" + plan.constraints.age_band[1] + ").",
|
|
27730
27951
|
"",
|
|
27731
|
-
|
|
27952
|
+
globalObjectivesHeader,
|
|
27732
27953
|
...plan.course.objectives.map((o, i) => i + 1 + ". **[" + o.bloom + "]:** " + esc(o.statement)),
|
|
27733
27954
|
"",
|
|
27734
|
-
|
|
27955
|
+
structuralHierarchyHeader,
|
|
27735
27956
|
"| Unit | Module | Lessons | Module Objective | Lesson Codes |",
|
|
27736
27957
|
"|---|---|:---:|---|---|",
|
|
27737
27958
|
hierarchyRows || "| (none) | | | | |",
|
|
27738
27959
|
"",
|
|
27739
|
-
|
|
27740
|
-
|
|
27960
|
+
scopeSequenceHeader,
|
|
27961
|
+
scopeTableHeader,
|
|
27741
27962
|
"|:---:|:---:|---|---|---|---|---|---|---|:---:|:---:|",
|
|
27742
27963
|
scopeRows || "| 01 | U01_M01_L01 | (empty plan) | U01 | U01_M01 | - | - | - | None | Understand | " + plan.constraints.session_duration_minutes + " |",
|
|
27743
27964
|
"",
|
|
27744
|
-
|
|
27965
|
+
standardFormatHeader,
|
|
27745
27966
|
"- **Session duration:** " + plan.constraints.session_duration_minutes + " minutes (overhead " + String(plan.sessions[0]?.overhead_minutes ?? 0) + " min).",
|
|
27746
27967
|
"- **Knowledge/practice split per session:** see plan JSON (knowledge_minutes / practice_minutes).",
|
|
27747
27968
|
"- **Pedagogical flow:** 5E (Engage / Explore / Explain / Elaborate / Evaluate) unless policy overrides.",
|
|
@@ -30144,6 +30365,6 @@ function renderMediaPlaceholder(entry) {
|
|
|
30144
30365
|
return `> \u{1F5BC}\uFE0F [\u1EA2nh \u0111ang ch\u1EDD: ${entry.name} \u2014 s\u1EBD \u0111\u01B0\u1EE3c t\u1EA1o sau khi duy\u1EC7t media]`;
|
|
30145
30366
|
}
|
|
30146
30367
|
|
|
30147
|
-
export { ACT_TEMPLATE, ARTIFACT_DEPENDENCY_ROUTING, ARTIFACT_EXECUTION_ORDER, AcademicAuditor, ActiveLearningWorkflowSchema, ActivityLabSchema, ActivitySeqRowSchema, ActivityStepSchema, ArtifactContractRowSchema, AssessmentMapRowSchema, AssessmentObjectiveSchema, BELL_RINGER_TEMPLATE, BLOOM_ACTION_VERBS, BOM_TEMPLATE, BUNDLED_STANDARDS_PACK_IDS, BellRingerDaySchema, BellRingerSchema, BloomHintSchema, BloomLevelSchema, BloomTaxonomyEvaluator, BronzeTierSchema, CERConclusionSchema, CHOICE_BOARD_TEMPLATE, CODE_LAB_TEMPLATE, CURRICULUM_SLASH_COMMANDS, CardTierEnum, ChoiceBoardRubricRowSchema, ChoiceBoardSchema, ChoiceRuleSchema, ChoiceSquareSchema, ClassificationSchema, CodeHardwareFeasibilityEvaluator, CodeLabSchema, CodeSnippetSchema, CompetencyRubricRowSchema, ComputationalThinkingSchema, ConstructiveAlignmentEvaluator, CoreConceptSchema, CourseObjectiveSchema, CoverageReportSchema, CrossArtifactDriftEvaluator, CurriculumArtifactSchema, CurriculumError, CurriculumPlanSchema, CurriculumQualityReportSchema, DEFAULT_ARTIFACT_STREAM_IDLE_MS, DEFAULT_ARTIFACT_STREAM_TOTAL_MS, DEFAULT_ENABLED_PROVIDERS, DEFAULT_GATE_SETTINGS, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DependencyEdgeSchema, DepthAssignmentSchema, DepthLevelSchema, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuestionSchema, DiagnosticQuizSchema, EDPPhaseEnum, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, EntryLevelSchema, ExitTicketBugHuntSchema, ExitTicketMetacognitionSchema, ExitTicketQuickItemSchema, ExitTicketRecallPromptSchema, ExitTicketSchema, ExperimentalDesignSchema, ExpositionApprovalError, ExtensionChallengeSchema, ExtensionSchema, FileSystemCurriculumAdapter, FiveEFlowPhaseSchema, FiveEInstructionalEvaluator, FiveEPhaseEnum, FrameworkMappingSchema, FrameworkPackManifestSchema, FrameworkPackSchema, FrameworkStatementSchema, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, GlossaryQuickRefRowSchema, GlossarySchema, GlossaryTermSchema, GoldTierSchema, GradeBandSchema, GraphicOrganizerItemSchema, GraphicOrganizerSchema, HANDOUT_TEMPLATE, HandoutSchema, HandoutSectionSchema, InstructionSectionSchema, InstructionStepSchema, JudgeCriterionSchema, LAYER_IDLE_BUDGET_MS, LAYER_TOTAL_BUDGET_MS, LESSON_PLAN_TEMPLATE, LLMJudgeEngine, LabTierTaskSchema, LearningObjectiveInputSchema, LearningObjectiveRowSchema, LessonFlowPhaseSchema, LessonPlan5ESchema, LessonPlanEDPSchema, LessonPlanSchema, LessonSectionSchema, LocalWorkspaceManager, MappingKindSchema, MarpSlideSchema, MediaError, MediaLedger, MentorCheatsheetSchema, MilestoneInputSchema, MisconceptionEvaluator, MisconceptionSchema, ModelPolicyResolver, NVIDIA_MODELS, NodeKindSchema, OrganizerTypeEnum, PROJECT_INSTRUCTION_TEMPLATE, PhaseInputSchema, PlanConstraintsSchema, PlannerInputSchema, PlanningGraphSchema, PlanningNodeSchema, PrerequisiteDecisionEntrySchema, PrerequisiteDecisionSchema, ProductGoalSchema, ProgressiveHintsSchema, ProjectGraphSchema, ProjectInstructionSchema, ProjectProfileSchema, QUIZ_TEMPLATE, QualityAuditVerdictSchema, QuizOptionSchema, REVIEW_GAME_TEMPLATE, RUBRIC_TEMPLATE, RecordProvenanceSchema, ResourceMapRowSchema, ReviewGameExportRowSchema, ReviewGameQuestionSchema, ReviewGameSchema, RoadmapInputSchema, RotationStationSchema, RubricCriteriaSchema, RubricSchema, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_CANONICAL_METHODOLOGY, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STANDARD_REF_REGEX, STANDARD_SOT_FILES, STATION_ROTATION_TEMPLATE, ScaffoldDecisionEntrySchema, ScaffoldDecisionSchema, ScienceLabSchema, ScoringRubricRowSchema, SelfLabSchema, SelfPacedBundleSchema, SelfPacedChallengeSchema, SessionPlanSchema, SilverTierSchema, SlideDeckSchema, StandardizedTermRowSchema, StandardsRegistryAdapter, StationRecordRowSchema, StationRotationSchema, StationTypeEnum, SupabaseCurriculumAdapter, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TaskCardSchema, TaskCardsSchema, TeacherGuideSchema, TeachingScriptPhaseSchema, TierLevelEnum, TierObjectiveSchema, TieredPracticeSchema, TranslationPolicySchema, TroubleshootingEntrySchema, TroubleshootingRowSchema, UnitPlanSchema, UserJourneySchema, WORKSHEET_TEMPLATE, WorksheetItemSchema, WorksheetItemTypeEnum, WorksheetPartSchema, WorksheetSchema, activityTools, analystTools, analyzeProjectCreationIntent, assertAcyclic, assessorTools, auditCurriculumQualityFlow, auditQualityReport, buildActivityPrompt, buildCodeLabPrompt, buildCurriculumContext, buildCurriculumPlan, buildDeliveryPackages, buildDiagnosticQuizPrompt, buildExpositionContext, buildExpositionExcerpt, buildExtensionPrompt, buildHandoutPrompt, buildHeadingDirective, buildHtmlDeckSlidePrompt, buildImagePrompt, buildJudgePrompt, buildLanguageDirective, buildLessonExcerpt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildProjectInstructionPrompt, buildSectionAwareExcerpt, buildSelfLabPrompt, buildSessionSliceContext, buildSlidesPrompt, buildStandardStackMarkdown, buildStandardsContext, buildStandardsContextBlock, buildTeacherGuidePrompt, buildWorksheetPrompt, closeTruncatedJson, computeContentHash, computePackingSpec, conductPreliminaryResearch, contentTools, convertRoadmapToFoundationSot, createAiInferenceError, createContextMissingError, createCurriculumStorage, createIdleAbortController, createStreamAbortController, createStreamAbortSignal, createStreamChunkExtractor, curateMediaLedger, designerTools, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, evaluateStandardsCoverage, executeCurriculumCommand, exportAllProjectQuizzes, expositionCacheKey, extractScopeSequenceRows, extractSectionHeadingsFromSLC, extractSessionSlice, extractStandardRefs, extractStreamChunk, extractThoughtAndContent, findStandardStatement, formatQuizzesToCsv, fulfillMediaLedger, gateModeFor, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateEducationalImage, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateMilestoneCurriculumBundle, generatePhase1SotArtifacts, generatePhase2SotArtifacts, generateProjectInstruction, generateProjectInstructionFlow, generateRoadmapCurriculum, generateSelfLabFlow, generateSelfPacedBundle, generateSingleArtifact, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, getAIModel, getArtifactMetadata, getDesignatedFallbackChain, getDesignatedFallbackConfig, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, illustratorTools, importRoadmapToProject, ingestProjectGraphIntoProject, initializeProjectInStorage, injectMediaIntoMarkdown, isExpositionFresh, isModelAllowed, isProviderEnabled, isTranslationDue, lintAndSanitizeArtifact, lintCurriculumFramework, lintFrameworkPack, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, normalizeSlcContract, packagerTools, parseGateSettings, parseQuizMarkdown, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, publishToGitHub, publishToSupabase, rankGenCandidates, renderFrameworkFromPlan, renderMediaPlaceholder, researcherTools, resolveGateSettings, resolveStandardsPacks, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, reviewerTools, runCurriculumAIInference, safeParseJson, searchEducationalImages, searchEducationalVideos, selectStatementsForLesson, serializeActivityToMarkdown, serializeCodeLabToMarkdown, serializeDiagnosticQuizToMarkdown, serializeHandoutToMarkdown, serializeLessonToMarkdown, serializeProjectInstructionToMarkdown, serializeSelfLabToMarkdown, slugifyProjectName, streamCurriculumAIInference, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLLMWithFallback, streamLayerPrefillWithFallback, streamLessonMasterFlow, streamSelfLabFlow, stripLlmJsonWrappers, targetLanguageDisplayName, techSmeTools, topoSort, uploadAssetToBucket, validateArtifactDependencies, validateCurriculumPlan, validateFrameworkPack, validateMarkdownTables, validateMermaidSyntax, withAutoRepair };
|
|
30368
|
+
export { ACT_TEMPLATE, ARTIFACT_DEPENDENCY_ROUTING, ARTIFACT_EXECUTION_ORDER, AcademicAuditor, ActiveLearningWorkflowSchema, ActivityLabSchema, ActivitySeqRowSchema, ActivityStepSchema, ArtifactContractRowSchema, AssessmentMapRowSchema, AssessmentObjectiveSchema, BELL_RINGER_TEMPLATE, BLOOM_ACTION_VERBS, BOM_TEMPLATE, BUNDLED_STANDARDS_PACK_IDS, BellRingerDaySchema, BellRingerSchema, BloomHintSchema, BloomLevelSchema, BloomTaxonomyEvaluator, BronzeTierSchema, CERConclusionSchema, CHOICE_BOARD_TEMPLATE, CODE_LAB_TEMPLATE, CURRICULUM_SLASH_COMMANDS, CardTierEnum, ChoiceBoardRubricRowSchema, ChoiceBoardSchema, ChoiceRuleSchema, ChoiceSquareSchema, ClassificationSchema, CodeHardwareFeasibilityEvaluator, CodeLabSchema, CodeSnippetSchema, CompetencyRubricRowSchema, ComputationalThinkingSchema, ConstructiveAlignmentEvaluator, CoreConceptSchema, CourseObjectiveSchema, CoverageReportSchema, CrossArtifactDriftEvaluator, CurriculumArtifactSchema, CurriculumError, CurriculumPlanSchema, CurriculumQualityReportSchema, DEFAULT_ARTIFACT_STREAM_IDLE_MS, DEFAULT_ARTIFACT_STREAM_TOTAL_MS, DEFAULT_ENABLED_PROVIDERS, DEFAULT_GATE_SETTINGS, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DEFAULT_VIETNAMESE_SECTION_HEADINGS, DependencyEdgeSchema, DepthAssignmentSchema, DepthLevelSchema, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuestionSchema, DiagnosticQuizSchema, EDPPhaseEnum, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, EntryLevelSchema, ExitTicketBugHuntSchema, ExitTicketMetacognitionSchema, ExitTicketQuickItemSchema, ExitTicketRecallPromptSchema, ExitTicketSchema, ExperimentalDesignSchema, ExpositionApprovalError, ExtensionChallengeSchema, ExtensionSchema, FileSystemCurriculumAdapter, FiveEFlowPhaseSchema, FiveEInstructionalEvaluator, FiveEPhaseEnum, FrameworkMappingSchema, FrameworkPackManifestSchema, FrameworkPackSchema, FrameworkStatementSchema, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, GlossaryQuickRefRowSchema, GlossarySchema, GlossaryTermSchema, GoldTierSchema, GradeBandSchema, GraphicOrganizerItemSchema, GraphicOrganizerSchema, HANDOUT_TEMPLATE, HandoutSchema, HandoutSectionSchema, InstructionSectionSchema, InstructionStepSchema, JudgeCriterionSchema, LAYER_IDLE_BUDGET_MS, LAYER_TOTAL_BUDGET_MS, LESSON_PLAN_TEMPLATE, LLMJudgeEngine, LabTierTaskSchema, LearningObjectiveInputSchema, LearningObjectiveRowSchema, LessonFlowPhaseSchema, LessonPlan5ESchema, LessonPlanEDPSchema, LessonPlanSchema, LessonSectionSchema, LocalWorkspaceManager, MappingKindSchema, MarpSlideSchema, MediaError, MediaLedger, MentorCheatsheetSchema, MilestoneInputSchema, MisconceptionEvaluator, MisconceptionSchema, ModelPolicyResolver, NVIDIA_MODELS, NodeKindSchema, OrganizerTypeEnum, PROJECT_INSTRUCTION_TEMPLATE, PhaseInputSchema, PlanConstraintsSchema, PlannerInputSchema, PlanningGraphSchema, PlanningNodeSchema, PrerequisiteDecisionEntrySchema, PrerequisiteDecisionSchema, ProductGoalSchema, ProgressiveHintsSchema, ProjectGraphSchema, ProjectInstructionSchema, ProjectProfileSchema, QUIZ_TEMPLATE, QualityAuditVerdictSchema, QuizOptionSchema, REVIEW_GAME_TEMPLATE, RUBRIC_TEMPLATE, RecordProvenanceSchema, ResourceMapRowSchema, ReviewGameExportRowSchema, ReviewGameQuestionSchema, ReviewGameSchema, RoadmapInputSchema, RotationStationSchema, RubricCriteriaSchema, RubricSchema, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_CANONICAL_METHODOLOGY, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STANDARD_REF_REGEX, STANDARD_SOT_FILES, STATION_ROTATION_TEMPLATE, ScaffoldDecisionEntrySchema, ScaffoldDecisionSchema, ScienceLabSchema, ScoringRubricRowSchema, SelfLabSchema, SelfPacedBundleSchema, SelfPacedChallengeSchema, SessionPlanSchema, SilverTierSchema, SlideDeckSchema, StandardizedTermRowSchema, StandardsRegistryAdapter, StationRecordRowSchema, StationRotationSchema, StationTypeEnum, SupabaseCurriculumAdapter, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TaskCardSchema, TaskCardsSchema, TeacherGuideSchema, TeachingScriptPhaseSchema, TierLevelEnum, TierObjectiveSchema, TieredPracticeSchema, TranslationPolicySchema, TroubleshootingEntrySchema, TroubleshootingRowSchema, UnitPlanSchema, UserJourneySchema, WORKSHEET_TEMPLATE, WorksheetItemSchema, WorksheetItemTypeEnum, WorksheetPartSchema, WorksheetSchema, activityTools, analystTools, analyzeProjectCreationIntent, assertAcyclic, assessorTools, auditCurriculumQualityFlow, auditQualityReport, buildActivityPrompt, buildCodeLabPrompt, buildCurriculumContext, buildCurriculumPlan, buildDeliveryPackages, buildDiagnosticQuizPrompt, buildExpositionContext, buildExpositionExcerpt, buildExtensionPrompt, buildHandoutPrompt, buildHeadingDirective, buildHtmlDeckSlidePrompt, buildImagePrompt, buildJudgePrompt, buildLanguageDirective, buildLessonExcerpt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildProjectInstructionPrompt, buildSectionAwareExcerpt, buildSelfLabPrompt, buildSessionSliceContext, buildSlidesPrompt, buildStandardStackMarkdown, buildStandardsContext, buildStandardsContextBlock, buildTeacherGuidePrompt, buildWorksheetPrompt, closeTruncatedJson, computeContentHash, computePackingSpec, conductPreliminaryResearch, contentTools, convertRoadmapToFoundationSot, createAiInferenceError, createContextMissingError, createCurriculumStorage, createIdleAbortController, createStreamAbortController, createStreamAbortSignal, createStreamChunkExtractor, curateMediaLedger, designerTools, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, evaluateStandardsCoverage, executeCurriculumCommand, exportAllProjectQuizzes, expositionCacheKey, extractScopeSequenceRows, extractSectionHeadingsFromSLC, extractSessionSlice, extractStandardRefs, extractStreamChunk, extractThoughtAndContent, findStandardStatement, formatQuizzesToCsv, fulfillMediaLedger, gateModeFor, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateEducationalImage, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateMilestoneCurriculumBundle, generatePhase1SotArtifacts, generatePhase2SotArtifacts, generateProjectInstruction, generateProjectInstructionFlow, generateRoadmapCurriculum, generateSelfLabFlow, generateSelfPacedBundle, generateSingleArtifact, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, getAIModel, getArtifactMetadata, getDesignatedFallbackChain, getDesignatedFallbackConfig, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, illustratorTools, importRoadmapToProject, ingestProjectGraphIntoProject, initializeProjectInStorage, injectMediaIntoMarkdown, isExpositionFresh, isModelAllowed, isProviderEnabled, isTranslationDue, lintAndSanitizeArtifact, lintCurriculumFramework, lintFrameworkPack, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, normalizeSlcContract, packagerTools, parseGateSettings, parseQuizMarkdown, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, publishToGitHub, publishToSupabase, rankGenCandidates, renderFrameworkFromPlan, renderMediaPlaceholder, researcherTools, resolveGateSettings, resolveStandardsPacks, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, reviewerTools, runCurriculumAIInference, safeParseJson, searchEducationalImages, searchEducationalVideos, selectStatementsForLesson, serializeActivityToMarkdown, serializeCodeLabToMarkdown, serializeDiagnosticQuizToMarkdown, serializeHandoutToMarkdown, serializeLessonToMarkdown, serializeProjectInstructionToMarkdown, serializeSelfLabToMarkdown, slugifyProjectName, streamCurriculumAIInference, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLLMWithFallback, streamLayerPrefillWithFallback, streamLessonMasterFlow, streamSelfLabFlow, stripLlmJsonWrappers, targetLanguageDisplayName, techSmeTools, topoSort, uploadAssetToBucket, validateArtifactDependencies, validateCurriculumPlan, validateFrameworkPack, validateMarkdownTables, validateMermaidSyntax, withAutoRepair };
|
|
30148
30369
|
//# sourceMappingURL=index.mjs.map
|
|
30149
30370
|
//# sourceMappingURL=index.mjs.map
|