Conversation
Implement `wtmcpctl check` that produces the same diagnostic output as `wtmcp check`: version, workdir, plugin mode, vault password status, env groups, plugin search path (with ok/missing), and discovered plugins with tool counts. Reuses `plugin.Discover()` with the globalWorkdir flag already set by PersistentPreRunE, so `--workdir` is respected automatically. The check.go file includes printCtlVaultStatus and printCtlCredentialFileStatus, mirroring the logic in cmd/wtmcp/main.go but without server-specific concerns (sandbox, read-only flag).
Add checkCmd to rootCmd.AddCommand so it appears in `wtmcpctl --help`.
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.
Summary
Implements the
wtmcpctl checkcommand (ticket #55).Changes
cmd/wtmcpctl/check.go: newchecksubcommand that produces a diagnostic report, mirroring therunCheck()logic fromcmd/wtmcp/main.gowith intentional omissions:sandbox.Built()— server-specific concern not applicable towtmcpctlreadOnlyflag — server-specific concerncmd/wtmcpctl/main.go: registers the newcheckCmdwithrootCmdDiagnostic output includes
Test Plan
go test ./cmd/wtmcpctl/...— passes (0.007s, no failures)golangci-lint run ./cmd/wtmcpctl/...— 0 issuesgo test ./...— 29 packages, all passwtmcpctl checkexits 0 with full diagnostic reportwtmcpctl check --workdir /custom/pathcorrectly uses specified workdirAcceptance Criteria
wtmcpctl checkruns without error and produces diagnostic output--workdir /custom/pathflag is respectedwtmcpctl --helpgo test ./cmd/wtmcpctl/...passesgolangci-lint run ./cmd/wtmcpctl/...passes (0 issues)