@pushary/agent-hooks 1.9.8 → 1.9.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/bin/pushary-bell-hook.js +22 -23
  3. package/dist/bin/pushary-bell.js +13 -13
  4. package/dist/bin/pushary-claude.js +26 -27
  5. package/dist/bin/pushary-clean.js +124 -51
  6. package/dist/bin/pushary-codex-bridge.js +20 -20
  7. package/dist/bin/pushary-codex-hook.js +34 -35
  8. package/dist/bin/pushary-codex.js +13 -13
  9. package/dist/bin/pushary-connect.js +41 -18
  10. package/dist/bin/pushary-cowork.js +5 -5
  11. package/dist/bin/pushary-daemon.js +35 -37
  12. package/dist/bin/pushary-disconnect.js +29 -32
  13. package/dist/bin/pushary-doctor.js +101 -78
  14. package/dist/bin/pushary-elicitation-hook.js +25 -26
  15. package/dist/bin/pushary-gemini-bridge.js +13 -13
  16. package/dist/bin/pushary-gemini-hook.js +29 -30
  17. package/dist/bin/pushary-hook.js +36 -37
  18. package/dist/bin/pushary-login.js +12 -12
  19. package/dist/bin/pushary-logout.js +18 -78
  20. package/dist/bin/pushary-mcp.js +9 -9
  21. package/dist/bin/pushary-mode.js +12 -12
  22. package/dist/bin/pushary-notification-hook.js +29 -30
  23. package/dist/bin/pushary-opencode-hook.js +28 -29
  24. package/dist/bin/pushary-permission-denied-hook.js +30 -31
  25. package/dist/bin/pushary-permission-hook.js +33 -34
  26. package/dist/bin/pushary-post-hook.js +30 -31
  27. package/dist/bin/pushary-prompt-hook.js +29 -30
  28. package/dist/bin/pushary-session-end-hook.js +29 -30
  29. package/dist/bin/pushary-session-start-hook.js +33 -35
  30. package/dist/bin/pushary-setup.js +147 -116
  31. package/dist/bin/pushary-stats.js +5 -5
  32. package/dist/bin/pushary-status.js +48 -18
  33. package/dist/bin/pushary-stop-hook.js +29 -30
  34. package/dist/bin/pushary-stopfailure-hook.js +29 -30
  35. package/dist/bin/pushary-suggestions.js +12 -12
  36. package/dist/bin/pushary-transcript-register.js +18 -19
  37. package/dist/bin/pushary-transcripts.js +7 -7
  38. package/dist/bin/pushary-upgrade.js +38 -44
  39. package/dist/bin/pushary-wait.js +12 -12
  40. package/dist/bin/pushary.js +6 -6
  41. package/dist/{chunk-CKV3UPMU.js → chunk-2HFSKYLN.js} +2 -2
  42. package/dist/{chunk-ZN3C6GBG.js → chunk-2HXG2QDI.js} +4 -4
  43. package/dist/{chunk-5QUPKDI5.js → chunk-2M52CFVO.js} +1 -1
  44. package/dist/{chunk-KF3UZLYI.js → chunk-2S34OPHS.js} +1 -1
  45. package/dist/{chunk-2A53H4S6.js → chunk-5MQYA3YL.js} +22 -21
  46. package/dist/{chunk-I5IJRMNV.js → chunk-5RGA636G.js} +21 -9
  47. package/dist/{chunk-IAD2RT4L.js → chunk-6KNC6KLL.js} +4 -4
  48. package/dist/{chunk-KHNFLYJO.js → chunk-7HGR5GNY.js} +4 -4
  49. package/dist/{chunk-BEJRK4DF.js → chunk-AKPHYSEL.js} +5 -4
  50. package/dist/{chunk-ZBK6E2OR.js → chunk-APP43AW7.js} +1 -1
  51. package/dist/chunk-BOSXFI7L.js +52 -0
  52. package/dist/{chunk-WS4H76EP.js → chunk-BTFUSQFB.js} +2 -2
  53. package/dist/{chunk-B64KHETR.js → chunk-BVPPYR7B.js} +3 -3
  54. package/dist/{chunk-TCWKTUAE.js → chunk-BVSIM4EF.js} +2 -2
  55. package/dist/{chunk-BXET3ALR.js → chunk-C6QTMWJZ.js} +2 -2
  56. package/dist/{chunk-IHO3YQAN.js → chunk-CJYM4ZHV.js} +2 -2
  57. package/dist/{chunk-6TE27XZR.js → chunk-DAOQT4WK.js} +2 -2
  58. package/dist/{chunk-V5HPPF3E.js → chunk-DL6QHS7V.js} +1 -1
  59. package/dist/{chunk-DPGSLWOS.js → chunk-DWO4RLYK.js} +10 -10
  60. package/dist/{chunk-GU3EJCVV.js → chunk-EA5NWDK7.js} +4 -0
  61. package/dist/{chunk-I6MJXLMY.js → chunk-EVC765EO.js} +2 -2
  62. package/dist/{chunk-WG3K4TCH.js → chunk-GQYX24UC.js} +1 -1
  63. package/dist/{chunk-N4QSPI3B.js → chunk-GTZ4HIHU.js} +15 -13
  64. package/dist/{chunk-DUZVXBBU.js → chunk-H4F5O3RE.js} +1 -1
  65. package/dist/{chunk-MKTJEXZ3.js → chunk-I3W7GJ5R.js} +3 -3
  66. package/dist/{chunk-ZSTSEBG7.js → chunk-IIVZZMSO.js} +1 -1
  67. package/dist/{chunk-KRCR2CRQ.js → chunk-LDQGURCF.js} +11 -11
  68. package/dist/{chunk-2WXF3QJR.js → chunk-LXA236ZQ.js} +2 -2
  69. package/dist/{chunk-CD47ZFFZ.js → chunk-MD4SVNT6.js} +1 -1
  70. package/dist/{chunk-CLOSJ4ES.js → chunk-MISUKJGW.js} +1 -1
  71. package/dist/{chunk-DKMD6AWR.js → chunk-NQ67AF3V.js} +4 -4
  72. package/dist/{chunk-HRULIYDU.js → chunk-OL2Z7WI4.js} +2 -2
  73. package/dist/{chunk-MXHTGVFZ.js → chunk-PNC5ZQFS.js} +16 -20
  74. package/dist/{chunk-3I6IVOZV.js → chunk-PR2VDVCP.js} +3 -3
  75. package/dist/{chunk-FQ2GORVG.js → chunk-Q3UMWSE4.js} +2 -2
  76. package/dist/{chunk-MFF3ONG5.js → chunk-QAGWWDXQ.js} +78 -8
  77. package/dist/{chunk-M6BZZFVQ.js → chunk-QGRENWJL.js} +1 -1
  78. package/dist/{chunk-LKLVTG3V.js → chunk-RPQLZLKC.js} +5 -5
  79. package/dist/{chunk-KFF7G225.js → chunk-S2DAKKQQ.js} +3 -3
  80. package/dist/chunk-SB2GN6OP.js +71 -0
  81. package/dist/{chunk-2QGYMY7A.js → chunk-SIHYBIEN.js} +142 -4
  82. package/dist/{chunk-ZW3XZLJC.js → chunk-SJDMULE7.js} +5 -5
  83. package/dist/{chunk-IHFDPV7C.js → chunk-SMVMLWCD.js} +1 -1
  84. package/dist/{chunk-QOLITCIP.js → chunk-T6ZN4TEF.js} +1 -1
  85. package/dist/{chunk-7DVNSQWF.js → chunk-TCXL5FQQ.js} +2 -2
  86. package/dist/{chunk-7PT35RY2.js → chunk-U5FP5JIS.js} +2 -2
  87. package/dist/{chunk-ZBHUHJG6.js → chunk-UJZ7AGSC.js} +6 -4
  88. package/dist/{chunk-TCQ43LSG.js → chunk-UM5WXBKN.js} +3 -3
  89. package/dist/{chunk-2QTO5YIT.js → chunk-XKMGHVXW.js} +6 -6
  90. package/dist/{chunk-LWOO567I.js → chunk-XXLCYKVS.js} +3 -3
  91. package/dist/{chunk-MGRFDGWU.js → chunk-Y7JM47CI.js} +2 -2
  92. package/dist/{chunk-NWDG3MSW.js → chunk-YUQHUGTH.js} +1 -1
  93. package/dist/{chunk-WWOHTTVP.js → chunk-Z2Q2VH43.js} +2 -2
  94. package/dist/{chunk-DL7XWKYV.js → chunk-ZGADIZDS.js} +2 -2
  95. package/dist/{chunk-2VZAALEJ.js → chunk-ZSGJYSF2.js} +8 -8
  96. package/dist/{global-upgrade-I56HNM23.js → global-upgrade-PUM44JUH.js} +6 -6
  97. package/dist/{paths-AGY43CXS.js → paths-U2MJGNBT.js} +2 -2
  98. package/dist/{reapply-IA5XUKWW.js → reapply-PRKV4EO7.js} +22 -24
  99. package/dist/src/index.js +19 -19
  100. package/dist/{upgrade-lock-B34TAUKV.js → upgrade-lock-QZSVLEM7.js} +3 -3
  101. package/package.json +1 -1
  102. package/dist/chunk-3Z3A37WD.js +0 -77
  103. package/dist/chunk-OP7IHC2I.js +0 -24
  104. package/dist/chunk-YIG2R3BJ.js +0 -145
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.10
4
+
5
+ - `pushary setup` no longer reports Qwen Code, CodeBuddy, Qoder, Droid and Devin as an account mismatch when the Pushary Mac app connected them and the CLI's key is in the same account. Setup compares the account of the key in their MCP entry for Qwen Code, CodeBuddy and Qoder, and the account of the Mac app's own key for Droid and Devin, whose hooks run through the app. They are kept and listed as kept for the Mac app. If the app is in a different account, setup reports it and changes nothing. The CLI does not copy or save the app's key.
6
+ - `pushary doctor` no longer fails "Global package installed" on a computer the Pushary Mac app connects, for example when run with npx. The app runs the hooks there, so doctor prints that the global package is not installed and not needed. It still fails when the CLI has its own key or owns any agent's hooks, because those hooks run the global package.
7
+ - `pushary clean --everything` revokes the keys the CLI wrote on pushary.com before removing them: the key in `~/.pushary/config.json`, and a different key in the `export PUSHARY_API_KEY=...` line setup writes to your shell profile. It says whether each key was revoked. A key that is only in the `PUSHARY_API_KEY` environment variable is left alone and named, because Pushary did not write it and it may be a server key you use elsewhere. If pushary.com cannot be reached, the clean still finishes and tells you where to revoke the key. `--dry-run` revokes nothing and lists the keys it would revoke. The Mac app's key is never revoked, and a plain `clean`, `disconnect` and `sign-out` without `--revoke` behave as before.
8
+ - `pushary setup --take-over-hooks` takes over Droid's hooks from the Pushary Mac app. It used to fail with "no Mac app wiring was found", because Droid keeps its hooks at the top of `~/.factory/hooks.json`.
9
+
10
+ ## 1.9.9
11
+
12
+ - The VS Code hooks setup writes now run the gate through the same shell guard as every other agent. Before, a missing Node or a deleted plugin folder made the VS Code hooks fail on every tool call; now they stay silent and VS Code carries on as if Pushary were not installed. Run setup again for VS Code to get the guarded hooks.
13
+ - `pushary doctor`, `pushary status` and `pushary pair` recognise a computer the Pushary Mac app connects when the CLI has no key of its own. Doctor and status say the computer is connected through the Pushary Mac app instead of reporting a missing key, and pair tells you to pair a phone from the app's Settings > Phone. The CLI does not use, copy or save the app's key.
14
+ - A default `pushary setup` turns on phone-start when `~/.pushary/config.json` exists but has no `controlMode`, as `pushary login` and the Mac app's Hermes connection leave it. Before, setup skipped phone-start on those machines. `--control off`, or a saved `controlMode` of `off`, still keeps it off, and upgrades still never add the background service on their own.
15
+ - `pushary setup` keeps an OpenCode plugin the Pushary Mac app installed, as it already did for the other agents, and lists it as kept. It used to overwrite the app's plugin, MCP key and instructions. Pass `--take-over-hooks` if you want the CLI to own it. If the app is signed into a different account, setup reports that for OpenCode and changes nothing.
16
+
3
17
  ## 1.9.8
