ixentbench 1.0.0__tar.gz

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,208 @@
1
+ Metadata-Version: 2.4
2
+ Name: ixentbench
3
+ Version: 1.0.0
4
+ Summary: The AI benchmark beyond memorization — Causal spatial reasoning at 4×10⁸⁵ scale
5
+ Author-email: iXentLabs <contact@ixentlabs.com>
6
+ License-Expression: LicenseRef-Proprietary
7
+ Project-URL: Homepage, https://ixentlabs.com
8
+ Project-URL: Repository, https://github.com/ixentlabs/ixentbench
9
+ Project-URL: Documentation, https://github.com/ixentlabs/ixentbench#readme
10
+ Keywords: ai,benchmark,reasoning,llm,evaluation
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ Requires-Dist: click>=8.1
22
+ Requires-Dist: requests>=2.31
23
+ Requires-Dist: python-dotenv>=1.0
24
+ Requires-Dist: google-genai>=1.0
25
+ Requires-Dist: google-auth>=2.28
26
+ Requires-Dist: google-auth-oauthlib>=1.2
27
+ Provides-Extra: anthropic
28
+ Requires-Dist: anthropic>=0.25; extra == "anthropic"
29
+ Provides-Extra: openai
30
+ Requires-Dist: openai>=1.30; extra == "openai"
31
+
32
+ # iXentBench — The AI Benchmark Beyond Memorization
33
+
34
+ Causal spatial reasoning at 4×10⁸⁵ scale, powered by **Caps i Caps** — the game that makes memorization impossible.
35
+ Developed by [iXentLabs](https://ixentlabs.com) (iXent Games S.L.)
36
+
37
+ ---
38
+
39
+ ## Installation
40
+
41
+ ```bash
42
+ pip install ixentbench
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Quick Start
48
+
49
+ **1. Configure your session** at [ixentlabs.com](https://ixentlabs.com)
50
+ Login with Google, select benchmark type, level and AI model.
51
+ Download your `.env` file and add your API Key.
52
+
53
+ **2. Run your session:**
54
+
55
+ ```bash
56
+ ixentbench play --session YOUR_SESSION_ID
57
+ ```
58
+
59
+ The visualizer opens automatically in your browser.
60
+
61
+ ---
62
+
63
+ ## Play Modes
64
+
65
+ There are four ways to play iXentBench, designed for every type of participant — from AI engineers to pure mathematicians and AI enthusiasts.
66
+
67
+ | Flag | A — BYOK | B — Local Model | C — Custom Agent | D — Sponsored |
68
+ |---|---|---|---|---|
69
+ | Uses LLM | ✅ Cloud API | ✅ Local | ❌ Pure code | ✅ iXentLabs |
70
+ | API Key needed | ✅ Yours | ❌ No | ❌ No | ❌ No |
71
+ | `--prompt-file` (optional) | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
72
+ | `--strategy-file` (optional)| ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
73
+
74
+ ---
75
+
76
+ ### A — BYOK (Bring Your Own Key)
77
+ Use your own API Key from Gemini, Claude, GPT, ...
78
+ Your key **never leaves your machine** — it is read locally and never sent to our servers.
79
+
80
+ ```bash
81
+ ixentbench play --session IQWUWP
82
+ ```
83
+
84
+ `.env` file:
85
+ ```
86
+ GOOGLE_API_KEY=your_key_here
87
+ ```
88
+
89
+ ---
90
+
91
+ ### B — Local Open Source Model
92
+ Run any open source model (Llama, Mistral, Qwen...) locally using Ollama, LM Studio or llama.cpp.
93
+ No API Key required. Full privacy — no data leaves your machine.
94
+ ⚠️ Inference speed metrics are excluded from global leaderboards (hardware-dependent).
95
+
96
+ ```bash
97
+ # First start your local model, then:
98
+ ixentbench play --session IQWUWP --local-url http://localhost:11434/v1
99
+ ```
100
+
101
+ ---
102
+
103
+ ### C — Custom Agent Script
104
+ For engineers and researchers who want to solve iXentBench using **pure code** — no LLM required.
105
+ Write your own Python script using any algorithm you choose: Minimax, MCTS, A*, heuristics, neural networks trained from scratch — anything goes.
106
+
107
+ Your script receives the full board state via `stdin` (JSON) and must return a move via `stdout` (JSON). It runs entirely on your machine.
108
+
109
+ ```bash
110
+ ixentbench play --session IQWUWP --agent-script ./my_agent.py
111
+ ```
112
+
113
+ Your script must output:
114
+ ```json
115
+ {"command": "G4@P21(b=0)+90", "reasoning": "Explanation of your decision"}
116
+ ```
117
+
118
+ > 💡 **Tip:** Even if your agent uses pure code, we strongly recommend adding a `--strategy-file` to explain your approach. Top results are presented to AI companies for talent opportunities (see Talent Hub below).
119
+
120
+ ---
121
+
122
+ ### D — iXentLabs Sponsored
123
+ Select "Use iXentLabs credits" on the web — we provide the API Key.
124
+ No `.env` file needed. The cloud handles everything.
125
+
126
+ ```bash
127
+ ixentbench play --session IQWUWP
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Arena Mode (Multiplayer)
133
+
134
+ ```bash
135
+ # Create a room (you become the host)
136
+ ixentbench arena create --mode 4v4 --level 2
137
+
138
+ # Join an existing room
139
+ ixentbench arena join --room IXENT-4X7K
140
+ ```
141
+
142
+ Supported modes: `1v1`, `2v2`, `4v4`, `human` (Human vs AI).
143
+
144
+ ---
145
+
146
+ ## Prompt Injection & Strategy Files
147
+
148
+ ### Prompt Injection (`--prompt-file`) — Optional
149
+ Inject your own strategic prompt directly into the AI's System Prompt before the game starts.
150
+ Applies to modes **A, B and D** (LLM-based). Not applicable to mode C.
151
+
152
+ ```bash
153
+ ixentbench play --session IQWUWP --prompt-file my_prompt.txt
154
+ ```
155
+
156
+ > 💡 A well-crafted Prompt Injection can dramatically improve your AI's performance. Experiment freely — your injection is recorded alongside your results.
157
+
158
+ ### Strategy File (`--strategy-file`) — Optional
159
+ A written description of your approach — how you designed your agent, what techniques you used, what insights guided your decisions.
160
+ **It is never sent to the AI.** It is stored securely and linked to your results for the Talent Hub.
161
+
162
+ Applies to **all modes (A, B, C and D)**.
163
+
164
+ ```bash
165
+ ixentbench play --session IQWUWP --strategy-file my_strategy.txt
166
+ ```
167
+
168
+ > 💡 We strongly recommend always adding a Strategy File, especially for Custom Agents (mode C). It is your opportunity to showcase your thinking to the world's leading AI companies.
169
+
170
+ ---
171
+
172
+ ## 🏆 iXentLabs Talent Hub
173
+
174
+ iXentBench is more than a benchmark — it is a **talent discovery platform**.
175
+
176
+ With your explicit prior consent, iXentLabs will present the top results of each benchmark category to leading AI companies and research labs. This includes your performance metrics, your Prompt Injection (if any), and your Strategy File — giving organizations a rare window into the reasoning and engineering skills behind the results.
177
+
178
+ > Your personal data (name, email, payment details) is always protected and never shared.
179
+ > Only anonymized benchmark data is presented, identified solely by your chosen nickname and avatar, unless you opt in to full visibility.
180
+
181
+ If you achieve an exceptional result and want your work to be seen by the teams building the future of AI — **iXentBench is your stage**.
182
+
183
+ ---
184
+
185
+ ## Utility Commands
186
+
187
+ ```bash
188
+ ixentbench login # Force Google re-authentication
189
+ ixentbench status # Show credentials and session status
190
+ ixentbench prompts list # List your locally saved prompt files
191
+ ixentbench --version # Show version
192
+ ```
193
+
194
+ ---
195
+
196
+ ## Security
197
+
198
+ - API Keys are **always read from your local `.env`** — never passed as arguments
199
+ - Google authentication uses **OAuth 2.0** — credentials saved locally in `~/ixentbench/`
200
+ - Game data (moves, reasoning, metrics) is stored by iXentLabs per our [Terms of Service](https://ixentlabs.com/terms)
201
+ - Personal data (name, email) is protected per [Privacy Policy](https://ixentlabs.com/privacy)
202
+
203
+ ---
204
+
205
+ ## License
206
+
207
+ Proprietary — © 2026 iXentLabs (iXent Games S.L.)
208
+ Contact: contact@ixentlabs.com
@@ -0,0 +1,177 @@
1
+ # iXentBench — The AI Benchmark Beyond Memorization
2
+
3
+ Causal spatial reasoning at 4×10⁸⁵ scale, powered by **Caps i Caps** — the game that makes memorization impossible.
4
+ Developed by [iXentLabs](https://ixentlabs.com) (iXent Games S.L.)
5
+
6
+ ---
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ pip install ixentbench
12
+ ```
13
+
14
+ ---
15
+
16
+ ## Quick Start
17
+
18
+ **1. Configure your session** at [ixentlabs.com](https://ixentlabs.com)
19
+ Login with Google, select benchmark type, level and AI model.
20
+ Download your `.env` file and add your API Key.
21
+
22
+ **2. Run your session:**
23
+
24
+ ```bash
25
+ ixentbench play --session YOUR_SESSION_ID
26
+ ```
27
+
28
+ The visualizer opens automatically in your browser.
29
+
30
+ ---
31
+
32
+ ## Play Modes
33
+
34
+ There are four ways to play iXentBench, designed for every type of participant — from AI engineers to pure mathematicians and AI enthusiasts.
35
+
36
+ | Flag | A — BYOK | B — Local Model | C — Custom Agent | D — Sponsored |
37
+ |---|---|---|---|---|
38
+ | Uses LLM | ✅ Cloud API | ✅ Local | ❌ Pure code | ✅ iXentLabs |
39
+ | API Key needed | ✅ Yours | ❌ No | ❌ No | ❌ No |
40
+ | `--prompt-file` (optional) | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
41
+ | `--strategy-file` (optional)| ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
42
+
43
+ ---
44
+
45
+ ### A — BYOK (Bring Your Own Key)
46
+ Use your own API Key from Gemini, Claude, GPT, ...
47
+ Your key **never leaves your machine** — it is read locally and never sent to our servers.
48
+
49
+ ```bash
50
+ ixentbench play --session IQWUWP
51
+ ```
52
+
53
+ `.env` file:
54
+ ```
55
+ GOOGLE_API_KEY=your_key_here
56
+ ```
57
+
58
+ ---
59
+
60
+ ### B — Local Open Source Model
61
+ Run any open source model (Llama, Mistral, Qwen...) locally using Ollama, LM Studio or llama.cpp.
62
+ No API Key required. Full privacy — no data leaves your machine.
63
+ ⚠️ Inference speed metrics are excluded from global leaderboards (hardware-dependent).
64
+
65
+ ```bash
66
+ # First start your local model, then:
67
+ ixentbench play --session IQWUWP --local-url http://localhost:11434/v1
68
+ ```
69
+
70
+ ---
71
+
72
+ ### C — Custom Agent Script
73
+ For engineers and researchers who want to solve iXentBench using **pure code** — no LLM required.
74
+ Write your own Python script using any algorithm you choose: Minimax, MCTS, A*, heuristics, neural networks trained from scratch — anything goes.
75
+
76
+ Your script receives the full board state via `stdin` (JSON) and must return a move via `stdout` (JSON). It runs entirely on your machine.
77
+
78
+ ```bash
79
+ ixentbench play --session IQWUWP --agent-script ./my_agent.py
80
+ ```
81
+
82
+ Your script must output:
83
+ ```json
84
+ {"command": "G4@P21(b=0)+90", "reasoning": "Explanation of your decision"}
85
+ ```
86
+
87
+ > 💡 **Tip:** Even if your agent uses pure code, we strongly recommend adding a `--strategy-file` to explain your approach. Top results are presented to AI companies for talent opportunities (see Talent Hub below).
88
+
89
+ ---
90
+
91
+ ### D — iXentLabs Sponsored
92
+ Select "Use iXentLabs credits" on the web — we provide the API Key.
93
+ No `.env` file needed. The cloud handles everything.
94
+
95
+ ```bash
96
+ ixentbench play --session IQWUWP
97
+ ```
98
+
99
+ ---
100
+
101
+ ## Arena Mode (Multiplayer)
102
+
103
+ ```bash
104
+ # Create a room (you become the host)
105
+ ixentbench arena create --mode 4v4 --level 2
106
+
107
+ # Join an existing room
108
+ ixentbench arena join --room IXENT-4X7K
109
+ ```
110
+
111
+ Supported modes: `1v1`, `2v2`, `4v4`, `human` (Human vs AI).
112
+
113
+ ---
114
+
115
+ ## Prompt Injection & Strategy Files
116
+
117
+ ### Prompt Injection (`--prompt-file`) — Optional
118
+ Inject your own strategic prompt directly into the AI's System Prompt before the game starts.
119
+ Applies to modes **A, B and D** (LLM-based). Not applicable to mode C.
120
+
121
+ ```bash
122
+ ixentbench play --session IQWUWP --prompt-file my_prompt.txt
123
+ ```
124
+
125
+ > 💡 A well-crafted Prompt Injection can dramatically improve your AI's performance. Experiment freely — your injection is recorded alongside your results.
126
+
127
+ ### Strategy File (`--strategy-file`) — Optional
128
+ A written description of your approach — how you designed your agent, what techniques you used, what insights guided your decisions.
129
+ **It is never sent to the AI.** It is stored securely and linked to your results for the Talent Hub.
130
+
131
+ Applies to **all modes (A, B, C and D)**.
132
+
133
+ ```bash
134
+ ixentbench play --session IQWUWP --strategy-file my_strategy.txt
135
+ ```
136
+
137
+ > 💡 We strongly recommend always adding a Strategy File, especially for Custom Agents (mode C). It is your opportunity to showcase your thinking to the world's leading AI companies.
138
+
139
+ ---
140
+
141
+ ## 🏆 iXentLabs Talent Hub
142
+
143
+ iXentBench is more than a benchmark — it is a **talent discovery platform**.
144
+
145
+ With your explicit prior consent, iXentLabs will present the top results of each benchmark category to leading AI companies and research labs. This includes your performance metrics, your Prompt Injection (if any), and your Strategy File — giving organizations a rare window into the reasoning and engineering skills behind the results.
146
+
147
+ > Your personal data (name, email, payment details) is always protected and never shared.
148
+ > Only anonymized benchmark data is presented, identified solely by your chosen nickname and avatar, unless you opt in to full visibility.
149
+
150
+ If you achieve an exceptional result and want your work to be seen by the teams building the future of AI — **iXentBench is your stage**.
151
+
152
+ ---
153
+
154
+ ## Utility Commands
155
+
156
+ ```bash
157
+ ixentbench login # Force Google re-authentication
158
+ ixentbench status # Show credentials and session status
159
+ ixentbench prompts list # List your locally saved prompt files
160
+ ixentbench --version # Show version
161
+ ```
162
+
163
+ ---
164
+
165
+ ## Security
166
+
167
+ - API Keys are **always read from your local `.env`** — never passed as arguments
168
+ - Google authentication uses **OAuth 2.0** — credentials saved locally in `~/ixentbench/`
169
+ - Game data (moves, reasoning, metrics) is stored by iXentLabs per our [Terms of Service](https://ixentlabs.com/terms)
170
+ - Personal data (name, email) is protected per [Privacy Policy](https://ixentlabs.com/privacy)
171
+
172
+ ---
173
+
174
+ ## License
175
+
176
+ Proprietary — © 2026 iXentLabs (iXent Games S.L.)
177
+ Contact: contact@ixentlabs.com
@@ -0,0 +1,4 @@
1
+ # -*- coding: utf-8 -*-
2
+ __version__ = "1.0.0"
3
+ __author__ = "iXentLabs (iXent Games SL)"
4
+ __email__ = "antoniguasch@ixentgames.com"
@@ -0,0 +1,66 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ ixentbench/arena.py
4
+ Modo Arena — esqueleto completo listo para activar
5
+ cuando ixent-arena esté desplegado en Google Cloud Run.
6
+ """
7
+
8
+ import click
9
+ import requests
10
+ from ixentbench.auth import get_firebase_token
11
+ from ixentbench.config import IXENT_SDK_URL, validate_env
12
+
13
+
14
+ def create_room(mode: str, level: int):
15
+ """Crea una sala Arena y espera a los demás jugadores."""
16
+ validate_env()
17
+ click.echo(f"\n🎮 Creating Arena room — Mode: {mode.upper()} | Level: {level}")
18
+
19
+ jwt = get_firebase_token()
20
+ headers = {"X-Firebase-Token": jwt, "Content-Type": "application/json"}
21
+
22
+ resp = requests.post(f"{IXENT_SDK_URL}/arena/create", headers=headers, json={
23
+ "mode": mode,
24
+ "level": level,
25
+ }, timeout=30)
26
+
27
+ if not resp.ok:
28
+ click.echo(f"❌ Error creating room: {resp.text}", err=True)
29
+ raise SystemExit(1)
30
+
31
+ data = resp.json()
32
+ room_code = data.get("room_code")
33
+
34
+ click.echo(f"\n✅ Room created!")
35
+ click.echo(f" Code: {room_code}")
36
+ click.echo(f"\n Share this code with your opponents:")
37
+ click.echo(f" ixentbench arena join --room {room_code}\n")
38
+ click.echo("⏳ Waiting for players to join...")
39
+
40
+ # TODO: polling hasta que todos estén listos + arranque automático
41
+ # Se implementa cuando ixent-arena esté desplegado en GCP
42
+ click.echo("\n⚠️ Arena multiplayer — coming soon!")
43
+
44
+
45
+ def join_room(room_code: str):
46
+ """Se une a una sala Arena existente."""
47
+ validate_env()
48
+ click.echo(f"\n🎮 Joining Arena room: {room_code}")
49
+
50
+ jwt = get_firebase_token()
51
+ headers = {"X-Firebase-Token": jwt, "Content-Type": "application/json"}
52
+
53
+ resp = requests.post(f"{IXENT_SDK_URL}/arena/join", headers=headers, json={
54
+ "room_code": room_code,
55
+ }, timeout=30)
56
+
57
+ if not resp.ok:
58
+ click.echo(f"❌ Error joining room: {resp.text}", err=True)
59
+ raise SystemExit(1)
60
+
61
+ data = resp.json()
62
+ click.echo(f"✅ Joined room {room_code} as {data.get('player_slot', '?')}")
63
+ click.echo("⏳ Waiting for host to start the game...")
64
+
65
+ # TODO: escucha de inicio + game loop Arena
66
+ click.echo("\n⚠️ Arena multiplayer — coming soon!")
@@ -0,0 +1,85 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ ixentbench/auth.py
4
+ Google OAuth → Firebase JWT.
5
+ Primera ejecución: abre el navegador para Sign in with Google.
6
+ Siguientes ejecuciones: refresco silencioso desde credentials.json
7
+ """
8
+
9
+ import requests
10
+ import click
11
+ from google_auth_oauthlib.flow import InstalledAppFlow
12
+ from google.oauth2.credentials import Credentials
13
+ from google.auth.transport.requests import Request
14
+ from ixentbench.config import (
15
+ CREDENTIALS, FIREBASE_API_KEY,
16
+ OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET
17
+ )
18
+
19
+ SCOPES = ["openid", "https://www.googleapis.com/auth/userinfo.email"]
20
+
21
+
22
+ def get_firebase_token() -> str:
23
+ """
24
+ Devuelve un Firebase ID Token válido (1h).
25
+ Gestiona automáticamente el ciclo de vida de las credenciales.
26
+ """
27
+ creds = None
28
+
29
+ if CREDENTIALS.exists():
30
+ try:
31
+ creds = Credentials.from_authorized_user_file(str(CREDENTIALS), SCOPES)
32
+ except Exception:
33
+ creds = None # Credenciales corruptas — re-autenticar
34
+
35
+ if not creds or not creds.valid:
36
+ if creds and creds.expired and creds.refresh_token:
37
+ try:
38
+ creds.refresh(Request())
39
+ except Exception:
40
+ creds = None # Token revocado — re-autenticar
41
+
42
+ if not creds:
43
+ flow = InstalledAppFlow.from_client_config(
44
+ {
45
+ "installed": {
46
+ "client_id": OAUTH_CLIENT_ID,
47
+ "client_secret": OAUTH_CLIENT_SECRET,
48
+ "redirect_uris": ["urn:ietf:wg:oauth:2.0:oob", "http://localhost"],
49
+ "auth_uri": "https://accounts.google.com/o/oauth2/auth",
50
+ "token_uri": "https://oauth2.googleapis.com/token",
51
+ }
52
+ },
53
+ SCOPES
54
+ )
55
+ creds = flow.run_local_server(port=0, open_browser=True)
56
+
57
+ CREDENTIALS.parent.mkdir(parents=True, exist_ok=True)
58
+ CREDENTIALS.write_text(creds.to_json())
59
+
60
+ # Intercambiar Google token → Firebase ID token
61
+ url = (
62
+ f"https://identitytoolkit.googleapis.com/v1/"
63
+ f"accounts:signInWithIdp?key={FIREBASE_API_KEY}"
64
+ )
65
+ resp = requests.post(url, json={
66
+ "postBody": f"access_token={creds.token}&providerId=google.com",
67
+ "requestUri": "http://localhost",
68
+ "returnSecureToken": True,
69
+ "returnIdpCredential": True,
70
+ }, timeout=15)
71
+ resp.raise_for_status()
72
+ return resp.json().get("idToken")
73
+
74
+
75
+ def force_login():
76
+ """Elimina las credenciales guardadas y fuerza re-autenticación."""
77
+ if CREDENTIALS.exists():
78
+ CREDENTIALS.unlink()
79
+ click.echo("🗑️ Credentials cleared.")
80
+ click.echo("🔐 Opening browser for Google Sign-In...")
81
+ token = get_firebase_token()
82
+ if token:
83
+ click.echo("✅ Login successful. Credentials saved.")
84
+ else:
85
+ click.echo("❌ Login failed.", err=True)
@@ -0,0 +1,103 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ ixentbench/cli.py
4
+ Punto de entrada CLI — comando `ixentbench`
5
+ """
6
+
7
+ import click
8
+ from ixentbench import __version__
9
+
10
+
11
+ @click.group()
12
+ @click.version_option(version=__version__, prog_name="ixentbench")
13
+ def main():
14
+ """
15
+ iXentBench — The AI benchmark beyond memorization.
16
+
17
+ Causal spatial reasoning at 4×10⁸⁵ scale.
18
+ Developed by iXentLabs (iXent Games S.L.)
19
+ """
20
+ pass
21
+
22
+
23
+ # =============================================================================
24
+ # ixentbench play
25
+ # =============================================================================
26
+ @main.command()
27
+ @click.option("--session", required=True, help="Session ID from iXentLabs web portal")
28
+ @click.option("--prompt-file", default=None, help="Prompt Injection .txt (added to SYSTEM PROMPT)")
29
+ @click.option("--strategy-file", default=None, help="Strategy .txt (logged for Talent Hub, NOT sent to AI)")
30
+ @click.option("--local-url", default=None, help="Local model URL — e.g. http://localhost:11434/v1")
31
+ @click.option("--agent-script", default=None, help="Custom agent .py script path")
32
+ def play(session, prompt_file, strategy_file, local_url, agent_script):
33
+ """Run iXentBench Solo (BYOK, Local model, Custom agent or Sponsored)."""
34
+ from ixentbench.play import run_play
35
+ run_play(
36
+ session_id = session,
37
+ prompt_file = prompt_file,
38
+ strategy_file = strategy_file,
39
+ local_url = local_url,
40
+ agent_script = agent_script,
41
+ )
42
+
43
+
44
+ # =============================================================================
45
+ # ixentbench arena
46
+ # =============================================================================
47
+ @main.group()
48
+ def arena():
49
+ """iXentBench Arena — Multiplayer mode (1v1, 2v2, 4v4, Human vs AI)."""
50
+ pass
51
+
52
+
53
+ @arena.command("create")
54
+ @click.option("--mode", default="1v1",
55
+ type=click.Choice(["1v1", "2v2", "4v4", "human"], case_sensitive=False),
56
+ help="Game mode")
57
+ @click.option("--level", default=1, type=click.IntRange(1, 4), help="Level (1-4)")
58
+ def arena_create(mode, level):
59
+ """Create a new Arena room. You become the host."""
60
+ from ixentbench.arena import create_room
61
+ create_room(mode=mode, level=level)
62
+
63
+
64
+ @arena.command("join")
65
+ @click.option("--room", required=True, help="Room code — e.g. IXENT-4X7K")
66
+ def arena_join(room):
67
+ """Join an existing Arena room."""
68
+ from ixentbench.arena import join_room
69
+ join_room(room_code=room)
70
+
71
+
72
+ # =============================================================================
73
+ # ixentbench login / status / prompts
74
+ # =============================================================================
75
+ @main.command()
76
+ def login():
77
+ """Force Google re-authentication."""
78
+ from ixentbench.auth import force_login
79
+ force_login()
80
+
81
+
82
+ @main.command()
83
+ def status():
84
+ """Show current credentials and session status."""
85
+ from ixentbench.config import show_status
86
+ show_status()
87
+
88
+
89
+ @main.group()
90
+ def prompts():
91
+ """Manage your saved Prompt Injection files."""
92
+ pass
93
+
94
+
95
+ @prompts.command("list")
96
+ def prompts_list():
97
+ """List all saved prompt injection files."""
98
+ from ixentbench.config import list_prompts
99
+ list_prompts()
100
+
101
+
102
+ if __name__ == "__main__":
103
+ main()