@thanh01.pmt/curriculum-kit 1.4.36 → 1.4.38

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
@@ -1520,6 +1520,8 @@ function parseLessonFlow(lessonMarkdown) {
1520
1520
  purpose: cells[4] || "",
1521
1521
  studentAction: cells[5] || "",
1522
1522
  teacherMove: cells[6] || "",
1523
+ outputEvidence: cells[7] || "",
1524
+ lo: (cells[8] || "").replace(/\*/g, "").split(/[,;/\s]+/).map((s) => s.trim()).filter(Boolean),
1523
1525
  time: cells[9] || cells[cells.length - 2] || "",
1524
1526
  artifactContract: cells[cells.length - 1] || ""
1525
1527
  });
@@ -26436,6 +26438,195 @@ function extractStandardRefs(text) {
26436
26438
  return Array.from(new Set(matches));
26437
26439
  }
26438
26440
 
26441
+ // src/parsers/lessonEntity.ts
26442
+ init_lessonFlowParser();
26443
+ var LessonEntitySchema = z.object({
26444
+ lessonId: z.string(),
26445
+ title: z.string(),
26446
+ pedagogyModel: z.string().default("5e"),
26447
+ estimatedDuration: z.string().default(""),
26448
+ learningObjectives: z.array(LearningObjectiveRowSchema).default([]),
26449
+ activitySequence: z.array(ActivitySeqRowSchema).default([]),
26450
+ /** Header→cell rows straight from the A4 Assessment Map table (headers vary by template). */
26451
+ assessmentMap: z.array(z.record(z.string())).default([]),
26452
+ tieredScaffolding: z.object({ bronze: z.string().default(""), silver: z.string().default(""), gold: z.string().default("") }).default({ bronze: "", silver: "", gold: "" })
26453
+ });
26454
+ var stripMd = (s) => s.replace(/\*\*/g, "").replace(/`/g, "").trim();
26455
+ function splitRow(line) {
26456
+ return line.trim().replace(/^\|/, "").replace(/\|$/, "").split("|").map((c) => c.trim());
26457
+ }
26458
+ function toActivitySeqRows(md) {
26459
+ const flow = parseLessonFlow(md);
26460
+ const rows = [];
26461
+ for (const a of flow.activities) {
26462
+ const parsed = ActivitySeqRowSchema.safeParse({
26463
+ seq: a.seq,
26464
+ phase: a.phase,
26465
+ activityType: a.activityType,
26466
+ actor: a.actor,
26467
+ purpose: a.purpose,
26468
+ studentAction: a.studentAction,
26469
+ teacherMove: a.teacherMove,
26470
+ outputEvidence: a.outputEvidence,
26471
+ lo: a.lo,
26472
+ durationMinutes: parseInt((a.time || "").replace(/[^0-9]/g, ""), 10) || 10,
26473
+ artifactContract: a.artifactContract
26474
+ });
26475
+ if (parsed.success) rows.push(parsed.data);
26476
+ }
26477
+ return rows;
26478
+ }
26479
+ function parseLearningObjectives(md) {
26480
+ const rows = [];
26481
+ let inLO = false;
26482
+ let headerSeen = false;
26483
+ for (const line of md.split("\n")) {
26484
+ const h = line.match(/^#{2,4}\s+(.*)$/);
26485
+ if (h) {
26486
+ if (/learning\s+objectives/i.test(h[1] ?? "")) inLO = true;
26487
+ else if (inLO) break;
26488
+ continue;
26489
+ }
26490
+ if (!inLO) continue;
26491
+ const t = line.trim();
26492
+ if (!t.startsWith("|")) continue;
26493
+ if (/^[\s|:-]+$/.test(t)) continue;
26494
+ const cells = splitRow(t);
26495
+ if (cells.length < 4) continue;
26496
+ if (!headerSeen) {
26497
+ headerSeen = true;
26498
+ continue;
26499
+ }
26500
+ const parsed = LearningObjectiveRowSchema.safeParse({
26501
+ code: stripMd(cells[0] ?? ""),
26502
+ objective: stripMd(cells[1] ?? ""),
26503
+ evidence: stripMd(cells[2] ?? ""),
26504
+ successCriteria: stripMd(cells[3] ?? ""),
26505
+ standardRefs: cells[4] ?? "" ? cells[4].split(/[\s,;]+/).filter(Boolean) : [],
26506
+ conceptRefs: []
26507
+ });
26508
+ if (parsed.success) rows.push(parsed.data);
26509
+ }
26510
+ return rows;
26511
+ }
26512
+ function parseAssessmentMap(md) {
26513
+ const rows = [];
26514
+ let inMap = false;
26515
+ let headers = [];
26516
+ for (const line of md.split("\n")) {
26517
+ const h = line.match(/^#{2,4}\s+(.*)$/);
26518
+ if (h) {
26519
+ if (/assessment\s*map/i.test(h[1] ?? "")) inMap = true;
26520
+ else if (inMap) break;
26521
+ continue;
26522
+ }
26523
+ if (!inMap) continue;
26524
+ const t = line.trim();
26525
+ if (!t.startsWith("|")) continue;
26526
+ if (/^[\s|:-]+$/.test(t)) continue;
26527
+ const cells = splitRow(t);
26528
+ if (headers.length === 0) {
26529
+ headers = cells;
26530
+ continue;
26531
+ }
26532
+ const row = {};
26533
+ headers.forEach((hdr, i) => {
26534
+ row[hdr] = stripMd(cells[i] ?? "");
26535
+ });
26536
+ rows.push(row);
26537
+ }
26538
+ return rows;
26539
+ }
26540
+ function parseTieredScaffolding(md) {
26541
+ const lines = md.split("\n");
26542
+ let capture = null;
26543
+ for (const line of lines) {
26544
+ const h = line.match(/^#{2,4}\s+(.*)$/);
26545
+ if (h) {
26546
+ const isTier = /elaborate|tiered|scaffold/i.test(h[1] ?? "");
26547
+ if (capture && !isTier) break;
26548
+ if (isTier) capture = [];
26549
+ continue;
26550
+ }
26551
+ if (capture) capture.push(line);
26552
+ }
26553
+ const body = (capture ?? []).join("\n");
26554
+ const grab = (label) => {
26555
+ const m = body.match(new RegExp(`(?:\\ud83e\\udd49|\\ud83e\\udd48|\\ud83e\\udd47)?\\s*\\*\\*${label}:\\*\\*\\s*([^\\n]+)`, "i"));
26556
+ return m ? m[1].trim() : "";
26557
+ };
26558
+ return { bronze: grab("Bronze"), silver: grab("Silver"), gold: grab("Gold") };
26559
+ }
26560
+ function buildLessonEntityJson(lessonMarkdown) {
26561
+ const md = lessonMarkdown || "";
26562
+ if (!md.trim()) return null;
26563
+ const flow = parseLessonFlow(md);
26564
+ const fm = md.match(/^---\s*\n([\s\S]*?)\n---/)?.[1] ?? "";
26565
+ const activitySequence = toActivitySeqRows(md);
26566
+ const learningObjectives = parseLearningObjectives(md);
26567
+ if (activitySequence.length === 0 && learningObjectives.length === 0) return null;
26568
+ const parsed = LessonEntitySchema.safeParse({
26569
+ lessonId: flow.lessonId || (fm.match(/id:\s*["']?([^"'\n]+)["']?/i)?.[1]?.trim() ?? ""),
26570
+ title: flow.lessonTitle,
26571
+ pedagogyModel: flow.pedagogicalModel,
26572
+ estimatedDuration: flow.estimatedDuration,
26573
+ learningObjectives,
26574
+ activitySequence,
26575
+ assessmentMap: parseAssessmentMap(md),
26576
+ tieredScaffolding: parseTieredScaffolding(md)
26577
+ });
26578
+ return parsed.success ? parsed.data : null;
26579
+ }
26580
+ function renderEntitySlotsForType(entity, artifactType, maxChars = 8e3) {
26581
+ const type = (artifactType || "").toUpperCase().trim();
26582
+ const parts = [];
26583
+ const wantActivities = ["ACT", "GUIDE", "SLIDE", "WKS", "QUIZ"].includes(type);
26584
+ const wantObjectives = type !== "CODE";
26585
+ const wantAssessment = ["QUIZ", "WKS"].includes(type);
26586
+ const wantTiers = ["ACT", "CODE", "EXT", "WKS"].includes(type);
26587
+ if (wantObjectives && entity.learningObjectives.length > 0) {
26588
+ parts.push(
26589
+ "### Learning Objectives & Evidence\n" + entity.learningObjectives.map((o) => `- ${o.code}: ${o.objective} \u2192 Evidence: ${o.evidence} | Pass: ${o.successCriteria}`).join("\n")
26590
+ );
26591
+ }
26592
+ if (wantActivities && entity.activitySequence.length > 0) {
26593
+ const header = "| Seq | Phase | Activity | Actor | Student Action | Teacher Move | Output/Evidence | LO | Mins | Artifact Contract |";
26594
+ const rows = [];
26595
+ for (const a of entity.activitySequence) {
26596
+ const r = `| ${a.seq} | ${a.phase} | ${a.activityType} | ${a.actor} | ${a.studentAction} | ${a.teacherMove} | ${a.outputEvidence} | ${a.lo.join(",")} | ${a.durationMinutes} | ${a.artifactContract} |`;
26597
+ if (parts.join("\n\n").length + r.length > maxChars) break;
26598
+ rows.push(r);
26599
+ }
26600
+ if (rows.length > 0) {
26601
+ parts.push("### Activity Sequence\n" + [header, "|---|---|---|---|---|---|---|---|---|---|", ...rows].join("\n"));
26602
+ }
26603
+ }
26604
+ if (wantAssessment && entity.assessmentMap.length > 0) {
26605
+ const lines = entity.assessmentMap.map((r) => Object.entries(r).map(([k, v]) => `${k}: ${v}`).join(" | "));
26606
+ parts.push("### Assessment Map (assess exactly these)\n" + lines.join("\n"));
26607
+ }
26608
+ const t = entity.tieredScaffolding;
26609
+ if (wantTiers && (t.bronze || t.silver || t.gold)) {
26610
+ parts.push(
26611
+ "### Tiered task ladder\n" + [t.bronze && `- Bronze: ${t.bronze}`, t.silver && `- Silver: ${t.silver}`, t.gold && `- Gold: ${t.gold}`].filter(Boolean).join("\n")
26612
+ );
26613
+ }
26614
+ return parts.join("\n\n").slice(0, maxChars);
26615
+ }
26616
+ function entityRowAssignedTo(row, artifactType) {
26617
+ const norm2 = (s) => s.toLowerCase().replace(/[^a-z0-9]/g, "");
26618
+ const wanted = norm2(artifactType);
26619
+ return row.artifactContract.split(/[,;/]/).map((c) => norm2(c)).some((c) => c === wanted || c.length > 3 && (c.includes(wanted) || wanted.includes(c)));
26620
+ }
26621
+ function renderAssignedRowsTable(entity, artifactType, maxChars = 1500) {
26622
+ const rows = entity.activitySequence.filter((r) => entityRowAssignedTo(r, artifactType));
26623
+ if (rows.length === 0) return "";
26624
+ const header = "| Seq | Phase | Activity | Actor | Student Action | Teacher Move | Output/Evidence | LO | Mins | Artifact Contract |";
26625
+ const sep = "|---|---|---|---|---|---|---|---|---|---|";
26626
+ const body = rows.map((a) => `| ${a.seq} | ${a.phase} | ${a.activityType} | ${a.actor} | ${a.studentAction} | ${a.teacherMove} | ${a.outputEvidence} | ${a.lo.join(",")} | ${a.durationMinutes} | ${a.artifactContract} |`);
26627
+ return [header, sep, ...body].join("\n").slice(0, maxChars);
26628
+ }
26629
+
26439
26630
  // src/services/contextSlots.ts
26440
26631
  var LESSON_SLOT_BUDGETS = {
26441
26632
  ACT: { budget: 8e3 },
@@ -26555,6 +26746,7 @@ function buildSatelliteContext(input) {
26555
26746
  slcMarkdown,
26556
26747
  symbolLedgerBlock,
26557
26748
  pedagogyLabel,
26749
+ lessonEntity,
26558
26750
  mode = "legacy"
26559
26751
  } = input;
26560
26752
  const type = (artifactType || "").toUpperCase().trim();
@@ -26572,13 +26764,16 @@ ${lessonExcerpt.excerpt}${symbolLedgerBlock}`;
26572
26764
  verified: lessonExcerpt.verified,
26573
26765
  sectionAware: lessonExcerpt.sectionAware,
26574
26766
  issues: lessonExcerpt.issues,
26575
- tokenEstimate: Math.round(context2.length / 4)
26767
+ tokenEstimate: Math.round(context2.length / 4),
26768
+ canonicalExcerpt: lessonExcerpt.excerpt
26576
26769
  };
