@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.
Files changed (110) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +3 -3
  3. package/data/cursor-plugin/README.md +3 -7
  4. package/data/vscode-plugin/README.md +1 -1
  5. package/dist/bin/pushary-bell-hook.js +22 -23
  6. package/dist/bin/pushary-bell.js +9 -9
  7. package/dist/bin/pushary-claude.js +27 -28
  8. package/dist/bin/pushary-clean.js +101 -79
  9. package/dist/bin/pushary-codex-bridge.js +18 -18
  10. package/dist/bin/pushary-codex-hook.js +32 -33
  11. package/dist/bin/pushary-codex.js +13 -13
  12. package/dist/bin/pushary-connect.js +24 -21
  13. package/dist/bin/pushary-cowork.js +5 -5
  14. package/dist/bin/pushary-daemon.js +51 -39
  15. package/dist/bin/pushary-disconnect.js +189 -54
  16. package/dist/bin/pushary-doctor.js +67 -58
  17. package/dist/bin/pushary-elicitation-hook.js +24 -25
  18. package/dist/bin/pushary-gemini-bridge.js +13 -13
  19. package/dist/bin/pushary-gemini-hook.js +29 -30
  20. package/dist/bin/pushary-hook.js +30 -32
  21. package/dist/bin/pushary-login.js +12 -12
  22. package/dist/bin/pushary-logout.js +105 -42
  23. package/dist/bin/pushary-mcp.js +9 -9
  24. package/dist/bin/pushary-mode.js +28 -31
  25. package/dist/bin/pushary-notification-hook.js +26 -28
  26. package/dist/bin/pushary-opencode-hook.js +28 -29
  27. package/dist/bin/pushary-permission-denied-hook.js +30 -32
  28. package/dist/bin/pushary-permission-hook.js +29 -31
  29. package/dist/bin/pushary-post-hook.js +26 -28
  30. package/dist/bin/pushary-prompt-hook.js +26 -28
  31. package/dist/bin/pushary-session-end-hook.js +26 -28
  32. package/dist/bin/pushary-session-start-hook.js +31 -32
  33. package/dist/bin/pushary-setup.js +91 -101
  34. package/dist/bin/pushary-stats.js +5 -5
  35. package/dist/bin/pushary-status.js +34 -18
  36. package/dist/bin/pushary-stop-hook.js +26 -28
  37. package/dist/bin/pushary-stopfailure-hook.js +26 -28
  38. package/dist/bin/pushary-suggestions.js +19 -21
  39. package/dist/bin/pushary-transcript-register.js +18 -19
  40. package/dist/bin/pushary-transcripts.js +7 -7
  41. package/dist/bin/pushary-upgrade.js +55 -25
  42. package/dist/bin/pushary-wait.js +23 -19
  43. package/dist/bin/pushary.js +15 -14
  44. package/dist/{chunk-R3YW55MY.js → chunk-2A53H4S6.js} +17 -15
  45. package/dist/{chunk-4YO4T5FV.js → chunk-2QGYMY7A.js} +83 -3
  46. package/dist/{chunk-MBK7N46B.js → chunk-2QTO5YIT.js} +6 -6
  47. package/dist/{chunk-D6S5EKXA.js → chunk-2VZAALEJ.js} +5 -9
  48. package/dist/chunk-2WXF3QJR.js +49 -0
  49. package/dist/{chunk-JCWZ23MJ.js → chunk-3I6IVOZV.js} +3 -3
  50. package/dist/chunk-3Z3A37WD.js +77 -0
  51. package/dist/{chunk-Z6HPS67T.js → chunk-5QUPKDI5.js} +1 -1
  52. package/dist/{chunk-JWKBDSPF.js → chunk-6TE27XZR.js} +2 -2
  53. package/dist/{chunk-STQRUH3S.js → chunk-7DVNSQWF.js} +59 -15
  54. package/dist/{chunk-QTO6HEZD.js → chunk-7PT35RY2.js} +2 -2
  55. package/dist/{chunk-7OIWWZAD.js → chunk-B64KHETR.js} +3 -3
  56. package/dist/chunk-BEJRK4DF.js +94 -0
  57. package/dist/chunk-BXET3ALR.js +46 -0
  58. package/dist/{chunk-6DJTDHBI.js → chunk-CD47ZFFZ.js} +1 -1
  59. package/dist/{chunk-UFVGSEWH.js → chunk-CKV3UPMU.js} +2 -2
  60. package/dist/{chunk-4FK6RZVJ.js → chunk-CLOSJ4ES.js} +1 -1
  61. package/dist/{chunk-AVNKVF7N.js → chunk-DKMD6AWR.js} +4 -4
  62. package/dist/{chunk-SBLPHUEB.js → chunk-DL7XWKYV.js} +7 -5
  63. package/dist/{chunk-BTQGAXZ3.js → chunk-DPGSLWOS.js} +8 -8
  64. package/dist/{chunk-KYO45G5L.js → chunk-DUZVXBBU.js} +1 -1
  65. package/dist/{chunk-EB4XGVBG.js → chunk-EUW7JL2K.js} +0 -32
  66. package/dist/{chunk-4D2AYNSE.js → chunk-FQ2GORVG.js} +2 -2
  67. package/dist/{chunk-W2KI5KPD.js → chunk-HRULIYDU.js} +2 -2
  68. package/dist/{chunk-QR6VE5ME.js → chunk-I5IJRMNV.js} +58 -8
  69. package/dist/{chunk-T7Y5EADL.js → chunk-I6MJXLMY.js} +2 -2
  70. package/dist/{chunk-N4EUSDKX.js → chunk-IAD2RT4L.js} +14 -14
  71. package/dist/{chunk-H37L7TT3.js → chunk-IHFDPV7C.js} +2 -2
  72. package/dist/{chunk-3GNUXXDZ.js → chunk-IHO3YQAN.js} +2 -2
  73. package/dist/{chunk-JWQZSYCK.js → chunk-KF3UZLYI.js} +1 -1
  74. package/dist/chunk-KFF7G225.js +599 -0
  75. package/dist/{chunk-MZPXVH4A.js → chunk-KHNFLYJO.js} +204 -28
  76. package/dist/{chunk-QFEM7R6T.js → chunk-KRCR2CRQ.js} +9 -9
  77. package/dist/{chunk-VXRXFU6Q.js → chunk-LKLVTG3V.js} +14 -7
  78. package/dist/{chunk-KFKL3FHS.js → chunk-LWOO567I.js} +4 -3
  79. package/dist/{chunk-HPRZJKRO.js → chunk-M6BZZFVQ.js} +1 -1
  80. package/dist/{chunk-X5NXPCIC.js → chunk-MFF3ONG5.js} +16 -2
  81. package/dist/{chunk-H7MMU64M.js → chunk-MGRFDGWU.js} +2 -2
  82. package/dist/{chunk-L76HTPU6.js → chunk-MKTJEXZ3.js} +3 -3
  83. package/dist/{chunk-NIBFSARF.js → chunk-MXHTGVFZ.js} +33 -9
  84. package/dist/{chunk-ADSQDYYG.js → chunk-N4QSPI3B.js} +54 -5
  85. package/dist/{chunk-AQ55ZSSS.js → chunk-NWDG3MSW.js} +1 -1
  86. package/dist/chunk-OP7IHC2I.js +24 -0
  87. package/dist/{chunk-KT5E2RLS.js → chunk-QOLITCIP.js} +1 -1
  88. package/dist/{chunk-JXISQ7DT.js → chunk-TCQ43LSG.js} +3 -3
  89. package/dist/chunk-TCWKTUAE.js +50 -0
  90. package/dist/{chunk-RQGODFQN.js → chunk-V5HPPF3E.js} +1 -1
  91. package/dist/{chunk-7264S5HZ.js → chunk-WG3K4TCH.js} +1 -1
  92. package/dist/{chunk-GKI6LFAV.js → chunk-WS4H76EP.js} +2 -2
  93. package/dist/{chunk-XWAYAO3V.js → chunk-WWOHTTVP.js} +2 -2
  94. package/dist/{chunk-SD3272LS.js → chunk-YIG2R3BJ.js} +9 -7
  95. package/dist/{chunk-ZUTU43FT.js → chunk-ZBHUHJG6.js} +4 -4
  96. package/dist/{chunk-AUUXS44H.js → chunk-ZBK6E2OR.js} +1 -1
  97. package/dist/{chunk-QQ4HBXZC.js → chunk-ZN3C6GBG.js} +84 -673
  98. package/dist/{chunk-CBQACHKY.js → chunk-ZSTSEBG7.js} +1 -1
  99. package/dist/{chunk-3PVDOCFI.js → chunk-ZW3XZLJC.js} +5 -5
  100. package/dist/{global-upgrade-E2HUEB4B.js → global-upgrade-I56HNM23.js} +6 -6
  101. package/dist/{paths-QVTEGNZV.js → paths-AGY43CXS.js} +2 -2
  102. package/dist/reapply-IA5XUKWW.js +57 -0
  103. package/dist/src/index.d.ts +1 -0
  104. package/dist/src/index.js +19 -20
  105. package/dist/{upgrade-lock-JCIDZMHF.js → upgrade-lock-B34TAUKV.js} +3 -3
  106. package/package.json +1 -1
  107. package/dist/chunk-ANEAA37E.js +0 -197
  108. package/dist/chunk-MNWRUGMH.js +0 -86
  109. package/dist/chunk-RQSOEB4S.js +0 -44
  110. package/dist/reapply-5QVKM6LA.js +0 -38
