@thanh01.pmt/curriculum-kit 1.4.18 → 1.4.21

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.
@@ -1,3 +1,94 @@
1
+ interface DetailedLessonBridge {
2
+ lessonId: string;
3
+ lessonIndex: number;
4
+ title: string;
5
+ proseObjective?: string;
6
+ keywords: string[];
7
+ /** Physical SOT symbol ledger extracted from disk (if physical artifact exists) */
8
+ symbolLedger?: {
9
+ primaryStructOrClass?: string;
10
+ mainEntryFile?: string;
11
+ keyVariables?: string[];
12
+ };
13
+ }
14
+ interface BoundaryPeek {
15
+ lessonId: string;
16
+ lessonIndex: number;
17
+ title: string;
18
+ keywords: string[];
19
+ }
20
+ interface HorizonSessionSnapshot {
21
+ id: string;
22
+ order?: number;
23
+ title: string;
24
+ prose_objective?: string;
25
+ new_keywords?: string[];
26
+ prerequisite_keywords?: string[];
27
+ depth_assignments?: Array<{
28
+ node_id: string;
29
+ depth: 'ulo' | 'cio' | 'sio';
30
+ }>;
31
+ }
32
+ interface CurriculumHorizon {
33
+ targetLessonId: string;
34
+ targetLessonIndex: number;
35
+ totalLessons: number;
36
+ targetTitle: string;
37
+ targetKeywords: string[];
38
+ /**
39
+ * TIER 2: Compact Mastery Set (L_1 .. L_{N-3})
40
+ * Flat deduplicated keyword and concept sets without per-lesson overhead.
41
+ * Target footprint: ~50-100 tokens.
42
+ */
43
+ compactMasterySet: {
44
+ masteredKeywords: string[];
45
+ masteredConcepts: string[];
46
+ };
47
+ /**
48
+ * TIER 1: Detailed Bridge (L_{N-2} and L_{N-1})
49
+ * Full lesson metadata and physical symbol ledger.
50
+ * Target footprint: ~120-200 tokens.
51
+ */
52
+ detailedBridge: DetailedLessonBridge[];
53
+ /**
54
+ * BOUNDARY PEEK: L_{N+1} (and optionally L_{N+2})
55
+ * Upcoming lesson concepts used for positive-only boundary enforcement.
56
+ * Target footprint: ~30-50 tokens.
57
+ */
58
+ boundaryPeek: BoundaryPeek[];
59
+ }
60
+ interface ExtractCurriculumHorizonOptions {
61
+ plan?: any | null;
62
+ frameworkMarkdown?: string | null;
63
+ targetLessonId: string;
64
+ storage?: any;
65
+ projectId?: string;
66
+ }
67
+ interface HorizonValidationResult {
68
+ compliant: boolean;
69
+ issues: string[];
70
+ forbiddenMatches: string[];
71
+ }
72
+ /**
73
+ * Parses all sessions deterministically from either CurriculumPlan JSON or CURRICULUM_FRAMEWORK.md Scope & Sequence.
74
+ */
75
+ declare function parseAllSessions(plan?: any | null, frameworkMarkdown?: string | null): HorizonSessionSnapshot[];
76
+ /**
77
+ * Extracts the 3-Tier Curriculum Horizon for a target lesson.
78
+ * Enforces fail-fast if the target lesson cannot be resolved from the SOT plan or framework.
79
+ */
80
+ declare function extractCurriculumHorizon(opts: ExtractCurriculumHorizonOptions): Promise<CurriculumHorizon>;
81
+ /**
82
+ * Serializes the CurriculumHorizon into a token-efficient (~200-350 tokens)
83
+ * Positive-Only Markdown prompt block.
84
+ */
85
+ declare function renderHorizonPromptBlock(horizon: CurriculumHorizon): string;
86
+ /**
87
+ * Validates whether an artifact output adheres to the Curriculum Horizon boundary
88
+ * (detects accidental future concept leaks).
89
+ */
90
+ declare function validateHorizonCompliance(artifactContent: string, horizon: CurriculumHorizon): HorizonValidationResult;
91
+
1
92
  type ArtifactType = 'lesson' | 'slide' | 'act' | 'quiz' | 'guide' | 'handout' | 'worksheet' | 'rubric' | 'ext' | 'glossary' | 'codelab' | 'bom' | 'exit_ticket' | 'tiered_practice' | 'choice_board' | 'science_lab' | 'task_cards' | 'station_rotation' | 'bell_ringer' | 'review_game' | 'graphic_organizer';
