ShellRunResult class

Drives a ShellSessionPort as an interactive shell, terminal-agnostically.

OmnyShell runs the remote shell as a pipe (no PTY): it emits no prompt and no input echo, and there is no completion signal. This controller supplies that missing protocol layer — the same one the CLI's connect loop and the web client both need:

  • priming — runs the dialect's ShellDialect.initLine and an initial marker so the host can draw the first prompt with the starting cwd;
  • command dispatch — on submitLine it wraps the command with a CwdMarker tail via ShellDialect.wrapCommand (a full marker when the line may change cwd/git state, a lighter ping otherwise), enters raw passthrough, and waits for the marker;
  • output processing — feeds remote stdout through CwdMarker, emitting marker-stripped output and replenishing the send window, and on completion leaves passthrough and reports a ShellPromptState;
  • resume — when resumedInAltScreen, starts in passthrough (the replayed output repaints the program) and fetches the cwd once the program exits.

What stays with the host (and differs per embedder) is line editing and prompt rendering: the host echoes input, manages the line buffer / history / completion, formats the prompt from ShellPromptState, and relays raw bytes via sendRaw while a program owns the terminal. The host learns the mode from the onPassthrough callback.

The captured result of running a command in the interactive session via InteractiveShellController.runAgentCommand.

Constructors

ShellRunResult(List<int> output, int? exitCode)
const

Properties

exitCode int?
The command's exit code, or null if the shell did not report one (e.g. a non-POSIX dialect whose marker omits it).
final
hashCode int
The hash code for this object.
no setterinherited
output List<int>
Marker-stripped stdout+stderr produced by the command.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited