@thanh01.pmt/curriculum-kit 1.4.3 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/index.cjs +8 -4
- package/dist/ai/index.cjs.map +1 -1
- package/dist/ai/index.d.cts +2 -2
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/index.mjs +8 -4
- package/dist/ai/index.mjs.map +1 -1
- package/dist/index.cjs +46 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -14
- package/dist/index.d.ts +14 -14
- package/dist/index.mjs +46 -18
- package/dist/index.mjs.map +1 -1
- package/dist/media/index.cjs +8 -4
- package/dist/media/index.cjs.map +1 -1
- package/dist/media/index.d.cts +1 -1
- package/dist/media/index.d.ts +1 -1
- package/dist/media/index.mjs +8 -4
- package/dist/media/index.mjs.map +1 -1
- package/dist/pipeline/index.cjs.map +1 -1
- package/dist/pipeline/index.mjs.map +1 -1
- package/dist/{streamRunner-DtQq0HV_.d.cts → streamRunner-CYESG6IE.d.cts} +2 -2
- package/dist/{streamRunner-DtQq0HV_.d.ts → streamRunner-CYESG6IE.d.ts} +2 -2
- package/dist/workflow/index.cjs +9 -5
- package/dist/workflow/index.cjs.map +1 -1
- package/dist/workflow/index.mjs +9 -5
- package/dist/workflow/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -530,7 +530,9 @@ Guidelines:
|
|
|
530
530
|
if (isNvidiaPreferred || uniqueNvidiaModels.length > 0) {
|
|
531
531
|
for (const model of uniqueNvidiaModels) {
|
|
532
532
|
try {
|
|
533
|
-
const
|
|
533
|
+
const nvdIdle = options.idleTimeoutMs ?? 18e4;
|
|
534
|
+
const nvdTotal = options.timeoutMs ?? 6e5;
|
|
535
|
+
const idle = createStreamAbortController({ idleMs: nvdIdle, totalMs: nvdTotal });
|
|
534
536
|
const res = await fetch("https://integrate.api.nvidia.com/v1/chat/completions", {
|
|
535
537
|
method: "POST",
|
|
536
538
|
headers: {
|
|
@@ -727,7 +729,9 @@ Guidelines:
|
|
|
727
729
|
const { provider, model } = target;
|
|
728
730
|
if (provider === "nvidia" && nvidiaKey && isProviderEnabled("nvidia")) {
|
|
729
731
|
try {
|
|
730
|
-
const
|
|
732
|
+
const nvdIdle = options.idleTimeoutMs ?? 18e4;
|
|
733
|
+
const nvdTotal = options.timeoutMs ?? 6e5;
|
|
734
|
+
const idle = createStreamAbortController({ idleMs: nvdIdle, totalMs: nvdTotal });
|
|
731
735
|
const res = await fetch("https://integrate.api.nvidia.com/v1/chat/completions", {
|
|
732
736
|
method: "POST",
|
|
733
737
|
headers: {
|
|
@@ -881,8 +885,8 @@ exports.DEFAULT_ARTIFACT_STREAM_IDLE_MS = void 0; exports.DEFAULT_ARTIFACT_STREA
|
|
|
881
885
|
var init_streamRunner = __esm({
|
|
882
886
|
"src/ai/streamRunner.ts"() {
|
|
883
887
|
init_errors();
|
|
884
|
-
exports.DEFAULT_ARTIFACT_STREAM_IDLE_MS =
|
|
885
|
-
exports.DEFAULT_ARTIFACT_STREAM_TOTAL_MS =
|
|
888
|
+
exports.DEFAULT_ARTIFACT_STREAM_IDLE_MS = 9e4;
|
|
889
|
+
exports.DEFAULT_ARTIFACT_STREAM_TOTAL_MS = 48e4;
|
|
886
890
|
}
|
|
887
891
|
});
|
|
888
892
|
|
|
@@ -9387,7 +9391,7 @@ function buildStandardStackMarkdown(opts) {
|
|
|
9387
9391
|
}
|
|
9388
9392
|
|
|
9389
9393
|
// src/services/sotGeneratorService.ts
|
|
9390
|
-
var __filename$1 = typeof (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)) === "string" ? url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))) : "";
|
|
9394
|
+
var __filename$1 = typeof (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)) === "string" && typeof url.fileURLToPath === "function" ? url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))) : "";
|
|
9391
9395
|
var __dirname2 = __filename$1 ? path3__default.default.dirname(__filename$1) : process.cwd();
|
|
9392
9396
|
function loadSotTemplate(templateFileName) {
|
|
9393
9397
|
const possiblePaths = [
|
|
@@ -24059,7 +24063,7 @@ ${lines.join("\n")}
|
|
|
24059
24063
|
}
|
|
24060
24064
|
|
|
24061
24065
|
// src/services/lessonProductionService.ts
|
|
24062
|
-
var __filename2 = typeof (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)) === "string" ? url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))) : "";
|
|
24066
|
+
var __filename2 = typeof (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)) === "string" && typeof url.fileURLToPath === "function" ? url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href))) : "";
|
|
24063
24067
|
var _resolvedDir = __filename2 ? path3__default.default.dirname(__filename2) : typeof __dirname !== "undefined" ? __dirname : process.cwd();
|
|
24064
24068
|
function loadCurriculumTemplate(templateName) {
|
|
24065
24069
|
const candidatePaths = [
|
|
@@ -27083,20 +27087,34 @@ var DeterministicPipelineRunner = class {
|
|
|
27083
27087
|
|
|
27084
27088
|
// src/services/prefillService.ts
|
|
27085
27089
|
init_streamRunner();
|
|
27086
|
-
var DEFAULT_STREAM_IDLE_MS =
|
|
27087
|
-
var DEFAULT_STREAM_TOTAL_MS =
|
|
27090
|
+
var DEFAULT_STREAM_IDLE_MS = 9e4;
|
|
27091
|
+
var DEFAULT_STREAM_TOTAL_MS = 48e4;
|
|
27092
|
+
var LAYER_IDLE_BUDGET_MS = {
|
|
27093
|
+
1: 9e4,
|
|
27094
|
+
2: 9e4,
|
|
27095
|
+
3: 18e4
|
|
27096
|
+
// Layer 3 synthesizes all accumulated context + pathways (3 minutes idle protection)
|
|
27097
|
+
};
|
|
27088
27098
|
var LAYER_TOTAL_BUDGET_MS = {
|
|
27089
|
-
1:
|
|
27090
|
-
2:
|
|
27091
|
-
3:
|
|
27099
|
+
1: 48e4,
|
|
27100
|
+
2: 48e4,
|
|
27101
|
+
3: 6e5
|
|
27092
27102
|
};
|
|
27093
27103
|
function resolveStreamBudget(layer, opts) {
|
|
27094
27104
|
const envIdle = Number(process.env.WIZARD_PREFILL_IDLE_TIMEOUT_MS);
|
|
27095
27105
|
const envTotal = Number(process.env.WIZARD_PREFILL_TOTAL_TIMEOUT_MS);
|
|
27106
|
+
const isNvidia = Boolean(
|
|
27107
|
+
opts?.provider && opts.provider.toLowerCase().includes("nvidia") || opts?.model && (opts.model.toLowerCase().includes("nvidia") || opts.model.toLowerCase().includes("nemotron"))
|
|
27108
|
+
);
|
|
27109
|
+
const layerIdle = layer !== void 0 ? LAYER_IDLE_BUDGET_MS[layer] : void 0;
|
|
27110
|
+
const baseIdle = layerIdle ?? DEFAULT_STREAM_IDLE_MS;
|
|
27111
|
+
const computedDefaultIdle = isNvidia ? Math.max(baseIdle, 18e4) : baseIdle;
|
|
27096
27112
|
const layerTotal = layer !== void 0 ? LAYER_TOTAL_BUDGET_MS[layer] : void 0;
|
|
27113
|
+
const baseTotal = layerTotal ?? DEFAULT_STREAM_TOTAL_MS;
|
|
27114
|
+
const computedDefaultTotal = isNvidia ? Math.max(baseTotal, 6e5) : baseTotal;
|
|
27097
27115
|
return {
|
|
27098
|
-
idleMs: opts?.idleMs ?? (Number.isFinite(envIdle) && envIdle > 0 ? envIdle :
|
|
27099
|
-
totalMs: opts?.totalMs ?? (Number.isFinite(envTotal) && envTotal > 0 ? envTotal :
|
|
27116
|
+
idleMs: opts?.idleMs ?? (Number.isFinite(envIdle) && envIdle > 0 ? envIdle : computedDefaultIdle),
|
|
27117
|
+
totalMs: opts?.totalMs ?? (Number.isFinite(envTotal) && envTotal > 0 ? envTotal : computedDefaultTotal)
|
|
27100
27118
|
};
|
|
27101
27119
|
}
|
|
27102
27120
|
function createStreamChunkExtractor() {
|
|
@@ -27439,7 +27457,12 @@ Return concise JSON matching:
|
|
|
27439
27457
|
options.model,
|
|
27440
27458
|
options.provider,
|
|
27441
27459
|
// Research may run live web grounding — generous budget, still idle-guarded.
|
|
27442
|
-
resolveStreamBudget(void 0, {
|
|
27460
|
+
resolveStreamBudget(void 0, {
|
|
27461
|
+
idleMs: options.idleTimeoutMs,
|
|
27462
|
+
totalMs: options.timeoutMs,
|
|
27463
|
+
model: options.model,
|
|
27464
|
+
provider: options.provider
|
|
27465
|
+
})
|
|
27443
27466
|
);
|
|
27444
27467
|
let parsedResearch = {
|
|
27445
27468
|
groundTruthSummary: `Verified ecosystem standards for ${projectName}`,
|
|
@@ -27642,9 +27665,14 @@ REQUIREMENT: Synthesize ALL parameters above \u2014 every single line in FULL AC
|
|
|
27642
27665
|
},
|
|
27643
27666
|
options.model,
|
|
27644
27667
|
options.provider,
|
|
27645
|
-
// RC-W1: layer-aware budget — Layer
|
|
27646
|
-
// models may think/stream for minutes. Idle window still catches hangs.
|
|
27647
|
-
resolveStreamBudget(targetLayer, {
|
|
27668
|
+
// RC-W1: layer-aware budget — Layer 3 synthesizes full context and free-tier
|
|
27669
|
+
// models (especially NVIDIA NIM) may think/stream for minutes. Idle window still catches hangs.
|
|
27670
|
+
resolveStreamBudget(targetLayer, {
|
|
27671
|
+
idleMs: options.idleTimeoutMs,
|
|
27672
|
+
totalMs: options.timeoutMs,
|
|
27673
|
+
model: options.model,
|
|
27674
|
+
provider: options.provider
|
|
27675
|
+
})
|
|
27648
27676
|
);
|
|
27649
27677
|
const parsed = safeParseJson(rawContent);
|
|
27650
27678
|
return {
|
|
@@ -30220,6 +30248,7 @@ exports.HandoutSectionSchema = HandoutSectionSchema;
|
|
|
30220
30248
|
exports.InstructionSectionSchema = InstructionSectionSchema;
|
|
30221
30249
|
exports.InstructionStepSchema = InstructionStepSchema;
|
|
30222
30250
|
exports.JudgeCriterionSchema = JudgeCriterionSchema;
|
|
30251
|
+
exports.LAYER_IDLE_BUDGET_MS = LAYER_IDLE_BUDGET_MS;
|
|
30223
30252
|
exports.LAYER_TOTAL_BUDGET_MS = LAYER_TOTAL_BUDGET_MS;
|
|
30224
30253
|
exports.LESSON_PLAN_TEMPLATE = LESSON_PLAN_TEMPLATE;
|
|
30225
30254
|
exports.LLMJudgeEngine = LLMJudgeEngine;
|