@pushary/agent-hooks 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/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 +159 -138
- package/dist/bin/pushary-codex-bridge.js +10 -10
- package/dist/bin/pushary-codex-hook.js +31 -26
- 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 +20 -20
- 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 +23 -23
- 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 +23 -23
- 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 +53 -32
- 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-VENQSVKA.js → chunk-25RTLTQD.js} +1 -1
- package/dist/{chunk-H25UB3CG.js → chunk-2V2IKOGJ.js} +1 -1
- package/dist/{chunk-BYAXXBNO.js → chunk-4BROEAKH.js} +1 -1
- package/dist/{chunk-UTYTPDWN.js → chunk-4ZDKSDVW.js} +4 -4
- package/dist/{chunk-2TOTCUJC.js → chunk-55KW4FLG.js} +2 -2
- package/dist/{chunk-S3CLZSV3.js → chunk-ACYIZ3KH.js} +5 -5
- package/dist/{chunk-RGZY77CD.js → chunk-BZ4GDOJX.js} +3 -3
- package/dist/{chunk-5MSBI6NP.js → chunk-DY4ILT6L.js} +1 -1
- package/dist/{chunk-Q4UAMWXK.js → chunk-F4UWL4NY.js} +1 -1
- package/dist/{chunk-NYHNLMQO.js → chunk-FU2DFEAZ.js} +1 -1
- package/dist/{chunk-IF46POXX.js → chunk-G653QPTR.js} +17 -13
- package/dist/{chunk-S3EUZZJB.js → chunk-GZ7E6VOB.js} +1 -1
- package/dist/{chunk-5IBVIMWT.js → chunk-II7PUMPB.js} +3 -3
- package/dist/{chunk-ZIGGEKZW.js → chunk-JVTOML54.js} +2 -2
- package/dist/{chunk-5F5QQMCA.js → chunk-LEAAERSQ.js} +1 -1
- package/dist/{chunk-A7XIL2WD.js → chunk-LPYCPFBZ.js} +3 -3
- package/dist/{chunk-XJWMPQ6X.js → chunk-M5CTUFF3.js} +1 -1
- package/dist/{chunk-O5L2OJBB.js → chunk-MUVTZNJW.js} +3 -3
- package/dist/{chunk-7PQZYCEP.js → chunk-MW6ZPC6R.js} +1 -1
- package/dist/{chunk-RQM5SMMR.js → chunk-NHTAHAIS.js} +1 -1
- package/dist/{chunk-GS5EI2YL.js → chunk-NOWZUGZW.js} +1 -1
- package/dist/{chunk-D4TNSUDY.js → chunk-NY6XQ6CA.js} +1 -1
- package/dist/{chunk-SGZ3IAWF.js → chunk-PC6DU5C4.js} +1 -1
- package/dist/{chunk-7IEB2GV4.js → chunk-SOUZBGYJ.js} +5 -0
- package/dist/{chunk-JCWCTBYH.js → chunk-SUWRZYQG.js} +56 -5
- package/dist/{chunk-U4FB623J.js → chunk-T5SZ4PML.js} +24 -10
- package/dist/{chunk-UCGQEAKZ.js → chunk-TRLFZKVG.js} +1 -1
- package/dist/{chunk-GLPWCQ6V.js → chunk-TYEO6T5J.js} +2 -2
- package/dist/{chunk-ESLLVHDY.js → chunk-UJBZIKSY.js} +6 -6
- package/dist/{chunk-P4JVVJ2D.js → chunk-UM5J3J4V.js} +1 -1
- package/dist/{chunk-HGN6VZTY.js → chunk-VIOL2DJS.js} +5 -5
- package/dist/{chunk-GIXLZFEY.js → chunk-VOMOZ4D5.js} +1 -1
- package/dist/{chunk-UIN3RD2U.js → chunk-VW66JEGU.js} +4 -4
- package/dist/{chunk-O6RN46OS.js → chunk-WPVHRUDT.js} +3 -3
- package/dist/{chunk-43Z3RLS5.js → chunk-XDP3UYH5.js} +16 -43
- package/dist/{chunk-NBCTKC4Z.js → chunk-Y3MM6PYN.js} +4 -4
- package/dist/{chunk-KZIXHLPQ.js → chunk-YXP3WPAI.js} +1 -1
- package/dist/{chunk-YYRZPEMA.js → chunk-ZVY25BMK.js} +1 -1
- package/dist/{reapply-B3S2LRMT.js → reapply-J527BCJG.js} +8 -8
- package/dist/src/index.js +12 -12
- package/package.json +1 -1
|
@@ -2,42 +2,42 @@
|
|
|
2
2
|
import {
|
|
3
3
|
activeHookSource,
|
|
4
4
|
activeIdentity
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-VIOL2DJS.js";
|
|
6
|
+
import "../chunk-II7PUMPB.js";
|
|
7
7
|
import {
|
|
8
8
|
readHookInput
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-JVTOML54.js";
|
|
10
|
+
import "../chunk-UJBZIKSY.js";
|
|
11
11
|
import "../chunk-SGZJ5LYH.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-4ZDKSDVW.js";
|
|
13
|
+
import "../chunk-DY4ILT6L.js";
|
|
14
|
+
import "../chunk-ZVY25BMK.js";
|
|
15
|
+
import "../chunk-WPVHRUDT.js";
|
|
16
|
+
import "../chunk-BZ4GDOJX.js";
|
|
17
|
+
import "../chunk-LPYCPFBZ.js";
|
|
18
|
+
import "../chunk-MW6ZPC6R.js";
|
|
19
|
+
import "../chunk-GZ7E6VOB.js";
|
|
20
20
|
import "../chunk-EQRS3SGM.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-4BROEAKH.js";
|
|
22
22
|
import "../chunk-XHKBHWLX.js";
|
|
23
23
|
import {
|
|
24
24
|
handleStopFailure
|
|
25
|
-
} from "../chunk-
|
|
26
|
-
import "../chunk-
|
|
25
|
+
} from "../chunk-G653QPTR.js";
|
|
26
|
+
import "../chunk-YXP3WPAI.js";
|
|
27
27
|
import "../chunk-LGXUGYUH.js";
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-NHTAHAIS.js";
|
|
29
|
+
import "../chunk-TRLFZKVG.js";
|
|
30
30
|
import "../chunk-GMXKITVA.js";
|
|
31
31
|
import "../chunk-DINDL2CF.js";
|
|
32
|
-
import "../chunk-
|
|
32
|
+
import "../chunk-FU2DFEAZ.js";
|
|
33
33
|
import "../chunk-EYRGBYZG.js";
|
|
34
34
|
import "../chunk-SAF6HGAA.js";
|
|
35
35
|
import "../chunk-7QLSKOSU.js";
|
|
36
36
|
import "../chunk-KZERVKTD.js";
|
|
37
|
-
import "../chunk-
|
|
37
|
+
import "../chunk-UM5J3J4V.js";
|
|
38
38
|
import "../chunk-T7E75EKA.js";
|
|
39
39
|
import "../chunk-2UMNXADU.js";
|
|
40
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-SOUZBGYJ.js";
|
|
41
41
|
|
|
42
42
|
// bin/pushary-stopfailure-hook.ts
|
|
43
43
|
var AGENT = activeIdentity(process.argv);
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
registerTranscript
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-UJBZIKSY.js";
|
|
5
5
|
import "../chunk-SGZJ5LYH.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-4ZDKSDVW.js";
|
|
7
|
+
import "../chunk-DY4ILT6L.js";
|
|
8
|
+
import "../chunk-ZVY25BMK.js";
|
|
9
|
+
import "../chunk-WPVHRUDT.js";
|
|
10
|
+
import "../chunk-BZ4GDOJX.js";
|
|
11
|
+
import "../chunk-LPYCPFBZ.js";
|
|
12
|
+
import "../chunk-MW6ZPC6R.js";
|
|
13
|
+
import "../chunk-GZ7E6VOB.js";
|
|
14
14
|
import "../chunk-EQRS3SGM.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-4BROEAKH.js";
|
|
16
16
|
import "../chunk-XHKBHWLX.js";
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-YXP3WPAI.js";
|
|
18
|
+
import "../chunk-NHTAHAIS.js";
|
|
19
|
+
import "../chunk-TRLFZKVG.js";
|
|
20
20
|
import "../chunk-GMXKITVA.js";
|
|
21
21
|
import "../chunk-DINDL2CF.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-FU2DFEAZ.js";
|
|
23
23
|
import "../chunk-7QLSKOSU.js";
|
|
24
24
|
import "../chunk-KZERVKTD.js";
|
|
25
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-UM5J3J4V.js";
|
|
26
26
|
import "../chunk-T7E75EKA.js";
|
|
27
27
|
import "../chunk-2UMNXADU.js";
|
|
28
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-SOUZBGYJ.js";
|
|
29
29
|
|
|
30
30
|
// bin/pushary-transcript-register.ts
|
|
31
31
|
var raw = "";
|
|
@@ -6,18 +6,18 @@ import {
|
|
|
6
6
|
} from "../chunk-SGZJ5LYH.js";
|
|
7
7
|
import {
|
|
8
8
|
transcriptsEnabled
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-4BROEAKH.js";
|
|
10
10
|
import {
|
|
11
11
|
exitOnHelpFlag
|
|
12
12
|
} from "../chunk-TWWLVOPB.js";
|
|
13
13
|
import "../chunk-FAH3D74E.js";
|
|
14
14
|
import "../chunk-DINDL2CF.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-FU2DFEAZ.js";
|
|
16
16
|
import "../chunk-KZERVKTD.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-UM5J3J4V.js";
|
|
18
18
|
import "../chunk-T7E75EKA.js";
|
|
19
19
|
import "../chunk-2UMNXADU.js";
|
|
20
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-SOUZBGYJ.js";
|
|
21
21
|
|
|
22
22
|
// bin/pushary-transcripts.ts
|
|
23
23
|
exitOnHelpFlag("transcripts");
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
reapplyAllAgents
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-ACYIZ3KH.js";
|
|
5
|
+
import "../chunk-PC6DU5C4.js";
|
|
6
6
|
import {
|
|
7
7
|
waitForMachineReadiness
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-VW66JEGU.js";
|
|
9
|
+
import "../chunk-II7PUMPB.js";
|
|
10
10
|
import {
|
|
11
11
|
detectProviderLiveCapabilities,
|
|
12
12
|
hasSpawnProvider,
|
|
13
13
|
resolveControlPolicy
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-TYEO6T5J.js";
|
|
15
|
+
import "../chunk-WPVHRUDT.js";
|
|
16
16
|
import {
|
|
17
17
|
daemonHasRemoteProof,
|
|
18
18
|
daemonServiceManagerAvailable,
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
replaceDaemonService,
|
|
24
24
|
stopDaemonService,
|
|
25
25
|
waitForDaemonRemoteProof
|
|
26
|
-
} from "../chunk-
|
|
27
|
-
import "../chunk-
|
|
26
|
+
} from "../chunk-BZ4GDOJX.js";
|
|
27
|
+
import "../chunk-LPYCPFBZ.js";
|
|
28
28
|
import {
|
|
29
29
|
needsShell
|
|
30
30
|
} from "../chunk-XHKBHWLX.js";
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-YXP3WPAI.js";
|
|
32
|
+
import "../chunk-NHTAHAIS.js";
|
|
33
33
|
import {
|
|
34
34
|
claudeJson,
|
|
35
35
|
codexConfigToml,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
npmErrorMessage,
|
|
40
40
|
resolveGlobalBinary,
|
|
41
41
|
vscodePluginDir
|
|
42
|
-
} from "../chunk-
|
|
42
|
+
} from "../chunk-TRLFZKVG.js";
|
|
43
43
|
import {
|
|
44
44
|
exitOnHelpFlag
|
|
45
45
|
} from "../chunk-TWWLVOPB.js";
|
|
@@ -49,14 +49,14 @@ import {
|
|
|
49
49
|
} from "../chunk-DINDL2CF.js";
|
|
50
50
|
import {
|
|
51
51
|
readControlMode
|
|
52
|
-
} from "../chunk-
|
|
52
|
+
} from "../chunk-FU2DFEAZ.js";
|
|
53
53
|
import "../chunk-KZERVKTD.js";
|
|
54
|
-
import "../chunk-
|
|
54
|
+
import "../chunk-UM5J3J4V.js";
|
|
55
55
|
import "../chunk-T7E75EKA.js";
|
|
56
56
|
import {
|
|
57
57
|
getApiKey
|
|
58
58
|
} from "../chunk-2UMNXADU.js";
|
|
59
|
-
import "../chunk-
|
|
59
|
+
import "../chunk-SOUZBGYJ.js";
|
|
60
60
|
|
|
61
61
|
// bin/pushary-upgrade.ts
|
|
62
62
|
import { existsSync } from "fs";
|
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-NOWZUGZW.js";
|
|
8
|
+
import "../chunk-NY6XQ6CA.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-SOUZBGYJ.js";
|
|
32
32
|
|
|
33
33
|
// bin/pushary-wait.ts
|
|
34
34
|
exitOnHelpFlag("wait");
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AGENT_CHOICES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DY4ILT6L.js";
|
|
4
4
|
import {
|
|
5
5
|
isBridgeLocator
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZVY25BMK.js";
|
|
7
7
|
import {
|
|
8
8
|
pusharyHookExecutable
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WPVHRUDT.js";
|
|
10
10
|
import {
|
|
11
11
|
BELL_HOOK_BINARY
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MW6ZPC6R.js";
|
|
13
13
|
|
|
14
14
|
// src/setup/hook-ownership.ts
|
|
15
15
|
var commandsIn = (value) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DY4ILT6L.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-SOUZBGYJ.js";
|
|
18
18
|
|
|
19
19
|
// src/cli/cowork.ts
|
|
20
20
|
import { readFileSync } from "fs";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
detectClaudeVersion
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PC6DU5C4.js";
|
|
4
4
|
import {
|
|
5
5
|
addClaudeMcpServer,
|
|
6
6
|
addPusharyHooks,
|
|
7
7
|
addPusharyToolPermissions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-II7PUMPB.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-WPVHRUDT.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-LPYCPFBZ.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-TRLFZKVG.js";
|
|
48
48
|
import {
|
|
49
49
|
readJsonSafe,
|
|
50
50
|
writeFileAtomic,
|
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
getMachineId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NHTAHAIS.js";
|
|
8
8
|
import {
|
|
9
9
|
pusharyDir,
|
|
10
10
|
resolveGlobalBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TRLFZKVG.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-FU2DFEAZ.js";
|
|
18
18
|
import {
|
|
19
19
|
readJsonSafe,
|
|
20
20
|
writeFileAtomic,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
COMPATIBLE_AGENT_TYPES,
|
|
9
9
|
isValidApiKey
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SOUZBGYJ.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"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NOTIFICATION_PUSH_TYPES,
|
|
3
3
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YXP3WPAI.js";
|
|
5
5
|
import {
|
|
6
6
|
cancelQuestion,
|
|
7
7
|
isPolicyConfig,
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
} from "./chunk-LGXUGYUH.js";
|
|
11
11
|
import {
|
|
12
12
|
getMachineId
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NHTAHAIS.js";
|
|
14
14
|
import {
|
|
15
15
|
withRetry
|
|
16
16
|
} from "./chunk-EYRGBYZG.js";
|
|
17
17
|
import {
|
|
18
18
|
reportedInstallSource
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-UM5J3J4V.js";
|
|
20
20
|
import {
|
|
21
21
|
getApiKey,
|
|
22
22
|
getBaseUrl
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
resolveAutoResolveOrigin,
|
|
45
45
|
resolvePolicy,
|
|
46
46
|
toToolLookup
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-SOUZBGYJ.js";
|
|
48
48
|
|
|
49
49
|
// src/policy.ts
|
|
50
50
|
import { createHash } from "crypto";
|
|
@@ -1368,20 +1368,23 @@ var phoneDrivenEnv = (base) => ({
|
|
|
1368
1368
|
import { join as join5 } from "path";
|
|
1369
1369
|
import { tmpdir as tmpdir4 } from "os";
|
|
1370
1370
|
import { createHash as createHash4 } from "crypto";
|
|
1371
|
-
import { existsSync as existsSync4, mkdirSync as mkdirSync3, statSync as statSync4, writeFileSync as writeFileSync4 } from "fs";
|
|
1371
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync3, statSync as statSync4, writeFileSync as writeFileSync4, rmSync as rmSync2 } from "fs";
|
|
1372
1372
|
var THROTTLE_DIR = join5(tmpdir4(), "pushary-throttle");
|
|
1373
1373
|
var markerPath = (key) => join5(THROTTLE_DIR, createHash4("sha256").update(key).digest("hex").slice(0, 16));
|
|
1374
|
-
var
|
|
1374
|
+
var claimThrottle = (key, windowMs) => {
|
|
1375
1375
|
try {
|
|
1376
1376
|
const path = markerPath(key);
|
|
1377
|
-
if (existsSync4(path) && Date.now() - statSync4(path).mtimeMs < windowMs) return
|
|
1377
|
+
if (existsSync4(path) && Date.now() - statSync4(path).mtimeMs < windowMs) return "throttled";
|
|
1378
1378
|
mkdirSync3(THROTTLE_DIR, { recursive: true });
|
|
1379
1379
|
writeFileSync4(path, "", "utf-8");
|
|
1380
|
-
return
|
|
1380
|
+
return "passed";
|
|
1381
1381
|
} catch {
|
|
1382
|
-
return
|
|
1382
|
+
return "unavailable";
|
|
1383
1383
|
}
|
|
1384
1384
|
};
|
|
1385
|
+
var releaseThrottle = (key) => {
|
|
1386
|
+
rmSync2(markerPath(key), { force: true });
|
|
1387
|
+
};
|
|
1385
1388
|
|
|
1386
1389
|
// src/events.ts
|
|
1387
1390
|
import { basename as basename3, join as join6 } from "path";
|
|
@@ -1688,7 +1691,7 @@ var handlePostToolUse = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
|
1688
1691
|
}
|
|
1689
1692
|
const isMirrorOnly = NON_GATED_MIRROR_TOOLS.has(input.tool_name);
|
|
1690
1693
|
const decisionSource = isMirrorOnly ? void 0 : deriveDecisionSource(lookup.tool, lookup.input, liveMode, agent.type, input.cwd, input.session_id);
|
|
1691
|
-
const beacon = !isMirrorOnly && decisionSource === "policy_auto" &&
|
|
1694
|
+
const beacon = !isMirrorOnly && decisionSource === "policy_auto" && claimThrottle(`autodecision:${sessionKey}:${lookup.tool}`, AUTO_DECISION_WINDOW_MS) === "passed" ? deriveAutoDecisionBeacon(lookup.tool, lookup.input, liveMode, agent.type, input.cwd, input.session_id) : void 0;
|
|
1692
1695
|
const toolReport = reportEvent({
|
|
1693
1696
|
event: isError ? "tool_error" : "tool_complete",
|
|
1694
1697
|
occurredAt,
|
|
@@ -1704,7 +1707,7 @@ var handlePostToolUse = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
|
1704
1707
|
usage: deriveUsage(input.transcript_path, input.session_id)
|
|
1705
1708
|
}, { maxAttempts: 1, budgetMs: Math.min(DRAINING_REPORT_BUDGET_MS, Math.max(0, deadline - Date.now())), signal });
|
|
1706
1709
|
const extraReports = [];
|
|
1707
|
-
if (
|
|
1710
|
+
if (claimThrottle(`hookactive:${sessionKey}`, HOOK_ACTIVE_WINDOW_MS) === "passed") {
|
|
1708
1711
|
extraReports.push(
|
|
1709
1712
|
reportEvent(
|
|
1710
1713
|
{
|
|
@@ -1898,7 +1901,7 @@ var handleNotification = async (input, agent = CLAUDE_CODE_AGENT) => {
|
|
|
1898
1901
|
}, { maxAttempts: 1, timeoutMs: 2500, signal }).catch(() => {
|
|
1899
1902
|
});
|
|
1900
1903
|
if (!teammateIdle && NOTIFICATION_PUSH_TYPES.has(notifType)) {
|
|
1901
|
-
if (
|
|
1904
|
+
if (claimThrottle(`notify:${sessionKey}:${notifType}`, NOTIFICATION_THROTTLE_MS) !== "passed") return;
|
|
1902
1905
|
let apiKey;
|
|
1903
1906
|
try {
|
|
1904
1907
|
apiKey = getApiKey();
|
|
@@ -1990,7 +1993,8 @@ export {
|
|
|
1990
1993
|
markPendingCommandFailed,
|
|
1991
1994
|
removePendingCommand,
|
|
1992
1995
|
repoKeyFor,
|
|
1993
|
-
|
|
1996
|
+
claimThrottle,
|
|
1997
|
+
releaseThrottle,
|
|
1994
1998
|
readLastUserPrompt,
|
|
1995
1999
|
CODEX_AGENT,
|
|
1996
2000
|
codexAllow,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
supportedClaudeEvents
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LPYCPFBZ.js";
|
|
5
5
|
import {
|
|
6
6
|
guardBinary,
|
|
7
7
|
holdBudgetOf,
|
|
8
8
|
isProtectedByScope,
|
|
9
9
|
registerHookEntry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TRLFZKVG.js";
|
|
11
11
|
import {
|
|
12
12
|
HOOK_LOCATOR_BINARY,
|
|
13
13
|
withHookHoldBudget
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SOUZBGYJ.js";
|
|
15
15
|
|
|
16
16
|
// src/claude-config.ts
|
|
17
17
|
import { join } from "path";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UJBZIKSY.js";
|
|
4
4
|
import {
|
|
5
5
|
degradedLine
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SOUZBGYJ.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"];
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NOTIFICATION_MATCHED_TYPES,
|
|
3
3
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YXP3WPAI.js";
|
|
5
5
|
import {
|
|
6
6
|
isProtectedByScope,
|
|
7
7
|
registerHookEntry
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TRLFZKVG.js";
|
|
9
9
|
import {
|
|
10
10
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
11
11
|
HOOK_BUDGETS,
|
|
12
12
|
HOOK_LOCATOR_BINARY
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SOUZBGYJ.js";
|
|
14
14
|
|
|
15
15
|
// src/gemini-config.ts
|
|
16
16
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F4UWL4NY.js";
|
|
4
4
|
import {
|
|
5
5
|
codexHomeFrom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TRLFZKVG.js";
|
|
7
7
|
import {
|
|
8
8
|
HOOK_COMPATIBLE_PROFILES
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SOUZBGYJ.js";
|
|
10
10
|
|
|
11
11
|
// src/vscode-config.ts
|
|
12
12
|
import { homedir } from "os";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SOUZBGYJ.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;
|
|
@@ -458,6 +458,9 @@ var degradedPayload = (subsystem, report) => ({
|
|
|
458
458
|
});
|
|
459
459
|
var degradedLine = (subsystem, report) => `${DEGRADED_PREFIX} ${JSON.stringify(degradedPayload(subsystem, report))}`;
|
|
460
460
|
|
|
461
|
+
// ../contracts/src/setup-wire.ts
|
|
462
|
+
var PAIR_TTL_SECONDS = 900;
|
|
463
|
+
|
|
461
464
|
// ../contracts/src/index.ts
|
|
462
465
|
var KEY_SCOPES = ["full_access", "agent", "connector", "bound"];
|
|
463
466
|
var normalizeKeyScope = (value) => typeof value === "string" && KEY_SCOPES.includes(value) ? value : null;
|
|
@@ -1228,6 +1231,7 @@ var computeDeltaSignal = (input) => {
|
|
|
1228
1231
|
return { deltaSignal: "match", deltaScore: 0, remoteApprove: !destructive };
|
|
1229
1232
|
};
|
|
1230
1233
|
var SECRET_REDACTION_RULES = [
|
|
1234
|
+
{ pattern: /\bpk_[A-Za-z0-9_]+\.[A-Za-z0-9_]+/g, replacement: "[redacted]" },
|
|
1231
1235
|
{ pattern: /-----BEGIN[A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END[A-Z0-9 ]*PRIVATE KEY-----/g, replacement: "[redacted key]" },
|
|
1232
1236
|
{ pattern: /\bsk-[A-Za-z0-9_-]{16,}\b/g, replacement: "[redacted]" },
|
|
1233
1237
|
{ pattern: /\b[spr]k_(?:live|test)_[A-Za-z0-9]{8,}\b/g, replacement: "[redacted]" },
|
|
@@ -2085,6 +2089,7 @@ export {
|
|
|
2085
2089
|
hookWritePath,
|
|
2086
2090
|
isHookActivationReport,
|
|
2087
2091
|
hookActivationResult,
|
|
2092
|
+
PAIR_TTL_SECONDS,
|
|
2088
2093
|
normalizeKeyScope,
|
|
2089
2094
|
parseAgentQuestion,
|
|
2090
2095
|
parseAgentQuestions,
|