@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
@@ -5,47 +5,45 @@ import {
5
5
  import {
6
6
  activeHookSource,
7
7
  activeIdentity
8
- } from "../chunk-MZPXVH4A.js";
9
- import "../chunk-ANEAA37E.js";
8
+ } from "../chunk-KHNFLYJO.js";
10
9
  import {
11
10
  readHookInput
12
- } from "../chunk-XWAYAO3V.js";
13
- import "../chunk-BTQGAXZ3.js";
11
+ } from "../chunk-WWOHTTVP.js";
12
+ import "../chunk-DPGSLWOS.js";
14
13
  import "../chunk-SGZJ5LYH.js";
15
- import "../chunk-SD3272LS.js";
16
- import "../chunk-SBLPHUEB.js";
17
- import "../chunk-MNWRUGMH.js";
18
- import "../chunk-4YO4T5FV.js";
19
- import "../chunk-VXRXFU6Q.js";
20
- import "../chunk-JCWZ23MJ.js";
21
- import "../chunk-7264S5HZ.js";
22
- import "../chunk-AUUXS44H.js";
23
- import "../chunk-4FK6RZVJ.js";
24
- import "../chunk-HPRZJKRO.js";
14
+ import "../chunk-YIG2R3BJ.js";
15
+ import "../chunk-DL7XWKYV.js";
16
+ import "../chunk-LKLVTG3V.js";
17
+ import "../chunk-2QGYMY7A.js";
18
+ import "../chunk-3I6IVOZV.js";
19
+ import "../chunk-WG3K4TCH.js";
20
+ import "../chunk-ZBK6E2OR.js";
21
+ import "../chunk-CLOSJ4ES.js";
22
+ import "../chunk-M6BZZFVQ.js";
25
23
  import "../chunk-XHKBHWLX.js";
26
24
  import "../chunk-6ICPEJY5.js";
27
25
  import {
28
26
  handleSessionEnd
29
- } from "../chunk-QFEM7R6T.js";
27
+ } from "../chunk-KRCR2CRQ.js";
30
28
  import "../chunk-N6IOSZOE.js";
31
- import "../chunk-6DJTDHBI.js";
32
- import "../chunk-D6S5EKXA.js";
33
- import "../chunk-AVNKVF7N.js";
29
+ import "../chunk-CD47ZFFZ.js";
30
+ import "../chunk-2VZAALEJ.js";
31
+ import "../chunk-DKMD6AWR.js";
34
32
  import "../chunk-POFBE6ZY.js";
35
33
  import "../chunk-GMXKITVA.js";
36
- import "../chunk-ADSQDYYG.js";
37
- import "../chunk-L76HTPU6.js";
38
- import "../chunk-KFKL3FHS.js";
39
- import "../chunk-JXISQ7DT.js";
40
- import "../chunk-KYO45G5L.js";
34
+ import "../chunk-N4QSPI3B.js";
35
+ import "../chunk-MKTJEXZ3.js";
36
+ import "../chunk-LWOO567I.js";
37
+ import "../chunk-TCQ43LSG.js";
38
+ import "../chunk-DUZVXBBU.js";
41
39
  import "../chunk-7QLSKOSU.js";
42
40
  import "../chunk-KZERVKTD.js";
43
- import "../chunk-4D2AYNSE.js";
44
- import "../chunk-ZUTU43FT.js";
41
+ import "../chunk-FQ2GORVG.js";
42
+ import "../chunk-ZBHUHJG6.js";
45
43
  import "../chunk-T7E75EKA.js";
46
- import "../chunk-Z6HPS67T.js";
47
- import "../chunk-STQRUH3S.js";
48
- import "../chunk-QR6VE5ME.js";
44
+ import "../chunk-5QUPKDI5.js";
45
+ import "../chunk-7DVNSQWF.js";
46
+ import "../chunk-I5IJRMNV.js";
49
47
 
50
48
  // bin/pushary-session-end-hook.ts
51
49
  var AGENT = activeIdentity(process.argv);
