@pushary/agent-hooks 1.9.6 → 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 (111) hide show
  1. package/CHANGELOG.md +19 -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 +98 -76
  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 -38
  15. package/dist/bin/pushary-disconnect.js +187 -52
  16. package/dist/bin/pushary-doctor.js +68 -56
  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 -31
  33. package/dist/bin/pushary-setup.js +98 -106
  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 +67 -31
  42. package/dist/bin/pushary-wait.js +23 -19
  43. package/dist/bin/pushary.js +15 -14
  44. package/dist/{chunk-BSZ7VBVT.js → chunk-2A53H4S6.js} +17 -15
  45. package/dist/{chunk-D7SOOVHX.js → chunk-2QGYMY7A.js} +83 -3
  46. package/dist/{chunk-SVTHEMM3.js → chunk-2QTO5YIT.js} +6 -6
  47. package/dist/{chunk-WN6WYUCV.js → chunk-2VZAALEJ.js} +5 -9
  48. package/dist/chunk-2WXF3QJR.js +49 -0
  49. package/dist/{chunk-UKNKYTTY.js → chunk-3I6IVOZV.js} +3 -3
  50. package/dist/chunk-3Z3A37WD.js +77 -0
  51. package/dist/{chunk-2QRE6QH2.js → chunk-5QUPKDI5.js} +1 -1
  52. package/dist/chunk-6TE27XZR.js +69 -0
  53. package/dist/{chunk-L6USMDTW.js → chunk-7DVNSQWF.js} +59 -15
  54. package/dist/{chunk-SNJ3BOCP.js → chunk-7PT35RY2.js} +27 -8
  55. package/dist/{chunk-CBVDW2N6.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-DJ4BB264.js → chunk-CD47ZFFZ.js} +1 -1
  59. package/dist/{chunk-FBD3QGVJ.js → chunk-CKV3UPMU.js} +2 -2
  60. package/dist/{chunk-7JTVYR5B.js → chunk-CLOSJ4ES.js} +1 -1
  61. package/dist/{chunk-DA4FTGTK.js → chunk-DKMD6AWR.js} +4 -4
  62. package/dist/{chunk-SPXBXN23.js → chunk-DL7XWKYV.js} +7 -5
  63. package/dist/{chunk-VRT3EEZN.js → chunk-DPGSLWOS.js} +8 -8
  64. package/dist/{chunk-3BUAEQCY.js → chunk-DUZVXBBU.js} +1 -1
  65. package/dist/{chunk-6GERGJHF.js → chunk-EUW7JL2K.js} +0 -32
  66. package/dist/{chunk-75CA37FZ.js → chunk-FQ2GORVG.js} +2 -2
  67. package/dist/{chunk-WUKUXICK.js → chunk-HRULIYDU.js} +2 -2
  68. package/dist/{chunk-Q4E56K4X.js → chunk-I5IJRMNV.js} +78 -8
  69. package/dist/{chunk-MKJ3RTUS.js → chunk-I6MJXLMY.js} +2 -2
  70. package/dist/{chunk-YPXUD6DW.js → chunk-IAD2RT4L.js} +14 -14
  71. package/dist/{chunk-LBLCFD5K.js → chunk-IHFDPV7C.js} +2 -2
  72. package/dist/{chunk-BVCHY4OY.js → chunk-IHO3YQAN.js} +2 -2
  73. package/dist/{chunk-RDK7FX5F.js → chunk-KF3UZLYI.js} +1 -1
  74. package/dist/chunk-KFF7G225.js +599 -0
  75. package/dist/{chunk-TE5M6GGK.js → chunk-KHNFLYJO.js} +204 -28
  76. package/dist/{chunk-CCDVL63C.js → chunk-KRCR2CRQ.js} +9 -9
  77. package/dist/{chunk-ZC3TF4LR.js → chunk-LKLVTG3V.js} +18 -9
  78. package/dist/{chunk-4QKM44N6.js → chunk-LWOO567I.js} +4 -3
  79. package/dist/{chunk-KK54WQ74.js → chunk-M6BZZFVQ.js} +1 -1
  80. package/dist/{chunk-RIC6OOJX.js → chunk-MFF3ONG5.js} +21 -1
  81. package/dist/{chunk-IMGJYFCX.js → chunk-MGRFDGWU.js} +3 -2
  82. package/dist/{chunk-ZPW4MJOV.js → chunk-MKTJEXZ3.js} +3 -3
  83. package/dist/{chunk-2I23NFVT.js → chunk-MXHTGVFZ.js} +52 -9
  84. package/dist/{chunk-5BHROGRB.js → chunk-N4QSPI3B.js} +54 -5
  85. package/dist/{chunk-DGQTJDSJ.js → chunk-NWDG3MSW.js} +1 -1
  86. package/dist/chunk-OP7IHC2I.js +24 -0
  87. package/dist/{chunk-EVFY3VE6.js → chunk-QOLITCIP.js} +1 -1
  88. package/dist/{chunk-W4Q7NFXU.js → chunk-TCQ43LSG.js} +3 -3
  89. package/dist/chunk-TCWKTUAE.js +50 -0
  90. package/dist/{chunk-EZAFBC2C.js → chunk-V5HPPF3E.js} +8 -4
  91. package/dist/{chunk-Q23MMVTD.js → chunk-WG3K4TCH.js} +1 -1
  92. package/dist/{chunk-F56SB65Y.js → chunk-WS4H76EP.js} +2 -2
  93. package/dist/{chunk-HWQNQVY6.js → chunk-WWOHTTVP.js} +2 -2
  94. package/dist/{chunk-NVGDMTX3.js → chunk-YIG2R3BJ.js} +9 -7
  95. package/dist/{chunk-HJXZJF6O.js → chunk-ZBHUHJG6.js} +4 -4
  96. package/dist/{chunk-5AXCOTIT.js → chunk-ZBK6E2OR.js} +1 -1
  97. package/dist/{chunk-5PMTC2CB.js → chunk-ZN3C6GBG.js} +84 -673
  98. package/dist/{chunk-GQHZIBAZ.js → chunk-ZSTSEBG7.js} +1 -1
  99. package/dist/{chunk-PYZC54KA.js → chunk-ZW3XZLJC.js} +61 -17
  100. package/dist/{global-upgrade-7F5RP45B.js → global-upgrade-I56HNM23.js} +6 -6
  101. package/dist/{paths-MELXIVBO.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-AHRBA66K.js → upgrade-lock-B34TAUKV.js} +5 -3
  106. package/package.json +1 -1
  107. package/dist/chunk-HT3WMM6Q.js +0 -44
  108. package/dist/chunk-IR5FRUPQ.js +0 -197
  109. package/dist/chunk-JUFKJCZG.js +0 -38
  110. package/dist/chunk-SJN22ADZ.js +0 -86
  111. package/dist/reapply-NOB2Q6C4.js +0 -35
