@pushary/agent-hooks 1.9.60 → 1.9.62
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 +11 -0
- package/README.md +6 -0
- package/dist/{api-ASQA5PZM.js → api-7HLZRIUV.js} +15 -12
- package/dist/bin/pushary-bell-hook.js +28 -27
- package/dist/bin/pushary-bell.js +11 -10
- package/dist/bin/pushary-claude.js +34 -26
- package/dist/bin/pushary-clean.js +36 -34
- package/dist/bin/pushary-codex-bridge.js +22 -21
- package/dist/bin/pushary-codex-hook.js +49 -35
- package/dist/bin/pushary-codex-session.js +9 -8
- package/dist/bin/pushary-codex.js +15 -14
- package/dist/bin/pushary-connect.js +28 -27
- package/dist/bin/pushary-cowork.js +6 -5
- package/dist/bin/pushary-daemon.js +38 -37
- package/dist/bin/pushary-disconnect.js +27 -26
- package/dist/bin/pushary-doctor.js +41 -40
- package/dist/bin/pushary-elicitation-hook.js +30 -27
- package/dist/bin/pushary-gemini-bridge.js +16 -15
- package/dist/bin/pushary-gemini-hook.js +38 -29
- package/dist/bin/pushary-hook.js +33 -31
- package/dist/bin/pushary-login.js +15 -14
- package/dist/bin/pushary-logout.js +28 -27
- package/dist/bin/pushary-mcp.js +12 -11
- package/dist/bin/pushary-mode.js +15 -14
- package/dist/bin/pushary-notification-hook.js +27 -26
- package/dist/bin/pushary-opencode-hook.js +40 -30
- package/dist/bin/pushary-permission-denied-hook.js +32 -31
- package/dist/bin/pushary-permission-hook.js +31 -30
- package/dist/bin/pushary-post-hook.js +27 -26
- package/dist/bin/pushary-prompt-hook.js +27 -26
- package/dist/bin/pushary-session-end-hook.js +27 -26
- package/dist/bin/pushary-session-start-hook.js +34 -33
- package/dist/bin/pushary-setup.js +4195 -93
- package/dist/bin/pushary-stats.js +6 -5
- package/dist/bin/pushary-status.js +32 -31
- package/dist/bin/pushary-stop-hook.js +27 -26
- package/dist/bin/pushary-stopfailure-hook.js +27 -26
- package/dist/bin/pushary-suggestions.js +15 -14
- package/dist/bin/pushary-transcript-register.js +19 -18
- package/dist/bin/pushary-transcripts.js +8 -7
- package/dist/bin/pushary-upgrade.js +43 -37
- package/dist/bin/pushary-wait.js +15 -14
- package/dist/bin/pushary.js +8 -7
- package/dist/{chunk-RPPXQNIA.js → chunk-3IFCXMC6.js} +1 -1
- package/dist/{chunk-WXPVVXBU.js → chunk-3LBB7GVF.js} +4 -4
- package/dist/{chunk-WFSGCFXQ.js → chunk-3YGUWPNZ.js} +2 -6
- package/dist/{chunk-SVQWHV65.js → chunk-44FNEAXK.js} +1 -1
- package/dist/{chunk-YPD3MTFU.js → chunk-4K6YZPZ3.js} +1 -1
- package/dist/{chunk-PUHP4IBA.js → chunk-557ZE5EX.js} +4 -4
- package/dist/{chunk-HC3FHDKB.js → chunk-5R23J52J.js} +6 -6
- package/dist/{chunk-625DZLT5.js → chunk-67Q3Q5IO.js} +8 -6
- package/dist/{chunk-QGSHV3WO.js → chunk-6HIYOY6I.js} +77 -18
- package/dist/{chunk-L3AFVFGQ.js → chunk-6JAWNRDR.js} +2 -2
- package/dist/{chunk-6MJWYYAS.js → chunk-6YSEOXP5.js} +47 -3
- package/dist/{chunk-VIJIG5YL.js → chunk-7E2ZN7XA.js} +2 -2
- package/dist/{chunk-QLMOU57V.js → chunk-7EHZXZB2.js} +33 -20
- package/dist/{chunk-2AELPDMT.js → chunk-7ETELRQX.js} +1 -1
- package/dist/{chunk-7BHI3PZN.js → chunk-7GU4PXE5.js} +1 -1
- package/dist/{chunk-CDQHQAS7.js → chunk-7NJ4TDUH.js} +5 -5
- package/dist/{chunk-X3YKQJCZ.js → chunk-7NXB7OVX.js} +1 -1
- package/dist/{chunk-XEJOPVCG.js → chunk-A4CZPUQ6.js} +1 -1
- package/dist/{chunk-YGE6ML3O.js → chunk-AFV3FQNG.js} +4 -4
- package/dist/{chunk-V57XLKZL.js → chunk-BIUSODLS.js} +2 -2
- package/dist/{chunk-2QREHU4O.js → chunk-CFIQ3252.js} +3 -3
- package/dist/{chunk-BG4Y64FW.js → chunk-DFKEJARZ.js} +1 -1
- package/dist/{chunk-S54C6TQC.js → chunk-EA6574W2.js} +5 -5
- package/dist/{chunk-FDWMG6NY.js → chunk-EO6CL4PD.js} +2 -2
- package/dist/{chunk-SEILUNWB.js → chunk-ESXGCZDA.js} +26 -3
- package/dist/{chunk-CEQ2AZH4.js → chunk-EUNSJKJJ.js} +8 -8
- package/dist/{chunk-56JCQQLS.js → chunk-EVZDYG7L.js} +2 -2
- package/dist/{chunk-4MUFZU2G.js → chunk-F35YILEN.js} +1 -1
- package/dist/{chunk-ERK24P76.js → chunk-FG5HMJ7C.js} +1 -1
- package/dist/{chunk-NKLNU577.js → chunk-FX7KDF47.js} +3 -3
- package/dist/{chunk-AXJLJJ3M.js → chunk-FXECTHAG.js} +73 -2
- package/dist/chunk-FYS27SUS.js +216 -0
- package/dist/{chunk-O6IUZGWV.js → chunk-G3ZDCYMU.js} +1 -1
- package/dist/{chunk-ELLJPP6O.js → chunk-GFAG72LR.js} +2 -2
- package/dist/{chunk-ATKN4BJT.js → chunk-GV43RXR2.js} +1 -1
- package/dist/{chunk-4MWRR5IT.js → chunk-HSRNWCXJ.js} +3 -3
- package/dist/{chunk-IF26ZGZ7.js → chunk-LCNN7UOE.js} +3 -3
- package/dist/{chunk-WXZHQ3TT.js → chunk-LILS32LF.js} +5 -5
- package/dist/{chunk-33OOEVPG.js → chunk-LL2KHEJH.js} +1 -1
- package/dist/{chunk-W2IVTHIG.js → chunk-LWR5VKNC.js} +18 -10
- package/dist/{chunk-QUBIEZXC.js → chunk-M7MEVILL.js} +3 -3
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/{chunk-XV6S5PWW.js → chunk-MURJ4WAL.js} +1 -1
- package/dist/{chunk-FUZ5VYWD.js → chunk-MYEALNW6.js} +1 -1
- package/dist/{chunk-ADR3KHOC.js → chunk-NAZRRXZM.js} +2 -2
- package/dist/{chunk-ZGOJLNKS.js → chunk-NZLQ6GMX.js} +4 -4
- package/dist/{chunk-K4MBKXAE.js → chunk-OZRT64BB.js} +1 -1
- package/dist/{chunk-Y5VKZNFN.js → chunk-PSCXEH42.js} +2 -2
- package/dist/{chunk-METMK3L4.js → chunk-Q4WTIKM6.js} +3 -3
- package/dist/{chunk-U7NR4JVD.js → chunk-QIPW7OVB.js} +4 -4
- package/dist/{chunk-USE5IEEW.js → chunk-R3CLBNST.js} +1 -1
- package/dist/{chunk-7WFRY6OL.js → chunk-RFCEVROB.js} +2 -2
- package/dist/{chunk-EZHY65QA.js → chunk-RSNN2TPE.js} +13 -8
- package/dist/{chunk-DJ7EZIQA.js → chunk-RU37NSZH.js} +3 -3
- package/dist/{chunk-J4KQL7YZ.js → chunk-SDOWT67G.js} +5 -5
- package/dist/{chunk-4PZXI7WU.js → chunk-SJCPIYWJ.js} +2 -2
- package/dist/{chunk-MUNL23WE.js → chunk-SJJYXMJP.js} +6 -6
- package/dist/{chunk-6LOQE4J4.js → chunk-TMHE5CVX.js} +3 -3
- package/dist/{chunk-GAMVAORR.js → chunk-UUAVYIWJ.js} +1 -1
- package/dist/{chunk-Y5V4PA2Z.js → chunk-UWCPY4RY.js} +2 -2
- package/dist/{chunk-5RU35K57.js → chunk-VF3IL56Q.js} +2 -2
- package/dist/{chunk-WN3RACVD.js → chunk-W3CBFLIX.js} +3 -3
- package/dist/{chunk-RLVJ6TVL.js → chunk-W6MYFAOK.js} +26 -18
- package/dist/{chunk-CSOROFJY.js → chunk-YQK72JGV.js} +5 -5
- package/dist/{chunk-7JXJJNQ5.js → chunk-ZEDGKCCM.js} +1 -1
- package/dist/{chunk-SOCJ2N3E.js → chunk-ZJFJUAHS.js} +6 -6
- package/dist/{codex-app-cards-switch-ZO76D2NY.js → codex-app-cards-switch-IIL7IPP6.js} +12 -11
- package/dist/{codex-desktop-launch-MJT5E3O3.js → codex-desktop-launch-XCLMYVBD.js} +2 -1
- package/dist/{codex-session-launch-PTFCVIC7.js → codex-session-launch-UMVALJ3A.js} +19 -18
- package/dist/{config-SXV6XNVU.js → config-5N3GUJD5.js} +4 -3
- package/dist/{global-upgrade-ETDP32LO.js → global-upgrade-5F4CSXED.js} +10 -9
- package/dist/{identity-OOLIOSMR.js → identity-7ULYW4RL.js} +5 -4
- package/dist/{live-capabilities-2XIFA7YO.js → live-capabilities-QTSFXA6T.js} +5 -4
- package/dist/{paths-IIOQZESZ.js → paths-HEMK2ALW.js} +4 -3
- package/dist/{reapply-KFAJSKOQ.js → reapply-AMFKVYZV.js} +27 -26
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +22 -21
- package/dist/{upgrade-lock-T6ILR644.js → upgrade-lock-IAZC5644.js} +5 -4
- package/dist/usage-NEFDYSRT.js +11 -0
- package/package.json +1 -1
- package/dist/chunk-6MC2XXFD.js +0 -126
- package/dist/usage-6TN7FVWS.js +0 -10
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
+
McpToolError,
|
|
2
3
|
SubscriptionRequiredError,
|
|
3
4
|
callMcpTool
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ESXGCZDA.js";
|
|
5
6
|
import {
|
|
6
7
|
CLIENT_REPORT_DISABLE_ENV,
|
|
7
8
|
isDisabledByEnv
|
|
@@ -9,22 +10,23 @@ import {
|
|
|
9
10
|
import {
|
|
10
11
|
installNetworkDefaults,
|
|
11
12
|
isNetworkFailure
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HSRNWCXJ.js";
|
|
13
14
|
import {
|
|
14
15
|
clientReportClaims
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6YSEOXP5.js";
|
|
16
17
|
import {
|
|
17
18
|
getApiKey,
|
|
18
19
|
getBaseUrl
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DFKEJARZ.js";
|
|
20
21
|
import {
|
|
21
22
|
ASK_AGENT_NAME_MAX,
|
|
22
23
|
CLIENT_REPORT_PATH,
|
|
23
24
|
DECISION_LINE_MAX,
|
|
24
25
|
GATE_PERMISSION_MODE_MAX_LENGTH,
|
|
26
|
+
TOOL_FAILURE_CODES,
|
|
25
27
|
degradedLine,
|
|
26
28
|
truncateLine
|
|
27
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-FXECTHAG.js";
|
|
28
30
|
|
|
29
31
|
// src/api.ts
|
|
30
32
|
import { randomUUID } from "crypto";
|
|
@@ -195,8 +197,10 @@ var isAwayPaused = (result) => result.paused === true;
|
|
|
195
197
|
var isLocalQuestionHandoff = (result) => !isAwayPaused(result) && (result.suppressed === true || result.noDevices === true || result.status === "terminal" || result.status === "notified");
|
|
196
198
|
var waitsForThePhone = (result) => result.answered !== true && !isAwayPaused(result) && !isLocalQuestionHandoff(result);
|
|
197
199
|
var STOPPED = { answered: false, handoffAction: "stop" };
|
|
198
|
-
var
|
|
199
|
-
|
|
200
|
+
var isQuestionLimitRefusal = (error) => error instanceof McpToolError && error.failure === TOOL_FAILURE_CODES.questionLimit;
|
|
201
|
+
var isRefusedAsk = (error) => error instanceof SubscriptionRequiredError || isQuestionLimitRefusal(error);
|
|
202
|
+
var unavailableQuestionUnlessRefused = (error) => {
|
|
203
|
+
if (isRefusedAsk(error)) throw error;
|
|
200
204
|
return { correlationId: "", status: "unavailable" };
|
|
201
205
|
};
|
|
202
206
|
var truncateOptional = (text, max) => text === void 0 ? void 0 : truncateLine(text, max);
|
|
@@ -318,7 +322,8 @@ export {
|
|
|
318
322
|
isAwayPaused,
|
|
319
323
|
isLocalQuestionHandoff,
|
|
320
324
|
waitsForThePhone,
|
|
321
|
-
|
|
325
|
+
isQuestionLimitRefusal,
|
|
326
|
+
unavailableQuestionUnlessRefused,
|
|
322
327
|
askUser,
|
|
323
328
|
waitForAnswer,
|
|
324
329
|
WAIT_RESPONSE_GRACE_MS,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
callMcpTool
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ESXGCZDA.js";
|
|
4
4
|
import {
|
|
5
5
|
NPX_LATEST_COMMAND
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FG5HMJ7C.js";
|
|
7
7
|
import {
|
|
8
8
|
classifyConfirmResponse,
|
|
9
9
|
isAnswerSource
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FXECTHAG.js";
|
|
11
11
|
|
|
12
12
|
// src/reach.ts
|
|
13
13
|
var reachVerdict = (channels) => {
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TMHE5CVX.js";
|
|
7
7
|
import {
|
|
8
8
|
daemonHasRemoteProof,
|
|
9
9
|
daemonServiceManagerAvailable,
|
|
10
10
|
hasDaemonServiceDefinition,
|
|
11
11
|
readDaemonNeedsLogin,
|
|
12
12
|
readDaemonStatus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5R23J52J.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-W3CBFLIX.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-G3ZDCYMU.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-DFKEJARZ.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
26
|
} from "./chunk-QTOLNRET.js";
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
everyProgramFileIsThere,
|
|
9
9
|
installedCodexApp,
|
|
10
10
|
shellQuoted
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UWCPY4RY.js";
|
|
12
12
|
import {
|
|
13
13
|
writeHuman
|
|
14
14
|
} from "./chunk-QCGNGEGE.js";
|
|
15
15
|
import {
|
|
16
16
|
xml
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5R23J52J.js";
|
|
18
18
|
import {
|
|
19
19
|
CODEX_APP_LAUNCH_AT_LOGIN_VERB,
|
|
20
20
|
CODEX_APP_LAUNCH_VARIABLE
|
|
@@ -4,30 +4,30 @@ import {
|
|
|
4
4
|
postLiveSession,
|
|
5
5
|
postLiveSessionUntilAccepted,
|
|
6
6
|
startLiveSessionHeartbeat
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GFAG72LR.js";
|
|
8
8
|
import {
|
|
9
9
|
SESSION_IDLE_TIMEOUT_MS,
|
|
10
10
|
describeIdleWindow,
|
|
11
11
|
idleDeadlinePassed,
|
|
12
12
|
startProcessOwnership
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-RFCEVROB.js";
|
|
14
14
|
import {
|
|
15
15
|
spawnClaude
|
|
16
16
|
} from "./chunk-XHKBHWLX.js";
|
|
17
17
|
import {
|
|
18
18
|
repoKeyFor
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4K6YZPZ3.js";
|
|
20
20
|
import {
|
|
21
21
|
isAskUserResponse,
|
|
22
22
|
isDecisionStopped,
|
|
23
23
|
isWaitForAnswerResponse,
|
|
24
24
|
withdrawQuestion,
|
|
25
25
|
writeDegraded
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-RSNN2TPE.js";
|
|
27
27
|
import {
|
|
28
28
|
callMcpTool,
|
|
29
29
|
isRetryable
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ESXGCZDA.js";
|
|
31
31
|
import {
|
|
32
32
|
AGENT_QUESTION_DESCRIPTION_MAX,
|
|
33
33
|
AGENT_QUESTION_HEADER_MAX,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
parseCodexQuestions,
|
|
49
49
|
planElicitationAsk,
|
|
50
50
|
readElicitationFields
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-FXECTHAG.js";
|
|
52
52
|
|
|
53
53
|
// src/codex-question-owner.ts
|
|
54
54
|
import { createHash } from "crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
realpath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R3CLBNST.js";
|
|
4
4
|
import {
|
|
5
5
|
findNativeClaudeInstall
|
|
6
6
|
} from "./chunk-VUFHYMSP.js";
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
resolvePackageVersionFromBinary,
|
|
14
14
|
resolvePathBinary,
|
|
15
15
|
resolvePathBinaryAsync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CFIQ3252.js";
|
|
17
17
|
import {
|
|
18
18
|
MANAGED_PROVIDERS
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FXECTHAG.js";
|
|
20
20
|
|
|
21
21
|
// src/live-capabilities.ts
|
|
22
22
|
import { homedir } from "os";
|
|
@@ -294,7 +294,7 @@ var loadedOnce = (load) => {
|
|
|
294
294
|
};
|
|
295
295
|
|
|
296
296
|
// src/codex-desktop-proxy.ts
|
|
297
|
-
var loadThePhone = () => import("./api-
|
|
297
|
+
var loadThePhone = () => import("./api-7HLZRIUV.js");
|
|
298
298
|
var theFirstCardLoadsAgain = () => {
|
|
299
299
|
};
|
|
300
300
|
var APP_SERVER_COMMAND = "app-server";
|
|
@@ -827,7 +827,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
|
|
|
827
827
|
return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
|
|
828
828
|
}
|
|
829
829
|
if (args[0] === APP_CARDS_FLAG) {
|
|
830
|
-
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-
|
|
830
|
+
const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-IIL7IPP6.js");
|
|
831
831
|
return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
|
|
832
832
|
}
|
|
833
833
|
if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-POFBE6ZY.js";
|
|
4
4
|
import {
|
|
5
5
|
autoUpdateState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6YSEOXP5.js";
|
|
7
7
|
import {
|
|
8
8
|
readJsonSafe,
|
|
9
9
|
writeJsonAtomic
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-QTOLNRET.js";
|
|
18
18
|
import {
|
|
19
19
|
isAutoUpdateResult
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FXECTHAG.js";
|
|
21
21
|
|
|
22
22
|
// src/auto-update.ts
|
|
23
23
|
import { spawn } from "child_process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PSCXEH42.js";
|
|
4
4
|
import {
|
|
5
5
|
backupFile,
|
|
6
6
|
readJsonSafe,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "./chunk-QENTGE75.js";
|
|
10
10
|
import {
|
|
11
11
|
configFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DFKEJARZ.js";
|
|
13
13
|
import {
|
|
14
14
|
API_KEY_PREFIX_PATTERN,
|
|
15
15
|
isRecord
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FXECTHAG.js";
|
|
17
17
|
|
|
18
18
|
// src/shell-alias.ts
|
|
19
19
|
import { homedir } from "os";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EVZDYG7L.js";
|
|
4
4
|
import {
|
|
5
5
|
CODEX_INSTRUCTIONS_LABEL,
|
|
6
6
|
GEMINI_INSTRUCTIONS_LABEL,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
macAppFxBridge,
|
|
12
12
|
refreshInstructionBlock,
|
|
13
13
|
renderAgentInstructions
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LILS32LF.js";
|
|
15
15
|
import {
|
|
16
16
|
OPENCODE_HOOK_BINARY,
|
|
17
17
|
agentHookOwner,
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
openCodeInstructionsFile,
|
|
22
22
|
openCodePluginDir,
|
|
23
23
|
openCodeWired
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-6HIYOY6I.js";
|
|
25
25
|
import {
|
|
26
26
|
detectClaudeVersion
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-R3CLBNST.js";
|
|
28
28
|
import {
|
|
29
29
|
addClaudeMcpServer,
|
|
30
30
|
addCompatibleHooks,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
compatibleConfigFile,
|
|
34
34
|
compatibleInstructionsFile,
|
|
35
35
|
hasCompatibleHooks
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-557ZE5EX.js";
|
|
37
37
|
import {
|
|
38
38
|
claudeUnprovenHolds,
|
|
39
39
|
claudeWired,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
codexWired,
|
|
42
42
|
geminiWired,
|
|
43
43
|
planHooks
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-7NJ4TDUH.js";
|
|
45
45
|
import {
|
|
46
46
|
CLAUDE_HOOK_BINARY,
|
|
47
47
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
needsReregistration,
|
|
53
53
|
registrationSignatures,
|
|
54
54
|
supportedClaudeEvents
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-LCNN7UOE.js";
|
|
56
56
|
import {
|
|
57
57
|
formatVersion
|
|
58
58
|
} from "./chunk-6ICPEJY5.js";
|
|
@@ -68,6 +68,7 @@ import {
|
|
|
68
68
|
codexConfigToml,
|
|
69
69
|
codexHookPositions,
|
|
70
70
|
codexHooksJson,
|
|
71
|
+
codexMcpStartsCommand,
|
|
71
72
|
codexRegistrationHolder,
|
|
72
73
|
codexVacatedIndexes,
|
|
73
74
|
dropVacatedCodexHookTrust,
|
|
@@ -82,11 +83,11 @@ import {
|
|
|
82
83
|
registeredCommands,
|
|
83
84
|
registrationHolderOf,
|
|
84
85
|
vscodePluginMcp
|
|
85
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-6YSEOXP5.js";
|
|
86
87
|
import {
|
|
87
88
|
resolveGlobalBinDir,
|
|
88
89
|
resolveGlobalBinary
|
|
89
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-CFIQ3252.js";
|
|
90
91
|
import {
|
|
91
92
|
readJsonSafe,
|
|
92
93
|
writeFileAtomic,
|
|
@@ -96,7 +97,7 @@ import {
|
|
|
96
97
|
HOOK_COMPATIBLE_PROFILES,
|
|
97
98
|
isCompatibleAgentType,
|
|
98
99
|
isRecord
|
|
99
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-FXECTHAG.js";
|
|
100
101
|
|
|
101
102
|
// src/reapply.ts
|
|
102
103
|
import { dirname, join } from "path";
|
|
@@ -250,13 +251,23 @@ var inspectConfiguredManagedProviders = (paths = {}) => {
|
|
|
250
251
|
}
|
|
251
252
|
return providers;
|
|
252
253
|
};
|
|
253
|
-
var
|
|
254
|
+
var codexNativeOwnershipFor = (hooksConfig, requested, macAppAvailable) => hooksConfig === null && macAppAvailable ? "preserve" : requested;
|
|
255
|
+
var reapplyCodexSettings = (apiKey, paths = {}, nativeOwnership = "preserve") => {
|
|
254
256
|
const configPath = paths.configPath ?? codexConfigToml();
|
|
255
257
|
const hooksPath = paths.hooksPath ?? codexHooksJson();
|
|
256
258
|
const config = readToml(configPath);
|
|
257
259
|
const hooksConfig = readJson(hooksPath);
|
|
258
260
|
const configured = config != null && !!config.mcp_servers?.pushary || hooksConfig != null && hasCodexHooks(hooksConfig);
|
|
259
261
|
if (!configured) return { configured: false, reapplied: false, hooks: false, mcp: false };
|
|
262
|
+
const startedCommand = config != null && codexMcpStartsCommand(config);
|
|
263
|
+
let mcpWrite = null;
|
|
264
|
+
if (config != null && apiKey) {
|
|
265
|
+
try {
|
|
266
|
+
mcpWrite = addCodexMcpServer(config, apiKey, codexNativeOwnershipFor(hooksConfig, nativeOwnership, paths.macAppAvailable ?? true));
|
|
267
|
+
} catch {
|
|
268
|
+
return { configured: true, reapplied: false, hooks: false, mcp: false, failed: true };
|
|
269
|
+
}
|
|
270
|
+
}
|
|
260
271
|
const command = guardBinary((paths.resolveBinary ?? resolveGlobalBinary)(CODEX_HOOK_BINARY) ?? CODEX_HOOK_BINARY);
|
|
261
272
|
let hooks = false;
|
|
262
273
|
let mcp = false;
|
|
@@ -277,12 +288,9 @@ var reapplyCodexSettings = (apiKey, paths = {}) => {
|
|
|
277
288
|
dropVacatedCodexHookTrust(config, hooksPath, vacated);
|
|
278
289
|
addCodexHookTrust(config, hooksPath, command, codexHookPositions(hooksConfig ?? void 0));
|
|
279
290
|
}
|
|
280
|
-
if (apiKey) {
|
|
281
|
-
addCodexMcpServer(config, apiKey);
|
|
282
|
-
}
|
|
283
291
|
if (hooks || apiKey) {
|
|
284
292
|
writeFileAtomic(configPath, stringifyTOML(config), modeToPreserve(configPath), "utf-8");
|
|
285
|
-
mcp =
|
|
293
|
+
mcp = mcpWrite === "wrote-key";
|
|
286
294
|
}
|
|
287
295
|
} catch {
|
|
288
296
|
failed = true;
|
|
@@ -290,7 +298,7 @@ var reapplyCodexSettings = (apiKey, paths = {}) => {
|
|
|
290
298
|
}
|
|
291
299
|
}
|
|
292
300
|
if (config === null) hooks = false;
|
|
293
|
-
return { configured: true, reapplied: hooks || mcp, hooks, mcp, failed };
|
|
301
|
+
return { configured: true, reapplied: hooks || mcp, hooks, mcp, failed, ...mcp && startedCommand ? { codexRestartRequired: true } : {} };
|
|
294
302
|
};
|
|
295
303
|
var repairCodexHolds = (paths = {}) => {
|
|
296
304
|
const idle = { configured: false, reapplied: false, hooks: false, mcp: false };
|
|
@@ -408,12 +416,13 @@ var KEPT_FOR_APP = { configured: true, reapplied: false, hooks: false, mcp: fals
|
|
|
408
416
|
var FAILED_REAPPLY = { configured: false, reapplied: false, hooks: false, mcp: false, failed: true };
|
|
409
417
|
var noInstructionBlock = () => null;
|
|
410
418
|
var reapplyAllAgents = (apiKey, options = {}) => {
|
|
419
|
+
const appAvailable = (options.appAvailable ?? macAppBridgeAvailable)();
|
|
411
420
|
const runners = [
|
|
412
421
|
{ id: "claude", label: "Claude Code", run: () => reapplyClaudeSettings(apiKey), instructions: noInstructionBlock },
|
|
413
422
|
{
|
|
414
423
|
id: "codex",
|
|
415
424
|
label: "Codex",
|
|
416
|
-
run: () => reapplyCodexSettings(apiKey),
|
|
425
|
+
run: () => reapplyCodexSettings(apiKey, { macAppAvailable: appAvailable }, "take-over"),
|
|
417
426
|
instructions: () => ({ file: codexAgentsMd(), body: renderAgentInstructions(CODEX_INSTRUCTIONS_LABEL) })
|
|
418
427
|
},
|
|
419
428
|
{
|
|
@@ -438,7 +447,6 @@ var reapplyAllAgents = (apiKey, options = {}) => {
|
|
|
438
447
|
instructions: () => compatibleInstructionTarget(profile)
|
|
439
448
|
}))
|
|
440
449
|
];
|
|
441
|
-
const appAvailable = (options.appAvailable ?? macAppBridgeAvailable)();
|
|
442
450
|
const done = [];
|
|
443
451
|
for (const runner of runners) {
|
|
444
452
|
try {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_SETTINGS_PATH
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AFV3FQNG.js";
|
|
4
4
|
import {
|
|
5
5
|
readMacAppAgentKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QIPW7OVB.js";
|
|
7
7
|
import {
|
|
8
8
|
findExportedKeyLines,
|
|
9
9
|
isAdoptedMacAppKey,
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
readConfigFileKey,
|
|
14
14
|
readKeySource,
|
|
15
15
|
readMacAppKeyPrefix
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-W3CBFLIX.js";
|
|
17
17
|
import {
|
|
18
18
|
absoluteUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-Q4WTIKM6.js";
|
|
20
20
|
import {
|
|
21
21
|
isValidApiKey
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FXECTHAG.js";
|
|
23
23
|
|
|
24
24
|
// src/key-revocation.ts
|
|
25
25
|
var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
forkFinishWithUpgradeLock,
|
|
4
4
|
installWithUpgradeLock,
|
|
5
5
|
releaseAutoUpdateLock
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7E2ZN7XA.js";
|
|
7
7
|
import {
|
|
8
8
|
phoneStartIsRequired
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TMHE5CVX.js";
|
|
10
10
|
import {
|
|
11
11
|
describeAutoUpdateCheck,
|
|
12
12
|
globalInstallLocation,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
readAutoUpdateState,
|
|
19
19
|
updateAutoUpdateState,
|
|
20
20
|
upgradeEntryFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VF3IL56Q.js";
|
|
22
22
|
import {
|
|
23
23
|
EXIT
|
|
24
24
|
} from "./chunk-KZERVKTD.js";
|
|
@@ -26,17 +26,17 @@ import {
|
|
|
26
26
|
autoUpdateLock,
|
|
27
27
|
autoUpdateLog,
|
|
28
28
|
autoUpdateState
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-6YSEOXP5.js";
|
|
30
30
|
import {
|
|
31
31
|
execNpm,
|
|
32
32
|
fetchLatestPublishedVersion,
|
|
33
33
|
npmErrorMessage,
|
|
34
34
|
readGlobalCliInstallAt,
|
|
35
35
|
readGlobalPrefix
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-CFIQ3252.js";
|
|
37
37
|
import {
|
|
38
38
|
NPX_LATEST_COMMAND
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-FG5HMJ7C.js";
|
|
40
40
|
import {
|
|
41
41
|
commandsPackage,
|
|
42
42
|
globalUpgradeEntry,
|
|
@@ -22,23 +22,24 @@ import {
|
|
|
22
22
|
turnCodexAppCardsOff,
|
|
23
23
|
turnCodexAppCardsOn,
|
|
24
24
|
whyLaunchctlFailed
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-SJCPIYWJ.js";
|
|
26
|
+
import "./chunk-UWCPY4RY.js";
|
|
27
27
|
import "./chunk-XCEN33UP.js";
|
|
28
28
|
import "./chunk-QCGNGEGE.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-5R23J52J.js";
|
|
30
30
|
import "./chunk-XHKBHWLX.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-W3CBFLIX.js";
|
|
32
32
|
import "./chunk-E46NE7FB.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-G3ZDCYMU.js";
|
|
34
|
+
import "./chunk-PSCXEH42.js";
|
|
35
|
+
import "./chunk-6YSEOXP5.js";
|
|
36
|
+
import "./chunk-CFIQ3252.js";
|
|
37
37
|
import "./chunk-QENTGE75.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-DFKEJARZ.js";
|
|
39
|
+
import "./chunk-FG5HMJ7C.js";
|
|
40
40
|
import "./chunk-QTOLNRET.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-FXECTHAG.js";
|
|
42
|
+
import "./chunk-MLKGABMK.js";
|
|
42
43
|
export {
|
|
43
44
|
CODEX_APP_CARDS_DIRECTORY,
|
|
44
45
|
CODEX_APP_CARDS_LOGIN_ITEM,
|
|
@@ -11,11 +11,12 @@ import {
|
|
|
11
11
|
installedCodexApp,
|
|
12
12
|
shellQuoted,
|
|
13
13
|
writeDesktopProxy
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UWCPY4RY.js";
|
|
15
15
|
import "./chunk-XCEN33UP.js";
|
|
16
16
|
import {
|
|
17
17
|
CODEX_APP_LAUNCH_VARIABLE
|
|
18
18
|
} from "./chunk-E46NE7FB.js";
|
|
19
|
+
import "./chunk-MLKGABMK.js";
|
|
19
20
|
export {
|
|
20
21
|
CODEX_APP_LAUNCH_VARIABLE,
|
|
21
22
|
LAUNCHCTL,
|
|
@@ -11,36 +11,37 @@ import {
|
|
|
11
11
|
isCodexQuestionLeftWithTheLocalClient,
|
|
12
12
|
planCodexElicitation,
|
|
13
13
|
reportOwnedQuestion
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-SJJYXMJP.js";
|
|
15
|
+
import "./chunk-GFAG72LR.js";
|
|
16
|
+
import "./chunk-TMHE5CVX.js";
|
|
17
|
+
import "./chunk-R3CLBNST.js";
|
|
18
|
+
import "./chunk-RFCEVROB.js";
|
|
19
19
|
import "./chunk-VUFHYMSP.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-7ETELRQX.js";
|
|
21
|
+
import "./chunk-UUAVYIWJ.js";
|
|
22
22
|
import "./chunk-XHKBHWLX.js";
|
|
23
23
|
import "./chunk-6ICPEJY5.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-4K6YZPZ3.js";
|
|
25
25
|
import {
|
|
26
26
|
writeDegraded
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-RSNN2TPE.js";
|
|
28
|
+
import "./chunk-ESXGCZDA.js";
|
|
29
29
|
import "./chunk-POFBE6ZY.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-Q4WTIKM6.js";
|
|
31
|
+
import "./chunk-HSRNWCXJ.js";
|
|
32
|
+
import "./chunk-G3ZDCYMU.js";
|
|
33
33
|
import "./chunk-PPY5N2E6.js";
|
|
34
34
|
import "./chunk-KZERVKTD.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-6YSEOXP5.js";
|
|
36
|
+
import "./chunk-CFIQ3252.js";
|
|
37
37
|
import "./chunk-QENTGE75.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-DFKEJARZ.js";
|
|
39
|
+
import "./chunk-FG5HMJ7C.js";
|
|
40
40
|
import "./chunk-QTOLNRET.js";
|
|
41
41
|
import {
|
|
42
42
|
canonicalJsonText
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-FXECTHAG.js";
|
|
44
|
+
import "./chunk-MLKGABMK.js";
|
|
44
45
|
|
|
45
46
|
// src/codex-session-launch.ts
|
|
46
47
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -3,9 +3,10 @@ import {
|
|
|
3
3
|
getApiKey,
|
|
4
4
|
getBaseUrl,
|
|
5
5
|
resetKeyDriftWarning
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-DFKEJARZ.js";
|
|
7
|
+
import "./chunk-FG5HMJ7C.js";
|
|
8
|
+
import "./chunk-FXECTHAG.js";
|
|
9
|
+
import "./chunk-MLKGABMK.js";
|
|
9
10
|
export {
|
|
10
11
|
configFilePath,
|
|
11
12
|
getApiKey,
|
|
@@ -7,21 +7,22 @@ import {
|
|
|
7
7
|
recordUnfinishedUpgrade,
|
|
8
8
|
upgradeInstalledPackage,
|
|
9
9
|
withUpgradeLock
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-ZJFJUAHS.js";
|
|
11
|
+
import "./chunk-7E2ZN7XA.js";
|
|
12
|
+
import "./chunk-TMHE5CVX.js";
|
|
13
|
+
import "./chunk-R3CLBNST.js";
|
|
14
14
|
import "./chunk-VUFHYMSP.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-VF3IL56Q.js";
|
|
16
16
|
import "./chunk-6ICPEJY5.js";
|
|
17
17
|
import "./chunk-POFBE6ZY.js";
|
|
18
18
|
import "./chunk-KZERVKTD.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-6YSEOXP5.js";
|
|
20
|
+
import "./chunk-CFIQ3252.js";
|
|
21
21
|
import "./chunk-QENTGE75.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-FG5HMJ7C.js";
|
|
23
23
|
import "./chunk-QTOLNRET.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-FXECTHAG.js";
|
|
25
|
+
import "./chunk-MLKGABMK.js";
|
|
25
26
|
export {
|
|
26
27
|
finishGlobalUpgrade,
|
|
27
28
|
finishUpgradeWithLock,
|