@trygocode/notify 0.1.0 → 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 +30 -0
- package/README.md +44 -15
- package/assets/README.md +6 -9
- package/assets/banner.png +0 -0
- package/assets/icon-128.png +0 -0
- package/assets/icon-512.png +0 -0
- package/dist/src/claude.js +8 -4
- package/dist/src/cursor.js +6 -2
- package/dist/src/mcp.js +3 -3
- package/package.json +2 -2
- package/snippets/ralph-homer.sh +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,35 @@
|
|
|
3
3
|
All notable changes to `@trygocode/notify` are documented here. This project
|
|
4
4
|
follows [Semantic Versioning](https://semver.org).
|
|
5
5
|
|
|
6
|
+
## [0.1.2] — 2026-06-04
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
- **Hooks now work without a global install.** The Cursor `stop` hook and the
|
|
10
|
+
Claude Code `Stop`/`Notification`/`SubagentStop` hooks (and the Ralph/Homer
|
|
11
|
+
loop snippet) shelled out to a bare `gocode-notify send …`, which only
|
|
12
|
+
resolves when the package is installed globally on `PATH`. After an
|
|
13
|
+
`npx @trygocode/notify setup` (the documented flow) the binary was NOT on
|
|
14
|
+
`PATH`, so every hook silently failed (the `|| true` guard hid it) and no
|
|
15
|
+
phone notification was ever sent on agent completion. The hooks now invoke
|
|
16
|
+
`npx -y @trygocode/notify send …`, matching the MCP entry's invocation form,
|
|
17
|
+
so they work out of the box with zero global footprint. The idempotent
|
|
18
|
+
merge/uninstall markers were widened to `notify send` so they detect and
|
|
19
|
+
cleanly replace BOTH the new form and any legacy bare-command hook from an
|
|
20
|
+
older install.
|
|
21
|
+
|
|
22
|
+
## [0.1.1] — 2026-06-03
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
- **Real GoCode artwork** — replaced placeholder mark with the official GoCode
|
|
26
|
+
Notify icon (`icon-512.png` / `icon-128.png`) and a README hero banner. MCP
|
|
27
|
+
server `icons` metadata now points at the real PNGs.
|
|
28
|
+
- **Clearer docs** — the free GoCode phone app is now called out up front as a
|
|
29
|
+
required component, the "free" status is stated explicitly, and a new
|
|
30
|
+
**GoCode platform settings** section documents auto-push, safe pull-before-push,
|
|
31
|
+
AI-Solve conflict resolution, and review-&-merge.
|
|
32
|
+
- Renamed "Ralph / Homer loops" to "Ralph Wiggum / Autopilot script loops"
|
|
33
|
+
throughout for readers unfamiliar with the internal codenames.
|
|
34
|
+
|
|
6
35
|
## [0.1.0] — 2026-06-03
|
|
7
36
|
|
|
8
37
|
Initial public release.
|
|
@@ -26,4 +55,5 @@ Initial public release.
|
|
|
26
55
|
- **MCP server metadata** — `icons` + `websiteUrl` (SEP-973) so compatible clients
|
|
27
56
|
can show the GoCode mark next to the server.
|
|
28
57
|
|
|
58
|
+
[0.1.1]: https://github.com/joseph-lewis/gocode-notify/releases/tag/v0.1.1
|
|
29
59
|
[0.1.0]: https://github.com/joseph-lewis/gocode-notify/releases/tag/v0.1.0
|
package/README.md
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="assets/icon.
|
|
2
|
+
<img src="assets/icon-512.png" alt="GoCode Notify" width="104" height="104" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<h1 align="center">@trygocode/notify</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<strong>Get a push notification on your phone the moment your AI coding agent finishes.</strong><br/>
|
|
9
|
-
Cursor · Claude Code · OpenCode · Ralph/
|
|
9
|
+
Cursor · Claude Code · OpenCode · Ralph Wiggum / Autopilot script loops — installed with <em>one</em> command.
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
13
13
|
<a href="https://www.npmjs.com/package/@trygocode/notify"><img alt="npm" src="https://img.shields.io/npm/v/@trygocode/notify?color=5EE6A8&label=npm"></a>
|
|
14
14
|
<a href="LICENSE"><img alt="license" src="https://img.shields.io/badge/license-MIT-blue.svg"></a>
|
|
15
|
+
<img alt="price" src="https://img.shields.io/badge/price-free-5EE6A8">
|
|
15
16
|
<img alt="node" src="https://img.shields.io/badge/node-%3E%3D18-339933?logo=node.js&logoColor=white">
|
|
16
17
|
<img alt="works with" src="https://img.shields.io/badge/works%20with-Cursor%20%C2%B7%20Claude%20Code%20%C2%B7%20OpenCode-111">
|
|
17
18
|
</p>
|
|
@@ -21,10 +22,16 @@ npx @trygocode/notify@latest setup
|
|
|
21
22
|
```
|
|
22
23
|
|
|
23
24
|
<p align="center">
|
|
24
|
-
|
|
25
|
-
<img src="assets/demo.gif" alt="A push notification arrives on the phone the instant the agent finishes" width="320" />
|
|
25
|
+
<img src="assets/banner.png" alt="GoCode Notify" width="640" />
|
|
26
26
|
</p>
|
|
27
27
|
|
|
28
|
+
> **Free.** `@trygocode/notify` and the **[GoCode](https://oh.jeltechsolutions.com)** phone app
|
|
29
|
+
> that receives the pushes are both free to use.
|
|
30
|
+
>
|
|
31
|
+
> **You need the GoCode app.** Notifications are delivered to your phone through the free GoCode
|
|
32
|
+
> app — it's the pairing target and the thing your phone buzzes with. Install it, pair once
|
|
33
|
+
> (a 6-digit code), done. Without it there's nowhere for the pushes to land.
|
|
34
|
+
|
|
28
35
|
---
|
|
29
36
|
|
|
30
37
|
## Why?
|
|
@@ -38,6 +45,7 @@ you didn't notice.
|
|
|
38
45
|
idle waiting for you, errors out, or an overnight loop completes/halts.** Walk
|
|
39
46
|
away. Your phone tells you when it needs you.
|
|
40
47
|
|
|
48
|
+
- 🆓 **Free.** The package and the GoCode phone app are free. No card, no trial.
|
|
41
49
|
- ⚡ **One command.** `npx @trygocode/notify@latest setup` — no server to host, no config files to hand-edit.
|
|
42
50
|
- 🔒 **Push-only & private.** The paired key can *only* send notifications to your phone. It can't read your chats, code, or settings. Revoke it any time.
|
|
43
51
|
- 🧩 **Auto-detects your tools.** Wires up Cursor, Claude Code, and OpenCode in one go — never clobbering your existing hooks/MCP config.
|
|
@@ -50,17 +58,19 @@ away. Your phone tells you when it needs you.
|
|
|
50
58
|
| **Cursor** | `stop` hook |
|
|
51
59
|
| **Claude Code** | `Stop` + `Notification` + `SubagentStop` hooks |
|
|
52
60
|
| **OpenCode** | runtime hook |
|
|
53
|
-
| **Ralph /
|
|
61
|
+
| **Ralph Wiggum / Autopilot script loops** | opt-in completion/halt snippet |
|
|
54
62
|
|
|
55
|
-
>
|
|
56
|
-
>
|
|
63
|
+
> **Requires the free [GoCode](https://oh.jeltechsolutions.com) phone app.** It's the one-time
|
|
64
|
+
> pairing target and where every push lands. Install GoCode, pair once, done — both the app and
|
|
65
|
+
> this package are free.
|
|
57
66
|
|
|
58
67
|
## Contents
|
|
59
68
|
|
|
60
69
|
- [Install — two equally-supported paths](#install--two-equally-supported-paths)
|
|
61
70
|
- [Pairing — step by step](#pairing--step-by-step)
|
|
62
71
|
- [The three triggers](#the-three-triggers)
|
|
63
|
-
- [
|
|
72
|
+
- [Loop opt-in snippet (trigger C)](#loop-opt-in-snippet-trigger-c)
|
|
73
|
+
- [GoCode platform settings (auto-push, pull-before-push & more)](#gocode-platform-settings)
|
|
64
74
|
- [Troubleshooting](#troubleshooting)
|
|
65
75
|
- [Develop](#develop)
|
|
66
76
|
- [Layout](#layout)
|
|
@@ -155,23 +165,24 @@ or staging GoCode server.
|
|
|
155
165
|
|---|---|---|
|
|
156
166
|
| **(A) Runtime hook** | Cursor `stop` / Claude Code `Stop`+`Notification`+`SubagentStop` | Agent finishes a turn, goes idle, or errors — **automatic, the killer feature** |
|
|
157
167
|
| **(B) MCP tool** | `gocode_notify` tool the agent calls | You *explicitly* ask "ping me when X is done" mid-task |
|
|
158
|
-
| **(C) Loop shell hook** | one line in your loop's completion/halt path | A Ralph/
|
|
168
|
+
| **(C) Loop shell hook** | one line in your loop's completion/halt path | A Ralph Wiggum / Autopilot script loop reaches `completed` / `halted` |
|
|
159
169
|
|
|
160
170
|
The installed rule/skill tells the agent **not** to call the MCP tool for
|
|
161
171
|
done/idle/error pings — those are owned by the deterministic hook (A), so you
|
|
162
172
|
never get double-pinged.
|
|
163
173
|
|
|
164
|
-
##
|
|
174
|
+
## Loop opt-in snippet (trigger C)
|
|
165
175
|
|
|
166
|
-
For power users running
|
|
167
|
-
|
|
168
|
-
lines into the loop's
|
|
176
|
+
For power users running an autonomous loop **they control** — a *Ralph Wiggum*-style
|
|
177
|
+
"keep prompting until done" loop, an Autopilot script, a `while :; do … done`
|
|
178
|
+
one-liner, or any custom driver — drop these two lines into the loop's
|
|
179
|
+
completion/halt path:
|
|
169
180
|
|
|
170
181
|
```bash
|
|
171
182
|
# At loop completion:
|
|
172
|
-
|
|
183
|
+
npx -y @trygocode/notify send --kind loop_completed --source ralph --project "$(basename "$PWD")" || true
|
|
173
184
|
# At loop halt (paused_max_failures / awaiting_human):
|
|
174
|
-
|
|
185
|
+
npx -y @trygocode/notify send --kind loop_halted --source ralph --project "$(basename "$PWD")" \
|
|
175
186
|
--title "Ralph halted — needs you" || true
|
|
176
187
|
```
|
|
177
188
|
|
|
@@ -182,6 +193,24 @@ The ready-to-copy version with comments lives at
|
|
|
182
193
|
loop scripts. Both lines are fire-and-forget (`|| true` + the CLI's 5s
|
|
183
194
|
self-timeout), so a failed or slow push can never block or fail your loop.
|
|
184
195
|
|
|
196
|
+
## GoCode platform settings
|
|
197
|
+
|
|
198
|
+
This package is the *notifier*. The richer automation lives in the free **GoCode**
|
|
199
|
+
phone app (Settings → per-project + global), which uses these notifications as its
|
|
200
|
+
signalling layer. Once paired, the app gives you:
|
|
201
|
+
|
|
202
|
+
| Setting | What it does |
|
|
203
|
+
|---|---|
|
|
204
|
+
| **Notification preferences** | Choose which events ping your phone — done / idle / error, loop completed, loop halted, agent questions, merge-ready — globally or per project. |
|
|
205
|
+
| **Auto-push to git** | Opt-in: after a turn, the agent commits + pushes to a chosen branch so your work is never stranded on one machine and you can pick up anywhere. Off by default. |
|
|
206
|
+
| **Pull-before-push (safe)** | When auto-push is on, a `git pull --rebase --autostash` runs first so remote changes merge cleanly. On a real conflict it aborts safely (nothing lost) and pings your phone. |
|
|
207
|
+
| **AI-Solve conflicts** | If a push hits a conflict, the notification deep-links into the chat with two actions: **Acknowledge** or **AI-Solve** — your agent diagnoses local vs remote and resolves it with no code loss, asking you only when it's unsure. |
|
|
208
|
+
| **Review & merge / Create PR** | When an Autopilot loop finishes on its own branch, you get a merge-ready ping; choose **Merge & push** (solo repos) or **Create PR** (teams), with a remembered default branch. |
|
|
209
|
+
| **Default LLM & loop model** | Per-project defaults for the agent model and the Autopilot loop model. |
|
|
210
|
+
|
|
211
|
+
> These toggles are configured **in the GoCode app**, not in this npm package — the
|
|
212
|
+
> package just delivers the pings that drive them. All of it is free.
|
|
213
|
+
|
|
185
214
|
## Troubleshooting
|
|
186
215
|
|
|
187
216
|
**Start here:** `gocode-notify status` prints a one-screen report — whether
|
package/assets/README.md
CHANGED
|
@@ -4,13 +4,10 @@ Brand assets for **GoCode Notify**.
|
|
|
4
4
|
|
|
5
5
|
| File | Used by |
|
|
6
6
|
|---|---|
|
|
7
|
-
| `icon.
|
|
8
|
-
| `icon-128.png` | MCP server icon metadata (
|
|
9
|
-
| `
|
|
10
|
-
| `
|
|
7
|
+
| `icon-512.png` | Primary GoCode Notify mark (512×512). README header + MCP server icon metadata. |
|
|
8
|
+
| `icon-128.png` | MCP server icon metadata (128×128). |
|
|
9
|
+
| `icon.svg` | Scalable fallback mark. |
|
|
10
|
+
| `banner.png` | README hero banner (1280×320). |
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
> README image links keep resolving. Recommended: `icon.svg` (square, transparent),
|
|
15
|
-
> `icon-128.png` (128×128), `demo.gif` (≤ 3s, ≤ 5 MB), `logo.png` (1280×640 for the
|
|
16
|
-
> GitHub social card).
|
|
12
|
+
All marks are the official GoCode logo. Keep filenames identical so the MCP icon
|
|
13
|
+
URLs (served over GitHub's raw CDN) and README image links keep resolving.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/src/claude.js
CHANGED
|
@@ -42,16 +42,20 @@ export const MCP_SERVER_ENTRY = {
|
|
|
42
42
|
* (e.g. Cursor `stop` + Claude `Stop`) coalesce server-side.
|
|
43
43
|
*/
|
|
44
44
|
export const CLAUDE_HOOK_COMMANDS = {
|
|
45
|
-
Stop: '
|
|
46
|
-
Notification: '
|
|
47
|
-
SubagentStop: '
|
|
45
|
+
Stop: 'npx -y @trygocode/notify send --kind finished --source claude_code --dedupe-key "$CLAUDE_SESSION_ID-stop" || true',
|
|
46
|
+
Notification: 'npx -y @trygocode/notify send --kind awaiting_input --source claude_code --title "Agent needs you" --dedupe-key "$CLAUDE_SESSION_ID-notify" || true',
|
|
47
|
+
SubagentStop: 'npx -y @trygocode/notify send --kind finished --source claude_code --title "Subagent done" --dedupe-key "$CLAUDE_SESSION_ID-subagent" || true',
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
* Substrings that together identify a hook command as OURS. Used for idempotent
|
|
51
51
|
* merge (replace, don't duplicate) and for surgical uninstall (remove exactly
|
|
52
52
|
* ours). A command must contain BOTH to be considered ours.
|
|
53
|
+
*
|
|
54
|
+
* `notify send` matches BOTH the current `npx -y @trygocode/notify send …`
|
|
55
|
+
* form AND the legacy bare `gocode-notify send …` form, so upgrading from an
|
|
56
|
+
* older install is detected and cleanly replaced rather than duplicated.
|
|
53
57
|
*/
|
|
54
|
-
const HOOK_MARKERS = ["
|
|
58
|
+
const HOOK_MARKERS = ["notify send", "--source claude_code"];
|
|
55
59
|
/**
|
|
56
60
|
* The on-demand skill written to `~/.claude/skills/gocode-notify/SKILL.md`
|
|
57
61
|
* (PRD §5.5). The crucial content is the anti-double-ping rule: the automatic
|
package/dist/src/cursor.js
CHANGED
|
@@ -41,13 +41,17 @@ export const MCP_SERVER_ENTRY = {
|
|
|
41
41
|
* `--dedupe-key` so overlapping triggers (e.g. Cursor `stop` + Claude `Stop`)
|
|
42
42
|
* coalesce server-side.
|
|
43
43
|
*/
|
|
44
|
-
export const CURSOR_STOP_COMMAND = "
|
|
44
|
+
export const CURSOR_STOP_COMMAND = "npx -y @trygocode/notify send --kind finished --source cursor --dedupe-key cursor-stop || true";
|
|
45
45
|
/**
|
|
46
46
|
* Substrings that together identify a `stop` hook entry as OURS. Used for
|
|
47
47
|
* idempotent merge (replace, don't duplicate) and for surgical uninstall (remove
|
|
48
48
|
* exactly ours). A command must contain BOTH to be considered ours.
|
|
49
|
+
*
|
|
50
|
+
* `notify send` matches BOTH the current `npx -y @trygocode/notify send …`
|
|
51
|
+
* form AND the legacy bare `gocode-notify send …` form, so an upgrade from an
|
|
52
|
+
* older install is detected and cleanly replaced rather than duplicated.
|
|
49
53
|
*/
|
|
50
|
-
const HOOK_MARKERS = ["
|
|
54
|
+
const HOOK_MARKERS = ["notify send", "--source cursor"];
|
|
51
55
|
/**
|
|
52
56
|
* The on-demand rule written to `~/.cursor/rules/gocode-notify.md` (PRD §5.5).
|
|
53
57
|
* The crucial content is the anti-double-ping rule: the automatic pings are
|
package/dist/src/mcp.js
CHANGED
|
@@ -43,9 +43,9 @@ export const SERVER_ICONS = [
|
|
|
43
43
|
sizes: ["128x128"],
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
src: "https://raw.githubusercontent.com/joseph-lewis/gocode-notify/main/assets/icon.
|
|
47
|
-
mimeType: "image/
|
|
48
|
-
sizes: ["
|
|
46
|
+
src: "https://raw.githubusercontent.com/joseph-lewis/gocode-notify/main/assets/icon-512.png",
|
|
47
|
+
mimeType: "image/png",
|
|
48
|
+
sizes: ["512x512"],
|
|
49
49
|
},
|
|
50
50
|
];
|
|
51
51
|
/** Tool name an agent calls to send an on-demand push. */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trygocode/notify",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Free phone notifications for any coding agent (Cursor, Claude Code, OpenCode, Ralph/
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Free phone notifications for any coding agent (Cursor, Claude Code, OpenCode, Ralph Wiggum / Autopilot loops) via the free GoCode app. One npx command installs the hooks + MCP server.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"homepage": "https://github.com/joseph-lewis/gocode-notify#readme",
|
package/snippets/ralph-homer.sh
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# gocode-notify — Ralph/
|
|
1
|
+
# gocode-notify — Ralph Wiggum / Autopilot script loop opt-in snippet (trigger C)
|
|
2
2
|
#
|
|
3
3
|
# OPT-IN. This snippet is NOT auto-injected by `gocode-notify setup`; the
|
|
4
4
|
# installer never edits your loop scripts without consent. Paste these two
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
# can never block or fail your loop (the CLI also self-times-out in 5s).
|
|
15
15
|
|
|
16
16
|
# --- At loop completion (the loop finished all work cleanly) -----------------
|
|
17
|
-
|
|
17
|
+
npx -y @trygocode/notify send --kind loop_completed --source ralph --project "$(basename "$PWD")" || true
|
|
18
18
|
|
|
19
19
|
# --- At loop halt (paused_max_failures / awaiting_human / question raised) ---
|
|
20
|
-
|
|
20
|
+
npx -y @trygocode/notify send --kind loop_halted --source ralph --project "$(basename "$PWD")" \
|
|
21
21
|
--title "Ralph halted — needs you" || true
|