@pushary/agent-hooks 1.1.0 → 1.3.0
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 +24 -0
- package/data/SKILL.md +20 -8
- package/data/cursor-plugin/skills/pushary/SKILL.md +19 -7
- package/data/vscode-plugin/skills/pushary/SKILL.md +19 -7
- package/dist/bin/pushary-bell-hook.js +18 -18
- package/dist/bin/pushary-bell.js +6 -6
- package/dist/bin/pushary-claude.js +18 -18
- package/dist/bin/pushary-clean.js +19 -19
- package/dist/bin/pushary-codex-bridge.js +10 -10
- package/dist/bin/pushary-codex-hook.js +22 -22
- package/dist/bin/pushary-codex.js +6 -6
- package/dist/bin/pushary-connect.js +6 -6
- package/dist/bin/pushary-cowork.js +3 -3
- package/dist/bin/pushary-daemon.js +22 -22
- package/dist/bin/pushary-disconnect.js +10 -10
- package/dist/bin/pushary-doctor.js +23 -23
- package/dist/bin/pushary-elicitation-hook.js +17 -17
- package/dist/bin/pushary-gemini-bridge.js +9 -9
- package/dist/bin/pushary-gemini-hook.js +19 -19
- package/dist/bin/pushary-hook.js +26 -26
- package/dist/bin/pushary-login.js +7 -7
- package/dist/bin/pushary-logout.js +4 -4
- package/dist/bin/pushary-mode.js +3 -3
- package/dist/bin/pushary-notification-hook.js +20 -20
- package/dist/bin/pushary-opencode-hook.js +19 -19
- package/dist/bin/pushary-permission-denied-hook.js +24 -24
- package/dist/bin/pushary-permission-hook.js +25 -25
- package/dist/bin/pushary-post-hook.js +20 -20
- package/dist/bin/pushary-prompt-hook.js +20 -20
- package/dist/bin/pushary-session-end-hook.js +20 -20
- package/dist/bin/pushary-session-start-hook.js +22 -22
- package/dist/bin/pushary-setup.js +26 -26
- package/dist/bin/pushary-stats.js +2 -2
- package/dist/bin/pushary-status.js +10 -10
- package/dist/bin/pushary-stop-hook.js +20 -20
- package/dist/bin/pushary-stopfailure-hook.js +20 -20
- package/dist/bin/pushary-transcript-register.js +16 -16
- package/dist/bin/pushary-transcripts.js +4 -4
- package/dist/bin/pushary-upgrade.js +14 -14
- package/dist/bin/pushary-wait.js +3 -3
- package/dist/{chunk-SA6UB3GD.js → chunk-2PLEJ7SY.js} +1 -1
- package/dist/{chunk-RZTH4MIY.js → chunk-3AIFWTVB.js} +2 -2
- package/dist/{chunk-MZUXTN7X.js → chunk-4V24U44H.js} +2 -2
- package/dist/{chunk-2MOQUNFL.js → chunk-A2URMNFM.js} +1 -1
- package/dist/{chunk-IH7YUPFN.js → chunk-A5ZWYQFV.js} +3 -3
- package/dist/{chunk-BBUZD7MU.js → chunk-B3S4SF3D.js} +1 -1
- package/dist/{chunk-76ZCJZBK.js → chunk-BL4SQNO6.js} +1 -1
- package/dist/{chunk-SM54HHVY.js → chunk-BNDHXPTQ.js} +21 -14
- package/dist/{chunk-OYYQHJAO.js → chunk-BYGEZI7B.js} +1 -1
- package/dist/{chunk-LUYYB6V2.js → chunk-DON24PNT.js} +1 -1
- package/dist/{chunk-AH5OO2YZ.js → chunk-DVO4SZMJ.js} +3 -3
- package/dist/{chunk-S2BNTXP6.js → chunk-E7WBNGJS.js} +1 -1
- package/dist/{chunk-XIHKSZHL.js → chunk-EJZCV5G4.js} +1 -1
- package/dist/{chunk-FO4HHPMO.js → chunk-EKQAKSGI.js} +1 -1
- package/dist/{chunk-PWIMJP4U.js → chunk-EU6JH7KU.js} +6 -6
- package/dist/{chunk-PQG6NTPT.js → chunk-EYMMU5HC.js} +1 -1
- package/dist/{chunk-PUDQJ772.js → chunk-FGVNU7XD.js} +1 -1
- package/dist/{chunk-INBTKFT6.js → chunk-IAEVVUXO.js} +1 -1
- package/dist/{chunk-SLEWDZOA.js → chunk-JYEGOYQC.js} +1 -1
- package/dist/{chunk-MR2PWE62.js → chunk-K4TAUYUJ.js} +7 -8
- package/dist/{chunk-J7PJALS2.js → chunk-K7UIAE7I.js} +1 -1
- package/dist/{chunk-QACXZYDA.js → chunk-KPNGPRYU.js} +4 -4
- package/dist/{chunk-6JUCFMSF.js → chunk-KS4P6F3R.js} +3 -3
- package/dist/{chunk-ISELLVBP.js → chunk-MU275U5A.js} +1 -1
- package/dist/{chunk-LQ3BHPPZ.js → chunk-N43EQPJK.js} +5 -1
- package/dist/{chunk-YM4G6CFN.js → chunk-OE6U2AXM.js} +3 -3
- package/dist/{chunk-E3WQMDCE.js → chunk-POAFXBNH.js} +1 -1
- package/dist/{chunk-EWQZISYV.js → chunk-RHLUJE4H.js} +1 -1
- package/dist/{chunk-PHJOSAXW.js → chunk-RVDHN2TJ.js} +2 -2
- package/dist/{chunk-EZ3GX3NS.js → chunk-UVXNYYHG.js} +5 -5
- package/dist/{chunk-VQYARC2K.js → chunk-WPJS3OZH.js} +109 -21
- package/dist/{chunk-WTT24AUA.js → chunk-WXXDHGTZ.js} +29 -5
- package/dist/{chunk-DKTFZCLQ.js → chunk-X3KIGNIP.js} +6 -6
- package/dist/{chunk-IPDBFJ2M.js → chunk-XBJW4MV5.js} +1 -1
- package/dist/{chunk-UP7NZXJU.js → chunk-XBO42HKH.js} +1 -1
- package/dist/{chunk-DZYIAMKR.js → chunk-XEXOHUJ6.js} +4 -4
- package/dist/{chunk-VACFOGF3.js → chunk-YF4JDCU4.js} +1 -1
- package/dist/{chunk-6T4OINZB.js → chunk-ZHL62DRA.js} +3 -3
- package/dist/{reapply-STSGYPF2.js → reapply-FUCAKR6Z.js} +8 -8
- package/dist/src/index.js +12 -12
- package/package.json +1 -1
package/dist/bin/pushary-wait.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
} from "../chunk-CVWG2N3Y.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnFailedResponse
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-BL4SQNO6.js";
|
|
8
|
+
import "../chunk-DON24PNT.js";
|
|
9
9
|
import {
|
|
10
10
|
createIo
|
|
11
11
|
} from "../chunk-5RUIFDTP.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
getApiKey,
|
|
29
29
|
getBaseUrl
|
|
30
30
|
} from "../chunk-2UMNXADU.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-WPJS3OZH.js";
|
|
32
32
|
|
|
33
33
|
// bin/pushary-wait.ts
|
|
34
34
|
exitOnHelpFlag("wait");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BYGEZI7B.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
6
|
} from "./chunk-GMXKITVA.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
CLAUDE_CONNECTOR_URL,
|
|
15
15
|
COWORK_CONNECTOR_LIMIT,
|
|
16
16
|
COWORK_STANDING_INSTRUCTIONS
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WPJS3OZH.js";
|
|
18
18
|
|
|
19
19
|
// src/cli/cowork.ts
|
|
20
20
|
import { readFileSync } from "fs";
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
resolveBinary,
|
|
3
3
|
resolveGlobalPackageVersion,
|
|
4
4
|
resolvePackageVersionFromBinary
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RHLUJE4H.js";
|
|
6
6
|
import {
|
|
7
7
|
MANAGED_PROVIDERS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WPJS3OZH.js";
|
|
9
9
|
|
|
10
10
|
// src/live-capabilities.ts
|
|
11
11
|
var CLAUDE_BRIDGE_CAPABILITY = "claude-bridge";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
canonicalGateInputs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WXXDHGTZ.js";
|
|
4
4
|
import {
|
|
5
5
|
canonicalJson
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RHLUJE4H.js";
|
|
7
7
|
import {
|
|
8
8
|
writeFileAtomic
|
|
9
9
|
} from "./chunk-4LL6LG5X.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
BLOCKED_ACTION_GRANT_TTL_SECONDS,
|
|
12
12
|
blockedActionIdentity,
|
|
13
13
|
shouldDeferToNativeMode
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WPJS3OZH.js";
|
|
15
15
|
|
|
16
16
|
// src/native-defer.ts
|
|
17
17
|
var nativeDeferOptions = () => {
|
|
@@ -3,27 +3,27 @@ import {
|
|
|
3
3
|
addPusharyToolPermissions,
|
|
4
4
|
isPusharyHook,
|
|
5
5
|
removeClaudeMcpServers
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZHL62DRA.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_HOOK_EVENTS,
|
|
9
9
|
addGeminiMcpServer,
|
|
10
10
|
removeGeminiMcpServer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OE6U2AXM.js";
|
|
12
12
|
import {
|
|
13
13
|
CLAUDE_CODE_AGENT,
|
|
14
14
|
parseApplyPatchFiles
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WXXDHGTZ.js";
|
|
16
16
|
import {
|
|
17
17
|
guardBinary,
|
|
18
18
|
holdBudgetOf,
|
|
19
19
|
registerHookEntry
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RHLUJE4H.js";
|
|
21
21
|
import {
|
|
22
22
|
PHONE_ANSWERED_TOOLS,
|
|
23
23
|
hookCompatibleProfile,
|
|
24
24
|
toToolLookup,
|
|
25
25
|
withHookHoldBudget
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-WPJS3OZH.js";
|
|
27
27
|
|
|
28
28
|
// src/compatible-config.ts
|
|
29
29
|
import { homedir } from "os";
|
|
@@ -31,33 +31,40 @@ import { isAbsolute, join, resolve } from "path";
|
|
|
31
31
|
var AGENT_FLAG = "--agent";
|
|
32
32
|
var agentArgument = (profile) => `${AGENT_FLAG}=${profile.agentType}`;
|
|
33
33
|
var profileFromArgv = (argv) => {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
return named ? hookCompatibleProfile(named.slice(prefix.length)) : void 0;
|
|
34
|
+
const named = namedAgent(argv);
|
|
35
|
+
return named ? hookCompatibleProfile(named) : void 0;
|
|
37
36
|
};
|
|
38
37
|
var activeIdentity = (argv) => {
|
|
39
38
|
const profile = profileFromArgv(argv);
|
|
40
39
|
return profile ? { type: profile.agentType, label: profile.label } : CLAUDE_CODE_AGENT;
|
|
41
40
|
};
|
|
42
|
-
var
|
|
41
|
+
var namedAgent = (argv) => {
|
|
42
|
+
const prefix = `${AGENT_FLAG}=`;
|
|
43
|
+
return argv.find((argument) => argument.startsWith(prefix))?.slice(prefix.length);
|
|
44
|
+
};
|
|
45
|
+
var activeHookSource = (argv) => {
|
|
46
|
+
const named = namedAgent(argv);
|
|
47
|
+
if (named === void 0) return "claude";
|
|
48
|
+
return hookCompatibleProfile(named)?.source ?? null;
|
|
49
|
+
};
|
|
43
50
|
var PATCH_INPUT_KEYS = ["command", "patch", "input"];
|
|
44
51
|
var patchedFiles = (toolInput) => [...new Set(PATCH_INPUT_KEYS.flatMap((key) => parseApplyPatchFiles(toolInput[key])))];
|
|
45
52
|
var lookupFor = (profile, input) => {
|
|
46
53
|
const absolute = (path) => input.cwd && !isAbsolute(path) ? resolve(input.cwd, path) : path;
|
|
47
54
|
const toolInput = input.tool_input ?? {};
|
|
48
55
|
const lookup = toToolLookup(profile, input.tool_name ?? "", toolInput, absolute);
|
|
49
|
-
if (!lookup.
|
|
56
|
+
if (!lookup.unreadable) return lookup;
|
|
50
57
|
const files = patchedFiles(toolInput);
|
|
51
|
-
return files.length === 1 ? { ...lookup, input: { ...lookup.input, file_path: absolute(files[0]) },
|
|
58
|
+
return files.length === 1 ? { ...lookup, input: { ...lookup.input, file_path: absolute(files[0]) }, unreadable: false } : lookup;
|
|
52
59
|
};
|
|
53
60
|
var normalizeToolCall = (profile, input) => {
|
|
54
61
|
if (!profile || !input.tool_name) return input;
|
|
55
62
|
const lookup = lookupFor(profile, input);
|
|
56
63
|
return { ...input, tool_name: lookup.tool, tool_input: lookup.input };
|
|
57
64
|
};
|
|
58
|
-
var
|
|
65
|
+
var unreadableTool = (profile, input) => {
|
|
59
66
|
if (!profile || !input.tool_name) return void 0;
|
|
60
|
-
return lookupFor(profile, input).
|
|
67
|
+
return lookupFor(profile, input).unreadable ? input.tool_name : void 0;
|
|
61
68
|
};
|
|
62
69
|
var underHome = (segments, home = homedir()) => join(home, ...segments);
|
|
63
70
|
var compatibleConfigFile = (profile, home) => underHome(profile.configFile, home);
|
|
@@ -208,7 +215,7 @@ export {
|
|
|
208
215
|
activeIdentity,
|
|
209
216
|
activeHookSource,
|
|
210
217
|
normalizeToolCall,
|
|
211
|
-
|
|
218
|
+
unreadableTool,
|
|
212
219
|
compatibleConfigFile,
|
|
213
220
|
compatibleMcpFile,
|
|
214
221
|
compatibleInstructionsFile,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
COMPATIBLE_AGENT_TYPES,
|
|
9
9
|
isValidApiKey
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WPJS3OZH.js";
|
|
11
11
|
|
|
12
12
|
// src/setup/options.ts
|
|
13
13
|
var AGENT_CHOICES = ["claude_code", "codex", "gemini_cli", "hermes", "cursor", "vscode", "opencode", ...COMPATIBLE_AGENT_TYPES, "custom"];
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WPJS3OZH.js";
|
|
17
17
|
|
|
18
18
|
// src/session.ts
|
|
19
19
|
var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
|
|
@@ -2,17 +2,17 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OE6U2AXM.js";
|
|
6
6
|
import {
|
|
7
7
|
CODEX_HOOK_EVENTS,
|
|
8
8
|
hasCodexHooks,
|
|
9
9
|
holdBudgetOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RHLUJE4H.js";
|
|
11
11
|
import {
|
|
12
12
|
CURSOR_GATE_EVENTS,
|
|
13
13
|
HOOK_LOCATOR_BINARY,
|
|
14
14
|
hookCommandHoldBudget
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WPJS3OZH.js";
|
|
16
16
|
|
|
17
17
|
// src/diagnostics/wiring.ts
|
|
18
18
|
var record = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
} from "./chunk-YKLCWWEI.js";
|
|
7
7
|
import {
|
|
8
8
|
hookOwnerOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XEXOHUJ6.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureDaemonRunning
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KS4P6F3R.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
decodePublicKey,
|
|
16
16
|
generateSessionKey,
|
|
17
17
|
wrapSessionKey
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-B3S4SF3D.js";
|
|
19
19
|
import {
|
|
20
20
|
fetchTranscriptRecipients,
|
|
21
21
|
uploadTranscriptRecords
|
|
@@ -23,14 +23,14 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
transcriptEnvironmentPreference,
|
|
25
25
|
transcriptsEnabled
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-A2URMNFM.js";
|
|
27
27
|
import {
|
|
28
28
|
codexHome,
|
|
29
29
|
pusharyDir
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-RHLUJE4H.js";
|
|
31
31
|
import {
|
|
32
32
|
readTranscriptPreference
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-XBO42HKH.js";
|
|
34
34
|
import {
|
|
35
35
|
writeJsonAtomic
|
|
36
36
|
} from "./chunk-4LL6LG5X.js";
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E7WBNGJS.js";
|
|
4
4
|
import {
|
|
5
5
|
codexHomeFrom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RHLUJE4H.js";
|
|
7
7
|
import {
|
|
8
|
-
HOOK_COMPATIBLE_PROFILES
|
|
9
|
-
|
|
10
|
-
} from "./chunk-VQYARC2K.js";
|
|
8
|
+
HOOK_COMPATIBLE_PROFILES
|
|
9
|
+
} from "./chunk-WPJS3OZH.js";
|
|
11
10
|
|
|
12
11
|
// src/vscode-config.ts
|
|
13
12
|
import { homedir } from "os";
|
|
@@ -238,17 +237,17 @@ var agentProbes = (home = homedir2()) => ({
|
|
|
238
237
|
// never used.
|
|
239
238
|
configMarkers: [openCodeConfigDirFrom(home)]
|
|
240
239
|
},
|
|
241
|
-
...compatibleProbes(
|
|
240
|
+
...compatibleProbes(),
|
|
242
241
|
// "Other" is a set of printed instructions for any MCP or HTTP client. There is
|
|
243
242
|
// nothing to detect, and it must never be auto-selected.
|
|
244
243
|
custom: { binary: null, paths: [], configMarkers: [] }
|
|
245
244
|
});
|
|
246
|
-
var compatibleProbes = (
|
|
245
|
+
var compatibleProbes = () => HOOK_COMPATIBLE_PROFILES.reduce((probes, profile) => ({
|
|
247
246
|
...probes,
|
|
248
247
|
[profile.agentType]: {
|
|
249
248
|
binary: profile.binary,
|
|
250
249
|
paths: [],
|
|
251
|
-
configMarkers: [
|
|
250
|
+
configMarkers: []
|
|
252
251
|
}
|
|
253
252
|
}), {});
|
|
254
253
|
var detectAllAgents = (deps = defaultDeps, home) => {
|
|
@@ -2,24 +2,24 @@ import {
|
|
|
2
2
|
detectProviderLiveCapabilities,
|
|
3
3
|
hasSpawnProvider,
|
|
4
4
|
resolveControlPolicy
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4V24U44H.js";
|
|
6
6
|
import {
|
|
7
7
|
daemonHasRemoteProof,
|
|
8
8
|
daemonServiceManagerAvailable,
|
|
9
9
|
hasDaemonServiceDefinition,
|
|
10
10
|
readDaemonNeedsLogin,
|
|
11
11
|
readDaemonStatus
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KS4P6F3R.js";
|
|
13
13
|
import {
|
|
14
14
|
getMachineId
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-K7UIAE7I.js";
|
|
16
16
|
import {
|
|
17
17
|
getPackageVersion
|
|
18
18
|
} from "./chunk-DINDL2CF.js";
|
|
19
19
|
import {
|
|
20
20
|
readControlMode,
|
|
21
21
|
readKeySource
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XBO42HKH.js";
|
|
23
23
|
import {
|
|
24
24
|
getBaseUrl
|
|
25
25
|
} from "./chunk-2UMNXADU.js";
|
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
getMachineId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-K7UIAE7I.js";
|
|
8
8
|
import {
|
|
9
9
|
pusharyDir,
|
|
10
10
|
resolveGlobalBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RHLUJE4H.js";
|
|
12
12
|
import {
|
|
13
13
|
getPackageVersion
|
|
14
14
|
} from "./chunk-DINDL2CF.js";
|
|
15
15
|
import {
|
|
16
16
|
readControlMode
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XBO42HKH.js";
|
|
18
18
|
import {
|
|
19
19
|
readJsonSafe,
|
|
20
20
|
writeFileAtomic,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EU6JH7KU.js";
|
|
4
4
|
|
|
5
5
|
// src/admission.ts
|
|
6
6
|
import { readFileSync } from "fs";
|
|
@@ -39,6 +39,10 @@ var matches = (rule, source, event) => {
|
|
|
39
39
|
};
|
|
40
40
|
var isAdmitted = (rules, source, event) => !rules.disabled.some((rule) => matches(rule, source, event));
|
|
41
41
|
var readHookInput = async (source, fallbackEvent = "", stdin = process.stdin) => {
|
|
42
|
+
if (source === null) {
|
|
43
|
+
process.stderr.write("[pushary] unrecognised --agent, standing aside rather than acting as another agent\n");
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
42
46
|
let raw = "";
|
|
43
47
|
for await (const chunk of stdin) raw += chunk;
|
|
44
48
|
if (!raw.trim()) return null;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NOTIFICATION_MATCHED_TYPES,
|
|
3
3
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IAEVVUXO.js";
|
|
5
5
|
import {
|
|
6
6
|
isProtectedByScope,
|
|
7
7
|
registerHookEntry
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RHLUJE4H.js";
|
|
9
9
|
import {
|
|
10
10
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
11
11
|
HOOK_BUDGETS,
|
|
12
12
|
HOOK_LOCATOR_BINARY
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WPJS3OZH.js";
|
|
14
14
|
|
|
15
15
|
// src/gemini-config.ts
|
|
16
16
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
} from "./chunk-EYRGBYZG.js";
|
|
16
16
|
import {
|
|
17
17
|
reportedInstallSource
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-POAFXBNH.js";
|
|
19
19
|
import {
|
|
20
20
|
isAnswerSource
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-WPJS3OZH.js";
|
|
22
22
|
|
|
23
23
|
// src/reach.ts
|
|
24
24
|
var reachVerdict = (channels) => {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
detectClaudeVersion
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XBJW4MV5.js";
|
|
4
4
|
import {
|
|
5
5
|
addClaudeMcpServer,
|
|
6
6
|
addPusharyHooks,
|
|
7
7
|
addPusharyToolPermissions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZHL62DRA.js";
|
|
9
9
|
import {
|
|
10
10
|
claudeUnprovenHolds,
|
|
11
11
|
claudeWired,
|
|
12
12
|
codexUnprovenHolds,
|
|
13
13
|
codexWired,
|
|
14
14
|
geminiWired
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DVO4SZMJ.js";
|
|
16
16
|
import {
|
|
17
17
|
CLAUDE_HOOK_BINARY,
|
|
18
18
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
needsReregistration,
|
|
25
25
|
registrationSignatures,
|
|
26
26
|
supportedClaudeEvents
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-OE6U2AXM.js";
|
|
28
28
|
import {
|
|
29
29
|
CODEX_HOOK_BINARY,
|
|
30
30
|
addCodexHookTrust,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
registrationHolderOf,
|
|
45
45
|
resolveGlobalBinary,
|
|
46
46
|
vscodePluginMcp
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-RHLUJE4H.js";
|
|
48
48
|
import {
|
|
49
49
|
readJsonSafe,
|
|
50
50
|
writeFileAtomic,
|