@@ -1,58 +1,57 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  reapplyClaudeForVersion
4
- } from "../chunk-NIBFSARF.js";
5
- import "../chunk-H7MMU64M.js";
4
+ } from "../chunk-MXHTGVFZ.js";
5
+ import "../chunk-3Z3A37WD.js";
6
+ import "../chunk-MGRFDGWU.js";
7
+ import "../chunk-MFF3ONG5.js";
6
8
  import {
7
9
  activeHookSource,
8
10
  activeIdentity
9
- } from "../chunk-MZPXVH4A.js";
10
- import "../chunk-X5NXPCIC.js";
11
- import "../chunk-ANEAA37E.js";
11
+ } from "../chunk-KHNFLYJO.js";
12
12
  import "../chunk-RIVNNBEK.js";
13
13
  import {
14
14
  triggerAutoUpdate
15
- } from "../chunk-QTO6HEZD.js";
15
+ } from "../chunk-7PT35RY2.js";
16
16
  import {
17
17
  readHookInput
18
- } from "../chunk-XWAYAO3V.js";
19
- import "../chunk-BTQGAXZ3.js";
18
+ } from "../chunk-WWOHTTVP.js";
19
+ import "../chunk-DPGSLWOS.js";
20
20
  import "../chunk-SGZJ5LYH.js";
21
- import "../chunk-SD3272LS.js";
22
- import "../chunk-SBLPHUEB.js";
23
- import "../chunk-MNWRUGMH.js";
24
- import "../chunk-4YO4T5FV.js";
25
- import "../chunk-VXRXFU6Q.js";
26
- import "../chunk-JCWZ23MJ.js";
27
- import "../chunk-7264S5HZ.js";
28
- import "../chunk-AUUXS44H.js";
29
- import "../chunk-4FK6RZVJ.js";
30
- import "../chunk-HPRZJKRO.js";
21
+ import "../chunk-YIG2R3BJ.js";
22
+ import "../chunk-DL7XWKYV.js";
23
+ import "../chunk-LKLVTG3V.js";
24
+ import "../chunk-2QGYMY7A.js";
25
+ import "../chunk-3I6IVOZV.js";
26
+ import "../chunk-WG3K4TCH.js";
27
+ import "../chunk-ZBK6E2OR.js";
28
+ import "../chunk-CLOSJ4ES.js";
29
+ import "../chunk-M6BZZFVQ.js";
31
30
  import "../chunk-XHKBHWLX.js";
32
31
  import "../chunk-6ICPEJY5.js";
33
32
  import {
34
33
  CLAUDE_CODE_AGENT,
35
34
  handleSessionStart
36
- } from "../chunk-QFEM7R6T.js";
35
+ } from "../chunk-KRCR2CRQ.js";
37
36
  import "../chunk-N6IOSZOE.js";
38
- import "../chunk-6DJTDHBI.js";
39
- import "../chunk-D6S5EKXA.js";
40
- import "../chunk-AVNKVF7N.js";
37
+ import "../chunk-CD47ZFFZ.js";
38
+ import "../chunk-2VZAALEJ.js";
39
+ import "../chunk-DKMD6AWR.js";
41
40
  import "../chunk-POFBE6ZY.js";
42
41
  import "../chunk-GMXKITVA.js";
43
- import "../chunk-ADSQDYYG.js";
44
- import "../chunk-L76HTPU6.js";
45
- import "../chunk-KFKL3FHS.js";
46
- import "../chunk-JXISQ7DT.js";
47
- import "../chunk-KYO45G5L.js";
42
+ import "../chunk-N4QSPI3B.js";
43
+ import "../chunk-MKTJEXZ3.js";
44
+ import "../chunk-LWOO567I.js";
45
+ import "../chunk-TCQ43LSG.js";
46
+ import "../chunk-DUZVXBBU.js";
48
47
  import "../chunk-7QLSKOSU.js";
49
48
  import "../chunk-KZERVKTD.js";
50
- import "../chunk-4D2AYNSE.js";
51
- import "../chunk-ZUTU43FT.js";
49
+ import "../chunk-FQ2GORVG.js";
50
+ import "../chunk-ZBHUHJG6.js";
52
51
  import "../chunk-T7E75EKA.js";
53
- import "../chunk-Z6HPS67T.js";
54
- import "../chunk-STQRUH3S.js";
55
- import "../chunk-QR6VE5ME.js";
52
+ import "../chunk-5QUPKDI5.js";
53
+ import "../chunk-7DVNSQWF.js";
54
+ import "../chunk-I5IJRMNV.js";
56
55
 
57
56
  // bin/pushary-session-start-hook.ts
58
57
  var AGENT = activeIdentity(process.argv);
