@pushary/agent-hooks 0.90.1 → 0.90.2
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 +13 -0
- package/dist/bin/pushary-bell.js +6 -61
- package/dist/bin/pushary-claude.js +5 -5
- package/dist/bin/pushary-clean.js +96 -13
- 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 +104 -179
- 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-ATUUQFDH.js +536 -0
- package/dist/{chunk-54ELC7D7.js → chunk-AWHCZOZO.js} +1 -1
- 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,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.90.2
|
|
4
|
+
|
|
5
|
+
### The Mac app and CLI coexist without a hook takeover
|
|
6
|
+
|
|
7
|
+
Setup keeps live Mac app hooks in place without prompting, while verifying that
|
|
8
|
+
the app and mobile setup belong to the same Pushary tenant. Distinct keys for the
|
|
9
|
+
same tenant coexist; a different or unverifiable account is reported without
|
|
10
|
+
silently replacing the app's wiring. Stale app hooks are repaired by the CLI.
|
|
11
|
+
|
|
12
|
+
An explicit `--take-over-hooks` remains reversible. Clean restores the app's
|
|
13
|
+
hooks, MCP credentials, and Codex trust from a retry-safe receipt before removing
|
|
14
|
+
the CLI, and dry runs no longer claim that restoration already happened.
|
|
15
|
+
|
|
3
16
|
## 0.90.1
|
|
4
17
|
|
|
5
18
|
### 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";
|
|
@@ -2,18 +2,22 @@
|
|
|
2
2
|
import {
|
|
3
3
|
HERMES_CONFIG_SCRIPT,
|
|
4
4
|
createGuards,
|
|
5
|
+
hookOwnerOf,
|
|
6
|
+
isHookTakeoverReceipt,
|
|
5
7
|
resolveHermesPython,
|
|
8
|
+
restoreHookTakeover,
|
|
9
|
+
restoreMcpServer,
|
|
6
10
|
runHermesPythonScript
|
|
7
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-ATUUQFDH.js";
|
|
8
12
|
import {
|
|
9
13
|
removeInstructionBlock,
|
|
10
14
|
shortenHome,
|
|
11
15
|
unregisterPluginLocation,
|
|
12
16
|
vscodeSettingsTargets
|
|
13
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-CRVJCKIN.js";
|
|
14
18
|
import {
|
|
15
19
|
pusharyHookExecutable
|
|
16
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-WGKC6PU2.js";
|
|
17
21
|
import {
|
|
18
22
|
OPENCODE_PLUGIN_SIBLING,
|
|
19
23
|
OPENCODE_PLUGIN_SIBLING_CONTENTS,
|
|
@@ -30,18 +34,19 @@ import {
|
|
|
30
34
|
removeGeminiSettings,
|
|
31
35
|
removePusharySettings,
|
|
32
36
|
restoreClaudeMcpServer
|
|
33
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-ELHCIEMM.js";
|
|
34
38
|
import "../chunk-2LAHXHBR.js";
|
|
39
|
+
import "../chunk-DSTLA2TC.js";
|
|
35
40
|
import "../chunk-EZIEXHYM.js";
|
|
36
41
|
import {
|
|
37
42
|
disableDaemonService
|
|
38
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-Z4XCN2HH.js";
|
|
39
44
|
import "../chunk-XHKBHWLX.js";
|
|
40
45
|
import {
|
|
41
46
|
execNpm
|
|
42
47
|
} from "../chunk-L4ZCFMWW.js";
|
|
43
48
|
import "../chunk-L4E2BIJ2.js";
|
|
44
|
-
import "../chunk-
|
|
49
|
+
import "../chunk-AWHCZOZO.js";
|
|
45
50
|
import {
|
|
46
51
|
claudeJson,
|
|
47
52
|
claudeMcpReceipt,
|
|
@@ -59,12 +64,15 @@ import {
|
|
|
59
64
|
geminiMd,
|
|
60
65
|
geminiSettings,
|
|
61
66
|
hermesConfigReceipt,
|
|
67
|
+
hookTakeoverReceipt,
|
|
62
68
|
isProtectedByScope,
|
|
63
69
|
pusharyDir,
|
|
64
70
|
removeCodexHookTrust,
|
|
65
71
|
removeCodexHooks,
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
restoreCodexHookTrust,
|
|
73
|
+
vscodePluginDir,
|
|
74
|
+
vscodePluginMcp
|
|
75
|
+
} from "../chunk-BVNYTQ5I.js";
|
|
68
76
|
import {
|
|
69
77
|
rejectUnknownFlags
|
|
70
78
|
} from "../chunk-GMXKITVA.js";
|
|
@@ -120,6 +128,7 @@ var check = green("\u2713");
|
|
|
120
128
|
var skip = yellow("\u2013");
|
|
121
129
|
var cross = red("\u2717");
|
|
122
130
|
var incompleteClean = false;
|
|
131
|
+
var keepCliRuntime = false;
|
|
123
132
|
var CLAUDE_SETTINGS = claudeSettings();
|
|
124
133
|
var CLAUDE_SETTINGS_LOCAL = claudeSettingsLocal();
|
|
125
134
|
var CLAUDE_JSON = claudeJson();
|
|
@@ -241,6 +250,66 @@ var cleanSettingsFile = (path, label, scope) => {
|
|
|
241
250
|
` ${skip} ${label} ${dim(wouldHaveChanged ? "(kept: written by the Mac app)" : "(no pushary entries)")}`
|
|
242
251
|
);
|
|
243
252
|
};
|
|
253
|
+
var restoreTakeoverReceipts = () => {
|
|
254
|
+
const targets = [
|
|
255
|
+
["claude_code", CLAUDE_SETTINGS, CLAUDE_JSON, "mcpServers", "json"],
|
|
256
|
+
["codex", codexHooksJson(), codexConfigToml(), "mcp_servers", "toml"],
|
|
257
|
+
["gemini_cli", geminiSettings(), geminiSettings(), "mcpServers", "json"],
|
|
258
|
+
["cursor", CURSOR_USER_HOOKS, null, null, null],
|
|
259
|
+
["vscode", join(VSCODE_PLUGIN_DIR, "hooks", "hooks.json"), vscodePluginMcp(), "mcpServers", "json"]
|
|
260
|
+
];
|
|
261
|
+
for (const [agent, hookFile, mcpFile, mcpKey, mcpFormat] of targets) {
|
|
262
|
+
const receiptPath = hookTakeoverReceipt(agent);
|
|
263
|
+
if (!existsSync(receiptPath)) continue;
|
|
264
|
+
try {
|
|
265
|
+
const receipt = readJson(receiptPath);
|
|
266
|
+
if (!isHookTakeoverReceipt(receipt) || receipt.agent !== agent) throw new Error("invalid receipt");
|
|
267
|
+
const document = existsSync(hookFile) ? JSON.parse(readFileSync(hookFile, "utf-8")) : {};
|
|
268
|
+
if (!document || typeof document !== "object" || Array.isArray(document)) throw new Error("invalid hooks file");
|
|
269
|
+
const appAlreadyOwns = hookOwnerOf(document) === "app";
|
|
270
|
+
const cliPositions = agent === "codex" ? codexHookPositions(document) : {};
|
|
271
|
+
restoreHookTakeover(document, receipt);
|
|
272
|
+
let mcpDocument = null;
|
|
273
|
+
let mcpChanged = false;
|
|
274
|
+
if (!appAlreadyOwns && receipt.mcpServer && mcpFile && mcpKey) {
|
|
275
|
+
if (mcpFile === hookFile) {
|
|
276
|
+
mcpDocument = document;
|
|
277
|
+
} else {
|
|
278
|
+
const raw = existsSync(mcpFile) ? readFileSync(mcpFile, "utf-8") : "";
|
|
279
|
+
mcpDocument = raw.trim() ? mcpFormat === "toml" ? parseTOML(raw) : JSON.parse(raw) : {};
|
|
280
|
+
}
|
|
281
|
+
mcpChanged = restoreMcpServer(mcpDocument, mcpKey, receipt.mcpServer);
|
|
282
|
+
}
|
|
283
|
+
let codexConfig = null;
|
|
284
|
+
let codexConfigChanged = false;
|
|
285
|
+
if (!appAlreadyOwns && agent === "codex") {
|
|
286
|
+
if (!mcpDocument) {
|
|
287
|
+
const configPath = codexConfigToml();
|
|
288
|
+
const raw = existsSync(configPath) ? readFileSync(configPath, "utf-8") : "";
|
|
289
|
+
mcpDocument = raw.trim() ? parseTOML(raw) : {};
|
|
290
|
+
}
|
|
291
|
+
codexConfig = mcpDocument;
|
|
292
|
+
codexConfigChanged = removeCodexHookTrust(codexConfig, hookFile, cliPositions);
|
|
293
|
+
codexConfigChanged = restoreCodexHookTrust(
|
|
294
|
+
codexConfig,
|
|
295
|
+
hookFile,
|
|
296
|
+
codexHookPositions(document),
|
|
297
|
+
receipt.codexTrust ?? {}
|
|
298
|
+
) || codexConfigChanged;
|
|
299
|
+
}
|
|
300
|
+
if (mcpDocument && mcpFile !== hookFile && mcpFormat === "json" && mcpChanged) writeJson(mcpFile, mcpDocument);
|
|
301
|
+
if (codexConfig && (codexConfigChanged || mcpChanged)) guardedWrite(codexConfigToml(), stringifyTOML(codexConfig));
|
|
302
|
+
writeJson(hookFile, document);
|
|
303
|
+
guardedRemove(receiptPath, { force: true });
|
|
304
|
+
const status = dryRun ? "would restore Mac app wiring" : "restored Mac app wiring";
|
|
305
|
+
console.log(` ${check} ${agent.replace("_", " ")} hooks ${dim(`(${status})`)}`);
|
|
306
|
+
} catch {
|
|
307
|
+
incompleteClean = true;
|
|
308
|
+
keepCliRuntime = true;
|
|
309
|
+
console.log(` ${cross} ${agent.replace("_", " ")} hooks ${dim("(could not restore Mac app wiring; receipt and CLI kept)")}`);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
};
|
|
244
313
|
var main = async () => {
|
|
245
314
|
console.log();
|
|
246
315
|
console.log(` ${bold("Pushary Clean")}`);
|
|
@@ -278,6 +347,12 @@ var main = async () => {
|
|
|
278
347
|
console.log(` ${dim("The Mac app is installed, so its wiring and the state it owns are left alone.")}`);
|
|
279
348
|
console.log();
|
|
280
349
|
}
|
|
350
|
+
if (keepShared) restoreTakeoverReceipts();
|
|
351
|
+
if (keepCliRuntime) {
|
|
352
|
+
console.log(` ${yellow(bold("Clean stopped before changing provider configuration."))}`);
|
|
353
|
+
console.log(` ${dim("Fix the hooks file or receipt above, then re-run")} npx @pushary/agent-hooks@latest clean`);
|
|
354
|
+
process.exit(EXIT.FAILED);
|
|
355
|
+
}
|
|
281
356
|
const daemonRemoved = await guardedDaemonRemoval();
|
|
282
357
|
if (!daemonRemoved) {
|
|
283
358
|
console.log(` ${cross} Background service ${dim("(could not stop or uninstall)")}`);
|
|
@@ -368,7 +443,9 @@ var main = async () => {
|
|
|
368
443
|
guardedRemove(VSCODE_PLUGIN_DIR);
|
|
369
444
|
console.log(` ${check} VS Code plugin files ${dim(did("removed"))}`);
|
|
370
445
|
}
|
|
371
|
-
if (
|
|
446
|
+
if (keepShared) {
|
|
447
|
+
console.log(` ${skip} Skill directory ${dim("(kept: the Mac app uses it)")}`);
|
|
448
|
+
} else if (existsSync(SKILL_DIR)) {
|
|
372
449
|
guardedRemove(SKILL_DIR);
|
|
373
450
|
console.log(` ${check} Skill directory ${dim(did("removed"))}`);
|
|
374
451
|
} else {
|
|
@@ -381,7 +458,7 @@ var main = async () => {
|
|
|
381
458
|
try {
|
|
382
459
|
const config = readFileSync(codexConfig, "utf-8");
|
|
383
460
|
const parsed = parseTOML(config);
|
|
384
|
-
const trustRemoved = removeCodexHookTrust(parsed, codexHooksJson2, codexPositions);
|
|
461
|
+
const trustRemoved = hookOwnerOf(codexHooksData) === "app" ? false : removeCodexHookTrust(parsed, codexHooksJson2, codexPositions);
|
|
385
462
|
const hadPushary = config.includes("pushary");
|
|
386
463
|
if (hadPushary || trustRemoved) {
|
|
387
464
|
if (!keepShared) {
|
|
@@ -414,13 +491,17 @@ var main = async () => {
|
|
|
414
491
|
console.log(` ${skip} Codex hooks ${dim("(not found)")}`);
|
|
415
492
|
}
|
|
416
493
|
const codexAgentsMd2 = codexAgentsMd();
|
|
417
|
-
if (
|
|
494
|
+
if (keepShared) {
|
|
495
|
+
console.log(` ${skip} Codex AGENTS.md ${dim("(kept: the Mac app uses it)")}`);
|
|
496
|
+
} else if (guardedInstructionBlockRemoval(codexAgentsMd2)) {
|
|
418
497
|
console.log(` ${check} Codex AGENTS.md ${dim("(removed Pushary block)")}`);
|
|
419
498
|
} else {
|
|
420
499
|
console.log(` ${skip} Codex AGENTS.md ${dim("(no pushary block)")}`);
|
|
421
500
|
}
|
|
422
501
|
const codexSkillDir2 = codexSkillDir();
|
|
423
|
-
if (
|
|
502
|
+
if (keepShared) {
|
|
503
|
+
console.log(` ${skip} Codex skill directory ${dim("(kept: the Mac app uses it)")}`);
|
|
504
|
+
} else if (existsSync(codexSkillDir2)) {
|
|
424
505
|
guardedRemove(codexSkillDir2);
|
|
425
506
|
console.log(` ${check} Codex skill directory ${dim(did("removed"))}`);
|
|
426
507
|
} else {
|
|
@@ -439,7 +520,9 @@ var main = async () => {
|
|
|
439
520
|
console.log(` ${skip} Gemini CLI settings ${dim("(not found)")}`);
|
|
440
521
|
}
|
|
441
522
|
const geminiMd2 = geminiMd();
|
|
442
|
-
if (
|
|
523
|
+
if (keepShared) {
|
|
524
|
+
console.log(` ${skip} Gemini GEMINI.md ${dim("(kept: the Mac app uses it)")}`);
|
|
525
|
+
} else if (guardedInstructionBlockRemoval(geminiMd2)) {
|
|
443
526
|
console.log(` ${check} Gemini GEMINI.md ${dim("(removed Pushary block)")}`);
|
|
444
527
|
} else {
|
|
445
528
|
console.log(` ${skip} Gemini GEMINI.md ${dim("(no pushary block)")}`);
|
|
@@ -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";
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
} from "../chunk-Z3Z4VK5F.js";
|
|
5
5
|
import {
|
|
6
6
|
recoverDaemonAfterLogin
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-Z4XCN2HH.js";
|
|
8
8
|
import "../chunk-XHKBHWLX.js";
|
|
9
9
|
import "../chunk-L4ZCFMWW.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-AWHCZOZO.js";
|
|
11
|
+
import "../chunk-BVNYTQ5I.js";
|
|
12
12
|
import "../chunk-3EGEA4KH.js";
|
|
13
13
|
import {
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-BXTJVM7O.js";
|
|
17
17
|
import {
|
|
18
18
|
createIo
|
|
19
19
|
} from "../chunk-5RUIFDTP.js";
|