Fix compatibility with @modelcontextprotocol/sdk 1.23+ (#84)
* Fix compatibility with @modelcontextprotocol/sdk 1.23+ Implement required abstract methods `assertTaskCapability` and `assertTaskHandlerCapability` in App and AppBridge classes. These were added to the Protocol base class in SDK 1.23+. Also regenerates package-lock.json with valid npm registry versions (previously had non-existent vite@6.4.1). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Add pkg-pr-new workflow for PR/commit publishing Enables automatic publishing of any commit or PR to pkg.pr.new, allowing consumers to install directly from git commits: npm install https://pkg.pr.new/modelcontextprotocol/ext-apps/@modelcontextprotocol/ext-apps@<commit-or-pr> 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
47d1b37ba3
commit
a09354bdf2
4 changed files with 1709 additions and 619 deletions
23
.github/workflows/publish.yml
vendored
Normal file
23
.github/workflows/publish.yml
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
name: Publish Any Commit
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "**"
|
||||||
|
tags:
|
||||||
|
- "!**"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pkg-publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: npm
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run build
|
||||||
|
- run: npx pkg-pr-new publish
|
||||||
2081
package-lock.json
generated
2081
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -525,6 +525,22 @@ export class AppBridge extends Protocol<Request, Notification, Result> {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Verify that task creation is supported for the given request method.
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
protected assertTaskCapability(_method: string): void {
|
||||||
|
throw new Error("Tasks are not supported in MCP Apps");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Verify that task handler is supported for the given method.
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
protected assertTaskHandlerCapability(_method: string): void {
|
||||||
|
throw new Error("Task handlers are not supported in MCP Apps");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the host capabilities passed to the constructor.
|
* Get the host capabilities passed to the constructor.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
16
src/app.ts
16
src/app.ts
|
|
@ -542,6 +542,22 @@ export class App extends Protocol<Request, Notification, Result> {
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Verify that task creation is supported for the given request method.
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
protected assertTaskCapability(_method: string): void {
|
||||||
|
throw new Error("Tasks are not supported in MCP Apps");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Verify that task handler is supported for the given method.
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
protected assertTaskHandlerCapability(_method: string): void {
|
||||||
|
throw new Error("Task handlers are not supported in MCP Apps");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call a tool on the originating MCP server (proxied through the host).
|
* Call a tool on the originating MCP server (proxied through the host).
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue