@thanh01.pmt/curriculum-kit 1.0.21 → 1.1.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.d.cts CHANGED
@@ -132,6 +132,8 @@ interface ProduceLessonOptions {
132
132
  artifactScope?: string[];
133
133
  force?: boolean;
134
134
  pedagogy?: PedagogicalModel;
135
+ targetLanguage?: string;
136
+ sectionLanguageContract?: string;
135
137
  /** Chiến lược batch (chỉ produceBatchLessons dùng). */
136
138
  batchStrategy?: 'depth_first_lesson' | 'breadth_first_artifact';
137
139
  /**
@@ -615,13 +617,29 @@ declare function isTranslationDue(target: TranslationTarget, context: {
615
617
  publishRequested: boolean;
616
618
  }): boolean;
617
619
 
620
+ /**
621
+ * Language Directive and Section Language Contract (SLC) resolution for Curriculum Generation.
622
+ */
623
+ declare function resolveTargetLanguageCode(language?: string | null): string;
624
+ declare function targetLanguageDisplayName(code: string): string;
625
+ declare function buildLanguageDirective(targetLanguage?: string | null): string;
626
+ /**
627
+ * Parses markdown table or lines from SECTION_LANGUAGE_CONTRACT.md to extract
628
+ * mapping for a specific artifact type.
629
+ */
630
+ declare function extractSectionHeadingsFromSLC(slcMarkdown: string | undefined | null, artifactType: string): Record<string, string>;
631
+ /**
632
+ * Builds the heading directive block to instruct LLM on verbatim section headings.
633
+ */
634
+ declare function buildHeadingDirective(artifactType: string, slcMarkdown?: string | null, targetLanguage?: string): string;
635
+
618
636
  /**
619
637
  * Curriculum OS - Standardized Error Taxonomy & Traceability System
620
638
  *
621
639
  * Provides typed, structured, and traceable error codes for all pipeline failures,
622
640
  * API exceptions, safeguard blocks, and contract violations.
623
641
  */
624
- type CurriculumErrorCode = 'ERR_AI_NO_API_KEY' | 'ERR_AI_RATE_LIMIT' | 'ERR_AI_AUTH_FAILED' | 'ERR_AI_NETWORK_TIMEOUT' | 'ERR_AI_RESPONSE_MALFORMED' | 'ERR_AI_ALL_PROVIDERS_FAILED' | 'ERR_SOT_MISSING' | 'ERR_SOT_INVALID_SCHEMA' | 'ERR_TASK_GATE_BLOCKED' | 'ERR_METERED_LIMIT_EXCEEDED' | 'ERR_SCHEMA_CONTRACT_VIOLATION' | 'ERR_STORAGE_IO_FAILED';
642
+ type CurriculumErrorCode = 'ERR_AI_NO_API_KEY' | 'ERR_AI_RATE_LIMIT' | 'ERR_AI_AUTH_FAILED' | 'ERR_AI_NETWORK_TIMEOUT' | 'ERR_AI_RESPONSE_MALFORMED' | 'ERR_AI_ALL_PROVIDERS_FAILED' | 'ERR_SOT_MISSING' | 'ERR_SOT_INVALID_SCHEMA' | 'ERR_TASK_GATE_BLOCKED' | 'ERR_METERED_LIMIT_EXCEEDED' | 'ERR_SCHEMA_CONTRACT_VIOLATION' | 'ERR_STORAGE_IO_FAILED' | 'ERR_LESSON_NOT_IN_SOT';
625
643
  interface CurriculumErrorDetail {
626
644
  errorCode: CurriculumErrorCode;
627
645
  agent?: string;
@@ -957,4 +975,4 @@ declare function getSlideLayoutPresetById(id: string): SlideLayoutPreset | undef
957
975
  */
958
976
  declare function getSlideLayoutPresetsByCategory(category: SlideLayoutCategory): SlideLayoutPreset[];
959
977
 
960
- export { ACT_TEMPLATE, AIProviderName, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, ActivityLab, type ArtifactProductionSpec, type AuditBundleInput, BELL_RINGER_TEMPLATE, BLOOM_ACTION_VERBS, BOM_TEMPLATE, BloomTaxonomyEvaluator, type BuildContextOptions, CHOICE_BOARD_TEMPLATE, CODE_LAB_TEMPLATE, CURRICULUM_SLASH_COMMANDS, CodeHardwareFeasibilityEvaluator, CodeLab, type ComprehensiveAcademicReport, ConstructiveAlignmentEvaluator, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DependencyEdge, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, type GenerateExpositionOptions, HANDOUT_TEMPLATE, ICurriculumStorage, LAYER_TOTAL_BUDGET_MS, LESSON_PLAN_TEMPLATE, type LayerChunkCallback, type LayerPrefillOptions, type LayerPrefillResult, type LayoutBoxConfig, LessonPlan, MisconceptionEvaluator, ModelResolutionOptions, PROJECT_INSTRUCTION_TEMPLATE, type PackingSpec, type PedagogicalModel, type PipelineExecutionProgress, PlanConstraints, type PlanOptions, type PlanResult, type PlannerLlmFn, PlanningGraph, PlanningNode, type PreliminaryResearchResult, type ProduceLessonOptions, type ProduceLessonResult, type ProjectBriefingData, type ProjectClarification, type ProjectCreationPayload, type ProjectIntentAnalysisResult, ProjectStatusReport, type ProjectionMeta, QUIZ_TEMPLATE, QualityAuditReport, REVIEW_GAME_TEMPLATE, RUBRIC_TEMPLATE, ResolvedGateSettings, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STATION_ROTATION_TEMPLATE, type SlashCommandDefinition, SlideDeck, type SlideLayoutCategory, type SlideLayoutData, type SlideLayoutPreset, SmartResumeContext, type StreamAbortHandle, type StreamBudget, type StreamChunkExtractor, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TranslationPolicy, type TranslationTarget, type TranslationTrigger, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildExpositionContext, buildSessionSliceContext, closeTruncatedJson, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createStreamAbortSignal, createStreamChunkExtractor, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, executeCurriculumCommand, expositionCacheKey, extractScopeSequenceRows, extractSessionSlice, extractStreamChunk, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderFrameworkFromPlan, resolveStreamBudget, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, stripLlmJsonWrappers, topoSort };
978
+ export { ACT_TEMPLATE, AIProviderName, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, ActivityLab, type ArtifactProductionSpec, type AuditBundleInput, BELL_RINGER_TEMPLATE, BLOOM_ACTION_VERBS, BOM_TEMPLATE, BloomTaxonomyEvaluator, type BuildContextOptions, CHOICE_BOARD_TEMPLATE, CODE_LAB_TEMPLATE, CURRICULUM_SLASH_COMMANDS, CodeHardwareFeasibilityEvaluator, CodeLab, type ComprehensiveAcademicReport, ConstructiveAlignmentEvaluator, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DependencyEdge, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, type GenerateExpositionOptions, HANDOUT_TEMPLATE, ICurriculumStorage, LAYER_TOTAL_BUDGET_MS, LESSON_PLAN_TEMPLATE, type LayerChunkCallback, type LayerPrefillOptions, type LayerPrefillResult, type LayoutBoxConfig, LessonPlan, MisconceptionEvaluator, ModelResolutionOptions, PROJECT_INSTRUCTION_TEMPLATE, type PackingSpec, type PedagogicalModel, type PipelineExecutionProgress, PlanConstraints, type PlanOptions, type PlanResult, type PlannerLlmFn, PlanningGraph, PlanningNode, type PreliminaryResearchResult, type ProduceLessonOptions, type ProduceLessonResult, type ProjectBriefingData, type ProjectClarification, type ProjectCreationPayload, type ProjectIntentAnalysisResult, ProjectStatusReport, type ProjectionMeta, QUIZ_TEMPLATE, QualityAuditReport, REVIEW_GAME_TEMPLATE, RUBRIC_TEMPLATE, ResolvedGateSettings, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STATION_ROTATION_TEMPLATE, type SlashCommandDefinition, SlideDeck, type SlideLayoutCategory, type SlideLayoutData, type SlideLayoutPreset, SmartResumeContext, type StreamAbortHandle, type StreamBudget, type StreamChunkExtractor, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TranslationPolicy, type TranslationTarget, type TranslationTrigger, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildExpositionContext, buildHeadingDirective, buildLanguageDirective, buildSessionSliceContext, closeTruncatedJson, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createStreamAbortSignal, createStreamChunkExtractor, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, executeCurriculumCommand, expositionCacheKey, extractScopeSequenceRows, extractSectionHeadingsFromSLC, extractSessionSlice, extractStreamChunk, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderFrameworkFromPlan, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, stripLlmJsonWrappers, targetLanguageDisplayName, topoSort };
package/dist/index.d.ts CHANGED
@@ -132,6 +132,8 @@ interface ProduceLessonOptions {
132
132
  artifactScope?: string[];
133
133
  force?: boolean;
134
134
  pedagogy?: PedagogicalModel;
135
+ targetLanguage?: string;
136
+ sectionLanguageContract?: string;
135
137
  /** Chiến lược batch (chỉ produceBatchLessons dùng). */
136
138
  batchStrategy?: 'depth_first_lesson' | 'breadth_first_artifact';
137
139
  /**
@@ -615,13 +617,29 @@ declare function isTranslationDue(target: TranslationTarget, context: {
615
617
  publishRequested: boolean;
616
618
  }): boolean;
617
619
 
620
+ /**
621
+ * Language Directive and Section Language Contract (SLC) resolution for Curriculum Generation.
622
+ */
623
+ declare function resolveTargetLanguageCode(language?: string | null): string;
624
+ declare function targetLanguageDisplayName(code: string): string;
625
+ declare function buildLanguageDirective(targetLanguage?: string | null): string;
626
+ /**
627
+ * Parses markdown table or lines from SECTION_LANGUAGE_CONTRACT.md to extract
628
+ * mapping for a specific artifact type.
629
+ */
630
+ declare function extractSectionHeadingsFromSLC(slcMarkdown: string | undefined | null, artifactType: string): Record<string, string>;
631
+ /**
632
+ * Builds the heading directive block to instruct LLM on verbatim section headings.
633
+ */
634
+ declare function buildHeadingDirective(artifactType: string, slcMarkdown?: string | null, targetLanguage?: string): string;
635
+
618
636
  /**
619
637
  * Curriculum OS - Standardized Error Taxonomy & Traceability System
620
638
  *
621
639
  * Provides typed, structured, and traceable error codes for all pipeline failures,
622
640
  * API exceptions, safeguard blocks, and contract violations.
623
641
  */
624
- type CurriculumErrorCode = 'ERR_AI_NO_API_KEY' | 'ERR_AI_RATE_LIMIT' | 'ERR_AI_AUTH_FAILED' | 'ERR_AI_NETWORK_TIMEOUT' | 'ERR_AI_RESPONSE_MALFORMED' | 'ERR_AI_ALL_PROVIDERS_FAILED' | 'ERR_SOT_MISSING' | 'ERR_SOT_INVALID_SCHEMA' | 'ERR_TASK_GATE_BLOCKED' | 'ERR_METERED_LIMIT_EXCEEDED' | 'ERR_SCHEMA_CONTRACT_VIOLATION' | 'ERR_STORAGE_IO_FAILED';
642
+ type CurriculumErrorCode = 'ERR_AI_NO_API_KEY' | 'ERR_AI_RATE_LIMIT' | 'ERR_AI_AUTH_FAILED' | 'ERR_AI_NETWORK_TIMEOUT' | 'ERR_AI_RESPONSE_MALFORMED' | 'ERR_AI_ALL_PROVIDERS_FAILED' | 'ERR_SOT_MISSING' | 'ERR_SOT_INVALID_SCHEMA' | 'ERR_TASK_GATE_BLOCKED' | 'ERR_METERED_LIMIT_EXCEEDED' | 'ERR_SCHEMA_CONTRACT_VIOLATION' | 'ERR_STORAGE_IO_FAILED' | 'ERR_LESSON_NOT_IN_SOT';
625
643
  interface CurriculumErrorDetail {
626
644
  errorCode: CurriculumErrorCode;
627
645
  agent?: string;
@@ -957,4 +975,4 @@ declare function getSlideLayoutPresetById(id: string): SlideLayoutPreset | undef
957
975
  */
958
976
  declare function getSlideLayoutPresetsByCategory(category: SlideLayoutCategory): SlideLayoutPreset[];
959
977
 
960
- export { ACT_TEMPLATE, AIProviderName, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, ActivityLab, type ArtifactProductionSpec, type AuditBundleInput, BELL_RINGER_TEMPLATE, BLOOM_ACTION_VERBS, BOM_TEMPLATE, BloomTaxonomyEvaluator, type BuildContextOptions, CHOICE_BOARD_TEMPLATE, CODE_LAB_TEMPLATE, CURRICULUM_SLASH_COMMANDS, CodeHardwareFeasibilityEvaluator, CodeLab, type ComprehensiveAcademicReport, ConstructiveAlignmentEvaluator, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DependencyEdge, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, type GenerateExpositionOptions, HANDOUT_TEMPLATE, ICurriculumStorage, LAYER_TOTAL_BUDGET_MS, LESSON_PLAN_TEMPLATE, type LayerChunkCallback, type LayerPrefillOptions, type LayerPrefillResult, type LayoutBoxConfig, LessonPlan, MisconceptionEvaluator, ModelResolutionOptions, PROJECT_INSTRUCTION_TEMPLATE, type PackingSpec, type PedagogicalModel, type PipelineExecutionProgress, PlanConstraints, type PlanOptions, type PlanResult, type PlannerLlmFn, PlanningGraph, PlanningNode, type PreliminaryResearchResult, type ProduceLessonOptions, type ProduceLessonResult, type ProjectBriefingData, type ProjectClarification, type ProjectCreationPayload, type ProjectIntentAnalysisResult, ProjectStatusReport, type ProjectionMeta, QUIZ_TEMPLATE, QualityAuditReport, REVIEW_GAME_TEMPLATE, RUBRIC_TEMPLATE, ResolvedGateSettings, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STATION_ROTATION_TEMPLATE, type SlashCommandDefinition, SlideDeck, type SlideLayoutCategory, type SlideLayoutData, type SlideLayoutPreset, SmartResumeContext, type StreamAbortHandle, type StreamBudget, type StreamChunkExtractor, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TranslationPolicy, type TranslationTarget, type TranslationTrigger, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildExpositionContext, buildSessionSliceContext, closeTruncatedJson, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createStreamAbortSignal, createStreamChunkExtractor, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, executeCurriculumCommand, expositionCacheKey, extractScopeSequenceRows, extractSessionSlice, extractStreamChunk, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderFrameworkFromPlan, resolveStreamBudget, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, stripLlmJsonWrappers, topoSort };
978
+ export { ACT_TEMPLATE, AIProviderName, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, ActivityLab, type ArtifactProductionSpec, type AuditBundleInput, BELL_RINGER_TEMPLATE, BLOOM_ACTION_VERBS, BOM_TEMPLATE, BloomTaxonomyEvaluator, type BuildContextOptions, CHOICE_BOARD_TEMPLATE, CODE_LAB_TEMPLATE, CURRICULUM_SLASH_COMMANDS, CodeHardwareFeasibilityEvaluator, CodeLab, type ComprehensiveAcademicReport, ConstructiveAlignmentEvaluator, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DependencyEdge, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, type GenerateExpositionOptions, HANDOUT_TEMPLATE, ICurriculumStorage, LAYER_TOTAL_BUDGET_MS, LESSON_PLAN_TEMPLATE, type LayerChunkCallback, type LayerPrefillOptions, type LayerPrefillResult, type LayoutBoxConfig, LessonPlan, MisconceptionEvaluator, ModelResolutionOptions, PROJECT_INSTRUCTION_TEMPLATE, type PackingSpec, type PedagogicalModel, type PipelineExecutionProgress, PlanConstraints, type PlanOptions, type PlanResult, type PlannerLlmFn, PlanningGraph, PlanningNode, type PreliminaryResearchResult, type ProduceLessonOptions, type ProduceLessonResult, type ProjectBriefingData, type ProjectClarification, type ProjectCreationPayload, type ProjectIntentAnalysisResult, ProjectStatusReport, type ProjectionMeta, QUIZ_TEMPLATE, QualityAuditReport, REVIEW_GAME_TEMPLATE, RUBRIC_TEMPLATE, ResolvedGateSettings, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STATION_ROTATION_TEMPLATE, type SlashCommandDefinition, SlideDeck, type SlideLayoutCategory, type SlideLayoutData, type SlideLayoutPreset, SmartResumeContext, type StreamAbortHandle, type StreamBudget, type StreamChunkExtractor, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TranslationPolicy, type TranslationTarget, type TranslationTrigger, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildExpositionContext, buildHeadingDirective, buildLanguageDirective, buildSessionSliceContext, closeTruncatedJson, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createStreamAbortSignal, createStreamChunkExtractor, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, executeCurriculumCommand, expositionCacheKey, extractScopeSequenceRows, extractSectionHeadingsFromSLC, extractSessionSlice, extractStreamChunk, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderFrameworkFromPlan, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, stripLlmJsonWrappers, targetLanguageDisplayName, topoSort };
package/dist/index.mjs CHANGED
@@ -2421,9 +2421,20 @@ var SessionPlanSchema = z.object({
2421
2421
  differentiation: z.object({ bronze: z.string(), silver: z.string(), gold: z.string() })
2422
2422
  });
2423
2423
  var TranslationPolicySchema = z.object({
2424
- policy: z.enum(["after_artifact", "end_of_unit", "at_publish"]).default("at_publish"),
2424
+ policy: z.enum(["after_artifact", "end_of_unit", "at_publish", "native"]).default("native"),
2425
2425
  target_language: z.string().nullable().default(null)
2426
- });
2426
+ }).refine(
2427
+ (data) => {
2428
+ if (data.policy === "native") {
2429
+ return typeof data.target_language === "string" && data.target_language.trim().length > 0;
2430
+ }
2431
+ return true;
2432
+ },
2433
+ {
2434
+ message: "When translation policy is 'native', target_language must be a non-empty string",
2435
+ path: ["target_language"]
2436
+ }
2437
+ );
2427
2438
  var CoverageReportSchema = z.object({
2428
2439
  assigned_node_ids: z.array(z.string()),
2429
2440
  unassigned_node_ids: z.array(z.string()),
@@ -8626,12 +8637,15 @@ var SupabaseCurriculumAdapter = class {
8626
8637
  } catch {
8627
8638
  }
8628
8639
  }
8640
+ if (relPathOrIdentifier.includes(".md") || relPathOrIdentifier.includes(".json") || relPathOrIdentifier.includes("/")) {
8641
+ return null;
8642
+ }
8629
8643
  const lessonMatch = relPathOrIdentifier.match(/U\d+_M\d+_L\d+/i);
8630
8644
  if (lessonMatch) {
8631
8645
  const lessonId = lessonMatch[0].toUpperCase();
8632
8646
  const unitCode = lessonId.split("_")[0] || "U01";
8633
8647
  const lower = relPathOrIdentifier.toLowerCase();
8634
- let artifactPrefix = "LESSON";
8648
+ let artifactPrefix = null;
8635
8649
  if (lower.includes("act") || lower.includes("lab") || lower.includes("th\u1EF1c h\xE0nh")) {
8636
8650
  artifactPrefix = "ACT";
8637
8651
  } else if (lower.includes("quiz") || lower.includes("tr\u1EAFc nghi\u1EC7m") || lower.includes("\u0111\xE1nh gi\xE1")) {
@@ -8640,8 +8654,31 @@ var SupabaseCurriculumAdapter = class {
8640
8654
  artifactPrefix = "SLIDE";
8641
8655
  } else if (lower.includes("guide") || lower.includes("h\u01B0\u1EDBng d\u1EABn")) {
8642
8656
  artifactPrefix = "GUIDE";
8657
+ } else if (lower.includes("wks") || lower.includes("worksheet") || lower.includes("phi\u1EBFu b\xE0i t\u1EADp")) {
8658
+ artifactPrefix = "WKS";
8659
+ } else if (lower.includes("handout") || lower.includes("t\xE0i li\u1EC7u")) {
8660
+ artifactPrefix = "HANDOUT";
8661
+ } else if (lower.includes("code")) {
8662
+ artifactPrefix = "CODE";
8663
+ } else if (lower.includes("ext") || lower.includes("extension") || lower.includes("m\u1EDF r\u1ED9ng")) {
8664
+ artifactPrefix = "EXT";
8665
+ } else if (lower.includes("exp") || lower.includes("exposition") || lower.includes("t\u1EF1 h\u1ECDc") || lower.includes("ki\u1EBFn th\u1EE9c n\u1EC1n")) {
8666
+ artifactPrefix = "EXPOSITION";
8667
+ } else if (lower.includes("rubric")) {
8668
+ artifactPrefix = "RUBRIC";
8669
+ } else if (lower.includes("bom")) {
8670
+ artifactPrefix = "BOM";
8671
+ } else if (lower.includes("lesson") || lower.includes("gi\xE1o \xE1n") || lower.includes("5e")) {
8672
+ artifactPrefix = "LESSON";
8673
+ }
8674
+ if (!artifactPrefix) {
8675
+ return null;
8643
8676
  }
8644
- const candidatePaths = [
8677
+ const candidatePaths = artifactPrefix === "EXPOSITION" ? [
8678
+ `${projectId}/_sot/expositions/${lessonId}.md`,
8679
+ `${projectId}/_content/${unitCode}/EXPOSITION_${lessonId}.md`,
8680
+ `${projectId}/lessons/${lessonId}/EXPOSITION_${lessonId}.md`
8681
+ ] : [
8645
8682
  `${projectId}/_content/${unitCode}/${artifactPrefix}_${lessonId}.md`,
8646
8683
  `${projectId}/lessons/${lessonId}/${artifactPrefix}_${lessonId}.md`,
8647
8684
  `${projectId}/${artifactPrefix}_${lessonId}.md`
@@ -9818,6 +9855,7 @@ async function ensureExpositionForLesson(storage, projectId, lessonCode, options
9818
9855
  });
9819
9856
  return { relPath: result.relPath, context: buildExpositionContext(result.content), reused: result.reused };
9820
9857
  }
9858
+ init_errors();
9821
9859
  var asArr = (v) => Array.isArray(v) ? v : [];
9822
9860
  var asStr = (v, dflt = "") => typeof v === "string" ? v : dflt;
9823
9861
  var asNum = (v, dflt) => typeof v === "number" && Number.isFinite(v) ? v : dflt;
@@ -10460,7 +10498,15 @@ function extractSessionSlice(plan, lessonCode) {
10460
10498
  }
10461
10499
  function buildSessionSliceContext(plan, lessonCode) {
10462
10500
  const s = plan.sessions.find((x) => x.id === lessonCode);
10463
- if (!s) return "";
10501
+ if (!s) {
10502
+ throw new CurriculumError({
10503
+ errorCode: "ERR_LESSON_NOT_IN_SOT",
10504
+ message: `Session "${lessonCode}" not found in CURRICULUM_PLAN.json (${plan.plan_hash})`,
10505
+ suggestedAction: "\u0110\u1ED3ng b\u1ED9 CURRICULUM_PLAN r\u1ED3i ch\u1EA1y l\u1EA1i",
10506
+ retryable: false,
10507
+ lessonId: lessonCode
10508
+ });
10509
+ }
10464
10510
  const lines = [];
10465
10511
  lines.push("[SESSION SLICE (from CURRICULUM_PLAN " + plan.plan_hash + ")]");
10466
10512
  lines.push("- Objective: " + s.prose_objective);
@@ -11027,6 +11073,80 @@ function resolveStandardsPacks(packIds) {
11027
11073
  return packs;
11028
11074
  }
11029
11075
 
11076
+ // src/services/languageDirective.ts
11077
+ function resolveTargetLanguageCode(language) {
11078
+ const raw = String(language || "vi").trim().toLowerCase();
11079
+ if (raw.startsWith("vi")) return "vi";
11080
+ if (raw.startsWith("en")) return "en";
11081
+ return raw || "vi";
11082
+ }
11083
+ function targetLanguageDisplayName(code) {
11084
+ const map = {
11085
+ vi: "Vietnamese (Ti\u1EBFng Vi\u1EC7t)",
11086
+ en: "English (US)"
11087
+ };
11088
+ return map[code] || code;
11089
+ }
11090
+ function buildLanguageDirective(targetLanguage) {
11091
+ const code = resolveTargetLanguageCode(targetLanguage);
11092
+ const name = targetLanguageDisplayName(code);
11093
+ const perLanguageExamples = {
11094
+ 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.`,
11095
+ en: `- Example compliant lesson title: "Lesson 1: Exploring Basic Circuits" \u2014 natural, idiomatic English throughout.`
11096
+ };
11097
+ const exampleLine = perLanguageExamples[code] || "";
11098
+ return `MANDATORY LANGUAGE DIRECTIVE (TARGET OUTPUT LANGUAGE: ${name}):
11099
+ - The TARGET OUTPUT LANGUAGE for this course is ${name}. You MUST author the ENTIRE document in ${name}.
11100
+ - All section titles, table headers, table cells, lesson names, learning objectives, pedagogical narratives, and cognitive analyses MUST be written in natural, fluent, academic ${name}.
11101
+ - 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}.
11102
+ - DO NOT mix in paragraphs, tables, or titles written in any other language. Strict adherence is required.${exampleLine ? `
11103
+ ${exampleLine}` : ""}`;
11104
+ }
11105
+ function extractSectionHeadingsFromSLC(slcMarkdown, artifactType) {
11106
+ if (!slcMarkdown) return {};
11107
+ const upperType = artifactType.trim().toUpperCase();
11108
+ const blocks = slcMarkdown.split(/\n(?=#{2,3}\s+[A-Z0-9_]+)/g);
11109
+ for (const block of blocks) {
11110
+ const headerMatch = block.match(/^#{2,3}\s+([A-Z0-9_]+)/);
11111
+ if (!headerMatch) continue;
11112
+ const blockType = headerMatch[1].trim().toUpperCase();
11113
+ if (blockType === upperType || upperType.startsWith("LESSON") && blockType.startsWith("LESSON")) {
11114
+ const mapping = {};
11115
+ const lines = block.split("\n");
11116
+ for (const line of lines) {
11117
+ const trimmed = line.trim();
11118
+ if (trimmed.startsWith("|") && !trimmed.includes("---")) {
11119
+ const cells = trimmed.split("|").map((c) => c.trim()).filter((_, idx, arr) => idx > 0 && idx < arr.length - 1);
11120
+ if (cells.length >= 2 && !cells[0].toLowerCase().includes("canonical") && !cells[1].toLowerCase().includes("localized")) {
11121
+ mapping[cells[0]] = cells[1];
11122
+ }
11123
+ } else {
11124
+ const bullet = line.match(/^[-*]\s+([^:]+):\s+(.+)$/);
11125
+ if (bullet) {
11126
+ mapping[bullet[1].trim()] = bullet[2].trim();
11127
+ }
11128
+ }
11129
+ }
11130
+ if (Object.keys(mapping).length > 0) return mapping;
11131
+ }
11132
+ }
11133
+ return {};
11134
+ }
11135
+ function buildHeadingDirective(artifactType, slcMarkdown, targetLanguage = "vi") {
11136
+ const headings = extractSectionHeadingsFromSLC(slcMarkdown, artifactType);
11137
+ if (Object.keys(headings).length === 0) {
11138
+ return "";
11139
+ }
11140
+ const lines = Object.entries(headings).map(
11141
+ ([canonical, localized]) => ` - "${canonical}" -> Use Display Heading: "${localized}"`
11142
+ );
11143
+ return `MANDATORY SECTION HEADINGS FROM SECTION_LANGUAGE_CONTRACT:
11144
+ - The YAML frontmatter \`template_required_sections\` MUST preserve the exact English canonical keys.
11145
+ - In the markdown body, section headers MUST use the EXACT Localized Display Labels below (do NOT translate or paraphrase):
11146
+ ${lines.join("\n")}
11147
+ - For example: if canonical section is "Computational Thinking Focus", your heading must be "## [REQUIRED] ${headings["Computational Thinking Focus"] || "Computational Thinking Focus"}".`;
11148
+ }
11149
+
11030
11150
  // src/services/lessonProductionService.ts
11031
11151
  var __filename2 = typeof import.meta?.url === "string" ? fileURLToPath(import.meta.url) : "";
11032
11152
  var _resolvedDir = __filename2 ? path3.dirname(__filename2) : typeof __dirname !== "undefined" ? __dirname : process.cwd();
@@ -11068,11 +11188,44 @@ function detectProjectPedagogy(frameworkText, styleGuideText, explicitPedagogy)
11068
11188
  return "5e";
11069
11189
  }
11070
11190
  async function getLessonMetadata(storage, projectId, lessonId) {
11071
- const framework = await storage.readSotDocument(projectId, "CURRICULUM_FRAMEWORK.md") || "";
11072
11191
  const parts = lessonId.split("_");
11073
11192
  const unitCode = parts[0] || "U01";
11074
11193
  const moduleCode = parts.length >= 2 ? `${parts[0]}_${parts[1]}` : `${unitCode}_M01`;
11075
11194
  const lessonCode = lessonId;
11195
+ let planStr = null;
11196
+ try {
11197
+ planStr = await storage.readSotDocument(projectId, "CURRICULUM_PLAN.json") || await storage.readArtifact(projectId, "_sot/CURRICULUM_PLAN.json") || await storage.readArtifact(projectId, "CURRICULUM_PLAN.json");
11198
+ } catch {
11199
+ }
11200
+ if (planStr) {
11201
+ try {
11202
+ const plan = JSON.parse(planStr);
11203
+ if (Array.isArray(plan.sessions)) {
11204
+ const session = plan.sessions.find((s) => s.id === lessonId);
11205
+ if (session) {
11206
+ const lessonTitle2 = session.title || `Lesson ${lessonId}`;
11207
+ const keywords = Array.isArray(session.new_keywords) && session.new_keywords.length > 0 ? ` T\u1EEB kh\xF3a: ${session.new_keywords.join(", ")}` : "";
11208
+ const objective2 = session.prose_objective || session.title || "";
11209
+ const concept2 = objective2 ? `${objective2}.${keywords}` : session.title || "Core Technical Competency";
11210
+ const prerequisites2 = session.anchor_type ? `Anchor: ${session.anchor_type}` : "None";
11211
+ const depth = Array.isArray(session.depth_assignments) ? session.depth_assignments[0]?.depth : session.depth_assignments?.knowledge_depth;
11212
+ const bloomLevel2 = depth === "sio" ? "Create" : depth === "cio" ? "Apply" : "Understand";
11213
+ return {
11214
+ unitCode: session.unit_id || unitCode,
11215
+ moduleCode,
11216
+ lessonCode,
11217
+ lessonTitle: lessonTitle2,
11218
+ concept: `M\u1EE5c ti\xEAu bu\u1ED5i h\u1ECDc: ${concept2}`,
11219
+ prerequisites: prerequisites2,
11220
+ bloomLevel: bloomLevel2
11221
+ };
11222
+ }
11223
+ }
11224
+ } catch (planErr) {
11225
+ console.warn(`[getLessonMetadata] Error parsing CURRICULUM_PLAN.json for ${projectId}:`, planErr);
11226
+ }
11227
+ }
11228
+ const framework = await storage.readSotDocument(projectId, "CURRICULUM_FRAMEWORK.md") || "";
11076
11229
  let lessonTitle = `Lesson ${lessonId}`;
11077
11230
  let concept = "Core Technical Competency";
11078
11231
  let prerequisites = "None";
@@ -11117,15 +11270,24 @@ async function getLessonMetadata(storage, projectId, lessonId) {
11117
11270
  }
11118
11271
  if (found) break;
11119
11272
  }
11120
- return {
11121
- unitCode,
11122
- moduleCode,
11123
- lessonCode,
11124
- lessonTitle,
11125
- concept: objective ? `${concept}. M\u1EE5c ti\xEAu bu\u1ED5i h\u1ECDc: ${objective}` : concept,
11126
- prerequisites: deliverable ? `${prerequisites}. S\u1EA3n ph\u1EA9m hands-on c\u1EE7a bu\u1ED5i: ${deliverable}` : prerequisites,
11127
- bloomLevel
11128
- };
11273
+ if (found) {
11274
+ return {
11275
+ unitCode,
11276
+ moduleCode,
11277
+ lessonCode,
11278
+ lessonTitle,
11279
+ concept: objective ? `${concept}. M\u1EE5c ti\xEAu bu\u1ED5i h\u1ECDc: ${objective}` : concept,
11280
+ prerequisites: deliverable ? `${prerequisites}. S\u1EA3n ph\u1EA9m hands-on c\u1EE7a bu\u1ED5i: ${deliverable}` : prerequisites,
11281
+ bloomLevel
11282
+ };
11283
+ }
11284
+ throw new CurriculumError({
11285
+ errorCode: "ERR_LESSON_NOT_IN_SOT",
11286
+ lessonId,
11287
+ message: `ERR_LESSON_NOT_IN_SOT: B\xE0i h\u1ECDc "${lessonId}" kh\xF4ng t\u1ED3n t\u1EA1i trong CURRICULUM_PLAN.json ho\u1EB7c CURRICULUM_FRAMEWORK.md c\u1EE7a d\u1EF1 \xE1n "${projectId}".`,
11288
+ suggestedAction: "\u0110\u1ED3ng b\u1ED9 CURRICULUM_PLAN r\u1ED3i ch\u1EA1y l\u1EA1i",
11289
+ retryable: false
11290
+ });
11129
11291
  }
11130
11292
  function buildFrameworkExcerptForLesson(framework, lessonId) {
11131
11293
  if (!framework) return "";
@@ -11167,7 +11329,7 @@ ${nextRow}`
11167
11329
  ].filter(Boolean);
11168
11330
  return parts.join("\n\n") || framework.slice(0, 1500);
11169
11331
  }
11170
- function buildLessonPrompt(pedagogy, lessonCode, unitCode, lessonTitle, concept, bloomLevel, dateStr) {
11332
+ function buildLessonPrompt(pedagogy, lessonCode, unitCode, lessonTitle, concept, bloomLevel, dateStr, targetLanguage = "vi", sectionLanguageContract) {
11171
11333
  const commonFrontmatter = `id: "LESSON_${lessonCode}"
11172
11334
  title: "${lessonTitle}"
11173
11335
  created_by: "Curriculum OS Builder"
@@ -11187,8 +11349,9 @@ template_required_sections:
11187
11349
  - "Artifact Contract"
11188
11350
  - "B. Lesson Flow"
11189
11351
  - "Artifact Linkage"`;
11352
+ let prompt = "";
11190
11353
  if (pedagogy === "edp") {
11191
- return `You are @content (Educational Content Editor & EDP Engineering Design Process Specialist).
11354
+ prompt = `You are @content (Educational Content Editor & EDP Engineering Design Process Specialist).
11192
11355
  Author the comprehensive Master Lesson Plan adhering strictly to \`LESSON_EDP_template.md\` standards for:
11193
11356
  - Lesson Code: ${lessonCode}
11194
11357
  - Title: ${lessonTitle}
@@ -11237,9 +11400,8 @@ Linkage ledger mapping all satellite artifacts (\`ACT_...\`, \`QUIZ_...\`, \`SLI
11237
11400
 
11238
11401
  3. Ensure all sample code and schemas are 100% syntax-valid and executable.
11239
11402
  4. Output 100% clean Markdown directly.`;
11240
- }
11241
- if (pedagogy === "pbl" || pedagogy === "general") {
11242
- return `You are @content (Educational Content Editor & PBL/General Pedagogy Specialist).
11403
+ } else if (pedagogy === "pbl" || pedagogy === "general") {
11404
+ prompt = `You are @content (Educational Content Editor & PBL/General Pedagogy Specialist).
11243
11405
  Author the comprehensive Master Lesson Plan adhering strictly to \`LESSON_GENERAL_template.md\` standards for:
11244
11406
  - Lesson Code: ${lessonCode}
11245
11407
  - Title: ${lessonTitle}
@@ -11286,8 +11448,8 @@ type: "LESSON_GENERAL"
11286
11448
  Linkage ledger mapping all satellite artifacts (\`ACT_...\`, \`QUIZ_...\`, \`SLIDE_...\`).
11287
11449
 
11288
11450
  3. Output 100% clean Markdown directly.`;
11289
- }
11290
- return `You are @content (Educational Content Editor & 5E Instructional Model Specialist).
11451
+ } else {
11452
+ prompt = `You are @content (Educational Content Editor & 5E Instructional Model Specialist).
11291
11453
  Author the comprehensive Master Lesson Plan adhering strictly to \`LESSON_5E_template.md\` standards for:
11292
11454
  - Lesson Code: ${lessonCode}
11293
11455
  - Title: ${lessonTitle}
@@ -11335,6 +11497,18 @@ Linkage ledger mapping all satellite artifacts (\`GUIDE_...\`, \`SLIDE_...\`, \`
11335
11497
 
11336
11498
  3. Ensure all sample code and syntax are 100% verified and runnable.
11337
11499
  4. Output 100% clean Markdown directly.`;
11500
+ }
11501
+ const langDirective = buildLanguageDirective(targetLanguage);
11502
+ const headingDirective = buildHeadingDirective(
11503
+ pedagogy === "edp" ? "LESSON_EDP" : pedagogy === "general" || pedagogy === "pbl" ? "LESSON_GENERAL" : "LESSON_5E",
11504
+ sectionLanguageContract,
11505
+ targetLanguage
11506
+ );
11507
+ return `${prompt}
11508
+
11509
+ ${langDirective}${headingDirective ? `
11510
+
11511
+ ${headingDirective}` : ""}`;
11338
11512
  }
11339
11513
  async function produceSingleLesson(storage, projectId, lessonId, options = {}) {
11340
11514
  const {
@@ -11365,6 +11539,20 @@ async function produceSingleLesson(storage, projectId, lessonId, options = {}) {
11365
11539
  const styleGuide = await storage.readSotDocument(projectId, "CONTENT_STYLE_GUIDE.md") || "";
11366
11540
  const refPack = await storage.readSotDocument(projectId, "REFERENCE_PACK.md") || "";
11367
11541
  await storage.readSotDocument(projectId, "LEARNER_PROFILE.md") || "";
11542
+ const slcMarkdown = options.sectionLanguageContract || await storage.readSotDocument(projectId, "SECTION_LANGUAGE_CONTRACT.md") || "";
11543
+ let targetLang = options.targetLanguage;
11544
+ if (!targetLang) {
11545
+ try {
11546
+ const planRaw = await storage.readArtifact(projectId, "_sot/CURRICULUM_PLAN.json");
11547
+ if (planRaw) {
11548
+ const p = JSON.parse(planRaw);
11549
+ targetLang = p?.translation?.target_language;
11550
+ }
11551
+ } catch {
11552
+ }
11553
+ }
11554
+ targetLang = targetLang || "vi";
11555
+ const languageDirective = buildLanguageDirective(targetLang);
11368
11556
  let expositionContext = "";
11369
11557
  let sessionSliceContext = "";
11370
11558
  try {
@@ -11434,7 +11622,9 @@ Khi n\u1ED9i dung c\u1EA7n minh h\u1ECDa (diagram quy tr\xECnh, s\u01A1 \u0111\u
11434
11622
  lessonTitle,
11435
11623
  concept,
11436
11624
  bloomLevel,
11437
- dateStr
11625
+ dateStr,
11626
+ targetLang,
11627
+ slcMarkdown
11438
11628
  ) + mediaDirective;
11439
11629
  const rawLesson = await runCurriculumAIInference(
11440
11630
  [{ role: "user", content: lessonPrompt }],
@@ -11775,7 +11965,11 @@ template_required_sections:
11775
11965
  - ### Phase 3: Debugging & Testing
11776
11966
  - ## [REQUIRED] 3-Tier Differentiation (Bronze/Silver/Gold tasks)
11777
11967
  - ## [REQUIRED] Reflection (Discussion question)
11778
- 3. Output 100% clean Markdown directly \u2014 NO code fences around the document.`;
11968
+ 3. Output 100% clean Markdown directly \u2014 NO code fences around the document.
11969
+
11970
+ ${languageDirective}
11971
+
11972
+ ${buildHeadingDirective("ACT", slcMarkdown, targetLang)}`;
11779
11973
  const rawAct = await runCurriculumAIInference(
11780
11974
  [{ role: "user", content: actPrompt }],
11781
11975
  satelliteContext,
@@ -11847,7 +12041,11 @@ template_required_sections:
11847
12041
  - ## [REQUIRED] Multiple-Choice Question Bank (\u22655 scenario-based 4-option questions with: Question text, A/B/C/D options, Correct answer, Bloom level, Detailed distractor rationale)
11848
12042
  - ## [REQUIRED] Code Analysis / Debugging Question (1 deep code tracing question requiring students to predict output or identify bugs)
11849
12043
  - ## [REQUIRED] Competency Rubric (4-tier matrix: Developing \u2192 Proficient \u2192 Advanced \u2192 Exemplary)
11850
- 3. Output 100% clean Markdown directly \u2014 NO code fences around the document.`;
12044
+ 3. Output 100% clean Markdown directly \u2014 NO code fences around the document.
12045
+
12046
+ ${languageDirective}
12047
+
12048
+ ${buildHeadingDirective("QUIZ", slcMarkdown, targetLang)}`;
11851
12049
  const rawQuiz = await runCurriculumAIInference(
11852
12050
  [{ role: "user", content: quizPrompt }],
11853
12051
  satelliteContext,
@@ -11926,7 +12124,11 @@ Mandatory Canvas & Presentation Invariants:
11926
12124
  * COLD CALL / CHECK: Specific diagnostic question to ask students.
11927
12125
  * SCAFFOLDING / GOTCHA: Guidance for students who get stuck.
11928
12126
  * PACING: Recommended minutes for the slide.
11929
- - Output 100% valid Marp Markdown.`;
12127
+ - Output 100% valid Marp Markdown.
12128
+
12129
+ ${languageDirective}
12130
+
12131
+ ${buildHeadingDirective("SLIDE", slcMarkdown, targetLang)}`;
11930
12132
  const rawSlide = await runCurriculumAIInference(
11931
12133
  [{ role: "user", content: slidePrompt }],
11932
12134
  satelliteContext,
@@ -11993,7 +12195,11 @@ template_contract: "artifact-template-v1"
11993
12195
  - ## [REQUIRED] Facilitation Script & Timeline (Phase-by-phase teacher moves, inquiry questions, transitions)
11994
12196
  - ## [REQUIRED] Common Misconceptions & Diagnostic Remediation Matrix
11995
12197
  - ## [REQUIRED] Differentiated Support Strategies (Support scaffolds vs Extension challenges)
11996
- 3. Output 100% clean Markdown directly \u2014 NO code fences around the document.`;
12198
+ 3. Output 100% clean Markdown directly \u2014 NO code fences around the document.
12199
+
12200
+ ${languageDirective}
12201
+
12202
+ ${buildHeadingDirective("GUIDE", slcMarkdown, targetLang)}`;
11997
12203
  const rawGuide = await runCurriculumAIInference(
11998
12204
  [{ role: "user", content: guidePrompt }],
11999
12205
  satelliteContext,
@@ -12052,7 +12258,11 @@ template_contract: "artifact-template-v1"
12052
12258
  - ## [REQUIRED] Visual Mental Model / Architecture Diagram (Mermaid or ASCII diagram)
12053
12259
  - ## [REQUIRED] Step-by-Step Practical Quick-Start Guide
12054
12260
  - ## [REQUIRED] Self-Check Diagnostic Checklist (Can-do statements for student self-assessment)
12055
- 3. Output 100% clean Markdown directly \u2014 NO code fences around the document.`;
12261
+ 3. Output 100% clean Markdown directly \u2014 NO code fences around the document.
12262
+
12263
+ ${languageDirective}
12264
+
12265
+ ${buildHeadingDirective("HANDOUT", slcMarkdown, targetLang)}`;
12056
12266
  const rawHandout = await runCurriculumAIInference(
12057
12267
  [{ role: "user", content: handoutPrompt }],
12058
12268
  satelliteContext,
@@ -12115,7 +12325,11 @@ template_contract: "artifact-template-v1"
12115
12325
  - ## [REQUIRED] Part 3: Code Analysis & Bug Hunting Challenge
12116
12326
  - ## [REQUIRED] Part 4: Synthesis & Problem-Solving Application
12117
12327
  - ## [REQUIRED] Part 5: Self-Reflection & Learning Log
12118
- 3. Output 100% clean Markdown directly \u2014 NO code fences around the document.`;
12328
+ 3. Output 100% clean Markdown directly \u2014 NO code fences around the document.
12329
+
12330
+ ${languageDirective}
12331
+
12332
+ ${buildHeadingDirective("WKS", slcMarkdown, targetLang)}`;
12119
12333
  const rawWks = await runCurriculumAIInference(
12120
12334
  [{ role: "user", content: wksPrompt }],
12121
12335
  satelliteContext,
@@ -12182,7 +12396,11 @@ template_required_sections:
12182
12396
  - ## [REQUIRED] Verified Reference Solution Code (100% syntactically valid, production-ready, fully commented)
12183
12397
  - ## [REQUIRED] Automated Test / Verification Script (How to compile, flash, or unit test)
12184
12398
  - ## [REQUIRED] Common Syntax & Runtime Pitfalls Matrix
12185
- 3. Output 100% clean Markdown directly with runnable code snippets \u2014 NO outer code fences around the document.`;
12399
+ 3. Output 100% clean Markdown directly with runnable code snippets \u2014 NO outer code fences around the document.
12400
+
12401
+ ${languageDirective}
12402
+
12403
+ ${buildHeadingDirective("CODE", slcMarkdown, targetLang)}`;
12186
12404
  const rawCode = await runCurriculumAIInference(
12187
12405
  [{ role: "user", content: codePrompt }],
12188
12406
  satelliteContext,
@@ -12248,7 +12466,11 @@ template_contract: "artifact-template-v1"
12248
12466
  - ### Challenge 2: [Name] (Difficulty: \u2B50\u2B50\u2B50\u2B50) \u2014 Advanced Architectural Constraints & Edge Cases
12249
12467
  - ### Challenge 3: [Name] (Difficulty: \u2B50\u2B50\u2B50\u2B50\u2B50) \u2014 Extension Milestones (Level 1: Ninja \u2192 Level 2: Guru \u2192 Level 3: Master)
12250
12468
  - ## [REQUIRED] Metacognitive Deep Dive & Engineering Trade-offs
12251
- 3. Output 100% clean Markdown directly \u2014 NO code fences around the document.`;
12469
+ 3. Output 100% clean Markdown directly \u2014 NO code fences around the document.
12470
+
12471
+ ${languageDirective}
12472
+
12473
+ ${buildHeadingDirective("EXT", slcMarkdown, targetLang)}`;
12252
12474
  const rawExt = await runCurriculumAIInference(
12253
12475
  [{ role: "user", content: extPrompt }],
12254
12476
  satelliteContext,
@@ -16692,6 +16914,6 @@ function renderMediaPlaceholder(entry) {
16692
16914
  return `> \u{1F5BC}\uFE0F [\u1EA2nh \u0111ang ch\u1EDD: ${entry.name} \u2014 s\u1EBD \u0111\u01B0\u1EE3c t\u1EA1o sau khi duy\u1EC7t media]`;
16693
16915
  }
16694
16916
 
16695
- export { ACT_TEMPLATE, 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_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_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, buildExtensionPrompt, buildHandoutPrompt, buildImagePrompt, buildJudgePrompt, buildLessonMasterPrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSessionSliceContext, buildSlidesPrompt, buildStandardStackMarkdown, buildStandardsContext, buildStandardsContextBlock, buildTeacherGuidePrompt, buildWorksheetPrompt, closeTruncatedJson, computeContentHash, computePackingSpec, conductPreliminaryResearch, contentTools, convertRoadmapToFoundationSot, createAiInferenceError, createCurriculumStorage, createIdleAbortController, createStreamAbortController, createStreamAbortSignal, createStreamChunkExtractor, curateMediaLedger, designerTools, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, evaluateStandardsCoverage, executeCurriculumCommand, exportAllProjectQuizzes, expositionCacheKey, extractScopeSequenceRows, 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, packagerTools, parseGateSettings, parseQuizMarkdown, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, publishToGitHub, publishToSupabase, rankGenCandidates, renderFrameworkFromPlan, renderMediaPlaceholder, researcherTools, resolveGateSettings, resolveStandardsPacks, resolveStreamBudget, resolveTranslationTargets, reviewerTools, runCurriculumAIInference, safeParseJson, searchEducationalImages, searchEducationalVideos, selectStatementsForLesson, serializeActivityToMarkdown, serializeCodeLabToMarkdown, serializeDiagnosticQuizToMarkdown, serializeHandoutToMarkdown, serializeLessonToMarkdown, serializeProjectInstructionToMarkdown, serializeSelfLabToMarkdown, slugifyProjectName, streamCurriculumAIInference, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLLMWithFallback, streamLayerPrefillWithFallback, streamLessonMasterFlow, streamSelfLabFlow, stripLlmJsonWrappers, techSmeTools, topoSort, uploadAssetToBucket, validateCurriculumPlan, validateFrameworkPack, validateMarkdownTables, validateMermaidSyntax, withAutoRepair };
16917
+ export { ACT_TEMPLATE, 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_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_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, buildExtensionPrompt, buildHandoutPrompt, buildHeadingDirective, buildImagePrompt, buildJudgePrompt, buildLanguageDirective, buildLessonMasterPrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSessionSliceContext, buildSlidesPrompt, buildStandardStackMarkdown, buildStandardsContext, buildStandardsContextBlock, buildTeacherGuidePrompt, buildWorksheetPrompt, closeTruncatedJson, computeContentHash, computePackingSpec, conductPreliminaryResearch, contentTools, convertRoadmapToFoundationSot, createAiInferenceError, 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, 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, validateCurriculumPlan, validateFrameworkPack, validateMarkdownTables, validateMermaidSyntax, withAutoRepair };
16696
16918
  //# sourceMappingURL=index.mjs.map
16697
16919
  //# sourceMappingURL=index.mjs.map