@pushary/agent-hooks 1.9.12 → 1.9.14

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 (102) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/data/cursor-plugin/scripts/pushary-gate.mjs +7 -2
  3. package/dist/bin/pushary-bell-hook.js +25 -25
  4. package/dist/bin/pushary-bell.js +9 -9
  5. package/dist/bin/pushary-claude.js +26 -25
  6. package/dist/bin/pushary-clean.js +52 -30
  7. package/dist/bin/pushary-codex-bridge.js +17 -17
  8. package/dist/bin/pushary-codex-hook.js +30 -30
  9. package/dist/bin/pushary-codex.js +12 -12
  10. package/dist/bin/pushary-connect.js +24 -24
  11. package/dist/bin/pushary-cowork.js +5 -5
  12. package/dist/bin/pushary-daemon.js +31 -31
  13. package/dist/bin/pushary-disconnect.js +39 -25
  14. package/dist/bin/pushary-doctor.js +33 -33
  15. package/dist/bin/pushary-elicitation-hook.js +25 -25
  16. package/dist/bin/pushary-gemini-bridge.js +13 -13
  17. package/dist/bin/pushary-gemini-hook.js +27 -27
  18. package/dist/bin/pushary-hook.js +29 -29
  19. package/dist/bin/pushary-login.js +12 -12
  20. package/dist/bin/pushary-logout.js +10 -10
  21. package/dist/bin/pushary-mcp.js +9 -9
  22. package/dist/bin/pushary-mode.js +12 -12
  23. package/dist/bin/pushary-notification-hook.js +24 -24
  24. package/dist/bin/pushary-opencode-hook.js +26 -26
  25. package/dist/bin/pushary-permission-denied-hook.js +29 -29
  26. package/dist/bin/pushary-permission-hook.js +28 -28
  27. package/dist/bin/pushary-post-hook.js +24 -24
  28. package/dist/bin/pushary-prompt-hook.js +24 -24
  29. package/dist/bin/pushary-session-end-hook.js +24 -24
  30. package/dist/bin/pushary-session-start-hook.js +28 -28
  31. package/dist/bin/pushary-setup.js +69 -41
  32. package/dist/bin/pushary-stats.js +5 -5
  33. package/dist/bin/pushary-status.js +26 -26
  34. package/dist/bin/pushary-stop-hook.js +24 -24
  35. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  36. package/dist/bin/pushary-suggestions.js +12 -12
  37. package/dist/bin/pushary-transcript-register.js +17 -17
  38. package/dist/bin/pushary-transcripts.js +7 -7
  39. package/dist/bin/pushary-upgrade.js +30 -30
  40. package/dist/bin/pushary-wait.js +12 -12
  41. package/dist/bin/pushary.js +6 -6
  42. package/dist/{chunk-FSCWOYK6.js → chunk-2A234H3F.js} +3 -3
  43. package/dist/{chunk-DYQ5QIDN.js → chunk-2NIBBM3N.js} +2 -2
  44. package/dist/{chunk-FLPXTN3Q.js → chunk-2Q6IT5PR.js} +1 -1
  45. package/dist/{chunk-LBDMCNQY.js → chunk-2QASSTM5.js} +2 -2
  46. package/dist/{chunk-AWD2SLNA.js → chunk-2WWHZTI5.js} +13 -4
  47. package/dist/{chunk-J5XCHLP4.js → chunk-2Z56BRTF.js} +2 -2
  48. package/dist/{chunk-MEHDBT5H.js → chunk-34PUBGLS.js} +2 -2
  49. package/dist/{chunk-BX2R7SIY.js → chunk-3KHQWC4F.js} +6 -6
  50. package/dist/{chunk-CMZ4CW5J.js → chunk-3U4R475X.js} +3 -3
  51. package/dist/{chunk-RBBMGCSZ.js → chunk-3XAUHY35.js} +1 -1
  52. package/dist/{chunk-E2FGVADR.js → chunk-42WYKVHL.js} +2 -2
  53. package/dist/{chunk-BNQKHPEC.js → chunk-4BXVGCPE.js} +4 -4
  54. package/dist/{chunk-Z6VYZSVA.js → chunk-5RONPCMH.js} +5 -5
  55. package/dist/{chunk-GP44LTXN.js → chunk-5UYAJVAQ.js} +1 -1
  56. package/dist/{chunk-CXKY5FGY.js → chunk-5VP72OOI.js} +8 -8
  57. package/dist/{chunk-M2P3HQA3.js → chunk-7MGNY7S3.js} +1 -1
  58. package/dist/{chunk-2QJ6K2SR.js → chunk-7SIZISYH.js} +5 -5
  59. package/dist/{chunk-ZC6EVOX6.js → chunk-AJRT3JGE.js} +1 -1
  60. package/dist/{chunk-UEQWLVJB.js → chunk-APG7IAUK.js} +1 -1
  61. package/dist/{chunk-CPUEZAE2.js → chunk-ARM4DMIL.js} +1 -1
  62. package/dist/{chunk-CATIBZQH.js → chunk-CIZQARGJ.js} +3 -3
  63. package/dist/{chunk-ZHF4JDVE.js → chunk-CT4BJEU7.js} +1 -1
  64. package/dist/{chunk-PKQ435Z2.js → chunk-DVTXGXXL.js} +1 -1
  65. package/dist/{chunk-WBSL4FBX.js → chunk-EB6LH3U6.js} +3 -3
  66. package/dist/{chunk-EYLQVCME.js → chunk-ECU2Y7D2.js} +2 -2
  67. package/dist/{chunk-RYBAJXV4.js → chunk-FKQMH2DW.js} +1 -1
  68. package/dist/{chunk-TZCHW6KR.js → chunk-H7MTFFNI.js} +4 -4
  69. package/dist/{chunk-SQJUXVLW.js → chunk-J5RQW52I.js} +2 -2
  70. package/dist/{chunk-4DWQNP52.js → chunk-JHDHC2M7.js} +4 -4
  71. package/dist/{chunk-NDZKDJQU.js → chunk-K2IUMMZJ.js} +1 -1
  72. package/dist/{chunk-PNBJAYSL.js → chunk-LETLRKSY.js} +1 -1
  73. package/dist/{chunk-5VUB6VVO.js → chunk-LRZMGU7T.js} +4 -4
  74. package/dist/{chunk-CKUACXAX.js → chunk-MSEUUAJ7.js} +5 -5
  75. package/dist/{chunk-QOBOIFGG.js → chunk-NAROM5IR.js} +37 -7
  76. package/dist/{chunk-3VPS7JPH.js → chunk-NMDGIMDV.js} +2 -2
  77. package/dist/{chunk-GTM7C36Y.js → chunk-NNCK2PUR.js} +2 -2
  78. package/dist/{chunk-JNDELCH5.js → chunk-NXJNYAP7.js} +1 -1
  79. package/dist/{chunk-VDPU4YQN.js → chunk-OMR3P7PJ.js} +27 -18
  80. package/dist/{chunk-BOHDM4T7.js → chunk-POJUUEGO.js} +10 -5
  81. package/dist/{chunk-DWHCF4RH.js → chunk-PWO6T7JG.js} +5 -5
  82. package/dist/chunk-Q7JWY33N.js +111 -0
  83. package/dist/{chunk-5HPC3RNE.js → chunk-QD6GQDYW.js} +1 -1
  84. package/dist/{chunk-TSGQYARU.js → chunk-RMWV3MYN.js} +4 -4
  85. package/dist/{chunk-KXCWWHYO.js → chunk-RV4U3LYL.js} +3 -3
  86. package/dist/{chunk-SJ7M37RL.js → chunk-SEQSZYLW.js} +5 -5
  87. package/dist/{chunk-JKGTASA2.js → chunk-VYXXAFIA.js} +1 -1
  88. package/dist/{chunk-7U26QSMF.js → chunk-WYPQKDKX.js} +8 -8
  89. package/dist/{chunk-2GBUL4NP.js → chunk-XJKM6NQS.js} +6 -6
  90. package/dist/{chunk-A2DW2RNT.js → chunk-Y6IKUCVF.js} +2 -2
  91. package/dist/{chunk-YZWUTWDG.js → chunk-YSVCBUT3.js} +2 -2
  92. package/dist/{chunk-OBGZUD73.js → chunk-ZECHTK3K.js} +3 -3
  93. package/dist/{chunk-WKP2KRTU.js → chunk-ZSL7B7NF.js} +2 -2
  94. package/dist/{chunk-2NKTEA42.js → chunk-ZVFKNSRX.js} +1 -1
  95. package/dist/{global-upgrade-OCZWEF3A.js → global-upgrade-P5CJ22AW.js} +6 -6
  96. package/dist/{paths-SOGZJICO.js → paths-XZE2MPTP.js} +2 -2
  97. package/dist/{reapply-DFG5IE6N.js → reapply-V4GMKCGP.js} +20 -20
  98. package/dist/src/index.d.ts +1 -0
  99. package/dist/src/index.js +19 -19
  100. package/dist/{upgrade-lock-XLE5GVWS.js → upgrade-lock-DQF62B6X.js} +3 -3
  101. package/package.json +1 -1
  102. package/dist/chunk-PMUOEEUE.js +0 -50
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.14
4
+
5
+ - Antigravity CLI approvals go to your phone every time. agy has no approval prompt of its own while Pushary is its only gate, so under When I'm out the phone is no longer skipped because you are at the keyboard, and the wait is your policy's timeout instead of the short push window. Before, such a call was blocked with nobody asked, or after 10 seconds when you were away. Other agents keep When I'm out as it was.
6
+
7
+ ## 1.9.13
8
+
9
+ - `pushary setup` makes Pushary the only gate for Antigravity CLI. When `~/.gemini/antigravity-cli/settings.json` has no `toolPermission`, setup sets it to `always-proceed`, so plain `agy` no longer asks in its own prompt and approvals from your phone take effect. A mode you chose yourself, such as `strict`, is left alone, and setup says agy will still ask in its own prompt.
10
+ - `pushary disconnect antigravity` and `pushary clean` put `toolPermission` back, but only if Pushary set it and only once no Pushary hook is left in `~/.gemini/config/hooks.json`. A value you set or changed is never touched.
11
+ - An Antigravity CLI call that Pushary cannot decide is now blocked with a reason instead of running unasked: when Pushary is signed out, cannot be reached, or cannot establish its policy. Other agents are unchanged and still fall back to their own prompts.
12
+ - If the Pushary CLI is uninstalled while agy is still connected, agy's approval hook blocks each call and says how to undo the setup, instead of exiting silently and letting the call run.
13
+
14
+ ## 1.9.12
15
+
16
+ - An Antigravity CLI tool call that failed is recorded as failed in the session, where it used to show as completed.
17
+ - `pushary disconnect fx` is recorded in `~/.pushary/declined-agents.json`, so Pushary.app versions that read that file leave fx off until you connect it again.
18
+
3
19
  ## 1.9.11
