Skip to content

feat: CLI self-update command, update check, and wfctl mcp subcommand#203

Merged
intel352 merged 3 commits intomainfrom
copilot/add-cli-self-update-functionality
Feb 27, 2026
Merged

feat: CLI self-update command, update check, and wfctl mcp subcommand#203
intel352 merged 3 commits intomainfrom
copilot/add-cli-self-update-functionality

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

  • Explore repository structure and understand existing code
  • Add cmd/wfctl/update.go - self-update command + update check logic
  • Add cmd/wfctl/mcp.go - mcp subcommand wrapping the MCP server
  • Update cmd/wfctl/main.go - register update and mcp commands, version check on startup
  • Add cmd/wfctl/update_test.go - tests for update check + self-update
  • Add cmd/wfctl/mcp_test.go - tests for MCP command
  • Update docs/mcp.md - document the new wfctl mcp command and migration notes
  • Address review: set workflowmcp.Version = version in runMCP before creating server
  • Address review: make checkForUpdateNotice truly non-blocking — returns done channel, command runs first, wait happens after command completes
  • Address review: verify release asset integrity using checksums.txt from GitHub release
  • Address review: replace downloadURL (no timeout) with downloadWithTimeout for binary downloads
  • Address review: handle Windows — write .new.exe alongside current binary with instructions instead of failing os.Rename
  • Address review: preserve existing binary file permissions instead of hardcoding 0755
  • Address review: fix error format — single-line error, print hint to stderr separately
  • Run linter - 0 issues
  • Run tests - all pass

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for CLI tool to determine and apply updates feat: CLI self-update command, update check, and wfctl mcp subcommand Feb 27, 2026
@intel352 intel352 marked this pull request as ready for review February 27, 2026 14:43
Copilot AI review requested due to automatic review settings February 27, 2026 14:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds CLI self-updating and integrates the MCP server into wfctl to keep tooling aligned with engine/CLI releases, alongside documentation updates for MCP client configuration.

Changes:

  • Introduces wfctl update (including --check) and a per-command update-availability notice.
  • Adds wfctl mcp subcommand that runs the MCP server over stdio (delegating to the existing mcp package).
  • Updates MCP documentation to prefer wfctl mcp and documents the update workflow.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
docs/mcp.md Documents wfctl mcp as the preferred MCP entrypoint and adds update instructions.
cmd/wfctl/main.go Registers new update/mcp commands and triggers update notices for most commands.
cmd/wfctl/update.go Implements GitHub-release-based self-update, update checks, and update notices.
cmd/wfctl/update_test.go Adds unit tests for release lookup, binary replacement, and update check flows.
cmd/wfctl/mcp.go Implements wfctl mcp command wrapper around the mcp package server.
cmd/wfctl/mcp_test.go Adds basic flag-parsing tests for the new mcp command.

@intel352
Copy link
Contributor

@copilot apply changes based on the comments in this thread

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
@intel352 intel352 merged commit 3efd62d into main Feb 27, 2026
14 checks passed
@intel352 intel352 deleted the copilot/add-cli-self-update-functionality branch February 27, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants