Skip to content

Commit e0e7f04

Browse files
committed
Merge branch 'main' into feature/remove_old_todo_subscribe_can_be_true
2 parents 78433a7 + 828d51e commit e0e7f04

436 files changed

Lines changed: 32452 additions & 8239 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/dotnet-tools.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"isRoot": true,
44
"tools": {
55
"docfx": {
6-
"version": "2.78.3",
6+
"version": "2.78.4",
77
"commands": [
88
"docfx"
99
],
1010
"rollForward": false
1111
}
1212
}
13-
}
13+
}

.devcontainer/devcontainer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "C# (.NET SDK)",
3+
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-jammy",
4+
"features": {
5+
"ghcr.io/devcontainers/features/dotnet:2": {
6+
"version": "10.0",
7+
"additionalVersions": "9.0"
8+
},
9+
"ghcr.io/devcontainers/features/node:1": {}
10+
},
11+
"customizations": {
12+
"vscode": {
13+
"extensions": [
14+
"ms-dotnettools.csharp",
15+
"ms-dotnettools.csdevkit"
16+
],
17+
"settings": {
18+
"dotnet.defaultSolution": "ModelContextProtocol.slnx"
19+
}
20+
}
21+
},
22+
"postCreateCommand": "dotnet dev-certs https --trust && dotnet --list-sdks && echo 'Available .NET SDKs installed successfully!'"
23+
}

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ root = true
33

44
# C# files
55
[*.cs]
6+
csharp_style_namespace_declarations=file_scoped:warning
67

78
# Compiler
89
dotnet_diagnostic.CS1998.severity = suggestion # CS1998: Missing awaits

.github/copilot-instructions.md

Lines changed: 348 additions & 0 deletions
Large diffs are not rendered by default.

.github/dependabot.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Configuration for Dependabot automatic dependency updates
2+
# See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
3+
4+
version: 2
5+
updates:
6+
# Monitor testing dependencies only
7+
- package-ecosystem: "nuget"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
day: "monday"
12+
time: "06:00"
13+
# Dependencies are controlled via the groups below
14+
# Group dependencies to reduce PR noise
15+
groups:
16+
testing-frameworks:
17+
patterns:
18+
- "xunit.*"
19+
- "Microsoft.NET.Test.Sdk"
20+
- "coverlet.*"
21+
- "GitHubActionsTestLogger"
22+
- "Moq"
23+
opentelemetry-testing:
24+
patterns:
25+
- "OpenTelemetry*"
26+
serilog-testing:
27+
patterns:
28+
- "Serilog*"
29+
other-testing:
30+
patterns:
31+
- "Anthropic.SDK"
32+
- "System.Linq.AsyncEnumerable"
33+
- "System.Net.Http"
34+
- "JsonSchema.Net"
35+
# Ignore product dependencies - only allow testing dependencies in groups above
36+
ignore:
37+
# Ignore all Microsoft product dependencies except those explicitly defined in groups.
38+
- dependency-name: "Microsoft.Extensions.Hosting.Abstractions"
39+
- dependency-name: "Microsoft.Extensions.Logging.Abstractions"
40+
- dependency-name: "Microsoft.Extensions.AI.OpenAI"
41+
- dependency-name: "Microsoft.Extensions.TimeProvider.Testing"
42+
- dependency-name: "Microsoft.AspNetCore.*"
43+
- dependency-name: "Microsoft.IdentityModel.*"
44+
- dependency-name: "Microsoft.Bcl.*"
45+
- dependency-name: "Microsoft.SourceLink.*"
46+
# Ignore Roslyn/CodeAnalysis dependencies to maintain VS 2022 compatibility
47+
- dependency-name: "Microsoft.CodeAnalysis.*"
48+
# Ignore all System product dependencies except those explicitly in testing groups
49+
- dependency-name: "System.Diagnostics.*"
50+
- dependency-name: "System.IO.*"
51+
- dependency-name: "System.Text.*"
52+
- dependency-name: "System.Threading.*"
53+
- dependency-name: "System.Net.ServerSentEvents"
54+
# Limit the number of open pull requests for testing dependencies
55+
open-pull-requests-limit: 5
56+
# Add labels to dependency update PRs
57+
labels:
58+
- "dependencies"
59+
- "testing"
60+
61+
# Monitor GitHub Actions
62+
- package-ecosystem: "github-actions"
63+
directory: "/"
64+
schedule:
65+
interval: "weekly"
66+
day: "monday"
67+
time: "06:00"
68+
# Limit the number of open pull requests for GitHub Actions to 5
69+
open-pull-requests-limit: 5
70+
# Add labels to GitHub Actions update PRs
71+
labels:
72+
- "dependencies"
73+
- "github-actions"

.github/workflows/ci-build-test.yml

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ on:
1515
- "*.sln"
1616
- "*.props"
1717
- "Makefile"
18+
- "global.json"
1819
- "src/**"
1920
- "tests/**"
2021
- "samples/**"
22+
- "docs/**"
2123

2224
permissions:
2325
contents: read
@@ -33,61 +35,60 @@ jobs:
3335
runs-on: ${{ matrix.os }}
3436

3537
steps:
36-
- name: Clone the repo
37-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38+
- name: 📥 Clone the repo
39+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3840
with:
3941
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
4042

41-
- name: Set up .NET
42-
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
43+
- name: 🔧 Set up .NET
44+
uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1
4345
with:
4446
dotnet-version: |
47+
10.0.x
4548
9.0.x
46-
8.0.x
4749
4850
# NetFX testing on non-Windows requires mono
49-
- name: Setup Mono
51+
- name: 🔧 Setup Mono
5052
if: runner.os == 'Linux'
5153
run: sudo apt-get install -y mono-devel
5254

