pushary 1.9.59 → 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 +7 -0
- package/data/cursor-plugin/.cursor-plugin/plugin.json +5 -1
- package/data/cursor-plugin/CHANGELOG.md +4 -0
- package/dist/{api-UVJGNZIF.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-PVANKDWM.js → chunk-2AELPDMT.js} +1 -1
- package/dist/{chunk-US3IT6ZC.js → chunk-2QREHU4O.js} +11 -4
- package/dist/{chunk-W47WL6JY.js → chunk-33OOEVPG.js} +1 -1
- package/dist/{chunk-AS4Z6KS4.js → chunk-4MUFZU2G.js} +1 -1
- package/dist/{chunk-JAKBCKEB.js → chunk-4MWRR5IT.js} +8 -7
- package/dist/{chunk-TCH5UCPR.js → chunk-4PZXI7WU.js} +2 -2
- package/dist/{chunk-IBXHVYN2.js → chunk-56JCQQLS.js} +2 -2
- package/dist/{chunk-5BNXJTOZ.js → chunk-5RU35K57.js} +3 -12
- package/dist/{chunk-T65RIQK2.js → chunk-625DZLT5.js} +6 -6
- package/dist/{chunk-5PP4455M.js → chunk-6LOQE4J4.js} +3 -3
- package/dist/{chunk-KQHY6L3X.js → chunk-6MC2XXFD.js} +4 -4
- package/dist/{chunk-KZCYHWDF.js → chunk-6MJWYYAS.js} +62 -49
- package/dist/chunk-7BHI3PZN.js +41 -0
- package/dist/{chunk-D6CXQIXO.js → chunk-7JXJJNQ5.js} +1 -1
- package/dist/{chunk-MSU3VKGJ.js → chunk-7WFRY6OL.js} +2 -2
- package/dist/{chunk-AY32RSUC.js → chunk-ADR3KHOC.js} +2 -2
- package/dist/{chunk-MMLIQDTG.js → chunk-ATKN4BJT.js} +1 -1
- package/dist/{chunk-762CDAJJ.js → chunk-AXJLJJ3M.js} +7 -0
- package/dist/{chunk-4XXZUFWN.js → chunk-BG4Y64FW.js} +1 -1
- package/dist/{chunk-X4ES7QBT.js → chunk-CDQHQAS7.js} +9 -7
- package/dist/{chunk-2WMZDKPM.js → chunk-CEQ2AZH4.js} +13 -13
- package/dist/{chunk-DK35M4TH.js → chunk-CSOROFJY.js} +5 -5
- package/dist/{chunk-2FVP7WRP.js → chunk-DJ7EZIQA.js} +3 -3
- package/dist/{chunk-V3PDUDPB.js → chunk-ELLJPP6O.js} +2 -2
- package/dist/{chunk-BMPZ5HVJ.js → chunk-ERK24P76.js} +11 -1
- package/dist/{chunk-WW24SG27.js → chunk-EZHY65QA.js} +21 -11
- package/dist/{chunk-3NROUNIS.js → chunk-FDWMG6NY.js} +2 -2
- package/dist/{chunk-RQDP2SJY.js → chunk-FUZ5VYWD.js} +1 -1
- package/dist/{chunk-3N2ZTHZZ.js → chunk-GAMVAORR.js} +1 -1
- package/dist/{chunk-4QF2YLYK.js → chunk-HC3FHDKB.js} +6 -6
- package/dist/{chunk-TDOKDCFH.js → chunk-IF26ZGZ7.js} +3 -3
- package/dist/{chunk-KHDD74MK.js → chunk-J4KQL7YZ.js} +5 -5
- package/dist/{chunk-UVZK5LIK.js → chunk-K4MBKXAE.js} +1 -1
- package/dist/{chunk-5O6D4J2K.js → chunk-L3AFVFGQ.js} +2 -2
- package/dist/{chunk-MA37WNVS.js → chunk-METMK3L4.js} +4 -4
- package/dist/{chunk-SIU6OWA6.js → chunk-MUNL23WE.js} +6 -6
- package/dist/{chunk-WWAVHLGS.js → chunk-NKLNU577.js} +5 -5
- package/dist/{chunk-GMXKITVA.js → chunk-NMUI3ZWG.js} +1 -1
- package/dist/{chunk-M46WDK64.js → chunk-O6IUZGWV.js} +1 -1
- package/dist/chunk-PPY5N2E6.js +58 -0
- package/dist/{chunk-KQWN7C5C.js → chunk-PUHP4IBA.js} +4 -4
- package/dist/{chunk-JBCMXSBO.js → chunk-QGSHV3WO.js} +5 -5
- package/dist/{chunk-VAJHDTJX.js → chunk-QLMOU57V.js} +28 -17
- package/dist/{chunk-UFJS4RR7.js → chunk-QUBIEZXC.js} +3 -3
- package/dist/{chunk-EBQTWH5O.js → chunk-RLVJ6TVL.js} +23 -23
- package/dist/{chunk-LAEW5QQD.js → chunk-RPPXQNIA.js} +1 -1
- package/dist/{chunk-YQVKG5MC.js → chunk-S54C6TQC.js} +7 -6
- package/dist/{chunk-5EFNBL6V.js → chunk-SEILUNWB.js} +3 -3
- package/dist/{chunk-L3NVHPBU.js → chunk-SOCJ2N3E.js} +6 -6
- package/dist/{chunk-RAMQBSVZ.js → chunk-SVQWHV65.js} +1 -1
- package/dist/{chunk-EHCIQA5D.js → chunk-U7NR4JVD.js} +4 -4
- package/dist/{chunk-M6MOQBR5.js → chunk-USE5IEEW.js} +1 -1
- package/dist/{chunk-UTJ5465F.js → chunk-V57XLKZL.js} +2 -2
- package/dist/{chunk-BRUHVTFB.js → chunk-VIJIG5YL.js} +2 -2
- package/dist/{chunk-5JWCWALO.js → chunk-W2IVTHIG.js} +9 -9
- package/dist/{chunk-OZIXBN3O.js → chunk-WFSGCFXQ.js} +2 -2
- package/dist/{chunk-KAJDKYUM.js → chunk-WN3RACVD.js} +3 -3
- package/dist/{chunk-MYU5D5VH.js → chunk-WXPVVXBU.js} +4 -4
- package/dist/{chunk-6ONSTCDJ.js → chunk-WXZHQ3TT.js} +5 -5
- package/dist/chunk-X3YKQJCZ.js +36 -0
- package/dist/{chunk-BKVX53QR.js → chunk-XEJOPVCG.js} +1 -1
- package/dist/{chunk-75UYYIFJ.js → chunk-XV6S5PWW.js} +3 -3
- package/dist/{chunk-CPRA7IEK.js → chunk-Y5V4PA2Z.js} +2 -2
- package/dist/{chunk-3RKIJM26.js → chunk-Y5VKZNFN.js} +2 -2
- package/dist/{chunk-DS7X36Z3.js → chunk-YGE6ML3O.js} +4 -4
- package/dist/{chunk-XGP5VSQG.js → chunk-YPD3MTFU.js} +1 -1
- package/dist/{chunk-KW3DED2A.js → chunk-ZGOJLNKS.js} +4 -4
- package/dist/{codex-app-cards-switch-N77RWKCO.js → codex-app-cards-switch-ZO76D2NY.js} +11 -11
- package/dist/{codex-desktop-launch-KIX7OMTL.js → codex-desktop-launch-MJT5E3O3.js} +1 -1
- package/dist/{codex-session-launch-XV7SIIWP.js → codex-session-launch-PTFCVIC7.js} +19 -19
- package/dist/{config-HH4DYYNX.js → config-SXV6XNVU.js} +3 -3
- package/dist/{global-upgrade-YWIVJIUR.js → global-upgrade-ETDP32LO.js} +9 -9
- package/dist/{identity-4J7Y2MW3.js → identity-OOLIOSMR.js} +4 -4
- package/dist/{live-capabilities-LHZBCI5U.js → live-capabilities-2XIFA7YO.js} +4 -4
- package/dist/{paths-ES3V7BWQ.js → paths-IIOQZESZ.js} +3 -3
- package/dist/{reapply-KA5SIYWX.js → reapply-KFAJSKOQ.js} +28 -28
- package/dist/src/index.js +22 -22
- package/dist/{upgrade-lock-TJPKU5HL.js → upgrade-lock-T6ILR644.js} +4 -4
- package/dist/{usage-7ALXBJVJ.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
|
@@ -12,6 +12,9 @@ import {
|
|
|
12
12
|
ownPackageName
|
|
13
13
|
} from "./chunk-QTOLNRET.js";
|
|
14
14
|
|
|
15
|
+
// src/shell-quote.ts
|
|
16
|
+
var shellDoubleQuoted = (text) => `"${text.replace(/(["\\$`])/g, "\\$1")}"`;
|
|
17
|
+
|
|
15
18
|
// src/npm.ts
|
|
16
19
|
import { promisify } from "util";
|
|
17
20
|
import { exec, execFile, execFileSync, execSync } from "child_process";
|
|
@@ -320,7 +323,10 @@ var resolveGlobalBinDir = (probe) => {
|
|
|
320
323
|
const resolved = resolveGlobalBinary(probe);
|
|
321
324
|
return resolved ? resolved.slice(0, resolved.length - probe.length - 1) : void 0;
|
|
322
325
|
};
|
|
323
|
-
var quoteIfNeeded = (path
|
|
326
|
+
var quoteIfNeeded = (path, platform = process.platform) => {
|
|
327
|
+
if (platform === "win32") return /\s/.test(path) ? `"${path}"` : path;
|
|
328
|
+
return /^[\w@%+=:,./-]+$/.test(path) ? path : shellDoubleQuoted(path);
|
|
329
|
+
};
|
|
324
330
|
var fetchLatestPublishedVersion = async (request) => {
|
|
325
331
|
try {
|
|
326
332
|
const response = await (request.fetchImpl ?? fetch)(latestReleaseUrl(request.packageName), {
|
|
@@ -360,9 +366,9 @@ var installGlobally = (options) => {
|
|
|
360
366
|
}
|
|
361
367
|
const started = (async () => {
|
|
362
368
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
363
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
364
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
365
|
-
const { autoUpdateLock } = await import("./paths-
|
|
369
|
+
const { withUpgradeLock } = await import("./global-upgrade-ETDP32LO.js");
|
|
370
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-T6ILR644.js");
|
|
371
|
+
const { autoUpdateLock } = await import("./paths-IIOQZESZ.js");
|
|
366
372
|
let result = "skipped";
|
|
367
373
|
const install = async () => {
|
|
368
374
|
const platform = process.platform;
|
|
@@ -395,6 +401,7 @@ var installGlobally = (options) => {
|
|
|
395
401
|
};
|
|
396
402
|
|
|
397
403
|
export {
|
|
404
|
+
shellDoubleQuoted,
|
|
398
405
|
LATEST_TAG,
|
|
399
406
|
cleanNpmEnv,
|
|
400
407
|
npmErrorMessage,
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-O6IUZGWV.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PPY5N2E6.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BG4Y64FW.js";
|
|
10
10
|
import {
|
|
11
11
|
getPackageVersion
|
|
12
12
|
} from "./chunk-QTOLNRET.js";
|
|
13
13
|
import {
|
|
14
|
-
clientContextHeaders
|
|
15
|
-
|
|
14
|
+
clientContextHeaders,
|
|
15
|
+
redactSecretsFromContent
|
|
16
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
16
17
|
|
|
17
18
|
// src/cli/net.ts
|
|
18
19
|
import { createRequire } from "module";
|
|
@@ -112,8 +113,8 @@ var pusharyFetch = async (url, init = {}) => {
|
|
|
112
113
|
} catch (err) {
|
|
113
114
|
if (isNetworkFailure(err)) {
|
|
114
115
|
const proxy = proxyFromEnv();
|
|
115
|
-
const via = proxy ?
|
|
116
|
-
throw new NetworkError(`Could not reach ${new URL(url).host}${via}: ${err instanceof Error ? err.message : String(err)}`);
|
|
116
|
+
const via = proxy ? " (via configured proxy)" : "";
|
|
117
|
+
throw new NetworkError(redactSecretsFromContent(`Could not reach ${new URL(url).host}${via}: ${err instanceof Error ? err.message : String(err)}`));
|
|
117
118
|
}
|
|
118
119
|
throw err;
|
|
119
120
|
}
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
everyProgramFileIsThere,
|
|
9
9
|
installedCodexApp,
|
|
10
10
|
shellQuoted
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-Y5V4PA2Z.js";
|
|
12
12
|
import {
|
|
13
13
|
writeHuman
|
|
14
14
|
} from "./chunk-QCGNGEGE.js";
|
|
15
15
|
import {
|
|
16
16
|
xml
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HC3FHDKB.js";
|
|
18
18
|
import {
|
|
19
19
|
CODEX_APP_LAUNCH_AT_LOGIN_VERB,
|
|
20
20
|
CODEX_APP_LAUNCH_VARIABLE
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
codexHome,
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6MJWYYAS.js";
|
|
11
11
|
import {
|
|
12
12
|
resolvePathBinary
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2QREHU4O.js";
|
|
14
14
|
import {
|
|
15
15
|
getPackageVersion
|
|
16
16
|
} from "./chunk-QTOLNRET.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-POFBE6ZY.js";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6MJWYYAS.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsonSafe,
|
|
9
9
|
writeJsonAtomic
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-QTOLNRET.js";
|
|
18
18
|
import {
|
|
19
19
|
isAutoUpdateResult
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
21
21
|
|
|
22
22
|
// src/auto-update.ts
|
|
23
23
|
import { spawn } from "child_process";
|
|
@@ -130,15 +130,6 @@ var readLocalAutoUpdateReport = () => {
|
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
|
-
var parseAutoUpdateFlag = (args) => {
|
|
134
|
-
const token = args.find((arg) => arg === AUTO_UPDATE_FLAG || arg.startsWith(`${AUTO_UPDATE_FLAG}=`));
|
|
135
|
-
if (token === void 0) return { kind: "absent" };
|
|
136
|
-
if (token === AUTO_UPDATE_FLAG) return { kind: "run" };
|
|
137
|
-
const value = token.slice(AUTO_UPDATE_FLAG.length + 1);
|
|
138
|
-
if (value === "on") return { kind: "set", enabled: true };
|
|
139
|
-
if (value === "off") return { kind: "set", enabled: false };
|
|
140
|
-
return { kind: "invalid", value };
|
|
141
|
-
};
|
|
142
133
|
var AUTO_UPDATE_RESULT_LABELS = {
|
|
143
134
|
updated: "updated",
|
|
144
135
|
finish_pending: "installed; configuration refresh pending",
|
|
@@ -209,13 +200,13 @@ var triggerAutoUpdate = (trigger) => {
|
|
|
209
200
|
|
|
210
201
|
export {
|
|
211
202
|
AUTO_UPDATE_DISABLE_ENV,
|
|
203
|
+
AUTO_UPDATE_FLAG,
|
|
212
204
|
isAutoUpdateDisabledByEnv,
|
|
213
205
|
autoUpdateOffReason,
|
|
214
206
|
globalInstallLocation,
|
|
215
207
|
upgradeEntryFor,
|
|
216
208
|
nextFinishAttempt,
|
|
217
209
|
readLocalAutoUpdateReport,
|
|
218
|
-
parseAutoUpdateFlag,
|
|
219
210
|
describeAutoUpdateCheck,
|
|
220
211
|
isUnfinishedAutoUpdate,
|
|
221
212
|
holdsUnfinishedFinish,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
announceSubscriptionRequired,
|
|
3
3
|
isDeferAnswer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RPPXQNIA.js";
|
|
5
5
|
import {
|
|
6
6
|
AUTO_DECISION_WINDOW_MS,
|
|
7
7
|
DEFAULT_SESSION,
|
|
@@ -10,18 +10,18 @@ import {
|
|
|
10
10
|
permissionDeniedAction,
|
|
11
11
|
releaseThrottle,
|
|
12
12
|
reportEvent
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-W2IVTHIG.js";
|
|
14
14
|
import {
|
|
15
15
|
askUser,
|
|
16
16
|
isDecisionStopped,
|
|
17
17
|
waitForQuestion
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-EZHY65QA.js";
|
|
19
19
|
import {
|
|
20
20
|
SubscriptionRequiredError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-SEILUNWB.js";
|
|
22
22
|
import {
|
|
23
23
|
getMachineId
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-O6IUZGWV.js";
|
|
25
25
|
import {
|
|
26
26
|
ASK_CONTEXT_MAX,
|
|
27
27
|
agentQuestionContext,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
questionsShownAsASet,
|
|
34
34
|
shouldDeferToNativeMode,
|
|
35
35
|
wireVerdictFor
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
37
37
|
|
|
38
38
|
// src/machine-decision-audit.ts
|
|
39
39
|
import { basename } from "path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
realpath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-USE5IEEW.js";
|
|
4
4
|
import {
|
|
5
5
|
findNativeClaudeInstall
|
|
6
6
|
} from "./chunk-VUFHYMSP.js";
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
resolvePackageVersionFromBinary,
|
|
14
14
|
resolvePathBinary,
|
|
15
15
|
resolvePathBinaryAsync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2QREHU4O.js";
|
|
17
17
|
import {
|
|
18
18
|
MANAGED_PROVIDERS
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
20
20
|
|
|
21
21
|
// src/live-capabilities.ts
|
|
22
22
|
import { homedir } from "os";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CEQ2AZH4.js";
|
|
4
4
|
import {
|
|
5
5
|
namedEvent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PUHP4IBA.js";
|
|
7
7
|
import {
|
|
8
8
|
writeDegraded
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EZHY65QA.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeShapedHookInput,
|
|
12
12
|
hookCompatibleProfileBySource,
|
|
13
13
|
isGrokHookPayload,
|
|
14
14
|
isGrokSessionEndStop
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
16
16
|
|
|
17
17
|
// src/tool-hook-input.ts
|
|
18
18
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
|
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
|
-
quoteIfNeeded
|
|
3
|
-
|
|
2
|
+
quoteIfNeeded,
|
|
3
|
+
shellDoubleQuoted
|
|
4
|
+
} from "./chunk-2QREHU4O.js";
|
|
4
5
|
import {
|
|
5
6
|
CODEX_QUESTION_TOOLS,
|
|
6
7
|
HOOK_BUDGETS,
|
|
7
8
|
HOOK_LOCATOR_BINARY,
|
|
8
9
|
withHookHoldBudget
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
10
11
|
|
|
11
12
|
// src/setup/paths.ts
|
|
12
|
-
import {
|
|
13
|
-
|
|
13
|
+
import { createHash as createHash2 } from "crypto";
|
|
14
|
+
|
|
15
|
+
// src/claude-config-paths.ts
|
|
16
|
+
import { homedir } from "os";
|
|
17
|
+
import { join, resolve } from "path";
|
|
18
|
+
var claudeConfigDir = (home = homedir(), environment = process.env) => resolve(environment.CLAUDE_CONFIG_DIR || join(home, ".claude"));
|
|
19
|
+
var claudeUserConfigFile = (home = homedir(), environment = process.env) => join(environment.CLAUDE_CONFIG_DIR ? claudeConfigDir(home, environment) : home, ".claude.json");
|
|
20
|
+
|
|
21
|
+
// src/setup/paths.ts
|
|
22
|
+
import { homedir as homedir3 } from "os";
|
|
23
|
+
import { join as join3 } from "path";
|
|
14
24
|
|
|
15
25
|
// src/codex-config.ts
|
|
16
26
|
import { createHash } from "crypto";
|
|
17
|
-
import { homedir } from "os";
|
|
18
|
-
import { join } from "path";
|
|
27
|
+
import { homedir as homedir2 } from "os";
|
|
28
|
+
import { join as join2 } from "path";
|
|
19
29
|
|
|
20
30
|
// src/registration-holder.ts
|
|
21
31
|
var asRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
|
|
@@ -52,7 +62,6 @@ var holdBudgetOf = (hook) => hook.holds ? hook.timeout : void 0;
|
|
|
52
62
|
var LOCATE = 'B=$(command -v "$0") || exit 0; [ -f "$B" ] || exit 0; [ -x "$B" ] || exit 0';
|
|
53
63
|
var NODE_PRESENT = "command -v node >/dev/null 2>&1 || exit 0";
|
|
54
64
|
var CURSOR_NO_OPINION = { permission: "deny", user_message: "Command denied via Pushary.", agent_message: "Pushary hook is unavailable. Repair the integration before retrying." };
|
|
55
|
-
var shellDoubleQuoted = (text) => `"${text.replace(/(["\\$`])/g, "\\$1")}"`;
|
|
56
65
|
var CURSOR_NATIVE_PROMPT = { permission: "ask" };
|
|
57
66
|
var CURSOR_NATIVE_PROMPT_EVENTS = ["beforeShellExecution", "beforeMCPExecution"];
|
|
58
67
|
var hookEventIsOneOf = (events) => events.flatMap((event) => [`*\\"hook_event_name\\":\\"${event}\\"*`, `*\\"hook_event_name\\":\\ \\"${event}\\"*`]).join("|");
|
|
@@ -80,7 +89,7 @@ var guardKindOf = (target) => {
|
|
|
80
89
|
var targetPath = (target) => target.kind === "binary" ? target.path : target.script;
|
|
81
90
|
var runsThroughNode = (target) => target.kind !== "binary";
|
|
82
91
|
var guardHookCommand = (target, platform = process.platform) => {
|
|
83
|
-
const path = quoteIfNeeded(targetPath(target));
|
|
92
|
+
const path = quoteIfNeeded(targetPath(target), platform);
|
|
84
93
|
if (platform === "win32") return runsThroughNode(target) ? `node ${path}` : path;
|
|
85
94
|
return `${HOOK_SHELL} '${HOOK_GUARD_SCRIPTS[guardKindOf(target)]}' ${path}`;
|
|
86
95
|
};
|
|
@@ -135,13 +144,13 @@ var canonicalJson = (value) => {
|
|
|
135
144
|
|
|
136
145
|
// src/codex-config.ts
|
|
137
146
|
var CODEX_HOOK_BINARY = "pushary-codex-hook";
|
|
138
|
-
var codexHome = () => codexHomeFrom(
|
|
139
|
-
var codexHomeFrom = (home) => process.env.CODEX_HOME?.trim() ||
|
|
140
|
-
var codexConfigToml = () =>
|
|
141
|
-
var codexHooksJsonIn = (home) =>
|
|
147
|
+
var codexHome = () => codexHomeFrom(homedir2());
|
|
148
|
+
var codexHomeFrom = (home) => process.env.CODEX_HOME?.trim() || join2(home, ".codex");
|
|
149
|
+
var codexConfigToml = () => join2(codexHome(), "config.toml");
|
|
150
|
+
var codexHooksJsonIn = (home) => join2(home, "hooks.json");
|
|
142
151
|
var codexHooksJson = () => codexHooksJsonIn(codexHome());
|
|
143
|
-
var codexAgentsMd = () =>
|
|
144
|
-
var codexSkillDir = () =>
|
|
152
|
+
var codexAgentsMd = () => join2(codexHome(), "AGENTS.md");
|
|
153
|
+
var codexSkillDir = () => join2(codexHome(), "skills", "pushary");
|
|
145
154
|
var CODEX_TOOL_CALL_MATCHER = "Bash|apply_patch|mcp__.*";
|
|
146
155
|
var CODEX_PRE_TOOL_USE_MATCHER = [CODEX_TOOL_CALL_MATCHER, ...CODEX_QUESTION_TOOLS].join("|");
|
|
147
156
|
var CODEX_HOOK_EVENTS = [
|
|
@@ -446,45 +455,49 @@ var staleTrustKeys = (state, hooksJsonPath, event, currentKey, ourHash) => {
|
|
|
446
455
|
};
|
|
447
456
|
|
|
448
457
|
// src/setup/paths.ts
|
|
449
|
-
var claudeSettings = () =>
|
|
450
|
-
var claudeJson = () =>
|
|
451
|
-
var claudeSkillDir = () =>
|
|
452
|
-
var cursorPluginDir = () =>
|
|
453
|
-
var cursorUserHooks = () =>
|
|
454
|
-
var cursorPluginMcp = () =>
|
|
455
|
-
var cursorPluginManifest = () =>
|
|
456
|
-
var cursorPluginRule = () =>
|
|
457
|
-
var cursorUserMcp = () =>
|
|
458
|
-
var vscodePluginDir = () =>
|
|
459
|
-
var vscodePluginMcp = () =>
|
|
460
|
-
var claudeSettingsLocal = () =>
|
|
461
|
-
var pusharyDir = () =>
|
|
462
|
-
var
|
|
463
|
-
var
|
|
464
|
-
var
|
|
465
|
-
var
|
|
466
|
-
var
|
|
467
|
-
var
|
|
468
|
-
var
|
|
469
|
-
var
|
|
470
|
-
var
|
|
471
|
-
var
|
|
472
|
-
var
|
|
473
|
-
var
|
|
474
|
-
var
|
|
475
|
-
var
|
|
476
|
-
var
|
|
477
|
-
var
|
|
478
|
-
var
|
|
479
|
-
var
|
|
480
|
-
var
|
|
481
|
-
var
|
|
482
|
-
var
|
|
458
|
+
var claudeSettings = (environment = process.env) => join3(claudeConfigDir(homedir3(), environment), "settings.json");
|
|
459
|
+
var claudeJson = (environment = process.env) => claudeUserConfigFile(homedir3(), environment);
|
|
460
|
+
var claudeSkillDir = (environment = process.env) => join3(claudeConfigDir(homedir3(), environment), "skills", "pushary");
|
|
461
|
+
var cursorPluginDir = () => join3(homedir3(), ".cursor", "plugins", "local", "pushary");
|
|
462
|
+
var cursorUserHooks = () => join3(homedir3(), ".cursor", "hooks.json");
|
|
463
|
+
var cursorPluginMcp = () => join3(cursorPluginDir(), "mcp.json");
|
|
464
|
+
var cursorPluginManifest = () => join3(cursorPluginDir(), ".cursor-plugin", "plugin.json");
|
|
465
|
+
var cursorPluginRule = () => join3(cursorPluginDir(), "rules", "pushary.mdc");
|
|
466
|
+
var cursorUserMcp = () => join3(homedir3(), ".cursor", "mcp.json");
|
|
467
|
+
var vscodePluginDir = () => join3(homedir3(), ".pushary", "plugins", "vscode");
|
|
468
|
+
var vscodePluginMcp = () => join3(vscodePluginDir(), ".mcp.json");
|
|
469
|
+
var claudeSettingsLocal = () => join3(claudeConfigDir(), "settings.local.json");
|
|
470
|
+
var pusharyDir = () => join3(homedir3(), ".pushary");
|
|
471
|
+
var claudeSetupDir = () => process.env.CLAUDE_CONFIG_DIR ? join3(pusharyDir(), "setup", "claude-profiles", createHash2("sha256").update(claudeUserConfigFile()).digest("hex").slice(0, 32)) : join3(pusharyDir(), "setup");
|
|
472
|
+
var claudeMcpReceipt = () => join3(claudeSetupDir(), "claude-mcp.json");
|
|
473
|
+
var bridgeAgentKey = () => join3(pusharyDir(), "bridge-auth", "agent-key.json");
|
|
474
|
+
var autoUpdateState = () => join3(pusharyDir(), "auto-update.json");
|
|
475
|
+
var autoUpdateLock = () => join3(pusharyDir(), "auto-update.lock");
|
|
476
|
+
var serviceOwedBackMark = () => join3(pusharyDir(), "service-owed-back");
|
|
477
|
+
var autoUpdateLog = () => join3(pusharyDir(), "logs", "auto-update.log");
|
|
478
|
+
var clientReportClaims = () => join3(pusharyDir(), "client-reports");
|
|
479
|
+
var claudeRegistrationReceipt = () => join3(claudeSetupDir(), "claude-registration.json");
|
|
480
|
+
var hermesConfig = () => join3(homedir3(), ".hermes", "config.yaml");
|
|
481
|
+
var hermesConfigReceipt = () => join3(pusharyDir(), "setup", "hermes-config.json");
|
|
482
|
+
var fxQuestionRuleReceipt = () => join3(pusharyDir(), "setup", "fx-question-rule.json");
|
|
483
|
+
var hookTakeoverReceipt = (agent) => join3(agent === "claude_code" ? claudeSetupDir() : join3(pusharyDir(), "setup"), `hook-takeover-${agent}.json`);
|
|
484
|
+
var codexSkillDir2 = () => join3(codexHome(), "skills", "pushary");
|
|
485
|
+
var codexAgentsMd2 = () => join3(codexHome(), "AGENTS.md");
|
|
486
|
+
var geminiSettings = () => join3(homedir3(), ".gemini", "settings.json");
|
|
487
|
+
var geminiMd = () => join3(homedir3(), ".gemini", "GEMINI.md");
|
|
488
|
+
var pusharyConfigFile = () => join3(homedir3(), ".pushary", "config.json");
|
|
489
|
+
var fxConfigDir = () => join3(homedir3(), ".fx");
|
|
490
|
+
var fxMcpProfile = () => join3(fxConfigDir(), "mcp.json");
|
|
491
|
+
var fxSettings = () => join3(fxConfigDir(), "settings.json");
|
|
492
|
+
var fxAgentsMd = () => join3(fxConfigDir(), "AGENTS.md");
|
|
483
493
|
|
|
484
494
|
export {
|
|
495
|
+
claudeConfigDir,
|
|
496
|
+
claudeUserConfigFile,
|
|
485
497
|
registeredCommands,
|
|
486
498
|
namesOurBinary,
|
|
487
499
|
registrationHolderOf,
|
|
500
|
+
HOOK_SHELL,
|
|
488
501
|
holdBudgetOf,
|
|
489
502
|
guardBinary,
|
|
490
503
|
guardBinaryRefusing,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
exitCodeFor,
|
|
3
|
+
messageFor
|
|
4
|
+
} from "./chunk-PPY5N2E6.js";
|
|
5
|
+
import {
|
|
6
|
+
EXIT
|
|
7
|
+
} from "./chunk-KZERVKTD.js";
|
|
8
|
+
import {
|
|
9
|
+
redactSecretsFromContent
|
|
10
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
11
|
+
|
|
12
|
+
// src/cli/json.ts
|
|
13
|
+
var writeStdoutFully = (text) => new Promise((resolve, reject) => {
|
|
14
|
+
const settle = (error) => {
|
|
15
|
+
if (!error) process.stdout.off("error", settle);
|
|
16
|
+
if (error && (!("code" in error) || error.code !== "EPIPE")) reject(error);
|
|
17
|
+
else resolve();
|
|
18
|
+
};
|
|
19
|
+
process.stdout.once("error", settle);
|
|
20
|
+
process.stdout.write(text, settle);
|
|
21
|
+
});
|
|
22
|
+
var writeJsonError = async (command, error, argv = process.argv.slice(2)) => {
|
|
23
|
+
const exitCode = exitCodeFor(error);
|
|
24
|
+
const end = argv.indexOf("--");
|
|
25
|
+
const flags = end < 0 ? argv : argv.slice(0, end);
|
|
26
|
+
if (!flags.includes("--json") && !flags.includes("-json")) return { written: false, exitCode };
|
|
27
|
+
await writeStdoutFully(`${JSON.stringify({
|
|
28
|
+
ok: false,
|
|
29
|
+
command,
|
|
30
|
+
reason: exitCode === EXIT.USAGE ? "usage" : "failed",
|
|
31
|
+
message: redactSecretsFromContent(messageFor(error)),
|
|
32
|
+
exitCode
|
|
33
|
+
})}
|
|
34
|
+
`);
|
|
35
|
+
return { written: true, exitCode };
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
writeStdoutFully,
|
|
40
|
+
writeJsonError
|
|
41
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6MJWYYAS.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe
|
|
6
6
|
} from "./chunk-QENTGE75.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
keyPrefix,
|
|
5
5
|
readConfigFileKey,
|
|
6
6
|
readMacAppKeyPrefix
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WN3RACVD.js";
|
|
8
8
|
import {
|
|
9
9
|
NPX_LATEST_COMMAND
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ERK24P76.js";
|
|
11
11
|
|
|
12
12
|
// src/key-signed-out.ts
|
|
13
13
|
var VERDICT_BY_CHECK = {
|
|
@@ -384,6 +384,13 @@ var AGENTS = {
|
|
|
384
384
|
enforcementDetail: "Shell, edits and MCP calls through native PreToolUse hooks. Grok's own permission checks still apply after a phone approval.",
|
|
385
385
|
capabilityNote: "Grok fails open if it kills a hook or cannot run it. Setup leaves Grok's permission mode unchanged. Native question and plan dialogs stay in Grok; proactive phone questions use Pushary MCP."
|
|
386
386
|
},
|
|
387
|
+
grok_bot: {
|
|
388
|
+
...defaults,
|
|
389
|
+
label: "Grok Bot",
|
|
390
|
+
connectVia: "Grok Bot app plugin (remote MCP connector)",
|
|
391
|
+
setupGuide: "[Grok Bot setup](/docs/agents/guides/grok-bot)",
|
|
392
|
+
capabilityNote: "Grok Bot keeps its own approval cards, and Pushary cannot stop a Bot in the middle of a task. A question nobody answers expires after about ten minutes and is never treated as a yes."
|
|
393
|
+
},
|
|
387
394
|
windsurf: {
|
|
388
395
|
...defaults,
|
|
389
396
|
label: "Windsurf",
|
|
@@ -2,23 +2,24 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IF26ZGZ7.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_CHOICES
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XV6S5PWW.js";
|
|
9
9
|
import {
|
|
10
10
|
BELL_HOOK_BINARY
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4MUFZU2G.js";
|
|
12
12
|
import {
|
|
13
13
|
CODEX_HOOK_EVENTS,
|
|
14
|
+
HOOK_SHELL,
|
|
14
15
|
hasCodexHooks,
|
|
15
16
|
holdBudgetOf
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6MJWYYAS.js";
|
|
17
18
|
import {
|
|
18
19
|
CURSOR_GATE_EVENTS,
|
|
19
20
|
HOOK_LOCATOR_BINARY,
|
|
20
21
|
hookCommandHoldBudget
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
22
23
|
|
|
23
24
|
// src/diagnostics/bridge.ts
|
|
24
25
|
import { execFileSync } from "child_process";
|
|
@@ -101,9 +102,10 @@ var record = (value) => value && typeof value === "object" && !Array.isArray(val
|
|
|
101
102
|
var CLAUDE_HOOK_BINARY = /pushary-[a-z-]*hook/;
|
|
102
103
|
var EXACT_HOOK_BINARY = /^pushary-[a-z-]*(hook|gate)$/;
|
|
103
104
|
var pusharyHookExecutable = (command) => {
|
|
104
|
-
const tokens = command.match(/"[^"]*"|'[^']*'|\S+/g) ?? [];
|
|
105
|
+
const tokens = command.match(/"(?:\\.|[^"\\])*"|'[^']*'|\S+/g) ?? [];
|
|
105
106
|
for (const raw of tokens.reverse()) {
|
|
106
|
-
const
|
|
107
|
+
const unquoted = raw[0] === '"' && raw.at(-1) === '"' || raw[0] === "'" && raw.at(-1) === "'" ? raw.slice(1, -1) : raw;
|
|
108
|
+
const token = command.startsWith(`${HOOK_SHELL} `) && raw[0] === '"' ? unquoted.replace(/\\(["\\$`])/g, "$1") : unquoted;
|
|
107
109
|
const name = token.split(/[/\\]/).pop()?.replace(/\.(cmd|exe|mjs)$/i, "") ?? "";
|
|
108
110
|
if (name === HOOK_LOCATOR_BINARY || EXACT_HOOK_BINARY.test(name)) return token;
|
|
109
111
|
}
|