-
Notifications
You must be signed in to change notification settings - Fork 2
ql-mcp-client rewrite: Phases 1 & 2 β Replace ql-mcp-client.js with Go implementation
#223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
9de4f5e
Initial plan
Copilot 80a834c
Phase 1: Update documentation and GitHub config for Go-based client
Copilot 5fa2de9
Update client/.gitignore for go ql-mcp-client
data-douser 96761e8
Replace JavaScript client with Go binary and integration test runner β¦
Copilot 1f3181d
Apply suggestions from code review
data-douser cc4b4dd
Remove client_src_js.instructions.md
data-douser 7062e56
Apply suggestions from code review
data-douser 886f322
Address PR review feedback
data-douser d6e6528
Apply suggestions from code review
data-douser 73f4f58
Improve ql-mcp-client from PR feedback
data-douser 39e44a8
Fix "--no-install-packs" in client integration test runner
data-douser eb86aaa
Fixes for failing client integration tests
data-douser e70d8c3
Fix extension mcp-tool-e2e.integration.test.ts
data-douser d66466d
More fixes for PR review feedback
data-douser ad343e5
Fix client-integration-tests.yml Windows job
data-douser e753c11
More fixes for PR review feedback
data-douser bc1ca44
Updates for compatibility with main-merged PRs
data-douser 517cc1a
Fix client-integration-tests for extract dbs
data-douser 9631d3c
Address PR review feedback: fix Close() kill, remove enableAnnotationβ¦
Copilot 89cff05
Revert test-integration to skip pack install by default, add test-intβ¦
Copilot 1f9e6b9
Address review thread 4071470992: path check, changelog, timeout helpβ¦
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| --- | ||
| applyTo: 'client/**/*.go' | ||
| description: 'Instructions for MCP client Go source code files.' | ||
| --- | ||
|
|
||
| # Copilot Instructions for `client/**/*.go` code files | ||
|
|
||
| ## PURPOSE | ||
|
|
||
| The `client/` directory implements `gh-ql-mcp-client`, a Go CLI that combines GitHub Code Scanning REST API operations (via `go-gh`) with the CodeQL Development MCP Server's SARIF analysis tools (via `mcp-go`). It serves as both a standalone CLI / `gh` extension for Code Scanning alert lifecycle management and as an integration test runner for MCP server primitives. | ||
|
|
||
| ## REQUIREMENTS | ||
|
|
||
| - ALWAYS use modern Go idioms and standard library conventions. | ||
| - ALWAYS follow best practices for implementing secure Go code. | ||
| - ALWAYS order imports with standard library first, then external packages, then internal packages. | ||
| - ALWAYS follow a test-driven development (TDD) approach β write Go tests before implementing new functionality. | ||
| - **ALWAYS run `npm run build-and-test` from the repo root directory and ensure it passes completely before committing any changes. This is MANDATORY and must be verified before every commit.** | ||
| - ALWAYS fix lint issues by running `make -C client lint` before committing changes. | ||
| - **ALWAYS run `make -C client test-unit` and ensure all Go unit tests pass before committing changes to client code.** | ||
| - ALWAYS reference the [client_integration_tests.instructions.md](./client_integration_tests.instructions.md) and [client/integration-tests/README.md](../../client/integration-tests/README.md) files when implementing or modifying integration tests for MCP server primitives. | ||
|
|
||
| ## PREFERENCES | ||
|
|
||
| - PREFER using Cobra subcommands for CLI structure (`client/cmd/`). | ||
| - PREFER keeping each command in its own file (e.g., `client/cmd/code_scanning_list_alerts.go`). | ||
| - PREFER the `internal/` package layout for non-exported packages (`github/`, `mcp/`, `testing/`). | ||
| - PREFER table-driven tests with `t.Run` subtests. | ||
| - PREFER simple integration tests with `test-config.json` fixtures over complex programmatic setup. | ||
| - PREFER building on the existing integration test approach rather than implementing a new approach. | ||
|
|
||
| ## CONSTRAINTS | ||
|
|
||
| - NEVER leave any trailing whitespace on any line. | ||
| - NEVER guess at what an MCP server primitive is supposed to do; instead, look up its source code in `server/src/**/*.ts` files. | ||
| - NEVER use `os.TempDir()`, `/tmp`, or any OS-level temporary directory β use the project-local `.tmp/` directory via `{{tmpdir}}` in test fixtures. |
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
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.