@thanh01.pmt/curriculum-kit 1.0.12 → 1.0.13
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/index.cjs +102 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -2
- package/dist/index.d.ts +59 -2
- package/dist/index.mjs +97 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -335,6 +335,10 @@ interface LayerPrefillOptions {
|
|
|
335
335
|
stream?: boolean;
|
|
336
336
|
model?: string;
|
|
337
337
|
provider?: AIProviderName;
|
|
338
|
+
/** Total wall-time budget override for this prefill run (ms). */
|
|
339
|
+
timeoutMs?: number;
|
|
340
|
+
/** Idle (no-data) budget override for this prefill run (ms). */
|
|
341
|
+
idleTimeoutMs?: number;
|
|
338
342
|
}
|
|
339
343
|
interface PreliminaryResearchResult {
|
|
340
344
|
groundTruthSummary: string;
|
|
@@ -351,6 +355,59 @@ interface LayerPrefillResult {
|
|
|
351
355
|
rawText?: string;
|
|
352
356
|
}
|
|
353
357
|
type LayerChunkCallback = (chunk: string, type: 'thought' | 'content') => void;
|
|
358
|
+
/** Budget knobs for a streamed inference (see createStreamAbortSignal). */
|
|
359
|
+
interface StreamBudget {
|
|
360
|
+
/** Abort when no data arrives for this long (ms). 0 disables. */
|
|
361
|
+
idleMs?: number;
|
|
362
|
+
/** Abort when the whole stream exceeds this total wall time (ms). 0 disables. */
|
|
363
|
+
totalMs?: number;
|
|
364
|
+
}
|
|
365
|
+
declare const DEFAULT_STREAM_IDLE_MS = 45000;
|
|
366
|
+
declare const DEFAULT_STREAM_TOTAL_MS = 300000;
|
|
367
|
+
/** Layer-aware total budget: Layer 2 is the largest prefill output (6 fields × options pros/cons). */
|
|
368
|
+
declare const LAYER_TOTAL_BUDGET_MS: Record<number, number>;
|
|
369
|
+
/**
|
|
370
|
+
* Resolve the abort budget for a prefill run. Precedence: explicit options >
|
|
371
|
+
* env (`WIZARD_PREFILL_IDLE_TIMEOUT_MS` / `WIZARD_PREFILL_TOTAL_TIMEOUT_MS`) >
|
|
372
|
+
* layer-aware defaults. Exposed as a pure function for decision-table tests.
|
|
373
|
+
*/
|
|
374
|
+
declare function resolveStreamBudget(layer?: number, opts?: StreamBudget): Required<StreamBudget>;
|
|
375
|
+
/**
|
|
376
|
+
* Abort signal combining an IDLE window with an optional TOTAL cap.
|
|
377
|
+
* RC-W1: `AbortSignal.timeout(60_000)` hard-killed Layer 2 mid-stream even while
|
|
378
|
+
* tokens were flowing (free-tier models think + stream slowly) — the aborted
|
|
379
|
+
* `fullContent` then failed `safeParseJson` (empty or truncated JSON).
|
|
380
|
+
* The idle window only fires when NO data arrives (hung connection), while a
|
|
381
|
+
* generous layer-aware total cap is the safety net.
|
|
382
|
+
*/
|
|
383
|
+
interface StreamAbortHandle {
|
|
384
|
+
signal: AbortSignal;
|
|
385
|
+
/** Reset the idle window — call on EVERY received stream part. */
|
|
386
|
+
kick: () => void;
|
|
387
|
+
/** Clear both timers once the stream lifecycle is over. */
|
|
388
|
+
dispose: () => void;
|
|
389
|
+
}
|
|
390
|
+
/** Chunks extracted from one raw Vercel AI SDK stream part. */
|
|
391
|
+
interface ExtractedStreamChunk {
|
|
392
|
+
/** Reasoning/thinking text to forward via onChunk(chunk, 'thought'). */
|
|
393
|
+
thought?: string;
|
|
394
|
+
/** Content text to forward via onChunk(chunk, 'content') and accumulate. */
|
|
395
|
+
content?: string;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* RC-W2: extract reasoning + content from a Vercel AI SDK fullStream part.
|
|
399
|
+
* Pure function so the extraction contract is unit-testable.
|
|
400
|
+
*
|
|
401
|
+
* Reasoning arrives through provider-specific shapes:
|
|
402
|
+
* - `reasoning-delta` / legacy `reasoning` parts (mapped by SDK providers),
|
|
403
|
+
* - `raw` parts (emitted when `includeRawChunks: true`) whose `rawValue` is the
|
|
404
|
+
* provider's OpenAI-compatible SSE chunk: NVIDIA NIM & DeepSeek put thinking
|
|
405
|
+
* in `choices[0].delta.reasoning_content`, OpenRouter in `choices[0].delta.reasoning`.
|
|
406
|
+
* Without this extraction the entire thinking phase renders as a blank UI
|
|
407
|
+
* (only text-delta reaches the caller) — the observed ~30s silent wait.
|
|
408
|
+
*/
|
|
409
|
+
declare function extractStreamChunk(part: any): ExtractedStreamChunk;
|
|
410
|
+
declare function createStreamAbortSignal(budget: Required<StreamBudget>): StreamAbortHandle;
|
|
354
411
|
/**
|
|
355
412
|
* Robust JSON extraction and repair helper
|
|
356
413
|
*/
|
|
@@ -359,7 +416,7 @@ declare function safeParseJson<T = any>(rawText: string | null): T | null;
|
|
|
359
416
|
/**
|
|
360
417
|
* Multi-tiered resilient streaming inference helper using 100% Vercel AI SDK.
|
|
361
418
|
*/
|
|
362
|
-
declare function streamLLMWithFallback(systemPrompt: string, userPrompt: string, apiKeys?: Record<string, string>, onChunk?: LayerChunkCallback, preferredModel?: string, preferredProvider?: AIProviderName): Promise<string | null>;
|
|
419
|
+
declare function streamLLMWithFallback(systemPrompt: string, userPrompt: string, apiKeys?: Record<string, string>, onChunk?: LayerChunkCallback, preferredModel?: string, preferredProvider?: AIProviderName, budget?: StreamBudget): Promise<string | null>;
|
|
363
420
|
/**
|
|
364
421
|
* Conducts preliminary ecosystem research for a course project.
|
|
365
422
|
*/
|
|
@@ -858,4 +915,4 @@ declare function getSlideLayoutPresetById(id: string): SlideLayoutPreset | undef
|
|
|
858
915
|
*/
|
|
859
916
|
declare function getSlideLayoutPresetsByCategory(category: SlideLayoutCategory): SlideLayoutPreset[];
|
|
860
917
|
|
|
861
|
-
export { ACT_TEMPLATE, AIProviderName, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, ActivityLab, type ArtifactProductionSpec, type AuditBundleInput, BELL_RINGER_TEMPLATE, BLOOM_ACTION_VERBS, BOM_TEMPLATE, BloomTaxonomyEvaluator, type BuildContextOptions, CHOICE_BOARD_TEMPLATE, CODE_LAB_TEMPLATE, CURRICULUM_SLASH_COMMANDS, CodeHardwareFeasibilityEvaluator, CodeLab, type ComprehensiveAcademicReport, ConstructiveAlignmentEvaluator, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DependencyEdge, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, type GenerateExpositionOptions, HANDOUT_TEMPLATE, ICurriculumStorage, LESSON_PLAN_TEMPLATE, type LayerChunkCallback, type LayerPrefillOptions, type LayerPrefillResult, type LayoutBoxConfig, LessonPlan, MisconceptionEvaluator, ModelResolutionOptions, PROJECT_INSTRUCTION_TEMPLATE, type PackingSpec, type PedagogicalModel, type PipelineExecutionProgress, PlanConstraints, type PlanOptions, type PlanResult, type PlannerLlmFn, PlanningGraph, PlanningNode, type PreliminaryResearchResult, type ProduceLessonOptions, type ProduceLessonResult, type ProjectBriefingData, type ProjectClarification, type ProjectCreationPayload, type ProjectIntentAnalysisResult, ProjectStatusReport, type ProjectionMeta, QUIZ_TEMPLATE, QualityAuditReport, REVIEW_GAME_TEMPLATE, RUBRIC_TEMPLATE, ResolvedGateSettings, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STATION_ROTATION_TEMPLATE, type SlashCommandDefinition, SlideDeck, type SlideLayoutCategory, type SlideLayoutData, type SlideLayoutPreset, SmartResumeContext, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TranslationPolicy, type TranslationTarget, type TranslationTrigger, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildExpositionContext, buildSessionSliceContext, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, executeCurriculumCommand, expositionCacheKey, extractScopeSequenceRows, extractSessionSlice, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderFrameworkFromPlan, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, topoSort };
|
|
918
|
+
export { ACT_TEMPLATE, AIProviderName, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, ActivityLab, type ArtifactProductionSpec, type AuditBundleInput, BELL_RINGER_TEMPLATE, BLOOM_ACTION_VERBS, BOM_TEMPLATE, BloomTaxonomyEvaluator, type BuildContextOptions, CHOICE_BOARD_TEMPLATE, CODE_LAB_TEMPLATE, CURRICULUM_SLASH_COMMANDS, CodeHardwareFeasibilityEvaluator, CodeLab, type ComprehensiveAcademicReport, ConstructiveAlignmentEvaluator, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DependencyEdge, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, type GenerateExpositionOptions, HANDOUT_TEMPLATE, ICurriculumStorage, LAYER_TOTAL_BUDGET_MS, LESSON_PLAN_TEMPLATE, type LayerChunkCallback, type LayerPrefillOptions, type LayerPrefillResult, type LayoutBoxConfig, LessonPlan, MisconceptionEvaluator, ModelResolutionOptions, PROJECT_INSTRUCTION_TEMPLATE, type PackingSpec, type PedagogicalModel, type PipelineExecutionProgress, PlanConstraints, type PlanOptions, type PlanResult, type PlannerLlmFn, PlanningGraph, PlanningNode, type PreliminaryResearchResult, type ProduceLessonOptions, type ProduceLessonResult, type ProjectBriefingData, type ProjectClarification, type ProjectCreationPayload, type ProjectIntentAnalysisResult, ProjectStatusReport, type ProjectionMeta, QUIZ_TEMPLATE, QualityAuditReport, REVIEW_GAME_TEMPLATE, RUBRIC_TEMPLATE, ResolvedGateSettings, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STATION_ROTATION_TEMPLATE, type SlashCommandDefinition, SlideDeck, type SlideLayoutCategory, type SlideLayoutData, type SlideLayoutPreset, SmartResumeContext, type StreamAbortHandle, type StreamBudget, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TranslationPolicy, type TranslationTarget, type TranslationTrigger, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildExpositionContext, buildSessionSliceContext, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createStreamAbortSignal, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, executeCurriculumCommand, expositionCacheKey, extractScopeSequenceRows, extractSessionSlice, extractStreamChunk, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderFrameworkFromPlan, resolveStreamBudget, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, topoSort };
|
package/dist/index.d.ts
CHANGED
|
@@ -335,6 +335,10 @@ interface LayerPrefillOptions {
|
|
|
335
335
|
stream?: boolean;
|
|
336
336
|
model?: string;
|
|
337
337
|
provider?: AIProviderName;
|
|
338
|
+
/** Total wall-time budget override for this prefill run (ms). */
|
|
339
|
+
timeoutMs?: number;
|
|
340
|
+
/** Idle (no-data) budget override for this prefill run (ms). */
|
|
341
|
+
idleTimeoutMs?: number;
|
|
338
342
|
}
|
|
339
343
|
interface PreliminaryResearchResult {
|
|
340
344
|
groundTruthSummary: string;
|
|
@@ -351,6 +355,59 @@ interface LayerPrefillResult {
|
|
|
351
355
|
rawText?: string;
|
|
352
356
|
}
|
|
353
357
|
type LayerChunkCallback = (chunk: string, type: 'thought' | 'content') => void;
|
|
358
|
+
/** Budget knobs for a streamed inference (see createStreamAbortSignal). */
|
|
359
|
+
interface StreamBudget {
|
|
360
|
+
/** Abort when no data arrives for this long (ms). 0 disables. */
|
|
361
|
+
idleMs?: number;
|
|
362
|
+
/** Abort when the whole stream exceeds this total wall time (ms). 0 disables. */
|
|
363
|
+
totalMs?: number;
|
|
364
|
+
}
|
|
365
|
+
declare const DEFAULT_STREAM_IDLE_MS = 45000;
|
|
366
|
+
declare const DEFAULT_STREAM_TOTAL_MS = 300000;
|
|
367
|
+
/** Layer-aware total budget: Layer 2 is the largest prefill output (6 fields × options pros/cons). */
|
|
368
|
+
declare const LAYER_TOTAL_BUDGET_MS: Record<number, number>;
|
|
369
|
+
/**
|
|
370
|
+
* Resolve the abort budget for a prefill run. Precedence: explicit options >
|
|
371
|
+
* env (`WIZARD_PREFILL_IDLE_TIMEOUT_MS` / `WIZARD_PREFILL_TOTAL_TIMEOUT_MS`) >
|
|
372
|
+
* layer-aware defaults. Exposed as a pure function for decision-table tests.
|
|
373
|
+
*/
|
|
374
|
+
declare function resolveStreamBudget(layer?: number, opts?: StreamBudget): Required<StreamBudget>;
|
|
375
|
+
/**
|
|
376
|
+
* Abort signal combining an IDLE window with an optional TOTAL cap.
|
|
377
|
+
* RC-W1: `AbortSignal.timeout(60_000)` hard-killed Layer 2 mid-stream even while
|
|
378
|
+
* tokens were flowing (free-tier models think + stream slowly) — the aborted
|
|
379
|
+
* `fullContent` then failed `safeParseJson` (empty or truncated JSON).
|
|
380
|
+
* The idle window only fires when NO data arrives (hung connection), while a
|
|
381
|
+
* generous layer-aware total cap is the safety net.
|
|
382
|
+
*/
|
|
383
|
+
interface StreamAbortHandle {
|
|
384
|
+
signal: AbortSignal;
|
|
385
|
+
/** Reset the idle window — call on EVERY received stream part. */
|
|
386
|
+
kick: () => void;
|
|
387
|
+
/** Clear both timers once the stream lifecycle is over. */
|
|
388
|
+
dispose: () => void;
|
|
389
|
+
}
|
|
390
|
+
/** Chunks extracted from one raw Vercel AI SDK stream part. */
|
|
391
|
+
interface ExtractedStreamChunk {
|
|
392
|
+
/** Reasoning/thinking text to forward via onChunk(chunk, 'thought'). */
|
|
393
|
+
thought?: string;
|
|
394
|
+
/** Content text to forward via onChunk(chunk, 'content') and accumulate. */
|
|
395
|
+
content?: string;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* RC-W2: extract reasoning + content from a Vercel AI SDK fullStream part.
|
|
399
|
+
* Pure function so the extraction contract is unit-testable.
|
|
400
|
+
*
|
|
401
|
+
* Reasoning arrives through provider-specific shapes:
|
|
402
|
+
* - `reasoning-delta` / legacy `reasoning` parts (mapped by SDK providers),
|
|
403
|
+
* - `raw` parts (emitted when `includeRawChunks: true`) whose `rawValue` is the
|
|
404
|
+
* provider's OpenAI-compatible SSE chunk: NVIDIA NIM & DeepSeek put thinking
|
|
405
|
+
* in `choices[0].delta.reasoning_content`, OpenRouter in `choices[0].delta.reasoning`.
|
|
406
|
+
* Without this extraction the entire thinking phase renders as a blank UI
|
|
407
|
+
* (only text-delta reaches the caller) — the observed ~30s silent wait.
|
|
408
|
+
*/
|
|
409
|
+
declare function extractStreamChunk(part: any): ExtractedStreamChunk;
|
|
410
|
+
declare function createStreamAbortSignal(budget: Required<StreamBudget>): StreamAbortHandle;
|
|
354
411
|
/**
|
|
355
412
|
* Robust JSON extraction and repair helper
|
|
356
413
|
*/
|
|
@@ -359,7 +416,7 @@ declare function safeParseJson<T = any>(rawText: string | null): T | null;
|
|
|
359
416
|
/**
|
|
360
417
|
* Multi-tiered resilient streaming inference helper using 100% Vercel AI SDK.
|
|
361
418
|
*/
|
|
362
|
-
declare function streamLLMWithFallback(systemPrompt: string, userPrompt: string, apiKeys?: Record<string, string>, onChunk?: LayerChunkCallback, preferredModel?: string, preferredProvider?: AIProviderName): Promise<string | null>;
|
|
419
|
+
declare function streamLLMWithFallback(systemPrompt: string, userPrompt: string, apiKeys?: Record<string, string>, onChunk?: LayerChunkCallback, preferredModel?: string, preferredProvider?: AIProviderName, budget?: StreamBudget): Promise<string | null>;
|
|
363
420
|
/**
|
|
364
421
|
* Conducts preliminary ecosystem research for a course project.
|
|
365
422
|
*/
|
|
@@ -858,4 +915,4 @@ declare function getSlideLayoutPresetById(id: string): SlideLayoutPreset | undef
|
|
|
858
915
|
*/
|
|
859
916
|
declare function getSlideLayoutPresetsByCategory(category: SlideLayoutCategory): SlideLayoutPreset[];
|
|
860
917
|
|
|
861
|
-
export { ACT_TEMPLATE, AIProviderName, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, ActivityLab, type ArtifactProductionSpec, type AuditBundleInput, BELL_RINGER_TEMPLATE, BLOOM_ACTION_VERBS, BOM_TEMPLATE, BloomTaxonomyEvaluator, type BuildContextOptions, CHOICE_BOARD_TEMPLATE, CODE_LAB_TEMPLATE, CURRICULUM_SLASH_COMMANDS, CodeHardwareFeasibilityEvaluator, CodeLab, type ComprehensiveAcademicReport, ConstructiveAlignmentEvaluator, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DependencyEdge, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, type GenerateExpositionOptions, HANDOUT_TEMPLATE, ICurriculumStorage, LESSON_PLAN_TEMPLATE, type LayerChunkCallback, type LayerPrefillOptions, type LayerPrefillResult, type LayoutBoxConfig, LessonPlan, MisconceptionEvaluator, ModelResolutionOptions, PROJECT_INSTRUCTION_TEMPLATE, type PackingSpec, type PedagogicalModel, type PipelineExecutionProgress, PlanConstraints, type PlanOptions, type PlanResult, type PlannerLlmFn, PlanningGraph, PlanningNode, type PreliminaryResearchResult, type ProduceLessonOptions, type ProduceLessonResult, type ProjectBriefingData, type ProjectClarification, type ProjectCreationPayload, type ProjectIntentAnalysisResult, ProjectStatusReport, type ProjectionMeta, QUIZ_TEMPLATE, QualityAuditReport, REVIEW_GAME_TEMPLATE, RUBRIC_TEMPLATE, ResolvedGateSettings, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STATION_ROTATION_TEMPLATE, type SlashCommandDefinition, SlideDeck, type SlideLayoutCategory, type SlideLayoutData, type SlideLayoutPreset, SmartResumeContext, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TranslationPolicy, type TranslationTarget, type TranslationTrigger, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildExpositionContext, buildSessionSliceContext, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, executeCurriculumCommand, expositionCacheKey, extractScopeSequenceRows, extractSessionSlice, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderFrameworkFromPlan, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, topoSort };
|
|
918
|
+
export { ACT_TEMPLATE, AIProviderName, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, ActivityLab, type ArtifactProductionSpec, type AuditBundleInput, BELL_RINGER_TEMPLATE, BLOOM_ACTION_VERBS, BOM_TEMPLATE, BloomTaxonomyEvaluator, type BuildContextOptions, CHOICE_BOARD_TEMPLATE, CODE_LAB_TEMPLATE, CURRICULUM_SLASH_COMMANDS, CodeHardwareFeasibilityEvaluator, CodeLab, type ComprehensiveAcademicReport, ConstructiveAlignmentEvaluator, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DependencyEdge, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, type GenerateExpositionOptions, HANDOUT_TEMPLATE, ICurriculumStorage, LAYER_TOTAL_BUDGET_MS, LESSON_PLAN_TEMPLATE, type LayerChunkCallback, type LayerPrefillOptions, type LayerPrefillResult, type LayoutBoxConfig, LessonPlan, MisconceptionEvaluator, ModelResolutionOptions, PROJECT_INSTRUCTION_TEMPLATE, type PackingSpec, type PedagogicalModel, type PipelineExecutionProgress, PlanConstraints, type PlanOptions, type PlanResult, type PlannerLlmFn, PlanningGraph, PlanningNode, type PreliminaryResearchResult, type ProduceLessonOptions, type ProduceLessonResult, type ProjectBriefingData, type ProjectClarification, type ProjectCreationPayload, type ProjectIntentAnalysisResult, ProjectStatusReport, type ProjectionMeta, QUIZ_TEMPLATE, QualityAuditReport, REVIEW_GAME_TEMPLATE, RUBRIC_TEMPLATE, ResolvedGateSettings, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STATION_ROTATION_TEMPLATE, type SlashCommandDefinition, SlideDeck, type SlideLayoutCategory, type SlideLayoutData, type SlideLayoutPreset, SmartResumeContext, type StreamAbortHandle, type StreamBudget, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TranslationPolicy, type TranslationTarget, type TranslationTrigger, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildExpositionContext, buildSessionSliceContext, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createStreamAbortSignal, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, executeCurriculumCommand, expositionCacheKey, extractScopeSequenceRows, extractSessionSlice, extractStreamChunk, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderFrameworkFromPlan, resolveStreamBudget, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, topoSort };
|
package/dist/index.mjs
CHANGED
|
@@ -13514,6 +13514,78 @@ var DeterministicPipelineRunner = class {
|
|
|
13514
13514
|
|
|
13515
13515
|
// src/services/prefillService.ts
|
|
13516
13516
|
init_streamRunner();
|
|
13517
|
+
var DEFAULT_STREAM_IDLE_MS = 45e3;
|
|
13518
|
+
var DEFAULT_STREAM_TOTAL_MS = 3e5;
|
|
13519
|
+
var LAYER_TOTAL_BUDGET_MS = {
|
|
13520
|
+
1: 18e4,
|
|
13521
|
+
2: 36e4,
|
|
13522
|
+
3: 36e4
|
|
13523
|
+
};
|
|
13524
|
+
function resolveStreamBudget(layer, opts) {
|
|
13525
|
+
const envIdle = Number(process.env.WIZARD_PREFILL_IDLE_TIMEOUT_MS);
|
|
13526
|
+
const envTotal = Number(process.env.WIZARD_PREFILL_TOTAL_TIMEOUT_MS);
|
|
13527
|
+
const layerTotal = layer !== void 0 ? LAYER_TOTAL_BUDGET_MS[layer] : void 0;
|
|
13528
|
+
return {
|
|
13529
|
+
idleMs: opts?.idleMs ?? (Number.isFinite(envIdle) && envIdle > 0 ? envIdle : DEFAULT_STREAM_IDLE_MS),
|
|
13530
|
+
totalMs: opts?.totalMs ?? (Number.isFinite(envTotal) && envTotal > 0 ? envTotal : layerTotal ?? DEFAULT_STREAM_TOTAL_MS)
|
|
13531
|
+
};
|
|
13532
|
+
}
|
|
13533
|
+
function extractStreamChunk(part) {
|
|
13534
|
+
if (!part || typeof part !== "object") return {};
|
|
13535
|
+
if (part.type === "reasoning-delta" || part.type === "reasoning") {
|
|
13536
|
+
const thought = part.text ?? part.delta ?? part.reasoning ?? "";
|
|
13537
|
+
return thought ? { thought } : {};
|
|
13538
|
+
}
|
|
13539
|
+
if (part.type === "text-delta") {
|
|
13540
|
+
const content = part.text ?? part.delta ?? "";
|
|
13541
|
+
return content ? { content } : {};
|
|
13542
|
+
}
|
|
13543
|
+
if (part.type === "raw") {
|
|
13544
|
+
const raw = part.rawValue;
|
|
13545
|
+
const delta = raw?.choices?.[0]?.delta;
|
|
13546
|
+
const reasoning = delta?.reasoning_content ?? delta?.reasoning ?? raw?.delta?.reasoning_content ?? raw?.delta?.reasoning;
|
|
13547
|
+
if (typeof reasoning === "string" && reasoning) return { thought: reasoning };
|
|
13548
|
+
const text = delta?.content ?? raw?.delta?.content;
|
|
13549
|
+
if (typeof text === "string" && text) return { content: text };
|
|
13550
|
+
return {};
|
|
13551
|
+
}
|
|
13552
|
+
return {};
|
|
13553
|
+
}
|
|
13554
|
+
function createStreamAbortSignal(budget) {
|
|
13555
|
+
const controller = new AbortController();
|
|
13556
|
+
let idleTimer = null;
|
|
13557
|
+
let totalTimer = null;
|
|
13558
|
+
const armIdle = () => {
|
|
13559
|
+
if (idleTimer) clearTimeout(idleTimer);
|
|
13560
|
+
if (budget.idleMs > 0) {
|
|
13561
|
+
idleTimer = setTimeout(
|
|
13562
|
+
() => controller.abort(new Error(`Idle timeout: no data for ${Math.round(budget.idleMs / 1e3)}s`)),
|
|
13563
|
+
budget.idleMs
|
|
13564
|
+
);
|
|
13565
|
+
idleTimer?.unref?.();
|
|
13566
|
+
}
|
|
13567
|
+
};
|
|
13568
|
+
armIdle();
|
|
13569
|
+
if (budget.totalMs > 0) {
|
|
13570
|
+
totalTimer = setTimeout(
|
|
13571
|
+
() => controller.abort(new Error(`Total stream timeout after ${Math.round(budget.totalMs / 1e3)}s`)),
|
|
13572
|
+
budget.totalMs
|
|
13573
|
+
);
|
|
13574
|
+
totalTimer?.unref?.();
|
|
13575
|
+
}
|
|
13576
|
+
return {
|
|
13577
|
+
signal: controller.signal,
|
|
13578
|
+
/** Reset the idle window — call on EVERY received stream part. */
|
|
13579
|
+
kick: armIdle,
|
|
13580
|
+
/** Clear both timers once the stream lifecycle is over. */
|
|
13581
|
+
dispose: () => {
|
|
13582
|
+
if (idleTimer) clearTimeout(idleTimer);
|
|
13583
|
+
if (totalTimer) clearTimeout(totalTimer);
|
|
13584
|
+
idleTimer = null;
|
|
13585
|
+
totalTimer = null;
|
|
13586
|
+
}
|
|
13587
|
+
};
|
|
13588
|
+
}
|
|
13517
13589
|
function safeParseJson(rawText) {
|
|
13518
13590
|
if (!rawText) return null;
|
|
13519
13591
|
const cleaned = rawText.replace(/```json\s*/gi, "").replace(/```\s*/g, "").trim();
|
|
@@ -13538,7 +13610,7 @@ function safeParseJson(rawText) {
|
|
|
13538
13610
|
return null;
|
|
13539
13611
|
}
|
|
13540
13612
|
}
|
|
13541
|
-
async function streamLLMWithFallback(systemPrompt, userPrompt, apiKeys = {}, onChunk, preferredModel, preferredProvider) {
|
|
13613
|
+
async function streamLLMWithFallback(systemPrompt, userPrompt, apiKeys = {}, onChunk, preferredModel, preferredProvider, budget) {
|
|
13542
13614
|
const alibabaKey = apiKeys.alibaba || apiKeys.dashscope || process.env.ALIBABA_API_KEY || process.env.DASHSCOPE_API_KEY;
|
|
13543
13615
|
const nvidiaKey = apiKeys.nvidia || process.env.NVIDIA_API_KEY;
|
|
13544
13616
|
const deepseekKey = apiKeys.deepseek || process.env.DEEPSEEK_API_KEY;
|
|
@@ -13616,8 +13688,13 @@ async function streamLLMWithFallback(systemPrompt, userPrompt, apiKeys = {}, onC
|
|
|
13616
13688
|
const systemInstructions = `${systemPrompt}
|
|
13617
13689
|
|
|
13618
13690
|
THINKING DIRECTIVE: Keep reasoning concise, structured, and focused strictly on the core pedagogical trade-offs in 4-6 concise bullet points (under 120 words). Then output the JSON immediately.`;
|
|
13691
|
+
const resolvedBudget = {
|
|
13692
|
+
idleMs: budget?.idleMs ?? DEFAULT_STREAM_IDLE_MS,
|
|
13693
|
+
totalMs: budget?.totalMs ?? DEFAULT_STREAM_TOTAL_MS
|
|
13694
|
+
};
|
|
13619
13695
|
for (const candidate of candidates) {
|
|
13620
13696
|
const t0 = Date.now();
|
|
13697
|
+
const abort = createStreamAbortSignal(resolvedBudget);
|
|
13621
13698
|
try {
|
|
13622
13699
|
const modelInstance = getAIModel({
|
|
13623
13700
|
provider: candidate.provider,
|
|
@@ -13630,26 +13707,16 @@ THINKING DIRECTIVE: Keep reasoning concise, structured, and focused strictly on
|
|
|
13630
13707
|
prompt: userPrompt,
|
|
13631
13708
|
temperature: 0.2,
|
|
13632
13709
|
includeRawChunks: true,
|
|
13633
|
-
abortSignal:
|
|
13710
|
+
abortSignal: abort.signal
|
|
13634
13711
|
});
|
|
13635
13712
|
let fullContent = "";
|
|
13636
13713
|
for await (const part of streamResult.fullStream) {
|
|
13637
|
-
|
|
13638
|
-
|
|
13639
|
-
|
|
13640
|
-
|
|
13641
|
-
|
|
13642
|
-
|
|
13643
|
-
const reasoning = delta?.reasoning_content || delta?.reasoning;
|
|
13644
|
-
if (reasoning) {
|
|
13645
|
-
onChunk?.(reasoning, "thought");
|
|
13646
|
-
}
|
|
13647
|
-
} else if (part.type === "text-delta") {
|
|
13648
|
-
const textDelta = part.text ?? part.delta ?? "";
|
|
13649
|
-
if (textDelta) {
|
|
13650
|
-
fullContent += textDelta;
|
|
13651
|
-
onChunk?.(textDelta, "content");
|
|
13652
|
-
}
|
|
13714
|
+
abort.kick();
|
|
13715
|
+
const extracted = extractStreamChunk(part);
|
|
13716
|
+
if (extracted.thought) onChunk?.(extracted.thought, "thought");
|
|
13717
|
+
if (extracted.content) {
|
|
13718
|
+
fullContent += extracted.content;
|
|
13719
|
+
onChunk?.(extracted.content, "content");
|
|
13653
13720
|
}
|
|
13654
13721
|
}
|
|
13655
13722
|
if (fullContent.trim()) {
|
|
@@ -13658,6 +13725,8 @@ THINKING DIRECTIVE: Keep reasoning concise, structured, and focused strictly on
|
|
|
13658
13725
|
}
|
|
13659
13726
|
} catch (e) {
|
|
13660
13727
|
console.warn(`[curriculum-kit:VercelAI] Candidate ${candidate.provider} (${candidate.model}) failed in ${Date.now() - t0}ms:`, e?.message || e);
|
|
13728
|
+
} finally {
|
|
13729
|
+
abort.dispose();
|
|
13661
13730
|
}
|
|
13662
13731
|
}
|
|
13663
13732
|
return null;
|
|
@@ -13698,7 +13767,11 @@ Return concise JSON matching:
|
|
|
13698
13767
|
(chunk, type) => {
|
|
13699
13768
|
if (type === "content") rawContent += chunk;
|
|
13700
13769
|
onChunk?.(chunk, type);
|
|
13701
|
-
}
|
|
13770
|
+
},
|
|
13771
|
+
options.model,
|
|
13772
|
+
options.provider,
|
|
13773
|
+
// Research may run live web grounding — generous budget, still idle-guarded.
|
|
13774
|
+
resolveStreamBudget(void 0, { idleMs: options.idleTimeoutMs, totalMs: options.timeoutMs })
|
|
13702
13775
|
);
|
|
13703
13776
|
let parsedResearch = {
|
|
13704
13777
|
groundTruthSummary: `Verified ecosystem standards for ${projectName}`,
|
|
@@ -13900,7 +13973,10 @@ REQUIREMENT: Synthesize ALL parameters above \u2014 every single line in FULL AC
|
|
|
13900
13973
|
onChunk?.(chunk, type);
|
|
13901
13974
|
},
|
|
13902
13975
|
options.model,
|
|
13903
|
-
options.provider
|
|
13976
|
+
options.provider,
|
|
13977
|
+
// RC-W1: layer-aware budget — Layer 2 has the largest output and free-tier
|
|
13978
|
+
// models may think/stream for minutes. Idle window still catches hangs.
|
|
13979
|
+
resolveStreamBudget(targetLayer, { idleMs: options.idleTimeoutMs, totalMs: options.timeoutMs })
|
|
13904
13980
|
);
|
|
13905
13981
|
const parsed = safeParseJson(rawContent);
|
|
13906
13982
|
return {
|
|
@@ -17134,6 +17210,6 @@ function renderMediaPlaceholder(entry) {
|
|
|
17134
17210
|
return `> \u{1F5BC}\uFE0F [\u1EA2nh \u0111ang ch\u1EDD: ${entry.name} \u2014 s\u1EBD \u0111\u01B0\u1EE3c t\u1EA1o sau khi duy\u1EC7t media]`;
|
|
17135
17211
|
}
|
|
17136
17212
|
|
|
17137
|
-
export { ACT_TEMPLATE, ARTIFACT_EXECUTION_ORDER, AcademicAuditor, ActiveLearningWorkflowSchema, ActivityLabSchema, ActivitySeqRowSchema, ActivityStepSchema, ArtifactContractRowSchema, AssessmentMapRowSchema, AssessmentObjectiveSchema, BELL_RINGER_TEMPLATE, BLOOM_ACTION_VERBS, BOM_TEMPLATE, BUNDLED_STANDARDS_PACK_IDS, BellRingerDaySchema, BellRingerSchema, BloomHintSchema, BloomLevelSchema, BloomTaxonomyEvaluator, BronzeTierSchema, CERConclusionSchema, CHOICE_BOARD_TEMPLATE, CODE_LAB_TEMPLATE, CURRICULUM_SLASH_COMMANDS, CardTierEnum, ChoiceBoardRubricRowSchema, ChoiceBoardSchema, ChoiceRuleSchema, ChoiceSquareSchema, ClassificationSchema, CodeHardwareFeasibilityEvaluator, CodeLabSchema, CodeSnippetSchema, CompetencyRubricRowSchema, ComputationalThinkingSchema, ConstructiveAlignmentEvaluator, CoreConceptSchema, CourseObjectiveSchema, CoverageReportSchema, CrossArtifactDriftEvaluator, CurriculumArtifactSchema, CurriculumError, CurriculumPlanSchema, CurriculumQualityReportSchema, DEFAULT_ENABLED_PROVIDERS, DEFAULT_GATE_SETTINGS, DependencyEdgeSchema, DepthAssignmentSchema, DepthLevelSchema, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuestionSchema, DiagnosticQuizSchema, EDPPhaseEnum, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, EntryLevelSchema, ExitTicketBugHuntSchema, ExitTicketMetacognitionSchema, ExitTicketQuickItemSchema, ExitTicketRecallPromptSchema, ExitTicketSchema, ExperimentalDesignSchema, ExpositionApprovalError, ExtensionChallengeSchema, ExtensionSchema, FileSystemCurriculumAdapter, FiveEFlowPhaseSchema, FiveEInstructionalEvaluator, FiveEPhaseEnum, FrameworkMappingSchema, FrameworkPackManifestSchema, FrameworkPackSchema, FrameworkStatementSchema, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, GlossaryQuickRefRowSchema, GlossarySchema, GlossaryTermSchema, GoldTierSchema, GradeBandSchema, GraphicOrganizerItemSchema, GraphicOrganizerSchema, HANDOUT_TEMPLATE, HandoutSchema, HandoutSectionSchema, InstructionSectionSchema, InstructionStepSchema, JudgeCriterionSchema, LESSON_PLAN_TEMPLATE, LLMJudgeEngine, LabTierTaskSchema, LearningObjectiveInputSchema, LearningObjectiveRowSchema, LessonFlowPhaseSchema, LessonPlan5ESchema, LessonPlanEDPSchema, LessonPlanSchema, LessonSectionSchema, LocalWorkspaceManager, MappingKindSchema, MarpSlideSchema, MediaError, MediaLedger, MentorCheatsheetSchema, MilestoneInputSchema, MisconceptionEvaluator, MisconceptionSchema, ModelPolicyResolver, NVIDIA_MODELS, NodeKindSchema, OrganizerTypeEnum, PROJECT_INSTRUCTION_TEMPLATE, PhaseInputSchema, PlanConstraintsSchema, PlannerInputSchema, PlanningGraphSchema, PlanningNodeSchema, PrerequisiteDecisionEntrySchema, PrerequisiteDecisionSchema, ProductGoalSchema, ProgressiveHintsSchema, ProjectGraphSchema, ProjectInstructionSchema, ProjectProfileSchema, QUIZ_TEMPLATE, QualityAuditVerdictSchema, QuizOptionSchema, REVIEW_GAME_TEMPLATE, RUBRIC_TEMPLATE, RecordProvenanceSchema, ResourceMapRowSchema, ReviewGameExportRowSchema, ReviewGameQuestionSchema, ReviewGameSchema, RoadmapInputSchema, RotationStationSchema, RubricCriteriaSchema, RubricSchema, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STANDARD_SOT_FILES, STATION_ROTATION_TEMPLATE, ScaffoldDecisionEntrySchema, ScaffoldDecisionSchema, ScienceLabSchema, ScoringRubricRowSchema, SelfLabSchema, SelfPacedBundleSchema, SelfPacedChallengeSchema, SessionPlanSchema, SilverTierSchema, SlideDeckSchema, StandardizedTermRowSchema, StandardsRegistryAdapter, StationRecordRowSchema, StationRotationSchema, StationTypeEnum, SupabaseCurriculumAdapter, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TaskCardSchema, TaskCardsSchema, TeacherGuideSchema, TeachingScriptPhaseSchema, TierLevelEnum, TierObjectiveSchema, TieredPracticeSchema, TranslationPolicySchema, TroubleshootingEntrySchema, TroubleshootingRowSchema, UnitPlanSchema, UserJourneySchema, WORKSHEET_TEMPLATE, WorksheetItemSchema, WorksheetItemTypeEnum, WorksheetPartSchema, WorksheetSchema, activityTools, analystTools, analyzeProjectCreationIntent, approvalHookToken, approvalPayloadSchema, assertAcyclic, assessorTools, auditCurriculumQualityFlow, auditQualityReport, buildActivityPrompt, buildCodeLabPrompt, buildCurriculumContext, buildCurriculumPlan, buildDeliveryPackages, buildDiagnosticQuizPrompt, buildExpositionContext, buildExtensionPrompt, buildHandoutPrompt, buildImagePrompt, buildJudgePrompt, buildLessonMasterPrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSessionSliceContext, buildSlidesPrompt, buildStandardStackMarkdown, buildStandardsContext, buildStandardsContextBlock, buildTeacherGuidePrompt, buildWorksheetPrompt, computeContentHash, computePackingSpec, conductPreliminaryResearch, contentTools, convertRoadmapToFoundationSot, createAiInferenceError, createCurriculumStorage, curateMediaLedger, designerTools, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, evaluateStandardsCoverage, executeCurriculumCommand, executeSingleArtifactStep, exportAllProjectQuizzes, expositionCacheKey, extractScopeSequenceRows, extractSessionSlice, extractThoughtAndContent, formatQuizzesToCsv, fulfillMediaLedger, gateModeFor, generateActivityFlow, generateActivityStep, generateCodeLabFlow, generateCodeLabStep, generateDiagnosticQuizFlow, generateDiagnosticQuizStep, generateEducationalImage, generateExtensionFlow, generateExtensionStep, generateHandoutFlow, generateHandoutStep, generateLessonMasterFlow, generateMasterLessonStep, generateMilestoneCurriculumBundle, generateMilestoneWorkflow, generatePhase1SotArtifacts, generatePhase2SotArtifacts, generateProjectInstruction, generateProjectInstructionFlow, generateRoadmapCurriculum, generateRoadmapWorkflow, generateSelfLabFlow, generateSelfLabStep, generateSelfPacedBundle, generateSingleArtifact, generateSingleArtifactWorkflow, generateSlidesFlow, generateSlidesStep, generateTeacherGuideFlow, generateTeacherGuideStep, generateWorksheetFlow, generateWorksheetStep, getAIModel, getArtifactMetadata, getDesignatedFallbackChain, getDesignatedFallbackConfig, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, illustratorTools, importRoadmapToProject, ingestProjectGraphIntoProject, initializeProjectInStorage, injectMediaIntoMarkdown, isExpositionFresh, isModelAllowed, isProviderEnabled, isTranslationDue, judgeMasterLessonStep, judgeSatelliteStep, lessonApprovalHook, lintAndSanitizeArtifact, lintCurriculumFramework, lintFrameworkPack, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, packagerTools, parseGateSettings, parseQuizMarkdown, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, publishToGitHub, publishToGitStep, publishToSupabase, publishToSupabaseStep, rankGenCandidates, renderFrameworkFromPlan, renderMediaPlaceholder, repairMasterLessonStep, researcherTools, resolveGateSettings, resolveStandardsPacks, resolveTranslationTargets, reviewerTools, runCurriculumAIInference, safeParseJson, saveMilestoneToWorkspaceStep, searchEducationalImages, searchEducationalVideos, selectStatementsForLesson, serializeActivityToMarkdown, serializeCodeLabToMarkdown, serializeDiagnosticQuizToMarkdown, serializeHandoutToMarkdown, serializeLessonToMarkdown, serializeProjectInstructionToMarkdown, serializeSelfLabToMarkdown, slugifyProjectName, streamCurriculumAIInference, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLLMWithFallback, streamLayerPrefillWithFallback, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools, topoSort, uploadAssetToBucket, validateCurriculumPlan, validateFrameworkPack, validateMarkdownTables, validateMermaidSyntax, withAutoRepair, withRateLimitBackoff };
|
|
17213
|
+
export { ACT_TEMPLATE, ARTIFACT_EXECUTION_ORDER, AcademicAuditor, ActiveLearningWorkflowSchema, ActivityLabSchema, ActivitySeqRowSchema, ActivityStepSchema, ArtifactContractRowSchema, AssessmentMapRowSchema, AssessmentObjectiveSchema, BELL_RINGER_TEMPLATE, BLOOM_ACTION_VERBS, BOM_TEMPLATE, BUNDLED_STANDARDS_PACK_IDS, BellRingerDaySchema, BellRingerSchema, BloomHintSchema, BloomLevelSchema, BloomTaxonomyEvaluator, BronzeTierSchema, CERConclusionSchema, CHOICE_BOARD_TEMPLATE, CODE_LAB_TEMPLATE, CURRICULUM_SLASH_COMMANDS, CardTierEnum, ChoiceBoardRubricRowSchema, ChoiceBoardSchema, ChoiceRuleSchema, ChoiceSquareSchema, ClassificationSchema, CodeHardwareFeasibilityEvaluator, CodeLabSchema, CodeSnippetSchema, CompetencyRubricRowSchema, ComputationalThinkingSchema, ConstructiveAlignmentEvaluator, CoreConceptSchema, CourseObjectiveSchema, CoverageReportSchema, CrossArtifactDriftEvaluator, CurriculumArtifactSchema, CurriculumError, CurriculumPlanSchema, CurriculumQualityReportSchema, DEFAULT_ENABLED_PROVIDERS, DEFAULT_GATE_SETTINGS, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DependencyEdgeSchema, DepthAssignmentSchema, DepthLevelSchema, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuestionSchema, DiagnosticQuizSchema, EDPPhaseEnum, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, EntryLevelSchema, ExitTicketBugHuntSchema, ExitTicketMetacognitionSchema, ExitTicketQuickItemSchema, ExitTicketRecallPromptSchema, ExitTicketSchema, ExperimentalDesignSchema, ExpositionApprovalError, ExtensionChallengeSchema, ExtensionSchema, FileSystemCurriculumAdapter, FiveEFlowPhaseSchema, FiveEInstructionalEvaluator, FiveEPhaseEnum, FrameworkMappingSchema, FrameworkPackManifestSchema, FrameworkPackSchema, FrameworkStatementSchema, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, GlossaryQuickRefRowSchema, GlossarySchema, GlossaryTermSchema, GoldTierSchema, GradeBandSchema, GraphicOrganizerItemSchema, GraphicOrganizerSchema, HANDOUT_TEMPLATE, HandoutSchema, HandoutSectionSchema, InstructionSectionSchema, InstructionStepSchema, JudgeCriterionSchema, LAYER_TOTAL_BUDGET_MS, LESSON_PLAN_TEMPLATE, LLMJudgeEngine, LabTierTaskSchema, LearningObjectiveInputSchema, LearningObjectiveRowSchema, LessonFlowPhaseSchema, LessonPlan5ESchema, LessonPlanEDPSchema, LessonPlanSchema, LessonSectionSchema, LocalWorkspaceManager, MappingKindSchema, MarpSlideSchema, MediaError, MediaLedger, MentorCheatsheetSchema, MilestoneInputSchema, MisconceptionEvaluator, MisconceptionSchema, ModelPolicyResolver, NVIDIA_MODELS, NodeKindSchema, OrganizerTypeEnum, PROJECT_INSTRUCTION_TEMPLATE, PhaseInputSchema, PlanConstraintsSchema, PlannerInputSchema, PlanningGraphSchema, PlanningNodeSchema, PrerequisiteDecisionEntrySchema, PrerequisiteDecisionSchema, ProductGoalSchema, ProgressiveHintsSchema, ProjectGraphSchema, ProjectInstructionSchema, ProjectProfileSchema, QUIZ_TEMPLATE, QualityAuditVerdictSchema, QuizOptionSchema, REVIEW_GAME_TEMPLATE, RUBRIC_TEMPLATE, RecordProvenanceSchema, ResourceMapRowSchema, ReviewGameExportRowSchema, ReviewGameQuestionSchema, ReviewGameSchema, RoadmapInputSchema, RotationStationSchema, RubricCriteriaSchema, RubricSchema, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STANDARD_SOT_FILES, STATION_ROTATION_TEMPLATE, ScaffoldDecisionEntrySchema, ScaffoldDecisionSchema, ScienceLabSchema, ScoringRubricRowSchema, SelfLabSchema, SelfPacedBundleSchema, SelfPacedChallengeSchema, SessionPlanSchema, SilverTierSchema, SlideDeckSchema, StandardizedTermRowSchema, StandardsRegistryAdapter, StationRecordRowSchema, StationRotationSchema, StationTypeEnum, SupabaseCurriculumAdapter, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TaskCardSchema, TaskCardsSchema, TeacherGuideSchema, TeachingScriptPhaseSchema, TierLevelEnum, TierObjectiveSchema, TieredPracticeSchema, TranslationPolicySchema, TroubleshootingEntrySchema, TroubleshootingRowSchema, UnitPlanSchema, UserJourneySchema, WORKSHEET_TEMPLATE, WorksheetItemSchema, WorksheetItemTypeEnum, WorksheetPartSchema, WorksheetSchema, activityTools, analystTools, analyzeProjectCreationIntent, approvalHookToken, approvalPayloadSchema, assertAcyclic, assessorTools, auditCurriculumQualityFlow, auditQualityReport, buildActivityPrompt, buildCodeLabPrompt, buildCurriculumContext, buildCurriculumPlan, buildDeliveryPackages, buildDiagnosticQuizPrompt, buildExpositionContext, buildExtensionPrompt, buildHandoutPrompt, buildImagePrompt, buildJudgePrompt, buildLessonMasterPrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSessionSliceContext, buildSlidesPrompt, buildStandardStackMarkdown, buildStandardsContext, buildStandardsContextBlock, buildTeacherGuidePrompt, buildWorksheetPrompt, computeContentHash, computePackingSpec, conductPreliminaryResearch, contentTools, convertRoadmapToFoundationSot, createAiInferenceError, createCurriculumStorage, createStreamAbortSignal, curateMediaLedger, designerTools, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, evaluateStandardsCoverage, executeCurriculumCommand, executeSingleArtifactStep, exportAllProjectQuizzes, expositionCacheKey, extractScopeSequenceRows, extractSessionSlice, extractStreamChunk, extractThoughtAndContent, formatQuizzesToCsv, fulfillMediaLedger, gateModeFor, generateActivityFlow, generateActivityStep, generateCodeLabFlow, generateCodeLabStep, generateDiagnosticQuizFlow, generateDiagnosticQuizStep, generateEducationalImage, generateExtensionFlow, generateExtensionStep, generateHandoutFlow, generateHandoutStep, generateLessonMasterFlow, generateMasterLessonStep, generateMilestoneCurriculumBundle, generateMilestoneWorkflow, generatePhase1SotArtifacts, generatePhase2SotArtifacts, generateProjectInstruction, generateProjectInstructionFlow, generateRoadmapCurriculum, generateRoadmapWorkflow, generateSelfLabFlow, generateSelfLabStep, generateSelfPacedBundle, generateSingleArtifact, generateSingleArtifactWorkflow, generateSlidesFlow, generateSlidesStep, generateTeacherGuideFlow, generateTeacherGuideStep, generateWorksheetFlow, generateWorksheetStep, getAIModel, getArtifactMetadata, getDesignatedFallbackChain, getDesignatedFallbackConfig, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, illustratorTools, importRoadmapToProject, ingestProjectGraphIntoProject, initializeProjectInStorage, injectMediaIntoMarkdown, isExpositionFresh, isModelAllowed, isProviderEnabled, isTranslationDue, judgeMasterLessonStep, judgeSatelliteStep, lessonApprovalHook, lintAndSanitizeArtifact, lintCurriculumFramework, lintFrameworkPack, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, packagerTools, parseGateSettings, parseQuizMarkdown, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, publishToGitHub, publishToGitStep, publishToSupabase, publishToSupabaseStep, rankGenCandidates, renderFrameworkFromPlan, renderMediaPlaceholder, repairMasterLessonStep, researcherTools, resolveGateSettings, resolveStandardsPacks, resolveStreamBudget, resolveTranslationTargets, reviewerTools, runCurriculumAIInference, safeParseJson, saveMilestoneToWorkspaceStep, searchEducationalImages, searchEducationalVideos, selectStatementsForLesson, serializeActivityToMarkdown, serializeCodeLabToMarkdown, serializeDiagnosticQuizToMarkdown, serializeHandoutToMarkdown, serializeLessonToMarkdown, serializeProjectInstructionToMarkdown, serializeSelfLabToMarkdown, slugifyProjectName, streamCurriculumAIInference, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLLMWithFallback, streamLayerPrefillWithFallback, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools, topoSort, uploadAssetToBucket, validateCurriculumPlan, validateFrameworkPack, validateMarkdownTables, validateMermaidSyntax, withAutoRepair, withRateLimitBackoff };
|
|
17138
17214
|
//# sourceMappingURL=index.mjs.map
|
|
17139
17215
|
//# sourceMappingURL=index.mjs.map
|