@pushary/agent-hooks 0.66.0 → 0.67.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/CHANGELOG.md +34 -0
- package/data/SKILL.md +105 -30
- package/data/cursor-plugin/skills/pushary/SKILL.md +103 -24
- package/data/vscode-plugin/.claude-plugin/plugin.json +28 -0
- package/data/vscode-plugin/.mcp.json +11 -0
- package/data/vscode-plugin/CHANGELOG.md +11 -0
- package/data/vscode-plugin/LICENSE +21 -0
- package/data/vscode-plugin/README.md +136 -0
- package/data/vscode-plugin/SECURITY.md +56 -0
- package/data/vscode-plugin/assets/logo.png +0 -0
- package/data/vscode-plugin/commands/notify-when-done.md +14 -0
- package/data/vscode-plugin/commands/pushary-test.md +13 -0
- package/data/vscode-plugin/hooks/hooks.json +11 -0
- package/data/vscode-plugin/scripts/pushary-gate.mjs +508 -0
- package/data/vscode-plugin/skills/pushary/SKILL.md +376 -0
- package/dist/bin/pushary-clean.js +29 -4
- package/dist/bin/pushary-connect.js +1 -1
- package/dist/bin/pushary-doctor.js +43 -8
- package/dist/bin/pushary-logout.js +1 -1
- package/dist/bin/pushary-setup.js +130 -8
- package/dist/bin/pushary-status.js +1 -1
- package/dist/bin/pushary-upgrade.js +17 -5
- package/dist/{chunk-RU3CIBXY.js → chunk-7HG4WUIE.js} +4 -0
- package/dist/chunk-KB4ODLGB.js +332 -0
- package/dist/{chunk-QTC7SR6A.js → chunk-V6OA4VPU.js} +24 -5
- package/package.json +2 -7
- package/dist/chunk-6G2BC4ET.js +0 -93
- package/dist/chunk-N7XJ4L2W.js +0 -79
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.67.0
|
|
4
|
+
|
|
5
|
+
### The VS Code agent can now ask for approval on your phone
|
|
6
|
+
|
|
7
|
+
Setup has a VS Code option. It installs a Pushary agent plugin, connects the MCP
|
|
8
|
+
tools so the agent can notify you and ask you questions, and registers a
|
|
9
|
+
permission gate so a risky terminal command reaches your phone before it runs.
|
|
10
|
+
The policy behind it is the one your other agents already use, so a rule you
|
|
11
|
+
wrote for Claude Code applies here too.
|
|
12
|
+
|
|
13
|
+
Two things about VS Code shaped how this works.
|
|
14
|
+
|
|
15
|
+
VS Code reads a hook's matcher but does not act on it, so the gate is called for
|
|
16
|
+
every tool the agent uses, including reading a file. It therefore decides for
|
|
17
|
+
itself, and for anything that is not a risky shell command it returns straight
|
|
18
|
+
away without touching the disk or the network.
|
|
19
|
+
|
|
20
|
+
And a plugin folder does nothing until VS Code is told where it is. Setup adds
|
|
21
|
+
that entry to your settings.json. That file usually has comments in it, and
|
|
22
|
+
rewriting it as plain JSON would delete every one of them, so an existing file
|
|
23
|
+
is edited one line at a time and left otherwise byte for byte identical. If your
|
|
24
|
+
settings already have a plugin list with comments around it, setup does not
|
|
25
|
+
guess: it prints the single line to paste and names the file.
|
|
26
|
+
|
|
27
|
+
Unlike Cursor, VS Code hooks cannot ask the editor to block a command on the
|
|
28
|
+
plugin's behalf. So when Pushary cannot reach you, or cannot reach its own
|
|
29
|
+
server, the gate hands the decision to VS Code's own approval prompt rather than
|
|
30
|
+
letting the command through.
|
|
31
|
+
|
|
32
|
+
`pushary clean` removes all of it again, the settings.json entry included, and
|
|
33
|
+
`pushary doctor` checks the three things that can be silently wrong: whether the
|
|
34
|
+
plugin is registered at all, whether the gate script resolves, and whether your
|
|
35
|
+
key is linked.
|
|
36
|
+
|
|
3
37
|
## 0.66.0
|
|
4
38
|
|
|
5
39
|
### Setup waited three minutes for a step that takes longer than three minutes
|
package/data/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pushary
|
|
3
|
-
version: 0.
|
|
4
|
-
description: Push notifications and human-in-the-loop for AI
|
|
3
|
+
version: 0.7.0
|
|
4
|
+
description: Push notifications and human-in-the-loop for AI agents. Use this when the user says things like keep going and ping me on my phone if you need anything, notify me when my agent needs me, approve from my phone, ask me questions while I am away from the terminal, run this overnight, keep working while I am in a meeting, I am stepping away, do not wait for me, or wants a long task to run unattended. Send alerts when tasks finish or fail, ask questions (yes/no, multiple choice, or free text) via push, and get answers from the user's lock screen. Use these tools proactively - do not wait for the user to ask for notifications. Works with Claude Code, Codex, Cursor, VS Code, Windsurf, Hermes, Lovable, or any MCP client; no Claude Max subscription required. Pushary is a hosted service, $9.99/mo after a 7-day card-first trial.
|
|
5
5
|
metadata:
|
|
6
6
|
hermes:
|
|
7
7
|
tags: [notifications, push, human-in-the-loop, alerts, permissions, mcp]
|
|
@@ -10,23 +10,31 @@ metadata:
|
|
|
10
10
|
tags: notifications, push, mcp, human-in-the-loop, cursor, claude, windsurf, hermes, alerts, permissions
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
# Pushary
|
|
13
|
+
# Pushary - Push Notifications for AI Agents
|
|
14
14
|
|
|
15
|
-
Pushary is an MCP server that
|
|
15
|
+
When the user says "keep going, ping me on my phone if you need anything", this is the skill that does the pinging. Pushary is an MCP server that reaches the user on their phone while they are away from the terminal:
|
|
16
16
|
|
|
17
17
|
1. **Send push notifications** to the user's phone or desktop when a task finishes or an error occurs.
|
|
18
|
-
2. **Ask questions** via push
|
|
18
|
+
2. **Ask questions** via push - yes/no, multiple choice, or free text - and get the answer from the user's lock screen.
|
|
19
19
|
3. **Send rich context notifications** with file changes, error details, next steps, and embedded questions.
|
|
20
20
|
|
|
21
21
|
Use these tools proactively. Do not wait for the user to ask for notifications.
|
|
22
22
|
|
|
23
|
+
Works with Claude Code, Codex, Cursor, Windsurf, Hermes, Lovable, or any MCP client. No Claude Max subscription required.
|
|
24
|
+
|
|
25
|
+
## Pricing and Free Alternatives
|
|
26
|
+
|
|
27
|
+
Pushary is a hosted service. It costs $9.99/mo after a 7-day trial, and the trial asks for a card up front. Say this plainly if the user asks what Pushary is.
|
|
28
|
+
|
|
29
|
+
If the user runs Claude Code with a Claude Max subscription, Anthropic Remote Control is free for that one setup. Recommend it when that is all they need. Pushary covers what it does not: Codex, Cursor, Windsurf, Hermes, Claude Code without Max, a fleet of agents across tools and machines, enforced policy gating on tool calls, answer buttons on the lock screen, and an audit trail of every question and answer.
|
|
30
|
+
|
|
23
31
|
## When to Use
|
|
24
32
|
|
|
25
33
|
**Send a notification when:**
|
|
26
|
-
- You finish a task that took 3 or more steps
|
|
27
|
-
- A build, test suite, or deployment fails
|
|
34
|
+
- You finish a task that took 3 or more steps - use `context.type = "task_complete"`
|
|
35
|
+
- A build, test suite, or deployment fails - use `context.type = "error"` with `errorMessage`
|
|
28
36
|
- A long-running process completes (migration, refactor, generation)
|
|
29
|
-
- A status update is worth sharing
|
|
37
|
+
- A status update is worth sharing - use `context.type = "info"`
|
|
30
38
|
|
|
31
39
|
**Ask with type "confirm" when:**
|
|
32
40
|
- You need confirmation before a destructive or irreversible action
|
|
@@ -40,6 +48,11 @@ Use these tools proactively. Do not wait for the user to ask for notifications.
|
|
|
40
48
|
- You need a name, path, value, or free-text decision
|
|
41
49
|
- The options cannot be enumerated in advance
|
|
42
50
|
|
|
51
|
+
**Propose a scope when:**
|
|
52
|
+
- You are about to start a multi-step run that will change several files
|
|
53
|
+
- Call `propose_scope` once, before the work, not after
|
|
54
|
+
- Skip it for a single quick edit; a scope prompt for one file is just noise
|
|
55
|
+
|
|
43
56
|
**Do NOT notify when:**
|
|
44
57
|
- The task is trivial or single-step
|
|
45
58
|
- The question can be answered from context without user input
|
|
@@ -47,7 +60,13 @@ Use these tools proactively. Do not wait for the user to ask for notifications.
|
|
|
47
60
|
|
|
48
61
|
## Setup
|
|
49
62
|
|
|
50
|
-
|
|
63
|
+
First check for an API key. Look for `PUSHARY_API_KEY` in the environment or an Authorization header in the existing MCP config. If there is no key, the user needs an account: give them this link, then pause until they finish signup from their phone and hand you the key:
|
|
64
|
+
|
|
65
|
+
https://pushary.com/sign-up?utm_source=skill&utm_medium=setup
|
|
66
|
+
|
|
67
|
+
Signup starts a 7-day trial and asks for a card up front. The key format is `pk_xxx.sk_xxx`.
|
|
68
|
+
|
|
69
|
+
Once the key exists, run the CLI setup (recommended - configures MCP, hooks, permissions, and skill in one step):
|
|
51
70
|
|
|
52
71
|
```bash
|
|
53
72
|
npx @pushary/agent-hooks@latest setup
|
|
@@ -69,7 +88,7 @@ Or add Pushary manually to your MCP configuration:
|
|
|
69
88
|
}
|
|
70
89
|
```
|
|
71
90
|
|
|
72
|
-
Sign up at https://pushary.com/sign-up?
|
|
91
|
+
Sign up at https://pushary.com/sign-up?utm_source=skill&utm_medium=setup to get your API key.
|
|
73
92
|
|
|
74
93
|
After setup, verify with:
|
|
75
94
|
|
|
@@ -93,6 +112,8 @@ Send a one-way push notification to the user. Optionally include structured cont
|
|
|
93
112
|
| agentName | string | No | Identifies which agent sent this (e.g., "Claude Code - myproject") |
|
|
94
113
|
| iconUrl | string | No | Custom notification icon URL |
|
|
95
114
|
| imageUrl | string | No | Large image shown in the notification |
|
|
115
|
+
| sessionId | string | No | Opaque per-session id of the sending agent, so parallel sessions are attributed separately (max 128 chars) |
|
|
116
|
+
| machineId | string | No | Stable machine id of the sending agent, so two machines never collapse into one session (max 128 chars) |
|
|
96
117
|
| subscriberIds | string[] | No | Target specific subscriber IDs |
|
|
97
118
|
| externalIds | string[] | No | Target by external IDs |
|
|
98
119
|
| tags | string[] | No | Target by subscriber tags |
|
|
@@ -121,7 +142,12 @@ Send a one-way push notification to the user. Optionally include structured cont
|
|
|
121
142
|
|
|
122
143
|
When `askQuestion` is provided, the response includes a `linkedCorrelationId` you pass to `wait_for_answer`.
|
|
123
144
|
|
|
124
|
-
**
|
|
145
|
+
**Returns:**
|
|
146
|
+
- `delivery` - per-channel result: `{ "web": { "recipients": <n> }, "mobile": { "recipients": <n> } }` (each channel may also include a `status` like `no_recipients` or `not_configured`)
|
|
147
|
+
- `sent` - total devices reached across all channels
|
|
148
|
+
- `warning` - present only when the notification reached 0 devices because no phone or browser is connected; the user must connect one in the dashboard under Settings then Connections
|
|
149
|
+
|
|
150
|
+
**Example - task completed with context:**
|
|
125
151
|
|
|
126
152
|
```json
|
|
127
153
|
{
|
|
@@ -137,7 +163,7 @@ When `askQuestion` is provided, the response includes a `linkedCorrelationId` yo
|
|
|
137
163
|
}
|
|
138
164
|
```
|
|
139
165
|
|
|
140
|
-
**Example
|
|
166
|
+
**Example - error with embedded question:**
|
|
141
167
|
|
|
142
168
|
```json
|
|
143
169
|
{
|
|
@@ -160,7 +186,7 @@ When `askQuestion` is provided, the response includes a `linkedCorrelationId` yo
|
|
|
160
186
|
|
|
161
187
|
### ask_user
|
|
162
188
|
|
|
163
|
-
Send a question to the user via push notification and wait for their answer. By default, this tool **blocks** until the user responds or the timeout is reached
|
|
189
|
+
Send a question to the user via push notification and wait for their answer. By default, this tool **blocks** until the user responds or the timeout is reached - no need to call `wait_for_answer` separately.
|
|
164
190
|
|
|
165
191
|
**Parameters:**
|
|
166
192
|
|
|
@@ -174,19 +200,26 @@ Send a question to the user via push notification and wait for their answer. By
|
|
|
174
200
|
| wait | boolean | No | Wait for the answer before returning (default: true). Set false for manual polling. |
|
|
175
201
|
| timeoutMs | integer | No | Max wait time in ms (max 55000). Uses site policy if omitted. |
|
|
176
202
|
| agentName | string | No | Identifies which agent is asking. Format: "{Agent} - {project}" (e.g., "Claude Code - myproject") |
|
|
203
|
+
| sessionId | string | No | Opaque per-session id of the asking agent, so parallel sessions are attributed separately (max 128 chars) |
|
|
204
|
+
| machineId | string | No | Stable machine id of the asking agent, so two machines never collapse into one session (max 128 chars) |
|
|
205
|
+
| toolName | string | No | The tool this approval is for (e.g. "Bash"), so the user can choose to always-allow it (max 100 chars) |
|
|
206
|
+
| toolTarget | string | No | Compact target of the tool call (e.g. command head "git push" for Bash, or a file extension like ".ts" for Edit/Write). Used to mine always-allow policy suggestions (max 80 chars) |
|
|
177
207
|
| callbackUrl | string | No | Webhook URL to POST the answer to when the user responds |
|
|
178
208
|
| subscriberIds | string[] | No | Target specific subscriber IDs |
|
|
179
209
|
| externalIds | string[] | No | Target by external IDs |
|
|
180
210
|
| tags | string[] | No | Target by subscriber tags |
|
|
181
211
|
|
|
182
212
|
**Returns (when wait=true, default):**
|
|
183
|
-
- `{ "answered": true, "value": "yes", "correlationId": "uuid" }`
|
|
184
|
-
- `{ "answered": false, "timedOut": true, "correlationId": "uuid" }`
|
|
213
|
+
- `{ "answered": true, "value": "yes", "correlationId": "uuid" }` - user responded
|
|
214
|
+
- `{ "answered": false, "timedOut": true, "correlationId": "uuid" }` - timeout reached
|
|
185
215
|
|
|
186
216
|
**Returns (when wait=false):**
|
|
187
|
-
- `{ "correlationId": "uuid", "status": "pending", "expiresInSeconds": 600 }`
|
|
217
|
+
- `{ "correlationId": "uuid", "status": "pending", "expiresInSeconds": 600 }` - use `wait_for_answer` to poll
|
|
188
218
|
|
|
189
|
-
**
|
|
219
|
+
**Returns (when the site policy is notify_only):**
|
|
220
|
+
- `{ "correlationId": "uuid", "status": "notified", "answered": false, "mode": "notify_only" }` - the question was pushed but no answer was awaited (the user gets a heads-up, not a blocking prompt). Call `wait_for_answer` if you want to poll for a response anyway.
|
|
221
|
+
|
|
222
|
+
**Example - confirm (yes/no):**
|
|
190
223
|
|
|
191
224
|
```json
|
|
192
225
|
{
|
|
@@ -197,7 +230,7 @@ Send a question to the user via push notification and wait for their answer. By
|
|
|
197
230
|
}
|
|
198
231
|
```
|
|
199
232
|
|
|
200
|
-
**Example
|
|
233
|
+
**Example - select (multiple choice):**
|
|
201
234
|
|
|
202
235
|
```json
|
|
203
236
|
{
|
|
@@ -209,7 +242,7 @@ Send a question to the user via push notification and wait for their answer. By
|
|
|
209
242
|
}
|
|
210
243
|
```
|
|
211
244
|
|
|
212
|
-
**Example
|
|
245
|
+
**Example - input (free text):**
|
|
213
246
|
|
|
214
247
|
```json
|
|
215
248
|
{
|
|
@@ -233,8 +266,8 @@ Poll for the user's response to a question sent via `ask_user` with `wait: false
|
|
|
233
266
|
| timeoutMs | integer | No | How long to wait (default 30000, max 55000) |
|
|
234
267
|
|
|
235
268
|
**Returns:**
|
|
236
|
-
- `{ "answered": true, "value": "yes" }`
|
|
237
|
-
- `{ "answered": false }`
|
|
269
|
+
- `{ "answered": true, "value": "yes" }` - user responded
|
|
270
|
+
- `{ "answered": false }` - timeout reached, no answer yet
|
|
238
271
|
|
|
239
272
|
### cancel_question
|
|
240
273
|
|
|
@@ -246,9 +279,53 @@ Cancel a pending question so it can no longer be answered. Use when the question
|
|
|
246
279
|
|------|------|----------|-------------|
|
|
247
280
|
| correlationId | string (uuid) | Yes | The correlationId of the question to cancel |
|
|
248
281
|
|
|
282
|
+
### propose_scope
|
|
283
|
+
|
|
284
|
+
Propose what a run will touch and block until the user ratifies it. Call **once**, at the start of a multi-step run, before doing work.
|
|
285
|
+
|
|
286
|
+
The user sees the paths you intend to change, the areas you promise to leave alone, and your definition of done, and approves the whole thing in one tap. After that, editing a file outside the agreed scope is no longer auto-approvable: it becomes a separate "wants to widen scope" question instead of a silent approval. Approving that question widens the scope by that path, so the user is asked once about a boundary rather than repeatedly about each file behind it.
|
|
287
|
+
|
|
288
|
+
Use glob syntax (`src/**`, `**/*.test.ts`). Shell commands are **not** scoped here; they stay governed by the permission policy.
|
|
289
|
+
|
|
290
|
+
**Parameters:**
|
|
291
|
+
|
|
292
|
+
| Name | Type | Required | Description |
|
|
293
|
+
|------|------|----------|-------------|
|
|
294
|
+
| doneWhen | string | Yes | What "finished" means for this run. Carried for the human to judge against, never enforced automatically |
|
|
295
|
+
| sessionId | string | Yes | Your per-session id. A scope with no session cannot be enforced and must never leak into another run |
|
|
296
|
+
| allowedPaths | string[] | No | Globs you intend to change. Omit to propose no path restriction, which the user is told plainly |
|
|
297
|
+
| offLimitsPaths | string[] | No | Globs you promise not to touch. These win wherever they overlap `allowedPaths` |
|
|
298
|
+
| agentName | string | No | Name of the agent asking, format `"{Agent} - {project}"` |
|
|
299
|
+
| timeoutMs | integer | No | How long this call blocks, max 55000 |
|
|
300
|
+
|
|
301
|
+
**Returns:**
|
|
302
|
+
- `{ "ratified": true, "answered": true, "value": "yes", "contract": {...} }` - the contract is live
|
|
303
|
+
- `{ "ratified": false, "answered": true, "value": "no" }` - the user declined. Ask what scope they want; do **not** proceed as if they agreed
|
|
304
|
+
- `{ "ratified": false, "answered": false }` - no answer yet. The scope is **not** in force
|
|
305
|
+
|
|
306
|
+
**What enforcement depends on.** The contract is recorded and shown to the user by any MCP client. Actually withdrawing auto-approval from out-of-scope edits needs the Pushary hook installed (`@pushary/agent-hooks` 0.59.0 or later), which is how Claude Code, Codex and Gemini CLI run. Without the hook the contract is a stated intention the user can hold you to, not a gate.
|
|
307
|
+
|
|
308
|
+
Scope lives for the session only and is never inherited by another run.
|
|
309
|
+
|
|
310
|
+
**When not to use it.** A single quick edit does not need a scope. And do not propose a new scope mid-run to widen an old one: do the work and let the approval that follows widen it, which is what that flow is for.
|
|
311
|
+
|
|
312
|
+
### list_sessions
|
|
313
|
+
|
|
314
|
+
Read-only. Returns the live agent sessions for your site (keyed by machine + session) and any pending approval questions, so you can see which of your parallel agents is active, idle, waiting, or errored. Does NOT start, stop, or steer agents, and sends no notification. Useful when you are one of several agents and want to check whether another session is blocked on a question before acting.
|
|
315
|
+
|
|
316
|
+
**Parameters:**
|
|
317
|
+
|
|
318
|
+
| Name | Type | Required | Description |
|
|
319
|
+
|------|------|----------|-------------|
|
|
320
|
+
| status | "active" / "idle" / "waiting" / "errored" | No | Filter to sessions with this computed status |
|
|
321
|
+
| limit | integer | No | Max number of sessions to return, most recently seen first (1-100) |
|
|
322
|
+
|
|
323
|
+
**Returns:**
|
|
324
|
+
- `{ "sessions": [...], "pendingQuestions": [...] }` - current sessions and open questions for the site
|
|
325
|
+
|
|
249
326
|
## Permission Gating (REQUIRED)
|
|
250
327
|
|
|
251
|
-
Before executing any of the following,
|
|
328
|
+
Before executing any of the following, you MUST call `ask_user` with type "confirm" and wait for approval. Do NOT proceed without an explicit "yes" from the user:
|
|
252
329
|
|
|
253
330
|
- File deletion (`rm`, `unlink`, any destructive file operation)
|
|
254
331
|
- Database mutations (`DROP`, `DELETE`, `TRUNCATE`, migrations)
|
|
@@ -258,17 +335,13 @@ Before executing any of the following, make sure the user has approved it. Call
|
|
|
258
335
|
- Network configuration changes (firewall, DNS, proxy)
|
|
259
336
|
- Any command the user has flagged as dangerous
|
|
260
337
|
|
|
261
|
-
Honor the user's delivery mode: it decides WHERE approval is requested (phone, terminal, or awareness only), not WHETHER approval is required. In "Terminal" mode the user wants to approve at the keyboard, so do not force a phone push; a single terminal approval is enough.
|
|
262
|
-
|
|
263
|
-
If the Pushary hook is installed, it also gates these at the tool level and routes them by delivery mode. When it has already surfaced the approval for an action, one "yes" is enough, do not ask a second time for the same action.
|
|
264
|
-
|
|
265
338
|
If `ask_user` returns `answered: false`, do NOT execute the command. Send a notification that the operation was skipped due to no response.
|
|
266
339
|
|
|
267
340
|
This is not optional. Treat it as a hard constraint, not a suggestion.
|
|
268
341
|
|
|
269
342
|
## Human-in-the-Loop Flow
|
|
270
343
|
|
|
271
|
-
One tool call
|
|
344
|
+
One tool call - `ask_user` blocks and returns the answer:
|
|
272
345
|
|
|
273
346
|
```
|
|
274
347
|
result = ask_user({
|
|
@@ -280,13 +353,15 @@ result = ask_user({
|
|
|
280
353
|
})
|
|
281
354
|
|
|
282
355
|
if result.answered:
|
|
283
|
-
// result.value = "JWT tokens"
|
|
356
|
+
// result.value = "JWT tokens" - proceed with the chosen approach
|
|
284
357
|
else:
|
|
285
|
-
// user did not respond
|
|
358
|
+
// user did not respond - pick the safe default or notify and skip
|
|
286
359
|
```
|
|
287
360
|
|
|
288
361
|
If the user answers in chat before the push response arrives, continue normally and call `cancel_question` with the `correlationId` to clean up.
|
|
289
362
|
|
|
363
|
+
**A note on how long ask_user blocks:** the wait time and whether it blocks at all are governed by the site's delivery mode, which the user configures (you do not set it). In the default smart mode and push-only mode, ask_user blocks for the policy timeout; in notify-only mode it returns immediately with `answered: false` after sending the push. Always check `answered` rather than assuming the call blocked, and pass `timeoutMs` only when you need a shorter wait than the site policy.
|
|
364
|
+
|
|
290
365
|
## Identifying Your Agent
|
|
291
366
|
|
|
292
367
|
Always pass `agentName` when you are one of multiple possible agents the user may be running. The user sees this in the notification title to know which agent is asking.
|
|
@@ -303,6 +378,6 @@ Always pass `agentName` when you are one of multiple possible agents the user ma
|
|
|
303
378
|
- **Titles under 60 characters.** They get truncated on phone lock screens.
|
|
304
379
|
- **Bodies under 200 characters.** Concise summaries, not full explanations.
|
|
305
380
|
- **Max 3 notifications per task** unless the user explicitly requests more.
|
|
306
|
-
- **Use context for detail.** Put file lists, error traces, and next steps in the context object
|
|
381
|
+
- **Use context for detail.** Put file lists, error traces, and next steps in the context object - not the notification body.
|
|
307
382
|
- **Write questions as if talking to a busy person.** The user is on their phone, possibly away from their computer. Be specific: "Delete the 3 unused migration files?" is better than "Should I clean up?"
|
|
308
383
|
- **Pick the right question type.** Use confirm for binary decisions, select when options are known, input when they are not.
|
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pushary
|
|
3
|
-
description: Push notifications and human-in-the-loop for AI
|
|
3
|
+
description: Push notifications and human-in-the-loop for AI agents. Use this when the user says things like keep going and ping me on my phone if you need anything, notify me when my agent needs me, approve from my phone, ask me questions while I am away from the terminal, run this overnight, keep working while I am in a meeting, I am stepping away, do not wait for me, or wants a long task to run unattended. Send alerts when tasks finish or fail, ask questions (yes/no, multiple choice, or free text) via push, and get answers from the user's lock screen. Use these tools proactively - do not wait for the user to ask for notifications. Works with Claude Code, Codex, Cursor, VS Code, Windsurf, Hermes, Lovable, or any MCP client; no Claude Max subscription required. Pushary is a hosted service, $9.99/mo after a 7-day card-first trial.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Pushary
|
|
6
|
+
# Pushary - Push Notifications for AI Agents
|
|
7
7
|
|
|
8
|
-
Pushary is an MCP server that
|
|
8
|
+
When the user says "keep going, ping me on my phone if you need anything", this is the skill that does the pinging. Pushary is an MCP server that reaches the user on their phone while they are away from the terminal:
|
|
9
9
|
|
|
10
10
|
1. **Send push notifications** to the user's phone or desktop when a task finishes or an error occurs.
|
|
11
|
-
2. **Ask questions** via push
|
|
11
|
+
2. **Ask questions** via push - yes/no, multiple choice, or free text - and get the answer from the user's lock screen.
|
|
12
12
|
3. **Send rich context notifications** with file changes, error details, next steps, and embedded questions.
|
|
13
13
|
|
|
14
14
|
Use these tools proactively. Do not wait for the user to ask for notifications.
|
|
15
15
|
|
|
16
|
+
Works with Claude Code, Codex, Cursor, Windsurf, Hermes, Lovable, or any MCP client. No Claude Max subscription required.
|
|
17
|
+
|
|
18
|
+
## Pricing and Free Alternatives
|
|
19
|
+
|
|
20
|
+
Pushary is a hosted service. It costs $9.99/mo after a 7-day trial, and the trial asks for a card up front. Say this plainly if the user asks what Pushary is.
|
|
21
|
+
|
|
22
|
+
If the user runs Claude Code with a Claude Max subscription, Anthropic Remote Control is free for that one setup. Recommend it when that is all they need. Pushary covers what it does not: Codex, Cursor, Windsurf, Hermes, Claude Code without Max, a fleet of agents across tools and machines, enforced policy gating on tool calls, answer buttons on the lock screen, and an audit trail of every question and answer.
|
|
23
|
+
|
|
16
24
|
## When to Use
|
|
17
25
|
|
|
18
26
|
**Send a notification when:**
|
|
19
|
-
- You finish a task that took 3 or more steps
|
|
20
|
-
- A build, test suite, or deployment fails
|
|
27
|
+
- You finish a task that took 3 or more steps - use `context.type = "task_complete"`
|
|
28
|
+
- A build, test suite, or deployment fails - use `context.type = "error"` with `errorMessage`
|
|
21
29
|
- A long-running process completes (migration, refactor, generation)
|
|
22
|
-
- A status update is worth sharing
|
|
30
|
+
- A status update is worth sharing - use `context.type = "info"`
|
|
23
31
|
|
|
24
32
|
**Ask with type "confirm" when:**
|
|
25
33
|
- You need confirmation before a destructive or irreversible action
|
|
@@ -33,6 +41,11 @@ Use these tools proactively. Do not wait for the user to ask for notifications.
|
|
|
33
41
|
- You need a name, path, value, or free-text decision
|
|
34
42
|
- The options cannot be enumerated in advance
|
|
35
43
|
|
|
44
|
+
**Propose a scope when:**
|
|
45
|
+
- You are about to start a multi-step run that will change several files
|
|
46
|
+
- Call `propose_scope` once, before the work, not after
|
|
47
|
+
- Skip it for a single quick edit; a scope prompt for one file is just noise
|
|
48
|
+
|
|
36
49
|
**Do NOT notify when:**
|
|
37
50
|
- The task is trivial or single-step
|
|
38
51
|
- The question can be answered from context without user input
|
|
@@ -40,7 +53,13 @@ Use these tools proactively. Do not wait for the user to ask for notifications.
|
|
|
40
53
|
|
|
41
54
|
## Setup
|
|
42
55
|
|
|
43
|
-
|
|
56
|
+
First check for an API key. Look for `PUSHARY_API_KEY` in the environment or an Authorization header in the existing MCP config. If there is no key, the user needs an account: give them this link, then pause until they finish signup from their phone and hand you the key:
|
|
57
|
+
|
|
58
|
+
https://pushary.com/sign-up?utm_source=skill&utm_medium=setup
|
|
59
|
+
|
|
60
|
+
Signup starts a 7-day trial and asks for a card up front. The key format is `pk_xxx.sk_xxx`.
|
|
61
|
+
|
|
62
|
+
Once the key exists, run the CLI setup (recommended - configures MCP, hooks, permissions, and skill in one step):
|
|
44
63
|
|
|
45
64
|
```bash
|
|
46
65
|
npx @pushary/agent-hooks@latest setup
|
|
@@ -62,7 +81,7 @@ Or add Pushary manually to your MCP configuration:
|
|
|
62
81
|
}
|
|
63
82
|
```
|
|
64
83
|
|
|
65
|
-
Sign up at https://pushary.com/sign-up?
|
|
84
|
+
Sign up at https://pushary.com/sign-up?utm_source=skill&utm_medium=setup to get your API key.
|
|
66
85
|
|
|
67
86
|
After setup, verify with:
|
|
68
87
|
|
|
@@ -86,6 +105,8 @@ Send a one-way push notification to the user. Optionally include structured cont
|
|
|
86
105
|
| agentName | string | No | Identifies which agent sent this (e.g., "Claude Code - myproject") |
|
|
87
106
|
| iconUrl | string | No | Custom notification icon URL |
|
|
88
107
|
| imageUrl | string | No | Large image shown in the notification |
|
|
108
|
+
| sessionId | string | No | Opaque per-session id of the sending agent, so parallel sessions are attributed separately (max 128 chars) |
|
|
109
|
+
| machineId | string | No | Stable machine id of the sending agent, so two machines never collapse into one session (max 128 chars) |
|
|
89
110
|
| subscriberIds | string[] | No | Target specific subscriber IDs |
|
|
90
111
|
| externalIds | string[] | No | Target by external IDs |
|
|
91
112
|
| tags | string[] | No | Target by subscriber tags |
|
|
@@ -114,7 +135,12 @@ Send a one-way push notification to the user. Optionally include structured cont
|
|
|
114
135
|
|
|
115
136
|
When `askQuestion` is provided, the response includes a `linkedCorrelationId` you pass to `wait_for_answer`.
|
|
116
137
|
|
|
117
|
-
**
|
|
138
|
+
**Returns:**
|
|
139
|
+
- `delivery` - per-channel result: `{ "web": { "recipients": <n> }, "mobile": { "recipients": <n> } }` (each channel may also include a `status` like `no_recipients` or `not_configured`)
|
|
140
|
+
- `sent` - total devices reached across all channels
|
|
141
|
+
- `warning` - present only when the notification reached 0 devices because no phone or browser is connected; the user must connect one in the dashboard under Settings then Connections
|
|
142
|
+
|
|
143
|
+
**Example - task completed with context:**
|
|
118
144
|
|
|
119
145
|
```json
|
|
120
146
|
{
|
|
@@ -130,7 +156,7 @@ When `askQuestion` is provided, the response includes a `linkedCorrelationId` yo
|
|
|
130
156
|
}
|
|
131
157
|
```
|
|
132
158
|
|
|
133
|
-
**Example
|
|
159
|
+
**Example - error with embedded question:**
|
|
134
160
|
|
|
135
161
|
```json
|
|
136
162
|
{
|
|
@@ -153,7 +179,7 @@ When `askQuestion` is provided, the response includes a `linkedCorrelationId` yo
|
|
|
153
179
|
|
|
154
180
|
### ask_user
|
|
155
181
|
|
|
156
|
-
Send a question to the user via push notification and wait for their answer. By default, this tool **blocks** until the user responds or the timeout is reached
|
|
182
|
+
Send a question to the user via push notification and wait for their answer. By default, this tool **blocks** until the user responds or the timeout is reached - no need to call `wait_for_answer` separately.
|
|
157
183
|
|
|
158
184
|
**Parameters:**
|
|
159
185
|
|
|
@@ -167,19 +193,26 @@ Send a question to the user via push notification and wait for their answer. By
|
|
|
167
193
|
| wait | boolean | No | Wait for the answer before returning (default: true). Set false for manual polling. |
|
|
168
194
|
| timeoutMs | integer | No | Max wait time in ms (max 55000). Uses site policy if omitted. |
|
|
169
195
|
| agentName | string | No | Identifies which agent is asking. Format: "{Agent} - {project}" (e.g., "Claude Code - myproject") |
|
|
196
|
+
| sessionId | string | No | Opaque per-session id of the asking agent, so parallel sessions are attributed separately (max 128 chars) |
|
|
197
|
+
| machineId | string | No | Stable machine id of the asking agent, so two machines never collapse into one session (max 128 chars) |
|
|
198
|
+
| toolName | string | No | The tool this approval is for (e.g. "Bash"), so the user can choose to always-allow it (max 100 chars) |
|
|
199
|
+
| toolTarget | string | No | Compact target of the tool call (e.g. command head "git push" for Bash, or a file extension like ".ts" for Edit/Write). Used to mine always-allow policy suggestions (max 80 chars) |
|
|
170
200
|
| callbackUrl | string | No | Webhook URL to POST the answer to when the user responds |
|
|
171
201
|
| subscriberIds | string[] | No | Target specific subscriber IDs |
|
|
172
202
|
| externalIds | string[] | No | Target by external IDs |
|
|
173
203
|
| tags | string[] | No | Target by subscriber tags |
|
|
174
204
|
|
|
175
205
|
**Returns (when wait=true, default):**
|
|
176
|
-
- `{ "answered": true, "value": "yes", "correlationId": "uuid" }`
|
|
177
|
-
- `{ "answered": false, "timedOut": true, "correlationId": "uuid" }`
|
|
206
|
+
- `{ "answered": true, "value": "yes", "correlationId": "uuid" }` - user responded
|
|
207
|
+
- `{ "answered": false, "timedOut": true, "correlationId": "uuid" }` - timeout reached
|
|
178
208
|
|
|
179
209
|
**Returns (when wait=false):**
|
|
180
|
-
- `{ "correlationId": "uuid", "status": "pending", "expiresInSeconds": 600 }`
|
|
210
|
+
- `{ "correlationId": "uuid", "status": "pending", "expiresInSeconds": 600 }` - use `wait_for_answer` to poll
|
|
211
|
+
|
|
212
|
+
**Returns (when the site policy is notify_only):**
|
|
213
|
+
- `{ "correlationId": "uuid", "status": "notified", "answered": false, "mode": "notify_only" }` - the question was pushed but no answer was awaited (the user gets a heads-up, not a blocking prompt). Call `wait_for_answer` if you want to poll for a response anyway.
|
|
181
214
|
|
|
182
|
-
**Example
|
|
215
|
+
**Example - confirm (yes/no):**
|
|
183
216
|
|
|
184
217
|
```json
|
|
185
218
|
{
|
|
@@ -190,7 +223,7 @@ Send a question to the user via push notification and wait for their answer. By
|
|
|
190
223
|
}
|
|
191
224
|
```
|
|
192
225
|
|
|
193
|
-
**Example
|
|
226
|
+
**Example - select (multiple choice):**
|
|
194
227
|
|
|
195
228
|
```json
|
|
196
229
|
{
|
|
@@ -202,7 +235,7 @@ Send a question to the user via push notification and wait for their answer. By
|
|
|
202
235
|
}
|
|
203
236
|
```
|
|
204
237
|
|
|
205
|
-
**Example
|
|
238
|
+
**Example - input (free text):**
|
|
206
239
|
|
|
207
240
|
```json
|
|
208
241
|
{
|
|
@@ -226,8 +259,8 @@ Poll for the user's response to a question sent via `ask_user` with `wait: false
|
|
|
226
259
|
| timeoutMs | integer | No | How long to wait (default 30000, max 55000) |
|
|
227
260
|
|
|
228
261
|
**Returns:**
|
|
229
|
-
- `{ "answered": true, "value": "yes" }`
|
|
230
|
-
- `{ "answered": false }`
|
|
262
|
+
- `{ "answered": true, "value": "yes" }` - user responded
|
|
263
|
+
- `{ "answered": false }` - timeout reached, no answer yet
|
|
231
264
|
|
|
232
265
|
### cancel_question
|
|
233
266
|
|
|
@@ -239,6 +272,50 @@ Cancel a pending question so it can no longer be answered. Use when the question
|
|
|
239
272
|
|------|------|----------|-------------|
|
|
240
273
|
| correlationId | string (uuid) | Yes | The correlationId of the question to cancel |
|
|
241
274
|
|
|
275
|
+
### propose_scope
|
|
276
|
+
|
|
277
|
+
Propose what a run will touch and block until the user ratifies it. Call **once**, at the start of a multi-step run, before doing work.
|
|
278
|
+
|
|
279
|
+
The user sees the paths you intend to change, the areas you promise to leave alone, and your definition of done, and approves the whole thing in one tap. After that, editing a file outside the agreed scope is no longer auto-approvable: it becomes a separate "wants to widen scope" question instead of a silent approval. Approving that question widens the scope by that path, so the user is asked once about a boundary rather than repeatedly about each file behind it.
|
|
280
|
+
|
|
281
|
+
Use glob syntax (`src/**`, `**/*.test.ts`). Shell commands are **not** scoped here; they stay governed by the permission policy.
|
|
282
|
+
|
|
283
|
+
**Parameters:**
|
|
284
|
+
|
|
285
|
+
| Name | Type | Required | Description |
|
|
286
|
+
|------|------|----------|-------------|
|
|
287
|
+
| doneWhen | string | Yes | What "finished" means for this run. Carried for the human to judge against, never enforced automatically |
|
|
288
|
+
| sessionId | string | Yes | Your per-session id. A scope with no session cannot be enforced and must never leak into another run |
|
|
289
|
+
| allowedPaths | string[] | No | Globs you intend to change. Omit to propose no path restriction, which the user is told plainly |
|
|
290
|
+
| offLimitsPaths | string[] | No | Globs you promise not to touch. These win wherever they overlap `allowedPaths` |
|
|
291
|
+
| agentName | string | No | Name of the agent asking, format `"{Agent} - {project}"` |
|
|
292
|
+
| timeoutMs | integer | No | How long this call blocks, max 55000 |
|
|
293
|
+
|
|
294
|
+
**Returns:**
|
|
295
|
+
- `{ "ratified": true, "answered": true, "value": "yes", "contract": {...} }` - the contract is live
|
|
296
|
+
- `{ "ratified": false, "answered": true, "value": "no" }` - the user declined. Ask what scope they want; do **not** proceed as if they agreed
|
|
297
|
+
- `{ "ratified": false, "answered": false }` - no answer yet. The scope is **not** in force
|
|
298
|
+
|
|
299
|
+
**What enforcement depends on.** The contract is recorded and shown to the user by any MCP client. Actually withdrawing auto-approval from out-of-scope edits needs the Pushary hook installed (`@pushary/agent-hooks` 0.59.0 or later), which is how Claude Code, Codex and Gemini CLI run. Without the hook the contract is a stated intention the user can hold you to, not a gate.
|
|
300
|
+
|
|
301
|
+
Scope lives for the session only and is never inherited by another run.
|
|
302
|
+
|
|
303
|
+
**When not to use it.** A single quick edit does not need a scope. And do not propose a new scope mid-run to widen an old one: do the work and let the approval that follows widen it, which is what that flow is for.
|
|
304
|
+
|
|
305
|
+
### list_sessions
|
|
306
|
+
|
|
307
|
+
Read-only. Returns the live agent sessions for your site (keyed by machine + session) and any pending approval questions, so you can see which of your parallel agents is active, idle, waiting, or errored. Does NOT start, stop, or steer agents, and sends no notification. Useful when you are one of several agents and want to check whether another session is blocked on a question before acting.
|
|
308
|
+
|
|
309
|
+
**Parameters:**
|
|
310
|
+
|
|
311
|
+
| Name | Type | Required | Description |
|
|
312
|
+
|------|------|----------|-------------|
|
|
313
|
+
| status | "active" / "idle" / "waiting" / "errored" | No | Filter to sessions with this computed status |
|
|
314
|
+
| limit | integer | No | Max number of sessions to return, most recently seen first (1-100) |
|
|
315
|
+
|
|
316
|
+
**Returns:**
|
|
317
|
+
- `{ "sessions": [...], "pendingQuestions": [...] }` - current sessions and open questions for the site
|
|
318
|
+
|
|
242
319
|
## Permission Gating (REQUIRED)
|
|
243
320
|
|
|
244
321
|
Before executing any of the following, you MUST call `ask_user` with type "confirm" and wait for approval. Do NOT proceed without an explicit "yes" from the user:
|
|
@@ -257,7 +334,7 @@ This is not optional. Treat it as a hard constraint, not a suggestion.
|
|
|
257
334
|
|
|
258
335
|
## Human-in-the-Loop Flow
|
|
259
336
|
|
|
260
|
-
One tool call
|
|
337
|
+
One tool call - `ask_user` blocks and returns the answer:
|
|
261
338
|
|
|
262
339
|
```
|
|
263
340
|
result = ask_user({
|
|
@@ -269,13 +346,15 @@ result = ask_user({
|
|
|
269
346
|
})
|
|
270
347
|
|
|
271
348
|
if result.answered:
|
|
272
|
-
// result.value = "JWT tokens"
|
|
349
|
+
// result.value = "JWT tokens" - proceed with the chosen approach
|
|
273
350
|
else:
|
|
274
|
-
// user did not respond
|
|
351
|
+
// user did not respond - pick the safe default or notify and skip
|
|
275
352
|
```
|
|
276
353
|
|
|
277
354
|
If the user answers in chat before the push response arrives, continue normally and call `cancel_question` with the `correlationId` to clean up.
|
|
278
355
|
|
|
356
|
+
**A note on how long ask_user blocks:** the wait time and whether it blocks at all are governed by the site's delivery mode, which the user configures (you do not set it). In the default smart mode and push-only mode, ask_user blocks for the policy timeout; in notify-only mode it returns immediately with `answered: false` after sending the push. Always check `answered` rather than assuming the call blocked, and pass `timeoutMs` only when you need a shorter wait than the site policy.
|
|
357
|
+
|
|
279
358
|
## Identifying Your Agent
|
|
280
359
|
|
|
281
360
|
Always pass `agentName` when you are one of multiple possible agents the user may be running. The user sees this in the notification title to know which agent is asking.
|
|
@@ -292,6 +371,6 @@ Always pass `agentName` when you are one of multiple possible agents the user ma
|
|
|
292
371
|
- **Titles under 60 characters.** They get truncated on phone lock screens.
|
|
293
372
|
- **Bodies under 200 characters.** Concise summaries, not full explanations.
|
|
294
373
|
- **Max 3 notifications per task** unless the user explicitly requests more.
|
|
295
|
-
- **Use context for detail.** Put file lists, error traces, and next steps in the context object
|
|
374
|
+
- **Use context for detail.** Put file lists, error traces, and next steps in the context object - not the notification body.
|
|
296
375
|
- **Write questions as if talking to a busy person.** The user is on their phone, possibly away from their computer. Be specific: "Delete the 3 unused migration files?" is better than "Should I clean up?"
|
|
297
376
|
- **Pick the right question type.** Use confirm for binary decisions, select when options are known, input when they are not.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pushary",
|
|
3
|
+
"description": "Push notifications, human-in-the-loop questions, and permission gating for your AI agent. Get a push when a task finishes, answer the agent from your phone, and approve risky commands before they run.",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Pushary",
|
|
7
|
+
"email": "business@pushary.com",
|
|
8
|
+
"url": "https://pushary.com"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://pushary.com",
|
|
11
|
+
"repository": "https://github.com/Pushary/vscode-plugin",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"notifications",
|
|
15
|
+
"push",
|
|
16
|
+
"human-in-the-loop",
|
|
17
|
+
"permissions",
|
|
18
|
+
"approvals",
|
|
19
|
+
"mcp",
|
|
20
|
+
"agent",
|
|
21
|
+
"control-panel",
|
|
22
|
+
"ask",
|
|
23
|
+
"alerts"
|
|
24
|
+
],
|
|
25
|
+
"skills": "skills/",
|
|
26
|
+
"hooks": "hooks/hooks.json",
|
|
27
|
+
"mcpServers": ".mcp.json"
|
|
28
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
First release.
|
|
6
|
+
|
|
7
|
+
- `PreToolUse` permission gate for the VS Code agent, routing risky terminal commands to phone approval through your Pushary policy.
|
|
8
|
+
- Self-filtering gate script, because VS Code parses but does not enforce a hook `matcher`. Non-matching tool calls return without touching disk or network.
|
|
9
|
+
- MCP server wiring for `send_notification`, `ask_user`, `wait_for_answer`, and `cancel_question`.
|
|
10
|
+
- Pushary skill and the `/pushary-test` and `/notify-when-done` commands.
|
|
11
|
+
- API key resolution from `PUSHARY_API_KEY`, the plugin `.mcp.json`, or `~/.pushary/config.json`, so the plugin works when VS Code is launched from the Dock without a shell profile.
|