@frontmcp/sdk 1.10.1 → 1.10.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/browser/agent/adapters/providers/index.mjs +1 -1
- package/browser/agent/hooks/index.mjs +1 -1
- package/browser/agent/index.mjs +6 -6
- package/browser/common/decorators/index.mjs +17 -17
- package/browser/common/dynamic/index.mjs +2 -2
- package/browser/common/entries/index.mjs +18 -18
- package/browser/common/index.mjs +15 -15
- package/browser/common/interfaces/index.mjs +23 -23
- package/browser/common/interfaces/internal/index.mjs +2 -2
- package/browser/common/metadata/index.mjs +21 -21
- package/browser/common/records/index.mjs +17 -17
- package/browser/common/schemas/index.mjs +4 -4
- package/browser/common/tokens/index.mjs +18 -18
- package/browser/common/types/auth/index.mjs +2 -2
- package/browser/common/types/index.mjs +3 -3
- package/browser/common/types/options/ext-apps/index.mjs +1 -1
- package/browser/common/types/options/index.mjs +17 -17
- package/browser/common/utils/index.mjs +9 -9
- package/browser/elicitation/index.mjs +3 -3
- package/browser/errors/index.mjs +2 -2
- package/browser/front-mcp/index.mjs +1 -1
- package/browser/index.cjs +30 -14
- package/browser/index.mjs +7 -7
- package/browser/job/index.mjs +8 -8
- package/browser/job/store/index.mjs +2 -2
- package/browser/regsitry/index.mjs +1 -1
- package/browser/skill/session/index.mjs +3 -3
- package/browser/task/index.mjs +2 -2
- package/browser/transport/adapters/streamable-http-transport.mjs +1 -2
- package/browser/transport/body-limit.mjs +19 -0
- package/browser/transport/mcp-20260728/client/index.mjs +2 -2
- package/browser/transport/mcp-20260728/index.mjs +12 -12
- package/browser/transport/web-fetch-handler.mjs +1 -10
- package/browser/transport/web-standard-mcp.mjs +6 -1
- package/browser/workflow/index.mjs +4 -4
- package/esm/index.mjs +30 -14
- package/index.js +30 -14
- package/package.json +10 -10
- package/transport/adapters/streamable-http-transport.d.ts.map +1 -1
- package/transport/body-limit.d.ts +17 -0
- package/transport/body-limit.d.ts.map +1 -0
- package/transport/web-fetch-handler.d.ts.map +1 -1
- package/transport/web-standard-mcp.d.ts.map +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { AnthropicAdapter } from "../anthropic.adapter.mjs";
|
|
3
3
|
import { LlmAdapterError } from "../base.adapter.mjs";
|
|
4
4
|
import { OpenAIAdapter } from "../openai.adapter.mjs";
|
|
5
|
-
|
|
5
|
+
import "./types.mjs";
|
|
6
6
|
async function createProviderAdapter(options) {
|
|
7
7
|
return createProviderAdapterSync(options);
|
|
8
8
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// libs/sdk/src/agent/hooks/index.ts
|
|
2
|
-
export
|
|
2
|
+
export { AgentHook, DidAgentStage, OnAgentStage, WillAgentStage } from "./agent.hooks.mjs";
|
package/browser/agent/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// libs/sdk/src/agent/index.ts
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export { AgentEmitter, agentEmitter } from "./agent.events.mjs";
|
|
3
|
+
export { agentDiscoveryDeps, agentFullName, agentToolName, canAgentSeeSwarm, extractAgentClassMetadata, extractAgentFunctionMetadata, getVisibleAgentIds, isAgentClass, isAgentFunction, isAgentVisibleToSwarm, normalizeAgent, validateAgentMetadata } from "./agent.utils.mjs";
|
|
4
4
|
import { AgentInstance } from "./agent.instance.mjs";
|
|
5
5
|
import { default as default2 } from "./agent.registry.mjs";
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
6
|
+
export { AgentExecutionLoop, AgentMaxIterationsError } from "./agent-execution-loop.mjs";
|
|
7
|
+
export { CallAgentFlow } from "./flows/index.mjs";
|
|
8
|
+
export { AgentHook, DidAgentStage, OnAgentStage, WillAgentStage } from "./hooks/index.mjs";
|
|
9
|
+
export { AnthropicAdapter, BaseLlmAdapter, LLM_ADAPTER, LlmAdapterError, LlmContextLengthError, LlmRateLimitError, OpenAIAdapter, createAdapter, isAdapterConfig, isAdapterInstance, isBuiltinConfig, isTokenConfig, resolveApiKey, resolveStringValue } from "./adapters/index.mjs";
|
|
10
10
|
import { AgentContext } from "../common/interfaces/agent.interface.mjs";
|
|
11
11
|
import { AgentEntry } from "../common/entries/agent.entry.mjs";
|
|
12
12
|
import { withConfig, frontMcpAgentMetadataSchema } from "../common/metadata/agent.metadata.mjs";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// libs/sdk/src/common/decorators/index.ts
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
2
|
+
export { FRONTMCP_CONFIG_METADATA_KEY, FrontMcp, getDecoratorConfig } from "./front-mcp.decorator.mjs";
|
|
3
|
+
export { Flow, FrontMcpFlow } from "./flow.decorator.mjs";
|
|
4
|
+
export { AroundHookOf, DidHookOf, FlowHooksOf, StageHookOf, WillHookOf, consumePendingTC39Hooks, peekPendingTC39HooksForClass, registerPendingTC39Hook, resolvePendingTC39HooksForClass } from "./hook.decorator.mjs";
|
|
5
|
+
export { App, FrontMcpApp, app, frontMcpApp } from "./app.decorator.mjs";
|
|
6
|
+
export { FrontMcpProvider, Provider } from "./provider.decorator.mjs";
|
|
7
|
+
export { AuthProvider, FrontMcpAuthProvider } from "./auth-provider.decorator.mjs";
|
|
8
|
+
export { Adapter, FrontMcpAdapter } from "./adapter.decorator.mjs";
|
|
9
|
+
export { FrontMcpPlugin, Plugin } from "./plugin.decorator.mjs";
|
|
10
|
+
export { FrontMcpTool, Tool, frontMcpTool, tool } from "./tool.decorator.mjs";
|
|
11
|
+
export { FrontMcpResource, FrontMcpResourceTemplate, Resource, ResourceTemplate, frontMcpResource, frontMcpResourceTemplate, resource, resourceTemplate } from "./resource.decorator.mjs";
|
|
12
|
+
export { FrontMcpPrompt, Prompt, frontMcpPrompt, prompt } from "./prompt.decorator.mjs";
|
|
13
|
+
export { FrontMcpLogTransport, LogTransport } from "./logger.decorator.mjs";
|
|
14
|
+
export { Agent, FrontMcpAgent, agent, frontMcpAgent } from "./agent.decorator.mjs";
|
|
15
|
+
export { FrontMcpSkill, Skill, frontMcpSkill, getSkillMetadata, isSkillDecorated, skill } from "./skill.decorator.mjs";
|
|
16
|
+
export { FrontMcpJob, Job, frontMcpJob, job } from "./job.decorator.mjs";
|
|
17
|
+
export { FrontMcpWorkflow, Workflow, frontMcpWorkflow, workflow } from "./workflow.decorator.mjs";
|
|
18
|
+
export { Channel, channel, isChannelClass, isChannelFunction } from "./channel.decorator.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// libs/sdk/src/common/dynamic/index.ts
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export { DynamicAdapter, adapterInitOptionsOf } from "./dynamic.adapter.mjs";
|
|
3
|
+
export { DynamicPlugin, initOptionsOf, isDynamicPluginClass } from "./dynamic.plugin.mjs";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// libs/sdk/src/common/entries/index.ts
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
2
|
+
export { BaseEntry } from "./base.entry.mjs";
|
|
3
|
+
export { ScopeEntry } from "./scope.entry.mjs";
|
|
4
|
+
export { FlowEntry } from "./flow.entry.mjs";
|
|
5
|
+
export { HookEntry } from "./hook.entry.mjs";
|
|
6
|
+
export { AppEntry } from "./app.entry.mjs";
|
|
7
|
+
export { ProviderEntry } from "./provider.entry.mjs";
|
|
8
|
+
export { AuthProviderEntry } from "./auth-provider.entry.mjs";
|
|
9
|
+
export { PluginEntry } from "./plugin.entry.mjs";
|
|
10
|
+
export { AdapterEntry } from "./adapter.entry.mjs";
|
|
11
|
+
export { ToolEntry } from "./tool.entry.mjs";
|
|
12
|
+
export { ResourceEntry } from "./resource.entry.mjs";
|
|
13
|
+
export { PromptEntry } from "./prompt.entry.mjs";
|
|
14
|
+
export { LoggerEntry } from "./logger.entry.mjs";
|
|
15
|
+
export { AgentEntry } from "./agent.entry.mjs";
|
|
16
|
+
export { SkillEntry } from "./skill.entry.mjs";
|
|
17
|
+
export { JobEntry } from "./job.entry.mjs";
|
|
18
|
+
export { WorkflowEntry } from "./workflow.entry.mjs";
|
|
19
|
+
export { ChannelEntry } from "./channel.entry.mjs";
|
package/browser/common/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// libs/sdk/src/common/index.ts
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
2
|
+
export { FRONTMCP_CONFIG_METADATA_KEY, FrontMcp, getDecoratorConfig, Flow, FrontMcpFlow, AroundHookOf, DidHookOf, FlowHooksOf, StageHookOf, WillHookOf, consumePendingTC39Hooks, peekPendingTC39HooksForClass, registerPendingTC39Hook, resolvePendingTC39HooksForClass, App, FrontMcpApp, app, frontMcpApp, FrontMcpProvider, Provider, AuthProvider, FrontMcpAuthProvider, Adapter, FrontMcpAdapter, FrontMcpPlugin, Plugin, FrontMcpTool, Tool, frontMcpTool, tool, FrontMcpResource, FrontMcpResourceTemplate, Resource, ResourceTemplate, frontMcpResource, frontMcpResourceTemplate, resource, resourceTemplate, FrontMcpPrompt, Prompt, frontMcpPrompt, prompt, FrontMcpLogTransport, LogTransport, Agent, FrontMcpAgent, agent, frontMcpAgent, FrontMcpSkill, Skill, frontMcpSkill, getSkillMetadata, isSkillDecorated, skill, FrontMcpJob, Job, frontMcpJob, job, FrontMcpWorkflow, Workflow, frontMcpWorkflow, workflow, Channel, channel, isChannelClass, isChannelFunction } from "./decorators/index.mjs";
|
|
3
|
+
export { jsonWebKeySetSchema, jwkParametersSchema, jwkSchema, aiPlatformTypeSchema, authorizationSchema, sessionIdPayloadSchema, sessionIdSchema, userClaimSchema, serverInfoOptionsSchema, platformDetectionConfigSchema, platformMappingEntrySchema, sessionOptionsSchema, defaultHttpPort, httpOptionsSchema, allowsPublicAccess, appAuthOptionsSchema, authOptionsSchema, authenticateFnSchema, consentConfigSchema, federatedAuthConfigSchema, flatRemoteProviderFields, incrementalAuthConfigSchema, isLocalMode, isOrchestratedLocal, isOrchestratedMode, isOrchestratedRemote, isPublicMode, isRemoteMode, isStaticMode, isTransparentMode, localAuthSchema, localDcrClientSchema, localDcrConfigSchema, localSigningConfigSchema, loginConfigSchema, orchestratedLocalSchema, orchestratedRemoteSchema, parseAuthOptions, providerConfigSchema, publicAccessConfigSchema, publicAuthOptionsSchema, remoteAuthSchema, remoteProviderConfigSchema, secureStoreConfigSchema, secureStoreCustomBackendSchema, secureStoreEncryptionSchema, secureStoreScopeSchema, skippedAppBehaviorSchema, staticAuthOptionsSchema, tokenRefreshConfigSchema, tokenStorageConfigSchema, tokenStorageSqliteSchema, transparentAuthOptionsSchema, upstreamProviderSchema, LogLevel, LogLevelName, loggingOptionsSchema, isPubsubConfigured, isRedisProvider, isVercelKvProvider, parseRedisUrl, pubsubOptionsSchema, redisOptionsSchema, redisProviderSchema, redisUrlSchema, storageProviderSchema, vercelKvProviderSchema, PROTOCOL_PRESETS, eventStoreConfigSchema, expandProtocolConfig, isDistributedMode, persistenceConfigSchema, shouldCacheProviders, transportOptionsSchema, DEFAULT_TOOL_PAGINATION, paginationOptionsSchema, toolPaginationOptionsSchema, outboundFetchOptionsSchema, DEFAULT_ELICITATION_OPTIONS, elicitationOptionsSchema, normalizeEndpointConfig, normalizeSkillsConfigOptions, skillsConfigAuthModeSchema, skillsConfigEndpointConfigSchema, skillsConfigOptionsSchema, extAppsHostCapabilitiesSchema, extAppsOptionsSchema, resolveDefaultSqlitePath, sqliteOptionsSchema, observabilityOptionsSchema, DEFAULT_HEALTH_OPTIONS, healthOptionsSchema, healthReadyzOptionsSchema, DEFAULT_METRICS_OPTIONS, metricsOptionsSchema, metricsProcessOptionsSchema, DEFAULT_REGISTRY_PUBLIC_KEY_ENV, REGISTRY_SERVER_NAME_PATTERN, mcpRegistryOptionsSchema, mcpRegistryRepositorySchema, toRegistryAuthRecord } from "./types/index.mjs";
|
|
4
|
+
export { ProviderScope, frontMcpBaseSchema, frontMcpMetadataSchema, parseFrontMcpConfigLite, DEFAULT_OUTPUT_SCHEMA_MODE, DEFAULT_SCHEMA_DESCRIPTION_FORMAT, OUTPUT_SCHEMA_MODES, SCHEMA_DESCRIPTION_FORMATS, formatOutputSchemaForDescription, outputPolicySchema, resolveOutputSchemaMode, resolveSchemaDescriptionFormat, frontMcpFlowMetadataSchema, frontMcpLocalAppMetadataSchema, frontMcpRemoteAppMetadataSchema, packageLoaderSchema, frontMcpProviderMetadataSchema, AuthProviderScope, frontMcpAuthProviderMetadataSchema, frontMcpAdapterMetadataSchema, frontMcpPluginMetadataSchema, AudioOutputSchema, ImageOutputSchema, ResourceLinkOutputSchema, ResourceOutputSchema, frontMcpToolMetadataSchema, normalizeToolAuthProviders, resolveToolVisibility, frontMcpResourceMetadataSchema, frontMcpResourceTemplateMetadataSchema, frontMcpPromptMetadataSchema, frontMcpLogTransportMetadataSchema, frontMcpAgentMetadataSchema, withConfig, extractToolNames, getToolNameFromClass, isFileInstructions, isInlineInstructions, isToolRefWithClass, isToolRefWithName, isUrlInstructions, normalizeToolRef, skillMetadataSchema, frontMcpJobMetadataSchema, frontMcpWorkflowMetadataSchema, channelNotificationSchema, channelSourceConfigSchema, channelsConfigSchema, frontMcpChannelMetadataSchema, PRIMITIVE_FILTER_KEYS, appFilterConfigSchema } from "./metadata/index.mjs";
|
|
5
|
+
export { ExecutionContextBase, FrontMcpServer, ServerRequest, ServerResponse, FlowBase, FlowControl, AsyncProvider, AsyncAuthProvider, ToolContext, ResourceContext, PromptContext, FrontMcpLogger, LogTransportInterface, LLM_ADAPTER, supportsStreaming, AgentContext, SkillContext, JobContext, WorkflowContext, ChannelContext, Auth, FrontMcpAuth } from "./interfaces/index.mjs";
|
|
6
|
+
export { FrontMcpTokens, ServerRequestTokens, FrontMcpFlowTokens, FrontMcpFlowHookTokens, FrontMcpLocalAppTokens, FrontMcpRemoteAppTokens, FrontMcpProviderTokens, FrontMcpAuthProviderTokens, FrontMcpAdapterTokens, FrontMcpPluginTokens, FrontMcpToolTokens, extendedToolMetadata, FrontMcpResourceTemplateTokens, FrontMcpResourceTokens, extendedResourceMetadata, extendedResourceTemplateMetadata, FrontMcpPromptTokens, extendedPromptMetadata, FrontMcpLogTransportTokens, FrontMcpAgentTokens, extendedAgentMetadata, FrontMcpSkillTokens, extendedSkillMetadata, skillCallerDir, FrontMcpJobTokens, extendedJobMetadata, FrontMcpWorkflowTokens, extendedWorkflowMetadata, FrontMcpChannelTokens } from "./tokens/index.mjs";
|
|
7
|
+
export { DynamicAdapter, adapterInitOptionsOf, DynamicPlugin, initOptionsOf, isDynamicPluginClass } from "./dynamic/index.mjs";
|
|
8
|
+
export { ProviderKind, ScopeKind, FlowKind, HookKind, AppKind, AuthProviderKind, PluginKind, AdapterKind, ToolKind, ResourceKind, ResourceTemplateKind, PromptKind, LoggerKind, AgentKind, SkillKind, JobKind, WorkflowKind, ChannelKind } from "./records/index.mjs";
|
|
9
|
+
export { BaseEntry, ScopeEntry, FlowEntry, HookEntry, AppEntry, ProviderEntry, AuthProviderEntry, PluginEntry, AdapterEntry, ToolEntry, ResourceEntry, PromptEntry, LoggerEntry, AgentEntry, SkillEntry, JobEntry, WorkflowEntry, ChannelEntry } from "./entries/index.mjs";
|
|
10
|
+
export { authInfoFromAuthorization, sessionIdPresentedBy, captureCallerDir, parseCallerDir, authorizeSessionTermination, decideIntent, decisionSchema, intentSchema, GLOBAL_RATE_LIMIT_CHECKED, IP_FILTER_REJECTION_BODY, acquireConcurrencySlots, buildPartitionContext, enforceGlobalRateLimit, enforceIpFilter, partitionsByIdentity, computeIssuer, computeResource, getPinnedPublicUrl, getRequestBaseUrl, isProxyTrusted, isPublicUrlPinned, joinPath, makeWellKnownPaths, normalizeEntryPrefix, normalizeResourceUri, normalizeScopeBase, resolveEntryPath, resourceUriMatches, trimSlashes, urlToSafeId, resolvePrincipal, getGlobalStoreConfig, applyPrimitiveFilter, isPrimitiveIncluded, validateRemoteUrl } from "./utils/index.mjs";
|
|
11
|
+
export { annotatedFrontMcpAdaptersSchema, annotatedFrontMcpAgentsSchema, annotatedFrontMcpAppSchema, annotatedFrontMcpAuthProvidersSchema, annotatedFrontMcpChannelsSchema, annotatedFrontMcpJobsSchema, annotatedFrontMcpLoggerSchema, annotatedFrontMcpPluginsSchema, annotatedFrontMcpPromptsSchema, annotatedFrontMcpProvidersSchema, annotatedFrontMcpResourcesSchema, annotatedFrontMcpSkillsSchema, annotatedFrontMcpToolsSchema, annotatedFrontMcpWorkflowsSchema, HttpBinarySchema, HttpConsumedSchema, HttpCookieSchema, HttpCookies, HttpEmptySchema, HttpEmptyStatus, HttpHeaders, HttpHtmlSchema, HttpImageSchema, HttpJsonRpcSchema, HttpJsonSchema, HttpNextSchema, HttpProblemSchema, HttpRedirectSchema, HttpRedirectStatus, HttpSseSchema, HttpStatus, HttpStreamSchema, HttpTextSchema, HttpWebResponseSchema, JSON_RPC, NO_BODY_STATUSES, NO_STORE_HEADERS, REDIRECTS, challengeHeaders, httpOutputSchema, httpRespond, serializeHttpCookie, withHttpHeaders, httpInputSchema, httpRequestInputSchema, mcpSessionHeaderSchema, validateMcpSessionHeader } from "./schemas/index.mjs";
|
|
12
|
+
export { detectConflicts, parseListInput, previewItems, resolveNameConflicts } from "./flow/flow.utils.mjs";
|
|
13
|
+
export { ToolHookStage } from "./interfaces/tool-hook.interface.mjs";
|
|
14
|
+
export { SessionHookStage } from "./interfaces/session-hook.interface.mjs";
|
|
15
|
+
export { AuthHookStage } from "./interfaces/auth-hook.interface.mjs";
|
|
16
|
+
export { BaseConfig } from "./providers/base-config.provider.mjs";
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
// libs/sdk/src/common/interfaces/index.ts
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
2
|
+
import "./base.interface.mjs";
|
|
3
|
+
export { ExecutionContextBase } from "./execution-context.interface.mjs";
|
|
4
|
+
import "./front-mcp.interface.mjs";
|
|
5
|
+
export { FrontMcpServer, ServerRequest, ServerResponse } from "./server.interface.mjs";
|
|
6
|
+
import "./scope.interface.mjs";
|
|
7
|
+
export { FlowBase, FlowControl } from "./flow.interface.mjs";
|
|
8
|
+
import "./hook.interface.mjs";
|
|
9
|
+
import "./app.interface.mjs";
|
|
10
|
+
export { AsyncProvider } from "./provider.interface.mjs";
|
|
11
|
+
export { AsyncAuthProvider } from "./auth-provider.interface.mjs";
|
|
12
|
+
import "./adapter.interface.mjs";
|
|
13
|
+
import "./plugin.interface.mjs";
|
|
14
|
+
export { ToolContext } from "./tool.interface.mjs";
|
|
15
|
+
export { ResourceContext } from "./resource.interface.mjs";
|
|
16
|
+
export { PromptContext } from "./prompt.interface.mjs";
|
|
17
|
+
export { FrontMcpLogger, LogTransportInterface } from "./logger.interface.mjs";
|
|
18
|
+
export { LLM_ADAPTER, supportsStreaming } from "./llm-adapter.interface.mjs";
|
|
19
|
+
export { AgentContext } from "./agent.interface.mjs";
|
|
20
|
+
export { SkillContext } from "./skill.interface.mjs";
|
|
21
|
+
export { JobContext } from "./job.interface.mjs";
|
|
22
|
+
export { WorkflowContext } from "./workflow.interface.mjs";
|
|
23
|
+
export { ChannelContext } from "./channel.interface.mjs";
|
|
24
|
+
export { Auth, FrontMcpAuth } from "./internal/index.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// libs/sdk/src/common/interfaces/internal/index.ts
|
|
2
|
-
export
|
|
3
|
-
|
|
2
|
+
export { Auth, FrontMcpAuth } from "./primary-auth-provider.interface.mjs";
|
|
3
|
+
import "./registry.interface.mjs";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
// libs/sdk/src/common/metadata/index.ts
|
|
2
2
|
import { ProviderScope } from "@frontmcp/di";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
|
|
3
|
+
export { frontMcpBaseSchema, frontMcpMetadataSchema, parseFrontMcpConfigLite } from "./front-mcp.metadata.mjs";
|
|
4
|
+
export { DEFAULT_OUTPUT_SCHEMA_MODE, DEFAULT_SCHEMA_DESCRIPTION_FORMAT, OUTPUT_SCHEMA_MODES, SCHEMA_DESCRIPTION_FORMATS, formatOutputSchemaForDescription, outputPolicySchema, resolveOutputSchemaMode, resolveSchemaDescriptionFormat } from "./output-policy.mjs";
|
|
5
|
+
export { frontMcpFlowMetadataSchema } from "./flow.metadata.mjs";
|
|
6
|
+
import "./hook.metadata.mjs";
|
|
7
|
+
export { frontMcpLocalAppMetadataSchema, frontMcpRemoteAppMetadataSchema, packageLoaderSchema } from "./app.metadata.mjs";
|
|
8
|
+
export { frontMcpProviderMetadataSchema } from "./provider.metadata.mjs";
|
|
9
|
+
export { AuthProviderScope, frontMcpAuthProviderMetadataSchema } from "./auth-provider.metadata.mjs";
|
|
10
|
+
export { frontMcpAdapterMetadataSchema } from "./adapter.metadata.mjs";
|
|
11
|
+
export { frontMcpPluginMetadataSchema } from "./plugin.metadata.mjs";
|
|
12
|
+
export { AudioOutputSchema, ImageOutputSchema, ResourceLinkOutputSchema, ResourceOutputSchema, frontMcpToolMetadataSchema, normalizeToolAuthProviders, resolveToolVisibility } from "./tool.metadata.mjs";
|
|
13
|
+
import "./tool-ui.metadata.mjs";
|
|
14
|
+
export { frontMcpResourceMetadataSchema, frontMcpResourceTemplateMetadataSchema } from "./resource.metadata.mjs";
|
|
15
|
+
export { frontMcpPromptMetadataSchema } from "./prompt.metadata.mjs";
|
|
16
|
+
export { frontMcpLogTransportMetadataSchema } from "./logger.metadata.mjs";
|
|
17
|
+
export { frontMcpAgentMetadataSchema, withConfig } from "./agent.metadata.mjs";
|
|
18
|
+
export { extractToolNames, getToolNameFromClass, isFileInstructions, isInlineInstructions, isToolRefWithClass, isToolRefWithName, isUrlInstructions, normalizeToolRef, skillMetadataSchema } from "./skill.metadata.mjs";
|
|
19
|
+
export { frontMcpJobMetadataSchema } from "./job.metadata.mjs";
|
|
20
|
+
export { frontMcpWorkflowMetadataSchema } from "./workflow.metadata.mjs";
|
|
21
|
+
export { channelNotificationSchema, channelSourceConfigSchema, channelsConfigSchema, frontMcpChannelMetadataSchema } from "./channel.metadata.mjs";
|
|
22
|
+
export { PRIMITIVE_FILTER_KEYS, appFilterConfigSchema } from "./app-filter.metadata.mjs";
|
|
23
|
+
import "./remote-primitive.metadata.mjs";
|
|
24
24
|
export {
|
|
25
25
|
ProviderScope
|
|
26
26
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
// libs/sdk/src/common/records/index.ts
|
|
2
2
|
import { ProviderKind } from "@frontmcp/di";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
3
|
+
export { ScopeKind } from "./scope.record.mjs";
|
|
4
|
+
export { FlowKind } from "./flow.record.mjs";
|
|
5
|
+
export { HookKind } from "./hook.record.mjs";
|
|
6
|
+
export { AppKind } from "./app.record.mjs";
|
|
7
|
+
import "./provider.record.mjs";
|
|
8
|
+
export { AuthProviderKind } from "./auth-provider.record.mjs";
|
|
9
|
+
export { PluginKind } from "./plugin.record.mjs";
|
|
10
|
+
export { AdapterKind } from "./adapter.record.mjs";
|
|
11
|
+
export { ToolKind } from "./tool.record.mjs";
|
|
12
|
+
export { ResourceKind, ResourceTemplateKind } from "./resource.record.mjs";
|
|
13
|
+
export { PromptKind } from "./prompt.record.mjs";
|
|
14
|
+
export { LoggerKind } from "./logger.record.mjs";
|
|
15
|
+
export { AgentKind } from "./agent.record.mjs";
|
|
16
|
+
export { SkillKind } from "./skill.record.mjs";
|
|
17
|
+
export { JobKind } from "./job.record.mjs";
|
|
18
|
+
export { WorkflowKind } from "./workflow.record.mjs";
|
|
19
|
+
export { ChannelKind } from "./channel.record.mjs";
|
|
20
20
|
export {
|
|
21
21
|
ProviderKind
|
|
22
22
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// libs/sdk/src/common/schemas/index.ts
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
2
|
+
export { annotatedFrontMcpAdaptersSchema, annotatedFrontMcpAgentsSchema, annotatedFrontMcpAppSchema, annotatedFrontMcpAuthProvidersSchema, annotatedFrontMcpChannelsSchema, annotatedFrontMcpJobsSchema, annotatedFrontMcpLoggerSchema, annotatedFrontMcpPluginsSchema, annotatedFrontMcpPromptsSchema, annotatedFrontMcpProvidersSchema, annotatedFrontMcpResourcesSchema, annotatedFrontMcpSkillsSchema, annotatedFrontMcpToolsSchema, annotatedFrontMcpWorkflowsSchema } from "./annotated-class.schema.mjs";
|
|
3
|
+
export { HttpBinarySchema, HttpConsumedSchema, HttpCookieSchema, HttpCookies, HttpEmptySchema, HttpEmptyStatus, HttpHeaders, HttpHtmlSchema, HttpImageSchema, HttpJsonRpcSchema, HttpJsonSchema, HttpNextSchema, HttpProblemSchema, HttpRedirectSchema, HttpRedirectStatus, HttpSseSchema, HttpStatus, HttpStreamSchema, HttpTextSchema, HttpWebResponseSchema, JSON_RPC, NO_BODY_STATUSES, NO_STORE_HEADERS, REDIRECTS, challengeHeaders, httpOutputSchema, httpRespond, serializeHttpCookie, withHttpHeaders } from "./http-output.schema.mjs";
|
|
4
|
+
export { httpInputSchema, httpRequestInputSchema } from "./http-input.schema.mjs";
|
|
5
|
+
export { mcpSessionHeaderSchema, validateMcpSessionHeader } from "./session-header.schema.mjs";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
// libs/sdk/src/common/tokens/index.ts
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
2
|
+
export { FrontMcpTokens } from "./front-mcp.tokens.mjs";
|
|
3
|
+
export { ServerRequestTokens } from "./server.tokens.mjs";
|
|
4
|
+
export { FrontMcpFlowTokens } from "./flow.tokens.mjs";
|
|
5
|
+
export { FrontMcpFlowHookTokens } from "./flow-hook.tokens.mjs";
|
|
6
|
+
export { FrontMcpLocalAppTokens, FrontMcpRemoteAppTokens } from "./app.tokens.mjs";
|
|
7
|
+
export { FrontMcpProviderTokens } from "./provider.tokens.mjs";
|
|
8
|
+
export { FrontMcpAuthProviderTokens } from "./auth-provider.tokens.mjs";
|
|
9
|
+
export { FrontMcpAdapterTokens } from "./adapter.tokens.mjs";
|
|
10
|
+
export { FrontMcpPluginTokens } from "./plugin.tokens.mjs";
|
|
11
|
+
export { FrontMcpToolTokens, extendedToolMetadata } from "./tool.tokens.mjs";
|
|
12
|
+
export { FrontMcpResourceTemplateTokens, FrontMcpResourceTokens, extendedResourceMetadata, extendedResourceTemplateMetadata } from "./resource.tokens.mjs";
|
|
13
|
+
export { FrontMcpPromptTokens, extendedPromptMetadata } from "./prompt.tokens.mjs";
|
|
14
|
+
export { FrontMcpLogTransportTokens } from "./logger.tokens.mjs";
|
|
15
|
+
export { FrontMcpAgentTokens, extendedAgentMetadata } from "./agent.tokens.mjs";
|
|
16
|
+
export { FrontMcpSkillTokens, extendedSkillMetadata, skillCallerDir } from "./skill.tokens.mjs";
|
|
17
|
+
export { FrontMcpJobTokens, extendedJobMetadata } from "./job.tokens.mjs";
|
|
18
|
+
export { FrontMcpWorkflowTokens, extendedWorkflowMetadata } from "./workflow.tokens.mjs";
|
|
19
|
+
export { FrontMcpChannelTokens } from "./channel.tokens.mjs";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// libs/sdk/src/common/types/auth/index.ts
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export { jsonWebKeySetSchema, jwkParametersSchema, jwkSchema } from "./jwt.types.mjs";
|
|
3
|
+
export { aiPlatformTypeSchema, authorizationSchema, sessionIdPayloadSchema, sessionIdSchema, userClaimSchema } from "./session.types.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// libs/sdk/src/common/types/index.ts
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
|
|
2
|
+
export { jsonWebKeySetSchema, jwkParametersSchema, jwkSchema, aiPlatformTypeSchema, authorizationSchema, sessionIdPayloadSchema, sessionIdSchema, userClaimSchema } from "./auth/index.mjs";
|
|
3
|
+
export { serverInfoOptionsSchema, platformDetectionConfigSchema, platformMappingEntrySchema, sessionOptionsSchema, defaultHttpPort, httpOptionsSchema, allowsPublicAccess, appAuthOptionsSchema, authOptionsSchema, authenticateFnSchema, consentConfigSchema, federatedAuthConfigSchema, flatRemoteProviderFields, incrementalAuthConfigSchema, isLocalMode, isOrchestratedLocal, isOrchestratedMode, isOrchestratedRemote, isPublicMode, isRemoteMode, isStaticMode, isTransparentMode, localAuthSchema, localDcrClientSchema, localDcrConfigSchema, localSigningConfigSchema, loginConfigSchema, orchestratedLocalSchema, orchestratedRemoteSchema, parseAuthOptions, providerConfigSchema, publicAccessConfigSchema, publicAuthOptionsSchema, remoteAuthSchema, remoteProviderConfigSchema, secureStoreConfigSchema, secureStoreCustomBackendSchema, secureStoreEncryptionSchema, secureStoreScopeSchema, skippedAppBehaviorSchema, staticAuthOptionsSchema, tokenRefreshConfigSchema, tokenStorageConfigSchema, tokenStorageSqliteSchema, transparentAuthOptionsSchema, upstreamProviderSchema, LogLevel, LogLevelName, loggingOptionsSchema, isPubsubConfigured, isRedisProvider, isVercelKvProvider, parseRedisUrl, pubsubOptionsSchema, redisOptionsSchema, redisProviderSchema, redisUrlSchema, storageProviderSchema, vercelKvProviderSchema, PROTOCOL_PRESETS, eventStoreConfigSchema, expandProtocolConfig, isDistributedMode, persistenceConfigSchema, shouldCacheProviders, transportOptionsSchema, DEFAULT_TOOL_PAGINATION, paginationOptionsSchema, toolPaginationOptionsSchema, outboundFetchOptionsSchema, DEFAULT_ELICITATION_OPTIONS, elicitationOptionsSchema, normalizeEndpointConfig, normalizeSkillsConfigOptions, skillsConfigAuthModeSchema, skillsConfigEndpointConfigSchema, skillsConfigOptionsSchema, extAppsHostCapabilitiesSchema, extAppsOptionsSchema, resolveDefaultSqlitePath, sqliteOptionsSchema, observabilityOptionsSchema, DEFAULT_HEALTH_OPTIONS, healthOptionsSchema, healthReadyzOptionsSchema, DEFAULT_METRICS_OPTIONS, metricsOptionsSchema, metricsProcessOptionsSchema, DEFAULT_REGISTRY_PUBLIC_KEY_ENV, REGISTRY_SERVER_NAME_PATTERN, mcpRegistryOptionsSchema, mcpRegistryRepositorySchema, toRegistryAuthRecord } from "./options/index.mjs";
|
|
4
|
+
import "./common.types.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// libs/sdk/src/common/types/options/ext-apps/index.ts
|
|
2
|
-
export
|
|
2
|
+
export { extAppsHostCapabilitiesSchema, extAppsOptionsSchema } from "./schema.mjs";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// libs/sdk/src/common/types/options/index.ts
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
2
|
+
export { serverInfoOptionsSchema } from "./server-info/index.mjs";
|
|
3
|
+
export { platformDetectionConfigSchema, platformMappingEntrySchema, sessionOptionsSchema } from "./session/index.mjs";
|
|
4
|
+
export { defaultHttpPort, httpOptionsSchema } from "./http/index.mjs";
|
|
5
|
+
export { allowsPublicAccess, appAuthOptionsSchema, authOptionsSchema, authenticateFnSchema, consentConfigSchema, federatedAuthConfigSchema, flatRemoteProviderFields, incrementalAuthConfigSchema, isLocalMode, isOrchestratedLocal, isOrchestratedMode, isOrchestratedRemote, isPublicMode, isRemoteMode, isStaticMode, isTransparentMode, localAuthSchema, localDcrClientSchema, localDcrConfigSchema, localSigningConfigSchema, loginConfigSchema, orchestratedLocalSchema, orchestratedRemoteSchema, parseAuthOptions, providerConfigSchema, publicAccessConfigSchema, publicAuthOptionsSchema, remoteAuthSchema, remoteProviderConfigSchema, secureStoreConfigSchema, secureStoreCustomBackendSchema, secureStoreEncryptionSchema, secureStoreScopeSchema, skippedAppBehaviorSchema, staticAuthOptionsSchema, tokenRefreshConfigSchema, tokenStorageConfigSchema, tokenStorageSqliteSchema, transparentAuthOptionsSchema, upstreamProviderSchema } from "./auth/index.mjs";
|
|
6
|
+
export { LogLevel, LogLevelName, loggingOptionsSchema } from "./logging/index.mjs";
|
|
7
|
+
export { isPubsubConfigured, isRedisProvider, isVercelKvProvider, parseRedisUrl, pubsubOptionsSchema, redisOptionsSchema, redisProviderSchema, redisUrlSchema, storageProviderSchema, vercelKvProviderSchema } from "./redis/index.mjs";
|
|
8
|
+
export { PROTOCOL_PRESETS, eventStoreConfigSchema, expandProtocolConfig, isDistributedMode, persistenceConfigSchema, shouldCacheProviders, transportOptionsSchema } from "./transport/index.mjs";
|
|
9
|
+
export { DEFAULT_TOOL_PAGINATION, paginationOptionsSchema, toolPaginationOptionsSchema } from "./pagination/index.mjs";
|
|
10
|
+
export { outboundFetchOptionsSchema } from "./outbound-fetch/index.mjs";
|
|
11
|
+
export { DEFAULT_ELICITATION_OPTIONS, elicitationOptionsSchema } from "./elicitation/index.mjs";
|
|
12
|
+
export { normalizeEndpointConfig, normalizeSkillsConfigOptions, skillsConfigAuthModeSchema, skillsConfigEndpointConfigSchema, skillsConfigOptionsSchema } from "./skills-http/index.mjs";
|
|
13
|
+
export { extAppsHostCapabilitiesSchema, extAppsOptionsSchema } from "./ext-apps/index.mjs";
|
|
14
|
+
export { resolveDefaultSqlitePath, sqliteOptionsSchema } from "./sqlite/index.mjs";
|
|
15
|
+
export { observabilityOptionsSchema } from "./observability/index.mjs";
|
|
16
|
+
export { DEFAULT_HEALTH_OPTIONS, healthOptionsSchema, healthReadyzOptionsSchema } from "./health/index.mjs";
|
|
17
|
+
export { DEFAULT_METRICS_OPTIONS, metricsOptionsSchema, metricsProcessOptionsSchema } from "./metrics/index.mjs";
|
|
18
|
+
export { DEFAULT_REGISTRY_PUBLIC_KEY_ENV, REGISTRY_SERVER_NAME_PATTERN, mcpRegistryOptionsSchema, mcpRegistryRepositorySchema, toRegistryAuthRecord } from "./registry/index.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// libs/sdk/src/common/utils/index.ts
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
2
|
+
export { authInfoFromAuthorization, sessionIdPresentedBy } from "./auth-info.utils.mjs";
|
|
3
|
+
export { captureCallerDir, parseCallerDir } from "./caller-dir.utils.mjs";
|
|
4
|
+
export { authorizeSessionTermination, decideIntent, decisionSchema, intentSchema } from "./decide-request-intent.utils.mjs";
|
|
5
|
+
export { GLOBAL_RATE_LIMIT_CHECKED, IP_FILTER_REJECTION_BODY, acquireConcurrencySlots, buildPartitionContext, enforceGlobalRateLimit, enforceIpFilter, partitionsByIdentity } from "./guard.utils.mjs";
|
|
6
|
+
export { computeIssuer, computeResource, getPinnedPublicUrl, getRequestBaseUrl, isProxyTrusted, isPublicUrlPinned, joinPath, makeWellKnownPaths, normalizeEntryPrefix, normalizeResourceUri, normalizeScopeBase, resolveEntryPath, resourceUriMatches, trimSlashes, urlToSafeId } from "./path.utils.mjs";
|
|
7
|
+
export { resolvePrincipal } from "./principal.utils.mjs";
|
|
8
|
+
export { getGlobalStoreConfig } from "./global-config.utils.mjs";
|
|
9
|
+
export { applyPrimitiveFilter, isPrimitiveIncluded } from "./primitive-filter.mjs";
|
|
10
|
+
export { validateRemoteUrl } from "./validate-remote-url.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// libs/sdk/src/elicitation/index.ts
|
|
2
|
-
export
|
|
2
|
+
export { DEFAULT_ELICIT_TTL, DEFAULT_FALLBACK_WAIT_TTL } from "./elicitation.types.mjs";
|
|
3
3
|
import { ELICITATION_FALLBACK_JSON_SCHEMA } from "./elicitation-fallback.schema.mjs";
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export { EncryptedElicitationStore, StorageElicitationStore, createElicitationStore, createElicitationStoreFromStorage, createMemoryElicitationStore, decryptElicitationData, deriveElicitationKey, deserializeAndDecrypt, deserializeElicitationBlob, encryptAndSerialize, encryptElicitationData, getElicitationSecret, isElicitationEncryptionAvailable, isEncryptedBlob, serializeElicitationBlob, tryDecryptStoredValue } from "./store/index.mjs";
|
|
5
|
+
export { canDeliverNotifications, extendOutputSchemaForElicitation, generateElicitationId, handleWaitingFallback, performElicit, performListRoots, performSample, sendFallbackNotification, validateElicitationContent } from "./helpers/index.mjs";
|
|
6
6
|
export {
|
|
7
7
|
ELICITATION_FALLBACK_JSON_SCHEMA
|
|
8
8
|
};
|
package/browser/errors/index.mjs
CHANGED
|
@@ -218,8 +218,8 @@ import {
|
|
|
218
218
|
FlowInputMissingError,
|
|
219
219
|
DynamicJobDirectExecutionError
|
|
220
220
|
} from "./sdk.errors.mjs";
|
|
221
|
-
export
|
|
222
|
-
export
|
|
221
|
+
export { DynamicJobRegistrationDisabledError, JobNotAuthorizedError } from "./job.errors.mjs";
|
|
222
|
+
export { UnenforcedMetadataError } from "./plugin.errors.mjs";
|
|
223
223
|
export {
|
|
224
224
|
AgentCallDepthExceededError,
|
|
225
225
|
AgentConfigKeyNotFoundError,
|
package/browser/index.cjs
CHANGED
|
@@ -43790,6 +43790,27 @@ var init_persistent_session_owner = __esm({
|
|
|
43790
43790
|
}
|
|
43791
43791
|
});
|
|
43792
43792
|
|
|
43793
|
+
// libs/sdk/src/transport/body-limit.ts
|
|
43794
|
+
function parseByteLimit(limit) {
|
|
43795
|
+
if (typeof limit === "number" && Number.isFinite(limit) && limit >= 0) return limit;
|
|
43796
|
+
if (typeof limit === "string") {
|
|
43797
|
+
const match = /^(\d+(?:\.\d+)?)\s*(b|kb|mb|gb)?$/i.exec(limit.trim());
|
|
43798
|
+
if (match) return Math.floor(Number(match[1]) * BYTE_UNITS[(match[2] ?? "b").toLowerCase()]);
|
|
43799
|
+
}
|
|
43800
|
+
return DEFAULT_BODY_LIMIT_BYTES;
|
|
43801
|
+
}
|
|
43802
|
+
function mcpTransportBodyLimit(limit) {
|
|
43803
|
+
return Math.max(1, parseByteLimit(limit));
|
|
43804
|
+
}
|
|
43805
|
+
var DEFAULT_BODY_LIMIT_BYTES, BYTE_UNITS;
|
|
43806
|
+
var init_body_limit = __esm({
|
|
43807
|
+
"libs/sdk/src/transport/body-limit.ts"() {
|
|
43808
|
+
"use strict";
|
|
43809
|
+
DEFAULT_BODY_LIMIT_BYTES = 4 * 1024 * 1024;
|
|
43810
|
+
BYTE_UNITS = { b: 1, kb: 1024, mb: 1024 ** 2, gb: 1024 ** 3 };
|
|
43811
|
+
}
|
|
43812
|
+
});
|
|
43813
|
+
|
|
43793
43814
|
// libs/sdk/src/transport/web-standard-mcp.ts
|
|
43794
43815
|
var web_standard_mcp_exports = {};
|
|
43795
43816
|
__export(web_standard_mcp_exports, {
|
|
@@ -43813,7 +43834,11 @@ async function wireServer(scope, serverOptions, sessionId, sessionIdGenerator, e
|
|
|
43813
43834
|
};
|
|
43814
43835
|
mcpServer.setRequestHandler(handler.requestSchema, wrappedHandler);
|
|
43815
43836
|
}
|
|
43816
|
-
const transport = new WebStandardStreamableHTTPServerTransport2({
|
|
43837
|
+
const transport = new WebStandardStreamableHTTPServerTransport2({
|
|
43838
|
+
sessionIdGenerator,
|
|
43839
|
+
enableJsonResponse,
|
|
43840
|
+
maxRequestBodySize: mcpTransportBodyLimit(scope.metadata.http?.bodyLimit)
|
|
43841
|
+
});
|
|
43817
43842
|
await mcpServer.connect(transport);
|
|
43818
43843
|
return { mcpServer, transport };
|
|
43819
43844
|
}
|
|
@@ -43856,6 +43881,7 @@ var init_web_standard_mcp = __esm({
|
|
|
43856
43881
|
import_utils89 = require("@frontmcp/utils");
|
|
43857
43882
|
init_skill_instructions_helper();
|
|
43858
43883
|
init_dynamic_import_utils();
|
|
43884
|
+
init_body_limit();
|
|
43859
43885
|
init_build_scoped_server_options();
|
|
43860
43886
|
}
|
|
43861
43887
|
});
|
|
@@ -48670,7 +48696,6 @@ var init_streamable_http_transport = __esm({
|
|
|
48670
48696
|
* @param sessionId - The session ID to set
|
|
48671
48697
|
* @throws Error if the MCP SDK version is incompatible
|
|
48672
48698
|
*/
|
|
48673
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48674
48699
|
_applyInitState(webTransport, sessionId) {
|
|
48675
48700
|
if (!("_initialized" in webTransport)) {
|
|
48676
48701
|
throw new InvalidTransportSessionError(
|
|
@@ -48685,7 +48710,6 @@ var init_streamable_http_transport = __esm({
|
|
|
48685
48710
|
* 1. Recreate the internal transport for stateless mode (MCP SDK 1.26.0 single-use guard)
|
|
48686
48711
|
* 2. Apply any pending initialization state before processing
|
|
48687
48712
|
*/
|
|
48688
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48689
48713
|
async handleRequest(req, res, body) {
|
|
48690
48714
|
const oldWebTransport = this._webStandardTransport;
|
|
48691
48715
|
if (oldWebTransport && this._isStateless && oldWebTransport._hasHandledRequest) {
|
|
@@ -48703,6 +48727,7 @@ var init_streamable_http_transport = __esm({
|
|
|
48703
48727
|
this._pendingInitState = void 0;
|
|
48704
48728
|
}
|
|
48705
48729
|
}
|
|
48730
|
+
if (!res.headersSent) res.removeHeader?.("Content-Type");
|
|
48706
48731
|
return super.handleRequest(req, res, body);
|
|
48707
48732
|
}
|
|
48708
48733
|
};
|
|
@@ -71544,14 +71569,6 @@ function createServerFetchHandler(primary, scopes, options = {}) {
|
|
|
71544
71569
|
function scopePathOf(pathname) {
|
|
71545
71570
|
return pathname.replace(WELL_KNOWN_SEGMENT, "") || "/";
|
|
71546
71571
|
}
|
|
71547
|
-
function parseByteLimit(limit) {
|
|
71548
|
-
if (typeof limit === "number" && Number.isFinite(limit) && limit >= 0) return limit;
|
|
71549
|
-
if (typeof limit === "string") {
|
|
71550
|
-
const match = /^(\d+(?:\.\d+)?)\s*(b|kb|mb|gb)?$/i.exec(limit.trim());
|
|
71551
|
-
if (match) return Math.floor(Number(match[1]) * BYTE_UNITS[(match[2] ?? "b").toLowerCase()]);
|
|
71552
|
-
}
|
|
71553
|
-
return DEFAULT_BODY_LIMIT_BYTES;
|
|
71554
|
-
}
|
|
71555
71572
|
function payloadTooLarge(limit, length) {
|
|
71556
71573
|
const error = new PayloadTooLargeError(limit, length);
|
|
71557
71574
|
return Response.json({ jsonrpc: "2.0", error: error.toJsonRpcError(), id: null }, { status: 413 });
|
|
@@ -71725,7 +71742,7 @@ function startupFailureResponse(error, retryAfterSeconds = 1) {
|
|
|
71725
71742
|
{ status: 503, headers: { "Retry-After": String(Math.max(1, retryAfterSeconds)) } }
|
|
71726
71743
|
);
|
|
71727
71744
|
}
|
|
71728
|
-
var import_utils135, CLOUDFLARE_WORKERS_USER_AGENT, carriedPeerAddresses, WELL_KNOWN_SEGMENT,
|
|
71745
|
+
var import_utils135, CLOUDFLARE_WORKERS_USER_AGENT, carriedPeerAddresses, WELL_KNOWN_SEGMENT, STARTUP_RETRY_MIN_MS, STARTUP_RETRY_MAX_MS;
|
|
71729
71746
|
var init_web_fetch_handler = __esm({
|
|
71730
71747
|
"libs/sdk/src/transport/web-fetch-handler.ts"() {
|
|
71731
71748
|
"use strict";
|
|
@@ -71742,14 +71759,13 @@ var init_web_fetch_handler = __esm({
|
|
|
71742
71759
|
init_cors_env();
|
|
71743
71760
|
init_csp_middleware();
|
|
71744
71761
|
init_host_validation();
|
|
71762
|
+
init_body_limit();
|
|
71745
71763
|
init_flow_error_output();
|
|
71746
71764
|
init_web_http_route();
|
|
71747
71765
|
init_web_response_renderer();
|
|
71748
71766
|
CLOUDFLARE_WORKERS_USER_AGENT = "Cloudflare-Workers";
|
|
71749
71767
|
carriedPeerAddresses = /* @__PURE__ */ new WeakMap();
|
|
71750
71768
|
WELL_KNOWN_SEGMENT = /\/\.well-known\/[^/]+/;
|
|
71751
|
-
DEFAULT_BODY_LIMIT_BYTES = 4 * 1024 * 1024;
|
|
71752
|
-
BYTE_UNITS = { b: 1, kb: 1024, mb: 1024 ** 2, gb: 1024 ** 3 };
|
|
71753
71769
|
STARTUP_RETRY_MIN_MS = 1e3;
|
|
71754
71770
|
STARTUP_RETRY_MAX_MS = 6e4;
|
|
71755
71771
|
}
|