Repository navigation
Add repo-scoped session listing for agents and the CLI - #753
Conversation
Named apart from the review server's list_sessions: both load into one agent and Codex-style clients show bare tool names.
A tool added to the server without its registry entry now fails a test instead of a reviewer's permission prompt.
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c895d9788
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var parts = value.Split('/'); | ||
|
|
||
| if (parts.Length != 2 || parts[0].Length == 0 || parts[1].Length == 0) return false; |
There was a problem hiding this comment.
Accept nested GitLab owners in repository references
For GitLab repositories under nested groups, such as group/subgroup/project, this rejects the explicit repo reference even though GitUrlParser represents that repository as owner group/subgroup and name project, and cwd-based lookup hashes those same values successfully. Consequently, kcap sessions --repo group/subgroup/project and the MCP equivalent cannot target a supported repository unless the caller somehow knows its hash; split at the final slash rather than requiring exactly two segments.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 19c3927: the reference now splits on the last slash, so a nested-group owner such as group/subgroup keeps its slashes and hashes the same way the cwd lookup does; empty owner segments and whitespace are still rejected. Pinned by RepoRefTests.Nested_group_owner_keeps_the_group_path_in_the_hash plus the MCP builder and kcap sessions --repo tests.
| string label; | ||
|
|
||
| if (options.Repo is null) { | ||
| var repo = await RepositoryDetection.DetectRepositoryAsync(config, Directory.GetCurrentDirectory()); |
There was a problem hiding this comment.
Skip PR discovery while resolving the sessions repository
When this runs in a GitHub or GitLab checkout with the corresponding provider CLI available, the default overload also executes the provider probe and PR/MR detection path, potentially adding an unnecessary network-backed delay of up to two seconds before the sessions request. This command only consumes Owner and RepoName, so pass detectPullRequest: false as the other repository-scope-only callers do.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 2993de8: kcap sessions now calls DetectRepositoryAsync with detectPullRequest: false, matching the other repository-scope-only callers.
Closes #752 — AI-2430
What & why
An agent or a person who finds unexplained state in a checkout has no way to ask kcap "which session is doing this, and is it still running": recap returns ended sessions only, and the sessions MCP is keyed by an id you must already hold. This adds
list_repo_sessionstokcap mcp sessionsand akcap sessionscommand, both over the server'sGET /api/repositories/{hash}/sessions, listing a repository's sessions the caller may see, running first by last activity, with each row's access level and astaleflag. A repo is named asowner/nameor a 16-hex hash through one shared parser, and both surfaces fail closed when the cwd has no origin.Where to look
The server route ships in kurrent-io/kcap-server#1810, so this CLI must not be released before that deploy; against an older server
kcap sessionsprints one line asking for a newer server and the MCP tool returns the HTTP error envelope.list_repo_sessionsis named apart from the review server'slist_sessionsbecause both load into one agent and Codex-style clients show bare tool names. A test pins the sessions server's advertised tools to the unattended-safe registry set, so a tool added without its registry entry fails a test rather than a reviewer's permission prompt.Verification
Capacitor.Cli.Core.Tests.Unit2679 passed;Capacitor.Cli.Tests.Unit3881 passed (one PTY timing test flaked under load and passes in isolation);Capacitor.Cli.Tests.Integration237 passed, including the stdio round trip for the tool and the table,--json, older-server 404 and no-origin paths for the command.scripts/check-linear-ids.shexits 0;dotnet publish -c Releaseprints no IL warnings.