@pushary/agent-hooks 1.9.27 → 1.9.29
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 +11 -0
- package/dist/bin/pushary-bell-hook.js +25 -25
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +26 -25
- package/dist/bin/pushary-clean.js +29 -29
- package/dist/bin/pushary-codex-bridge.js +17 -17
- package/dist/bin/pushary-codex-hook.js +32 -32
- package/dist/bin/pushary-codex.js +12 -12
- package/dist/bin/pushary-connect.js +24 -24
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +32 -32
- package/dist/bin/pushary-disconnect.js +24 -24
- package/dist/bin/pushary-doctor.js +33 -33
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +27 -27
- package/dist/bin/pushary-hook.js +40 -32
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +24 -24
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +12 -12
- package/dist/bin/pushary-notification-hook.js +24 -24
- package/dist/bin/pushary-opencode-hook.js +26 -26
- package/dist/bin/pushary-permission-denied-hook.js +29 -29
- package/dist/bin/pushary-permission-hook.js +28 -28
- package/dist/bin/pushary-post-hook.js +24 -24
- package/dist/bin/pushary-prompt-hook.js +24 -24
- package/dist/bin/pushary-session-end-hook.js +24 -24
- package/dist/bin/pushary-session-start-hook.js +28 -28
- package/dist/bin/pushary-setup.js +35 -35
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +26 -26
- package/dist/bin/pushary-stop-hook.js +24 -24
- package/dist/bin/pushary-stopfailure-hook.js +24 -24
- package/dist/bin/pushary-suggestions.js +12 -12
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +30 -30
- package/dist/bin/pushary-wait.js +12 -12
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-QMMOVPUP.js → chunk-2FOAQ64R.js} +8 -8
- package/dist/{chunk-BZYYTJ65.js → chunk-2XM4TGIM.js} +4 -4
- package/dist/{chunk-W4LNR7LP.js → chunk-35CMXPES.js} +3 -3
- package/dist/{chunk-GORB726L.js → chunk-4DTKE3AS.js} +2 -2
- package/dist/{chunk-UQTQVH5X.js → chunk-5L7H32JK.js} +1 -1
- package/dist/{chunk-WGTD4NZV.js → chunk-62LJB5U3.js} +2 -2
- package/dist/{chunk-O2SMA3JN.js → chunk-7MYGOFVX.js} +4 -4
- package/dist/{chunk-VWTCGKMU.js → chunk-AVQ6ETA7.js} +1 -1
- package/dist/{chunk-LOVDPKUU.js → chunk-AZMHKUUU.js} +1 -1
- package/dist/{chunk-OPSLFAKF.js → chunk-BAVNBGH4.js} +39 -10
- package/dist/{chunk-TQE5VIDJ.js → chunk-BJMVQ6D5.js} +10 -9
- package/dist/{chunk-IOTR2VQN.js → chunk-BKOWTW5P.js} +4 -4
- package/dist/{chunk-5SKHXKIF.js → chunk-BP3WMLXJ.js} +5 -5
- package/dist/{chunk-MTODICDT.js → chunk-BUOLA2AM.js} +1 -1
- package/dist/{chunk-PQAA37YV.js → chunk-C2ZIVQ6W.js} +6 -6
- package/dist/{chunk-YTTPPJZW.js → chunk-CBOHZ6NY.js} +4 -4
- package/dist/{chunk-6CBKIF3S.js → chunk-CCI2UBYR.js} +3 -3
- package/dist/{chunk-TYPQUHIS.js → chunk-CJQEJWLU.js} +5 -5
- package/dist/{chunk-LUJAURFP.js → chunk-CPZZTS4I.js} +1 -1
- package/dist/{chunk-XESMYZLU.js → chunk-DQGM57ZW.js} +1 -1
- package/dist/{chunk-H2ZHGK4F.js → chunk-DUVHHQEL.js} +2 -2
- package/dist/{chunk-V6HQFOBS.js → chunk-EO2GYHWH.js} +3 -3
- package/dist/{chunk-HFGTWPAD.js → chunk-ETLVZHRG.js} +2 -2
- package/dist/{chunk-DY6AKR4W.js → chunk-G4X3Z3YS.js} +4 -4
- package/dist/{chunk-4LIOV4YP.js → chunk-GMVZYB3W.js} +3 -3
- package/dist/{chunk-ZWDXBLEZ.js → chunk-GVIPEBEL.js} +3 -3
- package/dist/{chunk-ZQZRBPTP.js → chunk-H7QTZTIE.js} +68 -10
- package/dist/{chunk-RZNJGCPR.js → chunk-IM73P6JT.js} +5 -5
- package/dist/{chunk-2NQHGDK5.js → chunk-IWPEAA2J.js} +1 -1
- package/dist/{chunk-YZ7D3P3M.js → chunk-JGDBHB6L.js} +2 -2
- package/dist/{chunk-CSXWXXFJ.js → chunk-KMTSU366.js} +1 -1
- package/dist/{chunk-4LO6OQZ4.js → chunk-L7PGUSAU.js} +1 -1
- package/dist/{chunk-5LLH2TBR.js → chunk-LRLF6PZ2.js} +1 -1
- package/dist/{chunk-5ZR7XFTB.js → chunk-LSB66XQC.js} +21 -13
- package/dist/{chunk-NK2URK5A.js → chunk-M2L4EHYW.js} +2 -2
- package/dist/{chunk-JK42X2VL.js → chunk-NRV5PIPA.js} +2 -2
- package/dist/{chunk-VGVMBY4V.js → chunk-OSVDGVLL.js} +18 -9
- package/dist/{chunk-LY3KHTHS.js → chunk-OUWDJIJF.js} +1 -1
- package/dist/{chunk-M463H5LN.js → chunk-PRVG3COH.js} +2 -2
- package/dist/{chunk-OXOT3CGW.js → chunk-PX4RRHEB.js} +4 -4
- package/dist/{chunk-Z5AAPX3O.js → chunk-QOMUEL44.js} +1 -1
- package/dist/{chunk-UWEDDQHU.js → chunk-S3DP6DCZ.js} +2 -2
- package/dist/{chunk-MDAJO2MP.js → chunk-SLKVEJLM.js} +5 -5
- package/dist/{chunk-MSKJRRHY.js → chunk-TILXDMUR.js} +3 -3
- package/dist/{chunk-TWCWRHNK.js → chunk-TJXCBTL4.js} +5 -5
- package/dist/{chunk-XTTMUQ4Z.js → chunk-TXKAPRIA.js} +1 -1
- package/dist/{chunk-KN5ULH4O.js → chunk-UM2HNUJA.js} +3 -3
- package/dist/{chunk-W4DFSUZG.js → chunk-UW37WHVP.js} +2 -2
- package/dist/{chunk-MRMIGVUI.js → chunk-WJUYWTNT.js} +1 -1
- package/dist/{chunk-E4NITECV.js → chunk-WLDFMVRY.js} +2 -2
- package/dist/{chunk-JXOCD4MG.js → chunk-XH7NMH3Q.js} +2 -2
- package/dist/{chunk-AT4URLSU.js → chunk-Y3OZ3CT6.js} +5 -5
- package/dist/{chunk-U4Q3AKLU.js → chunk-YFEHKEGQ.js} +1 -1
- package/dist/{chunk-SLW45RGY.js → chunk-Z2WS466S.js} +17 -16
- package/dist/{global-upgrade-FKQPJL5P.js → global-upgrade-ZPULZXOY.js} +6 -6
- package/dist/{paths-TU47TCRS.js → paths-Y7ZWWCFK.js} +2 -2
- package/dist/{reapply-CTJZBUJY.js → reapply-I4YMQP7F.js} +22 -20
- package/dist/src/index.js +19 -19
- package/dist/{upgrade-lock-2SQCRMDL.js → upgrade-lock-IDAAFSH2.js} +3 -3
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
IDLE_PROMPT_NOTIFICATION,
|
|
3
3
|
NOTIFICATION_PUSH_TYPES,
|
|
4
4
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KMTSU366.js";
|
|
6
6
|
import {
|
|
7
7
|
cancelQuestion,
|
|
8
8
|
clientErrorKindOf,
|
|
@@ -10,29 +10,30 @@ import {
|
|
|
10
10
|
reportClientError,
|
|
11
11
|
sendNotification,
|
|
12
12
|
waitForAnswer
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Y3OZ3CT6.js";
|
|
14
14
|
import {
|
|
15
15
|
withRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GVIPEBEL.js";
|
|
17
17
|
import {
|
|
18
18
|
getMachineId
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YFEHKEGQ.js";
|
|
20
20
|
import {
|
|
21
21
|
reportedInstallSource
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-S3DP6DCZ.js";
|
|
23
23
|
import {
|
|
24
24
|
canonicalJson
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-CBOHZ6NY.js";
|
|
26
26
|
import {
|
|
27
27
|
writeFileAtomic
|
|
28
28
|
} from "./chunk-AQFEP65J.js";
|
|
29
29
|
import {
|
|
30
30
|
getApiKey,
|
|
31
31
|
getBaseUrl
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-TXKAPRIA.js";
|
|
33
33
|
import {
|
|
34
34
|
ACTION_BODY_MAX,
|
|
35
35
|
AGENT_LABELS_BY_TYPE,
|
|
36
|
+
BLANK_TASK_INPUT_TOOL,
|
|
36
37
|
BLOCKED_ACTION_GRANT_TTL_SECONDS,
|
|
37
38
|
DECISION_LINE_MAX,
|
|
38
39
|
FILE_TARGET_TOOLS,
|
|
@@ -42,6 +43,8 @@ import {
|
|
|
42
43
|
NO_RESPONSE_REASON,
|
|
43
44
|
PENDING_COMMAND_PREFIX,
|
|
44
45
|
REPO_AWARE_AGENTS,
|
|
46
|
+
TASK_OUTPUT_TOOL,
|
|
47
|
+
TASK_STOP_TOOL,
|
|
45
48
|
blockedActionIdentity,
|
|
46
49
|
canonicalToolName,
|
|
47
50
|
gateOutputFor,
|
|
@@ -60,7 +63,7 @@ import {
|
|
|
60
63
|
resolvePolicy,
|
|
61
64
|
toToolLookup,
|
|
62
65
|
truncateLine
|
|
63
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-H7QTZTIE.js";
|
|
64
67
|
|
|
65
68
|
// ../hook-mapping/src/describe.ts
|
|
66
69
|
import { isAbsolute, relative, resolve } from "path";
|
|
@@ -80,7 +83,13 @@ var hookPrefixes = {
|
|
|
80
83
|
// fallback prints `Task: done` and `WebSearch: done`, which name the tool and
|
|
81
84
|
// drop the only part a person reads: which subagent, and what it looked for.
|
|
82
85
|
Task: (input) => `subagent: ${describeTaskCall(input)}`,
|
|
83
|
-
WebSearch: (input) => `web search: ${firstString(input.query) ?? "(no query)"}
|
|
86
|
+
WebSearch: (input) => `web search: ${firstString(input.query) ?? "(no query)"}`,
|
|
87
|
+
[TASK_OUTPUT_TOOL]: (input) => {
|
|
88
|
+
const task = firstString(input.task_id);
|
|
89
|
+
return task ? `check background task ${task}` : "list background tasks";
|
|
90
|
+
},
|
|
91
|
+
[TASK_STOP_TOOL]: (input) => `stop background task ${firstString(input.task_id) ?? "(unnamed)"}`,
|
|
92
|
+
[BLANK_TASK_INPUT_TOOL]: (input) => `send blank input, such as Enter, to background task ${firstString(input.task_id) ?? "(unnamed)"}`
|
|
84
93
|
};
|
|
85
94
|
var describeTaskCall = (input) => firstString(input.description) ?? firstString(input.subagent_type) ?? "(unnamed)";
|
|
86
95
|
var describeTodoProgress = (todos) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CBOHZ6NY.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe
|
|
6
6
|
} from "./chunk-AQFEP65J.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-H7QTZTIE.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BJMVQ6D5.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TJXCBTL4.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CBOHZ6NY.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-H7QTZTIE.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
forkFinishWithUpgradeLock,
|
|
5
5
|
installWithUpgradeLock,
|
|
6
6
|
releaseAutoUpdateLock
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DQGM57ZW.js";
|
|
8
8
|
import {
|
|
9
9
|
describeAutoUpdateCheck,
|
|
10
10
|
globalInstallLocation,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
readAutoUpdateState,
|
|
15
15
|
updateAutoUpdateState,
|
|
16
16
|
upgradeEntryFor
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-62LJB5U3.js";
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "./chunk-KZERVKTD.js";
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
npmErrorMessage,
|
|
28
28
|
readGlobalCliInstallAt,
|
|
29
29
|
readGlobalPrefix
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-CBOHZ6NY.js";
|
|
31
31
|
import {
|
|
32
32
|
NPX_LATEST_COMMAND
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-QOMUEL44.js";
|
|
34
34
|
import {
|
|
35
35
|
commandsPackage,
|
|
36
36
|
globalUpgradeEntry,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
isSameMajorVersion,
|
|
40
40
|
ownPackageRoot,
|
|
41
41
|
packageVersionAt
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-H7QTZTIE.js";
|
|
43
43
|
|
|
44
44
|
// src/global-upgrade.ts
|
|
45
45
|
import { existsSync } from "fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-35CMXPES.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-TXKAPRIA.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-H7QTZTIE.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,23 +2,23 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UM2HNUJA.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_CHOICES
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WJUYWTNT.js";
|
|
9
9
|
import {
|
|
10
10
|
BELL_HOOK_BINARY
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BUOLA2AM.js";
|
|
12
12
|
import {
|
|
13
13
|
CODEX_HOOK_EVENTS,
|
|
14
14
|
hasCodexHooks,
|
|
15
15
|
holdBudgetOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CBOHZ6NY.js";
|
|
17
17
|
import {
|
|
18
18
|
CURSOR_GATE_EVENTS,
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
hookCommandHoldBudget
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-H7QTZTIE.js";
|
|
22
22
|
|
|
23
23
|
// src/diagnostics/bridge.ts
|
|
24
24
|
import { execFileSync } from "child_process";
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
NOTIFICATION_MATCHED_TYPES,
|
|
7
7
|
POSTTOOLUSE_MIRRORED_TOOLS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KMTSU366.js";
|
|
9
9
|
import {
|
|
10
10
|
isProtectedByScope,
|
|
11
11
|
registerHookEntry
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CBOHZ6NY.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_PRETOOLUSE_MATCHER,
|
|
15
15
|
HOOK_BUDGETS,
|
|
16
16
|
HOOK_LOCATOR_BINARY
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-H7QTZTIE.js";
|
|
18
18
|
|
|
19
19
|
// src/gemini-config.ts
|
|
20
20
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
decodePublicKey,
|
|
4
4
|
generateSessionKey,
|
|
5
5
|
wrapSessionKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OUWDJIJF.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchTranscriptRecipients,
|
|
9
9
|
uploadTranscriptRecords
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LRLF6PZ2.js";
|
|
11
11
|
|
|
12
12
|
// src/live-session.ts
|
|
13
13
|
var MAX_TRANSCRIPT_QUEUE = 100;
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
permissionDeniedAction,
|
|
7
7
|
releaseThrottle,
|
|
8
8
|
reportEvent
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OSVDGVLL.js";
|
|
10
10
|
import {
|
|
11
11
|
machineDecisionFor,
|
|
12
12
|
shouldDeferToNativeMode,
|
|
13
13
|
wireVerdictFor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-H7QTZTIE.js";
|
|
15
15
|
|
|
16
16
|
// src/machine-decision-audit.ts
|
|
17
17
|
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-QOMUEL44.js";
|
|
7
7
|
import {
|
|
8
8
|
getPackageVersion
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-H7QTZTIE.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/usage.ts
|
|
12
12
|
var exitOnHelpFlag = (command) => {
|
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SubscriptionRequiredError,
|
|
7
7
|
callMcpTool
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GVIPEBEL.js";
|
|
9
9
|
import {
|
|
10
10
|
installNetworkDefaults,
|
|
11
11
|
isNetworkFailure
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-35CMXPES.js";
|
|
13
13
|
import {
|
|
14
14
|
clientReportClaims
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CBOHZ6NY.js";
|
|
16
16
|
import {
|
|
17
17
|
getApiKey,
|
|
18
18
|
getBaseUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-TXKAPRIA.js";
|
|
20
20
|
import {
|
|
21
21
|
ASK_AGENT_NAME_MAX,
|
|
22
22
|
ASK_QUESTION_MAX,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
GATE_PERMISSION_MODE_MAX_LENGTH,
|
|
26
26
|
degradedLine,
|
|
27
27
|
truncateLine
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-H7QTZTIE.js";
|
|
29
29
|
|
|
30
30
|
// src/client-report-claim.ts
|
|
31
31
|
import { createHash } from "crypto";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defersToNativeMode,
|
|
3
3
|
reportMachineDenial
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WLDFMVRY.js";
|
|
5
5
|
import {
|
|
6
6
|
isGatingMoment,
|
|
7
7
|
recordKeylessMoment
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CPZZTS4I.js";
|
|
9
9
|
import {
|
|
10
10
|
announceSubscriptionRequired,
|
|
11
11
|
isDeferAnswer,
|
|
12
12
|
oncePerSession
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AZMHKUUU.js";
|
|
14
14
|
import {
|
|
15
15
|
activeHookSource,
|
|
16
16
|
activeIdentity
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BJMVQ6D5.js";
|
|
18
18
|
import {
|
|
19
19
|
DEFAULT_SESSION,
|
|
20
20
|
UNNAMED_ACTION,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
reportEvent,
|
|
40
40
|
scopePathFor,
|
|
41
41
|
settleQuestionsForToolUse
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-OSVDGVLL.js";
|
|
43
43
|
import {
|
|
44
44
|
askUser,
|
|
45
45
|
cancelQuestion,
|
|
@@ -51,30 +51,32 @@ import {
|
|
|
51
51
|
sendNotification,
|
|
52
52
|
waitForQuestion,
|
|
53
53
|
waitsForThePhone
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-Y3OZ3CT6.js";
|
|
55
55
|
import {
|
|
56
56
|
SubscriptionRequiredError
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-GVIPEBEL.js";
|
|
58
58
|
import {
|
|
59
59
|
getMachineId
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-YFEHKEGQ.js";
|
|
61
61
|
import {
|
|
62
62
|
getApiKey,
|
|
63
63
|
getBaseUrl
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-TXKAPRIA.js";
|
|
65
65
|
import {
|
|
66
66
|
NPX_LATEST_COMMAND
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-QOMUEL44.js";
|
|
68
68
|
import {
|
|
69
69
|
AGENT_QUESTION_STRATEGY,
|
|
70
70
|
DECISION_STOP_REASON,
|
|
71
71
|
GATE_BLOCK_REASON_MAX_LENGTH,
|
|
72
72
|
GATE_WIRE,
|
|
73
|
+
HANDED_BACK_REASON,
|
|
73
74
|
PLAN_DECLINED_REASON,
|
|
74
75
|
SCOPE_BATCH_REASON,
|
|
75
76
|
SOLE_GATE_SIGNED_OUT_REASON,
|
|
76
77
|
SOLE_GATE_SUBSCRIPTION_REASON,
|
|
77
78
|
SOLE_GATE_UNDECIDED_REASON,
|
|
79
|
+
UNREADABLE_CALL_REASON,
|
|
78
80
|
UNVERIFIABLE_APPROVAL_REASON,
|
|
79
81
|
WITHDRAWN_APPROVAL_REASON,
|
|
80
82
|
agentQuestionStrategy,
|
|
@@ -106,7 +108,7 @@ import {
|
|
|
106
108
|
questionHandedToTheTerminal,
|
|
107
109
|
resolveGate,
|
|
108
110
|
timeoutActionWithoutLocalPrompt
|
|
109
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-H7QTZTIE.js";
|
|
110
112
|
|
|
111
113
|
// src/claude-permission-rules.ts
|
|
112
114
|
import { readFileSync, statSync } from "fs";
|
|
@@ -226,7 +228,7 @@ var handlePushOnly = async (apiKey, description, projectName, timeoutSeconds, ti
|
|
|
226
228
|
if (isDecisionStopped(answer)) return halted(DECISION_STOP_REASON);
|
|
227
229
|
if (!answer.answered && isLocalQuestionHandoff(result)) return ask("Approve in the current client.");
|
|
228
230
|
if (answer.answered) {
|
|
229
|
-
if (isDeferAnswer(answer.value)) return ask(
|
|
231
|
+
if (isDeferAnswer(answer.value)) return ask(HANDED_BACK_REASON);
|
|
230
232
|
signals.humanDecision = true;
|
|
231
233
|
return answer.value === "yes" ? allow() : deny(denyReasonFrom(answer.value, answer.note));
|
|
232
234
|
}
|
|
@@ -270,7 +272,7 @@ var handlePushFirst = async (apiKey, description, projectName, pushFirstSeconds,
|
|
|
270
272
|
const answer = await waitForQuestion(apiKey, result, deadline, 1500);
|
|
271
273
|
if (isDecisionStopped(answer)) return halted(DECISION_STOP_REASON);
|
|
272
274
|
if (answer.answered) {
|
|
273
|
-
if (isDeferAnswer(answer.value)) return ask(
|
|
275
|
+
if (isDeferAnswer(answer.value)) return ask(HANDED_BACK_REASON);
|
|
274
276
|
signals.humanDecision = true;
|
|
275
277
|
return answer.value === "yes" ? allow() : deny(denyReasonFrom(answer.value, answer.note));
|
|
276
278
|
}
|
|
@@ -550,7 +552,6 @@ var claudeGateInput = (modeState, config, input, canonical) => {
|
|
|
550
552
|
sessionId: input.session_id
|
|
551
553
|
};
|
|
552
554
|
};
|
|
553
|
-
var unreadableReason = "Pushary could not read every target of this call. Use a supported command or a single-file edit.";
|
|
554
555
|
var BLOCKED_ACTION_GATE_TIMEOUT_MS = 15e3;
|
|
555
556
|
var BLOCKED_ACTION_CLAIM_TIMEOUT_MS = 4e3;
|
|
556
557
|
var BLOCKED_ACTION_ALLOW_REASON = "Approved from Pushary after auto mode blocked it";
|
|
@@ -620,7 +621,7 @@ var handlePreToolUse = async (input, canonical) => {
|
|
|
620
621
|
await reportMachineDenial(input, verdict, ACTIVE_AGENT);
|
|
621
622
|
return deny(verdict.reason);
|
|
622
623
|
}
|
|
623
|
-
if (canonical === null) return deny(
|
|
624
|
+
if (canonical === null) return deny(UNREADABLE_CALL_REASON);
|
|
624
625
|
if (verdict.kind === "gate" && verdict.scopeReason && (canonical?.toolInputs.length ?? 0) > 1) return deny(SCOPE_BATCH_REASON);
|
|
625
626
|
if (agentQuestionStrategy(ACTIVE_SOURCE, "PreToolUse", input.tool_name) === AGENT_QUESTION_STRATEGY.native) return void 0;
|
|
626
627
|
if (input.tool_name === "AskUserQuestion") {
|
|
@@ -686,7 +687,7 @@ var handlePermissionRequest = async (input, canonical) => {
|
|
|
686
687
|
await reportMachineDenial(input, verdict, ACTIVE_AGENT);
|
|
687
688
|
return permReqDeny(verdict.reason);
|
|
688
689
|
}
|
|
689
|
-
if (canonical === null) return permReqDeny(
|
|
690
|
+
if (canonical === null) return permReqDeny(UNREADABLE_CALL_REASON);
|
|
690
691
|
if (agentQuestionStrategy(ACTIVE_SOURCE, "PermissionRequest", input.tool_name) === AGENT_QUESTION_STRATEGY.native) return void 0;
|
|
691
692
|
if (verdict.kind === "gate" && verdict.scopeReason && (canonical?.toolInputs.length ?? 0) > 1) return permReqDeny(SCOPE_BATCH_REASON);
|
|
692
693
|
if (!(verdict.kind === "gate" && verdict.scopeReason) && !claudeAllowlistOwnsCall(gateInput, verdict, input.permission_mode, claudeRules) && isPermissionRequestOwnedByPreToolUse(input.tool_name, input.permission_mode, shouldDeferToNativeMode)) return void 0;
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
readGlobalUpgradeSubject,
|
|
6
6
|
upgradeInstalledPackage,
|
|
7
7
|
withUpgradeLock
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-SLKVEJLM.js";
|
|
9
|
+
import "./chunk-DQGM57ZW.js";
|
|
10
|
+
import "./chunk-62LJB5U3.js";
|
|
11
11
|
import "./chunk-POFBE6ZY.js";
|
|
12
12
|
import "./chunk-KZERVKTD.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-CBOHZ6NY.js";
|
|
14
14
|
import "./chunk-AQFEP65J.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-QOMUEL44.js";
|
|
16
|
+
import "./chunk-H7QTZTIE.js";
|
|
17
17
|
export {
|
|
18
18
|
finishGlobalUpgrade,
|
|
19
19
|
finishUpgradeWithLock,
|
|
@@ -5,39 +5,40 @@ import {
|
|
|
5
5
|
reapplyClaudeForVersion,
|
|
6
6
|
reapplyClaudeSettings,
|
|
7
7
|
reapplyCodexSettings,
|
|
8
|
+
reapplyCompatibleHooks,
|
|
8
9
|
reapplyCursorPlugin,
|
|
9
10
|
reapplyGeminiSettings,
|
|
10
11
|
reapplyOpenCodePlugin,
|
|
11
12
|
reapplyVsCodePlugin,
|
|
12
13
|
repairCodexHolds
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-BAVNBGH4.js";
|
|
15
|
+
import "./chunk-4DTKE3AS.js";
|
|
15
16
|
import "./chunk-RIVNNBEK.js";
|
|
16
17
|
import "./chunk-XHKBHWLX.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-BP3WMLXJ.js";
|
|
19
|
+
import "./chunk-BJMVQ6D5.js";
|
|
20
|
+
import "./chunk-TJXCBTL4.js";
|
|
21
|
+
import "./chunk-UM2HNUJA.js";
|
|
22
|
+
import "./chunk-WJUYWTNT.js";
|
|
23
|
+
import "./chunk-BUOLA2AM.js";
|
|
23
24
|
import "./chunk-GMXKITVA.js";
|
|
24
25
|
import "./chunk-6ICPEJY5.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-OSVDGVLL.js";
|
|
27
|
+
import "./chunk-KMTSU366.js";
|
|
28
|
+
import "./chunk-Y3OZ3CT6.js";
|
|
28
29
|
import "./chunk-POFBE6ZY.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-GVIPEBEL.js";
|
|
31
|
+
import "./chunk-TILXDMUR.js";
|
|
32
|
+
import "./chunk-35CMXPES.js";
|
|
33
|
+
import "./chunk-YFEHKEGQ.js";
|
|
33
34
|
import "./chunk-7QLSKOSU.js";
|
|
34
35
|
import "./chunk-KZERVKTD.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-S3DP6DCZ.js";
|
|
37
|
+
import "./chunk-CBOHZ6NY.js";
|
|
37
38
|
import "./chunk-AQFEP65J.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-TXKAPRIA.js";
|
|
40
|
+
import "./chunk-QOMUEL44.js";
|
|
41
|
+
import "./chunk-H7QTZTIE.js";
|
|
41
42
|
export {
|
|
42
43
|
ensureCodexTrustAfterReapply,
|
|
43
44
|
inspectConfiguredManagedProviders,
|
|
@@ -45,6 +46,7 @@ export {
|
|
|
45
46
|
reapplyClaudeForVersion,
|
|
46
47
|
reapplyClaudeSettings,
|
|
47
48
|
reapplyCodexSettings,
|
|
49
|
+
reapplyCompatibleHooks,
|
|
48
50
|
reapplyCursorPlugin,
|
|
49
51
|
reapplyGeminiSettings,
|
|
50
52
|
reapplyOpenCodePlugin,
|
package/dist/src/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handlePreToolUse
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-Z2WS466S.js";
|
|
4
|
+
import "../chunk-WLDFMVRY.js";
|
|
5
|
+
import "../chunk-CPZZTS4I.js";
|
|
6
|
+
import "../chunk-AZMHKUUU.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchAccountPublicKey
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-LRLF6PZ2.js";
|
|
10
|
+
import "../chunk-BJMVQ6D5.js";
|
|
11
|
+
import "../chunk-UM2HNUJA.js";
|
|
12
12
|
import "../chunk-6ICPEJY5.js";
|
|
13
13
|
import {
|
|
14
14
|
fetchModeOverride,
|
|
@@ -18,31 +18,31 @@ import {
|
|
|
18
18
|
handlePostToolUse,
|
|
19
19
|
handleStop,
|
|
20
20
|
reportEvent
|
|
21
|
-
} from "../chunk-
|
|
22
|
-
import "../chunk-
|
|
21
|
+
} from "../chunk-OSVDGVLL.js";
|
|
22
|
+
import "../chunk-KMTSU366.js";
|
|
23
23
|
import {
|
|
24
24
|
askUser,
|
|
25
25
|
cancelQuestion,
|
|
26
26
|
waitForAnswer
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-Y3OZ3CT6.js";
|
|
28
28
|
import "../chunk-POFBE6ZY.js";
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-GVIPEBEL.js";
|
|
30
|
+
import "../chunk-TILXDMUR.js";
|
|
31
|
+
import "../chunk-35CMXPES.js";
|
|
32
|
+
import "../chunk-YFEHKEGQ.js";
|
|
33
33
|
import "../chunk-7QLSKOSU.js";
|
|
34
34
|
import "../chunk-KZERVKTD.js";
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
35
|
+
import "../chunk-S3DP6DCZ.js";
|
|
36
|
+
import "../chunk-CBOHZ6NY.js";
|
|
37
37
|
import "../chunk-AQFEP65J.js";
|
|
38
38
|
import {
|
|
39
39
|
getApiKey,
|
|
40
40
|
getBaseUrl
|
|
41
|
-
} from "../chunk-
|
|
42
|
-
import "../chunk-
|
|
41
|
+
} from "../chunk-TXKAPRIA.js";
|
|
42
|
+
import "../chunk-QOMUEL44.js";
|
|
43
43
|
import {
|
|
44
44
|
resolvePolicy
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-H7QTZTIE.js";
|
|
46
46
|
export {
|
|
47
47
|
askUser,
|
|
48
48
|
cancelQuestion,
|