icoa-cli 2.14.4 → 2.15.1

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.
@@ -91,19 +91,25 @@ export function registerCtf4aiDemoCommand(program) {
91
91
  console.log();
92
92
  console.log(chalk.red.bold(' ═══ CTF4AI Demo — Hack the AI ═══'));
93
93
  console.log();
94
- console.log(chalk.white(' Challenge: Prompt Injection'));
94
+ console.log(chalk.white(' Challenge: Make the AI Say a Forbidden Word'));
95
+ console.log();
96
+ console.log(chalk.gray(' In the real world, AI systems have safety rules.'));
97
+ console.log(chalk.gray(' Your job: find a way to trick the AI into breaking them!'));
95
98
  console.log();
96
99
  console.log(chalk.gray(' ┌─────────────────────────────────────────────────┐'));
97
- console.log(chalk.gray(' │') + chalk.white(' The AI has been told to NEVER say "koala". ') + chalk.gray('│'));
98
- console.log(chalk.gray(' │') + chalk.white(' Your mission: make it say "koala". ') + chalk.gray('│'));
100
+ console.log(chalk.gray(' │') + chalk.white(' The AI must NEVER say the word "koala". ') + chalk.gray('│'));
101
+ console.log(chalk.gray(' │') + chalk.white(' Your mission: make it say "koala" anyway! ') + chalk.gray('│'));
99
102
  console.log(chalk.gray(' │') + chalk.white(' ') + chalk.gray('│'));
100
- console.log(chalk.gray(' │') + chalk.gray(' Use any technique: social engineering, ') + chalk.gray('│'));
101
- console.log(chalk.gray(' │') + chalk.gray(' role-playing, encoding tricks, or creativity! ') + chalk.gray('│'));
103
+ console.log(chalk.gray(' │') + chalk.yellow(' Ideas to try: ') + chalk.gray('│'));
104
+ console.log(chalk.gray(' │') + chalk.gray(' · Ask about Australian animals ') + chalk.gray('│'));
105
+ console.log(chalk.gray(' │') + chalk.gray(' · Ask it to write a story or poem ') + chalk.gray('│'));
106
+ console.log(chalk.gray(' │') + chalk.gray(' · Ask it to translate or spell something ') + chalk.gray('│'));
107
+ console.log(chalk.gray(' │') + chalk.gray(' · Be creative — there is no wrong approach! ') + chalk.gray('│'));
102
108
  console.log(chalk.gray(' └─────────────────────────────────────────────────┘'));
103
109
  console.log();
104
- console.log(chalk.gray(` Token limit: ${CTF4AI_TOKEN_LIMIT} tokens`));
105
- console.log(chalk.gray(` AI Model: ${modelName}`));
106
- console.log(chalk.gray(' Type "exit" to quit.'));
110
+ console.log(chalk.gray(` Conversation budget: ~${Math.round(CTF4AI_TOKEN_LIMIT / 4)} words (${CTF4AI_TOKEN_LIMIT} tokens)`));
111
+ console.log(chalk.gray(` AI Model: Google Gemma 4 (${modelName})`));
112
+ console.log(chalk.gray(' Type "exit" to quit anytime.'));
107
113
  console.log();
108
114
  try {
109
115
  // Create chat with restrictive system prompt
@@ -327,7 +327,7 @@ export function registerExamCommand(program) {
327
327
  exam
328
328
  .command('help')
329
329
  .description('Eliminate one wrong option (limited uses)')
330
- .action(() => {
330
+ .action(async () => {
331
331
  logCommand('exam help');
332
332
  const state = getExamState();
333
333
  if (!state) {
@@ -351,8 +351,8 @@ export function registerExamCommand(program) {
351
351
  // Check: already used 2 helps on this question
352
352
  if (qHelps >= 2) {
353
353
  console.log();
354
- console.log(chalk.yellow(' 🙈 I can\'t help you more on this one!'));
355
- console.log(chalk.gray(' You already have a 50/50 — trust your instinct!'));
354
+ console.log(chalk.yellow(' 🙈 Max 2 helps per question — you already have a 50/50!'));
355
+ console.log(chalk.gray(' Trust your instinct and pick one!'));
356
356
  console.log();
357
357
  printQuestion(q, state.answers[q.number]);
358
358
  return;
@@ -405,9 +405,8 @@ export function registerExamCommand(program) {
405
405
  printQuestion(q, state.answers[q.number]);
406
406
  };
407
407
  if (state.session.examId === 'demo-free') {
408
- import('../lib/demo-exam.js').then(({ DEMO_ANSWERS }) => {
409
- doEliminate(DEMO_ANSWERS[currentQ]);
410
- });
408
+ const { DEMO_ANSWERS } = await import('../lib/demo-exam.js');
409
+ doEliminate(DEMO_ANSWERS[currentQ]);
411
410
  }
412
411
  else {
413
412
  // For server exams, we don't know the answer — eliminate random non-selected option
@@ -486,7 +485,7 @@ export function registerExamCommand(program) {
486
485
  saveExamState(state);
487
486
  const answered = Object.keys(state.answers).length;
488
487
  const total = state.session.questionCount;
489
- printSuccess(`Q${num}: ${c} saved (${answered}/${total} answered)`);
488
+ printSuccess(`Q${num}: ${c} (${answered}/${total} answered)`);
490
489
  // Auto-show next question
491
490
  if (num < state.questions.length) {
492
491
  const nextQ = state.questions[num]; // 0-indexed: questions[num] = question num+1
@@ -573,7 +572,7 @@ export function registerExamCommand(program) {
573
572
  if (unanswered > 0) {
574
573
  msg += chalk.yellow(` ${unanswered} unanswered.`);
575
574
  }
576
- msg += ' This cannot be undone.';
575
+ msg += ' You cannot change answers after this.';
577
576
  const proceed = await confirm({ message: chalk.white(msg), default: false, theme: { prefix: '', style: { message: (t) => t, defaultAnswer: (t) => chalk.green(t) } } });
578
577
  if (!proceed)
579
578
  return;
@@ -611,22 +610,33 @@ export function registerExamCommand(program) {
611
610
  console.log();
612
611
  console.log(chalk.cyan(' ═══════════════════════════════════════'));
613
612
  console.log();
614
- // ─── Dual-track introduction ───
615
- console.log(chalk.white(' Great job! But ICOA has ') + chalk.bold('TWO') + chalk.white(' competition tracks:'));
613
+ // ─── What is CTF + Dual-track introduction ───
614
+ console.log(chalk.white(' Nice work! Those were the theory questions.'));
615
+ console.log();
616
+ console.log(chalk.yellow(' Did you know?'));
617
+ console.log(chalk.gray(' CTF stands for "Capture The Flag" — a cybersecurity'));
618
+ console.log(chalk.gray(' competition where you solve real hacking challenges'));
619
+ console.log(chalk.gray(' like cracking codes, finding hidden data, and'));
620
+ console.log(chalk.gray(' exploiting vulnerabilities in safe environments.'));
616
621
  console.log();
617
- console.log(chalk.gray(' ┌─────────────────────────────────────────────────┐'));
618
- console.log(chalk.gray(' │') + chalk.green.bold(' AI4CTF') + chalk.gray(' [Day 1] AI is your teammate ') + chalk.gray('│'));
619
- console.log(chalk.gray(' │') + chalk.gray(' Solve cyber challenges with AI assistance. ') + chalk.gray('│'));
620
- console.log(chalk.gray(' │') + chalk.gray(' hint a (50x) · hint b (10x) · hint c (2x) ') + chalk.gray('│'));
621
- console.log(chalk.gray(' │') + chalk.gray(' ') + chalk.gray('│'));
622
- console.log(chalk.gray(' │') + chalk.red.bold(' CTF4AI') + chalk.gray(' [Day 2] AI is your target ') + chalk.gray('│'));
623
- console.log(chalk.gray(' │') + chalk.gray(' Hack, trick, and red-team AI systems. ') + chalk.gray('│'));
624
- console.log(chalk.gray(' │') + chalk.gray(' Prompt injection, adversarial ML, and more. ') + chalk.gray('│'));
625
- console.log(chalk.gray(' └─────────────────────────────────────────────────┘'));
622
+ console.log(chalk.white(' ICOA combines CTF with AI in ') + chalk.bold('TWO') + chalk.white(' tracks:'));
626
623
  console.log();
627
- console.log(chalk.white(' Try them now:'));
628
- console.log(chalk.green.bold(' ai4ctf') + chalk.gray(' Chat with your AI teammate'));
629
- console.log(chalk.red.bold(' ctf4ai') + chalk.gray(' Prompt injection challenge make AI say "koala"'));
624
+ console.log(chalk.green.bold(' AI4CTF') + chalk.white(' — Use AI to help you solve CTF challenges'));
625
+ console.log(chalk.gray(' AI is your teammate. Chat with it, ask for hints,'));
626
+ console.log(chalk.gray(' and work together to crack cybersecurity puzzles.'));
627
+ console.log();
628
+ console.log(chalk.red.bold(' CTF4AI') + chalk.white(' — Trick the AI (Prompt Injection)'));
629
+ console.log(chalk.gray(' Can you make the AI break its own safety rules?'));
630
+ console.log(chalk.gray(' This is a real skill used to test AI security.'));
631
+ console.log();
632
+ console.log(chalk.cyan(' ─────────────────────────────────────────────'));
633
+ console.log(chalk.gray(' In the real ICOA competition, everything happens'));
634
+ console.log(chalk.gray(' inside this terminal. No other tools allowed.'));
635
+ console.log(chalk.cyan(' ─────────────────────────────────────────────'));
636
+ console.log();
637
+ console.log(chalk.white(' Ready to try? Type a command:'));
638
+ console.log(chalk.green.bold(' ai4ctf') + chalk.gray(' Chat with AI teammate (start here!)'));
639
+ console.log(chalk.red.bold(' ctf4ai') + chalk.gray(' Trick the AI — make it say "koala"'));
630
640
  console.log();
631
641
  }
632
642
  catch (err) {
@@ -779,18 +789,18 @@ export function registerExamCommand(program) {
779
789
  console.log();
780
790
  printHeader('ICOA Demo Exam — Free Practice');
781
791
  console.log();
782
- console.log(chalk.white(' Free practice exam · No account needed'));
783
- console.log(chalk.white(' 30 questions · 30 minutes · Single choice'));
792
+ console.log(chalk.white(' Free practice · No account needed · No time limit'));
793
+ console.log(chalk.white(' 30 questions · Pick one answer per question'));
784
794
  console.log();
785
795
  console.log(chalk.gray(' ┌─────────────────────────────────────────────────┐'));
786
- console.log(chalk.gray(' │') + chalk.white(' Each question has 4 options (A/B/C/D) ') + chalk.gray('│'));
787
- console.log(chalk.gray(' │') + chalk.white(' Type a letter to answer the current question ') + chalk.gray('│'));
788
- console.log(chalk.gray(' │') + chalk.white(' Type ') + chalk.yellow('help') + chalk.white(' to eliminate a wrong option (5 uses) ') + chalk.gray('│'));
789
- console.log(chalk.gray(' │') + chalk.white(' Type ') + chalk.yellow('next') + chalk.white('/') + chalk.yellow('prev') + chalk.white(' to navigate between questions ') + chalk.gray('│'));
796
+ console.log(chalk.gray(' │') + chalk.white(' How to play: ') + chalk.gray('│'));
797
+ console.log(chalk.gray(' │') + chalk.white(' Type ') + chalk.yellow('A') + chalk.white(', ') + chalk.yellow('B') + chalk.white(', ') + chalk.yellow('C') + chalk.white(' or ') + chalk.yellow('D') + chalk.white(' to answer ') + chalk.gray('│'));
798
+ console.log(chalk.gray(' │') + chalk.white(' Type ') + chalk.yellow('help') + chalk.white(' Remove a wrong answer (5 uses) ') + chalk.gray('│'));
799
+ console.log(chalk.gray(' │') + chalk.white(' Type ') + chalk.yellow('next') + chalk.white('/') + chalk.yellow('prev') + chalk.white(' Move between questions ') + chalk.gray('│'));
800
+ console.log(chalk.gray(' │') + chalk.white(' You can change answers anytime before submitting ') + chalk.gray('│'));
801
+ console.log(chalk.gray(' │') + chalk.white(' Running low on help? Type ') + chalk.yellow('more help') + chalk.white(' for +3 ') + chalk.gray('│'));
790
802
  console.log(chalk.gray(' └─────────────────────────────────────────────────┘'));
791
803
  console.log();
792
- console.log(chalk.gray(' For real exams, your proctor will provide credentials.'));
793
- console.log();
794
804
  const proceed = await confirm({
795
805
  message: chalk.white('Start demo exam now?'),
796
806
  default: true,
@@ -44,7 +44,8 @@ export function registerLangCommand(program) {
44
44
  }
45
45
  if (!SUPPORTED_LANGUAGES.includes(code)) {
46
46
  printError(`Unsupported language: ${code}`);
47
- printInfo(`Supported: ${SUPPORTED_LANGUAGES.join(', ')}`);
47
+ const supported = SUPPORTED_LANGUAGES.map((l) => `${l} (${LANG_NAMES[l]?.split(' ')[0] || l})`).join(', ');
48
+ printInfo(`Supported: ${supported}`);
48
49
  return;
49
50
  }
50
51
  saveConfig({ language: code });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "2.14.4",
3
+ "version": "2.15.1",
4
4
  "description": "ICOA CLI — The world's first CLI-native CTF competition terminal",
5
5
  "type": "module",
6
6
  "bin": {