Log inGet started
What it does

terminal

A terminal dock panel for the engine's emulated Unix shell (shell.run — the same shell the MCP bash tool drives: POSIX builtins over the virtual filesystem, with pipes, redirects, variables, and control flow). The user types a command, it runs synchronously against the shared shell session, and the command plus its stdout/stderr/exit code become a scrollback entry. Each command runs to completion; persistent scrollback, a persistent working directory, and command history are what "terminal" means here.

The shell owns its own working directory: cd mutates the shared session's cwd and persists across shell.run calls. The prompt mirrors that cwd by reading pwd after each command, so it always shows the shell's real cwd. Scrollback is capped at ~200 entries and lives under state.terminal (the dock host state).

Exports

  • M.label — the dock tab label ("Terminal").
  • M.run(state, command) -> entry — run a shell command and append the result to scrollback. Returns the entry { command, cwd, stdout, stderr, exitCode, ok }.
  • M.build(state) -> widget — build the Terminal tab widget tree (a Z.panel).
  • M.onCallback(callbackId, data, state) -> boolean — handle a widget callback (input change, run, clear). Returns true when consumed.

The host calls M.build on markDirty and M.onCallback on widget events; there is no refresh (the panel only changes when the user runs a command).

Usage

local Terminal = require("modules.api.editor.system_tools.tabs.terminal")
local e = Terminal.run(state, "ls /zero/source")

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

This asset doesn't declare a schema or structured payload.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

0items
This part has no composite children. See the Files segment for its leaf payloads.
This part has no leaf payloads.

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.