@claudecam/hook 0.1.2 → 0.1.4

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.
Files changed (2) hide show
  1. package/README.md +58 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # @claudecam/hook
2
+
3
+ Ultra-lightweight hook binary for [Claude Agent Monitor (CAM)](https://github.com/pedropauloai/claude-agent-monitor) -- Mission Control for Claude Code agents.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@claudecam/hook)](https://www.npmjs.com/package/@claudecam/hook)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/pedropauloai/claude-agent-monitor/blob/main/LICENSE)
7
+
8
+ ## What This Package Does
9
+
10
+ Captures Claude Code hook events and sends them to the CAM server. Designed to be as fast and invisible as possible.
11
+
12
+ **Key properties:**
13
+ - **Zero external dependencies** -- uses only native Node.js `http` module
14
+ - **< 10ms latency** -- never blocks Claude Code
15
+ - **Fails silently** -- if the CAM server is down, nothing breaks
16
+ - **WSL auto-detection** -- automatically resolves Windows host IP when running in WSL
17
+ - **Retry with fallback** -- tries configured host, then localhost, then 127.0.0.1
18
+
19
+ ## Hook Events Captured
20
+
21
+ | Hook | When it fires |
22
+ |------|--------------|
23
+ | `SessionStart` | Claude Code session begins |
24
+ | `SessionEnd` | Session ends |
25
+ | `PreToolUse` | Before every tool call |
26
+ | `PostToolUse` | After tool call completes |
27
+ | `PostToolUseFailure` | When a tool call fails |
28
+ | `UserPromptSubmit` | User sends a prompt |
29
+ | `Notification` | Claude Code notification |
30
+ | `Stop` | Main agent stops |
31
+ | `SubagentStart` | Teammate agent starts |
32
+ | `SubagentStop` | Teammate agent stops |
33
+
34
+ ## Usage
35
+
36
+ This package is configured automatically by `@claudecam/cli`. You typically don't install it directly.
37
+
38
+ ```bash
39
+ # Recommended: let the CLI handle everything
40
+ npx @claudecam/cli start
41
+ ```
42
+
43
+ ## Debug Mode
44
+
45
+ ```bash
46
+ export CAM_DEBUG=1
47
+ # Hook will log connection attempts and payloads to stderr
48
+ ```
49
+
50
+ ## Links
51
+
52
+ - [GitHub Repository](https://github.com/pedropauloai/claude-agent-monitor)
53
+ - [Full Documentation](https://github.com/pedropauloai/claude-agent-monitor#readme)
54
+ - [CLI Package](https://www.npmjs.com/package/@claudecam/cli)
55
+
56
+ ## License
57
+
58
+ [MIT](https://github.com/pedropauloai/claude-agent-monitor/blob/main/LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudecam/hook",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Ultra-lightweight CLI binary for Claude Code hooks",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,7 +19,7 @@
19
19
  "dist"
20
20
  ],
21
21
  "dependencies": {
22
- "@claudecam/shared": "0.1.0"
22
+ "@claudecam/shared": "0.1.1"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "^22.0.0",