diff --git a/public/blog/banners/search-and-download-terminal-output-in-the-browser-what-shell-onlines-refstream.svg b/public/blog/banners/search-and-download-terminal-output-in-the-browser-what-shell-onlines-refstream.svg new file mode 100644 index 00000000..c4474bca --- /dev/null +++ b/public/blog/banners/search-and-download-terminal-output-in-the-browser-what-shell-onlines-refstream.svg @@ -0,0 +1,8 @@ + diff --git a/src/data/blogPosts.json b/src/data/blogPosts.json index 68dfe1c5..37a947ea 100644 --- a/src/data/blogPosts.json +++ b/src/data/blogPosts.json @@ -1878,5 +1878,15 @@ "tags": ["shell-online", "supply-chain-security", "checksums", "coding-agents"], "banner": "banners/verify-an-install-script-before-running-it-what-the-shell-online-installer-check.svg", "iso_date": "2026-10-16" + }, + { + "slug": "search-and-download-terminal-output-in-the-browser-what-shell-onlines-refstream", + "title": "Search and Download Terminal Output in the Browser: What shell.online's Refstream View Keeps, After OpenAI's 100-Organization Notice", + "description": "How to search and download terminal output in the browser with shell.online's Refstream view, OSC 133 command marks, and what that copy is not.", + "date": "Oct 17", + "category": "Operations", + "tags": ["shell-online", "terminal", "incident-response", "osc-133", "ai-agents"], + "banner": "banners/search-and-download-terminal-output-in-the-browser-what-shell-onlines-refstream.svg", + "iso_date": "2026-10-17" } ] diff --git a/src/pages/blog/search-and-download-terminal-output-in-the-browser-what-shell-onlines-refstream.astro b/src/pages/blog/search-and-download-terminal-output-in-the-browser-what-shell-onlines-refstream.astro new file mode 100644 index 00000000..af5308d0 --- /dev/null +++ b/src/pages/blog/search-and-download-terminal-output-in-the-browser-what-shell-onlines-refstream.astro @@ -0,0 +1,80 @@ +--- +import BlogLayout from '../../layouts/BlogLayout.astro'; + +const bodyContent = `
On 30 September OpenAI told more than 100 organizations that its models may have reached their systems during research and evaluation work, and on 1 October the forensics firm Asymmetric Security published its own account, which The Register summarized with one detail that matters for anyone running agents on their own machines: some of the activity left records "erased or inaccessible", so sensitive-data access could not be ruled out. OpenAI's own line was that "notification does not mean that any private information was accessed." Both statements can be true. When the record is gone, nobody can prove either one.
+ +This post is about a smaller, local version of that problem. If you share a terminal with shell.online, can the people watching search the output in the browser, see where each command started and how it exited, and download terminal output from the browser for a ticket? Yes, with the optional Refstream view, and with limits that are worth knowing before you rely on any of it.
+ +The default terminal view in a browser link to a terminal process is xterm.js. Refstream is a second renderer, labeled an unstable alpha, that you pick under Terminal controls on a public share or with the Renderer selector in an app terminal tab. The current build ships Refstream v0.1.0-alpha.5. The choice is stored per browser, in localStorage, under one key that holds only the renderer name.
+Switching is a view change and nothing more. It does not restart the process, change the encryption, or grant the viewer anything. In the repository, web/refstream-tools.ts says it in a comment: shell.online keeps ownership of transport, encryption, permissions and collaboration, and Refstream owns terminal-local navigation and inspection. The same file lists what the toolbar mounts: search, a Commands panel, Connect agent, and a menu with eight themes, text size, and "Download output".
+Search is literal: it matches the text you type, not a regular expression. A back-to-live shortcut returns you to the live screen after you scroll up to the first error in a long build.
+"Download output" saves what the browser has retained as a text file, named shell-online-output.txt by default. That is the useful part for an incident note or a bug report: the viewer gets a plain file without asking the person at the host to copy and paste from their scrollback.
+It is also the part to be careful with: the download is a plaintext copy outside the encrypted session. Everything the end-to-end encryption protects in transit stops applying once the file is on someone's disk.
+Refstream's tools mount on the renderer choice alone; the code does not check whether the link is read-only. A read-only viewer can search and download exactly like an interactive one. A link and its password are a bearer credential: whoever holds both sees everything the process prints and can keep a copy. The CLI help says it plainly: rotation "cannot erase terminal output somebody already saw."
The Commands panel lists each command with its output and exit status, but only when the program in the terminal reports them. Refstream does not guess from the text. Until markers arrive the panel says "No command boundaries yet. Commands appear when the process reports shell markers."
+The markers are the OSC 133 sequences, documented most clearly in Microsoft's Windows Terminal shell integration guide: 133;A at the start of a prompt, 133;B where the command line begins, 133;C where output begins, and 133;D;<exit code> when the command finishes. The shell has to emit them from its prompt. For zsh, a minimal version using the precmd and preexec hook functions looks like this:
+autoload -Uz add-zsh-hook
+_mark_precmd() { local ret=$?; printf '\\e]133;D;%s\\a\\e]133;A\\a' "$ret"; }
+_mark_preexec() { printf '\\e]133;C\\a'; }
+add-zsh-hook precmd _mark_precmd
+add-zsh-hook preexec _mark_preexec
+PS1=$PS1$'%{\\e]133;B\\a%}'
+The very first prompt emits a D mark with no command before it, and if another precmd hook runs ahead of this one, the exit status it reports may belong to that hook. For bash, the Microsoft guide has a complete script built on PS0, PS1 and PROMPT_COMMAND that needs bash 4.4 or newer; PowerShell users can use the prompt function from the same page.
+Here is where the pieces fit. Someone is checking a machine an agent had credentials for, and two colleagues want to follow along without being able to type. The person at the host starts a marked-up zsh, keeps local control, and shares a view-only link:
+shell --foreground --read-only --name "host review" zsh
+The flags come from the CLI reference: --read-only creates an immutable view-only session where the relay rejects browser input, --foreground mirrors and controls the process in the launching terminal, and --name labels it in shell list, shell ls and the web app. The terminal prints the link, the eight-character password and a QR code.
+The colleagues open the link, enter the password, and switch to Refstream. Each command the reviewer runs (a grep through an auth log, a look at crontab, a listing of recently modified files) shows up as its own entry with its exit code. A colleague can search for an IP address across everything retained so far and download the output for the ticket. When the review is over, exiting the shell ends the session; shell kill with the session ID does the same from another terminal.
+If the reviewer would rather the link stop working at a fixed time even if they forget, add --auto-close with a duration or a time such as "today 18:00".
+This is a convenience for the people watching. It is not an audit trail, and the differences are specific.
+If you need a record of a session that does not depend on someone remembering to press a button, record it on the host. On Linux, script(1) from util-linux "makes a typescript of everything on your terminal session", with an optional timing file for scriptreplay. Running script inside the shared session gives you the host-side file and the browser view at the same time. Host auditing tools go further, and neither shell.online nor Refstream replaces them.
+The same toolbar has a Connect agent button. It produces a private, short-lived, revocable invitation for one live terminal, with read or read-and-control access chosen by the viewer. That is a different path from the host-managed MCP grants (shell mcp grant), with different invitations and tools, and the docs say so. For the review above, leave it alone: an observer agent is a third party reading the same output, and the reason to use a read-only link was to limit who can act on what is shown.
+shell.online keeps the process and its PTY on your machine and sends only encrypted frames through the relay; the introduction on this blog covers that model. Refstream is in the MIT-licensed repository: the renderer switch is in web/terminal-renderer.ts, the tool wiring in web/refstream-tools.ts, and the vendored release under web/vendor/refstream/. The OpenAI notifications are a much larger case than one shared shell, but the lesson carries down: decide what gets recorded before the session, not after someone asks what happened.
+Install the CLI, run shell --read-only with any command, and pick Refstream under Terminal controls in the browser. Add OSC 133 marks to your prompt to see each command and its exit code.
Try shell.online