feat(T11983): cleo setup wizard e2e — prefs → connect → model (fit-gated) → profile → TUI offer#1094
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
models-roles: adds_pickOllamaModelInteractivethat callsrankLocalModelFitfor 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: addsCleoSetupResult.firstRunComplete(propagated fromWizardRunResult);_printWhoamiSummaryAndOfferTuiprints whoami-style summary (agent name, provider, model, credential count) + offers TUI launch after successful first-run completionsetup-wizard-e2e.test.ts: 16 TTY-simulated tests viaStubWizardIO— full 10-section wizard pass,firstRunCompletepropagation, Ollama fit-gated paths (floor, ranked recs, skip, manual entry, ranker failure fallback), whoami summary contentTest plan
node_modules/.bin/vitest run --config packages/cleo/vitest.config.ts "setup"→ 61/61 pass (bothsetup-command.test.tsandsetup-wizard-e2e.test.ts)node_modules/.bin/vitest run --project "@cleocode/core" "models-roles"→ 11/11 passnode_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 errorscleo setup --non-interactive --provider anthropic --api-key <key>completes wizard + prints whoami summary on real installcleo setup --provider ollamaoffers fit-ranked model picker; machines < 4 GB RAM see cloud-only guidanceAC compliance
cleo setupprefs → provider connect (OAuth/API) → model pick (fit-gated for Ollama, catalog for cloud) → profile → verification → TUI offerllm(T11725),models-roles(T11726), oauth-inline (T11727),cleo llm fitenvelope (T11982)cleo whoami-style summary + TUI launch offer🤖 Generated with Claude Code