pushary 1.9.133 → 1.9.135

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 (133) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{api-7CZR7B53.js → api-WEDLFKUE.js} +11 -11
  3. package/dist/bin/pushary-audit.js +3 -3
  4. package/dist/bin/pushary-bell-hook.js +28 -27
  5. package/dist/bin/pushary-bell.js +10 -10
  6. package/dist/bin/pushary-claude.js +47 -33
  7. package/dist/bin/pushary-clean.js +35 -34
  8. package/dist/bin/pushary-codex-bridge.js +23 -22
  9. package/dist/bin/pushary-codex-hook.js +35 -34
  10. package/dist/bin/pushary-codex-session.js +8 -8
  11. package/dist/bin/pushary-codex.js +16 -15
  12. package/dist/bin/pushary-connect.js +29 -28
  13. package/dist/bin/pushary-cowork.js +5 -5
  14. package/dist/bin/pushary-daemon.js +85 -59
  15. package/dist/bin/pushary-disconnect.js +28 -27
  16. package/dist/bin/pushary-display-hook.js +23 -10
  17. package/dist/bin/pushary-doctor.js +50 -42
  18. package/dist/bin/pushary-elicitation-hook.js +28 -27
  19. package/dist/bin/pushary-gemini-bridge.js +20 -17
  20. package/dist/bin/pushary-gemini-hook.js +32 -31
  21. package/dist/bin/pushary-hook.js +34 -33
  22. package/dist/bin/pushary-login.js +21 -21
  23. package/dist/bin/pushary-logout.js +27 -26
  24. package/dist/bin/pushary-mcp.js +12 -12
  25. package/dist/bin/pushary-mode.js +15 -15
  26. package/dist/bin/pushary-notification-hook.js +27 -26
  27. package/dist/bin/pushary-opencode-hook.js +31 -30
  28. package/dist/bin/pushary-permission-denied-hook.js +34 -33
  29. package/dist/bin/pushary-permission-hook.js +34 -33
  30. package/dist/bin/pushary-post-hook.js +27 -26
  31. package/dist/bin/pushary-prompt-hook.js +27 -26
  32. package/dist/bin/pushary-session-end-hook.js +27 -26
  33. package/dist/bin/pushary-session-start-hook.js +36 -35
  34. package/dist/bin/pushary-setup.js +64 -49
  35. package/dist/bin/pushary-stats.js +5 -5
  36. package/dist/bin/pushary-status.js +33 -32
  37. package/dist/bin/pushary-stop-hook.js +27 -26
  38. package/dist/bin/pushary-stopfailure-hook.js +27 -26
  39. package/dist/bin/pushary-suggestions.js +15 -15
  40. package/dist/bin/pushary-transcript-register.js +17 -17
  41. package/dist/bin/pushary-transcripts.js +25 -25
  42. package/dist/bin/pushary-upgrade.js +47 -40
  43. package/dist/bin/pushary-wait.js +15 -15
  44. package/dist/bin/pushary.js +7 -7
  45. package/dist/{chunk-42PVKPHM.js → chunk-2K7MZRPH.js} +1 -1
  46. package/dist/{chunk-XMZVQF2J.js → chunk-35RCY4LB.js} +1 -1
  47. package/dist/{chunk-QVIDOVT6.js → chunk-3KPPXZCO.js} +15 -15
  48. package/dist/{chunk-KWICQAP7.js → chunk-4PPSXQQ6.js} +3 -3
  49. package/dist/{chunk-4EQOCSJW.js → chunk-4VVDRMVE.js} +1 -1
  50. package/dist/{chunk-HOPJEPL4.js → chunk-4XTB74D3.js} +4 -4
  51. package/dist/{chunk-ZXJTTV7I.js → chunk-4YBDKFU2.js} +2 -2
  52. package/dist/{chunk-VO55SJSD.js → chunk-5GQLZ46V.js} +11 -8
  53. package/dist/{chunk-EA5EASYT.js → chunk-64QLX4ZC.js} +1 -1
  54. package/dist/{chunk-I6MI4NWX.js → chunk-65ZWYA5L.js} +10 -10
  55. package/dist/{chunk-N5P2FLOJ.js → chunk-6QZGKKQS.js} +20 -5
  56. package/dist/{chunk-X23GSBOH.js → chunk-6RSAOA2P.js} +3 -3
  57. package/dist/{chunk-V2T5ZDMP.js → chunk-6UARD3WA.js} +3 -3
  58. package/dist/{chunk-RZBV5KTF.js → chunk-7ASHS5VR.js} +5 -5
  59. package/dist/{chunk-HW63OEVM.js → chunk-7DWERNHQ.js} +3 -3
  60. package/dist/{chunk-UDAXXR43.js → chunk-7GEMAKQL.js} +5 -5
  61. package/dist/{chunk-XWUPOTJV.js → chunk-7JXYR4TC.js} +5 -5
  62. package/dist/{chunk-2U4MCUVZ.js → chunk-7KWOR2T2.js} +1 -1
  63. package/dist/{chunk-A44MRVWG.js → chunk-ACI4PZ5N.js} +3 -3
  64. package/dist/{chunk-LBMCQWRX.js → chunk-AEOITMCS.js} +4 -4
  65. package/dist/chunk-AIZYJJGD.js +95 -0
  66. package/dist/{chunk-MF5ZQX7C.js → chunk-AXQFLLOB.js} +4 -4
  67. package/dist/{chunk-SZYKS433.js → chunk-BGXXWLS5.js} +1 -1
  68. package/dist/{chunk-NSBWFX7H.js → chunk-CGROOSWT.js} +5 -5
  69. package/dist/{chunk-RGVQOOGD.js → chunk-DMK3U7GG.js} +1 -1
  70. package/dist/{chunk-GQPXW6BL.js → chunk-E4RMOK4A.js} +1 -1
  71. package/dist/{chunk-EPPH5RMJ.js → chunk-EWJXECUK.js} +4 -4
  72. package/dist/{chunk-T6HX6OTY.js → chunk-FP6ZVMF2.js} +1 -1
  73. package/dist/{chunk-YI6RR4JP.js → chunk-FSLV5FIE.js} +4 -4
  74. package/dist/{chunk-PPUIIP3O.js → chunk-G3YIGTFS.js} +11 -11
  75. package/dist/{chunk-FTH4TSJ2.js → chunk-GLAGHQPB.js} +4 -4
  76. package/dist/{chunk-NYFUU23B.js → chunk-GRCX2FGD.js} +1 -1
  77. package/dist/{chunk-M65LPNIO.js → chunk-H4226UC7.js} +21 -1
  78. package/dist/{chunk-BKH4LQJC.js → chunk-IABPEGAA.js} +2 -2
  79. package/dist/{chunk-MJVDFNP2.js → chunk-IOUCIJ56.js} +1 -1
  80. package/dist/{chunk-KIWFCW7M.js → chunk-JDAX2HVS.js} +2 -2
  81. package/dist/{chunk-FJST6ZXC.js → chunk-KUAS2DGZ.js} +5 -5
  82. package/dist/{chunk-ZJPBTJED.js → chunk-LIXCHEDJ.js} +6 -6
  83. package/dist/{chunk-CVBSETPW.js → chunk-LTY5DSWT.js} +3 -3
  84. package/dist/{chunk-7MIT5C7B.js → chunk-MGTMXF3T.js} +3 -3
  85. package/dist/{chunk-PHKCTMAV.js → chunk-MYMADZRU.js} +2 -2
  86. package/dist/{chunk-QBJVECFY.js → chunk-N2DYYXQI.js} +2 -2
  87. package/dist/{chunk-2YS7YEUW.js → chunk-NBMK6T6R.js} +2 -2
  88. package/dist/{chunk-C4UH6YPD.js → chunk-NWNUS2ET.js} +4 -4
  89. package/dist/{chunk-3PGANQ4K.js → chunk-OEIU6BNH.js} +6 -6
  90. package/dist/{chunk-237FYIVC.js → chunk-ORZ7H3AQ.js} +4 -4
  91. package/dist/{chunk-FT5MTCKU.js → chunk-OUMH4UTT.js} +2 -2
  92. package/dist/{chunk-WZ4SIRMH.js → chunk-Q5GPXYDG.js} +1 -1
  93. package/dist/{chunk-D2KJKAYM.js → chunk-QLIG4PMT.js} +4 -4
  94. package/dist/{chunk-RVGYXUOC.js → chunk-QUMPSMZN.js} +3 -3
  95. package/dist/{chunk-3DCCMO23.js → chunk-RCZ5ZER4.js} +6 -6
  96. package/dist/{chunk-MRHGK3Q3.js → chunk-RGRPDJG3.js} +42 -25
  97. package/dist/{chunk-DS7XMYUB.js → chunk-RLNJNRYP.js} +1 -1
  98. package/dist/{chunk-LR3PIGRS.js → chunk-SFN72Q7W.js} +3 -3
  99. package/dist/{chunk-UJZ5YHSR.js → chunk-SULQKUPJ.js} +2 -2
  100. package/dist/{chunk-6JY44IZI.js → chunk-TKOALSA5.js} +8 -8
  101. package/dist/{chunk-YNV5GURD.js → chunk-U5W3MKPU.js} +5 -5
  102. package/dist/{chunk-PG23ENSN.js → chunk-UCDPJHZT.js} +2 -2
  103. package/dist/{chunk-VME5NXCM.js → chunk-UCGWTMQD.js} +3 -3
  104. package/dist/{chunk-UZUDMZES.js → chunk-UDSJKRRI.js} +2 -2
  105. package/dist/{chunk-25UU4Q4V.js → chunk-UQCVVN7K.js} +1 -1
  106. package/dist/{chunk-JYCAAQUW.js → chunk-UXPRMNH2.js} +1 -1
  107. package/dist/{chunk-3TKTZOKG.js → chunk-V7KBG7XH.js} +3 -3
  108. package/dist/{chunk-RLQDVWZ4.js → chunk-VCMJLNEP.js} +2 -2
  109. package/dist/{chunk-GKZMBU6T.js → chunk-VND6LN6X.js} +2 -2
  110. package/dist/{chunk-VRUEKURE.js → chunk-VXYGYCNR.js} +1 -1
  111. package/dist/{chunk-PFHRW3LR.js → chunk-WNPZGHHU.js} +3 -3
  112. package/dist/{chunk-IZJDVOJV.js → chunk-WPPTHRBO.js} +5 -5
  113. package/dist/{chunk-75FJZR2M.js → chunk-WTLQMJZ3.js} +3 -3
  114. package/dist/{chunk-XHC3UNOK.js → chunk-WVOMK2HW.js} +1 -1
  115. package/dist/{chunk-L5RSLIBQ.js → chunk-X3NYMHLG.js} +6 -6
  116. package/dist/chunk-XB75IJ3G.js +36 -0
  117. package/dist/{chunk-J4UNR655.js → chunk-XRO6NRBO.js} +6 -6
  118. package/dist/{chunk-W4FJR57E.js → chunk-ZJKWDM3S.js} +2 -2
  119. package/dist/{chunk-2KN53MPE.js → chunk-ZNST34QH.js} +5 -5
  120. package/dist/{codex-app-cards-switch-D2SODMQN.js → codex-app-cards-switch-C6DXLVAM.js} +11 -11
  121. package/dist/{codex-card-routing-X2HUY2AV.js → codex-card-routing-ZMMS4RIR.js} +2 -2
  122. package/dist/{codex-desktop-launch-CFKIJZVB.js → codex-desktop-launch-DIUFMA45.js} +1 -1
  123. package/dist/{codex-session-launch-YGH5UUAH.js → codex-session-launch-S4WTGKRY.js} +20 -19
  124. package/dist/{config-5SNDVPS2.js → config-BV5FQ536.js} +3 -3
  125. package/dist/{global-upgrade-U4V7KWH6.js → global-upgrade-JZWB67EU.js} +9 -9
  126. package/dist/{identity-DCRNA3J3.js → identity-G6FQTONT.js} +4 -4
  127. package/dist/{live-capabilities-H7J5ANZ3.js → live-capabilities-YHMOXY5E.js} +4 -4
  128. package/dist/{paths-3DUQGU4V.js → paths-XTEJ5LI2.js} +3 -3
  129. package/dist/{reapply-LNVBPUWL.js → reapply-MVZKPXIQ.js} +29 -28
  130. package/dist/src/index.js +33 -32
  131. package/dist/{upgrade-lock-3T7JLBHT.js → upgrade-lock-YPAQEEJA.js} +4 -4
  132. package/dist/{usage-XLJK7OTL.js → usage-R6PZTIEH.js} +3 -3
  133. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_SESSION
