@xwss/agentbell 0.1.1 → 0.1.2
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/CHANGELOG.md +9 -1
- package/README.md +183 -820
- package/RELEASE.md +1 -1
- package/dist/cli.js +2 -1
- package/dist/cli.js.map +1 -1
- package/dist/utils/version.d.ts +1 -0
- package/dist/utils/version.js +30 -0
- package/dist/utils/version.js.map +1 -0
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
Patch release:
|
|
6
|
+
|
|
7
|
+
- Switched release checks and package metadata tests to accept semver patch versions.
|
|
8
|
+
- Fixed Claude verify bash resolver test isolation.
|
|
9
|
+
- Fixed global install verify path handling so project directories are not expected to contain `dist/cli.js`.
|
|
10
|
+
|
|
3
11
|
## 0.1.0
|
|
4
12
|
|
|
5
|
-
Initial MVP:
|
|
13
|
+
Initial MVP:
|
|
6
14
|
|
|
7
15
|
- npm package name: `@xwss/agentbell`; installed CLI command: `agentbell`
|
|
8
16
|
|
package/README.md
CHANGED
|
@@ -1,971 +1,334 @@
|
|
|
1
1
|
# AgentBell
|
|
2
2
|
|
|
3
|
-
AgentBell
|
|
3
|
+
AgentBell notifies your phone when AI coding agents finish a task.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
缂佹鍏涚粩鎾偋閸粎鍠橀柛蹇撶墛閺侇噣骞?ntfy闁靛棗鍊歌ぐ鍌炴焻娴d警浼傞柛娆樹邯濞撳墎鎲版担钘夊幋閻犱礁娼″Λ鑸靛緞閺嶎偆绉规鐐舵硾瑜板倿宕?HTTP 閻犲洭鏀遍惇浼存晬瀹€鍕ㄥ亾閸屾碍鍊ら柡鍫墮濠€鎾偨娴e啫澹嬮柕鍡曟祰缁绘瑧绮?SSH闁靛棔绠楽L闁靛棔绗峞v Container闁靛棔娴囩换娆撳箳瑜忛弫鎼佹嚇閹寸姷鎼奸柛锔惧劋濞呮瑩濡?
|
|
7
|
-
## Why Not Bluetooth
|
|
5
|
+
It is a small CLI for developers who run long AI coding tasks and want a reliable phone notification when the agent stops, asks for attention, or finishes a workflow. It currently uses ntfy for Android push notifications and installs hook wrappers for Codex, Claude Code, and VS Code Copilot Agent.
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
闁规亽鍔忓畷姗€鏌ч幑鎰唴闁哄嫷鍨界槐?
|
|
11
|
-
1. AI coding hook 闁革负鍔岄悿鍕⒔閸涙壆绠ラ悶?agent 闁汇劌瀚┃鈧柛锝冨妺缁楀倿骞嶈椤㈡垿濡?2. AgentBell 闂侇偅淇虹换?HTTP 闁硅泛锕埀顒佹皑閻擄繝宕i幋婵嗙厒 ntfy闁?3. 閻庣懓顦畷婊堝箥鐎n偅绨氶柡鈧捄鍝勭厒 ntfy 闂侇偅姘ㄩ悡锟犲Υ?4. 缂侇垵宕电划娲椽鐏炴儳顤侀柣?App 閻犳劗鍠曢惌妤呭箮婵犲洠鍋撳杈╁弨閺夌儐鍓欒ぐ鍌炲礆閻楀牆顤侀柣婊庡灛閳?
|
|
12
|
-
閺夆晜鐟﹂悧杈ㄦ交濠婂應鏌ら柡鍫濇惈濞呮帡宕i鍥舵矗闁告瑯鍨禍鎺旀媼閸ф锛?ntfy server闁挎稑鑻銊╂嚄閼恒儱绲归梺杈ㄥ笂缂嶆﹢鎯冮崟顒€顤侀柡鍫熶航閳?
|
|
13
|
-
## Android Setup
|
|
7
|
+
Core features:
|
|
14
8
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
- Phone notifications for AI coding workflows
|
|
10
|
+
- ntfy Android support
|
|
11
|
+
- `agentbell setup` first-run wizard
|
|
12
|
+
- `agentbell verify` installation and hook diagnostics
|
|
13
|
+
- Codex VS Code extension Stop hook
|
|
14
|
+
- Claude Code Stop and Notification hooks
|
|
15
|
+
- VS Code Copilot Agent Stop hook
|
|
16
|
+
- Rich notification context: machine name, project name, task name, path, branch, and time
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
## Installation
|
|
20
19
|
|
|
21
20
|
```bash
|
|
22
21
|
npm install -g @xwss/agentbell
|
|
23
|
-
agentbell setup
|
|
24
22
|
```
|
|
25
23
|
|
|
26
|
-
Although the npm package is scoped as `@xwss/agentbell`, the installed CLI command is still
|
|
27
|
-
|
|
28
|
-
For beta builds:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npm install -g @xwss/agentbell@beta
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
AgentBell requires Node.js 20 or newer.
|
|
35
|
-
|
|
36
|
-
## Development Install
|
|
37
|
-
|
|
38
|
-
For local development:
|
|
24
|
+
Although the npm package is scoped as `@xwss/agentbell`, the installed CLI command is still:
|
|
39
25
|
|
|
40
26
|
```bash
|
|
41
|
-
|
|
42
|
-
cd AgentBell
|
|
43
|
-
npm install
|
|
44
|
-
npm run build
|
|
45
|
-
node dist/cli.js setup
|
|
27
|
+
agentbell
|
|
46
28
|
```
|
|
47
29
|
|
|
48
|
-
|
|
30
|
+
AgentBell requires Node.js 20 or newer.
|
|
49
31
|
|
|
50
|
-
|
|
32
|
+
For beta builds:
|
|
51
33
|
|
|
52
34
|
```bash
|
|
53
|
-
npm
|
|
54
|
-
npm pack
|
|
55
|
-
npm install -g ./xwss-agentbell-0.1.0.tgz
|
|
56
|
-
agentbell --help
|
|
57
|
-
agentbell setup --dry-run --yes --targets none --no-test
|
|
35
|
+
npm install -g @xwss/agentbell@beta
|
|
58
36
|
```
|
|
59
37
|
|
|
60
|
-
## Uninstall
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
npm uninstall -g @xwss/agentbell
|
|
64
|
-
```
|
|
65
38
|
## Quick Start
|
|
66
39
|
|
|
67
|
-
|
|
68
|
-
npm install -g @xwss/agentbell
|
|
69
|
-
agentbell setup
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
闁哄牜鍓欏﹢鏉戭嚕閳ь剟宕i幋锝囩閻炴稑鐭夌槐?
|
|
73
|
-
```bash
|
|
74
|
-
npm install
|
|
75
|
-
npm run build
|
|
76
|
-
npm test
|
|
77
|
-
npm run dev -- test
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Setup Wizard
|
|
81
|
-
|
|
82
|
-
`agentbell setup` is the recommended first command on a new machine. It is a guided setup flow that:
|
|
83
|
-
|
|
84
|
-
- generates a random ntfy topic
|
|
85
|
-
- writes `~/.agentbell/config.json`
|
|
86
|
-
- asks for a machine display name
|
|
87
|
-
- guides Android ntfy subscription
|
|
88
|
-
- sends a setup test notification
|
|
89
|
-
- installs selected AI coding hooks
|
|
90
|
-
|
|
91
|
-
Examples:
|
|
40
|
+
Run the setup wizard:
|
|
92
41
|
|
|
93
42
|
```bash
|
|
94
43
|
agentbell setup
|
|
95
|
-
agentbell setup --yes --targets none --no-test
|
|
96
|
-
agentbell setup --targets codex,claude-code
|
|
97
|
-
agentbell setup --dry-run
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Useful options:
|
|
101
|
-
|
|
102
|
-
- `--config <path>` writes a specific config file.
|
|
103
|
-
- `--topic <topic>` uses a specific ntfy topic.
|
|
104
|
-
- `--machine-name <name>` sets the display name used in notifications.
|
|
105
|
-
- `--server <url>` sets the ntfy server.
|
|
106
|
-
- `--targets <targets>` accepts `all`, `none`, or comma-separated `codex,claude-code,vscode-agent`.
|
|
107
|
-
- `--yes` uses defaults for prompts.
|
|
108
|
-
- `--no-test` skips the phone test notification.
|
|
109
|
-
- `--dry-run` previews setup without writing files, sending notifications, or installing hooks.
|
|
110
|
-
|
|
111
|
-
## Topic and Machine Name
|
|
112
|
-
|
|
113
|
-
The ntfy topic is a secret transport address, not a display name. Anyone who knows the topic can usually publish to it, so use a long random topic and do not commit it to a public repository.
|
|
114
|
-
|
|
115
|
-
The machine display name is safe human context for notifications, for example `瀹搞儰缍旂粩?閸欑﹫, `MacBook Pro`, or `GPU-Server-01`.
|
|
116
|
-
|
|
117
|
-
A good default model is one user-owned random topic shared across your machines, with each machine using a different display name. Example notification:
|
|
118
|
-
|
|
119
|
-
```text
|
|
120
|
-
瀹搞儰缍旂粩?閸?璺?Codex task finished
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
## Manual Setup
|
|
124
|
-
|
|
125
|
-
Advanced users can still use the lower-level commands directly:
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
agentbell init
|
|
129
|
-
agentbell test
|
|
130
|
-
agentbell init-hooks --target codex
|
|
131
|
-
agentbell init-hooks --target claude-code
|
|
132
|
-
agentbell init-hooks --target vscode-agent
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Use manual setup when you want to provide your own topic, skip the guided Android flow, or install hooks one tool at a time.
|
|
136
|
-
## Commands
|
|
137
|
-
|
|
138
|
-
### `agentbell send`
|
|
139
|
-
|
|
140
|
-
闁活潿鍔嬬花顒傛偖?hook 閻犲鍟伴弫銈夋晬鐏炶棄绲洪梺顐℃缁旀潙鈻庨敓鐘亾濮樿京鍙€闁?
|
|
141
|
-
```bash
|
|
142
|
-
agentbell send --tool codex --event stop --title "Codex 閻庣懓鏈崹姘? --message "閺夆晜绮庨埢濂稿嫉閸濆嫭鐝ゅ☉鎾筹功濞?Codex 鐎规瓕灏欑划銊╁级閻斿憡鎷遍弶鐑嗗枙閹广垽宕?
|
|
143
44
|
```
|
|
144
45
|
|
|
145
|
-
|
|
146
|
-
- `--tool`: `claude-code`闁靛棔姊梒odex`闁靛棔姊梫scode-agent`闁靛棔姊梒ustom`
|
|
147
|
-
- `--event`: `stop`闁靛棔姊梟otification`闁靛棔姊梕rror`闁靛棔姊梡ermission`闁靛棔姊梒ustom`
|
|
148
|
-
- `--title`: 闂侇偅姘ㄩ悡锟犲冀閸ヮ剦鏆柨娑樿嫰瑜版煡鏌?- `--message`: 闂侇偅姘ㄩ悡锟犲礃閸涱収鍟囬柨娑樿嫰瑜版煡鏌?- `--priority`: ntfy priority闁挎稑鑻ぐ鏌ユ焻?- `--tags`: ntfy tags闁挎稑鐭傞埀顒侇殔瑜板潡宕氶崱娑欘吘闁挎稑鑻ぐ鏌ユ焻?- `--config`: 闁圭娲ら悾楣冩煀瀹ュ洨鏋傞柡鍌氭矗濞嗐垻鎹勯姘辩獮闁挎稑鑻ぐ鏌ユ焻?
|
|
149
|
-
濠碘€冲€归悘澶嬬▔瀹ュ嫮鐐?`title` 闁?`message`闁挎稑鐡慻entBell 濞村吋淇洪崵婊堝礉閵娧勬櫢闁瑰瓨鍔欑划顖滄媼閵堝懎鏁堕悗鍦缁辨繈鐛懜鐢靛闁硅鍣i崢銈囩磾椤旂厧鐦堕柛?`tool`闁靛棔姊梕vent`闁靛棔姊梙ostname`闁靛棔姊梒wd`闁靛棔姊梩imestamp`闁?
|
|
150
|
-
### `agentbell test`
|
|
46
|
+
The wizard will:
|
|
151
47
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
48
|
+
- Generate a random ntfy topic
|
|
49
|
+
- Write `~/.agentbell/config.json`
|
|
50
|
+
- Guide Android ntfy subscription
|
|
51
|
+
- Send a test notification
|
|
52
|
+
- Install AI coding hooks
|
|
156
53
|
|
|
157
|
-
|
|
158
|
-
闁告劕鎳庨鎰版晬濮濇碍淇婇崒娑氫函濞达絿濮峰﹢鍛村礆妫颁胶鍟婇弶鈺傜懄濞碱垶鏌呭杈╁弨闁挎稑鐭侀鈺呭及?AgentBell 鐎规瓕灏欑划锟犳煀瀹ュ洨鏋傞柟瀛樺姇婵盯濡存穱?
|
|
159
|
-
### `agentbell verify`
|
|
54
|
+
## Android ntfy Setup
|
|
160
55
|
|
|
161
|
-
|
|
56
|
+
During `agentbell setup`, AgentBell generates a long random ntfy topic. Subscribe to that topic on your Android phone:
|
|
162
57
|
|
|
163
|
-
|
|
58
|
+
1. Install ntfy Android.
|
|
59
|
+
2. Open ntfy and subscribe to the generated topic.
|
|
60
|
+
3. Allow notification permission.
|
|
61
|
+
4. Allow background running if your phone prompts for it.
|
|
62
|
+
5. Disable battery optimization for ntfy if notifications are delayed.
|
|
164
63
|
|
|
165
|
-
|
|
166
|
-
- You moved the project directory.
|
|
167
|
-
- You renamed or moved the project and suspect stale old-project paths.
|
|
168
|
-
- You deleted or regenerated wrapper files.
|
|
169
|
-
- You reinstalled Node.js.
|
|
170
|
-
- You updated Codex, Claude Code, or VS Code.
|
|
171
|
-
- Hooks were trusted but still do not send notifications.
|
|
64
|
+
The topic is a secret transport address. Do not publish it, commit it, or share it in logs.
|
|
172
65
|
|
|
173
|
-
|
|
66
|
+
## Tool Compatibility Matrix
|
|
174
67
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
agentbell
|
|
178
|
-
|
|
179
|
-
agentbell
|
|
180
|
-
agentbell verify --json > agentbell-verify.json
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Options:
|
|
184
|
-
|
|
185
|
-
- `--target <target>` checks `codex`, `claude-code`, `vscode-agent`, or `all`.
|
|
186
|
-
- `--send-test` sends an `AgentBell verify test` phone notification.
|
|
187
|
-
- `--run-wrapper` manually runs the selected wrapper command to verify it can call AgentBell.
|
|
188
|
-
- `--dry-run` only inspects files and config; it does not send notifications or run wrappers.
|
|
189
|
-
- `--json` prints a structured report with masked topic values.
|
|
190
|
-
Log parsing note:
|
|
191
|
-
|
|
192
|
-
`verify` evaluates the latest hook run block, not every historical line in the log. Old failures are ignored once a newer successful wrapper run is recorded.
|
|
193
|
-
|
|
194
|
-
Global install path note:
|
|
68
|
+
| Tool | Surface | Hook type | Config location | Wrapper location | Status | Notes |
|
|
69
|
+
|---|---|---|---|---|---|---|
|
|
70
|
+
| Codex | VS Code extension | Stop | `~/.codex/hooks.json` | `~/.agentbell/hooks/codex-stop.cmd` | Verified on Windows | User-level hook, usually works across projects |
|
|
71
|
+
| Claude Code | CLI / VS Code terminal mode | Stop / Notification | `~/.claude/settings.json` | `<project>/.agentbell-hooks/*.sh` | Stop verified, Notification prepared | Windows requires Git Bash for `.sh` wrapper |
|
|
72
|
+
| VS Code Copilot Agent | VS Code Agent mode | Stop | `<project>/.github/hooks/agentbell.json` | `<project>/.agentbell-hooks/copilot-stop.cmd` | Verified on Windows | Project-level hook; VS Code Agent hooks are Preview |
|
|
195
73
|
|
|
196
|
-
|
|
74
|
+
## Important Differences Between Tools
|
|
197
75
|
|
|
198
|
-
|
|
76
|
+
Codex:
|
|
199
77
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
78
|
+
- Uses a user-level hook.
|
|
79
|
+
- After setup, it usually works across projects.
|
|
80
|
+
- You do not usually need to run `init-hooks` in every project.
|
|
81
|
+
- To refresh the wrapper, run:
|
|
204
82
|
|
|
205
|
-
閺夊牊鎸搁崵顓㈡偝椤栨凹鏆旈悹鍥э攻閺屽洦绌遍埄鍐х礀闁挎稑鐭傞埀顒€鍊搁幃搴㈠緞瀹ュ懎鐓戠紓浣圭懃閸╁棙绂嶉悜妯虹瑩闁哄被鍎荤槐?
|
|
206
83
|
```bash
|
|
207
|
-
agentbell
|
|
84
|
+
agentbell init-hooks --target codex
|
|
208
85
|
```
|
|
209
86
|
|
|
210
|
-
|
|
211
|
-
### `agentbell init`
|
|
212
|
-
|
|
213
|
-
濞存嚎鍊撶花鏉款嚕韫囨洘鏅搁柟瀛樺姍閸樸倗绱旈鍡欑獥
|
|
87
|
+
Claude Code:
|
|
214
88
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
89
|
+
- Uses `~/.claude/settings.json`.
|
|
90
|
+
- On Windows, AgentBell uses Git Bash to run project-local `.sh` wrappers.
|
|
91
|
+
- If `agentbell verify --run-wrapper` cannot find bash, set:
|
|
218
92
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
~/.agentbell/config.json
|
|
93
|
+
```cmd
|
|
94
|
+
set AGENTBELL_BASH_PATH=C:\Path\To\bash.exe
|
|
222
95
|
```
|
|
223
96
|
|
|
224
|
-
|
|
225
|
-
```json
|
|
226
|
-
{
|
|
227
|
-
"provider": "ntfy",
|
|
228
|
-
"ntfy": {
|
|
229
|
-
"server": "https://ntfy.sh",
|
|
230
|
-
"topic": "your-long-random-topic",
|
|
231
|
-
"priority": "high",
|
|
232
|
-
"tags": ["computer"]
|
|
233
|
-
},
|
|
234
|
-
"localNotification": {
|
|
235
|
-
"enabled": true
|
|
236
|
-
},
|
|
237
|
-
"includeContext": {
|
|
238
|
-
"hostname": true,
|
|
239
|
-
"cwd": true,
|
|
240
|
-
"timestamp": true
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
```
|
|
97
|
+
VS Code Copilot Agent:
|
|
244
98
|
|
|
245
|
-
|
|
246
|
-
|
|
99
|
+
- Uses a project-level hook file.
|
|
100
|
+
- Each project needs `<project>/.github/hooks/agentbell.json`.
|
|
101
|
+
- Run this inside each project where you want Copilot Agent notifications:
|
|
247
102
|
|
|
248
|
-
闁汇垻鍠愰崹?hook 闂佹澘绉堕悿鍡椢熼埄鍐╃凡闁?
|
|
249
103
|
```bash
|
|
250
|
-
agentbell init-hooks --target claude-code
|
|
251
|
-
agentbell init-hooks --target codex
|
|
252
104
|
agentbell init-hooks --target vscode-agent
|
|
253
|
-
agentbell init-hooks --target all
|
|
254
105
|
```
|
|
255
106
|
|
|
256
|
-
|
|
257
|
-
Preview hook changes without writing files:
|
|
258
|
-
|
|
259
|
-
```bash
|
|
260
|
-
agentbell init-hooks --target codex --dry-run
|
|
261
|
-
agentbell init-hooks --target all --dry-run
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
Dry-run prints the target config paths, whether existing config was detected, what a real run would merge, and the hook snippet that would be generated. It does not write files and does not create backups.
|
|
265
|
-
|
|
266
|
-
## Claude Code Example
|
|
267
|
-
|
|
268
|
-
闁烩晩鍠楅悥锝夊棘閸ワ附顐介柨?
|
|
269
|
-
```text
|
|
270
|
-
~/.claude/settings.json
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
闁烩晩鍠楅悥锝夊极閸喓浜柨?
|
|
274
|
-
```json
|
|
275
|
-
{
|
|
276
|
-
"hooks": {
|
|
277
|
-
"Stop": [
|
|
278
|
-
{
|
|
279
|
-
"matcher": "",
|
|
280
|
-
"hooks": [
|
|
281
|
-
{
|
|
282
|
-
"type": "command",
|
|
283
|
-
"command": "agentbell send --tool claude-code --event stop"
|
|
284
|
-
}
|
|
285
|
-
]
|
|
286
|
-
}
|
|
287
|
-
],
|
|
288
|
-
"Notification": [
|
|
289
|
-
{
|
|
290
|
-
"matcher": "",
|
|
291
|
-
"hooks": [
|
|
292
|
-
{
|
|
293
|
-
"type": "command",
|
|
294
|
-
"command": "agentbell send --tool claude-code --event notification"
|
|
295
|
-
}
|
|
296
|
-
]
|
|
297
|
-
}
|
|
298
|
-
]
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
```
|
|
107
|
+
## Rich Notification Context
|
|
302
108
|
|
|
303
|
-
|
|
109
|
+
AgentBell can generate notifications such as:
|
|
304
110
|
|
|
305
|
-
闁烩晩鍠楅悥锝夊棘閸ワ附顐介柨?
|
|
306
111
|
```text
|
|
307
|
-
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
闁烩晩鍠楅悥锝夊极閸喓浜柨?
|
|
311
|
-
```json
|
|
312
|
-
{
|
|
313
|
-
"hooks": {
|
|
314
|
-
"stop": [
|
|
315
|
-
{
|
|
316
|
-
"command": "agentbell send --tool codex --event stop"
|
|
317
|
-
}
|
|
318
|
-
]
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
```
|
|
112
|
+
Workstation-01 · Codex audit task finished
|
|
322
113
|
|
|
323
|
-
AgentBell
|
|
324
|
-
|
|
325
|
-
|
|
114
|
+
Project: AgentBell
|
|
115
|
+
Path: G:\learning\AgentBell
|
|
116
|
+
Branch: main
|
|
117
|
+
Event: stop
|
|
118
|
+
Time: 2026-05-23 22:45
|
|
326
119
|
```
|
|
327
120
|
|
|
328
|
-
|
|
329
|
-
### Codex Windows Wrapper
|
|
330
|
-
|
|
331
|
-
On Windows, AgentBell writes a `.cmd` wrapper and points Codex to that wrapper instead of embedding a long `node.exe ... cli.js ...` command directly in `hooks.json`.
|
|
121
|
+
Project name priority:
|
|
332
122
|
|
|
333
|
-
|
|
123
|
+
1. CLI `--project`
|
|
124
|
+
2. `.agentbell.json` `projectName`
|
|
125
|
+
3. `package.json` `name`
|
|
126
|
+
4. Current folder name
|
|
334
127
|
|
|
335
|
-
|
|
336
|
-
~/.codex/hooks.json
|
|
337
|
-
~/.agentbell/hooks/codex-stop.cmd
|
|
338
|
-
~/.agentbell/snippets/codex-hooks.json
|
|
339
|
-
```
|
|
128
|
+
If you are happy with the folder name, you do not need `.agentbell.json`.
|
|
340
129
|
|
|
341
|
-
|
|
130
|
+
To customize project context:
|
|
342
131
|
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
"hooks": {
|
|
346
|
-
"Stop": [
|
|
347
|
-
{
|
|
348
|
-
"hooks": [
|
|
349
|
-
{
|
|
350
|
-
"type": "command",
|
|
351
|
-
"commandWindows": "cmd /d /s /c \"C:\\Users\\<user>\\.agentbell\\hooks\\codex-stop.cmd\"",
|
|
352
|
-
"command": "cmd /d /s /c \"C:\\Users\\<user>\\.agentbell\\hooks\\codex-stop.cmd\"",
|
|
353
|
-
"timeout": 30,
|
|
354
|
-
"statusMessage": "Sending AgentBell notification"
|
|
355
|
-
}
|
|
356
|
-
]
|
|
357
|
-
}
|
|
358
|
-
]
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
The wrapper logs to:
|
|
364
|
-
|
|
365
|
-
```text
|
|
366
|
-
~/.agentbell/codex-hook-fired.log
|
|
132
|
+
```bash
|
|
133
|
+
agentbell project init --name MyProject --task "AI coding task"
|
|
367
134
|
```
|
|
368
135
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
## VS Code Agent Example
|
|
372
|
-
|
|
373
|
-
闁烩晩鍠楅悥锝夊棘閸ワ附顐介柡鍕靛灠娴兼劖鎷呭鍐ㄩ殬缂佺嫏鍥у赋缂傚喚鍣槐?
|
|
374
|
-
```text
|
|
375
|
-
.github/hooks/agentbell.json
|
|
376
|
-
```
|
|
136
|
+
Example `.agentbell.json`:
|
|
377
137
|
|
|
378
|
-
闁烩晩鍠楅悥锝夊极閸喓浜柨?
|
|
379
138
|
```json
|
|
380
139
|
{
|
|
381
|
-
"
|
|
382
|
-
"
|
|
383
|
-
"hooks": {
|
|
384
|
-
"stop": [
|
|
385
|
-
{
|
|
386
|
-
"command": "agentbell send --tool vscode-agent --event stop"
|
|
387
|
-
}
|
|
388
|
-
]
|
|
389
|
-
}
|
|
140
|
+
"projectName": "MyProject",
|
|
141
|
+
"defaultTaskName": "AI coding task"
|
|
390
142
|
}
|
|
391
143
|
```
|
|
392
144
|
|
|
393
|
-
|
|
394
|
-
## Real Hook Verification
|
|
395
|
-
|
|
396
|
-
Hook schemas can change across AI coding tools. AgentBell keeps the templates small and visible so you can verify them with the tool version you actually run.
|
|
397
|
-
|
|
398
|
-
### Codex
|
|
399
|
-
|
|
400
|
-
Preview the Codex hook first:
|
|
401
|
-
|
|
402
|
-
```bash
|
|
403
|
-
agentbell init-hooks --target codex --dry-run
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
Then write the hook:
|
|
407
|
-
|
|
408
|
-
```bash
|
|
409
|
-
agentbell init-hooks --target codex
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
Run a minimal Codex task, for example asking it to inspect a tiny file or answer a short codebase question. When the task stops, you should receive an ntfy notification from `agentbell send --tool codex --event stop`.
|
|
413
|
-
|
|
414
|
-
If no notification arrives, run:
|
|
415
|
-
|
|
416
|
-
```bash
|
|
417
|
-
agentbell doctor
|
|
418
|
-
agentbell doctor --json
|
|
419
|
-
agentbell test
|
|
420
|
-
```
|
|
421
|
-
|
|
422
|
-
Check that the config path exists, the ntfy server is reachable, and the command shown in the dry-run output is valid in the same shell/environment where Codex runs.
|
|
423
|
-
|
|
424
|
-
### Claude Code
|
|
425
|
-
|
|
426
|
-
Preview or write Claude Code hooks:
|
|
427
|
-
|
|
428
|
-
```bash
|
|
429
|
-
agentbell init-hooks --target claude-code --dry-run
|
|
430
|
-
agentbell init-hooks --target claude-code
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
To verify the Stop hook, run a small Claude Code task and let it finish normally. You should receive a notification for `--tool claude-code --event stop`.
|
|
434
|
-
|
|
435
|
-
To verify the Notification hook, trigger a Claude Code state that asks for user attention, such as waiting for input or a permission-related notification. You should receive a notification for `--tool claude-code --event notification`.
|
|
436
|
-
|
|
437
|
-
Use the event name to distinguish states:
|
|
438
|
-
|
|
439
|
-
- `stop`: the agent finished the current task or turn.
|
|
440
|
-
- `notification`: the agent is asking for attention, often because it is waiting for input or needs user action.
|
|
441
|
-
|
|
442
|
-
If the Stop hook works but Notification does not, inspect the installed Claude Code version and its hook documentation. The event name or schema may have changed.
|
|
443
|
-
|
|
444
|
-
## Claude Code Verification
|
|
445
|
-
|
|
446
|
-
AgentBell prepares Claude Code hooks with this shape:
|
|
447
|
-
|
|
448
|
-
```text
|
|
449
|
-
hooks.Stop[].hooks[]
|
|
450
|
-
hooks.Notification[].hooks[]
|
|
451
|
-
```
|
|
452
|
-
|
|
453
|
-
Each handler uses `type: "command"` and calls `agentbell send`. On Windows, Claude Code runs hook commands through Git Bash / shell, so AgentBell writes project-local `.sh` wrappers instead of `.cmd` wrappers:
|
|
454
|
-
|
|
455
|
-
```text
|
|
456
|
-
<projectRoot>\.agentbell-hooks\claude-stop.sh
|
|
457
|
-
<projectRoot>\.agentbell-hooks\claude-notification.sh
|
|
458
|
-
```
|
|
459
|
-
|
|
460
|
-
Both wrappers log to:
|
|
461
|
-
|
|
462
|
-
```text
|
|
463
|
-
<projectRoot>\.agentbell-hooks\claude-hook-fired.log
|
|
464
|
-
```
|
|
465
|
-
|
|
466
|
-
The generated Claude Code commands look like:
|
|
467
|
-
|
|
468
|
-
```bash
|
|
469
|
-
bash G:/learning/AgentBell/.agentbell-hooks/claude-stop.sh
|
|
470
|
-
bash G:/learning/AgentBell/.agentbell-hooks/claude-notification.sh
|
|
471
|
-
```
|
|
472
|
-
|
|
473
|
-
Wrapper timestamps use an ASCII-safe UTC format, `date -u +"%Y-%m-%dT%H:%M:%SZ"`, to avoid mojibake on Windows systems with non-English locale output.
|
|
474
|
-
|
|
475
|
-
Preview the files:
|
|
476
|
-
|
|
477
|
-
```bash
|
|
478
|
-
agentbell init-hooks --target claude-code --dry-run
|
|
479
|
-
```
|
|
480
|
-
|
|
481
|
-
Write the hooks:
|
|
482
|
-
|
|
483
|
-
```bash
|
|
484
|
-
agentbell init-hooks --target claude-code
|
|
485
|
-
```
|
|
486
|
-
|
|
487
|
-
After changing Claude Code hooks, trust or allow the hook if Claude Code prompts you. To verify `Stop`, run a tiny Claude Code task and let it finish. To verify `Notification`, trigger a state where Claude Code waits for user attention, such as input or permission. If no phone notification arrives, check `<projectRoot>\.agentbell-hooks\claude-hook-fired.log` first. If the log file does not exist, Claude Code did not execute or trust the hook. If the log contains `Notification sent.`, troubleshoot ntfy and Android notification delivery.
|
|
488
|
-
|
|
489
|
-
### VS Code Agent / Copilot Agent
|
|
490
|
-
|
|
491
|
-
VS Code Agent / Copilot Agent support is treated as a workspace hook. AgentBell writes:
|
|
492
|
-
|
|
493
|
-
```text
|
|
494
|
-
.github/hooks/agentbell.json
|
|
495
|
-
```
|
|
496
|
-
|
|
497
|
-
Preview or write it from the workspace root:
|
|
498
|
-
|
|
499
|
-
```bash
|
|
500
|
-
agentbell init-hooks --target vscode-agent --dry-run
|
|
501
|
-
agentbell init-hooks --target vscode-agent
|
|
502
|
-
```
|
|
503
|
-
|
|
504
|
-
This capability may vary by VS Code and Copilot Agent version. After writing the file, reload VS Code, run a small workspace agent task, and confirm whether the hook command is executed. If it is not triggered, manually compare `.github/hooks/agentbell.json` with the hook format expected by your VS Code version, then move the command into the supported location.
|
|
505
|
-
|
|
506
|
-
Use `agentbell doctor` inside the same workspace terminal to confirm the CLI path, Node version, current working directory, and config file location.
|
|
507
|
-
|
|
508
|
-
## Verified: Codex VS Code Extension on Windows
|
|
509
|
-
|
|
510
|
-
The VS Code Codex extension has been manually verified on Windows with AgentBell:
|
|
511
|
-
|
|
512
|
-
- `UserPromptSubmit` and `Stop` hooks can be triggered by the extension.
|
|
513
|
-
- `Stop` hook successfully calls AgentBell through the generated `.cmd` wrapper.
|
|
514
|
-
- The full path works: Codex Stop hook -> `.cmd` wrapper -> AgentBell -> ntfy -> Android phone notification.
|
|
515
|
-
- The successful wrapper log is written to `~/.agentbell/codex-hook-fired.log`.
|
|
516
|
-
|
|
517
|
-
After changing hooks, Codex may require you to trust the updated hook again. If you use WSL, configure AgentBell separately inside WSL because Windows, WSL, Remote SSH, and Dev Containers have different home directories, Node paths, and hook execution environments.
|
|
518
|
-
|
|
519
|
-
## Local Desktop Notifications
|
|
520
|
-
|
|
521
|
-
闂傚嫨鍊撶花?ntfy 闁归潧顑嗗┃鈧柟鎭掑姂閳ь兛绶ょ槐婊眊entBell 闁告瑯鍨禍鎺旀偘閵夈儱甯犻柡鍫墮濠€鏉戭浖瀹€鍕〃闂侇偅姘ㄩ悡锟犳晬?
|
|
522
|
-
- macOS: `osascript display notification`
|
|
523
|
-
- Linux: 濞村吋锚閸?`notify-send`闁挎稑濂旂粭澶屸偓娑櫭﹢顏堝礆濞嗘帞鍎查弶?- Windows: MVP 闂傚啳鍩栭宀€鎹勭€圭姷绠栭柛娆樺灦濞碱剟骞€瑜岀粭澶屾惥瀹曞洦鐣遍柡鍫墮濠€?toast闁挎稑鑻懟鐔虹磼濞嗗繐姣夐柟缁樺姉閵?
|
|
524
|
-
闁哄牜鍓欏﹢鎾焻濮樿京鍙€濠㈡儼绮剧憴锔界▔瀹ュ嫮绐楃憸鏉垮船閹?ntfy 闁归潧顑嗗┃鈧柟鎭掑姂閳ь兛闄嶉埀?
|
|
525
|
-
## Remote SSH / WSL / Dev Container
|
|
526
|
-
|
|
527
|
-
Hook 閹煎瓨妫侀姘跺捶閵娿儳鏉介梻鍕嚀缁诲秶鎮?AI coding agent 闁汇劌瀚┃鈧柛锝冨妺缁楀倿骞嶈椤㈡垿濡撮崒娑氭Х濠碘€冲亰缁?
|
|
528
|
-
- Remote SSH: hook 闁革负鍔忕换娆戠矙?Linux 濞戞挾绮┃鈧柟绗涘棭鏀介柕?- WSL: hook 闁?WSL 闁绘粠鍨伴。銊╁箥瑜戦、鎴﹀Υ?- Dev Container: hook 闁?container 闁告劕鎳忔晶鐣屾偘鐏炵儵鍋?- 閺夆晜绮嶇敮鍫曟偨娴e啫澹? hook 闁革负鍔忛~锔芥交濠婂嫬浠橀柣顫祷閸撴娊骞嶈椤㈡垿濡?
|
|
529
|
-
闁搞儳濮甸婵囨媴閻樼粯浠橀悷鏇氱濠€顏堟焽閿濆嫰鍤嬮柣婊庡灠椤c劑鏌岀仦鐣屾殧閻?Node.js 20+闁靛棔绀侀悾銊ф啑?AgentBell闁靛棔娴囩换宥囨偘?`agentbell init`闁挎稑鑻懟鐔烘兜椤旇崵绠介悹鍥ュ劤楠炲棙鏅堕崘顓炲幋閻犱礁娼″Λ?ntfy server闁?
|
|
530
|
-
## Troubleshooting
|
|
531
|
-
|
|
532
|
-
### 闁归潧顑嗗┃鈧柡鈧張鐢电憹闁告帊鍗抽埀顒佹皑閻?
|
|
533
|
-
闁稿繐鐗愮换宥囨偘瀹€瀣獥
|
|
145
|
+
## Commands
|
|
534
146
|
|
|
535
147
|
```bash
|
|
536
|
-
agentbell
|
|
148
|
+
agentbell setup
|
|
537
149
|
agentbell test
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
婵☆偀鍋撻柡灞诲劜婢ф粓寮甸悜妯恍﹂柛姘剧畳椤撳綊姊奸崨顒傚晩闁告艾濂旂粩瀛樼▔?topic闁靛棔鑻焧fy 闁哄嫷鍨伴幆渚€寮垫径鎰ㄥ亾濮樿京鍙€闁哄鍟村娲Υ娴h笑闁告熬绠戦崣褔姊婚婵堝晩闁汇垹鐏氶惈婊勫濡搫顕ч柕鍡曡緶opic 闁哄嫷鍨伴幆浣烘惥閸愬樊妾梻鍛箲濠р偓濞戞挻姊归惀鍛村嫉婢跺海缈婚梺鎸庣懀閳?
|
|
541
|
-
### 閺夆晜绮庨埢濂稿嫉閸濆嫭鐝ら柡鍐У绾墎鎷嬮崸妤侊紪 ntfy.sh
|
|
542
|
-
|
|
543
|
-
閺夆晜鍔橀、?`agentbell doctor` 闁哄被鍎冲﹢?`ntfy server access`闁靛棗鍊搁々褔寮稿鍐ㄥ絾闁告瑥鎽滅紞澶岀磼濠婂嫬鐏楅柡鍫濈Т婵喖宕抽妸褏绉圭紓浣圭矒濡炬椽宕氶幆閭﹀晱闂?`ntfy.sh`闁挎稑鑻ぐ鍙夌閵夈劌娈扮€?ntfy server闁挎稑鐬奸崝褔宕ユ惔鈩冭含 `~/.agentbell/config.json` 濞戞搩鍘洪幈銊╁绩?`ntfy.server`闁?
|
|
544
|
-
### hook 婵炲眲銇版洟宕?
|
|
545
|
-
缁绢収鍠涢?hook 闂佹澘绉堕悿鍡涘棘閸ワ附顐介柛锔哄妼椤曨喗鎯旈弬澶哥矗闁稿繐鍢查悿鍕⒔閸涢偊鍤㈤柛娆愮墱濞堟垶鎷呭鍥╂瀭闁靛棗鍊烽幈銊╁绩?hook 闁告艾鍑界槐婵嬫煂瀹ュ懏鍎欓柟?reload 閻庣數鎳撶花?AI coding 鐎规悶鍎遍崣鍧楀Υ閸屾艾甯ラ柣顫妺缁斿瓨绋夐鍕彂閻忓繐绻掑▓?agent 濞寸姾顕ф慨鐔割殽瀹€鍐 stop hook闁?
|
|
546
|
-
濠碘€冲€归悘?Windows 濞?Codex hook 婵炲备鍓濆﹢浣烘喆閿曗偓瑜板倿鏌呭杈╁弨闁挎稑鐭侀顒€螞閳ь剟寮?`~/.agentbell/codex-hook-fired.log`闁?
|
|
547
|
-
### Windows 閻犱警鍨扮欢鐐烘⒒椤曗偓椤?
|
|
548
|
-
濠碘€冲€归悘澶愬礂閵娿儳婀?`agentbell` 闁告稒鍨濋幎銈夊捶?hook 闁绘粠鍨伴。銊╂煂鐏炶偐鐟濋柛娆樺灥椤棝鏁嶇仦钘夎濞寸姰鍎版繛鍥偨?`agentbell doctor` 閺夊牊鎸搁崵顓㈡儍?`cli invocation for hooks`闁靛棗鍊稿﹢顏堝嫉椤掆偓濠€鏉戭嚕閳ь剟宕i幋鐐搭槯闁挎稑鑻悾鐘诲矗椤栨繂鍘撮柡?`node path/to/dist/cli.js`闁?
|
|
549
|
-
### WSL / Remote SSH 濞?hook 閻庡湱鍋ゅ顖涙交閹邦垼鏀藉ù锝呯Ф閻ゅ棝姊婚鈧。?
|
|
550
|
-
閻犲洤鍢插﹢?agent 閻庡湱鍋ゅ顖涙交閹邦垼鏀介柣婊庡灠椤c劑鏌岀仦鎯р挃閻?`agentbell doctor`闁靛棔绻卛ndows 濞戞挾绮┃鈧柕鍡曠畼SL闁靛棔娴囩换娆戠矙鐎b晛鐦滈柡鍫熶航閳ь兛绗峞v Container 闁哄嫷鍨粭澶愬触瀹€鈧獮鍡樻櫠閸愯法绀夐柛姘閸ゆ粓寮垫径澶岀憹闁告艾鐬煎▓?home闁靛棔璧婣TH闁靛棔鑵恛de 闁告粌鐭傞崢銈囩磾椤旇姤鐎ù鐘虹堪閳?
|
|
551
|
-
### Cannot find module old project dist cli.js
|
|
552
|
-
|
|
553
|
-
If a wrapper log contains an error like:
|
|
554
|
-
|
|
555
|
-
```text
|
|
556
|
-
Cannot find module '...\old-project\dist\cli.js'
|
|
557
|
-
MODULE_NOT_FOUND
|
|
558
|
-
```
|
|
559
|
-
|
|
560
|
-
then the hook and wrapper did execute, but the active wrapper still points to an old project path. This can happen after renaming or moving the project directory.
|
|
561
|
-
|
|
562
|
-
Fix:
|
|
563
|
-
|
|
564
|
-
```bash
|
|
150
|
+
agentbell send --tool codex --event stop --task "audit task"
|
|
151
|
+
agentbell project init --name MyProject --task "AI coding task"
|
|
565
152
|
agentbell init-hooks --target all
|
|
566
|
-
agentbell verify
|
|
153
|
+
agentbell verify
|
|
154
|
+
agentbell doctor
|
|
567
155
|
```
|
|
568
|
-
### setup test failed
|
|
569
|
-
|
|
570
|
-
If `agentbell setup` sends a test notification but the phone does not receive it:
|
|
571
|
-
|
|
572
|
-
- Check that the topic in ntfy Android exactly matches the AgentBell topic.
|
|
573
|
-
- Check the ntfy server URL.
|
|
574
|
-
- Open the ntfy app once to refresh the subscription.
|
|
575
|
-
- Allow notification permission.
|
|
576
|
-
- Allow background running / disable battery optimization.
|
|
577
|
-
- Run `agentbell doctor` and inspect warnings.
|
|
578
|
-
|
|
579
|
-
If you skipped hook installation during setup, rerun `agentbell setup` or use `agentbell init-hooks --target all` after phone delivery works.
|
|
580
156
|
|
|
581
|
-
|
|
582
|
-
### Cannot convert argument to a ByteString
|
|
583
|
-
|
|
584
|
-
This can happen when a Node.js `fetch` header contains Chinese text, emoji, or other non-ASCII characters. ntfy supports UTF-8 header values through RFC 2047 encoded-word syntax, so AgentBell automatically encodes ntfy headers such as `Title` and `Tags`.
|
|
585
|
-
|
|
586
|
-
The notification body is not header data and remains a normal UTF-8 message.
|
|
587
|
-
|
|
588
|
-
If you still see this error, upgrade AgentBell and rebuild it. As a temporary workaround, use an English-only `--title` and ASCII-only `--tags`.
|
|
589
|
-
|
|
590
|
-
## Development
|
|
157
|
+
Useful examples:
|
|
591
158
|
|
|
592
159
|
```bash
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
160
|
+
agentbell setup --yes --targets none --no-test
|
|
161
|
+
agentbell setup --dry-run
|
|
162
|
+
agentbell init-hooks --target all --dry-run
|
|
163
|
+
agentbell send --tool claude-code --event stop --project MyProject --task "README update"
|
|
597
164
|
```
|
|
598
165
|
|
|
599
|
-
|
|
600
|
-
## Compatibility / Verified Matrix
|
|
601
|
-
|
|
602
|
-
| Tool | Surface | OS | Hook event | Wrapper strategy | Status | Log path |
|
|
603
|
-
|---|---|---|---|---|---|---|
|
|
604
|
-
| Codex | VS Code extension | Windows | Stop | user `.cmd` wrapper | Verified | `~/.agentbell/codex-hook-fired.log` |
|
|
605
|
-
| Claude Code | CLI / VS Code terminal mode | Windows | Stop | project `.sh` wrapper | Verified | `<projectRoot>/.agentbell-hooks/claude-hook-fired.log` |
|
|
606
|
-
| Claude Code | CLI / VS Code terminal mode | Windows | Notification | project `.sh` wrapper | Prepared / Partially verified | `<projectRoot>/.agentbell-hooks/claude-hook-fired.log` |
|
|
607
|
-
| VS Code Copilot Agent | VS Code Agent mode | Windows | Stop | project `.cmd` wrapper | Verified | `<projectRoot>/.agentbell-hooks/copilot-hook-fired.log` |
|
|
608
|
-
| Remote SSH / WSL / Dev Container | Various | Various | TBD | TBD | Not verified | TBD |
|
|
609
|
-
|
|
610
|
-
Verified means the full chain reached Android notification on the author's Windows machine. Claude Code Notification is prepared but should not be treated as fully verified until a real Notification event is tested. VS Code Agent hooks are still a Preview capability, so re-verify after VS Code or Copilot updates.
|
|
611
|
-
|
|
612
|
-
## Verified: Codex VS Code Extension on Windows
|
|
613
|
-
|
|
614
|
-
Verified path:
|
|
615
|
-
|
|
616
|
-
```text
|
|
617
|
-
Codex Stop hook -> ~/.agentbell/hooks/codex-stop.cmd -> AgentBell -> ntfy -> Android
|
|
618
|
-
```
|
|
166
|
+
## Verification
|
|
619
167
|
|
|
620
|
-
|
|
168
|
+
Use `verify` when a hook is not firing, a notification does not arrive, Node was reinstalled, or a project was moved.
|
|
621
169
|
|
|
622
170
|
```bash
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
~/.agentbell/codex-hook-fired.log
|
|
171
|
+
agentbell verify --dry-run
|
|
172
|
+
agentbell verify --run-wrapper --send-test
|
|
173
|
+
agentbell verify --target codex
|
|
174
|
+
agentbell verify --target claude-code --run-wrapper
|
|
175
|
+
agentbell verify --target vscode-agent --run-wrapper
|
|
176
|
+
agentbell verify --json > agentbell-verify.json
|
|
630
177
|
```
|
|
631
178
|
|
|
632
|
-
|
|
179
|
+
Notes:
|
|
633
180
|
|
|
634
|
-
- `
|
|
635
|
-
-
|
|
636
|
-
-
|
|
181
|
+
- `--dry-run` inspects files and logs but does not run wrappers or send notifications.
|
|
182
|
+
- Warnings are normal in dry-run mode because wrapper execution is intentionally skipped.
|
|
183
|
+
- `--send-test` sends a phone notification through the configured provider.
|
|
184
|
+
- `--run-wrapper` manually runs the generated wrapper and then re-reads the latest hook log.
|
|
185
|
+
- Topics are masked in verify output.
|
|
637
186
|
|
|
638
|
-
|
|
187
|
+
Log parsing behavior:
|
|
639
188
|
|
|
640
|
-
|
|
641
|
-
- The generated `.cmd` wrapper gives Codex a short stable command and gives AgentBell a log file for troubleshooting.
|
|
642
|
-
- Codex uses the `hooks.Stop[].hooks[]` schema and the Windows-specific `commandWindows` field.
|
|
643
|
-
- After changing hooks, Codex may ask you to trust the updated hook again.
|
|
644
|
-
|
|
645
|
-
## Verified: Claude Code on Windows
|
|
189
|
+
`verify` evaluates the latest hook run block, not every historical line in the log. Old failures are ignored once a newer successful wrapper run is recorded.
|
|
646
190
|
|
|
647
|
-
|
|
191
|
+
Global install path behavior:
|
|
648
192
|
|
|
649
|
-
|
|
650
|
-
claude --version
|
|
651
|
-
```
|
|
193
|
+
After `npm install -g @xwss/agentbell`, AgentBell can be run from any project directory. The current working directory is the project context for `.agentbell.json`, `.agentbell-hooks`, logs, `--cwd`, project name, and git branch detection. The AgentBell CLI path is the globally installed package path. `verify` should not require the project directory to contain `dist/cli.js`.
|
|
652
194
|
|
|
653
|
-
|
|
195
|
+
If verify reports that a wrapper incorrectly points to `<project>/dist/cli.js` after global install, update AgentBell and refresh hooks:
|
|
654
196
|
|
|
655
197
|
```bash
|
|
656
|
-
|
|
198
|
+
agentbell init-hooks --target all
|
|
657
199
|
```
|
|
658
200
|
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
Claude Code on Windows executes hook commands through Git Bash / shell. AgentBell therefore generates project-local `.sh` wrappers, not user-home `.cmd` wrappers.
|
|
662
|
-
|
|
663
|
-
Verified path:
|
|
201
|
+
## Troubleshooting
|
|
664
202
|
|
|
665
|
-
|
|
666
|
-
Claude Code Stop hook -> <projectRoot>/.agentbell-hooks/claude-stop.sh -> AgentBell -> ntfy -> Android
|
|
667
|
-
```
|
|
203
|
+
### `agentbell` command not found
|
|
668
204
|
|
|
669
|
-
|
|
205
|
+
- Make sure the package is installed:
|
|
670
206
|
|
|
671
207
|
```bash
|
|
672
|
-
|
|
673
|
-
claude /hooks
|
|
208
|
+
npm install -g @xwss/agentbell@beta
|
|
674
209
|
```
|
|
675
210
|
|
|
676
|
-
|
|
211
|
+
- Make sure the npm global bin directory is in `PATH`.
|
|
212
|
+
- On Windows, a common npm global bin path is `%APPDATA%\npm`.
|
|
213
|
+
- PowerShell may block the `.ps1` shim. Try CMD or:
|
|
677
214
|
|
|
678
|
-
```
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
Inspect:
|
|
682
|
-
|
|
683
|
-
```text
|
|
684
|
-
<projectRoot>/.agentbell-hooks/claude-hook-fired.log
|
|
215
|
+
```cmd
|
|
216
|
+
cmd /d /s /c agentbell --help
|
|
685
217
|
```
|
|
686
218
|
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
The Claude Code Notification hook is prepared / partially verified. Do not treat it as fully verified until you have triggered and confirmed a real Notification event on your machine.
|
|
690
|
-
|
|
219
|
+
### Windows local desktop notification skipped
|
|
691
220
|
|
|
692
|
-
|
|
221
|
+
This is expected in the MVP. Phone push still works.
|
|
693
222
|
|
|
694
|
-
|
|
223
|
+
### Claude Code verify requires bash
|
|
695
224
|
|
|
696
|
-
|
|
697
|
-
2. `bash` found on `PATH`.
|
|
698
|
-
3. Common Git for Windows paths such as `C:\Program Files\Git\bin\bash.exe`.
|
|
225
|
+
On Windows, set the Git Bash path if auto-detection fails:
|
|
699
226
|
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
```bat
|
|
703
|
-
set AGENTBELL_BASH_PATH=D:\software\git\bin\bash.exe
|
|
227
|
+
```cmd
|
|
228
|
+
set AGENTBELL_BASH_PATH=C:\Program Files\Git\bin\bash.exe
|
|
704
229
|
agentbell verify --target claude-code --run-wrapper
|
|
705
230
|
```
|
|
706
231
|
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
```text
|
|
710
|
-
[Claude Code]
|
|
711
|
-
bash: D:\software\git\bin\bash.exe
|
|
712
|
-
```
|
|
713
|
-
|
|
714
|
-
If manual bash execution succeeds but verify fails, run:
|
|
715
|
-
|
|
716
|
-
```bash
|
|
717
|
-
agentbell verify --target claude-code --run-wrapper --json
|
|
718
|
-
```
|
|
719
|
-
|
|
720
|
-
Compare `bashPath`, `runWrapper`, and the latest log block status. A successful latest Claude block should include `Notification sent.` and `AgentBell exit code 0`.
|
|
721
|
-
|
|
722
|
-
## Verified: VS Code Copilot Agent on Windows
|
|
232
|
+
### Hook not firing
|
|
723
233
|
|
|
724
|
-
|
|
234
|
+
Try:
|
|
725
235
|
|
|
726
|
-
|
|
236
|
+
1. Restart VS Code or the target AI tool.
|
|
237
|
+
2. Trust hooks if prompted.
|
|
238
|
+
3. Run `agentbell verify`.
|
|
239
|
+
4. Check logs:
|
|
727
240
|
|
|
728
241
|
```text
|
|
729
|
-
|
|
242
|
+
Codex: ~/.agentbell/codex-hook-fired.log
|
|
243
|
+
Claude Code: <project>/.agentbell-hooks/claude-hook-fired.log
|
|
244
|
+
Copilot Agent: <project>/.agentbell-hooks/copilot-hook-fired.log
|
|
730
245
|
```
|
|
731
246
|
|
|
732
|
-
|
|
247
|
+
### ntfy notification delay
|
|
733
248
|
|
|
734
|
-
|
|
735
|
-
- Wrapper: `<projectRoot>/.agentbell-hooks/copilot-stop.cmd`
|
|
736
|
-
- Log: `<projectRoot>/.agentbell-hooks/copilot-hook-fired.log`
|
|
249
|
+
On Android:
|
|
737
250
|
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
```bash
|
|
741
|
-
node dist\cli.js init-hooks --target vscode-agent
|
|
742
|
-
```
|
|
743
|
-
|
|
744
|
-
Reload VS Code, use Copilot Chat in Agent mode to run a small task, then inspect the log file above and confirm the phone notification. The generated Windows hook command uses:
|
|
745
|
-
|
|
746
|
-
```text
|
|
747
|
-
cmd /d /s /c "<projectRoot>\.agentbell-hooks\copilot-stop.cmd"
|
|
748
|
-
```
|
|
749
|
-
|
|
750
|
-
Do not use single quotes around the wrapper path. If Windows says the wrapper path is not recognized as an internal/external command, executable program, or batch file, the hook probably used single quotes or did not pass the wrapper path through `cmd /d /s /c` with double quotes.
|
|
751
|
-
|
|
752
|
-
For hook-level debugging, open `View -> Output -> GitHub Copilot Chat Hooks`.
|
|
753
|
-
|
|
754
|
-
## Android ntfy Reliability Notes
|
|
755
|
-
|
|
756
|
-
If notifications arrive only after opening the ntfy app, the usual cause is Android background restriction rather than AgentBell.
|
|
757
|
-
|
|
758
|
-
Recommended Android settings:
|
|
759
|
-
|
|
760
|
-
- Allow notifications.
|
|
761
|
-
- Allow lock-screen notifications.
|
|
251
|
+
- Allow notification permission.
|
|
762
252
|
- Allow background running.
|
|
763
253
|
- Disable battery optimization for ntfy.
|
|
764
|
-
-
|
|
765
|
-
- Allow background network access.
|
|
766
|
-
- In the watch/band companion app, allow forwarding ntfy notifications.
|
|
767
|
-
|
|
768
|
-
The F-Droid build of ntfy may rely more heavily on a background connection. If the phone has Google services, the Play Store build may be more reliable for push delivery.
|
|
769
|
-
|
|
770
|
-
Treat the ntfy topic as a secret. Do not use an easy-to-guess topic and never commit it to a public repository. Use a long random topic such as `your-long-random-topic`; when showing diagnostics publicly, mask it like `agen...q4z1`.
|
|
771
|
-
|
|
772
|
-
## Known Windows Notes
|
|
773
|
-
|
|
774
|
-
- Windows local desktop notification is intentionally skipped in this MVP. ntfy phone push is unaffected.
|
|
775
|
-
- Codex has been verified with a user-home `.cmd` wrapper.
|
|
776
|
-
- Claude Code has been verified with a project-local `.sh` wrapper.
|
|
777
|
-
- VS Code Copilot Agent has been verified with a project-local `.cmd` wrapper.
|
|
778
|
-
- Windows non-ASCII usernames, Git Bash path conversion, `cmd` quoting, and hook host behavior can all affect execution, so do not casually change wrapper strategy between tools.
|
|
779
|
-
- Git dubious ownership does not affect AgentBell notifications, but it can block `git status`, `git diff`, or commits. Users should decide whether to configure `safe.directory`.
|
|
780
|
-
- WSL, Remote SSH, Dev Containers, and Windows host shells have different home directories, Node paths, environment variables, and network behavior. Configure and verify AgentBell in the environment where the agent hook actually runs.
|
|
781
|
-
|
|
782
|
-
## Next: Verify and Rich Context
|
|
783
|
-
|
|
784
|
-
Now that `agentbell setup` exists, the next product step is a dedicated `agentbell verify` command for repeatable end-to-end checks after setup.
|
|
785
|
-
|
|
786
|
-
Planned improvements:
|
|
787
|
-
|
|
788
|
-
1. Verify config readability.
|
|
789
|
-
2. Verify ntfy delivery.
|
|
790
|
-
3. Verify installed hook files and wrapper paths.
|
|
791
|
-
4. Print tool-specific next steps for Codex, Claude Code, and VS Code Copilot Agent.
|
|
792
|
-
5. Expand notification templates with project and task context.
|
|
793
|
-
|
|
794
|
-
Example topic values in docs should stay generic, such as `your-long-random-topic` or `agen...q4z1`.
|
|
795
|
-
|
|
796
|
-
## Future: Rich Notification Context
|
|
797
|
-
|
|
798
|
-
Future AgentBell notifications can include richer context so the phone notification tells you which machine and task finished.
|
|
799
|
-
|
|
800
|
-
Possible fields:
|
|
801
|
-
|
|
802
|
-
- machine display name
|
|
803
|
-
- hostname
|
|
804
|
-
- tool
|
|
805
|
-
- event
|
|
806
|
-
- project name
|
|
807
|
-
- cwd
|
|
808
|
-
- git branch
|
|
809
|
-
- task name
|
|
810
|
-
- timestamp
|
|
811
|
-
|
|
812
|
-
Example:
|
|
254
|
+
- Confirm the phone subscribed to the same topic generated by setup.
|
|
813
255
|
|
|
814
|
-
|
|
815
|
-
瀹搞儰缍旂粩?閸?璺?Codex 鐎孤ゎ吀娴犺濮熺紒鎾存将
|
|
816
|
-
妞ゅ湱娲伴敍娆癵entBell
|
|
817
|
-
鐠侯垰绶為敍娆?\learning\AgentBell
|
|
818
|
-
閸掑棙鏁敍姝產in
|
|
819
|
-
```
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
## Rich Notification Context
|
|
826
|
-
|
|
827
|
-
AgentBell now builds richer default notification content when `--title` or `--message` is not provided. The default context can include:
|
|
256
|
+
## Manual Configuration
|
|
828
257
|
|
|
829
|
-
|
|
830
|
-
- hostname
|
|
831
|
-
- tool display name
|
|
832
|
-
- raw tool id
|
|
833
|
-
- event and event label
|
|
834
|
-
- task name
|
|
835
|
-
- project name
|
|
836
|
-
- cwd
|
|
837
|
-
- git branch
|
|
838
|
-
- local timestamp
|
|
839
|
-
- ISO timestamp
|
|
840
|
-
|
|
841
|
-
Example notification:
|
|
842
|
-
|
|
843
|
-
```text
|
|
844
|
-
瀹搞儰缍旂粩?閸?璺?Codex 鐎孤ゎ吀娴犺濮熺紒鎾存将
|
|
845
|
-
|
|
846
|
-
妞ゅ湱娲伴敍娆癵entBell
|
|
847
|
-
鐠侯垰绶為敍娆?\learning\AgentBell
|
|
848
|
-
閸掑棙鏁敍姝產in
|
|
849
|
-
娴滃娆㈤敍姝磘op
|
|
850
|
-
閺冨爼妫块敍?026-05-23 22:45
|
|
851
|
-
```
|
|
852
|
-
|
|
853
|
-
Useful `send` options:
|
|
258
|
+
`agentbell setup` is recommended. Advanced users can use lower-level commands:
|
|
854
259
|
|
|
855
260
|
```bash
|
|
856
|
-
agentbell
|
|
857
|
-
agentbell
|
|
858
|
-
agentbell
|
|
261
|
+
agentbell init
|
|
262
|
+
agentbell test
|
|
263
|
+
agentbell init-hooks --target codex
|
|
264
|
+
agentbell init-hooks --target claude-code
|
|
265
|
+
agentbell init-hooks --target vscode-agent
|
|
859
266
|
```
|
|
860
267
|
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
## Machine Display Name
|
|
864
|
-
|
|
865
|
-
The ntfy topic is a secret transport address, not a human-readable machine name. Do not use your topic as a display name and do not commit it to a public repository.
|
|
866
|
-
|
|
867
|
-
Use `profile.name` in `~/.agentbell/config.json` for friendly notification context:
|
|
268
|
+
Example config:
|
|
868
269
|
|
|
869
270
|
```json
|
|
870
271
|
{
|
|
272
|
+
"provider": "ntfy",
|
|
273
|
+
"ntfy": {
|
|
274
|
+
"server": "https://ntfy.sh",
|
|
275
|
+
"topic": "your-long-random-topic",
|
|
276
|
+
"priority": "high",
|
|
277
|
+
"tags": ["computer"]
|
|
278
|
+
},
|
|
871
279
|
"profile": {
|
|
872
|
-
"name": "
|
|
280
|
+
"name": "Workstation-01"
|
|
281
|
+
},
|
|
282
|
+
"localNotification": {
|
|
283
|
+
"enabled": false
|
|
284
|
+
},
|
|
285
|
+
"includeContext": {
|
|
286
|
+
"hostname": true,
|
|
287
|
+
"cwd": true,
|
|
288
|
+
"timestamp": true
|
|
873
289
|
}
|
|
874
290
|
}
|
|
875
291
|
```
|
|
876
292
|
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
### Hooks use rich context by default
|
|
881
|
-
|
|
882
|
-
Generated Stop wrappers now let `agentbell send` build the notification from rich context. They do not hard-code simple `--title` / `--message` values by default.
|
|
883
|
-
|
|
884
|
-
To customize hook notifications, create `.agentbell.json` in the project:
|
|
293
|
+
## Development
|
|
885
294
|
|
|
886
|
-
```
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
295
|
+
```bash
|
|
296
|
+
npm install
|
|
297
|
+
npm run build
|
|
298
|
+
npm test
|
|
299
|
+
npm run lint
|
|
300
|
+
node dist/cli.js --help
|
|
891
301
|
```
|
|
892
302
|
|
|
893
|
-
|
|
303
|
+
Useful local checks:
|
|
894
304
|
|
|
895
305
|
```bash
|
|
896
|
-
|
|
306
|
+
npm run check:package
|
|
307
|
+
npm pack --dry-run
|
|
897
308
|
```
|
|
898
309
|
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
Example hook notification:
|
|
902
|
-
|
|
903
|
-
```text
|
|
904
|
-
瀹搞儰缍旂粩?閸?璺?Codex 鐎孤ゎ吀娴犺濮熺紒鎾存将
|
|
905
|
-
妞ゅ湱娲伴敍娆癵entBell
|
|
906
|
-
鐠侯垰绶為敍娆?\learning\AgentBell
|
|
907
|
-
閸掑棙鏁敍姝產in
|
|
908
|
-
娴滃娆㈤敍姝磘op
|
|
909
|
-
閺冨爼妫块敍?026-05-23 22:45
|
|
910
|
-
```
|
|
911
|
-
## Project Config
|
|
310
|
+
## Release
|
|
912
311
|
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
{
|
|
917
|
-
"projectName": "AgentBell",
|
|
918
|
-
"defaultTaskName": "鐎孤ゎ吀娴犺濮?
|
|
919
|
-
}
|
|
920
|
-
```
|
|
921
|
-
|
|
922
|
-
Create it with:
|
|
312
|
+
- Package name: `@xwss/agentbell`
|
|
313
|
+
- CLI command: `agentbell`
|
|
314
|
+
- Publish command:
|
|
923
315
|
|
|
924
316
|
```bash
|
|
925
|
-
|
|
317
|
+
npm publish --access public --tag beta
|
|
926
318
|
```
|
|
927
319
|
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
Project name priority:
|
|
931
|
-
|
|
932
|
-
1. `agentbell send --project <name>`
|
|
933
|
-
2. `.agentbell.json` `projectName`
|
|
934
|
-
3. `package.json` `name`
|
|
935
|
-
4. current directory name
|
|
936
|
-
|
|
937
|
-
Task name priority:
|
|
938
|
-
|
|
939
|
-
1. `agentbell send --task <name>`
|
|
940
|
-
2. `.agentbell.json` `defaultTaskName`
|
|
941
|
-
3. `娴犺濮焋
|
|
942
|
-
|
|
943
|
-
Project-level notification templates can override global templates:
|
|
320
|
+
Do not publish unless these pass:
|
|
944
321
|
|
|
945
|
-
```
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
"messageTemplate": "妞ゅ湱娲伴敍姝縶project}}\n鐠侯垰绶為敍姝縶cwd}}\n閸掑棙鏁敍姝縶branch}}\n娴滃娆㈤敍姝縶event}}\n閺冨爼妫块敍姝縶timestamp}}"
|
|
952
|
-
}
|
|
953
|
-
}
|
|
322
|
+
```bash
|
|
323
|
+
npm run build
|
|
324
|
+
npm test
|
|
325
|
+
npm run lint
|
|
326
|
+
npm run check:package
|
|
327
|
+
npm pack --dry-run
|
|
954
328
|
```
|
|
955
329
|
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
## Setup Project Context
|
|
959
|
-
|
|
960
|
-
`agentbell setup` remains safe by default and does not create `.agentbell.json` in `--yes` mode unless requested.
|
|
330
|
+
Before publishing, confirm no real topic, token, log, backup, local hook wrapper, `.env`, or local config file is included.
|
|
961
331
|
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
```bash
|
|
965
|
-
agentbell setup --init-project --project-name AgentBell
|
|
966
|
-
```
|
|
332
|
+
## License
|
|
967
333
|
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
334
|
+
MIT
|
package/RELEASE.md
CHANGED
|
@@ -13,7 +13,7 @@ The npm package is scoped as `@xwss/agentbell`, while the installed CLI command
|
|
|
13
13
|
7. `npm pack`
|
|
14
14
|
8. Install the tarball locally:
|
|
15
15
|
```bash
|
|
16
|
-
npm install -g ./xwss-agentbell-0.1.
|
|
16
|
+
npm install -g ./xwss-agentbell-0.1.1.tgz
|
|
17
17
|
```
|
|
18
18
|
9. Smoke test:
|
|
19
19
|
```bash
|
package/dist/cli.js
CHANGED
|
@@ -9,11 +9,12 @@ import { runSetup } from './commands/setup.js';
|
|
|
9
9
|
import { runTest } from './commands/test.js';
|
|
10
10
|
import { runVerify } from './commands/verify.js';
|
|
11
11
|
import { logger } from './utils/logger.js';
|
|
12
|
+
import { getPackageVersion } from './utils/version.js';
|
|
12
13
|
const program = new Command();
|
|
13
14
|
program
|
|
14
15
|
.name('agentbell')
|
|
15
16
|
.description('AgentBell: get notified when your AI coding agent finishes.')
|
|
16
|
-
.version(
|
|
17
|
+
.version(getPackageVersion());
|
|
17
18
|
program
|
|
18
19
|
.command('send')
|
|
19
20
|
.description('Send one notification. Intended for AI coding agent hooks.')
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAmB,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getPackageVersion(fromUrl?: string): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
const unknownVersion = '0.0.0-unknown';
|
|
5
|
+
function readVersion(packageJsonPath) {
|
|
6
|
+
try {
|
|
7
|
+
const pkg = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
|
8
|
+
return typeof pkg.version === 'string' && pkg.version.trim() ? pkg.version : undefined;
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export function getPackageVersion(fromUrl = import.meta.url) {
|
|
15
|
+
const currentFile = fileURLToPath(fromUrl);
|
|
16
|
+
let directory = path.dirname(currentFile);
|
|
17
|
+
for (let depth = 0; depth < 5; depth += 1) {
|
|
18
|
+
const version = readVersion(path.join(directory, 'package.json'));
|
|
19
|
+
if (version) {
|
|
20
|
+
return version;
|
|
21
|
+
}
|
|
22
|
+
const parent = path.dirname(directory);
|
|
23
|
+
if (parent === directory) {
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
directory = parent;
|
|
27
|
+
}
|
|
28
|
+
return unknownVersion;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,cAAc,GAAG,eAAe,CAAC;AAEvC,SAAS,WAAW,CAAC,eAAuB;IAC1C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAA0B,CAAC;QACvF,OAAO,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IACzF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG;IACzD,MAAM,WAAW,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3C,IAAI,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAE1C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC1C,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;QAClE,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,OAAO,CAAC;QACjB,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACvC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM;QACR,CAAC;QACD,SAAS,GAAG,MAAM,CAAC;IACrB,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xwss/agentbell",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Get notified on your phone when AI coding agents finish.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
"lint": "eslint .",
|
|
24
24
|
"format": "prettier --write .",
|
|
25
25
|
"format:check": "prettier --check .",
|
|
26
|
+
"check:encoding": "node scripts/check-encoding.mjs",
|
|
26
27
|
"check:package": "node scripts/check-package.mjs",
|
|
28
|
+
"check:repo": "node scripts/check-repo.mjs",
|
|
27
29
|
"prepack": "npm run build && npm run check:package"
|
|
28
30
|
},
|
|
29
31
|
"dependencies": {
|