@@ -1,12 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runBrowserLogin
4
- } from "../chunk-AQ55ZSSS.js";
4
+ } from "../chunk-NWDG3MSW.js";
5
5
  import {
6
6
  coworkOutput,
7
7
  coworkSelection
8
- } from "../chunk-7OIWWZAD.js";
8
+ } from "../chunk-B64KHETR.js";
9
9
  import "../chunk-PUZZELE6.js";
10
+ import {
11
+ clearDeclinedAgent,
12
+ declinedAgentForSetupChoice
13
+ } from "../chunk-BXET3ALR.js";
14
+ import {
15
+ agentHookFile,
16
+ agentHookOwner,
17
+ macAppBridgeAvailable
18
+ } from "../chunk-3Z3A37WD.js";
10
19
  import {
11
20
  describeVersionManagerPin,
12
21
  versionManagerOf
@@ -15,72 +24,67 @@ import {
15
24
  codexTrustOutcome,
16
25
  describeCodexTrustConfirmation,
17
26
  needsCodexTrustStep
18
- } from "../chunk-JWKBDSPF.js";
27
+ } from "../chunk-6TE27XZR.js";
19
28
  import {
20
29
  writeStdoutFully
21
30
  } from "../chunk-EO23EUOK.js";
22
31
  import {
23
32
  ensureCodexTrustsPusharyHooks
24
- } from "../chunk-H7MMU64M.js";
33
+ } from "../chunk-MGRFDGWU.js";
25
34
  import {
26
35
  readManagedControlEvidence,
27
36
  waitForMachineReadiness
28
- } from "../chunk-MBK7N46B.js";
37
+ } from "../chunk-2QTO5YIT.js";
29
38
  import {
30
39
  describeSetupSideEffects,
31
40
  installAgentSkill,
32
- installSkillViaSkillsCli,
41
+ installSkillViaSkillsCli
42
+ } from "../chunk-EUW7JL2K.js";
43
+ import {
44
+ CURSOR_PLUGIN_BACKUP_INFIX,
45
+ CURSOR_PLUGIN_STAGING_PREFIX,
33
46
  registerCursorGate
34
- } from "../chunk-EB4XGVBG.js";
47
+ } from "../chunk-TCWKTUAE.js";
48
+ import {
49
+ HERMES_PIP_PACKAGE,
50
+ describeDetection,
51
+ detectAllAgents,
52
+ isDetected,
53
+ isHermesConfigReceipt,
54
+ pluginLocationSnippet,
55
+ registerPluginLocation,
56
+ resolveHermesPython,
57
+ runHermesConfigScript,
58
+ shortenHome,
59
+ vscodeSettingsTargets
60
+ } from "../chunk-KFF7G225.js";
35
61
  import {
36
62
  AgentConfigError,
37
63
  FX_PUSHARY_TOOLS_RULE,
38
64
  FX_QUESTION_TOOL,
39
- FX_TOOL_DISCOVERY_NOTE,
40
- HERMES_PIP_PACKAGE,
41
65
  SHARED_AGENTS_MD_LABEL,
42
66
  afterAgentFailureNote,
43
67
  agentFailureFromError,
44
68
  agentFailureWire,
45
69
  configFailureKind,
46
70
  configureFxSettings,
47
- describeDetection,
48
71
  describedAgentFailure,
49
- detectAllAgents,
50
72
  failedAgentsContext,
51
73
  fxIgnoresInstructionsFile,
74
+ fxInstructionsBody,
52
75
  fxPusharyEntry,
53
76
  inspectFxInstallation,
54
- isDetected,
55
- isHermesConfigReceipt,
56
- pluginLocationSnippet,
57
77
  readFxProfileForSetup,
58
- registerPluginLocation,
59
78
  renderAgentInstructions,
60
79
  renderProjectAgentInstructions,
61
- resolveHermesPython,
62
80
  retryAgentCommand,
63
- runHermesConfigScript,
64
- shortenHome,
65
- vscodeSettingsTargets,
66
81
  withFxPusharyServer,
67
82
  writeFxProfile,
68
83
  writeInstructionBlock
69
- } from "../chunk-QQ4HBXZC.js";
84
+ } from "../chunk-ZN3C6GBG.js";
70
85
  import {
71
86
  MCP_BRIDGE_BINARY
72
- } from "../chunk-W2KI5KPD.js";
73
- import {
74
- addCompatibleHooks,
75
- addCompatibleMcpServer,
76
- addCompatibleToolPermissions,
77
- compatibleConfigFile,
78
- compatibleHookEvents,
79
- compatibleInstructionsFile,
80
- compatibleMcpFile,
81
- compatiblePermissionRuleFile,
82
- hasCompatibleHooks
83
- } from "../chunk-MZPXVH4A.js";
87
+ } from "../chunk-HRULIYDU.js";
84
88
  import {
85
89
  OPENCODE_HOOK_BINARY,
86
90
  addOpenCodeMcpServer,
@@ -92,15 +96,24 @@ import {
92
96
  openCodePluginDir,
93
97
  openCodePluginFile,
94
98
  openCodeWired
95
- } from "../chunk-X5NXPCIC.js";
99
+ } from "../chunk-MFF3ONG5.js";
96
100
  import {
97
101
  addClaudeMcpServer,
102
+ addCompatibleHooks,
103
+ addCompatibleMcpServer,
104
+ addCompatibleToolPermissions,
98
105
  addPusharyHooks,
99
106
  addPusharyToolPermissions,
100
107
  captureClaudeMcpServer,
108
+ compatibleConfigFile,
109
+ compatibleHookEvents,
110
+ compatibleInstructionsFile,
111
+ compatibleMcpFile,
112
+ compatiblePermissionRuleFile,
113
+ hasCompatibleHooks,
101
114
  isClaudeMcpSnapshot,
102
115
  updateClaudeMcpSnapshot
103
- } from "../chunk-ANEAA37E.js";
116
+ } from "../chunk-KHNFLYJO.js";
104
117
  import {
105
118
  checkCodexInstall,
106
119
  detectProviderLiveCapabilities,
@@ -108,40 +121,29 @@ import {
108
121
  hasSpawnProvider,
109
122
  nodeCodexInstallProbe,
110
123
  resolveControlPolicy
111
- } from "../chunk-T7Y5EADL.js";
124
+ } from "../chunk-I6MJXLMY.js";
112
125
  import {
113
126
  detectClaudeVersion
114
127
  } from "../chunk-RIVNNBEK.js";