@@ -1,76 +1,112 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- compatibleConfigFile,
4
- compatibleMcpFile,
5
- compatiblePermissionRuleFile,
6
- removeCompatibleHooks,
7
- removeCompatibleMcpServer
8
- } from "../chunk-MZPXVH4A.js";
3
+ declinedAgentsFile,
4
+ recordDeclinedAgent
5
+ } from "../chunk-BXET3ALR.js";
6
+ import {
7
+ macAppBridgeAvailable
8
+ } from "../chunk-3Z3A37WD.js";
9
+ import {
10
+ isCursorPluginLeftover,
11
+ isPusharyCursorPluginManifest
12
+ } from "../chunk-TCWKTUAE.js";
13
+ import {
14
+ planFxRemoval,
15
+ removeInstructionBlock
16
+ } from "../chunk-ZN3C6GBG.js";
17
+ import "../chunk-HRULIYDU.js";
9
18
  import {
10
19
  OPENCODE_PLUGIN_SIBLING,
11
20
  OPENCODE_PLUGIN_SIBLING_CONTENTS,
12
21
  hasForeignPlugins,
13
22
  isOpenCodePluginOurs,
14
23
  openCodeConfigFile,
24
+ openCodeInstructionsFile,
15
25
  openCodePluginDir,
16
26
  openCodePluginFile,
17
27
  removeOpenCodeMcpServer
18
- } from "../chunk-X5NXPCIC.js";
28
+ } from "../chunk-MFF3ONG5.js";
19
29
  import {
30
+ compatibleConfigFile,
31
+ compatibleInstructionsFile,
32
+ compatibleMcpFile,
33
+ compatiblePermissionRuleFile,
20
34
  isClaudeMcpSnapshot,
21
35
  removeClaudeMcpServers,
36
+ removeCompatibleHooks,
37
+ removeCompatibleMcpServer,
22
38
  removePusharySettings,
23
39
  removePusharyToolPermissions,
24
40
  restoreClaudeMcpServer
25
- } from "../chunk-ANEAA37E.js";
41
+ } from "../chunk-KHNFLYJO.js";
42
+ import "../chunk-YIG2R3BJ.js";
43
+ import "../chunk-DL7XWKYV.js";
44
+ import "../chunk-2QGYMY7A.js";
26
45
  import {
27
46
  removeGeminiSettings
28
- } from "../chunk-JCWZ23MJ.js";
47
+ } from "../chunk-3I6IVOZV.js";
48
+ import "../chunk-WG3K4TCH.js";
29
49
  import "../chunk-6ICPEJY5.js";