4
18
 
5
19
  - `pushary upgrade` and automatic updates no longer take over agents the Pushary Mac app connected. They used to replace the app's hooks with the CLI's and overwrite its MCP key for Claude Code, Codex, Gemini CLI, VS Code and OpenCode. An agent the app owns is now left exactly as the app wrote it and listed as kept for the Mac app, using the same rule setup uses. Pass `--take-over-hooks` to setup if you want the CLI to own it.
@@ -1,38 +1,37 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleBell
4
- } from "../chunk-IHFDPV7C.js";
4
+ } from "../chunk-SMVMLWCD.js";
5
5
  import {
6
6
  readHookInput
7
- } from "../chunk-WWOHTTVP.js";
8
- import "../chunk-DPGSLWOS.js";
7
+ } from "../chunk-Z2Q2VH43.js";
8
+ import "../chunk-DWO4RLYK.js";
9
9
  import "../chunk-SGZJ5LYH.js";
10
- import "../chunk-YIG2R3BJ.js";
11
- import "../chunk-DL7XWKYV.js";
12
- import "../chunk-LKLVTG3V.js";
13
- import "../chunk-2QGYMY7A.js";
14
- import "../chunk-3I6IVOZV.js";
15
- import "../chunk-WG3K4TCH.js";
16
- import "../chunk-ZBK6E2OR.js";
17
- import "../chunk-CLOSJ4ES.js";
18
- import "../chunk-M6BZZFVQ.js";
10
+ import "../chunk-RPQLZLKC.js";
11
+ import "../chunk-APP43AW7.js";
12
+ import "../chunk-MISUKJGW.js";
13
+ import "../chunk-QGRENWJL.js";
19
14
  import "../chunk-XHKBHWLX.js";
