@pushary/agent-hooks 0.85.2 → 0.86.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 +17 -0
- package/dist/bin/pushary-bell-hook.js +4 -4
- package/dist/bin/pushary-bell.js +5 -5
- package/dist/bin/pushary-claude.js +7 -7
- package/dist/bin/pushary-clean.js +9 -8
- package/dist/bin/pushary-codex-bridge.js +5 -5
- package/dist/bin/pushary-codex-hook.js +4 -4
- package/dist/bin/pushary-codex.js +3 -3
- package/dist/bin/pushary-connect.js +6 -6
- package/dist/bin/pushary-daemon.js +4 -4
- package/dist/bin/pushary-disconnect.js +7 -6
- package/dist/bin/pushary-doctor.js +11 -11
- package/dist/bin/pushary-gemini-bridge.js +5 -5
- package/dist/bin/pushary-gemini-hook.js +4 -4
- package/dist/bin/pushary-hook.js +6 -8
- package/dist/bin/pushary-login.js +4 -4
- package/dist/bin/pushary-logout.js +4 -4
- package/dist/bin/pushary-mode.js +3 -3
- package/dist/bin/pushary-notification-hook.js +3 -3
- package/dist/bin/pushary-permission-denied-hook.js +6 -8
- package/dist/bin/pushary-permission-hook.js +6 -8
- package/dist/bin/pushary-post-hook.js +3 -3
- package/dist/bin/pushary-prompt-hook.js +3 -3
- package/dist/bin/pushary-session-end-hook.js +3 -3
- package/dist/bin/pushary-session-start-hook.js +3 -3
- package/dist/bin/pushary-setup.js +20 -19
- package/dist/bin/pushary-stats.js +2 -2
- package/dist/bin/pushary-status.js +5 -5
- package/dist/bin/pushary-stop-hook.js +3 -3
- package/dist/bin/pushary-stopfailure-hook.js +3 -3
- package/dist/bin/pushary-upgrade.js +10 -9
- package/dist/bin/pushary-wait.js +3 -3
- package/dist/{chunk-Q4URN3E7.js → chunk-2255DZ74.js} +1 -1
- package/dist/{chunk-GY3I353G.js → chunk-2C6B6V2U.js} +7 -3
- package/dist/{chunk-LSB6PFLN.js → chunk-2TZCZ7CL.js} +1 -1
- package/dist/{chunk-DPDUB4XF.js → chunk-33T5OOKP.js} +11 -5
- package/dist/{chunk-GM74DUMS.js → chunk-5EUZYWID.js} +1 -1
- package/dist/{chunk-CWV4CMB6.js → chunk-7C5CJC3H.js} +1 -1
- package/dist/{chunk-KZIGJLOX.js → chunk-7G5VO76N.js} +1 -1
- package/dist/chunk-ATBKJNWS.js +19 -0
- package/dist/{chunk-K337LIBD.js → chunk-CY4TZK5O.js} +5 -0
- package/dist/{chunk-JBLRZGTT.js → chunk-FOY5FISQ.js} +1 -1
- package/dist/{chunk-XJDL3MUE.js → chunk-GK4CED6Z.js} +12 -18
- package/dist/{chunk-PKUNB3SN.js → chunk-MNQI6ZZU.js} +1 -1
- package/dist/{chunk-4YMWLMAP.js → chunk-MTKR4YLW.js} +1 -1
- package/dist/{chunk-NTIUQB3E.js → chunk-N52CIK47.js} +1 -1
- package/dist/{chunk-LCA2EQTK.js → chunk-PZR4XMFU.js} +1 -1
- package/dist/{chunk-JT5NQQCE.js → chunk-Q7N3XGWM.js} +2 -2
- package/dist/{chunk-4U2YRHNF.js → chunk-QW27ZFA4.js} +2 -2
- package/dist/{chunk-Y7E2MC3G.js → chunk-S3UD7O35.js} +51 -6
- package/dist/{chunk-KJW6NKF7.js → chunk-VPJAAGD4.js} +7 -3
- package/dist/{chunk-LXWISFF3.js → chunk-VZNDR3Z7.js} +1 -1
- package/dist/{chunk-T54OT7IY.js → chunk-XPAGN3SC.js} +1 -1
- package/dist/src/index.js +6 -8
- package/package.json +1 -1
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
} from "../chunk-6CUUA7HO.js";
|
|
5
5
|
import {
|
|
6
6
|
handleNotification
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-33T5OOKP.js";
|
|
8
8
|
import "../chunk-RN3NOEJF.js";
|
|
9
9
|
import "../chunk-BSZYIAZL.js";
|
|
10
10
|
import "../chunk-SAF6HGAA.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-7C5CJC3H.js";
|
|
12
12
|
import "../chunk-7QLSKOSU.js";
|
|
13
13
|
import "../chunk-KZERVKTD.js";
|
|
14
14
|
import "../chunk-2UMNXADU.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-CY4TZK5O.js";
|
|
16
16
|
|
|
17
17
|
// bin/pushary-notification-hook.ts
|
|
18
18
|
var main = async () => {
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handlePermissionDenied
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-VT4IVERX.js";
|
|
8
|
-
import "../chunk-PKUNB3SN.js";
|
|
4
|
+
} from "../chunk-S3UD7O35.js";
|
|
5
|
+
import "../chunk-ATBKJNWS.js";
|
|
6
|
+
import "../chunk-MNQI6ZZU.js";
|
|
9
7
|
import {
|
|
10
8
|
readHookInput
|
|
11
9
|
} from "../chunk-6CUUA7HO.js";
|
|
12
10
|
import "../chunk-YHG74UFF.js";
|
|
13
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-33T5OOKP.js";
|
|
14
12
|
import "../chunk-RN3NOEJF.js";
|
|
15
13
|
import "../chunk-BSZYIAZL.js";
|
|
16
14
|
import "../chunk-SAF6HGAA.js";
|
|
17
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-7C5CJC3H.js";
|
|
18
16
|
import "../chunk-7QLSKOSU.js";
|
|
19
17
|
import "../chunk-KZERVKTD.js";
|
|
20
18
|
import "../chunk-2UMNXADU.js";
|
|
21
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-CY4TZK5O.js";
|
|
22
20
|
|
|
23
21
|
// bin/pushary-permission-denied-hook.ts
|
|
24
22
|
var main = async () => {
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handlePermissionRequest
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-VT4IVERX.js";
|
|
8
|
-
import "../chunk-PKUNB3SN.js";
|
|
4
|
+
} from "../chunk-S3UD7O35.js";
|
|
5
|
+
import "../chunk-ATBKJNWS.js";
|
|
6
|
+
import "../chunk-MNQI6ZZU.js";
|
|
9
7
|
import {
|
|
10
8
|
readHookInput
|
|
11
9
|
} from "../chunk-6CUUA7HO.js";
|
|
12
10
|
import "../chunk-YHG74UFF.js";
|
|
13
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-33T5OOKP.js";
|
|
14
12
|
import "../chunk-RN3NOEJF.js";
|
|
15
13
|
import "../chunk-BSZYIAZL.js";
|
|
16
14
|
import "../chunk-SAF6HGAA.js";
|
|
17
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-7C5CJC3H.js";
|
|
18
16
|
import "../chunk-7QLSKOSU.js";
|
|
19
17
|
import "../chunk-KZERVKTD.js";
|
|
20
18
|
import "../chunk-2UMNXADU.js";
|
|
21
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-CY4TZK5O.js";
|
|
22
20
|
|
|
23
21
|
// bin/pushary-permission-hook.ts
|
|
24
22
|
var main = async () => {
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
} from "../chunk-6CUUA7HO.js";
|
|
5
5
|
import {
|
|
6
6
|
handlePostToolUse
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-33T5OOKP.js";
|
|
8
8
|
import "../chunk-RN3NOEJF.js";
|
|
9
9
|
import "../chunk-BSZYIAZL.js";
|
|
10
10
|
import "../chunk-SAF6HGAA.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-7C5CJC3H.js";
|
|
12
12
|
import "../chunk-7QLSKOSU.js";
|
|
13
13
|
import "../chunk-KZERVKTD.js";
|
|
14
14
|
import "../chunk-2UMNXADU.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-CY4TZK5O.js";
|
|
16
16
|
|
|
17
17
|
// bin/pushary-post-hook.ts
|
|
18
18
|
var main = async () => {
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
} from "../chunk-6CUUA7HO.js";
|
|
5
5
|
import {
|
|
6
6
|
handleUserPrompt
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-33T5OOKP.js";
|
|
8
8
|
import "../chunk-RN3NOEJF.js";
|
|
9
9
|
import "../chunk-BSZYIAZL.js";
|
|
10
10
|
import "../chunk-SAF6HGAA.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-7C5CJC3H.js";
|
|
12
12
|
import "../chunk-7QLSKOSU.js";
|
|
13
13
|
import "../chunk-KZERVKTD.js";
|
|
14
14
|
import "../chunk-2UMNXADU.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-CY4TZK5O.js";
|
|
16
16
|
|
|
17
17
|
// bin/pushary-prompt-hook.ts
|
|
18
18
|
var main = async () => {
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
} from "../chunk-6CUUA7HO.js";
|
|
5
5
|
import {
|
|
6
6
|
handleSessionEnd
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-33T5OOKP.js";
|
|
8
8
|
import "../chunk-RN3NOEJF.js";
|
|
9
9
|
import "../chunk-BSZYIAZL.js";
|
|
10
10
|
import "../chunk-SAF6HGAA.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-7C5CJC3H.js";
|
|
12
12
|
import "../chunk-7QLSKOSU.js";
|
|
13
13
|
import "../chunk-KZERVKTD.js";
|
|
14
14
|
import "../chunk-2UMNXADU.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-CY4TZK5O.js";
|
|
16
16
|
|
|
17
17
|
// bin/pushary-session-end-hook.ts
|
|
18
18
|
var main = async () => {
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
} from "../chunk-6CUUA7HO.js";
|
|
5
5
|
import {
|
|
6
6
|
handleSessionStart
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-33T5OOKP.js";
|
|
8
8
|
import "../chunk-RN3NOEJF.js";
|
|
9
9
|
import "../chunk-BSZYIAZL.js";
|
|
10
10
|
import "../chunk-SAF6HGAA.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-7C5CJC3H.js";
|
|
12
12
|
import "../chunk-7QLSKOSU.js";
|
|
13
13
|
import "../chunk-KZERVKTD.js";
|
|
14
14
|
import "../chunk-2UMNXADU.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-CY4TZK5O.js";
|
|
16
16
|
|
|
17
17
|
// bin/pushary-session-start-hook.ts
|
|
18
18
|
var main = async () => {
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
detectClaudeVersion
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-2255DZ74.js";
|
|
5
5
|
import {
|
|
6
6
|
claudeWired,
|
|
7
7
|
codexWired,
|
|
8
8
|
geminiWired
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-Q7N3XGWM.js";
|
|
10
10
|
import {
|
|
11
11
|
runBrowserLogin
|
|
12
12
|
} from "../chunk-Z3Z4VK5F.js";
|
|
13
13
|
import {
|
|
14
14
|
ensureDaemonRunning
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-MTKR4YLW.js";
|
|
16
|
+
import {
|
|
17
|
+
addClaudeMcpServer,
|
|
18
|
+
addPusharyHooks,
|
|
19
|
+
addPusharyToolPermissions,
|
|
20
|
+
compareVersion,
|
|
21
|
+
parseVersion
|
|
22
|
+
} from "../chunk-GK4CED6Z.js";
|
|
16
23
|
import {
|
|
17
24
|
describeDetection,
|
|
18
25
|
detectAllAgents,
|
|
@@ -24,19 +31,13 @@ import {
|
|
|
24
31
|
shortenHome,
|
|
25
32
|
vscodeSettingsTargets,
|
|
26
33
|
writeInstructionBlock
|
|
27
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-QW27ZFA4.js";
|
|
28
35
|
import {
|
|
29
36
|
GEMINI_HOOK_BINARY,
|
|
30
37
|
addGeminiHooks,
|
|
31
38
|
addGeminiMcpServer
|
|
32
|
-
} from "../chunk-
|
|
33
|
-
import
|
|
34
|
-
addClaudeMcpServer,
|
|
35
|
-
addPusharyHooks,
|
|
36
|
-
addPusharyToolPermissions,
|
|
37
|
-
compareVersion,
|
|
38
|
-
parseVersion
|
|
39
|
-
} from "../chunk-XJDL3MUE.js";
|
|
39
|
+
} from "../chunk-2C6B6V2U.js";
|
|
40
|
+
import "../chunk-ATBKJNWS.js";
|
|
40
41
|
import {
|
|
41
42
|
guardBinary,
|
|
42
43
|
guardNodeScript
|
|
@@ -65,10 +66,10 @@ import {
|
|
|
65
66
|
geminiSettings,
|
|
66
67
|
pusharyConfigFile,
|
|
67
68
|
vscodePluginDir
|
|
68
|
-
} from "../chunk-
|
|
69
|
+
} from "../chunk-VPJAAGD4.js";
|
|
69
70
|
import {
|
|
70
71
|
reportEvent
|
|
71
|
-
} from "../chunk-
|
|
72
|
+
} from "../chunk-33T5OOKP.js";
|
|
72
73
|
import "../chunk-RN3NOEJF.js";
|
|
73
74
|
import {
|
|
74
75
|
confirmAppConnection,
|
|
@@ -78,12 +79,12 @@ import {
|
|
|
78
79
|
printConnectInstructions,
|
|
79
80
|
setHumanStream,
|
|
80
81
|
verifyRoundTrip
|
|
81
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-PZR4XMFU.js";
|
|
82
83
|
import "../chunk-3EGEA4KH.js";
|
|
83
84
|
import {
|
|
84
85
|
checkApiKey,
|
|
85
86
|
describeKeyCheck
|
|
86
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-2TZCZ7CL.js";
|
|
87
88
|
import {
|
|
88
89
|
useColor
|
|
89
90
|
} from "../chunk-5RUIFDTP.js";
|
|
@@ -94,7 +95,7 @@ import {
|
|
|
94
95
|
readConfigFileKey,
|
|
95
96
|
readKeySource,
|
|
96
97
|
writeKey
|
|
97
|
-
} from "../chunk-
|
|
98
|
+
} from "../chunk-7G5VO76N.js";
|
|
98
99
|
import {
|
|
99
100
|
parseFlags
|
|
100
101
|
} from "../chunk-GMXKITVA.js";
|
|
@@ -117,7 +118,7 @@ import {
|
|
|
117
118
|
} from "../chunk-6MTNS63X.js";
|
|
118
119
|
import "../chunk-BSZYIAZL.js";
|
|
119
120
|
import "../chunk-SAF6HGAA.js";
|
|
120
|
-
import "../chunk-
|
|
121
|
+
import "../chunk-7C5CJC3H.js";
|
|
121
122
|
import {
|
|
122
123
|
UsageError
|
|
123
124
|
} from "../chunk-7QLSKOSU.js";
|
|
@@ -127,7 +128,7 @@ import {
|
|
|
127
128
|
import "../chunk-2UMNXADU.js";
|
|
128
129
|
import {
|
|
129
130
|
isValidApiKey
|
|
130
|
-
} from "../chunk-
|
|
131
|
+
} from "../chunk-CY4TZK5O.js";
|
|
131
132
|
|
|
132
133
|
// bin/pushary-setup.ts
|
|
133
134
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, cpSync, rmSync, renameSync, realpathSync, readdirSync, statSync } from "fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readLedgerSummary
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-MNQI6ZZU.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnHelpFlag
|
|
7
7
|
} from "../chunk-SQOFGPNX.js";
|
|
@@ -11,7 +11,7 @@ import "../chunk-KZERVKTD.js";
|
|
|
11
11
|
import {
|
|
12
12
|
getApiKey
|
|
13
13
|
} from "../chunk-2UMNXADU.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-CY4TZK5O.js";
|
|
15
15
|
|
|
16
16
|
// bin/pushary-stats.ts
|
|
17
17
|
exitOnHelpFlag("stats");
|
|
@@ -8,18 +8,18 @@ import {
|
|
|
8
8
|
describeReach,
|
|
9
9
|
fetchChannels,
|
|
10
10
|
reachVerdict
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-PZR4XMFU.js";
|
|
12
12
|
import "../chunk-3EGEA4KH.js";
|
|
13
13
|
import {
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-2TZCZ7CL.js";
|
|
17
17
|
import {
|
|
18
18
|
createIo
|
|
19
19
|
} from "../chunk-5RUIFDTP.js";
|
|
20
20
|
import {
|
|
21
21
|
readKeySource
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-7G5VO76N.js";
|
|
23
23
|
import {
|
|
24
24
|
rejectUnknownFlags
|
|
25
25
|
} from "../chunk-GMXKITVA.js";
|
|
@@ -32,7 +32,7 @@ import "../chunk-DINDL2CF.js";
|
|
|
32
32
|
import "../chunk-6MTNS63X.js";
|
|
33
33
|
import "../chunk-BSZYIAZL.js";
|
|
34
34
|
import "../chunk-SAF6HGAA.js";
|
|
35
|
-
import "../chunk-
|
|
35
|
+
import "../chunk-7C5CJC3H.js";
|
|
36
36
|
import {
|
|
37
37
|
UsageError
|
|
38
38
|
} from "../chunk-7QLSKOSU.js";
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
EXIT
|
|
41
41
|
} from "../chunk-KZERVKTD.js";
|
|
42
42
|
import "../chunk-2UMNXADU.js";
|
|
43
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-CY4TZK5O.js";
|
|
44
44
|
|
|
45
45
|
// src/status.ts
|
|
46
46
|
var keySourceLine = (source) => {
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
} from "../chunk-6CUUA7HO.js";
|
|
5
5
|
import {
|
|
6
6
|
handleStop
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-33T5OOKP.js";
|
|
8
8
|
import "../chunk-RN3NOEJF.js";
|
|
9
9
|
import "../chunk-BSZYIAZL.js";
|
|
10
10
|
import "../chunk-SAF6HGAA.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-7C5CJC3H.js";
|
|
12
12
|
import "../chunk-7QLSKOSU.js";
|
|
13
13
|
import "../chunk-KZERVKTD.js";
|
|
14
14
|
import "../chunk-2UMNXADU.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-CY4TZK5O.js";
|
|
16
16
|
|
|
17
17
|
// bin/pushary-stop-hook.ts
|
|
18
18
|
var main = async () => {
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
} from "../chunk-6CUUA7HO.js";
|
|
5
5
|
import {
|
|
6
6
|
handleStopFailure
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-33T5OOKP.js";
|
|
8
8
|
import "../chunk-RN3NOEJF.js";
|
|
9
9
|
import "../chunk-BSZYIAZL.js";
|
|
10
10
|
import "../chunk-SAF6HGAA.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-7C5CJC3H.js";
|
|
12
12
|
import "../chunk-7QLSKOSU.js";
|
|
13
13
|
import "../chunk-KZERVKTD.js";
|
|
14
14
|
import "../chunk-2UMNXADU.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-CY4TZK5O.js";
|
|
16
16
|
|
|
17
17
|
// bin/pushary-stopfailure-hook.ts
|
|
18
18
|
var main = async () => {
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
detectClaudeVersion
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-2255DZ74.js";
|
|
5
|
+
import {
|
|
6
|
+
addClaudeMcpServer,
|
|
7
|
+
addPusharyHooks,
|
|
8
|
+
addPusharyToolPermissions
|
|
9
|
+
} from "../chunk-GK4CED6Z.js";
|
|
5
10
|
import {
|
|
6
11
|
GEMINI_HOOK_BINARY,
|
|
7
12
|
addGeminiHooks,
|
|
8
13
|
addGeminiMcpServer,
|
|
9
14
|
hasGeminiHooks
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import
|
|
12
|
-
addClaudeMcpServer,
|
|
13
|
-
addPusharyHooks,
|
|
14
|
-
addPusharyToolPermissions
|
|
15
|
-
} from "../chunk-XJDL3MUE.js";
|
|
15
|
+
} from "../chunk-2C6B6V2U.js";
|
|
16
|
+
import "../chunk-ATBKJNWS.js";
|
|
16
17
|
import {
|
|
17
18
|
guardBinary
|
|
18
19
|
} from "../chunk-HSGEEBBL.js";
|
|
@@ -35,7 +36,7 @@ import {
|
|
|
35
36
|
hasCodexHooks,
|
|
36
37
|
vscodePluginDir,
|
|
37
38
|
vscodePluginMcp
|
|
38
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-VPJAAGD4.js";
|
|
39
40
|
import {
|
|
40
41
|
exitOnHelpFlag
|
|
41
42
|
} from "../chunk-SQOFGPNX.js";
|
|
@@ -50,7 +51,7 @@ import "../chunk-KZERVKTD.js";
|
|
|
50
51
|
import {
|
|
51
52
|
getApiKey
|
|
52
53
|
} from "../chunk-2UMNXADU.js";
|
|
53
|
-
import "../chunk-
|
|
54
|
+
import "../chunk-CY4TZK5O.js";
|
|
54
55
|
|
|
55
56
|
// bin/pushary-upgrade.ts
|
|
56
57
|
import { existsSync as existsSync2 } from "fs";
|
package/dist/bin/pushary-wait.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
} from "../chunk-IIENZE2J.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnFailedResponse
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-N52CIK47.js";
|
|
8
|
+
import "../chunk-2TZCZ7CL.js";
|
|
9
9
|
import {
|
|
10
10
|
createIo
|
|
11
11
|
} from "../chunk-5RUIFDTP.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
getApiKey,
|
|
29
29
|
getBaseUrl
|
|
30
30
|
} from "../chunk-2UMNXADU.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-CY4TZK5O.js";
|
|
32
32
|
|
|
33
33
|
// bin/pushary-wait.ts
|
|
34
34
|
exitOnHelpFlag("wait");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
HOOK_BUDGETS
|
|
3
|
-
|
|
2
|
+
HOOK_BUDGETS,
|
|
3
|
+
HOOK_LOCATOR_BINARY
|
|
4
|
+
} from "./chunk-CY4TZK5O.js";
|
|
4
5
|
|
|
5
6
|
// src/gemini-config.ts
|
|
6
7
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -23,7 +24,10 @@ var ensureRecord = (target, key) => {
|
|
|
23
24
|
var isPusharyGeminiHook = (entry) => {
|
|
24
25
|
const hooks = asRecord(entry)?.hooks;
|
|
25
26
|
if (!Array.isArray(hooks)) return false;
|
|
26
|
-
return hooks.some((hook) =>
|
|
27
|
+
return hooks.some((hook) => {
|
|
28
|
+
const command = String(asRecord(hook)?.command ?? "");
|
|
29
|
+
return command.includes(GEMINI_HOOK_BINARY) || command.includes(HOOK_LOCATOR_BINARY);
|
|
30
|
+
});
|
|
27
31
|
};
|
|
28
32
|
var addGeminiMcpServer = (settings, apiKey) => {
|
|
29
33
|
const mcpServers = ensureRecord(settings, "mcpServers");
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-SAF6HGAA.js";
|
|
11
11
|
import {
|
|
12
12
|
reportedInstallSource
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7C5CJC3H.js";
|
|
14
14
|
import {
|
|
15
15
|
getApiKey,
|
|
16
16
|
getBaseUrl
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
ACTION_BODY_MAX,
|
|
20
20
|
DECISION_LINE_MAX,
|
|
21
|
+
FILE_TARGET_TOOLS,
|
|
21
22
|
gateOutputFor,
|
|
22
23
|
isAutoApprove,
|
|
23
24
|
localRepoKey,
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
redactSecretsDeep,
|
|
28
29
|
resolveAutoResolveOrigin,
|
|
29
30
|
resolvePolicy
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-CY4TZK5O.js";
|
|
31
32
|
|
|
32
33
|
// src/policy.ts
|
|
33
34
|
import { createHash } from "crypto";
|
|
@@ -221,7 +222,11 @@ var hookPrefixes = {
|
|
|
221
222
|
Write: (input) => `write file: ${input.file_path ?? "(unknown path)"}`,
|
|
222
223
|
Edit: (input) => `edit file: ${input.file_path ?? "(unknown path)"}`,
|
|
223
224
|
MultiEdit: (input) => `edit file: ${input.file_path ?? "(unknown path)"}`,
|
|
224
|
-
Read: (input) => `read file: ${input.file_path ?? "(unknown path)"}
|
|
225
|
+
Read: (input) => `read file: ${input.file_path ?? "(unknown path)"}`,
|
|
226
|
+
// Without an entry here the fallback stringifies the whole tool input, and for
|
|
227
|
+
// ExitPlanMode that input IS the plan: the action line became a truncated dump of
|
|
228
|
+
// the plan markdown. The plan belongs in the body, not the one-line summary.
|
|
229
|
+
ExitPlanMode: () => "finished planning and wants to start coding"
|
|
225
230
|
};
|
|
226
231
|
var describeTodoProgress = (todos) => {
|
|
227
232
|
if (!Array.isArray(todos)) return "updated the plan";
|
|
@@ -265,7 +270,7 @@ var deriveToolTarget = (toolName, toolInput) => {
|
|
|
265
270
|
if (toolName === "Bash" || toolName === "PowerShell" || toolName === "Monitor") {
|
|
266
271
|
return deriveCommandHead(toolInput.command);
|
|
267
272
|
}
|
|
268
|
-
if (toolName
|
|
273
|
+
if (FILE_TARGET_TOOLS.has(toolName)) {
|
|
269
274
|
const filePath = toolInput.file_path;
|
|
270
275
|
if (typeof filePath !== "string") return void 0;
|
|
271
276
|
const separator = Math.max(filePath.lastIndexOf("/"), filePath.lastIndexOf("\\"));
|
|
@@ -314,7 +319,7 @@ var relativizeReceiptPath = (filePath, cwd) => {
|
|
|
314
319
|
var deriveReceiptMeta = (toolName, toolInput, toolResult, cwd) => {
|
|
315
320
|
try {
|
|
316
321
|
const ok = !isToolResultError(toolResult);
|
|
317
|
-
if (toolName
|
|
322
|
+
if (FILE_TARGET_TOOLS.has(toolName)) {
|
|
318
323
|
const filePath = toolInput.file_path;
|
|
319
324
|
if (typeof filePath !== "string" || !filePath) return void 0;
|
|
320
325
|
return {
|
|
@@ -356,6 +361,7 @@ var rawActionBody = (toolName, toolInput) => {
|
|
|
356
361
|
+ ${after ?? ""}`;
|
|
357
362
|
}
|
|
358
363
|
if (toolName === "Write" || toolName === "write_file") return firstString(toolInput.content);
|
|
364
|
+
if (toolName === "ExitPlanMode") return firstString(toolInput.plan);
|
|
359
365
|
if (toolName === "Bash" || toolName === "PowerShell" || toolName === "Monitor" || toolName === "run_shell_command" || toolName === "shell" || toolName === "apply_patch") {
|
|
360
366
|
return firstString(toolInput.command);
|
|
361
367
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// src/claude-tools.ts
|
|
2
|
+
var PRETOOLUSE_GATED_TOOLS = [
|
|
3
|
+
"Bash",
|
|
4
|
+
"Write",
|
|
5
|
+
"Edit",
|
|
6
|
+
"MultiEdit",
|
|
7
|
+
"NotebookEdit",
|
|
8
|
+
"PowerShell",
|
|
9
|
+
"Monitor"
|
|
10
|
+
];
|
|
11
|
+
var PRETOOLUSE_PHONE_ANSWERED_TOOLS = ["AskUserQuestion", "ExitPlanMode"];
|
|
12
|
+
var POSTTOOLUSE_MIRRORED_TOOLS = [...PRETOOLUSE_GATED_TOOLS, "TodoWrite"];
|
|
13
|
+
var PRETOOLUSE_HANDLED_TOOLS = /* @__PURE__ */ new Set([...PRETOOLUSE_GATED_TOOLS, ...PRETOOLUSE_PHONE_ANSWERED_TOOLS]);
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
PRETOOLUSE_GATED_TOOLS,
|
|
17
|
+
PRETOOLUSE_PHONE_ANSWERED_TOOLS,
|
|
18
|
+
PRETOOLUSE_HANDLED_TOOLS
|
|
19
|
+
};
|
|
@@ -65,6 +65,7 @@ var hookWaitDeadline = (startMs, policyWaitSeconds, agent, nowMs) => {
|
|
|
65
65
|
};
|
|
66
66
|
var hookWaitClamped = (startMs, policyWaitSeconds, agent, nowMs) => startMs + hookMaxWaitSeconds(agent) * 1e3 < nowMs + Math.max(policyWaitSeconds, 0) * 1e3;
|
|
67
67
|
var effectiveWaitSeconds = (timeoutAction, policySeconds, agent) => timeoutAction === "wait" ? hookMaxWaitSeconds(agent) : policySeconds;
|
|
68
|
+
var HOOK_LOCATOR_BINARY = "pushary-bridge";
|
|
68
69
|
var HOOK_BATCH_MAX_BYTES = 4 * 1024 * 1024;
|
|
69
70
|
var REPO_KEY_MAX_LENGTH = 200;
|
|
70
71
|
var isRepoKeyMatch = (ruleRepoKey, currentRepoKey) => {
|
|
@@ -502,6 +503,8 @@ var selectGoverningRule = (policies, toolName, args, repoKey, sessionId) => {
|
|
|
502
503
|
}
|
|
503
504
|
return best;
|
|
504
505
|
};
|
|
506
|
+
var ARG_PREFIX_TARGET_TOOLS = Object.keys(POLICY_COMMAND_KEYS);
|
|
507
|
+
var FILE_TARGET_TOOLS = /* @__PURE__ */ new Set(["Edit", "Write", "MultiEdit"]);
|
|
505
508
|
var API_KEY_PATTERN = /^pk_[a-f0-9]+\.[a-f0-9]+$/;
|
|
506
509
|
var isValidApiKey = (value) => API_KEY_PATTERN.test(value);
|
|
507
510
|
var ACTION_BODY_MAX = 4e3;
|
|
@@ -1093,10 +1096,12 @@ export {
|
|
|
1093
1096
|
hookWaitDeadline,
|
|
1094
1097
|
hookWaitClamped,
|
|
1095
1098
|
effectiveWaitSeconds,
|
|
1099
|
+
HOOK_LOCATOR_BINARY,
|
|
1096
1100
|
normalizeRepoRemote,
|
|
1097
1101
|
localRepoKey,
|
|
1098
1102
|
isSafeReadOnlyCommand,
|
|
1099
1103
|
isAutoApprove,
|
|
1104
|
+
FILE_TARGET_TOOLS,
|
|
1100
1105
|
isValidApiKey,
|
|
1101
1106
|
ACTION_BODY_MAX,
|
|
1102
1107
|
DECISION_LINE_MAX,
|