@pushary/agent-hooks 0.74.0 → 0.76.0
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 +67 -0
- package/data/SKILL.md +14 -6
- package/data/cursor-plugin/CHANGELOG.md +27 -1
- package/data/cursor-plugin/CONTRIBUTING.md +28 -0
- package/data/cursor-plugin/README.md +1 -1
- package/data/cursor-plugin/scripts/pushary-gate.mjs +305 -131
- package/data/cursor-plugin/scripts/pushary-gate.test.mjs +130 -0
- package/data/cursor-plugin/skills/pushary/SKILL.md +14 -6
- package/data/vscode-plugin/CONTRIBUTING.md +28 -0
- package/data/vscode-plugin/skills/pushary/SKILL.md +14 -6
- package/dist/bin/pushary-claude.js +18 -3
- package/dist/bin/pushary-clean.js +5 -5
- package/dist/bin/pushary-codex-hook.js +4 -4
- package/dist/bin/pushary-codex.js +2 -2
- package/dist/bin/pushary-connect.js +3 -3
- package/dist/bin/pushary-doctor.js +7 -7
- package/dist/bin/pushary-gemini-hook.js +4 -4
- package/dist/bin/pushary-hook.js +6 -6
- package/dist/bin/pushary-login.js +2 -2
- package/dist/bin/pushary-logout.js +2 -2
- package/dist/bin/pushary-mode.js +3 -3
- package/dist/bin/pushary-notification-hook.js +2 -2
- package/dist/bin/pushary-permission-denied-hook.js +6 -6
- package/dist/bin/pushary-permission-hook.js +6 -6
- package/dist/bin/pushary-post-hook.js +2 -2
- package/dist/bin/pushary-prompt-hook.js +2 -2
- package/dist/bin/pushary-session-end-hook.js +2 -2
- package/dist/bin/pushary-session-start-hook.js +2 -2
- package/dist/bin/pushary-setup.js +17 -13
- package/dist/bin/pushary-stats.js +2 -2
- package/dist/bin/pushary-status.js +2 -2
- package/dist/bin/pushary-stop-hook.js +2 -2
- package/dist/bin/pushary-stopfailure-hook.js +2 -2
- package/dist/bin/pushary-upgrade.js +4 -4
- package/dist/bin/pushary-wait.js +3 -3
- package/dist/{chunk-Q5QV4I42.js → chunk-3CBPY2G5.js} +1 -1
- package/dist/{chunk-4S3E5DQJ.js → chunk-46UEJXQO.js} +2 -2
- package/dist/{chunk-VQSTA23N.js → chunk-7BBUTWBD.js} +1 -1
- package/dist/{chunk-HAJA47IK.js → chunk-7L57N7WN.js} +1 -1
- package/dist/{chunk-CJET52NP.js → chunk-CC2K2SST.js} +1 -1
- package/dist/{chunk-34HABKL7.js → chunk-DJHWBNM3.js} +5 -5
- package/dist/{chunk-43NDA7LR.js → chunk-DLBW37U6.js} +1 -1
- package/dist/{chunk-3BJUW2SH.js → chunk-IA5GBKNL.js} +1 -1
- package/dist/{chunk-NDCIOAL7.js → chunk-IZA7SWXX.js} +1 -1
- package/dist/{chunk-PZ4UCGWG.js → chunk-QCYN5VXB.js} +1 -1
- package/dist/{chunk-SM7EMSDQ.js → chunk-UPPHYOIZ.js} +2 -2
- package/dist/src/index.js +6 -6
- package/package.json +1 -1
- /package/dist/{chunk-TIZNAOTS.js → chunk-TJJBF73A.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.76.0
|
|
4
|
+
|
|
5
|
+
### A phone-supplied field could switch your approval gate off
|
|
6
|
+
|
|
7
|
+
`pushary claude --remote` sessions started from the phone build their command
|
|
8
|
+
line from fields the request supplies. The wrapper then read that command line
|
|
9
|
+
back to learn what it had been asked to do, and it scanned every position without
|
|
10
|
+
knowing which ones were a flag's **value** rather than a flag.
|
|
11
|
+
|
|
12
|
+
So a prompt or a model of `--permission-mode=dontAsk` was read as a real
|
|
13
|
+
permission mode. `dontAsk`, `plan` and `auto` all defer to the agent's own prompt
|
|
14
|
+
unconditionally, which means the session stopped asking you for approvals
|
|
15
|
+
entirely, and the decision log recorded a session that was never gated. A clean
|
|
16
|
+
approval history that is not true is worse than a missing one.
|
|
17
|
+
|
|
18
|
+
Flag values are now consumed with the flag that owns them, so nothing a request
|
|
19
|
+
supplies can be mistaken for an instruction. A `--permission-mode` you passed
|
|
20
|
+
yourself still works, in both the `--permission-mode plan` and
|
|
21
|
+
`--permission-mode=plan` forms.
|
|
22
|
+
|
|
23
|
+
The server that queues these sessions now also refuses flag-shaped model and
|
|
24
|
+
working-directory values, so an out-of-date CLI is protected against those two.
|
|
25
|
+
It cannot do the same for the prompt, which is free text you are entitled to
|
|
26
|
+
start with a dash, so **updating is what closes this one properly.**
|
|
27
|
+
|
|
28
|
+
Reaching it needed an authenticated session on your own account, spawning to your
|
|
29
|
+
own machine, with the daemon running. It is not cross-tenant and not remote code
|
|
30
|
+
execution. It matters most where the person spawning is not the person governed:
|
|
31
|
+
Team approval routing, Partner, and any case where a phone session or API key has
|
|
32
|
+
been compromised.
|
|
33
|
+
|
|
34
|
+
## 0.75.0
|
|
35
|
+
|
|
36
|
+
### An agent can now run the install
|
|
37
|
+
|
|
38
|
+
Pasting "install pushary for me" into Claude Code, Codex or Cursor exited 3
|
|
39
|
+
before doing anything:
|
|
40
|
+
|
|
41
|
+
! No API key, and no terminal to sign in from.
|
|
42
|
+
|
|
43
|
+
The agent runs setup with stdin and stdout piped, so `isTTY` is false, and app
|
|
44
|
+
pairing sat behind the same check as browser login. That check was answering the
|
|
45
|
+
wrong question. Pairing needs a person, not a terminal, and the agent shows its
|
|
46
|
+
output to one, so a QR written to stdout is read just as well as a QR drawn on a
|
|
47
|
+
terminal.
|
|
48
|
+
|
|
49
|
+
Setup now pairs whenever it is not running in CI. It prints the QR, the tappable
|
|
50
|
+
link and the fingerprint, and waits for the scan, so the whole install is one
|
|
51
|
+
command with nothing to paste:
|
|
52
|
+
|
|
53
|
+
npx @pushary/agent-hooks@latest setup
|
|
54
|
+
|
|
55
|
+
Browser login still requires a real terminal, because it opens a browser on the
|
|
56
|
+
machine and waits for a redirect. CI still declines to pair, so no build hangs
|
|
57
|
+
drawing a QR into a log nobody is watching.
|
|
58
|
+
|
|
59
|
+
The bundled skill told agents to do the opposite: hand the user a signup link
|
|
60
|
+
and wait for them to paste a key back. It now says to run setup and show the
|
|
61
|
+
user the QR.
|
|
62
|
+
|
|
63
|
+
The failure message above also had to change, because after this it was naming a
|
|
64
|
+
cause that no longer applies. Reaching that branch now means CI, `--skip-phone`,
|
|
65
|
+
or a connect mode other than `app`, so setup says which of those it hit instead
|
|
66
|
+
of blaming a missing terminal. A headless run with no flags is the one worth
|
|
67
|
+
calling out: it used to be told to drop into a browser login it cannot open.
|
|
68
|
+
|
|
69
|
+
|
|
3
70
|
## 0.74.0
|
|
4
71
|
|
|
5
72
|
### The terminal went quiet while your phone was deciding
|
package/data/SKILL.md
CHANGED
|
@@ -60,16 +60,24 @@ If the user runs Claude Code with a Claude Max subscription, Anthropic Remote Co
|
|
|
60
60
|
|
|
61
61
|
## Setup
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
Just run it. No account, no API key, and nothing to paste first:
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
```bash
|
|
66
|
+
npx @pushary/agent-hooks@latest setup
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
It configures MCP, hooks, permissions and the skill in one step, then prints a QR code and waits.
|
|
66
70
|
|
|
67
|
-
|
|
71
|
+
**Show the user your output and ask them to scan that QR with their phone camera.** Scanning pairs their Pushary app, which is what hands this machine its key. A tappable link and a fingerprint print under the QR for a phone already in hand. Do not ask the user for an API key, and do not send them to a signup page first: that is the old flow and it is strictly worse.
|
|
68
72
|
|
|
69
|
-
|
|
73
|
+
Signup starts a 7-day trial and asks for a card up front, which happens in the app.
|
|
74
|
+
|
|
75
|
+
If `PUSHARY_API_KEY` is already in the environment or in an existing MCP config, setup uses it and skips pairing entirely.
|
|
76
|
+
|
|
77
|
+
No app on their phone yet? They can get it at https://pushary.com/download, or approve in a browser tab instead:
|
|
70
78
|
|
|
71
79
|
```bash
|
|
72
|
-
npx @pushary/agent-hooks@latest setup
|
|
80
|
+
npx @pushary/agent-hooks@latest setup --connect browser
|
|
73
81
|
```
|
|
74
82
|
|
|
75
83
|
Or add Pushary manually to your MCP configuration:
|
|
@@ -88,7 +96,7 @@ Or add Pushary manually to your MCP configuration:
|
|
|
88
96
|
}
|
|
89
97
|
```
|
|
90
98
|
|
|
91
|
-
|
|
99
|
+
Manual configuration needs a key, so it means signing up first at https://pushary.com/sign-up?utm_source=skill&utm_medium=setup and copying the key from the dashboard. Prefer `setup` above: it needs neither.
|
|
92
100
|
|
|
93
101
|
After setup, verify with:
|
|
94
102
|
|
|
@@ -1,10 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
Policy parity with the other agents. The gate matched rules on tool NAME alone, so
|
|
6
|
+
every argument rule was invisible here: a `Bash(rm:*)` deny you had written did
|
|
7
|
+
nothing, and `rm -rf` was auto-approved by a broad `Bash` allow. Cursor was
|
|
8
|
+
strictly less safe than Claude Code for the same dashboard policy.
|
|
9
|
+
|
|
10
|
+
- Argument rules now match: `Bash(git status)` exact, `Bash(npm test:*)` prefix,
|
|
11
|
+
and path-style globs, with the same precedence the hook uses.
|
|
12
|
+
- The destructive ceiling applies: a command the classifier flags can no longer
|
|
13
|
+
auto-approve through a general bare-tool or wildcard rule. An explicit rule you
|
|
14
|
+
wrote still wins.
|
|
15
|
+
- Repo-scoped rules are honoured. Identity is the normalized git remote, read from
|
|
16
|
+
`.git/config` as a file; credentials are stripped. `PUSHARY_REPO_KEY` pins it,
|
|
17
|
+
`PUSHARY_REPO_KEY=off` disables scoping.
|
|
18
|
+
- Approvals now carry the command target and body, so the server can drop the
|
|
19
|
+
one-tap Approve on a dangerous call and the audit trail records Cursor
|
|
20
|
+
decisions at the same grain as every other agent.
|
|
21
|
+
- `scripts/pushary-gate.test.mjs` mirrors the monorepo's policy tests, since the
|
|
22
|
+
matcher is vendored and cannot be imported.
|
|
23
|
+
|
|
24
|
+
Verified against the canonical matcher over 1512 resolutions: zero cases where
|
|
25
|
+
the gate is less safe. The remaining differences are all the safe-read-only
|
|
26
|
+
allowlist, which is deliberately not vendored because it only ever loosens a
|
|
27
|
+
decision.
|
|
28
|
+
|
|
3
29
|
## 0.1.0
|
|
4
30
|
|
|
5
31
|
Initial release.
|
|
6
32
|
|
|
7
|
-
- MCP server (`send_notification`, `ask_user`, `wait_for_answer`, `cancel_question`) wired via `mcp.json`, key supplied at runtime through `PUSHARY_API_KEY`.
|
|
33
|
+
- MCP server (`send_notification`, `ask_user`, `wait_for_answer`, `cancel_question`, `list_sessions`) wired via `mcp.json`, key supplied at runtime through `PUSHARY_API_KEY`.
|
|
8
34
|
- Always-on rule and full tool-reference skill so the agent uses Pushary proactively.
|
|
9
35
|
- `beforeShellExecution` gate (`scripts/pushary-gate.mjs`, zero-dependency) that evaluates risky commands against your Pushary dashboard policy — auto-approve, the four approval modes, timeout actions, live mode override, and kill switch, scoped to the Cursor conversation. Falls back to Cursor's own prompt when Pushary is unreachable, and is fail-closed: a broken gate blocks rather than allows.
|
|
10
36
|
- Commands: `/pushary-test`, `/notify-when-done`.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for looking. Please read this before opening a pull request, because of
|
|
4
|
+
where this code lives.
|
|
5
|
+
|
|
6
|
+
**This repository is a published copy, not the place the code is written.** The
|
|
7
|
+
source is a directory inside Pushary's private monorepo, and it is pushed here
|
|
8
|
+
whenever it changes. Anything committed directly to this repo is overwritten by
|
|
9
|
+
the next publish.
|
|
10
|
+
|
|
11
|
+
That is not hypothetical. Two pull requests were merged here and then sat
|
|
12
|
+
stranded for a month, because nothing carried them back upstream and the next
|
|
13
|
+
publish would have deleted them.
|
|
14
|
+
|
|
15
|
+
## So what should you do
|
|
16
|
+
|
|
17
|
+
**Open an issue.** Bugs, missing behaviour, a patch you have already written and
|
|
18
|
+
want applied: an issue is read and acted on, and the fix is made upstream and
|
|
19
|
+
published here. Paste your diff into the issue if you have one, and it will be
|
|
20
|
+
credited.
|
|
21
|
+
|
|
22
|
+
**Security issues**: email aadil@pushary.com rather than opening an issue.
|
|
23
|
+
|
|
24
|
+
## If you do open a pull request
|
|
25
|
+
|
|
26
|
+
It will not be merged as a pull request, because merging it would guarantee it
|
|
27
|
+
gets erased. It will be treated as a patch submission: applied upstream, and
|
|
28
|
+
this repo updated on the next publish. You will be told when that has happened.
|
|
@@ -75,7 +75,7 @@ macOS GUI apps do not read `.zshrc`. If Settings > MCP shows pushary in red afte
|
|
|
75
75
|
|
|
76
76
|
| Part | File | What it does |
|
|
77
77
|
|------|------|--------------|
|
|
78
|
-
| MCP server | `mcp.json` | Connects Cursor to the Pushary tools: `send_notification`, `ask_user`, `wait_for_answer`, `cancel_question` |
|
|
78
|
+
| MCP server | `mcp.json` | Connects Cursor to the Pushary tools: `send_notification`, `ask_user`, `wait_for_answer`, `cancel_question`, `list_sessions` |
|
|
79
79
|
| Rule | `rules/pushary.mdc` | Always on guidance so the agent uses Pushary on its own |
|
|
80
80
|
| Skill | `skills/pushary/SKILL.md` | Full tool reference: parameters, examples, return values |
|
|
81
81
|
| Hook | `hooks/hooks.json` and `scripts/pushary-gate.mjs` | Sends risky commands to your phone for approval |
|