@thanh01.pmt/curriculum-kit 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/dist/ai/index.cjs +4980 -0
- package/dist/ai/index.cjs.map +1 -0
- package/dist/ai/index.d.cts +1287 -0
- package/dist/ai/index.d.ts +1287 -0
- package/dist/ai/index.mjs +4924 -0
- package/dist/ai/index.mjs.map +1 -0
- package/dist/index.cjs +15308 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +747 -0
- package/dist/index.d.ts +747 -0
- package/dist/index.mjs +14965 -0
- package/dist/index.mjs.map +1 -0
- package/dist/media/index.cjs +1238 -0
- package/dist/media/index.cjs.map +1 -0
- package/dist/media/index.d.cts +254 -0
- package/dist/media/index.d.ts +254 -0
- package/dist/media/index.mjs +1221 -0
- package/dist/media/index.mjs.map +1 -0
- package/dist/milestoneBundleGenerator-CbXhs1CP.d.ts +62 -0
- package/dist/milestoneBundleGenerator-DrBtHzBO.d.cts +62 -0
- package/dist/pipeline/index.cjs +4894 -0
- package/dist/pipeline/index.cjs.map +1 -0
- package/dist/pipeline/index.d.cts +161 -0
- package/dist/pipeline/index.d.ts +161 -0
- package/dist/pipeline/index.mjs +4869 -0
- package/dist/pipeline/index.mjs.map +1 -0
- package/dist/provider-factory-DH3udYlN.d.cts +25 -0
- package/dist/provider-factory-DH3udYlN.d.ts +25 -0
- package/dist/publishers/index.cjs +575 -0
- package/dist/publishers/index.cjs.map +1 -0
- package/dist/publishers/index.d.cts +85 -0
- package/dist/publishers/index.d.ts +85 -0
- package/dist/publishers/index.mjs +561 -0
- package/dist/publishers/index.mjs.map +1 -0
- package/dist/schemas/index.cjs +1640 -0
- package/dist/schemas/index.cjs.map +1 -0
- package/dist/schemas/index.d.cts +14194 -0
- package/dist/schemas/index.d.ts +14194 -0
- package/dist/schemas/index.mjs +1517 -0
- package/dist/schemas/index.mjs.map +1 -0
- package/dist/standards/index.cjs +910 -0
- package/dist/standards/index.cjs.map +1 -0
- package/dist/standards/index.d.cts +130 -0
- package/dist/standards/index.d.ts +130 -0
- package/dist/standards/index.mjs +890 -0
- package/dist/standards/index.mjs.map +1 -0
- package/dist/standardsCoverageGate-BWAkXY76.d.cts +767 -0
- package/dist/standardsCoverageGate-BWAkXY76.d.ts +767 -0
- package/dist/storage/index.cjs +595 -0
- package/dist/storage/index.cjs.map +1 -0
- package/dist/storage/index.d.cts +77 -0
- package/dist/storage/index.d.ts +77 -0
- package/dist/storage/index.mjs +583 -0
- package/dist/storage/index.mjs.map +1 -0
- package/dist/streamRunner-C7j5LKon.d.cts +60 -0
- package/dist/streamRunner-C7j5LKon.d.ts +60 -0
- package/dist/supabasePublisher-C627qXFT.d.cts +63 -0
- package/dist/supabasePublisher-C627qXFT.d.ts +63 -0
- package/dist/types-BUJGYiep.d.cts +89 -0
- package/dist/types-BUJGYiep.d.ts +89 -0
- package/dist/workflow/index.cjs +5266 -0
- package/dist/workflow/index.cjs.map +1 -0
- package/dist/workflow/index.d.cts +295 -0
- package/dist/workflow/index.d.ts +295 -0
- package/dist/workflow/index.mjs +5216 -0
- package/dist/workflow/index.mjs.map +1 -0
- package/package.json +105 -0
|
@@ -0,0 +1,1287 @@
|
|
|
1
|
+
import { M as ModelResolutionOptions } from '../provider-factory-DH3udYlN.js';
|
|
2
|
+
export { A as AIProviderName, N as NVIDIA_MODELS, g as getAIModel } from '../provider-factory-DH3udYlN.js';
|
|
3
|
+
import { MilestoneInput, LessonPlan, ActivityLab, ProjectGraph, CodeLab, Worksheet, Handout, SlideDeck, TeacherGuide, Extension, CurriculumQualityReport, ProjectInstruction, SelfLab, DiagnosticQuiz } from '../schemas/index.js';
|
|
4
|
+
import * as ai from 'ai';
|
|
5
|
+
import { C as ChatMessage, S as StreamRunnerOptions, c as ChunkType } from '../streamRunner-C7j5LKon.js';
|
|
6
|
+
export { F as FallbackTarget, e as extractThoughtAndContent, g as getDesignatedFallbackChain, b as getDesignatedFallbackConfig, a as isModelAllowed, i as isProviderEnabled, r as runCurriculumAIInference, s as streamCurriculumAIInference } from '../streamRunner-C7j5LKon.js';
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
|
|
9
|
+
interface LessonPromptInput {
|
|
10
|
+
milestone: MilestoneInput;
|
|
11
|
+
language: string;
|
|
12
|
+
topic?: string;
|
|
13
|
+
targetAudience?: string;
|
|
14
|
+
contextContinuity?: string;
|
|
15
|
+
/** Pre-rendered STANDARDS CONTEXT block (from buildStandardsContextBlock) — verbatim standard statements binding this lesson. */
|
|
16
|
+
standardsContext?: string;
|
|
17
|
+
}
|
|
18
|
+
declare function buildLessonMasterPrompt(input: LessonPromptInput): string;
|
|
19
|
+
|
|
20
|
+
interface ActivityPromptInput {
|
|
21
|
+
lesson: LessonPlan;
|
|
22
|
+
language: string;
|
|
23
|
+
hardwareBOM?: string[];
|
|
24
|
+
softwareTools?: string[];
|
|
25
|
+
}
|
|
26
|
+
declare function buildActivityPrompt(input: ActivityPromptInput): string;
|
|
27
|
+
|
|
28
|
+
interface CodeLabPromptInput {
|
|
29
|
+
lesson: LessonPlan;
|
|
30
|
+
activity?: ActivityLab;
|
|
31
|
+
language: string;
|
|
32
|
+
targetTechStack?: string[];
|
|
33
|
+
}
|
|
34
|
+
declare function buildCodeLabPrompt(input: CodeLabPromptInput): string;
|
|
35
|
+
|
|
36
|
+
interface WorksheetPromptInput {
|
|
37
|
+
lesson: LessonPlan;
|
|
38
|
+
language: string;
|
|
39
|
+
}
|
|
40
|
+
declare function buildWorksheetPrompt(input: WorksheetPromptInput): string;
|
|
41
|
+
|
|
42
|
+
interface HandoutPromptInput {
|
|
43
|
+
lesson: LessonPlan;
|
|
44
|
+
language: string;
|
|
45
|
+
}
|
|
46
|
+
declare function buildHandoutPrompt(input: HandoutPromptInput): string;
|
|
47
|
+
|
|
48
|
+
interface SlidesPromptInput {
|
|
49
|
+
lesson: LessonPlan;
|
|
50
|
+
language: string;
|
|
51
|
+
marpTheme?: string;
|
|
52
|
+
}
|
|
53
|
+
declare function buildSlidesPrompt(input: SlidesPromptInput): string;
|
|
54
|
+
|
|
55
|
+
interface TeacherGuidePromptInput {
|
|
56
|
+
lesson: LessonPlan;
|
|
57
|
+
activity?: ActivityLab;
|
|
58
|
+
language: string;
|
|
59
|
+
}
|
|
60
|
+
declare function buildTeacherGuidePrompt(input: TeacherGuidePromptInput): string;
|
|
61
|
+
|
|
62
|
+
interface ExtensionPromptInput {
|
|
63
|
+
lesson: LessonPlan;
|
|
64
|
+
activity?: ActivityLab;
|
|
65
|
+
language: string;
|
|
66
|
+
}
|
|
67
|
+
declare function buildExtensionPrompt(input: ExtensionPromptInput): string;
|
|
68
|
+
|
|
69
|
+
interface JudgePromptInput {
|
|
70
|
+
targetArtifactType: string;
|
|
71
|
+
lessonId: string;
|
|
72
|
+
expectedLanguage: string;
|
|
73
|
+
targetObjectives: Array<{
|
|
74
|
+
code: string;
|
|
75
|
+
description: string;
|
|
76
|
+
bloomLevel: string;
|
|
77
|
+
}>;
|
|
78
|
+
generatedContentJson: string;
|
|
79
|
+
/**
|
|
80
|
+
* VERBATIM standard statements relevant to this artifact, keyed by canonical ID
|
|
81
|
+
* ("packId:statementId" -> verbatim text). Sourced from the Standards Registry.
|
|
82
|
+
* The judge compares the candidate against the REAL standard text, never memory.
|
|
83
|
+
* Optional for backward compatibility.
|
|
84
|
+
*/
|
|
85
|
+
standardStatements?: Record<string, string>;
|
|
86
|
+
}
|
|
87
|
+
declare function buildJudgePrompt(input: JudgePromptInput): string;
|
|
88
|
+
|
|
89
|
+
interface ProjectInstructionPromptInput {
|
|
90
|
+
projectGraph?: ProjectGraph;
|
|
91
|
+
milestone: MilestoneInput;
|
|
92
|
+
roadmapContext?: {
|
|
93
|
+
projectTitle?: string;
|
|
94
|
+
techStack?: string[];
|
|
95
|
+
phaseTitle?: string;
|
|
96
|
+
};
|
|
97
|
+
researchNotes?: string;
|
|
98
|
+
externalResources?: string[];
|
|
99
|
+
language: string;
|
|
100
|
+
difficulty?: 'beginner' | 'intermediate' | 'advanced';
|
|
101
|
+
}
|
|
102
|
+
declare function buildProjectInstructionPrompt(input: ProjectInstructionPromptInput): string;
|
|
103
|
+
|
|
104
|
+
interface SelfLabPromptInput {
|
|
105
|
+
milestone: MilestoneInput;
|
|
106
|
+
projectGraph?: ProjectGraph;
|
|
107
|
+
language: string;
|
|
108
|
+
targetTechStack?: string[];
|
|
109
|
+
contextContinuity?: string;
|
|
110
|
+
}
|
|
111
|
+
declare function buildSelfLabPrompt(input: SelfLabPromptInput): string;
|
|
112
|
+
|
|
113
|
+
interface DiagnosticQuizPromptInput {
|
|
114
|
+
milestone: MilestoneInput;
|
|
115
|
+
language: string;
|
|
116
|
+
questionCount?: number;
|
|
117
|
+
passingScorePct?: number;
|
|
118
|
+
}
|
|
119
|
+
declare function buildDiagnosticQuizPrompt(input: DiagnosticQuizPromptInput): string;
|
|
120
|
+
|
|
121
|
+
interface GenerateLessonMasterInput extends Omit<LessonPromptInput, 'milestone'> {
|
|
122
|
+
milestone: MilestoneInput;
|
|
123
|
+
modelOptions?: ModelResolutionOptions;
|
|
124
|
+
}
|
|
125
|
+
declare function generateLessonMasterFlow(input: GenerateLessonMasterInput): Promise<LessonPlan>;
|
|
126
|
+
|
|
127
|
+
interface GenerateActivityInput extends Omit<ActivityPromptInput, 'lesson'> {
|
|
128
|
+
lesson: LessonPlan;
|
|
129
|
+
modelOptions?: ModelResolutionOptions;
|
|
130
|
+
}
|
|
131
|
+
declare function generateActivityFlow(input: GenerateActivityInput): Promise<ActivityLab>;
|
|
132
|
+
|
|
133
|
+
interface GenerateCodeLabInput extends Omit<CodeLabPromptInput, 'lesson'> {
|
|
134
|
+
lesson: LessonPlan;
|
|
135
|
+
activity?: ActivityLab;
|
|
136
|
+
modelOptions?: ModelResolutionOptions;
|
|
137
|
+
}
|
|
138
|
+
declare function generateCodeLabFlow(input: GenerateCodeLabInput): Promise<CodeLab>;
|
|
139
|
+
|
|
140
|
+
interface GenerateWorksheetInput extends Omit<WorksheetPromptInput, 'lesson'> {
|
|
141
|
+
lesson: LessonPlan;
|
|
142
|
+
modelOptions?: ModelResolutionOptions;
|
|
143
|
+
}
|
|
144
|
+
declare function generateWorksheetFlow(input: GenerateWorksheetInput): Promise<Worksheet>;
|
|
145
|
+
|
|
146
|
+
interface GenerateHandoutInput extends Omit<HandoutPromptInput, 'lesson'> {
|
|
147
|
+
lesson: LessonPlan;
|
|
148
|
+
modelOptions?: ModelResolutionOptions;
|
|
149
|
+
}
|
|
150
|
+
declare function generateHandoutFlow(input: GenerateHandoutInput): Promise<Handout>;
|
|
151
|
+
|
|
152
|
+
interface GenerateSlidesInput extends Omit<SlidesPromptInput, 'lesson'> {
|
|
153
|
+
lesson: LessonPlan;
|
|
154
|
+
modelOptions?: ModelResolutionOptions;
|
|
155
|
+
}
|
|
156
|
+
declare function generateSlidesFlow(input: GenerateSlidesInput): Promise<SlideDeck>;
|
|
157
|
+
|
|
158
|
+
interface GenerateTeacherGuideInput extends Omit<TeacherGuidePromptInput, 'lesson'> {
|
|
159
|
+
lesson: LessonPlan;
|
|
160
|
+
activity?: ActivityLab;
|
|
161
|
+
modelOptions?: ModelResolutionOptions;
|
|
162
|
+
}
|
|
163
|
+
declare function generateTeacherGuideFlow(input: GenerateTeacherGuideInput): Promise<TeacherGuide>;
|
|
164
|
+
|
|
165
|
+
interface GenerateExtensionInput extends Omit<ExtensionPromptInput, 'lesson'> {
|
|
166
|
+
lesson: LessonPlan;
|
|
167
|
+
activity?: ActivityLab;
|
|
168
|
+
modelOptions?: ModelResolutionOptions;
|
|
169
|
+
}
|
|
170
|
+
declare function generateExtensionFlow(input: GenerateExtensionInput): Promise<Extension>;
|
|
171
|
+
|
|
172
|
+
interface AuditCurriculumQualityInput extends JudgePromptInput {
|
|
173
|
+
modelOptions?: ModelResolutionOptions;
|
|
174
|
+
}
|
|
175
|
+
declare function auditCurriculumQualityFlow(input: AuditCurriculumQualityInput): Promise<CurriculumQualityReport>;
|
|
176
|
+
|
|
177
|
+
interface GenerateProjectInstructionInput extends ProjectInstructionPromptInput {
|
|
178
|
+
modelOptions?: ModelResolutionOptions;
|
|
179
|
+
}
|
|
180
|
+
declare function generateProjectInstructionFlow(input: GenerateProjectInstructionInput): Promise<ProjectInstruction>;
|
|
181
|
+
|
|
182
|
+
interface GenerateSelfLabInput {
|
|
183
|
+
milestone: MilestoneInput;
|
|
184
|
+
projectGraph?: ProjectGraph;
|
|
185
|
+
language: string;
|
|
186
|
+
targetTechStack?: string[];
|
|
187
|
+
contextContinuity?: string;
|
|
188
|
+
modelOptions?: ModelResolutionOptions;
|
|
189
|
+
}
|
|
190
|
+
declare function generateSelfLabFlow(input: GenerateSelfLabInput): Promise<SelfLab>;
|
|
191
|
+
|
|
192
|
+
interface GenerateDiagnosticQuizInput {
|
|
193
|
+
milestone: MilestoneInput;
|
|
194
|
+
language: string;
|
|
195
|
+
questionCount?: number;
|
|
196
|
+
passingScorePct?: number;
|
|
197
|
+
modelOptions?: ModelResolutionOptions;
|
|
198
|
+
}
|
|
199
|
+
declare function generateDiagnosticQuizFlow(input: GenerateDiagnosticQuizInput): Promise<DiagnosticQuiz>;
|
|
200
|
+
|
|
201
|
+
interface StreamLessonMasterInput extends Omit<LessonPromptInput, 'milestone'> {
|
|
202
|
+
milestone: MilestoneInput;
|
|
203
|
+
modelOptions?: ModelResolutionOptions;
|
|
204
|
+
}
|
|
205
|
+
declare function streamLessonMasterFlow(input: StreamLessonMasterInput): Promise<ai.StreamObjectResult<{
|
|
206
|
+
artifactType?: "LESSON" | undefined;
|
|
207
|
+
lessonId?: string | undefined;
|
|
208
|
+
title?: string | undefined;
|
|
209
|
+
language?: string | undefined;
|
|
210
|
+
learningObjectives?: ({
|
|
211
|
+
code?: string | undefined;
|
|
212
|
+
successCriteria?: string | undefined;
|
|
213
|
+
description?: string | undefined;
|
|
214
|
+
name?: string | undefined;
|
|
215
|
+
bloomLevel?: string | undefined;
|
|
216
|
+
} | undefined)[] | undefined;
|
|
217
|
+
teacherNotes?: {
|
|
218
|
+
commonPitfalls?: (string | undefined)[] | undefined;
|
|
219
|
+
troubleshootingMatrix?: ({
|
|
220
|
+
issue?: string | undefined;
|
|
221
|
+
potentialCause?: string | undefined;
|
|
222
|
+
solution?: string | undefined;
|
|
223
|
+
} | undefined)[] | undefined;
|
|
224
|
+
extensionNotes?: string | undefined;
|
|
225
|
+
} | undefined;
|
|
226
|
+
hookScenario?: string | undefined;
|
|
227
|
+
keywords?: (string | undefined)[] | undefined;
|
|
228
|
+
topic?: string | undefined;
|
|
229
|
+
targetGradeOrAudience?: string | undefined;
|
|
230
|
+
overview?: string | undefined;
|
|
231
|
+
prerequisites?: string | undefined;
|
|
232
|
+
materialsSummary?: string | undefined;
|
|
233
|
+
hookTitle?: string | undefined;
|
|
234
|
+
hookQuestions?: (string | undefined)[] | undefined;
|
|
235
|
+
coreConcepts?: ({
|
|
236
|
+
name?: string | undefined;
|
|
237
|
+
analogy?: string | undefined;
|
|
238
|
+
technicalDepth?: string | undefined;
|
|
239
|
+
formulaOrRule?: string | undefined;
|
|
240
|
+
comparisonTable?: {
|
|
241
|
+
headers?: (string | undefined)[] | undefined;
|
|
242
|
+
rows?: ((string | undefined)[] | undefined)[] | undefined;
|
|
243
|
+
} | undefined;
|
|
244
|
+
} | undefined)[] | undefined;
|
|
245
|
+
differentiation?: {
|
|
246
|
+
bronzeTier?: string | undefined;
|
|
247
|
+
silverTier?: string | undefined;
|
|
248
|
+
goldTier?: string | undefined;
|
|
249
|
+
} | undefined;
|
|
250
|
+
sections?: ({
|
|
251
|
+
durationMinutes?: number | undefined;
|
|
252
|
+
title?: string | undefined;
|
|
253
|
+
teacherActions?: string | undefined;
|
|
254
|
+
studentActions?: string | undefined;
|
|
255
|
+
analogies?: (string | undefined)[] | undefined;
|
|
256
|
+
formativeCheck?: string | undefined;
|
|
257
|
+
} | undefined)[] | undefined;
|
|
258
|
+
exitTicket?: {
|
|
259
|
+
questionStem?: string | undefined;
|
|
260
|
+
expectedAnswerOrRubric?: string | undefined;
|
|
261
|
+
metacognitivePrompt?: string | undefined;
|
|
262
|
+
} | undefined;
|
|
263
|
+
guidedPractice?: {
|
|
264
|
+
title?: string | undefined;
|
|
265
|
+
explanation?: string | undefined;
|
|
266
|
+
codeSnippet?: string | undefined;
|
|
267
|
+
codeLanguage?: string | undefined;
|
|
268
|
+
mermaidDiagram?: string | undefined;
|
|
269
|
+
} | undefined;
|
|
270
|
+
independentPractice?: {
|
|
271
|
+
description?: string | undefined;
|
|
272
|
+
title?: string | undefined;
|
|
273
|
+
} | undefined;
|
|
274
|
+
}, {
|
|
275
|
+
artifactType: "LESSON";
|
|
276
|
+
lessonId: string;
|
|
277
|
+
title: string;
|
|
278
|
+
language: string;
|
|
279
|
+
learningObjectives: {
|
|
280
|
+
code: string;
|
|
281
|
+
successCriteria: string;
|
|
282
|
+
description: string;
|
|
283
|
+
name: string;
|
|
284
|
+
bloomLevel: string;
|
|
285
|
+
}[];
|
|
286
|
+
teacherNotes: {
|
|
287
|
+
commonPitfalls: string[];
|
|
288
|
+
troubleshootingMatrix: {
|
|
289
|
+
issue: string;
|
|
290
|
+
potentialCause: string;
|
|
291
|
+
solution: string;
|
|
292
|
+
}[];
|
|
293
|
+
extensionNotes: string;
|
|
294
|
+
};
|
|
295
|
+
hookScenario: string;
|
|
296
|
+
keywords: string[];
|
|
297
|
+
topic: string;
|
|
298
|
+
targetGradeOrAudience: string;
|
|
299
|
+
overview: string;
|
|
300
|
+
prerequisites: string;
|
|
301
|
+
materialsSummary: string;
|
|
302
|
+
hookTitle: string;
|
|
303
|
+
hookQuestions: string[];
|
|
304
|
+
coreConcepts: {
|
|
305
|
+
name: string;
|
|
306
|
+
analogy: string;
|
|
307
|
+
technicalDepth: string;
|
|
308
|
+
formulaOrRule: string;
|
|
309
|
+
comparisonTable?: {
|
|
310
|
+
headers: string[];
|
|
311
|
+
rows: string[][];
|
|
312
|
+
} | undefined;
|
|
313
|
+
}[];
|
|
314
|
+
differentiation: {
|
|
315
|
+
bronzeTier: string;
|
|
316
|
+
silverTier: string;
|
|
317
|
+
goldTier: string;
|
|
318
|
+
};
|
|
319
|
+
sections: {
|
|
320
|
+
durationMinutes: number;
|
|
321
|
+
title: string;
|
|
322
|
+
teacherActions: string;
|
|
323
|
+
studentActions: string;
|
|
324
|
+
analogies: string[];
|
|
325
|
+
formativeCheck: string;
|
|
326
|
+
}[];
|
|
327
|
+
exitTicket: {
|
|
328
|
+
questionStem: string;
|
|
329
|
+
expectedAnswerOrRubric: string;
|
|
330
|
+
metacognitivePrompt: string;
|
|
331
|
+
};
|
|
332
|
+
guidedPractice?: {
|
|
333
|
+
title: string;
|
|
334
|
+
explanation: string;
|
|
335
|
+
codeSnippet: string;
|
|
336
|
+
codeLanguage: string;
|
|
337
|
+
mermaidDiagram: string;
|
|
338
|
+
} | undefined;
|
|
339
|
+
independentPractice?: {
|
|
340
|
+
description: string;
|
|
341
|
+
title: string;
|
|
342
|
+
} | undefined;
|
|
343
|
+
}, never>>;
|
|
344
|
+
|
|
345
|
+
interface StreamSelfLabInput {
|
|
346
|
+
milestone: MilestoneInput;
|
|
347
|
+
language: string;
|
|
348
|
+
targetTechStack?: string[];
|
|
349
|
+
contextContinuity?: string;
|
|
350
|
+
modelOptions?: ModelResolutionOptions;
|
|
351
|
+
}
|
|
352
|
+
declare function streamSelfLabFlow(input: StreamSelfLabInput): Promise<ai.StreamObjectResult<{
|
|
353
|
+
artifactType?: "SELF_LAB" | undefined;
|
|
354
|
+
title?: string | undefined;
|
|
355
|
+
language?: string | undefined;
|
|
356
|
+
troubleshootingMatrix?: ({
|
|
357
|
+
symptom?: string | undefined;
|
|
358
|
+
rootCause?: string | undefined;
|
|
359
|
+
exactFix?: string | undefined;
|
|
360
|
+
} | undefined)[] | undefined;
|
|
361
|
+
techStack?: (string | undefined)[] | undefined;
|
|
362
|
+
challenges?: {
|
|
363
|
+
bronze?: {
|
|
364
|
+
objective?: string | undefined;
|
|
365
|
+
title?: string | undefined;
|
|
366
|
+
expectedOutput?: string | undefined;
|
|
367
|
+
estimatedMinutes?: number | undefined;
|
|
368
|
+
tier?: "bronze" | "silver" | "gold" | undefined;
|
|
369
|
+
tasks?: (string | undefined)[] | undefined;
|
|
370
|
+
verifyCommand?: string | undefined;
|
|
371
|
+
hints?: {
|
|
372
|
+
hint1Concept?: string | undefined;
|
|
373
|
+
hint2Skeleton?: string | undefined;
|
|
374
|
+
hint3Solution?: {
|
|
375
|
+
code?: string | undefined;
|
|
376
|
+
explanation?: string | undefined;
|
|
377
|
+
} | undefined;
|
|
378
|
+
} | undefined;
|
|
379
|
+
} | undefined;
|
|
380
|
+
silver?: {
|
|
381
|
+
objective?: string | undefined;
|
|
382
|
+
title?: string | undefined;
|
|
383
|
+
expectedOutput?: string | undefined;
|
|
384
|
+
estimatedMinutes?: number | undefined;
|
|
385
|
+
tier?: "bronze" | "silver" | "gold" | undefined;
|
|
386
|
+
tasks?: (string | undefined)[] | undefined;
|
|
387
|
+
verifyCommand?: string | undefined;
|
|
388
|
+
hints?: {
|
|
389
|
+
hint1Concept?: string | undefined;
|
|
390
|
+
hint2Skeleton?: string | undefined;
|
|
391
|
+
hint3Solution?: {
|
|
392
|
+
code?: string | undefined;
|
|
393
|
+
explanation?: string | undefined;
|
|
394
|
+
} | undefined;
|
|
395
|
+
} | undefined;
|
|
396
|
+
} | undefined;
|
|
397
|
+
gold?: {
|
|
398
|
+
objective?: string | undefined;
|
|
399
|
+
title?: string | undefined;
|
|
400
|
+
expectedOutput?: string | undefined;
|
|
401
|
+
estimatedMinutes?: number | undefined;
|
|
402
|
+
tier?: "bronze" | "silver" | "gold" | undefined;
|
|
403
|
+
tasks?: (string | undefined)[] | undefined;
|
|
404
|
+
verifyCommand?: string | undefined;
|
|
405
|
+
hints?: {
|
|
406
|
+
hint1Concept?: string | undefined;
|
|
407
|
+
hint2Skeleton?: string | undefined;
|
|
408
|
+
hint3Solution?: {
|
|
409
|
+
code?: string | undefined;
|
|
410
|
+
explanation?: string | undefined;
|
|
411
|
+
} | undefined;
|
|
412
|
+
} | undefined;
|
|
413
|
+
} | undefined;
|
|
414
|
+
} | undefined;
|
|
415
|
+
difficulty?: "advanced" | "intermediate" | "beginner" | undefined;
|
|
416
|
+
estimatedTotalMinutes?: number | undefined;
|
|
417
|
+
labId?: string | undefined;
|
|
418
|
+
missionBriefing?: string | undefined;
|
|
419
|
+
preflightChecklist?: (string | undefined)[] | undefined;
|
|
420
|
+
finalSubmissionChecklist?: (string | undefined)[] | undefined;
|
|
421
|
+
}, {
|
|
422
|
+
artifactType: "SELF_LAB";
|
|
423
|
+
title: string;
|
|
424
|
+
language: string;
|
|
425
|
+
troubleshootingMatrix: {
|
|
426
|
+
symptom: string;
|
|
427
|
+
rootCause: string;
|
|
428
|
+
exactFix: string;
|
|
429
|
+
}[];
|
|
430
|
+
techStack: string[];
|
|
431
|
+
challenges: {
|
|
432
|
+
bronze: {
|
|
433
|
+
objective: string;
|
|
434
|
+
title: string;
|
|
435
|
+
expectedOutput: string;
|
|
436
|
+
estimatedMinutes: number;
|
|
437
|
+
tier: "bronze" | "silver" | "gold";
|
|
438
|
+
tasks: string[];
|
|
439
|
+
verifyCommand: string;
|
|
440
|
+
hints: {
|
|
441
|
+
hint1Concept: string;
|
|
442
|
+
hint2Skeleton: string;
|
|
443
|
+
hint3Solution: {
|
|
444
|
+
code: string;
|
|
445
|
+
explanation: string;
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
silver: {
|
|
450
|
+
objective: string;
|
|
451
|
+
title: string;
|
|
452
|
+
expectedOutput: string;
|
|
453
|
+
estimatedMinutes: number;
|
|
454
|
+
tier: "bronze" | "silver" | "gold";
|
|
455
|
+
tasks: string[];
|
|
456
|
+
verifyCommand: string;
|
|
457
|
+
hints: {
|
|
458
|
+
hint1Concept: string;
|
|
459
|
+
hint2Skeleton: string;
|
|
460
|
+
hint3Solution: {
|
|
461
|
+
code: string;
|
|
462
|
+
explanation: string;
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
gold: {
|
|
467
|
+
objective: string;
|
|
468
|
+
title: string;
|
|
469
|
+
expectedOutput: string;
|
|
470
|
+
estimatedMinutes: number;
|
|
471
|
+
tier: "bronze" | "silver" | "gold";
|
|
472
|
+
tasks: string[];
|
|
473
|
+
verifyCommand: string;
|
|
474
|
+
hints: {
|
|
475
|
+
hint1Concept: string;
|
|
476
|
+
hint2Skeleton: string;
|
|
477
|
+
hint3Solution: {
|
|
478
|
+
code: string;
|
|
479
|
+
explanation: string;
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
difficulty: "advanced" | "intermediate" | "beginner";
|
|
485
|
+
estimatedTotalMinutes: number;
|
|
486
|
+
labId: string;
|
|
487
|
+
missionBriefing: string;
|
|
488
|
+
preflightChecklist: string[];
|
|
489
|
+
finalSubmissionChecklist: string[];
|
|
490
|
+
}, never>>;
|
|
491
|
+
|
|
492
|
+
interface StreamDiagnosticQuizInput {
|
|
493
|
+
milestone: MilestoneInput;
|
|
494
|
+
language: string;
|
|
495
|
+
questionCount?: number;
|
|
496
|
+
passingScorePct?: number;
|
|
497
|
+
modelOptions?: ModelResolutionOptions;
|
|
498
|
+
}
|
|
499
|
+
declare function streamDiagnosticQuizFlow(input: StreamDiagnosticQuizInput): Promise<ai.StreamObjectResult<{
|
|
500
|
+
artifactType?: "QUIZ" | undefined;
|
|
501
|
+
title?: string | undefined;
|
|
502
|
+
language?: string | undefined;
|
|
503
|
+
quizId?: string | undefined;
|
|
504
|
+
totalQuestions?: number | undefined;
|
|
505
|
+
timeAllocationMinutes?: number | undefined;
|
|
506
|
+
passingScorePct?: number | undefined;
|
|
507
|
+
assessmentObjectives?: ({
|
|
508
|
+
objective?: string | undefined;
|
|
509
|
+
standardRefs?: (string | undefined)[] | undefined;
|
|
510
|
+
bloomLevel?: "Create" | "Evaluate" | "Remember" | "Understand" | "Apply" | "Analyze" | undefined;
|
|
511
|
+
aoCode?: string | undefined;
|
|
512
|
+
alignedLO?: string | undefined;
|
|
513
|
+
} | undefined)[] | undefined;
|
|
514
|
+
questions?: ({
|
|
515
|
+
options?: ({
|
|
516
|
+
explanation?: string | undefined;
|
|
517
|
+
id?: string | undefined;
|
|
518
|
+
text?: string | undefined;
|
|
519
|
+
isCorrect?: boolean | undefined;
|
|
520
|
+
} | undefined)[] | undefined;
|
|
521
|
+
bloomLevel?: "create" | "Create" | "Evaluate" | "understand" | "Remember" | "Understand" | "Apply" | "Analyze" | "remember" | "apply" | "analyze" | "evaluate" | undefined;
|
|
522
|
+
codeLanguage?: string | undefined;
|
|
523
|
+
id?: string | undefined;
|
|
524
|
+
questionType?: "multiple_choice" | "matching" | "code_analysis" | "open_ended" | undefined;
|
|
525
|
+
codeSnippet?: string | undefined;
|
|
526
|
+
alignedAO?: string | undefined;
|
|
527
|
+
scenarioOrStem?: string | undefined;
|
|
528
|
+
scenario?: string | undefined;
|
|
529
|
+
stem?: string | undefined;
|
|
530
|
+
correctAnswer?: string | undefined;
|
|
531
|
+
teacherNote?: string | undefined;
|
|
532
|
+
takeawayMessage?: string | undefined;
|
|
533
|
+
} | undefined)[] | undefined;
|
|
534
|
+
rubric?: ({
|
|
535
|
+
proficient?: string | undefined;
|
|
536
|
+
advanced?: string | undefined;
|
|
537
|
+
competencyDimension?: string | undefined;
|
|
538
|
+
developing?: string | undefined;
|
|
539
|
+
exemplary?: string | undefined;
|
|
540
|
+
} | undefined)[] | undefined;
|
|
541
|
+
}, {
|
|
542
|
+
artifactType: "QUIZ";
|
|
543
|
+
title: string;
|
|
544
|
+
language: string;
|
|
545
|
+
quizId: string;
|
|
546
|
+
totalQuestions: number;
|
|
547
|
+
timeAllocationMinutes: number;
|
|
548
|
+
passingScorePct: number;
|
|
549
|
+
assessmentObjectives: {
|
|
550
|
+
objective: string;
|
|
551
|
+
standardRefs: string[];
|
|
552
|
+
bloomLevel: "Create" | "Evaluate" | "Remember" | "Understand" | "Apply" | "Analyze";
|
|
553
|
+
aoCode: string;
|
|
554
|
+
alignedLO: string;
|
|
555
|
+
}[];
|
|
556
|
+
questions: {
|
|
557
|
+
options: {
|
|
558
|
+
explanation: string;
|
|
559
|
+
id: string;
|
|
560
|
+
text: string;
|
|
561
|
+
isCorrect: boolean;
|
|
562
|
+
}[];
|
|
563
|
+
bloomLevel: "create" | "Create" | "Evaluate" | "understand" | "Remember" | "Understand" | "Apply" | "Analyze" | "remember" | "apply" | "analyze" | "evaluate";
|
|
564
|
+
codeLanguage: string;
|
|
565
|
+
id: string;
|
|
566
|
+
questionType: "multiple_choice" | "matching" | "code_analysis" | "open_ended";
|
|
567
|
+
codeSnippet?: string | undefined;
|
|
568
|
+
alignedAO?: string | undefined;
|
|
569
|
+
scenarioOrStem?: string | undefined;
|
|
570
|
+
scenario?: string | undefined;
|
|
571
|
+
stem?: string | undefined;
|
|
572
|
+
correctAnswer?: string | undefined;
|
|
573
|
+
teacherNote?: string | undefined;
|
|
574
|
+
takeawayMessage?: string | undefined;
|
|
575
|
+
}[];
|
|
576
|
+
rubric: {
|
|
577
|
+
proficient: string;
|
|
578
|
+
advanced: string;
|
|
579
|
+
competencyDimension: string;
|
|
580
|
+
developing: string;
|
|
581
|
+
exemplary: string;
|
|
582
|
+
}[];
|
|
583
|
+
}, never>>;
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Specialist Sub-Agent Toolbelts (Parity with LangGraph AGENTS.md & nodes)
|
|
587
|
+
*
|
|
588
|
+
* Provides typed Zod tool schemas and execution contracts for 10 specialist personas:
|
|
589
|
+
* 1. @analyst — Brief analysis, learner profile, age group constraints
|
|
590
|
+
* 2. @researcher — Ground Truth, reference pack, evidence scoring
|
|
591
|
+
* 3. @designer — 3-level Curriculum Framework, Bloom matrix, prerequisite graph
|
|
592
|
+
* 4. @content — 5E Lesson Plan, Lesson contract, Section patching
|
|
593
|
+
* 5. @activity — STEM Activity Operations, ACT contract validation
|
|
594
|
+
* 6. @assessor — Diagnostic quizzes, question bank, rubric matrix
|
|
595
|
+
* 7. @illustrator — Mermaid diagrams, technical illustrations, visual assets
|
|
596
|
+
* 8. @tech_sme — Code Lab sandbox execution, syntax validation, runtime checking
|
|
597
|
+
* 9. @reviewer — Alignment matrix audit, reading level check, scope drift detection
|
|
598
|
+
* 10. @packager — 4 Delivery packs (Teacher, Student, Parent, Client), Handover Doc
|
|
599
|
+
*/
|
|
600
|
+
|
|
601
|
+
declare const analystTools: {
|
|
602
|
+
analyzeLearnerProfile: {
|
|
603
|
+
name: string;
|
|
604
|
+
description: string;
|
|
605
|
+
schema: z.ZodObject<{
|
|
606
|
+
targetAge: z.ZodString;
|
|
607
|
+
priorKnowledge: z.ZodString;
|
|
608
|
+
cognitiveBarriers: z.ZodArray<z.ZodString, "many">;
|
|
609
|
+
transitionStrategy: z.ZodString;
|
|
610
|
+
}, "strip", z.ZodTypeAny, {
|
|
611
|
+
targetAge: string;
|
|
612
|
+
priorKnowledge: string;
|
|
613
|
+
cognitiveBarriers: string[];
|
|
614
|
+
transitionStrategy: string;
|
|
615
|
+
}, {
|
|
616
|
+
targetAge: string;
|
|
617
|
+
priorKnowledge: string;
|
|
618
|
+
cognitiveBarriers: string[];
|
|
619
|
+
transitionStrategy: string;
|
|
620
|
+
}>;
|
|
621
|
+
};
|
|
622
|
+
validatePrerequisites: {
|
|
623
|
+
name: string;
|
|
624
|
+
description: string;
|
|
625
|
+
schema: z.ZodObject<{
|
|
626
|
+
requiredConcepts: z.ZodArray<z.ZodString, "many">;
|
|
627
|
+
entryBenchmark: z.ZodString;
|
|
628
|
+
}, "strip", z.ZodTypeAny, {
|
|
629
|
+
requiredConcepts: string[];
|
|
630
|
+
entryBenchmark: string;
|
|
631
|
+
}, {
|
|
632
|
+
requiredConcepts: string[];
|
|
633
|
+
entryBenchmark: string;
|
|
634
|
+
}>;
|
|
635
|
+
};
|
|
636
|
+
writeLearnerProfile: {
|
|
637
|
+
name: string;
|
|
638
|
+
description: string;
|
|
639
|
+
schema: z.ZodObject<{
|
|
640
|
+
projectSlug: z.ZodString;
|
|
641
|
+
markdownContent: z.ZodString;
|
|
642
|
+
}, "strip", z.ZodTypeAny, {
|
|
643
|
+
projectSlug: string;
|
|
644
|
+
markdownContent: string;
|
|
645
|
+
}, {
|
|
646
|
+
projectSlug: string;
|
|
647
|
+
markdownContent: string;
|
|
648
|
+
}>;
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
declare const researcherTools: {
|
|
652
|
+
searchAcademicStandards: {
|
|
653
|
+
name: string;
|
|
654
|
+
description: string;
|
|
655
|
+
schema: z.ZodObject<{
|
|
656
|
+
query: z.ZodString;
|
|
657
|
+
standardCategory: z.ZodDefault<z.ZodEnum<["CSTA", "CS2023", "OFFICIAL_DOCS", "ALL"]>>;
|
|
658
|
+
}, "strip", z.ZodTypeAny, {
|
|
659
|
+
query: string;
|
|
660
|
+
standardCategory: "CSTA" | "CS2023" | "OFFICIAL_DOCS" | "ALL";
|
|
661
|
+
}, {
|
|
662
|
+
query: string;
|
|
663
|
+
standardCategory?: "CSTA" | "CS2023" | "OFFICIAL_DOCS" | "ALL" | undefined;
|
|
664
|
+
}>;
|
|
665
|
+
};
|
|
666
|
+
scoreEvidence: {
|
|
667
|
+
name: string;
|
|
668
|
+
description: string;
|
|
669
|
+
schema: z.ZodObject<{
|
|
670
|
+
sourceUrl: z.ZodString;
|
|
671
|
+
sourceType: z.ZodEnum<["academic_paper", "official_doc", "curriculum_standard", "community_article"]>;
|
|
672
|
+
reliabilityScore: z.ZodNumber;
|
|
673
|
+
}, "strip", z.ZodTypeAny, {
|
|
674
|
+
sourceUrl: string;
|
|
675
|
+
sourceType: "academic_paper" | "official_doc" | "curriculum_standard" | "community_article";
|
|
676
|
+
reliabilityScore: number;
|
|
677
|
+
}, {
|
|
678
|
+
sourceUrl: string;
|
|
679
|
+
sourceType: "academic_paper" | "official_doc" | "curriculum_standard" | "community_article";
|
|
680
|
+
reliabilityScore: number;
|
|
681
|
+
}>;
|
|
682
|
+
};
|
|
683
|
+
writeReferencePack: {
|
|
684
|
+
name: string;
|
|
685
|
+
description: string;
|
|
686
|
+
schema: z.ZodObject<{
|
|
687
|
+
projectSlug: z.ZodString;
|
|
688
|
+
references: z.ZodArray<z.ZodObject<{
|
|
689
|
+
id: z.ZodString;
|
|
690
|
+
title: z.ZodString;
|
|
691
|
+
sourceUrl: z.ZodString;
|
|
692
|
+
relevanceScore: z.ZodNumber;
|
|
693
|
+
}, "strip", z.ZodTypeAny, {
|
|
694
|
+
title: string;
|
|
695
|
+
id: string;
|
|
696
|
+
sourceUrl: string;
|
|
697
|
+
relevanceScore: number;
|
|
698
|
+
}, {
|
|
699
|
+
title: string;
|
|
700
|
+
id: string;
|
|
701
|
+
sourceUrl: string;
|
|
702
|
+
relevanceScore: number;
|
|
703
|
+
}>, "many">;
|
|
704
|
+
cs2023Area: z.ZodOptional<z.ZodString>;
|
|
705
|
+
}, "strip", z.ZodTypeAny, {
|
|
706
|
+
references: {
|
|
707
|
+
title: string;
|
|
708
|
+
id: string;
|
|
709
|
+
sourceUrl: string;
|
|
710
|
+
relevanceScore: number;
|
|
711
|
+
}[];
|
|
712
|
+
projectSlug: string;
|
|
713
|
+
cs2023Area?: string | undefined;
|
|
714
|
+
}, {
|
|
715
|
+
references: {
|
|
716
|
+
title: string;
|
|
717
|
+
id: string;
|
|
718
|
+
sourceUrl: string;
|
|
719
|
+
relevanceScore: number;
|
|
720
|
+
}[];
|
|
721
|
+
projectSlug: string;
|
|
722
|
+
cs2023Area?: string | undefined;
|
|
723
|
+
}>;
|
|
724
|
+
};
|
|
725
|
+
};
|
|
726
|
+
declare const designerTools: {
|
|
727
|
+
buildScopeAndSequence: {
|
|
728
|
+
name: string;
|
|
729
|
+
description: string;
|
|
730
|
+
schema: z.ZodObject<{
|
|
731
|
+
totalWeeks: z.ZodDefault<z.ZodNumber>;
|
|
732
|
+
totalSessions: z.ZodDefault<z.ZodNumber>;
|
|
733
|
+
units: z.ZodArray<z.ZodObject<{
|
|
734
|
+
unitId: z.ZodString;
|
|
735
|
+
title: z.ZodString;
|
|
736
|
+
projectDeliverable: z.ZodString;
|
|
737
|
+
sessionCount: z.ZodNumber;
|
|
738
|
+
bloomTarget: z.ZodString;
|
|
739
|
+
}, "strip", z.ZodTypeAny, {
|
|
740
|
+
title: string;
|
|
741
|
+
bloomTarget: string;
|
|
742
|
+
unitId: string;
|
|
743
|
+
projectDeliverable: string;
|
|
744
|
+
sessionCount: number;
|
|
745
|
+
}, {
|
|
746
|
+
title: string;
|
|
747
|
+
bloomTarget: string;
|
|
748
|
+
unitId: string;
|
|
749
|
+
projectDeliverable: string;
|
|
750
|
+
sessionCount: number;
|
|
751
|
+
}>, "many">;
|
|
752
|
+
}, "strip", z.ZodTypeAny, {
|
|
753
|
+
units: {
|
|
754
|
+
title: string;
|
|
755
|
+
bloomTarget: string;
|
|
756
|
+
unitId: string;
|
|
757
|
+
projectDeliverable: string;
|
|
758
|
+
sessionCount: number;
|
|
759
|
+
}[];
|
|
760
|
+
totalWeeks: number;
|
|
761
|
+
totalSessions: number;
|
|
762
|
+
}, {
|
|
763
|
+
units: {
|
|
764
|
+
title: string;
|
|
765
|
+
bloomTarget: string;
|
|
766
|
+
unitId: string;
|
|
767
|
+
projectDeliverable: string;
|
|
768
|
+
sessionCount: number;
|
|
769
|
+
}[];
|
|
770
|
+
totalWeeks?: number | undefined;
|
|
771
|
+
totalSessions?: number | undefined;
|
|
772
|
+
}>;
|
|
773
|
+
};
|
|
774
|
+
writeCurriculumFramework: {
|
|
775
|
+
name: string;
|
|
776
|
+
description: string;
|
|
777
|
+
schema: z.ZodObject<{
|
|
778
|
+
projectSlug: z.ZodString;
|
|
779
|
+
frameworkMarkdown: z.ZodString;
|
|
780
|
+
standardRefs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
781
|
+
unitId: z.ZodString;
|
|
782
|
+
standardIds: z.ZodArray<z.ZodString, "many">;
|
|
783
|
+
}, "strip", z.ZodTypeAny, {
|
|
784
|
+
unitId: string;
|
|
785
|
+
standardIds: string[];
|
|
786
|
+
}, {
|
|
787
|
+
unitId: string;
|
|
788
|
+
standardIds: string[];
|
|
789
|
+
}>, "many">>;
|
|
790
|
+
}, "strip", z.ZodTypeAny, {
|
|
791
|
+
projectSlug: string;
|
|
792
|
+
frameworkMarkdown: string;
|
|
793
|
+
standardRefs?: {
|
|
794
|
+
unitId: string;
|
|
795
|
+
standardIds: string[];
|
|
796
|
+
}[] | undefined;
|
|
797
|
+
}, {
|
|
798
|
+
projectSlug: string;
|
|
799
|
+
frameworkMarkdown: string;
|
|
800
|
+
standardRefs?: {
|
|
801
|
+
unitId: string;
|
|
802
|
+
standardIds: string[];
|
|
803
|
+
}[] | undefined;
|
|
804
|
+
}>;
|
|
805
|
+
};
|
|
806
|
+
};
|
|
807
|
+
declare const contentTools: {
|
|
808
|
+
scaffold5ELesson: {
|
|
809
|
+
name: string;
|
|
810
|
+
description: string;
|
|
811
|
+
schema: z.ZodObject<{
|
|
812
|
+
lessonId: z.ZodString;
|
|
813
|
+
title: z.ZodString;
|
|
814
|
+
learningObjectives: z.ZodArray<z.ZodObject<{
|
|
815
|
+
code: z.ZodString;
|
|
816
|
+
statement: z.ZodString;
|
|
817
|
+
standardRefs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
818
|
+
}, "strip", z.ZodTypeAny, {
|
|
819
|
+
code: string;
|
|
820
|
+
statement: string;
|
|
821
|
+
standardRefs?: string[] | undefined;
|
|
822
|
+
}, {
|
|
823
|
+
code: string;
|
|
824
|
+
statement: string;
|
|
825
|
+
standardRefs?: string[] | undefined;
|
|
826
|
+
}>, "many">;
|
|
827
|
+
durationMinutes: z.ZodDefault<z.ZodNumber>;
|
|
828
|
+
}, "strip", z.ZodTypeAny, {
|
|
829
|
+
durationMinutes: number;
|
|
830
|
+
lessonId: string;
|
|
831
|
+
title: string;
|
|
832
|
+
learningObjectives: {
|
|
833
|
+
code: string;
|
|
834
|
+
statement: string;
|
|
835
|
+
standardRefs?: string[] | undefined;
|
|
836
|
+
}[];
|
|
837
|
+
}, {
|
|
838
|
+
lessonId: string;
|
|
839
|
+
title: string;
|
|
840
|
+
learningObjectives: {
|
|
841
|
+
code: string;
|
|
842
|
+
statement: string;
|
|
843
|
+
standardRefs?: string[] | undefined;
|
|
844
|
+
}[];
|
|
845
|
+
durationMinutes?: number | undefined;
|
|
846
|
+
}>;
|
|
847
|
+
};
|
|
848
|
+
writeLessonBody: {
|
|
849
|
+
name: string;
|
|
850
|
+
description: string;
|
|
851
|
+
schema: z.ZodObject<{
|
|
852
|
+
lessonId: z.ZodString;
|
|
853
|
+
fullMarkdown: z.ZodString;
|
|
854
|
+
activitySequence: z.ZodArray<z.ZodString, "many">;
|
|
855
|
+
}, "strip", z.ZodTypeAny, {
|
|
856
|
+
lessonId: string;
|
|
857
|
+
activitySequence: string[];
|
|
858
|
+
fullMarkdown: string;
|
|
859
|
+
}, {
|
|
860
|
+
lessonId: string;
|
|
861
|
+
activitySequence: string[];
|
|
862
|
+
fullMarkdown: string;
|
|
863
|
+
}>;
|
|
864
|
+
};
|
|
865
|
+
patchLessonSection: {
|
|
866
|
+
name: string;
|
|
867
|
+
description: string;
|
|
868
|
+
schema: z.ZodObject<{
|
|
869
|
+
filePath: z.ZodString;
|
|
870
|
+
targetSectionHeader: z.ZodString;
|
|
871
|
+
replacementMarkdown: z.ZodString;
|
|
872
|
+
}, "strip", z.ZodTypeAny, {
|
|
873
|
+
filePath: string;
|
|
874
|
+
targetSectionHeader: string;
|
|
875
|
+
replacementMarkdown: string;
|
|
876
|
+
}, {
|
|
877
|
+
filePath: string;
|
|
878
|
+
targetSectionHeader: string;
|
|
879
|
+
replacementMarkdown: string;
|
|
880
|
+
}>;
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
declare const activityTools: {
|
|
884
|
+
writeActLabOperations: {
|
|
885
|
+
name: string;
|
|
886
|
+
description: string;
|
|
887
|
+
schema: z.ZodObject<{
|
|
888
|
+
lessonId: z.ZodString;
|
|
889
|
+
targetPlatform: z.ZodDefault<z.ZodString>;
|
|
890
|
+
stepByStepSteps: z.ZodArray<z.ZodObject<{
|
|
891
|
+
stepNumber: z.ZodNumber;
|
|
892
|
+
instruction: z.ZodString;
|
|
893
|
+
starterCodeSnippet: z.ZodOptional<z.ZodString>;
|
|
894
|
+
solutionCodeSnippet: z.ZodOptional<z.ZodString>;
|
|
895
|
+
}, "strip", z.ZodTypeAny, {
|
|
896
|
+
stepNumber: number;
|
|
897
|
+
instruction: string;
|
|
898
|
+
starterCodeSnippet?: string | undefined;
|
|
899
|
+
solutionCodeSnippet?: string | undefined;
|
|
900
|
+
}, {
|
|
901
|
+
stepNumber: number;
|
|
902
|
+
instruction: string;
|
|
903
|
+
starterCodeSnippet?: string | undefined;
|
|
904
|
+
solutionCodeSnippet?: string | undefined;
|
|
905
|
+
}>, "many">;
|
|
906
|
+
}, "strip", z.ZodTypeAny, {
|
|
907
|
+
lessonId: string;
|
|
908
|
+
targetPlatform: string;
|
|
909
|
+
stepByStepSteps: {
|
|
910
|
+
stepNumber: number;
|
|
911
|
+
instruction: string;
|
|
912
|
+
starterCodeSnippet?: string | undefined;
|
|
913
|
+
solutionCodeSnippet?: string | undefined;
|
|
914
|
+
}[];
|
|
915
|
+
}, {
|
|
916
|
+
lessonId: string;
|
|
917
|
+
stepByStepSteps: {
|
|
918
|
+
stepNumber: number;
|
|
919
|
+
instruction: string;
|
|
920
|
+
starterCodeSnippet?: string | undefined;
|
|
921
|
+
solutionCodeSnippet?: string | undefined;
|
|
922
|
+
}[];
|
|
923
|
+
targetPlatform?: string | undefined;
|
|
924
|
+
}>;
|
|
925
|
+
};
|
|
926
|
+
};
|
|
927
|
+
declare const assessorTools: {
|
|
928
|
+
writeQuizBank: {
|
|
929
|
+
name: string;
|
|
930
|
+
description: string;
|
|
931
|
+
schema: z.ZodObject<{
|
|
932
|
+
lessonId: z.ZodString;
|
|
933
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
934
|
+
id: z.ZodString;
|
|
935
|
+
prompt: z.ZodString;
|
|
936
|
+
options: z.ZodArray<z.ZodString, "many">;
|
|
937
|
+
correctIndex: z.ZodNumber;
|
|
938
|
+
explanation: z.ZodString;
|
|
939
|
+
bloomLevel: z.ZodString;
|
|
940
|
+
}, "strip", z.ZodTypeAny, {
|
|
941
|
+
options: string[];
|
|
942
|
+
bloomLevel: string;
|
|
943
|
+
explanation: string;
|
|
944
|
+
prompt: string;
|
|
945
|
+
id: string;
|
|
946
|
+
correctIndex: number;
|
|
947
|
+
}, {
|
|
948
|
+
options: string[];
|
|
949
|
+
bloomLevel: string;
|
|
950
|
+
explanation: string;
|
|
951
|
+
prompt: string;
|
|
952
|
+
id: string;
|
|
953
|
+
correctIndex: number;
|
|
954
|
+
}>, "many">;
|
|
955
|
+
}, "strip", z.ZodTypeAny, {
|
|
956
|
+
lessonId: string;
|
|
957
|
+
questions: {
|
|
958
|
+
options: string[];
|
|
959
|
+
bloomLevel: string;
|
|
960
|
+
explanation: string;
|
|
961
|
+
prompt: string;
|
|
962
|
+
id: string;
|
|
963
|
+
correctIndex: number;
|
|
964
|
+
}[];
|
|
965
|
+
}, {
|
|
966
|
+
lessonId: string;
|
|
967
|
+
questions: {
|
|
968
|
+
options: string[];
|
|
969
|
+
bloomLevel: string;
|
|
970
|
+
explanation: string;
|
|
971
|
+
prompt: string;
|
|
972
|
+
id: string;
|
|
973
|
+
correctIndex: number;
|
|
974
|
+
}[];
|
|
975
|
+
}>;
|
|
976
|
+
};
|
|
977
|
+
generateRubricMatrix: {
|
|
978
|
+
name: string;
|
|
979
|
+
description: string;
|
|
980
|
+
schema: z.ZodObject<{
|
|
981
|
+
lessonId: z.ZodString;
|
|
982
|
+
criteria: z.ZodArray<z.ZodObject<{
|
|
983
|
+
criterionName: z.ZodString;
|
|
984
|
+
weight: z.ZodNumber;
|
|
985
|
+
levels: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
986
|
+
}, "strip", z.ZodTypeAny, {
|
|
987
|
+
criterionName: string;
|
|
988
|
+
weight: number;
|
|
989
|
+
levels: Record<string, string>;
|
|
990
|
+
}, {
|
|
991
|
+
criterionName: string;
|
|
992
|
+
weight: number;
|
|
993
|
+
levels: Record<string, string>;
|
|
994
|
+
}>, "many">;
|
|
995
|
+
}, "strip", z.ZodTypeAny, {
|
|
996
|
+
criteria: {
|
|
997
|
+
criterionName: string;
|
|
998
|
+
weight: number;
|
|
999
|
+
levels: Record<string, string>;
|
|
1000
|
+
}[];
|
|
1001
|
+
lessonId: string;
|
|
1002
|
+
}, {
|
|
1003
|
+
criteria: {
|
|
1004
|
+
criterionName: string;
|
|
1005
|
+
weight: number;
|
|
1006
|
+
levels: Record<string, string>;
|
|
1007
|
+
}[];
|
|
1008
|
+
lessonId: string;
|
|
1009
|
+
}>;
|
|
1010
|
+
};
|
|
1011
|
+
};
|
|
1012
|
+
declare const illustratorTools: {
|
|
1013
|
+
generateMermaidDiagram: {
|
|
1014
|
+
name: string;
|
|
1015
|
+
description: string;
|
|
1016
|
+
schema: z.ZodObject<{
|
|
1017
|
+
diagramType: z.ZodEnum<["flowchart", "sequenceDiagram", "classDiagram", "stateDiagram"]>;
|
|
1018
|
+
mermaidCode: z.ZodString;
|
|
1019
|
+
}, "strip", z.ZodTypeAny, {
|
|
1020
|
+
mermaidCode: string;
|
|
1021
|
+
diagramType: "flowchart" | "sequenceDiagram" | "classDiagram" | "stateDiagram";
|
|
1022
|
+
}, {
|
|
1023
|
+
mermaidCode: string;
|
|
1024
|
+
diagramType: "flowchart" | "sequenceDiagram" | "classDiagram" | "stateDiagram";
|
|
1025
|
+
}>;
|
|
1026
|
+
};
|
|
1027
|
+
generateSlideDeck: {
|
|
1028
|
+
name: string;
|
|
1029
|
+
description: string;
|
|
1030
|
+
schema: z.ZodObject<{
|
|
1031
|
+
lessonId: z.ZodString;
|
|
1032
|
+
marpMarkdown: z.ZodString;
|
|
1033
|
+
}, "strip", z.ZodTypeAny, {
|
|
1034
|
+
lessonId: string;
|
|
1035
|
+
marpMarkdown: string;
|
|
1036
|
+
}, {
|
|
1037
|
+
lessonId: string;
|
|
1038
|
+
marpMarkdown: string;
|
|
1039
|
+
}>;
|
|
1040
|
+
};
|
|
1041
|
+
};
|
|
1042
|
+
declare const techSmeTools: {
|
|
1043
|
+
sandboxExecuteCodeLab: {
|
|
1044
|
+
name: string;
|
|
1045
|
+
description: string;
|
|
1046
|
+
schema: z.ZodObject<{
|
|
1047
|
+
language: z.ZodEnum<["swift", "python", "javascript", "html_css"]>;
|
|
1048
|
+
code: z.ZodString;
|
|
1049
|
+
expectedOutput: z.ZodOptional<z.ZodString>;
|
|
1050
|
+
}, "strip", z.ZodTypeAny, {
|
|
1051
|
+
code: string;
|
|
1052
|
+
language: "swift" | "python" | "javascript" | "html_css";
|
|
1053
|
+
expectedOutput?: string | undefined;
|
|
1054
|
+
}, {
|
|
1055
|
+
code: string;
|
|
1056
|
+
language: "swift" | "python" | "javascript" | "html_css";
|
|
1057
|
+
expectedOutput?: string | undefined;
|
|
1058
|
+
}>;
|
|
1059
|
+
};
|
|
1060
|
+
lintSyntaxErrors: {
|
|
1061
|
+
name: string;
|
|
1062
|
+
description: string;
|
|
1063
|
+
schema: z.ZodObject<{
|
|
1064
|
+
language: z.ZodString;
|
|
1065
|
+
code: z.ZodString;
|
|
1066
|
+
}, "strip", z.ZodTypeAny, {
|
|
1067
|
+
code: string;
|
|
1068
|
+
language: string;
|
|
1069
|
+
}, {
|
|
1070
|
+
code: string;
|
|
1071
|
+
language: string;
|
|
1072
|
+
}>;
|
|
1073
|
+
};
|
|
1074
|
+
};
|
|
1075
|
+
declare const reviewerTools: {
|
|
1076
|
+
auditAlignmentMatrix: {
|
|
1077
|
+
name: string;
|
|
1078
|
+
description: string;
|
|
1079
|
+
schema: z.ZodObject<{
|
|
1080
|
+
lessonId: z.ZodString;
|
|
1081
|
+
loCoverageRate: z.ZodNumber;
|
|
1082
|
+
detectedGaps: z.ZodArray<z.ZodString, "many">;
|
|
1083
|
+
verdict: z.ZodEnum<["PASS", "WARN", "FAIL"]>;
|
|
1084
|
+
}, "strip", z.ZodTypeAny, {
|
|
1085
|
+
lessonId: string;
|
|
1086
|
+
loCoverageRate: number;
|
|
1087
|
+
detectedGaps: string[];
|
|
1088
|
+
verdict: "PASS" | "FAIL" | "WARN";
|
|
1089
|
+
}, {
|
|
1090
|
+
lessonId: string;
|
|
1091
|
+
loCoverageRate: number;
|
|
1092
|
+
detectedGaps: string[];
|
|
1093
|
+
verdict: "PASS" | "FAIL" | "WARN";
|
|
1094
|
+
}>;
|
|
1095
|
+
};
|
|
1096
|
+
verifyReadingLevel: {
|
|
1097
|
+
name: string;
|
|
1098
|
+
description: string;
|
|
1099
|
+
schema: z.ZodObject<{
|
|
1100
|
+
targetAgeGroup: z.ZodString;
|
|
1101
|
+
textSnippet: z.ZodString;
|
|
1102
|
+
readingGradeLevel: z.ZodString;
|
|
1103
|
+
isAppropriate: z.ZodBoolean;
|
|
1104
|
+
}, "strip", z.ZodTypeAny, {
|
|
1105
|
+
targetAgeGroup: string;
|
|
1106
|
+
textSnippet: string;
|
|
1107
|
+
readingGradeLevel: string;
|
|
1108
|
+
isAppropriate: boolean;
|
|
1109
|
+
}, {
|
|
1110
|
+
targetAgeGroup: string;
|
|
1111
|
+
textSnippet: string;
|
|
1112
|
+
readingGradeLevel: string;
|
|
1113
|
+
isAppropriate: boolean;
|
|
1114
|
+
}>;
|
|
1115
|
+
};
|
|
1116
|
+
};
|
|
1117
|
+
declare const packagerTools: {
|
|
1118
|
+
createDeliveryPackage: {
|
|
1119
|
+
name: string;
|
|
1120
|
+
description: string;
|
|
1121
|
+
schema: z.ZodObject<{
|
|
1122
|
+
projectSlug: z.ZodString;
|
|
1123
|
+
packageType: z.ZodEnum<["TEACHER", "STUDENT", "PARENT", "CLIENT", "ALL"]>;
|
|
1124
|
+
outputDirectory: z.ZodDefault<z.ZodString>;
|
|
1125
|
+
}, "strip", z.ZodTypeAny, {
|
|
1126
|
+
projectSlug: string;
|
|
1127
|
+
packageType: "ALL" | "TEACHER" | "STUDENT" | "PARENT" | "CLIENT";
|
|
1128
|
+
outputDirectory: string;
|
|
1129
|
+
}, {
|
|
1130
|
+
projectSlug: string;
|
|
1131
|
+
packageType: "ALL" | "TEACHER" | "STUDENT" | "PARENT" | "CLIENT";
|
|
1132
|
+
outputDirectory?: string | undefined;
|
|
1133
|
+
}>;
|
|
1134
|
+
};
|
|
1135
|
+
};
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* Model Policy Resolver (Economic & Expert Council Architecture - August 2026)
|
|
1139
|
+
*
|
|
1140
|
+
* Core Routing Strategy:
|
|
1141
|
+
* 1. Expert Council / LLM-as-Judge (Tier 1):
|
|
1142
|
+
* - OpenRouter / Google: google/gemini-3.7-flash (Opus-grade accuracy, 1M context)
|
|
1143
|
+
* - DeepSeek: deepseek-v4-pro (Build 0813 - Deep CoT Reasoning)
|
|
1144
|
+
* - Alibaba: qwen3.8-max (2.4T MoE Flagship)
|
|
1145
|
+
* - NVIDIA NIM: nvidia/nemotron-3-ultra-550b-a55b (Robust Free Fallback)
|
|
1146
|
+
*
|
|
1147
|
+
* 2. Mid & Mid-High Production / Copilot (Tier 2 - Primary Economic):
|
|
1148
|
+
* - DeepSeek: deepseek-v4-flash (Build 0731 - $0.22/1M, 1M context, 284B MoE)
|
|
1149
|
+
* - Alibaba: qwen3.7-flash ($0.03/1M, ultra-fast tool caller)
|
|
1150
|
+
* - OpenRouter / Google: google/gemini-3.7-flash
|
|
1151
|
+
*
|
|
1152
|
+
* 3. Easy / Structured & Free Tasks (Tier 3):
|
|
1153
|
+
* - NVIDIA NIM: nvidia/nemotron-3.5-lightning-30b-a3b (Free 1.8s MoE)
|
|
1154
|
+
* - DeepSeek: deepseek-v4-flash
|
|
1155
|
+
* - Alibaba: qwen3.7-flash ($0.03/1M, ultra-fast tool caller)
|
|
1156
|
+
* - Google: gemini-3.5-flash-lite
|
|
1157
|
+
*/
|
|
1158
|
+
type ModelProviderKey = 'deepseek' | 'openrouter' | 'alibaba' | 'google' | 'nvidia' | 'zhipu' | 'ollama' | 'openai' | 'anthropic';
|
|
1159
|
+
interface ModelPolicyResolution {
|
|
1160
|
+
provider: ModelProviderKey;
|
|
1161
|
+
modelName: string;
|
|
1162
|
+
maxTokens: number;
|
|
1163
|
+
temperature: number;
|
|
1164
|
+
reasoningEffort?: 'low' | 'medium' | 'high' | 'max';
|
|
1165
|
+
contextWindow?: number;
|
|
1166
|
+
providerLabel?: string;
|
|
1167
|
+
tierDescription?: string;
|
|
1168
|
+
}
|
|
1169
|
+
interface MultiProviderPolicyResolution {
|
|
1170
|
+
primary: ModelPolicyResolution;
|
|
1171
|
+
fallbacks: ModelPolicyResolution[];
|
|
1172
|
+
candidateChain: ModelPolicyResolution[];
|
|
1173
|
+
expertCouncil?: ModelPolicyResolution[];
|
|
1174
|
+
}
|
|
1175
|
+
declare const DEFAULT_ENABLED_PROVIDERS: Record<ModelProviderKey, boolean>;
|
|
1176
|
+
declare class ModelPolicyResolver {
|
|
1177
|
+
/**
|
|
1178
|
+
* Returns the High-End Expert Council for LLM-as-Judge & Architecture Evaluation
|
|
1179
|
+
*/
|
|
1180
|
+
static getExpertCouncil(): ModelPolicyResolution[];
|
|
1181
|
+
/**
|
|
1182
|
+
* Builds the multi-provider priority candidates list for a given role/artifact
|
|
1183
|
+
*/
|
|
1184
|
+
static getCandidatePool(role: string, artifactType?: string): ModelPolicyResolution[];
|
|
1185
|
+
/**
|
|
1186
|
+
* Resolves the primary model and active fallback chain considering enabled providers
|
|
1187
|
+
*/
|
|
1188
|
+
static resolve(role: string, artifactType?: string, userPreferredModel?: string, enabledProviders?: Record<string, boolean>): ModelPolicyResolution;
|
|
1189
|
+
/**
|
|
1190
|
+
* Resolves full multi-provider resolution with primary, fallbacks, and council
|
|
1191
|
+
*/
|
|
1192
|
+
static resolveMultiProvider(role: string, artifactType?: string, userPreferredModel?: string, enabledProviders?: Record<string, boolean>): MultiProviderPolicyResolution;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
interface JudgeEvaluationResult {
|
|
1196
|
+
decision: 'APPROVED' | 'NEEDS_REVISION' | 'REJECTED';
|
|
1197
|
+
score: number;
|
|
1198
|
+
passed: boolean;
|
|
1199
|
+
evaluatedBy: '@agent-as-judge' | '@heuristic-linter';
|
|
1200
|
+
critique: string;
|
|
1201
|
+
strengths: string[];
|
|
1202
|
+
weaknesses: string[];
|
|
1203
|
+
autoRepairInstructions?: string;
|
|
1204
|
+
}
|
|
1205
|
+
interface AsyncLLMJudgeInput {
|
|
1206
|
+
targetArtifactType: string;
|
|
1207
|
+
lessonId: string;
|
|
1208
|
+
expectedLanguage: string;
|
|
1209
|
+
targetObjectives: Array<{
|
|
1210
|
+
code: string;
|
|
1211
|
+
description: string;
|
|
1212
|
+
bloomLevel: string;
|
|
1213
|
+
}>;
|
|
1214
|
+
generatedContentJson: string;
|
|
1215
|
+
/** Verbatim standard statements (canonical ID -> text) from the Standards Registry. */
|
|
1216
|
+
standardStatements?: Record<string, string>;
|
|
1217
|
+
modelOptions?: ModelResolutionOptions;
|
|
1218
|
+
}
|
|
1219
|
+
declare class LLMJudgeEngine {
|
|
1220
|
+
/**
|
|
1221
|
+
* Executes genuine LLM-as-Judge evaluation using the audit flow.
|
|
1222
|
+
*/
|
|
1223
|
+
static evaluateArtifactWithLLM(input: AsyncLLMJudgeInput): Promise<JudgeEvaluationResult>;
|
|
1224
|
+
/**
|
|
1225
|
+
* Evaluates Gate 1 (SOT Foundation: LEARNER_PROFILE, PROJECT_BRIEF, REFERENCE_PACK)
|
|
1226
|
+
* Calibrated heuristic pre-check.
|
|
1227
|
+
*/
|
|
1228
|
+
static evaluateGate1(learnerProfileMarkdown: string, referencePackMarkdown: string): JudgeEvaluationResult;
|
|
1229
|
+
/**
|
|
1230
|
+
* Evaluates Gate 2 (Curriculum Framework: Units, Modules, Lessons, Bloom Progression)
|
|
1231
|
+
*/
|
|
1232
|
+
static evaluateGate2(frameworkMarkdown: string, targetUnitCount?: number): JudgeEvaluationResult;
|
|
1233
|
+
/**
|
|
1234
|
+
* Evaluates a produced Lesson Artifact (LESSON, ACT, QUIZ, SLIDE) with heuristic structure checks
|
|
1235
|
+
*/
|
|
1236
|
+
static evaluateArtifact(artifactType: string, content: string, lessonTitle: string): JudgeEvaluationResult;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
/** Định nghĩa tool (OpenAI-compatible function schema) cho LLM tool-calling */
|
|
1240
|
+
interface ToolDefinition {
|
|
1241
|
+
type: 'function';
|
|
1242
|
+
function: {
|
|
1243
|
+
name: string;
|
|
1244
|
+
description: string;
|
|
1245
|
+
/** JSON Schema cho tham số */
|
|
1246
|
+
parameters: Record<string, unknown>;
|
|
1247
|
+
};
|
|
1248
|
+
}
|
|
1249
|
+
/** Tool call hoàn chỉnh sau khi aggregate các delta */
|
|
1250
|
+
interface AggregatedToolCall {
|
|
1251
|
+
id: string;
|
|
1252
|
+
name: string;
|
|
1253
|
+
/** JSON string arguments từ model */
|
|
1254
|
+
arguments: string;
|
|
1255
|
+
}
|
|
1256
|
+
/** Kết quả thực thi tool do caller cung cấp */
|
|
1257
|
+
interface ToolExecutionResult {
|
|
1258
|
+
toolCallId: string;
|
|
1259
|
+
name: string;
|
|
1260
|
+
/** Kết quả serialize thành JSON string khi gửi lại model */
|
|
1261
|
+
result: unknown;
|
|
1262
|
+
isError?: boolean;
|
|
1263
|
+
}
|
|
1264
|
+
/** Executor: nhận (name, parsedArgs) → kết quả. Throw = lỗi tool (báo lại model) */
|
|
1265
|
+
type ToolExecutor = (name: string, args: Record<string, unknown>) => Promise<unknown>;
|
|
1266
|
+
/** Cấu hình vòng lặp tool-calling */
|
|
1267
|
+
interface ToolLoopConfig {
|
|
1268
|
+
tools: ToolDefinition[];
|
|
1269
|
+
executor: ToolExecutor;
|
|
1270
|
+
/** Số vòng tool-call tối đa (chống vòng lặp vô hạn). Mặc định 4 */
|
|
1271
|
+
maxRounds?: number;
|
|
1272
|
+
/** Báo mỗi lần bắt đầu thực thi tool (để UI hiển thị) */
|
|
1273
|
+
onToolStart?: (name: string, args: Record<string, unknown>) => void;
|
|
1274
|
+
/** Báo kết quả tool */
|
|
1275
|
+
onToolResult?: (result: ToolExecutionResult) => void;
|
|
1276
|
+
/** Báo lỗi tool (không dừng workflow — tool error được đưa lại cho model tự xử lý) */
|
|
1277
|
+
onToolError?: (name: string, error: string) => void;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* Stream chat CÓ tool-calling (vòng lặp: model → tool → kết quả → model → …).
|
|
1282
|
+
* Chạy trên OpenRouter (mọi model OpenAI-compatible). Tool error KHÔNG làm chết stream:
|
|
1283
|
+
* lỗi được đóng gói gửi lại model để tự xử lý (và được báo qua onToolError cho observability).
|
|
1284
|
+
*/
|
|
1285
|
+
declare function streamCurriculumAIInferenceWithTools(messages: ChatMessage[], projectContext: string, options: StreamRunnerOptions, loop: ToolLoopConfig, onChunk?: (token: string, type: ChunkType) => void): Promise<string>;
|
|
1286
|
+
|
|
1287
|
+
export { type ActivityPromptInput, type AggregatedToolCall, type AsyncLLMJudgeInput, type AuditCurriculumQualityInput, ChatMessage, ChunkType, type CodeLabPromptInput, 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 JudgeEvaluationResult, type JudgePromptInput, LLMJudgeEngine, type LessonPromptInput, type ModelPolicyResolution, ModelPolicyResolver, type ModelProviderKey, ModelResolutionOptions, type MultiProviderPolicyResolution, type ProjectInstructionPromptInput, type SelfLabPromptInput, type SlidesPromptInput, type StreamDiagnosticQuizInput, type StreamLessonMasterInput, StreamRunnerOptions, type StreamSelfLabInput, type TeacherGuidePromptInput, type ToolDefinition, type ToolExecutionResult, type ToolExecutor, type ToolLoopConfig, type WorksheetPromptInput, activityTools, analystTools, assessorTools, auditCurriculumQualityFlow, buildActivityPrompt, buildCodeLabPrompt, buildDiagnosticQuizPrompt, buildExtensionPrompt, buildHandoutPrompt, buildJudgePrompt, buildLessonMasterPrompt, buildProjectInstructionPrompt, buildSelfLabPrompt, buildSlidesPrompt, buildTeacherGuidePrompt, buildWorksheetPrompt, contentTools, designerTools, generateActivityFlow, generateCodeLabFlow, generateDiagnosticQuizFlow, generateExtensionFlow, generateHandoutFlow, generateLessonMasterFlow, generateProjectInstructionFlow, generateSelfLabFlow, generateSlidesFlow, generateTeacherGuideFlow, generateWorksheetFlow, illustratorTools, packagerTools, researcherTools, reviewerTools, streamCurriculumAIInferenceWithTools, streamDiagnosticQuizFlow, streamLessonMasterFlow, streamSelfLabFlow, techSmeTools };
|