@thanh01.pmt/curriculum-kit 1.1.0 → 1.2.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
@@ -2,7 +2,7 @@ import { PlanConstraints, TranslationPolicy, CurriculumPlan, PlanningGraph, Plan
2
2
  export { ActiveLearningWorkflow, ActiveLearningWorkflowSchema, ActivityLabSchema, ActivitySeqRow, ActivitySeqRowSchema, ActivityStepSchema, ArtifactContractRowSchema, AssessmentMapRowSchema, AssessmentObjective, AssessmentObjectiveSchema, BellRinger, BellRingerDay, BellRingerDaySchema, BellRingerInput, BellRingerSchema, BloomLevel, BloomLevelSchema, BronzeTier, BronzeTierSchema, CERConclusion, CERConclusionSchema, CardTierEnum, ChoiceBoard, ChoiceBoardInput, ChoiceBoardRubricRowSchema, ChoiceBoardSchema, ChoiceRuleSchema, ChoiceSquare, ChoiceSquareSchema, CodeLabSchema, CodeSnippet, CodeSnippetSchema, CompetencyRubricRow, CompetencyRubricRowSchema, ComputationalThinking, ComputationalThinkingSchema, CoreConcept, CoreConceptSchema, CourseObjective, CourseObjectiveSchema, CoverageReport, CoverageReportSchema, CurriculumArtifact, CurriculumArtifactSchema, CurriculumPlanSchema, CurriculumQualityReport, CurriculumQualityReportSchema, DependencyEdgeSchema, DepthAssignment, DepthAssignmentSchema, DepthLevel, DepthLevelSchema, DiagnosticQuestion, DiagnosticQuestionInput, DiagnosticQuestionSchema, DiagnosticQuizSchema, EDPPhaseEnum, EntryLevelSchema, ExitTicket, ExitTicketBugHunt, ExitTicketBugHuntSchema, ExitTicketMetacognitionSchema, ExitTicketQuickItemSchema, ExitTicketRecallPromptSchema, ExitTicketSchema, ExperimentalDesignSchema, Extension, ExtensionChallengeSchema, ExtensionSchema, FiveEFlowPhaseSchema, FiveEPhaseEnum, Glossary, GlossaryInput, GlossaryQuickRefRowSchema, GlossarySchema, GlossaryTerm, GlossaryTermSchema, GoldTier, GoldTierSchema, GraphicOrganizer, GraphicOrganizerInput, GraphicOrganizerItem, GraphicOrganizerItemSchema, GraphicOrganizerSchema, Handout, HandoutSchema, HandoutSection, HandoutSectionSchema, InstructionSection, InstructionSectionSchema, InstructionStep, InstructionStepSchema, JudgeCriterionSchema, LabTierTask, LabTierTaskSchema, LearningObjectiveInput, LearningObjectiveInputSchema, LearningObjectiveRow, LearningObjectiveRowSchema, LessonFlowPhase, LessonFlowPhaseSchema, LessonPlan5E, LessonPlan5ESchema, LessonPlanEDP, LessonPlanEDPSchema, LessonPlanSchema, LessonSectionSchema, MarpSlide, MarpSlideSchema, MentorCheatsheetSchema, MilestoneInput, MilestoneInputSchema, Misconception, MisconceptionSchema, NodeKindSchema, OrganizerTypeEnum, PhaseInput, PhaseInputSchema, PlanConstraintsSchema, PlannerInput, PlannerInputSchema, PlanningGraphSchema, PlanningNodeSchema, PlanningPhase, PrerequisiteDecision, PrerequisiteDecisionEntry, PrerequisiteDecisionEntrySchema, PrerequisiteDecisionSchema, ProductGoalSchema, ProgressiveHints, ProgressiveHintsSchema, ProjectGraph, ProjectGraphSchema, ProjectInstruction, ProjectInstructionSchema, ProjectProfile, ProjectProfileSchema, ProjectRoadmap, QualityAuditVerdictSchema, QuizOption, QuizOptionSchema, ResourceMapRowSchema, ReviewGame, ReviewGameExportRowSchema, ReviewGameInput, ReviewGameQuestion, ReviewGameQuestionSchema, ReviewGameSchema, RoadmapInput, RoadmapInputSchema, RotationStation, RotationStationSchema, Rubric, RubricCriteria, RubricCriteriaSchema, RubricSchema, ScaffoldDecision, ScaffoldDecisionEntry, ScaffoldDecisionEntrySchema, ScaffoldDecisionSchema, ScienceLab, ScienceLabInput, ScienceLabSchema, ScoringRubricRowSchema, SelfLab, SelfLabSchema, SelfPacedBundle, SelfPacedBundleSchema, SelfPacedChallenge, SelfPacedChallengeSchema, SessionPlan, SessionPlanSchema, SilverTier, SilverTierSchema, SlideDeckSchema, StandardizedTermRowSchema, StationRecordRowSchema, StationRotation, StationRotationInput, StationRotationSchema, StationTypeEnum, TaskCard, TaskCardSchema, TaskCards, TaskCardsInput, TaskCardsSchema, TeacherGuide, TeacherGuideSchema, TeachingScriptPhase, TeachingScriptPhaseSchema, TierLevelEnum, TierObjectiveSchema, TieredPractice, TieredPracticeSchema, TranslationPolicySchema, TroubleshootingEntry, TroubleshootingEntrySchema, TroubleshootingRow, TroubleshootingRowSchema, UnitPlan, UnitPlanSchema, UserJourneySchema, Worksheet, WorksheetItem, WorksheetItemSchema, WorksheetItemTypeEnum, WorksheetPart, WorksheetPartSchema, WorksheetSchema, validateCurriculumPlan } from './schemas/index.cjs';
3
3
  import { A as AIProviderName, M as ModelResolutionOptions } from './provider-factory-DxzOVEmh.cjs';
4
4
  export { N as NVIDIA_MODELS, g as getAIModel } from './provider-factory-DxzOVEmh.cjs';
5
- export { ActivityPromptInput, AggregatedToolCall, AsyncLLMJudgeInput, AuditCurriculumQualityInput, CodeLabPromptInput, DEFAULT_ENABLED_PROVIDERS, DiagnosticQuizPromptInput, ExtensionPromptInput, GenerateActivityInput, GenerateCodeLabInput, GenerateDiagnosticQuizInput, GenerateExtensionInput, GenerateHandoutInput, GenerateLessonMasterInput, GenerateProjectInstructionInput, GenerateSelfLabInput, GenerateSlidesInput, GenerateTeacherGuideInput, GenerateWorksheetInput, HandoutPromptInput, JudgeEvaluationResult, JudgePromptInput, LLMJudgeEngine, LessonPromptInput, ModelPolicyResolution, ModelPolicyResolver, ModelProviderKey, MultiProviderPolicyResolution, ProjectInstructionPromptInput, SelfLabPromptInput, SlidesPromptInput, StreamDiagnosticQuizInput, StreamLessonMasterInput, StreamSelfLabInput, TeacherGuidePromptInput, ToolDefinition, ToolExecutionResult, ToolExecutor, ToolLoopConfig, WorksheetPromptInput, activityTools, analystTools, assessorTools, auditCurriculumQualityFlow, buildActivityPrompt, buildCodeLabPrompt, buildDiagnosticQuizPrompt, buildExtensionPrompt, buildHandoutPrompt, buildJudgePrompt, buildLessonMasterPrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSlidesPrompt, buildTeacherGuidePrompt, buildWorksheetPrompt, contentTools, designerTools, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateProjectInstructionFlow, generateSelfLabFlow, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, illustratorTools, packagerTools, researcherTools, reviewerTools, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools } from './ai/index.cjs';
5
+ export { ActivityPromptInput, AggregatedToolCall, AsyncLLMJudgeInput, AuditCurriculumQualityInput, CodeLabPromptInput, DEFAULT_ENABLED_PROVIDERS, DiagnosticQuizPromptInput, ExtensionPromptInput, GenerateActivityInput, GenerateCodeLabInput, GenerateDiagnosticQuizInput, GenerateExtensionInput, GenerateHandoutInput, GenerateLessonMasterInput, GenerateProjectInstructionInput, GenerateSelfLabInput, GenerateSlidesInput, GenerateTeacherGuideInput, GenerateWorksheetInput, HandoutPromptInput, JudgeEvaluationResult, JudgePromptInput, LLMJudgeEngine, LessonPromptInput, MarpMarkdownSlidePromptInput, ModelPolicyResolution, ModelPolicyResolver, ModelProviderKey, MultiProviderPolicyResolution, ProjectInstructionPromptInput, SLIDE_CANONICAL_METHODOLOGY, SelfLabPromptInput, SlidesPromptInput, StreamDiagnosticQuizInput, StreamLessonMasterInput, StreamSelfLabInput, TeacherGuidePromptInput, ToolDefinition, ToolExecutionResult, ToolExecutor, ToolLoopConfig, WorksheetPromptInput, activityTools, analystTools, assessorTools, auditCurriculumQualityFlow, buildActivityPrompt, buildCodeLabPrompt, buildDiagnosticQuizPrompt, buildExtensionPrompt, buildHandoutPrompt, buildJudgePrompt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSlidesPrompt, buildTeacherGuidePrompt, buildWorksheetPrompt, contentTools, designerTools, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateProjectInstructionFlow, generateSelfLabFlow, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, illustratorTools, packagerTools, researcherTools, reviewerTools, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools } from './ai/index.cjs';
6
6
  export { C as ChatMessage, c as ChunkType, D as DEFAULT_ARTIFACT_STREAM_IDLE_MS, d as DEFAULT_ARTIFACT_STREAM_TOTAL_MS, F as FallbackTarget, I as IdleAbort, f as StreamAbortController, S as StreamRunnerOptions, j as createIdleAbortController, h as createStreamAbortController, e as extractThoughtAndContent, g as getDesignatedFallbackChain, b as getDesignatedFallbackConfig, a as isModelAllowed, i as isProviderEnabled, r as runCurriculumAIInference, s as streamCurriculumAIInference } from './streamRunner-DtQq0HV_.cjs';
7
7
  export { ArtifactLintReport, ConvertedSotBundle, GenerateProjectInstructionOptions, GenerateRoadmapCurriculumOptions, GenerateSelfPacedBundleInput, LintIssue, ProjectInstructionResult, RoadmapCurriculumOutput, SelfPacedBundleOutput, convertRoadmapToFoundationSot, generateProjectInstruction, generateRoadmapCurriculum, generateSelfPacedBundle, importRoadmapToProject, lintAndSanitizeArtifact, serializeActivityToMarkdown, serializeCodeLabToMarkdown, serializeDiagnosticQuizToMarkdown, serializeHandoutToMarkdown, serializeLessonToMarkdown, serializeProjectInstructionToMarkdown, serializeSelfLabToMarkdown, validateMarkdownTables, validateMermaidSyntax } from './pipeline/index.cjs';
8
8
  export { A as AutoRepairOptions, a as AutoRepairResult, B as BundleTier, G as GenerateMilestoneBundleOptions, M as MilestoneCurriculumBundle, g as generateMilestoneCurriculumBundle, w as withAutoRepair } from './milestoneBundleGenerator-CzSOeAzU.cjs';
@@ -11,8 +11,8 @@ export { b as ArtifactLifecycleInfo, A as ArtifactLifecycleState, L as LessonArt
11
11
  export { FileSystemCurriculumAdapter, FileSystemStorageOptions, STANDARD_SOT_FILES, StorageFactoryOptions, SupabaseCurriculumAdapter, SupabaseStorageConfig, computeContentHash, createCurriculumStorage } from './storage/index.cjs';
12
12
  import { F as FrameworkPack } from './standardsCoverageGate-CsUNzv6C.cjs';
13
13
  export { B as BloomHintSchema, a as ClassificationSchema, m as CoverageGateInput, C as CoverageGateReport, h as FrameworkMapping, d as FrameworkMappingSchema, f as FrameworkPackManifest, b as FrameworkPackManifestSchema, e as FrameworkPackSchema, g as FrameworkStatement, c as FrameworkStatementSchema, G as GradeBandSchema, i as MappingKind, M as MappingKindSchema, P as PackLintIssue, k as PackValidationResult, j as RecordProvenance, R as RecordProvenanceSchema, S as StatementCoverageRow, n as evaluateStandardsCoverage, l as lintFrameworkPack, v as validateFrameworkPack } from './standardsCoverageGate-CsUNzv6C.cjs';
14
- import { R as ResolvedGateSettings } from './gateSettings-DKXRztJy.cjs';
15
- export { A as ArtifactType, b as CurriculumArtifactType, C as CurriculumGateMode, D as DEFAULT_GATE_SETTINGS, G as GateSettings, c as ScaffoldingLevel, S as SingleArtifactRequest, a as SingleArtifactResult, g as gateModeFor, e as generateSingleArtifact, d as getArtifactMetadata, p as parseGateSettings, r as resolveGateSettings } from './gateSettings-DKXRztJy.cjs';
14
+ import { R as ResolvedGateSettings } from './gateSettings-Buk_MSML.cjs';
15
+ export { A as ArtifactType, b as CurriculumArtifactType, C as CurriculumGateMode, D as DEFAULT_GATE_SETTINGS, G as GateSettings, c as ScaffoldingLevel, S as SingleArtifactRequest, a as SingleArtifactResult, g as gateModeFor, e as generateSingleArtifact, d as getArtifactMetadata, p as parseGateSettings, r as resolveGateSettings } from './gateSettings-Buk_MSML.cjs';
16
16
  export { DeliveryPackResult, JobManifest, LocalWorkspaceManager, ParsedQuizQuestion, buildDeliveryPackages, exportAllProjectQuizzes, formatQuizzesToCsv, parseQuizMarkdown } from './publishers/index.cjs';
17
17
  export { G as GitPublishOptions, a as GitPublishResult, S as SupabasePublishOptions, b as SupabasePublishResult, p as publishToGitHub, c as publishToSupabase, u as uploadAssetToBucket } from './supabasePublisher-C627qXFT.cjs';
18
18
  export { BUNDLED_STANDARDS_PACK_IDS, HydratedPack, ImportPackResult, SelectedStatement, StandardStackOptions, StandardsRegistryAdapter, StandardsRegistryConfig, StandardsSelectionInput, buildStandardStackMarkdown, buildStandardsContext, buildStandardsContextBlock, resolveStandardsPacks, selectStatementsForLesson } from './standards/index.cjs';
@@ -627,11 +627,53 @@ declare function buildLanguageDirective(targetLanguage?: string | null): string;
627
627
  * Parses markdown table or lines from SECTION_LANGUAGE_CONTRACT.md to extract
628
628
  * mapping for a specific artifact type.
629
629
  */
630
- declare function extractSectionHeadingsFromSLC(slcMarkdown: string | undefined | null, artifactType: string): Record<string, string>;
630
+ declare function extractSectionHeadingsFromSLC(slcInput: Record<string, Record<string, string>> | string | undefined | null, artifactType: string): Record<string, string>;
631
631
  /**
632
632
  * Builds the heading directive block to instruct LLM on verbatim section headings.
633
633
  */
634
- declare function buildHeadingDirective(artifactType: string, slcMarkdown?: string | null, targetLanguage?: string): string;
634
+ declare function buildHeadingDirective(artifactType: string, slcMarkdown?: Record<string, Record<string, string>> | string | null, targetLanguage?: string): string;
635
+
636
+ interface ExcerptOptions {
637
+ /**
638
+ * Canonical (English) section keys to prioritize, in order.
639
+ * Each key's body is included before moving to the next priority.
640
+ */
641
+ priorities?: string[];
642
+ /** Character budget for the excerpt (default 12_000, ~3k tokens). */
643
+ budget?: number;
644
+ /**
645
+ * Section Language Contract mapping (Record or raw contract markdown).
646
+ * Used to resolve localized headings (e.g. Vietnamese) to canonical keys.
647
+ */
648
+ sectionLanguageContract?: Record<string, Record<string, string>> | string;
649
+ /** File name or artifact type hint (e.g. 'LESSON', 'KNOWLEDGE_EXPOSITION'). */
650
+ artifactType?: string;
651
+ /** Min chars below which the excerpt is flagged as insufficient (default 400). */
652
+ minContentChars?: number;
653
+ }
654
+ interface ExcerptResult {
655
+ /** Excerpt markdown safe to inject into prompt context blocks. */
656
+ excerpt: string;
657
+ /** True when the source parsed cleanly, passed sufficiency checks, and resolved priorities. */
658
+ verified: boolean;
659
+ /** True when canonical section resolution matched at least one priority section. */
660
+ sectionAware: boolean;
661
+ /** Canonical section keys included in the excerpt, in order. */
662
+ includedSections: string[];
663
+ /** Warning or error flags explaining why verified === false. */
664
+ issues: string[];
665
+ /** Approximate token count (chars / 4). */
666
+ tokenEstimate: number;
667
+ }
668
+ declare const DEFAULT_LESSON_PRIORITIES: string[];
669
+ declare const DEFAULT_KX_PRIORITIES: string[];
670
+ declare function buildSectionAwareExcerpt(markdown: string, opts?: ExcerptOptions): ExcerptResult;
671
+ declare function buildExpositionExcerpt(markdown: string, opts?: Omit<ExcerptOptions, 'priorities'>): ExcerptResult;
672
+ declare function buildLessonExcerpt(markdown: string, opts?: Omit<ExcerptOptions, 'priorities'>): ExcerptResult;
673
+ /**
674
+ * Normalizes SLC input into a two-level map: Record<ArtifactType, Record<CanonicalKey, LocalizedLabel>>
675
+ */
676
+ declare function normalizeSlcContract(slc: Record<string, Record<string, string>> | string | undefined): Record<string, Record<string, string>> | undefined;
635
677
 
636
678
  /**
637
679
  * Curriculum OS - Standardized Error Taxonomy & Traceability System
@@ -639,7 +681,7 @@ declare function buildHeadingDirective(artifactType: string, slcMarkdown?: strin
639
681
  * Provides typed, structured, and traceable error codes for all pipeline failures,
640
682
  * API exceptions, safeguard blocks, and contract violations.
641
683
  */
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';
684
+ 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' | 'ERR_CONTEXT_MISSING';
643
685
  interface CurriculumErrorDetail {
644
686
  errorCode: CurriculumErrorCode;
645
687
  agent?: string;
@@ -676,6 +718,35 @@ declare function createAiInferenceError(params: {
676
718
  suggestedAction?: string;
677
719
  retryable?: boolean;
678
720
  }): CurriculumError;
721
+ declare function createContextMissingError(params: {
722
+ artifactType: string;
723
+ missingSource: string;
724
+ lessonId?: string;
725
+ agent?: string;
726
+ }): CurriculumError;
727
+
728
+ type ContextSourceKey = 'KNOWLEDGE_EXPOSITION' | 'CANONICAL_LESSON' | 'SESSION_SLICE' | 'FRAMEWORK_EXCERPT' | 'STYLE_GUIDE' | 'REFERENCE_PACK' | 'LESSON_OBJECTIVES';
729
+ interface ArtifactDependencyRule {
730
+ required: ContextSourceKey[];
731
+ optional?: ContextSourceKey[];
732
+ rationale: string;
733
+ }
734
+ declare const ARTIFACT_DEPENDENCY_ROUTING: Record<string, ArtifactDependencyRule>;
735
+ interface ValidationOptions {
736
+ lessonId?: string;
737
+ agent?: string;
738
+ failClosed?: boolean;
739
+ }
740
+ interface DependencyValidationResult {
741
+ valid: boolean;
742
+ missing: ContextSourceKey[];
743
+ error?: CurriculumError;
744
+ }
745
+ /**
746
+ * Validates that all required context sources are present and non-empty for an artifact.
747
+ * When failClosed is true (default), throws CurriculumError(ERR_CONTEXT_MISSING) on first missing source.
748
+ */
749
+ declare function validateArtifactDependencies(artifactType: string, availableSources: Partial<Record<ContextSourceKey, any>>, opts?: ValidationOptions): DependencyValidationResult;
679
750
 
680
751
  /**
681
752
  * Academic Quality & Pedagogical Verification Types
@@ -975,4 +1046,4 @@ declare function getSlideLayoutPresetById(id: string): SlideLayoutPreset | undef
975
1046
  */
976
1047
  declare function getSlideLayoutPresetsByCategory(category: SlideLayoutCategory): SlideLayoutPreset[];
977
1048
 
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 };
1049
+ export { ACT_TEMPLATE, AIProviderName, ARTIFACT_DEPENDENCY_ROUTING, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, ActivityLab, type ArtifactDependencyRule, 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, type ContextSourceKey, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DependencyEdge, type DependencyValidationResult, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, type ExcerptOptions, type ExcerptResult, 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, type ValidationOptions, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildExpositionContext, buildExpositionExcerpt, buildHeadingDirective, buildLanguageDirective, buildLessonExcerpt, buildSectionAwareExcerpt, buildSessionSliceContext, closeTruncatedJson, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createContextMissingError, 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, normalizeSlcContract, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderFrameworkFromPlan, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, stripLlmJsonWrappers, targetLanguageDisplayName, topoSort, validateArtifactDependencies };
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import { PlanConstraints, TranslationPolicy, CurriculumPlan, PlanningGraph, Plan
2
2
  export { ActiveLearningWorkflow, ActiveLearningWorkflowSchema, ActivityLabSchema, ActivitySeqRow, ActivitySeqRowSchema, ActivityStepSchema, ArtifactContractRowSchema, AssessmentMapRowSchema, AssessmentObjective, AssessmentObjectiveSchema, BellRinger, BellRingerDay, BellRingerDaySchema, BellRingerInput, BellRingerSchema, BloomLevel, BloomLevelSchema, BronzeTier, BronzeTierSchema, CERConclusion, CERConclusionSchema, CardTierEnum, ChoiceBoard, ChoiceBoardInput, ChoiceBoardRubricRowSchema, ChoiceBoardSchema, ChoiceRuleSchema, ChoiceSquare, ChoiceSquareSchema, CodeLabSchema, CodeSnippet, CodeSnippetSchema, CompetencyRubricRow, CompetencyRubricRowSchema, ComputationalThinking, ComputationalThinkingSchema, CoreConcept, CoreConceptSchema, CourseObjective, CourseObjectiveSchema, CoverageReport, CoverageReportSchema, CurriculumArtifact, CurriculumArtifactSchema, CurriculumPlanSchema, CurriculumQualityReport, CurriculumQualityReportSchema, DependencyEdgeSchema, DepthAssignment, DepthAssignmentSchema, DepthLevel, DepthLevelSchema, DiagnosticQuestion, DiagnosticQuestionInput, DiagnosticQuestionSchema, DiagnosticQuizSchema, EDPPhaseEnum, EntryLevelSchema, ExitTicket, ExitTicketBugHunt, ExitTicketBugHuntSchema, ExitTicketMetacognitionSchema, ExitTicketQuickItemSchema, ExitTicketRecallPromptSchema, ExitTicketSchema, ExperimentalDesignSchema, Extension, ExtensionChallengeSchema, ExtensionSchema, FiveEFlowPhaseSchema, FiveEPhaseEnum, Glossary, GlossaryInput, GlossaryQuickRefRowSchema, GlossarySchema, GlossaryTerm, GlossaryTermSchema, GoldTier, GoldTierSchema, GraphicOrganizer, GraphicOrganizerInput, GraphicOrganizerItem, GraphicOrganizerItemSchema, GraphicOrganizerSchema, Handout, HandoutSchema, HandoutSection, HandoutSectionSchema, InstructionSection, InstructionSectionSchema, InstructionStep, InstructionStepSchema, JudgeCriterionSchema, LabTierTask, LabTierTaskSchema, LearningObjectiveInput, LearningObjectiveInputSchema, LearningObjectiveRow, LearningObjectiveRowSchema, LessonFlowPhase, LessonFlowPhaseSchema, LessonPlan5E, LessonPlan5ESchema, LessonPlanEDP, LessonPlanEDPSchema, LessonPlanSchema, LessonSectionSchema, MarpSlide, MarpSlideSchema, MentorCheatsheetSchema, MilestoneInput, MilestoneInputSchema, Misconception, MisconceptionSchema, NodeKindSchema, OrganizerTypeEnum, PhaseInput, PhaseInputSchema, PlanConstraintsSchema, PlannerInput, PlannerInputSchema, PlanningGraphSchema, PlanningNodeSchema, PlanningPhase, PrerequisiteDecision, PrerequisiteDecisionEntry, PrerequisiteDecisionEntrySchema, PrerequisiteDecisionSchema, ProductGoalSchema, ProgressiveHints, ProgressiveHintsSchema, ProjectGraph, ProjectGraphSchema, ProjectInstruction, ProjectInstructionSchema, ProjectProfile, ProjectProfileSchema, ProjectRoadmap, QualityAuditVerdictSchema, QuizOption, QuizOptionSchema, ResourceMapRowSchema, ReviewGame, ReviewGameExportRowSchema, ReviewGameInput, ReviewGameQuestion, ReviewGameQuestionSchema, ReviewGameSchema, RoadmapInput, RoadmapInputSchema, RotationStation, RotationStationSchema, Rubric, RubricCriteria, RubricCriteriaSchema, RubricSchema, ScaffoldDecision, ScaffoldDecisionEntry, ScaffoldDecisionEntrySchema, ScaffoldDecisionSchema, ScienceLab, ScienceLabInput, ScienceLabSchema, ScoringRubricRowSchema, SelfLab, SelfLabSchema, SelfPacedBundle, SelfPacedBundleSchema, SelfPacedChallenge, SelfPacedChallengeSchema, SessionPlan, SessionPlanSchema, SilverTier, SilverTierSchema, SlideDeckSchema, StandardizedTermRowSchema, StationRecordRowSchema, StationRotation, StationRotationInput, StationRotationSchema, StationTypeEnum, TaskCard, TaskCardSchema, TaskCards, TaskCardsInput, TaskCardsSchema, TeacherGuide, TeacherGuideSchema, TeachingScriptPhase, TeachingScriptPhaseSchema, TierLevelEnum, TierObjectiveSchema, TieredPractice, TieredPracticeSchema, TranslationPolicySchema, TroubleshootingEntry, TroubleshootingEntrySchema, TroubleshootingRow, TroubleshootingRowSchema, UnitPlan, UnitPlanSchema, UserJourneySchema, Worksheet, WorksheetItem, WorksheetItemSchema, WorksheetItemTypeEnum, WorksheetPart, WorksheetPartSchema, WorksheetSchema, validateCurriculumPlan } from './schemas/index.js';
3
3
  import { A as AIProviderName, M as ModelResolutionOptions } from './provider-factory-DxzOVEmh.js';
4
4
  export { N as NVIDIA_MODELS, g as getAIModel } from './provider-factory-DxzOVEmh.js';
5
- export { ActivityPromptInput, AggregatedToolCall, AsyncLLMJudgeInput, AuditCurriculumQualityInput, CodeLabPromptInput, DEFAULT_ENABLED_PROVIDERS, DiagnosticQuizPromptInput, ExtensionPromptInput, GenerateActivityInput, GenerateCodeLabInput, GenerateDiagnosticQuizInput, GenerateExtensionInput, GenerateHandoutInput, GenerateLessonMasterInput, GenerateProjectInstructionInput, GenerateSelfLabInput, GenerateSlidesInput, GenerateTeacherGuideInput, GenerateWorksheetInput, HandoutPromptInput, JudgeEvaluationResult, JudgePromptInput, LLMJudgeEngine, LessonPromptInput, ModelPolicyResolution, ModelPolicyResolver, ModelProviderKey, MultiProviderPolicyResolution, ProjectInstructionPromptInput, SelfLabPromptInput, SlidesPromptInput, StreamDiagnosticQuizInput, StreamLessonMasterInput, StreamSelfLabInput, TeacherGuidePromptInput, ToolDefinition, ToolExecutionResult, ToolExecutor, ToolLoopConfig, WorksheetPromptInput, activityTools, analystTools, assessorTools, auditCurriculumQualityFlow, buildActivityPrompt, buildCodeLabPrompt, buildDiagnosticQuizPrompt, buildExtensionPrompt, buildHandoutPrompt, buildJudgePrompt, buildLessonMasterPrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSlidesPrompt, buildTeacherGuidePrompt, buildWorksheetPrompt, contentTools, designerTools, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateProjectInstructionFlow, generateSelfLabFlow, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, illustratorTools, packagerTools, researcherTools, reviewerTools, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools } from './ai/index.js';
5
+ export { ActivityPromptInput, AggregatedToolCall, AsyncLLMJudgeInput, AuditCurriculumQualityInput, CodeLabPromptInput, DEFAULT_ENABLED_PROVIDERS, DiagnosticQuizPromptInput, ExtensionPromptInput, GenerateActivityInput, GenerateCodeLabInput, GenerateDiagnosticQuizInput, GenerateExtensionInput, GenerateHandoutInput, GenerateLessonMasterInput, GenerateProjectInstructionInput, GenerateSelfLabInput, GenerateSlidesInput, GenerateTeacherGuideInput, GenerateWorksheetInput, HandoutPromptInput, JudgeEvaluationResult, JudgePromptInput, LLMJudgeEngine, LessonPromptInput, MarpMarkdownSlidePromptInput, ModelPolicyResolution, ModelPolicyResolver, ModelProviderKey, MultiProviderPolicyResolution, ProjectInstructionPromptInput, SLIDE_CANONICAL_METHODOLOGY, SelfLabPromptInput, SlidesPromptInput, StreamDiagnosticQuizInput, StreamLessonMasterInput, StreamSelfLabInput, TeacherGuidePromptInput, ToolDefinition, ToolExecutionResult, ToolExecutor, ToolLoopConfig, WorksheetPromptInput, activityTools, analystTools, assessorTools, auditCurriculumQualityFlow, buildActivityPrompt, buildCodeLabPrompt, buildDiagnosticQuizPrompt, buildExtensionPrompt, buildHandoutPrompt, buildJudgePrompt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSlidesPrompt, buildTeacherGuidePrompt, buildWorksheetPrompt, contentTools, designerTools, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateProjectInstructionFlow, generateSelfLabFlow, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, illustratorTools, packagerTools, researcherTools, reviewerTools, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools } from './ai/index.js';
6
6
  export { C as ChatMessage, c as ChunkType, D as DEFAULT_ARTIFACT_STREAM_IDLE_MS, d as DEFAULT_ARTIFACT_STREAM_TOTAL_MS, F as FallbackTarget, I as IdleAbort, f as StreamAbortController, S as StreamRunnerOptions, j as createIdleAbortController, h as createStreamAbortController, e as extractThoughtAndContent, g as getDesignatedFallbackChain, b as getDesignatedFallbackConfig, a as isModelAllowed, i as isProviderEnabled, r as runCurriculumAIInference, s as streamCurriculumAIInference } from './streamRunner-DtQq0HV_.js';
7
7
  export { ArtifactLintReport, ConvertedSotBundle, GenerateProjectInstructionOptions, GenerateRoadmapCurriculumOptions, GenerateSelfPacedBundleInput, LintIssue, ProjectInstructionResult, RoadmapCurriculumOutput, SelfPacedBundleOutput, convertRoadmapToFoundationSot, generateProjectInstruction, generateRoadmapCurriculum, generateSelfPacedBundle, importRoadmapToProject, lintAndSanitizeArtifact, serializeActivityToMarkdown, serializeCodeLabToMarkdown, serializeDiagnosticQuizToMarkdown, serializeHandoutToMarkdown, serializeLessonToMarkdown, serializeProjectInstructionToMarkdown, serializeSelfLabToMarkdown, validateMarkdownTables, validateMermaidSyntax } from './pipeline/index.js';
8
8
  export { A as AutoRepairOptions, a as AutoRepairResult, B as BundleTier, G as GenerateMilestoneBundleOptions, M as MilestoneCurriculumBundle, g as generateMilestoneCurriculumBundle, w as withAutoRepair } from './milestoneBundleGenerator-Bkba8OPG.js';
@@ -11,8 +11,8 @@ export { b as ArtifactLifecycleInfo, A as ArtifactLifecycleState, L as LessonArt
11
11
  export { FileSystemCurriculumAdapter, FileSystemStorageOptions, STANDARD_SOT_FILES, StorageFactoryOptions, SupabaseCurriculumAdapter, SupabaseStorageConfig, computeContentHash, createCurriculumStorage } from './storage/index.js';
12
12
  import { F as FrameworkPack } from './standardsCoverageGate-CsUNzv6C.js';
13
13
  export { B as BloomHintSchema, a as ClassificationSchema, m as CoverageGateInput, C as CoverageGateReport, h as FrameworkMapping, d as FrameworkMappingSchema, f as FrameworkPackManifest, b as FrameworkPackManifestSchema, e as FrameworkPackSchema, g as FrameworkStatement, c as FrameworkStatementSchema, G as GradeBandSchema, i as MappingKind, M as MappingKindSchema, P as PackLintIssue, k as PackValidationResult, j as RecordProvenance, R as RecordProvenanceSchema, S as StatementCoverageRow, n as evaluateStandardsCoverage, l as lintFrameworkPack, v as validateFrameworkPack } from './standardsCoverageGate-CsUNzv6C.js';
14
- import { R as ResolvedGateSettings } from './gateSettings-DKXRztJy.js';
15
- export { A as ArtifactType, b as CurriculumArtifactType, C as CurriculumGateMode, D as DEFAULT_GATE_SETTINGS, G as GateSettings, c as ScaffoldingLevel, S as SingleArtifactRequest, a as SingleArtifactResult, g as gateModeFor, e as generateSingleArtifact, d as getArtifactMetadata, p as parseGateSettings, r as resolveGateSettings } from './gateSettings-DKXRztJy.js';
14
+ import { R as ResolvedGateSettings } from './gateSettings-Buk_MSML.js';
15
+ export { A as ArtifactType, b as CurriculumArtifactType, C as CurriculumGateMode, D as DEFAULT_GATE_SETTINGS, G as GateSettings, c as ScaffoldingLevel, S as SingleArtifactRequest, a as SingleArtifactResult, g as gateModeFor, e as generateSingleArtifact, d as getArtifactMetadata, p as parseGateSettings, r as resolveGateSettings } from './gateSettings-Buk_MSML.js';
16
16
  export { DeliveryPackResult, JobManifest, LocalWorkspaceManager, ParsedQuizQuestion, buildDeliveryPackages, exportAllProjectQuizzes, formatQuizzesToCsv, parseQuizMarkdown } from './publishers/index.js';
17
17
  export { G as GitPublishOptions, a as GitPublishResult, S as SupabasePublishOptions, b as SupabasePublishResult, p as publishToGitHub, c as publishToSupabase, u as uploadAssetToBucket } from './supabasePublisher-C627qXFT.js';
18
18
  export { BUNDLED_STANDARDS_PACK_IDS, HydratedPack, ImportPackResult, SelectedStatement, StandardStackOptions, StandardsRegistryAdapter, StandardsRegistryConfig, StandardsSelectionInput, buildStandardStackMarkdown, buildStandardsContext, buildStandardsContextBlock, resolveStandardsPacks, selectStatementsForLesson } from './standards/index.js';
@@ -627,11 +627,53 @@ declare function buildLanguageDirective(targetLanguage?: string | null): string;
627
627
  * Parses markdown table or lines from SECTION_LANGUAGE_CONTRACT.md to extract
628
628
  * mapping for a specific artifact type.
629
629
  */
630
- declare function extractSectionHeadingsFromSLC(slcMarkdown: string | undefined | null, artifactType: string): Record<string, string>;
630
+ declare function extractSectionHeadingsFromSLC(slcInput: Record<string, Record<string, string>> | string | undefined | null, artifactType: string): Record<string, string>;
631
631
  /**
632
632
  * Builds the heading directive block to instruct LLM on verbatim section headings.
633
633
  */
634
- declare function buildHeadingDirective(artifactType: string, slcMarkdown?: string | null, targetLanguage?: string): string;
634
+ declare function buildHeadingDirective(artifactType: string, slcMarkdown?: Record<string, Record<string, string>> | string | null, targetLanguage?: string): string;
635
+
636
+ interface ExcerptOptions {
637
+ /**
638
+ * Canonical (English) section keys to prioritize, in order.
639
+ * Each key's body is included before moving to the next priority.
640
+ */
641
+ priorities?: string[];
642
+ /** Character budget for the excerpt (default 12_000, ~3k tokens). */
643
+ budget?: number;
644
+ /**
645
+ * Section Language Contract mapping (Record or raw contract markdown).
646
+ * Used to resolve localized headings (e.g. Vietnamese) to canonical keys.
647
+ */
648
+ sectionLanguageContract?: Record<string, Record<string, string>> | string;
649
+ /** File name or artifact type hint (e.g. 'LESSON', 'KNOWLEDGE_EXPOSITION'). */
650
+ artifactType?: string;
651
+ /** Min chars below which the excerpt is flagged as insufficient (default 400). */
652
+ minContentChars?: number;
653
+ }
654
+ interface ExcerptResult {
655
+ /** Excerpt markdown safe to inject into prompt context blocks. */
656
+ excerpt: string;
657
+ /** True when the source parsed cleanly, passed sufficiency checks, and resolved priorities. */
658
+ verified: boolean;
659
+ /** True when canonical section resolution matched at least one priority section. */
660
+ sectionAware: boolean;
661
+ /** Canonical section keys included in the excerpt, in order. */
662
+ includedSections: string[];
663
+ /** Warning or error flags explaining why verified === false. */
664
+ issues: string[];
665
+ /** Approximate token count (chars / 4). */
666
+ tokenEstimate: number;
667
+ }
668
+ declare const DEFAULT_LESSON_PRIORITIES: string[];
669
+ declare const DEFAULT_KX_PRIORITIES: string[];
670
+ declare function buildSectionAwareExcerpt(markdown: string, opts?: ExcerptOptions): ExcerptResult;
671
+ declare function buildExpositionExcerpt(markdown: string, opts?: Omit<ExcerptOptions, 'priorities'>): ExcerptResult;
672
+ declare function buildLessonExcerpt(markdown: string, opts?: Omit<ExcerptOptions, 'priorities'>): ExcerptResult;
673
+ /**
674
+ * Normalizes SLC input into a two-level map: Record<ArtifactType, Record<CanonicalKey, LocalizedLabel>>
675
+ */
676
+ declare function normalizeSlcContract(slc: Record<string, Record<string, string>> | string | undefined): Record<string, Record<string, string>> | undefined;
635
677
 
636
678
  /**
637
679
  * Curriculum OS - Standardized Error Taxonomy & Traceability System
@@ -639,7 +681,7 @@ declare function buildHeadingDirective(artifactType: string, slcMarkdown?: strin
639
681
  * Provides typed, structured, and traceable error codes for all pipeline failures,
640
682
  * API exceptions, safeguard blocks, and contract violations.
641
683
  */
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';
684
+ 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' | 'ERR_CONTEXT_MISSING';
643
685
  interface CurriculumErrorDetail {
644
686
  errorCode: CurriculumErrorCode;
645
687
  agent?: string;
@@ -676,6 +718,35 @@ declare function createAiInferenceError(params: {
676
718
  suggestedAction?: string;
677
719
  retryable?: boolean;
678
720
  }): CurriculumError;
721
+ declare function createContextMissingError(params: {
722
+ artifactType: string;
723
+ missingSource: string;
724
+ lessonId?: string;
725
+ agent?: string;
726
+ }): CurriculumError;
727
+
728
+ type ContextSourceKey = 'KNOWLEDGE_EXPOSITION' | 'CANONICAL_LESSON' | 'SESSION_SLICE' | 'FRAMEWORK_EXCERPT' | 'STYLE_GUIDE' | 'REFERENCE_PACK' | 'LESSON_OBJECTIVES';
729
+ interface ArtifactDependencyRule {
730
+ required: ContextSourceKey[];
731
+ optional?: ContextSourceKey[];
732
+ rationale: string;
733
+ }
734
+ declare const ARTIFACT_DEPENDENCY_ROUTING: Record<string, ArtifactDependencyRule>;
735
+ interface ValidationOptions {
736
+ lessonId?: string;
737
+ agent?: string;
738
+ failClosed?: boolean;
739
+ }
740
+ interface DependencyValidationResult {
741
+ valid: boolean;
742
+ missing: ContextSourceKey[];
743
+ error?: CurriculumError;
744
+ }
745
+ /**
746
+ * Validates that all required context sources are present and non-empty for an artifact.
747
+ * When failClosed is true (default), throws CurriculumError(ERR_CONTEXT_MISSING) on first missing source.
748
+ */
749
+ declare function validateArtifactDependencies(artifactType: string, availableSources: Partial<Record<ContextSourceKey, any>>, opts?: ValidationOptions): DependencyValidationResult;
679
750
 
680
751
  /**
681
752
  * Academic Quality & Pedagogical Verification Types
@@ -975,4 +1046,4 @@ declare function getSlideLayoutPresetById(id: string): SlideLayoutPreset | undef
975
1046
  */
976
1047
  declare function getSlideLayoutPresetsByCategory(category: SlideLayoutCategory): SlideLayoutPreset[];
977
1048
 
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 };
1049
+ export { ACT_TEMPLATE, AIProviderName, ARTIFACT_DEPENDENCY_ROUTING, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, ActivityLab, type ArtifactDependencyRule, 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, type ContextSourceKey, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DependencyEdge, type DependencyValidationResult, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, type ExcerptOptions, type ExcerptResult, 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, type ValidationOptions, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildExpositionContext, buildExpositionExcerpt, buildHeadingDirective, buildLanguageDirective, buildLessonExcerpt, buildSectionAwareExcerpt, buildSessionSliceContext, closeTruncatedJson, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createContextMissingError, 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, normalizeSlcContract, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderFrameworkFromPlan, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, stripLlmJsonWrappers, targetLanguageDisplayName, topoSort, validateArtifactDependencies };