4
20
 
5
21
  - `pushary setup` connects Antigravity CLI (`agy`). Pick it in setup or pass `--agents antigravity_cli`. Setup adds a hook named `pushary` to `~/.gemini/config/hooks.json` for `PreToolUse`, `PostToolUse` and `Stop`, and the Pushary MCP server to `~/.gemini/config/mcp_config.json`. Before agy runs a shell command, writes or edits a file, or calls an MCP tool, your policy decides, and the risky ones wait for your answer on your phone or your Mac. Pushary answers agy only with allow or deny: a denial, or no answer before your policy's wait ends, blocks the call with a reason the model sees.
@@ -35,6 +35,10 @@ const unresolved = (verdict) => genericToolHook && verdict?.reason === 'not_gate
35
35
  ? ALLOW
36
36
  : ask(genericToolHook ? 'Pushary could not reach a verdict for this change. Retry shortly.' : undefined)
37
37
 
38
+ const approvalModeWithoutLocalPrompt = (mode) => mode === 'push_first' ? 'push_only' : mode
39
+ const deliveryModeForThisHook = (mode) => genericToolHook ? approvalModeWithoutLocalPrompt(mode) : mode
40
+ const localSurfaceHint = () => genericToolHook ? { localSurfaceAvailable: false } : {}
41
+
38
42
  let activeQuestion
