pushary 1.9.116 → 1.9.118
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 +15 -0
- package/dist/{api-X624HAAU.js → api-Q2HBBRLT.js} +11 -11
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +27 -27
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +35 -40
- package/dist/bin/pushary-clean.js +34 -34
- package/dist/bin/pushary-codex-bridge.js +21 -21
- package/dist/bin/pushary-codex-hook.js +62 -73
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +15 -15
- package/dist/bin/pushary-connect.js +28 -28
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +42 -42
- package/dist/bin/pushary-disconnect.js +27 -27
- package/dist/bin/pushary-display-hook.js +17 -17
- package/dist/bin/pushary-doctor.js +42 -42
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +91 -88
- package/dist/bin/pushary-hook.js +33 -32
- package/dist/bin/pushary-login.js +21 -21
- package/dist/bin/pushary-logout.js +26 -26
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +15 -15
- package/dist/bin/pushary-notification-hook.js +26 -26
- package/dist/bin/pushary-opencode-hook.js +93 -75
- package/dist/bin/pushary-permission-denied-hook.js +33 -32
- package/dist/bin/pushary-permission-hook.js +33 -32
- package/dist/bin/pushary-post-hook.js +26 -26
- package/dist/bin/pushary-prompt-hook.js +26 -26
- package/dist/bin/pushary-session-end-hook.js +26 -26
- package/dist/bin/pushary-session-start-hook.js +35 -35
- package/dist/bin/pushary-setup.js +49 -49
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +32 -32
- package/dist/bin/pushary-stop-hook.js +26 -26
- package/dist/bin/pushary-stopfailure-hook.js +26 -26
- package/dist/bin/pushary-suggestions.js +15 -15
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +25 -25
- package/dist/bin/pushary-upgrade.js +40 -40
- package/dist/bin/pushary-wait.js +15 -15
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-CBJXUJ4Y.js → chunk-2WCARUXQ.js} +1 -1
- package/dist/{chunk-WACBGAWA.js → chunk-46ZIEQGC.js} +2 -2
- package/dist/{chunk-FKVPV3SH.js → chunk-4PXJ2LBU.js} +2 -2
- package/dist/{chunk-KVZAFFEE.js → chunk-5FJPEDMZ.js} +3 -3
- package/dist/chunk-5UIRDDJN.js +60 -0
- package/dist/{chunk-FHRXFUGD.js → chunk-6UN3AUIS.js} +3 -3
- package/dist/{chunk-JSTA2JTL.js → chunk-7K6DZPYV.js} +1 -1
- package/dist/{chunk-NXEOD5JC.js → chunk-7YQPI4UE.js} +1 -1
- package/dist/{chunk-ZUVDQOU6.js → chunk-A23GIPWY.js} +2 -2
- package/dist/{chunk-TNQ5JFCV.js → chunk-A2TAWW5L.js} +1 -1
- package/dist/{chunk-QVD4UOJ7.js → chunk-AN6AKKHO.js} +2 -2
- package/dist/{chunk-4X6GTMU4.js → chunk-B6HPULOG.js} +3 -3
- package/dist/{chunk-V766TMSY.js → chunk-BBLXVKW2.js} +4 -4
- package/dist/{chunk-PPEN3N44.js → chunk-BQVB563P.js} +6 -61
- package/dist/{chunk-7THCN7FJ.js → chunk-BUNRL7QV.js} +2 -2
- package/dist/{chunk-CHHS7WT2.js → chunk-C664L36M.js} +2 -2
- package/dist/{chunk-TWRDOVN4.js → chunk-CKR43BBJ.js} +1 -1
- package/dist/{chunk-6RKEHEW6.js → chunk-CTBNVQND.js} +10 -10
- package/dist/{chunk-OEXJ7AJO.js → chunk-CUQOWRYT.js} +1 -1
- package/dist/{chunk-7O4ZTJYY.js → chunk-CVIJBTGE.js} +6 -6
- package/dist/{chunk-PPYNBRU6.js → chunk-D3PHTY54.js} +3 -3
- package/dist/{chunk-Q3GYEEOM.js → chunk-EJYLQNMC.js} +1 -1
- package/dist/{chunk-4Q5J3HRJ.js → chunk-F5C6XZZ7.js} +4 -4
- package/dist/{chunk-CW34RKBV.js → chunk-FAL7WRMM.js} +3 -3
- package/dist/{chunk-PH4LJXTG.js → chunk-FEP7FXBP.js} +3 -3
- package/dist/{chunk-IC7LNHAX.js → chunk-FLBMCN45.js} +6 -6
- package/dist/{chunk-GKXEA6IW.js → chunk-FNT4VWXV.js} +1 -1
- package/dist/{chunk-27CV6IXW.js → chunk-GAYUSL24.js} +1 -1
- package/dist/{chunk-4WG5XTKS.js → chunk-GX3QCU32.js} +6 -6
- package/dist/{chunk-I5XLH7L3.js → chunk-H6YES2DS.js} +5 -5
- package/dist/{chunk-KK7JA5JP.js → chunk-H7B6LLP4.js} +9 -6
- package/dist/{chunk-H5TODUJ3.js → chunk-I7LP4DKM.js} +14 -1
- package/dist/{chunk-FU33PDFG.js → chunk-IKX4X4LJ.js} +3 -3
- package/dist/{chunk-S5B3LKOP.js → chunk-JBWEGNKE.js} +3 -3
- package/dist/{chunk-ZETS7HPG.js → chunk-K5H4YAMZ.js} +10 -10
- package/dist/{chunk-NGWG2CHI.js → chunk-KOEQIRDA.js} +1 -1
- package/dist/{chunk-TSXTMJQH.js → chunk-KWDQI7TI.js} +4 -4
- package/dist/{chunk-VAT53KQR.js → chunk-LWY2U7NZ.js} +4 -4
- package/dist/{chunk-JQS5YQQZ.js → chunk-M2PLZ5V3.js} +5 -5
- package/dist/{chunk-CJL7IMWO.js → chunk-MG5WFAND.js} +1 -1
- package/dist/{chunk-BZLG63YR.js → chunk-MTG3JLMP.js} +4 -4
- package/dist/{chunk-LC2A3GBN.js → chunk-NJSCVQ6S.js} +2 -2
- package/dist/{chunk-7ELMLTD7.js → chunk-NPMVVR6I.js} +2 -2
- package/dist/{chunk-5LWC7PSM.js → chunk-OP2ZDOBR.js} +5 -5
- package/dist/{chunk-RZRFHCAG.js → chunk-P2H6TDL4.js} +1 -1
- package/dist/{chunk-3CYXPFGA.js → chunk-PZLNBKMS.js} +5 -5
- package/dist/{chunk-BVN3WPDZ.js → chunk-Q64D24NF.js} +2 -2
- package/dist/{chunk-PPW3K5DR.js → chunk-QASBFNVD.js} +2 -2
- package/dist/{chunk-QXLV3CT6.js → chunk-QO6SWGLH.js} +2 -2
- package/dist/{chunk-Z3WNBZG6.js → chunk-QQ24SUBD.js} +3 -3
- package/dist/{chunk-4B6USDD3.js → chunk-R4BBSIUK.js} +2 -2
- package/dist/{chunk-32R6ESWY.js → chunk-RMUKFMT3.js} +1 -1
- package/dist/{chunk-4NCIAMPN.js → chunk-RPW7LX2L.js} +3 -3
- package/dist/{chunk-LQQWATPA.js → chunk-SAISSZZA.js} +6 -6
- package/dist/{chunk-YDQ2KQOH.js → chunk-SMBFZFVN.js} +8 -8
- package/dist/{chunk-EQZKJXHE.js → chunk-T5N42XDU.js} +1 -1
- package/dist/{chunk-6FMHWS6M.js → chunk-TOUMNM7M.js} +6 -6
- package/dist/{chunk-3WEWYRLQ.js → chunk-TUQ6R6DD.js} +4 -4
- package/dist/{chunk-32MHL5HC.js → chunk-UJ6UCGY4.js} +4 -4
- package/dist/{chunk-R7BP6ZEW.js → chunk-UKCCVMI2.js} +1 -1
- package/dist/{chunk-XUHDUD34.js → chunk-UNXVORET.js} +20 -13
- package/dist/{chunk-4QJUMXZS.js → chunk-UXVCDVPL.js} +1 -1
- package/dist/{chunk-PCRLVQW3.js → chunk-VIR7SCIQ.js} +5 -5
- package/dist/chunk-WCSPOQ5W.js +121 -0
- package/dist/{chunk-SDMGCRO3.js → chunk-WELDACYF.js} +1 -1
- package/dist/{chunk-BWSAVEMV.js → chunk-WLXXEFHA.js} +31 -21
- package/dist/{chunk-GB5E3JHR.js → chunk-WZZHWX7Q.js} +5 -5
- package/dist/{chunk-RQGMDAHY.js → chunk-X4UWBBFI.js} +3 -3
- package/dist/{chunk-DGZGCKDA.js → chunk-XSUNHOAP.js} +4 -4
- package/dist/{chunk-DMY2J2MY.js → chunk-XWVEAAZO.js} +3 -3
- package/dist/{chunk-PBM565KU.js → chunk-YQVZQM53.js} +6 -6
- package/dist/{chunk-ZR7ODRKY.js → chunk-ZGYLMVNB.js} +2 -2
- package/dist/{codex-app-cards-switch-7XA2J7MU.js → codex-app-cards-switch-45UK7FRY.js} +11 -11
- package/dist/{codex-card-routing-SWDFV5IG.js → codex-card-routing-7B77ISR2.js} +2 -2
- package/dist/{codex-desktop-launch-7Y2YODZM.js → codex-desktop-launch-DWC7Q5A6.js} +1 -1
- package/dist/{codex-session-launch-5I3NEQRG.js → codex-session-launch-MK2CXFRQ.js} +18 -18
- package/dist/{config-HUULA2T7.js → config-OHLNHWP4.js} +3 -3
- package/dist/{global-upgrade-BTHOIZK5.js → global-upgrade-KKFYAQVO.js} +9 -9
- package/dist/{identity-MVXY2GIK.js → identity-AKGGBW3A.js} +4 -4
- package/dist/{live-capabilities-KCTCX3EI.js → live-capabilities-O6MAYZZS.js} +4 -4
- package/dist/{paths-BVROPWE2.js → paths-5XEJTZAS.js} +3 -3
- package/dist/{reapply-6J22YOVO.js → reapply-VQFRLS3P.js} +28 -28
- package/dist/src/index.js +32 -31
- package/dist/{upgrade-lock-LQQDJAEJ.js → upgrade-lock-6HGNG7RT.js} +4 -4
- package/dist/{usage-LC7XUIV3.js → usage-ATA2A3TZ.js} +3 -3
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoUpdateLock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-A23GIPWY.js";
|
|
4
4
|
import {
|
|
5
5
|
installPackageGlobally,
|
|
6
6
|
npmErrorMessage,
|
|
7
7
|
npmExitedOnPermissionDenied
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IKX4X4LJ.js";
|
|
9
9
|
import {
|
|
10
10
|
writeJsonAtomic
|
|
11
11
|
} from "./chunk-T5I4PKOQ.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CUQOWRYT.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
6
|
} from "./chunk-YPY4YCIZ.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-YU2EUD7O.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CKR43BBJ.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_CONNECTOR_GUIDE,
|
|
15
15
|
CLAUDE_CONNECTOR_STEPS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
CLAUDE_CONNECTOR_URL,
|
|
18
18
|
COWORK_CONNECTOR_LIMIT,
|
|
19
19
|
COWORK_STANDING_INSTRUCTIONS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-I7LP4DKM.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
getMachineId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-A2TAWW5L.js";
|
|
8
8
|
import {
|
|
9
9
|
readControlMode
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JBWEGNKE.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-A23GIPWY.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveGlobalBinary
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IKX4X4LJ.js";
|
|
17
17
|
import {
|
|
18
18
|
getApiKey
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KOEQIRDA.js";
|
|
20
20
|
import {
|
|
21
21
|
readJsonSafe,
|
|
22
22
|
writeFileAtomic,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "./chunk-ZVU6WMMU.js";
|
|
33
33
|
import {
|
|
34
34
|
isRecord
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-I7LP4DKM.js";
|
|
36
36
|
|
|
37
37
|
// src/daemon-lifecycle.ts
|
|
38
38
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MANAGED_CLAUDE_SETTINGS_BY_PLATFORM
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZGYLMVNB.js";
|
|
4
4
|
import {
|
|
5
5
|
declinedAgentsFile,
|
|
6
6
|
readDeclinedAgents
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NJSCVQ6S.js";
|
|
8
8
|
import {
|
|
9
9
|
OPENCODE_HOOK_BINARY,
|
|
10
10
|
openCodeConfigDir,
|
|
11
11
|
openCodePluginArgv,
|
|
12
12
|
openCodePluginFile
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WZZHWX7Q.js";
|
|
14
14
|
import {
|
|
15
15
|
liveCursorGateCoverage
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XSUNHOAP.js";
|
|
17
17
|
import {
|
|
18
18
|
compatibleConfigFile,
|
|
19
19
|
compatibleHookEvents,
|
|
20
20
|
grokHome,
|
|
21
21
|
parseConfigDocument
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OP2ZDOBR.js";
|
|
23
23
|
import {
|
|
24
24
|
DEFAULT_HOOKS_KEY_PATH,
|
|
25
25
|
GEMINI_HOOK_BINARY,
|
|
26
26
|
GEMINI_HOOK_EVENTS,
|
|
27
27
|
hooksAt
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-LWY2U7NZ.js";
|
|
29
29
|
import {
|
|
30
30
|
CODEX_EARLIER_APPROVAL_MATCHERS,
|
|
31
31
|
CODEX_HOOK_BINARY,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
parseHookArgv,
|
|
54
54
|
parseHookCommand,
|
|
55
55
|
supportedClaudeEvents
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-A23GIPWY.js";
|
|
57
57
|
import {
|
|
58
58
|
readRegularJsonFile,
|
|
59
59
|
readRegularTextFile
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
OPENCODE_APPROVAL_EVENT,
|
|
68
68
|
isRecord,
|
|
69
69
|
matcherMatchesEveryCall
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-I7LP4DKM.js";
|
|
71
71
|
|
|
72
72
|
// src/hook-wiring.ts
|
|
73
73
|
import { createHash } from "crypto";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_RULES_PATH,
|
|
3
3
|
canChangeApprovalSettings
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NPMVVR6I.js";
|
|
5
5
|
import {
|
|
6
6
|
callMcpTool
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PZLNBKMS.js";
|
|
8
8
|
import {
|
|
9
9
|
absoluteUrl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QQ24SUBD.js";
|
|
11
11
|
import {
|
|
12
12
|
getBaseUrl
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KOEQIRDA.js";
|
|
14
14
|
import {
|
|
15
15
|
NPX_LATEST_COMMAND
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CKR43BBJ.js";
|
|
17
17
|
import {
|
|
18
18
|
AGENT_STOP_DEFAULT_SECONDS,
|
|
19
19
|
APPROVAL_MODE_META,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
classifyConfirmResponse,
|
|
22
22
|
isAnswerSource,
|
|
23
23
|
roundTripAsk
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-I7LP4DKM.js";
|
|
25
25
|
|
|
26
26
|
// src/reach.ts
|
|
27
27
|
var reachVerdict = (channels) => {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WZZHWX7Q.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeClaudeInstallPath
|
|
6
6
|
} from "./chunk-ROVLRXBI.js";
|
|
7
7
|
import {
|
|
8
8
|
grokHome
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OP2ZDOBR.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeConfigDir,
|
|
12
12
|
clineDataDirectory,
|
|
13
13
|
codexHomeFrom
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-A23GIPWY.js";
|
|
15
15
|
import {
|
|
16
16
|
HOOK_COMPATIBLE_PROFILES
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-I7LP4DKM.js";
|
|
18
18
|
|
|
19
19
|
// src/vscode-config.ts
|
|
20
20
|
import { homedir } from "os";
|
|
@@ -13,16 +13,16 @@ import {
|
|
|
13
13
|
} from "./chunk-G66WIAST.js";
|
|
14
14
|
import {
|
|
15
15
|
keyPrefix
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JBWEGNKE.js";
|
|
17
17
|
import {
|
|
18
18
|
getBaseUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KOEQIRDA.js";
|
|
20
20
|
import {
|
|
21
21
|
NPX_LATEST_COMMAND
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-CKR43BBJ.js";
|
|
23
23
|
import {
|
|
24
24
|
isValidApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-I7LP4DKM.js";
|
|
26
26
|
|
|
27
27
|
// src/cli/login-ui.ts
|
|
28
28
|
import { hostname } from "os";
|
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
toolResultErrorText,
|
|
28
28
|
transcriptTokensIn,
|
|
29
29
|
transcriptUsageRequest
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-GAYUSL24.js";
|
|
31
31
|
import {
|
|
32
32
|
branchFor,
|
|
33
33
|
repoKeyFor
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-WELDACYF.js";
|
|
35
35
|
import {
|
|
36
36
|
cancelQuestion,
|
|
37
37
|
clientErrorKindOf,
|
|
@@ -39,34 +39,34 @@ import {
|
|
|
39
39
|
reportClientError,
|
|
40
40
|
sendNotification,
|
|
41
41
|
waitForAnswer
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-YQVZQM53.js";
|
|
43
43
|
import {
|
|
44
44
|
withRetry
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-PZLNBKMS.js";
|
|
46
46
|
import {
|
|
47
47
|
fetchAsCredential
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-7K6DZPYV.js";
|
|
49
49
|
import {
|
|
50
50
|
getMachineId
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-A2TAWW5L.js";
|
|
52
52
|
import {
|
|
53
53
|
reportedInstallSource
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-46ZIEQGC.js";
|
|
55
55
|
import {
|
|
56
56
|
IDLE_PROMPT_NOTIFICATION,
|
|
57
57
|
NOTIFICATION_PUSH_TYPES,
|
|
58
58
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS,
|
|
59
59
|
canonicalJson,
|
|
60
60
|
claudeConfigDir
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-A23GIPWY.js";
|
|
62
62
|
import {
|
|
63
63
|
compareVersion,
|
|
64
64
|
parseVersion
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-IKX4X4LJ.js";
|
|
66
66
|
import {
|
|
67
67
|
getApiKey,
|
|
68
68
|
getBaseUrl
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-KOEQIRDA.js";
|
|
70
70
|
import {
|
|
71
71
|
writeFileAtomic,
|
|
72
72
|
writeJsonAtomicDurable
|
|
@@ -84,6 +84,7 @@ import {
|
|
|
84
84
|
gateOutputFor,
|
|
85
85
|
isAutoApprove,
|
|
86
86
|
isClaudeWakePrompt,
|
|
87
|
+
isProvenModeResponse,
|
|
87
88
|
isRecord,
|
|
88
89
|
modeStateFromResponse,
|
|
89
90
|
nativeRecord,
|
|
@@ -94,7 +95,7 @@ import {
|
|
|
94
95
|
resolveAutoResolveOrigin,
|
|
95
96
|
resolvePolicy,
|
|
96
97
|
unansweredRefusalReason
|
|
97
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-I7LP4DKM.js";
|
|
98
99
|
|
|
99
100
|
// src/pending.ts
|
|
100
101
|
import { join } from "path";
|
|
@@ -413,7 +414,7 @@ var getPolicy = async (apiKey, expectedVersion, agent, repoAware = false, sessio
|
|
|
413
414
|
if (ttlFresh && !versionStale && !sessionStale) {
|
|
414
415
|
return cached;
|
|
415
416
|
}
|
|
416
|
-
if (!sessionStale && age < STALE_CACHE_MAX_MS) staleCache = cached;
|
|
417
|
+
if (!sessionStale && age < STALE_CACHE_MAX_MS) staleCache = versionStale ? { ...cached, knownSuperseded: true } : cached;
|
|
417
418
|
} catch {
|
|
418
419
|
}
|
|
419
420
|
}
|
|
@@ -503,7 +504,12 @@ var fetchModeState = async (apiKey, sessionId, reuseWithinMs = 0, signal) => {
|
|
|
503
504
|
void reportClientError({ kind: "http_status", code: `mode_http_${response.status}` });
|
|
504
505
|
return degradedFallback(apiKey, response.status === 401 || response.status === 403);
|
|
505
506
|
}
|
|
506
|
-
const
|
|
507
|
+
const body = await response.json();
|
|
508
|
+
if (!isProvenModeResponse(body)) {
|
|
509
|
+
void reportClientError({ kind: "invalid_response", code: "mode_response_unproven" });
|
|
510
|
+
return degradedFallback(apiKey);
|
|
511
|
+
}
|
|
512
|
+
const state = modeStateFromResponse(body);
|
|
507
513
|
writeLastGoodMode(apiKey, state, sessionId);
|
|
508
514
|
return state;
|
|
509
515
|
} catch (error) {
|
|
@@ -1369,6 +1375,7 @@ var handlePostToolUse = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
|
1369
1375
|
event: isError ? "tool_error" : "tool_complete",
|
|
1370
1376
|
occurredAt,
|
|
1371
1377
|
toolUseId: input.tool_use_id,
|
|
1378
|
+
toolName: input.tool_name,
|
|
1372
1379
|
agentType: agent.type,
|
|
1373
1380
|
agentName: `${agent.label} - ${projectName}`,
|
|
1374
1381
|
action,
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
configFailureKind,
|
|
5
5
|
retryAgentCommand,
|
|
6
6
|
writeSetupConfigFile
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-B6HPULOG.js";
|
|
8
8
|
import {
|
|
9
9
|
MCP_BRIDGE_BINARY
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5FJPEDMZ.js";
|
|
11
11
|
import {
|
|
12
12
|
KEY_FILE_MODE
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JBWEGNKE.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-A23GIPWY.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveGlobalBinary
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-IKX4X4LJ.js";
|
|
39
39
|
import {
|
|
40
40
|
readJsonSafe,
|
|
41
41
|
writeFileAtomic,
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UNNAMED_ACTION
|
|
3
|
+
} from "./chunk-GAYUSL24.js";
|
|
4
|
+
import {
|
|
5
|
+
askUser,
|
|
6
|
+
isAwayPaused,
|
|
7
|
+
isLocalQuestionHandoff,
|
|
8
|
+
unavailableQuestionUnlessRefused,
|
|
9
|
+
waitForQuestion
|
|
10
|
+
} from "./chunk-YQVZQM53.js";
|
|
11
|
+
import {
|
|
12
|
+
getMachineId
|
|
13
|
+
} from "./chunk-A2TAWW5L.js";
|
|
14
|
+
import {
|
|
15
|
+
hookWaitClamped,
|
|
16
|
+
hookWaitDeadline,
|
|
17
|
+
scopeBreachReasonOf
|
|
18
|
+
} from "./chunk-I7LP4DKM.js";
|
|
19
|
+
|
|
20
|
+
// src/pushed-question.ts
|
|
21
|
+
var scopeQuestionOf = (verdict) => {
|
|
22
|
+
const reason = scopeBreachReasonOf(verdict);
|
|
23
|
+
return reason !== void 0 && verdict.kind === "gate" ? { reason, path: verdict.scopePath } : void 0;
|
|
24
|
+
};
|
|
25
|
+
var pushQuestionAndWait = async (apiKey, question, wait) => {
|
|
26
|
+
const creating = askUser(apiKey, {
|
|
27
|
+
question: `Allow ${question.description || UNNAMED_ACTION}?`,
|
|
28
|
+
type: "confirm",
|
|
29
|
+
context: `Agent wants to run this in ${question.projectName}`,
|
|
30
|
+
agentName: question.agentName,
|
|
31
|
+
sessionId: question.sessionId,
|
|
32
|
+
machineId: getMachineId(),
|
|
33
|
+
toolName: question.toolName,
|
|
34
|
+
toolTarget: question.toolTarget,
|
|
35
|
+
...question.decision
|
|
36
|
+
});
|
|
37
|
+
const created = await (wait.askFailure === "wait_as_unavailable" ? creating.catch(unavailableQuestionUnlessRefused) : creating);
|
|
38
|
+
wait.onQuestionCreated?.(created.correlationId);
|
|
39
|
+
const now = Date.now();
|
|
40
|
+
const deadline = hookWaitDeadline(wait.startMs, wait.waitSeconds, wait.agent, now);
|
|
41
|
+
const clampCut = hookWaitClamped(wait.startMs, wait.waitSeconds, wait.agent, now);
|
|
42
|
+
const answer = await waitForQuestion(apiKey, created, deadline, wait.pollIntervalMs);
|
|
43
|
+
return {
|
|
44
|
+
answer,
|
|
45
|
+
localHandoff: !answer.answered && isLocalQuestionHandoff(created),
|
|
46
|
+
clampCut,
|
|
47
|
+
paused: isAwayPaused(created),
|
|
48
|
+
askStatus: created.status,
|
|
49
|
+
noDevices: created.noDevices === true
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// src/agent-hook-input.ts
|
|
54
|
+
var CODEX_TEXT_FIELDS = [
|
|
55
|
+
"hook_event_name",
|
|
56
|
+
"session_id",
|
|
57
|
+
"turn_id",
|
|
58
|
+
"transcript_path",
|
|
59
|
+
"cwd",
|
|
60
|
+
"tool_name",
|
|
61
|
+
"tool_use_id",
|
|
62
|
+
"prompt",
|
|
63
|
+
"source",
|
|
64
|
+
"reason",
|
|
65
|
+
"permission_mode",
|
|
66
|
+
"trigger",
|
|
67
|
+
"agent_id",
|
|
68
|
+
"agent_type",
|
|
69
|
+
"last_assistant_message"
|
|
70
|
+
];
|
|
71
|
+
var GEMINI_TEXT_FIELDS = [
|
|
72
|
+
"hook_event_name",
|
|
73
|
+
"session_id",
|
|
74
|
+
"cwd",
|
|
75
|
+
"transcript_path",
|
|
76
|
+
"tool_name",
|
|
77
|
+
"prompt",
|
|
78
|
+
"prompt_response",
|
|
79
|
+
"reason"
|
|
80
|
+
];
|
|
81
|
+
var OPENCODE_TEXT_FIELDS = [
|
|
82
|
+
"hook_event_name",
|
|
83
|
+
"session_id",
|
|
84
|
+
"cwd",
|
|
85
|
+
"tool_name",
|
|
86
|
+
"prompt",
|
|
87
|
+
"permission_id",
|
|
88
|
+
"permission_type",
|
|
89
|
+
"title"
|
|
90
|
+
];
|
|
91
|
+
var MCP_CONTEXT_TEXT_FIELDS = ["server_name", "tool_name"];
|
|
92
|
+
var isInputRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
93
|
+
var withoutNullFields = (record) => Object.fromEntries(Object.entries(record).filter(([, value]) => value !== null));
|
|
94
|
+
var FIELDS_THE_GATE_DECIDES_FROM = ["hook_event_name", "tool_name", "session_id", "cwd"];
|
|
95
|
+
var withoutUnreadableLabels = (record, textFields) => Object.fromEntries(Object.entries(record).filter(([field, value]) => FIELDS_THE_GATE_DECIDES_FROM.includes(field) || !textFields.includes(field) || typeof value === "string"));
|
|
96
|
+
var isTextWhereSent = (record, fields) => fields.every((field) => record[field] === void 0 || typeof record[field] === "string");
|
|
97
|
+
var isRecordWhereSent = (value) => value === void 0 || isInputRecord(value);
|
|
98
|
+
var withReadableMcpContext = ({ mcp_context: context, ...record }) => {
|
|
99
|
+
if (!isInputRecord(context)) return record;
|
|
100
|
+
const present = withoutNullFields(context);
|
|
101
|
+
return isTextWhereSent(present, MCP_CONTEXT_TEXT_FIELDS) ? { ...record, mcp_context: present } : record;
|
|
102
|
+
};
|
|
103
|
+
var isCodexHookInput = (value) => isTextWhereSent(value, CODEX_TEXT_FIELDS) && isRecordWhereSent(value.tool_input);
|
|
104
|
+
var isGeminiHookInput = (value) => isTextWhereSent(value, GEMINI_TEXT_FIELDS) && isRecordWhereSent(value.tool_input);
|
|
105
|
+
var isOpenCodeHookInput = (value) => isTextWhereSent(value, OPENCODE_TEXT_FIELDS) && isRecordWhereSent(value.tool_input);
|
|
106
|
+
var hookInputParser = (textFields, isHookInput, withReadableParts = (record) => record) => (value) => {
|
|
107
|
+
if (!isInputRecord(value)) return null;
|
|
108
|
+
const readable = withReadableParts(withoutUnreadableLabels(withoutNullFields(value), textFields));
|
|
109
|
+
return isHookInput(readable) ? readable : null;
|
|
110
|
+
};
|
|
111
|
+
var parseCodexHookInput = hookInputParser(CODEX_TEXT_FIELDS, isCodexHookInput);
|
|
112
|
+
var parseGeminiHookInput = hookInputParser(GEMINI_TEXT_FIELDS, isGeminiHookInput, withReadableMcpContext);
|
|
113
|
+
var parseOpenCodeHookInput = hookInputParser(OPENCODE_TEXT_FIELDS, isOpenCodeHookInput);
|
|
114
|
+
|
|
115
|
+
export {
|
|
116
|
+
scopeQuestionOf,
|
|
117
|
+
pushQuestionAndWait,
|
|
118
|
+
parseCodexHookInput,
|
|
119
|
+
parseGeminiHookInput,
|
|
120
|
+
parseOpenCodeHookInput
|
|
121
|
+
};
|
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
import {
|
|
2
2
|
claudeSettingsLocationFor,
|
|
3
3
|
readClaudePermissionRules
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZGYLMVNB.js";
|
|
5
5
|
import {
|
|
6
6
|
askAgentQuestions,
|
|
7
7
|
defersToNativeMode,
|
|
8
8
|
outcomeOfFailedAsk,
|
|
9
|
-
reportMachineDenial,
|
|
10
9
|
storedWaitDeadline
|
|
11
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BQVB563P.js";
|
|
11
|
+
import {
|
|
12
|
+
reportMachineDenial
|
|
13
|
+
} from "./chunk-5UIRDDJN.js";
|
|
12
14
|
import {
|
|
13
15
|
isGatingMoment,
|
|
14
16
|
recordKeylessMoment
|
|
15
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-UXVCDVPL.js";
|
|
16
18
|
import {
|
|
17
19
|
isAdmitted,
|
|
18
20
|
readAdmissionRules
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-H7B6LLP4.js";
|
|
20
22
|
import {
|
|
21
23
|
isDeferAnswer,
|
|
22
24
|
oncePerSession
|
|
23
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-MG5WFAND.js";
|
|
24
26
|
import {
|
|
25
27
|
activeHookSource,
|
|
26
28
|
activeIdentity,
|
|
27
29
|
namedSource
|
|
28
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-OP2ZDOBR.js";
|
|
29
31
|
import {
|
|
30
32
|
DEFAULT_SESSION,
|
|
31
33
|
approvalAwaitingRetry,
|
|
@@ -44,7 +46,7 @@ import {
|
|
|
44
46
|
settleQuestionsForToolUse,
|
|
45
47
|
sweepFilesOlderThan,
|
|
46
48
|
userScope
|
|
47
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-UNXVORET.js";
|
|
48
50
|
import {
|
|
49
51
|
UNNAMED_ACTION,
|
|
50
52
|
deriveAction,
|
|
@@ -55,12 +57,12 @@ import {
|
|
|
55
57
|
patchDeletesFiles,
|
|
56
58
|
permissionDeniedAction,
|
|
57
59
|
scopePathFor
|
|
58
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-GAYUSL24.js";
|
|
59
61
|
import {
|
|
60
62
|
branchFor,
|
|
61
63
|
repoKeyFor,
|
|
62
64
|
repositoryScopeFor
|
|
63
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-WELDACYF.js";
|
|
64
66
|
import {
|
|
65
67
|
askUser,
|
|
66
68
|
cancelQuestion,
|
|
@@ -77,20 +79,20 @@ import {
|
|
|
77
79
|
waitForQuestion,
|
|
78
80
|
waitsForThePhone,
|
|
79
81
|
withdrawQuestion
|
|
80
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-YQVZQM53.js";
|
|
81
83
|
import {
|
|
82
84
|
getMachineId
|
|
83
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-A2TAWW5L.js";
|
|
84
86
|
import {
|
|
85
87
|
getApiKey,
|
|
86
88
|
getBaseUrl
|
|
87
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-KOEQIRDA.js";
|
|
88
90
|
import {
|
|
89
91
|
writeFileAtomic
|
|
90
92
|
} from "./chunk-T5I4PKOQ.js";
|
|
91
93
|
import {
|
|
92
94
|
NPX_LATEST_COMMAND
|
|
93
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-CKR43BBJ.js";
|
|
94
96
|
import {
|
|
95
97
|
AGENT_QUESTION_STRATEGY,
|
|
96
98
|
AGENT_QUESTION_TOOL,
|
|
@@ -131,6 +133,7 @@ import {
|
|
|
131
133
|
hasNativeApprovalPrompt,
|
|
132
134
|
hookCompatibleProfileBySource,
|
|
133
135
|
hookHoldWindowMs,
|
|
136
|
+
hookMaxWaitSeconds,
|
|
134
137
|
hookWaitClamped,
|
|
135
138
|
hookWaitDeadline,
|
|
136
139
|
hookWritePath,
|
|
@@ -152,8 +155,9 @@ import {
|
|
|
152
155
|
terminalLiveWait,
|
|
153
156
|
terminalStaysLiveForTheCall,
|
|
154
157
|
timeoutActionWithoutLocalPrompt,
|
|
155
|
-
unansweredRefusalReason
|
|
156
|
-
|
|
158
|
+
unansweredRefusalReason,
|
|
159
|
+
unapprovedScopeReason
|
|
160
|
+
} from "./chunk-I7LP4DKM.js";
|
|
157
161
|
|
|
158
162
|
// src/terminal-answer-watch.ts
|
|
159
163
|
import { closeSync, openSync, readSync, statSync } from "fs";
|
|
@@ -551,6 +555,9 @@ var dispatchModeHandler = async (apiKey, input, toolPolicy, machineId, trainingC
|
|
|
551
555
|
const toolTarget = deriveToolTarget(input.tool_name, input.tool_input);
|
|
552
556
|
const ownPrompt = hasItsOwnApprovalPrompt(ACTIVE_SOURCE);
|
|
553
557
|
const agentPromptFollows = ownPrompt && !isCursorHookPayload(input);
|
|
558
|
+
const scopeQuestionHasNoPrompt = scopeReason !== void 0 && !agentPromptFollows;
|
|
559
|
+
const deliveredWithoutAPrompt = !ownPrompt || scopeQuestionHasNoPrompt;
|
|
560
|
+
const scopeQuestionFromCursor = scopeReason !== void 0 && isCursorHookPayload(input);
|
|
554
561
|
const intent = readLastPrompt(sessionId ?? DEFAULT_SESSION) ?? (input.transcript_path ? readLastUserPrompt(input.transcript_path) : void 0);
|
|
555
562
|
const decision = {
|
|
556
563
|
toolPath: hookWritePath(input.tool_name, input.tool_input),
|
|
@@ -568,7 +575,7 @@ var dispatchModeHandler = async (apiKey, input, toolPolicy, machineId, trainingC
|
|
|
568
575
|
// creates a fresh decision exactly as before.
|
|
569
576
|
toolUseId: input.tool_use_id,
|
|
570
577
|
sessionToolAware: true,
|
|
571
|
-
...
|
|
578
|
+
...deliveredWithoutAPrompt ? { localSurfaceAvailable: false } : {},
|
|
572
579
|
permissionMode: input.permission_mode
|
|
573
580
|
};
|
|
574
581
|
const signals = {};
|
|
@@ -587,29 +594,32 @@ var dispatchModeHandler = async (apiKey, input, toolPolicy, machineId, trainingC
|
|
|
587
594
|
announceWait
|
|
588
595
|
};
|
|
589
596
|
const runHandler = () => {
|
|
590
|
-
const mode =
|
|
597
|
+
const mode = deliveredWithoutAPrompt ? approvalModeWithoutLocalPrompt(toolPolicy.mode) : toolPolicy.mode;
|
|
591
598
|
if (terminalLive && pushesToThePhone(mode)) {
|
|
592
599
|
return handleTerminalLive(apiKey, input, description, projectName, { ...toolPolicy, mode }, terminalLive.holdBudgetSeconds, machineId, toolTarget, decision, signals);
|
|
593
600
|
}
|
|
594
601
|
switch (mode) {
|
|
595
602
|
case "push_only":
|
|
596
|
-
return handlePushOnly(apiKey, permissionAsk, toolPolicy.timeoutSeconds,
|
|
603
|
+
return scopeQuestionFromCursor ? handlePushOnly(apiKey, permissionAsk, cursorScopeWaitSeconds(toolPolicy), CURSOR_SCOPE_TIMEOUT_ACTION, signals) : handlePushOnly(apiKey, permissionAsk, toolPolicy.timeoutSeconds, deliveredWithoutAPrompt ? timeoutActionWithoutLocalPrompt(toolPolicy) : toolPolicy.timeoutAction, signals);
|
|
597
604
|
case "terminal_only":
|
|
598
605
|
return Promise.resolve(handleTerminalOnly());
|
|
599
606
|
case "push_first":
|
|
600
607
|
return handlePushFirst(apiKey, permissionAsk, toolPolicy.pushFirstSeconds, signals);
|
|
601
608
|
case "notify_only":
|
|
602
|
-
return handleNotifyOnly(apiKey, description, projectName, sessionId, machineId);
|
|
609
|
+
return scopeQuestionHasNoPrompt ? Promise.resolve(deny(unapprovedScopeReason(scopeReason))) : handleNotifyOnly(apiKey, description, projectName, sessionId, machineId);
|
|
603
610
|
default:
|
|
604
611
|
return handlePushFirst(apiKey, permissionAsk, toolPolicy.pushFirstSeconds, signals);
|
|
605
612
|
}
|
|
606
613
|
};
|
|
607
|
-
const
|
|
614
|
+
const handled = await runHandler();
|
|
615
|
+
const result = scopeQuestionHasNoPrompt && handled?.hookSpecificOutput?.permissionDecision === "ask" ? deny(unapprovedScopeReason(scopeReason)) : handled;
|
|
608
616
|
if (trainingConsent && signals.humanDecision) {
|
|
609
617
|
emitDecisionEpisode(apiKey, input, toolPolicy, machineId, toolTarget, decision, result);
|
|
610
618
|
}
|
|
611
619
|
return result;
|
|
612
620
|
};
|
|
621
|
+
var CURSOR_SCOPE_TIMEOUT_ACTION = "escalate";
|
|
622
|
+
var cursorScopeWaitSeconds = ({ timeoutSeconds, timeoutAction }) => Math.min(effectiveWaitSeconds(timeoutAction, timeoutSeconds, "cursor"), hookMaxWaitSeconds("cursor"));
|
|
613
623
|
var hasItsOwnApprovalPrompt = (source) => source === null || hasNativeApprovalPrompt(source, "PreToolUse");
|
|
614
624
|
var phoneWaitHandoff = (source, waitSeconds) => {
|
|
615
625
|
if (waitSeconds <= 0) return "Waiting for your answer.";
|