icoa-cli 2.19.549 → 2.19.550
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/commands/ai4ctf.js +1 -1
- package/dist/commands/aienv.js +1 -1
- package/dist/commands/ctf4ai-demo.js +1 -1
- package/dist/commands/ctf4vla.js +1 -1
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/env.js +1 -1
- package/dist/commands/exam.js +1 -1
- package/dist/commands/learn.js +1 -1
- package/dist/lib/paper-upgrade.js +1 -1
- package/dist/lib/verdict.js +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import chalk from"chalk";import{isNativeWindowsCmd as o,isInWSL as e,hasPython as l}from"./platform.js";export function showCToBUpgradePrompt(n,t){if(!function(o){return!!o&&/-2026-c$/i.test(o.trim())}(n))return;if(!t)return;const s=o(),a=e(),
|
|
1
|
+
import chalk from"chalk";import{isNativeWindowsCmd as o,isInWSL as e,hasPython as l}from"./platform.js";export function showCToBUpgradePrompt(n,t){if(!function(o){return!!o&&/-2026-c$/i.test(o.trim())}(n))return;if(!t)return;const s=o(),a=e(),c=l();console.log(chalk.cyan(" ─────────────────────────────────────────────")),console.log(),console.log(chalk.bold.white(" ★ Ready for more? Paper B — K-12 with AI")),console.log(),console.log(chalk.gray(" Paper B adds ")+chalk.white("AI4CTF")+chalk.gray(" (chat with AI to find hidden flags) and ")+chalk.white("CTF4AI")+chalk.gray(" (break AI security).")),console.log(chalk.gray(" 150 points total · 90 minutes · same command interface you already know.")),console.log(),s?(console.log(chalk.bold.white(" To take Paper B on Windows, install WSL2 + Ubuntu 22:")),console.log(),console.log(chalk.white(" 1. Open PowerShell as Administrator")),console.log(chalk.gray(' (right-click PowerShell → "Run as administrator")')),console.log(chalk.white(" 2. Run: ")+chalk.cyan("wsl --install -d Ubuntu-22.04")),console.log(chalk.white(" 3. Reboot when prompted, create a Linux username + password")),console.log(chalk.white(" 4. Inside Ubuntu, install Node.js 22 and this CLI:")),console.log(chalk.gray(" ")+chalk.cyan("curl -fsSL https://deb.nodesource.com/setup_22.x | sudo bash -")),console.log(chalk.gray(" ")+chalk.cyan("sudo apt install -y nodejs")),console.log(chalk.gray(" ")+chalk.cyan("sudo npm install -g icoa-cli")),console.log(),console.log(chalk.gray(" Setup takes 30-60 min the first time. You only do this once."))):a?(console.log(chalk.bold.white(" You are on WSL2 — your setup is almost ready:")),console.log(),c?(console.log(chalk.green(" ✓ Python 3 already installed. You are ready.")),console.log()):(console.log(chalk.white(" Install Python 3 (for Paper B practical questions):")),console.log(chalk.gray(" ")+chalk.cyan("sudo apt install -y python3 python3-pip")),console.log())):"darwin"===process.platform?(console.log(chalk.bold.white(" On macOS, install Python 3 for Paper B practicals:")),console.log(),console.log(chalk.white(" Easiest — no Homebrew, no admin rights:")),console.log(chalk.gray(" ")+chalk.bold.cyan("python setup")+chalk.gray(" (~25 MB, about twenty seconds)")),console.log(),console.log(chalk.white(" With Homebrew:")+chalk.gray(" ")+chalk.cyan("brew install python@3.12")),c&&(console.log(),console.log(chalk.green(" ✓ Python 3 already detected. You are ready."))),console.log()):(console.log(chalk.bold.white(" On Linux, install Python 3 for Paper B practicals:")),console.log(),console.log(chalk.white(" Ubuntu / Debian:")),console.log(chalk.gray(" ")+chalk.cyan("sudo apt install -y python3 python3-pip")),console.log(chalk.white(" Fedora / RHEL:")),console.log(chalk.gray(" ")+chalk.cyan("sudo dnf install -y python3 python3-pip")),c&&(console.log(),console.log(chalk.green(" ✓ Python 3 already detected. You are ready."))),console.log()),console.log(chalk.bold.white(" Then get a Paper B token from your organizer.")),console.log(chalk.gray(" Each token is one-shot and bound to one device.")),console.log(),console.log(chalk.gray(" Detailed step-by-step guide: ")+chalk.cyan.underline("https://icoa2026.au/selectionguide/")),console.log()}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import chalk from"chalk";const e={AC:{full:"Accepted",fullZh:"Accepted(通过)",gloss:"every test passed",glossZh:"所有用例都过了",emoji:"✅",ok:!0},WA:{full:"Wrong Answer",fullZh:"Wrong Answer(答案不对)",gloss:"it ran fine — the output just did not match",glossZh:"程序跑完了,只是输出和期望的不一样",emoji:"❌",ok:!1},TLE:{full:"Time Limit Exceeded",fullZh:"Time Limit Exceeded(超时)",gloss:"too slow — usually a loop that never ends",glossZh:"跑太久了 —— 多半有个停不下来的循环",emoji:"❌",ok:!1},RE:{full:"Runtime Error",fullZh:"Runtime Error(运行时崩了)",gloss:"it crashed partway — divide by zero? index past the end?",glossZh:"跑到一半崩了 —— 除以零?下标越界?",emoji:"❌",ok:!1},CE:{full:"Compile Error",fullZh:"Compile Error(没编译过)",gloss:"it never got to run — check the ; the spelling and the brackets",glossZh:"根本没跑起来 —— 检查分号、拼写、括号",emoji:"❌",ok:!1},MLE:{full:"Memory Limit Exceeded",fullZh:"Memory Limit Exceeded(内存超限)",gloss:"it asked for more memory than the judge allows",glossZh:"要的内存超过了判分机允许的量",emoji:"❌",ok:!1}};function o(o){return e[o?.toUpperCase?.()??""]??{full:o||"Unknown",fullZh:o||"未知结果",gloss:"the judge could not run this one",glossZh:"判分机没能跑完这一题",emoji:"❌",ok:!1}}export function serverChip(e,o){return null!=e&&e>=0?chalk.gray(` ⏱ ${e}ms · ${o?"Server 判分":"Server"}`):""}export function verdictLine(e,l){const s=o(e),{isZh:t}=l,r=`${s.emoji} ${e.toUpperCase()}`,i=t?s.fullZh:s.full,n=(s.ok?chalk.bold.green(` ${r}`):("TLE"===e?chalk.yellow:chalk.red)(` ${r}`))+chalk.gray(` — ${i}`)+(null!=l.total?chalk.gray(` · ${l.passed??0}/${l.total} ${t?"用例":1===l.total?"test":"tests"}`+(s.ok?t?"全过":" passed":"")):"")+(s.ok||null==l.failedTest?"":chalk.gray(t?` · 挂在第 ${l.failedTest} 个`:` · failed at test ${l.failedTest}`))+serverChip(l.ms,t);return l.gentle?n+"\n"+chalk.gray(` ${t?s.glossZh:s.gloss}`):n}export function verdictGloss(e,l){const s=o(e);return l?s.glossZh:s.gloss}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "icoa-cli",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.550",
|
|
4
4
|
"description": "ICOA CLI — AI-native competition runtime of the International Cyber Olympiad in AI: learn, practise, and compete in AI & cybersecurity from the terminal (AI4CTF · CTF4AI · CTF4EAI)",
|
|
5
5
|
"author": "Charlie Zhu",
|
|
6
6
|
"type": "module",
|