pushary 1.9.137 → 1.9.138

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 (106) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/{api-5H25QRNM.js → api-J4XJ7XWW.js} +9 -9
  3. package/dist/bin/pushary-audit.js +3 -3
  4. package/dist/bin/pushary-bell-hook.js +19 -19
  5. package/dist/bin/pushary-bell.js +7 -7
  6. package/dist/bin/pushary-claude.js +23 -23
  7. package/dist/bin/pushary-clean.js +28 -28
  8. package/dist/bin/pushary-codex-bridge.js +15 -15
  9. package/dist/bin/pushary-codex-hook.js +30 -30
  10. package/dist/bin/pushary-codex-session.js +6 -6
  11. package/dist/bin/pushary-codex.js +11 -11
  12. package/dist/bin/pushary-connect.js +23 -23
  13. package/dist/bin/pushary-daemon-supervisor.js +91 -12
  14. package/dist/bin/pushary-daemon.js +35 -35
  15. package/dist/bin/pushary-disconnect.js +23 -23
  16. package/dist/bin/pushary-display-hook.js +22 -13
  17. package/dist/bin/pushary-doctor.js +39 -39
  18. package/dist/bin/pushary-elicitation-hook.js +20 -20
  19. package/dist/bin/pushary-gemini-bridge.js +6 -6
  20. package/dist/bin/pushary-gemini-hook.js +23 -23
  21. package/dist/bin/pushary-hook.js +25 -25
  22. package/dist/bin/pushary-login.js +17 -17
  23. package/dist/bin/pushary-logout.js +21 -21
  24. package/dist/bin/pushary-mcp.js +11 -11
  25. package/dist/bin/pushary-mode.js +12 -12
  26. package/dist/bin/pushary-notification-hook.js +19 -19
  27. package/dist/bin/pushary-opencode-hook.js +22 -22
  28. package/dist/bin/pushary-permission-denied-hook.js +25 -25
  29. package/dist/bin/pushary-permission-hook.js +25 -25
  30. package/dist/bin/pushary-post-hook.js +20 -20
  31. package/dist/bin/pushary-prompt-hook.js +19 -19
  32. package/dist/bin/pushary-session-end-hook.js +19 -19
  33. package/dist/bin/pushary-session-start-hook.js +28 -28
  34. package/dist/bin/pushary-setup.js +46 -46
  35. package/dist/bin/pushary-status.js +27 -27
  36. package/dist/bin/pushary-stop-hook.js +19 -19
  37. package/dist/bin/pushary-stopfailure-hook.js +19 -19
  38. package/dist/bin/pushary-suggestions.js +12 -12
  39. package/dist/bin/pushary-transcript-register.js +9 -9
  40. package/dist/bin/pushary-transcripts.js +19 -19
  41. package/dist/bin/pushary-upgrade.js +37 -37
  42. package/dist/bin/pushary-wait.js +12 -12
  43. package/dist/bin/pushary.js +6 -6
  44. package/dist/{chunk-ICCM3DLT.js → chunk-33E75LIY.js} +1 -1
  45. package/dist/{chunk-IHAKBLW2.js → chunk-42BVIKPZ.js} +3 -3
  46. package/dist/{chunk-3QBI5C6P.js → chunk-52B2TQJM.js} +1 -1
  47. package/dist/{chunk-NZD6ISCL.js → chunk-5ZK4RHYR.js} +1 -1
  48. package/dist/{chunk-MD63J3T7.js → chunk-6TK3DWSF.js} +78 -24
  49. package/dist/{chunk-DBIPNY7J.js → chunk-7WR3FDDX.js} +2 -2
  50. package/dist/{chunk-6SWFS4GU.js → chunk-AGVE7MXF.js} +2 -2
  51. package/dist/{chunk-43DT3QWZ.js → chunk-APTNHX63.js} +3 -3
  52. package/dist/{chunk-L2GADKFL.js → chunk-B3AZPYRU.js} +6 -6
  53. package/dist/{chunk-JZJ5CM6X.js → chunk-CBTXOWB3.js} +3 -3
  54. package/dist/{chunk-A7R43KOX.js → chunk-CULDO4UA.js} +2 -2
  55. package/dist/{chunk-YHX5YF77.js → chunk-DES272QQ.js} +3 -3
  56. package/dist/{chunk-WXUEOHYY.js → chunk-DK6CMXYI.js} +5 -5
  57. package/dist/{chunk-VV7WRIQT.js → chunk-DMZMPYLB.js} +2 -2
  58. package/dist/{chunk-WNT4JHK3.js → chunk-EHQCMJHI.js} +1 -1
  59. package/dist/{chunk-V7ZY7P2X.js → chunk-EJSU5YWO.js} +3 -3
  60. package/dist/{chunk-CMAB4KQG.js → chunk-FJ7OESWX.js} +3 -3
  61. package/dist/{chunk-2R4OVJHS.js → chunk-FO5MHOBI.js} +4 -4
  62. package/dist/{chunk-NN43KGTN.js → chunk-FQ3ASV5L.js} +3 -3
  63. package/dist/{chunk-GS5FH3C2.js → chunk-FYLYAVQG.js} +2 -2
  64. package/dist/{chunk-2MVKT7KH.js → chunk-H5XLVJI7.js} +1 -1
  65. package/dist/{chunk-UP5QXEUU.js → chunk-HVRXBHX2.js} +2 -2
  66. package/dist/{chunk-VBWJ756P.js → chunk-ICQU3SNR.js} +3 -3
  67. package/dist/{chunk-2XDVEBHI.js → chunk-IDGWQY3J.js} +4 -4
  68. package/dist/{chunk-6WT5OIRM.js → chunk-JFGM6VSU.js} +3 -3
  69. package/dist/{chunk-7VKW7OA5.js → chunk-KN4YJ4QS.js} +2 -2
  70. package/dist/{chunk-Q2VV77IY.js → chunk-KXKE3SW3.js} +4 -4
  71. package/dist/{chunk-MQ3I5OIC.js → chunk-L3UV4LLL.js} +7 -7
  72. package/dist/{chunk-D7AAAD6W.js → chunk-LF3ZRLUQ.js} +8 -8
  73. package/dist/{chunk-7XD56GXA.js → chunk-LIUWN23V.js} +4 -4
  74. package/dist/{chunk-54TZGPZP.js → chunk-LIZEMDE4.js} +1 -1
  75. package/dist/{chunk-G73ACPR2.js → chunk-LPXHKIJC.js} +1 -1
  76. package/dist/{chunk-2E46RALI.js → chunk-NIBF37NU.js} +2 -2
  77. package/dist/{chunk-EJHD44ZN.js → chunk-NLJ2ILA7.js} +1 -1
  78. package/dist/{chunk-3HXOR6E5.js → chunk-NNDUDXOJ.js} +9 -9
  79. package/dist/{chunk-H2RE3IPK.js → chunk-NUG2A73X.js} +1 -1
  80. package/dist/{chunk-62GD26OE.js → chunk-O26H5X5M.js} +2 -2
  81. package/dist/{chunk-POV2TBFA.js → chunk-OAGYR5LI.js} +9 -9
  82. package/dist/{chunk-4T72AHIA.js → chunk-OXPYENHL.js} +1 -1
  83. package/dist/{chunk-7NCI2DGB.js → chunk-P6HLLS5J.js} +2 -2
  84. package/dist/{chunk-ZWLSXECG.js → chunk-P7YVVWTW.js} +1 -1
  85. package/dist/{chunk-TLK5YLIE.js → chunk-PNDL3OMR.js} +2 -2
  86. package/dist/{chunk-A4YOXS24.js → chunk-PPCZSOCL.js} +2 -2
  87. package/dist/{chunk-KLV2NQVT.js → chunk-S47AAQFT.js} +2 -2
  88. package/dist/{chunk-PHA6AFOR.js → chunk-SNMTACCY.js} +4 -4
  89. package/dist/{chunk-VO77WHK4.js → chunk-TJCUGBCZ.js} +5 -5
  90. package/dist/{chunk-R7KC57PC.js → chunk-TN5PGMH5.js} +1 -1
  91. package/dist/{chunk-R6N6FREL.js → chunk-TXPXK5Q6.js} +10 -10
  92. package/dist/{chunk-ZWIJJYN3.js → chunk-VF4N6NHG.js} +3 -3
  93. package/dist/{chunk-HY4ATVCT.js → chunk-VQMGR32B.js} +1 -1
  94. package/dist/{chunk-LAWI6NQK.js → chunk-WHOFZB5W.js} +1 -1
  95. package/dist/{codex-app-cards-switch-JU236CG2.js → codex-app-cards-switch-R3MIDYFA.js} +6 -6
  96. package/dist/{codex-desktop-launch-LRQ4LU64.js → codex-desktop-launch-2YRIBVDK.js} +1 -1
  97. package/dist/{codex-session-launch-DTGH7ZKM.js → codex-session-launch-CTMTMGHU.js} +15 -15
  98. package/dist/{global-upgrade-5UAH5DCG.js → global-upgrade-NMTIVAJ3.js} +8 -8
  99. package/dist/{identity-UFJEWGEU.js → identity-3XKATUN2.js} +3 -3
  100. package/dist/{live-capabilities-BL3SHFWX.js → live-capabilities-MR35FXPF.js} +3 -3
  101. package/dist/paths-YA5ROXGC.js +2 -2
  102. package/dist/{reapply-OPQF4DPQ.js → reapply-LIBOIVBT.js} +23 -23
  103. package/dist/src/index.js +25 -25
  104. package/dist/{upgrade-lock-AZLOOGKV.js → upgrade-lock-LK4XD3HR.js} +3 -3
  105. package/package.json +1 -1
  106. package/dist/bin/pushary-daemon-supervisor.d.ts +0 -1
