pushary 1.9.175 → 1.9.177
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 +10 -0
- package/dist/{api-MMBCOOHP.js → api-MOK62OPO.js} +11 -11
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +28 -28
- package/dist/bin/pushary-bell.js +12 -12
- package/dist/bin/pushary-calls.js +15 -15
- package/dist/bin/pushary-claude.js +27 -27
- package/dist/bin/pushary-clean.js +38 -38
- package/dist/bin/pushary-codex-bridge.js +23 -23
- package/dist/bin/pushary-codex-hook.js +81 -40
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +16 -16
- package/dist/bin/pushary-connect.js +34 -34
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +45 -45
- package/dist/bin/pushary-disconnect.js +29 -29
- package/dist/bin/pushary-display-hook.js +15 -1
- package/dist/bin/pushary-doctor.js +46 -46
- package/dist/bin/pushary-elicitation-hook.js +28 -28
- package/dist/bin/pushary-gemini-bridge.js +18 -18
- package/dist/bin/pushary-gemini-hook.js +32 -32
- package/dist/bin/pushary-hook.js +36 -36
- package/dist/bin/pushary-login.js +22 -22
- package/dist/bin/pushary-logout.js +29 -29
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +16 -16
- package/dist/bin/pushary-notification-hook.js +27 -27
- package/dist/bin/pushary-opencode-hook.js +33 -33
- package/dist/bin/pushary-permission-denied-hook.js +36 -36
- package/dist/bin/pushary-permission-hook.js +36 -36
- package/dist/bin/pushary-post-hook.js +28 -28
- package/dist/bin/pushary-prompt-hook.js +27 -27
- package/dist/bin/pushary-session-end-hook.js +27 -27
- package/dist/bin/pushary-session-start-hook.js +38 -38
- package/dist/bin/pushary-sessions.js +14 -14
- package/dist/bin/pushary-setup.js +54 -54
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +35 -35
- package/dist/bin/pushary-stop-hook.js +27 -27
- package/dist/bin/pushary-stopfailure-hook.js +27 -27
- package/dist/bin/pushary-suggestions.js +16 -16
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +25 -25
- package/dist/bin/pushary-upgrade.js +43 -43
- package/dist/bin/pushary-wait.js +16 -16
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-P5AJZMHG.js → chunk-2HK3KVEJ.js} +5 -5
- package/dist/{chunk-77FE2JQB.js → chunk-2HREYLQL.js} +5 -5
- package/dist/{chunk-NW4M5WK6.js → chunk-2MMTYCCV.js} +2 -2
- package/dist/{chunk-TKGSV72S.js → chunk-2O6TO2YW.js} +82 -31
- package/dist/{chunk-5RAMEVL5.js → chunk-2SFXPVAE.js} +1 -1
- package/dist/{chunk-EH7M4CXB.js → chunk-3CWVK6BS.js} +7 -6
- package/dist/{chunk-UNKYMIVH.js → chunk-3DFKZATL.js} +3 -3
- package/dist/{chunk-G74JB53L.js → chunk-3HGR5T4W.js} +4 -4
- package/dist/{chunk-6L5Q4I4V.js → chunk-4PRJDA3J.js} +1 -1
- package/dist/{chunk-B7S5NLZB.js → chunk-4YBTCIIU.js} +5 -5
- package/dist/{chunk-YAP7HQNG.js → chunk-5F2GVH3H.js} +1 -1
- package/dist/{chunk-ACWLYAEM.js → chunk-5OBLFHMG.js} +1 -1
- package/dist/{chunk-GT4GUCCK.js → chunk-5SNBTQOU.js} +6 -6
- package/dist/{chunk-6RAM3F5N.js → chunk-5YUBUJ6F.js} +8 -7
- package/dist/{chunk-WC3JA2Q3.js → chunk-6FFXBHVF.js} +2 -2
- package/dist/{chunk-37EEYMUJ.js → chunk-6HEYIMTE.js} +5 -5
- package/dist/{chunk-VWKCVBDJ.js → chunk-77PUYCLF.js} +12 -12
- package/dist/{chunk-CZQGXJQY.js → chunk-7ZDL4EOA.js} +2 -2
- package/dist/{chunk-3O42YMMA.js → chunk-A4AG42X2.js} +4 -4
- package/dist/{chunk-TVJ4A32Y.js → chunk-AH6FRO37.js} +9 -9
- package/dist/{chunk-GVMPWNPA.js → chunk-AIM5GLBI.js} +4 -4
- package/dist/{chunk-VRY3F35M.js → chunk-AUVB3J6X.js} +7 -7
- package/dist/{chunk-6YR7VLHE.js → chunk-BTOP6AHZ.js} +8 -8
- package/dist/{chunk-6TJ463K6.js → chunk-CEMYK6BM.js} +6 -6
- package/dist/{chunk-3F4UI7DP.js → chunk-CUE6IPNE.js} +4 -4
- package/dist/{chunk-QDF4VGHL.js → chunk-DN5FNT3O.js} +1 -1
- package/dist/{chunk-WXVCXQKB.js → chunk-DOCNSQOB.js} +6 -6
- package/dist/{chunk-F7JATJWH.js → chunk-EHFUVDRM.js} +4 -4
- package/dist/{chunk-S7AT7T7H.js → chunk-EXK47DWS.js} +4 -4
- package/dist/{chunk-AN7252SG.js → chunk-FDB2VMJM.js} +2 -2
- package/dist/{chunk-TDZRZNXX.js → chunk-FLEDJCTE.js} +3 -3
- package/dist/{chunk-RDCP7PVJ.js → chunk-FUSZOEZK.js} +4 -4
- package/dist/{chunk-3HVCLYEA.js → chunk-G2RTHSTU.js} +1 -1
- package/dist/{chunk-I2TMZ2VO.js → chunk-G2T7S5RU.js} +10 -10
- package/dist/{chunk-HB2EJOEM.js → chunk-GCAFTVYG.js} +2 -2
- package/dist/{chunk-GHTQ7IAZ.js → chunk-GOL7TCMO.js} +5 -5
- package/dist/{chunk-DOVLWIA4.js → chunk-HCW3KFL3.js} +2 -2
- package/dist/{chunk-OQVTK7HS.js → chunk-HWBO3QVL.js} +1 -1
- package/dist/{chunk-X4RHTBTI.js → chunk-IIIVVFHC.js} +5 -5
- package/dist/{chunk-SFXASSHE.js → chunk-IR5B5EQI.js} +3 -3
- package/dist/{chunk-H75BEIQN.js → chunk-J3V4CBKZ.js} +1 -1
- package/dist/{chunk-2RILXRZ5.js → chunk-JH6IUXXS.js} +6 -6
- package/dist/{chunk-UEKEMOE7.js → chunk-JLOOLENK.js} +2 -2
- package/dist/{chunk-LYC7OGLM.js → chunk-JWMS3WIN.js} +1 -1
- package/dist/{chunk-NIYGTZZ4.js → chunk-KLPOTV4Q.js} +3 -3
- package/dist/{chunk-HLDDLBXI.js → chunk-KSRMVJ2V.js} +5 -5
- package/dist/{chunk-N4AVMDS3.js → chunk-KX2SWWSD.js} +1 -1
- package/dist/{chunk-5DEG6XEK.js → chunk-L3R3XAQC.js} +1 -1
- package/dist/{chunk-NGXZD5B2.js → chunk-L7MROSFJ.js} +3 -3
- package/dist/{chunk-Y5IBOWHQ.js → chunk-LAJ62ADY.js} +1 -1
- package/dist/{chunk-CZG2AXJD.js → chunk-LEWVT2A2.js} +1 -1
- package/dist/{chunk-YH6DJA7F.js → chunk-LGKFRWQL.js} +1 -1
- package/dist/{chunk-HQS7MUTB.js → chunk-M7LXGZM6.js} +4 -4
- package/dist/{chunk-YPGLRH6E.js → chunk-MIHH354F.js} +2 -2
- package/dist/{chunk-D3U46VX5.js → chunk-MIRXACOR.js} +1 -1
- package/dist/{chunk-YJWMKS4K.js → chunk-MNWUZ4JH.js} +2 -2
- package/dist/{chunk-WWBOST2M.js → chunk-N7GV4Y5B.js} +2 -2
- package/dist/{chunk-537VC73A.js → chunk-NNWUE7PY.js} +6 -6
- package/dist/{chunk-RIH62UGR.js → chunk-NSR3ZTUJ.js} +3 -3
- package/dist/{chunk-EMRFCGWI.js → chunk-NWO4GVKC.js} +4 -4
- package/dist/{chunk-F66QGIJR.js → chunk-OU4FPSNZ.js} +3 -3
- package/dist/{chunk-MFNSTUPF.js → chunk-QBIALYLY.js} +4 -4
- package/dist/{chunk-PWIHCKC2.js → chunk-QES7CGHR.js} +5 -5
- package/dist/{chunk-YHXH4SDN.js → chunk-QS4IPOAQ.js} +11 -11
- package/dist/{chunk-PYNRQFXB.js → chunk-R2VQ4OKM.js} +1 -1
- package/dist/{chunk-KZ7FPLTR.js → chunk-RQYNZJZ3.js} +1 -1
- package/dist/{chunk-GMNBIURN.js → chunk-RSRWMXEM.js} +3 -3
- package/dist/{chunk-PBPF46MM.js → chunk-SOWF5BU3.js} +4 -4
- package/dist/{chunk-P35JKWDS.js → chunk-SV7PLR6Z.js} +2 -2
- package/dist/{chunk-24W735XB.js → chunk-TIGCU3PF.js} +2 -2
- package/dist/{chunk-DJHPBM5S.js → chunk-UC4DTMPM.js} +9 -0
- package/dist/{chunk-OZBNNBZG.js → chunk-UOM2JOQZ.js} +2 -2
- package/dist/{chunk-EG23IMEU.js → chunk-UYBCGHGQ.js} +3 -3
- package/dist/{chunk-RHOZMBEL.js → chunk-VOPORKYP.js} +1 -1
- package/dist/{chunk-3TGLZAON.js → chunk-W7KAVPQP.js} +1 -1
- package/dist/{chunk-3FMW4G3B.js → chunk-WVU5TTRU.js} +2 -2
- package/dist/{chunk-RX64LJJQ.js → chunk-XJJ4KJF5.js} +3 -3
- package/dist/{chunk-UJKHGU7E.js → chunk-XWG4PSQL.js} +1 -1
- package/dist/{chunk-A3DLOQJ7.js → chunk-ZHVWYX5I.js} +1 -1
- package/dist/{chunk-GC75JZFG.js → chunk-ZRMI7POM.js} +1 -1
- package/dist/{codex-app-cards-switch-2KIZJC4H.js → codex-app-cards-switch-VUX7FUBE.js} +11 -11
- package/dist/{codex-card-routing-WWPQAJ4X.js → codex-card-routing-F6PBOHKA.js} +2 -2
- package/dist/{codex-desktop-launch-H325FPFI.js → codex-desktop-launch-DHE24VP2.js} +1 -1
- package/dist/{codex-session-launch-IRN5OGXZ.js → codex-session-launch-5QMO4UNL.js} +20 -20
- package/dist/{config-IDRTM5J7.js → config-VEUG5WVO.js} +3 -3
- package/dist/{global-upgrade-DX4ZXLZ5.js → global-upgrade-TE6N2LPD.js} +9 -9
- package/dist/{identity-FZSHIS7P.js → identity-RUUBB2GE.js} +4 -4
- package/dist/{live-capabilities-2DIRQWGQ.js → live-capabilities-CATPYBSX.js} +4 -4
- package/dist/{paths-BQORCROG.js → paths-LE4WLG45.js} +3 -3
- package/dist/{reapply-7SA3FKAJ.js → reapply-4BTKZGKT.js} +31 -31
- package/dist/src/index.js +35 -35
- package/dist/{upgrade-lock-TKFFUNHB.js → upgrade-lock-HU2F5X57.js} +4 -4
- package/dist/{usage-XHC7EO7E.js → usage-UMIDTEI3.js} +3 -3
- package/package.json +1 -1
package/dist/bin/pushary-wait.js
CHANGED
|
@@ -2,43 +2,43 @@
|
|
|
2
2
|
import {
|
|
3
3
|
waitResponse,
|
|
4
4
|
waitWindowResponse
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-2SFXPVAE.js";
|
|
6
6
|
import {
|
|
7
7
|
describeWaitLadder
|
|
8
8
|
} from "../chunk-CVWG2N3Y.js";
|
|
9
9
|
import {
|
|
10
10
|
exitOnFailedSettingsRequest
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-AUVB3J6X.js";
|
|
12
|
+
import "../chunk-GCAFTVYG.js";
|
|
13
13
|
import {
|
|
14
14
|
APPROVAL_RULES_PATH,
|
|
15
15
|
PUSH_WINDOW_COMMAND,
|
|
16
16
|
PUSH_WINDOW_RESET_COMMAND
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-UOM2JOQZ.js";
|
|
18
18
|
import {
|
|
19
19
|
createIo
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-4PRJDA3J.js";
|
|
21
21
|
import {
|
|
22
22
|
exitOnHelpFlag
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-ZRMI7POM.js";
|
|
24
24
|
import {
|
|
25
25
|
parseFlags
|
|
26
26
|
} from "../chunk-BZIBNSQE.js";
|
|
27
27
|
import {
|
|
28
28
|
absoluteUrl
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-IR5B5EQI.js";
|
|
30
30
|
import {
|
|
31
31
|
pusharyFetch
|
|
32
|
-
} from "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
32
|
+
} from "../chunk-NSR3ZTUJ.js";
|
|
33
|
+
import "../chunk-L3R3XAQC.js";
|
|
34
|
+
import "../chunk-L7MROSFJ.js";
|
|
35
|
+
import "../chunk-WVU5TTRU.js";
|
|
36
|
+
import "../chunk-N7GV4Y5B.js";
|
|
37
|
+
import "../chunk-SOWF5BU3.js";
|
|
38
38
|
import {
|
|
39
39
|
getApiKey,
|
|
40
40
|
getBaseUrl
|
|
41
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-JWMS3WIN.js";
|
|
42
42
|
import {
|
|
43
43
|
UsageError,
|
|
44
44
|
exitCodeFor
|
|
@@ -47,9 +47,9 @@ import "../chunk-PM2NRK6Y.js";
|
|
|
47
47
|
import {
|
|
48
48
|
EXIT
|
|
49
49
|
} from "../chunk-BG4HHB7E.js";
|
|
50
|
-
import "../chunk-
|
|
50
|
+
import "../chunk-LAJ62ADY.js";
|
|
51
51
|
import "../chunk-UQTQ6HPO.js";
|
|
52
|
-
import "../chunk-
|
|
52
|
+
import "../chunk-UC4DTMPM.js";
|
|
53
53
|
import "../chunk-MLKGABMK.js";
|
|
54
54
|
|
|
55
55
|
// bin/pushary-wait.ts
|
package/dist/bin/pushary.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
installNetworkDefaults
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-NSR3ZTUJ.js";
|
|
5
|
+
import "../chunk-L3R3XAQC.js";
|
|
6
|
+
import "../chunk-N7GV4Y5B.js";
|
|
7
|
+
import "../chunk-SOWF5BU3.js";
|
|
8
|
+
import "../chunk-JWMS3WIN.js";
|
|
9
9
|
import "../chunk-CINBAX5G.js";
|
|
10
10
|
import "../chunk-PM2NRK6Y.js";
|
|
11
11
|
import {
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
LISTED_COMMANDS,
|
|
16
16
|
renderHelp,
|
|
17
17
|
resolveCommandName
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-LAJ62ADY.js";
|
|
19
19
|
import {
|
|
20
20
|
getPackageVersion
|
|
21
21
|
} from "../chunk-UQTQ6HPO.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-UC4DTMPM.js";
|
|
23
23
|
import "../chunk-MLKGABMK.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/runtime.ts
|
|
@@ -18,18 +18,18 @@ import {
|
|
|
18
18
|
settingSnapshot,
|
|
19
19
|
writeHermesSetting,
|
|
20
20
|
writeSetupReceipt
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3HGR5T4W.js";
|
|
22
22
|
import {
|
|
23
23
|
OPENCLAW_MIN_VERSION,
|
|
24
24
|
OPENCLAW_PLUGIN_ID,
|
|
25
25
|
OPENCLAW_PLUGIN_PACKAGE
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-FLEDJCTE.js";
|
|
27
27
|
import {
|
|
28
28
|
retryAgentCommand
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-UYBCGHGQ.js";
|
|
30
30
|
import {
|
|
31
31
|
configFilePath
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-JWMS3WIN.js";
|
|
33
33
|
import {
|
|
34
34
|
readJsonSafe,
|
|
35
35
|
writeJsonAtomic
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
readSetupOutcomeProperties,
|
|
39
39
|
redactSecretsFromContent
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-UC4DTMPM.js";
|
|
41
41
|
|
|
42
42
|
// src/hermes/shell-gate.ts
|
|
43
43
|
var readHermesShellGate = async (launcher) => {
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XJJ4KJF5.js";
|
|
7
7
|
import {
|
|
8
8
|
daemonHasRemoteProof,
|
|
9
9
|
daemonServiceManagerAvailable,
|
|
10
10
|
hasDaemonServiceDefinition,
|
|
11
11
|
readDaemonNeedsLogin,
|
|
12
12
|
readDaemonStatus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5SNBTQOU.js";
|
|
14
14
|
import {
|
|
15
15
|
getMachineId
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-L3R3XAQC.js";
|
|
17
17
|
import {
|
|
18
18
|
readControlMode,
|
|
19
19
|
readKeySource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-L7MROSFJ.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-JWMS3WIN.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
26
|
} from "./chunk-UQTQ6HPO.js";
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
codexHome,
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-N7GV4Y5B.js";
|
|
11
11
|
import {
|
|
12
12
|
resolvePathBinary
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SOWF5BU3.js";
|
|
14
14
|
import {
|
|
15
15
|
getPackageVersion
|
|
16
16
|
} from "./chunk-UQTQ6HPO.js";
|
|
@@ -2,39 +2,39 @@ import {
|
|
|
2
2
|
forgetPhoneApproval,
|
|
3
3
|
rememberPhoneApproval,
|
|
4
4
|
takePhoneApproval
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HCW3KFL3.js";
|
|
6
6
|
import {
|
|
7
7
|
claudeSettingsLocationFor,
|
|
8
8
|
readClaudePermissionRules
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MIHH354F.js";
|
|
10
10
|
import {
|
|
11
11
|
defersToNativeMode
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R2VQ4OKM.js";
|
|
13
13
|
import {
|
|
14
14
|
askAgentQuestions,
|
|
15
15
|
outcomeOfFailedAsk,
|
|
16
16
|
storedWaitDeadline
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5YUBUJ6F.js";
|
|
18
18
|
import {
|
|
19
19
|
reportMachineDenial
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-A4AG42X2.js";
|
|
21
21
|
import {
|
|
22
22
|
isGatingMoment,
|
|
23
23
|
recordKeylessMoment
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5F2GVH3H.js";
|
|
25
25
|
import {
|
|
26
26
|
isAdmitted,
|
|
27
27
|
readAdmissionRules
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-KSRMVJ2V.js";
|
|
29
29
|
import {
|
|
30
30
|
isDeferAnswer,
|
|
31
31
|
oncePerSession
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-VOPORKYP.js";
|
|
33
33
|
import {
|
|
34
34
|
activeHookSource,
|
|
35
35
|
activeIdentity,
|
|
36
36
|
namedSource
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-6HEYIMTE.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-77PUYCLF.js";
|
|
61
61
|
import {
|
|
62
62
|
UNNAMED_ACTION,
|
|
63
63
|
deriveAction,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
patchDeletesFiles,
|
|
69
69
|
permissionDeniedAction,
|
|
70
70
|
scopePathFor
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-MIRXACOR.js";
|
|
72
72
|
import {
|
|
73
73
|
askUser,
|
|
74
74
|
cancelQuestion,
|
|
@@ -85,29 +85,29 @@ import {
|
|
|
85
85
|
waitForQuestion,
|
|
86
86
|
waitsForThePhone,
|
|
87
87
|
withdrawQuestion
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-3CWVK6BS.js";
|
|
89
89
|
import {
|
|
90
90
|
branchFor,
|
|
91
91
|
projectNameFor,
|
|
92
92
|
repoKeyFor,
|
|
93
93
|
repositoryScopeFor
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-LGKFRWQL.js";
|
|
95
95
|
import {
|
|
96
96
|
getMachineId
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-L3R3XAQC.js";
|
|
98
98
|
import {
|
|
99
99
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-N7GV4Y5B.js";
|
|
101
101
|
import {
|
|
102
102
|
getApiKey,
|
|
103
103
|
getBaseUrl
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-JWMS3WIN.js";
|
|
105
105
|
import {
|
|
106
106
|
writeFileAtomic
|
|
107
107
|
} from "./chunk-PM2NRK6Y.js";
|
|
108
108
|
import {
|
|
109
109
|
NPX_LATEST_COMMAND
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-LAJ62ADY.js";
|
|
111
111
|
import {
|
|
112
112
|
AGENT_QUESTION_STRATEGY,
|
|
113
113
|
AGENT_QUESTION_TOOL,
|
|
@@ -142,6 +142,7 @@ import {
|
|
|
142
142
|
claudePreToolUseOutput,
|
|
143
143
|
claudePromptTakesTheCall,
|
|
144
144
|
claudeQuestionAnswers,
|
|
145
|
+
claudeQuestionAskedInBothPlaces,
|
|
145
146
|
claudeStoppedPermissionRequestOutput,
|
|
146
147
|
claudeStoppedPreToolUseOutput,
|
|
147
148
|
denyReasonFrom,
|
|
@@ -180,7 +181,7 @@ import {
|
|
|
180
181
|
timeoutActionWithoutLocalPrompt,
|
|
181
182
|
unansweredRefusalReason,
|
|
182
183
|
unapprovedScopeReason
|
|
183
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-UC4DTMPM.js";
|
|
184
185
|
|
|
185
186
|
// src/terminal-answer-watch.ts
|
|
186
187
|
import { closeSync, openSync, readSync, statSync } from "fs";
|
|
@@ -207,9 +208,11 @@ var messageParts = (line) => {
|
|
|
207
208
|
};
|
|
208
209
|
var isToolUse = (part) => part.type === "tool_use" && typeof part.id === "string" && typeof part.name === "string";
|
|
209
210
|
var isToolResultFor = (toolUseId) => (part) => part.type === "tool_result" && part.tool_use_id === toolUseId;
|
|
211
|
+
var questionsAskedBy = (toolName, toolInput) => toolName === AGENT_QUESTION_TOOL && isRecord(toolInput) ? parseAgentQuestions(toolInput) : void 0;
|
|
212
|
+
var identifyingInputOf = (toolName, toolInput) => questionsAskedBy(toolName, toolInput) ?? toolInput ?? {};
|
|
210
213
|
var matchingToolUseIds = (lines, call) => {
|
|
211
|
-
const wanted = stableJson(call.toolInput);
|
|
212
|
-
return lines.flatMap(messageParts).filter(isToolUse).filter((part) => part.name === call.toolName && stableJson(part.input
|
|
214
|
+
const wanted = stableJson(identifyingInputOf(call.toolName, call.toolInput));
|
|
215
|
+
return lines.flatMap(messageParts).filter(isToolUse).filter((part) => part.name === call.toolName && stableJson(identifyingInputOf(part.name, part.input)) === wanted).map((part) => part.id);
|
|
213
216
|
};
|
|
214
217
|
var toolUseIdOf = (lines, call) => matchingToolUseIds(lines, call).at(-1);
|
|
215
218
|
var toolResultArrived = (lines, toolUseId) => lines.some((line) => messageParts(line).some(isToolResultFor(toolUseId)));
|
|
@@ -693,20 +696,22 @@ var terminalLiveFactsOf = (input) => ({
|
|
|
693
696
|
toolName: input.tool_name
|
|
694
697
|
});
|
|
695
698
|
var preToolUseHandsOff = (input, gateInput, verdict) => claudePromptTakesTheCall(terminalLiveFactsOf(input), gateInput, verdict);
|
|
696
|
-
var
|
|
697
|
-
if (questionHandedToTheTerminal(input.tool_name, modeState)) return void 0;
|
|
698
|
-
const questions = parseAgentQuestions(input.tool_input ?? {});
|
|
699
|
-
if (!questions) return void 0;
|
|
699
|
+
var claudeQuestionAskOf = (input) => {
|
|
700
700
|
const projectName = projectNameFor(input.cwd);
|
|
701
|
-
|
|
702
|
-
const outcome = await askAgentQuestions(apiKey, {
|
|
701
|
+
return {
|
|
703
702
|
toolName: AGENT_QUESTION_TOOL,
|
|
704
703
|
agentName: agentNameIn(projectName),
|
|
705
704
|
projectName,
|
|
706
705
|
sessionId: input.session_id,
|
|
707
|
-
toolUseId: input.tool_use_id
|
|
708
|
-
|
|
709
|
-
|
|
706
|
+
toolUseId: input.tool_use_id
|
|
707
|
+
};
|
|
708
|
+
};
|
|
709
|
+
var claudeQuestionDeadline = () => hookWaitDeadline(START_MS, effectiveWaitSeconds("wait", 0, "claude"), "claude", Date.now());
|
|
710
|
+
var handleAskUserQuestion = async (apiKey, input, modeState) => {
|
|
711
|
+
if (questionHandedToTheTerminal(input.tool_name, modeState)) return void 0;
|
|
712
|
+
const questions = parseAgentQuestions(input.tool_input ?? {});
|
|
713
|
+
if (!questions) return void 0;
|
|
714
|
+
const outcome = await askAgentQuestions(apiKey, { ...claudeQuestionAskOf(input), deadline: claudeQuestionDeadline() }, questions);
|
|
710
715
|
switch (outcome.kind) {
|
|
711
716
|
case "answered":
|
|
712
717
|
return allowWithInput({ ...input.tool_input ?? {}, answers: claudeQuestionAnswers(questions, outcome.answers) });
|
|
@@ -946,6 +951,7 @@ var decidePreToolUse = async (input, canonical) => {
|
|
|
946
951
|
if (verdict.kind === "gate" && verdict.scopeReason && (canonical?.toolInputs.length ?? 0) > 1) return settledAs("denied", deny(SCOPE_BATCH_REASON));
|
|
947
952
|
if (agentQuestionStrategy(ACTIVE_SOURCE, "PreToolUse", input.tool_name) === AGENT_QUESTION_STRATEGY.native) return settledAs("terminal_only", void 0);
|
|
948
953
|
if (input.tool_name === "AskUserQuestion") {
|
|
954
|
+
if (claudeQuestionAskedInBothPlaces(terminalLiveFactsOf(input))) return settledAs("terminal_only", void 0);
|
|
949
955
|
return settledAs("asked", await handleAskUserQuestion(apiKey, input, modeState));
|
|
950
956
|
}
|
|
951
957
|
if (isApprovedOnlyAtPermissionRequest(ACTIVE_SOURCE, input.tool_name)) return settledAs("native_mode", void 0);
|
|
@@ -1024,10 +1030,54 @@ var answerThePlanBesideTheDialog = async (apiKey, input) => {
|
|
|
1024
1030
|
}
|
|
1025
1031
|
return permissionRequestPlanOutput(first, toolInput);
|
|
1026
1032
|
};
|
|
1033
|
+
var questionDeadlineBesideTheDialog = (holdBudgetSeconds) => holdBudgetSeconds === void 0 ? claudeQuestionDeadline() : Math.min(claudeQuestionDeadline(), START_MS + hookHoldWindowMs("claude", holdBudgetSeconds));
|
|
1034
|
+
var dialogAnswerFromThePhone = (input, questions, outcome) => outcome.kind === "answered" ? permReqAllow({ ...input.tool_input ?? {}, answers: claudeQuestionAnswers(questions, outcome.answers) }) : void 0;
|
|
1035
|
+
var DIALOG_CLOSING_SIGNALS = ["SIGTERM", "SIGHUP", "SIGINT"];
|
|
1036
|
+
var DIALOG_CLOSE_WITHDRAWAL_BACKSTOP_MS = 3e3;
|
|
1037
|
+
var withdrawWhenTheDialogCloses = (apiKey, stop, openPhoneQuestion) => {
|
|
1038
|
+
const onClose = () => {
|
|
1039
|
+
stop.abort();
|
|
1040
|
+
setTimeout(() => process.exit(0), DIALOG_CLOSE_WITHDRAWAL_BACKSTOP_MS).unref();
|
|
1041
|
+
void openPhoneQuestion().then((open) => open === void 0 ? void 0 : withdrawQuestion(apiKey, open)).catch(() => void 0).finally(() => process.exit(0));
|
|
1042
|
+
};
|
|
1043
|
+
for (const signal of DIALOG_CLOSING_SIGNALS) process.once(signal, onClose);
|
|
1044
|
+
return () => {
|
|
1045
|
+
for (const signal of DIALOG_CLOSING_SIGNALS) process.off(signal, onClose);
|
|
1046
|
+
};
|
|
1047
|
+
};
|
|
1048
|
+
var askClaudeQuestionBesideTheDialog = async (apiKey, input, modeState, holdBudgetSeconds) => {
|
|
1049
|
+
if (questionHandedToTheTerminal(input.tool_name, modeState)) return void 0;
|
|
1050
|
+
const questions = parseAgentQuestions(input.tool_input ?? {});
|
|
1051
|
+
if (!questions) return void 0;
|
|
1052
|
+
const stop = new AbortController();
|
|
1053
|
+
const asked = [];
|
|
1054
|
+
const terminal = terminalAnswered(input, stop.signal);
|
|
1055
|
+
const phone = askAgentQuestions(apiKey, {
|
|
1056
|
+
...claudeQuestionAskOf(input),
|
|
1057
|
+
deadline: questionDeadlineBesideTheDialog(holdBudgetSeconds),
|
|
1058
|
+
signal: stop.signal,
|
|
1059
|
+
onQuestionCreated: (correlationId) => {
|
|
1060
|
+
asked.push(correlationId);
|
|
1061
|
+
}
|
|
1062
|
+
}, questions);
|
|
1063
|
+
const stopWatchingTheDialog = withdrawWhenTheDialogCloses(apiKey, stop, () => phone.then(() => asked.at(-1), () => asked.at(-1)));
|
|
1064
|
+
try {
|
|
1065
|
+
const first = await Promise.race([phone, terminal]).finally(() => stop.abort());
|
|
1066
|
+
if (first !== TERMINAL_ANSWERED) return dialogAnswerFromThePhone(input, questions, first);
|
|
1067
|
+
await phone;
|
|
1068
|
+
const openOnThePhone = asked.at(-1);
|
|
1069
|
+
if (openOnThePhone !== void 0) await withdrawQuestion(apiKey, openOnThePhone);
|
|
1070
|
+
return void 0;
|
|
1071
|
+
} finally {
|
|
1072
|
+
stopWatchingTheDialog();
|
|
1073
|
+
}
|
|
1074
|
+
};
|
|
1027
1075
|
var handlePermissionRequest = async (input, canonical, holdBudgetSeconds) => {
|
|
1028
1076
|
if (isPusharyOwnOrConnectorTool(input.tool_name)) return permReqAllow();
|
|
1029
1077
|
const claudeRules = claudePermissionRulesFor(input);
|
|
1030
|
-
|
|
1078
|
+
const callFacts = terminalLiveFactsOf(input);
|
|
1079
|
+
const questionBesideTheDialog = claudeQuestionAskedInBothPlaces(callFacts);
|
|
1080
|
+
if (canonical === void 0 && !claudeRulesMayCover(input, claudeRules) && isPermissionRequestOwnedByPreToolUse(ACTIVE_SOURCE, input.tool_name, input.permission_mode, shouldDeferToNativeMode) && !terminalStaysLiveForTheCall(callFacts) && !questionBesideTheDialog) return void 0;
|
|
1031
1081
|
let apiKey;
|
|
1032
1082
|
try {
|
|
1033
1083
|
apiKey = getApiKey();
|
|
@@ -1048,6 +1098,7 @@ var handlePermissionRequest = async (input, canonical, holdBudgetSeconds) => {
|
|
|
1048
1098
|
return permReqDeny(verdict.reason);
|
|
1049
1099
|
}
|
|
1050
1100
|
if (canonical === null) return permReqDeny(UNREADABLE_CALL_REASON);
|
|
1101
|
+
if (questionBesideTheDialog) return await askClaudeQuestionBesideTheDialog(apiKey, input, modeState, holdBudgetSeconds);
|
|
1051
1102
|
if (isMcpCallInClaudeCode(input) && claimMcpHoldHandback(blockedActionFingerprintFor(input))) return void 0;
|
|
1052
1103
|
if (agentQuestionStrategy(ACTIVE_SOURCE, "PermissionRequest", input.tool_name) === AGENT_QUESTION_STRATEGY.native) return void 0;
|
|
1053
1104
|
if (isApprovedOnlyAtPermissionRequest(ACTIVE_SOURCE, input.tool_name)) return await answerThePlanBesideTheDialog(apiKey, input);
|
|
@@ -1055,7 +1106,7 @@ var handlePermissionRequest = async (input, canonical, holdBudgetSeconds) => {
|
|
|
1055
1106
|
const approvedCall = PHONE_APPROVAL_SOURCE ? takePhoneApproval(PHONE_APPROVAL_SOURCE, input) : void 0;
|
|
1056
1107
|
const preToolUseAllowLeftThePrompt = PHONE_APPROVAL_SOURCE !== null && (verdict.kind === "allow" || approvedCall !== void 0);
|
|
1057
1108
|
const handedOff = preToolUseHandsOff(input, gateInput, verdict);
|
|
1058
|
-
const terminalLive = terminalStaysLiveForTheCall(
|
|
1109
|
+
const terminalLive = terminalStaysLiveForTheCall(callFacts);
|
|
1059
1110
|
const scopeQuestion = verdict.kind === "gate" && Boolean(verdict.scopeReason);
|
|
1060
1111
|
const preToolUseRanForTheCall = PRETOOLUSE_HANDLED_TOOLS.has(input.tool_name) && isAdmitted(readAdmissionRules(), "claude", "PreToolUse");
|
|
1061
1112
|
const preToolUseAskedTheScopeQuestion = scopeQuestion && terminalLive && preToolUseRanForTheCall;
|
|
@@ -8,21 +8,21 @@ import {
|
|
|
8
8
|
SubscriptionRequiredError,
|
|
9
9
|
callMcpTool,
|
|
10
10
|
isRetryable
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GOL7TCMO.js";
|
|
12
12
|
import {
|
|
13
13
|
fetchAsCredential
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HWBO3QVL.js";
|
|
15
15
|
import {
|
|
16
16
|
installNetworkDefaults,
|
|
17
17
|
isNetworkFailure
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NSR3ZTUJ.js";
|
|
19
19
|
import {
|
|
20
20
|
clientReportClaims
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-N7GV4Y5B.js";
|
|
22
22
|
import {
|
|
23
23
|
getApiKey,
|
|
24
24
|
getBaseUrl
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-JWMS3WIN.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-UC4DTMPM.js";
|
|
36
36
|
|
|
37
37
|
// src/api.ts
|
|
38
38
|
import { randomUUID } from "crypto";
|
|
@@ -450,6 +450,7 @@ var claimBlockedAction = async (apiKey, request, timeoutMs) => {
|
|
|
450
450
|
};
|
|
451
451
|
|
|
452
452
|
export {
|
|
453
|
+
CLIENT_REPORT_TIMEOUT_MS,
|
|
453
454
|
reportClientError,
|
|
454
455
|
exitAfterClientReports,
|
|
455
456
|
clientErrorKindOf,
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-55L4JSPA.js";
|
|
5
5
|
import {
|
|
6
6
|
fetchAsCredential
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HWBO3QVL.js";
|
|
8
8
|
import {
|
|
9
9
|
getBaseUrl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JWMS3WIN.js";
|
|
11
11
|
import {
|
|
12
12
|
writeJsonAtomicDurable
|
|
13
13
|
} from "./chunk-PM2NRK6Y.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
compressTranscriptRecord,
|
|
16
16
|
redactSecretsFromContent,
|
|
17
17
|
transcriptRecordPlaintext
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UC4DTMPM.js";
|
|
19
19
|
|
|
20
20
|
// src/transcript-recipient-pin.ts
|
|
21
21
|
import { createHash } from "crypto";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
uninstallOpenClawPlugin,
|
|
14
14
|
unsetOpenClawEntry,
|
|
15
15
|
writeOpenClawEntry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FLEDJCTE.js";
|
|
17
17
|
import {
|
|
18
18
|
needsShell
|
|
19
19
|
} from "./chunk-VRNGMRJA.js";
|
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
openClawDirectoriesToLookIn,
|
|
26
26
|
openClawPluginFolder,
|
|
27
27
|
openClawSetupReceiptDirectory
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-N7GV4Y5B.js";
|
|
29
29
|
import {
|
|
30
30
|
resolvePathBinary
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-SOWF5BU3.js";
|
|
32
32
|
import {
|
|
33
33
|
readJsonSafe,
|
|
34
34
|
writeJsonAtomic
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "./chunk-UQTQ6HPO.js";
|
|
40
40
|
import {
|
|
41
41
|
isRecord
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-UC4DTMPM.js";
|
|
43
43
|
|
|
44
44
|
// src/hermes/plugin-payload.ts
|
|
45
45
|
import { createHash } from "crypto";
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
configFailureKind,
|
|
5
5
|
retryAgentCommand,
|
|
6
6
|
writeSetupConfigFile
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UYBCGHGQ.js";
|
|
8
8
|
import {
|
|
9
9
|
MCP_BRIDGE_BINARY
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RSRWMXEM.js";
|
|
11
11
|
import {
|
|
12
12
|
KEY_FILE_MODE
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-L7MROSFJ.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-N7GV4Y5B.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveGlobalBinary
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-SOWF5BU3.js";
|
|
39
39
|
import {
|
|
40
40
|
readJsonSafe,
|
|
41
41
|
writeFileAtomic,
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
} from "./chunk-VRNGMRJA.js";
|
|
5
5
|
import {
|
|
6
6
|
getMachineId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-L3R3XAQC.js";
|
|
8
8
|
import {
|
|
9
9
|
readControlMode
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-L7MROSFJ.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-N7GV4Y5B.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveGlobalBinary
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SOWF5BU3.js";
|
|
17
17
|
import {
|
|
18
18
|
getApiKey
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JWMS3WIN.js";
|
|
20
20
|
import {
|
|
21
21
|
readJsonSafe,
|
|
22
22
|
writeFileAtomic,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "./chunk-UQTQ6HPO.js";
|
|
33
33
|
import {
|
|
34
34
|
isRecord
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-UC4DTMPM.js";
|
|
36
36
|
|
|
37
37
|
// src/daemon-entry-guard.ts
|
|
38
38
|
import { mkdirSync, readFileSync } from "fs";
|