@pushary/agent-hooks 1.9.7 → 1.9.8
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 +11 -0
- package/README.md +3 -3
- package/data/cursor-plugin/README.md +3 -7
- package/data/vscode-plugin/README.md +1 -1
- package/dist/bin/pushary-bell-hook.js +22 -23
- package/dist/bin/pushary-bell.js +9 -9
- package/dist/bin/pushary-claude.js +27 -28
- package/dist/bin/pushary-clean.js +101 -79
- package/dist/bin/pushary-codex-bridge.js +18 -18
- package/dist/bin/pushary-codex-hook.js +32 -33
- package/dist/bin/pushary-codex.js +13 -13
- package/dist/bin/pushary-connect.js +24 -21
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +51 -39
- package/dist/bin/pushary-disconnect.js +189 -54
- package/dist/bin/pushary-doctor.js +67 -58
- package/dist/bin/pushary-elicitation-hook.js +24 -25
- package/dist/bin/pushary-gemini-bridge.js +13 -13
- package/dist/bin/pushary-gemini-hook.js +29 -30
- package/dist/bin/pushary-hook.js +30 -32
- package/dist/bin/pushary-login.js +12 -12
- package/dist/bin/pushary-logout.js +105 -42
- package/dist/bin/pushary-mcp.js +9 -9
- package/dist/bin/pushary-mode.js +28 -31
- package/dist/bin/pushary-notification-hook.js +26 -28
- package/dist/bin/pushary-opencode-hook.js +28 -29
- package/dist/bin/pushary-permission-denied-hook.js +30 -32
- package/dist/bin/pushary-permission-hook.js +29 -31
- package/dist/bin/pushary-post-hook.js +26 -28
- package/dist/bin/pushary-prompt-hook.js +26 -28
- package/dist/bin/pushary-session-end-hook.js +26 -28
- package/dist/bin/pushary-session-start-hook.js +31 -32
- package/dist/bin/pushary-setup.js +91 -101
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +34 -18
- package/dist/bin/pushary-stop-hook.js +26 -28
- package/dist/bin/pushary-stopfailure-hook.js +26 -28
- package/dist/bin/pushary-suggestions.js +19 -21
- package/dist/bin/pushary-transcript-register.js +18 -19
- package/dist/bin/pushary-transcripts.js +7 -7
- package/dist/bin/pushary-upgrade.js +55 -25
- package/dist/bin/pushary-wait.js +23 -19
- package/dist/bin/pushary.js +15 -14
- package/dist/{chunk-R3YW55MY.js → chunk-2A53H4S6.js} +17 -15
- package/dist/{chunk-4YO4T5FV.js → chunk-2QGYMY7A.js} +83 -3
- package/dist/{chunk-MBK7N46B.js → chunk-2QTO5YIT.js} +6 -6
- package/dist/{chunk-D6S5EKXA.js → chunk-2VZAALEJ.js} +5 -9
- package/dist/chunk-2WXF3QJR.js +49 -0
- package/dist/{chunk-JCWZ23MJ.js → chunk-3I6IVOZV.js} +3 -3
- package/dist/chunk-3Z3A37WD.js +77 -0
- package/dist/{chunk-Z6HPS67T.js → chunk-5QUPKDI5.js} +1 -1
- package/dist/{chunk-JWKBDSPF.js → chunk-6TE27XZR.js} +2 -2
- package/dist/{chunk-STQRUH3S.js → chunk-7DVNSQWF.js} +59 -15
- package/dist/{chunk-QTO6HEZD.js → chunk-7PT35RY2.js} +2 -2
- package/dist/{chunk-7OIWWZAD.js → chunk-B64KHETR.js} +3 -3
- package/dist/chunk-BEJRK4DF.js +94 -0
- package/dist/chunk-BXET3ALR.js +46 -0
- package/dist/{chunk-6DJTDHBI.js → chunk-CD47ZFFZ.js} +1 -1
- package/dist/{chunk-UFVGSEWH.js → chunk-CKV3UPMU.js} +2 -2
- package/dist/{chunk-4FK6RZVJ.js → chunk-CLOSJ4ES.js} +1 -1
- package/dist/{chunk-AVNKVF7N.js → chunk-DKMD6AWR.js} +4 -4
- package/dist/{chunk-SBLPHUEB.js → chunk-DL7XWKYV.js} +7 -5
- package/dist/{chunk-BTQGAXZ3.js → chunk-DPGSLWOS.js} +8 -8
- package/dist/{chunk-KYO45G5L.js → chunk-DUZVXBBU.js} +1 -1
- package/dist/{chunk-EB4XGVBG.js → chunk-EUW7JL2K.js} +0 -32
- package/dist/{chunk-4D2AYNSE.js → chunk-FQ2GORVG.js} +2 -2
- package/dist/{chunk-W2KI5KPD.js → chunk-HRULIYDU.js} +2 -2
- package/dist/{chunk-QR6VE5ME.js → chunk-I5IJRMNV.js} +58 -8
- package/dist/{chunk-T7Y5EADL.js → chunk-I6MJXLMY.js} +2 -2
- package/dist/{chunk-N4EUSDKX.js → chunk-IAD2RT4L.js} +14 -14
- package/dist/{chunk-H37L7TT3.js → chunk-IHFDPV7C.js} +2 -2
- package/dist/{chunk-3GNUXXDZ.js → chunk-IHO3YQAN.js} +2 -2
- package/dist/{chunk-JWQZSYCK.js → chunk-KF3UZLYI.js} +1 -1
- package/dist/chunk-KFF7G225.js +599 -0
- package/dist/{chunk-MZPXVH4A.js → chunk-KHNFLYJO.js} +204 -28
- package/dist/{chunk-QFEM7R6T.js → chunk-KRCR2CRQ.js} +9 -9
- package/dist/{chunk-VXRXFU6Q.js → chunk-LKLVTG3V.js} +14 -7
- package/dist/{chunk-KFKL3FHS.js → chunk-LWOO567I.js} +4 -3
- package/dist/{chunk-HPRZJKRO.js → chunk-M6BZZFVQ.js} +1 -1
- package/dist/{chunk-X5NXPCIC.js → chunk-MFF3ONG5.js} +16 -2
- package/dist/{chunk-H7MMU64M.js → chunk-MGRFDGWU.js} +2 -2
- package/dist/{chunk-L76HTPU6.js → chunk-MKTJEXZ3.js} +3 -3
- package/dist/{chunk-NIBFSARF.js → chunk-MXHTGVFZ.js} +33 -9
- package/dist/{chunk-ADSQDYYG.js → chunk-N4QSPI3B.js} +54 -5
- package/dist/{chunk-AQ55ZSSS.js → chunk-NWDG3MSW.js} +1 -1
- package/dist/chunk-OP7IHC2I.js +24 -0
- package/dist/{chunk-KT5E2RLS.js → chunk-QOLITCIP.js} +1 -1
- package/dist/{chunk-JXISQ7DT.js → chunk-TCQ43LSG.js} +3 -3
- package/dist/chunk-TCWKTUAE.js +50 -0
- package/dist/{chunk-RQGODFQN.js → chunk-V5HPPF3E.js} +1 -1
- package/dist/{chunk-7264S5HZ.js → chunk-WG3K4TCH.js} +1 -1
- package/dist/{chunk-GKI6LFAV.js → chunk-WS4H76EP.js} +2 -2
- package/dist/{chunk-XWAYAO3V.js → chunk-WWOHTTVP.js} +2 -2
- package/dist/{chunk-SD3272LS.js → chunk-YIG2R3BJ.js} +9 -7
- package/dist/{chunk-ZUTU43FT.js → chunk-ZBHUHJG6.js} +4 -4
- package/dist/{chunk-AUUXS44H.js → chunk-ZBK6E2OR.js} +1 -1
- package/dist/{chunk-QQ4HBXZC.js → chunk-ZN3C6GBG.js} +84 -673
- package/dist/{chunk-CBQACHKY.js → chunk-ZSTSEBG7.js} +1 -1
- package/dist/{chunk-3PVDOCFI.js → chunk-ZW3XZLJC.js} +5 -5
- package/dist/{global-upgrade-E2HUEB4B.js → global-upgrade-I56HNM23.js} +6 -6
- package/dist/{paths-QVTEGNZV.js → paths-AGY43CXS.js} +2 -2
- package/dist/reapply-IA5XUKWW.js +57 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +19 -20
- package/dist/{upgrade-lock-JCIDZMHF.js → upgrade-lock-B34TAUKV.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-ANEAA37E.js +0 -197
- package/dist/chunk-MNWRUGMH.js +0 -86
- package/dist/chunk-RQSOEB4S.js +0 -44
- package/dist/reapply-5QVKM6LA.js +0 -38
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveInstallSourceFor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FQ2GORVG.js";
|
|
4
4
|
import {
|
|
5
5
|
backupFile,
|
|
6
6
|
readJsonSafe,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-T7E75EKA.js";
|
|
10
10
|
import {
|
|
11
11
|
configFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5QUPKDI5.js";
|
|
13
13
|
|
|
14
14
|
// src/shell-alias.ts
|
|
15
15
|
import { homedir } from "os";
|
|
@@ -110,6 +110,20 @@ var isDisabledExport = (line) => {
|
|
|
110
110
|
return OUR_EXPORT.test(trimmed.slice(1, -LOGOUT_MARK.length).trim());
|
|
111
111
|
};
|
|
112
112
|
var keyPrefix = (key) => key.split(".")[0] ?? key;
|
|
113
|
+
var MAC_APP_KEY_PREFIX_FIELD = "macAppKeyPrefix";
|
|
114
|
+
var KEY_PREFIX_SHAPE = /^pk_[a-f0-9]+$/;
|
|
115
|
+
var findKeyExport = (contents) => {
|
|
116
|
+
const lines = contents.split("\n");
|
|
117
|
+
for (const [index, line] of lines.entries()) {
|
|
118
|
+
const key = line.match(OUR_EXPORT)?.[2];
|
|
119
|
+
if (key) return { line: index + 1, key };
|
|
120
|
+
}
|
|
121
|
+
return null;
|
|
122
|
+
};
|
|
123
|
+
var keepMacAppKeyPrefix = (current, apiKey) => {
|
|
124
|
+
const { [MAC_APP_KEY_PREFIX_FIELD]: recorded, ...rest } = current;
|
|
125
|
+
return recorded === keyPrefix(apiKey) ? { ...rest, [MAC_APP_KEY_PREFIX_FIELD]: recorded } : rest;
|
|
126
|
+
};
|
|
113
127
|
var manualKeyStepFor = (kind, platform) => kind === "no-rc" || platform === "win32" ? "config-only" : "paste-export";
|
|
114
128
|
var rcResult = (kind, over = {}) => ({
|
|
115
129
|
kind,
|
|
@@ -208,7 +222,7 @@ var writeKey = (apiKey, options = {}) => {
|
|
|
208
222
|
writeJsonAtomic(
|
|
209
223
|
configPath,
|
|
210
224
|
{
|
|
211
|
-
...current,
|
|
225
|
+
...keepMacAppKeyPrefix(current, apiKey),
|
|
212
226
|
apiKey,
|
|
213
227
|
installSource: resolveInstallSourceFor(current),
|
|
214
228
|
...options.controlMode ? { controlMode: options.controlMode } : {},
|
|
@@ -227,7 +241,7 @@ var clearKey = (options = {}) => {
|
|
|
227
241
|
const existing = readJsonSafe(configPath);
|
|
228
242
|
let removedFromConfig = false;
|
|
229
243
|
if (existing.kind === "ok" && typeof existing.value.apiKey === "string") {
|
|
230
|
-
const { apiKey: _dropped, ...rest } = existing.value;
|
|
244
|
+
const { apiKey: _dropped, [MAC_APP_KEY_PREFIX_FIELD]: _adopted, ...rest } = existing.value;
|
|
231
245
|
writeJsonAtomic(configPath, rest, KEY_FILE_MODE);
|
|
232
246
|
restrictFile(configPath);
|
|
233
247
|
removedFromConfig = true;
|
|
@@ -289,6 +303,38 @@ var readKeySource = () => {
|
|
|
289
303
|
if (fileKey) return { kind: "config", key: fileKey, origin: configPath, drift: null };
|
|
290
304
|
return { kind: "none", key: null, origin: null, drift: null };
|
|
291
305
|
};
|
|
306
|
+
var readMacAppKeyPrefix = (configPath = configFilePath()) => {
|
|
307
|
+
const result = readJsonSafe(configPath);
|
|
308
|
+
if (result.kind !== "ok") return null;
|
|
309
|
+
const recorded = result.value[MAC_APP_KEY_PREFIX_FIELD];
|
|
310
|
+
return typeof recorded === "string" && KEY_PREFIX_SHAPE.test(recorded) ? recorded : null;
|
|
311
|
+
};
|
|
312
|
+
var recordMacAppKeyPrefix = (apiKey, configPath = configFilePath()) => {
|
|
313
|
+
const result = readJsonSafe(configPath);
|
|
314
|
+
if (result.kind !== "ok" || result.value.apiKey !== apiKey) return false;
|
|
315
|
+
if (result.value[MAC_APP_KEY_PREFIX_FIELD] === keyPrefix(apiKey)) return false;
|
|
316
|
+
writeJsonAtomic(configPath, { ...result.value, [MAC_APP_KEY_PREFIX_FIELD]: keyPrefix(apiKey) }, KEY_FILE_MODE);
|
|
317
|
+
restrictFile(configPath);
|
|
318
|
+
return true;
|
|
319
|
+
};
|
|
320
|
+
var shellProfileCandidates = () => {
|
|
321
|
+
const resolved = resolveShellRc();
|
|
322
|
+
const fallbacks = FALLBACK_RCS.map((name) => join2(homedir2(), name));
|
|
323
|
+
return resolved ? [resolved.path, ...fallbacks.filter((path) => path !== resolved.path)] : fallbacks;
|
|
324
|
+
};
|
|
325
|
+
var findExportedKeyLine = (profiles = shellProfileCandidates()) => {
|
|
326
|
+
for (const path of profiles) {
|
|
327
|
+
let contents;
|
|
328
|
+
try {
|
|
329
|
+
contents = readFileSync2(path, "utf8");
|
|
330
|
+
} catch {
|
|
331
|
+
continue;
|
|
332
|
+
}
|
|
333
|
+
const found = findKeyExport(contents);
|
|
334
|
+
if (found) return { path, ...found };
|
|
335
|
+
}
|
|
336
|
+
return null;
|
|
337
|
+
};
|
|
292
338
|
|
|
293
339
|
export {
|
|
294
340
|
CANDIDATE_RCS,
|
|
@@ -305,5 +351,8 @@ export {
|
|
|
305
351
|
readConfigFileKey,
|
|
306
352
|
readControlMode,
|
|
307
353
|
readTranscriptPreference,
|
|
308
|
-
readKeySource
|
|
354
|
+
readKeySource,
|
|
355
|
+
readMacAppKeyPrefix,
|
|
356
|
+
recordMacAppKeyPrefix,
|
|
357
|
+
findExportedKeyLine
|
|
309
358
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isValidApiKey
|
|
3
|
+
} from "./chunk-I5IJRMNV.js";
|
|
4
|
+
|
|
5
|
+
// src/shared-mcp-key.ts
|
|
6
|
+
var asRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
7
|
+
var pusharyKey = (value) => typeof value === "string" && isValidApiKey(value.trim()) ? value.trim() : null;
|
|
8
|
+
var bearerKey = (authorization) => typeof authorization === "string" && authorization.startsWith("Bearer ") ? pusharyKey(authorization.slice("Bearer ".length)) : null;
|
|
9
|
+
var mcpServerBearer = (mcpServers) => bearerKey(asRecord(asRecord(asRecord(mcpServers)?.pushary)?.headers)?.Authorization);
|
|
10
|
+
var appAgentKey = (bridgeAgentKey) => pusharyKey(asRecord(bridgeAgentKey)?.key);
|
|
11
|
+
var setupReceiptKey = (claudeMcpReceipt) => bearerKey(asRecord(asRecord(asRecord(claudeMcpReceipt)?.installedPushary)?.headers)?.Authorization);
|
|
12
|
+
var macAppKeepsMcpEntry = (entryKey, keys) => {
|
|
13
|
+
if (!entryKey) return true;
|
|
14
|
+
if (keys.appKey) return entryKey === keys.appKey;
|
|
15
|
+
return entryKey !== keys.setupKey;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
pusharyKey,
|
|
20
|
+
mcpServerBearer,
|
|
21
|
+
appAgentKey,
|
|
22
|
+
setupReceiptKey,
|
|
23
|
+
macAppKeepsMcpEntry
|
|
24
|
+
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DUZVXBBU.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
7
7
|
import {
|
|
8
8
|
getBaseUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5QUPKDI5.js";
|
|
10
10
|
import {
|
|
11
11
|
clientContextHeaders,
|
|
12
12
|
getPackageVersion
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-I5IJRMNV.js";
|
|
14
14
|
|
|
15
15
|
// src/cli/net.ts
|
|
16
16
|
import { createRequire } from "module";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
pusharyHookExecutable
|
|
3
|
+
} from "./chunk-2QGYMY7A.js";
|
|
4
|
+
import {
|
|
5
|
+
isProtectedByScope,
|
|
6
|
+
registerHookEntry
|
|
7
|
+
} from "./chunk-ZBHUHJG6.js";
|
|
8
|
+
|
|
9
|
+
// src/cursor-config.ts
|
|
10
|
+
var hookCommandOf = (entry) => {
|
|
11
|
+
const command = entry && typeof entry === "object" && !Array.isArray(entry) ? entry.command : void 0;
|
|
12
|
+
return typeof command === "string" ? command : "";
|
|
13
|
+
};
|
|
14
|
+
var isPusharyCursorEntry = (entry) => pusharyHookExecutable(hookCommandOf(entry)) !== null;
|
|
15
|
+
var registerCursorGate = (existing, entry) => registerHookEntry(existing, isPusharyCursorEntry, entry);
|
|
16
|
+
var withoutPusharyCursorHooks = (hooks, scope) => {
|
|
17
|
+
let removed = 0;
|
|
18
|
+
const kept = {};
|
|
19
|
+
for (const [event, entries] of Object.entries(hooks)) {
|
|
20
|
+
if (!Array.isArray(entries)) {
|
|
21
|
+
kept[event] = entries;
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
const others = entries.filter((entry) => !isPusharyCursorEntry(entry) || isProtectedByScope(hookCommandOf(entry), scope));
|
|
25
|
+
removed += entries.length - others.length;
|
|
26
|
+
if (others.length > 0 || entries.length === 0) kept[event] = others;
|
|
27
|
+
}
|
|
28
|
+
return { hooks: kept, removed };
|
|
29
|
+
};
|
|
30
|
+
var CURSOR_PLUGIN_NAME = "pushary";
|
|
31
|
+
var CURSOR_PLUGIN_STAGING_PREFIX = ".pushary-staging-";
|
|
32
|
+
var CURSOR_PLUGIN_BACKUP_INFIX = ".pushary-backup-";
|
|
33
|
+
var isCursorPluginLeftover = (name) => name.startsWith(`${CURSOR_PLUGIN_NAME}${CURSOR_PLUGIN_BACKUP_INFIX}`) || name.startsWith(CURSOR_PLUGIN_STAGING_PREFIX);
|
|
34
|
+
var isPusharyCursorPluginManifest = (contents) => {
|
|
35
|
+
try {
|
|
36
|
+
const manifest = JSON.parse(contents);
|
|
37
|
+
return typeof manifest === "object" && manifest !== null && !Array.isArray(manifest) && manifest.name === CURSOR_PLUGIN_NAME;
|
|
38
|
+
} catch {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
registerCursorGate,
|
|
45
|
+
withoutPusharyCursorHooks,
|
|
46
|
+
CURSOR_PLUGIN_STAGING_PREFIX,
|
|
47
|
+
CURSOR_PLUGIN_BACKUP_INFIX,
|
|
48
|
+
isCursorPluginLeftover,
|
|
49
|
+
isPusharyCursorPluginManifest
|
|
50
|
+
};
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
decodePublicKey,
|
|
4
4
|
generateSessionKey,
|
|
5
5
|
wrapSessionKey
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZBK6E2OR.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchTranscriptRecipients,
|
|
9
9
|
uploadTranscriptRecords
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CLOSJ4ES.js";
|
|
11
11
|
|
|
12
12
|
// src/live-session.ts
|
|
13
13
|
var MAX_TRANSCRIPT_QUEUE = 100;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DPGSLWOS.js";
|
|
4
4
|
import {
|
|
5
5
|
writeDegraded
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DKMD6AWR.js";
|
|
7
7
|
|
|
8
8
|
// src/tool-hook-input.ts
|
|
9
9
|
var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode"];
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AGENT_CHOICES
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
isBridgeLocator
|
|
6
|
-
} from "./chunk-MNWRUGMH.js";
|
|
3
|
+
} from "./chunk-DL7XWKYV.js";
|
|
7
4
|
import {
|
|
5
|
+
isBridgeLocator,
|
|
8
6
|
pusharyHookExecutable
|
|
9
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2QGYMY7A.js";
|
|
10
8
|
import {
|
|
11
9
|
BELL_HOOK_BINARY
|
|
12
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WG3K4TCH.js";
|
|
13
11
|
|
|
14
12
|
// src/setup/hook-ownership.ts
|
|
15
13
|
var commandsIn = (value) => {
|
|
@@ -105,7 +103,10 @@ var hookOwnerOf = (document, appAvailable = true, hooksKeyPath = ["hooks"]) => {
|
|
|
105
103
|
(node, key) => node && typeof node === "object" ? node[key] : void 0,
|
|
106
104
|
document
|
|
107
105
|
);
|
|
108
|
-
|
|
106
|
+
return hookOwnerOfCommands(commandsIn(hooks), appAvailable);
|
|
107
|
+
};
|
|
108
|
+
var hookOwnerOfCommands = (commands, appAvailable = true) => {
|
|
109
|
+
const executables = commands.map(pusharyHookExecutable).filter((executable) => executable !== null);
|
|
109
110
|
if (appAvailable && executables.some(isBridgeLocator)) return "app";
|
|
110
111
|
if (executables.some((executable) => !isBridgeLocator(executable))) return "cli";
|
|
111
112
|
return "none";
|
|
@@ -136,6 +137,7 @@ export {
|
|
|
136
137
|
isHookTakeoverReceipt,
|
|
137
138
|
restoreHookTakeover,
|
|
138
139
|
hookOwnerOf,
|
|
140
|
+
hookOwnerOfCommands,
|
|
139
141
|
planHooks,
|
|
140
142
|
describeAppOwnership,
|
|
141
143
|
KEEP_HINT,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isReleaseVersion,
|
|
14
14
|
ownPackageName,
|
|
15
15
|
withHookHoldBudget
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-I5IJRMNV.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/paths.ts
|
|
19
19
|
import { homedir as homedir2 } from "os";
|
|
@@ -365,9 +365,9 @@ var installGlobally = (options) => {
|
|
|
365
365
|
}
|
|
366
366
|
const started = (async () => {
|
|
367
367
|
if (!npmIsOnPath()) throw new NpmMissingError();
|
|
368
|
-
const { withUpgradeLock } = await import("./global-upgrade-
|
|
369
|
-
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-
|
|
370
|
-
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-
|
|
368
|
+
const { withUpgradeLock } = await import("./global-upgrade-I56HNM23.js");
|
|
369
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-B34TAUKV.js");
|
|
370
|
+
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-AGY43CXS.js");
|
|
371
371
|
let result = "skipped";
|
|
372
372
|
const install = async () => {
|
|
373
373
|
const platform = process.platform;
|