115
128
  import {
116
129
  describeAutoUpdateAnnouncement,
117
130
  takeAutoUpdateAnnouncement
118
- } from "../chunk-QTO6HEZD.js";
131
+ } from "../chunk-7PT35RY2.js";
119
132
  import {
120
133
  KEEP_HINT,
121
134
  captureHookTakeover,
122
135
  captureMcpServer,
123
136
  describeAppOwnership,
124
137
  describeHookOwnership,
125
- hookOwnerOf,
126
138
  mcpBearerKey,
127
139
  planHooks
128
- } from "../chunk-SD3272LS.js";
140
+ } from "../chunk-YIG2R3BJ.js";
129
141
  import {
130
142
  AGENT_CHOICES,
131
143
  effectiveControlMode,
132
144
  effectiveVerify,
133
145
  parseSetupOptions
134
- } from "../chunk-SBLPHUEB.js";
135
- import {
136
- liveBridgeProbe,
137
- resolveBridgeStub
138
- } from "../chunk-MNWRUGMH.js";
139
- import {
140
- claudeWired,
141
- codexWired,
142
- geminiWired,
143
- pusharyHookExecutable
144
- } from "../chunk-4YO4T5FV.js";
146
+ } from "../chunk-DL7XWKYV.js";
145
147
  import {
146
148
  DAEMON_COLD_START_TIMEOUT_MS,
147
149
  clearDaemonNeedsLogin,
@@ -155,16 +157,22 @@ import {
155
157
  replaceDaemonService,
156
158
  stopDaemonService,
157
159
  waitForDaemonRemoteProof
158
- } from "../chunk-VXRXFU6Q.js";
160
+ } from "../chunk-LKLVTG3V.js";
161
+ import {
162
+ claudeWired,
163
+ codexWired,
164
+ geminiWired,
165
+ pusharyHookExecutable
166
+ } from "../chunk-2QGYMY7A.js";
159
167
  import {
160
168
  GEMINI_HOOK_BINARY,
161
169
  addGeminiHooks,
162
170
  addGeminiMcpServer
163
- } from "../chunk-JCWZ23MJ.js";
164
- import "../chunk-7264S5HZ.js";
171
+ } from "../chunk-3I6IVOZV.js";
172
+ import "../chunk-WG3K4TCH.js";
165
173
  import {
166
174
  transcriptPreferenceForSetup
167
- } from "../chunk-HPRZJKRO.js";
175
+ } from "../chunk-M6BZZFVQ.js";
168
176
  import "../chunk-XHKBHWLX.js";
