pushary 1.9.65 → 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 +9 -0
- package/dist/{api-32B3XLJR.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 +34 -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 +42 -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 +47 -49
- 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-FFSIYBBU.js → chunk-26W46E46.js} +4 -4
- package/dist/{chunk-3UNAPXED.js → chunk-2BL6KWN7.js} +9 -9
- package/dist/{chunk-GA257T2E.js → chunk-32ZT2ATY.js} +5 -5
- package/dist/{chunk-CSKABVSH.js → chunk-376TUN72.js} +3 -3
- package/dist/{chunk-6CZX6YOE.js → chunk-3ELJIG2R.js} +3 -3
- package/dist/{chunk-WY6YAMZW.js → chunk-3EZP5ZPS.js} +5 -4
- package/dist/{chunk-4LUWNBGD.js → chunk-3FQX74E4.js} +3 -3
- package/dist/{chunk-HVOQUPSO.js → chunk-45KMS76L.js} +1 -1
- package/dist/{chunk-JCWHOB36.js → chunk-4APD2DPI.js} +2 -2
- package/dist/{chunk-ADXHPGBZ.js → chunk-57NTMVMI.js} +6 -6
- package/dist/{chunk-W5L2ZLHE.js → chunk-5FJDODOA.js} +3 -3
- package/dist/{chunk-CZ65D6Q5.js → chunk-5J7OZBJ4.js} +2 -2
- package/dist/{chunk-XJIIU36L.js → chunk-6BGVSV2Q.js} +1 -1
- package/dist/{chunk-I2UBF2SS.js → chunk-6RJZSBPD.js} +1 -1
- package/dist/{chunk-QNZ6G3LY.js → chunk-6ZXCWK27.js} +5 -5
- package/dist/{chunk-P5HZEGT7.js → chunk-7LK3Y6ET.js} +6 -6
- package/dist/{chunk-Y64JGYTB.js → chunk-A47UKPC7.js} +1 -1
- package/dist/{chunk-JFKMPLNF.js → chunk-AVWECJSN.js} +2 -2
- package/dist/{chunk-XZCJC3QO.js → chunk-AWGBL4P3.js} +211 -24
- package/dist/{chunk-LMC5UPL7.js → chunk-B6JC676X.js} +1 -1
- package/dist/{chunk-U2P2LQ5B.js → chunk-CN6JFM62.js} +5 -5
- package/dist/{chunk-ED2SWTPC.js → chunk-CNJ7SI5V.js} +4 -4
- package/dist/{chunk-SZBMTOUZ.js → chunk-DBUHSUL7.js} +1 -1
- package/dist/{chunk-EEVE7H5Z.js → chunk-DIUTSF6I.js} +4 -4
- package/dist/{chunk-UM2X7HL6.js → chunk-DKMVVBXO.js} +13 -15
- package/dist/{chunk-OA6EADFT.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-ATPJGHUP.js → chunk-GDLT32I4.js} +3 -3
- package/dist/{chunk-7ILQX47W.js → chunk-GECU7V44.js} +3 -3
- package/dist/{chunk-BAGBCSXA.js → chunk-GO7YKPT3.js} +1 -1
- package/dist/{chunk-F56GTJFG.js → chunk-GWYCKTXS.js} +5 -5
- package/dist/{chunk-BEQ3MEE3.js → chunk-HUGVJBDN.js} +2 -2
- package/dist/{chunk-FWS2KLV2.js → chunk-IA5VWIHV.js} +2 -2
- package/dist/{chunk-CU2PXLZ6.js → chunk-IGO3AGZK.js} +4 -4
- package/dist/{chunk-Z3M627TQ.js → chunk-IQ3GKPFM.js} +1 -1
- package/dist/{chunk-HDGB6SQ4.js → chunk-JL3SZJJP.js} +2 -2
- package/dist/{chunk-SCMEVDAR.js → chunk-KS3O6O7E.js} +3 -3
- package/dist/{chunk-HIYLAC3C.js → chunk-MDIGG3Q7.js} +3 -3
- package/dist/{chunk-ICFHMJTW.js → chunk-MNNQEUQC.js} +3 -3
- package/dist/{chunk-BKCI53W6.js → chunk-Q5RNYE2L.js} +4 -4
- package/dist/{chunk-ONBL2GCU.js → chunk-QBNICXMC.js} +6 -6
- package/dist/{chunk-PP7FC3Y7.js → chunk-QN25WBXL.js} +9 -7
- package/dist/{chunk-NUEPJ5W6.js → chunk-QOIPUYUD.js} +3 -5
- package/dist/{chunk-UHS5MMAI.js → chunk-QR2QWGQI.js} +3 -3
- package/dist/{chunk-NOH3EJFH.js → chunk-R7C2FS33.js} +1 -1
- package/dist/{chunk-RABLE5R6.js → chunk-RJ6JEHCP.js} +1 -1
- package/dist/{chunk-WOHP7EL6.js → chunk-RSZQEEEW.js} +6 -6
- package/dist/{chunk-Q2BD4IBX.js → chunk-SVKCYUYP.js} +11 -13
- package/dist/{chunk-R4FL5JHK.js → chunk-T6YLXO6N.js} +4 -4
- package/dist/{chunk-3LF7T3NW.js → chunk-TQNFDNJA.js} +6 -6
- package/dist/{chunk-SROWUG5W.js → chunk-UTAARXYQ.js} +1 -1
- package/dist/{chunk-DXMUJTYF.js → chunk-V3YBVOTZ.js} +2 -2
- package/dist/{chunk-RRHHWYPX.js → chunk-V4EOFOB2.js} +6 -6
- package/dist/{chunk-DM24VZOI.js → chunk-VURDLVAQ.js} +3 -3
- package/dist/{chunk-IZVEBBDH.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-TK4JU2F7.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-ITYKN2K3.js → chunk-YB3HMDKE.js} +2 -2
- package/dist/{chunk-GTBWWCCM.js → chunk-YQDCTID4.js} +115 -9
- package/dist/{chunk-DTVHZDYM.js → chunk-ZAZUDYSF.js} +26 -12
- package/dist/{chunk-UMTMFDL2.js → chunk-ZJV7SFIJ.js} +1 -1
- package/dist/{codex-app-cards-switch-HK4RMOBI.js → codex-app-cards-switch-W7OLKOMO.js} +11 -11
- package/dist/{codex-desktop-launch-OCO6N7SA.js → codex-desktop-launch-U6V3AXZF.js} +1 -1
- package/dist/{codex-session-launch-ETZQTVFS.js → codex-session-launch-EFU46WBL.js} +18 -19
- package/dist/{config-YY54G3CC.js → config-UC4LMCNX.js} +3 -3
- package/dist/{global-upgrade-5DN5G3ZQ.js → global-upgrade-ABF5O3HU.js} +10 -10
- package/dist/{identity-EGL6HAWG.js → identity-3ZUZPHN6.js} +4 -4
- package/dist/{live-capabilities-WU3FYJJG.js → live-capabilities-BXWXJARK.js} +5 -5
- package/dist/{paths-ZG6KDM6Y.js → paths-FO76CFRQ.js} +3 -3
- package/dist/{reapply-AQLNCCTE.js → reapply-3T3DFUAI.js} +26 -27
- package/dist/src/index.js +30 -20
- package/dist/{upgrade-lock-BIRXIKHJ.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-ANP3DIST.js +0 -118
- package/dist/chunk-TJUJAK5L.js +0 -62
|
@@ -12,39 +12,38 @@ import {
|
|
|
12
12
|
reapplyOpenCodePlugin,
|
|
13
13
|
reapplyVsCodePlugin,
|
|
14
14
|
repairCodexHolds
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-Z3M627TQ.js";
|
|
15
|
+
} from "./chunk-DKMVVBXO.js";
|
|
16
|
+
import "./chunk-JL3SZJJP.js";
|
|
17
|
+
import "./chunk-6ZXCWK27.js";
|
|
18
|
+
import "./chunk-5FJDODOA.js";
|
|
19
|
+
import "./chunk-HUGVJBDN.js";
|
|
20
|
+
import "./chunk-7LK3Y6ET.js";
|
|
21
|
+
import "./chunk-MDIGG3Q7.js";
|
|
22
|
+
import "./chunk-RJ6JEHCP.js";
|
|
23
|
+
import "./chunk-3EZP5ZPS.js";
|
|
24
|
+
import "./chunk-YQDCTID4.js";
|
|
25
|
+
import "./chunk-UTAARXYQ.js";
|
|
26
|
+
import "./chunk-IQ3GKPFM.js";
|
|
28
27
|
import "./chunk-NMUI3ZWG.js";
|
|
29
28
|
import "./chunk-XHKBHWLX.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-CNJ7SI5V.js";
|
|
30
|
+
import "./chunk-2BL6KWN7.js";
|
|
31
|
+
import "./chunk-XXIJBYNW.js";
|
|
32
|
+
import "./chunk-ZAZUDYSF.js";
|
|
34
33
|
import "./chunk-POFBE6ZY.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-Q5RNYE2L.js";
|
|
35
|
+
import "./chunk-QR2QWGQI.js";
|
|
36
|
+
import "./chunk-GECU7V44.js";
|
|
37
|
+
import "./chunk-IA5VWIHV.js";
|
|
39
38
|
import "./chunk-PPY5N2E6.js";
|
|
40
39
|
import "./chunk-KZERVKTD.js";
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-XIJTXRWB.js";
|
|
41
|
+
import "./chunk-GDLT32I4.js";
|
|
42
|
+
import "./chunk-KS3O6O7E.js";
|
|
43
|
+
import "./chunk-A47UKPC7.js";
|
|
44
|
+
import "./chunk-GO7YKPT3.js";
|
|
46
45
|
import "./chunk-QTOLNRET.js";
|
|
47
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-EJR5JXMV.js";
|
|
48
47
|
import "./chunk-MLKGABMK.js";
|
|
49
48
|
export {
|
|
50
49
|
ensureCodexTrustAfterReapply,
|
package/dist/src/index.js
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handlePreToolUse
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-AWGBL4P3.js";
|
|
4
|
+
import "../chunk-V4EOFOB2.js";
|
|
5
|
+
import "../chunk-6BGVSV2Q.js";
|
|
6
|
+
import "../chunk-QN25WBXL.js";
|
|
7
|
+
import "../chunk-ZJV7SFIJ.js";
|
|
8
|
+
import "../chunk-SVKCYUYP.js";
|
|
9
|
+
import "../chunk-DBUHSUL7.js";
|
|
10
|
+
import "../chunk-3EZP5ZPS.js";
|
|
11
|
+
import "../chunk-57NTMVMI.js";
|
|
12
|
+
import "../chunk-YQDCTID4.js";
|
|
13
|
+
import "../chunk-UTAARXYQ.js";
|
|
14
|
+
import "../chunk-IQ3GKPFM.js";
|
|
15
|
+
import "../chunk-NMUI3ZWG.js";
|
|
9
16
|
import {
|
|
10
17
|
fetchAccountPublicKey
|
|
11
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-XEXF2OFZ.js";
|
|
19
|
+
import "../chunk-XGFFNERF.js";
|
|
20
|
+
import "../chunk-XHKBHWLX.js";
|
|
21
|
+
import "../chunk-CNJ7SI5V.js";
|
|
12
22
|
import {
|
|
13
23
|
fetchModeOverride,
|
|
14
24
|
fetchModeState,
|
|
@@ -17,32 +27,32 @@ import {
|
|
|
17
27
|
handlePostToolUse,
|
|
18
28
|
handleStop,
|
|
19
29
|
reportEvent
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
30
|
+
} from "../chunk-2BL6KWN7.js";
|
|
31
|
+
import "../chunk-XXIJBYNW.js";
|
|
22
32
|
import {
|
|
23
33
|
askUser,
|
|
24
34
|
cancelQuestion,
|
|
25
35
|
waitForAnswer
|
|
26
|
-
} from "../chunk-
|
|
36
|
+
} from "../chunk-ZAZUDYSF.js";
|
|
27
37
|
import "../chunk-POFBE6ZY.js";
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
38
|
+
import "../chunk-Q5RNYE2L.js";
|
|
39
|
+
import "../chunk-QR2QWGQI.js";
|
|
40
|
+
import "../chunk-GECU7V44.js";
|
|
41
|
+
import "../chunk-IA5VWIHV.js";
|
|
32
42
|
import "../chunk-PPY5N2E6.js";
|
|
33
43
|
import "../chunk-KZERVKTD.js";
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
36
|
-
import "../chunk-
|
|
44
|
+
import "../chunk-XIJTXRWB.js";
|
|
45
|
+
import "../chunk-GDLT32I4.js";
|
|
46
|
+
import "../chunk-KS3O6O7E.js";
|
|
37
47
|
import {
|
|
38
48
|
getApiKey,
|
|
39
49
|
getBaseUrl
|
|
40
|
-
} from "../chunk-
|
|
41
|
-
import "../chunk-
|
|
50
|
+
} from "../chunk-A47UKPC7.js";
|
|
51
|
+
import "../chunk-GO7YKPT3.js";
|
|
42
52
|
import "../chunk-QTOLNRET.js";
|
|
43
53
|
import {
|
|
44
54
|
resolvePolicy
|
|
45
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-EJR5JXMV.js";
|
|
46
56
|
import "../chunk-MLKGABMK.js";
|
|
47
57
|
export {
|
|
48
58
|
askUser,
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
installWithUpgradeLock,
|
|
5
5
|
ownsUpgradeLock,
|
|
6
6
|
releaseAutoUpdateLock
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-V3YBVOTZ.js";
|
|
8
|
+
import "./chunk-GDLT32I4.js";
|
|
9
|
+
import "./chunk-KS3O6O7E.js";
|
|
10
10
|
import "./chunk-QTOLNRET.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-EJR5JXMV.js";
|
|
12
12
|
import "./chunk-MLKGABMK.js";
|
|
13
13
|
export {
|
|
14
14
|
claimUpgradeLock,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exitOnHelpFlag
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G6VJZ3RB.js";
|
|
4
4
|
import "./chunk-KZERVKTD.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-GO7YKPT3.js";
|
|
6
6
|
import "./chunk-QTOLNRET.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-EJR5JXMV.js";
|
|
8
8
|
import "./chunk-MLKGABMK.js";
|
|
9
9
|
export {
|
|
10
10
|
exitOnHelpFlag
|
package/package.json
CHANGED
package/dist/chunk-ANP3DIST.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isProtectedByScope,
|
|
3
|
-
registerHookEntry
|
|
4
|
-
} from "./chunk-ATPJGHUP.js";
|
|
5
|
-
import {
|
|
6
|
-
HOOK_BUDGETS,
|
|
7
|
-
HOOK_LOCATOR_BINARY
|
|
8
|
-
} from "./chunk-MNKIR2ZB.js";
|
|
9
|
-
|
|
10
|
-
// src/gemini-config.ts
|
|
11
|
-
var GEMINI_HOOK_BINARY = "pushary-gemini-hook";
|
|
12
|
-
var GEMINI_MCP_URL = "https://pushary.com/api/mcp/mcp";
|
|
13
|
-
var GEMINI_HOOK_EVENTS = [
|
|
14
|
-
{ event: "BeforeTool", matcher: "run_shell_command|write_file|replace|mcp_.*", delivery: "approval", timeoutMs: HOOK_BUDGETS.gemini.budgetSeconds * 1e3 },
|
|
15
|
-
{ event: "AfterTool", matcher: "run_shell_command|write_file|replace|mcp_.*", delivery: "telemetry", timeoutMs: 1e4 },
|
|
16
|
-
{ event: "BeforeAgent", delivery: "telemetry", timeoutMs: 1e4 },
|
|
17
|
-
{ event: "AfterAgent", delivery: "telemetry", timeoutMs: 1e4 },
|
|
18
|
-
{ event: "SessionStart", delivery: "telemetry", timeoutMs: 1e4 },
|
|
19
|
-
{ event: "SessionEnd", delivery: "telemetry", timeoutMs: 1e4 }
|
|
20
|
-
];
|
|
21
|
-
var asRecord = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
22
|
-
var ensureRecord = (target, key) => {
|
|
23
|
-
const existing = asRecord(target[key]);
|
|
24
|
-
if (existing) return existing;
|
|
25
|
-
const created = {};
|
|
26
|
-
target[key] = created;
|
|
27
|
-
return created;
|
|
28
|
-
};
|
|
29
|
-
var isPusharyGeminiHook = (entry, scope) => {
|
|
30
|
-
const hooks = asRecord(entry)?.hooks;
|
|
31
|
-
if (!Array.isArray(hooks)) return false;
|
|
32
|
-
return hooks.some((hook) => {
|
|
33
|
-
const command = String(asRecord(hook)?.command ?? "");
|
|
34
|
-
if (isProtectedByScope(command, scope)) return false;
|
|
35
|
-
return command.includes(GEMINI_HOOK_BINARY) || command.includes(HOOK_LOCATOR_BINARY);
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
var addGeminiMcpServer = (settings, apiKey) => {
|
|
39
|
-
const mcpServers = ensureRecord(settings, "mcpServers");
|
|
40
|
-
mcpServers.pushary = {
|
|
41
|
-
httpUrl: GEMINI_MCP_URL,
|
|
42
|
-
headers: { Authorization: `Bearer ${apiKey}` },
|
|
43
|
-
trust: true
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
var addGeminiHooks = (settings, command) => {
|
|
47
|
-
const hooks = ensureRecord(settings, "hooks");
|
|
48
|
-
for (const definition of GEMINI_HOOK_EVENTS) {
|
|
49
|
-
const existing = Array.isArray(hooks[definition.event]) ? hooks[definition.event] : [];
|
|
50
|
-
hooks[definition.event] = registerHookEntry(existing, isPusharyGeminiHook, {
|
|
51
|
-
...definition.matcher ? { matcher: definition.matcher } : {},
|
|
52
|
-
hooks: [{
|
|
53
|
-
name: "pushary",
|
|
54
|
-
type: "command",
|
|
55
|
-
command,
|
|
56
|
-
timeout: definition.timeoutMs
|
|
57
|
-
}]
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
var removeGeminiHooks = (settings, scope) => {
|
|
62
|
-
const hooks = asRecord(settings.hooks);
|
|
63
|
-
if (!hooks) return false;
|
|
64
|
-
let changed = false;
|
|
65
|
-
for (const definition of GEMINI_HOOK_EVENTS) {
|
|
66
|
-
const entries = hooks[definition.event];
|
|
67
|
-
if (!Array.isArray(entries)) continue;
|
|
68
|
-
const filtered = entries.filter((entry) => !isPusharyGeminiHook(entry, scope));
|
|
69
|
-
if (filtered.length !== entries.length) {
|
|
70
|
-
if (filtered.length === 0) {
|
|
71
|
-
delete hooks[definition.event];
|
|
72
|
-
} else {
|
|
73
|
-
hooks[definition.event] = filtered;
|
|
74
|
-
}
|
|
75
|
-
changed = true;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
if (Object.keys(hooks).length === 0) delete settings.hooks;
|
|
79
|
-
return changed;
|
|
80
|
-
};
|
|
81
|
-
var removeGeminiMcpServer = (settings) => {
|
|
82
|
-
const mcpServers = asRecord(settings.mcpServers);
|
|
83
|
-
if (!mcpServers?.pushary) return false;
|
|
84
|
-
delete mcpServers.pushary;
|
|
85
|
-
if (Object.keys(mcpServers).length === 0) delete settings.mcpServers;
|
|
86
|
-
return true;
|
|
87
|
-
};
|
|
88
|
-
var removeGeminiSettings = (settings, scope) => {
|
|
89
|
-
const mcpRemoved = scope?.keepMcpServer === true ? false : removeGeminiMcpServer(settings);
|
|
90
|
-
const hooksRemoved = removeGeminiHooks(settings, scope);
|
|
91
|
-
return mcpRemoved || hooksRemoved;
|
|
92
|
-
};
|
|
93
|
-
var hasGeminiHooks = (settings) => {
|
|
94
|
-
const hooks = asRecord(settings.hooks);
|
|
95
|
-
if (!hooks) return false;
|
|
96
|
-
return GEMINI_HOOK_EVENTS.some((definition) => {
|
|
97
|
-
const entries = hooks[definition.event];
|
|
98
|
-
return Array.isArray(entries) && entries.some((entry) => isPusharyGeminiHook(entry));
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
var missingGeminiHookEvents = (settings) => {
|
|
102
|
-
const hooks = asRecord(settings.hooks);
|
|
103
|
-
return GEMINI_HOOK_EVENTS.filter((definition) => {
|
|
104
|
-
const entries = hooks?.[definition.event];
|
|
105
|
-
return !Array.isArray(entries) || !entries.some((entry) => isPusharyGeminiHook(entry));
|
|
106
|
-
}).map((definition) => definition.event);
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
export {
|
|
110
|
-
GEMINI_HOOK_BINARY,
|
|
111
|
-
GEMINI_HOOK_EVENTS,
|
|
112
|
-
addGeminiMcpServer,
|
|
113
|
-
addGeminiHooks,
|
|
114
|
-
removeGeminiMcpServer,
|
|
115
|
-
removeGeminiSettings,
|
|
116
|
-
hasGeminiHooks,
|
|
117
|
-
missingGeminiHookEvents
|
|
118
|
-
};
|
package/dist/chunk-TJUJAK5L.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getBaseUrl
|
|
3
|
-
} from "./chunk-Y64JGYTB.js";
|
|
4
|
-
|
|
5
|
-
// src/transcript-api.ts
|
|
6
|
-
var fetchTranscriptRecipients = async (apiKey, baseUrl = getBaseUrl()) => {
|
|
7
|
-
try {
|
|
8
|
-
const res = await fetch(`${baseUrl}/api/agent/encryption-account`, {
|
|
9
|
-
headers: { Authorization: `Bearer ${apiKey}` },
|
|
10
|
-
signal: AbortSignal.timeout(5e3)
|
|
11
|
-
});
|
|
12
|
-
if (!res.ok) return null;
|
|
13
|
-
const data = await res.json();
|
|
14
|
-
if (typeof data.publicKey !== "string" || data.publicKey.length === 0) return null;
|
|
15
|
-
const phoneReadsCompressedRecords = data.readsCompressedRecords === true;
|
|
16
|
-
if (data.providerRecovery === void 0 || data.providerRecovery === null) {
|
|
17
|
-
return { phonePublicKey: data.publicKey, phoneReadsCompressedRecords, provider: null };
|
|
18
|
-
}
|
|
19
|
-
if (typeof data.providerRecovery !== "object") return null;
|
|
20
|
-
const provider = data.providerRecovery;
|
|
21
|
-
if (typeof provider.required !== "boolean" || typeof provider.keyId !== "string" || provider.keyId.length === 0 || typeof provider.publicKey !== "string" || provider.publicKey.length === 0) return null;
|
|
22
|
-
return {
|
|
23
|
-
phonePublicKey: data.publicKey,
|
|
24
|
-
phoneReadsCompressedRecords,
|
|
25
|
-
provider: { required: provider.required, keyId: provider.keyId, publicKey: provider.publicKey }
|
|
26
|
-
};
|
|
27
|
-
} catch {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
var fetchAccountPublicKey = async (apiKey, baseUrl = getBaseUrl()) => (await fetchTranscriptRecipients(apiKey, baseUrl))?.phonePublicKey ?? null;
|
|
32
|
-
var uploadTranscriptRecords = async (apiKey, params, baseUrl = getBaseUrl()) => {
|
|
33
|
-
try {
|
|
34
|
-
const res = await fetch(`${baseUrl}/api/agent/transcript`, {
|
|
35
|
-
method: "POST",
|
|
36
|
-
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
|
|
37
|
-
body: JSON.stringify(params),
|
|
38
|
-
signal: AbortSignal.timeout(15e3)
|
|
39
|
-
});
|
|
40
|
-
const body = await res.json().catch(() => null);
|
|
41
|
-
const keyRegistered = body?.keyRegistered === true;
|
|
42
|
-
const keyConflict = body?.keyConflict === true;
|
|
43
|
-
const keyUnavailable = res.status === 503;
|
|
44
|
-
const ids = (value) => Array.isArray(value) ? value.filter((v) => typeof v === "string") : [];
|
|
45
|
-
return {
|
|
46
|
-
ok: res.ok && !keyConflict && (params.dataEncryptionKey === void 0 || keyRegistered),
|
|
47
|
-
keyRegistered,
|
|
48
|
-
keyConflict,
|
|
49
|
-
keyUnavailable,
|
|
50
|
-
settledIds: Array.isArray(body?.settledIds) ? ids(body.settledIds) : null,
|
|
51
|
-
rejectedIds: ids(body?.rejectedIds)
|
|
52
|
-
};
|
|
53
|
-
} catch {
|
|
54
|
-
return { ok: false, keyRegistered: false, keyConflict: false, keyUnavailable: false, settledIds: null, rejectedIds: [] };
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export {
|
|
59
|
-
fetchTranscriptRecipients,
|
|
60
|
-
fetchAccountPublicKey,
|
|
61
|
-
uploadTranscriptRecords
|
|
62
|
-
};
|