mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-09-01 03:53:19 +02:00
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com> Co-authored-by: Marvin Context Protocol <41898282+Marvin Context Protocol@users.noreply.github.com> Co-authored-by: voidborne-d <voidborne-d@users.noreply.github.com> Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: d 🔹 <258577966+voidborne-d@users.noreply.github.com> Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> Co-authored-by: nightcityblade <nightcityblade@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Bill Easton <strawgate@users.noreply.github.com> Co-authored-by: Sumanshu Nankana <sumanshunankana@gmail.com> Co-authored-by: Eric Robinson <ericrobinson@indeed.com> Co-authored-by: Martim Santos <martimfasantos@gmail.com> Co-authored-by: d 🔹 <liusway405@gmail.com> Co-authored-by: Matthieu B <66959271+mtthidoteu@users.noreply.github.com> Co-authored-by: Sascha Buehrle <47737812+saschabuehrle@users.noreply.github.com> Co-authored-by: Hakancan <142545736+hkc5@users.noreply.github.com> Co-authored-by: nightcityblade <jackchen@haloailabs.com> Co-authored-by: Matt Hallowell <17804673+mhallo@users.noreply.github.com> Co-authored-by: nate nowack <thrast36@gmail.com> Co-authored-by: Bill Easton <williamseaston@gmail.com> Co-authored-by: Marcus Shu <46469249+shulkx@users.noreply.github.com> Co-authored-by: Rushabh Doshi <radoshi@gmail.com> Co-authored-by: AIKAWA Shigechika <shige@aikawa.jp> Co-authored-by: Jeremy Simon <simonjer805@gmail.com> Co-authored-by: Miguel Miranda Dias <7780875+pandego@users.noreply.github.com> Co-authored-by: Anthony James Padavano <padavano.anthony@gmail.com> Co-authored-by: Mostafa Kamal <hiremostafa@gmail.com> Fix auto-close MRE script posting comment without closing (#3386) Fix WorkOS token scope verification bypass 🤖 Generated with Codex (#3407) Fix initialize McpError fallthrough 🤖 Generated with Codex (#3413) Fix transform arg collisions with passthrough params (#3431) Fix get_* returning None when latest version is disabled (#3439) Fix get_* returning None when latest version is disabled (#3421) Fix server lifespan overlap teardown (#3415) Fix $ref output schema object detection regression (#3420) resolved annotations (#3429) Fix async partial callables rejected by iscoroutinefunction (#3438) Fix async partial callables rejected by iscoroutinefunction (#3423) fix: add version to components (#3458) fix: use intent-based flag for OIDC scope patch in load_access_token (#3465) Fixes #3461 fix: normalize Google scope shorthands and surface valid_scopes (#3477) fix: resolve ty 0.0.23 type-checking errors and bump pin (#3481) fix: shield lifespan teardown from cancellation (#3480) fix: forward custom_route endpoints from mounted servers (#3462) fix updates _get_additional_http_routes() to traverse providers, Fixes #3457 fix: remove hardcoded version from CLI help text (#3456) fix: monty 0.0.8 compatibility, drop external_functions from constructor (#3468) fix: task test teardown hanging 5s per test (#3499) Closes #3498 fix: validate workspace path is a directory before cursor install (#3440) Fixes #3426 fix: handle re.error from malformed URI templates in build_regex (#3501) fix: reject empty/OIDC-only required_scopes in AzureProvider (#3503) fix: restrict $ref resolution to local refs only (SSRF/LFI) (#3502) fix warnings and timeouts (#3504) close upgrade check issue when build passes (#3505) Closes #3484 fix: URL-encode path params to prevent SSRF/path traversal (GHSA-vv7q-7jx5-f767) (#3507) fix: prevent path traversal in skill download (#3493) fix: prefer IdP-granted scopes over client-requested scopes in OAuthProxy (#3492) fix: remove unrelated transform and http.py changes from PR scope fix: remove forced follow_redirects from httpx_client_factory calls (#3496) fix: stop passing follow_redirects to httpx_client_factory fix: restore follow_redirects=True for custom httpx client factories Closes #3509 fix: CSRF double-submit cookie check in consent flow (#3519) fix: validate server names in install commands (#3522) fix: use raw strings for regex in pytest.raises match (#3523) fix: reject refresh tokens used as Bearer access tokens (#3524) fix: route ResourcesAsTools/PromptsAsTools through server middleware (#3495) fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540) fix: filter warnings by message in KEY_PREFIX test (#3549) fix: suppress output schema for ToolResult subclass annotations (#3548) fix: increase sleep duration in proxy cache tests (#3567) fix: store absolute token expiry to prevent stale expires_in on reload (#3572) fix: preserve tool properties named 'title' during schema compression (#3582) Fix loopback redirect URI port matching per RFC 8252 §7.3 (#3589) Fix app tool routing: visibility check and middleware propagation (#3591) Fix query parameter serialization to respect OpenAPI explode/style settings (#3595) Fix dev apps form: union types, textarea support, JSON parsing (#3597) fix(google): replace deprecated /oauth2/v1/tokeninfo with /oauth2/v3/userinfo (#3603) fix: resolve EntraOBOToken dependency injection through MultiAuth (#3609) fix(docs): correct misleading stateless_http header (#3622) fix: filesystem provider import machinery (#3626) Closes #3625 (issues 2, 3, 6) fix: recover StdioTransport after subprocess exits (#3630) fix(server): preserve mounted tool task metadata (#3632) fix: scope deprecation warning filter to FastMCPDeprecationWarning (#3649) fix imports, add PrefabAppConfig (#3650) fix: resolve CurrentFastMCP/ctx.fastmcp to child server in mounted background tasks (#3651) Fix blocking docs issues: chart imports, Select API, Rx consistency (#3652) closed by default (#3657) Fix prompt caching middleware missing wrap/unwrap round-trip (#3666) fix: serialize object query params per OpenAPI style/explode rules (#3662) Fixes #2857 fix: HTTP request headers not accessible in background task workers (#3631) fix: restore HTTP headers in worker execution path for background tasks (#3681) fix: strip discriminator after dereferencing schemas (#3682) fix: remove stale ty:ignore directives for ty 0.0.26 (#3684) Fix docs gaps in app provider pages (#3690) fix: dev apps log panel UX improvements (#3698) fix dev server empty string args (#3700)
205 lines
12 KiB
YAML
205 lines
12 KiB
YAML
# Triage new issues: investigate, recommend, apply labels
|
|
# Calls run-claude directly with triage prompt (elastic issue-triage style)
|
|
|
|
name: Triage Issue
|
|
|
|
on:
|
|
issues:
|
|
types: [opened]
|
|
|
|
jobs:
|
|
triage:
|
|
if: |
|
|
github.event.issue.user.login == 'strawgate' ||
|
|
(github.event.issue.user.login == 'jlowin' && contains(toJSON(github.event.issue.labels.*.name), 'bug'))
|
|
concurrency:
|
|
group: triage-issue-${{ github.event.issue.number }}
|
|
cancel-in-progress: true
|
|
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
pull-requests: read
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
repository: ${{ github.repository }}
|
|
ref: ${{ github.event.repository.default_branch }}
|
|
|
|
- name: Generate Marvin App token
|
|
id: marvin-token
|
|
uses: actions/create-github-app-token@v3
|
|
with:
|
|
app-id: ${{ secrets.MARVIN_APP_ID }}
|
|
private-key: ${{ secrets.MARVIN_APP_PRIVATE_KEY }}
|
|
|
|
- name: React to issue with eyes
|
|
env:
|
|
GH_TOKEN: ${{ steps.marvin-token.outputs.token }}
|
|
run: |
|
|
gh api "repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/reactions" -f content=eyes 2>/dev/null || true
|
|
|
|
- name: Run Claude for Triage
|
|
uses: ./.github/actions/run-claude
|
|
with:
|
|
claude-oauth-token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
github-token: ${{ steps.marvin-token.outputs.token }}
|
|
allowed-tools: "Edit,MultiEdit,Glob,Grep,LS,Read,Write,WebSearch,WebFetch,mcp__github_comment__update_claude_comment,mcp__github_ci__get_ci_status,mcp__github_ci__get_workflow_run_details,mcp__github_ci__download_job_log,Bash(*),mcp__agents-md-generator__generate_agents_md,mcp__public-code-search__search_code"
|
|
prompt: |
|
|
<context>
|
|
Repository: ${{ github.repository }}
|
|
Issue Number: #${{ github.event.issue.number }}
|
|
Issue Title: ${{ github.event.issue.title }}
|
|
Issue Author: ${{ github.event.issue.user.login }}
|
|
</context>
|
|
|
|
<issue_body>
|
|
${{ github.event.issue.body }}
|
|
</issue_body>
|
|
|
|
<task>
|
|
Triage this new GitHub issue and provide a helpful, actionable response. You can write files and execute commands to test, verify, or investigate the issue.
|
|
</task>
|
|
|
|
<constraints>
|
|
This workflow is for investigation, testing, and planning.
|
|
|
|
You CANNOT: Create branches, checkout branches, commit code to the repository
|
|
Do not push changes to the repository.
|
|
You CAN: Read/analyze code, search repository, review git history, search for similar issues, write files, verify behavior, provide analysis and recommendations
|
|
</constraints>
|
|
|
|
<allowed_tools>
|
|
You have access to the following tools (comma-separated list):
|
|
|
|
Edit,MultiEdit,Glob,Grep,LS,Read,Write,WebSearch,WebFetch,mcp__github_comment__update_claude_comment,mcp__github_ci__get_ci_status,mcp__github_ci__get_workflow_run_details,mcp__github_ci__download_job_log,Bash(*),mcp__agents-md-generator__generate_agents_md,mcp__public-code-search__search_code
|
|
|
|
You can only use tools that are explicitly listed above. For Bash commands, the pattern `Bash(command:*)` means you can run that command with any arguments. If a command is not listed, it is not available.
|
|
</allowed_tools>
|
|
|
|
<getting_started>
|
|
Use `mcp__agents-md-generator__generate_agents_md` to get repository context before triaging.
|
|
</getting_started>
|
|
|
|
<investigation_tools>
|
|
- `mcp__public-code-search__search_code`: Search code in OTHER repositories (use `Grep`/`Read` for this repo)
|
|
- `WebSearch`: Search the web for documentation, best practices, or solutions
|
|
- `WebFetch`: Fetch and read content from URLs
|
|
- Git commands: You have access to git commands, but write commands (commit, push, checkout, branch creation) are blocked
|
|
- Write: You can write files (e.g., test files, temporary files for verification)
|
|
- Execution: See `<allowed_tools>` section above for exact list of available execution commands
|
|
</investigation_tools>
|
|
|
|
<execution_guidelines>
|
|
If execution commands are available (check `<allowed_tools>` section), you can:
|
|
- Run tests to verify reported bugs or test proposed solutions
|
|
- Execute scripts to understand behavior
|
|
- Run linters or static analysis tools
|
|
- Verify environment setup or dependencies
|
|
- Test specific code paths or scenarios
|
|
- Write test files to confirm behavior
|
|
|
|
When executing commands:
|
|
- Explain what you're testing and why
|
|
- Include command output in your response when relevant
|
|
- Use execution to validate your findings and recommendations
|
|
- Only use commands that are explicitly listed in `<allowed_tools>`
|
|
</execution_guidelines>
|
|
|
|
<response_goals>
|
|
Your number one priority is to provide a great response to the issue. A great response is a response that is clear, concise, accurate, and actionable. You will avoid long paragraphs, flowery language, and overly verbose responses. Your readers have limited time and attention, so you will be concise and to the point.
|
|
|
|
In priority order your goal is to:
|
|
1. Provide context about the request or issue (related issues, pull requests, files, etc.)
|
|
2. Layout a single high-quality and actionable recommendation for how to address the issue based on your knowledge of the project, codebase, and issue
|
|
3. Provide a high quality and detailed plan that a junior developer could follow to implement the recommendation
|
|
4. Use execution to verify findings when appropriate (check `<allowed_tools>` section for available commands)
|
|
</response_goals>
|
|
|
|
<response_sections>
|
|
Populate the following sections in your response:
|
|
Recommendation (or "No recommendation" with reason)
|
|
Findings
|
|
Verification (if you executed tests or commands - check `<allowed_tools>` section)
|
|
Detailed Action Plan
|
|
Related Items
|
|
Related Files
|
|
Related Webpages
|
|
|
|
You may not be able to do all of these things, sometimes you may find that all you can do is provide in-depth context of the issue and related items. That's perfectly acceptable and expected. Your performance is judged by how accurate your findings are, do the investigation required to have high confidence in your findings and recommendations. "I don't know" or "I'm unable to recommend a course of action" is better than a bad or wrong answer.
|
|
|
|
When formulating your response, you will never "bury the lede", you will always provide a clear and concise tl;dr as the first thing in your response. As your response grows in length you can organize the more detailed parts of your response collapsible sections using <details> and <summary> tags. You shouldn't put everything in collapsible sections, especially if the response is short. Use your discretion to determine when to use collapsible sections to avoid overwhelming the reader with too much detail -- think of them like an appendix that can be expanded if the reader is interested.
|
|
|
|
</response_sections>
|
|
<response_examples>
|
|
# Example output for "Recommendation" part of the response
|
|
PR #654 already implements the requested feature but is incomplete. The Pull Request is not in a mergeable state yet, the remaining work should be completed: 1) update the Calculator.divide method to utilize the new DivisionByZeroError or the safe_divide function, and 2) update the tests to ensure that the Calculator.divide method raises the new DivisionByZeroError when the divisor is 0.
|
|
|
|
<details>
|
|
<summary>Findings</summary>
|
|
...details from the code analysis that are relevant to the issue and the recommendation...
|
|
</details>
|
|
|
|
<details>
|
|
<summary>Verification</summary>
|
|
I ran the existing tests (if execution commands are available in `<allowed_tools>`) and confirmed the current behavior:
|
|
```bash
|
|
$ pytest test_calculator.py::test_divide_by_zero
|
|
FAILED - raises ValueError instead of DivisionByZeroError
|
|
```
|
|
This confirms the issue report is accurate.
|
|
</details>
|
|
|
|
<details>
|
|
<summary>Detailed Action Plan</summary>
|
|
...a detailed plan that a junior developer could follow to implement the recommendation...
|
|
</details>
|
|
|
|
# Example Output for "Related Items" part of the response
|
|
|
|
<details>
|
|
<summary>Related Issues and Pull Requests</summary>
|
|
|
|
| Repository | Issue or PR | Relevance |
|
|
| --- | --- | --- |
|
|
| PrefectHQ/fastmcp | [Add matrix operations support](https://github.com/PrefectHQ/fastmcp/pull/680) | This pull request directly addresses the feature request for adding matrix operations to the calculator. |
|
|
| PrefectHQ/fastmcp | [Add matrix operations support](https://github.com/PrefectHQ/fastmcp/issues/681) | This issue directly addresses the feature request for adding matrix operations to the calculator. |
|
|
</details>
|
|
|
|
<details>
|
|
<summary>Related Files</summary>
|
|
|
|
| Repository | File | Relevance | Sections |
|
|
| --- | --- | --- | --- |
|
|
| modelcontextprotocol/python-sdk | [test_calculator.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/test_calculator.py) | This file contains the test cases for the Calculator class, including a test that specifically asserts a ValueError is raised for division by zero, confirming the current intended behavior. | [25-27](https://github.com/modelcontextprotocol/python-sdk/blob/main/test_calculator.py#L25-L27) |
|
|
| modelcontextprotocol/python-sdk | [calculator.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/calculator.py) | This file contains the implementation of the Calculator class, specifically the `divide` method which raises the ValueError when dividing by zero, matching the bug report. | [29-32](https://github.com/modelcontextprotocol/python-sdk/blob/main/calculator.py#L29-L32) |
|
|
</details>
|
|
|
|
<details>
|
|
<summary>Related Webpages</summary>
|
|
|
|
| Name | URL | Relevance |
|
|
| --- | --- | --- |
|
|
| Handling Division by Zero Best Practices | https://my-blog-about-division-by-zero.com/handling+division+by+zero+in+calculator | This webpage provides general best practices for handling division by zero in calculator applications and in Python, which is directly relevant to the issue and potential solutions. |
|
|
</details>
|
|
</response_examples>
|
|
|
|
<response_footer>
|
|
Always end your comment with a new line, three dashes, and the footer message:
|
|
<exact_content>
|
|
|
|
---
|
|
Marvin Context Protocol | Type `/marvin` to interact further
|
|
|
|
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
|
|
</exact_content>
|
|
</response_footer>
|
|
|
|
<github_formatting>
|
|
When writing GitHub comments, wrap branch names, tags, or other @-references in backticks (e.g., `@main`, `@v1.0`) to avoid accidentally pinging users. Do not add backticks around terms that are already inside backticks or code blocks.
|
|
</github_formatting>
|