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
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JLJJRBTD.js";
|
|
4
4
|
import {
|
|
5
5
|
hookOwnerOf,
|
|
6
|
-
hookOwnerOfCommands
|
|
7
|
-
|
|
8
|
-
resolveBridgeStub
|
|
9
|
-
} from "./chunk-VD6CAELE.js";
|
|
6
|
+
hookOwnerOfCommands
|
|
7
|
+
} from "./chunk-MFJHLVIZ.js";
|
|
10
8
|
import {
|
|
11
9
|
AGENT_CHOICES
|
|
12
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DH22FQAS.js";
|
|
13
11
|
import {
|
|
12
|
+
bridgeStub,
|
|
14
13
|
claudeSettings,
|
|
15
14
|
codexHooksJson,
|
|
16
15
|
cursorUserHooks,
|
|
17
16
|
geminiSettings,
|
|
18
17
|
guardedArgv,
|
|
19
|
-
|
|
18
|
+
liveBridgeProbe,
|
|
19
|
+
resolveBridgeStub,
|
|
20
20
|
vscodePluginDir,
|
|
21
21
|
windowsNodeLauncherFor
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JCSJEMTA.js";
|
|
23
23
|
import {
|
|
24
24
|
readJsonSafe
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-T5I4PKOQ.js";
|
|
26
26
|
import {
|
|
27
27
|
HOOK_BUDGETS,
|
|
28
28
|
HOOK_COMPATIBLE_PROFILES,
|
|
29
|
-
HOOK_LOCATOR_BINARY,
|
|
30
29
|
OPENCODE_APPROVAL_EVENT,
|
|
31
30
|
hookCompatibleProfile,
|
|
32
31
|
isRecord
|
|
33
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-O5TB2LMQ.js";
|
|
34
33
|
|
|
35
34
|
// src/opencode-plugin.ts
|
|
36
35
|
var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
|
|
@@ -553,12 +552,13 @@ var agentHookOwner = (agent, appAvailable) => {
|
|
|
553
552
|
return hookOwnerOf(document.kind === "ok" && isRecord(document.value) ? document.value : null, appAvailable, agentHooksKeyPath(agent));
|
|
554
553
|
};
|
|
555
554
|
var cliOwnsAnyAgentHooks = (appAvailable) => AGENT_CHOICES.some((agent) => agentHookOwner(agent, appAvailable) === "cli");
|
|
556
|
-
var macAppBridgeAvailable = () => resolveBridgeStub(
|
|
555
|
+
var macAppBridgeAvailable = () => resolveBridgeStub(bridgeStub(), liveBridgeProbe()).kind === "bundle";
|
|
557
556
|
|
|
558
557
|
export {
|
|
559
558
|
OPENCODE_PLUGIN_PLACEHOLDER,
|
|
560
559
|
OPENCODE_PLUGIN_SIBLING,
|
|
561
560
|
OPENCODE_PLUGIN_SIBLING_CONTENTS,
|
|
561
|
+
openCodePluginArgv,
|
|
562
562
|
isOpenCodePluginOurs,
|
|
563
563
|
OPENCODE_HOOK_BINARY,
|
|
564
564
|
openCodeHookArgv,
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
announceSubscriptionRequired,
|
|
3
3
|
isDeferAnswer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UUJQK7DJ.js";
|
|
5
5
|
import {
|
|
6
6
|
AUTO_DECISION_WINDOW_MS,
|
|
7
7
|
DEFAULT_SESSION,
|
|
8
8
|
claimThrottle,
|
|
9
9
|
releaseThrottle,
|
|
10
10
|
reportEvent
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KHZCJP7P.js";
|
|
12
12
|
import {
|
|
13
13
|
deriveToolTarget,
|
|
14
14
|
permissionDeniedAction
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-76JOLPST.js";
|
|
16
16
|
import {
|
|
17
17
|
askUser,
|
|
18
18
|
isDecisionStopped,
|
|
19
19
|
isQuestionLimitRefusal,
|
|
20
20
|
waitForQuestion
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-IAASPG5B.js";
|
|
22
22
|
import {
|
|
23
23
|
SubscriptionRequiredError
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-PFZCLG55.js";
|
|
25
25
|
import {
|
|
26
26
|
getMachineId
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-I3IUS4SR.js";
|
|
28
28
|
import {
|
|
29
29
|
ASK_CONTEXT_MAX,
|
|
30
30
|
agentQuestionContext,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
questionsShownAsASet,
|
|
37
37
|
shouldDeferToNativeMode,
|
|
38
38
|
wireVerdictFor
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-O5TB2LMQ.js";
|
|
40
40
|
|
|
41
41
|
// src/machine-decision-audit.ts
|
|
42
42
|
import { basename } from "path";
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GESW4OSZ.js";
|
|
7
7
|
import {
|
|
8
8
|
daemonHasRemoteProof,
|
|
9
9
|
daemonServiceManagerAvailable,
|
|
10
10
|
hasDaemonServiceDefinition,
|
|
11
11
|
readDaemonNeedsLogin,
|
|
12
12
|
readDaemonStatus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HONSMBF2.js";
|
|
14
|
+
import {
|
|
15
|
+
getMachineId
|
|
16
|
+
} from "./chunk-I3IUS4SR.js";
|
|
14
17
|
import {
|
|
15
18
|
readControlMode,
|
|
16
19
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import {
|
|
19
|
-
getMachineId
|
|
20
|
-
} from "./chunk-6N5DQG5F.js";
|
|
20
|
+
} from "./chunk-B7O4CXFX.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-GKCDMAUM.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
26
|
} from "./chunk-ZVU6WMMU.js";
|
|
@@ -37,12 +37,13 @@ var sendHeartbeat = async (apiKey, input = {}, deps = {}) => {
|
|
|
37
37
|
method: "POST",
|
|
38
38
|
headers: { "Content-Type": "application/json", Authorization: `Bearer ${apiKey}` },
|
|
39
39
|
body: JSON.stringify({
|
|
40
|
-
machineId: getMachineId(),
|
|
40
|
+
machineId: input.machineId ?? getMachineId(),
|
|
41
41
|
hostname: hostname(),
|
|
42
42
|
cliVersion: getPackageVersion(),
|
|
43
43
|
repoKey: input.repoKey ?? null,
|
|
44
44
|
capabilities: input.capabilities ?? [],
|
|
45
|
-
autoUpdate: input.autoUpdate ?? null
|
|
45
|
+
autoUpdate: input.autoUpdate ?? null,
|
|
46
|
+
...input.hookWiring ? { hookWiring: input.hookWiring } : {}
|
|
46
47
|
}),
|
|
47
48
|
signal: AbortSignal.timeout(1e4)
|
|
48
49
|
});
|
|
@@ -2,9 +2,11 @@ import {
|
|
|
2
2
|
atLeast,
|
|
3
3
|
formatVersion,
|
|
4
4
|
quoteIfNeeded,
|
|
5
|
-
shellDoubleQuoted
|
|
5
|
+
shellDoubleQuoted
|
|
6
|
+
} from "./chunk-ZCBTCW3T.js";
|
|
7
|
+
import {
|
|
6
8
|
writeFileAtomic
|
|
7
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-T5I4PKOQ.js";
|
|
8
10
|
import {
|
|
9
11
|
cmdShimScriptOf
|
|
10
12
|
} from "./chunk-ZVU6WMMU.js";
|
|
@@ -15,7 +17,7 @@ import {
|
|
|
15
17
|
HOOK_LOCATOR_BINARY,
|
|
16
18
|
PRETOOLUSE_GATED_TOOLS,
|
|
17
19
|
withHookHoldBudget
|
|
18
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-O5TB2LMQ.js";
|
|
19
21
|
|
|
20
22
|
// src/setup/paths.ts
|
|
21
23
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -27,8 +29,8 @@ var claudeConfigDir = (home = homedir(), environment = { CLAUDE_CONFIG_DIR: proc
|
|
|
27
29
|
var claudeUserConfigFile = (home = homedir(), environment = { CLAUDE_CONFIG_DIR: process.env.CLAUDE_CONFIG_DIR }) => join(environment.CLAUDE_CONFIG_DIR ? claudeConfigDir(home, environment) : home, ".claude.json");
|
|
28
30
|
|
|
29
31
|
// src/setup/paths.ts
|
|
30
|
-
import { homedir as
|
|
31
|
-
import { join as
|
|
32
|
+
import { homedir as homedir4 } from "os";
|
|
33
|
+
import { join as join6 } from "path";
|
|
32
34
|
|
|
33
35
|
// src/codex-config.ts
|
|
34
36
|
import { createHash } from "crypto";
|
|
@@ -51,6 +53,39 @@ var HOOK_GUARD_SCRIPTS = {
|
|
|
51
53
|
node_script: `[ -f "$0" ] || exit 0; ${NODE_PRESENT}; exec node "$0" "$@"`,
|
|
52
54
|
cursor_gate_script: `[ -f "$0" ] || ${CURSOR_MISS}; command -v node >/dev/null 2>&1 || ${CURSOR_MISS}; exec node "$0" "$@"`
|
|
53
55
|
};
|
|
56
|
+
var COMMAND_TOKEN = /"(?:\\.|[^"\\])*"|'[^']*'|\S+/g;
|
|
57
|
+
var DOUBLE_QUOTED_ESCAPE = /\\(["\\$`])/g;
|
|
58
|
+
var [GUARD_SHELL, GUARD_SHELL_FLAG] = HOOK_SHELL.split(/\s+/);
|
|
59
|
+
var NODE_LAUNCHERS = /* @__PURE__ */ new Set(["node", "node.exe"]);
|
|
60
|
+
var GUARD_STATEMENT_SEPARATOR = "; ";
|
|
61
|
+
var guardExecStatement = (script) => script.slice(script.lastIndexOf(GUARD_STATEMENT_SEPARATOR) + GUARD_STATEMENT_SEPARATOR.length);
|
|
62
|
+
var GUARDS_WITHOUT_ARGUMENTS_EXEC_STATEMENT = 'exec "$B"';
|
|
63
|
+
var GUARD_EXEC_STATEMENTS = [
|
|
64
|
+
.../* @__PURE__ */ new Set([...Object.values(HOOK_GUARD_SCRIPTS).map(guardExecStatement), GUARDS_WITHOUT_ARGUMENTS_EXEC_STATEMENT])
|
|
65
|
+
];
|
|
66
|
+
var guardRunsItsTarget = (script) => GUARD_EXEC_STATEMENTS.some((statement) => script.endsWith(statement));
|
|
67
|
+
var NODE_GUARD_EXEC_STATEMENT = guardExecStatement(HOOK_GUARD_SCRIPTS.node_script);
|
|
68
|
+
var guardRunsThroughNode = (script) => script.endsWith(NODE_GUARD_EXEC_STATEMENT);
|
|
69
|
+
var isWrappedIn = (token, quote) => token[0] === quote && token.at(-1) === quote;
|
|
70
|
+
var unquotedToken = (raw, unescapesDoubleQuotes) => {
|
|
71
|
+
const unquoted = isWrappedIn(raw, '"') || isWrappedIn(raw, "'") ? raw.slice(1, -1) : raw;
|
|
72
|
+
return unescapesDoubleQuotes && raw[0] === '"' ? unquoted.replace(DOUBLE_QUOTED_ESCAPE, "$1") : unquoted;
|
|
73
|
+
};
|
|
74
|
+
var hookCommandTokens = (command) => {
|
|
75
|
+
const unescapesDoubleQuotes = command.startsWith(`${HOOK_SHELL} `);
|
|
76
|
+
return (command.match(COMMAND_TOKEN) ?? []).map((raw) => unquotedToken(raw, unescapesDoubleQuotes));
|
|
77
|
+
};
|
|
78
|
+
var executableFileName = (executable) => executable.split(/[/\\]/).pop() ?? "";
|
|
79
|
+
var isNodeLauncher = (executable) => NODE_LAUNCHERS.has(executableFileName(executable).toLowerCase());
|
|
80
|
+
var guardedExecutable = (script, target) => script === void 0 || target === void 0 ? null : { executable: target, runsExecutable: guardRunsItsTarget(script), runsThroughNode: guardRunsThroughNode(script) };
|
|
81
|
+
var parseHookArgv = (argv) => {
|
|
82
|
+
const [first, second, script, target] = argv;
|
|
83
|
+
if (first === void 0) return null;
|
|
84
|
+
if (first === GUARD_SHELL && second === GUARD_SHELL_FLAG) return guardedExecutable(script, target);
|
|
85
|
+
if (isNodeLauncher(first)) return second === void 0 ? null : { executable: second, runsExecutable: true, runsThroughNode: true };
|
|
86
|
+
return { executable: first, runsExecutable: true, runsThroughNode: false };
|
|
87
|
+
};
|
|
88
|
+
var parseHookCommand = (command) => parseHookArgv(hookCommandTokens(command));
|
|
54
89
|
var BINARY_GUARDS = {
|
|
55
90
|
native: "native_binary",
|
|
56
91
|
node: "node_binary"
|
|
@@ -69,6 +104,7 @@ var targetPath = (target) => target.kind === "binary" ? target.path : target.scr
|
|
|
69
104
|
var runsThroughNode = (target) => target.kind !== "binary";
|
|
70
105
|
var LAUNCHABLE_EXTENSION = /\.(cmd|exe|js|mjs)$/i;
|
|
71
106
|
var hookBinaryNameOf = (fileName) => fileName.replace(LAUNCHABLE_EXTENSION, "");
|
|
107
|
+
var hookExecutableName = (executable) => hookBinaryNameOf(executableFileName(executable));
|
|
72
108
|
var windowsNodeLaunchOf = (target, launcher) => {
|
|
73
109
|
if (launcher === null) return null;
|
|
74
110
|
if (target.kind !== "binary") return { node: launcher.node, script: target.script };
|
|
@@ -219,6 +255,9 @@ var CODEX_HOOK_EVENTS = [
|
|
|
219
255
|
{ event: "PreCompact", matcher: "manual|auto", delivery: "telemetry", timeout: 5 },
|
|
220
256
|
{ event: "PostCompact", matcher: "manual|auto", delivery: "telemetry", timeout: 5 }
|
|
221
257
|
];
|
|
258
|
+
var CODEX_EARLIER_APPROVAL_MATCHERS = {
|
|
259
|
+
PermissionRequest: ["Bash|apply_patch"]
|
|
260
|
+
};
|
|
222
261
|
var CODEX_REQUIRED_APPROVAL_EVENTS = CODEX_HOOK_EVENTS.filter((event) => event.delivery === "approval").map((event) => event.event);
|
|
223
262
|
var CODEX_EVENT_KEY = {
|
|
224
263
|
PermissionRequest: "permission_request",
|
|
@@ -353,6 +392,7 @@ var removeCodexHooks = (config, scope) => {
|
|
|
353
392
|
if (Object.keys(hooks).length === 0) delete config.hooks;
|
|
354
393
|
return changed;
|
|
355
394
|
};
|
|
395
|
+
var codexHooksFeatureDisabled = (config) => asRecord2(config.features)?.hooks === false;
|
|
356
396
|
var hasCodexHooks = (config) => {
|
|
357
397
|
const hooks = asRecord2(config.hooks);
|
|
358
398
|
if (!hooks) return false;
|
|
@@ -537,11 +577,103 @@ var staleTrustKeys = (state, hooksJsonPath, event, currentKey, ourHash) => {
|
|
|
537
577
|
);
|
|
538
578
|
};
|
|
539
579
|
|
|
580
|
+
// src/diagnostics/bridge.ts
|
|
581
|
+
import { execFileSync } from "child_process";
|
|
582
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
583
|
+
import { homedir as homedir3 } from "os";
|
|
584
|
+
import { dirname, join as join3 } from "path";
|
|
585
|
+
var BRIDGE_BUNDLE_IDENTIFIER = "com.pushary.app";
|
|
586
|
+
var BRIDGE_HELPER_SUFFIX = "/Contents/Helpers/pushary-bridge";
|
|
587
|
+
var BRIDGE_BUNDLE_ROOTS = ["/Applications/Pushary.app", "$HOME/Applications/Pushary.app"];
|
|
588
|
+
var BRIDGE_CACHE_FILE = ".bridge-cache";
|
|
589
|
+
var BRIDGE_STUB_HELPER_LINE = `H=${BRIDGE_HELPER_SUFFIX}`;
|
|
590
|
+
var BRIDGE_STUB_RUNS_THE_HELPER = 'exec "$P$H"';
|
|
591
|
+
var expandHome = (path, home) => path.replaceAll("$HOME", home);
|
|
592
|
+
var parseBridgeStub = (contents, stubPath) => {
|
|
593
|
+
const helperSuffix = contents.match(/^H=(\S+)$/m)?.[1] ?? BRIDGE_HELPER_SUFFIX;
|
|
594
|
+
const cachePath = contents.match(/^C="([^"\n]+)"$/m)?.[1] ?? join3(dirname(stubPath), BRIDGE_CACHE_FILE);
|
|
595
|
+
const rootsLine = contents.match(/^for P in ((?:"[^"\n]*"\s*)+); do$/m)?.[1];
|
|
596
|
+
const bundleRoots = rootsLine ? [...rootsLine.matchAll(/"([^"]*)"/g)].map((match) => match[1]) : BRIDGE_BUNDLE_ROOTS;
|
|
597
|
+
const bundleIdentifier = contents.match(/kMDItemCFBundleIdentifier == "([^"]+)"/)?.[1] ?? BRIDGE_BUNDLE_IDENTIFIER;
|
|
598
|
+
return { helperSuffix, cachePath, bundleRoots, bundleIdentifier };
|
|
599
|
+
};
|
|
600
|
+
var resolveBridgeStub = (stubPath, probe) => {
|
|
601
|
+
const contents = probe.readFile(stubPath);
|
|
602
|
+
if (contents === null) return { kind: "no-stub", stub: stubPath };
|
|
603
|
+
const shape = parseBridgeStub(contents, stubPath);
|
|
604
|
+
const helperIn = (bundle) => `${bundle}${shape.helperSuffix}`;
|
|
605
|
+
const looked = [];
|
|
606
|
+
for (const root of shape.bundleRoots.map((root2) => expandHome(root2, probe.home))) {
|
|
607
|
+
looked.push(root);
|
|
608
|
+
if (probe.exists(helperIn(root))) return { kind: "bundle", helper: helperIn(root), via: "root" };
|
|
609
|
+
}
|
|
610
|
+
const cached = shape.cachePath ? probe.readFile(shape.cachePath)?.split("\n")[0]?.trim() : void 0;
|
|
611
|
+
if (cached) {
|
|
612
|
+
looked.push(cached);
|
|
613
|
+
if (probe.exists(helperIn(cached))) return { kind: "bundle", helper: helperIn(cached), via: "cache" };
|
|
614
|
+
}
|
|
615
|
+
for (const found of probe.mdfind(shape.bundleIdentifier)) {
|
|
616
|
+
looked.push(found);
|
|
617
|
+
if (probe.exists(helperIn(found))) return { kind: "bundle", helper: helperIn(found), via: "spotlight" };
|
|
618
|
+
}
|
|
619
|
+
return { kind: "missing", stub: stubPath, looked };
|
|
620
|
+
};
|
|
621
|
+
var NO_SPOTLIGHT = () => [];
|
|
622
|
+
var bridgeResolvesToApp = (locator, probe) => resolveBridgeStub(locator, { ...probe, mdfind: NO_SPOTLIGHT }).kind === "bundle";
|
|
623
|
+
var installedBridgeBundleRoots = (home) => BRIDGE_BUNDLE_ROOTS.map((root) => expandHome(root, home));
|
|
624
|
+
var isMacAppBridgeStub = (contents) => contents.split("\n").includes(BRIDGE_STUB_HELPER_LINE) && contents.includes(BRIDGE_STUB_RUNS_THE_HELPER);
|
|
625
|
+
var cachedBundleRoot = (location, probe) => {
|
|
626
|
+
const cached = probe.readFile(location.cache)?.split("\n")[0]?.trim();
|
|
627
|
+
return cached ? [cached] : [];
|
|
628
|
+
};
|
|
629
|
+
var macAppBridgeIsInstalled = (location, probe) => {
|
|
630
|
+
const stub = probe.readFile(location.stub);
|
|
631
|
+
if (stub === null || !isMacAppBridgeStub(stub)) return false;
|
|
632
|
+
return [...location.bundleRoots, ...cachedBundleRoot(location, probe)].some((root) => probe.exists(`${root}${BRIDGE_HELPER_SUFFIX}`));
|
|
633
|
+
};
|
|
634
|
+
var BRIDGE_GONE_MESSAGE = "the Mac app is gone but its hooks remain; run pushary setup or reinstall the app";
|
|
635
|
+
var describeBridgeResolution = (resolution) => {
|
|
636
|
+
switch (resolution.kind) {
|
|
637
|
+
case "bundle":
|
|
638
|
+
return `${resolution.helper} (${resolution.via === "root" ? "installed" : resolution.via === "cache" ? "cached path" : "found by Spotlight"})`;
|
|
639
|
+
case "missing":
|
|
640
|
+
return BRIDGE_GONE_MESSAGE;
|
|
641
|
+
case "no-stub":
|
|
642
|
+
return `${resolution.stub} is not there; ${BRIDGE_GONE_MESSAGE}`;
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
var isBridgeLocator = (executable) => executable !== null && executable.split(/[/\\]/).pop() === HOOK_LOCATOR_BINARY;
|
|
646
|
+
var spotlight = (bundleIdentifier) => {
|
|
647
|
+
if (process.platform !== "darwin") return [];
|
|
648
|
+
try {
|
|
649
|
+
return execFileSync("/usr/bin/mdfind", [`kMDItemCFBundleIdentifier == "${bundleIdentifier}"`], {
|
|
650
|
+
encoding: "utf-8",
|
|
651
|
+
timeout: 5e3,
|
|
652
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
653
|
+
}).split("\n").map((line) => line.trim()).filter((line) => line !== "");
|
|
654
|
+
} catch {
|
|
655
|
+
return [];
|
|
656
|
+
}
|
|
657
|
+
};
|
|
658
|
+
var readOrNull = (path) => {
|
|
659
|
+
try {
|
|
660
|
+
return readFileSync2(path, "utf-8");
|
|
661
|
+
} catch {
|
|
662
|
+
return null;
|
|
663
|
+
}
|
|
664
|
+
};
|
|
665
|
+
var liveBridgeProbe = () => ({
|
|
666
|
+
exists: existsSync2,
|
|
667
|
+
readFile: readOrNull,
|
|
668
|
+
mdfind: spotlight,
|
|
669
|
+
home: homedir3()
|
|
670
|
+
});
|
|
671
|
+
|
|
540
672
|
// src/cline-config.ts
|
|
541
|
-
import { join as
|
|
673
|
+
import { join as join5 } from "path";
|
|
542
674
|
|
|
543
675
|
// src/claude-config.ts
|
|
544
|
-
import { join as
|
|
676
|
+
import { join as join4 } from "path";
|
|
545
677
|
|
|
546
678
|
// src/claude-tools.ts
|
|
547
679
|
var POSTTOOLUSE_MIRROR_ONLY_TOOLS = ["TodoWrite", "Task", "WebFetch", "WebSearch"];
|
|
@@ -733,7 +865,7 @@ var addPusharyToolPermissions = (settings) => {
|
|
|
733
865
|
permissions.allow = filtered;
|
|
734
866
|
};
|
|
735
867
|
var addPusharyHooks = (settings, binDir, version = null) => {
|
|
736
|
-
const resolve2 = (name) => guardBinary(binDir ?
|
|
868
|
+
const resolve2 = (name) => guardBinary(binDir ? join4(binDir, name) : name);
|
|
737
869
|
const hooks = ensureRecord2(settings, "hooks");
|
|
738
870
|
const supported = new Map(supportedClaudeEvents(version).map((hook) => [hook.event, hook]));
|
|
739
871
|
for (const known of CLAUDE_HOOK_EVENTS) {
|
|
@@ -783,8 +915,8 @@ var removePusharySettings = (settings, scope) => {
|
|
|
783
915
|
};
|
|
784
916
|
|
|
785
917
|
// src/instruction-file.ts
|
|
786
|
-
import { accessSync, constants, existsSync as
|
|
787
|
-
import { dirname } from "path";
|
|
918
|
+
import { accessSync, constants, existsSync as existsSync3, readFileSync as readFileSync3, statSync, writeFileSync, mkdirSync, rmSync } from "fs";
|
|
919
|
+
import { dirname as dirname2 } from "path";
|
|
788
920
|
var PUSHARY_BEGIN = "<!-- BEGIN PUSHARY (managed by @pushary/agent-hooks; do not edit this block) -->";
|
|
789
921
|
var PUSHARY_END = "<!-- END PUSHARY -->";
|
|
790
922
|
var instructionBody = (label) => `## Pushary notifications and approvals
|
|
@@ -830,11 +962,11 @@ var withInstructionBlockReplaced = (existing, body) => {
|
|
|
830
962
|
return range ? existing.slice(0, range.start) + wrap(body) + existing.slice(range.end) : null;
|
|
831
963
|
};
|
|
832
964
|
var writeInstructionBlock = (filePath, body) => {
|
|
833
|
-
const dir =
|
|
834
|
-
if (!
|
|
965
|
+
const dir = dirname2(filePath);
|
|
966
|
+
if (!existsSync3(dir)) mkdirSync(dir, { recursive: true });
|
|
835
967
|
let existing = "";
|
|
836
968
|
try {
|
|
837
|
-
existing =
|
|
969
|
+
existing = readFileSync3(filePath, "utf-8");
|
|
838
970
|
} catch {
|
|
839
971
|
}
|
|
840
972
|
writeFileSync(filePath, withInstructionBlockReplaced(existing, body) ?? withInstructionBlockAppended(existing, body), "utf-8");
|
|
@@ -851,7 +983,7 @@ var CRLF = "\r\n";
|
|
|
851
983
|
var withLineEndingsOf = (sample, block) => sample.includes(CRLF) ? block.replaceAll("\n", CRLF) : block;
|
|
852
984
|
var readUtf8 = (filePath) => {
|
|
853
985
|
try {
|
|
854
|
-
const bytes =
|
|
986
|
+
const bytes = readFileSync3(filePath);
|
|
855
987
|
const text = bytes.toString("utf-8");
|
|
856
988
|
return Buffer.from(text, "utf-8").equals(bytes) ? { kind: "text", text } : { kind: "not_utf8" };
|
|
857
989
|
} catch {
|
|
@@ -867,7 +999,7 @@ var isWritable = (filePath) => {
|
|
|
867
999
|
}
|
|
868
1000
|
};
|
|
869
1001
|
var refreshInstructionBlock = (filePath, body) => {
|
|
870
|
-
if (!
|
|
1002
|
+
if (!existsSync3(filePath)) return "absent";
|
|
871
1003
|
const read = readUtf8(filePath);
|
|
872
1004
|
if (read.kind !== "text") return read.kind;
|
|
873
1005
|
const block = soleManagedBlock(read.text);
|
|
@@ -888,7 +1020,7 @@ var refreshInstructionBlock = (filePath, body) => {
|
|
|
888
1020
|
var removeInstructionBlock = (filePath) => {
|
|
889
1021
|
let existing = "";
|
|
890
1022
|
try {
|
|
891
|
-
existing =
|
|
1023
|
+
existing = readFileSync3(filePath, "utf-8");
|
|
892
1024
|
} catch {
|
|
893
1025
|
return false;
|
|
894
1026
|
}
|
|
@@ -905,7 +1037,7 @@ var removeInstructionBlock = (filePath) => {
|
|
|
905
1037
|
};
|
|
906
1038
|
var hasInstructionBlock = (filePath) => {
|
|
907
1039
|
try {
|
|
908
|
-
return
|
|
1040
|
+
return readFileSync3(filePath, "utf-8").includes(PUSHARY_BEGIN);
|
|
909
1041
|
} catch {
|
|
910
1042
|
return false;
|
|
911
1043
|
}
|
|
@@ -965,10 +1097,10 @@ var environmentValue = (environment, name) => {
|
|
|
965
1097
|
const value = environment[name]?.trim();
|
|
966
1098
|
return value ? value : void 0;
|
|
967
1099
|
};
|
|
968
|
-
var clineDirectory = (location) => environmentValue(location.environment, CLINE_DIR_ENV) ??
|
|
969
|
-
var clineDataDirectory = (location) => environmentValue(location.environment, CLINE_DATA_DIR_ENV) ??
|
|
970
|
-
var clineMcpSettingsPath = (location) => environmentValue(location.environment, CLINE_MCP_SETTINGS_PATH_ENV) ??
|
|
971
|
-
var clineRulesFile = (location) =>
|
|
1100
|
+
var clineDirectory = (location) => environmentValue(location.environment, CLINE_DIR_ENV) ?? join5(location.home, CLINE_DIRECTORY_NAME);
|
|
1101
|
+
var clineDataDirectory = (location) => environmentValue(location.environment, CLINE_DATA_DIR_ENV) ?? join5(clineDirectory(location), CLINE_DATA_DIRECTORY_NAME);
|
|
1102
|
+
var clineMcpSettingsPath = (location) => environmentValue(location.environment, CLINE_MCP_SETTINGS_PATH_ENV) ?? join5(clineDataDirectory(location), CLINE_SETTINGS_DIRECTORY_NAME, CLINE_SETTINGS_FILE_NAME);
|
|
1103
|
+
var clineRulesFile = (location) => join5(clineDirectory(location), CLINE_RULES_DIRECTORY_NAME, CLINE_RULES_FILE_NAME);
|
|
972
1104
|
var parsedJson = (text) => {
|
|
973
1105
|
try {
|
|
974
1106
|
return { ok: true, value: JSON.parse(text) };
|
|
@@ -1072,53 +1204,59 @@ var clineInstructionsBody = () => `${renderAgentInstructions(CLINE_LABEL)}
|
|
|
1072
1204
|
${CLINE_TOOL_NOTE}`;
|
|
1073
1205
|
|
|
1074
1206
|
// src/setup/paths.ts
|
|
1075
|
-
var claudeSettings = (environment = process.env) =>
|
|
1076
|
-
var claudeJson = (environment = process.env) => claudeUserConfigFile(
|
|
1077
|
-
var claudeSkillDir = (environment = process.env) =>
|
|
1078
|
-
var cursorPluginDir = () =>
|
|
1079
|
-
var cursorUserHooks = () =>
|
|
1080
|
-
var cursorPluginMcp = () =>
|
|
1081
|
-
var cursorPluginManifest = () =>
|
|
1082
|
-
var cursorPluginRule = () =>
|
|
1083
|
-
var cursorUserMcp = () =>
|
|
1084
|
-
var vscodePluginDir = () =>
|
|
1085
|
-
var vscodePluginMcp = () =>
|
|
1086
|
-
var claudeSettingsLocal = () =>
|
|
1087
|
-
var pusharyDir = () =>
|
|
1088
|
-
var
|
|
1089
|
-
var
|
|
1090
|
-
var
|
|
1091
|
-
var
|
|
1092
|
-
var
|
|
1093
|
-
var
|
|
1094
|
-
var
|
|
1095
|
-
var
|
|
1096
|
-
var
|
|
1097
|
-
var
|
|
1098
|
-
var
|
|
1099
|
-
var
|
|
1100
|
-
var
|
|
1101
|
-
var
|
|
1102
|
-
var
|
|
1103
|
-
var
|
|
1104
|
-
var
|
|
1105
|
-
var
|
|
1106
|
-
var
|
|
1107
|
-
var
|
|
1108
|
-
var
|
|
1109
|
-
var
|
|
1110
|
-
var
|
|
1111
|
-
var
|
|
1112
|
-
var
|
|
1207
|
+
var claudeSettings = (environment = process.env) => join6(claudeConfigDir(homedir4(), environment), "settings.json");
|
|
1208
|
+
var claudeJson = (environment = process.env) => claudeUserConfigFile(homedir4(), environment);
|
|
1209
|
+
var claudeSkillDir = (environment = process.env) => join6(claudeConfigDir(homedir4(), environment), "skills", "pushary");
|
|
1210
|
+
var cursorPluginDir = () => join6(homedir4(), ".cursor", "plugins", "local", "pushary");
|
|
1211
|
+
var cursorUserHooks = () => join6(homedir4(), ".cursor", "hooks.json");
|
|
1212
|
+
var cursorPluginMcp = () => join6(cursorPluginDir(), "mcp.json");
|
|
1213
|
+
var cursorPluginManifest = () => join6(cursorPluginDir(), ".cursor-plugin", "plugin.json");
|
|
1214
|
+
var cursorPluginRule = () => join6(cursorPluginDir(), "rules", "pushary.mdc");
|
|
1215
|
+
var cursorUserMcp = () => join6(homedir4(), ".cursor", "mcp.json");
|
|
1216
|
+
var vscodePluginDir = () => join6(homedir4(), ".pushary", "plugins", "vscode");
|
|
1217
|
+
var vscodePluginMcp = () => join6(vscodePluginDir(), ".mcp.json");
|
|
1218
|
+
var claudeSettingsLocal = () => join6(claudeConfigDir(), "settings.local.json");
|
|
1219
|
+
var pusharyDir = () => join6(homedir4(), ".pushary");
|
|
1220
|
+
var bridgeStub = () => join6(pusharyDir(), "bin", HOOK_LOCATOR_BINARY);
|
|
1221
|
+
var bridgeCache = () => join6(pusharyDir(), "bin", BRIDGE_CACHE_FILE);
|
|
1222
|
+
var claudeSetupDir = () => process.env.CLAUDE_CONFIG_DIR ? join6(pusharyDir(), "setup", "claude-profiles", createHash2("sha256").update(claudeUserConfigFile()).digest("hex").slice(0, 32)) : join6(pusharyDir(), "setup");
|
|
1223
|
+
var claudeMcpReceipt = () => join6(claudeSetupDir(), "claude-mcp.json");
|
|
1224
|
+
var bridgeAgentKey = () => join6(pusharyDir(), "bridge-auth", "agent-key.json");
|
|
1225
|
+
var autoUpdateState = () => join6(pusharyDir(), "auto-update.json");
|
|
1226
|
+
var autoUpdateLock = () => join6(pusharyDir(), "auto-update.lock");
|
|
1227
|
+
var serviceOwedBackMark = () => join6(pusharyDir(), "service-owed-back");
|
|
1228
|
+
var autoUpdateLog = () => join6(pusharyDir(), "logs", "auto-update.log");
|
|
1229
|
+
var clientReportClaims = () => join6(pusharyDir(), "client-reports");
|
|
1230
|
+
var claudeRegistrationReceipt = () => join6(claudeSetupDir(), "claude-registration.json");
|
|
1231
|
+
var hermesConfig = () => join6(homedir4(), ".hermes", "config.yaml");
|
|
1232
|
+
var hermesConfigReceipt = () => join6(pusharyDir(), "setup", "hermes-config.json");
|
|
1233
|
+
var hermesSetupReceipt = () => join6(pusharyDir(), "setup", "hermes-plugin.json");
|
|
1234
|
+
var hermesAppWiringRecord = () => join6(pusharyDir(), "setup", "hermes-wired-by-mac-app");
|
|
1235
|
+
var fxQuestionRuleReceipt = () => join6(pusharyDir(), "setup", "fx-question-rule.json");
|
|
1236
|
+
var hookTakeoverReceipt = (agent) => join6(agent === "claude_code" ? claudeSetupDir() : join6(pusharyDir(), "setup"), `hook-takeover-${agent}.json`);
|
|
1237
|
+
var codexSkillDir2 = () => join6(codexHome(), "skills", "pushary");
|
|
1238
|
+
var codexAgentsMd2 = () => join6(codexHome(), "AGENTS.md");
|
|
1239
|
+
var geminiSettings = () => join6(homedir4(), ".gemini", "settings.json");
|
|
1240
|
+
var geminiMd = () => join6(homedir4(), ".gemini", "GEMINI.md");
|
|
1241
|
+
var pusharyConfigFile = () => join6(homedir4(), ".pushary", "config.json");
|
|
1242
|
+
var fxConfigDir = () => join6(homedir4(), ".fx");
|
|
1243
|
+
var fxMcpProfile = () => join6(fxConfigDir(), "mcp.json");
|
|
1244
|
+
var fxSettings = () => join6(fxConfigDir(), "settings.json");
|
|
1245
|
+
var fxAgentsMd = () => join6(fxConfigDir(), "AGENTS.md");
|
|
1246
|
+
var clineLocation = () => ({ home: homedir4(), environment: process.env });
|
|
1113
1247
|
var clineMcpSettings = () => clineMcpSettingsPath(clineLocation());
|
|
1114
1248
|
var clineRules = () => clineRulesFile(clineLocation());
|
|
1115
1249
|
|
|
1116
1250
|
export {
|
|
1117
1251
|
claudeConfigDir,
|
|
1118
1252
|
claudeUserConfigFile,
|
|
1119
|
-
HOOK_SHELL,
|
|
1120
1253
|
holdBudgetOf,
|
|
1254
|
+
hookCommandTokens,
|
|
1255
|
+
executableFileName,
|
|
1256
|
+
parseHookArgv,
|
|
1257
|
+
parseHookCommand,
|
|
1121
1258
|
hookBinaryNameOf,
|
|
1259
|
+
hookExecutableName,
|
|
1122
1260
|
guardBinary,
|
|
1123
1261
|
guardBinaryRefusing,
|
|
1124
1262
|
guardNodeScript,
|
|
@@ -1141,6 +1279,7 @@ export {
|
|
|
1141
1279
|
codexAgentsMd,
|
|
1142
1280
|
codexSkillDir,
|
|
1143
1281
|
CODEX_HOOK_EVENTS,
|
|
1282
|
+
CODEX_EARLIER_APPROVAL_MATCHERS,
|
|
1144
1283
|
CODEX_REQUIRED_APPROVAL_EVENTS,
|
|
1145
1284
|
codexMcpMixesCommandWithHttp,
|
|
1146
1285
|
CODEX_RESTART_AFTER_TRANSPORT_CHANGE,
|
|
@@ -1151,6 +1290,7 @@ export {
|
|
|
1151
1290
|
codexRegistrationHolder,
|
|
1152
1291
|
addCodexHooks,
|
|
1153
1292
|
removeCodexHooks,
|
|
1293
|
+
codexHooksFeatureDisabled,
|
|
1154
1294
|
hasCodexHooks,
|
|
1155
1295
|
missingCodexHookEvents,
|
|
1156
1296
|
codexHookPositions,
|
|
@@ -1162,6 +1302,14 @@ export {
|
|
|
1162
1302
|
removeCodexHookTrust,
|
|
1163
1303
|
removeCodexSettings,
|
|
1164
1304
|
addCodexHookTrust,
|
|
1305
|
+
resolveBridgeStub,
|
|
1306
|
+
NO_SPOTLIGHT,
|
|
1307
|
+
bridgeResolvesToApp,
|
|
1308
|
+
installedBridgeBundleRoots,
|
|
1309
|
+
macAppBridgeIsInstalled,
|
|
1310
|
+
describeBridgeResolution,
|
|
1311
|
+
isBridgeLocator,
|
|
1312
|
+
liveBridgeProbe,
|
|
1165
1313
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS,
|
|
1166
1314
|
IDLE_PROMPT_NOTIFICATION,
|
|
1167
1315
|
NOTIFICATION_PUSH_TYPES,
|
|
@@ -1228,6 +1376,8 @@ export {
|
|
|
1228
1376
|
vscodePluginMcp,
|
|
1229
1377
|
claudeSettingsLocal,
|
|
1230
1378
|
pusharyDir,
|
|
1379
|
+
bridgeStub,
|
|
1380
|
+
bridgeCache,
|
|
1231
1381
|
claudeMcpReceipt,
|
|
1232
1382
|
bridgeAgentKey,
|
|
1233
1383
|
autoUpdateState,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CLAUDE_CODE_AGENT
|
|
3
|
+
} from "./chunk-KHZCJP7P.js";
|
|
1
4
|
import {
|
|
2
5
|
addGeminiMcpServer,
|
|
3
6
|
removeGeminiMcpServer
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
CLAUDE_CODE_AGENT
|
|
7
|
-
} from "./chunk-Z2TX7DVU.js";
|
|
7
|
+
} from "./chunk-MFJHLVIZ.js";
|
|
8
8
|
import {
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-76JOLPST.js";
|
|
11
11
|
import {
|
|
12
12
|
CLAUDE_HOOK_EVENTS,
|
|
13
13
|
PUSHARY_MCP_URL,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
isPusharyHook,
|
|
20
20
|
registerHookEntry,
|
|
21
21
|
removeClaudeMcpServers
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JCSJEMTA.js";
|
|
23
23
|
import {
|
|
24
24
|
HOOK_COMPATIBLE_PROFILES,
|
|
25
25
|
PHONE_ANSWERED_TOOLS,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
pusharyMissingReason,
|
|
31
31
|
refusalOutput,
|
|
32
32
|
withHookHoldBudget
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-O5TB2LMQ.js";
|
|
34
34
|
|
|
35
35
|
// src/config-document.ts
|
|
36
36
|
import { parse, stringify } from "smol-toml";
|
|
@@ -308,6 +308,7 @@ var removeCompatibleMcpServer = (config, profile) => {
|
|
|
308
308
|
};
|
|
309
309
|
|
|
310
310
|
export {
|
|
311
|
+
parseConfigDocument,
|
|
311
312
|
readConfigDocument,
|
|
312
313
|
serializeConfigDocument,
|
|
313
314
|
hasCompatibleMcpServer,
|