@erica-s/ai-agent-notify 2.1.5
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/.published +1 -0
- package/README.md +100 -0
- package/assets/icons/info.png +0 -0
- package/assets/icons/permission.png +0 -0
- package/assets/icons/stop.png +0 -0
- package/bin/cli.js +3104 -0
- package/lib/codex-sidecar-state.js +314 -0
- package/lib/notification-sources.js +411 -0
- package/package.json +41 -0
- package/postinstall.js +54 -0
- package/scripts/activate-window.ps1 +26 -0
- package/scripts/activate-window.vbs +13 -0
- package/scripts/codex-notify-wrapper.vbs +29 -0
- package/scripts/find-hwnd.ps1 +144 -0
- package/scripts/get-shell-pid.ps1 +69 -0
- package/scripts/notify.ps1 +193 -0
- package/scripts/register-protocol.ps1 +18 -0
- package/scripts/start-hidden.vbs +24 -0
- package/scripts/start-tab-color-watcher.ps1 +41 -0
- package/scripts/tab-color-watcher.ps1 +391 -0
package/.published
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"2.1.5","date":"2026-03-31T17:50:50.044Z"}
|
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# ai-agent-notify
|
|
2
|
+
|
|
3
|
+
Windows Toast notifications for Claude Code and Codex.
|
|
4
|
+
|
|
5
|
+
Get notified when Claude or Codex finishes a task, or when Codex requests
|
|
6
|
+
approval.
|
|
7
|
+
|
|
8
|
+
## Problem It Solves
|
|
9
|
+
|
|
10
|
+
Claude Code sessions can run for a long time. Once you switch to other windows,
|
|
11
|
+
it becomes easy to miss state changes in the original terminal. This package
|
|
12
|
+
solves two core problems:
|
|
13
|
+
|
|
14
|
+
### 1. Reminder
|
|
15
|
+
|
|
16
|
+
- Native Windows Toast notifications
|
|
17
|
+
- Taskbar flashing
|
|
18
|
+
|
|
19
|
+
### 2. Return To The Session
|
|
20
|
+
|
|
21
|
+
- Notification titles make the source and result easy to identify
|
|
22
|
+
- The matching terminal window flashes as a visual cue
|
|
23
|
+
- The notification provides an `Open` button that activates the target window
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Recommended: global install via volta or npm
|
|
29
|
+
volta install @erica-s/ai-agent-notify
|
|
30
|
+
# or
|
|
31
|
+
npm install -g @erica-s/ai-agent-notify
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Claude Code
|
|
35
|
+
|
|
36
|
+
Add to your `~/.claude/settings.json`:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"hooks": {
|
|
41
|
+
"Stop": [{ "hooks": [{ "type": "command", "command": "ai-agent-notify", "async": true }] }],
|
|
42
|
+
"PermissionRequest": [{ "hooks": [{ "type": "command", "command": "ai-agent-notify", "async": true }] }]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
- Prefer a global install. `npx --yes @erica-s/ai-agent-notify` is less
|
|
48
|
+
reliable in async hooks.
|
|
49
|
+
- The click-to-activate protocol is registered automatically on install.
|
|
50
|
+
|
|
51
|
+
## Codex
|
|
52
|
+
|
|
53
|
+
Recommended `~/.codex/config.toml`:
|
|
54
|
+
|
|
55
|
+
```toml
|
|
56
|
+
notify = ["ai-agent-notify"]
|
|
57
|
+
|
|
58
|
+
[mcp_servers.ai_agent_notify_sidecar]
|
|
59
|
+
command = "cmd.exe"
|
|
60
|
+
args = ["/d", "/c", "ai-agent-notify", "codex-mcp-sidecar"]
|
|
61
|
+
required = false
|
|
62
|
+
startup_timeout_sec = 5
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
- `notify = ["ai-agent-notify"]` covers completion events such as
|
|
66
|
+
`agent-turn-complete`.
|
|
67
|
+
- `codex-session-watch` is the main path for approval reminders.
|
|
68
|
+
- `codex-mcp-sidecar` will usually auto-start `codex-session-watch`.
|
|
69
|
+
- Do **not** set `cwd` on the MCP server entry above.
|
|
70
|
+
- After changing Codex `notify`, restart Codex and retest in a fresh TUI
|
|
71
|
+
session.
|
|
72
|
+
- Prefer a global install. `npx.cmd @erica-s/ai-agent-notify` is less reliable on Windows.
|
|
73
|
+
|
|
74
|
+
If you are not using the MCP sidecar, start the watcher yourself:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
ai-agent-notify codex-session-watch
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Optional flags:
|
|
81
|
+
|
|
82
|
+
- `--sessions-dir <path>`: override the Codex sessions directory
|
|
83
|
+
- `--tui-log <path>`: override the Codex TUI log path
|
|
84
|
+
- `--poll-ms <ms>`: change the polling interval
|
|
85
|
+
|
|
86
|
+
## Requirements
|
|
87
|
+
|
|
88
|
+
- Windows 10 / 11
|
|
89
|
+
- Node.js >= 16
|
|
90
|
+
- PowerShell 5.1+
|
|
91
|
+
|
|
92
|
+
## Known Limitations
|
|
93
|
+
|
|
94
|
+
- **Toast source** shows as "Windows PowerShell" instead of "Claude Code"
|
|
95
|
+
- **Windows 10:** `Open` may not work due to OS limitations
|
|
96
|
+
- **macOS / Linux:** not supported
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
MIT
|
|
Binary file
|
|
Binary file
|
|
Binary file
|