@leafarcade/cli 0.1.0-alpha.4 → 0.1.0
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 +12 -12
- package/dist/cli.mjs +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Let your own agent play a private board-game room while you use the browser board. The CLI reads positions and submits moves; it does not call a model, collect model credentials or implement its own opponent.
|
|
4
4
|
|
|
5
|
-
**
|
|
5
|
+
**Scope of 0.1.0:** all 43 multiplayer games in private, unclocked, unrated rooms. Nine games expose complete local legal-action lists; the others expose player-visible state and game-specific JSON action formats, validated by the game service. OAuth login, seat-scoped pairing and automatic waking of a stopped agent are not implemented. Anyone with an invite can currently occupy an open seat under the existing private-room rules. Use private invites you trust.
|
|
6
6
|
|
|
7
7
|
## Start a game from your agent
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npx @leafarcade/cli@
|
|
10
|
+
npx @leafarcade/cli@0.1.0 game create --game connect-four --name "My agent" --open
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
This creates a private, unrated room with the CLI agent as host, saves its session, and opens the human's browser invitation. The human joins with their own name and session. Once the requested players are present, the agent reads status and starts with the latest revision:
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
|
-
npx @leafarcade/cli@
|
|
17
|
-
npx @leafarcade/cli@
|
|
16
|
+
npx @leafarcade/cli@0.1.0 game status --room ROOMCODE
|
|
17
|
+
npx @leafarcade/cli@0.1.0 game start --room ROOMCODE --revision R
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Omit `--open` on a remote or headless machine and share the returned URL. If launching the browser fails, the room is still valid: open that URL manually or use `leafarcade game open --room ROOMCODE`. No agent credential is placed in the URL. `--capacity N` selects a supported seat count (default: the game's minimum); Go also supports `--go-size 9|13|19`. For a custom service, provide both `--server` and its matching browser frontend `--site`.
|
|
@@ -24,27 +24,27 @@ The CLI stores a persistent creator identity so creating another room does not r
|
|
|
24
24
|
## Install the agent skill
|
|
25
25
|
|
|
26
26
|
```sh
|
|
27
|
-
npx @leafarcade/cli@
|
|
28
|
-
npx @leafarcade/cli@
|
|
27
|
+
npx @leafarcade/cli@0.1.0 skill show
|
|
28
|
+
npx @leafarcade/cli@0.1.0 skill install --agent codex
|
|
29
29
|
# Or:
|
|
30
|
-
npx @leafarcade/cli@
|
|
30
|
+
npx @leafarcade/cli@0.1.0 skill install --agent claude
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
The skill is bundled in the npm package and works without a separate download. Installation is explicit; there is no npm postinstall hook. Codex installs into `$CODEX_HOME/skills/leafarcade` (default `~/.codex/skills/leafarcade`); Claude uses `~/.claude/skills/leafarcade`. Existing customized skills are preserved. Refresh your agent's skills and ask it to play Leaf Arcade. The [public skill repository](https://github.com/leafarcade/skills) contains usage instructions; the CLI source repository remains private. The npm JavaScript executable is publicly downloadable.
|
|
34
34
|
|
|
35
35
|
## Install
|
|
36
36
|
|
|
37
|
-
Requires Node.js 24 or later. Release 0.1.0
|
|
37
|
+
Requires Node.js 24 or later. Release 0.1.0 includes room creation, browser opening, host start and bundled skill installation:
|
|
38
38
|
|
|
39
39
|
```sh
|
|
40
|
-
npm install --global @leafarcade/cli@
|
|
40
|
+
npm install --global @leafarcade/cli@0.1.0
|
|
41
41
|
leafarcade --help
|
|
42
42
|
leafarcade help games
|
|
43
43
|
leafarcade help chess
|
|
44
44
|
leafarcade game play --help --game chess
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
Without a global install, use `npx @leafarcade/cli@
|
|
47
|
+
Without a global install, use `npx @leafarcade/cli@0.1.0 ...` in place of `leafarcade ...`. From the repository, run `npm run build --prefix packages/cli` and replace `leafarcade` with `node packages/cli/dist/cli.mjs`. The installed package has no runtime dependencies or install scripts.
|
|
48
48
|
|
|
49
49
|
## First game
|
|
50
50
|
|
|
@@ -100,7 +100,7 @@ Wire indexes are zero-based. The server validates the phase, ownership and legal
|
|
|
100
100
|
leafarcade game status --room ABCDEFGHJK
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
Use `game pause --room CODE --revision R` to explicitly take a break. The pause persists and blocks moves until the player who paused runs `game resume` or resumes in the browser. A finished result includes `terminal_reason`; do not infer resignation from silence. The private local session survives terminal exits. No process needs to run between moves. Current rooms expire seven days after the last move, and guest credentials have a separate 30-day lease. This
|
|
103
|
+
Use `game pause --room CODE --revision R` to explicitly take a break. The pause persists and blocks moves until the player who paused runs `game resume` or resumes in the browser. A finished result includes `terminal_reason`; do not infer resignation from silence. The private local session survives terminal exits. No process needs to run between moves. Current rooms expire seven days after the last move, and guest credentials have a separate 30-day lease. This release does not extend those limits or silently enable a clock. A `waiting` result is normal: end this agent turn and resume later. Do not loop a 25-second wait all day. For an actively running agent that can hold a command open, a bounded wait of up to 3,600 seconds is supported; disconnecting or closing the terminal does not wake an agent later.
|
|
104
104
|
|
|
105
105
|
## Commands
|
|
106
106
|
|
|
@@ -124,7 +124,7 @@ Local credentials are stored under `~/.config/leafarcade/`, in separate service/
|
|
|
124
124
|
|
|
125
125
|
`--server https://...` selects a service. HTTP is permitted only on localhost for development. Credentials are bound to the selected origin; redirects are refused. The default is the existing Leaf Arcade multiplayer Worker. No backend or inference service is hosted by this package, but room traffic still consumes the multiplayer provider's budget and your agent's model use follows its own plan.
|
|
126
126
|
|
|
127
|
-
If you accidentally join an unsupported room, the service may already have reserved your seat before the CLI can inspect its game. Use `game leave` with the current revision shown by the browser host, or create a fresh room; do not discard a session needed to leave.
|
|
127
|
+
If you accidentally join an unsupported room, the service may already have reserved your seat before the CLI can inspect its game. Use `game leave` with the current revision shown by the browser host, or create a fresh room; do not discard a session needed to leave. The current CLI keeps the existing invitation rules; seat-scoped pairing remains future work.
|
|
128
128
|
|
|
129
129
|
## Suggested instruction for your agent
|
|
130
130
|
|
package/dist/cli.mjs
CHANGED
|
@@ -4732,7 +4732,7 @@ async function installSkill(agent = "codex") {
|
|
|
4732
4732
|
// packages/cli/package.json
|
|
4733
4733
|
var package_default = {
|
|
4734
4734
|
name: "@leafarcade/cli",
|
|
4735
|
-
version: "0.1.0
|
|
4735
|
+
version: "0.1.0",
|
|
4736
4736
|
private: false,
|
|
4737
4737
|
description: "Create private browser board games and play with your AI agent. Includes 43 games and an installable Codex/Claude skill.",
|
|
4738
4738
|
type: "module",
|
|
@@ -4757,7 +4757,7 @@ var package_default = {
|
|
|
4757
4757
|
publishConfig: {
|
|
4758
4758
|
access: "public",
|
|
4759
4759
|
registry: "https://registry.npmjs.org/",
|
|
4760
|
-
tag: "
|
|
4760
|
+
tag: "latest"
|
|
4761
4761
|
},
|
|
4762
4762
|
keywords: [
|
|
4763
4763
|
"leafarcade",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafarcade/cli",
|
|
3
|
-
"version": "0.1.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Create private browser board games and play with your AI agent. Includes 43 games and an installable Codex/Claude skill.",
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public",
|
|
27
27
|
"registry": "https://registry.npmjs.org/",
|
|
28
|
-
"tag": "
|
|
28
|
+
"tag": "latest"
|
|
29
29
|
},
|
|
30
30
|
"keywords": [
|
|
31
31
|
"leafarcade",
|