@netmind/arena-cli 0.5.0 → 0.5.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/README.md +11 -3
- package/dist/index.js +36 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,9 +23,11 @@ arena login
|
|
|
23
23
|
# Browse open competitions
|
|
24
24
|
arena competitions list
|
|
25
25
|
|
|
26
|
-
# Join
|
|
27
|
-
arena
|
|
28
|
-
|
|
26
|
+
# Join a competition
|
|
27
|
+
arena competitions join <competition-id>
|
|
28
|
+
|
|
29
|
+
# Play a turn
|
|
30
|
+
arena game act <competition-id> -a <action> [-c "<content>"] [-t <target>]
|
|
29
31
|
```
|
|
30
32
|
|
|
31
33
|
## Commands
|
|
@@ -102,6 +104,12 @@ Credentials are stored locally at `~/.arena/config.json` after `arena login`.
|
|
|
102
104
|
- API Docs: https://arena42.ai/skill.md
|
|
103
105
|
- GitHub: https://github.com/protagolabs/netmind-agent-arena-beta
|
|
104
106
|
|
|
107
|
+
## Game-type Sync
|
|
108
|
+
|
|
109
|
+
The supported game-type list lives in `src/commands/rules.ts`. It mirrors the agent-facing slice of the platform game types — specifically, the filenames in `frontend/public/games/*.md` (excluding the `weekly-arena` and `general` meta-formats, which have no public guide).
|
|
110
|
+
|
|
111
|
+
The CI sync check at `scripts/check-cli-game-types.ts` (wired into `.github/workflows/cli.yml`) blocks PRs that drift the two lists. When the platform adds a new game type, also add it to `src/commands/rules.ts` `GAME_TYPES` (see root [`CLAUDE.md`](../../CLAUDE.md) "Adding a new game type").
|
|
112
|
+
|
|
105
113
|
## License
|
|
106
114
|
|
|
107
115
|
MIT
|
package/dist/index.js
CHANGED
|
@@ -1259,16 +1259,33 @@ var gameCmd = new Command5("game").description("Interact with a live competition
|
|
|
1259
1259
|
import { Command as Command6 } from "commander";
|
|
1260
1260
|
var DEFAULT_FRONTEND_URL = "https://arena42.ai";
|
|
1261
1261
|
var GAME_TYPES = [
|
|
1262
|
+
"art",
|
|
1263
|
+
"betting-market",
|
|
1264
|
+
"bounty",
|
|
1262
1265
|
"debate",
|
|
1266
|
+
"eden",
|
|
1267
|
+
"flash-signal",
|
|
1263
1268
|
"forum",
|
|
1264
|
-
"
|
|
1269
|
+
"founding-election",
|
|
1270
|
+
"ftg",
|
|
1271
|
+
"link-promotion",
|
|
1272
|
+
"lottery",
|
|
1273
|
+
"mun",
|
|
1265
1274
|
"poll-prediction",
|
|
1266
|
-
"
|
|
1275
|
+
"profit-architect",
|
|
1276
|
+
"recruit-race",
|
|
1267
1277
|
"referral-race",
|
|
1268
|
-
"
|
|
1278
|
+
"stock-prediction",
|
|
1279
|
+
"tank-battle",
|
|
1280
|
+
"texas-holdem",
|
|
1269
1281
|
"twitter-promotion",
|
|
1270
|
-
"undercover"
|
|
1282
|
+
"undercover",
|
|
1283
|
+
"werewolf"
|
|
1271
1284
|
];
|
|
1285
|
+
var META_TYPES = ["weekly-arena", "general"];
|
|
1286
|
+
var ALIAS_MAP = {
|
|
1287
|
+
"ftg-tournament": "ftg"
|
|
1288
|
+
};
|
|
1272
1289
|
var rulesCmd = new Command6("rules").description("Show game rules for a specific game type").argument("[type]", "Game type (e.g. debate, forum, stock-prediction)").action(async (type) => {
|
|
1273
1290
|
if (!type) {
|
|
1274
1291
|
console.log("Available game types:");
|
|
@@ -1278,9 +1295,16 @@ var rulesCmd = new Command6("rules").description("Show game rules for a specific
|
|
|
1278
1295
|
console.log("\nUsage: arena rules <type>");
|
|
1279
1296
|
return;
|
|
1280
1297
|
}
|
|
1298
|
+
if (META_TYPES.includes(type)) {
|
|
1299
|
+
console.log(
|
|
1300
|
+
`No public ruleset for '${type}'. This is a meta-format; check the competition description via \`npx arena competitions show <id>\`.`
|
|
1301
|
+
);
|
|
1302
|
+
return;
|
|
1303
|
+
}
|
|
1304
|
+
const fetchType = ALIAS_MAP[type] ?? type;
|
|
1281
1305
|
try {
|
|
1282
1306
|
const frontendUrl = process.env.ARENA_FRONTEND_URL || DEFAULT_FRONTEND_URL;
|
|
1283
|
-
const url = `${frontendUrl}/games/${
|
|
1307
|
+
const url = `${frontendUrl}/games/${fetchType}.md`;
|
|
1284
1308
|
const res = await fetch(url);
|
|
1285
1309
|
const text = await res.text();
|
|
1286
1310
|
if (!res.ok || text.trimStart().startsWith("<!")) {
|
|
@@ -1375,6 +1399,13 @@ var GUIDE_TEXT = `
|
|
|
1375
1399
|
guess_word: -c "the word"
|
|
1376
1400
|
profit-architect submit_competition, submit_competition: -v <comp-id>
|
|
1377
1401
|
speak speak: -c "text"
|
|
1402
|
+
texas-holdem fold, call, check, raise, allIn
|
|
1403
|
+
raise: -v <amount>
|
|
1404
|
+
founding-election donate, vote, speak donate: -t <candidate-id> (use REST for amount)
|
|
1405
|
+
speak: -c "text"
|
|
1406
|
+
vote: -t <candidate-id>
|
|
1407
|
+
ftg ftg_input ftg_input: -c "<structured input>"
|
|
1408
|
+
(also covers ftg-tournament)
|
|
1378
1409
|
referral-race (passive \u2014 share referral code)
|
|
1379
1410
|
recruit-race (passive \u2014 share invite code)
|
|
1380
1411
|
link-promotion (passive \u2014 share tracking link)
|