30
- import "../chunk-QFEM7R6T.js";
50
+ import "../chunk-KRCR2CRQ.js";
31
51
  import "../chunk-N6IOSZOE.js";
32
- import "../chunk-6DJTDHBI.js";
33
- import "../chunk-D6S5EKXA.js";
34
- import "../chunk-AVNKVF7N.js";
52
+ import "../chunk-CD47ZFFZ.js";
53
+ import "../chunk-2VZAALEJ.js";
54
+ import "../chunk-DKMD6AWR.js";
35
55
  import "../chunk-POFBE6ZY.js";
36
56
  import {
37
57
  exitOnHelpFlag
38
- } from "../chunk-UFVGSEWH.js";
39
- import "../chunk-L76HTPU6.js";
40
- import "../chunk-KFKL3FHS.js";
41
- import "../chunk-JXISQ7DT.js";
42
- import "../chunk-KYO45G5L.js";
58
+ } from "../chunk-CKV3UPMU.js";
59
+ import "../chunk-GMXKITVA.js";
60
+ import "../chunk-N4QSPI3B.js";
61
+ import "../chunk-MKTJEXZ3.js";
62
+ import "../chunk-LWOO567I.js";
63
+ import "../chunk-TCQ43LSG.js";
64
+ import "../chunk-DUZVXBBU.js";
43
65
  import "../chunk-7QLSKOSU.js";
44
- import "../chunk-KZERVKTD.js";
45
- import "../chunk-4D2AYNSE.js";
66
+ import {
67
+ EXIT
68
+ } from "../chunk-KZERVKTD.js";
69
+ import "../chunk-FQ2GORVG.js";
46
70
  import {
47
71
  claudeJson,
48
72
  claudeMcpReceipt,
49
73
  claudeSettings,
50
74
  claudeSettingsLocal,
75
+ codexAgentsMd,
51
76
  codexConfigToml,
52
77
  codexHookPositions,
53
78
  codexHooksJson,
79
+ cursorPluginDir,
80
+ cursorPluginManifest,
54
81
  cursorUserHooks,
55
82
  cursorUserMcp,
83
+ fxAgentsMd,
84
+ fxMcpProfile,
85
+ fxQuestionRuleReceipt,
86
+ fxSettings,
87
+ geminiMd,
56
88
  geminiSettings,
57
89
  removeCodexHooks,
58
90
  removeCodexSettings
59
- } from "../chunk-ZUTU43FT.js";
91
+ } from "../chunk-ZBHUHJG6.js";
60
92
  import "../chunk-T7E75EKA.js";
61
- import "../chunk-Z6HPS67T.js";
62
- import "../chunk-STQRUH3S.js";
93
+ import "../chunk-5QUPKDI5.js";
94
+ import {
95
+ isInvocationOf
96
+ } from "../chunk-7DVNSQWF.js";
63
97
  import {
64
98
  DISCONNECTABLE_AGENTS,
65
- hookCompatibleProfileBySource
66
- } from "../chunk-QR6VE5ME.js";
99
+ DISCONNECT_AGENT_IDS,
100
+ hookCompatibleProfileBySource,
101
+ normalizeAgentId
102
+ } from "../chunk-I5IJRMNV.js";
67
103
 