@@ -5,47 +5,45 @@ import {
5
5
  import {
6
6
  activeHookSource,
7
7
  activeIdentity
8
- } from "../chunk-TE5M6GGK.js";
9
- import "../chunk-IR5FRUPQ.js";
8
+ } from "../chunk-KHNFLYJO.js";
10
9
  import {
11
10
  readHookInput
12
- } from "../chunk-HWQNQVY6.js";
13
- import "../chunk-VRT3EEZN.js";
11
+ } from "../chunk-WWOHTTVP.js";
12
+ import "../chunk-DPGSLWOS.js";
14
13
  import "../chunk-SGZJ5LYH.js";
15
- import "../chunk-NVGDMTX3.js";
16
- import "../chunk-SPXBXN23.js";
17
- import "../chunk-SJN22ADZ.js";
18
- import "../chunk-D7SOOVHX.js";
19
- import "../chunk-ZC3TF4LR.js";
20
- import "../chunk-UKNKYTTY.js";
21
- import "../chunk-Q23MMVTD.js";
22
- import "../chunk-5AXCOTIT.js";
23
- import "../chunk-7JTVYR5B.js";
24
- import "../chunk-KK54WQ74.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-CCDVL63C.js";
27
+ } from "../chunk-KRCR2CRQ.js";
30
28
  import "../chunk-N6IOSZOE.js";
31
- import "../chunk-DJ4BB264.js";
32
- import "../chunk-WN6WYUCV.js";
33
- import "../chunk-DA4FTGTK.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-5BHROGRB.js";
37
- import "../chunk-ZPW4MJOV.js";
38
- import "../chunk-4QKM44N6.js";
39
- import "../chunk-W4Q7NFXU.js";
40
- import "../chunk-3BUAEQCY.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-75CA37FZ.js";
44
- import "../chunk-HJXZJF6O.js";
41
+ import "../chunk-FQ2GORVG.js";
42
+ import "../chunk-ZBHUHJG6.js";
45
43
  import "../chunk-T7E75EKA.js";
46
- import "../chunk-2QRE6QH2.js";
47
- import "../chunk-L6USMDTW.js";
48
- import "../chunk-Q4E56K4X.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,57 +1,57 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  reapplyClaudeForVersion
4
- } from "../chunk-2I23NFVT.js";
5
- import "../chunk-IMGJYFCX.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-TE5M6GGK.js";
10
- import "../chunk-IR5FRUPQ.js";
11
+ } from "../chunk-KHNFLYJO.js";
11
12
  import "../chunk-RIVNNBEK.js";
12
13
  import {
13
14
  triggerAutoUpdate
14
- } from "../chunk-SNJ3BOCP.js";
15
+ } from "../chunk-7PT35RY2.js";
15
16
  import {
16
17
  readHookInput
17
- } from "../chunk-HWQNQVY6.js";
18
- import "../chunk-VRT3EEZN.js";
18
+ } from "../chunk-WWOHTTVP.js";
19
+ import "../chunk-DPGSLWOS.js";
19
20
  import "../chunk-SGZJ5LYH.js";
20
- import "../chunk-NVGDMTX3.js";
21
- import "../chunk-SPXBXN23.js";
22
- import "../chunk-SJN22ADZ.js";
23
- import "../chunk-D7SOOVHX.js";
24
- import "../chunk-ZC3TF4LR.js";
25
- import "../chunk-UKNKYTTY.js";
26
- import "../chunk-Q23MMVTD.js";
27
- import "../chunk-5AXCOTIT.js";
28
- import "../chunk-7JTVYR5B.js";
29
- import "../chunk-KK54WQ74.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";
30
30
  import "../chunk-XHKBHWLX.js";
31
31
  import "../chunk-6ICPEJY5.js";
32
32
  import {
33
33
  CLAUDE_CODE_AGENT,
34
34
  handleSessionStart
35
- } from "../chunk-CCDVL63C.js";
35
+ } from "../chunk-KRCR2CRQ.js";
36
36
  import "../chunk-N6IOSZOE.js";
37
- import "../chunk-DJ4BB264.js";
38
- import "../chunk-WN6WYUCV.js";
39
- import "../chunk-DA4FTGTK.js";
37
+ import "../chunk-CD47ZFFZ.js";
38
+ import "../chunk-2VZAALEJ.js";
39
+ import "../chunk-DKMD6AWR.js";
40
40
  import "../chunk-POFBE6ZY.js";
41
41
  import "../chunk-GMXKITVA.js";
42
- import "../chunk-5BHROGRB.js";
43
- import "../chunk-ZPW4MJOV.js";
44
- import "../chunk-4QKM44N6.js";
45
- import "../chunk-W4Q7NFXU.js";
46
- import "../chunk-3BUAEQCY.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";
47
47
  import "../chunk-7QLSKOSU.js";
48
48
  import "../chunk-KZERVKTD.js";
49
- import "../chunk-75CA37FZ.js";
50
- import "../chunk-HJXZJF6O.js";
49
+ import "../chunk-FQ2GORVG.js";
50
+ import "../chunk-ZBHUHJG6.js";
51
51
  import "../chunk-T7E75EKA.js";
52
- import "../chunk-2QRE6QH2.js";
53
- import "../chunk-L6USMDTW.js";
54
- import "../chunk-Q4E56K4X.js";
52
+ import "../chunk-5QUPKDI5.js";
53
+ import "../chunk-7DVNSQWF.js";
54
+ import "../chunk-I5IJRMNV.js";
55
55
 
56
56
  // bin/pushary-session-start-hook.ts
57
57
  var AGENT = activeIdentity(process.argv);
@@ -1,104 +1,119 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- codexTrustOutcome,
4
- describeCodexTrustConfirmation
5
- } from "../chunk-JUFKJCZG.js";
6
2
  import {
7
3
  runBrowserLogin
8
- } from "../chunk-DGQTJDSJ.js";
4
+ } from "../chunk-NWDG3MSW.js";
9
5
  import {
10
6
  coworkOutput,
11
7
  coworkSelection
12
- } from "../chunk-CBVDW2N6.js";
8
+ } from "../chunk-B64KHETR.js";
13
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";
14
19
  import {
15
20
  describeVersionManagerPin,
16
21
  versionManagerOf
17
22
  } from "../chunk-GU3EJCVV.js";
