pushary 1.9.221 → 1.9.223
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 +10 -0
- package/dist/{api-JTOIAJHT.js → api-X5T6LZ3S.js} +11 -11
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +28 -28
- package/dist/bin/pushary-bell.js +12 -12
- package/dist/bin/pushary-calls.js +15 -15
- package/dist/bin/pushary-claude.js +26 -26
- package/dist/bin/pushary-clean.js +39 -39
- package/dist/bin/pushary-codex-bridge.js +23 -23
- package/dist/bin/pushary-codex-hook.js +45 -38
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +16 -16
- package/dist/bin/pushary-connect.js +35 -35
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +46 -46
- package/dist/bin/pushary-disconnect.js +30 -30
- package/dist/bin/pushary-display-hook.js +201 -2
- package/dist/bin/pushary-doctor.js +47 -47
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +18 -18
- package/dist/bin/pushary-gemini-hook.js +31 -31
- package/dist/bin/pushary-hook.js +34 -34
- package/dist/bin/pushary-login.js +22 -22
- package/dist/bin/pushary-logout.js +30 -30
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +16 -16
- package/dist/bin/pushary-notification-hook.js +27 -27
- package/dist/bin/pushary-opencode-bridge.js +22 -22
- package/dist/bin/pushary-opencode-hook.js +32 -32
- package/dist/bin/pushary-permission-denied-hook.js +34 -34
- package/dist/bin/pushary-permission-hook.js +34 -34
- package/dist/bin/pushary-post-hook.js +28 -28
- package/dist/bin/pushary-prompt-hook.js +27 -27
- package/dist/bin/pushary-session-end-hook.js +27 -27
- package/dist/bin/pushary-session-start-hook.js +39 -39
- package/dist/bin/pushary-sessions.js +14 -14
- package/dist/bin/pushary-setup.js +57 -57
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +36 -36
- package/dist/bin/pushary-stop-hook.js +27 -27
- package/dist/bin/pushary-stopfailure-hook.js +27 -27
- package/dist/bin/pushary-suggestions.js +16 -16
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +25 -25
- package/dist/bin/pushary-upgrade.js +46 -46
- package/dist/bin/pushary-wait.js +16 -16
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-45RB4A5I.js → chunk-2WCRYD36.js} +3 -3
- package/dist/{chunk-HWGF3NYS.js → chunk-2XBQUAAQ.js} +1 -1
- package/dist/{chunk-OLFIEDEY.js → chunk-3B4BB2LJ.js} +3 -3
- package/dist/{chunk-SUNV63JU.js → chunk-3P3ZMU7B.js} +3 -3
- package/dist/{chunk-5MTASFSB.js → chunk-3R4CEEHQ.js} +4 -4
- package/dist/{chunk-IQ2HY4D5.js → chunk-4CDPEMDJ.js} +5 -5
- package/dist/{chunk-SY7IDQEJ.js → chunk-4JHIJ4OJ.js} +3 -3
- package/dist/{chunk-7DSSWYIS.js → chunk-5DKNMDWN.js} +5 -5
- package/dist/{chunk-YYQHBOQB.js → chunk-64WMNIQC.js} +5 -5
- package/dist/{chunk-GL7RJODG.js → chunk-7JARG67E.js} +1 -1
- package/dist/{chunk-WZ3FGOGX.js → chunk-AGG6LETT.js} +2 -2
- package/dist/{chunk-VFVLM6OC.js → chunk-ALR3X422.js} +2 -2
- package/dist/{chunk-UK66PEWW.js → chunk-BUMMDF5J.js} +4 -4
- package/dist/{chunk-RZYGO6AP.js → chunk-CQLMRVX5.js} +5 -5
- package/dist/{chunk-DKDURRNS.js → chunk-CSUODWDB.js} +2 -2
- package/dist/{chunk-DUDBTT3J.js → chunk-CTQQJRUA.js} +4 -4
- package/dist/{chunk-US6SM7WS.js → chunk-DC636WMQ.js} +1 -1
- package/dist/{chunk-3YBPITHZ.js → chunk-FFBYRJGV.js} +1 -1
- package/dist/{chunk-SHJMSG2V.js → chunk-G4SWIS2Y.js} +206 -10
- package/dist/{chunk-UIWTGSZP.js → chunk-GCMK3VXS.js} +6 -6
- package/dist/{chunk-4JBJ47K7.js → chunk-GFW22JD2.js} +6 -6
- package/dist/{chunk-A4WF3WDA.js → chunk-GK5NHKHZ.js} +5 -5
- package/dist/{chunk-TXBAJEMC.js → chunk-GRDGSCBG.js} +1 -1
- package/dist/{chunk-I6ODTB3M.js → chunk-GVFB5AKN.js} +2 -2
- package/dist/{chunk-U6O6UBGW.js → chunk-ICSD7LN4.js} +1 -1
- package/dist/{chunk-ZHF2HQAH.js → chunk-J7QBD4DE.js} +4 -4
- package/dist/{chunk-ZRYTUECR.js → chunk-JHRMVHGT.js} +2 -2
- package/dist/{chunk-YEVBZVZH.js → chunk-JOTB5L7O.js} +4 -4
- package/dist/{chunk-UXLGIXAW.js → chunk-JWIQC3WF.js} +3 -3
- package/dist/{chunk-RI3JPM5A.js → chunk-K4IDTHJL.js} +1 -1
- package/dist/{chunk-RLYMOZFR.js → chunk-LGDPCHMP.js} +1 -1
- package/dist/{chunk-2PYVR6W4.js → chunk-LOPLCZAX.js} +2 -2
- package/dist/{chunk-6HWIQEPF.js → chunk-M7QEG3K2.js} +5 -5
- package/dist/{chunk-UWY2QJ6D.js → chunk-MAMP4EJ7.js} +2 -2
- package/dist/{chunk-UW5STDS3.js → chunk-N4K27YEV.js} +1 -1
- package/dist/{chunk-PEVHQDEW.js → chunk-NYAXPY5E.js} +1 -1
- package/dist/{chunk-SCJQGYE6.js → chunk-OKHJTCDR.js} +2 -2
- package/dist/{chunk-3JDBILMC.js → chunk-OP7POIHL.js} +1 -1
- package/dist/{chunk-ZWMQR6TE.js → chunk-OVFBJASR.js} +1 -1
- package/dist/{chunk-PKDV377M.js → chunk-PDTBR225.js} +3 -3
- package/dist/{chunk-EBRDPALD.js → chunk-PTY2IAJ4.js} +1 -1
- package/dist/{chunk-YSJI3CNQ.js → chunk-PZRMYVLV.js} +2 -2
- package/dist/{chunk-GBQC3S6V.js → chunk-Q5GYSKGI.js} +1 -1
- package/dist/{chunk-LV4G3THM.js → chunk-QDSUVUHE.js} +3 -3
- package/dist/{chunk-HQJPT5KI.js → chunk-QFRYXDZZ.js} +4 -4
- package/dist/{chunk-DVFQ2ILC.js → chunk-R7TLCSON.js} +3 -3
- package/dist/{chunk-JNNLSAS5.js → chunk-RMJN7N54.js} +1 -1
- package/dist/{chunk-IV43BDFN.js → chunk-RNNNRCXD.js} +1 -1
- package/dist/{chunk-NOXGXO2D.js → chunk-RZKCK4LK.js} +2 -2
- package/dist/{chunk-H5MSCUQW.js → chunk-S7BDS44G.js} +5 -5
- package/dist/{chunk-JSEHZPLC.js → chunk-SGZK5MO2.js} +4 -4
- package/dist/{chunk-7JNLUN65.js → chunk-SNDI75HM.js} +4 -4
- package/dist/{chunk-JX4AEMKB.js → chunk-SYPGVUS2.js} +1 -1
- package/dist/{chunk-VCN5MOSO.js → chunk-SZBBH434.js} +6 -6
- package/dist/{chunk-6ML2JCSW.js → chunk-TAU3MHDE.js} +4 -4
- package/dist/{chunk-JEOQ4VXD.js → chunk-TVTBMFC4.js} +8 -8
- package/dist/{chunk-LTJI4SBZ.js → chunk-TWOM3CLU.js} +2 -2
- package/dist/{chunk-RX5U2GCR.js → chunk-TYEQMXGQ.js} +3 -3
- package/dist/{chunk-RCRNZ27Z.js → chunk-U6UVOPIR.js} +25 -21
- package/dist/{chunk-RIXQJT7Y.js → chunk-UDDLEK2U.js} +1 -1
- package/dist/{chunk-YW6TMH5Q.js → chunk-UJEV3Y35.js} +2 -2
- package/dist/{chunk-UYW456YU.js → chunk-UJQBN3XT.js} +1 -1
- package/dist/{chunk-624434K4.js → chunk-UP7MVHHD.js} +31 -22
- package/dist/{chunk-HFS627UG.js → chunk-UWZHXJBR.js} +6 -6
- package/dist/{chunk-MLDI6AF3.js → chunk-VANVR3WB.js} +1 -1
- package/dist/{chunk-RETWX7MH.js → chunk-VQ5MSVKX.js} +6 -6
- package/dist/{chunk-BAH3WT7Z.js → chunk-VQRX2GG7.js} +2 -2
- package/dist/{chunk-XVH3M2LX.js → chunk-W4S2I76M.js} +19 -10
- package/dist/{chunk-AN2EIWF3.js → chunk-WSXNNYSC.js} +3 -3
- package/dist/{chunk-KANE733H.js → chunk-WYQOXH6F.js} +1 -1
- package/dist/{chunk-CIETRIS6.js → chunk-X6R5KHZI.js} +5 -5
- package/dist/{chunk-JGD7KVCM.js → chunk-X6UT5PTL.js} +10 -10
- package/dist/{chunk-X3DWEYLO.js → chunk-XKEZ4PF2.js} +3 -3
- package/dist/{chunk-A5MNFZL5.js → chunk-XT5CXME4.js} +9 -9
- package/dist/{chunk-7HMNT5DR.js → chunk-Y64YYEGC.js} +7 -7
- package/dist/{chunk-PVMQE42Q.js → chunk-ZFX7T4MT.js} +7 -7
- package/dist/{chunk-ZROUIAPA.js → chunk-ZNY64HFD.js} +12 -12
- package/dist/{chunk-UDKEHYEH.js → chunk-ZOCAT27A.js} +5 -5
- package/dist/{chunk-TCZ46QAX.js → chunk-ZRWS3KSP.js} +7 -159
- package/dist/{codex-app-cards-switch-2EVH7E5F.js → codex-app-cards-switch-APPNTC56.js} +11 -11
- package/dist/{codex-card-routing-GDVRWK2E.js → codex-card-routing-YXCVSAAQ.js} +2 -2
- package/dist/{codex-desktop-launch-ODHJNOKB.js → codex-desktop-launch-KPDNCMC6.js} +1 -1
- package/dist/{codex-session-launch-J2BVVYQN.js → codex-session-launch-3EIMG7HW.js} +20 -20
- package/dist/{config-6EROWTFW.js → config-723VFL3P.js} +3 -3
- package/dist/{global-upgrade-WTIVMPOJ.js → global-upgrade-ZEXTCG5H.js} +9 -9
- package/dist/{identity-BA4HGNJ5.js → identity-WS6OGN2E.js} +4 -4
- package/dist/{live-capabilities-JLRZCD2P.js → live-capabilities-GMHVKEPV.js} +4 -4
- package/dist/{paths-LLHZWMPM.js → paths-2XWYFNIW.js} +3 -3
- package/dist/reapply-3HCGHQRB.js +74 -0
- package/dist/src/index.js +33 -33
- package/dist/{upgrade-lock-LVC72XIF.js → upgrade-lock-VZC5ZN5M.js} +4 -4
- package/dist/{usage-2WSXDV5P.js → usage-LBR7AOQN.js} +3 -3
- package/package.json +1 -1
- package/dist/reapply-YAEKWAUL.js +0 -74
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
questionWindowOf
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UP7MVHHD.js";
|
|
4
4
|
import {
|
|
5
5
|
UNNAMED_ACTION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W4S2I76M.js";
|
|
7
7
|
import {
|
|
8
8
|
ASK_USER_TIMEOUT_MS,
|
|
9
9
|
WAIT_END_TIMEOUT_MS,
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
isLocalQuestionHandoff,
|
|
13
13
|
unavailableQuestionUnlessRefused,
|
|
14
14
|
waitForQuestion
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GCMK3VXS.js";
|
|
16
16
|
import {
|
|
17
17
|
getMachineId
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-DC636WMQ.js";
|
|
19
19
|
import {
|
|
20
20
|
hookMaxWaitSeconds,
|
|
21
21
|
hookWaitClamped,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
refusesWhenUnanswered,
|
|
25
25
|
ruleApprovesAfterItsFullWindow,
|
|
26
26
|
scopeBreachReasonOf
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-G4SWIS2Y.js";
|
|
28
28
|
|
|
29
29
|
// src/pushed-question.ts
|
|
30
30
|
var scopeQuestionOf = (verdict) => {
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
} from "./chunk-OYIN77HO.js";
|
|
6
6
|
import {
|
|
7
7
|
readMacAppAgentKey
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3R4CEEHQ.js";
|
|
9
9
|
import {
|
|
10
10
|
API_KEYS_PATH
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LOPLCZAX.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-XKEZ4PF2.js";
|
|
15
15
|
import {
|
|
16
16
|
findExportedKeyLines,
|
|
17
17
|
isAdoptedMacAppKey,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
readConfigFileKey,
|
|
22
22
|
readKeySource,
|
|
23
23
|
readMacAppKeyPrefix
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-3B4BB2LJ.js";
|
|
25
25
|
import {
|
|
26
26
|
isValidApiKey
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-G4SWIS2Y.js";
|
|
28
28
|
|
|
29
29
|
// src/cli/held-key-revocation.ts
|
|
30
30
|
var readCliHeldKeys = (profiles) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PZRMYVLV.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe
|
|
6
6
|
} from "./chunk-PM2NRK6Y.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-G4SWIS2Y.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
projectNameFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ICSD7LN4.js";
|
|
4
4
|
import {
|
|
5
5
|
readConfigFileKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3B4BB2LJ.js";
|
|
7
7
|
|
|
8
8
|
// src/bell/fleet.ts
|
|
9
9
|
import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-CXQWDQCJ.js";
|
|
20
20
|
import {
|
|
21
21
|
redactSecretsFromContent
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-G4SWIS2Y.js";
|
|
23
23
|
|
|
24
24
|
// src/shell-quote.ts
|
|
25
25
|
var shellDoubleQuoted = (text) => `"${text.replace(/(["\\$`])/g, "\\$1")}"`;
|
|
@@ -600,9 +600,9 @@ var installGlobally = (options) => {
|
|
|
600
600
|
}
|
|
601
601
|
const started = (async () => {
|
|
602
602
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
603
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
604
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
605
|
-
const { autoUpdateLock } = await import("./paths-
|
|
603
|
+
const { withUpgradeLock } = await import("./global-upgrade-ZEXTCG5H.js");
|
|
604
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-VZC5ZN5M.js");
|
|
605
|
+
const { autoUpdateLock } = await import("./paths-2XWYFNIW.js");
|
|
606
606
|
let result = "skipped";
|
|
607
607
|
const install = async () => {
|
|
608
608
|
const planned = readPlannedSetupInstall(process.platform);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchAsCredential
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2XBQUAAQ.js";
|
|
4
4
|
import {
|
|
5
5
|
keyCheckFromResponse
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XKEZ4PF2.js";
|
|
7
7
|
import {
|
|
8
8
|
installNetworkDefaults
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2WCRYD36.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WYQOXH6F.js";
|
|
13
13
|
import {
|
|
14
14
|
isRecord,
|
|
15
15
|
isToolErrorResult,
|
|
16
16
|
toolFailureCodeOfResult
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-G4SWIS2Y.js";
|
|
18
18
|
|
|
19
19
|
// src/retry.ts
|
|
20
20
|
var isRetryable = (err) => {
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-TCE3J44Z.js";
|
|
4
4
|
import {
|
|
5
5
|
parseVersion
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BUMMDF5J.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-G4SWIS2Y.js";
|
|
10
10
|
|
|
11
11
|
// src/setup/agent-probe.ts
|
|
12
12
|
import { execSync } from "child_process";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZRWS3KSP.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QFRYXDZZ.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PZRMYVLV.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-G4SWIS2Y.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -1834,6 +1834,9 @@ var claudeWakeWaitingOn = (outcome) => {
|
|
|
1834
1834
|
}
|
|
1835
1835
|
};
|
|
1836
1836
|
|
|
1837
|
+
// ../contracts/src/closed-question.ts
|
|
1838
|
+
var CLOSED_QUESTION_WINDOW_MS = 24 * 60 * 60 * 1e3;
|
|
1839
|
+
|
|
1837
1840
|
// ../contracts/src/shell-analysis.ts
|
|
1838
1841
|
var SHELL_WORD_SEPARATOR = /[ \t\n]/;
|
|
1839
1842
|
var ARITHMETIC_EVALUATING_EXPANSION = /\$[#+=~^]*(?:[A-Za-z_][A-Za-z0-9_]*|[0-9]+|[-?$!@*#])?\[/;
|
|
@@ -3105,6 +3108,166 @@ var powerShellCommandHasAVisibleConsequence = (command, judge) => {
|
|
|
3105
3108
|
return powerShellReadingIsDestructive(reading, judge) || stages.some((stage) => stageHasAVisibleConsequence(stage, judge)) || reading.statements.some(listsRecursivelyIntoARemoval) || runsFetchedPowerShellCode(stages, judge) || runsADownloadedFile(stages, judge) || reading.posixCommands.some((words) => judge.commandShowsAConsequence(words));
|
|
3106
3109
|
};
|
|
3107
3110
|
|
|
3111
|
+
// ../contracts/src/agent-enforcement.ts
|
|
3112
|
+
var TOOL_CALL_BLOCK = {
|
|
3113
|
+
beforeMatchedCalls: "before_matched_calls",
|
|
3114
|
+
whenAgentAsks: "when_agent_asks",
|
|
3115
|
+
cannotBlock: "cannot_block"
|
|
3116
|
+
};
|
|
3117
|
+
var LOCAL_PROMPT = {
|
|
3118
|
+
agentsOwnPrompt: "agents_own_prompt",
|
|
3119
|
+
variesByEvent: "varies_by_event",
|
|
3120
|
+
refusalInstead: "refusal_instead",
|
|
3121
|
+
noHook: "no_hook"
|
|
3122
|
+
};
|
|
3123
|
+
var HOOK_FAILURE = {
|
|
3124
|
+
agentsOwnApproval: "agents_own_approval",
|
|
3125
|
+
variesByEvent: "varies_by_event",
|
|
3126
|
+
refusedOnPosix: "refused_on_posix",
|
|
3127
|
+
notVerifiableInThisRepo: "not_verifiable_in_this_repo",
|
|
3128
|
+
hostBlocksTheCall: "host_blocks_the_call",
|
|
3129
|
+
noHook: "no_hook"
|
|
3130
|
+
};
|
|
3131
|
+
var NO_HOOK_NOTHING_GATED = "Everything. There is no hook, so the agent only reaches a person when it chooses to call Pushary.";
|
|
3132
|
+
var NO_HOOK = {
|
|
3133
|
+
blocksToolCallBeforeItRuns: TOOL_CALL_BLOCK.cannotBlock,
|
|
3134
|
+
phoneCanAnswerTheBlock: false,
|
|
3135
|
+
localPrompt: LOCAL_PROMPT.noHook,
|
|
3136
|
+
whenHookIsMissing: HOOK_FAILURE.noHook,
|
|
3137
|
+
whenHookCrashes: HOOK_FAILURE.noHook,
|
|
3138
|
+
gatedTools: [],
|
|
3139
|
+
notGated: NO_HOOK_NOTHING_GATED
|
|
3140
|
+
};
|
|
3141
|
+
var HOOK_DECIDES_BEFORE_THE_CALL = {
|
|
3142
|
+
blocksToolCallBeforeItRuns: TOOL_CALL_BLOCK.beforeMatchedCalls,
|
|
3143
|
+
phoneCanAnswerTheBlock: true
|
|
3144
|
+
};
|
|
3145
|
+
var FAILS_TO_THE_AGENTS_OWN_APPROVAL = {
|
|
3146
|
+
whenHookIsMissing: HOOK_FAILURE.agentsOwnApproval,
|
|
3147
|
+
whenHookCrashes: HOOK_FAILURE.agentsOwnApproval
|
|
3148
|
+
};
|
|
3149
|
+
var CLAUDE_SHAPED_GATED_TOOLS = ["Bash", "Write", "Edit", "MultiEdit", "NotebookEdit", "PowerShell", "Monitor", "mcp__.*"];
|
|
3150
|
+
var CLAUDE_SHAPED_NOT_GATED = "Any tool outside the matcher, such as reads, searches and web fetches. Those only reach a person if this agent raises its own prompt and it sends PermissionRequest.";
|
|
3151
|
+
var COMPATIBLE_HOOK_AGENT = {
|
|
3152
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
3153
|
+
...FAILS_TO_THE_AGENTS_OWN_APPROVAL,
|
|
3154
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
3155
|
+
gatedTools: CLAUDE_SHAPED_GATED_TOOLS,
|
|
3156
|
+
notGated: CLAUDE_SHAPED_NOT_GATED
|
|
3157
|
+
};
|
|
3158
|
+
var GROK_ALWAYS_APPROVE = { label: "Always-approve", permissionModes: ["bypassPermissions"] };
|
|
3159
|
+
var MODE_THAT_RUNS_A_HANDED_BACK_CALL = { grok: GROK_ALWAYS_APPROVE };
|
|
3160
|
+
var modeThatRunsAHandedBackCall = (agentType) => Object.entries(MODE_THAT_RUNS_A_HANDED_BACK_CALL).find(([id]) => id === agentType)?.[1] ?? null;
|
|
3161
|
+
var reportedAutoApprovingMode = (agentType, permissionMode) => {
|
|
3162
|
+
const mode = modeThatRunsAHandedBackCall(agentType);
|
|
3163
|
+
if (mode === null || typeof permissionMode !== "string") return null;
|
|
3164
|
+
return mode.permissionModes.includes(permissionMode) ? mode : null;
|
|
3165
|
+
};
|
|
3166
|
+
var AGENT_ENFORCEMENT = {
|
|
3167
|
+
claude_code: {
|
|
3168
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
3169
|
+
...FAILS_TO_THE_AGENTS_OWN_APPROVAL,
|
|
3170
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
3171
|
+
gatedTools: ["Bash", "Write", "Edit", "MultiEdit", "NotebookEdit", "PowerShell", "Monitor", "AskUserQuestion", "ExitPlanMode"],
|
|
3172
|
+
notGated: "Reads, searches, WebFetch, WebSearch, Task, TodoWrite and third-party MCP tools reach a person only through PermissionRequest, when Claude Code would have asked anyway. In plan, auto and dontAsk modes PreToolUse steps aside unless a scope question or a Team route applies. It also steps aside for edits under acceptEdits and for calls that a Claude Code allowlist rule owns. Under bypassPermissions no opinion means the call runs."
|
|
3173
|
+
},
|
|
3174
|
+
codex: {
|
|
3175
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
3176
|
+
...FAILS_TO_THE_AGENTS_OWN_APPROVAL,
|
|
3177
|
+
localPrompt: LOCAL_PROMPT.variesByEvent,
|
|
3178
|
+
gatedTools: ["Bash", "apply_patch", "mcp__.*", "request_user_input", "request_user_input_async"],
|
|
3179
|
+
notGated: "Any other tool, and every hook until Codex trusts it. PreToolUse can only deny; a hand-back there is refused, and only PermissionRequest falls through to the Codex prompt. With the auto_review approvals reviewer, or when a native mode defers the call, the hook passes it ungated unless a scope question applies. Under bypass no opinion means the call runs."
|
|
3180
|
+
},
|
|
3181
|
+
gemini_cli: {
|
|
3182
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
3183
|
+
...FAILS_TO_THE_AGENTS_OWN_APPROVAL,
|
|
3184
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
3185
|
+
gatedTools: ["run_shell_command", "write_file", "replace", "mcp_.*"],
|
|
3186
|
+
notGated: "read_file and every other built-in tool outside the BeforeTool matcher. The wire has no ask, so a hand-back is empty output, a Gemini running without prompts then runs the call, and a bridge-launched session, which has no prompt, is refused instead."
|
|
3187
|
+
},
|
|
3188
|
+
cursor: {
|
|
3189
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
3190
|
+
localPrompt: LOCAL_PROMPT.variesByEvent,
|
|
3191
|
+
whenHookIsMissing: HOOK_FAILURE.variesByEvent,
|
|
3192
|
+
whenHookCrashes: HOOK_FAILURE.variesByEvent,
|
|
3193
|
+
gatedTools: ["Shell", "MCP:*", "Write", "Delete", "Edit"],
|
|
3194
|
+
notGated: "beforeReadFile is deliberately not registered, so file reads are not gated. preToolUse has no ask, so a file edit nobody can decide is refused where shell and MCP fall back to the Cursor prompt."
|
|
3195
|
+
},
|
|
3196
|
+
vscode: {
|
|
3197
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
3198
|
+
...FAILS_TO_THE_AGENTS_OWN_APPROVAL,
|
|
3199
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
3200
|
+
gatedTools: [".*"],
|
|
3201
|
+
notGated: "Pushary's own tools. Every other named tool reaches the policy, and a read-only tool passes when the gate has no verdict."
|
|
3202
|
+
},
|
|
3203
|
+
opencode: {
|
|
3204
|
+
blocksToolCallBeforeItRuns: TOOL_CALL_BLOCK.whenAgentAsks,
|
|
3205
|
+
phoneCanAnswerTheBlock: true,
|
|
3206
|
+
...FAILS_TO_THE_AGENTS_OWN_APPROVAL,
|
|
3207
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
3208
|
+
gatedTools: ["bash", "edit", "webfetch"],
|
|
3209
|
+
notGated: "Anything OpenCode does not raise as permission.asked. A person's own allow rule for bash, edit or webfetch is kept, and then those are not held either."
|
|
3210
|
+
},
|
|
3211
|
+
hermes: {
|
|
3212
|
+
blocksToolCallBeforeItRuns: TOOL_CALL_BLOCK.whenAgentAsks,
|
|
3213
|
+
phoneCanAnswerTheBlock: true,
|
|
3214
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
3215
|
+
whenHookIsMissing: HOOK_FAILURE.notVerifiableInThisRepo,
|
|
3216
|
+
whenHookCrashes: HOOK_FAILURE.agentsOwnApproval,
|
|
3217
|
+
gatedTools: [],
|
|
3218
|
+
notGated: "Everything Hermes does not flag as a dangerous command, unless named in PUSHARY_GATE_TOOLS, which is empty by default. That list refuses on an error, while the approval transport hands back to Hermes."
|
|
3219
|
+
},
|
|
3220
|
+
openclaw: {
|
|
3221
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
3222
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
3223
|
+
whenHookIsMissing: HOOK_FAILURE.agentsOwnApproval,
|
|
3224
|
+
whenHookCrashes: HOOK_FAILURE.hostBlocksTheCall,
|
|
3225
|
+
gatedTools: ["exec", "process", "plugins", "gateway", "openclaw", "automations", "terminal"],
|
|
3226
|
+
notGated: "The read actions of process, plugins, gateway, openclaw, automations and terminal; write, edit and apply_patch outside the OpenClaw state directories, ~/.pushary, ~/.config/openclaw and the gateway service files, and inside the agent workspace except its hooks folder; and every other OpenClaw tool unless the plugin gatedTools setting names it, such as message or the file-transfer plugin file_write. Tools that an ACP session with approve-all or a CLI backend runs inside its own harness never reach before_tool_call."
|
|
3227
|
+
},
|
|
3228
|
+
qwen_code: COMPATIBLE_HOOK_AGENT,
|
|
3229
|
+
codebuddy: COMPATIBLE_HOOK_AGENT,
|
|
3230
|
+
qoder: COMPATIBLE_HOOK_AGENT,
|
|
3231
|
+
droid: {
|
|
3232
|
+
...COMPATIBLE_HOOK_AGENT,
|
|
3233
|
+
notGated: "Any tool outside the matcher, such as reads, searches and web fetches. Droid registers no PermissionRequest, so those never reach a person through Pushary."
|
|
3234
|
+
},
|
|
3235
|
+
devin: {
|
|
3236
|
+
...COMPATIBLE_HOOK_AGENT,
|
|
3237
|
+
localPrompt: LOCAL_PROMPT.refusalInstead,
|
|
3238
|
+
gatedTools: [...CLAUDE_SHAPED_GATED_TOOLS, "mcp_call_tool", "write_to_process"],
|
|
3239
|
+
notGated: "Any tool outside the matcher, such as reads, searches and web fetches. Devin registers no PermissionRequest, so those never reach a person through Pushary. Its wire turns an ask into a block."
|
|
3240
|
+
},
|
|
3241
|
+
antigravity_cli: {
|
|
3242
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
3243
|
+
localPrompt: LOCAL_PROMPT.refusalInstead,
|
|
3244
|
+
whenHookIsMissing: HOOK_FAILURE.refusedOnPosix,
|
|
3245
|
+
whenHookCrashes: HOOK_FAILURE.notVerifiableInThisRepo,
|
|
3246
|
+
gatedTools: ["Bash", "Write", "Edit", "MultiEdit", "NotebookEdit", "PowerShell", "Monitor", "call_mcp_tool", "manage_task"],
|
|
3247
|
+
notGated: "view_file, read_url_content, search_web, list_resources and read_resource. Deleting the hook entry leaves always-proceed on with nothing watching, and the hook-file guard only covers a missing binary, and not on Windows. A caught error is refused, but nothing here shows what agy does when the hook process dies or exits non-zero."
|
|
3248
|
+
},
|
|
3249
|
+
grok: {
|
|
3250
|
+
...HOOK_DECIDES_BEFORE_THE_CALL,
|
|
3251
|
+
localPrompt: LOCAL_PROMPT.agentsOwnPrompt,
|
|
3252
|
+
whenHookIsMissing: HOOK_FAILURE.refusedOnPosix,
|
|
3253
|
+
whenHookCrashes: HOOK_FAILURE.agentsOwnApproval,
|
|
3254
|
+
gatedTools: [".*"],
|
|
3255
|
+
notGated: "Every call reaches the hook, but the read-only tools (grep, list_dir, glob, read_file, todo_write, search_tool) only honour the kill switch and a deny rule, as Claude Code's reads do. Grok fails open if it kills the hook or cannot start it, the missing-binary guard does not refuse on Windows, and Grok's own permission checks still apply after a phone approval. Its question and plan dialogs stay in Grok."
|
|
3256
|
+
},
|
|
3257
|
+
claude_chat: NO_HOOK,
|
|
3258
|
+
claude_cowork: NO_HOOK,
|
|
3259
|
+
chatgpt: NO_HOOK,
|
|
3260
|
+
fx: NO_HOOK,
|
|
3261
|
+
cline: NO_HOOK,
|
|
3262
|
+
grok_bot: NO_HOOK,
|
|
3263
|
+
muse: NO_HOOK,
|
|
3264
|
+
windsurf: NO_HOOK,
|
|
3265
|
+
unknown: NO_HOOK,
|
|
3266
|
+
lovable: NO_HOOK,
|
|
3267
|
+
mcp: NO_HOOK,
|
|
3268
|
+
http: NO_HOOK
|
|
3269
|
+
};
|
|
3270
|
+
|
|
3108
3271
|
// ../contracts/src/approval-risk.ts
|
|
3109
3272
|
var APPROVAL_RISK_LEVEL = {
|
|
3110
3273
|
normal: "normal",
|
|
@@ -4179,8 +4342,10 @@ var withoutDeclinedAgent = (agents, agent) => agents.filter((candidate) => candi
|
|
|
4179
4342
|
// ../contracts/src/cli-version-standing.ts
|
|
4180
4343
|
var FIRST_AUTO_UPDATING_RELEASE = [1, 5, 0];
|
|
4181
4344
|
var MIN_SAFE_RELEASE = [1, 9, 26];
|
|
4345
|
+
var FIRST_RELEASE_DENYING_AUTO_APPROVED_MISSES = [1, 9, 223];
|
|
4182
4346
|
var FIRST_AUTO_UPDATING_CLI_VERSION = formatReleaseVersion(FIRST_AUTO_UPDATING_RELEASE);
|
|
4183
4347
|
var MIN_SAFE_CLI_VERSION = formatReleaseVersion(MIN_SAFE_RELEASE);
|
|
4348
|
+
var FIRST_CLI_VERSION_DENYING_AUTO_APPROVED_MISSES = formatReleaseVersion(FIRST_RELEASE_DENYING_AUTO_APPROVED_MISSES);
|
|
4184
4349
|
|
|
4185
4350
|
// ../contracts/src/auto-update-report.ts
|
|
4186
4351
|
var AUTO_UPDATE_RESULTS = ["updated", "current", "needs_manual", "failed", "finish_pending", "finish_blocked"];
|
|
@@ -5197,6 +5362,7 @@ var BACKSLASH2 = "\\";
|
|
|
5197
5362
|
var NETWORK_SHARE_PREFIX = "//";
|
|
5198
5363
|
var DOT_SEGMENT = /(?:^|[\\/])\.{1,2}(?=[\\/]|$)/;
|
|
5199
5364
|
var WINDOWS_PATH = /^(?:[A-Za-z]:[\\/]|\\\\)/;
|
|
5365
|
+
var isWindowsRootedPath = (path) => WINDOWS_PATH.test(path);
|
|
5200
5366
|
var FIRST_SEGMENT_WITH_AN_UNKNOWN_BASE = /^(?:~|\$|%|[A-Za-z]:)/;
|
|
5201
5367
|
var hasDotSegment = (path) => DOT_SEGMENT.test(path);
|
|
5202
5368
|
var PATH_SPELLINGS_CACHE_MAX = 64;
|
|
@@ -5227,7 +5393,7 @@ var readingOf = (path, directory) => {
|
|
|
5227
5393
|
const spelling = `${anchor.prefix}${[...Array(climbs).fill(PARENT_SEGMENT), ...kept].join("/")}`;
|
|
5228
5394
|
return { spelling: spelling.length > 0 ? spelling : CURRENT_SEGMENT, standing: standingOf(anchor.base, climbs) };
|
|
5229
5395
|
};
|
|
5230
|
-
var hasOneSeparatorReading = (path, directory) => !path.includes(BACKSLASH2) ||
|
|
5396
|
+
var hasOneSeparatorReading = (path, directory) => !path.includes(BACKSLASH2) || isWindowsRootedPath(path) || directory !== void 0 && DRIVE_ROOT.test(directory);
|
|
5231
5397
|
var separatorReadingsOf = (path, directory) => hasOneSeparatorReading(path, directory) ? [normalizeSeparators(path)] : [path, normalizeSeparators(path)];
|
|
5232
5398
|
var spellingsOfReadings = (readings) => [...new Set(readings.map((reading) => reading.spelling))];
|
|
5233
5399
|
var isPlaced = (reading) => reading.standing === "placed";
|
|
@@ -6463,9 +6629,8 @@ var gitSendsToAPlaceTheCommandNames = ({ program, args }) => {
|
|
|
6463
6629
|
if (GIT_COMMANDS_THAT_SEND_TO_THE_ADDRESS_THEY_ARE_GIVEN.has(subcommand.text)) return true;
|
|
6464
6630
|
return subcommand.text === GIT_PUSH && wordsNamingWhereAGitPushSends(gitArgs.slice(gitArgs.indexOf(subcommand) + 1)).some(mayNameAGitAddress);
|
|
6465
6631
|
};
|
|
6466
|
-
var
|
|
6632
|
+
var changesAFileThatNeedsAPerson = ({ program, args }) => {
|
|
6467
6633
|
if (program === void 0) return false;
|
|
6468
|
-
if (sendsAFileThatNeedsAPerson({ program, args })) return true;
|
|
6469
6634
|
const name = basenameOf(program.text);
|
|
6470
6635
|
const editsInPlace = PERMISSIONS_OFF_EDITS_IN_PLACE.has(name) && args.some((arg) => flagEditsInPlace(name, arg.text));
|
|
6471
6636
|
if (!COPIES_ONTO_ITS_LAST_OPERAND.has(name) && !PERMISSIONS_OFF_WRITES_EVERY_OPERAND.has(name) && !editsInPlace) return false;
|
|
@@ -7467,6 +7632,8 @@ var honoursPreviewFlags = ({ program, args }) => {
|
|
|
7467
7632
|
var onlyPreviews = (invocation) => invocation.program !== void 0 && honoursPreviewFlags(invocation) && invocation.args.some((arg) => !arg.expands && PREVIEW_FLAG.test(arg.text));
|
|
7468
7633
|
var changesWhatIsDeployed = (toolName, invocation, normalized) => !onlyPreviews(invocation) && (changesProduction(invocation) || mergesAPullRequest(invocation) || isCoveredByPolicy(DEPLOY_AND_SCHEMA_COMMAND_PATTERNS, toolName, normalized));
|
|
7469
7634
|
var releasesOrChangesACluster = (toolName, invocation, normalized) => !onlyPreviews(invocation) && (pushesATag(invocation) || publishesAnAppBuild(invocation) || RELEASE_AND_CLUSTER_PROGRAMS.has(basenameOf(invocation.program?.text ?? "")) && isCoveredByPolicy(RELEASE_AND_CLUSTER_COMMAND_PATTERNS, toolName, normalized));
|
|
7635
|
+
var LINES_THAT_ASK_BEFORE_A_PROTECTED_FILE_CHANGES = /* @__PURE__ */ new Set(["posix_standing_allow", "permissions_off"]);
|
|
7636
|
+
var lineAsksBeforeAProtectedFileChanges = (line) => LINES_THAT_ASK_BEFORE_A_PROTECTED_FILE_CHANGES.has(line);
|
|
7470
7637
|
var MAIL_TRANSFER_PROGRAMS = /* @__PURE__ */ new Set(["sendmail", "msmtp", "ssmtp"]);
|
|
7471
7638
|
var MAIL_CLIENTS = /* @__PURE__ */ new Set(["mail", "mailx", "mutt", "s-nail", "nail"]);
|
|
7472
7639
|
var MAIL_TRANSFER_MODE_THAT_ONLY_READS = /^(?:-b[ptv]|--help|--version|-V|--serverinfo|--pretend)$/;
|
|
@@ -7487,14 +7654,14 @@ var stopsTheMachine = ({ program, args }) => {
|
|
|
7487
7654
|
const name = program === void 0 ? void 0 : basenameOf(program.text);
|
|
7488
7655
|
return name !== void 0 && PROGRAMS_THAT_STOP_THE_MACHINE.has(name) && !args.some((arg) => ONLY_DESCRIBES_ITSELF.test(arg.text)) && !(name === SHUTDOWN && args.some((arg) => arg.text === CANCELS_A_SHUTDOWN));
|
|
7489
7656
|
};
|
|
7490
|
-
var invocationHasAConsequenceOnlyPermissionsOffAsksAbout = (toolName, invocation, normalized, reading) => releasesOrChangesACluster(toolName, invocation, normalized) || reading === "as_written" && changesAPublishedPackage(invocation) || mergesAPullRequestByAnyPath(invocation) ||
|
|
7657
|
+
var invocationHasAConsequenceOnlyPermissionsOffAsksAbout = (toolName, invocation, normalized, reading) => releasesOrChangesACluster(toolName, invocation, normalized) || reading === "as_written" && changesAPublishedPackage(invocation) || mergesAPullRequestByAnyPath(invocation) || sendsAFileThatNeedsAPerson(invocation) || changesWhereGitLooksForHooks(invocation) || setsAGitSettingThatRunsAProgram(invocation) || changesWhereGitSends(invocation) || gitSendsToAPlaceTheCommandNames(invocation) || changesSomethingHostedElsewhere(invocation) || sendsMail(invocation) || stopsTheMachine(invocation);
|
|
7491
7658
|
var invocationHasAVisibleConsequence = (toolName, invocation, depth, line, reading = "as_written") => {
|
|
7492
7659
|
if (depth > MAX_CONSEQUENCE_DEPTH) return true;
|
|
7493
7660
|
if (invocation.program === void 0) return false;
|
|
7494
7661
|
const normalized = quotedInvocation(invocation);
|
|
7495
7662
|
const innermost = innermostInvocation(invocation);
|
|
7496
7663
|
const script = shellScriptOf(invocation);
|
|
7497
|
-
return classifyDecisionRisk(toolName, normalized) === "destructive" || changesWhatIsDeployed(toolName, invocation, normalized) || writesASecretFile(invocation) || line === "permissions_off" && invocationHasAConsequenceOnlyPermissionsOffAsksAbout(toolName, invocation, normalized, reading) || losesDataVisibly(toolName, invocation, normalized, depth, line) || subcommandDestroysVisibly(invocation) || sqlClientChangesData(invocation) || innermost !== invocation && invocationHasAVisibleConsequence(toolName, innermost, depth, line) || script === null && passesAnInlineScript(invocation) || script !== null && commandHasAVisibleConsequenceAt(toolName, script, depth + 1, line) || readingsPastGlobalFlags(invocation).some((pastFlags) => invocationHasAVisibleConsequence(toolName, pastFlags, depth + 1, line, "past_global_flags"));
|
|
7664
|
+
return classifyDecisionRisk(toolName, normalized) === "destructive" || changesWhatIsDeployed(toolName, invocation, normalized) || writesASecretFile(invocation) || lineAsksBeforeAProtectedFileChanges(line) && changesAFileThatNeedsAPerson(invocation) || line === "permissions_off" && invocationHasAConsequenceOnlyPermissionsOffAsksAbout(toolName, invocation, normalized, reading) || losesDataVisibly(toolName, invocation, normalized, depth, line) || subcommandDestroysVisibly(invocation) || sqlClientChangesData(invocation) || innermost !== invocation && invocationHasAVisibleConsequence(toolName, innermost, depth, line) || script === null && passesAnInlineScript(invocation) || script !== null && commandHasAVisibleConsequenceAt(toolName, script, depth + 1, line) || readingsPastGlobalFlags(invocation).some((pastFlags) => invocationHasAVisibleConsequence(toolName, pastFlags, depth + 1, line, "past_global_flags"));
|
|
7498
7665
|
};
|
|
7499
7666
|
var RUNS_FETCHED_CODE = /(?:\$\(|`|<\()\s*(?:curl|wget)\b/;
|
|
7500
7667
|
var RUNS_DECODED_CODE = /(?:^|[;&|(\s])(?:bash|sh|zsh|source|\.|python3?|node|ruby|perl)\s+(?:-[A-Za-z]+\s+)*["']?(?:<\(|\$\()[^)]*\b(?:base64|xxd|openssl)\b/;
|
|
@@ -7776,12 +7943,12 @@ var roughReadingHasAVisibleConsequence = (toolName, command, depth, line) => {
|
|
|
7776
7943
|
const producesHiddenCode = invocations.some(producesCodeTheLineCannotSee(line));
|
|
7777
7944
|
return segments.some((segment) => roughSegmentHasAVisibleConsequence(toolName, segment, producesHiddenCode, depth, line)) || runsADownloadedScript(invocations) || line === "permissions_off" && runsInterpreterCodeThatNeedsAPerson(command, invocations, depth);
|
|
7778
7945
|
};
|
|
7779
|
-
var commandHidesWhatItWritesOrRuns = (command, readable) => RUNS_DECODED_CODE.test(readable) || redirectsIntoAFileThatNeedsAPerson(command);
|
|
7780
7946
|
var commandHasAVisibleConsequenceAt = (toolName, command, depth, line) => {
|
|
7781
7947
|
if (toolName === "Bash" && isSafeReadOnlyCommand(command)) return false;
|
|
7782
7948
|
const readable = withHeredocSubstitutionsAsQuotedText(command);
|
|
7783
7949
|
if (classifyDecisionRisk(toolName, readable) === "destructive" || RUNS_FETCHED_CODE.test(readable) || REDIRECTS_INTO_A_SECRET_FILE.test(readable)) return true;
|
|
7784
|
-
if (line === "permissions_off" &&
|
|
7950
|
+
if (line === "permissions_off" && RUNS_DECODED_CODE.test(readable)) return true;
|
|
7951
|
+
if (lineAsksBeforeAProtectedFileChanges(line) && redirectsIntoAFileThatNeedsAPerson(command)) return true;
|
|
7785
7952
|
const segments = readableCommandSegments(command);
|
|
7786
7953
|
if (segments === null) return roughReadingHasAVisibleConsequence(toolName, command, depth, line);
|
|
7787
7954
|
const invocations = segments.map((segment) => invocationOf(withoutShellGrouping(segment)));
|
|
@@ -7814,7 +7981,8 @@ var posixShellJudgeFor = (toolName, line = "standing_allow") => ({
|
|
|
7814
7981
|
});
|
|
7815
7982
|
var commandIsDestructive = (toolName, command) => shellDialectOf(toolName) === "powershell" ? powerShellCommandIsDestructive(command, posixShellJudgeFor(toolName)) : aReadingIsDestructive(toolName, command);
|
|
7816
7983
|
var commandHasAConsequenceOnTheLine = (toolName, command, line) => shellDialectOf(toolName) === "powershell" ? powerShellCommandHasAVisibleConsequence(command, posixShellJudgeFor(toolName, line)) : commandHasAVisibleConsequenceAt(toolNameForAPosixReading(toolName), command, 0, line);
|
|
7817
|
-
var
|
|
7984
|
+
var lineAnAlwaysAllowDraws = (toolName) => shellDialectOf(toolName) === "posix" ? "posix_standing_allow" : "standing_allow";
|
|
7985
|
+
var commandHasAVisibleConsequence = (toolName, command) => commandHasAConsequenceOnTheLine(toolName, command, lineAnAlwaysAllowDraws(toolName));
|
|
7818
7986
|
var commandHasAConsequenceWithPermissionsOff = (toolName, command) => commandHasAConsequenceOnTheLine(toolName, command, "permissions_off");
|
|
7819
7987
|
var MAX_SPELLING_DEPTH = 3;
|
|
7820
7988
|
var GIT_GLOBAL_OPTIONS_WITH_A_VALUE = /* @__PURE__ */ new Set([
|
|
@@ -9945,6 +10113,11 @@ var HAND_BACK_TO_THE_AGENTS_PROMPT = { kind: "agent_prompt" };
|
|
|
9945
10113
|
var HAND_BACK_WITHOUT_A_PROMPT = { kind: "refuse", reason: NO_AGENT_PROMPT_REASON };
|
|
9946
10114
|
var CODEX_HAND_BACK_REASON = "You chose to handle this on your machine, so it did not run. Ask Codex to run it again while you are at your computer, or run it yourself.";
|
|
9947
10115
|
var CODEX_PRE_TOOL_USE_HAND_BACK = { kind: "refuse", reason: CODEX_HAND_BACK_REASON };
|
|
10116
|
+
var unansweredInAutoApprovingModeReason = (agentLabel, mode) => `No answer from your phone. Denied because ${agentLabel} is in ${mode.label} mode, which would run it without asking.`;
|
|
10117
|
+
var missedAnswerHandBack = ({ agentType, agentLabel, permissionMode }) => {
|
|
10118
|
+
const mode = reportedAutoApprovingMode(agentType, permissionMode);
|
|
10119
|
+
return mode === null ? HAND_BACK_TO_THE_AGENTS_PROMPT : { kind: "refuse", reason: unansweredInAutoApprovingModeReason(agentLabel, mode) };
|
|
10120
|
+
};
|
|
9948
10121
|
var QUESTION_LIMIT_REASON = "Pushary already has as many open questions in this session as it allows, so nobody was asked about this and it did not run. Wait until the person answers or cancels one before trying it again.";
|
|
9949
10122
|
var QUESTION_LIMIT_PROMPT_REASON = "Pushary has too many open questions in this session, so this was not sent to the phone. Approve it here.";
|
|
9950
10123
|
var QUESTION_LIMIT_REFUSAL = { kind: "refuse", reason: QUESTION_LIMIT_REASON };
|
|
@@ -9986,14 +10159,32 @@ var codexCallIsDestructive = (input, call) => call.deletesFiles || runsADestruct
|
|
|
9986
10159
|
var connectorCallOnlyReads = ({ toolName, toolInputs }) => isCodexConnectorTool(toolName) && mcpToolOnlyReads(toolName) && !mcpToolAppNamesADatabase(toolName) && toolInputs.length > 0 && toolInputs.every((toolInput) => mcpToolInputOnlyReads(toolName, toolInput));
|
|
9987
10160
|
var fullAccessRunsThisConnectorReadUnasked = (input, verdict, call) => !codexRaisesItsOwnPrompts(call.permissionMode) && scopeBreachReasonOf(verdict) === void 0 && noModeOverrideIsActive(input) && connectorCallOnlyReads(input);
|
|
9988
10161
|
var codexCallNeedsAPerson = (input, verdict, call) => onlyCodexPreToolUseCanAsk(verdict, call.permissionMode) && !fullAccessRunsThisConnectorReadUnasked(input, verdict, call) || verdict.kind === "gate" && (aChosenRuleGoverns(input) || call.deletesFiles || runsACommandThatNeedsAPerson(input) || editsAFileThatNeedsAPerson(input) || theProtectedFileFloorHoldsAnAllow(input));
|
|
10162
|
+
var MODES_THAT_RING_THE_PHONE = `${APPROVAL_MODE_META.push_only.label} or ${APPROVAL_MODE_META.push_first.label}`;
|
|
10163
|
+
var PROTECTED_FILE_NEEDS_A_PERSON_REASON = `Pushary did not run this patch. It changes a protected file, which needs a person, and in this Pushary mode no question reaches anyone, so trying again gets the same refusal. Tell the user. To let it run, they can add a rule for this exact file in Pushary's Policies, such as Edit(AGENTS.md) for AGENTS.md, switch the Pushary mode to ${MODES_THAT_RING_THE_PHONE}, which ask on the phone, or make the edit themselves.`;
|
|
10164
|
+
var PROTECTED_FILE_EDIT_REFUSED_TITLE = "Protected file edit refused";
|
|
10165
|
+
var protectedFileEditRefusedAlert = (description) => ({
|
|
10166
|
+
title: PROTECTED_FILE_EDIT_REFUSED_TITLE,
|
|
10167
|
+
body: `${description}. ${APPROVAL_MODE_META.notify_only.label} asks nobody about a protected file, so it did not run. Add a rule for this exact file, switch to ${MODES_THAT_RING_THE_PHONE}, or make the edit yourself.`
|
|
10168
|
+
});
|
|
10169
|
+
var MODE_THAT_ALERTS_WITHOUT_ASKING = "notify_only";
|
|
9989
10170
|
var CODEX_PRE_TOOL_USE_PASSES = { kind: "pass" };
|
|
9990
10171
|
var codexOwnPromptCannotTakeTheCall = (input, call) => codexCallIsDestructive(input, call) || theProtectedFileFloorHoldsAnAllow(input);
|
|
10172
|
+
var nobodyIsAskedAboutAFloorHeldEdit = (floorHoldsAnAllow, verdict, mode) => floorHoldsAnAllow && scopeBreachReasonOf(verdict) === void 0 && approvalWaitsAtTheAgentsPrompt(mode);
|
|
10173
|
+
var refusalOfAFloorHeldEditNobodyIsAskedAbout = (policy) => ({
|
|
10174
|
+
kind: "refuse",
|
|
10175
|
+
policy,
|
|
10176
|
+
reason: PROTECTED_FILE_NEEDS_A_PERSON_REASON,
|
|
10177
|
+
alertsThePerson: policy.mode === MODE_THAT_ALERTS_WITHOUT_ASKING
|
|
10178
|
+
});
|
|
9991
10179
|
var codexPreToolUseDelivery = (input, verdict, call) => {
|
|
9992
10180
|
if (verdict.kind !== "gate" || !codexCallNeedsAPerson(input, verdict, call)) return CODEX_PRE_TOOL_USE_PASSES;
|
|
9993
|
-
const
|
|
10181
|
+
const floorHoldsAnAllow = theProtectedFileFloorHoldsAnAllow(input);
|
|
10182
|
+
const noPromptOfItsOwn = floorHoldsAnAllow || codexHasNoPromptOfItsOwn(scopeBreachReasonOf(verdict), call.permissionMode);
|
|
9994
10183
|
const mode = noPromptOfItsOwn ? approvalModeWithoutLocalPrompt(verdict.policy.mode) : verdict.policy.mode;
|
|
9995
10184
|
if (mode === "push_first" && !codexOwnPromptCannotTakeTheCall(input, call)) return CODEX_PRE_TOOL_USE_PASSES;
|
|
9996
|
-
|
|
10185
|
+
const policy = { ...verdict.policy, mode };
|
|
10186
|
+
if (nobodyIsAskedAboutAFloorHeldEdit(floorHoldsAnAllow, verdict, mode)) return refusalOfAFloorHeldEditNobodyIsAskedAbout(policy);
|
|
10187
|
+
return { kind: "ask", policy, agentPromptFollows: !noPromptOfItsOwn };
|
|
9997
10188
|
};
|
|
9998
10189
|
var MAX_AGENT_PERMISSION_RULES_PER_KIND = 256;
|
|
9999
10190
|
var MAX_AGENT_PERMISSION_RULE_LENGTH = 512;
|
|
@@ -10690,6 +10881,8 @@ export {
|
|
|
10690
10881
|
hookCompatibleProfileBySource,
|
|
10691
10882
|
compatibleProfileFor,
|
|
10692
10883
|
compatibleTargetFiles,
|
|
10884
|
+
HOOK_FAILURE,
|
|
10885
|
+
AGENT_ENFORCEMENT,
|
|
10693
10886
|
isDecisionStoppedReply,
|
|
10694
10887
|
isAskUserReply,
|
|
10695
10888
|
DECISION_LINE_MAX,
|
|
@@ -10812,6 +11005,7 @@ export {
|
|
|
10812
11005
|
TOOL_NAME_MAX_LENGTH,
|
|
10813
11006
|
normalizeRepoRemote,
|
|
10814
11007
|
localRepoKey,
|
|
11008
|
+
isWindowsRootedPath,
|
|
10815
11009
|
isSafeReadOnlyCommand,
|
|
10816
11010
|
isAutoApprove,
|
|
10817
11011
|
FILE_TARGET_TOOLS,
|
|
@@ -10876,11 +11070,13 @@ export {
|
|
|
10876
11070
|
codexUnansweredPreToolUse,
|
|
10877
11071
|
HANDED_BACK_REASON,
|
|
10878
11072
|
HAND_BACK_WITHOUT_A_PROMPT,
|
|
11073
|
+
missedAnswerHandBack,
|
|
10879
11074
|
QUESTION_LIMIT_PROMPT_REASON,
|
|
10880
11075
|
questionLimitHandBack,
|
|
10881
11076
|
refusesWhenUnanswered,
|
|
10882
11077
|
codexDeferredPreToolUse,
|
|
10883
11078
|
scopeBreachReasonOf,
|
|
11079
|
+
protectedFileEditRefusedAlert,
|
|
10884
11080
|
codexPreToolUseDelivery,
|
|
10885
11081
|
claudePermissionRulesFromSettings,
|
|
10886
11082
|
claudeConsultsItsAllowlist,
|
|
@@ -8,21 +8,21 @@ import {
|
|
|
8
8
|
SubscriptionRequiredError,
|
|
9
9
|
callMcpTool,
|
|
10
10
|
isRetryable
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CQLMRVX5.js";
|
|
12
12
|
import {
|
|
13
13
|
fetchAsCredential
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2XBQUAAQ.js";
|
|
15
15
|
import {
|
|
16
16
|
installNetworkDefaults,
|
|
17
17
|
isNetworkFailure
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-2WCRYD36.js";
|
|
19
19
|
import {
|
|
20
20
|
clientReportClaims
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PZRMYVLV.js";
|
|
22
22
|
import {
|
|
23
23
|
getApiKey,
|
|
24
24
|
getBaseUrl
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WYQOXH6F.js";
|
|
26
26
|
import {
|
|
27
27
|
ASK_AGENT_NAME_MAX,
|
|
28
28
|
CLIENT_REPORT_PATH,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
isRecord,
|
|
39
39
|
truncateLine,
|
|
40
40
|
waitEndAnswered
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-G4SWIS2Y.js";
|
|
42
42
|
|
|
43
43
|
// src/api.ts
|
|
44
44
|
import { randomUUID } from "crypto";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_RULES_PATH,
|
|
3
3
|
canChangeApprovalSettings
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LOPLCZAX.js";
|
|
5
5
|
import {
|
|
6
6
|
callMcpTool
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CQLMRVX5.js";
|
|
8
8
|
import {
|
|
9
9
|
absoluteUrl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XKEZ4PF2.js";
|
|
11
11
|
import {
|
|
12
12
|
getBaseUrl
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WYQOXH6F.js";
|
|
14
14
|
import {
|
|
15
15
|
NPX_LATEST_COMMAND
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SYPGVUS2.js";
|
|
17
17
|
import {
|
|
18
18
|
AGENT_STOP_DEFAULT_SECONDS,
|
|
19
19
|
APPROVAL_MODE_META,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
classifyConfirmResponse,
|
|
22
22
|
isAnswerSource,
|
|
23
23
|
roundTripAsk
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-G4SWIS2Y.js";
|
|
25
25
|
|
|
26
26
|
// src/reach.ts
|
|
27
27
|
var PUSHARY_APP_DOWNLOAD_URL = "https://pushary.com/download";
|