68
104
  // bin/pushary-disconnect.ts
69
105
  import { readdirSync, readFileSync, rmSync, writeFileSync } from "fs";
70
106
  import { parse as parseTOML, stringify as stringifyTOML } from "smol-toml";
71
107
 
72
108
  // src/disconnect.ts
73
- import { dirname } from "path";
109
+ import { dirname, join } from "path";
74
110
  var isDisconnectableAgent = (value) => DISCONNECTABLE_AGENTS.includes(value);
75
111
  var removeCursorHooks = (config) => {
76
112
  const hooks = config.hooks;
@@ -161,9 +197,42 @@ var disconnectRemovals = (agent) => {
161
197
  }
162
198
  ];
163
199
  };
200
+ var disconnectDirectories = (agent) => {
201
+ if (agent !== "cursor") return [];
202
+ return [{ path: cursorPluginDir(), manifest: cursorPluginManifest(), ownedBy: isPusharyCursorPluginManifest }];
203
+ };
204
+ var disconnectLeftoverDirectories = (agent, list) => {
205
+ if (agent !== "cursor") return [];
206
+ const parent = dirname(cursorPluginDir());
207
+ return list(parent).filter(isCursorPluginLeftover).map((name) => join(parent, name));
208
+ };
209
+ var disconnectInstructionFile = (agent) => {
210
+ switch (agent) {
211
+ case "codex":
212
+ return codexAgentsMd();
213
+ case "gemini":
214
+ return geminiMd();
215
+ case "opencode":
216
+ return openCodeInstructionsFile();
217
+ case "qwen":
218
+ case "codebuddy":
219
+ case "qoder":
220
+ case "droid":
221
+ case "devin": {
222
+ const profile = hookCompatibleProfileBySource(agent);
223
+ return profile ? compatibleInstructionsFile(profile) : null;
224
+ }
225
+ case "claude":
226
+ case "cursor":
227
+ return null;
228
+ }
229
+ };
230
+ var GATE_STILL_REGISTERED_NOTE = "kept because its gate could not be removed from the hooks file that points into it";
164
231
  var disconnectAgent = (agent, io) => {
165
232
  const changed = [];
166
233
  const untouched = [];
234
+ const unreadable = [];
235
+ const kept = [];
167
236
  const claudeReceiptPath = claudeMcpReceipt();
168
237
  const rawClaudeReceipt = agent === "claude" ? io.read(claudeReceiptPath) : null;
169
238
  let claudeReceipt = null;
@@ -196,6 +265,7 @@ var disconnectAgent = (agent, io) => {
196
265
  }
197
266
  } catch {
198
267
  untouched.push(edit.path);
268
+ unreadable.push(edit.path);
199
269
  }
200
270
  }
201
271
  for (const removal of disconnectRemovals(agent)) {
@@ -226,40 +296,105 @@ var disconnectAgent = (agent, io) => {
226
296
  untouched.push(claudeReceiptPath);
227
297
  }
228
298
  }
229
- return { agent, changed, untouched };
299
+ const removeDirectory = io.removeDirectory;
300
+ if (removeDirectory) {
301
+ const owned = disconnectDirectories(agent).filter((directory) => {
302
+ const manifest = io.read(directory.manifest);
303
+ return manifest !== null && directory.ownedBy(manifest);
304
+ });
305
+ const targets = [...owned.map((directory) => directory.path), ...disconnectLeftoverDirectories(agent, io.list ?? (() => []))];
306
+ for (const path of targets) {
307
+ if (unreadable.length > 0) {
308
+ kept.push(`${path} (${GATE_STILL_REGISTERED_NOTE})`);
309
+ continue;
310
+ }
311
+ try {
312
+ removeDirectory(path);
313
+ changed.push(path);
314
+ } catch {
315
+ untouched.push(path);
316
+ }
317
+ }
318
+ }
319
+ const instructions = disconnectInstructionFile(agent);
320
+ if (instructions && io.removeInstructionBlock?.(instructions)) changed.push(instructions);
321
+ return { agent, changed, untouched, kept };
322
+ };
323
+ var disconnectFx = (io) => {
324
+ const changed = [];
325
+ const kept = [];
326
+ for (const action of planFxRemoval(fxMcpProfile(), fxSettings(), fxQuestionRuleReceipt())) {
327
+ if (action.kind === "write") {
328
+ io.write(action.path, action.text);
329
+ changed.push(action.path);
330
+ } else if (action.kind === "remove-receipt") {
331
+ io.remove(action.path);
332
+ changed.push(action.path);
333
+ } else if (action.kind === "kept") {
334
+ kept.push(`${action.label}: ${action.detail}`);
335
+ }
336
+ }
337
+ if (io.removeInstructionBlock(fxAgentsMd())) changed.push(fxAgentsMd());
338
+ return { changed, kept };
230
339
  };
231
340
 
232
341
  // bin/pushary-disconnect.ts
233
342
  exitOnHelpFlag("disconnect");