23
+ import {
24
+ codexTrustOutcome,
25
+ describeCodexTrustConfirmation,
26
+ needsCodexTrustStep
27
+ } from "../chunk-6TE27XZR.js";
18
28
  import {
19
29
  writeStdoutFully
20
30
  } from "../chunk-EO23EUOK.js";
21
31
  import {
22
32
  ensureCodexTrustsPusharyHooks
23
- } from "../chunk-IMGJYFCX.js";
33
+ } from "../chunk-MGRFDGWU.js";
24
34
  import {
25
35
  readManagedControlEvidence,
26
36
  waitForMachineReadiness
27
- } from "../chunk-SVTHEMM3.js";
37
+ } from "../chunk-2QTO5YIT.js";
28
38
  import {
29
39
  describeSetupSideEffects,
30
40
  installAgentSkill,
31
- installSkillViaSkillsCli,
41
+ installSkillViaSkillsCli
42
+ } from "../chunk-EUW7JL2K.js";
43
+ import {
44
+ CURSOR_PLUGIN_BACKUP_INFIX,
45
+ CURSOR_PLUGIN_STAGING_PREFIX,
32
46
  registerCursorGate
33
- } from "../chunk-6GERGJHF.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";
34
61
  import {
35
62
  AgentConfigError,
36
63
  FX_PUSHARY_TOOLS_RULE,
37
64
  FX_QUESTION_TOOL,
38
- FX_TOOL_DISCOVERY_NOTE,
39
- HERMES_PIP_PACKAGE,
40
65
  SHARED_AGENTS_MD_LABEL,
41
66
  afterAgentFailureNote,
42
67
  agentFailureFromError,
43
68
  agentFailureWire,
44
69
  configFailureKind,
45
70
  configureFxSettings,
46
- describeDetection,
47
71
  describedAgentFailure,
48
- detectAllAgents,
49
72
  failedAgentsContext,
50
73
  fxIgnoresInstructionsFile,
74
+ fxInstructionsBody,
51
75
  fxPusharyEntry,
52
76
  inspectFxInstallation,
53
- isDetected,
54
- isHermesConfigReceipt,
55
- pluginLocationSnippet,
56
77
  readFxProfileForSetup,
57
- registerPluginLocation,
58
78
  renderAgentInstructions,
59
79
  renderProjectAgentInstructions,
60
- resolveHermesPython,
61
80
  retryAgentCommand,
62
- runHermesConfigScript,
63
- shortenHome,
64
- vscodeSettingsTargets,
65
81
  withFxPusharyServer,
66
82
  writeFxProfile,
67
83
  writeInstructionBlock
68
- } from "../chunk-5PMTC2CB.js";
84
+ } from "../chunk-ZN3C6GBG.js";
69
85
  import {
70
86
  MCP_BRIDGE_BINARY
71
- } from "../chunk-WUKUXICK.js";
87
+ } from "../chunk-HRULIYDU.js";
72
88
  import {
73
89
  OPENCODE_HOOK_BINARY,
74
90
  addOpenCodeMcpServer,
75
91
  installOpenCodePlugin,
76
92
  openCodeConfigDir,
77
93
  openCodeConfigFile,
94
+ openCodeHookArgv,
78
95
  openCodeInstructionsFile,
79
96
  openCodePluginDir,
80
97
  openCodePluginFile,
81
98
  openCodeWired
82
- } from "../chunk-RIC6OOJX.js";
99
+ } from "../chunk-MFF3ONG5.js";
83
100
  import {
101
+ addClaudeMcpServer,
84
102
  addCompatibleHooks,
85
103
  addCompatibleMcpServer,
86
104
  addCompatibleToolPermissions,
105
+ addPusharyHooks,
106
+ addPusharyToolPermissions,
107
+ captureClaudeMcpServer,
87
108
  compatibleConfigFile,
88
109
  compatibleHookEvents,
89
110
  compatibleInstructionsFile,
90
111
  compatibleMcpFile,
91
112
  compatiblePermissionRuleFile,
92
- hasCompatibleHooks
93
- } from "../chunk-TE5M6GGK.js";
94
- import {
95
- addClaudeMcpServer,
96
- addPusharyHooks,
97
- addPusharyToolPermissions,
98
- captureClaudeMcpServer,
113
+ hasCompatibleHooks,
99
114
  isClaudeMcpSnapshot,
100
115
  updateClaudeMcpSnapshot
101
- } from "../chunk-IR5FRUPQ.js";
116
+ } from "../chunk-KHNFLYJO.js";
102
117
  import {
103
118
  checkCodexInstall,
104
119
  detectProviderLiveCapabilities,
@@ -106,41 +121,31 @@ import {
106
121
  hasSpawnProvider,
107
122
  nodeCodexInstallProbe,
108
123
  resolveControlPolicy
109
- } from "../chunk-MKJ3RTUS.js";
124
+ } from "../chunk-I6MJXLMY.js";
110
125
  import {
111
126
  detectClaudeVersion
112
127
  } from "../chunk-RIVNNBEK.js";
