---
title: "mova-terminal-main — Mova code model"
description: "Mova code model of tools/terminal/src/main.rs: components with their labels, obernants and the model text."
url: "https://groupants.elamur.ai/free/en/mova/tools/terminal/src/main.rs.groupant/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Research](https://md.research.elamur.ai/free/en/) · **Groupants**

This page as HTML: <https://groupants.elamur.ai/free/en/mova/tools/terminal/src/main.rs.groupant/>

# mova-terminal-main

The groupant beside tools/terminal/src/main.rs in the Mova repository: what the code computes, what it never does, how to go back from its outputs, its invariants, cost and checks.

## Facts

- **kind:** groupant
- **status:** partial source bound model
- **source:** [`tools/terminal/src/main.rs`](https://github.com/ElamurAI/mova-free/blob/main/tools/terminal/src/main.rs)
- **source SHA-256:** `f9418eb01a8db6d2…`
- **repository folder:** [`tools/terminal/src/main.rs.groupant`](https://github.com/ElamurAI/mova-free/tree/main/tools/terminal/src/main.rs.groupant)
- **repository commit:** `48f2e6f74146`

> **Implementation material.** A Mova code model describes this code at one source revision: partial models, finite checks and their stated scope. It is not a reviewed general exposition, and its labels are shown as written, never raised.

## Components

| component | label | where |
|---|---|---|
| **approximant** | partial | [Forward approximant](#forward-approximant) |
| **ast** | partial | `syntax.json` |
| **composition** | partial | [Composition](#composition) |
| **cost** | partial | [Cost](#cost) |
| **descriptant** | present | [Descriptant](#descriptant) |
| **invariant** | partial | [Invariant](#invariant) |
| **tests** | finite evidence | [tests](#tests) |

## Obernants

The typed relations around the forward model: the behaviour complement (what the code never does), the reverse reconstruction (every input compatible with an output) and specialised views.

| id | type | label | where |
|---|---|---|---|
| `behavior_complement` | behavior_complement | partial source derived model | [behavior_complement](#behavior-complement) |
| `reverse_reconstruction` | reverse_reconstruction | partial source derived model | [reverse_reconstruction](#reverse-reconstruction) |

## Model text


### model

## mova-terminal-main

### Descriptant

mova-terminal CLI: status PROFILE, ask PROFILE [--wait] (question on stdin), answer PROFILE ID, abandon PROFILE ID REASON. Source: `tools/terminal/src/main.rs`.

### Forward approximant

Load and validate the profile from the second argument; match exact argument shapes; ask reads at most question_max_bytes + 1 bytes of stdin (so an oversized question is refused by the library) and calls ask or ask_wait (500 ms poll); every command prints one JSON line on success; any error prints `mova-terminal: ERROR` to stderr and exits 1.

### Invariant

Unknown commands, extra or missing arguments, or an invalid profile have no effect on the terminal or journal beyond the error message and a non-zero exit.

### Cost

O(1) dispatch plus profile load (at most 64 KiB) plus the chosen library operation.

### Composition

Executable over `lib.rs`.

### behavior_complement

No flags besides `--wait`, no daemon mode, no queue, no retry, no reading of a question from arguments. Counterexample: `mova-terminal ask PROFILE --now` prints the usage and exits 1. Evidence status: source-derived model, not covered by an end-to-end CLI test.

### reverse_reconstruction

The printed JSON names the id, answer path or answer; the question is not printed and is recoverable only from the task file under the profile root. No unique inverse is claimed.

### tests

#### Checks

No dedicated CLI test: the binary is built by `cargo test --manifest-path tools/terminal/Cargo.toml --release --locked` (two identical runs on 2026-11-04) and was used for the live runs of 2026-11-04 (one question each to Sol and Opus). Argument-shape errors are a source-derived claim only.