343
+ var MAC_APP_LEAVES_IT_OFF = (agent) => `The Pushary Mac app will leave ${agent} off until you connect it again, from the app or with pushary setup.`;
344
+ var MAC_APP_MAY_RESTORE_IT = (agent, file) => `Could not write ${file}, so a running Pushary Mac app may connect ${agent} again. Turn it off in the app's Settings too.`;
234
345
  var rest = process.argv.slice(2);
235
- var requested = rest[0] === "disconnect" ? rest[1] : rest[0];
236
- if (!requested || !isDisconnectableAgent(requested)) {
237
- console.error(`Usage: pushary disconnect <${DISCONNECTABLE_AGENTS.join("|")}>`);
238
- process.exit(1);
346
+ var typed = rest[0] !== void 0 && isInvocationOf(rest[0], "disconnect") ? rest[1] : rest[0];
347
+ var requested = typed === void 0 ? null : normalizeAgentId(typed, DISCONNECT_AGENT_IDS);
348
+ var printResult = (agent, changed, kept) => {
349
+ if (changed.length === 0) console.log(`${agent} was not connected.`);
350
+ else {
351
+ console.log(`Disconnected ${agent}:`);
352
+ for (const path of changed) console.log(` ${path}`);
353
+ }
354
+ if (kept.length > 0) {
355
+ console.log("Left as it is:");
356
+ for (const line of kept) console.log(` ${line}`);
357
+ }
358
+ };
359
+ if (requested === null) {
360
+ if (typed !== void 0) console.error(`Unknown agent: ${typed}`);
361
+ console.error(`Usage: pushary disconnect <${DISCONNECT_AGENT_IDS.join("|")}>`);
362
+ console.error("Setup ids such as claude_code and gemini_cli work too.");
363
+ process.exit(EXIT.FAILED);
239
364
  }
240
- var result = disconnectAgent(requested, {
241
- read: (path) => {
242
- try {
243
- return readFileSync(path, "utf-8");
244
- } catch {
245
- return null;
246
- }
247
- },
248
- write: (path, contents) => writeFileSync(path, contents, "utf-8"),
249
- parseToml: (raw) => parseTOML(raw),
250
- stringifyToml: (config) => stringifyTOML(config),
251
- remove: (path) => rmSync(path, { force: true }),
252
- list: (dir) => {
253
- try {
254
- return readdirSync(dir);
255
- } catch {
256
- return [];
257
- }
365
+ if (isDisconnectableAgent(requested)) {
366
+ const decline = recordDeclinedAgent(requested);
367
+ const result = disconnectAgent(requested, {
368
+ read: (path) => {
369
+ try {
370
+ return readFileSync(path, "utf-8");
371
+ } catch {
372
+ return null;
373
+ }
374
+ },
375
+ write: (path, contents) => writeFileSync(path, contents, "utf-8"),
376
+ parseToml: (raw) => parseTOML(raw),
377
+ stringifyToml: (config) => stringifyTOML(config),
378
+ remove: (path) => rmSync(path, { force: true }),
379
+ list: (dir) => {
380
+ try {
381
+ return readdirSync(dir);
382
+ } catch {
383
+ return [];
384
+ }
385
+ },
386
+ removeDirectory: (path) => rmSync(path, { recursive: true, force: true }),
387
+ removeInstructionBlock
388
+ });
389
+ printResult(requested, result.changed, result.kept);
390
+ if (decline !== "unchanged" && macAppBridgeAvailable()) {
391
+ console.log(decline === "changed" ? MAC_APP_LEAVES_IT_OFF(requested) : MAC_APP_MAY_RESTORE_IT(requested, declinedAgentsFile()));
258
392
  }
259
- });
260
- if (result.changed.length === 0) {
261
- console.log(`${requested} was not connected.`);
262
393
  } else {
263
- console.log(`Disconnected ${requested}:`);
264
- for (const path of result.changed) console.log(` ${path}`);
394
+ const result = disconnectFx({
395
+ write: (path, contents) => writeFileSync(path, contents, "utf-8"),
396
+ remove: (path) => rmSync(path, { force: true }),
397
+ removeInstructionBlock
398
+ });
399
+ printResult(requested, result.changed, result.kept);
265
400
  }
@@ -8,59 +8,60 @@ import {
8
8
  } from "../chunk-GU3EJCVV.js";
9
9
  import {
10
10
  CODEX_HOOK_REMEDY
11
- } from "../chunk-JWKBDSPF.js";
11
+ } from "../chunk-6TE27XZR.js";
12
12
  import {
13
13
  writeStdoutFully
14
14
  } from "../chunk-EO23EUOK.js";
15
15
  import {
16
16
  assessCodexHookTrust,
17
17
  readCodexTrustForPusharyHooks
18
- } from "../chunk-H7MMU64M.js";
18
+ } from "../chunk-MGRFDGWU.js";
19
19
  import {
20
20
  readMachineReadiness,
21
21
  readManagedControlEvidence
22
- } from "../chunk-MBK7N46B.js";
22
+ } from "../chunk-2QTO5YIT.js";
23
23
  import {
24
- FX_PROFILE_REFUSALS,
25
- FX_PUSHARY_TOOLS_RULE,
26
- FX_QUESTION_TOOL,
27
24
  HERMES_PIP_PACKAGE,
28
25
  HERMES_PLUGIN_NAME,
29
26
  agentProbes,
30
27
  detectAgent,
31
28
  detectAllAgents,
32
- hasInstructionBlock,
33
29
  hermesWiredByPushary,
34
- inspectFxInstallation,
35
30
  isDetected,
36
31
  isPluginRegistered,
37
32
  readHermesStatus,
38
33
  resolveHermesPython,
39
- retryAgentCommand,
40
34
  shortenHome,
41
35
  vscodeSettingsTargets
42
- } from "../chunk-QQ4HBXZC.js";
43
- import "../chunk-W2KI5KPD.js";
36
+ } from "../chunk-KFF7G225.js";
44
37
  import {
45
- compatibleConfigFile,
46
- compatibleInstructionsFile,
47
- compatibleMcpFile,
48
- hasCompatibleHooks,
49
- missingCompatibleHookEvents
50
- } from "../chunk-MZPXVH4A.js";
38
+ FX_PROFILE_REFUSALS,
39
+ FX_PUSHARY_TOOLS_RULE,
40
+ FX_QUESTION_TOOL,
41
+ hasInstructionBlock,
42
+ inspectFxInstallation,
43
+ retryAgentCommand
44
+ } from "../chunk-ZN3C6GBG.js";
45
+ import "../chunk-HRULIYDU.js";
51
46
  import {
52
47
  OPENCODE_PLUGIN_PLACEHOLDER,
53
48
  openCodePluginDir,
54
49
  openCodePluginFile,
55
50
  openCodeWired
56
- } from "../chunk-X5NXPCIC.js";
57
- import "../chunk-ANEAA37E.js";
51
+ } from "../chunk-MFF3ONG5.js";
52
+ import {
53
+ compatibleConfigFile,
54
+ compatibleInstructionsFile,
55
+ compatibleMcpFile,
56
+ hasCompatibleHooks,
57
+ missingCompatibleHookEvents
58
+ } from "../chunk-KHNFLYJO.js";
58
59
  import {
59
60
  detectProviderLiveCapabilities,
60
61
  expectedLaunchCapabilities,
61
62
  hasSpawnProvider,
62
63
  resolveControlPolicy
63
- } from "../chunk-T7Y5EADL.js";
64
+ } from "../chunk-I6MJXLMY.js";
64
65
  import "../chunk-RIVNNBEK.js";
