@pushary/agent-hooks 1.9.14 → 1.9.15
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/dist/bin/pushary-bell-hook.js +25 -25
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +24 -24
- package/dist/bin/pushary-clean.js +28 -28
- package/dist/bin/pushary-codex-bridge.js +17 -17
- package/dist/bin/pushary-codex-hook.js +72 -48
- 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 +31 -31
- 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 +29 -29
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +10 -10
- 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-Y6IKUCVF.js → chunk-2DCGUCPZ.js} +2 -2
- package/dist/{chunk-EB6LH3U6.js → chunk-3FQCZSEQ.js} +3 -3
- package/dist/{chunk-J5RQW52I.js → chunk-3QXCTYMG.js} +2 -2
- package/dist/{chunk-CT4BJEU7.js → chunk-3YCYTGGK.js} +1 -1
- package/dist/{chunk-VYXXAFIA.js → chunk-52JA2WTH.js} +1 -1
- package/dist/{chunk-LETLRKSY.js → chunk-57VUNV32.js} +1 -1
- package/dist/{chunk-3KHQWC4F.js → chunk-5BIMNGRQ.js} +6 -6
- package/dist/{chunk-NMDGIMDV.js → chunk-5EWNGYFD.js} +2 -2
- package/dist/{chunk-5UYAJVAQ.js → chunk-5LQ7QUVF.js} +1 -1
- package/dist/{chunk-ARM4DMIL.js → chunk-6GRUERVL.js} +1 -1
- package/dist/{chunk-2Q6IT5PR.js → chunk-6LORREOI.js} +1 -1
- package/dist/{chunk-2Z56BRTF.js → chunk-6MLSXBNR.js} +2 -2
- package/dist/{chunk-H7MTFFNI.js → chunk-6WECKO24.js} +4 -4
- package/dist/{chunk-XJKM6NQS.js → chunk-7QZZK2YU.js} +6 -6
- package/dist/{chunk-NXJNYAP7.js → chunk-7VOEZPJ4.js} +1 -1
- package/dist/{chunk-NAROM5IR.js → chunk-AYV2NRYJ.js} +93 -2
- package/dist/{chunk-NNCK2PUR.js → chunk-C2OUUGCW.js} +2 -2
- package/dist/{chunk-42WYKVHL.js → chunk-COZE23R3.js} +2 -2
- package/dist/{chunk-34PUBGLS.js → chunk-CU7Y7Y4L.js} +2 -2
- package/dist/{chunk-2QASSTM5.js → chunk-D72OJS4S.js} +2 -2
- package/dist/{chunk-SEQSZYLW.js → chunk-FZW7Q7GM.js} +5 -5
- package/dist/{chunk-Q7JWY33N.js → chunk-H5YC7H6V.js} +3 -3
- package/dist/{chunk-2WWHZTI5.js → chunk-HJL5RBOU.js} +4 -4
- package/dist/{chunk-7MGNY7S3.js → chunk-HSVJ62BE.js} +1 -1
- package/dist/{chunk-AJRT3JGE.js → chunk-HTO2XULO.js} +1 -1
- package/dist/{chunk-WYPQKDKX.js → chunk-IQCNOEQL.js} +13 -18
- package/dist/{chunk-ECU2Y7D2.js → chunk-JC3AGMOP.js} +2 -2
- package/dist/{chunk-LRZMGU7T.js → chunk-JEJSAI6Z.js} +4 -4
- package/dist/{chunk-YSVCBUT3.js → chunk-LJJWNHUW.js} +2 -2
- package/dist/{chunk-POJUUEGO.js → chunk-ME55HQOI.js} +4 -4
- package/dist/{chunk-ZVFKNSRX.js → chunk-NA5D62OI.js} +1 -1
- package/dist/{chunk-5RONPCMH.js → chunk-NDKFHLJI.js} +5 -5
- package/dist/{chunk-4BXVGCPE.js → chunk-NDZBDXU3.js} +4 -4
- package/dist/{chunk-OMR3P7PJ.js → chunk-OIESPH3R.js} +14 -14
- package/dist/{chunk-FKQMH2DW.js → chunk-PNUWMEIY.js} +1 -1
- package/dist/{chunk-3U4R475X.js → chunk-PSWFYNOX.js} +3 -3
- package/dist/{chunk-QD6GQDYW.js → chunk-Q4JD6WNB.js} +1 -1
- package/dist/{chunk-DVTXGXXL.js → chunk-QIOWXUFH.js} +1 -1
- package/dist/{chunk-MSEUUAJ7.js → chunk-SDDKVY4I.js} +5 -5
- package/dist/{chunk-CIZQARGJ.js → chunk-SYLJL63X.js} +3 -3
- package/dist/{chunk-7SIZISYH.js → chunk-TFV6RATK.js} +5 -5
- package/dist/{chunk-2A234H3F.js → chunk-TMQMUGSN.js} +3 -3
- package/dist/{chunk-ZSL7B7NF.js → chunk-VKTDXQGH.js} +2 -2
- package/dist/{chunk-RV4U3LYL.js → chunk-VP6WDFVO.js} +3 -3
- package/dist/{chunk-5VP72OOI.js → chunk-WBQK6KD5.js} +8 -8
- package/dist/{chunk-JHDHC2M7.js → chunk-WJO7SENK.js} +4 -4
- package/dist/{chunk-3XAUHY35.js → chunk-WWTB4DAE.js} +1 -1
- package/dist/{chunk-2NIBBM3N.js → chunk-Y6KG5JZP.js} +2 -2
- package/dist/{chunk-K2IUMMZJ.js → chunk-YKYFFCB5.js} +1 -1
- package/dist/{chunk-PWO6T7JG.js → chunk-YL6HU2KF.js} +5 -5
- package/dist/{chunk-RMWV3MYN.js → chunk-YOHPJNFW.js} +4 -4
- package/dist/{chunk-APG7IAUK.js → chunk-ZH74RRGM.js} +1 -1
- package/dist/{chunk-ZECHTK3K.js → chunk-ZMUDVPOT.js} +3 -3
- package/dist/{global-upgrade-P5CJ22AW.js → global-upgrade-MOBLBPIJ.js} +6 -6
- package/dist/{paths-XZE2MPTP.js → paths-55SPLYW5.js} +2 -2
- package/dist/{reapply-V4GMKCGP.js → reapply-SOIJJKGO.js} +20 -20
- package/dist/src/index.js +19 -19
- package/dist/{upgrade-lock-DQF62B6X.js → upgrade-lock-FER4DMDA.js} +3 -3
- package/package.json +1 -1
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VP6WDFVO.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_CHOICES
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YKYFFCB5.js";
|
|
9
9
|
import {
|
|
10
10
|
BELL_HOOK_BINARY
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7VOEZPJ4.js";
|
|
12
12
|
import {
|
|
13
13
|
CODEX_HOOK_EVENTS,
|
|
14
14
|
hasCodexHooks,
|
|
15
15
|
holdBudgetOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HJL5RBOU.js";
|
|
17
17
|
import {
|
|
18
18
|
CURSOR_GATE_EVENTS,
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
hookCommandHoldBudget
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-AYV2NRYJ.js";
|
|
22
22
|
|
|
23
23
|
// src/diagnostics/bridge.ts
|
|
24
24
|
import { execFileSync } from "child_process";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ME55HQOI.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FZW7Q7GM.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HJL5RBOU.js";
|
|
12
12
|
|
|
13
13
|
// src/cursor-config.ts
|
|
14
14
|
var hookCommandOf = (entry) => {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isReleaseVersion,
|
|
14
14
|
ownPackageName,
|
|
15
15
|
withHookHoldBudget
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-AYV2NRYJ.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/paths.ts
|
|
19
19
|
import { homedir as homedir2 } from "os";
|
|
@@ -365,9 +365,9 @@ var installGlobally = (options) => {
|
|
|
365
365
|
}
|
|
366
366
|
const started = (async () => {
|
|
367
367
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
368
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
369
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
370
|
-
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-
|
|
368
|
+
const { withUpgradeLock } = await import("./global-upgrade-MOBLBPIJ.js");
|
|
369
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-FER4DMDA.js");
|
|
370
|
+
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-55SPLYW5.js");
|
|
371
371
|
let result = "skipped";
|
|
372
372
|
const install = async () => {
|
|
373
373
|
const platform = process.platform;
|
|
@@ -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-52JA2WTH.js";
|
|
6
6
|
import {
|
|
7
7
|
cancelQuestion,
|
|
8
8
|
clientErrorKindOf,
|
|
@@ -10,26 +10,26 @@ import {
|
|
|
10
10
|
reportClientError,
|
|
11
11
|
sendNotification,
|
|
12
12
|
waitForAnswer
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YL6HU2KF.js";
|
|
14
14
|
import {
|
|
15
15
|
withRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SYLJL63X.js";
|
|
17
17
|
import {
|
|
18
18
|
getMachineId
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-NA5D62OI.js";
|
|
20
20
|
import {
|
|
21
21
|
reportedInstallSource
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VKTDXQGH.js";
|
|
23
23
|
import {
|
|
24
24
|
canonicalJson
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-HJL5RBOU.js";
|
|
26
26
|
import {
|
|
27
27
|
writeFileAtomic
|
|
28
28
|
} from "./chunk-T7E75EKA.js";
|
|
29
29
|
import {
|
|
30
30
|
getApiKey,
|
|
31
31
|
getBaseUrl
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-HTO2XULO.js";
|
|
33
33
|
import {
|
|
34
34
|
ACTION_BODY_MAX,
|
|
35
35
|
AGENT_LABELS_BY_TYPE,
|
|
@@ -50,6 +50,7 @@ import {
|
|
|
50
50
|
localRepoKey,
|
|
51
51
|
modeStateFromResponse,
|
|
52
52
|
normalizeRepoRemote,
|
|
53
|
+
parseMcpToolName,
|
|
53
54
|
pendingCommandEvents,
|
|
54
55
|
redactSecrets,
|
|
55
56
|
redactSecretsDeep,
|
|
@@ -58,7 +59,7 @@ import {
|
|
|
58
59
|
resolvePolicy,
|
|
59
60
|
toToolLookup,
|
|
60
61
|
truncateLine
|
|
61
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-AYV2NRYJ.js";
|
|
62
63
|
|
|
63
64
|
// ../hook-mapping/src/describe.ts
|
|
64
65
|
import { isAbsolute, relative, resolve } from "path";
|
|
@@ -105,14 +106,6 @@ var eventPrefixes = {
|
|
|
105
106
|
Task: (input) => `ran subagent: ${describeTaskCall(input)}`,
|
|
106
107
|
WebSearch: (input) => `searched: ${firstString(input.query) ?? "the web"}`
|
|
107
108
|
};
|
|
108
|
-
var MCP_TOOL_PREFIX = "mcp__";
|
|
109
|
-
var parseMcpToolName = (toolName) => {
|
|
110
|
-
if (!toolName.startsWith(MCP_TOOL_PREFIX)) return void 0;
|
|
111
|
-
const rest = toolName.slice(MCP_TOOL_PREFIX.length);
|
|
112
|
-
const split = rest.indexOf("__");
|
|
113
|
-
if (split <= 0 || split + 2 >= rest.length) return void 0;
|
|
114
|
-
return { server: rest.slice(0, split), tool: rest.slice(split + 2) };
|
|
115
|
-
};
|
|
116
109
|
var NETWORK_TARGET_KEYS = ["url", "urls", "href", "host", "hosts", "hostname", "domain", "domains"];
|
|
117
110
|
var ABSOLUTE_HTTP_URL = /^https?:\/\//i;
|
|
118
111
|
var HOSTNAME = /^(?=.{1,253}$)[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+(?::\d{1,5})?$/i;
|
|
@@ -199,12 +192,12 @@ var parseApplyPatchOps = (command) => {
|
|
|
199
192
|
if (typeof command !== "string") return [];
|
|
200
193
|
const ops = [];
|
|
201
194
|
for (const line of command.split("\n")) {
|
|
202
|
-
const file = line.match(
|
|
195
|
+
const file = line.match(/^\s*\*\*\*\s+(Add|Update|Delete) File:\s+(.+?)\s*$/);
|
|
203
196
|
if (file) {
|
|
204
197
|
ops.push({ op: file[1].toLowerCase(), path: file[2] });
|
|
205
198
|
continue;
|
|
206
199
|
}
|
|
207
|
-
const move = line.match(
|
|
200
|
+
const move = line.match(/^\s*\*\*\*\s+Move to:\s+(.+?)\s*$/);
|
|
208
201
|
if (move) ops.push({ op: "move", path: move[1] });
|
|
209
202
|
}
|
|
210
203
|
return ops;
|
|
@@ -1365,6 +1358,7 @@ var toCodexWire = (event, decision) => {
|
|
|
1365
1358
|
decision.kind === "deny" ? decision.reason : void 0
|
|
1366
1359
|
) ?? null;
|
|
1367
1360
|
};
|
|
1361
|
+
var patchDeletesFiles = (toolName, toolInput) => toolName === "apply_patch" && parseApplyPatchOps(toolInput.command).some((entry) => entry.op === "delete");
|
|
1368
1362
|
var describeApplyPatch = (command) => {
|
|
1369
1363
|
const ops = parseApplyPatchOps(command);
|
|
1370
1364
|
if (ops.length === 0) return null;
|
|
@@ -2285,6 +2279,7 @@ export {
|
|
|
2285
2279
|
codexDeny,
|
|
2286
2280
|
codexPass,
|
|
2287
2281
|
toCodexWire,
|
|
2282
|
+
patchDeletesFiles,
|
|
2288
2283
|
describeApplyPatch,
|
|
2289
2284
|
toPolicyLookup,
|
|
2290
2285
|
toPolicyLookups,
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
resolvePackageVersionFromBinary,
|
|
11
11
|
resolvePathBinary,
|
|
12
12
|
resolvePathBinaryAsync
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HJL5RBOU.js";
|
|
14
14
|
import {
|
|
15
15
|
MANAGED_PROVIDERS
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-AYV2NRYJ.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/codex-install.ts
|
|
19
19
|
var NATIVE_BINARY_MIN_BYTES = 20 * 1024 * 1024;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WBQK6KD5.js";
|
|
4
4
|
import {
|
|
5
5
|
namedEvent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ME55HQOI.js";
|
|
7
7
|
import {
|
|
8
8
|
writeDegraded
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YL6HU2KF.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeShapedHookInput,
|
|
12
12
|
hookCompatibleProfileBySource
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AYV2NRYJ.js";
|
|
14
14
|
|
|
15
15
|
// src/tool-hook-input.ts
|
|
16
16
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand,
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HJL5RBOU.js";
|
|
12
12
|
import {
|
|
13
13
|
getPackageVersion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AYV2NRYJ.js";
|
|
15
15
|
|
|
16
16
|
// src/codex-app-server.ts
|
|
17
17
|
import { existsSync, realpathSync } from "fs";
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
addGeminiMcpServer,
|
|
4
4
|
removeGeminiMcpServer,
|
|
5
5
|
supportedClaudeEvents
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VP6WDFVO.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_CODE_AGENT,
|
|
9
9
|
parseApplyPatchFiles
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IQCNOEQL.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-HJL5RBOU.js";
|
|
18
18
|
import {
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
20
20
|
PHONE_ANSWERED_TOOLS,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
refusalOutput,
|
|
25
25
|
toToolLookup,
|
|
26
26
|
withHookHoldBudget
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-AYV2NRYJ.js";
|
|
28
28
|
|
|
29
29
|
// src/claude-config.ts
|
|
30
30
|
import { join } from "path";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ME55HQOI.js";
|
|
4
4
|
import {
|
|
5
5
|
hookOwnerOf,
|
|
6
6
|
hookOwnerOfCommands,
|
|
7
7
|
liveBridgeProbe,
|
|
8
8
|
resolveBridgeStub
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FZW7Q7GM.js";
|
|
10
10
|
import {
|
|
11
11
|
AGENT_CHOICES
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YKYFFCB5.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-HJL5RBOU.js";
|
|
22
22
|
import {
|
|
23
23
|
readJsonSafe
|
|
24
24
|
} from "./chunk-T7E75EKA.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
HOOK_LOCATOR_BINARY,
|
|
29
29
|
OPENCODE_APPROVAL_EVENT,
|
|
30
30
|
hookCompatibleProfile
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-AYV2NRYJ.js";
|
|
32
32
|
|
|
33
33
|
// src/opencode-plugin.ts
|
|
34
34
|
var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MCP_BRIDGE_BINARY
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-D72OJS4S.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_FILE_MODE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5EWNGYFD.js";
|
|
7
7
|
import {
|
|
8
8
|
NpmMissingError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HJL5RBOU.js";
|
|
10
10
|
import {
|
|
11
11
|
readJsonSafe,
|
|
12
12
|
writeFileAtomic,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-T7E75EKA.js";
|
|
15
15
|
import {
|
|
16
16
|
NPX_LATEST_COMMAND
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-PNUWMEIY.js";
|
|
18
18
|
|
|
19
19
|
// src/instruction-file.ts
|
|
20
20
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, rmSync } from "fs";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defersToNativeMode,
|
|
3
3
|
reportMachineDenial
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-COZE23R3.js";
|
|
5
5
|
import {
|
|
6
6
|
isGatingMoment,
|
|
7
7
|
recordKeylessMoment
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WWTB4DAE.js";
|
|
9
9
|
import {
|
|
10
10
|
announceSubscriptionRequired,
|
|
11
11
|
denyReasonFrom,
|
|
12
12
|
isDeferAnswer,
|
|
13
13
|
oncePerSession
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6GRUERVL.js";
|
|
15
15
|
import {
|
|
16
16
|
activeHookSource,
|
|
17
17
|
activeIdentity
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ME55HQOI.js";
|
|
19
19
|
import {
|
|
20
20
|
DEFAULT_SESSION,
|
|
21
21
|
UNNAMED_ACTION,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
reportEvent,
|
|
41
41
|
scopePathFor,
|
|
42
42
|
settleQuestionsForToolUse
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-IQCNOEQL.js";
|
|
44
44
|
import {
|
|
45
45
|
askUser,
|
|
46
46
|
cancelQuestion,
|
|
@@ -51,26 +51,27 @@ import {
|
|
|
51
51
|
requestGate,
|
|
52
52
|
sendNotification,
|
|
53
53
|
waitForQuestion
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-YL6HU2KF.js";
|
|
55
55
|
import {
|
|
56
56
|
SubscriptionRequiredError
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-SYLJL63X.js";
|
|
58
58
|
import {
|
|
59
59
|
getMachineId
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-NA5D62OI.js";
|
|
61
61
|
import {
|
|
62
62
|
getApiKey,
|
|
63
63
|
getBaseUrl
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-HTO2XULO.js";
|
|
65
65
|
import {
|
|
66
66
|
NPX_LATEST_COMMAND
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-PNUWMEIY.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
73
|
PLAN_DECLINED_REASON,
|
|
74
|
+
SCOPE_BATCH_REASON,
|
|
74
75
|
SOLE_GATE_SIGNED_OUT_REASON,
|
|
75
76
|
SOLE_GATE_UNDECIDED_REASON,
|
|
76
77
|
UNVERIFIABLE_APPROVAL_REASON,
|
|
@@ -102,7 +103,7 @@ import {
|
|
|
102
103
|
parseAgentQuestions,
|
|
103
104
|
questionHandedToTheTerminal,
|
|
104
105
|
resolveGate
|
|
105
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-AYV2NRYJ.js";
|
|
106
107
|
|
|
107
108
|
// src/claude-permission-rules.ts
|
|
108
109
|
import { readFileSync, statSync } from "fs";
|
|
@@ -545,7 +546,6 @@ var claudeGateInput = (modeState, config, input, canonical) => {
|
|
|
545
546
|
};
|
|
546
547
|
};
|
|
547
548
|
var unreadableReason = "Pushary could not read every target of this call. Use a supported command or a single-file edit.";
|
|
548
|
-
var batchScopeReason = "This patch exceeds the agreed scope. Split it into single-file edits so each additional path can be approved.";
|
|
549
549
|
var BLOCKED_ACTION_GATE_TIMEOUT_MS = 15e3;
|
|
550
550
|
var BLOCKED_ACTION_CLAIM_TIMEOUT_MS = 4e3;
|
|
551
551
|
var BLOCKED_ACTION_ALLOW_REASON = "Approved from Pushary after auto mode blocked it";
|
|
@@ -616,7 +616,7 @@ var handlePreToolUse = async (input, canonical) => {
|
|
|
616
616
|
return deny(verdict.reason);
|
|
617
617
|
}
|
|
618
618
|
if (canonical === null) return deny(unreadableReason);
|
|
619
|
-
if (verdict.kind === "gate" && verdict.scopeReason && (canonical?.toolInputs.length ?? 0) > 1) return deny(
|
|
619
|
+
if (verdict.kind === "gate" && verdict.scopeReason && (canonical?.toolInputs.length ?? 0) > 1) return deny(SCOPE_BATCH_REASON);
|
|
620
620
|
if (agentQuestionStrategy(ACTIVE_SOURCE, "PreToolUse", input.tool_name) === AGENT_QUESTION_STRATEGY.native) return void 0;
|
|
621
621
|
if (input.tool_name === "AskUserQuestion") {
|
|
622
622
|
return handleAskUserQuestion(apiKey, input, modeState);
|
|
@@ -683,7 +683,7 @@ var handlePermissionRequest = async (input, canonical) => {
|
|
|
683
683
|
}
|
|
684
684
|
if (canonical === null) return permReqDeny(unreadableReason);
|
|
685
685
|
if (agentQuestionStrategy(ACTIVE_SOURCE, "PermissionRequest", input.tool_name) === AGENT_QUESTION_STRATEGY.native) return void 0;
|
|
686
|
-
if (verdict.kind === "gate" && verdict.scopeReason && (canonical?.toolInputs.length ?? 0) > 1) return permReqDeny(
|
|
686
|
+
if (verdict.kind === "gate" && verdict.scopeReason && (canonical?.toolInputs.length ?? 0) > 1) return permReqDeny(SCOPE_BATCH_REASON);
|
|
687
687
|
if (!(verdict.kind === "gate" && verdict.scopeReason) && !claudeAllowlistOwnsCall(gateInput, verdict, input.permission_mode, claudeRules) && isPermissionRequestOwnedByPreToolUse(input.tool_name, input.permission_mode, shouldDeferToNativeMode)) return void 0;
|
|
688
688
|
switch (verdict.kind) {
|
|
689
689
|
case "allow":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3FQCZSEQ.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-HTO2XULO.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-AYV2NRYJ.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,7 +4,7 @@ import {
|
|
|
4
4
|
forkFinishWithUpgradeLock,
|
|
5
5
|
installWithUpgradeLock,
|
|
6
6
|
releaseAutoUpdateLock
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-57VUNV32.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-6MLSXBNR.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-HJL5RBOU.js";
|
|
31
31
|
import {
|
|
32
32
|
NPX_LATEST_COMMAND
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-PNUWMEIY.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-AYV2NRYJ.js";
|
|
43
43
|
|
|
44
44
|
// src/global-upgrade.ts
|
|
45
45
|
import { existsSync } from "fs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PSWFYNOX.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3FQCZSEQ.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HTO2XULO.js";
|
|
10
10
|
|
|
11
11
|
// src/retry.ts
|
|
12
12
|
var isRetryable = (err) => {
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5EWNGYFD.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NA5D62OI.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir,
|
|
13
13
|
resolveGlobalBinary
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HJL5RBOU.js";
|
|
15
15
|
import {
|
|
16
16
|
readJsonSafe,
|
|
17
17
|
writeFileAtomic,
|
|
@@ -20,14 +20,14 @@ import {
|
|
|
20
20
|
} from "./chunk-T7E75EKA.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HTO2XULO.js";
|
|
24
24
|
import {
|
|
25
25
|
CLI_PACKAGE_NAMES,
|
|
26
26
|
cmdShimTarget,
|
|
27
27
|
getPackageVersion,
|
|
28
28
|
globalPackageFolder,
|
|
29
29
|
globalRootFor
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-AYV2NRYJ.js";
|
|
31
31
|
|
|
32
32
|
// src/daemon-lifecycle.ts
|
|
33
33
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YKYFFCB5.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
6
|
} from "./chunk-GMXKITVA.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-7QLSKOSU.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PNUWMEIY.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-AYV2NRYJ.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|