@@ -5,14 +5,14 @@ import {
5
5
  } from "../chunk-S4HS6VTI.js";
6
6
  import {
7
7
  registerTranscript
8
- } from "../chunk-6WT5OIRM.js";
8
+ } from "../chunk-JFGM6VSU.js";
9
9
  import "../chunk-VAE5JBR5.js";
10
10
  import "../chunk-G66WIAST.js";
11
- import "../chunk-MD63J3T7.js";
12
- import "../chunk-TLK5YLIE.js";
11
+ import "../chunk-6TK3DWSF.js";
12
+ import "../chunk-PNDL3OMR.js";
13
13
  import "../chunk-A2YJ2FBR.js";
14
14
  import "../chunk-5XDFQ6E3.js";
15
- import "../chunk-LAWI6NQK.js";
15
+ import "../chunk-WHOFZB5W.js";
16
16
  import "../chunk-YPY4YCIZ.js";
17
17
  import "../chunk-YOV3LHOL.js";
18
18
  import {
@@ -23,19 +23,19 @@ import {
23
23
  } from "../chunk-ZWURBNA3.js";
24
24
  import "../chunk-H6CL3T2S.js";
25
25
  import "../chunk-VVN3RPV6.js";
26
- import "../chunk-WNT4JHK3.js";
26
+ import "../chunk-EHQCMJHI.js";
27
+ import "../chunk-YU2EUD7O.js";
27
28
  import {
28
29
  readConfigFileKey
29
30
  } from "../chunk-PNVTPEO5.js";
30
31
  import "../chunk-LNF36PTF.js";
31
- import "../chunk-R7KC57PC.js";
32
- import "../chunk-GS5FH3C2.js";
32
+ import "../chunk-TN5PGMH5.js";
33
+ import "../chunk-FYLYAVQG.js";
33
34
  import {
34
35
  getBaseUrl
35
36
  } from "../chunk-IKBTG3OT.js";
36
- import "../chunk-YU2EUD7O.js";
37
- import "../chunk-TODDEIYG.js";
38
37
  import "../chunk-BG4HHB7E.js";
38
+ import "../chunk-TODDEIYG.js";
39
39
  import "../chunk-MQMVJDII.js";
40
40
  import "../chunk-WIIMW5YO.js";
41
41
  import "../chunk-DL67HX3D.js";
@@ -4,10 +4,10 @@ import {
4
4
  } from "../chunk-S4HS6VTI.js";
5
5
  import {
6
6
  TRANSCRIPT_SYNC_NOTICE
7
- } from "../chunk-YHX5YF77.js";
8
- import "../chunk-V7ZY7P2X.js";
9
- import "../chunk-3QBI5C6P.js";
10
- import "../chunk-54TZGPZP.js";
7
+ } from "../chunk-DES272QQ.js";
8
+ import "../chunk-EJSU5YWO.js";
9
+ import "../chunk-52B2TQJM.js";
10
+ import "../chunk-LIZEMDE4.js";
11
11
  import {
12
12
  exitOnHelpFlag
13
13
  } from "../chunk-K7YJBVR3.js";
