pushary 1.9.196 → 1.9.198

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 (130) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/{api-7WWLO6B4.js → api-JB2YWCFT.js} +10 -10
  3. package/dist/bin/pushary-audit.js +3 -3
  4. package/dist/bin/pushary-bell-hook.js +25 -25
  5. package/dist/bin/pushary-bell.js +10 -10
  6. package/dist/bin/pushary-calls.js +14 -14
  7. package/dist/bin/pushary-claude.js +24 -24
  8. package/dist/bin/pushary-clean.js +32 -32
  9. package/dist/bin/pushary-codex-bridge.js +22 -22
  10. package/dist/bin/pushary-codex-hook.js +30 -30
  11. package/dist/bin/pushary-codex-session.js +8 -8
  12. package/dist/bin/pushary-codex.js +12 -12
  13. package/dist/bin/pushary-connect.js +27 -27
  14. package/dist/bin/pushary-cowork.js +4 -4
  15. package/dist/bin/pushary-daemon.js +43 -41
  16. package/dist/bin/pushary-disconnect.js +23 -23
  17. package/dist/bin/pushary-doctor.js +38 -38
  18. package/dist/bin/pushary-elicitation-hook.js +25 -25
  19. package/dist/bin/pushary-gemini-bridge.js +17 -17
  20. package/dist/bin/pushary-gemini-hook.js +28 -28
  21. package/dist/bin/pushary-hook.js +31 -31
  22. package/dist/bin/pushary-login.js +20 -20
  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 +14 -14
  26. package/dist/bin/pushary-notification-hook.js +24 -24
  27. package/dist/bin/pushary-opencode-bridge.js +20 -20
  28. package/dist/bin/pushary-opencode-hook.js +28 -28
  29. package/dist/bin/pushary-permission-denied-hook.js +30 -30
  30. package/dist/bin/pushary-permission-hook.js +30 -30
  31. package/dist/bin/pushary-post-hook.js +25 -25
  32. package/dist/bin/pushary-prompt-hook.js +24 -24
  33. package/dist/bin/pushary-session-end-hook.js +24 -24
  34. package/dist/bin/pushary-session-start-hook.js +36 -34
  35. package/dist/bin/pushary-sessions.js +12 -12
  36. package/dist/bin/pushary-setup.js +95 -53
  37. package/dist/bin/pushary-stats.js +4 -4
  38. package/dist/bin/pushary-status.js +28 -28
  39. package/dist/bin/pushary-stop-hook.js +24 -24
  40. package/dist/bin/pushary-stopfailure-hook.js +24 -24
  41. package/dist/bin/pushary-suggestions.js +14 -14
  42. package/dist/bin/pushary-transcript-register.js +17 -17
  43. package/dist/bin/pushary-transcripts.js +27 -27
  44. package/dist/bin/pushary-upgrade.js +58 -40
  45. package/dist/bin/pushary-wait.js +14 -14
  46. package/dist/bin/pushary.js +7 -7
  47. package/dist/{chunk-CH7WFVC5.js → chunk-247FA7KI.js} +1 -1
  48. package/dist/{chunk-DWLG2IIV.js → chunk-2SJ5EAIM.js} +4 -4
  49. package/dist/{chunk-5YJSZFZ6.js → chunk-375XMDXC.js} +1 -1
  50. package/dist/{chunk-S5YA65CK.js → chunk-3ET6SSBR.js} +2 -2
  51. package/dist/{chunk-TFMIG3VP.js → chunk-3PSNUHC5.js} +1 -1
  52. package/dist/{chunk-REEDOBPH.js → chunk-3SLTSIVQ.js} +4 -4
  53. package/dist/{chunk-G3HAAQ65.js → chunk-4CJ7PQL7.js} +5 -5
  54. package/dist/{chunk-J7D27BKP.js → chunk-4T2UCDTT.js} +7 -7
  55. package/dist/{chunk-6ONF5BPB.js → chunk-53X7ESKH.js} +6 -6
  56. package/dist/{chunk-V3PMKMAO.js → chunk-5L7DFTHX.js} +4 -4
  57. package/dist/{chunk-DFTVEK72.js → chunk-5V2NNWPV.js} +5 -5
  58. package/dist/{chunk-MIO242ZB.js → chunk-6ORKZ2XF.js} +3 -3
  59. package/dist/{chunk-ZWN7AEEI.js → chunk-A355NHU4.js} +21 -4
  60. package/dist/{chunk-UPGPPX7W.js → chunk-B6S622H7.js} +4 -4
  61. package/dist/{chunk-UYAKT6PO.js → chunk-CKIHZUS4.js} +1 -1
  62. package/dist/{chunk-YJHBDJIW.js → chunk-CXQWDQCJ.js} +3 -0
  63. package/dist/{chunk-6J4KRJP4.js → chunk-CY7POKS3.js} +2 -2
  64. package/dist/{chunk-KFSWRIH2.js → chunk-EEI3UGYX.js} +8 -7
  65. package/dist/{chunk-ORV2JLNH.js → chunk-F76ZUFUW.js} +2 -2
  66. package/dist/{chunk-YLMBNJWN.js → chunk-F7J5DE66.js} +1 -1
  67. package/dist/{chunk-GZAU5W3K.js → chunk-FVWDT7EJ.js} +2 -2
  68. package/dist/{chunk-RDO4NPVU.js → chunk-FWP5KQJR.js} +2 -2
  69. package/dist/{chunk-V4R37DFH.js → chunk-GSYXA26X.js} +2 -2
  70. package/dist/{chunk-U2LLYPDS.js → chunk-H6SVMUCS.js} +3 -3
  71. package/dist/{chunk-BQGNF6BN.js → chunk-H74WROTN.js} +2 -2
  72. package/dist/{chunk-6EZY7IXB.js → chunk-HOFT6RAL.js} +1 -1
  73. package/dist/{chunk-XNMEK464.js → chunk-HPWOVFQV.js} +4 -4
  74. package/dist/{chunk-M7O33GTP.js → chunk-HX4NDLO7.js} +2 -2
  75. package/dist/{chunk-GHMCSDAN.js → chunk-I7HXYNZL.js} +3 -3
  76. package/dist/{chunk-5AGLZUDK.js → chunk-IDZ2KKTJ.js} +4 -4
  77. package/dist/{chunk-ERVXMMGO.js → chunk-IOCJDGAQ.js} +1 -1
  78. package/dist/{chunk-VD57H3ZU.js → chunk-IX7DFY4W.js} +1 -1
  79. package/dist/chunk-IZYAD6FA.js +74 -0
  80. package/dist/{chunk-QOWEXH34.js → chunk-JGLVWR2K.js} +1 -1
  81. package/dist/{chunk-T776F2FQ.js → chunk-JJD2E7UW.js} +1 -1
  82. package/dist/{chunk-25CMVBTJ.js → chunk-JTROZAZT.js} +2 -2
  83. package/dist/{chunk-44SARVA4.js → chunk-KINS3YH7.js} +5 -5
  84. package/dist/{chunk-OPRRDN5R.js → chunk-KJBXYZEZ.js} +5 -5
  85. package/dist/{chunk-D4BHK52K.js → chunk-KRNRLNUK.js} +1 -1
  86. package/dist/{chunk-756CPP5T.js → chunk-KSSVKU7Y.js} +98 -16
  87. package/dist/{chunk-4BC4YDVL.js → chunk-KZODVCLP.js} +3 -3
  88. package/dist/{chunk-V6OR4WLF.js → chunk-LVMWDCLN.js} +7 -7
  89. package/dist/{chunk-PY3VOJQY.js → chunk-MA3UM44V.js} +3 -3
  90. package/dist/{chunk-QGWVK7K7.js → chunk-MDO4BGRM.js} +13 -13
  91. package/dist/{chunk-SRIFCDTY.js → chunk-MGIZ2XRJ.js} +1 -1
  92. package/dist/{chunk-62YIQ2P2.js → chunk-MHQDLVQX.js} +2 -2
  93. package/dist/{chunk-ZDROZABP.js → chunk-MWF4L55C.js} +3 -3
  94. package/dist/{chunk-RE6TWTNY.js → chunk-MXD4XEHV.js} +2 -2
  95. package/dist/{chunk-NFFWCJMJ.js → chunk-NJZ3U2XM.js} +1 -1
  96. package/dist/{chunk-ZGS5TMMV.js → chunk-OBDHGAEE.js} +2 -2
  97. package/dist/{chunk-CMQCKXCF.js → chunk-OEUO6C6O.js} +1 -1
  98. package/dist/{chunk-55L4JSPA.js → chunk-P6DUWKAO.js} +1 -0
  99. package/dist/{chunk-3ZUDRXVV.js → chunk-PAHL3VTG.js} +4 -4
  100. package/dist/{chunk-AJ6Q42KT.js → chunk-QILIXLIP.js} +2 -2
  101. package/dist/{chunk-IYYWAP6P.js → chunk-QVG6M24J.js} +3 -3
  102. package/dist/{chunk-GECCSAXS.js → chunk-RHCC3WET.js} +8 -8
  103. package/dist/{chunk-LFCLDWHZ.js → chunk-RSVVUJT4.js} +1 -1
  104. package/dist/{chunk-NMCQA5JL.js → chunk-SS62EXPR.js} +26 -11
  105. package/dist/{chunk-QQLYMBKM.js → chunk-SVJRFO2D.js} +1 -1
  106. package/dist/{chunk-OM7CKAVY.js → chunk-TBHC4AJ3.js} +3 -3
  107. package/dist/{chunk-BXAVWEE4.js → chunk-TC65PME7.js} +4 -4
  108. package/dist/{chunk-FAMKGTCF.js → chunk-TWWOQKXK.js} +1 -1
  109. package/dist/{chunk-IC5BBT2K.js → chunk-UGGXQKVC.js} +1 -1
  110. package/dist/{chunk-N3TX5LLG.js → chunk-VAUSK462.js} +3 -3
  111. package/dist/{chunk-5C74GHZG.js → chunk-VFAK5JLU.js} +6 -6
  112. package/dist/{chunk-5JQQ5IQC.js → chunk-WGODS5EB.js} +2 -2
  113. package/dist/{chunk-LOQWIBVV.js → chunk-X6EXXBII.js} +3 -3
  114. package/dist/{chunk-BLVTNQZV.js → chunk-XCPED5AY.js} +2 -2
  115. package/dist/{chunk-5NFHLMY3.js → chunk-XYGNLWWA.js} +4 -4
  116. package/dist/{chunk-ENEMHGBE.js → chunk-YOD3EXM2.js} +7 -7
  117. package/dist/{chunk-PEUODRKS.js → chunk-ZAI54UZ6.js} +1 -1
  118. package/dist/{codex-app-cards-switch-NCSFAEUY.js → codex-app-cards-switch-NL4F2GTH.js} +12 -12
  119. package/dist/{codex-desktop-launch-I6UPDWTQ.js → codex-desktop-launch-YKRZ474G.js} +1 -1
  120. package/dist/{codex-session-launch-4OT4CC2W.js → codex-session-launch-TDDMSWX3.js} +19 -19
  121. package/dist/{config-2AGOCKSO.js → config-EARKOD24.js} +3 -3
  122. package/dist/{global-upgrade-OG6RLR36.js → global-upgrade-E2LPCPTA.js} +9 -9
  123. package/dist/{identity-57VX4O7Z.js → identity-RMCGMU2G.js} +4 -4
  124. package/dist/{live-capabilities-6SRTZJ5A.js → live-capabilities-MFOTOB2Q.js} +4 -4
  125. package/dist/{paths-M47UHTQ4.js → paths-LMXYUYFK.js} +3 -3
  126. package/dist/{reapply-E7JYPWKA.js → reapply-FMKSUMPS.js} +31 -26
  127. package/dist/src/index.js +30 -30
  128. package/dist/{upgrade-lock-EIPMFXKR.js → upgrade-lock-THQ5BOFX.js} +4 -4
  129. package/dist/{usage-YSVHDBHO.js → usage-CRVWVD5D.js} +3 -3
  130. package/package.json +1 -1
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  APPROVAL_RULES_PATH,
3
3
  canChangeApprovalSettings
4
- } from "./chunk-VD57H3ZU.js";
4
+ } from "./chunk-IX7DFY4W.js";
5
5
  import {
6
6
  callMcpTool
7
- } from "./chunk-MIO242ZB.js";
7
+ } from "./chunk-6ORKZ2XF.js";
8
8
  import {
9
9
  absoluteUrl
10
- } from "./chunk-GZAU5W3K.js";
10
+ } from "./chunk-FVWDT7EJ.js";
11
11
  import {
12
12
  getBaseUrl
13
- } from "./chunk-IC5BBT2K.js";
13
+ } from "./chunk-UGGXQKVC.js";
14
14
  import {
15
15
  NPX_LATEST_COMMAND
16
- } from "./chunk-QQLYMBKM.js";
16
+ } from "./chunk-SVJRFO2D.js";
17
17
  import {
18
18
  AGENT_STOP_DEFAULT_SECONDS,
19
19
  APPROVAL_MODE_META,
@@ -2,10 +2,10 @@ import {
2
2
  SIGNED_OUT_ON_MAC_MESSAGE,
3
3
  describeSignedOutKey,
4
4
  readSignedOutDiagnosis
5
- } from "./chunk-RDO4NPVU.js";
5
+ } from "./chunk-FWP5KQJR.js";
6
6
  import {
7
7
  APPROVAL_RULES_PATH
8
- } from "./chunk-VD57H3ZU.js";
8
+ } from "./chunk-IX7DFY4W.js";
9
9
  import {
10
10
  createIo
11
11
  } from "./chunk-5QP7DVQF.js";
