@thanh01.pmt/curriculum-kit 1.4.15 → 1.4.16

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,9 +1,9 @@
1
1
  import fs from 'fs';
2
2
  import path4 from 'path';
3
- import { generateObject } from 'ai';
4
3
  import { createGoogleGenerativeAI } from '@ai-sdk/google';
5
4
  import { createOpenAI } from '@ai-sdk/openai';
6
5
  import { createDeepSeek } from '@ai-sdk/deepseek';
6
+ import { generateObject } from 'ai';
7
7
  import { z } from 'zod';
8
8
  import { defineHook, getStepMetadata, RetryableError, sleep } from 'workflow';
9
9
  import fs2 from 'fs/promises';
@@ -850,19 +850,6 @@ var init_streamRunner = __esm({
850
850
  DEFAULT_ARTIFACT_STREAM_TOTAL_MS = 48e4;
851
851
  }
852
852
  });
853
-
854
- // src/ai/provider-factory.ts
855
- init_streamRunner();
856
- var DEFAULT_MODELS = {
857
- nvidia: "nvidia/nemotron-3-ultra-550b-a55b:free",
858
- openrouter: "@preset/coding-free",
859
- alibaba: "qwen3.7-plus",
860
- dashscope: "qwen3.7-plus",
861
- google: "gemini-1.5-flash",
862
- deepseek: "deepseek-chat",
863
- openai: "gpt-4o-mini",
864
- ollama: "deepseek-v4-flash:0731"
865
- };
866
853
  function getAIModel(options = {}) {
867
854
  const designated = getDesignatedFallbackConfig();
868
855
  const defaultProvider = process.env.DEFAULT_AI_PROVIDER || process.env.LLM_PROVIDER || detectDefaultProvider();
@@ -964,6 +951,25 @@ function detectDefaultProvider() {
964
951
  }
965
952
  return getDesignatedFallbackConfig().provider;
966
953
  }
954
+ var DEFAULT_MODELS;
955
+ var init_provider_factory = __esm({
956
+ "src/ai/provider-factory.ts"() {
957
+ init_streamRunner();
958
+ DEFAULT_MODELS = {
959
+ nvidia: "nvidia/nemotron-3-ultra-550b-a55b:free",
960
+ openrouter: "@preset/coding-free",
961
+ alibaba: "qwen3.7-plus",
962
+ dashscope: "qwen3.7-plus",
963
+ google: "gemini-1.5-flash",
964
+ deepseek: "deepseek-chat",
965
+ openai: "gpt-4o-mini",
966
+ ollama: "deepseek-v4-flash:0731"
967
+ };
968
+ }
969
+ });
970
+
971
+ // src/ai/flows/generateLessonMasterFlow.ts
972
+ init_provider_factory();
967
973
  var LearningObjectiveRowSchema = z.object({
968
974
  code: z.string().describe('LO code, e.g. "LO1"'),
969
975
  objective: z.string().describe("Bloom-tagged learning objective"),
@@ -3768,6 +3774,9 @@ Respond with a valid JSON object matching the schema.`
3768
3774
  });
3769
3775
  return object;
3770
3776
  }
3777
+
3778
+ // src/ai/flows/generateActivityFlow.ts
3779
+ init_provider_factory();
3771
3780
  async function generateActivityFlow(input) {
3772
3781
  const model = getAIModel(input.modelOptions);
3773
3782
  const prompt = buildActivityPrompt({
@@ -3785,6 +3794,9 @@ Respond with a valid JSON object matching the schema.`
3785
3794
  });
3786
3795
  return object;
3787
3796
  }
