@thanh01.pmt/curriculum-kit 1.4.18 → 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.ts 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.js';
13
13
  import { F as FrameworkPack, C as CoverageGateReport } from './standardsCoverageGate-DR5YTtlt.js';
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.js';
15
- import { R as ResolvedGateSettings } from './gateSettings-L3FR2-MO.js';
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.js';
15
+ import { R as ResolvedGateSettings } from './gateSettings-DabOqP6_.js';
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_.js';
17
17
  import { z } from 'zod';
18
18
  export { DeliveryPackResult, JobManifest, LocalWorkspaceManager, ParsedQuizQuestion, buildDeliveryPackages, exportAllProjectQuizzes, formatQuizzesToCsv, parseQuizMarkdown } from './publishers/index.js';
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.js';
@@ -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;
@@ -669,66 +729,6 @@ declare function extractSectionHeadingsFromSLC(slcInput: Record<string, Record<s
669
729
  */
670
730
  declare function buildHeadingDirective(artifactType: string, slcMarkdown?: Record<string, Record<string, string>> | string | null, targetLanguage?: string): string;
671
731
 
672
- interface ExcerptOptions {
673
- /**
674
- * Canonical (English) section keys to prioritize, in order.
675
- * Each key's body is included before moving to the next priority.
676
- */
677
- priorities?: string[];
678
- /** Character budget for the excerpt (default 12_000, ~3k tokens). */
679
- budget?: number;
680
- /**
681
- * Section Language Contract mapping (Record or raw contract markdown).
682
- * Used to resolve localized headings (e.g. Vietnamese) to canonical keys.
683
- */
684
- sectionLanguageContract?: Record<string, Record<string, string>> | string;
685
- /** File name or artifact type hint (e.g. 'LESSON', 'KNOWLEDGE_EXPOSITION'). */
686
- artifactType?: string;
687
- /**
688
- * Source file name (e.g. `LESSON_U03_M01_L06.md`) — artifact type derived
689
- * from it when `artifactType` is not given. Matches the web app's builder
690
- * option so both call-sites share one contract.
691
- */
692
- fileName?: string;
693
- /** Min chars below which the excerpt is flagged as insufficient (default 400). */
694
- minContentChars?: number;
695
- }
696
- interface ExcerptResult {
697
- /** Excerpt markdown safe to inject into prompt context blocks. */
698
- excerpt: string;
699
- /** True when the source parsed cleanly, passed sufficiency checks, and resolved priorities. */
700
- verified: boolean;
701
- /** True when canonical section resolution matched at least one priority section. */
702
- sectionAware: boolean;
703
- /** Canonical section keys included in the excerpt, in order. */
704
- includedSections: string[];
705
- /** Warning or error flags explaining why verified === false. */
706
- issues: string[];
707
- /** Approximate token count (chars / 4). */
708
- tokenEstimate: number;
709
- }
710
- declare const DEFAULT_LESSON_PRIORITIES: string[];
711
- declare const DEFAULT_KX_PRIORITIES: string[];
712
- declare function buildSectionAwareExcerpt(markdown: string, opts?: ExcerptOptions): ExcerptResult;
713
- declare function buildExpositionExcerpt(markdown: string, opts?: Omit<ExcerptOptions, 'priorities'>): ExcerptResult;
714
- declare function buildLessonExcerpt(markdown: string, opts?: Omit<ExcerptOptions, 'priorities'>): ExcerptResult;
715
- /**
716
- * Normalizes SLC input into a two-level map: Record<ArtifactType, Record<CanonicalKey, LocalizedLabel>>
717
- */
718
- declare function normalizeSlcContract(slc: Record<string, Record<string, string>> | string | undefined): Record<string, Record<string, string>> | undefined;
719
- /**
720
- * Extracts code symbol & identifier contracts from LESSON markdown.
721
- * Provides deterministic symbol names (Primary Struct/Class, Entry File, Key Functions)
722
- * so all satellite agents (@activity, @illustrator, @assessor) inherit them verbatim.
723
- */
724
- interface SymbolLedgerResult {
725
- primarySymbol?: string;
726
- entryFileName?: string;
727
- keySymbols: string[];
728
- rawBlock: string;
729
- }
730
- declare function extractSymbolLedger(lessonMarkdown: string): SymbolLedgerResult;
731
-
732
732
  /**
733
733
  * Curriculum OS - Standardized Error Taxonomy & Traceability System
734
734
  *
@@ -817,110 +817,217 @@ interface SlideBlueprintItem {
817
817
 
818
818
  declare const SlideBlueprintItemSchema: z.ZodObject<{
819
819
  slideIndex: z.ZodNumber;
820
- clusterId: z.ZodDefault<z.ZodNumber>;
821
- clusterTitle: z.ZodDefault<z.ZodString>;
822
- 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>>>;
823
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"]>;
824
824
  title: z.ZodString;
825
- pedagogicalGoal: z.ZodDefault<z.ZodString>;
826
- contentFocus: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
827
- codeSnippetIntent: z.ZodOptional<z.ZodString>;
828
- 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>>;
829
829
  }, "strip", z.ZodTypeAny, {
830
830
  title: string;
831
- clusterId: number;
832
- clusterTitle: string;
831
+ clusterId: number | null;
832
+ clusterTitle: string | null;
833
833
  slideIndex: number;
834
- lessonPhase: string;
834
+ lessonPhase: string | null;
835
835
  layoutId: "tiered-practice-3cards" | "split-concept-code" | "hero-cover" | "two-columns-compare" | "three-cards-grid" | "timeline-steps" | "metric-callout" | "checkpoint-quiz" | "summary-takeaways";
836
- pedagogicalGoal: string;
837
- contentFocus: string[];
838
- codeSnippetIntent?: string | undefined;
839
- visualIntent?: string | undefined;
836
+ pedagogicalGoal: string | null;
837
+ contentFocus: string[] | null;
838
+ codeSnippetIntent?: string | null | undefined;
839
+ visualIntent?: string | null | undefined;
840
840
  }, {
841
841
  title: string;
842
842
  slideIndex: number;
843
843
  layoutId: "tiered-practice-3cards" | "split-concept-code" | "hero-cover" | "two-columns-compare" | "three-cards-grid" | "timeline-steps" | "metric-callout" | "checkpoint-quiz" | "summary-takeaways";
844
- clusterId?: number | undefined;
845
- clusterTitle?: string | undefined;
846
- lessonPhase?: string | undefined;
847
- pedagogicalGoal?: string | undefined;
848
- contentFocus?: string[] | undefined;
849
- codeSnippetIntent?: string | undefined;
850
- 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;
851
851
  }>;
852
852
  declare const SlideBlueprintArraySchema: z.ZodArray<z.ZodObject<{
853
853
  slideIndex: z.ZodNumber;
854
- clusterId: z.ZodDefault<z.ZodNumber>;
855
- clusterTitle: z.ZodDefault<z.ZodString>;
856
- 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>>>;
857
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"]>;
858
858
  title: z.ZodString;
859
- pedagogicalGoal: z.ZodDefault<z.ZodString>;
860
- contentFocus: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
861
- codeSnippetIntent: z.ZodOptional<z.ZodString>;
862
- 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>>;
863
863
  }, "strip", z.ZodTypeAny, {
864
864
  title: string;
865
- clusterId: number;
866
- clusterTitle: string;
865
+ clusterId: number | null;
866
+ clusterTitle: string | null;
867
867
  slideIndex: number;
868
- lessonPhase: string;
868
+ lessonPhase: string | null;
869
869
  layoutId: "tiered-practice-3cards" | "split-concept-code" | "hero-cover" | "two-columns-compare" | "three-cards-grid" | "timeline-steps" | "metric-callout" | "checkpoint-quiz" | "summary-takeaways";
870
- pedagogicalGoal: string;
871
- contentFocus: string[];
872
- codeSnippetIntent?: string | undefined;
873
- visualIntent?: string | undefined;
870
+ pedagogicalGoal: string | null;
871
+ contentFocus: string[] | null;
872
+ codeSnippetIntent?: string | null | undefined;
873
+ visualIntent?: string | null | undefined;
874
874
  }, {
875
875
  title: string;
876
876
  slideIndex: number;
877
877
  layoutId: "tiered-practice-3cards" | "split-concept-code" | "hero-cover" | "two-columns-compare" | "three-cards-grid" | "timeline-steps" | "metric-callout" | "checkpoint-quiz" | "summary-takeaways";
878
- clusterId?: number | undefined;
879
- clusterTitle?: string | undefined;
880
- lessonPhase?: string | undefined;
881
- pedagogicalGoal?: string | undefined;
882
- contentFocus?: string[] | undefined;
883
- codeSnippetIntent?: string | undefined;
884
- 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;
885
885
  }>, "many">;
886
886
  declare const GeneratedSlideSchema: z.ZodObject<{
887
- id: z.ZodOptional<z.ZodString>;
887
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
888
888
  layoutId: z.ZodString;
889
889
  title: z.ZodString;
890
- slots: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
891
- 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>>>;
892
892
  }, "strip", z.ZodTypeAny, {
893
893
  title: string;
894
894
  layoutId: string;
895
- slots: Record<string, any>;
896
- notes: string;
897
- id?: string | undefined;
895
+ slots: Record<string, any> | null;
896
+ notes: string | null;
897
+ id?: string | null | undefined;
898
898
  }, {
899
899
  title: string;
900
900
  layoutId: string;
901
- id?: string | undefined;
902
- slots?: Record<string, any> | undefined;
903
- notes?: string | undefined;
901
+ id?: string | null | undefined;
902
+ slots?: Record<string, any> | null | undefined;
903
+ notes?: string | null | undefined;
904
904
  }>;
905
905
  declare const GeneratedSlideArraySchema: z.ZodArray<z.ZodObject<{
906
- id: z.ZodOptional<z.ZodString>;
906
+ id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
907
907
  layoutId: z.ZodString;
908
908
  title: z.ZodString;
909
- slots: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
910
- 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>>>;
911
911
  }, "strip", z.ZodTypeAny, {
912
912
  title: string;
913
913
  layoutId: string;
914
- slots: Record<string, any>;
915
- notes: string;
916
- id?: string | undefined;
914
+ slots: Record<string, any> | null;
915
+ notes: string | null;
916
+ id?: string | null | undefined;
917
917
  }, {
918
918
  title: string;
919
919
  layoutId: string;
920
- id?: string | undefined;
921
- slots?: Record<string, any> | undefined;
922
- notes?: string | undefined;
920
+ id?: string | null | undefined;
921
+ slots?: Record<string, any> | null | undefined;
922
+ notes?: string | null | undefined;
923
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';
924
1031
  interface SlideProductionWorkflowOptions {
925
1032
  lessonMarkdown: string;
926
1033
  lessonCode: string;
@@ -933,8 +1040,12 @@ interface SlideProductionWorkflowOptions {
933
1040
  satelliteContext?: any;
934
1041
  /** Vercel AI SDK model resolution options (provider/model/apiKey). */
935
1042
  modelOptions?: ModelResolutionOptions;
936
- /** 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. */
937
1046
  maxRetries?: number;
1047
+ /** Max output tokens for hybrid generateText calls. Default 65536. */
1048
+ maxOutputTokens?: number;
938
1049
  /** When true (default), falls back to the legacy raw-fetch runner if generateObject fails. */
939
1050
  allowLegacyFallback?: boolean;
940
1051
  runnerOptions?: any;
@@ -946,7 +1057,20 @@ interface SlideProductionWorkflowResult {
946
1057
  markdownWrapper: string;
947
1058
  blueprint: SlideBlueprintItem[];
948
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;
949
1071
  }
1072
+ declare function extractJsonArray(raw: string | undefined | null): ExtractedJson;
1073
+ declare function validateHybridDeckSlides(slides: any[], blueprint: SlideBlueprintItem[]): string[];
950
1074
  declare function executeSlideProductionWorkflow(options: SlideProductionWorkflowOptions): Promise<SlideProductionWorkflowResult>;
951
1075
 
952
1076
  /**
@@ -1247,4 +1371,4 @@ declare function getSlideLayoutPresetById(id: string): SlideLayoutPreset | undef
1247
1371
  */
1248
1372
  declare function getSlideLayoutPresetsByCategory(category: SlideLayoutCategory): SlideLayoutPreset[];
1249
1373
 
1250
- 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, 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, 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 };
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 };