@@ -14,13 +14,13 @@ import {
14
14
  checkApiKey,
15
15
  describeKeyCheck,
16
16
  keyCheckFromResponse
17
- } from "./chunk-GZAU5W3K.js";
17
+ } from "./chunk-FVWDT7EJ.js";
18
18
  import {
19
19
  readKeySource
20
- } from "./chunk-BLVTNQZV.js";
20
+ } from "./chunk-XCPED5AY.js";
21
21
  import {
22
22
  getBaseUrl
23
- } from "./chunk-IC5BBT2K.js";
23
+ } from "./chunk-UGGXQKVC.js";
24
24
  import {
25
25
  EXIT
26
26
  } from "./chunk-BG4HHB7E.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pusharyDir
3
- } from "./chunk-25CMVBTJ.js";
3
+ } from "./chunk-JTROZAZT.js";
4
4
  import {
5
5
  readJsonSafe
6
6
  } from "./chunk-PM2NRK6Y.js";
@@ -13,10 +13,10 @@ import {
13
13
  uninstallOpenClawPlugin,
14
14
  unsetOpenClawEntry,
15
15
  writeOpenClawEntry
16
- } from "./chunk-ZDROZABP.js";
16
+ } from "./chunk-MWF4L55C.js";
17
17
  import {
18
18
  needsShell
19
- } from "./chunk-TFMIG3VP.js";
19
+ } from "./chunk-3PSNUHC5.js";
20
20
  import {
21
21
  OPENCLAW_ENVIRONMENT_KEYS,
22
22
  hermesAppWiringRecord,
@@ -25,10 +25,10 @@ import {
25
25
  openClawDirectoriesToLookIn,
26
26
  openClawPluginFolder,
27
27
  openClawSetupReceiptDirectory
28
- } from "./chunk-25CMVBTJ.js";
28
+ } from "./chunk-JTROZAZT.js";
29
29
  import {
30
30
  resolvePathBinary
31
- } from "./chunk-5NFHLMY3.js";
31
+ } from "./chunk-XYGNLWWA.js";
32
32
  import {
33
33
  readJsonSafe,
34
34
  writeJsonAtomic
@@ -36,7 +36,7 @@ import {
36
36
  import {
37
37
  isNewerVersion,
38
38
  isReleaseVersion
39
- } from "./chunk-YJHBDJIW.js";
39
+ } from "./chunk-CXQWDQCJ.js";
40
40
  import {
41
41
  isRecord
42
42
  } from "./chunk-HMMVGDL3.js";
@@ -1341,7 +1341,7 @@ def _await_decision(request, created, correlation_id: str, offered, uses_select:
1341
1341
  return _decided(request, correlation_id, "deny", None)
1342
1342
  ` },
1343
1343
  { path: "cancellation.py", contents: 'from __future__ import annotations\n\nfrom typing import Literal, Mapping, Tuple\n\nCancellation = Literal[\n "withdrawn_by_this_call",\n "cancelled_unproven",\n "already_cancelled",\n "not_pending",\n "unreachable",\n]\n\nWITHDRAWN_BY_THIS_CALL: Cancellation = "withdrawn_by_this_call"\nCANCELLED_UNPROVEN: Cancellation = "cancelled_unproven"\nALREADY_CANCELLED: Cancellation = "already_cancelled"\nNOT_PENDING: Cancellation = "not_pending"\nUNREACHABLE: Cancellation = "unreachable"\nCANCELLATIONS: Tuple[Cancellation, ...] = (\n WITHDRAWN_BY_THIS_CALL,\n CANCELLED_UNPROVEN,\n ALREADY_CANCELLED,\n NOT_PENDING,\n UNREACHABLE,\n)\n\nUNAVAILABLE_STATUS = "unavailable"\nSTOP_HANDOFF = "stop"\n\n\ndef classify_cancellation(response: object) -> Cancellation:\n if not isinstance(response, Mapping):\n return UNREACHABLE\n fields: Mapping[object, object] = response\n cancelled = fields.get("cancelled")\n by_this_call = fields.get("cancelledByThisCall")\n if (\n not isinstance(cancelled, bool)\n or fields.get("status") == UNAVAILABLE_STATUS\n or fields.get("handoffAction") == STOP_HANDOFF\n or (by_this_call is not None and not isinstance(by_this_call, bool))\n or (by_this_call is True and not cancelled)\n ):\n return UNREACHABLE\n if not cancelled:\n return NOT_PENDING\n if by_this_call is None:\n return CANCELLED_UNPROVEN\n return WITHDRAWN_BY_THIS_CALL if by_this_call else ALREADY_CANCELLED\n' },
1344
- { path: "dashboard/manifest.json", contents: '{\n "name": "pushary",\n "label": "Pushary",\n "description": "Approvals Pushary is carrying to your phone, answerable from Hermes Desktop",\n "version": "1.0.3",\n "tab": { "hidden": true },\n "entry": "web.js",\n "api": "plugin_api.py"\n}\n' },
1344
+ { path: "dashboard/manifest.json", contents: '{\n "name": "pushary",\n "label": "Pushary",\n "description": "Approvals Pushary is carrying to your phone, answerable from Hermes Desktop",\n "version": "1.0.5",\n "tab": { "hidden": true },\n "entry": "web.js",\n "api": "plugin_api.py"\n}\n' },
1345
1345
  { path: "dashboard/plugin_api.py", contents: `import importlib
1346
1346
  import sys
1347
1347
  import time
@@ -1599,6 +1599,7 @@ import math
1599
1599
  import os
1600
1600
  import re
1601
1601
  import shutil
1602
+ import stat
1602
1603
  import subprocess
1603
1604
  import tempfile
1604
1605
  import threading
@@ -1625,6 +1626,15 @@ HELPER_ENVIRONMENT_NAMES = frozenset({
1625
1626
  "SYSTEMROOT", "PATHEXT", "COMSPEC", "USERPROFILE", "APPDATA", "LOCALAPPDATA", "TEMP", "TMP",
1626
1627
  "PUSHARY_BASE_URL", "PUSHARY_API_URL", "PUSHARY_CONFIG_FILE", "PUSHARY_TRANSCRIPTS", "PUSHARY_TRANSCRIPT_REGISTRY_DIR",
1627
1628
  })
1629
+ NATIVE_HELPER_NAME = "pushary-native-transcripts"
1630
+ PUSHARY_APP_NAME = "Pushary.app"
1631
+ PUSHARY_APP_HELPER = Path("Contents") / "Helpers" / NATIVE_HELPER_NAME
1632
+ SYSTEM_APPLICATIONS = Path("/Applications")
1633
+ CLI_HELPER_NAME = "pushary-transcript-register"
1634
+ CLI_HELPER_RECORD = "hermes-history-helper.json"
1635
+ CLI_HELPER_RECORD_VERSION = 1
1636
+ CLI_HELPER_RECORD_MAX_BYTES = 8192
1637
+ CLI_HELPER_RECORD_OPEN_FLAGS = os.O_RDONLY | getattr(os, "O_BINARY", 0) | getattr(os, "O_NOFOLLOW", 0) | getattr(os, "O_NONBLOCK", 0)
1628
1638
 
1629
1639
 
1630
1640
  class _Authorization(NamedTuple):
@@ -1760,19 +1770,88 @@ def _registration_environment(key: str) -> dict[str, str]:
1760
1770
  return {**_helper_environment(), "PUSHARY_API_KEY": key, "PUSHARY_BASE_URL": api.BASE_URL}
1761
1771
 
1762
1772
 
1773
+ def _cached_pushary_app(root: Path) -> Path | None:
1774
+ try:
1775
+ lines = (root / "bin" / ".bridge-cache").read_text(encoding="utf-8").splitlines()
1776
+ except (OSError, ValueError):
1777
+ return None
1778
+ cached = Path(lines[0].strip()) if lines and lines[0].strip() else None
1779
+ return cached if cached is not None and cached.is_absolute() else None
1780
+
1781
+
1782
+ def _is_executable_file(path: Path) -> bool:
1783
+ return path.is_file() and os.access(path, os.X_OK)
1784
+
1785
+
1786
+ def _native_helper(root: Path) -> Path | None:
1787
+ bridge = (root / "bin" / "pushary-bridge").resolve(strict=True)
1788
+ apps = (SYSTEM_APPLICATIONS / PUSHARY_APP_NAME, Path.home() / "Applications" / PUSHARY_APP_NAME, _cached_pushary_app(root))
1789
+ candidates = (bridge.parent / NATIVE_HELPER_NAME, *(app / PUSHARY_APP_HELPER for app in apps if app is not None))
1790
+ return next((helper for helper in candidates if _is_executable_file(helper)), None)
1791
+
1792
+
1793
+ def _is_owner_only_file(info: os.stat_result) -> bool:
1794
+ if not stat.S_ISREG(info.st_mode):
1795
+ return False
1796
+ return os.name == "nt" or (info.st_mode & 0o077 == 0 and info.st_uid == os.getuid())
1797
+
1798
+
1799
+ def _owner_only_record_text(path: Path) -> str | None:
1800
+ if not stat.S_ISREG(path.lstat().st_mode):
1801
+ return None
1802
+ with os.fdopen(os.open(path, CLI_HELPER_RECORD_OPEN_FLAGS), "rb") as record:
1803
+ info = os.fstat(record.fileno())
1804
+ if not _is_owner_only_file(info) or info.st_size > CLI_HELPER_RECORD_MAX_BYTES:
1805
+ return None
1806
+ return record.read(CLI_HELPER_RECORD_MAX_BYTES + 1).decode("utf-8")
1807
+
1808
+
1809
+ def _is_recorded_command(value: object) -> bool:
1810
+ if not isinstance(value, dict) or type(value.get("version")) is not int or value.get("version") != CLI_HELPER_RECORD_VERSION:
1811
+ return False
1812
+ command = value.get("command")
1813
+ return isinstance(command, list) and len(command) == 2 and all(isinstance(part, str) and part for part in command)
1814
+
1815
+
1816
+ def _runnable_recorded_command(command: list[str]) -> list[str] | None:
1817
+ runtime, entry = (Path(part) for part in command)
1818
+ if not runtime.is_absolute() or not entry.is_absolute() or not _is_executable_file(runtime) or not entry.is_file():
1819
+ return None
1820
+ return [str(runtime), str(entry)]
1821
+
1822
+
1823
+ def _recorded_cli_helper(root: Path) -> list[str] | None:
1824
+ try:
1825
+ text = _owner_only_record_text(root / CLI_HELPER_RECORD)
1826
+ value = None if text is None else json.loads(text)
1827
+ except (OSError, ValueError, RecursionError):
1828
+ return None
1829
+ return _runnable_recorded_command(value["command"]) if _is_recorded_command(value) else None
1830
+
1831
+
1832
+ def _cli_helper(root: Path) -> list[str] | None:
1833
+ recorded = _recorded_cli_helper(root)
1834
+ if recorded is not None:
1835
+ return recorded
1836
+ on_path = shutil.which(CLI_HELPER_NAME)
1837
+ return [on_path] if on_path else None
1838
+
1839
+
1763
1840
  def _registration_command(key: str) -> list[str] | None:
1764
1841
  root = Path.home() / ".pushary"
1765
1842
  try:
1766
1843
  if (root / "native-transcript-consent.json").exists():
1767
- bridge = (root / "bin" / "pushary-bridge").resolve(strict=True)
1768
- helper = str(bridge.parent / "pushary-native-transcripts")
1769
- command = [helper, "register", "hermes"]
1844
+ native_helper = _native_helper(root)
1845
+ if native_helper is None:
1846
+ return None
1847
+ helper = [str(native_helper)]
1848
+ command = [*helper, "register", "hermes"]
1770
1849
  else:
1771
- helper = shutil.which("pushary-transcript-register")
1850
+ helper = _cli_helper(root)
1772
1851
  if helper is None:
1773
1852
  return None
1774
- command = [helper, "hermes"]
1775
- result = subprocess.run([helper, "authorize-export"],
1853
+ command = [*helper, "hermes"]
1854
+ result = subprocess.run([*helper, "authorize-export"],
1776
1855
  input=json.dumps({"apiKey": key, "baseUrl": api.BASE_URL}), text=True,
1777
1856
  env=_helper_environment(), stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, timeout=5, check=False)
1778
1857
  if result.returncode != 0:
@@ -1797,10 +1876,10 @@ def _file_state(path: Path | None) -> tuple[int, ...] | None:
1797
1876
 
1798
1877
  def _authorization_inputs(key: str) -> tuple[object, ...]:
1799
1878
  root = Path.home() / ".pushary"
1800
- helper = shutil.which("pushary-transcript-register")
1879
+ helper = shutil.which(CLI_HELPER_NAME)
1801
1880
  sources = (root / "native-transcript-consent.json", root / "bridge-auth", root / "bridge-auth" / "agent-key.json",
1802
1881
  root / "machine-id", root / "bin" / "pushary-bridge", api.pushary_config_path(),
1803
- Path(helper) if helper else None)
1882
+ Path(helper) if helper else None, root / CLI_HELPER_RECORD)
1804
1883
  return (key, api.BASE_URL, os.environ.get("PUSHARY_TRANSCRIPTS"), helper, *(_file_state(source) for source in sources))
1805
1884
 
1806
1885
 
@@ -1957,7 +2036,10 @@ def start_history(session_id: object, parent_session_id: object = None) -> None:
1957
2036
  with _lock:
1958
2037
  if identity in _workers or len(_workers) >= 32:
1959
2038
  return
1960
- key = api._get_api_key()
2039
+ try:
2040
+ key = api._get_api_key()
2041
+ except ValueError:
2042
+ return
1961
2043
  command = _authorized_command(key)
1962
2044
  if command is None:
1963
2045
  _report_history_not_allowed_once()
@@ -2126,7 +2208,7 @@ def record_plugin_load(approval_transport_registered, home=None, pid=None, now=N
2126
2208
  logger.debug("[pushary] could not record the plugin load: %s", exc)
2127
2209
  return None
2128
2210
  ` },
2129
- { path: "plugin.yaml", contents: 'name: pushary\nversion: 1.0.3\ndescription: Push notifications and human-in-the-loop for Hermes Agent via Pushary\nauthor: RalphNex OU\nrequires_env:\n - name: PUSHARY_API_KEY\n description: Your Pushary API key\n url: https://pushary.com/sign-up?from=hermes\n secret: true\nconfig_schema:\n api_key:\n type: secret\n env: PUSHARY_API_KEY\n label: Pushary API key\n description: "Get one at pushary.com/sign-up?from=hermes"\n required: true\nprovides_tools:\n - pushary_remind\n - pushary_notify\n - pushary_ask\n - pushary_wait\n - pushary_cancel\n - pushary_propose_scope\n - pushary_enroll\n - pushary_ask_end_user\nprovides_hooks:\n - pre_llm_call\n - pre_tool_call\n - post_tool_call\n - on_session_start\n - on_session_end\n - on_session_finalize\n - post_approval_response\nprovides_approval_transports:\n - pushary\n' },
2211
+ { path: "plugin.yaml", contents: 'name: pushary\nversion: 1.0.5\ndescription: Push notifications and human-in-the-loop for Hermes Agent via Pushary\nauthor: RalphNex OU\nrequires_env:\n - name: PUSHARY_API_KEY\n description: Your Pushary API key\n url: https://pushary.com/sign-up?from=hermes\n secret: true\nconfig_schema:\n api_key:\n type: secret\n env: PUSHARY_API_KEY\n label: Pushary API key\n description: "Get one at pushary.com/sign-up?from=hermes"\n required: true\nprovides_tools:\n - pushary_remind\n - pushary_notify\n - pushary_ask\n - pushary_wait\n - pushary_cancel\n - pushary_propose_scope\n - pushary_enroll\n - pushary_ask_end_user\nprovides_hooks:\n - pre_llm_call\n - pre_tool_call\n - post_tool_call\n - on_session_start\n - on_session_end\n - on_session_finalize\n - post_approval_response\nprovides_approval_transports:\n - pushary\n' },
2130
2212
  { path: "README.md", contents: "# Pushary for Hermes\n\nAsk a question in Hermes and answer it on your phone. Try it with your own device before routing command approvals there.\n\n## Connect your phone\n\n1. [Set up your Pushary Agent account](https://pushary.com/sign-up?from=ai-coding&utm_source=hermes-plugin&utm_medium=quickstart&utm_campaign=first-question). Pair your phone with that account and get its API key from Agent settings.\n2. In your terminal, install the catalog plugin:\n\n ```sh\n hermes plugins install pushary\n ```\n\n3. Enter `PUSHARY_API_KEY` when Hermes prompts for it. If you missed the prompt, save the key in the plugin\u2019s settings in Hermes Desktop. Keep it out of chat. Start a new Hermes session (for a running gateway, use `hermes gateway restart`).\n\n## Try one question\n\nTell Hermes: **Use `pushary_ask` to ask me \u201CDid this test reach your phone?\u201D Report my answer and do nothing else.** Open the question on your paired phone and tap **Yes** or **No**. Hermes should report the answer you tapped.\n\nIf nothing arrives, check the account and notification permissions on your phone. A pending question is still live: wait for the same question rather than sending another. If Pushary hands it back to Hermes, answer the local prompt instead. No answer is not approval.\n\nCommand approvals are separate from this test. To route them to your phone, set `security.approval.transport` to `pushary`. Set `security.approval.transport_fallback` to `builtin` if you want Hermes\u2019s local prompt after a safe handoff; an unconfirmed withdrawal does not authorize the command. See the [plugin guide](https://github.com/Pushary/hermes-plugin-pushary#readme) for approval routing and what the plugin reads and sends.\n" },
2131
2213
  { path: "schemas.py", contents: `PUSHARY_REMIND = {
2132
2214
  "name": "pushary_remind",
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  readExistingMachineId
3
- } from "./chunk-5YJSZFZ6.js";
3
+ } from "./chunk-375XMDXC.js";
4
4
  import {
5
5
  getBaseUrl
6
- } from "./chunk-IC5BBT2K.js";
6
+ } from "./chunk-UGGXQKVC.js";
7
7
  import {
8
8
  NetworkError
9
9
  } from "./chunk-CINBAX5G.js";
10
10
  import {
11
11
  getPackageVersion
12
- } from "./chunk-YJHBDJIW.js";
12
+ } from "./chunk-CXQWDQCJ.js";
13
13
  import {
14
14
  clientContextHeaders,
15
15
  redactSecretsFromContent
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  needsShell,
3
3
  spawnClaude
4
- } from "./chunk-TFMIG3VP.js";
4
+ } from "./chunk-3PSNUHC5.js";
5
5
  import {
6
6
  getMachineId
7
- } from "./chunk-5YJSZFZ6.js";
7
+ } from "./chunk-375XMDXC.js";
8
8
  import {
9
9
  readControlMode
10
- } from "./chunk-BLVTNQZV.js";
10
+ } from "./chunk-XCPED5AY.js";
11
11
  import {
12
12
  pusharyDir
13
- } from "./chunk-25CMVBTJ.js";
13
+ } from "./chunk-JTROZAZT.js";
14
14
  import {
15
15
  resolveGlobalBinary
16
- } from "./chunk-5NFHLMY3.js";
16
+ } from "./chunk-XYGNLWWA.js";
17
17
  import {
18
18
  getApiKey
19
- } from "./chunk-IC5BBT2K.js";
19
+ } from "./chunk-UGGXQKVC.js";
20
20
  import {
21
21
  readJsonSafe,
22
22
  writeFileAtomic,
@@ -29,7 +29,7 @@ import {
29
29
  getPackageVersion,
30
30
  globalPackageFolder,
31
31
  globalRootFor
32
- } from "./chunk-YJHBDJIW.js";
32
+ } from "./chunk-CXQWDQCJ.js";
33
33
  import {
34
34
  isRecord
35
35
  } from "./chunk-HMMVGDL3.js";