15
+ import "../chunk-SIHYBIEN.js";
16
+ import "../chunk-PR2VDVCP.js";
17
+ import "../chunk-ZGADIZDS.js";
18
+ import "../chunk-GQYX24UC.js";
19
+ import "../chunk-GMXKITVA.js";
20
20
  import "../chunk-6ICPEJY5.js";
21
- import "../chunk-CD47ZFFZ.js";
22
- import "../chunk-DKMD6AWR.js";
21
+ import "../chunk-GTZ4HIHU.js";
22
+ import "../chunk-MD4SVNT6.js";
23
+ import "../chunk-NQ67AF3V.js";
23
24
  import "../chunk-POFBE6ZY.js";
24
- import "../chunk-GMXKITVA.js";
25
- import "../chunk-N4QSPI3B.js";
26
- import "../chunk-TCQ43LSG.js";
27
- import "../chunk-DUZVXBBU.js";
25
+ import "../chunk-UM5WXBKN.js";
26
+ import "../chunk-H4F5O3RE.js";
28
27
  import "../chunk-7QLSKOSU.js";
29
28
  import "../chunk-KZERVKTD.js";
30
- import "../chunk-FQ2GORVG.js";
31
- import "../chunk-ZBHUHJG6.js";
29
+ import "../chunk-Q3UMWSE4.js";
30
+ import "../chunk-UJZ7AGSC.js";
32
31
  import "../chunk-T7E75EKA.js";
