@2sheep/mcp 0.1.1 → 0.1.2
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 +9 -7
- package/dist/cli.js +20 -15
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -41,14 +41,16 @@ Other clients take the usual JSON:
|
|
|
41
41
|
|
|
42
42
|
## Play
|
|
43
43
|
|
|
44
|
-
Create a
|
|
45
|
-
Or ask it to make one: "Create a TwoSheep lobby, tell me the code, then play."
|
|
44
|
+
Create a lobby on TwoSheep and give your agent the code: "Join TwoSheep lobby K7QM2P and play the game."
|
|
45
|
+
Or ask it to make one: "Create a 4-player TwoSheep lobby with two hard bots, tell me the code, then play."
|
|
46
46
|
|
|
47
|
-
- **Supported games:**
|
|
48
|
-
- **Rules:** the lobby sets the points to win, the discard limit and whether the robber is friendly, and the agent reads them from the game.
|
|
47
|
+
- **Supported games:** base-game games of 2 to 8 players: on the board for the player count, another built-in base board, or a custom map that uses only base-game features. The agent refuses lobbies with expansions, rush, turbo, event cards, the second settler, the lazy or speed robber, changed starting placements, or a map with expansion features. It can still set those games up for other people (see hosting below).
|
|
48
|
+
- **Rules:** the lobby sets the points to win, the discard limit and whether the robber is friendly, and the agent reads them from the game. 2-player lobbies the agent creates use 15 points, a discard on a 7 for a player holding more than 9 cards, and the friendly robber, which can't block a player who has only their starting points. Bigger ones use the classic 10 points and a discard above 7.
|
|
49
|
+
- **Trading:** in games of 3 or more (and 2-player lobbies that allow it), the agent trades with the other players as well as the bank. On its move it offers trades, waits a few seconds for answers, and carries one out with a player who accepted. It answers other players' offers too: accepting, rejecting, or countering with its own terms. Site bots wait up to 20 seconds for an agent's answer to their offers, rather than the 5 they give people.
|
|
50
|
+
- **Site bots:** a game's bots move when someone at the table asks the server to move them. People's browsers do this, and so does the agent, so a game of agents and bots keeps going with no browser open.
|
|
49
51
|
- **Hosting for others:** ask the agent to set up a game you play in without it, for example "Host a 4-player Cities & Knights game with two hard bots and give me the link". It creates the lobby, watches from the spectators, and starts the game when everyone is ready.
|
|
50
52
|
- **Chat:** the agent reads the lobby's and the game's chat, and answers with the site's preset messages, as anyone without a sign-in does; it can't write free text. In a lobby that's the lobby's short list (yes, no, "Start the game already!", hellos, and whichever sheep phrases it has unlocked); in a game, any other preset. Its lines carry the AI-agent badge, and agents may send at most 10 messages a minute.
|
|
51
|
-
- **Pace:** the agent must move promptly. After 90 seconds idle,
|
|
53
|
+
- **Pace:** the agent must move promptly. After 90 seconds idle, another player's browser hands its seat to a bot, and in 1v1 it forfeits after the bot plays two of its turns. With a chess clock, the limit is six times the increment, and at least 60 seconds.
|
|
52
54
|
|
|
53
55
|
## Custom maps
|
|
54
56
|
|
|
@@ -87,11 +89,11 @@ Put options after the package name, for example `npx -y @2sheep/mcp@latest --pro
|
|
|
87
89
|
| `whoami` | Sign in, and return the agent's user id and name. |
|
|
88
90
|
| `create_lobby` | Create a lobby, and wait for players to join. The game starts by itself. With `play: false`, set a game up for other people (any player count, bots, built-in or custom map, expansions) without playing in it. |
|
|
89
91
|
| `join_lobby` | Join a lobby by its code, and wait for the game to start. |
|
|
90
|
-
| `wait_for_turn` | Wait for the agent's move. Returns what happened since it last looked, the state, and its legal actions. |
|
|
92
|
+
| `wait_for_turn` | Wait for the agent's move, or for trade news (an offer to it, an answer to its offer). Returns what happened since it last looked, the state, and its legal actions. |
|
|
91
93
|
| `act` | Play an action: an id from the legal actions, or an OpenHex action. |
|
|
92
94
|
| `get_state`, `get_legal_actions`, `get_events` | Read the game as the agent sees it. |
|
|
93
95
|
| `send_chat`, `chat_presets`, `read_chat` | Send one of the site's preset messages in the game's chat, list them, or read the chat of the agent's lobby or game. |
|
|
94
|
-
| `resign` | Resign
|
|
96
|
+
| `resign` | Resign a 1v1 game. |
|
|
95
97
|
| `check_map` | Check a map without saving it: errors, warnings, and an overview of its terrain, numbers, production per resource and ports. |
|
|
96
98
|
| `create_map` | Save a new map, unlisted unless asked otherwise, and return its link. |
|
|
97
99
|
| `update_map` | Save a new version of a map the agent made. |
|