@leafarcade/cli 0.8.0 → 0.9.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafarcade/cli",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "private": false,
5
5
  "description": "Create private browser board games and play with your AI agent. Includes 53 games and an installable Codex/Claude skill.",
6
6
  "type": "module",
@@ -24,7 +24,7 @@ leafarcade game create --game connect-four --name "My agent" # add --open on
24
24
 
25
25
  Every JSON response has a `next` field with the exact command to run next. Follow it.
26
26
 
27
- Add `--brief` to `status`, `wait`, `start` and `play`. It returns only `status` (room, revision, phase, your piece, whose turn, outcome), `board_labeled`, `last_move`, the legal moves and `next`, which keeps the flag. Games without a labeled board (cards, tiles) also get `visible_state`. Drop `--brief` once if you need the full position: player list, raw state or rules.
27
+ Add `--brief` to `status`, `wait`, `start` and `play`. It returns only `status` (room, revision, phase, your piece, whose turn, outcome), `board_labeled`, `last_move`, the legal moves and `next`, which keeps the flag. Games without a labeled board (cards, tiles) also get `visible_state`. Long move lists (more than 80, such as Gomoku or Amazons) are grouped in `--brief`: `{"type":"place","row":3,"column_choices":[1,2,5]}` means row 3 with any of those columns; send one value (`--row 3 --column 2`). Drop `--brief` once if you need the full position: player list, raw state or rules.
28
28
 
29
29
  `leafarcade help games` lists game IDs. `--capacity N` picks a supported table size; the default is the game's minimum. Each additional agent needs its own `LEAFARCADE_CONFIG_DIR` and seat.
30
30
 
@@ -35,7 +35,7 @@ When the human already has a room code, use `leafarcade join ROOMCODE --name "My
35
35
  ## The play loop
36
36
 
37
37
  - **Wait on the table yourself.** After your move, use `play --wait` or `game wait`. Never ask the human to tell you they moved.
38
- - Read `game rules --game GAME_ID` once. On your turn, `board_labeled` shows the board with the same row/column numbers as the move flags, and `last_move` shows the opponent's last move in board games (null in most card games; read `changed_since_last_read` there).
38
+ - Read `game rules --game GAME_ID` once. On your turn, `board_labeled` shows the board with the same row/column numbers as the move flags, and `last_move` shows the latest move in board games with `by_seat` and any `captured` squares (null in most card games; read `changed_since_last_read` there). In `legal_actions`, rows, columns, pits and edges count from 1, as the move flags do; the zero-based `at` in the help is the wire form the CLI converts to. Some games add hints: `rule_notes` (rules in force now, such as Thousand's 800 rule, three-check counts or the Dice upper bonus), `gin_deadwood` and `sixty_six_unseen` (cards you have not seen this deal).
39
39
  - Before each move in line games (Connect Four, tic-tac-toe, gomoku, hex), check two things across every row, column and **both diagonals**. First, can you win now? Second, does the opponent threaten to win next turn?
40
40
  - Most games list every legal move. With `legal_actions_complete` or `legal_wire_actions` (complete unless `legal_wire_actions_complete` is false), choose a listed entry and pass it unchanged: `--action '{"type":"bid","amount":120}'`. A partial list (melds, trade offers, raise amounts, bluffs) shows examples; build other moves from `game rules`. Wire indexes are zero-based; the convenience flags are one-based.
41
41
  - Card games add `cards_labeled` (for example `"hands.1": ["Q♠ (id 49)", …]`): read card names there, not from raw IDs. Index boards (Go, shogi, draughts, Amazons) label rows with the index of their first cell, so `at` = row label + column offset; `board_legend` explains the symbols.