icoa-cli 2.6.0 → 2.6.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.
- package/dist/index.js +1 -1
- package/dist/repl.js +17 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ ${LINE}
|
|
|
38
38
|
${chalk.white('Sydney, Australia')} ${chalk.gray('Jun 27 - Jul 2, 2026')}
|
|
39
39
|
${chalk.cyan.underline('https://icoa2026.au')}
|
|
40
40
|
|
|
41
|
-
${chalk.gray('CLI-Native Competition Terminal v2.6.
|
|
41
|
+
${chalk.gray('CLI-Native Competition Terminal v2.6.1')}
|
|
42
42
|
|
|
43
43
|
${LINE}
|
|
44
44
|
`;
|
package/dist/repl.js
CHANGED
|
@@ -128,19 +128,26 @@ export async function startRepl(program, resumeMode) {
|
|
|
128
128
|
if (connected) {
|
|
129
129
|
console.log(chalk.green(` Welcome back, ${config.userName}!`) + ' ' + modeLabel);
|
|
130
130
|
console.log(chalk.gray(` Connected to ${config.ctfdUrl}`));
|
|
131
|
-
console.log(
|
|
131
|
+
console.log();
|
|
132
|
+
console.log(chalk.gray(' ─────────────────────────────────'));
|
|
133
|
+
console.log(chalk.white(' exam list ') + chalk.gray('View available exams'));
|
|
134
|
+
console.log(chalk.white(' exam demo ') + chalk.gray('Free practice (no login)'));
|
|
135
|
+
console.log(chalk.white(' help ') + chalk.gray('All commands'));
|
|
136
|
+
console.log(chalk.gray(' ─────────────────────────────────'));
|
|
132
137
|
console.log();
|
|
133
138
|
}
|
|
134
139
|
else {
|
|
135
140
|
console.log(' ' + modeLabel);
|
|
136
141
|
console.log();
|
|
137
|
-
console.log(chalk.
|
|
138
|
-
console.log(chalk.
|
|
142
|
+
console.log(chalk.gray(' ─────────────────────────────────────────────'));
|
|
143
|
+
console.log(chalk.white(' Welcome! Type a command to get started:'));
|
|
139
144
|
console.log();
|
|
140
|
-
console.log(chalk.gray('
|
|
141
|
-
console.log(chalk.
|
|
145
|
+
console.log(chalk.bold.cyan(' demo') + chalk.gray(' Free practice exam (30 questions)'));
|
|
146
|
+
console.log(chalk.gray(' No account needed. Try it now!'));
|
|
142
147
|
console.log();
|
|
143
|
-
console.log(chalk.
|
|
148
|
+
console.log(chalk.white(' join <url>') + chalk.gray(' Connect to real exam server'));
|
|
149
|
+
console.log(chalk.gray(' Your proctor will provide credentials.'));
|
|
150
|
+
console.log(chalk.gray(' ─────────────────────────────────────────────'));
|
|
144
151
|
console.log();
|
|
145
152
|
}
|
|
146
153
|
}
|
|
@@ -266,8 +273,8 @@ export async function startRepl(program, resumeMode) {
|
|
|
266
273
|
}
|
|
267
274
|
const cmd = input.split(/\s+/)[0].toLowerCase();
|
|
268
275
|
// ─── Mode-based command filtering ───
|
|
269
|
-
const selectionCommands = ['join', 'exam', 'setup', 'lang', 'ref', 'ctf'];
|
|
270
|
-
const organizerCommands = ['join', 'exam', 'setup', 'lang', 'ref', 'ctf'];
|
|
276
|
+
const selectionCommands = ['join', 'exam', 'demo', 'setup', 'lang', 'ref', 'ctf'];
|
|
277
|
+
const organizerCommands = ['join', 'exam', 'demo', 'setup', 'lang', 'ref', 'ctf'];
|
|
271
278
|
if (mode === 'selection' && !selectionCommands.includes(cmd)) {
|
|
272
279
|
console.log(chalk.gray(' Not available in Selection mode. Switch via: setup'));
|
|
273
280
|
console.log();
|
|
@@ -296,7 +303,7 @@ export async function startRepl(program, resumeMode) {
|
|
|
296
303
|
'scoreboard', 'sb', 'status', 'time', 'hint', 'hint-b', 'hint-c',
|
|
297
304
|
'hint-budget', 'ref', 'shell', 'files', 'connect', 'note',
|
|
298
305
|
'log', 'lang', 'setup', 'env', 'ai4ctf', 'model', 'ctf',
|
|
299
|
-
'exam',
|
|
306
|
+
'exam', 'demo',
|
|
300
307
|
];
|
|
301
308
|
if (!knownCommands.includes(cmd)) {
|
|
302
309
|
// Block dangerous commands
|
|
@@ -430,6 +437,7 @@ function mapCommand(input) {
|
|
|
430
437
|
const cmd = parts[0].toLowerCase();
|
|
431
438
|
const rest = parts.slice(1);
|
|
432
439
|
const ctfShortcuts = {
|
|
440
|
+
'demo': ['exam', 'demo'],
|
|
433
441
|
'join': ['ctf', 'join', ...rest],
|
|
434
442
|
'activate': ['ctf', 'activate', ...rest],
|
|
435
443
|
'challenges': ['ctf', 'challenges'],
|