33
- import "../chunk-5QUPKDI5.js";
34
- import "../chunk-7DVNSQWF.js";
35
- import "../chunk-I5IJRMNV.js";
32
+ import "../chunk-2M52CFVO.js";
33
+ import "../chunk-TCXL5FQQ.js";
34
+ import "../chunk-5RGA636G.js";
36
35
 
37
36
  // bin/pushary-bell-hook.ts
38
37
  var main = async () => {
@@ -5,37 +5,37 @@ import {
5
5
  liveAgentCount,
6
6
  ring,
7
7
  upgradeThreshold
8
- } from "../chunk-IHFDPV7C.js";
9
- import {
10
- addBellHooks,
11
- bellInstalled,
12
- removeBellHooks
13
- } from "../chunk-WG3K4TCH.js";
8
+ } from "../chunk-SMVMLWCD.js";
14
9
  import {
15
10
  createIo
16
11
  } from "../chunk-U4TMAANR.js";
17
12
  import {
18
13
  exitOnHelpFlag
19
- } from "../chunk-CKV3UPMU.js";
14
+ } from "../chunk-2HFSKYLN.js";
15
+ import {
16
+ addBellHooks,
17
+ bellInstalled,
18
+ removeBellHooks
19
+ } from "../chunk-GQYX24UC.js";
20
20
  import {
21
21
  parseFlags
22
22
  } from "../chunk-GMXKITVA.js";
23
- import "../chunk-N4QSPI3B.js";
23
+ import "../chunk-GTZ4HIHU.js";
24
24
  import "../chunk-7QLSKOSU.js";
25
25
  import {
26
26
  EXIT
27
27
  } from "../chunk-KZERVKTD.js";
28
- import "../chunk-FQ2GORVG.js";
28
+ import "../chunk-Q3UMWSE4.js";
29
29
  import {
30
30
  claudeSettings
31
- } from "../chunk-ZBHUHJG6.js";
31
+ } from "../chunk-UJZ7AGSC.js";
32
32
  import {
33
33
  readJsonSafe,
34
34
  writeJsonAtomic
35
35
  } from "../chunk-T7E75EKA.js";
36
- import "../chunk-5QUPKDI5.js";
37
- import "../chunk-7DVNSQWF.js";
38
- import "../chunk-I5IJRMNV.js";
36
+ import "../chunk-2M52CFVO.js";
37
+ import "../chunk-TCXL5FQQ.js";
38
+ import "../chunk-5RGA636G.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-KF3UZLYI.js";
11
+ } from "../chunk-2S34OPHS.js";
12
12
  import {
13
13
  announceSubscriptionRequired,
14
14
  isDeferAnswer
@@ -18,28 +18,29 @@ import {
18
18
  loadSessionKey,
19
19
  registerTranscript,
20
20
  registeredTranscriptEnabled
21
- } from "../chunk-DPGSLWOS.js";
21
+ } from "../chunk-DWO4RLYK.js";
22
22
  import "../chunk-SGZJ5LYH.js";
23
- import "../chunk-YIG2R3BJ.js";
24
- import "../chunk-DL7XWKYV.js";
25
23
  import {
26
24
  ensureDaemonRunning
27
- } from "../chunk-LKLVTG3V.js";
28
- import "../chunk-2QGYMY7A.js";
29
- import "../chunk-3I6IVOZV.js";
30
- import "../chunk-WG3K4TCH.js";
25
+ } from "../chunk-RPQLZLKC.js";
31
26
  import {
32
27
  encryptRecord
33
- } from "../chunk-ZBK6E2OR.js";
34
- import "../chunk-CLOSJ4ES.js";
28
+ } from "../chunk-APP43AW7.js";
29
+ import "../chunk-MISUKJGW.js";
35
30
  import {
36
31
  transcriptsEnabled
37
- } from "../chunk-M6BZZFVQ.js";
32
+ } from "../chunk-QGRENWJL.js";
38
33
  import {
39
34
  needsShell,
40
35
  spawnClaude
41
36
  } from "../chunk-XHKBHWLX.js";
37
+ import "../chunk-SIHYBIEN.js";
38
+ import "../chunk-PR2VDVCP.js";
39
+ import "../chunk-ZGADIZDS.js";
40
+ import "../chunk-GQYX24UC.js";
41
+ import "../chunk-GMXKITVA.js";
42
42
  import "../chunk-6ICPEJY5.js";
