CLI and interactive user surfaces
OpenSRE gives operators two local terminal surfaces: the command-line interface (CLI) for direct and scriptable work, and the interactive shell for ongoing work with an agent. One process entrypoint routes each invocation to the right surface. Shared process boot and terminal services keep setup, prompts, progress, tables, errors, transcripts, and output modes consistent across both surfaces. This page is a child of Service entrypoints and transports and relates to hosted behavior in Gateway runtime.
Surface routing
The opensre process entrypoint composes the CLI, the interactive shell, and attached gateway operation. The CLI remains usable on its own, while the composed entrypoint supplies the extra capabilities needed for shell and foreground gateway work. A private handoff path also lets the interactive shell delegate a CLI command without starting another shell.
The routing model is:
flowchart TD
operator["Operator"] --> entry["opensre process entrypoint"]
entry -->|bare command in a TTY| shell["Interactive shell"]
entry -->|named command or headless use| cli["CLI command surface"]
cli -->|gateway start --foreground| gateway["Gateway runtime"]
shell -->|explicit slash command| child["CLI child process"]
child -->|private handoff| cli
The launcher opens the shell only when it has usable terminal streams and the shell is enabled. A redirected bare invocation shows the landing page instead of waiting for input. A named command stays on the CLI path. --resume makes a shell request explicit, while --interactive/--no-interactive controls the bare invocation choice. Layout, theme, onboarding, GitHub connection scope, and exit-time sync choices travel from the root invocation into shell startup.
Entrypoint capabilities
CliHost is the boundary between the root process and the CLI. The composed entrypoint supplies a shell launcher and a foreground gateway runner. A CLI-only caller can omit either capability and receives a clear fallback or error instead of importing an unrelated surface.
Each surfaces-hosted process also uses one shared boot contract. The contract installs integration, tool, CLI-auth, and scheduled-delivery adapters for the selected process profile. This keeps the CLI, shell, scheduler helpers, and embedded callers on the same capability ports without making the lower infrastructure layer import surface code.
References: surfaces/entrypoint.py• L1-9 surfaces/entrypoint.py• L23-64 surfaces/…/app.py• L123-168 surfaces/…/app.py• L251-299 surfaces/…/gateway.py• L31-57 surfaces/…/process_boot.py• L19-40 surfaces/…/boundary.py• L13-51
CLI command surface
The CLI is the direct surface for one-shot operator work. It covers account access, provider and model setup, agent requests, integrations, diagnostics, automation, gateway control, remote sync, local lifecycle actions, skill releases, telemetry triage, guardrail rules, and service-specific reports.
Command loading
The root command presents one stable command index while loading a command only when the operator uses it. This keeps --help, --version, the landing page, and release smoke checks separate from the full product startup path. The command index is also the source for the short help shown before a command module is loaded, and its entries are checked against the loaded Click commands so help does not drift from behavior.
The root owns options that affect the whole invocation:
- JSON output for scripts and pipes.
- Verbose and debug diagnostics.
- Automatic confirmation.
- Onboarding choice for the startup demo.
- Shell selection, session resume, layout, theme, and exit-time sync.
- Workspace GitHub connection scope.
These values are copied into shared runtime flags before command work starts. This keeps root options visible to startup code without making each surface read Click state directly. Fast version and help requests answer before the heavier product startup path. Hidden commands support supervised work and package checks; they are part of the process contract but are not part of the operator-facing command list.
References: surfaces/…/command_specs.py• L1-7 surfaces/…/command_specs.py• L19-40 surfaces/…/command_specs.py• L43-83 surfaces/…/command_specs.py• L163-204 surfaces/…/layout.py• L15-23 surfaces/…/layout.py• L168-214
Account and provider setup
The account surface gives an operator one path to sign in with GitHub, inspect account state, view hosted credits and usage, and sign out. Browser login uses a protected local callback when the browser can return to the terminal, or a short-lived pasted code when the browser is on another device. A successful login establishes the OpenSRE account, GitHub access, and hosted model settings as one local identity. Status checks local records and remote session validity before it treats the account as ready for the interactive shell. Replacing an active session is explicit, and logout clears local account data while reporting when remote revocation could not be confirmed.
The setup command is the factory first-run path. It signs the operator in to OpenSRE and then names the next shell step; the composed entrypoint opens the shell after success when the invocation allows it, while other callers receive the command needed to continue. A development option points this flow at the local web application. Provider authentication remains a separate path from OpenSRE account login.
LLM provider authentication presents API-key providers, subscription providers, vendor CLI sessions, local hosts, and ambient cloud credentials as different setup choices. list and status show prompt-safe saved state, while verify performs the deliberate request-time check. disconnect removes the selected provider's local access without treating it as OpenSRE account logout. The older auth command remains a hidden compatibility route.
The onboard and integration wizard paths are guided first-run flows. They collect provider or service values, validate them with a small live request, and save them only after the relevant health check succeeds. Subscription setup presents a browser authorization URL without displaying tokens, then limits model selection to the models returned for the signed-in plan. API-key, local-host, vendor-CLI, cloud-credential, Azure OpenAI, and custom-endpoint paths keep their different secret, endpoint, deployment, and validation rules. A failed validation or local write gives a clear retry, provider change, deferred setup, or session-only path. The summary names the actual resulting state, including unverified, unsaved, or deferred credentials. Host values such as a local model server URL go to project runtime configuration rather than secret storage.
The provider catalog is the shared contract for setup choices. It maps each provider to its credential kind, endpoint fields, model choices, and custom-model policy, and checks that these values agree with the runtime provider catalog. Azure OpenAI validation normalizes the resource URL, checks the deployment route, and reports available deployments when the requested deployment is not found. OpenAI-compatible custom endpoints are probed at the configured endpoint, so a successful check describes the route that later agent calls will use.
The integration wizard groups services by operator goal, such as observability, incident and communication, infrastructure, development, and protocol access. Alerting services use client-backed health checks before setup is accepted. GitHub MCP setup remains an app handoff rather than a claim that a local connection is already verified. An operator can skip integration setup and return later.
References: surfaces/…/account.py• L124-243 surfaces/…/account_auth.py• L135-176 surfaces/…/account_auth.py• L355-514 surfaces/…/account_auth.py• L516-546 surfaces/…/account_ui.py• L87-213 surfaces/…/login.py• L107-137 surfaces/…/login.py• L140-223 surfaces/…/login.py• L226-295 surfaces/…/setup.py• L12-35 surfaces/…/factory_setup.py• L14-99 surfaces/…/login_menu.py• L12-31 surfaces/…/auth_profiles.py• L19-129 surfaces/…/auth_service.py• L54-181 surfaces/…/authorization.py• L16-60 surfaces/…/connection.py• L83-225 surfaces/…/catalog.py• L44-148 surfaces/…/validation.py• L104-191 surfaces/…/azure_validation.py• L19-107 surfaces/…/subscription_service.py• L21-110 surfaces/…/account_session.py• L45-67 surfaces/…/account_session.py• L157-257 surfaces/…/flow.py• L265-514 surfaces/…/llm_credential.py• L54-77 surfaces/…/llm_credential.py• L145-172 surfaces/…/llm_credential.py• L238-308 surfaces/…/subscription.py• L15-31 surfaces/…/onboard_integrations.py• L7-208 surfaces/…/_integration_configurators.py• L57-158 surfaces/…/integration_health.py• L1-51 surfaces/…/alerting.py• L11-71
Model selection
The model surface lets an operator inspect connected providers and choose the active reasoning or tool-call model without repeating provider setup. It uses the same source and billing labels in tables and pickers, while hosted account models remain controlled by the signed-in OpenSRE account. The picker can connect a provider, accept an exact custom model where the provider allows it, or leave the active model unchanged.
Model discovery happens when the operator asks to connect or select a provider. Cached and configured choices support fast status views, while providers with bounded catalogs can reject a model that is not available. Subscription, local-host, and resource-based providers can load a live catalog only during an intentional selection or setup action. A successful selection updates the active route, preserves inactive provider connections, and refreshes the clients used by later agent turns.
References: surfaces/…/model.py• L27-113 surfaces/…/model_choices.py• L18-53 surfaces/…/model_choices.py• L94-144 surfaces/…/model_picker.py• L26-55 surfaces/…/model_picker.py• L48-193 surfaces/…/model_discovery.py• L15-49 surfaces/…/selection.py• L47-95 surfaces/…/selection.py• L98-133 surfaces/…/env_sync.py• L170-284 surfaces/…/hosted_connection.py• L19-46
Operational commands
The remaining CLI groups expose product operations through one direct command model. Their purpose is to let an operator inspect state, change local settings, run bounded work, and manage work that continues after the command returns.
| Area | Operator goal |
|---|---|
| Integrations | Set up, list, inspect, verify, and remove service credentials. |
| Runbooks and guardrails | Manage trusted runbook sources and sensitive-information rules. |
| Skills | Inspect, publish, pull, update, and roll back the live skill release. |
| Scheduling and reports | Create, run, list, inspect backlog pressure, and manage recurring deliveries such as cron, Sentry, and PostHog reports. |
| Durable work | Track human work, rank open items, complete items, and attach reminders or recurring check-ins. |
| Gateway | Start, stop, inspect, and follow the hosted gateway from a terminal. |
| Fleet operations | Discover, register, forget, and watch local AI-agent processes. |
| Diagnostics and lifecycle | Check health, run diagnostics, view version data, update, or uninstall the local product. |
| Remote sync | Inspect and run optional session and memory sync with an external object store. |
| Knowledge | View personal memory, shared workspace knowledge, scan connected sources, and audit memory quality. |
| Messaging | Pair messaging services, send or receive messages, and manage allowed sender identities. |
| Telemetry triage | Watch scoped OpenTelemetry windows and retain sanitized incident reports when the opt-in pilot is enabled. |
The config command has two operator roles. With no subcommand it reports the active LLM environment without exposing secrets. Its show and set subcommands manage the local YAML settings for interactive enablement, layout, and theme. The health command can produce a one-time or watched setup summary. version reports the product and host runtime in text or JSON. update checks the rolling main build and can install it, with a distinct check result for an available update and a restart request when a container supervisor owns the process. Guardrail commands let an operator create starter rules, test text, inspect recent audit entries, and view configured rules in machine-readable form.
Integration names resolve through the live integration registry, so aliases and later-registered services use the same management surface. The guided wizard can configure service connections through the same validation boundary. In an interactive TTY, the list view opens a searchable connection browser. It shows configured entries at once, checks supported connections in the background, and keeps the last-known result for that shell session.
Scheduling keeps task creation, execution, delivery, and retained results visible as separate concerns. Backlog status reports pending runs and the age of the oldest one, or reports that the state is unknown when scheduler storage cannot be read. A manual rerun warns when the last run delivered to some destinations, while --failed-only retries only destinations with recorded failures. Work commands keep durable human tasks separate from short-lived agent jobs. Operators can add due dates, one-shot reminders, and recurring check-ins with one or more delivery targets, then list, prioritize, or complete the work.
Sentry and PostHog report commands provide service-specific paths over the shared scheduler. They can run a digest or metric summary once, create recurring delivery schedules, list only their own schedule kind, remove a schedule, and run a stored schedule immediately. Sentry also supports uptime checks and transition-only watches. These commands validate the source integration and delivery provider before they create or run work.
Remote sync mirrors sessions and memory to an operator-owned object store. The surface can show whether sync is enabled, set provider and store details through flags or an interactive terminal flow, and run a pull, push, or two-way dry run. Provider-declared extra fields are requested only for providers that need them. An optional exit hook reports failure without changing the shell's exit result, so sync remains useful without becoming a condition for local shutdown.
References: surfaces/…/command_specs.py• L29-177 surfaces/…/config.py• L36-90 surfaces/…/config.py• L93-184 surfaces/…/general.py• L21-127 surfaces/…/guardrails.py• L12-75 surfaces/…/cron.py• L152-245 surfaces/…/cron.py• L295-419 surfaces/…/cron_results.py• L10-115 surfaces/…/posthog_report.py• L25-257 surfaces/…/sentry_digest.py• L25-459 surfaces/…/update.py• L100-190 surfaces/…/remote_sync.py• L39-285 surfaces/…/work.py• L41-182 surfaces/…/work.py• L210-277 surfaces/…/remote_sync_cmds.py• L63-270 surfaces/…/input_form.py• L57-132
CLI startup and output
CLI startup prepares shared process state, error reporting, observability adapters, terminal behavior, and signal handling before a command runs. Fast help and version requests skip this heavier product startup. Expected operator errors such as cancellation, credit exhaustion, missing GitHub access, provider authentication failures, and known model failures stay at the user-facing boundary with a useful next step. Provider-specific failures are mapped to actions such as changing a model, reconnecting a provider, or enabling a cloud model.
The shared process profile boots the environment and registers the adapters needed by the CLI. CLI startup then installs CLI-only authentication checks, error reporting, product observability ports, terminal cancellation behavior, and signal handling. A bare invocation may delay error-reporting initialization until the launch banner is ready, while named commands initialize it before command execution.
The output contract follows the destination. Terminal output may use Rich presentation. JSON, redirected output, and files stay free of progress text and terminal control sequences. The landing page emphasizes first-run actions while help exposes the full command index. This gives a new operator a short path into setup without hiding commands added later.
References: surfaces/…/startup.py• L1-18 surfaces/…/startup.py• L38-132 surfaces/…/app.py• L302-385 surfaces/…/error_mapping.py• L8-86 surfaces/…/invocation.py• L22-140 surfaces/…/layout.py• L15-23 surfaces/…/layout.py• L168-214 surfaces/…/telemetry.py• L22-159 surfaces/…/process_boot.py• L27-40 surfaces/…/boundary.py• L26-51
Interactive shell
The interactive shell is a long-lived terminal surface for investigation, agent conversation, explicit commands, local alerts, and work that can continue beside the prompt. It keeps input, execution, progress, transcript, and shutdown separate so an operator can continue to see state and interrupt active work.
Shell startup
Shell startup checks the terminal and account before it takes control of input. It applies the theme, prepares the session, paints the launch banner, and then starts the prompt runtime. The first shell session claims the process session identity when one is available, so CLI invocation, startup onboarding, and shell turns share one analytics session.
The shell has two startup gates. A stored OpenSRE login is checked before the prompt starts, and the canonical account login path is available when that session is missing or no longer valid. After sign-in, a mandatory GitHub gate checks the registered prerequisite used by hosted model calls and skills. It accepts a connection from the workspace or the signed-in member, and it rechecks the app after the operator returns from the browser. An operator who is not connected receives a browser handoff and a recheck path instead of an unusable prompt. A non-interactive launch fails closed with guidance to complete the action through the app and run opensre again.
The launch can show an animated wordmark while account validation and other startup work run. After the gates pass, the shell paints a static responsive banner before it opens the composer. Integration and tool data can be fetched while account validation waits, and repository scope data is warmed after the first user-facing menu is ready. The first-turn client, SDK request path, and hosted credit view can also warm while the operator reads the menu or completes browser sign-in. These tasks reduce first-turn delay without making the launch screen compete with network work. Failures remain recoverable by the normal runtime instead of blocking shell startup.
The shell can offer a guided demo on the first eligible interactive launch. The menu enters its onboarding skill directly, so the operator's choice becomes the first model turn; a dismissed or completed menu is remembered and /demo opens it again later. A checkout with an in-progress merge skips the launch menu. A skill prerequisite can also park a turn and open a setup menu; that menu can open the app, re-check the connection, start the skill's fallback, or leave the skill. A successful setup refreshes integration state before the parked turn resumes.
The shell can replay initial input for an embedding or scripted caller, or resume an earlier session by ID, prefix, or name match. On an interactive launch, it can enter onboarding and open its choice menu before the first agent turn. The shell stores reusable agent state separately from terminal-only state. A shell session adds prompt, theme, task, alert, metrics, transcript, and display state around the shared session state. /new and /resume clear or replace these shell facets so stale prompts, choices, approvals, and alerts do not carry into the new session.
References: surfaces/…/main.py• L72-205 surfaces/…/main.py• L258-356 surfaces/…/account_gate.py• L23-176 surfaces/…/demo_picker.py• L50-136 surfaces/…/first_turn_warmup.py• L26-91 surfaces/…/github_gate.py• L33-151 surfaces/…/connect_github.py• L25-120 surfaces/…/prerequisite_menu.py• L47-138 surfaces/…/session.py• L18-76 surfaces/…/terminal_session.py• L78-204 surfaces/…/integrations_prefetch.py• L20-47 surfaces/…/repo_scope_prewarm.py• L20-42
Prompt composition
The shell prompt is a bounded multiline composer that keeps input, command help, live status, and the transcript in one stable terminal region. The full-screen transcript stores output as width-independent entries and lays out only the visible window, so resize and scrollback do not depend on how the terminal wrapped old rows. Slash commands and their first arguments appear through a bounded completion tray rather than an unbounded list that can cover the prompt or live status. Completion previews show the selected command description and quick-access commands appear first for a bare /.
The prompt accepts normal text, explicit new lines, completion navigation, and cancellation keys. Literal slash commands and other terminal-owned flows can reserve stdin, which prevents prompt redraw and terminal cursor responses from becoming input text. Structured questions use the same terminal ownership model. The batched Ask User menu lets an operator move between questions, select labeled options, choose several options where allowed, or type a custom answer in the option list. Forms and pickers keep a draft in memory, validate it on explicit submission, and return no result when the operator cancels. Theme changes apply before the next prompt, while prompt refresh avoids changing terminal state while the input reader is active.
References: surfaces/…/prompt_builder.py• L63-159 surfaces/…/prompt_builder.py• L217-352 surfaces/…/ask_user.py• L251-283 surfaces/…/ask_user.py• L285-449 surfaces/…/completion.py• L37-123 surfaces/…/completion.py• L126-186 surfaces/…/style.py• L13-71 surfaces/…/command_tray.py• L32-129 surfaces/…/session.py• L71-223 surfaces/…/control.py• L28-141 surfaces/…/store.py• L155-232 surfaces/…/input_form.py• L112-132 surfaces/…/input_form.py• L468-571
Prompt turn lifecycle
The shell reads input and runs agent turns through separate loops joined by a queue. This separation keeps the prompt responsive while a turn runs. It also gives cancellation, confirmation, exclusive terminal ownership, and the next prompt a clear place in the lifecycle. At most one blocking turn worker owns the runtime at a time, so queued work stays ordered even when a cancelled worker is still winding down.
When an operator submits text, the shell classifies the input, renders the user turn, queues the text, and starts one agent turn. The turn binds a session-aware output stream, shows progress, runs the shared turn host, and records the result through shell-specific accounting. The shell then clears dispatch state and restores the prompt.
sequenceDiagram
participant Operator
participant Prompt as Prompt loop
participant Queue as Turn queue
participant Turn as Turn host
participant Agent as Agent runtime
participant Output as Terminal output
Operator->>Prompt: Enter text or slash command
Prompt->>Queue: Submit one turn
Queue->>Turn: Consume turn
Turn->>Output: Show user turn and progress
Turn->>Agent: Run shared agent turn
Agent-->>Output: Stream reply and action status
Turn-->>Queue: Complete or cancel turn
Output-->>Operator: Restore prompt
ReplState is the single lifecycle record for dispatch, confirmation, cancellation, goal controls, and exit. Its explicit phases distinguish idle, dispatching, awaiting confirmation, and cancelling states. The shell shows a live phase, active tool, elapsed time, token estimate, and a bounded reply preview while a turn runs. Always-ask tools enter the same confirmation path as other policy checks; a declined tool is blocked before later hooks run. The final reply still goes to the transcript once, and cancellation clears unfinished preview text.
References: surfaces/…/state.py• L83-295 surfaces/…/turn_host.py• L79-212 surfaces/…/turn_host.py• L310-532 surfaces/…/approval_hooks.py• L25-107 surfaces/…/execution_confirm.py• L119-268 surfaces/…/agent_harness_adapters.py• L38-212 surfaces/…/agent_presentation.py• L40-213 surfaces/…/reply_preview.py• L1-40 surfaces/…/auto_status.py• L20-61 surfaces/…/ci_fix_status.py• L19-35
Slash-command surface
Slash commands are explicit operator commands inside the shell. The catalog groups account and provider access, models, tools, integrations, alerts, gateway actions, scheduling, remote sync, diagnostics, tasks, settings, and system actions. A command validates its arguments before it reaches execution policy or side effects.
Session diagnostics give the operator a compact view of the active session. /status reports user-facing session context, including interactions, incoming alerts, trust mode, reasoning effort, and the active provider. It omits internal bookkeeping keys from the accumulated-context summary, just as resumed-session output omits them from restored context.
The shell treats ordinary natural-language input as agent conversation. It does not convert a question into a slash command only because a related command exists. Literal slash input has a deterministic command path. Unknown commands and invalid subcommands return plain guidance with the closest valid command or known first-argument choices.
The /choose command opens the selection menu that an agent has queued. It turns the chosen label into the next user message, while a cancelled menu is kept so /choose can reopen it in the skill that asked the question. A closed menu can also be left behind when the operator chooses to abandon that flow; leaving the menu clears the parked skill rather than sending an incomplete answer to the model. The same handoff supports onboarding outcomes, prerequisite setup, and mapped command choices.
The /auth, /login, and /model surfaces use the shared provider catalog. Account-managed hosted models are locked to the signed-in account. Local provider changes check the credential path, endpoint, and model before they update runtime settings. A successful delegated login or model selection writes a non-secret handoff to the parent shell, which reloads only the affected settings and refreshes its active LLM clients for the next turn.
CLI-parity slash commands start a child CLI process. Reports are captured and replayed into the transcript. Wizards, browser login, live update output, and long-running services receive the real terminal. Headless callers receive guidance when a flow needs a local browser or credential prompt. A child timeout, cancellation, or failure is shown as a command result and does not unexpectedly close the interactive shell. A scheduled child that still owns its work claim can continue after the foreground timeout, while the shell reports that it is still running instead of inviting a duplicate run. Remote sync uses the same service as opensre remote-sync; setup opens an editable form in the REPL and complete flags remain usable for headless callers.
Tables, pickers, forms, and wizards can take exclusive ownership of stdin so prompt redraws do not mix with arrow keys or terminal cursor responses. When an agent selects an interactive setup command from free text, the shell queues literal command text so it can take this same exclusive-stdin path. Listing commands that return IDs can suspend the prompt while they render, allowing the same agent turn to use those IDs in a follow-up action. A prerequisite menu uses the same handoff model when a skill needs a missing integration.
References: surfaces/…/choice_prompt.py• L1-14 surfaces/…/choice_prompt.py• L153-238 surfaces/…/choice_prompt.py• L271-471 surfaces/…/cli_parity.py• L198-420 surfaces/…/cli_parity.py• L423-802 surfaces/…/diagnostics_cmds.py• L23-74 surfaces/…/login_cmds.py• L15-51 surfaces/…/prerequisite_menu.py• L60-138 surfaces/…/slash_adapter.py• L70-156 surfaces/…/remote_sync_input.py• L1-200 surfaces/…/handoff.py• L13-75
Command grounding
The shell gives its agent a bounded reference for the current slash-command surface. The reference is built from command metadata without running commands. It includes descriptions, use cases, anti-examples, usage forms, examples, and argument hints. This lets the agent answer help questions from the active surface while keeping command selection explicit and free of side effects.
The slash catalog supplies the planner tool with explicit command names and a narrow use rule: it is for literal or explicitly requested slash operations, not a general natural-language router. The same metadata drives help text, completion, planner grounding, and command usage. This keeps human intent and agent command knowledge aligned. The help browser can render a command or category and run a selected command after the operator chooses its subcommands.
References: surfaces/…/catalog.py• L1-40 surfaces/…/slash_catalog.py• L15-186 surfaces/…/help.py• L25-130 surfaces/…/help.py• L187-245 surfaces/…/AGENTS.md• L46-63 surfaces/…/AGENTS.md• L131-165
Background work and alerts
The shell can run scheduled work, subprocess tasks, alert watching, and local monitoring beside the prompt. Background tasks have visible status and can be listed or cancelled from the shell. Their output is streamed above the prompt and their final result is retained in the session record.
Prompt loops use the shell as a host while it is open. The shell-local scheduler runs only shell-created prompt-loop tasks and records the hosting shell session for each tick. Changes made through scheduling commands reload the local scheduler and signal a long-lived gateway scheduler, so work stays registered after the shell exits. An optional local alert listener puts incoming alerts into a session inbox. The shell starts and stops the listener with the session. If the listener cannot start, the shell warns and continues with local work. Fleet monitoring starts only when an operator asks for it.
Shutdown cancels active dispatch, stops background services and schedulers, closes the prompt, and releases session resources. If a blocking turn cannot drain in time, the shell marks the worker as detached and defers session close and pending goal control until that worker releases its lease. This keeps forced exit from racing with session state owned by the worker.
References: surfaces/…/controller.py• L103-141 surfaces/…/controller.py• L256-317 surfaces/…/controller.py• L499-578 surfaces/…/workers.py• L28-153 surfaces/…/loop_scheduler.py• L26-141 surfaces/…/session_shutdown.py• L19-47 surfaces/…/session.py• L39-76
Session resume
Resuming a session restores its prior conversation and explicit slash-command activity before the next prompt. The shell renders chat turns and command turns in their original order so the operator can tell what was said from what was run. It restores operator-facing context while keeping internal session bookkeeping out of the displayed context. It holds a lease on the target session and warns when an interrupted turn left unfinished tool work for the agent to verify.
When /resume has no argument in a TTY, the shell shows recent conversations with titles and activity times in a bounded picker. A non-TTY caller keeps the explicit session-ID-prefix form instead of receiving a raw-key menu. An ambiguous name or ID prefix does not choose a session, and a session that is busy in another process must be retried later.
References: surfaces/…/resume.py• L52-87 surfaces/…/resume.py• L90-186 surfaces/…/resume.py• L224-356 surfaces/…/resume_rendering.py• L47-102
Shared terminal components
Shared terminal components define the visual and output contract for the CLI, the interactive shell, and embedded callers. They provide the launch banner, themes, prompt-safe output, menus, forms, tables, progress displays, tool summaries, transcripts, and Markdown replies. Product adapter wiring connects these surfaces to shared observability, integration, harness, and progress ports.
Terminal presentation
The terminal presentation keeps operator context stable while work runs. The shell paints a launch banner, maintains a small live region for the prompt, model and effort state, permission level, CI repair count, task plan, and spinner, and uses consistent transcript markers for user, working, tool, assistant, and error blocks. The live status gives way to the CI chip when the terminal is too narrow, so the route and permission state stay readable.
The shared launch banner serves both the CLI landing page and the shell. It shows the version, welcome message, available skill and CI-fix counts, and signed-in account context when local status permits. It uses the full wordmark on a wide terminal and a compact title on a narrow one. The shell transcript stores output as text or renderables, then lays it out again at the current width. The shell adapter prints agent data as literal text, escapes status and error content, and streams replies without printing a completed answer twice.
The action view separates internal planner events from user-facing execution output. It groups planned actions into concise terminal records, keeps useful result text available in the detail view, and suppresses a generic row when an executor already owns its output. Shared product adapters provide the debug printer, progress tracker, remote integration provider, and harness ports used by these views.
References: surfaces/…/banner.py• L218-240 surfaces/…/banner.py• L271-400 surfaces/…/banner.py• L403-433 surfaces/…/banner_state.py• L21-35 surfaces/…/banner_state.py• L94-152 surfaces/…/agent_harness_adapters.py• L70-197 surfaces/…/agent_presentation.py• L112-205 surfaces/…/action_rendering.py• L323-435 surfaces/…/terminal_ui.py• L43-205 surfaces/…/loop.py• L100-196 surfaces/…/loop.py• L393-489 surfaces/…/auto_status.py• L26-58 surfaces/…/ci_fix_status.py• L19-35 surfaces/…/store.py• L46-113 surfaces/…/boundary.py• L26-51
Menus and terminal ownership
Inline menus provide one keyboard model for confirmations, setup choices, model selection, integration actions, pending agent choices, session resume, and handoff questions. A menu temporarily owns the terminal, removes its transient rows when it ends, and returns control to the normal prompt.
The menu uses raw keys only when stdin and stdout are real interactive terminals. It draws within the current scrollback instead of opening a second full-screen surface. Labels and descriptions are bounded to the terminal width, and a custom row can collect text without leaving the choice list. On selection, cancellation, or error, the shared cleanup path restores cooked input, cursor state, pending input, and the prompt's output boundary.
This ownership rule matters when prompt-toolkit is active. A table, JSON block, wizard, or raw-key menu must not compete with the editable prompt for stdin. The shared rendering path buffers multi-line output and restores the cursor to a clean line before the prompt resumes. The shared key reader restores cooked terminal input and drains leftover key bytes on every menu exit.
References: surfaces/…/choice_menu.py• L83-128 surfaces/…/choice_menu.py• L300-393 surfaces/…/choice_menu.py• L741-820 surfaces/…/key_reader.py• L60-123 surfaces/…/key_reader.py• L196-252 surfaces/…/connect_github.py• L59-120 surfaces/…/execution_confirm.py• L201-268
Command input forms
Shared command input forms provide a temporary editable surface for commands that need several values or a searchable record view. A form keeps a draft in memory, validates it on explicit submission, and returns no result when the operator cancels. Record views can load status in the background and expose explicit actions without turning browsing into a write path. This gives the CLI and interactive shell the same domain rules without saving partial input.
Cron creation, work editing, goal creation, recurring loop setup, provider setup, model selection, integration setup, and remote-sync setup use this boundary when the shell owns an interactive TTY. Complete command arguments continue through the normal CLI path. Missing record arguments use searchable, read-only target selection before an operator confirms an action.
References: surfaces/…/command_input.py• L16-50 surfaces/…/input_form.py• L57-132 surfaces/…/input_form.py• L468-571 surfaces/…/input_form.py• L591-944 surfaces/…/record_browser.py• L18-75 surfaces/…/target_picker.py• L20-98 surfaces/…/input_collection.py• L17-34
Progress and task output
The shared progress layer adapts to the caller. A normal terminal can show live event-log updates and tool detail views. The interactive shell uses append-only status lines, grouped action records, a bounded reply preview, and its own prompt spinner so live redraw does not corrupt input. Piped or headless callers receive plain status and bounded result text.
The common table layer gives integrations, models, tools, loops, schedules, work items, provider state, and other command results a consistent layout. Record tables use a summary view when the terminal is wide and labeled detail rows when it is narrow. Streamed replies preserve Markdown blocks while removing terminal controls and collapsing raw data dumps that do not help an operator. Scheduler output keeps work status, delivery status, retained reports, and error detail separate so a partial result remains explainable.
References: surfaces/…/live_display.py• L35-260 surfaces/…/repl_display.py• L42-168 surfaces/…/provider.py• L17-31 surfaces/…/tables.py• L73-109 surfaces/…/tables.py• L144-204 surfaces/…/tables.py• L260-289 surfaces/…/cron_results.py• L10-115
Prompt logging
Prompt logging records a bounded prompt and response for supported agent and background-task turns. It can write a redacted local JSONL record, enrich the session with turn details for resume and recovery, and send an AI-generation event to the analytics provider. The recorder is shared by terminal surfaces, while each host adds its own session and integration context.
Logging is controlled by configuration and environment settings. It is enabled and redacted by default, supports a local log path and size cap, and can disable local or PostHog output separately. Interactive wizard output is reduced to a structured outcome instead of storing a noisy terminal transcript. Summary-only commands omit captured console text, while ordinary command output is bounded before it enters analytics.
References: config/prompt_log.py• L1-82 infrastructure/…/recorder.py• L88-320 surfaces/…/__init__.py• L1-27 surfaces/…/turn_outcome.py• L8-163 surfaces/…/turn_accounting.py• L25-131
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the composed
opensreentrypoint separate from CLI-only use. A CLI import must not open the shell or require gateway composition. - Keep shared process registrars aligned with the gateway and web host registrars. A new capability must be available to every host that claims the same process profile.
- Keep bare-invocation routing aligned with TTY checks, shell configuration,
--resume, interactive flags, layout, theme selection, onboarding propagation, GitHub scope, and optional exit sync. - Keep the private CLI handoff aligned with child environment, scope, output capture, setup outcome reporting, and shell lifetime behavior.
- Keep fast help and version classification aligned with the lazy startup boundary. Help must not import product adapters just to print usage.
- Keep CLI command specs, Click docstrings, slash parity entries, planner catalog metadata, and usage examples aligned for new commands.
- Keep OpenSRE account login separate from LLM provider authentication. Browser account login, API-key setup, subscription authorization, and vendor CLI login have different contracts.
- Keep the factory setup's account step, shell-launch handoff, development app URL, and cancellation result aligned across the setup command and wizard.
- Keep account login's loopback and paste-code paths aligned with PKCE state, callback delivery, timeout behavior, active-session replacement, and JSON restrictions.
- Keep account records, hosted model state, credits, usage links, logout cleanup, and environment-token warnings aligned across text and JSON output.
- Keep the
loginsurface and hiddenauthcompatibility route aligned with provider profiles, action menus, status aliases, and disconnect behavior. - Keep provider auth profiles aligned with the provider catalog. Each profile must resolve to the right credential kind, setup route, and provider identity.
- Keep provider catalog metadata aligned with its credential kind, endpoint fields, model fields, discovery route, and validation route.
- Keep provider option metadata aligned with the runtime provider catalog. New endpoint or credential kinds must preserve the setup-to-runtime mapping.
- Keep Azure OpenAI URL normalization, deployment-route handling, API-version selection, token-field retry, and deployment error guidance aligned with the Azure runtime client.
- Keep custom OpenAI-compatible and custom Anthropic validation pointed at the configured endpoint rather than a vendor default.
- Keep subscription authorization token-free in terminal output and restrict model choices to the models returned for the signed-in plan.
- Keep model selection aligned across connected-choice tables, interactive pickers, CLI JSON output, hosted account locks, custom-model rules, environment sync, and runtime client reset.
- Keep credential outcome text honest across verified, stale, unsaved, and deferred states. Session-only continuation must not become persistent storage.
- Keep host credentials and endpoint values in runtime environment configuration, not secret storage, and preserve inactive provider connections when the active route changes.
- Keep integration wizard choices, configurators, health validators, and service labels aligned. A service must not appear selectable without a setup and health path.
- Keep hosted GitHub setup separate from locally verified integrations and from the mandatory shell GitHub gate.
- Keep the shell GitHub gate aligned with the registered prerequisite, workspace or member connection rules, refresh checks, browser handoff, and non-TTY fail-closed behavior.
- Keep prerequisite setup menus aligned with parked-turn state, integration refresh, fallback selection, and the single resume path after setup.
- Keep CLI and slash parity aligned across Click registration, slash handlers, planner catalog entries, and command usage text. Include auth, login, model, setup, update, messaging, scheduling, and remote sync in the matching catalog.
- Keep child CLI output mode aligned with the command. Captured reports return to the shell transcript, while prompts and live progress use the real terminal.
- Keep setup handoff files non-secret and structured. The parent shell must not infer connection or selection success from terminal prose.
- Keep delegated scheduled work aligned with timeout handling. A run that remains active must report its running state and retain a path to its logs rather than invite a duplicate run.
- Keep scheduler backlog status aligned with its unknown-storage result, JSON fields, lock timeout, and non-zero exit behavior.
- Keep full scheduled reruns distinct from failed-destination retries. Per-target run history must remain available for
--failed-only. - Keep Sentry and PostHog task kinds, integration checks, delivery-provider checks, schedule filters, and report parameters aligned between their dedicated commands and shared scheduler execution.
- Keep durable work item date parsing, timezone rules, delivery-target fan-out, and reminder/check-in task parameters aligned across work storage and scheduler storage.
- Keep the shell account and GitHub gates separate from optional startup warm-ups. A transient service result or warm-up failure must not be mistaken for a valid connection or block unrelated shell startup.
- Keep integration prefetch and repository-scope prewarm bounded and joined before their snapshots are consumed.
- Keep first-turn SDK, client, and hosted-credit warm-ups daemonized and bounded at shutdown. Warm-up failure belongs to the first turn, not to launch success.
- Keep the first-launch demo's seen marker, merge-in-progress exception,
/demoreopening path, and direct skill entry aligned with the onboarding menu. - Keep shell input reading separate from queued turn execution. Cancellation, confirmation, queued input, and exit must use the shared
ReplStatetransitions and phases. - Keep
/choosepending-choice state, closed-choice reopening, onboarding outcomes, prerequisite actions, and auto-submitted answers aligned. - Keep Ask User option labels, multi-select answers, custom text, analytics disposition, cancellation, and transcript handoff aligned.
- Keep always-ask tool hooks ahead of later tool hooks, and keep declined actions blocked without retry.
- Keep prompt completion, status rows, theme refresh, and transcript redraw bounded. A tray, model label, permission label, or CI chip must not cover live status or exceed the terminal width.
- Keep raw terminal ownership aligned with every picker, table, JSON block, form, wizard, and long-running command. Restore cooked input, cursor state, autowrap, and alternate-scroll state on every exit.
- Keep reply previews transient and bounded. A cancelled or completed reply must not be printed twice or remain pinned above the next prompt.
- Keep grouped action records separate from executor-owned output. A self-rendering tool must not produce a duplicate generic row.
- Keep terminal output bounded, escaped, and redacted before it reaches Rich, scrollback, session history, prompt logs, or a model context.
- Keep launch-banner status probes local and startup-safe. Account, model, repository, skill, and CI-fix indicators must not make first paint depend on full harness startup.
- Keep update check and install results distinct in text, JSON, exit codes, and container-supervisor restart behavior.
- Keep analytics classification aligned with interactive wizard paths and summary-only commands so secrets and noisy terminal frames do not enter recorded outcomes.
- Keep session-facing context views aligned.
/statusand/resumemust show operator context without exposing underscore-prefixed session bookkeeping.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
Bare opensre runs without two usable TTY streams | The process could wait on a prompt that no operator can answer | Fall back to the landing page. |
| A CLI-only host requests foreground gateway mode | The gateway has no composed runner to attach to | Return a clear host-capability error. |
| Fast help or version starts full product adapters | A simple query becomes slow or fails because an optional dependency is missing | Classify the invocation before startup. |
| A command index entry drifts from its loaded Click command | Root help promises a command that fails or describes it incorrectly | Keep the index help and command docstring checked against each other. |
| Account login uses paste-code mode with JSON output | A command that promises machine-readable output waits for interactive input | Reject the interactive mode before login starts. |
| Account login replaces local state but remote revocation or environment precedence is ignored | An old session may remain active, or the newly saved login may not be the effective one | Restore state on failed persistence, report revocation status, and warn about an overriding token. |
| Session bookkeeping keys are rendered as accumulated context | Internal state appears to be operator context in status or resume output | Filter underscore-prefixed keys from session-facing context views. |
| Subscription login prints a token or accepts a model outside the account's list | Credentials leak or the next request uses a plan-ineligible model | Present only the authorization URL and validate the returned model choice. |
| A provider credential or endpoint is saved without checking the selected route or model | Setup reports success but the next turn cannot connect | Validate the route and model before saving. |
| An Azure resource URL is missing or a deployment route is invalid | Setup reports a generic provider failure or probes a route that cannot work | Normalize the URL and validate the deployment before the live request. |
| An Azure deployment is not found | The operator cannot tell whether the key or deployment name is wrong | Report the deployment error and list available deployments when the service returns them. |
| A custom endpoint is validated against a vendor default | Setup reports success or failure for a route different from the one the agent will use | Probe the configured custom endpoint. |
| A provider option drifts from the runtime provider catalog | The wizard can offer a credential or model path that runtime setup cannot honor | Check provider metadata at catalog construction. |
| A child setup succeeds but the parent infers state from captured text | The shell keeps stale clients or claims a provider is active when it is not | Use the non-secret structured setup outcome and reload only reported settings. |
| A factory setup account step is cancelled or the shell-launch handoff is wrong | The operator is told setup completed or is sent to a shell without a usable hosted account | Keep the account result and launches_shell decision explicit. |
| A shell starts without a valid GitHub prerequisite | The first hosted model call fails after the operator reaches the prompt | Check the registered GitHub prerequisite before painting the composer. |
| GitHub status is read from a stale integration snapshot after the operator connects | The gate keeps the operator out even though the app now allows hosted work | Refresh integrations on every explicit recheck. |
| The GitHub gate runs without an interactive terminal | The process cannot offer a browser menu or confirmation path | Print the dashboard route and exit before the prompt starts. |
| A prerequisite setup completes but the parked turn resumes from cached state | The skill still reports a missing integration or skips its fallback | Refresh integration state and re-run the prerequisite check before resuming. |
| An onboarding menu is offered during a merge or its seen state is not recorded | The launch blocks work needed to finish the merge, or repeats the menu on every launch | Skip during an active merge and persist the answered or dismissed outcome. |
| A delegated CLI wizard runs with captured stdin | The wizard hangs or its input competes with the live prompt | Reserve the real terminal for interactive children and guide headless callers. |
| A delegated scheduled command times out while work still owns its claim | The operator repeats a run that is still active | Return a still-running result and point to its logs without killing the child. |
Scheduler storage cannot be read during cron status | An unavailable backlog can look like an empty backlog | Return an unknown status with null metrics and a failure exit. |
| A full cron rerun follows a partial delivery | Destinations that already received the report receive it again | Warn about duplicate delivery and offer --failed-only for recorded failures. |
| A retained scheduler run collapses work and delivery into one status | An operator cannot tell whether the report failed, was not retained, or failed to reach a target | Render execution, work, delivery, report retention, and error detail separately. |
| A Sentry or PostHog schedule bypasses its integration or provider check | A stored task fails later or sends through an invalid destination | Validate the source integration and delivery provider before create and run operations. |
| A shell prompt-loop change is not reloaded into the local or gateway scheduler | A newly created loop does not run in the current shell or after shell exit | Reload the local scheduler and signal the long-lived scheduler. |
| Shared capability registrars differ between surfaces and gateway hosts | One entrypoint can run a capability that another host cannot provide | Keep the registrar sets aligned and validate them together. |
| A raw-key menu exits without terminal cleanup | Later prompt input contains arrow keys or the terminal remains in raw mode | Restore cooked input, drain stale bytes, and close the transient output boundary in cleanup. |
| A pending choice is dismissed and its state is discarded | The skill loses the operator's chance to answer or resumes with an empty answer | Retain the closed choice for /choose and clear it only when answered or abandoned. |
| Ctrl-C changes prompt state without cancelling the active dispatch | The operator sees an idle prompt while work continues | Route cancellation through ReplState and the turn host. |
| Confirmation state is cleared while a cancel is in progress | A cancelled action can return to dispatching or accept stale input | Keep the explicit cancelling phase authoritative until dispatch ends. |
| An always-ask tool is declined after a later hook has already run | A blocked action can still cause a side effect or misleading follow-up | Run shell approval first and stop the hook chain on decline. |
| Prompt redraw, reply preview, resize, or background output writes an incomplete frame | Borders, the caret, transcript, or scrollback become corrupted | Use bounded redraw state and restore terminal modes in cleanup paths. |
| A grouped action log also renders an executor-owned result | The same command appears twice and hides the useful result | Suppress the generic action row when the executor owns its output. |
| An alert listener or background task cannot start | Optional local services could block normal shell work | Warn and continue without the optional worker. |
| Shell shutdown skips task, prompt, transcript, or session cleanup | Work or terminal state can outlive the session | Cancel dispatch and workers, close the prompt, flush transcript state, and release the session. |
| A blocking worker outlives forced shell exit and session state is closed at once | The worker can write through a released session lease or lose a pending goal control | Defer session close and goal finalization until the worker releases the lease. |
| A provider switch removes inactive provider settings or writes an empty custom model | Switching back loses a connection or the next request fails model validation | Preserve inactive settings and retain a working custom model when no replacement is supplied. |
| A model catalog request runs during prompt redraw | Typing becomes slow or the prompt is blocked by network work | Discover models only during an explicit setup or selection action. |
| A first-turn warm-up remains blocked at shell exit | A client or credit request holds the process open after the operator leaves | Use daemon threads and a bounded total join. |
Update lookup fails during --check | Automation cannot distinguish an unavailable check from an up-to-date install | Return the dedicated check-failed result and JSON error field. |
| Analytics captures an interactive wizard transcript | Secrets or noisy terminal frames enter local or remote telemetry | Record a bounded structured wizard outcome instead of captured console text. |
Key files
| File | Why to read it |
|---|---|
| surfaces/entrypoint.py | Shows how one process chooses between the CLI, shell, and foreground gateway, including CLI child handoff. |
| surfaces/…/app.py | Defines root options, bare-invocation routing, fast paths, and process result handling. |
| surfaces/…/command_specs.py | Defines the lazy command index used by root help and command loading. |
| surfaces/…/account.py | Shows account status, login, credits, usage, logout, and text/JSON output boundaries. |
| surfaces/…/account_auth.py | Shows browser and paste-code account authentication, safe persistence, and logout. |
| surfaces/…/account_ui.py | Shows account login, active-session, credits, and logout presentation. |
| surfaces/…/setup.py | Shows the factory setup command and its shell-launch handoff. |
| surfaces/…/factory_setup.py | Shows the two-step account sign-in and hosted-shell first-run flow. |
| surfaces/…/login.py | Shows provider connect, list, status, verify, disconnect, and legacy auth routing at the CLI boundary. |
| surfaces/…/model.py | Shows direct inspection and selection of connected models. |
| surfaces/…/cron.py | Shows scheduled delivery creation, backlog status, targeted retry, run history, and daemon control. |
| surfaces/…/cron_results.py | Shows how retained scheduler work and delivery outcomes are presented separately. |
| surfaces/…/posthog_report.py | Shows the dedicated PostHog report run and schedule surface over the shared scheduler. |
| surfaces/…/sentry_digest.py | Shows Sentry digests, uptime checks, transition watches, and their schedules. |
| surfaces/…/guardrails.py | Shows the operator boundary for sensitive-information rules and audit output. |
| surfaces/…/work.py | Shows durable work items, timezone-aware reminders, delivery targets, and recurring check-ins. |
| surfaces/…/config.py | Shows the split between active LLM status and local interactive settings. |
| surfaces/…/general.py | Shows health, version, update, and uninstall command boundaries. |
| surfaces/…/update.py | Shows update lookup, install, check results, and supervisor restart behavior. |
| surfaces/…/remote_sync.py | Shows status, setup, sync direction, JSON output, and the soft-fail exit hook. |
| surfaces/…/error_mapping.py | Shows how known runtime failures become actionable operator errors. |
| surfaces/…/layout.py | Shows the first-run landing page and grouped root help. |
| surfaces/…/startup.py | Shows the CLI startup order and the fast boundary around help and version. |
| surfaces/…/process_boot.py | Shows the shared adapter registration contract used by surfaces-hosted processes. |
| surfaces/…/boundary.py | Shows how terminal entrypoints install product observability and harness adapters. |
| surfaces/…/catalog.py | Defines the shared provider setup contract, model choices, credential kinds, endpoint fields, and catalog drift checks. |
| surfaces/…/validation.py | Defines live checks for native, compatible, local, and custom provider paths. |
| surfaces/…/main.py | Shows shell bootstrap, TTY behavior, startup gates, launch work, banner sequencing, and teardown. |
| surfaces/…/account_gate.py | Defines the account validation, canonical login handoff, and launch decision before the prompt. |
| surfaces/…/demo_picker.py | Defines first-launch onboarding, merge handling, seen state, and /demo reopening. |
| surfaces/…/first_turn_warmup.py | Defines bounded background preparation for the first model turn. |
| surfaces/…/github_gate.py | Defines the GitHub prerequisite check, refresh, and browser handoff before the prompt. |
| surfaces/…/choice_prompt.py | Defines /choose, pending-choice reopening, onboarding outcomes, and prerequisite menu answers. |
| surfaces/…/diagnostics_cmds.py | Defines /status, /cost, and /context, including the operator-facing session summary. |
| surfaces/…/ask_user.py | Defines the batched keyboard menu for agent questions, custom answers, and cancellation. |
| surfaces/…/prerequisite_menu.py | Defines setup-menu actions and parked-turn continuation for skill prerequisites. |
| surfaces/…/session.py | Shows the shell session facets, alert inbox, reset behavior, and resource release. |
| surfaces/…/terminal_session.py | Shows terminal-only state for prompt, approvals, handoffs, transcript, and background work. |
| surfaces/…/cli_parity.py | Defines delegation to CLI processes, capture, prompts, timeouts, and setup handoff. |
| surfaces/…/login_cmds.py | Collects shell login choices before delegating to the canonical CLI. |
| surfaces/…/help.py | Defines categorized help browsing and command execution from selected help entries. |
| surfaces/…/slash_catalog.py | Builds bounded command grounding for help, completion, and the planner tool. |
| surfaces/…/command.py | Defines /model inspection, picker entry, and explicit model arguments. |
| surfaces/…/switching.py | Defines provider, reasoning-model, and tool-call-model switching feedback. |
| surfaces/…/remote_sync_cmds.py | Defines /remote-sync status, form setup, progress, and safe errors. |
| surfaces/…/resume.py | Defines /resume selection, session lease handling, context restoration, and recovery warnings. |
| surfaces/…/slash_adapter.py | Connects slash actions to execution policy, exclusive output, and headless behavior. |
| surfaces/…/loop_scheduler.py | Shows shell-local prompt-loop scheduling, reload signaling, and hosted session attribution. |
| surfaces/…/approval_hooks.py | Places shell approval ahead of later tool hooks and blocks declined tools. |
| surfaces/…/execution_confirm.py | Shows confirmation, trust, session approval, and policy feedback at the terminal boundary. |
| surfaces/…/agent_harness_adapters.py | Connects the shared agent harness to literal terminal output and streaming replies. |
| surfaces/…/agent_presentation.py | Owns spinner, interruption, error, notification, and terminal-input cleanup for turns. |
| surfaces/…/turn_outcome.py | Defines bounded and structured terminal outcomes for prompt logs and analytics. |
| surfaces/…/turn_host.py | Connects submitted input to one queued agent turn and its terminal lifecycle. |
| surfaces/…/state.py | Defines turn phases, confirmation, cancellation, goal-control, and exit state. |
| surfaces/…/prompt_builder.py | Defines prompt setup, redraw, theme refresh, exclusive suspension, and shutdown. |
| surfaces/…/completion.py | Defines slash, subcommand, file-path, and bounded description completion. |
| surfaces/…/style.py | Defines the prompt palette and live theme refresh. |
| surfaces/…/control.py | Defines the visible transcript window, scroll position, and new-output marker. |
| surfaces/…/store.py | Stores bounded terminal output and re-renders it at the current width. |
| surfaces/…/auto_status.py | Defines the bounded model, effort, and permission status row. |
| surfaces/…/ci_fix_status.py | Adds the bounded CI repair count to the prompt status row. |
| surfaces/…/banner.py | Provides the responsive launch banner and startup wordmark animation to both terminal surfaces. |
| surfaces/…/banner_state.py | Provides the startup-safe account, model, repository, skill, and CI-fix status summary. |
| surfaces/…/choice_menu.py | Provides the bounded inline menu, raw-key ownership, and terminal cleanup contract. |
| surfaces/…/input_form.py | Provides the shared editable form and searchable record-browser contract. |
| surfaces/…/tables.py | Provides responsive shared tables and bounded child-command output. |