@pushary/agent-hooks 1.9.58 → 1.9.60
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 +14 -0
- package/data/cursor-plugin/.cursor-plugin/plugin.json +5 -1
- package/data/cursor-plugin/CHANGELOG.md +4 -0
- package/dist/{api-WVXBM4MR.js → api-ASQA5PZM.js} +11 -11
- package/dist/bin/pushary-bell-hook.js +29 -29
- package/dist/bin/pushary-bell.js +12 -12
- package/dist/bin/pushary-claude.js +31 -30
- package/dist/bin/pushary-clean.js +58 -53
- package/dist/bin/pushary-codex-bridge.js +22 -22
- package/dist/bin/pushary-codex-hook.js +34 -34
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +15 -15
- package/dist/bin/pushary-connect.js +29 -29
- package/dist/bin/pushary-cowork.js +7 -7
- package/dist/bin/pushary-daemon.js +39 -39
- package/dist/bin/pushary-disconnect.js +42 -29
- package/dist/bin/pushary-doctor.js +51 -47
- package/dist/bin/pushary-elicitation-hook.js +29 -29
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +31 -31
- package/dist/bin/pushary-hook.js +33 -33
- package/dist/bin/pushary-login.js +22 -19
- package/dist/bin/pushary-logout.js +36 -31
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +41 -55
- package/dist/bin/pushary-notification-hook.js +28 -28
- package/dist/bin/pushary-opencode-hook.js +30 -30
- package/dist/bin/pushary-permission-denied-hook.js +33 -33
- package/dist/bin/pushary-permission-hook.js +32 -32
- package/dist/bin/pushary-post-hook.js +28 -28
- package/dist/bin/pushary-prompt-hook.js +28 -28
- package/dist/bin/pushary-session-end-hook.js +28 -28
- package/dist/bin/pushary-session-start-hook.js +35 -35
- package/dist/bin/pushary-setup.js +49 -46
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +41 -36
- package/dist/bin/pushary-stop-hook.js +28 -28
- package/dist/bin/pushary-stopfailure-hook.js +28 -28
- package/dist/bin/pushary-suggestions.js +33 -39
- package/dist/bin/pushary-transcript-register.js +20 -20
- package/dist/bin/pushary-transcripts.js +33 -20
- package/dist/bin/pushary-upgrade.js +71 -50
- package/dist/bin/pushary-wait.js +36 -42
- package/dist/bin/pushary.js +8 -8
- package/dist/{chunk-JSQOHMNJ.js → chunk-2AELPDMT.js} +1 -1
- package/dist/{chunk-WVP6UQG3.js → chunk-2QREHU4O.js} +11 -4
- package/dist/{chunk-QTCFEKLJ.js → chunk-33OOEVPG.js} +1 -1
- package/dist/{chunk-QDFLBTUP.js → chunk-4MUFZU2G.js} +1 -1
- package/dist/{chunk-5DZHKNBU.js → chunk-4MWRR5IT.js} +8 -7
- package/dist/{chunk-XEJV3QSS.js → chunk-4PZXI7WU.js} +3 -3
- package/dist/{chunk-UMVVQXAC.js → chunk-56JCQQLS.js} +2 -2
- package/dist/{chunk-JZKEC4XJ.js → chunk-5RU35K57.js} +3 -12
- package/dist/{chunk-HRHAZ3GE.js → chunk-625DZLT5.js} +6 -6
- package/dist/{chunk-3KOPY2UQ.js → chunk-6LOQE4J4.js} +3 -3
- package/dist/{chunk-K5CAURU5.js → chunk-6MC2XXFD.js} +4 -4
- package/dist/{chunk-MYBCXDIL.js → chunk-6MJWYYAS.js} +62 -49
- package/dist/chunk-7BHI3PZN.js +41 -0
- package/dist/{chunk-C3IWX6KU.js → chunk-7JXJJNQ5.js} +1 -1
- package/dist/{chunk-CK5BCFQF.js → chunk-7WFRY6OL.js} +2 -2
- package/dist/{chunk-4YNNAF53.js → chunk-ADR3KHOC.js} +2 -2
- package/dist/{chunk-XTZHUIGJ.js → chunk-ATKN4BJT.js} +1 -1
- package/dist/{chunk-GZL3KEPC.js → chunk-AXJLJJ3M.js} +147 -136
- package/dist/{chunk-LVDC3RUE.js → chunk-BG4Y64FW.js} +1 -1
- package/dist/{chunk-KSVCCSAO.js → chunk-CDQHQAS7.js} +9 -7
- package/dist/{chunk-TN74MUMB.js → chunk-CEQ2AZH4.js} +13 -13
- package/dist/{chunk-X6F4BQEE.js → chunk-CSOROFJY.js} +5 -5
- package/dist/{chunk-CZULJ647.js → chunk-DJ7EZIQA.js} +3 -3
- package/dist/{chunk-IUOUNRLH.js → chunk-ELLJPP6O.js} +2 -2
- package/dist/{chunk-5SFM6XB4.js → chunk-ERK24P76.js} +12 -2
- package/dist/{chunk-DQ565WFA.js → chunk-EZHY65QA.js} +21 -11
- package/dist/{chunk-4LUPZ347.js → chunk-FDWMG6NY.js} +2 -2
- package/dist/{chunk-S5LX25XE.js → chunk-FUZ5VYWD.js} +1 -1
- package/dist/{chunk-N3NSWWNU.js → chunk-GAMVAORR.js} +1 -1
- package/dist/{chunk-QP3XPS5U.js → chunk-HC3FHDKB.js} +6 -6
- package/dist/{chunk-ATUZX4K7.js → chunk-IF26ZGZ7.js} +3 -3
- package/dist/{chunk-CSQJCXPX.js → chunk-J4KQL7YZ.js} +5 -5
- package/dist/{chunk-M7NX25ZA.js → chunk-K4MBKXAE.js} +1 -1
- package/dist/{chunk-PZOFPAPG.js → chunk-L3AFVFGQ.js} +2 -2
- package/dist/{chunk-S54YLXWW.js → chunk-METMK3L4.js} +4 -4
- package/dist/{chunk-ZEHUWE3X.js → chunk-MUNL23WE.js} +6 -6
- package/dist/{chunk-3TJLPABQ.js → chunk-NKLNU577.js} +5 -5
- package/dist/{chunk-GMXKITVA.js → chunk-NMUI3ZWG.js} +1 -1
- package/dist/{chunk-IJ6XKKQW.js → chunk-O6IUZGWV.js} +1 -1
- package/dist/chunk-PPY5N2E6.js +58 -0
- package/dist/{chunk-XWY4UW62.js → chunk-PUHP4IBA.js} +4 -4
- package/dist/{chunk-T2AC5VFQ.js → chunk-QGSHV3WO.js} +5 -5
- package/dist/{chunk-RGQEULXD.js → chunk-QLMOU57V.js} +28 -17
- package/dist/{chunk-FAGDOPQI.js → chunk-QUBIEZXC.js} +3 -3
- package/dist/{chunk-XFUKCBPU.js → chunk-RLVJ6TVL.js} +23 -23
- package/dist/{chunk-VPZ5K72D.js → chunk-RPPXQNIA.js} +1 -1
- package/dist/{chunk-MCHOBQHE.js → chunk-S54C6TQC.js} +7 -6
- package/dist/{chunk-ZL3UR6M5.js → chunk-SEILUNWB.js} +3 -3
- package/dist/{chunk-4JJ3T7IE.js → chunk-SOCJ2N3E.js} +6 -6
- package/dist/{chunk-JYXIARGW.js → chunk-SVQWHV65.js} +1 -1
- package/dist/{chunk-T2BEIPK2.js → chunk-U7NR4JVD.js} +4 -4
- package/dist/{chunk-LVWXRXT7.js → chunk-USE5IEEW.js} +1 -1
- package/dist/{chunk-OHD35NPC.js → chunk-V57XLKZL.js} +2 -2
- package/dist/{chunk-KIH5BDH5.js → chunk-VIJIG5YL.js} +2 -2
- package/dist/{chunk-RF74KBF5.js → chunk-W2IVTHIG.js} +9 -9
- package/dist/{chunk-WXZN5CS3.js → chunk-WFSGCFXQ.js} +2 -2
- package/dist/{chunk-IRZ5FVWG.js → chunk-WN3RACVD.js} +3 -3
- package/dist/{chunk-3WNOO7BM.js → chunk-WXPVVXBU.js} +4 -4
- package/dist/{chunk-HUWLEVL2.js → chunk-WXZHQ3TT.js} +5 -5
- package/dist/chunk-X3YKQJCZ.js +36 -0
- package/dist/{chunk-I43PY5G3.js → chunk-XEJOPVCG.js} +1 -1
- package/dist/{chunk-ECJJKDP7.js → chunk-XV6S5PWW.js} +3 -3
- package/dist/{chunk-ZJNU32VE.js → chunk-Y5V4PA2Z.js} +155 -37
- package/dist/{chunk-7RZO6VWD.js → chunk-Y5VKZNFN.js} +2 -2
- package/dist/{chunk-VLJ5C6IT.js → chunk-YGE6ML3O.js} +4 -4
- package/dist/{chunk-XXNT4FGA.js → chunk-YPD3MTFU.js} +1 -1
- package/dist/{chunk-KW6EYFZV.js → chunk-ZGOJLNKS.js} +4 -4
- package/dist/{codex-app-cards-switch-TVKXJWXE.js → codex-app-cards-switch-ZO76D2NY.js} +11 -11
- package/dist/{codex-desktop-launch-ROTJEEGF.js → codex-desktop-launch-MJT5E3O3.js} +1 -1
- package/dist/{codex-session-launch-VL6ZQA3N.js → codex-session-launch-PTFCVIC7.js} +19 -19
- package/dist/{config-SYLUYZQE.js → config-SXV6XNVU.js} +3 -3
- package/dist/{global-upgrade-IPWV5PTM.js → global-upgrade-ETDP32LO.js} +9 -9
- package/dist/{identity-ARPAUNGN.js → identity-OOLIOSMR.js} +4 -4
- package/dist/{live-capabilities-EWTRY2HA.js → live-capabilities-2XIFA7YO.js} +4 -4
- package/dist/{paths-IZTNMJAQ.js → paths-IIOQZESZ.js} +3 -3
- package/dist/{reapply-ILKOYYKA.js → reapply-KFAJSKOQ.js} +28 -28
- package/dist/src/index.js +22 -22
- package/dist/{upgrade-lock-ML73QXIG.js → upgrade-lock-T6ILR644.js} +4 -4
- package/dist/{usage-OUV76AIY.js → usage-6TN7FVWS.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-7QLSKOSU.js +0 -19
- package/dist/chunk-EO23EUOK.js +0 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-56JCQQLS.js";
|
|
4
4
|
import {
|
|
5
5
|
CODEX_INSTRUCTIONS_LABEL,
|
|
6
6
|
GEMINI_INSTRUCTIONS_LABEL,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
macAppFxBridge,
|
|
12
12
|
refreshInstructionBlock,
|
|
13
13
|
renderAgentInstructions
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WXZHQ3TT.js";
|
|
15
15
|
import {
|
|
16
16
|
OPENCODE_HOOK_BINARY,
|
|
17
17
|
agentHookOwner,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
openCodeInstructionsFile,
|
|
22
22
|
openCodePluginDir,
|
|
23
23
|
openCodeWired
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-QGSHV3WO.js";
|
|
25
25
|
import {
|
|
26
26
|
detectClaudeVersion
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-USE5IEEW.js";
|
|
28
28
|
import {
|
|
29
29
|
addClaudeMcpServer,
|
|
30
30
|
addCompatibleHooks,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
compatibleConfigFile,
|
|
34
34
|
compatibleInstructionsFile,
|
|
35
35
|
hasCompatibleHooks
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-PUHP4IBA.js";
|
|
37
37
|
import {
|
|
38
38
|
claudeUnprovenHolds,
|
|
39
39
|
claudeWired,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
codexWired,
|
|
42
42
|
geminiWired,
|
|
43
43
|
planHooks
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-CDQHQAS7.js";
|
|
45
45
|
import {
|
|
46
46
|
CLAUDE_HOOK_BINARY,
|
|
47
47
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
needsReregistration,
|
|
53
53
|
registrationSignatures,
|
|
54
54
|
supportedClaudeEvents
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-IF26ZGZ7.js";
|
|
56
56
|
import {
|
|
57
57
|
formatVersion
|
|
58
58
|
} from "./chunk-6ICPEJY5.js";
|
|
@@ -61,7 +61,9 @@ import {
|
|
|
61
61
|
addCodexHookTrust,
|
|
62
62
|
addCodexHooks,
|
|
63
63
|
addCodexMcpServer,
|
|
64
|
+
claudeJson,
|
|
64
65
|
claudeRegistrationReceipt,
|
|
66
|
+
claudeSettings,
|
|
65
67
|
codexAgentsMd,
|
|
66
68
|
codexConfigToml,
|
|
67
69
|
codexHookPositions,
|
|
@@ -80,11 +82,11 @@ import {
|
|
|
80
82
|
registeredCommands,
|
|
81
83
|
registrationHolderOf,
|
|
82
84
|
vscodePluginMcp
|
|
83
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-6MJWYYAS.js";
|
|
84
86
|
import {
|
|
85
87
|
resolveGlobalBinDir,
|
|
86
88
|
resolveGlobalBinary
|
|
87
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-2QREHU4O.js";
|
|
88
90
|
import {
|
|
89
91
|
readJsonSafe,
|
|
90
92
|
writeFileAtomic,
|
|
@@ -94,7 +96,7 @@ import {
|
|
|
94
96
|
HOOK_COMPATIBLE_PROFILES,
|
|
95
97
|
isCompatibleAgentType,
|
|
96
98
|
isRecord
|
|
97
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
98
100
|
|
|
99
101
|
// src/reapply.ts
|
|
100
102
|
import { dirname, join } from "path";
|
|
@@ -137,8 +139,6 @@ var storedSignatures = (raw) => {
|
|
|
137
139
|
};
|
|
138
140
|
|
|
139
141
|
// src/reapply.ts
|
|
140
|
-
var CLAUDE_SETTINGS = join(homedir(), ".claude", "settings.json");
|
|
141
|
-
var CLAUDE_JSON = join(homedir(), ".claude.json");
|
|
142
142
|
var readJson = (filePath) => {
|
|
143
143
|
const result = readJsonSafe(filePath);
|
|
144
144
|
if (result.kind === "ok") return isRecord(result.value) ? result.value : null;
|
|
@@ -147,7 +147,7 @@ var readJson = (filePath) => {
|
|
|
147
147
|
};
|
|
148
148
|
var writeJson = (filePath, data) => writeJsonAtomic(filePath, data);
|
|
149
149
|
var hasPusharyClaudeHooks = (settings) => JSON.stringify(settings.hooks ?? {}).includes(CLAUDE_HOOK_BINARY);
|
|
150
|
-
var hasPusharyMcp = (
|
|
150
|
+
var hasPusharyMcp = (claudeJson2) => !!claudeJson2.mcpServers?.pushary;
|
|
151
151
|
var PRIVATE_TO_OWNER = 384;
|
|
152
152
|
var modeToPreserve = (filePath) => {
|
|
153
153
|
try {
|
|
@@ -158,14 +158,14 @@ var modeToPreserve = (filePath) => {
|
|
|
158
158
|
};
|
|
159
159
|
var wouldWriteBareNames = (resolve, probe) => resolve(probe) === void 0;
|
|
160
160
|
var reapplyClaudeSettings = (apiKey, paths = {}) => {
|
|
161
|
-
const settingsPath = paths.settingsPath ??
|
|
162
|
-
const claudeJsonPath = paths.claudeJsonPath ??
|
|
161
|
+
const settingsPath = paths.settingsPath ?? claudeSettings();
|
|
162
|
+
const claudeJsonPath = paths.claudeJsonPath ?? claudeJson();
|
|
163
163
|
const settings = readJson(settingsPath);
|
|
164
|
-
const
|
|
165
|
-
const configured = settings != null && hasPusharyClaudeHooks(settings) ||
|
|
164
|
+
const claudeJson2 = readJson(claudeJsonPath);
|
|
165
|
+
const configured = settings != null && hasPusharyClaudeHooks(settings) || claudeJson2 != null && hasPusharyMcp(claudeJson2);
|
|
166
166
|
if (!configured) return { configured: false, reapplied: false, hooks: false, mcp: false };
|
|
167
167
|
const settingsWritable = settings != null;
|
|
168
|
-
const claudeJsonWritable =
|
|
168
|
+
const claudeJsonWritable = claudeJson2 != null;
|
|
169
169
|
let hooks = false;
|
|
170
170
|
let mcp = false;
|
|
171
171
|
let failed = false;
|
|
@@ -183,7 +183,7 @@ var reapplyClaudeSettings = (apiKey, paths = {}) => {
|
|
|
183
183
|
if (apiKey) {
|
|
184
184
|
try {
|
|
185
185
|
if (!claudeJsonWritable) throw new Error(".claude.json could not be parsed");
|
|
186
|
-
const cj =
|
|
186
|
+
const cj = claudeJson2;
|
|
187
187
|
addClaudeMcpServer(cj, apiKey);
|
|
188
188
|
writeJson(claudeJsonPath, cj);
|
|
189
189
|
mcp = true;
|
|
@@ -196,7 +196,7 @@ var reapplyClaudeSettings = (apiKey, paths = {}) => {
|
|
|
196
196
|
var reapplyClaudeForVersion = (apiKey, paths = {}) => {
|
|
197
197
|
const idle = { verdict: "current", rewrote: false, missing: [] };
|
|
198
198
|
try {
|
|
199
|
-
const settingsPath = paths.settingsPath ??
|
|
199
|
+
const settingsPath = paths.settingsPath ?? claudeSettings();
|
|
200
200
|
const receiptPath = paths.receiptPath ?? claudeRegistrationReceipt();
|
|
201
201
|
const version = (paths.detectVersion ?? detectClaudeVersion)();
|
|
202
202
|
const receipt = readJsonSafe(receiptPath);
|
|
@@ -234,9 +234,9 @@ var readToml = (filePath) => {
|
|
|
234
234
|
};
|
|
235
235
|
var inspectConfiguredManagedProviders = (paths = {}) => {
|
|
236
236
|
const providers = [];
|
|
237
|
-
const
|
|
238
|
-
const
|
|
239
|
-
if (claudeWired({ claudeJson, settings:
|
|
237
|
+
const claudeSettings2 = readJson(paths.claudeSettingsPath ?? claudeSettings());
|
|
238
|
+
const claudeJson2 = readJson(paths.claudeJsonPath ?? claudeJson());
|
|
239
|
+
if (claudeWired({ claudeJson: claudeJson2, settings: claudeSettings2, skillExists: false })) {
|
|
240
240
|
providers.push("claude");
|
|
241
241
|
}
|
|
242
242
|
const codexConfig = readToml(paths.codexConfigPath ?? codexConfigToml());
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QGSHV3WO.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeClaudeInstallPath
|
|
6
6
|
} from "./chunk-VUFHYMSP.js";
|
|
7
7
|
import {
|
|
8
8
|
grokHome
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PUHP4IBA.js";
|
|
10
10
|
import {
|
|
11
|
+
claudeConfigDir,
|
|
11
12
|
codexHomeFrom
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6MJWYYAS.js";
|
|
13
14
|
import {
|
|
14
15
|
resolvePathBinary
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2QREHU4O.js";
|
|
16
17
|
import {
|
|
17
18
|
HOOK_COMPATIBLE_PROFILES
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
19
20
|
|
|
20
21
|
// src/hermes-config.ts
|
|
21
22
|
import { execFileSync } from "child_process";
|
|
@@ -510,7 +511,7 @@ var agentProbes = (home = homedir3(), platform = process.platform) => ({
|
|
|
510
511
|
binary: "claude",
|
|
511
512
|
// The native installer puts it here, outside a default non-login PATH.
|
|
512
513
|
paths: [nativeClaudeInstallPath(home, platform)],
|
|
513
|
-
configMarkers: [
|
|
514
|
+
configMarkers: [claudeConfigDir(home)]
|
|
514
515
|
},
|
|
515
516
|
codex: {
|
|
516
517
|
binary: "codex",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-METMK3L4.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4MWRR5IT.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BG4Y64FW.js";
|
|
10
10
|
|
|
11
11
|
// src/retry.ts
|
|
12
12
|
var isRetryable = (err) => {
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
forkFinishWithUpgradeLock,
|
|
4
4
|
installWithUpgradeLock,
|
|
5
5
|
releaseAutoUpdateLock
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VIJIG5YL.js";
|
|
7
7
|
import {
|
|
8
8
|
phoneStartIsRequired
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6LOQE4J4.js";
|
|
10
10
|
import {
|
|
11
11
|
describeAutoUpdateCheck,
|
|
12
12
|
globalInstallLocation,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
readAutoUpdateState,
|
|
19
19
|
updateAutoUpdateState,
|
|
20
20
|
upgradeEntryFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5RU35K57.js";
|
|
22
22
|
import {
|
|
23
23
|
EXIT
|
|
24
24
|
} from "./chunk-KZERVKTD.js";
|
|
@@ -26,17 +26,17 @@ import {
|
|
|
26
26
|
autoUpdateLock,
|
|
27
27
|
autoUpdateLog,
|
|
28
28
|
autoUpdateState
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-6MJWYYAS.js";
|
|
30
30
|
import {
|
|
31
31
|
execNpm,
|
|
32
32
|
fetchLatestPublishedVersion,
|
|
33
33
|
npmErrorMessage,
|
|
34
34
|
readGlobalCliInstallAt,
|
|
35
35
|
readGlobalPrefix
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-2QREHU4O.js";
|
|
37
37
|
import {
|
|
38
38
|
NPX_LATEST_COMMAND
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-ERK24P76.js";
|
|
40
40
|
import {
|
|
41
41
|
commandsPackage,
|
|
42
42
|
globalUpgradeEntry,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
macAppBridgeAvailable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QGSHV3WO.js";
|
|
4
4
|
import {
|
|
5
5
|
keyPrefix
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WN3RACVD.js";
|
|
7
7
|
import {
|
|
8
8
|
bridgeAgentKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6MJWYYAS.js";
|
|
10
10
|
import {
|
|
11
11
|
readJsonSafe
|
|
12
12
|
} from "./chunk-QENTGE75.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
16
16
|
|
|
17
17
|
// src/shared-mcp-key.ts
|
|
18
18
|
var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoUpdateLock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6MJWYYAS.js";
|
|
4
4
|
import {
|
|
5
5
|
installPackageGlobally,
|
|
6
6
|
npmErrorMessage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2QREHU4O.js";
|
|
8
8
|
import {
|
|
9
9
|
writeJsonAtomic
|
|
10
10
|
} from "./chunk-QENTGE75.js";
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
IDLE_PROMPT_NOTIFICATION,
|
|
3
3
|
NOTIFICATION_PUSH_TYPES,
|
|
4
4
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-33OOEVPG.js";
|
|
6
6
|
import {
|
|
7
7
|
repoKeyFor
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YPD3MTFU.js";
|
|
9
9
|
import {
|
|
10
10
|
cancelQuestion,
|
|
11
11
|
clientErrorKindOf,
|
|
@@ -13,26 +13,26 @@ import {
|
|
|
13
13
|
reportClientError,
|
|
14
14
|
sendNotification,
|
|
15
15
|
waitForAnswer
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EZHY65QA.js";
|
|
17
17
|
import {
|
|
18
18
|
withRetry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SEILUNWB.js";
|
|
20
20
|
import {
|
|
21
21
|
getMachineId
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-O6IUZGWV.js";
|
|
23
23
|
import {
|
|
24
24
|
reportedInstallSource
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-Y5VKZNFN.js";
|
|
26
26
|
import {
|
|
27
27
|
canonicalJson
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-6MJWYYAS.js";
|
|
29
29
|
import {
|
|
30
30
|
writeFileAtomic
|
|
31
31
|
} from "./chunk-QENTGE75.js";
|
|
32
32
|
import {
|
|
33
33
|
getApiKey,
|
|
34
34
|
getBaseUrl
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-BG4Y64FW.js";
|
|
36
36
|
import {
|
|
37
37
|
ACTION_BODY_MAX,
|
|
38
38
|
AGENTS,
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
toToolLookup,
|
|
67
67
|
truncateLine,
|
|
68
68
|
unansweredRefusalReason
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
70
70
|
|
|
71
71
|
// ../hook-mapping/src/describe.ts
|
|
72
72
|
import { isAbsolute, relative, resolve } from "path";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-QENTGE75.js";
|
|
5
5
|
import {
|
|
6
6
|
configFilePath
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-BG4Y64FW.js";
|
|
8
8
|
import {
|
|
9
9
|
readSetupOutcomeProperties
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
11
11
|
|
|
12
12
|
// src/hooks-spec.ts
|
|
13
13
|
var CURSOR_GATE_SCRIPT = "pushary-gate.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Y5VKZNFN.js";
|
|
4
4
|
import {
|
|
5
5
|
backupFile,
|
|
6
6
|
readJsonSafe,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-QENTGE75.js";
|
|
10
10
|
import {
|
|
11
11
|
configFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BG4Y64FW.js";
|
|
13
13
|
import {
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
17
17
|
|
|
18
18
|
// src/shell-alias.ts
|
|
19
19
|
import { homedir } from "os";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PUHP4IBA.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CDQHQAS7.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6MJWYYAS.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MCP_BRIDGE_BINARY
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FDWMG6NY.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_FILE_MODE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WN3RACVD.js";
|
|
7
7
|
import {
|
|
8
8
|
NpmInstallError,
|
|
9
9
|
NpmMissingError,
|
|
10
10
|
NpmPermissionError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2QREHU4O.js";
|
|
12
12
|
import {
|
|
13
13
|
readJsonSafe,
|
|
14
14
|
writeFileAtomic,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
} from "./chunk-QENTGE75.js";
|
|
17
17
|
import {
|
|
18
18
|
NPX_LATEST_COMMAND
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ERK24P76.js";
|
|
20
20
|
import {
|
|
21
21
|
readSetupAgentFailures
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
23
23
|
|
|
24
24
|
// src/instruction-file.ts
|
|
25
25
|
import { accessSync, constants, existsSync, readFileSync, statSync, writeFileSync, mkdirSync, rmSync } from "fs";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isApprovalMode,
|
|
3
|
+
isRecord,
|
|
4
|
+
isTimeoutAction
|
|
5
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
6
|
+
|
|
7
|
+
// src/cli/settings-response.ts
|
|
8
|
+
var isFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value);
|
|
9
|
+
var isWaitSeconds = (value) => isFiniteNumber(value) && value >= 0;
|
|
10
|
+
var isModeOverride = (value) => isRecord(value) && isApprovalMode(value.mode) && (value.expiresAt === null || typeof value.expiresAt === "string" && Number.isFinite(Date.parse(value.expiresAt)));
|
|
11
|
+
var modeResponse = (value) => {
|
|
12
|
+
if (!isRecord(value) || value.override !== null && !isModeOverride(value.override) || value.permanent !== void 0 && typeof value.permanent !== "boolean") throw new Error("Invalid mode response");
|
|
13
|
+
return { override: value.override, ...typeof value.permanent === "boolean" ? { permanent: value.permanent } : {} };
|
|
14
|
+
};
|
|
15
|
+
var isWaitPolicy = (value) => isRecord(value) && typeof value.tool === "string" && isApprovalMode(value.mode) && isTimeoutAction(value.timeoutAction) && isWaitSeconds(value.timeoutSeconds) && isWaitSeconds(value.pushFirstSeconds);
|
|
16
|
+
var waitWindowResponse = (value) => {
|
|
17
|
+
if (!isRecord(value) || !isWaitSeconds(value.defaultPushFirstSeconds)) throw new Error("Invalid wait response");
|
|
18
|
+
return value.defaultPushFirstSeconds;
|
|
19
|
+
};
|
|
20
|
+
var waitResponse = (value) => {
|
|
21
|
+
const defaultPushFirstSeconds = waitWindowResponse(value);
|
|
22
|
+
if (!isRecord(value) || !Array.isArray(value.policies) || !value.policies.every(isWaitPolicy) || value.modeOverride !== null && !isApprovalMode(value.modeOverride)) throw new Error("Invalid wait response");
|
|
23
|
+
return { policies: value.policies, defaultPushFirstSeconds, modeOverride: value.modeOverride };
|
|
24
|
+
};
|
|
25
|
+
var isSuggestion = (value) => isRecord(value) && typeof value.id === "string" && typeof value.toolPattern === "string" && (value.kind === "auto_approve" || value.kind === "always_deny") && isFiniteNumber(value.evidenceApproved) && isFiniteNumber(value.evidenceDenied) && isFiniteNumber(value.windowDays);
|
|
26
|
+
var suggestionsResponse = (value) => {
|
|
27
|
+
if (!isRecord(value) || !Array.isArray(value.suggestions) || !value.suggestions.every(isSuggestion)) throw new Error("Invalid suggestions response");
|
|
28
|
+
return value.suggestions;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
modeResponse,
|
|
33
|
+
waitWindowResponse,
|
|
34
|
+
waitResponse,
|
|
35
|
+
suggestionsResponse
|
|
36
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseFlags
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NMUI3ZWG.js";
|
|
4
4
|
import {
|
|
5
5
|
UsageError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PPY5N2E6.js";
|
|
7
7
|
import {
|
|
8
8
|
SETUP_AGENT_CHOICES,
|
|
9
9
|
SETUP_CONNECT_MODES,
|
|
10
10
|
isSetupConnectMode,
|
|
11
11
|
isValidApiKey,
|
|
12
12
|
normalizeAgentId
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
14
14
|
|
|
15
15
|
// src/setup/options.ts
|
|
16
16
|
var AGENT_CHOICES = SETUP_AGENT_CHOICES;
|