65
66
  import {
66
67
  AUTO_UPDATE_DISABLE_ENV,
@@ -69,16 +70,19 @@ import {
69
70
  describeAutoUpdateCheck,
70
71
  readAutoUpdateState,
71
72
  takeAutoUpdateAnnouncement
72
- } from "../chunk-QTO6HEZD.js";
73
+ } from "../chunk-7PT35RY2.js";
73
74
  import {
74
75
  readLedgerSummary
75
- } from "../chunk-CBQACHKY.js";
76
+ } from "../chunk-ZSTSEBG7.js";
76
77
  import {
77
- describeBridgeResolution,
78
- isBridgeLocator,
79
- liveBridgeProbe,
80
- resolveBridgeStub
81
- } from "../chunk-MNWRUGMH.js";
78
+ daemonHasRemoteProof,
79
+ daemonServiceManagerAvailable,
80
+ describeDaemonLoginBlock,
81
+ hasDaemonServiceDefinition,
82
+ readDaemonNeedsLogin,
83
+ readDaemonStatus,
84
+ readInstalledDaemonService
85
+ } from "../chunk-LKLVTG3V.js";
82
86
  import {
83
87
  claudeOtherHolders,
84
88
  claudeUnprovenHolds,
@@ -89,34 +93,29 @@ import {
89
93
  cursorMcpAuthorization,
90
94
  cursorOtherHolders,
91
95
  cursorWired,
96
+ describeBridgeResolution,
92
97
  describeHoldSentence,
93
98
  describeOtherHolder,
94
99
  geminiOtherHolders,
95
100
  geminiWired,
96
101
  holdsLong,
97
- pusharyHookExecutable
98
- } from "../chunk-4YO4T5FV.js";
99
- import {
100
- daemonHasRemoteProof,
101
- daemonServiceManagerAvailable,
102
- describeDaemonLoginBlock,
103
- hasDaemonServiceDefinition,
104
- readDaemonNeedsLogin,
105
- readDaemonStatus,
106
- readInstalledDaemonService
107
- } from "../chunk-VXRXFU6Q.js";
102
+ isBridgeLocator,
103
+ liveBridgeProbe,
104
+ pusharyHookExecutable,
105
+ resolveBridgeStub
106
+ } from "../chunk-2QGYMY7A.js";
108
107
  import {
109
108
  GEMINI_HOOK_BINARY,
110
109
  hasGeminiHooks,
111
110
  missingGeminiHookEvents
112
- } from "../chunk-JCWZ23MJ.js";
111
+ } from "../chunk-3I6IVOZV.js";
113
112
  import "../chunk-XHKBHWLX.js";
