@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.
@@ -51,6 +51,16 @@ interface SlidesPromptInput {
51
51
  marpTheme?: string;
52
52
  }
53
53
  declare function buildSlidesPrompt(input: SlidesPromptInput): string;
54
+ declare const SLIDE_CANONICAL_METHODOLOGY: string;
55
+ interface MarpMarkdownSlidePromptInput {
56
+ lessonCode: string;
57
+ lessonTitle: string;
58
+ pedagogyLabel: string;
59
+ templateScaffold: string;
60
+ languageDirective: string;
61
+ headingDirective: string;
62
+ }
63
+ declare function buildMarpMarkdownSlidePrompt(input: MarpMarkdownSlidePromptInput): string;
54
64
 
55
65
  interface TeacherGuidePromptInput {
56
66
  lesson: LessonPlan;
@@ -1284,4 +1294,4 @@ interface ToolLoopConfig {
1284
1294
  */
1285
1295
  declare function streamCurriculumAIInferenceWithTools(messages: ChatMessage[], projectContext: string, options: StreamRunnerOptions, loop: ToolLoopConfig, onChunk?: (token: string, type: ChunkType) => void): Promise<string>;
1286
1296
 
1287
- export { type ActivityPromptInput, type AggregatedToolCall, type AsyncLLMJudgeInput, type AuditCurriculumQualityInput, ChatMessage, ChunkType, type CodeLabPromptInput, DEFAULT_ENABLED_PROVIDERS, type DiagnosticQuizPromptInput, type ExtensionPromptInput, type GenerateActivityInput, type GenerateCodeLabInput, type GenerateDiagnosticQuizInput, type GenerateExtensionInput, type GenerateHandoutInput, type GenerateLessonMasterInput, type GenerateProjectInstructionInput, type GenerateSelfLabInput, type GenerateSlidesInput, type GenerateTeacherGuideInput, type GenerateWorksheetInput, type HandoutPromptInput, type JudgeEvaluationResult, type JudgePromptInput, LLMJudgeEngine, type LessonPromptInput, type ModelPolicyResolution, ModelPolicyResolver, type ModelProviderKey, ModelResolutionOptions, type MultiProviderPolicyResolution, type ProjectInstructionPromptInput, type SelfLabPromptInput, type SlidesPromptInput, type StreamDiagnosticQuizInput, type StreamLessonMasterInput, StreamRunnerOptions, type StreamSelfLabInput, type TeacherGuidePromptInput, type ToolDefinition, type ToolExecutionResult, type ToolExecutor, type ToolLoopConfig, type 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 };
1297
+ export { type ActivityPromptInput, type AggregatedToolCall, type AsyncLLMJudgeInput, type AuditCurriculumQualityInput, ChatMessage, ChunkType, type CodeLabPromptInput, DEFAULT_ENABLED_PROVIDERS, type DiagnosticQuizPromptInput, type ExtensionPromptInput, type GenerateActivityInput, type GenerateCodeLabInput, type GenerateDiagnosticQuizInput, type GenerateExtensionInput, type GenerateHandoutInput, type GenerateLessonMasterInput, type GenerateProjectInstructionInput, type GenerateSelfLabInput, type GenerateSlidesInput, type GenerateTeacherGuideInput, type GenerateWorksheetInput, type HandoutPromptInput, type JudgeEvaluationResult, type JudgePromptInput, LLMJudgeEngine, type LessonPromptInput, type MarpMarkdownSlidePromptInput, type ModelPolicyResolution, ModelPolicyResolver, type ModelProviderKey, ModelResolutionOptions, type MultiProviderPolicyResolution, type ProjectInstructionPromptInput, SLIDE_CANONICAL_METHODOLOGY, type SelfLabPromptInput, type SlidesPromptInput, type StreamDiagnosticQuizInput, type StreamLessonMasterInput, StreamRunnerOptions, type StreamSelfLabInput, type TeacherGuidePromptInput, type ToolDefinition, type ToolExecutionResult, type ToolExecutor, type ToolLoopConfig, type 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 };
@@ -51,6 +51,16 @@ interface SlidesPromptInput {
51
51
  marpTheme?: string;
52
52
  }
53
53
  declare function buildSlidesPrompt(input: SlidesPromptInput): string;
54
+ declare const SLIDE_CANONICAL_METHODOLOGY: string;
55
+ interface MarpMarkdownSlidePromptInput {
56
+ lessonCode: string;
57
+ lessonTitle: string;
58
+ pedagogyLabel: string;
59
+ templateScaffold: string;
60
+ languageDirective: string;
61
+ headingDirective: string;
62
+ }
63
+ declare function buildMarpMarkdownSlidePrompt(input: MarpMarkdownSlidePromptInput): string;
54
64
 
55
65
  interface TeacherGuidePromptInput {
56
66
  lesson: LessonPlan;
@@ -1284,4 +1294,4 @@ interface ToolLoopConfig {
1284
1294
  */
1285
1295
  declare function streamCurriculumAIInferenceWithTools(messages: ChatMessage[], projectContext: string, options: StreamRunnerOptions, loop: ToolLoopConfig, onChunk?: (token: string, type: ChunkType) => void): Promise<string>;
1286
1296
 
1287
- export { type ActivityPromptInput, type AggregatedToolCall, type AsyncLLMJudgeInput, type AuditCurriculumQualityInput, ChatMessage, ChunkType, type CodeLabPromptInput, DEFAULT_ENABLED_PROVIDERS, type DiagnosticQuizPromptInput, type ExtensionPromptInput, type GenerateActivityInput, type GenerateCodeLabInput, type GenerateDiagnosticQuizInput, type GenerateExtensionInput, type GenerateHandoutInput, type GenerateLessonMasterInput, type GenerateProjectInstructionInput, type GenerateSelfLabInput, type GenerateSlidesInput, type GenerateTeacherGuideInput, type GenerateWorksheetInput, type HandoutPromptInput, type JudgeEvaluationResult, type JudgePromptInput, LLMJudgeEngine, type LessonPromptInput, type ModelPolicyResolution, ModelPolicyResolver, type ModelProviderKey, ModelResolutionOptions, type MultiProviderPolicyResolution, type ProjectInstructionPromptInput, type SelfLabPromptInput, type SlidesPromptInput, type StreamDiagnosticQuizInput, type StreamLessonMasterInput, StreamRunnerOptions, type StreamSelfLabInput, type TeacherGuidePromptInput, type ToolDefinition, type ToolExecutionResult, type ToolExecutor, type ToolLoopConfig, type 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 };
1297
+ export { type ActivityPromptInput, type AggregatedToolCall, type AsyncLLMJudgeInput, type AuditCurriculumQualityInput, ChatMessage, ChunkType, type CodeLabPromptInput, DEFAULT_ENABLED_PROVIDERS, type DiagnosticQuizPromptInput, type ExtensionPromptInput, type GenerateActivityInput, type GenerateCodeLabInput, type GenerateDiagnosticQuizInput, type GenerateExtensionInput, type GenerateHandoutInput, type GenerateLessonMasterInput, type GenerateProjectInstructionInput, type GenerateSelfLabInput, type GenerateSlidesInput, type GenerateTeacherGuideInput, type GenerateWorksheetInput, type HandoutPromptInput, type JudgeEvaluationResult, type JudgePromptInput, LLMJudgeEngine, type LessonPromptInput, type MarpMarkdownSlidePromptInput, type ModelPolicyResolution, ModelPolicyResolver, type ModelProviderKey, ModelResolutionOptions, type MultiProviderPolicyResolution, type ProjectInstructionPromptInput, SLIDE_CANONICAL_METHODOLOGY, type SelfLabPromptInput, type SlidesPromptInput, type StreamDiagnosticQuizInput, type StreamLessonMasterInput, StreamRunnerOptions, type StreamSelfLabInput, type TeacherGuidePromptInput, type ToolDefinition, type ToolExecutionResult, type ToolExecutor, type ToolLoopConfig, type 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 };
package/dist/ai/index.mjs CHANGED
@@ -83,6 +83,8 @@ function getSuggestedActionForCode(code) {
83
83
  return "N\u1ED9i dung sinh ra thi\u1EBFu c\xE1c ph\u1EA7n b\u1EAFt bu\u1ED9c [REQUIRED]. H\xE3y k\xEDch ho\u1EA1t ki\u1EC3m th\u1EED ho\u1EB7c b\u1EA5m Rerun.";
84
84
  case "ERR_STORAGE_IO_FAILED":
85
85
  return "L\u1ED7i \u0111\u1ECDc/ghi t\u1EC7p tin tr\xEAn h\u1EC7 th\u1ED1ng l\u01B0u tr\u1EEF. Ki\u1EC3m tra quy\u1EC1n ghi th\u01B0 m\u1EE5c output/projects.";
86
+ case "ERR_CONTEXT_MISSING":
87
+ return "Thi\u1EBFu ngu\u1ED3n tri th\u1EE9c b\u1EAFt bu\u1ED9c (KNOWLEDGE_EXPOSITION ho\u1EB7c CANONICAL LESSON) theo Dependency Routing Matrix. Vui l\xF2ng t\u1EA1o ho\u1EB7c \u0111\u1ED3ng b\u1ED9 t\xE0i li\u1EC7u ngu\u1ED3n tr\u01B0\u1EDBc.";
86
88
  default:
87
89
  return "B\u1EA5m Rerun \u0111\u1EC3 th\u1EED l\u1EA1i ho\u1EB7c ki\u1EC3m tra nh\u1EADt k\xFD h\u1EC7 th\u1ED1ng.";
88
90
  }
@@ -100,6 +102,7 @@ function isCodeRetryable(code) {
100
102
  case "ERR_TASK_GATE_BLOCKED":
101
103
  case "ERR_METERED_LIMIT_EXCEEDED":
102
104
  case "ERR_SCHEMA_CONTRACT_VIOLATION":
105
+ case "ERR_CONTEXT_MISSING":
103
106
  return false;
104
107
  default:
105
108
  return true;
@@ -1844,6 +1847,45 @@ Return a single valid JSON object matching SlideDeckSchema with these exact keys
1844
1847
  }
1845
1848
  `.trim();
1846
1849
  }
1850
+ var SLIDE_CANONICAL_METHODOLOGY = `
1851
+ MANDATORY 12-14 SLIDE MICRO-CYCLE STRUCTURE (Delimited by '---'):
1852
+ 1. **Slide 1 [Title & Mission]:** Real-world inquiry hook and overarching build mission
1853
+ 2. **Slide 2 [Agenda & Roadmap]:** Timing and milestone breakdown table
1854
+ 3. **Slide 3 [Warm-Up / Prior Knowledge]:** 2-column recall + 60-second diagnostic challenge card
1855
+ 4. **Slide 4 [High-Stakes Hook Scenario]:** Authentic engineering/domain crisis card + dilemma constraint
1856
+ 5. **Slide 5 [Core Concept 1: Mental Model]:** Definition, intuitive everyday analogy, and golden rule card
1857
+ 6. **Slide 6 [Architecture & Visual Flow]:** Clean Mermaid diagram (flowchart or sequenceDiagram) + 3 flow steps
1858
+ 7. **Slide 7 [Core Concept 2: Syntax / Mechanism Anatomy]:** Side-by-side runnable code + anatomy breakdown & syntax trap card
1859
+ 8. **Slide 8 [Guided Practice: Try It Now]:** 3-minute active desk task card with starter hint and success criteria
1860
+ 9. **Slide 9 [Integrated Hands-On Lab]:** 3-tier differentiated challenge cards (Bronze / Silver / Gold) + gotcha alert card
1861
+ 10. **Slide 10 [Traffic Light Checkpoint & Pitfalls]:** Formative self-check cards (\u{1F7E2}/\u{1F7E1}/\u{1F534}) & diagnostic test question
1862
+ 11. **Slide 11 [Exit Ticket & Metacognition]:** 2 scenario-based check questions + 1 metacognitive reflection prompt
1863
+ 12. **Slide 12 [Summary & Next Steps]:** 3 core golden rules + preview card of next upcoming milestone
1864
+
1865
+ Mandatory Canvas & Presentation Invariants:
1866
+ - A slide is an INTERACTIVE PROJECTION CANVAS, NOT a textbook! Absolutely NO dense paragraphs or walls of text.
1867
+ - Follow the 6x6 rule: Maximum 4-6 bullet points per slide, maximum 8-12 words per bullet.
1868
+ - Structure slides using \`<div class="columns"><div>...</div><div>...</div></div>\` and \`<div class="card">\`, \`<div class="card highlight">\`, \`<div class="card warning">\`, \`<div class="card success">\`.
1869
+ - MANDATORY PRESENTER NOTES ON EVERY SLIDE: Every slide MUST end with \`<!-- Presenter Notes: ... -->\` containing:
1870
+ * SCRIPT: 60-90s teacher talk track with intuitive analogies.
1871
+ * COLD CALL / CHECK: Specific diagnostic question to ask students.
1872
+ * SCAFFOLDING / GOTCHA: Guidance for students who get stuck.
1873
+ * PACING: Recommended minutes for the slide.
1874
+ - Output 100% valid Marp Markdown.
1875
+ `.trim();
1876
+ function buildMarpMarkdownSlidePrompt(input) {
1877
+ return `You are @illustrator & @content (Pedagogical Slide Deck Presentation Specialists).
1878
+ Based on Master Lesson Plan \`LESSON_${input.lessonCode}.md\`, lesson context, and the MARP SLIDE TEMPLATE below, author the complete, highly engaging Marp presentation deck: \`SLIDE_${input.lessonCode}.md\`.
1879
+
1880
+ [MARP SLIDE TEMPLATE SCAFFOLD]:
1881
+ ${input.templateScaffold}
1882
+
1883
+ ${SLIDE_CANONICAL_METHODOLOGY}
1884
+
1885
+ ${input.languageDirective}
1886
+
1887
+ ${input.headingDirective}`.trim();
1888
+ }
1847
1889
 
1848
1890
  // src/ai/prompts/teacherGuidePrompt.ts
1849
1891
  function buildTeacherGuidePrompt(input) {
@@ -4973,6 +5015,6 @@ Guidelines:
4973
5015
  return finalContent;
4974
5016
  }
4975
5017
 
4976
- export { DEFAULT_ARTIFACT_STREAM_IDLE_MS, DEFAULT_ARTIFACT_STREAM_TOTAL_MS, DEFAULT_ENABLED_PROVIDERS, LLMJudgeEngine, ModelPolicyResolver, NVIDIA_MODELS, activityTools, analystTools, assessorTools, auditCurriculumQualityFlow, buildActivityPrompt, buildCodeLabPrompt, buildDiagnosticQuizPrompt, buildExtensionPrompt, buildHandoutPrompt, buildJudgePrompt, buildLessonMasterPrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSlidesPrompt, buildTeacherGuidePrompt, buildWorksheetPrompt, contentTools, createIdleAbortController, createStreamAbortController, designerTools, extractThoughtAndContent, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateProjectInstructionFlow, generateSelfLabFlow, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, getAIModel, getDesignatedFallbackChain, getDesignatedFallbackConfig, illustratorTools, isModelAllowed, isProviderEnabled, packagerTools, researcherTools, reviewerTools, runCurriculumAIInference, streamCurriculumAIInference, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools };
5018
+ export { DEFAULT_ARTIFACT_STREAM_IDLE_MS, DEFAULT_ARTIFACT_STREAM_TOTAL_MS, DEFAULT_ENABLED_PROVIDERS, LLMJudgeEngine, ModelPolicyResolver, NVIDIA_MODELS, SLIDE_CANONICAL_METHODOLOGY, activityTools, analystTools, assessorTools, auditCurriculumQualityFlow, buildActivityPrompt, buildCodeLabPrompt, buildDiagnosticQuizPrompt, buildExtensionPrompt, buildHandoutPrompt, buildJudgePrompt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSlidesPrompt, buildTeacherGuidePrompt, buildWorksheetPrompt, contentTools, createIdleAbortController, createStreamAbortController, designerTools, extractThoughtAndContent, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateProjectInstructionFlow, generateSelfLabFlow, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, getAIModel, getDesignatedFallbackChain, getDesignatedFallbackConfig, illustratorTools, isModelAllowed, isProviderEnabled, packagerTools, researcherTools, reviewerTools, runCurriculumAIInference, streamCurriculumAIInference, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools };
4977
5019
  //# sourceMappingURL=index.mjs.map
4978
5020
  //# sourceMappingURL=index.mjs.map