@thanh01.pmt/curriculum-kit 1.2.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -5421,6 +5421,54 @@ ${input.languageDirective}
5421
5421
 
5422
5422
  ${input.headingDirective}`.trim();
5423
5423
  }
5424
+ function buildHtmlDeckSlidePrompt(input) {
5425
+ const contract = input.customContract || `## HTML SLIDE ENGINE \u2014 AGENT GENERATION CONTRACT
5426
+ You generate structured slide decks for the LearnWell HTML Slide Presentation Engine.
5427
+ Your output MUST be a single, valid JSON object matching the Slide Deck JSON schema below.
5428
+
5429
+ ### \u{1F3A8} Available Layout Presets (Use layoutId):
5430
+ 1. **hero-cover**: Title/Cover slide with title, subtitle, presenter, date, tag.
5431
+ 2. **two-column-split**: Side-by-side comparison (col1Title, col1Items[], col2Title, col2Items[]).
5432
+ 3. **code-explainer**: Code walkthrough with filename, language, code, highlightLines, annotations[].
5433
+ 4. **metrics-3-card**: 3 key stat cards (card1Title, card1Val, card1Desc, card2..., card3...).
5434
+ 5. **process-flow**: Step-by-step pipeline (steps: [{ label, desc, status }]).
5435
+ 6. **quiz-checkpoint**: Quick multiple choice question (question, options[], answerIdx, explanation).
5436
+ 7. **tiered-practice-3cards**: Differentiated tiers (foundation, standard, challenge cards).
5437
+ 8. **takeaways-summary**: Summary review with bullet takeaways.
5438
+
5439
+ ### \u{1F399}\uFE0F Mandatory 3-Part Presenter Notes on EVERY slide:
5440
+ Every slide MUST include notes with:
5441
+ - Talk Track: 2-3 sentences speaking script
5442
+ - Cold-Call: 1 check question
5443
+ - Scaffolding Tip: 1 analogy or hint
5444
+
5445
+ ### Output JSON Format:
5446
+ \`\`\`json
5447
+ {
5448
+ "title": "${input.lessonTitle}",
5449
+ "theme": "ocean",
5450
+ "slides": [
5451
+ {
5452
+ "layoutId": "hero-cover",
5453
+ "slots": { "title": "${input.lessonTitle}", "subtitle": "..." },
5454
+ "notes": "Talk Track: ...\\nCold-Call: ...\\nScaffolding Tip: ..."
5455
+ }
5456
+ ]
5457
+ }
5458
+ \`\`\``;
5459
+ return `You are @illustrator & @content (Interactive HTML Slide Deck Presentation Architects).
5460
+ Based on Master Lesson Plan \`LESSON_${input.lessonCode}.md\`, pedagogical model (${input.pedagogyLabel}), and the HTML SLIDE ENGINE CONTRACT below, author the complete, highly engaging HTML presentation deck in JSON format: \`SLIDE_${input.lessonCode}\`.
5461
+
5462
+ ${contract}
5463
+
5464
+ ${input.languageDirective}
5465
+
5466
+ ${input.headingDirective}${input.glossaryBlock ? `
5467
+
5468
+ ${input.glossaryBlock}` : ""}
5469
+
5470
+ Output ONLY the raw JSON object. Do not include extra conversational text or markdown code fences.`.trim();
5471
+ }
5424
5472
 
5425
5473
  // src/ai/prompts/teacherGuidePrompt.ts
