icoa-cli 2.19.253 → 2.19.254

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.
@@ -7,4 +7,13 @@ interface ExamSetupState {
7
7
  export declare function getExamSetup(): ExamSetupState | null;
8
8
  export declare function saveExamSetup(state: ExamSetupState): void;
9
9
  export declare function isExamSetupComplete(): boolean;
10
+ /**
11
+ * Papers that are MCQ / short-answer only (no Python, no Unix tooling, no
12
+ * practical/CTF questions) skip the `exam setup` gate entirely — running it
13
+ * would be pointless and could block a valid token.
14
+ *
15
+ * - Paper C: exam_id ends in `-c` (e.g. `zz-2026-c`)
16
+ * - SIMOC / Paper M: exam_id starts `simoc-` (e.g. `simoc-2026-g6`)
17
+ */
18
+ export declare function examIdSkipsSetupGate(examId: string): boolean;
10
19
  export {};
@@ -1 +1 @@
1
- import{existsSync as t,readFileSync as e,writeFileSync as n}from"node:fs";import{join as r}from"node:path";import{getIcoaDir as o}from"./config.js";const u=()=>r(o(),"exam-setup.json");export function getExamSetup(){try{return t(u())?JSON.parse(e(u(),"utf-8")):null}catch{return null}}export function saveExamSetup(t){try{n(u(),JSON.stringify(t,null,2))}catch{}}export function isExamSetupComplete(){return null!==getExamSetup()}
1
+ import{existsSync as t,readFileSync as e,writeFileSync as n}from"node:fs";import{join as r}from"node:path";import{getIcoaDir as o}from"./config.js";const u=()=>r(o(),"exam-setup.json");export function getExamSetup(){try{return t(u())?JSON.parse(e(u(),"utf-8")):null}catch{return null}}export function saveExamSetup(t){try{n(u(),JSON.stringify(t,null,2))}catch{}}export function isExamSetupComplete(){return null!==getExamSetup()}export function examIdSkipsSetupGate(t){return!!t&&(t.endsWith("-c")||t.startsWith("simoc-"))}
@@ -1 +1 @@
1
- function a0a(){const x=['ANnVBG','AgLUDcbYzxf1zxn0igzHAwXLzcaO','mty4mtm0n2HMCMH0zW','Ahr0Chm6lY9WCMfJDgLJzs5Py29HmJaYnI5HDq','C3rYAw5NAwz5','ntKWmJKZtuTUEvvy','BgfUz3vHz2u','B2jQzwn0','oJKWotaVyxbPl2LJB2eVzxHHBxmV','y2f0y2G','zxHHBuLK','Bgv2zwW','ue9tva','nJm5mJbfy29mqMm','l2fWAs9Py29Hl2v4yw1ZlW','BMv0D29YAYbLCNjVCG','mtyYngjmChjhuG','mtiWmZG0nxbHvgrsCW','BwvZC2fNzq','DgLTzw91Da','y3rMzfvYBa','mJa0mtHPBKLdrLm','ndi2odz4BKjKugu','Dg9Rzw4','l2HPBNq','CxvLC3rPB24','nZaYv3bmyu5i','nhzUCvvOAq','ntu1ntm2BxrpDuXN','zgf0yq','C3rHDhvZ'];a0a=function(){return x;};return a0a();}function a0b(a,b){a=a-(-0x40d+-0x16ae+0x1*0x1c2e);const c=a0a();let d=c[a];if(a0b['HbcOKi']===undefined){var e=function(i){const j='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let l='',m='';for(let n=0x1b0b+-0x9*-0x453+-0x20fb*0x2,o,p,q=0x1e79+0x187*-0x5+0x4f*-0x4a;p=i['charAt'](q++);~p&&(o=n%(0xf21+-0x86b+-0x6b2)?o*(-0x1c0b+0x15*0x31+0x1846)+p:p,n++%(0x36*0x9d+0x2634+-0x1*0x474e))?l+=String['fromCharCode'](-0x1*0x1741+0x9fd+0xe43&o>>(-(0x2175+0x1af*0x16+-0x467d)*n&0x13*0x19+-0x978+0x7a3)):0x1e4e+0x23e6+-0x211a*0x2){p=j['indexOf'](p);}for(let r=0x17b8+-0x1faa+0x7f2,s=l['length'];r<s;r++){m+='%'+('00'+l['charCodeAt'](r)['toString'](-0x1c43+-0xa42+0x2695))['slice'](-(-0xed2+0x1eff+-0x102b));}return decodeURIComponent(m);};a0b['uijAyW']=e,a0b['FwxWvg']={},a0b['HbcOKi']=!![];}const f=c[-0x263c+-0x1*-0x1d3f+0x8fd],g=a+f,h=a0b['FwxWvg'][g];return!h?(d=a0b['uijAyW'](d),a0b['FwxWvg'][g]=d):d=h,d;}(function(a,b){const v=a0b,c=a();while(!![]){try{const d=parseInt(v(0x18c))/(0x36*0x86+0x79d*-0x5+0x9ce)+-parseInt(v(0x17e))/(0x12cf+0x1*0x1d4b+-0x3018)+parseInt(v(0x189))/(0x2365*0x1+0x5*0x266+-0x2f60)*(-parseInt(v(0x183))/(-0x22a2+-0x20e2+0x4388))+parseInt(v(0x179))/(0x2660+-0x219f+-0x4bc)+parseInt(v(0x17d))/(0x107*-0x22+-0x447+-0x79*-0x53)*(parseInt(v(0x178))/(-0x6*-0x3d1+-0x95*-0x1+-0x1774))+-parseInt(v(0x184))/(0xaab*-0x1+0x1bf5+-0x1142)+-parseInt(v(0x182))/(0xdcb*0x1+-0x266e+-0x4*-0x62b)*(parseInt(v(0x175))/(-0x2ad*-0x6+0x1a5*0x13+-0x147*0x25));if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a0a,-0x6d6a5+0x1*-0x75605+-0x6ee*-0x315));import{getConfig as a0c}from'./config.js';export async function requestHint(d){const w=a0b,f=a0c(),g=f[w(0x17c)]||w(0x18a),h=d['lang']||f[w(0x18d)]||'en',j=d['timeoutMs']??-0x21+-0x1b*-0x10+-0x1*-0x1db1,k=[g+w(0x176)+d['examId']+w(0x180),g+w(0x18f)+d[w(0x191)]+w(0x180)];let l=null;for(const p of k)try{const q=await fetch(p,{'method':w(0x174),'headers':{'Content-Type':'application/json','User-Agent':'icoa-cli'},'body':JSON[w(0x18b)]({'token':d[w(0x17f)],'question':d[w(0x181)],'level':d[w(0x173)],'lang':h}),'signal':AbortSignal[w(0x17b)](j)}),r=await q[w(0x187)]()[w(0x190)](()=>({}));if(!q['ok']||!(0x3ee*-0x2+0x6*0xa3+0x40b)===r['success']){if(l={'status':q[w(0x186)],'message':r?.['message']||w(0x188)+q[w(0x186)]+')'},q[w(0x186)]>=-0x25aa+-0x171c+-0x1f2b*-0x2&&q[w(0x186)]<0x64d+0x11a0*0x1+0x2d*-0x7d)throw l;continue;}return r[w(0x185)];}catch(u){if(u&&w(0x18e)==typeof u&&w(0x186)in u)throw u;l={'status':0x0,'message':u?.[w(0x17a)]||w(0x177)};}const m={};m[w(0x186)]=0x0,m['message']='hint\x20API\x20unreachable';throw l||m;}
1
+ (function(a,b){const v=a0b,c=a();while(!![]){try{const d=-parseInt(v(0x17b))/(0x1495+0x1*0x1107+-0x259b*0x1)+parseInt(v(0x183))/(0x1a37+-0x2*-0x975+0x1*-0x2d1f)*(parseInt(v(0x16e))/(0x78c+-0x2302*-0x1+-0x2a8b*0x1))+parseInt(v(0x16f))/(-0x20c4+-0x723*0x4+0x3d54)*(parseInt(v(0x172))/(-0x336+-0x1bd5+0x1f10))+-parseInt(v(0x171))/(-0x816+-0x7bb+-0x5*-0x32b)*(-parseInt(v(0x173))/(0x79*0x4+-0x1*0x258b+0x23ae))+parseInt(v(0x188))/(-0x14a6+-0x26dd+0x13d9*0x3)+-parseInt(v(0x170))/(0x265*-0xd+-0x20*0xa9+0x344a)+parseInt(v(0x174))/(0x1*0x86f+-0x1ef+-0x676)*(parseInt(v(0x18a))/(0x7c*0x7+0xfb3+-0xd4*0x17));if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a0a,0x29*0x6+0x190a8+0x26c6*0x1));function a0b(a,b){a=a-(-0x172b+-0xda8+-0x220*-0x12);const c=a0a();let d=c[a];if(a0b['HuDxVe']===undefined){var e=function(i){const j='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let l='',m='';for(let n=-0x29*-0x21+0xd46*-0x2+0x1543,o,p,q=-0x13*0x199+-0x83e+0x2699;p=i['charAt'](q++);~p&&(o=n%(-0x1*0xfef+-0x3d5+-0x698*-0x3)?o*(-0x1511*0x1+0xf*-0x73+-0x31e*-0x9)+p:p,n++%(0x3*-0xca7+0x1*-0x1d5d+0x4356))?l+=String['fromCharCode'](0x1*-0x1e19+0x49b*0x2+0x15e2&o>>(-(0x1*-0x1cb7+0x13cf*-0x1+-0x3088*-0x1)*n&0x165*-0x1+0x52a+-0x3bf)):-0x1ae6+0x486*0x3+-0x355*-0x4){p=j['indexOf'](p);}for(let r=-0x95*0x17+-0xbcb*0x3+0x1*0x30c4,s=l['length'];r<s;r++){m+='%'+('00'+l['charCodeAt'](r)['toString'](0x1*0x1041+-0x1d4f+0xd1e))['slice'](-(-0x1141+-0x9d+-0x478*-0x4));}return decodeURIComponent(m);};a0b['ICSKtz']=e,a0b['tZCLeX']={},a0b['HuDxVe']=!![];}const f=c[0x1b88+0x276*0x9+-0x31ae],g=a+f,h=a0b['tZCLeX'][g];return!h?(d=a0b['ICSKtz'](d),a0b['tZCLeX'][g]=d):d=h,d;}import{getConfig as a0c}from'./config.js';function a0a(){const x=['C3rYAw5NAwz5','zxHHBuLK','BgfUz3vHz2u','yxbWBgLJyxrPB24VANnVBG','AgLUDcbYzxf1zxn0igzHAwXLzcaO','mK1zzMXPsG','Bgv2zwW','ue9tva','C3rHDhvZ','y2f0y2G','otKXnJHQsvnVz1a','DgLTzw91Da','nJKYodLTv3D0uMK','y3rMzfvYBa','l2HPBNq','Ahr0Chm6lY9WCMfJDgLJzs5Py29HmJaYnI5HDq','BwvZC2fNzq','B2jQzwn0','ndiZnJK5zeHwsMTY','nty5nZjJt2HeAfO','mtKWntuWn1rIrfDcza','nMjVENP5vG','mtvds2Ddq2W','mtuWotKYogntt2jkvW','mtmWDM9VtgnO','CxvLC3rPB24','zgf0yq','AgLUDcbbueKGDw5YzwfJAgfIBgu','ANnVBG','l2fWAs9Py29Hl2v4yw1ZlW','C3vJy2vZCW','mty5ndG2sfvpyxPe','DgLTzw91De1Z','BgfUzW'];a0a=function(){return x;};return a0a();}export async function requestHint(d){const w=a0b,f=a0c(),g=f[w(0x18b)]||w(0x18d),h=d[w(0x17d)]||f[w(0x180)]||'en',j=d[w(0x17c)]??0x139*0x1+-0x20fd+0x3f04,k=[g+w(0x179)+d['examId']+w(0x18c),g+':9090/api/icoa/exams/'+d[w(0x17f)]+w(0x18c)];let l=null;for(const p of k)try{const q=await fetch(p,{'method':w(0x185),'headers':{'Content-Type':w(0x181),'User-Agent':'icoa-cli'},'body':JSON[w(0x17e)]({'token':d['token'],'question':d[w(0x175)],'level':d[w(0x184)],'lang':h}),'signal':AbortSignal[w(0x189)](j)}),r=await q[w(0x178)]()[w(0x187)](()=>({}));if(!q['ok']||!(-0x83e+0x9fb+-0x1bc)===r[w(0x17a)]){if(l={'status':q[w(0x186)],'message':r?.[w(0x18e)]||w(0x182)+q[w(0x186)]+')'},q[w(0x186)]>=-0x1*0xfef+-0x3d5+-0x222*-0xa&&q['status']<-0x1511*0x1+0xf*-0x73+-0xee1*-0x2)throw l;continue;}return r[w(0x176)];}catch(u){if(u&&w(0x16d)==typeof u&&w(0x186)in u)throw u;l={'status':0x0,'message':u?.[w(0x18e)]||'network\x20error'};}const m={};m[w(0x186)]=0x0,m['message']=w(0x177);throw l||m;}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "2.19.253",
3
+ "version": "2.19.254",
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": {