114
113
  import "../chunk-6ICPEJY5.js";
115
- import "../chunk-QFEM7R6T.js";
114
+ import "../chunk-KRCR2CRQ.js";
116
115
  import "../chunk-N6IOSZOE.js";
117
- import "../chunk-6DJTDHBI.js";
118
- import "../chunk-D6S5EKXA.js";
119
- import "../chunk-AVNKVF7N.js";
116
+ import "../chunk-CD47ZFFZ.js";
117
+ import "../chunk-2VZAALEJ.js";
118
+ import "../chunk-DKMD6AWR.js";
120
119
  import "../chunk-POFBE6ZY.js";
121
120
  import {
122
121
  describeReach,
@@ -125,15 +124,21 @@ import {
125
124
  reachVerdict,
126
125
  roundTripEvidence,
127
126
  verifyRoundTrip
128
- } from "../chunk-N4EUSDKX.js";
127
+ } from "../chunk-IAD2RT4L.js";
129
128
  import "../chunk-3EGEA4KH.js";
130
129
  import "../chunk-QCGNGEGE.js";
130
+ import {
131
+ SIGNED_OUT_ON_MAC_MESSAGE,
132
+ activeKeyVerdictOf,
133
+ describeSignedOutKey,
134
+ readSignedOutDiagnosis
135
+ } from "../chunk-2WXF3QJR.js";
131
136
  import {
132
137
  createIo
133
138
  } from "../chunk-U4TMAANR.js";
134
139
  import {
135
140
  exitOnHelpFlag
136
- } from "../chunk-UFVGSEWH.js";
141
+ } from "../chunk-CKV3UPMU.js";
137
142
  import {
138
143
  parseFlags
139
144
  } from "../chunk-GMXKITVA.js";
@@ -141,26 +146,26 @@ import {
141
146
  keyPrefix,
142
147
  readControlMode,
143
148
  readKeySource
144
- } from "../chunk-ADSQDYYG.js";
149
+ } from "../chunk-N4QSPI3B.js";
145
150
  import {
146
151
  callMcpTool,
147
152
  sendMcpRequest
148
- } from "../chunk-L76HTPU6.js";
153
+ } from "../chunk-MKTJEXZ3.js";
149
154
  import {
150
155
  checkApiKey,
151
156
  describeKeyCheck
152
- } from "../chunk-KFKL3FHS.js";
153
- import "../chunk-JXISQ7DT.js";
157
+ } from "../chunk-LWOO567I.js";
158
+ import "../chunk-TCQ43LSG.js";
154
159
  import {
155
160
  getMachineId
156
- } from "../chunk-KYO45G5L.js";
161
+ } from "../chunk-DUZVXBBU.js";
157
162
  import {
158
163
  UsageError
159
164
  } from "../chunk-7QLSKOSU.js";
160
165
  import {
161
166
  EXIT
162
167
  } from "../chunk-KZERVKTD.js";
163
- import "../chunk-4D2AYNSE.js";
168
+ import "../chunk-FQ2GORVG.js";
164
169
  import {
165
170
  CODEX_HOOK_EVENTS,
166
171
  CODEX_REQUIRED_APPROVAL_EVENTS,
@@ -191,14 +196,14 @@ import {
191
196
  readGlobalCliInstall,
192
197
  resolvePathBinary,
193
198
  vscodePluginDir
194
- } from "../chunk-ZUTU43FT.js";
199
+ } from "../chunk-ZBHUHJG6.js";
195
200
  import "../chunk-T7E75EKA.js";
196
201
  import {
197
202
  getBaseUrl
198
- } from "../chunk-Z6HPS67T.js";
203
+ } from "../chunk-5QUPKDI5.js";
199
204
  import {
200
205
  NPX_LATEST_COMMAND
201
- } from "../chunk-STQRUH3S.js";
206
+ } from "../chunk-7DVNSQWF.js";
202
207
  import {
203
208
  AGENTS,
204
209
  CURSOR_GATE_EVENTS,
@@ -214,7 +219,7 @@ import {
214
219
  hookCompatibleProfile,
215
220
  isHookActivationReport,
216
221
  isNewerVersion
217
- } from "../chunk-QR6VE5ME.js";
222
+ } from "../chunk-I5IJRMNV.js";
218
223
 
219
224
  // bin/pushary-doctor.ts
220
225
  import { existsSync, readFileSync, writeFileSync } from "fs";
@@ -691,8 +696,12 @@ var main = async () => {
691
696
  );
692
697
  }
693
698
  let keyVerdict = null;
