@pushary/agent-hooks 1.7.3 → 1.8.1

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 (108) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +39 -19
  3. package/data/SKILL.md +8 -8
  4. package/data/cowork/SKILL.md +2 -2
  5. package/data/cursor-plugin/README.md +2 -2
  6. package/data/cursor-plugin/scripts/pushary-gate.mjs +2 -21
  7. package/data/cursor-plugin/scripts/redaction.mjs +53 -0
  8. package/data/cursor-plugin/skills/pushary/SKILL.md +7 -7
  9. package/data/vscode-plugin/README.md +4 -4
  10. package/data/vscode-plugin/scripts/pushary-gate.mjs +3 -23
  11. package/data/vscode-plugin/scripts/redaction.mjs +53 -0
  12. package/data/vscode-plugin/skills/pushary/SKILL.md +7 -7
  13. package/dist/bin/pushary-bell-hook.js +23 -23
  14. package/dist/bin/pushary-bell.js +9 -9
  15. package/dist/bin/pushary-claude.js +26 -26
  16. package/dist/bin/pushary-clean.js +97 -111
  17. package/dist/bin/pushary-codex-bridge.js +18 -18
  18. package/dist/bin/pushary-codex-hook.js +42 -43
  19. package/dist/bin/pushary-codex.js +13 -13
  20. package/dist/bin/pushary-connect.js +13 -13
  21. package/dist/bin/pushary-cowork.js +5 -5
  22. package/dist/bin/pushary-daemon.js +27 -27
  23. package/dist/bin/pushary-disconnect.js +18 -18
  24. package/dist/bin/pushary-doctor.js +92 -86
  25. package/dist/bin/pushary-elicitation-hook.js +25 -25
  26. package/dist/bin/pushary-gemini-bridge.js +12 -12
  27. package/dist/bin/pushary-gemini-hook.js +29 -30
  28. package/dist/bin/pushary-hook.js +32 -32
  29. package/dist/bin/pushary-login.js +12 -12
  30. package/dist/bin/pushary-logout.js +7 -7
  31. package/dist/bin/pushary-mcp.js +85 -28
  32. package/dist/bin/pushary-mode.js +9 -9
  33. package/dist/bin/pushary-notification-hook.js +28 -28
  34. package/dist/bin/pushary-opencode-hook.js +28 -29
  35. package/dist/bin/pushary-permission-denied-hook.js +32 -32
  36. package/dist/bin/pushary-permission-hook.js +31 -31
  37. package/dist/bin/pushary-post-hook.js +28 -28
  38. package/dist/bin/pushary-prompt-hook.js +28 -28
  39. package/dist/bin/pushary-session-end-hook.js +28 -28
  40. package/dist/bin/pushary-session-start-hook.js +32 -32
  41. package/dist/bin/pushary-setup.js +62 -129
  42. package/dist/bin/pushary-stats.js +5 -5
  43. package/dist/bin/pushary-status.js +15 -15
  44. package/dist/bin/pushary-stop-hook.js +28 -28
  45. package/dist/bin/pushary-stopfailure-hook.js +28 -28
  46. package/dist/bin/pushary-suggestions.js +4 -4
  47. package/dist/bin/pushary-transcript-register.js +19 -19
  48. package/dist/bin/pushary-transcripts.js +7 -7
  49. package/dist/bin/pushary-upgrade.js +236 -110
  50. package/dist/bin/pushary-wait.js +9 -9
  51. package/dist/bin/pushary.js +6 -6
  52. package/dist/{chunk-DUQO4C4I.js → chunk-2SLCHCVN.js} +3 -3
  53. package/dist/{chunk-YYCTF4Q5.js → chunk-35X5UDML.js} +7 -7
  54. package/dist/{chunk-OVC5QXN5.js → chunk-4A3UQERT.js} +1 -1
  55. package/dist/chunk-5DGNEUXK.js +73 -0
  56. package/dist/{chunk-62CVUUNU.js → chunk-5Y2DY6X4.js} +2 -2
  57. package/dist/{chunk-G4GLCLKK.js → chunk-5YY3IJT4.js} +159 -36
  58. package/dist/{chunk-KJXUIPS4.js → chunk-64H5IZZD.js} +28 -16
  59. package/dist/{chunk-OTNOANMX.js → chunk-6TK4IY3A.js} +8 -8
  60. package/dist/{chunk-LPNJLKBQ.js → chunk-72WOCX22.js} +1 -1
  61. package/dist/{chunk-IRZG3HEU.js → chunk-7ITOAMCD.js} +1 -1
  62. package/dist/{chunk-G62JL2NT.js → chunk-7U7ZWUTR.js} +1 -1
  63. package/dist/{chunk-IPSRMLCJ.js → chunk-ASWRMBOM.js} +1 -1
  64. package/dist/{chunk-5S2VBSJI.js → chunk-CB23AO4D.js} +2 -2
  65. package/dist/{chunk-VKVSRCBO.js → chunk-CHMOVJ2M.js} +1 -1
  66. package/dist/{chunk-BGBLLHZ4.js → chunk-DLEKCAQL.js} +1 -1
  67. package/dist/{chunk-EEEJ2JIL.js → chunk-DVW2MYCM.js} +3 -3
  68. package/dist/{chunk-AWVNAYGD.js → chunk-DXBS2EL7.js} +1 -1
  69. package/dist/{chunk-ZKJ34T2F.js → chunk-EIGJYCOE.js} +31 -17
  70. package/dist/{chunk-U6RVDUJ5.js → chunk-F6NTWZZC.js} +283 -41
  71. package/dist/{chunk-7RUJKCR4.js → chunk-FLQPM2GQ.js} +2 -2
  72. package/dist/{chunk-TCVMK6GI.js → chunk-GBNQXYN4.js} +4 -4
  73. package/dist/{chunk-G6RRVJOG.js → chunk-GH6KGWMC.js} +6 -6
  74. package/dist/chunk-GU3EJCVV.js +43 -0
  75. package/dist/{chunk-6JQFIHZC.js → chunk-HBWC3JVZ.js} +3 -3
  76. package/dist/{chunk-IWJKSIB4.js → chunk-HMNR7B2F.js} +1 -1
  77. package/dist/{chunk-NOI3XTCY.js → chunk-HOEB6AKG.js} +1 -1
  78. package/dist/{chunk-62VT3BPH.js → chunk-HQRCVEI2.js} +32 -17
  79. package/dist/{chunk-MIXWMA73.js → chunk-HTEGMMT3.js} +3 -3
  80. package/dist/{chunk-BIH2Y2HP.js → chunk-HVDMGDYV.js} +2 -2
  81. package/dist/{chunk-VE7TXLR4.js → chunk-I4HKMUZQ.js} +3 -3
  82. package/dist/{chunk-YPUBA2FL.js → chunk-INSMZNS7.js} +5 -5
  83. package/dist/{chunk-G3OMOTJ4.js → chunk-JRQRNNGA.js} +3 -3
  84. package/dist/{chunk-N5MZH5A6.js → chunk-KB2FTO4O.js} +4 -4
  85. package/dist/{chunk-O3JDWNLU.js → chunk-LK2S5XIV.js} +183 -28
  86. package/dist/{chunk-YC27PROF.js → chunk-MMVCI6DT.js} +20 -5
  87. package/dist/{chunk-3EUBQARL.js → chunk-MYHG7PX2.js} +1 -1
  88. package/dist/{chunk-EADXTSHE.js → chunk-N6JJJTPH.js} +6 -3
  89. package/dist/{chunk-PRNFSORD.js → chunk-NHCUXTEM.js} +1 -1
  90. package/dist/{chunk-KEL5MXRL.js → chunk-NOLPURUI.js} +1 -1
  91. package/dist/{chunk-WTJM7PSL.js → chunk-OCVVSRDA.js} +3 -3
  92. package/dist/{chunk-R6OYCUNK.js → chunk-ON5JW2HP.js} +1 -1
  93. package/dist/{chunk-UOQRM7JQ.js → chunk-QB6QYZ6B.js} +5 -5
  94. package/dist/{chunk-7OA34PNW.js → chunk-T55H6YEP.js} +40 -10
  95. package/dist/{chunk-D6OODZCM.js → chunk-TJMAXQ5Q.js} +2 -2
  96. package/dist/{chunk-WGMW7OXW.js → chunk-TKQ6LZQZ.js} +6 -6
  97. package/dist/{chunk-WPX67AKT.js → chunk-UMMCHS6P.js} +1 -1
  98. package/dist/{chunk-MZBRL5H5.js → chunk-UPLV5AJF.js} +108 -25
  99. package/dist/{chunk-P2VIBGXA.js → chunk-URNXU3FO.js} +1 -1
  100. package/dist/{chunk-EUGNVLMG.js → chunk-VFFHQC7W.js} +3 -1
  101. package/dist/{chunk-Y4ZH64UK.js → chunk-VZMIHERK.js} +2 -2
  102. package/dist/{chunk-RLW3JWDY.js → chunk-W2LJ4O3A.js} +2 -2
  103. package/dist/{chunk-LHC45YUC.js → chunk-ZJYJAD52.js} +1 -1
  104. package/dist/{reapply-PH5T4BGR.js → reapply-ICGTBHVE.js} +9 -9
  105. package/dist/src/index.js +20 -20
  106. package/package.json +1 -1
  107. package/dist/chunk-5GB22QYL.js +0 -255
  108. package/dist/chunk-VYPJHGG6.js +0 -92