3
- } from "./chunk-MRHGK3Q3.js";
3
+ } from "./chunk-RGRPDJG3.js";
4
4
 
5
5
  // src/answer.ts
6
6
  var isDeferAnswer = (value) => value === "defer";
@@ -8,13 +8,13 @@ import {
8
8
  } from "./chunk-G66WIAST.js";
9
9
  import {
10
10
  ensureDaemonRunning
11
- } from "./chunk-3DCCMO23.js";
11
+ } from "./chunk-RCZ5ZER4.js";
12
12
  import {
13
13
  hookOwnerOf
14
- } from "./chunk-237FYIVC.js";
14
+ } from "./chunk-ORZ7H3AQ.js";
15
15
  import {
16
16
  hookMeaning
17
- } from "./chunk-JYCAAQUW.js";
17
+ } from "./chunk-UXPRMNH2.js";
18
18
  import {
19
19
  buildTranscriptRecords,
20
20
  decodePublicKey,
@@ -25,29 +25,29 @@ import {
25
25
  recordSealerFor,
26
26
  uploadTranscriptRecords,
27
27
  wrapSessionKey
28
- } from "./chunk-KWICQAP7.js";
28
+ } from "./chunk-4PPSXQQ6.js";
29
29
  import {
30
30
  external_exports
31
31
  } from "./chunk-XMSDA5WA.js";