169
177
  import {
170
178
  compareVersion,
@@ -172,11 +180,11 @@ import {
172
180
  } from "../chunk-6ICPEJY5.js";
173
181
  import {
174
182
  reportEvent
175
- } from "../chunk-QFEM7R6T.js";
183
+ } from "../chunk-KRCR2CRQ.js";
176
184
  import "../chunk-N6IOSZOE.js";
177
- import "../chunk-6DJTDHBI.js";
178
- import "../chunk-D6S5EKXA.js";
179
- import "../chunk-AVNKVF7N.js";
185
+ import "../chunk-CD47ZFFZ.js";
186
+ import "../chunk-2VZAALEJ.js";
187
+ import "../chunk-DKMD6AWR.js";
180
188
  import "../chunk-POFBE6ZY.js";
181
189
  import {
182
190
  BROWSER_CONNECT_COMMAND,
@@ -188,7 +196,7 @@ import {
188
196
  printConnectInstructions,
189
197
  roundTripEvidence,
190
198
  verifyRoundTrip
191
- } from "../chunk-N4EUSDKX.js";
199
+ } from "../chunk-IAD2RT4L.js";
192
200
  import "../chunk-3EGEA4KH.js";
193
201
  import {
194
202
  setHumanStream
@@ -208,24 +216,25 @@ import {
208
216
  readConfigFileKey,
209
217
  readControlMode,
210
218
  readKeySource,
219
+ recordMacAppKeyPrefix,
211
220
  resolveShellRc,
212
221
  writeKey
213
- } from "../chunk-ADSQDYYG.js";
214
- import "../chunk-L76HTPU6.js";
222
+ } from "../chunk-N4QSPI3B.js";
223
+ import "../chunk-MKTJEXZ3.js";
215
224
  import {
216
225
  checkApiKey,
217
226
  describeKeyCheck,
218
227
  samePusharyAccount
219
- } from "../chunk-KFKL3FHS.js";
220
- import "../chunk-JXISQ7DT.js";
221
- import "../chunk-KYO45G5L.js";
228
+ } from "../chunk-LWOO567I.js";
229
+ import "../chunk-TCQ43LSG.js";
230
+ import "../chunk-DUZVXBBU.js";
222
231
  import {
223
232
  UsageError
224
233
  } from "../chunk-7QLSKOSU.js";
225
234
  import {
226
235
  EXIT
227
236
  } from "../chunk-KZERVKTD.js";
228
- import "../chunk-4D2AYNSE.js";
237
+ import "../chunk-FQ2GORVG.js";
229
238
  import {
230
239
  NpmMissingError,
231
240
  addCodexHookTrust,
@@ -264,27 +273,25 @@ import {
264
273
  npmErrorMessage,
265
274
  plannedGlobalPackage,
266
275
  pusharyConfigFile,
267
- pusharyDir,
268
276
  readCodexMcpAuth,
269
277
  resolveGlobalBinDir,
270
278
  resolveGlobalBinary,
271
279
  vscodePluginDir,
272
280
  vscodePluginMcp
273
- } from "../chunk-ZUTU43FT.js";
281
+ } from "../chunk-ZBHUHJG6.js";
274
282
  import {
275
283
  backupFile,
276
284
  readJsonSafe,
277
285
  writeFileAtomic,
278
286
  writeJsonAtomic
279
287
  } from "../chunk-T7E75EKA.js";
280
- import "../chunk-Z6HPS67T.js";
288
+ import "../chunk-5QUPKDI5.js";
281
289
  import {
282
290
  NPX_LATEST_COMMAND,
283
291
  renderCommandHelp
284
- } from "../chunk-STQRUH3S.js";
292
+ } from "../chunk-7DVNSQWF.js";
285
293
  import {
286
294
  HOOK_COMPATIBLE_PROFILES,
287
- HOOK_LOCATOR_BINARY,
288
295
  PRETOOLUSE_GATED_TOOLS,
289
296
  SUPPORT_EMAIL,
290
297
  compatibleTargetFiles,
@@ -296,7 +303,7 @@ import {
296
303
  isValidApiKey,
297
304
  launchedPackage,
298
305
  ownPackageName
299
- } from "../chunk-QR6VE5ME.js";
306
+ } from "../chunk-I5IJRMNV.js";
300
307
 