43
+ import "../chunk-GTZ4HIHU.js";
43
44
  import {
44
45
  UNNAMED_ACTION,
45
46
  deriveToolTarget,
@@ -50,7 +51,7 @@ import {
50
51
  repoKeyFor,
51
52
  reportEvent,
52
53
  scopePathFor
53
- } from "../chunk-KRCR2CRQ.js";
54
+ } from "../chunk-LDQGURCF.js";
54
55
  import {
55
56
  DEFAULT_SESSION,
56
57
  markPendingCommandDelivered,
@@ -60,7 +61,7 @@ import {
60
61
  removePendingCommand,
61
62
  savePendingCommand
62
63
  } from "../chunk-N6IOSZOE.js";
63
- import "../chunk-CD47ZFFZ.js";
64
+ import "../chunk-MD4SVNT6.js";
64
65
  import {
65
66
  askUser,
66
67
  cancelQuestion,
@@ -69,38 +70,36 @@ import {
69
70
  nextLongPollMs,
70
71
  waitForAnswer,
71
72
  withdrawQuestion
72
- } from "../chunk-2VZAALEJ.js";
73
- import "../chunk-DKMD6AWR.js";
74
- import "../chunk-POFBE6ZY.js";
75
- import "../chunk-GMXKITVA.js";
76
- import "../chunk-N4QSPI3B.js";
73
+ } from "../chunk-ZSGJYSF2.js";
77
74
  import {
78
75
  SubscriptionRequiredError
79
- } from "../chunk-MKTJEXZ3.js";
80
- import "../chunk-LWOO567I.js";
81
- import "../chunk-TCQ43LSG.js";
76
+ } from "../chunk-I3W7GJ5R.js";
77
+ import "../chunk-XXLCYKVS.js";
78
+ import "../chunk-NQ67AF3V.js";
79
+ import "../chunk-POFBE6ZY.js";
80
+ import "../chunk-UM5WXBKN.js";
82
81
  import {
83
82
  getMachineId
84
- } from "../chunk-DUZVXBBU.js";
83
+ } from "../chunk-H4F5O3RE.js";
85
84
  import "../chunk-7QLSKOSU.js";
86
85
  import "../chunk-KZERVKTD.js";
87
- import "../chunk-FQ2GORVG.js";
88
- import "../chunk-ZBHUHJG6.js";
86
+ import "../chunk-Q3UMWSE4.js";
87
+ import "../chunk-UJZ7AGSC.js";
89
88
  import "../chunk-T7E75EKA.js";
90
89
  import {
91
90
  getApiKey,
92
91
  getBaseUrl
93
- } from "../chunk-5QUPKDI5.js";
92
+ } from "../chunk-2M52CFVO.js";
94
93
  import {
95
94
  NPX_LATEST_COMMAND
96
- } from "../chunk-7DVNSQWF.js";
95
+ } from "../chunk-TCXL5FQQ.js";
97
96
  import {
98
97
  DECISION_STOP_REASON,
99
98
  KILL_REASON,
100
99
  UNVERIFIABLE_APPROVAL_REASON,
101
100
  redactSecretsFromContent,
102
101
  resolveGate
103
- } from "../chunk-I5IJRMNV.js";
102
+ } from "../chunk-5RGA636G.js";
104
103
 
105
104
  // src/wrapper/localPassthrough.ts
106
105
  var SIGNAL_NUMBERS = {
@@ -1,20 +1,18 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- appAgentKey,
4
- macAppKeepsMcpEntry,
5
- mcpServerBearer,
6
- pusharyKey,
7
- setupReceiptKey
8
- } from "../chunk-OP7IHC2I.js";
9
2
  import {
10
3
  PUSHARY_SKILL_NAME,
11
4
  PUSHARY_SKILL_SOURCE,
12
5
  createGuards
13
6
  } from "../chunk-EUW7JL2K.js";
