@umang-boss/claudemon 2.0.1 → 2.0.3
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/hooks/post-tool-use.sh +24 -3
- package/package.json +1 -1
- package/skills/buddy/SKILL.md +12 -1
package/hooks/post-tool-use.sh
CHANGED
|
@@ -12,21 +12,42 @@ _claudemon_post_tool_use() {
|
|
|
12
12
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
13
13
|
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
14
14
|
|
|
15
|
+
# ── Augment PATH for IDE extensions (VS Code, Cursor) ──────
|
|
16
|
+
# IDE extensions don't source ~/.bashrc, so nvm/bun may not be in PATH.
|
|
17
|
+
if [ -d "${HOME:-$USERPROFILE}/.bun/bin" ]; then
|
|
18
|
+
export PATH="${HOME:-$USERPROFILE}/.bun/bin:$PATH"
|
|
19
|
+
fi
|
|
20
|
+
if [ -d "${HOME:-$USERPROFILE}/.nvm/versions/node" ]; then
|
|
21
|
+
_NVM_NODE_DIR=$(ls -d "${HOME:-$USERPROFILE}"/.nvm/versions/node/*/bin 2>/dev/null | tail -1)
|
|
22
|
+
if [ -n "$_NVM_NODE_DIR" ]; then
|
|
23
|
+
export PATH="$_NVM_NODE_DIR:$PATH"
|
|
24
|
+
fi
|
|
25
|
+
fi
|
|
26
|
+
# Also check for fnm, volta, and other node version managers
|
|
27
|
+
[ -d "${HOME:-$USERPROFILE}/.local/share/fnm/aliases/default/bin" ] && export PATH="${HOME:-$USERPROFILE}/.local/share/fnm/aliases/default/bin:$PATH"
|
|
28
|
+
[ -d "${HOME:-$USERPROFILE}/.volta/bin" ] && export PATH="${HOME:-$USERPROFILE}/.volta/bin:$PATH"
|
|
29
|
+
|
|
15
30
|
# Find runtime and script paths
|
|
16
31
|
# Prefer bundled ESM (faster — no TS transpilation), fall back to bun+TS source
|
|
17
32
|
RUNTIME=""
|
|
18
33
|
AWARD_SCRIPT=""
|
|
19
34
|
COUNTER_SCRIPT=""
|
|
20
35
|
|
|
21
|
-
if [ -f "$PROJECT_DIR/dist/award-xp.mjs" ]; then
|
|
36
|
+
if [ -f "$PROJECT_DIR/dist/award-xp.mjs" ] && command -v node >/dev/null 2>&1; then
|
|
22
37
|
# Bundled ESM — use node (fastest)
|
|
23
38
|
RUNTIME="node"
|
|
24
39
|
AWARD_SCRIPT="$PROJECT_DIR/dist/award-xp.mjs"
|
|
25
40
|
COUNTER_SCRIPT="$PROJECT_DIR/dist/increment-counter.mjs"
|
|
26
41
|
elif [ -x "${HOME:-$USERPROFILE}/.bun/bin/bun" ]; then
|
|
42
|
+
# Absolute path — works even without PATH
|
|
27
43
|
RUNTIME="${HOME}/.bun/bin/bun"
|
|
28
|
-
|
|
29
|
-
|
|
44
|
+
if [ -f "$PROJECT_DIR/dist/award-xp.mjs" ]; then
|
|
45
|
+
AWARD_SCRIPT="$PROJECT_DIR/dist/award-xp.mjs"
|
|
46
|
+
COUNTER_SCRIPT="$PROJECT_DIR/dist/increment-counter.mjs"
|
|
47
|
+
else
|
|
48
|
+
AWARD_SCRIPT="$PROJECT_DIR/src/hooks/award-xp.ts"
|
|
49
|
+
COUNTER_SCRIPT="$PROJECT_DIR/src/hooks/increment-counter.ts"
|
|
50
|
+
fi
|
|
30
51
|
elif command -v bun >/dev/null 2>&1; then
|
|
31
52
|
RUNTIME="bun"
|
|
32
53
|
AWARD_SCRIPT="$PROJECT_DIR/src/hooks/award-xp.ts"
|
package/package.json
CHANGED
package/skills/buddy/SKILL.md
CHANGED
|
@@ -69,4 +69,15 @@ This ensures first-time users get the starter selection flow automatically.
|
|
|
69
69
|
| `help` | `buddy_help` — show categorized command reference |
|
|
70
70
|
|
|
71
71
|
Pass $ARGUMENTS to determine which subcommand to route to.
|
|
72
|
-
|
|
72
|
+
|
|
73
|
+
## CRITICAL: Output Display Rules
|
|
74
|
+
|
|
75
|
+
After calling any buddy tool, you MUST:
|
|
76
|
+
1. Copy the FULL tool result text into your response as visible output to the user
|
|
77
|
+
2. Do NOT just say "Called claudemon" — the user needs to SEE the actual result
|
|
78
|
+
3. Do NOT summarize, rephrase, or omit any part of the tool output
|
|
79
|
+
4. Display the tool output EXACTLY as returned, preserving all formatting
|
|
80
|
+
5. If the tool returns text with happiness, XP, reactions, stats, or any content — print ALL of it
|
|
81
|
+
|
|
82
|
+
Example of WRONG behavior: just showing "Called claudemon" with no visible output
|
|
83
|
+
Example of CORRECT behavior: showing the full text like "*Pikachu's cheeks spark warmly*\n\nHappiness: 220 -> 225\n+2 XP"
|