26577
26770
  }
26578
26771
  const blocks = [];
26579
26772
  const issues = [];
26580
26773
  const parts = [commonContext];
26581
26774
  blocks.push(blockMeta("commonContext", "COMPOSITE", commonContext, true));
26775
+ let excerptSlot;
26776
+ let miniSlot;
26582
26777
  const compositeHasKx = /###\s+KNOWLEDGE_EXPOSITION/.test(commonContext);
26583
26778
  if (expositionContent.trim() && !compositeHasKx) {
26584
26779
  const kxExcerpt = buildSectionAwareExcerpt(expositionContent, {
@@ -26596,28 +26791,57 @@ ${kxExcerpt.excerpt}`);
26596
26791
  }
26597
26792
  if (!KX_ONLY_TYPES.has(type)) {
26598
26793
  const spec = LESSON_SLOT_BUDGETS[type] ?? { budget: 12e3 };
26599
- const excerpt = buildSectionAwareExcerpt(lessonContent, {
26600
- priorities: spec.priorities ?? ["Artifact Contract", "A. Lesson Design Plan", "B. Lesson Flow", "Learning Objectives & Evidence", "Activity Sequence"],
26601
- budget: spec.budget,
26602
- sectionLanguageContract: slcMarkdown,
26603
- artifactType: "LESSON"
26604
- });
26605
- parts.push(`
26794
+ let usedEntity = false;
26795
+ if (lessonEntity) {
26796
+ const slots = renderEntitySlotsForType(lessonEntity, type, spec.budget);
26797
+ if (slots) {
26798
+ const slotBlock = `
26799
+
26800
+ [LESSON ENTITY SLOTS (structured JSON source \u2014 canonical)]:
26801
+ ${slots}`;
26802
+ parts.push(slotBlock);
26803
+ excerptSlot = slotBlock;
26804
+ blocks.push(blockMeta("lessonEntity:" + type, "LESSON_JSON", slots, true));
26805
+ usedEntity = true;
26806
+ } else {
26807
+ issues.push(`lesson-entity:empty-slots:${type}`);
26808
+ }
26809
+ }
26810
+ if (!usedEntity) {
26811
+ const excerpt = buildSectionAwareExcerpt(lessonContent, {
26812
+ priorities: spec.priorities ?? ["Artifact Contract", "A. Lesson Design Plan", "B. Lesson Flow", "Learning Objectives & Evidence", "Activity Sequence"],
26813
+ budget: spec.budget,
26814
+ sectionLanguageContract: slcMarkdown,
26815
+ artifactType: "LESSON"
26816
+ });
26817
+ const excerptBlock = `
26606
26818
 
26607
26819
  [CANONICAL LESSON PLAN (scoped for ${type})]:
26608
- ${excerpt.excerpt}`);
26609
- blocks.push(blockMeta("lessonExcerpt:" + type, "LESSON", excerpt.excerpt, excerpt.verified, excerpt.issues));
26610
- if (!excerpt.verified) issues.push(...excerpt.issues.map((i) => `lesson:${i}`));
26611
- if (type === "QUIZ" || type === "WKS") {
26612
- const am = extractAssessmentMap(lessonContent, 1200);
26613
- if (am) {
26614
- parts.push(`
26820
+ ${excerpt.excerpt}`;
26821
+ parts.push(excerptBlock);
26822
+ excerptSlot = excerptBlock;
26823
+ blocks.push(blockMeta("lessonExcerpt:" + type, "LESSON", excerpt.excerpt, excerpt.verified, excerpt.issues));
26824
+ if (!excerpt.verified) issues.push(...excerpt.issues.map((i) => `lesson:${i}`));
26825
+ if (type === "QUIZ" || type === "WKS") {
26826
+ if (lessonEntity && lessonEntity.assessmentMap.length > 0) {
26827
+ const amJson = lessonEntity.assessmentMap.map((r) => Object.entries(r).map(([k, v]) => `${k}: ${v}`).join(" | ")).join("\n");
26828
+ parts.push(`
26829
+
26830
+ [ASSESSMENT MAP (criteria anchor \u2014 assess exactly these)]:
26831
+ ${amJson}`);
26832
+ blocks.push(blockMeta("assessmentMap:" + type, "LESSON_JSON", amJson, true));
26833
+ } else {
26834
+ const am = extractAssessmentMap(lessonContent, 1200);
26835
+ if (am) {
26836
+ parts.push(`
26615
26837
 
26616
26838
  [ASSESSMENT MAP (criteria anchor \u2014 assess exactly these)]:
26617
26839
  ${am}`);
26618
- blocks.push(blockMeta("assessmentMap:" + type, "LESSON", am, true));
26619
- } else {
26620
- issues.push(`assessment-map:unresolved:${type}`);
26840
+ blocks.push(blockMeta("assessmentMap:" + type, "LESSON", am, true));
26841
+ } else {
26842
+ issues.push(`assessment-map:unresolved:${type}`);
26843
+ }
26844
+ }
26621
26845
  }
26622
26846
  }
26623
26847
  if (symbolLedgerBlock) {
@@ -26625,19 +26849,34 @@ ${am}`);
26625
26849
  blocks.push(blockMeta("symbolLedger", "LESSON", symbolLedgerBlock, true));
26626
26850
  }
26627
26851
  } else {
26628
- const contractRows = extractActivityContractRows(lessonContent, type === "CODE" ? "CODE_LAB" : type, 1500);
26629
- const tierBlock = type === "CODE" || type === "EXT" ? extractTieredScaffoldingBlock(lessonContent, 900) : "";
26630
- const mini = [
26631
- contractRows ? `### Activity Sequence rows assigned to ${type} (canonical \u2014 do not invent a different task):
26632
- ${contractRows}` : "",
26633
- tierBlock ? `### Tiered task ladder (from LESSON Elaborate phase):
26634
- ${tierBlock}` : ""
26635
- ].filter(Boolean).join("\n\n");
26852
+ const miniParts = [];
26853
+ if (lessonEntity) {
26854
+ const rowsTable = renderAssignedRowsTable(lessonEntity, type === "CODE" ? "CODE_LAB" : type, 1500);
26855
+ if (rowsTable) miniParts.push(`### Activity Sequence rows assigned to ${type} (canonical \u2014 do not invent a different task):
26856
+ ${rowsTable}`);
26857
+ const t = lessonEntity.tieredScaffolding;
26858
+ if ((type === "CODE" || type === "EXT") && (t.bronze || t.silver || t.gold)) {
26859
+ miniParts.push(
26860
+ "### Tiered task ladder (from LESSON Elaborate phase):\n" + [t.bronze && `- Bronze: ${t.bronze}`, t.silver && `- Silver: ${t.silver}`, t.gold && `- Gold: ${t.gold}`].filter(Boolean).join("\n")
26861
+ );
26862
+ }
26863
+ }
26864
+ if (miniParts.length === 0) {
26865
+ const contractRows = extractActivityContractRows(lessonContent, type === "CODE" ? "CODE_LAB" : type, 1500);
26866
+ const tierBlock = type === "CODE" || type === "EXT" ? extractTieredScaffoldingBlock(lessonContent, 900) : "";
26867
+ if (contractRows) miniParts.push(`### Activity Sequence rows assigned to ${type} (canonical \u2014 do not invent a different task):
26868
+ ${contractRows}`);
26869
+ if (tierBlock) miniParts.push(`### Tiered task ladder (from LESSON Elaborate phase):
26870
+ ${tierBlock}`);
26871
+ }
26872
+ const mini = miniParts.join("\n\n");
26636
26873
  if (mini) {
26637
- parts.push(`
26874
+ const miniBlock = `
26638
26875
 
26639
26876
  [LESSON ACTIVITY CONTRACT (mini-slot)]:
26640
- ${mini}`);
26877
+ ${mini}`;
26878
+ parts.push(miniBlock);
26879
+ miniSlot = miniBlock;
26641
26880
  blocks.push(blockMeta("activityContract:" + type, "LESSON", mini, true));
26642
26881
  } else {
26643
26882
  issues.push(`activity-contract:unresolved:${type}`);
@@ -26655,9 +26894,36 @@ ${mini}`);
26655
26894
  verified: blocks.filter((b) => b.slot !== "commonContext").every((b) => b.verified),
26656
26895
  sectionAware: blocks.some((b) => b.slot.startsWith("lessonExcerpt") || b.slot.startsWith("kxExcerpt")),
26657
26896
  issues,
26658
- tokenEstimate: Math.round(context.length / 4)
26897
+ tokenEstimate: Math.round(context.length / 4),
26898
+ // Judge ground truth = exactly what THIS type consumed (scoped or mini slot).
26899
+ canonicalExcerpt: (miniSlot ?? excerptSlot ?? lessonExcerpt.excerpt).trim()
26659
26900
  };
26660
26901
  }
26902
+ var ACTIVITY_ALIGNMENT_LOG_ONLY_UNTIL = /* @__PURE__ */ new Date("2026-09-23T00:00:00Z");
26903
+ function isActivityAlignmentLogOnly(now = /* @__PURE__ */ new Date()) {
26904
+ const env = (process.env.DRIFT_ALIGNMENT_LOG_ONLY ?? "").toLowerCase().trim();
26905
+ if (env === "false" || env === "0") return false;
26906
+ if (env === "true" || env === "1") return true;
26907
+ return now < ACTIVITY_ALIGNMENT_LOG_ONLY_UNTIL;
26908
+ }
26909
+ function evaluateActivityAlignment(canonicalExcerpt, generatedContent, now = /* @__PURE__ */ new Date()) {
26910
+ const mode = isActivityAlignmentLogOnly(now) ? "log_only" : "enforcing";
26911
+ if (!canonicalExcerpt || !canonicalExcerpt.trim()) {
26912
+ return { checked: false, passed: null, matchedTokens: [], missingTokens: [], mode };
26913
+ }
26914
+ const content = (generatedContent || "").toLowerCase();
26915
+ const stripped = canonicalExcerpt.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "");
26916
+ const latin = Array.from(new Set(stripped.match(/[a-z][a-z0-9_]{3,}/g) ?? []));
26917
+ const cjk = Array.from(new Set(canonicalExcerpt.match(/[\u4e00-\u9fff]{2,}/g) ?? []));
26918
+ const tokens = [...latin, ...cjk];
26919
+ if (tokens.length === 0) {
26920
+ return { checked: false, passed: null, matchedTokens: [], missingTokens: [], mode };
26921
+ }
26922
+ const matchedTokens = tokens.filter((t) => content.includes(t));
26923
+ const missingTokens = tokens.filter((t) => !content.includes(t));
26924
+ const passed = matchedTokens.length > 0;
26925
+ return { checked: true, passed, matchedTokens: matchedTokens.slice(0, 10), missingTokens: missingTokens.slice(0, 10), mode };
26926
+ }
26661
26927
 
26662
26928
  // src/services/lessonProductionService.ts
26663
26929
  var __filename2 = typeof import.meta?.url === "string" && typeof fileURLToPath === "function" ? fileURLToPath(import.meta.url) : "";
@@ -27297,7 +27563,9 @@ ${sg}${standardsBlock}${glossaryBlock}${buildGroundTruthBlock(includeKx)}${sessi
27297
27563
  });