32
32
  import {
33
33
  transcriptEnvironmentPreference,
34
34
  transcriptsEnabled
35
- } from "./chunk-25UU4Q4V.js";
35
+ } from "./chunk-UQCVVN7K.js";
36
36
  import {
37
37
  fetchAsCredential
38
- } from "./chunk-42PVKPHM.js";
38
+ } from "./chunk-2K7MZRPH.js";
39
39
  import {
40
40
  readTranscriptPreference
41
- } from "./chunk-CVBSETPW.js";
41
+ } from "./chunk-LTY5DSWT.js";
42
42
  import {
43
43
  claudeConfigDir,
44
44
  codexHome,
45
45
  pusharyDir
46
- } from "./chunk-W4FJR57E.js";
46
+ } from "./chunk-ZJKWDM3S.js";
47
47
  import {
48
48
  getApiKey,
49
49
  getBaseUrl
50
- } from "./chunk-T6HX6OTY.js";
50
+ } from "./chunk-FP6ZVMF2.js";
51
51
  import {
52
52
  writeJsonAtomic,
53
53
  writeJsonAtomicDurable
@@ -59,7 +59,7 @@ import {
59
59
  isHookSource,
60
60
  isRecord,
61
61
  redactSecretsFromContent
62
- } from "./chunk-M65LPNIO.js";
62
+ } from "./chunk-H4226UC7.js";
63
63
 
