@pushary/agent-hooks 1.9.12 → 1.9.13
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 +12 -0
- package/data/cursor-plugin/scripts/pushary-gate.mjs +7 -2
- package/dist/bin/pushary-bell-hook.js +25 -25
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +26 -25
- package/dist/bin/pushary-clean.js +52 -30
- package/dist/bin/pushary-codex-bridge.js +17 -17
- package/dist/bin/pushary-codex-hook.js +30 -30
- package/dist/bin/pushary-codex.js +12 -12
- package/dist/bin/pushary-connect.js +24 -24
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +31 -31
- package/dist/bin/pushary-disconnect.js +39 -25
- package/dist/bin/pushary-doctor.js +33 -33
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +27 -27
- package/dist/bin/pushary-hook.js +29 -29
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +10 -10
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +12 -12
- package/dist/bin/pushary-notification-hook.js +24 -24
- package/dist/bin/pushary-opencode-hook.js +26 -26
- package/dist/bin/pushary-permission-denied-hook.js +29 -29
- package/dist/bin/pushary-permission-hook.js +28 -28
- package/dist/bin/pushary-post-hook.js +24 -24
- package/dist/bin/pushary-prompt-hook.js +24 -24
- package/dist/bin/pushary-session-end-hook.js +24 -24
- package/dist/bin/pushary-session-start-hook.js +28 -28
- package/dist/bin/pushary-setup.js +69 -41
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +26 -26
- package/dist/bin/pushary-stop-hook.js +24 -24
- package/dist/bin/pushary-stopfailure-hook.js +24 -24
- package/dist/bin/pushary-suggestions.js +12 -12
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +30 -30
- package/dist/bin/pushary-wait.js +12 -12
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-SJ7M37RL.js → chunk-226PID65.js} +5 -5
- package/dist/{chunk-ZHF4JDVE.js → chunk-3EOXZYUE.js} +1 -1
- package/dist/{chunk-FSCWOYK6.js → chunk-3LSJ7YVM.js} +3 -3
- package/dist/{chunk-BOHDM4T7.js → chunk-3VSMTCXV.js} +10 -5
- package/dist/{chunk-2QJ6K2SR.js → chunk-43IDNI4X.js} +5 -5
- package/dist/{chunk-2NKTEA42.js → chunk-43ORAXAL.js} +1 -1
- package/dist/{chunk-RYBAJXV4.js → chunk-4ATFPZ6X.js} +1 -1
- package/dist/{chunk-KXCWWHYO.js → chunk-4EAILOOQ.js} +3 -3
- package/dist/{chunk-2GBUL4NP.js → chunk-4ZSWBLVM.js} +6 -6
- package/dist/{chunk-5HPC3RNE.js → chunk-5QTQI3HL.js} +1 -1
- package/dist/{chunk-BX2R7SIY.js → chunk-6CM3B4PJ.js} +6 -6
- package/dist/{chunk-NDZKDJQU.js → chunk-6MGD24SH.js} +1 -1
- package/dist/{chunk-7U26QSMF.js → chunk-6NL3LYUM.js} +8 -8
- package/dist/{chunk-Z6VYZSVA.js → chunk-6QPQG3Q5.js} +5 -5
- package/dist/{chunk-ZC6EVOX6.js → chunk-7JM6TCMA.js} +1 -1
- package/dist/{chunk-5VUB6VVO.js → chunk-7VWIBIDK.js} +4 -4
- package/dist/{chunk-JNDELCH5.js → chunk-FWAXBC3P.js} +1 -1
- package/dist/{chunk-M2P3HQA3.js → chunk-G54VGPRX.js} +1 -1
- package/dist/{chunk-A2DW2RNT.js → chunk-G5K656XW.js} +2 -2
- package/dist/{chunk-CKUACXAX.js → chunk-GFAVGG3X.js} +5 -5
- package/dist/{chunk-CPUEZAE2.js → chunk-GYR4G4WO.js} +1 -1
- package/dist/{chunk-EYLQVCME.js → chunk-HHMMY6TB.js} +2 -2
- package/dist/{chunk-FLPXTN3Q.js → chunk-J2VNQSS6.js} +1 -1
- package/dist/{chunk-JKGTASA2.js → chunk-JRKUJOZL.js} +1 -1
- package/dist/{chunk-DWHCF4RH.js → chunk-JVUK5YFM.js} +5 -5
- package/dist/{chunk-RBBMGCSZ.js → chunk-LBNIISXH.js} +1 -1
- package/dist/{chunk-CXKY5FGY.js → chunk-LHLUKFJV.js} +8 -8
- package/dist/{chunk-WBSL4FBX.js → chunk-LUYAXSUS.js} +3 -3
- package/dist/{chunk-CATIBZQH.js → chunk-LYDO2SS6.js} +3 -3
- package/dist/{chunk-J5XCHLP4.js → chunk-MPDJJNGA.js} +2 -2
- package/dist/{chunk-GTM7C36Y.js → chunk-MWP65CZ3.js} +2 -2
- package/dist/{chunk-OBGZUD73.js → chunk-N6XFGVNW.js} +3 -3
- package/dist/{chunk-WKP2KRTU.js → chunk-NPRFA7YM.js} +2 -2
- package/dist/chunk-OOKRWBCG.js +111 -0
- package/dist/{chunk-MEHDBT5H.js → chunk-OOZ5RSEF.js} +2 -2
- package/dist/{chunk-BNQKHPEC.js → chunk-QIPDIZC5.js} +4 -4
- package/dist/{chunk-PKQ435Z2.js → chunk-RI5E5JQS.js} +1 -1
- package/dist/{chunk-YZWUTWDG.js → chunk-RJAPOB34.js} +2 -2
- package/dist/{chunk-UEQWLVJB.js → chunk-RYKU62ZI.js} +1 -1
- package/dist/{chunk-3VPS7JPH.js → chunk-S2LDTUHS.js} +2 -2
- package/dist/{chunk-VDPU4YQN.js → chunk-TCVFNLMM.js} +20 -14
- package/dist/{chunk-GP44LTXN.js → chunk-TDSLVFG6.js} +1 -1
- package/dist/{chunk-QOBOIFGG.js → chunk-TVDI7SX2.js} +26 -7
- package/dist/{chunk-DYQ5QIDN.js → chunk-U5SXTKZV.js} +2 -2
- package/dist/{chunk-CMZ4CW5J.js → chunk-U6QEHPEF.js} +3 -3
- package/dist/{chunk-SQJUXVLW.js → chunk-UUBEEKT6.js} +2 -2
- package/dist/{chunk-TSGQYARU.js → chunk-VUHT6NYV.js} +4 -4
- package/dist/{chunk-E2FGVADR.js → chunk-WIRM7ZLI.js} +2 -2
- package/dist/{chunk-LBDMCNQY.js → chunk-WL4PVINO.js} +2 -2
- package/dist/{chunk-AWD2SLNA.js → chunk-WP57USIT.js} +13 -4
- package/dist/{chunk-PNBJAYSL.js → chunk-Y25RH4VF.js} +1 -1
- package/dist/{chunk-TZCHW6KR.js → chunk-YI37QERZ.js} +4 -4
- package/dist/{chunk-4DWQNP52.js → chunk-ZAH3CCEV.js} +4 -4
- package/dist/{global-upgrade-OCZWEF3A.js → global-upgrade-NIFOQFV4.js} +6 -6
- package/dist/{paths-SOGZJICO.js → paths-QPBLO5Q2.js} +2 -2
- package/dist/{reapply-DFG5IE6N.js → reapply-TVMBJWJB.js} +20 -20
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +19 -19
- package/dist/{upgrade-lock-XLE5GVWS.js → upgrade-lock-Z3LYROGK.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-PMUOEEUE.js +0 -50
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
IDLE_PROMPT_NOTIFICATION,
|
|
3
3
|
NOTIFICATION_PUSH_TYPES,
|
|
4
4
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JRKUJOZL.js";
|
|
6
6
|
import {
|
|
7
7
|
cancelQuestion,
|
|
8
8
|
clientErrorKindOf,
|
|
@@ -10,26 +10,26 @@ import {
|
|
|
10
10
|
reportClientError,
|
|
11
11
|
sendNotification,
|
|
12
12
|
waitForAnswer
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JVUK5YFM.js";
|
|
14
14
|
import {
|
|
15
15
|
withRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-LYDO2SS6.js";
|
|
17
17
|
import {
|
|
18
18
|
getMachineId
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-43ORAXAL.js";
|
|
20
20
|
import {
|
|
21
21
|
reportedInstallSource
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NPRFA7YM.js";
|
|
23
23
|
import {
|
|
24
24
|
canonicalJson
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WP57USIT.js";
|
|
26
26
|
import {
|
|
27
27
|
writeFileAtomic
|
|
28
28
|
} from "./chunk-T7E75EKA.js";
|
|
29
29
|
import {
|
|
30
30
|
getApiKey,
|
|
31
31
|
getBaseUrl
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-7JM6TCMA.js";
|
|
33
33
|
import {
|
|
34
34
|
ACTION_BODY_MAX,
|
|
35
35
|
AGENT_LABELS_BY_TYPE,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
resolvePolicy,
|
|
59
59
|
toToolLookup,
|
|
60
60
|
truncateLine
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-TVDI7SX2.js";
|
|
62
62
|
|
|
63
63
|
// ../hook-mapping/src/describe.ts
|
|
64
64
|
import { isAbsolute, relative, resolve } from "path";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3VSMTCXV.js";
|
|
4
4
|
import {
|
|
5
5
|
hookOwnerOf,
|
|
6
6
|
hookOwnerOfCommands,
|
|
7
7
|
liveBridgeProbe,
|
|
8
8
|
resolveBridgeStub
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-226PID65.js";
|
|
10
10
|
import {
|
|
11
11
|
AGENT_CHOICES
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6MGD24SH.js";
|
|
13
13
|
import {
|
|
14
14
|
claudeSettings,
|
|
15
15
|
codexHooksJson,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
guardedArgv,
|
|
19
19
|
pusharyDir,
|
|
20
20
|
vscodePluginDir
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-WP57USIT.js";
|
|
22
22
|
import {
|
|
23
23
|
readJsonSafe
|
|
24
24
|
} from "./chunk-T7E75EKA.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
HOOK_LOCATOR_BINARY,
|
|
29
29
|
OPENCODE_APPROVAL_EVENT,
|
|
30
30
|
hookCompatibleProfile
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-TVDI7SX2.js";
|
|
32
32
|
|
|
33
33
|
// src/opencode-plugin.ts
|
|
34
34
|
var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LHLUKFJV.js";
|
|
4
4
|
import {
|
|
5
5
|
namedEvent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3VSMTCXV.js";
|
|
7
7
|
import {
|
|
8
8
|
writeDegraded
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JVUK5YFM.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeShapedHookInput,
|
|
12
12
|
hookCompatibleProfileBySource
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TVDI7SX2.js";
|
|
14
14
|
|
|
15
15
|
// src/tool-hook-input.ts
|
|
16
16
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WP57USIT.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe,
|
|
6
6
|
writeFileAtomic
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
serializeDeclinedAgents,
|
|
14
14
|
withDeclinedAgent,
|
|
15
15
|
withoutDeclinedAgent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TVDI7SX2.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
forkFinishWithUpgradeLock,
|
|
5
5
|
installWithUpgradeLock,
|
|
6
6
|
releaseAutoUpdateLock
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Y25RH4VF.js";
|
|
8
8
|
import {
|
|
9
9
|
describeAutoUpdateCheck,
|
|
10
10
|
globalInstallLocation,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
readAutoUpdateState,
|
|
15
15
|
updateAutoUpdateState,
|
|
16
16
|
upgradeEntryFor
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MPDJJNGA.js";
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "./chunk-KZERVKTD.js";
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
npmErrorMessage,
|
|
28
28
|
readGlobalCliInstallAt,
|
|
29
29
|
readGlobalPrefix
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-WP57USIT.js";
|
|
31
31
|
import {
|
|
32
32
|
NPX_LATEST_COMMAND
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-4ATFPZ6X.js";
|
|
34
34
|
import {
|
|
35
35
|
commandsPackage,
|
|
36
36
|
globalUpgradeEntry,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
isSameMajorVersion,
|
|
40
40
|
ownPackageRoot,
|
|
41
41
|
packageVersionAt
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-TVDI7SX2.js";
|
|
43
43
|
|
|
44
44
|
// src/global-upgrade.ts
|
|
45
45
|
import { existsSync } from "fs";
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
resolvePackageVersionFromBinary,
|
|
11
11
|
resolvePathBinary,
|
|
12
12
|
resolvePathBinaryAsync
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WP57USIT.js";
|
|
14
14
|
import {
|
|
15
15
|
MANAGED_PROVIDERS
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TVDI7SX2.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/codex-install.ts
|
|
19
19
|
var NATIVE_BINARY_MIN_BYTES = 20 * 1024 * 1024;
|
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SubscriptionRequiredError,
|
|
7
7
|
callMcpTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LYDO2SS6.js";
|
|
9
9
|
import {
|
|
10
10
|
installNetworkDefaults,
|
|
11
11
|
isNetworkFailure
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LUYAXSUS.js";
|
|
13
13
|
import {
|
|
14
14
|
clientReportClaims
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WP57USIT.js";
|
|
16
16
|
import {
|
|
17
17
|
getApiKey,
|
|
18
18
|
getBaseUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7JM6TCMA.js";
|
|
20
20
|
import {
|
|
21
21
|
ASK_AGENT_NAME_MAX,
|
|
22
22
|
ASK_QUESTION_MAX,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
DECISION_LINE_MAX,
|
|
25
25
|
degradedLine,
|
|
26
26
|
truncateLine
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-TVDI7SX2.js";
|
|
28
28
|
|
|
29
29
|
// src/client-report-claim.ts
|
|
30
30
|
import { createHash } from "crypto";
|
|
@@ -6,38 +6,38 @@ import {
|
|
|
6
6
|
} from "./chunk-SGZJ5LYH.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureDaemonRunning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-43IDNI4X.js";
|
|
10
10
|
import {
|
|
11
11
|
buildTranscriptRecords,
|
|
12
12
|
decodePublicKey,
|
|
13
13
|
generateSessionKey,
|
|
14
14
|
wrapSessionKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RI5E5JQS.js";
|
|
16
16
|
import {
|
|
17
17
|
fetchTranscriptRecipients,
|
|
18
18
|
uploadTranscriptRecords
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3EOXZYUE.js";
|
|
20
20
|
import {
|
|
21
21
|
transcriptEnvironmentPreference,
|
|
22
22
|
transcriptsEnabled
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-G54VGPRX.js";
|
|
24
24
|
import {
|
|
25
25
|
hookOwnerOf
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-226PID65.js";
|
|
27
27
|
import {
|
|
28
28
|
readTranscriptPreference
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-S2LDTUHS.js";
|
|
30
30
|
import {
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-WP57USIT.js";
|
|
34
34
|
import {
|
|
35
35
|
writeJsonAtomic
|
|
36
36
|
} from "./chunk-T7E75EKA.js";
|
|
37
37
|
import {
|
|
38
38
|
getApiKey,
|
|
39
39
|
getBaseUrl
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-7JM6TCMA.js";
|
|
41
41
|
|
|
42
42
|
// src/transcript-registration.ts
|
|
43
43
|
import { createHash } from "crypto";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-43ORAXAL.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7JM6TCMA.js";
|
|
10
10
|
import {
|
|
11
11
|
clientContextHeaders,
|
|
12
12
|
getPackageVersion
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TVDI7SX2.js";
|
|
14
14
|
|
|
15
15
|
// src/cli/net.ts
|
|
16
16
|
import { createRequire } from "module";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-U6QEHPEF.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LUYAXSUS.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7JM6TCMA.js";
|
|
10
10
|
|
|
11
11
|
// src/retry.ts
|
|
12
12
|
var isRetryable = (err) => {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-POFBE6ZY.js";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WP57USIT.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsonSafe,
|
|
9
9
|
writeJsonAtomic
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
cliPackagePathSegments,
|
|
15
15
|
globalUpgradeEntry,
|
|
16
16
|
ownPackageRoot
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TVDI7SX2.js";
|
|
18
18
|
|
|
19
19
|
// src/auto-update.ts
|
|
20
20
|
import { spawn } from "child_process";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-KZERVKTD.js";
|
|
4
4
|
import {
|
|
5
5
|
renderCommandHelp
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4ATFPZ6X.js";
|
|
7
7
|
import {
|
|
8
8
|
getPackageVersion
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TVDI7SX2.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/usage.ts
|
|
12
12
|
var exitOnHelpFlag = (command) => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6QPQG3Q5.js";
|
|
4
4
|
import {
|
|
5
5
|
codexHomeFrom,
|
|
6
6
|
resolvePathBinary
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WP57USIT.js";
|
|
8
8
|
import {
|
|
9
9
|
HOOK_COMPATIBLE_PROFILES
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TVDI7SX2.js";
|
|
11
11
|
|
|
12
12
|
// src/hermes-config.ts
|
|
13
13
|
import { execFileSync } from "child_process";
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import {
|
|
2
|
+
compatibleConfigFile,
|
|
3
|
+
hasCompatibleHooks
|
|
4
|
+
} from "./chunk-3VSMTCXV.js";
|
|
5
|
+
import {
|
|
6
|
+
pusharyHookExecutable
|
|
7
|
+
} from "./chunk-226PID65.js";
|
|
8
|
+
import {
|
|
9
|
+
isProtectedByScope,
|
|
10
|
+
registerHookEntry
|
|
11
|
+
} from "./chunk-WP57USIT.js";
|
|
12
|
+
|
|
13
|
+
// src/cursor-config.ts
|
|
14
|
+
var hookCommandOf = (entry) => {
|
|
15
|
+
const command = entry && typeof entry === "object" && !Array.isArray(entry) ? entry.command : void 0;
|
|
16
|
+
return typeof command === "string" ? command : "";
|
|
17
|
+
};
|
|
18
|
+
var isPusharyCursorEntry = (entry) => pusharyHookExecutable(hookCommandOf(entry)) !== null;
|
|
19
|
+
var registerCursorGate = (existing, entry) => registerHookEntry(existing, isPusharyCursorEntry, entry);
|
|
20
|
+
var withoutPusharyCursorHooks = (hooks, scope) => {
|
|
21
|
+
let removed = 0;
|
|
22
|
+
const kept = {};
|
|
23
|
+
for (const [event, entries] of Object.entries(hooks)) {
|
|
24
|
+
if (!Array.isArray(entries)) {
|
|
25
|
+
kept[event] = entries;
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
const others = entries.filter((entry) => !isPusharyCursorEntry(entry) || isProtectedByScope(hookCommandOf(entry), scope));
|
|
29
|
+
removed += entries.length - others.length;
|
|
30
|
+
if (others.length > 0 || entries.length === 0) kept[event] = others;
|
|
31
|
+
}
|
|
32
|
+
return { hooks: kept, removed };
|
|
33
|
+
};
|
|
34
|
+
var CURSOR_PLUGIN_NAME = "pushary";
|
|
35
|
+
var CURSOR_PLUGIN_STAGING_PREFIX = ".pushary-staging-";
|
|
36
|
+
var CURSOR_PLUGIN_BACKUP_INFIX = ".pushary-backup-";
|
|
37
|
+
var isCursorPluginLeftover = (name) => name.startsWith(`${CURSOR_PLUGIN_NAME}${CURSOR_PLUGIN_BACKUP_INFIX}`) || name.startsWith(CURSOR_PLUGIN_STAGING_PREFIX);
|
|
38
|
+
var isPusharyCursorPluginManifest = (contents) => {
|
|
39
|
+
try {
|
|
40
|
+
const manifest = JSON.parse(contents);
|
|
41
|
+
return typeof manifest === "object" && manifest !== null && !Array.isArray(manifest) && manifest.name === CURSOR_PLUGIN_NAME;
|
|
42
|
+
} catch {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// src/sole-gate.ts
|
|
48
|
+
import { homedir } from "os";
|
|
49
|
+
import { join } from "path";
|
|
50
|
+
var soleGateFile = (gate, home = homedir()) => join(home, ...gate.file);
|
|
51
|
+
var soleGateReceiptFile = (gate, home = homedir()) => join(home, ...gate.receipt);
|
|
52
|
+
var soleGateReceipt = (gate) => ({ key: gate.key, value: gate.value });
|
|
53
|
+
var isJsonRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
54
|
+
var isSoleGateReceipt = (value, gate) => isJsonRecord(value) && value.key === gate.key && value.value === gate.value;
|
|
55
|
+
var parseJsonRecord = (raw) => {
|
|
56
|
+
if (raw === null) return { kind: "missing" };
|
|
57
|
+
try {
|
|
58
|
+
const value = JSON.parse(raw);
|
|
59
|
+
return isJsonRecord(value) ? { kind: "record", value } : { kind: "unreadable" };
|
|
60
|
+
} catch {
|
|
61
|
+
return { kind: "unreadable" };
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var claimSoleGate = (settings, gate) => {
|
|
65
|
+
const current = settings[gate.key];
|
|
66
|
+
if (current === void 0) {
|
|
67
|
+
settings[gate.key] = gate.value;
|
|
68
|
+
return { kind: "claimed" };
|
|
69
|
+
}
|
|
70
|
+
return current === gate.value ? { kind: "already_sole_gate" } : { kind: "agent_prompt_chosen", current: String(current) };
|
|
71
|
+
};
|
|
72
|
+
var releaseSoleGateSetting = (settings, gate) => {
|
|
73
|
+
if (settings[gate.key] !== gate.value) return false;
|
|
74
|
+
delete settings[gate.key];
|
|
75
|
+
return true;
|
|
76
|
+
};
|
|
77
|
+
var stillGatedByPushary = (profile, files, home) => {
|
|
78
|
+
const hooks = parseJsonRecord(files.read(compatibleConfigFile(profile, home)));
|
|
79
|
+
if (hooks.kind === "missing") return false;
|
|
80
|
+
return hooks.kind === "unreadable" || hasCompatibleHooks(hooks.value, profile);
|
|
81
|
+
};
|
|
82
|
+
var releaseSoleGate = (profile, files, home) => {
|
|
83
|
+
const gate = profile.soleGate;
|
|
84
|
+
if (!gate) return null;
|
|
85
|
+
if (stillGatedByPushary(profile, files, home)) return { kind: "still_gated" };
|
|
86
|
+
const receiptPath = soleGateReceiptFile(gate, home);
|
|
87
|
+
const receipt = parseJsonRecord(files.read(receiptPath));
|
|
88
|
+
if (receipt.kind !== "record" || !isSoleGateReceipt(receipt.value, gate)) return { kind: "not_set_by_pushary" };
|
|
89
|
+
const path = soleGateFile(gate, home);
|
|
90
|
+
const settings = parseJsonRecord(files.read(path));
|
|
91
|
+
if (settings.kind === "unreadable") return { kind: "unreadable", path };
|
|
92
|
+
const restored = settings.kind === "record" && releaseSoleGateSetting(settings.value, gate);
|
|
93
|
+
if (restored) files.write(path, `${JSON.stringify(settings.value, null, 2)}
|
|
94
|
+
`);
|
|
95
|
+
files.remove(receiptPath);
|
|
96
|
+
return restored ? { kind: "restored", path } : { kind: "changed_since", path };
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export {
|
|
100
|
+
registerCursorGate,
|
|
101
|
+
withoutPusharyCursorHooks,
|
|
102
|
+
CURSOR_PLUGIN_STAGING_PREFIX,
|
|
103
|
+
CURSOR_PLUGIN_BACKUP_INFIX,
|
|
104
|
+
isCursorPluginLeftover,
|
|
105
|
+
isPusharyCursorPluginManifest,
|
|
106
|
+
soleGateFile,
|
|
107
|
+
soleGateReceiptFile,
|
|
108
|
+
soleGateReceipt,
|
|
109
|
+
claimSoleGate,
|
|
110
|
+
releaseSoleGate
|
|
111
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MCP_BRIDGE_BINARY
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WL4PVINO.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_FILE_MODE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-S2LDTUHS.js";
|
|
7
7
|
import {
|
|
8
8
|
NpmMissingError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WP57USIT.js";
|
|
10
10
|
import {
|
|
11
11
|
readJsonSafe,
|
|
12
12
|
writeFileAtomic,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-T7E75EKA.js";
|
|
15
15
|
import {
|
|
16
16
|
NPX_LATEST_COMMAND
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4ATFPZ6X.js";
|
|
18
18
|
|
|
19
19
|
// src/instruction-file.ts
|
|
20
20
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync } from "fs";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand,
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WP57USIT.js";
|
|
12
12
|
import {
|
|
13
13
|
getPackageVersion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TVDI7SX2.js";
|
|
15
15
|
|
|
16
16
|
// src/codex-app-server.ts
|
|
17
17
|
import { existsSync, realpathSync } from "fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NPRFA7YM.js";
|
|
4
4
|
import {
|
|
5
5
|
backupFile,
|
|
6
6
|
readJsonSafe,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-T7E75EKA.js";
|
|
10
10
|
import {
|
|
11
11
|
configFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7JM6TCMA.js";
|
|
13
13
|
|
|
14
14
|
// src/shell-alias.ts
|
|
15
15
|
import { homedir } from "os";
|