27298
27564
  const producedArtifacts = [];
27299
27565
  const lessonRelPath = `_content/${unitCode}/LESSON_${lessonCode}.md`;
27566
+ const lessonEntityRelPath = `_content/${unitCode}/LESSON_${lessonCode}.json`;
27300
27567
  const existingLessonContent = await storage.readArtifact(projectId, lessonRelPath);
27568
+ let lessonEntity = buildLessonEntityJson(existingLessonContent || "");
27301
27569
  let lessonContent = existingLessonContent || "";
27302
27570
  if (artifactScope.includes("LESSON") && (!existingLessonContent || force || isStaleVsPlan(existingLessonContent))) {
27303
27571
  if (existingLessonContent && !force && isStaleVsPlan(existingLessonContent)) {
@@ -27373,7 +27641,12 @@ Fix ALL issues above and output the complete corrected document.` }],
27373
27641
  } else {
27374
27642
  lessonContent = lintReport.autoFixedContent || rawLesson;
27375
27643
  }
27376
- await storage.saveArtifact(projectId, lessonRelPath, stampPlanHash(lessonContent));
27644
+ const stampedLesson = stampPlanHash(lessonContent);
27645
+ await storage.saveArtifact(projectId, lessonRelPath, stampedLesson);
27646
+ lessonEntity = buildLessonEntityJson(stampedLesson);
27647
+ if (lessonEntity) {
27648
+ await storage.saveArtifact(projectId, lessonEntityRelPath, JSON.stringify({ planHash: currentPlanHash ?? null, entity: lessonEntity }, null, 2));
27649
+ }
27377
27650
  producedArtifacts.push(`LESSON_${lessonCode}.md`);
27378
27651
  }
27379
27652
  const contentHash = lessonContent ? computeContentHash(lessonContent) : void 0;
@@ -27682,6 +27955,7 @@ ${currentContent}` }],
27682
27955
  const routingMode = options.contextRoutingMode ?? "legacy";
