feat(cli/tui): cloud session selection and cloud-mode feature gating#507
Open
theahura wants to merge 11 commits into
Open
feat(cli/tui): cloud session selection and cloud-mode feature gating#507theahura wants to merge 11 commits into
theahura wants to merge 11 commits into
Conversation
🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
When running `nori cloud` in an interactive terminal, the CLI now lists
existing cloud sessions and lets the user pick one to resume or start a
new one, instead of always creating a new session.
Changes:
- Add CloudSessionSummary type and list_sessions/resume_session methods
to BrokerClient (calls GET /api/sessions and POST /api/sessions/{id}/resume)
- Add new BrokerError variants: ListFailed, ResumeFailed
- Create cli/src/cloud.rs with session picker UI (format, parse, prompt)
- Modify cloud subcommand handler to show picker before TUI launch
- Graceful fallback: 404 or errors from list_sessions → new session only
- Non-interactive terminals skip picker (preserves scriptability)
🤖 Generated with [Nori](https://noriagentic.com)
Co-Authored-By: Nori <contact@tilework.tech>
When the TUI runs in cloud mode (via `nori cloud`), client-side-only slash commands are now disabled. 11 commands that require local filesystem, config, or process access are greyed out in the command popup and blocked at dispatch: /settings, /init, /browse, /diff, /mention, /memory, /mcp, /browser, /switch-skillset, /resume, and /resume-viewonly. Uses the existing CommandAvailability/disabled_builtins infrastructure. Also skips auto-worktree setup and skillset-per-session deferred spawning in cloud mode. 🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
- Fix CURRENT-PROGRESS.md: remove /resume from cloud-enabled list (it's actually disabled), correct description of capability re-application - Fix RESEARCH-NOTES.md: move /resume and /resume-viewonly to disabled section with explanation (local transcripts don't exist in cloud) - Fix tui/docs.md: make cloud-disabled list less brittle, include /resume and /resume-viewonly - Mark all CLI-side spec items as complete 🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
Use whole-object assertions in broker happy-path tests per project convention, add completeness check for cloud mode classification, and add negative number edge case for session choice parsing. 🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
…ation-specification-f-20260608-163440 # Conflicts: # nori-rs/acp/src/broker/docs.md # nori-rs/cli/docs.md
🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
…ogical test - Add BrokerError::InvalidResponse for malformed broker response bodies (previously misused InvalidToken which confused error semantics) - Remove cloud_mode_tests_cover_all_variants which was a tautology that could never fail (exhaustive match already enforces coverage at compile time) 🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
Add missing broker test cases (locally-expired JWT and malformed response for list_sessions/resume_session), improve assertion quality (full struct assert, exact URL matching), show last_active_at timestamp in session picker, and add variant count guard to cloud mode tests. 🤖 Generated with [Nori](https://noriagentic.com)
…aversal Session IDs from the broker response are untrusted input. Without validation, a malformed ID containing '/' or '..' could construct a URL targeting an unintended endpoint. Add validate_session_id() that restricts IDs to alphanumeric, hyphen, and underscore characters. Also removes a tautological test (cloud_mode_tests_cover_all_variants) that could never fail — the exhaustive match already provides compile-time coverage. 🤖 Generated with [Nori](https://noriagentic.com) Co-Authored-By: Nori <contact@tilework.tech>
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
🤖 Generated with Nori
Cloud Session Selection (Spec Item 1)
nori cloud— users now see previous sessions and can resume one or start new, instead of always creating a new sessionBrokerClient::list_sessions()(GET /api/sessions) andBrokerClient::resume_session()(POST /api/sessions/{id}/resume) withCloudSessionSummarytypecli/src/cloud.rswith pre-TUI session picker (format, parse, prompt via stdin/stderr)Cloud-Mode Feature Gating (Spec Item 2)
/settings,/init,/browse,/diff,/mention,/memory,/mcp,/browser,/switch-skillset,/resume,/resume-viewonly) using the existingCommandAvailability/disabled_builtinsinfrastructurecloud_connection.is_some()SessionCapabilitiesChangedto prevent backend capability updates from accidentally re-enabling client-only commandsTest Plan
list_sessionsandresume_sessionmethodsSlashCommand::available_in_cloud_mode()classificationcargo test -p nori-tui)cargo test -p nori-cli)cargo test -p tui-pty-e2e)nori cloudand confirm disabled commands are greyed outGET /api/sessionsandPOST /api/sessions/{id}/resumeendpoints in nori-sessionsShare Nori with your team: https://www.npmjs.com/package/nori-skillsets