@novedu/cli 0.5.1 → 0.6.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.
Files changed (2) hide show
  1. package/dist/main.js +18 -3
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -242,6 +242,7 @@ function validate(value, schema, code, url) {
242
242
  })
243
243
  };
244
244
  }
245
+ const providerSchema = z.enum(["SCCH", "Azure Foundry"]).default("SCCH");
245
246
  //#endregion
246
247
  //#region ../lib/tutors/schemas.ts
247
248
  /**
@@ -329,6 +330,7 @@ const TutorSchema = z.strictObject({
329
330
  anonymous: z.boolean().optional(),
330
331
  llm: z.strictObject({
331
332
  model: z.string(),
333
+ provider: providerSchema,
332
334
  imageInput: z.boolean().optional()
333
335
  }),
334
336
  prompt: z.strictObject({
@@ -596,6 +598,7 @@ async function loadAndBuildTutorPrompt(url, fetchImpl, opts = {}) {
596
598
  ok: true,
597
599
  prompt: assembleSystemPrompt(consistency.plan, tutor),
598
600
  model: tutor.llm.model,
601
+ provider: tutor.llm.provider,
599
602
  imageInput: tutor.llm.imageInput ?? true,
600
603
  anonymous: tutor.anonymous ?? true,
601
604
  title: tutor.title,
@@ -633,7 +636,10 @@ const CodingYamlSchema = z.strictObject({
633
636
  id: z.string().min(1),
634
637
  name: z.string().optional(),
635
638
  title: z.string().optional(),
636
- llm: z.strictObject({ model: z.string().min(1) }),
639
+ llm: z.strictObject({
640
+ model: z.string().min(1),
641
+ provider: providerSchema
642
+ }),
637
643
  instructions: z.string().min(1)
638
644
  });
639
645
  //#endregion
@@ -655,6 +661,7 @@ function checkCodingValue(parsed, url) {
655
661
  ok: true,
656
662
  codingId: coding.id,
657
663
  model: coding.llm.model,
664
+ provider: coding.llm.provider,
658
665
  title: coding.title ?? null,
659
666
  warnings: []
660
667
  };
@@ -701,7 +708,10 @@ const QuizYamlSchema = z.strictObject({
701
708
  description: z.string().optional(),
702
709
  anonymous: z.boolean().optional(),
703
710
  shuffle: z.boolean().optional(),
704
- llm: z.strictObject({ model: z.string().min(1) }),
711
+ llm: z.strictObject({
712
+ model: z.string().min(1),
713
+ provider: providerSchema
714
+ }),
705
715
  discussion: z.strictObject({ instructions: z.string().min(1) }).optional(),
706
716
  questions: z.array(QuizQuestionSchema).min(1)
707
717
  });
@@ -745,6 +755,7 @@ function checkQuizValue(parsed, url) {
745
755
  ok: true,
746
756
  quizId: quiz.id,
747
757
  model: quiz.llm.model,
758
+ provider: quiz.llm.provider,
748
759
  questionCount: quiz.questions.length,
749
760
  anonymous: quiz.anonymous ?? DEFAULT_ANONYMOUS$1,
750
761
  title: quiz.title ?? null,
@@ -773,7 +784,10 @@ const WritingYamlSchema = z.strictObject({
773
784
  title: z.string().optional(),
774
785
  description: z.string().optional(),
775
786
  anonymous: z.boolean().optional(),
776
- llm: z.strictObject({ model: z.string().min(1) }),
787
+ llm: z.strictObject({
788
+ model: z.string().min(1),
789
+ provider: providerSchema
790
+ }),
777
791
  instructions: z.string().min(1),
778
792
  placeholder: z.string().optional()
779
793
  });
@@ -798,6 +812,7 @@ function checkWritingValue(parsed, url) {
798
812
  ok: true,
799
813
  writingId: writing.id,
800
814
  model: writing.llm.model,
815
+ provider: writing.llm.provider,
801
816
  anonymous: writing.anonymous ?? DEFAULT_ANONYMOUS,
802
817
  title: writing.title ?? null,
803
818
  warnings: []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novedu/cli",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "Command-line companion for the Novedu chat app. Validates tutor, fragment, quiz, writing and coding YAML definitions (more commands to follow).",
5
5
  "type": "module",
6
6
  "repository": {