7
+ import {
8
+ describeRevokeAttempt,
9
+ keyNoLongerAccepted,
10
+ revokeOwnKey
11
+ } from "../chunk-SB2GN6OP.js";
14
12
  import {
15
13
  isCursorPluginLeftover,
16
14
  withoutPusharyCursorHooks
17
- } from "../chunk-TCWKTUAE.js";
15
+ } from "../chunk-BVSIM4EF.js";
18
16
  import {
19
17
  HERMES_PIP_PACKAGE,
20
18
  readHermesStatus,
@@ -23,12 +21,27 @@ import {
23
21
  shortenHome,
24
22
  unregisterPluginLocation,
25
23
  vscodeSettingsTargets
26
- } from "../chunk-KFF7G225.js";
24
+ } from "../chunk-S2DAKKQQ.js";
27
25
  import {
28
26
  planFxRemoval,
29
27
  removeInstructionBlock
30
- } from "../chunk-ZN3C6GBG.js";
31
- import "../chunk-HRULIYDU.js";
28
+ } from "../chunk-2HXG2QDI.js";
29
+ import "../chunk-OL2Z7WI4.js";
30
+ import {
31
+ disableDaemonService
32
+ } from "../chunk-RPQLZLKC.js";
33
+ import "../chunk-XHKBHWLX.js";
34
+ import {
35
+ APPROVAL_SETTINGS_PATH
36
+ } from "../chunk-AKPHYSEL.js";
37
+ import {
38
+ macAppKeepsMcpEntry,
39
+ mcpServerBearer,
40
+ pusharyKey,
41
+ readMacAppAgentKey,
42
+ setupReceiptKey
43
+ } from "../chunk-BOSXFI7L.js";
44
+ import "../chunk-LXA236ZQ.js";
32
45
  import {
33
46
  OPENCODE_PLUGIN_SIBLING,
34
47
  OPENCODE_PLUGIN_SIBLING_CONTENTS,
@@ -40,7 +53,7 @@ import {
40
53
  openCodePluginDir,
41
54
  openCodePluginFile,
42
55
  removeOpenCodeMcpServer
43
- } from "../chunk-MFF3ONG5.js";
56
+ } from "../chunk-QAGWWDXQ.js";
44
57
  import {
45
58
  compatibleConfigFile,
46
59
  compatibleInstructionsFile,
@@ -53,59 +66,58 @@ import {
53
66
  removePusharySettings,
54
67
  removePusharyToolPermissions,
55
68
  restoreClaudeMcpServer
56
- } from "../chunk-KHNFLYJO.js";
69
+ } from "../chunk-7HGR5GNY.js";
70
+ import {
71
+ ansiPainter,
72
+ useColor
73
+ } from "../chunk-U4TMAANR.js";
74
+ import {
75
+ exitOnHelpFlag
76
+ } from "../chunk-2HFSKYLN.js";
57
77
  import {
58
78
  hookOwnerOf,
59
79
  isHookTakeoverReceipt,
80
+ liveBridgeProbe,
81
+ resolveBridgeStub,
60
82
  restoreHookTakeover,
61
83
  restoreMcpServer
62
- } from "../chunk-YIG2R3BJ.js";
63
- import "../chunk-DL7XWKYV.js";
64
- import {
65
- disableDaemonService
66
- } from "../chunk-LKLVTG3V.js";
67
- import {
68
- liveBridgeProbe,
69
- resolveBridgeStub
70
- } from "../chunk-2QGYMY7A.js";
84
+ } from "../chunk-SIHYBIEN.js";
71
85
  import {
72
86
  removeGeminiSettings
73
- } from "../chunk-3I6IVOZV.js";
74
- import "../chunk-WG3K4TCH.js";
75
- import "../chunk-XHKBHWLX.js";
76
- import "../chunk-6ICPEJY5.js";
77
- import "../chunk-KRCR2CRQ.js";
78
- import "../chunk-N6IOSZOE.js";
79
- import "../chunk-CD47ZFFZ.js";
80
- import "../chunk-2VZAALEJ.js";
81
- import "../chunk-DKMD6AWR.js";
82
- import "../chunk-POFBE6ZY.js";
83
- import {
84
- ansiPainter,
85
- useColor
86
- } from "../chunk-U4TMAANR.js";
87
- import {
88
- exitOnHelpFlag
89
- } from "../chunk-CKV3UPMU.js";
87
+ } from "../chunk-PR2VDVCP.js";
88
+ import "../chunk-ZGADIZDS.js";
89
+ import "../chunk-GQYX24UC.js";
90
90
  import {
91
91
  rejectUnknownFlags
92
92
  } from "../chunk-GMXKITVA.js";
93
+ import "../chunk-6ICPEJY5.js";
93
94
  import {
94
95
  CANDIDATE_RCS,
96
+ findExportedKeyLines,
95
97
  isDisabledExport,
98
+ keyPrefix,
99
+ readConfigFileKey,
100
+ readMacAppKeyPrefix,
96
101
  removeClaudeAlias
97
- } from "../chunk-N4QSPI3B.js";
98
- import "../chunk-MKTJEXZ3.js";
99
- import "../chunk-LWOO567I.js";
100
- import "../chunk-TCQ43LSG.js";
101
- import "../chunk-DUZVXBBU.js";
102
+ } from "../chunk-GTZ4HIHU.js";
103
+ import "../chunk-LDQGURCF.js";
104
+ import "../chunk-N6IOSZOE.js";
105
+ import "../chunk-MD4SVNT6.js";
106
+ import "../chunk-ZSGJYSF2.js";
107
+ import "../chunk-I3W7GJ5R.js";
108
+ import {
109
+ absoluteUrl
110
+ } from "../chunk-XXLCYKVS.js";
111
+ import "../chunk-NQ67AF3V.js";
112
+ import "../chunk-POFBE6ZY.js";
113
+ import "../chunk-UM5WXBKN.js";
114
+ import "../chunk-H4F5O3RE.js";
102
115
  import "../chunk-7QLSKOSU.js";
103
116
  import {
104
117
  EXIT
105
118
  } from "../chunk-KZERVKTD.js";
106
- import "../chunk-FQ2GORVG.js";
119
+ import "../chunk-Q3UMWSE4.js";
107
120
  import {
108
- bridgeAgentKey,
109
121
  claudeJson,
110
122
  claudeMcpReceipt,
111
123
  claudeSettings,
@@ -141,12 +153,14 @@ import {
141
153
  restoreCodexHookTrust,
142
154
  vscodePluginDir,
143
155
  vscodePluginMcp
144
- } from "../chunk-ZBHUHJG6.js";
156
+ } from "../chunk-UJZ7AGSC.js";
145
157
  import "../chunk-T7E75EKA.js";