64
64
  // src/transcript-recipient-pin.ts
65
65
  import { createHash } from "crypto";
@@ -1,6 +1,10 @@
1
1
  import {
2
2
  external_exports
3
3
  } from "./chunk-XMSDA5WA.js";
4
+ import {
5
+ RETRY_ACK,
6
+ refusedReceiptMessage
7
+ } from "./chunk-XB75IJ3G.js";
4
8
 
5
9
  // src/command-receipts.ts
6
10
  import { randomUUID } from "crypto";
@@ -16,8 +20,10 @@ var CommandReceipts = class {
16
20
  this.options = options;
17
21
  }
18
22
  pending = /* @__PURE__ */ new Map();
23
+ refused = /* @__PURE__ */ new Set();
19
24
  flushing;
20
25
  async receive(command, acknowledge) {
26
+ if (this.refused.has(command.id)) return;
21
27
  if (this.pending.has(command.id)) {
22
28
  await this.flush();
23
29
  return;
@@ -34,8 +40,9 @@ var CommandReceipts = class {
34
40
  await this.flush();
35
41
  return;
36
42
  }
37
- const dispatched = await acknowledge("dispatching", receipt.dispatchId).catch(() => false);
38
- if (!dispatched) {
43
+ const dispatched = await acknowledge("dispatching", receipt.dispatchId).catch(() => RETRY_ACK);
44
+ if (dispatched.outcome !== "settled") {
45
+ if (dispatched.outcome === "refused") this.refused.add(command.id);
39
46
  this.pending.delete(command.id);
40
47
  return;
41
48
  }
@@ -66,9 +73,17 @@ var CommandReceipts = class {
66
73
  if (receipt.state === "dispatching") continue;
67
74
  const state = receipt.state;
68
75
  try {
69
- const confirmed = await receipt.acknowledge(state, receipt.dispatchId);
70
- if (confirmed && receipt.state === state) this.pending.delete(id);
71
- if (!confirmed) this.options.log("[pushary] receipt not confirmed; retrying on reconnect");
76
+ const ack = await receipt.acknowledge(state, receipt.dispatchId);
77
+ if (ack.outcome === "retry") {
78
+ this.options.log("[pushary] receipt not confirmed; retrying on reconnect");
79
+ continue;
80
+ }
81
+ if (receipt.state !== state) continue;
82
+ this.pending.delete(id);
83
+ if (ack.outcome === "refused") {
84
+ this.refused.add(id);
85
+ this.options.log(refusedReceiptMessage(id, ack.status));
86
+ }
72
87
  } catch {
73
88
  this.options.log("[pushary] receipt could not be confirmed; retrying on reconnect");
74
89
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  realpath
3
- } from "./chunk-UJZ5YHSR.js";
3
+ } from "./chunk-SULQKUPJ.js";
4
4
  import {
5
5
  findNativeClaudeInstall
6
6
  } from "./chunk-CYTPQDQY.js";
@@ -13,10 +13,10 @@ import {
13
13
  resolvePackageVersionFromBinary,
14
14
  resolvePathBinary,
15
15
  resolvePathBinaryAsync
16
- } from "./chunk-A44MRVWG.js";
16
+ } from "./chunk-ACI4PZ5N.js";
17
17
  import {
18
18
  MANAGED_PROVIDERS
19
- } from "./chunk-M65LPNIO.js";
19
+ } from "./chunk-H4226UC7.js";
20
20
 
21
21
  // src/live-capabilities.ts
22
22
  import { homedir } from "os";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  readExistingMachineId
3
- } from "./chunk-DS7XMYUB.js";
3
+ } from "./chunk-RLNJNRYP.js";
4
4
  import {
5
5
  getBaseUrl
6
- } from "./chunk-T6HX6OTY.js";
6
+ } from "./chunk-FP6ZVMF2.js";
7
7
  import {
8
8
  NetworkError
9
9
  } from "./chunk-YU2EUD7O.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  clientContextHeaders,
15
15
  redactSecretsFromContent
16
- } from "./chunk-M65LPNIO.js";
16
+ } from "./chunk-H4226UC7.js";
17
17
 
18
18
  // src/cli/net.ts
19
19
  import { createRequire } from "module";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  addGeminiMcpServer,
3
3
  removeGeminiMcpServer
4
- } from "./chunk-237FYIVC.js";
4
+ } from "./chunk-ORZ7H3AQ.js";
5
5
  import {
6
6
  CLAUDE_CODE_AGENT
7
- } from "./chunk-MRHGK3Q3.js";
7
+ } from "./chunk-RGRPDJG3.js";
8
8
  import {
9
9
  compatibleToolLookup
10
- } from "./chunk-JYCAAQUW.js";
10
+ } from "./chunk-UXPRMNH2.js";
11
11
  import {
12
12
  CLAUDE_HOOK_EVENTS,
13
13
  PUSHARY_MCP_URL,
@@ -19,7 +19,7 @@ import {
19
19
  isPusharyHook,
20
20
  registerHookEntry,
21
21
  removeClaudeMcpServers
22
- } from "./chunk-W4FJR57E.js";
22
+ } from "./chunk-ZJKWDM3S.js";
23
23
  import {
24
24
  HOOK_COMPATIBLE_PROFILES,
25
25
  PHONE_ANSWERED_TOOLS,
@@ -30,7 +30,7 @@ import {
30
30
  pusharyMissingReason,
31
31
  refusalOutput,
32
32
  withHookHoldBudget
33
- } from "./chunk-M65LPNIO.js";
33
+ } from "./chunk-H4226UC7.js";
34
34
 
