icoa-cli 2.19.287 → 2.19.289

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.
@@ -59,13 +59,28 @@ export declare const AIENV_PACKAGES: AiPkg[];
59
59
  export declare function packagesForGroups(groups: AiGroup[]): AiPkg[];
60
60
  /** Compute the venv paths for a given home directory + platform. */
61
61
  export declare function aienvPaths(home: string, plat?: NodeJS.Platform): AienvPaths;
62
+ /**
63
+ * Absolute path to the icoa-provisioned standalone CPython 3.12. `env setup`
64
+ * installs a relocatable python-build-standalone build here ONLY on Linux
65
+ * distros where neither apt nor the Ubuntu deadsnakes PPA can deliver 3.12
66
+ * (e.g. Kali / non-Ubuntu Debian). Side-by-side: the system python3 is never
67
+ * touched. On the four already-supported platforms this path simply never
68
+ * exists, so probing it is a no-op.
69
+ */
70
+ export declare function icoaStandalonePython(home: string, plat?: NodeJS.Platform): string;
62
71
  /**
63
72
  * Ordered host-python candidates to build the venv from. We probe a versioned
64
73
  * 3.12 BEFORE the bare `python3` so we don't accidentally seed the venv with a
65
74
  * distro 3.10 when a 3.12 is present. We never touch the system python3 beyond
66
75
  * reading its --version.
76
+ *
77
+ * When `home` is given, the icoa-provisioned standalone 3.12 (Kali / non-Ubuntu
78
+ * Debian — see icoaStandalonePython) is probed right after the on-PATH
79
+ * `python3.12` and before the distro `python3`. Omitting `home` (the default,
80
+ * and what the unit tests use) leaves the candidate list byte-identical to
81
+ * before, so the four working platforms are unaffected.
67
82
  */
68
- export declare function hostPythonCandidates(plat?: NodeJS.Platform): string[];
83
+ export declare function hostPythonCandidates(plat?: NodeJS.Platform, home?: string): string[];
69
84
  /** Parse `Python 3.12.13` → {major:3, minor:12}. Tolerant of trailing newline. */
70
85
  export declare function parsePyVersion(out: string | null | undefined): PyVersion | null;
71
86
  /** True if `v` is at least `min` (major-then-minor comparison). */
