@pushary/agent-hooks 1.7.2 → 1.7.3
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 +4 -0
- package/data/cursor-plugin/CHANGELOG.md +1 -0
- package/data/cursor-plugin/scripts/pushary-gate.mjs +3 -3
- package/data/cursor-plugin/scripts/pushary-gate.test.mjs +23 -1
- package/data/vscode-plugin/CHANGELOG.md +1 -0
- package/data/vscode-plugin/scripts/pushary-gate.mjs +3 -3
- package/dist/bin/pushary-bell-hook.js +23 -23
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +28 -28
- package/dist/bin/pushary-clean.js +28 -28
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +31 -31
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +13 -13
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +27 -27
- package/dist/bin/pushary-disconnect.js +18 -18
- package/dist/bin/pushary-doctor.js +31 -31
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +12 -12
- package/dist/bin/pushary-gemini-hook.js +28 -28
- package/dist/bin/pushary-hook.js +32 -32
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +7 -7
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +9 -9
- package/dist/bin/pushary-notification-hook.js +28 -28
- package/dist/bin/pushary-opencode-hook.js +27 -27
- package/dist/bin/pushary-permission-denied-hook.js +32 -32
- package/dist/bin/pushary-permission-hook.js +31 -31
- package/dist/bin/pushary-post-hook.js +28 -28
- package/dist/bin/pushary-prompt-hook.js +28 -28
- package/dist/bin/pushary-session-end-hook.js +28 -28
- package/dist/bin/pushary-session-start-hook.js +32 -32
- package/dist/bin/pushary-setup.js +38 -38
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +15 -15
- package/dist/bin/pushary-stop-hook.js +28 -28
- package/dist/bin/pushary-stopfailure-hook.js +28 -28
- package/dist/bin/pushary-suggestions.js +4 -4
- package/dist/bin/pushary-transcript-register.js +19 -19
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +20 -20
- package/dist/bin/pushary-wait.js +9 -9
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-JMSB6CJT.js → chunk-3EUBQARL.js} +1 -1
- package/dist/{chunk-IZVAVXHQ.js → chunk-5GB22QYL.js} +3 -3
- package/dist/{chunk-6NHXKTQU.js → chunk-5S2VBSJI.js} +2 -2
- package/dist/{chunk-LI3C2IQY.js → chunk-62CVUUNU.js} +2 -2
- package/dist/{chunk-UUTWHVSV.js → chunk-62VT3BPH.js} +9 -9
- package/dist/{chunk-MY3UZO5U.js → chunk-6JQFIHZC.js} +2 -2
- package/dist/{chunk-TVJYGZXB.js → chunk-7OA34PNW.js} +2 -2
- package/dist/{chunk-3RO2UWJQ.js → chunk-7RUJKCR4.js} +2 -2
- package/dist/{chunk-M2JGLFFS.js → chunk-AWVNAYGD.js} +1 -1
- package/dist/{chunk-I7B2DNVU.js → chunk-BGBLLHZ4.js} +1 -1
- package/dist/{chunk-WXIVUIXA.js → chunk-BIH2Y2HP.js} +2 -2
- package/dist/{chunk-VSGKQ3HI.js → chunk-D6OODZCM.js} +2 -2
- package/dist/{chunk-UFNBKYWT.js → chunk-DUQO4C4I.js} +3 -3
- package/dist/{chunk-3NSRL5E7.js → chunk-EADXTSHE.js} +2 -2
- package/dist/{chunk-VQDJ6KB3.js → chunk-EEEJ2JIL.js} +3 -3
- package/dist/{chunk-RLRDPZG4.js → chunk-EUGNVLMG.js} +1 -1
- package/dist/{chunk-KAJT6HPI.js → chunk-G3OMOTJ4.js} +3 -3
- package/dist/{chunk-WWTLAZQA.js → chunk-G4GLCLKK.js} +41 -23
- package/dist/{chunk-AWZNDM3B.js → chunk-G62JL2NT.js} +1 -1
- package/dist/{chunk-OJRB5QKN.js → chunk-G6RRVJOG.js} +6 -6
- package/dist/{chunk-U3MS6D5X.js → chunk-IPSRMLCJ.js} +1 -1
- package/dist/{chunk-F6BMJOSW.js → chunk-IRZG3HEU.js} +1 -1
- package/dist/{chunk-ZUKZJQGR.js → chunk-IWJKSIB4.js} +1 -1
- package/dist/{chunk-SKEW3TQX.js → chunk-KEL5MXRL.js} +1 -1
- package/dist/{chunk-YU4222G2.js → chunk-KJXUIPS4.js} +2 -2
- package/dist/{chunk-PWNQGITG.js → chunk-LHC45YUC.js} +1 -1
- package/dist/{chunk-Q7CDBJXU.js → chunk-LPNJLKBQ.js} +1 -1
- package/dist/{chunk-A6WQF7FQ.js → chunk-MIXWMA73.js} +3 -3
- package/dist/{chunk-NYBZJ44G.js → chunk-MZBRL5H5.js} +1 -1
- package/dist/{chunk-6QZK4O36.js → chunk-N5MZH5A6.js} +4 -4
- package/dist/{chunk-KLXYMPTM.js → chunk-NOI3XTCY.js} +1 -1
- package/dist/{chunk-SKMWPXGV.js → chunk-O3JDWNLU.js} +4 -4
- package/dist/{chunk-ZMWX5SDA.js → chunk-OTNOANMX.js} +8 -8
- package/dist/{chunk-HOIGXMI7.js → chunk-OVC5QXN5.js} +1 -1
- package/dist/{chunk-R7ZETVNR.js → chunk-P2VIBGXA.js} +3 -3
- package/dist/{chunk-OXEF6JHD.js → chunk-PRNFSORD.js} +1 -1
- package/dist/{chunk-SJN64NJX.js → chunk-R6OYCUNK.js} +1 -1
- package/dist/{chunk-5GIBNUBD.js → chunk-RLW3JWDY.js} +2 -2
- package/dist/{chunk-E3PLF7YB.js → chunk-TCVMK6GI.js} +4 -4
- package/dist/{chunk-2B4XCMH6.js → chunk-U6RVDUJ5.js} +8 -8
- package/dist/{chunk-T3PRPFDY.js → chunk-UOQRM7JQ.js} +5 -5
- package/dist/{chunk-D4OGEWLH.js → chunk-VE7TXLR4.js} +3 -3
- package/dist/{chunk-SEIZQZEE.js → chunk-VKVSRCBO.js} +1 -1
- package/dist/{chunk-INR3RVQ3.js → chunk-VYPJHGG6.js} +2 -2
- package/dist/{chunk-YU54LNC6.js → chunk-WGMW7OXW.js} +6 -6
- package/dist/{chunk-QSZ37ROP.js → chunk-WPX67AKT.js} +1 -1
- package/dist/{chunk-L6IF4JOF.js → chunk-WTJM7PSL.js} +3 -3
- package/dist/{chunk-YNJ2H2FD.js → chunk-Y4ZH64UK.js} +2 -2
- package/dist/{chunk-2XOHXZRC.js → chunk-YC27PROF.js} +4 -4
- package/dist/{chunk-YLCSKVQQ.js → chunk-YPUBA2FL.js} +4 -4
- package/dist/{chunk-65RN6ZCO.js → chunk-YYCTF4Q5.js} +1 -1
- package/dist/{chunk-4S7CCOXB.js → chunk-ZKJ34T2F.js} +5 -5
- package/dist/{reapply-D6RSDYCK.js → reapply-PH5T4BGR.js} +9 -9
- package/dist/src/index.js +20 -20
- package/package.json +1 -1
package/dist/bin/pushary-wait.js
CHANGED
|
@@ -4,33 +4,33 @@ import {
|
|
|
4
4
|
} from "../chunk-CVWG2N3Y.js";
|
|
5
5
|
import {
|
|
6
6
|
exitOnFailedResponse
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-PRNFSORD.js";
|
|
8
8
|
import {
|
|
9
9
|
createIo
|
|
10
10
|
} from "../chunk-U4TMAANR.js";
|
|
11
11
|
import {
|
|
12
12
|
exitOnHelpFlag
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-5S2VBSJI.js";
|
|
14
14
|
import {
|
|
15
15
|
rejectUnknownFlags
|
|
16
16
|
} from "../chunk-GMXKITVA.js";
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-EEEJ2JIL.js";
|
|
18
|
+
import "../chunk-DUQO4C4I.js";
|
|
19
|
+
import "../chunk-OVC5QXN5.js";
|
|
20
20
|
import {
|
|
21
21
|
UsageError
|
|
22
22
|
} from "../chunk-7QLSKOSU.js";
|
|
23
23
|
import {
|
|
24
24
|
EXIT
|
|
25
25
|
} from "../chunk-KZERVKTD.js";
|
|
26
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-MZBRL5H5.js";
|
|
27
27
|
import "../chunk-T7E75EKA.js";
|
|
28
28
|
import {
|
|
29
29
|
getApiKey,
|
|
30
30
|
getBaseUrl
|
|
31
|
-
} from "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
31
|
+
} from "../chunk-R6OYCUNK.js";
|
|
32
|
+
import "../chunk-YYCTF4Q5.js";
|
|
33
|
+
import "../chunk-G4GLCLKK.js";
|
|
34
34
|
|
|
35
35
|
// bin/pushary-wait.ts
|
|
36
36
|
exitOnHelpFlag("wait");
|
package/dist/bin/pushary.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
installNetworkDefaults
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-DUQO4C4I.js";
|
|
5
|
+
import "../chunk-OVC5QXN5.js";
|
|
6
6
|
import "../chunk-7QLSKOSU.js";
|
|
7
7
|
import {
|
|
8
8
|
EXIT
|
|
9
9
|
} from "../chunk-KZERVKTD.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-MZBRL5H5.js";
|
|
11
11
|
import "../chunk-T7E75EKA.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-R6OYCUNK.js";
|
|
13
13
|
import {
|
|
14
14
|
COMMANDS,
|
|
15
15
|
isCommandName,
|
|
16
16
|
renderHelp
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-YYCTF4Q5.js";
|
|
18
18
|
import {
|
|
19
19
|
getPackageVersion
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-G4GLCLKK.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/runtime.ts
|
|
23
23
|
var supportsRuntime = (version) => {
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
permissionDeniedAction,
|
|
7
7
|
releaseThrottle,
|
|
8
8
|
reportEvent
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-U6RVDUJ5.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_SESSION
|
|
12
12
|
} from "./chunk-N6IOSZOE.js";
|
|
13
13
|
import {
|
|
14
14
|
canonicalJson
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MZBRL5H5.js";
|
|
16
16
|
import {
|
|
17
17
|
writeFileAtomic
|
|
18
18
|
} from "./chunk-T7E75EKA.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
machineDecisionFor,
|
|
23
23
|
shouldDeferToNativeMode,
|
|
24
24
|
wireVerdictFor
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-G4GLCLKK.js";
|
|
26
26
|
|
|
27
27
|
// src/machine-decision-audit.ts
|
|
28
28
|
import { basename } from "path";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-KZERVKTD.js";
|
|
4
4
|
import {
|
|
5
5
|
renderCommandHelp
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YYCTF4Q5.js";
|
|
7
7
|
import {
|
|
8
8
|
getPackageVersion
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-G4GLCLKK.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/usage.ts
|
|
12
12
|
var exitOnHelpFlag = (command) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
activeHookSource,
|
|
3
3
|
activeIdentity
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UOQRM7JQ.js";
|
|
5
5
|
import {
|
|
6
6
|
blockedActionFingerprint,
|
|
7
7
|
defersToNativeMode,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
hasBlockedActionHint,
|
|
10
10
|
recordBlockedActionHint,
|
|
11
11
|
reportMachineDenial
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5GB22QYL.js";
|
|
13
13
|
import {
|
|
14
14
|
isGatingMoment,
|
|
15
15
|
recordKeylessMoment
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IRZG3HEU.js";
|
|
17
17
|
import {
|
|
18
18
|
announceSubscriptionRequired,
|
|
19
19
|
denyReasonFrom,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
reportEvent,
|
|
38
38
|
scopePathFor,
|
|
39
39
|
settleQuestionsForToolUse
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-U6RVDUJ5.js";
|
|
41
41
|
import {
|
|
42
42
|
DEFAULT_SESSION
|
|
43
43
|
} from "./chunk-N6IOSZOE.js";
|
|
@@ -53,17 +53,17 @@ import {
|
|
|
53
53
|
requestGate,
|
|
54
54
|
sendNotification,
|
|
55
55
|
waitForQuestion
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-YC27PROF.js";
|
|
57
57
|
import {
|
|
58
58
|
SubscriptionRequiredError
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-VE7TXLR4.js";
|
|
60
60
|
import {
|
|
61
61
|
getMachineId
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-OVC5QXN5.js";
|
|
63
63
|
import {
|
|
64
64
|
getApiKey,
|
|
65
65
|
getBaseUrl
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-R6OYCUNK.js";
|
|
67
67
|
import {
|
|
68
68
|
AGENT_QUESTION_STRATEGY,
|
|
69
69
|
GATE_BLOCK_REASON_MAX_LENGTH,
|
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
parseAgentQuestions,
|
|
92
92
|
resolveGate,
|
|
93
93
|
stoppedOutput
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-G4GLCLKK.js";
|
|
95
95
|
|
|
96
96
|
// src/claude-permission-rules.ts
|
|
97
97
|
import { readFileSync, statSync } from "fs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyHookExecutable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WTJM7PSL.js";
|
|
4
4
|
import {
|
|
5
5
|
isProtectedByScope,
|
|
6
6
|
registerHookEntry
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MZBRL5H5.js";
|
|
8
8
|
|
|
9
9
|
// src/skills-cli.ts
|
|
10
10
|
import { execSync } from "child_process";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OTNOANMX.js";
|
|
4
4
|
import {
|
|
5
5
|
writeDegraded
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-N5MZH5A6.js";
|
|
7
7
|
|
|
8
8
|
// src/tool-hook-input.ts
|
|
9
9
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
decodePublicKey,
|
|
4
4
|
generateSessionKey,
|
|
5
5
|
wrapSessionKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-P2VIBGXA.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchTranscriptRecipients,
|
|
9
9
|
uploadTranscriptRecords
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WPX67AKT.js";
|
|
11
11
|
|
|
12
12
|
// src/live-session.ts
|
|
13
13
|
var MAX_TRANSCRIPT_QUEUE = 100;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-62CVUUNU.js";
|
|
4
4
|
import {
|
|
5
5
|
backupFile,
|
|
6
6
|
readJsonSafe,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-T7E75EKA.js";
|
|
10
10
|
import {
|
|
11
11
|
configFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R6OYCUNK.js";
|
|
13
13
|
|
|
14
14
|
// src/shell-alias.ts
|
|
15
15
|
import { homedir } from "os";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OVC5QXN5.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-R6OYCUNK.js";
|
|
10
10
|
import {
|
|
11
11
|
clientContextHeaders,
|
|
12
12
|
getPackageVersion
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-G4GLCLKK.js";
|
|
14
14
|
|
|
15
15
|
// src/cli/net.ts
|
|
16
16
|
import { createRequire } from "module";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BGBLLHZ4.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-G4GLCLKK.js";
|
|
18
18
|
|
|
19
19
|
// src/cli/cowork.ts
|
|
20
20
|
import { readFileSync } from "fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DUQO4C4I.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-KZERVKTD.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R6OYCUNK.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-G4GLCLKK.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;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
supportedClaudeEvents
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MIXWMA73.js";
|
|
5
5
|
import {
|
|
6
6
|
guardBinary,
|
|
7
7
|
holdBudgetOf,
|
|
8
8
|
isProtectedByScope,
|
|
9
9
|
registerHookEntry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MZBRL5H5.js";
|
|
11
11
|
import {
|
|
12
12
|
HOOK_LOCATOR_BINARY,
|
|
13
13
|
withHookHoldBudget
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-G4GLCLKK.js";
|
|
15
15
|
|
|
16
16
|
// src/claude-config.ts
|
|
17
17
|
import { join } from "path";
|
|
@@ -455,21 +455,42 @@ var compatibleTargetFiles = (profile) => {
|
|
|
455
455
|
};
|
|
456
456
|
|
|
457
457
|
// ../contracts/src/redaction.ts
|
|
458
|
-
var
|
|
459
|
-
var
|
|
460
|
-
var
|
|
461
|
-
var
|
|
462
|
-
var
|
|
463
|
-
var
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
replacement: "$1$2$3[redacted]$2$3"
|
|
458
|
+
var CREDENTIAL_NAME = String.raw`(?:secret|token|password|passwd|api[_-]?key|access[_-]?key|client[_-]?secret|private[_-]?key)["']?`;
|
|
459
|
+
var CREDENTIAL_KEY = String.raw`${CREDENTIAL_NAME}\s*[=:]\s*`;
|
|
460
|
+
var DISPLAYED_CREDENTIAL_KEY = String.raw`${CREDENTIAL_NAME}(?:[ \t]*:[ \t]*|[ \t]+=[ \t]*|=)`;
|
|
461
|
+
var SHELL_INERT_UNIT = String.raw`(?:[A-Za-z0-9_\-./+=:@%^!#]|\\[^\s'"])`;
|
|
462
|
+
var SHELL_INERT_SINGLE_QUOTED_UNIT = String.raw`[A-Za-z0-9_\-./+=:@%^!#\\]`;
|
|
463
|
+
var SHELL_INERT_URL_PASSWORD_UNIT = String.raw`(?:[A-Za-z0-9_\-.+=:%^!#]|\\[^\s'"@/])`;
|
|
464
|
+
var PEM_LINE_BREAK = String.raw`(?:\r?\n|(?:\\r)?\\n)`;
|
|
465
|
+
var credentialAssignmentRule = (key, doubleQuoted, singleQuoted, bare) => ({
|
|
466
|
+
pattern: new RegExp(String.raw`(${key})(?:(")${doubleQuoted}|(')${singleQuoted}|(["']?)${bare})`, "gi"),
|
|
467
|
+
replacement: "$1$2$3$4[redacted]$2$3"
|
|
469
468
|
});
|
|
470
|
-
var
|
|
469
|
+
var DISPLAYED_SECRET_SHAPES = {
|
|
470
|
+
privateKeyBody: String.raw`${PEM_LINE_BREAK}?(?:(?:Proc-Type|DEK-Info): [A-Za-z0-9,-]+${PEM_LINE_BREAK})*(?:[A-Za-z0-9+/=\r\n]|\\[rn])*?`,
|
|
471
|
+
urlPassword: `${SHELL_INERT_URL_PASSWORD_UNIT}+`,
|
|
472
|
+
authorizationValue: `${SHELL_INERT_UNIT}+`,
|
|
473
|
+
credentialAssignment: credentialAssignmentRule(
|
|
474
|
+
DISPLAYED_CREDENTIAL_KEY,
|
|
475
|
+
`${SHELL_INERT_UNIT}*"`,
|
|
476
|
+
`${SHELL_INERT_SINGLE_QUOTED_UNIT}*'`,
|
|
477
|
+
`${SHELL_INERT_UNIT}+`
|
|
478
|
+
)
|
|
479
|
+
};
|
|
480
|
+
var CUT_OFF_SECRET_SHAPES = {
|
|
481
|
+
privateKeyBody: String.raw`[\s\S]*?`,
|
|
482
|
+
urlPassword: String.raw`[^\s@/]+`,
|
|
483
|
+
authorizationValue: String.raw`\S+`,
|
|
484
|
+
credentialAssignment: credentialAssignmentRule(
|
|
485
|
+
CREDENTIAL_KEY,
|
|
486
|
+
String.raw`(?:\\[\s\S]|[^"\\])*(?:"|\\?$)`,
|
|
487
|
+
"[^']*(?:'|$)",
|
|
488
|
+
String.raw`\S+`
|
|
489
|
+
)
|
|
490
|
+
};
|
|
491
|
+
var secretRedactionRules = (shapes) => [
|
|
471
492
|
{ pattern: /\bpk_[A-Za-z0-9_]+\.[A-Za-z0-9_]+/g, replacement: "[redacted]" },
|
|
472
|
-
{ pattern:
|
|
493
|
+
{ pattern: new RegExp(String.raw`-----BEGIN[A-Z0-9 ]*PRIVATE KEY-----${shapes.privateKeyBody}-----END[A-Z0-9 ]*PRIVATE KEY-----`, "g"), replacement: "[redacted key]" },
|
|
473
494
|
{ pattern: /\bsk-[A-Za-z0-9_-]{16,}\b/g, replacement: "[redacted]" },
|
|
474
495
|
{ pattern: /\b[spr]k_(?:live|test)_[A-Za-z0-9]{8,}\b/g, replacement: "[redacted]" },
|
|
475
496
|
{ pattern: /\bwhsec_[A-Za-z0-9]{16,}\b/g, replacement: "[redacted]" },
|
|
@@ -482,21 +503,17 @@ var PRECISE_SECRET_RULES = [
|
|
|
482
503
|
{ pattern: /\bnpm_[A-Za-z0-9]{36}\b/g, replacement: "[redacted]" },
|
|
483
504
|
{ pattern: /\bxai-[A-Za-z0-9]{16,}\b/g, replacement: "[redacted]" },
|
|
484
505
|
{ pattern: /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g, replacement: "[redacted]" },
|
|
485
|
-
{ pattern:
|
|
506
|
+
{ pattern: new RegExp(String.raw`\b([a-z][a-z0-9+.-]*:\/\/[^\s:/@]+:)${shapes.urlPassword}@`, "gi"), replacement: "$1[redacted]@" },
|
|
486
507
|
{ pattern: /\bbearer\s+[A-Za-z0-9._~+/=-]+/gi, replacement: "bearer [redacted]" },
|
|
487
|
-
{ pattern:
|
|
488
|
-
|
|
489
|
-
var SECRET_REDACTION_RULES = [
|
|
490
|
-
...PRECISE_SECRET_RULES,
|
|
491
|
-
credentialAssignmentRule(CLOSED_DOUBLE_QUOTE, CLOSED_SINGLE_QUOTE)
|
|
492
|
-
];
|
|
493
|
-
var CUT_OFF_TEXT_REDACTION_RULES = [
|
|
494
|
-
...PRECISE_SECRET_RULES,
|
|
495
|
-
credentialAssignmentRule(DOUBLE_QUOTE_OR_CUT_OFF, SINGLE_QUOTE_OR_CUT_OFF)
|
|
508
|
+
{ pattern: new RegExp(String.raw`\bauthorization:\s*${shapes.authorizationValue}`, "gi"), replacement: "authorization: [redacted]" },
|
|
509
|
+
shapes.credentialAssignment
|
|
496
510
|
];
|
|
511
|
+
var SECRET_REDACTION_RULES = secretRedactionRules(DISPLAYED_SECRET_SHAPES);
|
|
512
|
+
var CUT_OFF_TEXT_REDACTION_RULES = secretRedactionRules(CUT_OFF_SECRET_SHAPES);
|
|
497
513
|
var HIGH_ENTROPY_RULE = { pattern: /[A-Za-z0-9+/]{40,}={0,2}/g, replacement: "[redacted]" };
|
|
498
514
|
var applyRedactionRules = (rules, text) => rules.reduce((acc, rule) => acc.replace(rule.pattern, rule.replacement), text);
|
|
499
515
|
var redactSecrets = (text) => applyRedactionRules(SECRET_REDACTION_RULES, text);
|
|
516
|
+
var redactSecretsFromContent = (text) => applyRedactionRules(CUT_OFF_TEXT_REDACTION_RULES, text);
|
|
500
517
|
var redactSecretsDeep = (text) => redactSecrets(text).replace(HIGH_ENTROPY_RULE.pattern, HIGH_ENTROPY_RULE.replacement);
|
|
501
518
|
|
|
502
519
|
// ../contracts/src/degraded.ts
|
|
@@ -2601,6 +2618,7 @@ export {
|
|
|
2601
2618
|
hookCompatibleProfileBySource,
|
|
2602
2619
|
compatibleTargetFiles,
|
|
2603
2620
|
redactSecrets,
|
|
2621
|
+
redactSecretsFromContent,
|
|
2604
2622
|
redactSecretsDeep,
|
|
2605
2623
|
degradedLine,
|
|
2606
2624
|
hookWritePath,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
detectClaudeVersion
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IPSRMLCJ.js";
|
|
4
4
|
import {
|
|
5
5
|
ensureCodexTrustsPusharyHooks
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RLW3JWDY.js";
|
|
7
7
|
import {
|
|
8
8
|
addClaudeMcpServer,
|
|
9
9
|
addPusharyHooks,
|
|
10
10
|
addPusharyToolPermissions
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-G3OMOTJ4.js";
|
|
12
12
|
import {
|
|
13
13
|
claudeUnprovenHolds,
|
|
14
14
|
claudeWired,
|
|
15
15
|
codexUnprovenHolds,
|
|
16
16
|
codexWired,
|
|
17
17
|
geminiWired
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WTJM7PSL.js";
|
|
19
19
|
import {
|
|
20
20
|
CLAUDE_HOOK_BINARY,
|
|
21
21
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
needsReregistration,
|
|
28
28
|
registrationSignatures,
|
|
29
29
|
supportedClaudeEvents
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-MIXWMA73.js";
|
|
31
31
|
import {
|
|
32
32
|
CODEX_HOOK_BINARY,
|
|
33
33
|
addCodexHookTrust,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
registrationHolderOf,
|
|
48
48
|
resolveGlobalBinary,
|
|
49
49
|
vscodePluginMcp
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-MZBRL5H5.js";
|
|
51
51
|
import {
|
|
52
52
|
readJsonSafe,
|
|
53
53
|
writeFileAtomic,
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-POFBE6ZY.js";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MZBRL5H5.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsonSafe,
|
|
9
9
|
writeJsonAtomic
|
|
10
10
|
} from "./chunk-T7E75EKA.js";
|
|
11
11
|
import {
|
|
12
12
|
ownPackageRoot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-G4GLCLKK.js";
|
|
14
14
|
|
|
15
15
|
// src/auto-update.ts
|
|
16
16
|
import { spawn } from "child_process";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NOTIFICATION_MATCHED_TYPES,
|
|
3
3
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EUGNVLMG.js";
|
|
5
5
|
import {
|
|
6
6
|
isProtectedByScope,
|
|
7
7
|
registerHookEntry
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MZBRL5H5.js";
|
|
9
9
|
import {
|
|
10
10
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
11
11
|
HOOK_BUDGETS,
|
|
12
12
|
HOOK_LOCATOR_BINARY
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-G4GLCLKK.js";
|
|
14
14
|
|
|
15
15
|
// src/gemini-config.ts
|
|
16
16
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
} from "./chunk-POFBE6ZY.js";
|
|
5
5
|
import {
|
|
6
6
|
isNetworkFailure
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DUQO4C4I.js";
|
|
8
8
|
import {
|
|
9
9
|
clientReportClaims
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MZBRL5H5.js";
|
|
11
11
|
import {
|
|
12
12
|
getApiKey,
|
|
13
13
|
getBaseUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-R6OYCUNK.js";
|
|
15
15
|
import {
|
|
16
16
|
CLIENT_REPORT_PATH,
|
|
17
17
|
degradedLine
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-G4GLCLKK.js";
|
|
19
19
|
|
|
20
20
|
// src/client-report-claim.ts
|
|
21
21
|
import { createHash } from "crypto";
|