@pushary/agent-hooks 1.9.9 → 1.9.10
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 +7 -0
- package/dist/bin/pushary-bell-hook.js +17 -17
- package/dist/bin/pushary-bell.js +8 -8
- package/dist/bin/pushary-claude.js +20 -20
- package/dist/bin/pushary-clean.js +100 -24
- package/dist/bin/pushary-codex-bridge.js +16 -16
- package/dist/bin/pushary-codex-hook.js +23 -23
- package/dist/bin/pushary-codex.js +11 -11
- package/dist/bin/pushary-connect.js +24 -24
- package/dist/bin/pushary-cowork.js +3 -3
- package/dist/bin/pushary-daemon.js +28 -28
- package/dist/bin/pushary-disconnect.js +22 -22
- package/dist/bin/pushary-doctor.js +51 -39
- package/dist/bin/pushary-elicitation-hook.js +19 -19
- package/dist/bin/pushary-gemini-bridge.js +11 -11
- package/dist/bin/pushary-gemini-hook.js +21 -21
- package/dist/bin/pushary-hook.js +24 -24
- package/dist/bin/pushary-login.js +11 -11
- package/dist/bin/pushary-logout.js +17 -77
- package/dist/bin/pushary-mcp.js +8 -8
- package/dist/bin/pushary-mode.js +11 -11
- package/dist/bin/pushary-notification-hook.js +21 -21
- package/dist/bin/pushary-opencode-hook.js +20 -20
- package/dist/bin/pushary-permission-denied-hook.js +23 -23
- package/dist/bin/pushary-permission-hook.js +23 -23
- package/dist/bin/pushary-post-hook.js +21 -21
- 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 +25 -25
- package/dist/bin/pushary-setup.js +48 -35
- 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 +11 -11
- package/dist/bin/pushary-transcript-register.js +13 -13
- package/dist/bin/pushary-transcripts.js +6 -6
- package/dist/bin/pushary-upgrade.js +28 -28
- package/dist/bin/pushary-wait.js +11 -11
- package/dist/bin/pushary.js +5 -5
- package/dist/{chunk-TO3PS646.js → chunk-2HFSKYLN.js} +1 -1
- package/dist/{chunk-6W5M3MSE.js → chunk-2HXG2QDI.js} +4 -4
- package/dist/{chunk-IRHABAQT.js → chunk-2M52CFVO.js} +1 -1
- package/dist/{chunk-NUVGDBZC.js → chunk-2S34OPHS.js} +1 -1
- package/dist/{chunk-AI7RMFVV.js → chunk-5MQYA3YL.js} +8 -8
- package/dist/{chunk-DCCSULXK.js → chunk-6KNC6KLL.js} +3 -3
- package/dist/{chunk-UF6RBP5V.js → chunk-7HGR5GNY.js} +3 -3
- package/dist/{chunk-HBWYMRR5.js → chunk-AKPHYSEL.js} +5 -4
- package/dist/{chunk-E5HOHIUV.js → chunk-BOSXFI7L.js} +3 -3
- package/dist/{chunk-RQ32ADJP.js → chunk-BTFUSQFB.js} +1 -1
- package/dist/{chunk-QTIUJZRX.js → chunk-BVPPYR7B.js} +1 -1
- package/dist/{chunk-LENBKYRB.js → chunk-BVSIM4EF.js} +2 -2
- package/dist/{chunk-EIAEUG7G.js → chunk-C6QTMWJZ.js} +1 -1
- package/dist/{chunk-B5NMSP3V.js → chunk-CJYM4ZHV.js} +1 -1
- package/dist/{chunk-DP3WX7FW.js → chunk-DAOQT4WK.js} +2 -2
- package/dist/{chunk-AZOKPWVI.js → chunk-DL6QHS7V.js} +1 -1
- package/dist/{chunk-COQ64C4F.js → chunk-DWO4RLYK.js} +7 -7
- package/dist/{chunk-F7R3SZ4Q.js → chunk-EVC765EO.js} +1 -1
- package/dist/{chunk-MLGIVVSG.js → chunk-GQYX24UC.js} +1 -1
- package/dist/{chunk-REU2VQPH.js → chunk-GTZ4HIHU.js} +15 -13
- package/dist/{chunk-KOWFRUIT.js → chunk-H4F5O3RE.js} +1 -1
- package/dist/{chunk-6AYSKVLL.js → chunk-I3W7GJ5R.js} +3 -3
- package/dist/{chunk-KQFTBQ66.js → chunk-LDQGURCF.js} +7 -7
- package/dist/{chunk-Q6C6ILUS.js → chunk-LXA236ZQ.js} +2 -2
- package/dist/{chunk-462EQA6K.js → chunk-MISUKJGW.js} +1 -1
- package/dist/{chunk-UPIZSCYD.js → chunk-NQ67AF3V.js} +3 -3
- package/dist/{chunk-H5T27W7M.js → chunk-OL2Z7WI4.js} +2 -2
- package/dist/{chunk-6EBGOHDJ.js → chunk-PNC5ZQFS.js} +6 -6
- package/dist/{chunk-M3STIAGU.js → chunk-PR2VDVCP.js} +1 -1
- package/dist/{chunk-BNSKVIAW.js → chunk-Q3UMWSE4.js} +1 -1
- package/dist/{chunk-BZLHTMT6.js → chunk-QAGWWDXQ.js} +11 -9
- package/dist/{chunk-VIIHC42X.js → chunk-QGRENWJL.js} +1 -1
- package/dist/{chunk-SZ4Q6ZVS.js → chunk-RPQLZLKC.js} +4 -4
- package/dist/{chunk-UAP5DS6P.js → chunk-S2DAKKQQ.js} +2 -2
- package/dist/chunk-SB2GN6OP.js +71 -0
- package/dist/{chunk-BYLKCZ2G.js → chunk-SIHYBIEN.js} +12 -12
- package/dist/{chunk-VHPFNLRS.js → chunk-SJDMULE7.js} +4 -4
- package/dist/{chunk-G7RIDXAT.js → chunk-SMVMLWCD.js} +1 -1
- package/dist/{chunk-5DCDQ5VW.js → chunk-TCXL5FQQ.js} +1 -1
- package/dist/{chunk-K545B734.js → chunk-U5FP5JIS.js} +1 -1
- package/dist/{chunk-Z23ZBYDW.js → chunk-UJZ7AGSC.js} +3 -3
- package/dist/{chunk-5N5L6DNN.js → chunk-UM5WXBKN.js} +2 -2
- package/dist/{chunk-QIOIO7VN.js → chunk-XKMGHVXW.js} +5 -5
- package/dist/{chunk-QRXPWW3M.js → chunk-XXLCYKVS.js} +2 -2
- package/dist/{chunk-NGKUXZID.js → chunk-Y7JM47CI.js} +1 -1
- package/dist/{chunk-OAYWO5NP.js → chunk-YUQHUGTH.js} +1 -1
- package/dist/{chunk-R5RIVOPL.js → chunk-Z2Q2VH43.js} +2 -2
- package/dist/{chunk-WRPYCIV2.js → chunk-ZSGJYSF2.js} +4 -4
- package/dist/{global-upgrade-H272QOGD.js → global-upgrade-PUM44JUH.js} +5 -5
- package/dist/{paths-HMVOTFUN.js → paths-U2MJGNBT.js} +1 -1
- package/dist/{reapply-Q5NHDTVU.js → reapply-PRKV4EO7.js} +18 -18
- package/dist/src/index.js +16 -16
- package/dist/{upgrade-lock-L3GHFIRW.js → upgrade-lock-QZSVLEM7.js} +2 -2
- package/package.json +1 -1
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-POFBE6ZY.js";
|
|
5
5
|
import {
|
|
6
6
|
isNetworkFailure
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UM5WXBKN.js";
|
|
8
8
|
import {
|
|
9
9
|
clientReportClaims
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UJZ7AGSC.js";
|
|
11
11
|
import {
|
|
12
12
|
getApiKey,
|
|
13
13
|
getBaseUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2M52CFVO.js";
|
|
15
15
|
import {
|
|
16
16
|
CLIENT_REPORT_PATH,
|
|
17
17
|
degradedLine
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureCodexTrustsPusharyHooks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Y7JM47CI.js";
|
|
4
4
|
import {
|
|
5
5
|
detectClaudeVersion
|
|
6
6
|
} from "./chunk-RIVNNBEK.js";
|
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
openCodeHookArgv,
|
|
13
13
|
openCodePluginDir,
|
|
14
14
|
openCodeWired
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QAGWWDXQ.js";
|
|
16
16
|
import {
|
|
17
17
|
addClaudeMcpServer,
|
|
18
18
|
addPusharyHooks,
|
|
19
19
|
addPusharyToolPermissions
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7HGR5GNY.js";
|
|
21
21
|
import {
|
|
22
22
|
claudeUnprovenHolds,
|
|
23
23
|
claudeWired,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
codexWired,
|
|
26
26
|
geminiWired,
|
|
27
27
|
planHooks
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-SIHYBIEN.js";
|
|
29
29
|
import {
|
|
30
30
|
CLAUDE_HOOK_BINARY,
|
|
31
31
|
CLAUDE_HOOK_EVENTS,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
needsReregistration,
|
|
37
37
|
registrationSignatures,
|
|
38
38
|
supportedClaudeEvents
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-PR2VDVCP.js";
|
|
40
40
|
import {
|
|
41
41
|
formatVersion
|
|
42
42
|
} from "./chunk-6ICPEJY5.js";
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
registrationHolderOf,
|
|
60
60
|
resolveGlobalBinary,
|
|
61
61
|
vscodePluginMcp
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-UJZ7AGSC.js";
|
|
63
63
|
import {
|
|
64
64
|
readJsonSafe,
|
|
65
65
|
writeFileAtomic,
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7HGR5GNY.js";
|
|
4
4
|
import {
|
|
5
5
|
hookOwnerOf,
|
|
6
6
|
hookOwnerOfCommands,
|
|
7
7
|
liveBridgeProbe,
|
|
8
8
|
resolveBridgeStub
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SIHYBIEN.js";
|
|
10
|
+
import {
|
|
11
|
+
AGENT_CHOICES
|
|
12
|
+
} from "./chunk-ZGADIZDS.js";
|
|
10
13
|
import {
|
|
11
14
|
claudeSettings,
|
|
12
15
|
codexHooksJson,
|
|
@@ -15,7 +18,7 @@ import {
|
|
|
15
18
|
guardedArgv,
|
|
16
19
|
pusharyDir,
|
|
17
20
|
vscodePluginDir
|
|
18
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-UJZ7AGSC.js";
|
|
19
22
|
import {
|
|
20
23
|
readJsonSafe
|
|
21
24
|
} from "./chunk-T7E75EKA.js";
|
|
@@ -416,6 +419,7 @@ var HOOK_FILES = {
|
|
|
416
419
|
...COMPATIBLE_HOOK_FILES
|
|
417
420
|
};
|
|
418
421
|
var agentHookFile = (agent) => HOOK_FILES[agent]?.() ?? null;
|
|
422
|
+
var agentHooksKeyPath = (agent) => hookCompatibleProfile(agent)?.hooksKeyPath;
|
|
419
423
|
var readTextOrNull = (path) => {
|
|
420
424
|
try {
|
|
421
425
|
return readFileSync2(path, "utf-8");
|
|
@@ -432,13 +436,9 @@ var agentHookOwner = (agent, appAvailable) => {
|
|
|
432
436
|
const file = agentHookFile(agent);
|
|
433
437
|
if (!file) return "none";
|
|
434
438
|
const document = readJsonSafe(file);
|
|
435
|
-
|
|
436
|
-
return hookOwnerOf(
|
|
437
|
-
document.kind === "ok" ? document.value : null,
|
|
438
|
-
appAvailable,
|
|
439
|
-
profile ? profile.hooksKeyPath : void 0
|
|
440
|
-
);
|
|
439
|
+
return hookOwnerOf(document.kind === "ok" ? document.value : null, appAvailable, agentHooksKeyPath(agent));
|
|
441
440
|
};
|
|
441
|
+
var cliOwnsAnyAgentHooks = (appAvailable) => AGENT_CHOICES.some((agent) => agentHookOwner(agent, appAvailable) === "cli");
|
|
442
442
|
var macAppBridgeAvailable = () => resolveBridgeStub(join2(pusharyDir(), "bin", HOOK_LOCATOR_BINARY), liveBridgeProbe()).kind === "bundle";
|
|
443
443
|
|
|
444
444
|
export {
|
|
@@ -460,6 +460,8 @@ export {
|
|
|
460
460
|
addOpenCodeMcpServer,
|
|
461
461
|
removeOpenCodeMcpServer,
|
|
462
462
|
agentHookFile,
|
|
463
|
+
agentHooksKeyPath,
|
|
463
464
|
agentHookOwner,
|
|
465
|
+
cliOwnsAnyAgentHooks,
|
|
464
466
|
macAppBridgeAvailable
|
|
465
467
|
};
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "./chunk-XHKBHWLX.js";
|
|
5
5
|
import {
|
|
6
6
|
readControlMode
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GTZ4HIHU.js";
|
|
8
8
|
import {
|
|
9
9
|
getMachineId
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-H4F5O3RE.js";
|
|
11
11
|
import {
|
|
12
12
|
pusharyDir,
|
|
13
13
|
resolveGlobalBinary
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UJZ7AGSC.js";
|
|
15
15
|
import {
|
|
16
16
|
readJsonSafe,
|
|
17
17
|
writeFileAtomic,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-T7E75EKA.js";
|
|
21
21
|
import {
|
|
22
22
|
getApiKey
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2M52CFVO.js";
|
|
24
24
|
import {
|
|
25
25
|
CLI_PACKAGE_NAMES,
|
|
26
26
|
cmdShimTarget,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openCodeConfigDirFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QAGWWDXQ.js";
|
|
4
4
|
import {
|
|
5
5
|
codexHomeFrom,
|
|
6
6
|
resolvePathBinary
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UJZ7AGSC.js";
|
|
8
8
|
import {
|
|
9
9
|
HOOK_COMPATIBLE_PROFILES
|
|
10
10
|
} from "./chunk-5RGA636G.js";
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// src/key-revocation.ts
|
|
2
|
+
var SELF_REVOKE_PATH = "/api/v1/server/keys/self/revoke";
|
|
3
|
+
var DEVICE_KEY_PATH = "/api/agent/device-key";
|
|
4
|
+
var FULL_ACCESS_ONLY_STATUS = 403;
|
|
5
|
+
var REVOKE_TIMEOUT_MS = 1e4;
|
|
6
|
+
var readRevokedCount = async (response) => {
|
|
7
|
+
try {
|
|
8
|
+
const body = await response.json();
|
|
9
|
+
const revoked = typeof body === "object" && body !== null && "revoked" in body ? body.revoked : void 0;
|
|
10
|
+
return typeof revoked === "number" && Number.isInteger(revoked) && revoked >= 0 ? revoked : null;
|
|
11
|
+
} catch {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var revokeAgentKey = async (apiKey, baseUrl, fetchImpl) => {
|
|
16
|
+
const response = await fetchImpl(`${baseUrl}${DEVICE_KEY_PATH}`, {
|
|
17
|
+
method: "DELETE",
|
|
18
|
+
headers: { Authorization: `Bearer ${apiKey}` },
|
|
19
|
+
signal: AbortSignal.timeout(REVOKE_TIMEOUT_MS)
|
|
20
|
+
});
|
|
21
|
+
if (!response.ok) return { kind: "refused", status: response.status };
|
|
22
|
+
const revoked = await readRevokedCount(response);
|
|
23
|
+
if (revoked === null) return { kind: "refused", status: response.status };
|
|
24
|
+
return revoked > 0 ? { kind: "revoked" } : { kind: "not_accepted" };
|
|
25
|
+
};
|
|
26
|
+
var revokeOwnKey = async (apiKey, baseUrl, fetchImpl = fetch) => {
|
|
27
|
+
try {
|
|
28
|
+
const response = await fetchImpl(`${baseUrl}${SELF_REVOKE_PATH}`, {
|
|
29
|
+
method: "POST",
|
|
30
|
+
headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
|
|
31
|
+
signal: AbortSignal.timeout(REVOKE_TIMEOUT_MS)
|
|
32
|
+
});
|
|
33
|
+
if (response.status === 401) return { kind: "not_accepted" };
|
|
34
|
+
if (response.status === FULL_ACCESS_ONLY_STATUS) return await revokeAgentKey(apiKey, baseUrl, fetchImpl);
|
|
35
|
+
if (!response.ok) return { kind: "refused", status: response.status };
|
|
36
|
+
return { kind: "revoked" };
|
|
37
|
+
} catch (err) {
|
|
38
|
+
return { kind: "unreachable", detail: err instanceof Error ? err.message : "network error" };
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var REVOKE_DETAIL = {
|
|
42
|
+
revoked: "Revoked the key on pushary.com.",
|
|
43
|
+
not_accepted: "pushary.com had already stopped accepting the key.",
|
|
44
|
+
refused: "pushary.com refused to revoke the key",
|
|
45
|
+
unreachable: "Could not reach pushary.com to revoke the key"
|
|
46
|
+
};
|
|
47
|
+
var describeRevokeAttempt = (attempt) => {
|
|
48
|
+
if (attempt.kind === "refused") return `${REVOKE_DETAIL.refused} (HTTP ${attempt.status}).`;
|
|
49
|
+
if (attempt.kind === "unreachable") return `${REVOKE_DETAIL.unreachable}: ${attempt.detail}`;
|
|
50
|
+
return REVOKE_DETAIL[attempt.kind];
|
|
51
|
+
};
|
|
52
|
+
var keyNoLongerAccepted = (attempt) => attempt.kind === "revoked" || attempt.kind === "not_accepted";
|
|
53
|
+
var keyValidityOf = (check) => {
|
|
54
|
+
switch (check.kind) {
|
|
55
|
+
case "ok":
|
|
56
|
+
case "locked":
|
|
57
|
+
return "valid";
|
|
58
|
+
case "rejected":
|
|
59
|
+
case "malformed":
|
|
60
|
+
return "invalid";
|
|
61
|
+
case "unreachable":
|
|
62
|
+
return "unknown";
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
revokeOwnKey,
|
|
68
|
+
describeRevokeAttempt,
|
|
69
|
+
keyNoLongerAccepted,
|
|
70
|
+
keyValidityOf
|
|
71
|
+
};
|
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
CLAUDE_HOOK_EVENTS,
|
|
3
3
|
GEMINI_HOOK_EVENTS,
|
|
4
4
|
hasGeminiHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PR2VDVCP.js";
|
|
6
6
|
import {
|
|
7
7
|
AGENT_CHOICES
|
|
8
8
|
} from "./chunk-ZGADIZDS.js";
|
|
9
9
|
import {
|
|
10
10
|
BELL_HOOK_BINARY
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GQYX24UC.js";
|
|
12
12
|
import {
|
|
13
13
|
CODEX_HOOK_EVENTS,
|
|
14
14
|
hasCodexHooks,
|
|
15
15
|
holdBudgetOf
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-UJZ7AGSC.js";
|
|
17
17
|
import {
|
|
18
18
|
CURSOR_GATE_EVENTS,
|
|
19
19
|
HOOK_LOCATOR_BINARY,
|
|
@@ -259,8 +259,14 @@ var restoreMcpServer = (document, containerKey, snapshot) => {
|
|
|
259
259
|
}
|
|
260
260
|
return JSON.stringify(document) !== before;
|
|
261
261
|
};
|
|
262
|
-
var
|
|
263
|
-
|
|
262
|
+
var DEFAULT_HOOKS_KEY_PATH = ["hooks"];
|
|
263
|
+
var hooksAt = (document, hooksKeyPath) => hooksKeyPath.reduce(
|
|
264
|
+
(node, key) => isRecord(node) ? node[key] : void 0,
|
|
265
|
+
document
|
|
266
|
+
);
|
|
267
|
+
var captureHookTakeover = (agent, document, hooksKeyPath = DEFAULT_HOOKS_KEY_PATH) => {
|
|
268
|
+
const located = hooksAt(document, hooksKeyPath);
|
|
269
|
+
const hooks = isRecord(located) ? located : null;
|
|
264
270
|
if (!hooks) return null;
|
|
265
271
|
const captured = {};
|
|
266
272
|
for (const [event, entries] of Object.entries(hooks)) {
|
|
@@ -301,13 +307,7 @@ var restoreHookTakeover = (document, receipt) => {
|
|
|
301
307
|
document.hooks = hooks;
|
|
302
308
|
return JSON.stringify(document) !== before;
|
|
303
309
|
};
|
|
304
|
-
var hookOwnerOf = (document, appAvailable = true, hooksKeyPath =
|
|
305
|
-
const hooks = hooksKeyPath.reduce(
|
|
306
|
-
(node, key) => node && typeof node === "object" ? node[key] : void 0,
|
|
307
|
-
document
|
|
308
|
-
);
|
|
309
|
-
return hookOwnerOfCommands(commandsIn(hooks), appAvailable);
|
|
310
|
-
};
|
|
310
|
+
var hookOwnerOf = (document, appAvailable = true, hooksKeyPath = DEFAULT_HOOKS_KEY_PATH) => hookOwnerOfCommands(commandsIn(hooksAt(document, hooksKeyPath)), appAvailable);
|
|
311
311
|
var hookOwnerOfCommands = (commands, appAvailable = true) => {
|
|
312
312
|
const executables = commands.map(pusharyHookExecutable).filter((executable) => executable !== null);
|
|
313
313
|
if (appAvailable && executables.some(isBridgeLocator)) return "app";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
forkFinishWithUpgradeLock,
|
|
5
5
|
installWithUpgradeLock,
|
|
6
6
|
releaseAutoUpdateLock
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DL6QHS7V.js";
|
|
8
8
|
import {
|
|
9
9
|
describeAutoUpdateCheck,
|
|
10
10
|
globalInstallLocation,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
readAutoUpdateState,
|
|
15
15
|
updateAutoUpdateState,
|
|
16
16
|
upgradeEntryFor
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-U5FP5JIS.js";
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "./chunk-KZERVKTD.js";
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
npmErrorMessage,
|
|
28
28
|
readGlobalCliInstallAt,
|
|
29
29
|
readGlobalPrefix
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-UJZ7AGSC.js";
|
|
31
31
|
import {
|
|
32
32
|
NPX_LATEST_COMMAND
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-TCXL5FQQ.js";
|
|
34
34
|
import {
|
|
35
35
|
commandsPackage,
|
|
36
36
|
globalUpgradeEntry,
|
|
@@ -141,7 +141,7 @@ var COMMAND_OPTIONS = {
|
|
|
141
141
|
],
|
|
142
142
|
clean: [
|
|
143
143
|
["--dry-run", "List everything it would remove and change nothing"],
|
|
144
|
-
["--everything", "Also remove what the Mac app set up: quits it, then its keychain items, local state and editor extension"],
|
|
144
|
+
["--everything", "Also revoke the keys the CLI wrote (config.json and its shell profile export) and remove what the Mac app set up: quits it, then its keychain items, local state and editor extension"],
|
|
145
145
|
["--yes", "Remove everything without asking"]
|
|
146
146
|
],
|
|
147
147
|
transcripts: [
|
|
@@ -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-PUM44JUH.js");
|
|
369
|
+
const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-QZSVLEM7.js");
|
|
370
|
+
const { autoUpdateLock: autoUpdateLock2 } = await import("./paths-U2MJGNBT.js");
|
|
371
371
|
let result = "skipped";
|
|
372
372
|
const install = async () => {
|
|
373
373
|
const platform = process.platform;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readExistingMachineId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H4F5O3RE.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-2M52CFVO.js";
|
|
10
10
|
import {
|
|
11
11
|
clientContextHeaders,
|
|
12
12
|
getPackageVersion
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
expectedLaunchCapabilities,
|
|
4
4
|
hasSpawnProvider,
|
|
5
5
|
resolveControlPolicy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EVC765EO.js";
|
|
7
7
|
import {
|
|
8
8
|
daemonHasRemoteProof,
|
|
9
9
|
daemonServiceManagerAvailable,
|
|
10
10
|
hasDaemonServiceDefinition,
|
|
11
11
|
readDaemonNeedsLogin,
|
|
12
12
|
readDaemonStatus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-RPQLZLKC.js";
|
|
14
14
|
import {
|
|
15
15
|
readControlMode,
|
|
16
16
|
readKeySource
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GTZ4HIHU.js";
|
|
18
18
|
import {
|
|
19
19
|
getMachineId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-H4F5O3RE.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2M52CFVO.js";
|
|
24
24
|
import {
|
|
25
25
|
getPackageVersion
|
|
26
26
|
} from "./chunk-5RGA636G.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UM5WXBKN.js";
|
|
4
4
|
import {
|
|
5
5
|
NetworkError
|
|
6
6
|
} from "./chunk-7QLSKOSU.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-KZERVKTD.js";
|
|
10
10
|
import {
|
|
11
11
|
getBaseUrl
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2M52CFVO.js";
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
registerTranscript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DWO4RLYK.js";
|
|
4
4
|
import {
|
|
5
5
|
writeDegraded
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NQ67AF3V.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,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SubscriptionRequiredError,
|
|
3
3
|
callMcpTool
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-I3W7GJ5R.js";
|
|
5
5
|
import {
|
|
6
6
|
clientErrorKindOf,
|
|
7
7
|
reportClientError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NQ67AF3V.js";
|
|
9
9
|
import {
|
|
10
10
|
installNetworkDefaults
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UM5WXBKN.js";
|
|
12
12
|
import {
|
|
13
13
|
getBaseUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2M52CFVO.js";
|
|
15
15
|
import {
|
|
16
16
|
ASK_AGENT_NAME_MAX,
|
|
17
17
|
ASK_QUESTION_MAX,
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
readGlobalUpgradeSubject,
|
|
6
6
|
upgradeInstalledPackage,
|
|
7
7
|
withUpgradeLock
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-SJDMULE7.js";
|
|
9
|
+
import "./chunk-DL6QHS7V.js";
|
|
10
|
+
import "./chunk-U5FP5JIS.js";
|
|
11
11
|
import "./chunk-POFBE6ZY.js";
|
|
12
12
|
import "./chunk-KZERVKTD.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-UJZ7AGSC.js";
|
|
14
14
|
import "./chunk-T7E75EKA.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-TCXL5FQQ.js";
|
|
16
16
|
import "./chunk-5RGA636G.js";
|
|
17
17
|
export {
|
|
18
18
|
finishGlobalUpgrade,
|
|
@@ -10,35 +10,35 @@ import {
|
|
|
10
10
|
reapplyOpenCodePlugin,
|
|
11
11
|
reapplyVsCodePlugin,
|
|
12
12
|
repairCodexHolds
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-PNC5ZQFS.js";
|
|
14
|
+
import "./chunk-Y7JM47CI.js";
|
|
15
15
|
import "./chunk-RIVNNBEK.js";
|
|
16
16
|
import "./chunk-XHKBHWLX.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-QAGWWDXQ.js";
|
|
18
|
+
import "./chunk-7HGR5GNY.js";
|
|
19
|
+
import "./chunk-SIHYBIEN.js";
|
|
20
|
+
import "./chunk-PR2VDVCP.js";
|
|
21
21
|
import "./chunk-ZGADIZDS.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-GQYX24UC.js";
|
|
23
23
|
import "./chunk-GMXKITVA.js";
|
|
24
24
|
import "./chunk-6ICPEJY5.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-LDQGURCF.js";
|
|
26
26
|
import "./chunk-N6IOSZOE.js";
|
|
27
27
|
import "./chunk-MD4SVNT6.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-ZSGJYSF2.js";
|
|
29
|
+
import "./chunk-I3W7GJ5R.js";
|
|
30
|
+
import "./chunk-XXLCYKVS.js";
|
|
31
|
+
import "./chunk-NQ67AF3V.js";
|
|
32
32
|
import "./chunk-POFBE6ZY.js";
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-UM5WXBKN.js";
|
|
34
|
+
import "./chunk-H4F5O3RE.js";
|
|
35
35
|
import "./chunk-7QLSKOSU.js";
|
|
36
36
|
import "./chunk-KZERVKTD.js";
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-Q3UMWSE4.js";
|
|
38
|
+
import "./chunk-UJZ7AGSC.js";
|
|
39
39
|
import "./chunk-T7E75EKA.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-2M52CFVO.js";
|
|
41
|
+
import "./chunk-TCXL5FQQ.js";
|
|
42
42
|
import "./chunk-5RGA636G.js";
|
|
43
43
|
export {
|
|
44
44
|
ensureCodexTrustAfterReapply,
|