@@ -85,7 +100,7 @@ export interface HostPython {
85
100
  * cohort is the whole point (see REQUIRED_PY). The caller surfaces an actionable
86
101
  * "install Python 3.12" message when this is null.
87
102
  */
88
- export declare function resolveHostPython(probe: (cmd: string) => string | null, plat?: NodeJS.Platform): HostPython | null;
103
+ export declare function resolveHostPython(probe: (cmd: string) => string | null, plat?: NodeJS.Platform, home?: string): HostPython | null;
89
104
  /**
90
105
  * Build the readiness probe for one package, run via the VENV python (absolute
91
106
  * path) — never the system python3. Mirrors env.ts's `python3 -c "import x"`
package/dist/lib/aienv.js CHANGED
@@ -1 +1 @@
1
- import{posix as o,win32 as r}from"node:path";export const REQUIRED_PY={major:3,minor:12};export const AIENV_MARKER_VERSION=1;export const AIENV_PACKAGES=[{name:"jupyter_client",import:"jupyter_client",spec:"jupyter_client>=8.6",group:"core"},{name:"ipykernel",import:"ipykernel",spec:"ipykernel>=6.29",group:"core"},{name:"numpy",import:"numpy",spec:"numpy>=1.26",group:"data"},{name:"pandas",import:"pandas",spec:"pandas>=2.2",group:"data"},{name:"scikit-learn",import:"sklearn",spec:"scikit-learn>=1.4",group:"data"},{name:"matplotlib",import:"matplotlib",spec:"matplotlib>=3.8",group:"data"},{name:"torch",import:"torch",spec:"torch>=2.2",group:"deep",note:"large download (~2 GB)"},{name:"transformers",import:"transformers",spec:"transformers>=4.40",group:"deep"},{name:"datasets",import:"datasets",spec:"datasets>=2.19",group:"deep"}];export function packagesForGroups(o){const r=new Set(o);return AIENV_PACKAGES.filter(o=>r.has(o.group))}export function aienvPaths(n,t=process.platform){const e="win32"===t?r:o,p=e.join(n,".icoa","aienv");if("win32"===t){const o=e.join(p,"Scripts");return{root:p,binDir:o,python:e.join(o,"python.exe"),pip:e.join(o,"pip.exe"),marker:e.join(p,"icoa-aienv.json")}}const i=e.join(p,"bin");return{root:p,binDir:i,python:e.join(i,"python"),pip:e.join(i,"pip"),marker:e.join(p,"icoa-aienv.json")}}export function hostPythonCandidates(o=process.platform){return"win32"===o?["py -3.12","python","py -3","py"]:"darwin"===o?["python3.12","/opt/homebrew/opt/python@3.12/bin/python3.12","/usr/local/opt/python@3.12/bin/python3.12","python3"]:["python3.12","python3"]}export function parsePyVersion(o){if(!o)return null;const r=o.match(/(\d+)\.(\d+)(?:\.\d+)?/);return r?{major:Number(r[1]),minor:Number(r[2])}:null}export function meetsMinPy(o,r){return o.major!==r.major?o.major>r.major:o.minor>=r.minor}export function resolveHostPython(o,r=process.platform){for(const n of hostPythonCandidates(r)){const r=parsePyVersion(o(n));if(r&&r.major===REQUIRED_PY.major&&r.minor===REQUIRED_PY.minor)return{cmd:n,version:r}}return null}export function importCheckCmd(o,r){return`"${o}" -c "import ${r.import}"`}
1
+ import{posix as o,win32 as n}from"node:path";export const REQUIRED_PY={major:3,minor:12};export const AIENV_MARKER_VERSION=1;export const AIENV_PACKAGES=[{name:"jupyter_client",import:"jupyter_client",spec:"jupyter_client>=8.6",group:"core"},{name:"ipykernel",import:"ipykernel",spec:"ipykernel>=6.29",group:"core"},{name:"numpy",import:"numpy",spec:"numpy>=1.26",group:"data"},{name:"pandas",import:"pandas",spec:"pandas>=2.2",group:"data"},{name:"scikit-learn",import:"sklearn",spec:"scikit-learn>=1.4",group:"data"},{name:"matplotlib",import:"matplotlib",spec:"matplotlib>=3.8",group:"data"},{name:"torch",import:"torch",spec:"torch>=2.2",group:"deep",note:"large download (~2 GB)"},{name:"transformers",import:"transformers",spec:"transformers>=4.40",group:"deep"},{name:"datasets",import:"datasets",spec:"datasets>=2.19",group:"deep"}];export function packagesForGroups(o){const n=new Set(o);return AIENV_PACKAGES.filter(o=>n.has(o.group))}export function aienvPaths(t,r=process.platform){const e="win32"===r?n:o,p=e.join(t,".icoa","aienv");if("win32"===r){const o=e.join(p,"Scripts");return{root:p,binDir:o,python:e.join(o,"python.exe"),pip:e.join(o,"pip.exe"),marker:e.join(p,"icoa-aienv.json")}}const i=e.join(p,"bin");return{root:p,binDir:i,python:e.join(i,"python"),pip:e.join(i,"pip"),marker:e.join(p,"icoa-aienv.json")}}export function icoaStandalonePython(t,r=process.platform){const e="win32"===r?n:o;return"win32"===r?e.join(t,".icoa","python312","python.exe"):e.join(t,".icoa","python312","bin","python3.12")}export function hostPythonCandidates(o=process.platform,n){const t=n?[icoaStandalonePython(n,o)]:[];return"win32"===o?["py -3.12",...t,"python","py -3","py"]:"darwin"===o?["python3.12","/opt/homebrew/opt/python@3.12/bin/python3.12","/usr/local/opt/python@3.12/bin/python3.12","python3"]:["python3.12",...t,"python3"]}export function parsePyVersion(o){if(!o)return null;const n=o.match(/(\d+)\.(\d+)(?:\.\d+)?/);return n?{major:Number(n[1]),minor:Number(n[2])}:null}export function meetsMinPy(o,n){return o.major!==n.major?o.major>n.major:o.minor>=n.minor}export function resolveHostPython(o,n=process.platform,t){for(const r of hostPythonCandidates(n,t)){const n=parsePyVersion(o(r));if(n&&n.major===REQUIRED_PY.major&&n.minor===REQUIRED_PY.minor)return{cmd:r,version:n}}return null}export function importCheckCmd(o,n){return`"${o}" -c "import ${n.import}"`}
@@ -1 +1 @@
1
- import{GoogleGenAI as e}from"@google/genai";import chalk from"chalk";import{readFileSync as t}from"node:fs";import{dirname as n,join as o}from"node:path";import{fileURLToPath as r}from"node:url";import{getConfig as a,saveConfig as s}from"./config.js";import{getRealExamState as i}from"./exam-state.js";const l=n(r(import.meta.url));let c=null;function u(){if(c)return c;try{const e=JSON.parse(t(o(l,"..","..","package.json"),"utf-8"));c=e.version||"unknown"}catch{c="unknown"}return c}export async function translateText(e,t){throw new Error("Local AI model path has been disabled (2026-04-24). ICOA provides all AI server-side — no API key setup needed. Use `ai4ctf` (chat) or `exam` (with integrated help/hint) instead.")}export function setApiKey(e){s({geminiApiKey:e})}export async function createChatSession(e,t){const n=a();let o=t||"You are an AI teammate in the ICOA cybersecurity CTF competition (International Cyber Olympiad in AI 2026, Sydney).\n\nYou're a friendly, knowledgeable cybersecurity partner — like a fellow competitor sitting next to the user. Be conversational, encouraging, and collaborative.\n\nRULES:\n- Help the competitor think through challenges, brainstorm approaches, explain concepts\n- You MAY discuss vulnerability types, tools, techniques, and methodologies\n- You MAY suggest approaches and help debug code\n- Do NOT provide complete working exploits or full solution scripts\n- Do NOT provide flags or flag fragments\n- Never output anything matching flag format: icoa{...}\n- If you don't know something, say so honestly\n- Keep responses concise unless the user asks for detail\n- When the user opens a challenge, use the context to give relevant advice";e&&(o+=`\n\nThe competitor is currently working on:\nChallenge: ${e.name}\nCategory: ${e.category}`),o+='\n\nINTEGRITY — give method, not the produced answer:\n- You may name the tool/command/technique (e.g. "this is base64; run base64 -d on the file").\n- Do NOT perform a solution step for the competitor and hand back its result: never decode,\n decrypt, deobfuscate, run, execute, or compute over data they paste or that is attached,\n and then reveal the produced value. They must run it themselves and read the output.\n- Do NOT reveal the exact final answer, and never output icoa{...} / flag{...} in any case.\n- If asked to "just give the answer" / "solve it" / "decode this and tell me", refuse and\n nudge them to do the step themselves.';const r=n.ctfdUrl||"https://practice.icoa2026.au",s=n.deviceFingerprint||"",l=n.geminiModel||"gemini-2.5-flash-lite",c=[];return{async sendMessage(e){c.push({role:"user",text:e});const t=i(),n={systemPrompt:o,messages:c,model:l,maxTokens:2048,deviceFingerprint:s};t?.session?.token&&(n.examToken=t.session.token);const a=e=>new Promise(t=>setTimeout(t,e)),p=[2e3,5e3];let h=null,d=null;for(let e=0;e<=p.length&&(h=await fetch(`${r}/api/icoa/ai/chat`,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":`icoa-cli/${u()}`,"X-Device-Fingerprint":s},body:JSON.stringify(n),signal:AbortSignal.timeout(6e4)}),!h.ok&&429===h.status);e++)e<p.length?await a(p[e]):d=h;if(!h)throw new Error("AI proxy: no response");if(!h.ok){const e=(await h.json().catch(()=>({message:"AI proxy error"}))).message||`AI proxy returned ${h.status}`;if(401===h.status)throw new Error(`${chalk.yellow("⚠ ")}Exam token expired. Re-enter via \`exam <token>\`.`);if(403===h.status)throw new Error(chalk.yellow("⚠ ")+e);if(429===h.status)throw new Error(chalk.yellow("⏳ ")+e+chalk.gray(" (retried twice — quota burst, try again in ~30s)"));throw new Error(e)}const m=await h.json(),g=function(e){return e.replace(/icoa\{[^}]*\}/gi,"[FLAG REDACTED]")}(m.data?.text||""),f=m.data?.tokensUsed||0;return c.push({role:"model",text:g}),{text:g,tokensUsed:f}}}}
1
+ import{GoogleGenAI as e}from"@google/genai";import chalk from"chalk";import{readFileSync as t}from"node:fs";import{dirname as n,join as o}from"node:path";import{fileURLToPath as r}from"node:url";import{getConfig as a,saveConfig as s}from"./config.js";import{getRealExamState as i}from"./exam-state.js";const l=n(r(import.meta.url));let c=null;function u(){if(c)return c;try{const e=JSON.parse(t(o(l,"..","..","package.json"),"utf-8"));c=e.version||"unknown"}catch{c="unknown"}return c}export async function translateText(e,t){throw new Error("Local AI model path has been disabled (2026-04-24). ICOA provides all AI server-side — no API key setup needed. Use `ai4ctf` (chat) or `exam` (with integrated help/hint) instead.")}export function setApiKey(e){s({geminiApiKey:e})}export async function createChatSession(e,t){const n=a();let o=t||"You are an AI teammate in the ICOA cybersecurity CTF competition (International Cyber Olympiad in AI 2026, Sydney).\n\nYou're a friendly, knowledgeable cybersecurity partner — like a fellow competitor sitting next to the user. Be conversational, encouraging, and collaborative.\n\nRULES:\n- Help the competitor think through challenges, brainstorm approaches, explain concepts\n- You MAY discuss vulnerability types, tools, techniques, and methodologies\n- You MAY suggest approaches and help debug code\n- Do NOT provide complete working exploits or full solution scripts\n- Do NOT provide flags or flag fragments\n- Never output anything matching flag format: icoa{...}\n- If you don't know something, say so honestly\n- Keep responses concise unless the user asks for detail\n- When the user opens a challenge, use the context to give relevant advice";e&&(o+=`\n\nThe competitor is currently working on:\nChallenge: ${e.name}\nCategory: ${e.category}`),o+='\n\nINTEGRITY — give method, not the produced answer:\n- You may name the tool/command/technique (e.g. "this is base64; run base64 -d on the file").\n- Do NOT perform a solution step for the competitor and hand back its result: never decode,\n decrypt, deobfuscate, run, execute, or compute over data they paste or that is attached,\n and then reveal the produced value. They must run it themselves and read the output.\n- Do NOT reveal the exact final answer, and never output icoa{...} / flag{...} in any case.\n- If asked to "just give the answer" / "solve it" / "decode this and tell me", refuse and\n nudge them to do the step themselves.';const r=n.ctfdUrl||"https://practice.icoa2026.au",s=n.deviceFingerprint||"",l=n.geminiModel||"gemini-2.5-flash-lite",c=[];return{async sendMessage(e){c.push({role:"user",text:e});const t=i(),a={systemPrompt:o,messages:c,model:l,maxTokens:2048,deviceFingerprint:s};t?.session?.token&&(a.examToken=t.session.token),!a.examToken&&n.ctfdUrl&&n.token&&n.userName&&(a.account=n.userName);const p=e=>new Promise(t=>setTimeout(t,e)),d=[2e3,5e3];let h=null,m=null;for(let e=0;e<=d.length&&(h=await fetch(`${r}/api/icoa/ai/chat`,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":`icoa-cli/${u()}`,"X-Device-Fingerprint":s},body:JSON.stringify(a),signal:AbortSignal.timeout(6e4)}),!h.ok&&429===h.status);e++)e<d.length?await p(d[e]):m=h;if(!h)throw new Error("AI proxy: no response");if(!h.ok){const e=(await h.json().catch(()=>({message:"AI proxy error"}))).message||`AI proxy returned ${h.status}`;if(401===h.status)throw new Error(`${chalk.yellow("⚠ ")}Exam token expired. Re-enter via \`exam <token>\`.`);if(403===h.status)throw new Error(chalk.yellow("⚠ ")+e);if(429===h.status)throw new Error(chalk.yellow("⏳ ")+e+chalk.gray(" (retried twice — quota burst, try again in ~30s)"));throw new Error(e)}const g=await h.json(),f=function(e){return e.replace(/icoa\{[^}]*\}/gi,"[FLAG REDACTED]")}(g.data?.text||""),y=g.data?.tokensUsed||0;return c.push({role:"model",text:f}),{text:f,tokensUsed:y}}}}
@@ -1 +1 @@
1
- function a0b(a,b){a=a-(-0x2f*-0x7+0x1855+-0x18a8);const c=a0a();let d=c[a];if(a0b['oTtYUR']===undefined){var e=function(i){const j='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let l='',m='';for(let n=0xb5f+-0x20ed+0x158e,o,p,q=0x3db*0x5+-0x209+-0x113e*0x1;p=i['charAt'](q++);~p&&(o=n%(-0x49*0x27+-0x1f85*0x1+0xa*0x444)?o*(0x4*0x37f+-0xe03*-0x2+0x14e1*-0x2)+p:p,n++%(-0x9e8*-0x2+0x482+-0x184e))?l+=String['fromCharCode'](-0x4*-0x5e7+-0x25ed+0x3d4*0x4&o>>(-(-0x1418*-0x1+0x267f+-0x3*0x1387)*n&0xb1f+0x78+0x9*-0x149)):0x17f5*-0x1+-0x27*-0x97+-0x1*-0xf4){p=j['indexOf'](p);}for(let r=-0xcf5+-0x2*0x8cc+-0x9*-0x365,s=l['length'];r<s;r++){m+='%'+('00'+l['charCodeAt'](r)['toString'](0x199+-0xd1f*-0x1+-0xea8))['slice'](-(-0x1027+-0x233*0xf+0x576*0x9));}return decodeURIComponent(m);};a0b['XXfMFG']=e,a0b['tEjWBh']={},a0b['oTtYUR']=!![];}const f=c[0x182f*-0x1+-0x5*0x410+0x2c7f],g=a+f,h=a0b['tEjWBh'][g];return!h?(d=a0b['XXfMFG'](d),a0b['tEjWBh'][g]=d):d=h,d;}(function(a,b){const v=a0b,c=a();while(!![]){try{const d=-parseInt(v(0x10f))/(-0x1bfa+0x38c+0x186f*0x1)+-parseInt(v(0xfa))/(-0x1e75+0x3*0xcbb+-0x7ba)+parseInt(v(0x10d))/(0x426+-0x76f+0x34c)*(-parseInt(v(0xf7))/(-0x1f34+-0x1*0x2502+-0x443a*-0x1))+parseInt(v(0x104))/(-0x434+0x4bc*-0x2+0xdb1)*(parseInt(v(0x103))/(-0xbdd+0x23ad+-0x17ca))+-parseInt(v(0xfd))/(0x121f*0x2+-0x9*-0x237+0x3826*-0x1)*(parseInt(v(0x107))/(0x2*0x8b7+0x1efd+-0x3063))+parseInt(v(0x112))/(0x1a35*0x1+0x8*0x182+0x263c*-0x1)+-parseInt(v(0x105))/(0x11a1+-0x14df+0x348)*(-parseInt(v(0x102))/(0x211c*-0x1+-0x969+0x2a90));if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a0a,0x135311+-0xe5661+0x4e4a5));import{getConfig as a0c}from'./config.js';function a0a(){const x=['ANnVBG','mta3nZC5ndf6D25Xuei','Dg9Rzw4','C3rHDhvZ','ndb1uNzcswG','C3vJy2vZCW','y2f0y2G','mte0otu2nMTqte5vCq','B2jQzwn0','BwvZC2fNzq','odGWmta4nKPzthHWrW','DgLTzw91De1Z','y3rMzfvYBa','Bgv2zwW','l2HPBNq','mZaWmZCZn1P0C3DQDa','nLfTufnQBq','mZKXmZy3mfnIDNbLAa','nZbpqMfJB2W','BgfUzW','ofPOvLbuuq','C3rYAw5NAwz5','oJKWotaVyxbPl2LJB2eVzxHHBxmV','zxHHBuLK','l2fWAs9Py29Hl2v4yw1ZlW','DgLTzw91Da','otiYmZvhEhjVAKS','BMv0D29YAYbLCNjVCG','mteWndCXmKHbCxLksa','AwnVys1JBgK'];a0a=function(){return x;};return a0a();}export async function requestHint(d){const w=a0b,f=a0c(),g=f[w(0xff)]||'https://practice.icoa2026.au',h=d[w(0x106)]||f['language']||'en',j=d[w(0xfe)]??-0x169a+-0x1*0x34a+0xe49*0x4,k=[g+w(0x10b)+d[w(0x10a)]+w(0x101),g+w(0x109)+d[w(0x10a)]+w(0x101)];let l=null;for(const p of k)try{const q=await fetch(p,{'method':'POST','headers':{'Content-Type':'application/json','User-Agent':w(0x110)},'body':JSON[w(0x108)]({'token':d[w(0x113)],'question':d['question'],'level':d[w(0x100)],'lang':h}),'signal':AbortSignal[w(0x10c)](j)}),r=await q[w(0x111)]()[w(0xf9)](()=>({}));if(!q['ok']||!(-0x1a01+0x17d7+0x22b)===r[w(0xf8)]){if(l={'status':q[w(0xf6)],'message':r?.[w(0xfc)]||'hint\x20request\x20failed\x20('+q['status']+')'},q[w(0xf6)]>=-0x1d09*-0x1+0x5*-0x453+0xd6*-0x7&&q[w(0xf6)]<-0x267*-0x5+0x847*0x1+0x1*-0x1256)throw l;continue;}return r['data'];}catch(u){if(u&&w(0xfb)==typeof u&&'status'in u)throw u;l={'status':0x0,'message':u?.[w(0xfc)]||w(0x10e)};}const m={};m[w(0xf6)]=0x0,m[w(0xfc)]='hint\x20API\x20unreachable';throw l||m;}
1
+ (function(a,b){const v=a0b,c=a();while(!![]){try{const d=parseInt(v(0x154))/(-0x25cc+-0x969*0x1+0x2f36)*(parseInt(v(0x15e))/(-0xd3*0xf+0x9b8+0x2a7))+parseInt(v(0x155))/(-0x1*-0x556+-0x2492+0x1f3f)+parseInt(v(0x15a))/(-0x5*-0x7cf+-0xf88+0x3*-0x7d5)*(-parseInt(v(0x15f))/(-0x1bfb+-0x1a0*-0xe+0x1c*0x30))+-parseInt(v(0x15c))/(-0xd78+0x1b3a+-0x125*0xc)+parseInt(v(0x147))/(0x3e8+-0x2318+0x1f37)*(-parseInt(v(0x14d))/(-0x34f*-0x1+-0x4*0x48a+0xee1))+-parseInt(v(0x15b))/(-0x621*0x6+-0xfaa+-0x1*-0x3479)*(-parseInt(v(0x159))/(-0xb06+-0x26f2+0x3202))+parseInt(v(0x165))/(0x1d5f+-0xbb3+0x11a1*-0x1)*(-parseInt(v(0x160))/(0x1*0x11be+0xb11*0x1+0xc7*-0x25));if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a0a,-0x12e7f+-0x20f19+0x2*0x3f9ff));import{getConfig as a0c}from'./config.js';function a0a(){const x=['AgLUDcbYzxf1zxn0igzHAwXLzcaO','mtjkt2TeqLe','ntq0ndu1BePAzg5H','C3rHDhvZ','BMv0D29YAYbLCNjVCG','Ahr0Chm6lY9WCMfJDgLJzs5Py29HmJaYnI5HDq','mtC5nZaXmgPkC25bzG','mtmZnZi4tgrVDLnl','mJDdt05AB04','mJaXnJeZmKzuv1DgtW','BgfUzW','nZu3odjXBfHgq3y','mtbsCLLeuKK','mZe5mMTetvbcDW','y3rMzfvYBa','ANnVBG','AgLUDcbbueKGDw5YzwfJAgfIBgu','zxHHBuLK','mtyYndD1zNn2Cxm','l2HPBNq','Bgv2zwW','ue9tva','odi0ntnYy2Llu0m','BwvZC2fNzq','AwnVys1JBgK','yxbWBgLJyxrPB24VANnVBG','oJKWotaVyxbPl2LJB2eVzxHHBxmV','C3vJy2vZCW','ndHLt0TXC0u','DgLTzw91Da','DgLTzw91De1Z','B2jQzwn0','l2fWAs9Py29Hl2v4yw1ZlW','C3rYAw5NAwz5'];a0a=function(){return x;};return a0a();}function a0b(a,b){a=a-(-0x1f81+0x3*-0x7fa+0x38b4);const c=a0a();let d=c[a];if(a0b['SWxQXH']===undefined){var e=function(i){const j='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let l='',m='';for(let n=-0x1*0x1c76+0x24f+-0x53b*-0x5,o,p,q=0x1a81+-0x1475+-0xac*0x9;p=i['charAt'](q++);~p&&(o=n%(0x143c+-0x513*0x1+-0xf25*0x1)?o*(-0x6*-0x192+-0x1b37*-0x1+-0x2463)+p:p,n++%(0x722+0x2502+0x8*-0x584))?l+=String['fromCharCode'](-0x43b+0x88*-0x28+-0x1a7a*-0x1&o>>(-(0xfff+0x81*0x4b+-0x2*0x1ae4)*n&0x191*0xd+0x157a+0x1*-0x29d1)):0x1964+0x1*-0xe21+-0x3*0x3c1){p=j['indexOf'](p);}for(let r=-0x747*0x3+0xed1+0x704,s=l['length'];r<s;r++){m+='%'+('00'+l['charCodeAt'](r)['toString'](0x11dc+-0x2263+0x1f*0x89))['slice'](-(0x1*0x1a03+0x3*-0x47d+0x217*-0x6));}return decodeURIComponent(m);};a0b['gIkqEB']=e,a0b['ZwdljR']={},a0b['SWxQXH']=!![];}const f=c[0x75*0x49+0x2242+-0x439f],g=a+f,h=a0b['ZwdljR'][g];return!h?(d=a0b['gIkqEB'](d),a0b['ZwdljR'][g]=d):d=h,d;}export async function requestHint(d){const w=a0b,f=a0c(),g=f[w(0x161)]||w(0x158),h=d[w(0x15d)]||f['language']||'en',j=d[w(0x14f)]??0xb79+-0x16*0x1+-0x71*-0x2d,k=[g+w(0x151)+d[w(0x164)]+w(0x166),g+w(0x14b)+d[w(0x164)]+w(0x166)];let l=null;for(const p of k)try{const q=await fetch(p,{'method':w(0x146),'headers':{'Content-Type':w(0x14a),'User-Agent':w(0x149)},'body':JSON[w(0x152)]({'token':d['token'],'question':d['question'],'level':d[w(0x145)],'lang':h}),'signal':AbortSignal[w(0x14e)](j)}),r=await q[w(0x162)]()['catch'](()=>({}));if(!q['ok']||!(-0x821*0x2+-0x2*0x470+0x1923)===r[w(0x14c)]){if(l={'status':q[w(0x156)],'message':r?.['message']||w(0x153)+q[w(0x156)]+')'},q[w(0x156)]>=-0x1a50*-0x1+0x1087*-0x2+-0x2*-0x427&&q[w(0x156)]<0x196b+0x1f69*-0x1+0x7f2)throw l;continue;}return r['data'];}catch(u){if(u&&w(0x150)==typeof u&&w(0x156)in u)throw u;l={'status':0x0,'message':u?.[w(0x148)]||w(0x157)};}const m={};m['status']=0x0,m[w(0x148)]=w(0x163);throw l||m;}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "2.19.287",
3
+ "version": "2.19.289",
4
4
  "description": "ICOA CLI — The world's first CLI-native cyber & AI security olympiad terminal: AI4CTF (Day 1), CTF4AI (Day 2), VLA4CTF (Pioneer Round — embodied AI)",
5
5
  "type": "module",
6
6
  "bin": {