@@ -13,13 +13,13 @@ import {
13
13
  } from "./chunk-WHB622LP.js";
14
14
  import {
15
15
  keyPrefix
16
- } from "./chunk-BLVTNQZV.js";
16
+ } from "./chunk-XCPED5AY.js";
17
17
  import {
18
18
  getBaseUrl
19
- } from "./chunk-IC5BBT2K.js";
19
+ } from "./chunk-UGGXQKVC.js";
20
20
  import {
21
21
  NPX_LATEST_COMMAND
22
- } from "./chunk-QQLYMBKM.js";
22
+ } from "./chunk-SVJRFO2D.js";
23
23
  import {
24
24
  isValidApiKey
25
25
  } from "./chunk-HMMVGDL3.js";
@@ -2,11 +2,11 @@ import {
2
2
  forgetPhoneApproval,
3
3
  rememberPhoneApproval,
4
4
  takePhoneApproval
5
- } from "./chunk-BQGNF6BN.js";
5
+ } from "./chunk-H74WROTN.js";
6
6
  import {
7
7
  claudeSettingsLocationFor,
8
8
  readClaudePermissionRules
9
- } from "./chunk-T776F2FQ.js";
9
+ } from "./chunk-JJD2E7UW.js";
10
10
  import {
11
11
  defersToNativeMode
12
12
  } from "./chunk-UXQVXB7Q.js";
