Conversation
- Introduced a new client command for MCP to interact with external servers, including subcommands for listing tools, resources, prompts, and calling tools. - Enhanced the web UI to support MCP functionalities, including displaying server info, tools, resources, and prompts. - Implemented a new in-process MCP client session to facilitate communication between the web UI and MCP server. - Added API endpoints for MCP operations in the web server, allowing for seamless integration with the front-end. - Updated the command structure to include the new client command and adjusted tests accordingly.
There was a problem hiding this comment.
Code Review
This pull request significantly enhances the framework's MCP integration and refines flag inheritance. Key features include a new mcp client subcommand, SKILL.md generation support, and an MCP management tab in the Web UI. Flag inheritance is now disabled by default, requiring explicit configuration via the Inherit field. Documentation and internal server logic were updated to support a unified {data, message} response envelope. Review feedback recommends using a robust shell-parsing library for command strings in the MCP client and removing the unused parseExternalCommand function.
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.
This pull request introduces several improvements and changes to the CLI framework, focusing on option inheritance, global flag behavior, structured response output, and better support for tool exclusion and completion. The most significant updates include making option inheritance explicit and non-default, unifying and clarifying global flag usage, introducing a new
--raw-envelopeflag for output control, and enhancing documentation and shell completion scripts to reflect these changes.Core framework changes:
Inherit: trueis set. This is reflected in both the code (GlobalFlags,OptionSet) and documentation. (args.go[1]README.md[2] [3]--list-commands,--list-flags, and--list-formatare now only available on the root command (Inherit: false), reducing clutter and preventing accidental propagation to subcommands. (args.go[1]README.md[2]Output and response handling:
--raw-envelopeflag, allowing users to control whether output is wrapped in a structured NDJSON envelope. This flag is now available globally (with inheritance) and is documented in both user and developer docs. (args.go[1].github/copilot-instructions.md[2]{data, message}JSON envelope, removing legacy/duplicate fields and aligning output schemas across the system. (.version/changelog/Unreleased.md.version/changelog/Unreleased.mdL7-R32)Tool exclusion and metadata:
agent.excludemetadata key andInfraMetadatahelper to easily exclude infrastructure commands (likemcp,completion, etc.) from tool/resource listings and prompt generation. (args.go[1]cmds/completioncmd/completion.go[2]llms-txtand MCP listings now consistently filter out excluded commands in all output formats. (.version/changelog/Unreleased.md.version/changelog/Unreleased.mdL7-R32)Shell completion and documentation:
--raw-envelopeflag. (cmds/completioncmd/testdata/testapp.bash.golden[1]cmds/completioncmd/testdata/testapp.zsh.golden[2] [3] [4]cmds/completioncmd/testdata/testapp.fish.golden[5]README.md[1] [2] [3].github/copilot-instructions.md[4].version/changelog/Unreleased.md[5]Versioning:
.version/VERSION.version/VERSIONL1-R1)