Commit graph

5 commits

Author SHA1 Message Date
pyr0ball
0c2d245632 fix: SESSION_FILE shadow bug + hooks matcher + 5 security/privacy mons
state.sh used SESSION_FILE for session.json (global tracking data).
Both hook handlers override SESSION_FILE to sessions/<pgrp>.json for
per-session isolation. buddymon_session_reset() at session-stop end
was writing _version:1 data INTO sessions/<pgrp>.json, leaving stale
wrong-format session files that broke buddy lookup.

Fix: rename state.sh variable to SESSION_DATA_FILE — no more collision.

Also:
- Add matcher:'*' to SessionStart and Stop hooks (CC 2.x compatibility)
- Add dead-session GC to session-start.sh (cleans up orphaned PGRP files)
- Add 5 new privacy/security bug_monsters:
  LeakWraith (uncommon) — exposed credentials
  CipherNull (uncommon) — weak/broken crypto (MD5, ECB, rand() for secrets)
  ConsentShadow (rare)  — tracking/analytics without consent (CF flagship villain)
  ThrottleDemon (common) — ignored 429s and missing backoff
  PrivacyLich (legendary) — GDPR/CCPA/breach debt; unkillable, only containable
2026-04-05 23:24:27 -07:00
pyr0ball
7b9e78a501 fix: add matcher field to UserPromptSubmit hook (semgrep pattern) 2026-04-01 23:13:27 -07:00
pyr0ball
9b13150d1b feat: UserPromptSubmit hook for encounter announcements
Bash PostToolUse additionalContext is silently dropped by CC — encounters
are written to state but never surfaced. Fix with a two-phase approach:

- PostToolUse (Bash): detects error, writes encounter with announced:false
- UserPromptSubmit: fires on next user message, checks for unannounced
  encounter, surfaces it once, marks announced:true so dedup loop breaks

Removes debug scaffolding and the format_encounter_message call from the
Bash hook (announcement is now fully owned by user-prompt-submit.py).
2026-04-01 23:08:57 -07:00
pyr0ball
b81f39bfcd fix: plugin registration and reload survival
- plugin.json: flatten repository to string, remove extra fields that
  failed CC schema validation (caused 'Unknown skill' on reload)
- hooks.json: remove escaped quotes from command paths (matched hookify
  reference implementation)
- install.sh: register 'local' marketplace in known_marketplaces.json
  so CC doesn't GC the cache symlink on /reload-plugins
2026-04-01 16:52:09 -07:00
pyr0ball
f3d1f45253 feat: initial Buddymon plugin
Claude Code plugin — collectible creatures discovered through coding.

- Bug monsters spawn from error output (NullWraith, RacePhantom, ShadowBit, 11 total)
- 5 Buddymon with affinities, challenges, and evolution chains
- SessionStart hook injects active buddy + challenge into system context
- PostToolUse hook detects error patterns, new languages, and commit events
- Stop hook tallies XP and checks challenge completion
- Single /buddymon command with start/assign/fight/catch/roster subcommands
- Local state in ~/.claude/buddymon/ (roster, encounters, active, session)
2026-04-01 15:11:46 -07:00