@pushary/agent-hooks 1.9.162 → 1.9.164
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 +11 -0
- package/dist/{api-7NPCSUGY.js → api-D4SZ2E5J.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 +11 -11
- 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 +36 -36
- 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 +6 -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 +17 -17
- 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 +124 -75
- 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-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-QKNHNDOY.js → chunk-2FLJZICI.js} +2 -2
- package/dist/{chunk-GJOHGES6.js → chunk-2J3IIFS3.js} +2 -2
- package/dist/{chunk-PIIKLAFY.js → chunk-2KZZZ4JK.js} +3 -3
- package/dist/{chunk-L44II2WD.js → chunk-3CLLJJJ2.js} +5 -5
- package/dist/{chunk-UBY7NJCU.js → chunk-3GWMSKFY.js} +18 -18
- package/dist/{chunk-4IBUBMMP.js → chunk-3I5IFXHF.js} +1 -1
- package/dist/{chunk-NX3Y36VY.js → chunk-5I34FSSW.js} +6 -6
- package/dist/{chunk-L6BMVCQQ.js → chunk-635I27L4.js} +3 -3
- package/dist/{chunk-VGLIGBAJ.js → chunk-67CGCPI4.js} +2 -2
- package/dist/{chunk-YPG3RXWO.js → chunk-6OBGKICP.js} +3 -3
- package/dist/{chunk-LGR7WXI5.js → chunk-6QLOTNO2.js} +2 -2
- package/dist/{chunk-RUAGEPUJ.js → chunk-6ZGXNEBA.js} +5 -5
- package/dist/{chunk-WCWWO5QL.js → chunk-7HXO72HS.js} +1 -1
- package/dist/{chunk-44DRCGP2.js → chunk-7JO3NNIQ.js} +2 -2
- package/dist/{chunk-AP26EU5H.js → chunk-7PMCRTPW.js} +3 -3
- package/dist/{chunk-ZWNFP4HZ.js → chunk-7TQXWAOZ.js} +1 -1
- package/dist/{chunk-V3TWYF32.js → chunk-7WHUMPWM.js} +1 -1
- package/dist/{chunk-LVRFOGQY.js → chunk-7X7ZTLIN.js} +11 -11
- package/dist/{chunk-72SYV43F.js → chunk-7YUKURRZ.js} +1 -1
- package/dist/{chunk-YUF3AYAP.js → chunk-A4IK6JTC.js} +4 -4
- package/dist/{chunk-X5QSIMXA.js → chunk-ANMVHKNK.js} +3 -3
- package/dist/{chunk-L3LFCZ5D.js → chunk-BFMILGSX.js} +3 -3
- package/dist/{chunk-I5ANEYUK.js → chunk-BOJWXETW.js} +1 -1
- package/dist/{chunk-FIR2MGSB.js → chunk-C2PGBMTH.js} +1 -1
- package/dist/{chunk-H7OY4AAT.js → chunk-D3KD7K3N.js} +4 -4
- package/dist/{chunk-SFYX32FX.js → chunk-DFGHHYS5.js} +4 -4
- package/dist/{chunk-UPCIKGWA.js → chunk-EANTIGY7.js} +1 -1
- package/dist/{chunk-4U3GYVIW.js → chunk-GNCFKXQS.js} +2 -2
- package/dist/{chunk-Z23SHFIC.js → chunk-I2FH4E6H.js} +2 -2
- package/dist/{chunk-I35XT5YY.js → chunk-I4BIOADS.js} +4 -4
- package/dist/{chunk-CWH4LBUW.js → chunk-IEENAYGT.js} +1 -1
- package/dist/{chunk-DSWUG4NV.js → chunk-IGBKHRCZ.js} +1 -1
- package/dist/{chunk-6QQUGYH6.js → chunk-ILBNQX44.js} +5 -5
- package/dist/{chunk-LQDIOUVU.js → chunk-ILGAR7DW.js} +134 -8
- package/dist/{chunk-BMOGTNLK.js → chunk-ITGM5QW4.js} +6 -6
- package/dist/{chunk-ZC42UG7B.js → chunk-JAE5ULC6.js} +5 -5
- package/dist/{chunk-5ZS73ZLX.js → chunk-JARCCL3M.js} +2 -2
- package/dist/{chunk-644AKJMN.js → chunk-JLGZGITL.js} +2 -2
- package/dist/{chunk-M74WT5NA.js → chunk-KYBVLSMT.js} +3 -3
- package/dist/{chunk-WWSR5LMP.js → chunk-L2NGVERQ.js} +1 -1
- package/dist/{chunk-CSDB5VTI.js → chunk-L4HJSUP7.js} +1 -1
- package/dist/{chunk-EKELMI3A.js → chunk-L54D5IIR.js} +24 -14
- package/dist/{chunk-XOSSXRIR.js → chunk-LDEZYH7Y.js} +10 -10
- package/dist/{chunk-RKURAOFK.js → chunk-LFS3PX7S.js} +4 -4
- package/dist/{chunk-JCTS7COD.js → chunk-LJSRMA5C.js} +5 -5
- package/dist/{chunk-TUXX7TKR.js → chunk-MN2FFBYE.js} +2 -2
- package/dist/{chunk-YEVRMDG7.js → chunk-MTB52RSH.js} +2 -2
- package/dist/{chunk-5TU26542.js → chunk-MYN6FNBS.js} +3 -3
- package/dist/{chunk-SKA3U7QI.js → chunk-NCZ7MLNW.js} +9 -9
- package/dist/{chunk-EPQTCF6A.js → chunk-NEGPZ3DO.js} +2 -2
- package/dist/{chunk-VUGF2OC7.js → chunk-NN2RZ2UB.js} +3 -3
- package/dist/{chunk-J6KDUXJF.js → chunk-NUHIGW7H.js} +1 -1
- package/dist/{chunk-AQKMKVAD.js → chunk-NXTAXFQS.js} +8 -8
- package/dist/{chunk-W3FE7GTH.js → chunk-NYCN3CCK.js} +1 -1
- package/dist/{chunk-IUXXEM4Q.js → chunk-OJRX6UVD.js} +7 -7
- package/dist/{chunk-U4LHE5DH.js → chunk-OPN6FWMG.js} +1 -1
- package/dist/{chunk-Y3ELKLNH.js → chunk-QV5HMBT4.js} +12 -12
- package/dist/{chunk-SVVZFXDX.js → chunk-R23ZNBJU.js} +6 -6
- package/dist/{chunk-ZT55PJSW.js → chunk-RN4Z5BQJ.js} +3 -3
- package/dist/{chunk-YH6EHCKQ.js → chunk-RZRBXDGN.js} +6 -6
- package/dist/{chunk-BHT76IIB.js → chunk-SIZBYHXW.js} +4 -4
- package/dist/{chunk-G5IL6C6S.js → chunk-TBDSTEO3.js} +3 -3
- package/dist/{chunk-SRSXZINE.js → chunk-TVXGBUOL.js} +1 -1
- package/dist/{chunk-A5DXHJVS.js → chunk-U6NNLBWJ.js} +5 -5
- package/dist/{chunk-OH2WAG47.js → chunk-UM4RAZPH.js} +1 -1
- package/dist/{chunk-I5HCOOAA.js → chunk-VDNKX5OF.js} +5 -5
- package/dist/{chunk-53IBMDX2.js → chunk-WIVLMIJ6.js} +4 -4
- package/dist/{chunk-SVWCMYR7.js → chunk-WTUQEQ54.js} +27 -13
- package/dist/{chunk-L6NG6EZS.js → chunk-X4YQCI5T.js} +1 -1
- package/dist/{chunk-G6M6YJK4.js → chunk-X6YYQZW7.js} +1 -1
- package/dist/{chunk-XIICM4TX.js → chunk-X7IIWYAG.js} +1 -1
- package/dist/{chunk-TMDCIVZ2.js → chunk-XRAUQWLP.js} +5 -5
- package/dist/{chunk-DAMTDSAE.js → chunk-Y3QV3VYX.js} +1 -1
- package/dist/{chunk-WIFMTEQI.js → chunk-YENSTBQI.js} +1 -1
- package/dist/{chunk-EFKJCBWA.js → chunk-YLR6QHCH.js} +6 -6
- package/dist/{chunk-SQ4RPZ6O.js → chunk-YORHQJ5M.js} +4 -4
- package/dist/{chunk-P4KAYIMX.js → chunk-YQ67XWMM.js} +4 -4
- package/dist/{chunk-2H7SDIM7.js → chunk-ZB5O3LKY.js} +1 -1
- package/dist/{chunk-M2ZGNZRS.js → chunk-ZEPOIQ4H.js} +9 -0
- package/dist/{chunk-HAOYL5JP.js → chunk-ZPFENH7C.js} +39 -9
- package/dist/{codex-app-cards-switch-PJEY3EU5.js → codex-app-cards-switch-BOIE5IZL.js} +11 -11
- package/dist/{codex-card-routing-MNAMCRPO.js → codex-card-routing-B2ZI4WRI.js} +2 -2
- package/dist/{codex-desktop-launch-AUNDRYOL.js → codex-desktop-launch-LBL2LPS7.js} +1 -1
- package/dist/{codex-session-launch-IZNSTT7N.js → codex-session-launch-7WVCWASC.js} +20 -20
- package/dist/{config-LG2RJO37.js → config-S53I5YNR.js} +3 -3
- package/dist/{global-upgrade-QE5Q3BYW.js → global-upgrade-ND726NHJ.js} +9 -9
- package/dist/{identity-3BT6LWOP.js → identity-3G66JTAR.js} +4 -4
- package/dist/{live-capabilities-IKTQBLVH.js → live-capabilities-76C2DKTY.js} +4 -4
- package/dist/{paths-VEUTZJOY.js → paths-O3CZR2BV.js} +3 -3
- package/dist/{reapply-BC2AF55M.js → reapply-TEATBGFG.js} +31 -31
- package/dist/src/index.js +35 -35
- package/dist/{upgrade-lock-NUGEPR75.js → upgrade-lock-PDCUHFRW.js} +6 -4
- package/dist/{usage-TEB5CX2Y.js → usage-DFCL7TQU.js} +3 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I2FH4E6H.js";
|
|
4
4
|
import {
|
|
5
5
|
hermesReceiptPaths,
|
|
6
6
|
hermesSetupPredatesThePluginFolder,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
refreshHermesPluginFiles,
|
|
10
10
|
refreshOpenClawPlugin,
|
|
11
11
|
shippedHermesPlugin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-I4BIOADS.js";
|
|
13
13
|
import {
|
|
14
14
|
fxIgnoresInstructionsFile,
|
|
15
15
|
fxInstructionsBody,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
macAppFxBridge,
|
|
19
19
|
refreshClineKey,
|
|
20
20
|
switchFxHttpEntryToBridge
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VDNKX5OF.js";
|
|
22
22
|
import {
|
|
23
23
|
OPENCODE_HOOK_BINARY,
|
|
24
24
|
agentHookOwner,
|
|
@@ -31,16 +31,16 @@ import {
|
|
|
31
31
|
openCodePluginDir,
|
|
32
32
|
openCodeWired,
|
|
33
33
|
withOpenCodeAskRules
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-5I34FSSW.js";
|
|
35
35
|
import {
|
|
36
36
|
detectClaudeVersion
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-NEGPZ3DO.js";
|
|
38
38
|
import {
|
|
39
39
|
addCompatibleHooks,
|
|
40
40
|
compatibleConfigFile,
|
|
41
41
|
compatibleInstructionsFile,
|
|
42
42
|
hasCompatibleHooks
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-XRAUQWLP.js";
|
|
44
44
|
import {
|
|
45
45
|
GEMINI_HOOK_BINARY,
|
|
46
46
|
addGeminiHooks,
|
|
@@ -52,10 +52,10 @@ import {
|
|
|
52
52
|
geminiWired,
|
|
53
53
|
hasGeminiHooks,
|
|
54
54
|
planHooks
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-D3KD7K3N.js";
|
|
56
56
|
import {
|
|
57
57
|
KEY_FILE_MODE
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-KYBVLSMT.js";
|
|
59
59
|
import {
|
|
60
60
|
CLAUDE_CODE_PUSHARY_PERMISSION_RULES,
|
|
61
61
|
CLAUDE_HOOK_BINARY,
|
|
@@ -102,13 +102,13 @@ import {
|
|
|
102
102
|
renderAgentInstructions,
|
|
103
103
|
supportedClaudeEvents,
|
|
104
104
|
vscodePluginMcp
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-MN2FFBYE.js";
|
|
106
106
|
import {
|
|
107
107
|
formatVersion,
|
|
108
108
|
hookCommandsUseBareNames,
|
|
109
109
|
resolveGlobalBinDir,
|
|
110
110
|
resolveGlobalBinary
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-ZPFENH7C.js";
|
|
112
112
|
import {
|
|
113
113
|
readJsonSafe,
|
|
114
114
|
writeFileAtomic,
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
HOOK_COMPATIBLE_PROFILES,
|
|
119
119
|
isCompatibleAgentType,
|
|
120
120
|
isRecord
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-ZEPOIQ4H.js";
|
|
122
122
|
|
|
123
123
|
// src/reapply.ts
|
|
124
124
|
import { dirname, join } from "path";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UNNAMED_ACTION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X6YYQZW7.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-RZRBXDGN.js";
|
|
11
11
|
import {
|
|
12
12
|
getMachineId
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IGBKHRCZ.js";
|
|
14
14
|
import {
|
|
15
15
|
hookWaitClamped,
|
|
16
16
|
hookWaitDeadline,
|
|
17
17
|
scopeBreachReasonOf
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZEPOIQ4H.js";
|
|
19
19
|
|
|
20
20
|
// src/pushed-question.ts
|
|
21
21
|
var scopeQuestionOf = (verdict) => {
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
OPENCLAW_ENVIRONMENT_KEYS,
|
|
6
6
|
openClawEnvironmentOf,
|
|
7
7
|
openClawPathsFrom
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MN2FFBYE.js";
|
|
9
9
|
import {
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZPFENH7C.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZEPOIQ4H.js";
|
|
15
15
|
|
|
16
16
|
// src/openclaw/wiring-state.ts
|
|
17
17
|
var OPENCLAW_PLUGIN_ID = "pushary";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
realpath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NEGPZ3DO.js";
|
|
4
4
|
import {
|
|
5
5
|
findNativeClaudeInstall
|
|
6
6
|
} from "./chunk-CYTPQDQY.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
resolvePackageVersionFromBinary,
|
|
13
13
|
resolvePathBinary,
|
|
14
14
|
resolvePathBinaryAsync
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZPFENH7C.js";
|
|
16
16
|
import {
|
|
17
17
|
CLAUDE_BRIDGE_CAPABILITY,
|
|
18
18
|
CLAUDE_RESUME_CAPABILITY,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
MANAGED_PROVIDERS,
|
|
24
24
|
SPAWN_CAPABILITY,
|
|
25
25
|
sessionProvidersAdvertisedBy
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ZEPOIQ4H.js";
|
|
27
27
|
|
|
28
28
|
// src/live-capabilities.ts
|
|
29
29
|
import { accessSync, constants, statSync as statSync2 } from "fs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AGENT_CHOICES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NUHIGW7H.js";
|
|
4
4
|
import {
|
|
5
5
|
BELL_HOOK_BINARY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7WHUMPWM.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-MN2FFBYE.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-ZEPOIQ4H.js";
|
|
26
26
|
|
|
27
27
|
// src/gemini-config.ts
|
|
28
28
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -13,16 +13,16 @@ import {
|
|
|
13
13
|
} from "./chunk-WHB622LP.js";
|
|
14
14
|
import {
|
|
15
15
|
keyPrefix
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KYBVLSMT.js";
|
|
17
17
|
import {
|
|
18
18
|
getBaseUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-Y3QV3VYX.js";
|
|
20
20
|
import {
|
|
21
21
|
NPX_LATEST_COMMAND
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-BOJWXETW.js";
|
|
23
23
|
import {
|
|
24
24
|
isValidApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ZEPOIQ4H.js";
|
|
26
26
|
|
|
27
27
|
// src/cli/login-ui.ts
|
|
28
28
|
import { hostname } from "os";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
claudeConfigDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MN2FFBYE.js";
|
|
4
4
|
import {
|
|
5
5
|
claudePermissionRulesFromSettings
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZEPOIQ4H.js";
|
|
7
7
|
|
|
8
8
|
// src/claude-permission-rules.ts
|
|
9
9
|
import { readFileSync, statSync } from "fs";
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
codexHome,
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MN2FFBYE.js";
|
|
11
11
|
import {
|
|
12
12
|
resolvePathBinary
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZPFENH7C.js";
|
|
14
14
|
import {
|
|
15
15
|
getPackageVersion
|
|
16
16
|
} from "./chunk-UQTQ6HPO.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
uninstallOpenClawPlugin,
|
|
14
14
|
unsetOpenClawEntry,
|
|
15
15
|
writeOpenClawEntry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ANMVHKNK.js";
|
|
17
17
|
import {
|
|
18
18
|
needsShell
|
|
19
19
|
} from "./chunk-Y6ILCLKE.js";
|
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
openClawDirectoriesToLookIn,
|
|
26
26
|
openClawPluginFolder,
|
|
27
27
|
openClawSetupReceiptDirectory
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MN2FFBYE.js";
|
|
29
29
|
import {
|
|
30
30
|
resolvePathBinary
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ZPFENH7C.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-ZEPOIQ4H.js";
|
|
43
43
|
|
|
44
44
|
// src/hermes/plugin-payload.ts
|
|
45
45
|
import { createHash } from "crypto";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchAsCredential
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YENSTBQI.js";
|
|
4
4
|
import {
|
|
5
5
|
keyCheckFromResponse
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-635I27L4.js";
|
|
7
7
|
import {
|
|
8
8
|
installNetworkDefaults
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NN2RZ2UB.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Y3QV3VYX.js";
|
|
13
13
|
import {
|
|
14
14
|
isRecord,
|
|
15
15
|
isToolErrorResult,
|
|
16
16
|
toolFailureCodeOfResult
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZEPOIQ4H.js";
|
|
18
18
|
|
|
19
19
|
// src/retry.ts
|
|
20
20
|
var isRetryable = (err) => {
|
|
@@ -1,21 +1,105 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoUpdateLock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MN2FFBYE.js";
|
|
4
4
|
import {
|
|
5
5
|
installPackageGlobally,
|
|
6
6
|
npmErrorMessage,
|
|
7
|
-
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
throwIfNpmRefusesInstall
|
|
8
|
+
} from "./chunk-ZPFENH7C.js";
|
|
9
9
|
import {
|
|
10
10
|
writeJsonAtomic
|
|
11
11
|
} from "./chunk-TODDEIYG.js";
|
|
12
|
+
import {
|
|
13
|
+
CLI_PACKAGE_NAMES
|
|
14
|
+
} from "./chunk-UQTQ6HPO.js";
|
|
12
15
|
|
|
13
16
|
// src/upgrade-lock.ts
|
|
14
17
|
import { fork } from "child_process";
|
|
15
18
|
import { createHash } from "crypto";
|
|
16
|
-
import { existsSync, mkdirSync, readFileSync, realpathSync, unlinkSync } from "fs";
|
|
19
|
+
import { existsSync, mkdirSync, readFileSync, realpathSync, statSync, unlinkSync } from "fs";
|
|
17
20
|
import { createServer, Server } from "net";
|
|
18
21
|
import { basename, dirname, join } from "path";
|
|
22
|
+
|
|
23
|
+
// src/cli-installer-processes.ts
|
|
24
|
+
import { execFileSync } from "child_process";
|
|
25
|
+
var PS_EXECUTABLE = process.platform === "darwin" ? "/bin/ps" : "ps";
|
|
26
|
+
var PROCESS_TABLE_TIMEOUT_MS = 5e3;
|
|
27
|
+
var PROCESS_TABLE_MAX_BYTES = 16 * 1024 * 1024;
|
|
28
|
+
var PROCESS_LINE = /^\s*(\d+)\s+(\d+)(?:\s+(.*))?$/;
|
|
29
|
+
var UNREADABLE_TABLE = { kind: "unreadable" };
|
|
30
|
+
var NPM_EXECUTABLES = /* @__PURE__ */ new Set(["npm", "npm-cli.js"]);
|
|
31
|
+
var NPM_INSTALL_COMMANDS = /* @__PURE__ */ new Set([
|
|
32
|
+
"install",
|
|
33
|
+
"i",
|
|
34
|
+
"add",
|
|
35
|
+
"in",
|
|
36
|
+
"ins",
|
|
37
|
+
"inst",
|
|
38
|
+
"insta",
|
|
39
|
+
"instal",
|
|
40
|
+
"isnt",
|
|
41
|
+
"isnta",
|
|
42
|
+
"isntal",
|
|
43
|
+
"isntall",
|
|
44
|
+
"update",
|
|
45
|
+
"up",
|
|
46
|
+
"upgrade",
|
|
47
|
+
"udpate"
|
|
48
|
+
]);
|
|
49
|
+
var SURROUNDING_QUOTES = /^['"]+|['"]+$/g;
|
|
50
|
+
var CLI_DEPENDENCY_FOLDERS = CLI_PACKAGE_NAMES.map((name) => `/node_modules/${name}/node_modules/`);
|
|
51
|
+
var readProcessTable = () => execFileSync(PS_EXECUTABLE, ["-A", "-ww", "-o", "pid=,ppid=,args="], {
|
|
52
|
+
encoding: "utf8",
|
|
53
|
+
env: { ...process.env },
|
|
54
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
55
|
+
timeout: PROCESS_TABLE_TIMEOUT_MS,
|
|
56
|
+
maxBuffer: PROCESS_TABLE_MAX_BYTES,
|
|
57
|
+
windowsHide: true
|
|
58
|
+
});
|
|
59
|
+
var listedProcessOf = (line) => {
|
|
60
|
+
const match = PROCESS_LINE.exec(line);
|
|
61
|
+
return match === null ? void 0 : { pid: Number(match[1]), parentPid: Number(match[2]), command: match[3] ?? "" };
|
|
62
|
+
};
|
|
63
|
+
var isListedProcess = (value) => value !== void 0;
|
|
64
|
+
var processTableIn = (output) => {
|
|
65
|
+
const lines = output.split("\n").filter((line) => line.trim().length > 0);
|
|
66
|
+
const processes = lines.map(listedProcessOf);
|
|
67
|
+
if (processes.length === 0 || !processes.every(isListedProcess)) return UNREADABLE_TABLE;
|
|
68
|
+
return { kind: "listed", processes: processes.filter(isListedProcess) };
|
|
69
|
+
};
|
|
70
|
+
var listProcesses = (read = readProcessTable) => {
|
|
71
|
+
try {
|
|
72
|
+
return processTableIn(read());
|
|
73
|
+
} catch {
|
|
74
|
+
return UNREADABLE_TABLE;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var unquoted = (token) => token.replace(SURROUNDING_QUOTES, "");
|
|
78
|
+
var executableNameOf = (token) => token.slice(token.lastIndexOf("/") + 1);
|
|
79
|
+
var namesCliPackage = (token) => CLI_PACKAGE_NAMES.some((name) => token === name || token.startsWith(`${name}@`));
|
|
80
|
+
var isNpmInstallOfCli = (command) => {
|
|
81
|
+
const tokens = command.split(/\s+/).map(unquoted);
|
|
82
|
+
const npmAt = tokens.findIndex((token) => NPM_EXECUTABLES.has(executableNameOf(token)));
|
|
83
|
+
if (npmAt < 0) return false;
|
|
84
|
+
const npmArguments = tokens.slice(npmAt + 1);
|
|
85
|
+
return npmArguments.some((token) => NPM_INSTALL_COMMANDS.has(token)) && npmArguments.some(namesCliPackage);
|
|
86
|
+
};
|
|
87
|
+
var runsFromCliDependencyFolder = (command) => CLI_DEPENDENCY_FOLDERS.some((folder) => command.includes(folder));
|
|
88
|
+
var mayWriteCliInstall = (command) => isNpmInstallOfCli(command) || runsFromCliDependencyFolder(command);
|
|
89
|
+
var selfAndAncestorsOf = (processes, ownPid) => {
|
|
90
|
+
const parentOf = new Map(processes.map((listed) => [listed.pid, listed.parentPid]));
|
|
91
|
+
const lineage = /* @__PURE__ */ new Set([ownPid]);
|
|
92
|
+
for (let parent = parentOf.get(ownPid); parent !== void 0 && parent > 0 && !lineage.has(parent); parent = parentOf.get(parent)) {
|
|
93
|
+
lineage.add(parent);
|
|
94
|
+
}
|
|
95
|
+
return lineage;
|
|
96
|
+
};
|
|
97
|
+
var runningCliInstallerIn = (processes, ownPid) => {
|
|
98
|
+
const lineage = selfAndAncestorsOf(processes, ownPid);
|
|
99
|
+
return processes.find((listed) => !lineage.has(listed.pid) && mayWriteCliInstall(listed.command));
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// src/upgrade-lock.ts
|
|
19
103
|
var LOCK_HOST = "127.0.0.1";
|
|
20
104
|
var LOCK_PORT_START = 49152;
|
|
21
105
|
var LOCK_PORT_COUNT = 16384;
|
|
@@ -26,6 +110,8 @@ var HANDOFF_TIMEOUT_MS = 1e4;
|
|
|
26
110
|
var FINISH_TIMEOUT_MS = 5 * 60 * 1e3;
|
|
27
111
|
var KERNEL_LOCK_FORMAT = "kernel-v1";
|
|
28
112
|
var heldLocks = /* @__PURE__ */ new Map();
|
|
113
|
+
var PENDING_INSTALL_STALE_AFTER_MS = 60 * 6e4;
|
|
114
|
+
var PLATFORMS_WITH_PROCESS_TABLE = /* @__PURE__ */ new Set(["darwin", "linux"]);
|
|
29
115
|
var canonicalLockPath = (path) => {
|
|
30
116
|
mkdirSync(dirname(path), { recursive: true });
|
|
31
117
|
return join(realpathSync(dirname(path)), basename(path));
|
|
@@ -52,6 +138,43 @@ var isProcessAlive = (pid) => {
|
|
|
52
138
|
return !(error instanceof Error && "code" in error && error.code === "ESRCH");
|
|
53
139
|
}
|
|
54
140
|
};
|
|
141
|
+
var lockRecordAgeMs = (path, nowMs) => {
|
|
142
|
+
try {
|
|
143
|
+
return nowMs - statSync(path).mtimeMs;
|
|
144
|
+
} catch {
|
|
145
|
+
return void 0;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
var ENDED = { kind: "ended" };
|
|
149
|
+
var MAY_STILL_RUN = { kind: "may_still_run" };
|
|
150
|
+
var PROCESS_TABLE_UNREADABLE = { kind: "process_table_unreadable" };
|
|
151
|
+
var OPERATOR_MUST_CLEAR = { kind: "operator_must_clear" };
|
|
152
|
+
var UNFINISHED_INSTALLATION = "An earlier installation did not finish safely";
|
|
153
|
+
var markerIsOldAndItsProcessExited = (holderPid, ageMs, isAlive) => ageMs !== void 0 && ageMs > PENDING_INSTALL_STALE_AFTER_MS && !isAlive(holderPid);
|
|
154
|
+
var cliInstallerInProcessTable = (read) => {
|
|
155
|
+
const table = listProcesses(read);
|
|
156
|
+
if (table.kind === "unreadable") return PROCESS_TABLE_UNREADABLE;
|
|
157
|
+
const installer = runningCliInstallerIn(table.processes, process.pid);
|
|
158
|
+
return installer === void 0 ? ENDED : { kind: "installer_running", pid: installer.pid };
|
|
159
|
+
};
|
|
160
|
+
var judgePendingInstall = (path, record, request, isAlive) => {
|
|
161
|
+
if (record.pid === void 0 || !PLATFORMS_WITH_PROCESS_TABLE.has(request.platform ?? process.platform)) return OPERATOR_MUST_CLEAR;
|
|
162
|
+
if (!markerIsOldAndItsProcessExited(record.pid, lockRecordAgeMs(path, (request.now ?? Date.now)()), isAlive)) return MAY_STILL_RUN;
|
|
163
|
+
return cliInstallerInProcessTable(request.readProcessTable ?? readProcessTable);
|
|
164
|
+
};
|
|
165
|
+
var clearingSteps = (path) => `stop its npm processes (or restart the computer), then remove ${path} and retry the upgrade.`;
|
|
166
|
+
var pendingInstallReason = (pending, path) => {
|
|
167
|
+
switch (pending.kind) {
|
|
168
|
+
case "may_still_run":
|
|
169
|
+
return `${UNFINISHED_INSTALLATION}. Pushary clears this by itself once the process that started it has exited, an hour has passed since it started, and no npm install of Pushary is running. To retry sooner, ${clearingSteps(path)}`;
|
|
170
|
+
case "installer_running":
|
|
171
|
+
return `${UNFINISHED_INSTALLATION}, and an npm install of Pushary is still running (pid ${pending.pid}). Pushary clears this by itself once that install has ended. To retry sooner, ${clearingSteps(path)}`;
|
|
172
|
+
case "process_table_unreadable":
|
|
173
|
+
return `${UNFINISHED_INSTALLATION}, and Pushary could not read the process list to check that no npm install of Pushary is still running. To clear it, ${clearingSteps(path)}`;
|
|
174
|
+
case "operator_must_clear":
|
|
175
|
+
return `${UNFINISHED_INSTALLATION}. To clear it, ${clearingSteps(path)}`;
|
|
176
|
+
}
|
|
177
|
+
};
|
|
55
178
|
var rejectConnection = (socket) => {
|
|
56
179
|
socket.destroy();
|
|
57
180
|
};
|
|
@@ -98,11 +221,13 @@ var claimUpgradeLock = async (request = {}) => {
|
|
|
98
221
|
listener.listen({ host: LOCK_HOST, port: lockPort(path), exclusive: true }, resolve);
|
|
99
222
|
});
|
|
100
223
|
const record = readLockRecord(path);
|
|
101
|
-
|
|
224
|
+
const isAlive = request.isAlive ?? isProcessAlive;
|
|
225
|
+
const pending = record.installationPending ? judgePendingInstall(path, record, request, isAlive) : ENDED;
|
|
226
|
+
if (pending.kind !== "ended") {
|
|
102
227
|
server.close();
|
|
103
|
-
return { kind: "unavailable", reason:
|
|
228
|
+
return { kind: "unavailable", reason: pendingInstallReason(pending, path) };
|
|
104
229
|
}
|
|
105
|
-
if (existsSync(path) && !record.usesKernelLock && (record.pid === void 0 ||
|
|
230
|
+
if (existsSync(path) && !record.usesKernelLock && (record.pid === void 0 || isAlive(record.pid))) {
|
|
106
231
|
server.close();
|
|
107
232
|
return { kind: "held", holderPid: record.pid };
|
|
108
233
|
}
|
|
@@ -166,13 +291,14 @@ var writeSettledLockRecord = (path) => writeJsonAtomic(path, { pid: process.pid,
|
|
|
166
291
|
var installWithUpgradeLock = (request, lockPath = autoUpdateLock(), runNpm) => {
|
|
167
292
|
const path = canonicalLockPath(lockPath);
|
|
168
293
|
if (!heldLocks.has(path)) throw new Error("Cannot install an upgrade without its lock");
|
|
169
|
-
|
|
294
|
+
throwIfNpmRefusesInstall(request, runNpm);
|
|
170
295
|
writeJsonAtomic(path, { pid: process.pid, format: KERNEL_LOCK_FORMAT, installationPending: true }, 384);
|
|
171
296
|
installPackageGlobally(request, runNpm);
|
|
172
297
|
writeSettledLockRecord(path);
|
|
173
298
|
};
|
|
174
299
|
|
|
175
300
|
export {
|
|
301
|
+
PENDING_INSTALL_STALE_AFTER_MS,
|
|
176
302
|
claimUpgradeLock,
|
|
177
303
|
ownsUpgradeLock,
|
|
178
304
|
releaseAutoUpdateLock,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_RULES_PATH,
|
|
3
3
|
canChangeApprovalSettings
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2J3IIFS3.js";
|
|
5
5
|
import {
|
|
6
6
|
callMcpTool
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ILBNQX44.js";
|
|
8
8
|
import {
|
|
9
9
|
absoluteUrl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-635I27L4.js";
|
|
11
11
|
import {
|
|
12
12
|
getBaseUrl
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Y3QV3VYX.js";
|
|
14
14
|
import {
|
|
15
15
|
NPX_LATEST_COMMAND
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BOJWXETW.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-ZEPOIQ4H.js";
|
|
25
25
|
|
|
26
26
|
// src/reach.ts
|
|
27
27
|
var PUSHARY_APP_DOWNLOAD_URL = "https://pushary.com/download";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openClawLauncherCandidates
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ANMVHKNK.js";
|
|
4
4
|
import {
|
|
5
5
|
openCodeConfigDirFrom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5I34FSSW.js";
|
|
7
7
|
import {
|
|
8
8
|
nativeClaudeInstallPath
|
|
9
9
|
} from "./chunk-CYTPQDQY.js";
|
|
10
10
|
import {
|
|
11
11
|
grokHome
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XRAUQWLP.js";
|
|
13
13
|
import {
|
|
14
14
|
claudeConfigDir,
|
|
15
15
|
clineDataDirectory,
|
|
16
16
|
codexHomeFrom,
|
|
17
17
|
openClawEnvironmentOf,
|
|
18
18
|
openClawPathsFrom
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MN2FFBYE.js";
|
|
20
20
|
import {
|
|
21
21
|
HOOK_COMPATIBLE_PROFILES
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ZEPOIQ4H.js";
|
|
23
23
|
|
|
24
24
|
// src/vscode-config.ts
|
|
25
25
|
import { homedir } from "os";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MN2FFBYE.js";
|
|
4
4
|
import {
|
|
5
5
|
readRegularJsonFile,
|
|
6
6
|
writeFileAtomic
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
serializeDeclinedAgents,
|
|
14
14
|
withDeclinedAgent,
|
|
15
15
|
withoutDeclinedAgent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZEPOIQ4H.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
callDecisionStore,
|
|
3
3
|
identifyingToolInput
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QV5HMBT4.js";
|
|
5
5
|
import {
|
|
6
6
|
canonicalJson
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MN2FFBYE.js";
|
|
8
8
|
|
|
9
9
|
// src/phone-approval.ts
|
|
10
10
|
import { createHash } from "crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MTB52RSH.js";
|
|
4
4
|
import {
|
|
5
5
|
configFilePath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Y3QV3VYX.js";
|
|
7
7
|
import {
|
|
8
8
|
backupFile,
|
|
9
9
|
readJsonSafe,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord,
|
|
16
16
|
isValidApiKey
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZEPOIQ4H.js";
|
|
18
18
|
|
|
19
19
|
// src/shell-alias.ts
|
|
20
20
|
import { homedir } from "os";
|