301
308
  // bin/pushary-setup.ts
302
309
  import { existsSync, readFileSync, writeFileSync, mkdirSync, cpSync, rmSync, renameSync, realpathSync, statSync, openSync, readSync, closeSync } from "fs";
@@ -349,7 +356,7 @@ var nextSteps = (facts, reachable) => {
349
356
  lines.push("pushary claude launch a managed Claude Code session");
350
357
  }
351
358
  if (!reachable) {
352
- lines.push("pushary connect connect a phone without re-running setup");
359
+ lines.push("pushary pair pair a phone without re-running setup");
353
360
  }
354
361
  lines.push("pushary doctor re-check everything");
355
362
  return lines;
@@ -1244,8 +1251,8 @@ var setupCursor = async (apiKey) => {
1244
1251
  const source = resolveBundledPlugin();
1245
1252
  if (!source) throw new Error("bundled Cursor plugin not found in this package");
1246
1253
  await spinner("Installing Pushary plugin", async () => {
1247
- const staging = join3(dirname2(CURSOR_PLUGIN_DIR), `.pushary-staging-${process.pid}`);
1248
- const backup = `${CURSOR_PLUGIN_DIR}.pushary-backup-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
1254
+ const staging = join3(dirname2(CURSOR_PLUGIN_DIR), `${CURSOR_PLUGIN_STAGING_PREFIX}${process.pid}`);
1255
+ const backup = `${CURSOR_PLUGIN_DIR}${CURSOR_PLUGIN_BACKUP_INFIX}${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
1249
1256
  rmSync(staging, { recursive: true, force: true });
1250
1257
  try {
1251
1258
  cpSync(source, staging, {
@@ -1488,9 +1495,7 @@ var reportFxSettings = (outcome) => {
1488
1495
  };
1489
1496
  var teachFxToAskViaPush = () => {
1490
1497
  if (fxIgnoresInstructionsFile(fxAgentsMd(), fxConfigDir())) return false;
1491
- writeInstructionBlock(fxAgentsMd(), `${renderAgentInstructions("fx")}
1492
-
1493
- ${FX_TOOL_DISCOVERY_NOTE}`);
1498
+ writeInstructionBlock(fxAgentsMd(), fxInstructionsBody());
1494
1499
  return true;
1495
1500
  };
1496
1501
  var fxWired = () => inspectFxInstallation(fxMcpProfile(), fxSettings(), process.env).configured;
@@ -1624,24 +1629,9 @@ var compatibleRecord = (of) => HOOK_COMPATIBLE_PROFILES.reduce(
1624
1629
  (record, profile) => ({ ...record, [profile.agentType]: of(profile) }),
1625
1630
  {}
1626
1631
  );
1627
- var HOOK_FILES = {
1628
- claude_code: () => CLAUDE_SETTINGS,
1629
- codex: () => CODEX_HOOKS_JSON,
1630
- gemini_cli: () => GEMINI_SETTINGS,
1631
- cursor: () => CURSOR_USER_HOOKS,
1632
- vscode: () => join3(VSCODE_PLUGIN_DIR, "hooks", "hooks.json"),
1633
- ...compatibleRecord((profile) => () => compatibleConfigFile(profile))
1634
- };
1635
- var hookOwnerFor = (agent, appAvailable = true) => {
1636
- const file = HOOK_FILES[agent]?.();
1637
- if (!file) return "none";
1638
- const document = readJsonSafe(file);
1639
- const profile = hookCompatibleProfile(agent);
1640
- return hookOwnerOf(
1641
- document.kind === "ok" ? document.value : null,
1642
- appAvailable,
1643
- profile ? profile.hooksKeyPath : void 0
1644
- );
1632
+ var clearSetupChoiceDecline = (agent) => {
1633
+ const declined = declinedAgentForSetupChoice(agent);
1634
+ if (declined) clearDeclinedAgent(declined);
1645
1635
  };
1646
1636
  var appMcpKeyFor = (agent) => {
1647
1637
  if (agent === "codex") {
@@ -1659,7 +1649,7 @@ var appMcpKeyIfReadable = (agent) => {
1659
1649
  }
1660
1650
  };
1661
1651
  var captureTakeoverReceipt = (agent) => {
1662
- const hookFile = HOOK_FILES[agent]?.();
1652
+ const hookFile = agentHookFile(agent);
1663
1653
  if (!hookFile) return;
1664
1654
  const document = readAgentJson(hookFile);
1665
1655
  const captured = captureHookTakeover(agent, document);
@@ -2237,12 +2227,10 @@ var main = async () => {
2237
2227
  console.log(" Transcript sync: enabling locally redacted, encrypted sync for Pushary-launched sessions. Your phone can decrypt it; authorized Pushary compliance admins can recover it for documented legal obligations. Disable with pushary setup --transcripts off.");
2238
2228
  }
2239
2229
  const rc = await saveApiKey(trimmedKey, controlMode, transcriptSync);
2230
+ if (trimmedKey === appKey) recordMacAppKeyPrefix(trimmedKey);
2240
2231
  if (keyCheck.kind === "ok") clearDaemonNeedsLogin();
2241
2232
  const context = { rc };
2242
- const appBridgeAvailable = resolveBridgeStub(
2243
- join3(pusharyDir(), "bin", HOOK_LOCATOR_BINARY),
2244
- liveBridgeProbe()
2245
- ).kind === "bundle";
2233
+ const appBridgeAvailable = macAppBridgeAvailable();
2246
2234
  const accountChecks = /* @__PURE__ */ new Map();
2247
2235
  if (keyCheck) accountChecks.set(trimmedKey, Promise.resolve(keyCheck));
2248
2236
  const accountCheckFor = (key) => {
@@ -2281,7 +2269,7 @@ var main = async () => {
2281
2269
  for (const [index, agent] of agents.entries()) {
2282
2270
  markStep(`configure:${agent}`);
2283
2271
  try {
2284
- const ownerBefore = hookOwnerFor(agent, appBridgeAvailable);
2272
+ const ownerBefore = agentHookOwner(agent, appBridgeAvailable);
2285
2273
  const plan = planHooks({ owner: ownerBefore, takeOverHooks: options.takeOverHooks, nonInteractive: options.nonInteractive });
2286
2274
  const keepAppWiring = plan === "keep";
2287
2275
  if (keepAppWiring) {
@@ -2299,6 +2287,7 @@ var main = async () => {
2299
2287
  ${check} ${AGENT_NAMES[agent]}: ${describeAppOwnership(AGENT_NAMES[agent])} ${dim(KEEP_HINT)}`);
2300
2288
  hookOwners.push({ agent, owner: "app", kept: true });
2301
2289
  completed.push(agent);
2290
+ clearSetupChoiceDecline(agent);
2302
2291
  continue;
2303
2292
  }
2304
2293
  if (ownerBefore === "app") captureTakeoverReceipt(agent);
@@ -2307,7 +2296,8 @@ var main = async () => {
2307
2296
  skipped.push(agent);
2308
2297
  } else if (agentIsWired(agent)) {
2309
2298
  completed.push(agent);
2310
- hookOwners.push({ agent, owner: hookOwnerFor(agent, appBridgeAvailable), kept: false });
2299
+ clearSetupChoiceDecline(agent);
2300
+ hookOwners.push({ agent, owner: agentHookOwner(agent, appBridgeAvailable), kept: false });
2311
2301
  } else {
2312
2302
  const failure = describedAgentFailure(agent, "not-wired");
2313
2303
  failures.push(failure);
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readLedgerSummary
4
- } from "../chunk-CBQACHKY.js";
4
+ } from "../chunk-ZSTSEBG7.js";
5
5
  import {
6
6
  exitOnHelpFlag
7
- } from "../chunk-UFVGSEWH.js";
7
+ } from "../chunk-CKV3UPMU.js";
8
8
  import "../chunk-KZERVKTD.js";
9
9
  import {
10
10
  getApiKey
11
- } from "../chunk-Z6HPS67T.js";
12
- import "../chunk-STQRUH3S.js";
13
- import "../chunk-QR6VE5ME.js";
11
+ } from "../chunk-5QUPKDI5.js";
12
+ import "../chunk-7DVNSQWF.js";
13
+ import "../chunk-I5IJRMNV.js";
14
14
 
15
15
  // bin/pushary-stats.ts
16
16
  exitOnHelpFlag("stats");