@umang-boss/claudemon 1.2.1 → 1.3.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 +13 -4
- package/dist/src/server/tools/starter.js +24 -2
- package/package.json +2 -3
- package/src/server/tools/starter.ts +21 -2
package/README.md
CHANGED
|
@@ -24,22 +24,31 @@ fill your Pokedex -- all while you code.
|
|
|
24
24
|
|
|
25
25
|
## Install
|
|
26
26
|
|
|
27
|
+
**Recommended (global install — persistent):**
|
|
28
|
+
```bash
|
|
29
|
+
npm install -g @umang-boss/claudemon
|
|
30
|
+
claudemon install
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Or quick try (npx — may need reinstall after cache clear):**
|
|
27
34
|
```bash
|
|
28
35
|
npx @umang-boss/claudemon install
|
|
29
36
|
```
|
|
30
37
|
|
|
31
|
-
|
|
38
|
+
Start a new Claude Code session and type `/buddy` to begin!
|
|
32
39
|
|
|
33
40
|
**Requirements:** Node.js 18+ (Bun optional, auto-detected for faster startup)
|
|
34
41
|
|
|
35
42
|
### Other CLI Commands
|
|
36
43
|
|
|
37
44
|
```bash
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
claudemon doctor # Check installation health
|
|
46
|
+
claudemon update # Re-register after updates
|
|
47
|
+
claudemon uninstall # Remove (preserves save data)
|
|
41
48
|
```
|
|
42
49
|
|
|
50
|
+
> **Note:** `npm install -g` is recommended over `npx` because the MCP server path needs to persist. With `npx`, the path points to a temporary cache that may be cleaned up.
|
|
51
|
+
|
|
43
52
|
## Commands
|
|
44
53
|
|
|
45
54
|
Once installed, use `/buddy` in Claude Code:
|
|
@@ -56,10 +56,32 @@ async function getStarters() {
|
|
|
56
56
|
catch {
|
|
57
57
|
// No saved options or expired — generate new ones
|
|
58
58
|
}
|
|
59
|
-
// Generate fresh random 3
|
|
59
|
+
// Generate fresh random 3 with different primary types
|
|
60
60
|
const seed = hashString(`claudemon-${Date.now()}-${Math.random()}`);
|
|
61
61
|
const shuffled = seededShuffle(STARTER_POOL, seed);
|
|
62
|
-
const starters = [
|
|
62
|
+
const starters = [];
|
|
63
|
+
const usedTypes = new Set();
|
|
64
|
+
for (const id of shuffled) {
|
|
65
|
+
if (starters.length >= 3)
|
|
66
|
+
break;
|
|
67
|
+
const pokemon = POKEMON_BY_ID.get(id);
|
|
68
|
+
if (!pokemon)
|
|
69
|
+
continue;
|
|
70
|
+
const primaryType = pokemon.types[0];
|
|
71
|
+
if (usedTypes.has(primaryType))
|
|
72
|
+
continue;
|
|
73
|
+
usedTypes.add(primaryType);
|
|
74
|
+
starters.push(id);
|
|
75
|
+
}
|
|
76
|
+
// Fallback if not enough unique types (shouldn't happen with 39 starters)
|
|
77
|
+
if (starters.length < 3) {
|
|
78
|
+
for (const id of shuffled) {
|
|
79
|
+
if (starters.length >= 3)
|
|
80
|
+
break;
|
|
81
|
+
if (!starters.includes(id))
|
|
82
|
+
starters.push(id);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
63
85
|
// Save for consistency until they pick
|
|
64
86
|
try {
|
|
65
87
|
const { writeFile, mkdir } = await import("node:fs/promises");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umang-boss/claudemon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Pokemon coding companion for Claude Code — Gotta code 'em all!",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/server/index.js",
|
|
@@ -33,8 +33,7 @@
|
|
|
33
33
|
"test": "bun test",
|
|
34
34
|
"typecheck": "tsc --noEmit",
|
|
35
35
|
"format": "prettier --write \"src/**/*.ts\" \"cli/**/*.ts\" \"scripts/**/*.ts\" \"tests/**/*.ts\" --ignore-unknown",
|
|
36
|
-
"format:check": "prettier --check \"src/**/*.ts\" \"cli/**/*.ts\" \"scripts/**/*.ts\" \"tests/**/*.ts\" --ignore-unknown"
|
|
37
|
-
"prepare": "husky"
|
|
36
|
+
"format:check": "prettier --check \"src/**/*.ts\" \"cli/**/*.ts\" \"scripts/**/*.ts\" \"tests/**/*.ts\" --ignore-unknown"
|
|
38
37
|
},
|
|
39
38
|
"dependencies": {
|
|
40
39
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
@@ -65,10 +65,29 @@ async function getStarters(): Promise<number[]> {
|
|
|
65
65
|
// No saved options or expired — generate new ones
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
// Generate fresh random 3
|
|
68
|
+
// Generate fresh random 3 with different primary types
|
|
69
69
|
const seed = hashString(`claudemon-${Date.now()}-${Math.random()}`);
|
|
70
70
|
const shuffled = seededShuffle(STARTER_POOL, seed);
|
|
71
|
-
const starters
|
|
71
|
+
const starters: number[] = [];
|
|
72
|
+
const usedTypes = new Set<string>();
|
|
73
|
+
|
|
74
|
+
for (const id of shuffled) {
|
|
75
|
+
if (starters.length >= 3) break;
|
|
76
|
+
const pokemon = POKEMON_BY_ID.get(id);
|
|
77
|
+
if (!pokemon) continue;
|
|
78
|
+
const primaryType = pokemon.types[0];
|
|
79
|
+
if (usedTypes.has(primaryType)) continue;
|
|
80
|
+
usedTypes.add(primaryType);
|
|
81
|
+
starters.push(id);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Fallback if not enough unique types (shouldn't happen with 39 starters)
|
|
85
|
+
if (starters.length < 3) {
|
|
86
|
+
for (const id of shuffled) {
|
|
87
|
+
if (starters.length >= 3) break;
|
|
88
|
+
if (!starters.includes(id)) starters.push(id);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
72
91
|
|
|
73
92
|
// Save for consistency until they pick
|
|
74
93
|
try {
|