@pushary/agent-hooks 1.9.158 → 1.9.162
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 +27 -0
- package/README.md +1 -0
- package/dist/{api-MRFKFDVV.js → api-7NPCSUGY.js} +17 -13
- package/dist/bin/pushary-audit.js +7 -7
- package/dist/bin/pushary-bell-hook.js +31 -31
- package/dist/bin/pushary-bell.js +16 -16
- package/dist/bin/pushary-calls.d.ts +1 -0
- package/dist/bin/pushary-calls.js +287 -0
- package/dist/bin/pushary-claude.js +37 -37
- package/dist/bin/pushary-clean.js +47 -45
- package/dist/bin/pushary-codex-bridge.js +27 -27
- package/dist/bin/pushary-codex-hook.js +197 -60
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +19 -19
- package/dist/bin/pushary-connect.js +41 -40
- package/dist/bin/pushary-cowork.js +6 -6
- package/dist/bin/pushary-daemon.js +52 -51
- package/dist/bin/pushary-disconnect.js +39 -37
- package/dist/bin/pushary-display-hook.js +20 -1
- package/dist/bin/pushary-doctor.js +61 -59
- package/dist/bin/pushary-elicitation-hook.js +32 -32
- package/dist/bin/pushary-gemini-bridge.js +19 -19
- package/dist/bin/pushary-gemini-hook.js +36 -36
- package/dist/bin/pushary-hook.js +39 -38
- package/dist/bin/pushary-login.js +28 -28
- package/dist/bin/pushary-logout.js +34 -33
- package/dist/bin/pushary-mcp.js +15 -15
- package/dist/bin/pushary-mode.js +21 -21
- package/dist/bin/pushary-notification-hook.js +30 -30
- package/dist/bin/pushary-opencode-hook.js +399 -45
- package/dist/bin/pushary-permission-denied-hook.js +39 -38
- package/dist/bin/pushary-permission-hook.js +39 -38
- package/dist/bin/pushary-post-hook.js +31 -31
- package/dist/bin/pushary-prompt-hook.js +30 -30
- package/dist/bin/pushary-session-end-hook.js +30 -30
- package/dist/bin/pushary-session-start-hook.js +41 -40
- package/dist/bin/pushary-setup.js +73 -72
- package/dist/bin/pushary-stats.js +6 -6
- package/dist/bin/pushary-status.js +40 -39
- package/dist/bin/pushary-stop-hook.js +30 -30
- package/dist/bin/pushary-stopfailure-hook.js +30 -30
- package/dist/bin/pushary-suggestions.js +21 -21
- package/dist/bin/pushary-transcript-register.js +21 -21
- package/dist/bin/pushary-transcripts.js +32 -32
- package/dist/bin/pushary-upgrade.js +50 -49
- package/dist/bin/pushary-wait.js +23 -23
- package/dist/bin/pushary.js +10 -9
- package/dist/{chunk-RRVFN432.js → chunk-2H7SDIM7.js} +1 -1
- package/dist/{chunk-DHI3X5WK.js → chunk-44DRCGP2.js} +2 -2
- package/dist/chunk-4IBUBMMP.js +885 -0
- package/dist/{chunk-RL5JLDRE.js → chunk-4U3GYVIW.js} +2 -2
- package/dist/{chunk-NW63PGKF.js → chunk-53IBMDX2.js} +12 -7
- package/dist/{chunk-XNJ2HOEL.js → chunk-5TU26542.js} +3 -3
- package/dist/{chunk-UVWKMFLQ.js → chunk-5ZS73ZLX.js} +2 -2
- package/dist/{chunk-4SN4FHFZ.js → chunk-644AKJMN.js} +2 -2
- package/dist/{chunk-TZJR5ESF.js → chunk-6QQUGYH6.js} +7 -7
- package/dist/{chunk-4B5K6YIP.js → chunk-72SYV43F.js} +1 -1
- package/dist/{chunk-JKRQL2BL.js → chunk-A5DXHJVS.js} +5 -5
- package/dist/{chunk-K3OCYJPK.js → chunk-AP26EU5H.js} +3 -3
- package/dist/{chunk-MLPPQ556.js → chunk-AQKMKVAD.js} +13 -13
- package/dist/{chunk-N5SSADNW.js → chunk-BHT76IIB.js} +4 -4
- package/dist/{chunk-TMWXWBFP.js → chunk-BMOGTNLK.js} +6 -6
- package/dist/{chunk-SNQOEDZ2.js → chunk-CSDB5VTI.js} +1 -1
- package/dist/{chunk-YPFOTFEG.js → chunk-CWH4LBUW.js} +1 -1
- package/dist/{chunk-FTTSQAF4.js → chunk-DAMTDSAE.js} +1 -1
- package/dist/{chunk-MHYX5Q3F.js → chunk-DSWUG4NV.js} +1 -1
- package/dist/{chunk-K3I2NMEF.js → chunk-EFKJCBWA.js} +8 -8
- package/dist/{chunk-CIAJ55EQ.js → chunk-EKELMI3A.js} +42 -34
- package/dist/{chunk-EGBI4GRS.js → chunk-EPQTCF6A.js} +2 -2
- package/dist/{chunk-4WL2MINE.js → chunk-FIR2MGSB.js} +1 -1
- package/dist/{chunk-N2LWKWNY.js → chunk-G5IL6C6S.js} +3 -3
- package/dist/{chunk-IKC33YKC.js → chunk-G6M6YJK4.js} +5 -2
- package/dist/{chunk-SZMDRBNK.js → chunk-GJOHGES6.js} +2 -2
- package/dist/{chunk-TPLTB256.js → chunk-H7OY4AAT.js} +4 -4
- package/dist/{chunk-IVOELLUK.js → chunk-HAOYL5JP.js} +39 -8
- package/dist/{chunk-Q7WCDUFV.js → chunk-I35XT5YY.js} +6 -6
- package/dist/{chunk-AOP55JR2.js → chunk-I5ANEYUK.js} +14 -3
- package/dist/{chunk-TKBCLK4B.js → chunk-I5HCOOAA.js} +5 -5
- package/dist/{chunk-IIK3CZXJ.js → chunk-IUXXEM4Q.js} +8 -7
- package/dist/{chunk-FGVBFDNV.js → chunk-J6KDUXJF.js} +1 -1
- package/dist/{chunk-XHCX6DOY.js → chunk-JCTS7COD.js} +5 -5
- package/dist/{chunk-AGYD6XNI.js → chunk-L3LFCZ5D.js} +3 -3
- package/dist/{chunk-3QU4WXAH.js → chunk-L44II2WD.js} +5 -5
- package/dist/{chunk-PBPQRJ2T.js → chunk-L6BMVCQQ.js} +5 -5
- package/dist/{chunk-LVZBLKAU.js → chunk-L6NG6EZS.js} +1 -1
- package/dist/{chunk-EHRWEXRN.js → chunk-LGR7WXI5.js} +2 -2
- package/dist/{chunk-2MPT7YQK.js → chunk-LQDIOUVU.js} +5 -3
- package/dist/{chunk-XSIZKQ2C.js → chunk-LVRFOGQY.js} +11 -11
- package/dist/{chunk-HA2SRYYP.js → chunk-M2ZGNZRS.js} +94 -0
- package/dist/{chunk-ZYDE6QRW.js → chunk-M74WT5NA.js} +3 -3
- package/dist/chunk-NX3Y36VY.js +242 -0
- package/dist/{chunk-ANQBLZAE.js → chunk-OH2WAG47.js} +1 -1
- package/dist/{chunk-GTYVNVBZ.js → chunk-P4KAYIMX.js} +4 -4
- package/dist/{chunk-4I2SHNEU.js → chunk-PIIKLAFY.js} +3 -3
- package/dist/{chunk-J7HSUQK2.js → chunk-QKNHNDOY.js} +3 -3
- package/dist/{chunk-ALQWZCUT.js → chunk-RKURAOFK.js} +4 -4
- package/dist/{chunk-TYBVQ33X.js → chunk-RUAGEPUJ.js} +6 -6
- package/dist/{chunk-IOKJJ2SY.js → chunk-SFYX32FX.js} +4 -4
- package/dist/{chunk-OCWXE4PR.js → chunk-SKA3U7QI.js} +11 -9
- package/dist/{chunk-X254TRBU.js → chunk-SQ4RPZ6O.js} +4 -4
- package/dist/chunk-SRSXZINE.js +18 -0
- package/dist/{chunk-CAMFNSJS.js → chunk-SVVZFXDX.js} +6 -6
- package/dist/{chunk-QVVBU2JU.js → chunk-SVWCMYR7.js} +24 -9
- package/dist/{chunk-MTITL2IG.js → chunk-TMDCIVZ2.js} +5 -5
- package/dist/{chunk-B3BOAYRO.js → chunk-TUXX7TKR.js} +3 -3
- package/dist/{chunk-CSZWWPNS.js → chunk-U4LHE5DH.js} +1 -1
- package/dist/{chunk-3UNZ7HRN.js → chunk-UBY7NJCU.js} +20 -18
- package/dist/{chunk-ORQ7THNZ.js → chunk-UPCIKGWA.js} +1 -1
- package/dist/{chunk-WIIMW5YO.js → chunk-UQTQ6HPO.js} +2 -0
- package/dist/{chunk-V36P4KS4.js → chunk-V3TWYF32.js} +1 -1
- package/dist/{chunk-N3CFEMLS.js → chunk-VGLIGBAJ.js} +6 -6
- package/dist/{chunk-PND5IGC7.js → chunk-VUGF2OC7.js} +6 -6
- package/dist/{chunk-APCJZFTJ.js → chunk-W3FE7GTH.js} +1 -1
- package/dist/{chunk-GHHVXARK.js → chunk-WCWWO5QL.js} +1 -1
- package/dist/{chunk-TSR3FPGL.js → chunk-WIFMTEQI.js} +1 -1
- package/dist/{chunk-AMIUB22C.js → chunk-WWSR5LMP.js} +1 -1
- package/dist/{chunk-CCKY3JDB.js → chunk-X5QSIMXA.js} +4 -4
- package/dist/{chunk-T3PZQNIK.js → chunk-XIICM4TX.js} +2 -2
- package/dist/{chunk-C6PAIHLP.js → chunk-XOSSXRIR.js} +10 -10
- package/dist/{chunk-QP3TCKRZ.js → chunk-Y3ELKLNH.js} +18 -16
- package/dist/{chunk-H6CL3T2S.js → chunk-Y6ILCLKE.js} +1 -1
- package/dist/{chunk-UDLWNOXX.js → chunk-YEVRMDG7.js} +2 -2
- package/dist/{chunk-CS4Z44F5.js → chunk-YH6EHCKQ.js} +87 -8
- package/dist/{chunk-2L52USKM.js → chunk-YPG3RXWO.js} +3 -3
- package/dist/{chunk-AZZNHW3R.js → chunk-YUF3AYAP.js} +9 -6
- package/dist/{chunk-4NHQAMSK.js → chunk-Z23SHFIC.js} +4 -4
- package/dist/{chunk-6GGK3T24.js → chunk-ZC42UG7B.js} +5 -5
- package/dist/{chunk-UPI3JDHZ.js → chunk-ZT55PJSW.js} +3 -3
- package/dist/{chunk-PI3BOI3A.js → chunk-ZWNFP4HZ.js} +1 -1
- package/dist/{codex-app-cards-switch-CXXDGH7R.js → codex-app-cards-switch-PJEY3EU5.js} +14 -14
- package/dist/{codex-card-routing-WP4IHJFN.js → codex-card-routing-MNAMCRPO.js} +2 -2
- package/dist/{codex-desktop-launch-EN7ACHC6.js → codex-desktop-launch-AUNDRYOL.js} +1 -1
- package/dist/{codex-session-launch-7BV4VTJW.js → codex-session-launch-IZNSTT7N.js} +23 -23
- package/dist/{config-SZMMBOJV.js → config-LG2RJO37.js} +4 -4
- package/dist/{global-upgrade-I5J6BDHA.js → global-upgrade-QE5Q3BYW.js} +11 -11
- package/dist/{identity-GLJNTNHW.js → identity-3BT6LWOP.js} +5 -5
- package/dist/{live-capabilities-AYO7FOHS.js → live-capabilities-IKTQBLVH.js} +5 -5
- package/dist/{paths-NRBEF3T2.js → paths-VEUTZJOY.js} +4 -4
- package/dist/reapply-BC2AF55M.js +69 -0
- package/dist/src/index.js +39 -38
- package/dist/{upgrade-lock-H6SU7MJR.js → upgrade-lock-NUGEPR75.js} +5 -5
- package/dist/usage-TEB5CX2Y.js +11 -0
- package/package.json +2 -1
- package/dist/chunk-GLDSXDRV.js +0 -593
- package/dist/reapply-J2QUV7J2.js +0 -68
- package/dist/usage-MY3DIFBG.js +0 -11
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
formatVersion,
|
|
4
4
|
quoteIfNeeded,
|
|
5
5
|
shellDoubleQuoted
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HAOYL5JP.js";
|
|
7
7
|
import {
|
|
8
8
|
writeFileAtomic
|
|
9
9
|
} from "./chunk-TODDEIYG.js";
|
|
10
10
|
import {
|
|
11
11
|
cmdShimScriptOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UQTQ6HPO.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_MCP_PRETOOLUSE_MATCHER,
|
|
15
15
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
PUSHARY_HOSTS,
|
|
23
23
|
PUSHARY_TOOL_PREFIX,
|
|
24
24
|
withHookHoldBudget
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-M2ZGNZRS.js";
|
|
26
26
|
|
|
27
27
|
// src/setup/paths.ts
|
|
28
28
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -2,37 +2,39 @@ import {
|
|
|
2
2
|
forgetPhoneApproval,
|
|
3
3
|
rememberPhoneApproval,
|
|
4
4
|
takePhoneApproval
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-644AKJMN.js";
|
|
6
6
|
import {
|
|
7
7
|
claudeSettingsLocationFor,
|
|
8
8
|
readClaudePermissionRules
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4U3GYVIW.js";
|
|
10
|
+
import {
|
|
11
|
+
defersToNativeMode
|
|
12
|
+
} from "./chunk-SRSXZINE.js";
|
|
10
13
|
import {
|
|
11
14
|
askAgentQuestions,
|
|
12
|
-
defersToNativeMode,
|
|
13
15
|
outcomeOfFailedAsk,
|
|
14
16
|
storedWaitDeadline
|
|
15
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-EKELMI3A.js";
|
|
16
18
|
import {
|
|
17
19
|
reportMachineDenial
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZT55PJSW.js";
|
|
19
21
|
import {
|
|
20
22
|
isGatingMoment,
|
|
21
23
|
recordKeylessMoment
|
|
22
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-WWSR5LMP.js";
|
|
23
25
|
import {
|
|
24
26
|
isAdmitted,
|
|
25
27
|
readAdmissionRules
|
|
26
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-L44II2WD.js";
|
|
27
29
|
import {
|
|
28
30
|
isDeferAnswer,
|
|
29
31
|
oncePerSession
|
|
30
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-CWH4LBUW.js";
|
|
31
33
|
import {
|
|
32
34
|
activeHookSource,
|
|
33
35
|
activeIdentity,
|
|
34
36
|
namedSource
|
|
35
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-TMDCIVZ2.js";
|
|
36
38
|
import {
|
|
37
39
|
DEFAULT_SESSION,
|
|
38
40
|
approvalAwaitingRetry,
|
|
@@ -55,7 +57,7 @@ import {
|
|
|
55
57
|
settleQuestionsForToolUse,
|
|
56
58
|
sweepFilesOlderThan,
|
|
57
59
|
userScope
|
|
58
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-Y3ELKLNH.js";
|
|
59
61
|
import {
|
|
60
62
|
UNNAMED_ACTION,
|
|
61
63
|
deriveAction,
|
|
@@ -66,12 +68,12 @@ import {
|
|
|
66
68
|
patchDeletesFiles,
|
|
67
69
|
permissionDeniedAction,
|
|
68
70
|
scopePathFor
|
|
69
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-G6M6YJK4.js";
|
|
70
72
|
import {
|
|
71
73
|
branchFor,
|
|
72
74
|
repoKeyFor,
|
|
73
75
|
repositoryScopeFor
|
|
74
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-FIR2MGSB.js";
|
|
75
77
|
import {
|
|
76
78
|
askUser,
|
|
77
79
|
cancelQuestion,
|
|
@@ -88,23 +90,23 @@ import {
|
|
|
88
90
|
waitForQuestion,
|
|
89
91
|
waitsForThePhone,
|
|
90
92
|
withdrawQuestion
|
|
91
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-YH6EHCKQ.js";
|
|
92
94
|
import {
|
|
93
95
|
getMachineId
|
|
94
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-DSWUG4NV.js";
|
|
95
97
|
import {
|
|
96
98
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
97
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-TUXX7TKR.js";
|
|
98
100
|
import {
|
|
99
101
|
getApiKey,
|
|
100
102
|
getBaseUrl
|
|
101
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-DAMTDSAE.js";
|
|
102
104
|
import {
|
|
103
105
|
writeFileAtomic
|
|
104
106
|
} from "./chunk-TODDEIYG.js";
|
|
105
107
|
import {
|
|
106
108
|
NPX_LATEST_COMMAND
|
|
107
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-I5ANEYUK.js";
|
|
108
110
|
import {
|
|
109
111
|
AGENT_QUESTION_STRATEGY,
|
|
110
112
|
AGENT_QUESTION_TOOL,
|
|
@@ -174,7 +176,7 @@ import {
|
|
|
174
176
|
timeoutActionWithoutLocalPrompt,
|
|
175
177
|
unansweredRefusalReason,
|
|
176
178
|
unapprovedScopeReason
|
|
177
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-M2ZGNZRS.js";
|
|
178
180
|
|
|
179
181
|
// src/terminal-answer-watch.ts
|
|
180
182
|
import { closeSync, openSync, readSync, statSync } from "fs";
|
|
@@ -174,6 +174,7 @@ var isNewerVersion = (candidate, current) => {
|
|
|
174
174
|
};
|
|
175
175
|
var RELEASE_VERSION = /^\d+\.\d+\.\d+$/;
|
|
176
176
|
var isReleaseVersion = (value) => RELEASE_VERSION.test(value);
|
|
177
|
+
var LATEST_DIST_TAG = "latest";
|
|
177
178
|
var majorOf = (version) => parseInt(version.split(".")[0] ?? "", 10) || 0;
|
|
178
179
|
var isSameMajorVersion = (candidate, current) => majorOf(candidate) === majorOf(current);
|
|
179
180
|
|
|
@@ -203,5 +204,6 @@ export {
|
|
|
203
204
|
packageVersionAt,
|
|
204
205
|
isNewerVersion,
|
|
205
206
|
isReleaseVersion,
|
|
207
|
+
LATEST_DIST_TAG,
|
|
206
208
|
isSameMajorVersion
|
|
207
209
|
};
|
|
@@ -9,20 +9,20 @@ import {
|
|
|
9
9
|
installedCodexApp,
|
|
10
10
|
readCodexAppRuntime,
|
|
11
11
|
shellQuoted
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-G5IL6C6S.js";
|
|
13
|
+
import {
|
|
14
|
+
CODEX_APP_LAUNCH_AT_LOGIN_VERB,
|
|
15
|
+
CODEX_APP_LAUNCH_VARIABLE
|
|
16
|
+
} from "./chunk-U4P4NDVB.js";
|
|
13
17
|
import {
|
|
14
18
|
writeHuman
|
|
15
19
|
} from "./chunk-QCGNGEGE.js";
|
|
16
20
|
import {
|
|
17
21
|
xml
|
|
18
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EFKJCBWA.js";
|
|
19
23
|
import {
|
|
20
24
|
writeFileAtomic
|
|
21
25
|
} from "./chunk-TODDEIYG.js";
|
|
22
|
-
import {
|
|
23
|
-
CODEX_APP_LAUNCH_AT_LOGIN_VERB,
|
|
24
|
-
CODEX_APP_LAUNCH_VARIABLE
|
|
25
|
-
} from "./chunk-U4P4NDVB.js";
|
|
26
26
|
|
|
27
27
|
// src/codex-app-cards-switch.ts
|
|
28
28
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DSWUG4NV.js";
|
|
4
|
+
import {
|
|
5
|
+
getBaseUrl
|
|
6
|
+
} from "./chunk-DAMTDSAE.js";
|
|
4
7
|
import {
|
|
5
8
|
NetworkError
|
|
6
9
|
} from "./chunk-YU2EUD7O.js";
|
|
7
|
-
import {
|
|
8
|
-
getBaseUrl
|
|
9
|
-
} from "./chunk-FTTSQAF4.js";
|
|
10
10
|
import {
|
|
11
11
|
getPackageVersion
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UQTQ6HPO.js";
|
|
13
13
|
import {
|
|
14
14
|
clientContextHeaders,
|
|
15
15
|
redactSecretsFromContent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-M2ZGNZRS.js";
|
|
17
17
|
|
|
18
18
|
// src/cli/net.ts
|
|
19
19
|
import { createRequire } from "module";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
needsShell
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Y6ILCLKE.js";
|
|
4
4
|
import {
|
|
5
5
|
OPENCLAW_ENVIRONMENT_KEYS,
|
|
6
6
|
openClawEnvironmentOf,
|
|
7
7
|
openClawPathsFrom
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TUXX7TKR.js";
|
|
9
9
|
import {
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HAOYL5JP.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-M2ZGNZRS.js";
|
|
15
15
|
|
|
16
16
|
// src/openclaw/wiring-state.ts
|
|
17
17
|
var OPENCLAW_PLUGIN_ID = "pushary";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-BG4HHB7E.js";
|
|
4
4
|
import {
|
|
5
5
|
renderCommandHelp
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I5ANEYUK.js";
|
|
7
7
|
import {
|
|
8
8
|
getPackageVersion
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UQTQ6HPO.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/usage.ts
|
|
12
12
|
var exitOnHelpFlag = (command) => {
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-WHB622LP.js";
|
|
4
4
|
import {
|
|
5
5
|
ensureDaemonRunning
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EFKJCBWA.js";
|
|
7
7
|
import {
|
|
8
8
|
hookOwnerOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-H7OY4AAT.js";
|
|
10
10
|
import {
|
|
11
11
|
hookMeaning
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-G6M6YJK4.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
changedRecipientsMessage,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
uploadTranscriptRecords,
|
|
25
25
|
verifyAnchoredRecipients,
|
|
26
26
|
wrapSessionKey
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-PIIKLAFY.js";
|
|
28
28
|
import {
|
|
29
29
|
external_exports,
|
|
30
30
|
ownedOnlyByThisUser,
|
|
@@ -33,22 +33,22 @@ import {
|
|
|
33
33
|
import {
|
|
34
34
|
transcriptEnvironmentPreference,
|
|
35
35
|
transcriptsEnabled
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-W3FE7GTH.js";
|
|
37
37
|
import {
|
|
38
38
|
fetchAsCredential
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-WIFMTEQI.js";
|
|
40
40
|
import {
|
|
41
41
|
readTranscriptPreference
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-M74WT5NA.js";
|
|
43
43
|
import {
|
|
44
44
|
claudeConfigDir,
|
|
45
45
|
codexHome,
|
|
46
46
|
pusharyDir
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-TUXX7TKR.js";
|
|
48
48
|
import {
|
|
49
49
|
getApiKey,
|
|
50
50
|
getBaseUrl
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-DAMTDSAE.js";
|
|
52
52
|
import {
|
|
53
53
|
writeJsonAtomic,
|
|
54
54
|
writeJsonAtomicDurable
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
isHookSource,
|
|
61
61
|
isRecord,
|
|
62
62
|
redactSecretsFromContent
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-M2ZGNZRS.js";
|
|
64
64
|
|
|
65
65
|
// src/transcript-registration.ts
|
|
66
66
|
import { createHash as createHash4 } from "crypto";
|
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
toolResultErrorText,
|
|
28
28
|
transcriptTokensIn,
|
|
29
29
|
transcriptUsageRequest
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-G6M6YJK4.js";
|
|
31
31
|
import {
|
|
32
32
|
branchFor,
|
|
33
33
|
repoKeyFor
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-FIR2MGSB.js";
|
|
35
35
|
import {
|
|
36
36
|
cancelQuestion,
|
|
37
37
|
clientErrorKindOf,
|
|
@@ -39,39 +39,39 @@ import {
|
|
|
39
39
|
reportClientError,
|
|
40
40
|
sendNotification,
|
|
41
41
|
waitForAnswer
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import {
|
|
44
|
-
isRetryable,
|
|
45
|
-
withRetry
|
|
46
|
-
} from "./chunk-TZJR5ESF.js";
|
|
42
|
+
} from "./chunk-YH6EHCKQ.js";
|
|
47
43
|
import {
|
|
48
44
|
RETRY_ACK,
|
|
49
45
|
readCommandAck,
|
|
50
46
|
refusedReceiptMessage
|
|
51
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-OH2WAG47.js";
|
|
48
|
+
import {
|
|
49
|
+
isRetryable,
|
|
50
|
+
withRetry
|
|
51
|
+
} from "./chunk-6QQUGYH6.js";
|
|
52
52
|
import {
|
|
53
53
|
fetchAsCredential
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-WIFMTEQI.js";
|
|
55
55
|
import {
|
|
56
56
|
getMachineId
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-DSWUG4NV.js";
|
|
58
58
|
import {
|
|
59
59
|
reportedInstallSource
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-YEVRMDG7.js";
|
|
61
61
|
import {
|
|
62
62
|
IDLE_PROMPT_NOTIFICATION,
|
|
63
63
|
NOTIFICATION_PUSH_TYPES,
|
|
64
64
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS,
|
|
65
65
|
claudeConfigDir
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-TUXX7TKR.js";
|
|
67
67
|
import {
|
|
68
68
|
compareVersion,
|
|
69
69
|
parseVersion
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-HAOYL5JP.js";
|
|
71
71
|
import {
|
|
72
72
|
getApiKey,
|
|
73
73
|
getBaseUrl
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-DAMTDSAE.js";
|
|
75
75
|
import {
|
|
76
76
|
writeFileAtomic,
|
|
77
77
|
writeJsonAtomicDurable
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
resolveAutoResolveOrigin,
|
|
103
103
|
resolvePolicy,
|
|
104
104
|
unansweredRefusalReason
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-M2ZGNZRS.js";
|
|
106
106
|
|
|
107
107
|
// src/pending.ts
|
|
108
108
|
import { join } from "path";
|
|
@@ -560,6 +560,8 @@ var readReusableMode = (apiKey, sessionId, maxAgeMs) => {
|
|
|
560
560
|
return { ...last.state, degraded: false };
|
|
561
561
|
};
|
|
562
562
|
var unansweredModeRead = (state) => ({ state, answeredLive: false });
|
|
563
|
+
var isTimeoutReason = (reason) => reason instanceof Error && reason.name === "TimeoutError";
|
|
564
|
+
var wasCancelledByTheCaller = (signal) => signal?.aborted === true && !isTimeoutReason(signal.reason);
|
|
563
565
|
var readModeState = async (apiKey, sessionId, reuseWithinMs, signal) => {
|
|
564
566
|
if (reuseWithinMs > 0) {
|
|
565
567
|
const reusable = readReusableMode(apiKey, sessionId, reuseWithinMs);
|
|
@@ -585,7 +587,7 @@ var readModeState = async (apiKey, sessionId, reuseWithinMs, signal) => {
|
|
|
585
587
|
writeLastGoodMode(apiKey, state, sessionId);
|
|
586
588
|
return { state, answeredLive: true };
|
|
587
589
|
} catch (error) {
|
|
588
|
-
void reportClientError({ kind: clientErrorKindOf(error), code: "mode_fetch_failed" });
|
|
590
|
+
if (!wasCancelledByTheCaller(signal)) void reportClientError({ kind: clientErrorKindOf(error), code: "mode_fetch_failed" });
|
|
589
591
|
return unansweredModeRead(degradedFallback(apiKey, sessionId));
|
|
590
592
|
}
|
|
591
593
|
};
|
|
@@ -8,21 +8,21 @@ import {
|
|
|
8
8
|
SubscriptionRequiredError,
|
|
9
9
|
callMcpTool,
|
|
10
10
|
isRetryable
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6QQUGYH6.js";
|
|
12
|
+
import {
|
|
13
|
+
fetchAsCredential
|
|
14
|
+
} from "./chunk-WIFMTEQI.js";
|
|
12
15
|
import {
|
|
13
16
|
installNetworkDefaults,
|
|
14
17
|
isNetworkFailure
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
fetchAsCredential
|
|
18
|
-
} from "./chunk-TSR3FPGL.js";
|
|
18
|
+
} from "./chunk-VUGF2OC7.js";
|
|
19
19
|
import {
|
|
20
20
|
clientReportClaims
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-TUXX7TKR.js";
|
|
22
22
|
import {
|
|
23
23
|
getApiKey,
|
|
24
24
|
getBaseUrl
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-DAMTDSAE.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-M2ZGNZRS.js";
|
|
36
36
|
|
|
37
37
|
// src/api.ts
|
|
38
38
|
import { randomUUID } from "crypto";
|
|
@@ -69,6 +69,47 @@ var isBlockedActionClaim = (data) => {
|
|
|
69
69
|
return typeof data.granted === "boolean";
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
+
// src/open-question-wait.ts
|
|
73
|
+
var OPEN_QUESTION_LIVE_WINDOW_MS = 10 * 6e4;
|
|
74
|
+
var OPEN_QUESTION_LIVE_POLL = { holdMs: 3e4, pauseMs: 2e3 };
|
|
75
|
+
var OPEN_QUESTION_IDLE_POLL = { holdMs: 1e3, pauseMs: 3e4 };
|
|
76
|
+
var MAX_FAILURE_PAUSE_MS = 15e3;
|
|
77
|
+
var PENDING_STATUS = "pending";
|
|
78
|
+
var UNAVAILABLE_STATUS = "unavailable";
|
|
79
|
+
var PERSON_STOPPED_STATUS = "stopped";
|
|
80
|
+
var openQuestionPollAt = (elapsedMs) => elapsedMs < OPEN_QUESTION_LIVE_WINDOW_MS ? OPEN_QUESTION_LIVE_POLL : OPEN_QUESTION_IDLE_POLL;
|
|
81
|
+
var openQuestionFailurePauseMs = (failures, poll) => Math.max(poll.pauseMs, Math.min(poll.pauseMs * 2 ** Math.max(0, failures - 1), MAX_FAILURE_PAUSE_MS));
|
|
82
|
+
var isThePersonsStop = (reply) => reply.status === PERSON_STOPPED_STATUS;
|
|
83
|
+
var isPending = (reply) => reply.status === void 0 || reply.status === PENDING_STATUS;
|
|
84
|
+
var isUnavailable = (reply) => reply.status === UNAVAILABLE_STATUS;
|
|
85
|
+
var askingProcessWaits = (asker, currentParent, isGone) => currentParent === asker && !isGone(asker);
|
|
86
|
+
var waitWhileTheQuestionIsOpen = async (effects) => {
|
|
87
|
+
const startedAt = effects.now();
|
|
88
|
+
let failures = 0;
|
|
89
|
+
while (effects.askerStillWaits()) {
|
|
90
|
+
const poll = openQuestionPollAt(effects.now() - startedAt);
|
|
91
|
+
let reply;
|
|
92
|
+
try {
|
|
93
|
+
reply = await effects.poll(poll.holdMs);
|
|
94
|
+
} catch (error) {
|
|
95
|
+
if (!effects.isTransientFailure(error)) return { kind: "abandoned" };
|
|
96
|
+
failures += 1;
|
|
97
|
+
await effects.sleep(openQuestionFailurePauseMs(failures, poll));
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
if (reply.answered || isThePersonsStop(reply)) return { kind: "replied", reply };
|
|
101
|
+
if (isUnavailable(reply)) {
|
|
102
|
+
failures += 1;
|
|
103
|
+
await effects.sleep(openQuestionFailurePauseMs(failures, poll));
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
failures = 0;
|
|
107
|
+
if (!isPending(reply)) return { kind: "closed" };
|
|
108
|
+
await effects.sleep(poll.pauseMs);
|
|
109
|
+
}
|
|
110
|
+
return { kind: "abandoned" };
|
|
111
|
+
};
|
|
112
|
+
|
|
72
113
|
// src/client-report-claim.ts
|
|
73
114
|
import { createHash } from "crypto";
|
|
74
115
|
import { closeSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
|
|
@@ -268,6 +309,7 @@ var withdrawAfterAFailedPoll = async (apiKey, correlationId) => {
|
|
|
268
309
|
return late.answered ? late : STOPPED;
|
|
269
310
|
};
|
|
270
311
|
var sleepUnlessAborted = (ms, signal) => new Promise((resolve) => {
|
|
312
|
+
if (signal?.aborted) return resolve();
|
|
271
313
|
const wake = () => {
|
|
272
314
|
clearTimeout(timer);
|
|
273
315
|
signal?.removeEventListener("abort", wake);
|
|
@@ -326,6 +368,39 @@ var waitForQuestion = async (apiKey, question, deadlineMs, pollInterval = 2e3, s
|
|
|
326
368
|
if (question.status === "expired") return STOPPED;
|
|
327
369
|
return isAwayPaused(question) || isLocalQuestionHandoff(question) ? withdrawQuestion(apiKey, question.correlationId) : pollForAnswer(apiKey, question.correlationId, deadlineMs, pollInterval, signal);
|
|
328
370
|
};
|
|
371
|
+
var OPEN_QUESTION_CLOSED = { answered: false, status: "withdrawn" };
|
|
372
|
+
var OPEN_QUESTION_LATE_ANSWER_HOLD_MS = 1e3;
|
|
373
|
+
var answerThatWonTheCancel = async (apiKey, correlationId) => {
|
|
374
|
+
const late = await waitForAnswer(apiKey, correlationId, OPEN_QUESTION_LATE_ANSWER_HOLD_MS, AbortSignal.timeout(2e3));
|
|
375
|
+
return late.answered ? late : OPEN_QUESTION_CLOSED;
|
|
376
|
+
};
|
|
377
|
+
var withdrawOpenQuestion = async (apiKey, correlationId) => {
|
|
378
|
+
try {
|
|
379
|
+
const cancelled = await cancelQuestion(apiKey, correlationId, AbortSignal.timeout(4e3));
|
|
380
|
+
return cancelled.cancelled === true ? OPEN_QUESTION_CLOSED : await answerThatWonTheCancel(apiKey, correlationId);
|
|
381
|
+
} catch {
|
|
382
|
+
return OPEN_QUESTION_CLOSED;
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
var waitForOpenQuestion = async (apiKey, question, askerStillWaits) => {
|
|
386
|
+
if (question.answered || isThePersonsStop(question)) return { ...question, answered: !!question.answered };
|
|
387
|
+
if (isAwayPaused(question) || isLocalQuestionHandoff(question)) return withdrawOpenQuestion(apiKey, question.correlationId);
|
|
388
|
+
const ending = await waitWhileTheQuestionIsOpen({
|
|
389
|
+
now: Date.now,
|
|
390
|
+
sleep: (ms) => sleepUnlessAborted(ms),
|
|
391
|
+
poll: (holdMs) => waitForAnswer(apiKey, question.correlationId, holdMs),
|
|
392
|
+
askerStillWaits,
|
|
393
|
+
isTransientFailure: isTransientWaitFailure
|
|
394
|
+
});
|
|
395
|
+
switch (ending.kind) {
|
|
396
|
+
case "replied":
|
|
397
|
+
return ending.reply;
|
|
398
|
+
case "closed":
|
|
399
|
+
return OPEN_QUESTION_CLOSED;
|
|
400
|
+
case "abandoned":
|
|
401
|
+
return withdrawOpenQuestion(apiKey, question.correlationId);
|
|
402
|
+
}
|
|
403
|
+
};
|
|
329
404
|
var sendNotification = async (apiKey, params, timeoutMs = 15e3, signal) => {
|
|
330
405
|
await callMcpTool(apiKey, "send_notification", { ...params }, { maxRetries: signal ? 1 : 3, timeoutMs, signal });
|
|
331
406
|
};
|
|
@@ -368,6 +443,8 @@ export {
|
|
|
368
443
|
isPolicyConfig,
|
|
369
444
|
isAskUserResponse,
|
|
370
445
|
isWaitForAnswerResponse,
|
|
446
|
+
isThePersonsStop,
|
|
447
|
+
askingProcessWaits,
|
|
371
448
|
isDecisionStopped,
|
|
372
449
|
isAwayPaused,
|
|
373
450
|
isLocalQuestionHandoff,
|
|
@@ -381,10 +458,12 @@ export {
|
|
|
381
458
|
ABANDONED_WAIT,
|
|
382
459
|
isTransientWaitFailure,
|
|
383
460
|
waitRetryPauseMs,
|
|
461
|
+
sleepUnlessAborted,
|
|
384
462
|
pollForAnswer,
|
|
385
463
|
cancelQuestion,
|
|
386
464
|
withdrawQuestion,
|
|
387
465
|
waitForQuestion,
|
|
466
|
+
waitForOpenQuestion,
|
|
388
467
|
sendNotification,
|
|
389
468
|
requestGate,
|
|
390
469
|
claimBlockedAction
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
NpmMissingError,
|
|
4
4
|
NpmPermissionError,
|
|
5
5
|
NpmReleaseAgeError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HAOYL5JP.js";
|
|
7
7
|
import {
|
|
8
8
|
writeFileAtomic
|
|
9
9
|
} from "./chunk-TODDEIYG.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-I5ANEYUK.js";
|
|
13
13
|
import {
|
|
14
14
|
readSetupAgentFailures
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-M2ZGNZRS.js";
|
|
16
16
|
|
|
17
17
|
// src/setup/config-write.ts
|
|
18
18
|
var AgentConfigWriteError = class extends Error {
|