146
- import "../chunk-5QUPKDI5.js";
158
+ import {
159
+ getBaseUrl
160
+ } from "../chunk-2M52CFVO.js";
147
161
  import {
148
162
  NPX_LATEST_COMMAND
149
- } from "../chunk-7DVNSQWF.js";
163
+ } from "../chunk-TCXL5FQQ.js";
150
164
  import {
151
165
  CLI_PACKAGE_NAMES,
152
166
  HOOK_COMPATIBLE_PROFILES,
@@ -158,7 +172,7 @@ import {
158
172
  globalRootFor,
159
173
  isValidApiKey,
160
174
  redactSecrets
161
- } from "../chunk-I5IJRMNV.js";
175
+ } from "../chunk-5RGA636G.js";
162
176
 
163
177
  // bin/pushary-clean.ts
164
178
  import { existsSync as existsSync6, readFileSync as readFileSync4, copyFileSync, readdirSync as readdirSync4 } from "fs";
@@ -578,6 +592,43 @@ var cleanCompatibleAgent = (profile, scope, io, home) => {
578
592
  return { profile, files, mcpKeptForApp, instructions: cleanInstructions(profile, scope, io, home) };
579
593
  };
580
594
 
595
+ // src/cli/clean-key-revocation.ts
596
+ var isMacAppKey = (key, keys) => key === keys.macAppKey || keyPrefix(key) === keys.macAppKeyPrefix;
597
+ var revocationFor = (keys) => (key) => isMacAppKey(key, keys) ? { kind: "mac_app_key", keyPrefix: keyPrefix(key) } : { kind: "revoke", key };
598
+ var validKeys = (keys) => [...new Set(keys)].filter((key) => key !== null && isValidApiKey(key));
599
+ var environmentOnlyKey = (keys, written) => validKeys([keys.envKey]).filter((key) => !written.includes(key)).map((key) => ({ kind: "environment_only", keyPrefix: keyPrefix(key) }));
600
+ var planCliKeyRevocations = (keys) => {
601
+ const written = validKeys([keys.configKey, ...keys.profileKeys]);
602
+ return [...written.map(revocationFor(keys)), ...environmentOnlyKey(keys, written)];
603
+ };
604
+ var runRevocation = async (revocation, run) => {
605
+ if (revocation.kind !== "revoke") return revocation;
606
+ if (run.dryRun) return { kind: "would_revoke", keyPrefix: keyPrefix(revocation.key) };
607
+ return { kind: "attempted", keyPrefix: keyPrefix(revocation.key), attempt: await revokeOwnKey(revocation.key, run.baseUrl) };
608
+ };
609
+ var revokeCliKeys = async (revocations, run) => {
610
+ const outcomes = [];
611
+ for (const revocation of revocations) outcomes.push(await runRevocation(revocation, run));
612
+ return outcomes;
613
+ };
614
+ var describeCliKeyRevocation = (outcome, baseUrl) => {
615
+ const label = `API key ${outcome.keyPrefix}`;
616
+ switch (outcome.kind) {
617
+ case "would_revoke":
618
+ return { tone: "skipped", line: `${label} (would revoke it on pushary.com)`, next: null };
619
+ case "mac_app_key":
620
+ return { tone: "skipped", line: `${label} (not revoked: it is the Pushary Mac app's key)`, next: null };
621
+ case "environment_only":
622
+ return { tone: "skipped", line: `${label} in PUSHARY_API_KEY (left alone: Pushary did not write it)`, next: null };
623
+ case "attempted":
624
+ return keyNoLongerAccepted(outcome.attempt) ? { tone: "done", line: `${label}: ${describeRevokeAttempt(outcome.attempt)}`, next: null } : {
625
+ tone: "warning",
626
+ line: `${label}: ${describeRevokeAttempt(outcome.attempt)}`,
627
+ next: `It may still be valid. Revoke it at ${absoluteUrl(baseUrl, APPROVAL_SETTINGS_PATH)}`
628
+ };
629
+ }
630
+ };
631
+
581
632
  // bin/pushary-clean.ts
582
633
  exitOnHelpFlag("clean");
583
634
  var paint = ansiPainter(() => useColor());
@@ -796,6 +847,27 @@ var restoreTakeoverReceipts = () => {
796
847
  }
797
848
  }
798
849
  };
850
+ var KEY_REVOCATION_ICONS = {
851
+ done: check,
852
+ skipped: skip,
853
+ warning: yellow("!")
854
+ };
855
+ var printKeyRevocation = (report) => {
856
+ console.log(` ${KEY_REVOCATION_ICONS[report.tone]} ${report.line}`);
857
+ if (report.next) console.log(` ${dim(report.next)}`);
858
+ };
859
+ var revokeKeysThisCliHolds = async () => {
860
+ const baseUrl = getBaseUrl();
861
+ const revocations = planCliKeyRevocations({
862
+ configKey: readConfigFileKey(),
863
+ profileKeys: findExportedKeyLines().map((line) => line.key),
864
+ envKey: process.env.PUSHARY_API_KEY?.trim() || null,
865
+ macAppKey: readMacAppAgentKey(),
866
+ macAppKeyPrefix: readMacAppKeyPrefix()
867
+ });
868
+ const outcomes = await revokeCliKeys(revocations, { dryRun, baseUrl });
869
+ for (const outcome of outcomes) printKeyRevocation(describeCliKeyRevocation(outcome, baseUrl));
870
+ };
799
871
  var main = async () => {
800
872
  console.log();
801
873
  console.log(` ${bold("Pushary Clean")}`);
@@ -856,7 +928,7 @@ var main = async () => {
856
928
  );
857
929
  if (keepShared) restoreTakeoverReceipts();
858
930
  const sharedMcpKeys = {
859
- appKey: appAgentKey(readJson(bridgeAgentKey())),
931
+ appKey: readMacAppAgentKey(),
860
932
  setupKey: setupReceiptKey(readJson(CLAUDE_MCP_RECEIPT))
861
933
  };
862
934
  const macAppKeeps = (agent, entryKey) => keepShared && (restoredByTakeover.has(agent) || macAppKeepsMcpEntry(entryKey, sharedMcpKeys));
@@ -874,6 +946,7 @@ var main = async () => {
874
946
  process.exit(EXIT.FAILED);
875
947
  }
876
948
  console.log(` ${check} Background service ${dim(did("uninstalled"))}`);
949
+ if (everything) await revokeKeysThisCliHolds();
877
950
  const claudeJson2 = readJson(CLAUDE_JSON);
878
951
  const keepClaudeMcp = macAppKeeps("claude_code", mcpServerBearer(claudeJson2?.mcpServers));
879
952
  const claudeHasPusharyEntry = () => Boolean(claudeJson2?.mcpServers?.pushary);
@@ -5,10 +5,10 @@ import {
5
5
  postLiveSession,
6
6
  postLiveSessionUntilAccepted,
7
7
  startLiveSessionHeartbeat
8
- } from "../chunk-WS4H76EP.js";
8
+ } from "../chunk-BTFUSQFB.js";
9
9
  import {
10
10
  resolveProviderBinary
11
- } from "../chunk-I6MJXLMY.js";
11
+ } from "../chunk-EVC765EO.js";
12
12
  import "../chunk-RIVNNBEK.js";
13
13
  import {
14
14
  SESSION_IDLE_TIMEOUT_MS,
@@ -16,52 +16,52 @@ import {
16
16
  idleDeadlinePassed,
17
17
  startProcessOwnership,
18
18
  withSpawnProcessOwnership
19
- } from "../chunk-KF3UZLYI.js";
20
- import "../chunk-ZBK6E2OR.js";
21
- import "../chunk-CLOSJ4ES.js";
19
+ } from "../chunk-2S34OPHS.js";
20
+ import "../chunk-APP43AW7.js";
21
+ import "../chunk-MISUKJGW.js";
22
22
  import {
23
23
  transcriptsEnabled
24
- } from "../chunk-M6BZZFVQ.js";
24
+ } from "../chunk-QGRENWJL.js";
25
25
  import {
26
26
  spawnClaude
27
27
  } from "../chunk-XHKBHWLX.js";
28
28
  import "../chunk-6ICPEJY5.js";
29
+ import "../chunk-GTZ4HIHU.js";
29
30
  import {
30
31
  isAskUserResponse,
31
32
  isDecisionStopped,
32
33
  isWaitForAnswerResponse,
33
34
  withdrawQuestion
34
- } from "../chunk-2VZAALEJ.js";
35
+ } from "../chunk-ZSGJYSF2.js";
36
+ import {
37
+ callMcpTool
38
+ } from "../chunk-I3W7GJ5R.js";
39
+ import "../chunk-XXLCYKVS.js";
35
40
  import {
36
41
  writeDegraded
37
- } from "../chunk-DKMD6AWR.js";
42
+ } from "../chunk-NQ67AF3V.js";
38
43
  import "../chunk-POFBE6ZY.js";
39
- import "../chunk-N4QSPI3B.js";
40
- import {
41
- callMcpTool
42
- } from "../chunk-MKTJEXZ3.js";
43
- import "../chunk-LWOO567I.js";
44
- import "../chunk-TCQ43LSG.js";
44
+ import "../chunk-UM5WXBKN.js";
45
45
  import {
46
46
  getMachineId
47
- } from "../chunk-DUZVXBBU.js";
47
+ } from "../chunk-H4F5O3RE.js";
48
48
  import "../chunk-7QLSKOSU.js";
49
49
  import "../chunk-KZERVKTD.js";
50
- import "../chunk-FQ2GORVG.js";
51
- import "../chunk-ZBHUHJG6.js";
50
+ import "../chunk-Q3UMWSE4.js";
51
+ import "../chunk-UJZ7AGSC.js";
52
52
  import "../chunk-T7E75EKA.js";
53
53
  import {
54
54
  getApiKey,
55
55
  getBaseUrl
56
- } from "../chunk-5QUPKDI5.js";
57
- import "../chunk-7DVNSQWF.js";
56
+ } from "../chunk-2M52CFVO.js";
57
+ import "../chunk-TCXL5FQQ.js";
58
58
  import {
59
59
  elicitationContent,
60
60
  parseAgentQuestion,
61
61
  parseAgentQuestionAnswers,
62
62
  planElicitationAsk,
63
63
  readElicitationFields
64
- } from "../chunk-I5IJRMNV.js";
64
+ } from "../chunk-5RGA636G.js";
65
65
 
66
66
  // bin/pushary-codex-bridge.ts
67
67
  import { existsSync } from "fs";