pushary 1.9.266 → 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 +12 -0
- package/dist/{api-6HVKVLYN.js → api-2PD4GLZO.js} +14 -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 +32 -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-IHLT622L.js → chunk-26K5VC53.js} +1 -1
- package/dist/{chunk-CV63IDIE.js → chunk-2EHLFIVK.js} +4 -4
- package/dist/{chunk-2SWQRNPR.js → chunk-2FI62SKT.js} +1 -1
- package/dist/{chunk-OCQ6Y7NI.js → chunk-47NWTV5K.js} +45 -13
- package/dist/{chunk-RBM5PLKI.js → chunk-4LRWEHQT.js} +69 -6
- package/dist/{chunk-RCMMMQSJ.js → chunk-4ZSC56SL.js} +1 -1
- package/dist/{chunk-3JYLC2WN.js → chunk-5LE7C6Q2.js} +2 -2
- package/dist/{chunk-VDTJEVMG.js → chunk-5WSFZXR6.js} +2 -2
- package/dist/{chunk-CKKCIMJM.js → chunk-AOCTHK4E.js} +3 -3
- package/dist/{chunk-Y6X73WXC.js → chunk-AQP5SMAF.js} +2 -2
- package/dist/{chunk-4MUKWLYS.js → chunk-AQPA4YIB.js} +1 -1
- package/dist/{chunk-WMV4MDYA.js → chunk-AT3C3Z3M.js} +7 -7
- package/dist/{chunk-77QY3M7Z.js → chunk-AXVLRYIK.js} +1 -1
- package/dist/{chunk-Q3TS5VKY.js → chunk-BQ23UZJY.js} +5 -5
- package/dist/{chunk-WT2XF4CO.js → chunk-CIO6FAIU.js} +1 -1
- package/dist/{chunk-CMODL5RR.js → chunk-DC35GPRY.js} +8 -8
- package/dist/{chunk-SUEN6I24.js → chunk-DJYBACUW.js} +1 -1
- package/dist/{chunk-OYUCP6IN.js → chunk-DPOLLK6I.js} +3 -3
- package/dist/{chunk-ZJOVWZJ4.js → chunk-DVAXZOTR.js} +1 -1
- package/dist/{chunk-VDHRFPX2.js → chunk-EKU4KLON.js} +1 -1
- package/dist/{chunk-Z2UGEG75.js → chunk-ERE3R6SS.js} +4 -4
- package/dist/{chunk-NSMO7QPG.js → chunk-FF2LDPB2.js} +4 -4
- package/dist/{chunk-DIESQCCP.js → chunk-FFWESSEY.js} +4 -4
- package/dist/{chunk-OOFSQMMB.js → chunk-FHCXJ2HZ.js} +5 -5
- package/dist/{chunk-QIXZJA4Z.js → chunk-FK4BFIFR.js} +5 -5
- package/dist/{chunk-GLPZVUDH.js → chunk-GCDVD242.js} +6 -6
- package/dist/{chunk-WXWZ5LBE.js → chunk-GEBRKBLB.js} +5 -5
- package/dist/{chunk-T672PUVP.js → chunk-GMQ73QWC.js} +16 -16
- package/dist/{chunk-LEUXJOX6.js → chunk-GP5UGODT.js} +5 -5
- package/dist/{chunk-WOSJT4NA.js → chunk-GPEGT2EP.js} +1 -1
- package/dist/{chunk-WQDX276X.js → chunk-GYLIVREZ.js} +32 -0
- package/dist/{chunk-KW32GJSQ.js → chunk-HEAJBTIG.js} +1 -1
- package/dist/{chunk-UMQCCVEI.js → chunk-HPLG5D6Y.js} +5 -5
- package/dist/{chunk-VM3BJUKF.js → chunk-HSX5EVPH.js} +2 -2
- package/dist/{chunk-6Q77W6D7.js → chunk-IEQDAZDB.js} +2 -2
- package/dist/{chunk-SWHJRTCT.js → chunk-IQBJD5ZB.js} +4 -4
- package/dist/{chunk-RBIDBSHI.js → chunk-IR342JX3.js} +6 -6
- package/dist/{chunk-4SRBFGPG.js → chunk-JQCF2IYA.js} +1 -1
- package/dist/{chunk-GHPBR545.js → chunk-JSE7T4JL.js} +1 -1
- package/dist/{chunk-RIKMC6JA.js → chunk-JXWWWVGR.js} +10 -10
- package/dist/{chunk-MKHTIXOB.js → chunk-KQZQ55CO.js} +4 -4
- package/dist/{chunk-6V7WJK5B.js → chunk-KVCWPOF6.js} +8 -5
- package/dist/{chunk-TAP2MUPA.js → chunk-L6CWEU5C.js} +2 -2
- package/dist/{chunk-KRJHE353.js → chunk-LF5OEQNP.js} +2 -2
- package/dist/{chunk-G4PVFXAT.js → chunk-LYBX463S.js} +2 -2
- package/dist/{chunk-QX2WZ6NB.js → chunk-M2ETE6JQ.js} +1 -1
- package/dist/{chunk-3G4HNQA6.js → chunk-N6ARPVSQ.js} +90 -83
- package/dist/{chunk-ARJH7TUY.js → chunk-NA5EQTCV.js} +1 -1
- package/dist/{chunk-EUFKPNZF.js → chunk-NAVHNIM4.js} +1 -1
- package/dist/{chunk-RFZXAPIN.js → chunk-NOWWUX5V.js} +3 -3
- package/dist/{chunk-5UDPKOWF.js → chunk-NRTSHLZQ.js} +6 -6
- package/dist/{chunk-RTHHTOSN.js → chunk-NYP2NRV3.js} +1 -1
- package/dist/{chunk-DGE5W756.js → chunk-O2X6KT7P.js} +4 -4
- package/dist/{chunk-E2ODJUS6.js → chunk-P6AKOYLZ.js} +4 -4
- package/dist/{chunk-4DI66ZHF.js → chunk-QJHOS33W.js} +5 -5
- package/dist/{chunk-5LJHKXLN.js → chunk-S2DKGGEL.js} +5 -5
- package/dist/{chunk-BZ6E2ZJ3.js → chunk-S4AQUVX3.js} +3 -3
- package/dist/{chunk-5Z63DAD6.js → chunk-S55XHTYZ.js} +1 -1
- package/dist/{chunk-5A65MMYW.js → chunk-SYCNMJ3Z.js} +1 -1
- package/dist/{chunk-YIP2LG47.js → chunk-SYEUQH6Z.js} +3 -3
- package/dist/{chunk-FTWC3YL5.js → chunk-TEFLCQO4.js} +1 -1
- package/dist/{chunk-PDBABOA2.js → chunk-TKMOPFZS.js} +3 -3
- package/dist/{chunk-3WNCR4KH.js → chunk-TOELRIWR.js} +59 -13
- package/dist/{chunk-6IG4XWEM.js → chunk-TZO67S4V.js} +10 -10
- package/dist/{chunk-O6UNU4NB.js → chunk-U2OB44U5.js} +5 -5
- package/dist/{chunk-YVXQXWP4.js → chunk-UNF23P35.js} +1 -1
- package/dist/{chunk-SAS22USY.js → chunk-UQB4MAA6.js} +3 -3
- package/dist/{chunk-I4GD3T6R.js → chunk-UVO56TVL.js} +7 -7
- package/dist/{chunk-PKA7UXDK.js → chunk-V2UGSM45.js} +6 -6
- package/dist/{chunk-R5BKLVFA.js → chunk-WCEP3U7C.js} +1 -1
- package/dist/{chunk-IPBJJCEC.js → chunk-WHFXXV2A.js} +25 -2
- package/dist/{chunk-ZEPZMXJH.js → chunk-WYYZ2UFX.js} +2 -2
- package/dist/{chunk-AMV2AVTB.js → chunk-WZM7Y5HM.js} +1 -1
- package/dist/{chunk-QXSMS7IR.js → chunk-X5R55HMM.js} +6 -6
- package/dist/{chunk-VZKJU6TX.js → chunk-XIEYX4TJ.js} +1 -1
- package/dist/{chunk-HVEOTPRU.js → chunk-XPS36L6H.js} +3 -3
- package/dist/{chunk-6LDMEN7P.js → chunk-XUJBTEUC.js} +4 -4
- package/dist/{chunk-XWWBOTJX.js → chunk-YBAU5TAV.js} +2 -2
- package/dist/{chunk-ISVO2KSM.js → chunk-YGCU6KMO.js} +3 -3
- package/dist/{chunk-TXVWUYJC.js → chunk-YZRUE46K.js} +1 -1
- package/dist/{chunk-SVU7OCV4.js → chunk-Z5KP6GBC.js} +4 -4
- package/dist/{chunk-MJNRULIV.js → chunk-ZYQHIMZU.js} +5 -5
- package/dist/{codex-app-cards-switch-QTAMDVPU.js → codex-app-cards-switch-TSHQTVOY.js} +11 -12
- package/dist/{codex-card-routing-MDIJ7WTX.js → codex-card-routing-EZFQRLL5.js} +2 -2
- package/dist/{codex-desktop-launch-4AC7JUSA.js → codex-desktop-launch-RBW6N6HI.js} +3 -3
- package/dist/{codex-session-launch-4ZLEBUHB.js → codex-session-launch-TERIKZPR.js} +21 -20
- package/dist/{config-SDTBVASN.js → config-2AGEPXWU.js} +3 -3
- package/dist/{global-upgrade-EBANNXIB.js → global-upgrade-67DCWAOQ.js} +9 -9
- package/dist/{identity-AJ7EIESJ.js → identity-QETOMF2L.js} +4 -4
- package/dist/{live-capabilities-G662M2ZR.js → live-capabilities-5UIO6P52.js} +4 -4
- package/dist/{paths-G53BK3IS.js → paths-IRWDFERG.js} +3 -3
- package/dist/reapply-BBNONPII.js +81 -0
- package/dist/src/index.js +33 -34
- package/dist/{upgrade-lock-7ATRPVWH.js → upgrade-lock-LICESK4W.js} +4 -4
- package/dist/{usage-EYJ5KBHE.js → usage-CNCT5BGJ.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-CYK2K3SB.js +0 -44
- package/dist/reapply-6U2BGHTD.js +0 -76
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NA5EQTCV.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
6
|
} from "./chunk-BZIBNSQE.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-CINBAX5G.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WZM7Y5HM.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_CONNECTOR_GUIDE,
|
|
15
15
|
CLAUDE_CONNECTOR_STEPS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
CLAUDE_CONNECTOR_URL,
|
|
18
18
|
COWORK_CONNECTOR_LIMIT,
|
|
19
19
|
COWORK_STANDING_INSTRUCTIONS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GYLIVREZ.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -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;
|