{"_id":"@coffeemood/railbird-eval-library","name":"@coffeemood/railbird-eval-library","dist-tags":{"latest":"0.2.0"},"versions":{"0.2.0":{"name":"@coffeemood/railbird-eval-library","version":"0.2.0","description":"Canonical, solver-independent Texas Hold'em hand and board facts for Railbird","main":"index.js","types":"index.d.ts","publishConfig":{"access":"restricted"},"exports":{".":{"types":"./index.d.ts","require":"./index.js","default":"./index.js"}},"scripts":{"test":"node --test","test:watch":"node --test --watch"},"keywords":["poker","holdem","hand-evaluation","railbird"],"author":{"name":"Railbird"},"license":"UNLICENSED","engines":{"node":">=18"},"dependencies":{"pokersolver":"^2.1.4"},"directories":{"test":"test"},"devDependencies":{},"_id":"@coffeemood/railbird-eval-library@0.2.0","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-n/04XO78NSw/TJDx+aj2cokxLrcUV+G9nYOewq78kC6QYb5wIpYFJlhjN5e3mSbzzdESRPHqxhALYZFvNjZmcQ==","shasum":"bc8f15938ab4982d76b02a68a390eba30e967067","tarball":"https://registry.npmjs.org/@coffeemood/railbird-eval-library/-/railbird-eval-library-0.2.0.tgz","fileCount":13,"unpackedSize":53630,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDlrnexU8RWaC7TPOJCh8fGxmU5kCbPHpadDvNtUj5WrwIgLUe8KMvc1EUEzSCFPayRJSYtf4CJ4d3Fl7byY4ISiqs="}]},"_npmUser":{"name":"coffeemood","email":"coffeeforthoughts@gmail.com"},"maintainers":[{"name":"coffeemood","email":"coffeeforthoughts@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/railbird-eval-library_0.2.0_1783521669996_0.3837187045011976"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T14:41:09.814Z","0.2.0":"2026-07-08T14:41:10.112Z","modified":"2026-07-08T14:41:10.331Z"},"maintainers":[{"name":"coffeemood","email":"coffeeforthoughts@gmail.com"}],"description":"Canonical, solver-independent Texas Hold'em hand and board facts for Railbird","keywords":["poker","holdem","hand-evaluation","railbird"],"author":{"name":"Railbird"},"license":"UNLICENSED","readme":"# Railbird Eval Library\n\nCanonical, solver-independent Texas Hold'em card facts for Railbird.\n\nThe package answers factual questions about a hand and board. It does not decide whether a hand is strategically\n`value`, `marginal`, `draw`, or `air`; those labels depend on ranges, action history, sizing, and policy. Consumers can\nderive coarse labels through an explicit projection without weakening the canonical facts.\n\n## API\n\n```js\nconst {\n  analyzeHand,\n  analyzeBoard,\n  compareHandToRange,\n  toLegacyHandFeatures,\n} = require('@coffeemood/railbird-eval-library');\n\nconst facts = analyzeHand('Ks9s', ['2d', '6h', '8s', '4s']);\n\nfacts.made.subtype;                         // 'king_high'\nfacts.draws.primaryFlushDraw.label;         // 'second_nut_flush_draw'\nfacts.draws.primaryFlushDraw.outCount;      // 9\nfacts.relative.percentile;                  // exact-board percentile over legal combos\nfacts.relative.isNuts;                      // false\n```\n\n### `analyzeHand(holeCards, board, options?)`\n\nReturns:\n\n- exact made category, subtype, best five, rank key, and actual nut status;\n- pair position and kicker rank (`overpair`, `top_pair`, `second_pair`, `bottom_pair`, and more);\n- high-card class (`ace_high`, `king_high`, etc.) and overcards;\n- nut/second-nut/third-nut/lower flush draws;\n- gutshots, open-ended draws, double gutters, combo draws, and exact immediate outs;\n- backdoor flush and straight paths;\n- board-relative percentile and distance from the nut rank class;\n- hole-card contribution and whether the board plays.\n\nPass `{ includeRelative: false }` when exact-board enumeration is unnecessary.\n\n### `compareHandToRange(holeCards, board, range, options?)`\n\nCompares current made-hand rank against a weighted range with collision removal. Ahead, behind, and tie are always\nreported separately. This is current-street rank comparison, not equity.\n\n### `analyzeBoard(board)`\n\nReturns pairedness, suit texture, rank/suit counts, board straight windows, and the board's made hand on the river.\n\n### `toLegacyHandFeatures(facts)`\n\nCompatibility adapter for the existing `madeTier`, `pairSubtype`, and `drawFlags` shape. It is deliberately outside\nthe core analysis contract.\n\n## Boundaries\n\nThis package owns card facts. It does not own:\n\n- solver strategy or action EV;\n- equity versus a range;\n- clean-out calculation against a range;\n- blocker/removal interpretation beyond explicit range comparison;\n- strategic story labels or SRE archetypes.\n\n## Adoption\n\nThe initial golden suite contains the existing SRE examples: AA on `7s9sTh`, wheel gutshot `34` on `A82`, nut and\nsecond-nut flush draws, board-owned draws, pair position, open-ended and double-gutter structures, and exact\nahead/behind/tie range comparison. New consumers should adopt this package first. Existing NAPI, ground-truth, and\nX-Ray paths should migrate incrementally through adapters after their outputs are compared against the golden suite.\n","readmeFilename":"README.md","_rev":"1-c057999e861617ec0a69cd9bf4e1e060"}