@@ -21,14 +21,14 @@ import {
21
21
  snapshotRecipientPinFile,
22
22
  trustPhoneRecipient,
23
23
  verifyTrustedRecipients
24
- } from "../chunk-6WT5OIRM.js";
24
+ } from "../chunk-JFGM6VSU.js";
25
25
  import "../chunk-VAE5JBR5.js";
26
26
  import "../chunk-G66WIAST.js";
27
- import "../chunk-MD63J3T7.js";
28
- import "../chunk-TLK5YLIE.js";
27
+ import "../chunk-6TK3DWSF.js";
28
+ import "../chunk-PNDL3OMR.js";
29
29
  import "../chunk-A2YJ2FBR.js";
30
30
  import "../chunk-5XDFQ6E3.js";
31
- import "../chunk-LAWI6NQK.js";
31
+ import "../chunk-WHOFZB5W.js";
32
32
  import {
33
33
  parseFlags
34
34
  } from "../chunk-YPY4YCIZ.js";
@@ -40,28 +40,28 @@ import {
40
40
  transcriptEnvironmentPreference,
41
41
  transcriptsEnabled
42
42
  } from "../chunk-ZWURBNA3.js";
43
+ import "../chunk-DK6CMXYI.js";
44
+ import "../chunk-KXKE3SW3.js";
45
+ import "../chunk-SNMTACCY.js";
43
46
  import "../chunk-H6CL3T2S.js";
44
- import "../chunk-WXUEOHYY.js";
45
47
  import "../chunk-VVN3RPV6.js";
46
- import "../chunk-Q2VV77IY.js";
47
- import "../chunk-PHA6AFOR.js";
48
- import "../chunk-WNT4JHK3.js";
48
+ import "../chunk-EHQCMJHI.js";
49
+ import {
50
+ UsageError,
51
+ exitCodeFor
52
+ } from "../chunk-YU2EUD7O.js";
49
53
  import {
50
54
  writeTranscriptPreference
51
55
  } from "../chunk-PNVTPEO5.js";
52
56
  import "../chunk-LNF36PTF.js";
53
- import "../chunk-R7KC57PC.js";
54
- import "../chunk-GS5FH3C2.js";
57
+ import "../chunk-TN5PGMH5.js";
58
+ import "../chunk-FYLYAVQG.js";
55
59
  import {
56
60
  getApiKey,
57
61
  getBaseUrl
58
62
  } from "../chunk-IKBTG3OT.js";
59
- import {
60
- UsageError,
61
- exitCodeFor
62
- } from "../chunk-YU2EUD7O.js";
63
- import "../chunk-TODDEIYG.js";
64
63
  import "../chunk-BG4HHB7E.js";
64
+ import "../chunk-TODDEIYG.js";
65
65
  import {
66
66
  isInvocationOf
67
67
  } from "../chunk-MQMVJDII.js";
@@ -18,35 +18,35 @@ import {
18
18
  upgradeInstalledPackage,
19
19
  wasRefreshed,
20
20
  withUpgradeLock
21
- } from "../chunk-VO77WHK4.js";
21
+ } from "../chunk-TJCUGBCZ.js";
22
22
  import {
23
23
  installWithUpgradeLock
24
- } from "../chunk-62GD26OE.js";
24
+ } from "../chunk-O26H5X5M.js";
25
25
  import {
26
26
  phoneStartFellShortLine
27
- } from "../chunk-YHX5YF77.js";
27
+ } from "../chunk-DES272QQ.js";
28
28
  import {
29
29
  ensureCodexTrustAfterReapply,
30
30
  reapplyAllAgents
31
- } from "../chunk-POV2TBFA.js";
31
+ } from "../chunk-OAGYR5LI.js";
32
32
  import {
33
33
  HERMES_RESTART_COMMAND,
34
34
  describeCodexTrustConfirmation
35
- } from "../chunk-A4YOXS24.js";
36
- import "../chunk-V7ZY7P2X.js";
35
+ } from "../chunk-PPCZSOCL.js";
36
+ import "../chunk-EJSU5YWO.js";
37
37
  import {
38
38
  keepLinuxDaemonAfterLogout,
39
39
  lingerReportOf
40
40
  } from "../chunk-AIZYJJGD.js";
41
41
  import {
42
42
  waitForMachineReadiness
43
- } from "../chunk-CMAB4KQG.js";
44
- import "../chunk-6SWFS4GU.js";
43
+ } from "../chunk-FJ7OESWX.js";
44
+ import "../chunk-AGVE7MXF.js";
45
45
  import {
46
46
  readMacAppAgentKey
47
- } from "../chunk-KLV2NQVT.js";
48
- import "../chunk-3QBI5C6P.js";
49
- import "../chunk-A7R43KOX.js";
47
+ } from "../chunk-S47AAQFT.js";
48
+ import "../chunk-52B2TQJM.js";
49
+ import "../chunk-CULDO4UA.js";
50
50
  import {
51
51
  FX_RELOAD_AFTER_BRIDGE,
52
52
  fxHttpEntryKeptNote,
@@ -54,12 +54,12 @@ import {
54
54
  fxServerHolder,
55
55
  inspectFxPusharyHttpWiring,
56
56
  macAppFxBridge
57
- } from "../chunk-2XDVEBHI.js";
57
+ } from "../chunk-IDGWQY3J.js";
58
58
  import {
59
59
  retryAgentCommand
60
- } from "../chunk-54TZGPZP.js";
61
- import "../chunk-NZD6ISCL.js";
62
- import "../chunk-VBWJ756P.js";
60
+ } from "../chunk-LIZEMDE4.js";
61
+ import "../chunk-5ZK4RHYR.js";
62
+ import "../chunk-ICQU3SNR.js";
63
63
  import {
64
64
  exitOnHelpFlag
65
65
  } from "../chunk-K7YJBVR3.js";