39
43
  let done = false
40
44
  const respond = (decision) => {
@@ -377,6 +381,7 @@ const askArgs = (request, project, ident) => ({
377
381
  ...(request.scopePath ? { scopePath: request.scopePath } : {}),
378
382
  ...(request.scopeReason ? { blocker: request.scopeReason } : {}),
379
383
  actionBody: deriveActionBody(request.display),
384
+ ...localSurfaceHint(),
380
385
  wait: false,
381
386
  waitEndsAt: new Date(Date.now() + MAX_BLOCK_MS).toISOString(),
382
387
  })
@@ -694,7 +699,7 @@ setTimeout(async () => {
694
699
  Object.assign(request, scopeFromVerdict(verdict))
695
700
  const tool = verdict.policy
696
701
 
697
- switch (tool.mode) {
702
+ switch (deliveryModeForThisHook(tool.mode)) {
698
703
  case 'terminal_only':
699
704
  return respond(handBack())
700
705
  case 'notify_only':
@@ -713,7 +718,7 @@ setTimeout(async () => {
713
718
 
714
719
  // Exported for scripts/pushary-gate.test.mjs. main() only runs when the gate is
715
720
  // executed directly, so importing this file for a test does not read stdin.
716
- export { normalizeRepoRemote, deriveRepoKey, describeRequest, handlePushOnly, handlePushFirst, withdraw }
721
+ export { normalizeRepoRemote, deriveRepoKey, describeRequest, handlePushOnly, handlePushFirst, withdraw, approvalModeWithoutLocalPrompt }
717
722
 
718
723
  const isDirectRun = process.argv[1] && import.meta.url === `file://${process.argv[1]}`
719
724
  if (!isDirectRun) {
@@ -1,41 +1,41 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  handleBell
4
- } from "../chunk-5HPC3RNE.js";
4
+ } from "../chunk-QD6GQDYW.js";
5
5
  import {
6
6
  readHookInput
7
- } from "../chunk-5VUB6VVO.js";
8
- import "../chunk-CXKY5FGY.js";
7
+ } from "../chunk-LRZMGU7T.js";
8
+ import "../chunk-5VP72OOI.js";
9
9
  import "../chunk-SGZJ5LYH.js";
10
- import "../chunk-2QJ6K2SR.js";
11
- import "../chunk-PKQ435Z2.js";
12
- import "../chunk-ZHF4JDVE.js";
13
- import "../chunk-M2P3HQA3.js";
10
+ import "../chunk-7SIZISYH.js";
11
+ import "../chunk-DVTXGXXL.js";
12
+ import "../chunk-CT4BJEU7.js";
13
+ import "../chunk-7MGNY7S3.js";
14
14
  import "../chunk-XHKBHWLX.js";
15
- import "../chunk-BOHDM4T7.js";
16
- import "../chunk-SJ7M37RL.js";
17
- import "../chunk-KXCWWHYO.js";
18
- import "../chunk-NDZKDJQU.js";
19
- import "../chunk-JNDELCH5.js";
15
+ import "../chunk-POJUUEGO.js";
16
+ import "../chunk-SEQSZYLW.js";
17
+ import "../chunk-RV4U3LYL.js";
18
+ import "../chunk-K2IUMMZJ.js";
19
+ import "../chunk-NXJNYAP7.js";
20
20
  import "../chunk-GMXKITVA.js";
21
21
  import "../chunk-6ICPEJY5.js";
22
- import "../chunk-3VPS7JPH.js";
23
- import "../chunk-7U26QSMF.js";
24
- import "../chunk-JKGTASA2.js";
25
- import "../chunk-DWHCF4RH.js";
22
+ import "../chunk-NMDGIMDV.js";
23
+ import "../chunk-WYPQKDKX.js";
24
+ import "../chunk-VYXXAFIA.js";
25
+ import "../chunk-PWO6T7JG.js";
26
26
  import "../chunk-POFBE6ZY.js";
27
- import "../chunk-CATIBZQH.js";
28
- import "../chunk-CMZ4CW5J.js";
29
- import "../chunk-WBSL4FBX.js";
30
- import "../chunk-2NKTEA42.js";
27
+ import "../chunk-CIZQARGJ.js";
28
+ import "../chunk-3U4R475X.js";
29
+ import "../chunk-EB6LH3U6.js";
30
+ import "../chunk-ZVFKNSRX.js";
31
31
  import "../chunk-7QLSKOSU.js";
32
32
  import "../chunk-KZERVKTD.js";
33
- import "../chunk-WKP2KRTU.js";
34
- import "../chunk-AWD2SLNA.js";
33
+ import "../chunk-ZSL7B7NF.js";
34
+ import "../chunk-2WWHZTI5.js";
35
35
  import "../chunk-T7E75EKA.js";
36
- import "../chunk-ZC6EVOX6.js";
37
- import "../chunk-RYBAJXV4.js";
38
- import "../chunk-QOBOIFGG.js";
36
+ import "../chunk-AJRT3JGE.js";
37
+ import "../chunk-FKQMH2DW.js";
38
+ import "../chunk-NAROM5IR.js";
39
39
 
40
40
  // bin/pushary-bell-hook.ts
41
41
  var main = async () => {
@@ -5,37 +5,37 @@ import {
5
5
  liveAgentCount,
6
6
  ring,
7
7
  upgradeThreshold
8
- } from "../chunk-5HPC3RNE.js";
8
+ } from "../chunk-QD6GQDYW.js";
9
9
  import {
10
10
  createIo
11
11
  } from "../chunk-U4TMAANR.js";
12
12
  import {
13
13
  exitOnHelpFlag
14
- } from "../chunk-GTM7C36Y.js";
14
+ } from "../chunk-NNCK2PUR.js";
15
15
  import {
16
16
  addBellHooks,
17
17
  bellInstalled,
18
18
  removeBellHooks
19
- } from "../chunk-JNDELCH5.js";
19
+ } from "../chunk-NXJNYAP7.js";
20
20
  import {
21
21
  parseFlags
22
22
  } from "../chunk-GMXKITVA.js";
23
- import "../chunk-3VPS7JPH.js";
23
+ import "../chunk-NMDGIMDV.js";
24
24
  import "../chunk-7QLSKOSU.js";
25
25
  import {
26
26
  EXIT
27
27
  } from "../chunk-KZERVKTD.js";
28
- import "../chunk-WKP2KRTU.js";
28
+ import "../chunk-ZSL7B7NF.js";
29
29
  import {
30
30
  claudeSettings
31
- } from "../chunk-AWD2SLNA.js";
31
+ } from "../chunk-2WWHZTI5.js";
32
32
  import {
33
33
  readJsonSafe,
34
34
  writeJsonAtomic
35
35
  } from "../chunk-T7E75EKA.js";
36
- import "../chunk-ZC6EVOX6.js";
37
- import "../chunk-RYBAJXV4.js";
38
- import "../chunk-QOBOIFGG.js";
36
+ import "../chunk-AJRT3JGE.js";
37
+ import "../chunk-FKQMH2DW.js";
38
+ import "../chunk-NAROM5IR.js";
39
39
 
40
40
  // bin/pushary-bell.ts
41
41
  exitOnHelpFlag("bell");
@@ -8,39 +8,39 @@ import {
8
8
  describeIdleWindow,
9
9
  startProcessOwnership,
10
10
  withSpawnProcessOwnership
11
- } from "../chunk-GP44LTXN.js";
11
+ } from "../chunk-5UYAJVAQ.js";
12
12
  import {
13
13
  announceSubscriptionRequired,
14
14
  isDeferAnswer
15
- } from "../chunk-CPUEZAE2.js";
15
+ } from "../chunk-ARM4DMIL.js";
16
16
  import {
17
17
  claudeTranscriptPath,
18
18
  loadSessionKey,
19
19
  registerTranscript,
20
20
  registeredTranscriptEnabled
21
- } from "../chunk-CXKY5FGY.js";
21
+ } from "../chunk-5VP72OOI.js";
22
22
  import "../chunk-SGZJ5LYH.js";
