feat(installer): simplify capability selection and add agent setup skill - #4090
feat(installer): simplify capability selection and add agent setup skill#4090TomCC7 wants to merge 7 commits into
Conversation
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
|
| find_system_packages | ||
| print_install_summary | ||
| if [[ "$DRY_RUN" != 1 ]]; then prompt_confirm "Install this environment?" yes || die "installation cancelled"; fi | ||
| if [[ "$CONFIGURE_NETWORK" == 1 ]]; then require_admin "LCM network configuration"; fi |
There was a problem hiding this comment.
For an unattended install requesting network configuration, this validates sudo before dependency and project installation, then requires the same non-interactive credential again before applying network settings. If the credential expires during the installation, setup exits before the requested tuning is applied, leaving an otherwise installed environment partially configured. This is a non-blocking reliability concern, but it makes unattended setup fail its requested configuration after a lengthy install.
Artifacts
- The authored Bash harness sources the installer and runs its actual privilege and network-configuration functions with a mock credential cache, showing the safe focused test method.
- The valid-cache control executed the early and late checks plus the mocked network sysctl operation successfully, showing the expected configured path.
- The expiry simulation passed the early check, expired during simulated installation, then failed at the late noninteractive sudo check before any network operation, confirming the finding.
| "$GUM" choose --no-limit --selected="" --header "$msg (↑/↓ to move, space to toggle, enter to confirm)" \ | ||
| --cursor "❯ " --cursor.foreground="44" \ | ||
| --header.foreground="255" --header.bold \ | ||
| --selected.foreground="44" \ | ||
| "${options[@]}" </dev/tty >"$tmpf" || ec=$? | ||
| PROMPT_RESULT=$(<"$tmpf"); rm -f "$tmpf" | ||
| if [[ $ec -ne 0 ]]; then die "cancelled"; fi |
There was a problem hiding this comment.
Pressing Enter without choosing a capability in the Gum menu produces an empty successful result, which later fails capability validation and exits the installer. The built-in menu instead asks the user to select at least one option. This is a non-blocking interactive usability concern that forces users to restart setup instead of correcting an empty selection.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Artifacts
- The authored focused harness extracts the production installer functions, simulates Enter through a controlling terminal, and asserts the before/after behavior; it demonstrates the tested interaction.
- Running `bash trex-artifacts/install-menu-empty-selection-validation.sh` completed successfully and reports the built-in retry versus Gum-path validation exit; the finding is reproduced.
- The executed PTY session presses Enter with no selection in the built-in menu and captures its retry prompt before controlled cancellation; empty Enter does not terminate there.
- The executed PTY session presses Enter with the focused successful-empty Gum stub and captures the installer validation error with exit code 64; empty Enter terminates instead of retrying.
Contribution path
Follow-up to #4073, stacked on
cc/fix/install-sh. This PR contains the capability UX and agent setup changes; merge the original installer repairs first.Problem
The installer asks users to assemble robot and feature extras, while developer mode installs
all. The choices are confusing, and agents lack a clear setup workflow with predictable unattended behavior.Solution
Installer UX and logic
flowchart TD Start["Run install.sh"] --> Args{"Valid flags and required options?"} Args -->|No| Error["Show error and exit"] Args -->|Yes| Host["Detect and display OS, Python, GPU, Nix, RAM, and disk"] Host --> Mode["Mode: library or developer"] Mode --> Directory["Destination: new project or existing checkout"] Directory --> Capabilities["Capabilities: navigation and/or manipulation<br/>Arrow keys to move, Space to toggle, Enter to confirm<br/>At least one selection required"] Capabilities --> Method["System dependencies: native or Nix<br/>Recommend apt on Ubuntu/WSL, Homebrew on macOS,<br/>Nix on other Linux; NixOS defaults to Nix"] Method --> Check["Check existing environment<br/>Resolve capability dependencies and CPU/CUDA backend"] Check --> Summary["Show installation summary<br/>Mode, path, capabilities, backend, setup method,<br/>required packages and package-manager bootstrap"] Summary --> Dry{"Dry run?"} Dry -->|Yes| Preview["Print planned actions without installing"] Dry -->|No| Interactive{"Interactive?"} Interactive -->|Yes| Confirm{"Install this environment?"} Confirm -->|No| Cancel["Cancel and exit"] Confirm -->|Yes| System Interactive -->|No| System["Install required system dependencies and uv"] System --> InstallMode{"Installation mode"} InstallMode -->|Library| Library["Create or reuse project virtual environment<br/>Install published package with selected capabilities"] InstallMode -->|Developer| Dev["Clone or reuse checkout<br/>Install selected capabilities plus test/lint groups"] Library --> Network Dev --> Network{"Network tuning requested?"} Network -->|Yes| Tune["Apply and persist LCM buffer settings"] Network -->|No| Verify Tune --> Verify["Verify CLI, native libraries,<br/>capability dependencies, and PyTorch"] Verify --> Result{"Checks pass?"} Result -->|No| Error Result -->|Yes| Done["Show activation instructions and selected examples<br/>Navigation: Go2 replay with Rerun<br/>Manipulation: xArm7 keyboard teleop with visualization"]Flags skip the corresponding interactive questions.
--non-interactiverequires mode, destination, and capabilities; it uses platform setup defaults unless overridden and skips confirmation. Validation and installation failures stop with instructions; unattended runs do not prompt for administrator credentials. The final examples are suggested commands, not automatically launched blueprints.How to Test
Run this branch's interactive installer, select navigation and/or manipulation with Space, and choose native dependencies or Nix:
curl -fsSL https://raw.githubusercontent.com/dimensionalOS/dimos/cc/chore/smoother-install-sh/scripts/install.sh | bashFor unattended installation of both capabilities from this branch:
curl -fsSL https://raw.githubusercontent.com/dimensionalOS/dimos/cc/chore/smoother-install-sh/scripts/install.sh | bash -s -- --non-interactive --mode dev --project-dir ./dimos-installer-test --branch cc/chore/smoother-install-sh --capabilities navigation,manipulationAdd
--dry-runto the unattended command to preview without changes. Actual installation includes required system packages and may need administrator access.Bash syntax, ShellCheck, fast installer contract tests, skill validation, documentation links, and applicable pre-commit hooks passed. Run
bash scripts/test-install.shfor fast checks covering unattended execution, invalid arguments, privilege failures, environment reuse, and capability-specific verification. UseINSTALL_TEST_ROOT="$(mktemp -d)" bash scripts/test-install.sh library(ordev) for a real installation of both bundles. Interactive menus are tested manually.Fresh dependency installations were not run locally because available disk space was below the installer's minimum. End-to-end installation results were not validated locally; macOS and Nix installation remain outside installation CI coverage.
AI assistance
Codex (GPT-6) implemented the changes and tests, ran local validation, and prepared this description following a design interview with the author. Human code review remains pending.
Agent: Codex (GPT-6).
Checklist