pushary 1.9.225 → 1.9.226
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 +4 -0
- package/dist/bin/pushary-clean.js +1 -1
- package/dist/bin/pushary-codex-hook.js +1 -1
- package/dist/bin/pushary-daemon.js +2 -2
- package/dist/bin/pushary-doctor.js +3 -3
- package/dist/bin/pushary-session-start-hook.js +2 -2
- package/dist/bin/pushary-setup.js +3 -3
- package/dist/bin/pushary-upgrade.js +3 -3
- package/dist/{chunk-BMQMT2LQ.js → chunk-ICQXFHKK.js} +1 -1
- package/dist/{chunk-6LNEYLGC.js → chunk-J4376P43.js} +1 -1
- package/dist/{chunk-EPJQPPBU.js → chunk-MOP7H37W.js} +56 -9
- package/dist/{chunk-WA737SQM.js → chunk-SDK32R3Z.js} +1 -1
- package/dist/{reapply-MCB2MIQN.js → reapply-XK24CQVA.js} +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.226
|
|
4
|
+
|
|
5
|
+
- `npx pushary setup --agents hermes` and `pushary upgrade` now install the Pushary Hermes plugin 1.0.9. When Hermes asks to run a dangerous command longer than 4,000 characters, the plugin cuts it so that it ends with `… [truncated]`, the way this CLI cuts a long command, and Pushary stores that approval as risky with "Pushary could not check this step", because a step after the cut was never read. When Pushary is not Hermes's approval transport, a `terminal` call gated with `PUSHARY_GATE_TOOLS` sends its command the same way. With Pushary as the approval transport, which setup selects, a gated call reaches Pushary as Hermes's own four-choice approval, carrying a label instead of the command and a 500-character summary, as in 1.0.8. On Pushary app 1.0.66 or later a yes or no approval, such as that gated `terminal` call or a Hermes approval that offers only Allow once and Deny, gets the risky card, whose Approve asks for Face ID, Touch ID or the passcode, and a notification that offers Deny only. Hermes's usual four-choice approval shows the `… [truncated]` mark and keeps its ordinary choices. Other gated tools send the same short summary as before.
|
|
6
|
+
|
|
3
7
|
## 1.9.225
|
|
4
8
|
|
|
5
9
|
- The CLI no longer sends a `PUSHARY_API_KEY` that is not a Pushary API key. A Pushary key is `pk_`, hex, a dot and more hex, and any other value can never sign in. If the key that `login` or `setup` saved in `~/.pushary/config.json` is valid, the hooks, the MCP bridge, `pushary connect` and `pushary sessions` use it instead, and `pushary status` and `pushary doctor` say the environment value is ignored. If there is no valid key, Pushary is off on that machine: the hooks and the MCP bridge make no requests and leave every call to the agent, as on a machine with no key, and say once per session to run `npx pushary@latest login`. A valid key in the environment still wins over the saved one. The Cursor and VS Code plugin gates still read `PUSHARY_API_KEY` as before.
|
|
@@ -1084,7 +1084,7 @@ var decidePreToolUse = async (input) => {
|
|
|
1084
1084
|
};
|
|
1085
1085
|
var repairCodexHoldsQuietly = async () => {
|
|
1086
1086
|
try {
|
|
1087
|
-
const { repairCodexHolds } = await import("../reapply-
|
|
1087
|
+
const { repairCodexHolds } = await import("../reapply-XK24CQVA.js");
|
|
1088
1088
|
repairCodexHolds();
|
|
1089
1089
|
} catch {
|
|
1090
1090
|
return;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "../chunk-PCWVQ6PT.js";
|
|
6
6
|
import {
|
|
7
7
|
inspectConfiguredManagedProviders
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-ICQXFHKK.js";
|
|
9
9
|
import "../chunk-TWWOQKXK.js";
|
|
10
10
|
import "../chunk-K6JUQVL6.js";
|
|
11
11
|
import "../chunk-TUACBIHO.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
HERMES_INSTALL_MARKER_FILE,
|
|
26
26
|
defaultHermesHome,
|
|
27
27
|
parseHermesInstallMarker
|
|
28
|
-
} from "../chunk-
|
|
28
|
+
} from "../chunk-MOP7H37W.js";
|
|
29
29
|
import {
|
|
30
30
|
writeHuman
|
|
31
31
|
} from "../chunk-QCGNGEGE.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
openClawRepairStep,
|
|
5
5
|
readHermesShellGate,
|
|
6
6
|
readSetupFailure
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-J4376P43.js";
|
|
8
8
|
import {
|
|
9
9
|
CODEX_HOOK_REMEDY,
|
|
10
10
|
HERMES_RESTART_COMMAND,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
describeHermesShellGate,
|
|
13
13
|
describeHermesState,
|
|
14
14
|
hermesRepairStep
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-SDK32R3Z.js";
|
|
16
16
|
import {
|
|
17
17
|
describeWaitLadder
|
|
18
18
|
} from "../chunk-CVWG2N3Y.js";
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
routesHermesQuestions,
|
|
82
82
|
runsAnOlderPlugin,
|
|
83
83
|
shippedHermesPlugin
|
|
84
|
-
} from "../chunk-
|
|
84
|
+
} from "../chunk-MOP7H37W.js";
|
|
85
85
|
import "../chunk-QCGNGEGE.js";
|
|
86
86
|
import {
|
|
87
87
|
findOpenClawLauncher,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
reapplyClaudeForVersion
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-ICQXFHKK.js";
|
|
5
5
|
import "../chunk-TWWOQKXK.js";
|
|
6
6
|
import "../chunk-7D2FYVBW.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-MOP7H37W.js";
|
|
8
8
|
import "../chunk-THE2SPHY.js";
|
|
9
9
|
import "../chunk-67NX2ZEC.js";
|
|
10
10
|
import "../chunk-I3F2RT6H.js";
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
gateHermesShell,
|
|
69
69
|
readHermesShellGate,
|
|
70
70
|
saveSetupFailure
|
|
71
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-J4376P43.js";
|
|
72
72
|
import {
|
|
73
73
|
CODEX_NEEDS_A_NEWER_VERSION,
|
|
74
74
|
CODEX_SETTINGS_STOP_A_HOOK,
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
describeHermesState,
|
|
85
85
|
hermesGateShellCommand,
|
|
86
86
|
needsCodexTrustStep
|
|
87
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-SDK32R3Z.js";
|
|
88
88
|
import {
|
|
89
89
|
describeWaitLadder
|
|
90
90
|
} from "../chunk-CVWG2N3Y.js";
|
|
@@ -187,7 +187,7 @@ import {
|
|
|
187
187
|
routesHermesQuestions,
|
|
188
188
|
runsAnOlderPlugin,
|
|
189
189
|
shippedHermesPlugin
|
|
190
|
-
} from "../chunk-
|
|
190
|
+
} from "../chunk-MOP7H37W.js";
|
|
191
191
|
import {
|
|
192
192
|
setHumanStream
|
|
193
193
|
} from "../chunk-QCGNGEGE.js";
|
|
@@ -28,13 +28,13 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
ensureCodexTrustAfterReapply,
|
|
30
30
|
reapplyAllAgents
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-ICQXFHKK.js";
|
|
32
32
|
import "../chunk-TWWOQKXK.js";
|
|
33
33
|
import {
|
|
34
34
|
HERMES_RESTART_COMMAND,
|
|
35
35
|
describeCodexTrustConfirmation,
|
|
36
36
|
describeHermesHistoryHelperRecord
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-SDK32R3Z.js";
|
|
38
38
|
import "../chunk-IZHCLPRX.js";
|
|
39
39
|
import {
|
|
40
40
|
keepLinuxDaemonAfterLogout,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
import {
|
|
54
54
|
readMacAppAgentKey
|
|
55
55
|
} from "../chunk-BTFQLHZ2.js";
|
|
56
|
-
import "../chunk-
|
|
56
|
+
import "../chunk-MOP7H37W.js";
|
|
57
57
|
import "../chunk-THE2SPHY.js";
|
|
58
58
|
import {
|
|
59
59
|
FX_RELOAD_AFTER_BRIDGE,
|
|
@@ -208,18 +208,39 @@ def _redact_outbound_text(text: str) -> str:
|
|
|
208
208
|
return REDACTION_UNAVAILABLE
|
|
209
209
|
|
|
210
210
|
|
|
211
|
-
def
|
|
211
|
+
def _redacted_arg_lines(args):
|
|
212
212
|
if not isinstance(args, dict) or not args:
|
|
213
|
+
return []
|
|
214
|
+
return [_redact_outbound_text(f"{key}: {value}") for key, value in args.items()]
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
def _summary_of(lines):
|
|
218
|
+
if not lines:
|
|
213
219
|
return None
|
|
214
220
|
parts = []
|
|
215
|
-
for
|
|
216
|
-
rendered = _redact_outbound_text(f"{key}: {value}")
|
|
221
|
+
for rendered in lines:
|
|
217
222
|
if len(rendered) > 200:
|
|
218
223
|
rendered = rendered[:200] + "\u2026"
|
|
219
224
|
parts.append(rendered)
|
|
220
225
|
return "\\n".join(parts)[:500]
|
|
221
226
|
|
|
222
227
|
|
|
228
|
+
def _summarize_args(args):
|
|
229
|
+
return _summary_of(_redacted_arg_lines(args))
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
def _shell_command_body_of(lines):
|
|
233
|
+
return approval.cut_action_body("\\n".join(lines)) if lines else None
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
def _runs_hermes_shell(tool_name):
|
|
237
|
+
return (tool_name or "").lower() == approval_coverage.HERMES_SHELL_TOOL
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
def _gated_call_action_body(tool_name, lines):
|
|
241
|
+
return _shell_command_body_of(lines) if _runs_hermes_shell(tool_name) else _summary_of(lines)
|
|
242
|
+
|
|
243
|
+
|
|
223
244
|
def _arg_target(args):
|
|
224
245
|
if not isinstance(args, dict):
|
|
225
246
|
return None
|
|
@@ -300,15 +321,15 @@ def _on_pre_tool_call(tool_name=None, args=None, session_id=None, **kwargs):
|
|
|
300
321
|
|
|
301
322
|
try:
|
|
302
323
|
budget_ms = int(host.gate_budget_seconds(_requested_gate_seconds()) * 1000)
|
|
303
|
-
|
|
324
|
+
lines = _redacted_arg_lines(args)
|
|
304
325
|
result = json.loads(tools.pushary_ask({
|
|
305
326
|
"question": f"Allow Hermes to run \`{tool_name}\`?",
|
|
306
327
|
"type": "confirm",
|
|
307
|
-
"context":
|
|
328
|
+
"context": _summary_of(lines),
|
|
308
329
|
"agent_name": identity.agent_name(),
|
|
309
330
|
"tool_name": tool_name,
|
|
310
331
|
"tool_target": _arg_target(args),
|
|
311
|
-
"action_body":
|
|
332
|
+
"action_body": _gated_call_action_body(tool_name, lines),
|
|
312
333
|
"wait": True,
|
|
313
334
|
"timeout_ms": budget_ms,
|
|
314
335
|
}))
|
|
@@ -991,6 +1012,8 @@ logger = logging.getLogger(__name__)
|
|
|
991
1012
|
|
|
992
1013
|
DECISION_LINE_MAX = 500
|
|
993
1014
|
ACTION_BODY_MAX = 4000
|
|
1015
|
+
ACTION_BODY_TRUNCATION_MARKER = "\\n\u2026 [truncated]"
|
|
1016
|
+
UTF16_SINGLE_UNIT_MAX = 0xFFFF
|
|
994
1017
|
|
|
995
1018
|
POLL_CEILING_SECONDS = 50.0
|
|
996
1019
|
WITHDRAW_RESERVE_SECONDS = 10.0
|
|
@@ -1036,6 +1059,30 @@ def _command_head(command):
|
|
|
1036
1059
|
return " ".join(str(command or "").split()[:2])[:80]
|
|
1037
1060
|
|
|
1038
1061
|
|
|
1062
|
+
def _utf16_units(character: str) -> int:
|
|
1063
|
+
return 2 if ord(character) > UTF16_SINGLE_UNIT_MAX else 1
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
def _utf16_length(text: str) -> int:
|
|
1067
|
+
return sum(_utf16_units(character) for character in text)
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
def _prefix_within_utf16_units(text: str, units: int) -> str:
|
|
1071
|
+
used = 0
|
|
1072
|
+
for index, character in enumerate(text):
|
|
1073
|
+
used += _utf16_units(character)
|
|
1074
|
+
if used > units:
|
|
1075
|
+
return text[:index]
|
|
1076
|
+
return text
|
|
1077
|
+
|
|
1078
|
+
|
|
1079
|
+
def cut_action_body(text: str) -> str:
|
|
1080
|
+
if len(_prefix_within_utf16_units(text, ACTION_BODY_MAX)) == len(text):
|
|
1081
|
+
return text
|
|
1082
|
+
kept = _prefix_within_utf16_units(text, ACTION_BODY_MAX - _utf16_length(ACTION_BODY_TRUNCATION_MARKER))
|
|
1083
|
+
return kept + ACTION_BODY_TRUNCATION_MARKER
|
|
1084
|
+
|
|
1085
|
+
|
|
1039
1086
|
def _command_summary(command):
|
|
1040
1087
|
collapsed = " ".join(str(command or "").split())
|
|
1041
1088
|
if len(collapsed) <= QUESTION_COMMAND_MAX:
|
|
@@ -1081,7 +1128,7 @@ def _open_question(request, offered, uses_select):
|
|
|
1081
1128
|
tool_name=HERMES_SHELL_TOOL,
|
|
1082
1129
|
tool_target=_command_head(command),
|
|
1083
1130
|
action=command[:DECISION_LINE_MAX] or None,
|
|
1084
|
-
action_body=command
|
|
1131
|
+
action_body=cut_action_body(command) or None,
|
|
1085
1132
|
blocker=(
|
|
1086
1133
|
f"Hermes flagged this command as {request.pattern_key}"[:DECISION_LINE_MAX]
|
|
1087
1134
|
if request.pattern_key
|
|
@@ -1341,7 +1388,7 @@ def _await_decision(request, created, correlation_id: str, offered, uses_select:
|
|
|
1341
1388
|
return _decided(request, correlation_id, "deny", None)
|
|
1342
1389
|
` },
|
|
1343
1390
|
{ 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.
|
|
1391
|
+
{ 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.9",\n "tab": { "hidden": true },\n "entry": "web.js",\n "api": "plugin_api.py"\n}\n' },
|
|
1345
1392
|
{ path: "dashboard/plugin_api.py", contents: `import importlib
|
|
1346
1393
|
import sys
|
|
1347
1394
|
import time
|
|
@@ -2253,7 +2300,7 @@ def record_plugin_load(approval_transport_registered, home=None, pid=None, now=N
|
|
|
2253
2300
|
logger.debug("[pushary] could not record the plugin load: %s", exc)
|
|
2254
2301
|
return None
|
|
2255
2302
|
` },
|
|
2256
|
-
{ path: "plugin.yaml", contents: 'name: pushary\nversion: 1.0.
|
|
2303
|
+
{ path: "plugin.yaml", contents: 'name: pushary\nversion: 1.0.9\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' },
|
|
2257
2304
|
{ 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" },
|
|
2258
2305
|
{ path: "schemas.py", contents: `PUSHARY_REMIND = {
|
|
2259
2306
|
"name": "pushary_remind",
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
reapplyOpenCodePlugin,
|
|
13
13
|
reapplyVsCodePlugin,
|
|
14
14
|
repairCodexHolds
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ICQXFHKK.js";
|
|
16
16
|
import "./chunk-TWWOQKXK.js";
|
|
17
17
|
import "./chunk-7D2FYVBW.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-MOP7H37W.js";
|
|
19
19
|
import "./chunk-THE2SPHY.js";
|
|
20
20
|
import "./chunk-67NX2ZEC.js";
|
|
21
21
|
import "./chunk-I3F2RT6H.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pushary",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.226",
|
|
4
4
|
"description": "Human-in-the-loop (HITL) for AI agents: ask a person for approvals or answers by push notification. One command connects Claude Code, Codex, Cursor, Gemini CLI and more.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pushary",
|