23
23
  import {
24
24
  ensureDaemonRunning
25
- } from "../chunk-2QJ6K2SR.js";
25
+ } from "../chunk-7SIZISYH.js";
26
26
  import {
27
27
  encryptRecord
28
- } from "../chunk-PKQ435Z2.js";
29
- import "../chunk-ZHF4JDVE.js";
28
+ } from "../chunk-DVTXGXXL.js";
29
+ import "../chunk-CT4BJEU7.js";
30
30
  import {
31
31
  transcriptsEnabled
32
- } from "../chunk-M2P3HQA3.js";
32
+ } from "../chunk-7MGNY7S3.js";
33
33
  import {
34
34
  needsShell,
35
35
  spawnClaude
36
36
  } from "../chunk-XHKBHWLX.js";
37
- import "../chunk-SJ7M37RL.js";
38
- import "../chunk-KXCWWHYO.js";
39
- import "../chunk-NDZKDJQU.js";
40
- import "../chunk-JNDELCH5.js";
37
+ import "../chunk-SEQSZYLW.js";
38
+ import "../chunk-RV4U3LYL.js";
39
+ import "../chunk-K2IUMMZJ.js";
40
+ import "../chunk-NXJNYAP7.js";
41
41
  import "../chunk-GMXKITVA.js";
