@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.
@@ -2,10 +2,10 @@
2
2
 
3
3
  var fs = require('fs');
4
4
  var path4 = require('path');
5
- var ai = require('ai');
6
5
  var google = require('@ai-sdk/google');
7
6
  var openai = require('@ai-sdk/openai');
8
7
  var deepseek = require('@ai-sdk/deepseek');
8
+ var ai = require('ai');
9
9
  var zod = require('zod');
10
10
  var workflow = require('workflow');
11
11
  var fs2 = require('fs/promises');
@@ -859,19 +859,6 @@ var init_streamRunner = __esm({
859
859
  DEFAULT_ARTIFACT_STREAM_TOTAL_MS = 48e4;
860
860
  }
861
861
  });
862
-
863
- // src/ai/provider-factory.ts
864
- init_streamRunner();
865
- var DEFAULT_MODELS = {
866
- nvidia: "nvidia/nemotron-3-ultra-550b-a55b:free",
867
- openrouter: "@preset/coding-free",
868
- alibaba: "qwen3.7-plus",
869
- dashscope: "qwen3.7-plus",
870
- google: "gemini-1.5-flash",
871
- deepseek: "deepseek-chat",
872
- openai: "gpt-4o-mini",
873
- ollama: "deepseek-v4-flash:0731"
874
- };
875
862
  function getAIModel(options = {}) {
876
863
  const designated = getDesignatedFallbackConfig();
877
864
  const defaultProvider = process.env.DEFAULT_AI_PROVIDER || process.env.LLM_PROVIDER || detectDefaultProvider();
@@ -973,6 +960,25 @@ function detectDefaultProvider() {
973
960
  }
974
961
  return getDesignatedFallbackConfig().provider;
975
962
  }
963
+ var DEFAULT_MODELS;
964
+ var init_provider_factory = __esm({
965
+ "src/ai/provider-factory.ts"() {
966
+ init_streamRunner();
967
+ DEFAULT_MODELS = {
968
+ nvidia: "nvidia/nemotron-3-ultra-550b-a55b:free",
969
+ openrouter: "@preset/coding-free",
970
+ alibaba: "qwen3.7-plus",
971
+ dashscope: "qwen3.7-plus",
972
+ google: "gemini-1.5-flash",
973
+ deepseek: "deepseek-chat",
974
+ openai: "gpt-4o-mini",
975
+ ollama: "deepseek-v4-flash:0731"
976
+ };
977
+ }
978
+ });
979
+
980
+ // src/ai/flows/generateLessonMasterFlow.ts
981
+ init_provider_factory();
976
982
  var LearningObjectiveRowSchema = zod.z.object({
977
983
  code: zod.z.string().describe('LO code, e.g. "LO1"'),
978
984
  objective: zod.z.string().describe("Bloom-tagged learning objective"),
@@ -3777,6 +3783,9 @@ Respond with a valid JSON object matching the schema.`
3777
3783
  });
3778
3784
  return object;
3779
3785
  }
3786
+
3787
+ // src/ai/flows/generateActivityFlow.ts
3788
+ init_provider_factory();
3780
3789
  async function generateActivityFlow(input) {
3781
3790
  const model = getAIModel(input.modelOptions);
3782
3791
  const prompt = buildActivityPrompt({
@@ -3794,6 +3803,9 @@ Respond with a valid JSON object matching the schema.`
3794
3803
  });
3795
3804
  return object;
3796
3805
  }
3806
+
3807
+ // src/ai/flows/generateCodeLabFlow.ts
3808
+ init_provider_factory();
3797
3809
  async function generateCodeLabFlow(input) {
3798
3810
  const model = getAIModel(input.modelOptions);
3799
3811
  const prompt = buildCodeLabPrompt({
@@ -3811,6 +3823,9 @@ Respond with a valid JSON object matching the schema.`
3811
3823
  });
3812
3824
  return object;
3813
3825
  }
3826
+
3827
+ // src/ai/flows/generateWorksheetFlow.ts
3828
+ init_provider_factory();
3814
3829
  async function generateWorksheetFlow(input) {
3815
3830
  const model = getAIModel(input.modelOptions);
3816
3831
  const prompt = buildWorksheetPrompt({
@@ -3824,6 +3839,9 @@ async function generateWorksheetFlow(input) {
3824
3839
  });
3825
3840
  return object;
3826
3841
  }
3842
+
3843
+ // src/ai/flows/generateHandoutFlow.ts
3844
+ init_provider_factory();
3827
3845
  async function generateHandoutFlow(input) {
3828
3846
  const model = getAIModel(input.modelOptions);
3829
3847
  const prompt = buildHandoutPrompt({
@@ -3839,6 +3857,9 @@ Respond with a valid JSON object matching the schema.`
3839
3857
  });
3840
3858
  return object;
3841
3859
  }
3860
+
3861
+ // src/ai/flows/generateSlidesFlow.ts
3862
+ init_provider_factory();
3842
3863
  async function generateSlidesFlow(input) {
3843
3864
  const model = getAIModel(input.modelOptions);
3844
3865
  const prompt = buildSlidesPrompt({
@@ -3853,6 +3874,9 @@ async function generateSlidesFlow(input) {
3853
3874
  });
3854
3875
  return object;
3855
3876
  }
3877
+
3878
+ // src/ai/flows/generateTeacherGuideFlow.ts
3879
+ init_provider_factory();
3856
3880
  async function generateTeacherGuideFlow(input) {
3857
3881
  const model = getAIModel(input.modelOptions);
3858
3882
  const prompt = buildTeacherGuidePrompt({
@@ -3867,6 +3891,9 @@ async function generateTeacherGuideFlow(input) {
3867
3891
  });
3868
3892
  return object;
3869
3893
  }
3894
+
3895
+ // src/ai/flows/generateExtensionFlow.ts
3896
+ init_provider_factory();
3870
3897
  async function generateExtensionFlow(input) {
3871
3898
  const model = getAIModel(input.modelOptions);
3872
3899
  const prompt = buildExtensionPrompt({
@@ -3881,6 +3908,9 @@ async function generateExtensionFlow(input) {
3881
3908
  });
3882
3909
  return object;
3883
3910
  }
3911
+
3912
+ // src/ai/flows/auditCurriculumQualityFlow.ts
3913
+ init_provider_factory();
3884
3914
  async function auditCurriculumQualityFlow(input) {
3885
3915
  const model = getAIModel(input.modelOptions);
3886
3916
  const prompt = buildJudgePrompt({
@@ -3900,6 +3930,12 @@ Respond with a valid JSON object matching the schema.`
3900
3930
  });
3901
3931
  return object;
3902
3932
  }
3933
+
3934
+ // src/ai/flows/generateProjectInstructionFlow.ts
3935
+ init_provider_factory();
3936
+
3937
+ // src/ai/flows/generateSelfLabFlow.ts
3938
+ init_provider_factory();
3903
3939
  async function generateSelfLabFlow(input) {
3904
3940
  const model = getAIModel(input.modelOptions);
3905
3941
  const prompt = buildSelfLabPrompt({
@@ -3918,6 +3954,9 @@ Respond with a valid JSON object matching the schema.`
3918
3954
  });
3919
3955
  return object;
3920
3956
  }
3957
+
3958
+ // src/ai/flows/generateDiagnosticQuizFlow.ts
3959
+ init_provider_factory();
3921
3960
  async function generateDiagnosticQuizFlow(input) {
3922
3961
  const model = getAIModel(input.modelOptions);
3923
3962
  const prompt = buildDiagnosticQuizPrompt({
@@ -3935,6 +3974,15 @@ Respond with a valid JSON object matching the schema.`
3935
3974
  });
3936
3975
  return object;
3937
3976
  }
3977
+
3978
+ // src/ai/flows/streamLessonMasterFlow.ts
3979
+ init_provider_factory();
3980
+
3981
+ // src/ai/flows/streamSelfLabFlow.ts
3982
+ init_provider_factory();
3983
+
3984
+ // src/ai/flows/streamDiagnosticQuizFlow.ts
3985
+ init_provider_factory();
3938
3986
  async function withRateLimitBackoff(options) {
3939
3987
  let attempt = 1;
3940
3988
  try {