Repository navigation
refactor(cli): server sessions build their tools through the tool roster (#420, 2/3) - #426
Merged
Merged
Conversation
…ter (#420, 2/3) session_host::open_session (tole serve, tole acp, the MCP session tools) now calls tool_roster::build instead of its own copy of the registration rules. Server sessions gain verify_package, the executable-only binary probe, and sibling tracking plus the handoff tool when running as a child; the lenient tole_cli_binary_available probe is gone. delete_file still registers only behind an interactive approver (ACP); plan mode leaves only ReadOnly tools.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
ajianaz
added a commit
that referenced
this pull request
Oct 27, 2026
#446) ## What The three startup probe notices are silent by default and printed only with `TOLE_VERBOSE=1`. Closes #435. ## Why `uteke binary not found`, `cora binary not found` and `no GitHub origin remote detected` are expected on most machines, yet every run printed them, on every face (since #426 the server faces too). They landed in CI logs, piped output and every headless `tole run`. The information is not lost: `tole doctor` reports cora and uteke against the supported versions (#423). ## Changes - `tool_roster.rs`: `probe_notice` prints a probe miss only when `TOLE_VERBOSE` is `1` / `true` / `yes`; the three notices use it. `mcp[<name>]: no tools registered` stays unconditional: an explicitly configured MCP server that fails is a real problem, not noise. - README env table: `TOLE_VERBOSE`. CHANGELOG. ## Testing - New e2e `quiet_startup` (real binary, no uteke / cora on PATH, not a git checkout): by default stderr contains none of the three notices; with `TOLE_VERBOSE=1` it contains all three. The default-silent test fails on the previous code. - Unit test for the `TOLE_VERBOSE` parsing. - `cargo fmt --all --check`, `cargo clippy --workspace --all-targets -- -D warnings`, bare-profile clippy (none / shell-tools; the first run caught the helpers being unused without shell-tools, fixed with the existing `allow(dead_code)` idiom), `cargo test --workspace`: all green. - Cora agent-as-reviewer on the exact staged diff, judged from `review_finalize`: `should_block: false`, 0 issues. Co-authored-by: ajianaz <[email protected]>
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.
What
session_host::open_session(used bytole serve,tole acpand the MCP session tools) now builds its registry withtool_roster::build, the same module the CLI and MCP-server faces use since #421. Part 2 of 3 of #420.Why
open_sessionwas the third copy of the per-tool registration rules and had drifted from the CLI: noverify_package, a binary probe that accepted non-executable files, no sibling tracking or handoff tool for children, and agent-tool registration errors silently ignored.Changes
session_host.rs: the ~95-line registration block becomes aRoster(workspace = session cwd for files and shell tools, plan mode, child agents without worktrees, the ACP plan emitter) passed totool_roster::build.tole_cli_binary_availableis removed (the roster's executable-only probe replaces it). Turn-end hooks, storage and todo registration are unchanged (todo moves in part 3).verify_package; children additionally get sibling tracking and the handoff tool, as on the CLI. Probe misses (uteke / cora / GitHub origin) are now reported on stderr.delete_filestill registers only behind an interactive approver (ACP); plan mode still leaves only ReadOnly tools (update_plan,systemone_decide,web_*andjob_pollare ReadOnly, so plan-mode sessions keep them).MCP servers on server faces stay out of scope: those faces refuse
--mcp-servertoday, so attaching MCP there is a separate feature.Testing
roster_tests::server_sessions_use_the_shared_roster(open_sessionwith an allowlist approver):verify_packageandwrite_filepresent,delete_fileabsent; in plan mode only ReadOnly tools, nowrite_file/run_command/agent_start/todo_write.cargo fmt,cargo clippy --workspace --all-targets -- -D warnings, bare-profile clippy (none / shell-tools),cargo test --workspace(all green), plusacp_approvalandserve_approvalsre-run on the final code.review_prepare→ own review →review_finalize): 0 findings,should_block: false. Two infoqual-clonehits from the first pass were fixed (values moved instead of cloned).