@@ -14,10 +14,10 @@ import {
14
14
  askAgentQuestions,
15
15
  outcomeOfFailedAsk,
16
16
  storedWaitDeadline
17
- } from "./chunk-DWLG2IIV.js";
17
+ } from "./chunk-2SJ5EAIM.js";
18
18
  import {
19
19
  reportMachineDenial
20
- } from "./chunk-NFFWCJMJ.js";
20
+ } from "./chunk-NJZ3U2XM.js";
21
21
  import {
22
22
  isGatingMoment,
23
23
  recordKeylessMoment
@@ -25,16 +25,16 @@ import {
25
25
  import {
26
26
  isAdmitted,
27
27
  readAdmissionRules
28
- } from "./chunk-REEDOBPH.js";
28
+ } from "./chunk-3SLTSIVQ.js";
29
29
  import {
30
30
  isDeferAnswer,
31
31
  oncePerSession
32
- } from "./chunk-LFCLDWHZ.js";
32
+ } from "./chunk-RSVVUJT4.js";
33
33
  import {
34
34
  activeHookSource,
35
35
  activeIdentity,
36
36
  namedSource
37
- } from "./chunk-OM7CKAVY.js";
37
+ } from "./chunk-TBHC4AJ3.js";
38
38
  import {
39
39
  DEFAULT_SESSION,
40
40
  approvalAwaitingRetry,
@@ -57,7 +57,7 @@ import {
57
57
  settleQuestionsForToolUse,
58
58
  sweepFilesOlderThan,
59
59
  userScope
60
- } from "./chunk-J7D27BKP.js";
60
+ } from "./chunk-4T2UCDTT.js";
61
61
  import {
62
62
  UNNAMED_ACTION,
63
63
  deriveAction,
@@ -85,7 +85,7 @@ import {
85
85
  waitForQuestion,
86
86
  waitsForThePhone,
87
87
  withdrawQuestion
88
- } from "./chunk-5AGLZUDK.js";
88
+ } from "./chunk-IDZ2KKTJ.js";
89
89
  import {
90
90
  branchFor,
91
91
  projectNameFor,
@@ -94,20 +94,20 @@ import {
94
94
  } from "./chunk-VH5DPURH.js";
95
95
  import {
96
96
  getMachineId
97
- } from "./chunk-5YJSZFZ6.js";
97
+ } from "./chunk-375XMDXC.js";
98
98
  import {
99
99
  POSTTOOLUSE_MIRRORED_TOOLS
100
- } from "./chunk-25CMVBTJ.js";
100
+ } from "./chunk-JTROZAZT.js";
101
101
  import {
102
102
  getApiKey,
103
103
  getBaseUrl
104
- } from "./chunk-IC5BBT2K.js";
104
+ } from "./chunk-UGGXQKVC.js";
105
105
  import {
106
106
  writeFileAtomic
107
107
  } from "./chunk-PM2NRK6Y.js";
