Skip to content

Commit 00a7ff0

Browse files
amit221claude
andcommitted
fix: new players start with full energy and complete plugin manifest
New players were initialized with 5 energy instead of the configured max (30). Also adds missing hooks, skills, and mcpServers fields to the Claude Code plugin manifest, and bundles CLI into scripts/ so hooks work without dist/ directory. Closes #8 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 654fc0c commit 00a7ff0

8 files changed

Lines changed: 2727 additions & 343 deletions

File tree

.claude-plugin/plugin.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,13 @@
1313
"creatures",
1414
"collection",
1515
"pokemon"
16-
]
16+
],
17+
"hooks": "./hooks/hooks.json",
18+
"skills": "./skills/",
19+
"mcpServers": {
20+
"compi": {
21+
"command": "node",
22+
"args": ["./scripts/mcp-server.js"]
23+
}
24+
}
1725
}

CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Game state persists to `~/.compi/state.json` (override with `COMPI_STATE_PATH` e
1111
## Commands
1212

1313
```bash
14-
npm run build # TypeScript → dist/ (tsc)
14+
npm run build # TypeScript type-check (tsc)
15+
npm run bundle # esbuild → scripts/ (bundled CLI + MCP servers)
1516
npm test # Run all tests (Jest with ts-jest)
1617
npm run test:watch # Watch mode
1718
npm run dev # tsc --watch

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
"name": "compi",
33
"version": "0.2.3",
44
"description": "A terminal creature collection game — catch digital beings as you work",
5-
"main": "dist/index.js",
5+
"main": "scripts/cli.js",
66
"bin": {
7-
"compi": "dist/cli.js"
7+
"compi": "scripts/cli.js"
88
},
99
"scripts": {
10-
"build": "tsc && npm run bundle",
11-
"bundle": "esbuild src/mcp-server.ts src/mcp-server-cursor.ts --bundle --platform=node --format=cjs --target=node20 --outdir=scripts --allow-overwrite",
10+
"build": "tsc",
11+
"build:all": "tsc && npm run bundle",
12+
"bundle": "esbuild src/mcp-server.ts src/mcp-server-cursor.ts src/cli.ts --bundle --platform=node --format=cjs --target=node20 --outdir=scripts --allow-overwrite",
1213
"test": "jest",
1314
"test:watch": "jest --watch",
1415
"dev": "tsc --watch"
@@ -22,7 +23,6 @@
2223
],
2324
"license": "MIT",
2425
"files": [
25-
"dist/",
2626
"scripts/",
2727
"skills/",
2828
"cursor-skills/",
@@ -31,7 +31,7 @@
3131
".cursor-plugin/",
3232
"README.md"
3333
],
34-
"prepublishOnly": "npm run build",
34+
"prepublishOnly": "npm run build:all",
3535
"devDependencies": {
3636
"@types/jest": "^29.5.12",
3737
"@types/node": "^20.14.0",

scripts/cli.js

Lines changed: 2374 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)