@@ -1,38 +1,38 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleBell
4
- } from "../chunk-IWJKSIB4.js";
4
+ } from "../chunk-HMNR7B2F.js";
5
5
  import {
6
6
  readHookInput
7
- } from "../chunk-7RUJKCR4.js";
8
- import "../chunk-OTNOANMX.js";
7
+ } from "../chunk-FLQPM2GQ.js";
8
+ import "../chunk-6TK4IY3A.js";
9
9
  import "../chunk-SGZJ5LYH.js";
10
- import "../chunk-TCVMK6GI.js";
11
- import "../chunk-BGBLLHZ4.js";
12
- import "../chunk-3EUBQARL.js";
13
- import "../chunk-WTJM7PSL.js";
14
- import "../chunk-ZKJ34T2F.js";
15
- import "../chunk-MIXWMA73.js";
16
- import "../chunk-NOI3XTCY.js";
17
- import "../chunk-P2VIBGXA.js";
18
- import "../chunk-WPX67AKT.js";
19
- import "../chunk-LPNJLKBQ.js";
10
+ import "../chunk-GBNQXYN4.js";
11
+ import "../chunk-DLEKCAQL.js";
12
+ import "../chunk-MYHG7PX2.js";
13
+ import "../chunk-OCVVSRDA.js";
14
+ import "../chunk-EIGJYCOE.js";
15
+ import "../chunk-HTEGMMT3.js";
16
+ import "../chunk-HOEB6AKG.js";
17
+ import "../chunk-URNXU3FO.js";
18
+ import "../chunk-UMMCHS6P.js";
19
+ import "../chunk-72WOCX22.js";
20
20
  import "../chunk-XHKBHWLX.js";
