pushary 1.9.270 → 1.9.272
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.
- package/CHANGELOG.md +11 -0
- package/dist/{api-QRQC65E7.js → api-V6AZCXAR.js} +12 -12
- package/dist/bin/pushary-audit.js +3 -3
- package/dist/bin/pushary-bell-hook.js +28 -28
- package/dist/bin/pushary-bell.js +11 -11
- package/dist/bin/pushary-calls.js +14 -14
- package/dist/bin/pushary-claude.js +25 -25
- package/dist/bin/pushary-clean.js +39 -39
- package/dist/bin/pushary-codex-bridge.js +22 -22
- package/dist/bin/pushary-codex-hook.js +34 -34
- package/dist/bin/pushary-codex-session.js +8 -8
- package/dist/bin/pushary-codex.js +16 -16
- package/dist/bin/pushary-connect.js +35 -35
- package/dist/bin/pushary-cowork.js +5 -5
- package/dist/bin/pushary-daemon.js +46 -46
- package/dist/bin/pushary-disconnect.js +30 -30
- package/dist/bin/pushary-doctor.js +48 -48
- package/dist/bin/pushary-elicitation-hook.js +27 -27
- package/dist/bin/pushary-gemini-bridge.js +17 -17
- package/dist/bin/pushary-gemini-hook.js +31 -31
- package/dist/bin/pushary-hook.js +35 -35
- package/dist/bin/pushary-login.js +42 -42
- package/dist/bin/pushary-logout.js +31 -31
- package/dist/bin/pushary-mcp.js +12 -12
- package/dist/bin/pushary-mode.js +15 -15
- package/dist/bin/pushary-notification-hook.js +27 -27
- package/dist/bin/pushary-opencode-bridge.js +21 -21
- package/dist/bin/pushary-opencode-hook.js +32 -32
- package/dist/bin/pushary-permission-denied-hook.js +34 -34
- package/dist/bin/pushary-permission-hook.js +35 -35
- package/dist/bin/pushary-post-hook.js +28 -28
- package/dist/bin/pushary-prompt-hook.js +27 -27
- package/dist/bin/pushary-session-end-hook.js +27 -27
- package/dist/bin/pushary-session-start-hook.js +39 -39
- package/dist/bin/pushary-sessions.js +12 -12
- package/dist/bin/pushary-setup.js +59 -59
- package/dist/bin/pushary-stats.js +5 -5
- package/dist/bin/pushary-status.js +36 -36
- package/dist/bin/pushary-stop-hook.js +27 -27
- package/dist/bin/pushary-stopfailure-hook.js +27 -27
- package/dist/bin/pushary-suggestions.js +15 -15
- package/dist/bin/pushary-transcript-register.js +16 -16
- package/dist/bin/pushary-transcripts.js +25 -25
- package/dist/bin/pushary-upgrade.js +47 -47
- package/dist/bin/pushary-wait.js +16 -16
- package/dist/bin/pushary.js +7 -7
- package/dist/{chunk-BY4SOA5N.js → chunk-24AB4I2Q.js} +1 -1
- package/dist/{chunk-TTU65I6T.js → chunk-2AYA2Q4T.js} +1 -1
- package/dist/{chunk-VMIUZMAD.js → chunk-2OMIVBIJ.js} +3 -3
- package/dist/{chunk-7TVCL4PI.js → chunk-2U54SCMF.js} +1 -1
- package/dist/{chunk-WS7Z6IJV.js → chunk-2Z6QGE5Z.js} +1 -1
- package/dist/{chunk-O63L6PLB.js → chunk-3D2IGVUG.js} +1 -1
- package/dist/{chunk-4O2FHBHY.js → chunk-4HBTPKLA.js} +1 -1
- package/dist/{chunk-AGK5KU7B.js → chunk-5LTGUGH5.js} +2 -2
- package/dist/{chunk-Y4DC5KRB.js → chunk-5M57WNNE.js} +2 -2
- package/dist/{chunk-NJB2WPGE.js → chunk-6OKO3JH7.js} +16 -16
- package/dist/{chunk-CGTPKZWB.js → chunk-76XJYNHJ.js} +4 -4
- package/dist/{chunk-4ZISYOJF.js → chunk-7IG5SDHL.js} +6 -6
- package/dist/{chunk-DFN4FVB6.js → chunk-AJ7KQ5ON.js} +4 -4
- package/dist/{chunk-2ABJ4VCG.js → chunk-B7KMVCOU.js} +1 -1
- package/dist/{chunk-HLJDCM3Z.js → chunk-BXZGIOHQ.js} +1 -1
- package/dist/{chunk-PGXWER6L.js → chunk-CTRRLEAO.js} +5 -5
- package/dist/{chunk-IJCWAVT7.js → chunk-DGIN5ZTR.js} +2 -2
- package/dist/{chunk-VSKX62AG.js → chunk-DJBGRBJ4.js} +1 -1
- package/dist/{chunk-IU4M7QPA.js → chunk-E4QOUYGY.js} +3 -3
- package/dist/{chunk-ARDNSSLS.js → chunk-E5SWZM5J.js} +8 -8
- package/dist/{chunk-J35H5XWH.js → chunk-EK5OOEVT.js} +4 -4
- package/dist/{chunk-B25EAOUY.js → chunk-ENCUSQPW.js} +6 -6
- package/dist/{chunk-RUWD6OFZ.js → chunk-GJMCFAFR.js} +10 -10
- package/dist/{chunk-BIJU6CPZ.js → chunk-GWFD6IHN.js} +1 -1
- package/dist/{chunk-67FOJA34.js → chunk-H4ETQI7P.js} +7 -7
- package/dist/{chunk-GOSMCOHB.js → chunk-H7YSENS4.js} +112 -1
- package/dist/{chunk-RII5XZLB.js → chunk-HKC3ROI4.js} +2 -2
- package/dist/{chunk-3IHL4N2G.js → chunk-HQDF4IG6.js} +6 -6
- package/dist/{chunk-65AS4TO4.js → chunk-HROZFH47.js} +6 -6
- package/dist/{chunk-HHOTW23E.js → chunk-HSS5F3FD.js} +2 -2
- package/dist/{chunk-PJDMIJG7.js → chunk-HYQV6ZME.js} +1 -1
- package/dist/{chunk-VWXR34GR.js → chunk-ILQ3FXD6.js} +5 -5
- package/dist/{chunk-DXPE4F2K.js → chunk-J2HBPBOO.js} +4 -4
- package/dist/{chunk-W2SZOATE.js → chunk-JGNVAUIP.js} +4 -4
- package/dist/{chunk-7JVJ4ZKU.js → chunk-JOMDT672.js} +2 -2
- package/dist/{chunk-EZ5HNO4L.js → chunk-JQTSHK43.js} +1 -1
- package/dist/{chunk-JTLHPORS.js → chunk-JXJBCTP4.js} +10 -10
- package/dist/{chunk-DTGU4J77.js → chunk-JZ735ED3.js} +5 -5
- package/dist/{chunk-DEMI4ZEH.js → chunk-K6G5KKLC.js} +2 -2
- package/dist/{chunk-DQA3PMYT.js → chunk-KAULXGZN.js} +3 -3
- package/dist/{chunk-LATT2QB4.js → chunk-KBNHBMMV.js} +1 -1
- package/dist/{chunk-TVNUXX5O.js → chunk-KMFRQRCJ.js} +144 -19
- package/dist/{chunk-CDGZIVNU.js → chunk-LOHBNKX4.js} +1 -1
- package/dist/{chunk-R6JRCEIX.js → chunk-MCYHCF6L.js} +1 -1
- package/dist/{chunk-O753NJME.js → chunk-MX6KIFKM.js} +1 -1
- package/dist/{chunk-ZX2HQ25K.js → chunk-N3IEGLZH.js} +1 -1
- package/dist/{chunk-MDD4MCQY.js → chunk-N6TBO6TN.js} +1 -1
- package/dist/{chunk-KBT4OBJM.js → chunk-N72TXXA4.js} +3 -3
- package/dist/{chunk-COHRE67K.js → chunk-NRG4C6D4.js} +3 -3
- package/dist/{chunk-GA7L6ZHW.js → chunk-NYWFBBA2.js} +5 -5
- package/dist/{chunk-A2AN2T5O.js → chunk-OBMHV3HF.js} +5 -5
- package/dist/{chunk-2C2XPI5Y.js → chunk-OJM5Q454.js} +1 -1
- package/dist/{chunk-PWDSHCY4.js → chunk-OO5DBKQ5.js} +5 -5
- package/dist/{chunk-DMAN3ZCW.js → chunk-PAJ237T2.js} +4 -4
- package/dist/{chunk-HEBBPZDN.js → chunk-PFMANZLN.js} +7 -7
- package/dist/{chunk-3ZEKDHAX.js → chunk-QTGQLQKS.js} +4 -4
- package/dist/{chunk-PFNWKGAN.js → chunk-RNLXCBPM.js} +4 -4
- package/dist/{chunk-V4PD2R6X.js → chunk-ROQTGFKD.js} +12 -12
- package/dist/{chunk-5G6VZEDJ.js → chunk-RSZN4ORH.js} +3 -3
- package/dist/{chunk-BIY5PLF6.js → chunk-SHZF6YV2.js} +5 -5
- package/dist/{chunk-3TN6OKJ2.js → chunk-SUGOXJRK.js} +5 -5
- package/dist/{chunk-UCK4UKBV.js → chunk-T6WG5UL3.js} +4 -4
- package/dist/{chunk-TZYJNKFN.js → chunk-T7DWOEDI.js} +3 -3
- package/dist/{chunk-JRPOC47L.js → chunk-TBQIK4BQ.js} +1 -1
- package/dist/{chunk-JF6IHH5E.js → chunk-TSC3VB7A.js} +1 -1
- package/dist/{chunk-O4ZFUVDI.js → chunk-UZB4KRJ7.js} +3 -3
- package/dist/{chunk-X3DYMWPL.js → chunk-VBF52KHV.js} +2 -2
- package/dist/{chunk-4JXYINSC.js → chunk-VHS4BDGF.js} +3 -3
- package/dist/{chunk-JL4REHDW.js → chunk-WEOJEBB7.js} +5 -5
- package/dist/{chunk-2GKTNETX.js → chunk-WIPLIUO2.js} +5 -5
- package/dist/{chunk-3P3GPF6O.js → chunk-WNXDHQBZ.js} +11 -11
- package/dist/{chunk-FB25FA3O.js → chunk-WP6L64DT.js} +2 -2
- package/dist/{chunk-UMZ2VLLR.js → chunk-WP7MORRX.js} +6 -6
- package/dist/{chunk-TR5A6H2P.js → chunk-XEVETME7.js} +3 -3
- package/dist/{chunk-OW4AMHJV.js → chunk-XMI6NZRZ.js} +1 -1
- package/dist/{chunk-RFCTFMJS.js → chunk-XNHSJ2XH.js} +1 -1
- package/dist/{chunk-HBU5P5EC.js → chunk-Y6NFDLZW.js} +1 -1
- package/dist/{chunk-PK5JMVGN.js → chunk-YPKQSEMW.js} +1 -1
- package/dist/{chunk-ZGVMX36I.js → chunk-YQL5MMQY.js} +2 -2
- package/dist/{chunk-ZXPNAYQC.js → chunk-ZGJMZMZV.js} +7 -7
- package/dist/{chunk-6Q2D4OON.js → chunk-ZOJGWNO6.js} +2 -2
- package/dist/{chunk-WXQA6JZO.js → chunk-ZUL5HDHO.js} +2 -2
- package/dist/{codex-app-cards-switch-EULJQSJY.js → codex-app-cards-switch-7ETZFP2V.js} +11 -11
- package/dist/{codex-card-routing-RWF7Q5NP.js → codex-card-routing-IUIT2H2X.js} +2 -2
- package/dist/{codex-desktop-launch-6FTCM3KC.js → codex-desktop-launch-DFLSOCLI.js} +3 -3
- package/dist/{codex-session-launch-7L5PTJTO.js → codex-session-launch-FBUP4JEC.js} +21 -21
- package/dist/{config-RUJK4OSC.js → config-IAJ67YJ4.js} +3 -3
- package/dist/{global-upgrade-JASHEAL5.js → global-upgrade-D3ZSV2YS.js} +9 -9
- package/dist/{identity-FKXV4DDS.js → identity-YQLMNPAI.js} +4 -4
- package/dist/{live-capabilities-M5ZFRYQR.js → live-capabilities-FVGPDGYR.js} +4 -4
- package/dist/{paths-OWVAAP4Y.js → paths-W7WE357Y.js} +3 -3
- package/dist/{reapply-P7KARKEQ.js → reapply-2GAZ55JR.js} +34 -34
- package/dist/src/index.js +33 -33
- package/dist/{upgrade-lock-6H24K6S3.js → upgrade-lock-FS2IUNHX.js} +4 -4
- package/dist/{usage-PENWECBI.js → usage-XXP5VY5Z.js} +3 -3
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
uninstallOpenClawPlugin,
|
|
17
17
|
unsetOpenClawEntry,
|
|
18
18
|
writeOpenClawEntry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-E4QOUYGY.js";
|
|
20
20
|
import {
|
|
21
21
|
needsShell
|
|
22
22
|
} from "./chunk-3PSNUHC5.js";
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
openClawDirectoriesToLookIn,
|
|
29
29
|
openClawPluginFolder,
|
|
30
30
|
openClawSetupReceiptDirectory
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-YQL5MMQY.js";
|
|
32
32
|
import {
|
|
33
33
|
resolvePathBinary
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-EK5OOEVT.js";
|
|
35
35
|
import {
|
|
36
36
|
readJsonSafe,
|
|
37
37
|
writeJsonAtomic
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
} from "./chunk-CXQWDQCJ.js";
|
|
43
43
|
import {
|
|
44
44
|
isRecord
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-H7YSENS4.js";
|
|
46
46
|
|
|
47
47
|
// src/hermes/plugin-payload.ts
|
|
48
48
|
import { createHash } from "crypto";
|
|
@@ -1391,7 +1391,7 @@ def _await_decision(request, created, correlation_id: str, offered, uses_select:
|
|
|
1391
1391
|
return _decided(request, correlation_id, "deny", None)
|
|
1392
1392
|
` },
|
|
1393
1393
|
{ 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' },
|
|
1394
|
-
{ 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.
|
|
1394
|
+
{ 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.13",\n "tab": { "hidden": true },\n "entry": "web.js",\n "api": "plugin_api.py"\n}\n' },
|
|
1395
1395
|
{ path: "dashboard/plugin_api.py", contents: `import importlib
|
|
1396
1396
|
import sys
|
|
1397
1397
|
import time
|
|
@@ -1643,6 +1643,7 @@ def shared_answers() -> DesktopAnswers:
|
|
|
1643
1643
|
|
|
1644
1644
|
import hashlib
|
|
1645
1645
|
import contextvars
|
|
1646
|
+
import importlib.util
|
|
1646
1647
|
import json
|
|
1647
1648
|
import logging
|
|
1648
1649
|
import math
|
|
@@ -1658,14 +1659,21 @@ import time
|
|
|
1658
1659
|
from collections.abc import Sequence
|
|
1659
1660
|
from datetime import datetime, timezone
|
|
1660
1661
|
from pathlib import Path, PureWindowsPath
|
|
1661
|
-
from typing import NamedTuple
|
|
1662
|
+
from typing import TYPE_CHECKING, NamedTuple
|
|
1662
1663
|
|
|
1663
1664
|
from . import api
|
|
1664
1665
|
|
|
1666
|
+
if TYPE_CHECKING:
|
|
1667
|
+
from persistence_assembly import Persistence
|
|
1668
|
+
|
|
1665
1669
|
logger = logging.getLogger(__name__)
|
|
1666
1670
|
MAX_DATABASE_ROWS = 25_000
|
|
1667
1671
|
MAX_DATABASE_BYTES = 64_000_000
|
|
1668
1672
|
MAX_SOURCE_BYTES = 64_000_000
|
|
1673
|
+
MAX_LINEAGE_SEGMENTS = 100
|
|
1674
|
+
PAGE_ROWS = 1_000
|
|
1675
|
+
READ_DEADLINE_SECONDS = 2
|
|
1676
|
+
MAX_SNAPSHOT_ATTEMPTS = 3
|
|
1669
1677
|
POLL_SECONDS = 5
|
|
1670
1678
|
SNAPSHOT_REFRESH_SECONDS = 60
|
|
1671
1679
|
AUTHORIZATION_LIFETIME_SECONDS = 60
|
|
@@ -1692,6 +1700,10 @@ CLI_HELPER_RECORD_MAX_BYTES = 8192
|
|
|
1692
1700
|
CLI_HELPER_RECORD_OPEN_FLAGS = os.O_RDONLY | getattr(os, "O_BINARY", 0) | getattr(os, "O_NOFOLLOW", 0) | getattr(os, "O_NONBLOCK", 0)
|
|
1693
1701
|
|
|
1694
1702
|
|
|
1703
|
+
class HistoryTooLarge(ValueError):
|
|
1704
|
+
pass
|
|
1705
|
+
|
|
1706
|
+
|
|
1695
1707
|
class _Authorization(NamedTuple):
|
|
1696
1708
|
inputs: tuple[object, ...]
|
|
1697
1709
|
expires_at: float
|
|
@@ -1768,23 +1780,121 @@ def normalize_messages(rows: Sequence[object]) -> list[dict[str, object]]:
|
|
|
1768
1780
|
return messages
|
|
1769
1781
|
|
|
1770
1782
|
|
|
1771
|
-
def
|
|
1783
|
+
def _require_primary_lineage(lineage: Sequence[str], root: dict[str, object] | None) -> None:
|
|
1784
|
+
if not lineage or len(lineage) > MAX_LINEAGE_SEGMENTS:
|
|
1785
|
+
raise ValueError("Unsupported Hermes compression lineage")
|
|
1786
|
+
if not root or root.get("parent_session_id") or root.get("source") in ("subagent", "tool"):
|
|
1787
|
+
raise ValueError("Child history is not a primary conversation")
|
|
1788
|
+
|
|
1789
|
+
|
|
1790
|
+
def _row_size(row: dict[str, object]) -> int:
|
|
1791
|
+
return sum(len(str(value).encode("utf-8", "surrogatepass")) for value in row.values() if value is not None)
|
|
1792
|
+
|
|
1793
|
+
|
|
1794
|
+
def _page_rows(store: Persistence, session_id: str, deadline: float) -> list[dict[str, object]]:
|
|
1795
|
+
from persistence.conversation.messages import TranscriptRead, TranscriptView
|
|
1796
|
+
|
|
1797
|
+
rows: list[dict[str, object]] = []
|
|
1798
|
+
size = 0
|
|
1799
|
+
while True:
|
|
1800
|
+
page = store.messages.read_transcript(
|
|
1801
|
+
session_id, TranscriptRead(view=TranscriptView.DISPLAY, limit=PAGE_ROWS, offset=len(rows)))
|
|
1802
|
+
wire_rows = [row.as_wire_row() for row in page]
|
|
1803
|
+
size += sum(map(_row_size, wire_rows))
|
|
1804
|
+
rows.extend(wire_rows)
|
|
1805
|
+
if len(rows) > MAX_DATABASE_ROWS or size > MAX_DATABASE_BYTES:
|
|
1806
|
+
raise HistoryTooLarge("Hermes history exceeds the bounded reader limit")
|
|
1807
|
+
if len(page) < PAGE_ROWS:
|
|
1808
|
+
return rows
|
|
1809
|
+
if time.monotonic() > deadline:
|
|
1810
|
+
raise TimeoutError("Hermes history read passed its deadline")
|
|
1811
|
+
|
|
1812
|
+
|
|
1813
|
+
def _whole_display_rows(store: Persistence, session_id: str) -> list[dict[str, object]]:
|
|
1814
|
+
from persistence.conversation.messages import TranscriptRead, TranscriptView
|
|
1815
|
+
|
|
1816
|
+
page = store.messages.read_transcript(session_id, TranscriptRead(view=TranscriptView.DISPLAY, include_lineage=True))
|
|
1817
|
+
rows = [row.as_wire_row() for row in page]
|
|
1818
|
+
if len(rows) > MAX_DATABASE_ROWS or sum(map(_row_size, rows)) > MAX_DATABASE_BYTES:
|
|
1819
|
+
raise HistoryTooLarge("Hermes history exceeds the bounded reader limit")
|
|
1820
|
+
return rows
|
|
1821
|
+
|
|
1822
|
+
|
|
1823
|
+
def _require_bounded_rows(store: Persistence, session_id: str) -> None:
|
|
1824
|
+
from persistence.conversation.messages import ResumeTooLarge
|
|
1825
|
+
|
|
1826
|
+
try:
|
|
1827
|
+
store.messages.assert_resume_safe(session_id, max_messages=MAX_DATABASE_ROWS)
|
|
1828
|
+
except ResumeTooLarge as refusal:
|
|
1829
|
+
raise HistoryTooLarge("Hermes history exceeds the bounded reader limit") from refusal
|
|
1830
|
+
|
|
1831
|
+
|
|
1832
|
+
class _ConversationState(NamedTuple):
|
|
1833
|
+
revision: object
|
|
1834
|
+
stored_rows: tuple[int, int, int]
|
|
1835
|
+
displayed_messages: tuple[int, ...]
|
|
1836
|
+
active_messages: tuple[tuple[int, ...], ...]
|
|
1837
|
+
|
|
1838
|
+
|
|
1839
|
+
def _conversation_state(store: Persistence, session_id: str) -> _ConversationState:
|
|
1840
|
+
revision = store.messages.conversation_revision(session_id, include_lineage=True)
|
|
1841
|
+
lineage = revision.lineage_ids
|
|
1842
|
+
return _ConversationState(
|
|
1843
|
+
revision,
|
|
1844
|
+
store.messages.transcript_cursor_state(session_id, revision.max_active_id, lineage),
|
|
1845
|
+
tuple(store.messages.display_count(segment) for segment in lineage),
|
|
1846
|
+
tuple(store.messages.active_message_ids(segment) for segment in lineage),
|
|
1847
|
+
)
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
def _display_rows(store: Persistence, session_id: str, deadline: float) -> list[dict[str, object]]:
|
|
1851
|
+
if store.sessions.get(session_id) is None:
|
|
1852
|
+
raise ValueError("Hermes session is not in this profile")
|
|
1853
|
+
lineage = store.lineage.resume_lineage_ids(session_id)
|
|
1854
|
+
root = store.sessions.get(lineage[0]) if lineage else None
|
|
1855
|
+
_require_primary_lineage(lineage, root.as_session_row() if root else None)
|
|
1856
|
+
if len(lineage) == 1 and store.messages.display_index_complete(session_id):
|
|
1857
|
+
return _page_rows(store, session_id, deadline)
|
|
1858
|
+
return _whole_display_rows(store, session_id)
|
|
1859
|
+
|
|
1860
|
+
|
|
1861
|
+
def _read_through_storage_interface(store: Persistence, session_id: str) -> list[dict[str, object]]:
|
|
1862
|
+
deadline = time.monotonic() + READ_DEADLINE_SECONDS
|
|
1863
|
+
for _ in range(MAX_SNAPSHOT_ATTEMPTS):
|
|
1864
|
+
refusal: ValueError | None = None
|
|
1865
|
+
rows: list[dict[str, object]] = []
|
|
1866
|
+
with store.messages.read_snapshot():
|
|
1867
|
+
_require_bounded_rows(store, session_id)
|
|
1868
|
+
before = _conversation_state(store, session_id)
|
|
1869
|
+
try:
|
|
1870
|
+
rows = _display_rows(store, session_id, deadline)
|
|
1871
|
+
except HistoryTooLarge:
|
|
1872
|
+
raise
|
|
1873
|
+
except ValueError as error:
|
|
1874
|
+
refusal = error
|
|
1875
|
+
unchanged = _conversation_state(store, session_id) == before
|
|
1876
|
+
if unchanged and refusal is not None:
|
|
1877
|
+
raise refusal
|
|
1878
|
+
if unchanged:
|
|
1879
|
+
return rows
|
|
1880
|
+
if time.monotonic() > deadline:
|
|
1881
|
+
break
|
|
1882
|
+
raise TimeoutError("Hermes history kept changing while it was read")
|
|
1883
|
+
|
|
1884
|
+
|
|
1885
|
+
def _read_through_session_database(database_path: Path, session_id: str) -> list[dict[str, object]]:
|
|
1772
1886
|
from hermes_state import SessionDB
|
|
1773
1887
|
|
|
1774
1888
|
database = SessionDB(db_path=database_path, read_only=True)
|
|
1775
1889
|
try:
|
|
1776
1890
|
connection = database._conn
|
|
1777
|
-
deadline = time.monotonic() +
|
|
1891
|
+
deadline = time.monotonic() + READ_DEADLINE_SECONDS
|
|
1778
1892
|
connection.set_progress_handler(lambda: int(time.monotonic() > deadline), 1000)
|
|
1779
1893
|
connection.execute("BEGIN")
|
|
1780
1894
|
if database.get_session(session_id) is None:
|
|
1781
1895
|
raise ValueError("Hermes session is not in this profile")
|
|
1782
1896
|
lineage = database._resume_lineage_ids(session_id)
|
|
1783
|
-
|
|
1784
|
-
raise ValueError("Unsupported Hermes compression lineage")
|
|
1785
|
-
root = database.get_session(lineage[0])
|
|
1786
|
-
if not root or root.get("parent_session_id") or root.get("source") in ("subagent", "tool"):
|
|
1787
|
-
raise ValueError("Child history is not a primary conversation")
|
|
1897
|
+
_require_primary_lineage(lineage, database.get_session(lineage[0]) if lineage else None)
|
|
1788
1898
|
columns = [row[1] for row in connection.execute("PRAGMA table_info(messages)")]
|
|
1789
1899
|
required = {"id", "session_id", "role", "content", "timestamp", "active", "compacted", "display_kind", "message_uid"}
|
|
1790
1900
|
if not required.issubset(columns):
|
|
@@ -1796,13 +1906,25 @@ def read_display_history(database_path: Path, session_id: str) -> list[dict[str,
|
|
|
1796
1906
|
f"SELECT COUNT(*), SUM({row_bytes}) FROM messages WHERE session_id IN ({placeholders})", lineage
|
|
1797
1907
|
).fetchone()
|
|
1798
1908
|
if count > MAX_DATABASE_ROWS or (size or 0) > MAX_DATABASE_BYTES:
|
|
1799
|
-
raise
|
|
1800
|
-
|
|
1801
|
-
return normalize_messages(rows)
|
|
1909
|
+
raise HistoryTooLarge("Hermes history exceeds the bounded reader limit")
|
|
1910
|
+
return database.get_messages(session_id, include_compacted=True, include_ancestors=True, limit=MAX_DATABASE_ROWS)
|
|
1802
1911
|
finally:
|
|
1803
1912
|
database.close()
|
|
1804
1913
|
|
|
1805
1914
|
|
|
1915
|
+
def _has_storage_interface() -> bool:
|
|
1916
|
+
return importlib.util.find_spec("persistence_assembly") is not None
|
|
1917
|
+
|
|
1918
|
+
|
|
1919
|
+
def read_display_history(database_path: Path, session_id: str) -> list[dict[str, object]]:
|
|
1920
|
+
if not _has_storage_interface():
|
|
1921
|
+
return normalize_messages(_read_through_session_database(database_path, session_id))
|
|
1922
|
+
from persistence_assembly import open_persistence_reader
|
|
1923
|
+
|
|
1924
|
+
with open_persistence_reader(database_path, patience_s=READ_DEADLINE_SECONDS) as store:
|
|
1925
|
+
return normalize_messages(_read_through_storage_interface(store, session_id))
|
|
1926
|
+
|
|
1927
|
+
|
|
1806
1928
|
def write_snapshot(path: Path, session_id: str, messages: list[dict[str, object]], error: str | None = None, completed: bool = False) -> None:
|
|
1807
1929
|
value = {"version": 1, "sessionId": session_id, "updatedAtMs": int(time.time() * 1000), "messages": messages, "completed": completed}
|
|
1808
1930
|
if error:
|
|
@@ -2069,6 +2191,7 @@ def _export_loop(database_path: Path, session_id: str, key: str, command: list[s
|
|
|
2069
2191
|
source_state = None
|
|
2070
2192
|
written = None
|
|
2071
2193
|
warned = False
|
|
2194
|
+
too_large = False
|
|
2072
2195
|
revoked = False
|
|
2073
2196
|
try:
|
|
2074
2197
|
while True:
|
|
@@ -2079,13 +2202,15 @@ def _export_loop(database_path: Path, session_id: str, key: str, command: list[s
|
|
|
2079
2202
|
now = time.time()
|
|
2080
2203
|
refresh_due = ending or _snapshot_refresh_due(written_at, now)
|
|
2081
2204
|
current_state = _source_state(database_path)
|
|
2082
|
-
if refresh_due or current_state != source_state:
|
|
2205
|
+
if refresh_due or (current_state != source_state and not too_large):
|
|
2083
2206
|
source_state = current_state
|
|
2084
2207
|
error = None
|
|
2208
|
+
too_large = False
|
|
2085
2209
|
try:
|
|
2086
2210
|
messages = read_display_history(database_path, session_id)
|
|
2087
2211
|
except Exception as failure:
|
|
2088
2212
|
messages, error = [], SOURCE_UNAVAILABLE
|
|
2213
|
+
too_large = isinstance(failure, HistoryTooLarge)
|
|
2089
2214
|
if not _is_permanent_source_failure(failure):
|
|
2090
2215
|
source_state = None
|
|
2091
2216
|
try:
|
|
@@ -2172,7 +2297,7 @@ def stop_history(session_id: str) -> None:
|
|
|
2172
2297
|
if thread.is_alive():
|
|
2173
2298
|
logger.warning("[pushary] Hermes final history export is still pending")
|
|
2174
2299
|
` },
|
|
2175
|
-
{ path: "host.py", contents: 'import os\n\nTRANSPORT_NAME = "pushary"\n\nHOOK_TIMEOUT_DEFAULT_SECONDS = 30.0\nHOOK_TIMEOUT_MAX_SECONDS = 600.0\n\nGATE_HEADROOM_SECONDS = 5.0\nGATE_MIN_SECONDS = 5.0\nGATE_MAX_SECONDS = 55.0\n\n# The last Hermes that runs a pre_tool_call callback to completion. Anything\n# after this abandons one that outlives plugins.hook_callback_timeout.\nUNBOUNDED_THROUGH_VERSION = (0, 20, 5)\n\n\ndef _config():\n try:\n from hermes_cli.config import load_config_readonly\n\n loaded = load_config_readonly()\n except Exception:\n return {}\n return loaded if isinstance(loaded, dict) else {}\n\n\ndef _section(node, *path):\n for key in path:\n node = node.get(key) if isinstance(node, dict) else None\n if node is None:\n return {}\n return node if isinstance(node, dict) else {}\n\n\ndef profile_secret(name):\n try:\n from agent.secret_scope import get_secret\n except Exception:\n return os.environ.get(name) or None\n try:\n return get_secret(name) or None\n except Exception:\n return None\n\n\ndef hermes_version_label():\n try:\n from importlib.metadata import version\n\n return version("hermes-cli")\n except Exception:\n try:\n import hermes_cli\n\n label = getattr(hermes_cli, "__version__", None)\n except Exception:\n return None\n return str(label) if label else None\n\n\ndef _hermes_version():\n """This Hermes as a comparable tuple, or None when it will not say."""\n raw = hermes_version_label()\n if not raw:\n return None\n parts = []\n for piece in str(raw).split(".")[:3]:\n digits = ""\n for char in piece:\n if not char.isdigit():\n break\n digits += char\n if not digits:\n return None\n parts.append(int(digits))\n while len(parts) < 3:\n parts.append(0)\n return tuple(parts)\n\n\ndef bounds_pre_tool_call():\n """Whether this Hermes abandons a slow pre_tool_call callback.\n\n The timeout was added after 0.20.5, which runs plugin hooks to completion.\n Clamping the wait on a host that would never have cut it off just shortens\n the window the user has to answer, for nothing.\n\n Unreadable means assume bounded. A wait that is shorter than it had to be\n costs the user seconds; a wait longer than the host allows costs them the\n answer they already gave.\n\n That rule is why the private symbol is not asked on its own. `hasattr` on\n `_HOOK_TIMEOUT_FAIL_CLOSED_HOOKS` cannot tell "this host runs hooks to\n completion" apart from "the private name moved", and those two answers want\n opposite behaviour: the first earns the full window, the second spends 55\n seconds against a budget of 30 and loses an answer the user already gave.\n A rename is the likelier of the two, because a private name is the one thing\n a host is free to change. So the symbol is taken as proof of bounded, and\n only a version this side of the timeout landing is taken as proof of the\n other. Anything unreadable falls to bounded.\n """\n try:\n from hermes_cli import plugins\n except Exception:\n return True\n if hasattr(plugins, "_HOOK_TIMEOUT_FAIL_CLOSED_HOOKS"):\n return True\n version = _hermes_version()\n if version is None:\n return True\n return version > UNBOUNDED_THROUGH_VERSION\n\n\ndef hook_callback_timeout_seconds():\n raw = _section(_config(), "plugins").get("hook_callback_timeout")\n if raw is None:\n return HOOK_TIMEOUT_DEFAULT_SECONDS\n try:\n timeout = float(raw)\n except (TypeError, ValueError):\n return HOOK_TIMEOUT_DEFAULT_SECONDS\n if timeout < 0:\n return HOOK_TIMEOUT_DEFAULT_SECONDS\n return min(timeout, HOOK_TIMEOUT_MAX_SECONDS)\n\n\ndef gate_budget_seconds(requested_seconds):\n if not bounds_pre_tool_call():\n return max(1.0, min(float(requested_seconds), GATE_MAX_SECONDS))\n timeout = hook_callback_timeout_seconds()\n ceiling = (\n GATE_MAX_SECONDS\n if timeout <= 0\n else max(GATE_MIN_SECONDS, timeout - GATE_HEADROOM_SECONDS)\n )\n return max(1.0, min(float(requested_seconds), ceiling, GATE_MAX_SECONDS))\n\n\ndef terminal_config():\n return _section(_config(), "terminal")\n\n\ndef pushary_is_selected_transport():\n selected = _section(_config(), "security", "approval").get("transport")\n return str(selected or "").strip().lower() == TRANSPORT_NAME\n' },
|
|
2300
|
+
{ path: "host.py", contents: 'import os\n\nTRANSPORT_NAME = "pushary"\n\nHOOK_TIMEOUT_DEFAULT_SECONDS = 30.0\nHOOK_TIMEOUT_MAX_SECONDS = 600.0\n\nGATE_HEADROOM_SECONDS = 5.0\nGATE_MIN_SECONDS = 5.0\nGATE_MAX_SECONDS = 55.0\n\n# The last Hermes that runs a pre_tool_call callback to completion. Anything\n# after this abandons one that outlives plugins.hook_callback_timeout.\nUNBOUNDED_THROUGH_VERSION = (0, 20, 5)\nUNSTAMPED_VERSION = (0, 0, 0)\n\n\ndef _config():\n try:\n from hermes_cli.config import load_config_readonly\n\n loaded = load_config_readonly()\n except Exception:\n return {}\n return loaded if isinstance(loaded, dict) else {}\n\n\ndef _section(node, *path):\n for key in path:\n node = node.get(key) if isinstance(node, dict) else None\n if node is None:\n return {}\n return node if isinstance(node, dict) else {}\n\n\ndef profile_secret(name):\n try:\n from agent.secret_scope import get_secret\n except Exception:\n return os.environ.get(name) or None\n try:\n return get_secret(name) or None\n except Exception:\n return None\n\n\ndef hermes_version_label():\n try:\n from importlib.metadata import version\n\n return version("hermes-cli")\n except Exception:\n try:\n import hermes_cli\n\n label = getattr(hermes_cli, "__version__", None)\n except Exception:\n return None\n return str(label) if label else None\n\n\ndef _hermes_version():\n """This Hermes as a comparable tuple, or None when it will not say."""\n raw = hermes_version_label()\n if not raw:\n return None\n parts = []\n for piece in str(raw).split(".")[:3]:\n digits = ""\n for char in piece:\n if not char.isdigit():\n break\n digits += char\n if not digits:\n return None\n parts.append(int(digits))\n while len(parts) < 3:\n parts.append(0)\n return tuple(parts)\n\n\ndef bounds_pre_tool_call():\n """Whether this Hermes abandons a slow pre_tool_call callback.\n\n The timeout was added after 0.20.5, which runs plugin hooks to completion.\n Clamping the wait on a host that would never have cut it off just shortens\n the window the user has to answer, for nothing.\n\n Unreadable means assume bounded. A wait that is shorter than it had to be\n costs the user seconds; a wait longer than the host allows costs them the\n answer they already gave.\n\n That rule is why the private symbol is not asked on its own. `hasattr` on\n `_HOOK_TIMEOUT_FAIL_CLOSED_HOOKS` cannot tell "this host runs hooks to\n completion" apart from "the private name moved", and those two answers want\n opposite behaviour: the first earns the full window, the second spends 55\n seconds against a budget of 30 and loses an answer the user already gave.\n A rename is the likelier of the two, because a private name is the one thing\n a host is free to change. So the symbol is taken as proof of bounded, and\n only a version this side of the timeout landing is taken as proof of the\n other. Anything unreadable falls to bounded.\n """\n try:\n from hermes_cli import plugins\n except Exception:\n return True\n if hasattr(plugins, "_HOOK_TIMEOUT_FAIL_CLOSED_HOOKS"):\n return True\n version = _hermes_version()\n if version is None or version == UNSTAMPED_VERSION:\n return True\n return version > UNBOUNDED_THROUGH_VERSION\n\n\ndef hook_callback_timeout_seconds():\n raw = _section(_config(), "plugins").get("hook_callback_timeout")\n if raw is None:\n return HOOK_TIMEOUT_DEFAULT_SECONDS\n try:\n timeout = float(raw)\n except (TypeError, ValueError):\n return HOOK_TIMEOUT_DEFAULT_SECONDS\n if timeout < 0:\n return HOOK_TIMEOUT_DEFAULT_SECONDS\n return min(timeout, HOOK_TIMEOUT_MAX_SECONDS)\n\n\ndef gate_budget_seconds(requested_seconds):\n if not bounds_pre_tool_call():\n return max(1.0, min(float(requested_seconds), GATE_MAX_SECONDS))\n timeout = hook_callback_timeout_seconds()\n ceiling = (\n GATE_MAX_SECONDS\n if timeout <= 0\n else max(GATE_MIN_SECONDS, timeout - GATE_HEADROOM_SECONDS)\n )\n return max(1.0, min(float(requested_seconds), ceiling, GATE_MAX_SECONDS))\n\n\ndef terminal_config():\n return _section(_config(), "terminal")\n\n\ndef pushary_is_selected_transport():\n selected = _section(_config(), "security", "approval").get("transport")\n return str(selected or "").strip().lower() == TRANSPORT_NAME\n' },
|
|
2176
2301
|
{ path: "identity.py", contents: 'import hashlib\nimport os\nimport re\nimport socket\nfrom pathlib import Path\n\nDEFAULT_AGENT_NAME = "Hermes"\nMAX_ID_LENGTH = 128\nSHARED_MACHINE_ID_FILE = Path.home() / ".pushary" / "machine-id"\nSHARED_MACHINE_ID_PATTERN = re.compile(r"^[A-Za-z0-9-]{1,128}$")\n\n_session_id = None\n\n\ndef agent_name():\n return os.environ.get("PUSHARY_AGENT_NAME", DEFAULT_AGENT_NAME)\n\n\ndef labelled_agent_name(requested):\n project = str(requested or "").partition(" - ")[2].strip()\n return f"{agent_name()} - {project}" if project else agent_name()\n\n\ndef shared_machine_id(path=None):\n try:\n value = (path or SHARED_MACHINE_ID_FILE).read_text(encoding="utf-8").strip()\n except OSError:\n return None\n return value if SHARED_MACHINE_ID_PATTERN.match(value) else None\n\n\ndef hostname_machine_id():\n try:\n host = socket.gethostname()\n except Exception:\n return None\n if not host:\n return None\n return hashlib.sha256(host.encode("utf-8")).hexdigest()[:8]\n\n\ndef machine_id():\n return shared_machine_id() or hostname_machine_id()\n\n\ndef remember_session(value):\n global _session_id\n if value:\n _session_id = str(value)[:MAX_ID_LENGTH]\n\n\ndef forget_session():\n global _session_id\n _session_id = None\n\n\ndef session_id():\n return _session_id\n' },
|
|
2177
2302
|
{ path: "installation.py", contents: `import json
|
|
2178
2303
|
import logging
|
|
@@ -2303,7 +2428,7 @@ def record_plugin_load(approval_transport_registered, home=None, pid=None, now=N
|
|
|
2303
2428
|
logger.debug("[pushary] could not record the plugin load: %s", exc)
|
|
2304
2429
|
return None
|
|
2305
2430
|
` },
|
|
2306
|
-
{ path: "plugin.yaml", contents: 'name: pushary\nversion: 1.0.
|
|
2431
|
+
{ path: "plugin.yaml", contents: 'name: pushary\nversion: 1.0.13\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' },
|
|
2307
2432
|
{ 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" },
|
|
2308
2433
|
{ path: "schemas.py", contents: `PUSHARY_REMIND = {
|
|
2309
2434
|
"name": "pushary_remind",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pusharyFetch
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XEVETME7.js";
|
|
4
4
|
import {
|
|
5
5
|
getBaseUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-K6G5KKLC.js";
|
|
7
7
|
import {
|
|
8
8
|
NetworkError
|
|
9
9
|
} from "./chunk-CINBAX5G.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
isValidApiKey,
|
|
15
15
|
normalizeKeyScope
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-H7YSENS4.js";
|
|
17
17
|
|
|
18
18
|
// src/session.ts
|
|
19
19
|
var samePusharyAccount = (left, right) => left.kind === "ok" && right.kind === "ok" && left.identity.workspaceId !== "" && left.identity.workspaceId === right.identity.workspaceId && left.identity.siteId === right.identity.siteId;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETUP_FLAGS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YPKQSEMW.js";
|
|
4
4
|
import {
|
|
5
5
|
parseFlags
|
|
6
6
|
} from "./chunk-BZIBNSQE.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-CINBAX5G.js";
|
|
10
10
|
import {
|
|
11
11
|
NPX_LATEST_COMMAND
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MX6KIFKM.js";
|
|
13
13
|
import {
|
|
14
14
|
CLAUDE_CONNECTOR_GUIDE,
|
|
15
15
|
CLAUDE_CONNECTOR_STEPS,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
CLAUDE_CONNECTOR_URL,
|
|
18
18
|
COWORK_CONNECTOR_LIMIT,
|
|
19
19
|
COWORK_STANDING_INSTRUCTIONS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-H7YSENS4.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/cowork.ts
|
|
23
23
|
import { readFileSync } from "fs";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UNSET_IGNORED_SHELL_VALUE_STEP
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AJ7KQ5ON.js";
|
|
4
4
|
import {
|
|
5
5
|
notificationAnswerStep
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WP7MORRX.js";
|
|
7
7
|
import {
|
|
8
8
|
matchMacAccountStep,
|
|
9
9
|
retryAgentCommand
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VHS4BDGF.js";
|
|
11
11
|
import {
|
|
12
12
|
NPX_LATEST_COMMAND,
|
|
13
13
|
npmExecSetupCommandFor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MX6KIFKM.js";
|
|
15
15
|
import {
|
|
16
16
|
EXIT
|
|
17
17
|
} from "./chunk-BG4HHB7E.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
compatibleProfileFor,
|
|
23
23
|
isCompatibleAgentType
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-H7YSENS4.js";
|
|
25
25
|
|
|
26
26
|
// src/setup/closing.ts
|
|
27
27
|
var ACTIVITY_URL = "pushary.com/dashboard/agent/activity";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cursorGateOwnsClaudeCall,
|
|
3
3
|
readCursorGateRegistration
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UZB4KRJ7.js";
|
|
5
5
|
import {
|
|
6
6
|
registerTranscript
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JXJBCTP4.js";
|
|
8
8
|
import {
|
|
9
9
|
namedEvent
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HQDF4IG6.js";
|
|
11
11
|
import {
|
|
12
12
|
writeDegraded
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZGJMZMZV.js";
|
|
14
14
|
import {
|
|
15
15
|
claudeShapedHookInput,
|
|
16
16
|
hookCompatibleProfileBySource,
|
|
17
17
|
isGrokHookPayload,
|
|
18
18
|
isGrokSessionEndStop
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-H7YSENS4.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"];
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
configFailureKind,
|
|
5
5
|
retryAgentCommand,
|
|
6
6
|
writeSetupConfigFile
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VHS4BDGF.js";
|
|
8
8
|
import {
|
|
9
9
|
MCP_BRIDGE_BINARY
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-76XJYNHJ.js";
|
|
11
11
|
import {
|
|
12
12
|
KEY_FILE_MODE
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JOMDT672.js";
|
|
14
14
|
import {
|
|
15
15
|
CLINE_SERVER_NAME_TAKEN,
|
|
16
16
|
CLINE_SETTINGS_REFUSALS,
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
withClinePusharyServer,
|
|
33
33
|
withRefreshedClineKey,
|
|
34
34
|
withoutClinePusharyServer
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-YQL5MMQY.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveGlobalBinary
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-EK5OOEVT.js";
|
|
39
39
|
import {
|
|
40
40
|
readJsonSafe,
|
|
41
41
|
writeFileAtomic,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CODEX_HOOK_STATUS,
|
|
3
3
|
HERMES_HISTORY_HELPER_COMMAND
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RSZN4ORH.js";
|
|
5
5
|
import {
|
|
6
6
|
HERMES_ALWAYS_ALLOWED_SHELL_RULE,
|
|
7
7
|
HERMES_COMMAND_ALLOWLIST_KEY,
|
|
8
8
|
HERMES_GATE_TOOLS_KEY,
|
|
9
9
|
HERMES_SHELL_TOOL
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KMFRQRCJ.js";
|
|
11
11
|
import {
|
|
12
12
|
retryAgentCommand
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VHS4BDGF.js";
|
|
14
14
|
import {
|
|
15
15
|
NPX_LATEST_COMMAND
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MX6KIFKM.js";
|
|
17
17
|
|
|
18
18
|
// src/setup/codex-trust.ts
|
|
19
19
|
var CODEX_TRUST_TELEMETRY = {
|
|
@@ -2,31 +2,31 @@ import {
|
|
|
2
2
|
SIGNED_OUT_ON_MAC_MESSAGE,
|
|
3
3
|
describeSignedOutKey,
|
|
4
4
|
readSignedOutDiagnosis
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZUL5HDHO.js";
|
|
6
6
|
import {
|
|
7
7
|
APPROVAL_RULES_PATH
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZOJGWNO6.js";
|
|
9
9
|
import {
|
|
10
10
|
createIo
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LOHBNKX4.js";
|
|
12
12
|
import {
|
|
13
13
|
absoluteUrl,
|
|
14
14
|
checkApiKey,
|
|
15
15
|
describeKeyCheck,
|
|
16
16
|
keyCheckFromResponse
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-N72TXXA4.js";
|
|
18
18
|
import {
|
|
19
19
|
readKeySource
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JOMDT672.js";
|
|
21
21
|
import {
|
|
22
22
|
getBaseUrl
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-K6G5KKLC.js";
|
|
24
24
|
import {
|
|
25
25
|
EXIT
|
|
26
26
|
} from "./chunk-BG4HHB7E.js";
|
|
27
27
|
import {
|
|
28
28
|
KEY_SCOPE
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-H7YSENS4.js";
|
|
30
30
|
|
|
31
31
|
// src/cli/report-key.ts
|
|
32
32
|
var { dim, yellow } = createIo();
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compatibleConfigFile,
|
|
3
3
|
hasCompatibleHooks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HQDF4IG6.js";
|
|
5
5
|
import {
|
|
6
6
|
pusharyHookExecutable
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JGNVAUIP.js";
|
|
8
8
|
import {
|
|
9
9
|
isProtectedByScope,
|
|
10
10
|
registerHookEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YQL5MMQY.js";
|
|
12
12
|
import {
|
|
13
13
|
isRecord
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-H7YSENS4.js";
|
|
15
15
|
|
|
16
16
|
// src/cursor-config.ts
|
|
17
17
|
var hookCommandOf = (entry) => {
|
|
@@ -4,21 +4,21 @@ import {
|
|
|
4
4
|
claimThrottle,
|
|
5
5
|
releaseThrottle,
|
|
6
6
|
reportEvent
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WNXDHQBZ.js";
|
|
8
8
|
import {
|
|
9
9
|
deriveToolTarget,
|
|
10
10
|
permissionDeniedAction
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2AYA2Q4T.js";
|
|
12
12
|
import {
|
|
13
13
|
projectNameFor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-XNHSJ2XH.js";
|
|
15
15
|
import {
|
|
16
16
|
PERMISSION_ALLOWED_EVENT,
|
|
17
17
|
PERMISSION_DENIED_EVENT,
|
|
18
18
|
machineApprovalFor,
|
|
19
19
|
machineDecisionFor,
|
|
20
20
|
wireVerdictFor
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-H7YSENS4.js";
|
|
22
22
|
|
|
23
23
|
// src/machine-decision-audit.ts
|
|
24
24
|
var MACHINE_DECISION_REPORT_TIMEOUT_MS = 800;
|