@holdem-api/holdem-sdk 0.1.4 → 0.2.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/README.md +317 -337
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +0 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,337 +1,317 @@
|
|
|
1
|
-
# Holdem SDK
|
|
2
|
-
|
|
3
|
-
**Poker decisions, equity, and range tracking for your Node.js backend.**
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/@holdem-api/holdem-sdk)
|
|
6
|
-

|
|
7
|
-
[](./LICENSE)
|
|
8
|
-
|
|
9
|
-
A typed JavaScript/TypeScript client for Holdem API with zero runtime dependencies. Ships as ESM with TypeScript declarations. Live decisions use `POST /api/actions`; range storage and complete hand-history parsing run locally.
|
|
10
|
-
|
|
11
|
-
| Start with | Use it to |
|
|
12
|
-
| --- | --- |
|
|
13
|
-
| `HoldemClient.actions()` | Request a decision from an encoded public game state |
|
|
14
|
-
| `HoldemClient.actionsFromHistory()` | Request the next decision from unfinished PokerStars hand-history text |
|
|
15
|
-
| `RangeStore` | Keep player ranges across turns in your server process |
|
|
16
|
-
| `parseHandHistories()` | Turn complete hand-history files into recorded decisions locally |
|
|
17
|
-
|
|
18
|
-
**Requires:** Node.js 20+, an API key, and access to a Holdem API deployment for live requests. Keep API credentials on your backend.
|
|
19
|
-
|
|
20
|
-
[Install](#install) · [API access](#configure-your-api-access) · [First request](#first-live-request) · [Integration](#integrate-decisions-and-track-ranges) · [Ranges](#ranges) · [Hand histories](#convert-hand-history-files) · [Encoding reference](#public-policy-encoding-reference)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
## Install
|
|
24
|
-
|
|
25
|
-
In your **backend/server project
|
|
26
|
-
|
|
27
|
-
```sh
|
|
28
|
-
npm install @holdem-api/holdem-sdk
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
No repository clone, local archive, or SDK build step is required. Node.js 20+ is required. The package is ESM-only. JavaScript `.mjs` files can import it directly. CommonJS applications can use native `await import('@holdem-api/holdem-sdk')` inside an async function; TypeScript compiling to CommonJS must preserve that native import rather than rewriting it to require().
|
|
32
|
-
|
|
33
|
-
Verify installation without an API key or network request:
|
|
34
|
-
|
|
35
|
-
```sh
|
|
36
|
-
node --input-type=module -e "import { HoldemClient, RangeStore } from '@holdem-api/holdem-sdk'; console.log('SDK ready:', typeof HoldemClient, typeof RangeStore)"
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Expected output: `SDK ready: function function`.
|
|
40
|
-
|
|
41
|
-
## Configure your API access
|
|
42
|
-
|
|
43
|
-
Obtain a Holdem API key and the origin of the API deployment you are authorized to use. Installing this package does not create an API account, provision a server, or include credentials. Configure these variables on your backend:
|
|
44
|
-
|
|
45
|
-
```dotenv
|
|
46
|
-
HOLDEM_API_KEY=your_api_key
|
|
47
|
-
HOLDEM_API_URL=https://
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
## First live request
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
import {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- `
|
|
117
|
-
- `
|
|
118
|
-
- `
|
|
119
|
-
- `
|
|
120
|
-
- `
|
|
121
|
-
- `
|
|
122
|
-
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
import {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
//
|
|
148
|
-
//
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
//
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
//
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
- `
|
|
185
|
-
- `
|
|
186
|
-
- `
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
|
196
|
-
|
|
|
197
|
-
| `
|
|
198
|
-
| `
|
|
199
|
-
| `
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
Seat
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
//
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
import {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
const
|
|
268
|
-
for (const
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
It
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
|
290
|
-
|
|
|
291
|
-
|
|
|
292
|
-
|
|
|
293
|
-
|
|
|
294
|
-
|
|
|
295
|
-
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
5. In the consuming project, run `npm install @holdem-api/holdem-sdk`.
|
|
319
|
-
|
|
320
|
-
Do not put credentials in source or the package. Before publishing another release, bump the version with `npm version patch` (requires a clean git checkout) or edit the version and update the lockfile.
|
|
321
|
-
|
|
322
|
-
### Stakes and optional model settings
|
|
323
|
-
|
|
324
|
-
Pass `stake: '200 NL'` (USD $1/$2) with encoded actions, or let
|
|
325
|
-
actionsFromHistory detect it from the history. Supported labels are 25NL, 50NL,
|
|
326
|
-
100NL, 200NL, 500NL, 1000NL; spaces are accepted and normalized.
|
|
327
|
-
Only 25NL currently has a released model; unreleased selections return MODEL_UNAVAILABLE.
|
|
328
|
-
|
|
329
|
-
Normal calls need no tuning parameters. The API defaults to 25NL / population-v1
|
|
330
|
-
for encoded requests. Advanced callers may set model, gateSlope, style and
|
|
331
|
-
policyVersion per call, or configure reusable client defaults:
|
|
332
|
-
|
|
333
|
-
`new HoldemClient({ baseUrl, apiKey, defaults: { stake: '25NL', model: 'population-v1' } })`
|
|
334
|
-
|
|
335
|
-
Omit stake defaults when using automatic text-history stake detection. Explicit
|
|
336
|
-
stakes must agree with the history. Model IDs select registered server releases,
|
|
337
|
-
never local filesystem paths. New IDs require a compatible API release.
|
|
1
|
+
# Holdem SDK
|
|
2
|
+
|
|
3
|
+
**Poker decisions, equity, and range tracking for your Node.js backend.**
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@holdem-api/holdem-sdk)
|
|
6
|
+

|
|
7
|
+
[](./LICENSE)
|
|
8
|
+
|
|
9
|
+
A typed JavaScript/TypeScript client for Holdem API with zero runtime dependencies. Ships as ESM with TypeScript declarations. Live decisions use `POST /api/actions`; range storage and complete hand-history parsing run locally.
|
|
10
|
+
|
|
11
|
+
| Start with | Use it to |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| `HoldemClient.actions()` | Request a decision from an encoded public game state |
|
|
14
|
+
| `HoldemClient.actionsFromHistory()` | Request the next decision from unfinished PokerStars hand-history text |
|
|
15
|
+
| `RangeStore` | Keep player ranges across turns in your server process |
|
|
16
|
+
| `parseHandHistories()` | Turn complete hand-history files into recorded decisions locally |
|
|
17
|
+
|
|
18
|
+
**Requires:** Node.js 20+, an API key, and access to a Holdem API deployment for live requests. Keep API credentials on your backend.
|
|
19
|
+
|
|
20
|
+
[Install](#install) · [API access](#configure-your-api-access) · [First request](#first-live-request) · [Integration](#integrate-decisions-and-track-ranges) · [Ranges](#ranges) · [Hand histories](#convert-hand-history-files) · [Encoding reference](#public-policy-encoding-reference)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
In your **backend/server project**:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npm install @holdem-api/holdem-sdk
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
No repository clone, local archive, or SDK build step is required. Node.js 20+ is required. The package is ESM-only. JavaScript `.mjs` files can import it directly. CommonJS applications can use native `await import('@holdem-api/holdem-sdk')` inside an async function; TypeScript compiling to CommonJS must preserve that native import rather than rewriting it to require().
|
|
32
|
+
|
|
33
|
+
Verify installation without an API key or network request:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
node --input-type=module -e "import { HoldemClient, RangeStore } from '@holdem-api/holdem-sdk'; console.log('SDK ready:', typeof HoldemClient, typeof RangeStore)"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Expected output: `SDK ready: function function`.
|
|
40
|
+
|
|
41
|
+
## Configure your API access
|
|
42
|
+
|
|
43
|
+
Obtain a Holdem API key and the origin of the API deployment you are authorized to use. Installing this package does not create an API account, provision a server, or include credentials. Configure these variables on your backend:
|
|
44
|
+
|
|
45
|
+
```dotenv
|
|
46
|
+
HOLDEM_API_KEY=your_api_key
|
|
47
|
+
HOLDEM_API_URL=https://www.holdemapi.com
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Use the production origin above, without `/api`; override it only for a separate deployment. Keep `.env` out of version control. Node 20.6+ can load it using `node --env-file=.env your-script.mjs`; on earlier Node 20 versions set environment variables in your shell or use your application's environment loader. Never put the key in browser code.
|
|
51
|
+
|
|
52
|
+
## First live request
|
|
53
|
+
|
|
54
|
+
Use `actionsFromHistory()` for the next decision in one unfinished PokerStars USD cash hand. `parseHandHistories()` instead replays complete recorded hands locally and makes no API requests. Engine adapters can use `actions()` with an encoded policy; the numeric encoding is described later.
|
|
55
|
+
|
|
56
|
+
Download [the sample unfinished hand](https://www.holdemapi.com/examples/hand-history.txt) as `hand-history.txt`. Save this as `holdem-smoke.mjs` in the project where you installed the SDK:
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
import { readFile } from 'node:fs/promises'
|
|
60
|
+
import { HoldemClient } from '@holdem-api/holdem-sdk'
|
|
61
|
+
|
|
62
|
+
const apiKey = process.env.HOLDEM_API_KEY
|
|
63
|
+
const file = process.argv[2]
|
|
64
|
+
if (!apiKey || !file) throw new Error('Set HOLDEM_API_KEY and supply a hand-history file')
|
|
65
|
+
const client = new HoldemClient({
|
|
66
|
+
apiKey,
|
|
67
|
+
baseUrl: process.env.HOLDEM_API_URL || 'https://www.holdemapi.com',
|
|
68
|
+
})
|
|
69
|
+
const handHistory = await readFile(file, 'utf8')
|
|
70
|
+
const result = await client.actionsFromHistory({ handHistory })
|
|
71
|
+
console.log({ chosenAction: result.chosenAction, probabilities: result.output,
|
|
72
|
+
equity: result.equity, sizes: result.sizes, weights: result.weights })
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
node --env-file=.env holdem-smoke.mjs hand-history.txt
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
This makes one live request and may consume API quota. It does not execute an action. The API infers the pending actor and uses their `Dealt to` cards. For another file, stop immediately before the decision; exclude showdown, collection and summary lines. Optionally supply `player` to check the actor or `hand` when dealt cards are absent. Do not mix `handHistory` and `policy`. Hand-history input reconstructs public state, not earlier reached ranges.
|
|
80
|
+
|
|
81
|
+
If the request fails, inspect the SDK error status and message: 400 indicates invalid input, 401/403 indicates an access issue, and 502/503 can indicate unavailable dependencies or model releases. If a 403 contains HTML, retain the response headers, timestamp and request identifier for support, excluding your key.
|
|
82
|
+
|
|
83
|
+
## Integrate decisions and track ranges
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
import { HoldemClient, RangeStore } from '@holdem-api/holdem-sdk'
|
|
87
|
+
import type { PublicPolicy } from '@holdem-api/holdem-sdk'
|
|
88
|
+
|
|
89
|
+
const holdem = new HoldemClient({
|
|
90
|
+
apiKey: process.env.HOLDEM_API_KEY!,
|
|
91
|
+
baseUrl: process.env.HOLDEM_API_URL!, // origin without /api
|
|
92
|
+
})
|
|
93
|
+
const ranges = new RangeStore()
|
|
94
|
+
|
|
95
|
+
async function decide(handId: string, playerId: string, policy: PublicPolicy) {
|
|
96
|
+
const result = await holdem.actions({
|
|
97
|
+
policy,
|
|
98
|
+
hand: 'AsAh',
|
|
99
|
+
range: ranges.get(handId, playerId),
|
|
100
|
+
// opponentRanges: [ranges.get(handId, opponentId) ?? null],
|
|
101
|
+
})
|
|
102
|
+
// Your engine executes result.chosenAction, sampling sizes/weights on aggression.
|
|
103
|
+
// Only AFTER successful execution of that action:
|
|
104
|
+
// ranges.record(handId, playerId, result, executedAction)
|
|
105
|
+
return result
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
`predictActions` is an alias with the same request and response. This replaces the original unpublished SDK's legacy state-based prediction, separate range-update, and equity methods.
|
|
110
|
+
|
|
111
|
+
Supply the exact public encoder output as `policy`: schemaVersion `holdem-public-board-joint-v1`, 316 context features, chronological history of at most 512 events with 32 features each, and legalMask `[fold, passive, aggressive]`. Use the API/parser public encoder; an ordinary game snapshot is not that encoding. Context has board slots (260), actor (9), street (4), six log-scaled amounts/counts, nine public seat records (36), and remaining opponents / 9. Amount scaling is `log1p(max(0,value))/log1p(400)`.
|
|
112
|
+
|
|
113
|
+
## Response at a glance
|
|
114
|
+
|
|
115
|
+
- `equity`, `uniformEquity`, `equityBasis`, optional `opponentEquity`.
|
|
116
|
+
- `output`: hand-specific action probabilities; `population`: public model targets.
|
|
117
|
+
- `chosenAction`: sampled fold/call/raise or check/bet. No size is sampled.
|
|
118
|
+
- `sizes` and `weights`: conditional aggression sizing distribution. Your engine applies legal payments, raises, all-ins and side pots.
|
|
119
|
+
- `range`: normalized actor posterior conditioned on chosenAction.
|
|
120
|
+
- `expectedValues`: simplified uniform heads-up showdown benchmark in BB. Assumes one caller, no fold equity, no future betting, no rake or side pots; not strategic or opponent-range-aware EV.
|
|
121
|
+
- Optional `learnedExpectedValues`: experimental observed-action historical returns, only when configured on the API server. Not validated counterfactual action values.
|
|
122
|
+
- `improvementPotential`, `improvement`, allocation identifiers, and all additional server fields are preserved.
|
|
123
|
+
|
|
124
|
+
## Ranges
|
|
125
|
+
|
|
126
|
+
`WeightedRange` maps exact two-card combos to nonnegative weights. Omit `range` for a uniform board-compatible actor population. Pass a prior to track a reached range; the actual hand must have positive mass. Do not initialize a range with just the known hand. Optional `opponentRanges` has one map or null (uniform) per remaining opponent; never send revealed opponents' actual cards.
|
|
127
|
+
|
|
128
|
+
### Local range storage
|
|
129
|
+
|
|
130
|
+
`RangeStore` keeps ranges in your backend server's memory. It keeps a JavaScript `Map` keyed by hand ID and player ID. Players do not need to manage range files or enter ranges themselves; your backend handles that work.
|
|
131
|
+
|
|
132
|
+
`HoldemClient` does not save ranges automatically. Create one store for the lifetime of your room/server, read the prior before each request, and save the returned range only after the chosen action executes successfully. Do not create a new store inside each decision.
|
|
133
|
+
|
|
134
|
+
### Example: reuse a player's range across turns
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
import { HoldemClient, RangeStore } from '@holdem-api/holdem-sdk'
|
|
138
|
+
import type { ActionsResult, ActionType, PublicPolicy } from '@holdem-api/holdem-sdk'
|
|
139
|
+
|
|
140
|
+
const client = new HoldemClient({
|
|
141
|
+
apiKey: process.env.HOLDEM_API_KEY!,
|
|
142
|
+
baseUrl: process.env.HOLDEM_API_URL!,
|
|
143
|
+
})
|
|
144
|
+
const ranges = new RangeStore() // Shared across this room's decisions.
|
|
145
|
+
|
|
146
|
+
// Your engine adapter executes result.chosenAction and returns the category
|
|
147
|
+
// actually executed. Throw on failure. For bet/raise, sample the conditional
|
|
148
|
+
// sizes/weights and enforce your engine's legal sizing limits.
|
|
149
|
+
type ExecuteAction = (result: ActionsResult) => Promise<ActionType>
|
|
150
|
+
|
|
151
|
+
async function decideAndExecute(
|
|
152
|
+
handId: string,
|
|
153
|
+
playerId: string,
|
|
154
|
+
hand: string,
|
|
155
|
+
policy: PublicPolicy,
|
|
156
|
+
executeAction: ExecuteAction,
|
|
157
|
+
) {
|
|
158
|
+
const result = await client.actions({
|
|
159
|
+
hand,
|
|
160
|
+
policy,
|
|
161
|
+
// First turn: undefined means a uniform board-compatible range.
|
|
162
|
+
// Later turns: reuse this player's last saved range for this hand.
|
|
163
|
+
range: ranges.get(handId, playerId),
|
|
164
|
+
})
|
|
165
|
+
|
|
166
|
+
// Execute chosenAction directly; do not sample the category a second time.
|
|
167
|
+
const executedAction = await executeAction(result)
|
|
168
|
+
// Save only after successful execution. A different category throws and
|
|
169
|
+
// leaves the store unchanged: this posterior belongs to chosenAction.
|
|
170
|
+
ranges.record(handId, playerId, result, executedAction)
|
|
171
|
+
return result
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function onHandFinished(handId: string) {
|
|
175
|
+
ranges.clear(handId) // Remove every player's range for this hand.
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Call `decideAndExecute` on each turn with the same hand/player IDs, the actor's actual hand, and freshly encoded public policy. Your application supplies the engine adapter and calls `onHandFinished` when the hand ends. Serialize the request, execution, and save per player, and reject expired hand/turn responses before execution. If the engine executes a different category, stop this flow and explicitly resolve the player's prior before another decision; do not save this response's range for that different action.
|
|
180
|
+
|
|
181
|
+
### Lifetime and persistence
|
|
182
|
+
|
|
183
|
+
- `get(handId, playerId)` returns a copy of the stored range, or `undefined` if none exists.
|
|
184
|
+
- `record(handId, playerId, result, executedAction)` saves a copy after verifying that the executed category matches `chosenAction`.
|
|
185
|
+
- `set(handId, playerId, range)` explicitly stores a validated range, including a snapshot restored from your database.
|
|
186
|
+
- `clear(handId)` clears one hand; `clear()` clears the entire store, for example when disposing of a room.
|
|
187
|
+
|
|
188
|
+
This is in-process server memory, not browser local storage or a file on disk. Ranges disappear when the process restarts and are not shared across workers or server instances. If you need restart recovery or shared state, persist `get()` snapshots in your application's database and restore them with `set()`. The SDK does not include a persistence layer.
|
|
189
|
+
|
|
190
|
+
The API itself stores no ranges. The SDK does not infer ranges for arbitrary observed opponent actions. Optional `opponentRanges` must contain valid tracked priors or `null` for uniform; never substitute an opponent's revealed actual hand.
|
|
191
|
+
|
|
192
|
+
## Errors and cancellation
|
|
193
|
+
|
|
194
|
+
| Error | Meaning |
|
|
195
|
+
| --- | --- |
|
|
196
|
+
| `HoldemValidationError` | Invalid local input; the request was not sent |
|
|
197
|
+
| `HoldemApiError` | The API rejected the request; inspect `status` and `body` |
|
|
198
|
+
| `HoldemResponseError` | A successful HTTP response did not match the expected shape |
|
|
199
|
+
| `HoldemTransportError` | Network failure, timeout, or cancellation |
|
|
200
|
+
|
|
201
|
+
Request methods accept `{ signal }` as the second argument:
|
|
202
|
+
|
|
203
|
+
```ts
|
|
204
|
+
const controller = new AbortController()
|
|
205
|
+
const result = await client.actions(request, { signal: controller.signal })
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
The default timeout is 60 seconds and includes reading the response body. Override it with `timeoutMs` in the client constructor. There are no automatic retries. API keys are sent in the `x-api-key` header.
|
|
209
|
+
|
|
210
|
+
## Convert hand-history files
|
|
211
|
+
|
|
212
|
+
### Request a live decision from text
|
|
213
|
+
|
|
214
|
+
`client.actionsFromHistory()` sends an unfinished hand to `POST /api/actions`.
|
|
215
|
+
The API parses the text, replays actions, identifies the next actor, and builds
|
|
216
|
+
the public policy. Callers do not construct numeric feature arrays.
|
|
217
|
+
Requires an API deployment with live-history input support.
|
|
218
|
+
|
|
219
|
+
```ts
|
|
220
|
+
const result = await client.actionsFromHistory({
|
|
221
|
+
handHistory: `PokerStars Hand #123: Hold'em No Limit ($0.10/$0.25 USD) - 2026/11/05 20:00:00 ET
|
|
222
|
+
Table 'Blitzfold' 2-max Seat #1 is the button
|
|
223
|
+
Seat 1: Hero ($25 in chips)
|
|
224
|
+
Seat 2: Opponent ($25 in chips)
|
|
225
|
+
Hero: posts small blind $0.10
|
|
226
|
+
Opponent: posts big blind $0.25
|
|
227
|
+
*** HOLE CARDS ***
|
|
228
|
+
Dealt to Hero [As Ah]`,
|
|
229
|
+
player: 'Hero', // optional assertion of whose turn it is
|
|
230
|
+
style: 'tight-aggressive',
|
|
231
|
+
// hand: 'AsAh', // required if the actor has no Dealt to line
|
|
232
|
+
// range: ranges.get(handId, playerId),
|
|
233
|
+
})
|
|
234
|
+
console.log(result.chosenAction, result.equity)
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Append executed actions and dealt street markers, then send the full prefix again
|
|
238
|
+
at each decision. The API is stateless: include the header, seats, starting stacks,
|
|
239
|
+
button, blinds, and all preceding actions every time. Stop before the pending
|
|
240
|
+
action; omit showdown, collection, and summary lines. For a closed betting round,
|
|
241
|
+
include the next dealt street before requesting. Headers alone do not describe
|
|
242
|
+
a later decision.
|
|
243
|
+
|
|
244
|
+
Supports ordinary PokerStars USD No Limit Hold'em cash text, up to 100 KB and
|
|
245
|
+
512 preceding events. Arbitrary prose and other sites' formats are rejected.
|
|
246
|
+
Optional `range`, `opponentRanges`, `style`, `gateSlope`, `policyVersion`, and
|
|
247
|
+
cancellation work as with `actions()`. Track ranges explicitly and record them
|
|
248
|
+
only after executing the returned action. This method reads text, not filesystem
|
|
249
|
+
paths, and does not execute game actions. The structured `actions({ policy, hand })`
|
|
250
|
+
entry point remains available.
|
|
251
|
+
|
|
252
|
+
### Parse complete files locally
|
|
253
|
+
|
|
254
|
+
`parseHandHistories(text)` locally converts one or more complete PokerStars USD
|
|
255
|
+
No Limit Hold'em regular cash histories into decisions. Unsupported formats,
|
|
256
|
+
incomplete hands, and inconsistent settlement totals throw an error.
|
|
257
|
+
|
|
258
|
+
```ts
|
|
259
|
+
import { readFile } from 'node:fs/promises'
|
|
260
|
+
import { HoldemClient, parseHandHistories } from '@holdem-api/holdem-sdk'
|
|
261
|
+
|
|
262
|
+
const client = new HoldemClient({
|
|
263
|
+
apiKey: process.env.HOLDEM_API_KEY!,
|
|
264
|
+
baseUrl: process.env.HOLDEM_API_URL!,
|
|
265
|
+
})
|
|
266
|
+
const hands = parseHandHistories(await readFile('history.txt', 'utf8'))
|
|
267
|
+
for (const hand of hands) {
|
|
268
|
+
for (const decision of hand.decisions) {
|
|
269
|
+
if (decision.player !== 'YourPlayerName' || !decision.hand) continue
|
|
270
|
+
const result = await client.actions({ policy: decision.policy, hand: decision.hand })
|
|
271
|
+
console.log(hand.handId, decision.street, result.chosenAction)
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Decisions include actionIndex, player, street, observedAction, policy, optional
|
|
277
|
+
hand and optional cardSource. Unknown cards remain absent. Revealed actor cards
|
|
278
|
+
may be used for retrospective analysis; private cards, future board cards and
|
|
279
|
+
future actions never enter earlier public policies. The helper makes no API calls.
|
|
280
|
+
It returns recorded decisions, not pending decisions from unfinished live hands.
|
|
281
|
+
It does not infer reached ranges. Omitted ranges use uniform defaults; do not
|
|
282
|
+
carry a sampled-action posterior through a history that took a different action.
|
|
283
|
+
|
|
284
|
+
## Public policy encoding reference
|
|
285
|
+
|
|
286
|
+
The SDK accepts encoded public features; it does not reconstruct betting state. Use consistent seat IDs 0-8 throughout a hand. Cards are indexed by `rankIndex * 4 + suitIndex`, ranks `23456789TJQKA`, suits `cdhs`. Street indexes are preflop=0, flop=1, turn=2, river=3. A one-hot block has exactly one 1; an empty board slot is all zeros. Board slots retain deal order. All amounts below are BB unless a count is specified; scale amounts/counts using `log1p(max(0,x))/log1p(400)`.
|
|
287
|
+
|
|
288
|
+
| Context indexes | Encoding |
|
|
289
|
+
| --- | --- |
|
|
290
|
+
| 0-259 | Five ordered 52-value board one-hot slots |
|
|
291
|
+
| 260-268 | Actor seat one-hot |
|
|
292
|
+
| 269-272 | Street one-hot |
|
|
293
|
+
| 273-278 | Scaled pot, facing amount, call payment, min raise-to, max raise-to, number of seats |
|
|
294
|
+
| 279-314 | Nine seat records: present flag, scaled remaining stack, scaled current-street contribution, active flag; absent seats have four zeros |
|
|
295
|
+
| 315 | Remaining active opponent count divided by 9 |
|
|
296
|
+
|
|
297
|
+
Each history event has 32 values: actor seat one-hot (9), street one-hot (4), action one-hot (6, ordered posts/folds/checks/calls/bets/raises), four scaled values (payment added, raise-to or 0, live post or 0, dead post or 0), and nine scaled refund amounts indexed by seat. Sum multiple refunds to the same seat after the event before scaling. History must contain all actual preceding events in order, across streets, excluding the current decision. Send no artificial padding; empty history is supported. Maximum history length is 512. LegalMask is `[fold, passive, aggressive]` derived from actual engine legality, with only 0/1 values and at least one allowed action. Do not include opponents' private cards or future events. Encode call payment, contributions, and raise limits from actual engine state; do not infer them from incomplete logs.
|
|
298
|
+
|
|
299
|
+
## Stakes and server-managed models
|
|
300
|
+
|
|
301
|
+
Pass `stake: '200 NL'` (USD $1/$2) with encoded actions, or let
|
|
302
|
+
actionsFromHistory detect it from the history. Supported labels are 25NL, 50NL,
|
|
303
|
+
100NL, 200NL, 500NL, 1000NL; spaces are accepted and normalized.
|
|
304
|
+
Only 25NL currently has a released model; unreleased selections return MODEL_UNAVAILABLE.
|
|
305
|
+
|
|
306
|
+
Normal calls need no tuning parameters. The API defaults to 25NL / population-v1
|
|
307
|
+
for encoded requests. The server selects the default release for each stake. Callers may set gateSlope, style and
|
|
308
|
+
policyVersion per call, or configure reusable client defaults:
|
|
309
|
+
|
|
310
|
+
`new HoldemClient({ baseUrl, apiKey, defaults: { stake: '25NL' } })`
|
|
311
|
+
|
|
312
|
+
Omit stake defaults when using automatic text-history stake detection. Explicit
|
|
313
|
+
stakes must agree with the history. Request model selection has been removed.
|
|
314
|
+
Remove model from constructor defaults and per-call options when migrating. Legacy
|
|
315
|
+
JavaScript model properties are stripped before transport. Preserve response model
|
|
316
|
+
metadata to log the actual server release. Stop sending model in consumers before deploying the updated API;
|
|
317
|
+
older clients sending model directly receive BAD_REQUEST from the updated API.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAE9G,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,qBAAa,cAAe,SAAQ,KAAK;aACM,MAAM,EAAE,MAAM;aAAkB,IAAI,EAAE,OAAO;gBAA9E,OAAO,EAAE,MAAM,EAAkB,MAAM,EAAE,MAAM,EAAkB,IAAI,EAAE,OAAO;CAG3F;AACD,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,O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,EAAE,MAAM,EAAkB,IAAI,EAAE,OAAO;CAG3F;AACD,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;CAC5C;AACD,qBAAa,mBAAoB,SAAQ,KAAK;aAChB,MAAM,EAAE,MAAM;gBAAd,MAAM,EAAE,MAAM;CAC3C;AAkBD,mGAAmG;AACnG,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwC;IACjE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAQ;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAQ;IAClC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;gBACvC,MAAM,EAAE,aAAa;IAYjC,yFAAyF;IACnF,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAK9E,iFAAiF;IAC3E,kBAAkB,CAAC,KAAK,EAAE,mBAAmB,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAUhG,8DAA8D;IACxD,cAAc,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAGrF,OAAO,CAAC,SAAS;YAYH,IAAI;CA2BnB"}
|
package/dist/index.js
CHANGED
|
@@ -101,7 +101,8 @@ export class HoldemClient {
|
|
|
101
101
|
check(['25NL', '50NL', '100NL', '200NL', '500NL', '1000NL'].includes(stake), 'Unsupported stake');
|
|
102
102
|
selected.stake = stake;
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
// Strip legacy JavaScript options, including constructor defaults. The server owns releases.
|
|
105
|
+
delete selected.model;
|
|
105
106
|
return selected;
|
|
106
107
|
}
|
|
107
108
|
async post(path, payload, valid, call) {
|
package/dist/index.js.map
CH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CAAC,MAAM,GAAG,EAAC,QAAQ,CAAC,MAAM,EAAC,IAAI,CAAC,CAAA;YACjG,CAAC;YACD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;gBAAE,MAAM,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;YAChE,OAAO,IAAS,CAAA;QAClB,CAAC;gBAAS,CAAC;YACT,YAAY,CAAC,KAAK,CAAC,CAAC;YAAC,IAAI,EAAE,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAC,KAAK,CAAC,CAAA;QACvE,CAAC;IACH,CAAC;CACF"}
|
package/dist/types.d.ts
CHANGED
|
@@ -15,8 +15,6 @@ export type Stake = '25NL' | '50NL' | '100NL' | '200NL' | '500NL' | '1000NL' | '
|
|
|
15
15
|
export interface ModelOptions {
|
|
16
16
|
/** Defaults to 25NL for encoded requests; detected from text histories. */
|
|
17
17
|
stake?: Stake;
|
|
18
|
-
/** Advanced: omit to use the server's population-v1 release. */
|
|
19
|
-
model?: string;
|
|
20
18
|
}
|
|
21
19
|
export interface ActionsInput extends ModelOptions {
|
|
22
20
|
policy: PublicPolicy;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,GAAG,GAAC,GAAG,GAAC,GAAG,GAAC,GAAG,GAAC,GAAG,GAAC,GAAG,GAAC,GAAG,GAAC,GAAG,GAAC,GAAG,GAAC,GAAG,GAAC,GAAG,GAAC,GAAG,GAAC,GAAG,CAAA;AACtE,MAAM,MAAM,IAAI,GAAG,GAAG,IAAI,GAAG,GAAG,GAAC,GAAG,GAAC,GAAG,GAAC,GAAG,EAAE,CAAA;AAC9C,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;AAC5D,MAAM,MAAM,UAAU,GAA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