@claudecam/hook 0.1.1 → 0.1.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/README.md +58 -0
- package/dist/index.js +0 -0
- package/package.json +9 -10
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
|
+
[](https://www.npmjs.com/package/@claudecam/hook)
|
|
6
|
+
[](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/dist/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claudecam/hook",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Ultra-lightweight CLI binary for Claude Code hooks",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -18,15 +18,8 @@
|
|
|
18
18
|
"files": [
|
|
19
19
|
"dist"
|
|
20
20
|
],
|
|
21
|
-
"scripts": {
|
|
22
|
-
"build": "tsc",
|
|
23
|
-
"dev": "tsc --watch",
|
|
24
|
-
"typecheck": "tsc --noEmit",
|
|
25
|
-
"clean": "rm -rf dist",
|
|
26
|
-
"prepack": "pnpm run build"
|
|
27
|
-
},
|
|
28
21
|
"dependencies": {
|
|
29
|
-
"@claudecam/shared": "
|
|
22
|
+
"@claudecam/shared": "0.1.1"
|
|
30
23
|
},
|
|
31
24
|
"devDependencies": {
|
|
32
25
|
"@types/node": "^22.0.0",
|
|
@@ -49,5 +42,11 @@
|
|
|
49
42
|
"author": "CAM Contributors",
|
|
50
43
|
"publishConfig": {
|
|
51
44
|
"access": "public"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "tsc",
|
|
48
|
+
"dev": "tsc --watch",
|
|
49
|
+
"typecheck": "tsc --noEmit",
|
|
50
|
+
"clean": "rm -rf dist"
|
|
52
51
|
}
|
|
53
|
-
}
|
|
52
|
+
}
|