@thanh01.pmt/curriculum-kit 1.0.7 → 1.0.9
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.
- package/dist/ai/index.cjs +26 -0
- package/dist/ai/index.cjs.map +1 -1
- package/dist/ai/index.d.cts +2 -2
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/index.mjs +26 -0
- package/dist/ai/index.mjs.map +1 -1
- package/dist/index.cjs +26 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +26 -0
- package/dist/index.mjs.map +1 -1
- package/dist/media/index.cjs +26 -0
- package/dist/media/index.cjs.map +1 -1
- package/dist/media/index.d.cts +3 -1
- package/dist/media/index.d.ts +3 -1
- package/dist/media/index.mjs +26 -0
- package/dist/media/index.mjs.map +1 -1
- package/dist/pipeline/index.cjs.map +1 -1
- package/dist/pipeline/index.mjs.map +1 -1
- package/dist/{streamRunner-C7j5LKon.d.cts → streamRunner-BTTzbb-l.d.cts} +19 -0
- package/dist/{streamRunner-C7j5LKon.d.ts → streamRunner-BTTzbb-l.d.ts} +19 -0
- package/dist/workflow/index.cjs +26 -0
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.mjs +26 -0
- package/dist/workflow/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ export { ActiveLearningWorkflow, ActiveLearningWorkflowSchema, ActivityLabSchema
|
|
|
3
3
|
import { M as ModelResolutionOptions } from './provider-factory-DH3udYlN.cjs';
|
|
4
4
|
export { A as AIProviderName, N as NVIDIA_MODELS, g as getAIModel } from './provider-factory-DH3udYlN.cjs';
|
|
5
5
|
export { ActivityPromptInput, AggregatedToolCall, AsyncLLMJudgeInput, AuditCurriculumQualityInput, CodeLabPromptInput, DEFAULT_ENABLED_PROVIDERS, DiagnosticQuizPromptInput, ExtensionPromptInput, GenerateActivityInput, GenerateCodeLabInput, GenerateDiagnosticQuizInput, GenerateExtensionInput, GenerateHandoutInput, GenerateLessonMasterInput, GenerateProjectInstructionInput, GenerateSelfLabInput, GenerateSlidesInput, GenerateTeacherGuideInput, GenerateWorksheetInput, HandoutPromptInput, JudgeEvaluationResult, JudgePromptInput, LLMJudgeEngine, LessonPromptInput, ModelPolicyResolution, ModelPolicyResolver, ModelProviderKey, MultiProviderPolicyResolution, ProjectInstructionPromptInput, SelfLabPromptInput, SlidesPromptInput, StreamDiagnosticQuizInput, StreamLessonMasterInput, StreamSelfLabInput, TeacherGuidePromptInput, ToolDefinition, ToolExecutionResult, ToolExecutor, ToolLoopConfig, 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 } from './ai/index.cjs';
|
|
6
|
-
export { C as ChatMessage, c as ChunkType, F as FallbackTarget, S as StreamRunnerOptions, e as extractThoughtAndContent, g as getDesignatedFallbackChain, b as getDesignatedFallbackConfig, a as isModelAllowed, i as isProviderEnabled, r as runCurriculumAIInference, s as streamCurriculumAIInference } from './streamRunner-
|
|
6
|
+
export { C as ChatMessage, c as ChunkType, F as FallbackTarget, S as StreamRunnerOptions, e as extractThoughtAndContent, g as getDesignatedFallbackChain, b as getDesignatedFallbackConfig, a as isModelAllowed, i as isProviderEnabled, r as runCurriculumAIInference, s as streamCurriculumAIInference } from './streamRunner-BTTzbb-l.cjs';
|
|
7
7
|
export { ArtifactLintReport, ConvertedSotBundle, GenerateProjectInstructionOptions, GenerateRoadmapCurriculumOptions, GenerateSelfPacedBundleInput, LintIssue, ProjectInstructionResult, RoadmapCurriculumOutput, SelfPacedBundleOutput, convertRoadmapToFoundationSot, generateProjectInstruction, generateRoadmapCurriculum, generateSelfPacedBundle, importRoadmapToProject, lintAndSanitizeArtifact, serializeActivityToMarkdown, serializeCodeLabToMarkdown, serializeDiagnosticQuizToMarkdown, serializeHandoutToMarkdown, serializeLessonToMarkdown, serializeProjectInstructionToMarkdown, serializeSelfLabToMarkdown, validateMarkdownTables, validateMermaidSyntax } from './pipeline/index.cjs';
|
|
8
8
|
export { A as AutoRepairOptions, a as AutoRepairResult, B as BundleTier, G as GenerateMilestoneBundleOptions, M as MilestoneCurriculumBundle, g as generateMilestoneCurriculumBundle, w as withAutoRepair } from './milestoneBundleGenerator-DrBtHzBO.cjs';
|
|
9
9
|
import { I as ICurriculumStorage, P as ProjectStatusReport, S as SmartResumeContext, Q as QualityAuditReport } from './types-BUJGYiep.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { ActiveLearningWorkflow, ActiveLearningWorkflowSchema, ActivityLabSchema
|
|
|
3
3
|
import { M as ModelResolutionOptions } from './provider-factory-DH3udYlN.js';
|
|
4
4
|
export { A as AIProviderName, N as NVIDIA_MODELS, g as getAIModel } from './provider-factory-DH3udYlN.js';
|
|
5
5
|
export { ActivityPromptInput, AggregatedToolCall, AsyncLLMJudgeInput, AuditCurriculumQualityInput, CodeLabPromptInput, DEFAULT_ENABLED_PROVIDERS, DiagnosticQuizPromptInput, ExtensionPromptInput, GenerateActivityInput, GenerateCodeLabInput, GenerateDiagnosticQuizInput, GenerateExtensionInput, GenerateHandoutInput, GenerateLessonMasterInput, GenerateProjectInstructionInput, GenerateSelfLabInput, GenerateSlidesInput, GenerateTeacherGuideInput, GenerateWorksheetInput, HandoutPromptInput, JudgeEvaluationResult, JudgePromptInput, LLMJudgeEngine, LessonPromptInput, ModelPolicyResolution, ModelPolicyResolver, ModelProviderKey, MultiProviderPolicyResolution, ProjectInstructionPromptInput, SelfLabPromptInput, SlidesPromptInput, StreamDiagnosticQuizInput, StreamLessonMasterInput, StreamSelfLabInput, TeacherGuidePromptInput, ToolDefinition, ToolExecutionResult, ToolExecutor, ToolLoopConfig, 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 } from './ai/index.js';
|
|
6
|
-
export { C as ChatMessage, c as ChunkType, F as FallbackTarget, S as StreamRunnerOptions, e as extractThoughtAndContent, g as getDesignatedFallbackChain, b as getDesignatedFallbackConfig, a as isModelAllowed, i as isProviderEnabled, r as runCurriculumAIInference, s as streamCurriculumAIInference } from './streamRunner-
|
|
6
|
+
export { C as ChatMessage, c as ChunkType, F as FallbackTarget, S as StreamRunnerOptions, e as extractThoughtAndContent, g as getDesignatedFallbackChain, b as getDesignatedFallbackConfig, a as isModelAllowed, i as isProviderEnabled, r as runCurriculumAIInference, s as streamCurriculumAIInference } from './streamRunner-BTTzbb-l.js';
|
|
7
7
|
export { ArtifactLintReport, ConvertedSotBundle, GenerateProjectInstructionOptions, GenerateRoadmapCurriculumOptions, GenerateSelfPacedBundleInput, LintIssue, ProjectInstructionResult, RoadmapCurriculumOutput, SelfPacedBundleOutput, convertRoadmapToFoundationSot, generateProjectInstruction, generateRoadmapCurriculum, generateSelfPacedBundle, importRoadmapToProject, lintAndSanitizeArtifact, serializeActivityToMarkdown, serializeCodeLabToMarkdown, serializeDiagnosticQuizToMarkdown, serializeHandoutToMarkdown, serializeLessonToMarkdown, serializeProjectInstructionToMarkdown, serializeSelfLabToMarkdown, validateMarkdownTables, validateMermaidSyntax } from './pipeline/index.js';
|
|
8
8
|
export { A as AutoRepairOptions, a as AutoRepairResult, B as BundleTier, G as GenerateMilestoneBundleOptions, M as MilestoneCurriculumBundle, g as generateMilestoneCurriculumBundle, w as withAutoRepair } from './milestoneBundleGenerator-CbXhs1CP.js';
|
|
9
9
|
import { I as ICurriculumStorage, P as ProjectStatusReport, S as SmartResumeContext, Q as QualityAuditReport } from './types-BUJGYiep.js';
|
package/dist/index.mjs
CHANGED
|
@@ -439,6 +439,32 @@ Guidelines:
|
|
|
439
439
|
3. Keep technical terminology and official API symbols intact.
|
|
440
440
|
4. Format output using clean Markdown, clear sections, bullet points, and code blocks where required.
|
|
441
441
|
5. Do NOT use emojis in headings, tab titles, or UI navigation labels.`;
|
|
442
|
+
if (options.customInference) {
|
|
443
|
+
try {
|
|
444
|
+
const text = await options.customInference({
|
|
445
|
+
systemInstruction,
|
|
446
|
+
userPrompt: messages.map((m) => m.content).join("\n\n"),
|
|
447
|
+
messages,
|
|
448
|
+
temperature,
|
|
449
|
+
maxTokens,
|
|
450
|
+
onChunk: onChunk ?? (() => {
|
|
451
|
+
})
|
|
452
|
+
});
|
|
453
|
+
if (text && text.trim()) return text;
|
|
454
|
+
throw createAiInferenceError({
|
|
455
|
+
errorCode: "ERR_AI_ALL_PROVIDERS_FAILED",
|
|
456
|
+
message: "customInference returned empty output",
|
|
457
|
+
rawError: { customInference: "empty response" }
|
|
458
|
+
});
|
|
459
|
+
} catch (e) {
|
|
460
|
+
if (e?.errorCode || e?.name === "AiInferenceError") throw e;
|
|
461
|
+
throw createAiInferenceError({
|
|
462
|
+
errorCode: "ERR_AI_ALL_PROVIDERS_FAILED",
|
|
463
|
+
message: `customInference failed: ${e?.message || e}`,
|
|
464
|
+
rawError: { customInference: String(e?.message || e) }
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
}
|
|
442
468
|
const formattedMessages = [
|
|
443
469
|
{ role: "system", content: systemInstruction },
|
|
444
470
|
...messages.map((m) => ({
|