@pushary/agent-hooks 1.9.158 → 1.9.161
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 +22 -0
- package/README.md +1 -0
- package/dist/{api-MRFKFDVV.js → api-WHTSBK74.js} +15 -13
- package/dist/bin/pushary-audit.js +7 -7
- package/dist/bin/pushary-bell-hook.js +31 -31
- package/dist/bin/pushary-bell.js +16 -16
- package/dist/bin/pushary-calls.d.ts +1 -0
- package/dist/bin/pushary-calls.js +287 -0
- package/dist/bin/pushary-claude.js +37 -37
- package/dist/bin/pushary-clean.js +47 -45
- package/dist/bin/pushary-codex-bridge.js +27 -27
- package/dist/bin/pushary-codex-hook.js +46 -44
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +19 -19
- package/dist/bin/pushary-connect.js +41 -40
- package/dist/bin/pushary-cowork.js +6 -6
- package/dist/bin/pushary-daemon.js +52 -51
- package/dist/bin/pushary-disconnect.js +39 -37
- package/dist/bin/pushary-display-hook.js +20 -1
- package/dist/bin/pushary-doctor.js +61 -59
- package/dist/bin/pushary-elicitation-hook.js +32 -32
- package/dist/bin/pushary-gemini-bridge.js +19 -19
- package/dist/bin/pushary-gemini-hook.js +36 -36
- package/dist/bin/pushary-hook.js +39 -38
- package/dist/bin/pushary-login.js +28 -28
- package/dist/bin/pushary-logout.js +34 -33
- package/dist/bin/pushary-mcp.js +15 -15
- package/dist/bin/pushary-mode.js +21 -21
- package/dist/bin/pushary-notification-hook.js +30 -30
- package/dist/bin/pushary-opencode-hook.js +399 -45
- package/dist/bin/pushary-permission-denied-hook.js +39 -38
- package/dist/bin/pushary-permission-hook.js +39 -38
- package/dist/bin/pushary-post-hook.js +31 -31
- package/dist/bin/pushary-prompt-hook.js +30 -30
- package/dist/bin/pushary-session-end-hook.js +30 -30
- package/dist/bin/pushary-session-start-hook.js +41 -40
- package/dist/bin/pushary-setup.js +73 -72
- package/dist/bin/pushary-stats.js +6 -6
- package/dist/bin/pushary-status.js +40 -39
- package/dist/bin/pushary-stop-hook.js +30 -30
- package/dist/bin/pushary-stopfailure-hook.js +30 -30
- package/dist/bin/pushary-suggestions.js +21 -21
- package/dist/bin/pushary-transcript-register.js +21 -21
- package/dist/bin/pushary-transcripts.js +32 -32
- package/dist/bin/pushary-upgrade.js +50 -49
- package/dist/bin/pushary-wait.js +23 -23
- package/dist/bin/pushary.js +10 -9
- package/dist/{chunk-IKC33YKC.js → chunk-26GVUJMR.js} +5 -2
- package/dist/{chunk-Q7WCDUFV.js → chunk-2ABUBECK.js} +6 -6
- package/dist/{chunk-V36P4KS4.js → chunk-2PY5DJTC.js} +1 -1
- package/dist/{chunk-J7HSUQK2.js → chunk-3F6HE5AK.js} +3 -3
- package/dist/{chunk-AZZNHW3R.js → chunk-4ZNZS6FM.js} +8 -5
- package/dist/{chunk-HA2SRYYP.js → chunk-55AHQF63.js} +92 -0
- package/dist/{chunk-UPI3JDHZ.js → chunk-5S66DHJS.js} +3 -3
- package/dist/{chunk-4I2SHNEU.js → chunk-5UBV26GO.js} +3 -3
- package/dist/{chunk-ALQWZCUT.js → chunk-6NWESDKK.js} +4 -4
- package/dist/{chunk-DHI3X5WK.js → chunk-6OSE2IRG.js} +2 -2
- package/dist/{chunk-NW63PGKF.js → chunk-7AQTKVA6.js} +12 -7
- package/dist/{chunk-FTTSQAF4.js → chunk-7IHVTLHK.js} +1 -1
- package/dist/{chunk-GTYVNVBZ.js → chunk-7VXHWU7A.js} +4 -4
- package/dist/{chunk-B3BOAYRO.js → chunk-7WLKE7QN.js} +3 -3
- package/dist/{chunk-QVVBU2JU.js → chunk-ANYLSZN3.js} +24 -9
- package/dist/{chunk-6GGK3T24.js → chunk-AT5ZLKMQ.js} +5 -5
- package/dist/{chunk-CCKY3JDB.js → chunk-ATI5XO3E.js} +4 -4
- package/dist/{chunk-CAMFNSJS.js → chunk-AVGYUZVK.js} +6 -6
- package/dist/{chunk-FGVBFDNV.js → chunk-AVRRD6AY.js} +1 -1
- package/dist/{chunk-ORQ7THNZ.js → chunk-BGU56XCS.js} +1 -1
- package/dist/{chunk-K3OCYJPK.js → chunk-BTYHDCAP.js} +3 -3
- package/dist/{chunk-YPFOTFEG.js → chunk-DHUWAUVL.js} +1 -1
- package/dist/{chunk-IOKJJ2SY.js → chunk-DHX5JZSH.js} +4 -4
- package/dist/{chunk-XNJ2HOEL.js → chunk-DLZ6RK2P.js} +3 -3
- package/dist/{chunk-TSR3FPGL.js → chunk-DWMQZM52.js} +1 -1
- package/dist/{chunk-N3CFEMLS.js → chunk-E7K6YCWY.js} +6 -6
- package/dist/{chunk-3QU4WXAH.js → chunk-EGEZKJHX.js} +5 -5
- package/dist/{chunk-3UNZ7HRN.js → chunk-F5NJUDGA.js} +20 -18
- package/dist/{chunk-UDLWNOXX.js → chunk-FZCEPG6J.js} +2 -2
- package/dist/{chunk-N5SSADNW.js → chunk-G44FOBHN.js} +4 -4
- package/dist/{chunk-TKBCLK4B.js → chunk-GJA3KQ3T.js} +5 -5
- package/dist/{chunk-CSZWWPNS.js → chunk-GNHXDRO6.js} +1 -1
- package/dist/{chunk-AMIUB22C.js → chunk-HHNC6FWO.js} +1 -1
- package/dist/{chunk-PND5IGC7.js → chunk-HKCJZGAJ.js} +6 -6
- package/dist/{chunk-IIK3CZXJ.js → chunk-HKI4RMZF.js} +8 -7
- package/dist/{chunk-PBPQRJ2T.js → chunk-I5HXAELM.js} +5 -5
- package/dist/{chunk-T3PZQNIK.js → chunk-IGSSDODQ.js} +2 -2
- package/dist/{chunk-CS4Z44F5.js → chunk-IHYKSPWH.js} +85 -8
- package/dist/chunk-J36DDPJV.js +18 -0
- package/dist/{chunk-ANQBLZAE.js → chunk-KDHLOPSO.js} +1 -1
- package/dist/{chunk-4B5K6YIP.js → chunk-KKDKPWGM.js} +1 -1
- package/dist/{chunk-XHCX6DOY.js → chunk-L2ADRR62.js} +5 -5
- package/dist/{chunk-RRVFN432.js → chunk-LRTRIDOC.js} +1 -1
- package/dist/{chunk-MTITL2IG.js → chunk-LVGRSC44.js} +5 -5
- package/dist/{chunk-C6PAIHLP.js → chunk-MGOBIHXH.js} +10 -10
- package/dist/{chunk-EHRWEXRN.js → chunk-MPYQW4IV.js} +2 -2
- package/dist/{chunk-QP3TCKRZ.js → chunk-N4OKAE65.js} +15 -15
- package/dist/{chunk-SZMDRBNK.js → chunk-ONMAG5BF.js} +2 -2
- package/dist/{chunk-TMWXWBFP.js → chunk-OOODAKCC.js} +6 -6
- package/dist/chunk-OQAIMSHQ.js +885 -0
- package/dist/{chunk-TZJR5ESF.js → chunk-OSCZ4MNE.js} +7 -7
- package/dist/{chunk-X254TRBU.js → chunk-OXZ75E2Y.js} +4 -4
- package/dist/{chunk-OCWXE4PR.js → chunk-OZK75SFS.js} +11 -9
- package/dist/{chunk-RL5JLDRE.js → chunk-PXLWR4TG.js} +2 -2
- package/dist/{chunk-4WL2MINE.js → chunk-QLEFFGCN.js} +1 -1
- package/dist/{chunk-4NHQAMSK.js → chunk-R7NAG65X.js} +4 -4
- package/dist/{chunk-UVWKMFLQ.js → chunk-R7RN3Z2T.js} +2 -2
- package/dist/{chunk-AOP55JR2.js → chunk-RZBCXPOV.js} +14 -3
- package/dist/{chunk-SNQOEDZ2.js → chunk-S6ARXVVZ.js} +1 -1
- package/dist/{chunk-TYBVQ33X.js → chunk-TYB2QGJD.js} +6 -6
- package/dist/{chunk-XSIZKQ2C.js → chunk-U36COV3Z.js} +11 -11
- package/dist/{chunk-PI3BOI3A.js → chunk-U3FVVMB3.js} +1 -1
- package/dist/{chunk-AGYD6XNI.js → chunk-UH7GJHOO.js} +3 -3
- package/dist/chunk-UJT32RSQ.js +242 -0
- package/dist/{chunk-WIIMW5YO.js → chunk-UQTQ6HPO.js} +2 -0
- package/dist/{chunk-JKRQL2BL.js → chunk-UZTGEACF.js} +5 -5
- package/dist/{chunk-MHYX5Q3F.js → chunk-VIS3EVRH.js} +1 -1
- package/dist/{chunk-4SN4FHFZ.js → chunk-VYNC7EYV.js} +2 -2
- package/dist/{chunk-EGBI4GRS.js → chunk-W6FCSBTM.js} +2 -2
- package/dist/{chunk-IVOELLUK.js → chunk-WAFJGQSE.js} +39 -8
- package/dist/{chunk-LVZBLKAU.js → chunk-WCXVPYSD.js} +1 -1
- package/dist/{chunk-K3I2NMEF.js → chunk-WNIDBPT2.js} +8 -8
- package/dist/{chunk-CIAJ55EQ.js → chunk-WTWBHE2Y.js} +42 -34
- package/dist/{chunk-GHHVXARK.js → chunk-XWCLKWKP.js} +1 -1
- package/dist/{chunk-ZYDE6QRW.js → chunk-Y23YO46U.js} +3 -3
- package/dist/{chunk-2L52USKM.js → chunk-Y553AEQU.js} +3 -3
- package/dist/{chunk-H6CL3T2S.js → chunk-Y6ILCLKE.js} +1 -1
- package/dist/{chunk-APCJZFTJ.js → chunk-YD45WNVQ.js} +1 -1
- package/dist/{chunk-MLPPQ556.js → chunk-YEB7YWW7.js} +13 -13
- package/dist/{chunk-TPLTB256.js → chunk-YGHHDDIM.js} +4 -4
- package/dist/{chunk-N2LWKWNY.js → chunk-Z5DOTAFI.js} +3 -3
- package/dist/{chunk-2MPT7YQK.js → chunk-ZIKSHD5M.js} +5 -3
- package/dist/{codex-app-cards-switch-CXXDGH7R.js → codex-app-cards-switch-DPCGWQSX.js} +14 -14
- package/dist/{codex-card-routing-WP4IHJFN.js → codex-card-routing-NFIEH66Q.js} +2 -2
- package/dist/{codex-desktop-launch-EN7ACHC6.js → codex-desktop-launch-MARNBY23.js} +1 -1
- package/dist/{codex-session-launch-7BV4VTJW.js → codex-session-launch-LSNU7CUV.js} +23 -23
- package/dist/{config-SZMMBOJV.js → config-5D34OAYM.js} +4 -4
- package/dist/{global-upgrade-I5J6BDHA.js → global-upgrade-5XBO6FYU.js} +11 -11
- package/dist/{identity-GLJNTNHW.js → identity-6QEFK7PW.js} +5 -5
- package/dist/{live-capabilities-AYO7FOHS.js → live-capabilities-6KOGY6KM.js} +5 -5
- package/dist/{paths-NRBEF3T2.js → paths-7M6V62NO.js} +4 -4
- package/dist/reapply-ZECM5JRX.js +69 -0
- package/dist/src/index.js +39 -38
- package/dist/{upgrade-lock-H6SU7MJR.js → upgrade-lock-DI4JY2CU.js} +5 -5
- package/dist/usage-X4BIHYR5.js +11 -0
- package/package.json +2 -1
- package/dist/chunk-GLDSXDRV.js +0 -593
- package/dist/reapply-J2QUV7J2.js +0 -68
- package/dist/usage-MY3DIFBG.js +0 -11
|
@@ -2,37 +2,39 @@ import {
|
|
|
2
2
|
forgetPhoneApproval,
|
|
3
3
|
rememberPhoneApproval,
|
|
4
4
|
takePhoneApproval
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VYNC7EYV.js";
|
|
6
6
|
import {
|
|
7
7
|
claudeSettingsLocationFor,
|
|
8
8
|
readClaudePermissionRules
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PXLWR4TG.js";
|
|
10
|
+
import {
|
|
11
|
+
defersToNativeMode
|
|
12
|
+
} from "./chunk-J36DDPJV.js";
|
|
10
13
|
import {
|
|
11
14
|
askAgentQuestions,
|
|
12
|
-
defersToNativeMode,
|
|
13
15
|
outcomeOfFailedAsk,
|
|
14
16
|
storedWaitDeadline
|
|
15
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WTWBHE2Y.js";
|
|
16
18
|
import {
|
|
17
19
|
reportMachineDenial
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5S66DHJS.js";
|
|
19
21
|
import {
|
|
20
22
|
isGatingMoment,
|
|
21
23
|
recordKeylessMoment
|
|
22
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-HHNC6FWO.js";
|
|
23
25
|
import {
|
|
24
26
|
isAdmitted,
|
|
25
27
|
readAdmissionRules
|
|
26
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-EGEZKJHX.js";
|
|
27
29
|
import {
|
|
28
30
|
isDeferAnswer,
|
|
29
31
|
oncePerSession
|
|
30
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-DHUWAUVL.js";
|
|
31
33
|
import {
|
|
32
34
|
activeHookSource,
|
|
33
35
|
activeIdentity,
|
|
34
36
|
namedSource
|
|
35
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-LVGRSC44.js";
|
|
36
38
|
import {
|
|
37
39
|
DEFAULT_SESSION,
|
|
38
40
|
approvalAwaitingRetry,
|
|
@@ -55,7 +57,7 @@ import {
|
|
|
55
57
|
settleQuestionsForToolUse,
|
|
56
58
|
sweepFilesOlderThan,
|
|
57
59
|
userScope
|
|
58
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-N4OKAE65.js";
|
|
59
61
|
import {
|
|
60
62
|
UNNAMED_ACTION,
|
|
61
63
|
deriveAction,
|
|
@@ -66,12 +68,12 @@ import {
|
|
|
66
68
|
patchDeletesFiles,
|
|
67
69
|
permissionDeniedAction,
|
|
68
70
|
scopePathFor
|
|
69
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-26GVUJMR.js";
|
|
70
72
|
import {
|
|
71
73
|
branchFor,
|
|
72
74
|
repoKeyFor,
|
|
73
75
|
repositoryScopeFor
|
|
74
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-QLEFFGCN.js";
|
|
75
77
|
import {
|
|
76
78
|
askUser,
|
|
77
79
|
cancelQuestion,
|
|
@@ -88,23 +90,23 @@ import {
|
|
|
88
90
|
waitForQuestion,
|
|
89
91
|
waitsForThePhone,
|
|
90
92
|
withdrawQuestion
|
|
91
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-IHYKSPWH.js";
|
|
92
94
|
import {
|
|
93
95
|
getMachineId
|
|
94
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-VIS3EVRH.js";
|
|
95
97
|
import {
|
|
96
98
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
97
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-7WLKE7QN.js";
|
|
98
100
|
import {
|
|
99
101
|
getApiKey,
|
|
100
102
|
getBaseUrl
|
|
101
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-7IHVTLHK.js";
|
|
102
104
|
import {
|
|
103
105
|
writeFileAtomic
|
|
104
106
|
} from "./chunk-TODDEIYG.js";
|
|
105
107
|
import {
|
|
106
108
|
NPX_LATEST_COMMAND
|
|
107
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-RZBCXPOV.js";
|
|
108
110
|
import {
|
|
109
111
|
AGENT_QUESTION_STRATEGY,
|
|
110
112
|
AGENT_QUESTION_TOOL,
|
|
@@ -174,7 +176,7 @@ import {
|
|
|
174
176
|
timeoutActionWithoutLocalPrompt,
|
|
175
177
|
unansweredRefusalReason,
|
|
176
178
|
unapprovedScopeReason
|
|
177
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-55AHQF63.js";
|
|
178
180
|
|
|
179
181
|
// src/terminal-answer-watch.ts
|
|
180
182
|
import { closeSync, openSync, readSync, statSync } from "fs";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LVGRSC44.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YGHHDDIM.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7WLKE7QN.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-55AHQF63.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
configFailureKind,
|
|
5
5
|
retryAgentCommand,
|
|
6
6
|
writeSetupConfigFile
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Y553AEQU.js";
|
|
8
8
|
import {
|
|
9
9
|
MCP_BRIDGE_BINARY
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BTYHDCAP.js";
|
|
11
11
|
import {
|
|
12
12
|
KEY_FILE_MODE
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Y23YO46U.js";
|
|
14
14
|
import {
|
|
15
15
|
CLINE_SERVER_NAME_TAKEN,
|
|
16
16
|
CLINE_SETTINGS_REFUSALS,
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
withClinePusharyServer,
|
|
33
33
|
withRefreshedClineKey,
|
|
34
34
|
withoutClinePusharyServer
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-7WLKE7QN.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveGlobalBinary
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-WAFJGQSE.js";
|
|
39
39
|
import {
|
|
40
40
|
readJsonSafe,
|
|
41
41
|
writeFileAtomic,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VIS3EVRH.js";
|
|
4
|
+
import {
|
|
5
|
+
getBaseUrl
|
|
6
|
+
} from "./chunk-7IHVTLHK.js";
|
|
4
7
|
import {
|
|
5
8
|
NetworkError
|
|
6
9
|
} from "./chunk-YU2EUD7O.js";
|
|
7
|
-
import {
|
|
8
|
-
getBaseUrl
|
|
9
|
-
} from "./chunk-FTTSQAF4.js";
|
|
10
10
|
import {
|
|
11
11
|
getPackageVersion
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UQTQ6HPO.js";
|
|
13
13
|
import {
|
|
14
14
|
clientContextHeaders,
|
|
15
15
|
redactSecretsFromContent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-55AHQF63.js";
|
|
17
17
|
|
|
18
18
|
// src/cli/net.ts
|
|
19
19
|
import { createRequire } from "module";
|
|
@@ -2,31 +2,31 @@ import {
|
|
|
2
2
|
SIGNED_OUT_ON_MAC_MESSAGE,
|
|
3
3
|
describeSignedOutKey,
|
|
4
4
|
readSignedOutDiagnosis
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6OSE2IRG.js";
|
|
6
6
|
import {
|
|
7
7
|
APPROVAL_RULES_PATH
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ONMAG5BF.js";
|
|
9
9
|
import {
|
|
10
10
|
createIo
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XWCLKWKP.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl,
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck,
|
|
16
16
|
keyCheckFromResponse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-I5HXAELM.js";
|
|
18
18
|
import {
|
|
19
19
|
readKeySource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-Y23YO46U.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-7IHVTLHK.js";
|
|
24
24
|
import {
|
|
25
25
|
EXIT
|
|
26
26
|
} from "./chunk-BG4HHB7E.js";
|
|
27
27
|
import {
|
|
28
28
|
KEY_SCOPE
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-55AHQF63.js";
|
|
30
30
|
|
|
31
31
|
// src/cli/report-key.ts
|
|
32
32
|
var { dim, yellow } = createIo();
|
|
@@ -108,5 +108,6 @@ var exitOnFailedSettingsRequest = async (response, settings) => {
|
|
|
108
108
|
|
|
109
109
|
export {
|
|
110
110
|
printKeyCheck,
|
|
111
|
+
exitOnFailedResponse,
|
|
111
112
|
exitOnFailedSettingsRequest
|
|
112
113
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HKCJZGAJ.js";
|
|
4
|
+
import {
|
|
5
|
+
getBaseUrl
|
|
6
|
+
} from "./chunk-7IHVTLHK.js";
|
|
4
7
|
import {
|
|
5
8
|
NetworkError
|
|
6
9
|
} from "./chunk-YU2EUD7O.js";
|
|
7
|
-
import {
|
|
8
|
-
getBaseUrl
|
|
9
|
-
} from "./chunk-FTTSQAF4.js";
|
|
10
10
|
import {
|
|
11
11
|
EXIT
|
|
12
12
|
} from "./chunk-BG4HHB7E.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-55AHQF63.js";
|
|
17
17
|
|
|
18
18
|
// src/session.ts
|
|
19
19
|
var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-BG4HHB7E.js";
|
|
4
4
|
import {
|
|
5
5
|
renderCommandHelp
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RZBCXPOV.js";
|
|
7
7
|
import {
|
|
8
8
|
getPackageVersion
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UQTQ6HPO.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/usage.ts
|
|
12
12
|
var exitOnHelpFlag = (command) => {
|
|
@@ -8,21 +8,21 @@ import {
|
|
|
8
8
|
SubscriptionRequiredError,
|
|
9
9
|
callMcpTool,
|
|
10
10
|
isRetryable
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OSCZ4MNE.js";
|
|
12
|
+
import {
|
|
13
|
+
fetchAsCredential
|
|
14
|
+
} from "./chunk-DWMQZM52.js";
|
|
12
15
|
import {
|
|
13
16
|
installNetworkDefaults,
|
|
14
17
|
isNetworkFailure
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
fetchAsCredential
|
|
18
|
-
} from "./chunk-TSR3FPGL.js";
|
|
18
|
+
} from "./chunk-HKCJZGAJ.js";
|
|
19
19
|
import {
|
|
20
20
|
clientReportClaims
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7WLKE7QN.js";
|
|
22
22
|
import {
|
|
23
23
|
getApiKey,
|
|
24
24
|
getBaseUrl
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-7IHVTLHK.js";
|
|
26
26
|
import {
|
|
27
27
|
ASK_AGENT_NAME_MAX,
|
|
28
28
|
CLIENT_REPORT_PATH,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
degradedLine,
|
|
33
33
|
isDecisionStoppedReply,
|
|
34
34
|
truncateLine
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-55AHQF63.js";
|
|
36
36
|
|
|
37
37
|
// src/api.ts
|
|
38
38
|
import { randomUUID } from "crypto";
|
|
@@ -69,6 +69,47 @@ var isBlockedActionClaim = (data) => {
|
|
|
69
69
|
return typeof data.granted === "boolean";
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
+
// src/open-question-wait.ts
|
|
73
|
+
var OPEN_QUESTION_LIVE_WINDOW_MS = 10 * 6e4;
|
|
74
|
+
var OPEN_QUESTION_LIVE_POLL = { holdMs: 3e4, pauseMs: 2e3 };
|
|
75
|
+
var OPEN_QUESTION_IDLE_POLL = { holdMs: 1e3, pauseMs: 3e4 };
|
|
76
|
+
var MAX_FAILURE_PAUSE_MS = 15e3;
|
|
77
|
+
var PENDING_STATUS = "pending";
|
|
78
|
+
var UNAVAILABLE_STATUS = "unavailable";
|
|
79
|
+
var PERSON_STOPPED_STATUS = "stopped";
|
|
80
|
+
var openQuestionPollAt = (elapsedMs) => elapsedMs < OPEN_QUESTION_LIVE_WINDOW_MS ? OPEN_QUESTION_LIVE_POLL : OPEN_QUESTION_IDLE_POLL;
|
|
81
|
+
var openQuestionFailurePauseMs = (failures, poll) => Math.max(poll.pauseMs, Math.min(poll.pauseMs * 2 ** Math.max(0, failures - 1), MAX_FAILURE_PAUSE_MS));
|
|
82
|
+
var isThePersonsStop = (reply) => reply.status === PERSON_STOPPED_STATUS;
|
|
83
|
+
var isPending = (reply) => reply.status === void 0 || reply.status === PENDING_STATUS;
|
|
84
|
+
var isUnavailable = (reply) => reply.status === UNAVAILABLE_STATUS;
|
|
85
|
+
var askingProcessWaits = (asker, currentParent, isGone) => currentParent === asker && !isGone(asker);
|
|
86
|
+
var waitWhileTheQuestionIsOpen = async (effects) => {
|
|
87
|
+
const startedAt = effects.now();
|
|
88
|
+
let failures = 0;
|
|
89
|
+
while (effects.askerStillWaits()) {
|
|
90
|
+
const poll = openQuestionPollAt(effects.now() - startedAt);
|
|
91
|
+
let reply;
|
|
92
|
+
try {
|
|
93
|
+
reply = await effects.poll(poll.holdMs);
|
|
94
|
+
} catch (error) {
|
|
95
|
+
if (!effects.isTransientFailure(error)) return { kind: "abandoned" };
|
|
96
|
+
failures += 1;
|
|
97
|
+
await effects.sleep(openQuestionFailurePauseMs(failures, poll));
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if (reply.answered || isThePersonsStop(reply)) return { kind: "replied", reply };
|
|
101
|
+
if (isUnavailable(reply)) {
|
|
102
|
+
failures += 1;
|
|
103
|
+
await effects.sleep(openQuestionFailurePauseMs(failures, poll));
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
failures = 0;
|
|
107
|
+
if (!isPending(reply)) return { kind: "closed" };
|
|
108
|
+
await effects.sleep(poll.pauseMs);
|
|
109
|
+
}
|
|
110
|
+
return { kind: "abandoned" };
|
|
111
|
+
};
|
|
112
|
+
|
|
72
113
|
// src/client-report-claim.ts
|
|
73
114
|
import { createHash } from "crypto";
|
|
74
115
|
import { closeSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
|
|
@@ -326,6 +367,39 @@ var waitForQuestion = async (apiKey, question, deadlineMs, pollInterval = 2e3, s
|
|
|
326
367
|
if (question.status === "expired") return STOPPED;
|
|
327
368
|
return isAwayPaused(question) || isLocalQuestionHandoff(question) ? withdrawQuestion(apiKey, question.correlationId) : pollForAnswer(apiKey, question.correlationId, deadlineMs, pollInterval, signal);
|
|
328
369
|
};
|
|
370
|
+
var OPEN_QUESTION_CLOSED = { answered: false, status: "withdrawn" };
|
|
371
|
+
var OPEN_QUESTION_LATE_ANSWER_HOLD_MS = 1e3;
|
|
372
|
+
var answerThatWonTheCancel = async (apiKey, correlationId) => {
|
|
373
|
+
const late = await waitForAnswer(apiKey, correlationId, OPEN_QUESTION_LATE_ANSWER_HOLD_MS, AbortSignal.timeout(2e3));
|
|
374
|
+
return late.answered ? late : OPEN_QUESTION_CLOSED;
|
|
375
|
+
};
|
|
376
|
+
var withdrawOpenQuestion = async (apiKey, correlationId) => {
|
|
377
|
+
try {
|
|
378
|
+
const cancelled = await cancelQuestion(apiKey, correlationId, AbortSignal.timeout(4e3));
|
|
379
|
+
return cancelled.cancelled === true ? OPEN_QUESTION_CLOSED : await answerThatWonTheCancel(apiKey, correlationId);
|
|
380
|
+
} catch {
|
|
381
|
+
return OPEN_QUESTION_CLOSED;
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
var waitForOpenQuestion = async (apiKey, question, askerStillWaits) => {
|
|
385
|
+
if (question.answered || isThePersonsStop(question)) return { ...question, answered: !!question.answered };
|
|
386
|
+
if (isAwayPaused(question) || isLocalQuestionHandoff(question)) return withdrawOpenQuestion(apiKey, question.correlationId);
|
|
387
|
+
const ending = await waitWhileTheQuestionIsOpen({
|
|
388
|
+
now: Date.now,
|
|
389
|
+
sleep: (ms) => sleepUnlessAborted(ms),
|
|
390
|
+
poll: (holdMs) => waitForAnswer(apiKey, question.correlationId, holdMs),
|
|
391
|
+
askerStillWaits,
|
|
392
|
+
isTransientFailure: isTransientWaitFailure
|
|
393
|
+
});
|
|
394
|
+
switch (ending.kind) {
|
|
395
|
+
case "replied":
|
|
396
|
+
return ending.reply;
|
|
397
|
+
case "closed":
|
|
398
|
+
return OPEN_QUESTION_CLOSED;
|
|
399
|
+
case "abandoned":
|
|
400
|
+
return withdrawOpenQuestion(apiKey, question.correlationId);
|
|
401
|
+
}
|
|
402
|
+
};
|
|
329
403
|
var sendNotification = async (apiKey, params, timeoutMs = 15e3, signal) => {
|
|
330
404
|
await callMcpTool(apiKey, "send_notification", { ...params }, { maxRetries: signal ? 1 : 3, timeoutMs, signal });
|
|
331
405
|
};
|
|
@@ -368,6 +442,8 @@ export {
|
|
|
368
442
|
isPolicyConfig,
|
|
369
443
|
isAskUserResponse,
|
|
370
444
|
isWaitForAnswerResponse,
|
|
445
|
+
isThePersonsStop,
|
|
446
|
+
askingProcessWaits,
|
|
371
447
|
isDecisionStopped,
|
|
372
448
|
isAwayPaused,
|
|
373
449
|
isLocalQuestionHandoff,
|
|
@@ -385,6 +461,7 @@ export {
|
|
|
385
461
|
cancelQuestion,
|
|
386
462
|
withdrawQuestion,
|
|
387
463
|
waitForQuestion,
|
|
464
|
+
waitForOpenQuestion,
|
|
388
465
|
sendNotification,
|
|
389
466
|
requestGate,
|
|
390
467
|
claimBlockedAction
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
shouldDeferToNativeMode
|
|
3
|
+
} from "./chunk-55AHQF63.js";
|
|
4
|
+
|
|
5
|
+
// src/native-defer.ts
|
|
6
|
+
var nativeDeferOptions = () => {
|
|
7
|
+
const respect = process.env.PUSHARY_RESPECT_PERMISSION_MODE;
|
|
8
|
+
const bypass = process.env.PUSHARY_DEFER_BYPASS;
|
|
9
|
+
return {
|
|
10
|
+
respectPermissionMode: !(respect === "0" || respect === "false"),
|
|
11
|
+
deferBypass: bypass === "1" || bypass === "true"
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
var defersToNativeMode = (permissionMode, toolName) => shouldDeferToNativeMode(permissionMode, toolName, nativeDeferOptions());
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
defersToNativeMode
|
|
18
|
+
};
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
} from "./chunk-OYIN77HO.js";
|
|
6
6
|
import {
|
|
7
7
|
readMacAppAgentKey
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OXZ75E2Y.js";
|
|
9
9
|
import {
|
|
10
10
|
API_KEYS_PATH
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ONMAG5BF.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-I5HXAELM.js";
|
|
15
15
|
import {
|
|
16
16
|
findExportedKeyLines,
|
|
17
17
|
isAdoptedMacAppKey,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
readConfigFileKey,
|
|
22
22
|
readKeySource,
|
|
23
23
|
readMacAppKeyPrefix
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-Y23YO46U.js";
|
|
25
25
|
import {
|
|
26
26
|
isValidApiKey
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-55AHQF63.js";
|
|
28
28
|
|
|
29
29
|
// src/cli/held-key-revocation.ts
|
|
30
30
|
var readCliHeldKeys = (profiles) => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addGeminiMcpServer,
|
|
3
3
|
removeGeminiMcpServer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YGHHDDIM.js";
|
|
5
5
|
import {
|
|
6
6
|
CLAUDE_CODE_AGENT
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-N4OKAE65.js";
|
|
8
8
|
import {
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-26GVUJMR.js";
|
|
11
11
|
import {
|
|
12
12
|
CLAUDE_HOOK_EVENTS,
|
|
13
13
|
PUSHARY_MCP_URL,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
isPusharyHook,
|
|
20
20
|
registerHookEntry,
|
|
21
21
|
removeClaudeMcpServers
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-7WLKE7QN.js";
|
|
23
23
|
import {
|
|
24
24
|
HOOK_COMPATIBLE_PROFILES,
|
|
25
25
|
PHONE_ANSWERED_TOOLS,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
pusharyMissingReason,
|
|
31
31
|
refusalOutput,
|
|
32
32
|
withHookHoldBudget
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-55AHQF63.js";
|
|
34
34
|
|
|
35
35
|
// src/config-document.ts
|
|
36
36
|
import { parse, stringify } from "smol-toml";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-WHB622LP.js";
|
|
4
4
|
import {
|
|
5
5
|
ensureDaemonRunning
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WNIDBPT2.js";
|
|
7
7
|
import {
|
|
8
8
|
hookOwnerOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YGHHDDIM.js";
|
|
10
10
|
import {
|
|
11
11
|
hookMeaning
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-26GVUJMR.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
changedRecipientsMessage,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
uploadTranscriptRecords,
|
|
25
25
|
verifyAnchoredRecipients,
|
|
26
26
|
wrapSessionKey
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5UBV26GO.js";
|
|
28
28
|
import {
|
|
29
29
|
external_exports,
|
|
30
30
|
ownedOnlyByThisUser,
|
|
@@ -33,22 +33,22 @@ import {
|
|
|
33
33
|
import {
|
|
34
34
|
transcriptEnvironmentPreference,
|
|
35
35
|
transcriptsEnabled
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-YD45WNVQ.js";
|
|
37
37
|
import {
|
|
38
38
|
fetchAsCredential
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-DWMQZM52.js";
|
|
40
40
|
import {
|
|
41
41
|
readTranscriptPreference
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-Y23YO46U.js";
|
|
43
43
|
import {
|
|
44
44
|
claudeConfigDir,
|
|
45
45
|
codexHome,
|
|
46
46
|
pusharyDir
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-7WLKE7QN.js";
|
|
48
48
|
import {
|
|
49
49
|
getApiKey,
|
|
50
50
|
getBaseUrl
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-7IHVTLHK.js";
|
|
52
52
|
import {
|
|
53
53
|
writeJsonAtomic,
|
|
54
54
|
writeJsonAtomicDurable
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
isHookSource,
|
|
61
61
|
isRecord,
|
|
62
62
|
redactSecretsFromContent
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-55AHQF63.js";
|
|
64
64
|
|
|
65
65
|
// src/transcript-registration.ts
|
|
66
66
|
import { createHash as createHash4 } from "crypto";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7WLKE7QN.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe
|
|
6
6
|
} from "./chunk-TODDEIYG.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-55AHQF63.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|