claude-live 2.0.6 → 2.0.7
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/commands/server.md +10 -1
- package/hooks/hooks.json +161 -0
- package/package.json +1 -1
- package/server/index.js +2 -1
package/commands/server.md
CHANGED
|
@@ -26,7 +26,7 @@ Use `/health` endpoint — not SSE stream (SSE causes false negatives with short
|
|
|
26
26
|
curl -sf http://localhost:43451/health -m 2
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
Returns `{"ok":true,"clients":<N>,"port":43451}` when running.
|
|
29
|
+
Returns `{"ok":true,"version":"X.Y.Z","clients":<N>,"port":43451}` when running.
|
|
30
30
|
|
|
31
31
|
Also show:
|
|
32
32
|
```
|
|
@@ -36,6 +36,15 @@ tail -5 /tmp/claude-live.log 2>/dev/null
|
|
|
36
36
|
|
|
37
37
|
Show: running/stopped, port (always 43451), PID and uptime if running, client count, last 5 log lines.
|
|
38
38
|
|
|
39
|
+
## Version check
|
|
40
|
+
|
|
41
|
+
Compare the running server version (from `/health` response `version` field) against the installed plugin version (from `${CLAUDE_PLUGIN_ROOT}/package.json`). If they differ, warn the user:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
⚠ Version mismatch: server running v2.0.6 but plugin is v2.0.7
|
|
45
|
+
Run `/claude-live:server restart` to pick up the new version.
|
|
46
|
+
```
|
|
47
|
+
|
|
39
48
|
## Config Management
|
|
40
49
|
|
|
41
50
|
The `/claude-live:server config` subcommands manage where hooks send events.
|
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "claude-live hooks — forwards Claude Code events to the visualizer",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"SessionStart": [{
|
|
5
|
+
"hooks": [{
|
|
6
|
+
"type": "command",
|
|
7
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
8
|
+
"async": true
|
|
9
|
+
}]
|
|
10
|
+
}],
|
|
11
|
+
"InstructionsLoaded": [{
|
|
12
|
+
"hooks": [{
|
|
13
|
+
"type": "command",
|
|
14
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
15
|
+
"async": true
|
|
16
|
+
}]
|
|
17
|
+
}],
|
|
18
|
+
"WorktreeCreate": [{
|
|
19
|
+
"hooks": [{
|
|
20
|
+
"type": "command",
|
|
21
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
22
|
+
"async": true
|
|
23
|
+
}]
|
|
24
|
+
}],
|
|
25
|
+
"WorktreeRemove": [{
|
|
26
|
+
"hooks": [{
|
|
27
|
+
"type": "command",
|
|
28
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
29
|
+
"async": true
|
|
30
|
+
}]
|
|
31
|
+
}],
|
|
32
|
+
"PreToolUse": [{
|
|
33
|
+
"hooks": [{
|
|
34
|
+
"type": "command",
|
|
35
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
36
|
+
"async": true
|
|
37
|
+
}]
|
|
38
|
+
}],
|
|
39
|
+
"PostToolUse": [{
|
|
40
|
+
"hooks": [{
|
|
41
|
+
"type": "command",
|
|
42
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
43
|
+
"async": true
|
|
44
|
+
}]
|
|
45
|
+
}],
|
|
46
|
+
"Stop": [{
|
|
47
|
+
"hooks": [{
|
|
48
|
+
"type": "command",
|
|
49
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
50
|
+
"async": true
|
|
51
|
+
}]
|
|
52
|
+
}],
|
|
53
|
+
"Notification": [{
|
|
54
|
+
"hooks": [{
|
|
55
|
+
"type": "command",
|
|
56
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
57
|
+
"async": true
|
|
58
|
+
}]
|
|
59
|
+
}],
|
|
60
|
+
"PermissionRequest": [{
|
|
61
|
+
"hooks": [{
|
|
62
|
+
"type": "command",
|
|
63
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
64
|
+
"async": true
|
|
65
|
+
}]
|
|
66
|
+
}],
|
|
67
|
+
"SubagentStart": [{
|
|
68
|
+
"hooks": [{
|
|
69
|
+
"type": "command",
|
|
70
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
71
|
+
"async": true
|
|
72
|
+
}]
|
|
73
|
+
}],
|
|
74
|
+
"SubagentStop": [{
|
|
75
|
+
"hooks": [{
|
|
76
|
+
"type": "command",
|
|
77
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
78
|
+
"async": true
|
|
79
|
+
}]
|
|
80
|
+
}],
|
|
81
|
+
"SessionEnd": [{
|
|
82
|
+
"hooks": [{
|
|
83
|
+
"type": "command",
|
|
84
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
85
|
+
"async": true
|
|
86
|
+
}]
|
|
87
|
+
}],
|
|
88
|
+
"PostToolUseFailure": [{
|
|
89
|
+
"hooks": [{
|
|
90
|
+
"type": "command",
|
|
91
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
92
|
+
"async": true
|
|
93
|
+
}]
|
|
94
|
+
}],
|
|
95
|
+
"UserPromptSubmit": [{
|
|
96
|
+
"hooks": [{
|
|
97
|
+
"type": "command",
|
|
98
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
99
|
+
"async": true
|
|
100
|
+
}]
|
|
101
|
+
}],
|
|
102
|
+
"PreCompact": [{
|
|
103
|
+
"match": { "trigger": ["manual", "auto"] },
|
|
104
|
+
"hooks": [{
|
|
105
|
+
"type": "command",
|
|
106
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
107
|
+
"async": true
|
|
108
|
+
}]
|
|
109
|
+
}],
|
|
110
|
+
"PostCompact": [{
|
|
111
|
+
"match": { "trigger": ["manual", "auto"] },
|
|
112
|
+
"hooks": [{
|
|
113
|
+
"type": "command",
|
|
114
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
115
|
+
"async": true
|
|
116
|
+
}]
|
|
117
|
+
}],
|
|
118
|
+
"StopFailure": [{
|
|
119
|
+
"hooks": [{
|
|
120
|
+
"type": "command",
|
|
121
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
122
|
+
"async": true
|
|
123
|
+
}]
|
|
124
|
+
}],
|
|
125
|
+
"TeammateIdle": [{
|
|
126
|
+
"hooks": [{
|
|
127
|
+
"type": "command",
|
|
128
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
129
|
+
"async": true
|
|
130
|
+
}]
|
|
131
|
+
}],
|
|
132
|
+
"TaskCompleted": [{
|
|
133
|
+
"hooks": [{
|
|
134
|
+
"type": "command",
|
|
135
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
136
|
+
"async": true
|
|
137
|
+
}]
|
|
138
|
+
}],
|
|
139
|
+
"ConfigChange": [{
|
|
140
|
+
"hooks": [{
|
|
141
|
+
"type": "command",
|
|
142
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
143
|
+
"async": true
|
|
144
|
+
}]
|
|
145
|
+
}],
|
|
146
|
+
"Elicitation": [{
|
|
147
|
+
"hooks": [{
|
|
148
|
+
"type": "command",
|
|
149
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
150
|
+
"async": true
|
|
151
|
+
}]
|
|
152
|
+
}],
|
|
153
|
+
"ElicitationResult": [{
|
|
154
|
+
"hooks": [{
|
|
155
|
+
"type": "command",
|
|
156
|
+
"command": "node ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/claude-live}/bin/hook.js",
|
|
157
|
+
"async": true
|
|
158
|
+
}]
|
|
159
|
+
}]
|
|
160
|
+
}
|
|
161
|
+
}
|
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { fileURLToPath } from 'url'
|
|
|
5
5
|
import { dirname } from 'path'
|
|
6
6
|
|
|
7
7
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
8
|
+
const VERSION = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8')).version
|
|
8
9
|
const PORT = parseInt(process.env.PORT || '43451', 10)
|
|
9
10
|
const DIST = process.env.CLAUDE_LIVE_STATIC_DIR
|
|
10
11
|
|| join(__dirname, '..', 'client', 'dist')
|
|
@@ -55,7 +56,7 @@ const server = createServer((req, res) => {
|
|
|
55
56
|
// GET /health — health check
|
|
56
57
|
if (req.method === 'GET' && req.url === '/health') {
|
|
57
58
|
res.writeHead(200, { 'Content-Type': 'application/json' })
|
|
58
|
-
res.end(JSON.stringify({ ok: true, clients: clients.size, port: PORT }))
|
|
59
|
+
res.end(JSON.stringify({ ok: true, version: VERSION, clients: clients.size, port: PORT }))
|
|
59
60
|
return
|
|
60
61
|
}
|
|
61
62
|
|