@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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handleUserPrompt
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-7L57N7WN.js";
|
|
5
5
|
import "../chunk-BSZYIAZL.js";
|
|
6
6
|
import "../chunk-SAF6HGAA.js";
|
|
7
7
|
import "../chunk-7QLSKOSU.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-TJJBF73A.js";
|
|
9
9
|
import "../chunk-RN3NOEJF.js";
|
|
10
10
|
import "../chunk-2UMNXADU.js";
|
|
11
11
|
import "../chunk-KZERVKTD.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handleSessionEnd
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-7L57N7WN.js";
|
|
5
5
|
import "../chunk-BSZYIAZL.js";
|
|
6
6
|
import "../chunk-SAF6HGAA.js";
|
|
7
7
|
import "../chunk-7QLSKOSU.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-TJJBF73A.js";
|
|
9
9
|
import "../chunk-RN3NOEJF.js";
|
|
10
10
|
import "../chunk-2UMNXADU.js";
|
|
11
11
|
import "../chunk-KZERVKTD.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handleSessionStart
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-7L57N7WN.js";
|
|
5
5
|
import "../chunk-BSZYIAZL.js";
|
|
6
6
|
import "../chunk-SAF6HGAA.js";
|
|
7
7
|
import "../chunk-7QLSKOSU.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-TJJBF73A.js";
|
|
9
9
|
import "../chunk-RN3NOEJF.js";
|
|
10
10
|
import "../chunk-2UMNXADU.js";
|
|
11
11
|
import "../chunk-KZERVKTD.js";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
addClaudeMcpServer,
|
|
7
7
|
addPusharyHooks,
|
|
8
8
|
addPusharyToolPermissions
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-3CBPY2G5.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeWired,
|
|
12
12
|
codexWired,
|
|
13
13
|
geminiWired
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-46UEJXQO.js";
|
|
15
15
|
import {
|
|
16
16
|
describeDetection,
|
|
17
17
|
detectAllAgents,
|
|
@@ -23,12 +23,12 @@ import {
|
|
|
23
23
|
shortenHome,
|
|
24
24
|
vscodeSettingsTargets,
|
|
25
25
|
writeInstructionBlock
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-IZA7SWXX.js";
|
|
27
27
|
import {
|
|
28
28
|
GEMINI_HOOK_BINARY,
|
|
29
29
|
addGeminiHooks,
|
|
30
30
|
addGeminiMcpServer
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-CC2K2SST.js";
|
|
32
32
|
import {
|
|
33
33
|
addCodexHookTrust,
|
|
34
34
|
addCodexHooks,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
geminiSettings,
|
|
47
47
|
pusharyConfigFile,
|
|
48
48
|
vscodePluginDir
|
|
49
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-QCYN5VXB.js";
|
|
50
50
|
import {
|
|
51
51
|
confirmAppConnection,
|
|
52
52
|
connectDevice,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
import {
|
|
73
73
|
checkApiKey,
|
|
74
74
|
describeKeyCheck
|
|
75
|
-
} from "../chunk-
|
|
75
|
+
} from "../chunk-DLBW37U6.js";
|
|
76
76
|
import {
|
|
77
77
|
installClaudeAlias,
|
|
78
78
|
resolveShellRc
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
} from "../chunk-7OYGFJYZ.js";
|
|
95
95
|
import {
|
|
96
96
|
reportEvent
|
|
97
|
-
} from "../chunk-
|
|
97
|
+
} from "../chunk-7L57N7WN.js";
|
|
98
98
|
import "../chunk-BSZYIAZL.js";
|
|
99
99
|
import "../chunk-SAF6HGAA.js";
|
|
100
100
|
import {
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
} from "../chunk-7QLSKOSU.js";
|
|
103
103
|
import {
|
|
104
104
|
isValidApiKey
|
|
105
|
-
} from "../chunk-
|
|
105
|
+
} from "../chunk-TJJBF73A.js";
|
|
106
106
|
import "../chunk-RN3NOEJF.js";
|
|
107
107
|
import "../chunk-2UMNXADU.js";
|
|
108
108
|
import {
|
|
@@ -1412,6 +1412,7 @@ var detectAgents = () => {
|
|
|
1412
1412
|
return map;
|
|
1413
1413
|
};
|
|
1414
1414
|
var canRunBrowserLogin = () => process.stdout.isTTY === true && !process.env.CI;
|
|
1415
|
+
var canShowPairingQr = () => !process.env.CI;
|
|
1415
1416
|
var resolveAgents = async (options) => {
|
|
1416
1417
|
if (options.agents.kind === "none") return [];
|
|
1417
1418
|
if (options.agents.kind === "explicit") {
|
|
@@ -1567,7 +1568,7 @@ var main = async () => {
|
|
|
1567
1568
|
reportDryRun(null, plannedAgents, null);
|
|
1568
1569
|
emitJson(options, { ok: true, dryRun: true, agents: plannedAgents, keyCheck: "skipped", key: "none" });
|
|
1569
1570
|
process.exit(EXIT.OK);
|
|
1570
|
-
} else if (connectMode === "app" &&
|
|
1571
|
+
} else if (connectMode === "app" && canShowPairingQr() && !options.skipPhone) {
|
|
1571
1572
|
console.log(` ${dim("Pairing with your Pushary app.")}`);
|
|
1572
1573
|
console.log(` ${dim("No app? Ctrl-C, then:")} ${cyan("npx @pushary/agent-hooks setup --connect browser")}`);
|
|
1573
1574
|
markStep("pair");
|
|
@@ -1594,12 +1595,15 @@ var main = async () => {
|
|
|
1594
1595
|
console.log();
|
|
1595
1596
|
} else if (!canRunBrowserLogin()) {
|
|
1596
1597
|
if (pairingRequested) {
|
|
1597
|
-
console.log(` ${yellow("!")} ${cyan("--connect app")}
|
|
1598
|
-
console.log(` ${dim("
|
|
1598
|
+
console.log(` ${yellow("!")} ${cyan("--connect app")} will not draw a pairing QR in CI.`);
|
|
1599
|
+
console.log(` ${dim("Pass --key <pk_xxx.xxx> or --key-stdin here. Outside CI, setup pairs with no terminal needed.")}`);
|
|
1600
|
+
} else if (process.env.CI) {
|
|
1601
|
+
console.log(` ${yellow("!")} No API key, and setup does not pair in CI.`);
|
|
1602
|
+
console.log(` ${dim("Pass --key <pk_xxx.xxx>, or --key-stdin, or export PUSHARY_API_KEY.")}`);
|
|
1599
1603
|
} else {
|
|
1600
|
-
console.log(` ${yellow("!")} No API key, and
|
|
1604
|
+
console.log(` ${yellow("!")} No API key, and nothing here can acquire one.`);
|
|
1601
1605
|
console.log(` ${dim("Pass --key <pk_xxx.xxx>, or --key-stdin, or export PUSHARY_API_KEY.")}`);
|
|
1602
|
-
console.log(` ${dim("
|
|
1606
|
+
console.log(` ${dim("Or drop")} ${cyan("--connect browser")}${dim("/")}${cyan("--skip-phone")} ${dim("and setup will pair with your phone instead.")}`);
|
|
1603
1607
|
}
|
|
1604
1608
|
console.log();
|
|
1605
1609
|
process.exit(await abortWith("no-key", EXIT.NOT_CONFIGURED));
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
import "../chunk-7OYGFJYZ.js";
|
|
6
6
|
import {
|
|
7
7
|
readLedgerSummary
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-IA5GBKNL.js";
|
|
9
|
+
import "../chunk-TJJBF73A.js";
|
|
10
10
|
import {
|
|
11
11
|
getApiKey
|
|
12
12
|
} from "../chunk-2UMNXADU.js";
|
|
@@ -16,7 +16,7 @@ import "../chunk-6MTNS63X.js";
|
|
|
16
16
|
import {
|
|
17
17
|
checkApiKey,
|
|
18
18
|
describeKeyCheck
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-DLBW37U6.js";
|
|
20
20
|
import {
|
|
21
21
|
createIo
|
|
22
22
|
} from "../chunk-TX7KBKT7.js";
|
|
@@ -33,7 +33,7 @@ import "../chunk-SAF6HGAA.js";
|
|
|
33
33
|
import {
|
|
34
34
|
UsageError
|
|
35
35
|
} from "../chunk-7QLSKOSU.js";
|
|
36
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-TJJBF73A.js";
|
|
37
37
|
import "../chunk-RN3NOEJF.js";
|
|
38
38
|
import "../chunk-2UMNXADU.js";
|
|
39
39
|
import {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handleStop
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-7L57N7WN.js";
|
|
5
5
|
import "../chunk-BSZYIAZL.js";
|
|
6
6
|
import "../chunk-SAF6HGAA.js";
|
|
7
7
|
import "../chunk-7QLSKOSU.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-TJJBF73A.js";
|
|
9
9
|
import "../chunk-RN3NOEJF.js";
|
|
10
10
|
import "../chunk-2UMNXADU.js";
|
|
11
11
|
import "../chunk-KZERVKTD.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handleStopFailure
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-7L57N7WN.js";
|
|
5
5
|
import "../chunk-BSZYIAZL.js";
|
|
6
6
|
import "../chunk-SAF6HGAA.js";
|
|
7
7
|
import "../chunk-7QLSKOSU.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-TJJBF73A.js";
|
|
9
9
|
import "../chunk-RN3NOEJF.js";
|
|
10
10
|
import "../chunk-2UMNXADU.js";
|
|
11
11
|
import "../chunk-KZERVKTD.js";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
addClaudeMcpServer,
|
|
4
4
|
addPusharyHooks,
|
|
5
5
|
addPusharyToolPermissions
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-3CBPY2G5.js";
|
|
7
7
|
import {
|
|
8
8
|
GEMINI_HOOK_BINARY,
|
|
9
9
|
addGeminiHooks,
|
|
10
10
|
addGeminiMcpServer,
|
|
11
11
|
hasGeminiHooks
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-CC2K2SST.js";
|
|
13
13
|
import {
|
|
14
14
|
CODEX_HOOK_BINARY,
|
|
15
15
|
addCodexHookTrust,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
hasCodexHooks,
|
|
24
24
|
vscodePluginDir,
|
|
25
25
|
vscodePluginMcp
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-QCYN5VXB.js";
|
|
27
27
|
import {
|
|
28
28
|
readJsonSafe
|
|
29
29
|
} from "../chunk-6MTNS63X.js";
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
import {
|
|
41
41
|
isNewerVersion
|
|
42
42
|
} from "../chunk-7OYGFJYZ.js";
|
|
43
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-TJJBF73A.js";
|
|
44
44
|
import {
|
|
45
45
|
getApiKey
|
|
46
46
|
} from "../chunk-2UMNXADU.js";
|
package/dist/bin/pushary-wait.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
exitOnFailedResponse
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-7BBUTWBD.js";
|
|
5
5
|
import {
|
|
6
6
|
describeWaitLadder
|
|
7
7
|
} from "../chunk-IIENZE2J.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-DLBW37U6.js";
|
|
9
9
|
import {
|
|
10
10
|
createIo
|
|
11
11
|
} from "../chunk-TX7KBKT7.js";
|
|
@@ -20,7 +20,7 @@ import "../chunk-SAF6HGAA.js";
|
|
|
20
20
|
import {
|
|
21
21
|
UsageError
|
|
22
22
|
} from "../chunk-7QLSKOSU.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-TJJBF73A.js";
|
|
24
24
|
import {
|
|
25
25
|
getApiKey,
|
|
26
26
|
getBaseUrl
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hasGeminiHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CC2K2SST.js";
|
|
4
4
|
import {
|
|
5
5
|
hasCodexHooks
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QCYN5VXB.js";
|
|
7
7
|
|
|
8
8
|
// src/diagnostics/wiring.ts
|
|
9
9
|
var record = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PRETOOLUSE_HANDLED_TOOLS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3CBPY2G5.js";
|
|
4
4
|
import {
|
|
5
5
|
denyReasonFrom,
|
|
6
6
|
isDeferAnswer,
|
|
7
7
|
resolveGate
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UPPHYOIZ.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_SESSION,
|
|
11
11
|
askUser,
|
|
@@ -25,17 +25,17 @@ import {
|
|
|
25
25
|
sendNotification,
|
|
26
26
|
throttlePass,
|
|
27
27
|
waitForAnswer
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-7L57N7WN.js";
|
|
29
29
|
import {
|
|
30
30
|
isGatingMoment,
|
|
31
31
|
recordKeylessMoment
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-IA5GBKNL.js";
|
|
33
33
|
import {
|
|
34
34
|
buildDecisionEpisodeFeatures,
|
|
35
35
|
effectiveWaitSeconds,
|
|
36
36
|
hookWaitClamped,
|
|
37
37
|
hookWaitDeadline
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-TJJBF73A.js";
|
|
39
39
|
import {
|
|
40
40
|
getMachineId
|
|
41
41
|
} from "./chunk-RN3NOEJF.js";
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
isModeStateDegraded,
|
|
5
5
|
resolveAutoResolveOrigin,
|
|
6
6
|
resolvePolicyAcross
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7L57N7WN.js";
|
|
8
8
|
import {
|
|
9
9
|
evaluateScope,
|
|
10
10
|
scopeChangeReason,
|
|
11
11
|
scopeRequiresHuman
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TJJBF73A.js";
|
|
13
13
|
|
|
14
14
|
// src/answer.ts
|
|
15
15
|
var denyReasonFrom = (value, note) => {
|
package/dist/src/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handlePreToolUse
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-DJHWBNM3.js";
|
|
4
|
+
import "../chunk-3CBPY2G5.js";
|
|
5
|
+
import "../chunk-UPPHYOIZ.js";
|
|
6
6
|
import {
|
|
7
7
|
askUser,
|
|
8
8
|
cancelQuestion,
|
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
reportEvent,
|
|
16
16
|
resolvePolicy,
|
|
17
17
|
waitForAnswer
|
|
18
|
-
} from "../chunk-
|
|
19
|
-
import "../chunk-
|
|
18
|
+
} from "../chunk-7L57N7WN.js";
|
|
19
|
+
import "../chunk-IA5GBKNL.js";
|
|
20
20
|
import "../chunk-BSZYIAZL.js";
|
|
21
21
|
import "../chunk-SAF6HGAA.js";
|
|
22
22
|
import "../chunk-7QLSKOSU.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-TJJBF73A.js";
|
|
24
24
|
import "../chunk-RN3NOEJF.js";
|
|
25
25
|
import {
|
|
26
26
|
getApiKey,
|
package/package.json
CHANGED
|
File without changes
|