27683
27956
  const kxFreeCommonContext = routingMode === "hybrid" ? assembleCommonContext(effectiveStyleGuide, false) : "";
27684
27957
  const satelliteContexts = {};
27958
+ const satelliteContextMeta = {};
27685
27959
  const satelliteContextFor = (artifactType) => {
27686
27960
  const key = artifactType.toUpperCase();
27687
27961
  if (!satelliteContexts[key]) {
@@ -27694,9 +27968,11 @@ ${currentContent}` }],
27694
27968
  slcMarkdown,
27695
27969
  symbolLedgerBlock,
27696
27970
  pedagogyLabel,
27971
+ lessonEntity,
27697
27972
  mode: routingMode
27698
27973
  });
27699
27974
  satelliteContexts[key] = built.context;
27975
+ satelliteContextMeta[key] = built;
27700
27976
  onProgress?.(
27701
27977
  "@content",
27702
27978
  `[CONTEXT] ${key} satellite context: ${built.context.length} chars (${built.blocks.map((b) => `${b.slot}:${b.chars}`).join(", ")})`,
@@ -27724,6 +28000,30 @@ ${currentContent}` }],
27724
28000
  }
27725
28001
  });
27726
28002
  }
28003
+ const slotMeta = satelliteContextMeta[sat.toUpperCase()];
28004
+ if (slotMeta) {
28005
+ const alignment = evaluateActivityAlignment(slotMeta.canonicalExcerpt, content);
28006
+ if (alignment.checked && alignment.passed === false) {
28007
+ const note = `activity-alignment drift vs ${sat} contract slot (matched: ${alignment.matchedTokens.join(", ") || "none"}); canonical tokens absent from output`;
28008
+ if (alignment.mode === "enforcing") {
28009
+ const critique = validatorRepairPrompt([{ code: "scope-drift", detail: note, evidence: alignment.missingTokens }]);
28010
+ onProgress?.("@reviewer", `\u26D4 ${sat} activity-alignment drift FAIL: ${note}`);
28011
+ return storage.updateArtifactState(projectId, lessonCode, sat, {
28012
+ state: "rejected",
28013
+ generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
28014
+ contentHash: computeContentHash(content),
28015
+ review: {
28016
+ decision: "NEEDS_REVISION",
28017
+ reviewedBy: "@heuristic-linter",
28018
+ reviewedAt: (/* @__PURE__ */ new Date()).toISOString(),
28019
+ score: 0,
28020
+ critique
28021
+ }
28022
+ });
28023
+ }
28024
+ onProgress?.("@reviewer", `\u{1F9ED} [log-only] ${sat} activity-alignment drift: ${note}`);
28025
+ }
28026
+ }
27727
28027
  return judgeSatelliteArtifact({
27728
28028
  storage,
27729
28029
  projectId,
@@ -27736,7 +28036,7 @@ ${currentContent}` }],
27736
28036
  onProgress,
27737
28037
  targetLang,
27738
28038
  canonicalLessonContent: lessonContent,
27739
- canonicalLessonExcerpt: lessonExcerpt
28039
+ canonicalLessonExcerpt: slotMeta?.canonicalExcerpt ?? lessonExcerpt
27740
28040
  });
27741
28041
  };
27742
28042
  const actRelPath = `_content/${unitCode}/ACT_${lessonCode}.md`;
@@ -33111,6 +33411,6 @@ function renderMediaPlaceholder(entry) {
33111
33411
  return `> \u{1F5BC}\uFE0F [\u1EA2nh \u0111ang ch\u1EDD: ${entry.name} \u2014 s\u1EBD \u0111\u01B0\u1EE3c t\u1EA1o sau khi duy\u1EC7t media]`;
33112
33412
  }
33113
33413
 
33114
- 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, ConceptPrerequisiteEdgeSchema, ConceptSpiralEncounterSchema, 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, GeneratedSlideArraySchema, GeneratedSlideSchema, GlossaryQuickRefRowSchema, GlossarySchema, GlossaryTermSchema, GoldTierSchema, GradeBandSchema, GraphicOrganizerItemSchema, GraphicOrganizerSchema, HANDOUT_TEMPLATE, HandoutSchema, HandoutSectionSchema, HybridBlueprintArraySchema, HybridBlueprintItemSchema, HybridDeckSlideArraySchema, HybridDeckSlideSchema, HybridPipelineError, 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, MasteryGateSchema, 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, SATELLITE_LESSON_PRIORITIES, 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, SessionZpdStatusSchema, SilverTierSchema, SlideBlueprintArraySchema, SlideBlueprintItemSchema, 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, WalkingSkeletonSchema, WorksheetItemSchema, WorksheetItemTypeEnum, WorksheetPartSchema, WorksheetSchema, ZpdVerdictSchema, activityTools, analystTools, analyzeProjectCreationIntent, assertAcyclic, assessorTools, assignDepths, atomicWriteFileSync, auditCurriculumQualityFlow, auditQualityReport, buildActivityPrompt, buildCodeLabPrompt, buildConceptPrerequisites, buildCurriculumContext, buildCurriculumPlan, buildDeliveryPackages, buildDiagnosticQuizPrompt, buildDomainLexiconGuardrail, buildExpositionContext, buildExpositionExcerpt, buildExtensionPrompt, buildHandoutPrompt, buildHeadingDirective, buildHtmlDeckSlidePrompt, buildImagePrompt, buildJudgePrompt, buildLanguageDirective, buildLessonExcerpt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildMasteryGates, buildProjectInstructionPrompt, buildSatelliteContext, buildSectionAwareExcerpt, buildSelfLabPrompt, buildSessionSliceContext, buildSlidesPrompt, buildStandardStackMarkdown, buildStandardsContext, buildStandardsContextBlock, buildTeacherGuidePrompt, buildWalkingSkeleton, buildWorksheetPrompt, checkSessionZpd, closeTruncatedJson, computeConceptSpiralProgression, computeContentHash, computePackingSpec, conductPreliminaryResearch, contentTools, convertRoadmapToFoundationSot, createAiInferenceError, createContextMissingError, createCurriculumStorage, createIdleAbortController, createStreamAbortController, createStreamAbortSignal, createStreamChunkExtractor, curateMediaLedger, designerTools, detectProjectPedagogy, dropCyclicConceptEdges, emitUsage, ensureExpositionForLesson, ensureKnowledgeExposition, evaluateStandardsCoverage, executeCurriculumCommand, executeSlideProductionWorkflow, exportAllProjectQuizzes, expositionCacheKey, extractActivityContractRows, extractAssessmentMap, extractCurriculumHorizon, extractJsonArray, extractScopeSequenceRows, extractSectionHeadingsFromSLC, extractSessionSlice, extractStandardRefs, extractStreamChunk, extractSymbolLedger, extractThoughtAndContent, extractTieredScaffoldingBlock, 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, parseAllSessions, parseGateSettings, parseQuizMarkdown, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, publishToGitHub, publishToSupabase, rankGenCandidates, renderFrameworkFromPlan, renderHorizonPromptBlock, renderMediaPlaceholder, researcherTools, resolveApiKey, 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, validateHorizonCompliance, validateHybridDeckSlides, validateMarkdownTables, validateMermaidSyntax, withAutoRepair };
33414
+ 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, ConceptPrerequisiteEdgeSchema, ConceptSpiralEncounterSchema, 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, GeneratedSlideArraySchema, GeneratedSlideSchema, GlossaryQuickRefRowSchema, GlossarySchema, GlossaryTermSchema, GoldTierSchema, GradeBandSchema, GraphicOrganizerItemSchema, GraphicOrganizerSchema, HANDOUT_TEMPLATE, HandoutSchema, HandoutSectionSchema, HybridBlueprintArraySchema, HybridBlueprintItemSchema, HybridDeckSlideArraySchema, HybridDeckSlideSchema, HybridPipelineError, InstructionSectionSchema, InstructionStepSchema, JudgeCriterionSchema, LAYER_IDLE_BUDGET_MS, LAYER_TOTAL_BUDGET_MS, LESSON_PLAN_TEMPLATE, LLMJudgeEngine, LabTierTaskSchema, LearningObjectiveInputSchema, LearningObjectiveRowSchema, LessonEntitySchema, LessonFlowPhaseSchema, LessonPlan5ESchema, LessonPlanEDPSchema, LessonPlanSchema, LessonSectionSchema, LocalWorkspaceManager, MappingKindSchema, MarpSlideSchema, MasteryGateSchema, 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, SATELLITE_LESSON_PRIORITIES, 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, SessionZpdStatusSchema, SilverTierSchema, SlideBlueprintArraySchema, SlideBlueprintItemSchema, 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, WalkingSkeletonSchema, WorksheetItemSchema, WorksheetItemTypeEnum, WorksheetPartSchema, WorksheetSchema, ZpdVerdictSchema, activityTools, analystTools, analyzeProjectCreationIntent, assertAcyclic, assessorTools, assignDepths, atomicWriteFileSync, auditCurriculumQualityFlow, auditQualityReport, buildActivityPrompt, buildCodeLabPrompt, buildConceptPrerequisites, buildCurriculumContext, buildCurriculumPlan, buildDeliveryPackages, buildDiagnosticQuizPrompt, buildDomainLexiconGuardrail, buildExpositionContext, buildExpositionExcerpt, buildExtensionPrompt, buildHandoutPrompt, buildHeadingDirective, buildHtmlDeckSlidePrompt, buildImagePrompt, buildJudgePrompt, buildLanguageDirective, buildLessonEntityJson, buildLessonExcerpt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildMasteryGates, buildProjectInstructionPrompt, buildSatelliteContext, buildSectionAwareExcerpt, buildSelfLabPrompt, buildSessionSliceContext, buildSlidesPrompt, buildStandardStackMarkdown, buildStandardsContext, buildStandardsContextBlock, buildTeacherGuidePrompt, buildWalkingSkeleton, buildWorksheetPrompt, checkSessionZpd, closeTruncatedJson, computeConceptSpiralProgression, computeContentHash, computePackingSpec, conductPreliminaryResearch, contentTools, convertRoadmapToFoundationSot, createAiInferenceError, createContextMissingError, createCurriculumStorage, createIdleAbortController, createStreamAbortController, createStreamAbortSignal, createStreamChunkExtractor, curateMediaLedger, designerTools, detectProjectPedagogy, dropCyclicConceptEdges, emitUsage, ensureExpositionForLesson, ensureKnowledgeExposition, entityRowAssignedTo, evaluateActivityAlignment, evaluateStandardsCoverage, executeCurriculumCommand, executeSlideProductionWorkflow, exportAllProjectQuizzes, expositionCacheKey, extractActivityContractRows, extractAssessmentMap, extractCurriculumHorizon, extractJsonArray, extractScopeSequenceRows, extractSectionHeadingsFromSLC, extractSessionSlice, extractStandardRefs, extractStreamChunk, extractSymbolLedger, extractThoughtAndContent, extractTieredScaffoldingBlock, 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, isActivityAlignmentLogOnly, isExpositionFresh, isModelAllowed, isProviderEnabled, isTranslationDue, lintAndSanitizeArtifact, lintCurriculumFramework, lintFrameworkPack, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, normalizeSlcContract, packagerTools, parseAllSessions, parseGateSettings, parseQuizMarkdown, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, publishToGitHub, publishToSupabase, rankGenCandidates, renderAssignedRowsTable, renderEntitySlotsForType, renderFrameworkFromPlan, renderHorizonPromptBlock, renderMediaPlaceholder, researcherTools, resolveApiKey, 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, validateHorizonCompliance, validateHybridDeckSlides, validateMarkdownTables, validateMermaidSyntax, withAutoRepair };
33115
33415
  //# sourceMappingURL=index.mjs.map
33116
33416
  //# sourceMappingURL=index.mjs.map