@frontmcp/sdk 1.10.9-rc.4 → 1.10.9
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/direct/direct-client.mjs +1 -1
- package/browser/index.cjs +107 -106
- package/browser/remote-mcp/mcp-client.service.mjs +1 -5
- package/esm/index.mjs +2 -2
- package/index.js +12 -12
- package/package.json +10 -10
- package/remote-mcp/mcp-client.service.d.ts.map +1 -1
- package/remote-mcp/mcp-client.types.d.ts +2 -1
- package/remote-mcp/mcp-client.types.d.ts.map +1 -1
- package/transport/in-memory-server.d.ts +1 -1
- package/transport/index.d.ts +1 -1
package/browser/index.cjs
CHANGED
|
@@ -10961,11 +10961,12 @@ function walkForFile(dir, targetRelative, fs, path, matches, maxDepth = 10) {
|
|
|
10961
10961
|
} catch {
|
|
10962
10962
|
}
|
|
10963
10963
|
}
|
|
10964
|
-
var import_protocol29, import_utils33, DirectClientImpl;
|
|
10964
|
+
var import_protocol29, import_client, import_utils33, DirectClientImpl;
|
|
10965
10965
|
var init_direct_client = __esm({
|
|
10966
10966
|
"libs/sdk/src/direct/direct-client.ts"() {
|
|
10967
10967
|
"use strict";
|
|
10968
10968
|
import_protocol29 = require("@frontmcp/protocol");
|
|
10969
|
+
import_client = require("@frontmcp/protocol/client");
|
|
10969
10970
|
import_utils33 = require("@frontmcp/utils");
|
|
10970
10971
|
init_list_all_pages_utils();
|
|
10971
10972
|
init_elicitation_meta();
|
|
@@ -11039,7 +11040,7 @@ var init_direct_client = __esm({
|
|
|
11039
11040
|
...options?.capabilities
|
|
11040
11041
|
}
|
|
11041
11042
|
};
|
|
11042
|
-
const mcpClient = new
|
|
11043
|
+
const mcpClient = new import_client.Client(clientInfo, clientCapabilities);
|
|
11043
11044
|
await mcpClient.connect(clientTransport);
|
|
11044
11045
|
const serverInfo = mcpClient.getServerVersion();
|
|
11045
11046
|
const serverCapabilities = mcpClient.getServerCapabilities();
|
|
@@ -20567,12 +20568,12 @@ var init_resilience = __esm({
|
|
|
20567
20568
|
});
|
|
20568
20569
|
|
|
20569
20570
|
// libs/sdk/src/remote-mcp/mcp-client.service.ts
|
|
20570
|
-
var import_auth26,
|
|
20571
|
+
var import_auth26, import_client2, DEFAULT_RETRY_OPTIONS2, DEFAULT_CIRCUIT_BREAKER_OPTIONS, DEFAULT_HEALTH_CHECK_OPTIONS, DEFAULT_OPTIONS3, McpClientService;
|
|
20571
20572
|
var init_mcp_client_service = __esm({
|
|
20572
20573
|
"libs/sdk/src/remote-mcp/mcp-client.service.ts"() {
|
|
20573
20574
|
"use strict";
|
|
20574
20575
|
import_auth26 = require("@frontmcp/auth");
|
|
20575
|
-
|
|
20576
|
+
import_client2 = require("@frontmcp/protocol/client");
|
|
20576
20577
|
init_list_all_pages_utils();
|
|
20577
20578
|
init_mcp_error();
|
|
20578
20579
|
init_remote_errors();
|
|
@@ -20681,7 +20682,7 @@ var init_mcp_client_service = __esm({
|
|
|
20681
20682
|
return connection2026;
|
|
20682
20683
|
}
|
|
20683
20684
|
let transport = this.createTransport(request, headers);
|
|
20684
|
-
const client = new
|
|
20685
|
+
const client = new import_client2.Client(
|
|
20685
20686
|
{
|
|
20686
20687
|
name: this.options.clientName,
|
|
20687
20688
|
version: this.options.clientVersion
|
|
@@ -21175,9 +21176,9 @@ var init_mcp_client_service = __esm({
|
|
|
21175
21176
|
};
|
|
21176
21177
|
switch (transportType) {
|
|
21177
21178
|
case "http":
|
|
21178
|
-
return new
|
|
21179
|
+
return new import_client2.StreamableHTTPClientTransport(new URL(url), options);
|
|
21179
21180
|
case "sse":
|
|
21180
|
-
return new
|
|
21181
|
+
return new import_client2.SSEClientTransport(new URL(url), options);
|
|
21181
21182
|
case "worker":
|
|
21182
21183
|
case "npm":
|
|
21183
21184
|
case "esm":
|
|
@@ -21190,7 +21191,7 @@ var init_mcp_client_service = __esm({
|
|
|
21190
21191
|
* Create fallback SSE transport when Streamable HTTP fails
|
|
21191
21192
|
*/
|
|
21192
21193
|
createFallbackSSETransport(request, headers) {
|
|
21193
|
-
return new
|
|
21194
|
+
return new import_client2.SSEClientTransport(new URL(request.url), {
|
|
21194
21195
|
requestInit: headers ? { headers } : void 0,
|
|
21195
21196
|
fetch: createRemoteRequestFetch(headers !== void 0)
|
|
21196
21197
|
});
|
|
@@ -22236,13 +22237,13 @@ var init_ui_resource_handler = __esm({
|
|
|
22236
22237
|
});
|
|
22237
22238
|
|
|
22238
22239
|
// libs/sdk/src/resource/flows/read-resource.flow.ts
|
|
22239
|
-
var import_auth27, import_lazy_zod54,
|
|
22240
|
+
var import_auth27, import_lazy_zod54, import_protocol40, import_utils55, inputSchema4, outputSchema4, stateSchema4, plan4, name4, resourceClassHooksJoin, Stage4, resolvedResources, ReadResourceFlow;
|
|
22240
22241
|
var init_read_resource_flow = __esm({
|
|
22241
22242
|
"libs/sdk/src/resource/flows/read-resource.flow.ts"() {
|
|
22242
22243
|
"use strict";
|
|
22243
22244
|
import_auth27 = require("@frontmcp/auth");
|
|
22244
22245
|
import_lazy_zod54 = require("@frontmcp/lazy-zod");
|
|
22245
|
-
|
|
22246
|
+
import_protocol40 = require("@frontmcp/protocol");
|
|
22246
22247
|
import_utils55 = require("@frontmcp/utils");
|
|
22247
22248
|
init_remote_capabilities_utils();
|
|
22248
22249
|
init_common();
|
|
@@ -22255,11 +22256,11 @@ var init_read_resource_flow = __esm({
|
|
|
22255
22256
|
init_ui_shared();
|
|
22256
22257
|
init_lineage_utils();
|
|
22257
22258
|
inputSchema4 = import_lazy_zod54.z.object({
|
|
22258
|
-
request:
|
|
22259
|
+
request: import_protocol40.ReadResourceRequestSchema,
|
|
22259
22260
|
// z.any() used because ctx is the MCP SDK's ResourceReadExtra type which varies by SDK version
|
|
22260
22261
|
ctx: import_lazy_zod54.z.any()
|
|
22261
22262
|
});
|
|
22262
|
-
outputSchema4 =
|
|
22263
|
+
outputSchema4 = import_protocol40.ReadResourceResultSchema;
|
|
22263
22264
|
stateSchema4 = import_lazy_zod54.z.object({
|
|
22264
22265
|
input: import_lazy_zod54.z.object({
|
|
22265
22266
|
uri: import_lazy_zod54.z.string().min(1)
|
|
@@ -22598,21 +22599,21 @@ var init_read_resource_flow = __esm({
|
|
|
22598
22599
|
});
|
|
22599
22600
|
|
|
22600
22601
|
// libs/sdk/src/resource/flows/resource-templates-list.flow.ts
|
|
22601
|
-
var import_reflect_metadata7, import_lazy_zod55,
|
|
22602
|
+
var import_reflect_metadata7, import_lazy_zod55, import_protocol41, inputSchema5, outputSchema5, stateSchema5, plan5, name5, Stage5, ResourceTemplatesListFlow;
|
|
22602
22603
|
var init_resource_templates_list_flow = __esm({
|
|
22603
22604
|
"libs/sdk/src/resource/flows/resource-templates-list.flow.ts"() {
|
|
22604
22605
|
"use strict";
|
|
22605
22606
|
init_common();
|
|
22606
22607
|
import_reflect_metadata7 = require("reflect-metadata");
|
|
22607
22608
|
import_lazy_zod55 = require("@frontmcp/lazy-zod");
|
|
22608
|
-
|
|
22609
|
+
import_protocol41 = require("@frontmcp/protocol");
|
|
22609
22610
|
init_availability();
|
|
22610
22611
|
init_errors();
|
|
22611
22612
|
inputSchema5 = import_lazy_zod55.z.object({
|
|
22612
|
-
request:
|
|
22613
|
+
request: import_protocol41.ListResourceTemplatesRequestSchema,
|
|
22613
22614
|
ctx: import_lazy_zod55.z.unknown()
|
|
22614
22615
|
});
|
|
22615
|
-
outputSchema5 =
|
|
22616
|
+
outputSchema5 = import_protocol41.ListResourceTemplatesResultSchema;
|
|
22616
22617
|
stateSchema5 = import_lazy_zod55.z.object({
|
|
22617
22618
|
cursor: import_lazy_zod55.z.string().optional(),
|
|
22618
22619
|
templates: import_lazy_zod55.z.array(
|
|
@@ -22836,21 +22837,21 @@ var init_resource_templates_list_flow = __esm({
|
|
|
22836
22837
|
});
|
|
22837
22838
|
|
|
22838
22839
|
// libs/sdk/src/resource/flows/resources-list.flow.ts
|
|
22839
|
-
var import_reflect_metadata8, import_lazy_zod56,
|
|
22840
|
+
var import_reflect_metadata8, import_lazy_zod56, import_protocol42, inputSchema6, outputSchema6, stateSchema6, plan6, name6, Stage6, ResourcesListFlow;
|
|
22840
22841
|
var init_resources_list_flow = __esm({
|
|
22841
22842
|
"libs/sdk/src/resource/flows/resources-list.flow.ts"() {
|
|
22842
22843
|
"use strict";
|
|
22843
22844
|
init_common();
|
|
22844
22845
|
import_reflect_metadata8 = require("reflect-metadata");
|
|
22845
22846
|
import_lazy_zod56 = require("@frontmcp/lazy-zod");
|
|
22846
|
-
|
|
22847
|
+
import_protocol42 = require("@frontmcp/protocol");
|
|
22847
22848
|
init_availability();
|
|
22848
22849
|
init_errors();
|
|
22849
22850
|
inputSchema6 = import_lazy_zod56.z.object({
|
|
22850
|
-
request:
|
|
22851
|
+
request: import_protocol42.ListResourcesRequestSchema,
|
|
22851
22852
|
ctx: import_lazy_zod56.z.unknown()
|
|
22852
22853
|
});
|
|
22853
|
-
outputSchema6 =
|
|
22854
|
+
outputSchema6 = import_protocol42.ListResourcesResultSchema;
|
|
22854
22855
|
stateSchema6 = import_lazy_zod56.z.object({
|
|
22855
22856
|
cursor: import_lazy_zod56.z.string().optional(),
|
|
22856
22857
|
resources: import_lazy_zod56.z.array(
|
|
@@ -23095,12 +23096,12 @@ var init_resources_list_flow = __esm({
|
|
|
23095
23096
|
});
|
|
23096
23097
|
|
|
23097
23098
|
// libs/sdk/src/resource/flows/subscribe-resource.flow.ts
|
|
23098
|
-
var import_lazy_zod57,
|
|
23099
|
+
var import_lazy_zod57, import_protocol43, inputSchema7, outputSchema7, stateSchema7, plan7, name7, Stage7, SubscribeResourceFlow;
|
|
23099
23100
|
var init_subscribe_resource_flow = __esm({
|
|
23100
23101
|
"libs/sdk/src/resource/flows/subscribe-resource.flow.ts"() {
|
|
23101
23102
|
"use strict";
|
|
23102
23103
|
import_lazy_zod57 = require("@frontmcp/lazy-zod");
|
|
23103
|
-
|
|
23104
|
+
import_protocol43 = require("@frontmcp/protocol");
|
|
23104
23105
|
init_remote_capabilities_utils();
|
|
23105
23106
|
init_common();
|
|
23106
23107
|
init_availability();
|
|
@@ -23108,10 +23109,10 @@ var init_subscribe_resource_flow = __esm({
|
|
|
23108
23109
|
init_ui_shared();
|
|
23109
23110
|
init_mcp_surface();
|
|
23110
23111
|
inputSchema7 = import_lazy_zod57.z.object({
|
|
23111
|
-
request:
|
|
23112
|
+
request: import_protocol43.SubscribeRequestSchema,
|
|
23112
23113
|
ctx: import_lazy_zod57.z.unknown()
|
|
23113
23114
|
});
|
|
23114
|
-
outputSchema7 =
|
|
23115
|
+
outputSchema7 = import_protocol43.EmptyResultSchema;
|
|
23115
23116
|
stateSchema7 = import_lazy_zod57.z.object({
|
|
23116
23117
|
input: import_lazy_zod57.z.object({
|
|
23117
23118
|
uri: import_lazy_zod57.z.string().min(1)
|
|
@@ -23220,20 +23221,20 @@ var init_subscribe_resource_flow = __esm({
|
|
|
23220
23221
|
});
|
|
23221
23222
|
|
|
23222
23223
|
// libs/sdk/src/resource/flows/unsubscribe-resource.flow.ts
|
|
23223
|
-
var import_lazy_zod58,
|
|
23224
|
+
var import_lazy_zod58, import_protocol44, inputSchema8, outputSchema8, stateSchema8, plan8, name8, Stage8, UnsubscribeResourceFlow;
|
|
23224
23225
|
var init_unsubscribe_resource_flow = __esm({
|
|
23225
23226
|
"libs/sdk/src/resource/flows/unsubscribe-resource.flow.ts"() {
|
|
23226
23227
|
"use strict";
|
|
23227
23228
|
import_lazy_zod58 = require("@frontmcp/lazy-zod");
|
|
23228
|
-
|
|
23229
|
+
import_protocol44 = require("@frontmcp/protocol");
|
|
23229
23230
|
init_common();
|
|
23230
23231
|
init_errors();
|
|
23231
23232
|
init_mcp_surface();
|
|
23232
23233
|
inputSchema8 = import_lazy_zod58.z.object({
|
|
23233
|
-
request:
|
|
23234
|
+
request: import_protocol44.UnsubscribeRequestSchema,
|
|
23234
23235
|
ctx: import_lazy_zod58.z.unknown()
|
|
23235
23236
|
});
|
|
23236
|
-
outputSchema8 =
|
|
23237
|
+
outputSchema8 = import_protocol44.EmptyResultSchema;
|
|
23237
23238
|
stateSchema8 = import_lazy_zod58.z.object({
|
|
23238
23239
|
input: import_lazy_zod58.z.object({
|
|
23239
23240
|
uri: import_lazy_zod58.z.string().min(1)
|
|
@@ -24238,14 +24239,14 @@ var init_send_elicitation_result_utils = __esm({
|
|
|
24238
24239
|
});
|
|
24239
24240
|
|
|
24240
24241
|
// libs/sdk/src/tool/flows/tools-list.flow.ts
|
|
24241
|
-
var import_reflect_metadata9, import_lazy_zod59,
|
|
24242
|
+
var import_reflect_metadata9, import_lazy_zod59, import_protocol45, import_types2, import_utils58, inputSchema9, outputSchema9, stateSchema9, plan9, name9, Stage9, ToolsListFlow;
|
|
24242
24243
|
var init_tools_list_flow = __esm({
|
|
24243
24244
|
"libs/sdk/src/tool/flows/tools-list.flow.ts"() {
|
|
24244
24245
|
"use strict";
|
|
24245
24246
|
init_common();
|
|
24246
24247
|
import_reflect_metadata9 = require("reflect-metadata");
|
|
24247
24248
|
import_lazy_zod59 = require("@frontmcp/lazy-zod");
|
|
24248
|
-
|
|
24249
|
+
import_protocol45 = require("@frontmcp/protocol");
|
|
24249
24250
|
import_types2 = require("@frontmcp/uipack/types");
|
|
24250
24251
|
import_utils58 = require("@frontmcp/utils");
|
|
24251
24252
|
init_public_access_utils();
|
|
@@ -24255,10 +24256,10 @@ var init_tools_list_flow = __esm({
|
|
|
24255
24256
|
init_skill_mode_utils();
|
|
24256
24257
|
init_ui_shared();
|
|
24257
24258
|
inputSchema9 = import_lazy_zod59.z.object({
|
|
24258
|
-
request:
|
|
24259
|
+
request: import_protocol45.ListToolsRequestSchema,
|
|
24259
24260
|
ctx: import_lazy_zod59.z.unknown()
|
|
24260
24261
|
});
|
|
24261
|
-
outputSchema9 =
|
|
24262
|
+
outputSchema9 = import_protocol45.ListToolsResultSchema;
|
|
24262
24263
|
stateSchema9 = import_lazy_zod59.z.object({
|
|
24263
24264
|
cursor: import_lazy_zod59.z.string().optional(),
|
|
24264
24265
|
// z.any() used because AuthInfo is an external type from @frontmcp/protocol that varies by SDK version
|
|
@@ -33491,14 +33492,14 @@ function invalidOutputFrom(outputError) {
|
|
|
33491
33492
|
function findAgentForCall(agents, toolName) {
|
|
33492
33493
|
return agents.findById(toolName) ?? agents.findByName(toolName) ?? agents.getAgents(true).find((entry) => entry.fullName === toolName || entry.name === toolName);
|
|
33493
33494
|
}
|
|
33494
|
-
var import_auth29, import_guard6, import_lazy_zod61,
|
|
33495
|
+
var import_auth29, import_guard6, import_lazy_zod61, import_protocol46, inputSchema10, outputSchema10, stateSchema10, plan10, name10, agentClassHooksJoin, Stage10, CallAgentFlow;
|
|
33495
33496
|
var init_call_agent_flow = __esm({
|
|
33496
33497
|
"libs/sdk/src/agent/flows/call-agent.flow.ts"() {
|
|
33497
33498
|
"use strict";
|
|
33498
33499
|
import_auth29 = require("@frontmcp/auth");
|
|
33499
33500
|
import_guard6 = require("@frontmcp/guard");
|
|
33500
33501
|
import_lazy_zod61 = require("@frontmcp/lazy-zod");
|
|
33501
|
-
|
|
33502
|
+
import_protocol46 = require("@frontmcp/protocol");
|
|
33502
33503
|
init_completion_events();
|
|
33503
33504
|
init_common();
|
|
33504
33505
|
init_errors();
|
|
@@ -33506,7 +33507,7 @@ var init_call_agent_flow = __esm({
|
|
|
33506
33507
|
init_flow_context_providers();
|
|
33507
33508
|
init_agent_call_chain();
|
|
33508
33509
|
inputSchema10 = import_lazy_zod61.z.object({
|
|
33509
|
-
request:
|
|
33510
|
+
request: import_protocol46.CallToolRequestSchema,
|
|
33510
33511
|
// z.any() used because ctx is the MCP SDK's ToolCallExtra type which varies by SDK version
|
|
33511
33512
|
ctx: import_lazy_zod61.z.any(),
|
|
33512
33513
|
/**
|
|
@@ -33517,7 +33518,7 @@ var init_call_agent_flow = __esm({
|
|
|
33517
33518
|
*/
|
|
33518
33519
|
gatedBy: import_lazy_zod61.z.literal("tools:call-tool").optional()
|
|
33519
33520
|
});
|
|
33520
|
-
outputSchema10 =
|
|
33521
|
+
outputSchema10 = import_protocol46.CallToolResultSchema;
|
|
33521
33522
|
stateSchema10 = import_lazy_zod61.z.object({
|
|
33522
33523
|
input: import_lazy_zod61.z.looseObject({
|
|
33523
33524
|
name: import_lazy_zod61.z.string().min(1).max(128),
|
|
@@ -37330,13 +37331,13 @@ function isListedTool(tool, listedNames) {
|
|
|
37330
37331
|
const baseName = tool.metadata.id ?? tool.metadata.name;
|
|
37331
37332
|
return listedNames.has(baseName) || listedNames.has(`${tool.owner.id}:${baseName}`);
|
|
37332
37333
|
}
|
|
37333
|
-
var import_auth34, import_lazy_zod63,
|
|
37334
|
+
var import_auth34, import_lazy_zod63, import_protocol47, inputSchema11, outputSchema11, PromptRefSchema, ResourceRefSchema, CompletionRefSchema, stateSchema11, plan11, name11, Stage11, resolvedReferences, MAX_TOOL_LIST_PAGES, CompleteFlow;
|
|
37334
37335
|
var init_complete_flow = __esm({
|
|
37335
37336
|
"libs/sdk/src/completion/flows/complete.flow.ts"() {
|
|
37336
37337
|
"use strict";
|
|
37337
37338
|
import_auth34 = require("@frontmcp/auth");
|
|
37338
37339
|
import_lazy_zod63 = require("@frontmcp/lazy-zod");
|
|
37339
|
-
|
|
37340
|
+
import_protocol47 = require("@frontmcp/protocol");
|
|
37340
37341
|
init_remote_capabilities_utils();
|
|
37341
37342
|
init_public_access_utils();
|
|
37342
37343
|
init_common();
|
|
@@ -37347,10 +37348,10 @@ var init_complete_flow = __esm({
|
|
|
37347
37348
|
init_ui_shared();
|
|
37348
37349
|
init_lineage_utils();
|
|
37349
37350
|
inputSchema11 = import_lazy_zod63.z.object({
|
|
37350
|
-
request:
|
|
37351
|
+
request: import_protocol47.CompleteRequestSchema,
|
|
37351
37352
|
ctx: import_lazy_zod63.z.unknown()
|
|
37352
37353
|
});
|
|
37353
|
-
outputSchema11 =
|
|
37354
|
+
outputSchema11 = import_protocol47.CompleteResultSchema;
|
|
37354
37355
|
PromptRefSchema = import_lazy_zod63.z.object({
|
|
37355
37356
|
type: import_lazy_zod63.z.literal("ref/prompt"),
|
|
37356
37357
|
name: import_lazy_zod63.z.string()
|
|
@@ -37713,23 +37714,23 @@ var init_job_utils = __esm({
|
|
|
37713
37714
|
});
|
|
37714
37715
|
|
|
37715
37716
|
// libs/sdk/src/logging/flows/set-level.flow.ts
|
|
37716
|
-
var import_lazy_zod64,
|
|
37717
|
+
var import_lazy_zod64, import_protocol48, inputSchema12, outputSchema12, stateSchema12, plan12, name12, Stage12, SetLevelFlow;
|
|
37717
37718
|
var init_set_level_flow = __esm({
|
|
37718
37719
|
"libs/sdk/src/logging/flows/set-level.flow.ts"() {
|
|
37719
37720
|
"use strict";
|
|
37720
37721
|
import_lazy_zod64 = require("@frontmcp/lazy-zod");
|
|
37721
|
-
|
|
37722
|
+
import_protocol48 = require("@frontmcp/protocol");
|
|
37722
37723
|
init_common();
|
|
37723
37724
|
init_errors();
|
|
37724
37725
|
init_mcp_surface();
|
|
37725
37726
|
inputSchema12 = import_lazy_zod64.z.object({
|
|
37726
|
-
request:
|
|
37727
|
+
request: import_protocol48.SetLevelRequestSchema,
|
|
37727
37728
|
ctx: import_lazy_zod64.z.unknown()
|
|
37728
37729
|
});
|
|
37729
|
-
outputSchema12 =
|
|
37730
|
+
outputSchema12 = import_protocol48.EmptyResultSchema;
|
|
37730
37731
|
stateSchema12 = import_lazy_zod64.z.object({
|
|
37731
37732
|
input: import_lazy_zod64.z.object({
|
|
37732
|
-
level:
|
|
37733
|
+
level: import_protocol48.LoggingLevelSchema
|
|
37733
37734
|
}),
|
|
37734
37735
|
sessionId: import_lazy_zod64.z.string().optional(),
|
|
37735
37736
|
output: outputSchema12
|
|
@@ -40365,12 +40366,12 @@ var init_front_mcp_interface = __esm({
|
|
|
40365
40366
|
});
|
|
40366
40367
|
|
|
40367
40368
|
// libs/sdk/src/common/interfaces/server.interface.ts
|
|
40368
|
-
var
|
|
40369
|
+
var import_protocol49, ServerRequest, ServerResponse, FrontMcpServer;
|
|
40369
40370
|
var init_server_interface = __esm({
|
|
40370
40371
|
"libs/sdk/src/common/interfaces/server.interface.ts"() {
|
|
40371
40372
|
"use strict";
|
|
40372
|
-
|
|
40373
|
-
ServerRequest = class extends
|
|
40373
|
+
import_protocol49 = require("@frontmcp/protocol");
|
|
40374
|
+
ServerRequest = class extends import_protocol49.IncomingMessage {
|
|
40374
40375
|
path;
|
|
40375
40376
|
query;
|
|
40376
40377
|
/** Path parameters of the matched route (`:providerId` in `/oauth/provider/:providerId/callback`). */
|
|
@@ -40378,7 +40379,7 @@ var init_server_interface = __esm({
|
|
|
40378
40379
|
body;
|
|
40379
40380
|
authSession;
|
|
40380
40381
|
};
|
|
40381
|
-
ServerResponse = class extends
|
|
40382
|
+
ServerResponse = class extends import_protocol49.HttpServerResponse {
|
|
40382
40383
|
};
|
|
40383
40384
|
FrontMcpServer = class {
|
|
40384
40385
|
/** Stop accepting connections and close the open ones; a server that never listened has nothing to stop. */
|
|
@@ -43903,7 +43904,7 @@ __export(web_standard_mcp_exports, {
|
|
|
43903
43904
|
});
|
|
43904
43905
|
async function wireServer(scope, serverOptions, sessionId, sessionIdGenerator, enableJsonResponse) {
|
|
43905
43906
|
const { createMcpHandlers: createMcpHandlers2 } = await Promise.resolve().then(() => (init_mcp_handlers(), mcp_handlers_exports));
|
|
43906
|
-
const mcpServer = new
|
|
43907
|
+
const mcpServer = new import_protocol50.McpServer(scope.metadata.info, serverOptions);
|
|
43907
43908
|
const composeInstructions = (caller) => composeCallerInstructions(scope, { ctx: caller, skillUriHints: true });
|
|
43908
43909
|
for (const handler of createMcpHandlers2({ scope, serverOptions, composeInstructions })) {
|
|
43909
43910
|
const originalHandler = handler.handler;
|
|
@@ -43914,7 +43915,7 @@ async function wireServer(scope, serverOptions, sessionId, sessionIdGenerator, e
|
|
|
43914
43915
|
};
|
|
43915
43916
|
mcpServer.setRequestHandler(handler.requestSchema, wrappedHandler);
|
|
43916
43917
|
}
|
|
43917
|
-
const transport = new
|
|
43918
|
+
const transport = new import_protocol50.WebStandardStreamableHTTPServerTransport({
|
|
43918
43919
|
sessionIdGenerator,
|
|
43919
43920
|
enableJsonResponse,
|
|
43920
43921
|
maxRequestBodySize: mcpTransportBodyLimit(scope.metadata.http?.bodyLimit)
|
|
@@ -43954,11 +43955,11 @@ async function runWebStandardMcp(scope, request, options) {
|
|
|
43954
43955
|
}
|
|
43955
43956
|
return response;
|
|
43956
43957
|
}
|
|
43957
|
-
var
|
|
43958
|
+
var import_protocol50, import_utils89;
|
|
43958
43959
|
var init_web_standard_mcp = __esm({
|
|
43959
43960
|
"libs/sdk/src/transport/web-standard-mcp.ts"() {
|
|
43960
43961
|
"use strict";
|
|
43961
|
-
|
|
43962
|
+
import_protocol50 = require("@frontmcp/protocol");
|
|
43962
43963
|
import_utils89 = require("@frontmcp/utils");
|
|
43963
43964
|
init_skill_instructions_helper();
|
|
43964
43965
|
init_body_limit();
|
|
@@ -45747,11 +45748,11 @@ function mergeExperimental(fragments) {
|
|
|
45747
45748
|
if (sawExtensions) out["extensions"] = extensions;
|
|
45748
45749
|
return out;
|
|
45749
45750
|
}
|
|
45750
|
-
var
|
|
45751
|
+
var import_protocol51, LocalTransportAdapter;
|
|
45751
45752
|
var init_transport_local_adapter = __esm({
|
|
45752
45753
|
"libs/sdk/src/transport/adapters/transport.local.adapter.ts"() {
|
|
45753
45754
|
"use strict";
|
|
45754
|
-
|
|
45755
|
+
import_protocol51 = require("@frontmcp/protocol");
|
|
45755
45756
|
init_common();
|
|
45756
45757
|
init_errors();
|
|
45757
45758
|
init_skill_instructions_helper();
|
|
@@ -45870,7 +45871,7 @@ var init_transport_local_adapter = __esm({
|
|
|
45870
45871
|
capabilities: JSON.stringify(serverOptions.capabilities),
|
|
45871
45872
|
serverInfo: JSON.stringify(serverOptions.serverInfo)
|
|
45872
45873
|
});
|
|
45873
|
-
this.server = new
|
|
45874
|
+
this.server = new import_protocol51.McpServer(info, serverOptions);
|
|
45874
45875
|
const handlers = createMcpHandlers({
|
|
45875
45876
|
scope: this.scope,
|
|
45876
45877
|
serverOptions,
|
|
@@ -45914,7 +45915,7 @@ var init_transport_local_adapter = __esm({
|
|
|
45914
45915
|
async ping(timeoutMs = 1e4) {
|
|
45915
45916
|
try {
|
|
45916
45917
|
await this.ready;
|
|
45917
|
-
await this.server.request({ method: "ping" },
|
|
45918
|
+
await this.server.request({ method: "ping" }, import_protocol51.EmptyResultSchema, { timeout: timeoutMs });
|
|
45918
45919
|
return true;
|
|
45919
45920
|
} catch {
|
|
45920
45921
|
return false;
|
|
@@ -46035,7 +46036,7 @@ var init_transport_local_adapter = __esm({
|
|
|
46035
46036
|
return true;
|
|
46036
46037
|
}
|
|
46037
46038
|
}
|
|
46038
|
-
const parsed =
|
|
46039
|
+
const parsed = import_protocol51.ElicitResultSchema.safeParse(req.body?.result);
|
|
46039
46040
|
if (!parsed.success) {
|
|
46040
46041
|
return false;
|
|
46041
46042
|
}
|
|
@@ -46423,13 +46424,13 @@ var streamable_http_transport_exports = {};
|
|
|
46423
46424
|
__export(streamable_http_transport_exports, {
|
|
46424
46425
|
RecreateableStreamableHTTPServerTransport: () => RecreateableStreamableHTTPServerTransport
|
|
46425
46426
|
});
|
|
46426
|
-
var
|
|
46427
|
+
var import_protocol52, RecreateableStreamableHTTPServerTransport;
|
|
46427
46428
|
var init_streamable_http_transport = __esm({
|
|
46428
46429
|
"libs/sdk/src/transport/adapters/streamable-http-transport.ts"() {
|
|
46429
46430
|
"use strict";
|
|
46430
|
-
|
|
46431
|
+
import_protocol52 = require("@frontmcp/protocol");
|
|
46431
46432
|
init_transport_errors();
|
|
46432
|
-
RecreateableStreamableHTTPServerTransport = class extends
|
|
46433
|
+
RecreateableStreamableHTTPServerTransport = class extends import_protocol52.StreamableHTTPServerTransport {
|
|
46433
46434
|
/**
|
|
46434
46435
|
* Stores pending initialization state when setInitializationState is called
|
|
46435
46436
|
* before _webStandardTransport is ready. Applied on first handleRequest.
|
|
@@ -46538,7 +46539,7 @@ var init_streamable_http_transport = __esm({
|
|
|
46538
46539
|
async handleRequest(req, res, body) {
|
|
46539
46540
|
const oldWebTransport = this._webStandardTransport;
|
|
46540
46541
|
if (oldWebTransport && this._isStateless && oldWebTransport._hasHandledRequest) {
|
|
46541
|
-
const fresh = new
|
|
46542
|
+
const fresh = new import_protocol52.WebStandardStreamableHTTPServerTransport(this._constructorOptions);
|
|
46542
46543
|
fresh.onmessage = oldWebTransport.onmessage;
|
|
46543
46544
|
fresh.onclose = oldWebTransport.onclose;
|
|
46544
46545
|
fresh.onerror = oldWebTransport.onerror;
|
|
@@ -46867,13 +46868,13 @@ function toClientInfo(value) {
|
|
|
46867
46868
|
const { name: name48, version } = value;
|
|
46868
46869
|
return typeof name48 === "string" && typeof version === "string" ? { name: name48, version } : void 0;
|
|
46869
46870
|
}
|
|
46870
|
-
var import_auth44, import_lazy_zod76,
|
|
46871
|
+
var import_auth44, import_lazy_zod76, import_protocol53, import_utils93, plan22, subscriptionParamsSchema, requestIdSchema, stateSchema20, name22, Stage22, encoder3, TRACE_META_KEYS, HandleMcp20260728Flow;
|
|
46871
46872
|
var init_handle_mcp_20260728_flow = __esm({
|
|
46872
46873
|
"libs/sdk/src/transport/flows/handle.mcp-20260728.flow.ts"() {
|
|
46873
46874
|
"use strict";
|
|
46874
46875
|
import_auth44 = require("@frontmcp/auth");
|
|
46875
46876
|
import_lazy_zod76 = require("@frontmcp/lazy-zod");
|
|
46876
|
-
|
|
46877
|
+
import_protocol53 = require("@frontmcp/protocol");
|
|
46877
46878
|
import_utils93 = require("@frontmcp/utils");
|
|
46878
46879
|
init_common();
|
|
46879
46880
|
init_tool_lookup_utils();
|
|
@@ -47046,7 +47047,7 @@ var init_handle_mcp_20260728_flow = __esm({
|
|
|
47046
47047
|
* session that initializes with that capability is subscribed to.
|
|
47047
47048
|
*/
|
|
47048
47049
|
async listenedChannels(meta) {
|
|
47049
|
-
const capabilities = meta?.[
|
|
47050
|
+
const capabilities = meta?.[import_protocol53.MCP_20260728_META.clientCapabilities];
|
|
47050
47051
|
if (!supportsChannels(capabilities) || !this.scope.channels) return [];
|
|
47051
47052
|
const listed = await this.scope.runFlowForOutput("channels:list", {});
|
|
47052
47053
|
return listed.channels.map((channel2) => channel2.name);
|
|
@@ -47058,12 +47059,12 @@ var init_handle_mcp_20260728_flow = __esm({
|
|
|
47058
47059
|
const meta = params["_meta"] ?? {};
|
|
47059
47060
|
const auth = request[ServerRequestTokens.auth];
|
|
47060
47061
|
const stdio = this.stdioOrigin;
|
|
47061
|
-
const clientCapabilities = meta[
|
|
47062
|
-
const logLevel = typeof meta[
|
|
47062
|
+
const clientCapabilities = meta[import_protocol53.MCP_20260728_META.clientCapabilities] ?? {};
|
|
47063
|
+
const logLevel = typeof meta[import_protocol53.MCP_20260728_META.logLevel] === "string" ? meta[import_protocol53.MCP_20260728_META.logLevel] : void 0;
|
|
47063
47064
|
const rawProgressToken = meta["progressToken"];
|
|
47064
47065
|
const progressToken = typeof rawProgressToken === "string" || typeof rawProgressToken === "number" ? rawProgressToken : void 0;
|
|
47065
47066
|
const sink = new RequestNotificationSink(logLevel, progressToken);
|
|
47066
|
-
const clientInfo = toClientInfo(meta[
|
|
47067
|
+
const clientInfo = toClientInfo(meta[import_protocol53.MCP_20260728_META.clientInfo]);
|
|
47067
47068
|
if (clientInfo) {
|
|
47068
47069
|
const platformType = resolvePlatformType(
|
|
47069
47070
|
clientInfo,
|
|
@@ -47369,12 +47370,12 @@ var init_handle_sse_flow = __esm({
|
|
|
47369
47370
|
});
|
|
47370
47371
|
|
|
47371
47372
|
// libs/sdk/src/transport/flows/handle.stateless-http.flow.ts
|
|
47372
|
-
var import_lazy_zod78,
|
|
47373
|
+
var import_lazy_zod78, import_protocol54, plan24, stateSchema22, name24, Stage24, HandleStatelessHttpFlow;
|
|
47373
47374
|
var init_handle_stateless_http_flow = __esm({
|
|
47374
47375
|
"libs/sdk/src/transport/flows/handle.stateless-http.flow.ts"() {
|
|
47375
47376
|
"use strict";
|
|
47376
47377
|
import_lazy_zod78 = require("@frontmcp/lazy-zod");
|
|
47377
|
-
|
|
47378
|
+
import_protocol54 = require("@frontmcp/protocol");
|
|
47378
47379
|
init_common();
|
|
47379
47380
|
init_errors();
|
|
47380
47381
|
init_ha_headers();
|
|
@@ -47419,7 +47420,7 @@ var init_handle_stateless_http_flow = __esm({
|
|
|
47419
47420
|
if (method === "initialize") {
|
|
47420
47421
|
this.state.set("requestType", "initialize");
|
|
47421
47422
|
logger.verbose("router: requestType=initialize, method=POST");
|
|
47422
|
-
} else if (method &&
|
|
47423
|
+
} else if (method && import_protocol54.RequestSchema.safeParse(request.body).success) {
|
|
47423
47424
|
this.state.set("requestType", "message");
|
|
47424
47425
|
logger.verbose(`router: requestType=message, method=${method}`);
|
|
47425
47426
|
} else {
|
|
@@ -47949,10 +47950,10 @@ function classifyStreamableHttpRequest(params) {
|
|
|
47949
47950
|
if (typeof jsonRpcMethod === "string" && (jsonRpcMethod.startsWith("ui/") || jsonRpcMethod === "notifications/message")) {
|
|
47950
47951
|
return { requestType: "extApps" };
|
|
47951
47952
|
}
|
|
47952
|
-
if (
|
|
47953
|
+
if (import_protocol55.ElicitResultSchema.safeParse(body?.result).success) {
|
|
47953
47954
|
return { requestType: "elicitResult" };
|
|
47954
47955
|
}
|
|
47955
|
-
if (jsonRpcMethod &&
|
|
47956
|
+
if (jsonRpcMethod && import_protocol55.RequestSchema.safeParse(body).success) {
|
|
47956
47957
|
return { requestType: "message" };
|
|
47957
47958
|
}
|
|
47958
47959
|
return { error: "Invalid Request" };
|
|
@@ -48006,12 +48007,12 @@ async function lookupStreamableHttpTransport(params) {
|
|
|
48006
48007
|
}
|
|
48007
48008
|
return { kind: "session-not-initialized", recreationError };
|
|
48008
48009
|
}
|
|
48009
|
-
var import_lazy_zod79,
|
|
48010
|
+
var import_lazy_zod79, import_protocol55, plan25, stateSessionSchema2, stateSchema23, name25, Stage25, HandleStreamableHttpFlow;
|
|
48010
48011
|
var init_handle_streamable_http_flow = __esm({
|
|
48011
48012
|
"libs/sdk/src/transport/flows/handle.streamable-http.flow.ts"() {
|
|
48012
48013
|
"use strict";
|
|
48013
48014
|
import_lazy_zod79 = require("@frontmcp/lazy-zod");
|
|
48014
|
-
|
|
48015
|
+
import_protocol55 = require("@frontmcp/protocol");
|
|
48015
48016
|
init_session_id_utils();
|
|
48016
48017
|
init_common();
|
|
48017
48018
|
init_errors();
|
|
@@ -48436,7 +48437,7 @@ var init_handle_streamable_http_flow = __esm({
|
|
|
48436
48437
|
_skipUI: true
|
|
48437
48438
|
}
|
|
48438
48439
|
});
|
|
48439
|
-
const parsed =
|
|
48440
|
+
const parsed = import_protocol55.CallToolResultSchema.safeParse(result);
|
|
48440
48441
|
if (parsed.success) {
|
|
48441
48442
|
return parsed.data;
|
|
48442
48443
|
}
|
|
@@ -53643,20 +53644,20 @@ var init_execute_task_flag = __esm({
|
|
|
53643
53644
|
});
|
|
53644
53645
|
|
|
53645
53646
|
// libs/sdk/src/task/flows/tasks-get.flow.ts
|
|
53646
|
-
var import_lazy_zod80,
|
|
53647
|
+
var import_lazy_zod80, import_protocol56, inputSchema20, outputSchema19, stateSchema24, plan26, name26, Stage26, TasksGetFlow;
|
|
53647
53648
|
var init_tasks_get_flow = __esm({
|
|
53648
53649
|
"libs/sdk/src/task/flows/tasks-get.flow.ts"() {
|
|
53649
53650
|
"use strict";
|
|
53650
53651
|
import_lazy_zod80 = require("@frontmcp/lazy-zod");
|
|
53651
|
-
|
|
53652
|
+
import_protocol56 = require("@frontmcp/protocol");
|
|
53652
53653
|
init_common();
|
|
53653
53654
|
init_errors();
|
|
53654
53655
|
init_task_types();
|
|
53655
53656
|
inputSchema20 = import_lazy_zod80.z.object({
|
|
53656
|
-
request:
|
|
53657
|
+
request: import_protocol56.GetTaskRequestSchema,
|
|
53657
53658
|
ctx: import_lazy_zod80.z.any()
|
|
53658
53659
|
});
|
|
53659
|
-
outputSchema19 =
|
|
53660
|
+
outputSchema19 = import_protocol56.GetTaskResultSchema;
|
|
53660
53661
|
stateSchema24 = import_lazy_zod80.z.object({
|
|
53661
53662
|
taskId: import_lazy_zod80.z.string(),
|
|
53662
53663
|
sessionId: import_lazy_zod80.z.string(),
|
|
@@ -53719,20 +53720,20 @@ var init_tasks_get_flow = __esm({
|
|
|
53719
53720
|
});
|
|
53720
53721
|
|
|
53721
53722
|
// libs/sdk/src/task/flows/tasks-result.flow.ts
|
|
53722
|
-
var import_lazy_zod81,
|
|
53723
|
+
var import_lazy_zod81, import_protocol57, inputSchema21, outputSchema20, stateSchema25, plan27, name27, Stage27, TasksResultFlow, JsonRpcReplayError;
|
|
53723
53724
|
var init_tasks_result_flow = __esm({
|
|
53724
53725
|
"libs/sdk/src/task/flows/tasks-result.flow.ts"() {
|
|
53725
53726
|
"use strict";
|
|
53726
53727
|
import_lazy_zod81 = require("@frontmcp/lazy-zod");
|
|
53727
|
-
|
|
53728
|
+
import_protocol57 = require("@frontmcp/protocol");
|
|
53728
53729
|
init_common();
|
|
53729
53730
|
init_errors();
|
|
53730
53731
|
init_task_types();
|
|
53731
53732
|
inputSchema21 = import_lazy_zod81.z.object({
|
|
53732
|
-
request:
|
|
53733
|
+
request: import_protocol57.GetTaskPayloadRequestSchema,
|
|
53733
53734
|
ctx: import_lazy_zod81.z.any()
|
|
53734
53735
|
});
|
|
53735
|
-
outputSchema20 =
|
|
53736
|
+
outputSchema20 = import_protocol57.GetTaskPayloadResultSchema;
|
|
53736
53737
|
stateSchema25 = import_lazy_zod81.z.object({
|
|
53737
53738
|
taskId: import_lazy_zod81.z.string(),
|
|
53738
53739
|
sessionId: import_lazy_zod81.z.string(),
|
|
@@ -53895,20 +53896,20 @@ var init_tasks_result_flow = __esm({
|
|
|
53895
53896
|
});
|
|
53896
53897
|
|
|
53897
53898
|
// libs/sdk/src/task/flows/tasks-cancel.flow.ts
|
|
53898
|
-
var import_lazy_zod82,
|
|
53899
|
+
var import_lazy_zod82, import_protocol58, inputSchema22, outputSchema21, stateSchema26, plan28, name28, Stage28, TasksCancelFlow;
|
|
53899
53900
|
var init_tasks_cancel_flow = __esm({
|
|
53900
53901
|
"libs/sdk/src/task/flows/tasks-cancel.flow.ts"() {
|
|
53901
53902
|
"use strict";
|
|
53902
53903
|
import_lazy_zod82 = require("@frontmcp/lazy-zod");
|
|
53903
|
-
|
|
53904
|
+
import_protocol58 = require("@frontmcp/protocol");
|
|
53904
53905
|
init_common();
|
|
53905
53906
|
init_errors();
|
|
53906
53907
|
init_task_types();
|
|
53907
53908
|
inputSchema22 = import_lazy_zod82.z.object({
|
|
53908
|
-
request:
|
|
53909
|
+
request: import_protocol58.CancelTaskRequestSchema,
|
|
53909
53910
|
ctx: import_lazy_zod82.z.any()
|
|
53910
53911
|
});
|
|
53911
|
-
outputSchema21 =
|
|
53912
|
+
outputSchema21 = import_protocol58.CancelTaskResultSchema;
|
|
53912
53913
|
stateSchema26 = import_lazy_zod82.z.object({
|
|
53913
53914
|
taskId: import_lazy_zod82.z.string(),
|
|
53914
53915
|
sessionId: import_lazy_zod82.z.string(),
|
|
@@ -54005,20 +54006,20 @@ var init_tasks_cancel_flow = __esm({
|
|
|
54005
54006
|
});
|
|
54006
54007
|
|
|
54007
54008
|
// libs/sdk/src/task/flows/tasks-list.flow.ts
|
|
54008
|
-
var import_lazy_zod83,
|
|
54009
|
+
var import_lazy_zod83, import_protocol59, inputSchema23, outputSchema22, stateSchema27, plan29, name29, Stage29, TasksListFlow;
|
|
54009
54010
|
var init_tasks_list_flow = __esm({
|
|
54010
54011
|
"libs/sdk/src/task/flows/tasks-list.flow.ts"() {
|
|
54011
54012
|
"use strict";
|
|
54012
54013
|
import_lazy_zod83 = require("@frontmcp/lazy-zod");
|
|
54013
|
-
|
|
54014
|
+
import_protocol59 = require("@frontmcp/protocol");
|
|
54014
54015
|
init_common();
|
|
54015
54016
|
init_errors();
|
|
54016
54017
|
init_task_types();
|
|
54017
54018
|
inputSchema23 = import_lazy_zod83.z.object({
|
|
54018
|
-
request:
|
|
54019
|
+
request: import_protocol59.ListTasksRequestSchema,
|
|
54019
54020
|
ctx: import_lazy_zod83.z.any()
|
|
54020
54021
|
});
|
|
54021
|
-
outputSchema22 =
|
|
54022
|
+
outputSchema22 = import_protocol59.ListTasksResultSchema;
|
|
54022
54023
|
stateSchema27 = import_lazy_zod83.z.object({
|
|
54023
54024
|
sessionId: import_lazy_zod83.z.string(),
|
|
54024
54025
|
cursor: import_lazy_zod83.z.string().optional(),
|
|
@@ -71947,11 +71948,11 @@ function isAsyncIterable(stream) {
|
|
|
71947
71948
|
function internalError(id) {
|
|
71948
71949
|
return { jsonrpc: "2.0", id, error: { code: -32603, message: "Internal error" } };
|
|
71949
71950
|
}
|
|
71950
|
-
var
|
|
71951
|
+
var import_protocol60, EVENT_SEPARATOR, EVENT_DATA_FIELD, StdioRevisionRouter;
|
|
71951
71952
|
var init_stdio_revision_router = __esm({
|
|
71952
71953
|
"libs/sdk/src/transport/stdio-revision-router.ts"() {
|
|
71953
71954
|
"use strict";
|
|
71954
|
-
|
|
71955
|
+
import_protocol60 = require("@frontmcp/protocol");
|
|
71955
71956
|
init_common();
|
|
71956
71957
|
init_flow_error_output();
|
|
71957
71958
|
init_mcp_20260728();
|
|
@@ -71980,7 +71981,7 @@ var init_stdio_revision_router = __esm({
|
|
|
71980
71981
|
await this.inner.start();
|
|
71981
71982
|
}
|
|
71982
71983
|
async send(message, options) {
|
|
71983
|
-
if (this.era === "modern" && (0,
|
|
71984
|
+
if (this.era === "modern" && (0, import_protocol60.isJSONRPCNotification)(message)) return;
|
|
71984
71985
|
await this.inner.send(message, options);
|
|
71985
71986
|
}
|
|
71986
71987
|
async close() {
|
|
@@ -71989,12 +71990,12 @@ var init_stdio_revision_router = __esm({
|
|
|
71989
71990
|
}
|
|
71990
71991
|
route(message, extra) {
|
|
71991
71992
|
if (this.cancelsModernRequest(message)) return;
|
|
71992
|
-
if (((0,
|
|
71993
|
+
if (((0, import_protocol60.isJSONRPCRequest)(message) || (0, import_protocol60.isJSONRPCNotification)(message)) && this.servesModern(message)) {
|
|
71993
71994
|
if (this.era === "unknown") this.era = "modern";
|
|
71994
71995
|
void this.serveModern(message);
|
|
71995
71996
|
return;
|
|
71996
71997
|
}
|
|
71997
|
-
if ((0,
|
|
71998
|
+
if ((0, import_protocol60.isJSONRPCRequest)(message) && message.method === "initialize") this.era = "legacy";
|
|
71998
71999
|
this.onmessage?.(message, extra);
|
|
71999
72000
|
}
|
|
72000
72001
|
servesModern(message) {
|
|
@@ -72006,7 +72007,7 @@ var init_stdio_revision_router = __esm({
|
|
|
72006
72007
|
});
|
|
72007
72008
|
}
|
|
72008
72009
|
cancelsModernRequest(message) {
|
|
72009
|
-
if (!(0,
|
|
72010
|
+
if (!(0, import_protocol60.isJSONRPCNotification)(message) || message.method !== "notifications/cancelled") return false;
|
|
72010
72011
|
const requestId = message.params?.["requestId"];
|
|
72011
72012
|
if (typeof requestId !== "string" && typeof requestId !== "number") return false;
|
|
72012
72013
|
const controller = this.inFlight.get(requestId);
|
|
@@ -72016,7 +72017,7 @@ var init_stdio_revision_router = __esm({
|
|
|
72016
72017
|
return true;
|
|
72017
72018
|
}
|
|
72018
72019
|
async serveModern(message) {
|
|
72019
|
-
const id = (0,
|
|
72020
|
+
const id = (0, import_protocol60.isJSONRPCRequest)(message) ? message.id : void 0;
|
|
72020
72021
|
const controller = new AbortController();
|
|
72021
72022
|
if (id !== void 0) this.inFlight.set(id, controller);
|
|
72022
72023
|
try {
|
|
@@ -72058,7 +72059,7 @@ var init_stdio_revision_router = __esm({
|
|
|
72058
72059
|
}
|
|
72059
72060
|
if (signal.aborted) return;
|
|
72060
72061
|
const body = output?.kind === "json" ? output.body : void 0;
|
|
72061
|
-
const isReply = (0,
|
|
72062
|
+
const isReply = (0, import_protocol60.isJSONRPCResultResponse)(body) || (0, import_protocol60.isJSONRPCErrorResponse)(body);
|
|
72062
72063
|
await this.inner.send(isReply ? body : internalError(id));
|
|
72063
72064
|
}
|
|
72064
72065
|
cancelAll() {
|
|
@@ -72084,11 +72085,11 @@ function resolveConfigInput(optionsOrClass) {
|
|
|
72084
72085
|
}
|
|
72085
72086
|
return optionsOrClass;
|
|
72086
72087
|
}
|
|
72087
|
-
var
|
|
72088
|
+
var import_protocol61, import_utils136, stdioServing, FrontMcpInstance;
|
|
72088
72089
|
var init_front_mcp = __esm({
|
|
72089
72090
|
"libs/sdk/src/front-mcp/front-mcp.ts"() {
|
|
72090
72091
|
"use strict";
|
|
72091
|
-
|
|
72092
|
+
import_protocol61 = require("@frontmcp/protocol");
|
|
72092
72093
|
import_utils136 = require("@frontmcp/utils");
|
|
72093
72094
|
init_common();
|
|
72094
72095
|
init_direct();
|
|
@@ -72698,7 +72699,7 @@ var init_front_mcp = __esm({
|
|
|
72698
72699
|
},
|
|
72699
72700
|
serverInfo: scope.metadata.info
|
|
72700
72701
|
};
|
|
72701
|
-
const mcpServer = new
|
|
72702
|
+
const mcpServer = new import_protocol61.McpServer(scope.metadata.info, serverOptions);
|
|
72702
72703
|
startupCleanups.push(() => mcpServer.close());
|
|
72703
72704
|
const sessionId = `stdio:${(0, import_utils136.randomUUID)()}`;
|
|
72704
72705
|
const handlers = createMcpHandlers2({ scope, serverOptions, composeInstructions });
|
|
@@ -72716,7 +72717,7 @@ var init_front_mcp = __esm({
|
|
|
72716
72717
|
}
|
|
72717
72718
|
const { IpcServerTransport: IpcServerTransport2, isIpcStdioRequested: isIpcStdioRequested2 } = await Promise.resolve().then(() => (init_ipc_server_transport(), ipc_server_transport_exports));
|
|
72718
72719
|
const { StdioRevisionRouter: StdioRevisionRouter2 } = await Promise.resolve().then(() => (init_stdio_revision_router(), stdio_revision_router_exports));
|
|
72719
|
-
const stdioTransport = isIpcStdioRequested2() ? new IpcServerTransport2() : new
|
|
72720
|
+
const stdioTransport = isIpcStdioRequested2() ? new IpcServerTransport2() : new import_protocol61.StdioServerTransport();
|
|
72720
72721
|
const transport = new StdioRevisionRouter2(stdioTransport, { scope, principal: sessionId });
|
|
72721
72722
|
startupCleanups.push(() => transport.close());
|
|
72722
72723
|
await mcpServer.connect(transport);
|
|
@@ -74955,7 +74956,7 @@ __export(index_exports, {
|
|
|
74955
74956
|
OrchestratorJwksNotAvailableError: () => import_auth15.OrchestratorJwksNotAvailableError,
|
|
74956
74957
|
PLATFORM_CLIENT_INFO: () => PLATFORM_CLIENT_INFO,
|
|
74957
74958
|
PRIMITIVE_FILTER_KEYS: () => PRIMITIVE_FILTER_KEYS,
|
|
74958
|
-
PROTOCOL_2026_07_28: () =>
|
|
74959
|
+
PROTOCOL_2026_07_28: () => import_protocol62.PROTOCOL_2026_07_28,
|
|
74959
74960
|
PROTOCOL_PRESETS: () => PROTOCOL_PRESETS,
|
|
74960
74961
|
PayloadTooLargeError: () => PayloadTooLargeError,
|
|
74961
74962
|
Plugin: () => FrontMcpPlugin,
|
|
@@ -76325,7 +76326,7 @@ init_mcp_20260728();
|
|
|
76325
76326
|
init_mcp_20260728();
|
|
76326
76327
|
init_mcp_20260728();
|
|
76327
76328
|
init_mcp_stateless_client_adapter();
|
|
76328
|
-
var
|
|
76329
|
+
var import_protocol62 = require("@frontmcp/protocol");
|
|
76329
76330
|
init_web_standard_mcp();
|
|
76330
76331
|
init_transport_types();
|
|
76331
76332
|
init_ext_apps2();
|