21
- import "../chunk-EUGNVLMG.js";
22
- import "../chunk-N5MZH5A6.js";
21
+ import "../chunk-VFFHQC7W.js";
22
+ import "../chunk-KB2FTO4O.js";
23
23
  import "../chunk-POFBE6ZY.js";
24
24
  import "../chunk-GMXKITVA.js";
25
- import "../chunk-D6OODZCM.js";
26
- import "../chunk-DUQO4C4I.js";
27
- import "../chunk-OVC5QXN5.js";
25
+ import "../chunk-TJMAXQ5Q.js";
26
+ import "../chunk-2SLCHCVN.js";
27
+ import "../chunk-4A3UQERT.js";
28
28
  import "../chunk-7QLSKOSU.js";
29
29
  import "../chunk-KZERVKTD.js";
30
- import "../chunk-62CVUUNU.js";
31
- import "../chunk-MZBRL5H5.js";
30
+ import "../chunk-5Y2DY6X4.js";
31
+ import "../chunk-UPLV5AJF.js";
32
32
  import "../chunk-T7E75EKA.js";
33
- import "../chunk-R6OYCUNK.js";
34
- import "../chunk-YYCTF4Q5.js";
35
- import "../chunk-G4GLCLKK.js";
33
+ import "../chunk-ON5JW2HP.js";
34
+ import "../chunk-35X5UDML.js";
35
+ import "../chunk-5YY3IJT4.js";
36
36
 
37
37
  // bin/pushary-bell-hook.ts
38
38
  var main = async () => {
@@ -5,37 +5,37 @@ import {
5
5
  liveAgentCount,
6
6
  ring,
7
7
  upgradeThreshold
8
- } from "../chunk-IWJKSIB4.js";
8
+ } from "../chunk-HMNR7B2F.js";
9
9
  import {
10
10
  addBellHooks,
11
11
  bellInstalled,
12
12
  removeBellHooks
13
- } from "../chunk-NOI3XTCY.js";
13
+ } from "../chunk-HOEB6AKG.js";
14
14
  import {
15
15
  createIo
16
16
  } from "../chunk-U4TMAANR.js";
17
17
  import {
18
18
  exitOnHelpFlag
19
- } from "../chunk-5S2VBSJI.js";
19
+ } from "../chunk-CB23AO4D.js";
20
20
  import {
21
21
  parseFlags
22
22
  } from "../chunk-GMXKITVA.js";
23
- import "../chunk-D6OODZCM.js";
23
+ import "../chunk-TJMAXQ5Q.js";
24
24
  import "../chunk-7QLSKOSU.js";
25
25
  import {
26
26
  EXIT
27
27
  } from "../chunk-KZERVKTD.js";
28
- import "../chunk-62CVUUNU.js";
28
+ import "../chunk-5Y2DY6X4.js";
29
29
  import {
30
30
  claudeSettings
31
- } from "../chunk-MZBRL5H5.js";
31
+ } from "../chunk-UPLV5AJF.js";
32
32
  import {
33
33
  readJsonSafe,
34
34
  writeJsonAtomic
35
35
  } from "../chunk-T7E75EKA.js";
36
- import "../chunk-R6OYCUNK.js";
37
- import "../chunk-YYCTF4Q5.js";
38
- import "../chunk-G4GLCLKK.js";
36
+ import "../chunk-ON5JW2HP.js";
37
+ import "../chunk-35X5UDML.js";
38
+ import "../chunk-5YY3IJT4.js";
39
39
 
40
40
  // bin/pushary-bell.ts
41
41
  exitOnHelpFlag("bell");
@@ -8,7 +8,7 @@ import {
8
8
  describeIdleWindow,
9
9
  startProcessOwnership,
10
10
  withSpawnProcessOwnership
11
- } from "../chunk-LHC45YUC.js";
11
+ } from "../chunk-ZJYJAD52.js";
12
12
  import {
13
13
  announceSubscriptionRequired,
14
14
  isDeferAnswer
@@ -18,24 +18,24 @@ import {
18
18
  loadSessionKey,
19
19
  registerTranscript,
20
20
  registeredTranscriptEnabled
21
- } from "../chunk-OTNOANMX.js";
21
+ } from "../chunk-6TK4IY3A.js";
22
22
  import "../chunk-SGZJ5LYH.js";
