pushary 1.9.103 → 1.9.105
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 +8 -0
- package/README.md +1 -0
- package/dist/{api-3O3GJV3V.js → api-RL5CPDTH.js} +13 -12
- package/dist/bin/pushary-audit.d.ts +1 -0
- package/dist/bin/pushary-audit.js +263 -0
- package/dist/bin/pushary-bell-hook.js +32 -30
- package/dist/bin/pushary-bell.js +14 -13
- package/dist/bin/pushary-claude.js +42 -41
- package/dist/bin/pushary-clean.js +42 -41
- package/dist/bin/pushary-codex-bridge.js +25 -24
- package/dist/bin/pushary-codex-hook.js +40 -38
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +17 -16
- package/dist/bin/pushary-connect.js +33 -32
- package/dist/bin/pushary-cowork.js +8 -8
- package/dist/bin/pushary-daemon.js +501 -72
- package/dist/bin/pushary-disconnect.js +32 -31
- package/dist/bin/pushary-display-hook.js +21 -20
- package/dist/bin/pushary-doctor.js +63 -61
- package/dist/bin/pushary-elicitation-hook.js +32 -30
- package/dist/bin/pushary-gemini-bridge.js +16 -15
- package/dist/bin/pushary-gemini-hook.js +35 -33
- package/dist/bin/pushary-hook.js +38 -35
- package/dist/bin/pushary-login.js +27 -26
- package/dist/bin/pushary-logout.js +33 -32
- package/dist/bin/pushary-mcp.js +14 -13
- package/dist/bin/pushary-mode.js +19 -18
- package/dist/bin/pushary-notification-hook.js +32 -30
- package/dist/bin/pushary-opencode-hook.js +34 -32
- package/dist/bin/pushary-permission-denied-hook.js +37 -34
- package/dist/bin/pushary-permission-hook.js +38 -35
- package/dist/bin/pushary-post-hook.js +32 -30
- package/dist/bin/pushary-prompt-hook.js +32 -30
- package/dist/bin/pushary-session-end-hook.js +34 -32
- package/dist/bin/pushary-session-start-hook.js +42 -40
- package/dist/bin/pushary-setup.js +71 -69
- package/dist/bin/pushary-stats.js +6 -6
- package/dist/bin/pushary-status.js +39 -38
- package/dist/bin/pushary-stop-hook.js +32 -30
- package/dist/bin/pushary-stopfailure-hook.js +32 -30
- package/dist/bin/pushary-suggestions.js +19 -18
- package/dist/bin/pushary-transcript-register.js +22 -21
- package/dist/bin/pushary-transcripts.js +30 -29
- package/dist/bin/pushary-upgrade.js +48 -46
- package/dist/bin/pushary-wait.js +19 -18
- package/dist/bin/pushary.js +11 -9
- package/dist/{chunk-WYJ6QM7K.js → chunk-2HC5ISDW.js} +2 -2
- package/dist/{chunk-FF7L4B3W.js → chunk-43PNDDB3.js} +9 -9
- package/dist/{chunk-2PR5EP7N.js → chunk-4EMPELDR.js} +4 -4
- package/dist/{chunk-3OIUMHHO.js → chunk-4XE3DVF7.js} +2 -2
- package/dist/{chunk-EOD3DBIN.js → chunk-5IAW6G3K.js} +3 -3
- package/dist/{chunk-QD57EL3I.js → chunk-6DKMZBRK.js} +3 -3
- package/dist/{chunk-MP3SEXXJ.js → chunk-76JOLPST.js} +1 -1
- package/dist/{chunk-ZXK46QT4.js → chunk-772NHSQB.js} +2 -2
- package/dist/{chunk-JUA7MX2V.js → chunk-A37RKFI3.js} +4 -4
- package/dist/{chunk-TLERJKSE.js → chunk-ASCQXNCL.js} +1 -1
- package/dist/{chunk-WZNLWDSL.js → chunk-ATVZAEM5.js} +7 -7
- package/dist/{chunk-WPK2UWDU.js → chunk-B5Q44HKN.js} +2 -2
- package/dist/{chunk-HYAQIKYB.js → chunk-B7O4CXFX.js} +6 -6
- package/dist/{chunk-KZERVKTD.js → chunk-BG4HHB7E.js} +2 -1
- package/dist/{chunk-3Q2X3T3U.js → chunk-CJTJ55DR.js} +1 -1
- package/dist/{chunk-SRE6XJ3K.js → chunk-CKWV3T7O.js} +7 -7
- package/dist/{chunk-AZSOH2SF.js → chunk-DA57ZI62.js} +2 -2
- package/dist/{chunk-WVAJSBI2.js → chunk-DH22FQAS.js} +3 -3
- package/dist/{chunk-JPKJBKZE.js → chunk-DIVVLBZZ.js} +9 -9
- package/dist/{chunk-KTM2X3XQ.js → chunk-DS672F57.js} +16 -16
- package/dist/{chunk-7BIVBOD5.js → chunk-EMSRB2KH.js} +5 -5
- package/dist/{chunk-T7G6IIV4.js → chunk-FE5JENEJ.js} +3 -3
- package/dist/{chunk-JECH4NJL.js → chunk-FJYUB3ZK.js} +6 -4
- package/dist/{chunk-4TVLPGJV.js → chunk-FUTFQSRA.js} +1 -1
- package/dist/{chunk-UQWEH7CK.js → chunk-G5HGV6D4.js} +5 -5
- package/dist/{chunk-MK2XE66G.js → chunk-GBHP3LML.js} +7 -5
- package/dist/{chunk-J6SSLXSU.js → chunk-GESW4OSZ.js} +4 -4
- package/dist/{chunk-KOUB4ZLX.js → chunk-GKCDMAUM.js} +1 -1
- package/dist/{chunk-VJOMBYY5.js → chunk-GUIS6ASL.js} +1 -1
- package/dist/{chunk-KACD6W6J.js → chunk-HH5NNPB5.js} +1 -1
- package/dist/{chunk-3ITURBPE.js → chunk-HLYZEZOI.js} +5 -5
- package/dist/{chunk-NZQEABRO.js → chunk-HONSMBF2.js} +13 -11
- package/dist/{chunk-G7RMOSRX.js → chunk-HXBQTPKC.js} +1 -1
- package/dist/{chunk-6N5DQG5F.js → chunk-I3IUS4SR.js} +2 -2
- package/dist/{chunk-ZCYLCD6L.js → chunk-IAASPG5B.js} +5 -5
- package/dist/{chunk-YETNUPV5.js → chunk-IGO5NDQY.js} +3 -3
- package/dist/{chunk-PM34Z5WX.js → chunk-IHQRLJEP.js} +12 -12
- package/dist/{chunk-X3HBR57D.js → chunk-J2HIFUAT.js} +7 -7
- package/dist/{chunk-7OZOFTTB.js → chunk-J5PUKKCT.js} +10 -9
- package/dist/{chunk-O7ITTNDD.js → chunk-JCSJEMTA.js} +210 -60
- package/dist/{chunk-AWF5WICI.js → chunk-JDGLNYDZ.js} +2 -2
- package/dist/{chunk-UOE26LPT.js → chunk-JLJJRBTD.js} +8 -7
- package/dist/{chunk-Z2TX7DVU.js → chunk-KHZCJP7P.js} +15 -13
- package/dist/{chunk-5PW25NHB.js → chunk-LK3WA6MK.js} +5 -5
- package/dist/{chunk-KLJ2CTT7.js → chunk-LL7SW4RL.js} +4 -4
- package/dist/{chunk-4QO267OY.js → chunk-LMDXQIYT.js} +1 -1
- package/dist/{chunk-VD6CAELE.js → chunk-MFJHLVIZ.js} +11 -95
- package/dist/{chunk-E7WJQBK3.js → chunk-MLLL2ET6.js} +17 -61
- package/dist/{chunk-COBOR3ST.js → chunk-NM44KCO6.js} +6 -4
- package/dist/{chunk-4FAJQPFY.js → chunk-O5TB2LMQ.js} +338 -0
- package/dist/{chunk-AVXG5QB2.js → chunk-OBZQPBUI.js} +5 -5
- package/dist/chunk-OINGJICB.js +108 -0
- package/dist/{chunk-RMFL62HR.js → chunk-P3H6I656.js} +14 -12
- package/dist/{chunk-Y7KRX7U4.js → chunk-P3VVRBBI.js} +1 -1
- package/dist/{chunk-V5DV7XZN.js → chunk-PFZCLG55.js} +4 -4
- package/dist/{chunk-2S5J5YI2.js → chunk-QCFWJZGT.js} +5 -5
- package/dist/{chunk-SA4PCB6N.js → chunk-RKQVMFHN.js} +11 -93
- package/dist/{chunk-LURFSDCL.js → chunk-ROVLRXBI.js} +1 -1
- package/dist/{chunk-JKOAAIJD.js → chunk-S2TTGX6F.js} +5 -5
- package/dist/{chunk-Y3SZVZF6.js → chunk-S75UO75C.js} +2 -2
- package/dist/chunk-T5I4PKOQ.js +122 -0
- package/dist/{chunk-3K7PB5LI.js → chunk-TXMYET7E.js} +3 -3
- package/dist/{chunk-CQ7QE4W2.js → chunk-UUJQK7DJ.js} +1 -1
- package/dist/{chunk-SXAZPWL7.js → chunk-UXIUCMFO.js} +8 -6
- package/dist/{chunk-JVE4P54I.js → chunk-VCWLGM77.js} +5 -3
- package/dist/{chunk-RVSRPDRF.js → chunk-VKTW5WVB.js} +2 -2
- package/dist/{chunk-T6TQETDN.js → chunk-WTREXZGS.js} +4 -4
- package/dist/chunk-WUIWHGKF.js +56 -0
- package/dist/{chunk-IOQ3ZCAE.js → chunk-X3QG5RT5.js} +1 -1
- package/dist/{chunk-O5ZKMUTP.js → chunk-X4TZN52V.js} +6 -6
- package/dist/{chunk-AHIAB7JQ.js → chunk-XN527J4W.js} +1 -1
- package/dist/{chunk-PWGD5EP6.js → chunk-YDQ6OJMF.js} +7 -1
- package/dist/{chunk-NMUI3ZWG.js → chunk-YPY4YCIZ.js} +1 -1
- package/dist/{chunk-PPY5N2E6.js → chunk-YU2EUD7O.js} +1 -1
- package/dist/{chunk-AFGMZZEB.js → chunk-Z5FV7LTD.js} +2 -2
- package/dist/{chunk-BQHZRH6S.js → chunk-ZCBTCW3T.js} +26 -110
- package/dist/{codex-app-cards-switch-D475JLP5.js → codex-app-cards-switch-FD2ZWLYL.js} +13 -12
- package/dist/{codex-desktop-launch-WOPEZMO6.js → codex-desktop-launch-BN5OABPN.js} +1 -1
- package/dist/{codex-session-launch-AWWECV2L.js → codex-session-launch-O3PHQWTS.js} +22 -21
- package/dist/{config-A5EC37VZ.js → config-KWP7UXYG.js} +3 -3
- package/dist/{global-upgrade-V6FA6MUF.js → global-upgrade-NBSY5436.js} +12 -11
- package/dist/{identity-BEPQQHNR.js → identity-RP5I7KTV.js} +5 -4
- package/dist/{live-capabilities-EAM2QN73.js → live-capabilities-XC6C47ZH.js} +6 -5
- package/dist/{paths-2IEEYSHM.js → paths-OE5APZ4Q.js} +8 -3
- package/dist/reapply-DRZ32BIB.js +65 -0
- package/dist/src/index.js +39 -36
- package/dist/{upgrade-lock-DLGVC34L.js → upgrade-lock-LWTVHYAJ.js} +5 -4
- package/dist/usage-5YESCANM.js +11 -0
- package/package.json +2 -1
- package/dist/reapply-LDCMRN6Q.js +0 -64
- package/dist/usage-U6H5UFS2.js +0 -11
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
toolResultErrorText,
|
|
28
28
|
transcriptTokensIn,
|
|
29
29
|
transcriptUsageRequest
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-76JOLPST.js";
|
|
31
31
|
import {
|
|
32
32
|
branchFor,
|
|
33
33
|
repoKeyFor
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-LMDXQIYT.js";
|
|
35
35
|
import {
|
|
36
36
|
cancelQuestion,
|
|
37
37
|
clientErrorKindOf,
|
|
@@ -39,33 +39,35 @@ import {
|
|
|
39
39
|
reportClientError,
|
|
40
40
|
sendNotification,
|
|
41
41
|
waitForAnswer
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-IAASPG5B.js";
|
|
43
43
|
import {
|
|
44
44
|
withRetry
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-PFZCLG55.js";
|
|
46
46
|
import {
|
|
47
47
|
getMachineId
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-I3IUS4SR.js";
|
|
49
49
|
import {
|
|
50
50
|
reportedInstallSource
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-Z5FV7LTD.js";
|
|
52
52
|
import {
|
|
53
53
|
IDLE_PROMPT_NOTIFICATION,
|
|
54
54
|
NOTIFICATION_PUSH_TYPES,
|
|
55
55
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS,
|
|
56
56
|
canonicalJson,
|
|
57
57
|
claudeConfigDir
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-JCSJEMTA.js";
|
|
59
59
|
import {
|
|
60
60
|
compareVersion,
|
|
61
|
-
parseVersion
|
|
62
|
-
|
|
63
|
-
writeJsonAtomicDurable
|
|
64
|
-
} from "./chunk-BQHZRH6S.js";
|
|
61
|
+
parseVersion
|
|
62
|
+
} from "./chunk-ZCBTCW3T.js";
|
|
65
63
|
import {
|
|
66
64
|
getApiKey,
|
|
67
65
|
getBaseUrl
|
|
68
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-GKCDMAUM.js";
|
|
67
|
+
import {
|
|
68
|
+
writeFileAtomic,
|
|
69
|
+
writeJsonAtomicDurable
|
|
70
|
+
} from "./chunk-T5I4PKOQ.js";
|
|
69
71
|
import {
|
|
70
72
|
BLOCKED_ACTION_GRANT_TTL_SECONDS,
|
|
71
73
|
COMMAND_RECOVERY,
|
|
@@ -86,7 +88,7 @@ import {
|
|
|
86
88
|
resolveAutoResolveOrigin,
|
|
87
89
|
resolvePolicy,
|
|
88
90
|
unansweredRefusalReason
|
|
89
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-O5TB2LMQ.js";
|
|
90
92
|
|
|
91
93
|
// src/pending.ts
|
|
92
94
|
import { join } from "path";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DH22FQAS.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YPY4YCIZ.js";
|
|
7
7
|
import {
|
|
8
8
|
UsageError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YU2EUD7O.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YDQ6OJMF.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_CONNECTOR_GUIDE,
|
|
15
15
|
CLAUDE_CONNECTOR_STEPS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
CLAUDE_CONNECTOR_URL,
|
|
18
18
|
COWORK_CONNECTOR_LIMIT,
|
|
19
19
|
COWORK_STANDING_INSTRUCTIONS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-O5TB2LMQ.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I3IUS4SR.js";
|
|
4
4
|
import {
|
|
5
5
|
getBaseUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GKCDMAUM.js";
|
|
7
7
|
import {
|
|
8
8
|
NetworkError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YU2EUD7O.js";
|
|
10
10
|
import {
|
|
11
11
|
getPackageVersion
|
|
12
12
|
} from "./chunk-ZVU6WMMU.js";
|
|
13
13
|
import {
|
|
14
14
|
clientContextHeaders,
|
|
15
15
|
redactSecretsFromContent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-O5TB2LMQ.js";
|
|
17
17
|
|
|
18
18
|
// src/cli/net.ts
|
|
19
19
|
import { createRequire } from "module";
|
|
@@ -1,101 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AGENT_CHOICES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DH22FQAS.js";
|
|
4
4
|
import {
|
|
5
5
|
BELL_HOOK_BINARY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GUIS6ASL.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_HOOK_EVENTS,
|
|
9
9
|
CODEX_HOOK_EVENTS,
|
|
10
|
-
HOOK_SHELL,
|
|
11
10
|
hasCodexHooks,
|
|
12
11
|
holdBudgetOf,
|
|
13
12
|
hookBinaryNameOf,
|
|
13
|
+
hookCommandTokens,
|
|
14
|
+
hookExecutableName,
|
|
15
|
+
isBridgeLocator,
|
|
14
16
|
isProtectedByScope,
|
|
15
17
|
registerHookEntry
|
|
16
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JCSJEMTA.js";
|
|
17
19
|
import {
|
|
18
20
|
CURSOR_GATE_EVENTS,
|
|
19
21
|
HOOK_BUDGETS,
|
|
20
22
|
HOOK_LOCATOR_BINARY,
|
|
21
23
|
hookCommandHoldBudget
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
|
|
24
|
-
// src/diagnostics/bridge.ts
|
|
25
|
-
import { execFileSync } from "child_process";
|
|
26
|
-
import { existsSync, readFileSync } from "fs";
|
|
27
|
-
import { homedir } from "os";
|
|
28
|
-
import { dirname, join } from "path";
|
|
29
|
-
var BRIDGE_BUNDLE_IDENTIFIER = "com.pushary.app";
|
|
30
|
-
var BRIDGE_HELPER_SUFFIX = "/Contents/Helpers/pushary-bridge";
|
|
31
|
-
var BRIDGE_BUNDLE_ROOTS = ["/Applications/Pushary.app", "$HOME/Applications/Pushary.app"];
|
|
32
|
-
var expandHome = (path, home) => path.replaceAll("$HOME", home);
|
|
33
|
-
var parseBridgeStub = (contents, stubPath) => {
|
|
34
|
-
const helperSuffix = contents.match(/^H=(\S+)$/m)?.[1] ?? BRIDGE_HELPER_SUFFIX;
|
|
35
|
-
const cachePath = contents.match(/^C="([^"\n]+)"$/m)?.[1] ?? join(dirname(stubPath), ".bridge-cache");
|
|
36
|
-
const rootsLine = contents.match(/^for P in ((?:"[^"\n]*"\s*)+); do$/m)?.[1];
|
|
37
|
-
const bundleRoots = rootsLine ? [...rootsLine.matchAll(/"([^"]*)"/g)].map((match) => match[1]) : BRIDGE_BUNDLE_ROOTS;
|
|
38
|
-
const bundleIdentifier = contents.match(/kMDItemCFBundleIdentifier == "([^"]+)"/)?.[1] ?? BRIDGE_BUNDLE_IDENTIFIER;
|
|
39
|
-
return { helperSuffix, cachePath, bundleRoots, bundleIdentifier };
|
|
40
|
-
};
|
|
41
|
-
var resolveBridgeStub = (stubPath, probe) => {
|
|
42
|
-
const contents = probe.readFile(stubPath);
|
|
43
|
-
if (contents === null) return { kind: "no-stub", stub: stubPath };
|
|
44
|
-
const shape = parseBridgeStub(contents, stubPath);
|
|
45
|
-
const helperIn = (bundle) => `${bundle}${shape.helperSuffix}`;
|
|
46
|
-
const looked = [];
|
|
47
|
-
for (const root of shape.bundleRoots.map((root2) => expandHome(root2, probe.home))) {
|
|
48
|
-
looked.push(root);
|
|
49
|
-
if (probe.exists(helperIn(root))) return { kind: "bundle", helper: helperIn(root), via: "root" };
|
|
50
|
-
}
|
|
51
|
-
const cached = shape.cachePath ? probe.readFile(shape.cachePath)?.split("\n")[0]?.trim() : void 0;
|
|
52
|
-
if (cached) {
|
|
53
|
-
looked.push(cached);
|
|
54
|
-
if (probe.exists(helperIn(cached))) return { kind: "bundle", helper: helperIn(cached), via: "cache" };
|
|
55
|
-
}
|
|
56
|
-
for (const found of probe.mdfind(shape.bundleIdentifier)) {
|
|
57
|
-
looked.push(found);
|
|
58
|
-
if (probe.exists(helperIn(found))) return { kind: "bundle", helper: helperIn(found), via: "spotlight" };
|
|
59
|
-
}
|
|
60
|
-
return { kind: "missing", stub: stubPath, looked };
|
|
61
|
-
};
|
|
62
|
-
var BRIDGE_GONE_MESSAGE = "the Mac app is gone but its hooks remain; run pushary setup or reinstall the app";
|
|
63
|
-
var describeBridgeResolution = (resolution) => {
|
|
64
|
-
switch (resolution.kind) {
|
|
65
|
-
case "bundle":
|
|
66
|
-
return `${resolution.helper} (${resolution.via === "root" ? "installed" : resolution.via === "cache" ? "cached path" : "found by Spotlight"})`;
|
|
67
|
-
case "missing":
|
|
68
|
-
return BRIDGE_GONE_MESSAGE;
|
|
69
|
-
case "no-stub":
|
|
70
|
-
return `${resolution.stub} is not there; ${BRIDGE_GONE_MESSAGE}`;
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
var isBridgeLocator = (executable) => executable !== null && executable.split(/[/\\]/).pop() === HOOK_LOCATOR_BINARY;
|
|
74
|
-
var spotlight = (bundleIdentifier) => {
|
|
75
|
-
if (process.platform !== "darwin") return [];
|
|
76
|
-
try {
|
|
77
|
-
return execFileSync("/usr/bin/mdfind", [`kMDItemCFBundleIdentifier == "${bundleIdentifier}"`], {
|
|
78
|
-
encoding: "utf-8",
|
|
79
|
-
timeout: 5e3,
|
|
80
|
-
stdio: ["ignore", "pipe", "ignore"]
|
|
81
|
-
}).split("\n").map((line) => line.trim()).filter((line) => line !== "");
|
|
82
|
-
} catch {
|
|
83
|
-
return [];
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
var readOrNull = (path) => {
|
|
87
|
-
try {
|
|
88
|
-
return readFileSync(path, "utf-8");
|
|
89
|
-
} catch {
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
var liveBridgeProbe = () => ({
|
|
94
|
-
exists: existsSync,
|
|
95
|
-
readFile: readOrNull,
|
|
96
|
-
mdfind: spotlight,
|
|
97
|
-
home: homedir()
|
|
98
|
-
});
|
|
24
|
+
} from "./chunk-O5TB2LMQ.js";
|
|
99
25
|
|
|
100
26
|
// src/gemini-config.ts
|
|
101
27
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -200,16 +126,8 @@ var missingGeminiHookEvents = (settings) => {
|
|
|
200
126
|
var record = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
201
127
|
var CLAUDE_HOOK_BINARY = /pushary-[a-z-]*hook/;
|
|
202
128
|
var EXACT_HOOK_BINARY = /^pushary-[a-z-]*(hook|gate)$/;
|
|
203
|
-
var
|
|
204
|
-
|
|
205
|
-
for (const raw of tokens.reverse()) {
|
|
206
|
-
const unquoted = raw[0] === '"' && raw.at(-1) === '"' || raw[0] === "'" && raw.at(-1) === "'" ? raw.slice(1, -1) : raw;
|
|
207
|
-
const token = command.startsWith(`${HOOK_SHELL} `) && raw[0] === '"' ? unquoted.replace(/\\(["\\$`])/g, "$1") : unquoted;
|
|
208
|
-
const name = hookBinaryNameOf(token.split(/[/\\]/).pop() ?? "");
|
|
209
|
-
if (name === HOOK_LOCATOR_BINARY || EXACT_HOOK_BINARY.test(name)) return token;
|
|
210
|
-
}
|
|
211
|
-
return null;
|
|
212
|
-
};
|
|
129
|
+
var isPusharyHookName = (name) => name === HOOK_LOCATOR_BINARY || EXACT_HOOK_BINARY.test(name);
|
|
130
|
+
var pusharyHookExecutable = (command) => [...hookCommandTokens(command)].reverse().find((token) => isPusharyHookName(hookExecutableName(token))) ?? null;
|
|
213
131
|
var claudeWired = ({ claudeJson, settings, skillExists }) => {
|
|
214
132
|
if (record(record(claudeJson)?.mcpServers)?.pushary) return true;
|
|
215
133
|
const s = record(settings);
|
|
@@ -421,10 +339,6 @@ var describeHookOwnership = (entries, names) => {
|
|
|
421
339
|
};
|
|
422
340
|
|
|
423
341
|
export {
|
|
424
|
-
resolveBridgeStub,
|
|
425
|
-
describeBridgeResolution,
|
|
426
|
-
isBridgeLocator,
|
|
427
|
-
liveBridgeProbe,
|
|
428
342
|
GEMINI_HOOK_BINARY,
|
|
429
343
|
GEMINI_HOOK_EVENTS,
|
|
430
344
|
addGeminiMcpServer,
|
|
@@ -450,6 +364,8 @@ export {
|
|
|
450
364
|
describeHoldSentence,
|
|
451
365
|
captureMcpServer,
|
|
452
366
|
restoreMcpServer,
|
|
367
|
+
DEFAULT_HOOKS_KEY_PATH,
|
|
368
|
+
hooksAt,
|
|
453
369
|
captureHookTakeover,
|
|
454
370
|
isHookTakeoverReceipt,
|
|
455
371
|
restoreHookTakeover,
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
claudeSettingsLocationFor,
|
|
3
|
+
readClaudePermissionRules
|
|
4
|
+
} from "./chunk-WUIWHGKF.js";
|
|
1
5
|
import {
|
|
2
6
|
askAgentQuestions,
|
|
3
7
|
defersToNativeMode,
|
|
4
8
|
outcomeOfFailedAsk,
|
|
5
9
|
reportMachineDenial,
|
|
6
10
|
storedWaitDeadline
|
|
7
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-J2HIFUAT.js";
|
|
8
12
|
import {
|
|
9
13
|
isGatingMoment,
|
|
10
14
|
recordKeylessMoment
|
|
11
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FUTFQSRA.js";
|
|
12
16
|
import {
|
|
13
17
|
isAdmitted,
|
|
14
18
|
readAdmissionRules
|
|
15
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RKQVMFHN.js";
|
|
16
20
|
import {
|
|
17
21
|
isDeferAnswer,
|
|
18
22
|
oncePerSession
|
|
19
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-UUJQK7DJ.js";
|
|
20
24
|
import {
|
|
21
25
|
activeHookSource,
|
|
22
26
|
activeIdentity,
|
|
23
27
|
namedSource
|
|
24
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-JLJJRBTD.js";
|
|
25
29
|
import {
|
|
26
30
|
DEFAULT_SESSION,
|
|
27
31
|
approvalAwaitingRetry,
|
|
@@ -37,7 +41,7 @@ import {
|
|
|
37
41
|
recordBlockedActionHint,
|
|
38
42
|
reportEvent,
|
|
39
43
|
settleQuestionsForToolUse
|
|
40
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-KHZCJP7P.js";
|
|
41
45
|
import {
|
|
42
46
|
UNNAMED_ACTION,
|
|
43
47
|
deriveAction,
|
|
@@ -48,11 +52,11 @@ import {
|
|
|
48
52
|
patchDeletesFiles,
|
|
49
53
|
permissionDeniedAction,
|
|
50
54
|
scopePathFor
|
|
51
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-76JOLPST.js";
|
|
52
56
|
import {
|
|
53
57
|
repoKeyFor,
|
|
54
58
|
repositoryScopeFor
|
|
55
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-LMDXQIYT.js";
|
|
56
60
|
import {
|
|
57
61
|
askUser,
|
|
58
62
|
cancelQuestion,
|
|
@@ -69,20 +73,17 @@ import {
|
|
|
69
73
|
waitForQuestion,
|
|
70
74
|
waitsForThePhone,
|
|
71
75
|
withdrawQuestion
|
|
72
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-IAASPG5B.js";
|
|
73
77
|
import {
|
|
74
78
|
getMachineId
|
|
75
|
-
} from "./chunk-
|
|
76
|
-
import {
|
|
77
|
-
claudeConfigDir
|
|
78
|
-
} from "./chunk-O7ITTNDD.js";
|
|
79
|
+
} from "./chunk-I3IUS4SR.js";
|
|
79
80
|
import {
|
|
80
81
|
getApiKey,
|
|
81
82
|
getBaseUrl
|
|
82
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-GKCDMAUM.js";
|
|
83
84
|
import {
|
|
84
85
|
NPX_LATEST_COMMAND
|
|
85
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-YDQ6OJMF.js";
|
|
86
87
|
import {
|
|
87
88
|
AGENT_QUESTION_STRATEGY,
|
|
88
89
|
AGENT_QUESTION_TOOL,
|
|
@@ -109,7 +110,6 @@ import {
|
|
|
109
110
|
claudeConsultsItsAllowlist,
|
|
110
111
|
claudePermissionDeniedOutput,
|
|
111
112
|
claudePermissionRequestOutput,
|
|
112
|
-
claudePermissionRulesFromSettings,
|
|
113
113
|
claudePreToolUseOutput,
|
|
114
114
|
claudePromptTakesTheCall,
|
|
115
115
|
claudeStoppedPermissionRequestOutput,
|
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
terminalStaysLiveForTheCall,
|
|
140
140
|
timeoutActionWithoutLocalPrompt,
|
|
141
141
|
unansweredRefusalReason
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-O5TB2LMQ.js";
|
|
143
143
|
|
|
144
144
|
// src/terminal-answer-watch.ts
|
|
145
145
|
import { closeSync, openSync, readSync, statSync } from "fs";
|
|
@@ -234,50 +234,6 @@ var watchForTerminalAnswer = (transcriptPath, call, startedAtMs, signal, pollMs
|
|
|
234
234
|
tick();
|
|
235
235
|
});
|
|
236
236
|
|
|
237
|
-
// src/claude-permission-rules.ts
|
|
238
|
-
import { readFileSync, statSync as statSync2 } from "fs";
|
|
239
|
-
import { homedir } from "os";
|
|
240
|
-
import { join } from "path";
|
|
241
|
-
var MANAGED_CLAUDE_SETTINGS_BY_PLATFORM = {
|
|
242
|
-
darwin: "/Library/Application Support/ClaudeCode/managed-settings.json",
|
|
243
|
-
linux: "/etc/claude-code/managed-settings.json",
|
|
244
|
-
win32: "C:\\ProgramData\\ClaudeCode\\managed-settings.json"
|
|
245
|
-
};
|
|
246
|
-
var MAX_CLAUDE_SETTINGS_BYTES = 1048576;
|
|
247
|
-
var claudeSettingsLocationFor = (cwd, environment = process.env, home = homedir(), platform = process.platform) => ({
|
|
248
|
-
configDir: claudeConfigDir(home, environment),
|
|
249
|
-
projectDir: environment.CLAUDE_PROJECT_DIR || cwd || void 0,
|
|
250
|
-
managedSettingsPath: MANAGED_CLAUDE_SETTINGS_BY_PLATFORM[platform]
|
|
251
|
-
});
|
|
252
|
-
var claudeSettingsSources = (location) => [
|
|
253
|
-
...location.managedSettingsPath ? [{ path: location.managedSettingsPath, trust: "grants" }] : [],
|
|
254
|
-
{ path: join(location.configDir, "settings.json"), trust: "grants" },
|
|
255
|
-
...location.projectDir ? [
|
|
256
|
-
{ path: join(location.projectDir, ".claude", "settings.json"), trust: "restricts_only" },
|
|
257
|
-
{ path: join(location.projectDir, ".claude", "settings.local.json"), trust: "grants" }
|
|
258
|
-
] : []
|
|
259
|
-
];
|
|
260
|
-
var isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
261
|
-
var restrictionsOnly = (document) => {
|
|
262
|
-
if (!isRecord2(document) || !isRecord2(document.permissions)) return null;
|
|
263
|
-
const { ask: ask2, deny: deny2 } = document.permissions;
|
|
264
|
-
return { permissions: { ask: ask2, deny: deny2 } };
|
|
265
|
-
};
|
|
266
|
-
var readSettingsDocument = (path) => {
|
|
267
|
-
try {
|
|
268
|
-
const stats = statSync2(path);
|
|
269
|
-
if (!stats.isFile() || stats.size > MAX_CLAUDE_SETTINGS_BYTES) return null;
|
|
270
|
-
return JSON.parse(readFileSync(path, "utf8"));
|
|
271
|
-
} catch {
|
|
272
|
-
return null;
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
var trustedDocument = ({ path, trust }) => {
|
|
276
|
-
const document = readSettingsDocument(path);
|
|
277
|
-
return trust === "grants" ? document : restrictionsOnly(document);
|
|
278
|
-
};
|
|
279
|
-
var readClaudePermissionRules = (location) => claudePermissionRulesFromSettings(claudeSettingsSources(location).map(trustedDocument));
|
|
280
|
-
|
|
281
237
|
// src/decision-episode.ts
|
|
282
238
|
var EPISODE_PATH = "/api/agent/decision-episode";
|
|
283
239
|
var EMIT_TIMEOUT_MS = 3e3;
|
|
@@ -5,19 +5,21 @@ import {
|
|
|
5
5
|
hermesAppWiringRecord,
|
|
6
6
|
hermesConfigReceipt,
|
|
7
7
|
hermesSetupReceipt
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JCSJEMTA.js";
|
|
9
|
+
import {
|
|
10
|
+
resolvePathBinary
|
|
11
|
+
} from "./chunk-ZCBTCW3T.js";
|
|
9
12
|
import {
|
|
10
13
|
readJsonSafe,
|
|
11
|
-
resolvePathBinary,
|
|
12
14
|
writeJsonAtomic
|
|
13
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-T5I4PKOQ.js";
|
|
14
16
|
import {
|
|
15
17
|
isNewerVersion,
|
|
16
18
|
isReleaseVersion
|
|
17
19
|
} from "./chunk-ZVU6WMMU.js";
|
|
18
20
|
import {
|
|
19
21
|
isRecord
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-O5TB2LMQ.js";
|
|
21
23
|
|
|
22
24
|
// src/hermes/plugin-payload.ts
|
|
23
25
|
import { createHash } from "crypto";
|