35
35
  // src/config-document.ts
36
36
  import { parse, stringify } from "smol-toml";
@@ -4,15 +4,15 @@ import {
4
4
  claimThrottle,
5
5
  releaseThrottle,
6
6
  reportEvent
7
- } from "./chunk-MRHGK3Q3.js";
7
+ } from "./chunk-RGRPDJG3.js";
8
8
  import {
9
9
  deriveToolTarget,
10
10
  permissionDeniedAction
11
- } from "./chunk-JYCAAQUW.js";
11
+ } from "./chunk-UXPRMNH2.js";
12
12
  import {
13
13
  machineDecisionFor,
14
14
  wireVerdictFor
15
- } from "./chunk-M65LPNIO.js";
15
+ } from "./chunk-H4226UC7.js";
16
16
 
17
17
  // src/machine-decision-audit.ts
18
18
  import { basename } from "path";
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  cursorGateOwnsClaudeCall,
3
3
  readCursorGateRegistration
4
- } from "./chunk-EPPH5RMJ.js";
4
+ } from "./chunk-EWJXECUK.js";
5
5
  import {
6
6
  registerTranscript
7
- } from "./chunk-I6MI4NWX.js";
7
+ } from "./chunk-65ZWYA5L.js";
8
8
  import {
9
9
  namedEvent
10
- } from "./chunk-RZBV5KTF.js";
10
+ } from "./chunk-7ASHS5VR.js";
11
11
  import {
12
12
  writeDegraded
13
- } from "./chunk-J4UNR655.js";
13
+ } from "./chunk-XRO6NRBO.js";
14
14
  import {
15
15
  claudeShapedHookInput,
16
16
  hookCompatibleProfileBySource,
17
17
  isGrokHookPayload,
18
18
  isGrokSessionEndStop
19
- } from "./chunk-M65LPNIO.js";
19
+ } from "./chunk-H4226UC7.js";
20
20
 
21
21
  // src/tool-hook-input.ts
22
22
  var OPTIONAL_TEXT_FIELDS = ["hook_event_name", "session_id", "cwd", "transcript_path", "tool_use_id", "permission_mode", "cursor_version"];
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  announceSubscriptionRequired,
3
3
  isDeferAnswer
4
- } from "./chunk-EA5EASYT.js";
4
+ } from "./chunk-64QLX4ZC.js";
5
5
  import {
6
6
  askUser,
7
7
  isDecisionStopped,
8
8
  isQuestionLimitRefusal,
9
9
  waitForQuestion
10
- } from "./chunk-J4UNR655.js";
10
+ } from "./chunk-XRO6NRBO.js";
11
11
  import {
12
12
  SubscriptionRequiredError
13
- } from "./chunk-2KN53MPE.js";
13
+ } from "./chunk-ZNST34QH.js";
14
14
  import {
15
15
  getMachineId
16
- } from "./chunk-DS7XMYUB.js";
16
+ } from "./chunk-RLNJNRYP.js";
17
17
  import {
18
18
  ASK_CONTEXT_MAX,
19
19
  agentQuestionContext,
@@ -23,7 +23,7 @@ import {
23
23
  plainAskOf,
24
24
  questionsShownAsASet,
25
25
  shouldDeferToNativeMode
26
- } from "./chunk-M65LPNIO.js";
26
+ } from "./chunk-H4226UC7.js";
27
27
 
28
28
  // src/native-defer.ts
29
29
  var nativeDeferOptions = () => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSafeReadOnlyCommand
3
- } from "./chunk-M65LPNIO.js";
3
+ } from "./chunk-H4226UC7.js";
4
4
 
5
5
  // src/ledger.ts
6
6
  import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, statSync } from "fs";
@@ -415,9 +415,9 @@ var installGlobally = (options) => {
415
415
  }
