@2sheep/mcp 0.1.0 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +22 -2
  2. package/dist/cli.js +34 -8
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -44,10 +44,24 @@ Other clients take the usual JSON:
44
44
  Create a 1v1 lobby on TwoSheep and give your agent the code: "Join TwoSheep lobby K7QM2P and play the game."
45
45
  Or ask it to make one: "Create a TwoSheep lobby, tell me the code, then play."
46
46
 
47
- - **Supported games:** 1v1 games of the base game on the standard board, with trades with the bank only. The agent refuses lobbies with expansions, rush, turbo, event cards, trades between players, the lazy or speed robber, changed starting placements, or a custom map.
47
+ - **Supported games:** 1v1 games of the base game, with trades with the bank only: on the standard board, or on a custom map that uses only base-game features. The agent refuses lobbies with expansions, rush, turbo, event cards, trades between players, 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
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. 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.
49
+ - **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
+ - **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.
49
51
  - **Pace:** the agent must move promptly. After 90 seconds idle, its opponent'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.
50
52
 
53
+ ## Custom maps
54
+
55
+ Describe a map and the agent builds it: "Make me a small island map with lots of ore and few ports."
56
+ It lays out the tiles, can have balanced number tokens and ports placed for it, checks the map, and saves it under its account.
57
+ It replies with a link that opens the map in the site's map editor.
58
+
59
+ - **What a map can have:** the six base terrains and deserts, plus expansion features: gold, fog, Fisherman lakes and fisheries, rivers and swamps, watering holes, a pirate, and more than one robber. Sea is wherever there is no tile. A map also carries its rules: points to win, discard limit, robber, expansions and setup.
60
+ - **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
+ - **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
+ - **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 itself plays only maps that use base-game features. The map's overview says whether it can.
64
+
51
65
  ## The agent's account
52
66
 
53
67
  The first time the agent signs in (its first tool call), the server creates an anonymous TwoSheep account for it, named `Agent-…`.
@@ -71,11 +85,17 @@ Put options after the package name, for example `npx -y @2sheep/mcp@latest --pro
71
85
  | Tool | What it does |
72
86
  |---|---|
73
87
  | `whoami` | Sign in, and return the agent's user id and name. |
74
- | `create_lobby` | Create a 1v1 lobby, and wait for an opponent to join. The game starts by itself. |
88
+ | `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. |
75
89
  | `join_lobby` | Join a lobby by its code, and wait for the game to start. |
76
90
  | `wait_for_turn` | Wait for the agent's move. Returns what happened since it last looked, the state, and its legal actions. |
77
91
  | `act` | Play an action: an id from the legal actions, or an OpenHex action. |
78
92
  | `get_state`, `get_legal_actions`, `get_events` | Read the game as the agent sees it. |
93
+ | `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. |
79
94
  | `resign` | Resign the game. |
95
+ | `check_map` | Check a map without saving it: errors, warnings, and an overview of its terrain, numbers, production per resource and ports. |
96
+ | `create_map` | Save a new map, unlisted unless asked otherwise, and return its link. |
97
+ | `update_map` | Save a new version of a map the agent made. |
98
+ | `get_map` | Read any map by its id, in the same format `create_map` takes. |
99
+ | `list_my_maps` | The maps the agent has made, with their links. |
80
100
 
81
101
  State, actions and events use [OpenHex](https://github.com/bovard/open-hex) JSON. Waiting tools return after 50 seconds by default, because many clients give up on a tool call after 60 seconds.