feat(core): per-revision spec reference types and the 2026-07-28 wire contract surface (#2252)
This commit is contained in:
parent
ab552c30d5
commit
8d55531dab
1 changed files with 4146 additions and 1005 deletions
14
.github/workflows/update-spec-types.yml
vendored
14
.github/workflows/update-spec-types.yml
vendored
|
|
@ -34,16 +34,16 @@ jobs:
|
|||
run: pnpm install
|
||||
|
||||
- name: Fetch latest spec types
|
||||
run: pnpm run fetch:spec-types
|
||||
run: pnpm run fetch:spec-types 2026-07-28
|
||||
|
||||
- name: Check for changes
|
||||
id: check_changes
|
||||
run: |
|
||||
if git diff --quiet packages/core/src/types/spec.types.ts; then
|
||||
if git diff --quiet packages/core/src/types/spec.types.2026-07-28.ts; then
|
||||
echo "has_changes=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "has_changes=true" >> $GITHUB_OUTPUT
|
||||
LATEST_SHA=$(grep "Last updated from commit:" packages/core/src/types/spec.types.ts | cut -d: -f2 | tr -d ' ')
|
||||
LATEST_SHA=$(grep "Last updated from commit:" packages/core/src/types/spec.types.2026-07-28.ts | cut -d: -f2 | tr -d ' ')
|
||||
echo "sha=$LATEST_SHA" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
|
|
@ -59,12 +59,12 @@ jobs:
|
|||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
git checkout -B update-spec-types
|
||||
git add packages/core/src/types/spec.types.ts
|
||||
git commit -m "chore: update spec.types.ts from upstream"
|
||||
git add packages/core/src/types/spec.types.2026-07-28.ts
|
||||
git commit -m "chore: update spec.types.2026-07-28.ts from upstream"
|
||||
git push -f --no-verify origin update-spec-types
|
||||
|
||||
# Create PR if it doesn't exist, or update if it does
|
||||
PR_BODY="This PR updates \`packages/core/src/types/spec.types.ts\` from the Model Context Protocol specification.
|
||||
PR_BODY="This PR updates \`packages/core/src/types/spec.types.2026-07-28.ts\` from the Model Context Protocol specification.
|
||||
|
||||
Source file: https://github.com/modelcontextprotocol/modelcontextprotocol/blob/${{ steps.check_changes.outputs.sha }}/schema/draft/schema.ts
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ jobs:
|
|||
gh pr edit "$EXISTING_PR" --body "$PR_BODY"
|
||||
else
|
||||
gh pr create \
|
||||
--title "chore: update spec.types.ts from upstream" \
|
||||
--title "chore: update spec.types.2026-07-28.ts from upstream" \
|
||||
--body "$PR_BODY" \
|
||||
--base main \
|
||||
--head update-spec-types
|
||||
|
|
|
|||
Loading…
Reference in a new issue