@xynogen/pix-ssh 0.2.2 → 0.2.3
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 +6 -3
- package/package.json +1 -1
- package/src/index.ts +13 -8
package/README.md
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# pix-ssh
|
|
2
2
|
|
|
3
|
-
Pi tool — `ssh_run`: run a
|
|
3
|
+
Pi tool — `ssh_run`: run a command through a remote host's configured SSH shell, optionally through POSIX `sudo`.
|
|
4
|
+
|
|
5
|
+
> [!IMPORTANT]
|
|
6
|
+
> Basic Windows `cmd`, Windows PowerShell, and `pwsh` commands may work through the configured SSH shell, but support is best-effort. Shell selection, complex quoting, PowerShell error/stream/encoding semantics, interactive prompts, and Windows administrator/UAC elevation are not covered. The agent should back away when correctness depends on those limits. `sudo: true` supports POSIX `sudo` only.
|
|
4
7
|
|
|
5
8
|
## What it does
|
|
6
9
|
|
|
7
|
-
Registers the `ssh_run` tool, which executes a command on a remote machine behind a permission dialog (the shared overlay from `@xynogen/pix-pretty`, the same one pix-sudo uses).
|
|
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.
|
|
8
11
|
|
|
9
|
-
**Parameters:** `host` as `[user@]host[:port]` (e.g. `deploy@10.0.0.5:2222`), `command`, optional `sudo` (run
|
|
12
|
+
**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`.
|
|
10
13
|
|
|
11
14
|
### Authentication
|
|
12
15
|
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -217,17 +217,22 @@ export default function (pi: ExtensionAPI): void {
|
|
|
217
217
|
name: "ssh_run",
|
|
218
218
|
label: "Run over SSH",
|
|
219
219
|
description:
|
|
220
|
-
"Run a
|
|
221
|
-
"
|
|
222
|
-
"
|
|
220
|
+
"Run a command through the remote host's configured SSH shell, optionally through POSIX sudo. " +
|
|
221
|
+
"Basic cmd/PowerShell/pwsh commands may work, but Windows shells are best-effort: shell selection, " +
|
|
222
|
+
"quoting, PowerShell error/stream/encoding semantics, interactive prompts, and Windows " +
|
|
223
|
+
"administrator/UAC elevation are not supported. Back away and tell the user when correctness " +
|
|
224
|
+
"depends on one of those limits. Handles connection and password entry through a permission dialog. " +
|
|
225
|
+
"A configured approval window or YOLO mode may auto-approve non-privileged commands when no password is missing. " +
|
|
223
226
|
"SSH auth tries key/agent first, then prompts for a login password if needed. " +
|
|
224
227
|
"Set `sudo: true` to run the command as root on the remote machine (prompts for the " +
|
|
225
228
|
"remote sudo password). Always provide a clear `reason`.",
|
|
226
|
-
promptSnippet: "Run a
|
|
229
|
+
promptSnippet: "Run a remote SSH command (Windows shells best-effort; POSIX sudo only)",
|
|
227
230
|
promptGuidelines: [
|
|
228
|
-
"
|
|
229
|
-
"
|
|
230
|
-
"
|
|
231
|
+
"ssh_run sends commands to the remote host's configured SSH shell. Basic cmd, PowerShell, or " +
|
|
232
|
+
"pwsh commands may work, but treat Windows shells as best-effort. Back away and tell the user " +
|
|
233
|
+
"when correctness depends on explicit shell selection, complex quoting, PowerShell error/stream/encoding " +
|
|
234
|
+
"semantics, interactive prompts, or Windows administrator/UAC elevation. `sudo` covers POSIX sudo " +
|
|
235
|
+
"only. Provide `host` as `[user@]host[:port]` and always explain the intent in `reason`.",
|
|
231
236
|
],
|
|
232
237
|
|
|
233
238
|
renderShell: "self",
|
|
@@ -237,7 +242,7 @@ export default function (pi: ExtensionAPI): void {
|
|
|
237
242
|
description: "Remote target as `[user@]host[:port]` (e.g. `deploy@10.0.0.5:2222`).",
|
|
238
243
|
}),
|
|
239
244
|
command: Type.String({
|
|
240
|
-
description: "
|
|
245
|
+
description: "Command sent to the remote host's configured SSH shell.",
|
|
241
246
|
}),
|
|
242
247
|
sudo: Type.Optional(
|
|
243
248
|
Type.Boolean({
|