fastmcp 3.25.4 → 3.26.3
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/FastMCP.cjs +1931 -0
- package/dist/FastMCP.cjs.map +1 -0
- package/dist/FastMCP.d.cts +754 -0
- package/dist/FastMCP.d.ts +3 -1
- package/dist/FastMCP.js +6 -0
- package/dist/FastMCP.js.map +1 -1
- package/dist/{OAuthProxy-BOCkkAhO.d.ts → OAuthProxy-jvsyum7s.d.cts} +5 -0
- package/dist/OAuthProxy-jvsyum7s.d.ts +524 -0
- package/dist/auth/index.cjs +1875 -0
- package/dist/auth/index.cjs.map +1 -0
- package/dist/auth/index.d.cts +445 -0
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +34 -3
- package/dist/auth/index.js.map +1 -1
- package/dist/bin/fastmcp.cjs +152 -0
- package/dist/bin/fastmcp.cjs.map +1 -0
- package/dist/bin/fastmcp.d.cts +1 -0
- package/package.json +7 -4
package/dist/FastMCP.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { EventEmitter } from 'events';
|
|
|
9
9
|
import http from 'http';
|
|
10
10
|
import { StrictEventEmitter } from 'strict-event-emitter-types';
|
|
11
11
|
import { z } from 'zod';
|
|
12
|
-
import { O as OAuthProxy } from './OAuthProxy-
|
|
12
|
+
import { O as OAuthProxy } from './OAuthProxy-jvsyum7s.js';
|
|
13
13
|
|
|
14
14
|
declare class DiscoveryDocumentCache {
|
|
15
15
|
#private;
|
|
@@ -174,6 +174,7 @@ type Completion = {
|
|
|
174
174
|
type ArgumentValueCompleter<T extends FastMCPSessionAuth = FastMCPSessionAuth> = (value: string, auth?: T) => Promise<Completion>;
|
|
175
175
|
type InputPrompt<T extends FastMCPSessionAuth = FastMCPSessionAuth, Arguments extends InputPromptArgument<T>[] = InputPromptArgument<T>[], Args = PromptArgumentsToObject<Arguments>> = {
|
|
176
176
|
arguments?: InputPromptArgument<T>[];
|
|
177
|
+
complete?: (name: string, value: string, auth?: T) => Promise<Completion>;
|
|
177
178
|
description?: string;
|
|
178
179
|
load: (args: Args, auth?: T) => Promise<PromptResult>;
|
|
179
180
|
name: string;
|
|
@@ -187,6 +188,7 @@ type InputPromptArgument<T extends FastMCPSessionAuth = FastMCPSessionAuth> = Re
|
|
|
187
188
|
}>;
|
|
188
189
|
type InputResourceTemplate<T extends FastMCPSessionAuth, Arguments extends InputResourceTemplateArgument<T>[] = InputResourceTemplateArgument<T>[]> = {
|
|
189
190
|
arguments: Arguments;
|
|
191
|
+
complete?: (name: string, value: string, auth?: T) => Promise<Completion>;
|
|
190
192
|
description?: string;
|
|
191
193
|
load: (args: ResourceTemplateArgumentsToObject<Arguments>, auth?: T) => Promise<ResourceResult | ResourceResult[]>;
|
|
192
194
|
mimeType?: string;
|
package/dist/FastMCP.js
CHANGED
|
@@ -624,6 +624,9 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
|
|
|
624
624
|
if (completers[name]) {
|
|
625
625
|
return await completers[name](value, auth);
|
|
626
626
|
}
|
|
627
|
+
if (inputPrompt.complete) {
|
|
628
|
+
return await inputPrompt.complete(name, value, auth);
|
|
629
|
+
}
|
|
627
630
|
if (fuseInstances[name]) {
|
|
628
631
|
const result = fuseInstances[name].search(value);
|
|
629
632
|
return {
|
|
@@ -654,6 +657,9 @@ ${error instanceof Error ? error.stack : JSON.stringify(error)}`
|
|
|
654
657
|
if (completers[name]) {
|
|
655
658
|
return await completers[name](value, auth);
|
|
656
659
|
}
|
|
660
|
+
if (inputResourceTemplate.complete) {
|
|
661
|
+
return await inputResourceTemplate.complete(name, value, auth);
|
|
662
|
+
}
|
|
657
663
|
return {
|
|
658
664
|
values: []
|
|
659
665
|
};
|