@thanh01.pmt/curriculum-kit 1.4.28 → 1.4.29

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.
Files changed (39) hide show
  1. package/dist/ai/index.cjs +12 -2
  2. package/dist/ai/index.cjs.map +1 -1
  3. package/dist/ai/index.d.cts +2 -2
  4. package/dist/ai/index.d.ts +2 -2
  5. package/dist/ai/index.mjs +12 -2
  6. package/dist/ai/index.mjs.map +1 -1
  7. package/dist/index.cjs +42 -3
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.cts +4 -4
  10. package/dist/index.d.ts +4 -4
  11. package/dist/index.mjs +42 -3
  12. package/dist/index.mjs.map +1 -1
  13. package/dist/media/index.cjs +12 -2
  14. package/dist/media/index.cjs.map +1 -1
  15. package/dist/media/index.d.cts +1 -1
  16. package/dist/media/index.d.ts +1 -1
  17. package/dist/media/index.mjs +12 -2
  18. package/dist/media/index.mjs.map +1 -1
  19. package/dist/pipeline/index.cjs.map +1 -1
  20. package/dist/pipeline/index.d.cts +1 -1
  21. package/dist/pipeline/index.d.ts +1 -1
  22. package/dist/pipeline/index.mjs.map +1 -1
  23. package/dist/publishers/index.d.cts +1 -1
  24. package/dist/publishers/index.d.ts +1 -1
  25. package/dist/storage/index.cjs +27 -0
  26. package/dist/storage/index.cjs.map +1 -1
  27. package/dist/storage/index.d.cts +11 -2
  28. package/dist/storage/index.d.ts +11 -2
  29. package/dist/storage/index.mjs +27 -0
  30. package/dist/storage/index.mjs.map +1 -1
  31. package/dist/{streamRunner-kpS4MZP1.d.cts → streamRunner-DYHFhNUr.d.cts} +1 -1
  32. package/dist/{streamRunner-kpS4MZP1.d.ts → streamRunner-DYHFhNUr.d.ts} +1 -1
  33. package/dist/{types-BUJGYiep.d.cts → types-Bgk-C4K2.d.cts} +11 -0
  34. package/dist/{types-BUJGYiep.d.ts → types-Bgk-C4K2.d.ts} +11 -0
  35. package/dist/workflow/index.cjs +14 -3
  36. package/dist/workflow/index.cjs.map +1 -1
  37. package/dist/workflow/index.mjs +14 -3
  38. package/dist/workflow/index.mjs.map +1 -1
  39. package/package.json +1 -1
@@ -500,7 +500,12 @@ Guidelines:
500
500
  const unique9RouterModels = Array.from(new Set(candidateModels));
501
501
  for (const model of unique9RouterModels) {
502
502
  try {
503
- const idle = createStreamAbortController({ idleMs: 45e3, totalMs: 3e5 });
503
+ const r9Idle = options.idleTimeoutMs ?? (Number(process.env.ARTIFACT_STREAM_IDLE_TIMEOUT_MS || process.env.STREAM_IDLE_TIMEOUT_MS) || 0) ?? 0;
504
+ const r9Total = options.timeoutMs ?? (Number(process.env.ARTIFACT_STREAM_TOTAL_TIMEOUT_MS || process.env.STREAM_TOTAL_TIMEOUT_MS) || 0) ?? 0;
505
+ const idle = createStreamAbortController({
506
+ idleMs: r9Idle > 0 ? r9Idle : 9e4,
507
+ totalMs: r9Total > 0 ? r9Total : 3e5
508
+ });
504
509
  const res = await fetch(`${ninerouterBaseUrl}/chat/completions`, {
505
510
  method: "POST",
506
511
  headers: {
@@ -743,7 +748,12 @@ Guidelines:
743
748
  try {
744
749
  const rawUrl = resolveApiKey("NINEROUTER_BASE_URL") || resolveApiKey("NINE_ROUTER_BASE_URL") || "https://ai-router.orchable.app/v1";
745
750
  const fbBaseUrl = rawUrl.replace(/["']/g, "").replace(/\/$/, "");
746
- const idle = createStreamAbortController({ idleMs: 45e3, totalMs: 3e5 });
751
+ const fbIdle = options.idleTimeoutMs ?? (Number(process.env.ARTIFACT_STREAM_IDLE_TIMEOUT_MS || process.env.STREAM_IDLE_TIMEOUT_MS) || 0) ?? 0;
752
+ const fbTotal = options.timeoutMs ?? (Number(process.env.ARTIFACT_STREAM_TOTAL_TIMEOUT_MS || process.env.STREAM_TOTAL_TIMEOUT_MS) || 0) ?? 0;
753
+ const idle = createStreamAbortController({
754
+ idleMs: fbIdle > 0 ? fbIdle : 9e4,
755
+ totalMs: fbTotal > 0 ? fbTotal : 3e5
756
+ });
747
757
  const res = await fetch(`${fbBaseUrl}/chat/completions`, {
748
758
  method: "POST",
749
759
  headers: {
@@ -18774,7 +18784,8 @@ function buildLanguageDirective(targetLanguage) {
18774
18784
  - All section titles, table headers, table cells, lesson names, learning objectives, pedagogical narratives, and cognitive analyses MUST be written in natural, fluent, academic ${name}.
18775
18785
  - Technical identifiers, code keywords (e.g. setup(), loop(), pinMode()), standard protocols (I2C, SPI, UART, GPIO), and component model numbers (ESP32, Arduino Uno) remain in standard technical notation, but all surrounding explanations MUST be in ${name}.
18776
18786
  - DO NOT mix in paragraphs, tables, or titles written in any other language. Strict adherence is required.${exampleLine ? `
18777
- ${exampleLine}` : ""}`;
18787
+ ${exampleLine}` : ""}
18788
+ - CJK / NON-LATIN SCRIPT BAN (ABSOLUTE): NEVER output characters from Chinese (\u6C49\u5B57), Japanese (\u304B\u306A/\u6F22\u5B57), or Korean (\uD55C\uAE00) scripts ANYWHERE in the document \u2014 not even a single glyph spliced inside a ${name} sentence. Observed past violations that are STRICTLY forbidden: \u6392\u67E5, \u5305\u542B, \u5BFC\u81F4, \u662F\u591A\u5C11, \u6280\u672F, \u771F\u673A, \u4F11\u606F, \u7EB8\u8D28. To express such meaning write it fully in ${name} or keep the ENGLISH technical term (e.g. write "t\u1EF1 ki\u1EC3m tra l\u1ED7i" / "self-debugging", "bao g\u1ED3m" / "includes"). A mechanical scanner rejects any document containing even one CJK character.`;
18778
18789
  }
18779
18790
  function matchesArtifactType(candidate, target) {
18780
18791
  const c = candidate.trim().toUpperCase();