icoa-cli 2.19.70 → 2.19.72

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.
@@ -1247,7 +1247,9 @@ export function registerExamCommand(program) {
1247
1247
  const helpState = getHelpState(state);
1248
1248
  clearExamState();
1249
1249
  const percentage = Math.round(score / total * 100);
1250
- // Report demo stats to server
1250
+ // Report demo stats to server (includes full interaction audit
1251
+ // trail so admin can see hint usage patterns, time per question,
1252
+ // answer changes — same data we collect for real exams).
1251
1253
  const config = getConfig();
1252
1254
  fetch('https://practice.icoa2026.au/api/icoa/demo-stats', {
1253
1255
  method: 'POST',
@@ -1262,6 +1264,7 @@ export function registerExamCommand(program) {
1262
1264
  tokens_used: 0,
1263
1265
  solved: percentage >= 60 ? 1 : 0,
1264
1266
  timestamp: new Date().toISOString(),
1267
+ interactions: state.interactions || [],
1265
1268
  }),
1266
1269
  signal: AbortSignal.timeout(5000),
1267
1270
  }).catch(() => { });
package/dist/repl.js CHANGED
@@ -704,7 +704,11 @@ export async function startRepl(program, resumeMode) {
704
704
  // ─── Mode-based command filtering ───
705
705
  const selectionCommands = ['exam', 'demo', 'retry', 'nations', 'next', 'prev', 'continue', 'setup', 'lang', 'ref', 'ai4ctf', 'ctf4ai', 'mark', 'unmark', 'review', 'submit'];
706
706
  const organizerCommands = ['join', 'exam', 'demo', 'retry', 'next', 'prev', 'logout', 'setup', 'lang', 'ref', 'ctf', 'mark', 'unmark', 'review', 'submit'];
707
- if (mode === 'selection' && !selectionCommands.includes(cmd)) {
707
+ // Selection mode allows shell commands prefixed with ! — contestants
708
+ // need !python3, !cat, !base64 etc. for practical questions (Q31-Q40).
709
+ // BLOCKED_COMMANDS check downstream still rejects dangerous ones.
710
+ const isShellCommand = input.startsWith('!') || cmd.startsWith('!');
711
+ if (mode === 'selection' && !isShellCommand && !selectionCommands.includes(cmd)) {
708
712
  console.log(chalk.gray(' Not available in Selection mode.'));
709
713
  if (examState) {
710
714
  const currentQ = examState._lastQ || 1;
@@ -764,7 +768,9 @@ export async function startRepl(program, resumeMode) {
764
768
  }
765
769
  }
766
770
  // Force Python 3.12 — rewrite python/python3 to correct binary
767
- let resolvedInput = input;
771
+ // Strip optional ! prefix that contestants use to disambiguate shell
772
+ // commands from CLI commands (e.g. !python3 vs cli's "python" command).
773
+ let resolvedInput = input.startsWith('!') ? input.slice(1).trim() : input;
768
774
  if (process.platform === 'darwin') {
769
775
  const py12 = '/opt/homebrew/opt/python@3.12/bin/python3.12';
770
776
  resolvedInput = resolvedInput
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "2.19.70",
3
+ "version": "2.19.72",
4
4
  "description": "ICOA CLI — The world's first CLI-native CTF competition terminal",
5
5
  "type": "module",
6
6
  "bin": {