@thanh01.pmt/curriculum-kit 1.4.17 → 1.4.20

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
@@ -12,8 +12,8 @@ export { b as ArtifactLifecycleInfo, A as ArtifactLifecycleState, L as LessonArt
12
12
  export { FileSystemCurriculumAdapter, FileSystemStorageOptions, STANDARD_SOT_FILES, StorageFactoryOptions, SupabaseCurriculumAdapter, SupabaseStorageConfig, computeContentHash, createCurriculumStorage } from './storage/index.cjs';
13
13
  import { F as FrameworkPack, C as CoverageGateReport } from './standardsCoverageGate-DR5YTtlt.cjs';
14
14
  export { B as BloomHintSchema, a as ClassificationSchema, m as CoverageGateInput, 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-DR5YTtlt.cjs';
15
- import { R as ResolvedGateSettings } from './gateSettings-L3FR2-MO.cjs';
16
- 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-L3FR2-MO.cjs';
15
+ import { R as ResolvedGateSettings } from './gateSettings-DabOqP6_.cjs';
16
+ export { A as ArtifactType, B as BoundaryPeek, b as CurriculumArtifactType, C as CurriculumGateMode, h as CurriculumHorizon, D as DEFAULT_GATE_SETTINGS, f as DetailedLessonBridge, E as ExtractCurriculumHorizonOptions, G as GateSettings, H as HorizonSessionSnapshot, i as HorizonValidationResult, c as ScaffoldingLevel, S as SingleArtifactRequest, a as SingleArtifactResult, k as extractCurriculumHorizon, g as gateModeFor, e as generateSingleArtifact, d as getArtifactMetadata, j as parseAllSessions, p as parseGateSettings, l as renderHorizonPromptBlock, r as resolveGateSettings, v as validateHorizonCompliance } from './gateSettings-DabOqP6_.cjs';
17
17
  import { z } from 'zod';
18
18
  export { DeliveryPackResult, JobManifest, LocalWorkspaceManager, ParsedQuizQuestion, buildDeliveryPackages, exportAllProjectQuizzes, formatQuizzesToCsv, parseQuizMarkdown } from './publishers/index.cjs';
19
19
  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';
@@ -227,6 +227,66 @@ declare function produceBatchLessons(storage: ICurriculumStorage, projectId: str
227
227
  report: ProjectStatusReport;
228
228
  }>;
229
229
 
230
+ interface ExcerptOptions {
231
+ /**
232
+ * Canonical (English) section keys to prioritize, in order.
233
+ * Each key's body is included before moving to the next priority.
234
+ */
235
+ priorities?: string[];
236
+ /** Character budget for the excerpt (default 12_000, ~3k tokens). */
237
+ budget?: number;
238
+ /**
239
+ * Section Language Contract mapping (Record or raw contract markdown).
240
+ * Used to resolve localized headings (e.g. Vietnamese) to canonical keys.
241
+ */
242
+ sectionLanguageContract?: Record<string, Record<string, string>> | string;
243
+ /** File name or artifact type hint (e.g. 'LESSON', 'KNOWLEDGE_EXPOSITION'). */
244
+ artifactType?: string;
245
+ /**
246
+ * Source file name (e.g. `LESSON_U03_M01_L06.md`) — artifact type derived
247
+ * from it when `artifactType` is not given. Matches the web app's builder
248
+ * option so both call-sites share one contract.
249
+ */
250
+ fileName?: string;
251
+ /** Min chars below which the excerpt is flagged as insufficient (default 400). */
252
+ minContentChars?: number;
253
+ }
254
+ interface ExcerptResult {
255
+ /** Excerpt markdown safe to inject into prompt context blocks. */
256
+ excerpt: string;
257
+ /** True when the source parsed cleanly, passed sufficiency checks, and resolved priorities. */
258
+ verified: boolean;
259
+ /** True when canonical section resolution matched at least one priority section. */
260
+ sectionAware: boolean;
261
+ /** Canonical section keys included in the excerpt, in order. */
262
+ includedSections: string[];
263
+ /** Warning or error flags explaining why verified === false. */
264
+ issues: string[];
265
+ /** Approximate token count (chars / 4). */
266
+ tokenEstimate: number;
267
+ }
268
+ declare const DEFAULT_LESSON_PRIORITIES: string[];
269
+ declare const DEFAULT_KX_PRIORITIES: string[];
270
+ declare function buildSectionAwareExcerpt(markdown: string, opts?: ExcerptOptions): ExcerptResult;
271
+ declare function buildExpositionExcerpt(markdown: string, opts?: Omit<ExcerptOptions, 'priorities'>): ExcerptResult;
272
+ declare function buildLessonExcerpt(markdown: string, opts?: Omit<ExcerptOptions, 'priorities'>): ExcerptResult;
273
+ /**
274
+ * Normalizes SLC input into a two-level map: Record<ArtifactType, Record<CanonicalKey, LocalizedLabel>>
275
+ */
276
+ declare function normalizeSlcContract(slc: Record<string, Record<string, string>> | string | undefined): Record<string, Record<string, string>> | undefined;
277
+ /**
278
+ * Extracts code symbol & identifier contracts from LESSON markdown.
279
+ * Provides deterministic symbol names (Primary Struct/Class, Entry File, Key Functions)
280
+ * so all satellite agents (@activity, @illustrator, @assessor) inherit them verbatim.
281
+ */
282
+ interface SymbolLedgerResult {
283
+ primarySymbol?: string;
284
+ entryFileName?: string;
285
+ keySymbols: string[];
286
+ rawBlock: string;
287
+ }
288
+ declare function extractSymbolLedger(lessonMarkdown: string): SymbolLedgerResult;
289
+
230
290
  interface ProjectCreationPayload {
231
291
  projectName: string;
232
292
  projectCode: string;
@@ -571,6 +631,7 @@ declare class ExpositionApprovalError extends Error {
571
631
  }
572
632
  /** Determine whether an existing EXPOSITION can be reused for this lesson. */
573
633
  declare function isExpositionFresh(existing: string | null, plan: CurriculumPlan, lessonCode: string): boolean;
634
+ declare function buildDomainLexiconGuardrail(techStack?: string, hardwarePlatform?: string): string;
574
635
  interface GenerateExpositionOptions {
575
636
  projectId: string;
576
637
  lessonCode: string;
@@ -585,6 +646,8 @@ interface GenerateExpositionOptions {
585
646
  gates?: ResolvedGateSettings;
586
647
  targetLanguage?: string;
587
648
  slcMarkdown?: Record<string, Record<string, string>> | string | null;
649
+ techStack?: string;
650
+ hardwarePlatform?: string;
588
651
  }
589
652
  interface ExpositionResult {
590
653
  relPath: string;
@@ -615,6 +678,8 @@ declare function ensureExpositionForLesson(storage: ICurriculumStorage, projectI
615
678
  targetLanguage?: string;
616
679
  slcMarkdown?: Record<string, Record<string, string>> | string | null;
617
680
  customInference?: StreamRunnerOptions['customInference'];
681
+ techStack?: string;
682
+ hardwarePlatform?: string;
618
683
  }): Promise<{
619
684
  relPath: string;
620
685
  context: string;
@@ -664,54 +729,6 @@ declare function extractSectionHeadingsFromSLC(slcInput: Record<string, Record<s
664
729
  */
665
730
  declare function buildHeadingDirective(artifactType: string, slcMarkdown?: Record<string, Record<string, string>> | string | null, targetLanguage?: string): string;
666
731
 
667
- interface ExcerptOptions {
668
- /**
669
- * Canonical (English) section keys to prioritize, in order.
670
- * Each key's body is included before moving to the next priority.
671
- */
672
- priorities?: string[];
673
- /** Character budget for the excerpt (default 12_000, ~3k tokens). */
674
- budget?: number;
675
- /**
676
- * Section Language Contract mapping (Record or raw contract markdown).
677
- * Used to resolve localized headings (e.g. Vietnamese) to canonical keys.
678
- */
679
- sectionLanguageContract?: Record<string, Record<string, string>> | string;
680
- /** File name or artifact type hint (e.g. 'LESSON', 'KNOWLEDGE_EXPOSITION'). */
681
- artifactType?: string;
682
- /**
683
- * Source file name (e.g. `LESSON_U03_M01_L06.md`) — artifact type derived
684
- * from it when `artifactType` is not given. Matches the web app's builder
685
- * option so both call-sites share one contract.
686
- */
687
- fileName?: string;
688
- /** Min chars below which the excerpt is flagged as insufficient (default 400). */
689
- minContentChars?: number;
690
- }
691
- interface ExcerptResult {
692
- /** Excerpt markdown safe to inject into prompt context blocks. */
693
- excerpt: string;
694
- /** True when the source parsed cleanly, passed sufficiency checks, and resolved priorities. */
695
- verified: boolean;
696
- /** True when canonical section resolution matched at least one priority section. */
697
- sectionAware: boolean;
698
- /** Canonical section keys included in the excerpt, in order. */
699
- includedSections: string[];
700
- /** Warning or error flags explaining why verified === false. */
701
- issues: string[];
702
- /** Approximate token count (chars / 4). */
703
- tokenEstimate: number;
704
- }
705
- declare const DEFAULT_LESSON_PRIORITIES: string[];
706
- declare const DEFAULT_KX_PRIORITIES: string[];
707
- declare function buildSectionAwareExcerpt(markdown: string, opts?: ExcerptOptions): ExcerptResult;
708
- declare function buildExpositionExcerpt(markdown: string, opts?: Omit<ExcerptOptions, 'priorities'>): ExcerptResult;
709
- declare function buildLessonExcerpt(markdown: string, opts?: Omit<ExcerptOptions, 'priorities'>): ExcerptResult;
710
- /**
711
- * Normalizes SLC input into a two-level map: Record<ArtifactType, Record<CanonicalKey, LocalizedLabel>>
712
- */
713
- declare function normalizeSlcContract(slc: Record<string, Record<string, string>> | string | undefined): Record<string, Record<string, string>> | undefined;
714
-
715
732
  /**
716
733
  * Curriculum OS - Standardized Error Taxonomy & Traceability System
717
734
  *
@@ -800,110 +817,217 @@ interface SlideBlueprintItem {
800
817
 
801
818
  declare const SlideBlueprintItemSchema: z.ZodObject<{
802
819
  slideIndex: z.ZodNumber;
803
- clusterId: z.ZodDefault<z.ZodNumber>;
804
- clusterTitle: z.ZodDefault<z.ZodString>;
805
- lessonPhase: z.ZodDefault<z.ZodString>;
820
+ clusterId: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
821
+ clusterTitle: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
822
+ lessonPhase: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
806
823
  layoutId: z.ZodEnum<["hero-cover", "split-concept-code", "two-columns-compare", "three-cards-grid", "timeline-steps", "metric-callout", "checkpoint-quiz", "tiered-practice-3cards", "summary-takeaways"]>;
807
824
  title: z.ZodString;
808
- pedagogicalGoal: z.ZodDefault<z.ZodString>;
809
- contentFocus: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
810
- codeSnippetIntent: z.ZodOptional<z.ZodString>;
811
- visualIntent: z.ZodOptional<z.ZodString>;
825
+ pedagogicalGoal: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
826
+ contentFocus: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
827
+ codeSnippetIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
828
+ visualIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
812
829
  }, "strip", z.ZodTypeAny, {
813
830
  title: string;
814
- clusterId: number;
815
- clusterTitle: string;
831
+ clusterId: number | null;
832
+ clusterTitle: string | null;
816
833
  slideIndex: number;
817
- lessonPhase: string;
834
+ lessonPhase: string | null;
818
835
  layoutId: "tiered-practice-3cards" | "split-concept-code" | "hero-cover" | "two-columns-compare" | "three-cards-grid" | "timeline-steps" | "metric-callout" | "checkpoint-quiz" | "summary-takeaways";
819
- pedagogicalGoal: string;
820
- contentFocus: string[];
821
- codeSnippetIntent?: string | undefined;
822
- visualIntent?: string | undefined;
836
+ pedagogicalGoal: string | null;
837
+ contentFocus: string[] | null;
838
+ codeSnippetIntent?: string | null | undefined;
839
+ visualIntent?: string | null | undefined;
823
840
  }, {
824
841
  title: string;
825
842
  slideIndex: number;
826
843
  layoutId: "tiered-practice-3cards" | "split-concept-code" | "hero-cover" | "two-columns-compare" | "three-cards-grid" | "timeline-steps" | "metric-callout" | "checkpoint-quiz" | "summary-takeaways";
827
- clusterId?: number | undefined;
828
- clusterTitle?: string | undefined;
829
- lessonPhase?: string | undefined;
830
- pedagogicalGoal?: string | undefined;
831
- contentFocus?: string[] | undefined;
832
- codeSnippetIntent?: string | undefined;
833
- visualIntent?: string | undefined;
844
+ clusterId?: number | null | undefined;
845
+ clusterTitle?: string | null | undefined;
846
+ lessonPhase?: string | null | undefined;
847
+ pedagogicalGoal?: string | null | undefined;
848
+ contentFocus?: string[] | null | undefined;
849
+ codeSnippetIntent?: string | null | undefined;
850
+ visualIntent?: string | null | undefined;
834
851
  }>;
835
852
  declare const SlideBlueprintArraySchema: z.ZodArray<z.ZodObject<{
836
853
  slideIndex: z.ZodNumber;
837
- clusterId: z.ZodDefault<z.ZodNumber>;
838
- clusterTitle: z.ZodDefault<z.ZodString>;
839
- lessonPhase: z.ZodDefault<z.ZodString>;
854
+ clusterId: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
855
+ clusterTitle: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
856
+ lessonPhase: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
840
857
  layoutId: z.ZodEnum<["hero-cover", "split-concept-code", "two-columns-compare", "three-cards-grid", "timeline-steps", "metric-callout", "checkpoint-quiz", "tiered-practice-3cards", "summary-takeaways"]>;
841
858
  title: z.ZodString;
842
- pedagogicalGoal: z.ZodDefault<z.ZodString>;
843
- contentFocus: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
844
- codeSnippetIntent: z.ZodOptional<z.ZodString>;
845
- visualIntent: z.ZodOptional<z.ZodString>;
859
+ pedagogicalGoal: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
860
+ contentFocus: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
861
+ codeSnippetIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
862
+ visualIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
846
863
  }, "strip", z.ZodTypeAny, {
847
864
  title: string;
848
- clusterId: number;
849
- clusterTitle: string;
865
+ clusterId: number | null;
866
+ clusterTitle: string | null;
850
867
  slideIndex: number;
851
- lessonPhase: string;
868
+ lessonPhase: string | null;
852
869
  layoutId: "tiered-practice-3cards" | "split-concept-code" | "hero-cover" | "two-columns-compare" | "three-cards-grid" | "timeline-steps" | "metric-callout" | "checkpoint-quiz" | "summary-takeaways";
853
- pedagogicalGoal: string;
854
- contentFocus: string[];
855
- codeSnippetIntent?: string | undefined;
856
- visualIntent?: string | undefined;
870
+ pedagogicalGoal: string | null;
871
+ contentFocus: string[] | null;
872
+ codeSnippetIntent?: string | null | undefined;
873
+ visualIntent?: string | null | undefined;
857
874
  }, {
858
875
  title: string;
859
876
  slideIndex: number;
860
877
  layoutId: "tiered-practice-3cards" | "split-concept-code" | "hero-cover" | "two-columns-compare" | "three-cards-grid" | "timeline-steps" | "metric-callout" | "checkpoint-quiz" | "summary-takeaways";
861
- clusterId?: number | undefined;
862
- clusterTitle?: string | undefined;
863
- lessonPhase?: string | undefined;
864
- pedagogicalGoal?: string | undefined;
865
- contentFocus?: string[] | undefined;
866
- codeSnippetIntent?: string | undefined;
867
- visualIntent?: string | undefined;
878
+ clusterId?: number | null | undefined;
879
+ clusterTitle?: string | null | undefined;
880
+ lessonPhase?: string | null | undefined;
881
+ pedagogicalGoal?: string | null | undefined;
882
+ contentFocus?: string[] | null | undefined;
883
+ codeSnippetIntent?: string | null | undefined;
884
+ visualIntent?: string | null | undefined;
868
885
  }>, "many">;
869
886
  declare const GeneratedSlideSchema: z.ZodObject<{
870
- id: z.ZodOptional<z.ZodString>;
887
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
871
888
  layoutId: z.ZodString;
872
889
  title: z.ZodString;
873
- slots: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
874
- notes: z.ZodDefault<z.ZodString>;
890
+ slots: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
891
+ notes: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
875
892
  }, "strip", z.ZodTypeAny, {
876
893
  title: string;
877
894
  layoutId: string;
878
- slots: Record<string, any>;
879
- notes: string;
880
- id?: string | undefined;
895
+ slots: Record<string, any> | null;
896
+ notes: string | null;
897
+ id?: string | null | undefined;
881
898
  }, {
882
899
  title: string;
883
900
  layoutId: string;
884
- id?: string | undefined;
885
- slots?: Record<string, any> | undefined;
886
- notes?: string | undefined;
901
+ id?: string | null | undefined;
902
+ slots?: Record<string, any> | null | undefined;
903
+ notes?: string | null | undefined;
887
904
  }>;
888
905
  declare const GeneratedSlideArraySchema: z.ZodArray<z.ZodObject<{
889
- id: z.ZodOptional<z.ZodString>;
906
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
890
907
  layoutId: z.ZodString;
891
908
  title: z.ZodString;
892
- slots: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
893
- notes: z.ZodDefault<z.ZodString>;
909
+ slots: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
910
+ notes: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
894
911
  }, "strip", z.ZodTypeAny, {
895
912
  title: string;
896
913
  layoutId: string;
897
- slots: Record<string, any>;
898
- notes: string;
899
- id?: string | undefined;
914
+ slots: Record<string, any> | null;
915
+ notes: string | null;
916
+ id?: string | null | undefined;
900
917
  }, {
901
918
  title: string;
902
919
  layoutId: string;
903
- id?: string | undefined;
904
- slots?: Record<string, any> | undefined;
905
- notes?: string | undefined;
920
+ id?: string | null | undefined;
921
+ slots?: Record<string, any> | null | undefined;
922
+ notes?: string | null | undefined;
906
923
  }>, "many">;
924
+ declare const HybridBlueprintItemSchema: z.ZodObject<{
925
+ slideIndex: z.ZodNumber;
926
+ clusterId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
927
+ clusterTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
928
+ lessonPhase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
929
+ layoutId: z.ZodEnum<["hero-cover", "split-concept-code", "two-columns-compare", "three-cards-grid", "timeline-steps", "metric-callout", "checkpoint-quiz", "tiered-practice-3cards", "summary-takeaways"]>;
930
+ title: z.ZodString;
931
+ pedagogicalGoal: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
932
+ contentFocus: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
933
+ codeSnippetIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
934
+ visualIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
935
+ }, "strip", z.ZodTypeAny, {
936
+ title: string;
937
+ slideIndex: number;
938
+ layoutId: "tiered-practice-3cards" | "split-concept-code" | "hero-cover" | "two-columns-compare" | "three-cards-grid" | "timeline-steps" | "metric-callout" | "checkpoint-quiz" | "summary-takeaways";
939
+ pedagogicalGoal: string | null;
940
+ contentFocus: string[] | null;
941
+ clusterId?: number | null | undefined;
942
+ clusterTitle?: string | null | undefined;
943
+ lessonPhase?: string | null | undefined;
944
+ codeSnippetIntent?: string | null | undefined;
945
+ visualIntent?: string | null | undefined;
946
+ }, {
947
+ title: string;
948
+ slideIndex: number;
949
+ layoutId: "tiered-practice-3cards" | "split-concept-code" | "hero-cover" | "two-columns-compare" | "three-cards-grid" | "timeline-steps" | "metric-callout" | "checkpoint-quiz" | "summary-takeaways";
950
+ clusterId?: number | null | undefined;
951
+ clusterTitle?: string | null | undefined;
952
+ lessonPhase?: string | null | undefined;
953
+ pedagogicalGoal?: string | null | undefined;
954
+ contentFocus?: string[] | null | undefined;
955
+ codeSnippetIntent?: string | null | undefined;
956
+ visualIntent?: string | null | undefined;
957
+ }>;
958
+ declare const HybridBlueprintArraySchema: z.ZodArray<z.ZodObject<{
959
+ slideIndex: z.ZodNumber;
960
+ clusterId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
961
+ clusterTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
962
+ lessonPhase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
963
+ layoutId: z.ZodEnum<["hero-cover", "split-concept-code", "two-columns-compare", "three-cards-grid", "timeline-steps", "metric-callout", "checkpoint-quiz", "tiered-practice-3cards", "summary-takeaways"]>;
964
+ title: z.ZodString;
965
+ pedagogicalGoal: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
966
+ contentFocus: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>>;
967
+ codeSnippetIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
968
+ visualIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
969
+ }, "strip", z.ZodTypeAny, {
970
+ title: string;
971
+ slideIndex: number;
972
+ layoutId: "tiered-practice-3cards" | "split-concept-code" | "hero-cover" | "two-columns-compare" | "three-cards-grid" | "timeline-steps" | "metric-callout" | "checkpoint-quiz" | "summary-takeaways";
973
+ pedagogicalGoal: string | null;
974
+ contentFocus: string[] | null;
975
+ clusterId?: number | null | undefined;
976
+ clusterTitle?: string | null | undefined;
977
+ lessonPhase?: string | null | undefined;
978
+ codeSnippetIntent?: string | null | undefined;
979
+ visualIntent?: string | null | undefined;
980
+ }, {
981
+ title: string;
982
+ slideIndex: number;
983
+ layoutId: "tiered-practice-3cards" | "split-concept-code" | "hero-cover" | "two-columns-compare" | "three-cards-grid" | "timeline-steps" | "metric-callout" | "checkpoint-quiz" | "summary-takeaways";
984
+ clusterId?: number | null | undefined;
985
+ clusterTitle?: string | null | undefined;
986
+ lessonPhase?: string | null | undefined;
987
+ pedagogicalGoal?: string | null | undefined;
988
+ contentFocus?: string[] | null | undefined;
989
+ codeSnippetIntent?: string | null | undefined;
990
+ visualIntent?: string | null | undefined;
991
+ }>, "many">;
992
+ declare const HybridDeckSlideSchema: z.ZodObject<{
993
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
994
+ layoutId: z.ZodString;
995
+ title: z.ZodString;
996
+ slots: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
997
+ notes: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
998
+ }, "strip", z.ZodTypeAny, {
999
+ title: string;
1000
+ layoutId: string;
1001
+ slots: Record<string, any> | null;
1002
+ notes: string | null;
1003
+ id?: string | null | undefined;
1004
+ }, {
1005
+ title: string;
1006
+ layoutId: string;
1007
+ id?: string | null | undefined;
1008
+ slots?: Record<string, any> | null | undefined;
1009
+ notes?: string | null | undefined;
1010
+ }>;
1011
+ declare const HybridDeckSlideArraySchema: z.ZodArray<z.ZodObject<{
1012
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1013
+ layoutId: z.ZodString;
1014
+ title: z.ZodString;
1015
+ slots: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
1016
+ notes: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1017
+ }, "strip", z.ZodTypeAny, {
1018
+ title: string;
1019
+ layoutId: string;
1020
+ slots: Record<string, any> | null;
1021
+ notes: string | null;
1022
+ id?: string | null | undefined;
1023
+ }, {
1024
+ title: string;
1025
+ layoutId: string;
1026
+ id?: string | null | undefined;
1027
+ slots?: Record<string, any> | null | undefined;
1028
+ notes?: string | null | undefined;
1029
+ }>, "many">;
1030
+ type SlideEngine = 'hybrid' | 'chunked';
907
1031
  interface SlideProductionWorkflowOptions {
908
1032
  lessonMarkdown: string;
909
1033
  lessonCode: string;
@@ -916,8 +1040,12 @@ interface SlideProductionWorkflowOptions {
916
1040
  satelliteContext?: any;
917
1041
  /** Vercel AI SDK model resolution options (provider/model/apiKey). */
918
1042
  modelOptions?: ModelResolutionOptions;
919
- /** Max attempts per inference unit (blueprint / each cluster). Default 3. */
1043
+ /** Which engine to run. Default 'hybrid'; 'hybrid' auto-falls back to 'chunked'. */
1044
+ engine?: SlideEngine;
1045
+ /** Max attempts per inference unit (blueprint / each cluster / full deck). Default 3. */
920
1046
  maxRetries?: number;
1047
+ /** Max output tokens for hybrid generateText calls. Default 65536. */
1048
+ maxOutputTokens?: number;
921
1049
  /** When true (default), falls back to the legacy raw-fetch runner if generateObject fails. */
922
1050
  allowLegacyFallback?: boolean;
923
1051
  runnerOptions?: any;
@@ -929,7 +1057,20 @@ interface SlideProductionWorkflowResult {
929
1057
  markdownWrapper: string;
930
1058
  blueprint: SlideBlueprintItem[];
931
1059
  slideCount: number;
1060
+ /** Which engine actually produced the deck (hybrid may fall back to chunked). */
1061
+ engine: SlideEngine;
1062
+ }
1063
+ /** Thrown when the hybrid engine exhausts its attempts; triggers chunked fallback. */
1064
+ declare class HybridPipelineError extends Error {
1065
+ }
1066
+ interface ExtractedJson {
1067
+ value?: unknown;
1068
+ error?: string;
1069
+ head?: string;
1070
+ tail?: string;
932
1071
  }
1072
+ declare function extractJsonArray(raw: string | undefined | null): ExtractedJson;
1073
+ declare function validateHybridDeckSlides(slides: any[], blueprint: SlideBlueprintItem[]): string[];
933
1074
  declare function executeSlideProductionWorkflow(options: SlideProductionWorkflowOptions): Promise<SlideProductionWorkflowResult>;
934
1075
 
935
1076
  /**
@@ -1230,4 +1371,4 @@ declare function getSlideLayoutPresetById(id: string): SlideLayoutPreset | undef
1230
1371
  */
1231
1372
  declare function getSlideLayoutPresetsByCategory(category: SlideLayoutCategory): SlideLayoutPreset[];
1232
1373
 
1233
- 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 ContextInjectionMeta, type ContextSourceKey, CoverageGateReport, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DEFAULT_VIETNAMESE_SECTION_HEADINGS, 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, GeneratedSlideArraySchema, GeneratedSlideSchema, HANDOUT_TEMPLATE, ICurriculumStorage, LAYER_IDLE_BUDGET_MS, 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, SlideBlueprintArraySchema, SlideBlueprintItemSchema, SlideDeck, type SlideLayoutCategory, type SlideLayoutData, type SlideLayoutPreset, type SlideProductionWorkflowOptions, type SlideProductionWorkflowResult, SmartResumeContext, type StreamAbortHandle, type StreamBudget, type StreamChunkExtractor, StreamRunnerOptions, 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, executeSlideProductionWorkflow, 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 };
1374
+ 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 ContextInjectionMeta, type ContextSourceKey, CoverageGateReport, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DEFAULT_VIETNAMESE_SECTION_HEADINGS, 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 ExtractedJson, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, type GenerateExpositionOptions, GeneratedSlideArraySchema, GeneratedSlideSchema, HANDOUT_TEMPLATE, HybridBlueprintArraySchema, HybridBlueprintItemSchema, HybridDeckSlideArraySchema, HybridDeckSlideSchema, HybridPipelineError, ICurriculumStorage, LAYER_IDLE_BUDGET_MS, 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, SlideBlueprintArraySchema, SlideBlueprintItemSchema, SlideDeck, type SlideEngine, type SlideLayoutCategory, type SlideLayoutData, type SlideLayoutPreset, type SlideProductionWorkflowOptions, type SlideProductionWorkflowResult, SmartResumeContext, type StreamAbortHandle, type StreamBudget, type StreamChunkExtractor, StreamRunnerOptions, type SymbolLedgerResult, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TranslationPolicy, type TranslationTarget, type TranslationTrigger, type ValidationOptions, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildDomainLexiconGuardrail, buildExpositionContext, buildExpositionExcerpt, buildHeadingDirective, buildLanguageDirective, buildLessonExcerpt, buildSectionAwareExcerpt, buildSessionSliceContext, closeTruncatedJson, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createContextMissingError, createStreamAbortSignal, createStreamChunkExtractor, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, executeCurriculumCommand, executeSlideProductionWorkflow, expositionCacheKey, extractJsonArray, extractScopeSequenceRows, extractSectionHeadingsFromSLC, extractSessionSlice, extractStreamChunk, extractSymbolLedger, 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, validateHybridDeckSlides };