113
128
  import {
114
129
  describeAutoUpdateAnnouncement,
115
130
  takeAutoUpdateAnnouncement
116
- } from "../chunk-SNJ3BOCP.js";
131
+ } from "../chunk-7PT35RY2.js";
117
132
  import {
118
133
  KEEP_HINT,
119
134
  captureHookTakeover,
120
135
  captureMcpServer,
121
136
  describeAppOwnership,
122
137
  describeHookOwnership,
123
- hookOwnerOf,
124
138
  mcpBearerKey,
125
139
  planHooks
126
- } from "../chunk-NVGDMTX3.js";
140
+ } from "../chunk-YIG2R3BJ.js";
127
141
  import {
128
142
  AGENT_CHOICES,
129
143
  effectiveControlMode,
130
144
  effectiveVerify,
131
145
  parseSetupOptions
132
- } from "../chunk-SPXBXN23.js";
133
- import {
134
- liveBridgeProbe,
135
- resolveBridgeStub
136
- } from "../chunk-SJN22ADZ.js";
137
- import {
138
- claudeWired,
139
- codexWired,
140
- geminiWired,
141
- pusharyHookExecutable
142
- } from "../chunk-D7SOOVHX.js";
146
+ } from "../chunk-DL7XWKYV.js";
143
147
  import {
148
+ DAEMON_COLD_START_TIMEOUT_MS,
144
149
  clearDaemonNeedsLogin,
145
150
  daemonHasRemoteProof,
146
151
  daemonServiceDefinitionPath,
@@ -152,16 +157,22 @@ import {
152
157
  replaceDaemonService,
153
158
  stopDaemonService,
154
159
  waitForDaemonRemoteProof
155
- } from "../chunk-ZC3TF4LR.js";
160
+ } from "../chunk-LKLVTG3V.js";
161
+ import {
162
+ claudeWired,
163
+ codexWired,
164
+ geminiWired,
165
+ pusharyHookExecutable
166
+ } from "../chunk-2QGYMY7A.js";
156
167
  import {
157
168
  GEMINI_HOOK_BINARY,
158
169
  addGeminiHooks,
159
170
  addGeminiMcpServer
160
- } from "../chunk-UKNKYTTY.js";
161
- import "../chunk-Q23MMVTD.js";
171
+ } from "../chunk-3I6IVOZV.js";
172
+ import "../chunk-WG3K4TCH.js";
162
173
  import {
163
174
  transcriptPreferenceForSetup
164
- } from "../chunk-KK54WQ74.js";
175
+ } from "../chunk-M6BZZFVQ.js";
165
176
  import "../chunk-XHKBHWLX.js";
166
177
  import {
167
178
  compareVersion,
@@ -169,11 +180,11 @@ import {
169
180
  } from "../chunk-6ICPEJY5.js";
170
181
  import {
171
182
  reportEvent
172
- } from "../chunk-CCDVL63C.js";
183
+ } from "../chunk-KRCR2CRQ.js";
173
184
  import "../chunk-N6IOSZOE.js";
174
- import "../chunk-DJ4BB264.js";
175
- import "../chunk-WN6WYUCV.js";
176
- import "../chunk-DA4FTGTK.js";
185
+ import "../chunk-CD47ZFFZ.js";
186
+ import "../chunk-2VZAALEJ.js";
187
+ import "../chunk-DKMD6AWR.js";
177
188
  import "../chunk-POFBE6ZY.js";
178
189
  import {
179
190
  BROWSER_CONNECT_COMMAND,
@@ -185,7 +196,7 @@ import {
185
196
  printConnectInstructions,
186
197
  roundTripEvidence,
187
198
  verifyRoundTrip
188
- } from "../chunk-YPXUD6DW.js";
199
+ } from "../chunk-IAD2RT4L.js";
189
200
  import "../chunk-3EGEA4KH.js";