416
416
  const started = (async () => {
417
417
  if (!npmIsOnPath()) throw new NpmMissingError();
418
- const { withUpgradeLock } = await import("./global-upgrade-U4V7KWH6.js");
419
- const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-3T7JLBHT.js");
420
- const { autoUpdateLock } = await import("./paths-3DUQGU4V.js");
418
+ const { withUpgradeLock } = await import("./global-upgrade-JZWB67EU.js");
419
+ const { installWithUpgradeLock, ownsUpgradeLock } = await import("./upgrade-lock-YPAQEEJA.js");
420
+ const { autoUpdateLock } = await import("./paths-XTEJ5LI2.js");
421
421
  let result = "skipped";
422
422
  const install = async () => {
423
423
  const platform = process.platform;
@@ -12,7 +12,7 @@ import {
12
12
  reachVerdict,
13
13
  reachesYou,
14
14
  verifyDelivery
15
- } from "./chunk-L5RSLIBQ.js";
15
+ } from "./chunk-X3NYMHLG.js";
16
16
  import {
17
17
  humanIsTty,
18
18
  writeHuman
@@ -24,14 +24,14 @@ import {
24
24
  } from "./chunk-FO3MDD26.js";
25
25
  import {
26
26
  reportedInstallSource
27
- } from "./chunk-BKH4LQJC.js";
27
+ } from "./chunk-IABPEGAA.js";
28
28
  import {
29
29
  NPX_LATEST_COMMAND
30
- } from "./chunk-SZYKS433.js";
30
+ } from "./chunk-BGXXWLS5.js";
31
31
  import {
32
32
  NO_PAIRING_COMPUTER,
33
33
  PAIR_TTL_SECONDS
34
- } from "./chunk-M65LPNIO.js";
34
+ } from "./chunk-H4226UC7.js";
35
35
 
36
36
  // src/onboarding.ts
37
37
  import qrcodeTerminal from "qrcode-terminal";
@@ -0,0 +1,95 @@
1
+ // src/linux-linger.ts
2
+ import { execFileSync } from "child_process";
3
+ import { userInfo } from "os";
4
+ var LOGINCTL_TIMEOUT_MS = 5e3;
5
+ var DESKTOP_SESSION_TYPES = /* @__PURE__ */ new Set(["x11", "wayland", "mir"]);
6
+ var STOPS_AT_LOGOUT = "stops when your last SSH session closes, and does not start after a reboot until you log in";
7
+ var NOT_NEEDED = { kind: "not-needed" };
8
+ var runLoginctl = (args) => execFileSync("loginctl", [...args], {
9
+ encoding: "utf8",
10
+ timeout: LOGINCTL_TIMEOUT_MS,
11
+ stdio: ["ignore", "pipe", "ignore"]
12
+ });
13
+ var propertyOf = (line) => {
14
+ const separator = line.indexOf("=");
15
+ return separator < 0 ? [line.trim(), ""] : [line.slice(0, separator).trim(), line.slice(separator + 1).trim()];
16
+ };
17
+ var propertiesOf = (output) => new Map(output.split("\n").map(propertyOf));
18
+ var lingerMayMatter = (platform, env) => platform === "linux" && !env.WSL_DISTRO_NAME;
19
+ var CLOSING_SESSION_STATE = "closing";
20
+ var sessionIsDesktop = (session, run) => {
21
+ if (session === "") return false;
22
+ try {
23
+ const properties = propertiesOf(run(["show-session", session, "--property=Type", "--property=State"]));
24
+ return DESKTOP_SESSION_TYPES.has(properties.get("Type") ?? "") && properties.get("State") !== CLOSING_SESSION_STATE;
25
+ } catch {
26
+ return false;
27
+ }
28
+ };
29
+ var daemonStopsAtLogout = (facts) => !facts.linger && !facts.desktopSession;
30
+ var readLingerFacts = (user, run) => {
31
+ try {
32
+ const properties = propertiesOf(run(["show-user", user, "--property=Linger", "--property=Display"]));
33
+ const linger = properties.get("Linger");
34
+ if (linger !== "yes" && linger !== "no") return null;
35
+ return { linger: linger === "yes", desktopSession: sessionIsDesktop(properties.get("Display") ?? "", run) };
36
+ } catch {
37
+ return null;
38
+ }
39
+ };
40
+ var userOf = (options) => {
41
+ try {
42
+ return options.user ?? userInfo().username;
43
+ } catch {
44
+ return null;
45
+ }
46
+ };
47
+ var readLinuxLinger = (options = {}) => {
48
+ if (!lingerMayMatter(options.platform ?? process.platform, options.env ?? process.env)) return null;
49
+ const user = userOf(options);
50
+ return user === null ? null : readLingerFacts(user, options.run ?? runLoginctl);
51
+ };
52
+ var keepLinuxDaemonAfterLogout = (options = {}) => {
53
+ if (!lingerMayMatter(options.platform ?? process.platform, options.env ?? process.env)) return NOT_NEEDED;
54
+ const user = userOf(options);
55
+ if (user === null) return NOT_NEEDED;
56
+ const run = options.run ?? runLoginctl;
57
+ const facts = readLingerFacts(user, run);
58
+ if (!facts || !daemonStopsAtLogout(facts)) return NOT_NEEDED;
59
+ try {
60
+ run(["--no-ask-password", "enable-linger", user]);
61
+ } catch {
62
+ return { kind: "needs-admin", user };
63
+ }
64
+ return readLingerFacts(user, run)?.linger === true ? { kind: "enabled", user } : { kind: "needs-admin", user };
65
+ };
66
+ var lingerReportOf = (outcome) => {
67
+ if (outcome.kind === "enabled") {
68
+ return {
69
+ tone: "note",
70
+ text: `Phone-start keeps running after you log out of this machine: turned on systemd lingering for ${outcome.user}. Undo with \`loginctl disable-linger\`.`
71
+ };
72
+ }
73
+ if (outcome.kind === "needs-admin") {
74
+ return {
75
+ tone: "warning",
76
+ text: `Phone-start ${STOPS_AT_LOGOUT}. To keep it running: \`sudo loginctl enable-linger ${outcome.user}\``
77
+ };
78
+ }
79
+ return null;
80
+ };
81
+ var lingerDoctorDetail = (facts) => {
82
+ if (daemonStopsAtLogout(facts)) {
83
+ return `no: it ${STOPS_AT_LOGOUT}; run \`pushary daemon install\`, or \`sudo loginctl enable-linger $USER\``;
84
+ }
85
+ if (facts.linger) return "systemd lingering is on";
86
+ return "while you are signed in to the desktop";
87
+ };
88
+
89
+ export {
90
+ daemonStopsAtLogout,
91
+ readLinuxLinger,
92
+ keepLinuxDaemonAfterLogout,
93
+ lingerReportOf,
94
+ lingerDoctorDetail
95
+ };
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  openCodeConfigDirFrom
3
- } from "./chunk-NSBWFX7H.js";
3
+ } from "./chunk-CGROOSWT.js";
4
4
  import {
5
5
  nativeClaudeInstallPath
6
6
  } from "./chunk-CYTPQDQY.js";