23
- import "../chunk-TCVMK6GI.js";
24
- import "../chunk-BGBLLHZ4.js";
25
- import "../chunk-3EUBQARL.js";
26
- import "../chunk-WTJM7PSL.js";
23
+ import "../chunk-GBNQXYN4.js";
24
+ import "../chunk-DLEKCAQL.js";
25
+ import "../chunk-MYHG7PX2.js";
26
+ import "../chunk-OCVVSRDA.js";
27
27
  import {
28
28
  ensureDaemonRunning
29
- } from "../chunk-ZKJ34T2F.js";
30
- import "../chunk-MIXWMA73.js";
31
- import "../chunk-NOI3XTCY.js";
29
+ } from "../chunk-EIGJYCOE.js";
30
+ import "../chunk-HTEGMMT3.js";
31
+ import "../chunk-HOEB6AKG.js";
32
32
  import {
33
33
  encryptRecord
34
- } from "../chunk-P2VIBGXA.js";
35
- import "../chunk-WPX67AKT.js";
34
+ } from "../chunk-URNXU3FO.js";
35
+ import "../chunk-UMMCHS6P.js";
36
36
  import {
37
37
  transcriptsEnabled
38
- } from "../chunk-LPNJLKBQ.js";
38
+ } from "../chunk-72WOCX22.js";
39
39
  import {
40
40
  needsShell,
41
41
  spawnClaude
@@ -50,7 +50,7 @@ import {
50
50
  repoKeyFor,
51
51
  reportEvent,
52
52
  scopePathFor
53
- } from "../chunk-U6RVDUJ5.js";
53
+ } from "../chunk-F6NTWZZC.js";
54
54
  import {
55
55
  DEFAULT_SESSION,
56
56
  markPendingCommandDelivered,
@@ -60,7 +60,7 @@ import {
60
60
  removePendingCommand,
61
61
  savePendingCommand
62
62
  } from "../chunk-N6IOSZOE.js";
63
- import "../chunk-EUGNVLMG.js";
63
+ import "../chunk-VFFHQC7W.js";
64
64
  import {
65
65
  DECISION_STOP_REASON,
66
66
  UNVERIFIABLE_APPROVAL_REASON,
@@ -71,36 +71,36 @@ import {
71
71
  nextLongPollMs,
72
72
  waitForAnswer,
73
73
  withdrawQuestion
74
- } from "../chunk-YC27PROF.js";
75
- import "../chunk-N5MZH5A6.js";
74
+ } from "../chunk-MMVCI6DT.js";
75
+ import "../chunk-KB2FTO4O.js";
76
76
  import "../chunk-POFBE6ZY.js";
77
77
  import "../chunk-GMXKITVA.js";
78
- import "../chunk-D6OODZCM.js";
78
+ import "../chunk-TJMAXQ5Q.js";
79
79
  import {
80
80
  SubscriptionRequiredError
81
- } from "../chunk-VE7TXLR4.js";
82
- import "../chunk-EEEJ2JIL.js";
83
- import "../chunk-DUQO4C4I.js";
81
+ } from "../chunk-I4HKMUZQ.js";
82
+ import "../chunk-DVW2MYCM.js";
83
+ import "../chunk-2SLCHCVN.js";
84
84
  import {
85
85
  getMachineId
86
- } from "../chunk-OVC5QXN5.js";
86
+ } from "../chunk-4A3UQERT.js";
87
87
  import "../chunk-7QLSKOSU.js";
88
88
  import "../chunk-KZERVKTD.js";
89
- import "../chunk-62CVUUNU.js";
90
- import "../chunk-MZBRL5H5.js";
89
+ import "../chunk-5Y2DY6X4.js";
90
+ import "../chunk-UPLV5AJF.js";
91
91
  import "../chunk-T7E75EKA.js";
92
92
  import {
93
93
  getApiKey,
94
94
  getBaseUrl
95
- } from "../chunk-R6OYCUNK.js";
95
+ } from "../chunk-ON5JW2HP.js";
96
96
  import {
97
97
  NPX_LATEST_COMMAND
98
- } from "../chunk-YYCTF4Q5.js";
98
+ } from "../chunk-35X5UDML.js";
99
99
  import {
100
100
  KILL_REASON,
101
101
  redactSecretsFromContent,
102
102
  resolveGate
103
- } from "../chunk-G4GLCLKK.js";
103
+ } from "../chunk-5YY3IJT4.js";
104
104
 
105
105
  // src/wrapper/localPassthrough.ts
106
106
  var SIGNAL_NUMBERS = {
@@ -4,30 +4,19 @@ import {
4
4
  PUSHARY_SKILL_SOURCE,
5
5
  createGuards,
6
6
  withoutPusharyCursorHooks
7
- } from "../chunk-6JQFIHZC.js";
7
+ } from "../chunk-HBWC3JVZ.js";
8
8
  import {
9
- FX_PROFILE_REFUSALS,
10
- FX_QUESTION_TOOL,
11
- FX_SETTINGS_REFUSALS,
12
9
  HERMES_PIP_PACKAGE,
13
- fxProfileText,
14
- fxSettingsText,
15
- isFxQuestionRuleReceipt,
16
- readFxFile,
17
- readFxProfile,
18
- readFxSettings,
10
+ planFxRemoval,
19
11
  readHermesStatus,
20
12
  removeInstructionBlock,
21
13
  resolveHermesPython,
22
14
  runHermesConfigScript,
23
15
  shortenHome,
24
16
  unregisterPluginLocation,
25
- vscodeSettingsTargets,
26
- withoutFxPusharyServer,
27
- withoutPusharyToolsAllowed,
28
- withoutQuestionsRoutedToPushary
29
- } from "../chunk-O3JDWNLU.js";
30
- import "../chunk-7OA34PNW.js";
17
+ vscodeSettingsTargets
18
+ } from "../chunk-LK2S5XIV.js";
19
+ import "../chunk-T55H6YEP.js";
31
20
  import {
32
21
  OPENCODE_PLUGIN_SIBLING,
33
22
  OPENCODE_PLUGIN_SIBLING_CONTENTS,
@@ -39,7 +28,7 @@ import {
39
28
  openCodePluginDir,
40
29
  openCodePluginFile,
41
30
  removeOpenCodeMcpServer
42
- } from "../chunk-KEL5MXRL.js";
31
+ } from "../chunk-NOLPURUI.js";
43
32
  import {
44
33
  compatibleConfigFile,
45
34
  compatibleInstructionsFile,
@@ -47,39 +36,39 @@ import {
47
36
  compatiblePermissionRuleFile,
48
37
  removeCompatibleHooks,
49
38
  removeCompatibleMcpServer
50
- } from "../chunk-UOQRM7JQ.js";
39
+ } from "../chunk-QB6QYZ6B.js";
51
40
  import {
52
41
  isClaudeMcpSnapshot,
53
42
  removeClaudeMcpServers,
54
43
  removePusharySettings,
55
44
  removePusharyToolPermissions,
56
45
  restoreClaudeMcpServer
57
- } from "../chunk-G3OMOTJ4.js";
46
+ } from "../chunk-JRQRNNGA.js";
58
47
  import {
59
48
  hookOwnerOf,
60
49
  isHookTakeoverReceipt,
61
50
  restoreHookTakeover,
62
51
  restoreMcpServer
63
- } from "../chunk-TCVMK6GI.js";
64
- import "../chunk-BGBLLHZ4.js";
52
+ } from "../chunk-GBNQXYN4.js";
53
+ import "../chunk-DLEKCAQL.js";
65
54
  import {
66
55
  liveBridgeProbe,
67
56
  resolveBridgeStub
68
- } from "../chunk-3EUBQARL.js";
69
- import "../chunk-WTJM7PSL.js";
57
+ } from "../chunk-MYHG7PX2.js";
58
+ import "../chunk-OCVVSRDA.js";
70
59
  import {
71
60
  disableDaemonService
72
- } from "../chunk-ZKJ34T2F.js";
61
+ } from "../chunk-EIGJYCOE.js";
73
62
  import {
74
63
  removeGeminiSettings
75
- } from "../chunk-MIXWMA73.js";
76
- import "../chunk-NOI3XTCY.js";
64
+ } from "../chunk-HTEGMMT3.js";
65
+ import "../chunk-HOEB6AKG.js";
77
66
  import "../chunk-XHKBHWLX.js";
78
- import "../chunk-U6RVDUJ5.js";
67
+ import "../chunk-F6NTWZZC.js";
79
68
  import "../chunk-N6IOSZOE.js";
80
- import "../chunk-EUGNVLMG.js";
81
- import "../chunk-YC27PROF.js";
82
- import "../chunk-N5MZH5A6.js";
69
+ import "../chunk-VFFHQC7W.js";
70
+ import "../chunk-MMVCI6DT.js";
71
+ import "../chunk-KB2FTO4O.js";
83
72
  import "../chunk-POFBE6ZY.js";
84
73
  import {
85
74
  ansiPainter,
@@ -87,7 +76,7 @@ import {
87
76
  } from "../chunk-U4TMAANR.js";
88
77
  import {
89
78
  exitOnHelpFlag
90
- } from "../chunk-5S2VBSJI.js";
79
+ } from "../chunk-CB23AO4D.js";
91
80
  import {
92
81
  rejectUnknownFlags
93
82
  } from "../chunk-GMXKITVA.js";
@@ -95,24 +84,24 @@ import {
95
84
  CANDIDATE_RCS,
96
85
  isDisabledExport,
97
86
  removeClaudeAlias
98
- } from "../chunk-D6OODZCM.js";
99
- import "../chunk-VE7TXLR4.js";
100
- import "../chunk-EEEJ2JIL.js";
101
- import "../chunk-DUQO4C4I.js";
102
- import "../chunk-OVC5QXN5.js";
87
+ } from "../chunk-TJMAXQ5Q.js";
88
+ import "../chunk-I4HKMUZQ.js";
89
+ import "../chunk-DVW2MYCM.js";
90
+ import "../chunk-2SLCHCVN.js";
91
+ import "../chunk-4A3UQERT.js";
103
92
  import "../chunk-7QLSKOSU.js";
104
93
  import {
105
94
  EXIT
106
95
  } from "../chunk-KZERVKTD.js";
107
- import "../chunk-62CVUUNU.js";
96
+ import "../chunk-5Y2DY6X4.js";
108
97
  import {
109
- AGENT_HOOKS_PACKAGE,
110
98
  bridgeAgentKey,
111
99
  claudeJson,
112
100
  claudeMcpReceipt,
113
101
  claudeSettings,
114
102
  claudeSettingsLocal,
115
103
  claudeSkillDir,
104
+ cleanNpmEnv,
116
105
  codexAgentsMd,
117
106
  codexConfigToml,
118
107
  codexHookPositions,
@@ -121,7 +110,6 @@ import {
121
110
  cursorPluginDir,
122
111
  cursorUserHooks,
123
112
  cursorUserMcp,
124
- execNpm,
125
113
  fxAgentsMd,
126
114
  fxConfigDir,
127
115
  fxMcpProfile,
@@ -136,23 +124,31 @@ import {
136
124
  npmIsOnPath,
137
125
  pusharyDir,
138
126
  readCodexMcpAuth,
127
+ readGlobalFolder,
128
+ readGlobalPrefix,
139
129
  removeCodexHookTrust,
140
130
  removeCodexHooks,
141
131
  restoreCodexHookTrust,
142
132
  vscodePluginDir,
143
133
  vscodePluginMcp
144
- } from "../chunk-MZBRL5H5.js";
134
+ } from "../chunk-UPLV5AJF.js";
145
135
  import "../chunk-T7E75EKA.js";
146
- import "../chunk-R6OYCUNK.js";
147
- import "../chunk-YYCTF4Q5.js";
136
+ import "../chunk-ON5JW2HP.js";
148
137
  import {
138
+ NPX_LATEST_COMMAND
139
+ } from "../chunk-35X5UDML.js";
140
+ import {
141
+ CLI_PACKAGE_NAMES,
149
142
  HOOK_COMPATIBLE_PROFILES,
150
143
  HOOK_LOCATOR_BINARY,
151
144
  SUPPORT_DISCORD,
152
145
  SUPPORT_EMAIL,
146
+ globalPackageFolder,
147
+ globalPackagesToUninstall,
148
+ globalRootFor,
153
149
  isValidApiKey,
154
150
  redactSecrets
155
- } from "../chunk-G4GLCLKK.js";
151
+ } from "../chunk-5YY3IJT4.js";
156
152
 
157
153
  // bin/pushary-clean.ts
158
154
  import { existsSync as existsSync6, readFileSync as readFileSync4, copyFileSync, readdirSync as readdirSync4 } from "fs";
@@ -460,6 +456,43 @@ var claudeBackupRewrites = (receipt, home = homedir4()) => claudeJsonBackups(hom
460
456
  ` }] : [];
461
457
  });
462
458
 
459
+ // src/cli/clean-global-package.ts
460
+ var UNINSTALL_TIMEOUT_MS = 3e4;
461
+ var readRemovalEvidence = (prefix, platform) => CLI_PACKAGE_NAMES.map((name) => ({
462
+ name,
463
+ listing: globalPackageState(name),
464
+ folder: prefix === void 0 ? "unseen" : readGlobalFolder(globalRootFor(prefix, platform), name, platform).kind
465
+ }));
466
+ var uninstallGlobalPackage = (guards2, name) => {
467
+ guards2.execFile(
468
+ `npm uninstall -g --no-workspaces ${name}`,
469
+ [],
470
+ { stdio: "ignore", timeout: UNINSTALL_TIMEOUT_MS, env: cleanNpmEnv(), shell: true },
471
+ `npm uninstall -g ${name}`
472
+ );
473
+ };
474
+ var removeLeftoverFolders = (guards2, prefix, platform) => {
475
+ const root = globalRootFor(prefix, platform);
476
+ for (const name of CLI_PACKAGE_NAMES) {
477
+ if (readGlobalFolder(root, name, platform).kind === "ours") {
478
+ guards2.remove(globalPackageFolder(root, name, platform), { force: true });
479
+ }
480
+ }
481
+ };
482
+ var removeGlobalCliPackages = (guards2, request) => {
483
+ const platform = request.platform ?? process.platform;
484
+ const prefix = readGlobalPrefix();
485
+ const names = globalPackagesToUninstall(readRemovalEvidence(prefix, platform));
486
+ if (names.length === 0) return { kind: "not_installed" };
487
+ try {
488
+ for (const name of names) uninstallGlobalPackage(guards2, name);
489
+ if (!request.dryRun && prefix !== void 0) removeLeftoverFolders(guards2, prefix, platform);
490
+ return { kind: "removed", names };
491
+ } catch {
492
+ return { kind: "failed", names };
493
+ }
494
+ };
495
+
463
496
  // src/cli/config-temp-leftovers.ts
464
497
  import { lstatSync, readdirSync as readdirSync3 } from "fs";
465
498
  import { join as join5 } from "path";
@@ -597,62 +630,18 @@ var guardedAliasRemoval = () => {
597
630
  var writeJson = (path, data) => {
598
631
  guardedWrite(path, JSON.stringify(data, null, 2) + "\n");
599
632
  };
600
- var writeFxText = (path, rendered, label) => {
601
- if (rendered.kind === "refused") {
602
- console.log(` ${skip} ${label} ${dim(`(${path} would grow past the size fx reads; left untouched)`)}`);
603
- return;
604
- }
605
- guardedWrite(path, rendered.text);
606
- console.log(` ${check} ${label} ${dim(did("removed"))}`);
607
- };
608
- var removeFxMcpServer = () => {
609
- const path = fxMcpProfile();
610
- const read = readFxFile(path, readFxProfile);
611
- if (read.kind === "missing") {
612
- console.log(` ${skip} fx MCP ${dim("(not found)")}`);
613
- } else if (read.kind === "unreadable") {
614
- console.log(` ${skip} fx MCP ${dim(`(${path} could not be read; left untouched)`)}`);
615
- } else if (read.kind === "refused") {
616
- console.log(` ${skip} fx MCP ${dim(`(${path} ${FX_PROFILE_REFUSALS[read.reason]}; left untouched)`)}`);
617
- } else {
618
- const { profile, removed } = withoutFxPusharyServer(read.profile);
619
- if (removed) {
620
- writeFxText(path, fxProfileText(profile), "fx MCP");
633
+ var removeFxConfiguration = () => {
634
+ for (const action of planFxRemoval(fxMcpProfile(), fxSettings(), fxQuestionRuleReceipt())) {
635
+ if (action.kind === "write") {
636
+ guardedWrite(action.path, action.text);
637
+ console.log(` ${check} ${action.label} ${dim(did("removed"))}`);
638
+ } else if (action.kind === "remove-receipt") {
639
+ guardedRemove(action.path, { force: true });
621
640
  } else {
622
- console.log(` ${skip} fx MCP ${dim("(no pushary entry)")}`);
641
+ console.log(` ${skip} ${action.label} ${dim(`(${action.detail})`)}`);
623
642
  }
624
643
  }
625
644
  };
626
- var removeFxToolsRule = () => {
627
- const path = fxSettings();
628
- const read = readFxFile(path, readFxSettings);
629
- if (read.kind === "refused") {
630
- console.log(` ${skip} fx settings ${dim(`(${path} ${FX_SETTINGS_REFUSALS[read.reason]}; left untouched)`)}`);
631
- return;
632
- }
633
- if (read.kind !== "settings") return;
634
- const { settings, removed } = withoutPusharyToolsAllowed(read.settings);
635
- if (removed) writeFxText(path, fxSettingsText(settings), "fx auto-allowed Pushary tools");
636
- };
637
- var FX_QUESTION_RULE_KEPT = {
638
- "not-ours": "no setup record says Pushary added it, so it may be yours; left as it is",
639
- "changed-after-setup": "changed after setup; left as it is"
640
- };
641
- var readFxQuestionRuleReceipt = () => {
642
- const receipt = readJson(fxQuestionRuleReceipt());
643
- return isFxQuestionRuleReceipt(receipt) ? receipt : null;
644
- };
645
- var removeFxQuestionRule = () => {
646
- const path = fxSettings();
647
- const read = readFxFile(path, readFxSettings);
648
- if (read.kind === "refused" || read.kind === "unreadable") return;
649
- if (read.kind === "settings") {
650
- const { settings, outcome } = withoutQuestionsRoutedToPushary(read.settings, readFxQuestionRuleReceipt());
651
- if (outcome === "removed") writeFxText(path, fxSettingsText(settings), "fx question rule");
652
- else if (outcome !== "absent") console.log(` ${skip} fx question rule ${dim(`(${FX_QUESTION_TOOL} in ${path}: ${FX_QUESTION_RULE_KEPT[outcome]})`)}`);
653
- }
654
- if (existsSync6(fxQuestionRuleReceipt())) guardedRemove(fxQuestionRuleReceipt(), { force: true });
655
- };
656
645
  var removeFxInstructions = () => {
657
646
  if (guardedInstructionBlockRemoval(fxAgentsMd())) {
658
647
  console.log(` ${check} fx instructions ${dim(did("removed"))}`);
@@ -839,14 +828,14 @@ var main = async () => {
839
828
  const macAppKeeps = (agent, entryKey) => keepShared && (restoredByTakeover.has(agent) || macAppKeepsMcpEntry(entryKey, sharedMcpKeys));
840
829
  if (keepCliRuntime) {
841
830
  console.log(` ${yellow(bold("Clean stopped before changing provider configuration."))}`);
842
- console.log(` ${dim("Fix the hooks file or receipt above, then re-run")} npx @pushary/agent-hooks@latest clean`);
831
+ console.log(` ${dim("Fix the hooks file or receipt above, then re-run")} ${NPX_LATEST_COMMAND} clean`);
843
832
  process.exit(EXIT.FAILED);
844
833
  }
845
834
  const daemonRemoved = await guardedDaemonRemoval();
846
835
  if (!daemonRemoved) {
847
836
  console.log(` ${cross} Background service ${dim("(could not stop or uninstall)")}`);
848
837
  console.log(` ${yellow(bold("Clean stopped before changing provider configuration or local state."))}`);
849
- console.log(` ${dim("Fix the background service, then re-run")} npx @pushary/agent-hooks@latest clean`);
838
+ console.log(` ${dim("Fix the background service, then re-run")} ${NPX_LATEST_COMMAND} clean`);
850
839
  console.log();
851
840
  process.exit(EXIT.FAILED);
852
841
  }
@@ -1127,9 +1116,7 @@ var main = async () => {
1127
1116
  } else {
1128
1117
  console.log(` ${skip} OpenCode AGENTS.md ${dim("(no pushary block)")}`);
1129
1118
  }
1130
- removeFxMcpServer();
1131
- removeFxToolsRule();
1132
- removeFxQuestionRule();
1119
+ removeFxConfiguration();
1133
1120
  removeFxInstructions();
1134
1121
  const hermesPython = resolveHermesPython();
1135
1122
  if (hermesPython) {
@@ -1264,23 +1251,22 @@ var main = async () => {
1264
1251
  }
1265
1252
  }
1266
1253
  if (!npmIsOnPath()) {
1267
- console.log(` ${skip} Global package ${dim(`(npm not found; remove ${AGENT_HOOKS_PACKAGE} with the tool that installed it)`)}`);
1268
- } else if (globalPackageState(AGENT_HOOKS_PACKAGE) === "absent") {
1269
- console.log(` ${skip} Global package ${dim("(not installed)")}`);
1254
+ console.log(` ${skip} Global package ${dim(`(npm not found; remove ${CLI_PACKAGE_NAMES.join(" or ")} with the tool that installed it)`)}`);
1270
1255
  } else {
1271
- try {
1272
- if (dryRun) wouldNote("run ", `npm uninstall -g ${AGENT_HOOKS_PACKAGE}`);
1273
- else execNpm(`uninstall -g --no-workspaces ${AGENT_HOOKS_PACKAGE}`, { stdio: "ignore", timeout: 3e4 });
1274
- console.log(` ${check} Global package ${dim(did("uninstalled"))}`);
1275
- } catch {
1256
+ const removal = removeGlobalCliPackages(guards, { dryRun });
1257
+ if (removal.kind === "not_installed") {
1258
+ console.log(` ${skip} Global package ${dim("(not installed)")}`);
1259
+ } else if (removal.kind === "removed") {
1260
+ console.log(` ${check} Global package ${dim(did("uninstalled"))} ${dim(`(${removal.names.join(", ")})`)}`);
1261
+ } else {
1276
1262
  incompleteClean = true;
1277
- console.log(` ${cross} Global package ${dim(`(npm uninstall failed; run npm uninstall -g ${AGENT_HOOKS_PACKAGE})`)}`);
1263
+ console.log(` ${cross} Global package ${dim(`(npm uninstall failed; run npm uninstall -g ${removal.names.join(" ")})`)}`);
1278
1264
  }
1279
1265
  }
1280
1266
  console.log();
1281
1267
  if (incompleteClean) {
1282
1268
  console.log(` ${yellow(bold("Clean finished with something left behind."))}`);
1283
- console.log(` ${dim("See the \u2717 above. Fix it, then re-run")} npx @pushary/agent-hooks@latest clean`);
1269
+ console.log(` ${dim("See the \u2717 above. Fix it, then re-run")} ${NPX_LATEST_COMMAND} clean`);
1284
1270
  console.log(` ${dim("Still stuck? Send this output to")} ${SUPPORT_EMAIL} ${dim("or")} ${SUPPORT_DISCORD}`);
1285
1271
  } else if (everything) {
1286
1272
  console.log(` ${green(bold("Clean complete. Nothing of ours is left in any agent config."))}`);
@@ -1296,7 +1282,7 @@ var main = async () => {
1296
1282
  console.log(` ${dim("The Mac app's wiring and its stored key are still here. Re-run with")} --everything ${dim("to remove them.")}`);
1297
1283
  }
1298
1284
  }
1299
- console.log(` ${dim("Run")} npx @pushary/agent-hooks@latest setup ${dim("to reinstall.")}`);
1285
+ console.log(` ${dim("Run")} ${NPX_LATEST_COMMAND} setup ${dim("to reinstall.")}`);
1300
1286
  const exportedKey = process.env.PUSHARY_API_KEY?.trim();
1301
1287
  if (aliasRemovedFrom.length > 0 || exportedKey) {
1302
1288
  console.log();
@@ -1,24 +1,24 @@
1
1
  #!/usr/bin/env node
2
- import "../chunk-Y4ZH64UK.js";
2
+ import "../chunk-VZMIHERK.js";
3
3
  import {
4
4
  LiveTranscriptRelay,
5
5
  liveSessionSleep,
6
6
  postLiveSession,
7
7
  postLiveSessionUntilAccepted,
8
8
  startLiveSessionHeartbeat
9
- } from "../chunk-BIH2Y2HP.js";
9
+ } from "../chunk-HVDMGDYV.js";
10
10
  import {
11
11
  SESSION_IDLE_TIMEOUT_MS,
12
12
  describeIdleWindow,
13
13
  idleDeadlinePassed,
14
14
  startProcessOwnership,
15
15
  withSpawnProcessOwnership
16
- } from "../chunk-LHC45YUC.js";
17
- import "../chunk-P2VIBGXA.js";
18
- import "../chunk-WPX67AKT.js";
16
+ } from "../chunk-ZJYJAD52.js";
17
+ import "../chunk-URNXU3FO.js";
18
+ import "../chunk-UMMCHS6P.js";
19
19
  import {
20
20
  transcriptsEnabled
21
- } from "../chunk-LPNJLKBQ.js";
21
+ } from "../chunk-72WOCX22.js";
22
22
  import {
23
23
  spawnClaude
24
24
  } from "../chunk-XHKBHWLX.js";
@@ -27,39 +27,39 @@ import {
27
27
  isDecisionStopped,
28
28
  isWaitForAnswerResponse,
29
29
  withdrawQuestion
30
- } from "../chunk-YC27PROF.js";
30
+ } from "../chunk-MMVCI6DT.js";
31
31
  import {
32
32
  writeDegraded
33
- } from "../chunk-N5MZH5A6.js";
33
+ } from "../chunk-KB2FTO4O.js";
34
34
  import "../chunk-POFBE6ZY.js";
35
- import "../chunk-D6OODZCM.js";
35
+ import "../chunk-TJMAXQ5Q.js";
36
36
  import {
37
37
  callMcpTool
38
- } from "../chunk-VE7TXLR4.js";
39
- import "../chunk-EEEJ2JIL.js";
40
- import "../chunk-DUQO4C4I.js";
38
+ } from "../chunk-I4HKMUZQ.js";
39
+ import "../chunk-DVW2MYCM.js";
40
+ import "../chunk-2SLCHCVN.js";
41
41
  import {
42
42
  getMachineId
43
- } from "../chunk-OVC5QXN5.js";
43
+ } from "../chunk-4A3UQERT.js";
44
44
  import "../chunk-7QLSKOSU.js";
45
45
  import "../chunk-KZERVKTD.js";
46
- import "../chunk-62CVUUNU.js";
46
+ import "../chunk-5Y2DY6X4.js";
47
47
  import {
48
48
  resolveBinary
49
- } from "../chunk-MZBRL5H5.js";
49
+ } from "../chunk-UPLV5AJF.js";
50
50
  import "../chunk-T7E75EKA.js";
51
51
  import {
52
52
  getApiKey,
53
53
  getBaseUrl
54
- } from "../chunk-R6OYCUNK.js";
55
- import "../chunk-YYCTF4Q5.js";
54
+ } from "../chunk-ON5JW2HP.js";
55
+ import "../chunk-35X5UDML.js";
56
56
  import {
57
57
  elicitationContent,
58
58
  parseAgentQuestion,
59
59
  parseAgentQuestionAnswers,
60
60
  planElicitationAsk,
61
61
  readElicitationFields
62
- } from "../chunk-G4GLCLKK.js";
62
+ } from "../chunk-5YY3IJT4.js";
63
63
 
64
64
  // bin/pushary-codex-bridge.ts
65
65
  import { existsSync } from "fs";