pokertools-arena 0.17.0 → 0.18.0
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/.env.example +2 -0
- package/README.md +8 -1
- package/bin/pokertools-arena.mjs +1 -23
- package/dist/app.js +425 -290
- package/dist/index.html +10 -10
- package/dist/pokertools-arena.html +406 -271
- package/dist/styles.css +1 -1
- package/docs/diagnostics/SUMMARY.md +3 -5
- package/docs/diagnostics/summary.json +1 -1
- package/docs/releases/RELEASE_NOTES.md +40 -0
- package/package.json +2 -2
- package/src/app.js +137 -36
- package/src/benchmark/scenarios.js +4 -10
- package/src/index.html +10 -10
- package/src/lib/decision-core.js +25 -1
- package/src/styles.css +1 -1
package/.env.example
CHANGED
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
| **Package** | `npx pokertools-arena` |
|
|
18
18
|
| **Runtime** | Node.js ≥ 24 for tooling; any modern browser for the app |
|
|
19
19
|
|
|
20
|
-
> **Current release: 0.
|
|
20
|
+
> **Current release: 0.18.0.** This maintenance release centralizes environment parsing and benchmark constants, makes release artifacts reproducible, fixes archive and cache-version drift, and improves keyboard and screen-reader behavior.
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
@@ -83,6 +83,9 @@ The CLI starts a tiny local static server and opens the browser. It exists only
|
|
|
83
83
|
| `--chrome` | off | Open Google Chrome specifically. |
|
|
84
84
|
| `--no-open` | off | Do not launch a browser. |
|
|
85
85
|
| `--no-env` | off | Ignore `.env` bootstrap. |
|
|
86
|
+
| `--autostart` | off | Start the configured tournament after launch. |
|
|
87
|
+
| `--starting-stack <n>` | `3000` | Override the chip stack for `.env` seats. |
|
|
88
|
+
| `--max-decisions <n>` | unlimited | Stop after this many model decisions. |
|
|
86
89
|
| `--help`, `-h` | — | Print usage. |
|
|
87
90
|
|
|
88
91
|
### Option B — single HTML file
|
|
@@ -120,6 +123,8 @@ OPENAI_PLAYER1=google/gemma-4-26b-a4b-it
|
|
|
120
123
|
OPENAI_PLAYER2=qwen/qwen3.8-flash
|
|
121
124
|
OPENAI_PLAYER3=typesafe/jev-1.13
|
|
122
125
|
OPENAI_STARTING_STACK=3000
|
|
126
|
+
OPENAI_AUTOSTART=0
|
|
127
|
+
OPENAI_MAX_DECISIONS=0
|
|
123
128
|
```
|
|
124
129
|
|
|
125
130
|
| Variable | Notes |
|
|
@@ -128,6 +133,8 @@ OPENAI_STARTING_STACK=3000
|
|
|
128
133
|
| `OPENAI_API_KEY` | Optional for local/unauthenticated endpoints. |
|
|
129
134
|
| `OPENAI_PLAYER1` … `OPENAI_PLAYER10` | Each value seats one model; Jev models auto-route to Decisions on OpenRouter. |
|
|
130
135
|
| `OPENAI_STARTING_STACK` | Chip stack per seat (minimum 100, default 3000). |
|
|
136
|
+
| `OPENAI_AUTOSTART` | Set to `1`, `true`, `yes`, or `on` to start automatically. |
|
|
137
|
+
| `OPENAI_MAX_DECISIONS` | Optional tournament decision limit (`0` means unlimited). |
|
|
131
138
|
|
|
132
139
|
See [`.env.example`](./.env.example).
|
|
133
140
|
|
package/bin/pokertools-arena.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import { readFile, stat } from 'node:fs/promises';
|
|
|
4
4
|
import { extname, dirname, join, normalize, resolve } from 'node:path';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
import { spawn } from 'node:child_process';
|
|
7
|
+
import { parseDotEnv } from '../tools/shared/dotenv.mjs';
|
|
7
8
|
|
|
8
9
|
const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
9
10
|
const root = join(packageRoot, 'dist');
|
|
@@ -25,29 +26,6 @@ const envOverrides = {
|
|
|
25
26
|
OPENAI_AUTOSTART: args.includes('--autostart') ? '1' : null,
|
|
26
27
|
};
|
|
27
28
|
|
|
28
|
-
function parseDotEnv(text) {
|
|
29
|
-
const out = {};
|
|
30
|
-
for (const rawLine of String(text || '').split(/\r?\n/)) {
|
|
31
|
-
let line = rawLine.trim();
|
|
32
|
-
if (!line || line.startsWith('#')) continue;
|
|
33
|
-
if (line.startsWith('export ')) line = line.slice(7).trim();
|
|
34
|
-
const eq = line.indexOf('=');
|
|
35
|
-
if (eq <= 0) continue;
|
|
36
|
-
const key = line.slice(0, eq).trim();
|
|
37
|
-
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(key)) continue;
|
|
38
|
-
let value = line.slice(eq + 1).trim();
|
|
39
|
-
if ((value.startsWith('"') && value.endsWith('"')) || (value.startsWith("'") && value.endsWith("'"))) {
|
|
40
|
-
const quote = value[0];
|
|
41
|
-
value = value.slice(1, -1);
|
|
42
|
-
if (quote === '"') value = value.replace(/\n/g, '\n').replace(/\r/g, '\r').replace(/\t/g, '\t').replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
|
43
|
-
} else {
|
|
44
|
-
value = value.replace(/\s+#.*$/, '').trim();
|
|
45
|
-
}
|
|
46
|
-
out[key] = value;
|
|
47
|
-
}
|
|
48
|
-
return out;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
29
|
async function loadArenaEnv() {
|
|
52
30
|
if (!useEnv) return { source: null, values: {} };
|
|
53
31
|
const candidates = [resolve(process.cwd(), '.env'), join(packageRoot, '.env')];
|