@frontmcp/sdk 1.10.12 → 1.10.14
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/index.cjs +872 -841
- package/browser/prompt/flows/get-prompt.flow.mjs +8 -2
- package/browser/resource/flows/read-resource.flow.mjs +7 -1
- package/browser/transport/mcp-20260728/dispatcher.mjs +16 -0
- package/browser/transport/mcp-handlers/initialize-request.handler.mjs +8 -5
- package/esm/index.mjs +19 -19
- package/index.js +18 -18
- package/package.json +10 -10
- package/prompt/flows/get-prompt.flow.d.ts +1 -0
- package/prompt/flows/get-prompt.flow.d.ts.map +1 -1
- package/resource/flows/read-resource.flow.d.ts +1 -0
- package/resource/flows/read-resource.flow.d.ts.map +1 -1
- package/transport/mcp-20260728/dispatcher.d.ts.map +1 -1
- package/transport/mcp-handlers/initialize-request.handler.d.ts.map +1 -1
package/browser/index.cjs
CHANGED
|
@@ -10135,6 +10135,7 @@ function initializeRequestHandler({
|
|
|
10135
10135
|
request.params.capabilities?.elicitation ? { elicitation: request.params.capabilities.elicitation } : void 0
|
|
10136
10136
|
);
|
|
10137
10137
|
if (sessionId) {
|
|
10138
|
+
const hasRegisteredServer = scope.notifications.getRegisteredServer(sessionId) !== void 0;
|
|
10138
10139
|
if (request.params.capabilities) {
|
|
10139
10140
|
const clientCapabilities = {
|
|
10140
10141
|
roots: request.params.capabilities.roots,
|
|
@@ -10146,7 +10147,7 @@ function initializeRequestHandler({
|
|
|
10146
10147
|
// Include elicitation capability for interactive user input support
|
|
10147
10148
|
elicitation: request.params.capabilities.elicitation
|
|
10148
10149
|
};
|
|
10149
|
-
scope.notifications.setClientCapabilities(sessionId, clientCapabilities);
|
|
10150
|
+
if (hasRegisteredServer) scope.notifications.setClientCapabilities(sessionId, clientCapabilities);
|
|
10150
10151
|
await scope.transportService?.updateStoredSessionCapabilities(
|
|
10151
10152
|
sessionId,
|
|
10152
10153
|
clientCapabilities
|
|
@@ -10155,10 +10156,12 @@ function initializeRequestHandler({
|
|
|
10155
10156
|
}
|
|
10156
10157
|
if (request.params.clientInfo) {
|
|
10157
10158
|
const { name: clientName, version: clientVersion } = request.params.clientInfo;
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
|
|
10161
|
-
|
|
10159
|
+
if (hasRegisteredServer) {
|
|
10160
|
+
scope.notifications.setClientInfo(sessionId, {
|
|
10161
|
+
name: clientName,
|
|
10162
|
+
version: clientVersion
|
|
10163
|
+
});
|
|
10164
|
+
}
|
|
10162
10165
|
const finalPlatform = resolvePlatformType(
|
|
10163
10166
|
request.params.clientInfo,
|
|
10164
10167
|
request.params.capabilities,
|
|
@@ -16006,7 +16009,9 @@ var init_get_prompt_flow = __esm({
|
|
|
16006
16009
|
promptContext: import_lazy_zod49.z.any(),
|
|
16007
16010
|
// z.any() used because prompt output type varies by prompt implementation
|
|
16008
16011
|
rawOutput: import_lazy_zod49.z.any().optional(),
|
|
16009
|
-
output: outputSchema2
|
|
16012
|
+
output: outputSchema2,
|
|
16013
|
+
// Why the flow failed, set by the flow runner before the finalize stage
|
|
16014
|
+
flowError: import_lazy_zod49.z.instanceof(Error).optional()
|
|
16010
16015
|
});
|
|
16011
16016
|
plan2 = {
|
|
16012
16017
|
pre: [
|
|
@@ -16232,7 +16237,11 @@ var init_get_prompt_flow = __esm({
|
|
|
16232
16237
|
}
|
|
16233
16238
|
async finalize() {
|
|
16234
16239
|
this.logger.verbose("finalize:start");
|
|
16235
|
-
const { prompt, rawOutput, input } = this.state;
|
|
16240
|
+
const { prompt, rawOutput, input, flowError } = this.state;
|
|
16241
|
+
if (flowError) {
|
|
16242
|
+
this.logger.verbose("finalize: skipping, an earlier stage failed");
|
|
16243
|
+
return;
|
|
16244
|
+
}
|
|
16236
16245
|
if (!prompt) {
|
|
16237
16246
|
this.logger.error("finalize: prompt not found in state");
|
|
16238
16247
|
throw new PromptExecutionError("unknown", new Error("Prompt not found in state"));
|
|
@@ -19304,6 +19313,14 @@ function methodOfSchema(schema) {
|
|
|
19304
19313
|
const values = method?._def?.values;
|
|
19305
19314
|
return Array.isArray(values) && typeof values[0] === "string" ? values[0] : void 0;
|
|
19306
19315
|
}
|
|
19316
|
+
function describeInvalidParams(schema, body) {
|
|
19317
|
+
const issues = [schema.safeParse(body), MRTR_PARAMS_SCHEMA.safeParse(body)].flatMap(
|
|
19318
|
+
(parsed) => parsed.success ? [] : parsed.error.issues
|
|
19319
|
+
);
|
|
19320
|
+
if (issues.length === 0) return void 0;
|
|
19321
|
+
const problems = issues.map((issue) => `${issue.path.join(".")}: ${issue.message}`);
|
|
19322
|
+
return `Invalid params: ${problems.join("; ")}`;
|
|
19323
|
+
}
|
|
19307
19324
|
function toJsonRpcError(error) {
|
|
19308
19325
|
if (error instanceof MissingClientCapabilityError) {
|
|
19309
19326
|
return {
|
|
@@ -19402,6 +19419,10 @@ async function dispatch20260728(options) {
|
|
|
19402
19419
|
if (!handler) {
|
|
19403
19420
|
return { kind: "error", status: 404, error: { code: -32601, message: `Method not found: ${method}` } };
|
|
19404
19421
|
}
|
|
19422
|
+
const invalidParams = describeInvalidParams(handler.requestSchema, body);
|
|
19423
|
+
if (invalidParams) {
|
|
19424
|
+
return { kind: "error", status: 200, error: { code: -32602, message: invalidParams } };
|
|
19425
|
+
}
|
|
19405
19426
|
const binding = {
|
|
19406
19427
|
principal: resolvePrincipal(authInfo),
|
|
19407
19428
|
binding: computeRequestBinding(method, params)
|
|
@@ -19462,11 +19483,12 @@ async function dispatch20260728(options) {
|
|
|
19462
19483
|
return { kind: "error", status: mapped.status, error: mapped.error };
|
|
19463
19484
|
}
|
|
19464
19485
|
}
|
|
19465
|
-
var import_auth25, import_protocol38, import_utils50, MRTR_CAPABLE_METHODS;
|
|
19486
|
+
var import_auth25, import_lazy_zod54, import_protocol38, import_utils50, MRTR_CAPABLE_METHODS, MRTR_PARAMS_SCHEMA;
|
|
19466
19487
|
var init_dispatcher = __esm({
|
|
19467
19488
|
"libs/sdk/src/transport/mcp-20260728/dispatcher.ts"() {
|
|
19468
19489
|
"use strict";
|
|
19469
19490
|
import_auth25 = require("@frontmcp/auth");
|
|
19491
|
+
import_lazy_zod54 = require("@frontmcp/lazy-zod");
|
|
19470
19492
|
import_protocol38 = require("@frontmcp/protocol");
|
|
19471
19493
|
import_utils50 = require("@frontmcp/utils");
|
|
19472
19494
|
init_errors();
|
|
@@ -19479,6 +19501,9 @@ var init_dispatcher = __esm({
|
|
|
19479
19501
|
init_result_decorator();
|
|
19480
19502
|
init_tasks_extension();
|
|
19481
19503
|
MRTR_CAPABLE_METHODS = ["tools/call", "prompts/get", "resources/read"];
|
|
19504
|
+
MRTR_PARAMS_SCHEMA = import_lazy_zod54.z.object({
|
|
19505
|
+
params: import_lazy_zod54.z.object({ inputResponses: import_lazy_zod54.z.record(import_lazy_zod54.z.string(), import_lazy_zod54.z.record(import_lazy_zod54.z.string(), import_lazy_zod54.z.unknown())).optional() }).optional()
|
|
19506
|
+
});
|
|
19482
19507
|
}
|
|
19483
19508
|
});
|
|
19484
19509
|
|
|
@@ -22237,12 +22262,12 @@ var init_ui_resource_handler = __esm({
|
|
|
22237
22262
|
});
|
|
22238
22263
|
|
|
22239
22264
|
// libs/sdk/src/resource/flows/read-resource.flow.ts
|
|
22240
|
-
var import_auth27,
|
|
22265
|
+
var import_auth27, import_lazy_zod55, import_protocol40, import_utils55, inputSchema4, outputSchema4, stateSchema4, plan4, name4, resourceClassHooksJoin, Stage4, resolvedResources, ReadResourceFlow;
|
|
22241
22266
|
var init_read_resource_flow = __esm({
|
|
22242
22267
|
"libs/sdk/src/resource/flows/read-resource.flow.ts"() {
|
|
22243
22268
|
"use strict";
|
|
22244
22269
|
import_auth27 = require("@frontmcp/auth");
|
|
22245
|
-
|
|
22270
|
+
import_lazy_zod55 = require("@frontmcp/lazy-zod");
|
|
22246
22271
|
import_protocol40 = require("@frontmcp/protocol");
|
|
22247
22272
|
import_utils55 = require("@frontmcp/utils");
|
|
22248
22273
|
init_remote_capabilities_utils();
|
|
@@ -22255,35 +22280,37 @@ var init_read_resource_flow = __esm({
|
|
|
22255
22280
|
init_flow_context_providers();
|
|
22256
22281
|
init_ui_shared();
|
|
22257
22282
|
init_lineage_utils();
|
|
22258
|
-
inputSchema4 =
|
|
22283
|
+
inputSchema4 = import_lazy_zod55.z.object({
|
|
22259
22284
|
request: import_protocol40.ReadResourceRequestSchema,
|
|
22260
22285
|
// z.any() used because ctx is the MCP SDK's ResourceReadExtra type which varies by SDK version
|
|
22261
|
-
ctx:
|
|
22286
|
+
ctx: import_lazy_zod55.z.any()
|
|
22262
22287
|
});
|
|
22263
22288
|
outputSchema4 = import_protocol40.ReadResourceResultSchema;
|
|
22264
|
-
stateSchema4 =
|
|
22265
|
-
input:
|
|
22266
|
-
uri:
|
|
22289
|
+
stateSchema4 = import_lazy_zod55.z.object({
|
|
22290
|
+
input: import_lazy_zod55.z.object({
|
|
22291
|
+
uri: import_lazy_zod55.z.string().min(1)
|
|
22267
22292
|
}),
|
|
22268
22293
|
// z.any() used because AuthInfo is a complex external type from @frontmcp/protocol
|
|
22269
|
-
authInfo:
|
|
22270
|
-
params:
|
|
22294
|
+
authInfo: import_lazy_zod55.z.any().optional(),
|
|
22295
|
+
params: import_lazy_zod55.z.record(import_lazy_zod55.z.string(), import_lazy_zod55.z.string()).default({}),
|
|
22271
22296
|
// URI template parameters
|
|
22272
22297
|
// z.any() used because ResourceEntry is a complex abstract class type
|
|
22273
|
-
resource:
|
|
22298
|
+
resource: import_lazy_zod55.z.any(),
|
|
22274
22299
|
// z.any() used because ResourceContext is a complex abstract class type
|
|
22275
|
-
resourceContext:
|
|
22300
|
+
resourceContext: import_lazy_zod55.z.any(),
|
|
22276
22301
|
// z.any() used because resource output type varies by resource implementation
|
|
22277
|
-
rawOutput:
|
|
22302
|
+
rawOutput: import_lazy_zod55.z.any().optional(),
|
|
22278
22303
|
output: outputSchema4,
|
|
22279
22304
|
// Resource owner ID for hook filtering (stored in state instead of mutating rawInput)
|
|
22280
|
-
resourceOwnerId:
|
|
22305
|
+
resourceOwnerId: import_lazy_zod55.z.string().optional(),
|
|
22281
22306
|
// Session ID for platform type detection
|
|
22282
|
-
sessionId:
|
|
22307
|
+
sessionId: import_lazy_zod55.z.string().optional(),
|
|
22283
22308
|
// Flag indicating this is a UI resource (ui:// scheme)
|
|
22284
|
-
isUIResource:
|
|
22309
|
+
isUIResource: import_lazy_zod55.z.boolean().default(false),
|
|
22285
22310
|
// Pre-resolved UI resource result (if isUIResource is true)
|
|
22286
|
-
uiResourceResult: outputSchema4.optional()
|
|
22311
|
+
uiResourceResult: outputSchema4.optional(),
|
|
22312
|
+
// Why the flow failed, set by the flow runner before the finalize stage
|
|
22313
|
+
flowError: import_lazy_zod55.z.instanceof(Error).optional()
|
|
22287
22314
|
});
|
|
22288
22315
|
plan4 = {
|
|
22289
22316
|
pre: ["parseInput", "ensureRemoteCapabilities", "findResource", "checkEntryAuthorities", "createResourceContext"],
|
|
@@ -22325,7 +22352,7 @@ var init_read_resource_flow = __esm({
|
|
|
22325
22352
|
params = inputData.request.params;
|
|
22326
22353
|
ctx = inputData.ctx;
|
|
22327
22354
|
} catch (e) {
|
|
22328
|
-
throw new InvalidInputError("Invalid Input", e instanceof
|
|
22355
|
+
throw new InvalidInputError("Invalid Input", e instanceof import_lazy_zod55.z.ZodError ? e.issues : void 0);
|
|
22329
22356
|
}
|
|
22330
22357
|
if (method !== "resources/read") {
|
|
22331
22358
|
this.logger.warn(`parseInput: invalid method "${method}"`);
|
|
@@ -22531,6 +22558,10 @@ var init_read_resource_flow = __esm({
|
|
|
22531
22558
|
}
|
|
22532
22559
|
async finalize() {
|
|
22533
22560
|
this.logger.verbose("finalize:start");
|
|
22561
|
+
if (this.state.flowError) {
|
|
22562
|
+
this.logger.verbose("finalize: skipping, an earlier stage failed");
|
|
22563
|
+
return;
|
|
22564
|
+
}
|
|
22534
22565
|
if (this.state.isUIResource) {
|
|
22535
22566
|
const { uiResourceResult, input: input2 } = this.state;
|
|
22536
22567
|
if (!uiResourceResult) {
|
|
@@ -22599,34 +22630,34 @@ var init_read_resource_flow = __esm({
|
|
|
22599
22630
|
});
|
|
22600
22631
|
|
|
22601
22632
|
// libs/sdk/src/resource/flows/resource-templates-list.flow.ts
|
|
22602
|
-
var import_reflect_metadata7,
|
|
22633
|
+
var import_reflect_metadata7, import_lazy_zod56, import_protocol41, inputSchema5, outputSchema5, stateSchema5, plan5, name5, Stage5, ResourceTemplatesListFlow;
|
|
22603
22634
|
var init_resource_templates_list_flow = __esm({
|
|
22604
22635
|
"libs/sdk/src/resource/flows/resource-templates-list.flow.ts"() {
|
|
22605
22636
|
"use strict";
|
|
22606
22637
|
init_common();
|
|
22607
22638
|
import_reflect_metadata7 = require("reflect-metadata");
|
|
22608
|
-
|
|
22639
|
+
import_lazy_zod56 = require("@frontmcp/lazy-zod");
|
|
22609
22640
|
import_protocol41 = require("@frontmcp/protocol");
|
|
22610
22641
|
init_availability();
|
|
22611
22642
|
init_errors();
|
|
22612
|
-
inputSchema5 =
|
|
22643
|
+
inputSchema5 = import_lazy_zod56.z.object({
|
|
22613
22644
|
request: import_protocol41.ListResourceTemplatesRequestSchema,
|
|
22614
|
-
ctx:
|
|
22645
|
+
ctx: import_lazy_zod56.z.unknown()
|
|
22615
22646
|
});
|
|
22616
22647
|
outputSchema5 = import_protocol41.ListResourceTemplatesResultSchema;
|
|
22617
|
-
stateSchema5 =
|
|
22618
|
-
cursor:
|
|
22619
|
-
templates:
|
|
22620
|
-
|
|
22621
|
-
ownerName:
|
|
22622
|
-
template:
|
|
22648
|
+
stateSchema5 = import_lazy_zod56.z.object({
|
|
22649
|
+
cursor: import_lazy_zod56.z.string().optional(),
|
|
22650
|
+
templates: import_lazy_zod56.z.array(
|
|
22651
|
+
import_lazy_zod56.z.object({
|
|
22652
|
+
ownerName: import_lazy_zod56.z.string(),
|
|
22653
|
+
template: import_lazy_zod56.z.instanceof(ResourceEntry)
|
|
22623
22654
|
})
|
|
22624
22655
|
),
|
|
22625
|
-
resolvedTemplates:
|
|
22626
|
-
|
|
22627
|
-
ownerName:
|
|
22628
|
-
template:
|
|
22629
|
-
finalName:
|
|
22656
|
+
resolvedTemplates: import_lazy_zod56.z.array(
|
|
22657
|
+
import_lazy_zod56.z.object({
|
|
22658
|
+
ownerName: import_lazy_zod56.z.string(),
|
|
22659
|
+
template: import_lazy_zod56.z.instanceof(ResourceEntry),
|
|
22660
|
+
finalName: import_lazy_zod56.z.string()
|
|
22630
22661
|
})
|
|
22631
22662
|
)
|
|
22632
22663
|
});
|
|
@@ -22651,7 +22682,7 @@ var init_resource_templates_list_flow = __esm({
|
|
|
22651
22682
|
method = inputData.request.method;
|
|
22652
22683
|
params = inputData.request.params;
|
|
22653
22684
|
} catch (e) {
|
|
22654
|
-
throw new InvalidInputError("Invalid request format", e instanceof
|
|
22685
|
+
throw new InvalidInputError("Invalid request format", e instanceof import_lazy_zod56.z.ZodError ? e.issues : void 0);
|
|
22655
22686
|
}
|
|
22656
22687
|
if (method !== "resources/templates/list") {
|
|
22657
22688
|
this.logger.warn(`parseInput: invalid method "${method}"`);
|
|
@@ -22837,34 +22868,34 @@ var init_resource_templates_list_flow = __esm({
|
|
|
22837
22868
|
});
|
|
22838
22869
|
|
|
22839
22870
|
// libs/sdk/src/resource/flows/resources-list.flow.ts
|
|
22840
|
-
var import_reflect_metadata8,
|
|
22871
|
+
var import_reflect_metadata8, import_lazy_zod57, import_protocol42, inputSchema6, outputSchema6, stateSchema6, plan6, name6, Stage6, ResourcesListFlow;
|
|
22841
22872
|
var init_resources_list_flow = __esm({
|
|
22842
22873
|
"libs/sdk/src/resource/flows/resources-list.flow.ts"() {
|
|
22843
22874
|
"use strict";
|
|
22844
22875
|
init_common();
|
|
22845
22876
|
import_reflect_metadata8 = require("reflect-metadata");
|
|
22846
|
-
|
|
22877
|
+
import_lazy_zod57 = require("@frontmcp/lazy-zod");
|
|
22847
22878
|
import_protocol42 = require("@frontmcp/protocol");
|
|
22848
22879
|
init_availability();
|
|
22849
22880
|
init_errors();
|
|
22850
|
-
inputSchema6 =
|
|
22881
|
+
inputSchema6 = import_lazy_zod57.z.object({
|
|
22851
22882
|
request: import_protocol42.ListResourcesRequestSchema,
|
|
22852
|
-
ctx:
|
|
22883
|
+
ctx: import_lazy_zod57.z.unknown()
|
|
22853
22884
|
});
|
|
22854
22885
|
outputSchema6 = import_protocol42.ListResourcesResultSchema;
|
|
22855
|
-
stateSchema6 =
|
|
22856
|
-
cursor:
|
|
22857
|
-
resources:
|
|
22858
|
-
|
|
22859
|
-
ownerName:
|
|
22860
|
-
resource:
|
|
22886
|
+
stateSchema6 = import_lazy_zod57.z.object({
|
|
22887
|
+
cursor: import_lazy_zod57.z.string().optional(),
|
|
22888
|
+
resources: import_lazy_zod57.z.array(
|
|
22889
|
+
import_lazy_zod57.z.object({
|
|
22890
|
+
ownerName: import_lazy_zod57.z.string(),
|
|
22891
|
+
resource: import_lazy_zod57.z.instanceof(ResourceEntry)
|
|
22861
22892
|
})
|
|
22862
22893
|
),
|
|
22863
|
-
resolvedResources:
|
|
22864
|
-
|
|
22865
|
-
ownerName:
|
|
22866
|
-
resource:
|
|
22867
|
-
finalName:
|
|
22894
|
+
resolvedResources: import_lazy_zod57.z.array(
|
|
22895
|
+
import_lazy_zod57.z.object({
|
|
22896
|
+
ownerName: import_lazy_zod57.z.string(),
|
|
22897
|
+
resource: import_lazy_zod57.z.instanceof(ResourceEntry),
|
|
22898
|
+
finalName: import_lazy_zod57.z.string()
|
|
22868
22899
|
})
|
|
22869
22900
|
)
|
|
22870
22901
|
});
|
|
@@ -22889,7 +22920,7 @@ var init_resources_list_flow = __esm({
|
|
|
22889
22920
|
method = inputData.request.method;
|
|
22890
22921
|
params = inputData.request.params;
|
|
22891
22922
|
} catch (e) {
|
|
22892
|
-
throw new InvalidInputError("Invalid request format", e instanceof
|
|
22923
|
+
throw new InvalidInputError("Invalid request format", e instanceof import_lazy_zod57.z.ZodError ? e.issues : void 0);
|
|
22893
22924
|
}
|
|
22894
22925
|
if (method !== "resources/list") {
|
|
22895
22926
|
this.logger.warn(`parseInput: invalid method "${method}"`);
|
|
@@ -23096,11 +23127,11 @@ var init_resources_list_flow = __esm({
|
|
|
23096
23127
|
});
|
|
23097
23128
|
|
|
23098
23129
|
// libs/sdk/src/resource/flows/subscribe-resource.flow.ts
|
|
23099
|
-
var
|
|
23130
|
+
var import_lazy_zod58, import_protocol43, inputSchema7, outputSchema7, stateSchema7, plan7, name7, Stage7, SubscribeResourceFlow;
|
|
23100
23131
|
var init_subscribe_resource_flow = __esm({
|
|
23101
23132
|
"libs/sdk/src/resource/flows/subscribe-resource.flow.ts"() {
|
|
23102
23133
|
"use strict";
|
|
23103
|
-
|
|
23134
|
+
import_lazy_zod58 = require("@frontmcp/lazy-zod");
|
|
23104
23135
|
import_protocol43 = require("@frontmcp/protocol");
|
|
23105
23136
|
init_remote_capabilities_utils();
|
|
23106
23137
|
init_common();
|
|
@@ -23108,16 +23139,16 @@ var init_subscribe_resource_flow = __esm({
|
|
|
23108
23139
|
init_errors();
|
|
23109
23140
|
init_ui_shared();
|
|
23110
23141
|
init_mcp_surface();
|
|
23111
|
-
inputSchema7 =
|
|
23142
|
+
inputSchema7 = import_lazy_zod58.z.object({
|
|
23112
23143
|
request: import_protocol43.SubscribeRequestSchema,
|
|
23113
|
-
ctx:
|
|
23144
|
+
ctx: import_lazy_zod58.z.unknown()
|
|
23114
23145
|
});
|
|
23115
23146
|
outputSchema7 = import_protocol43.EmptyResultSchema;
|
|
23116
|
-
stateSchema7 =
|
|
23117
|
-
input:
|
|
23118
|
-
uri:
|
|
23147
|
+
stateSchema7 = import_lazy_zod58.z.object({
|
|
23148
|
+
input: import_lazy_zod58.z.object({
|
|
23149
|
+
uri: import_lazy_zod58.z.string().min(1)
|
|
23119
23150
|
}),
|
|
23120
|
-
sessionId:
|
|
23151
|
+
sessionId: import_lazy_zod58.z.string().optional(),
|
|
23121
23152
|
output: outputSchema7
|
|
23122
23153
|
});
|
|
23123
23154
|
plan7 = {
|
|
@@ -23140,7 +23171,7 @@ var init_subscribe_resource_flow = __esm({
|
|
|
23140
23171
|
params = inputData.request.params;
|
|
23141
23172
|
ctx = inputData.ctx;
|
|
23142
23173
|
} catch (e) {
|
|
23143
|
-
throw new InvalidInputError("Invalid Input", e instanceof
|
|
23174
|
+
throw new InvalidInputError("Invalid Input", e instanceof import_lazy_zod58.z.ZodError ? e.issues : void 0);
|
|
23144
23175
|
}
|
|
23145
23176
|
if (method !== "resources/subscribe") {
|
|
23146
23177
|
this.logger.warn(`parseInput: invalid method "${method}"`);
|
|
@@ -23221,25 +23252,25 @@ var init_subscribe_resource_flow = __esm({
|
|
|
23221
23252
|
});
|
|
23222
23253
|
|
|
23223
23254
|
// libs/sdk/src/resource/flows/unsubscribe-resource.flow.ts
|
|
23224
|
-
var
|
|
23255
|
+
var import_lazy_zod59, import_protocol44, inputSchema8, outputSchema8, stateSchema8, plan8, name8, Stage8, UnsubscribeResourceFlow;
|
|
23225
23256
|
var init_unsubscribe_resource_flow = __esm({
|
|
23226
23257
|
"libs/sdk/src/resource/flows/unsubscribe-resource.flow.ts"() {
|
|
23227
23258
|
"use strict";
|
|
23228
|
-
|
|
23259
|
+
import_lazy_zod59 = require("@frontmcp/lazy-zod");
|
|
23229
23260
|
import_protocol44 = require("@frontmcp/protocol");
|
|
23230
23261
|
init_common();
|
|
23231
23262
|
init_errors();
|
|
23232
23263
|
init_mcp_surface();
|
|
23233
|
-
inputSchema8 =
|
|
23264
|
+
inputSchema8 = import_lazy_zod59.z.object({
|
|
23234
23265
|
request: import_protocol44.UnsubscribeRequestSchema,
|
|
23235
|
-
ctx:
|
|
23266
|
+
ctx: import_lazy_zod59.z.unknown()
|
|
23236
23267
|
});
|
|
23237
23268
|
outputSchema8 = import_protocol44.EmptyResultSchema;
|
|
23238
|
-
stateSchema8 =
|
|
23239
|
-
input:
|
|
23240
|
-
uri:
|
|
23269
|
+
stateSchema8 = import_lazy_zod59.z.object({
|
|
23270
|
+
input: import_lazy_zod59.z.object({
|
|
23271
|
+
uri: import_lazy_zod59.z.string().min(1)
|
|
23241
23272
|
}),
|
|
23242
|
-
sessionId:
|
|
23273
|
+
sessionId: import_lazy_zod59.z.string().optional(),
|
|
23243
23274
|
output: outputSchema8
|
|
23244
23275
|
});
|
|
23245
23276
|
plan8 = {
|
|
@@ -23262,7 +23293,7 @@ var init_unsubscribe_resource_flow = __esm({
|
|
|
23262
23293
|
params = inputData.request.params;
|
|
23263
23294
|
ctx = inputData.ctx;
|
|
23264
23295
|
} catch (e) {
|
|
23265
|
-
throw new InvalidInputError("Invalid Input", e instanceof
|
|
23296
|
+
throw new InvalidInputError("Invalid Input", e instanceof import_lazy_zod59.z.ZodError ? e.issues : void 0);
|
|
23266
23297
|
}
|
|
23267
23298
|
if (method !== "resources/unsubscribe") {
|
|
23268
23299
|
this.logger.warn(`parseInput: invalid method "${method}"`);
|
|
@@ -24239,13 +24270,13 @@ var init_send_elicitation_result_utils = __esm({
|
|
|
24239
24270
|
});
|
|
24240
24271
|
|
|
24241
24272
|
// libs/sdk/src/tool/flows/tools-list.flow.ts
|
|
24242
|
-
var import_reflect_metadata9,
|
|
24273
|
+
var import_reflect_metadata9, import_lazy_zod60, import_protocol45, import_types2, import_utils58, inputSchema9, outputSchema9, stateSchema9, plan9, name9, Stage9, ToolsListFlow;
|
|
24243
24274
|
var init_tools_list_flow = __esm({
|
|
24244
24275
|
"libs/sdk/src/tool/flows/tools-list.flow.ts"() {
|
|
24245
24276
|
"use strict";
|
|
24246
24277
|
init_common();
|
|
24247
24278
|
import_reflect_metadata9 = require("reflect-metadata");
|
|
24248
|
-
|
|
24279
|
+
import_lazy_zod60 = require("@frontmcp/lazy-zod");
|
|
24249
24280
|
import_protocol45 = require("@frontmcp/protocol");
|
|
24250
24281
|
import_types2 = require("@frontmcp/uipack/types");
|
|
24251
24282
|
import_utils58 = require("@frontmcp/utils");
|
|
@@ -24255,35 +24286,35 @@ var init_tools_list_flow = __esm({
|
|
|
24255
24286
|
init_errors();
|
|
24256
24287
|
init_skill_mode_utils();
|
|
24257
24288
|
init_ui_shared();
|
|
24258
|
-
inputSchema9 =
|
|
24289
|
+
inputSchema9 = import_lazy_zod60.z.object({
|
|
24259
24290
|
request: import_protocol45.ListToolsRequestSchema,
|
|
24260
|
-
ctx:
|
|
24291
|
+
ctx: import_lazy_zod60.z.unknown()
|
|
24261
24292
|
});
|
|
24262
24293
|
outputSchema9 = import_protocol45.ListToolsResultSchema;
|
|
24263
|
-
stateSchema9 =
|
|
24264
|
-
cursor:
|
|
24294
|
+
stateSchema9 = import_lazy_zod60.z.object({
|
|
24295
|
+
cursor: import_lazy_zod60.z.string().optional(),
|
|
24265
24296
|
// z.any() used because AuthInfo is an external type from @frontmcp/protocol that varies by SDK version
|
|
24266
24297
|
// Non-optional for 'authorized' flows - transport layer ensures authInfo is always present
|
|
24267
|
-
authInfo:
|
|
24268
|
-
platformType:
|
|
24269
|
-
tools:
|
|
24270
|
-
|
|
24271
|
-
appName:
|
|
24272
|
-
tool:
|
|
24298
|
+
authInfo: import_lazy_zod60.z.any(),
|
|
24299
|
+
platformType: import_lazy_zod60.z.string().optional(),
|
|
24300
|
+
tools: import_lazy_zod60.z.array(
|
|
24301
|
+
import_lazy_zod60.z.object({
|
|
24302
|
+
appName: import_lazy_zod60.z.string(),
|
|
24303
|
+
tool: import_lazy_zod60.z.instanceof(ToolEntry)
|
|
24273
24304
|
})
|
|
24274
24305
|
),
|
|
24275
24306
|
/** Every tool `findTools` collected, before any filter: names that collide here stay qualified. */
|
|
24276
|
-
foundTools:
|
|
24277
|
-
|
|
24278
|
-
appName:
|
|
24279
|
-
tool:
|
|
24307
|
+
foundTools: import_lazy_zod60.z.array(
|
|
24308
|
+
import_lazy_zod60.z.object({
|
|
24309
|
+
appName: import_lazy_zod60.z.string(),
|
|
24310
|
+
tool: import_lazy_zod60.z.instanceof(ToolEntry)
|
|
24280
24311
|
})
|
|
24281
24312
|
).optional(),
|
|
24282
|
-
resolvedTools:
|
|
24283
|
-
|
|
24284
|
-
appName:
|
|
24285
|
-
tool:
|
|
24286
|
-
finalName:
|
|
24313
|
+
resolvedTools: import_lazy_zod60.z.array(
|
|
24314
|
+
import_lazy_zod60.z.object({
|
|
24315
|
+
appName: import_lazy_zod60.z.string(),
|
|
24316
|
+
tool: import_lazy_zod60.z.instanceof(ToolEntry),
|
|
24317
|
+
finalName: import_lazy_zod60.z.string()
|
|
24287
24318
|
})
|
|
24288
24319
|
)
|
|
24289
24320
|
});
|
|
@@ -24358,7 +24389,7 @@ var init_tools_list_flow = __esm({
|
|
|
24358
24389
|
params = inputData.request.params;
|
|
24359
24390
|
ctx = inputData.ctx;
|
|
24360
24391
|
} catch (e) {
|
|
24361
|
-
throw new InvalidInputError("Invalid request format", e instanceof
|
|
24392
|
+
throw new InvalidInputError("Invalid request format", e instanceof import_lazy_zod60.z.ZodError ? e.issues : void 0);
|
|
24362
24393
|
}
|
|
24363
24394
|
if (method !== "tools/list") {
|
|
24364
24395
|
this.logger.warn(`parseInput: invalid method "${method}"`);
|
|
@@ -28162,11 +28193,11 @@ function describeBinary(uri, mimeType, base64) {
|
|
|
28162
28193
|
const bytes = Math.max(0, Math.floor(base64.length * 3 / 4) - padding);
|
|
28163
28194
|
return `[binary content omitted: ${uri} (${mimeType ?? "application/octet-stream"}, ${bytes} bytes)]`;
|
|
28164
28195
|
}
|
|
28165
|
-
var
|
|
28196
|
+
var import_lazy_zod61, AGENT_SURFACE, AGENT_BUILTIN_TOOL_NAMES, EMPTY_PARAMETERS, AGENT_BUILTIN_TOOL_DEFINITIONS, readResourceArgsSchema, getPromptArgsSchema;
|
|
28166
28197
|
var init_agent_builtin_tools = __esm({
|
|
28167
28198
|
"libs/sdk/src/agent/agent-builtin-tools.ts"() {
|
|
28168
28199
|
"use strict";
|
|
28169
|
-
|
|
28200
|
+
import_lazy_zod61 = require("@frontmcp/lazy-zod");
|
|
28170
28201
|
init_availability();
|
|
28171
28202
|
init_errors();
|
|
28172
28203
|
init_mcp_error_utils();
|
|
@@ -28217,11 +28248,11 @@ var init_agent_builtin_tools = __esm({
|
|
|
28217
28248
|
}
|
|
28218
28249
|
}
|
|
28219
28250
|
};
|
|
28220
|
-
readResourceArgsSchema =
|
|
28221
|
-
getPromptArgsSchema =
|
|
28222
|
-
name:
|
|
28251
|
+
readResourceArgsSchema = import_lazy_zod61.z.object({ uri: import_lazy_zod61.z.string().min(1) });
|
|
28252
|
+
getPromptArgsSchema = import_lazy_zod61.z.object({
|
|
28253
|
+
name: import_lazy_zod61.z.string().min(1),
|
|
28223
28254
|
// A prompt's arguments are strings; a model that sends a number or a boolean means its text
|
|
28224
|
-
arguments:
|
|
28255
|
+
arguments: import_lazy_zod61.z.record(import_lazy_zod61.z.string(), import_lazy_zod61.z.union([import_lazy_zod61.z.string(), import_lazy_zod61.z.number(), import_lazy_zod61.z.boolean()])).optional()
|
|
28225
28256
|
});
|
|
28226
28257
|
}
|
|
28227
28258
|
});
|
|
@@ -33492,13 +33523,13 @@ function invalidOutputFrom(outputError) {
|
|
|
33492
33523
|
function findAgentForCall(agents, toolName) {
|
|
33493
33524
|
return agents.findById(toolName) ?? agents.findByName(toolName) ?? agents.getAgents(true).find((entry) => entry.fullName === toolName || entry.name === toolName);
|
|
33494
33525
|
}
|
|
33495
|
-
var import_auth29, import_guard6,
|
|
33526
|
+
var import_auth29, import_guard6, import_lazy_zod62, import_protocol46, inputSchema10, outputSchema10, stateSchema10, plan10, name10, agentClassHooksJoin, Stage10, CallAgentFlow;
|
|
33496
33527
|
var init_call_agent_flow = __esm({
|
|
33497
33528
|
"libs/sdk/src/agent/flows/call-agent.flow.ts"() {
|
|
33498
33529
|
"use strict";
|
|
33499
33530
|
import_auth29 = require("@frontmcp/auth");
|
|
33500
33531
|
import_guard6 = require("@frontmcp/guard");
|
|
33501
|
-
|
|
33532
|
+
import_lazy_zod62 = require("@frontmcp/lazy-zod");
|
|
33502
33533
|
import_protocol46 = require("@frontmcp/protocol");
|
|
33503
33534
|
init_completion_events();
|
|
33504
33535
|
init_common();
|
|
@@ -33506,56 +33537,56 @@ var init_call_agent_flow = __esm({
|
|
|
33506
33537
|
init_hooks_utils();
|
|
33507
33538
|
init_flow_context_providers();
|
|
33508
33539
|
init_agent_call_chain();
|
|
33509
|
-
inputSchema10 =
|
|
33540
|
+
inputSchema10 = import_lazy_zod62.z.object({
|
|
33510
33541
|
request: import_protocol46.CallToolRequestSchema,
|
|
33511
33542
|
// z.any() used because ctx is the MCP SDK's ToolCallExtra type which varies by SDK version
|
|
33512
|
-
ctx:
|
|
33543
|
+
ctx: import_lazy_zod62.z.any(),
|
|
33513
33544
|
/**
|
|
33514
33545
|
* Set when the agent's `invoke_<agent>` tool runs this flow. That tool's `tools:call-tool` flow
|
|
33515
33546
|
* has already applied the agent's authorities, rate limit, concurrency and timeout (they are
|
|
33516
33547
|
* copied onto the tool), so this flow's stages for them leave the checks to it instead of
|
|
33517
33548
|
* counting the call twice. Their hooks still run.
|
|
33518
33549
|
*/
|
|
33519
|
-
gatedBy:
|
|
33550
|
+
gatedBy: import_lazy_zod62.z.literal("tools:call-tool").optional()
|
|
33520
33551
|
});
|
|
33521
33552
|
outputSchema10 = import_protocol46.CallToolResultSchema;
|
|
33522
|
-
stateSchema10 =
|
|
33523
|
-
input:
|
|
33524
|
-
name:
|
|
33525
|
-
arguments:
|
|
33553
|
+
stateSchema10 = import_lazy_zod62.z.object({
|
|
33554
|
+
input: import_lazy_zod62.z.looseObject({
|
|
33555
|
+
name: import_lazy_zod62.z.string().min(1).max(128),
|
|
33556
|
+
arguments: import_lazy_zod62.z.looseObject({}).optional()
|
|
33526
33557
|
}),
|
|
33527
|
-
authInfo:
|
|
33528
|
-
agent:
|
|
33529
|
-
agentContext:
|
|
33558
|
+
authInfo: import_lazy_zod62.z.any().optional(),
|
|
33559
|
+
agent: import_lazy_zod62.z.instanceof(AgentEntry),
|
|
33560
|
+
agentContext: import_lazy_zod62.z.instanceof(AgentContext),
|
|
33530
33561
|
// Store the raw executed output for plugins to see
|
|
33531
|
-
rawOutput:
|
|
33562
|
+
rawOutput: import_lazy_zod62.z.any().optional(),
|
|
33532
33563
|
output: outputSchema10,
|
|
33533
33564
|
// Agent owner ID for hook filtering (set during parseInput)
|
|
33534
|
-
_agentOwnerId:
|
|
33565
|
+
_agentOwnerId: import_lazy_zod62.z.string().optional(),
|
|
33535
33566
|
// Progress token from request's _meta (for progress notifications)
|
|
33536
|
-
progressToken:
|
|
33567
|
+
progressToken: import_lazy_zod62.z.union([import_lazy_zod62.z.string(), import_lazy_zod62.z.number()]).optional(),
|
|
33537
33568
|
// JSON-RPC request ID (for elicitation routing)
|
|
33538
|
-
jsonRpcRequestId:
|
|
33569
|
+
jsonRpcRequestId: import_lazy_zod62.z.union([import_lazy_zod62.z.string(), import_lazy_zod62.z.number()]).optional(),
|
|
33539
33570
|
// Execution metadata
|
|
33540
|
-
executionMeta:
|
|
33541
|
-
iterations:
|
|
33542
|
-
durationMs:
|
|
33543
|
-
usage:
|
|
33544
|
-
promptTokens:
|
|
33545
|
-
completionTokens:
|
|
33546
|
-
totalTokens:
|
|
33571
|
+
executionMeta: import_lazy_zod62.z.object({
|
|
33572
|
+
iterations: import_lazy_zod62.z.number().optional(),
|
|
33573
|
+
durationMs: import_lazy_zod62.z.number().optional(),
|
|
33574
|
+
usage: import_lazy_zod62.z.object({
|
|
33575
|
+
promptTokens: import_lazy_zod62.z.number().optional(),
|
|
33576
|
+
completionTokens: import_lazy_zod62.z.number().optional(),
|
|
33577
|
+
totalTokens: import_lazy_zod62.z.number().optional()
|
|
33547
33578
|
}).optional()
|
|
33548
33579
|
}).optional(),
|
|
33549
33580
|
// Semaphore ticket for concurrency control (set by acquireSemaphore, used by releaseSemaphore)
|
|
33550
|
-
semaphoreTicket:
|
|
33581
|
+
semaphoreTicket: import_lazy_zod62.z.any().optional(),
|
|
33551
33582
|
// A timed-out execute() that is still running; its concurrency slot is released when it settles
|
|
33552
|
-
abandonedExecution:
|
|
33583
|
+
abandonedExecution: import_lazy_zod62.z.instanceof(Promise).optional(),
|
|
33553
33584
|
// When execute() started, and the error it ended with (for the completion event)
|
|
33554
|
-
executionStartedAt:
|
|
33555
|
-
executionError:
|
|
33585
|
+
executionStartedAt: import_lazy_zod62.z.number().optional(),
|
|
33586
|
+
executionError: import_lazy_zod62.z.any().optional(),
|
|
33556
33587
|
// The MCP result built from rawOutput (parseOutput), or why it could not be built
|
|
33557
|
-
parsedOutput:
|
|
33558
|
-
outputError:
|
|
33588
|
+
parsedOutput: import_lazy_zod62.z.any().optional(),
|
|
33589
|
+
outputError: import_lazy_zod62.z.any().optional()
|
|
33559
33590
|
});
|
|
33560
33591
|
plan10 = {
|
|
33561
33592
|
pre: [
|
|
@@ -33597,7 +33628,7 @@ var init_call_agent_flow = __esm({
|
|
|
33597
33628
|
params = inputData.request.params;
|
|
33598
33629
|
ctx = inputData.ctx;
|
|
33599
33630
|
} catch (e) {
|
|
33600
|
-
throw new InvalidInputError("Invalid Input", e instanceof
|
|
33631
|
+
throw new InvalidInputError("Invalid Input", e instanceof import_lazy_zod62.z.ZodError ? e.issues : void 0);
|
|
33601
33632
|
}
|
|
33602
33633
|
if (method !== "tools/call") {
|
|
33603
33634
|
this.logger.warn(`parseInput: invalid method "${method}"`);
|
|
@@ -33805,7 +33836,7 @@ var init_call_agent_flow = __esm({
|
|
|
33805
33836
|
agentContext.input = agent.parseInput(input);
|
|
33806
33837
|
this.logger.verbose("validateInput:done");
|
|
33807
33838
|
} catch (err) {
|
|
33808
|
-
if (err instanceof
|
|
33839
|
+
if (err instanceof import_lazy_zod62.z.ZodError) {
|
|
33809
33840
|
throw new InvalidInputError("Invalid agent input", err.issues);
|
|
33810
33841
|
}
|
|
33811
33842
|
this.logger.error("validateInput: failed to parse input", err);
|
|
@@ -34376,12 +34407,12 @@ __export(agent_instance_exports, {
|
|
|
34376
34407
|
AGENT_ONLY_METADATA_KEYS: () => AGENT_ONLY_METADATA_KEYS,
|
|
34377
34408
|
AgentInstance: () => AgentInstance
|
|
34378
34409
|
});
|
|
34379
|
-
var import_auth30,
|
|
34410
|
+
var import_auth30, import_lazy_zod63, VALID_AGENT_HOOK_FLOWS, AGENT_SURFACE2, AGENT_ONLY_METADATA_KEYS, AgentInstance, FunctionAgentContext;
|
|
34380
34411
|
var init_agent_instance = __esm({
|
|
34381
34412
|
"libs/sdk/src/agent/agent.instance.ts"() {
|
|
34382
34413
|
"use strict";
|
|
34383
34414
|
import_auth30 = require("@frontmcp/auth");
|
|
34384
|
-
|
|
34415
|
+
import_lazy_zod63 = require("@frontmcp/lazy-zod");
|
|
34385
34416
|
init_config();
|
|
34386
34417
|
init_common();
|
|
34387
34418
|
init_availability();
|
|
@@ -35146,7 +35177,7 @@ var init_agent_instance = __esm({
|
|
|
35146
35177
|
return content;
|
|
35147
35178
|
}
|
|
35148
35179
|
parseInput(input) {
|
|
35149
|
-
const inputSchema43 =
|
|
35180
|
+
const inputSchema43 = import_lazy_zod63.z.object(this.inputSchema ?? {});
|
|
35150
35181
|
return inputSchema43.parse(input.arguments);
|
|
35151
35182
|
}
|
|
35152
35183
|
parseOutput(raw) {
|
|
@@ -35177,7 +35208,7 @@ var init_agent_instance = __esm({
|
|
|
35177
35208
|
inputSchema43 = toolInputSchema;
|
|
35178
35209
|
} else if (this.inputSchema && Object.keys(this.inputSchema).length > 0) {
|
|
35179
35210
|
try {
|
|
35180
|
-
inputSchema43 = (0,
|
|
35211
|
+
inputSchema43 = (0, import_lazy_zod63.toJSONSchema)(import_lazy_zod63.z.object(this.inputSchema), {
|
|
35181
35212
|
io: "input",
|
|
35182
35213
|
unrepresentable: "any"
|
|
35183
35214
|
});
|
|
@@ -37331,12 +37362,12 @@ function isListedTool(tool, listedNames) {
|
|
|
37331
37362
|
const baseName = tool.metadata.id ?? tool.metadata.name;
|
|
37332
37363
|
return listedNames.has(baseName) || listedNames.has(`${tool.owner.id}:${baseName}`);
|
|
37333
37364
|
}
|
|
37334
|
-
var import_auth34,
|
|
37365
|
+
var import_auth34, import_lazy_zod64, import_protocol47, inputSchema11, outputSchema11, PromptRefSchema, ResourceRefSchema, CompletionRefSchema, stateSchema11, plan11, name11, Stage11, resolvedReferences, MAX_TOOL_LIST_PAGES, CompleteFlow;
|
|
37335
37366
|
var init_complete_flow = __esm({
|
|
37336
37367
|
"libs/sdk/src/completion/flows/complete.flow.ts"() {
|
|
37337
37368
|
"use strict";
|
|
37338
37369
|
import_auth34 = require("@frontmcp/auth");
|
|
37339
|
-
|
|
37370
|
+
import_lazy_zod64 = require("@frontmcp/lazy-zod");
|
|
37340
37371
|
import_protocol47 = require("@frontmcp/protocol");
|
|
37341
37372
|
init_remote_capabilities_utils();
|
|
37342
37373
|
init_public_access_utils();
|
|
@@ -37347,30 +37378,30 @@ var init_complete_flow = __esm({
|
|
|
37347
37378
|
init_resolved_entries();
|
|
37348
37379
|
init_ui_shared();
|
|
37349
37380
|
init_lineage_utils();
|
|
37350
|
-
inputSchema11 =
|
|
37381
|
+
inputSchema11 = import_lazy_zod64.z.object({
|
|
37351
37382
|
request: import_protocol47.CompleteRequestSchema,
|
|
37352
|
-
ctx:
|
|
37383
|
+
ctx: import_lazy_zod64.z.unknown()
|
|
37353
37384
|
});
|
|
37354
37385
|
outputSchema11 = import_protocol47.CompleteResultSchema;
|
|
37355
|
-
PromptRefSchema =
|
|
37356
|
-
type:
|
|
37357
|
-
name:
|
|
37386
|
+
PromptRefSchema = import_lazy_zod64.z.object({
|
|
37387
|
+
type: import_lazy_zod64.z.literal("ref/prompt"),
|
|
37388
|
+
name: import_lazy_zod64.z.string()
|
|
37358
37389
|
});
|
|
37359
|
-
ResourceRefSchema =
|
|
37360
|
-
type:
|
|
37361
|
-
uri:
|
|
37390
|
+
ResourceRefSchema = import_lazy_zod64.z.object({
|
|
37391
|
+
type: import_lazy_zod64.z.literal("ref/resource"),
|
|
37392
|
+
uri: import_lazy_zod64.z.string()
|
|
37362
37393
|
});
|
|
37363
|
-
CompletionRefSchema =
|
|
37364
|
-
stateSchema11 =
|
|
37394
|
+
CompletionRefSchema = import_lazy_zod64.z.discriminatedUnion("type", [PromptRefSchema, ResourceRefSchema]);
|
|
37395
|
+
stateSchema11 = import_lazy_zod64.z.object({
|
|
37365
37396
|
ref: CompletionRefSchema,
|
|
37366
|
-
argument:
|
|
37367
|
-
name:
|
|
37368
|
-
value:
|
|
37397
|
+
argument: import_lazy_zod64.z.object({
|
|
37398
|
+
name: import_lazy_zod64.z.string(),
|
|
37399
|
+
value: import_lazy_zod64.z.string()
|
|
37369
37400
|
}),
|
|
37370
37401
|
// z.any() used because PromptEntry and ResourceEntry are complex abstract class types
|
|
37371
|
-
prompt:
|
|
37372
|
-
resource:
|
|
37373
|
-
widgetTools:
|
|
37402
|
+
prompt: import_lazy_zod64.z.any().optional(),
|
|
37403
|
+
resource: import_lazy_zod64.z.any().optional(),
|
|
37404
|
+
widgetTools: import_lazy_zod64.z.array(import_lazy_zod64.z.instanceof(ToolEntry)).optional(),
|
|
37374
37405
|
output: outputSchema11
|
|
37375
37406
|
});
|
|
37376
37407
|
plan11 = {
|
|
@@ -37410,7 +37441,7 @@ var init_complete_flow = __esm({
|
|
|
37410
37441
|
method = inputData.request.method;
|
|
37411
37442
|
params = inputData.request.params;
|
|
37412
37443
|
} catch (e) {
|
|
37413
|
-
throw new InvalidInputError("Invalid Input", e instanceof
|
|
37444
|
+
throw new InvalidInputError("Invalid Input", e instanceof import_lazy_zod64.z.ZodError ? e.issues : void 0);
|
|
37414
37445
|
}
|
|
37415
37446
|
if (method !== "completion/complete") {
|
|
37416
37447
|
this.logger.warn(`parseInput: invalid method "${method}"`);
|
|
@@ -37714,25 +37745,25 @@ var init_job_utils = __esm({
|
|
|
37714
37745
|
});
|
|
37715
37746
|
|
|
37716
37747
|
// libs/sdk/src/logging/flows/set-level.flow.ts
|
|
37717
|
-
var
|
|
37748
|
+
var import_lazy_zod65, import_protocol48, inputSchema12, outputSchema12, stateSchema12, plan12, name12, Stage12, SetLevelFlow;
|
|
37718
37749
|
var init_set_level_flow = __esm({
|
|
37719
37750
|
"libs/sdk/src/logging/flows/set-level.flow.ts"() {
|
|
37720
37751
|
"use strict";
|
|
37721
|
-
|
|
37752
|
+
import_lazy_zod65 = require("@frontmcp/lazy-zod");
|
|
37722
37753
|
import_protocol48 = require("@frontmcp/protocol");
|
|
37723
37754
|
init_common();
|
|
37724
37755
|
init_errors();
|
|
37725
37756
|
init_mcp_surface();
|
|
37726
|
-
inputSchema12 =
|
|
37757
|
+
inputSchema12 = import_lazy_zod65.z.object({
|
|
37727
37758
|
request: import_protocol48.SetLevelRequestSchema,
|
|
37728
|
-
ctx:
|
|
37759
|
+
ctx: import_lazy_zod65.z.unknown()
|
|
37729
37760
|
});
|
|
37730
37761
|
outputSchema12 = import_protocol48.EmptyResultSchema;
|
|
37731
|
-
stateSchema12 =
|
|
37732
|
-
input:
|
|
37762
|
+
stateSchema12 = import_lazy_zod65.z.object({
|
|
37763
|
+
input: import_lazy_zod65.z.object({
|
|
37733
37764
|
level: import_protocol48.LoggingLevelSchema
|
|
37734
37765
|
}),
|
|
37735
|
-
sessionId:
|
|
37766
|
+
sessionId: import_lazy_zod65.z.string().optional(),
|
|
37736
37767
|
output: outputSchema12
|
|
37737
37768
|
});
|
|
37738
37769
|
plan12 = {
|
|
@@ -37755,7 +37786,7 @@ var init_set_level_flow = __esm({
|
|
|
37755
37786
|
params = inputData.request.params;
|
|
37756
37787
|
ctx = inputData.ctx;
|
|
37757
37788
|
} catch (e) {
|
|
37758
|
-
throw new InvalidInputError("Invalid Input", e instanceof
|
|
37789
|
+
throw new InvalidInputError("Invalid Input", e instanceof import_lazy_zod65.z.ZodError ? e.issues : void 0);
|
|
37759
37790
|
}
|
|
37760
37791
|
if (method !== "logging/setLevel") {
|
|
37761
37792
|
this.logger.warn(`parseInput: invalid method "${method}"`);
|
|
@@ -37921,23 +37952,23 @@ var init_enforced_metadata_check = __esm({
|
|
|
37921
37952
|
});
|
|
37922
37953
|
|
|
37923
37954
|
// libs/sdk/src/skill/flows/filter-skills.flow.ts
|
|
37924
|
-
var
|
|
37955
|
+
var import_lazy_zod66, skillsSchema, inputSchema13, outputSchema13, stateSchema13, plan13, name13, Stage13, FilterSkillsFlow;
|
|
37925
37956
|
var init_filter_skills_flow = __esm({
|
|
37926
37957
|
"libs/sdk/src/skill/flows/filter-skills.flow.ts"() {
|
|
37927
37958
|
"use strict";
|
|
37928
|
-
|
|
37959
|
+
import_lazy_zod66 = require("@frontmcp/lazy-zod");
|
|
37929
37960
|
init_common();
|
|
37930
37961
|
init_errors();
|
|
37931
|
-
skillsSchema =
|
|
37932
|
-
inputSchema13 =
|
|
37962
|
+
skillsSchema = import_lazy_zod66.z.array(import_lazy_zod66.z.any());
|
|
37963
|
+
inputSchema13 = import_lazy_zod66.z.object({
|
|
37933
37964
|
skills: skillsSchema,
|
|
37934
37965
|
// The MCP handler context; the flow runs as that caller when no request context is active.
|
|
37935
|
-
ctx:
|
|
37966
|
+
ctx: import_lazy_zod66.z.unknown().optional()
|
|
37936
37967
|
});
|
|
37937
|
-
outputSchema13 =
|
|
37968
|
+
outputSchema13 = import_lazy_zod66.z.object({
|
|
37938
37969
|
skills: skillsSchema
|
|
37939
37970
|
});
|
|
37940
|
-
stateSchema13 =
|
|
37971
|
+
stateSchema13 = import_lazy_zod66.z.object({
|
|
37941
37972
|
skills: skillsSchema
|
|
37942
37973
|
});
|
|
37943
37974
|
plan13 = {
|
|
@@ -38097,31 +38128,31 @@ function tryGetTelemetry(flow) {
|
|
|
38097
38128
|
throw err;
|
|
38098
38129
|
}
|
|
38099
38130
|
}
|
|
38100
|
-
var
|
|
38131
|
+
var import_lazy_zod67, TELEMETRY_ACCESSOR_TOKEN, inputSchema14, outputSchema14, stateSchema14, plan14, name14, Stage14, SearchSkillsFlow;
|
|
38101
38132
|
var init_search_skills_flow = __esm({
|
|
38102
38133
|
"libs/sdk/src/skill/flows/search-skills.flow.ts"() {
|
|
38103
38134
|
"use strict";
|
|
38104
|
-
|
|
38135
|
+
import_lazy_zod67 = require("@frontmcp/lazy-zod");
|
|
38105
38136
|
init_common();
|
|
38106
38137
|
init_skill_metadata();
|
|
38107
38138
|
init_errors();
|
|
38108
38139
|
init_skills_mcp_types();
|
|
38109
38140
|
init_skill_filter_helper();
|
|
38110
38141
|
TELEMETRY_ACCESSOR_TOKEN = /* @__PURE__ */ Symbol.for("frontmcp:observability:telemetry-accessor");
|
|
38111
|
-
inputSchema14 =
|
|
38142
|
+
inputSchema14 = import_lazy_zod67.z.object({
|
|
38112
38143
|
request: SkillsSearchRequestSchema,
|
|
38113
|
-
ctx:
|
|
38144
|
+
ctx: import_lazy_zod67.z.unknown()
|
|
38114
38145
|
});
|
|
38115
38146
|
outputSchema14 = SkillsSearchResultSchema;
|
|
38116
|
-
stateSchema14 =
|
|
38117
|
-
query:
|
|
38118
|
-
options:
|
|
38119
|
-
tags:
|
|
38120
|
-
tools:
|
|
38121
|
-
topK:
|
|
38122
|
-
requireAllTools:
|
|
38147
|
+
stateSchema14 = import_lazy_zod67.z.object({
|
|
38148
|
+
query: import_lazy_zod67.z.string(),
|
|
38149
|
+
options: import_lazy_zod67.z.object({
|
|
38150
|
+
tags: import_lazy_zod67.z.array(import_lazy_zod67.z.string()).optional(),
|
|
38151
|
+
tools: import_lazy_zod67.z.array(import_lazy_zod67.z.string()).optional(),
|
|
38152
|
+
topK: import_lazy_zod67.z.number().optional(),
|
|
38153
|
+
requireAllTools: import_lazy_zod67.z.boolean().optional()
|
|
38123
38154
|
}),
|
|
38124
|
-
results:
|
|
38155
|
+
results: import_lazy_zod67.z.array(import_lazy_zod67.z.any()),
|
|
38125
38156
|
output: outputSchema14
|
|
38126
38157
|
});
|
|
38127
38158
|
plan14 = {
|
|
@@ -38139,7 +38170,7 @@ var init_search_skills_flow = __esm({
|
|
|
38139
38170
|
try {
|
|
38140
38171
|
params = inputSchema14.parse(this.rawInput).request.params;
|
|
38141
38172
|
} catch (e) {
|
|
38142
|
-
throw new InvalidInputError("Invalid Input", e instanceof
|
|
38173
|
+
throw new InvalidInputError("Invalid Input", e instanceof import_lazy_zod67.z.ZodError ? e.issues : void 0);
|
|
38143
38174
|
}
|
|
38144
38175
|
const { query, tags, tools, limit = 10, requireAllTools } = params;
|
|
38145
38176
|
const options = { tags, tools, topK: limit, requireAllTools };
|
|
@@ -38389,11 +38420,11 @@ var init_skill_http_utils = __esm({
|
|
|
38389
38420
|
});
|
|
38390
38421
|
|
|
38391
38422
|
// libs/sdk/src/skill/flows/load-skill.flow.ts
|
|
38392
|
-
var
|
|
38423
|
+
var import_lazy_zod68, inputSchema15, outputSchema15, stateSchema15, plan15, name15, Stage15, LoadSkillFlow;
|
|
38393
38424
|
var init_load_skill_flow = __esm({
|
|
38394
38425
|
"libs/sdk/src/skill/flows/load-skill.flow.ts"() {
|
|
38395
38426
|
"use strict";
|
|
38396
|
-
|
|
38427
|
+
import_lazy_zod68 = require("@frontmcp/lazy-zod");
|
|
38397
38428
|
init_common();
|
|
38398
38429
|
init_errors();
|
|
38399
38430
|
init_skills_mcp_types();
|
|
@@ -38402,18 +38433,18 @@ var init_load_skill_flow = __esm({
|
|
|
38402
38433
|
init_skill_filter_helper();
|
|
38403
38434
|
init_skill_http_utils();
|
|
38404
38435
|
init_skill_utils();
|
|
38405
|
-
inputSchema15 =
|
|
38436
|
+
inputSchema15 = import_lazy_zod68.z.object({
|
|
38406
38437
|
request: SkillsLoadRequestSchema,
|
|
38407
|
-
ctx:
|
|
38438
|
+
ctx: import_lazy_zod68.z.unknown()
|
|
38408
38439
|
});
|
|
38409
38440
|
outputSchema15 = SkillsLoadResultSchema;
|
|
38410
|
-
stateSchema15 =
|
|
38411
|
-
skillIds:
|
|
38412
|
-
format:
|
|
38413
|
-
activateSession:
|
|
38414
|
-
policyMode:
|
|
38415
|
-
loadResults:
|
|
38416
|
-
warnings:
|
|
38441
|
+
stateSchema15 = import_lazy_zod68.z.object({
|
|
38442
|
+
skillIds: import_lazy_zod68.z.array(import_lazy_zod68.z.string()),
|
|
38443
|
+
format: import_lazy_zod68.z.enum(["full", "instructions-only"]),
|
|
38444
|
+
activateSession: import_lazy_zod68.z.boolean(),
|
|
38445
|
+
policyMode: import_lazy_zod68.z.enum(["strict", "approval", "permissive"]).optional(),
|
|
38446
|
+
loadResults: import_lazy_zod68.z.unknown().optional(),
|
|
38447
|
+
warnings: import_lazy_zod68.z.array(import_lazy_zod68.z.string()).optional(),
|
|
38417
38448
|
output: outputSchema15.optional()
|
|
38418
38449
|
});
|
|
38419
38450
|
plan15 = {
|
|
@@ -38431,7 +38462,7 @@ var init_load_skill_flow = __esm({
|
|
|
38431
38462
|
try {
|
|
38432
38463
|
params = inputSchema15.parse(this.rawInput).request.params;
|
|
38433
38464
|
} catch (e) {
|
|
38434
|
-
throw new InvalidInputError("Invalid Input", e instanceof
|
|
38465
|
+
throw new InvalidInputError("Invalid Input", e instanceof import_lazy_zod68.z.ZodError ? e.issues : void 0);
|
|
38435
38466
|
}
|
|
38436
38467
|
const { skillIds, format = "full", activateSession = false, policyMode } = params;
|
|
38437
38468
|
this.state.set({ skillIds, format, activateSession, policyMode, warnings: [] });
|
|
@@ -39067,11 +39098,11 @@ var init_cache2 = __esm({
|
|
|
39067
39098
|
});
|
|
39068
39099
|
|
|
39069
39100
|
// libs/sdk/src/skill/flows/http/llm-txt.flow.ts
|
|
39070
|
-
var
|
|
39101
|
+
var import_lazy_zod69, inputSchema16, stateSchema16, outputSchema16, plan16, name16, Stage16, LlmTxtFlow;
|
|
39071
39102
|
var init_llm_txt_flow = __esm({
|
|
39072
39103
|
"libs/sdk/src/skill/flows/http/llm-txt.flow.ts"() {
|
|
39073
39104
|
"use strict";
|
|
39074
|
-
|
|
39105
|
+
import_lazy_zod69 = require("@frontmcp/lazy-zod");
|
|
39075
39106
|
init_common();
|
|
39076
39107
|
init_skills_http();
|
|
39077
39108
|
init_auth3();
|
|
@@ -39080,10 +39111,10 @@ var init_llm_txt_flow = __esm({
|
|
|
39080
39111
|
init_skill_filter_helper();
|
|
39081
39112
|
init_skill_http_utils();
|
|
39082
39113
|
inputSchema16 = httpInputSchema;
|
|
39083
|
-
stateSchema16 =
|
|
39084
|
-
prefix:
|
|
39114
|
+
stateSchema16 = import_lazy_zod69.z.object({
|
|
39115
|
+
prefix: import_lazy_zod69.z.string(),
|
|
39085
39116
|
/** The caller skill `authorities` are evaluated against. */
|
|
39086
|
-
authInfo:
|
|
39117
|
+
authInfo: import_lazy_zod69.z.record(import_lazy_zod69.z.string(), import_lazy_zod69.z.unknown())
|
|
39087
39118
|
});
|
|
39088
39119
|
outputSchema16 = HttpTextSchema;
|
|
39089
39120
|
plan16 = {
|
|
@@ -39222,11 +39253,11 @@ var init_llm_txt_flow = __esm({
|
|
|
39222
39253
|
});
|
|
39223
39254
|
|
|
39224
39255
|
// libs/sdk/src/skill/flows/http/llm-full-txt.flow.ts
|
|
39225
|
-
var
|
|
39256
|
+
var import_lazy_zod70, inputSchema17, stateSchema17, outputSchema17, plan17, name17, Stage17, LlmFullTxtFlow;
|
|
39226
39257
|
var init_llm_full_txt_flow = __esm({
|
|
39227
39258
|
"libs/sdk/src/skill/flows/http/llm-full-txt.flow.ts"() {
|
|
39228
39259
|
"use strict";
|
|
39229
|
-
|
|
39260
|
+
import_lazy_zod70 = require("@frontmcp/lazy-zod");
|
|
39230
39261
|
init_common();
|
|
39231
39262
|
init_skills_http();
|
|
39232
39263
|
init_auth3();
|
|
@@ -39235,10 +39266,10 @@ var init_llm_full_txt_flow = __esm({
|
|
|
39235
39266
|
init_skill_filter_helper();
|
|
39236
39267
|
init_skill_http_utils();
|
|
39237
39268
|
inputSchema17 = httpInputSchema;
|
|
39238
|
-
stateSchema17 =
|
|
39239
|
-
prefix:
|
|
39269
|
+
stateSchema17 = import_lazy_zod70.z.object({
|
|
39270
|
+
prefix: import_lazy_zod70.z.string(),
|
|
39240
39271
|
/** The caller skill `authorities` are evaluated against. */
|
|
39241
|
-
authInfo:
|
|
39272
|
+
authInfo: import_lazy_zod70.z.record(import_lazy_zod70.z.string(), import_lazy_zod70.z.unknown())
|
|
39242
39273
|
});
|
|
39243
39274
|
outputSchema17 = HttpTextSchema;
|
|
39244
39275
|
plan17 = {
|
|
@@ -39389,11 +39420,11 @@ var init_skill_semantic_search_interface = __esm({
|
|
|
39389
39420
|
});
|
|
39390
39421
|
|
|
39391
39422
|
// libs/sdk/src/skill/flows/http/skills-api.flow.ts
|
|
39392
|
-
var
|
|
39423
|
+
var import_lazy_zod71, inputSchema18, stateSchema18, outputSchema18, plan18, name18, Stage18, SkillsApiFlow;
|
|
39393
39424
|
var init_skills_api_flow = __esm({
|
|
39394
39425
|
"libs/sdk/src/skill/flows/http/skills-api.flow.ts"() {
|
|
39395
39426
|
"use strict";
|
|
39396
|
-
|
|
39427
|
+
import_lazy_zod71 = require("@frontmcp/lazy-zod");
|
|
39397
39428
|
init_common();
|
|
39398
39429
|
init_skill_metadata();
|
|
39399
39430
|
init_skills_http();
|
|
@@ -39405,17 +39436,17 @@ var init_skills_api_flow = __esm({
|
|
|
39405
39436
|
init_skill_http_utils();
|
|
39406
39437
|
init_skill_utils();
|
|
39407
39438
|
inputSchema18 = httpInputSchema;
|
|
39408
|
-
stateSchema18 =
|
|
39409
|
-
action:
|
|
39410
|
-
skillId:
|
|
39411
|
-
query:
|
|
39412
|
-
tags:
|
|
39413
|
-
tools:
|
|
39414
|
-
limit:
|
|
39415
|
-
offset:
|
|
39416
|
-
category:
|
|
39417
|
-
minRating:
|
|
39418
|
-
semanticQuery:
|
|
39439
|
+
stateSchema18 = import_lazy_zod71.z.object({
|
|
39440
|
+
action: import_lazy_zod71.z.enum(["list", "search", "get"]),
|
|
39441
|
+
skillId: import_lazy_zod71.z.string().optional(),
|
|
39442
|
+
query: import_lazy_zod71.z.string().optional(),
|
|
39443
|
+
tags: import_lazy_zod71.z.array(import_lazy_zod71.z.string()).optional(),
|
|
39444
|
+
tools: import_lazy_zod71.z.array(import_lazy_zod71.z.string()).optional(),
|
|
39445
|
+
limit: import_lazy_zod71.z.number().optional(),
|
|
39446
|
+
offset: import_lazy_zod71.z.number().optional(),
|
|
39447
|
+
category: import_lazy_zod71.z.string().optional(),
|
|
39448
|
+
minRating: import_lazy_zod71.z.number().optional(),
|
|
39449
|
+
semanticQuery: import_lazy_zod71.z.string().optional()
|
|
39419
39450
|
});
|
|
39420
39451
|
outputSchema18 = HttpJsonSchema;
|
|
39421
39452
|
plan18 = {
|
|
@@ -42325,36 +42356,36 @@ function authorizeSessionTermination(verifyResult, requestedSessionId) {
|
|
|
42325
42356
|
}
|
|
42326
42357
|
return { kind: "ok", sessionId: ownedSessionId };
|
|
42327
42358
|
}
|
|
42328
|
-
var
|
|
42359
|
+
var import_lazy_zod72, intentSchema, decisionSchema, CH_OTHER, CH_GET_SSE, CH_POST_INIT_JSON, CH_POST_INIT_SSE, CH_POST_JSON, CH_POST_SSE, CH_POST_MESSAGE, CH_GET_SSE_PATH, CH_MASK, B_HAS_SESSION, B_STATELESS_EN, B_REQ_SESSION, B_LEGACY_HINT, B_SSE_LISTENER_EN, B_STREAMABLE_EN, B_STATEFUL_EN, B_LEGACY_EN, h, wantsSSE, wantsJSON, isInitialize, RULES;
|
|
42329
42360
|
var init_decide_request_intent_utils = __esm({
|
|
42330
42361
|
"libs/sdk/src/common/utils/decide-request-intent.utils.ts"() {
|
|
42331
42362
|
"use strict";
|
|
42332
|
-
|
|
42333
|
-
intentSchema =
|
|
42334
|
-
|
|
42335
|
-
|
|
42336
|
-
|
|
42337
|
-
|
|
42338
|
-
|
|
42339
|
-
|
|
42363
|
+
import_lazy_zod72 = require("@frontmcp/lazy-zod");
|
|
42364
|
+
intentSchema = import_lazy_zod72.z.union([
|
|
42365
|
+
import_lazy_zod72.z.literal("legacy-sse"),
|
|
42366
|
+
import_lazy_zod72.z.literal("sse"),
|
|
42367
|
+
import_lazy_zod72.z.literal("streamable-http"),
|
|
42368
|
+
import_lazy_zod72.z.literal("stateful-http"),
|
|
42369
|
+
import_lazy_zod72.z.literal("stateless-http"),
|
|
42370
|
+
import_lazy_zod72.z.literal("delete-session"),
|
|
42340
42371
|
// Protocol 2026-07-28: stateless, sessionless, per-request version negotiation.
|
|
42341
42372
|
// Decided by the router from the request's headers/`_meta`, not by the bitmap
|
|
42342
42373
|
// rules below \u2014 those describe the session-oriented transports only.
|
|
42343
|
-
|
|
42344
|
-
|
|
42374
|
+
import_lazy_zod72.z.literal("mcp-20260728"),
|
|
42375
|
+
import_lazy_zod72.z.literal("unknown")
|
|
42345
42376
|
]);
|
|
42346
|
-
decisionSchema =
|
|
42377
|
+
decisionSchema = import_lazy_zod72.z.object({
|
|
42347
42378
|
intent: intentSchema,
|
|
42348
|
-
reasons:
|
|
42349
|
-
recommendation:
|
|
42350
|
-
httpStatus:
|
|
42351
|
-
message:
|
|
42379
|
+
reasons: import_lazy_zod72.z.array(import_lazy_zod72.z.string()),
|
|
42380
|
+
recommendation: import_lazy_zod72.z.object({
|
|
42381
|
+
httpStatus: import_lazy_zod72.z.number(),
|
|
42382
|
+
message: import_lazy_zod72.z.string()
|
|
42352
42383
|
}).optional(),
|
|
42353
42384
|
// Echo back bits for debugging/telemetry if you like
|
|
42354
|
-
debug:
|
|
42355
|
-
key:
|
|
42356
|
-
channel:
|
|
42357
|
-
flags:
|
|
42385
|
+
debug: import_lazy_zod72.z.object({
|
|
42386
|
+
key: import_lazy_zod72.z.number(),
|
|
42387
|
+
channel: import_lazy_zod72.z.number(),
|
|
42388
|
+
flags: import_lazy_zod72.z.number()
|
|
42358
42389
|
}).optional()
|
|
42359
42390
|
});
|
|
42360
42391
|
CH_OTHER = 0;
|
|
@@ -43284,14 +43315,14 @@ function buildStaticChallenge(options, description) {
|
|
|
43284
43315
|
}
|
|
43285
43316
|
return parts.join(", ");
|
|
43286
43317
|
}
|
|
43287
|
-
var import_reflect_metadata19, import_auth40,
|
|
43318
|
+
var import_reflect_metadata19, import_auth40, import_lazy_zod73, import_utils86, inputSchema19, stateSchema19, UnauthorizedSchema, AuthorizedSchema, ForbiddenSchema, sessionVerifyOutputSchema, plan19, name19, Stage19, warnedUnpinnedAudience, SessionVerifyFlow;
|
|
43288
43319
|
var init_session_verify_flow = __esm({
|
|
43289
43320
|
"libs/sdk/src/auth/flows/session.verify.flow.ts"() {
|
|
43290
43321
|
"use strict";
|
|
43291
43322
|
init_common();
|
|
43292
43323
|
import_reflect_metadata19 = require("reflect-metadata");
|
|
43293
43324
|
import_auth40 = require("@frontmcp/auth");
|
|
43294
|
-
|
|
43325
|
+
import_lazy_zod73 = require("@frontmcp/lazy-zod");
|
|
43295
43326
|
import_utils86 = require("@frontmcp/utils");
|
|
43296
43327
|
init_notification_service();
|
|
43297
43328
|
init_skill_mode_utils();
|
|
@@ -43302,39 +43333,39 @@ var init_session_verify_flow = __esm({
|
|
|
43302
43333
|
* identified for this request only, and no session is minted for it (#629). Minting one needs
|
|
43303
43334
|
* `MCP_SESSION_SECRET`, for a session id the client would never present.
|
|
43304
43335
|
*/
|
|
43305
|
-
sessionless:
|
|
43336
|
+
sessionless: import_lazy_zod73.z.boolean().optional()
|
|
43306
43337
|
});
|
|
43307
|
-
stateSchema19 =
|
|
43308
|
-
baseUrl:
|
|
43309
|
-
authorizationHeader:
|
|
43310
|
-
token:
|
|
43311
|
-
sessionIdHeader:
|
|
43338
|
+
stateSchema19 = import_lazy_zod73.z.object({
|
|
43339
|
+
baseUrl: import_lazy_zod73.z.string().min(1),
|
|
43340
|
+
authorizationHeader: import_lazy_zod73.z.string().optional(),
|
|
43341
|
+
token: import_lazy_zod73.z.string().optional(),
|
|
43342
|
+
sessionIdHeader: import_lazy_zod73.z.string().optional(),
|
|
43312
43343
|
// 'mcp-session-id'
|
|
43313
|
-
sessionProtocol:
|
|
43344
|
+
sessionProtocol: import_lazy_zod73.z.string().optional(),
|
|
43314
43345
|
// 'sse/http/streamable-http'
|
|
43315
|
-
userAgent:
|
|
43346
|
+
userAgent: import_lazy_zod73.z.string().optional(),
|
|
43316
43347
|
// User-Agent header for platform detection
|
|
43317
|
-
prmMetadataPath:
|
|
43318
|
-
prmMetadataHeader:
|
|
43319
|
-
prmUrl:
|
|
43348
|
+
prmMetadataPath: import_lazy_zod73.z.string().optional(),
|
|
43349
|
+
prmMetadataHeader: import_lazy_zod73.z.string().optional(),
|
|
43350
|
+
prmUrl: import_lazy_zod73.z.string().optional(),
|
|
43320
43351
|
// Full PRM URL for header builder functions
|
|
43321
|
-
jwtPayload:
|
|
43352
|
+
jwtPayload: import_lazy_zod73.z.object({}).passthrough().optional(),
|
|
43322
43353
|
user: import_auth5.userClaimSchema.optional(),
|
|
43323
43354
|
session: sessionIdSchema.optional()
|
|
43324
43355
|
});
|
|
43325
|
-
UnauthorizedSchema =
|
|
43326
|
-
kind:
|
|
43327
|
-
prmMetadataHeader:
|
|
43356
|
+
UnauthorizedSchema = import_lazy_zod73.z.object({
|
|
43357
|
+
kind: import_lazy_zod73.z.literal("unauthorized"),
|
|
43358
|
+
prmMetadataHeader: import_lazy_zod73.z.string().describe("Path to protected resource metadata")
|
|
43328
43359
|
}).describe("401 Unauthorized with 'WWW-Authenticate' header for requesting authentication");
|
|
43329
|
-
AuthorizedSchema =
|
|
43330
|
-
kind:
|
|
43360
|
+
AuthorizedSchema = import_lazy_zod73.z.object({
|
|
43361
|
+
kind: import_lazy_zod73.z.literal("authorized"),
|
|
43331
43362
|
authorization: authorizationSchema.describe("Session information if session id is present")
|
|
43332
43363
|
}).describe("Authorized session information");
|
|
43333
|
-
ForbiddenSchema =
|
|
43334
|
-
kind:
|
|
43335
|
-
prmMetadataHeader:
|
|
43364
|
+
ForbiddenSchema = import_lazy_zod73.z.object({
|
|
43365
|
+
kind: import_lazy_zod73.z.literal("forbidden"),
|
|
43366
|
+
prmMetadataHeader: import_lazy_zod73.z.string().describe("WWW-Authenticate header with insufficient_scope error")
|
|
43336
43367
|
}).describe("403 Forbidden \u2014 token valid but insufficient scope");
|
|
43337
|
-
sessionVerifyOutputSchema =
|
|
43368
|
+
sessionVerifyOutputSchema = import_lazy_zod73.z.union([UnauthorizedSchema, AuthorizedSchema, ForbiddenSchema]);
|
|
43338
43369
|
plan19 = {
|
|
43339
43370
|
pre: [
|
|
43340
43371
|
"parseInput",
|
|
@@ -43968,13 +43999,13 @@ var init_web_standard_mcp = __esm({
|
|
|
43968
43999
|
});
|
|
43969
44000
|
|
|
43970
44001
|
// libs/sdk/src/scope/flows/http.request.flow.ts
|
|
43971
|
-
var import_auth42, import_guard8,
|
|
44002
|
+
var import_auth42, import_guard8, import_lazy_zod74, import_utils90, plan20, httpRequestStateSchema, name20, Stage20, HttpRequestFlow;
|
|
43972
44003
|
var init_http_request_flow = __esm({
|
|
43973
44004
|
"libs/sdk/src/scope/flows/http.request.flow.ts"() {
|
|
43974
44005
|
"use strict";
|
|
43975
44006
|
import_auth42 = require("@frontmcp/auth");
|
|
43976
44007
|
import_guard8 = require("@frontmcp/guard");
|
|
43977
|
-
|
|
44008
|
+
import_lazy_zod74 = require("@frontmcp/lazy-zod");
|
|
43978
44009
|
import_utils90 = require("@frontmcp/utils");
|
|
43979
44010
|
init_session_verify_flow();
|
|
43980
44011
|
init_common();
|
|
@@ -44037,7 +44068,7 @@ var init_http_request_flow = __esm({
|
|
|
44037
44068
|
],
|
|
44038
44069
|
error: []
|
|
44039
44070
|
};
|
|
44040
|
-
httpRequestStateSchema =
|
|
44071
|
+
httpRequestStateSchema = import_lazy_zod74.z.object({
|
|
44041
44072
|
decision: decisionSchema,
|
|
44042
44073
|
intent: intentSchema,
|
|
44043
44074
|
verifyResult: sessionVerifyOutputSchema
|
|
@@ -45635,8 +45666,8 @@ var require_dist = __commonJS({
|
|
|
45635
45666
|
return row.count;
|
|
45636
45667
|
}
|
|
45637
45668
|
};
|
|
45638
|
-
var
|
|
45639
|
-
var sqliteStorageOptionsSchema =
|
|
45669
|
+
var import_lazy_zod121 = require("@frontmcp/lazy-zod");
|
|
45670
|
+
var sqliteStorageOptionsSchema = import_lazy_zod121.z.object({ path: import_lazy_zod121.z.string().min(1), encryption: import_lazy_zod121.z.object({ secret: import_lazy_zod121.z.string().min(1) }).optional(), ttlCleanupIntervalMs: import_lazy_zod121.z.number().int().nonnegative().optional().default(6e4), walMode: import_lazy_zod121.z.boolean().optional().default(true), busyTimeoutMs: import_lazy_zod121.z.number().int().nonnegative().optional().default(5e3) });
|
|
45640
45671
|
}
|
|
45641
45672
|
});
|
|
45642
45673
|
|
|
@@ -46204,11 +46235,11 @@ function sseTransportClass() {
|
|
|
46204
46235
|
}
|
|
46205
46236
|
return RecreateableTransport;
|
|
46206
46237
|
}
|
|
46207
|
-
var
|
|
46238
|
+
var import_lazy_zod75, RecreateableTransport, TransportSSEAdapter;
|
|
46208
46239
|
var init_transport_sse_adapter = __esm({
|
|
46209
46240
|
"libs/sdk/src/transport/adapters/transport.sse.adapter.ts"() {
|
|
46210
46241
|
"use strict";
|
|
46211
|
-
|
|
46242
|
+
import_lazy_zod75 = require("@frontmcp/lazy-zod");
|
|
46212
46243
|
init_elicitation_types();
|
|
46213
46244
|
init_errors();
|
|
46214
46245
|
init_transport_error();
|
|
@@ -46310,7 +46341,7 @@ var init_transport_sse_adapter = __esm({
|
|
|
46310
46341
|
const params = {
|
|
46311
46342
|
mode,
|
|
46312
46343
|
message,
|
|
46313
|
-
requestedSchema: (0,
|
|
46344
|
+
requestedSchema: (0, import_lazy_zod75.toJSONSchema)(requestedSchema)
|
|
46314
46345
|
};
|
|
46315
46346
|
if (mode === "url") {
|
|
46316
46347
|
params["elicitationId"] = elicitId;
|
|
@@ -46564,11 +46595,11 @@ var init_streamable_http_transport = __esm({
|
|
|
46564
46595
|
async function loadStreamableHttpTransport() {
|
|
46565
46596
|
RecreateableTransport2 ??= (await Promise.resolve().then(() => (init_streamable_http_transport(), streamable_http_transport_exports))).RecreateableStreamableHTTPServerTransport;
|
|
46566
46597
|
}
|
|
46567
|
-
var
|
|
46598
|
+
var import_lazy_zod76, RecreateableTransport2, resolveSessionIdGenerator, TransportStreamableHttpAdapter;
|
|
46568
46599
|
var init_transport_streamable_http_adapter = __esm({
|
|
46569
46600
|
"libs/sdk/src/transport/adapters/transport.streamable-http.adapter.ts"() {
|
|
46570
46601
|
"use strict";
|
|
46571
|
-
|
|
46602
|
+
import_lazy_zod76 = require("@frontmcp/lazy-zod");
|
|
46572
46603
|
init_errors();
|
|
46573
46604
|
init_session_scoped_event_store();
|
|
46574
46605
|
init_transport_error();
|
|
@@ -46686,7 +46717,7 @@ var init_transport_streamable_http_adapter = __esm({
|
|
|
46686
46717
|
relatedRequestId,
|
|
46687
46718
|
sessionId,
|
|
46688
46719
|
message,
|
|
46689
|
-
requestedSchema: (0,
|
|
46720
|
+
requestedSchema: (0, import_lazy_zod76.toJSONSchema)(requestedSchema),
|
|
46690
46721
|
options
|
|
46691
46722
|
});
|
|
46692
46723
|
const { elicitId, expiresAt, requestParams, pendingRecord } = flowOutput;
|
|
@@ -46868,12 +46899,12 @@ function toClientInfo(value) {
|
|
|
46868
46899
|
const { name: name48, version } = value;
|
|
46869
46900
|
return typeof name48 === "string" && typeof version === "string" ? { name: name48, version } : void 0;
|
|
46870
46901
|
}
|
|
46871
|
-
var import_auth44,
|
|
46902
|
+
var import_auth44, import_lazy_zod77, import_protocol53, import_utils93, plan22, subscriptionParamsSchema, requestIdSchema, stateSchema20, name22, Stage22, encoder3, TRACE_META_KEYS, HandleMcp20260728Flow;
|
|
46872
46903
|
var init_handle_mcp_20260728_flow = __esm({
|
|
46873
46904
|
"libs/sdk/src/transport/flows/handle.mcp-20260728.flow.ts"() {
|
|
46874
46905
|
"use strict";
|
|
46875
46906
|
import_auth44 = require("@frontmcp/auth");
|
|
46876
|
-
|
|
46907
|
+
import_lazy_zod77 = require("@frontmcp/lazy-zod");
|
|
46877
46908
|
import_protocol53 = require("@frontmcp/protocol");
|
|
46878
46909
|
import_utils93 = require("@frontmcp/utils");
|
|
46879
46910
|
init_common();
|
|
@@ -46888,22 +46919,22 @@ var init_handle_mcp_20260728_flow = __esm({
|
|
|
46888
46919
|
post: [],
|
|
46889
46920
|
finalize: ["cleanup"]
|
|
46890
46921
|
};
|
|
46891
|
-
subscriptionParamsSchema =
|
|
46892
|
-
notifications:
|
|
46893
|
-
toolsListChanged:
|
|
46894
|
-
promptsListChanged:
|
|
46895
|
-
resourcesListChanged:
|
|
46896
|
-
resourceSubscriptions:
|
|
46922
|
+
subscriptionParamsSchema = import_lazy_zod77.z.object({
|
|
46923
|
+
notifications: import_lazy_zod77.z.object({
|
|
46924
|
+
toolsListChanged: import_lazy_zod77.z.boolean().optional(),
|
|
46925
|
+
promptsListChanged: import_lazy_zod77.z.boolean().optional(),
|
|
46926
|
+
resourcesListChanged: import_lazy_zod77.z.boolean().optional(),
|
|
46927
|
+
resourceSubscriptions: import_lazy_zod77.z.array(import_lazy_zod77.z.string()).optional()
|
|
46897
46928
|
}).default({})
|
|
46898
46929
|
});
|
|
46899
|
-
requestIdSchema =
|
|
46900
|
-
stateSchema20 =
|
|
46930
|
+
requestIdSchema = import_lazy_zod77.z.union([import_lazy_zod77.z.string(), import_lazy_zod77.z.number()]);
|
|
46931
|
+
stateSchema20 = import_lazy_zod77.z.object({
|
|
46901
46932
|
/** Negotiated protocol version for this request. */
|
|
46902
|
-
version:
|
|
46903
|
-
requestType:
|
|
46904
|
-
isAnonymous:
|
|
46933
|
+
version: import_lazy_zod77.z.string().optional(),
|
|
46934
|
+
requestType: import_lazy_zod77.z.enum(["notification", "subscriptions", "message"]).optional(),
|
|
46935
|
+
isAnonymous: import_lazy_zod77.z.boolean().default(true),
|
|
46905
46936
|
/** Whether the client declared this revision itself (not served under it by default). */
|
|
46906
|
-
clientDeclaredRevision:
|
|
46937
|
+
clientDeclaredRevision: import_lazy_zod77.z.boolean().optional()
|
|
46907
46938
|
});
|
|
46908
46939
|
name22 = "handle:mcp-202607280728";
|
|
46909
46940
|
({ Stage: Stage22 } = FlowHooksOf(name22));
|
|
@@ -47209,11 +47240,11 @@ function resolveLegacySseSession(params) {
|
|
|
47209
47240
|
}
|
|
47210
47241
|
return { session: createSession(), createdNew: true, responded404: false };
|
|
47211
47242
|
}
|
|
47212
|
-
var
|
|
47243
|
+
var import_lazy_zod78, plan23, stateSessionSchema, stateSchema21, name23, Stage23, HandleSseFlow;
|
|
47213
47244
|
var init_handle_sse_flow = __esm({
|
|
47214
47245
|
"libs/sdk/src/transport/flows/handle.sse.flow.ts"() {
|
|
47215
47246
|
"use strict";
|
|
47216
|
-
|
|
47247
|
+
import_lazy_zod78 = require("@frontmcp/lazy-zod");
|
|
47217
47248
|
init_session_id_utils();
|
|
47218
47249
|
init_common();
|
|
47219
47250
|
init_errors();
|
|
@@ -47225,22 +47256,22 @@ var init_handle_sse_flow = __esm({
|
|
|
47225
47256
|
post: [],
|
|
47226
47257
|
finalize: ["cleanup"]
|
|
47227
47258
|
};
|
|
47228
|
-
stateSessionSchema =
|
|
47229
|
-
id:
|
|
47230
|
-
payload:
|
|
47231
|
-
nodeId:
|
|
47232
|
-
authSig:
|
|
47233
|
-
uuid:
|
|
47234
|
-
iat:
|
|
47235
|
-
protocol:
|
|
47236
|
-
isPublic:
|
|
47237
|
-
platformType:
|
|
47259
|
+
stateSessionSchema = import_lazy_zod78.z.object({
|
|
47260
|
+
id: import_lazy_zod78.z.string(),
|
|
47261
|
+
payload: import_lazy_zod78.z.object({
|
|
47262
|
+
nodeId: import_lazy_zod78.z.string(),
|
|
47263
|
+
authSig: import_lazy_zod78.z.string(),
|
|
47264
|
+
uuid: import_lazy_zod78.z.string().uuid(),
|
|
47265
|
+
iat: import_lazy_zod78.z.number(),
|
|
47266
|
+
protocol: import_lazy_zod78.z.enum(["legacy-sse", "sse", "streamable-http", "stateful-http", "stateless-http"]).optional(),
|
|
47267
|
+
isPublic: import_lazy_zod78.z.boolean().optional(),
|
|
47268
|
+
platformType: import_lazy_zod78.z.enum(["openai", "claude", "gemini", "cursor", "continue", "cody", "generic-mcp", "ext-apps", "unknown"]).optional()
|
|
47238
47269
|
}).optional()
|
|
47239
47270
|
});
|
|
47240
|
-
stateSchema21 =
|
|
47241
|
-
token:
|
|
47271
|
+
stateSchema21 = import_lazy_zod78.z.object({
|
|
47272
|
+
token: import_lazy_zod78.z.string(),
|
|
47242
47273
|
session: stateSessionSchema,
|
|
47243
|
-
requestType:
|
|
47274
|
+
requestType: import_lazy_zod78.z.enum(["initialize", "message", "elicitResult"]).optional()
|
|
47244
47275
|
});
|
|
47245
47276
|
name23 = "handle:legacy-sse";
|
|
47246
47277
|
({ Stage: Stage23 } = FlowHooksOf(name23));
|
|
@@ -47370,11 +47401,11 @@ var init_handle_sse_flow = __esm({
|
|
|
47370
47401
|
});
|
|
47371
47402
|
|
|
47372
47403
|
// libs/sdk/src/transport/flows/handle.stateless-http.flow.ts
|
|
47373
|
-
var
|
|
47404
|
+
var import_lazy_zod79, import_protocol54, plan24, stateSchema22, name24, Stage24, HandleStatelessHttpFlow;
|
|
47374
47405
|
var init_handle_stateless_http_flow = __esm({
|
|
47375
47406
|
"libs/sdk/src/transport/flows/handle.stateless-http.flow.ts"() {
|
|
47376
47407
|
"use strict";
|
|
47377
|
-
|
|
47408
|
+
import_lazy_zod79 = require("@frontmcp/lazy-zod");
|
|
47378
47409
|
import_protocol54 = require("@frontmcp/protocol");
|
|
47379
47410
|
init_common();
|
|
47380
47411
|
init_errors();
|
|
@@ -47386,10 +47417,10 @@ var init_handle_stateless_http_flow = __esm({
|
|
|
47386
47417
|
post: [],
|
|
47387
47418
|
finalize: ["cleanup"]
|
|
47388
47419
|
};
|
|
47389
|
-
stateSchema22 =
|
|
47390
|
-
token:
|
|
47391
|
-
isAuthenticated:
|
|
47392
|
-
requestType:
|
|
47420
|
+
stateSchema22 = import_lazy_zod79.z.object({
|
|
47421
|
+
token: import_lazy_zod79.z.string().optional(),
|
|
47422
|
+
isAuthenticated: import_lazy_zod79.z.boolean(),
|
|
47423
|
+
requestType: import_lazy_zod79.z.enum(["initialize", "message"]).optional()
|
|
47393
47424
|
});
|
|
47394
47425
|
name24 = "handle:stateless-http";
|
|
47395
47426
|
({ Stage: Stage24 } = FlowHooksOf(name24));
|
|
@@ -48007,11 +48038,11 @@ async function lookupStreamableHttpTransport(params) {
|
|
|
48007
48038
|
}
|
|
48008
48039
|
return { kind: "session-not-initialized", recreationError };
|
|
48009
48040
|
}
|
|
48010
|
-
var
|
|
48041
|
+
var import_lazy_zod80, import_protocol55, plan25, stateSessionSchema2, stateSchema23, name25, Stage25, HandleStreamableHttpFlow;
|
|
48011
48042
|
var init_handle_streamable_http_flow = __esm({
|
|
48012
48043
|
"libs/sdk/src/transport/flows/handle.streamable-http.flow.ts"() {
|
|
48013
48044
|
"use strict";
|
|
48014
|
-
|
|
48045
|
+
import_lazy_zod80 = require("@frontmcp/lazy-zod");
|
|
48015
48046
|
import_protocol55 = require("@frontmcp/protocol");
|
|
48016
48047
|
init_session_id_utils();
|
|
48017
48048
|
init_common();
|
|
@@ -48026,22 +48057,22 @@ var init_handle_streamable_http_flow = __esm({
|
|
|
48026
48057
|
post: [],
|
|
48027
48058
|
finalize: ["cleanup"]
|
|
48028
48059
|
};
|
|
48029
|
-
stateSessionSchema2 =
|
|
48030
|
-
id:
|
|
48031
|
-
payload:
|
|
48032
|
-
nodeId:
|
|
48033
|
-
authSig:
|
|
48034
|
-
uuid:
|
|
48035
|
-
iat:
|
|
48036
|
-
protocol:
|
|
48037
|
-
isPublic:
|
|
48038
|
-
platformType:
|
|
48060
|
+
stateSessionSchema2 = import_lazy_zod80.z.object({
|
|
48061
|
+
id: import_lazy_zod80.z.string(),
|
|
48062
|
+
payload: import_lazy_zod80.z.object({
|
|
48063
|
+
nodeId: import_lazy_zod80.z.string(),
|
|
48064
|
+
authSig: import_lazy_zod80.z.string(),
|
|
48065
|
+
uuid: import_lazy_zod80.z.string().uuid(),
|
|
48066
|
+
iat: import_lazy_zod80.z.number(),
|
|
48067
|
+
protocol: import_lazy_zod80.z.enum(["legacy-sse", "sse", "streamable-http", "stateful-http", "stateless-http"]).optional(),
|
|
48068
|
+
isPublic: import_lazy_zod80.z.boolean().optional(),
|
|
48069
|
+
platformType: import_lazy_zod80.z.enum(["openai", "claude", "gemini", "cursor", "continue", "cody", "generic-mcp", "ext-apps", "unknown"]).optional()
|
|
48039
48070
|
}).optional()
|
|
48040
48071
|
});
|
|
48041
|
-
stateSchema23 =
|
|
48042
|
-
token:
|
|
48072
|
+
stateSchema23 = import_lazy_zod80.z.object({
|
|
48073
|
+
token: import_lazy_zod80.z.string(),
|
|
48043
48074
|
session: stateSessionSchema2,
|
|
48044
|
-
requestType:
|
|
48075
|
+
requestType: import_lazy_zod80.z.enum(["initialize", "message", "elicitResult", "sseListener", "extApps"]).optional()
|
|
48045
48076
|
});
|
|
48046
48077
|
name25 = "handle:streamable-http";
|
|
48047
48078
|
({ Stage: Stage25 } = FlowHooksOf(name25));
|
|
@@ -53644,24 +53675,24 @@ var init_execute_task_flag = __esm({
|
|
|
53644
53675
|
});
|
|
53645
53676
|
|
|
53646
53677
|
// libs/sdk/src/task/flows/tasks-get.flow.ts
|
|
53647
|
-
var
|
|
53678
|
+
var import_lazy_zod81, import_protocol56, inputSchema20, outputSchema19, stateSchema24, plan26, name26, Stage26, TasksGetFlow;
|
|
53648
53679
|
var init_tasks_get_flow = __esm({
|
|
53649
53680
|
"libs/sdk/src/task/flows/tasks-get.flow.ts"() {
|
|
53650
53681
|
"use strict";
|
|
53651
|
-
|
|
53682
|
+
import_lazy_zod81 = require("@frontmcp/lazy-zod");
|
|
53652
53683
|
import_protocol56 = require("@frontmcp/protocol");
|
|
53653
53684
|
init_common();
|
|
53654
53685
|
init_errors();
|
|
53655
53686
|
init_task_types();
|
|
53656
|
-
inputSchema20 =
|
|
53687
|
+
inputSchema20 = import_lazy_zod81.z.object({
|
|
53657
53688
|
request: import_protocol56.GetTaskRequestSchema,
|
|
53658
|
-
ctx:
|
|
53689
|
+
ctx: import_lazy_zod81.z.any()
|
|
53659
53690
|
});
|
|
53660
53691
|
outputSchema19 = import_protocol56.GetTaskResultSchema;
|
|
53661
|
-
stateSchema24 =
|
|
53662
|
-
taskId:
|
|
53663
|
-
sessionId:
|
|
53664
|
-
authInfo:
|
|
53692
|
+
stateSchema24 = import_lazy_zod81.z.object({
|
|
53693
|
+
taskId: import_lazy_zod81.z.string(),
|
|
53694
|
+
sessionId: import_lazy_zod81.z.string(),
|
|
53695
|
+
authInfo: import_lazy_zod81.z.any()
|
|
53665
53696
|
});
|
|
53666
53697
|
plan26 = {
|
|
53667
53698
|
pre: ["parseInput"],
|
|
@@ -53681,7 +53712,7 @@ var init_tasks_get_flow = __esm({
|
|
|
53681
53712
|
params = parsed.request.params;
|
|
53682
53713
|
ctx = parsed.ctx;
|
|
53683
53714
|
} catch (e) {
|
|
53684
|
-
throw new InvalidInputError("Invalid tasks/get request", e instanceof
|
|
53715
|
+
throw new InvalidInputError("Invalid tasks/get request", e instanceof import_lazy_zod81.z.ZodError ? e.issues : void 0);
|
|
53685
53716
|
}
|
|
53686
53717
|
if (method !== "tasks/get") {
|
|
53687
53718
|
throw new InvalidMethodError(method, "tasks/get");
|
|
@@ -53720,24 +53751,24 @@ var init_tasks_get_flow = __esm({
|
|
|
53720
53751
|
});
|
|
53721
53752
|
|
|
53722
53753
|
// libs/sdk/src/task/flows/tasks-result.flow.ts
|
|
53723
|
-
var
|
|
53754
|
+
var import_lazy_zod82, import_protocol57, inputSchema21, outputSchema20, stateSchema25, plan27, name27, Stage27, TasksResultFlow, JsonRpcReplayError;
|
|
53724
53755
|
var init_tasks_result_flow = __esm({
|
|
53725
53756
|
"libs/sdk/src/task/flows/tasks-result.flow.ts"() {
|
|
53726
53757
|
"use strict";
|
|
53727
|
-
|
|
53758
|
+
import_lazy_zod82 = require("@frontmcp/lazy-zod");
|
|
53728
53759
|
import_protocol57 = require("@frontmcp/protocol");
|
|
53729
53760
|
init_common();
|
|
53730
53761
|
init_errors();
|
|
53731
53762
|
init_task_types();
|
|
53732
|
-
inputSchema21 =
|
|
53763
|
+
inputSchema21 = import_lazy_zod82.z.object({
|
|
53733
53764
|
request: import_protocol57.GetTaskPayloadRequestSchema,
|
|
53734
|
-
ctx:
|
|
53765
|
+
ctx: import_lazy_zod82.z.any()
|
|
53735
53766
|
});
|
|
53736
53767
|
outputSchema20 = import_protocol57.GetTaskPayloadResultSchema;
|
|
53737
|
-
stateSchema25 =
|
|
53738
|
-
taskId:
|
|
53739
|
-
sessionId:
|
|
53740
|
-
authInfo:
|
|
53768
|
+
stateSchema25 = import_lazy_zod82.z.object({
|
|
53769
|
+
taskId: import_lazy_zod82.z.string(),
|
|
53770
|
+
sessionId: import_lazy_zod82.z.string(),
|
|
53771
|
+
authInfo: import_lazy_zod82.z.any()
|
|
53741
53772
|
});
|
|
53742
53773
|
plan27 = {
|
|
53743
53774
|
pre: ["parseInput"],
|
|
@@ -53757,7 +53788,7 @@ var init_tasks_result_flow = __esm({
|
|
|
53757
53788
|
params = parsed.request.params;
|
|
53758
53789
|
ctx = parsed.ctx;
|
|
53759
53790
|
} catch (e) {
|
|
53760
|
-
throw new InvalidInputError("Invalid tasks/result request", e instanceof
|
|
53791
|
+
throw new InvalidInputError("Invalid tasks/result request", e instanceof import_lazy_zod82.z.ZodError ? e.issues : void 0);
|
|
53761
53792
|
}
|
|
53762
53793
|
if (method !== "tasks/result") {
|
|
53763
53794
|
throw new InvalidMethodError(method, "tasks/result");
|
|
@@ -53896,24 +53927,24 @@ var init_tasks_result_flow = __esm({
|
|
|
53896
53927
|
});
|
|
53897
53928
|
|
|
53898
53929
|
// libs/sdk/src/task/flows/tasks-cancel.flow.ts
|
|
53899
|
-
var
|
|
53930
|
+
var import_lazy_zod83, import_protocol58, inputSchema22, outputSchema21, stateSchema26, plan28, name28, Stage28, TasksCancelFlow;
|
|
53900
53931
|
var init_tasks_cancel_flow = __esm({
|
|
53901
53932
|
"libs/sdk/src/task/flows/tasks-cancel.flow.ts"() {
|
|
53902
53933
|
"use strict";
|
|
53903
|
-
|
|
53934
|
+
import_lazy_zod83 = require("@frontmcp/lazy-zod");
|
|
53904
53935
|
import_protocol58 = require("@frontmcp/protocol");
|
|
53905
53936
|
init_common();
|
|
53906
53937
|
init_errors();
|
|
53907
53938
|
init_task_types();
|
|
53908
|
-
inputSchema22 =
|
|
53939
|
+
inputSchema22 = import_lazy_zod83.z.object({
|
|
53909
53940
|
request: import_protocol58.CancelTaskRequestSchema,
|
|
53910
|
-
ctx:
|
|
53941
|
+
ctx: import_lazy_zod83.z.any()
|
|
53911
53942
|
});
|
|
53912
53943
|
outputSchema21 = import_protocol58.CancelTaskResultSchema;
|
|
53913
|
-
stateSchema26 =
|
|
53914
|
-
taskId:
|
|
53915
|
-
sessionId:
|
|
53916
|
-
authInfo:
|
|
53944
|
+
stateSchema26 = import_lazy_zod83.z.object({
|
|
53945
|
+
taskId: import_lazy_zod83.z.string(),
|
|
53946
|
+
sessionId: import_lazy_zod83.z.string(),
|
|
53947
|
+
authInfo: import_lazy_zod83.z.any()
|
|
53917
53948
|
});
|
|
53918
53949
|
plan28 = {
|
|
53919
53950
|
pre: ["parseInput"],
|
|
@@ -53933,7 +53964,7 @@ var init_tasks_cancel_flow = __esm({
|
|
|
53933
53964
|
params = parsed.request.params;
|
|
53934
53965
|
ctx = parsed.ctx;
|
|
53935
53966
|
} catch (e) {
|
|
53936
|
-
throw new InvalidInputError("Invalid tasks/cancel request", e instanceof
|
|
53967
|
+
throw new InvalidInputError("Invalid tasks/cancel request", e instanceof import_lazy_zod83.z.ZodError ? e.issues : void 0);
|
|
53937
53968
|
}
|
|
53938
53969
|
if (method !== "tasks/cancel") {
|
|
53939
53970
|
throw new InvalidMethodError(method, "tasks/cancel");
|
|
@@ -54006,24 +54037,24 @@ var init_tasks_cancel_flow = __esm({
|
|
|
54006
54037
|
});
|
|
54007
54038
|
|
|
54008
54039
|
// libs/sdk/src/task/flows/tasks-list.flow.ts
|
|
54009
|
-
var
|
|
54040
|
+
var import_lazy_zod84, import_protocol59, inputSchema23, outputSchema22, stateSchema27, plan29, name29, Stage29, TasksListFlow;
|
|
54010
54041
|
var init_tasks_list_flow = __esm({
|
|
54011
54042
|
"libs/sdk/src/task/flows/tasks-list.flow.ts"() {
|
|
54012
54043
|
"use strict";
|
|
54013
|
-
|
|
54044
|
+
import_lazy_zod84 = require("@frontmcp/lazy-zod");
|
|
54014
54045
|
import_protocol59 = require("@frontmcp/protocol");
|
|
54015
54046
|
init_common();
|
|
54016
54047
|
init_errors();
|
|
54017
54048
|
init_task_types();
|
|
54018
|
-
inputSchema23 =
|
|
54049
|
+
inputSchema23 = import_lazy_zod84.z.object({
|
|
54019
54050
|
request: import_protocol59.ListTasksRequestSchema,
|
|
54020
|
-
ctx:
|
|
54051
|
+
ctx: import_lazy_zod84.z.any()
|
|
54021
54052
|
});
|
|
54022
54053
|
outputSchema22 = import_protocol59.ListTasksResultSchema;
|
|
54023
|
-
stateSchema27 =
|
|
54024
|
-
sessionId:
|
|
54025
|
-
cursor:
|
|
54026
|
-
authInfo:
|
|
54054
|
+
stateSchema27 = import_lazy_zod84.z.object({
|
|
54055
|
+
sessionId: import_lazy_zod84.z.string(),
|
|
54056
|
+
cursor: import_lazy_zod84.z.string().optional(),
|
|
54057
|
+
authInfo: import_lazy_zod84.z.any()
|
|
54027
54058
|
});
|
|
54028
54059
|
plan29 = {
|
|
54029
54060
|
pre: ["parseInput"],
|
|
@@ -54043,7 +54074,7 @@ var init_tasks_list_flow = __esm({
|
|
|
54043
54074
|
params = parsed.request.params;
|
|
54044
54075
|
ctx = parsed.ctx;
|
|
54045
54076
|
} catch (e) {
|
|
54046
|
-
throw new InvalidInputError("Invalid tasks/list request", e instanceof
|
|
54077
|
+
throw new InvalidInputError("Invalid tasks/list request", e instanceof import_lazy_zod84.z.ZodError ? e.issues : void 0);
|
|
54047
54078
|
}
|
|
54048
54079
|
if (method !== "tasks/list") {
|
|
54049
54080
|
throw new InvalidMethodError(method, "tasks/list");
|
|
@@ -55236,11 +55267,11 @@ var init_hooks = __esm({
|
|
|
55236
55267
|
});
|
|
55237
55268
|
|
|
55238
55269
|
// libs/sdk/src/workflow/tools/execute-workflow.tool.ts
|
|
55239
|
-
var
|
|
55270
|
+
var import_lazy_zod85, ExecuteWorkflowTool;
|
|
55240
55271
|
var init_execute_workflow_tool = __esm({
|
|
55241
55272
|
"libs/sdk/src/workflow/tools/execute-workflow.tool.ts"() {
|
|
55242
55273
|
"use strict";
|
|
55243
|
-
|
|
55274
|
+
import_lazy_zod85 = require("@frontmcp/lazy-zod");
|
|
55244
55275
|
init_common();
|
|
55245
55276
|
init_errors();
|
|
55246
55277
|
ExecuteWorkflowTool = class extends ToolContext {
|
|
@@ -55272,14 +55303,14 @@ var init_execute_workflow_tool = __esm({
|
|
|
55272
55303
|
name: "execute_workflow",
|
|
55273
55304
|
description: "Execute a registered workflow by name. Supports inline and background execution.",
|
|
55274
55305
|
inputSchema: {
|
|
55275
|
-
name:
|
|
55276
|
-
input:
|
|
55277
|
-
background:
|
|
55306
|
+
name: import_lazy_zod85.z.string().describe("Workflow name to execute"),
|
|
55307
|
+
input: import_lazy_zod85.z.record(import_lazy_zod85.z.string(), import_lazy_zod85.z.unknown()).optional().describe("Workflow input data"),
|
|
55308
|
+
background: import_lazy_zod85.z.boolean().optional().default(false).describe("Run in background (returns runId)")
|
|
55278
55309
|
},
|
|
55279
55310
|
outputSchema: {
|
|
55280
|
-
runId:
|
|
55281
|
-
state:
|
|
55282
|
-
result:
|
|
55311
|
+
runId: import_lazy_zod85.z.string(),
|
|
55312
|
+
state: import_lazy_zod85.z.string(),
|
|
55313
|
+
result: import_lazy_zod85.z.unknown().optional()
|
|
55283
55314
|
}
|
|
55284
55315
|
})
|
|
55285
55316
|
], ExecuteWorkflowTool);
|
|
@@ -55287,11 +55318,11 @@ var init_execute_workflow_tool = __esm({
|
|
|
55287
55318
|
});
|
|
55288
55319
|
|
|
55289
55320
|
// libs/sdk/src/workflow/tools/get-workflow-status.tool.ts
|
|
55290
|
-
var
|
|
55321
|
+
var import_lazy_zod86, GetWorkflowStatusTool;
|
|
55291
55322
|
var init_get_workflow_status_tool = __esm({
|
|
55292
55323
|
"libs/sdk/src/workflow/tools/get-workflow-status.tool.ts"() {
|
|
55293
55324
|
"use strict";
|
|
55294
|
-
|
|
55325
|
+
import_lazy_zod86 = require("@frontmcp/lazy-zod");
|
|
55295
55326
|
init_common();
|
|
55296
55327
|
init_principal_utils();
|
|
55297
55328
|
GetWorkflowStatusTool = class extends ToolContext {
|
|
@@ -55338,21 +55369,21 @@ var init_get_workflow_status_tool = __esm({
|
|
|
55338
55369
|
name: "get_workflow_status",
|
|
55339
55370
|
description: "Get the execution status of a workflow run with per-step results.",
|
|
55340
55371
|
inputSchema: {
|
|
55341
|
-
runId:
|
|
55372
|
+
runId: import_lazy_zod86.z.string().describe("Run ID returned from execute_workflow")
|
|
55342
55373
|
},
|
|
55343
55374
|
outputSchema: {
|
|
55344
|
-
runId:
|
|
55345
|
-
workflowName:
|
|
55346
|
-
state:
|
|
55347
|
-
stepResults:
|
|
55348
|
-
|
|
55349
|
-
|
|
55350
|
-
state:
|
|
55351
|
-
outputs:
|
|
55375
|
+
runId: import_lazy_zod86.z.string(),
|
|
55376
|
+
workflowName: import_lazy_zod86.z.string().optional(),
|
|
55377
|
+
state: import_lazy_zod86.z.string(),
|
|
55378
|
+
stepResults: import_lazy_zod86.z.record(
|
|
55379
|
+
import_lazy_zod86.z.string(),
|
|
55380
|
+
import_lazy_zod86.z.object({
|
|
55381
|
+
state: import_lazy_zod86.z.string(),
|
|
55382
|
+
outputs: import_lazy_zod86.z.record(import_lazy_zod86.z.string(), import_lazy_zod86.z.unknown()).optional()
|
|
55352
55383
|
})
|
|
55353
55384
|
).optional(),
|
|
55354
|
-
startedAt:
|
|
55355
|
-
completedAt:
|
|
55385
|
+
startedAt: import_lazy_zod86.z.number(),
|
|
55386
|
+
completedAt: import_lazy_zod86.z.number().optional()
|
|
55356
55387
|
}
|
|
55357
55388
|
})
|
|
55358
55389
|
], GetWorkflowStatusTool);
|
|
@@ -55407,11 +55438,11 @@ var init_job_permission_guard = __esm({
|
|
|
55407
55438
|
});
|
|
55408
55439
|
|
|
55409
55440
|
// libs/sdk/src/workflow/tools/list-workflows.tool.ts
|
|
55410
|
-
var
|
|
55441
|
+
var import_lazy_zod87, ListWorkflowsTool;
|
|
55411
55442
|
var init_list_workflows_tool = __esm({
|
|
55412
55443
|
"libs/sdk/src/workflow/tools/list-workflows.tool.ts"() {
|
|
55413
55444
|
"use strict";
|
|
55414
|
-
|
|
55445
|
+
import_lazy_zod87 = require("@frontmcp/lazy-zod");
|
|
55415
55446
|
init_common();
|
|
55416
55447
|
init_job_permission_guard();
|
|
55417
55448
|
ListWorkflowsTool = class extends ToolContext {
|
|
@@ -55452,21 +55483,21 @@ var init_list_workflows_tool = __esm({
|
|
|
55452
55483
|
name: "list_workflows",
|
|
55453
55484
|
description: "List registered workflows with optional filtering by tags or labels.",
|
|
55454
55485
|
inputSchema: {
|
|
55455
|
-
tags:
|
|
55456
|
-
labels:
|
|
55457
|
-
query:
|
|
55486
|
+
tags: import_lazy_zod87.z.array(import_lazy_zod87.z.string()).optional().describe("Filter by tags"),
|
|
55487
|
+
labels: import_lazy_zod87.z.record(import_lazy_zod87.z.string(), import_lazy_zod87.z.string()).optional().describe("Filter by labels"),
|
|
55488
|
+
query: import_lazy_zod87.z.string().optional().describe("Search query for name/description")
|
|
55458
55489
|
},
|
|
55459
55490
|
outputSchema: {
|
|
55460
|
-
workflows:
|
|
55461
|
-
|
|
55462
|
-
name:
|
|
55463
|
-
description:
|
|
55464
|
-
trigger:
|
|
55465
|
-
stepCount:
|
|
55466
|
-
tags:
|
|
55491
|
+
workflows: import_lazy_zod87.z.array(
|
|
55492
|
+
import_lazy_zod87.z.object({
|
|
55493
|
+
name: import_lazy_zod87.z.string(),
|
|
55494
|
+
description: import_lazy_zod87.z.string().optional(),
|
|
55495
|
+
trigger: import_lazy_zod87.z.string(),
|
|
55496
|
+
stepCount: import_lazy_zod87.z.number(),
|
|
55497
|
+
tags: import_lazy_zod87.z.array(import_lazy_zod87.z.string()).optional()
|
|
55467
55498
|
})
|
|
55468
55499
|
),
|
|
55469
|
-
count:
|
|
55500
|
+
count: import_lazy_zod87.z.number()
|
|
55470
55501
|
},
|
|
55471
55502
|
hideFromDiscovery: true
|
|
55472
55503
|
})
|
|
@@ -55475,11 +55506,11 @@ var init_list_workflows_tool = __esm({
|
|
|
55475
55506
|
});
|
|
55476
55507
|
|
|
55477
55508
|
// libs/sdk/src/workflow/tools/register-workflow.tool.ts
|
|
55478
|
-
var
|
|
55509
|
+
var import_lazy_zod88, RegisterWorkflowTool;
|
|
55479
55510
|
var init_register_workflow_tool = __esm({
|
|
55480
55511
|
"libs/sdk/src/workflow/tools/register-workflow.tool.ts"() {
|
|
55481
55512
|
"use strict";
|
|
55482
|
-
|
|
55513
|
+
import_lazy_zod88 = require("@frontmcp/lazy-zod");
|
|
55483
55514
|
init_common();
|
|
55484
55515
|
init_errors();
|
|
55485
55516
|
RegisterWorkflowTool = class extends ToolContext {
|
|
@@ -55522,24 +55553,24 @@ var init_register_workflow_tool = __esm({
|
|
|
55522
55553
|
name: "register_workflow",
|
|
55523
55554
|
description: "Register a dynamic workflow with step definitions.",
|
|
55524
55555
|
inputSchema: {
|
|
55525
|
-
name:
|
|
55526
|
-
description:
|
|
55527
|
-
steps:
|
|
55528
|
-
|
|
55529
|
-
id:
|
|
55530
|
-
jobName:
|
|
55531
|
-
input:
|
|
55532
|
-
dependsOn:
|
|
55533
|
-
continueOnError:
|
|
55534
|
-
timeout:
|
|
55556
|
+
name: import_lazy_zod88.z.string().describe("Workflow name"),
|
|
55557
|
+
description: import_lazy_zod88.z.string().optional().describe("Workflow description"),
|
|
55558
|
+
steps: import_lazy_zod88.z.array(
|
|
55559
|
+
import_lazy_zod88.z.object({
|
|
55560
|
+
id: import_lazy_zod88.z.string().describe("Step identifier"),
|
|
55561
|
+
jobName: import_lazy_zod88.z.string().describe("Job name to execute"),
|
|
55562
|
+
input: import_lazy_zod88.z.record(import_lazy_zod88.z.string(), import_lazy_zod88.z.unknown()).optional().describe("Static input for the step"),
|
|
55563
|
+
dependsOn: import_lazy_zod88.z.array(import_lazy_zod88.z.string()).optional().describe("Step IDs that must complete first"),
|
|
55564
|
+
continueOnError: import_lazy_zod88.z.boolean().optional().describe("Continue on failure"),
|
|
55565
|
+
timeout: import_lazy_zod88.z.number().optional().describe("Step timeout in ms")
|
|
55535
55566
|
})
|
|
55536
55567
|
).describe("Workflow step definitions"),
|
|
55537
|
-
trigger:
|
|
55538
|
-
tags:
|
|
55568
|
+
trigger: import_lazy_zod88.z.enum(["manual", "webhook", "event"]).optional().describe("Trigger type"),
|
|
55569
|
+
tags: import_lazy_zod88.z.array(import_lazy_zod88.z.string()).optional().describe("Tags for categorization")
|
|
55539
55570
|
},
|
|
55540
55571
|
outputSchema: {
|
|
55541
|
-
success:
|
|
55542
|
-
workflowId:
|
|
55572
|
+
success: import_lazy_zod88.z.boolean(),
|
|
55573
|
+
workflowId: import_lazy_zod88.z.string()
|
|
55543
55574
|
},
|
|
55544
55575
|
hideFromDiscovery: true
|
|
55545
55576
|
})
|
|
@@ -55548,11 +55579,11 @@ var init_register_workflow_tool = __esm({
|
|
|
55548
55579
|
});
|
|
55549
55580
|
|
|
55550
55581
|
// libs/sdk/src/workflow/tools/remove-workflow.tool.ts
|
|
55551
|
-
var
|
|
55582
|
+
var import_lazy_zod89, RemoveWorkflowTool;
|
|
55552
55583
|
var init_remove_workflow_tool = __esm({
|
|
55553
55584
|
"libs/sdk/src/workflow/tools/remove-workflow.tool.ts"() {
|
|
55554
55585
|
"use strict";
|
|
55555
|
-
|
|
55586
|
+
import_lazy_zod89 = require("@frontmcp/lazy-zod");
|
|
55556
55587
|
init_common();
|
|
55557
55588
|
init_errors();
|
|
55558
55589
|
init_job_permission_guard();
|
|
@@ -55590,11 +55621,11 @@ var init_remove_workflow_tool = __esm({
|
|
|
55590
55621
|
name: "remove_workflow",
|
|
55591
55622
|
description: "Remove a dynamic workflow by name.",
|
|
55592
55623
|
inputSchema: {
|
|
55593
|
-
name:
|
|
55624
|
+
name: import_lazy_zod89.z.string().describe("Workflow name to remove")
|
|
55594
55625
|
},
|
|
55595
55626
|
outputSchema: {
|
|
55596
|
-
success:
|
|
55597
|
-
message:
|
|
55627
|
+
success: import_lazy_zod89.z.boolean(),
|
|
55628
|
+
message: import_lazy_zod89.z.string()
|
|
55598
55629
|
},
|
|
55599
55630
|
hideFromDiscovery: true
|
|
55600
55631
|
})
|
|
@@ -56569,11 +56600,11 @@ var init_job_execution_manager = __esm({
|
|
|
56569
56600
|
});
|
|
56570
56601
|
|
|
56571
56602
|
// libs/sdk/src/common/entries/job.entry.ts
|
|
56572
|
-
var
|
|
56603
|
+
var import_lazy_zod90, JobEntry;
|
|
56573
56604
|
var init_job_entry = __esm({
|
|
56574
56605
|
"libs/sdk/src/common/entries/job.entry.ts"() {
|
|
56575
56606
|
"use strict";
|
|
56576
|
-
|
|
56607
|
+
import_lazy_zod90 = require("@frontmcp/lazy-zod");
|
|
56577
56608
|
init_base_entry();
|
|
56578
56609
|
JobEntry = class extends BaseEntry {
|
|
56579
56610
|
owner;
|
|
@@ -56599,7 +56630,7 @@ var init_job_entry = __esm({
|
|
|
56599
56630
|
getInputJsonSchema() {
|
|
56600
56631
|
if (this.inputSchema && Object.keys(this.inputSchema).length > 0) {
|
|
56601
56632
|
try {
|
|
56602
|
-
return (0,
|
|
56633
|
+
return (0, import_lazy_zod90.toJSONSchema)(import_lazy_zod90.z.object(this.inputSchema));
|
|
56603
56634
|
} catch {
|
|
56604
56635
|
return { type: "object", properties: {} };
|
|
56605
56636
|
}
|
|
@@ -56614,12 +56645,12 @@ var init_job_entry = __esm({
|
|
|
56614
56645
|
const outSchema = this.outputSchema;
|
|
56615
56646
|
if (!outSchema) return null;
|
|
56616
56647
|
try {
|
|
56617
|
-
if (outSchema instanceof
|
|
56618
|
-
return (0,
|
|
56648
|
+
if (outSchema instanceof import_lazy_zod90.z.ZodType) {
|
|
56649
|
+
return (0, import_lazy_zod90.toJSONSchema)(outSchema);
|
|
56619
56650
|
}
|
|
56620
56651
|
if (outSchema && typeof outSchema === "object") {
|
|
56621
56652
|
if (Object.keys(outSchema).length === 0) return null;
|
|
56622
|
-
return (0,
|
|
56653
|
+
return (0, import_lazy_zod90.toJSONSchema)(import_lazy_zod90.z.object(outSchema));
|
|
56623
56654
|
}
|
|
56624
56655
|
} catch {
|
|
56625
56656
|
return { type: "object", properties: {} };
|
|
@@ -56635,11 +56666,11 @@ function jobOf(rawInput) {
|
|
|
56635
56666
|
const job = rawInput?.job;
|
|
56636
56667
|
return job instanceof JobEntry ? job : void 0;
|
|
56637
56668
|
}
|
|
56638
|
-
var
|
|
56669
|
+
var import_lazy_zod91, jobEntrySchema, workflowStepSchema2, inputSchema24, outputSchema23, stateSchema28, plan30, name30, jobClassHooksJoin, Stage30, ExecuteJobFlow;
|
|
56639
56670
|
var init_execute_job_flow = __esm({
|
|
56640
56671
|
"libs/sdk/src/job/flows/execute-job.flow.ts"() {
|
|
56641
56672
|
"use strict";
|
|
56642
|
-
|
|
56673
|
+
import_lazy_zod91 = require("@frontmcp/lazy-zod");
|
|
56643
56674
|
init_common();
|
|
56644
56675
|
init_job_entry();
|
|
56645
56676
|
init_job_interface();
|
|
@@ -56649,53 +56680,53 @@ var init_execute_job_flow = __esm({
|
|
|
56649
56680
|
init_job_attempt();
|
|
56650
56681
|
init_job_context_providers();
|
|
56651
56682
|
init_job_permission_guard();
|
|
56652
|
-
jobEntrySchema =
|
|
56653
|
-
workflowStepSchema2 =
|
|
56654
|
-
name:
|
|
56655
|
-
stepId:
|
|
56656
|
-
runId:
|
|
56683
|
+
jobEntrySchema = import_lazy_zod91.z.custom((value) => value instanceof JobEntry, { message: "Expected a job entry" });
|
|
56684
|
+
workflowStepSchema2 = import_lazy_zod91.z.object({
|
|
56685
|
+
name: import_lazy_zod91.z.string().optional(),
|
|
56686
|
+
stepId: import_lazy_zod91.z.string(),
|
|
56687
|
+
runId: import_lazy_zod91.z.string().optional()
|
|
56657
56688
|
});
|
|
56658
|
-
inputSchema24 =
|
|
56689
|
+
inputSchema24 = import_lazy_zod91.z.object({
|
|
56659
56690
|
/** The job to run, as the caller resolved it (a workflow resolves its steps from its own registry). */
|
|
56660
56691
|
job: jobEntrySchema,
|
|
56661
56692
|
/** The job's input, before its `inputSchema` parses it. */
|
|
56662
|
-
input:
|
|
56693
|
+
input: import_lazy_zod91.z.unknown(),
|
|
56663
56694
|
/** 1 for the first attempt, 2 for the first retry, and so on. */
|
|
56664
|
-
attempt:
|
|
56665
|
-
ctx:
|
|
56666
|
-
authInfo:
|
|
56667
|
-
contextProviders:
|
|
56668
|
-
authoritiesContextBuilder:
|
|
56669
|
-
run:
|
|
56695
|
+
attempt: import_lazy_zod91.z.number().int().min(1),
|
|
56696
|
+
ctx: import_lazy_zod91.z.object({
|
|
56697
|
+
authInfo: import_lazy_zod91.z.record(import_lazy_zod91.z.string(), import_lazy_zod91.z.unknown()),
|
|
56698
|
+
contextProviders: import_lazy_zod91.z.unknown().optional(),
|
|
56699
|
+
authoritiesContextBuilder: import_lazy_zod91.z.custom().optional(),
|
|
56700
|
+
run: import_lazy_zod91.z.custom().optional(),
|
|
56670
56701
|
workflow: workflowStepSchema2.optional(),
|
|
56671
|
-
signal:
|
|
56702
|
+
signal: import_lazy_zod91.z.instanceof(AbortSignal).optional()
|
|
56672
56703
|
})
|
|
56673
56704
|
});
|
|
56674
|
-
outputSchema23 =
|
|
56705
|
+
outputSchema23 = import_lazy_zod91.z.object({
|
|
56675
56706
|
/** The job's result, as its `outputSchema` parses it. */
|
|
56676
|
-
result:
|
|
56707
|
+
result: import_lazy_zod91.z.unknown(),
|
|
56677
56708
|
/** What the job logged with `this.log()`. */
|
|
56678
|
-
logs:
|
|
56709
|
+
logs: import_lazy_zod91.z.array(import_lazy_zod91.z.string())
|
|
56679
56710
|
});
|
|
56680
|
-
stateSchema28 =
|
|
56711
|
+
stateSchema28 = import_lazy_zod91.z.object({
|
|
56681
56712
|
job: jobEntrySchema,
|
|
56682
|
-
attempt:
|
|
56713
|
+
attempt: import_lazy_zod91.z.number(),
|
|
56683
56714
|
/** The run this attempt belongs to; undefined for a workflow step. */
|
|
56684
|
-
runId:
|
|
56715
|
+
runId: import_lazy_zod91.z.string().optional(),
|
|
56685
56716
|
/** The workflow step this attempt runs for, if any. */
|
|
56686
56717
|
workflow: workflowStepSchema2.optional(),
|
|
56687
|
-
authInfo:
|
|
56718
|
+
authInfo: import_lazy_zod91.z.record(import_lazy_zod91.z.string(), import_lazy_zod91.z.unknown()),
|
|
56688
56719
|
/** The job's input as given; a hook before `validateInput` may replace it. */
|
|
56689
|
-
input:
|
|
56720
|
+
input: import_lazy_zod91.z.unknown(),
|
|
56690
56721
|
/** The job's input as its `inputSchema` parsed it. */
|
|
56691
|
-
parsedInput:
|
|
56692
|
-
jobContext:
|
|
56722
|
+
parsedInput: import_lazy_zod91.z.custom(),
|
|
56723
|
+
jobContext: import_lazy_zod91.z.instanceof(JobContext),
|
|
56693
56724
|
/** What `execute()` returned, or passed to `this.respond()`. */
|
|
56694
|
-
output:
|
|
56725
|
+
output: import_lazy_zod91.z.custom(),
|
|
56695
56726
|
/** The attempt's answer: set by `validateOutput`, or by a hook that answered for the job with `respond()`. */
|
|
56696
56727
|
answer: outputSchema23,
|
|
56697
56728
|
/** Why the attempt failed, set by the flow runner before the finalize stages. */
|
|
56698
|
-
flowError:
|
|
56729
|
+
flowError: import_lazy_zod91.z.instanceof(Error)
|
|
56699
56730
|
});
|
|
56700
56731
|
plan30 = {
|
|
56701
56732
|
pre: ["parseInput", "checkJobAuthorization", "validateInput", "createJobContext"],
|
|
@@ -56878,11 +56909,11 @@ var init_job_events = __esm({
|
|
|
56878
56909
|
});
|
|
56879
56910
|
|
|
56880
56911
|
// libs/sdk/src/job/job.instance.ts
|
|
56881
|
-
var
|
|
56912
|
+
var import_lazy_zod92, JobInstance, RequestOverAppProviders, FunctionJobContext;
|
|
56882
56913
|
var init_job_instance = __esm({
|
|
56883
56914
|
"libs/sdk/src/job/job.instance.ts"() {
|
|
56884
56915
|
"use strict";
|
|
56885
|
-
|
|
56916
|
+
import_lazy_zod92 = require("@frontmcp/lazy-zod");
|
|
56886
56917
|
init_job_entry();
|
|
56887
56918
|
init_job_interface();
|
|
56888
56919
|
init_errors();
|
|
@@ -56959,17 +56990,17 @@ var init_job_instance = __esm({
|
|
|
56959
56990
|
}
|
|
56960
56991
|
}
|
|
56961
56992
|
parseInput(input) {
|
|
56962
|
-
const inputSchema43 =
|
|
56993
|
+
const inputSchema43 = import_lazy_zod92.z.object(this.inputSchema);
|
|
56963
56994
|
return inputSchema43.parse(input);
|
|
56964
56995
|
}
|
|
56965
56996
|
/** The result as the job's `outputSchema` accepts it; an empty raw shape checks nothing. */
|
|
56966
56997
|
parseOutput(raw) {
|
|
56967
56998
|
const outSchema = this.outputSchema;
|
|
56968
56999
|
let schema;
|
|
56969
|
-
if (outSchema instanceof
|
|
57000
|
+
if (outSchema instanceof import_lazy_zod92.z.ZodType) {
|
|
56970
57001
|
schema = outSchema;
|
|
56971
57002
|
} else if (outSchema && typeof outSchema === "object" && Object.keys(outSchema).length > 0) {
|
|
56972
|
-
schema =
|
|
57003
|
+
schema = import_lazy_zod92.z.object(outSchema);
|
|
56973
57004
|
}
|
|
56974
57005
|
if (!schema) return raw;
|
|
56975
57006
|
const parsed = schema.safeParse(raw);
|
|
@@ -57612,11 +57643,11 @@ var init_job_state_store_factory = __esm({
|
|
|
57612
57643
|
});
|
|
57613
57644
|
|
|
57614
57645
|
// libs/sdk/src/job/tools/execute-job.tool.ts
|
|
57615
|
-
var
|
|
57646
|
+
var import_lazy_zod93, ExecuteJobTool;
|
|
57616
57647
|
var init_execute_job_tool = __esm({
|
|
57617
57648
|
"libs/sdk/src/job/tools/execute-job.tool.ts"() {
|
|
57618
57649
|
"use strict";
|
|
57619
|
-
|
|
57650
|
+
import_lazy_zod93 = require("@frontmcp/lazy-zod");
|
|
57620
57651
|
init_common();
|
|
57621
57652
|
init_errors();
|
|
57622
57653
|
ExecuteJobTool = class extends ToolContext {
|
|
@@ -57646,15 +57677,15 @@ var init_execute_job_tool = __esm({
|
|
|
57646
57677
|
name: "execute_job",
|
|
57647
57678
|
description: "Execute a registered job by name. Supports inline (synchronous) and background execution.",
|
|
57648
57679
|
inputSchema: {
|
|
57649
|
-
name:
|
|
57650
|
-
input:
|
|
57651
|
-
background:
|
|
57680
|
+
name: import_lazy_zod93.z.string().describe("Job name to execute"),
|
|
57681
|
+
input: import_lazy_zod93.z.record(import_lazy_zod93.z.string(), import_lazy_zod93.z.unknown()).optional().describe("Job input data"),
|
|
57682
|
+
background: import_lazy_zod93.z.boolean().optional().default(false).describe("Run in background (returns runId for status polling)")
|
|
57652
57683
|
},
|
|
57653
57684
|
outputSchema: {
|
|
57654
|
-
runId:
|
|
57655
|
-
state:
|
|
57656
|
-
result:
|
|
57657
|
-
logs:
|
|
57685
|
+
runId: import_lazy_zod93.z.string(),
|
|
57686
|
+
state: import_lazy_zod93.z.string(),
|
|
57687
|
+
result: import_lazy_zod93.z.unknown().optional(),
|
|
57688
|
+
logs: import_lazy_zod93.z.array(import_lazy_zod93.z.string()).optional()
|
|
57658
57689
|
}
|
|
57659
57690
|
})
|
|
57660
57691
|
], ExecuteJobTool);
|
|
@@ -57662,11 +57693,11 @@ var init_execute_job_tool = __esm({
|
|
|
57662
57693
|
});
|
|
57663
57694
|
|
|
57664
57695
|
// libs/sdk/src/job/tools/get-job-status.tool.ts
|
|
57665
|
-
var
|
|
57696
|
+
var import_lazy_zod94, GetJobStatusTool;
|
|
57666
57697
|
var init_get_job_status_tool = __esm({
|
|
57667
57698
|
"libs/sdk/src/job/tools/get-job-status.tool.ts"() {
|
|
57668
57699
|
"use strict";
|
|
57669
|
-
|
|
57700
|
+
import_lazy_zod94 = require("@frontmcp/lazy-zod");
|
|
57670
57701
|
init_common();
|
|
57671
57702
|
init_principal_utils();
|
|
57672
57703
|
init_errors();
|
|
@@ -57716,21 +57747,21 @@ var init_get_job_status_tool = __esm({
|
|
|
57716
57747
|
name: "get_job_status",
|
|
57717
57748
|
description: "Get the execution status of a job run by runId.",
|
|
57718
57749
|
inputSchema: {
|
|
57719
|
-
runId:
|
|
57750
|
+
runId: import_lazy_zod94.z.string().describe("Run ID returned from execute_job or execute_workflow")
|
|
57720
57751
|
},
|
|
57721
57752
|
outputSchema: {
|
|
57722
|
-
runId:
|
|
57723
|
-
jobName:
|
|
57724
|
-
state:
|
|
57725
|
-
result:
|
|
57726
|
-
error:
|
|
57727
|
-
message:
|
|
57728
|
-
name:
|
|
57753
|
+
runId: import_lazy_zod94.z.string(),
|
|
57754
|
+
jobName: import_lazy_zod94.z.string(),
|
|
57755
|
+
state: import_lazy_zod94.z.string(),
|
|
57756
|
+
result: import_lazy_zod94.z.unknown().optional(),
|
|
57757
|
+
error: import_lazy_zod94.z.object({
|
|
57758
|
+
message: import_lazy_zod94.z.string(),
|
|
57759
|
+
name: import_lazy_zod94.z.string()
|
|
57729
57760
|
}).optional(),
|
|
57730
|
-
startedAt:
|
|
57731
|
-
completedAt:
|
|
57732
|
-
attempt:
|
|
57733
|
-
logs:
|
|
57761
|
+
startedAt: import_lazy_zod94.z.number(),
|
|
57762
|
+
completedAt: import_lazy_zod94.z.number().optional(),
|
|
57763
|
+
attempt: import_lazy_zod94.z.number(),
|
|
57764
|
+
logs: import_lazy_zod94.z.array(import_lazy_zod94.z.string())
|
|
57734
57765
|
}
|
|
57735
57766
|
})
|
|
57736
57767
|
], GetJobStatusTool);
|
|
@@ -57738,11 +57769,11 @@ var init_get_job_status_tool = __esm({
|
|
|
57738
57769
|
});
|
|
57739
57770
|
|
|
57740
57771
|
// libs/sdk/src/job/tools/list-jobs.tool.ts
|
|
57741
|
-
var
|
|
57772
|
+
var import_lazy_zod95, ListJobsTool;
|
|
57742
57773
|
var init_list_jobs_tool = __esm({
|
|
57743
57774
|
"libs/sdk/src/job/tools/list-jobs.tool.ts"() {
|
|
57744
57775
|
"use strict";
|
|
57745
|
-
|
|
57776
|
+
import_lazy_zod95 = require("@frontmcp/lazy-zod");
|
|
57746
57777
|
init_common();
|
|
57747
57778
|
init_job_permission_guard();
|
|
57748
57779
|
ListJobsTool = class extends ToolContext {
|
|
@@ -57788,21 +57819,21 @@ var init_list_jobs_tool = __esm({
|
|
|
57788
57819
|
name: "list_jobs",
|
|
57789
57820
|
description: "List registered jobs with optional filtering by tags or labels.",
|
|
57790
57821
|
inputSchema: {
|
|
57791
|
-
tags:
|
|
57792
|
-
labels:
|
|
57793
|
-
query:
|
|
57822
|
+
tags: import_lazy_zod95.z.array(import_lazy_zod95.z.string()).optional().describe("Filter by tags"),
|
|
57823
|
+
labels: import_lazy_zod95.z.record(import_lazy_zod95.z.string(), import_lazy_zod95.z.string()).optional().describe("Filter by labels"),
|
|
57824
|
+
query: import_lazy_zod95.z.string().optional().describe("Search query for name/description")
|
|
57794
57825
|
},
|
|
57795
57826
|
outputSchema: {
|
|
57796
|
-
jobs:
|
|
57797
|
-
|
|
57798
|
-
name:
|
|
57799
|
-
description:
|
|
57800
|
-
tags:
|
|
57801
|
-
labels:
|
|
57802
|
-
inputSchema:
|
|
57827
|
+
jobs: import_lazy_zod95.z.array(
|
|
57828
|
+
import_lazy_zod95.z.object({
|
|
57829
|
+
name: import_lazy_zod95.z.string(),
|
|
57830
|
+
description: import_lazy_zod95.z.string().optional(),
|
|
57831
|
+
tags: import_lazy_zod95.z.array(import_lazy_zod95.z.string()).optional(),
|
|
57832
|
+
labels: import_lazy_zod95.z.record(import_lazy_zod95.z.string(), import_lazy_zod95.z.string()).optional(),
|
|
57833
|
+
inputSchema: import_lazy_zod95.z.record(import_lazy_zod95.z.string(), import_lazy_zod95.z.unknown()).optional()
|
|
57803
57834
|
})
|
|
57804
57835
|
),
|
|
57805
|
-
count:
|
|
57836
|
+
count: import_lazy_zod95.z.number()
|
|
57806
57837
|
},
|
|
57807
57838
|
hideFromDiscovery: true
|
|
57808
57839
|
})
|
|
@@ -57811,11 +57842,11 @@ var init_list_jobs_tool = __esm({
|
|
|
57811
57842
|
});
|
|
57812
57843
|
|
|
57813
57844
|
// libs/sdk/src/job/tools/register-job.tool.ts
|
|
57814
|
-
var
|
|
57845
|
+
var import_lazy_zod96, RegisterJobTool;
|
|
57815
57846
|
var init_register_job_tool = __esm({
|
|
57816
57847
|
"libs/sdk/src/job/tools/register-job.tool.ts"() {
|
|
57817
57848
|
"use strict";
|
|
57818
|
-
|
|
57849
|
+
import_lazy_zod96 = require("@frontmcp/lazy-zod");
|
|
57819
57850
|
init_common();
|
|
57820
57851
|
init_errors();
|
|
57821
57852
|
RegisterJobTool = class extends ToolContext {
|
|
@@ -57859,16 +57890,16 @@ var init_register_job_tool = __esm({
|
|
|
57859
57890
|
name: "register_job",
|
|
57860
57891
|
description: "Register a dynamic job that runs in a sandboxed environment.",
|
|
57861
57892
|
inputSchema: {
|
|
57862
|
-
name:
|
|
57863
|
-
description:
|
|
57864
|
-
script:
|
|
57865
|
-
inputSchema:
|
|
57866
|
-
outputSchema:
|
|
57867
|
-
tags:
|
|
57893
|
+
name: import_lazy_zod96.z.string().describe("Job name"),
|
|
57894
|
+
description: import_lazy_zod96.z.string().optional().describe("Job description"),
|
|
57895
|
+
script: import_lazy_zod96.z.string().describe("JavaScript source code for the job"),
|
|
57896
|
+
inputSchema: import_lazy_zod96.z.record(import_lazy_zod96.z.string(), import_lazy_zod96.z.unknown()).optional().describe("JSON Schema for input"),
|
|
57897
|
+
outputSchema: import_lazy_zod96.z.record(import_lazy_zod96.z.string(), import_lazy_zod96.z.unknown()).optional().describe("JSON Schema for output"),
|
|
57898
|
+
tags: import_lazy_zod96.z.array(import_lazy_zod96.z.string()).optional().describe("Tags for categorization")
|
|
57868
57899
|
},
|
|
57869
57900
|
outputSchema: {
|
|
57870
|
-
success:
|
|
57871
|
-
jobId:
|
|
57901
|
+
success: import_lazy_zod96.z.boolean(),
|
|
57902
|
+
jobId: import_lazy_zod96.z.string()
|
|
57872
57903
|
},
|
|
57873
57904
|
hideFromDiscovery: true
|
|
57874
57905
|
})
|
|
@@ -57877,11 +57908,11 @@ var init_register_job_tool = __esm({
|
|
|
57877
57908
|
});
|
|
57878
57909
|
|
|
57879
57910
|
// libs/sdk/src/job/tools/remove-job.tool.ts
|
|
57880
|
-
var
|
|
57911
|
+
var import_lazy_zod97, RemoveJobTool;
|
|
57881
57912
|
var init_remove_job_tool = __esm({
|
|
57882
57913
|
"libs/sdk/src/job/tools/remove-job.tool.ts"() {
|
|
57883
57914
|
"use strict";
|
|
57884
|
-
|
|
57915
|
+
import_lazy_zod97 = require("@frontmcp/lazy-zod");
|
|
57885
57916
|
init_common();
|
|
57886
57917
|
init_errors();
|
|
57887
57918
|
init_job_permission_guard();
|
|
@@ -57919,11 +57950,11 @@ var init_remove_job_tool = __esm({
|
|
|
57919
57950
|
name: "remove_job",
|
|
57920
57951
|
description: "Remove a dynamic job by name.",
|
|
57921
57952
|
inputSchema: {
|
|
57922
|
-
name:
|
|
57953
|
+
name: import_lazy_zod97.z.string().describe("Job name to remove")
|
|
57923
57954
|
},
|
|
57924
57955
|
outputSchema: {
|
|
57925
|
-
success:
|
|
57926
|
-
message:
|
|
57956
|
+
success: import_lazy_zod97.z.boolean(),
|
|
57957
|
+
message: import_lazy_zod97.z.string()
|
|
57927
57958
|
},
|
|
57928
57959
|
hideFromDiscovery: true
|
|
57929
57960
|
})
|
|
@@ -58055,59 +58086,59 @@ var init_flows2 = __esm({
|
|
|
58055
58086
|
});
|
|
58056
58087
|
|
|
58057
58088
|
// libs/sdk/src/elicitation/flows/elicitation-request.flow.ts
|
|
58058
|
-
var
|
|
58089
|
+
var import_lazy_zod98, import_utils115, inputSchema25, outputSchema24, stateSchema29, plan31, name31, Stage31, ElicitationRequestFlow;
|
|
58059
58090
|
var init_elicitation_request_flow = __esm({
|
|
58060
58091
|
"libs/sdk/src/elicitation/flows/elicitation-request.flow.ts"() {
|
|
58061
58092
|
"use strict";
|
|
58062
|
-
|
|
58093
|
+
import_lazy_zod98 = require("@frontmcp/lazy-zod");
|
|
58063
58094
|
import_utils115 = require("@frontmcp/utils");
|
|
58064
58095
|
init_common();
|
|
58065
58096
|
init_errors();
|
|
58066
58097
|
init_elicitation_types();
|
|
58067
|
-
inputSchema25 =
|
|
58098
|
+
inputSchema25 = import_lazy_zod98.z.object({
|
|
58068
58099
|
/** Related request ID from the transport */
|
|
58069
|
-
relatedRequestId:
|
|
58100
|
+
relatedRequestId: import_lazy_zod98.z.union([import_lazy_zod98.z.string(), import_lazy_zod98.z.number()]),
|
|
58070
58101
|
/** Session ID for the elicitation */
|
|
58071
|
-
sessionId:
|
|
58102
|
+
sessionId: import_lazy_zod98.z.string(),
|
|
58072
58103
|
/** Message to display to the user */
|
|
58073
|
-
message:
|
|
58104
|
+
message: import_lazy_zod98.z.string(),
|
|
58074
58105
|
/** JSON Schema for the expected response (already converted from Zod) */
|
|
58075
|
-
requestedSchema:
|
|
58106
|
+
requestedSchema: import_lazy_zod98.z.record(import_lazy_zod98.z.string(), import_lazy_zod98.z.unknown()),
|
|
58076
58107
|
/** Elicitation options */
|
|
58077
|
-
options:
|
|
58078
|
-
mode:
|
|
58079
|
-
ttl:
|
|
58080
|
-
elicitationId:
|
|
58081
|
-
url:
|
|
58108
|
+
options: import_lazy_zod98.z.object({
|
|
58109
|
+
mode: import_lazy_zod98.z.enum(["form", "url"]).optional(),
|
|
58110
|
+
ttl: import_lazy_zod98.z.number().optional(),
|
|
58111
|
+
elicitationId: import_lazy_zod98.z.string().optional(),
|
|
58112
|
+
url: import_lazy_zod98.z.string().optional()
|
|
58082
58113
|
}).optional()
|
|
58083
58114
|
});
|
|
58084
|
-
outputSchema24 =
|
|
58115
|
+
outputSchema24 = import_lazy_zod98.z.object({
|
|
58085
58116
|
/** Generated or provided elicit ID */
|
|
58086
|
-
elicitId:
|
|
58117
|
+
elicitId: import_lazy_zod98.z.string(),
|
|
58087
58118
|
/** Session ID */
|
|
58088
|
-
sessionId:
|
|
58119
|
+
sessionId: import_lazy_zod98.z.string(),
|
|
58089
58120
|
/** Expiration timestamp */
|
|
58090
|
-
expiresAt:
|
|
58121
|
+
expiresAt: import_lazy_zod98.z.number(),
|
|
58091
58122
|
/** Elicitation mode */
|
|
58092
|
-
mode:
|
|
58123
|
+
mode: import_lazy_zod98.z.enum(["form", "url"]),
|
|
58093
58124
|
/** Request parameters to send to client */
|
|
58094
|
-
requestParams:
|
|
58125
|
+
requestParams: import_lazy_zod98.z.record(import_lazy_zod98.z.string(), import_lazy_zod98.z.unknown()),
|
|
58095
58126
|
/** The pending record that was stored */
|
|
58096
|
-
pendingRecord:
|
|
58127
|
+
pendingRecord: import_lazy_zod98.z.any()
|
|
58097
58128
|
});
|
|
58098
|
-
stateSchema29 =
|
|
58099
|
-
relatedRequestId:
|
|
58100
|
-
sessionId:
|
|
58101
|
-
message:
|
|
58102
|
-
requestedSchema:
|
|
58103
|
-
mode:
|
|
58104
|
-
ttl:
|
|
58105
|
-
elicitationId:
|
|
58106
|
-
url:
|
|
58107
|
-
elicitId:
|
|
58108
|
-
expiresAt:
|
|
58109
|
-
pendingRecord:
|
|
58110
|
-
requestParams:
|
|
58129
|
+
stateSchema29 = import_lazy_zod98.z.object({
|
|
58130
|
+
relatedRequestId: import_lazy_zod98.z.union([import_lazy_zod98.z.string(), import_lazy_zod98.z.number()]),
|
|
58131
|
+
sessionId: import_lazy_zod98.z.string(),
|
|
58132
|
+
message: import_lazy_zod98.z.string(),
|
|
58133
|
+
requestedSchema: import_lazy_zod98.z.record(import_lazy_zod98.z.string(), import_lazy_zod98.z.unknown()),
|
|
58134
|
+
mode: import_lazy_zod98.z.enum(["form", "url"]).default("form"),
|
|
58135
|
+
ttl: import_lazy_zod98.z.number().default(DEFAULT_ELICIT_TTL),
|
|
58136
|
+
elicitationId: import_lazy_zod98.z.string().optional(),
|
|
58137
|
+
url: import_lazy_zod98.z.string().optional(),
|
|
58138
|
+
elicitId: import_lazy_zod98.z.string(),
|
|
58139
|
+
expiresAt: import_lazy_zod98.z.number(),
|
|
58140
|
+
pendingRecord: import_lazy_zod98.z.any().optional(),
|
|
58141
|
+
requestParams: import_lazy_zod98.z.record(import_lazy_zod98.z.string(), import_lazy_zod98.z.unknown()).optional(),
|
|
58111
58142
|
output: outputSchema24.optional()
|
|
58112
58143
|
});
|
|
58113
58144
|
plan31 = {
|
|
@@ -58235,38 +58266,38 @@ var init_elicitation_request_flow = __esm({
|
|
|
58235
58266
|
});
|
|
58236
58267
|
|
|
58237
58268
|
// libs/sdk/src/elicitation/flows/elicitation-result.flow.ts
|
|
58238
|
-
var
|
|
58269
|
+
var import_lazy_zod99, inputSchema26, outputSchema25, stateSchema30, plan32, name32, Stage32, ElicitationResultFlow;
|
|
58239
58270
|
var init_elicitation_result_flow = __esm({
|
|
58240
58271
|
"libs/sdk/src/elicitation/flows/elicitation-result.flow.ts"() {
|
|
58241
58272
|
"use strict";
|
|
58242
|
-
|
|
58273
|
+
import_lazy_zod99 = require("@frontmcp/lazy-zod");
|
|
58243
58274
|
init_common();
|
|
58244
58275
|
init_errors();
|
|
58245
58276
|
init_helpers();
|
|
58246
|
-
inputSchema26 =
|
|
58277
|
+
inputSchema26 = import_lazy_zod99.z.object({
|
|
58247
58278
|
/** Session ID for the elicitation */
|
|
58248
|
-
sessionId:
|
|
58279
|
+
sessionId: import_lazy_zod99.z.string(),
|
|
58249
58280
|
/** The result from the client */
|
|
58250
|
-
result:
|
|
58251
|
-
action:
|
|
58252
|
-
content:
|
|
58281
|
+
result: import_lazy_zod99.z.object({
|
|
58282
|
+
action: import_lazy_zod99.z.enum(["accept", "cancel", "decline"]),
|
|
58283
|
+
content: import_lazy_zod99.z.unknown().optional()
|
|
58253
58284
|
})
|
|
58254
58285
|
});
|
|
58255
|
-
outputSchema25 =
|
|
58286
|
+
outputSchema25 = import_lazy_zod99.z.object({
|
|
58256
58287
|
/** Whether the result was handled */
|
|
58257
|
-
handled:
|
|
58288
|
+
handled: import_lazy_zod99.z.boolean(),
|
|
58258
58289
|
/** The elicit ID (if pending was found) */
|
|
58259
|
-
elicitId:
|
|
58290
|
+
elicitId: import_lazy_zod99.z.string().optional(),
|
|
58260
58291
|
/** The processed result */
|
|
58261
|
-
result:
|
|
58292
|
+
result: import_lazy_zod99.z.any().optional()
|
|
58262
58293
|
});
|
|
58263
|
-
stateSchema30 =
|
|
58264
|
-
sessionId:
|
|
58265
|
-
action:
|
|
58266
|
-
content:
|
|
58267
|
-
pendingRecord:
|
|
58268
|
-
elicitResult:
|
|
58269
|
-
handled:
|
|
58294
|
+
stateSchema30 = import_lazy_zod99.z.object({
|
|
58295
|
+
sessionId: import_lazy_zod99.z.string(),
|
|
58296
|
+
action: import_lazy_zod99.z.enum(["accept", "cancel", "decline"]),
|
|
58297
|
+
content: import_lazy_zod99.z.unknown().optional(),
|
|
58298
|
+
pendingRecord: import_lazy_zod99.z.any().optional(),
|
|
58299
|
+
elicitResult: import_lazy_zod99.z.any().optional(),
|
|
58300
|
+
handled: import_lazy_zod99.z.boolean().default(false),
|
|
58270
58301
|
output: outputSchema25.optional()
|
|
58271
58302
|
});
|
|
58272
58303
|
plan32 = {
|
|
@@ -58528,11 +58559,11 @@ function ifNoneMatchIncludes(ifNoneMatch, etag) {
|
|
|
58528
58559
|
const candidates = (ifNoneMatch ?? "").split(",").map((candidate) => candidate.trim().replace(/^W\//, ""));
|
|
58529
58560
|
return candidates.includes("*") || candidates.includes(etag);
|
|
58530
58561
|
}
|
|
58531
|
-
var
|
|
58562
|
+
var import_lazy_zod100, import_utils117, SERVER_CARD_SCHEMA_URL, MAX_TITLE_LENGTH, MAX_ICON_SRC_LENGTH, SERVER_CARD_CORS_HEADERS, isHttpsUrl, inputSchema28, stateSchema31, outputSchema27, plan34, name34, Stage34, ServerCardFlow;
|
|
58532
58563
|
var init_server_card_flow = __esm({
|
|
58533
58564
|
"libs/sdk/src/mcp-registry/flows/server-card.flow.ts"() {
|
|
58534
58565
|
"use strict";
|
|
58535
|
-
|
|
58566
|
+
import_lazy_zod100 = require("@frontmcp/lazy-zod");
|
|
58536
58567
|
import_utils117 = require("@frontmcp/utils");
|
|
58537
58568
|
init_common();
|
|
58538
58569
|
init_protocol_20260728_constants();
|
|
@@ -58548,10 +58579,10 @@ var init_server_card_flow = __esm({
|
|
|
58548
58579
|
};
|
|
58549
58580
|
isHttpsUrl = (url) => url.startsWith("https://");
|
|
58550
58581
|
inputSchema28 = httpInputSchema;
|
|
58551
|
-
stateSchema31 =
|
|
58552
|
-
card:
|
|
58582
|
+
stateSchema31 = import_lazy_zod100.z.object({
|
|
58583
|
+
card: import_lazy_zod100.z.record(import_lazy_zod100.z.string(), import_lazy_zod100.z.unknown())
|
|
58553
58584
|
});
|
|
58554
|
-
outputSchema27 =
|
|
58585
|
+
outputSchema27 = import_lazy_zod100.z.union([HttpJsonSchema, HttpEmptySchema, HttpTextSchema]);
|
|
58555
58586
|
plan34 = {
|
|
58556
58587
|
pre: ["checkIpFilter", "acquireQuota", "answerPreflight"],
|
|
58557
58588
|
execute: ["buildCard", "respondWithCard"]
|
|
@@ -58644,16 +58675,16 @@ function aiCatalogIdentifier(registryName) {
|
|
|
58644
58675
|
const [namespace, serverName] = registryName.split("/");
|
|
58645
58676
|
return `urn:air:${namespace.split(".").reverse().join(".")}:mcp:${serverName}`;
|
|
58646
58677
|
}
|
|
58647
|
-
var
|
|
58678
|
+
var import_lazy_zod101, AI_CATALOG_PATH, inputSchema29, outputSchema28, plan35, name35, Stage35, WellKnownAiCatalogFlow;
|
|
58648
58679
|
var init_well_known_ai_catalog_flow = __esm({
|
|
58649
58680
|
"libs/sdk/src/mcp-registry/flows/well-known.ai-catalog.flow.ts"() {
|
|
58650
58681
|
"use strict";
|
|
58651
|
-
|
|
58682
|
+
import_lazy_zod101 = require("@frontmcp/lazy-zod");
|
|
58652
58683
|
init_common();
|
|
58653
58684
|
init_mcp_registry_utils();
|
|
58654
58685
|
AI_CATALOG_PATH = "/.well-known/ai-catalog.json";
|
|
58655
58686
|
inputSchema29 = httpInputSchema;
|
|
58656
|
-
outputSchema28 =
|
|
58687
|
+
outputSchema28 = import_lazy_zod101.z.union([HttpJsonSchema, HttpTextSchema]);
|
|
58657
58688
|
plan35 = {
|
|
58658
58689
|
pre: ["checkIpFilter", "acquireQuota"],
|
|
58659
58690
|
execute: ["serveCatalog"]
|
|
@@ -59728,25 +59759,25 @@ var init_channel_registry = __esm({
|
|
|
59728
59759
|
});
|
|
59729
59760
|
|
|
59730
59761
|
// libs/sdk/src/channel/flows/list-channels.flow.ts
|
|
59731
|
-
var
|
|
59762
|
+
var import_lazy_zod102, inputSchema30, channelInfoSchema, outputSchema29, stateSchema32, plan36, name36, Stage36, ListChannelsFlow;
|
|
59732
59763
|
var init_list_channels_flow = __esm({
|
|
59733
59764
|
"libs/sdk/src/channel/flows/list-channels.flow.ts"() {
|
|
59734
59765
|
"use strict";
|
|
59735
|
-
|
|
59766
|
+
import_lazy_zod102 = require("@frontmcp/lazy-zod");
|
|
59736
59767
|
init_common();
|
|
59737
|
-
inputSchema30 =
|
|
59738
|
-
channelInfoSchema =
|
|
59739
|
-
name:
|
|
59740
|
-
description:
|
|
59741
|
-
sourceType:
|
|
59742
|
-
twoWay:
|
|
59743
|
-
tags:
|
|
59768
|
+
inputSchema30 = import_lazy_zod102.z.object({}).optional();
|
|
59769
|
+
channelInfoSchema = import_lazy_zod102.z.object({
|
|
59770
|
+
name: import_lazy_zod102.z.string(),
|
|
59771
|
+
description: import_lazy_zod102.z.string().optional(),
|
|
59772
|
+
sourceType: import_lazy_zod102.z.string(),
|
|
59773
|
+
twoWay: import_lazy_zod102.z.boolean(),
|
|
59774
|
+
tags: import_lazy_zod102.z.array(import_lazy_zod102.z.string())
|
|
59744
59775
|
});
|
|
59745
|
-
outputSchema29 =
|
|
59746
|
-
channels:
|
|
59747
|
-
count:
|
|
59776
|
+
outputSchema29 = import_lazy_zod102.z.object({
|
|
59777
|
+
channels: import_lazy_zod102.z.array(channelInfoSchema),
|
|
59778
|
+
count: import_lazy_zod102.z.number()
|
|
59748
59779
|
});
|
|
59749
|
-
stateSchema32 =
|
|
59780
|
+
stateSchema32 = import_lazy_zod102.z.object({
|
|
59750
59781
|
output: outputSchema29.optional()
|
|
59751
59782
|
});
|
|
59752
59783
|
plan36 = {
|
|
@@ -59799,29 +59830,29 @@ var init_list_channels_flow = __esm({
|
|
|
59799
59830
|
});
|
|
59800
59831
|
|
|
59801
59832
|
// libs/sdk/src/channel/flows/send-channel-notification.flow.ts
|
|
59802
|
-
var
|
|
59833
|
+
var import_lazy_zod103, inputSchema31, outputSchema30, stateSchema33, plan37, name37, Stage37, SendChannelNotificationFlow;
|
|
59803
59834
|
var init_send_channel_notification_flow = __esm({
|
|
59804
59835
|
"libs/sdk/src/channel/flows/send-channel-notification.flow.ts"() {
|
|
59805
59836
|
"use strict";
|
|
59806
|
-
|
|
59837
|
+
import_lazy_zod103 = require("@frontmcp/lazy-zod");
|
|
59807
59838
|
init_common();
|
|
59808
59839
|
init_errors();
|
|
59809
|
-
inputSchema31 =
|
|
59810
|
-
channelName:
|
|
59811
|
-
content:
|
|
59812
|
-
meta:
|
|
59840
|
+
inputSchema31 = import_lazy_zod103.z.object({
|
|
59841
|
+
channelName: import_lazy_zod103.z.string().min(1),
|
|
59842
|
+
content: import_lazy_zod103.z.string().min(1),
|
|
59843
|
+
meta: import_lazy_zod103.z.record(import_lazy_zod103.z.string(), import_lazy_zod103.z.string()).optional(),
|
|
59813
59844
|
/** Deliver to this session only (session-scoped events such as agent and job completions). */
|
|
59814
|
-
targetSessionId:
|
|
59845
|
+
targetSessionId: import_lazy_zod103.z.string().min(1).optional()
|
|
59815
59846
|
});
|
|
59816
|
-
outputSchema30 =
|
|
59817
|
-
sent:
|
|
59818
|
-
channelName:
|
|
59847
|
+
outputSchema30 = import_lazy_zod103.z.object({
|
|
59848
|
+
sent: import_lazy_zod103.z.boolean(),
|
|
59849
|
+
channelName: import_lazy_zod103.z.string()
|
|
59819
59850
|
});
|
|
59820
|
-
stateSchema33 =
|
|
59821
|
-
channelName:
|
|
59822
|
-
content:
|
|
59823
|
-
meta:
|
|
59824
|
-
targetSessionId:
|
|
59851
|
+
stateSchema33 = import_lazy_zod103.z.object({
|
|
59852
|
+
channelName: import_lazy_zod103.z.string(),
|
|
59853
|
+
content: import_lazy_zod103.z.string(),
|
|
59854
|
+
meta: import_lazy_zod103.z.record(import_lazy_zod103.z.string(), import_lazy_zod103.z.string()).optional(),
|
|
59855
|
+
targetSessionId: import_lazy_zod103.z.string().optional(),
|
|
59825
59856
|
output: outputSchema30.optional()
|
|
59826
59857
|
});
|
|
59827
59858
|
plan37 = {
|
|
@@ -59839,7 +59870,7 @@ var init_send_channel_notification_flow = __esm({
|
|
|
59839
59870
|
try {
|
|
59840
59871
|
data = inputSchema31.parse(this.rawInput);
|
|
59841
59872
|
} catch (e) {
|
|
59842
|
-
throw new InvalidInputError("Invalid channel notification input", e instanceof
|
|
59873
|
+
throw new InvalidInputError("Invalid channel notification input", e instanceof import_lazy_zod103.z.ZodError ? e.issues : void 0);
|
|
59843
59874
|
}
|
|
59844
59875
|
this.state.set({
|
|
59845
59876
|
channelName: data.channelName,
|
|
@@ -59913,15 +59944,15 @@ var init_send_channel_notification_flow = __esm({
|
|
|
59913
59944
|
});
|
|
59914
59945
|
|
|
59915
59946
|
// libs/sdk/src/channel/reply/reply.types.ts
|
|
59916
|
-
var
|
|
59947
|
+
var import_lazy_zod104, channelReplyInputSchema;
|
|
59917
59948
|
var init_reply_types = __esm({
|
|
59918
59949
|
"libs/sdk/src/channel/reply/reply.types.ts"() {
|
|
59919
59950
|
"use strict";
|
|
59920
|
-
|
|
59951
|
+
import_lazy_zod104 = require("@frontmcp/lazy-zod");
|
|
59921
59952
|
channelReplyInputSchema = {
|
|
59922
|
-
channel_name:
|
|
59923
|
-
text:
|
|
59924
|
-
meta:
|
|
59953
|
+
channel_name: import_lazy_zod104.z.string().describe("The name of the channel to reply to"),
|
|
59954
|
+
text: import_lazy_zod104.z.string().describe("The reply text to send back through the channel"),
|
|
59955
|
+
meta: import_lazy_zod104.z.record(import_lazy_zod104.z.string(), import_lazy_zod104.z.string()).optional().describe("Optional metadata for the reply")
|
|
59925
59956
|
};
|
|
59926
59957
|
}
|
|
59927
59958
|
});
|
|
@@ -60432,18 +60463,18 @@ function timingSafeEqualStr(a, b) {
|
|
|
60432
60463
|
}
|
|
60433
60464
|
return diff === 0;
|
|
60434
60465
|
}
|
|
60435
|
-
var
|
|
60466
|
+
var import_lazy_zod105, extraInputSchema, extraStateSchema, extraOutputSchema, extraPlan, extraName, ExtraStage, OauthAuthUiExtraFlow;
|
|
60436
60467
|
var init_oauth_auth_ui_flow = __esm({
|
|
60437
60468
|
"libs/sdk/src/auth/flows/oauth.auth-ui.flow.ts"() {
|
|
60438
60469
|
"use strict";
|
|
60439
|
-
|
|
60470
|
+
import_lazy_zod105 = require("@frontmcp/lazy-zod");
|
|
60440
60471
|
init_common();
|
|
60441
60472
|
extraInputSchema = httpInputSchema;
|
|
60442
|
-
extraStateSchema =
|
|
60443
|
-
action:
|
|
60444
|
-
pendingAuthId:
|
|
60445
|
-
csrf:
|
|
60446
|
-
payload:
|
|
60473
|
+
extraStateSchema = import_lazy_zod105.z.object({
|
|
60474
|
+
action: import_lazy_zod105.z.string().optional(),
|
|
60475
|
+
pendingAuthId: import_lazy_zod105.z.string().optional(),
|
|
60476
|
+
csrf: import_lazy_zod105.z.string().optional(),
|
|
60477
|
+
payload: import_lazy_zod105.z.record(import_lazy_zod105.z.string(), import_lazy_zod105.z.unknown()).optional()
|
|
60447
60478
|
});
|
|
60448
60479
|
extraOutputSchema = HttpJsonSchema;
|
|
60449
60480
|
extraPlan = {
|
|
@@ -61179,26 +61210,26 @@ function getConfiguredProviders(auth) {
|
|
|
61179
61210
|
function getConfiguredProviderIds(auth) {
|
|
61180
61211
|
return getConfiguredProviders(auth).map((p) => p.id);
|
|
61181
61212
|
}
|
|
61182
|
-
var import_auth49,
|
|
61213
|
+
var import_auth49, import_lazy_zod106, import_utils122, pkceChallengeSchema, codeChallengeMethodSchema, responseTypeSchema, safeRedirectUriSchema, oauthAuthorizeRequestSchema, anonymousAuthorizeRequestSchema, inputSchema32, stateSchema34, outputSchema31, plan38, name38, Stage38, OauthAuthorizeFlow;
|
|
61183
61214
|
var init_oauth_authorize_flow = __esm({
|
|
61184
61215
|
"libs/sdk/src/auth/flows/oauth.authorize.flow.ts"() {
|
|
61185
61216
|
"use strict";
|
|
61186
61217
|
import_auth49 = require("@frontmcp/auth");
|
|
61187
|
-
|
|
61218
|
+
import_lazy_zod106 = require("@frontmcp/lazy-zod");
|
|
61188
61219
|
import_utils122 = require("@frontmcp/utils");
|
|
61189
61220
|
init_common();
|
|
61190
61221
|
init_auth_ui();
|
|
61191
61222
|
init_cimd();
|
|
61192
61223
|
init_consent_tools_helper();
|
|
61193
61224
|
init_signin_binding_utils();
|
|
61194
|
-
pkceChallengeSchema =
|
|
61195
|
-
codeChallengeMethodSchema =
|
|
61225
|
+
pkceChallengeSchema = import_lazy_zod106.z.string().min(43, "code_challenge must be at least 43 characters").max(128, "code_challenge must be at most 128 characters").regex(/^[A-Za-z0-9_-]+$/, "code_challenge must contain only A-Za-z0-9-_");
|
|
61226
|
+
codeChallengeMethodSchema = import_lazy_zod106.z.literal("S256", {
|
|
61196
61227
|
message: 'code_challenge_method must be "S256" (OAuth 2.1)'
|
|
61197
61228
|
});
|
|
61198
|
-
responseTypeSchema =
|
|
61229
|
+
responseTypeSchema = import_lazy_zod106.z.literal("code", {
|
|
61199
61230
|
message: 'response_type must be "code" (OAuth 2.1)'
|
|
61200
61231
|
});
|
|
61201
|
-
safeRedirectUriSchema =
|
|
61232
|
+
safeRedirectUriSchema = import_lazy_zod106.z.url().refine(
|
|
61202
61233
|
(uri) => {
|
|
61203
61234
|
try {
|
|
61204
61235
|
const url = new URL(uri);
|
|
@@ -61209,62 +61240,62 @@ var init_oauth_authorize_flow = __esm({
|
|
|
61209
61240
|
},
|
|
61210
61241
|
{ message: "redirect_uri must use http or https scheme" }
|
|
61211
61242
|
);
|
|
61212
|
-
oauthAuthorizeRequestSchema =
|
|
61243
|
+
oauthAuthorizeRequestSchema = import_lazy_zod106.z.object({
|
|
61213
61244
|
response_type: responseTypeSchema,
|
|
61214
|
-
client_id:
|
|
61245
|
+
client_id: import_lazy_zod106.z.string().min(1, "client_id is required"),
|
|
61215
61246
|
redirect_uri: safeRedirectUriSchema,
|
|
61216
61247
|
code_challenge: pkceChallengeSchema,
|
|
61217
61248
|
code_challenge_method: codeChallengeMethodSchema.optional().default("S256"),
|
|
61218
|
-
scope:
|
|
61219
|
-
state:
|
|
61220
|
-
resource:
|
|
61249
|
+
scope: import_lazy_zod106.z.string().optional(),
|
|
61250
|
+
state: import_lazy_zod106.z.string().optional(),
|
|
61251
|
+
resource: import_lazy_zod106.z.string().url().optional()
|
|
61221
61252
|
});
|
|
61222
|
-
anonymousAuthorizeRequestSchema =
|
|
61253
|
+
anonymousAuthorizeRequestSchema = import_lazy_zod106.z.object({
|
|
61223
61254
|
redirect_uri: safeRedirectUriSchema,
|
|
61224
|
-
state:
|
|
61255
|
+
state: import_lazy_zod106.z.string().optional()
|
|
61225
61256
|
});
|
|
61226
61257
|
inputSchema32 = httpInputSchema;
|
|
61227
|
-
stateSchema34 =
|
|
61228
|
-
isDefaultAuthProvider:
|
|
61229
|
-
isOrchestrated:
|
|
61230
|
-
allowAnonymous:
|
|
61258
|
+
stateSchema34 = import_lazy_zod106.z.object({
|
|
61259
|
+
isDefaultAuthProvider: import_lazy_zod106.z.boolean().describe("No sign-in to run: no auth options, or public mode (the same configuration, written out)"),
|
|
61260
|
+
isOrchestrated: import_lazy_zod106.z.boolean().describe("If FrontMcp is orchestrated (local oauth proxy, remote oauth proxy)"),
|
|
61261
|
+
allowAnonymous: import_lazy_zod106.z.boolean().describe("Allow anonymous access, force orchestrated mode"),
|
|
61231
61262
|
// Validated OAuth request (after validation)
|
|
61232
61263
|
validatedRequest: oauthAuthorizeRequestSchema.optional(),
|
|
61233
61264
|
// Raw parameters for error handling
|
|
61234
|
-
rawRedirectUri:
|
|
61235
|
-
rawState:
|
|
61265
|
+
rawRedirectUri: import_lazy_zod106.z.string().optional(),
|
|
61266
|
+
rawState: import_lazy_zod106.z.string().optional(),
|
|
61236
61267
|
// Validation errors
|
|
61237
|
-
validationErrors:
|
|
61268
|
+
validationErrors: import_lazy_zod106.z.array(import_lazy_zod106.z.string()).optional(),
|
|
61238
61269
|
// Pending authorization ID (for login flow)
|
|
61239
|
-
pendingAuthId:
|
|
61270
|
+
pendingAuthId: import_lazy_zod106.z.string().optional(),
|
|
61240
61271
|
// Progressive/Incremental Authorization
|
|
61241
|
-
isIncrementalAuth:
|
|
61242
|
-
targetAppId:
|
|
61243
|
-
targetToolId:
|
|
61244
|
-
existingSessionId:
|
|
61272
|
+
isIncrementalAuth: import_lazy_zod106.z.boolean().default(false).describe("Whether this is an incremental auth request"),
|
|
61273
|
+
targetAppId: import_lazy_zod106.z.string().optional().describe("Target app ID for incremental authorization"),
|
|
61274
|
+
targetToolId: import_lazy_zod106.z.string().optional().describe("Target tool ID that triggered the incremental auth"),
|
|
61275
|
+
existingSessionId: import_lazy_zod106.z.string().optional().describe("Existing session ID for incremental auth"),
|
|
61245
61276
|
/**
|
|
61246
61277
|
* The VERIFIED incremental-authorization ticket (GHSA-2c4g-9c8x-6m8g). Set
|
|
61247
61278
|
* only when `?ticket=` carried a valid, unexpired server signature. Its `sub`
|
|
61248
61279
|
* is the proven identity the expanded grant is minted for; `isIncrementalAuth`
|
|
61249
61280
|
* is derived from its presence, never from a raw query parameter.
|
|
61250
61281
|
*/
|
|
61251
|
-
incrementalTicket:
|
|
61282
|
+
incrementalTicket: import_lazy_zod106.z.custom().optional(),
|
|
61252
61283
|
/**
|
|
61253
61284
|
* Apps the client already holds a grant for (the prior `authorized_apps`
|
|
61254
61285
|
* claim), carried forward on an incremental authorize so the newly-minted
|
|
61255
61286
|
* token is the UNION of prior apps + the target app. Only consulted when
|
|
61256
61287
|
* incremental auth is enabled.
|
|
61257
61288
|
*/
|
|
61258
|
-
priorAuthorizedAppIds:
|
|
61289
|
+
priorAuthorizedAppIds: import_lazy_zod106.z.array(import_lazy_zod106.z.string()).optional().describe("Prior authorized app IDs to carry forward"),
|
|
61259
61290
|
// Federated Login (multi-provider)
|
|
61260
|
-
requiresFederatedLogin:
|
|
61291
|
+
requiresFederatedLogin: import_lazy_zod106.z.boolean().default(false).describe("Whether this auth requires federated login UI"),
|
|
61261
61292
|
// Consent Flow
|
|
61262
|
-
requiresConsent:
|
|
61293
|
+
requiresConsent: import_lazy_zod106.z.boolean().default(false).describe("Whether consent flow is enabled"),
|
|
61263
61294
|
// CIMD (Client ID Metadata Documents)
|
|
61264
|
-
isCimdClient:
|
|
61295
|
+
isCimdClient: import_lazy_zod106.z.boolean().default(false).describe("Whether client_id is a CIMD URL"),
|
|
61265
61296
|
cimdMetadata: import_auth45.clientMetadataDocumentSchema.optional().describe("CIMD metadata document for the client")
|
|
61266
61297
|
});
|
|
61267
|
-
outputSchema31 =
|
|
61298
|
+
outputSchema31 = import_lazy_zod106.z.union([
|
|
61268
61299
|
HttpRedirectSchema,
|
|
61269
61300
|
// for account/login or oauth/callback
|
|
61270
61301
|
HttpTextSchema,
|
|
@@ -62205,12 +62236,12 @@ function timingSafeEqualStr3(a, b) {
|
|
|
62205
62236
|
}
|
|
62206
62237
|
return diff === 0;
|
|
62207
62238
|
}
|
|
62208
|
-
var import_auth50,
|
|
62239
|
+
var import_auth50, import_lazy_zod107, import_utils123, inputSchema33, stateSchema35, outputSchema32, plan39, name39, Stage39, OauthCallbackFlow;
|
|
62209
62240
|
var init_oauth_callback_flow = __esm({
|
|
62210
62241
|
"libs/sdk/src/auth/flows/oauth.callback.flow.ts"() {
|
|
62211
62242
|
"use strict";
|
|
62212
62243
|
import_auth50 = require("@frontmcp/auth");
|
|
62213
|
-
|
|
62244
|
+
import_lazy_zod107 = require("@frontmcp/lazy-zod");
|
|
62214
62245
|
import_utils123 = require("@frontmcp/utils");
|
|
62215
62246
|
init_common();
|
|
62216
62247
|
init_auth_ui();
|
|
@@ -62218,68 +62249,68 @@ var init_oauth_callback_flow = __esm({
|
|
|
62218
62249
|
init_form_body_utils();
|
|
62219
62250
|
init_signin_binding_utils();
|
|
62220
62251
|
inputSchema33 = httpInputSchema;
|
|
62221
|
-
stateSchema35 =
|
|
62252
|
+
stateSchema35 = import_lazy_zod107.z.object({
|
|
62222
62253
|
// From query params
|
|
62223
|
-
pendingAuthId:
|
|
62224
|
-
email:
|
|
62225
|
-
name:
|
|
62254
|
+
pendingAuthId: import_lazy_zod107.z.string().optional(),
|
|
62255
|
+
email: import_lazy_zod107.z.string().optional(),
|
|
62256
|
+
name: import_lazy_zod107.z.string().optional(),
|
|
62226
62257
|
// From pending authorization record
|
|
62227
|
-
clientId:
|
|
62228
|
-
redirectUri:
|
|
62229
|
-
scopes:
|
|
62230
|
-
codeChallenge:
|
|
62231
|
-
originalState:
|
|
62232
|
-
resource:
|
|
62258
|
+
clientId: import_lazy_zod107.z.string().optional(),
|
|
62259
|
+
redirectUri: import_lazy_zod107.z.string().optional(),
|
|
62260
|
+
scopes: import_lazy_zod107.z.array(import_lazy_zod107.z.string()).optional(),
|
|
62261
|
+
codeChallenge: import_lazy_zod107.z.string().optional(),
|
|
62262
|
+
originalState: import_lazy_zod107.z.string().optional(),
|
|
62263
|
+
resource: import_lazy_zod107.z.string().optional(),
|
|
62233
62264
|
// Generated
|
|
62234
|
-
authorizationCode:
|
|
62235
|
-
userSub:
|
|
62265
|
+
authorizationCode: import_lazy_zod107.z.string().optional(),
|
|
62266
|
+
userSub: import_lazy_zod107.z.string().optional(),
|
|
62236
62267
|
// Checkpoint 3a \u2014 custom verification (authenticate()) results.
|
|
62237
62268
|
// Submitted login fields (built-in email/name + any custom `login.fields`).
|
|
62238
|
-
loginFields:
|
|
62269
|
+
loginFields: import_lazy_zod107.z.record(import_lazy_zod107.z.string(), import_lazy_zod107.z.string()).optional(),
|
|
62239
62270
|
// Custom claims returned by authenticate(), embedded (namespaced) in the token.
|
|
62240
|
-
customClaims:
|
|
62271
|
+
customClaims: import_lazy_zod107.z.record(import_lazy_zod107.z.string(), import_lazy_zod107.z.unknown()).optional(),
|
|
62241
62272
|
// Checkpoint 3b \u2014 credentials returned by authenticate(), persisted into the
|
|
62242
62273
|
// per-session credential vault keyed by the minted userSub at code-mint time.
|
|
62243
|
-
credentials:
|
|
62244
|
-
|
|
62245
|
-
key:
|
|
62246
|
-
secret:
|
|
62247
|
-
metadata:
|
|
62274
|
+
credentials: import_lazy_zod107.z.array(
|
|
62275
|
+
import_lazy_zod107.z.object({
|
|
62276
|
+
key: import_lazy_zod107.z.string(),
|
|
62277
|
+
secret: import_lazy_zod107.z.string(),
|
|
62278
|
+
metadata: import_lazy_zod107.z.record(import_lazy_zod107.z.string(), import_lazy_zod107.z.unknown()).optional()
|
|
62248
62279
|
})
|
|
62249
62280
|
).optional(),
|
|
62250
62281
|
// Progressive/Incremental Authorization
|
|
62251
|
-
isIncremental:
|
|
62252
|
-
targetAppId:
|
|
62253
|
-
targetToolId:
|
|
62254
|
-
existingSessionId:
|
|
62255
|
-
existingAuthorizationId:
|
|
62282
|
+
isIncremental: import_lazy_zod107.z.boolean().default(false),
|
|
62283
|
+
targetAppId: import_lazy_zod107.z.string().optional(),
|
|
62284
|
+
targetToolId: import_lazy_zod107.z.string().optional(),
|
|
62285
|
+
existingSessionId: import_lazy_zod107.z.string().optional(),
|
|
62286
|
+
existingAuthorizationId: import_lazy_zod107.z.string().optional(),
|
|
62256
62287
|
/** Prior `authorized_apps` claim carried forward on an incremental authorize. */
|
|
62257
|
-
priorAuthorizedAppIds:
|
|
62288
|
+
priorAuthorizedAppIds: import_lazy_zod107.z.array(import_lazy_zod107.z.string()).optional(),
|
|
62258
62289
|
/**
|
|
62259
62290
|
* The final app-id grant to embed as the minted token's `authorized_apps`
|
|
62260
62291
|
* claim. Computed by `handleIncrementalAuth` ONLY when incremental auth is
|
|
62261
62292
|
* enabled; left undefined otherwise so no claim is emitted (preserving the
|
|
62262
62293
|
* historical allow-all behavior).
|
|
62263
62294
|
*/
|
|
62264
|
-
authorizedAppIds:
|
|
62295
|
+
authorizedAppIds: import_lazy_zod107.z.array(import_lazy_zod107.z.string()).optional(),
|
|
62265
62296
|
// Federated Login
|
|
62266
|
-
isFederated:
|
|
62267
|
-
selectedProviders:
|
|
62268
|
-
skippedProviders:
|
|
62297
|
+
isFederated: import_lazy_zod107.z.boolean().default(false),
|
|
62298
|
+
selectedProviders: import_lazy_zod107.z.array(import_lazy_zod107.z.string()).optional(),
|
|
62299
|
+
skippedProviders: import_lazy_zod107.z.array(import_lazy_zod107.z.string()).optional(),
|
|
62269
62300
|
// Consent
|
|
62270
|
-
consentEnabled:
|
|
62271
|
-
selectedTools:
|
|
62301
|
+
consentEnabled: import_lazy_zod107.z.boolean().default(false),
|
|
62302
|
+
selectedTools: import_lazy_zod107.z.array(import_lazy_zod107.z.string()).optional(),
|
|
62272
62303
|
// True when the consent form was submitted (distinguishes an empty selection
|
|
62273
62304
|
// from a first visit so an empty `requireSelection` submit doesn't loop).
|
|
62274
|
-
consentSubmitted:
|
|
62305
|
+
consentSubmitted: import_lazy_zod107.z.boolean().default(false),
|
|
62275
62306
|
// Anti-CSRF token echoed by a custom `@AuthUi` page (#469). Verified against
|
|
62276
62307
|
// the token persisted on the pending record when present.
|
|
62277
|
-
csrf:
|
|
62308
|
+
csrf: import_lazy_zod107.z.string().optional(),
|
|
62278
62309
|
// Hash of the sign-in binding cookie on the pending record, carried into a
|
|
62279
62310
|
// federated session so the provider callback checks the same browser.
|
|
62280
|
-
signinBinding:
|
|
62311
|
+
signinBinding: import_lazy_zod107.z.string().optional()
|
|
62281
62312
|
});
|
|
62282
|
-
outputSchema32 =
|
|
62313
|
+
outputSchema32 = import_lazy_zod107.z.union([HttpRedirectSchema, HttpHtmlSchema]);
|
|
62283
62314
|
plan39 = {
|
|
62284
62315
|
pre: ["checkIpFilter", "acquireQuota", "parseInput", "validatePendingAuth"],
|
|
62285
62316
|
execute: ["handleIncrementalAuth", "handleFederatedAuth", "createAuthorizationCode", "redirectToClient"]
|
|
@@ -63304,21 +63335,21 @@ var init_oauth_callback_flow = __esm({
|
|
|
63304
63335
|
});
|
|
63305
63336
|
|
|
63306
63337
|
// libs/sdk/src/auth/flows/oauth.connect.flow.ts
|
|
63307
|
-
var import_auth51,
|
|
63338
|
+
var import_auth51, import_lazy_zod108, inputSchema34, stateSchema36, outputSchema33, plan40, name40, Stage40, RESERVED_CONNECT_PARAMS, OauthConnectFlow;
|
|
63308
63339
|
var init_oauth_connect_flow = __esm({
|
|
63309
63340
|
"libs/sdk/src/auth/flows/oauth.connect.flow.ts"() {
|
|
63310
63341
|
"use strict";
|
|
63311
63342
|
import_auth51 = require("@frontmcp/auth");
|
|
63312
|
-
|
|
63343
|
+
import_lazy_zod108 = require("@frontmcp/lazy-zod");
|
|
63313
63344
|
init_common();
|
|
63314
63345
|
inputSchema34 = httpInputSchema;
|
|
63315
|
-
stateSchema36 =
|
|
63346
|
+
stateSchema36 = import_lazy_zod108.z.object({
|
|
63316
63347
|
/** HTTP method ('GET' renders the form; 'POST' processes the submission). */
|
|
63317
|
-
method:
|
|
63348
|
+
method: import_lazy_zod108.z.string().optional(),
|
|
63318
63349
|
/** The framework-signed resume token (from query on GET, body on POST). */
|
|
63319
|
-
token:
|
|
63350
|
+
token: import_lazy_zod108.z.string().optional(),
|
|
63320
63351
|
/** Submitted field values (POST): the single credential field. */
|
|
63321
|
-
fields:
|
|
63352
|
+
fields: import_lazy_zod108.z.record(import_lazy_zod108.z.string(), import_lazy_zod108.z.string()).optional()
|
|
63322
63353
|
});
|
|
63323
63354
|
outputSchema33 = HttpHtmlSchema;
|
|
63324
63355
|
plan40 = {
|
|
@@ -63580,12 +63611,12 @@ var init_oauth_connect_flow = __esm({
|
|
|
63580
63611
|
function timingSafeEqualStr4(a, b) {
|
|
63581
63612
|
return (0, import_utils124.timingSafeEqual)((0, import_utils124.sha256)(a), (0, import_utils124.sha256)(b));
|
|
63582
63613
|
}
|
|
63583
|
-
var import_auth52,
|
|
63614
|
+
var import_auth52, import_lazy_zod109, import_utils124, inputSchema35, stateSchema37, outputSchema34, plan41, name41, Stage41, OauthProviderCallbackFlow;
|
|
63584
63615
|
var init_oauth_provider_callback_flow = __esm({
|
|
63585
63616
|
"libs/sdk/src/auth/flows/oauth.provider-callback.flow.ts"() {
|
|
63586
63617
|
"use strict";
|
|
63587
63618
|
import_auth52 = require("@frontmcp/auth");
|
|
63588
|
-
|
|
63619
|
+
import_lazy_zod109 = require("@frontmcp/lazy-zod");
|
|
63589
63620
|
import_utils124 = require("@frontmcp/utils");
|
|
63590
63621
|
init_common();
|
|
63591
63622
|
init_errors();
|
|
@@ -63594,34 +63625,34 @@ var init_oauth_provider_callback_flow = __esm({
|
|
|
63594
63625
|
init_form_body_utils();
|
|
63595
63626
|
init_signin_binding_utils();
|
|
63596
63627
|
inputSchema35 = httpInputSchema;
|
|
63597
|
-
stateSchema37 =
|
|
63628
|
+
stateSchema37 = import_lazy_zod109.z.object({
|
|
63598
63629
|
// From URL params
|
|
63599
|
-
providerId:
|
|
63630
|
+
providerId: import_lazy_zod109.z.string().optional(),
|
|
63600
63631
|
// From query params
|
|
63601
|
-
code:
|
|
63602
|
-
error:
|
|
63603
|
-
errorDescription:
|
|
63604
|
-
providerState:
|
|
63632
|
+
code: import_lazy_zod109.z.string().optional(),
|
|
63633
|
+
error: import_lazy_zod109.z.string().optional(),
|
|
63634
|
+
errorDescription: import_lazy_zod109.z.string().optional(),
|
|
63635
|
+
providerState: import_lazy_zod109.z.string().optional(),
|
|
63605
63636
|
/** RFC 9207 `iss` from the authorization response, when the AS sent one. */
|
|
63606
|
-
responseIssuer:
|
|
63637
|
+
responseIssuer: import_lazy_zod109.z.string().optional(),
|
|
63607
63638
|
// Federated session
|
|
63608
|
-
federatedSessionId:
|
|
63609
|
-
federatedSession:
|
|
63639
|
+
federatedSessionId: import_lazy_zod109.z.string().optional(),
|
|
63640
|
+
federatedSession: import_lazy_zod109.z.unknown().optional(),
|
|
63610
63641
|
// FederatedAuthSession
|
|
63611
63642
|
// Provider tokens
|
|
63612
|
-
providerTokens:
|
|
63643
|
+
providerTokens: import_lazy_zod109.z.unknown().optional(),
|
|
63613
63644
|
// ProviderTokens
|
|
63614
|
-
providerUserInfo:
|
|
63645
|
+
providerUserInfo: import_lazy_zod109.z.unknown().optional(),
|
|
63615
63646
|
// ProviderUserInfo
|
|
63616
63647
|
// Consent round-trip (the consent screen POSTs back here after all providers
|
|
63617
63648
|
// are linked): the federated session id, the screen's CSRF token and the
|
|
63618
63649
|
// submitted tool selection.
|
|
63619
|
-
consentSessionId:
|
|
63620
|
-
consentCsrf:
|
|
63621
|
-
consentSubmitted:
|
|
63622
|
-
selectedTools:
|
|
63650
|
+
consentSessionId: import_lazy_zod109.z.string().optional(),
|
|
63651
|
+
consentCsrf: import_lazy_zod109.z.string().optional(),
|
|
63652
|
+
consentSubmitted: import_lazy_zod109.z.boolean().default(false),
|
|
63653
|
+
selectedTools: import_lazy_zod109.z.array(import_lazy_zod109.z.string()).optional()
|
|
63623
63654
|
});
|
|
63624
|
-
outputSchema34 =
|
|
63655
|
+
outputSchema34 = import_lazy_zod109.z.union([HttpRedirectSchema, HttpHtmlSchema]);
|
|
63625
63656
|
plan41 = {
|
|
63626
63657
|
pre: [
|
|
63627
63658
|
"checkIpFilter",
|
|
@@ -64371,24 +64402,24 @@ function extractBearer(headers) {
|
|
|
64371
64402
|
const match = /^Bearer\s+(.+)$/i.exec(raw.trim());
|
|
64372
64403
|
return match ? match[1].trim() : void 0;
|
|
64373
64404
|
}
|
|
64374
|
-
var import_auth53,
|
|
64405
|
+
var import_auth53, import_lazy_zod110, import_utils125, inputSchema36, outputSchema35, registrationRequestSchema, stateSchema38, plan42, name42, Stage42, OauthRegisterFlow;
|
|
64375
64406
|
var init_oauth_register_flow = __esm({
|
|
64376
64407
|
"libs/sdk/src/auth/flows/oauth.register.flow.ts"() {
|
|
64377
64408
|
"use strict";
|
|
64378
64409
|
import_auth53 = require("@frontmcp/auth");
|
|
64379
|
-
|
|
64410
|
+
import_lazy_zod110 = require("@frontmcp/lazy-zod");
|
|
64380
64411
|
import_utils125 = require("@frontmcp/utils");
|
|
64381
64412
|
init_common();
|
|
64382
64413
|
inputSchema36 = httpInputSchema;
|
|
64383
64414
|
outputSchema35 = HttpJsonSchema;
|
|
64384
|
-
registrationRequestSchema =
|
|
64415
|
+
registrationRequestSchema = import_lazy_zod110.z.object({
|
|
64385
64416
|
// RFC 7591-ish minimal set
|
|
64386
|
-
redirect_uris:
|
|
64387
|
-
token_endpoint_auth_method:
|
|
64388
|
-
grant_types:
|
|
64389
|
-
response_types:
|
|
64390
|
-
client_name:
|
|
64391
|
-
scope:
|
|
64417
|
+
redirect_uris: import_lazy_zod110.z.array(import_lazy_zod110.z.string().url()).min(1, "At least one redirect_uri is required"),
|
|
64418
|
+
token_endpoint_auth_method: import_lazy_zod110.z.enum(["none", "client_secret_basic", "client_secret_post", "private_key_jwt", "tls_client_auth"]).default("none"),
|
|
64419
|
+
grant_types: import_lazy_zod110.z.array(import_lazy_zod110.z.enum(["authorization_code", "refresh_token", "urn:ietf:params:oauth:grant-type:device_code"])).default(["authorization_code"]),
|
|
64420
|
+
response_types: import_lazy_zod110.z.array(import_lazy_zod110.z.enum(["code"])).default(["code"]),
|
|
64421
|
+
client_name: import_lazy_zod110.z.string().optional(),
|
|
64422
|
+
scope: import_lazy_zod110.z.string().optional(),
|
|
64392
64423
|
/**
|
|
64393
64424
|
* OpenID Connect client type (SEP-837).
|
|
64394
64425
|
*
|
|
@@ -64399,12 +64430,12 @@ var init_oauth_register_flow = __esm({
|
|
|
64399
64430
|
* rejected. Defaults to `web`, matching the OIDC registration default, so
|
|
64400
64431
|
* pre-2026 clients keep working unchanged.
|
|
64401
64432
|
*/
|
|
64402
|
-
application_type:
|
|
64433
|
+
application_type: import_lazy_zod110.z.enum(["web", "native"]).default("web")
|
|
64403
64434
|
}).passthrough();
|
|
64404
|
-
stateSchema38 =
|
|
64435
|
+
stateSchema38 = import_lazy_zod110.z.object({
|
|
64405
64436
|
body: registrationRequestSchema,
|
|
64406
64437
|
/** Whether DCR is active (explicit `dcr.enabled` or the dev/prod default). */
|
|
64407
|
-
dcrEnabled:
|
|
64438
|
+
dcrEnabled: import_lazy_zod110.z.boolean()
|
|
64408
64439
|
});
|
|
64409
64440
|
plan42 = {
|
|
64410
64441
|
pre: ["checkIpFilter", "acquireQuota", "parseInput", "validateInput"],
|
|
@@ -64698,65 +64729,65 @@ function parseRawTokenBody(raw) {
|
|
|
64698
64729
|
}
|
|
64699
64730
|
return {};
|
|
64700
64731
|
}
|
|
64701
|
-
var
|
|
64732
|
+
var import_lazy_zod111, import_utils126, inputSchema37, pkceVerifierRegex, authorizationCodeGrant, refreshTokenGrant, anonymousGrant, tokenRequestSchema, stateSchema39, outputSchema36, plan43, name43, Stage43, OauthTokenFlow;
|
|
64702
64733
|
var init_oauth_token_flow = __esm({
|
|
64703
64734
|
"libs/sdk/src/auth/flows/oauth.token.flow.ts"() {
|
|
64704
64735
|
"use strict";
|
|
64705
|
-
|
|
64736
|
+
import_lazy_zod111 = require("@frontmcp/lazy-zod");
|
|
64706
64737
|
import_utils126 = require("@frontmcp/utils");
|
|
64707
64738
|
init_common();
|
|
64708
64739
|
inputSchema37 = httpInputSchema;
|
|
64709
64740
|
pkceVerifierRegex = /^[A-Za-z0-9_.~-]{43,128}$/;
|
|
64710
|
-
authorizationCodeGrant =
|
|
64711
|
-
grant_type:
|
|
64741
|
+
authorizationCodeGrant = import_lazy_zod111.z.object({
|
|
64742
|
+
grant_type: import_lazy_zod111.z.literal("authorization_code"),
|
|
64712
64743
|
/** Authorization code returned from the /authorize step */
|
|
64713
|
-
code:
|
|
64744
|
+
code: import_lazy_zod111.z.string().min(1, "code is required"),
|
|
64714
64745
|
/** Must exactly match the redirect URI used when obtaining the code */
|
|
64715
|
-
redirect_uri:
|
|
64746
|
+
redirect_uri: import_lazy_zod111.z.string().url(),
|
|
64716
64747
|
/** Public client identifier */
|
|
64717
|
-
client_id:
|
|
64748
|
+
client_id: import_lazy_zod111.z.string().min(1),
|
|
64718
64749
|
/** Client secret (confidential clients; also accepted via HTTP Basic). */
|
|
64719
|
-
client_secret:
|
|
64750
|
+
client_secret: import_lazy_zod111.z.string().optional(),
|
|
64720
64751
|
/** PKCE verifier bound to the code */
|
|
64721
|
-
code_verifier:
|
|
64752
|
+
code_verifier: import_lazy_zod111.z.string().regex(pkceVerifierRegex, "code_verifier must be 43\u2013128 chars of A\u2013Z, a\u2013z, 0\u20139, '-', '.', '_' or '~'")
|
|
64722
64753
|
});
|
|
64723
|
-
refreshTokenGrant =
|
|
64724
|
-
grant_type:
|
|
64754
|
+
refreshTokenGrant = import_lazy_zod111.z.object({
|
|
64755
|
+
grant_type: import_lazy_zod111.z.literal("refresh_token"),
|
|
64725
64756
|
/** The refresh token */
|
|
64726
|
-
refresh_token:
|
|
64757
|
+
refresh_token: import_lazy_zod111.z.string().min(1, "refresh_token is required"),
|
|
64727
64758
|
/** Public client identifier */
|
|
64728
|
-
client_id:
|
|
64759
|
+
client_id: import_lazy_zod111.z.string().min(1),
|
|
64729
64760
|
/** Client secret (confidential clients; also accepted via HTTP Basic). */
|
|
64730
|
-
client_secret:
|
|
64761
|
+
client_secret: import_lazy_zod111.z.string().optional()
|
|
64731
64762
|
});
|
|
64732
|
-
anonymousGrant =
|
|
64733
|
-
grant_type:
|
|
64763
|
+
anonymousGrant = import_lazy_zod111.z.object({
|
|
64764
|
+
grant_type: import_lazy_zod111.z.literal("anonymous"),
|
|
64734
64765
|
/** Public client identifier */
|
|
64735
|
-
client_id:
|
|
64766
|
+
client_id: import_lazy_zod111.z.string().min(1),
|
|
64736
64767
|
/** Target resource/audience is required for this custom flow */
|
|
64737
|
-
resource:
|
|
64768
|
+
resource: import_lazy_zod111.z.string().url().optional()
|
|
64738
64769
|
});
|
|
64739
|
-
tokenRequestSchema =
|
|
64770
|
+
tokenRequestSchema = import_lazy_zod111.z.discriminatedUnion("grant_type", [
|
|
64740
64771
|
anonymousGrant,
|
|
64741
64772
|
authorizationCodeGrant,
|
|
64742
64773
|
refreshTokenGrant
|
|
64743
64774
|
]);
|
|
64744
|
-
stateSchema39 =
|
|
64775
|
+
stateSchema39 = import_lazy_zod111.z.object({
|
|
64745
64776
|
body: tokenRequestSchema.optional(),
|
|
64746
|
-
grantType:
|
|
64747
|
-
isDefaultAuthProvider:
|
|
64748
|
-
isOrchestrated:
|
|
64777
|
+
grantType: import_lazy_zod111.z.enum(["authorization_code", "refresh_token", "anonymous"]).optional(),
|
|
64778
|
+
isDefaultAuthProvider: import_lazy_zod111.z.boolean().describe("No sign-in to run: no auth options, or public mode (the same configuration, written out)"),
|
|
64779
|
+
isOrchestrated: import_lazy_zod111.z.boolean().describe("If auth mode is orchestrated"),
|
|
64749
64780
|
// Token response data
|
|
64750
|
-
tokenResponse:
|
|
64751
|
-
access_token:
|
|
64752
|
-
token_type:
|
|
64753
|
-
expires_in:
|
|
64754
|
-
refresh_token:
|
|
64755
|
-
scope:
|
|
64781
|
+
tokenResponse: import_lazy_zod111.z.object({
|
|
64782
|
+
access_token: import_lazy_zod111.z.string(),
|
|
64783
|
+
token_type: import_lazy_zod111.z.literal("Bearer"),
|
|
64784
|
+
expires_in: import_lazy_zod111.z.number(),
|
|
64785
|
+
refresh_token: import_lazy_zod111.z.string().optional(),
|
|
64786
|
+
scope: import_lazy_zod111.z.string().optional()
|
|
64756
64787
|
}).optional(),
|
|
64757
64788
|
// Error data
|
|
64758
|
-
error:
|
|
64759
|
-
errorDescription:
|
|
64789
|
+
error: import_lazy_zod111.z.string().optional(),
|
|
64790
|
+
errorDescription: import_lazy_zod111.z.string().optional()
|
|
64760
64791
|
});
|
|
64761
64792
|
outputSchema36 = HttpJsonSchema;
|
|
64762
64793
|
plan43 = {
|
|
@@ -65048,18 +65079,18 @@ var init_oauth_token_flow = __esm({
|
|
|
65048
65079
|
});
|
|
65049
65080
|
|
|
65050
65081
|
// libs/sdk/src/auth/flows/oauth.userinfo.flow.ts
|
|
65051
|
-
var import_reflect_metadata21, import_auth54,
|
|
65082
|
+
var import_reflect_metadata21, import_auth54, import_lazy_zod112, inputSchema38, stateSchema40, outputSchema37, plan44, name44, Stage44, OauthUserInfoFlow;
|
|
65052
65083
|
var init_oauth_userinfo_flow = __esm({
|
|
65053
65084
|
"libs/sdk/src/auth/flows/oauth.userinfo.flow.ts"() {
|
|
65054
65085
|
"use strict";
|
|
65055
65086
|
import_reflect_metadata21 = require("reflect-metadata");
|
|
65056
65087
|
import_auth54 = require("@frontmcp/auth");
|
|
65057
|
-
|
|
65088
|
+
import_lazy_zod112 = require("@frontmcp/lazy-zod");
|
|
65058
65089
|
init_common();
|
|
65059
65090
|
inputSchema38 = httpInputSchema;
|
|
65060
|
-
stateSchema40 =
|
|
65061
|
-
token:
|
|
65062
|
-
baseUrl:
|
|
65091
|
+
stateSchema40 = import_lazy_zod112.z.object({
|
|
65092
|
+
token: import_lazy_zod112.z.string().optional(),
|
|
65093
|
+
baseUrl: import_lazy_zod112.z.string().min(1)
|
|
65063
65094
|
});
|
|
65064
65095
|
outputSchema37 = HttpJsonSchema;
|
|
65065
65096
|
plan44 = {
|
|
@@ -65157,20 +65188,20 @@ var init_oauth_userinfo_flow = __esm({
|
|
|
65157
65188
|
});
|
|
65158
65189
|
|
|
65159
65190
|
// libs/sdk/src/auth/flows/well-known.jwks.flow.ts
|
|
65160
|
-
var import_reflect_metadata22, import_auth55,
|
|
65191
|
+
var import_reflect_metadata22, import_auth55, import_lazy_zod113, inputSchema39, stateSchema41, outputSchema38, plan45, name45, Stage45, WellKnownJwksFlow;
|
|
65161
65192
|
var init_well_known_jwks_flow = __esm({
|
|
65162
65193
|
"libs/sdk/src/auth/flows/well-known.jwks.flow.ts"() {
|
|
65163
65194
|
"use strict";
|
|
65164
65195
|
init_common();
|
|
65165
65196
|
import_reflect_metadata22 = require("reflect-metadata");
|
|
65166
65197
|
import_auth55 = require("@frontmcp/auth");
|
|
65167
|
-
|
|
65198
|
+
import_lazy_zod113 = require("@frontmcp/lazy-zod");
|
|
65168
65199
|
init_auth_internal_errors();
|
|
65169
65200
|
inputSchema39 = httpInputSchema;
|
|
65170
|
-
stateSchema41 =
|
|
65171
|
-
isOrchestrated:
|
|
65201
|
+
stateSchema41 = import_lazy_zod113.z.object({
|
|
65202
|
+
isOrchestrated: import_lazy_zod113.z.boolean()
|
|
65172
65203
|
});
|
|
65173
|
-
outputSchema38 =
|
|
65204
|
+
outputSchema38 = import_lazy_zod113.z.union([HttpJsonSchema, HttpTextSchema, HttpRedirectSchema]);
|
|
65174
65205
|
plan45 = {
|
|
65175
65206
|
pre: ["checkIpFilter", "acquireQuota", "parseInput", "validateInput"],
|
|
65176
65207
|
execute: ["collectData"]
|
|
@@ -65259,58 +65290,58 @@ function resolveDcrEnabled(auth) {
|
|
|
65259
65290
|
}
|
|
65260
65291
|
return !(0, import_utils127.isProduction)();
|
|
65261
65292
|
}
|
|
65262
|
-
var import_reflect_metadata23, import_auth56,
|
|
65293
|
+
var import_reflect_metadata23, import_auth56, import_lazy_zod114, import_utils127, inputSchema40, AuthServerMetadataSchema, outputSchema39, wellKnownAsStateSchema, wellKnownAsPlan, name46, Stage46, WellKnownAsFlow;
|
|
65263
65294
|
var init_well_known_oauth_authorization_server_flow = __esm({
|
|
65264
65295
|
"libs/sdk/src/auth/flows/well-known.oauth-authorization-server.flow.ts"() {
|
|
65265
65296
|
"use strict";
|
|
65266
65297
|
import_reflect_metadata23 = require("reflect-metadata");
|
|
65267
65298
|
import_auth56 = require("@frontmcp/auth");
|
|
65268
|
-
|
|
65299
|
+
import_lazy_zod114 = require("@frontmcp/lazy-zod");
|
|
65269
65300
|
import_utils127 = require("@frontmcp/utils");
|
|
65270
65301
|
init_common();
|
|
65271
65302
|
init_sdk_errors();
|
|
65272
65303
|
inputSchema40 = httpInputSchema;
|
|
65273
|
-
AuthServerMetadataSchema =
|
|
65274
|
-
kind:
|
|
65275
|
-
status:
|
|
65276
|
-
contentType:
|
|
65304
|
+
AuthServerMetadataSchema = import_lazy_zod114.z.object({
|
|
65305
|
+
kind: import_lazy_zod114.z.literal("json"),
|
|
65306
|
+
status: import_lazy_zod114.z.literal(200),
|
|
65307
|
+
contentType: import_lazy_zod114.z.literal("application/json; charset=utf-8"),
|
|
65277
65308
|
// Response headers (e.g. `Cache-Control: no-store`). This flow uses a custom
|
|
65278
65309
|
// output schema rather than `HttpJsonSchema`, so `headers` must be declared
|
|
65279
65310
|
// explicitly for the renderer to emit it.
|
|
65280
|
-
headers:
|
|
65281
|
-
body:
|
|
65282
|
-
issuer:
|
|
65283
|
-
authorization_endpoint:
|
|
65284
|
-
token_endpoint:
|
|
65285
|
-
userinfo_endpoint:
|
|
65286
|
-
jwks_uri:
|
|
65287
|
-
registration_endpoint:
|
|
65288
|
-
token_endpoint_auth_methods_supported:
|
|
65289
|
-
response_types_supported:
|
|
65290
|
-
grant_types_supported:
|
|
65291
|
-
scopes_supported:
|
|
65292
|
-
code_challenge_methods_supported:
|
|
65311
|
+
headers: import_lazy_zod114.z.record(import_lazy_zod114.z.string(), import_lazy_zod114.z.string()).optional(),
|
|
65312
|
+
body: import_lazy_zod114.z.object({
|
|
65313
|
+
issuer: import_lazy_zod114.z.string().min(1),
|
|
65314
|
+
authorization_endpoint: import_lazy_zod114.z.string().min(1),
|
|
65315
|
+
token_endpoint: import_lazy_zod114.z.string().min(1),
|
|
65316
|
+
userinfo_endpoint: import_lazy_zod114.z.string().min(1).optional(),
|
|
65317
|
+
jwks_uri: import_lazy_zod114.z.string().min(1),
|
|
65318
|
+
registration_endpoint: import_lazy_zod114.z.string().min(1).optional(),
|
|
65319
|
+
token_endpoint_auth_methods_supported: import_lazy_zod114.z.array(import_lazy_zod114.z.enum(["client_secret_basic", "client_secret_post", "private_key_jwt"])).optional(),
|
|
65320
|
+
response_types_supported: import_lazy_zod114.z.array(import_lazy_zod114.z.enum(["code"])).default(["code"]),
|
|
65321
|
+
grant_types_supported: import_lazy_zod114.z.array(import_lazy_zod114.z.enum(["authorization_code", "refresh_token"])).default(["authorization_code", "refresh_token"]),
|
|
65322
|
+
scopes_supported: import_lazy_zod114.z.array(import_lazy_zod114.z.string()).default(["openid", "profile", "email"]),
|
|
65323
|
+
code_challenge_methods_supported: import_lazy_zod114.z.array(import_lazy_zod114.z.enum(["S256"])).default(["S256"])
|
|
65293
65324
|
}).passthrough()
|
|
65294
65325
|
});
|
|
65295
|
-
outputSchema39 =
|
|
65296
|
-
wellKnownAsStateSchema =
|
|
65297
|
-
baseUrl:
|
|
65326
|
+
outputSchema39 = import_lazy_zod114.z.union([AuthServerMetadataSchema, HttpRedirectSchema, HttpTextSchema]);
|
|
65327
|
+
wellKnownAsStateSchema = import_lazy_zod114.z.object({
|
|
65328
|
+
baseUrl: import_lazy_zod114.z.string().min(1),
|
|
65298
65329
|
// baseUrl + entryPrefix (unsuffixed)
|
|
65299
65330
|
// The issuer this server names in answer to the request (`LocalPrimaryAuth.issuerFor`, #629): the
|
|
65300
65331
|
// one on its authorization responses and tokens. Without it, `baseUrl`.
|
|
65301
|
-
issuer:
|
|
65332
|
+
issuer: import_lazy_zod114.z.string().min(1).optional(),
|
|
65302
65333
|
// Root origin (proto://host WITHOUT the entryPath prefix). The OAuth
|
|
65303
65334
|
// endpoints (/oauth/authorize, /oauth/token, /oauth/register, \u2026) are
|
|
65304
65335
|
// registered at literal root paths by their flows, NOT under entryPath, so
|
|
65305
65336
|
// they must be advertised relative to this root rather than `baseUrl`
|
|
65306
65337
|
// (which carries the entryPath) \u2014 see #467.
|
|
65307
|
-
oauthBaseUrl:
|
|
65308
|
-
scopesSupported:
|
|
65309
|
-
tokenEndpointAuthMethods:
|
|
65310
|
-
dcrEnabled:
|
|
65311
|
-
isOrchestrated:
|
|
65338
|
+
oauthBaseUrl: import_lazy_zod114.z.string().min(1),
|
|
65339
|
+
scopesSupported: import_lazy_zod114.z.array(import_lazy_zod114.z.string()).default(["openid", "profile", "email"]),
|
|
65340
|
+
tokenEndpointAuthMethods: import_lazy_zod114.z.array(import_lazy_zod114.z.enum(["client_secret_basic", "client_secret_post", "private_key_jwt"])).default(["client_secret_basic", "client_secret_post"]),
|
|
65341
|
+
dcrEnabled: import_lazy_zod114.z.boolean().default(true),
|
|
65342
|
+
isOrchestrated: import_lazy_zod114.z.boolean(),
|
|
65312
65343
|
// CIMD support
|
|
65313
|
-
cimdEnabled:
|
|
65344
|
+
cimdEnabled: import_lazy_zod114.z.boolean().default(true)
|
|
65314
65345
|
});
|
|
65315
65346
|
wellKnownAsPlan = {
|
|
65316
65347
|
pre: ["checkIpFilter", "acquireQuota", "parseInput"],
|
|
@@ -65441,31 +65472,31 @@ var init_well_known_oauth_authorization_server_flow = __esm({
|
|
|
65441
65472
|
});
|
|
65442
65473
|
|
|
65443
65474
|
// libs/sdk/src/auth/flows/well-known.prm.flow.ts
|
|
65444
|
-
var import_reflect_metadata24, import_auth57,
|
|
65475
|
+
var import_reflect_metadata24, import_auth57, import_lazy_zod115, inputSchema41, stateSchema42, outputSchema40, plan46, name47, Stage47, WellKnownPrmFlow;
|
|
65445
65476
|
var init_well_known_prm_flow = __esm({
|
|
65446
65477
|
"libs/sdk/src/auth/flows/well-known.prm.flow.ts"() {
|
|
65447
65478
|
"use strict";
|
|
65448
65479
|
import_reflect_metadata24 = require("reflect-metadata");
|
|
65449
65480
|
import_auth57 = require("@frontmcp/auth");
|
|
65450
|
-
|
|
65481
|
+
import_lazy_zod115 = require("@frontmcp/lazy-zod");
|
|
65451
65482
|
init_common();
|
|
65452
65483
|
init_sdk_errors();
|
|
65453
65484
|
inputSchema41 = httpInputSchema;
|
|
65454
|
-
stateSchema42 =
|
|
65455
|
-
resource:
|
|
65456
|
-
baseUrl:
|
|
65485
|
+
stateSchema42 = import_lazy_zod115.z.object({
|
|
65486
|
+
resource: import_lazy_zod115.z.string().min(1),
|
|
65487
|
+
baseUrl: import_lazy_zod115.z.string().min(1),
|
|
65457
65488
|
// The authorization server to name: the issuer this server names for the request (#629). None in
|
|
65458
65489
|
// public and static mode, which have no authorization server.
|
|
65459
|
-
authorizationServer:
|
|
65460
|
-
scopesSupported:
|
|
65461
|
-
isOrchestrated:
|
|
65490
|
+
authorizationServer: import_lazy_zod115.z.string().min(1).optional(),
|
|
65491
|
+
scopesSupported: import_lazy_zod115.z.array(import_lazy_zod115.z.string()),
|
|
65492
|
+
isOrchestrated: import_lazy_zod115.z.boolean()
|
|
65462
65493
|
});
|
|
65463
65494
|
outputSchema40 = HttpJsonSchema.extend({
|
|
65464
|
-
body:
|
|
65465
|
-
resource:
|
|
65466
|
-
authorization_servers:
|
|
65467
|
-
scopes_supported:
|
|
65468
|
-
bearer_methods_supported:
|
|
65495
|
+
body: import_lazy_zod115.z.object({
|
|
65496
|
+
resource: import_lazy_zod115.z.string().min(1),
|
|
65497
|
+
authorization_servers: import_lazy_zod115.z.array(import_lazy_zod115.z.string().min(1)).min(1).optional(),
|
|
65498
|
+
scopes_supported: import_lazy_zod115.z.array(import_lazy_zod115.z.string()).optional(),
|
|
65499
|
+
bearer_methods_supported: import_lazy_zod115.z.array(import_lazy_zod115.z.string()).default(["header"])
|
|
65469
65500
|
}).passthrough()
|
|
65470
65501
|
});
|
|
65471
65502
|
plan46 = {
|
|
@@ -67463,19 +67494,19 @@ var send_elicitation_result_tool_exports = {};
|
|
|
67463
67494
|
__export(send_elicitation_result_tool_exports, {
|
|
67464
67495
|
SendElicitationResultTool: () => SendElicitationResultTool
|
|
67465
67496
|
});
|
|
67466
|
-
var
|
|
67497
|
+
var import_lazy_zod116, inputSchema42, SendElicitationResultTool;
|
|
67467
67498
|
var init_send_elicitation_result_tool = __esm({
|
|
67468
67499
|
"libs/sdk/src/elicitation/send-elicitation-result.tool.ts"() {
|
|
67469
67500
|
"use strict";
|
|
67470
|
-
|
|
67501
|
+
import_lazy_zod116 = require("@frontmcp/lazy-zod");
|
|
67471
67502
|
init_common();
|
|
67472
67503
|
init_call_surface();
|
|
67473
67504
|
init_errors();
|
|
67474
67505
|
init_fallback_helper();
|
|
67475
67506
|
inputSchema42 = {
|
|
67476
|
-
elicitId:
|
|
67477
|
-
action:
|
|
67478
|
-
content:
|
|
67507
|
+
elicitId: import_lazy_zod116.z.string().describe("The elicitation ID from the pending request"),
|
|
67508
|
+
action: import_lazy_zod116.z.enum(["accept", "cancel", "decline"]).describe("User action: accept (submit), cancel, or decline"),
|
|
67509
|
+
content: import_lazy_zod116.z.unknown().optional().describe("User response content (required for accept action)")
|
|
67479
67510
|
};
|
|
67480
67511
|
SendElicitationResultTool = class extends ToolContext {
|
|
67481
67512
|
async execute(input) {
|
|
@@ -73891,11 +73922,11 @@ var init_adapter_entry = __esm({
|
|
|
73891
73922
|
});
|
|
73892
73923
|
|
|
73893
73924
|
// libs/sdk/src/common/entries/tool.entry.ts
|
|
73894
|
-
var
|
|
73925
|
+
var import_lazy_zod117, import_utils141, ToolEntry;
|
|
73895
73926
|
var init_tool_entry = __esm({
|
|
73896
73927
|
"libs/sdk/src/common/entries/tool.entry.ts"() {
|
|
73897
73928
|
"use strict";
|
|
73898
|
-
|
|
73929
|
+
import_lazy_zod117 = require("@frontmcp/lazy-zod");
|
|
73899
73930
|
import_utils141 = require("@frontmcp/utils");
|
|
73900
73931
|
init_base_entry();
|
|
73901
73932
|
ToolEntry = class extends BaseEntry {
|
|
@@ -73961,7 +73992,7 @@ var init_tool_entry = __esm({
|
|
|
73961
73992
|
}
|
|
73962
73993
|
if (this.inputSchema && Object.keys(this.inputSchema).length > 0) {
|
|
73963
73994
|
try {
|
|
73964
|
-
return (0,
|
|
73995
|
+
return (0, import_lazy_zod117.toJSONSchema)(import_lazy_zod117.z.object(this.inputSchema), { io: "input", unrepresentable: "any" });
|
|
73965
73996
|
} catch (error) {
|
|
73966
73997
|
if ((0, import_utils141.isDebug)() || (0, import_utils141.isDevelopment)()) {
|
|
73967
73998
|
console.warn("[ToolEntry] Failed to convert Zod schema to JSON Schema:", error);
|
|
@@ -74005,8 +74036,8 @@ var init_tool_entry = __esm({
|
|
|
74005
74036
|
if (!isZodSchema && Object.keys(schema).length === 0) {
|
|
74006
74037
|
return null;
|
|
74007
74038
|
}
|
|
74008
|
-
const zodSchema = isZodSchema ? schema :
|
|
74009
|
-
const json = (0,
|
|
74039
|
+
const zodSchema = isZodSchema ? schema : import_lazy_zod117.z.object(schema);
|
|
74040
|
+
const json = (0, import_lazy_zod117.toJSONSchema)(zodSchema);
|
|
74010
74041
|
return json && json["type"] === "object" ? json : null;
|
|
74011
74042
|
} catch (error) {
|
|
74012
74043
|
if ((0, import_utils141.isDebug)() || (0, import_utils141.isDevelopment)()) {
|
|
@@ -74362,7 +74393,7 @@ function parseListInput(rawInput, schema, expectedMethod) {
|
|
|
74362
74393
|
method = inputData.request.method;
|
|
74363
74394
|
params = inputData.request.params ?? {};
|
|
74364
74395
|
} catch (e) {
|
|
74365
|
-
throw new InvalidInputError("Invalid request format", e instanceof
|
|
74396
|
+
throw new InvalidInputError("Invalid request format", e instanceof import_lazy_zod118.z.ZodError ? e.issues : void 0);
|
|
74366
74397
|
}
|
|
74367
74398
|
if (method !== expectedMethod) {
|
|
74368
74399
|
throw new InvalidMethodError(method, expectedMethod);
|
|
@@ -74403,11 +74434,11 @@ function detectConflicts(entries, getBaseName) {
|
|
|
74403
74434
|
names: conflictNames
|
|
74404
74435
|
};
|
|
74405
74436
|
}
|
|
74406
|
-
var
|
|
74437
|
+
var import_lazy_zod118;
|
|
74407
74438
|
var init_flow_utils3 = __esm({
|
|
74408
74439
|
"libs/sdk/src/common/flow/flow.utils.ts"() {
|
|
74409
74440
|
"use strict";
|
|
74410
|
-
|
|
74441
|
+
import_lazy_zod118 = require("@frontmcp/lazy-zod");
|
|
74411
74442
|
init_errors();
|
|
74412
74443
|
}
|
|
74413
74444
|
});
|
|
@@ -74914,7 +74945,7 @@ __export(index_exports, {
|
|
|
74914
74945
|
JwtSecretRequiredError: () => import_auth15.JwtSecretRequiredError,
|
|
74915
74946
|
JwtSecretWeakError: () => import_auth15.JwtSecretWeakError,
|
|
74916
74947
|
LLM_ADAPTER: () => LLM_ADAPTER,
|
|
74917
|
-
LazyZodSchema: () =>
|
|
74948
|
+
LazyZodSchema: () => import_lazy_zod120.LazyZodSchema,
|
|
74918
74949
|
ListJobsTool: () => ListJobsTool,
|
|
74919
74950
|
ListPromptsHook: () => ListPromptsHook,
|
|
74920
74951
|
ListResourceTemplatesHook: () => ListResourceTemplatesHook,
|
|
@@ -74941,7 +74972,7 @@ __export(index_exports, {
|
|
|
74941
74972
|
MissingClientCapabilityError: () => MissingClientCapabilityError,
|
|
74942
74973
|
MissingPromptArgumentError: () => MissingPromptArgumentError,
|
|
74943
74974
|
MissingProvideError: () => MissingProvideError,
|
|
74944
|
-
NEVER: () =>
|
|
74975
|
+
NEVER: () => import_lazy_zod120.NEVER,
|
|
74945
74976
|
NO_BODY_STATUSES: () => NO_BODY_STATUSES,
|
|
74946
74977
|
NO_STORE_HEADERS: () => NO_STORE_HEADERS,
|
|
74947
74978
|
NameDisambiguationError: () => NameDisambiguationError,
|
|
@@ -75130,32 +75161,32 @@ __export(index_exports, {
|
|
|
75130
75161
|
WorkflowStepExecutor: () => WorkflowStepExecutor,
|
|
75131
75162
|
WorkflowStepNotFoundError: () => WorkflowStepNotFoundError,
|
|
75132
75163
|
WorkflowTimeoutError: () => WorkflowTimeoutError,
|
|
75133
|
-
ZodAny: () =>
|
|
75134
|
-
ZodArray: () =>
|
|
75135
|
-
ZodBigInt: () =>
|
|
75136
|
-
ZodBoolean: () =>
|
|
75137
|
-
ZodDate: () =>
|
|
75138
|
-
ZodDefault: () =>
|
|
75139
|
-
ZodDiscriminatedUnion: () =>
|
|
75140
|
-
ZodEnum: () =>
|
|
75141
|
-
ZodError: () =>
|
|
75142
|
-
ZodIntersection: () =>
|
|
75143
|
-
ZodLiteral: () =>
|
|
75144
|
-
ZodNever: () =>
|
|
75145
|
-
ZodNull: () =>
|
|
75146
|
-
ZodNullable: () =>
|
|
75147
|
-
ZodNumber: () =>
|
|
75148
|
-
ZodObject: () =>
|
|
75149
|
-
ZodOptional: () =>
|
|
75150
|
-
ZodRecord: () =>
|
|
75151
|
-
ZodString: () =>
|
|
75152
|
-
ZodSymbol: () =>
|
|
75153
|
-
ZodTuple: () =>
|
|
75154
|
-
ZodType: () =>
|
|
75155
|
-
ZodUndefined: () =>
|
|
75156
|
-
ZodUnion: () =>
|
|
75157
|
-
ZodUnknown: () =>
|
|
75158
|
-
ZodVoid: () =>
|
|
75164
|
+
ZodAny: () => import_lazy_zod120.ZodAny,
|
|
75165
|
+
ZodArray: () => import_lazy_zod120.ZodArray,
|
|
75166
|
+
ZodBigInt: () => import_lazy_zod120.ZodBigInt,
|
|
75167
|
+
ZodBoolean: () => import_lazy_zod120.ZodBoolean,
|
|
75168
|
+
ZodDate: () => import_lazy_zod120.ZodDate,
|
|
75169
|
+
ZodDefault: () => import_lazy_zod120.ZodDefault,
|
|
75170
|
+
ZodDiscriminatedUnion: () => import_lazy_zod120.ZodDiscriminatedUnion,
|
|
75171
|
+
ZodEnum: () => import_lazy_zod120.ZodEnum,
|
|
75172
|
+
ZodError: () => import_lazy_zod120.ZodError,
|
|
75173
|
+
ZodIntersection: () => import_lazy_zod120.ZodIntersection,
|
|
75174
|
+
ZodLiteral: () => import_lazy_zod120.ZodLiteral,
|
|
75175
|
+
ZodNever: () => import_lazy_zod120.ZodNever,
|
|
75176
|
+
ZodNull: () => import_lazy_zod120.ZodNull,
|
|
75177
|
+
ZodNullable: () => import_lazy_zod120.ZodNullable,
|
|
75178
|
+
ZodNumber: () => import_lazy_zod120.ZodNumber,
|
|
75179
|
+
ZodObject: () => import_lazy_zod120.ZodObject,
|
|
75180
|
+
ZodOptional: () => import_lazy_zod120.ZodOptional,
|
|
75181
|
+
ZodRecord: () => import_lazy_zod120.ZodRecord,
|
|
75182
|
+
ZodString: () => import_lazy_zod120.ZodString,
|
|
75183
|
+
ZodSymbol: () => import_lazy_zod120.ZodSymbol,
|
|
75184
|
+
ZodTuple: () => import_lazy_zod120.ZodTuple,
|
|
75185
|
+
ZodType: () => import_lazy_zod120.ZodType,
|
|
75186
|
+
ZodUndefined: () => import_lazy_zod120.ZodUndefined,
|
|
75187
|
+
ZodUnion: () => import_lazy_zod120.ZodUnion,
|
|
75188
|
+
ZodUnknown: () => import_lazy_zod120.ZodUnknown,
|
|
75189
|
+
ZodVoid: () => import_lazy_zod120.ZodVoid,
|
|
75159
75190
|
acquireConcurrencySlots: () => acquireConcurrencySlots,
|
|
75160
75191
|
adapterInitOptionsOf: () => adapterInitOptionsOf,
|
|
75161
75192
|
agent: () => frontMcpAgent,
|
|
@@ -75258,7 +75289,7 @@ __export(index_exports, {
|
|
|
75258
75289
|
decisionSchema: () => decisionSchema,
|
|
75259
75290
|
decryptElicitationData: () => decryptElicitationData,
|
|
75260
75291
|
deepMerge: () => deepMerge,
|
|
75261
|
-
default: () =>
|
|
75292
|
+
default: () => import_lazy_zod119.default,
|
|
75262
75293
|
defaultHttpPort: () => defaultHttpPort,
|
|
75263
75294
|
deriveElicitationKey: () => deriveElicitationKey,
|
|
75264
75295
|
describeConfigIssues: () => describeConfigIssues,
|
|
@@ -75266,7 +75297,7 @@ __export(index_exports, {
|
|
|
75266
75297
|
deserializeElicitationBlob: () => deserializeElicitationBlob,
|
|
75267
75298
|
detectConflicts: () => detectConflicts,
|
|
75268
75299
|
detectPlatform: () => detectPlatform,
|
|
75269
|
-
eagerZ: () =>
|
|
75300
|
+
eagerZ: () => import_lazy_zod120.eagerZ,
|
|
75270
75301
|
elicitationOptionsSchema: () => elicitationOptionsSchema,
|
|
75271
75302
|
encryptAndSerialize: () => encryptAndSerialize,
|
|
75272
75303
|
encryptElicitationData: () => encryptElicitationData,
|
|
@@ -75292,7 +75323,7 @@ __export(index_exports, {
|
|
|
75292
75323
|
federatedAuthConfigSchema: () => import_auth6.federatedAuthConfigSchema,
|
|
75293
75324
|
filterServableSkills: () => filterServableSkills,
|
|
75294
75325
|
flatRemoteProviderFields: () => import_auth6.flatRemoteProviderFields,
|
|
75295
|
-
forceMaterialize: () =>
|
|
75326
|
+
forceMaterialize: () => import_lazy_zod120.forceMaterialize,
|
|
75296
75327
|
formatMcpErrorResponse: () => formatMcpErrorResponse,
|
|
75297
75328
|
formatOutputSchemaForDescription: () => formatOutputSchemaForDescription,
|
|
75298
75329
|
formatResultForPlatform: () => formatResultForPlatform,
|
|
@@ -75371,7 +75402,7 @@ __export(index_exports, {
|
|
|
75371
75402
|
isEntryGatedBy: () => isEntryGatedBy,
|
|
75372
75403
|
isFileInstructions: () => isFileInstructions,
|
|
75373
75404
|
isInlineInstructions: () => isInlineInstructions,
|
|
75374
|
-
isLazy: () =>
|
|
75405
|
+
isLazy: () => import_lazy_zod120.isLazy,
|
|
75375
75406
|
isLocalMode: () => import_auth13.isLocalMode,
|
|
75376
75407
|
isMrtrSignal: () => isMrtrSignal,
|
|
75377
75408
|
isNewerVersion: () => isNewerVersion,
|
|
@@ -75405,7 +75436,7 @@ __export(index_exports, {
|
|
|
75405
75436
|
jsonWebKeySetSchema: () => import_auth3.jsonWebKeySetSchema,
|
|
75406
75437
|
jwkParametersSchema: () => import_auth3.jwkParametersSchema,
|
|
75407
75438
|
jwkSchema: () => import_auth3.jwkSchema,
|
|
75408
|
-
lazyZ: () =>
|
|
75439
|
+
lazyZ: () => import_lazy_zod120.lazyZ,
|
|
75409
75440
|
loadConfig: () => loadConfig,
|
|
75410
75441
|
loadEnvFiles: () => loadEnvFiles,
|
|
75411
75442
|
loadSkillDirectory: () => loadSkillDirectory,
|
|
@@ -75525,7 +75556,7 @@ __export(index_exports, {
|
|
|
75525
75556
|
staticAuthOptionsSchema: () => import_auth8.staticAuthOptionsSchema,
|
|
75526
75557
|
storageProviderSchema: () => storageProviderSchema,
|
|
75527
75558
|
supportsStreaming: () => supportsStreaming,
|
|
75528
|
-
toJSONSchema: () =>
|
|
75559
|
+
toJSONSchema: () => import_lazy_zod120.toJSONSchema,
|
|
75529
75560
|
toMcpError: () => toMcpError,
|
|
75530
75561
|
toRegistryAuthRecord: () => toRegistryAuthRecord,
|
|
75531
75562
|
toWireShape: () => toWireShape,
|
|
@@ -75551,7 +75582,7 @@ __export(index_exports, {
|
|
|
75551
75582
|
withHttpHeaders: () => withHttpHeaders,
|
|
75552
75583
|
withRetry: () => withRetry,
|
|
75553
75584
|
workflow: () => frontMcpWorkflow,
|
|
75554
|
-
z: () =>
|
|
75585
|
+
z: () => import_lazy_zod120.z
|
|
75555
75586
|
});
|
|
75556
75587
|
module.exports = __toCommonJS(index_exports);
|
|
75557
75588
|
var import_reflect_metadata41 = require("reflect-metadata");
|
|
@@ -75625,8 +75656,8 @@ function createEsmPromptInstance(prompt, providers, owner, namespace) {
|
|
|
75625
75656
|
}
|
|
75626
75657
|
|
|
75627
75658
|
// libs/sdk/src/index.ts
|
|
75628
|
-
var
|
|
75629
|
-
var
|
|
75659
|
+
var import_lazy_zod119 = __toESM(require("@frontmcp/lazy-zod"));
|
|
75660
|
+
var import_lazy_zod120 = require("@frontmcp/lazy-zod");
|
|
75630
75661
|
init_context();
|
|
75631
75662
|
init_tool_registry();
|
|
75632
75663
|
init_tool_instance();
|