Skip to content

feat(T11983): cleo setup wizard e2e — prefs → connect → model (fit-gated) → profile → TUI offer#1094

Merged
kryptobaseddev merged 3 commits into
mainfrom
task/T11983
Jun 12, 2026
Merged

feat(T11983): cleo setup wizard e2e — prefs → connect → model (fit-gated) → profile → TUI offer#1094
kryptobaseddev merged 3 commits into
mainfrom
task/T11983

Conversation

@kryptobaseddev

Copy link
Copy Markdown
Owner

Summary

  • models-roles: adds _pickOllamaModelInteractive that calls rankLocalModelFit for fit-gated Ollama model recommendations — 4 GB RAM floor → cloud-only guidance; above floor → ranked 2–3 picks with [pulled] annotation; never auto-pulls, never auto-selects (RECOMMEND-NEVER-KILL)
  • setup.ts: adds CleoSetupResult.firstRunComplete (propagated from WizardRunResult); _printWhoamiSummaryAndOfferTui prints whoami-style summary (agent name, provider, model, credential count) + offers TUI launch after successful first-run completion
  • New setup-wizard-e2e.test.ts: 16 TTY-simulated tests via StubWizardIO — full 10-section wizard pass, firstRunComplete propagation, Ollama fit-gated paths (floor, ranked recs, skip, manual entry, ranker failure fallback), whoami summary content

Test plan

  • node_modules/.bin/vitest run --config packages/cleo/vitest.config.ts "setup" → 61/61 pass (both setup-command.test.ts and setup-wizard-e2e.test.ts)
  • node_modules/.bin/vitest run --project "@cleocode/core" "models-roles" → 11/11 pass
  • node_modules/.bin/biome check packages/core/src/setup/sections/models-roles.ts packages/cleo/src/cli/commands/setup.ts packages/cleo/src/cli/commands/__tests__/setup-wizard-e2e.test.ts → no errors
  • Verify: cleo setup --non-interactive --provider anthropic --api-key <key> completes wizard + prints whoami summary on real install
  • Verify: cleo setup --provider ollama offers fit-ranked model picker; machines < 4 GB RAM see cloud-only guidance

AC compliance

  • Fresh-install cleo setup prefs → provider connect (OAuth/API) → model pick (fit-gated for Ollama, catalog for cloud) → profile → verification → TUI offer
  • Reuses shipped building blocks: llm (T11725), models-roles (T11726), oauth-inline (T11727), cleo llm fit envelope (T11982)
  • Ends with cleo whoami-style summary + TUI launch offer
  • E2E TTY-simulated test: 16 tests all green

🤖 Generated with Claude Code

kryptobaseddev and others added 3 commits June 11, 2026 23:43
…ted) → profile → TUI offer

- models-roles: `_pickOllamaModelInteractive` calls `rankLocalModelFit` for
  fit-gated Ollama model recommendations (RECOMMEND-NEVER-KILL: never
  auto-pulls, never auto-selects; 4 GB floor → cloud-only guidance).
- setup.ts: `CleoSetupResult.firstRunComplete` propagated from WizardRunResult;
  `_printWhoamiSummaryAndOfferTui` prints whoami-style summary + TUI launch
  offer after successful first-run completion.
- New 16-test TTY-simulated e2e suite (StubWizardIO) covering full wizard
  path, firstRunComplete propagation, Ollama fit-gated paths (floor, ranked
  recs, skip, manual entry, ranker failure), and whoami summary output.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
….name

CleoConfig has no `identity` field — agent name is stored under the
`agent.name` config key. Switch _readWhoamiSnapshot to getConfigValue
and update the test mock to return the keyed value.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Move `_printWhoamiSummaryAndOfferTui` (38 LOC) from
`packages/cleo/src/cli/commands/setup.ts` into a new
`packages/core/src/setup/whoami-summary.ts` module and export it
through `packages/core/src/setup/index.ts` as `printWhoamiSummaryAndOfferTui`.

Import it back in the CLI command and update the e2e test to import
from `@cleocode/core/setup` instead of `../setup.js`.

Lint: `node scripts/lint-cli-package-boundary.mjs --check` → PASS 33/33 (baseline, no net-new).
Tests: setup-wizard-e2e.test.ts + setup-command.test.ts → 61 passed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kryptobaseddev kryptobaseddev merged commit 56c8937 into main Jun 12, 2026
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant