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.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-BOCkkAhO.js';
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
  };