@novedu/cli 0.20.0 → 0.21.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 +10 -1
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -2591,6 +2591,10 @@ async function loadQuizFrom(url, fetcher, opts = {}) {
2591
2591
  };
2592
2592
  }
2593
2593
  }
2594
+ const tutorToolNameSchema = z.enum(["random_number"]).meta({
2595
+ id: "tutorToolName",
2596
+ description: "Name of a built-in tutor tool."
2597
+ });
2594
2598
  //#endregion
2595
2599
  //#region ../lib/tutors/schemas.ts
2596
2600
  /**
@@ -2626,6 +2630,7 @@ const TutorSchema = z.strictObject({
2626
2630
  id: "llm",
2627
2631
  description: "The model and provider that back this tutor."
2628
2632
  }),
2633
+ tools: z.array(tutorToolNameSchema).default([]).meta({ description: "Optional built-in tools the tutor's model may call (e.g. random_number). Off by default; mention enabled tools in tutor_instructions so the model uses them." }),
2629
2634
  prompt: z.strictObject({
2630
2635
  fragment_files: z.array(FragmentFileRefSchema).default([]).meta({ description: "Optional fragment libraries used by this tutor." }),
2631
2636
  text_files: z.array(TextFileRefSchema).default([]).meta({ description: "Optional plain-text files (markdown / source) embedded verbatim via {{file \"alias\"}} markers." }),
@@ -2666,6 +2671,7 @@ async function loadAndBuildTutorPrompt(url, fetchImpl, opts = {}) {
2666
2671
  model: tutor.llm.model,
2667
2672
  provider: tutor.llm.provider,
2668
2673
  imageInput: tutor.llm.imageInput ?? true,
2674
+ tools: tutor.tools,
2669
2675
  anonymous: tutor.anonymous ?? true,
2670
2676
  title: tutor.title,
2671
2677
  description: tutor.description,
@@ -2837,7 +2843,8 @@ const promptDumpers = {
2837
2843
  provider: result.provider,
2838
2844
  model: result.model
2839
2845
  },
2840
- system: result.prompt
2846
+ system: result.prompt,
2847
+ tools: result.tools
2841
2848
  }
2842
2849
  };
2843
2850
  } },
@@ -3637,6 +3644,7 @@ function formatResult(result, source) {
3637
3644
  lines.push(` model: ${result.model}`);
3638
3645
  lines.push(` system prompt: ${result.prompt.length} chars`);
3639
3646
  lines.push(` imageInput: ${result.imageInput} anonymous: ${result.anonymous}` + (result.exampleQuestions.length ? ` exampleQuestions: ${result.exampleQuestions.length}` : ""));
3647
+ if (result.tools.length) lines.push(` tools: ${result.tools.join(", ")}`);
3640
3648
  if (result.warnings.length) {
3641
3649
  lines.push("");
3642
3650
  lines.push(yellow(`${result.warnings.length} warning(s):`));
@@ -3889,6 +3897,7 @@ function formatPromptDump(dump, sections, source) {
3889
3897
  const lines = [green(`✔ Prompts — ${dump.kind}`) + dim(` — ${source}`)];
3890
3898
  lines.push(` id: ${dump.id}`);
3891
3899
  lines.push(` provider: ${dump.llm.provider} model: ${dump.llm.model}`);
3900
+ if (dump.kind === "tutor" && dump.tools.length > 0) lines.push(` tools: ${dump.tools.join(", ")}`);
3892
3901
  lines.push(` prompts: ${sections.length}`);
3893
3902
  for (const section of sections) lines.push(` ${section.name}: ${section.text.length} chars`);
3894
3903
  lines.push("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novedu/cli",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "description": "Command-line companion for the Novedu chat app. Validates tutor, fragment, quiz, writing, coding and eval YAML definitions, dumps the exact LLM prompts an activity produces, and evaluates a quiz's grading rubric against golden answers; signs in with Entra ID and manages codes, app-hosted files and images over the app's API.",
5
5
  "type": "module",
6
6
  "repository": {