icoa-cli 2.19.458 → 2.19.460

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.
Files changed (162) hide show
  1. package/dist/commands/ai4ctf.js +1 -1
  2. package/dist/commands/ctf4ai-demo.js +1 -1
  3. package/dist/commands/ctf4vla.js +1 -1
  4. package/dist/commands/exam.js +1 -1
  5. package/dist/commands/learn.js +1 -1
  6. package/dist/commands/ref.js +1 -1
  7. package/dist/lib/lazy-assets.js +1 -0
  8. package/dist/lib/py-syntax.js +1 -1
  9. package/package.json +1 -2
  10. package/dist/commands/ai4ctf.d.ts +0 -4
  11. package/dist/commands/ai4ioai.d.ts +0 -29
  12. package/dist/commands/aienv.d.ts +0 -23
  13. package/dist/commands/arena-eai.d.ts +0 -37
  14. package/dist/commands/arena.d.ts +0 -8
  15. package/dist/commands/board.d.ts +0 -2
  16. package/dist/commands/challenge.d.ts +0 -9
  17. package/dist/commands/comms.d.ts +0 -2
  18. package/dist/commands/connect.d.ts +0 -15
  19. package/dist/commands/ctf.d.ts +0 -3
  20. package/dist/commands/ctf4ai-demo.d.ts +0 -4
  21. package/dist/commands/ctf4vla.d.ts +0 -34
  22. package/dist/commands/demo2.d.ts +0 -31
  23. package/dist/commands/demo4.d.ts +0 -3
  24. package/dist/commands/demo5.d.ts +0 -3
  25. package/dist/commands/doctor.d.ts +0 -2
  26. package/dist/commands/env.d.ts +0 -5
  27. package/dist/commands/exam.d.ts +0 -13
  28. package/dist/commands/files.d.ts +0 -2
  29. package/dist/commands/ioailab.d.ts +0 -1
  30. package/dist/commands/ipynb.d.ts +0 -20
  31. package/dist/commands/kaggle.d.ts +0 -12
  32. package/dist/commands/lang.d.ts +0 -2
  33. package/dist/commands/learn.d.ts +0 -16
  34. package/dist/commands/log.d.ts +0 -2
  35. package/dist/commands/note.d.ts +0 -25
  36. package/dist/commands/ref.d.ts +0 -2
  37. package/dist/commands/setup.d.ts +0 -2
  38. package/dist/commands/shell.d.ts +0 -35
  39. package/dist/commands/sim.d.ts +0 -32
  40. package/dist/commands/sprint.d.ts +0 -7
  41. package/dist/commands/teleload.d.ts +0 -8
  42. package/dist/commands/theme.d.ts +0 -13
  43. package/dist/commands/view.d.ts +0 -2
  44. package/dist/index.d.ts +0 -2
  45. package/dist/lib/access.d.ts +0 -14
  46. package/dist/lib/aienv.d.ts +0 -118
  47. package/dist/lib/arena-edit-dynamics.d.ts +0 -55
  48. package/dist/lib/arena-submit.d.ts +0 -23
  49. package/dist/lib/banner.d.ts +0 -9
  50. package/dist/lib/bgtasks.d.ts +0 -21
  51. package/dist/lib/board-render.d.ts +0 -14
  52. package/dist/lib/budget.d.ts +0 -1
  53. package/dist/lib/card-engine.d.ts +0 -45
  54. package/dist/lib/challenge-dir.d.ts +0 -1
  55. package/dist/lib/colors.d.ts +0 -11
  56. package/dist/lib/commands.d.ts +0 -53
  57. package/dist/lib/comms.d.ts +0 -40
  58. package/dist/lib/config.d.ts +0 -8
  59. package/dist/lib/countdown.d.ts +0 -4
  60. package/dist/lib/country-lang.d.ts +0 -1
  61. package/dist/lib/ctfd-client.d.ts +0 -33
  62. package/dist/lib/deck-cooldown.d.ts +0 -7
  63. package/dist/lib/demo-exam.d.ts +0 -28
  64. package/dist/lib/demo-flags.d.ts +0 -8
  65. package/dist/lib/demo-stats.d.ts +0 -17
  66. package/dist/lib/docker-probe.d.ts +0 -45
  67. package/dist/lib/drafts.d.ts +0 -11
  68. package/dist/lib/editor-spawn.d.ts +0 -28
  69. package/dist/lib/exam-client.d.ts +0 -15
  70. package/dist/lib/exam-sandbox.d.ts +0 -15
  71. package/dist/lib/exam-setup.d.ts +0 -19
  72. package/dist/lib/exam-state.d.ts +0 -42
  73. package/dist/lib/gemini.d.ts +0 -16
  74. package/dist/lib/gpu.d.ts +0 -51
  75. package/dist/lib/http.d.ts +0 -35
  76. package/dist/lib/i18n.d.ts +0 -215
  77. package/dist/lib/input-dynamics.d.ts +0 -38
  78. package/dist/lib/integrity-snapshot.d.ts +0 -22
  79. package/dist/lib/interactive-spawn.d.ts +0 -25
  80. package/dist/lib/ipynb-input.d.ts +0 -25
  81. package/dist/lib/kaggle.d.ts +0 -115
  82. package/dist/lib/kernel-protocol.d.ts +0 -92
  83. package/dist/lib/kernel.d.ts +0 -81
  84. package/dist/lib/learn-ai.d.ts +0 -159
  85. package/dist/lib/learn-contest.d.ts +0 -141
  86. package/dist/lib/learn-curricula.d.ts +0 -274
  87. package/dist/lib/learn-i18n.d.ts +0 -8
  88. package/dist/lib/learn-input.d.ts +0 -40
  89. package/dist/lib/learn-outcome.d.ts +0 -1
  90. package/dist/lib/learn-render.d.ts +0 -107
  91. package/dist/lib/learn-replies.d.ts +0 -42
  92. package/dist/lib/learn-state.d.ts +0 -66
  93. package/dist/lib/log-sync.d.ts +0 -2
  94. package/dist/lib/logger.d.ts +0 -12
  95. package/dist/lib/main-rl.d.ts +0 -20
  96. package/dist/lib/md-term.d.ts +0 -17
  97. package/dist/lib/menu-nav.d.ts +0 -25
  98. package/dist/lib/notebook-doc.d.ts +0 -38
  99. package/dist/lib/open-file.d.ts +0 -35
  100. package/dist/lib/paper-upgrade.d.ts +0 -27
  101. package/dist/lib/platform.d.ts +0 -110
  102. package/dist/lib/py-syntax.d.ts +0 -36
  103. package/dist/lib/render-card.d.ts +0 -17
  104. package/dist/lib/repl-asker.d.ts +0 -7
  105. package/dist/lib/resume.d.ts +0 -7
  106. package/dist/lib/sample-runner.d.ts +0 -14
  107. package/dist/lib/sandbox.d.ts +0 -30
  108. package/dist/lib/secure-store.d.ts +0 -18
  109. package/dist/lib/shell-split.d.ts +0 -17
  110. package/dist/lib/sim-cooldown.d.ts +0 -14
  111. package/dist/lib/sprint-meta.d.ts +0 -72
  112. package/dist/lib/statusline.d.ts +0 -1
  113. package/dist/lib/terminal-cleanup.d.ts +0 -35
  114. package/dist/lib/theme.d.ts +0 -4
  115. package/dist/lib/token-format.d.ts +0 -41
  116. package/dist/lib/tool-man.d.ts +0 -11
  117. package/dist/lib/toolset-hash.d.ts +0 -15
  118. package/dist/lib/translation.d.ts +0 -1
  119. package/dist/lib/translations-fetcher.d.ts +0 -6
  120. package/dist/lib/ui.d.ts +0 -12
  121. package/dist/lib/update-check.d.ts +0 -1
  122. package/dist/lib/version.d.ts +0 -8
  123. package/dist/repl.d.ts +0 -4
  124. package/dist/types/index.d.ts +0 -221
  125. package/refs/ROPgadget.txt +0 -67
  126. package/refs/base64.txt +0 -63
  127. package/refs/bash.txt +0 -79
  128. package/refs/binwalk.txt +0 -43
  129. package/refs/bs4.txt +0 -61
  130. package/refs/checksec.txt +0 -57
  131. package/refs/curl.txt +0 -73
  132. package/refs/cyberchef.txt +0 -78
  133. package/refs/exiftool.txt +0 -50
  134. package/refs/ffuf.txt +0 -73
  135. package/refs/gcc.txt +0 -66
  136. package/refs/gdb.txt +0 -83
  137. package/refs/hashcat.txt +0 -64
  138. package/refs/hint.txt +0 -48
  139. package/refs/icoa.txt +0 -72
  140. package/refs/john.txt +0 -74
  141. package/refs/linux.txt +0 -58
  142. package/refs/nc.txt +0 -64
  143. package/refs/nmap.txt +0 -57
  144. package/refs/numpy.txt +0 -59
  145. package/refs/openssl.txt +0 -75
  146. package/refs/pillow.txt +0 -67
  147. package/refs/pwntools.txt +0 -79
  148. package/refs/pycrypto.txt +0 -77
  149. package/refs/python.txt +0 -103
  150. package/refs/r2.txt +0 -85
  151. package/refs/regex.txt +0 -73
  152. package/refs/requests.txt +0 -83
  153. package/refs/rules.txt +0 -28
  154. package/refs/scapy.txt +0 -80
  155. package/refs/sqlmap.txt +0 -69
  156. package/refs/steghide.txt +0 -71
  157. package/refs/struct.txt +0 -61
  158. package/refs/sympy.txt +0 -77
  159. package/refs/tshark.txt +0 -65
  160. package/refs/vim.txt +0 -74
  161. package/refs/volatility.txt +0 -41
  162. package/refs/z3.txt +0 -78
