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
2 changed files with 1709 additions and 619 deletions
|
|
@ -525,6 +525,22 @@ export class AppBridge extends Protocol<Request, Notification, Result> {
|
|||
// 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.
|
||||
*
|
||||
|
|
|
|||
16
src/app.ts
16
src/app.ts
|
|
@ -542,6 +542,22 @@ export class App extends Protocol<Request, Notification, Result> {
|
|||
// 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).
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue