@pushary/agent-hooks 1.9.170 → 1.9.174
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 +20 -0
- package/dist/{api-3KBPIGV4.js → api-MNYX7TLY.js} +12 -12
- package/dist/bin/pushary-audit.js +4 -4
- package/dist/bin/pushary-bell-hook.js +31 -31
- package/dist/bin/pushary-bell.js +13 -12
- package/dist/bin/pushary-calls.js +16 -16
- package/dist/bin/pushary-claude.js +37 -39
- package/dist/bin/pushary-clean.js +49 -47
- package/dist/bin/pushary-codex-bridge.js +27 -27
- package/dist/bin/pushary-codex-hook.js +47 -49
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +20 -19
- package/dist/bin/pushary-connect.js +37 -37
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +57 -56
- package/dist/bin/pushary-disconnect.js +30 -30
- package/dist/bin/pushary-display-hook.js +26 -26
- package/dist/bin/pushary-doctor.js +54 -53
- package/dist/bin/pushary-elicitation-hook.js +34 -33
- package/dist/bin/pushary-gemini-bridge.js +25 -23
- package/dist/bin/pushary-gemini-hook.js +41 -43
- package/dist/bin/pushary-hook.js +39 -39
- package/dist/bin/pushary-login.js +32 -26
- package/dist/bin/pushary-logout.js +41 -33
- package/dist/bin/pushary-mcp.js +13 -13
- package/dist/bin/pushary-mode.js +17 -17
- package/dist/bin/pushary-notification-hook.js +30 -30
- package/dist/bin/pushary-opencode-hook.js +47 -56
- package/dist/bin/pushary-permission-denied-hook.js +39 -39
- package/dist/bin/pushary-permission-hook.js +39 -39
- 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 +32 -32
- package/dist/bin/pushary-session-start-hook.js +42 -42
- package/dist/bin/pushary-sessions.js +15 -15
- package/dist/bin/pushary-setup.js +79 -68
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +38 -38
- package/dist/bin/pushary-stop-hook.js +30 -30
- package/dist/bin/pushary-stopfailure-hook.js +30 -30
- package/dist/bin/pushary-suggestions.js +17 -17
- package/dist/bin/pushary-transcript-register.js +21 -21
- package/dist/bin/pushary-transcripts.js +29 -29
- package/dist/bin/pushary-upgrade.js +46 -46
- package/dist/bin/pushary-wait.js +17 -17
- package/dist/bin/pushary.js +8 -8
- package/dist/{chunk-MPJAXUN2.js → chunk-2EHDZOJA.js} +14 -14
- package/dist/{chunk-BZILLAPJ.js → chunk-2IEU6RX5.js} +1 -1
- package/dist/{chunk-LEXVQXZU.js → chunk-3FOW4K2L.js} +4 -4
- package/dist/{chunk-UCND4JHN.js → chunk-3L5DXDPK.js} +1 -1
- package/dist/{chunk-3ZO7WCMV.js → chunk-4IOCYW6O.js} +3 -3
- package/dist/{chunk-NJSBHEEW.js → chunk-4NXEOPXZ.js} +1 -1
- package/dist/{chunk-352FIVVH.js → chunk-55L4JSPA.js} +1 -1
- package/dist/{chunk-EBHIVYSD.js → chunk-57C45LJT.js} +2 -2
- package/dist/{chunk-5OI4EW6G.js → chunk-5JCKVJC6.js} +5 -5
- package/dist/{chunk-GVIKF73A.js → chunk-5LIGHRBH.js} +1 -1
- package/dist/{chunk-TIRZZCS4.js → chunk-6355EUTT.js} +4 -4
- package/dist/{chunk-DXHRKDP7.js → chunk-6BZCNKCY.js} +5 -5
- package/dist/{chunk-7RNLPI6H.js → chunk-6HYQSAMW.js} +3 -3
- package/dist/{chunk-3UNQJ6AO.js → chunk-76T3UMRC.js} +32 -33
- package/dist/{chunk-65U6TH6P.js → chunk-7VG4JO77.js} +4 -4
- package/dist/{chunk-JNUZYDUC.js → chunk-7XALAS43.js} +3 -3
- package/dist/{chunk-W4NCWOVL.js → chunk-7YVSQ342.js} +1 -1
- package/dist/{chunk-TGYM6UQJ.js → chunk-A3JTWB74.js} +2 -2
- package/dist/{chunk-CNPTWWKJ.js → chunk-A3YA4EIY.js} +3 -3
- package/dist/{chunk-L6UCFQKZ.js → chunk-BHBHY35A.js} +4 -4
- package/dist/{chunk-IWKEIVDF.js → chunk-C7SKKHMD.js} +7 -5
- package/dist/{chunk-QJNI6MPV.js → chunk-CDUTYRXO.js} +4 -4
- package/dist/{chunk-DXUPOVJP.js → chunk-CPV25VW5.js} +1 -1
- package/dist/{chunk-2OMWK322.js → chunk-CTLI2HJE.js} +5 -5
- package/dist/{chunk-BX45H3DU.js → chunk-DJS7W4SC.js} +6 -6
- package/dist/{chunk-2TRYSF64.js → chunk-DNJKQHK2.js} +20 -1
- package/dist/{chunk-FTE5ECGI.js → chunk-DPHYIJNF.js} +4 -4
- package/dist/{chunk-57MF5I5V.js → chunk-E2WABTIY.js} +7 -7
- package/dist/{chunk-OKM76UDB.js → chunk-ET2BWLQX.js} +3 -3
- package/dist/{chunk-OJUW7QW2.js → chunk-FAMKGTCF.js} +1 -1
- package/dist/{chunk-HP5RU3OU.js → chunk-FPF7ZSH5.js} +3 -3
- package/dist/{chunk-SKDSU735.js → chunk-FS7WOHFO.js} +5 -5
- package/dist/{chunk-LILP3T24.js → chunk-GGNKMBCN.js} +4 -4
- package/dist/{chunk-NYDJHJIJ.js → chunk-GPHESUOZ.js} +6 -6
- package/dist/{chunk-TBH5WLIA.js → chunk-GTCNACQ2.js} +5 -5
- package/dist/{chunk-K5HACZJ3.js → chunk-H3MY3EQP.js} +4 -4
- package/dist/{chunk-DVBRMNFM.js → chunk-HGVGOGVD.js} +3 -3
- package/dist/{chunk-NWKXT7LC.js → chunk-HLK3ZELO.js} +2 -2
- package/dist/{chunk-CLT4J5N5.js → chunk-HUJWZIQ2.js} +2 -2
- package/dist/{chunk-HXVCULWA.js → chunk-HZGSGLK4.js} +6 -6
- package/dist/{chunk-7AENNOGX.js → chunk-IP4NJN6G.js} +1 -1
- package/dist/{chunk-MVWWEQQG.js → chunk-IQNM745W.js} +3 -3
- package/dist/{chunk-GZZ7XGL5.js → chunk-JG2ZVO5L.js} +1 -1
- package/dist/{chunk-RSVW634O.js → chunk-JXOVA3JW.js} +6 -6
- package/dist/{chunk-HZANYISD.js → chunk-K5NBHOE6.js} +2 -2
- package/dist/{chunk-3I3RUJRD.js → chunk-LH5JTAAH.js} +2 -2
- package/dist/{chunk-IHNII3GT.js → chunk-LIVVVKIZ.js} +3 -3
- package/dist/{chunk-AVN4A4A6.js → chunk-M4KQPSMS.js} +1 -1
- package/dist/{chunk-SDLL4YPS.js → chunk-MF6FSDM4.js} +3 -3
- package/dist/{chunk-SSKNRWWS.js → chunk-N73CKAC6.js} +1 -1
- package/dist/{chunk-YEZL4T4K.js → chunk-O4AAXXXP.js} +4 -4
- package/dist/{chunk-OHVQ75S7.js → chunk-OBNVYNPQ.js} +3 -3
- package/dist/{chunk-CFZUESTS.js → chunk-OFKKNHYJ.js} +1 -1
- package/dist/{chunk-EGPOBJZG.js → chunk-OLKAGHOO.js} +1 -1
- package/dist/{chunk-LML7I4FY.js → chunk-PAYK5BD7.js} +2 -2
- package/dist/{chunk-WI2WYKSE.js → chunk-PDIN6FE5.js} +1 -1
- package/dist/{chunk-TODDEIYG.js → chunk-PM2NRK6Y.js} +12 -2
- package/dist/{chunk-SADLXUUA.js → chunk-PWJ76P2L.js} +7 -7
- package/dist/{chunk-T33PQ3TE.js → chunk-PZNVSYIY.js} +6 -6
- package/dist/{chunk-UDPXX6YR.js → chunk-QCZMBOMF.js} +1 -1
- package/dist/{chunk-CXKAP6DR.js → chunk-R3EIRYON.js} +5 -5
- package/dist/{chunk-ZA7N6SUH.js → chunk-R4RL4UDT.js} +5 -5
- package/dist/{chunk-W4TTC7MU.js → chunk-RIHIXQAL.js} +12 -12
- package/dist/{chunk-XI7MSL4R.js → chunk-RT6FAMIF.js} +27 -26
- package/dist/{chunk-IV7WDCKS.js → chunk-S3X6WLW5.js} +1 -1
- package/dist/{chunk-6KL27ETS.js → chunk-SHLAHE46.js} +10 -10
- package/dist/{chunk-5TNFIUN3.js → chunk-SNY4ABHS.js} +4 -4
- package/dist/{chunk-CYTPQDQY.js → chunk-TCE3J44Z.js} +1 -1
- package/dist/{chunk-VX6ZYAOA.js → chunk-TRXYUOWW.js} +8 -8
- package/dist/{chunk-A2DVMIX4.js → chunk-TU5DTA2V.js} +1 -1
- package/dist/{chunk-TNYOSIAY.js → chunk-UJ6ZJNHK.js} +3 -3
- package/dist/{chunk-XR27HPYC.js → chunk-UOPOVQ2P.js} +2 -1
- package/dist/{chunk-L77OIGRB.js → chunk-US4LUIFU.js} +20 -0
- package/dist/{chunk-KE5ED475.js → chunk-VCWHZDP3.js} +3 -3
- package/dist/{chunk-FD7JHIET.js → chunk-VH2DDTBE.js} +12 -12
- package/dist/{chunk-2SMEEXDR.js → chunk-VLEKL3PF.js} +1 -1
- package/dist/{chunk-Y6ILCLKE.js → chunk-VRNGMRJA.js} +1 -1
- package/dist/{chunk-RGE64J2V.js → chunk-WAZIEUIG.js} +7 -5
- package/dist/{chunk-LT3B5432.js → chunk-WWVVLMPJ.js} +5 -3
- package/dist/{chunk-TTTMOX73.js → chunk-X5LTD4VA.js} +2 -2
- package/dist/{chunk-MPCJB6I7.js → chunk-XZOYXQ6J.js} +6 -6
- package/dist/{chunk-JTFD3KQ6.js → chunk-YDYKKSFU.js} +224 -75
- package/dist/{chunk-BFZHRQJU.js → chunk-YE7WPP7M.js} +1 -1
- package/dist/{chunk-IGKHWARK.js → chunk-YFOR2JQQ.js} +2 -2
- package/dist/{chunk-7E4OSMST.js → chunk-YXLWKFKC.js} +6 -6
- package/dist/{chunk-GFWQNXX7.js → chunk-Z6YRFNN3.js} +5 -5
- package/dist/{chunk-EPBS4KJR.js → chunk-ZLXN26UD.js} +6 -6
- package/dist/{codex-app-cards-switch-AKCQRBUP.js → codex-app-cards-switch-MJA47AZY.js} +13 -13
- package/dist/{codex-card-routing-QGOX4RNI.js → codex-card-routing-2MDDCMAO.js} +2 -2
- package/dist/{codex-desktop-launch-SCQW4KAV.js → codex-desktop-launch-7IVPOMSK.js} +1 -1
- package/dist/{codex-session-launch-4EVYIYEQ.js → codex-session-launch-U6JUH6X6.js} +24 -24
- package/dist/{config-QIHLQCEV.js → config-S2OVEI6F.js} +3 -3
- package/dist/{global-upgrade-WHSNOE3E.js → global-upgrade-XGDWDFQN.js} +11 -11
- package/dist/{identity-NEXDWMLO.js → identity-7LLNHIP3.js} +5 -5
- package/dist/{live-capabilities-CC7L4VDX.js → live-capabilities-CI46M4XO.js} +6 -6
- package/dist/{paths-J3MVJDQI.js → paths-FVQYVHLH.js} +4 -4
- package/dist/reapply-M4DKHUZX.js +69 -0
- package/dist/src/index.js +38 -38
- package/dist/{upgrade-lock-7PPYIRBP.js → upgrade-lock-DTWLFPH2.js} +5 -5
- package/dist/{usage-GDUDYZSV.js → usage-IHNVIPGZ.js} +3 -3
- package/package.json +1 -1
- package/dist/reapply-6FNUVXCL.js +0 -69
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-R3EIRYON.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7VG4JO77.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MF6FSDM4.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-US4LUIFU.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseSseMessages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5JCKVJC6.js";
|
|
4
4
|
import {
|
|
5
5
|
fetchAsCredential
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-N73CKAC6.js";
|
|
7
7
|
import {
|
|
8
8
|
NPX_LATEST_COMMAND
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-S3X6WLW5.js";
|
|
10
10
|
|
|
11
11
|
// src/mcp-stdio-bridge.ts
|
|
12
12
|
var MCP_BRIDGE_BINARY = "pushary-mcp";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
callDecisionStore,
|
|
3
3
|
identifyingToolInput
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RT6FAMIF.js";
|
|
5
5
|
import {
|
|
6
6
|
canonicalJson
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MF6FSDM4.js";
|
|
8
8
|
|
|
9
9
|
// src/phone-approval.ts
|
|
10
10
|
import { createHash } from "crypto";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchAsCredential
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N73CKAC6.js";
|
|
4
4
|
import {
|
|
5
5
|
keyCheckFromResponse
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OBNVYNPQ.js";
|
|
7
7
|
import {
|
|
8
8
|
installNetworkDefaults
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ET2BWLQX.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TU5DTA2V.js";
|
|
13
13
|
import {
|
|
14
14
|
isRecord,
|
|
15
15
|
isToolErrorResult,
|
|
16
16
|
toolFailureCodeOfResult
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-US4LUIFU.js";
|
|
18
18
|
|
|
19
19
|
// src/retry.ts
|
|
20
20
|
var isRetryable = (err) => {
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
NpmMissingError,
|
|
4
4
|
NpmPermissionError,
|
|
5
5
|
NpmReleaseAgeError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GGNKMBCN.js";
|
|
7
7
|
import {
|
|
8
8
|
writeFileAtomic
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PM2NRK6Y.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-S3X6WLW5.js";
|
|
13
13
|
import {
|
|
14
14
|
readSetupAgentFailures
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-US4LUIFU.js";
|
|
16
16
|
|
|
17
17
|
// src/setup/config-write.ts
|
|
18
18
|
var AgentConfigWriteError = class extends Error {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
external_exports,
|
|
3
3
|
readOwnerOnlyJson
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-55L4JSPA.js";
|
|
5
5
|
import {
|
|
6
6
|
fetchAsCredential
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-N73CKAC6.js";
|
|
8
8
|
import {
|
|
9
9
|
getBaseUrl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TU5DTA2V.js";
|
|
11
11
|
import {
|
|
12
12
|
writeJsonAtomicDurable
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PM2NRK6Y.js";
|
|
14
14
|
import {
|
|
15
15
|
compressTranscriptRecord,
|
|
16
16
|
redactSecretsFromContent,
|
|
17
17
|
transcriptRecordPlaintext
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-US4LUIFU.js";
|
|
19
19
|
|
|
20
20
|
// src/transcript-recipient-pin.ts
|
|
21
21
|
import { createHash } from "crypto";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MF6FSDM4.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PM2NRK6Y.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-US4LUIFU.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -2,39 +2,39 @@ import {
|
|
|
2
2
|
forgetPhoneApproval,
|
|
3
3
|
rememberPhoneApproval,
|
|
4
4
|
takePhoneApproval
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-57C45LJT.js";
|
|
6
6
|
import {
|
|
7
7
|
claudeSettingsLocationFor,
|
|
8
8
|
readClaudePermissionRules
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-K5NBHOE6.js";
|
|
10
10
|
import {
|
|
11
11
|
defersToNativeMode
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7YVSQ342.js";
|
|
13
13
|
import {
|
|
14
14
|
askAgentQuestions,
|
|
15
15
|
outcomeOfFailedAsk,
|
|
16
16
|
storedWaitDeadline
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-R4RL4UDT.js";
|
|
18
18
|
import {
|
|
19
19
|
reportMachineDenial
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-C7SKKHMD.js";
|
|
21
21
|
import {
|
|
22
22
|
isGatingMoment,
|
|
23
23
|
recordKeylessMoment
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-VLEKL3PF.js";
|
|
25
25
|
import {
|
|
26
26
|
isAdmitted,
|
|
27
27
|
readAdmissionRules
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-CTLI2HJE.js";
|
|
29
29
|
import {
|
|
30
30
|
isDeferAnswer,
|
|
31
31
|
oncePerSession
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-4NXEOPXZ.js";
|
|
33
33
|
import {
|
|
34
34
|
activeHookSource,
|
|
35
35
|
activeIdentity,
|
|
36
36
|
namedSource
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-R3EIRYON.js";
|
|
38
38
|
import {
|
|
39
39
|
DEFAULT_SESSION,
|
|
40
40
|
approvalAwaitingRetry,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
settleQuestionsForToolUse,
|
|
58
58
|
sweepFilesOlderThan,
|
|
59
59
|
userScope
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-RT6FAMIF.js";
|
|
61
61
|
import {
|
|
62
62
|
UNNAMED_ACTION,
|
|
63
63
|
deriveAction,
|
|
@@ -68,12 +68,7 @@ import {
|
|
|
68
68
|
patchDeletesFiles,
|
|
69
69
|
permissionDeniedAction,
|
|
70
70
|
scopePathFor
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import {
|
|
73
|
-
branchFor,
|
|
74
|
-
repoKeyFor,
|
|
75
|
-
repositoryScopeFor
|
|
76
|
-
} from "./chunk-2TRYSF64.js";
|
|
71
|
+
} from "./chunk-OFKKNHYJ.js";
|
|
77
72
|
import {
|
|
78
73
|
askUser,
|
|
79
74
|
cancelQuestion,
|
|
@@ -90,23 +85,29 @@ import {
|
|
|
90
85
|
waitForQuestion,
|
|
91
86
|
waitsForThePhone,
|
|
92
87
|
withdrawQuestion
|
|
93
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-YXLWKFKC.js";
|
|
89
|
+
import {
|
|
90
|
+
branchFor,
|
|
91
|
+
projectNameFor,
|
|
92
|
+
repoKeyFor,
|
|
93
|
+
repositoryScopeFor
|
|
94
|
+
} from "./chunk-DNJKQHK2.js";
|
|
94
95
|
import {
|
|
95
96
|
getMachineId
|
|
96
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-YFOR2JQQ.js";
|
|
97
98
|
import {
|
|
98
99
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
99
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-MF6FSDM4.js";
|
|
100
101
|
import {
|
|
101
102
|
getApiKey,
|
|
102
103
|
getBaseUrl
|
|
103
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-TU5DTA2V.js";
|
|
104
105
|
import {
|
|
105
106
|
writeFileAtomic
|
|
106
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-PM2NRK6Y.js";
|
|
107
108
|
import {
|
|
108
109
|
NPX_LATEST_COMMAND
|
|
109
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-S3X6WLW5.js";
|
|
110
111
|
import {
|
|
111
112
|
AGENT_QUESTION_STRATEGY,
|
|
112
113
|
AGENT_QUESTION_TOOL,
|
|
@@ -140,6 +141,7 @@ import {
|
|
|
140
141
|
claudePermissionRequestOutput,
|
|
141
142
|
claudePreToolUseOutput,
|
|
142
143
|
claudePromptTakesTheCall,
|
|
144
|
+
claudeQuestionAnswers,
|
|
143
145
|
claudeStoppedPermissionRequestOutput,
|
|
144
146
|
claudeStoppedPreToolUseOutput,
|
|
145
147
|
denyReasonFrom,
|
|
@@ -177,7 +179,7 @@ import {
|
|
|
177
179
|
timeoutActionWithoutLocalPrompt,
|
|
178
180
|
unansweredRefusalReason,
|
|
179
181
|
unapprovedScopeReason
|
|
180
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-US4LUIFU.js";
|
|
181
183
|
|
|
182
184
|
// src/terminal-answer-watch.ts
|
|
183
185
|
import { closeSync, openSync, readSync, statSync } from "fs";
|
|
@@ -294,9 +296,6 @@ var reportDecisionEpisode = async (apiKey, input) => {
|
|
|
294
296
|
}
|
|
295
297
|
};
|
|
296
298
|
|
|
297
|
-
// src/hook.ts
|
|
298
|
-
import { basename } from "path";
|
|
299
|
-
|
|
300
299
|
// src/pre-tool-use-output.ts
|
|
301
300
|
var allow = (reason) => claudePreToolUseOutput("allow", reason);
|
|
302
301
|
var deny = (reason) => claudePreToolUseOutput("deny", reason);
|
|
@@ -585,7 +584,7 @@ var outcomeOfDispatch = (decided) => {
|
|
|
585
584
|
};
|
|
586
585
|
var dispatchModeDecision = async (apiKey, input, toolPolicy, machineId, trainingConsent = false, scopeReason, scopePath, terminalLive, askReason, matchedRoute) => {
|
|
587
586
|
const description = describeToolCall(input.tool_name, input.tool_input, "hook");
|
|
588
|
-
const projectName =
|
|
587
|
+
const projectName = projectNameFor(input.cwd);
|
|
589
588
|
const sessionId = input.session_id;
|
|
590
589
|
const toolTarget = deriveToolTarget(input.tool_name, input.tool_input);
|
|
591
590
|
const ownPrompt = hasItsOwnApprovalPrompt(ACTIVE_SOURCE);
|
|
@@ -697,7 +696,7 @@ var handleAskUserQuestion = async (apiKey, input, modeState) => {
|
|
|
697
696
|
if (questionHandedToTheTerminal(input.tool_name, modeState)) return void 0;
|
|
698
697
|
const questions = parseAgentQuestions(input.tool_input ?? {});
|
|
699
698
|
if (!questions) return void 0;
|
|
700
|
-
const projectName =
|
|
699
|
+
const projectName = projectNameFor(input.cwd);
|
|
701
700
|
const deadline = hookWaitDeadline(START_MS, effectiveWaitSeconds("wait", 0, "claude"), "claude", Date.now());
|
|
702
701
|
const outcome = await askAgentQuestions(apiKey, {
|
|
703
702
|
toolName: AGENT_QUESTION_TOOL,
|
|
@@ -709,7 +708,7 @@ var handleAskUserQuestion = async (apiKey, input, modeState) => {
|
|
|
709
708
|
}, questions);
|
|
710
709
|
switch (outcome.kind) {
|
|
711
710
|
case "answered":
|
|
712
|
-
return allowWithInput({ ...input.tool_input ?? {}, answers: outcome.answers });
|
|
711
|
+
return allowWithInput({ ...input.tool_input ?? {}, answers: claudeQuestionAnswers(questions, outcome.answers) });
|
|
713
712
|
case "stopped":
|
|
714
713
|
case "unavailable":
|
|
715
714
|
return halted(DECISION_STOP_REASON);
|
|
@@ -721,7 +720,7 @@ var PLAN_APPROVE = "Approve, start coding";
|
|
|
721
720
|
var PLAN_KEEP_PLANNING = "Keep planning";
|
|
722
721
|
var handleExitPlanMode = async (apiKey, input) => {
|
|
723
722
|
const toolInput = input.tool_input ?? {};
|
|
724
|
-
const projectName =
|
|
723
|
+
const projectName = projectNameFor(input.cwd);
|
|
725
724
|
const deadline = hookWaitDeadline(START_MS, effectiveWaitSeconds("wait", 0, "claude"), "claude", Date.now());
|
|
726
725
|
let result;
|
|
727
726
|
try {
|
|
@@ -761,7 +760,7 @@ var handleKeyless = (input) => {
|
|
|
761
760
|
recordKeylessMoment({
|
|
762
761
|
ts: Date.now(),
|
|
763
762
|
tool: input.tool_name,
|
|
764
|
-
project:
|
|
763
|
+
project: projectNameFor(input.cwd),
|
|
765
764
|
sessionId: input.session_id
|
|
766
765
|
});
|
|
767
766
|
}
|
|
@@ -1044,7 +1043,7 @@ var reportPermissionDenied = (input) => reportEvent({
|
|
|
1044
1043
|
occurredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1045
1044
|
toolUseId: input.tool_use_id,
|
|
1046
1045
|
agentType: ACTIVE_AGENT.type,
|
|
1047
|
-
agentName: agentNameIn(
|
|
1046
|
+
agentName: agentNameIn(projectNameFor(input.cwd)),
|
|
1048
1047
|
action: permissionDeniedAction(input.tool_name),
|
|
1049
1048
|
sessionId: input.session_id,
|
|
1050
1049
|
...permissionModeOf(input)
|
|
@@ -1061,7 +1060,7 @@ var notifyPermissionDenied = async (apiKey, input) => {
|
|
|
1061
1060
|
if (claimThrottle(`permdenied:${sessionKey}:${input.tool_name}`, PERMISSION_DENIED_NOTICE_WINDOW_MS) !== "passed") return;
|
|
1062
1061
|
const mode = await fetchModeState(apiKey, input.session_id).catch(() => null);
|
|
1063
1062
|
if (mode?.kill || mode?.mode === "terminal_only") return;
|
|
1064
|
-
const projectName =
|
|
1063
|
+
const projectName = projectNameFor(input.cwd);
|
|
1065
1064
|
await sendNotification(apiKey, {
|
|
1066
1065
|
title: `Auto mode blocked ${input.tool_name}`,
|
|
1067
1066
|
body: `Your agent was denied ${input.tool_name} in ${projectName}.`,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AGENT_CHOICES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HUJWZIQ2.js";
|
|
4
4
|
import {
|
|
5
5
|
BELL_HOOK_BINARY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2IEU6RX5.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_HOOK_EVENTS,
|
|
9
9
|
CODEX_HOOK_EVENTS,
|
|
@@ -16,13 +16,13 @@ import {
|
|
|
16
16
|
isBridgeLocator,
|
|
17
17
|
isProtectedByScope,
|
|
18
18
|
registerHookEntry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MF6FSDM4.js";
|
|
20
20
|
import {
|
|
21
21
|
CURSOR_GATE_EVENTS,
|
|
22
22
|
HOOK_BUDGETS,
|
|
23
23
|
HOOK_LOCATOR_BINARY,
|
|
24
24
|
hookCommandHoldBudget
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-US4LUIFU.js";
|
|
26
26
|
|
|
27
27
|
// src/gemini-config.ts
|
|
28
28
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
installedCodexApp,
|
|
10
10
|
readCodexAppRuntime,
|
|
11
11
|
shellQuoted
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HGVGOGVD.js";
|
|
13
13
|
import {
|
|
14
14
|
CODEX_APP_LAUNCH_AT_LOGIN_VERB,
|
|
15
15
|
CODEX_APP_LAUNCH_VARIABLE
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
} from "./chunk-QCGNGEGE.js";
|
|
20
20
|
import {
|
|
21
21
|
xml
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TRXYUOWW.js";
|
|
23
23
|
import {
|
|
24
24
|
writeFileAtomic
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-PM2NRK6Y.js";
|
|
26
26
|
|
|
27
27
|
// src/codex-app-cards-switch.ts
|
|
28
28
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
spawnClaude
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VRNGMRJA.js";
|
|
4
4
|
import {
|
|
5
5
|
CODEX_HOOK_EVENTS,
|
|
6
6
|
CODEX_REQUIRED_APPROVAL_EVENTS,
|
|
7
7
|
codexHome,
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MF6FSDM4.js";
|
|
11
11
|
import {
|
|
12
12
|
resolvePathBinary
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GGNKMBCN.js";
|
|
14
14
|
import {
|
|
15
15
|
getPackageVersion
|
|
16
16
|
} from "./chunk-UQTQ6HPO.js";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
notificationAnswerStep
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HZGSGLK4.js";
|
|
4
4
|
import {
|
|
5
5
|
matchMacAccountStep,
|
|
6
6
|
retryAgentCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6355EUTT.js";
|
|
8
8
|
import {
|
|
9
9
|
canChangeApprovalSettings
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PAYK5BD7.js";
|
|
11
11
|
import {
|
|
12
12
|
EXIT
|
|
13
13
|
} from "./chunk-BG4HHB7E.js";
|
|
14
14
|
import {
|
|
15
15
|
NPX_LATEST_COMMAND,
|
|
16
16
|
npmExecSetupCommandFor
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-S3X6WLW5.js";
|
|
18
18
|
import {
|
|
19
19
|
LATEST_DIST_TAG
|
|
20
20
|
} from "./chunk-UQTQ6HPO.js";
|
|
@@ -4,18 +4,20 @@ import {
|
|
|
4
4
|
claimThrottle,
|
|
5
5
|
releaseThrottle,
|
|
6
6
|
reportEvent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RT6FAMIF.js";
|
|
8
8
|
import {
|
|
9
9
|
deriveToolTarget,
|
|
10
10
|
permissionDeniedAction
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OFKKNHYJ.js";
|
|
12
|
+
import {
|
|
13
|
+
projectNameFor
|
|
14
|
+
} from "./chunk-DNJKQHK2.js";
|
|
12
15
|
import {
|
|
13
16
|
machineDecisionFor,
|
|
14
17
|
wireVerdictFor
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-US4LUIFU.js";
|
|
16
19
|
|
|
17
20
|
// src/machine-decision-audit.ts
|
|
18
|
-
import { basename } from "path";
|
|
19
21
|
var reportMachineDenial = async (input, verdict, agent) => {
|
|
20
22
|
const decision = machineDecisionFor(wireVerdictFor(verdict, 0));
|
|
21
23
|
if (!decision) return;
|
|
@@ -33,7 +35,7 @@ var reportMachineDenial = async (input, verdict, agent) => {
|
|
|
33
35
|
occurredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
34
36
|
toolUseId: input.tool_use_id,
|
|
35
37
|
agentType: agent.type,
|
|
36
|
-
agentName: `${agent.label} - ${
|
|
38
|
+
agentName: `${agent.label} - ${projectNameFor(input.cwd)}`,
|
|
37
39
|
action: permissionDeniedAction(input.tool_name),
|
|
38
40
|
sessionId: input.session_id,
|
|
39
41
|
decisionSource: "policy_auto",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UNNAMED_ACTION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OFKKNHYJ.js";
|
|
4
4
|
import {
|
|
5
5
|
askUser,
|
|
6
6
|
isAwayPaused,
|
|
7
7
|
isLocalQuestionHandoff,
|
|
8
8
|
unavailableQuestionUnlessRefused,
|
|
9
9
|
waitForQuestion
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YXLWKFKC.js";
|
|
11
11
|
import {
|
|
12
12
|
getMachineId
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YFOR2JQQ.js";
|
|
14
14
|
import {
|
|
15
15
|
hookWaitClamped,
|
|
16
16
|
hookWaitDeadline,
|
|
17
17
|
scopeBreachReasonOf
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-US4LUIFU.js";
|
|
19
19
|
|
|
20
20
|
// src/pushed-question.ts
|
|
21
21
|
var scopeQuestionOf = (verdict) => {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cursorGateOwnsClaudeCall,
|
|
3
3
|
readCursorGateRegistration
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-H3MY3EQP.js";
|
|
5
5
|
import {
|
|
6
6
|
registerTranscript
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VH2DDTBE.js";
|
|
8
8
|
import {
|
|
9
9
|
namedEvent
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-R3EIRYON.js";
|
|
11
11
|
import {
|
|
12
12
|
writeDegraded
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YXLWKFKC.js";
|
|
14
14
|
import {
|
|
15
15
|
claudeShapedHookInput,
|
|
16
16
|
hookCompatibleProfileBySource,
|
|
17
17
|
isGrokHookPayload,
|
|
18
18
|
isGrokSessionEndStop
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-US4LUIFU.js";
|
|
20
20
|
|
|
21
21
|
// src/tool-hook-input.ts
|
|
22
22
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode", "cursor_version"];
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
reachVerdict,
|
|
15
15
|
reachesYou,
|
|
16
16
|
verifyDelivery
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HZGSGLK4.js";
|
|
18
18
|
import {
|
|
19
19
|
describeRevokeAttempt,
|
|
20
20
|
keyNoLongerAccepted,
|
|
@@ -29,20 +29,20 @@ import {
|
|
|
29
29
|
isCI,
|
|
30
30
|
terminalColumns,
|
|
31
31
|
useColor
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-CPV25VW5.js";
|
|
33
33
|
import {
|
|
34
34
|
checkApiKey
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-OBNVYNPQ.js";
|
|
36
36
|
import {
|
|
37
37
|
reportedInstallSource
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-LH5JTAAH.js";
|
|
39
39
|
import {
|
|
40
40
|
NPX_LATEST_COMMAND
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-S3X6WLW5.js";
|
|
42
42
|
import {
|
|
43
43
|
NO_PAIRING_COMPUTER,
|
|
44
44
|
PAIR_TTL_SECONDS
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-US4LUIFU.js";
|
|
46
46
|
|
|
47
47
|
// src/onboarding.ts
|
|
48
48
|
import qrcodeTerminal from "qrcode-terminal";
|