@pushary/agent-hooks 1.9.66 → 1.9.68
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 +15 -0
- package/data/SKILL.md +1 -1
- package/data/cursor-plugin/skills/pushary/SKILL.md +1 -1
- package/data/vscode-plugin/skills/pushary/SKILL.md +1 -1
- package/dist/{api-GDSVUTI2.js → api-6Q7XIB67.js} +10 -10
- package/dist/bin/pushary-bell-hook.js +25 -25
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +26 -26
- package/dist/bin/pushary-clean.js +73 -74
- package/dist/bin/pushary-codex-bridge.js +21 -21
- package/dist/bin/pushary-codex-hook.js +30 -30
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +28 -27
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +40 -39
- package/dist/bin/pushary-disconnect.js +25 -25
- package/dist/bin/pushary-doctor.js +126 -72
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +27 -27
- package/dist/bin/pushary-hook.js +29 -29
- package/dist/bin/pushary-login.js +20 -19
- package/dist/bin/pushary-logout.js +26 -27
- package/dist/bin/pushary-mcp.js +11 -11
- package/dist/bin/pushary-mode.js +16 -15
- 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 +29 -29
- 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 +26 -26
- package/dist/bin/pushary-session-start-hook.js +34 -33
- package/dist/bin/pushary-setup.js +115 -98
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +37 -35
- package/dist/bin/pushary-stop-hook.js +24 -24
- package/dist/bin/pushary-stopfailure-hook.js +24 -24
- package/dist/bin/pushary-suggestions.js +15 -14
- package/dist/bin/pushary-transcript-register.js +16 -16
- package/dist/bin/pushary-transcripts.js +18 -17
- package/dist/bin/pushary-upgrade.js +66 -38
- package/dist/bin/pushary-wait.js +26 -20
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-ZJV7SFIJ.js → chunk-2HMKZYF5.js} +1 -1
- package/dist/{chunk-IA5VWIHV.js → chunk-2VYQG2HG.js} +2 -2
- package/dist/{chunk-A47UKPC7.js → chunk-32OSSYGZ.js} +1 -1
- package/dist/{chunk-DBUHSUL7.js → chunk-4TIN3T2A.js} +1 -1
- package/dist/{chunk-JL3SZJJP.js → chunk-53Q4LRBU.js} +2 -2
- package/dist/{chunk-HUGVJBDN.js → chunk-53RH3ZIK.js} +2 -2
- package/dist/{chunk-2BL6KWN7.js → chunk-6IFEYELN.js} +9 -9
- package/dist/{chunk-DKMVVBXO.js → chunk-6VFZVL65.js} +55 -13
- package/dist/{chunk-YQDCTID4.js → chunk-73DHP3JX.js} +4 -4
- package/dist/{chunk-G6VJZ3RB.js → chunk-77L2TNJW.js} +1 -1
- package/dist/{chunk-IQ3GKPFM.js → chunk-77QP22FL.js} +1 -1
- package/dist/{chunk-VURDLVAQ.js → chunk-7S7NTMDJ.js} +3 -3
- package/dist/{chunk-4APD2DPI.js → chunk-7SKGS7QN.js} +53 -3
- package/dist/chunk-7V63A4AI.js +25 -0
- package/dist/{chunk-6BGVSV2Q.js → chunk-7YJSDXLM.js} +1 -1
- package/dist/{chunk-MNNQEUQC.js → chunk-AJIT4SCL.js} +27 -8
- package/dist/{chunk-QR2QWGQI.js → chunk-BSMHSN3Y.js} +3 -3
- package/dist/{chunk-R7C2FS33.js → chunk-C4EDAHXI.js} +1 -1
- package/dist/{chunk-7LK3Y6ET.js → chunk-CB4U6WRP.js} +6 -6
- package/dist/chunk-D6W7QDQE.js +2298 -0
- package/dist/{chunk-V4EOFOB2.js → chunk-E5PEOVUJ.js} +6 -6
- package/dist/{chunk-32ZT2ATY.js → chunk-EOWHEZHD.js} +8 -8
- package/dist/{chunk-57NTMVMI.js → chunk-EUU5PDUI.js} +6 -6
- package/dist/{chunk-XXIJBYNW.js → chunk-GMHQYX3D.js} +1 -1
- package/dist/{chunk-V3YBVOTZ.js → chunk-I5FFSOCV.js} +2 -2
- package/dist/{chunk-RJ6JEHCP.js → chunk-JAKWPQ2L.js} +1 -1
- package/dist/{chunk-XDDSURY3.js → chunk-JPVV27O2.js} +3 -3
- package/dist/{chunk-GWYCKTXS.js → chunk-K4TSXWVX.js} +5 -5
- package/dist/chunk-LF2NSOAQ.js +299 -0
- package/dist/{chunk-6RJZSBPD.js → chunk-LGCVAE52.js} +1 -1
- package/dist/{chunk-GDLT32I4.js → chunk-LQAAOXYJ.js} +21 -13
- package/dist/{chunk-3ELJIG2R.js → chunk-MCNHNIRC.js} +3 -3
- package/dist/{chunk-XIJTXRWB.js → chunk-METUT7V4.js} +2 -2
- package/dist/{chunk-MDIGG3Q7.js → chunk-MFWHANKG.js} +3 -3
- package/dist/{chunk-GECU7V44.js → chunk-MHC34X5A.js} +3 -3
- package/dist/{chunk-376TUN72.js → chunk-MMTA7UKA.js} +3 -3
- package/dist/{chunk-XGFFNERF.js → chunk-MUDUWF74.js} +1 -1
- package/dist/{chunk-KS3O6O7E.js → chunk-NAQCWM4U.js} +3 -3
- package/dist/{chunk-TQNFDNJA.js → chunk-NKPSJOHJ.js} +6 -6
- package/dist/{chunk-DPU6H4JY.js → chunk-NLDEC4Y7.js} +3 -3
- package/dist/{chunk-XEXF2OFZ.js → chunk-NWN6GGJL.js} +2 -2
- package/dist/{chunk-IGO3AGZK.js → chunk-O655YCOG.js} +4 -4
- package/dist/{chunk-5FJDODOA.js → chunk-ODAAK2RZ.js} +3 -3
- package/dist/{chunk-AVWECJSN.js → chunk-ORHVVRVL.js} +2 -2
- package/dist/{chunk-YB3HMDKE.js → chunk-P4XZX7CL.js} +2 -2
- package/dist/{chunk-CNJ7SI5V.js → chunk-PBEW5CJK.js} +4 -4
- package/dist/{chunk-CN6JFM62.js → chunk-PEPRUUGM.js} +15 -6
- package/dist/{chunk-QN25WBXL.js → chunk-PGOPIIOQ.js} +7 -7
- package/dist/{chunk-Q5RNYE2L.js → chunk-PZZKXX6Q.js} +4 -4
- package/dist/{chunk-SVKCYUYP.js → chunk-Q6JXE3PD.js} +9 -9
- package/dist/{chunk-ZAZUDYSF.js → chunk-QYTOYNV2.js} +5 -5
- package/dist/{chunk-3FQX74E4.js → chunk-REQO3WWO.js} +23 -8
- package/dist/{chunk-EJR5JXMV.js → chunk-RQOT6QL3.js} +43 -5
- package/dist/{chunk-AWGBL4P3.js → chunk-RWXDWOQQ.js} +89 -41
- package/dist/{chunk-6ZXCWK27.js → chunk-SL7CIZCL.js} +60 -6
- package/dist/{chunk-3EZP5ZPS.js → chunk-TVVJ6OYG.js} +4 -4
- package/dist/{chunk-B6JC676X.js → chunk-UC2J5RR4.js} +1 -1
- package/dist/{chunk-26W46E46.js → chunk-UETS2WEA.js} +27 -10
- package/dist/{chunk-EU2ZOZC3.js → chunk-UXN73YAE.js} +3 -3
- package/dist/{chunk-XFQAK35L.js → chunk-VHMZPN3N.js} +1 -1
- package/dist/{chunk-45KMS76L.js → chunk-VKZ3RJ5U.js} +1 -1
- package/dist/{chunk-T6YLXO6N.js → chunk-VRFFMTIG.js} +4 -4
- package/dist/{chunk-DIUTSF6I.js → chunk-WPOXZPEH.js} +4 -4
- package/dist/{chunk-GO7YKPT3.js → chunk-X2MTVD4W.js} +1 -1
- package/dist/{chunk-5J7OZBJ4.js → chunk-XQKB4LEK.js} +2 -2
- package/dist/{chunk-QOIPUYUD.js → chunk-XZKSUJ55.js} +1 -1
- package/dist/{chunk-RSZQEEEW.js → chunk-YZHJQG6W.js} +8 -6
- package/dist/{chunk-UTAARXYQ.js → chunk-ZK5WYAMI.js} +1 -1
- package/dist/{codex-app-cards-switch-W7OLKOMO.js → codex-app-cards-switch-VZ4XIDJO.js} +11 -11
- package/dist/{codex-desktop-launch-U6V3AXZF.js → codex-desktop-launch-CX2IE5BI.js} +1 -1
- package/dist/{codex-session-launch-EFU46WBL.js → codex-session-launch-WUIM6ZGA.js} +18 -18
- package/dist/{config-UC4LMCNX.js → config-OBGYURFX.js} +3 -3
- package/dist/{global-upgrade-ABF5O3HU.js → global-upgrade-XZ5L7LDB.js} +10 -10
- package/dist/{identity-3ZUZPHN6.js → identity-TGQPFIE4.js} +4 -4
- package/dist/{live-capabilities-BXWXJARK.js → live-capabilities-JHESROAP.js} +5 -5
- package/dist/{paths-FO76CFRQ.js → paths-EOMNC4QM.js} +7 -3
- package/dist/{reapply-3T3DFUAI.js → reapply-J5HHUUBE.js} +27 -26
- package/dist/src/index.js +28 -28
- package/dist/{upgrade-lock-EZ5JIPJE.js → upgrade-lock-VQORI6G5.js} +4 -4
- package/dist/{usage-Y6BL7RUD.js → usage-KX2HN47E.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-QBNICXMC.js +0 -615
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readJsonSafe,
|
|
3
3
|
writeJsonAtomic
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NAQCWM4U.js";
|
|
5
5
|
import {
|
|
6
6
|
configFilePath
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-32OSSYGZ.js";
|
|
8
8
|
import {
|
|
9
9
|
readSetupOutcomeProperties
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RQOT6QL3.js";
|
|
11
11
|
|
|
12
12
|
// src/diagnostics/service-runtime.ts
|
|
13
13
|
var unescapeXml = (value) => value.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
@@ -443,9 +443,9 @@ var installGlobally = (options) => {
|
|
|
443
443
|
}
|
|
444
444
|
const started = (async () => {
|
|
445
445
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
446
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
447
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
448
|
-
const { autoUpdateLock } = await import("./paths-
|
|
446
|
+
const { withUpgradeLock } = await import("./global-upgrade-XZ5L7LDB.js");
|
|
447
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-VQORI6G5.js");
|
|
448
|
+
const { autoUpdateLock } = await import("./paths-EOMNC4QM.js");
|
|
449
449
|
let result = "skipped";
|
|
450
450
|
const install = async () => {
|
|
451
451
|
const platform = process.platform;
|
|
@@ -4,30 +4,30 @@ import {
|
|
|
4
4
|
postLiveSession,
|
|
5
5
|
postLiveSessionUntilAccepted,
|
|
6
6
|
startLiveSessionHeartbeat
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XZKSUJ55.js";
|
|
8
8
|
import {
|
|
9
9
|
SESSION_IDLE_TIMEOUT_MS,
|
|
10
10
|
describeIdleWindow,
|
|
11
11
|
idleDeadlinePassed,
|
|
12
12
|
startProcessOwnership
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MCNHNIRC.js";
|
|
14
14
|
import {
|
|
15
15
|
spawnClaude
|
|
16
16
|
} from "./chunk-XHKBHWLX.js";
|
|
17
17
|
import {
|
|
18
18
|
repoKeyFor
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GMHQYX3D.js";
|
|
20
20
|
import {
|
|
21
21
|
isAskUserResponse,
|
|
22
22
|
isDecisionStopped,
|
|
23
23
|
isWaitForAnswerResponse,
|
|
24
24
|
withdrawQuestion,
|
|
25
25
|
writeDegraded
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-QYTOYNV2.js";
|
|
27
27
|
import {
|
|
28
28
|
callMcpTool,
|
|
29
29
|
isRetryable
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-PZZKXX6Q.js";
|
|
31
31
|
import {
|
|
32
32
|
AGENT_QUESTION_DESCRIPTION_MAX,
|
|
33
33
|
AGENT_QUESTION_HEADER_MAX,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
parseCodexQuestions,
|
|
49
49
|
planElicitationAsk,
|
|
50
50
|
readElicitationFields
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-RQOT6QL3.js";
|
|
52
52
|
|
|
53
53
|
// src/codex-question-owner.ts
|
|
54
54
|
import { createHash } from "crypto";
|
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
everyProgramFileIsThere,
|
|
9
9
|
installedCodexApp,
|
|
10
10
|
shellQuoted
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ORHVVRVL.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-EUU5PDUI.js";
|
|
18
18
|
import {
|
|
19
19
|
CODEX_APP_LAUNCH_AT_LOGIN_VERB,
|
|
20
20
|
CODEX_APP_LAUNCH_VARIABLE
|
|
21
21
|
} from "./chunk-E46NE7FB.js";
|
|
22
22
|
import {
|
|
23
23
|
writeFileAtomic
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-NAQCWM4U.js";
|
|
25
25
|
|
|
26
26
|
// src/codex-app-cards-switch.ts
|
|
27
27
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getBaseUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-32OSSYGZ.js";
|
|
4
4
|
import {
|
|
5
5
|
compressTranscriptRecord,
|
|
6
6
|
redactSecretsFromContent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RQOT6QL3.js";
|
|
8
8
|
|
|
9
9
|
// src/transcript-api.ts
|
|
10
10
|
var fetchTranscriptRecipients = async (apiKey, baseUrl = getBaseUrl()) => {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TVVJ6OYG.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-73DHP3JX.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LQAAOXYJ.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RQOT6QL3.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
NpmMissingError,
|
|
4
4
|
NpmPermissionError,
|
|
5
5
|
writeFileAtomic
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NAQCWM4U.js";
|
|
7
7
|
import {
|
|
8
8
|
NPX_LATEST_COMMAND
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-X2MTVD4W.js";
|
|
10
10
|
import {
|
|
11
11
|
readSetupAgentFailures
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RQOT6QL3.js";
|
|
13
13
|
|
|
14
14
|
// src/setup/config-write.ts
|
|
15
15
|
var AgentConfigWriteError = class extends Error {
|
|
@@ -294,7 +294,7 @@ var loadedOnce = (load) => {
|
|
|
294
294
|
};
|
|
295
295
|
|
|
296
296
|
// src/codex-desktop-proxy.ts
|
|
297
|
-
var loadThePhone = () => import("./api-
|
|
297
|
+
var loadThePhone = () => import("./api-6Q7XIB67.js");
|
|
298
298
|
var theFirstCardLoadsAgain = () => {
|
|
299
299
|
};
|
|
300
300
|
var APP_SERVER_COMMAND = "app-server";
|
|
@@ -827,7 +827,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
|
|
|
827
827
|
return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
|
|
828
828
|
}
|
|
829
829
|
if (args[0] === APP_CARDS_FLAG) {
|
|
830
|
-
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-
|
|
830
|
+
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-VZ4XIDJO.js");
|
|
831
831
|
return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
|
|
832
832
|
}
|
|
833
833
|
if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
keyPrefix,
|
|
5
5
|
readConfigFileKey,
|
|
6
6
|
readMacAppKeyPrefix
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PBEW5CJK.js";
|
|
8
8
|
import {
|
|
9
9
|
NPX_LATEST_COMMAND
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-X2MTVD4W.js";
|
|
11
11
|
|
|
12
12
|
// src/key-signed-out.ts
|
|
13
13
|
var VERDICT_BY_CHECK = {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-METUT7V4.js";
|
|
4
4
|
import {
|
|
5
5
|
backupFile,
|
|
6
6
|
readJsonSafe,
|
|
7
7
|
writeFileAtomic,
|
|
8
8
|
writeJsonAtomic
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NAQCWM4U.js";
|
|
10
10
|
import {
|
|
11
11
|
configFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-32OSSYGZ.js";
|
|
13
13
|
import {
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RQOT6QL3.js";
|
|
17
17
|
|
|
18
18
|
// src/shell-alias.ts
|
|
19
19
|
import { homedir } from "os";
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
macAppBridgeAvailable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CB4U6WRP.js";
|
|
4
4
|
import {
|
|
5
5
|
keyPrefix
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PBEW5CJK.js";
|
|
7
7
|
import {
|
|
8
8
|
bridgeAgentKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LQAAOXYJ.js";
|
|
10
10
|
import {
|
|
11
11
|
readJsonSafe
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NAQCWM4U.js";
|
|
13
13
|
import {
|
|
14
|
+
isRecord,
|
|
14
15
|
isValidApiKey
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RQOT6QL3.js";
|
|
16
17
|
|
|
17
18
|
// src/shared-mcp-key.ts
|
|
18
19
|
var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
@@ -37,7 +38,13 @@ var readMacAppAgentKey = () => {
|
|
|
37
38
|
};
|
|
38
39
|
var macAppConnectionOf = (appKey, appInstalled) => appKey !== null && appInstalled() ? { kind: "connected", keyPrefix: keyPrefix(appKey) } : NOT_CONNECTED;
|
|
39
40
|
var readMacAppConnection = () => macAppConnectionOf(readMacAppAgentKey(), macAppBridgeAvailable);
|
|
40
|
-
var
|
|
41
|
+
var keyWrittenByMacApp = (configFileKey, macAppKey = readMacAppAgentKey()) => Boolean(configFileKey) && configFileKey === macAppKey;
|
|
42
|
+
var keyStoredIn = (configFile) => {
|
|
43
|
+
const stored = readJsonSafe(configFile);
|
|
44
|
+
return stored.kind === "ok" && isRecord(stored.value) ? pusharyKey(stored.value.apiKey) : null;
|
|
45
|
+
};
|
|
46
|
+
var configFileHoldsMacAppKey = (configFile, macAppKey = readMacAppAgentKey()) => keyWrittenByMacApp(keyStoredIn(configFile), macAppKey);
|
|
47
|
+
var readMacAppConnectionWhenKeyless = (cliKey, cliKeyIsTheMacAppsOwn = false) => cliKey && !cliKeyIsTheMacAppsOwn ? NOT_CONNECTED : readMacAppConnection();
|
|
41
48
|
|
|
42
49
|
export {
|
|
43
50
|
pusharyKey,
|
|
@@ -48,5 +55,7 @@ export {
|
|
|
48
55
|
PAIR_FROM_MAC_APP,
|
|
49
56
|
readMacAppAgentKey,
|
|
50
57
|
readMacAppConnection,
|
|
58
|
+
keyWrittenByMacApp,
|
|
59
|
+
configFileHoldsMacAppKey,
|
|
51
60
|
readMacAppConnectionWhenKeyless
|
|
52
61
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q6JXE3PD.js";
|
|
4
4
|
import {
|
|
5
5
|
namedEvent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TVVJ6OYG.js";
|
|
7
7
|
import {
|
|
8
8
|
isBridgeLocator,
|
|
9
9
|
liveBridgeProbe,
|
|
10
10
|
pusharyHookExecutable,
|
|
11
11
|
resolveBridgeStub
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-73DHP3JX.js";
|
|
13
13
|
import {
|
|
14
14
|
writeDegraded
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QYTOYNV2.js";
|
|
16
16
|
import {
|
|
17
17
|
cursorUserHooks
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LQAAOXYJ.js";
|
|
19
19
|
import {
|
|
20
20
|
atLeast,
|
|
21
21
|
parseVersion
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NAQCWM4U.js";
|
|
23
23
|
import {
|
|
24
24
|
CURSOR_GATE_COVERAGE,
|
|
25
25
|
CURSOR_GATE_SCRIPT,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
isGrokSessionEndStop,
|
|
34
34
|
isRecord,
|
|
35
35
|
toolsCoveredByGateEntry
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-RQOT6QL3.js";
|
|
37
37
|
|
|
38
38
|
// src/tool-hook-input.ts
|
|
39
39
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode", "cursor_version"];
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BSMHSN3Y.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MHC34X5A.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-32OSSYGZ.js";
|
|
10
10
|
import {
|
|
11
11
|
isRecord,
|
|
12
12
|
isToolErrorResult,
|
|
13
13
|
toolFailureCodeOfResult
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RQOT6QL3.js";
|
|
15
15
|
|
|
16
16
|
// src/retry.ts
|
|
17
17
|
var isRetryable = (err) => {
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
loadPin,
|
|
4
4
|
savePin,
|
|
5
5
|
verifyRecipients
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4TIN3T2A.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureDaemonRunning
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EUU5PDUI.js";
|
|
10
10
|
import {
|
|
11
11
|
hookOwnerOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-73DHP3JX.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
decodePublicKey,
|
|
@@ -18,26 +18,26 @@ import {
|
|
|
18
18
|
recordSealerFor,
|
|
19
19
|
uploadTranscriptRecords,
|
|
20
20
|
wrapSessionKey
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-NWN6GGJL.js";
|
|
22
22
|
import {
|
|
23
23
|
transcriptEnvironmentPreference,
|
|
24
24
|
transcriptsEnabled
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-MUDUWF74.js";
|
|
26
26
|
import {
|
|
27
27
|
readTranscriptPreference
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-PBEW5CJK.js";
|
|
29
29
|
import {
|
|
30
30
|
claudeConfigDir,
|
|
31
31
|
codexHome,
|
|
32
32
|
pusharyDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-LQAAOXYJ.js";
|
|
34
34
|
import {
|
|
35
35
|
writeJsonAtomic
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-NAQCWM4U.js";
|
|
37
37
|
import {
|
|
38
38
|
getApiKey,
|
|
39
39
|
getBaseUrl
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-32OSSYGZ.js";
|
|
41
41
|
|
|
42
42
|
// src/transcript-registration.ts
|
|
43
43
|
import { createHash } from "crypto";
|
|
@@ -6,18 +6,18 @@ import {
|
|
|
6
6
|
McpToolError,
|
|
7
7
|
SubscriptionRequiredError,
|
|
8
8
|
callMcpTool
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PZZKXX6Q.js";
|
|
10
10
|
import {
|
|
11
11
|
installNetworkDefaults,
|
|
12
12
|
isNetworkFailure
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MHC34X5A.js";
|
|
14
14
|
import {
|
|
15
15
|
clientReportClaims
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-LQAAOXYJ.js";
|
|
17
17
|
import {
|
|
18
18
|
getApiKey,
|
|
19
19
|
getBaseUrl
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-32OSSYGZ.js";
|
|
21
21
|
import {
|
|
22
22
|
ASK_AGENT_NAME_MAX,
|
|
23
23
|
CLIENT_REPORT_PATH,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
TOOL_FAILURE_CODES,
|
|
27
27
|
degradedLine,
|
|
28
28
|
truncateLine
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-RQOT6QL3.js";
|
|
30
30
|
|
|
31
31
|
// src/api.ts
|
|
32
32
|
import { randomUUID } from "crypto";
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
notificationAnswerStep
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AJIT4SCL.js";
|
|
4
|
+
import {
|
|
5
|
+
canChangeApprovalSettings
|
|
6
|
+
} from "./chunk-7V63A4AI.js";
|
|
4
7
|
import {
|
|
5
8
|
matchMacAccountStep,
|
|
6
9
|
retryAgentCommand
|
|
7
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ODAAK2RZ.js";
|
|
8
11
|
import {
|
|
9
12
|
EXIT
|
|
10
13
|
} from "./chunk-KZERVKTD.js";
|
|
11
14
|
import {
|
|
12
15
|
NPX_LATEST_COMMAND
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-X2MTVD4W.js";
|
|
14
17
|
|
|
15
18
|
// src/setup/closing.ts
|
|
16
19
|
var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
|
|
@@ -37,16 +40,28 @@ var describeAnsweredHeadline = (answer) => {
|
|
|
37
40
|
const seconds = answerSeconds(answer.latencyMs);
|
|
38
41
|
return device ? `You're set. ${device} answered in ${seconds}s.` : `You're set. The test question was answered in ${seconds}s.`;
|
|
39
42
|
};
|
|
40
|
-
var
|
|
41
|
-
{ command: "pushary status", summary: "what this machine is connected to" },
|
|
43
|
+
var CHANGEABLE_APPROVAL_COMMANDS = [
|
|
42
44
|
{ command: "pushary mode", summary: "choose where approval requests appear" },
|
|
43
|
-
{ command: "pushary wait", summary: "show or set how long approvals wait for your phone" }
|
|
45
|
+
{ command: "pushary wait", summary: "show or set how long approvals wait for your phone" }
|
|
46
|
+
];
|
|
47
|
+
var READABLE_APPROVAL_COMMANDS = [
|
|
48
|
+
{ command: "pushary mode", summary: "show where approval requests appear" },
|
|
49
|
+
{ command: "pushary wait", summary: "show how long approvals wait for your phone" }
|
|
50
|
+
];
|
|
51
|
+
var approvalCommandSummaries = (canChange) => canChange ? CHANGEABLE_APPROVAL_COMMANDS : READABLE_APPROVAL_COMMANDS;
|
|
52
|
+
var commandSurfaceFor = (keyScope) => [
|
|
53
|
+
{ command: "pushary status", summary: "what this machine is connected to" },
|
|
54
|
+
...approvalCommandSummaries(canChangeApprovalSettings(keyScope)),
|
|
44
55
|
{ command: "pushary stats", summary: "what your agents have been asking" },
|
|
45
56
|
{ command: "pushary claude", summary: "run Claude Code with encrypted transcript support" },
|
|
46
57
|
{ command: "pushary doctor", summary: "check the install" }
|
|
47
58
|
];
|
|
48
|
-
var
|
|
49
|
-
var renderCommandSurface = () =>
|
|
59
|
+
var surfaceColumnOf = (surface) => Math.max(...surface.map((entry) => entry.command.length)) + 2;
|
|
60
|
+
var renderCommandSurface = (keyScope) => {
|
|
61
|
+
const surface = commandSurfaceFor(keyScope);
|
|
62
|
+
const column = surfaceColumnOf(surface);
|
|
63
|
+
return surface.map((entry) => `${entry.command.padEnd(column)}${entry.summary}`);
|
|
64
|
+
};
|
|
50
65
|
var PHONE_START_VERIFIED_LINE = "Phone-start and steering: local and server checks passed just now. Recheck after sleep or network changes.";
|
|
51
66
|
var PHONE_START_UNVERIFIED_LINE = "Phone-start and steering: unverified. Run pushary doctor to check the provider, background service and server route.";
|
|
52
67
|
var PHONE_START_FELL_SHORT_LINES = {
|
|
@@ -242,10 +242,10 @@ var AGENTS = {
|
|
|
242
242
|
label: "Hermes",
|
|
243
243
|
policyAgent: "hermes",
|
|
244
244
|
enforcement: "enforced",
|
|
245
|
-
connectVia: "Native
|
|
245
|
+
connectVia: "Native plugin in ~/.hermes/plugins + approval transport",
|
|
246
246
|
setupCommand: PUSHARY_SETUP_COMMAND,
|
|
247
247
|
enforcementDetail: "Hermes dangerous-command approvals when the Pushary transport is selected; optional PUSHARY_GATE_TOOLS gates named tools.",
|
|
248
|
-
capabilityNote: "Uses the
|
|
248
|
+
capabilityNote: "Uses the Pushary plugin in ~/.hermes/plugins/pushary, not a macOS bridge HookSource. CLI disconnect and managed-provider controls are not implemented for Hermes."
|
|
249
249
|
},
|
|
250
250
|
cursor: {
|
|
251
251
|
...defaults,
|
|
@@ -2602,6 +2602,16 @@ var shellCommandStringOf = (shell, args) => {
|
|
|
2602
2602
|
return operand === void 0 || operand.expands ? UNREADABLE2 : { kind: "readable", script: operand.text };
|
|
2603
2603
|
};
|
|
2604
2604
|
|
|
2605
|
+
// ../contracts/src/partner-developer-guide.ts
|
|
2606
|
+
var PARTNER_API_KEYS_URL = "https://pushary.com/dashboard/agent/settings";
|
|
2607
|
+
var PARTNER_INSTALL_COMMAND = "npm i @pushary/server";
|
|
2608
|
+
var PARTNER_DEVELOPER_STEPS = [
|
|
2609
|
+
`Install on our server: ${PARTNER_INSTALL_COMMAND}. Create the client with our Partner API key from ${PARTNER_API_KEYS_URL} and keep the key on the server.`,
|
|
2610
|
+
"For each customer, call pushary.enroll(customerId) and show the universalLink it returns as a button or QR code in our app. They open it in the free Pushary app and allow notifications. Installing the app does not carry the link over, so keep it available until they finish.",
|
|
2611
|
+
"Before a risky action, call pushary.authorize({ externalId: customerId, toolName, question }) and run the action only if approved is true.",
|
|
2612
|
+
"If the answer can come later than the request, create a decision with pushary.decisions.create, save its id, and resume from pushary.decisions.get or the webhook."
|
|
2613
|
+
];
|
|
2614
|
+
|
|
2605
2615
|
// ../contracts/src/degraded.ts
|
|
2606
2616
|
var DEGRADED_PREFIX = "[degraded]";
|
|
2607
2617
|
var degradedPayload = (subsystem, report) => ({
|
|
@@ -2614,6 +2624,16 @@ var degradedPayload = (subsystem, report) => ({
|
|
|
2614
2624
|
});
|
|
2615
2625
|
var degradedLine = (subsystem, report) => `${DEGRADED_PREFIX} ${JSON.stringify(degradedPayload(subsystem, report))}`;
|
|
2616
2626
|
|
|
2627
|
+
// ../contracts/src/key-scope.ts
|
|
2628
|
+
var KEY_SCOPES = ["full_access", "agent", "connector", "bound"];
|
|
2629
|
+
var KEY_SCOPE = {
|
|
2630
|
+
full_access: "full_access",
|
|
2631
|
+
agent: "agent",
|
|
2632
|
+
connector: "connector",
|
|
2633
|
+
bound: "bound"
|
|
2634
|
+
};
|
|
2635
|
+
var normalizeKeyScope = (value) => typeof value === "string" && KEY_SCOPES.includes(value) ? value : null;
|
|
2636
|
+
|
|
2617
2637
|
// ../contracts/src/observability.ts
|
|
2618
2638
|
var CLIENT_CONTEXT_HEADERS = {
|
|
2619
2639
|
surface: "x-pushary-surface",
|
|
@@ -3072,10 +3092,26 @@ var compressTranscriptRecord = (raw, deflateRaw) => {
|
|
|
3072
3092
|
};
|
|
3073
3093
|
|
|
3074
3094
|
// ../contracts/src/index.ts
|
|
3075
|
-
var KEY_SCOPES = ["full_access", "agent", "connector", "bound"];
|
|
3076
|
-
var normalizeKeyScope = (value) => typeof value === "string" && KEY_SCOPES.includes(value) ? value : null;
|
|
3077
3095
|
var APPROVAL_MODES = ["push_only", "terminal_only", "push_first", "notify_only"];
|
|
3078
3096
|
var isApprovalMode = (value) => typeof value === "string" && APPROVAL_MODES.includes(value);
|
|
3097
|
+
var APPROVAL_MODE_META = {
|
|
3098
|
+
push_first: {
|
|
3099
|
+
label: "When away",
|
|
3100
|
+
description: "Ask in the notch. Alert my phone when I\u2019m away."
|
|
3101
|
+
},
|
|
3102
|
+
push_only: {
|
|
3103
|
+
label: "Always",
|
|
3104
|
+
description: "Ask in the notch and on my phone."
|
|
3105
|
+
},
|
|
3106
|
+
notify_only: {
|
|
3107
|
+
label: "Alert only",
|
|
3108
|
+
description: "Notify my phone. I answer in the agent."
|
|
3109
|
+
},
|
|
3110
|
+
terminal_only: {
|
|
3111
|
+
label: "In agent",
|
|
3112
|
+
description: "I answer in the agent. No approval alerts."
|
|
3113
|
+
}
|
|
3114
|
+
};
|
|
3079
3115
|
var approvalWaitsAtTheAgentsPrompt = (mode) => {
|
|
3080
3116
|
switch (mode) {
|
|
3081
3117
|
case "push_first":
|
|
@@ -6355,6 +6391,8 @@ export {
|
|
|
6355
6391
|
toolsCoveredByGateEntry,
|
|
6356
6392
|
cursorGateOwnsToolCall,
|
|
6357
6393
|
degradedLine,
|
|
6394
|
+
KEY_SCOPE,
|
|
6395
|
+
normalizeKeyScope,
|
|
6358
6396
|
hookWritePath,
|
|
6359
6397
|
MAX_HOOK_ACTIVATION_EVIDENCE_ROWS,
|
|
6360
6398
|
isHookActivationReport,
|
|
@@ -6389,8 +6427,8 @@ export {
|
|
|
6389
6427
|
parseCodexNativeApproval,
|
|
6390
6428
|
codexNativeApprovalResponse,
|
|
6391
6429
|
compressTranscriptRecord,
|
|
6392
|
-
normalizeKeyScope,
|
|
6393
6430
|
isApprovalMode,
|
|
6431
|
+
APPROVAL_MODE_META,
|
|
6394
6432
|
approvalModeWithoutLocalPrompt,
|
|
6395
6433
|
timeoutActionWithoutLocalPrompt,
|
|
6396
6434
|
isTimeoutAction,
|