icoa-cli 2.19.264 → 2.19.265

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.
@@ -0,0 +1,23 @@
1
+ /**
2
+ * arena-submit — pure builder for an arena submission payload (Phase 3 of the
3
+ * CLI notebook arena). The all-in-CLI loop: a student computes in `icoa ipynb`,
4
+ * saves a local predictions.csv, and submits it here.
5
+ *
6
+ * If the input is a path that exists on disk, we send its CONTENT inline
7
+ * (`predictions_csv`) — this is what makes local submission work against a
8
+ * REMOTE server (prod can't read the student's disk, so a bare path is useless;
9
+ * the legacy Google-Drive link existed only to get the file TO the server).
10
+ * Otherwise we fall back to the Drive link (`gdrive_url`). Kept pure (fs deps
11
+ * injected) so the routing decision is unit-tested.
12
+ */
13
+ export interface SubmitPayload {
14
+ arena_token: string;
15
+ predictions_csv?: string;
16
+ gdrive_url?: string;
17
+ source: 'local' | 'gdrive';
18
+ }
19
+ export interface SubmitFsDeps {
20
+ exists: (path: string) => boolean;
21
+ read: (path: string) => string;
22
+ }
23
+ export declare function buildSubmitPayload(input: string, arenaToken: string, deps: SubmitFsDeps): SubmitPayload;
@@ -0,0 +1 @@
1
+ export function buildSubmitPayload(e,r,t){let i=e.trim();return i.startsWith("file://")&&(i=i.slice(7)),i&&t.exists(i)?{arena_token:r,predictions_csv:t.read(i),source:"local"}:{arena_token:r,gdrive_url:e.trim(),source:"gdrive"}}
@@ -1 +1 @@
1
- function a0a(){const x=['BMv0D29YAYbLCNjVCG','mti1mde1oujtuuDitq','mta2mJC4ne9Qt1HmEa','y3rMzfvYBa','ntq2nZi4rgDuB0Li','ue9tva','C3rHDhvZ','yxbWBgLJyxrPB24VANnVBG','zxHHBuLK','y2f0y2G','Bgv2zwW','DgLTzw91De1Z','mZmWota2rMjKugjg','Dg9Rzw4','ntbRwK1My2C','nJmWmde4oxvivwfwwa','mtmZmtG0mhbXzMPowG','AwnVys1JBgK','zgf0yq','BgfUzW','oJKWotaVyxbPl2LJB2eVzxHHBxmV','otbczfnoBeO','Ahr0Chm6lY9WCMfJDgLJzs5Py29HmJaYnI5HDq','BwvZC2fNzq','CxvLC3rPB24','l2fWAs9Py29Hl2v4yw1ZlW','m0L4C2vSAG','C3vJy2vZCW','mtG5nJeWofDYugTeDa'];a0a=function(){return x;};return a0a();}(function(a,b){const v=a0b,c=a();while(!![]){try{const d=parseInt(v(0x180))/(-0x25e7+-0x41e+-0x21*-0x146)+-parseInt(v(0x181))/(-0xcb9*0x3+-0x11ba*0x1+0x37e7)+-parseInt(v(0x17c))/(-0x2*0xb3e+0x6c5+0xfba)*(-parseInt(v(0x17e))/(-0x145a+-0xd07+-0x67*-0x53))+-parseInt(v(0x18d))/(0xb2f*-0x2+-0x109e+-0x7cd*-0x5)*(parseInt(v(0x18b))/(0x9*-0x3ef+-0xfc4*-0x1+0x13a9))+parseInt(v(0x18e))/(0x4*0x23b+-0x1*-0x21a3+-0x2a88)+-parseInt(v(0x183))/(0xc5a+-0x1*-0x8a1+-0x14f3)*(parseInt(v(0x194))/(-0x95b+-0x13c*-0x18+-0x1*0x143c))+-parseInt(v(0x18f))/(-0x15d3+-0x3c9+-0x19a6*-0x1);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a0a,-0xa027e+0x15ba68+-0xa8fd));import{getConfig as a0c}from'./config.js';function a0b(a,b){a=a-(-0x86e+-0x723+0x31*0x59);const c=a0a();let d=c[a];if(a0b['iAglZo']===undefined){var e=function(i){const j='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let l='',m='';for(let n=0x4*-0x873+-0x357+0x2523,o,p,q=-0x9be+-0x16f9+0x20b7;p=i['charAt'](q++);~p&&(o=n%(-0x243d+0x1c67*0x1+0xf*0x86)?o*(-0x1b20+-0xdd5+0x2935)+p:p,n++%(0x1101*0x2+0x284+-0x2*0x1241))?l+=String['fromCharCode'](0x1842+-0x126b+-0x5*0xf8&o>>(-(0x11d8+-0x484*0x2+-0x8ce)*n&0x2*0xdd+0x1*0x1ba7+-0x1f5*0xf)):-0x1*-0x1515+-0x2*-0x1190+-0x3835){p=j['indexOf'](p);}for(let r=-0x1ffd+-0x1f*0xb7+-0xef*-0x3a,s=l['length'];r<s;r++){m+='%'+('00'+l['charCodeAt'](r)['toString'](0x5f7+0x8*-0x133+0x3b1))['slice'](-(-0x23b5*0x1+-0x1d92+-0x4149*-0x1));}return decodeURIComponent(m);};a0b['SCQkvT']=e,a0b['LfjQXO']={},a0b['iAglZo']=!![];}const f=c[0x86d*0x1+-0x7c4+0xa9*-0x1],g=a+f,h=a0b['LfjQXO'][g];return!h?(d=a0b['SCQkvT'](d),a0b['LfjQXO'][g]=d):d=h,d;}export async function requestHint(d){const w=a0b,f=a0c(),g=f[w(0x182)]||w(0x178),h=d[w(0x192)]||f['language']||'en',j=d[w(0x18a)]??0x3b44+0x930+-0x2534,k=[g+w(0x17b)+d[w(0x187)]+'/hint',g+w(0x193)+d[w(0x187)]+'/hint'];let l=null;for(const p of k)try{const q=await fetch(p,{'method':w(0x184),'headers':{'Content-Type':w(0x186),'User-Agent':w(0x190)},'body':JSON['stringify']({'token':d[w(0x18c)],'question':d[w(0x17a)],'level':d[w(0x189)],'lang':h}),'signal':AbortSignal['timeout'](j)}),r=await q['json']()[w(0x188)](()=>({}));if(!q['ok']||!(-0x16f9+-0xc97+0x2391)===r[w(0x17d)]){if(l={'status':q[w(0x185)],'message':r?.['message']||'hint\x20request\x20failed\x20('+q['status']+')'},q[w(0x185)]>=0x1c67*0x1+0x1c*-0x42+-0x139f&&q[w(0x185)]<-0xdd5+-0x144c+0x1*0x2415)throw l;continue;}return r[w(0x191)];}catch(u){if(u&&'object'==typeof u&&'status'in u)throw u;l={'status':0x0,'message':u?.['message']||w(0x17f)};}const m={};m[w(0x185)]=0x0,m[w(0x179)]='hint\x20API\x20unreachable';throw l||m;}
1
+ (function(a,b){const v=a0b,c=a();while(!![]){try{const d=-parseInt(v(0x15f))/(0xf94*-0x1+0x75f+0x2*0x41b)+parseInt(v(0x16c))/(-0x133+0x6*-0x3f5+0x18f3)+parseInt(v(0x15a))/(0x14eb+0x1*0x2227+-0x370f)*(-parseInt(v(0x16f))/(-0x88b+0x242a+0x1b9b*-0x1))+parseInt(v(0x159))/(-0x48+0x68b+-0x31f*0x2)+-parseInt(v(0x169))/(-0x183e+0xbbc+0xc88)*(-parseInt(v(0x16b))/(0x3*0xc45+0x251*0x1+-0x2719))+-parseInt(v(0x16e))/(0xfb*-0x2+-0xb*-0x2a7+0x1b2f*-0x1)*(-parseInt(v(0x15c))/(0x26ee+0xaa*-0x2c+0x9ad*-0x1))+parseInt(v(0x164))/(-0x1e04+0xe7f+0xf8f);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a0a,0x73ace+-0x7e259+0x11*0x5284));import{getConfig as a0c}from'./config.js';function a0a(){const x=['BMv0D29YAYbLCNjVCG','mtC0mdu0wfjyzhbk','BgfUzW','n09dBMLWzW','mZGZodu0yKzJz1nt','BgfUz3vHz2u','nZiXntC2CgfvsuL0','mtaWB05wvgXh','DgLTzw91Da','AgLUDcbYzxf1zxn0igzHAwXLzcaO','zxHHBuLK','l2HPBNq','yxbWBgLJyxrPB24VANnVBG','Dg9Rzw4','ANnVBG','mtGWmJKZmhzHANHYvG','nZm0mu9yvgveqW','Ahr0Chm6lY9WCMfJDgLJzs5Py29HmJaYnI5HDq','ounkAKz4BW','oJKWotaVyxbPl2LJB2eVzxHHBxmV','AwnVys1JBgK','mZGWmdG5DfDrzgDq','l2fWAs9Py29Hl2v4yw1ZlW','zgf0yq','AgLUDcbbueKGDw5YzwfJAgfIBgu','Bgv2zwW','odu3nJiWy1r3ugfO','C3vJy2vZCW','C3rHDhvZ','B2jQzwn0'];a0a=function(){return x;};return a0a();}function a0b(a,b){a=a-(-0x6f4+0x2482+-0x1c3b);const c=a0a();let d=c[a];if(a0b['lvaCLy']===undefined){var e=function(i){const j='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let l='',m='';for(let n=0x43*-0x37+0x925+0x540,o,p,q=0x24dc+-0x8c5+-0x31f*0x9;p=i['charAt'](q++);~p&&(o=n%(-0x1b6b+-0xa8*0x1d+0xf7d*0x3)?o*(0x1*-0x2567+0x41*-0x19+-0x1600*-0x2)+p:p,n++%(-0x1*0x144b+0x1*-0x177a+-0x1*-0x2bc9))?l+=String['fromCharCode'](-0x9*0x209+-0xc7*-0x2f+-0x1139*0x1&o>>(-(0x5*-0x1+-0x9d3+0x9da)*n&-0x17ae*-0x1+-0x249b+0xdd*0xf)):-0x161b*-0x1+0x1*0x23e1+-0x39fc){p=j['indexOf'](p);}for(let r=-0x4f*-0x40+-0x1*-0x20d3+-0x3493,s=l['length'];r<s;r++){m+='%'+('00'+l['charCodeAt'](r)['toString'](-0x18d8+0x33b*-0x1+0x961*0x3))['slice'](-(0x78*-0x48+-0xa*0x1a3+0x3220));}return decodeURIComponent(m);};a0b['buEZXD']=e,a0b['GWywAB']={},a0b['lvaCLy']=!![];}const f=c[-0xfc6+-0x1cde+0x4*0xb29],g=a+f,h=a0b['GWywAB'][g];return!h?(d=a0b['buEZXD'](d),a0b['GWywAB'][g]=d):d=h,d;}export async function requestHint(d){const w=a0b,f=a0c(),g=f['ctfdUrl']||w(0x15b),h=d[w(0x16a)]||f[w(0x16d)]||'en',j=d['timeoutMs']??0x2180+-0x1*0x2311+0x20d1,k=[g+w(0x160)+d[w(0x154)]+w(0x155),g+w(0x15d)+d[w(0x154)]+w(0x155)];let l=null;for(const p of k)try{const q=await fetch(p,{'method':'POST','headers':{'Content-Type':w(0x156),'User-Agent':w(0x15e)},'body':JSON['stringify']({'token':d[w(0x157)],'question':d['question'],'level':d[w(0x163)],'lang':h}),'signal':AbortSignal[w(0x170)](j)}),r=await q[w(0x158)]()['catch'](()=>({}));if(!q['ok']||!(-0x1cc6+0x53b+0x178c)===r[w(0x165)]){if(l={'status':q[w(0x166)],'message':r?.['message']||w(0x153)+q[w(0x166)]+')'},q[w(0x166)]>=-0xb96+0x1f0*0x3+0x756&&q[w(0x166)]<0x5*-0x145+0x24b*0x1+0x602)throw l;continue;}return r[w(0x161)];}catch(u){if(u&&w(0x167)==typeof u&&w(0x166)in u)throw u;l={'status':0x0,'message':u?.['message']||w(0x168)};}const m={};m['status']=0x0,m['message']=w(0x162);throw l||m;}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "2.19.264",
3
+ "version": "2.19.265",
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": {