@thanh01.pmt/curriculum-kit 1.4.20 → 1.4.21
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 +126 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -2
- package/dist/index.d.ts +36 -2
- package/dist/index.mjs +124 -47
- package/dist/index.mjs.map +1 -1
- package/dist/storage/index.cjs +21 -9
- package/dist/storage/index.cjs.map +1 -1
- package/dist/storage/index.d.cts +11 -1
- package/dist/storage/index.d.ts +11 -1
- package/dist/storage/index.mjs +21 -10
- package/dist/storage/index.mjs.map +1 -1
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -9,7 +9,7 @@ export { ArtifactLintReport, ConvertedSotBundle, GenerateProjectInstructionOptio
|
|
|
9
9
|
export { A as AutoRepairOptions, a as AutoRepairResult, B as BundleTier, G as GenerateMilestoneBundleOptions, M as MilestoneCurriculumBundle, g as generateMilestoneCurriculumBundle, w as withAutoRepair } from './milestoneBundleGenerator-CzSOeAzU.cjs';
|
|
10
10
|
import { I as ICurriculumStorage, P as ProjectStatusReport, S as SmartResumeContext, Q as QualityAuditReport } from './types-BUJGYiep.cjs';
|
|
11
11
|
export { b as ArtifactLifecycleInfo, A as ArtifactLifecycleState, L as LessonArtifactSummary, c as PipelineState, R as ReviewRecord, a as SotDocument, T as TaskLifecycleState } from './types-BUJGYiep.cjs';
|
|
12
|
-
export { FileSystemCurriculumAdapter, FileSystemStorageOptions, STANDARD_SOT_FILES, StorageFactoryOptions, SupabaseCurriculumAdapter, SupabaseStorageConfig, computeContentHash, createCurriculumStorage } from './storage/index.cjs';
|
|
12
|
+
export { FileSystemCurriculumAdapter, FileSystemStorageOptions, STANDARD_SOT_FILES, StorageFactoryOptions, SupabaseCurriculumAdapter, SupabaseStorageConfig, atomicWriteFileSync, computeContentHash, createCurriculumStorage } from './storage/index.cjs';
|
|
13
13
|
import { F as FrameworkPack, C as CoverageGateReport } from './standardsCoverageGate-DR5YTtlt.cjs';
|
|
14
14
|
export { B as BloomHintSchema, a as ClassificationSchema, m as CoverageGateInput, h as FrameworkMapping, d as FrameworkMappingSchema, f as FrameworkPackManifest, b as FrameworkPackManifestSchema, e as FrameworkPackSchema, g as FrameworkStatement, c as FrameworkStatementSchema, G as GradeBandSchema, i as MappingKind, M as MappingKindSchema, P as PackLintIssue, k as PackValidationResult, j as RecordProvenance, R as RecordProvenanceSchema, S as StatementCoverageRow, n as evaluateStandardsCoverage, l as lintFrameworkPack, v as validateFrameworkPack } from './standardsCoverageGate-DR5YTtlt.cjs';
|
|
15
15
|
import { R as ResolvedGateSettings } from './gateSettings-DabOqP6_.cjs';
|
|
@@ -266,6 +266,13 @@ interface ExcerptResult {
|
|
|
266
266
|
tokenEstimate: number;
|
|
267
267
|
}
|
|
268
268
|
declare const DEFAULT_LESSON_PRIORITIES: string[];
|
|
269
|
+
/**
|
|
270
|
+
* Priorities for the canonical-lesson excerpt injected into SATELLITE artifact
|
|
271
|
+
* contexts (ACT, QUIZ, SLIDE, ...). Excludes 'Symbol & Identifier Ledger' —
|
|
272
|
+
* the symbol registry is injected as its own dedicated block
|
|
273
|
+
* ([MANDATORY CODE SYMBOL REGISTRY]) to avoid duplicated ground truth.
|
|
274
|
+
*/
|
|
275
|
+
declare const SATELLITE_LESSON_PRIORITIES: string[];
|
|
269
276
|
declare const DEFAULT_KX_PRIORITIES: string[];
|
|
270
277
|
declare function buildSectionAwareExcerpt(markdown: string, opts?: ExcerptOptions): ExcerptResult;
|
|
271
278
|
declare function buildExpositionExcerpt(markdown: string, opts?: Omit<ExcerptOptions, 'priorities'>): ExcerptResult;
|
|
@@ -1037,6 +1044,15 @@ interface SlideProductionWorkflowOptions {
|
|
|
1037
1044
|
language?: string;
|
|
1038
1045
|
languageDirective?: string;
|
|
1039
1046
|
headingDirective?: string;
|
|
1047
|
+
/**
|
|
1048
|
+
* Ground-truth context (framework, style guide, glossary, GROUND TRUTH KX+RefPack,
|
|
1049
|
+
* session slice, horizon, symbol registry) injected into the PRIMARY system prompt
|
|
1050
|
+
* of every authoring call — hybrid full-deck and chunked batches alike.
|
|
1051
|
+
* Without it, only the legacy raw-fetch fallback sees this context.
|
|
1052
|
+
* Deliberately EXCLUDES the canonical lesson excerpt: lesson phase content is
|
|
1053
|
+
* already injected into user prompts via parseLessonFlow (no duplication).
|
|
1054
|
+
*/
|
|
1055
|
+
groundContext?: string;
|
|
1040
1056
|
satelliteContext?: any;
|
|
1041
1057
|
/** Vercel AI SDK model resolution options (provider/model/apiKey). */
|
|
1042
1058
|
modelOptions?: ModelResolutionOptions;
|
|
@@ -1071,6 +1087,24 @@ interface ExtractedJson {
|
|
|
1071
1087
|
}
|
|
1072
1088
|
declare function extractJsonArray(raw: string | undefined | null): ExtractedJson;
|
|
1073
1089
|
declare function validateHybridDeckSlides(slides: any[], blueprint: SlideBlueprintItem[]): string[];
|
|
1090
|
+
/**
|
|
1091
|
+
* Normalize the AI SDK's usage shape and forward it through onProgress in the
|
|
1092
|
+
* kit's canonical usage contract (`JSON.stringify({ promptTokens,
|
|
1093
|
+
* completionTokens, totalTokens, reasoningTokens })` + `meta.type = 'usage'`).
|
|
1094
|
+
*
|
|
1095
|
+
* 5-Whys RC-telemetry (2026-09-13): the slide workflow never emitted usage, so
|
|
1096
|
+
* the app-side queue recorded inputTokens=0/outputTokens=0 for every SLIDE
|
|
1097
|
+
* execution. AI SDK v5+ renames the fields (inputTokens/outputTokens) — read
|
|
1098
|
+
* both shapes defensively.
|
|
1099
|
+
*/
|
|
1100
|
+
declare function emitUsage(usage: {
|
|
1101
|
+
promptTokens?: number;
|
|
1102
|
+
completionTokens?: number;
|
|
1103
|
+
inputTokens?: number;
|
|
1104
|
+
outputTokens?: number;
|
|
1105
|
+
totalTokens?: number;
|
|
1106
|
+
reasoningTokens?: number;
|
|
1107
|
+
} | undefined, onProgress?: (agent: string, message: string, meta?: any) => void): void;
|
|
1074
1108
|
declare function executeSlideProductionWorkflow(options: SlideProductionWorkflowOptions): Promise<SlideProductionWorkflowResult>;
|
|
1075
1109
|
|
|
1076
1110
|
/**
|
|
@@ -1371,4 +1405,4 @@ declare function getSlideLayoutPresetById(id: string): SlideLayoutPreset | undef
|
|
|
1371
1405
|
*/
|
|
1372
1406
|
declare function getSlideLayoutPresetsByCategory(category: SlideLayoutCategory): SlideLayoutPreset[];
|
|
1373
1407
|
|
|
1374
|
-
export { ACT_TEMPLATE, AIProviderName, ARTIFACT_DEPENDENCY_ROUTING, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, ActivityLab, type ArtifactDependencyRule, 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, type ContextInjectionMeta, type ContextSourceKey, CoverageGateReport, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DEFAULT_VIETNAMESE_SECTION_HEADINGS, DependencyEdge, type DependencyValidationResult, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, type ExcerptOptions, type ExcerptResult, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type ExtractedJson, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, type GenerateExpositionOptions, GeneratedSlideArraySchema, GeneratedSlideSchema, HANDOUT_TEMPLATE, HybridBlueprintArraySchema, HybridBlueprintItemSchema, HybridDeckSlideArraySchema, HybridDeckSlideSchema, HybridPipelineError, ICurriculumStorage, LAYER_IDLE_BUDGET_MS, 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, SlideBlueprintArraySchema, SlideBlueprintItemSchema, SlideDeck, type SlideEngine, type SlideLayoutCategory, type SlideLayoutData, type SlideLayoutPreset, type SlideProductionWorkflowOptions, type SlideProductionWorkflowResult, SmartResumeContext, type StreamAbortHandle, type StreamBudget, type StreamChunkExtractor, StreamRunnerOptions, type SymbolLedgerResult, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TranslationPolicy, type TranslationTarget, type TranslationTrigger, type ValidationOptions, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildDomainLexiconGuardrail, buildExpositionContext, buildExpositionExcerpt, buildHeadingDirective, buildLanguageDirective, buildLessonExcerpt, buildSectionAwareExcerpt, buildSessionSliceContext, closeTruncatedJson, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createContextMissingError, createStreamAbortSignal, createStreamChunkExtractor, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, executeCurriculumCommand, executeSlideProductionWorkflow, expositionCacheKey, extractJsonArray, extractScopeSequenceRows, extractSectionHeadingsFromSLC, extractSessionSlice, extractStreamChunk, extractSymbolLedger, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, normalizeSlcContract, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderFrameworkFromPlan, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, stripLlmJsonWrappers, targetLanguageDisplayName, topoSort, validateArtifactDependencies, validateHybridDeckSlides };
|
|
1408
|
+
export { ACT_TEMPLATE, AIProviderName, ARTIFACT_DEPENDENCY_ROUTING, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, ActivityLab, type ArtifactDependencyRule, 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, type ContextInjectionMeta, type ContextSourceKey, CoverageGateReport, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DEFAULT_VIETNAMESE_SECTION_HEADINGS, DependencyEdge, type DependencyValidationResult, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, type ExcerptOptions, type ExcerptResult, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type ExtractedJson, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, type GenerateExpositionOptions, GeneratedSlideArraySchema, GeneratedSlideSchema, HANDOUT_TEMPLATE, HybridBlueprintArraySchema, HybridBlueprintItemSchema, HybridDeckSlideArraySchema, HybridDeckSlideSchema, HybridPipelineError, ICurriculumStorage, LAYER_IDLE_BUDGET_MS, 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, SATELLITE_LESSON_PRIORITIES, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STATION_ROTATION_TEMPLATE, type SlashCommandDefinition, SlideBlueprintArraySchema, SlideBlueprintItemSchema, SlideDeck, type SlideEngine, type SlideLayoutCategory, type SlideLayoutData, type SlideLayoutPreset, type SlideProductionWorkflowOptions, type SlideProductionWorkflowResult, SmartResumeContext, type StreamAbortHandle, type StreamBudget, type StreamChunkExtractor, StreamRunnerOptions, type SymbolLedgerResult, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TranslationPolicy, type TranslationTarget, type TranslationTrigger, type ValidationOptions, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildDomainLexiconGuardrail, buildExpositionContext, buildExpositionExcerpt, buildHeadingDirective, buildLanguageDirective, buildLessonExcerpt, buildSectionAwareExcerpt, buildSessionSliceContext, closeTruncatedJson, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createContextMissingError, createStreamAbortSignal, createStreamChunkExtractor, detectProjectPedagogy, emitUsage, ensureExpositionForLesson, ensureKnowledgeExposition, executeCurriculumCommand, executeSlideProductionWorkflow, expositionCacheKey, extractJsonArray, extractScopeSequenceRows, extractSectionHeadingsFromSLC, extractSessionSlice, extractStreamChunk, extractSymbolLedger, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, normalizeSlcContract, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderFrameworkFromPlan, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, stripLlmJsonWrappers, targetLanguageDisplayName, topoSort, validateArtifactDependencies, validateHybridDeckSlides };
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { ArtifactLintReport, ConvertedSotBundle, GenerateProjectInstructionOptio
|
|
|
9
9
|
export { A as AutoRepairOptions, a as AutoRepairResult, B as BundleTier, G as GenerateMilestoneBundleOptions, M as MilestoneCurriculumBundle, g as generateMilestoneCurriculumBundle, w as withAutoRepair } from './milestoneBundleGenerator-Bkba8OPG.js';
|
|
10
10
|
import { I as ICurriculumStorage, P as ProjectStatusReport, S as SmartResumeContext, Q as QualityAuditReport } from './types-BUJGYiep.js';
|
|
11
11
|
export { b as ArtifactLifecycleInfo, A as ArtifactLifecycleState, L as LessonArtifactSummary, c as PipelineState, R as ReviewRecord, a as SotDocument, T as TaskLifecycleState } from './types-BUJGYiep.js';
|
|
12
|
-
export { FileSystemCurriculumAdapter, FileSystemStorageOptions, STANDARD_SOT_FILES, StorageFactoryOptions, SupabaseCurriculumAdapter, SupabaseStorageConfig, computeContentHash, createCurriculumStorage } from './storage/index.js';
|
|
12
|
+
export { FileSystemCurriculumAdapter, FileSystemStorageOptions, STANDARD_SOT_FILES, StorageFactoryOptions, SupabaseCurriculumAdapter, SupabaseStorageConfig, atomicWriteFileSync, computeContentHash, createCurriculumStorage } from './storage/index.js';
|
|
13
13
|
import { F as FrameworkPack, C as CoverageGateReport } from './standardsCoverageGate-DR5YTtlt.js';
|
|
14
14
|
export { B as BloomHintSchema, a as ClassificationSchema, m as CoverageGateInput, h as FrameworkMapping, d as FrameworkMappingSchema, f as FrameworkPackManifest, b as FrameworkPackManifestSchema, e as FrameworkPackSchema, g as FrameworkStatement, c as FrameworkStatementSchema, G as GradeBandSchema, i as MappingKind, M as MappingKindSchema, P as PackLintIssue, k as PackValidationResult, j as RecordProvenance, R as RecordProvenanceSchema, S as StatementCoverageRow, n as evaluateStandardsCoverage, l as lintFrameworkPack, v as validateFrameworkPack } from './standardsCoverageGate-DR5YTtlt.js';
|
|
15
15
|
import { R as ResolvedGateSettings } from './gateSettings-DabOqP6_.js';
|
|
@@ -266,6 +266,13 @@ interface ExcerptResult {
|
|
|
266
266
|
tokenEstimate: number;
|
|
267
267
|
}
|
|
268
268
|
declare const DEFAULT_LESSON_PRIORITIES: string[];
|
|
269
|
+
/**
|
|
270
|
+
* Priorities for the canonical-lesson excerpt injected into SATELLITE artifact
|
|
271
|
+
* contexts (ACT, QUIZ, SLIDE, ...). Excludes 'Symbol & Identifier Ledger' —
|
|
272
|
+
* the symbol registry is injected as its own dedicated block
|
|
273
|
+
* ([MANDATORY CODE SYMBOL REGISTRY]) to avoid duplicated ground truth.
|
|
274
|
+
*/
|
|
275
|
+
declare const SATELLITE_LESSON_PRIORITIES: string[];
|
|
269
276
|
declare const DEFAULT_KX_PRIORITIES: string[];
|
|
270
277
|
declare function buildSectionAwareExcerpt(markdown: string, opts?: ExcerptOptions): ExcerptResult;
|
|
271
278
|
declare function buildExpositionExcerpt(markdown: string, opts?: Omit<ExcerptOptions, 'priorities'>): ExcerptResult;
|
|
@@ -1037,6 +1044,15 @@ interface SlideProductionWorkflowOptions {
|
|
|
1037
1044
|
language?: string;
|
|
1038
1045
|
languageDirective?: string;
|
|
1039
1046
|
headingDirective?: string;
|
|
1047
|
+
/**
|
|
1048
|
+
* Ground-truth context (framework, style guide, glossary, GROUND TRUTH KX+RefPack,
|
|
1049
|
+
* session slice, horizon, symbol registry) injected into the PRIMARY system prompt
|
|
1050
|
+
* of every authoring call — hybrid full-deck and chunked batches alike.
|
|
1051
|
+
* Without it, only the legacy raw-fetch fallback sees this context.
|
|
1052
|
+
* Deliberately EXCLUDES the canonical lesson excerpt: lesson phase content is
|
|
1053
|
+
* already injected into user prompts via parseLessonFlow (no duplication).
|
|
1054
|
+
*/
|
|
1055
|
+
groundContext?: string;
|
|
1040
1056
|
satelliteContext?: any;
|
|
1041
1057
|
/** Vercel AI SDK model resolution options (provider/model/apiKey). */
|
|
1042
1058
|
modelOptions?: ModelResolutionOptions;
|
|
@@ -1071,6 +1087,24 @@ interface ExtractedJson {
|
|
|
1071
1087
|
}
|
|
1072
1088
|
declare function extractJsonArray(raw: string | undefined | null): ExtractedJson;
|
|
1073
1089
|
declare function validateHybridDeckSlides(slides: any[], blueprint: SlideBlueprintItem[]): string[];
|
|
1090
|
+
/**
|
|
1091
|
+
* Normalize the AI SDK's usage shape and forward it through onProgress in the
|
|
1092
|
+
* kit's canonical usage contract (`JSON.stringify({ promptTokens,
|
|
1093
|
+
* completionTokens, totalTokens, reasoningTokens })` + `meta.type = 'usage'`).
|
|
1094
|
+
*
|
|
1095
|
+
* 5-Whys RC-telemetry (2026-09-13): the slide workflow never emitted usage, so
|
|
1096
|
+
* the app-side queue recorded inputTokens=0/outputTokens=0 for every SLIDE
|
|
1097
|
+
* execution. AI SDK v5+ renames the fields (inputTokens/outputTokens) — read
|
|
1098
|
+
* both shapes defensively.
|
|
1099
|
+
*/
|
|
1100
|
+
declare function emitUsage(usage: {
|
|
1101
|
+
promptTokens?: number;
|
|
1102
|
+
completionTokens?: number;
|
|
1103
|
+
inputTokens?: number;
|
|
1104
|
+
outputTokens?: number;
|
|
1105
|
+
totalTokens?: number;
|
|
1106
|
+
reasoningTokens?: number;
|
|
1107
|
+
} | undefined, onProgress?: (agent: string, message: string, meta?: any) => void): void;
|
|
1074
1108
|
declare function executeSlideProductionWorkflow(options: SlideProductionWorkflowOptions): Promise<SlideProductionWorkflowResult>;
|
|
1075
1109
|
|
|
1076
1110
|
/**
|
|
@@ -1371,4 +1405,4 @@ declare function getSlideLayoutPresetById(id: string): SlideLayoutPreset | undef
|
|
|
1371
1405
|
*/
|
|
1372
1406
|
declare function getSlideLayoutPresetsByCategory(category: SlideLayoutCategory): SlideLayoutPreset[];
|
|
1373
1407
|
|
|
1374
|
-
export { ACT_TEMPLATE, AIProviderName, ARTIFACT_DEPENDENCY_ROUTING, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, ActivityLab, type ArtifactDependencyRule, 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, type ContextInjectionMeta, type ContextSourceKey, CoverageGateReport, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DEFAULT_VIETNAMESE_SECTION_HEADINGS, DependencyEdge, type DependencyValidationResult, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, type ExcerptOptions, type ExcerptResult, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type ExtractedJson, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, type GenerateExpositionOptions, GeneratedSlideArraySchema, GeneratedSlideSchema, HANDOUT_TEMPLATE, HybridBlueprintArraySchema, HybridBlueprintItemSchema, HybridDeckSlideArraySchema, HybridDeckSlideSchema, HybridPipelineError, ICurriculumStorage, LAYER_IDLE_BUDGET_MS, 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, SlideBlueprintArraySchema, SlideBlueprintItemSchema, SlideDeck, type SlideEngine, type SlideLayoutCategory, type SlideLayoutData, type SlideLayoutPreset, type SlideProductionWorkflowOptions, type SlideProductionWorkflowResult, SmartResumeContext, type StreamAbortHandle, type StreamBudget, type StreamChunkExtractor, StreamRunnerOptions, type SymbolLedgerResult, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TranslationPolicy, type TranslationTarget, type TranslationTrigger, type ValidationOptions, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildDomainLexiconGuardrail, buildExpositionContext, buildExpositionExcerpt, buildHeadingDirective, buildLanguageDirective, buildLessonExcerpt, buildSectionAwareExcerpt, buildSessionSliceContext, closeTruncatedJson, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createContextMissingError, createStreamAbortSignal, createStreamChunkExtractor, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, executeCurriculumCommand, executeSlideProductionWorkflow, expositionCacheKey, extractJsonArray, extractScopeSequenceRows, extractSectionHeadingsFromSLC, extractSessionSlice, extractStreamChunk, extractSymbolLedger, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, normalizeSlcContract, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderFrameworkFromPlan, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, stripLlmJsonWrappers, targetLanguageDisplayName, topoSort, validateArtifactDependencies, validateHybridDeckSlides };
|
|
1408
|
+
export { ACT_TEMPLATE, AIProviderName, ARTIFACT_DEPENDENCY_ROUTING, ARTIFACT_EXECUTION_ORDER, type AcademicAuditFinding, AcademicAuditor, type AcademicDimension, ActivityLab, type ArtifactDependencyRule, 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, type ContextInjectionMeta, type ContextSourceKey, CoverageGateReport, CrossArtifactDriftEvaluator, CurriculumError, type CurriculumErrorCode, type CurriculumErrorDetail, CurriculumPlan, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DEFAULT_VIETNAMESE_SECTION_HEADINGS, DependencyEdge, type DependencyValidationResult, DeterministicPipelineRunner, DeterministicStructuralLinter, DiagnosticQuiz, DiagnosticQuizInput, type DimensionScore, EXIT_TICKET_TEMPLATE, EXPOSITION_REL, EXT_TEMPLATE, type ExcerptOptions, type ExcerptResult, type ExecuteCommandResult, ExpositionApprovalError, type ExpositionLlmFn, type ExpositionResult, type ExpositionStorage, type ExtractedJson, type ExtractedStreamChunk, type FindingSeverity, FiveEInstructionalEvaluator, type FrameworkLintFinding, type FrameworkLintReport, FrameworkPack, GLOSSARY_TEMPLATE, GRAPHIC_ORGANIZER_TEMPLATE, type GenerateExpositionOptions, GeneratedSlideArraySchema, GeneratedSlideSchema, HANDOUT_TEMPLATE, HybridBlueprintArraySchema, HybridBlueprintItemSchema, HybridDeckSlideArraySchema, HybridDeckSlideSchema, HybridPipelineError, ICurriculumStorage, LAYER_IDLE_BUDGET_MS, 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, SATELLITE_LESSON_PRIORITIES, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STATION_ROTATION_TEMPLATE, type SlashCommandDefinition, SlideBlueprintArraySchema, SlideBlueprintItemSchema, SlideDeck, type SlideEngine, type SlideLayoutCategory, type SlideLayoutData, type SlideLayoutPreset, type SlideProductionWorkflowOptions, type SlideProductionWorkflowResult, SmartResumeContext, type StreamAbortHandle, type StreamBudget, type StreamChunkExtractor, StreamRunnerOptions, type SymbolLedgerResult, TASK_CARDS_TEMPLATE, TEACHER_GUIDE_TEMPLATE, TIERED_PRACTICE_TEMPLATE, TranslationPolicy, type TranslationTarget, type TranslationTrigger, type ValidationOptions, WORKSHEET_TEMPLATE, analyzeProjectCreationIntent, assertAcyclic, auditQualityReport, buildCurriculumContext, buildCurriculumPlan, buildDomainLexiconGuardrail, buildExpositionContext, buildExpositionExcerpt, buildHeadingDirective, buildLanguageDirective, buildLessonExcerpt, buildSectionAwareExcerpt, buildSessionSliceContext, closeTruncatedJson, computePackingSpec, conductPreliminaryResearch, createAiInferenceError, createContextMissingError, createStreamAbortSignal, createStreamChunkExtractor, detectProjectPedagogy, emitUsage, ensureExpositionForLesson, ensureKnowledgeExposition, executeCurriculumCommand, executeSlideProductionWorkflow, expositionCacheKey, extractJsonArray, extractScopeSequenceRows, extractSectionHeadingsFromSLC, extractSessionSlice, extractStreamChunk, extractSymbolLedger, generatePhase1SotArtifacts, generatePhase2SotArtifacts, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, ingestProjectGraphIntoProject, initializeProjectInStorage, isExpositionFresh, isTranslationDue, lintCurriculumFramework, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, normalizeSlcContract, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, renderFrameworkFromPlan, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, safeParseJson, slugifyProjectName, streamLLMWithFallback, streamLayerPrefillWithFallback, stripLlmJsonWrappers, targetLanguageDisplayName, topoSort, validateArtifactDependencies, validateHybridDeckSlides };
|
package/dist/index.mjs
CHANGED
|
@@ -1501,7 +1501,8 @@ function buildSlideBatchPrompt(params) {
|
|
|
1501
1501
|
skillPrompt,
|
|
1502
1502
|
language = "Vietnamese",
|
|
1503
1503
|
languageDirective = "",
|
|
1504
|
-
headingDirective = ""
|
|
1504
|
+
headingDirective = "",
|
|
1505
|
+
groundContext = ""
|
|
1505
1506
|
} = params;
|
|
1506
1507
|
const slidesSpec = clusterSlides.map((s) => `
|
|
1507
1508
|
- Slide ${s.slideIndex} [Phase: ${s.lessonPhase}] -> Layout: "${s.layoutId}"
|
|
@@ -1514,7 +1515,11 @@ function buildSlideBatchPrompt(params) {
|
|
|
1514
1515
|
const systemPrompt = `
|
|
1515
1516
|
${skillPrompt}
|
|
1516
1517
|
|
|
1517
|
-
|
|
1518
|
+
${groundContext ? `---
|
|
1519
|
+
### PROJECT GROUND CONTEXT (framework, style guide, glossary, canonical knowledge \u2014 author from these):
|
|
1520
|
+
${groundContext}
|
|
1521
|
+
|
|
1522
|
+
---` : ""}
|
|
1518
1523
|
### OPERATIONAL GROUND RULES FOR CHUNK GENERATION:
|
|
1519
1524
|
${languageDirective}
|
|
1520
1525
|
${headingDirective}
|
|
@@ -1592,6 +1597,7 @@ __export(slideProductionWorkflow_exports, {
|
|
|
1592
1597
|
HybridPipelineError: () => HybridPipelineError,
|
|
1593
1598
|
SlideBlueprintArraySchema: () => SlideBlueprintArraySchema,
|
|
1594
1599
|
SlideBlueprintItemSchema: () => SlideBlueprintItemSchema,
|
|
1600
|
+
emitUsage: () => emitUsage,
|
|
1595
1601
|
executeSlideProductionWorkflow: () => executeSlideProductionWorkflow,
|
|
1596
1602
|
extractJsonArray: () => extractJsonArray,
|
|
1597
1603
|
validateHybridDeckSlides: () => validateHybridDeckSlides
|
|
@@ -1644,15 +1650,28 @@ function validateHybridDeckSlides(slides, blueprint) {
|
|
|
1644
1650
|
});
|
|
1645
1651
|
return v.slice(0, 10);
|
|
1646
1652
|
}
|
|
1653
|
+
function emitUsage(usage, onProgress) {
|
|
1654
|
+
if (!onProgress || !usage) return;
|
|
1655
|
+
const promptTokens = usage.promptTokens ?? usage.inputTokens ?? 0;
|
|
1656
|
+
const completionTokens = usage.completionTokens ?? usage.outputTokens ?? 0;
|
|
1657
|
+
if (promptTokens === 0 && completionTokens === 0) return;
|
|
1658
|
+
onProgress("@illustrator", JSON.stringify({
|
|
1659
|
+
promptTokens,
|
|
1660
|
+
completionTokens,
|
|
1661
|
+
totalTokens: usage.totalTokens ?? promptTokens + completionTokens,
|
|
1662
|
+
reasoningTokens: usage.reasoningTokens ?? 0
|
|
1663
|
+
}), { type: "usage" });
|
|
1664
|
+
}
|
|
1647
1665
|
async function inferTextJson(schema, systemPrompt, userPrompt, options, label) {
|
|
1648
1666
|
const model = getAIModel(options.modelOptions);
|
|
1649
1667
|
try {
|
|
1650
|
-
const { text, finishReason } = await generateText({
|
|
1668
|
+
const { text, finishReason, usage } = await generateText({
|
|
1651
1669
|
model,
|
|
1652
1670
|
system: systemPrompt || void 0,
|
|
1653
1671
|
prompt: userPrompt,
|
|
1654
1672
|
maxOutputTokens: options.maxOutputTokens ?? 65536
|
|
1655
1673
|
});
|
|
1674
|
+
emitUsage(usage, options.onProgress);
|
|
1656
1675
|
const extracted = extractJsonArray(text);
|
|
1657
1676
|
if (!("value" in extracted) || extracted.value === void 0) {
|
|
1658
1677
|
console.warn(
|
|
@@ -1673,12 +1692,13 @@ async function inferTextJson(schema, systemPrompt, userPrompt, options, label) {
|
|
|
1673
1692
|
async function inferStructured(schema, systemPrompt, userPrompt, options, label) {
|
|
1674
1693
|
try {
|
|
1675
1694
|
const model = getAIModel(options.modelOptions);
|
|
1676
|
-
const { object } = await generateObject({
|
|
1695
|
+
const { object, usage } = await generateObject({
|
|
1677
1696
|
model,
|
|
1678
1697
|
schema,
|
|
1679
1698
|
system: systemPrompt || void 0,
|
|
1680
1699
|
prompt: userPrompt
|
|
1681
1700
|
});
|
|
1701
|
+
emitUsage(usage, options.onProgress);
|
|
1682
1702
|
const validated = schema.safeParse(object);
|
|
1683
1703
|
if (validated.success) return validated.data;
|
|
1684
1704
|
console.warn(
|
|
@@ -1693,7 +1713,9 @@ async function inferStructured(schema, systemPrompt, userPrompt, options, label)
|
|
|
1693
1713
|
const messages = [
|
|
1694
1714
|
{ role: "user", content: [systemPrompt, userPrompt].filter(Boolean).join("\n\n") }
|
|
1695
1715
|
];
|
|
1696
|
-
const raw = await runCurriculumAIInference(messages, options.satelliteContext || "", options.runnerOptions)
|
|
1716
|
+
const raw = await runCurriculumAIInference(messages, options.satelliteContext || "", options.runnerOptions, (token, type) => {
|
|
1717
|
+
if (type === "usage") options.onProgress?.("@illustrator", token, { type: "usage" });
|
|
1718
|
+
});
|
|
1697
1719
|
const fenceMatch = raw.match(/```(?:json)?\s*([\s\S]*?)\s*```/i);
|
|
1698
1720
|
const candidate = (fenceMatch ? fenceMatch[1] : raw).trim();
|
|
1699
1721
|
let parsed;
|
|
@@ -1726,7 +1748,7 @@ function normalizeBlueprintItems(items) {
|
|
|
1726
1748
|
}));
|
|
1727
1749
|
}
|
|
1728
1750
|
function buildHybridDeckPrompts(params) {
|
|
1729
|
-
const { lessonFlow, blueprint, skillPrompt, language, languageDirective, headingDirective } = params;
|
|
1751
|
+
const { lessonFlow, blueprint, skillPrompt, language, languageDirective, headingDirective, groundContext } = params;
|
|
1730
1752
|
const blueprintText = JSON.stringify(
|
|
1731
1753
|
blueprint.map((s) => ({
|
|
1732
1754
|
slideIndex: s.slideIndex,
|
|
@@ -1745,6 +1767,7 @@ function buildHybridDeckPrompts(params) {
|
|
|
1745
1767
|
${p.content}`).join("\n\n") : lessonFlow.rawContent;
|
|
1746
1768
|
const systemPrompt = [
|
|
1747
1769
|
skillPrompt,
|
|
1770
|
+
groundContext || "",
|
|
1748
1771
|
languageDirective,
|
|
1749
1772
|
headingDirective,
|
|
1750
1773
|
`
|
|
@@ -1809,7 +1832,8 @@ async function runHybridPipeline(ctx) {
|
|
|
1809
1832
|
skillPrompt,
|
|
1810
1833
|
language,
|
|
1811
1834
|
languageDirective,
|
|
1812
|
-
headingDirective
|
|
1835
|
+
headingDirective,
|
|
1836
|
+
groundContext: options.groundContext
|
|
1813
1837
|
});
|
|
1814
1838
|
let slides = null;
|
|
1815
1839
|
let lastViolations = [];
|
|
@@ -1958,7 +1982,8 @@ ${p.content}`).join("\n\n") : lessonFlow.rawContent.slice(0, 3500);
|
|
|
1958
1982
|
skillPrompt,
|
|
1959
1983
|
language,
|
|
1960
1984
|
languageDirective,
|
|
1961
|
-
headingDirective
|
|
1985
|
+
headingDirective,
|
|
1986
|
+
groundContext: options.groundContext
|
|
1962
1987
|
});
|
|
1963
1988
|
try {
|
|
1964
1989
|
const batchSlides = await pRetry(
|
|
@@ -9300,6 +9325,21 @@ var STANDARD_SOT_FILES = [
|
|
|
9300
9325
|
"ART_DIRECTION.md",
|
|
9301
9326
|
"ALIGNMENT_MATRIX.md"
|
|
9302
9327
|
];
|
|
9328
|
+
function atomicWriteFileSync(targetPath, content) {
|
|
9329
|
+
const dir = path3.dirname(targetPath);
|
|
9330
|
+
if (!fs2.existsSync(dir)) fs2.mkdirSync(dir, { recursive: true });
|
|
9331
|
+
const tmpPath = path3.join(dir, `.${path3.basename(targetPath)}.${process.pid}.${Date.now()}.${crypto.randomBytes(4).toString("hex")}.tmp`);
|
|
9332
|
+
try {
|
|
9333
|
+
fs2.writeFileSync(tmpPath, content, "utf-8");
|
|
9334
|
+
fs2.renameSync(tmpPath, targetPath);
|
|
9335
|
+
} catch (err) {
|
|
9336
|
+
try {
|
|
9337
|
+
if (fs2.existsSync(tmpPath)) fs2.unlinkSync(tmpPath);
|
|
9338
|
+
} catch {
|
|
9339
|
+
}
|
|
9340
|
+
throw err;
|
|
9341
|
+
}
|
|
9342
|
+
}
|
|
9303
9343
|
var FileSystemCurriculumAdapter = class {
|
|
9304
9344
|
baseDir;
|
|
9305
9345
|
constructor(options = {}) {
|
|
@@ -9438,7 +9478,7 @@ var FileSystemCurriculumAdapter = class {
|
|
|
9438
9478
|
if (oldContent !== content) {
|
|
9439
9479
|
const historyDir = path3.join(projectDir, ".history", relPath);
|
|
9440
9480
|
fs2.mkdirSync(historyDir, { recursive: true });
|
|
9441
|
-
|
|
9481
|
+
atomicWriteFileSync(path3.join(historyDir, `${Date.now()}.md`), oldContent);
|
|
9442
9482
|
const versions = fs2.readdirSync(historyDir).filter((f) => f.endsWith(".md")).sort();
|
|
9443
9483
|
while (versions.length > 10) {
|
|
9444
9484
|
fs2.unlinkSync(path3.join(historyDir, versions.shift()));
|
|
@@ -9448,19 +9488,15 @@ var FileSystemCurriculumAdapter = class {
|
|
|
9448
9488
|
console.warn("[FileSystemCurriculumAdapter] version history snapshot failed:", histErr?.message || histErr);
|
|
9449
9489
|
}
|
|
9450
9490
|
}
|
|
9451
|
-
|
|
9491
|
+
atomicWriteFileSync(targetPath, content);
|
|
9452
9492
|
const filename = path3.basename(relPath);
|
|
9453
9493
|
const match = filename.match(/(LESSON|ACT|QUIZ|SLIDE|GUIDE|HANDOUT|WKS|EXT)_(U\d+_M\d+_L\d+)\.md/i);
|
|
9454
9494
|
if (match) {
|
|
9455
9495
|
const lessonId = match[2].toUpperCase();
|
|
9456
|
-
|
|
9457
|
-
if (!fs2.existsSync(lessonsDir)) {
|
|
9458
|
-
fs2.mkdirSync(lessonsDir, { recursive: true });
|
|
9459
|
-
}
|
|
9460
|
-
fs2.writeFileSync(path3.join(lessonsDir, filename), content, "utf-8");
|
|
9496
|
+
atomicWriteFileSync(path3.join(projectDir, "lessons", lessonId, filename), content);
|
|
9461
9497
|
const legacyContentDir = path3.join(projectDir, "_content", lessonId);
|
|
9462
9498
|
if (fs2.existsSync(legacyContentDir)) {
|
|
9463
|
-
|
|
9499
|
+
atomicWriteFileSync(path3.join(legacyContentDir, filename), content);
|
|
9464
9500
|
}
|
|
9465
9501
|
}
|
|
9466
9502
|
}
|
|
@@ -9551,7 +9587,7 @@ ${lessonTable}
|
|
|
9551
9587
|
}
|
|
9552
9588
|
const stateFile = path3.join(pipelineDir, "state.json");
|
|
9553
9589
|
state.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
9554
|
-
|
|
9590
|
+
atomicWriteFileSync(stateFile, JSON.stringify(state, null, 2));
|
|
9555
9591
|
}
|
|
9556
9592
|
async updateArtifactState(projectId, taskId, artifactType, update) {
|
|
9557
9593
|
const current = await this.getPipelineState(projectId);
|
|
@@ -11251,6 +11287,13 @@ var DEFAULT_LESSON_PRIORITIES = [
|
|
|
11251
11287
|
"Learning Objectives & Evidence",
|
|
11252
11288
|
"Activity Sequence"
|
|
11253
11289
|
];
|
|
11290
|
+
var SATELLITE_LESSON_PRIORITIES = [
|
|
11291
|
+
"Artifact Contract",
|
|
11292
|
+
"A. Lesson Design Plan",
|
|
11293
|
+
"B. Lesson Flow",
|
|
11294
|
+
"Learning Objectives & Evidence",
|
|
11295
|
+
"Activity Sequence"
|
|
11296
|
+
];
|
|
11254
11297
|
var DEFAULT_KX_PRIORITIES = [
|
|
11255
11298
|
"Key Terms",
|
|
11256
11299
|
"Concept Narratives",
|
|
@@ -26082,6 +26125,21 @@ ${renderHorizonPromptBlock(horizon)}`;
|
|
|
26082
26125
|
} catch (hErr) {
|
|
26083
26126
|
console.warn(`[produceSingleLesson] Notice: Curriculum Horizon extraction:`, hErr?.message || hErr);
|
|
26084
26127
|
}
|
|
26128
|
+
const buildGroundTruthBlock = () => {
|
|
26129
|
+
const parts = [];
|
|
26130
|
+
if (expositionContext) {
|
|
26131
|
+
parts.push(`### KNOWLEDGE_EXPOSITION (CANONICAL KNOWLEDGE \u2014 teach from this, do not contradict)
|
|
26132
|
+
${expositionContext}`);
|
|
26133
|
+
}
|
|
26134
|
+
if (effectiveRefPack) {
|
|
26135
|
+
parts.push(`### REFERENCE PACK GROUND TRUTH
|
|
26136
|
+
${effectiveRefPack}`);
|
|
26137
|
+
}
|
|
26138
|
+
return parts.length > 0 ? `
|
|
26139
|
+
|
|
26140
|
+
[GROUND TRUTH]:
|
|
26141
|
+
${parts.join("\n\n")}` : "";
|
|
26142
|
+
};
|
|
26085
26143
|
const glossaryBlock = glossaryContext ? `
|
|
26086
26144
|
|
|
26087
26145
|
[GLOSSARY TERMS (use these exact definitions)]:
|
|
@@ -26089,21 +26147,14 @@ ${glossaryContext}` : "";
|
|
|
26089
26147
|
const standardsBlock = standardsContext ? `
|
|
26090
26148
|
|
|
26091
26149
|
${standardsContext}` : "";
|
|
26092
|
-
const expositionBlock = expositionContext ? `
|
|
26093
|
-
|
|
26094
|
-
[KNOWLEDGE_EXPOSITION (CANONICAL KNOWLEDGE \u2014 teach from this, do not contradict)]:
|
|
26095
|
-
${expositionContext}` : "";
|
|
26096
26150
|
const sessionSliceBlock = sessionSliceContext ? `
|
|
26097
26151
|
|
|
26098
26152
|
${sessionSliceContext}` : "";
|
|
26099
|
-
const assembleCommonContext = (
|
|
26153
|
+
const assembleCommonContext = (sg) => `${baseContextPrefix}
|
|
26100
26154
|
|
|
26101
26155
|
[CONTENT STYLE GUIDE EXCERPT]:
|
|
26102
|
-
${sg}
|
|
26103
|
-
|
|
26104
|
-
[REFERENCE PACK GROUND TRUTH]:
|
|
26105
|
-
${ref}${standardsBlock}${glossaryBlock}${expositionBlock}${sessionSliceBlock}${horizonBlock}`;
|
|
26106
|
-
let commonContext = assembleCommonContext(effectiveRefPack, effectiveStyleGuide);
|
|
26156
|
+
${sg}${standardsBlock}${glossaryBlock}${buildGroundTruthBlock()}${sessionSliceBlock}${horizonBlock}`;
|
|
26157
|
+
let commonContext = assembleCommonContext(effectiveStyleGuide);
|
|
26107
26158
|
const MAX_COMPOSITE_PROMPT_CHARS = 3e4;
|
|
26108
26159
|
const runnerOptions = options.customInference ? { customInference: options.customInference } : {};
|
|
26109
26160
|
if (commonContext.length > MAX_COMPOSITE_PROMPT_CHARS && effectiveRefPack.length > 1e3) {
|
|
@@ -26114,14 +26165,14 @@ ${ref}${standardsBlock}${glossaryBlock}${expositionBlock}${sessionSliceBlock}${h
|
|
|
26114
26165
|
],
|
|
26115
26166
|
budget: 1e3
|
|
26116
26167
|
}).excerpt;
|
|
26117
|
-
commonContext = assembleCommonContext(
|
|
26168
|
+
commonContext = assembleCommonContext(effectiveStyleGuide);
|
|
26118
26169
|
}
|
|
26119
26170
|
if (commonContext.length > MAX_COMPOSITE_PROMPT_CHARS && effectiveStyleGuide.length > 1e3) {
|
|
26120
26171
|
effectiveStyleGuide = buildSectionAwareExcerpt(styleGuide, {
|
|
26121
26172
|
priorities: ["Voice & Tone", "Standard Terminology (Glossary)"],
|
|
26122
26173
|
budget: 1e3
|
|
26123
26174
|
}).excerpt;
|
|
26124
|
-
commonContext = assembleCommonContext(
|
|
26175
|
+
commonContext = assembleCommonContext(effectiveStyleGuide);
|
|
26125
26176
|
}
|
|
26126
26177
|
onProgress?.("@content", `[CONTEXT] Composite prompt ready (${commonContext.length} chars, adaptive budget <= ${MAX_COMPOSITE_PROMPT_CHARS})`, {
|
|
26127
26178
|
type: "progress",
|
|
@@ -26472,7 +26523,7 @@ ${currentContent}` }],
|
|
|
26472
26523
|
});
|
|
26473
26524
|
}
|
|
26474
26525
|
const lessonExcerptResult = buildSectionAwareExcerpt(lessonContent, {
|
|
26475
|
-
priorities:
|
|
26526
|
+
priorities: SATELLITE_LESSON_PRIORITIES,
|
|
26476
26527
|
budget: 12e3,
|
|
26477
26528
|
sectionLanguageContract: slcMarkdown,
|
|
26478
26529
|
artifactType: "LESSON"
|
|
@@ -26662,6 +26713,7 @@ ${buildHeadingDirective("QUIZ", slcMarkdown, targetLang)}`;
|
|
|
26662
26713
|
} catch {
|
|
26663
26714
|
}
|
|
26664
26715
|
const { executeSlideProductionWorkflow: executeSlideProductionWorkflow2 } = await Promise.resolve().then(() => (init_slideProductionWorkflow(), slideProductionWorkflow_exports));
|
|
26716
|
+
const slideGroundContext = `${commonContext}${symbolLedgerBlock}`;
|
|
26665
26717
|
const workflowResult = await executeSlideProductionWorkflow2({
|
|
26666
26718
|
lessonMarkdown: lessonContent || "",
|
|
26667
26719
|
lessonCode,
|
|
@@ -26670,6 +26722,7 @@ ${buildHeadingDirective("QUIZ", slcMarkdown, targetLang)}`;
|
|
|
26670
26722
|
language: targetLang || "Vietnamese",
|
|
26671
26723
|
languageDirective,
|
|
26672
26724
|
headingDirective: buildHeadingDirective("SLIDE", slcMarkdown, targetLang),
|
|
26725
|
+
groundContext: slideGroundContext,
|
|
26673
26726
|
satelliteContext,
|
|
26674
26727
|
runnerOptions,
|
|
26675
26728
|
onProgress: (agent, msg, meta) => {
|
|
@@ -26678,7 +26731,7 @@ ${buildHeadingDirective("QUIZ", slcMarkdown, targetLang)}`;
|
|
|
26678
26731
|
});
|
|
26679
26732
|
let deckJson = workflowResult.deckJson;
|
|
26680
26733
|
const markdownWrapper = workflowResult.markdownWrapper;
|
|
26681
|
-
let validation = presentationKitAi?.validateHtmlSlideDeck ? presentationKitAi.validateHtmlSlideDeck(deckJson, true) : deckJson && Array.isArray(deckJson.slides) ? { valid: true, score: 95, issues: [], slideCount: deckJson.slides.length} : { valid: false, score: 0, issues: [{ message: "Malformed JSON slide deck" }]
|
|
26734
|
+
let validation = presentationKitAi?.validateHtmlSlideDeck ? presentationKitAi.validateHtmlSlideDeck(deckJson, true) : deckJson && Array.isArray(deckJson.slides) ? { valid: true, score: 95, issues: [], slideCount: deckJson.slides.length} : { valid: false, score: 0, issues: [{ message: "Malformed JSON slide deck" }]};
|
|
26682
26735
|
await storage.saveArtifact(projectId, slideRelPath, markdownWrapper);
|
|
26683
26736
|
producedArtifacts.push(`SLIDE_${lessonCode}.md`);
|
|
26684
26737
|
if (deckJson) {
|
|
@@ -26698,21 +26751,45 @@ ${buildHeadingDirective("QUIZ", slcMarkdown, targetLang)}`;
|
|
|
26698
26751
|
}
|
|
26699
26752
|
}
|
|
26700
26753
|
}
|
|
26701
|
-
const
|
|
26702
|
-
const
|
|
26703
|
-
|
|
26704
|
-
|
|
26705
|
-
|
|
26706
|
-
|
|
26707
|
-
|
|
26708
|
-
|
|
26709
|
-
|
|
26710
|
-
|
|
26711
|
-
|
|
26712
|
-
|
|
26713
|
-
|
|
26714
|
-
|
|
26715
|
-
|
|
26754
|
+
const structuralOk = Boolean(validation.valid && (validation.score ?? 100) >= 80);
|
|
26755
|
+
const structuralScore = validation.score ?? (structuralOk ? 95 : 50);
|
|
26756
|
+
const gateMode = gateModeFor(gates, "SLIDE");
|
|
26757
|
+
if (!structuralOk) {
|
|
26758
|
+
await storage.updateArtifactState(projectId, lessonCode, "SLIDE", {
|
|
26759
|
+
state: "rejected",
|
|
26760
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
26761
|
+
contentHash: computeContentHash(markdownWrapper),
|
|
26762
|
+
review: {
|
|
26763
|
+
decision: "NEEDS_REVISION",
|
|
26764
|
+
reviewedBy: "@heuristic-linter",
|
|
26765
|
+
reviewedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
26766
|
+
score: structuralScore,
|
|
26767
|
+
critique: `HTML Slide Deck failed schema validation: ${(validation.issues || []).map((i) => i.message).join("; ")}`
|
|
26768
|
+
}
|
|
26769
|
+
});
|
|
26770
|
+
onProgress?.("@reviewer", `\u26A0\uFE0F SLIDE structural pre-check FAILED (${structuralScore}/100) [html-deck schema issues]`);
|
|
26771
|
+
} else {
|
|
26772
|
+
await storage.updateArtifactState(projectId, lessonCode, "SLIDE", {
|
|
26773
|
+
state: gateMode === "LLM_JUDGE" ? "pending" : "completed",
|
|
26774
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
26775
|
+
contentHash: computeContentHash(markdownWrapper)
|
|
26776
|
+
});
|
|
26777
|
+
onProgress?.("@reviewer", gateMode === "LLM_JUDGE" ? `\u2705 SLIDE structural pre-check PASS (${structuralScore}/100) \u2014 handing content review to LLM-as-Judge gate` : `\u2705 SLIDE structural pre-check PASS (${structuralScore}/100) [gate=${gateMode}, no LLM judge]`);
|
|
26778
|
+
const deckTextForJudge = Array.isArray(deckJson?.slides) ? deckJson.slides.map((s, i) => {
|
|
26779
|
+
const slotLines = Object.entries(s.slots || {}).map(([k, v]) => {
|
|
26780
|
+
if (Array.isArray(v)) return `- ${k}:
|
|
26781
|
+
${v.map((item) => typeof item === "object" ? ` - ${JSON.stringify(item)}` : ` - ${item}`).join("\n")}`;
|
|
26782
|
+
if (v && typeof v === "object") return `- ${k}: ${JSON.stringify(v, null, 1)}`;
|
|
26783
|
+
return `- ${k}: ${v}`;
|
|
26784
|
+
}).join("\n");
|
|
26785
|
+
return `## Slide ${i + 1} [${s.layoutId}]
|
|
26786
|
+
${slotLines}
|
|
26787
|
+
|
|
26788
|
+
Presenter Notes:
|
|
26789
|
+
${s.notes || "(none)"}`;
|
|
26790
|
+
}).join("\n\n") : String(markdownWrapper);
|
|
26791
|
+
await judgeSat("SLIDE", deckTextForJudge);
|
|
26792
|
+
}
|
|
26716
26793
|
} else {
|
|
26717
26794
|
const canonicalSlideTemplate = loadCurriculumTemplate("SLIDE_template.md");
|
|
26718
26795
|
const templateScaffold = canonicalSlideTemplate || `---
|
|
@@ -31715,6 +31792,6 @@ function renderMediaPlaceholder(entry) {
|
|
|
31715
31792
|
return `> \u{1F5BC}\uFE0F [\u1EA2nh \u0111ang ch\u1EDD: ${entry.name} \u2014 s\u1EBD \u0111\u01B0\u1EE3c t\u1EA1o sau khi duy\u1EC7t media]`;
|
|
31716
31793
|
}
|
|
31717
31794
|
|
|
31718
|
-
export { ACT_TEMPLATE, ARTIFACT_DEPENDENCY_ROUTING, 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_ARTIFACT_STREAM_IDLE_MS, DEFAULT_ARTIFACT_STREAM_TOTAL_MS, DEFAULT_ENABLED_PROVIDERS, DEFAULT_GATE_SETTINGS, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DEFAULT_VIETNAMESE_SECTION_HEADINGS, 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, GeneratedSlideArraySchema, GeneratedSlideSchema, GlossaryQuickRefRowSchema, GlossarySchema, GlossaryTermSchema, GoldTierSchema, GradeBandSchema, GraphicOrganizerItemSchema, GraphicOrganizerSchema, HANDOUT_TEMPLATE, HandoutSchema, HandoutSectionSchema, HybridBlueprintArraySchema, HybridBlueprintItemSchema, HybridDeckSlideArraySchema, HybridDeckSlideSchema, HybridPipelineError, InstructionSectionSchema, InstructionStepSchema, JudgeCriterionSchema, LAYER_IDLE_BUDGET_MS, 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_CANONICAL_METHODOLOGY, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STANDARD_REF_REGEX, STANDARD_SOT_FILES, STATION_ROTATION_TEMPLATE, ScaffoldDecisionEntrySchema, ScaffoldDecisionSchema, ScienceLabSchema, ScoringRubricRowSchema, SelfLabSchema, SelfPacedBundleSchema, SelfPacedChallengeSchema, SessionPlanSchema, SilverTierSchema, SlideBlueprintArraySchema, SlideBlueprintItemSchema, 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, assertAcyclic, assessorTools, auditCurriculumQualityFlow, auditQualityReport, buildActivityPrompt, buildCodeLabPrompt, buildCurriculumContext, buildCurriculumPlan, buildDeliveryPackages, buildDiagnosticQuizPrompt, buildDomainLexiconGuardrail, buildExpositionContext, buildExpositionExcerpt, buildExtensionPrompt, buildHandoutPrompt, buildHeadingDirective, buildHtmlDeckSlidePrompt, buildImagePrompt, buildJudgePrompt, buildLanguageDirective, buildLessonExcerpt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildProjectInstructionPrompt, buildSectionAwareExcerpt, buildSelfLabPrompt, buildSessionSliceContext, buildSlidesPrompt, buildStandardStackMarkdown, buildStandardsContext, buildStandardsContextBlock, buildTeacherGuidePrompt, buildWorksheetPrompt, closeTruncatedJson, computeContentHash, computePackingSpec, conductPreliminaryResearch, contentTools, convertRoadmapToFoundationSot, createAiInferenceError, createContextMissingError, createCurriculumStorage, createIdleAbortController, createStreamAbortController, createStreamAbortSignal, createStreamChunkExtractor, curateMediaLedger, designerTools, detectProjectPedagogy, ensureExpositionForLesson, ensureKnowledgeExposition, evaluateStandardsCoverage, executeCurriculumCommand, executeSlideProductionWorkflow, exportAllProjectQuizzes, expositionCacheKey, extractCurriculumHorizon, extractJsonArray, extractScopeSequenceRows, extractSectionHeadingsFromSLC, extractSessionSlice, extractStandardRefs, extractStreamChunk, extractSymbolLedger, extractThoughtAndContent, findStandardStatement, formatQuizzesToCsv, fulfillMediaLedger, gateModeFor, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateEducationalImage, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateMilestoneCurriculumBundle, generatePhase1SotArtifacts, generatePhase2SotArtifacts, generateProjectInstruction, generateProjectInstructionFlow, generateRoadmapCurriculum, generateSelfLabFlow, generateSelfPacedBundle, generateSingleArtifact, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, getAIModel, getArtifactMetadata, getDesignatedFallbackChain, getDesignatedFallbackConfig, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, illustratorTools, importRoadmapToProject, ingestProjectGraphIntoProject, initializeProjectInStorage, injectMediaIntoMarkdown, isExpositionFresh, isModelAllowed, isProviderEnabled, isTranslationDue, lintAndSanitizeArtifact, lintCurriculumFramework, lintFrameworkPack, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, normalizeSlcContract, packagerTools, parseAllSessions, parseGateSettings, parseQuizMarkdown, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, publishToGitHub, publishToSupabase, rankGenCandidates, renderFrameworkFromPlan, renderHorizonPromptBlock, renderMediaPlaceholder, researcherTools, resolveGateSettings, resolveStandardsPacks, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, reviewerTools, runCurriculumAIInference, safeParseJson, searchEducationalImages, searchEducationalVideos, selectStatementsForLesson, serializeActivityToMarkdown, serializeCodeLabToMarkdown, serializeDiagnosticQuizToMarkdown, serializeHandoutToMarkdown, serializeLessonToMarkdown, serializeProjectInstructionToMarkdown, serializeSelfLabToMarkdown, slugifyProjectName, streamCurriculumAIInference, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLLMWithFallback, streamLayerPrefillWithFallback, streamLessonMasterFlow, streamSelfLabFlow, stripLlmJsonWrappers, targetLanguageDisplayName, techSmeTools, topoSort, uploadAssetToBucket, validateArtifactDependencies, validateCurriculumPlan, validateFrameworkPack, validateHorizonCompliance, validateHybridDeckSlides, validateMarkdownTables, validateMermaidSyntax, withAutoRepair };
|
|
31795
|
+
export { ACT_TEMPLATE, ARTIFACT_DEPENDENCY_ROUTING, 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_ARTIFACT_STREAM_IDLE_MS, DEFAULT_ARTIFACT_STREAM_TOTAL_MS, DEFAULT_ENABLED_PROVIDERS, DEFAULT_GATE_SETTINGS, DEFAULT_KX_PRIORITIES, DEFAULT_LESSON_PRIORITIES, DEFAULT_STREAM_IDLE_MS, DEFAULT_STREAM_TOTAL_MS, DEFAULT_VIETNAMESE_SECTION_HEADINGS, 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, GeneratedSlideArraySchema, GeneratedSlideSchema, GlossaryQuickRefRowSchema, GlossarySchema, GlossaryTermSchema, GoldTierSchema, GradeBandSchema, GraphicOrganizerItemSchema, GraphicOrganizerSchema, HANDOUT_TEMPLATE, HandoutSchema, HandoutSectionSchema, HybridBlueprintArraySchema, HybridBlueprintItemSchema, HybridDeckSlideArraySchema, HybridDeckSlideSchema, HybridPipelineError, InstructionSectionSchema, InstructionStepSchema, JudgeCriterionSchema, LAYER_IDLE_BUDGET_MS, 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, SATELLITE_LESSON_PRIORITIES, SCIENCE_LAB_TEMPLATE, SELF_LAB_TEMPLATE, SLIDE_CANONICAL_METHODOLOGY, SLIDE_LAYOUT_PRESETS, SLIDE_TEMPLATE, STANDARD_REF_REGEX, STANDARD_SOT_FILES, STATION_ROTATION_TEMPLATE, ScaffoldDecisionEntrySchema, ScaffoldDecisionSchema, ScienceLabSchema, ScoringRubricRowSchema, SelfLabSchema, SelfPacedBundleSchema, SelfPacedChallengeSchema, SessionPlanSchema, SilverTierSchema, SlideBlueprintArraySchema, SlideBlueprintItemSchema, 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, assertAcyclic, assessorTools, atomicWriteFileSync, auditCurriculumQualityFlow, auditQualityReport, buildActivityPrompt, buildCodeLabPrompt, buildCurriculumContext, buildCurriculumPlan, buildDeliveryPackages, buildDiagnosticQuizPrompt, buildDomainLexiconGuardrail, buildExpositionContext, buildExpositionExcerpt, buildExtensionPrompt, buildHandoutPrompt, buildHeadingDirective, buildHtmlDeckSlidePrompt, buildImagePrompt, buildJudgePrompt, buildLanguageDirective, buildLessonExcerpt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildProjectInstructionPrompt, buildSectionAwareExcerpt, buildSelfLabPrompt, buildSessionSliceContext, buildSlidesPrompt, buildStandardStackMarkdown, buildStandardsContext, buildStandardsContextBlock, buildTeacherGuidePrompt, buildWorksheetPrompt, closeTruncatedJson, computeContentHash, computePackingSpec, conductPreliminaryResearch, contentTools, convertRoadmapToFoundationSot, createAiInferenceError, createContextMissingError, createCurriculumStorage, createIdleAbortController, createStreamAbortController, createStreamAbortSignal, createStreamChunkExtractor, curateMediaLedger, designerTools, detectProjectPedagogy, emitUsage, ensureExpositionForLesson, ensureKnowledgeExposition, evaluateStandardsCoverage, executeCurriculumCommand, executeSlideProductionWorkflow, exportAllProjectQuizzes, expositionCacheKey, extractCurriculumHorizon, extractJsonArray, extractScopeSequenceRows, extractSectionHeadingsFromSLC, extractSessionSlice, extractStandardRefs, extractStreamChunk, extractSymbolLedger, extractThoughtAndContent, findStandardStatement, formatQuizzesToCsv, fulfillMediaLedger, gateModeFor, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateEducationalImage, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateMilestoneCurriculumBundle, generatePhase1SotArtifacts, generatePhase2SotArtifacts, generateProjectInstruction, generateProjectInstructionFlow, generateRoadmapCurriculum, generateSelfLabFlow, generateSelfPacedBundle, generateSingleArtifact, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, getAIModel, getArtifactMetadata, getDesignatedFallbackChain, getDesignatedFallbackConfig, getLessonMetadata, getProjectArtifactScope, getProjectStatusReport, getSlideLayoutPresetById, getSlideLayoutPresetsByCategory, getSmartResumeContext, glossaryTermsForSession, illustratorTools, importRoadmapToProject, ingestProjectGraphIntoProject, initializeProjectInStorage, injectMediaIntoMarkdown, isExpositionFresh, isModelAllowed, isProviderEnabled, isTranslationDue, lintAndSanitizeArtifact, lintCurriculumFramework, lintFrameworkPack, loadCurriculumTemplate, loadSotTemplate, normalizePlanningGraph, normalizeSlcContract, packagerTools, parseAllSessions, parseGateSettings, parseQuizMarkdown, parseRoadmapJsonToProjectPayload, produceBatchLessons, produceSingleLesson, publishToGitHub, publishToSupabase, rankGenCandidates, renderFrameworkFromPlan, renderHorizonPromptBlock, renderMediaPlaceholder, researcherTools, resolveGateSettings, resolveStandardsPacks, resolveStreamBudget, resolveTargetLanguageCode, resolveTranslationTargets, reviewerTools, runCurriculumAIInference, safeParseJson, searchEducationalImages, searchEducationalVideos, selectStatementsForLesson, serializeActivityToMarkdown, serializeCodeLabToMarkdown, serializeDiagnosticQuizToMarkdown, serializeHandoutToMarkdown, serializeLessonToMarkdown, serializeProjectInstructionToMarkdown, serializeSelfLabToMarkdown, slugifyProjectName, streamCurriculumAIInference, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLLMWithFallback, streamLayerPrefillWithFallback, streamLessonMasterFlow, streamSelfLabFlow, stripLlmJsonWrappers, targetLanguageDisplayName, techSmeTools, topoSort, uploadAssetToBucket, validateArtifactDependencies, validateCurriculumPlan, validateFrameworkPack, validateHorizonCompliance, validateHybridDeckSlides, validateMarkdownTables, validateMermaidSyntax, withAutoRepair };
|
|
31719
31796
|
//# sourceMappingURL=index.mjs.map
|
|
31720
31797
|
//# sourceMappingURL=index.mjs.map
|