2
93
  type ScaffoldingLevel = 'foundation' | 'balanced' | 'advanced';
3
94
  interface SingleArtifactRequest {
@@ -23,6 +114,8 @@ interface SingleArtifactRequest {
23
114
  lessonPlan?: string;
24
115
  handout?: string;
25
116
  exposition?: string;
117
+ plan?: any;
118
+ horizon?: CurriculumHorizon;
26
119
  };
27
120
  /**
28
121
  * Media Ledger policy (nếu có): agent chèn placeholder [IMAGE: slug], Curator duyệt,
@@ -120,4 +213,4 @@ declare function resolveGateSettings(raw?: unknown): ResolvedGateSettings;
120
213
  /** Mode đã resolve cho 1 artifact type. */
121
214
  declare function gateModeFor(resolved: ResolvedGateSettings, type: CurriculumArtifactType): CurriculumGateMode;
122
215
 
123
- export { type ArtifactType as A, type CurriculumGateMode as C, DEFAULT_GATE_SETTINGS as D, type GateSettings as G, type ResolvedGateSettings as R, type SingleArtifactRequest as S, type SingleArtifactResult as a, type CurriculumArtifactType as b, type ScaffoldingLevel as c, getArtifactMetadata as d, generateSingleArtifact as e, gateModeFor as g, parseGateSettings as p, resolveGateSettings as r };
216
+ export { type ArtifactType as A, type BoundaryPeek as B, type CurriculumGateMode as C, DEFAULT_GATE_SETTINGS as D, type ExtractCurriculumHorizonOptions as E, type GateSettings as G, type HorizonSessionSnapshot as H, type ResolvedGateSettings as R, type SingleArtifactRequest as S, type SingleArtifactResult as a, type CurriculumArtifactType as b, type ScaffoldingLevel as c, getArtifactMetadata as d, generateSingleArtifact as e, type DetailedLessonBridge as f, gateModeFor as g, type CurriculumHorizon as h, type HorizonValidationResult as i, parseAllSessions as j, extractCurriculumHorizon as k, renderHorizonPromptBlock as l, parseGateSettings as p, resolveGateSettings as r, validateHorizonCompliance as v };
@@ -1,3 +1,94 @@
1
+ interface DetailedLessonBridge {
2
+ lessonId: string;
3
+ lessonIndex: number;
4
+ title: string;
5
+ proseObjective?: string;
6
+ keywords: string[];
7
+ /** Physical SOT symbol ledger extracted from disk (if physical artifact exists) */
8
+ symbolLedger?: {
9
+ primaryStructOrClass?: string;
10
+ mainEntryFile?: string;
11
+ keyVariables?: string[];
12
+ };
13
+ }
14
+ interface BoundaryPeek {
15
+ lessonId: string;
16
+ lessonIndex: number;
17
+ title: string;
18
+ keywords: string[];
19
+ }
20
+ interface HorizonSessionSnapshot {
21
+ id: string;
22
+ order?: number;
23
+ title: string;
24
+ prose_objective?: string;
25
+ new_keywords?: string[];
26
+ prerequisite_keywords?: string[];
27
+ depth_assignments?: Array<{
28
+ node_id: string;
29
+ depth: 'ulo' | 'cio' | 'sio';
30
+ }>;
31
+ }
32
+ interface CurriculumHorizon {
33
+ targetLessonId: string;
34
+ targetLessonIndex: number;
35
+ totalLessons: number;
36
+ targetTitle: string;
37
+ targetKeywords: string[];
38
+ /**
39
+ * TIER 2: Compact Mastery Set (L_1 .. L_{N-3})
40
+ * Flat deduplicated keyword and concept sets without per-lesson overhead.
41
+ * Target footprint: ~50-100 tokens.
42
+ */
43
+ compactMasterySet: {
44
+ masteredKeywords: string[];
45
+ masteredConcepts: string[];
46
+ };
47
+ /**
48
+ * TIER 1: Detailed Bridge (L_{N-2} and L_{N-1})
49
+ * Full lesson metadata and physical symbol ledger.
50
+ * Target footprint: ~120-200 tokens.
51
+ */
52
+ detailedBridge: DetailedLessonBridge[];
53
+ /**
54
+ * BOUNDARY PEEK: L_{N+1} (and optionally L_{N+2})
55
+ * Upcoming lesson concepts used for positive-only boundary enforcement.
56
+ * Target footprint: ~30-50 tokens.
57
+ */
58
+ boundaryPeek: BoundaryPeek[];
59
+ }
60
+ interface ExtractCurriculumHorizonOptions {
61
+ plan?: any | null;
62
+ frameworkMarkdown?: string | null;
63
+ targetLessonId: string;
64
+ storage?: any;
65
+ projectId?: string;
66
+ }
67
+ interface HorizonValidationResult {
68
+ compliant: boolean;
69
+ issues: string[];
70
+ forbiddenMatches: string[];
71
+ }
72
+ /**
73
+ * Parses all sessions deterministically from either CurriculumPlan JSON or CURRICULUM_FRAMEWORK.md Scope & Sequence.
74
+ */
75
+ declare function parseAllSessions(plan?: any | null, frameworkMarkdown?: string | null): HorizonSessionSnapshot[];
76
+ /**
77
+ * Extracts the 3-Tier Curriculum Horizon for a target lesson.
78
+ * Enforces fail-fast if the target lesson cannot be resolved from the SOT plan or framework.
79
+ */
80
+ declare function extractCurriculumHorizon(opts: ExtractCurriculumHorizonOptions): Promise<CurriculumHorizon>;
81
+ /**
82
+ * Serializes the CurriculumHorizon into a token-efficient (~200-350 tokens)
83
+ * Positive-Only Markdown prompt block.
84
+ */
85
+ declare function renderHorizonPromptBlock(horizon: CurriculumHorizon): string;
86
+ /**
87
+ * Validates whether an artifact output adheres to the Curriculum Horizon boundary
88
+ * (detects accidental future concept leaks).
89
+ */
90
+ declare function validateHorizonCompliance(artifactContent: string, horizon: CurriculumHorizon): HorizonValidationResult;
91
+
1
92
  type ArtifactType = 'lesson' | 'slide' | 'act' | 'quiz' | 'guide' | 'handout' | 'worksheet' | 'rubric' | 'ext' | 'glossary' | 'codelab' | 'bom' | 'exit_ticket' | 'tiered_practice' | 'choice_board' | 'science_lab' | 'task_cards' | 'station_rotation' | 'bell_ringer' | 'review_game' | 'graphic_organizer';
2
93
  type ScaffoldingLevel = 'foundation' | 'balanced' | 'advanced';
3
94
  interface SingleArtifactRequest {
@@ -23,6 +114,8 @@ interface SingleArtifactRequest {
23
114
  lessonPlan?: string;
24
115
  handout?: string;
25
116
  exposition?: string;
117
+ plan?: any;
118
+ horizon?: CurriculumHorizon;
26
119
  };
27
120
  /**
28
121
  * Media Ledger policy (nếu có): agent chèn placeholder [IMAGE: slug], Curator duyệt,
@@ -120,4 +213,4 @@ declare function resolveGateSettings(raw?: unknown): ResolvedGateSettings;
120
213
  /** Mode đã resolve cho 1 artifact type. */
121
214
  declare function gateModeFor(resolved: ResolvedGateSettings, type: CurriculumArtifactType): CurriculumGateMode;
122
215
 
123
- export { type ArtifactType as A, type CurriculumGateMode as C, DEFAULT_GATE_SETTINGS as D, type GateSettings as G, type ResolvedGateSettings as R, type SingleArtifactRequest as S, type SingleArtifactResult as a, type CurriculumArtifactType as b, type ScaffoldingLevel as c, getArtifactMetadata as d, generateSingleArtifact as e, gateModeFor as g, parseGateSettings as p, resolveGateSettings as r };
216
+ export { type ArtifactType as A, type BoundaryPeek as B, type CurriculumGateMode as C, DEFAULT_GATE_SETTINGS as D, type ExtractCurriculumHorizonOptions as E, type GateSettings as G, type HorizonSessionSnapshot as H, type ResolvedGateSettings as R, type SingleArtifactRequest as S, type SingleArtifactResult as a, type CurriculumArtifactType as b, type ScaffoldingLevel as c, getArtifactMetadata as d, generateSingleArtifact as e, type DetailedLessonBridge as f, gateModeFor as g, type CurriculumHorizon as h, type HorizonValidationResult as i, parseAllSessions as j, extractCurriculumHorizon as k, renderHorizonPromptBlock as l, parseGateSettings as p, resolveGateSettings as r, validateHorizonCompliance as v };