-
Notifications
You must be signed in to change notification settings - Fork 59
Add devcontainer configuration file #637
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
Open
nell-dot
wants to merge
370
commits into
getsentry:autofix/default-user-name
Choose a base branch
from
nell-dot:patch-1
base: autofix/default-user-name
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+94,581
−7,812
Conversation
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
Add warning log when documentation search returns no results to help identify potential issues with search queries or guide filters. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
…try#320) - Added /clear command to clear chat history - Added /logout command to logout and clear session - Pass slash command handler through component hierarchy 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
- Add quick action buttons above chat input for common prompts - Support "Get Organizations" and "React SDK Usage" sample queries - Add onSendPrompt callback to programmatically send messages - Update chat UI to show buttons when onSendPrompt handler is provided 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
…nts (getsentry#324) - Enhance use-scroll-to-bottom hook with smart user scroll detection - Reorganize platform/framework constants for better structure - Add test for invalid guide parameter validation - Improve chat UI component organization 🤖 Generated with [Claude Code](https://claude.ai/code)
- @types/node: 22.15.32 → 22.15.33 - dotenv: 16.5.0 → 16.6.1 - tsdown: 0.12.8 → 0.12.9 - @cloudflare/vite-plugin: 1.7.4 → 1.7.5 - @cloudflare/vitest-pool-workers: 0.8.43 → 0.8.47 - @cloudflare/workers-types: 4.20250620.0 → 4.20250627.0 - @tailwindcss/vite: 4.1.10 → 4.1.11 - @vitejs/plugin-react: 4.5.2 → 4.6.0 - tailwindcss: 4.1.10 → 4.1.11 - wrangler: 4.20.5 → 4.22.0 - @modelcontextprotocol/sdk: 1.13.0 → 1.13.2 - @sentry/cloudflare: 9.30.1 → 9.33.0 - @sentry/react: 9.30.1 → 9.33.0 - agents: 0.0.97 → 0.0.99 - hono: 4.8.2 → 4.8.3 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
…y#329) - Add deploy.yml for automatic production deployment on main branch - Add versions.yml for version uploads on feature branches (gradual rollouts) - Update deployment.mdc with GitHub Actions deployment instructions - Add github-actions.mdc with comprehensive setup guide 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
- Block generic HTTP clients (curl, wget, python-requests, etc) - Allow legitimate bots (search engines, monitoring services) - Return 403 Forbidden for blocked user agents - Add comprehensive test coverage 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
- Change deploy.yml to trigger on successful Test workflow completion - Update versions.yml to also use workflow_run trigger - Remove direct test job dependencies to avoid duplicate test runs - Maintain workflow_dispatch option for manual deployments 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
getsentry#335) This reverts commit 12548b2. We're blocking too much legit traffic. Need a plan b.
Add proper User-Agent headers to all HTTP requests made by the MCP server components to improve request tracking and debugging: - Cloudflare OAuth: "Sentry MCP Cloudflare" - Chat Demo OAuth: "Sentry MCP Chat Demo" - MCP Server API client: "Sentry MCP Server" - MCP CLI OAuth: "Sentry MCP CLI" This also should unblock ourselves, and hopefully anything legit. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
…etsentry#336) - Add clear 45-tool limit constraints for AI agents - Target ~20 tools, max 25 to avoid consuming all available slots - Add documentation maintenance guidelines to avoid redundancy - Update CLAUDE.md, cursor.mdc, and tool/architecture docs - Add MCP config files for Cursor and generic MCP clients 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
- Add user_agent.original attribute to all MCP operations (tools,
prompts, resources)
- Stdio: Support MCP_USER_AGENT env var with default
sentry-mcp-stdio/{version}
- Cloudflare: Capture user agent from initial SSE/WebSocket request
headers
- Document user agent tracking following OpenTelemetry semantic
conventions
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <[email protected]>
…etsentry#337) - Merge begin_seer_issue_fix and get_seer_issue_fix_status into analyze_issue_with_seer - Add automatic polling with 5s intervals and 2min timeout - Improve tool descriptions to clarify when to use for fixing issues - Update tests to reflect new combined workflow - Add instruction parameter for custom analysis guidance This simplifies the API by removing the need for manual status polling and provides a better user experience with automatic progress updates. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
…#339) - Add interactive prompt selection UI with /prompts slash command - Implement prompt dialog with argument handling and validation - Add streaming simulation for better UX during prompt execution - Create metadata endpoint for fetching available prompts - Add prompt rendering and execution in chat messages - Update chat types and persistence for prompt support - Add comprehensive documentation for prompts integration 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude <[email protected]>
Add overwatch bug predictor github workflow to this repo to enable the alpha feature. Note that this feature is currently being merged with the AI PR review feature (work tracked [here](https://linear.app/getsentry/project/25q2-error-prediction-becomes-a-ai-pr-review-feature-60c79fb6bcf8/issues)). Once that project is completed, this github action workflow can be removed (this cleanup task is tracked [here](https://linear.app/getsentry/issue/PREVENT-168)). Also note I created a token and added a secret to this repo to enable this feature (`OVERWATCH_SENTRY_AUTH_TOKEN`). This can also get cleaned up with above when ready.
Adding missing states to the exit polling and fixing bug on how status checks are polled which was causing existing status checks to be missed. --------- Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Cody De Arkland <[email protected]>
Adding patch package to set hibernate to false in agents package for cloudflare. --------- Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Didnt add pnpm-lock to last merge - fixing
CloudFlare outage resolved; removing patch configs disabling hibernate setup.
…ing (getsentry#355) - Extract helper functions for status checks and guidance messages - Add terminal status checking to avoid unnecessary polling - Add human intervention status detection with contextual guidance - Improve status display names with new statuses (PROCESSING, IN_PROGRESS) - Add better error recovery message when analysis state is lost - Use consistent naming (autofixState instead of currentState) - Simplify repeated terminal status checks with helper function 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
…finitions (getsentry#356) - Split monolithic tools.ts into individual tool modules - Each tool module uses defineTool helper for consistency - Create build-time generation of toolDefinitions.json - Update mcp-cloudflare to use generated definitions - Remove toolDefinitions.ts in favor of build-time generation - Add comprehensive refactoring documentation This refactoring improves maintainability by: - Limiting tool files to ~200 lines for better AI agent context - Using type-safe defineTool helper pattern - Generating client-safe definitions without server dependencies - Following one-tool-per-file architecture 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude <[email protected]>
…entry#601) Remove technical scope names (e.g., "event:write", "project:write") from the optional permission labels in the approval dialog. The scope names were confusing to users and the permission descriptions are sufficient. Co-authored-by: Claude Code <[email protected]>
If you all want to hire me after this, please talk to my agent
always said `slower`
From Claude Code
```
⏺ Looking at the benchmark script, the calculation is mathematically correct:
diff=$(echo "scale=2; $agent_avg - $direct_avg" | bc)
percent=$(echo "scale=1; ($agent_avg - $direct_avg) / $direct_avg * 100" | bc)
However, there's a presentation issue - the output assumes agent mode is always slower:
echo " +${diff}s (${percent}% slower)"
Problem: If direct mode is actually slower than agent mode, you'd get confusing output like:
- +-1.5s (-10% slower)
The fix should handle both cases:
# Calculate difference
diff=$(echo "scale=2; $agent_avg - $direct_avg" | bc)
percent=$(echo "scale=1; ($agent_avg - $direct_avg) / $direct_avg * 100" | bc)
# Determine if slower or faster
if (( $(echo "$diff > 0" | bc -l) )); then
echo "Difference:"
echo " +${diff}s (${percent}% slower)"
else
abs_diff=$(echo "scale=2; -1 * $diff" | bc)
abs_percent=$(echo "scale=1; -1 * $percent" | bc)
echo "Difference:"
echo " -${abs_diff}s (${abs_percent}% faster)"
fi
Would you like me to fix this in the script?
```
…ntry#604) The Statuses API requires repository-level 'Read and write permissions' which may not be available. The Checks API is better because: 1. GitHub Actions is already a GitHub App, so checks work naturally 2. More modern and flexible than the old Statuses API 3. Shows richer information (title, summary, detailed output) 4. Works with the 'checks: write' permission Also adds conditional PR comments that only appear when token count changes, providing detailed breakdown without spamming unchanged PRs. Key changes: - Replace repos.createCommitStatus() with checks.create() - Add rich check output with title and summary - Add PR comment only when delta != 0 - Remove unused statuses: write permission Co-authored-by: Claude Code <[email protected]>
…xt (getsentry#606) Simplifies context propagation by capturing ServerContext in tool handler closures during buildServer() instead of using AsyncLocalStorage at runtime. Implementation changes: - Remove context-storage.ts and AsyncLocalStorage implementation - Update buildServer() to capture context in closures - Remove serverContextStorage.run() wrappers from: - Cloudflare MCP handler - stdio transport - use_sentry tool handler - Pass context directly to tool handlers via closures and parameters Documentation updates: - Reorganize deployment docs (create releases/cloudflare.mdc, releases/stdio.mdc) - Update architecture docs to reflect closure-based context - Update references to context propagation patterns Fixes getsentry#602 Co-authored-by: Claude Code <[email protected]>
…entry#607) Add opt-in docs permission (default-checked) to control access to search_docs and get_doc tools. Follows the same pattern as the seer virtual permission for consistency. Also optimized search_docs description, reducing token cost from 1036 to 914 tokens (11.8% reduction). Overall tool definitions now use 8,947 tokens, down from 9,069 tokens. Changes: - Add docs scope to permissions.ts (Scope type, hierarchy, descriptions) - Update search_docs and get_doc to require docs permission - Add docs checkbox to OAuth approval dialog (default-checked) - Add docs permission mapping in OAuth callback handler - Optimize search_docs description for token efficiency 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
…tes (getsentry#612) After the Durable Objects to stateless migration, console logs captured were being dropped because Sentry.flush() wasn't wrapped in ctx.waitUntil(). This caused the Worker to terminate before the buffered logs could be sent to Sentry. Traces continued to work because they're sent immediately when spans complete, but logs are buffered and require explicit flushing. This restores the behavior from the old DO implementation where this.ctx.waitUntil(Sentry.flush()) ensured logs were sent. Co-authored-by: Claude Code <[email protected]>
getsentry#613) Add a well-defined User-Agent header to all smoke test HTTP requests to make them easily identifiable in server logs and analytics. The user-agent uses the format "sentry-mcp-smoke-tests". --------- Co-authored-by: Claude Code <[email protected]>
…#615) Add identifiable User-Agent headers to improve request tracking and API provider analytics: - OpenAI API requests: "Sentry MCP Server" - GitHub API requests (OTel namespace generation): "Sentry MCP Server" - OAuth registration requests: "Sentry MCP CLI" This follows best practices for HTTP clients and helps API providers identify and support Sentry MCP traffic. Co-authored-by: Claude Code <[email protected]>
…ntry#616) Add support for configuring the OpenAI model used by embedded agents via CLI flag (--openai-model) and environment variable (OPENAI_MODEL). This enables users to specify alternative models like o1-mini for AI-powered tools (search_events, search_issues, use_sentry). Also adds reasoning effort configuration for o1 models, defaulting to "low" for better performance while maintaining quality. Changes: - Add --openai-model CLI flag and OPENAI_MODEL env var - Update configureOpenAIProvider to accept defaultModel and reasoningEffort - Pass reasoning effort to OpenAI model instances - Add usage examples for new flag Fixes getsentry#610 --------- Co-authored-by: Claude Code <[email protected]>
…try#609) Adds a comprehensive skills system that organizes MCP tools into logical groups and provides enhanced authorization control. Skills provide a higher-level abstraction for tool management and permission handling. Key Changes: - Add skills.ts with skill definitions and tool-to-skill mapping - Implement skillDefinitions.ts for MCP skill metadata generation - Add /api/skills endpoint to Cloudflare worker for skill discovery - Integrate skills into MCP server alongside existing tools - Add comprehensive permission system for skill-level access control - Update CLI to support --skills flag for filtering available skills - Add skill validation script to ensure mapping consistency - Add extensive documentation (authorization.md, skill-workflows.md) Technical Details: - Skills group related tools (e.g., "issues" skill includes find_issues, get_issue_details, update_issue) - Each skill has metadata: name, description, category, required permissions - Tools maintain explicit skill mappings for authorization checks - Server exposes both tools and skills for flexible client integration - Backward compatible - existing tool-only workflows continue to work Testing: - Add server-skills-integration.test.ts for MCP protocol compliance - Add skills.test.ts for skill system unit tests - Update existing tool tests to include skill mappings Refs getsentry#196 Fixes getsentry#611 --------- Co-authored-by: Claude Code <[email protected]>
…getsentry#619) Implements rate limiting for MCP clients at 60 requests per minute per IP to protect against high traffic volumes. Built on Cloudflare rate limit bindings with privacy-preserving SHA-256 IP hashing. Key changes: - Add MCP_RATE_LIMITER binding (60 req/60s per IP) - Create reusable rate-limiter utility with graceful degradation - Create client-ip utility for consistent IP extraction across routes - Apply rate limiting before OAuth processing in index.ts - Update app.ts and search.ts to use centralized IP extraction - Add error handling and Sentry logging when IP cannot be extracted - Update tests to include required CF-Connecting-IP headers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Code <[email protected]>
getsentry#621) Logs and traces were missing from Sentry because the Sentry.flush() call in onToolComplete was not wrapped with ctx.waitUntil(). This caused the Worker to potentially terminate before the flush completed, losing buffered events. Now both flush calls (in onToolComplete and at the end of the handler) use ctx.waitUntil() to ensure the Worker stays alive until all Sentry events are sent. Co-authored-by: Claude Code <[email protected]>
getsentry#622) Refactors the Sentry flush approach to use the main OAuth provider wrapper instead of the onToolComplete callback. This ensures Sentry logs are flushed for all requests, not just MCP tool executions. Changes: - Remove onToolComplete callback from buildServer - Remove duplicate Sentry.flush after createMcpHandler - Add Sentry.flush in wrappedOAuthProvider for all requests - Rename corsWrappedOAuthProvider to wrappedOAuthProvider for brevity Co-authored-by: Claude Code <[email protected]>
Fixes MCP-SERVER-EVJ by removing the agent-tools.ts module and replacing it with an agentMode parameter in buildServer() and configureServer(). This simplifies the architecture by: - Using a boolean flag instead of a separate tool registry - Keeping all tool logic in one place (tools/index.ts) - Removing an unnecessary level of indirection - Making agent mode filtering explicit in configureServer() When agentMode is true, only use_sentry is registered and authorization checks are bypassed (use_sentry handles auth internally). Co-authored-by: Claude Code <[email protected]>
…flow (getsentry#625) Replace base64-encoded state parameters with HMAC-signed compact format to prevent tampering and replay attacks during OAuth approval flow. Key changes: - State parameters now include signature, issued-at, and expiry timestamps - 10-minute expiry window prevents replay attacks - Signature verification ensures state integrity - Comprehensive tests for tampering, expiry, and secret validation Security improvements: - CSRF protection via cryptographic signatures - Time-bound state prevents stale approval attempts - Tamper detection for clientId and other OAuth parameters 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Code <[email protected]>
…getsentry#626) Replace generic use_sentry tool description with a comprehensive, capability-focused version that helps LLMs better understand when to trigger the tool. Key improvements: - Added clear use cases: multi-step operations, exploration, chaining - Listed capabilities organized by skill (inspect, seer, docs, triage, project-management) - Included 3 concrete usage examples - Added explicit hint that "use Sentry" phrases trigger this tool - Provided guidance on parameter passing and trace debugging This addresses issues where LLMs weren't reliably triggering use_sentry when users asked to "use Sentry" for tasks or requested complex operations. Co-Authored-By: Claude Code <[email protected]> --------- Co-authored-by: Claude Code <[email protected]>
The combination of .optional() and .default() creates ambiguous schema behavior where Zod treats the field as potentially undefined despite having a default value. This can cause type mismatches and unexpected undefined values at runtime. Changes: - Removed .optional() from maxResults in search-events handler - Removed .optional() from maxResults in search-issues handler The .default() modifier already makes the field optional in practice while ensuring it always has a value. --------- Co-authored-by: Claude <[email protected]>
Replace outdated scope-based configuration (--all-scopes, --scopes, --add-scopes) with modern skills-based approach (--skills). Skills automatically grant the minimum scopes required by selected tools, simplifying configuration. Added the OPENAI_API_KEY flag. Key changes: - Document skills configuration with ordered list of available skills - Add OpenAI API key documentation for search_events/search_issues tools - Remove outdated troubleshooting section - Clarify that AI-powered search tools are optional Fixes getsentry#629 Co-authored-by: Claude <[email protected]>
we upgraded sentry's sdk from `v9` to `v10` on getsentry#584 . On `v10` `enableLogs` is no longer a `_experimental` option (and was removed from there). This should bring logs back. Tested locally.
- Add generate-definitions task with explicit inputs/outputs - Remove unnecessary ^build dependencies for lint, test, tsc - Add specific input patterns for better cache invalidation - Use predev hook instead of inline command for mcp-server - Externalize @sentry/mcp-server-mocks in tsdown to avoid bundling --------- Co-authored-by: Claude <[email protected]>
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.
No description provided.