3797
+
3798
+ // src/ai/flows/generateCodeLabFlow.ts
3799
+ init_provider_factory();
3788
3800
  async function generateCodeLabFlow(input) {
3789
3801
  const model = getAIModel(input.modelOptions);
3790
3802
  const prompt = buildCodeLabPrompt({
@@ -3802,6 +3814,9 @@ Respond with a valid JSON object matching the schema.`
3802
3814
  });
3803
3815
  return object;
3804
3816
  }
3817
+
3818
+ // src/ai/flows/generateWorksheetFlow.ts
3819
+ init_provider_factory();
3805
3820
  async function generateWorksheetFlow(input) {
3806
3821
  const model = getAIModel(input.modelOptions);
3807
3822
  const prompt = buildWorksheetPrompt({
@@ -3815,6 +3830,9 @@ async function generateWorksheetFlow(input) {
3815
3830
  });
3816
3831
  return object;
3817
3832
  }
3833
+
3834
+ // src/ai/flows/generateHandoutFlow.ts
3835
+ init_provider_factory();
3818
3836
  async function generateHandoutFlow(input) {
3819
3837
  const model = getAIModel(input.modelOptions);
3820
3838
  const prompt = buildHandoutPrompt({
@@ -3830,6 +3848,9 @@ Respond with a valid JSON object matching the schema.`
3830
3848
  });
3831
3849
  return object;
3832
3850
  }
3851
+
3852
+ // src/ai/flows/generateSlidesFlow.ts
3853
+ init_provider_factory();
3833
3854
  async function generateSlidesFlow(input) {
3834
3855
  const model = getAIModel(input.modelOptions);
3835
3856
  const prompt = buildSlidesPrompt({
@@ -3844,6 +3865,9 @@ async function generateSlidesFlow(input) {
3844
3865
  });
3845
3866
  return object;
3846
3867
  }
3868
+
3869
+ // src/ai/flows/generateTeacherGuideFlow.ts
3870
+ init_provider_factory();
3847
3871
  async function generateTeacherGuideFlow(input) {
3848
3872
  const model = getAIModel(input.modelOptions);
3849
3873
  const prompt = buildTeacherGuidePrompt({
@@ -3858,6 +3882,9 @@ async function generateTeacherGuideFlow(input) {
3858
3882
  });
3859
3883
  return object;
3860
3884
  }
3885
+
3886
+ // src/ai/flows/generateExtensionFlow.ts
3887
+ init_provider_factory();
3861
3888
  async function generateExtensionFlow(input) {
3862
3889
  const model = getAIModel(input.modelOptions);
3863
3890
  const prompt = buildExtensionPrompt({
@@ -3872,6 +3899,9 @@ async function generateExtensionFlow(input) {
3872
3899
  });
3873
3900
  return object;
3874
3901
  }
3902
+
3903
+ // src/ai/flows/auditCurriculumQualityFlow.ts
3904
+ init_provider_factory();
3875
3905
  async function auditCurriculumQualityFlow(input) {
3876
3906
  const model = getAIModel(input.modelOptions);
3877
3907
  const prompt = buildJudgePrompt({
@@ -3891,6 +3921,12 @@ Respond with a valid JSON object matching the schema.`
3891
3921
  });
3892
3922
  return object;
3893
3923
  }
3924
+
3925
+ // src/ai/flows/generateProjectInstructionFlow.ts
3926
+ init_provider_factory();
3927
+
3928
+ // src/ai/flows/generateSelfLabFlow.ts
3929
+ init_provider_factory();
3894
3930
  async function generateSelfLabFlow(input) {
3895
3931
  const model = getAIModel(input.modelOptions);
3896
3932
  const prompt = buildSelfLabPrompt({
@@ -3909,6 +3945,9 @@ Respond with a valid JSON object matching the schema.`
3909
3945
  });
3910
3946
  return object;
3911
3947
  }
3948
+
3949
+ // src/ai/flows/generateDiagnosticQuizFlow.ts
3950
+ init_provider_factory();
3912
3951
  async function generateDiagnosticQuizFlow(input) {
3913
3952
  const model = getAIModel(input.modelOptions);
3914
3953
  const prompt = buildDiagnosticQuizPrompt({
@@ -3926,6 +3965,15 @@ Respond with a valid JSON object matching the schema.`
3926
3965
  });
3927
3966
  return object;
3928
3967
  }
3968
+
3969
+ // src/ai/flows/streamLessonMasterFlow.ts
3970
+ init_provider_factory();
3971
+
3972
+ // src/ai/flows/streamSelfLabFlow.ts
3973
+ init_provider_factory();
3974
+
3975
+ // src/ai/flows/streamDiagnosticQuizFlow.ts
3976
+ init_provider_factory();
3929
3977
  async function withRateLimitBackoff(options) {
3930
3978
  let attempt = 1;
3931
3979
  try {