108
108
  import {
109
109
  NPX_LATEST_COMMAND
110
- } from "./chunk-QQLYMBKM.js";
110
+ } from "./chunk-SVJRFO2D.js";
111
111
  import {
112
112
  AGENT_QUESTION_STRATEGY,
113
113
  AGENT_QUESTION_TOOL,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  guardBinary
3
- } from "./chunk-25CMVBTJ.js";
3
+ } from "./chunk-JTROZAZT.js";
4
4
 
5
5
  // src/bell/install.ts
6
6
  import { join } from "path";
@@ -536,7 +536,7 @@ var loadedOnce = (load) => {
536
536
  };
537
537
 
538
538
  // src/codex-desktop-proxy.ts
539
- var loadThePhone = () => import("./api-7WWLO6B4.js");
539
+ var loadThePhone = () => import("./api-JB2YWCFT.js");
540
540
  var loadTheCardRouting = () => import("./codex-card-routing-CJZT26VA.js");
541
541
  var theFirstCardLoadsAgain = () => {
542
542
  };
@@ -1097,7 +1097,7 @@ var codexDesktopCommand = async (args, entry, readAccount) => {
1097
1097
  return runCodexDesktopProxy(engine2, args.slice(3), readAccount, { watchesForCards: layoutIsKnown });
1098
1098
  }
