Repository navigation
Merge v1 MCP 2026 alignment into main - #3
Merged
Merged
Conversation
Bug fixes: - High: Fix dispatcher retry storm by ACKing terminal errors and implementing retry counter - High: Fix TakeScreenshot empty traceId causing corrupted S3 keys and orphaned DB rows - Medium: Fix JSON-RPC schema validator CWD dependency by embedding schemas Refactor: - MCP tools now load from embedded JSON files (internal/gateway/mcp/tools/*.json) - Single source of truth for tool schemas — no more duplicate definitions - Easier maintenance — adding a new tool = adding a JSON file Technical details: - dispatcher.go: Added handleDispatchError with terminal error detection and Redis retry counter - service.go: Added traceId validation guard in TakeScreenshot - tools.go: Replaced 300+ lines of hardcoded maps with 140 lines reading from embed.FS - validator.go: Replaced os.ReadDir with embed.FS for schema files - redis/cache.go: Added Incr method for atomic counter with TTL 🤖 Generated with Claude Code Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added fine-grained interactive tools for agent exploration: - findElement - Locate UI elements by strategy (id, xpath, accessibility id, etc.) - clickElement - Click on located elements - sendKeysToElement - Input text to elements - clearElement - Clear input fields - getElementText - Retrieve element text content - getElementAttribute - Get element attributes (enabled, selected, etc.) - isElementDisplayed - Check element visibility - tap - Tap at screen coordinates - swipe - Swipe gesture between coordinates - longPress - Long press on elements - pressBack - Press device back button - hideKeyboard - Hide soft keyboard Total tools now: 20 (8 batch + 12 interactive) This enables two usage patterns: 1. Batch testing - Use executePlan with multi-step plans (good for CI/CD) 2. Interactive exploration - Use fine-grained tools for agent decision-making Extended appium/client.go with W3C WebDriver Actions API for gestures. All tools available via both MCP protocol and JSON-RPC 2.0. 🤖 Generated with Claude Code Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updated all 20 tool descriptions to be comprehensive and LLM-friendly: - Changed from brief Chinese to detailed English explanations - Added context on when to use each tool - Included failure conditions and edge cases - Explained return values and behavior - Provided usage patterns and best practices - Added concrete examples in parameter descriptions Key improvements: - findElement: Explains all 7 locator strategies with examples - executePlan: Clarifies batch vs interactive mode usage - getSemanticSnapshot: Details differential update mechanism - swipe: Documents common scroll patterns and duration effects - All parameters now have clear, actionable descriptions This ensures LLMs can make informed decisions about which tools to call and how to construct correct arguments based solely on the tools/list response. 🤖 Generated with Claude Code Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added comprehensive test suite to verify MCP implementation: - test_tools.go: Tool registry and schema validation test - test_mcp_protocol.go: MCP protocol compliance test (initialize, tools/list, tools/call, resources/list) - test_summary.go: Tool categorization and usage pattern summary - test_show_all_tools.go: Detailed tool catalog display - test_mcp.sh: Stdio mode integration test script All tests pass successfully: ✓ 20 MCP tools loaded from embedded JSON files ✓ Schema validation working correctly ✓ MCP protocol 2024-11-05 compliant ✓ Error handling with proper error codes ✓ 3 resource types exposed (artifacts, traces, sessions) Note: Full integration tests require Postgres, Redis, S3, and Appium server. Core protocol layer verified without external dependencies. 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Align the MCP server with the 2026-07-28 protocol and include the reviewed runtime, security, distributed execution, test, and documentation fixes.
# Conflicts: # CHANGELOG.md # LICENSE # README.md # RELEASE_NOTES_v1.0.0.md # SECURITY.md # THIRD_PARTY_INTEGRATION.md # USAGE_EXAMPLES.md # cmd/gateway/main.go # cmd/gateway/main_test.go # cmd/gateway/security.go # cmd/orchestrator/main.go # cmd/worker/main.go # config.example.yaml # config.production.example.yaml # go.mod # go.sum # internal/auth/context.go # internal/auth/hmac.go # internal/auth/hmac_test.go # internal/auth/oidc.go # internal/auth/pat.go # internal/config/loader.go # internal/config/loader_test.go # internal/errors/codes.go # internal/errors/codes_test.go # internal/gateway/jsonrpc/handler.go # internal/gateway/jsonrpc/handler_test.go # internal/gateway/mcp/handler.go # internal/gateway/mcp/mcp_test.go # internal/gateway/mcp/tools.go # internal/gateway/middleware/auth.go # internal/gateway/middleware/auth_test.go # internal/gateway/rest/router.go # internal/gateway/stdio/transport.go # internal/gateway/stdio/transport_test.go # internal/gateway/websocket/handler.go # internal/gateway/websocket/subscription_token.go # internal/gateway/websocket/subscription_token_test.go # internal/orchestrator/devicefarm_runtime.go # internal/orchestrator/dispatcher.go # internal/orchestrator/distributed_callback_test.go # internal/orchestrator/distributed_callbacks.go # internal/orchestrator/health.go # internal/orchestrator/health_check_test.go # internal/orchestrator/persistence.go # internal/orchestrator/service.go # internal/orchestrator/trace_terminal_test.go # internal/orchestrator/worker_registry.go # internal/orchestrator/worker_registry_recovery_test.go # internal/storage/postgres/auth_store.go # internal/storage/postgres/coordination.go # internal/storage/postgres/dao.go # internal/storage/redis/cache.go # internal/telemetry/logging.go # internal/telemetry/telemetry_test.go # internal/worker/appium/client.go # internal/worker/appium/client_test.go # internal/worker/executor.go # internal/worker/executor_test.go # internal/worker/grpc_server.go # internal/worker/grpc_server_test.go
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
v1release line intomain2026-07-28stateless discovery and Streamable HTTP support while preserving legacy initialization compatibilitymainValidation
go test ./... -count=1go vet ./...git diff --cached --checkbefore merge commitorigin/v1forcmd/,internal/,go.mod, andgo.sum