import { M as ModelResolutionOptions } from '../provider-factory-Bv-eIkhg.cjs'; export { A as AIProviderName, N as NVIDIA_MODELS, g as getAIModel } from '../provider-factory-Bv-eIkhg.cjs'; import { MilestoneInput, LessonPlan, ActivityLab, ProjectGraph, CodeLab, Worksheet, Handout, SlideDeck, TeacherGuide, Extension, CurriculumQualityReport, MacroPedagogyPlanAuditReport, ProjectGraphAuditReport, ProjectInstruction, SelfLab, DiagnosticQuiz } from '../schemas/index.cjs'; import * as ai from 'ai'; import { a as ChatMessage, S as StreamRunnerOptions, n as ToolLoopConfig, C as ChunkType } from '../streamRunner-BzlJrAGZ.cjs'; export { A as AggregatedToolCall, D as DEFAULT_ARTIFACT_STREAM_IDLE_MS, d as DEFAULT_ARTIFACT_STREAM_TOTAL_MS, F as FallbackTarget, I as IdleAbort, f as StreamAbortController, T as ToolDefinition, l as ToolExecutionResult, m as ToolExecutor, j as createIdleAbortController, h as createStreamAbortController, e as extractThoughtAndContent, g as getDesignatedFallbackChain, c as getDesignatedFallbackConfig, b as isModelAllowed, i as isProviderEnabled, r as resolveApiKey, k as runCurriculumAIInference, s as streamCurriculumAIInference } from '../streamRunner-BzlJrAGZ.cjs'; import { z } from 'zod'; interface LessonPromptInput { milestone: MilestoneInput; language: string; topic?: string; targetAudience?: string; contextContinuity?: string; /** Pre-rendered STANDARDS CONTEXT block (from buildStandardsContextBlock) — verbatim standard statements binding this lesson. */ standardsContext?: string; } declare function buildLessonMasterPrompt(input: LessonPromptInput): string; interface ActivityPromptInput { lesson: LessonPlan; language: string; hardwareBOM?: string[]; softwareTools?: string[]; } declare function buildActivityPrompt(input: ActivityPromptInput): string; interface CodeLabPromptInput { lesson: LessonPlan; activity?: ActivityLab; language: string; targetTechStack?: string[]; } declare function buildCodeLabPrompt(input: CodeLabPromptInput): string; interface WorksheetPromptInput { lesson: LessonPlan; language: string; } declare function buildWorksheetPrompt(input: WorksheetPromptInput): string; interface HandoutPromptInput { lesson: LessonPlan; language: string; } declare function buildHandoutPrompt(input: HandoutPromptInput): string; interface SlidesPromptInput { lesson: LessonPlan; language: string; marpTheme?: string; } declare function buildSlidesPrompt(input: SlidesPromptInput): string; declare const SLIDE_CANONICAL_METHODOLOGY: string; interface MarpMarkdownSlidePromptInput { lessonCode: string; lessonTitle: string; pedagogyLabel: string; templateScaffold: string; languageDirective: string; headingDirective: string; /** Canonical LESSON phase content — the same SOURCE OF TRUTH block the * bespoke/hybrid engines receive. Kit 1.5.55: without it the marp model * drifted to a different subject entirely (L02 run 2026-09-30 authored a * Python If/Else deck for a SwiftUI layout lesson). */ lessonFlowExcerpt?: string; /** Optional REQUIRED slide outline (kit 1.5.61): ordered section titles the * deck MUST cover in order — the same structural ground truth the HTML * engines' blueprint receives, so all three engines align on one outline. * Absent → the 12-14 slide micro-cycle template structure applies. */ slidesOutline?: string[]; } declare function buildMarpMarkdownSlidePrompt(input: MarpMarkdownSlidePromptInput): string; interface HtmlDeckSlidePromptInput { lessonCode: string; lessonTitle: string; pedagogyLabel: string; languageDirective: string; headingDirective: string; glossaryBlock?: string; customContract?: string; } declare function buildHtmlDeckSlidePrompt(input: HtmlDeckSlidePromptInput): string; interface TeacherGuidePromptInput { lesson: LessonPlan; activity?: ActivityLab; language: string; } declare function buildTeacherGuidePrompt(input: TeacherGuidePromptInput): string; interface ExtensionPromptInput { lesson: LessonPlan; activity?: ActivityLab; language: string; } declare function buildExtensionPrompt(input: ExtensionPromptInput): string; interface JudgePromptInput { targetArtifactType: string; lessonId: string; expectedLanguage: string; targetObjectives: Array<{ code: string; description: string; bloomLevel: string; }>; generatedContentJson: string; /** * VERBATIM standard statements relevant to this artifact, keyed by canonical ID * ("packId:statementId" -> verbatim text). Sourced from the Standards Registry. * The judge compares the candidate against the REAL standard text, never memory. * Optional for backward compatibility. */ standardStatements?: Record; } declare function buildJudgePrompt(input: JudgePromptInput): string; /** * Stage 2: Macro-Pedagogy Curriculum Plan Judge Prompt */ interface CurriculumPlanJudgePromptInput { planJson: string; briefingContext: string; expectedLanguage?: string; linterFindings?: Array<{ id: string; severity: string; title: string; description: string; }>; } declare function buildCurriculumPlanJudgePrompt(input: CurriculumPlanJudgePromptInput): string; /** * Stage 1: Project Graph Toolchain & Environment Provisioning Judge Prompt */ interface ProjectGraphJudgePromptInput { bundleJson: string; briefingContext: string; linterFindings?: Array<{ id: string; severity: string; title: string; description: string; }>; } declare function buildProjectGraphJudgePrompt(input: ProjectGraphJudgePromptInput): string; interface ProjectInstructionPromptInput { projectGraph?: ProjectGraph; milestone: MilestoneInput; roadmapContext?: { projectTitle?: string; techStack?: string[]; phaseTitle?: string; }; researchNotes?: string; externalResources?: string[]; language: string; difficulty?: 'beginner' | 'intermediate' | 'advanced'; } declare function buildProjectInstructionPrompt(input: ProjectInstructionPromptInput): string; interface SelfLabPromptInput { milestone: MilestoneInput; projectGraph?: ProjectGraph; language: string; targetTechStack?: string[]; contextContinuity?: string; } declare function buildSelfLabPrompt(input: SelfLabPromptInput): string; interface DiagnosticQuizPromptInput { milestone: MilestoneInput; language: string; questionCount?: number; passingScorePct?: number; } declare function buildDiagnosticQuizPrompt(input: DiagnosticQuizPromptInput): string; interface GenerateLessonMasterInput extends Omit { milestone: MilestoneInput; modelOptions?: ModelResolutionOptions; } declare function generateLessonMasterFlow(input: GenerateLessonMasterInput): Promise; interface GenerateActivityInput extends Omit { lesson: LessonPlan; modelOptions?: ModelResolutionOptions; } declare function generateActivityFlow(input: GenerateActivityInput): Promise; interface GenerateCodeLabInput extends Omit { lesson: LessonPlan; activity?: ActivityLab; modelOptions?: ModelResolutionOptions; } declare function generateCodeLabFlow(input: GenerateCodeLabInput): Promise; interface GenerateWorksheetInput extends Omit { lesson: LessonPlan; modelOptions?: ModelResolutionOptions; } declare function generateWorksheetFlow(input: GenerateWorksheetInput): Promise; interface GenerateHandoutInput extends Omit { lesson: LessonPlan; modelOptions?: ModelResolutionOptions; } declare function generateHandoutFlow(input: GenerateHandoutInput): Promise; interface GenerateSlidesInput extends Omit { lesson: LessonPlan; modelOptions?: ModelResolutionOptions; } declare function generateSlidesFlow(input: GenerateSlidesInput): Promise; interface GenerateTeacherGuideInput extends Omit { lesson: LessonPlan; activity?: ActivityLab; modelOptions?: ModelResolutionOptions; } declare function generateTeacherGuideFlow(input: GenerateTeacherGuideInput): Promise; interface GenerateExtensionInput extends Omit { lesson: LessonPlan; activity?: ActivityLab; modelOptions?: ModelResolutionOptions; } declare function generateExtensionFlow(input: GenerateExtensionInput): Promise; interface AuditCurriculumQualityInput extends JudgePromptInput { modelOptions?: ModelResolutionOptions; } declare function auditCurriculumQualityFlow(input: AuditCurriculumQualityInput): Promise; interface AuditCurriculumPlanInput extends CurriculumPlanJudgePromptInput { modelOptions?: ModelResolutionOptions; } declare function auditCurriculumPlanFlow(input: AuditCurriculumPlanInput): Promise; interface AuditProjectGraphInput extends ProjectGraphJudgePromptInput { modelOptions?: ModelResolutionOptions; } declare function auditProjectGraphFlow(input: AuditProjectGraphInput): Promise; interface GenerateProjectInstructionInput extends ProjectInstructionPromptInput { modelOptions?: ModelResolutionOptions; } declare function generateProjectInstructionFlow(input: GenerateProjectInstructionInput): Promise; interface GenerateSelfLabInput { milestone: MilestoneInput; projectGraph?: ProjectGraph; language: string; targetTechStack?: string[]; contextContinuity?: string; modelOptions?: ModelResolutionOptions; } declare function generateSelfLabFlow(input: GenerateSelfLabInput): Promise; interface GenerateDiagnosticQuizInput { milestone: MilestoneInput; language: string; questionCount?: number; passingScorePct?: number; modelOptions?: ModelResolutionOptions; } declare function generateDiagnosticQuizFlow(input: GenerateDiagnosticQuizInput): Promise; interface StreamLessonMasterInput extends Omit { milestone: MilestoneInput; modelOptions?: ModelResolutionOptions; } declare function streamLessonMasterFlow(input: StreamLessonMasterInput): Promise>; interface StreamSelfLabInput { milestone: MilestoneInput; language: string; targetTechStack?: string[]; contextContinuity?: string; modelOptions?: ModelResolutionOptions; } declare function streamSelfLabFlow(input: StreamSelfLabInput): Promise>; interface StreamDiagnosticQuizInput { milestone: MilestoneInput; language: string; questionCount?: number; passingScorePct?: number; modelOptions?: ModelResolutionOptions; } declare function streamDiagnosticQuizFlow(input: StreamDiagnosticQuizInput): Promise>; /** * Specialist Sub-Agent Toolbelts (Parity with LangGraph AGENTS.md & nodes) * * Provides typed Zod tool schemas and execution contracts for 10 specialist personas: * 1. @analyst — Brief analysis, learner profile, age group constraints * 2. @researcher — Ground Truth, reference pack, evidence scoring * 3. @designer — 3-level Curriculum Framework, Bloom matrix, prerequisite graph * 4. @content — 5E Lesson Plan, Lesson contract, Section patching * 5. @activity — STEM Activity Operations, ACT contract validation * 6. @assessor — Diagnostic quizzes, question bank, rubric matrix * 7. @illustrator — Mermaid diagrams, technical illustrations, visual assets * 8. @tech_sme — Code Lab sandbox execution, syntax validation, runtime checking * 9. @reviewer — Alignment matrix audit, reading level check, scope drift detection * 10. @packager — 4 Delivery packs (Teacher, Student, Parent, Client), Handover Doc */ declare const analystTools: { analyzeLearnerProfile: { name: string; description: string; schema: z.ZodObject<{ targetAge: z.ZodString; priorKnowledge: z.ZodString; cognitiveBarriers: z.ZodArray; transitionStrategy: z.ZodString; }, "strip", z.ZodTypeAny, { targetAge: string; priorKnowledge: string; cognitiveBarriers: string[]; transitionStrategy: string; }, { targetAge: string; priorKnowledge: string; cognitiveBarriers: string[]; transitionStrategy: string; }>; }; validatePrerequisites: { name: string; description: string; schema: z.ZodObject<{ requiredConcepts: z.ZodArray; entryBenchmark: z.ZodString; }, "strip", z.ZodTypeAny, { requiredConcepts: string[]; entryBenchmark: string; }, { requiredConcepts: string[]; entryBenchmark: string; }>; }; writeLearnerProfile: { name: string; description: string; schema: z.ZodObject<{ projectSlug: z.ZodString; markdownContent: z.ZodString; }, "strip", z.ZodTypeAny, { projectSlug: string; markdownContent: string; }, { projectSlug: string; markdownContent: string; }>; }; }; declare const researcherTools: { searchAcademicStandards: { name: string; description: string; schema: z.ZodObject<{ query: z.ZodString; standardCategory: z.ZodDefault>; }, "strip", z.ZodTypeAny, { query: string; standardCategory: "CSTA" | "CS2023" | "OFFICIAL_DOCS" | "ALL"; }, { query: string; standardCategory?: "CSTA" | "CS2023" | "OFFICIAL_DOCS" | "ALL" | undefined; }>; }; scoreEvidence: { name: string; description: string; schema: z.ZodObject<{ sourceUrl: z.ZodString; sourceType: z.ZodEnum<["academic_paper", "official_doc", "curriculum_standard", "community_article"]>; reliabilityScore: z.ZodNumber; }, "strip", z.ZodTypeAny, { sourceUrl: string; sourceType: "academic_paper" | "official_doc" | "curriculum_standard" | "community_article"; reliabilityScore: number; }, { sourceUrl: string; sourceType: "academic_paper" | "official_doc" | "curriculum_standard" | "community_article"; reliabilityScore: number; }>; }; writeReferencePack: { name: string; description: string; schema: z.ZodObject<{ projectSlug: z.ZodString; references: z.ZodArray, "many">; cs2023Area: z.ZodOptional; }, "strip", z.ZodTypeAny, { references: { title: string; id: string; sourceUrl: string; relevanceScore: number; }[]; projectSlug: string; cs2023Area?: string | undefined; }, { references: { title: string; id: string; sourceUrl: string; relevanceScore: number; }[]; projectSlug: string; cs2023Area?: string | undefined; }>; }; }; declare const designerTools: { buildScopeAndSequence: { name: string; description: string; schema: z.ZodObject<{ totalWeeks: z.ZodDefault; totalSessions: z.ZodDefault; units: z.ZodArray, "many">; }, "strip", z.ZodTypeAny, { units: { title: string; bloomTarget: string; unitId: string; projectDeliverable: string; sessionCount: number; }[]; totalWeeks: number; totalSessions: number; }, { units: { title: string; bloomTarget: string; unitId: string; projectDeliverable: string; sessionCount: number; }[]; totalWeeks?: number | undefined; totalSessions?: number | undefined; }>; }; writeCurriculumFramework: { name: string; description: string; schema: z.ZodObject<{ projectSlug: z.ZodString; frameworkMarkdown: z.ZodString; standardRefs: z.ZodOptional; }, "strip", z.ZodTypeAny, { unitId: string; standardIds: string[]; }, { unitId: string; standardIds: string[]; }>, "many">>; }, "strip", z.ZodTypeAny, { projectSlug: string; frameworkMarkdown: string; standardRefs?: { unitId: string; standardIds: string[]; }[] | undefined; }, { projectSlug: string; frameworkMarkdown: string; standardRefs?: { unitId: string; standardIds: string[]; }[] | undefined; }>; }; }; declare const contentTools: { scaffold5ELesson: { name: string; description: string; schema: z.ZodObject<{ lessonId: z.ZodString; title: z.ZodString; learningObjectives: z.ZodArray>; }, "strip", z.ZodTypeAny, { code: string; statement: string; standardRefs?: string[] | undefined; }, { code: string; statement: string; standardRefs?: string[] | undefined; }>, "many">; durationMinutes: z.ZodDefault; }, "strip", z.ZodTypeAny, { durationMinutes: number; lessonId: string; title: string; learningObjectives: { code: string; statement: string; standardRefs?: string[] | undefined; }[]; }, { lessonId: string; title: string; learningObjectives: { code: string; statement: string; standardRefs?: string[] | undefined; }[]; durationMinutes?: number | undefined; }>; }; writeLessonBody: { name: string; description: string; schema: z.ZodObject<{ lessonId: z.ZodString; fullMarkdown: z.ZodString; activitySequence: z.ZodArray; }, "strip", z.ZodTypeAny, { lessonId: string; activitySequence: string[]; fullMarkdown: string; }, { lessonId: string; activitySequence: string[]; fullMarkdown: string; }>; }; patchLessonSection: { name: string; description: string; schema: z.ZodObject<{ filePath: z.ZodString; targetSectionHeader: z.ZodString; replacementMarkdown: z.ZodString; }, "strip", z.ZodTypeAny, { filePath: string; targetSectionHeader: string; replacementMarkdown: string; }, { filePath: string; targetSectionHeader: string; replacementMarkdown: string; }>; }; }; declare const activityTools: { writeActLabOperations: { name: string; description: string; schema: z.ZodObject<{ lessonId: z.ZodString; targetPlatform: z.ZodDefault; stepByStepSteps: z.ZodArray; solutionCodeSnippet: z.ZodOptional; }, "strip", z.ZodTypeAny, { stepNumber: number; instruction: string; starterCodeSnippet?: string | undefined; solutionCodeSnippet?: string | undefined; }, { stepNumber: number; instruction: string; starterCodeSnippet?: string | undefined; solutionCodeSnippet?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { lessonId: string; targetPlatform: string; stepByStepSteps: { stepNumber: number; instruction: string; starterCodeSnippet?: string | undefined; solutionCodeSnippet?: string | undefined; }[]; }, { lessonId: string; stepByStepSteps: { stepNumber: number; instruction: string; starterCodeSnippet?: string | undefined; solutionCodeSnippet?: string | undefined; }[]; targetPlatform?: string | undefined; }>; }; }; declare const assessorTools: { writeQuizBank: { name: string; description: string; schema: z.ZodObject<{ lessonId: z.ZodString; questions: z.ZodArray; correctIndex: z.ZodNumber; explanation: z.ZodString; bloomLevel: z.ZodString; }, "strip", z.ZodTypeAny, { options: string[]; bloomLevel: string; explanation: string; prompt: string; id: string; correctIndex: number; }, { options: string[]; bloomLevel: string; explanation: string; prompt: string; id: string; correctIndex: number; }>, "many">; }, "strip", z.ZodTypeAny, { lessonId: string; questions: { options: string[]; bloomLevel: string; explanation: string; prompt: string; id: string; correctIndex: number; }[]; }, { lessonId: string; questions: { options: string[]; bloomLevel: string; explanation: string; prompt: string; id: string; correctIndex: number; }[]; }>; }; generateRubricMatrix: { name: string; description: string; schema: z.ZodObject<{ lessonId: z.ZodString; criteria: z.ZodArray; }, "strip", z.ZodTypeAny, { criterionName: string; weight: number; levels: Record; }, { criterionName: string; weight: number; levels: Record; }>, "many">; }, "strip", z.ZodTypeAny, { criteria: { criterionName: string; weight: number; levels: Record; }[]; lessonId: string; }, { criteria: { criterionName: string; weight: number; levels: Record; }[]; lessonId: string; }>; }; }; declare const illustratorTools: { generateMermaidDiagram: { name: string; description: string; schema: z.ZodObject<{ diagramType: z.ZodEnum<["flowchart", "sequenceDiagram", "classDiagram", "stateDiagram"]>; mermaidCode: z.ZodString; }, "strip", z.ZodTypeAny, { mermaidCode: string; diagramType: "flowchart" | "sequenceDiagram" | "classDiagram" | "stateDiagram"; }, { mermaidCode: string; diagramType: "flowchart" | "sequenceDiagram" | "classDiagram" | "stateDiagram"; }>; }; generateSlideDeck: { name: string; description: string; schema: z.ZodObject<{ lessonId: z.ZodString; marpMarkdown: z.ZodString; }, "strip", z.ZodTypeAny, { lessonId: string; marpMarkdown: string; }, { lessonId: string; marpMarkdown: string; }>; }; }; declare const techSmeTools: { sandboxExecuteCodeLab: { name: string; description: string; schema: z.ZodObject<{ language: z.ZodEnum<["swift", "python", "javascript", "html_css"]>; code: z.ZodString; expectedOutput: z.ZodOptional; }, "strip", z.ZodTypeAny, { code: string; language: "swift" | "python" | "javascript" | "html_css"; expectedOutput?: string | undefined; }, { code: string; language: "swift" | "python" | "javascript" | "html_css"; expectedOutput?: string | undefined; }>; }; lintSyntaxErrors: { name: string; description: string; schema: z.ZodObject<{ language: z.ZodString; code: z.ZodString; }, "strip", z.ZodTypeAny, { code: string; language: string; }, { code: string; language: string; }>; }; }; declare const reviewerTools: { auditAlignmentMatrix: { name: string; description: string; schema: z.ZodObject<{ lessonId: z.ZodString; loCoverageRate: z.ZodNumber; detectedGaps: z.ZodArray; verdict: z.ZodEnum<["PASS", "WARN", "FAIL"]>; }, "strip", z.ZodTypeAny, { lessonId: string; verdict: "PASS" | "FAIL" | "WARN"; loCoverageRate: number; detectedGaps: string[]; }, { lessonId: string; verdict: "PASS" | "FAIL" | "WARN"; loCoverageRate: number; detectedGaps: string[]; }>; }; verifyReadingLevel: { name: string; description: string; schema: z.ZodObject<{ targetAgeGroup: z.ZodString; textSnippet: z.ZodString; readingGradeLevel: z.ZodString; isAppropriate: z.ZodBoolean; }, "strip", z.ZodTypeAny, { targetAgeGroup: string; textSnippet: string; readingGradeLevel: string; isAppropriate: boolean; }, { targetAgeGroup: string; textSnippet: string; readingGradeLevel: string; isAppropriate: boolean; }>; }; }; declare const packagerTools: { createDeliveryPackage: { name: string; description: string; schema: z.ZodObject<{ projectSlug: z.ZodString; packageType: z.ZodEnum<["TEACHER", "STUDENT", "PARENT", "CLIENT", "ALL"]>; outputDirectory: z.ZodDefault; }, "strip", z.ZodTypeAny, { projectSlug: string; packageType: "ALL" | "TEACHER" | "STUDENT" | "PARENT" | "CLIENT"; outputDirectory: string; }, { projectSlug: string; packageType: "ALL" | "TEACHER" | "STUDENT" | "PARENT" | "CLIENT"; outputDirectory?: string | undefined; }>; }; }; /** * Model Policy Resolver (Economic & Expert Council Architecture - August 2026) * * Core Routing Strategy: * 1. Expert Council / LLM-as-Judge (Tier 1): * - OpenRouter / Google: google/gemini-3.7-flash (Opus-grade accuracy, 1M context) * - DeepSeek: deepseek-v4-pro (Build 0813 - Deep CoT Reasoning) * - Alibaba: qwen3.8-max (2.4T MoE Flagship) * - NVIDIA NIM: nvidia/nemotron-3-ultra-550b-a55b:free (Robust Free Fallback) * * 2. Mid & Mid-High Production / Copilot (Tier 2 - Primary Economic): * - DeepSeek: deepseek-v4-flash (Build 0731 - $0.22/1M, 1M context, 284B MoE) * - Alibaba: qwen3.7-flash ($0.03/1M, ultra-fast tool caller) * - OpenRouter / Google: google/gemini-3.7-flash * * 3. Easy / Structured & Free Tasks (Tier 3): * - NVIDIA NIM: nvidia/nemotron-3.5-lightning-30b-a3b (Free 1.8s MoE) * - DeepSeek: deepseek-v4-flash * - Alibaba: qwen3.7-flash ($0.03/1M, ultra-fast tool caller) * - Google: gemini-3.5-flash-lite */ type ModelProviderKey = 'deepseek' | 'openrouter' | 'alibaba' | 'google' | 'nvidia' | 'zhipu' | 'ollama' | 'openai' | 'anthropic'; interface ModelPolicyResolution { provider: ModelProviderKey; modelName: string; maxTokens: number; temperature: number; reasoningEffort?: 'low' | 'medium' | 'high' | 'max'; contextWindow?: number; providerLabel?: string; tierDescription?: string; } interface MultiProviderPolicyResolution { primary: ModelPolicyResolution; fallbacks: ModelPolicyResolution[]; candidateChain: ModelPolicyResolution[]; expertCouncil?: ModelPolicyResolution[]; } declare const DEFAULT_ENABLED_PROVIDERS: Record; declare class ModelPolicyResolver { /** * Returns the High-End Expert Council for LLM-as-Judge & Architecture Evaluation */ static getExpertCouncil(): ModelPolicyResolution[]; /** * Builds the multi-provider priority candidates list for a given role/artifact */ static getCandidatePool(role: string, artifactType?: string): ModelPolicyResolution[]; /** * Resolves the primary model and active fallback chain considering enabled providers */ static resolve(role: string, artifactType?: string, userPreferredModel?: string, enabledProviders?: Record): ModelPolicyResolution; /** * Resolves full multi-provider resolution with primary, fallbacks, and council */ static resolveMultiProvider(role: string, artifactType?: string, userPreferredModel?: string, enabledProviders?: Record): MultiProviderPolicyResolution; } interface JudgeEvaluationResult { decision: 'APPROVED' | 'NEEDS_REVISION' | 'REJECTED'; score: number; passed: boolean; evaluatedBy: '@agent-as-judge' | '@heuristic-linter'; critique: string; strengths: string[]; weaknesses: string[]; autoRepairInstructions?: string; } interface AsyncLLMJudgeInput { targetArtifactType: string; lessonId: string; expectedLanguage: string; targetObjectives: Array<{ code: string; description: string; bloomLevel: string; }>; generatedContentJson: string; /** Verbatim standard statements (canonical ID -> text) from the Standards Registry. */ standardStatements?: Record; modelOptions?: ModelResolutionOptions; } declare class LLMJudgeEngine { /** * Executes genuine LLM-as-Judge evaluation using the audit flow. */ static evaluateArtifactWithLLM(input: AsyncLLMJudgeInput): Promise; /** * Evaluates Gate 1 (SOT Foundation: LEARNER_PROFILE, PROJECT_BRIEF, REFERENCE_PACK) * Calibrated heuristic pre-check. */ static evaluateGate1(learnerProfileMarkdown: string, referencePackMarkdown: string): JudgeEvaluationResult; /** * Evaluates Gate 2 (Curriculum Framework: Units, Modules, Lessons, Bloom Progression) */ static evaluateGate2(frameworkMarkdown: string, targetUnitCount?: number): JudgeEvaluationResult; /** * Evaluates a produced Lesson Artifact (LESSON, ACT, QUIZ, SLIDE) with heuristic structure checks */ static evaluateArtifact(artifactType: string, content: string, lessonTitle: string): JudgeEvaluationResult; } /** * Stream chat CÓ tool-calling (vòng lặp: model → tool → kết quả → model → …). * Route qua customToolInference (host AI SDK gateway) khi được truyền — unified * tracing mandate. Không có customToolInference: * - CURRICULUM_KIT_REQUIRE_CUSTOM_INFERENCE=1 → fail-loud ERR_CUSTOM_INFERENCE_REQUIRED * (raw-fetch routes nằm ngoài biên telemetry của host). * - Ngược lại → raw-fetch legacy (OpenRouter/DeepSeek/Alibaba/NVIDIA). * Tool error KHÔNG làm chết stream: lỗi được đóng gói gửi lại model để tự xử lý * (và được báo qua onToolError cho observability). */ declare function streamCurriculumAIInferenceWithTools(messages: ChatMessage[], projectContext: string, options: StreamRunnerOptions, loop: ToolLoopConfig, onChunk?: (token: string, type: ChunkType) => void): Promise; export { type ActivityPromptInput, type AsyncLLMJudgeInput, type AuditCurriculumPlanInput, type AuditCurriculumQualityInput, type AuditProjectGraphInput, ChatMessage, ChunkType, type CodeLabPromptInput, type CurriculumPlanJudgePromptInput, DEFAULT_ENABLED_PROVIDERS, type DiagnosticQuizPromptInput, type ExtensionPromptInput, type GenerateActivityInput, type GenerateCodeLabInput, type GenerateDiagnosticQuizInput, type GenerateExtensionInput, type GenerateHandoutInput, type GenerateLessonMasterInput, type GenerateProjectInstructionInput, type GenerateSelfLabInput, type GenerateSlidesInput, type GenerateTeacherGuideInput, type GenerateWorksheetInput, type HandoutPromptInput, type HtmlDeckSlidePromptInput, type JudgeEvaluationResult, type JudgePromptInput, LLMJudgeEngine, type LessonPromptInput, type MarpMarkdownSlidePromptInput, type ModelPolicyResolution, ModelPolicyResolver, type ModelProviderKey, ModelResolutionOptions, type MultiProviderPolicyResolution, type ProjectGraphJudgePromptInput, type ProjectInstructionPromptInput, SLIDE_CANONICAL_METHODOLOGY, type SelfLabPromptInput, type SlidesPromptInput, type StreamDiagnosticQuizInput, type StreamLessonMasterInput, StreamRunnerOptions, type StreamSelfLabInput, type TeacherGuidePromptInput, ToolLoopConfig, type WorksheetPromptInput, activityTools, analystTools, assessorTools, auditCurriculumPlanFlow, auditCurriculumQualityFlow, auditProjectGraphFlow, buildActivityPrompt, buildCodeLabPrompt, buildCurriculumPlanJudgePrompt, buildDiagnosticQuizPrompt, buildExtensionPrompt, buildHandoutPrompt, buildHtmlDeckSlidePrompt, buildJudgePrompt, buildLessonMasterPrompt, buildMarpMarkdownSlidePrompt, buildProjectGraphJudgePrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSlidesPrompt, buildTeacherGuidePrompt, buildWorksheetPrompt, contentTools, designerTools, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateProjectInstructionFlow, generateSelfLabFlow, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, illustratorTools, packagerTools, researcherTools, reviewerTools, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools };