@2sheep/mcp 0.1.1 → 0.1.3
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 +21 -10
- package/dist/cli.js +31 -16
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -41,14 +41,25 @@ 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."
|
|
46
|
-
|
|
47
|
-
- **Supported games:**
|
|
48
|
-
-
|
|
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
|
+
|
|
47
|
+
- **Supported games:** 2 to 8 players, on built-in boards or custom maps:
|
|
48
|
+
- the base game;
|
|
49
|
+
- Seafarers: every scenario map, and the Fog Bank and Misty Realms maps;
|
|
50
|
+
- Fisherman: Fish Ponds and Fish Shoals;
|
|
51
|
+
- Rivers, Troll Bridge (and trolls on any map), Merchant Trains (Caravans) and desertification (Dust Bowl);
|
|
52
|
+
- event cards, turbo (two rolls a turn) and the second settler;
|
|
53
|
+
- the lazy and speed robber, and the starting-placement rules (coastal or inland, a starting city).
|
|
54
|
+
|
|
55
|
+
The agent refuses Cities & Knights and rush. It can still set those games up for other people (see hosting below).
|
|
56
|
+
- **Expansion moves:** ships (build, move, place as a starting piece), the pirate, gold and free-resource picks, fish spending and the old boot, bridges and gold coins (including gold in trades), feeding trolls, and what event cards ask of each seat. Some of these are owed off the agent's turn, such as an event card's gift or a gold pick. Then `wait_for_turn` wakes it with a note saying what is asked. OpenHex has no names for the expansions, so their state, actions and events are TwoSheep additions in the same style.
|
|
57
|
+
- **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.
|
|
58
|
+
- **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.
|
|
59
|
+
- **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
60
|
- **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
61
|
- **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,
|
|
62
|
+
- **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
63
|
|
|
53
64
|
## Custom maps
|
|
54
65
|
|
|
@@ -60,7 +71,7 @@ It replies with a link that opens the map in the site's map editor.
|
|
|
60
71
|
- **Checks:** the agent refuses to save a map that couldn't be played, such as one with numbers on a desert, a port inland, or a robber at sea. It also warns about legal but unusual choices, such as 6s next to 8s, islands without Seafarers, or a resource nothing produces.
|
|
61
72
|
- **Who can find it:** maps are unlisted, so only people with the link find them. Only signed-in people can publish maps, so the agent can't.
|
|
62
73
|
- **Changing a map:** the agent can update the maps it made, which saves a new version. It can read any map by its id, so you can give it a link to a map to copy.
|
|
63
|
-
- **Playing on it:** the agent
|
|
74
|
+
- **Playing on it:** the agent plays maps with every feature but Cities & Knights, more than one robber and a skipped starting settlement. The map's overview says whether it can.
|
|
64
75
|
|
|
65
76
|
## The agent's account
|
|
66
77
|
|
|
@@ -76,7 +87,7 @@ Put options after the package name, for example `npx -y @2sheep/mcp@latest --pro
|
|
|
76
87
|
| Option | What it does |
|
|
77
88
|
|---|---|
|
|
78
89
|
| `--profile <name>` | Use a separate account. Two agents on one machine need different profiles to play each other. |
|
|
79
|
-
| `--format coordinates\|indices` | Show board positions as OpenHex cube coordinates (the default), or as numbered positions on the standard board. |
|
|
90
|
+
| `--format coordinates\|indices` | Show board positions as OpenHex cube coordinates (the default), or as numbered positions on the standard board (base games on that board only). |
|
|
80
91
|
| `--emulator` | For development: use local Firebase emulators instead of the live site. The other `--emulator-*` options set their host, ports and project. |
|
|
81
92
|
| `--version`, `--help` | Print the version, or the options, and exit. |
|
|
82
93
|
|
|
@@ -87,11 +98,11 @@ Put options after the package name, for example `npx -y @2sheep/mcp@latest --pro
|
|
|
87
98
|
| `whoami` | Sign in, and return the agent's user id and name. |
|
|
88
99
|
| `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
100
|
| `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. |
|
|
101
|
+
| `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
102
|
| `act` | Play an action: an id from the legal actions, or an OpenHex action. |
|
|
92
103
|
| `get_state`, `get_legal_actions`, `get_events` | Read the game as the agent sees it. |
|
|
93
104
|
| `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
|
|
105
|
+
| `resign` | Resign a 1v1 game. |
|
|
95
106
|
| `check_map` | Check a map without saving it: errors, warnings, and an overview of its terrain, numbers, production per resource and ports. |
|
|
96
107
|
| `create_map` | Save a new map, unlisted unless asked otherwise, and return its link. |
|
|
97
108
|
| `update_map` | Save a new version of a map the agent made. |
|