190
201
  import {
191
202
  setHumanStream
@@ -205,24 +216,25 @@ import {
205
216
  readConfigFileKey,
206
217
  readControlMode,
207
218
  readKeySource,
219
+ recordMacAppKeyPrefix,
208
220
  resolveShellRc,
209
221
  writeKey
210
- } from "../chunk-5BHROGRB.js";
211
- import "../chunk-ZPW4MJOV.js";
222
+ } from "../chunk-N4QSPI3B.js";
223
+ import "../chunk-MKTJEXZ3.js";
212
224
  import {
213
225
  checkApiKey,
214
226
  describeKeyCheck,
215
227
  samePusharyAccount
216
- } from "../chunk-4QKM44N6.js";
217
- import "../chunk-W4Q7NFXU.js";
218
- import "../chunk-3BUAEQCY.js";
228
+ } from "../chunk-LWOO567I.js";
229
+ import "../chunk-TCQ43LSG.js";
230
+ import "../chunk-DUZVXBBU.js";
219
231
  import {
220
232
  UsageError
221
233
  } from "../chunk-7QLSKOSU.js";
222
234
  import {
223
235
  EXIT
224
236
  } from "../chunk-KZERVKTD.js";
225
- import "../chunk-75CA37FZ.js";
237
+ import "../chunk-FQ2GORVG.js";
226
238
  import {
227
239
  NpmMissingError,
228
240
  addCodexHookTrust,
@@ -261,27 +273,25 @@ import {
261
273
  npmErrorMessage,
262
274
  plannedGlobalPackage,
263
275
  pusharyConfigFile,
264
- pusharyDir,
265
276
  readCodexMcpAuth,
266
277
  resolveGlobalBinDir,
267
278
  resolveGlobalBinary,
268
279
  vscodePluginDir,
269
280
  vscodePluginMcp
270
- } from "../chunk-HJXZJF6O.js";
281
+ } from "../chunk-ZBHUHJG6.js";
271
282
  import {
272
283
  backupFile,
273
284
  readJsonSafe,
274
285
  writeFileAtomic,
275
286
  writeJsonAtomic
276
287
  } from "../chunk-T7E75EKA.js";
277
- import "../chunk-2QRE6QH2.js";
288
+ import "../chunk-5QUPKDI5.js";
278
289
  import {
279
290
  NPX_LATEST_COMMAND,
280
291
  renderCommandHelp
281
- } from "../chunk-L6USMDTW.js";
292
+ } from "../chunk-7DVNSQWF.js";
282
293
  import {
283
294
  HOOK_COMPATIBLE_PROFILES,
284
- HOOK_LOCATOR_BINARY,
285
295
  PRETOOLUSE_GATED_TOOLS,
286
296
  SUPPORT_EMAIL,
287
297
  compatibleTargetFiles,
@@ -293,7 +303,7 @@ import {
293
303
  isValidApiKey,
294
304
  launchedPackage,
295
305
  ownPackageName
296
- } from "../chunk-Q4E56K4X.js";
306
+ } from "../chunk-I5IJRMNV.js";
297
307
 
298
308
  // bin/pushary-setup.ts
299
309
  import { existsSync, readFileSync, writeFileSync, mkdirSync, cpSync, rmSync, renameSync, realpathSync, statSync, openSync, readSync, closeSync } from "fs";
@@ -346,7 +356,7 @@ var nextSteps = (facts, reachable) => {
346
356
  lines.push("pushary claude launch a managed Claude Code session");
347
357
  }
348
358
  if (!reachable) {
349
- lines.push("pushary connect connect a phone without re-running setup");
359
+ lines.push("pushary pair pair a phone without re-running setup");
350
360
  }
351
361
  lines.push("pushary doctor re-check everything");
352
362
  return lines;