5426
5474
  function buildTeacherGuidePrompt(input) {
@@ -9783,6 +9831,7 @@ function buildSectionAwareExcerpt(markdown, opts = {}) {
9783
9831
  }
9784
9832
  const slcMap = normalizeSlcContract(opts.sectionLanguageContract);
9785
9833
  const sections = parseMarkdownSections(source, slcMap, opts.artifactType);
9834
+ const metaBlock = buildMetaBlock(source);
9786
9835
  if (sections.length === 0) {
9787
9836
  issues.push("parse:no-sections");
9788
9837
  const excerpt2 = truncateByBudget(source, budget);
@@ -9816,12 +9865,13 @@ function buildSectionAwareExcerpt(markdown, opts = {}) {
9816
9865
  const block = `## ${heading}
9817
9866
 
9818
9867
  ${trimmedBody}`;
9819
- if (used + block.length > budget && blocks.length > 0) return false;
9868
+ if (used + block.length > budget && used > 0) return false;
9820
9869
  blocks.push(block);
9821
9870
  used += block.length;
9822
9871
  includedSections.push(key);
9823
9872
  return true;
9824
9873
  };
9874
+ blocks.push(metaBlock);
9825
9875
  let sectionAware = false;
9826
9876
  for (const key of priorities) {
9827
9877
  const sec = byCanonical.get(key);
@@ -9838,6 +9888,9 @@ ${trimmedBody}`;
9838
9888
  if (used >= budget) break;
9839
9889
  if (!tryAdd(sec.cleanTitle, sec.body, sec.cleanTitle)) break;
9840
9890
  }
9891
+ if (includedSections.length === 0 && unmatched.length > 0) {
9892
+ issues.push("parse:no-canonical-resolution");
9893
+ }
9841
9894
  if (priorities.length > 0 && !priorities.some((k) => includedSections.includes(k))) {
9842
9895
  issues.push("parse:no-priority-resolution");
9843
9896
  }
@@ -9846,14 +9899,14 @@ ${trimmedBody}`;
9846
9899
  excerpt = truncateByBudget(excerpt, budget);
9847
9900
  }
9848
9901
  const effectiveMinChars = Math.min(minContentChars, source.length);
9849
- if (excerpt.length < effectiveMinChars) {
9902
+ if (excerpt.length - metaBlock.length < effectiveMinChars) {
9850
9903
  issues.push("content:insufficient");
9851
9904
  }
9852
- const verified = !issues.includes("parse:no-priority-resolution") && excerpt.length >= effectiveMinChars;
9905
+ const verified = !issues.includes("parse:no-priority-resolution") && !issues.includes("parse:no-canonical-resolution") && excerpt.length - metaBlock.length >= effectiveMinChars;
9853
9906
  return {
9854
9907
  excerpt,
9855
9908
  verified,
9856
- sectionAware: sectionAware || priorities.length === 0 && sections.length > 0,
9909
+ sectionAware: sectionAware || unmatched.length === 0,
9857
9910
  includedSections,
9858
9911
  issues,
9859
9912
  tokenEstimate: Math.round(excerpt.length / 4)
@@ -9969,6 +10022,18 @@ function truncateByBudget(source, budget) {
9969
10022
  if (fenceCount % 2 === 1) cut += "\n```";
9970
10023
  return cut;
9971
10024
  }
10025
+ function buildMetaBlock(source) {
10026
+ const fm = source.match(/^---\s*\r?\n([\s\S]*?)\r?\n---/);
10027
+ const pick = (key) => {
10028
+ if (!fm) return "";
10029
+ const m = fm[1].match(new RegExp(`^${key}:\\s*"?([^"\\n]+)"?`, "m"));
10030
+ return (m?.[1] || "").trim();
10031
+ };
10032
+ const id = pick("id");
10033
+ const title = pick("title");
10034
+ const type = pick("type");
10035
+ return `<!-- SOURCE: ${type || "ARTIFACT"} | ${id || "unknown"}${title ? ` \u2014 ${title}` : ""} (section-aware excerpt; canonical knowledge, do not contradict) -->`;
10036
+ }
9972
10037
 
9973
10038
  // src/services/knowledgeExpositionService.ts
9974
10039
  var EXPOSITION_REL = (lessonCode) => "_sot/expositions/" + lessonCode + ".md";
@@ -10117,7 +10182,7 @@ async function ensureExpositionForLesson(storage, projectId, lessonCode, options
10117
10182
  storage,
10118
10183
  gates: options.gates
10119
10184
  });
10120
- return { relPath: result.relPath, context: buildExpositionContext(result.content), reused: result.reused };
10185
+ return { relPath: result.relPath, context: buildExpositionContext(result.content), reused: result.reused, rawContent: result.content };
10121
10186
  }
10122
10187
  init_errors();
10123
10188
  var asArr = (v) => Array.isArray(v) ? v : [];
@@ -11828,6 +11893,8 @@ async function produceSingleLesson(storage, projectId, lessonId, options = {}) {
11828
11893
  targetLang = targetLang || "vi";
11829
11894
  const languageDirective = buildLanguageDirective(targetLang);
11830
11895
  let expositionContext = "";
11896
+ let expositionInjection;
11897
+ let lessonInjection;
11831
11898
  let sessionSliceContext = "";
11832
11899
  try {
11833
11900
  const exposition = await ensureExpositionForLesson(storage, projectId, lessonCode, {
@@ -11835,7 +11902,18 @@ async function produceSingleLesson(storage, projectId, lessonId, options = {}) {
11835
11902
  force: options.force
11836
11903
  });
11837
11904
  if (exposition) {
11838
- expositionContext = exposition.context;
11905
+ const expoExcerpt = buildExpositionExcerpt(exposition.rawContent || exposition.context, {
11906
+ budget: 6e3,
11907
+ sectionLanguageContract: slcMarkdown,
11908
+ artifactType: "KNOWLEDGE_EXPOSITION"
11909
+ });
11910
+ expositionContext = expoExcerpt.excerpt || exposition.context;
11911
+ expositionInjection = {
11912
+ source: "KNOWLEDGE_EXPOSITION",
11913
+ verified: expoExcerpt.verified,
11914
+ sectionAware: expoExcerpt.sectionAware,
11915
+ issues: expoExcerpt.issues
11916
+ };
11839
11917
  onProgress?.("@content", `[EXPOSITION] ${exposition.reused ? "Reused" : "Generated"} \`\${exposition.relPath}\` (plan-driven knowledge source)...`);
11840
11918
  } else {
11841
11919
  onProgress?.("@content", "[EXPOSITION] No CURRICULUM_PLAN.json \u2014 running legacy knowledge flow (no plan-driven exposition).");
@@ -12075,6 +12153,7 @@ ${yamlBlock.trim()}
12075
12153
  };
12076
12154
  var injectYamlReviewMetadata = injectYamlReviewMetadata2;
12077
12155
  const judgeObjectives = parseLessonObjectives(lessonContent, concept, bloomLevel);
12156
+ const judgeExpositionExcerpt = expositionContext ? buildExpositionExcerpt(expositionContext, { budget: 3e3, sectionLanguageContract: slcMarkdown, artifactType: "KNOWLEDGE_EXPOSITION" }).excerpt : void 0;
12078
12157
  const judgeResult = await LLMJudgeEngine.evaluateArtifactWithLLM({
12079
12158
  targetArtifactType: "LESSON",
12080
12159
  lessonId: lessonCode,
@@ -12086,7 +12165,7 @@ ${yamlBlock.trim()}
12086
12165
  title: lessonTitle,
12087
12166
  frameworkExcerpt: framework ? buildFrameworkExcerptForLesson(framework, lessonId) : void 0,
12088
12167
  styleGuideExcerpt: effectiveStyleGuide || void 0,
12089
- canonicalExposition: expositionContext ? expositionContext.slice(0, 3e3) : void 0
12168
+ canonicalExposition: judgeExpositionExcerpt
12090
12169
  }),
12091
12170
  standardStatements: Object.keys(standardStatements).length > 0 ? standardStatements : void 0
12092
12171
  });
@@ -12141,6 +12220,16 @@ ${currentContent}` }],
12141
12220
  options.onProgress?.("@repair", chunk, { type: type || "content", artifactType: "LESSON" });
12142
12221
  }
12143
12222
  );
12223
+ const repairedExcerptCheck = buildSectionAwareExcerpt(repairedRaw, {
12224
+ priorities: DEFAULT_LESSON_PRIORITIES,
12225
+ budget: 12e3,
12226
+ sectionLanguageContract: slcMarkdown,
12227
+ artifactType: "LESSON"
12228
+ });
12229
+ if (repairedExcerptCheck.issues.includes("parse:no-priority-resolution")) {
12230
+ onProgress?.("@repair", `\u26A0\uFE0F Repair round ${round} lost mandatory section structure (no priority section resolved) \u2014 rejecting repaired draft, retaining previous`);
12231
+ break;
12232
+ }
12144
12233
  if (!repairedRaw || repairedRaw.startsWith("\u26A0\uFE0F") || repairedRaw.length < 200) {
12145
12234
  onProgress?.("@repair", `\u26A0\uFE0F Repair round ${round} produced invalid output \u2014 stopping repair loop`);
12146
12235
  break;
@@ -12165,7 +12254,7 @@ ${currentContent}` }],
12165
12254
  title: lessonTitle,
12166
12255
  frameworkExcerpt: framework ? buildFrameworkExcerptForLesson(framework, lessonId) : void 0,
12167
12256
  styleGuideExcerpt: effectiveStyleGuide || void 0,
12168
- canonicalExposition: expositionContext ? expositionContext.slice(0, 3e3) : void 0
12257
+ canonicalExposition: expositionContext ? buildExpositionExcerpt(expositionContext, { budget: 3e3, sectionLanguageContract: slcMarkdown, artifactType: "KNOWLEDGE_EXPOSITION" }).excerpt : void 0
12169
12258
  }),