@@ -68,8 +68,8 @@ import {
68
68
  expectedLaunchCapabilities,
69
69
  hasSpawnProvider,
70
70
  resolveControlPolicy
71
- } from "../chunk-DBIPNY7J.js";
72
- import "../chunk-EJHD44ZN.js";
71
+ } from "../chunk-7WR3FDDX.js";
72
+ import "../chunk-NLJ2ILA7.js";
73
73
  import "../chunk-CYTPQDQY.js";
74
74
  import {
75
75
  AUTO_UPDATE_DISABLE_ENV,
@@ -80,8 +80,8 @@ import {
80
80
  isUnfinishedAutoUpdate,
81
81
  readAutoUpdateState,
82
82
  updateAutoUpdateState
83
- } from "../chunk-ICCM3DLT.js";
84
- import "../chunk-43DT3QWZ.js";
83
+ } from "../chunk-33E75LIY.js";
84
+ import "../chunk-APTNHX63.js";
85
85
  import {
86
86
  DAEMON_COLD_START_TIMEOUT_MS,
87
87
  daemonHasRemoteProof,
@@ -94,23 +94,26 @@ import {
94
94
  replaceDaemonService,
95
95
  stopDaemonService,
96
96
  waitForDaemonRemoteProof
97
- } from "../chunk-MD63J3T7.js";
98
- import "../chunk-TLK5YLIE.js";
99
- import "../chunk-D7AAAD6W.js";
97
+ } from "../chunk-6TK3DWSF.js";
98
+ import "../chunk-PNDL3OMR.js";
99
+ import "../chunk-LF3ZRLUQ.js";
100
100
  import "../chunk-A2YJ2FBR.js";
101
101
  import "../chunk-5XDFQ6E3.js";
102
- import "../chunk-LAWI6NQK.js";
102
+ import "../chunk-WHOFZB5W.js";
103
103
  import "../chunk-YPY4YCIZ.js";
104
- import "../chunk-H6CL3T2S.js";
105
104
  import "../chunk-IRIXOH4U.js";
106
- import "../chunk-L2GADKFL.js";
107
- import "../chunk-Y47BMZUR.js";
105
+ import "../chunk-B3AZPYRU.js";
108
106
  import "../chunk-POFBE6ZY.js";
109
- import "../chunk-WXUEOHYY.js";
107
+ import "../chunk-DK6CMXYI.js";
108
+ import "../chunk-KXKE3SW3.js";
109
+ import "../chunk-SNMTACCY.js";
110
+ import "../chunk-H6CL3T2S.js";
111
+ import "../chunk-Y47BMZUR.js";
110
112
  import "../chunk-VVN3RPV6.js";
111
- import "../chunk-Q2VV77IY.js";
112
- import "../chunk-PHA6AFOR.js";
113
- import "../chunk-WNT4JHK3.js";
113
+ import "../chunk-EHQCMJHI.js";
114
+ import {
115
+ UsageError
116
+ } from "../chunk-YU2EUD7O.js";
114
117
  import {
115
118
  readControlMode,
116
119
  recordMacAppKeyPrefix
@@ -127,23 +130,20 @@ import {
127
130
  pusharyDir,
128
131
  serviceOwedBackMark,
129
132
  vscodePluginDir
130
- } from "../chunk-R7KC57PC.js";
133
+ } from "../chunk-TN5PGMH5.js";
131
134
  import {
132
135
  LATEST_TAG,
133
136
  fetchLatestPublishedVersion
134
- } from "../chunk-GS5FH3C2.js";
137
+ } from "../chunk-FYLYAVQG.js";
135
138
  import {
136
139
  getApiKey
137
140
  } from "../chunk-IKBTG3OT.js";
138
141
  import {
139
- UsageError
140
- } from "../chunk-YU2EUD7O.js";
142
+ EXIT
143
+ } from "../chunk-BG4HHB7E.js";
141
144
  import {
142
145
  writeFileAtomic
143
146
  } from "../chunk-TODDEIYG.js";
144
- import {
145
- EXIT
146
- } from "../chunk-BG4HHB7E.js";
147
147
  import {
148
148
  NPX_LATEST_COMMAND
149
149
  } from "../chunk-MQMVJDII.js";
@@ -5,7 +5,7 @@ import {
5
5
  } from "../chunk-KYD3LHFB.js";
6
6
  import {
7
7
  exitOnFailedSettingsRequest
8
- } from "../chunk-2E46RALI.js";
8
+ } from "../chunk-NIBF37NU.js";
9
9
  import {
10
10
  describeWaitLadder
11
11
  } from "../chunk-CVWG2N3Y.js";
@@ -14,7 +14,7 @@ import {
14
14
  APPROVAL_RULES_PATH,
15
15
  PUSH_WINDOW_COMMAND,
16
16
  PUSH_WINDOW_RESET_COMMAND
17
- } from "../chunk-3QBI5C6P.js";
17
+ } from "../chunk-52B2TQJM.js";
18
18
  import {
19
19
  createIo
20
20
  } from "../chunk-FO3MDD26.js";
@@ -26,27 +26,27 @@ import {
26
26
  } from "../chunk-YPY4YCIZ.js";