1099
1099
  if (args[0] === APP_CARDS_FLAG) {
1100
- const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-NCSFAEUY.js");
1100
+ const { codexAppCardsCommandOnThisMac } = await import("./codex-app-cards-switch-NL4F2GTH.js");
1101
1101
  return codexAppCardsCommandOnThisMac(args.slice(1), entry, readAccount);
1102
1102
  }
1103
1103
  if (args.length > 2) throw new Error("Usage: pushary codex --desktop [path/to/Codex.app]");
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  needsShell
3
- } from "./chunk-TFMIG3VP.js";
3
+ } from "./chunk-3PSNUHC5.js";
4
4
  import {
5
5
  OPENCLAW_ENVIRONMENT_KEYS,
6
6
  openClawEnvironmentOf,
7
7
  openClawPathsFrom
8
- } from "./chunk-25CMVBTJ.js";
8
+ } from "./chunk-JTROZAZT.js";
9
9
  import {
10
10
  resolvePathBinary
11
- } from "./chunk-5NFHLMY3.js";
11
+ } from "./chunk-XYGNLWWA.js";
12
12
  import {
13
13
  isRecord
14
14
  } from "./chunk-HMMVGDL3.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  parseSseMessages
3
- } from "./chunk-MIO242ZB.js";
3
+ } from "./chunk-6ORKZ2XF.js";
4
4
  import {
5
5
  fetchAsCredential
6
6
  } from "./chunk-VEE2MRUN.js";
7
7
  import {
8
8
  NPX_LATEST_COMMAND
9
- } from "./chunk-QQLYMBKM.js";
9
+ } from "./chunk-SVJRFO2D.js";
10
10
 
11
11
  // src/mcp-stdio-bridge.ts
12
12
  var MCP_BRIDGE_BINARY = "pushary-mcp";
@@ -4,7 +4,7 @@ import {
4
4
  claimThrottle,
5
5
  releaseThrottle,
6
6
  reportEvent
7
- } from "./chunk-J7D27BKP.js";
7
+ } from "./chunk-4T2UCDTT.js";
8
8
  import {
9
9
  deriveToolTarget,
10
10
  permissionDeniedAction
@@ -3,13 +3,13 @@ import {
3
3
  NpmMissingError,
4
4
  NpmPermissionError,
5
5
  NpmReleaseAgeError
6
- } from "./chunk-5NFHLMY3.js";
6
+ } from "./chunk-XYGNLWWA.js";
7
7
  import {
8
8
  writeFileAtomic
9
9
  } from "./chunk-PM2NRK6Y.js";
