pushary 1.9.267 → 1.9.268
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 +8 -0
- package/dist/{api-L2Z47RNK.js → api-2PD4GLZO.js} +12 -11
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +28 -29
- package/dist/bin/pushary-bell.js +11 -12
- package/dist/bin/pushary-calls.js +14 -15
- package/dist/bin/pushary-claude.js +25 -26
- package/dist/bin/pushary-clean.js +39 -40
- package/dist/bin/pushary-codex-bridge.js +22 -23
- package/dist/bin/pushary-codex-hook.js +34 -35
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +16 -16
- package/dist/bin/pushary-connect.js +35 -36
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +46 -47
- package/dist/bin/pushary-disconnect.js +30 -31
- package/dist/bin/pushary-display-hook.js +18 -0
- package/dist/bin/pushary-doctor.js +50 -51
- package/dist/bin/pushary-elicitation-hook.js +27 -28
- package/dist/bin/pushary-gemini-bridge.js +17 -18
- package/dist/bin/pushary-gemini-hook.js +31 -32
- package/dist/bin/pushary-hook.js +35 -36
- package/dist/bin/pushary-login.js +101 -25
- package/dist/bin/pushary-logout.js +31 -32
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +15 -16
- package/dist/bin/pushary-notification-hook.js +27 -28
- package/dist/bin/pushary-opencode-bridge.js +21 -22
- package/dist/bin/pushary-opencode-hook.js +32 -33
- package/dist/bin/pushary-permission-denied-hook.js +34 -35
- package/dist/bin/pushary-permission-hook.js +35 -36
- package/dist/bin/pushary-post-hook.js +28 -29
- package/dist/bin/pushary-prompt-hook.js +27 -28
- package/dist/bin/pushary-session-end-hook.js +27 -28
- package/dist/bin/pushary-session-start-hook.js +39 -40
- package/dist/bin/pushary-sessions.js +12 -12
- package/dist/bin/pushary-setup.js +65 -73
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +36 -37
- package/dist/bin/pushary-stop-hook.js +27 -28
- package/dist/bin/pushary-stopfailure-hook.js +27 -28
- package/dist/bin/pushary-suggestions.js +15 -16
- package/dist/bin/pushary-transcript-register.js +16 -17
- package/dist/bin/pushary-transcripts.js +25 -26
- package/dist/bin/pushary-upgrade.js +47 -48
- package/dist/bin/pushary-wait.js +16 -17
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-OEKXK3YR.js → chunk-26K5VC53.js} +1 -1
- package/dist/{chunk-OTCNXBIY.js → chunk-2EHLFIVK.js} +4 -4
- package/dist/{chunk-XUN2NSYF.js → chunk-2FI62SKT.js} +1 -1
- package/dist/{chunk-Y2CO2RMJ.js → chunk-47NWTV5K.js} +45 -13
- package/dist/{chunk-SLWLFMMB.js → chunk-4LRWEHQT.js} +65 -6
- package/dist/{chunk-RQ5DKUF4.js → chunk-4ZSC56SL.js} +1 -1
- package/dist/{chunk-KCQP7ZDP.js → chunk-5LE7C6Q2.js} +2 -2
- package/dist/{chunk-TFI7UZ4N.js → chunk-5WSFZXR6.js} +2 -2
- package/dist/{chunk-BO5TJWAN.js → chunk-AOCTHK4E.js} +3 -3
- package/dist/{chunk-573LGFOV.js → chunk-AQP5SMAF.js} +2 -2
- package/dist/{chunk-4R7RMJIP.js → chunk-AQPA4YIB.js} +1 -1
- package/dist/{chunk-J26QBILB.js → chunk-AT3C3Z3M.js} +7 -7
- package/dist/{chunk-275RFVSO.js → chunk-AXVLRYIK.js} +1 -1
- package/dist/{chunk-KK57NC2O.js → chunk-BQ23UZJY.js} +5 -5
- package/dist/{chunk-UVRUK52J.js → chunk-CIO6FAIU.js} +1 -1
- package/dist/{chunk-KPH6GX74.js → chunk-DC35GPRY.js} +8 -8
- package/dist/{chunk-EVT7LZ7E.js → chunk-DJYBACUW.js} +1 -1
- package/dist/{chunk-GXHOOPOY.js → chunk-DPOLLK6I.js} +3 -3
- package/dist/{chunk-7KAMTVC2.js → chunk-DVAXZOTR.js} +1 -1
- package/dist/{chunk-XPLUSOU5.js → chunk-EKU4KLON.js} +1 -1
- package/dist/{chunk-MQO4F37H.js → chunk-ERE3R6SS.js} +4 -4
- package/dist/{chunk-ZJLVASQZ.js → chunk-FF2LDPB2.js} +4 -4
- package/dist/{chunk-HZG7IUDL.js → chunk-FFWESSEY.js} +4 -4
- package/dist/{chunk-EVX63B2G.js → chunk-FHCXJ2HZ.js} +5 -5
- package/dist/{chunk-PDANBIJA.js → chunk-FK4BFIFR.js} +5 -5
- package/dist/{chunk-WH5M67RN.js → chunk-GCDVD242.js} +6 -6
- package/dist/{chunk-WNMTWBV4.js → chunk-GEBRKBLB.js} +5 -5
- package/dist/{chunk-S44D2HDB.js → chunk-GMQ73QWC.js} +16 -16
- package/dist/{chunk-I2EZVCOY.js → chunk-GP5UGODT.js} +5 -5
- package/dist/{chunk-GF75PDAQ.js → chunk-GPEGT2EP.js} +1 -1
- package/dist/{chunk-4YOLB6H7.js → chunk-GYLIVREZ.js} +18 -0
- package/dist/{chunk-JSPW2FFO.js → chunk-HEAJBTIG.js} +1 -1
- package/dist/{chunk-WAVZTVYL.js → chunk-HPLG5D6Y.js} +5 -5
- package/dist/{chunk-A2YOC25E.js → chunk-HSX5EVPH.js} +2 -2
- package/dist/{chunk-KQ5S2ZUP.js → chunk-IEQDAZDB.js} +2 -2
- package/dist/{chunk-QW7LM6BG.js → chunk-IQBJD5ZB.js} +4 -4
- package/dist/{chunk-YJ2T5AKE.js → chunk-IR342JX3.js} +6 -6
- package/dist/{chunk-TXPDNOKT.js → chunk-JQCF2IYA.js} +1 -1
- package/dist/{chunk-IRS2FE32.js → chunk-JSE7T4JL.js} +1 -1
- package/dist/{chunk-NDOHMHU7.js → chunk-JXWWWVGR.js} +10 -10
- package/dist/{chunk-WUKZEENF.js → chunk-KQZQ55CO.js} +4 -4
- package/dist/{chunk-MGFCPJHQ.js → chunk-KVCWPOF6.js} +8 -5
- package/dist/{chunk-6QFYQYLV.js → chunk-L6CWEU5C.js} +2 -2
- package/dist/{chunk-JYKM47DL.js → chunk-LF5OEQNP.js} +2 -2
- package/dist/{chunk-QTWLOFBV.js → chunk-LYBX463S.js} +2 -2
- package/dist/{chunk-VSOUII7B.js → chunk-M2ETE6JQ.js} +1 -1
- package/dist/{chunk-XHKGTKM6.js → chunk-N6ARPVSQ.js} +86 -79
- package/dist/{chunk-BWPDGMKS.js → chunk-NA5EQTCV.js} +1 -1
- package/dist/{chunk-UX7YU7EM.js → chunk-NAVHNIM4.js} +1 -1
- package/dist/{chunk-AXIIY75S.js → chunk-NOWWUX5V.js} +3 -3
- package/dist/{chunk-OF7LT6JD.js → chunk-NRTSHLZQ.js} +6 -6
- package/dist/{chunk-3DY5G7JW.js → chunk-NYP2NRV3.js} +1 -1
- package/dist/{chunk-RB4QNUFM.js → chunk-O2X6KT7P.js} +4 -4
- package/dist/{chunk-DW7YF5GB.js → chunk-P6AKOYLZ.js} +4 -4
- package/dist/{chunk-LXH5JLD7.js → chunk-QJHOS33W.js} +5 -5
- package/dist/{chunk-MDG6IDIJ.js → chunk-S2DKGGEL.js} +5 -5
- package/dist/{chunk-OOSDN4AF.js → chunk-S4AQUVX3.js} +3 -3
- package/dist/{chunk-NBU7Y6JX.js → chunk-S55XHTYZ.js} +1 -1
- package/dist/{chunk-HWIXP7UY.js → chunk-SYCNMJ3Z.js} +1 -1
- package/dist/{chunk-FSTX5SRV.js → chunk-SYEUQH6Z.js} +3 -3
- package/dist/{chunk-SSQWDL6Q.js → chunk-TEFLCQO4.js} +1 -1
- package/dist/{chunk-MY3ZY6B2.js → chunk-TKMOPFZS.js} +3 -3
- package/dist/{chunk-IV7POIBI.js → chunk-TOELRIWR.js} +59 -13
- package/dist/{chunk-XF3R4ZPV.js → chunk-TZO67S4V.js} +10 -10
- package/dist/{chunk-V6673KO7.js → chunk-U2OB44U5.js} +5 -5
- package/dist/{chunk-KPQ7QKS4.js → chunk-UNF23P35.js} +1 -1
- package/dist/{chunk-7YCRU3HC.js → chunk-UQB4MAA6.js} +3 -3
- package/dist/{chunk-WX6YWZFM.js → chunk-UVO56TVL.js} +7 -7
- package/dist/{chunk-2IXNXTLA.js → chunk-V2UGSM45.js} +6 -6
- package/dist/{chunk-U6X2XWRP.js → chunk-WCEP3U7C.js} +1 -1
- package/dist/{chunk-4TRRDGM5.js → chunk-WHFXXV2A.js} +25 -2
- package/dist/{chunk-FF7JYSH5.js → chunk-WYYZ2UFX.js} +2 -2
- package/dist/{chunk-7SSL355C.js → chunk-WZM7Y5HM.js} +1 -1
- package/dist/{chunk-YFJ4ANFO.js → chunk-X5R55HMM.js} +6 -6
- package/dist/{chunk-CSI5V5NO.js → chunk-XIEYX4TJ.js} +1 -1
- package/dist/{chunk-LOSHKUR2.js → chunk-XPS36L6H.js} +3 -3
- package/dist/{chunk-TDDX5PAP.js → chunk-XUJBTEUC.js} +4 -4
- package/dist/{chunk-5K6MB557.js → chunk-YBAU5TAV.js} +2 -2
- package/dist/{chunk-KBQBO3KA.js → chunk-YGCU6KMO.js} +3 -3
- package/dist/{chunk-FV2YDUH5.js → chunk-YZRUE46K.js} +1 -1
- package/dist/{chunk-2C7L3B3T.js → chunk-Z5KP6GBC.js} +4 -4
- package/dist/{chunk-LB474DMC.js → chunk-ZYQHIMZU.js} +5 -5
- package/dist/{codex-app-cards-switch-MZBLPDC5.js → codex-app-cards-switch-TSHQTVOY.js} +11 -12
- package/dist/{codex-card-routing-QMXQ3RRX.js → codex-card-routing-EZFQRLL5.js} +2 -2
- package/dist/{codex-desktop-launch-7H4COE7H.js → codex-desktop-launch-RBW6N6HI.js} +3 -3
- package/dist/{codex-session-launch-ZSY7FTS3.js → codex-session-launch-TERIKZPR.js} +21 -20
- package/dist/{config-PPMFPV2E.js → config-2AGEPXWU.js} +3 -3
- package/dist/{global-upgrade-RFXS76KH.js → global-upgrade-67DCWAOQ.js} +9 -9
- package/dist/{identity-SLRS7XIR.js → identity-QETOMF2L.js} +4 -4
- package/dist/{live-capabilities-4G46QNGE.js → live-capabilities-5UIO6P52.js} +4 -4
- package/dist/{paths-55IJMRJW.js → paths-IRWDFERG.js} +3 -3
- package/dist/reapply-BBNONPII.js +81 -0
- package/dist/src/index.js +33 -34
- package/dist/{upgrade-lock-UGPXSPSU.js → upgrade-lock-LICESK4W.js} +4 -4
- package/dist/{usage-YC6BB7BX.js → usage-CNCT5BGJ.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-B3FN4XL2.js +0 -44
- package/dist/reapply-HA6RLYRS.js +0 -76
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
ensureCodexTrustsPusharyHooks,
|
|
6
6
|
hermesHistoryNeedsTheCliHelper,
|
|
7
7
|
recordInstalledHermesHistoryHelper
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XPS36L6H.js";
|
|
9
9
|
import {
|
|
10
10
|
hermesReceiptPaths,
|
|
11
11
|
hermesSetupPredatesThePluginFolder,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
refreshHermesPluginFiles,
|
|
15
15
|
refreshOpenClawPlugin,
|
|
16
16
|
shippedHermesPlugin
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XUJBTEUC.js";
|
|
18
18
|
import {
|
|
19
19
|
fxIgnoresInstructionsFile,
|
|
20
20
|
fxInstructionsBody,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
macAppFxBridge,
|
|
24
24
|
refreshClineKey,
|
|
25
25
|
switchFxHttpEntryToBridge
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GP5UGODT.js";
|
|
27
27
|
import {
|
|
28
28
|
OPENCODE_HOOK_BINARY,
|
|
29
29
|
agentHookOwner,
|
|
@@ -36,16 +36,16 @@ import {
|
|
|
36
36
|
openCodePluginDir,
|
|
37
37
|
openCodeWired,
|
|
38
38
|
withOpenCodeAskRules
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-UVO56TVL.js";
|
|
40
40
|
import {
|
|
41
41
|
detectClaudeVersion
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-DVAXZOTR.js";
|
|
43
43
|
import {
|
|
44
44
|
addCompatibleHooks,
|
|
45
45
|
compatibleConfigFile,
|
|
46
46
|
compatibleInstructionsFile,
|
|
47
47
|
hasCompatibleHooks
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-X5R55HMM.js";
|
|
49
49
|
import {
|
|
50
50
|
GEMINI_HOOK_BINARY,
|
|
51
51
|
addGeminiHooks,
|
|
@@ -57,13 +57,13 @@ import {
|
|
|
57
57
|
geminiWired,
|
|
58
58
|
hasGeminiHooks,
|
|
59
59
|
planHooks
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-2EHLFIVK.js";
|
|
61
61
|
import {
|
|
62
62
|
transcriptsEnabled
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-UNF23P35.js";
|
|
64
64
|
import {
|
|
65
65
|
KEY_FILE_MODE
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-47NWTV5K.js";
|
|
67
67
|
import {
|
|
68
68
|
CLAUDE_CODE_PUSHARY_PERMISSION_RULES,
|
|
69
69
|
CLAUDE_HOOK_BINARY,
|
|
@@ -93,6 +93,8 @@ import {
|
|
|
93
93
|
codexRegistrationHolder,
|
|
94
94
|
codexVacatedIndexes,
|
|
95
95
|
dropVacatedCodexHookTrust,
|
|
96
|
+
embeddedClaudeMcpKey,
|
|
97
|
+
embeddedCodexMcpKey,
|
|
96
98
|
fxAgentsMd,
|
|
97
99
|
fxConfigDir,
|
|
98
100
|
fxMcpProfile,
|
|
@@ -108,9 +110,10 @@ import {
|
|
|
108
110
|
registrationHolderOf,
|
|
109
111
|
registrationSignatures,
|
|
110
112
|
renderAgentInstructions,
|
|
113
|
+
replaceCodexMcpEmbeddedKey,
|
|
111
114
|
supportedClaudeEvents,
|
|
112
115
|
vscodePluginMcp
|
|
113
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-WHFXXV2A.js";
|
|
114
117
|
import {
|
|
115
118
|
formatVersion
|
|
116
119
|
} from "./chunk-6ICPEJY5.js";
|
|
@@ -118,7 +121,7 @@ import {
|
|
|
118
121
|
hookCommandsUseBareNames,
|
|
119
122
|
resolveGlobalBinDir,
|
|
120
123
|
resolveGlobalBinary
|
|
121
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-IQBJD5ZB.js";
|
|
122
125
|
import {
|
|
123
126
|
readJsonSafe,
|
|
124
127
|
writeFileAtomic,
|
|
@@ -128,12 +131,12 @@ import {
|
|
|
128
131
|
HOOK_COMPATIBLE_PROFILES,
|
|
129
132
|
isCompatibleAgentType,
|
|
130
133
|
isRecord
|
|
131
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-GYLIVREZ.js";
|
|
132
135
|
|
|
133
136
|
// src/reapply.ts
|
|
134
137
|
import { dirname, join } from "path";
|
|
135
138
|
import { homedir } from "os";
|
|
136
|
-
import { readFileSync, statSync } from "fs";
|
|
139
|
+
import { existsSync, readFileSync, statSync } from "fs";
|
|
137
140
|
import { parse as parseTOML, stringify as stringifyTOML } from "smol-toml";
|
|
138
141
|
|
|
139
142
|
// src/reregister.ts
|
|
@@ -340,6 +343,46 @@ var reapplyCodexSettings = (apiKey, paths = {}, nativeOwnership = "preserve") =>
|
|
|
340
343
|
if (config === null) hooks = false;
|
|
341
344
|
return { configured: true, reapplied: hooks || mcp, hooks, mcp, failed, ...mcp && startedCommand ? { codexRestartRequired: true } : {} };
|
|
342
345
|
};
|
|
346
|
+
var embeddedKeyStepFor = (embedded, apiKey) => {
|
|
347
|
+
if (embedded.kind === "none") return "unchanged";
|
|
348
|
+
if (embedded.kind === "custom") return "left-alone";
|
|
349
|
+
return embedded.key === apiKey ? "unchanged" : "replace";
|
|
350
|
+
};
|
|
351
|
+
var refreshClaudeEmbeddedKey = (apiKey, claudeJsonPath = claudeJson()) => {
|
|
352
|
+
const read = readJsonSafe(claudeJsonPath);
|
|
353
|
+
if (read.kind === "missing") return "absent";
|
|
354
|
+
if (read.kind !== "ok" || !isRecord(read.value)) return "left-alone";
|
|
355
|
+
const config = read.value;
|
|
356
|
+
if (!hasPusharyMcp(config)) return "absent";
|
|
357
|
+
const step = embeddedKeyStepFor(embeddedClaudeMcpKey(config), apiKey);
|
|
358
|
+
if (step !== "replace") return step;
|
|
359
|
+
try {
|
|
360
|
+
addClaudeMcpServer(config, apiKey);
|
|
361
|
+
writeJsonAtomic(claudeJsonPath, config, KEY_FILE_MODE);
|
|
362
|
+
return "refreshed";
|
|
363
|
+
} catch {
|
|
364
|
+
return "failed";
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
var refreshCodexEmbeddedKey = (apiKey, configPath = codexConfigToml()) => {
|
|
368
|
+
if (!existsSync(configPath)) return "absent";
|
|
369
|
+
const config = readToml(configPath);
|
|
370
|
+
if (config === null) return "left-alone";
|
|
371
|
+
if (!isRecord(config.mcp_servers) || !isRecord(config.mcp_servers.pushary)) return "absent";
|
|
372
|
+
const step = embeddedKeyStepFor(embeddedCodexMcpKey(config), apiKey);
|
|
373
|
+
if (step !== "replace") return step;
|
|
374
|
+
try {
|
|
375
|
+
replaceCodexMcpEmbeddedKey(config, apiKey);
|
|
376
|
+
writeFileAtomic(configPath, stringifyTOML(config), modeToPreserve(configPath), "utf-8");
|
|
377
|
+
return "refreshed";
|
|
378
|
+
} catch {
|
|
379
|
+
return "failed";
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
var refreshEmbeddedAgentKeys = (apiKey, paths = {}) => ({
|
|
383
|
+
claude: refreshClaudeEmbeddedKey(apiKey, paths.claudeJsonPath),
|
|
384
|
+
codex: refreshCodexEmbeddedKey(apiKey, paths.codexConfigPath)
|
|
385
|
+
});
|
|
343
386
|
var repairCodexHolds = (paths = {}) => {
|
|
344
387
|
const idle = { configured: false, reapplied: false, hooks: false, mcp: false };
|
|
345
388
|
try {
|
|
@@ -590,6 +633,9 @@ export {
|
|
|
590
633
|
reapplyClaudeForVersion,
|
|
591
634
|
inspectConfiguredManagedProviders,
|
|
592
635
|
reapplyCodexSettings,
|
|
636
|
+
refreshClaudeEmbeddedKey,
|
|
637
|
+
refreshCodexEmbeddedKey,
|
|
638
|
+
refreshEmbeddedAgentKeys,
|
|
593
639
|
repairCodexHolds,
|
|
594
640
|
reapplyGeminiSettings,
|
|
595
641
|
reapplyCursorPlugin,
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-WHB622LP.js";
|
|
4
4
|
import {
|
|
5
5
|
ensureDaemonRunning
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IR342JX3.js";
|
|
7
7
|
import {
|
|
8
8
|
hookOwnerOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2EHLFIVK.js";
|
|
10
10
|
import {
|
|
11
11
|
hookMeaning
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YZRUE46K.js";
|
|
13
13
|
import {
|
|
14
14
|
buildTranscriptRecords,
|
|
15
15
|
changedRecipientsMessage,
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
uploadTranscriptRecords,
|
|
25
25
|
verifyAnchoredRecipients,
|
|
26
26
|
wrapSessionKey
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-DPOLLK6I.js";
|
|
28
28
|
import {
|
|
29
29
|
transcriptEnvironmentPreference,
|
|
30
30
|
transcriptsEnabled
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-UNF23P35.js";
|
|
32
32
|
import {
|
|
33
33
|
external_exports,
|
|
34
34
|
ownedOnlyByThisUser,
|
|
@@ -36,19 +36,19 @@ import {
|
|
|
36
36
|
} from "./chunk-P6DUWKAO.js";
|
|
37
37
|
import {
|
|
38
38
|
fetchAsCredential
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-SYCNMJ3Z.js";
|
|
40
40
|
import {
|
|
41
41
|
readTranscriptPreference
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-47NWTV5K.js";
|
|
43
43
|
import {
|
|
44
44
|
claudeConfigDir,
|
|
45
45
|
codexHome,
|
|
46
46
|
pusharyDir
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-WHFXXV2A.js";
|
|
48
48
|
import {
|
|
49
49
|
getApiKey,
|
|
50
50
|
getBaseUrl
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-5LE7C6Q2.js";
|
|
52
52
|
import {
|
|
53
53
|
writeJsonAtomic,
|
|
54
54
|
writeJsonAtomicDurable
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
isHookSource,
|
|
62
62
|
isRecord,
|
|
63
63
|
redactSecretsFromContent
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-GYLIVREZ.js";
|
|
65
65
|
|
|
66
66
|
// src/transcript-registration.ts
|
|
67
67
|
import { createHash as createHash4 } from "crypto";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cursorGateOwnsClaudeCall,
|
|
3
3
|
readCursorGateRegistration
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AOCTHK4E.js";
|
|
5
5
|
import {
|
|
6
6
|
registerTranscript
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TZO67S4V.js";
|
|
8
8
|
import {
|
|
9
9
|
namedEvent
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-X5R55HMM.js";
|
|
11
11
|
import {
|
|
12
12
|
writeDegraded
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-4LRWEHQT.js";
|
|
14
14
|
import {
|
|
15
15
|
claudeShapedHookInput,
|
|
16
16
|
hookCompatibleProfileBySource,
|
|
17
17
|
isGrokHookPayload,
|
|
18
18
|
isGrokSessionEndStop
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GYLIVREZ.js";
|
|
20
20
|
|
|
21
21
|
// src/tool-hook-input.ts
|
|
22
22
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode", "cursor_version"];
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
OPENCLAW_ENVIRONMENT_KEYS,
|
|
6
6
|
openClawEnvironmentOf,
|
|
7
7
|
openClawPathsFrom
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WHFXXV2A.js";
|
|
9
9
|
import {
|
|
10
10
|
resolvePathBinary
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IQBJD5ZB.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GYLIVREZ.js";
|
|
15
15
|
|
|
16
16
|
// src/openclaw/wiring-state.ts
|
|
17
17
|
var OPENCLAW_PLUGIN_ID = "pushary";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
openCodePluginArgv,
|
|
4
4
|
openCodePluginModule,
|
|
5
5
|
renderOpenCodePlugin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EKU4KLON.js";
|
|
7
7
|
import {
|
|
8
8
|
OPENCODE_FAILED_EVENT,
|
|
9
9
|
OPENCODE_IDLE_EVENT,
|
|
@@ -12,17 +12,17 @@ import {
|
|
|
12
12
|
OPENCODE_PLUGIN_SIBLING,
|
|
13
13
|
OPENCODE_PLUGIN_SIBLING_CONTENTS,
|
|
14
14
|
OPENCODE_SUBAGENT_IDLE_EVENT
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XIEYX4TJ.js";
|
|
16
16
|
import {
|
|
17
17
|
compatibleConfigFile
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-X5R55HMM.js";
|
|
19
19
|
import {
|
|
20
20
|
hookOwnerOf,
|
|
21
21
|
hookOwnerOfCommands
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2EHLFIVK.js";
|
|
23
23
|
import {
|
|
24
24
|
AGENT_CHOICES
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-NA5EQTCV.js";
|
|
26
26
|
import {
|
|
27
27
|
OPENCODE_INSTRUCTIONS_LABEL,
|
|
28
28
|
bridgeStub,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
resolveBridgeStub,
|
|
37
37
|
vscodePluginDir,
|
|
38
38
|
windowsNodeLauncherFor
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-WHFXXV2A.js";
|
|
40
40
|
import {
|
|
41
41
|
readJsonSafe
|
|
42
42
|
} from "./chunk-PM2NRK6Y.js";
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
OPENCODE_APPROVAL_EVENT,
|
|
47
47
|
hookCompatibleProfile,
|
|
48
48
|
isRecord
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-GYLIVREZ.js";
|
|
50
50
|
|
|
51
51
|
// src/opencode-config.ts
|
|
52
52
|
import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_RULES_PATH,
|
|
3
3
|
canChangeApprovalSettings
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WYYZ2UFX.js";
|
|
5
5
|
import {
|
|
6
6
|
callMcpTool
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZYQHIMZU.js";
|
|
8
8
|
import {
|
|
9
9
|
absoluteUrl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NOWWUX5V.js";
|
|
11
11
|
import {
|
|
12
12
|
getBaseUrl
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5LE7C6Q2.js";
|
|
14
14
|
import {
|
|
15
15
|
NPX_LATEST_COMMAND
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WZM7Y5HM.js";
|
|
17
17
|
import {
|
|
18
18
|
AGENT_STOP_DEFAULT_SECONDS,
|
|
19
19
|
APPROVAL_MODE_META,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
classifyConfirmResponse,
|
|
22
22
|
isAnswerSource,
|
|
23
23
|
roundTripAsk
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-GYLIVREZ.js";
|
|
25
25
|
|
|
26
26
|
// src/reach.ts
|
|
27
27
|
var PUSHARY_APP_DOWNLOAD_URL = "https://pushary.com/download";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
quoteIfNeeded,
|
|
7
7
|
shellDoubleQuoted
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IQBJD5ZB.js";
|
|
9
9
|
import {
|
|
10
10
|
writeFileAtomic
|
|
11
11
|
} from "./chunk-PM2NRK6Y.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
PUSHARY_HOSTS,
|
|
25
25
|
PUSHARY_TOOL_PREFIX,
|
|
26
26
|
withHookHoldBudget
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-GYLIVREZ.js";
|
|
28
28
|
|
|
29
29
|
// src/setup/paths.ts
|
|
30
30
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -226,6 +226,12 @@ var canonicalJson = (value) => {
|
|
|
226
226
|
return "{" + Object.keys(record).sort().map((key) => JSON.stringify(key) + ":" + canonicalJson(record[key])).join(",") + "}";
|
|
227
227
|
};
|
|
228
228
|
|
|
229
|
+
// src/embedded-mcp-key.ts
|
|
230
|
+
var NO_EMBEDDED_MCP_KEY = { kind: "none" };
|
|
231
|
+
var CUSTOM_EMBEDDED_MCP_KEY = { kind: "custom" };
|
|
232
|
+
var BEARER_PREFIX = "Bearer ";
|
|
233
|
+
var bearerKeyOf = (authorization) => typeof authorization === "string" && authorization.startsWith(BEARER_PREFIX) ? authorization.slice(BEARER_PREFIX.length).trim() : void 0;
|
|
234
|
+
|
|
229
235
|
// src/codex-config.ts
|
|
230
236
|
var CODEX_HOOK_BINARY = "pushary-codex-hook";
|
|
231
237
|
var codexHookCommand = (resolvedBinary, platform = process.platform) => guardBinary(resolvedBinary ?? CODEX_HOOK_BINARY, platform, windowsNodeLauncherFor(platform));
|
|
@@ -352,6 +358,14 @@ var readCodexMcpAuth = (config) => {
|
|
|
352
358
|
if (typeof pushary.bearer_token === "string") return { method: "legacy-bearer" };
|
|
353
359
|
return void 0;
|
|
354
360
|
};
|
|
361
|
+
var embeddedCodexMcpKey = (config) => {
|
|
362
|
+
const auth = readCodexMcpAuth(config);
|
|
363
|
+
if (auth?.method !== "embedded") return NO_EMBEDDED_MCP_KEY;
|
|
364
|
+
return asRecord2(asRecord2(config.mcp_servers)?.pushary)?.url === CODEX_MCP_URL ? { kind: "ours", key: auth.key } : CUSTOM_EMBEDDED_MCP_KEY;
|
|
365
|
+
};
|
|
366
|
+
var replaceCodexMcpEmbeddedKey = (config, apiKey) => {
|
|
367
|
+
ensureRecord(ensureRecord(ensureRecord(config, "mcp_servers"), "pushary"), "http_headers").Authorization = `Bearer ${apiKey}`;
|
|
368
|
+
};
|
|
355
369
|
var isPusharyCodexCommand = (command) => command.includes(CODEX_HOOK_BINARY) || command.includes(HOOK_LOCATOR_BINARY);
|
|
356
370
|
var isPusharyCommand = (hook, scope) => {
|
|
357
371
|
const command = String(asRecord2(hook)?.command ?? "");
|
|
@@ -832,6 +846,12 @@ var addClaudeMcpServer = (config, apiKey) => {
|
|
|
832
846
|
const mcpServers = ensureRecord2(config, "mcpServers");
|
|
833
847
|
mcpServers.pushary = pusharyMcpServer(apiKey);
|
|
834
848
|
};
|
|
849
|
+
var embeddedClaudeMcpKey = (config) => {
|
|
850
|
+
const entry2 = asRecord3(asRecord3(config.mcpServers)?.pushary);
|
|
851
|
+
const key = bearerKeyOf(asRecord3(entry2?.headers)?.Authorization);
|
|
852
|
+
if (key === void 0) return NO_EMBEDDED_MCP_KEY;
|
|
853
|
+
return isDeepStrictEqual(entry2, pusharyMcpServer(key)) ? { kind: "ours", key } : CUSTOM_EMBEDDED_MCP_KEY;
|
|
854
|
+
};
|
|
835
855
|
var isClaudeMcpSnapshot = (value) => {
|
|
836
856
|
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
837
857
|
const snapshot = value;
|
|
@@ -1400,6 +1420,8 @@ export {
|
|
|
1400
1420
|
codexMcpStartsCommand,
|
|
1401
1421
|
addCodexMcpServer,
|
|
1402
1422
|
readCodexMcpAuth,
|
|
1423
|
+
embeddedCodexMcpKey,
|
|
1424
|
+
replaceCodexMcpEmbeddedKey,
|
|
1403
1425
|
isPusharyCodexCommand,
|
|
1404
1426
|
codexRegistrationHolder,
|
|
1405
1427
|
addCodexHooks,
|
|
@@ -1439,6 +1461,7 @@ export {
|
|
|
1439
1461
|
allowsPusharyTools,
|
|
1440
1462
|
isPusharyHook,
|
|
1441
1463
|
addClaudeMcpServer,
|
|
1464
|
+
embeddedClaudeMcpKey,
|
|
1442
1465
|
isClaudeMcpSnapshot,
|
|
1443
1466
|
captureClaudeMcpServer,
|
|
1444
1467
|
updateClaudeMcpSnapshot,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
absoluteUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NOWWUX5V.js";
|
|
4
4
|
import {
|
|
5
5
|
KEY_SCOPE
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GYLIVREZ.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/approval-settings-pages.ts
|
|
9
9
|
var API_KEYS_PATH = "/dashboard/agent/settings";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseConfigDocument
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CIO6FAIU.js";
|
|
4
4
|
import {
|
|
5
5
|
addGeminiMcpServer,
|
|
6
6
|
removeGeminiMcpServer
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2EHLFIVK.js";
|
|
8
8
|
import {
|
|
9
9
|
CLAUDE_CODE_AGENT
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-N6ARPVSQ.js";
|
|
11
11
|
import {
|
|
12
12
|
compatibleToolLookup
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YZRUE46K.js";
|
|
14
14
|
import {
|
|
15
15
|
CLAUDE_HOOK_EVENTS,
|
|
16
16
|
PUSHARY_MCP_URL,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
isPusharyHook,
|
|
23
23
|
registerHookEntry,
|
|
24
24
|
removeClaudeMcpServers
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WHFXXV2A.js";
|
|
26
26
|
import {
|
|
27
27
|
AGENT_ENFORCEMENT,
|
|
28
28
|
HOOK_COMPATIBLE_PROFILES,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
pusharyMissingReason,
|
|
37
37
|
refusalOutput,
|
|
38
38
|
withHookHoldBudget
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-GYLIVREZ.js";
|
|
40
40
|
|
|
41
41
|
// src/compatible-config.ts
|
|
42
42
|
import { homedir } from "os";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
serviceNodeFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IR342JX3.js";
|
|
4
4
|
import {
|
|
5
5
|
OWNER_ONLY_FILE_MODE,
|
|
6
6
|
readOwnerOnlyJson
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
codexHome,
|
|
15
15
|
codexHooksJsonIn,
|
|
16
16
|
isPusharyCodexCommand
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WHFXXV2A.js";
|
|
18
18
|
import {
|
|
19
19
|
DEFAULT_WINDOWS_PATHEXT,
|
|
20
20
|
DIRECTLY_STARTABLE_EXTENSIONS,
|
|
21
21
|
plannedGlobalPackage,
|
|
22
22
|
readGlobalPrefix,
|
|
23
23
|
resolvePathBinary
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-IQBJD5ZB.js";
|
|
25
25
|
import {
|
|
26
26
|
getPackageVersion,
|
|
27
27
|
globalTranscriptRegisterEntry
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
uninstallOpenClawPlugin,
|
|
17
17
|
unsetOpenClawEntry,
|
|
18
18
|
writeOpenClawEntry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-UQB4MAA6.js";
|
|
20
20
|
import {
|
|
21
21
|
needsShell
|
|
22
22
|
} from "./chunk-3PSNUHC5.js";
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
openClawDirectoriesToLookIn,
|
|
29
29
|
openClawPluginFolder,
|
|
30
30
|
openClawSetupReceiptDirectory
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-WHFXXV2A.js";
|
|
32
32
|
import {
|
|
33
33
|
resolvePathBinary
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-IQBJD5ZB.js";
|
|
35
35
|
import {
|
|
36
36
|
readJsonSafe,
|
|
37
37
|
writeJsonAtomic
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
} from "./chunk-CXQWDQCJ.js";
|
|
43
43
|
import {
|
|
44
44
|
isRecord
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-GYLIVREZ.js";
|
|
46
46
|
|
|
47
47
|
// src/hermes/plugin-payload.ts
|
|
48
48
|
import { createHash } from "crypto";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
keyPrefix,
|
|
5
5
|
readConfigFileKey,
|
|
6
6
|
readMacAppKeyPrefix
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-47NWTV5K.js";
|
|
8
8
|
import {
|
|
9
9
|
NPX_LATEST_COMMAND
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WZM7Y5HM.js";
|
|
11
11
|
|
|
12
12
|
// src/key-signed-out.ts
|
|
13
13
|
var VERDICT_BY_CHECK = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
realpath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DVAXZOTR.js";
|
|
4
4
|
import {
|
|
5
5
|
findNativeClaudeInstall
|
|
6
6
|
} from "./chunk-TCE3J44Z.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
resolvePackageVersionFromBinary,
|
|
13
13
|
resolvePathBinary,
|
|
14
14
|
resolvePathBinaryAsync
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IQBJD5ZB.js";
|
|
16
16
|
import {
|
|
17
17
|
AGENTS,
|
|
18
18
|
CLAUDE_BRIDGE_CAPABILITY,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
OPENCODE_BRIDGE_CAPABILITY,
|
|
26
26
|
SPAWN_CAPABILITY,
|
|
27
27
|
sessionProvidersAdvertisedBy
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-GYLIVREZ.js";
|
|
29
29
|
|
|
30
30
|
// src/live-capabilities.ts
|
|
31
31
|
import { execFileSync } from "child_process";
|
|
@@ -4,21 +4,21 @@ import {
|
|
|
4
4
|
claimThrottle,
|
|
5
5
|
releaseThrottle,
|
|
6
6
|
reportEvent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-N6ARPVSQ.js";
|
|
8
8
|
import {
|
|
9
9
|
deriveToolTarget,
|
|
10
10
|
permissionDeniedAction
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YZRUE46K.js";
|
|
12
12
|
import {
|
|
13
13
|
projectNameFor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-S55XHTYZ.js";
|
|
15
15
|
import {
|
|
16
16
|
PERMISSION_ALLOWED_EVENT,
|
|
17
17
|
PERMISSION_DENIED_EVENT,
|
|
18
18
|
machineApprovalFor,
|
|
19
19
|
machineDecisionFor,
|
|
20
20
|
wireVerdictFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GYLIVREZ.js";
|
|
22
22
|
|
|
23
23
|
// src/machine-decision-audit.ts
|
|
24
24
|
var MACHINE_DECISION_REPORT_TIMEOUT_MS = 800;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchAsCredential
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SYCNMJ3Z.js";
|
|
4
4
|
import {
|
|
5
5
|
keyCheckFromResponse
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NOWWUX5V.js";
|
|
7
7
|
import {
|
|
8
8
|
installNetworkDefaults
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-S4AQUVX3.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5LE7C6Q2.js";
|
|
13
13
|
import {
|
|
14
14
|
isRecord,
|
|
15
15
|
isToolErrorResult,
|
|
16
16
|
toolFailureCodeOfResult
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GYLIVREZ.js";
|
|
18
18
|
|
|
19
19
|
// src/retry.ts
|
|
20
20
|
var isRetryable = (err) => {
|