@pushary/agent-hooks 0.90.1 → 0.91.0
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 +27 -0
- package/dist/bin/pushary-bell.js +6 -61
- package/dist/bin/pushary-claude.js +5 -5
- package/dist/bin/pushary-clean.js +98 -14
- package/dist/bin/pushary-codex-bridge.js +3 -3
- package/dist/bin/pushary-codex-hook.js +3 -3
- package/dist/bin/pushary-codex.js +3 -3
- package/dist/bin/pushary-connect.js +2 -2
- package/dist/bin/pushary-daemon.js +9 -9
- package/dist/bin/pushary-disconnect.js +2 -2
- package/dist/bin/pushary-doctor.js +13 -13
- package/dist/bin/pushary-elicitation-hook.js +2 -2
- package/dist/bin/pushary-gemini-bridge.js +3 -3
- package/dist/bin/pushary-gemini-hook.js +3 -3
- package/dist/bin/pushary-hook.js +4 -4
- package/dist/bin/pushary-login.js +4 -4
- package/dist/bin/pushary-logout.js +1 -1
- package/dist/bin/pushary-mode.js +2 -2
- package/dist/bin/pushary-notification-hook.js +3 -3
- package/dist/bin/pushary-opencode-hook.js +3 -3
- package/dist/bin/pushary-permission-denied-hook.js +4 -4
- package/dist/bin/pushary-permission-hook.js +4 -4
- package/dist/bin/pushary-post-hook.js +3 -3
- package/dist/bin/pushary-prompt-hook.js +3 -3
- package/dist/bin/pushary-session-end-hook.js +3 -3
- package/dist/bin/pushary-session-start-hook.js +3 -3
- package/dist/bin/pushary-setup.js +127 -180
- package/dist/bin/pushary-status.js +4 -4
- package/dist/bin/pushary-stop-hook.js +3 -3
- package/dist/bin/pushary-stopfailure-hook.js +3 -3
- package/dist/bin/pushary-upgrade.js +8 -8
- package/dist/bin/pushary-wait.js +2 -2
- package/dist/{chunk-B6H2KAQC.js → chunk-4IEW4ZRF.js} +2 -2
- package/dist/{chunk-54ELC7D7.js → chunk-AWHCZOZO.js} +1 -1
- package/dist/chunk-B65JGBIZ.js +539 -0
- package/dist/{chunk-KUZWXPUS.js → chunk-BVNYTQ5I.js} +23 -0
- package/dist/{chunk-AJYV3VGU.js → chunk-BXTJVM7O.js} +2 -0
- package/dist/{chunk-FQL5E6NG.js → chunk-CRVJCKIN.js} +85 -2
- package/dist/chunk-DSTLA2TC.js +68 -0
- package/dist/{chunk-GL3FFM7A.js → chunk-ELHCIEMM.js} +1 -1
- package/dist/{chunk-Y6BWPERV.js → chunk-GQ5ZC2QY.js} +1 -1
- package/dist/chunk-GU3EJCVV.js +43 -0
- package/dist/{chunk-4LOPSGLP.js → chunk-TVZQMPB7.js} +1 -1
- package/dist/{chunk-BQBEH6TV.js → chunk-VAMBUKXH.js} +4 -4
- package/dist/{chunk-DZDI62LY.js → chunk-WGKC6PU2.js} +2 -2
- package/dist/{chunk-7TPQEWUZ.js → chunk-YTD6PJM7.js} +1 -1
- package/dist/{chunk-H2QZRQR2.js → chunk-YTDH3XCE.js} +1 -1
- package/dist/{chunk-F2ICEWZL.js → chunk-Z4XCN2HH.js} +2 -2
- package/dist/{chunk-DYP6SMOR.js → chunk-Z6RFZKY4.js} +1 -1
- package/dist/src/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-AZPIQG4G.js +0 -274
- package/dist/chunk-S6LYP7QA.js +0 -127
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.91.0
|
|
4
|
+
|
|
5
|
+
### Setup adopts the key the Mac app is already signed in with
|
|
6
|
+
|
|
7
|
+
The Mac app authenticates through Clerk and writes its API key into every agent
|
|
8
|
+
config it wires, but never into `~/.pushary/config.json`. Setup's key ladder did
|
|
9
|
+
not look there, so a Mac the app had already connected still fell through to the
|
|
10
|
+
pairing QR and minted a second key for an account that was already live.
|
|
11
|
+
|
|
12
|
+
The ladder gains one rung between the environment and pairing: a key the Mac app
|
|
13
|
+
wrote, probed against the server exactly like the stored and environment rungs
|
|
14
|
+
are, and skipped whenever `--key` was passed or `--connect app` was typed. Both
|
|
15
|
+
of those still mean what they meant.
|
|
16
|
+
|
|
17
|
+
## 0.90.2
|
|
18
|
+
|
|
19
|
+
### The Mac app and CLI coexist without a hook takeover
|
|
20
|
+
|
|
21
|
+
Setup keeps live Mac app hooks in place without prompting, while verifying that
|
|
22
|
+
the app and mobile setup belong to the same Pushary tenant. Distinct keys for the
|
|
23
|
+
same tenant coexist; a different or unverifiable account is reported without
|
|
24
|
+
silently replacing the app's wiring. Stale app hooks are repaired by the CLI.
|
|
25
|
+
|
|
26
|
+
An explicit `--take-over-hooks` remains reversible. Clean restores the app's
|
|
27
|
+
hooks, MCP credentials, and Codex trust from a retry-safe receipt before removing
|
|
28
|
+
the CLI, and dry runs no longer claim that restoration already happened.
|
|
29
|
+
|
|
3
30
|
## 0.90.1
|
|
4
31
|
|
|
5
32
|
### Daemon logs distinguish health from failure
|
package/dist/bin/pushary-bell.js
CHANGED
|
@@ -7,12 +7,15 @@ import {
|
|
|
7
7
|
upgradeThreshold
|
|
8
8
|
} from "../chunk-5NAZ7SFS.js";
|
|
9
9
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
addBellHooks,
|
|
11
|
+
bellInstalled,
|
|
12
|
+
removeBellHooks
|
|
13
|
+
} from "../chunk-DSTLA2TC.js";
|
|
14
|
+
import "../chunk-EZIEXHYM.js";
|
|
12
15
|
import "../chunk-L4ZCFMWW.js";
|
|
13
16
|
import {
|
|
14
17
|
claudeSettings
|
|
15
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-BVNYTQ5I.js";
|
|
16
19
|
import {
|
|
17
20
|
createIo
|
|
18
21
|
} from "../chunk-5RUIFDTP.js";
|
|
@@ -38,64 +41,6 @@ import {
|
|
|
38
41
|
import "../chunk-2UMNXADU.js";
|
|
39
42
|
import "../chunk-VNMKIJZB.js";
|
|
40
43
|
|
|
41
|
-
// src/bell/install.ts
|
|
42
|
-
import { join } from "path";
|
|
43
|
-
var asRecord = (value) => value && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
44
|
-
var ensureRecord = (parent, key) => {
|
|
45
|
-
const existing = asRecord(parent[key]);
|
|
46
|
-
if (existing) return existing;
|
|
47
|
-
const created = {};
|
|
48
|
-
parent[key] = created;
|
|
49
|
-
return created;
|
|
50
|
-
};
|
|
51
|
-
var BELL_HOOK_BINARY = "pushary-bell-hook";
|
|
52
|
-
var isBellHook = (entry) => {
|
|
53
|
-
const hooks = asRecord(entry)?.hooks;
|
|
54
|
-
if (!Array.isArray(hooks)) return false;
|
|
55
|
-
return hooks.some((hook) => String(asRecord(hook)?.command ?? "").includes(BELL_HOOK_BINARY));
|
|
56
|
-
};
|
|
57
|
-
var BELL_TIMEOUT_SECONDS = 5;
|
|
58
|
-
var BELL_NOTIFICATION_MATCHER = "idle_prompt|agent_needs_input|agent_completed";
|
|
59
|
-
var addBellHooks = (settings, binDir) => {
|
|
60
|
-
const resolve = (name) => guardBinary(binDir ? join(binDir, name) : name);
|
|
61
|
-
const hooks = ensureRecord(settings, "hooks");
|
|
62
|
-
const notification = (Array.isArray(hooks.Notification) ? hooks.Notification : []).filter((entry) => !isBellHook(entry));
|
|
63
|
-
notification.push({
|
|
64
|
-
matcher: BELL_NOTIFICATION_MATCHER,
|
|
65
|
-
hooks: [{ type: "command", command: resolve(BELL_HOOK_BINARY), timeout: BELL_TIMEOUT_SECONDS }]
|
|
66
|
-
});
|
|
67
|
-
hooks.Notification = notification;
|
|
68
|
-
const stop = Array.isArray(hooks.Stop) ? hooks.Stop.filter((entry) => !isBellHook(entry)) : [];
|
|
69
|
-
if (Array.isArray(hooks.Stop)) {
|
|
70
|
-
if (stop.length === 0) delete hooks.Stop;
|
|
71
|
-
else hooks.Stop = stop;
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
var removeBellHooks = (settings) => {
|
|
75
|
-
const hooks = asRecord(settings.hooks);
|
|
76
|
-
if (!hooks) return false;
|
|
77
|
-
let changed = false;
|
|
78
|
-
for (const key of ["Stop", "Notification"]) {
|
|
79
|
-
const entries = hooks[key];
|
|
80
|
-
if (!Array.isArray(entries)) continue;
|
|
81
|
-
const filtered = entries.filter((entry) => !isBellHook(entry));
|
|
82
|
-
if (filtered.length === entries.length) continue;
|
|
83
|
-
if (filtered.length === 0) delete hooks[key];
|
|
84
|
-
else hooks[key] = filtered;
|
|
85
|
-
changed = true;
|
|
86
|
-
}
|
|
87
|
-
if (Object.keys(hooks).length === 0) delete settings.hooks;
|
|
88
|
-
return changed;
|
|
89
|
-
};
|
|
90
|
-
var bellInstalled = (settings) => {
|
|
91
|
-
const hooks = asRecord(settings.hooks);
|
|
92
|
-
if (!hooks) return false;
|
|
93
|
-
return ["Stop", "Notification"].some((key) => {
|
|
94
|
-
const entries = hooks[key];
|
|
95
|
-
return Array.isArray(entries) && entries.some(isBellHook);
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
|
|
99
44
|
// bin/pushary-bell.ts
|
|
100
45
|
exitOnHelpFlag("bell");
|
|
101
46
|
var { bold, cyan, dim, green, yellow } = createIo();
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "../chunk-YKLCWWEI.js";
|
|
8
8
|
import {
|
|
9
9
|
ensureDaemonRunning
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-Z4XCN2HH.js";
|
|
11
11
|
import {
|
|
12
12
|
buildTranscriptRecords,
|
|
13
13
|
decodePublicKey,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
describeIdleWindow,
|
|
27
27
|
startProcessOwnership,
|
|
28
28
|
withSpawnProcessOwnership
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-GQ5ZC2QY.js";
|
|
30
30
|
import {
|
|
31
31
|
needsShell,
|
|
32
32
|
spawnClaude
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
phoneDrivenEnv,
|
|
42
42
|
repoKeyFor,
|
|
43
43
|
reportEvent
|
|
44
|
-
} from "../chunk-
|
|
44
|
+
} from "../chunk-TVZQMPB7.js";
|
|
45
45
|
import {
|
|
46
46
|
DEFAULT_SESSION,
|
|
47
47
|
askUser,
|
|
@@ -62,8 +62,8 @@ import {
|
|
|
62
62
|
} from "../chunk-L4E2BIJ2.js";
|
|
63
63
|
import {
|
|
64
64
|
getMachineId
|
|
65
|
-
} from "../chunk-
|
|
66
|
-
import "../chunk-
|
|
65
|
+
} from "../chunk-AWHCZOZO.js";
|
|
66
|
+
import "../chunk-BVNYTQ5I.js";
|
|
67
67
|
import "../chunk-DINDL2CF.js";
|
|
68
68
|
import "../chunk-OSALSIUF.js";
|
|
69
69
|
import "../chunk-BC3VCZ3E.js";
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
HERMES_CONFIG_SCRIPT,
|
|
4
|
+
HERMES_PIP_PACKAGE,
|
|
4
5
|
createGuards,
|
|
6
|
+
hookOwnerOf,
|
|
7
|
+
isHookTakeoverReceipt,
|
|
5
8
|
resolveHermesPython,
|
|
9
|
+
restoreHookTakeover,
|
|
10
|
+
restoreMcpServer,
|
|
6
11
|
runHermesPythonScript
|
|
7
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-B65JGBIZ.js";
|
|
8
13
|
import {
|
|
9
14
|
removeInstructionBlock,
|
|
10
15
|
shortenHome,
|
|
11
16
|
unregisterPluginLocation,
|
|
12
17
|
vscodeSettingsTargets
|
|
13
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-CRVJCKIN.js";
|
|
14
19
|
import {
|
|
15
20
|
pusharyHookExecutable
|
|
16
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-WGKC6PU2.js";
|
|
17
22
|
import {
|
|
18
23
|
OPENCODE_PLUGIN_SIBLING,
|
|
19
24
|
OPENCODE_PLUGIN_SIBLING_CONTENTS,
|
|
@@ -30,18 +35,19 @@ import {
|
|
|
30
35
|
removeGeminiSettings,
|
|
31
36
|
removePusharySettings,
|
|
32
37
|
restoreClaudeMcpServer
|
|
33
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-ELHCIEMM.js";
|
|
34
39
|
import "../chunk-2LAHXHBR.js";
|
|
40
|
+
import "../chunk-DSTLA2TC.js";
|
|
35
41
|
import "../chunk-EZIEXHYM.js";
|
|
36
42
|
import {
|
|
37
43
|
disableDaemonService
|
|
38
|
-
} from "../chunk-
|
|
44
|
+
} from "../chunk-Z4XCN2HH.js";
|
|
39
45
|
import "../chunk-XHKBHWLX.js";
|
|
40
46
|
import {
|
|
41
47
|
execNpm
|
|
42
48
|
} from "../chunk-L4ZCFMWW.js";
|
|
43
49
|
import "../chunk-L4E2BIJ2.js";
|
|
44
|
-
import "../chunk-
|
|
50
|
+
import "../chunk-AWHCZOZO.js";
|
|
45
51
|
import {
|
|
46
52
|
claudeJson,
|
|
47
53
|
claudeMcpReceipt,
|
|
@@ -59,12 +65,15 @@ import {
|
|
|
59
65
|
geminiMd,
|
|
60
66
|
geminiSettings,
|
|
61
67
|
hermesConfigReceipt,
|
|
68
|
+
hookTakeoverReceipt,
|
|
62
69
|
isProtectedByScope,
|
|
63
70
|
pusharyDir,
|
|
64
71
|
removeCodexHookTrust,
|
|
65
72
|
removeCodexHooks,
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
restoreCodexHookTrust,
|
|
74
|
+
vscodePluginDir,
|
|
75
|
+
vscodePluginMcp
|
|
76
|
+
} from "../chunk-BVNYTQ5I.js";
|
|
68
77
|
import {
|
|
69
78
|
rejectUnknownFlags
|
|
70
79
|
} from "../chunk-GMXKITVA.js";
|
|
@@ -120,6 +129,7 @@ var check = green("\u2713");
|
|
|
120
129
|
var skip = yellow("\u2013");
|
|
121
130
|
var cross = red("\u2717");
|
|
122
131
|
var incompleteClean = false;
|
|
132
|
+
var keepCliRuntime = false;
|
|
123
133
|
var CLAUDE_SETTINGS = claudeSettings();
|
|
124
134
|
var CLAUDE_SETTINGS_LOCAL = claudeSettingsLocal();
|
|
125
135
|
var CLAUDE_JSON = claudeJson();
|
|
@@ -241,6 +251,66 @@ var cleanSettingsFile = (path, label, scope) => {
|
|
|
241
251
|
` ${skip} ${label} ${dim(wouldHaveChanged ? "(kept: written by the Mac app)" : "(no pushary entries)")}`
|
|
242
252
|
);
|
|
243
253
|
};
|
|
254
|
+
var restoreTakeoverReceipts = () => {
|
|
255
|
+
const targets = [
|
|
256
|
+
["claude_code", CLAUDE_SETTINGS, CLAUDE_JSON, "mcpServers", "json"],
|
|
257
|
+
["codex", codexHooksJson(), codexConfigToml(), "mcp_servers", "toml"],
|
|
258
|
+
["gemini_cli", geminiSettings(), geminiSettings(), "mcpServers", "json"],
|
|
259
|
+
["cursor", CURSOR_USER_HOOKS, null, null, null],
|
|
260
|
+
["vscode", join(VSCODE_PLUGIN_DIR, "hooks", "hooks.json"), vscodePluginMcp(), "mcpServers", "json"]
|
|
261
|
+
];
|
|
262
|
+
for (const [agent, hookFile, mcpFile, mcpKey, mcpFormat] of targets) {
|
|
263
|
+
const receiptPath = hookTakeoverReceipt(agent);
|
|
264
|
+
if (!existsSync(receiptPath)) continue;
|
|
265
|
+
try {
|
|
266
|
+
const receipt = readJson(receiptPath);
|
|
267
|
+
if (!isHookTakeoverReceipt(receipt) || receipt.agent !== agent) throw new Error("invalid receipt");
|
|
268
|
+
const document = existsSync(hookFile) ? JSON.parse(readFileSync(hookFile, "utf-8")) : {};
|
|
269
|
+
if (!document || typeof document !== "object" || Array.isArray(document)) throw new Error("invalid hooks file");
|
|
270
|
+
const appAlreadyOwns = hookOwnerOf(document) === "app";
|
|
271
|
+
const cliPositions = agent === "codex" ? codexHookPositions(document) : {};
|
|
272
|
+
restoreHookTakeover(document, receipt);
|
|
273
|
+
let mcpDocument = null;
|
|
274
|
+
let mcpChanged = false;
|
|
275
|
+
if (!appAlreadyOwns && receipt.mcpServer && mcpFile && mcpKey) {
|
|
276
|
+
if (mcpFile === hookFile) {
|
|
277
|
+
mcpDocument = document;
|
|
278
|
+
} else {
|
|
279
|
+
const raw = existsSync(mcpFile) ? readFileSync(mcpFile, "utf-8") : "";
|
|
280
|
+
mcpDocument = raw.trim() ? mcpFormat === "toml" ? parseTOML(raw) : JSON.parse(raw) : {};
|
|
281
|
+
}
|
|
282
|
+
mcpChanged = restoreMcpServer(mcpDocument, mcpKey, receipt.mcpServer);
|
|
283
|
+
}
|
|
284
|
+
let codexConfig = null;
|
|
285
|
+
let codexConfigChanged = false;
|
|
286
|
+
if (!appAlreadyOwns && agent === "codex") {
|
|
287
|
+
if (!mcpDocument) {
|
|
288
|
+
const configPath = codexConfigToml();
|
|
289
|
+
const raw = existsSync(configPath) ? readFileSync(configPath, "utf-8") : "";
|
|
290
|
+
mcpDocument = raw.trim() ? parseTOML(raw) : {};
|
|
291
|
+
}
|
|
292
|
+
codexConfig = mcpDocument;
|
|
293
|
+
codexConfigChanged = removeCodexHookTrust(codexConfig, hookFile, cliPositions);
|
|
294
|
+
codexConfigChanged = restoreCodexHookTrust(
|
|
295
|
+
codexConfig,
|
|
296
|
+
hookFile,
|
|
297
|
+
codexHookPositions(document),
|
|
298
|
+
receipt.codexTrust ?? {}
|
|
299
|
+
) || codexConfigChanged;
|
|
300
|
+
}
|
|
301
|
+
if (mcpDocument && mcpFile !== hookFile && mcpFormat === "json" && mcpChanged) writeJson(mcpFile, mcpDocument);
|
|
302
|
+
if (codexConfig && (codexConfigChanged || mcpChanged)) guardedWrite(codexConfigToml(), stringifyTOML(codexConfig));
|
|
303
|
+
writeJson(hookFile, document);
|
|
304
|
+
guardedRemove(receiptPath, { force: true });
|
|
305
|
+
const status = dryRun ? "would restore Mac app wiring" : "restored Mac app wiring";
|
|
306
|
+
console.log(` ${check} ${agent.replace("_", " ")} hooks ${dim(`(${status})`)}`);
|
|
307
|
+
} catch {
|
|
308
|
+
incompleteClean = true;
|
|
309
|
+
keepCliRuntime = true;
|
|
310
|
+
console.log(` ${cross} ${agent.replace("_", " ")} hooks ${dim("(could not restore Mac app wiring; receipt and CLI kept)")}`);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
};
|
|
244
314
|
var main = async () => {
|
|
245
315
|
console.log();
|
|
246
316
|
console.log(` ${bold("Pushary Clean")}`);
|
|
@@ -278,6 +348,12 @@ var main = async () => {
|
|
|
278
348
|
console.log(` ${dim("The Mac app is installed, so its wiring and the state it owns are left alone.")}`);
|
|
279
349
|
console.log();
|
|
280
350
|
}
|
|
351
|
+
if (keepShared) restoreTakeoverReceipts();
|
|
352
|
+
if (keepCliRuntime) {
|
|
353
|
+
console.log(` ${yellow(bold("Clean stopped before changing provider configuration."))}`);
|
|
354
|
+
console.log(` ${dim("Fix the hooks file or receipt above, then re-run")} npx @pushary/agent-hooks@latest clean`);
|
|
355
|
+
process.exit(EXIT.FAILED);
|
|
356
|
+
}
|
|
281
357
|
const daemonRemoved = await guardedDaemonRemoval();
|
|
282
358
|
if (!daemonRemoved) {
|
|
283
359
|
console.log(` ${cross} Background service ${dim("(could not stop or uninstall)")}`);
|
|
@@ -368,7 +444,9 @@ var main = async () => {
|
|
|
368
444
|
guardedRemove(VSCODE_PLUGIN_DIR);
|
|
369
445
|
console.log(` ${check} VS Code plugin files ${dim(did("removed"))}`);
|
|
370
446
|
}
|
|
371
|
-
if (
|
|
447
|
+
if (keepShared) {
|
|
448
|
+
console.log(` ${skip} Skill directory ${dim("(kept: the Mac app uses it)")}`);
|
|
449
|
+
} else if (existsSync(SKILL_DIR)) {
|
|
372
450
|
guardedRemove(SKILL_DIR);
|
|
373
451
|
console.log(` ${check} Skill directory ${dim(did("removed"))}`);
|
|
374
452
|
} else {
|
|
@@ -381,7 +459,7 @@ var main = async () => {
|
|
|
381
459
|
try {
|
|
382
460
|
const config = readFileSync(codexConfig, "utf-8");
|
|
383
461
|
const parsed = parseTOML(config);
|
|
384
|
-
const trustRemoved = removeCodexHookTrust(parsed, codexHooksJson2, codexPositions);
|
|
462
|
+
const trustRemoved = hookOwnerOf(codexHooksData) === "app" ? false : removeCodexHookTrust(parsed, codexHooksJson2, codexPositions);
|
|
385
463
|
const hadPushary = config.includes("pushary");
|
|
386
464
|
if (hadPushary || trustRemoved) {
|
|
387
465
|
if (!keepShared) {
|
|
@@ -414,13 +492,17 @@ var main = async () => {
|
|
|
414
492
|
console.log(` ${skip} Codex hooks ${dim("(not found)")}`);
|
|
415
493
|
}
|
|
416
494
|
const codexAgentsMd2 = codexAgentsMd();
|
|
417
|
-
if (
|
|
495
|
+
if (keepShared) {
|
|
496
|
+
console.log(` ${skip} Codex AGENTS.md ${dim("(kept: the Mac app uses it)")}`);
|
|
497
|
+
} else if (guardedInstructionBlockRemoval(codexAgentsMd2)) {
|
|
418
498
|
console.log(` ${check} Codex AGENTS.md ${dim("(removed Pushary block)")}`);
|
|
419
499
|
} else {
|
|
420
500
|
console.log(` ${skip} Codex AGENTS.md ${dim("(no pushary block)")}`);
|
|
421
501
|
}
|
|
422
502
|
const codexSkillDir2 = codexSkillDir();
|
|
423
|
-
if (
|
|
503
|
+
if (keepShared) {
|
|
504
|
+
console.log(` ${skip} Codex skill directory ${dim("(kept: the Mac app uses it)")}`);
|
|
505
|
+
} else if (existsSync(codexSkillDir2)) {
|
|
424
506
|
guardedRemove(codexSkillDir2);
|
|
425
507
|
console.log(` ${check} Codex skill directory ${dim(did("removed"))}`);
|
|
426
508
|
} else {
|
|
@@ -439,7 +521,9 @@ var main = async () => {
|
|
|
439
521
|
console.log(` ${skip} Gemini CLI settings ${dim("(not found)")}`);
|
|
440
522
|
}
|
|
441
523
|
const geminiMd2 = geminiMd();
|
|
442
|
-
if (
|
|
524
|
+
if (keepShared) {
|
|
525
|
+
console.log(` ${skip} Gemini GEMINI.md ${dim("(kept: the Mac app uses it)")}`);
|
|
526
|
+
} else if (guardedInstructionBlockRemoval(geminiMd2)) {
|
|
443
527
|
console.log(` ${check} Gemini GEMINI.md ${dim("(removed Pushary block)")}`);
|
|
444
528
|
} else {
|
|
445
529
|
console.log(` ${skip} Gemini GEMINI.md ${dim("(no pushary block)")}`);
|
|
@@ -491,7 +575,7 @@ var main = async () => {
|
|
|
491
575
|
} else {
|
|
492
576
|
console.log(` ${check} Hermes config ${dim("(setup-owned changes restored)")}`);
|
|
493
577
|
try {
|
|
494
|
-
guardedExec(`"${hermesPython}" -m pip uninstall -y
|
|
578
|
+
guardedExec(`"${hermesPython}" -m pip uninstall -y ${HERMES_PIP_PACKAGE}`, { stdio: "pipe", timeout: 6e4 }, `pip uninstall ${HERMES_PIP_PACKAGE}`);
|
|
495
579
|
console.log(` ${check} Hermes plugin ${dim("(pip uninstalled)")}`);
|
|
496
580
|
} catch {
|
|
497
581
|
incompleteClean = true;
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
idleDeadlinePassed,
|
|
19
19
|
startProcessOwnership,
|
|
20
20
|
withSpawnProcessOwnership
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-GQ5ZC2QY.js";
|
|
22
22
|
import {
|
|
23
23
|
spawnClaude
|
|
24
24
|
} from "../chunk-XHKBHWLX.js";
|
|
@@ -27,8 +27,8 @@ import {
|
|
|
27
27
|
} from "../chunk-L4ZCFMWW.js";
|
|
28
28
|
import {
|
|
29
29
|
getMachineId
|
|
30
|
-
} from "../chunk-
|
|
31
|
-
import "../chunk-
|
|
30
|
+
} from "../chunk-AWHCZOZO.js";
|
|
31
|
+
import "../chunk-BVNYTQ5I.js";
|
|
32
32
|
import "../chunk-OSALSIUF.js";
|
|
33
33
|
import "../chunk-BC3VCZ3E.js";
|
|
34
34
|
import "../chunk-JW4KO5AF.js";
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
toCodexWire,
|
|
35
35
|
toPolicyLookup,
|
|
36
36
|
toPolicyLookups
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-TVZQMPB7.js";
|
|
38
38
|
import {
|
|
39
39
|
DEFAULT_SESSION,
|
|
40
40
|
askUser,
|
|
@@ -53,10 +53,10 @@ import {
|
|
|
53
53
|
} from "../chunk-L4E2BIJ2.js";
|
|
54
54
|
import {
|
|
55
55
|
getMachineId
|
|
56
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-AWHCZOZO.js";
|
|
57
57
|
import {
|
|
58
58
|
canonicalJson
|
|
59
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-BVNYTQ5I.js";
|
|
60
60
|
import "../chunk-BSZYIAZL.js";
|
|
61
61
|
import "../chunk-SAF6HGAA.js";
|
|
62
62
|
import "../chunk-7QLSKOSU.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
reportEvent
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-TVZQMPB7.js";
|
|
5
5
|
import {
|
|
6
6
|
askUser,
|
|
7
7
|
waitForAnswer
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
import "../chunk-L4E2BIJ2.js";
|
|
10
10
|
import {
|
|
11
11
|
getMachineId
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-AWHCZOZO.js";
|
|
13
|
+
import "../chunk-BVNYTQ5I.js";
|
|
14
14
|
import "../chunk-BSZYIAZL.js";
|
|
15
15
|
import "../chunk-SAF6HGAA.js";
|
|
16
16
|
import "../chunk-7QLSKOSU.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
printKeyCheck
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-Z6RFZKY4.js";
|
|
5
5
|
import {
|
|
6
6
|
connectDevice,
|
|
7
7
|
connectExistingApp,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import "../chunk-3EGEA4KH.js";
|
|
11
11
|
import {
|
|
12
12
|
checkApiKey
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-BXTJVM7O.js";
|
|
14
14
|
import "../chunk-QCGNGEGE.js";
|
|
15
15
|
import {
|
|
16
16
|
createIo
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
inspectConfiguredManagedProviders
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-VAMBUKXH.js";
|
|
5
|
+
import "../chunk-YTDH3XCE.js";
|
|
6
6
|
import {
|
|
7
7
|
HEARTBEAT_INTERVAL_MS,
|
|
8
8
|
sendHeartbeat
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-YTD6PJM7.js";
|
|
10
|
+
import "../chunk-WGKC6PU2.js";
|
|
11
|
+
import "../chunk-ELHCIEMM.js";
|
|
12
12
|
import "../chunk-2LAHXHBR.js";
|
|
13
13
|
import "../chunk-EZIEXHYM.js";
|
|
14
14
|
import {
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
requestDaemonHandoff,
|
|
28
28
|
stopDaemonRunning,
|
|
29
29
|
writeDaemonNeedsLogin
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-Z4XCN2HH.js";
|
|
31
31
|
import {
|
|
32
32
|
detectProviderLiveCapabilities,
|
|
33
33
|
hasSpawnProvider,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
listProcessProofs,
|
|
41
41
|
ownsLiveProcess,
|
|
42
42
|
silentSpawnedProofs
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-GQ5ZC2QY.js";
|
|
44
44
|
import {
|
|
45
45
|
spawnClaude
|
|
46
46
|
} from "../chunk-XHKBHWLX.js";
|
|
@@ -49,8 +49,8 @@ import {
|
|
|
49
49
|
} from "../chunk-L4ZCFMWW.js";
|
|
50
50
|
import {
|
|
51
51
|
getMachineId
|
|
52
|
-
} from "../chunk-
|
|
53
|
-
import "../chunk-
|
|
52
|
+
} from "../chunk-AWHCZOZO.js";
|
|
53
|
+
import "../chunk-BVNYTQ5I.js";
|
|
54
54
|
import {
|
|
55
55
|
writeHuman
|
|
56
56
|
} from "../chunk-QCGNGEGE.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
removeGeminiSettings,
|
|
16
16
|
removePusharySettings,
|
|
17
17
|
restoreClaudeMcpServer
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-ELHCIEMM.js";
|
|
19
19
|
import "../chunk-2LAHXHBR.js";
|
|
20
20
|
import "../chunk-EZIEXHYM.js";
|
|
21
21
|
import "../chunk-L4ZCFMWW.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
geminiSettings,
|
|
33
33
|
removeCodexHooks,
|
|
34
34
|
removeCodexSettings
|
|
35
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-BVNYTQ5I.js";
|
|
36
36
|
import {
|
|
37
37
|
exitOnHelpFlag
|
|
38
38
|
} from "../chunk-BVBEURWJ.js";
|
|
@@ -3,26 +3,26 @@ import {
|
|
|
3
3
|
describeWaitLadder
|
|
4
4
|
} from "../chunk-IIENZE2J.js";
|
|
5
5
|
import {
|
|
6
|
-
describeBridgeResolution,
|
|
7
|
-
isBridgeLocator,
|
|
8
|
-
liveBridgeProbe,
|
|
9
6
|
readServiceExecPath,
|
|
10
|
-
resolveBridgeStub,
|
|
11
7
|
versionManagerOf
|
|
12
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-GU3EJCVV.js";
|
|
13
9
|
import {
|
|
14
10
|
readMachineReadiness
|
|
15
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-YTD6PJM7.js";
|
|
16
12
|
import {
|
|
17
13
|
CURSOR_GATE_SCRIPT,
|
|
18
14
|
agentProbes,
|
|
15
|
+
describeBridgeResolution,
|
|
19
16
|
detectAgent,
|
|
20
17
|
detectAllAgents,
|
|
21
18
|
hasInstructionBlock,
|
|
19
|
+
isBridgeLocator,
|
|
22
20
|
isDetected,
|
|
23
21
|
isPluginRegistered,
|
|
22
|
+
liveBridgeProbe,
|
|
23
|
+
resolveBridgeStub,
|
|
24
24
|
vscodeSettingsTargets
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-CRVJCKIN.js";
|
|
26
26
|
import {
|
|
27
27
|
claudeOtherHolders,
|
|
28
28
|
claudeWired,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
geminiWired,
|
|
38
38
|
holdsLong,
|
|
39
39
|
pusharyHookExecutable
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-WGKC6PU2.js";
|
|
41
41
|
import {
|
|
42
42
|
OPENCODE_PLUGIN_PLACEHOLDER,
|
|
43
43
|
openCodePluginDir,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
GEMINI_HOOK_BINARY,
|
|
49
49
|
hasGeminiHooks,
|
|
50
50
|
missingGeminiHookEvents
|
|
51
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-ELHCIEMM.js";
|
|
52
52
|
import "../chunk-2LAHXHBR.js";
|
|
53
53
|
import "../chunk-EZIEXHYM.js";
|
|
54
54
|
import {
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
readDaemonNeedsLogin,
|
|
60
60
|
readDaemonStatus,
|
|
61
61
|
readInstalledDaemonService
|
|
62
|
-
} from "../chunk-
|
|
62
|
+
} from "../chunk-Z4XCN2HH.js";
|
|
63
63
|
import {
|
|
64
64
|
detectProviderLiveCapabilities,
|
|
65
65
|
hasSpawnProvider,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
import "../chunk-L4E2BIJ2.js";
|
|
76
76
|
import {
|
|
77
77
|
getMachineId
|
|
78
|
-
} from "../chunk-
|
|
78
|
+
} from "../chunk-AWHCZOZO.js";
|
|
79
79
|
import {
|
|
80
80
|
claudeJson,
|
|
81
81
|
claudeSettings,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
readCodexMcpAuth,
|
|
97
97
|
untrustedCodexHookEvents,
|
|
98
98
|
vscodePluginDir
|
|
99
|
-
} from "../chunk-
|
|
99
|
+
} from "../chunk-BVNYTQ5I.js";
|
|
100
100
|
import {
|
|
101
101
|
describeReach,
|
|
102
102
|
describeRoundTrip,
|
|
@@ -108,7 +108,7 @@ import "../chunk-3EGEA4KH.js";
|
|
|
108
108
|
import {
|
|
109
109
|
checkApiKey,
|
|
110
110
|
describeKeyCheck
|
|
111
|
-
} from "../chunk-
|
|
111
|
+
} from "../chunk-BXTJVM7O.js";
|
|
112
112
|
import "../chunk-QCGNGEGE.js";
|
|
113
113
|
import {
|
|
114
114
|
createIo
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
} from "../chunk-F7OURW3C.js";
|
|
15
15
|
import {
|
|
16
16
|
getMachineId
|
|
17
|
-
} from "../chunk-
|
|
18
|
-
import "../chunk-
|
|
17
|
+
} from "../chunk-AWHCZOZO.js";
|
|
18
|
+
import "../chunk-BVNYTQ5I.js";
|
|
19
19
|
import "../chunk-BSZYIAZL.js";
|
|
20
20
|
import "../chunk-SAF6HGAA.js";
|
|
21
21
|
import "../chunk-7QLSKOSU.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
idleDeadlinePassed,
|
|
18
18
|
startProcessOwnership,
|
|
19
19
|
withSpawnProcessOwnership
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-GQ5ZC2QY.js";
|
|
21
21
|
import {
|
|
22
22
|
spawnClaude
|
|
23
23
|
} from "../chunk-XHKBHWLX.js";
|
|
@@ -26,8 +26,8 @@ import {
|
|
|
26
26
|
} from "../chunk-L4ZCFMWW.js";
|
|
27
27
|
import {
|
|
28
28
|
getMachineId
|
|
29
|
-
} from "../chunk-
|
|
30
|
-
import "../chunk-
|
|
29
|
+
} from "../chunk-AWHCZOZO.js";
|
|
30
|
+
import "../chunk-BVNYTQ5I.js";
|
|
31
31
|
import "../chunk-OSALSIUF.js";
|
|
32
32
|
import "../chunk-BC3VCZ3E.js";
|
|
33
33
|
import "../chunk-JW4KO5AF.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
readLastUserPrompt,
|
|
23
23
|
repoKeyFor,
|
|
24
24
|
reportEvent
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-TVZQMPB7.js";
|
|
26
26
|
import {
|
|
27
27
|
DEFAULT_SESSION,
|
|
28
28
|
askUser,
|
|
@@ -41,8 +41,8 @@ import {
|
|
|
41
41
|
} from "../chunk-L4E2BIJ2.js";
|
|
42
42
|
import {
|
|
43
43
|
getMachineId
|
|
44
|
-
} from "../chunk-
|
|
45
|
-
import "../chunk-
|
|
44
|
+
} from "../chunk-AWHCZOZO.js";
|
|
45
|
+
import "../chunk-BVNYTQ5I.js";
|
|
46
46
|
import "../chunk-BSZYIAZL.js";
|
|
47
47
|
import "../chunk-SAF6HGAA.js";
|
|
48
48
|
import "../chunk-7QLSKOSU.js";
|
package/dist/bin/pushary-hook.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
handlePreToolUse
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-4IEW4ZRF.js";
|
|
5
5
|
import "../chunk-2LAHXHBR.js";
|
|
6
6
|
import "../chunk-I463AEG3.js";
|
|
7
7
|
import "../chunk-VHWCVD42.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
readHookInput
|
|
10
10
|
} from "../chunk-6CUUA7HO.js";
|
|
11
11
|
import "../chunk-YHG74UFF.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-TVZQMPB7.js";
|
|
13
13
|
import "../chunk-F7OURW3C.js";
|
|
14
14
|
import "../chunk-L4E2BIJ2.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-AWHCZOZO.js";
|
|
16
|
+
import "../chunk-BVNYTQ5I.js";
|
|
17
17
|
import {
|
|
18
18
|
exitOnHelpFlag
|
|
19
19
|
} from "../chunk-BVBEURWJ.js";
|