694
- if (apiKey) {
695
- keyVerdict = await checkApiKey(apiKey);
699
+ if (apiKey) keyVerdict = await checkApiKey(apiKey);
700
+ const signedOut = readSignedOutDiagnosis(apiKey ?? null, activeKeyVerdictOf(keyVerdict));
701
+ if (signedOut.kind === "signed_out_on_mac") {
702
+ check(false, "Key still signed in", SIGNED_OUT_ON_MAC_MESSAGE);
703
+ for (const line of describeSignedOutKey(signedOut)) console.log(` ${dim(line)}`);
704
+ } else if (keyVerdict) {
696
705
  switch (keyVerdict.kind) {
697
706
  case "ok":
698
707
  check(
@@ -1348,7 +1357,7 @@ var main = async () => {
1348
1357
  check(
1349
1358
  verdict.kind === "yours",
1350
1359
  "Phone reachable",
1351
- verdict.kind === "yours" ? describeReach(channels) : verdict.kind === "nobody" ? "nothing connected, run pushary connect or get the app at https://pushary.com/download" : `${describeReach(channels)}; run pushary connect to add your own`,
1360
+ verdict.kind === "yours" ? describeReach(channels) : verdict.kind === "nobody" ? "no phone paired, run pushary pair or get the app at https://pushary.com/download" : `${describeReach(channels)}; run pushary pair to pair your own`,
1352
1361
  "reachability"
1353
1362
  );
1354
1363
  }
@@ -1,53 +1,52 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readHookInput
4
- } from "../chunk-XWAYAO3V.js";
4
+ } from "../chunk-WWOHTTVP.js";
5
5
  import {
6
6
  announceSubscriptionRequired,
7
7
  isDeferAnswer
8
8
  } from "../chunk-5OP5MQI7.js";
9
- import "../chunk-BTQGAXZ3.js";
9
+ import "../chunk-DPGSLWOS.js";
10
10
  import "../chunk-SGZJ5LYH.js";
11
- import "../chunk-SD3272LS.js";
12
- import "../chunk-SBLPHUEB.js";
13
- import "../chunk-MNWRUGMH.js";
14
- import "../chunk-4YO4T5FV.js";
15
- import "../chunk-VXRXFU6Q.js";
16
- import "../chunk-JCWZ23MJ.js";
17
- import "../chunk-7264S5HZ.js";
18
- import "../chunk-AUUXS44H.js";
19
- import "../chunk-4FK6RZVJ.js";
20
- import "../chunk-HPRZJKRO.js";
11
+ import "../chunk-YIG2R3BJ.js";
12
+ import "../chunk-DL7XWKYV.js";
13
+ import "../chunk-LKLVTG3V.js";
14
+ import "../chunk-2QGYMY7A.js";
15
+ import "../chunk-3I6IVOZV.js";
16
+ import "../chunk-WG3K4TCH.js";
17
+ import "../chunk-ZBK6E2OR.js";
18
+ import "../chunk-CLOSJ4ES.js";
19
+ import "../chunk-M6BZZFVQ.js";
21
20
  import "../chunk-XHKBHWLX.js";
22
21
  import "../chunk-6ICPEJY5.js";
23
22
  import "../chunk-N6IOSZOE.js";
24
- import "../chunk-6DJTDHBI.js";
23
+ import "../chunk-CD47ZFFZ.js";
25
24
  import {
26
25
  askUser,
27
26
  isDecisionStopped,
28
27
  waitForQuestion
29
- } from "../chunk-D6S5EKXA.js";
30
- import "../chunk-AVNKVF7N.js";
28
+ } from "../chunk-2VZAALEJ.js";
29
+ import "../chunk-DKMD6AWR.js";
31
30
  import "../chunk-POFBE6ZY.js";
32
31
  import "../chunk-GMXKITVA.js";
33
- import "../chunk-ADSQDYYG.js";
32
+ import "../chunk-N4QSPI3B.js";
34
33
  import {
35
34
  SubscriptionRequiredError
36
- } from "../chunk-L76HTPU6.js";
37
- import "../chunk-KFKL3FHS.js";
38
- import "../chunk-JXISQ7DT.js";
35
+ } from "../chunk-MKTJEXZ3.js";
36
+ import "../chunk-LWOO567I.js";
37
+ import "../chunk-TCQ43LSG.js";
39
38
  import {
40
39
  getMachineId
41
- } from "../chunk-KYO45G5L.js";
40
+ } from "../chunk-DUZVXBBU.js";
42
41
  import "../chunk-7QLSKOSU.js";
43
42
  import "../chunk-KZERVKTD.js";
44
- import "../chunk-4D2AYNSE.js";
45
- import "../chunk-ZUTU43FT.js";
43
+ import "../chunk-FQ2GORVG.js";
44
+ import "../chunk-ZBHUHJG6.js";
46
45
  import "../chunk-T7E75EKA.js";
47
46
  import {
48
47
  getApiKey
49
- } from "../chunk-Z6HPS67T.js";
50
- import "../chunk-STQRUH3S.js";
48
+ } from "../chunk-5QUPKDI5.js";
49
+ import "../chunk-7DVNSQWF.js";
51
50
  import {
52
51
  ELICITATION_ANSWERABLE_MODE,
53
52
  effectiveWaitSeconds,
@@ -58,7 +57,7 @@ import {
58
57
  planElicitationAsk,
59
58
  readElicitationFields,
60
59
  renderElicitationOutput
61
- } from "../chunk-QR6VE5ME.js";
60
+ } from "../chunk-I5IJRMNV.js";
62
61
 
63
62
  // bin/pushary-elicitation-hook.ts
64
63
  import { basename } from "path";