12170
12259
  standardStatements: Object.keys(standardStatements).length > 0 ? standardStatements : void 0
12171
12260
  });
@@ -12223,7 +12312,9 @@ ${currentContent}` }],
12223
12312
  pedagogy,
12224
12313
  producedArtifacts,
12225
12314
  pausedForReview: true,
12226
- gateStatus: "judge_needs_revision"
12315
+ gateStatus: "judge_needs_revision",
12316
+ contextInjection: expositionInjection || lessonInjection,
12317
+ promptChars: commonContext.length
12227
12318
  };
12228
12319
  }
12229
12320
  }
@@ -12246,7 +12337,9 @@ ${currentContent}` }],
12246
12337
  pedagogy,
12247
12338
  producedArtifacts,
12248
12339
  pausedForReview: true,
12249
- gateStatus: "judge_error"
12340
+ gateStatus: "judge_error",
12341
+ contextInjection: expositionInjection,
12342
+ promptChars: commonContext.length
12250
12343
  };
12251
12344
  }
12252
12345
  }
@@ -12276,7 +12369,9 @@ ${currentContent}` }],
12276
12369
  pedagogy,
12277
12370
  producedArtifacts,
12278
12371
  pausedForReview: true,
12279
- gateStatus: "awaiting_approval"
12372
+ gateStatus: "awaiting_approval",
12373
+ contextInjection: expositionInjection,
12374
+ promptChars: commonContext.length
12280
12375
  };
12281
12376
  }
12282
12377
  if (isLessonApproved && currentLessonInfo?.state !== "approved") {
@@ -12293,6 +12388,13 @@ ${currentContent}` }],
12293
12388
  artifactType: "LESSON"