7
7
  import {
8
8
  grokHome
9
- } from "./chunk-RZBV5KTF.js";
9
+ } from "./chunk-7ASHS5VR.js";
10
10
  import {
11
11
  claudeConfigDir,
12
12
  clineDataDirectory,
13
13
  codexHomeFrom
14
- } from "./chunk-W4FJR57E.js";
14
+ } from "./chunk-ZJKWDM3S.js";
15
15
  import {
16
16
  HOOK_COMPATIBLE_PROFILES
17
- } from "./chunk-M65LPNIO.js";
17
+ } from "./chunk-H4226UC7.js";
18
18
 
19
19
  // src/vscode-config.ts
20
20
  import { homedir } from "os";
@@ -2,7 +2,7 @@ import {
2
2
  DISCONNECT_AGENT_IDS,
3
3
  SETUP_AGENT_CHOICES,
4
4
  isApprovalMode
5
- } from "./chunk-M65LPNIO.js";
5
+ } from "./chunk-H4226UC7.js";
6
6
 
7
7
  // src/cli/mode-request.ts
8
8
  var parseDuration = (value) => {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  compatibleConfigFile
3
- } from "./chunk-RZBV5KTF.js";
3
+ } from "./chunk-7ASHS5VR.js";
4
4
  import {
5
5
  hookOwnerOf,
6
6
  hookOwnerOfCommands
7
- } from "./chunk-237FYIVC.js";
7
+ } from "./chunk-ORZ7H3AQ.js";
8
8
  import {
9
9
  AGENT_CHOICES
10
- } from "./chunk-XHC3UNOK.js";
10
+ } from "./chunk-WVOMK2HW.js";
11
11
  import {
12
12
  bridgeStub,
13
13
  claudeSettings,
@@ -19,7 +19,7 @@ import {
19
19
  resolveBridgeStub,
20
20
  vscodePluginDir,
21
21
  windowsNodeLauncherFor
22
- } from "./chunk-W4FJR57E.js";
22
+ } from "./chunk-ZJKWDM3S.js";
23
23
  import {
24
24
  readJsonSafe
25
25
  } from "./chunk-TODDEIYG.js";
@@ -29,7 +29,7 @@ import {
29
29
  OPENCODE_APPROVAL_EVENT,
30
30
  hookCompatibleProfile,
31
31
  isRecord
32
- } from "./chunk-M65LPNIO.js";
32
+ } from "./chunk-H4226UC7.js";
33
33
 
34
34
  // src/opencode-plugin.ts
35
35
  var OPENCODE_PLUGIN_MARKER = "pushary-opencode-plugin w1";
@@ -2,7 +2,7 @@ import {
2
2
  localRepoKey,
3
3
  normalizeRepoRemote,
4
4
  parseGitBranch
5
- } from "./chunk-M65LPNIO.js";
5
+ } from "./chunk-H4226UC7.js";
6
6
 
7
7
  // src/repo.ts
8
8
  import { existsSync, readFileSync, statSync } from "fs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  readConfigFileKey
3
- } from "./chunk-CVBSETPW.js";
3
+ } from "./chunk-LTY5DSWT.js";
4
4
 
5
5
  // src/bell/fleet.ts
6
6
  import { closeSync, constants, futimesSync, lstatSync, mkdirSync, openSync, readdirSync, unlinkSync } from "fs";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  pusharyHookExecutable
3
- } from "./chunk-237FYIVC.js";
3
+ } from "./chunk-ORZ7H3AQ.js";
4
4
  import {
5
5
  bridgeResolvesToApp,
6
6
  cursorUserHooks,
7
7
  executableFileName,
8
8
  isBridgeLocator,
9
9
  liveBridgeProbe
10
- } from "./chunk-W4FJR57E.js";
10
+ } from "./chunk-ZJKWDM3S.js";
11
11
  import {
12
12
  atLeast,
13
13
  parseVersion
14
- } from "./chunk-A44MRVWG.js";
14
+ } from "./chunk-ACI4PZ5N.js";
15
15
  import {
16
16
  CURSOR_GATE_COVERAGE,
17
17
  CURSOR_GATE_SCRIPT,
@@ -21,7 +21,7 @@ import {
21
21
  isCursorHookPayload,
22
22
  isRecord,
23
23
  toolsCoveredByGateEntry
24
- } from "./chunk-M65LPNIO.js";
24
+ } from "./chunk-H4226UC7.js";
25
25
 
