Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 11, 2025

  • Implement TypeScript/Node.js MCP server for safe-outputs with comprehensive tests
  • Fix nil pointer dereference in MCP config generation and deprecated imports
  • Refactor hasSafeOutputsEnabled to common helper in safe_outputs.go
  • Refactor codex engine to use common HasSafeOutputsEnabled helper
  • Investigate Go MCP SDK integration - compatibility issues found with newer versions
  • Revert to Go MCP SDK v0.4.0 and fix deprecated API usage
  • Add comprehensive test using MCP TypeScript SDK (@modelcontextprotocol/sdk v1.17.5)
  • Move MCP TypeScript SDK to devDependencies for proper dependency categorization
  • Merge origin/main and update MCP server to use latest TypeScript safe-outputs definitions
  • Add --mcp-debug flag support to Claude engine - Replaced MCP_LOG_LEVEL: debug and DEBUG: mcp:* environment variables with mcp_debug: true input parameter that leverages Claude Code CLI's native --mcp-debug flag for better debugging integration when safe outputs or custom environment variables are configured
  • Remove specific DEBUG: claude:mcp: entries* - Removed redundant DEBUG: claude:mcp:* environment variable entries while keeping the general DEBUG: mcp:* entries for MCP debugging
  • Update mcp-inspect to detect built-in MCPs - Enhanced MCP detection to include safe-outputs as a built-in MCP server alongside github and playwright
  • Create safe-outputs MCP server files locally - When inspecting safe-outputs, the command now writes JavaScript MCP server to .aw/safe-outputs/mcp-server.js with configuration, output file, and executable run script for local testing
  • Merge origin/main with Claude CLI integration - Successfully merged latest changes from main branch including Claude CLI direct usage, resolved merge conflicts, and fixed safe-outputs MCP configuration integration to ensure safe-outputs is properly included in MCP tools list for Codex engine
  • Remove test-safe-output-missing-tool-claude workflow files - Removed both .md and .lock.yml files as requested
  • Fix nil pointer dereference in compiler - Added proper nil check for workflowData before accessing its fields to resolve staticcheck warning
  • Fix JavaScript tests and mocks - Updated test expectations to match current MCP server implementation, fixing tool naming conventions and test logic

Recent Fix Details

Fixed failing tests by updating test expectations to match the current MCP server implementation:

Tool naming consistency - Updated test expectations from underscored names (create_issue, missing_tool) to hyphenated names (create-issue, missing-tool) to match actual MCP server behavior

Missing-tool prompt generation test - Updated TestMissingToolPromptGeneration to match current implementation which only adds header text without detailed instructions

MCP server tool tests - Fixed all TestSafeOutputsMCPServer_* tests to use correct tool names and handle disabled tool scenarios properly

Disabled tool handling - Updated disabled tool test to include at least one enabled tool for server startup and accept "Tool not found" error message for disabled tools

All tests now pass consistently without modifying the source code implementation.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add a typescript/node.js/esm implementation of a MCP server (model context protocol) for the safe-outputs feature. Each safe-output type is a tool; each tool call appends a safe output to the safe output file; enabled tools are controlled by the safe o... Add TypeScript/Node.js MCP server for safe-outputs with zero dependencies Sep 11, 2025
Copilot AI requested a review from pelikhan September 11, 2025 05:49
Copy link
Contributor Author

Copilot AI commented Sep 11, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.contoso.com
    • Triggering command: /tmp/go-build2422702117/b278/cli.test -test.testlogfile=/tmp/go-build2422702117/b278/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)
    • Triggering command: /tmp/go-build3736928890/b278/cli.test -test.testlogfile=/tmp/go-build3736928890/b278/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)
    • Triggering command: /tmp/go-build2140046656/b278/cli.test -test.testlogfile=/tmp/go-build2140046656/b278/testlog.txt -test.paniconexit0 -test.timeout=10m0s (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copy link
Contributor Author

Copilot AI commented Sep 11, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/search/repositories
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan
Copy link
Contributor

@copilot revert last commit

…arnings

Reverted commit b2a3f2d which downgraded MCP SDK to v0.2.0.
Now back to using Go MCP SDK v0.4.0 with proper API usage:
- Fixed Client.Connect calls to include nil ClientSessionOptions parameter
- Replaced deprecated NewCommandTransport with CommandTransport struct literal
- Replaced deprecated NewStreamableClientTransport with StreamableClientTransport struct literal
- All tests passing and linter clean

Co-authored-by: pelikhan <[email protected]>
Copy link
Contributor Author

Copilot AI commented Sep 11, 2025

@copilot revert last commit

Reverted commit b2a3f2d as requested. Now back to using Go MCP SDK v0.4.0 with proper API usage and fixed deprecation warnings. Commit: 8f15ff6

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.contoso.com
    • Triggering command: /tmp/go-build1680963516/b279/cli.test -test.testlogfile=/tmp/go-build1680963516/b279/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan
Copy link
Contributor

@copilot add a test in the vitest JavaScript test suite that uses the MCP typescript SDK to list tools, call tools, validate file is generated.

@pelikhan
Copy link
Contributor

@copilot fix the tests, do not modify the source code.

Copy link
Contributor Author

Copilot AI commented Sep 15, 2025

@copilot fix the tests, do not modify the source code.

Fixed the failing tests by updating test expectations to match the current MCP server implementation. Key changes:

  • Updated tool naming conventions from underscores to hyphens (e.g., create_issuecreate-issue)
  • Fixed missing-tool prompt generation test to match actual implementation behavior
  • Updated disabled tool test to handle server startup and error message expectations correctly

All tests now pass without modifying source code. Commit: 1e57d70

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.contoso.com
    • Triggering command: /tmp/go-build2921975893/b279/cli.test -test.testlogfile=/tmp/go-build2921975893/b279/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)
    • Triggering command: /tmp/go-build1023522378/b279/cli.test -test.testlogfile=/tmp/go-build1023522378/b279/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)
    • Triggering command: /tmp/go-build275948141/b279/cli.test -test.testlogfile=/tmp/go-build275948141/b279/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan pelikhan merged commit 3904d93 into main Sep 15, 2025
10 checks passed
@pelikhan pelikhan deleted the copilot/fix-dab7400a-14d1-4802-81ec-ee5946e7c01c branch September 15, 2025 21:25
dsyme pushed a commit that referenced this pull request Sep 25, 2025
…726)

* Initial plan

* Implement run-doctor workflow for CI failure investigation

Co-authored-by: pelikhan <[email protected]>

* Merge branch 'main' into copilot/fix-725

* Add missing workflow_run expressions to allow run-doctor workflow compilation

Co-authored-by: pelikhan <[email protected]>

* Remove user-controlled strings from workflow_run expressions for security

Co-authored-by: pelikhan <[email protected]>

* Merge remote-tracking branch 'origin/main' into copilot/fix-725

* Merge remote-tracking branch 'origin/main' into copilot/fix-725

* Merge branch 'main' into copilot/fix-725

* Remove unused GitHub Actions workflow_run expressions from AllowedExpressions

* Merge branch 'main' into copilot/fix-725
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