@prefecthq/fastmcp-ts 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.cjs +16 -3
- package/dist/cli/index.cjs.map +1 -1
- package/dist/client.d.ts +5 -0
- package/dist/client.js +13 -0
- package/dist/client.js.map +1 -1
- package/dist/server.d.ts +24 -24
- package/dist/server.js +36 -28
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.cjs
CHANGED
|
@@ -1172,7 +1172,7 @@ var init_version = __esm({
|
|
|
1172
1172
|
async run({ args }) {
|
|
1173
1173
|
if (args.json) setJsonMode(true);
|
|
1174
1174
|
const data = {
|
|
1175
|
-
fastmcp: "1.5.
|
|
1175
|
+
fastmcp: "1.5.2",
|
|
1176
1176
|
"mcp-sdk": "2.0.0",
|
|
1177
1177
|
node: process.version,
|
|
1178
1178
|
platform: `${process.platform} ${process.arch}`
|
|
@@ -30194,11 +30194,24 @@ var init_client = __esm({
|
|
|
30194
30194
|
* via a `subscriptions/listen` stream opted into `resourceSubscriptions` — both
|
|
30195
30195
|
* dispatch to the same `notifications/resources/updated` handler registered in
|
|
30196
30196
|
* `_registerHandlers`, so this method is the only era-aware part.
|
|
30197
|
+
*
|
|
30198
|
+
* On a modern connection this rejects when the server's acknowledged filter does
|
|
30199
|
+
* not include the URI — that is how a server without the `resources.subscribe`
|
|
30200
|
+
* capability declines per-resource subscriptions, and registering a handler that
|
|
30201
|
+
* can never fire would fail silently instead.
|
|
30197
30202
|
*/
|
|
30198
30203
|
async subscribeResource(uri, handler, options) {
|
|
30199
30204
|
this._resourceSubscriptions.set(uri, handler);
|
|
30200
30205
|
if (this._sdk().getProtocolEra() === "modern") {
|
|
30201
30206
|
await this._refreshResourceListenSubscription();
|
|
30207
|
+
const honored = this._resourceListenSubscription?.honoredFilter.resourceSubscriptions ?? [];
|
|
30208
|
+
if (!honored.includes(uri)) {
|
|
30209
|
+
this._resourceSubscriptions.delete(uri);
|
|
30210
|
+
await this._refreshResourceListenSubscription();
|
|
30211
|
+
throw new Error(
|
|
30212
|
+
`subscribeResource(${JSON.stringify(uri)}): the server did not honor the subscription \u2014 its subscriptions/acknowledged filter omits the URI, which means it does not advertise the resources.subscribe capability.`
|
|
30213
|
+
);
|
|
30214
|
+
}
|
|
30202
30215
|
} else {
|
|
30203
30216
|
await this._reauthRetry(
|
|
30204
30217
|
() => this._sdk().subscribeResource(
|
|
@@ -33536,7 +33549,7 @@ var init_inspect = __esm({
|
|
|
33536
33549
|
// only case Python's inspect supports); over --url/--command the
|
|
33537
33550
|
// generation is unknowable from the wire.
|
|
33538
33551
|
generation: mode.kind === "inprocess" ? 2 : null,
|
|
33539
|
-
fastmcpVersion: "1.5.
|
|
33552
|
+
fastmcpVersion: "1.5.2",
|
|
33540
33553
|
mcpVersion: "2.0.0",
|
|
33541
33554
|
tools: tools2,
|
|
33542
33555
|
prompts: prompts2,
|
|
@@ -47065,7 +47078,7 @@ init_format();
|
|
|
47065
47078
|
var main = defineCommand({
|
|
47066
47079
|
meta: {
|
|
47067
47080
|
name: "fastmcp",
|
|
47068
|
-
version: "1.5.
|
|
47081
|
+
version: "1.5.2",
|
|
47069
47082
|
description: "FastMCP CLI \u2014 build, run, and manage MCP servers"
|
|
47070
47083
|
},
|
|
47071
47084
|
args: {
|