@pushary/agent-hooks 1.9.64 → 1.9.66
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 +18 -1
- package/dist/{api-HDLTZTVR.js → api-GDSVUTI2.js} +12 -10
- package/dist/bin/pushary-bell-hook.js +25 -27
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +26 -28
- package/dist/bin/pushary-clean.js +39 -36
- package/dist/bin/pushary-codex-bridge.js +21 -22
- package/dist/bin/pushary-codex-hook.js +30 -32
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +25 -26
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +37 -39
- package/dist/bin/pushary-disconnect.js +25 -26
- package/dist/bin/pushary-doctor.js +66 -44
- package/dist/bin/pushary-elicitation-hook.js +25 -27
- package/dist/bin/pushary-gemini-bridge.js +15 -16
- package/dist/bin/pushary-gemini-hook.js +27 -29
- package/dist/bin/pushary-hook.js +29 -31
- package/dist/bin/pushary-login.js +19 -19
- package/dist/bin/pushary-logout.js +25 -26
- package/dist/bin/pushary-mcp.js +11 -11
- package/dist/bin/pushary-mode.js +14 -14
- package/dist/bin/pushary-notification-hook.js +24 -26
- package/dist/bin/pushary-opencode-hook.js +26 -28
- package/dist/bin/pushary-permission-denied-hook.js +29 -31
- package/dist/bin/pushary-permission-hook.js +32 -31
- package/dist/bin/pushary-post-hook.js +24 -26
- package/dist/bin/pushary-prompt-hook.js +24 -26
- package/dist/bin/pushary-session-end-hook.js +26 -28
- package/dist/bin/pushary-session-start-hook.js +33 -35
- package/dist/bin/pushary-setup.js +68 -54
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +30 -31
- package/dist/bin/pushary-stop-hook.js +24 -26
- package/dist/bin/pushary-stopfailure-hook.js +24 -26
- package/dist/bin/pushary-suggestions.js +14 -14
- package/dist/bin/pushary-transcript-register.js +16 -18
- package/dist/bin/pushary-transcripts.js +17 -17
- package/dist/bin/pushary-upgrade.js +37 -38
- package/dist/bin/pushary-wait.js +14 -14
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-7UBDBJTG.js → chunk-26W46E46.js} +4 -4
- package/dist/{chunk-MIPJ2VXP.js → chunk-2BL6KWN7.js} +9 -9
- package/dist/{chunk-42PD2MQH.js → chunk-32ZT2ATY.js} +5 -5
- package/dist/{chunk-2EY4HGLG.js → chunk-376TUN72.js} +3 -3
- package/dist/{chunk-A5KQXZR7.js → chunk-3ELJIG2R.js} +3 -3
- package/dist/{chunk-ML2Q6WWE.js → chunk-3EZP5ZPS.js} +5 -4
- package/dist/{chunk-66FRMK7V.js → chunk-3FQX74E4.js} +3 -3
- package/dist/{chunk-HVOQUPSO.js → chunk-45KMS76L.js} +1 -1
- package/dist/{chunk-LA7CKRZN.js → chunk-4APD2DPI.js} +2 -2
- package/dist/{chunk-5NP3OJ5P.js → chunk-57NTMVMI.js} +6 -6
- package/dist/{chunk-NYV45Q25.js → chunk-5FJDODOA.js} +3 -3
- package/dist/{chunk-RY4EPMZX.js → chunk-5J7OZBJ4.js} +2 -2
- package/dist/{chunk-XJIIU36L.js → chunk-6BGVSV2Q.js} +1 -1
- package/dist/{chunk-2YXBCZ3Z.js → chunk-6RJZSBPD.js} +1 -1
- package/dist/{chunk-MPPTIZ2G.js → chunk-6ZXCWK27.js} +5 -5
- package/dist/{chunk-VNRWQCGU.js → chunk-7LK3Y6ET.js} +63 -6
- package/dist/{chunk-Y64JGYTB.js → chunk-A47UKPC7.js} +1 -1
- package/dist/{chunk-5TNGBDIE.js → chunk-AVWECJSN.js} +2 -2
- package/dist/{chunk-CCNH4PJ2.js → chunk-AWGBL4P3.js} +211 -24
- package/dist/{chunk-LMC5UPL7.js → chunk-B6JC676X.js} +1 -1
- package/dist/{chunk-QPPBH5NY.js → chunk-CN6JFM62.js} +5 -5
- package/dist/{chunk-BLAIETMP.js → chunk-CNJ7SI5V.js} +4 -4
- package/dist/{chunk-DVYVGBPB.js → chunk-DBUHSUL7.js} +1 -1
- package/dist/{chunk-CJADXAJU.js → chunk-DIUTSF6I.js} +4 -4
- package/dist/{chunk-JX3DHGZX.js → chunk-DKMVVBXO.js} +30 -17
- package/dist/{chunk-2CEVEMJE.js → chunk-DPU6H4JY.js} +3 -3
- package/dist/{chunk-MNKIR2ZB.js → chunk-EJR5JXMV.js} +24 -1
- package/dist/{chunk-VHKK3US3.js → chunk-EU2ZOZC3.js} +3 -3
- package/dist/{chunk-AN7C3CHH.js → chunk-G6VJZ3RB.js} +1 -1
- package/dist/{chunk-H4BKC2GN.js → chunk-GDLT32I4.js} +3 -3
- package/dist/{chunk-EEM65CGJ.js → chunk-GECU7V44.js} +3 -3
- package/dist/{chunk-BAGBCSXA.js → chunk-GO7YKPT3.js} +1 -1
- package/dist/{chunk-QECRQWLV.js → chunk-GWYCKTXS.js} +5 -5
- package/dist/{chunk-2PKHGHMA.js → chunk-HUGVJBDN.js} +2 -2
- package/dist/{chunk-ADRPW7KU.js → chunk-IA5VWIHV.js} +2 -2
- package/dist/{chunk-6HPLEGUP.js → chunk-IGO3AGZK.js} +4 -4
- package/dist/{chunk-PMLQRB3D.js → chunk-IQ3GKPFM.js} +1 -1
- package/dist/{chunk-LV6DX4P6.js → chunk-JL3SZJJP.js} +2 -2
- package/dist/{chunk-BSZIPIFA.js → chunk-KS3O6O7E.js} +3 -3
- package/dist/{chunk-IZTDX2MX.js → chunk-MDIGG3Q7.js} +3 -3
- package/dist/{chunk-JTOBQUIL.js → chunk-MNNQEUQC.js} +3 -3
- package/dist/{chunk-2KID4FK4.js → chunk-Q5RNYE2L.js} +4 -4
- package/dist/{chunk-KX3RMF6T.js → chunk-QBNICXMC.js} +6 -6
- package/dist/{chunk-YUDZCJYC.js → chunk-QN25WBXL.js} +9 -7
- package/dist/{chunk-NUEPJ5W6.js → chunk-QOIPUYUD.js} +3 -5
- package/dist/{chunk-QNATBOUH.js → chunk-QR2QWGQI.js} +3 -3
- package/dist/{chunk-NOH3EJFH.js → chunk-R7C2FS33.js} +1 -1
- package/dist/{chunk-MXPOLQZH.js → chunk-RJ6JEHCP.js} +1 -1
- package/dist/{chunk-E2LB6JNV.js → chunk-RSZQEEEW.js} +7 -6
- package/dist/{chunk-57PU5OBL.js → chunk-SVKCYUYP.js} +11 -13
- package/dist/{chunk-DCMRNIDM.js → chunk-T6YLXO6N.js} +4 -4
- package/dist/{chunk-Q6ID23SU.js → chunk-TQNFDNJA.js} +6 -6
- package/dist/{chunk-SROWUG5W.js → chunk-UTAARXYQ.js} +1 -1
- package/dist/{chunk-OQKSF5ST.js → chunk-V3YBVOTZ.js} +2 -2
- package/dist/{chunk-XF3AWNMO.js → chunk-V4EOFOB2.js} +6 -6
- package/dist/{chunk-PLMX3IHG.js → chunk-VURDLVAQ.js} +3 -3
- package/dist/{chunk-AQAPPSDV.js → chunk-XDDSURY3.js} +3 -3
- package/dist/{chunk-QSW3HAKI.js → chunk-XEXF2OFZ.js} +61 -2
- package/dist/{chunk-2Z7I7DHT.js → chunk-XFQAK35L.js} +1 -1
- package/dist/{chunk-5TUDGSDC.js → chunk-XGFFNERF.js} +1 -1
- package/dist/{chunk-2VADJ6JH.js → chunk-XIJTXRWB.js} +2 -2
- package/dist/{chunk-3KXBRSL3.js → chunk-XXIJBYNW.js} +1 -1
- package/dist/{chunk-O7PCNYEY.js → chunk-YB3HMDKE.js} +2 -2
- package/dist/{chunk-KA7JIMTG.js → chunk-YQDCTID4.js} +115 -9
- package/dist/{chunk-E23RKH3T.js → chunk-ZAZUDYSF.js} +26 -12
- package/dist/{chunk-TR3GP5MH.js → chunk-ZJV7SFIJ.js} +1 -1
- package/dist/{codex-app-cards-switch-JQ6356VX.js → codex-app-cards-switch-W7OLKOMO.js} +11 -11
- package/dist/{codex-desktop-launch-YUB2LOAG.js → codex-desktop-launch-U6V3AXZF.js} +1 -1
- package/dist/{codex-session-launch-UKMAORXS.js → codex-session-launch-EFU46WBL.js} +18 -19
- package/dist/{config-YY54G3CC.js → config-UC4LMCNX.js} +3 -3
- package/dist/{global-upgrade-Y4USGPS2.js → global-upgrade-ABF5O3HU.js} +10 -10
- package/dist/{identity-W5CYL5RC.js → identity-3ZUZPHN6.js} +4 -4
- package/dist/{live-capabilities-JRNNA5EP.js → live-capabilities-BXWXJARK.js} +5 -5
- package/dist/{paths-4MEBINV3.js → paths-FO76CFRQ.js} +3 -3
- package/dist/{reapply-ZN7C3CB3.js → reapply-3T3DFUAI.js} +26 -27
- package/dist/src/index.js +30 -20
- package/dist/{upgrade-lock-QAWUV2DO.js → upgrade-lock-EZ5JIPJE.js} +4 -4
- package/dist/{usage-43C2DHDU.js → usage-Y6BL7RUD.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-6QPDBD7Q.js +0 -118
- package/dist/chunk-TJUJAK5L.js +0 -62
|
@@ -2,25 +2,25 @@ import {
|
|
|
2
2
|
SIGNED_OUT_ON_MAC_MESSAGE,
|
|
3
3
|
describeSignedOutKey,
|
|
4
4
|
readSignedOutDiagnosis
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YB3HMDKE.js";
|
|
6
6
|
import {
|
|
7
7
|
createIo
|
|
8
8
|
} from "./chunk-FO3MDD26.js";
|
|
9
9
|
import {
|
|
10
10
|
readKeySource
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CNJ7SI5V.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl,
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck,
|
|
16
16
|
keyCheckFromResponse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QR2QWGQI.js";
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "./chunk-KZERVKTD.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-A47UKPC7.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/report-key.ts
|
|
26
26
|
var { dim, yellow } = createIo();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
repoKeyFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XXIJBYNW.js";
|
|
4
4
|
import {
|
|
5
5
|
cancelQuestion,
|
|
6
6
|
clientErrorKindOf,
|
|
@@ -8,29 +8,29 @@ import {
|
|
|
8
8
|
reportClientError,
|
|
9
9
|
sendNotification,
|
|
10
10
|
waitForAnswer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZAZUDYSF.js";
|
|
12
12
|
import {
|
|
13
13
|
withRetry
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-Q5RNYE2L.js";
|
|
15
15
|
import {
|
|
16
16
|
getMachineId
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IA5VWIHV.js";
|
|
18
18
|
import {
|
|
19
19
|
reportedInstallSource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-XIJTXRWB.js";
|
|
21
21
|
import {
|
|
22
22
|
IDLE_PROMPT_NOTIFICATION,
|
|
23
23
|
NOTIFICATION_PUSH_TYPES,
|
|
24
24
|
POSTTOOLUSE_MIRROR_ONLY_TOOLS,
|
|
25
25
|
canonicalJson
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GDLT32I4.js";
|
|
27
27
|
import {
|
|
28
28
|
writeFileAtomic
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-KS3O6O7E.js";
|
|
30
30
|
import {
|
|
31
31
|
getApiKey,
|
|
32
32
|
getBaseUrl
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-A47UKPC7.js";
|
|
34
34
|
import {
|
|
35
35
|
ACTION_BODY_MAX,
|
|
36
36
|
AGENTS,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
toToolLookup,
|
|
66
66
|
truncateLine,
|
|
67
67
|
unansweredRefusalReason
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-EJR5JXMV.js";
|
|
69
69
|
|
|
70
70
|
// ../hook-mapping/src/describe.ts
|
|
71
71
|
import { isAbsolute, relative, resolve } from "path";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_SETTINGS_PATH
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-26W46E46.js";
|
|
4
4
|
import {
|
|
5
5
|
readMacAppAgentKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CN6JFM62.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-CNJ7SI5V.js";
|
|
17
17
|
import {
|
|
18
18
|
absoluteUrl
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QR2QWGQI.js";
|
|
20
20
|
import {
|
|
21
21
|
isValidApiKey
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EJR5JXMV.js";
|
|
23
23
|
|
|
24
24
|
// src/key-revocation.ts
|
|
25
25
|
var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readJsonSafe,
|
|
3
3
|
writeJsonAtomic
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KS3O6O7E.js";
|
|
5
5
|
import {
|
|
6
6
|
configFilePath
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-A47UKPC7.js";
|
|
8
8
|
import {
|
|
9
9
|
readSetupOutcomeProperties
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EJR5JXMV.js";
|
|
11
11
|
|
|
12
12
|
// src/diagnostics/service-runtime.ts
|
|
13
13
|
var unescapeXml = (value) => value.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyDir
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GDLT32I4.js";
|
|
4
4
|
import {
|
|
5
5
|
readJsonSafe
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KS3O6O7E.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EJR5JXMV.js";
|
|
10
10
|
|
|
11
11
|
// src/process-ownership.ts
|
|
12
12
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addGeminiMcpServer,
|
|
3
3
|
removeGeminiMcpServer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YQDCTID4.js";
|
|
5
5
|
import {
|
|
6
6
|
CLAUDE_CODE_AGENT,
|
|
7
7
|
compatibleToolLookup
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2BL6KWN7.js";
|
|
9
9
|
import {
|
|
10
10
|
CLAUDE_HOOK_EVENTS,
|
|
11
11
|
PUSHARY_MCP_URL,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
isPusharyHook,
|
|
18
18
|
registerHookEntry,
|
|
19
19
|
removeClaudeMcpServers
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GDLT32I4.js";
|
|
21
21
|
import {
|
|
22
22
|
HOOK_COMPATIBLE_PROFILES,
|
|
23
23
|
PHONE_ANSWERED_TOOLS,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
pusharyMissingReason,
|
|
29
29
|
refusalOutput,
|
|
30
30
|
withHookHoldBudget
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-EJR5JXMV.js";
|
|
32
32
|
|
|
33
33
|
// src/config-document.ts
|
|
34
34
|
import { parse, stringify } from "smol-toml";
|
|
@@ -312,6 +312,7 @@ export {
|
|
|
312
312
|
profileFromArgv,
|
|
313
313
|
activeIdentity,
|
|
314
314
|
namedEvent,
|
|
315
|
+
namedSource,
|
|
315
316
|
activeHookSource,
|
|
316
317
|
normalizeToolCall,
|
|
317
318
|
grokHome,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
notificationAnswerStep
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MNNQEUQC.js";
|
|
4
4
|
import {
|
|
5
5
|
matchMacAccountStep,
|
|
6
6
|
retryAgentCommand
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5FJDODOA.js";
|
|
8
8
|
import {
|
|
9
9
|
EXIT
|
|
10
10
|
} from "./chunk-KZERVKTD.js";
|
|
11
11
|
import {
|
|
12
12
|
NPX_LATEST_COMMAND
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GO7YKPT3.js";
|
|
14
14
|
|
|
15
15
|
// src/setup/closing.ts
|
|
16
16
|
var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
|
|
@@ -4,23 +4,23 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CNJ7SI5V.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IA5VWIHV.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GDLT32I4.js";
|
|
14
14
|
import {
|
|
15
15
|
readJsonSafe,
|
|
16
16
|
resolveGlobalBinary,
|
|
17
17
|
writeFileAtomic,
|
|
18
18
|
writeJsonAtomic,
|
|
19
19
|
writeJsonAtomicDurable
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KS3O6O7E.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-A47UKPC7.js";
|
|
24
24
|
import {
|
|
25
25
|
CLI_PACKAGE_NAMES,
|
|
26
26
|
cmdShimTarget,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-QTOLNRET.js";
|
|
31
31
|
import {
|
|
32
32
|
isRecord
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-EJR5JXMV.js";
|
|
34
34
|
|
|
35
35
|
// src/daemon-lifecycle.ts
|
|
36
36
|
import { dirname, join, win32 as win32Path } from "path";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
NpmMissingError,
|
|
4
4
|
NpmPermissionError,
|
|
5
5
|
writeFileAtomic
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KS3O6O7E.js";
|
|
7
7
|
import {
|
|
8
8
|
NPX_LATEST_COMMAND
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GO7YKPT3.js";
|
|
10
10
|
import {
|
|
11
11
|
readSetupAgentFailures
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EJR5JXMV.js";
|
|
13
13
|
|
|
14
14
|
// src/setup/config-write.ts
|
|
15
15
|
var AgentConfigWriteError = class extends Error {
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
configFailureKind,
|
|
5
5
|
retryAgentCommand,
|
|
6
6
|
writeSetupConfigFile
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5FJDODOA.js";
|
|
8
8
|
import {
|
|
9
9
|
MCP_BRIDGE_BINARY
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HUGVJBDN.js";
|
|
11
11
|
import {
|
|
12
12
|
KEY_FILE_MODE
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CNJ7SI5V.js";
|
|
14
14
|
import {
|
|
15
15
|
CLINE_SERVER_NAME_TAKEN,
|
|
16
16
|
CLINE_SETTINGS_REFUSALS,
|
|
@@ -30,12 +30,12 @@ import {
|
|
|
30
30
|
withClinePusharyServer,
|
|
31
31
|
withRefreshedClineKey,
|
|
32
32
|
withoutClinePusharyServer
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-GDLT32I4.js";
|
|
34
34
|
import {
|
|
35
35
|
readJsonSafe,
|
|
36
36
|
writeFileAtomic,
|
|
37
37
|
writeJsonAtomic
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-KS3O6O7E.js";
|
|
39
39
|
|
|
40
40
|
// src/fx-config.ts
|
|
41
41
|
var FX_SERVER_NAME = "pushary";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3EZP5ZPS.js";
|
|
4
4
|
import {
|
|
5
5
|
hookOwnerOf,
|
|
6
6
|
hookOwnerOfCommands,
|
|
7
7
|
liveBridgeProbe,
|
|
8
8
|
resolveBridgeStub
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YQDCTID4.js";
|
|
10
10
|
import {
|
|
11
11
|
AGENT_CHOICES
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UTAARXYQ.js";
|
|
13
13
|
import {
|
|
14
14
|
claudeSettings,
|
|
15
15
|
codexHooksJson,
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
guardedArgv,
|
|
19
19
|
pusharyDir,
|
|
20
20
|
vscodePluginDir
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GDLT32I4.js";
|
|
22
22
|
import {
|
|
23
23
|
readJsonSafe
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KS3O6O7E.js";
|
|
25
25
|
import {
|
|
26
26
|
HOOK_BUDGETS,
|
|
27
27
|
HOOK_COMPATIBLE_PROFILES,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
OPENCODE_APPROVAL_EVENT,
|
|
30
30
|
hookCompatibleProfile,
|
|
31
31
|
isRecord
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-EJR5JXMV.js";
|
|
33
33
|
|
|
34
34
|
// src/opencode-plugin.ts
|
|
35
35
|
var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
|
|
@@ -456,6 +456,59 @@ var addOpenCodeMcpServer = (config, apiKey) => {
|
|
|
456
456
|
};
|
|
457
457
|
config.mcp = servers;
|
|
458
458
|
};
|
|
459
|
+
var OPENCODE_ASKED_PERMISSIONS = ["bash", "edit", "webfetch"];
|
|
460
|
+
var PERMISSION_KEY = "permission";
|
|
461
|
+
var TOOLS_KEY = "tools";
|
|
462
|
+
var ASK_ACTION = "ask";
|
|
463
|
+
var ALLOW_ACTION = "allow";
|
|
464
|
+
var DENY_ACTION = "deny";
|
|
465
|
+
var ALL_PATTERNS = "*";
|
|
466
|
+
var OPENCODE_ACTION_NAMES = {
|
|
467
|
+
bash: ["bash", "shell"],
|
|
468
|
+
edit: ["edit", "write", "patch"],
|
|
469
|
+
webfetch: ["webfetch"]
|
|
470
|
+
};
|
|
471
|
+
var escapedForPattern = (text) => text.replace(/[.+^${}()|[\]\\]/g, "\\$&").replaceAll("?", ".");
|
|
472
|
+
var keyMatches = (key, name) => new RegExp(`^${key.split(ALL_PATTERNS).map(escapedForPattern).join(".*")}$`).test(name);
|
|
473
|
+
var ruleNamesPermission = (permission) => ([key]) => OPENCODE_ACTION_NAMES[permission].some((name) => keyMatches(key, name));
|
|
474
|
+
var toolRules = (config) => Object.entries(asRecord(config[TOOLS_KEY]) ?? {}).filter(([, enabled]) => typeof enabled === "boolean").map(([key, enabled]) => [key, enabled ? ALLOW_ACTION : DENY_ACTION]);
|
|
475
|
+
var permissionRules = (config) => {
|
|
476
|
+
const permission = config[PERMISSION_KEY];
|
|
477
|
+
if (permission === void 0) return [];
|
|
478
|
+
const rules = asRecord(permission);
|
|
479
|
+
return rules ? Object.entries(rules) : [[ALL_PATTERNS, permission]];
|
|
480
|
+
};
|
|
481
|
+
var rulesInOrder = (config) => [...toolRules(config), ...permissionRules(config)];
|
|
482
|
+
var actionOfRule = (value) => {
|
|
483
|
+
const patterns = asRecord(value);
|
|
484
|
+
return patterns ? patterns[ALL_PATTERNS] : value;
|
|
485
|
+
};
|
|
486
|
+
var holdsTheCall = (action) => action === ASK_ACTION || action === DENY_ACTION;
|
|
487
|
+
var withOpenCodeAskRules = (config) => {
|
|
488
|
+
const permission = config[PERMISSION_KEY];
|
|
489
|
+
const rules = asRecord(permission);
|
|
490
|
+
if (permission !== void 0 && !rules) return { config, change: { kind: "person-setting-kept" } };
|
|
491
|
+
const personRules = rulesInOrder(config);
|
|
492
|
+
const added = OPENCODE_ASKED_PERMISSIONS.filter((name) => !personRules.some(ruleNamesPermission(name)));
|
|
493
|
+
if (added.length === 0) return { config, change: { kind: "present" } };
|
|
494
|
+
const asks = Object.fromEntries(added.map((name) => [name, ASK_ACTION]));
|
|
495
|
+
return { config: { ...config, [PERMISSION_KEY]: { ...asks, ...rules } }, change: { kind: "added", added } };
|
|
496
|
+
};
|
|
497
|
+
var openCodePermissionsLeftOpen = (config) => {
|
|
498
|
+
const rules = rulesInOrder(asRecord(config) ?? {});
|
|
499
|
+
return OPENCODE_ASKED_PERMISSIONS.filter((name) => !holdsTheCall(
|
|
500
|
+
rules.filter(ruleNamesPermission(name)).map(([, value]) => actionOfRule(value)).filter((action) => action !== void 0).at(-1)
|
|
501
|
+
));
|
|
502
|
+
};
|
|
503
|
+
var openCodeAskCheck = (config) => {
|
|
504
|
+
if (config.kind === "unreadable" || config.kind === "unparseable") return { kind: "unreadable" };
|
|
505
|
+
const value = config.kind === "ok" ? asRecord(config.value) ?? {} : {};
|
|
506
|
+
const open = openCodePermissionsLeftOpen(value);
|
|
507
|
+
if (open.length === 0) return { kind: "asks" };
|
|
508
|
+
const personRules = rulesInOrder(value);
|
|
509
|
+
const namedByPerson = (name) => personRules.some(ruleNamesPermission(name));
|
|
510
|
+
return { kind: "open", unset: open.filter((name) => !namedByPerson(name)), allowedByPerson: open.filter(namedByPerson) };
|
|
511
|
+
};
|
|
459
512
|
var removeOpenCodeMcpServer = (config) => {
|
|
460
513
|
const servers = asRecord(config.mcp);
|
|
461
514
|
if (!servers || !("pushary" in servers)) return false;
|
|
@@ -518,6 +571,10 @@ export {
|
|
|
518
571
|
openCodeConfigFile,
|
|
519
572
|
openCodeInstructionsFile,
|
|
520
573
|
addOpenCodeMcpServer,
|
|
574
|
+
OPENCODE_ASKED_PERMISSIONS,
|
|
575
|
+
withOpenCodeAskRules,
|
|
576
|
+
openCodePermissionsLeftOpen,
|
|
577
|
+
openCodeAskCheck,
|
|
521
578
|
removeOpenCodeMcpServer,
|
|
522
579
|
agentHookFile,
|
|
523
580
|
agentHooksKeyPath,
|
|
@@ -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-GDSVUTI2.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-W7OLKOMO.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]");
|