icoa-cli 2.19.65 → 2.19.66

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.
@@ -610,7 +610,10 @@ export function registerAi4ctfCommand(program) {
610
610
  // token budget tracked in state.aiUsage.ai4ctf.
611
611
  const { getRealExamState } = await import('../lib/exam-state.js');
612
612
  const realExam = getRealExamState();
613
- if (realExam) {
613
+ // Only treat as real exam if state actually has the AI4CTF section (Q31-38).
614
+ // Stale/broken state with truncated questions falls back to demo behavior.
615
+ const hasAi4ctfSection = realExam && realExam.questions.some((qq) => qq.number >= 31 && qq.number <= 38);
616
+ if (realExam && hasAi4ctfSection) {
614
617
  const currentQ = realExam._lastQ || 1;
615
618
  if (currentQ < 31 || currentQ > 38) {
616
619
  console.log();
@@ -460,7 +460,10 @@ export function registerCtf4aiDemoCommand(program) {
460
460
  // tracked in state.aiUsage.ctf4ai.
461
461
  const { getRealExamState } = await import('../lib/exam-state.js');
462
462
  const realExam = getRealExamState();
463
- if (realExam) {
463
+ // Only treat as real exam if state actually has the CTF4AI section (Q39-40).
464
+ // Stale/broken state with truncated questions falls back to demo behavior.
465
+ const hasCtf4aiSection = realExam && realExam.questions.some((qq) => qq.number >= 39 && qq.number <= 40);
466
+ if (realExam && hasCtf4aiSection) {
464
467
  const currentQ = realExam._lastQ || 1;
465
468
  if (currentQ < 39) {
466
469
  console.log();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "2.19.65",
3
+ "version": "2.19.66",
4
4
  "description": "ICOA CLI — The world's first CLI-native CTF competition terminal",
5
5
  "type": "module",
6
6
  "bin": {