Skip to content

feat(installer): --preset, --with/--without-gateway, 3-way onboard prompt#6385

Open
singlerider wants to merge 4 commits intozeroclaw-labs:masterfrom
singlerider:feat/6292-installer-overhaul
Open

feat(installer): --preset, --with/--without-gateway, 3-way onboard prompt#6385
singlerider wants to merge 4 commits intozeroclaw-labs:masterfrom
singlerider:feat/6292-installer-overhaul

Conversation

@singlerider
Copy link
Copy Markdown
Collaborator

@singlerider singlerider commented May 5, 2026

Summary

Three-part installer.sh overhaul:

  • --preset minimal|full named alias on top of the existing --minimal and default-features paths. --minimal preserved as a back-compat alias for --preset minimal.
  • --with-gateway / --without-gateway toggles override the preset / feature default for the gateway specifically. --without-gateway switches to --no-default-features and re-adds the rest of the default set; --with-gateway is a no-op when defaults are on (gateway is already there) and adds gateway to the explicit feature list when --no-default-features is in play.
  • 3-way post-install onboarding prompt replaces the unconditional zeroclaw onboard launch. Operators choose CLI/TUI, gateway in browser, or skip. Non-TTY runs (CI, piped install) auto-skip silently.

All four read invocations now pass -r so backslashes in operator responses are not mangled (shellcheck SC2162).

Closes #6292

Validation Evidence

bash -n install.sh
bash install.sh --source --dry-run --with-gateway --minimal
bash install.sh --source --dry-run --without-gateway
bash install.sh --source --dry-run --with-gateway
bash install.sh --source --dry-run --preset minimal --with-gateway

All four dry-runs print the expected cargo install --path . --locked --force [...] invocation:

  • --minimal --with-gateway: --no-default-features --features gateway
  • --without-gateway: --no-default-features --features acp-bridge,agent-runtime,observability-prometheus,schema-export,tui-onboarding
  • --with-gateway (defaults on): no extra flags
  • --preset minimal --with-gateway: --no-default-features --features gateway

Security & Privacy Impact

  • New permissions, capabilities, or filesystem access scope? No. The new prompt only invokes the same zeroclaw onboard and zeroclaw daemon binaries the previous flow already invoked.
  • New external network calls? No.
  • Secrets / tokens / credentials handling changed? No.
  • PII or real identities in diff, tests, fixtures, or docs? No.

Compatibility

  • Backward compatible? Yes. All existing flags continue to work. --minimal becomes equivalent to --preset minimal. The zeroclaw onboard default at choice [1] (also bare-Enter) preserves the previous unconditional behaviour.
  • Config / env / CLI surface changed? Installer CLI surface only (additive flags). No runtime CLI change.

Rollback

git revert <merge-sha>. Single-file change. Operators who do not want the new prompt continue to pass --skip-onboard.

Three additive changes per zeroclaw-labs#6292:

1. `--preset minimal|full` named alias for the existing `--minimal` and
   default-features paths. `--minimal` is preserved as a back-compat
   alias for `--preset minimal`.
2. `--with-gateway` / `--without-gateway` toggles to override the
   preset/feature default for the gateway feature specifically.
3. 3-way post-install onboarding prompt replaces the unconditional
   `zeroclaw onboard` launch. Operators choose CLI/TUI, gateway in
   browser, or skip. Non-TTY runs (CI, piped install) auto-skip
   silently as before.

Scoped TODOs not in this commit (intentionally separate work):

- TTY-detected interactive feature picker (spacebar selection) when no
  flags are passed.
- Source-build web/dist handling (cargo web build invocation tied to
  --with-gateway). The pre-built path already installs web/dist
  correctly; the source path is the gap.
- Wiring `--with-gateway` / `--without-gateway` into the actual
  CARGO_FLAGS string. Right now the variable is captured but the
  feature derivation still flows through --features / preset only.

Refs zeroclaw-labs#6292.
@singlerider singlerider added the enhancement New feature or request label May 5, 2026
@singlerider singlerider self-assigned this May 5, 2026
@singlerider singlerider added onboard Auto scope: src/onboard/** changed. risk: medium Auto risk: src/** or dependency/config changes. scripts Auto scope: scripts/** changed. size: S Auto size: 81-250 non-doc changed lines. labels May 5, 2026
… reads

Three correctness fixes on top of the earlier installer scaffold:

* `--with-gateway` and `--without-gateway` were parsed and documented in
  --help but the resulting WITH_GATEWAY variable was never read. The
  flags were a no-op. Now `--without-gateway` switches to
  --no-default-features and re-adds the rest of the default set
  (`agent-runtime,acp-bridge,tui-onboarding,observability-prometheus,
  schema-export`); `--with-gateway` is a no-op when defaults are on
  (gateway is already there) and adds `gateway` to the explicit feature
  list when --minimal/--no-default-features is in play.
* All four `read` calls now pass `-r`, so backslashes in operator
  responses are no longer mangled. Was failing shellcheck SC2162.
* The 3-way onboard prompt comment described an "auto-launch CLI
  onboard if onboarding is not needed (status check would say already
  onboarded)" path that does not exist in the script. Replaced with a
  comment that matches what the code actually does.

Refs zeroclaw-labs#6292
@github-actions github-actions Bot removed onboard Auto scope: src/onboard/** changed. scripts Auto scope: scripts/** changed. labels May 5, 2026
@singlerider singlerider added this to the v0.7.5 milestone May 5, 2026
@singlerider singlerider changed the title feat(installer): preset/with-gateway flags and 3-way onboarding prompt feat(installer): --preset, --with/--without-gateway, 3-way onboard prompt May 5, 2026
@singlerider singlerider marked this pull request as ready for review May 5, 2026 06:28
… source on --without-gateway/--preset full

Hardcoded DEFAULT_FEATURES_NO_GATEWAY duplicated Cargo.toml's default = [...].
Replace it with a runtime filter over $DEFAULT_FEATURES (already parsed by
parse_cargo_toml), keeping only the literal 'gateway' check.

Also extend the source-implication block: --without-gateway and --preset full
must force a source build. Prebuilt binaries always ship with default features,
so without this the flags were silently dropped on the prebuilt path (e.g.
--dry-run --without-gateway in non-TTY would describe a download with gateway
included).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request risk: medium Auto risk: src/** or dependency/config changes. size: S Auto size: 81-250 non-doc changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: installer.sh overhaul, feature selection, web dist handling, post-install onboarding prompt

1 participant