@pushary/agent-hooks 1.9.6 → 1.9.8
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 +19 -0
- package/README.md +3 -3
- package/data/cursor-plugin/README.md +3 -7
- package/data/vscode-plugin/README.md +1 -1
- package/dist/bin/pushary-bell-hook.js +22 -23
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +27 -28
- package/dist/bin/pushary-clean.js +98 -76
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +32 -33
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +24 -21
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +51 -38
- package/dist/bin/pushary-disconnect.js +187 -52
- package/dist/bin/pushary-doctor.js +68 -56
- package/dist/bin/pushary-elicitation-hook.js +24 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +29 -30
- package/dist/bin/pushary-hook.js +30 -32
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +105 -42
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +28 -31
- package/dist/bin/pushary-notification-hook.js +26 -28
- package/dist/bin/pushary-opencode-hook.js +28 -29
- package/dist/bin/pushary-permission-denied-hook.js +30 -32
- package/dist/bin/pushary-permission-hook.js +29 -31
- package/dist/bin/pushary-post-hook.js +26 -28
- package/dist/bin/pushary-prompt-hook.js +26 -28
- package/dist/bin/pushary-session-end-hook.js +26 -28
- package/dist/bin/pushary-session-start-hook.js +31 -31
- package/dist/bin/pushary-setup.js +98 -106
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +34 -18
- package/dist/bin/pushary-stop-hook.js +26 -28
- package/dist/bin/pushary-stopfailure-hook.js +26 -28
- package/dist/bin/pushary-suggestions.js +19 -21
- package/dist/bin/pushary-transcript-register.js +18 -19
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +67 -31
- package/dist/bin/pushary-wait.js +23 -19
- package/dist/bin/pushary.js +15 -14
- package/dist/{chunk-BSZ7VBVT.js → chunk-2A53H4S6.js} +17 -15
- package/dist/{chunk-D7SOOVHX.js → chunk-2QGYMY7A.js} +83 -3
- package/dist/{chunk-SVTHEMM3.js → chunk-2QTO5YIT.js} +6 -6
- package/dist/{chunk-WN6WYUCV.js → chunk-2VZAALEJ.js} +5 -9
- package/dist/chunk-2WXF3QJR.js +49 -0
- package/dist/{chunk-UKNKYTTY.js → chunk-3I6IVOZV.js} +3 -3
- package/dist/chunk-3Z3A37WD.js +77 -0
- package/dist/{chunk-2QRE6QH2.js → chunk-5QUPKDI5.js} +1 -1
- package/dist/chunk-6TE27XZR.js +69 -0
- package/dist/{chunk-L6USMDTW.js → chunk-7DVNSQWF.js} +59 -15
- package/dist/{chunk-SNJ3BOCP.js → chunk-7PT35RY2.js} +27 -8
- package/dist/{chunk-CBVDW2N6.js → chunk-B64KHETR.js} +3 -3
- package/dist/chunk-BEJRK4DF.js +94 -0
- package/dist/chunk-BXET3ALR.js +46 -0
- package/dist/{chunk-DJ4BB264.js → chunk-CD47ZFFZ.js} +1 -1
- package/dist/{chunk-FBD3QGVJ.js → chunk-CKV3UPMU.js} +2 -2
- package/dist/{chunk-7JTVYR5B.js → chunk-CLOSJ4ES.js} +1 -1
- package/dist/{chunk-DA4FTGTK.js → chunk-DKMD6AWR.js} +4 -4
- package/dist/{chunk-SPXBXN23.js → chunk-DL7XWKYV.js} +7 -5
- package/dist/{chunk-VRT3EEZN.js → chunk-DPGSLWOS.js} +8 -8
- package/dist/{chunk-3BUAEQCY.js → chunk-DUZVXBBU.js} +1 -1
- package/dist/{chunk-6GERGJHF.js → chunk-EUW7JL2K.js} +0 -32
- package/dist/{chunk-75CA37FZ.js → chunk-FQ2GORVG.js} +2 -2
- package/dist/{chunk-WUKUXICK.js → chunk-HRULIYDU.js} +2 -2
- package/dist/{chunk-Q4E56K4X.js → chunk-I5IJRMNV.js} +78 -8
- package/dist/{chunk-MKJ3RTUS.js → chunk-I6MJXLMY.js} +2 -2
- package/dist/{chunk-YPXUD6DW.js → chunk-IAD2RT4L.js} +14 -14
- package/dist/{chunk-LBLCFD5K.js → chunk-IHFDPV7C.js} +2 -2
- package/dist/{chunk-BVCHY4OY.js → chunk-IHO3YQAN.js} +2 -2
- package/dist/{chunk-RDK7FX5F.js → chunk-KF3UZLYI.js} +1 -1
- package/dist/chunk-KFF7G225.js +599 -0
- package/dist/{chunk-TE5M6GGK.js → chunk-KHNFLYJO.js} +204 -28
- package/dist/{chunk-CCDVL63C.js → chunk-KRCR2CRQ.js} +9 -9
- package/dist/{chunk-ZC3TF4LR.js → chunk-LKLVTG3V.js} +18 -9
- package/dist/{chunk-4QKM44N6.js → chunk-LWOO567I.js} +4 -3
- package/dist/{chunk-KK54WQ74.js → chunk-M6BZZFVQ.js} +1 -1
- package/dist/{chunk-RIC6OOJX.js → chunk-MFF3ONG5.js} +21 -1
- package/dist/{chunk-IMGJYFCX.js → chunk-MGRFDGWU.js} +3 -2
- package/dist/{chunk-ZPW4MJOV.js → chunk-MKTJEXZ3.js} +3 -3
- package/dist/{chunk-2I23NFVT.js → chunk-MXHTGVFZ.js} +52 -9
- package/dist/{chunk-5BHROGRB.js → chunk-N4QSPI3B.js} +54 -5
- package/dist/{chunk-DGQTJDSJ.js → chunk-NWDG3MSW.js} +1 -1
- package/dist/chunk-OP7IHC2I.js +24 -0
- package/dist/{chunk-EVFY3VE6.js → chunk-QOLITCIP.js} +1 -1
- package/dist/{chunk-W4Q7NFXU.js → chunk-TCQ43LSG.js} +3 -3
- package/dist/chunk-TCWKTUAE.js +50 -0
- package/dist/{chunk-EZAFBC2C.js → chunk-V5HPPF3E.js} +8 -4
- package/dist/{chunk-Q23MMVTD.js → chunk-WG3K4TCH.js} +1 -1
- package/dist/{chunk-F56SB65Y.js → chunk-WS4H76EP.js} +2 -2
- package/dist/{chunk-HWQNQVY6.js → chunk-WWOHTTVP.js} +2 -2
- package/dist/{chunk-NVGDMTX3.js → chunk-YIG2R3BJ.js} +9 -7
- package/dist/{chunk-HJXZJF6O.js → chunk-ZBHUHJG6.js} +4 -4
- package/dist/{chunk-5AXCOTIT.js → chunk-ZBK6E2OR.js} +1 -1
- package/dist/{chunk-5PMTC2CB.js → chunk-ZN3C6GBG.js} +84 -673
- package/dist/{chunk-GQHZIBAZ.js → chunk-ZSTSEBG7.js} +1 -1
- package/dist/{chunk-PYZC54KA.js → chunk-ZW3XZLJC.js} +61 -17
- package/dist/{global-upgrade-7F5RP45B.js → global-upgrade-I56HNM23.js} +6 -6
- package/dist/{paths-MELXIVBO.js → paths-AGY43CXS.js} +2 -2
- package/dist/reapply-IA5XUKWW.js +57 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +19 -20
- package/dist/{upgrade-lock-AHRBA66K.js → upgrade-lock-B34TAUKV.js} +5 -3
- package/package.json +1 -1
- package/dist/chunk-HT3WMM6Q.js +0 -44
- package/dist/chunk-IR5FRUPQ.js +0 -197
- package/dist/chunk-JUFKJCZG.js +0 -38
- package/dist/chunk-SJN22ADZ.js +0 -86
- package/dist/reapply-NOB2Q6C4.js +0 -35
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
postLiveSession,
|
|
6
6
|
postLiveSessionUntilAccepted,
|
|
7
7
|
startLiveSessionHeartbeat
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-WS4H76EP.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveProviderBinary
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-I6MJXLMY.js";
|
|
12
12
|
import "../chunk-RIVNNBEK.js";
|
|
13
13
|
import {
|
|
14
14
|
SESSION_IDLE_TIMEOUT_MS,
|
|
@@ -16,29 +16,29 @@ import {
|
|
|
16
16
|
idleDeadlinePassed,
|
|
17
17
|
startProcessOwnership,
|
|
18
18
|
withSpawnProcessOwnership
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-KF3UZLYI.js";
|
|
20
|
+
import "../chunk-ZBK6E2OR.js";
|
|
21
|
+
import "../chunk-CLOSJ4ES.js";
|
|
22
22
|
import {
|
|
23
23
|
transcriptsEnabled
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-M6BZZFVQ.js";
|
|
25
25
|
import {
|
|
26
26
|
spawnClaude
|
|
27
27
|
} from "../chunk-XHKBHWLX.js";
|
|
28
28
|
import "../chunk-6ICPEJY5.js";
|
|
29
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-N4QSPI3B.js";
|
|
30
30
|
import {
|
|
31
31
|
getMachineId
|
|
32
|
-
} from "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
32
|
+
} from "../chunk-DUZVXBBU.js";
|
|
33
|
+
import "../chunk-FQ2GORVG.js";
|
|
34
|
+
import "../chunk-ZBHUHJG6.js";
|
|
35
35
|
import "../chunk-T7E75EKA.js";
|
|
36
36
|
import {
|
|
37
37
|
getApiKey,
|
|
38
38
|
getBaseUrl
|
|
39
|
-
} from "../chunk-
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
39
|
+
} from "../chunk-5QUPKDI5.js";
|
|
40
|
+
import "../chunk-7DVNSQWF.js";
|
|
41
|
+
import "../chunk-I5IJRMNV.js";
|
|
42
42
|
|
|
43
43
|
// bin/pushary-gemini-bridge.ts
|
|
44
44
|
import { existsSync } from "fs";
|
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
triggerAutoUpdate
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-7PT35RY2.js";
|
|
5
5
|
import {
|
|
6
6
|
isGatingMoment,
|
|
7
7
|
recordKeylessMoment
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-ZSTSEBG7.js";
|
|
9
9
|
import {
|
|
10
10
|
readHookInput
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-WWOHTTVP.js";
|
|
12
12
|
import {
|
|
13
13
|
announceSubscriptionRequired,
|
|
14
14
|
denyReasonFrom,
|
|
15
15
|
isDeferAnswer
|
|
16
16
|
} from "../chunk-5OP5MQI7.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-DPGSLWOS.js";
|
|
18
18
|
import "../chunk-SGZJ5LYH.js";
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-KK54WQ74.js";
|
|
19
|
+
import "../chunk-YIG2R3BJ.js";
|
|
20
|
+
import "../chunk-DL7XWKYV.js";
|
|
21
|
+
import "../chunk-LKLVTG3V.js";
|
|
22
|
+
import "../chunk-2QGYMY7A.js";
|
|
23
|
+
import "../chunk-3I6IVOZV.js";
|
|
24
|
+
import "../chunk-WG3K4TCH.js";
|
|
25
|
+
import "../chunk-ZBK6E2OR.js";
|
|
26
|
+
import "../chunk-CLOSJ4ES.js";
|
|
27
|
+
import "../chunk-M6BZZFVQ.js";
|
|
29
28
|
import "../chunk-XHKBHWLX.js";
|
|
30
29
|
import "../chunk-6ICPEJY5.js";
|
|
31
30
|
import {
|
|
@@ -46,53 +45,53 @@ import {
|
|
|
46
45
|
repoKeyFor,
|
|
47
46
|
reportEvent,
|
|
48
47
|
scopePathFor
|
|
49
|
-
} from "../chunk-
|
|
48
|
+
} from "../chunk-KRCR2CRQ.js";
|
|
50
49
|
import {
|
|
51
50
|
DEFAULT_SESSION
|
|
52
51
|
} from "../chunk-N6IOSZOE.js";
|
|
53
|
-
import "../chunk-
|
|
52
|
+
import "../chunk-CD47ZFFZ.js";
|
|
54
53
|
import {
|
|
55
|
-
DECISION_STOP_REASON,
|
|
56
|
-
UNVERIFIABLE_APPROVAL_REASON,
|
|
57
54
|
askUser,
|
|
58
55
|
isDecisionStopped,
|
|
59
56
|
isLocalQuestionHandoff,
|
|
60
57
|
sendNotification,
|
|
61
58
|
waitForQuestion
|
|
62
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-2VZAALEJ.js";
|
|
63
60
|
import {
|
|
64
61
|
exitAfterClientReports
|
|
65
|
-
} from "../chunk-
|
|
62
|
+
} from "../chunk-DKMD6AWR.js";
|
|
66
63
|
import "../chunk-POFBE6ZY.js";
|
|
67
64
|
import "../chunk-GMXKITVA.js";
|
|
68
|
-
import "../chunk-
|
|
65
|
+
import "../chunk-N4QSPI3B.js";
|
|
69
66
|
import {
|
|
70
67
|
SubscriptionRequiredError
|
|
71
|
-
} from "../chunk-
|
|
72
|
-
import "../chunk-
|
|
73
|
-
import "../chunk-
|
|
68
|
+
} from "../chunk-MKTJEXZ3.js";
|
|
69
|
+
import "../chunk-LWOO567I.js";
|
|
70
|
+
import "../chunk-TCQ43LSG.js";
|
|
74
71
|
import {
|
|
75
72
|
getMachineId
|
|
76
|
-
} from "../chunk-
|
|
73
|
+
} from "../chunk-DUZVXBBU.js";
|
|
77
74
|
import "../chunk-7QLSKOSU.js";
|
|
78
75
|
import {
|
|
79
76
|
EXIT
|
|
80
77
|
} from "../chunk-KZERVKTD.js";
|
|
81
|
-
import "../chunk-
|
|
82
|
-
import "../chunk-
|
|
78
|
+
import "../chunk-FQ2GORVG.js";
|
|
79
|
+
import "../chunk-ZBHUHJG6.js";
|
|
83
80
|
import "../chunk-T7E75EKA.js";
|
|
84
81
|
import {
|
|
85
82
|
getApiKey
|
|
86
|
-
} from "../chunk-
|
|
87
|
-
import "../chunk-
|
|
83
|
+
} from "../chunk-5QUPKDI5.js";
|
|
84
|
+
import "../chunk-7DVNSQWF.js";
|
|
88
85
|
import {
|
|
86
|
+
DECISION_STOP_REASON,
|
|
89
87
|
KILL_REASON,
|
|
88
|
+
UNVERIFIABLE_APPROVAL_REASON,
|
|
90
89
|
effectiveWaitSeconds,
|
|
91
90
|
gateOutputFor,
|
|
92
91
|
hookWaitClamped,
|
|
93
92
|
hookWaitDeadline,
|
|
94
93
|
resolveGate
|
|
95
|
-
} from "../chunk-
|
|
94
|
+
} from "../chunk-I5IJRMNV.js";
|
|
96
95
|
|
|
97
96
|
// bin/pushary-gemini-hook.ts
|
|
98
97
|
import { basename } from "path";
|
package/dist/bin/pushary-hook.js
CHANGED
|
@@ -1,64 +1,62 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handlePreToolUse
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-2A53H4S6.js";
|
|
5
5
|
import {
|
|
6
6
|
activeHookSource,
|
|
7
7
|
normalizeToolCall,
|
|
8
8
|
profileFromArgv
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-GQHZIBAZ.js";
|
|
9
|
+
} from "../chunk-KHNFLYJO.js";
|
|
10
|
+
import "../chunk-IHO3YQAN.js";
|
|
11
|
+
import "../chunk-ZSTSEBG7.js";
|
|
13
12
|
import {
|
|
14
13
|
readToolHookInput
|
|
15
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-WWOHTTVP.js";
|
|
16
15
|
import "../chunk-5OP5MQI7.js";
|
|
17
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-DPGSLWOS.js";
|
|
18
17
|
import "../chunk-SGZJ5LYH.js";
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-KK54WQ74.js";
|
|
18
|
+
import "../chunk-YIG2R3BJ.js";
|
|
19
|
+
import "../chunk-DL7XWKYV.js";
|
|
20
|
+
import "../chunk-LKLVTG3V.js";
|
|
21
|
+
import "../chunk-2QGYMY7A.js";
|
|
22
|
+
import "../chunk-3I6IVOZV.js";
|
|
23
|
+
import "../chunk-WG3K4TCH.js";
|
|
24
|
+
import "../chunk-ZBK6E2OR.js";
|
|
25
|
+
import "../chunk-CLOSJ4ES.js";
|
|
26
|
+
import "../chunk-M6BZZFVQ.js";
|
|
29
27
|
import "../chunk-XHKBHWLX.js";
|
|
30
28
|
import "../chunk-6ICPEJY5.js";
|
|
31
29
|
import {
|
|
32
30
|
canonicalGateInputs
|
|
33
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-KRCR2CRQ.js";
|
|
34
32
|
import "../chunk-N6IOSZOE.js";
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
33
|
+
import "../chunk-CD47ZFFZ.js";
|
|
34
|
+
import "../chunk-2VZAALEJ.js";
|
|
37
35
|
import {
|
|
38
36
|
exitAfterClientReports
|
|
39
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-DKMD6AWR.js";
|
|
40
38
|
import "../chunk-POFBE6ZY.js";
|
|
41
39
|
import {
|
|
42
40
|
exitOnHelpFlag
|
|
43
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-CKV3UPMU.js";
|
|
44
42
|
import "../chunk-GMXKITVA.js";
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import "../chunk-
|
|
47
|
-
import "../chunk-
|
|
48
|
-
import "../chunk-
|
|
49
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-N4QSPI3B.js";
|
|
44
|
+
import "../chunk-MKTJEXZ3.js";
|
|
45
|
+
import "../chunk-LWOO567I.js";
|
|
46
|
+
import "../chunk-TCQ43LSG.js";
|
|
47
|
+
import "../chunk-DUZVXBBU.js";
|
|
50
48
|
import "../chunk-7QLSKOSU.js";
|
|
51
49
|
import {
|
|
52
50
|
EXIT
|
|
53
51
|
} from "../chunk-KZERVKTD.js";
|
|
54
|
-
import "../chunk-
|
|
55
|
-
import "../chunk-
|
|
52
|
+
import "../chunk-FQ2GORVG.js";
|
|
53
|
+
import "../chunk-ZBHUHJG6.js";
|
|
56
54
|
import "../chunk-T7E75EKA.js";
|
|
57
|
-
import "../chunk-
|
|
58
|
-
import "../chunk-
|
|
55
|
+
import "../chunk-5QUPKDI5.js";
|
|
56
|
+
import "../chunk-7DVNSQWF.js";
|
|
59
57
|
import {
|
|
60
58
|
renderPreToolUseVerdict
|
|
61
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-I5IJRMNV.js";
|
|
62
60
|
|
|
63
61
|
// bin/pushary-hook.ts
|
|
64
62
|
exitOnHelpFlag("hook");
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runBrowserLogin
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-NWDG3MSW.js";
|
|
5
5
|
import "../chunk-PUZZELE6.js";
|
|
6
6
|
import {
|
|
7
7
|
writeStdoutFully
|
|
8
8
|
} from "../chunk-EO23EUOK.js";
|
|
9
9
|
import {
|
|
10
10
|
recoverDaemonAfterLogin
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-LKLVTG3V.js";
|
|
12
12
|
import "../chunk-XHKBHWLX.js";
|
|
13
13
|
import "../chunk-3EGEA4KH.js";
|
|
14
14
|
import {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "../chunk-U4TMAANR.js";
|
|
17
17
|
import {
|
|
18
18
|
exitOnHelpFlag
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-CKV3UPMU.js";
|
|
20
20
|
import {
|
|
21
21
|
parseFlags
|
|
22
22
|
} from "../chunk-GMXKITVA.js";
|
|
@@ -25,28 +25,28 @@ import {
|
|
|
25
25
|
readControlMode,
|
|
26
26
|
readKeySource,
|
|
27
27
|
writeKey
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-N4QSPI3B.js";
|
|
29
29
|
import {
|
|
30
30
|
checkApiKey,
|
|
31
31
|
describeKeyCheck
|
|
32
|
-
} from "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
32
|
+
} from "../chunk-LWOO567I.js";
|
|
33
|
+
import "../chunk-TCQ43LSG.js";
|
|
34
|
+
import "../chunk-DUZVXBBU.js";
|
|
35
35
|
import {
|
|
36
36
|
UsageError
|
|
37
37
|
} from "../chunk-7QLSKOSU.js";
|
|
38
38
|
import {
|
|
39
39
|
EXIT
|
|
40
40
|
} from "../chunk-KZERVKTD.js";
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-FQ2GORVG.js";
|
|
42
|
+
import "../chunk-ZBHUHJG6.js";
|
|
43
43
|
import "../chunk-T7E75EKA.js";
|
|
44
|
-
import "../chunk-
|
|
45
|
-
import "../chunk-
|
|
44
|
+
import "../chunk-5QUPKDI5.js";
|
|
45
|
+
import "../chunk-7DVNSQWF.js";
|
|
46
46
|
import {
|
|
47
47
|
getPackageVersion,
|
|
48
48
|
isValidApiKey
|
|
49
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-I5IJRMNV.js";
|
|
50
50
|
|
|
51
51
|
// bin/pushary-login.ts
|
|
52
52
|
exitOnHelpFlag("login");
|
|
@@ -4,41 +4,103 @@ import {
|
|
|
4
4
|
} from "../chunk-U4TMAANR.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnHelpFlag
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-CKV3UPMU.js";
|
|
8
8
|
import {
|
|
9
9
|
parseFlags
|
|
10
10
|
} from "../chunk-GMXKITVA.js";
|
|
11
11
|
import {
|
|
12
12
|
clearKey,
|
|
13
13
|
readKeySource
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-N4QSPI3B.js";
|
|
15
|
+
import {
|
|
16
|
+
checkApiKey
|
|
17
|
+
} from "../chunk-LWOO567I.js";
|
|
18
|
+
import "../chunk-TCQ43LSG.js";
|
|
19
|
+
import "../chunk-DUZVXBBU.js";
|
|
15
20
|
import {
|
|
16
21
|
UsageError
|
|
17
22
|
} from "../chunk-7QLSKOSU.js";
|
|
18
23
|
import {
|
|
19
24
|
EXIT
|
|
20
25
|
} from "../chunk-KZERVKTD.js";
|
|
21
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-FQ2GORVG.js";
|
|
22
27
|
import {
|
|
23
28
|
claudeJson,
|
|
24
29
|
codexConfigToml,
|
|
25
30
|
cursorUserMcp,
|
|
26
31
|
geminiSettings
|
|
27
|
-
} from "../chunk-
|
|
32
|
+
} from "../chunk-ZBHUHJG6.js";
|
|
28
33
|
import "../chunk-T7E75EKA.js";
|
|
29
34
|
import {
|
|
30
35
|
getBaseUrl
|
|
31
|
-
} from "../chunk-
|
|
32
|
-
import
|
|
33
|
-
|
|
36
|
+
} from "../chunk-5QUPKDI5.js";
|
|
37
|
+
import {
|
|
38
|
+
isInvocationOf
|
|
39
|
+
} from "../chunk-7DVNSQWF.js";
|
|
40
|
+
import "../chunk-I5IJRMNV.js";
|
|
34
41
|
|
|
35
42
|
// bin/pushary-logout.ts
|
|
36
43
|
import { existsSync } from "fs";
|
|
37
|
-
|
|
44
|
+
|
|
45
|
+
// src/key-revocation.ts
|
|
46
|
+
var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
|
|
47
|
+
var DEVICE_KEY_PATH = "/api/agent/device-key";
|
|
48
|
+
var FULL_ACCESS_ONLY_STATUS = 403;
|
|
49
|
+
var REVOKE_TIMEOUT_MS = 1e4;
|
|
50
|
+
var readRevokedCount = async (response) => {
|
|
51
|
+
try {
|
|
52
|
+
const body = await response.json();
|
|
53
|
+
const revoked = typeof body === "object" && body !== null && "revoked" in body ? body.revoked : void 0;
|
|
54
|
+
return typeof revoked === "number" && Number.isInteger(revoked) && revoked >= 0 ? revoked : null;
|
|
55
|
+
} catch {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
var revokeAgentKey = async (apiKey, baseUrl, fetchImpl) => {
|
|
60
|
+
const response = await fetchImpl(`${baseUrl}${DEVICE_KEY_PATH}`, {
|
|
61
|
+
method: "DELETE",
|
|
62
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
63
|
+
signal: AbortSignal.timeout(REVOKE_TIMEOUT_MS)
|
|
64
|
+
});
|
|
65
|
+
if (!response.ok) return { kind: "refused", status: response.status };
|
|
66
|
+
const revoked = await readRevokedCount(response);
|
|
67
|
+
if (revoked === null) return { kind: "refused", status: response.status };
|
|
68
|
+
return revoked > 0 ? { kind: "revoked" } : { kind: "not_accepted" };
|
|
69
|
+
};
|
|
70
|
+
var revokeOwnKey = async (apiKey, baseUrl, fetchImpl = fetch) => {
|
|
71
|
+
try {
|
|
72
|
+
const response = await fetchImpl(`${baseUrl}${SELF_REVOKE_PATH}`, {
|
|
73
|
+
method: "POST",
|
|
74
|
+
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
|
|
75
|
+
signal: AbortSignal.timeout(REVOKE_TIMEOUT_MS)
|
|
76
|
+
});
|
|
77
|
+
if (response.status === 401) return { kind: "not_accepted" };
|
|
78
|
+
if (response.status === FULL_ACCESS_ONLY_STATUS) return await revokeAgentKey(apiKey, baseUrl, fetchImpl);
|
|
79
|
+
if (!response.ok) return { kind: "refused", status: response.status };
|
|
80
|
+
return { kind: "revoked" };
|
|
81
|
+
} catch (err) {
|
|
82
|
+
return { kind: "unreachable", detail: err instanceof Error ? err.message : "network error" };
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
var keyValidityOf = (check) => {
|
|
86
|
+
switch (check.kind) {
|
|
87
|
+
case "ok":
|
|
88
|
+
case "locked":
|
|
89
|
+
return "valid";
|
|
90
|
+
case "rejected":
|
|
91
|
+
case "malformed":
|
|
92
|
+
return "invalid";
|
|
93
|
+
case "unreachable":
|
|
94
|
+
return "unknown";
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// bin/pushary-logout.ts
|
|
99
|
+
exitOnHelpFlag("sign-out");
|
|
38
100
|
var parseLogoutOptions = (argv) => {
|
|
39
101
|
const flags = parseFlags(argv, { bools: ["json", "revoke", "help", "h"], values: [] });
|
|
40
|
-
if (flags.command !== void 0 && flags.command
|
|
41
|
-
throw new UsageError(`
|
|
102
|
+
if (flags.command !== void 0 && !isInvocationOf(flags.command, "sign-out")) {
|
|
103
|
+
throw new UsageError(`sign-out takes no positional arguments (got ${flags.command})`);
|
|
42
104
|
}
|
|
43
105
|
return { json: flags.bools.has("json"), revoke: flags.bools.has("revoke") };
|
|
44
106
|
};
|
|
@@ -60,30 +122,26 @@ var AGENT_CONFIGS = [
|
|
|
60
122
|
{ label: "Gemini CLI", path: geminiSettings() },
|
|
61
123
|
{ label: "Cursor", path: cursorUserMcp() }
|
|
62
124
|
];
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
125
|
+
var REVOKE_DETAIL = {
|
|
126
|
+
revoked: "Revoked the key on pushary.com.",
|
|
127
|
+
not_accepted: "pushary.com had already stopped accepting the key.",
|
|
128
|
+
refused: "pushary.com refused to revoke the key",
|
|
129
|
+
unreachable: "Could not reach pushary.com to revoke the key"
|
|
130
|
+
};
|
|
131
|
+
var describeRevokeAttempt = (attempt) => {
|
|
132
|
+
if (attempt.kind === "refused") return `${REVOKE_DETAIL.refused} (HTTP ${attempt.status}).`;
|
|
133
|
+
if (attempt.kind === "unreachable") return `${REVOKE_DETAIL.unreachable}: ${attempt.detail}`;
|
|
134
|
+
return REVOKE_DETAIL[attempt.kind];
|
|
135
|
+
};
|
|
136
|
+
var revokeAndVerify = async (apiKey) => {
|
|
137
|
+
const baseUrl = getBaseUrl();
|
|
138
|
+
const attempt = await revokeOwnKey(apiKey, baseUrl);
|
|
139
|
+
const validity = keyValidityOf(await checkApiKey(apiKey, { baseUrl }));
|
|
140
|
+
return { attempt, validity };
|
|
76
141
|
};
|
|
77
142
|
var main = async () => {
|
|
78
143
|
const before = readKeySource();
|
|
79
|
-
|
|
80
|
-
if (options.revoke) {
|
|
81
|
-
if (before.key) {
|
|
82
|
-
revoked = await revokeRemotely(before.key);
|
|
83
|
-
} else {
|
|
84
|
-
revoked = { ok: false, detail: "no key was stored here, so there was nothing to revoke" };
|
|
85
|
-
}
|
|
86
|
-
}
|
|
144
|
+
const revoked = options.revoke && before.key ? await revokeAndVerify(before.key) : null;
|
|
87
145
|
const result = clearKey();
|
|
88
146
|
const remaining = AGENT_CONFIGS.filter((entry) => existsSync(entry.path));
|
|
89
147
|
say("");
|
|
@@ -96,14 +154,16 @@ var main = async () => {
|
|
|
96
154
|
say(` ${dim(`Commented out ${result.rcLinesDisabled} export line in ${result.rcPath}`)}`);
|
|
97
155
|
}
|
|
98
156
|
}
|
|
157
|
+
if (options.revoke && !before.key) {
|
|
158
|
+
say("");
|
|
159
|
+
say(` ${yellow("!")} No key was stored here, so there was nothing to revoke.`);
|
|
160
|
+
}
|
|
99
161
|
if (revoked) {
|
|
100
162
|
say("");
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
say(` ${dim("It is still valid. Revoke it at")} ${cyan("pushary.com/dashboard/agent/settings")}`);
|
|
106
|
-
}
|
|
163
|
+
say(` ${revoked.attempt.kind === "revoked" || revoked.attempt.kind === "not_accepted" ? green("\u2713") : yellow("!")} ${describeRevokeAttempt(revoked.attempt)}`);
|
|
164
|
+
if (revoked.validity === "invalid") say(` ${green("\u2713")} The key no longer works anywhere.`);
|
|
165
|
+
else if (revoked.validity === "valid") say(` ${yellow("!")} The key still works on pushary.com. Revoke it at ${cyan("pushary.com/dashboard/agent/settings")}`);
|
|
166
|
+
else say(` ${yellow("!")} Could not check whether the key still works. Check it at ${cyan("pushary.com/dashboard/agent/settings")}`);
|
|
107
167
|
}
|
|
108
168
|
if (before.kind === "env") {
|
|
109
169
|
say("");
|
|
@@ -112,12 +172,14 @@ var main = async () => {
|
|
|
112
172
|
}
|
|
113
173
|
if (remaining.length > 0) {
|
|
114
174
|
say("");
|
|
115
|
-
say(` ${dim("Still holding a copy of the key, untouched by
|
|
175
|
+
say(` ${dim("Still holding a copy of the key, untouched by sign-out:")}`);
|
|
116
176
|
for (const entry of remaining) say(` ${dim(`\u2022 ${entry.label} ${entry.path}`)}`);
|
|
117
177
|
say(` ${dim("Run")} ${cyan("pushary clean")} ${dim("to remove Pushary from those too.")}`);
|
|
118
178
|
}
|
|
119
|
-
|
|
120
|
-
|
|
179
|
+
if (!options.revoke) {
|
|
180
|
+
say("");
|
|
181
|
+
say(` ${dim("The key itself is still valid server-side. Revoke it at")} ${cyan("pushary.com/dashboard/agent/settings")}`);
|
|
182
|
+
}
|
|
121
183
|
say("");
|
|
122
184
|
if (options.json) {
|
|
123
185
|
process.stdout.write(
|
|
@@ -129,7 +191,8 @@ var main = async () => {
|
|
|
129
191
|
rcPath: result.rcPath,
|
|
130
192
|
rcLinesDisabled: result.rcLinesDisabled,
|
|
131
193
|
envStillSet: before.kind === "env",
|
|
132
|
-
revoked: revoked === null ? null : revoked.
|
|
194
|
+
revoked: revoked === null ? options.revoke ? false : null : revoked.attempt.kind === "revoked" || revoked.attempt.kind === "not_accepted",
|
|
195
|
+
keyStillValid: revoked === null ? null : revoked.validity === "unknown" ? null : revoked.validity === "valid",
|
|
133
196
|
agentConfigsRetainingKey: remaining.map((entry) => entry.path)
|
|
134
197
|
},
|
|
135
198
|
null,
|
|
@@ -141,7 +204,7 @@ var main = async () => {
|
|
|
141
204
|
process.exit(EXIT.OK);
|
|
142
205
|
};
|
|
143
206
|
main().catch((err) => {
|
|
144
|
-
process.stderr.write(` !
|
|
207
|
+
process.stderr.write(` ! sign-out failed: ${err instanceof Error ? err.message : String(err)}
|
|
145
208
|
`);
|
|
146
209
|
process.exit(EXIT.FAILED);
|
|
147
210
|
});
|
package/dist/bin/pushary-mcp.js
CHANGED
|
@@ -4,25 +4,25 @@ import {
|
|
|
4
4
|
bridgeError,
|
|
5
5
|
createMcpStdioBridge,
|
|
6
6
|
parseBridgeLine
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-HRULIYDU.js";
|
|
8
|
+
import "../chunk-MKTJEXZ3.js";
|
|
9
|
+
import "../chunk-LWOO567I.js";
|
|
10
10
|
import {
|
|
11
11
|
installNetworkDefaults
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-TCQ43LSG.js";
|
|
13
|
+
import "../chunk-DUZVXBBU.js";
|
|
14
14
|
import "../chunk-7QLSKOSU.js";
|
|
15
15
|
import {
|
|
16
16
|
EXIT
|
|
17
17
|
} from "../chunk-KZERVKTD.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-ZBHUHJG6.js";
|
|
19
19
|
import "../chunk-T7E75EKA.js";
|
|
20
20
|
import {
|
|
21
21
|
getApiKey,
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
23
|
+
} from "../chunk-5QUPKDI5.js";
|
|
24
|
+
import "../chunk-7DVNSQWF.js";
|
|
25
|
+
import "../chunk-I5IJRMNV.js";
|
|
26
26
|
|
|
27
27
|
// src/mcp-stdio-stream.ts
|
|
28
28
|
var MCP_MAX_IN_FLIGHT = 16;
|