handles; use f.buf == null instead of !f.buf so empty buffers/strings do not
force SSH_FX_FAILURE on READ. READ accepts Buffer, typed views, or string after
WRITE.
Earlier in this branch: enqueueSftpReply(reqid) + FAILURE on errors; REQUEST.READ
validation in vendor bare-ssh2; coerce typed arrays to Buffer in SFTP.data and
Protocol.channelData/channelExtData. CHANGELOG notes.
Buffer.isBuffer or treated payloads as UTF-8, corrupting packets and risking
native aborts (bad_optional_access). Normalize ArrayBuffer views in
SFTP.prototype.data and Protocol channelData/channelExtData; align READ shim.
Also includes earlier SFTP hardening: REQUEST.READ/WRITE/FSETSTAT guards,
enqueueSftpReply(reqid) + FAILURE on handler error, CHANGELOG.
- Document interactive shell vs /bin/sh in bare-os-shell man, handbook §9,
kill(1), and shell-completion guide
- Resolve kill %n and %% to synthetic PIDs via shellBackgroundJobs
- Add disown builtin; jobs -p (pgid-only) and -l (pid column); set -o/+o to
print errexit/nounset/pipefail/noglob
- Expand completion-engine fallback flags for common utilities
- Persist lines to /.bare/repl_history_<USER> when BARE_OS_REPL_HISTORY=1
and Fish REPL is off (repl-session + cli-readline)
- Tests: kill job specs, set -o output, jobs -p
Queue all outbound SFTP responses (including READ/CLOSE) so async handlers
(REALPATH, STAT, OPENDIR, READDIR, …) cannot reorder packets vs strict clients.
Handle EXTENDED/SETSTAT/FSETSTAT via the same queue instead of bare-ssh2’s
immediate OP_UNSUPPORTED fallback.
Allow SFTP clients to reach the same logical paths as the shell (system
image, pseudo, home, mounts), deny mutating OPEN on typical read-only
prefixes, merge file/dir handle IDs to avoid collisions, implement FSTAT,
stat-based READDIR NAME attrs/longnames, and improve REALPATH.
Add brittle tests for path policy and wire test.bare-openssh-sftp.js into
npm test.
Fish and bare-readline end the edited line with LF only; many SSH PTYs do not
return the cursor to column 0, so ls/man and other command output started
mid-row. Write `\r` after releasing the line editor and before execShellLine
to align output with the peer terminal.
completion) when BARE_OS_FISH is not 0, matching the in-app terminal.
Keep bare-readline + per-command recycle only as fallback. Wire
suspendReplForSubprocess / resumeReplAfterSubprocess on the SSH child ctx to
suspendFishStdinForSubprocess / resume on the channel stream so baretop and
edit release the correct stdin.
Teardown: disableFishRawMode + releaseFishStdin when the session ends.
PTY env sync now only updates COLUMNS and LINES. Writing the client TERM
(e.g. xterm-256color) into the forked session env enabled baretop’s default
incremental line-diff, which mis-renders over SSH. Inherited guest TERM is
unchanged, matching in-app terminal behavior.
multiline output (e.g. man, bare-slice pager) matches real PTY behavior and
avoids misaligned lines vs the peer terminal.
Mirror pty-req TERM and dimensions into forked session vfs.env (COLUMNS,
LINES) when bareOsForkShellEnv is used; clear target on session end.
Add bare-openssh-pty-console helper module and brittle tests; re-export
formatter from bare-openssh for API parity.
AsyncFunction bodies used global console.log, so ./script.js output over SSH
went to Pear instead of the session TTY. Prepend var console = ctx.console
when ctx.console is present.
bare-readline treats empty prompt as falsy and defaults to ">"; each SSH
readline recycle painted that before setPrompt. Pass initialPrompt from
the real PS1, defer first attach until after profile/barerc, and skip the
extra \\r\\n after recycled bare-readline.
Close bare-readline before each execShellLine and attach a new session
afterward so fullscreen apps own stdin; avoids a corrupted KeyDecoder
and a frozen prompt when baretop/edit exit.
Wire pty-req and window-change to set columns/rows on the session
stream so /bin/edit (nano) and similar apps use the real terminal
geometry instead of defaulting to 80x24.
Route replStdin, replStdout, and stdout to the SSH channel Duplex so
/bin/edit (nano) and other TUI tools use the remote terminal instead of
Pear CLI. Mark exec channels as TTY for ssh ... nano style invocations.