26
26
  // src/cursor-gate-registration.ts
27
27
  import { dirname, isAbsolute, join, resolve } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NPX_LATEST_COMMAND
3
- } from "./chunk-SZYKS433.js";
3
+ } from "./chunk-BGXXWLS5.js";
4
4
 
5
5
  // src/config.ts
6
6
  import { readFileSync } from "fs";
@@ -13,16 +13,16 @@ import {
13
13
  } from "./chunk-G66WIAST.js";
14
14
  import {
15
15
  keyPrefix
16
- } from "./chunk-CVBSETPW.js";
16
+ } from "./chunk-LTY5DSWT.js";
17
17
  import {
18
18
  getBaseUrl
19
- } from "./chunk-T6HX6OTY.js";
19
+ } from "./chunk-FP6ZVMF2.js";
20
20
  import {
21
21
  NPX_LATEST_COMMAND
22
- } from "./chunk-SZYKS433.js";
22
+ } from "./chunk-BGXXWLS5.js";
23
23
  import {
24
24
  isValidApiKey
25
- } from "./chunk-M65LPNIO.js";
25
+ } from "./chunk-H4226UC7.js";
26
26
 
27
27
  // src/cli/login-ui.ts
28
28
  import { hostname } from "os";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  ensureCodexTrustsPusharyHooks
3
- } from "./chunk-RLQDVWZ4.js";
3
+ } from "./chunk-VCMJLNEP.js";
4
4
  import {
5
5
  hermesReceiptPaths,
6
6
  hermesSetupPredatesThePluginFolder,
7
7
  installHermesPlugin,
8
8
  refreshHermesPluginFiles,
9
9
  shippedHermesPlugin
10
- } from "./chunk-7MIT5C7B.js";
10
+ } from "./chunk-MGTMXF3T.js";
11
11
  import {
12
12
  fxIgnoresInstructionsFile,
13
13
  fxInstructionsBody,
@@ -16,7 +16,7 @@ import {
16
16
  macAppFxBridge,
17
17
  refreshClineKey,
18
18
  switchFxHttpEntryToBridge
19
- } from "./chunk-IZJDVOJV.js";
19
+ } from "./chunk-WPPTHRBO.js";
20
20
  import {
21
21
  OPENCODE_HOOK_BINARY,
22
22
  agentHookOwner,
@@ -28,16 +28,16 @@ import {
28
28
  openCodePluginDir,
29
29
  openCodeWired,
30
30
  withOpenCodeAskRules
31
- } from "./chunk-NSBWFX7H.js";
31
+ } from "./chunk-CGROOSWT.js";
32
32
  import {
33
33
  detectClaudeVersion
34
- } from "./chunk-UJZ5YHSR.js";
34
+ } from "./chunk-SULQKUPJ.js";
35
35
  import {
36
36
  addCompatibleHooks,
37
37
  compatibleConfigFile,
38
38
  compatibleInstructionsFile,
39
39
  hasCompatibleHooks
40
- } from "./chunk-RZBV5KTF.js";
40
+ } from "./chunk-7ASHS5VR.js";
41
41
  import {
42
42
  GEMINI_HOOK_BINARY,
43
43
  addGeminiHooks,
@@ -49,10 +49,10 @@ import {
49
49
  geminiWired,
50
50
  hasGeminiHooks,
51
51
  planHooks
52
- } from "./chunk-237FYIVC.js";
52
+ } from "./chunk-ORZ7H3AQ.js";
53
53
  import {
54
54
  KEY_FILE_MODE
55
- } from "./chunk-CVBSETPW.js";
55
+ } from "./chunk-LTY5DSWT.js";
56
56
  import {
57
57
  CLAUDE_HOOK_BINARY,
58
58
  CLAUDE_HOOK_EVENTS,
@@ -99,13 +99,13 @@ import {
99
99
  renderAgentInstructions,
100
100
  supportedClaudeEvents,
101
101
  vscodePluginMcp
102
- } from "./chunk-W4FJR57E.js";
102
+ } from "./chunk-ZJKWDM3S.js";
103
103
  import {
104
104
  formatVersion,
105
105
  hookCommandsUseBareNames,
106
106
  resolveGlobalBinDir,
107
107
  resolveGlobalBinary
108
- } from "./chunk-A44MRVWG.js";
108
+ } from "./chunk-ACI4PZ5N.js";
109
109
  import {
110
110
  readJsonSafe,
111
111
  writeFileAtomic,
@@ -115,7 +115,7 @@ import {
115
115
  HOOK_COMPATIBLE_PROFILES,
116
116
  isCompatibleAgentType,
117
117
  isRecord
118
- } from "./chunk-M65LPNIO.js";
118
+ } from "./chunk-H4226UC7.js";
119
119
 
120
120
  // src/reapply.ts
121
121
  import { dirname, join } from "path";