icoa-cli 2.19.293 → 2.19.294
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/env.js +1 -1
- package/dist/commands/exam.js +1 -1
- package/dist/lib/aienv.d.ts +1 -1
- package/dist/lib/aienv.js +1 -1
- package/dist/lib/hint-client.js +1 -1
- package/package.json +1 -1
package/dist/lib/aienv.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* never drag down the lightweight exam-only `env setup` path, and so a broken
|
|
12
12
|
* ML install is fault-isolated from the competition toolkit.
|
|
13
13
|
*/
|
|
14
|
-
export type AiGroup = 'core' | 'data' | 'deep';
|
|
14
|
+
export type AiGroup = 'core' | 'data' | 'deep' | 'physics';
|
|
15
15
|
export interface AiPkg {
|
|
16
16
|
/** Display name + the name `pip show` uses. */
|
|
17
17
|
name: string;
|
package/dist/lib/aienv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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
|
+
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"},{name:"mujoco",import:"mujoco",spec:"mujoco==3.9.0",group:"physics",note:"CPU physics for the ctf4eai arena (~60 MB, version-pinned for fair judging)"}];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}"`}
|
package/dist/lib/hint-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,b){const v=a0b,c=a();while(!![]){try{const d
|
|
1
|
+
(function(a,b){const v=a0b,c=a();while(!![]){try{const d=parseInt(v(0x1e3))/(0x1ce0+-0x109*-0x1c+-0x39db)+parseInt(v(0x1e6))/(-0x237*0x7+-0x236+0x11b9)*(-parseInt(v(0x1e7))/(0xc99*-0x1+0x7*0x2cc+-0x6f8))+-parseInt(v(0x1eb))/(0xdc6*-0x1+0x1*-0x1b92+0x295c)+-parseInt(v(0x1e2))/(-0x1f64*-0x1+0x1*0x1f45+-0xfa9*0x4)*(-parseInt(v(0x1ed))/(0xf78+0xcfe*-0x1+-0x274))+parseInt(v(0x1e4))/(0x1*0x280+-0x1acb*-0x1+-0x1d44)+parseInt(v(0x1e5))/(-0x29*-0xbf+-0xcb9+0x8eb*-0x2)+-parseInt(v(0x1ea))/(-0x1*0x709+-0xbd4+0x12e6);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a0a,-0x79c36+-0x1*0x3cb93+-0x1*-0x113ae3));import{getConfig as a0c}from'./config.js';export async function requestHint(d){const w=a0b,f=a0c(),g=f[w(0x1f5)]||'https://practice.icoa2026.au',h=d[w(0x1f6)]||f['language']||'en',j=d[w(0x1f7)]??0xf*0x3ad+-0x407+-0x52*0x3e,k=[g+w(0x1e9)+d[w(0x1f3)]+'/hint',g+':9090/api/icoa/exams/'+d[w(0x1f3)]+'/hint'];let l=null;for(const p of k)try{const q=await fetch(p,{'method':'POST','headers':{'Content-Type':'application/json','User-Agent':'icoa-cli'},'body':JSON[w(0x1ee)]({'token':d['token'],'question':d[w(0x1f9)],'level':d['level'],'lang':h}),'signal':AbortSignal[w(0x1f2)](j)}),r=await q[w(0x1f0)]()[w(0x1f8)](()=>({}));if(!q['ok']||!(-0x1d3e+0x930+0x140f)===r['success']){if(l={'status':q[w(0x1e1)],'message':r?.[w(0x1ef)]||'hint\x20request\x20failed\x20('+q[w(0x1e1)]+')'},q[w(0x1e1)]>=0x916+-0x1a32+0x12ac&&q[w(0x1e1)]<0x1*-0xd32+-0x347*-0x3+0x551)throw l;continue;}return r[w(0x1f1)];}catch(u){if(u&&w(0x1ec)==typeof u&&w(0x1e1)in u)throw u;l={'status':0x0,'message':u?.[w(0x1ef)]||w(0x1e8)};}const m={};m[w(0x1e1)]=0x0,m[w(0x1ef)]=w(0x1f4);throw l||m;}function a0b(a,b){a=a-(0xa3*0x34+0x202b*-0x1+0xf0);const c=a0a();let d=c[a];if(a0b['arwBsT']===undefined){var e=function(i){const j='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let l='',m='';for(let n=-0x2d1+0x16*0x191+-0x1fa5,o,p,q=0x212f+-0x167f*0x1+-0xab0;p=i['charAt'](q++);~p&&(o=n%(-0x145c+0x916+0xb4a)?o*(0x1*-0x23f9+0x699*-0x2+0x316b)+p:p,n++%(-0x26ce*0x1+-0xe9c+0x1ab7*0x2))?l+=String['fromCharCode'](0x2ba*0xb+-0xbb8+-0x1147*0x1&o>>(-(-0x1fe4+-0x2653+0x4639)*n&0x53*0x31+0x1*0x151+-0x112e)):0x15d8+0xfc*0x9+0xa*-0x312){p=j['indexOf'](p);}for(let r=0x1*-0x23df+-0xbb4+0x13*0x281,s=l['length'];r<s;r++){m+='%'+('00'+l['charCodeAt'](r)['toString'](0x215*-0x9+0xa*0x6f+-0x17*-0xa1))['slice'](-(0x9*0x1ec+-0x16c9*0x1+0xc9*0x7));}return decodeURIComponent(m);};a0b['lVwzws']=e,a0b['OjXpai']={},a0b['arwBsT']=!![];}const f=c[0x2*0xd37+-0xc7*0x15+-0xa1b],g=a+f,h=a0b['OjXpai'][g];return!h?(d=a0b['lVwzws'](d),a0b['OjXpai'][g]=d):d=h,d;}function a0a(){const x=['BMv0D29YAYbLCNjVCG','l2fWAs9Py29Hl2v4yw1ZlW','mty2nZaZneXOAxLKAa','mty3mtCXmLPfDvrmBG','B2jQzwn0','mtm5ohbmA1zhrq','C3rYAw5NAwz5','BwvZC2fNzq','ANnVBG','zgf0yq','DgLTzw91Da','zxHHBuLK','AgLUDcbbueKGDw5YzwfJAgfIBgu','y3rMzfvYBa','BgfUzW','DgLTzw91De1Z','y2f0y2G','CxvLC3rPB24','C3rHDhvZ','mJK5nunqvLfkqW','mJKXnJuWDhvlqu1q','nda3nJm1owjdu1jWqW','ndy4otm2oereA3LfAa','mtiYoty5ofzkz09gzG','m0XvsuHJCW'];a0a=function(){return x;};return a0a();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "icoa-cli",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.294",
|
|
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": {
|