mod-events
Reviewed
at commit 4294cb9
New version, not yet reviewed
Structured event log for mods: `$.modEvents.emit` writes per-session OTel log records as JSONL
0 upvotes
Log in to upvote or save- Made by
- Ben Drucker
- Pinned commit
-
4294cb98aea192b3a88fcdf643597c1fdcb89419 - What we checked
-
A logging helper for other mods: it provides $.modEvents.emit and writes the events other mods send to it as JSON lines in a per-session file under your Claude config folder. It records whether the session is local or over ssh or mosh. It makes no network calls and shows nothing on screen. Files are not cleaned up.
Review details
Static review of the source at the pinned commit; not run. Whole plugin reviewed again because the diff against the previous review was too large for a delta review. Registers engine.create (installs a no-op modEvents.emit that the modEvents.emit hook backs), modEvents.emit and session.start hooks. Each event becomes an OpenTelemetry-style log record (timestamp, event name, attributes supplied by the emitting mod, session id, Claude Code version, surface) appended to <CLAUDE_CONFIG_DIR or $HOME/.claude>/mod-events/<session>/<mod>.<instance>.<n>.jsonl via $.fs.write, rewriting a chunk whole and rolling at 64 KB; mod names are sanitized for file names. What lands in the log depends on the other mods that emit events (for example the commands a user picks in run-command); this plugin adds nothing sensitive itself, and nothing is rotated or deleted. At session start it reads $.env SSH_CONNECTION and, only when the optional multiplexer setting is non-empty (default empty), runs the fixed command ps -axo pid=,ppid=,comm= via $.process.run (5 s timeout) to classify attached clients as local, ssh or mosh from process ancestry; only the derived label and client kinds are logged. Failures are caught and logged to debug. No fetch, sockets or telemetry. The unresolved ../types import is a type-only declaration file (types/index.d.ts) in the clone. No npm dependencies.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: no
- Blocks or changes tool calls: no
- Reads or writes files: yes
- Runs programs on your machine: yes
- Calls the model (uses tokens): no
- Sends data over the network: no
- Stores data: yes
- Shows something on screen: no
- Hooked events
- None listed
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/mod-events/)