42
42
  import "../chunk-6ICPEJY5.js";
43
- import "../chunk-3VPS7JPH.js";
43
+ import "../chunk-NMDGIMDV.js";
44
44
  import {
45
45
  DEFAULT_SESSION,
46
46
  UNNAMED_ACTION,
@@ -58,8 +58,8 @@ import {
58
58
  reportEvent,
59
59
  savePendingCommand,
60
60
  scopePathFor
61
- } from "../chunk-7U26QSMF.js";
62
- import "../chunk-JKGTASA2.js";
61
+ } from "../chunk-WYPQKDKX.js";
62
+ import "../chunk-VYXXAFIA.js";
63
63
  import {
64
64
  askUser,
65
65
  cancelQuestion,
@@ -68,35 +68,35 @@ import {
68
68
  nextLongPollMs,
69
69
  waitForAnswer,
70
70
  withdrawQuestion
71
- } from "../chunk-DWHCF4RH.js";
71
+ } from "../chunk-PWO6T7JG.js";
72
72
  import "../chunk-POFBE6ZY.js";
73
73
  import {
74
74
  SubscriptionRequiredError
75
- } from "../chunk-CATIBZQH.js";
76
- import "../chunk-CMZ4CW5J.js";
77
- import "../chunk-WBSL4FBX.js";
75
+ } from "../chunk-CIZQARGJ.js";
76
+ import "../chunk-3U4R475X.js";
77
+ import "../chunk-EB6LH3U6.js";
78
78
  import {
79
79
  getMachineId
80
- } from "../chunk-2NKTEA42.js";
80
+ } from "../chunk-ZVFKNSRX.js";
81
81
  import "../chunk-7QLSKOSU.js";
82
82
  import "../chunk-KZERVKTD.js";
83
- import "../chunk-WKP2KRTU.js";
84
- import "../chunk-AWD2SLNA.js";
83
+ import "../chunk-ZSL7B7NF.js";
84
+ import "../chunk-2WWHZTI5.js";
85
85
  import "../chunk-T7E75EKA.js";
86
86
  import {
87
87
  getApiKey,
88
88
  getBaseUrl
89
- } from "../chunk-ZC6EVOX6.js";
89
+ } from "../chunk-AJRT3JGE.js";
90
90
  import {
91
91
  NPX_LATEST_COMMAND
92
- } from "../chunk-RYBAJXV4.js";
92
+ } from "../chunk-FKQMH2DW.js";
93
93
  import {
94
94
  DECISION_STOP_REASON,
95
95
  KILL_REASON,
96
96
  UNVERIFIABLE_APPROVAL_REASON,
97
97
  redactSecretsFromContent,
98
98
  resolveGate
99
- } from "../chunk-QOBOIFGG.js";
99
+ } from "../chunk-NAROM5IR.js";
100
100
 