53-
- name: Set up Node.js
54-
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
55+
- name: 🔧 Setup Mono on macOS
56+
if: runner.os == 'macOS'
57+
run: brew install mono
58+
59+
- name: 🔧 Set up Node.js
60+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
5561
with:
5662
node-version: '20'
5763

58-
- name: Install dependencies for tests
64+
- name: 📦 Install dependencies for tests
5965
run: npm install @modelcontextprotocol/server-everything
6066

61-
- name: Install dependencies for tests
67+
- name: 📦 Install dependencies for tests
6268
run: npm install @modelcontextprotocol/server-memory
6369

64-
- name: Build
65-
run: dotnet build --configuration ${{ matrix.configuration }}
66-
67-
- name: Pack
68-
run: dotnet pack --configuration ${{ matrix.configuration }}
69-
70-
- name: Test
71-
run: >-
72-
dotnet test
73-
--filter '(Execution!=Manual)'
74-
--no-build
75-
--configuration ${{ matrix.configuration }}
76-
--logger "console;verbosity=normal"
77-
--logger "trx"
78-
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"
79-
--blame
80-
--blame-hang-timeout 7m
81-
--blame-crash
82-
--results-directory testresults
83-
--collect "XPlat Code Coverage" -- RunConfiguration.CollectSourceInformation=true
84-
85-
- name: Upload test results artifact
70+
- name: 📦 Install dependencies for tests
71+
run: npm install @modelcontextprotocol/conformance
72+
73+
- name: 🏗️ Build
74+
run: make build CONFIGURATION=${{ matrix.configuration }}
75+
76+
- name: 🧪 Test
77+
run: make test CONFIGURATION=${{ matrix.configuration }}
78+
79+
- name: 📦 Pack
80+
if: matrix.configuration == 'Release'
81+
run: make pack CONFIGURATION=${{ matrix.configuration }}
82+
83+
- name: 📚 Generate docs
84+
run: make generate-docs CONFIGURATION=${{ matrix.configuration }}
85+
86+
- name: 📤 Upload test results artifact
8687
if: always()
87-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
88+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
8889
with:
8990
name: testresults-${{ matrix.os }}-${{ matrix.configuration }}
90-
path: testresults/**
91+
path: artifacts/testresults/**
9192

9293
publish-coverage:
9394
if: github.actor != 'dependabot[bot]'

.github/workflows/ci-code-coverage.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ jobs:
1010
publish-coverage:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
1414
- name: Setup .NET
15-
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
15+
uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1
1616
with:
1717
dotnet-version: |
18+
10.0.x
1819
9.0.x
19-
8.0.x
2020
2121
- name: Download test results
22-
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
22+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
2323
with:
2424
pattern: testresults-*
2525

2626
- name: Combine coverage reports
27-
uses: danielpalme/ReportGenerator-GitHub-Action@5.4.4
27+
uses: danielpalme/ReportGenerator-GitHub-Action@5.5.1
2828
with:
2929
reports: "**/*.cobertura.xml"
3030
targetdir: "${{ github.workspace }}/report"
@@ -36,7 +36,7 @@ jobs:
3636
toolpath: "reportgeneratortool"
3737

3838
- name: Upload combined coverage XML
39-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
39+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
4040
with:
4141
name: coverage
4242
path: ${{ github.workspace }}/report
@@ -56,7 +56,7 @@ jobs:
5656
thresholds: "60 80"
5757

5858
- name: Upload combined coverage markdown
59-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
59+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
6060
with:
6161
name: coverage-markdown
6262
path: ${{ github.workspace }}/code-coverage-results.md
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Copilot Setup Steps"
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
7+
copilot-setup-steps:
8+
runs-on: ubuntu-latest
9+
10+
permissions:
11+
contents: read
12+
13+
steps:
14+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
15+
16+
- name: Install .NET SDK
17+
uses: actions/setup-dotnet@v5.0.1
18+
with:
19+
global-json-file: global.json
20+
21+
- name: dotnet --info
22+
run: dotnet --info

.github/workflows/docs.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,20 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
3131

3232
- name: .NET Setup
33-
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
33+
uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1
3434
with:
35-
dotnet-version: 9.x
35+
dotnet-version: |
36+
10.0.x
37+
9.0.x
3638
3739
- name: Generate documentation
3840
run: make generate-docs
3941

4042
- name: Upload Pages artifact
41-
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
43+
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
4244
with:
4345
path: 'artifacts/_site'
4446

.github/workflows/markdown-link-check.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2020

2121
- name: Markup Link Checker (mlc)
22-
uses: becheran/mlc@c925f90a9a25e16e4c4bfa29058f6f9ffa9f0d8c # v0.21.0
22+
uses: becheran/mlc@18a06b3aa2901ca197de59c8b0b1f54fdba6b3fa # v1.0.0
2323
with:
24-
# Ignore external links that result in 403 errors during CI. Do not warn for redirects where we want to keep the vanity URL in the markdown or for GitHub links that redirect to the login.
25-
args: --ignore-links "https://www.anthropic.com/*,https://hackerone.com/anthropic-vdp/*" --do-not-warn-for-redirect-to "https://modelcontextprotocol.io/*,https://github.com/login?*" ./
24+
# Ignore external links that result in 403 errors during CI. Do not warn for redirects where we want to keep the vanity URL in the markdown or for GitHub links that redirect to the login, and DocFX snippet links.
25+
args: --ignore-links "https://www.anthropic.com/*,https://hackerone.com/anthropic-vdp/*" --do-not-warn-for-redirect-to "https://modelcontextprotocol.io/*,https://github.com/login?*" --ignore-links "*samples/*?name=snippet_*" ./docs

0 commit comments

Comments
 (0)