27
27
  import {
28
28
  absoluteUrl
29
- } from "../chunk-Q2VV77IY.js";
29
+ } from "../chunk-KXKE3SW3.js";
30
30
  import {
31
31
  pusharyFetch
32
- } from "../chunk-PHA6AFOR.js";
33
- import "../chunk-WNT4JHK3.js";
32
+ } from "../chunk-SNMTACCY.js";
33
+ import "../chunk-EHQCMJHI.js";
34
+ import {
35
+ UsageError,
36
+ exitCodeFor
37
+ } from "../chunk-YU2EUD7O.js";
34
38
  import "../chunk-PNVTPEO5.js";
35
39
  import "../chunk-LNF36PTF.js";
36
- import "../chunk-R7KC57PC.js";
37
- import "../chunk-GS5FH3C2.js";
40
+ import "../chunk-TN5PGMH5.js";
41
+ import "../chunk-FYLYAVQG.js";
38
42
  import {
39
43
  getApiKey,
40
44
  getBaseUrl
41
45
  } from "../chunk-IKBTG3OT.js";
42
- import {
43
- UsageError,
44
- exitCodeFor
45
- } from "../chunk-YU2EUD7O.js";
46
- import "../chunk-TODDEIYG.js";
47
46
  import {
48
47
  EXIT
49
48
  } from "../chunk-BG4HHB7E.js";
49
+ import "../chunk-TODDEIYG.js";
50
50
  import "../chunk-MQMVJDII.js";
51
51
  import "../chunk-WIIMW5YO.js";
52
52
  import "../chunk-DL67HX3D.js";
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  installNetworkDefaults
4
- } from "../chunk-PHA6AFOR.js";
5
- import "../chunk-WNT4JHK3.js";
6
- import "../chunk-R7KC57PC.js";
7
- import "../chunk-GS5FH3C2.js";
8
- import "../chunk-IKBTG3OT.js";
4
+ } from "../chunk-SNMTACCY.js";
5
+ import "../chunk-EHQCMJHI.js";
9
6
  import "../chunk-YU2EUD7O.js";
10
- import "../chunk-TODDEIYG.js";
7
+ import "../chunk-TN5PGMH5.js";
8
+ import "../chunk-FYLYAVQG.js";
9
+ import "../chunk-IKBTG3OT.js";
11
10
  import {
12
11
  EXIT
13
12
  } from "../chunk-BG4HHB7E.js";
13
+ import "../chunk-TODDEIYG.js";
14
14
  import {
15
15
  LISTED_COMMANDS,
16
16
  renderHelp,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-POFBE6ZY.js";
4
4
  import {
5
5
  autoUpdateState
6
- } from "./chunk-R7KC57PC.js";
6
+ } from "./chunk-TN5PGMH5.js";
7
7
  import {
8
8
  readJsonSafe,
9
9
  writeJsonAtomic
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-VBWJ756P.js";
3
+ } from "./chunk-ICQU3SNR.js";
4
4
  import {
5
5
  nativeClaudeInstallPath
6
6
  } from "./chunk-CYTPQDQY.js";
7
7
  import {
8
8
  grokHome
9
- } from "./chunk-43DT3QWZ.js";
9
+ } from "./chunk-APTNHX63.js";
10
10
  import {
11
11
  claudeConfigDir,
12
12
  clineDataDirectory,
13
13
  codexHomeFrom
14
- } from "./chunk-R7KC57PC.js";
14
+ } from "./chunk-TN5PGMH5.js";
15
15
  import {
16
16
  HOOK_COMPATIBLE_PROFILES
17
17
  } from "./chunk-DL67HX3D.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  absoluteUrl
3
- } from "./chunk-Q2VV77IY.js";
3
+ } from "./chunk-KXKE3SW3.js";
4
4
  import {
5
5
  KEY_SCOPE
6
6
  } from "./chunk-DL67HX3D.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-WXUEOHYY.js";
3
+ } from "./chunk-DK6CMXYI.js";
4
4
  import {
5
5
  fetchAsCredential
6
6
  } from "./chunk-VVN3RPV6.js";
@@ -4,16 +4,16 @@ import {
4
4
  } from "./chunk-H6CL3T2S.js";
5
5
  import {
6
6
  getMachineId
7
- } from "./chunk-WNT4JHK3.js";
7
+ } from "./chunk-EHQCMJHI.js";
8
8
  import {
9
9
  readControlMode
10
10
  } from "./chunk-PNVTPEO5.js";
11
11
  import {
12
12
  pusharyDir
13
- } from "./chunk-R7KC57PC.js";
13
+ } from "./chunk-TN5PGMH5.js";
14
14
  import {
15
15
  resolveGlobalBinary
16
- } from "./chunk-GS5FH3C2.js";
16
+ } from "./chunk-FYLYAVQG.js";
17
17
  import {
18
18
  getApiKey
19
19
  } from "./chunk-IKBTG3OT.js";
@@ -75,6 +75,20 @@ var writeDaemonEntryGuard = (input) => {
75
75
  return UNGUARDED;
76
76
  };
77
77
 
78
+ // src/daemon-supervisor.ts
79
+ import { join as join2 } from "path";
80
+ var DAEMON_SUPERVISOR_SCRIPT = "pushary-daemon-supervisor.js";
81
+ var SUPERVISOR_LAUNCH_FLAG = "--launch";
82
+ var DAEMON_LOG_FILE = "daemon.log";
83
+ var DAEMON_ERROR_LOG_FILE = "daemon-error.log";
84
+ var supervisorTaskArguments = (daemonEntry, stateDir) => [daemonEntry, stateDir, SUPERVISOR_LAUNCH_FLAG];
85
+ var parseSupervisorInvocation = (args) => {
86
+ const launching = args.length > 1 && args[args.length - 1] === SUPERVISOR_LAUNCH_FLAG;
87
+ const [daemonEntry, stateDir] = launching ? args.slice(0, -1) : args;
88
+ if (!daemonEntry || daemonEntry === SUPERVISOR_LAUNCH_FLAG) return { kind: "missing-entry" };
89
+ return { kind: launching ? "launch" : "supervise", daemonEntry, stateDir: stateDir || null };
90
+ };
91
+
78
92
  // src/diagnostics/service-runtime.ts
