@pushary/agent-hooks 0.69.0 → 0.71.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/README.md +3 -2
- package/data/cursor-plugin/scripts/pushary-gate.mjs +34 -5
- package/data/vscode-plugin/scripts/pushary-gate.mjs +27 -2
- package/dist/bin/pushary-claude.js +2 -2
- package/dist/bin/pushary-clean.js +2 -2
- package/dist/bin/pushary-codex-hook.js +2 -2
- package/dist/bin/pushary-codex.js +1 -1
- package/dist/bin/pushary-connect.js +6 -4
- package/dist/bin/pushary-daemon.js +3 -3
- package/dist/bin/pushary-doctor.js +8 -29
- package/dist/bin/pushary-gemini-hook.js +2 -2
- package/dist/bin/pushary-hook.js +5 -5
- package/dist/bin/pushary-login.js +2 -2
- package/dist/bin/pushary-logout.js +2 -2
- package/dist/bin/pushary-mode.js +2 -2
- package/dist/bin/pushary-notification-hook.js +1 -1
- package/dist/bin/pushary-permission-denied-hook.js +3 -3
- package/dist/bin/pushary-permission-hook.js +3 -3
- package/dist/bin/pushary-post-hook.js +1 -1
- package/dist/bin/pushary-prompt-hook.js +1 -1
- package/dist/bin/pushary-session-end-hook.js +1 -1
- package/dist/bin/pushary-session-start-hook.js +1 -1
- package/dist/bin/pushary-setup.js +175 -34
- package/dist/bin/pushary-stats.js +2 -2
- package/dist/bin/pushary-status.js +4 -4
- package/dist/bin/pushary-stop-hook.js +1 -1
- package/dist/bin/pushary-stopfailure-hook.js +1 -1
- package/dist/bin/pushary-suggestions.js +2 -2
- package/dist/bin/pushary-upgrade.js +2 -2
- package/dist/bin/pushary-wait.js +2 -2
- package/dist/bin/pushary.js +1 -1
- package/dist/{chunk-JGH37QRB.js → chunk-7OYGFJYZ.js} +1 -1
- package/dist/chunk-B7R4YSAB.js +38 -0
- package/dist/{chunk-ATP6UQPH.js → chunk-BBK3TTU2.js} +1 -1
- package/dist/{chunk-H46LSQRT.js → chunk-FZIQSDTQ.js} +27 -12
- package/dist/{chunk-3USMXNVB.js → chunk-GD275GEX.js} +5 -3
- package/dist/{chunk-C5I2RAMT.js → chunk-HU43EZ5Q.js} +2 -2
- package/dist/{chunk-P7VBAYQO.js → chunk-MGFZXUUR.js} +32 -4
- package/dist/{chunk-YZT2CBC3.js → chunk-NQTRA7H5.js} +1 -1
- package/dist/src/index.js +3 -3
- package/package.json +1 -1
|
@@ -45,6 +45,27 @@ var describeReach = (channels) => {
|
|
|
45
45
|
if (verdict.kind === "unattributable") return `${summary}, and no way to tell whose`;
|
|
46
46
|
return summary;
|
|
47
47
|
};
|
|
48
|
+
var describeAppRepair = (verdict) => {
|
|
49
|
+
switch (verdict.kind) {
|
|
50
|
+
case "yours":
|
|
51
|
+
return null;
|
|
52
|
+
case "nobody":
|
|
53
|
+
return [
|
|
54
|
+
"Open the Pushary app, sign in, and allow notifications.",
|
|
55
|
+
"If this terminal was never paired with your phone, run: npx @pushary/agent-hooks@latest setup --connect app"
|
|
56
|
+
];
|
|
57
|
+
case "others":
|
|
58
|
+
return [
|
|
59
|
+
`Reachable devices belong to other members of this workspace (${verdict.otherMembers}).`,
|
|
60
|
+
"Sign in on the Pushary app with your own account so approvals can reach you."
|
|
61
|
+
];
|
|
62
|
+
case "unattributable":
|
|
63
|
+
return [
|
|
64
|
+
"Something is reachable here, but not identifiably yours.",
|
|
65
|
+
"Sign in on the Pushary app so your approvals are routed to your device."
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
};
|
|
48
69
|
|
|
49
70
|
// src/cli/human.ts
|
|
50
71
|
var stream = process.stdout;
|
|
@@ -324,7 +345,12 @@ var printQr = (url) => new Promise((resolve, reject) => {
|
|
|
324
345
|
reject(err);
|
|
325
346
|
}
|
|
326
347
|
});
|
|
327
|
-
var phoneFailure = (detail) => ({
|
|
348
|
+
var phoneFailure = (detail, repair) => ({
|
|
349
|
+
reachesYou: false,
|
|
350
|
+
outcome: null,
|
|
351
|
+
detail,
|
|
352
|
+
...repair ? { repair } : {}
|
|
353
|
+
});
|
|
328
354
|
var waitForDevice = async (apiKey, baseline) => {
|
|
329
355
|
const deadline = Date.now() + CONNECT_TIMEOUT_MS;
|
|
330
356
|
let consecutiveFailures = 0;
|
|
@@ -469,9 +495,11 @@ var confirmAppConnection = async (apiKey) => {
|
|
|
469
495
|
const channels = probe.status;
|
|
470
496
|
const ownedApp = channels.yours?.appDevices ?? channels.appDevices;
|
|
471
497
|
if (channels.precise && ownedApp === 0) {
|
|
472
|
-
|
|
473
|
-
console.log(` ${
|
|
474
|
-
|
|
498
|
+
const repair = describeAppRepair(reachVerdict(channels)) ?? [];
|
|
499
|
+
console.log(` ${yellow("!")} No device of yours is registered for notifications yet.`);
|
|
500
|
+
for (const line of repair) console.log(` ${dim(line)}`);
|
|
501
|
+
console.log(` ${dim("Then run")} ${cyan("pushary doctor")}${dim(".")}`);
|
|
502
|
+
return phoneFailure("app_not_registered", repair);
|
|
475
503
|
}
|
|
476
504
|
return sendAndConfirm(apiKey, channels);
|
|
477
505
|
};
|
package/dist/src/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handlePreToolUse
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-HU43EZ5Q.js";
|
|
4
4
|
import "../chunk-CAJZAFVS.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-GD275GEX.js";
|
|
6
6
|
import {
|
|
7
7
|
askUser,
|
|
8
8
|
cancelQuestion,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
reportEvent,
|
|
16
16
|
resolvePolicy,
|
|
17
17
|
waitForAnswer
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-FZIQSDTQ.js";
|
|
19
19
|
import "../chunk-WLGEY4UX.js";
|
|
20
20
|
import "../chunk-BSZYIAZL.js";
|
|
21
21
|
import "../chunk-SAF6HGAA.js";
|