Conversation
Add StartableToolSet to pkg/tools for managing toolset lifecycle with lazy, single-flight start semantics. This is preparatory work for moving the wrapper out of the agent package. Add generic As[T] helper that unwraps StartableToolSet before type assertion, enabling clean capability checking without knowing wrapper details. Assisted-By: cagent
Add Instructable, Elicitable, OAuthCapable, and PromptProvider interfaces that toolsets can optionally implement. This enables interface segregation where the core ToolSet interface stays minimal while specialized features are opt-in. Add GetInstructions helper that uses As[T] for clean capability checking. Assisted-By: cagent
Add ConfigureHandlers that configures elicitation and OAuth handlers on toolsets that support them, using As[T] for capability checking. This reduces boilerplate in runtime when setting up toolset handlers. Assisted-By: cagent
…Set interface This commit combines the migration of StartableToolSet from the agent package to the tools package, along with cleaning up the ToolSet interface. Changes: - Move StartableToolSet from agent package to tools package - Add tools.As[T] generic helper for type assertions with automatic unwrapping - Add capability interfaces (Instructable, Elicitable, OAuthCapable) - Add tools.ConfigureHandlers convenience function - Add compile-time interface assertions for MCP toolset - Update runtime to use tools.As[T] instead of UnwrapMCPToolset - Update app to use tools.As[T] for MCP toolset type assertion - Remove MCP-specific methods from ToolSet interface (now opt-in via capabilities) - Update DescriptionToolSet to use capability checking Assisted-By: cagent
Signed-off-by: David Gageot <david.gageot@docker.com>
Signed-off-by: David Gageot <david.gageot@docker.com>
Move description parameter handling from a wrapper struct to a simple function called at tool retrieval time. This eliminates the need for DescriptionToolSet to implement all capability interfaces (Startable, Instructable, Elicitable, OAuthCapable) just to forward calls. Changes: - Add addDescriptionParameter field to Agent struct - Add WithAddDescriptionParameter option - Add tools.AddDescriptionParameter function to transform tool lists - Remove DescriptionToolSet wrapper entirely - Apply transformation in agent.Tools() when flag is enabled Assisted-By: cagent
rumpl
approved these changes
Feb 2, 2026
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.
No description provided.