pushary 1.9.117 → 1.9.119
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 +20 -0
- package/dist/{api-OXKVQGTP.js → api-WWB7ZOLK.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 +35 -40
- package/dist/bin/pushary-clean.js +43 -43
- package/dist/bin/pushary-codex-bridge.js +21 -21
- package/dist/bin/pushary-codex-hook.js +64 -75
- 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 +44 -44
- package/dist/bin/pushary-disconnect.js +27 -27
- package/dist/bin/pushary-display-hook.js +17 -17
- package/dist/bin/pushary-doctor.js +47 -47
- 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 +93 -90
- package/dist/bin/pushary-hook.js +33 -32
- package/dist/bin/pushary-login.js +22 -22
- 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 +93 -75
- package/dist/bin/pushary-permission-denied-hook.js +33 -32
- package/dist/bin/pushary-permission-hook.js +33 -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 +90 -90
- 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 +43 -43
- package/dist/bin/pushary-wait.js +17 -17
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-3ZQT5LQ3.js → chunk-2C45MJGK.js} +9 -6
- package/dist/{chunk-H5RGOO3B.js → chunk-2UE2NDCX.js} +1 -1
- package/dist/{chunk-NSCLVG7M.js → chunk-3B7S2H4R.js} +1 -1
- package/dist/{chunk-EXWJBUL5.js → chunk-3IESC326.js} +3 -3
- package/dist/{chunk-PHCZ26TZ.js → chunk-4D23TNCL.js} +4 -4
- package/dist/{chunk-DH23XX7X.js → chunk-4HDX77ND.js} +3 -3
- package/dist/{chunk-NI5KTEVM.js → chunk-4SZM2HRA.js} +6 -6
- package/dist/{chunk-XIJ4ADBX.js → chunk-5HKU4VUL.js} +3 -3
- package/dist/{chunk-EBL6XYOI.js → chunk-5T5T4YXM.js} +1 -1
- package/dist/{chunk-LN6LLUY7.js → chunk-67I7QRQB.js} +1 -1
- package/dist/{chunk-2NN5ODYJ.js → chunk-6KX2H4I5.js} +3 -3
- package/dist/{chunk-BSSD6UWJ.js → chunk-6YLVNFQZ.js} +3 -3
- package/dist/{chunk-U2AB2ZUZ.js → chunk-7CJ7W2RH.js} +4 -4
- package/dist/{chunk-MKTZZPWV.js → chunk-AGXOTZID.js} +5 -5
- package/dist/{chunk-MYSBGQU6.js → chunk-B7BOENW7.js} +1 -1
- package/dist/{chunk-SUMWA5VN.js → chunk-BQ673OOD.js} +2 -2
- package/dist/{chunk-ARRXCME5.js → chunk-CBLFIWPI.js} +2 -2
- package/dist/{chunk-7VPA5PXJ.js → chunk-COXNQUDP.js} +4 -4
- package/dist/{chunk-PHDPS5C7.js → chunk-CXIYGD33.js} +2 -2
- package/dist/{chunk-YEV6CIQZ.js → chunk-DXJUASTS.js} +2 -2
- package/dist/{chunk-X2JY437V.js → chunk-EFFH2FYG.js} +2 -2
- package/dist/{chunk-BJ7FGYF7.js → chunk-EISUEJDT.js} +6 -6
- package/dist/{chunk-4UGNMAQ2.js → chunk-EP6I3MQY.js} +4 -4
- package/dist/{chunk-IUPEFEBH.js → chunk-FPG7X2GS.js} +4 -4
- package/dist/{chunk-5TVOBKRE.js → chunk-G4OVFWU4.js} +20 -14
- package/dist/{chunk-4BV525QE.js → chunk-G5FQU2XF.js} +6 -6
- package/dist/{chunk-NZFYK75R.js → chunk-GAOUWLYN.js} +3 -3
- package/dist/{chunk-2KYPNVRC.js → chunk-GBVTVTDF.js} +1 -1
- package/dist/{chunk-BE6JIWTM.js → chunk-GW3PE52Q.js} +1 -1
- package/dist/{chunk-PPNJ3INA.js → chunk-HYTDNEXV.js} +1 -1
- package/dist/{chunk-K54Y2QFA.js → chunk-ISVHV2DP.js} +1 -1
- package/dist/{chunk-RVYREG7X.js → chunk-JJNF6QU4.js} +1 -1
- package/dist/{chunk-F3Z7UWM6.js → chunk-JKS4MN47.js} +6 -6
- package/dist/{chunk-S5MQA774.js → chunk-K5WTTEIQ.js} +5 -5
- package/dist/{chunk-FKH3KT4U.js → chunk-KILSIJTF.js} +31 -21
- package/dist/{chunk-XU4DUX7K.js → chunk-KOZBVXXC.js} +3 -3
- package/dist/{chunk-TKTNQORW.js → chunk-KVDN4U6W.js} +10 -10
- package/dist/{chunk-RYAWSPAR.js → chunk-L3MCQSES.js} +5 -5
- package/dist/{chunk-MHU7CW7T.js → chunk-MEPYLTWF.js} +10 -10
- package/dist/{chunk-FRIQ4LQ5.js → chunk-MYNLU6DV.js} +2 -2
- package/dist/{chunk-N74WJAL6.js → chunk-NASQPMXW.js} +9 -9
- package/dist/{chunk-XJC6PG7J.js → chunk-NVV3YUTX.js} +2 -2
- package/dist/{chunk-T3UOM443.js → chunk-PDAOZ2NF.js} +10 -10
- package/dist/{chunk-R5ZMI6BM.js → chunk-PJSFKKZ5.js} +1 -1
- package/dist/{chunk-4SI3CUWN.js → chunk-PNSIMPC7.js} +6 -6
- package/dist/{chunk-N4DQDFEP.js → chunk-R3RTISDD.js} +1 -1
- package/dist/{chunk-GJNWZWMA.js → chunk-R67NTMBY.js} +8 -8
- package/dist/{chunk-3OVRAD25.js → chunk-RGXFBS56.js} +3 -3
- package/dist/{chunk-UJGA7WL5.js → chunk-RIAELZYW.js} +2 -2
- package/dist/{chunk-74MC5LRW.js → chunk-SE7P5BBK.js} +1 -1
- package/dist/{chunk-2UYYX6VC.js → chunk-SNKC2IQZ.js} +2 -2
- package/dist/{chunk-DE6ZYZZZ.js → chunk-SQRS4IF2.js} +3 -3
- package/dist/{chunk-G5EB7GAR.js → chunk-SSBETUYZ.js} +3 -3
- package/dist/{chunk-C2NKILG3.js → chunk-TLCJCP5R.js} +1 -1
- package/dist/{chunk-KYWTX4R2.js → chunk-TRDHHF3A.js} +337 -37
- package/dist/{chunk-RCCISH7T.js → chunk-TZYVXTLN.js} +1 -1
- package/dist/{chunk-6ICAZ33G.js → chunk-U32N5JZO.js} +1 -1
- package/dist/{chunk-BL7ESWIQ.js → chunk-UHAUC7EO.js} +2 -2
- package/dist/{chunk-C32IT2TR.js → chunk-V52J2THT.js} +1 -1
- package/dist/chunk-VFZ2PE6U.js +60 -0
- package/dist/{chunk-DZI6MSR4.js → chunk-VMM6JCNQ.js} +2 -2
- package/dist/{chunk-MI56IIXG.js → chunk-VRZOUCIK.js} +2 -2
- package/dist/{chunk-2JQZFGIF.js → chunk-W5ZUDPKV.js} +5 -5
- package/dist/{chunk-ZJKH3CTN.js → chunk-W6LKC5YD.js} +5 -5
- package/dist/{chunk-J3PBLQUD.js → chunk-XBH6OKHD.js} +3 -3
- package/dist/{chunk-SE62HPB7.js → chunk-XNCKBVZX.js} +6 -61
- package/dist/{chunk-SQLXC4PM.js → chunk-YCCLWG7G.js} +6 -6
- package/dist/{chunk-YU3LDR5W.js → chunk-YZ7V2LVG.js} +3 -3
- package/dist/{chunk-MA4KQLCT.js → chunk-YZESBU7F.js} +5 -5
- package/dist/{chunk-FW2SOQ5J.js → chunk-Z3OG44Z4.js} +4 -4
- package/dist/chunk-ZLUAXGAA.js +121 -0
- package/dist/{chunk-6GZU4IYU.js → chunk-ZTVBM3EZ.js} +4 -4
- package/dist/{codex-app-cards-switch-ANBV6CA6.js → codex-app-cards-switch-J6EULXO5.js} +12 -12
- package/dist/{codex-card-routing-POEBILLG.js → codex-card-routing-XNJB6573.js} +2 -2
- package/dist/{codex-desktop-launch-Z4HXKBYP.js → codex-desktop-launch-46ELENBQ.js} +1 -1
- package/dist/{codex-session-launch-XA6BMIVU.js → codex-session-launch-R5FHFWAG.js} +18 -18
- package/dist/{config-ATKVK4QQ.js → config-RKWDMDRY.js} +3 -3
- package/dist/{global-upgrade-BJKCVYJU.js → global-upgrade-E65GJQS6.js} +9 -9
- package/dist/{identity-X3FI7ZYE.js → identity-JRGY2KS6.js} +4 -4
- package/dist/{live-capabilities-6OV363JK.js → live-capabilities-SOO6PD7Y.js} +4 -4
- package/dist/{paths-U67N2RPP.js → paths-G7NZODAY.js} +3 -3
- package/dist/{reapply-L3KVM3ZO.js → reapply-YKN5BKIP.js} +28 -28
- package/dist/src/index.js +32 -31
- package/dist/{upgrade-lock-ZIPY7I2T.js → upgrade-lock-YKAZI3BH.js} +4 -4
- package/dist/{usage-RAJPNVE5.js → usage-QWYNOIU6.js} +3 -3
- package/package.json +2 -2
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AUTO_DECISION_WINDOW_MS,
|
|
3
|
+
DEFAULT_SESSION,
|
|
4
|
+
claimThrottle,
|
|
5
|
+
releaseThrottle,
|
|
6
|
+
reportEvent
|
|
7
|
+
} from "./chunk-G4OVFWU4.js";
|
|
8
|
+
import {
|
|
9
|
+
deriveToolTarget,
|
|
10
|
+
permissionDeniedAction
|
|
11
|
+
} from "./chunk-GW3PE52Q.js";
|
|
12
|
+
import {
|
|
13
|
+
machineDecisionFor,
|
|
14
|
+
wireVerdictFor
|
|
15
|
+
} from "./chunk-TRDHHF3A.js";
|
|
16
|
+
|
|
17
|
+
// src/machine-decision-audit.ts
|
|
18
|
+
import { basename } from "path";
|
|
19
|
+
var reportMachineDenial = async (input, verdict, agent) => {
|
|
20
|
+
const decision = machineDecisionFor(wireVerdictFor(verdict, 0));
|
|
21
|
+
if (!decision) return;
|
|
22
|
+
const sessionKey = input.session_id || DEFAULT_SESSION;
|
|
23
|
+
const toolTarget = deriveToolTarget(input.tool_name, input.tool_input);
|
|
24
|
+
const throttleKey = `machinedecision:${agent.type}:${sessionKey}:${input.tool_name}:${decision.origin}:${toolTarget ?? ""}`;
|
|
25
|
+
const throttle = claimThrottle(throttleKey, AUTO_DECISION_WINDOW_MS);
|
|
26
|
+
if (throttle === "throttled") return;
|
|
27
|
+
if (throttle === "unavailable") {
|
|
28
|
+
console.error("[Pushary] Could not access the audit throttle; reporting this denial without deduplication.");
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
const response = await reportEvent({
|
|
32
|
+
event: "permission_denied",
|
|
33
|
+
occurredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
34
|
+
toolUseId: input.tool_use_id,
|
|
35
|
+
agentType: agent.type,
|
|
36
|
+
agentName: `${agent.label} - ${basename(input.cwd ?? process.cwd())}`,
|
|
37
|
+
action: permissionDeniedAction(input.tool_name),
|
|
38
|
+
sessionId: input.session_id,
|
|
39
|
+
decisionSource: "policy_auto",
|
|
40
|
+
decisionOrigin: decision.origin,
|
|
41
|
+
decisionOutcome: decision.outcome,
|
|
42
|
+
toolName: input.tool_name,
|
|
43
|
+
toolTarget
|
|
44
|
+
}, { maxAttempts: 1, timeoutMs: 800, requireOk: true, skipDrain: true });
|
|
45
|
+
if (response?.ok !== true) throw new Error("Audit delivery was not acknowledged");
|
|
46
|
+
} catch {
|
|
47
|
+
console.error("[Pushary] Could not record the machine denial. The action remains blocked; its audit delivery will be retried on the next matching denial.");
|
|
48
|
+
if (throttle === "passed") {
|
|
49
|
+
try {
|
|
50
|
+
releaseThrottle(throttleKey);
|
|
51
|
+
} catch {
|
|
52
|
+
console.error("[Pushary] Could not reset the failed audit throttle.");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export {
|
|
59
|
+
reportMachineDenial
|
|
60
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CBLFIWPI.js";
|
|
4
4
|
import {
|
|
5
5
|
readRegularJsonFile,
|
|
6
6
|
writeFileAtomic
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
serializeDeclinedAgents,
|
|
14
14
|
withDeclinedAgent,
|
|
15
15
|
withoutDeclinedAgent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TRDHHF3A.js";
|
|
17
17
|
|
|
18
18
|
// src/declined-agents-file.ts
|
|
19
19
|
import { join } from "path";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readMacAppAgentKey
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FPG7X2GS.js";
|
|
4
4
|
import {
|
|
5
5
|
API_KEYS_PATH
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BQ673OOD.js";
|
|
7
7
|
import {
|
|
8
8
|
absoluteUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4HDX77ND.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-YZ7V2LVG.js";
|
|
20
20
|
import {
|
|
21
21
|
isValidApiKey
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TRDHHF3A.js";
|
|
23
23
|
|
|
24
24
|
// src/key-revocation.ts
|
|
25
25
|
var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
keyCheckFromResponse
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4HDX77ND.js";
|
|
4
4
|
import {
|
|
5
5
|
installNetworkDefaults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RGXFBS56.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchAsCredential
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-U32N5JZO.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R3RTISDD.js";
|
|
13
13
|
import {
|
|
14
14
|
isRecord,
|
|
15
15
|
isToolErrorResult,
|
|
16
16
|
toolFailureCodeOfResult
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TRDHHF3A.js";
|
|
18
18
|
|
|
19
19
|
// src/retry.ts
|
|
20
20
|
var isRetryable = (err) => {
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
NpmInstallError,
|
|
3
3
|
NpmMissingError,
|
|
4
4
|
NpmPermissionError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KOZBVXXC.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-PJSFKKZ5.js";
|
|
12
12
|
import {
|
|
13
13
|
readSetupAgentFailures
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TRDHHF3A.js";
|
|
15
15
|
|
|
16
16
|
// src/setup/config-write.ts
|
|
17
17
|
var AgentConfigWriteError = class extends Error {
|
|
@@ -1,83 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
announceSubscriptionRequired,
|
|
3
3
|
isDeferAnswer
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
AUTO_DECISION_WINDOW_MS,
|
|
7
|
-
DEFAULT_SESSION,
|
|
8
|
-
claimThrottle,
|
|
9
|
-
releaseThrottle,
|
|
10
|
-
reportEvent
|
|
11
|
-
} from "./chunk-5TVOBKRE.js";
|
|
12
|
-
import {
|
|
13
|
-
deriveToolTarget,
|
|
14
|
-
permissionDeniedAction
|
|
15
|
-
} from "./chunk-BE6JIWTM.js";
|
|
4
|
+
} from "./chunk-GBVTVTDF.js";
|
|
16
5
|
import {
|
|
17
6
|
askUser,
|
|
18
7
|
isDecisionStopped,
|
|
19
8
|
isQuestionLimitRefusal,
|
|
20
9
|
waitForQuestion
|
|
21
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NASQPMXW.js";
|
|
22
11
|
import {
|
|
23
12
|
SubscriptionRequiredError
|
|
24
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-W6LKC5YD.js";
|
|
25
14
|
import {
|
|
26
15
|
getMachineId
|
|
27
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TZYVXTLN.js";
|
|
28
17
|
import {
|
|
29
18
|
ASK_CONTEXT_MAX,
|
|
30
19
|
agentQuestionContext,
|
|
31
20
|
answersToQuestionsAsAsked,
|
|
32
21
|
isTypedAnswerQuestion,
|
|
33
|
-
machineDecisionFor,
|
|
34
22
|
parseAgentQuestionAnswers,
|
|
35
23
|
plainAskOf,
|
|
36
24
|
questionsShownAsASet,
|
|
37
|
-
shouldDeferToNativeMode
|
|
38
|
-
|
|
39
|
-
} from "./chunk-KYWTX4R2.js";
|
|
40
|
-
|
|
41
|
-
// src/machine-decision-audit.ts
|
|
42
|
-
import { basename } from "path";
|
|
43
|
-
var reportMachineDenial = async (input, verdict, agent) => {
|
|
44
|
-
const decision = machineDecisionFor(wireVerdictFor(verdict, 0));
|
|
45
|
-
if (!decision) return;
|
|
46
|
-
const sessionKey = input.session_id || DEFAULT_SESSION;
|
|
47
|
-
const toolTarget = deriveToolTarget(input.tool_name, input.tool_input);
|
|
48
|
-
const throttleKey = `machinedecision:${agent.type}:${sessionKey}:${input.tool_name}:${decision.origin}:${toolTarget ?? ""}`;
|
|
49
|
-
const throttle = claimThrottle(throttleKey, AUTO_DECISION_WINDOW_MS);
|
|
50
|
-
if (throttle === "throttled") return;
|
|
51
|
-
if (throttle === "unavailable") {
|
|
52
|
-
console.error("[Pushary] Could not access the audit throttle; reporting this denial without deduplication.");
|
|
53
|
-
}
|
|
54
|
-
try {
|
|
55
|
-
const response = await reportEvent({
|
|
56
|
-
event: "permission_denied",
|
|
57
|
-
occurredAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
58
|
-
toolUseId: input.tool_use_id,
|
|
59
|
-
agentType: agent.type,
|
|
60
|
-
agentName: `${agent.label} - ${basename(input.cwd ?? process.cwd())}`,
|
|
61
|
-
action: permissionDeniedAction(input.tool_name),
|
|
62
|
-
sessionId: input.session_id,
|
|
63
|
-
decisionSource: "policy_auto",
|
|
64
|
-
decisionOrigin: decision.origin,
|
|
65
|
-
decisionOutcome: decision.outcome,
|
|
66
|
-
toolName: input.tool_name,
|
|
67
|
-
toolTarget
|
|
68
|
-
}, { maxAttempts: 1, timeoutMs: 800, requireOk: true, skipDrain: true });
|
|
69
|
-
if (response?.ok !== true) throw new Error("Audit delivery was not acknowledged");
|
|
70
|
-
} catch {
|
|
71
|
-
console.error("[Pushary] Could not record the machine denial. The action remains blocked; its audit delivery will be retried on the next matching denial.");
|
|
72
|
-
if (throttle === "passed") {
|
|
73
|
-
try {
|
|
74
|
-
releaseThrottle(throttleKey);
|
|
75
|
-
} catch {
|
|
76
|
-
console.error("[Pushary] Could not reset the failed audit throttle.");
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
};
|
|
25
|
+
shouldDeferToNativeMode
|
|
26
|
+
} from "./chunk-TRDHHF3A.js";
|
|
81
27
|
|
|
82
28
|
// src/native-defer.ts
|
|
83
29
|
var nativeDeferOptions = () => {
|
|
@@ -188,7 +134,6 @@ var askAgentQuestions = (apiKey, call, questions) => {
|
|
|
188
134
|
};
|
|
189
135
|
|
|
190
136
|
export {
|
|
191
|
-
reportMachineDenial,
|
|
192
137
|
defersToNativeMode,
|
|
193
138
|
outcomeOfFailedAsk,
|
|
194
139
|
storedWaitDeadline,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_RULES_PATH,
|
|
3
3
|
canChangeApprovalSettings
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BQ673OOD.js";
|
|
5
5
|
import {
|
|
6
6
|
callMcpTool
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-W6LKC5YD.js";
|
|
8
8
|
import {
|
|
9
9
|
absoluteUrl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4HDX77ND.js";
|
|
11
11
|
import {
|
|
12
12
|
getBaseUrl
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-R3RTISDD.js";
|
|
14
14
|
import {
|
|
15
15
|
NPX_LATEST_COMMAND
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PJSFKKZ5.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-TRDHHF3A.js";
|
|
25
25
|
|
|
26
26
|
// src/reach.ts
|
|
27
27
|
var reachVerdict = (channels) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VMM6JCNQ.js";
|
|
4
4
|
import {
|
|
5
5
|
configFilePath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-R3RTISDD.js";
|
|
7
7
|
import {
|
|
8
8
|
backupFile,
|
|
9
9
|
readJsonSafe,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord,
|
|
16
16
|
isValidApiKey
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TRDHHF3A.js";
|
|
18
18
|
|
|
19
19
|
// src/shell-alias.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-G4OVFWU4.js";
|
|
4
4
|
import {
|
|
5
5
|
addGeminiMcpServer,
|
|
6
6
|
removeGeminiMcpServer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-COXNQUDP.js";
|
|
8
8
|
import {
|
|
9
9
|
compatibleToolLookup
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GW3PE52Q.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-CBLFIWPI.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-TRDHHF3A.js";
|
|
34
34
|
|
|
35
35
|
// src/config-document.ts
|
|
36
36
|
import { parse, stringify } from "smol-toml";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YZESBU7F.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-COXNQUDP.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CBLFIWPI.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TRDHHF3A.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UNNAMED_ACTION
|
|
3
|
+
} from "./chunk-GW3PE52Q.js";
|
|
4
|
+
import {
|
|
5
|
+
askUser,
|
|
6
|
+
isAwayPaused,
|
|
7
|
+
isLocalQuestionHandoff,
|
|
8
|
+
unavailableQuestionUnlessRefused,
|
|
9
|
+
waitForQuestion
|
|
10
|
+
} from "./chunk-NASQPMXW.js";
|
|
11
|
+
import {
|
|
12
|
+
getMachineId
|
|
13
|
+
} from "./chunk-TZYVXTLN.js";
|
|
14
|
+
import {
|
|
15
|
+
hookWaitClamped,
|
|
16
|
+
hookWaitDeadline,
|
|
17
|
+
scopeBreachReasonOf
|
|
18
|
+
} from "./chunk-TRDHHF3A.js";
|
|
19
|
+
|
|
20
|
+
// src/pushed-question.ts
|
|
21
|
+
var scopeQuestionOf = (verdict) => {
|
|
22
|
+
const reason = scopeBreachReasonOf(verdict);
|
|
23
|
+
return reason !== void 0 && verdict.kind === "gate" ? { reason, path: verdict.scopePath } : void 0;
|
|
24
|
+
};
|
|
25
|
+
var pushQuestionAndWait = async (apiKey, question, wait) => {
|
|
26
|
+
const creating = askUser(apiKey, {
|
|
27
|
+
question: `Allow ${question.description || UNNAMED_ACTION}?`,
|
|
28
|
+
type: "confirm",
|
|
29
|
+
context: `Agent wants to run this in ${question.projectName}`,
|
|
30
|
+
agentName: question.agentName,
|
|
31
|
+
sessionId: question.sessionId,
|
|
32
|
+
machineId: getMachineId(),
|
|
33
|
+
toolName: question.toolName,
|
|
34
|
+
toolTarget: question.toolTarget,
|
|
35
|
+
...question.decision
|
|
36
|
+
});
|
|
37
|
+
const created = await (wait.askFailure === "wait_as_unavailable" ? creating.catch(unavailableQuestionUnlessRefused) : creating);
|
|
38
|
+
wait.onQuestionCreated?.(created.correlationId);
|
|
39
|
+
const now = Date.now();
|
|
40
|
+
const deadline = hookWaitDeadline(wait.startMs, wait.waitSeconds, wait.agent, now);
|
|
41
|
+
const clampCut = hookWaitClamped(wait.startMs, wait.waitSeconds, wait.agent, now);
|
|
42
|
+
const answer = await waitForQuestion(apiKey, created, deadline, wait.pollIntervalMs);
|
|
43
|
+
return {
|
|
44
|
+
answer,
|
|
45
|
+
localHandoff: !answer.answered && isLocalQuestionHandoff(created),
|
|
46
|
+
clampCut,
|
|
47
|
+
paused: isAwayPaused(created),
|
|
48
|
+
askStatus: created.status,
|
|
49
|
+
noDevices: created.noDevices === true
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// src/agent-hook-input.ts
|
|
54
|
+
var CODEX_TEXT_FIELDS = [
|
|
55
|
+
"hook_event_name",
|
|
56
|
+
"session_id",
|
|
57
|
+
"turn_id",
|
|
58
|
+
"transcript_path",
|
|
59
|
+
"cwd",
|
|
60
|
+
"tool_name",
|
|
61
|
+
"tool_use_id",
|
|
62
|
+
"prompt",
|
|
63
|
+
"source",
|
|
64
|
+
"reason",
|
|
65
|
+
"permission_mode",
|
|
66
|
+
"trigger",
|
|
67
|
+
"agent_id",
|
|
68
|
+
"agent_type",
|
|
69
|
+
"last_assistant_message"
|
|
70
|
+
];
|
|
71
|
+
var GEMINI_TEXT_FIELDS = [
|
|
72
|
+
"hook_event_name",
|
|
73
|
+
"session_id",
|
|
74
|
+
"cwd",
|
|
75
|
+
"transcript_path",
|
|
76
|
+
"tool_name",
|
|
77
|
+
"prompt",
|
|
78
|
+
"prompt_response",
|
|
79
|
+
"reason"
|
|
80
|
+
];
|
|
81
|
+
var OPENCODE_TEXT_FIELDS = [
|
|
82
|
+
"hook_event_name",
|
|
83
|
+
"session_id",
|
|
84
|
+
"cwd",
|
|
85
|
+
"tool_name",
|
|
86
|
+
"prompt",
|
|
87
|
+
"permission_id",
|
|
88
|
+
"permission_type",
|
|
89
|
+
"title"
|
|
90
|
+
];
|
|
91
|
+
var MCP_CONTEXT_TEXT_FIELDS = ["server_name", "tool_name"];
|
|
92
|
+
var isInputRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
93
|
+
var withoutNullFields = (record) => Object.fromEntries(Object.entries(record).filter(([, value]) => value !== null));
|
|
94
|
+
var FIELDS_THE_GATE_DECIDES_FROM = ["hook_event_name", "tool_name", "session_id", "cwd"];
|
|
95
|
+
var withoutUnreadableLabels = (record, textFields) => Object.fromEntries(Object.entries(record).filter(([field, value]) => FIELDS_THE_GATE_DECIDES_FROM.includes(field) || !textFields.includes(field) || typeof value === "string"));
|
|
96
|
+
var isTextWhereSent = (record, fields) => fields.every((field) => record[field] === void 0 || typeof record[field] === "string");
|
|
97
|
+
var isRecordWhereSent = (value) => value === void 0 || isInputRecord(value);
|
|
98
|
+
var withReadableMcpContext = ({ mcp_context: context, ...record }) => {
|
|
99
|
+
if (!isInputRecord(context)) return record;
|
|
100
|
+
const present = withoutNullFields(context);
|
|
101
|
+
return isTextWhereSent(present, MCP_CONTEXT_TEXT_FIELDS) ? { ...record, mcp_context: present } : record;
|
|
102
|
+
};
|
|
103
|
+
var isCodexHookInput = (value) => isTextWhereSent(value, CODEX_TEXT_FIELDS) && isRecordWhereSent(value.tool_input);
|
|
104
|
+
var isGeminiHookInput = (value) => isTextWhereSent(value, GEMINI_TEXT_FIELDS) && isRecordWhereSent(value.tool_input);
|
|
105
|
+
var isOpenCodeHookInput = (value) => isTextWhereSent(value, OPENCODE_TEXT_FIELDS) && isRecordWhereSent(value.tool_input);
|
|
106
|
+
var hookInputParser = (textFields, isHookInput, withReadableParts = (record) => record) => (value) => {
|
|
107
|
+
if (!isInputRecord(value)) return null;
|
|
108
|
+
const readable = withReadableParts(withoutUnreadableLabels(withoutNullFields(value), textFields));
|
|
109
|
+
return isHookInput(readable) ? readable : null;
|
|
110
|
+
};
|
|
111
|
+
var parseCodexHookInput = hookInputParser(CODEX_TEXT_FIELDS, isCodexHookInput);
|
|
112
|
+
var parseGeminiHookInput = hookInputParser(GEMINI_TEXT_FIELDS, isGeminiHookInput, withReadableMcpContext);
|
|
113
|
+
var parseOpenCodeHookInput = hookInputParser(OPENCODE_TEXT_FIELDS, isOpenCodeHookInput);
|
|
114
|
+
|
|
115
|
+
export {
|
|
116
|
+
scopeQuestionOf,
|
|
117
|
+
pushQuestionAndWait,
|
|
118
|
+
parseCodexHookInput,
|
|
119
|
+
parseGeminiHookInput,
|
|
120
|
+
parseOpenCodeHookInput
|
|
121
|
+
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AGXOTZID.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-YZESBU7F.js";
|
|
10
10
|
import {
|
|
11
11
|
claudeConfigDir,
|
|
12
12
|
clineDataDirectory,
|
|
13
13
|
codexHomeFrom
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CBLFIWPI.js";
|
|
15
15
|
import {
|
|
16
16
|
HOOK_COMPATIBLE_PROFILES
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TRDHHF3A.js";
|
|
18
18
|
|
|
19
19
|
// src/vscode-config.ts
|
|
20
20
|
import { homedir } from "os";
|
|
@@ -22,23 +22,23 @@ import {
|
|
|
22
22
|
turnCodexAppCardsOff,
|
|
23
23
|
turnCodexAppCardsOn,
|
|
24
24
|
whyLaunchctlFailed
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-G5FQU2XF.js";
|
|
26
|
+
import "./chunk-GAOUWLYN.js";
|
|
27
27
|
import "./chunk-XCEN33UP.js";
|
|
28
|
+
import "./chunk-E46NE7FB.js";
|
|
28
29
|
import "./chunk-QCGNGEGE.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-EISUEJDT.js";
|
|
30
31
|
import "./chunk-XHKBHWLX.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-TZYVXTLN.js";
|
|
33
|
+
import "./chunk-YZ7V2LVG.js";
|
|
34
|
+
import "./chunk-VMM6JCNQ.js";
|
|
35
|
+
import "./chunk-CBLFIWPI.js";
|
|
36
|
+
import "./chunk-KOZBVXXC.js";
|
|
37
|
+
import "./chunk-R3RTISDD.js";
|
|
37
38
|
import "./chunk-T5I4PKOQ.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-PJSFKKZ5.js";
|
|
39
40
|
import "./chunk-ZVU6WMMU.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-E46NE7FB.js";
|
|
41
|
+
import "./chunk-TRDHHF3A.js";
|
|
42
42
|
import "./chunk-MLKGABMK.js";
|
|
43
43
|
export {
|
|
44
44
|
CODEX_APP_CARDS_DIRECTORY,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deriveToolTarget
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GW3PE52Q.js";
|
|
4
4
|
import {
|
|
5
5
|
TOOL_NAME_MAX_LENGTH,
|
|
6
6
|
codexElicitationToolName
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TRDHHF3A.js";
|
|
8
8
|
import "./chunk-MLKGABMK.js";
|
|
9
9
|
|
|
10
10
|
// src/codex-card-routing.ts
|
|
@@ -11,37 +11,37 @@ import {
|
|
|
11
11
|
isCodexQuestionLeftWithTheLocalClient,
|
|
12
12
|
planCodexElicitation,
|
|
13
13
|
reportOwnedQuestion
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-4SZM2HRA.js";
|
|
15
|
+
import "./chunk-HYTDNEXV.js";
|
|
16
|
+
import "./chunk-SSBETUYZ.js";
|
|
17
|
+
import "./chunk-CXIYGD33.js";
|
|
18
18
|
import "./chunk-N5P2FLOJ.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-SNKC2IQZ.js";
|
|
20
20
|
import "./chunk-ROVLRXBI.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-SQRS4IF2.js";
|
|
22
22
|
import "./chunk-XMSDA5WA.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-SE7P5BBK.js";
|
|
24
24
|
import {
|
|
25
25
|
writeDegraded
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-NASQPMXW.js";
|
|
27
27
|
import "./chunk-POFBE6ZY.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-W6LKC5YD.js";
|
|
29
|
+
import "./chunk-4HDX77ND.js";
|
|
30
|
+
import "./chunk-RGXFBS56.js";
|
|
31
31
|
import "./chunk-XHKBHWLX.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-U32N5JZO.js";
|
|
33
|
+
import "./chunk-TZYVXTLN.js";
|
|
34
|
+
import "./chunk-CBLFIWPI.js";
|
|
35
|
+
import "./chunk-KOZBVXXC.js";
|
|
36
|
+
import "./chunk-R3RTISDD.js";
|
|
37
37
|
import "./chunk-YU2EUD7O.js";
|
|
38
38
|
import "./chunk-T5I4PKOQ.js";
|
|
39
39
|
import "./chunk-BG4HHB7E.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-PJSFKKZ5.js";
|
|
41
41
|
import "./chunk-ZVU6WMMU.js";
|
|
42
42
|
import {
|
|
43
43
|
canonicalJsonText
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-TRDHHF3A.js";
|
|
45
45
|
import "./chunk-MLKGABMK.js";
|
|
46
46
|
|
|
47
47
|
// src/codex-session-launch.ts
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
getApiKey,
|
|
4
4
|
getBaseUrl,
|
|
5
5
|
resetKeyDriftWarning
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-R3RTISDD.js";
|
|
7
|
+
import "./chunk-PJSFKKZ5.js";
|
|
8
|
+
import "./chunk-TRDHHF3A.js";
|
|
9
9
|
import "./chunk-MLKGABMK.js";
|
|
10
10
|
export {
|
|
11
11
|
configFilePath,
|