79
93
  var unescapeXml = (value) => value.replaceAll("&quot;", '"').replaceAll("&apos;", "'").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
80
94
  var unquoteSystemdExecutable = (value) => value.replace(/\\(["\\])|%(%)/g, (_match, escaped, percent) => escaped ?? percent ?? "");
@@ -112,7 +126,15 @@ var serviceArguments = (contents, platform) => {
112
126
  if (platform === "win32") return windowsTaskArguments(contents);
113
127
  return [];
114
128
  };
115
- var readServiceDaemonEntry = (contents, platform) => serviceArguments(contents, platform).at(-1) ?? null;
129
+ var namesTheSupervisor = (path) => path.split(/[\\/]/).at(-1) === DAEMON_SUPERVISOR_SCRIPT;
130
+ var windowsTaskDaemonEntry = (contents) => {
131
+ const [program, ...supervisorArguments] = windowsTaskArguments(contents);
132
+ if (program === void 0) return null;
133
+ if (!namesTheSupervisor(program)) return program;
134
+ const invocation = parseSupervisorInvocation(supervisorArguments);
135
+ return invocation.kind === "missing-entry" ? null : invocation.daemonEntry;
136
+ };
137
+ var readServiceDaemonEntry = (contents, platform) => platform === "win32" ? windowsTaskDaemonEntry(contents) : serviceArguments(contents, platform).at(-1) ?? null;
116
138
  var readServiceEntryGuard = (contents, platform) => {
117
139
  if (platform !== "darwin") return null;
118
140
  const [, flag, guard] = readLaunchdProgramArguments(contents);
@@ -162,7 +184,7 @@ var describeVersionManagerPin = (execPath, manager) => `The background service i
162
184
  var describeServiceNodeRisk = (manager) => manager === "homebrew" ? "a Homebrew version folder; brew upgrade strands the service, and `pushary daemon install` repins it to the stable link" : `managed by ${manager}; a version switch strands the service`;
163
185
 
164
186
  // src/daemon-lifecycle.ts
165
- import { dirname as dirname2, join as join2, win32 as win32Path } from "path";
187
+ import { dirname as dirname2, join as join3, win32 as win32Path } from "path";
166
188
  import { existsSync, mkdirSync as mkdirSync2, readFileSync as readFileSync2, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
167
189
  import { createHash, randomUUID } from "crypto";
168
190
  import { homedir, uptime, userInfo } from "os";
@@ -232,9 +254,9 @@ var daemonServiceManagerAvailable = (options = {}) => {
232
254
  }
233
255
  };
234
256
  var DAEMON_STATE_FILE = "daemon-state.json";
235
- var statePath = (dir) => join2(dir, DAEMON_STATE_FILE);
236
- var lockPath = (dir) => join2(dir, "daemon.lock");
237
- var targetPath = (dir) => join2(dir, "daemon-target.json");
257
+ var statePath = (dir) => join3(dir, DAEMON_STATE_FILE);
258
+ var lockPath = (dir) => join3(dir, "daemon.lock");
259
+ var targetPath = (dir) => join3(dir, "daemon-target.json");
238
260
  var DAEMON_LEASE_RENEW_INTERVAL_MS = 3e4;
239
261
  var LOCAL_LEASE_TIMEOUT_MS = DAEMON_LEASE_RENEW_INTERVAL_MS * 3;
240
262
  var DAEMON_YIELD_CHECK_INTERVAL_MS = 2e3;
@@ -244,6 +266,24 @@ var buildDaemonLaunch = (input) => input.siblingEntry ? { command: input.execPat
244
266
  shell: needsShell(input.daemonBinary, input.platform ?? process.platform)
245
267
  };
246
268
  var xml = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&apos;");
269
+ var WINDOWS_TASK_NAME = "Pushary Daemon";
270
+ var POWERSHELL_SINGLE_QUOTES = /['\u2018\u2019\u201A\u201B]/g;
271
+ var powershellLiteral = (value) => `'${value.replace(POWERSHELL_SINGLE_QUOTES, (quote) => quote + quote)}'`;
272
+ var WQL_LIKE_SPECIALS = /[[%_]/g;
273
+ var wqlLikeLiteral = (value) => value.replace(WQL_LIKE_SPECIALS, (special) => `[${special}]`);
274
+ var WINDOWS_TASK_LOOKUP = `$task = @(Get-ScheduledTask -ErrorAction Stop) | Where-Object { $_.TaskName -eq ${powershellLiteral(WINDOWS_TASK_NAME)} -and $_.TaskPath -eq '\\' } | Select-Object -First 1; if ($null -eq $task) { exit 3 }`;
275
+ var POWERSHELL_HOSTS = ["powershell.exe", "pwsh.exe"];
276
+ var withoutTrailingSeparators = (path) => path.replace(/[\\/]+$/, "");
277
+ var POWERSHELL_STOP_ON_ERROR = "$ErrorActionPreference = 'Stop'";
278
+ var powershellCommandLineContains = (text) => `$_.CommandLine.ToUpperInvariant().Contains(${powershellLiteral(text)}.ToUpperInvariant())`;
279
+ var powershellCommandLineEndsWithLaunchFlag = `$_.CommandLine.TrimEnd().TrimEnd([char]34).EndsWith(${powershellLiteral(SUPERVISOR_LAUNCH_FLAG)})`;
280
+ var windowsSupervisorProcesses = (stateDir) => [
281
+ `@(Get-CimInstance -ClassName Win32_Process -Filter ${powershellLiteral(`CommandLine LIKE '%${wqlLikeLiteral(DAEMON_SUPERVISOR_SCRIPT)}%'`)}`,
282
+ `| Where-Object { $_.ProcessId -ne $PID -and ${POWERSHELL_HOSTS.map((host) => `$_.Name -ne ${powershellLiteral(host)}`).join(" -and ")}`,
283
+ `-and $null -ne $_.CommandLine -and ${powershellCommandLineContains(withoutTrailingSeparators(stateDir))} })`
284
+ ].join(" ");
285
+ var windowsRunningSupervisors = (stateDir) => `@(${windowsSupervisorProcesses(stateDir)} | Where-Object { -not (${powershellCommandLineEndsWithLaunchFlag}) })`;
286
+ var taskArgument = (value) => `&quot;${xml(value)}&quot;`;
247
287
  var systemdQuotedEnvironment = (value) => `"${value.replaceAll("%", "%%").replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
248
288
  var escapeSystemdSpecifiers = (value) => value.replaceAll("%", "%%");
249
289
  var systemdQuotedWord = (escaped) => `"${escaped.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
@@ -261,7 +301,7 @@ var buildDaemonService = (input) => {
261
301
  const label = "com.pushary.daemon";
262
302
  const domain = `gui/${input.uid}`;
263
303
  const target = `${domain}/${label}`;
264
- const definitionPath = join2(input.homeDir, "Library", "LaunchAgents", `${label}.plist`);
304
+ const definitionPath = join3(input.homeDir, "Library", "LaunchAgents", `${label}.plist`);
265
305
  const contents = `<?xml version="1.0" encoding="UTF-8"?>
266
306
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
267
307
  <plist version="1.0">
@@ -274,8 +314,8 @@ var buildDaemonService = (input) => {
274
314
  <key>RunAtLoad</key><true/>
275
315
  <key>KeepAlive</key><dict><key>SuccessfulExit</key><false/></dict>
276
316
  <key>ThrottleInterval</key><integer>10</integer>
277
- <key>StandardOutPath</key><string>${xml(join2(input.stateDir, "daemon.log"))}</string>
278
- <key>StandardErrorPath</key><string>${xml(join2(input.stateDir, "daemon-error.log"))}</string>
317
+ <key>StandardOutPath</key><string>${xml(join3(input.stateDir, DAEMON_LOG_FILE))}</string>
318
+ <key>StandardErrorPath</key><string>${xml(join3(input.stateDir, DAEMON_ERROR_LOG_FILE))}</string>
279
319
  </dict>
280
320
  </plist>
281
321
  `;
@@ -316,7 +356,7 @@ var buildDaemonService = (input) => {
316
356
  }
317
357
  if (input.platform === "linux") {
318
358
  const unit = "pushary-daemon.service";
319
- const definitionPath = join2(input.homeDir, ".config", "systemd", "user", unit);
359
+ const definitionPath = join3(input.homeDir, ".config", "systemd", "user", unit);
320
360
  const contents = `[Unit]
321
361
  Description=Pushary phone-to-agent daemon
322
362
  After=network-online.target
@@ -363,14 +403,14 @@ WantedBy=default.target
363
403
  };
364
404
  }
365
405
  if (input.platform === "win32") {
366
- const taskName = "Pushary Daemon";
406
+ const taskName = WINDOWS_TASK_NAME;
367
407
  const username = process.env.USERNAME?.trim() || userInfo().username;
368
408
  const domain = process.env.USERDOMAIN?.trim();
369
409
  const userId = input.userId?.trim() || (domain ? `${domain}\\${username}` : username);
370
410
  const definitionPath = win32Path.join(input.stateDir, "pushary-daemon-task.xml");
371
- const supervisorPath = win32Path.join(win32Path.dirname(input.daemonEntry), "pushary-daemon-supervisor.js");
411
+ const supervisorPath = win32Path.join(win32Path.dirname(input.daemonEntry), DAEMON_SUPERVISOR_SCRIPT);
372
412
  const supervised = (input.entryExists ?? existsSync)(supervisorPath);
373
- const args = supervised ? `&quot;${xml(supervisorPath)}&quot; &quot;${xml(input.daemonEntry)}&quot;` : `&quot;${xml(input.daemonEntry)}&quot;`;
413
+ const args = supervised ? [supervisorPath, ...supervisorTaskArguments(input.daemonEntry, withoutTrailingSeparators(input.stateDir))].map(taskArgument).join(" ") : taskArgument(input.daemonEntry);
374
414
  const contents = `\uFEFF<?xml version="1.0" encoding="UTF-16"?>
375
415
  <Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
376
416
  <RegistrationInfo><Description>Pushary phone-to-agent daemon</Description></RegistrationInfo>
@@ -393,16 +433,30 @@ WantedBy=default.target
393
433
  </Actions>
394
434
  </Task>
395
435
  `;
436
+ const stopTaskAndSupervisors = [
437
+ { command: "schtasks.exe", args: ["/End", "/TN", taskName], ignoreFailure: true },
438
+ {
439
+ command: "powershell.exe",
440
+ args: [
441
+ "-NoProfile",
442
+ "-NonInteractive",
443
+ "-Command",
444
+ `${POWERSHELL_STOP_ON_ERROR}; ${windowsSupervisorProcesses(input.stateDir)} | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }`
445
+ ],
446
+ ignoreFailure: true
447
+ }
448
+ ];
396
449
  return {
397
450
  definitionPath,
398
451
  contents,
399
452
  encoding: "utf16le",
400
453
  install: [
454
+ ...stopTaskAndSupervisors,
401
455
  { command: "schtasks.exe", args: ["/Create", "/TN", taskName, "/XML", definitionPath, "/F"] },
402
456
  { command: "schtasks.exe", args: ["/Run", "/TN", taskName] }
403
457
  ],
404
458
  start: [{ command: "schtasks.exe", args: ["/Run", "/TN", taskName] }],
405
- stop: [{ command: "schtasks.exe", args: ["/End", "/TN", taskName], ignoreFailure: true }],
459
+ stop: stopTaskAndSupervisors,
406
460
  disable: [{ command: "schtasks.exe", args: ["/Change", "/TN", taskName, "/Disable"] }],
407
461
  uninstall: [{ command: "schtasks.exe", args: ["/Delete", "/TN", taskName, "/F"], ignoreFailure: true }],
408
462
  platform: input.platform,
@@ -413,7 +467,7 @@ WantedBy=default.target
413
467
  "-NoProfile",
414
468
  "-NonInteractive",
415
469
  "-Command",
416
- "$task = @(Get-ScheduledTask -ErrorAction Stop) | Where-Object { $_.TaskName -eq 'Pushary Daemon' -and $_.TaskPath -eq '\\' } | Select-Object -First 1; if ($null -eq $task) { exit 3 }"
470
+ WINDOWS_TASK_LOOKUP
417
471
  ],
418
472
  negativeExitCodes: [3]
419
473
  },
@@ -423,7 +477,7 @@ WantedBy=default.target
423
477
  "-NoProfile",
424
478
  "-NonInteractive",
425
479
  "-Command",
426
- "$task = @(Get-ScheduledTask -ErrorAction Stop) | Where-Object { $_.TaskName -eq 'Pushary Daemon' -and $_.TaskPath -eq '\\' } | Select-Object -First 1; if ($null -eq $task) { exit 3 }; if ($null -eq $task.Settings -or $null -eq $task.Settings.Enabled) { exit 5 }; if (-not $task.Settings.Enabled) { exit 4 }"
480
+ `${WINDOWS_TASK_LOOKUP}; if ($null -eq $task.Settings -or $null -eq $task.Settings.Enabled) { exit 5 }; if (-not $task.Settings.Enabled) { exit 4 }`
427
481
  ],
428
482
  negativeExitCodes: [3, 4]
429
483
  },
@@ -433,7 +487,7 @@ WantedBy=default.target
433
487
  "-NoProfile",
434
488
  "-NonInteractive",
435
489
  "-Command",
436
- "$task = @(Get-ScheduledTask -ErrorAction Stop) | Where-Object { $_.TaskName -eq 'Pushary Daemon' -and $_.TaskPath -eq '\\' } | Select-Object -First 1; if ($null -eq $task) { exit 3 }; if ($task.State -ne 'Running') { exit 4 }"
490
+ `${POWERSHELL_STOP_ON_ERROR}; if (${windowsRunningSupervisors(input.stateDir)}.Count -gt 0) { exit 0 }; ${WINDOWS_TASK_LOOKUP}; if ($task.State -ne 'Running') { exit 4 }`
437
491
  ],
