@dscord/daemon 0.1.154 → 0.1.155-rc.1

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/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@dscord/daemon",
3
- "version": "0.1.154",
3
+ "version": "0.1.155-rc.1",
4
4
  "dependencies": {
5
+ "@lydell/node-pty": "1.2.0-beta.12",
5
6
  "@modelcontextprotocol/sdk": "^1.29.0",
6
7
  "undici": "^6.24.1",
7
8
  "pino": "^10.3.1",
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "dscord-activity",
3
+ "description": "Records Claude Code hook events for dscord TTY activity.",
4
+ "version": "0.0.1"
5
+ }
@@ -0,0 +1,100 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup|resume|clear|compact",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/record-event\"",
10
+ "async": true
11
+ }
12
+ ]
13
+ }
14
+ ],
15
+ "MessageDisplay": [
16
+ {
17
+ "matcher": "",
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/record-event\"",
22
+ "async": true
23
+ }
24
+ ]
25
+ }
26
+ ],
27
+ "PreToolUse": [
28
+ {
29
+ "matcher": "",
30
+ "hooks": [
31
+ {
32
+ "type": "command",
33
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/record-event\"",
34
+ "async": true
35
+ }
36
+ ]
37
+ }
38
+ ],
39
+ "PostToolUse": [
40
+ {
41
+ "matcher": "",
42
+ "hooks": [
43
+ {
44
+ "type": "command",
45
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/record-event\"",
46
+ "async": true
47
+ }
48
+ ]
49
+ }
50
+ ],
51
+ "PostToolUseFailure": [
52
+ {
53
+ "matcher": "",
54
+ "hooks": [
55
+ {
56
+ "type": "command",
57
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/record-event\"",
58
+ "async": true
59
+ }
60
+ ]
61
+ }
62
+ ],
63
+ "Stop": [
64
+ {
65
+ "matcher": "",
66
+ "hooks": [
67
+ {
68
+ "type": "command",
69
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/record-event\"",
70
+ "async": true
71
+ }
72
+ ]
73
+ }
74
+ ],
75
+ "StopFailure": [
76
+ {
77
+ "matcher": "",
78
+ "hooks": [
79
+ {
80
+ "type": "command",
81
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/record-event\"",
82
+ "async": true
83
+ }
84
+ ]
85
+ }
86
+ ],
87
+ "PostCompact": [
88
+ {
89
+ "matcher": "",
90
+ "hooks": [
91
+ {
92
+ "type": "command",
93
+ "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/record-event\"",
94
+ "async": true
95
+ }
96
+ ]
97
+ }
98
+ ]
99
+ }
100
+ }
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ log_file="${DSCORD_CLAUDE_ACTIVITY_LOG_FILE:-}"
5
+ if [ -z "$log_file" ]; then
6
+ exit 0
7
+ fi
8
+
9
+ node -e '
10
+ const fs = require("node:fs");
11
+ const path = require("node:path");
12
+
13
+ const logFile = process.env.DSCORD_CLAUDE_ACTIVITY_LOG_FILE;
14
+ const chunks = [];
15
+ process.stdin.on("data", (chunk) => chunks.push(chunk));
16
+ process.stdin.on("end", () => {
17
+ let event = {};
18
+ const raw = Buffer.concat(chunks).toString("utf8").trim();
19
+ if (raw) {
20
+ event = JSON.parse(raw);
21
+ }
22
+ fs.mkdirSync(path.dirname(logFile), { recursive: true });
23
+ fs.appendFileSync(
24
+ logFile,
25
+ JSON.stringify({
26
+ agentId: process.env.DSCORD_AGENT_ID || null,
27
+ event,
28
+ recordedAt: new Date().toISOString()
29
+ }) + "\n",
30
+ "utf8"
31
+ );
32
+ });
33
+ '