@@ -1,37 +0,0 @@
1
- /** Accept the forms a first-time user instinctively types: `eai-p1`, `p1`,
2
- * `eai-01`, `01`, `1`. Practice = `p<n>`; official = zero-padded `eai-NN`. */
3
- export declare function normalizeTaskId(arg: string): string;
4
- /** The published `protocol` of a policy task — the shape its `query`/`submit`
5
- * payloads must take. The placeholder arrays/objects (`q:["f0","f1",…]`,
6
- * `a:["d0",…]` or `a:{x:["lo","hi"],y:["lo","hi"]}`) drive BOTH the shorthand
7
- * parser and the on-screen usage hints, so every policy shape works — not just
8
- * the 2-feature region game. */
9
- export interface PolicyProtocol {
10
- query?: {
11
- q?: unknown;
12
- };
13
- submit?: {
14
- a?: unknown;
15
- };
16
- }
17
- /** Build the JSON `instruction` a POLICY task expects from a friendly shorthand,
18
- * driven by the task's published `protocol` so EVERY policy shape works:
19
- * region q:[x,y] a:{x:[lo,hi],y:[lo,hi]} eai-20/22/30/p4/p5
20
- * patch q:[f0…f3] a:[d0…d3] eai-15/16/17/18/31
21
- * ranking q:[itemA,…] a:[ranked,items,"…"] eai-21/23/33
22
- * `op` is 'query' (recon) or 'submit' (claim). Forms accepted:
23
- * probe 0.8 0.3 0.1 0.4 → {"op":"query","q":[0.8,0.3,0.1,0.4]} (len from protocol)
24
- * submit -0.6 0 0.5 0.1 → {"op":"submit","a":[-0.6,0,0.5,0.1]} (patch) — OR a:{x,y} (region)
25
- * <raw JSON> → passed through, op backfilled (always available)
26
- * Without a protocol (legacy callers / unit tests) it preserves the original
27
- * region behavior: query = first 2 numbers, submit = 4 numbers → rectangle.
28
- * Returns the JSON string, or null if the shorthand can't be parsed. */
29
- export declare function buildPolicyInstruction(op: 'query' | 'submit', rest: string, protocol?: PolicyProtocol): string | null;
30
- export declare function taskDir(task: string): string;
31
- /** A per-task self_check.py that DELEGATES to a parent-dir self_check (a server
32
- * packaging mistake — `runpy.run_path(dirname(dirname(__file__))/self_check.py)`)
33
- * cannot run standalone on the client: that parent file is never downloaded. If
34
- * we spawn it anyway Python dumps a `FileNotFoundError: .../self_check.py` at the
35
- * player (reads as "no self_check.py"). Detect it so `roll` degrades cleanly. */
36
- export declare function selfCheckRunnable(src: string): boolean;
37
- export declare function runArenaEai(taskArg?: string): Promise<void>;
@@ -1,8 +0,0 @@
1
- import type { Command } from 'commander';
2
- /** Resolve the (track, task) pair from up to two positional args. */
3
- export declare function resolveTrackAndTask(arg1?: string, arg2?: string): {
4
- track: string;
5
- task?: string;
6
- };
7
- export declare function runArena(track: string, taskId?: string): Promise<void>;
8
- export declare function registerArenaCommand(program: Command): void;
@@ -1,2 +0,0 @@
1
- import type { Command } from 'commander';
2
- export declare function registerBoardCommand(program: Command): void;
@@ -1,9 +0,0 @@
1
- import type { Command } from 'commander';
2
- interface ApiEnvelope {
3
- success?: boolean;
4
- data?: Record<string, unknown>;
5
- }
6
- export declare function computeStart(id: string, replace: boolean): Promise<ApiEnvelope | null>;
7
- export declare function renderStart(id: string, resp: ApiEnvelope | null): void;
8
- export declare function registerChallengeCommand(program: Command): void;
9
- export {};
@@ -1,2 +0,0 @@
1
- export declare function enterMemoScreen(): Promise<void>;
2
- export declare function enterJuryScreen(): Promise<void>;
@@ -1,15 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerConnectCommand(program: Command): void;
3
- export declare function printHttpTargetGuide(id: string, url: string, challenge: {
4
- name?: string;
5
- category?: string;
6
- }): void;
7
- export declare function parseTargetContract(base: string, meta: Record<string, unknown>): {
8
- endpoint: string;
9
- field: string;
10
- } | null;
11
- export declare function eaiArenaTask(challenge: {
12
- name?: string;
13
- category?: string;
14
- }): string | null;
15
- export declare function printEaiArenaGuide(id: string, task: string): void;
@@ -1,3 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function detectFlagFormat(desc: string | undefined): string | null;
3
- export declare function registerCtfCommands(program: Command): void;
@@ -1,4 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function isCtf4aiActive(): boolean;
3
- export declare function handleCtf4aiMessage(input: string): Promise<'continue' | 'exit' | 'solved'>;
4
- export declare function registerCtf4aiDemoCommand(program: Command): void;
@@ -1,34 +0,0 @@
1
- /**
2
- * ctf4eai — Embodied AI security challenge (Paper D, Q41-Q45).
3
- *
4
- * NOTE: public command + all user-facing copy say `ctf4eai` / "Embodied AI"
5
- * since 2026-06-06. The file, internal identifiers (isCtf4VlaActive, etc.) and
6
- * the `ctf4vla` command alias keep the old name for back-compat — renaming
7
- * internals is churn with no user benefit. q.type === 'vla' is server data.
8
- *
9
- * Like ai4ctf and ctf4ai, this is a sub-REPL inside the exam REPL: student
10
- * enters to interrogate a Vision-Language-Action target with text
11
- * instructions and (later) image uploads. The model returns an action
12
- * description; flag is revealed when the action matches the win condition.
13
- *
14
- * Naming sits in the ai4ctf / ctf4ai / ctf4vla series — "ctf4X = attack X".
15
- * Renamed from `vla4ctf` 2026-05-22 to fix the pattern; never typed by
16
- * students directly (entered via exam q 41-45 routing), so the rename is
17
- * a zero-impact rebrand.
18
- *
19
- * Phase 0 backend: mock (server returns deterministic responses based on
20
- * instruction heuristics).
21
- * Phase 2 backend: real ICOA-VLA inference.
22
- *
23
- * Commands inside ctf4vla chat:
24
- * probe "<instruction>" send a custom instruction to the VLA
25
- * image <path> upload a modified image (for adversarial-patch Qs)
26
- * baseline show the default-instruction action
27
- * submit ICOA{...} submit flag for the question
28
- * exit / back return to exam REPL
29
- */
30
- import { Command } from 'commander';
31
- export declare function isCtf4VlaActive(): boolean;
32
- export declare function enterCtf4Vla(qNum: number): boolean;
33
- export declare function handleCtf4VlaMessage(input: string): Promise<'continue' | 'exit'>;
34
- export declare function registerCtf4VlaCommand(program: Command): void;
@@ -1,31 +0,0 @@
1
- /**
2
- * demo2 — Embodied AI Security entry-level walkthrough.
3
- *
4
- * Free, no-token, ~5-minute interactive intro. Three-act structure:
5
- * Act 1: eight cards that nudge the student toward discovery
6
- * (embodied AI / MuJoCo / Franka Panda / generalization gap /
7
- * VLA intro / VLA-vs-LLM / "is VLA right?" open / attack surface)
8
- * Act 2: two story cards (ICOA's ImageNet-moment bet + three-tier curriculum)
9
- * Act 3: live MuJoCo render of real ICOA-VLA on ICOA servers — the
10
- * "you didn't install anything but ran a research VLA" reveal
11
- *
12
- * MCQs are unscored toward gating. Open-ended cards accept any non-empty
13
- * text — they exist to seed reflection, not to test.
14
- * No state file. No server tokens. No audit log.
15
- */
16
- import { Command } from 'commander';
17
- /** 'menu' = jump to the boot menu · 'abort' = leave demo2 only · null = not a leave verb. */
18
- export type LeaveIntent = 'menu' | 'abort' | null;
19
- /**
20
- * Classify a leave verb. The four words used to mean the same thing (relaunch
21
- * the whole CLI), which contradicted both CLAUDE.md "Command Keyword & 防呆
22
- * Design" §4 — quit/exit unwind exactly ONE level, `menu` is the ONLY
23
- * jump-to-root verb — and repl.ts (~line 859), which documents demo2 as
24
- * running IN-PROCESS and returning to `icoa>`.
25
- */
26
- export declare function classifyLeaveWord(input: string): LeaveIntent;
27
- /** True while demo2 is owning input — main REPL's prompt wrapper checks this
28
- * to avoid overwriting demo2's setPrompt() back to "icoa> ". */
29
- export declare function isDemo2Active(): boolean;
30
- export declare function runDemo2(): Promise<void>;
31
- export declare function registerDemo2Command(program: Command): void;
@@ -1,3 +0,0 @@
1
- import type { Command } from 'commander';
2
- export declare function runDemo4(lang?: string): Promise<void>;
3
- export declare function registerDemo4Command(program: Command): void;
@@ -1,3 +0,0 @@
1
- import type { Command } from 'commander';
2
- export declare function runDemo5(lang?: string): Promise<void>;
3
- export declare function registerDemo5Command(program: Command): void;
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerDoctorCommand(program: Command): void;
@@ -1,5 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function probeEnv(): NodeJS.ProcessEnv;
3
- export declare function ensureLocalBinOnPath(): string[];
4
- export declare function resetPyBin(): void;
5
- export declare function registerEnvCommand(program: Command): void;
@@ -1,13 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function presentOptions(q: any): Array<'A' | 'B' | 'C' | 'D' | 'E'>;
3
- export declare function optionText(key: string, q: any): string;
4
- export declare function isShortAnswerQ(q: any): boolean;
5
- export declare function describeComposition(questions: any[], total: number): string;
6
- export declare function isPracticalQ(q: any): boolean;
7
- export declare function extractExamStart(json: any): {
8
- session: any;
9
- questions: any[];
10
- languages: any;
11
- } | null;
12
- export declare function isValidEliminate(toRemove: unknown, q: any, eliminated: string[]): boolean;
13
- export declare function registerExamCommand(program: Command): void;
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerFilesCommand(program: Command): void;
@@ -1 +0,0 @@
1
- export declare function runIoailabStandalone(): Promise<void>;
@@ -1,20 +0,0 @@
1
- /**
2
- * `icoa ipynb [file]` — an in-terminal Python notebook (Phase 1 UI of the CLI
3
- * notebook arena, see `project_cli_notebook_arena_plan`). The free, ungraded
4
- * engine — "a free Colab in your terminal" — and the cell surface the scored
5
- * `arena` will later wrap.
6
- *
7
- * Cell-stepper: the session is a real document. Typed blocks append as cells;
8
- * `cells / show / edit / add / del / run / save` step through them, `edit N`
9
- * hands the terminal to $EDITOR (default vi) for that one cell, `save` writes a
10
- * Jupyter-openable .ipynb. Opening a `.py` splits it on `# %%` markers (the
11
- * arena starter ships with them). Markdown cells are first-class: `add md`
12
- * writes one, `md N`/`py N` convert, and `run`/`show` render them in-terminal
13
- * via md-term (Jupyter semantics — running a markdown cell = rendering it).
14
- *
15
- * Runs against the aienv venv kernel via NotebookKernel (Node ↔ Python bridge).
16
- * Lives in the main REPL using the BUG-008 listener-swap (no second readline).
17
- */
18
- import type { Command } from 'commander';
19
- export declare function registerIpynbCommand(program: Command): void;
20
- export declare function runIpynb(file?: string): Promise<void>;
@@ -1,12 +0,0 @@
1
- import type { Command } from 'commander';
2
- export declare function runKaggle(compArg?: string): Promise<void>;
3
- /** `guide` at the REPL level (also `kaggle guide [comp]`) — reprint the
4
- * competition walkthrough for the downloaded comp. Layer 2 of the two-layer
5
- * guide: `icoa> guide` = competition loop · `icoa ipynb> guide` = notebook. */
6
- export declare function runKaggleGuide(compArg?: string): Promise<void>;
7
- export declare function runKaggleCheck(compArg?: string): Promise<void>;
8
- /** `icoa kaggle submit [comp]` — M2.5: ICOA-judged comps only. Validates
9
- * locally first (fail fast), then the server scores submission.csv against the
10
- * secret test labels and the result lands on the live board. */
11
- export declare function runKaggleSubmit(compArg?: string): Promise<void>;
12
- export declare function registerKaggleCommand(program: Command): void;
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerLangCommand(program: Command): void;
@@ -1,16 +0,0 @@
1
- /**
2
- * `icoa learn <token>` — learn-mode REPL.
3
- *
4
- * Phase 0 scope:
5
- * · LEARNDEMO01 only (10-card free demo, local data)
6
- * · State persisted to ~/.icoa/learn-state.json
7
- * · No server sync, no real VLA backend, no MuJoCo
8
- *
9
- * Phase 1+ adds:
10
- * · EAxxxxxxxx tokens (load curriculum from server)
11
- * · Cross-device progress sync
12
- * · Real ICOA-VLA backend for sim_demo cards
13
- * · MuJoCo viewer launch
14
- */
15
- import { Command } from 'commander';
16
- export declare function registerLearnCommand(program: Command): void;
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerLogCommand(program: Command): void;
@@ -1,25 +0,0 @@
1
- import { Command } from 'commander';
2
- /**
3
- * `note` (verb) + `logbook` (noun) — context-aware contestant solve log.
4
- *
5
- * Inside an active exam (real-exam token present, not demo):
6
- * note text... → adds entry to your contestant logbook, auto-tagged with current question
7
- * note q5 text... → tag explicitly to Q5
8
- * note 5 text... → same
9
- * logbook → view your full logbook
10
- * logbook 5 → filter to Q5
11
- * notes → alias for `logbook`
12
- *
13
- * Outside exam:
14
- * note text... → append timestamped entry to ~/icoa-notes.txt
15
- *
16
- * Naming: `note` is the verb (adding a single entry); `logbook` is the noun
17
- * (the cumulative submission-bound record). Both terms coexist on purpose —
18
- * one is action-oriented, the other is artefact-oriented.
19
- *
20
- * v2.19.189 / v2.19.190: ICO 2026 rulebook §11.2 requires "documentation of
21
- * methodology"; we capture it natively in the CLI so it submits with answers
22
- * and lands in `exam_sessions.notes` server-side. v2.19.190 added the
23
- * `logbook` alias and reworded UX copy.
24
- */
25
- export declare function registerNoteCommand(program: Command): void;
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerRefCommand(program: Command): void;
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerSetupCommand(program: Command): void;
@@ -1,35 +0,0 @@
1
- import { Command } from 'commander';
2
- /**
3
- * Decide which shell to launch. The Docker sandbox is the PREFERRED path (extra
4
- * isolation), but it is OPTIONAL: the 110 CTF tools are installed on the HOST by
5
- * `env setup`, and the `env` doctor explicitly marks docker "optional — not
6
- * needed". So when Docker is absent we must NOT dead-end the user with an
7
- * "install Docker" wall — we drop them into a host shell where every tool they
8
- * need already lives. Pure + testable so the no-docker → host fallback is locked
9
- * by a regression test.
10
- */
11
- export declare function resolveShellLaunch(opts: {
12
- dockerAvailable: boolean;
13
- platform: NodeJS.Platform;
14
- shellEnv?: string;
15
- comspecEnv?: string;
16
- }): {
17
- mode: 'docker' | 'host';
18
- command: string;
19
- };
20
- export { SANDBOX_IMAGES, resolveSandboxImage } from '../lib/sandbox.js';
21
- /**
22
- * docker-run args as an ARRAY (spawnSync — no shell, so a cwd with spaces
23
- * survives untouched). The two mounts are the aienv × docker interlock:
24
- * - cwd → /work: challenge files flow both ways instead of being invisible
25
- * from inside the container (and work done in /work outlives --rm).
26
- * - icoa-aienv named volume → /root/.icoa: docker's copy-up seeds it from the
27
- * image-baked venv on first use, then in-container pip installs survive
28
- * --rm across sessions. Reset anytime: `docker volume rm icoa-aienv`.
29
- */
30
- export declare function buildSandboxRunArgs(opts: {
31
- cwd: string;
32
- image: string;
33
- containerName: string;
34
- }): string[];
35
- export declare function registerShellCommand(program: Command): void;
@@ -1,32 +0,0 @@
1
- /**
2
- * `icoa sim` family — quick-experience entry to the embodied AI track.
3
- *
4
- * icoa sim → pre-baked group dance (no network, no cooldown)
5
- * icoa sim ensemble → alias for the above (group dance)
6
- * icoa sim arm → INTERACTIVE companion-arm joint-test mode:
7
- * user types 6 joint amplitudes (or picks a
8
- * preset), server renders, video opens, repeat.
9
- * Each render uses the 15s countdown + 60s cooldown.
10
- * icoa sim baseline | release | patch | confused
11
- * → original attack-vector demos (server-rendered)
12
- *
13
- * The competition itself is `ctf4vla` (combined attack/defense). The `sim`
14
- * family is the on-ramp: zero-friction wow + a single interactive loop so
15
- * contestants understand "joint vector in → motion out" before they touch
16
- * the real thing.
17
- */
18
- import { Command } from 'commander';
19
- declare const SCENARIOS: Record<string, {
20
- action: Record<string, unknown> | null;
21
- label: string;
22
- hint: string;
23
- hidden?: boolean;
24
- frames?: number;
25
- narrative?: boolean;
26
- bundled?: string;
27
- panda2_pose?: number[];
28
- }>;
29
- export declare function registerSimCommand(program: Command): void;
30
- export { SCENARIOS };
31
- /** Render one scenario, tail-free. Entry point for the hidden card decks. */
32
- export declare function runSimQuiet(scenarioName: string): Promise<void>;
@@ -1,7 +0,0 @@
1
- import type { Command } from 'commander';
2
- export declare function isSprintActive(): boolean;
3
- /**
4
- * Entry point. Hidden keyword → manifesto (first time) → CTF-style list loop.
5
- */
6
- export declare function runSprint(): Promise<void>;
7
- export declare function registerSprintCommand(program: Command): void;
@@ -1,8 +0,0 @@
1
- import type { Command } from 'commander';
2
- /**
3
- * Entry point. `teleload` lists; `teleload <n>` pulls.
4
- * Accepts the number bare, with a `#`, or the pack id itself — a student who
5
- * types what they see on screen should always land somewhere sensible.
6
- */
7
- export declare function runTeleload(arg?: string): Promise<void>;
8
- export declare function registerTeleloadCommand(program: Command): void;
@@ -1,13 +0,0 @@
1
- /**
2
- * `theme` command — toggle terminal color scheme.
3
- *
4
- * Two variants:
5
- * - `dark` (default): Darcula — #2B2B2B bg + #A9B7C6 fg, easy on the eyes.
6
- * - `high-contrast`: pure black bg + pure white fg for low-vision users,
7
- * projectors, and cheap LCDs where Darcula's grays disappear.
8
- *
9
- * Change applies on next `icoa` launch (the current session keeps its paint
10
- * to avoid flicker while students are mid-question).
11
- */
12
- import { Command } from 'commander';
13
- export declare function registerThemeCommand(program: Command): void;
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function registerViewCommand(program: Command): void;
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,14 +0,0 @@
1
- export declare function isFirstRunOrUpgrade(currentVersion: string): boolean;
2
- export declare function markVersionSeen(version: string): void;
3
- export declare function isActivated(): boolean;
4
- export declare function getDeviceFingerprint(): string;
5
- type ActivateResult = 'ok' | 'invalid' | 'already_bound';
6
- export declare function activateToken(token: string): ActivateResult;
7
- export declare function isDeviceMatch(): boolean;
8
- export declare function isFreeCommand(cmd: string): boolean;
9
- export declare function recordExit(): void;
10
- export declare function recordResume(): {
11
- awaySeconds: number;
12
- exitCount: number;
13
- } | null;
14
- export {};
@@ -1,118 +0,0 @@
1
- /**
2
- * aienv — the AI/ML notebook-arena environment (Phase 0 of the CLI notebook
3
- * arena, see `project_cli_notebook_arena_plan`).
4
- *
5
- * This is the PURE, testable core. The orchestration (venv creation, pip
6
- * installs, status rendering) lives in `src/commands/aienv.ts`.
7
- *
8
- * Hard rule (BUG3 / Team Indonesia): aienv provisions its OWN venv under
9
- * ~/.icoa/aienv and NEVER repoints the system python3. It also stays fully
10
- * independent of `env.ts` so the heavy ML stack (jupyter/numpy/torch...) can
11
- * never drag down the lightweight exam-only `env setup` path, and so a broken
12
- * ML install is fault-isolated from the competition toolkit.
13
- */
14
- export type AiGroup = 'core' | 'data' | 'deep' | 'physics';
15
- export interface AiPkg {
16
- /** Display name + the name `pip show` uses. */
17
- name: string;
18
- /** Module name for the `import x` readiness probe. */
19
- import: string;
20
- /** pip install spec (floor-pinned — see note below). */
21
- spec: string;
22
- group: AiGroup;
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;
33
- }
34
- export interface PyVersion {
35
- major: number;
36
- minor: number;
37
- }
38
- export interface AienvPaths {
39
- /** The venv root: <home>/.icoa/aienv */
40
- root: string;
41
- /** Directory holding the venv executables (bin on posix, Scripts on win). */
42
- binDir: string;
43
- /** Absolute path to the venv's python interpreter. */
44
- python: string;
45
- /** Absolute path to the venv's pip. */
46
- pip: string;
47
- /** Manifest written after a successful setup — records python version + groups. */
48
- marker: string;
49
- }
50
- export declare const REQUIRED_PY: PyVersion;
51
- export declare const AIENV_MARKER_VERSION = 2;
52
- /**
53
- * ML stack for the notebook arena.
54
- *
55
- * Versions are FLOOR-pinned (`>=`), not exact-pinned like the CTF toolkit in
56
- * env.ts. The scientific/ML stack ships platform- and arch-specific wheels that
57
- * churn fast; exact pins across macOS/Linux/WSL × x64/arm64 routinely fail wheel
58
- * resolution. Phase 0 only provisions — fairness-critical determinism lives
59
- * server-side on the (fixed-model) GPU box, not in the student's local venv.
60
- *
61
- * - core: the Jupyter kernel-protocol foundation Phase 1's cell loop talks to.
62
- * - data: the everyday data-science stack students compute with on CPU.
63
- * - deep: multi-GB DL stack — OPT-IN via `aienv setup --deep` only. Under the
64
- * fixed-model GPU design, most students call the server's inference API and
65
- * never need torch locally, so it must not be in the default footprint.
66
- */
67
- export declare const AIENV_PACKAGES: AiPkg[];
68
- export declare function packagesForGroups(groups: AiGroup[]): AiPkg[];
69
- /** Compute the venv paths for a given home directory + platform. */
70
- export declare function aienvPaths(home: string, plat?: NodeJS.Platform): AienvPaths;
71
- /**
72
- * Absolute path to the icoa-provisioned standalone CPython 3.12. `env setup`
73
- * installs a relocatable python-build-standalone build here ONLY on Linux
74
- * distros where neither apt nor the Ubuntu deadsnakes PPA can deliver 3.12
75
- * (e.g. Kali / non-Ubuntu Debian). Side-by-side: the system python3 is never
76
- * touched. On the four already-supported platforms this path simply never
77
- * exists, so probing it is a no-op.
78
- */
79
- export declare function icoaStandalonePython(home: string, plat?: NodeJS.Platform): string;
80
- /**
81
- * Ordered host-python candidates to build the venv from. We probe a versioned
82
- * 3.12 BEFORE the bare `python3` so we don't accidentally seed the venv with a
83
- * distro 3.10 when a 3.12 is present. We never touch the system python3 beyond
84
- * reading its --version.
85
- *
86
- * When `home` is given, the icoa-provisioned standalone 3.12 (Kali / non-Ubuntu
87
- * Debian — see icoaStandalonePython) is probed right after the on-PATH
88
- * `python3.12` and before the distro `python3`. Omitting `home` (the default,
89
- * and what the unit tests use) leaves the candidate list byte-identical to
90
- * before, so the four working platforms are unaffected.
91
- */
92
- export declare function hostPythonCandidates(plat?: NodeJS.Platform, home?: string): string[];
93
- /** Parse `Python 3.12.13` → {major:3, minor:12}. Tolerant of trailing newline. */
94
- export declare function parsePyVersion(out: string | null | undefined): PyVersion | null;
95
- /** True if `v` is at least `min` (major-then-minor comparison). */
96
- export declare function meetsMinPy(v: PyVersion, min: PyVersion): boolean;
97
- export interface HostPython {
98
- cmd: string;
99
- version: PyVersion;
100
- }
101
- /**
102
- * Resolve the best host python to create the venv from.
103
- *
104
- * `probe(cmd)` runs `cmd --version` and returns its stdout (or null if the
105
- * command is absent / errored) — injected so this stays pure + testable.
106
- *
107
- * Returns the first interpreter on the locked 3.12 line (any patch); otherwise
108
- * null. We deliberately do NOT fall back to 3.10 / 3.11 / 3.13 — a uniform 3.12
109
- * cohort is the whole point (see REQUIRED_PY). The caller surfaces an actionable
110
- * "install Python 3.12" message when this is null.
111
- */
112
- export declare function resolveHostPython(probe: (cmd: string) => string | null, plat?: NodeJS.Platform, home?: string): HostPython | null;
113
- /**
114
- * Build the readiness probe for one package, run via the VENV python (absolute
115
- * path) — never the system python3. Mirrors env.ts's `python3 -c "import x"`
116
- * convention but always targets the venv interpreter.
117
- */
118
- export declare function importCheckCmd(venvPython: string, pkg: AiPkg): string;
@@ -1,55 +0,0 @@
1
- /**
2
- * How a contest solution came to exist — typed, or pasted in.
3
- *
4
- * The existing input-dynamics observer watches the readline prompt, which is
5
- * the WRONG surface here: contest code is written inside vi, so at `/submit 3`
6
- * it would only report how the five characters "submit 3" were typed. The
7
- * signal that actually answers the question lives in the editor session —
8
- * how long the editor was open against how much the file grew.
9
- *
10
- * A person types on the order of 5–10 bytes/second sustained. A paste lands
11
- * thousands of bytes in the time it takes to release the key. That ratio is
12
- * the whole measurement, and it needs no keystroke content at all: this module
13
- * records byte counts and durations, never a single character of what was
14
- * written. Same discipline as input-dynamics.ts — aggregate counters only.
15
- *
16
- * Detective, never preventive: a high ratio is a reason for a human to look,
17
- * not a verdict, and nothing here gates a submission.
18
- */
19
- export type EditDynamics = {
20
- /** How many times the editor was opened for this problem. */
21
- editSessions: number;
22
- /** Total milliseconds the editor was open. */
23
- editMs: number;
24
- /** Size of the solution file when last seen, in bytes. */
25
- bytesFinal: number;
26
- /** Net growth across all sessions (can be negative if they deleted). */
27
- bytesAdded: number;
28
- /**
29
- * Fastest sustained growth seen in any single session, bytes/second.
30
- * The paste fingerprint: sustained human typing sits in single digits.
31
- */
32
- maxBytesPerSec: number;
33
- /** Self-checks (`/run`) before submitting — pasted answers often get none. */
34
- runs: number;
35
- };
36
- export declare function emptyDynamics(): EditDynamics;
37
- /**
38
- * Fold one finished editor session into the accumulator.
39
- *
40
- * `ms` under a second is treated as one second for the rate, so opening and
41
- * closing the editor instantly cannot manufacture an infinite rate — and a
42
- * session that added nothing never moves the maximum.
43
- */
44
- export declare function foldEditSession(prev: EditDynamics, session: {
45
- ms: number;
46
- bytesBefore: number;
47
- bytesAfter: number;
48
- }): EditDynamics;
49
- export declare function noteRun(prev: EditDynamics): EditDynamics;
50
- /**
51
- * Nothing observed at all — a solution that appeared without the editor ever
52
- * being opened (written by an external editor, or dropped in as a file). Worth
53
- * distinguishing from "typed fast", so the server stores the difference.
54
- */
55
- export declare function isEmpty(d: EditDynamics): boolean;
@@ -1,23 +0,0 @@
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;
@@ -1,9 +0,0 @@
1
- export declare const ICOA_BIG: readonly string[];
2
- /**
3
- * Ready-to-print logo lines, bold white, indented by `indent`.
4
- *
5
- * Degrades to a one-line wordmark when the terminal is too narrow for the block
6
- * art (Chromebook split-screen / narrow WSL pane), so it never overflow-wraps.
7
- * 60 cols is the rich-display floor from the cross-platform baseline.
8
- */
9
- export declare function icoaBannerLines(indent?: string): string[];