438
492
  negativeExitCodes: [3, 4]
439
493
  }
@@ -779,7 +833,7 @@ var acquireDaemonLease = (options = {}) => {
779
833
  if (owner && ownerIsFromThisBoot && (options.isProcessAlive ?? processIsAlive)(owner.pid)) {
780
834
  return { kind: "unavailable", detail: "daemon owner is still running or starting" };
781
835
  }
782
- const stale = join2(dir, `daemon.lock.${instanceId}.stale`);
836
+ const stale = join3(dir, `daemon.lock.${instanceId}.stale`);
783
837
  let ownsReplacement = false;
784
838
  try {
785
839
  renameSync(lockPath(dir), stale);
@@ -932,7 +986,7 @@ var writeEntryGuardForService = (input, options) => writeDaemonEntryGuard({
932
986
  })
933
987
  });
934
988
  var DAEMON_LOGIN_REASONS = ["key_rejected", "plan_inactive", "key_missing", "mac_signed_out"];
935
- var needsLoginPath = (dir) => join2(dir, "daemon-needs-login.json");
989
+ var needsLoginPath = (dir) => join3(dir, "daemon-needs-login.json");
936
990
  var isLoginReason = (value) => DAEMON_LOGIN_REASONS.includes(value);
937
991
  var parseDaemonNeedsLogin = (value) => {
938
992
  if (typeof value !== "object" || value === null) return null;
@@ -972,7 +1026,7 @@ var DAEMON_LOGIN_BLOCK_DESCRIPTIONS = {
972
1026
  var describeDaemonLoginBlock = (record) => DAEMON_LOGIN_BLOCK_DESCRIPTIONS[record.reason](record.at);
973
1027
  var recoverDaemonAfterLogin = (options = {}) => {
974
1028
  const cleared = clearDaemonNeedsLogin(options);
975
- if (!cleared || readControlMode(join2(options.dir ?? pusharyDir(), "config.json")) === "off" || !hasDaemonServiceDefinition(options)) {
1029
+ if (!cleared || readControlMode(join3(options.dir ?? pusharyDir(), "config.json")) === "off" || !hasDaemonServiceDefinition(options)) {
976
1030
  return { cleared, restarted: false, detail: null };
977
1031
  }
978
1032
  const started = manageDaemonService("start", options);
@@ -1162,7 +1216,7 @@ var replaceDaemonService = async (options = {}) => {
1162
1216
  };
1163
1217
  }
1164
1218
  const run = options.run ?? runDaemonServiceCommand;
1165
- const transactionPath = join2(options.stateDir ?? options.dir ?? pusharyDir(), "daemon-service-transaction.json");
1219
+ const transactionPath = join3(options.stateDir ?? options.dir ?? pusharyDir(), "daemon-service-transaction.json");
1166
1220
  const recovered = recoverDaemonServiceTransaction(unguarded, transactionPath, run);
1167
1221
  if (recovered.kind !== "ok") {
1168
1222
  return { kind: "failed", detail: `Could not recover interrupted service replacement: ${recovered.detail}` };
@@ -1273,7 +1327,7 @@ var replaceDaemonService = async (options = {}) => {
1273
1327
  var launchInstalledDaemon = (options) => {
1274
1328
  const entryExists = options.entryExists ?? existsSync;
1275
1329
  const argvEntry = process.argv[1];
1276
- const candidate = options.daemonEntry !== void 0 ? options.daemonEntry : argvEntry ? join2(dirname2(argvEntry), "pushary-daemon.js") : null;
1330
+ const candidate = options.daemonEntry !== void 0 ? options.daemonEntry : argvEntry ? join3(dirname2(argvEntry), "pushary-daemon.js") : null;
1277
1331
  const siblingEntry = candidate && entryExists(candidate) ? candidate : null;
1278
1332
  const platform = options.platform ?? process.platform;
1279
1333
  const daemonBinary = options.daemonBinary ?? resolveGlobalBinary("pushary-daemon") ?? (platform === "win32" ? "pushary-daemon.cmd" : "pushary-daemon");