somamcp 1.5.0 → 1.5.1

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/edge.d.ts CHANGED
@@ -193,7 +193,7 @@ type Prompt<T extends SessionAuth = SessionAuth, Args extends PromptArgument<T>[
193
193
  name: string;
194
194
  };
195
195
  type ServerStatus = "error" | "running" | "stopped";
196
- declare class UserError extends Error {
196
+ export declare class UserError extends Error {
197
197
  constructor(message: string);
198
198
  }
199
199
  //#endregion
@@ -334,9 +334,9 @@ type RuntimeInfo = {
334
334
  /** Which runtime family reported the fields above. Absent on pre-1.2 builds. */
335
335
  runtime?: "edge" | "node";
336
336
  };
337
- declare const readBuildInfoFromEnv: () => BuildInfo;
338
- declare const resolveBuildInfo: (override?: BuildInfo) => BuildInfo;
339
- declare const getRuntimeInfo: () => RuntimeInfo;
337
+ export declare const readBuildInfoFromEnv: () => BuildInfo;
338
+ export declare const resolveBuildInfo: (override?: BuildInfo) => BuildInfo;
339
+ export declare const getRuntimeInfo: () => RuntimeInfo;
340
340
  //#endregion
341
341
  //#region src/gateway/types.d.ts
342
342
  type GatewayConfig = {
@@ -421,7 +421,7 @@ type AuthMiddlewareConfig = {
421
421
  authenticate?: Authenticate;
422
422
  onUnauthorized?: OnUnauthorized;
423
423
  };
424
- declare const createAuthMiddleware: ({ authenticate, onUnauthorized }: AuthMiddlewareConfig) => MiddlewareHandler;
424
+ export declare const createAuthMiddleware: ({ authenticate, onUnauthorized }: AuthMiddlewareConfig) => MiddlewareHandler;
425
425
  //#endregion
426
426
  //#region src/auth/request.d.ts
427
427
  /**
@@ -436,7 +436,7 @@ declare const createAuthMiddleware: ({ authenticate, onUnauthorized }: AuthMiddl
436
436
  * absent or the request shape is not recognized — matches the `Headers.get`
437
437
  * shape callers already write against.
438
438
  */
439
- declare const getRequestHeader: (request: unknown, name: string) => string | undefined;
439
+ export declare const getRequestHeader: (request: unknown, name: string) => string | undefined;
440
440
  //#endregion
441
441
  //#region src/types/routes.d.ts
442
442
  type RouteMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
@@ -565,7 +565,7 @@ type SomaServerInstance<T extends SessionAuth = SessionAuth> = {
565
565
  * module — including `somamcp/edge`. The entry barrels supply the default instead:
566
566
  * `somamcp` binds createFastMCPBackend, `somamcp/edge` binds createEdgeBackend.
567
567
  */
568
- declare const createServerCore: <T extends SessionAuth = SessionAuth>(options: SomaServerOptions<T> & {
568
+ export declare const createServerCore: <T extends SessionAuth = SessionAuth>(options: SomaServerOptions<T> & {
569
569
  backend: BackendFactory<T>;
570
570
  }) => SomaServerInstance<T>;
571
571
  //#endregion
@@ -583,13 +583,13 @@ type EdgeBackendOptions = {
583
583
  * registers its own `/health` at construction, and Hono is first-match-wins, so
584
584
  * mounting it first would shadow somamcp's health artifact.
585
585
  */
586
- declare const createEdgeBackend: <T extends SessionAuth = SessionAuth>(config: ServerConfig<T>, backendOptions?: Record<string, unknown>) => BackendAdapter<T>;
586
+ export declare const createEdgeBackend: <T extends SessionAuth = SessionAuth>(config: ServerConfig<T>, backendOptions?: Record<string, unknown>) => BackendAdapter<T>;
587
587
  //#endregion
588
588
  //#region src/telemetry/CompositeTelemetry.d.ts
589
- declare const createCompositeTelemetry: (collectors: ReadonlyArray<TelemetryCollector>) => TelemetryCollector;
589
+ export declare const createCompositeTelemetry: (collectors: ReadonlyArray<TelemetryCollector>) => TelemetryCollector;
590
590
  //#endregion
591
591
  //#region src/telemetry/ConsoleTelemetry.d.ts
592
- declare const createConsoleTelemetry: (prefix?: string) => TelemetryCollector;
592
+ export declare const createConsoleTelemetry: (prefix?: string) => TelemetryCollector;
593
593
  //#endregion
594
594
  //#region src/telemetry/EnrichedError.d.ts
595
595
  type EnrichedErrorResponse = {
@@ -598,14 +598,14 @@ type EnrichedErrorResponse = {
598
598
  relatedState?: Record<string, unknown>;
599
599
  suggestions?: ReadonlyArray<string>;
600
600
  };
601
- declare const classifyError: (error: unknown) => ErrorCategory;
602
- declare const createEnrichedError: (error: unknown, context?: {
601
+ export declare const classifyError: (error: unknown) => ErrorCategory;
602
+ export declare const createEnrichedError: (error: unknown, context?: {
603
603
  gatewayStatus?: string;
604
604
  toolName?: string;
605
605
  }) => EnrichedErrorResponse;
606
606
  //#endregion
607
607
  //#region src/telemetry/NoopTelemetry.d.ts
608
- declare const NoopTelemetry: TelemetryCollector;
608
+ export declare const NoopTelemetry: TelemetryCollector;
609
609
  //#endregion
610
610
  //#region src/telemetry/telemetryWrapper.d.ts
611
611
  /**
@@ -621,37 +621,37 @@ declare const NoopTelemetry: TelemetryCollector;
621
621
  * The failure path converts an error to a `ContentResult` with `isError: true`
622
622
  * and the enriched error payload as the text content.
623
623
  */
624
- declare const wrapTool: <T extends SessionAuth, P extends SchemaParams>(tool: Tool<T, P>, telemetry: TelemetryCollector, captureConfig?: ToolCaptureConfig) => Tool<T, P>;
625
- declare const wrapResource: <T extends SessionAuth>(resource: Resource<T>, telemetry: TelemetryCollector) => Resource<T>;
626
- declare const wrapPrompt: <T extends SessionAuth, Args extends PromptArgument<T>[] = PromptArgument<T>[]>(prompt: Prompt<T, Args>, telemetry: TelemetryCollector) => Prompt<T, Args>;
624
+ export declare const wrapTool: <T extends SessionAuth, P extends SchemaParams>(tool: Tool<T, P>, telemetry: TelemetryCollector, captureConfig?: ToolCaptureConfig) => Tool<T, P>;
625
+ export declare const wrapResource: <T extends SessionAuth>(resource: Resource<T>, telemetry: TelemetryCollector) => Resource<T>;
626
+ export declare const wrapPrompt: <T extends SessionAuth, Args extends PromptArgument<T>[] = PromptArgument<T>[]>(prompt: Prompt<T, Args>, telemetry: TelemetryCollector) => Prompt<T, Args>;
627
627
  //#endregion
628
628
  //#region src/artifacts/ArtifactManager.d.ts
629
- declare const registerArtifacts: (app: Hono, artifacts: ReadonlyArray<ArtifactConfig>, authenticate?: ArtifactAuthenticate) => void;
629
+ export declare const registerArtifacts: (app: Hono, artifacts: ReadonlyArray<ArtifactConfig>, authenticate?: ArtifactAuthenticate) => void;
630
630
  //#endregion
631
631
  //#region src/artifacts/DashboardArtifact.d.ts
632
- declare const createDashboardArtifact: (getHealth: () => ServerHealth, getCapabilities: () => ServerCapabilities, getConnections: () => ReadonlyArray<GatewayInfo>) => ArtifactConfig;
632
+ export declare const createDashboardArtifact: (getHealth: () => ServerHealth, getCapabilities: () => ServerCapabilities, getConnections: () => ReadonlyArray<GatewayInfo>) => ArtifactConfig;
633
633
  //#endregion
634
634
  //#region src/artifacts/HealthArtifact.d.ts
635
- declare const DEFAULT_HEALTH_PATH = "/health";
636
- declare const DEFAULT_HEALTH_DETAIL_PATH = "/health/detail";
637
- declare const createHealthArtifact: (getHealth: () => ServerHealth, path?: string) => ArtifactConfig;
638
- declare const createHealthDetailArtifact: (getHealth: () => ServerHealth, path?: string) => ArtifactConfig;
635
+ export declare const DEFAULT_HEALTH_PATH = "/health";
636
+ export declare const DEFAULT_HEALTH_DETAIL_PATH = "/health/detail";
637
+ export declare const createHealthArtifact: (getHealth: () => ServerHealth, path?: string) => ArtifactConfig;
638
+ export declare const createHealthDetailArtifact: (getHealth: () => ServerHealth, path?: string) => ArtifactConfig;
639
639
  //#endregion
640
640
  //#region src/artifacts/InfoArtifact.d.ts
641
- declare const DEFAULT_INFO_PATH = "/info";
642
- declare const createInfoArtifact: (getInfo: () => ServerInfo, path?: string) => ArtifactConfig;
641
+ export declare const DEFAULT_INFO_PATH = "/info";
642
+ export declare const createInfoArtifact: (getInfo: () => ServerInfo, path?: string) => ArtifactConfig;
643
643
  //#endregion
644
644
  //#region src/introspection/capabilitiesTool.d.ts
645
- declare const createCapabilitiesTool: <T extends SessionAuth>(getCapabilities: () => ServerCapabilities) => Tool<T>;
645
+ export declare const createCapabilitiesTool: <T extends SessionAuth>(getCapabilities: () => ServerCapabilities) => Tool<T>;
646
646
  //#endregion
647
647
  //#region src/introspection/connectionsTool.d.ts
648
- declare const createConnectionsTool: <T extends SessionAuth>(getConnections: () => ReadonlyArray<GatewayInfo>) => Tool<T>;
648
+ export declare const createConnectionsTool: <T extends SessionAuth>(getConnections: () => ReadonlyArray<GatewayInfo>) => Tool<T>;
649
649
  //#endregion
650
650
  //#region src/introspection/healthTool.d.ts
651
- declare const createHealthTool: <T extends SessionAuth>(getHealth: () => ServerHealth) => Tool<T>;
651
+ export declare const createHealthTool: <T extends SessionAuth>(getHealth: () => ServerHealth) => Tool<T>;
652
652
  //#endregion
653
653
  //#region src/introspection/infoTool.d.ts
654
- declare const createInfoTool: <T extends SessionAuth>(getInfo: () => ServerInfo, name?: string) => Tool<T>;
654
+ export declare const createInfoTool: <T extends SessionAuth>(getInfo: () => ServerInfo, name?: string) => Tool<T>;
655
655
  //#endregion
656
656
  //#region src/feedback/redaction.d.ts
657
657
  type RedactionPattern = {
@@ -668,8 +668,8 @@ type RedactionResult = {
668
668
  redacted: boolean;
669
669
  text: string;
670
670
  };
671
- declare const DEFAULT_REDACTION_PATTERNS: ReadonlyArray<RedactionPattern>;
672
- declare const redact: (input: string, patterns?: ReadonlyArray<RedactionPattern>) => RedactionResult;
671
+ export declare const DEFAULT_REDACTION_PATTERNS: ReadonlyArray<RedactionPattern>;
672
+ export declare const redact: (input: string, patterns?: ReadonlyArray<RedactionPattern>) => RedactionResult;
673
673
  //#endregion
674
674
  //#region src/feedback/types.d.ts
675
675
  type FeedbackType = "bug" | "feature" | "feedback" | "question";
@@ -722,7 +722,7 @@ declare const PARAMETERS: z.ZodObject<{
722
722
  question: "question";
723
723
  }>>;
724
724
  }, z.core.$strip>;
725
- declare const createFeedbackTool: <T extends SessionAuth>(options: FeedbackToolOptions) => Tool<T, typeof PARAMETERS>;
725
+ export declare const createFeedbackTool: <T extends SessionAuth>(options: FeedbackToolOptions) => Tool<T, typeof PARAMETERS>;
726
726
  //#endregion
727
727
  //#region src/feedback/providers/github.d.ts
728
728
  type GithubFeedbackOptions = {
@@ -732,7 +732,7 @@ type GithubFeedbackOptions = {
732
732
  getToken: () => Option<string>;
733
733
  repo: `${string}/${string}`;
734
734
  };
735
- declare const createGithubFeedback: (options: GithubFeedbackOptions) => FeedbackProvider;
735
+ export declare const createGithubFeedback: (options: GithubFeedbackOptions) => FeedbackProvider;
736
736
  //#endregion
737
737
  //#region src/feedback/providers/webhook.d.ts
738
738
  type WebhookFeedbackOptions = {
@@ -741,16 +741,16 @@ type WebhookFeedbackOptions = {
741
741
  transform?: (payload: NormalizedFeedback) => unknown;
742
742
  url: string;
743
743
  };
744
- declare const createWebhookFeedback: (options: WebhookFeedbackOptions) => FeedbackProvider;
744
+ export declare const createWebhookFeedback: (options: WebhookFeedbackOptions) => FeedbackProvider;
745
745
  //#endregion
746
746
  //#region src/gateway/Gateway.d.ts
747
- declare const createGateway: (config: GatewayConfig, telemetry: TelemetryCollector) => GatewayInstance;
747
+ export declare const createGateway: (config: GatewayConfig, telemetry: TelemetryCollector) => GatewayInstance;
748
748
  //#endregion
749
749
  //#region src/gateway/GatewayManager.d.ts
750
- declare const createGatewayManager: (telemetry: TelemetryCollector) => GatewayManagerInstance;
750
+ export declare const createGatewayManager: (telemetry: TelemetryCollector) => GatewayManagerInstance;
751
751
  //#endregion
752
752
  //#region src/gateway/toolProxy.d.ts
753
- declare const createProxiedTools: <T extends SessionAuth>(gateway: GatewayInstance, telemetry?: TelemetryCollector) => ReadonlyArray<Tool<T>>;
753
+ export declare const createProxiedTools: <T extends SessionAuth>(gateway: GatewayInstance, telemetry?: TelemetryCollector) => ReadonlyArray<Tool<T>>;
754
754
  //#endregion
755
755
  //#region src/edge.d.ts
756
756
  /**
@@ -762,6 +762,6 @@ declare const createProxiedTools: <T extends SessionAuth>(gateway: GatewayInstan
762
762
  * export default { fetch: (req: Request) => server.fetch(req) }
763
763
  * ```
764
764
  */
765
- declare const createServer: <T extends SessionAuth = SessionAuth>(options: SomaServerOptions<T>) => SomaServerInstance<T>;
765
+ export declare const createServer: <T extends SessionAuth = SessionAuth>(options: SomaServerOptions<T>) => SomaServerInstance<T>;
766
766
  //#endregion
767
- export { type ArtifactAuthenticate, type ArtifactConfig, type AudioContent, type AuthMiddlewareConfig, type Authenticate, type BackendAdapter, type BackendFactory, type BackendSession, type BuildInfo, type CapabilitiesSummary, type CaptureLevel, type Completion, type Content, type ContentResult, type Context, DEFAULT_HEALTH_DETAIL_PATH, DEFAULT_HEALTH_PATH, DEFAULT_INFO_PATH, DEFAULT_REDACTION_PATTERNS, type DirectoryArtifact, type DynamicArtifact, type EdgeBackendOptions, type EnrichedErrorResponse, type ErrorCategory, type FeedbackEnrichmentContext, type FeedbackProvider, type FeedbackSeverity, type FeedbackSubmitFailure, type FeedbackSubmitResult, type FeedbackSubmitSuccess, type FeedbackToolOptions, type FeedbackType, type GatewayConfig, type GatewayInfo, type GatewayInstance, type GatewayManagerInstance, type GatewayStatus, type GithubFeedbackOptions, type HttpStreamConfig, type ImageContent, type InferSchemaOutput, type Logger, NoopTelemetry, type NormalizedFeedback, type OnUnauthorized, type Progress, type Prompt, type PromptArgument, type PromptResult, type RedactionPattern, type RedactionResult, type Resource, type ResourceContent, type ResourceLink, type ResourceResult, type ResourceTemplate, type ResourceTemplateArgument, type RouteConfig, type RouteMethod, type RuntimeInfo, type SchemaParams, type ServerCapabilities, type ServerConfig, type ServerHealth, type ServerInfo, type ServerStatus, type SessionAuth, type SomaServerInstance, type SomaServerOptions, type StaticArtifact, type TelemetryCollector, type TelemetryEvent, type TelemetryEventType, type TextContent, type Tool, type ToolAnnotations, type ToolCaptureConfig, type ToolOptions, type TransportConfig, UserError, type WebhookFeedbackOptions, classifyError, createAuthMiddleware, createCapabilitiesTool, createCompositeTelemetry, createConnectionsTool, createConsoleTelemetry, createDashboardArtifact, createEdgeBackend, createEnrichedError, createFeedbackTool, createGateway, createGatewayManager, createGithubFeedback, createHealthArtifact, createHealthDetailArtifact, createHealthTool, createInfoArtifact, createInfoTool, createProxiedTools, createServer, createServerCore, createWebhookFeedback, getRequestHeader, getRuntimeInfo, readBuildInfoFromEnv, redact, registerArtifacts, resolveBuildInfo, wrapPrompt, wrapResource, wrapTool };
767
+ export type { ArtifactAuthenticate, ArtifactConfig, AudioContent, AuthMiddlewareConfig, Authenticate, BackendAdapter, BackendFactory, BackendSession, BuildInfo, CapabilitiesSummary, CaptureLevel, Completion, Content, ContentResult, Context, DirectoryArtifact, DynamicArtifact, EdgeBackendOptions, EnrichedErrorResponse, ErrorCategory, FeedbackEnrichmentContext, FeedbackProvider, FeedbackSeverity, FeedbackSubmitFailure, FeedbackSubmitResult, FeedbackSubmitSuccess, FeedbackToolOptions, FeedbackType, GatewayConfig, GatewayInfo, GatewayInstance, GatewayManagerInstance, GatewayStatus, GithubFeedbackOptions, HttpStreamConfig, ImageContent, InferSchemaOutput, Logger, NormalizedFeedback, OnUnauthorized, Progress, Prompt, PromptArgument, PromptResult, RedactionPattern, RedactionResult, Resource, ResourceContent, ResourceLink, ResourceResult, ResourceTemplate, ResourceTemplateArgument, RouteConfig, RouteMethod, RuntimeInfo, SchemaParams, ServerCapabilities, ServerConfig, ServerHealth, ServerInfo, ServerStatus, SessionAuth, SomaServerInstance, SomaServerOptions, StaticArtifact, TelemetryCollector, TelemetryEvent, TelemetryEventType, TextContent, Tool, ToolAnnotations, ToolCaptureConfig, ToolOptions, TransportConfig, WebhookFeedbackOptions };
package/dist/index.d.ts CHANGED
@@ -41,9 +41,9 @@ type RuntimeInfo = {
41
41
  /** Which runtime family reported the fields above. Absent on pre-1.2 builds. */
42
42
  runtime?: "edge" | "node";
43
43
  };
44
- declare const readBuildInfoFromEnv: () => BuildInfo;
45
- declare const resolveBuildInfo: (override?: BuildInfo) => BuildInfo;
46
- declare const getRuntimeInfo: () => RuntimeInfo;
44
+ export declare const readBuildInfoFromEnv: () => BuildInfo;
45
+ export declare const resolveBuildInfo: (override?: BuildInfo) => BuildInfo;
46
+ export declare const getRuntimeInfo: () => RuntimeInfo;
47
47
  //#endregion
48
48
  //#region src/gateway/types.d.ts
49
49
  type GatewayConfig = {
@@ -128,7 +128,7 @@ type AuthMiddlewareConfig = {
128
128
  authenticate?: Authenticate;
129
129
  onUnauthorized?: OnUnauthorized;
130
130
  };
131
- declare const createAuthMiddleware: ({ authenticate, onUnauthorized }: AuthMiddlewareConfig) => MiddlewareHandler;
131
+ export declare const createAuthMiddleware: ({ authenticate, onUnauthorized }: AuthMiddlewareConfig) => MiddlewareHandler;
132
132
  //#endregion
133
133
  //#region src/auth/request.d.ts
134
134
  /**
@@ -143,7 +143,7 @@ declare const createAuthMiddleware: ({ authenticate, onUnauthorized }: AuthMiddl
143
143
  * absent or the request shape is not recognized — matches the `Headers.get`
144
144
  * shape callers already write against.
145
145
  */
146
- declare const getRequestHeader: (request: unknown, name: string) => string | undefined;
146
+ export declare const getRequestHeader: (request: unknown, name: string) => string | undefined;
147
147
  //#endregion
148
148
  //#region src/types/routes.d.ts
149
149
  type RouteMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
@@ -272,7 +272,7 @@ type SomaServerInstance<T extends SessionAuth = SessionAuth> = {
272
272
  * module — including `somamcp/edge`. The entry barrels supply the default instead:
273
273
  * `somamcp` binds createFastMCPBackend, `somamcp/edge` binds createEdgeBackend.
274
274
  */
275
- declare const createServerCore: <T extends SessionAuth = SessionAuth>(options: SomaServerOptions<T> & {
275
+ export declare const createServerCore: <T extends SessionAuth = SessionAuth>(options: SomaServerOptions<T> & {
276
276
  backend: BackendFactory<T>;
277
277
  }) => SomaServerInstance<T>;
278
278
  //#endregion
@@ -284,14 +284,14 @@ type ContentInput = {
284
284
  } | {
285
285
  url: string;
286
286
  };
287
- declare const imageContent: (input: ContentInput) => Promise<ImageContent>;
288
- declare const audioContent: (input: ContentInput) => Promise<AudioContent>;
287
+ export declare const imageContent: (input: ContentInput) => Promise<ImageContent>;
288
+ export declare const audioContent: (input: ContentInput) => Promise<AudioContent>;
289
289
  //#endregion
290
290
  //#region src/telemetry/CompositeTelemetry.d.ts
291
- declare const createCompositeTelemetry: (collectors: ReadonlyArray<TelemetryCollector>) => TelemetryCollector;
291
+ export declare const createCompositeTelemetry: (collectors: ReadonlyArray<TelemetryCollector>) => TelemetryCollector;
292
292
  //#endregion
293
293
  //#region src/telemetry/ConsoleTelemetry.d.ts
294
- declare const createConsoleTelemetry: (prefix?: string) => TelemetryCollector;
294
+ export declare const createConsoleTelemetry: (prefix?: string) => TelemetryCollector;
295
295
  //#endregion
296
296
  //#region src/telemetry/EnrichedError.d.ts
297
297
  type EnrichedErrorResponse = {
@@ -300,8 +300,8 @@ type EnrichedErrorResponse = {
300
300
  relatedState?: Record<string, unknown>;
301
301
  suggestions?: ReadonlyArray<string>;
302
302
  };
303
- declare const classifyError: (error: unknown) => ErrorCategory;
304
- declare const createEnrichedError: (error: unknown, context?: {
303
+ export declare const classifyError: (error: unknown) => ErrorCategory;
304
+ export declare const createEnrichedError: (error: unknown, context?: {
305
305
  gatewayStatus?: string;
306
306
  toolName?: string;
307
307
  }) => EnrichedErrorResponse;
@@ -311,13 +311,13 @@ type JsonFileTelemetryOptions = {
311
311
  filePath: string;
312
312
  flushIntervalMs?: number;
313
313
  };
314
- declare const createJsonFileTelemetry: (options: JsonFileTelemetryOptions) => TelemetryCollector;
314
+ export declare const createJsonFileTelemetry: (options: JsonFileTelemetryOptions) => TelemetryCollector;
315
315
  //#endregion
316
316
  //#region src/telemetry/LogLayerTelemetry.d.ts
317
- declare const createLogLayerTelemetry: (logger: DirectLogger$1) => TelemetryCollector;
317
+ export declare const createLogLayerTelemetry: (logger: DirectLogger$1) => TelemetryCollector;
318
318
  //#endregion
319
319
  //#region src/telemetry/NoopTelemetry.d.ts
320
- declare const NoopTelemetry: TelemetryCollector;
320
+ export declare const NoopTelemetry: TelemetryCollector;
321
321
  //#endregion
322
322
  //#region src/telemetry/telemetryWrapper.d.ts
323
323
  /**
@@ -333,40 +333,40 @@ declare const NoopTelemetry: TelemetryCollector;
333
333
  * The failure path converts an error to a `ContentResult` with `isError: true`
334
334
  * and the enriched error payload as the text content.
335
335
  */
336
- declare const wrapTool: <T extends SessionAuth, P extends SchemaParams>(tool: Tool<T, P>, telemetry: TelemetryCollector, captureConfig?: ToolCaptureConfig) => Tool<T, P>;
337
- declare const wrapResource: <T extends SessionAuth>(resource: Resource<T>, telemetry: TelemetryCollector) => Resource<T>;
338
- declare const wrapPrompt: <T extends SessionAuth, Args extends PromptArgument<T>[] = PromptArgument<T>[]>(prompt: Prompt<T, Args>, telemetry: TelemetryCollector) => Prompt<T, Args>;
336
+ export declare const wrapTool: <T extends SessionAuth, P extends SchemaParams>(tool: Tool<T, P>, telemetry: TelemetryCollector, captureConfig?: ToolCaptureConfig) => Tool<T, P>;
337
+ export declare const wrapResource: <T extends SessionAuth>(resource: Resource<T>, telemetry: TelemetryCollector) => Resource<T>;
338
+ export declare const wrapPrompt: <T extends SessionAuth, Args extends PromptArgument<T>[] = PromptArgument<T>[]>(prompt: Prompt<T, Args>, telemetry: TelemetryCollector) => Prompt<T, Args>;
339
339
  //#endregion
340
340
  //#region src/logging.d.ts
341
- declare const createDefaultLogger: (name: string) => DirectLogger$1;
341
+ export declare const createDefaultLogger: (name: string) => DirectLogger$1;
342
342
  //#endregion
343
343
  //#region src/artifacts/ArtifactManager.d.ts
344
- declare const registerArtifacts: (app: Hono, artifacts: ReadonlyArray<ArtifactConfig>, authenticate?: ArtifactAuthenticate) => void;
344
+ export declare const registerArtifacts: (app: Hono, artifacts: ReadonlyArray<ArtifactConfig>, authenticate?: ArtifactAuthenticate) => void;
345
345
  //#endregion
346
346
  //#region src/artifacts/DashboardArtifact.d.ts
347
- declare const createDashboardArtifact: (getHealth: () => ServerHealth, getCapabilities: () => ServerCapabilities, getConnections: () => ReadonlyArray<GatewayInfo>) => ArtifactConfig;
347
+ export declare const createDashboardArtifact: (getHealth: () => ServerHealth, getCapabilities: () => ServerCapabilities, getConnections: () => ReadonlyArray<GatewayInfo>) => ArtifactConfig;
348
348
  //#endregion
349
349
  //#region src/artifacts/HealthArtifact.d.ts
350
- declare const DEFAULT_HEALTH_PATH = "/health";
351
- declare const DEFAULT_HEALTH_DETAIL_PATH = "/health/detail";
352
- declare const createHealthArtifact: (getHealth: () => ServerHealth, path?: string) => ArtifactConfig;
353
- declare const createHealthDetailArtifact: (getHealth: () => ServerHealth, path?: string) => ArtifactConfig;
350
+ export declare const DEFAULT_HEALTH_PATH = "/health";
351
+ export declare const DEFAULT_HEALTH_DETAIL_PATH = "/health/detail";
352
+ export declare const createHealthArtifact: (getHealth: () => ServerHealth, path?: string) => ArtifactConfig;
353
+ export declare const createHealthDetailArtifact: (getHealth: () => ServerHealth, path?: string) => ArtifactConfig;
354
354
  //#endregion
355
355
  //#region src/artifacts/InfoArtifact.d.ts
356
- declare const DEFAULT_INFO_PATH = "/info";
357
- declare const createInfoArtifact: (getInfo: () => ServerInfo, path?: string) => ArtifactConfig;
356
+ export declare const DEFAULT_INFO_PATH = "/info";
357
+ export declare const createInfoArtifact: (getInfo: () => ServerInfo, path?: string) => ArtifactConfig;
358
358
  //#endregion
359
359
  //#region src/introspection/capabilitiesTool.d.ts
360
- declare const createCapabilitiesTool: <T extends SessionAuth>(getCapabilities: () => ServerCapabilities) => Tool<T>;
360
+ export declare const createCapabilitiesTool: <T extends SessionAuth>(getCapabilities: () => ServerCapabilities) => Tool<T>;
361
361
  //#endregion
362
362
  //#region src/introspection/connectionsTool.d.ts
363
- declare const createConnectionsTool: <T extends SessionAuth>(getConnections: () => ReadonlyArray<GatewayInfo>) => Tool<T>;
363
+ export declare const createConnectionsTool: <T extends SessionAuth>(getConnections: () => ReadonlyArray<GatewayInfo>) => Tool<T>;
364
364
  //#endregion
365
365
  //#region src/introspection/healthTool.d.ts
366
- declare const createHealthTool: <T extends SessionAuth>(getHealth: () => ServerHealth) => Tool<T>;
366
+ export declare const createHealthTool: <T extends SessionAuth>(getHealth: () => ServerHealth) => Tool<T>;
367
367
  //#endregion
368
368
  //#region src/introspection/infoTool.d.ts
369
- declare const createInfoTool: <T extends SessionAuth>(getInfo: () => ServerInfo, name?: string) => Tool<T>;
369
+ export declare const createInfoTool: <T extends SessionAuth>(getInfo: () => ServerInfo, name?: string) => Tool<T>;
370
370
  //#endregion
371
371
  //#region src/feedback/redaction.d.ts
372
372
  type RedactionPattern = {
@@ -383,8 +383,8 @@ type RedactionResult = {
383
383
  redacted: boolean;
384
384
  text: string;
385
385
  };
386
- declare const DEFAULT_REDACTION_PATTERNS: ReadonlyArray<RedactionPattern>;
387
- declare const redact: (input: string, patterns?: ReadonlyArray<RedactionPattern>) => RedactionResult;
386
+ export declare const DEFAULT_REDACTION_PATTERNS: ReadonlyArray<RedactionPattern>;
387
+ export declare const redact: (input: string, patterns?: ReadonlyArray<RedactionPattern>) => RedactionResult;
388
388
  //#endregion
389
389
  //#region src/feedback/types.d.ts
390
390
  type FeedbackType = "bug" | "feature" | "feedback" | "question";
@@ -437,7 +437,7 @@ declare const PARAMETERS: z.ZodObject<{
437
437
  question: "question";
438
438
  }>>;
439
439
  }, z.core.$strip>;
440
- declare const createFeedbackTool: <T extends SessionAuth>(options: FeedbackToolOptions) => Tool<T, typeof PARAMETERS>;
440
+ export declare const createFeedbackTool: <T extends SessionAuth>(options: FeedbackToolOptions) => Tool<T, typeof PARAMETERS>;
441
441
  //#endregion
442
442
  //#region src/feedback/providers/github.d.ts
443
443
  type GithubFeedbackOptions = {
@@ -447,7 +447,7 @@ type GithubFeedbackOptions = {
447
447
  getToken: () => Option<string>;
448
448
  repo: `${string}/${string}`;
449
449
  };
450
- declare const createGithubFeedback: (options: GithubFeedbackOptions) => FeedbackProvider;
450
+ export declare const createGithubFeedback: (options: GithubFeedbackOptions) => FeedbackProvider;
451
451
  //#endregion
452
452
  //#region src/feedback/providers/webhook.d.ts
453
453
  type WebhookFeedbackOptions = {
@@ -456,19 +456,19 @@ type WebhookFeedbackOptions = {
456
456
  transform?: (payload: NormalizedFeedback) => unknown;
457
457
  url: string;
458
458
  };
459
- declare const createWebhookFeedback: (options: WebhookFeedbackOptions) => FeedbackProvider;
459
+ export declare const createWebhookFeedback: (options: WebhookFeedbackOptions) => FeedbackProvider;
460
460
  //#endregion
461
461
  //#region src/gateway/Gateway.d.ts
462
- declare const createGateway: (config: GatewayConfig, telemetry: TelemetryCollector) => GatewayInstance;
462
+ export declare const createGateway: (config: GatewayConfig, telemetry: TelemetryCollector) => GatewayInstance;
463
463
  //#endregion
464
464
  //#region src/gateway/GatewayManager.d.ts
465
- declare const createGatewayManager: (telemetry: TelemetryCollector) => GatewayManagerInstance;
465
+ export declare const createGatewayManager: (telemetry: TelemetryCollector) => GatewayManagerInstance;
466
466
  //#endregion
467
467
  //#region src/gateway/toolProxy.d.ts
468
- declare const createProxiedTools: <T extends SessionAuth>(gateway: GatewayInstance, telemetry?: TelemetryCollector) => ReadonlyArray<Tool<T>>;
468
+ export declare const createProxiedTools: <T extends SessionAuth>(gateway: GatewayInstance, telemetry?: TelemetryCollector) => ReadonlyArray<Tool<T>>;
469
469
  //#endregion
470
470
  //#region src/index.d.ts
471
471
  /** Create a server backed by FastMCP (Node). For edge runtimes, use `somamcp/edge`. */
472
- declare const createServer: <T extends SessionAuth = SessionAuth>(options: SomaServerOptions<T>) => SomaServerInstance<T>;
472
+ export declare const createServer: <T extends SessionAuth = SessionAuth>(options: SomaServerOptions<T>) => SomaServerInstance<T>;
473
473
  //#endregion
474
- export { type ArtifactAuthenticate, type ArtifactConfig, type AudioContent, type AuthMiddlewareConfig, type Authenticate, type BackendAdapter, type BackendFactory, type BackendSession, type BuildInfo, type CapabilitiesSummary, type CaptureLevel, type Completion, type Content, type ContentResult, type Context, DEFAULT_HEALTH_DETAIL_PATH, DEFAULT_HEALTH_PATH, DEFAULT_INFO_PATH, DEFAULT_REDACTION_PATTERNS, type DirectLogger, type DirectoryArtifact, type DynamicArtifact, type EnrichedErrorResponse, type ErrorCategory, type FeedbackEnrichmentContext, type FeedbackProvider, type FeedbackSeverity, type FeedbackSubmitFailure, type FeedbackSubmitResult, type FeedbackSubmitSuccess, type FeedbackToolOptions, type FeedbackType, type GatewayConfig, type GatewayInfo, type GatewayInstance, type GatewayManagerInstance, type GatewayStatus, type GithubFeedbackOptions, type HttpStreamConfig, type ImageContent, type InferSchemaOutput, type JsonFileTelemetryOptions, type Logger, NoopTelemetry, type NormalizedFeedback, type OnUnauthorized, type Progress, type Prompt, type PromptArgument, type PromptResult, type RedactionPattern, type RedactionResult, type Resource, type ResourceContent, type ResourceLink, type ResourceResult, type ResourceTemplate, type ResourceTemplateArgument, type RouteConfig, type RouteMethod, type RuntimeInfo, type SchemaParams, type ServerCapabilities, type ServerConfig, type ServerHealth, type ServerInfo, type ServerStatus, type SessionAuth, type SomaServerInstance, type SomaServerOptions, type StaticArtifact, type TelemetryCollector, type TelemetryEvent, type TelemetryEventType, type TextContent, type Tool, type ToolAnnotations, type ToolCaptureConfig, type ToolOptions, type TransportConfig, UserError, type WebhookFeedbackOptions, audioContent, classifyError, createAuthMiddleware, createCapabilitiesTool, createCompositeTelemetry, createConnectionsTool, createConsoleTelemetry, createDashboardArtifact, createDefaultLogger, createEnrichedError, createFastMCPBackend, createFeedbackTool, createGateway, createGatewayManager, createGithubFeedback, createHealthArtifact, createHealthDetailArtifact, createHealthTool, createInfoArtifact, createInfoTool, createJsonFileTelemetry, createLogLayerTelemetry, createProxiedTools, createServer, createServerCore, createWebhookFeedback, getRequestHeader, getRuntimeInfo, imageContent, readBuildInfoFromEnv, redact, registerArtifacts, resolveBuildInfo, wrapPrompt, wrapResource, wrapTool };
474
+ export { type ArtifactAuthenticate, type ArtifactConfig, type AudioContent, type AuthMiddlewareConfig, type Authenticate, type BackendAdapter, type BackendFactory, type BackendSession, type BuildInfo, type CapabilitiesSummary, type CaptureLevel, type Completion, type Content, type ContentResult, type Context, type DirectLogger, type DirectoryArtifact, type DynamicArtifact, type EnrichedErrorResponse, type ErrorCategory, type FeedbackEnrichmentContext, type FeedbackProvider, type FeedbackSeverity, type FeedbackSubmitFailure, type FeedbackSubmitResult, type FeedbackSubmitSuccess, type FeedbackToolOptions, type FeedbackType, type GatewayConfig, type GatewayInfo, type GatewayInstance, type GatewayManagerInstance, type GatewayStatus, type GithubFeedbackOptions, type HttpStreamConfig, type ImageContent, type InferSchemaOutput, type JsonFileTelemetryOptions, type Logger, type NormalizedFeedback, type OnUnauthorized, type Progress, type Prompt, type PromptArgument, type PromptResult, type RedactionPattern, type RedactionResult, type Resource, type ResourceContent, type ResourceLink, type ResourceResult, type ResourceTemplate, type ResourceTemplateArgument, type RouteConfig, type RouteMethod, type RuntimeInfo, type SchemaParams, type ServerCapabilities, type ServerConfig, type ServerHealth, type ServerInfo, type ServerStatus, type SessionAuth, type SomaServerInstance, type SomaServerOptions, type StaticArtifact, type TelemetryCollector, type TelemetryEvent, type TelemetryEventType, type TextContent, type Tool, type ToolAnnotations, type ToolCaptureConfig, type ToolOptions, type TransportConfig, UserError, type WebhookFeedbackOptions, createFastMCPBackend };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "somamcp",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Framework for building MCP servers with telemetry, introspection, and backend abstraction",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -62,9 +62,9 @@
62
62
  "@hono/node-server": "^2.1.5",
63
63
  "@modelcontextprotocol/sdk": "^1.32.1",
64
64
  "@modelcontextprotocol/server": "~2.3.1",
65
- "fastmcp": "^4.22.10",
66
- "functype": "^1.17.0",
67
- "functype-log": "^1.17.0",
65
+ "fastmcp": "^4.23.5",
66
+ "functype": "^1.18.0",
67
+ "functype-log": "^1.18.0",
68
68
  "hono": "^4.13.13",
69
69
  "zod": "^4.6.7"
70
70
  },
@@ -73,8 +73,8 @@
73
73
  "@modelcontextprotocol/client": "~2.3.1",
74
74
  "@types/node": "^24.19.2",
75
75
  "get-port-please": "^3.2.0",
76
- "ts-builds": "^3.4.3",
77
- "tsdown": "^0.22.14"
76
+ "ts-builds": "^4.0.0",
77
+ "tsdown": "^0.23.1"
78
78
  },
79
- "packageManager": "pnpm@11.27.0+sha512.ad12821463bb143295f1fa3ecde77a6b9b97a7990386da800ff57bffc3964dc64b7b1c7559d5dbe5c337aea659ed9c8937d4370bd198ca2009bc6fa0249808e7"
79
+ "packageManager": "pnpm@11.28.6+sha512.55d90390c3b39042f1505a2697789f0256c6d95bb28bdd7cb731af1887c9f2629ef581acb9f4e4ec772024c8203c2aed22a03299b97103fdcf32668e905d0024"
80
80
  }