10
10
  import {
11
11
  NPX_LATEST_COMMAND
12
- } from "./chunk-QQLYMBKM.js";
12
+ } from "./chunk-SVJRFO2D.js";
13
13
  import {
14
14
  readSetupAgentFailures
15
15
  } from "./chunk-HMMVGDL3.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-TCE3J44Z.js";
4
4
  import {
5
5
  parseVersion
6
- } from "./chunk-5NFHLMY3.js";
6
+ } from "./chunk-XYGNLWWA.js";
7
7
  import {
8
8
  isRecord
9
9
  } from "./chunk-HMMVGDL3.js";
@@ -4081,6 +4081,7 @@ var savedTranscriptReadPositions = (file) => ({
4081
4081
 
4082
4082
  export {
4083
4083
  external_exports,
4084
+ OWNER_ONLY_FILE_MODE,
4084
4085
  transcriptReadPositionSchema,
4085
4086
  ownedOnlyByThisUser,
4086
4087
  readOwnerOnlyJson,
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  openClawLauncherCandidates
3
- } from "./chunk-ZDROZABP.js";
3
+ } from "./chunk-MWF4L55C.js";
4
4
  import {
5
5
  openCodeConfigDirFrom
6
- } from "./chunk-LOQWIBVV.js";
6
+ } from "./chunk-X6EXXBII.js";
7
7
  import {
8
8
  nativeClaudeInstallPath
9
9
  } from "./chunk-TCE3J44Z.js";
10
10
  import {
11
11
  grokHome
12
- } from "./chunk-OM7CKAVY.js";
12
+ } from "./chunk-TBHC4AJ3.js";
13
13
  import {
14
14
  claudeConfigDir,
15
15
  clineDataDirectory,
16
16
  codexHomeFrom,
17
17
  openClawEnvironmentOf,
18
18
  openClawPathsFrom
19
- } from "./chunk-25CMVBTJ.js";
19
+ } from "./chunk-JTROZAZT.js";
20
20
  import {
21
21
  HOOK_COMPATIBLE_PROFILES
22
22
  } from "./chunk-HMMVGDL3.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  realpath
3
- } from "./chunk-CMQCKXCF.js";
3
+ } from "./chunk-OEUO6C6O.js";
4
4
  import {
5
5
  findNativeClaudeInstall
6
6
  } from "./chunk-TCE3J44Z.js";
@@ -12,7 +12,7 @@ import {
12
12
  resolvePackageVersionFromBinary,
13
13
  resolvePathBinary,
14
14
  resolvePathBinaryAsync
15
- } from "./chunk-5NFHLMY3.js";
15
+ } from "./chunk-XYGNLWWA.js";
16
16
  import {
17
17
  AGENTS,
18
18
  CLAUDE_BRIDGE_CAPABILITY,
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  pusharyHookExecutable
3
- } from "./chunk-5JQQ5IQC.js";
3
+ } from "./chunk-WGODS5EB.js";
4
4
  import {
5
5
  bridgeResolvesToApp,
6
6
  cursorUserHooks,
7
7
  executableFileName,
8
8
  isBridgeLocator,
9
9
  liveBridgeProbe
10
- } from "./chunk-25CMVBTJ.js";
10
+ } from "./chunk-JTROZAZT.js";
11
11
  import {
12
12
  atLeast,
13
13
  parseVersion
14
- } from "./chunk-5NFHLMY3.js";
14
+ } from "./chunk-XYGNLWWA.js";
15
15
  import {
16
16
  CURSOR_GATE_COVERAGE,
17
17
  CURSOR_GATE_SCRIPT,
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-WHB622LP.js";
4
4
  import {
5
5
  ensureDaemonRunning
6
- } from "./chunk-V6OR4WLF.js";
6
+ } from "./chunk-LVMWDCLN.js";
7
7
  import {
8
8
  hookOwnerOf
9
- } from "./chunk-5JQQ5IQC.js";
9
+ } from "./chunk-WGODS5EB.js";
10
10
  import {
11
11
  hookMeaning
12
12
  } from "./chunk-3ULFLONL.js";
@@ -24,31 +24,31 @@ import {
24
24
  uploadTranscriptRecords,
25
25
  verifyAnchoredRecipients,
26
26
  wrapSessionKey
27
- } from "./chunk-ORV2JLNH.js";
27
+ } from "./chunk-F76ZUFUW.js";
28
28
  import {
29
29
  external_exports,
30
30
  ownedOnlyByThisUser,
31
31
  savedTranscriptReadPositions
32
- } from "./chunk-55L4JSPA.js";
32
+ } from "./chunk-P6DUWKAO.js";
33
33
  import {
34
34
  transcriptEnvironmentPreference,
35
35
  transcriptsEnabled
36
- } from "./chunk-CH7WFVC5.js";
36
+ } from "./chunk-247FA7KI.js";
37
37
  import {
38
38
  fetchAsCredential
39
39
  } from "./chunk-VEE2MRUN.js";
40
40
  import {
41
41
  readTranscriptPreference
42
- } from "./chunk-BLVTNQZV.js";
42
+ } from "./chunk-XCPED5AY.js";
43
43
  import {
44
44
  claudeConfigDir,
45
45
  codexHome,
46
46
  pusharyDir
47
- } from "./chunk-25CMVBTJ.js";
47
+ } from "./chunk-JTROZAZT.js";
48
48
  import {
49
49
  getApiKey,
50
50
  getBaseUrl
51
- } from "./chunk-IC5BBT2K.js";
51
+ } from "./chunk-UGGXQKVC.js";
52
52
  import {
53
53
  writeJsonAtomic,
54
54
  writeJsonAtomicDurable