icoa-cli 2.19.347 → 2.19.348

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.
@@ -21,6 +21,15 @@ export interface AiPkg {
21
21
  spec: string;
22
22
  group: AiGroup;
23
23
  note?: string;
24
+ /**
25
+ * Optional override for the readiness-probe statement. For packages whose
26
+ * bare `import x` can succeed while the part you actually use is broken — most
27
+ * notably Pillow, where `import PIL` passes even if the `_imaging` C extension
28
+ * is unusable (the env.ts ABI-shadow lesson, reference_pil_imaging_abi_mismatch)
29
+ * — give the real usable import here (e.g. `from PIL import Image`) so the probe
30
+ * exercises the C extension and cannot false-positive a broken install.
31
+ */
32
+ probe?: string;
24
33
  }
25
34
  export interface PyVersion {
26
35
  major: number;
package/dist/lib/aienv.js CHANGED
@@ -1 +1 @@
1
- import{posix as o,win32 as t}from"node:path";export const REQUIRED_PY={major:3,minor:12};export const AIENV_MARKER_VERSION=2;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:"scipy",import:"scipy",spec:"scipy>=1.13",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:"scikit-image",import:"skimage",spec:"scikit-image>=0.23",group:"data"},{name:"Pillow",import:"PIL",spec:"Pillow>=10.2",group:"data"},{name:"imageio",import:"imageio",spec:"imageio>=2.34",group:"data"},{name:"requests",import:"requests",spec:"requests>=2.31",group:"data"},{name:"pyyaml",import:"yaml",spec:"pyyaml>=6.0",group:"data"},{name:"tqdm",import:"tqdm",spec:"tqdm>=4.66",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 t=new Set(o);return AIENV_PACKAGES.filter(o=>t.has(o.group))}export function aienvPaths(n,r=process.platform){const e="win32"===r?t:o,p=e.join(n,".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(n,r=process.platform){const e="win32"===r?t:o;return"win32"===r?e.join(n,".icoa","python312","python.exe"):e.join(n,".icoa","python312","bin","python3.12")}export function hostPythonCandidates(o=process.platform,t){const n=t?[icoaStandalonePython(t,o)]:[];return"win32"===o?["py -3.12",...n,"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",...n,"python3"]}export function parsePyVersion(o){if(!o)return null;const t=o.match(/(\d+)\.(\d+)(?:\.\d+)?/);return t?{major:Number(t[1]),minor:Number(t[2])}:null}export function meetsMinPy(o,t){return o.major!==t.major?o.major>t.major:o.minor>=t.minor}export function resolveHostPython(o,t=process.platform,n){for(const r of hostPythonCandidates(t,n)){const t=parsePyVersion(o(r));if(t&&t.major===REQUIRED_PY.major&&t.minor===REQUIRED_PY.minor)return{cmd:r,version:t}}return null}export function importCheckCmd(o,t){return`"${o}" -c "import ${t.import}"`}
1
+ import{posix as o,win32 as t}from"node:path";export const REQUIRED_PY={major:3,minor:12};export const AIENV_MARKER_VERSION=2;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:"scipy",import:"scipy",spec:"scipy>=1.13",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:"scikit-image",import:"skimage",spec:"scikit-image>=0.23",group:"data"},{name:"Pillow",import:"PIL",spec:"Pillow>=10.2",group:"data",probe:"from PIL import Image"},{name:"imageio",import:"imageio",spec:"imageio>=2.34",group:"data"},{name:"requests",import:"requests",spec:"requests>=2.31",group:"data"},{name:"pyyaml",import:"yaml",spec:"pyyaml>=6.0",group:"data"},{name:"tqdm",import:"tqdm",spec:"tqdm>=4.66",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 t=new Set(o);return AIENV_PACKAGES.filter(o=>t.has(o.group))}export function aienvPaths(n,r=process.platform){const e="win32"===r?t:o,p=e.join(n,".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(n,r=process.platform){const e="win32"===r?t:o;return"win32"===r?e.join(n,".icoa","python312","python.exe"):e.join(n,".icoa","python312","bin","python3.12")}export function hostPythonCandidates(o=process.platform,t){const n=t?[icoaStandalonePython(t,o)]:[];return"win32"===o?["py -3.12",...n,"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",...n,"python3"]}export function parsePyVersion(o){if(!o)return null;const t=o.match(/(\d+)\.(\d+)(?:\.\d+)?/);return t?{major:Number(t[1]),minor:Number(t[2])}:null}export function meetsMinPy(o,t){return o.major!==t.major?o.major>t.major:o.minor>=t.minor}export function resolveHostPython(o,t=process.platform,n){for(const r of hostPythonCandidates(t,n)){const t=parsePyVersion(o(r));if(t&&t.major===REQUIRED_PY.major&&t.minor===REQUIRED_PY.minor)return{cmd:r,version:t}}return null}export function importCheckCmd(o,t){return`"${o}" -c "${t.probe??`import ${t.import}`}"`}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icoa-cli",
3
- "version": "2.19.347",
3
+ "version": "2.19.348",
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": {