Skip to content

refactor: centralize tool exposure planning#23876

Merged
jif-oai merged 2 commits into
mainfrom
jif/t2
May 21, 2026
Merged

refactor: centralize tool exposure planning#23876
jif-oai merged 2 commits into
mainfrom
jif/t2

Conversation

@jif-oai
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai commented May 21, 2026

Why

Tool exposure is a planning concern, but the deferred MCP path and dispatch-only legacy shell path were carrying those decisions in handler constructors and a shell-only tool-family builder. Keeping those decisions in spec_plan makes the core tool plan easier to follow and keeps handlers focused on runtime behavior.

What changed

  • add PlannedTools helpers for ordinary runtimes, exposure overrides, dispatch-only runtimes, and hosted specs
  • inline shell tool assembly into core/src/tools/spec_plan.rs and remove the shell-only tool_family module
  • remove exposure state and special exposure constructors from McpHandler and ShellCommandHandler
  • keep hidden runtime behavior centralized in ExposureOverride, including disabling parallel tool calls for hidden handlers

Testing

  • Not run (refactor only)

@jif-oai jif-oai requested a review from a team as a code owner May 21, 2026 13:30
@jif-oai jif-oai changed the title feat: cleanup [wip] feat: cleanup May 21, 2026
@jif-oai jif-oai changed the title [wip] feat: cleanup refactor: centralize tool exposure planning May 21, 2026
@jif-oai jif-oai merged commit e6c8371 into main May 21, 2026
31 checks passed
@jif-oai jif-oai deleted the jif/t2 branch May 21, 2026 14:21
@github-actions github-actions Bot locked and limited conversation to collaborators May 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants