@pushary/agent-hooks 1.9.153 → 1.9.154
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 +6 -0
- package/dist/{api-CP25UREX.js → api-U7VCJ5IJ.js} +9 -9
- package/dist/bin/pushary-audit.js +2 -2
- package/dist/bin/pushary-bell-hook.js +22 -22
- package/dist/bin/pushary-bell.js +10 -10
- package/dist/bin/pushary-claude.js +20 -20
- package/dist/bin/pushary-clean.js +31 -31
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +27 -27
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +11 -11
- package/dist/bin/pushary-connect.js +26 -26
- package/dist/bin/pushary-cowork.js +3 -3
- package/dist/bin/pushary-daemon.js +38 -38
- package/dist/bin/pushary-disconnect.js +22 -22
- package/dist/bin/pushary-display-hook.js +42 -40
- package/dist/bin/pushary-doctor.js +37 -37
- package/dist/bin/pushary-elicitation-hook.js +22 -22
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +25 -25
- package/dist/bin/pushary-hook.js +28 -28
- package/dist/bin/pushary-login.js +19 -19
- package/dist/bin/pushary-logout.js +21 -21
- package/dist/bin/pushary-mcp.js +10 -10
- package/dist/bin/pushary-mode.js +14 -14
- package/dist/bin/pushary-notification-hook.js +21 -21
- package/dist/bin/pushary-opencode-hook.js +24 -24
- package/dist/bin/pushary-permission-denied-hook.js +27 -27
- package/dist/bin/pushary-permission-hook.js +27 -27
- package/dist/bin/pushary-post-hook.js +22 -22
- package/dist/bin/pushary-prompt-hook.js +21 -21
- package/dist/bin/pushary-session-end-hook.js +21 -21
- package/dist/bin/pushary-session-start-hook.js +31 -31
- package/dist/bin/pushary-setup.js +53 -62
- package/dist/bin/pushary-stats.js +3 -3
- package/dist/bin/pushary-status.js +27 -27
- package/dist/bin/pushary-stop-hook.js +21 -21
- package/dist/bin/pushary-stopfailure-hook.js +21 -21
- package/dist/bin/pushary-suggestions.js +14 -14
- package/dist/bin/pushary-transcript-register.js +13 -13
- package/dist/bin/pushary-transcripts.js +21 -21
- package/dist/bin/pushary-upgrade.js +37 -38
- package/dist/bin/pushary-wait.js +14 -14
- package/dist/bin/pushary.js +6 -6
- package/dist/{chunk-V7EEPW7U.js → chunk-2GHUVGB5.js} +2 -2
- package/dist/{chunk-XMJRSL5A.js → chunk-3OWCINUY.js} +8 -8
- package/dist/{chunk-K3RPTQGZ.js → chunk-4E6PCUYJ.js} +7 -1
- package/dist/{chunk-7BXROUKN.js → chunk-6DAAURLB.js} +1 -1
- package/dist/{chunk-ZMTMAKZI.js → chunk-6EOSF7WR.js} +7 -7
- package/dist/{chunk-NGGBXN6M.js → chunk-6TBHP6RP.js} +4 -4
- package/dist/{chunk-KORCPXUS.js → chunk-6VMXXBSZ.js} +3 -3
- package/dist/{chunk-7MI43W6R.js → chunk-7LOWA7WF.js} +2 -2
- package/dist/{chunk-6RB6DG5U.js → chunk-AIQRVNWO.js} +5 -5
- package/dist/{chunk-6QFTOGXF.js → chunk-AM5FQTVF.js} +1 -1
- package/dist/{chunk-TQDJSQTK.js → chunk-BKG7F3AY.js} +3 -3
- package/dist/{chunk-JJYIPQPG.js → chunk-BR5Z4FYW.js} +1 -1
- package/dist/{chunk-JTB3DC7H.js → chunk-C6KJ3X7U.js} +4 -4
- package/dist/{chunk-44BHQL5D.js → chunk-DGLRLNQZ.js} +1 -1
- package/dist/{chunk-N7ADBRB6.js → chunk-DWWR4G3U.js} +2 -2
- package/dist/{chunk-6QVR763H.js → chunk-E2H5IGMP.js} +2 -2
- package/dist/{chunk-OHKGBJ4O.js → chunk-ESATURKU.js} +3 -3
- package/dist/{chunk-D7DN5DXL.js → chunk-EUAMAIHV.js} +1 -1
- package/dist/{chunk-G6QERYOX.js → chunk-F6EPRJDF.js} +2 -2
- package/dist/{chunk-A5CQZKTQ.js → chunk-FFFAXIYH.js} +11 -9
- package/dist/{chunk-5M2AA3G3.js → chunk-FUZ3KIA2.js} +1 -1
- package/dist/{chunk-VND6AFTY.js → chunk-H7TZUYPP.js} +3 -3
- package/dist/{chunk-DXCYJHL4.js → chunk-KCDOQU2Y.js} +4 -4
- package/dist/{chunk-YM2T76UM.js → chunk-KMOVQIU7.js} +7 -2
- package/dist/{chunk-E3P63UWQ.js → chunk-L7KV5SEW.js} +1 -1
- package/dist/{chunk-GJQKDHO3.js → chunk-LJQKVACR.js} +4 -4
- package/dist/{chunk-RZC7MMY2.js → chunk-LQFGVGHE.js} +1 -1
- package/dist/{chunk-DHA32CH3.js → chunk-LQZYHSDL.js} +3 -3
- package/dist/{chunk-3PAXV5AO.js → chunk-LROV5XIM.js} +5 -5
- package/dist/{chunk-AZ7225CM.js → chunk-MIWMGFYJ.js} +1 -1
- package/dist/{chunk-AGZW3MDV.js → chunk-MPNAKEEI.js} +1 -1
- package/dist/{chunk-KL7LGD57.js → chunk-MRAC3IOW.js} +1 -1
- package/dist/{chunk-UZVU4ZOC.js → chunk-MVPRF6G3.js} +2 -2
- package/dist/{chunk-VZKX3B7B.js → chunk-O2DQIATJ.js} +1 -1
- package/dist/{chunk-SIEPFBGO.js → chunk-O5KXQCKS.js} +2 -2
- package/dist/{chunk-OTYRLDKJ.js → chunk-OKOEWPAM.js} +5 -5
- package/dist/{chunk-A5QLHC5S.js → chunk-PW2ZTLGS.js} +1 -1
- package/dist/{chunk-VBQU3OFQ.js → chunk-QIZO2G57.js} +2 -2
- package/dist/{chunk-XOBZSFHN.js → chunk-QPOYAD62.js} +1 -1
- package/dist/{chunk-XMKNE4XR.js → chunk-QV6HCQ2K.js} +10 -10
- package/dist/{chunk-OEQFFPBU.js → chunk-QZ4YXAKG.js} +22 -23
- package/dist/{chunk-HJDNDZQI.js → chunk-RCTJEXGN.js} +5 -5
- package/dist/{chunk-I54ERZRS.js → chunk-RKBWMWPM.js} +2 -2
- package/dist/{chunk-ALTCTVBD.js → chunk-ROBVIQWZ.js} +1 -1
- package/dist/{chunk-D5HE7ZE7.js → chunk-RUVSBWXC.js} +2 -2
- package/dist/{chunk-6FLI6ZLI.js → chunk-STDH6IE7.js} +4 -4
- package/dist/{chunk-7GQMN55L.js → chunk-TJUUA3NF.js} +2 -2
- package/dist/{chunk-YXR2LIDZ.js → chunk-TVD6FKNF.js} +6 -6
- package/dist/{chunk-VBKU5ICI.js → chunk-UNHFYYUM.js} +2 -2
- package/dist/{chunk-KNXFZWYU.js → chunk-UWPNSMAA.js} +10 -8
- package/dist/{chunk-FLDVCVHA.js → chunk-VNODGGX7.js} +1 -1
- package/dist/{chunk-6ZWHFTGD.js → chunk-X64VKAZJ.js} +3 -3
- package/dist/{chunk-MXYCC6TR.js → chunk-X6LMBS26.js} +1 -1
- package/dist/{chunk-44OIS5QI.js → chunk-X7IKZNRX.js} +4 -4
- package/dist/{chunk-HWUMQCKI.js → chunk-XBUFMVU7.js} +7 -7
- package/dist/{chunk-AHLKBYZN.js → chunk-XWJVSAVU.js} +2 -2
- package/dist/{chunk-HJW4HIGB.js → chunk-YMCLBYAQ.js} +1 -1
- package/dist/{chunk-WDO3YKVN.js → chunk-YOCSXG3N.js} +3 -3
- package/dist/{chunk-UOJQZ7L5.js → chunk-ZFYZV7WG.js} +12 -12
- package/dist/{chunk-FOU4YBB6.js → chunk-ZGTQW6XD.js} +3 -3
- package/dist/{chunk-4DGCCNVG.js → chunk-ZJMS2BWD.js} +1 -1
- package/dist/{chunk-F2XOMBVP.js → chunk-ZKFYBNHA.js} +5 -5
- package/dist/{chunk-K5QMB6A7.js → chunk-ZO2GP56D.js} +6 -23
- package/dist/{chunk-HLMDINWY.js → chunk-ZWLH3BXV.js} +2 -2
- package/dist/{chunk-6BUQ6KQ3.js → chunk-ZYAPD2XN.js} +7 -7
- package/dist/{chunk-7PKA5C7Z.js → chunk-ZZFNKGFE.js} +4 -4
- package/dist/{codex-app-cards-switch-FPUS5HGR.js → codex-app-cards-switch-GNJRPEMD.js} +10 -10
- package/dist/{codex-desktop-launch-K22UOYK4.js → codex-desktop-launch-5YZ4WCA4.js} +1 -1
- package/dist/{codex-session-launch-UALDJWDA.js → codex-session-launch-P3ZUEJQI.js} +15 -15
- package/dist/{config-37VCCNI3.js → config-HOIM5RUY.js} +3 -2
- package/dist/{global-upgrade-P6UR6T67.js → global-upgrade-3TX5MDOW.js} +8 -8
- package/dist/{identity-VKL2KE5Y.js → identity-J2AVMZVV.js} +3 -3
- package/dist/{live-capabilities-YKXXTWIP.js → live-capabilities-CRNMW6RF.js} +3 -3
- package/dist/{paths-P5H3NCEO.js → paths-BWOEOPPJ.js} +2 -2
- package/dist/{reapply-MLREXGHX.js → reapply-QQGXNOW5.js} +24 -24
- package/dist/src/index.js +27 -27
- package/dist/{upgrade-lock-HBLAJ7ID.js → upgrade-lock-ET4ON56I.js} +3 -5
- package/dist/{usage-6E3PTA6F.js → usage-NVLSP3QT.js} +2 -2
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
uploadTranscriptRecords,
|
|
11
11
|
verifyAnchoredRecipients,
|
|
12
12
|
wrapSessionKey
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZJMS2BWD.js";
|
|
14
14
|
|
|
15
15
|
// src/live-session.ts
|
|
16
16
|
var LIVE_TRANSCRIPT_LIMITS = { queuedRecords: 100, recordCharacters: 32 * 1024 };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YMCLBYAQ.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-YU2EUD7O.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FUZ3KIA2.js";
|
|
10
10
|
import {
|
|
11
11
|
getPackageVersion
|
|
12
12
|
} from "./chunk-WIIMW5YO.js";
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
isLocalQuestionHandoff,
|
|
8
8
|
unavailableQuestionUnlessRefused,
|
|
9
9
|
waitForQuestion
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6TBHP6RP.js";
|
|
11
11
|
import {
|
|
12
12
|
getMachineId
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YMCLBYAQ.js";
|
|
14
14
|
import {
|
|
15
15
|
hookWaitClamped,
|
|
16
16
|
hookWaitDeadline,
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
configFailureKind,
|
|
5
5
|
retryAgentCommand,
|
|
6
6
|
writeSetupConfigFile
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-E2H5IGMP.js";
|
|
8
8
|
import {
|
|
9
9
|
MCP_BRIDGE_BINARY
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UNHFYYUM.js";
|
|
11
11
|
import {
|
|
12
12
|
KEY_FILE_MODE
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7LOWA7WF.js";
|
|
14
14
|
import {
|
|
15
15
|
CLINE_SERVER_NAME_TAKEN,
|
|
16
16
|
CLINE_SETTINGS_REFUSALS,
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
withClinePusharyServer,
|
|
33
33
|
withRefreshedClineKey,
|
|
34
34
|
withoutClinePusharyServer
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-X6LMBS26.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveGlobalBinary
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-QZ4YXAKG.js";
|
|
39
39
|
import {
|
|
40
40
|
readJsonSafe,
|
|
41
41
|
writeFileAtomic,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-ORELODI4.js";
|
|
4
4
|
import {
|
|
5
5
|
BELL_HOOK_BINARY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QPOYAD62.js";
|
|
7
7
|
import {
|
|
8
8
|
CLAUDE_HOOK_EVENTS,
|
|
9
9
|
CODEX_HOOK_EVENTS,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
isBridgeLocator,
|
|
17
17
|
isProtectedByScope,
|
|
18
18
|
registerHookEntry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-X6LMBS26.js";
|
|
20
20
|
import {
|
|
21
21
|
CURSOR_GATE_EVENTS,
|
|
22
22
|
HOOK_BUDGETS,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RKBWMWPM.js";
|
|
4
4
|
import {
|
|
5
5
|
hermesReceiptPaths,
|
|
6
6
|
hermesSetupPredatesThePluginFolder,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
refreshHermesPluginFiles,
|
|
10
10
|
refreshOpenClawPlugin,
|
|
11
11
|
shippedHermesPlugin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6VMXXBSZ.js";
|
|
13
13
|
import {
|
|
14
14
|
fxIgnoresInstructionsFile,
|
|
15
15
|
fxInstructionsBody,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
macAppFxBridge,
|
|
19
19
|
refreshClineKey,
|
|
20
20
|
switchFxHttpEntryToBridge
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OKOEWPAM.js";
|
|
22
22
|
import {
|
|
23
23
|
OPENCODE_HOOK_BINARY,
|
|
24
24
|
agentHookOwner,
|
|
@@ -30,16 +30,16 @@ import {
|
|
|
30
30
|
openCodePluginDir,
|
|
31
31
|
openCodeWired,
|
|
32
32
|
withOpenCodeAskRules
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-ZGTQW6XD.js";
|
|
34
34
|
import {
|
|
35
35
|
detectClaudeVersion
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-PW2ZTLGS.js";
|
|
37
37
|
import {
|
|
38
38
|
addCompatibleHooks,
|
|
39
39
|
compatibleConfigFile,
|
|
40
40
|
compatibleInstructionsFile,
|
|
41
41
|
hasCompatibleHooks
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-LQZYHSDL.js";
|
|
43
43
|
import {
|
|
44
44
|
GEMINI_HOOK_BINARY,
|
|
45
45
|
addGeminiHooks,
|
|
@@ -51,10 +51,10 @@ import {
|
|
|
51
51
|
geminiWired,
|
|
52
52
|
hasGeminiHooks,
|
|
53
53
|
planHooks
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-QIZO2G57.js";
|
|
55
55
|
import {
|
|
56
56
|
KEY_FILE_MODE
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-7LOWA7WF.js";
|
|
58
58
|
import {
|
|
59
59
|
CLAUDE_CODE_PUSHARY_PERMISSION_RULES,
|
|
60
60
|
CLAUDE_HOOK_BINARY,
|
|
@@ -102,13 +102,13 @@ import {
|
|
|
102
102
|
renderAgentInstructions,
|
|
103
103
|
supportedClaudeEvents,
|
|
104
104
|
vscodePluginMcp
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-X6LMBS26.js";
|
|
106
106
|
import {
|
|
107
107
|
formatVersion,
|
|
108
108
|
hookCommandsUseBareNames,
|
|
109
109
|
resolveGlobalBinDir,
|
|
110
110
|
resolveGlobalBinary
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-QZ4YXAKG.js";
|
|
112
112
|
import {
|
|
113
113
|
readJsonSafe,
|
|
114
114
|
writeFileAtomic,
|
|
@@ -8,9 +8,13 @@ import {
|
|
|
8
8
|
globalInstallTarget,
|
|
9
9
|
globalPackageFolder,
|
|
10
10
|
globalRootFor,
|
|
11
|
+
isNewerVersion,
|
|
11
12
|
isReleaseVersion,
|
|
12
13
|
ownPackageName
|
|
13
14
|
} from "./chunk-WIIMW5YO.js";
|
|
15
|
+
import {
|
|
16
|
+
redactSecretsFromContent
|
|
17
|
+
} from "./chunk-BEYMW4FP.js";
|
|
14
18
|
|
|
15
19
|
// src/shell-quote.ts
|
|
16
20
|
var shellDoubleQuoted = (text) => `"${text.replace(/(["\\$`])/g, "\\$1")}"`;
|
|
@@ -22,7 +26,6 @@ import { existsSync, readFileSync, readlinkSync, realpathSync } from "fs";
|
|
|
22
26
|
import { dirname, isAbsolute, join, relative, resolve, win32 } from "path";
|
|
23
27
|
var latestReleaseUrl = (packageName) => `https://registry.npmjs.org/${packageName}/latest`;
|
|
24
28
|
var REGISTRY_TIMEOUT_MS = 5e3;
|
|
25
|
-
var LATEST_TAG = "latest";
|
|
26
29
|
var cleanNpmEnv = () => {
|
|
27
30
|
const env = {};
|
|
28
31
|
for (const [key, value] of Object.entries(process.env)) {
|
|
@@ -33,10 +36,9 @@ var cleanNpmEnv = () => {
|
|
|
33
36
|
};
|
|
34
37
|
var NPM_ERROR_METADATA = /^(code|syscall|path|dest|errno)\s/i;
|
|
35
38
|
var npmErrorMessage = (err) => {
|
|
36
|
-
const
|
|
37
|
-
const text = [e?.stderr, e?.stdout].map((part) => part ? part.toString() : "").join("\n");
|
|
39
|
+
const text = errorTextOf(err, ["stderr", "stdout"]).join("\n");
|
|
38
40
|
const line = text.split("\n").map((l) => l.replace(/^npm error\s*/i, "").trim()).find((l) => l && !l.startsWith("A complete log") && !NPM_ERROR_METADATA.test(l));
|
|
39
|
-
return line ||
|
|
41
|
+
return redactSecretsFromContent(line || errorTextOf(err, ["message"])[0] || String(err));
|
|
40
42
|
};
|
|
41
43
|
var execNpm = (args, options = {}) => {
|
|
42
44
|
return execSync(`npm ${args}`, {
|
|
@@ -196,9 +198,9 @@ var NpmReleaseAgeError = class extends NpmInstallError {
|
|
|
196
198
|
};
|
|
197
199
|
var NPM_PERMISSION_CODE = /\b(EACCES|EPERM)\b/;
|
|
198
200
|
var ERROR_TEXT_FIELDS = ["code", "stderr", "stdout", "message"];
|
|
199
|
-
var errorTextOf = (err) => {
|
|
201
|
+
var errorTextOf = (err, fields = ERROR_TEXT_FIELDS) => {
|
|
200
202
|
if (typeof err !== "object" || err === null) return [String(err)];
|
|
201
|
-
return
|
|
203
|
+
return fields.flatMap((field) => {
|
|
202
204
|
const value = Reflect.get(err, field);
|
|
203
205
|
return typeof value === "string" || Buffer.isBuffer(value) ? [value.toString()] : [];
|
|
204
206
|
});
|
|
@@ -222,12 +224,6 @@ var npmExitedOnItsOwn = (error) => {
|
|
|
222
224
|
return typeof status === "number" && Number.isSafeInteger(status) && status > 0 && !npmWasKilledBySignal(error);
|
|
223
225
|
};
|
|
224
226
|
var npmExitedOnReleaseAge = (error) => npmExitedOnItsOwn(error) && isNpmReleaseAgeFailure(error);
|
|
225
|
-
var NPM_VERSION_UNAVAILABLE = /\b(ETARGET|E404)\b/;
|
|
226
|
-
var npmExitedBeforeInstalling = (error) => npmExitedOnItsOwn(error) && errorTextOf(error).some((text) => NPM_VERSION_UNAVAILABLE.test(text));
|
|
227
|
-
var npmExitedOnPermissionDenied = (err, platform) => {
|
|
228
|
-
const code = npmPermissionCodeOf(err);
|
|
229
|
-
return code !== null && npmPermissionFailureKind(code, platform) === "global-prefix" && !npmWasKilledBySignal(err);
|
|
230
|
-
};
|
|
231
227
|
var npmInstallFailure = (err, platform = process.platform) => {
|
|
232
228
|
if (npmExitedOnReleaseAge(err)) return new NpmReleaseAgeError(npmErrorMessage(err));
|
|
233
229
|
const code = npmPermissionCodeOf(err);
|
|
@@ -408,6 +404,7 @@ var installPackageGlobally = (request, runNpm = execNpm) => {
|
|
|
408
404
|
runNpm(`install -g --no-workspaces${prefixFlag} ${spec}`, { timeout: request.timeoutMs });
|
|
409
405
|
};
|
|
410
406
|
var needsGlobalInstall = (requested, installed, binaryPresent) => requested !== installed || !binaryPresent;
|
|
407
|
+
var setupWouldDowngrade = (requested, installed) => installed !== void 0 && isReleaseVersion(installed) && isReleaseVersion(requested) && isNewerVersion(installed, requested);
|
|
411
408
|
var planGlobalInstall = (platform) => {
|
|
412
409
|
const prefix = readGlobalPrefix();
|
|
413
410
|
const owner = prefix === void 0 ? NPM_UNAVAILABLE_OWNER : readCommandOwner(prefix, platform);
|
|
@@ -421,28 +418,33 @@ var installedVersionOf = (prefix, name, platform) => {
|
|
|
421
418
|
var asCachedResult = (result) => result === "installed" ? "cached" : result;
|
|
422
419
|
var installState;
|
|
423
420
|
var installGlobally = (options) => {
|
|
421
|
+
if (!isReleaseVersion(options.version) || options.version === "0.0.0") {
|
|
422
|
+
return Promise.reject(new NpmInstallError("Setup requires a known release version. Run an official versioned release; no global package was installed."));
|
|
423
|
+
}
|
|
424
424
|
if (installState) {
|
|
425
425
|
return installState.then(asCachedResult);
|
|
426
426
|
}
|
|
427
427
|
const started = (async () => {
|
|
428
428
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
429
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
430
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
431
|
-
const { autoUpdateLock } = await import("./paths-
|
|
429
|
+
const { withUpgradeLock } = await import("./global-upgrade-3TX5MDOW.js");
|
|
430
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-ET4ON56I.js");
|
|
431
|
+
const { autoUpdateLock } = await import("./paths-BWOEOPPJ.js");
|
|
432
432
|
let result = "skipped";
|
|
433
433
|
const install = async () => {
|
|
434
434
|
const platform = process.platform;
|
|
435
435
|
const { prefix, packageName } = planGlobalInstall(platform);
|
|
436
|
-
const
|
|
437
|
-
if (
|
|
436
|
+
const installed = prefix === void 0 ? void 0 : installedVersionOf(prefix, packageName, platform);
|
|
437
|
+
if (setupWouldDowngrade(options.version, installed)) {
|
|
438
|
+
throw new NpmInstallError(`Setup ${options.version} is older than the installed ${packageName} ${installed}. Run setup from the installed version or a newer policy-eligible release; Pushary did not downgrade the runtime.`);
|
|
439
|
+
}
|
|
440
|
+
if (prefix !== void 0 && !needsGlobalInstall(
|
|
438
441
|
options.version,
|
|
439
|
-
|
|
442
|
+
installed,
|
|
440
443
|
globalPackageBinsPresent(packageName, prefix, platform)
|
|
441
444
|
)) {
|
|
442
445
|
return;
|
|
443
446
|
}
|
|
444
|
-
|
|
445
|
-
installWithUpgradeLock({ packageName, version, timeoutMs: options.timeoutMs ?? 12e4 }, options.lockPath);
|
|
447
|
+
installWithUpgradeLock({ packageName, version: options.version, timeoutMs: options.timeoutMs ?? 12e4 }, options.lockPath);
|
|
446
448
|
result = "installed";
|
|
447
449
|
};
|
|
448
450
|
if (ownsUpgradeLock(options.lockPath ?? autoUpdateLock())) {
|
|
@@ -480,7 +482,6 @@ export {
|
|
|
480
482
|
compareVersion,
|
|
481
483
|
atLeast,
|
|
482
484
|
formatVersion,
|
|
483
|
-
LATEST_TAG,
|
|
484
485
|
cleanNpmEnv,
|
|
485
486
|
npmErrorMessage,
|
|
486
487
|
execNpm,
|
|
@@ -496,8 +497,6 @@ export {
|
|
|
496
497
|
NpmPermissionError,
|
|
497
498
|
NpmInstallError,
|
|
498
499
|
NpmReleaseAgeError,
|
|
499
|
-
npmExitedBeforeInstalling,
|
|
500
|
-
npmExitedOnPermissionDenied,
|
|
501
500
|
npmInstallFailure,
|
|
502
501
|
resolveBinary,
|
|
503
502
|
resolvePackageVersionFromBinary,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
APPROVAL_RULES_PATH,
|
|
3
3
|
canChangeApprovalSettings
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AM5FQTVF.js";
|
|
5
5
|
import {
|
|
6
6
|
callMcpTool
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YOCSXG3N.js";
|
|
8
8
|
import {
|
|
9
9
|
absoluteUrl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-F6EPRJDF.js";
|
|
11
11
|
import {
|
|
12
12
|
getBaseUrl
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FUZ3KIA2.js";
|
|
14
14
|
import {
|
|
15
15
|
NPX_LATEST_COMMAND
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4E6PCUYJ.js";
|
|
17
17
|
import {
|
|
18
18
|
AGENT_STOP_DEFAULT_SECONDS,
|
|
19
19
|
APPROVAL_MODE_META,
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
codexHome,
|
|
8
8
|
codexHooksJsonIn,
|
|
9
9
|
isPusharyCodexCommand
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-X6LMBS26.js";
|
|
11
11
|
import {
|
|
12
12
|
resolvePathBinary
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QZ4YXAKG.js";
|
|
14
14
|
import {
|
|
15
15
|
getPackageVersion
|
|
16
16
|
} from "./chunk-WIIMW5YO.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
callDecisionStore,
|
|
3
3
|
identifyingToolInput
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZYAPD2XN.js";
|
|
5
5
|
import {
|
|
6
6
|
canonicalJson
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-X6LMBS26.js";
|
|
8
8
|
|
|
9
9
|
// src/phone-approval.ts
|
|
10
10
|
import { createHash } from "crypto";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
postLiveSession,
|
|
5
5
|
postLiveSessionUntilAccepted,
|
|
6
6
|
startLiveSessionHeartbeat
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MRAC3IOW.js";
|
|
8
8
|
import {
|
|
9
9
|
CommandReceipts,
|
|
10
10
|
controllerCommandSchema
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
describeIdleWindow,
|
|
15
15
|
idleDeadlinePassed,
|
|
16
16
|
startProcessOwnership
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-EUAMAIHV.js";
|
|
18
18
|
import {
|
|
19
19
|
repositoryScopeFor
|
|
20
20
|
} from "./chunk-IFYBTFGJ.js";
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
isWaitForAnswerResponse,
|
|
25
25
|
withdrawQuestion,
|
|
26
26
|
writeDegraded
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-6TBHP6RP.js";
|
|
28
28
|
import {
|
|
29
29
|
callMcpTool,
|
|
30
30
|
isRetryable
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-YOCSXG3N.js";
|
|
32
32
|
import {
|
|
33
33
|
spawnClaude
|
|
34
34
|
} from "./chunk-H6CL3T2S.js";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
keyPrefix,
|
|
5
5
|
readConfigFileKey,
|
|
6
6
|
readMacAppKeyPrefix
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7LOWA7WF.js";
|
|
8
8
|
import {
|
|
9
9
|
NPX_LATEST_COMMAND
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4E6PCUYJ.js";
|
|
11
11
|
|
|
12
12
|
// src/key-signed-out.ts
|
|
13
13
|
var VERDICT_BY_CHECK = {
|
|
@@ -2,25 +2,25 @@ import {
|
|
|
2
2
|
SIGNED_OUT_ON_MAC_MESSAGE,
|
|
3
3
|
describeSignedOutKey,
|
|
4
4
|
readSignedOutDiagnosis
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TJUUA3NF.js";
|
|
6
6
|
import {
|
|
7
7
|
APPROVAL_RULES_PATH
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AM5FQTVF.js";
|
|
9
9
|
import {
|
|
10
10
|
createIo
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KMOVQIU7.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl,
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck,
|
|
16
16
|
keyCheckFromResponse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-F6EPRJDF.js";
|
|
18
18
|
import {
|
|
19
19
|
readKeySource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7LOWA7WF.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FUZ3KIA2.js";
|
|
24
24
|
import {
|
|
25
25
|
EXIT
|
|
26
26
|
} from "./chunk-BG4HHB7E.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseSseMessages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YOCSXG3N.js";
|
|
4
4
|
import {
|
|
5
5
|
fetchAsCredential
|
|
6
6
|
} from "./chunk-EENGXQP2.js";
|
|
7
7
|
import {
|
|
8
8
|
NPX_LATEST_COMMAND
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4E6PCUYJ.js";
|
|
10
10
|
|
|
11
11
|
// src/mcp-stdio-bridge.ts
|
|
12
12
|
var MCP_BRIDGE_BINARY = "pushary-mcp";
|
|
@@ -18,24 +18,25 @@ import {
|
|
|
18
18
|
settingSnapshot,
|
|
19
19
|
writeHermesSetting,
|
|
20
20
|
writeSetupReceipt
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6VMXXBSZ.js";
|
|
22
22
|
import {
|
|
23
23
|
OPENCLAW_MIN_VERSION,
|
|
24
24
|
OPENCLAW_PLUGIN_ID,
|
|
25
25
|
OPENCLAW_PLUGIN_PACKAGE
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-2GHUVGB5.js";
|
|
27
27
|
import {
|
|
28
28
|
retryAgentCommand
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-E2H5IGMP.js";
|
|
30
30
|
import {
|
|
31
31
|
configFilePath
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-FUZ3KIA2.js";
|
|
33
33
|
import {
|
|
34
34
|
readJsonSafe,
|
|
35
35
|
writeJsonAtomic
|
|
36
36
|
} from "./chunk-TODDEIYG.js";
|
|
37
37
|
import {
|
|
38
|
-
readSetupOutcomeProperties
|
|
38
|
+
readSetupOutcomeProperties,
|
|
39
|
+
redactSecretsFromContent
|
|
39
40
|
} from "./chunk-BEYMW4FP.js";
|
|
40
41
|
|
|
41
42
|
// src/hermes/shell-gate.ts
|
|
@@ -79,9 +80,10 @@ var SETUP_AGAIN_COMMAND = retryAgentCommand("openclaw");
|
|
|
79
80
|
var pluginLabel = (version) => version ? `${OPENCLAW_PLUGIN_PACKAGE} ${version}` : OPENCLAW_PLUGIN_PACKAGE;
|
|
80
81
|
var withDetail = (message, detail) => detail ? `${message} OpenClaw said: ${detail}` : message;
|
|
81
82
|
var describeOpenClawInstallFailure = (reason, detail) => {
|
|
83
|
+
const safeDetail = redactSecretsFromContent(detail);
|
|
82
84
|
switch (reason) {
|
|
83
85
|
case "plugin_id_taken":
|
|
84
|
-
return `Another OpenClaw plugin already uses the id "${OPENCLAW_PLUGIN_ID}"${
|
|
86
|
+
return `Another OpenClaw plugin already uses the id "${OPENCLAW_PLUGIN_ID}"${safeDetail ? ` (${safeDetail})` : ""}, so Pushary left it alone. Remove it, then run ${SETUP_AGAIN_COMMAND}.`;
|
|
85
87
|
case "bundle_missing":
|
|
86
88
|
return `This copy of the Pushary CLI does not carry the OpenClaw plugin. Run ${SETUP_AGAIN_COMMAND} to fetch the current CLI.`;
|
|
87
89
|
case "inspect_unreadable":
|
|
@@ -95,9 +97,9 @@ var describeOpenClawInstallFailure = (reason, detail) => {
|
|
|
95
97
|
case "install_timed_out":
|
|
96
98
|
return `OpenClaw did not finish installing ${OPENCLAW_PLUGIN_PACKAGE} in time. Run ${SETUP_AGAIN_COMMAND} again.`;
|
|
97
99
|
case "install_failed":
|
|
98
|
-
return `${withDetail(`OpenClaw could not install ${OPENCLAW_PLUGIN_PACKAGE}.`,
|
|
100
|
+
return `${withDetail(`OpenClaw could not install ${OPENCLAW_PLUGIN_PACKAGE}.`, safeDetail)} The plugin needs OpenClaw ${OPENCLAW_MIN_VERSION} or later; on an older OpenClaw run ${OPENCLAW_UPDATE_COMMAND}, then ${SETUP_AGAIN_COMMAND}.`;
|
|
99
101
|
case "enable_failed":
|
|
100
|
-
return withDetail(`OpenClaw installed ${OPENCLAW_PLUGIN_PACKAGE} but would not enable it. Run ${OPENCLAW_ENABLE_COMMAND}.`,
|
|
102
|
+
return withDetail(`OpenClaw installed ${OPENCLAW_PLUGIN_PACKAGE} but would not enable it. Run ${OPENCLAW_ENABLE_COMMAND}.`, safeDetail);
|
|
101
103
|
}
|
|
102
104
|
};
|
|
103
105
|
var describeOpenClawState = (state) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
macAppBridgeAvailable
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZGTQW6XD.js";
|
|
4
4
|
import {
|
|
5
5
|
keyPrefix
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7LOWA7WF.js";
|
|
7
7
|
import {
|
|
8
8
|
bridgeAgentKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-X6LMBS26.js";
|
|
10
10
|
import {
|
|
11
11
|
readJsonSafe
|
|
12
12
|
} from "./chunk-TODDEIYG.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openClawLauncherCandidates
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2GHUVGB5.js";
|
|
4
4
|
import {
|
|
5
5
|
openCodeConfigDirFrom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZGTQW6XD.js";
|
|
7
7
|
import {
|
|
8
8
|
nativeClaudeInstallPath
|
|
9
9
|
} from "./chunk-CYTPQDQY.js";
|
|
10
10
|
import {
|
|
11
11
|
grokHome
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LQZYHSDL.js";
|
|
13
13
|
import {
|
|
14
14
|
claudeConfigDir,
|
|
15
15
|
clineDataDirectory,
|
|
16
16
|
codexHomeFrom,
|
|
17
17
|
openClawEnvironmentOf,
|
|
18
18
|
openClawPathsFrom
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-X6LMBS26.js";
|
|
20
20
|
import {
|
|
21
21
|
HOOK_COMPATIBLE_PROFILES
|
|
22
22
|
} from "./chunk-BEYMW4FP.js";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-G66WIAST.js";
|
|
4
4
|
import {
|
|
5
5
|
ensureDaemonRunning
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LROV5XIM.js";
|
|
7
7
|
import {
|
|
8
8
|
hookOwnerOf
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QIZO2G57.js";
|
|
10
10
|
import {
|
|
11
11
|
hookMeaning
|
|
12
12
|
} from "./chunk-5EEIROLA.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
uploadTranscriptRecords,
|
|
25
25
|
verifyAnchoredRecipients,
|
|
26
26
|
wrapSessionKey
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-ZJMS2BWD.js";
|
|
28
28
|
import {
|
|
29
29
|
external_exports,
|
|
30
30
|
ownedOnlyByThisUser,
|
|
@@ -33,22 +33,22 @@ import {
|
|
|
33
33
|
import {
|
|
34
34
|
transcriptEnvironmentPreference,
|
|
35
35
|
transcriptsEnabled
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-O2DQIATJ.js";
|
|
37
37
|
import {
|
|
38
38
|
fetchAsCredential
|
|
39
39
|
} from "./chunk-EENGXQP2.js";
|
|
40
40
|
import {
|
|
41
41
|
readTranscriptPreference
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-7LOWA7WF.js";
|
|
43
43
|
import {
|
|
44
44
|
claudeConfigDir,
|
|
45
45
|
codexHome,
|
|
46
46
|
pusharyDir
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-X6LMBS26.js";
|
|
48
48
|
import {
|
|
49
49
|
getApiKey,
|
|
50
50
|
getBaseUrl
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-FUZ3KIA2.js";
|
|
52
52
|
import {
|
|
53
53
|
writeJsonAtomic,
|
|
54
54
|
writeJsonAtomicDurable
|