@@ -1150,6 +1160,9 @@ var setupCodex = async (apiKey) => {
1150
1160
  } else if (trustOutcome === "unverified" && confirmation) {
1151
1161
  console.log(` ${dim("\u2022")} Hook pre-trusted: no ${cyan("/hooks")} step. If approvals never arrive, ${cyan("/hooks")} re-trusts it`);
1152
1162
  console.log(` ${dim(describeCodexTrustConfirmation(confirmation))}`);
1163
+ } else if (confirmation && !needsCodexTrustStep(confirmation)) {
1164
+ console.log(` ${yellow("!")} ${describeCodexTrustConfirmation(confirmation)}`);
1165
+ noteManual(describeCodexTrustConfirmation(confirmation));
1153
1166
  } else {
1154
1167
  if (confirmation) {
1155
1168
  console.log(` ${yellow("!")} ${describeCodexTrustConfirmation(confirmation)}`);
@@ -1238,8 +1251,8 @@ var setupCursor = async (apiKey) => {
1238
1251
  const source = resolveBundledPlugin();
1239
1252
  if (!source) throw new Error("bundled Cursor plugin not found in this package");
1240
1253
  await spinner("Installing Pushary plugin", async () => {
1241
- const staging = join3(dirname2(CURSOR_PLUGIN_DIR), `.pushary-staging-${process.pid}`);
1242
- 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, "-")}`;
1243
1256
  rmSync(staging, { recursive: true, force: true });
1244
1257
  try {
1245
1258
  cpSync(source, staging, {
@@ -1482,9 +1495,7 @@ var reportFxSettings = (outcome) => {
1482
1495
  };
1483
1496
  var teachFxToAskViaPush = () => {
1484
1497
  if (fxIgnoresInstructionsFile(fxAgentsMd(), fxConfigDir())) return false;
1485
- writeInstructionBlock(fxAgentsMd(), `${renderAgentInstructions("fx")}
1486
-
1487
- ${FX_TOOL_DISCOVERY_NOTE}`);
1498
+ writeInstructionBlock(fxAgentsMd(), fxInstructionsBody());
1488
1499
  return true;
1489
1500
  };
1490
1501
  var fxWired = () => inspectFxInstallation(fxMcpProfile(), fxSettings(), process.env).configured;
@@ -1593,11 +1604,7 @@ var setupOpenCode = async (apiKey) => {
1593
1604
  }
1594
1605
  await installGlobally2();
1595
1606
  await spinner(`Writing the Pushary plugin (${openCodePluginFile()})`, async () => {
1596
- const target = resolveGlobalBinary(OPENCODE_HOOK_BINARY) ?? OPENCODE_HOOK_BINARY;
1597
- installOpenCodePlugin(
1598
- guardedArgv({ kind: "binary", path: target, runtime: "node" }, ["--source", "opencode"]),
1599
- openCodePluginDir()
1600
- );
1607
+ installOpenCodePlugin(openCodeHookArgv(resolveGlobalBinary(OPENCODE_HOOK_BINARY)), openCodePluginDir());
1601
1608
  });
1602
1609
  await spinner(`Adding MCP server (${openCodeConfigFile()})`, async () => {
1603
1610
  const config = readAgentJson(openCodeConfigFile());
@@ -1622,24 +1629,9 @@ var compatibleRecord = (of) => HOOK_COMPATIBLE_PROFILES.reduce(
1622
1629
  (record, profile) => ({ ...record, [profile.agentType]: of(profile) }),
1623
1630
  {}
1624
1631
  );
1625
- var HOOK_FILES = {
1626
- claude_code: () => CLAUDE_SETTINGS,
1627
- codex: () => CODEX_HOOKS_JSON,
1628
- gemini_cli: () => GEMINI_SETTINGS,
1629
- cursor: () => CURSOR_USER_HOOKS,
1630
- vscode: () => join3(VSCODE_PLUGIN_DIR, "hooks", "hooks.json"),
1631
- ...compatibleRecord((profile) => () => compatibleConfigFile(profile))
1632
- };
1633
- var hookOwnerFor = (agent, appAvailable = true) => {
1634
- const file = HOOK_FILES[agent]?.();
1635
- if (!file) return "none";
1636
- const document = readJsonSafe(file);
1637
- const profile = hookCompatibleProfile(agent);
1638
- return hookOwnerOf(
1639
- document.kind === "ok" ? document.value : null,
1640
- appAvailable,
1641
- profile ? profile.hooksKeyPath : void 0
1642
- );
1632
+ var clearSetupChoiceDecline = (agent) => {
1633
+ const declined = declinedAgentForSetupChoice(agent);
1634
+ if (declined) clearDeclinedAgent(declined);
1643
1635
  };
1644
1636
  var appMcpKeyFor = (agent) => {
1645
1637
  if (agent === "codex") {
@@ -1657,7 +1649,7 @@ var appMcpKeyIfReadable = (agent) => {
1657
1649
  }
1658
1650
  };
1659
1651
  var captureTakeoverReceipt = (agent) => {
1660
- const hookFile = HOOK_FILES[agent]?.();
1652
+ const hookFile = agentHookFile(agent);
1661
1653
  if (!hookFile) return;
1662
1654
  const document = readAgentJson(hookFile);
1663
1655
  const captured = captureHookTakeover(agent, document);
@@ -2235,12 +2227,10 @@ var main = async () => {
2235
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.");
2236
2228
  }
2237
2229
  const rc = await saveApiKey(trimmedKey, controlMode, transcriptSync);
2230
+ if (trimmedKey === appKey) recordMacAppKeyPrefix(trimmedKey);
2238
2231
  if (keyCheck.kind === "ok") clearDaemonNeedsLogin();
2239
2232
  const context = { rc };
2240
- const appBridgeAvailable = resolveBridgeStub(
2241
- join3(pusharyDir(), "bin", HOOK_LOCATOR_BINARY),
2242
- liveBridgeProbe()
2243
- ).kind === "bundle";
2233
+ const appBridgeAvailable = macAppBridgeAvailable();
2244
2234
  const accountChecks = /* @__PURE__ */ new Map();
2245
2235
  if (keyCheck) accountChecks.set(trimmedKey, Promise.resolve(keyCheck));
2246
2236
  const accountCheckFor = (key) => {
@@ -2279,7 +2269,7 @@ var main = async () => {
2279
2269
  for (const [index, agent] of agents.entries()) {
2280
2270
  markStep(`configure:${agent}`);
2281
2271
  try {
2282
- const ownerBefore = hookOwnerFor(agent, appBridgeAvailable);
2272
+ const ownerBefore = agentHookOwner(agent, appBridgeAvailable);
2283
2273
  const plan = planHooks({ owner: ownerBefore, takeOverHooks: options.takeOverHooks, nonInteractive: options.nonInteractive });
2284
2274
  const keepAppWiring = plan === "keep";
2285
2275
  if (keepAppWiring) {
@@ -2297,6 +2287,7 @@ var main = async () => {
2297
2287
  ${check} ${AGENT_NAMES[agent]}: ${describeAppOwnership(AGENT_NAMES[agent])} ${dim(KEEP_HINT)}`);
2298
2288
  hookOwners.push({ agent, owner: "app", kept: true });
2299
2289
  completed.push(agent);
2290
+ clearSetupChoiceDecline(agent);
2300
2291
  continue;
2301
2292
  }
2302
2293
  if (ownerBefore === "app") captureTakeoverReceipt(agent);
@@ -2305,7 +2296,8 @@ var main = async () => {
2305
2296
  skipped.push(agent);
2306
2297
  } else if (agentIsWired(agent)) {
2307
2298
  completed.push(agent);
2308
- hookOwners.push({ agent, owner: hookOwnerFor(agent, appBridgeAvailable), kept: false });
2299
+ clearSetupChoiceDecline(agent);
2300
+ hookOwners.push({ agent, owner: agentHookOwner(agent, appBridgeAvailable), kept: false });
2309
2301
  } else {
2310
2302
  const failure = describedAgentFailure(agent, "not-wired");
2311
2303
  failures.push(failure);
@@ -2532,7 +2524,7 @@ var main = async () => {
2532
2524
  warnVersionManagerPin(process.execPath);
2533
2525
  controlFailureStage = "daemon-start";
2534
2526
  daemon = await ensureDaemonRunning({ spawnDaemon: () => {
2535
- } });
2527
+ }, waitTimeoutMs: DAEMON_COLD_START_TIMEOUT_MS });
2536
2528
  if (daemon.kind === "running" || daemon.kind === "started") controlFailureStage = null;
2537
2529
  } else {
2538
2530
  daemon = { kind: "unavailable", detail: service.detail };
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readLedgerSummary
4
- } from "../chunk-GQHZIBAZ.js";
4
+ } from "../chunk-ZSTSEBG7.js";
5
5
  import {
6
6
  exitOnHelpFlag
7
- } from "../chunk-FBD3QGVJ.js";
7
+ } from "../chunk-CKV3UPMU.js";
8
8
  import "../chunk-KZERVKTD.js";
9
9
  import {
10
10
  getApiKey
11
- } from "../chunk-2QRE6QH2.js";
12
- import "../chunk-L6USMDTW.js";
13
- import "../chunk-Q4E56K4X.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");