12294
12389
  });
12295
12390
  const lessonExcerpt = lessonExcerptResult.excerpt;
12391
+ const lessonInjectionMeta = {
12392
+ source: "LESSON",
12393
+ verified: lessonExcerptResult.verified,
12394
+ sectionAware: lessonExcerptResult.sectionAware,
12395
+ issues: lessonExcerptResult.issues
12396
+ };
12397
+ lessonInjection = lessonInjectionMeta;
12296
12398
  const satelliteContext = `${commonContext}
12297
12399
 
12298
12400
  [CANONICAL LESSON PLAN (${pedagogyLabel})]:
@@ -12451,46 +12553,175 @@ ${buildHeadingDirective("QUIZ", slcMarkdown, targetLang)}`;
12451
12553
  const slideRelPath = `_content/${unitCode}/SLIDE_${lessonCode}.md`;
12452
12554
  if (artifactScope.includes("SLIDE") && (!await storage.readArtifact(projectId, slideRelPath) || force)) {
12453
12555
  onProgress?.("@illustrator", `[4/4] Authoring Presentation Slide Deck: \`SLIDE_${lessonCode}.md\`...`);
12454
- const canonicalSlideTemplate = loadCurriculumTemplate("SLIDE_template.md");
12455
- const templateScaffold = canonicalSlideTemplate || `---
12556
+ const isHtmlEngine = options.slidesEngine === "html";
12557
+ if (isHtmlEngine) {
12558
+ let presentationKitAi = null;
12559
+ try {
12560
+ presentationKitAi = await import('@thanh01.pmt/presentation-kit/ai');
12561
+ } catch {
12562
+ }
12563
+ const slidePrompt = buildHtmlDeckSlidePrompt({
12564
+ lessonCode,
12565
+ lessonTitle,
12566
+ pedagogyLabel,
12567
+ languageDirective,
12568
+ headingDirective: buildHeadingDirective("SLIDE", slcMarkdown, targetLang),
12569
+ glossaryBlock: glossaryContext ? `[GLOSSARY TERMS (use these exact definitions)]:
12570
+ ${glossaryContext}` : void 0,
12571
+ customContract: presentationKitAi?.SLIDE_HTML_PROMPT_CONTRACT
12572
+ });
12573
+ const rawSlide = await runCurriculumAIInference(
12574
+ [{ role: "user", content: slidePrompt }],
12575
+ satelliteContext,
12576
+ {},
12577
+ (chunk, type) => {
12578
+ options.onProgress?.("@illustrator", chunk, { type: type || "content", artifactType: "SLIDE" });
12579
+ }
12580
+ );
12581
+ if (!rawSlide || rawSlide.startsWith("\u26A0\uFE0F") || rawSlide.length < 200) {
12582
+ throw createAiInferenceError({
12583
+ errorCode: "ERR_AI_RESPONSE_MALFORMED",
12584
+ agent: "@illustrator",
12585
+ artifactType: "SLIDE",
12586
+ lessonId: lessonCode,
12587
+ message: `Agent @illustrator failed to author valid HTML Slides for ${lessonCode}.`,
12588
+ rawError: rawSlide || "Empty AI response"
12589
+ });
12590
+ }
12591
+ let deckJson = null;
12592
+ const extractCleanJson = (str) => {
12593
+ const fenceMatch = str.match(/```(?:json)?\s*([\s\S]*?)\s*```/i);
12594
+ const candidate = fenceMatch ? fenceMatch[1] : str;
12595
+ return candidate.trim();
12596
+ };
12597
+ try {
12598
+ deckJson = JSON.parse(extractCleanJson(rawSlide));
12599
+ } catch {
12600
+ try {
12601
+ const { jsonrepair: jsonrepair2 } = await import('jsonrepair');
12602
+ deckJson = JSON.parse(jsonrepair2(extractCleanJson(rawSlide)));
12603
+ } catch {
12604
+ }
12605
+ }
12606
+ let validation = presentationKitAi?.validateHtmlSlideDeck ? presentationKitAi.validateHtmlSlideDeck(deckJson, true) : deckJson && Array.isArray(deckJson.slides) ? { valid: true, score: 95, issues: [], slideCount: deckJson.slides.length, notesCoveragePercent: 100 } : { valid: false, score: 0, issues: [{ message: "Malformed JSON slide deck" }], slideCount: 0, notesCoveragePercent: 0 };
12607
+ if (!validation.valid && presentationKitAi?.validateHtmlSlideDeck) {
12608
+ const repairIssues = (validation.issues || []).map((i) => `- Slide ${i.slideIndex ?? "?"}: ${i.message}`).join("\n");
12609
+ onProgress?.("@illustrator", `\u26A0\uFE0F HTML slide deck failed schema validation \u2014 retrying once with targeted repair feedback...`);
12610
+ const repairPrompt = `Your previous slide deck failed strict schema validation:
12611
+ ${repairIssues}
12612
+
12613
+ Fix ALL issues and output the complete corrected JSON object strictly matching the schema:`;
12614
+ const repairedRaw = await runCurriculumAIInference(
12615
+ [{ role: "user", content: repairPrompt }],
12616
+ satelliteContext,
12617
+ {},
12618
+ (chunk, type) => {
12619
+ options.onProgress?.("@illustrator", chunk, { type: type || "content", artifactType: "SLIDE" });
12620
+ }
12621
+ );
12622
+ try {
12623
+ deckJson = JSON.parse(extractCleanJson(repairedRaw));
12624
+ validation = presentationKitAi.validateHtmlSlideDeck(deckJson, true);
12625
+ } catch {
12626
+ try {
12627
+ const { jsonrepair: jsonrepair2 } = await import('jsonrepair');
12628
+ deckJson = JSON.parse(jsonrepair2(extractCleanJson(repairedRaw)));
12629
+ validation = presentationKitAi.validateHtmlSlideDeck(deckJson, true);
12630
+ } catch {
12631
+ }
12632
+ }
12633
+ }
12634
+ const markdownWrapper = `---
12635
+ id: "SLIDE_${lessonCode}"
12636
+ title: "${titleHeader(lessonTitle)}"
12637
+ type: "SLIDE"
12638
+ format: "html-deck"
12639
+ engine: "html"
12640
+ phase: "P2"
12641
+ deliverable: "P2-T09"
12642
+ version: "v1.0"
12643
+ date: "${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}"
12644
+ ---
12645
+
12646
+ \`\`\`json
12647
+ ${JSON.stringify(deckJson || {}, null, 2)}
12648
+ \`\`\`
12649
+ `;
12650
+ await storage.saveArtifact(projectId, slideRelPath, markdownWrapper);
12651
+ producedArtifacts.push(`SLIDE_${lessonCode}.md`);
12652
+ if (deckJson) {
12653
+ const deckJsonStr = JSON.stringify(deckJson, null, 2);
12654
+ await storage.saveArtifact(projectId, `_content/${unitCode}/SLIDE_${lessonCode}.deck.json`, deckJsonStr);
12655
+ producedArtifacts.push(`SLIDE_${lessonCode}.deck.json`);
12656
+ if (presentationKitAi?.compileHtmlDeck) {
12657
+ try {
12658
+ const compiled = presentationKitAi.compileHtmlDeck(deckJson);
12659
+ if (compiled?.html) {
12660
+ await storage.saveArtifact(projectId, `_content/${unitCode}/SLIDE_${lessonCode}.html`, compiled.html);
12661
+ producedArtifacts.push(`SLIDE_${lessonCode}.html`);
12662
+ }
12663
+ } catch (compErr) {
12664
+ console.warn(`[produceSingleLesson] Failed compiling HTML deck for ${lessonCode}:`, compErr);
12665
+ }
12666
+ }
12667
+ }
12668
+ const passed = Boolean(validation.valid && (validation.score ?? 100) >= 80);
12669
+ const score = validation.score ?? (passed ? 95 : 50);
12670
+ await storage.updateArtifactState(projectId, lessonCode, "SLIDE", {
12671
+ state: passed ? "approved" : "rejected",
12672
+ generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
12673
+ contentHash: computeContentHash(markdownWrapper),
12674
+ review: {
12675
+ decision: passed ? "APPROVED" : "NEEDS_REVISION",
12676
+ reviewedBy: "@agent-as-judge",
12677
+ reviewedAt: (/* @__PURE__ */ new Date()).toISOString(),
12678
+ score,
12679
+ critique: passed ? `HTML Slide Deck passed strict schema validation (${score}/100, ${validation.slideCount ?? deckJson?.slides?.length ?? 0} slides). Auto-approved.` : `HTML Slide Deck failed schema validation: ${(validation.issues || []).map((i) => i.message).join("; ")}`
12680
+ }
12681
+ });
12682
+ onProgress?.("@reviewer", passed ? `\u2705 SLIDE judge PASS (${score}/100) [html-deck schema validated]` : `\u26A0\uFE0F SLIDE judge NEEDS_REVISION (${score}/100) [html-deck schema issues]`);
12683
+ } else {
12684
+ const canonicalSlideTemplate = loadCurriculumTemplate("SLIDE_template.md");
12685
+ const templateScaffold = canonicalSlideTemplate || `---
12456
12686
  marp: true
12457
12687
  theme: default
12458
12688
  paginate: true
12459
12689
  header: "${titleHeader(lessonTitle)}"
12460
12690
  footer: "Curriculum OS \u2022 ${lessonCode} (${pedagogyLabel})"
12461
12691
  ---`;
12462
- const slidePrompt = buildMarpMarkdownSlidePrompt({
12463
- lessonCode,
12464
- templateScaffold,
12465
- languageDirective,
12466
- headingDirective: buildHeadingDirective("SLIDE", slcMarkdown, targetLang)
12467
- });
12468
- const rawSlide = await runCurriculumAIInference(
12469
- [{ role: "user", content: slidePrompt }],
12470
- satelliteContext,
12471
- {},
12472
- (chunk, type) => {
12473
- options.onProgress?.("@illustrator", chunk, { type: type || "content", artifactType: "SLIDE" });
12692
+ const slidePrompt = buildMarpMarkdownSlidePrompt({
12693
+ lessonCode,
12694
+ templateScaffold,
12695
+ languageDirective,
12696
+ headingDirective: buildHeadingDirective("SLIDE", slcMarkdown, targetLang)
12697
+ });
12698
+ const rawSlide = await runCurriculumAIInference(
12699
+ [{ role: "user", content: slidePrompt }],
12700
+ satelliteContext,
12701
+ {},
12702
+ (chunk, type) => {
12703
+ options.onProgress?.("@illustrator", chunk, { type: type || "content", artifactType: "SLIDE" });
12704
+ }
12705
+ );
12706
+ if (!rawSlide || rawSlide.startsWith("\u26A0\uFE0F") || rawSlide.length < 200) {
12707
+ throw createAiInferenceError({
12708
+ errorCode: "ERR_AI_RESPONSE_MALFORMED",
12709
+ agent: "@illustrator",
12710
+ artifactType: "SLIDE",
12711
+ lessonId: lessonCode,
12712
+ message: `Agent @illustrator failed to author valid Slides for ${lessonCode}.`,
12713
+ rawError: rawSlide || "Empty AI response"
12714
+ });
12474
12715
  }
12475
- );
12476
- if (!rawSlide || rawSlide.startsWith("\u26A0\uFE0F") || rawSlide.length < 200) {
12477
- throw createAiInferenceError({
12478
- errorCode: "ERR_AI_RESPONSE_MALFORMED",
12479
- agent: "@illustrator",
12480
- artifactType: "SLIDE",
12481
- lessonId: lessonCode,
12482
- message: `Agent @illustrator failed to author valid Slides for ${lessonCode}.`,
12483
- rawError: rawSlide || "Empty AI response"
12716
+ await storage.saveArtifact(projectId, slideRelPath, rawSlide);
12717
+ await storage.updateArtifactState(projectId, lessonCode, "SLIDE", {
12718
+ state: "completed",
12719
+ generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
12720
+ contentHash: computeContentHash(rawSlide)
12484
12721
  });
12722
+ producedArtifacts.push(`SLIDE_${lessonCode}.md`);
12723
+ await judgeSat("SLIDE", rawSlide);
12485
12724
  }
12486
- await storage.saveArtifact(projectId, slideRelPath, rawSlide);
12487
- await storage.updateArtifactState(projectId, lessonCode, "SLIDE", {
12488
- state: "completed",
12489
- generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
12490
- contentHash: computeContentHash(rawSlide)
12491
- });
12492
- producedArtifacts.push(`SLIDE_${lessonCode}.md`);
12493
- await judgeSat("SLIDE", rawSlide);
12494
12725
  }
12495
12726
  const guideRelPath = `_content/${unitCode}/GUIDE_${lessonCode}.md`;
12496
12727
  if (artifactScope.includes("GUIDE") && (!await storage.readArtifact(projectId, guideRelPath) || force)) {
@@ -12803,7 +13034,9 @@ ${buildHeadingDirective("EXT", slcMarkdown, targetLang)}`;
12803
13034
  lessonId: lessonCode,
12804
13035
  pedagogy,
12805
13036
  producedArtifacts,
12806
- pausedForReview: false
13037
+ pausedForReview: false,
13038
+ contextInjection: lessonInjection && lessonInjection.verified ? expositionInjection || lessonInjection : lessonInjection || expositionInjection,
13039
+ promptChars: commonContext.length
12807
13040
  };
12808
13041
  }
12809
13042
  function parseLessonObjectives(lessonContent, concept, bloomLevel) {
@@ -13433,6 +13666,24 @@ function getArtifactSpecializedInvariants(type, req) {
13433
13666
  const studentCount = req.studentCount || "25";
13434
13667
  switch (type) {
13435
13668
  case "slide": {
13669
+ if (req.slidesEngine === "html") {
13670
+ return `
13671
+ ### \u{1F3AC} INTERACTIVE HTML SLIDE ENGINE CONTRACT:
13672
+ You generate structured slide decks for the LearnWell HTML Slide Presentation Engine.
13673
+ Output a single valid JSON object matching: { "title": "...", "theme": "ocean", "slides": [{ "layoutId": "hero-cover", "slots": { ... }, "notes": "..." }] }
13674
+
13675
+ Layout Presets available:
13676
+ - hero-cover (title, subtitle, presenter, date, tag)
13677
+ - two-column-split (col1Title, col1Items[], col2Title, col2Items[])
13678
+ - code-explainer (filename, language, code, highlightLines, annotations[])
13679
+ - metrics-3-card (card1Title, card1Val, card1Desc, ...)
13680
+ - process-flow (steps: [{ label, desc, status }])
13681
+ - quiz-checkpoint (question, options[], answerIdx, explanation)
13682
+ - tiered-practice-3cards (foundation, standard, challenge cards)
13683
+ - takeaways-summary (takeaways: bullet points)
13684
+
13685
+ Mandatory Presenter Notes on every slide with Talk Track, Cold-Call, and Scaffolding Tip.`;
13686
+ }
13436
13687
  const slideCount = cfg.slideCount || 10;
13437
13688
  const presentationStyle = cfg.presentationStyle || "modern";
13438
13689
  const presentationDuration = cfg.presentationDuration || 45;
@@ -17307,6 +17558,6 @@ function renderMediaPlaceholder(entry) {
17307
17558
  return `> \u{1F5BC}\uFE0F [\u1EA2nh \u0111ang ch\u1EDD: ${entry.name} \u2014 s\u1EBD \u0111\u01B0\u1EE3c t\u1EA1o sau khi duy\u1EC7t media]`;
17308
17559
  }
17309
17560
 
17310
- 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_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_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, 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, extractStreamChunk, extractThoughtAndContent, 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 };
17561
+ 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_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_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, extractStreamChunk, extractThoughtAndContent, 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 };
17311
17562
  //# sourceMappingURL=index.mjs.map
17312
17563
  //# sourceMappingURL=index.mjs.map