@pushary/agent-hooks 1.9.38 → 1.9.40
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/dist/bin/pushary-bell-hook.js +25 -25
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +24 -24
- package/dist/bin/pushary-clean.js +29 -29
- package/dist/bin/pushary-codex-bridge.js +135 -30
- package/dist/bin/pushary-codex-hook.js +30 -30
- package/dist/bin/pushary-codex.js +12 -12
- package/dist/bin/pushary-connect.js +24 -24
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +32 -32
- package/dist/bin/pushary-disconnect.js +24 -24
- package/dist/bin/pushary-doctor.js +33 -33
- package/dist/bin/pushary-elicitation-hook.js +25 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +27 -27
- package/dist/bin/pushary-hook.js +29 -29
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +24 -24
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +12 -12
- package/dist/bin/pushary-notification-hook.js +24 -24
- package/dist/bin/pushary-opencode-hook.js +26 -26
- package/dist/bin/pushary-permission-denied-hook.js +29 -29
- package/dist/bin/pushary-permission-hook.js +28 -28
- package/dist/bin/pushary-post-hook.js +24 -24
- package/dist/bin/pushary-prompt-hook.js +24 -24
- package/dist/bin/pushary-session-end-hook.js +24 -24
- package/dist/bin/pushary-session-start-hook.js +28 -28
- package/dist/bin/pushary-setup.js +35 -35
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +26 -26
- package/dist/bin/pushary-stop-hook.js +24 -24
- package/dist/bin/pushary-stopfailure-hook.js +24 -24
- package/dist/bin/pushary-suggestions.js +12 -12
- package/dist/bin/pushary-transcript-register.js +17 -17
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +30 -30
- package/dist/bin/pushary-wait.js +12 -12
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-GBNG6QEV.js → chunk-22SNRAZS.js} +3 -3
- package/dist/{chunk-QC7ZNZMZ.js → chunk-2UG5Y6EC.js} +1 -1
- package/dist/{chunk-JWMCGL3P.js → chunk-2UKEITTN.js} +3 -3
- package/dist/{chunk-WLQENMOW.js → chunk-3E2P45GK.js} +4 -4
- package/dist/{chunk-D5IAEPFA.js → chunk-4YYT4QYH.js} +2 -2
- package/dist/{chunk-Y3XF324T.js → chunk-54JZ6GLW.js} +1 -1
- package/dist/{chunk-HCXBAF43.js → chunk-6YJS2IJS.js} +1 -1
- package/dist/{chunk-VITJTFFT.js → chunk-7TV7BXIH.js} +2 -2
- package/dist/{chunk-J2APHNZL.js → chunk-ABSVJ3WV.js} +5 -5
- package/dist/{chunk-L5WOYQT7.js → chunk-ADWW7Y6X.js} +8 -8
- package/dist/{chunk-QZ4KOMFE.js → chunk-ATMCBW5L.js} +1 -1
- package/dist/{chunk-BMHD2NEH.js → chunk-AYU4S7RQ.js} +3 -3
- package/dist/{chunk-KBMQYMGG.js → chunk-AYUCBAIJ.js} +6 -6
- package/dist/{chunk-4D54LZGF.js → chunk-BXPIKJPY.js} +1 -1
- package/dist/{chunk-W2TXFM6O.js → chunk-C7P5VIU6.js} +1 -1
- package/dist/{chunk-7GSOIBVM.js → chunk-CCAYCIW4.js} +4 -4
- package/dist/{chunk-MXEDMQLC.js → chunk-CPGW7MMA.js} +1 -1
- package/dist/{chunk-ABDGTGBT.js → chunk-CQ56WBBP.js} +3 -3
- package/dist/{chunk-AI2YBW42.js → chunk-DKJFRVVN.js} +5 -5
- package/dist/{chunk-FZEQWY7Q.js → chunk-E6QJMEQJ.js} +1 -1
- package/dist/{chunk-NRVZNZVE.js → chunk-EK7EOHH5.js} +5 -5
- package/dist/{chunk-QOUW57RT.js → chunk-EPFB6LGF.js} +32 -25
- package/dist/{chunk-WR3GKYKD.js → chunk-ESJY5UYZ.js} +1 -1
- package/dist/{chunk-DDRLK67P.js → chunk-FZ5FYVR3.js} +2 -2
- package/dist/{chunk-RISJLN3O.js → chunk-GBUAOQ7Q.js} +2 -2
- package/dist/{chunk-AJIH4JGB.js → chunk-HPZMNWDI.js} +5 -5
- package/dist/{chunk-K2CZJBUS.js → chunk-IKBQRXPQ.js} +4 -4
- package/dist/{chunk-7P43CI6G.js → chunk-KH57L2HF.js} +2 -2
- package/dist/{chunk-JVKY6ILU.js → chunk-KPDV6RQL.js} +1 -1
- package/dist/{chunk-N2I7RMC6.js → chunk-MAEO47WP.js} +10 -10
- package/dist/{chunk-MIENLS7P.js → chunk-MAMQK4I2.js} +2 -2
- package/dist/{chunk-WASCAI2U.js → chunk-MFGPTJJ3.js} +4 -4
- package/dist/{chunk-PA3OZGIA.js → chunk-N2JDDOQS.js} +8 -8
- package/dist/{chunk-5DC2PRVT.js → chunk-N7MBQPIF.js} +2 -2
- package/dist/{chunk-5KVL4AP5.js → chunk-P2IT4Y5Q.js} +4 -4
- package/dist/{chunk-3DXDJL4K.js → chunk-P2PWALZL.js} +4 -4
- package/dist/{chunk-TEG2JL5M.js → chunk-P7WQCX4D.js} +7 -7
- package/dist/{chunk-STXWIYAY.js → chunk-PFTAURWI.js} +4 -4
- package/dist/{chunk-B54Q4I7T.js → chunk-PKNHXBL2.js} +2 -2
- package/dist/{chunk-D2G6HWEA.js → chunk-PZTLBH6Z.js} +2 -2
- package/dist/{chunk-OLS4DTFN.js → chunk-QDC2VGFO.js} +3 -3
- package/dist/{chunk-G3CNMCQS.js → chunk-QENU2KIM.js} +1 -1
- package/dist/{chunk-ZFJAZBBF.js → chunk-QLV5S2KS.js} +5 -5
- package/dist/{chunk-3HUHP4A4.js → chunk-QWWJWPUV.js} +1 -1
- package/dist/{chunk-MBTNHQCI.js → chunk-SGOQGCKJ.js} +2 -2
- package/dist/{chunk-CHRRBADC.js → chunk-THIH3GV7.js} +6 -6
- package/dist/{chunk-4GEHVRV3.js → chunk-UOMFOMJM.js} +4 -4
- package/dist/{chunk-RULJMNY7.js → chunk-UTJSAOB2.js} +2 -2
- package/dist/{chunk-LZZ3EKKI.js → chunk-V2TZVYXI.js} +4 -4
- package/dist/{chunk-IBUAVM6X.js → chunk-VMIR56HZ.js} +1 -1
- package/dist/{chunk-7O5U5TED.js → chunk-W6PSSMTV.js} +5 -5
- package/dist/{chunk-CW3IJD2H.js → chunk-WNJW2NFZ.js} +3 -3
- package/dist/{chunk-D322CKL2.js → chunk-XJD5H72U.js} +1 -1
- package/dist/{chunk-FLEWP4BV.js → chunk-YVMQGRLS.js} +1 -1
- package/dist/{global-upgrade-ROZHFAO5.js → global-upgrade-KN7W4ULD.js} +6 -6
- package/dist/{paths-FSFFGRRU.js → paths-55G5FUXV.js} +2 -2
- package/dist/{reapply-WY5LHIR4.js → reapply-MCZ6RY6S.js} +20 -20
- package/dist/src/index.js +19 -19
- package/dist/{upgrade-lock-6PYOTF4X.js → upgrade-lock-HNWCOGS6.js} +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.40
|
|
4
|
+
|
|
5
|
+
- Personal Codex question replies bind to the original connection and request. A saved answer is claimed once; missing delivery confirmation never triggers automatic replay.
|
|
6
|
+
- With the matching server, blocked-action answers and their short-lived grants commit together, and a Stop prevents later claims. Question answer time remains separate from this grant window.
|
|
7
|
+
- Phone, Mac and browser inboxes read every authorized question page. Saved answers and unconfirmed delivery have separate messages; neither claims an action ran.
|
|
8
|
+
|
|
9
|
+
## 1.9.39
|
|
10
|
+
|
|
11
|
+
- When away recognizes destructive Codex commands behind Git options and command wrappers, and recursive PowerShell deletions.
|
|
12
|
+
- Malformed Codex question choices stay in Codex instead of appearing in Pushary with choices silently removed.
|
|
13
|
+
|
|
3
14
|
## 1.9.38
|
|
4
15
|
|
|
5
16
|
- Owned Codex child questions reach the long-wait bridge instead of being asked first by a short-lived native hook. The matching Mac helper hands these questions to the CLI; kill, deny and command-permission checks still apply.
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handleBell
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-54JZ6GLW.js";
|
|
5
5
|
import {
|
|
6
6
|
readHookInput
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-3E2P45GK.js";
|
|
8
|
+
import "../chunk-N2JDDOQS.js";
|
|
9
9
|
import "../chunk-DWQYCOPI.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-HPZMNWDI.js";
|
|
11
|
+
import "../chunk-BXPIKJPY.js";
|
|
12
|
+
import "../chunk-ESJY5UYZ.js";
|
|
13
|
+
import "../chunk-2UG5Y6EC.js";
|
|
14
14
|
import "../chunk-XHKBHWLX.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-CCAYCIW4.js";
|
|
16
|
+
import "../chunk-QLV5S2KS.js";
|
|
17
|
+
import "../chunk-22SNRAZS.js";
|
|
18
|
+
import "../chunk-E6QJMEQJ.js";
|
|
19
|
+
import "../chunk-KPDV6RQL.js";
|
|
20
20
|
import "../chunk-GMXKITVA.js";
|
|
21
21
|
import "../chunk-6ICPEJY5.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-2UKEITTN.js";
|
|
23
|
+
import "../chunk-ADWW7Y6X.js";
|
|
24
|
+
import "../chunk-VMIR56HZ.js";
|
|
25
|
+
import "../chunk-W6PSSMTV.js";
|
|
26
26
|
import "../chunk-POFBE6ZY.js";
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-CQ56WBBP.js";
|
|
28
|
+
import "../chunk-QDC2VGFO.js";
|
|
29
|
+
import "../chunk-AYU4S7RQ.js";
|
|
30
|
+
import "../chunk-QWWJWPUV.js";
|
|
31
31
|
import "../chunk-7QLSKOSU.js";
|
|
32
32
|
import "../chunk-KZERVKTD.js";
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
33
|
+
import "../chunk-MAMQK4I2.js";
|
|
34
|
+
import "../chunk-UOMFOMJM.js";
|
|
35
35
|
import "../chunk-AQFEP65J.js";
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-XJD5H72U.js";
|
|
37
|
+
import "../chunk-CPGW7MMA.js";
|
|
38
|
+
import "../chunk-EPFB6LGF.js";
|
|
39
39
|
|
|
40
40
|
// bin/pushary-bell-hook.ts
|
|
41
41
|
var main = async () => {
|
package/dist/bin/pushary-bell.js
CHANGED
|
@@ -5,39 +5,39 @@ import {
|
|
|
5
5
|
liveAgentCount,
|
|
6
6
|
ring,
|
|
7
7
|
upgradeThreshold
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-54JZ6GLW.js";
|
|
9
9
|
import {
|
|
10
10
|
createIo
|
|
11
11
|
} from "../chunk-FO3MDD26.js";
|
|
12
12
|
import {
|
|
13
13
|
exitOnHelpFlag
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-KH57L2HF.js";
|
|
15
15
|
import {
|
|
16
16
|
addBellHooks,
|
|
17
17
|
bellInstalled,
|
|
18
18
|
removeBellHooks
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-KPDV6RQL.js";
|
|
20
20
|
import {
|
|
21
21
|
parseFlags
|
|
22
22
|
} from "../chunk-GMXKITVA.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-2UKEITTN.js";
|
|
24
24
|
import "../chunk-7QLSKOSU.js";
|
|
25
25
|
import {
|
|
26
26
|
EXIT
|
|
27
27
|
} from "../chunk-KZERVKTD.js";
|
|
28
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-MAMQK4I2.js";
|
|
29
29
|
import {
|
|
30
30
|
claudeSettings
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-UOMFOMJM.js";
|
|
32
32
|
import {
|
|
33
33
|
readJsonSafe,
|
|
34
34
|
writeJsonAtomic
|
|
35
35
|
} from "../chunk-AQFEP65J.js";
|
|
36
|
-
import "../chunk-
|
|
37
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-XJD5H72U.js";
|
|
37
|
+
import "../chunk-CPGW7MMA.js";
|
|
38
38
|
import {
|
|
39
39
|
isRecord
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-EPFB6LGF.js";
|
|
41
41
|
|
|
42
42
|
// bin/pushary-bell.ts
|
|
43
43
|
exitOnHelpFlag("bell");
|
|
@@ -8,39 +8,39 @@ import {
|
|
|
8
8
|
describeIdleWindow,
|
|
9
9
|
startProcessOwnership,
|
|
10
10
|
withSpawnProcessOwnership
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-FZ5FYVR3.js";
|
|
12
12
|
import {
|
|
13
13
|
announceSubscriptionRequired,
|
|
14
14
|
isDeferAnswer
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-C7P5VIU6.js";
|
|
16
16
|
import {
|
|
17
17
|
claudeTranscriptPath,
|
|
18
18
|
loadSessionKey,
|
|
19
19
|
registerTranscript,
|
|
20
20
|
registeredTranscriptEnabled
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-N2JDDOQS.js";
|
|
22
22
|
import "../chunk-DWQYCOPI.js";
|
|
23
23
|
import {
|
|
24
24
|
ensureDaemonRunning
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-HPZMNWDI.js";
|
|
26
26
|
import {
|
|
27
27
|
encryptRecord
|
|
28
|
-
} from "../chunk-
|
|
29
|
-
import "../chunk-
|
|
28
|
+
} from "../chunk-BXPIKJPY.js";
|
|
29
|
+
import "../chunk-ESJY5UYZ.js";
|
|
30
30
|
import {
|
|
31
31
|
transcriptsEnabled
|
|
32
|
-
} from "../chunk-
|
|
32
|
+
} from "../chunk-2UG5Y6EC.js";
|
|
33
33
|
import {
|
|
34
34
|
needsShell,
|
|
35
35
|
spawnClaude
|
|
36
36
|
} from "../chunk-XHKBHWLX.js";
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
39
|
-
import "../chunk-
|
|
40
|
-
import "../chunk-
|
|
37
|
+
import "../chunk-QLV5S2KS.js";
|
|
38
|
+
import "../chunk-22SNRAZS.js";
|
|
39
|
+
import "../chunk-E6QJMEQJ.js";
|
|
40
|
+
import "../chunk-KPDV6RQL.js";
|
|
41
41
|
import "../chunk-GMXKITVA.js";
|
|
42
42
|
import "../chunk-6ICPEJY5.js";
|
|
43
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-2UKEITTN.js";
|
|
44
44
|
import {
|
|
45
45
|
DEFAULT_SESSION,
|
|
46
46
|
UNNAMED_ACTION,
|
|
@@ -58,8 +58,8 @@ import {
|
|
|
58
58
|
reportEvent,
|
|
59
59
|
savePendingCommand,
|
|
60
60
|
scopePathFor
|
|
61
|
-
} from "../chunk-
|
|
62
|
-
import "../chunk-
|
|
61
|
+
} from "../chunk-ADWW7Y6X.js";
|
|
62
|
+
import "../chunk-VMIR56HZ.js";
|
|
63
63
|
import {
|
|
64
64
|
askUser,
|
|
65
65
|
cancelQuestion,
|
|
@@ -70,28 +70,28 @@ import {
|
|
|
70
70
|
waitForAnswer,
|
|
71
71
|
waitsForThePhone,
|
|
72
72
|
withdrawQuestion
|
|
73
|
-
} from "../chunk-
|
|
73
|
+
} from "../chunk-W6PSSMTV.js";
|
|
74
74
|
import "../chunk-POFBE6ZY.js";
|
|
75
75
|
import {
|
|
76
76
|
SubscriptionRequiredError
|
|
77
|
-
} from "../chunk-
|
|
78
|
-
import "../chunk-
|
|
79
|
-
import "../chunk-
|
|
77
|
+
} from "../chunk-CQ56WBBP.js";
|
|
78
|
+
import "../chunk-QDC2VGFO.js";
|
|
79
|
+
import "../chunk-AYU4S7RQ.js";
|
|
80
80
|
import {
|
|
81
81
|
getMachineId
|
|
82
|
-
} from "../chunk-
|
|
82
|
+
} from "../chunk-QWWJWPUV.js";
|
|
83
83
|
import "../chunk-7QLSKOSU.js";
|
|
84
84
|
import "../chunk-KZERVKTD.js";
|
|
85
|
-
import "../chunk-
|
|
86
|
-
import "../chunk-
|
|
85
|
+
import "../chunk-MAMQK4I2.js";
|
|
86
|
+
import "../chunk-UOMFOMJM.js";
|
|
87
87
|
import "../chunk-AQFEP65J.js";
|
|
88
88
|
import {
|
|
89
89
|
getApiKey,
|
|
90
90
|
getBaseUrl
|
|
91
|
-
} from "../chunk-
|
|
91
|
+
} from "../chunk-XJD5H72U.js";
|
|
92
92
|
import {
|
|
93
93
|
NPX_LATEST_COMMAND
|
|
94
|
-
} from "../chunk-
|
|
94
|
+
} from "../chunk-CPGW7MMA.js";
|
|
95
95
|
import {
|
|
96
96
|
DECISION_STOP_REASON,
|
|
97
97
|
HAND_BACK_WITHOUT_A_PROMPT,
|
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
redactSecretsFromContent,
|
|
102
102
|
resolveGate,
|
|
103
103
|
timeoutActionWithoutLocalPrompt
|
|
104
|
-
} from "../chunk-
|
|
104
|
+
} from "../chunk-EPFB6LGF.js";
|
|
105
105
|
|
|
106
106
|
// src/wrapper/localPassthrough.ts
|
|
107
107
|
var SIGNAL_NUMBERS = {
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
planCliKeyRevocations,
|
|
10
10
|
readCliHeldKeys,
|
|
11
11
|
revokeCliKeys
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-DKJFRVVN.js";
|
|
13
13
|
import {
|
|
14
14
|
isCursorPluginLeftover,
|
|
15
15
|
releaseSoleGate,
|
|
16
16
|
withoutPusharyCursorHooks
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-MFGPTJJ3.js";
|
|
18
18
|
import {
|
|
19
19
|
HERMES_PIP_PACKAGE,
|
|
20
20
|
readHermesStatus,
|
|
@@ -23,25 +23,25 @@ import {
|
|
|
23
23
|
shortenHome,
|
|
24
24
|
unregisterPluginLocation,
|
|
25
25
|
vscodeSettingsTargets
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-P2PWALZL.js";
|
|
27
27
|
import {
|
|
28
28
|
planFxRemoval,
|
|
29
29
|
removeInstructionBlock
|
|
30
|
-
} from "../chunk-
|
|
31
|
-
import "../chunk-
|
|
30
|
+
} from "../chunk-V2TZVYXI.js";
|
|
31
|
+
import "../chunk-7TV7BXIH.js";
|
|
32
32
|
import {
|
|
33
33
|
disableDaemonService
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-HPZMNWDI.js";
|
|
35
35
|
import "../chunk-XHKBHWLX.js";
|
|
36
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-IKBQRXPQ.js";
|
|
37
37
|
import {
|
|
38
38
|
macAppKeepsMcpEntry,
|
|
39
39
|
mcpServerBearer,
|
|
40
40
|
pusharyKey,
|
|
41
41
|
readMacAppAgentKey,
|
|
42
42
|
setupReceiptKey
|
|
43
|
-
} from "../chunk-
|
|
44
|
-
import "../chunk-
|
|
43
|
+
} from "../chunk-P2IT4Y5Q.js";
|
|
44
|
+
import "../chunk-PZTLBH6Z.js";
|
|
45
45
|
import {
|
|
46
46
|
OPENCODE_PLUGIN_SIBLING,
|
|
47
47
|
OPENCODE_PLUGIN_SIBLING_CONTENTS,
|
|
@@ -53,14 +53,14 @@ import {
|
|
|
53
53
|
openCodePluginDir,
|
|
54
54
|
openCodePluginFile,
|
|
55
55
|
removeOpenCodeMcpServer
|
|
56
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-ABSVJ3WV.js";
|
|
57
57
|
import {
|
|
58
58
|
ansiPainter,
|
|
59
59
|
useColor
|
|
60
60
|
} from "../chunk-FO3MDD26.js";
|
|
61
61
|
import {
|
|
62
62
|
exitOnHelpFlag
|
|
63
|
-
} from "../chunk-
|
|
63
|
+
} from "../chunk-KH57L2HF.js";
|
|
64
64
|
import {
|
|
65
65
|
compatibleConfigFile,
|
|
66
66
|
compatibleDocuments,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
removePusharyToolPermissions,
|
|
77
77
|
restoreClaudeMcpServer,
|
|
78
78
|
serializeConfigDocument
|
|
79
|
-
} from "../chunk-
|
|
79
|
+
} from "../chunk-CCAYCIW4.js";
|
|
80
80
|
import {
|
|
81
81
|
hookOwnerOf,
|
|
82
82
|
isHookTakeoverReceipt,
|
|
@@ -84,12 +84,12 @@ import {
|
|
|
84
84
|
resolveBridgeStub,
|
|
85
85
|
restoreHookTakeover,
|
|
86
86
|
restoreMcpServer
|
|
87
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-QLV5S2KS.js";
|
|
88
88
|
import {
|
|
89
89
|
removeGeminiSettings
|
|
90
|
-
} from "../chunk-
|
|
91
|
-
import "../chunk-
|
|
92
|
-
import "../chunk-
|
|
90
|
+
} from "../chunk-22SNRAZS.js";
|
|
91
|
+
import "../chunk-E6QJMEQJ.js";
|
|
92
|
+
import "../chunk-KPDV6RQL.js";
|
|
93
93
|
import {
|
|
94
94
|
rejectUnknownFlags
|
|
95
95
|
} from "../chunk-GMXKITVA.js";
|
|
@@ -99,20 +99,20 @@ import {
|
|
|
99
99
|
isDisabledExport,
|
|
100
100
|
removeClaudeAlias,
|
|
101
101
|
shellProfileCandidates
|
|
102
|
-
} from "../chunk-
|
|
103
|
-
import "../chunk-
|
|
104
|
-
import "../chunk-
|
|
105
|
-
import "../chunk-
|
|
102
|
+
} from "../chunk-2UKEITTN.js";
|
|
103
|
+
import "../chunk-ADWW7Y6X.js";
|
|
104
|
+
import "../chunk-VMIR56HZ.js";
|
|
105
|
+
import "../chunk-W6PSSMTV.js";
|
|
106
106
|
import "../chunk-POFBE6ZY.js";
|
|
107
|
-
import "../chunk-
|
|
108
|
-
import "../chunk-
|
|
109
|
-
import "../chunk-
|
|
110
|
-
import "../chunk-
|
|
107
|
+
import "../chunk-CQ56WBBP.js";
|
|
108
|
+
import "../chunk-QDC2VGFO.js";
|
|
109
|
+
import "../chunk-AYU4S7RQ.js";
|
|
110
|
+
import "../chunk-QWWJWPUV.js";
|
|
111
111
|
import "../chunk-7QLSKOSU.js";
|
|
112
112
|
import {
|
|
113
113
|
EXIT
|
|
114
114
|
} from "../chunk-KZERVKTD.js";
|
|
115
|
-
import "../chunk-
|
|
115
|
+
import "../chunk-MAMQK4I2.js";
|
|
116
116
|
import {
|
|
117
117
|
claudeJson,
|
|
118
118
|
claudeMcpReceipt,
|
|
@@ -149,14 +149,14 @@ import {
|
|
|
149
149
|
restoreCodexHookTrust,
|
|
150
150
|
vscodePluginDir,
|
|
151
151
|
vscodePluginMcp
|
|
152
|
-
} from "../chunk-
|
|
152
|
+
} from "../chunk-UOMFOMJM.js";
|
|
153
153
|
import "../chunk-AQFEP65J.js";
|
|
154
154
|
import {
|
|
155
155
|
getBaseUrl
|
|
156
|
-
} from "../chunk-
|
|
156
|
+
} from "../chunk-XJD5H72U.js";
|
|
157
157
|
import {
|
|
158
158
|
NPX_LATEST_COMMAND
|
|
159
|
-
} from "../chunk-
|
|
159
|
+
} from "../chunk-CPGW7MMA.js";
|
|
160
160
|
import {
|
|
161
161
|
CLI_PACKAGE_NAMES,
|
|
162
162
|
HOOK_COMPATIBLE_PROFILES,
|
|
@@ -168,7 +168,7 @@ import {
|
|
|
168
168
|
globalRootFor,
|
|
169
169
|
isValidApiKey,
|
|
170
170
|
redactSecrets
|
|
171
|
-
} from "../chunk-
|
|
171
|
+
} from "../chunk-EPFB6LGF.js";
|
|
172
172
|
|
|
173
173
|
// bin/pushary-clean.ts
|
|
174
174
|
import { existsSync as existsSync6, readFileSync as readFileSync4, copyFileSync, readdirSync as readdirSync4 } from "fs";
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
postLiveSession,
|
|
6
6
|
postLiveSessionUntilAccepted,
|
|
7
7
|
startLiveSessionHeartbeat
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-N7MBQPIF.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveProviderBinary
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-SGOQGCKJ.js";
|
|
12
12
|
import "../chunk-RIVNNBEK.js";
|
|
13
13
|
import {
|
|
14
14
|
SESSION_IDLE_TIMEOUT_MS,
|
|
@@ -16,55 +16,116 @@ import {
|
|
|
16
16
|
idleDeadlinePassed,
|
|
17
17
|
startProcessOwnership,
|
|
18
18
|
withSpawnProcessOwnership
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-FZ5FYVR3.js";
|
|
20
|
+
import "../chunk-BXPIKJPY.js";
|
|
21
|
+
import "../chunk-ESJY5UYZ.js";
|
|
22
22
|
import {
|
|
23
23
|
transcriptsEnabled
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-2UG5Y6EC.js";
|
|
25
25
|
import {
|
|
26
26
|
spawnClaude
|
|
27
27
|
} from "../chunk-XHKBHWLX.js";
|
|
28
28
|
import "../chunk-6ICPEJY5.js";
|
|
29
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-2UKEITTN.js";
|
|
30
30
|
import {
|
|
31
31
|
isAskUserResponse,
|
|
32
32
|
isDecisionStopped,
|
|
33
33
|
isWaitForAnswerResponse,
|
|
34
34
|
withdrawQuestion,
|
|
35
35
|
writeDegraded
|
|
36
|
-
} from "../chunk-
|
|
36
|
+
} from "../chunk-W6PSSMTV.js";
|
|
37
37
|
import "../chunk-POFBE6ZY.js";
|
|
38
38
|
import {
|
|
39
39
|
callMcpTool,
|
|
40
40
|
isRetryable
|
|
41
|
-
} from "../chunk-
|
|
42
|
-
import "../chunk-
|
|
43
|
-
import "../chunk-
|
|
41
|
+
} from "../chunk-CQ56WBBP.js";
|
|
42
|
+
import "../chunk-QDC2VGFO.js";
|
|
43
|
+
import "../chunk-AYU4S7RQ.js";
|
|
44
44
|
import {
|
|
45
45
|
getMachineId
|
|
46
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-QWWJWPUV.js";
|
|
47
47
|
import "../chunk-7QLSKOSU.js";
|
|
48
48
|
import "../chunk-KZERVKTD.js";
|
|
49
|
-
import "../chunk-
|
|
50
|
-
import "../chunk-
|
|
49
|
+
import "../chunk-MAMQK4I2.js";
|
|
50
|
+
import "../chunk-UOMFOMJM.js";
|
|
51
51
|
import "../chunk-AQFEP65J.js";
|
|
52
52
|
import {
|
|
53
53
|
getApiKey,
|
|
54
54
|
getBaseUrl
|
|
55
|
-
} from "../chunk-
|
|
56
|
-
import "../chunk-
|
|
55
|
+
} from "../chunk-XJD5H72U.js";
|
|
56
|
+
import "../chunk-CPGW7MMA.js";
|
|
57
57
|
import {
|
|
58
|
+
PERSONAL_QUESTION_CAPABILITY,
|
|
59
|
+
canonicalJsonText,
|
|
58
60
|
elicitationContent,
|
|
61
|
+
isQuestionOwner,
|
|
59
62
|
parseAgentQuestion,
|
|
60
63
|
parseAgentQuestionAnswers,
|
|
61
64
|
planElicitationAsk,
|
|
62
65
|
readElicitationFields
|
|
63
|
-
} from "../chunk-
|
|
66
|
+
} from "../chunk-EPFB6LGF.js";
|
|
64
67
|
|
|
65
68
|
// bin/pushary-codex-bridge.ts
|
|
66
69
|
import { existsSync } from "fs";
|
|
67
70
|
|
|
71
|
+
// src/codex-question-owner.ts
|
|
72
|
+
import { createHash } from "crypto";
|
|
73
|
+
var codexQuestionOwner = (params, requestId, runtime) => {
|
|
74
|
+
if (params.threadId !== runtime.threadId || typeof params.isBlocking !== "boolean") return null;
|
|
75
|
+
const owner = {
|
|
76
|
+
capability: PERSONAL_QUESTION_CAPABILITY,
|
|
77
|
+
machineId: runtime.machineId,
|
|
78
|
+
generation: runtime.generation,
|
|
79
|
+
threadId: params.threadId,
|
|
80
|
+
turnId: params.turnId,
|
|
81
|
+
itemId: params.itemId,
|
|
82
|
+
requestId,
|
|
83
|
+
method: "item/tool/requestUserInput",
|
|
84
|
+
subjectHash: createHash("sha256").update(canonicalJsonText(params)).digest("hex")
|
|
85
|
+
};
|
|
86
|
+
return isQuestionOwner(owner) ? owner : null;
|
|
87
|
+
};
|
|
88
|
+
var closesOwnedQuestion = (owner, method, params) => {
|
|
89
|
+
if (method === "serverRequest/resolved") return params.requestId === owner.requestId;
|
|
90
|
+
if (params.threadId !== owner.threadId) return false;
|
|
91
|
+
if (method === "thread/closed" || method === "thread/archived") return true;
|
|
92
|
+
if (method === "turn/completed") {
|
|
93
|
+
const turn = params.turn;
|
|
94
|
+
return turn !== null && typeof turn === "object" && "id" in turn && turn.id === owner.turnId;
|
|
95
|
+
}
|
|
96
|
+
if (method === "item/completed" && params.turnId === owner.turnId) {
|
|
97
|
+
const item = params.item;
|
|
98
|
+
return item !== null && typeof item === "object" && "id" in item && item.id === owner.itemId;
|
|
99
|
+
}
|
|
100
|
+
return false;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
// src/question-dispatch.ts
|
|
104
|
+
var claimOwnedQuestion = async (options, dispatch) => {
|
|
105
|
+
const response = await postLiveSession(options, "/api/agent/question/dispatch", {
|
|
106
|
+
owner: dispatch.owner,
|
|
107
|
+
correlationIds: dispatch.correlationIds,
|
|
108
|
+
operation: "claim"
|
|
109
|
+
});
|
|
110
|
+
const body = await response.json();
|
|
111
|
+
if (!response.ok || body === null || typeof body !== "object" || !("claimId" in body) || typeof body.claimId !== "string" || !body.claimId) throw new Error("Question delivery could not be claimed");
|
|
112
|
+
dispatch.claimId = body.claimId;
|
|
113
|
+
};
|
|
114
|
+
var reportOwnedQuestion = async (options, dispatch, operation) => {
|
|
115
|
+
if (dispatch.correlationIds.length === 0) return;
|
|
116
|
+
try {
|
|
117
|
+
const response = await postLiveSession({ ...options, signal: AbortSignal.timeout(3e3), requestTimeoutMs: 3e3 }, "/api/agent/question/dispatch", {
|
|
118
|
+
owner: dispatch.owner,
|
|
119
|
+
correlationIds: dispatch.correlationIds,
|
|
120
|
+
claimId: dispatch.claimId,
|
|
121
|
+
operation
|
|
122
|
+
});
|
|
123
|
+
if (!response.ok) throw new Error("Receipt refused");
|
|
124
|
+
} catch {
|
|
125
|
+
writeDegraded("questions", { reason: "question_receipt_unconfirmed", fallback: "no automatic replay", event: operation });
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
68
129
|
// src/codex-bridge.ts
|
|
69
130
|
import { randomUUID } from "crypto";
|
|
70
131
|
|
|
@@ -126,6 +187,7 @@ var JsonRpcClient = class {
|
|
|
126
187
|
child;
|
|
127
188
|
pending = /* @__PURE__ */ new Map();
|
|
128
189
|
notifications = /* @__PURE__ */ new Set();
|
|
190
|
+
generation = randomUUID();
|
|
129
191
|
serverRequests = /* @__PURE__ */ new Map();
|
|
130
192
|
threadId = null;
|
|
131
193
|
nextId = 1;
|
|
@@ -174,7 +236,10 @@ var JsonRpcClient = class {
|
|
|
174
236
|
async close() {
|
|
175
237
|
if (this.closed) return;
|
|
176
238
|
this.closed = true;
|
|
177
|
-
for (const request of this.serverRequests.values())
|
|
239
|
+
for (const request of this.serverRequests.values()) {
|
|
240
|
+
request.controller.abort();
|
|
241
|
+
if (request.dispatch) void reportOwnedQuestion(this.bridgeOptions, request.dispatch, "unavailable");
|
|
242
|
+
}
|
|
178
243
|
this.serverRequests.clear();
|
|
179
244
|
this.child.stdin?.end();
|
|
180
245
|
if (this.child.exitCode != null) return;
|
|
@@ -218,23 +283,50 @@ var JsonRpcClient = class {
|
|
|
218
283
|
}
|
|
219
284
|
if (message.id !== void 0 && (message.method === "item/tool/requestUserInput" || message.method === "mcpServer/elicitation/request")) {
|
|
220
285
|
const id = message.id;
|
|
221
|
-
|
|
286
|
+
const owner = message.method === "item/tool/requestUserInput" ? codexQuestionOwner(message.params ?? {}, id, { machineId: this.bridgeOptions.machineId, generation: this.generation, threadId: this.threadId }) : null;
|
|
287
|
+
if (message.method === "item/tool/requestUserInput" && !owner) {
|
|
288
|
+
this.write({ id, error: { code: -32e3, message: "Unsupported question ownership" } });
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
const existing = this.serverRequests.get(id);
|
|
292
|
+
if (existing) {
|
|
293
|
+
if (existing.dispatch && existing.dispatch.owner.subjectHash !== owner?.subjectHash) existing.controller.abort();
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
222
296
|
if (this.serverRequests.size >= MAX_PENDING_RPC) {
|
|
223
297
|
this.write({ id, error: { code: -32e3, message: "Too many pending user questions" } });
|
|
224
298
|
return;
|
|
225
299
|
}
|
|
226
300
|
const controller = new AbortController();
|
|
227
|
-
this.
|
|
301
|
+
const now = this.bridgeOptions.now ?? Date.now;
|
|
302
|
+
const duration = message.params?.autoResolutionMs;
|
|
303
|
+
if (duration != null && (typeof duration !== "number" || !Number.isFinite(duration) || duration < 0)) {
|
|
304
|
+
this.write({ id, error: { code: -32e3, message: "Invalid question deadline" } });
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
const deadline = typeof duration === "number" ? now() + duration : null;
|
|
308
|
+
const dispatch = owner ? { owner, correlationIds: [], deadline } : void 0;
|
|
309
|
+
this.serverRequests.set(id, { controller, dispatch });
|
|
228
310
|
const signal = AbortSignal.any([controller.signal, this.bridgeOptions.signal]);
|
|
229
|
-
const answer = message.method === "mcpServer/elicitation/request" ? answerCodexElicitation(this.bridgeOptions, message.params ?? {}, this.threadId, signal) : answerCodexQuestions(this.bridgeOptions, message.params ?? {}, signal);
|
|
311
|
+
const answer = message.method === "mcpServer/elicitation/request" ? answerCodexElicitation(this.bridgeOptions, message.params ?? {}, this.threadId, signal) : answerCodexQuestions(this.bridgeOptions, message.params ?? {}, signal, "request_user_input", dispatch);
|
|
230
312
|
void answer.then(
|
|
231
|
-
(result) => {
|
|
232
|
-
if (
|
|
313
|
+
async (result) => {
|
|
314
|
+
if (signal.aborted || this.closed) return;
|
|
315
|
+
if (dispatch) await claimOwnedQuestion(this.bridgeOptions, dispatch);
|
|
316
|
+
if (signal.aborted || this.closed || this.serverRequests.get(id)?.controller !== controller) return;
|
|
317
|
+
if (deadline !== null && now() >= deadline) throw new Error("Question expired");
|
|
318
|
+
this.write({ id, result });
|
|
319
|
+
if (dispatch) await reportOwnedQuestion(this.bridgeOptions, dispatch, "reply_queued");
|
|
233
320
|
},
|
|
234
321
|
(error) => {
|
|
235
322
|
if (!signal.aborted && !this.closed) this.write({ id, error: { code: -32e3, message: error instanceof Error && error.message === LOCAL_QUESTION_UNAVAILABLE ? LOCAL_QUESTION_UNAVAILABLE : "No user answer was received through Pushary" } });
|
|
236
323
|
}
|
|
237
|
-
).
|
|
324
|
+
).catch(() => {
|
|
325
|
+
if (!signal.aborted && !this.closed) this.write({ id, error: { code: -32e3, message: "Question delivery is unconfirmed; no automatic retry" } });
|
|
326
|
+
}).finally(async () => {
|
|
327
|
+
if (dispatch && (signal.aborted || !dispatch.claimId)) await reportOwnedQuestion(this.bridgeOptions, dispatch, "unavailable");
|
|
328
|
+
if (!dispatch?.claimId || signal.aborted) this.serverRequests.delete(id);
|
|
329
|
+
});
|
|
238
330
|
return;
|
|
239
331
|
}
|
|
240
332
|
if (message.id !== void 0 && message.method) {
|
|
@@ -251,9 +343,17 @@ var JsonRpcClient = class {
|
|
|
251
343
|
else pending.resolve(message.result);
|
|
252
344
|
return;
|
|
253
345
|
}
|
|
254
|
-
if (message.method
|
|
255
|
-
const
|
|
256
|
-
|
|
346
|
+
if (message.method) {
|
|
347
|
+
for (const request of this.serverRequests.values()) {
|
|
348
|
+
if (request.dispatch && closesOwnedQuestion(request.dispatch.owner, message.method, message.params ?? {})) {
|
|
349
|
+
request.controller.abort();
|
|
350
|
+
void reportOwnedQuestion(this.bridgeOptions, request.dispatch, request.dispatch.claimId ? "request_closed" : "unavailable");
|
|
351
|
+
this.serverRequests.delete(request.dispatch.owner.requestId);
|
|
352
|
+
} else if (!request.dispatch && message.method === "serverRequest/resolved") {
|
|
353
|
+
const id = message.params?.requestId;
|
|
354
|
+
if ((typeof id === "string" || typeof id === "number") && this.serverRequests.get(id) === request) request.controller.abort();
|
|
355
|
+
}
|
|
356
|
+
}
|
|
257
357
|
}
|
|
258
358
|
if (message.method) {
|
|
259
359
|
for (const listener of this.notifications) listener(message);
|
|
@@ -263,7 +363,10 @@ var JsonRpcClient = class {
|
|
|
263
363
|
if (this.closed) return;
|
|
264
364
|
this.closed = true;
|
|
265
365
|
this.failure = error;
|
|
266
|
-
for (const request of this.serverRequests.values())
|
|
366
|
+
for (const request of this.serverRequests.values()) {
|
|
367
|
+
request.controller.abort();
|
|
368
|
+
if (request.dispatch) void reportOwnedQuestion(this.bridgeOptions, request.dispatch, "unavailable");
|
|
369
|
+
}
|
|
267
370
|
this.serverRequests.clear();
|
|
268
371
|
this.rejectPending(error);
|
|
269
372
|
if (this.child.exitCode == null) this.child.kill();
|
|
@@ -286,12 +389,12 @@ var rpcTurnId = (result) => {
|
|
|
286
389
|
const response = object(result);
|
|
287
390
|
return string(object(response?.turn)?.id) ?? string(response?.turnId);
|
|
288
391
|
};
|
|
289
|
-
var answerCodexQuestions = async (options, params, signal, toolName = "request_user_input") => {
|
|
392
|
+
var answerCodexQuestions = async (options, params, signal, toolName = "request_user_input", dispatch) => {
|
|
290
393
|
if (!Array.isArray(params.questions) || !params.questions.length || params.questions.length > 3) throw new Error("Invalid questions");
|
|
291
394
|
const answers = /* @__PURE__ */ Object.create(null);
|
|
292
395
|
const now = options.now ?? Date.now;
|
|
293
396
|
if (params.autoResolutionMs != null && (typeof params.autoResolutionMs !== "number" || !Number.isFinite(params.autoResolutionMs) || params.autoResolutionMs < 0)) throw new Error("Invalid question deadline");
|
|
294
|
-
const deadline = typeof params.autoResolutionMs === "number" ? now() + params.autoResolutionMs : null;
|
|
397
|
+
const deadline = dispatch ? dispatch.deadline : typeof params.autoResolutionMs === "number" ? now() + params.autoResolutionMs : null;
|
|
295
398
|
for (const raw of params.questions) {
|
|
296
399
|
if (signal.aborted || deadline !== null && now() >= deadline) throw new Error("Question expired");
|
|
297
400
|
const question = object(raw);
|
|
@@ -311,6 +414,7 @@ var answerCodexQuestions = async (options, params, signal, toolName = "request_u
|
|
|
311
414
|
signal.throwIfAborted();
|
|
312
415
|
if (deadline !== null && now() >= deadline) throw new Error("Question expired");
|
|
313
416
|
let result = await call("ask_user", {
|
|
417
|
+
...dispatch ? { questionOwner: dispatch.owner } : {},
|
|
314
418
|
requestId: randomUUID(),
|
|
315
419
|
question: prompt,
|
|
316
420
|
type: labels.length >= 2 ? "select" : "input",
|
|
@@ -327,6 +431,7 @@ var answerCodexQuestions = async (options, params, signal, toolName = "request_u
|
|
|
327
431
|
}, deadline === null ? 1e4 : Math.min(1e4, deadline - now()));
|
|
328
432
|
correlationId = string(object(result)?.correlationId);
|
|
329
433
|
if (!isAskUserResponse(result)) throw new Error("Invalid ask_user response");
|
|
434
|
+
if (correlationId && dispatch) dispatch.correlationIds.push(correlationId);
|
|
330
435
|
while (!result.answered) {
|
|
331
436
|
if (result.status === "terminal" || result.status === "notified" || result.suppressed || result.mode === "terminal_only" || result.mode === "notify_only") {
|
|
332
437
|
if (correlationId) {
|