101
101
  // src/wrapper/localPassthrough.ts
102
102
  var SIGNAL_NUMBERS = {
@@ -531,7 +531,8 @@ var createRemoteApprover = (deps) => {
531
531
  machineId: deps.machineId,
532
532
  toolName,
533
533
  toolTarget,
534
- repoKey: repoKeyFor(deps.cwd)
534
+ repoKey: repoKeyFor(deps.cwd),
535
+ localSurfaceAvailable: false
535
536
  });
536
537
  } catch (error) {
537
538
  if (!(error instanceof SubscriptionRequiredError)) return deny(UNVERIFIABLE_APPROVAL_REASON);
@@ -11,8 +11,9 @@ import {
11
11
  } from "../chunk-SB2GN6OP.js";
12
12
  import {
13
13
  isCursorPluginLeftover,
14
+ releaseSoleGate,
14
15
  withoutPusharyCursorHooks
15
- } from "../chunk-PMUOEEUE.js";
16
+ } from "../chunk-Q7JWY33N.js";
16
17
  import {
17
18
  HERMES_PIP_PACKAGE,
18
19
  readHermesStatus,
@@ -21,27 +22,27 @@ import {
21
22
  shortenHome,
22
23
  unregisterPluginLocation,
23
24
  vscodeSettingsTargets
24
- } from "../chunk-OBGZUD73.js";
25
+ } from "../chunk-ZECHTK3K.js";
25
26
  import {
26
27
  planFxRemoval,
27
28
  removeInstructionBlock
28
- } from "../chunk-BNQKHPEC.js";
29
- import "../chunk-LBDMCNQY.js";
29
+ } from "../chunk-4BXVGCPE.js";
30
+ import "../chunk-2QASSTM5.js";
30
31
  import {
31
32
  disableDaemonService
32
- } from "../chunk-2QJ6K2SR.js";
33
+ } from "../chunk-7SIZISYH.js";
33
34
  import "../chunk-XHKBHWLX.js";
34
35
  import {
35
36
  APPROVAL_SETTINGS_PATH
36
- } from "../chunk-4DWQNP52.js";
37
+ } from "../chunk-JHDHC2M7.js";
37
38
  import {
38
39
  macAppKeepsMcpEntry,
39
40
  mcpServerBearer,
40
41
  pusharyKey,
41
42
  readMacAppAgentKey,
42
43
  setupReceiptKey
43
- } from "../chunk-TZCHW6KR.js";
44
- import "../chunk-SQJUXVLW.js";
44
+ } from "../chunk-H7MTFFNI.js";
45
+ import "../chunk-J5RQW52I.js";
45
46
  import {
46
47
  OPENCODE_PLUGIN_SIBLING,
47
48
  OPENCODE_PLUGIN_SIBLING_CONTENTS,
@@ -53,14 +54,14 @@ import {
53
54
  openCodePluginDir,
54
55
  openCodePluginFile,
55
56
  removeOpenCodeMcpServer
56
- } from "../chunk-Z6VYZSVA.js";
57
+ } from "../chunk-5RONPCMH.js";
57
58
  import {
58
59
  ansiPainter,
59
60
  useColor
60
61
  } from "../chunk-U4TMAANR.js";
61
62
  import {
62
63
  exitOnHelpFlag
63
- } from "../chunk-GTM7C36Y.js";
64
+ } from "../chunk-NNCK2PUR.js";
64
65
  import {
65
66
  compatibleConfigFile,
66
67
  compatibleInstructionsFile,
@@ -73,7 +74,7 @@ import {
73
74
  removePusharySettings,
74
75
  removePusharyToolPermissions,
75
76
  restoreClaudeMcpServer
76
- } from "../chunk-BOHDM4T7.js";
77
+ } from "../chunk-POJUUEGO.js";
77
78
  import {
78
79
  hookOwnerOf,
79
80
  isHookTakeoverReceipt,
@@ -81,12 +82,12 @@ import {
81
82
  resolveBridgeStub,
82
83
  restoreHookTakeover,
83
84
  restoreMcpServer
84
- } from "../chunk-SJ7M37RL.js";
85
+ } from "../chunk-SEQSZYLW.js";
85
86
  import {
86
87
  removeGeminiSettings
87
- } from "../chunk-KXCWWHYO.js";
88
- import "../chunk-NDZKDJQU.js";
89
- import "../chunk-JNDELCH5.js";
88
+ } from "../chunk-RV4U3LYL.js";
89
+ import "../chunk-K2IUMMZJ.js";
90
+ import "../chunk-NXJNYAP7.js";
90
91
  import {
91
92
  rejectUnknownFlags
92
93
  } from "../chunk-GMXKITVA.js";
@@ -99,22 +100,22 @@ import {
99
100
  readConfigFileKey,
100
101
  readMacAppKeyPrefix,
101
102
  removeClaudeAlias
102
- } from "../chunk-3VPS7JPH.js";
103
- import "../chunk-7U26QSMF.js";
104
- import "../chunk-JKGTASA2.js";
105
- import "../chunk-DWHCF4RH.js";
103
+ } from "../chunk-NMDGIMDV.js";
104
+ import "../chunk-WYPQKDKX.js";
105
+ import "../chunk-VYXXAFIA.js";
106
+ import "../chunk-PWO6T7JG.js";
106
107
  import "../chunk-POFBE6ZY.js";
107
- import "../chunk-CATIBZQH.js";
108
+ import "../chunk-CIZQARGJ.js";
108
109
  import {
109
110
  absoluteUrl
110
- } from "../chunk-CMZ4CW5J.js";
111
- import "../chunk-WBSL4FBX.js";
112
- import "../chunk-2NKTEA42.js";
111
+ } from "../chunk-3U4R475X.js";
112
+ import "../chunk-EB6LH3U6.js";
113
+ import "../chunk-ZVFKNSRX.js";
113
114
  import "../chunk-7QLSKOSU.js";
114
115
  import {
115
116
  EXIT
116
117
  } from "../chunk-KZERVKTD.js";
117
- import "../chunk-WKP2KRTU.js";
118
+ import "../chunk-ZSL7B7NF.js";
118
119
  import {
119
120
  claudeJson,
120
121
  claudeMcpReceipt,
@@ -151,14 +152,14 @@ import {
151
152
  restoreCodexHookTrust,
152
153
  vscodePluginDir,
153
154
  vscodePluginMcp
154
- } from "../chunk-AWD2SLNA.js";
155
+ } from "../chunk-2WWHZTI5.js";
155
156
  import "../chunk-T7E75EKA.js";
156
157
  import {
157
158
  getBaseUrl
158
- } from "../chunk-ZC6EVOX6.js";
159
+ } from "../chunk-AJRT3JGE.js";
159
160
  import {
160
161
  NPX_LATEST_COMMAND
161
- } from "../chunk-RYBAJXV4.js";
162
+ } from "../chunk-FKQMH2DW.js";
162
163
  import {
163
164
  CLI_PACKAGE_NAMES,
164
165
  HOOK_COMPATIBLE_PROFILES,
@@ -170,7 +171,7 @@ import {
170
171
  globalRootFor,
171
172
  isValidApiKey,
172
173
  redactSecrets
173
- } from "../chunk-QOBOIFGG.js";
174
+ } from "../chunk-NAROM5IR.js";
174
175
 
175
176
  // bin/pushary-clean.ts
176
177
  import { existsSync as existsSync6, readFileSync as readFileSync4, copyFileSync, readdirSync as readdirSync4 } from "fs";
@@ -587,7 +588,13 @@ var cleanCompatibleAgent = (profile, scope, io, home) => {
587
588
  io.writeJson(path, config);
588
589
  return { path, outcome: "cleaned" };
589
590
  });
590
- return { profile, files, mcpKeptForApp, instructions: cleanInstructions(profile, scope, io, home) };
591
+ return {
592
+ profile,
593
+ files,
594
+ mcpKeptForApp,
595
+ instructions: cleanInstructions(profile, scope, io, home),
596
+ soleGate: releaseSoleGate(profile, io.soleGateFiles, home)
597
+ };
591
598
  };
592
599
 
593
600
  // src/cli/clean-key-revocation.ts
@@ -667,6 +674,13 @@ var codexMcpKey = (config) => {
667
674
  const auth = readCodexMcpAuth(config);
668
675
  return auth?.method === "embedded" ? pusharyKey(auth.key) : null;
669
676
  };
