pushary 1.9.176 → 1.9.177
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 +4 -0
- package/dist/{api-HKDF4HUI.js → api-MOK62OPO.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 +27 -27
- package/dist/bin/pushary-clean.js +38 -38
- package/dist/bin/pushary-codex-bridge.js +23 -23
- package/dist/bin/pushary-codex-hook.js +81 -40
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +16 -16
- package/dist/bin/pushary-connect.js +34 -34
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +45 -45
- package/dist/bin/pushary-disconnect.js +29 -29
- package/dist/bin/pushary-display-hook.js +11 -0
- package/dist/bin/pushary-doctor.js +46 -46
- package/dist/bin/pushary-elicitation-hook.js +28 -28
- package/dist/bin/pushary-gemini-bridge.js +18 -18
- package/dist/bin/pushary-gemini-hook.js +32 -32
- package/dist/bin/pushary-hook.js +36 -36
- package/dist/bin/pushary-login.js +22 -22
- package/dist/bin/pushary-logout.js +29 -29
- 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-hook.js +33 -33
- package/dist/bin/pushary-permission-denied-hook.js +36 -36
- package/dist/bin/pushary-permission-hook.js +36 -36
- 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 +38 -38
- package/dist/bin/pushary-sessions.js +14 -14
- package/dist/bin/pushary-setup.js +54 -54
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +35 -35
- 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 +43 -43
- package/dist/bin/pushary-wait.js +16 -16
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-TD77E4IG.js → chunk-2HK3KVEJ.js} +5 -5
- package/dist/{chunk-GMJT73OD.js → chunk-2HREYLQL.js} +5 -5
- package/dist/{chunk-YYI6OSY7.js → chunk-2MMTYCCV.js} +2 -2
- package/dist/{chunk-Q2U2JJKN.js → chunk-2O6TO2YW.js} +18 -18
- package/dist/{chunk-AARWOJLD.js → chunk-2SFXPVAE.js} +1 -1
- package/dist/{chunk-QJ5CHRK7.js → chunk-3CWVK6BS.js} +7 -6
- package/dist/{chunk-OIVFH66C.js → chunk-3DFKZATL.js} +3 -3
- package/dist/{chunk-DTVZOI3P.js → chunk-3HGR5T4W.js} +4 -4
- package/dist/{chunk-PI3EX3VU.js → chunk-4PRJDA3J.js} +1 -1
- package/dist/{chunk-FX7OHXSS.js → chunk-4YBTCIIU.js} +5 -5
- package/dist/{chunk-NTM53JUG.js → chunk-5F2GVH3H.js} +1 -1
- package/dist/{chunk-GTZAV2C5.js → chunk-5OBLFHMG.js} +1 -1
- package/dist/{chunk-5IMANOES.js → chunk-5SNBTQOU.js} +6 -6
- package/dist/{chunk-4KDNWZY5.js → chunk-5YUBUJ6F.js} +5 -5
- package/dist/{chunk-35G4EP75.js → chunk-6FFXBHVF.js} +2 -2
- package/dist/{chunk-AWTLZVZY.js → chunk-6HEYIMTE.js} +5 -5
- package/dist/{chunk-SZTB7X2F.js → chunk-77PUYCLF.js} +12 -12
- package/dist/{chunk-62QSMUXP.js → chunk-7ZDL4EOA.js} +2 -2
- package/dist/{chunk-7BS6GDNH.js → chunk-A4AG42X2.js} +4 -4
- package/dist/{chunk-HP3CGRSN.js → chunk-AH6FRO37.js} +9 -9
- package/dist/{chunk-MP6ZJBDX.js → chunk-AIM5GLBI.js} +4 -4
- package/dist/{chunk-AFN7QVA3.js → chunk-AUVB3J6X.js} +7 -7
- package/dist/{chunk-JPAG6LFV.js → chunk-BTOP6AHZ.js} +8 -8
- package/dist/{chunk-N2IXM43C.js → chunk-CEMYK6BM.js} +6 -6
- package/dist/{chunk-FNIWB2SF.js → chunk-CUE6IPNE.js} +4 -4
- package/dist/{chunk-P3CSTJ4U.js → chunk-DN5FNT3O.js} +1 -1
- package/dist/{chunk-32B47XDJ.js → chunk-DOCNSQOB.js} +6 -6
- package/dist/{chunk-YYTWOEVU.js → chunk-EHFUVDRM.js} +4 -4
- package/dist/{chunk-EP52XR6V.js → chunk-EXK47DWS.js} +4 -4
- package/dist/{chunk-33LHUEVR.js → chunk-FDB2VMJM.js} +2 -2
- package/dist/{chunk-LE3K3ATT.js → chunk-FLEDJCTE.js} +3 -3
- package/dist/{chunk-E3Q4PPT2.js → chunk-FUSZOEZK.js} +4 -4
- package/dist/{chunk-OIPN6XBI.js → chunk-G2RTHSTU.js} +1 -1
- package/dist/{chunk-IE6AT2WY.js → chunk-G2T7S5RU.js} +10 -10
- package/dist/{chunk-OS47GTXC.js → chunk-GCAFTVYG.js} +2 -2
- package/dist/{chunk-5YCBMSQ5.js → chunk-GOL7TCMO.js} +5 -5
- package/dist/{chunk-E2BTTHFS.js → chunk-HCW3KFL3.js} +2 -2
- package/dist/{chunk-JLDZKC7C.js → chunk-HWBO3QVL.js} +1 -1
- package/dist/{chunk-2QAYI67U.js → chunk-IIIVVFHC.js} +5 -5
- package/dist/{chunk-YKOQ432L.js → chunk-IR5B5EQI.js} +3 -3
- package/dist/{chunk-3G5MYQAW.js → chunk-J3V4CBKZ.js} +1 -1
- package/dist/{chunk-LQMJJPUZ.js → chunk-JH6IUXXS.js} +6 -6
- package/dist/{chunk-4CGAP5FK.js → chunk-JLOOLENK.js} +2 -2
- package/dist/{chunk-O7RSKV2Z.js → chunk-JWMS3WIN.js} +1 -1
- package/dist/{chunk-NGR6Z3XV.js → chunk-KLPOTV4Q.js} +3 -3
- package/dist/{chunk-ZF5OOZYY.js → chunk-KSRMVJ2V.js} +5 -5
- package/dist/{chunk-XUHE6XZC.js → chunk-KX2SWWSD.js} +1 -1
- package/dist/{chunk-KALND7MK.js → chunk-L3R3XAQC.js} +1 -1
- package/dist/{chunk-LCRF7HAY.js → chunk-L7MROSFJ.js} +3 -3
- package/dist/{chunk-YJ2SYX6E.js → chunk-LAJ62ADY.js} +1 -1
- package/dist/{chunk-47CLYXO4.js → chunk-LEWVT2A2.js} +1 -1
- package/dist/{chunk-RXWTLPC2.js → chunk-LGKFRWQL.js} +1 -1
- package/dist/{chunk-FCP5RKB5.js → chunk-M7LXGZM6.js} +4 -4
- package/dist/{chunk-4632OXAT.js → chunk-MIHH354F.js} +2 -2
- package/dist/{chunk-EORZZO65.js → chunk-MIRXACOR.js} +1 -1
- package/dist/{chunk-PXYVGBX5.js → chunk-MNWUZ4JH.js} +2 -2
- package/dist/{chunk-3ZYXWHVC.js → chunk-N7GV4Y5B.js} +2 -2
- package/dist/{chunk-LMHNRNXY.js → chunk-NNWUE7PY.js} +6 -6
- package/dist/{chunk-4XXSXD6V.js → chunk-NSR3ZTUJ.js} +3 -3
- package/dist/{chunk-REJKLD33.js → chunk-NWO4GVKC.js} +4 -4
- package/dist/{chunk-KLNNWG4Q.js → chunk-OU4FPSNZ.js} +3 -3
- package/dist/{chunk-37MNIPTT.js → chunk-QBIALYLY.js} +4 -4
- package/dist/{chunk-3YRDILR5.js → chunk-QES7CGHR.js} +5 -5
- package/dist/{chunk-NQ5OIMQM.js → chunk-QS4IPOAQ.js} +11 -11
- package/dist/{chunk-MPDJBJMJ.js → chunk-R2VQ4OKM.js} +1 -1
- package/dist/{chunk-MPVNNWB7.js → chunk-RQYNZJZ3.js} +1 -1
- package/dist/{chunk-N6DXMU4B.js → chunk-RSRWMXEM.js} +3 -3
- package/dist/{chunk-UYATTR34.js → chunk-SOWF5BU3.js} +4 -4
- package/dist/{chunk-QKBGPBTG.js → chunk-SV7PLR6Z.js} +2 -2
- package/dist/{chunk-ST7NYREC.js → chunk-TIGCU3PF.js} +2 -2
- package/dist/{chunk-UTBF532I.js → chunk-UC4DTMPM.js} +6 -0
- package/dist/{chunk-MMQPOOEO.js → chunk-UOM2JOQZ.js} +2 -2
- package/dist/{chunk-SFJTCSBC.js → chunk-UYBCGHGQ.js} +3 -3
- package/dist/{chunk-PI7Y4RP5.js → chunk-VOPORKYP.js} +1 -1
- package/dist/{chunk-4HBW4LQA.js → chunk-W7KAVPQP.js} +1 -1
- package/dist/{chunk-BTURZF5T.js → chunk-WVU5TTRU.js} +2 -2
- package/dist/{chunk-W7GT3CQ2.js → chunk-XJJ4KJF5.js} +3 -3
- package/dist/{chunk-SGYE4TSV.js → chunk-XWG4PSQL.js} +1 -1
- package/dist/{chunk-22YIXSYO.js → chunk-ZHVWYX5I.js} +1 -1
- package/dist/{chunk-K67ODHSQ.js → chunk-ZRMI7POM.js} +1 -1
- package/dist/{codex-app-cards-switch-R3AQ7GCL.js → codex-app-cards-switch-VUX7FUBE.js} +11 -11
- package/dist/{codex-card-routing-MINRBWOA.js → codex-card-routing-F6PBOHKA.js} +2 -2
- package/dist/{codex-desktop-launch-IM7LRNWD.js → codex-desktop-launch-DHE24VP2.js} +1 -1
- package/dist/{codex-session-launch-5LVPMCPB.js → codex-session-launch-5QMO4UNL.js} +20 -20
- package/dist/{config-JZAIUJYX.js → config-VEUG5WVO.js} +3 -3
- package/dist/{global-upgrade-N6W3SRLW.js → global-upgrade-TE6N2LPD.js} +9 -9
- package/dist/{identity-5DYBKLN4.js → identity-RUUBB2GE.js} +4 -4
- package/dist/{live-capabilities-3MCCEAF5.js → live-capabilities-CATPYBSX.js} +4 -4
- package/dist/{paths-HDL3JGPR.js → paths-LE4WLG45.js} +3 -3
- package/dist/{reapply-WOVIOPFX.js → reapply-4BTKZGKT.js} +31 -31
- package/dist/src/index.js +35 -35
- package/dist/{upgrade-lock-AIEM2X72.js → upgrade-lock-HU2F5X57.js} +4 -4
- package/dist/{usage-5RBIRZ6S.js → usage-UMIDTEI3.js} +3 -3
- package/package.json +1 -1
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
takeHookHoldBudget
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-ZHVWYX5I.js";
|
|
5
5
|
import {
|
|
6
6
|
parseCodexHookInput,
|
|
7
7
|
pushQuestionAndWait,
|
|
8
8
|
scopeQuestionOf
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-NWO4GVKC.js";
|
|
10
10
|
import {
|
|
11
11
|
defersToNativeMode
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-R2VQ4OKM.js";
|
|
13
13
|
import {
|
|
14
14
|
askAgentQuestions
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-5YUBUJ6F.js";
|
|
16
16
|
import {
|
|
17
17
|
reportMachineDenial
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-A4AG42X2.js";
|
|
19
19
|
import {
|
|
20
20
|
isGatingMoment,
|
|
21
21
|
recordKeylessMoment
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-5F2GVH3H.js";
|
|
23
23
|
import {
|
|
24
24
|
triggerAutoUpdate
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-SV7PLR6Z.js";
|
|
26
26
|
import {
|
|
27
27
|
readHookInput
|
|
28
|
-
} from "../chunk-
|
|
29
|
-
import "../chunk-
|
|
28
|
+
} from "../chunk-KSRMVJ2V.js";
|
|
29
|
+
import "../chunk-EXK47DWS.js";
|
|
30
30
|
import {
|
|
31
31
|
announceSubscriptionRequired,
|
|
32
32
|
isDeferAnswer
|
|
33
|
-
} from "../chunk-
|
|
34
|
-
import "../chunk-
|
|
33
|
+
} from "../chunk-VOPORKYP.js";
|
|
34
|
+
import "../chunk-G2T7S5RU.js";
|
|
35
35
|
import "../chunk-WHB622LP.js";
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-6HEYIMTE.js";
|
|
37
|
+
import "../chunk-5SNBTQOU.js";
|
|
38
|
+
import "../chunk-QBIALYLY.js";
|
|
39
39
|
import {
|
|
40
40
|
CODEX_AGENT,
|
|
41
41
|
DEFAULT_SESSION,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
toPolicyLookup,
|
|
68
68
|
toPolicyLookups,
|
|
69
69
|
userScope
|
|
70
|
-
} from "../chunk-
|
|
70
|
+
} from "../chunk-77PUYCLF.js";
|
|
71
71
|
import {
|
|
72
72
|
codexReviewerDenialsSince,
|
|
73
73
|
deriveActionBody,
|
|
@@ -80,16 +80,17 @@ import {
|
|
|
80
80
|
scanCodexGuardianReviews,
|
|
81
81
|
scopePathFor,
|
|
82
82
|
sessionIdentityOf
|
|
83
|
-
} from "../chunk-
|
|
84
|
-
import "../chunk-
|
|
85
|
-
import "../chunk-
|
|
83
|
+
} from "../chunk-MIRXACOR.js";
|
|
84
|
+
import "../chunk-5OBLFHMG.js";
|
|
85
|
+
import "../chunk-LEWVT2A2.js";
|
|
86
86
|
import "../chunk-BZIBNSQE.js";
|
|
87
|
-
import "../chunk-
|
|
87
|
+
import "../chunk-3DFKZATL.js";
|
|
88
88
|
import "../chunk-55L4JSPA.js";
|
|
89
|
-
import "../chunk-
|
|
89
|
+
import "../chunk-G2RTHSTU.js";
|
|
90
90
|
import "../chunk-VRNGMRJA.js";
|
|
91
91
|
import {
|
|
92
92
|
ABANDONED_WAIT,
|
|
93
|
+
CLIENT_REPORT_TIMEOUT_MS,
|
|
93
94
|
cancelQuestion,
|
|
94
95
|
claimBlockedAction,
|
|
95
96
|
exitAfterClientReports,
|
|
@@ -100,32 +101,35 @@ import {
|
|
|
100
101
|
sendNotification,
|
|
101
102
|
sleepUnlessAborted,
|
|
102
103
|
withdrawQuestion
|
|
103
|
-
} from "../chunk-
|
|
104
|
-
import "../chunk-
|
|
104
|
+
} from "../chunk-3CWVK6BS.js";
|
|
105
|
+
import "../chunk-W7KAVPQP.js";
|
|
105
106
|
import "../chunk-POFBE6ZY.js";
|
|
106
107
|
import {
|
|
107
108
|
SubscriptionRequiredError
|
|
108
|
-
} from "../chunk-
|
|
109
|
-
import
|
|
109
|
+
} from "../chunk-GOL7TCMO.js";
|
|
110
|
+
import {
|
|
111
|
+
fetchAsCredential
|
|
112
|
+
} from "../chunk-HWBO3QVL.js";
|
|
110
113
|
import {
|
|
111
114
|
projectNameFor,
|
|
112
115
|
repoKeyFor,
|
|
113
116
|
repositoryScopeFor
|
|
114
|
-
} from "../chunk-
|
|
115
|
-
import "../chunk-
|
|
116
|
-
import "../chunk-
|
|
117
|
+
} from "../chunk-LGKFRWQL.js";
|
|
118
|
+
import "../chunk-IR5B5EQI.js";
|
|
119
|
+
import "../chunk-NSR3ZTUJ.js";
|
|
117
120
|
import {
|
|
118
121
|
getMachineId
|
|
119
|
-
} from "../chunk-
|
|
120
|
-
import "../chunk-
|
|
121
|
-
import "../chunk-
|
|
122
|
+
} from "../chunk-L3R3XAQC.js";
|
|
123
|
+
import "../chunk-L7MROSFJ.js";
|
|
124
|
+
import "../chunk-WVU5TTRU.js";
|
|
122
125
|
import {
|
|
123
126
|
canonicalJson
|
|
124
|
-
} from "../chunk-
|
|
125
|
-
import "../chunk-
|
|
127
|
+
} from "../chunk-N7GV4Y5B.js";
|
|
128
|
+
import "../chunk-SOWF5BU3.js";
|
|
126
129
|
import {
|
|
127
|
-
getApiKey
|
|
128
|
-
|
|
130
|
+
getApiKey,
|
|
131
|
+
getBaseUrl
|
|
132
|
+
} from "../chunk-JWMS3WIN.js";
|
|
129
133
|
import "../chunk-CINBAX5G.js";
|
|
130
134
|
import {
|
|
131
135
|
writeFileAtomic
|
|
@@ -133,17 +137,20 @@ import {
|
|
|
133
137
|
import {
|
|
134
138
|
EXIT
|
|
135
139
|
} from "../chunk-BG4HHB7E.js";
|
|
136
|
-
import "../chunk-
|
|
140
|
+
import "../chunk-LAJ62ADY.js";
|
|
137
141
|
import "../chunk-UQTQ6HPO.js";
|
|
138
142
|
import {
|
|
143
|
+
CALL_REFUSED_EVENT,
|
|
139
144
|
CODEX_RESCUE_STOP_RESERVE_SECONDS,
|
|
140
145
|
CODEX_RESCUE_TOOL_NAME,
|
|
141
146
|
DECISION_STOP_REASON,
|
|
142
147
|
GATE_BLOCK_REASON_MAX_LENGTH,
|
|
143
148
|
GATE_WIRE,
|
|
149
|
+
HOOK_BUDGETS,
|
|
144
150
|
KILL_REASON,
|
|
145
151
|
SCOPE_BATCH_REASON,
|
|
146
152
|
UNVERIFIABLE_APPROVAL_REASON,
|
|
153
|
+
callRefusalReasonWhenUnanswered,
|
|
147
154
|
codexDeferredPreToolUse,
|
|
148
155
|
codexHasNoPromptOfItsOwn,
|
|
149
156
|
codexPreToolUseDelivery,
|
|
@@ -165,7 +172,7 @@ import {
|
|
|
165
172
|
refusesWhenUnanswered,
|
|
166
173
|
resolveGate,
|
|
167
174
|
unapprovedScopeReason
|
|
168
|
-
} from "../chunk-
|
|
175
|
+
} from "../chunk-UC4DTMPM.js";
|
|
169
176
|
import "../chunk-MLKGABMK.js";
|
|
170
177
|
|
|
171
178
|
// src/rule-watched-ask.ts
|
|
@@ -707,6 +714,26 @@ var rescueCodexReviewerDenial = async (call, holdBudgetSeconds) => {
|
|
|
707
714
|
}
|
|
708
715
|
};
|
|
709
716
|
|
|
717
|
+
// src/call-refusal-report.ts
|
|
718
|
+
var DEFAULT_DEPS = { fetchImpl: fetch, baseUrl: getBaseUrl };
|
|
719
|
+
var wholeSecondsBetween = (startMs, endMs) => Math.max(0, Math.round((endMs - startMs) / 1e3));
|
|
720
|
+
var refusalReportTimeoutMs = (deadlineMs, nowMs) => Math.min(CLIENT_REPORT_TIMEOUT_MS, deadlineMs - nowMs);
|
|
721
|
+
var reportCallRefusal = async (apiKey, report, deadlineMs, deps = DEFAULT_DEPS) => {
|
|
722
|
+
const timeoutMs = refusalReportTimeoutMs(deadlineMs, Date.now());
|
|
723
|
+
if (timeoutMs <= 0) return;
|
|
724
|
+
try {
|
|
725
|
+
const response = await fetchAsCredential(apiKey, `${deps.baseUrl()}/api/agent/event`, {
|
|
726
|
+
method: "POST",
|
|
727
|
+
headers: { "Authorization": `Bearer ${apiKey}`, "Content-Type": "application/json" },
|
|
728
|
+
body: JSON.stringify({ event: CALL_REFUSED_EVENT, ...report }),
|
|
729
|
+
signal: AbortSignal.timeout(timeoutMs)
|
|
730
|
+
}, deps.fetchImpl);
|
|
731
|
+
await response.body?.cancel();
|
|
732
|
+
} catch {
|
|
733
|
+
return;
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
|
|
710
737
|
// bin/pushary-codex-hook.ts
|
|
711
738
|
var callKeyFor = (input) => codexCallKey({
|
|
712
739
|
sessionId: input.session_id,
|
|
@@ -715,6 +742,7 @@ var callKeyFor = (input) => codexCallKey({
|
|
|
715
742
|
toolInput: input.tool_input
|
|
716
743
|
});
|
|
717
744
|
var START_MS2 = Date.now();
|
|
745
|
+
var REFUSAL_REPORT_DEADLINE_MS = START_MS2 + (HOOK_BUDGETS.codex.budgetSeconds - 1) * 1e3;
|
|
718
746
|
var agentNameFor = (input) => `Codex - ${projectNameFor(input.cwd)}`;
|
|
719
747
|
var describeFor = (input, lookup) => input.tool_name === "apply_patch" ? describeApplyPatch(input.tool_input?.command) ?? describeToolCall(lookup.tool, lookup.input, "hook") : describeToolCall(lookup.tool, lookup.input, "hook");
|
|
720
748
|
var pushQuestion = (apiKey, input, lookup, waitSeconds, mode, noLocalSurface, scope, watch) => {
|
|
@@ -844,6 +872,19 @@ var recordPreToolUse = (key, outcome) => {
|
|
|
844
872
|
);
|
|
845
873
|
return outcome;
|
|
846
874
|
};
|
|
875
|
+
var reportIfRefused = (apiKey, input, lookup, deliveryMode, reason, decision) => {
|
|
876
|
+
if (decision.kind === "deny") {
|
|
877
|
+
void reportCallRefusal(apiKey, {
|
|
878
|
+
agentType: CODEX_AGENT.type,
|
|
879
|
+
sessionId: input.session_id ?? null,
|
|
880
|
+
toolName: lookup.tool,
|
|
881
|
+
reason,
|
|
882
|
+
deliveryMode,
|
|
883
|
+
waitedSeconds: wholeSecondsBetween(START_MS2, Date.now())
|
|
884
|
+
}, REFUSAL_REPORT_DEADLINE_MS);
|
|
885
|
+
}
|
|
886
|
+
return decision;
|
|
887
|
+
};
|
|
847
888
|
var recordApproval = (key, input) => {
|
|
848
889
|
if (input.tool_use_id) recordCodexCallDecision(key, { kind: "approved", toolUseId: input.tool_use_id });
|
|
849
890
|
return codexPass();
|
|
@@ -934,17 +975,17 @@ var decidePreToolUse = async (input) => {
|
|
|
934
975
|
if (asked.kind === "covered_by_rule") return codexPass();
|
|
935
976
|
if (asked.kind === "refused_by_rule") return await refusedByRule(input, lookup, asked.verdict);
|
|
936
977
|
if (asked.kind === "no_free_slot") {
|
|
937
|
-
return recordPreToolUse(callKey, unansweredOutcome(scope, codexQuestionLimitDecision({ refusesUnanswered: refusesWhenUnanswered(delivery.policy), agentPromptFollows: false })));
|
|
978
|
+
return reportIfRefused(apiKey, input, lookup, deliveryMode, "no_free_slot", recordPreToolUse(callKey, unansweredOutcome(scope, codexQuestionLimitDecision({ refusesUnanswered: refusesWhenUnanswered(delivery.policy), agentPromptFollows: false }))));
|
|
938
979
|
}
|
|
939
980
|
const { answer, localHandoff, clampCut, paused } = asked.pushed;
|
|
940
981
|
if (isDecisionStopped(answer)) return codexDeny(DECISION_STOP_REASON);
|
|
941
|
-
if (localHandoff) return recordPreToolUse(callKey, keyboardOutcome(deliveryMode, scope, toolPolicy));
|
|
982
|
+
if (localHandoff) return reportIfRefused(apiKey, input, lookup, deliveryMode, "not_delivered", recordPreToolUse(callKey, keyboardOutcome(deliveryMode, scope, toolPolicy)));
|
|
942
983
|
if (answer.answered) {
|
|
943
984
|
if (isDeferAnswer(answer.value)) return recordPreToolUse(callKey, deferredPreToolUse(scope));
|
|
944
985
|
if (answer.value === "yes") return recordApproval(callKey, input);
|
|
945
986
|
return recordPreToolUse(callKey, codexDeny(denyReasonFrom(answer.value, answer.note)));
|
|
946
987
|
}
|
|
947
|
-
return recordPreToolUse(callKey, unansweredOutcome(scope, unansweredPreToolUse(toolPolicy, !clampCut, paused)));
|
|
988
|
+
return reportIfRefused(apiKey, input, lookup, deliveryMode, callRefusalReasonWhenUnanswered(paused), recordPreToolUse(callKey, unansweredOutcome(scope, unansweredPreToolUse(toolPolicy, !clampCut, paused))));
|
|
948
989
|
}
|
|
949
990
|
if (deliveryMode === "notify_only") {
|
|
950
991
|
if (scope) return recordPreToolUse(callKey, unansweredOutcome(scope, codexPass()));
|
|
@@ -958,7 +999,7 @@ var decidePreToolUse = async (input) => {
|
|
|
958
999
|
};
|
|
959
1000
|
var repairCodexHoldsQuietly = async () => {
|
|
960
1001
|
try {
|
|
961
|
-
const { repairCodexHolds } = await import("../reapply-
|
|
1002
|
+
const { repairCodexHolds } = await import("../reapply-4BTKZGKT.js");
|
|
962
1003
|
repairCodexHolds();
|
|
963
1004
|
} catch {
|
|
964
1005
|
return;
|
|
@@ -8,8 +8,8 @@ import "../chunk-MLKGABMK.js";
|
|
|
8
8
|
var args = process.argv.slice(2);
|
|
9
9
|
if (args[0] === "codex") args.shift();
|
|
10
10
|
var appBehindTheProxy = args[0] === "--desktop-proxy" && args[2] === "--" ? args[1] : void 0;
|
|
11
|
-
if (args[0] !== "--desktop-proxy") (await import("../usage-
|
|
12
|
-
var loadWhatReadsTheAccount = () => Promise.all([import("../config-
|
|
11
|
+
if (args[0] !== "--desktop-proxy") (await import("../usage-UMIDTEI3.js")).exitOnHelpFlag("codex");
|
|
12
|
+
var loadWhatReadsTheAccount = () => Promise.all([import("../config-VEUG5WVO.js"), import("../identity-RUUBB2GE.js")]);
|
|
13
13
|
var loadedWhenThePassThroughStarted = appBehindTheProxy === void 0 ? null : loadWhatReadsTheAccount().catch(() => null);
|
|
14
14
|
var desktopAccount = async () => {
|
|
15
15
|
try {
|
|
@@ -19,7 +19,7 @@ var desktopAccount = async () => {
|
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
var desktopLaunch = await import("../codex-desktop-launch-
|
|
22
|
+
var desktopLaunch = await import("../codex-desktop-launch-DHE24VP2.js").catch(() => null);
|
|
23
23
|
if (desktopLaunch === null && appBehindTheProxy !== void 0) {
|
|
24
24
|
process.exitCode = await letCodexRunWithoutPushary(appBehindTheProxy, args.slice(3));
|
|
25
25
|
} else {
|
|
@@ -27,15 +27,15 @@ if (desktopLaunch === null && appBehindTheProxy !== void 0) {
|
|
|
27
27
|
const stop = () => abort.abort();
|
|
28
28
|
if (!args[0]?.startsWith("--desktop")) for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) process.on(signal, stop);
|
|
29
29
|
try {
|
|
30
|
-
const { codexDesktopCommand } = desktopLaunch ?? await import("../codex-desktop-launch-
|
|
30
|
+
const { codexDesktopCommand } = desktopLaunch ?? await import("../codex-desktop-launch-DHE24VP2.js");
|
|
31
31
|
const desktop = await codexDesktopCommand(args, [process.execPath, ...process.execArgv, process.argv[1], "codex"], desktopAccount);
|
|
32
32
|
if (desktop !== null) process.exitCode = desktop;
|
|
33
33
|
else {
|
|
34
34
|
const [{ getApiKey, getBaseUrl }, { getMachineId }, { resolveProviderBinary }, { codexSessionDirectory, launchCodexSession }] = await Promise.all([
|
|
35
|
-
import("../config-
|
|
36
|
-
import("../identity-
|
|
37
|
-
import("../live-capabilities-
|
|
38
|
-
import("../codex-session-launch-
|
|
35
|
+
import("../config-VEUG5WVO.js"),
|
|
36
|
+
import("../identity-RUUBB2GE.js"),
|
|
37
|
+
import("../live-capabilities-CATPYBSX.js"),
|
|
38
|
+
import("../codex-session-launch-5QMO4UNL.js")
|
|
39
39
|
]);
|
|
40
40
|
const binary = resolveProviderBinary("codex");
|
|
41
41
|
if (!binary) throw new Error("Install Codex first, then run pushary codex");
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
reportEvent
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-77PUYCLF.js";
|
|
5
|
+
import "../chunk-MIRXACOR.js";
|
|
6
6
|
import {
|
|
7
7
|
askUser,
|
|
8
8
|
isDecisionStopped,
|
|
9
9
|
waitForAnswer
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-3CWVK6BS.js";
|
|
11
|
+
import "../chunk-W7KAVPQP.js";
|
|
12
12
|
import "../chunk-POFBE6ZY.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-GOL7TCMO.js";
|
|
14
|
+
import "../chunk-HWBO3QVL.js";
|
|
15
15
|
import {
|
|
16
16
|
projectNameFor
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
17
|
+
} from "../chunk-LGKFRWQL.js";
|
|
18
|
+
import "../chunk-IR5B5EQI.js";
|
|
19
|
+
import "../chunk-NSR3ZTUJ.js";
|
|
20
20
|
import {
|
|
21
21
|
getMachineId
|
|
22
|
-
} from "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
22
|
+
} from "../chunk-L3R3XAQC.js";
|
|
23
|
+
import "../chunk-WVU5TTRU.js";
|
|
24
|
+
import "../chunk-N7GV4Y5B.js";
|
|
25
|
+
import "../chunk-SOWF5BU3.js";
|
|
26
26
|
import {
|
|
27
27
|
getApiKey
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-JWMS3WIN.js";
|
|
29
29
|
import "../chunk-CINBAX5G.js";
|
|
30
30
|
import "../chunk-PM2NRK6Y.js";
|
|
31
31
|
import "../chunk-BG4HHB7E.js";
|
|
32
32
|
import {
|
|
33
33
|
NPX_LATEST_COMMAND
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-LAJ62ADY.js";
|
|
35
35
|
import "../chunk-UQTQ6HPO.js";
|
|
36
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-UC4DTMPM.js";
|
|
37
37
|
import "../chunk-MLKGABMK.js";
|
|
38
38
|
|
|
39
39
|
// bin/pushary-codex.ts
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
pairingComputerOf,
|
|
4
4
|
planPairCommand
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-KX2SWWSD.js";
|
|
6
6
|
import {
|
|
7
7
|
canShowPairingQr,
|
|
8
8
|
checkPhoneWithoutPairing,
|
|
@@ -12,64 +12,64 @@ import {
|
|
|
12
12
|
pairAppWithThisComputer,
|
|
13
13
|
pairingAgainHelps,
|
|
14
14
|
printConnectInstructions
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-CEMYK6BM.js";
|
|
16
16
|
import "../chunk-3EGEA4KH.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-NNWUE7PY.js";
|
|
18
18
|
import {
|
|
19
19
|
printKeyCheck
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-AUVB3J6X.js";
|
|
21
|
+
import "../chunk-GCAFTVYG.js";
|
|
22
22
|
import {
|
|
23
23
|
detectedAgentChoices
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-QES7CGHR.js";
|
|
25
25
|
import "../chunk-OYIN77HO.js";
|
|
26
26
|
import {
|
|
27
27
|
CONNECTED_THROUGH_MAC_APP,
|
|
28
28
|
PAIR_FROM_MAC_APP,
|
|
29
29
|
readMacAppConnection
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-AIM5GLBI.js";
|
|
31
31
|
import "../chunk-QCGNGEGE.js";
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
32
|
+
import "../chunk-FLEDJCTE.js";
|
|
33
|
+
import "../chunk-DOCNSQOB.js";
|
|
34
|
+
import "../chunk-J3V4CBKZ.js";
|
|
35
|
+
import "../chunk-UOM2JOQZ.js";
|
|
36
36
|
import {
|
|
37
37
|
ciMarker,
|
|
38
38
|
createIo,
|
|
39
39
|
describeCiReason
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-4PRJDA3J.js";
|
|
41
41
|
import {
|
|
42
42
|
exitOnHelpFlag
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-ZRMI7POM.js";
|
|
44
44
|
import "../chunk-TCE3J44Z.js";
|
|
45
|
-
import "../chunk-
|
|
46
|
-
import "../chunk-
|
|
47
|
-
import "../chunk-
|
|
48
|
-
import "../chunk-
|
|
49
|
-
import "../chunk-
|
|
50
|
-
import "../chunk-
|
|
45
|
+
import "../chunk-6HEYIMTE.js";
|
|
46
|
+
import "../chunk-QBIALYLY.js";
|
|
47
|
+
import "../chunk-77PUYCLF.js";
|
|
48
|
+
import "../chunk-MIRXACOR.js";
|
|
49
|
+
import "../chunk-5OBLFHMG.js";
|
|
50
|
+
import "../chunk-LEWVT2A2.js";
|
|
51
51
|
import {
|
|
52
52
|
parseFlags
|
|
53
53
|
} from "../chunk-BZIBNSQE.js";
|
|
54
54
|
import "../chunk-VRNGMRJA.js";
|
|
55
|
-
import "../chunk-
|
|
56
|
-
import "../chunk-
|
|
55
|
+
import "../chunk-3CWVK6BS.js";
|
|
56
|
+
import "../chunk-W7KAVPQP.js";
|
|
57
57
|
import "../chunk-POFBE6ZY.js";
|
|
58
|
-
import "../chunk-
|
|
59
|
-
import "../chunk-
|
|
60
|
-
import "../chunk-
|
|
58
|
+
import "../chunk-GOL7TCMO.js";
|
|
59
|
+
import "../chunk-HWBO3QVL.js";
|
|
60
|
+
import "../chunk-LGKFRWQL.js";
|
|
61
61
|
import {
|
|
62
62
|
checkApiKey
|
|
63
|
-
} from "../chunk-
|
|
64
|
-
import "../chunk-
|
|
65
|
-
import "../chunk-
|
|
63
|
+
} from "../chunk-IR5B5EQI.js";
|
|
64
|
+
import "../chunk-NSR3ZTUJ.js";
|
|
65
|
+
import "../chunk-L3R3XAQC.js";
|
|
66
66
|
import {
|
|
67
67
|
readKeySource
|
|
68
|
-
} from "../chunk-
|
|
69
|
-
import "../chunk-
|
|
70
|
-
import "../chunk-
|
|
71
|
-
import "../chunk-
|
|
72
|
-
import "../chunk-
|
|
68
|
+
} from "../chunk-L7MROSFJ.js";
|
|
69
|
+
import "../chunk-WVU5TTRU.js";
|
|
70
|
+
import "../chunk-N7GV4Y5B.js";
|
|
71
|
+
import "../chunk-SOWF5BU3.js";
|
|
72
|
+
import "../chunk-JWMS3WIN.js";
|
|
73
73
|
import {
|
|
74
74
|
UsageError
|
|
75
75
|
} from "../chunk-CINBAX5G.js";
|
|
@@ -79,9 +79,9 @@ import {
|
|
|
79
79
|
} from "../chunk-BG4HHB7E.js";
|
|
80
80
|
import {
|
|
81
81
|
isInvocationOf
|
|
82
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-LAJ62ADY.js";
|
|
83
83
|
import "../chunk-UQTQ6HPO.js";
|
|
84
|
-
import "../chunk-
|
|
84
|
+
import "../chunk-UC4DTMPM.js";
|
|
85
85
|
import "../chunk-MLKGABMK.js";
|
|
86
86
|
|
|
87
87
|
// bin/pushary-connect.ts
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
coworkOutput,
|
|
4
4
|
parseCoworkOptions
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-OU4FPSNZ.js";
|
|
6
6
|
import {
|
|
7
7
|
canOpenBrowser,
|
|
8
8
|
openInBrowser
|
|
9
9
|
} from "../chunk-PUZZELE6.js";
|
|
10
10
|
import {
|
|
11
11
|
exitOnHelpFlag
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-ZRMI7POM.js";
|
|
13
|
+
import "../chunk-5OBLFHMG.js";
|
|
14
14
|
import "../chunk-BZIBNSQE.js";
|
|
15
15
|
import {
|
|
16
16
|
UsageError
|
|
@@ -18,11 +18,11 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "../chunk-BG4HHB7E.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-LAJ62ADY.js";
|
|
22
22
|
import "../chunk-UQTQ6HPO.js";
|
|
23
23
|
import {
|
|
24
24
|
CLAUDE_CONNECTOR_GUIDE
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-UC4DTMPM.js";
|
|
26
26
|
import "../chunk-MLKGABMK.js";
|
|
27
27
|
|
|
28
28
|
// bin/pushary-cowork.ts
|