@pushary/agent-hooks 1.9.58 → 1.9.60
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 +14 -0
- package/data/cursor-plugin/.cursor-plugin/plugin.json +5 -1
- package/data/cursor-plugin/CHANGELOG.md +4 -0
- package/dist/{api-WVXBM4MR.js → api-ASQA5PZM.js} +11 -11
- package/dist/bin/pushary-bell-hook.js +29 -29
- package/dist/bin/pushary-bell.js +12 -12
- package/dist/bin/pushary-claude.js +31 -30
- package/dist/bin/pushary-clean.js +58 -53
- package/dist/bin/pushary-codex-bridge.js +22 -22
- package/dist/bin/pushary-codex-hook.js +34 -34
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +15 -15
- package/dist/bin/pushary-connect.js +29 -29
- package/dist/bin/pushary-cowork.js +7 -7
- package/dist/bin/pushary-daemon.js +39 -39
- package/dist/bin/pushary-disconnect.js +42 -29
- package/dist/bin/pushary-doctor.js +51 -47
- package/dist/bin/pushary-elicitation-hook.js +29 -29
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +31 -31
- package/dist/bin/pushary-hook.js +33 -33
- package/dist/bin/pushary-login.js +22 -19
- package/dist/bin/pushary-logout.js +36 -31
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +41 -55
- package/dist/bin/pushary-notification-hook.js +28 -28
- package/dist/bin/pushary-opencode-hook.js +30 -30
- package/dist/bin/pushary-permission-denied-hook.js +33 -33
- package/dist/bin/pushary-permission-hook.js +32 -32
- 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 +35 -35
- package/dist/bin/pushary-setup.js +49 -46
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +41 -36
- package/dist/bin/pushary-stop-hook.js +28 -28
- package/dist/bin/pushary-stopfailure-hook.js +28 -28
- package/dist/bin/pushary-suggestions.js +33 -39
- package/dist/bin/pushary-transcript-register.js +20 -20
- package/dist/bin/pushary-transcripts.js +33 -20
- package/dist/bin/pushary-upgrade.js +71 -50
- package/dist/bin/pushary-wait.js +36 -42
- package/dist/bin/pushary.js +8 -8
- package/dist/{chunk-JSQOHMNJ.js → chunk-2AELPDMT.js} +1 -1
- package/dist/{chunk-WVP6UQG3.js → chunk-2QREHU4O.js} +11 -4
- package/dist/{chunk-QTCFEKLJ.js → chunk-33OOEVPG.js} +1 -1
- package/dist/{chunk-QDFLBTUP.js → chunk-4MUFZU2G.js} +1 -1
- package/dist/{chunk-5DZHKNBU.js → chunk-4MWRR5IT.js} +8 -7
- package/dist/{chunk-XEJV3QSS.js → chunk-4PZXI7WU.js} +3 -3
- package/dist/{chunk-UMVVQXAC.js → chunk-56JCQQLS.js} +2 -2
- package/dist/{chunk-JZKEC4XJ.js → chunk-5RU35K57.js} +3 -12
- package/dist/{chunk-HRHAZ3GE.js → chunk-625DZLT5.js} +6 -6
- package/dist/{chunk-3KOPY2UQ.js → chunk-6LOQE4J4.js} +3 -3
- package/dist/{chunk-K5CAURU5.js → chunk-6MC2XXFD.js} +4 -4
- package/dist/{chunk-MYBCXDIL.js → chunk-6MJWYYAS.js} +62 -49
- package/dist/chunk-7BHI3PZN.js +41 -0
- package/dist/{chunk-C3IWX6KU.js → chunk-7JXJJNQ5.js} +1 -1
- package/dist/{chunk-CK5BCFQF.js → chunk-7WFRY6OL.js} +2 -2
- package/dist/{chunk-4YNNAF53.js → chunk-ADR3KHOC.js} +2 -2
- package/dist/{chunk-XTZHUIGJ.js → chunk-ATKN4BJT.js} +1 -1
- package/dist/{chunk-GZL3KEPC.js → chunk-AXJLJJ3M.js} +147 -136
- package/dist/{chunk-LVDC3RUE.js → chunk-BG4Y64FW.js} +1 -1
- package/dist/{chunk-KSVCCSAO.js → chunk-CDQHQAS7.js} +9 -7
- package/dist/{chunk-TN74MUMB.js → chunk-CEQ2AZH4.js} +13 -13
- package/dist/{chunk-X6F4BQEE.js → chunk-CSOROFJY.js} +5 -5
- package/dist/{chunk-CZULJ647.js → chunk-DJ7EZIQA.js} +3 -3
- package/dist/{chunk-IUOUNRLH.js → chunk-ELLJPP6O.js} +2 -2
- package/dist/{chunk-5SFM6XB4.js → chunk-ERK24P76.js} +12 -2
- package/dist/{chunk-DQ565WFA.js → chunk-EZHY65QA.js} +21 -11
- package/dist/{chunk-4LUPZ347.js → chunk-FDWMG6NY.js} +2 -2
- package/dist/{chunk-S5LX25XE.js → chunk-FUZ5VYWD.js} +1 -1
- package/dist/{chunk-N3NSWWNU.js → chunk-GAMVAORR.js} +1 -1
- package/dist/{chunk-QP3XPS5U.js → chunk-HC3FHDKB.js} +6 -6
- package/dist/{chunk-ATUZX4K7.js → chunk-IF26ZGZ7.js} +3 -3
- package/dist/{chunk-CSQJCXPX.js → chunk-J4KQL7YZ.js} +5 -5
- package/dist/{chunk-M7NX25ZA.js → chunk-K4MBKXAE.js} +1 -1
- package/dist/{chunk-PZOFPAPG.js → chunk-L3AFVFGQ.js} +2 -2
- package/dist/{chunk-S54YLXWW.js → chunk-METMK3L4.js} +4 -4
- package/dist/{chunk-ZEHUWE3X.js → chunk-MUNL23WE.js} +6 -6
- package/dist/{chunk-3TJLPABQ.js → chunk-NKLNU577.js} +5 -5
- package/dist/{chunk-GMXKITVA.js → chunk-NMUI3ZWG.js} +1 -1
- package/dist/{chunk-IJ6XKKQW.js → chunk-O6IUZGWV.js} +1 -1
- package/dist/chunk-PPY5N2E6.js +58 -0
- package/dist/{chunk-XWY4UW62.js → chunk-PUHP4IBA.js} +4 -4
- package/dist/{chunk-T2AC5VFQ.js → chunk-QGSHV3WO.js} +5 -5
- package/dist/{chunk-RGQEULXD.js → chunk-QLMOU57V.js} +28 -17
- package/dist/{chunk-FAGDOPQI.js → chunk-QUBIEZXC.js} +3 -3
- package/dist/{chunk-XFUKCBPU.js → chunk-RLVJ6TVL.js} +23 -23
- package/dist/{chunk-VPZ5K72D.js → chunk-RPPXQNIA.js} +1 -1
- package/dist/{chunk-MCHOBQHE.js → chunk-S54C6TQC.js} +7 -6
- package/dist/{chunk-ZL3UR6M5.js → chunk-SEILUNWB.js} +3 -3
- package/dist/{chunk-4JJ3T7IE.js → chunk-SOCJ2N3E.js} +6 -6
- package/dist/{chunk-JYXIARGW.js → chunk-SVQWHV65.js} +1 -1
- package/dist/{chunk-T2BEIPK2.js → chunk-U7NR4JVD.js} +4 -4
- package/dist/{chunk-LVWXRXT7.js → chunk-USE5IEEW.js} +1 -1
- package/dist/{chunk-OHD35NPC.js → chunk-V57XLKZL.js} +2 -2
- package/dist/{chunk-KIH5BDH5.js → chunk-VIJIG5YL.js} +2 -2
- package/dist/{chunk-RF74KBF5.js → chunk-W2IVTHIG.js} +9 -9
- package/dist/{chunk-WXZN5CS3.js → chunk-WFSGCFXQ.js} +2 -2
- package/dist/{chunk-IRZ5FVWG.js → chunk-WN3RACVD.js} +3 -3
- package/dist/{chunk-3WNOO7BM.js → chunk-WXPVVXBU.js} +4 -4
- package/dist/{chunk-HUWLEVL2.js → chunk-WXZHQ3TT.js} +5 -5
- package/dist/chunk-X3YKQJCZ.js +36 -0
- package/dist/{chunk-I43PY5G3.js → chunk-XEJOPVCG.js} +1 -1
- package/dist/{chunk-ECJJKDP7.js → chunk-XV6S5PWW.js} +3 -3
- package/dist/{chunk-ZJNU32VE.js → chunk-Y5V4PA2Z.js} +155 -37
- package/dist/{chunk-7RZO6VWD.js → chunk-Y5VKZNFN.js} +2 -2
- package/dist/{chunk-VLJ5C6IT.js → chunk-YGE6ML3O.js} +4 -4
- package/dist/{chunk-XXNT4FGA.js → chunk-YPD3MTFU.js} +1 -1
- package/dist/{chunk-KW6EYFZV.js → chunk-ZGOJLNKS.js} +4 -4
- package/dist/{codex-app-cards-switch-TVKXJWXE.js → codex-app-cards-switch-ZO76D2NY.js} +11 -11
- package/dist/{codex-desktop-launch-ROTJEEGF.js → codex-desktop-launch-MJT5E3O3.js} +1 -1
- package/dist/{codex-session-launch-VL6ZQA3N.js → codex-session-launch-PTFCVIC7.js} +19 -19
- package/dist/{config-SYLUYZQE.js → config-SXV6XNVU.js} +3 -3
- package/dist/{global-upgrade-IPWV5PTM.js → global-upgrade-ETDP32LO.js} +9 -9
- package/dist/{identity-ARPAUNGN.js → identity-OOLIOSMR.js} +4 -4
- package/dist/{live-capabilities-EWTRY2HA.js → live-capabilities-2XIFA7YO.js} +4 -4
- package/dist/{paths-IZTNMJAQ.js → paths-IIOQZESZ.js} +3 -3
- package/dist/{reapply-ILKOYYKA.js → reapply-KFAJSKOQ.js} +28 -28
- package/dist/src/index.js +22 -22
- package/dist/{upgrade-lock-ML73QXIG.js → upgrade-lock-T6ILR644.js} +4 -4
- package/dist/{usage-OUV76AIY.js → usage-6TN7FVWS.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-7QLSKOSU.js +0 -19
- package/dist/chunk-EO23EUOK.js +0 -14
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WN3RACVD.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-O6IUZGWV.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6MJWYYAS.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveGlobalBinary
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2QREHU4O.js";
|
|
17
17
|
import {
|
|
18
18
|
readJsonSafe,
|
|
19
19
|
writeFileAtomic,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./chunk-QENTGE75.js";
|
|
23
23
|
import {
|
|
24
24
|
getApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-BG4Y64FW.js";
|
|
26
26
|
import {
|
|
27
27
|
CLI_PACKAGE_NAMES,
|
|
28
28
|
cmdShimTarget,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "./chunk-QTOLNRET.js";
|
|
33
33
|
import {
|
|
34
34
|
isRecord
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
36
36
|
|
|
37
37
|
// src/daemon-lifecycle.ts
|
|
38
38
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
NOTIFICATION_MATCHED_TYPES,
|
|
7
7
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-33OOEVPG.js";
|
|
9
9
|
import {
|
|
10
10
|
isProtectedByScope,
|
|
11
11
|
registerHookEntry
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6MJWYYAS.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
15
15
|
HOOK_BUDGETS,
|
|
16
16
|
HOOK_LOCATOR_BINARY
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
18
18
|
|
|
19
19
|
// src/gemini-config.ts
|
|
20
20
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6LOQE4J4.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-HC3FHDKB.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WN3RACVD.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-O6IUZGWV.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BG4Y64FW.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
26
|
} from "./chunk-QTOLNRET.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6MJWYYAS.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe,
|
|
6
6
|
writeFileAtomic
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
serializeDeclinedAgents,
|
|
14
14
|
withDeclinedAgent,
|
|
15
15
|
withoutDeclinedAgent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4MWRR5IT.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PPY5N2E6.js";
|
|
7
7
|
import {
|
|
8
8
|
EXIT
|
|
9
9
|
} from "./chunk-KZERVKTD.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BG4Y64FW.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-AXJLJJ3M.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;
|
|
@@ -4,30 +4,30 @@ import {
|
|
|
4
4
|
postLiveSession,
|
|
5
5
|
postLiveSessionUntilAccepted,
|
|
6
6
|
startLiveSessionHeartbeat
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ELLJPP6O.js";
|
|
8
8
|
import {
|
|
9
9
|
SESSION_IDLE_TIMEOUT_MS,
|
|
10
10
|
describeIdleWindow,
|
|
11
11
|
idleDeadlinePassed,
|
|
12
12
|
startProcessOwnership
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7WFRY6OL.js";
|
|
14
14
|
import {
|
|
15
15
|
spawnClaude
|
|
16
16
|
} from "./chunk-XHKBHWLX.js";
|
|
17
17
|
import {
|
|
18
18
|
repoKeyFor
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YPD3MTFU.js";
|
|
20
20
|
import {
|
|
21
21
|
isAskUserResponse,
|
|
22
22
|
isDecisionStopped,
|
|
23
23
|
isWaitForAnswerResponse,
|
|
24
24
|
withdrawQuestion,
|
|
25
25
|
writeDegraded
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-EZHY65QA.js";
|
|
27
27
|
import {
|
|
28
28
|
callMcpTool,
|
|
29
29
|
isRetryable
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-SEILUNWB.js";
|
|
31
31
|
import {
|
|
32
32
|
AGENT_QUESTION_DESCRIPTION_MAX,
|
|
33
33
|
AGENT_QUESTION_HEADER_MAX,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
parseCodexQuestions,
|
|
49
49
|
planElicitationAsk,
|
|
50
50
|
readElicitationFields
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
52
52
|
|
|
53
53
|
// src/codex-question-owner.ts
|
|
54
54
|
import { createHash } from "crypto";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XV6S5PWW.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NMUI3ZWG.js";
|
|
7
7
|
import {
|
|
8
8
|
UsageError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PPY5N2E6.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ERK24P76.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_CONNECTOR_GUIDE,
|
|
15
15
|
CLAUDE_CONNECTOR_STEPS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
CLAUDE_CONNECTOR_URL,
|
|
18
18
|
COWORK_CONNECTOR_LIMIT,
|
|
19
19
|
COWORK_STANDING_INSTRUCTIONS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EXIT
|
|
3
|
+
} from "./chunk-KZERVKTD.js";
|
|
4
|
+
|
|
5
|
+
// src/cli/errors.ts
|
|
6
|
+
var UsageError = class extends Error {
|
|
7
|
+
constructor(hint) {
|
|
8
|
+
super(hint);
|
|
9
|
+
this.hint = hint;
|
|
10
|
+
this.name = "UsageError";
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
var UserError = class extends Error {
|
|
14
|
+
constructor(message, next = [], code = EXIT.FAILED) {
|
|
15
|
+
super(message);
|
|
16
|
+
this.next = next;
|
|
17
|
+
this.code = code;
|
|
18
|
+
this.name = "UserError";
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var NetworkError = class extends Error {
|
|
22
|
+
constructor(message) {
|
|
23
|
+
super(message);
|
|
24
|
+
this.name = "NetworkError";
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
var AuthError = class extends Error {
|
|
28
|
+
constructor(message) {
|
|
29
|
+
super(message);
|
|
30
|
+
this.name = "AuthError";
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var InputRequiredError = class extends Error {
|
|
34
|
+
constructor(message, flag) {
|
|
35
|
+
super(message);
|
|
36
|
+
this.flag = flag;
|
|
37
|
+
this.name = "InputRequiredError";
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
var exitCodeFor = (err) => {
|
|
41
|
+
if (err instanceof UsageError) return EXIT.USAGE;
|
|
42
|
+
if (err instanceof InputRequiredError) return EXIT.INPUT_REQUIRED;
|
|
43
|
+
if (err instanceof AuthError) return EXIT.UNAUTHENTICATED;
|
|
44
|
+
if (err instanceof NetworkError) return EXIT.UNREACHABLE;
|
|
45
|
+
if (err instanceof UserError) return err.code;
|
|
46
|
+
return EXIT.FAILED;
|
|
47
|
+
};
|
|
48
|
+
var messageFor = (err) => {
|
|
49
|
+
if (err instanceof Error) return err.message;
|
|
50
|
+
return String(err);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export {
|
|
54
|
+
UsageError,
|
|
55
|
+
NetworkError,
|
|
56
|
+
exitCodeFor,
|
|
57
|
+
messageFor
|
|
58
|
+
};
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
addGeminiMcpServer,
|
|
4
4
|
removeGeminiMcpServer,
|
|
5
5
|
supportedClaudeEvents
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IF26ZGZ7.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_CODE_AGENT,
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-W2IVTHIG.js";
|
|
11
11
|
import {
|
|
12
12
|
guardBinary,
|
|
13
13
|
guardBinaryRefusing,
|
|
14
14
|
holdBudgetOf,
|
|
15
15
|
isProtectedByScope,
|
|
16
16
|
registerHookEntry
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6MJWYYAS.js";
|
|
18
18
|
import {
|
|
19
19
|
HOOK_COMPATIBLE_PROFILES,
|
|
20
20
|
HOOK_LOCATOR_BINARY,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
pusharyMissingReason,
|
|
27
27
|
refusalOutput,
|
|
28
28
|
withHookHoldBudget
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
30
30
|
|
|
31
31
|
// src/claude-config.ts
|
|
32
32
|
import { join } from "path";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PUHP4IBA.js";
|
|
4
4
|
import {
|
|
5
5
|
hookOwnerOf,
|
|
6
6
|
hookOwnerOfCommands,
|
|
7
7
|
liveBridgeProbe,
|
|
8
8
|
resolveBridgeStub
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CDQHQAS7.js";
|
|
10
10
|
import {
|
|
11
11
|
AGENT_CHOICES
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XV6S5PWW.js";
|
|
13
13
|
import {
|
|
14
14
|
claudeSettings,
|
|
15
15
|
codexHooksJson,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
guardedArgv,
|
|
19
19
|
pusharyDir,
|
|
20
20
|
vscodePluginDir
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6MJWYYAS.js";
|
|
22
22
|
import {
|
|
23
23
|
readJsonSafe
|
|
24
24
|
} from "./chunk-QENTGE75.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
OPENCODE_APPROVAL_EVENT,
|
|
30
30
|
hookCompatibleProfile,
|
|
31
31
|
isRecord
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
33
33
|
|
|
34
34
|
// src/opencode-plugin.ts
|
|
35
35
|
var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
outcomeOfFailedAsk,
|
|
5
5
|
reportMachineDenial,
|
|
6
6
|
storedWaitDeadline
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-625DZLT5.js";
|
|
8
8
|
import {
|
|
9
9
|
isGatingMoment,
|
|
10
10
|
recordKeylessMoment
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SVQWHV65.js";
|
|
12
12
|
import {
|
|
13
13
|
isDeferAnswer,
|
|
14
14
|
oncePerSession
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RPPXQNIA.js";
|
|
16
16
|
import {
|
|
17
17
|
activeHookSource,
|
|
18
18
|
activeIdentity
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-PUHP4IBA.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_SESSION,
|
|
22
22
|
UNNAMED_ACTION,
|
|
@@ -40,33 +40,38 @@ import {
|
|
|
40
40
|
reportEvent,
|
|
41
41
|
scopePathFor,
|
|
42
42
|
settleQuestionsForToolUse
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-W2IVTHIG.js";
|
|
44
44
|
import {
|
|
45
45
|
repoKeyFor
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-YPD3MTFU.js";
|
|
47
47
|
import {
|
|
48
48
|
askUser,
|
|
49
49
|
cancelQuestion,
|
|
50
50
|
claimBlockedAction,
|
|
51
|
+
clientErrorKindOf,
|
|
51
52
|
isAwayPaused,
|
|
52
53
|
isDecisionStopped,
|
|
53
54
|
isLocalQuestionHandoff,
|
|
54
55
|
pollForAnswer,
|
|
56
|
+
reportClientError,
|
|
55
57
|
requestGate,
|
|
56
58
|
sendNotification,
|
|
57
59
|
waitForQuestion,
|
|
58
60
|
waitsForThePhone
|
|
59
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-EZHY65QA.js";
|
|
60
62
|
import {
|
|
61
63
|
getMachineId
|
|
62
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-O6IUZGWV.js";
|
|
65
|
+
import {
|
|
66
|
+
claudeConfigDir
|
|
67
|
+
} from "./chunk-6MJWYYAS.js";
|
|
63
68
|
import {
|
|
64
69
|
getApiKey,
|
|
65
70
|
getBaseUrl
|
|
66
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-BG4Y64FW.js";
|
|
67
72
|
import {
|
|
68
73
|
NPX_LATEST_COMMAND
|
|
69
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-ERK24P76.js";
|
|
70
75
|
import {
|
|
71
76
|
AGENT_QUESTION_STRATEGY,
|
|
72
77
|
AGENT_QUESTION_TOOL,
|
|
@@ -111,7 +116,7 @@ import {
|
|
|
111
116
|
resolveGate,
|
|
112
117
|
timeoutActionWithoutLocalPrompt,
|
|
113
118
|
unansweredRefusalReason
|
|
114
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-AXJLJJ3M.js";
|
|
115
120
|
|
|
116
121
|
// src/claude-permission-rules.ts
|
|
117
122
|
import { readFileSync, statSync } from "fs";
|
|
@@ -124,7 +129,7 @@ var MANAGED_CLAUDE_SETTINGS_BY_PLATFORM = {
|
|
|
124
129
|
};
|
|
125
130
|
var MAX_CLAUDE_SETTINGS_BYTES = 1048576;
|
|
126
131
|
var claudeSettingsLocationFor = (cwd, environment = process.env, home = homedir(), platform = process.platform) => ({
|
|
127
|
-
configDir:
|
|
132
|
+
configDir: claudeConfigDir(home, environment),
|
|
128
133
|
projectDir: environment.CLAUDE_PROJECT_DIR || cwd || void 0,
|
|
129
134
|
managedSettingsPath: MANAGED_CLAUDE_SETTINGS_BY_PLATFORM[platform]
|
|
130
135
|
});
|
|
@@ -528,6 +533,10 @@ var remindedOfApprovedRetry = (input) => {
|
|
|
528
533
|
markApprovalReminded(approval);
|
|
529
534
|
return true;
|
|
530
535
|
};
|
|
536
|
+
var reportHookFailure = async (code, error) => {
|
|
537
|
+
console.error(`[Pushary] ${code}: could not complete the approval check; keeping the agent's existing fallback.`);
|
|
538
|
+
await reportClientError({ kind: clientErrorKindOf(error), code });
|
|
539
|
+
};
|
|
531
540
|
var handlePreToolUse = async (input, canonical) => {
|
|
532
541
|
if (isPusharyOwnTool(input.tool_name)) return void 0;
|
|
533
542
|
let apiKey;
|
|
@@ -554,10 +563,10 @@ var handlePreToolUse = async (input, canonical) => {
|
|
|
554
563
|
if (verdict.kind === "gate" && verdict.scopeReason && (canonical?.toolInputs.length ?? 0) > 1) return deny(SCOPE_BATCH_REASON);
|
|
555
564
|
if (agentQuestionStrategy(ACTIVE_SOURCE, "PreToolUse", input.tool_name) === AGENT_QUESTION_STRATEGY.native) return void 0;
|
|
556
565
|
if (input.tool_name === "AskUserQuestion") {
|
|
557
|
-
return handleAskUserQuestion(apiKey, input, modeState);
|
|
566
|
+
return await handleAskUserQuestion(apiKey, input, modeState);
|
|
558
567
|
}
|
|
559
568
|
if (input.tool_name === "ExitPlanMode") {
|
|
560
|
-
return handleExitPlanMode(apiKey, input);
|
|
569
|
+
return await handleExitPlanMode(apiKey, input);
|
|
561
570
|
}
|
|
562
571
|
if (await claimedBlockedActionRetry(apiKey, input)) return allow(BLOCKED_ACTION_ALLOW_REASON);
|
|
563
572
|
if (remindedOfApprovedRetry(input)) return deny(BLOCKED_ACTION_CHANGED_RETRY_REASON);
|
|
@@ -577,9 +586,10 @@ var handlePreToolUse = async (input, canonical) => {
|
|
|
577
586
|
case "defer":
|
|
578
587
|
return undecidedCall(SOLE_GATE_UNDECIDED_REASON);
|
|
579
588
|
default:
|
|
580
|
-
return dispatchModeHandler(apiKey, input, verdict.policy, getMachineId(), modeState.trainingConsent, verdict.scopeReason, verdict.scopePath);
|
|
589
|
+
return await dispatchModeHandler(apiKey, input, verdict.policy, getMachineId(), modeState.trainingConsent, verdict.scopeReason, verdict.scopePath);
|
|
581
590
|
}
|
|
582
|
-
} catch {
|
|
591
|
+
} catch (error) {
|
|
592
|
+
await reportHookFailure("pre_tool_use_failed", error);
|
|
583
593
|
return undecidedCall(SOLE_GATE_UNDECIDED_REASON);
|
|
584
594
|
}
|
|
585
595
|
};
|
|
@@ -631,7 +641,8 @@ var handlePermissionRequest = async (input, canonical) => {
|
|
|
631
641
|
await dispatchModeHandler(apiKey, input, verdict.policy, getMachineId(), modeState.trainingConsent, verdict.scopeReason, verdict.scopePath)
|
|
632
642
|
);
|
|
633
643
|
}
|
|
634
|
-
} catch {
|
|
644
|
+
} catch (error) {
|
|
645
|
+
await reportHookFailure("permission_request_failed", error);
|
|
635
646
|
return void 0;
|
|
636
647
|
}
|
|
637
648
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
notificationAnswerStep
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DJ7EZIQA.js";
|
|
4
4
|
import {
|
|
5
5
|
matchMacAccountStep,
|
|
6
6
|
retryAgentCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WXZHQ3TT.js";
|
|
8
8
|
import {
|
|
9
9
|
EXIT
|
|
10
10
|
} from "./chunk-KZERVKTD.js";
|
|
11
11
|
import {
|
|
12
12
|
NPX_LATEST_COMMAND
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ERK24P76.js";
|
|
14
14
|
|
|
15
15
|
// src/setup/closing.ts
|
|
16
16
|
var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
|