677
+ var readText = (path) => {
678
+ try {
679
+ return readFileSync4(path, "utf-8");
680
+ } catch {
681
+ return null;
682
+ }
683
+ };
670
684
  var readJson = (path) => {
671
685
  try {
672
686
  return JSON.parse(readFileSync4(path, "utf-8"));
@@ -1128,7 +1142,12 @@ var main = async () => {
1128
1142
  console.log(` ${skip} Codex skill directory ${dim("(not found)")}`);
1129
1143
  }
1130
1144
  const compatibleScope = { keepAppWiring: keepShared, keepsMcpEntry: macAppKeeps };
1131
- const compatibleIo = { readJson, writeJson, removeInstructionBlock: guardedInstructionBlockRemoval };
1145
+ const compatibleIo = {
1146
+ readJson,
1147
+ writeJson,
1148
+ removeInstructionBlock: guardedInstructionBlockRemoval,
1149
+ soleGateFiles: { read: readText, write: guardedWrite, remove: (path) => guardedRemove(path, { force: true }) }
1150
+ };
1132
1151
  for (const profile of HOOK_COMPATIBLE_PROFILES) {
1133
1152
  const report = cleanCompatibleAgent(profile, compatibleScope, compatibleIo);
1134
1153
  for (const file of report.files) {
@@ -1138,6 +1157,9 @@ var main = async () => {
1138
1157
  else console.log(` ${skip} ${label2} ${dim(keepShared ? "(nothing the CLI wrote)" : "(no pushary entries)")}`);
1139
1158
  }
1140
1159
  if (report.mcpKeptForApp) console.log(` ${skip} ${profile.label} MCP server ${dim("(kept: the Mac app uses it)")}`);
1160
+ if (report.soleGate?.kind === "restored" && profile.soleGate) {
1161
+ console.log(` ${check} ${profile.label} ${shortenHome(report.soleGate.path)} ${dim(dryRun ? `(would put ${profile.soleGate.key} back)` : `(put ${profile.soleGate.key} back)`)}`);
1162
+ }
1141
1163
  const instructions = report.instructions;
1142
1164
  if (!instructions) continue;
1143
1165
  const label = `${profile.label} ${shortenHome(instructions.path)}`;
@@ -5,10 +5,10 @@ import {
5
5
  postLiveSession,
6
6
  postLiveSessionUntilAccepted,
7
7
  startLiveSessionHeartbeat
8
- } from "../chunk-DYQ5QIDN.js";
8
+ } from "../chunk-2NIBBM3N.js";
9
9
  import {
10
10
  resolveProviderBinary
11
- } from "../chunk-EYLQVCME.js";
11
+ } from "../chunk-ECU2Y7D2.js";
12
12
  import "../chunk-RIVNNBEK.js";
13
13
  import {
14
14
  SESSION_IDLE_TIMEOUT_MS,
@@ -16,50 +16,50 @@ import {
16
16
  idleDeadlinePassed,
17
17
  startProcessOwnership,
18
18
  withSpawnProcessOwnership
19
- } from "../chunk-GP44LTXN.js";
20
- import "../chunk-PKQ435Z2.js";
21
- import "../chunk-ZHF4JDVE.js";
19
+ } from "../chunk-5UYAJVAQ.js";
20
+ import "../chunk-DVTXGXXL.js";
21
+ import "../chunk-CT4BJEU7.js";
22
22
  import {
23
23
  transcriptsEnabled
24
- } from "../chunk-M2P3HQA3.js";
24
+ } from "../chunk-7MGNY7S3.js";
25
25
  import {
26
26
  spawnClaude
27
27
  } from "../chunk-XHKBHWLX.js";
28
28
  import "../chunk-6ICPEJY5.js";
29
- import "../chunk-3VPS7JPH.js";
29
+ import "../chunk-NMDGIMDV.js";
30
30
  import {
31
31
  isAskUserResponse,
32
32
  isDecisionStopped,
33
33
  isWaitForAnswerResponse,
34
34
  withdrawQuestion,
35
35
  writeDegraded
36
- } from "../chunk-DWHCF4RH.js";
36
+ } from "../chunk-PWO6T7JG.js";
37
37
  import "../chunk-POFBE6ZY.js";
38
38
  import {
39
39
  callMcpTool
40
- } from "../chunk-CATIBZQH.js";
41
- import "../chunk-CMZ4CW5J.js";
42
- import "../chunk-WBSL4FBX.js";
40
+ } from "../chunk-CIZQARGJ.js";
41
+ import "../chunk-3U4R475X.js";
42
+ import "../chunk-EB6LH3U6.js";
43
43
  import {
44
44
  getMachineId
45
- } from "../chunk-2NKTEA42.js";
45
+ } from "../chunk-ZVFKNSRX.js";
46
46
  import "../chunk-7QLSKOSU.js";
47
47
  import "../chunk-KZERVKTD.js";
48
- import "../chunk-WKP2KRTU.js";
49
- import "../chunk-AWD2SLNA.js";
48
+ import "../chunk-ZSL7B7NF.js";
49
+ import "../chunk-2WWHZTI5.js";
50
50
  import "../chunk-T7E75EKA.js";
51
51
  import {
52
52
  getApiKey,
53
53
  getBaseUrl
54
- } from "../chunk-ZC6EVOX6.js";
55
- import "../chunk-RYBAJXV4.js";
54
+ } from "../chunk-AJRT3JGE.js";
55
+ import "../chunk-FKQMH2DW.js";
56
56
  import {
57
57
  elicitationContent,
58
58
  parseAgentQuestion,
59
59
  parseAgentQuestionAnswers,
60
60
  planElicitationAsk,
61
61
  readElicitationFields
62
- } from "../chunk-QOBOIFGG.js";
62
+ } from "../chunk-NAROM5IR.js";
63
63
 
64
64
  // bin/pushary-codex-bridge.ts
65
65
  import { existsSync } from "fs";