@xynogen/pix-ssh 0.2.5 → 0.2.7

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/README.md CHANGED
@@ -7,7 +7,12 @@ Pi tool — `ssh_run`: run a command through a remote host's configured SSH shel
7
7
 
8
8
  ## What it does
9
9
 
10
- Registers the `ssh_run` tool, which executes a command through the configured SSH shell on a remote machine behind a permission dialog (the shared overlay from `@xynogen/pix-pretty`, the same one pix-sudo uses). Initial and privileged calls require Allow/Deny approval in the UI, with a 60-second auto-deny timeout. Non-privileged calls may be auto-approved during the 15-minute per-host approval window or in YOLO mode when no password is missing; each host-window auto-approval emits a notification. Output is truncated to 50 KB / 2000 lines. In non-interactive (RPC/JSON) mode the tool is blocked immediately.
10
+ Registers the `ssh_run` tool — run a command through the configured SSH shell on a remote machine, behind the same permission dialog pix-sudo uses (shared overlay from `@xynogen/pix-pretty`).
11
+
12
+ - **Initial + privileged calls** → Allow/Deny approval, 60-second auto-deny timeout.
13
+ - **Non-privileged calls** → may auto-approve during the 15-minute per-host window, or in YOLO mode when no password is missing; each auto-approval emits a notification.
14
+
15
+ Output is truncated to 50 KB / 2000 lines. Non-interactive (RPC/JSON) mode blocks the tool immediately.
11
16
 
12
17
  **Parameters:** `host` as `[user@]host[:port]` (e.g. `deploy@10.0.0.5:2222`), `command`, optional `sudo` (run through POSIX `sudo` as root), optional `reason`.
13
18
 
@@ -37,6 +42,8 @@ Completed calls collapse after the configured Pix delay into a status row such a
37
42
  pi install npm:@xynogen/pix-ssh
38
43
  ```
39
44
 
45
+ > Standalone/opt-in — **not** bundled by [`@xynogen/pix-core`](https://www.npmjs.com/package/@xynogen/pix-core). Remote execution over SSH is a networked, privileged capability, so you install it deliberately.
46
+
40
47
  ## Full distro
41
48
 
42
49
  Source: [github.com/xynogen/pix-mono](https://github.com/xynogen/pix-mono)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-ssh",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Pi tool — ssh_run: run remote commands over SSH with password/key auth and remote sudo",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/index.ts CHANGED
@@ -41,6 +41,7 @@ import {
41
41
  renderCollapsedToolRow,
42
42
  renderToolError,
43
43
  ruleFrame,
44
+ sectionRule,
44
45
  termW,
45
46
  } from "@xynogen/pix-pretty/utils";
46
47
  import { getUnattendedMode, withAgentBlock } from "@xynogen/pix-runtime";
@@ -536,7 +537,7 @@ export default function (pi: ExtensionAPI): void {
536
537
  const prefix = args.sudo ? "sudo " : "";
537
538
  text.setText(
538
539
  fillToolBackground(
539
- `${theme.fg("toolTitle", theme.bold("ssh"))} ${theme.fg("dim", host)} ${theme.fg("accent", prefix + command)}`,
540
+ `${theme.fg("toolTitle", theme.bold("ssh"))} ${theme.fg("dim", host)} ${theme.fg("muted", prefix + command)}`,
540
541
  ),
541
542
  );
542
543
  return text;
@@ -624,8 +625,9 @@ export default function (pi: ExtensionAPI): void {
624
625
  lineCount > maxShow ? [`${FG_DIM} … ${lineCount - maxShow} more lines${RST}`] : [];
625
626
  const statusKey = code === null ? "dim" : code === 0 ? "success" : "error";
626
627
  const paint = (s: string) => theme.fg(statusKey, s);
628
+ const sw = Math.max(8, termW() - 4); // section-rule width inside the 2-space indent
627
629
  const out = ruleFrame(
628
- show.map((line) => ` ${line}`),
630
+ show.map((line) => ` ${sectionRule(line, theme, sw) ?? line}`),
629
631
  footer,
630
632
  termW(),
631
633
  paint,