fix: add windows trans fs read ops
This commit is contained in:
@@ -185,6 +185,14 @@ export function sshHelp(): unknown {
|
||||
"trans D601:win/c/test cmd <<'CMD'",
|
||||
"trans D601:win cmd ver",
|
||||
"trans D601:win/c/test cmd cd",
|
||||
"trans D601:win/c/test pwd",
|
||||
"trans D601:win/c/test ls --limit 50",
|
||||
"trans D601:win/c/test cat README.md",
|
||||
"trans D601:win/c/test head -n 40 README.md",
|
||||
"trans D601:win/c/test tail -n 40 README.md",
|
||||
"trans D601:win/c/test stat README.md",
|
||||
"trans D601:win/c/test wc README.md",
|
||||
"trans D601:win/c/test rg -i needle .",
|
||||
"trans D601:win skills [--scope agents|codex|all] [--limit N]",
|
||||
"trans D601:k3s",
|
||||
"trans D601:k3s kubectl get pods -n hwlab-dev",
|
||||
@@ -207,6 +215,7 @@ export function sshHelp(): unknown {
|
||||
"trans --help and trans <route> --help print this JSON help and never open an interactive session; the underlying ssh subcommand keeps the same help behavior.",
|
||||
"For non-interactive remote commands, prefer argv for a single process and explicit sh/bash stdin for shell logic.",
|
||||
"Windows routes have explicit Windows operations, not POSIX shell aliases: `ps` runs Windows PowerShell from stdin or one inline command, `cmd` runs cmd.exe/batch from stdin or one command line, and `skills` discovers Windows skill directories.",
|
||||
"Windows routes include read-only filesystem convenience operations `pwd`, `ls`, `cat`, `head`, `tail`, `stat`, `wc`, and a bounded UTF-8 `rg` subset. These are implemented through a Windows fs backend with UTF-8/binary checks and bounded output; they do not imply POSIX `sh`/`bash` availability.",
|
||||
"For Windows PowerShell, use `trans <provider>:win ps <<'PS'`; the PowerShell body is written to a temporary .ps1 with UTF-8 settings and executed by powershell.exe. Do not use POSIX `sh` or `bash` for Windows PowerShell.",
|
||||
"For Windows cmd.exe, use `trans <provider>:win/<drive>/<path> cmd <<'CMD'`; `cmd` with no command-line arguments reads the UTF-8 batch body from stdin, injects UTF-8/Python encoding defaults, runs it from a temp .cmd file, and deletes the temp file.",
|
||||
"`argv` executes direct argv tokens only: `trans <route> argv ls -la` is valid, but `trans <route> argv 'ls -la'` is rejected because the single string would be treated as an executable path; use `sh -- 'ls -la'` or `bash -- 'ls -la'` for one-line shell logic.",
|
||||
|
||||
Reference in New Issue
Block a user