pushary 1.9.111 → 1.9.113
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 +9 -0
- package/dist/{api-AESRTYYT.js → api-PCAXOVGM.js} +11 -11
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +27 -27
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +25 -25
- package/dist/bin/pushary-clean.js +34 -34
- package/dist/bin/pushary-codex-bridge.js +21 -21
- package/dist/bin/pushary-codex-hook.js +32 -32
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +15 -15
- package/dist/bin/pushary-connect.js +28 -28
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +66 -484
- package/dist/bin/pushary-disconnect.js +27 -27
- package/dist/bin/pushary-display-hook.js +17 -17
- package/dist/bin/pushary-doctor.js +42 -42
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +15 -15
- package/dist/bin/pushary-gemini-hook.js +29 -29
- package/dist/bin/pushary-hook.js +32 -32
- package/dist/bin/pushary-login.js +21 -21
- package/dist/bin/pushary-logout.js +26 -26
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +15 -15
- package/dist/bin/pushary-notification-hook.js +26 -26
- package/dist/bin/pushary-opencode-hook.js +28 -28
- package/dist/bin/pushary-permission-denied-hook.js +32 -32
- package/dist/bin/pushary-permission-hook.js +32 -32
- package/dist/bin/pushary-post-hook.js +26 -26
- package/dist/bin/pushary-prompt-hook.js +26 -26
- package/dist/bin/pushary-session-end-hook.js +26 -26
- package/dist/bin/pushary-session-start-hook.js +35 -35
- package/dist/bin/pushary-setup.js +61 -47
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +32 -32
- package/dist/bin/pushary-stop-hook.js +26 -26
- package/dist/bin/pushary-stopfailure-hook.js +26 -26
- package/dist/bin/pushary-suggestions.js +15 -15
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +25 -25
- package/dist/bin/pushary-upgrade.js +40 -40
- package/dist/bin/pushary-wait.js +15 -15
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-NUU2JVOG.js → chunk-22OATDEL.js} +3 -3
- package/dist/{chunk-YBQF7DCL.js → chunk-233KC6DP.js} +1 -1
- package/dist/{chunk-2MOWY5QL.js → chunk-24M7PB2Y.js} +5 -5
- package/dist/{chunk-NHDTSA7V.js → chunk-3D2J3T2M.js} +1 -1
- package/dist/{chunk-KLCT2YQD.js → chunk-3LJWADU2.js} +6 -6
- package/dist/{chunk-SSW4QRGU.js → chunk-3ZU77DJH.js} +6 -6
- package/dist/{chunk-RFFIAX33.js → chunk-44HW5T6P.js} +2 -2
- package/dist/{chunk-TILEGY4M.js → chunk-44O6GG4I.js} +6 -6
- package/dist/{chunk-YNTB3MIQ.js → chunk-4EFZANH3.js} +1 -1
- package/dist/{chunk-NVPCETJ3.js → chunk-4I6FWGZ5.js} +1 -1
- package/dist/{chunk-O2MZQPP4.js → chunk-53ROMSOB.js} +3 -3
- package/dist/{chunk-G42VQNBC.js → chunk-5J2OGCUA.js} +1 -1
- package/dist/{chunk-54DPX27B.js → chunk-5SUTYXCT.js} +1 -1
- package/dist/{chunk-M73Q37LC.js → chunk-6E2D22Y5.js} +2 -2
- package/dist/{chunk-G2TTGQ5A.js → chunk-AR3VX4UQ.js} +10 -10
- package/dist/{chunk-5EEW4WIS.js → chunk-B5NKPU2E.js} +5 -5
- package/dist/{chunk-DEHWKUKF.js → chunk-BMZFL3HF.js} +4 -4
- package/dist/{chunk-VA4OGALQ.js → chunk-BWSXWX6T.js} +2 -2
- package/dist/{chunk-YI5I2TF3.js → chunk-BYL7RNOM.js} +3 -3
- package/dist/{chunk-XJ4PMNCR.js → chunk-CG5SK6NF.js} +1 -1
- package/dist/{chunk-YILMWIZN.js → chunk-D3XNQAQO.js} +2 -2
- package/dist/{chunk-BM32JPXJ.js → chunk-DLCECUKY.js} +7 -7
- package/dist/{chunk-PTBWLU4G.js → chunk-DSXBMC2N.js} +5 -5
- package/dist/{chunk-76ATPJN2.js → chunk-E3A77P52.js} +4 -4
- package/dist/{chunk-SDQQ43FT.js → chunk-F5TQ6TCH.js} +1 -1
- package/dist/{chunk-WO46WX65.js → chunk-FLRVTAV4.js} +2 -2
- package/dist/{chunk-FYVRA5GN.js → chunk-FQSFN5ZE.js} +1 -1
- package/dist/{chunk-3AX5BKYN.js → chunk-GBT74TNN.js} +2 -2
- package/dist/chunk-GGBGKQIZ.js +454 -0
- package/dist/{chunk-YXFLZ2LO.js → chunk-GI3266RE.js} +2 -2
- package/dist/{chunk-X5P3IO37.js → chunk-GNP6I5XM.js} +2 -2
- package/dist/{chunk-R3KDA7JB.js → chunk-GQFT3QTC.js} +15 -3
- package/dist/{chunk-O76PTPKP.js → chunk-GSJUGW3A.js} +1 -1
- package/dist/{chunk-OECCPPO6.js → chunk-HJ566HEV.js} +3 -3
- package/dist/{chunk-7HDO5W4C.js → chunk-I7HSE5LD.js} +11 -11
- package/dist/{chunk-QVGE26SZ.js → chunk-IWUYKDDW.js} +4 -4
- package/dist/{chunk-KHWNW4AS.js → chunk-JCHF4VR3.js} +1 -1
- package/dist/{chunk-LTVILMEZ.js → chunk-JRW5HK32.js} +2 -2
- package/dist/{chunk-KICQRZAT.js → chunk-JXN4SH6M.js} +1 -1
- package/dist/{chunk-GXTW3W45.js → chunk-JXNDO7FB.js} +1 -1
- package/dist/{chunk-UN2QALQO.js → chunk-KB2EEK5T.js} +5 -5
- package/dist/{chunk-262UYDKT.js → chunk-KDTTCR3E.js} +3 -3
- package/dist/{chunk-DZE26BID.js → chunk-KPCVIH52.js} +22 -1
- package/dist/{chunk-RBM2ROSY.js → chunk-LUBECFXJ.js} +1 -1
- package/dist/{chunk-4M6VUUTX.js → chunk-MDEXA6JD.js} +3 -3
- package/dist/{chunk-Y3N7LIFV.js → chunk-MPG4HYQ6.js} +3 -3
- package/dist/{chunk-75UJ7W6H.js → chunk-NG2EWF32.js} +2 -2
- package/dist/{chunk-NZZFIIH6.js → chunk-NK5XT4RS.js} +4 -4
- package/dist/{chunk-PYAPWXVP.js → chunk-NPG4WCIM.js} +1 -1
- package/dist/{chunk-AW7IJ56H.js → chunk-O5VJGP6H.js} +4 -4
- package/dist/{chunk-RUORT3DE.js → chunk-OJGHJIFQ.js} +5 -5
- package/dist/{chunk-56ANL3UO.js → chunk-OR5SWH44.js} +10 -10
- package/dist/{chunk-FE7HSLTK.js → chunk-P4PLDBZK.js} +5 -5
- package/dist/{chunk-4AKZALX4.js → chunk-PU2KHDRD.js} +22 -19
- package/dist/{chunk-YQMARTNQ.js → chunk-Q4VB3DIL.js} +2 -2
- package/dist/{chunk-QQMT2JIC.js → chunk-RIBCPWOB.js} +3 -3
- package/dist/{chunk-PCFIYMK4.js → chunk-RLBTKTOK.js} +2 -2
- package/dist/{chunk-CIT4NO5H.js → chunk-SI7EFQEU.js} +34 -13
- package/dist/{chunk-X2XXKXC5.js → chunk-T2N7MEO3.js} +3 -3
- package/dist/{chunk-Q63L3VBY.js → chunk-T5GJK54S.js} +4 -4
- package/dist/{chunk-37F75NBN.js → chunk-TAGLGMA6.js} +2 -2
- package/dist/{chunk-N2VH44GL.js → chunk-U35OB2HQ.js} +6 -6
- package/dist/{chunk-LUFKWK7N.js → chunk-UMR6UQZ4.js} +3 -3
- package/dist/{chunk-LDE7L7XO.js → chunk-WGK2BIX6.js} +4 -4
- package/dist/{chunk-EPMIBLCE.js → chunk-WUREJCUJ.js} +5 -5
- package/dist/{chunk-BH5WEDQ4.js → chunk-XL6DDWWT.js} +1 -1
- package/dist/{chunk-5RVL2CQK.js → chunk-XQFHB2EK.js} +3 -3
- package/dist/{chunk-ZLLQO4RU.js → chunk-YM5OM2CI.js} +6 -6
- package/dist/{chunk-LMECI62A.js → chunk-Z2QWM27R.js} +6 -6
- package/dist/{chunk-YHHWO4IU.js → chunk-ZUZ4RXM7.js} +1 -1
- package/dist/{codex-app-cards-switch-SXY732CY.js → codex-app-cards-switch-UI2LQQ6C.js} +11 -11
- package/dist/{codex-card-routing-K5FNOTBK.js → codex-card-routing-IOVURY45.js} +2 -2
- package/dist/{codex-desktop-launch-SMWGCLWW.js → codex-desktop-launch-GAXMK6IM.js} +1 -1
- package/dist/{codex-session-launch-MDMNYCCG.js → codex-session-launch-FYXRCD3I.js} +18 -18
- package/dist/{config-3R7UVC67.js → config-WOATWPOD.js} +3 -3
- package/dist/{global-upgrade-2BXXJQHR.js → global-upgrade-LDIMKAPF.js} +9 -9
- package/dist/{identity-N45XKYBA.js → identity-GCRCIP45.js} +4 -4
- package/dist/{live-capabilities-YT7CENI2.js → live-capabilities-DPMIMA3P.js} +4 -4
- package/dist/{paths-A2TITMY3.js → paths-H5LP5HJB.js} +3 -3
- package/dist/{reapply-O4TGPUVZ.js → reapply-FBNJRZLQ.js} +28 -28
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.js +31 -31
- package/dist/{upgrade-lock-HYD3MFFS.js → upgrade-lock-76Z2YLIV.js} +4 -4
- package/dist/{usage-PTPB2XF6.js → usage-SIELH6XD.js} +3 -3
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OJGHJIFQ.js";
|
|
4
4
|
import {
|
|
5
5
|
hookOwnerOf,
|
|
6
6
|
hookOwnerOfCommands
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NK5XT4RS.js";
|
|
8
8
|
import {
|
|
9
9
|
AGENT_CHOICES
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5SUTYXCT.js";
|
|
11
11
|
import {
|
|
12
12
|
bridgeStub,
|
|
13
13
|
claudeSettings,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
resolveBridgeStub,
|
|
20
20
|
vscodePluginDir,
|
|
21
21
|
windowsNodeLauncherFor
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-RLBTKTOK.js";
|
|
23
23
|
import {
|
|
24
24
|
readJsonSafe
|
|
25
25
|
} from "./chunk-T5I4PKOQ.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
OPENCODE_APPROVAL_EVENT,
|
|
30
30
|
hookCompatibleProfile,
|
|
31
31
|
isRecord
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-KPCVIH52.js";
|
|
33
33
|
|
|
34
34
|
// src/opencode-plugin.ts
|
|
35
35
|
var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
} from "./chunk-XMSDA5WA.js";
|
|
4
4
|
import {
|
|
5
5
|
fetchAsCredential
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NPG4WCIM.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GSJUGW3A.js";
|
|
10
10
|
import {
|
|
11
11
|
compressTranscriptRecord,
|
|
12
12
|
redactSecretsFromContent,
|
|
13
13
|
transcriptRecordPlaintext
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KPCVIH52.js";
|
|
15
15
|
|
|
16
16
|
// src/transcript-api.ts
|
|
17
17
|
var providerRecipientSchema = external_exports.object({
|
|
@@ -4474,6 +4474,8 @@ var isSafeReadOnlyCommand = (command) => {
|
|
|
4474
4474
|
if (visibleWithoutRedirection.replace(/&&/g, " ").includes("&")) return false;
|
|
4475
4475
|
return segmentsSplitWhereVisible(blankedSafeRedirections(trimmed), visibleWithoutRedirection, READ_ONLY_SEGMENT_SEPARATOR).every((segment) => trimShellWhitespace(segment).length > 0 && isSafeSimpleCommand(segment));
|
|
4476
4476
|
};
|
|
4477
|
+
var READ_ONLY_PROGRAMS = [...SAFE_SHELL_COMMANDS, ...INSPECTED_ARGUMENT_COMMANDS];
|
|
4478
|
+
var READ_ONLY_GIT_FIRST_ARGUMENTS = [...SAFE_GIT_SUBCOMMANDS, ...GIT_READ_ONLY_BRANCH_ARGUMENTS.slice(0, 1)];
|
|
4477
4479
|
var isAutoApprove = (policy) => policy.timeoutSeconds === 0 && policy.timeoutAction === "approve";
|
|
4478
4480
|
var isAutoDeny = (policy) => policy.timeoutSeconds === 0 && policy.timeoutAction === "deny";
|
|
4479
4481
|
var verdictForPolicy = (policy) => {
|
|
@@ -8614,7 +8616,7 @@ var agentRulesAllowEveryInput = (rules, toolName, toolInputs, cwd) => rules.allo
|
|
|
8614
8616
|
return allowRulesGrant(rules.allow, toolName, args) && !anyRuleRestrictsReading(rules.ask, toolName, reading) && !anyRuleRestrictsReading(rules.deny, toolName, reading) && !inputNeedsAPerson(toolName, toolInput);
|
|
8615
8617
|
});
|
|
8616
8618
|
var isDefaultRule = (policy) => policy.origin === "builtin" || policy.tool === WILDCARD_TOOL_PATTERN;
|
|
8617
|
-
var isApprovalRoutePattern = (value) => typeof value === "object" && value !== null && typeof value.toolPattern === "string" && ["string", "undefined"].includes(typeof value.repoKey);
|
|
8619
|
+
var isApprovalRoutePattern = (value) => typeof value === "object" && value !== null && typeof value.toolPattern === "string" && ["string", "undefined"].includes(typeof value.repoKey) && ["boolean", "undefined"].includes(typeof value.answeredBySomeoneElse);
|
|
8618
8620
|
var approvalRoutesOf = (config) => {
|
|
8619
8621
|
const routes = config.approvalRoutes ?? [];
|
|
8620
8622
|
return Array.isArray(routes) && routes.every(isApprovalRoutePattern) ? routes : null;
|
|
@@ -8631,6 +8633,22 @@ var aChosenRuleGoverns = (input, counts = everyRule) => {
|
|
|
8631
8633
|
return governing !== void 0 && counts(governing.policy) || findBestRoute(routes, input.toolName, args, input.repoKey) !== void 0;
|
|
8632
8634
|
});
|
|
8633
8635
|
};
|
|
8636
|
+
var AUTO_PERMISSION_MODE = "auto";
|
|
8637
|
+
var routeDeliveredFor = (input, routes, toolInput) => findBestRoute(routes, input.toolName, policyArgForms(input.toolName, toolInput, input.cwd), input.sharedRepoKey ?? input.repoKey);
|
|
8638
|
+
var callWaitsForSomeoneElse = (input) => {
|
|
8639
|
+
const routes = approvalRoutesOf(input.config);
|
|
8640
|
+
if (routes === null) return false;
|
|
8641
|
+
return input.toolInputs.some((toolInput) => routeDeliveredFor(input, routes, toolInput)?.answeredBySomeoneElse === true);
|
|
8642
|
+
};
|
|
8643
|
+
var matchedRouteOf = (input) => {
|
|
8644
|
+
const routes = approvalRoutesOf(input.config);
|
|
8645
|
+
if (routes === null) return void 0;
|
|
8646
|
+
const matched = input.toolInputs.flatMap((toolInput) => routeDeliveredFor(input, routes, toolInput) ?? []);
|
|
8647
|
+
const route = matched.find((candidate) => candidate.answeredBySomeoneElse === true) ?? matched[0];
|
|
8648
|
+
if (route === void 0) return void 0;
|
|
8649
|
+
return route.repoKey ? { toolPattern: route.toolPattern, repoKey: route.repoKey } : { toolPattern: route.toolPattern };
|
|
8650
|
+
};
|
|
8651
|
+
var approvalRouteOutranksAutoMode = (input, verdict, permissionMode) => permissionMode === AUTO_PERMISSION_MODE && PRETOOLUSE_HANDLED_TOOLS.has(input.toolName) && verdict.kind === "gate" && !approvalWaitsAtTheAgentsPrompt(verdict.policy.mode) && !approvesWhenUnanswered(verdict.policy) && callWaitsForSomeoneElse(input);
|
|
8634
8652
|
var claudeAllowlistOwnsCall = (input, verdict, permissionMode, rules) => rules !== null && verdict.kind === "gate" && !verdict.scopeReason && !aChosenRuleGoverns(input) && !isAskedInEveryMode(input.toolName) && claudeConsultsItsAllowlist(permissionMode) && agentRulesAllowEveryInput(rules, input.toolName, input.toolInputs, input.cwd);
|
|
8635
8653
|
var claudePromptTakesTheCall = (facts, input, verdict) => verdict.kind === "gate" && !verdict.scopeReason && terminalStaysLiveForTheCall(facts) && noModeOverrideIsActive(input) && !aChosenRuleGoverns(input) && !editGoesToTheAgentsPrompt({ source: facts.source, event: "PreToolUse", permissionMode: facts.permissionMode }, input, verdict);
|
|
8636
8654
|
var toPolicyVersion = (value) => typeof value === "string" || typeof value === "number" ? String(value) : null;
|
|
@@ -8826,6 +8844,7 @@ var unansweredRefusalReason = (paused) => paused ? SESSION_PAUSED_REASON : NO_RE
|
|
|
8826
8844
|
var UNHEARD_PUSH_WINDOW_DAYS = 14;
|
|
8827
8845
|
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
8828
8846
|
var UNHEARD_PUSH_WINDOW_MS = UNHEARD_PUSH_WINDOW_DAYS * DAY_MS;
|
|
8847
|
+
var approvesWhenUnanswered = ({ mode, timeoutAction }) => mode === "push_only" && timeoutAction === "approve";
|
|
8829
8848
|
var ELICITATION_ANSWERABLE_MODE = "form";
|
|
8830
8849
|
var ELICITATION_MIN_OPTIONS = 2;
|
|
8831
8850
|
var ELICITATION_MAX_MULTI_QUESTIONS = 4;
|
|
@@ -9210,6 +9229,8 @@ export {
|
|
|
9210
9229
|
claudePermissionRulesFromSettings,
|
|
9211
9230
|
claudeConsultsItsAllowlist,
|
|
9212
9231
|
agentRulesAllowEveryInput,
|
|
9232
|
+
matchedRouteOf,
|
|
9233
|
+
approvalRouteOutranksAutoMode,
|
|
9213
9234
|
claudeAllowlistOwnsCall,
|
|
9214
9235
|
claudePromptTakesTheCall,
|
|
9215
9236
|
modeStateFromResponse,
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
hermesAppWiringRecord,
|
|
6
6
|
hermesConfigReceipt,
|
|
7
7
|
hermesSetupReceipt
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RLBTKTOK.js";
|
|
9
9
|
import {
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RIBCPWOB.js";
|
|
12
12
|
import {
|
|
13
13
|
readJsonSafe,
|
|
14
14
|
writeJsonAtomic
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-ZVU6WMMU.js";
|
|
20
20
|
import {
|
|
21
21
|
isRecord
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-KPCVIH52.js";
|
|
23
23
|
|
|
24
24
|
// src/hermes/plugin-payload.ts
|
|
25
25
|
import { createHash } from "crypto";
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
NpmInstallError,
|
|
3
3
|
NpmMissingError,
|
|
4
4
|
NpmPermissionError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RIBCPWOB.js";
|
|
6
6
|
import {
|
|
7
7
|
writeFileAtomic
|
|
8
8
|
} from "./chunk-T5I4PKOQ.js";
|
|
9
9
|
import {
|
|
10
10
|
NPX_LATEST_COMMAND
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JCHF4VR3.js";
|
|
12
12
|
import {
|
|
13
13
|
readSetupAgentFailures
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KPCVIH52.js";
|
|
15
15
|
|
|
16
16
|
// src/setup/config-write.ts
|
|
17
17
|
var AgentConfigWriteError = class extends Error {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
absoluteUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HJ566HEV.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_SCOPE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KPCVIH52.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/approval-settings-pages.ts
|
|
9
9
|
var API_KEYS_PATH = "/dashboard/agent/settings";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AGENT_CHOICES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5SUTYXCT.js";
|
|
4
4
|
import {
|
|
5
5
|
BELL_HOOK_BINARY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-233KC6DP.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_HOOK_EVENTS,
|
|
9
9
|
CODEX_HOOK_EVENTS,
|
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
isBridgeLocator,
|
|
16
16
|
isProtectedByScope,
|
|
17
17
|
registerHookEntry
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RLBTKTOK.js";
|
|
19
19
|
import {
|
|
20
20
|
CURSOR_GATE_EVENTS,
|
|
21
21
|
HOOK_BUDGETS,
|
|
22
22
|
HOOK_LOCATOR_BINARY,
|
|
23
23
|
hookCommandHoldBudget
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KPCVIH52.js";
|
|
25
25
|
|
|
26
26
|
// src/gemini-config.ts
|
|
27
27
|
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KB2EEK5T.js";
|
|
4
4
|
import {
|
|
5
5
|
nativeClaudeInstallPath
|
|
6
6
|
} from "./chunk-ROVLRXBI.js";
|
|
7
7
|
import {
|
|
8
8
|
grokHome
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OJGHJIFQ.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeConfigDir,
|
|
12
12
|
clineDataDirectory,
|
|
13
13
|
codexHomeFrom
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RLBTKTOK.js";
|
|
15
15
|
import {
|
|
16
16
|
HOOK_COMPATIBLE_PROFILES
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KPCVIH52.js";
|
|
18
18
|
|
|
19
19
|
// src/vscode-config.ts
|
|
20
20
|
import { homedir } from "os";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CLAUDE_CODE_AGENT
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I7HSE5LD.js";
|
|
4
4
|
import {
|
|
5
5
|
addGeminiMcpServer,
|
|
6
6
|
removeGeminiMcpServer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NK5XT4RS.js";
|
|
8
8
|
import {
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FQSFN5ZE.js";
|
|
11
11
|
import {
|
|
12
12
|
CLAUDE_HOOK_EVENTS,
|
|
13
13
|
PUSHARY_MCP_URL,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
isPusharyHook,
|
|
20
20
|
registerHookEntry,
|
|
21
21
|
removeClaudeMcpServers
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-RLBTKTOK.js";
|
|
23
23
|
import {
|
|
24
24
|
HOOK_COMPATIBLE_PROFILES,
|
|
25
25
|
PHONE_ANSWERED_TOOLS,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
pusharyMissingReason,
|
|
31
31
|
refusalOutput,
|
|
32
32
|
withHookHoldBudget
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-KPCVIH52.js";
|
|
34
34
|
|
|
35
35
|
// src/config-document.ts
|
|
36
36
|
import { parse, stringify } from "smol-toml";
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
} from "./chunk-G66WIAST.js";
|
|
8
8
|
import {
|
|
9
9
|
ensureDaemonRunning
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3ZU77DJH.js";
|
|
11
11
|
import {
|
|
12
12
|
hookOwnerOf
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-NK5XT4RS.js";
|
|
14
14
|
import {
|
|
15
15
|
hookMeaning
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FQSFN5ZE.js";
|
|
17
17
|
import {
|
|
18
18
|
buildTranscriptRecords,
|
|
19
19
|
decodePublicKey,
|
|
@@ -24,29 +24,29 @@ import {
|
|
|
24
24
|
recordSealerFor,
|
|
25
25
|
uploadTranscriptRecords,
|
|
26
26
|
wrapSessionKey
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-KDTTCR3E.js";
|
|
28
28
|
import {
|
|
29
29
|
external_exports
|
|
30
30
|
} from "./chunk-XMSDA5WA.js";
|
|
31
31
|
import {
|
|
32
32
|
transcriptEnvironmentPreference,
|
|
33
33
|
transcriptsEnabled
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-5J2OGCUA.js";
|
|
35
35
|
import {
|
|
36
36
|
fetchAsCredential
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-NPG4WCIM.js";
|
|
38
38
|
import {
|
|
39
39
|
readTranscriptPreference
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-22OATDEL.js";
|
|
41
41
|
import {
|
|
42
42
|
claudeConfigDir,
|
|
43
43
|
codexHome,
|
|
44
44
|
pusharyDir
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-RLBTKTOK.js";
|
|
46
46
|
import {
|
|
47
47
|
getApiKey,
|
|
48
48
|
getBaseUrl
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-GSJUGW3A.js";
|
|
50
50
|
import {
|
|
51
51
|
writeJsonAtomic,
|
|
52
52
|
writeJsonAtomicDurable
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
isHookSource,
|
|
59
59
|
isRecord,
|
|
60
60
|
redactSecretsFromContent
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-KPCVIH52.js";
|
|
62
62
|
|
|
63
63
|
// src/transcript-recipient-pin.ts
|
|
64
64
|
import { createHash } from "crypto";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readMacAppAgentKey
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E3A77P52.js";
|
|
4
4
|
import {
|
|
5
5
|
API_KEYS_PATH
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NG2EWF32.js";
|
|
7
7
|
import {
|
|
8
8
|
absoluteUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HJ566HEV.js";
|
|
10
10
|
import {
|
|
11
11
|
findExportedKeyLines,
|
|
12
12
|
isAdoptedMacAppKey,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
readConfigFileKey,
|
|
17
17
|
readKeySource,
|
|
18
18
|
readMacAppKeyPrefix
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-22OATDEL.js";
|
|
20
20
|
import {
|
|
21
21
|
isValidApiKey
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-KPCVIH52.js";
|
|
23
23
|
|
|
24
24
|
// src/key-revocation.ts
|
|
25
25
|
var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
claudeSettingsLocationFor,
|
|
3
3
|
readClaudePermissionRules
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6E2D22Y5.js";
|
|
5
5
|
import {
|
|
6
6
|
askAgentQuestions,
|
|
7
7
|
defersToNativeMode,
|
|
8
8
|
outcomeOfFailedAsk,
|
|
9
9
|
reportMachineDenial,
|
|
10
10
|
storedWaitDeadline
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DLCECUKY.js";
|
|
12
12
|
import {
|
|
13
13
|
isGatingMoment,
|
|
14
14
|
recordKeylessMoment
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CG5SK6NF.js";
|
|
16
16
|
import {
|
|
17
17
|
isAdmitted,
|
|
18
18
|
readAdmissionRules
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-24M7PB2Y.js";
|
|
20
20
|
import {
|
|
21
21
|
isDeferAnswer,
|
|
22
22
|
oncePerSession
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XL6DDWWT.js";
|
|
24
24
|
import {
|
|
25
25
|
activeHookSource,
|
|
26
26
|
activeIdentity,
|
|
27
27
|
namedSource
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-OJGHJIFQ.js";
|
|
29
29
|
import {
|
|
30
30
|
DEFAULT_SESSION,
|
|
31
31
|
approvalAwaitingRetry,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
recordBlockedActionHint,
|
|
42
42
|
reportEvent,
|
|
43
43
|
settleQuestionsForToolUse
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-I7HSE5LD.js";
|
|
45
45
|
import {
|
|
46
46
|
UNNAMED_ACTION,
|
|
47
47
|
deriveAction,
|
|
@@ -52,11 +52,11 @@ import {
|
|
|
52
52
|
patchDeletesFiles,
|
|
53
53
|
permissionDeniedAction,
|
|
54
54
|
scopePathFor
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-FQSFN5ZE.js";
|
|
56
56
|
import {
|
|
57
57
|
repoKeyFor,
|
|
58
58
|
repositoryScopeFor
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-4I6FWGZ5.js";
|
|
60
60
|
import {
|
|
61
61
|
askUser,
|
|
62
62
|
cancelQuestion,
|
|
@@ -73,17 +73,17 @@ import {
|
|
|
73
73
|
waitForQuestion,
|
|
74
74
|
waitsForThePhone,
|
|
75
75
|
withdrawQuestion
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-44O6GG4I.js";
|
|
77
77
|
import {
|
|
78
78
|
getMachineId
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-F5TQ6TCH.js";
|
|
80
80
|
import {
|
|
81
81
|
getApiKey,
|
|
82
82
|
getBaseUrl
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-GSJUGW3A.js";
|
|
84
84
|
import {
|
|
85
85
|
NPX_LATEST_COMMAND
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-JCHF4VR3.js";
|
|
87
87
|
import {
|
|
88
88
|
AGENT_QUESTION_STRATEGY,
|
|
89
89
|
AGENT_QUESTION_TOOL,
|
|
@@ -105,6 +105,7 @@ import {
|
|
|
105
105
|
agentQuestionStrategy,
|
|
106
106
|
agentRulesAllowEveryInput,
|
|
107
107
|
approvalModeWithoutLocalPrompt,
|
|
108
|
+
approvalRouteOutranksAutoMode,
|
|
108
109
|
buildDecisionEpisodeFeatures,
|
|
109
110
|
claudeAllowlistOwnsCall,
|
|
110
111
|
claudeConsultsItsAllowlist,
|
|
@@ -128,6 +129,7 @@ import {
|
|
|
128
129
|
isPermissionRequestOwnedByPreToolUse,
|
|
129
130
|
isPusharyOwnTool,
|
|
130
131
|
isRecord,
|
|
132
|
+
matchedRouteOf,
|
|
131
133
|
parseAgentQuestions,
|
|
132
134
|
permissionsOffAskReason,
|
|
133
135
|
permissionsOffLineAppliesTo,
|
|
@@ -139,7 +141,7 @@ import {
|
|
|
139
141
|
terminalStaysLiveForTheCall,
|
|
140
142
|
timeoutActionWithoutLocalPrompt,
|
|
141
143
|
unansweredRefusalReason
|
|
142
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-KPCVIH52.js";
|
|
143
145
|
|
|
144
146
|
// src/terminal-answer-watch.ts
|
|
145
147
|
import { closeSync, openSync, readSync, statSync } from "fs";
|
|
@@ -491,7 +493,7 @@ var emitDecisionEpisode = (apiKey, input, toolPolicy, machineId, toolTarget, dec
|
|
|
491
493
|
machineId
|
|
492
494
|
});
|
|
493
495
|
};
|
|
494
|
-
var dispatchModeHandler = async (apiKey, input, toolPolicy, machineId, trainingConsent = false, scopeReason, scopePath, terminalLive, askReason) => {
|
|
496
|
+
var dispatchModeHandler = async (apiKey, input, toolPolicy, machineId, trainingConsent = false, scopeReason, scopePath, terminalLive, askReason, matchedRoute) => {
|
|
495
497
|
const description = describeToolCall(input.tool_name, input.tool_input, "hook");
|
|
496
498
|
const projectName = basename(input.cwd ?? process.cwd());
|
|
497
499
|
const sessionId = input.session_id;
|
|
@@ -501,6 +503,7 @@ var dispatchModeHandler = async (apiKey, input, toolPolicy, machineId, trainingC
|
|
|
501
503
|
const intent = readLastPrompt(sessionId ?? DEFAULT_SESSION) ?? (input.transcript_path ? readLastUserPrompt(input.transcript_path) : void 0);
|
|
502
504
|
const decision = {
|
|
503
505
|
toolPath: hookWritePath(input.tool_name, input.tool_input),
|
|
506
|
+
...matchedRoute ? { matchedRoute } : {},
|
|
504
507
|
intent,
|
|
505
508
|
action: deriveAction(input.tool_name, input.tool_input),
|
|
506
509
|
blocker: scopeReason ?? deriveBlocker(toolPolicy.mode, askReason),
|
|
@@ -774,7 +777,7 @@ var handlePreToolUse = async (input, canonical) => {
|
|
|
774
777
|
}
|
|
775
778
|
if (await claimedBlockedActionRetry(apiKey, input)) return allow(BLOCKED_ACTION_ALLOW_REASON);
|
|
776
779
|
if (remindedOfApprovedRetry(input)) return deny(BLOCKED_ACTION_CHANGED_RETRY_REASON);
|
|
777
|
-
if (!(verdict.kind === "gate" && verdict.scopeReason) && shouldDeferToNativeMode(input.permission_mode, input.tool_name)) {
|
|
780
|
+
if (!(verdict.kind === "gate" && verdict.scopeReason) && !approvalRouteOutranksAutoMode(gateInput, verdict, input.permission_mode) && shouldDeferToNativeMode(input.permission_mode, input.tool_name)) {
|
|
778
781
|
return void 0;
|
|
779
782
|
}
|
|
780
783
|
if (claudeAllowlistOwnsCall(gateInput, verdict, input.permission_mode, claudePermissionRulesFor(input))) return void 0;
|
|
@@ -791,7 +794,7 @@ var handlePreToolUse = async (input, canonical) => {
|
|
|
791
794
|
return undecidedCall(SOLE_GATE_UNDECIDED_REASON);
|
|
792
795
|
default:
|
|
793
796
|
if (preToolUseHandsOff(input, gateInput, verdict)) return ask(TERMINAL_AND_PHONE_REASON);
|
|
794
|
-
return await dispatchModeHandler(apiKey, input, verdict.policy, getMachineId(), modeState.trainingConsent, verdict.scopeReason, verdict.scopePath, void 0, permissionsOffAskReason(gateInput, verdict));
|
|
797
|
+
return await dispatchModeHandler(apiKey, input, verdict.policy, getMachineId(), modeState.trainingConsent, verdict.scopeReason, verdict.scopePath, void 0, permissionsOffAskReason(gateInput, verdict), matchedRouteOf(gateInput));
|
|
795
798
|
}
|
|
796
799
|
} catch (error) {
|
|
797
800
|
await reportHookFailure("pre_tool_use_failed", error);
|
|
@@ -839,7 +842,7 @@ var handlePermissionRequest = async (input, canonical, holdBudgetSeconds) => {
|
|
|
839
842
|
const scopeQuestion = verdict.kind === "gate" && Boolean(verdict.scopeReason);
|
|
840
843
|
const preToolUseRanForTheCall = PRETOOLUSE_HANDLED_TOOLS.has(input.tool_name) && isAdmitted(readAdmissionRules(), "claude", "PreToolUse");
|
|
841
844
|
const preToolUseAskedTheScopeQuestion = scopeQuestion && terminalLive && preToolUseRanForTheCall;
|
|
842
|
-
const preToolUseOwnsTheCall = !scopeQuestion && !claudeAllowlistOwnsCall(gateInput, verdict, input.permission_mode, claudeRules) && isPermissionRequestOwnedByPreToolUse(input.tool_name, input.permission_mode, shouldDeferToNativeMode);
|
|
845
|
+
const preToolUseOwnsTheCall = !scopeQuestion && !claudeAllowlistOwnsCall(gateInput, verdict, input.permission_mode, claudeRules) && (isPermissionRequestOwnedByPreToolUse(input.tool_name, input.permission_mode, shouldDeferToNativeMode) || preToolUseRanForTheCall && approvalRouteOutranksAutoMode(gateInput, verdict, input.permission_mode));
|
|
843
846
|
if (!handedOff && (preToolUseAskedTheScopeQuestion || preToolUseOwnsTheCall)) return void 0;
|
|
844
847
|
const terminalLiveDispatch = handedOff ? { holdBudgetSeconds } : void 0;
|
|
845
848
|
switch (verdict.kind) {
|
|
@@ -850,7 +853,7 @@ var handlePermissionRequest = async (input, canonical, holdBudgetSeconds) => {
|
|
|
850
853
|
return void 0;
|
|
851
854
|
default:
|
|
852
855
|
return toPermissionRequestOutput(
|
|
853
|
-
await dispatchModeHandler(apiKey, input, verdict.policy, getMachineId(), modeState.trainingConsent, verdict.scopeReason, verdict.scopePath, terminalLiveDispatch, permissionsOffAskReason(gateInput, verdict))
|
|
856
|
+
await dispatchModeHandler(apiKey, input, verdict.policy, getMachineId(), modeState.trainingConsent, verdict.scopeReason, verdict.scopePath, terminalLiveDispatch, permissionsOffAskReason(gateInput, verdict), matchedRouteOf(gateInput))
|
|
854
857
|
);
|
|
855
858
|
}
|
|
856
859
|
} catch (error) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autoUpdateLock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RLBTKTOK.js";
|
|
4
4
|
import {
|
|
5
5
|
installPackageGlobally,
|
|
6
6
|
npmErrorMessage,
|
|
7
7
|
npmExitedOnPermissionDenied
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RIBCPWOB.js";
|
|
9
9
|
import {
|
|
10
10
|
writeJsonAtomic
|
|
11
11
|
} from "./chunk-T5I4PKOQ.js";
|
|
@@ -399,9 +399,9 @@ var installGlobally = (options) => {
|
|
|
399
399
|
}
|
|
400
400
|
const started = (async () => {
|
|
401
401
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
402
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
403
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
404
|
-
const { autoUpdateLock } = await import("./paths-
|
|
402
|
+
const { withUpgradeLock } = await import("./global-upgrade-LDIMKAPF.js");
|
|
403
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-76Z2YLIV.js");
|
|
404
|
+
const { autoUpdateLock } = await import("./paths-H5LP5HJB.js");
|
|
405
405
|
let result = "skipped";
|
|
406
406
|
const install = async () => {
|
|
407
407
|
const platform = process.platform;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
formatVersion,
|
|
4
4
|
quoteIfNeeded,
|
|
5
5
|
shellDoubleQuoted
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RIBCPWOB.js";
|
|
7
7
|
import {
|
|
8
8
|
writeFileAtomic
|
|
9
9
|
} from "./chunk-T5I4PKOQ.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
HOOK_LOCATOR_BINARY,
|
|
18
18
|
PRETOOLUSE_GATED_TOOLS,
|
|
19
19
|
withHookHoldBudget
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KPCVIH52.js";
|
|
21
21
|
|
|
22
22
|
// src/setup/paths.ts
|
|
23
23
|
import { createHash as createHash2 } from "crypto";
|