@youdotcom-oss/mcp 2.1.1 → 3.2.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -72
- package/bin/stdio.js +114 -100
- package/package.json +14 -20
- package/server.json +51 -0
- package/src/contents/contents.utils.ts +2 -1
- package/src/contents/register-contents-tool.ts +2 -3
- package/src/get-mcp-server.ts +1 -1
- package/src/main.ts +8 -0
- package/src/research/register-research-tool.ts +3 -3
- package/src/research/research.schemas.ts +1 -1
- package/src/research/research.utils.ts +2 -2
- package/src/research/tests/research.utils.spec.ts +114 -0
- package/src/search/register-search-tool.ts +3 -3
- package/src/shared/get-logger.ts +16 -7
- package/src/{stdio.ts → stdio-server.ts} +4 -4
- package/src/http.ts +0 -94
- package/src/tests/http.spec.ts +0 -583
- package/src/tests/tool.spec.ts +0 -649
- /package/src/search/{search.schema.ts → search.schemas.ts} +0 -0
package/bin/stdio.js
CHANGED
|
@@ -6516,7 +6516,7 @@ var require_dist = __commonJS((exports, module) => {
|
|
|
6516
6516
|
exports.default = formatsPlugin;
|
|
6517
6517
|
});
|
|
6518
6518
|
|
|
6519
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
6519
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
6520
6520
|
import process3 from "node:process";
|
|
6521
6521
|
|
|
6522
6522
|
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/core.js
|
|
@@ -11534,7 +11534,7 @@ function preprocess(fn, schema) {
|
|
|
11534
11534
|
// ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/external.js
|
|
11535
11535
|
config(en_default());
|
|
11536
11536
|
|
|
11537
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
11537
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
11538
11538
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
11539
11539
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
11540
11540
|
var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
@@ -11543,7 +11543,7 @@ var AssertObjectSchema = custom((v) => v !== null && (typeof v === "object" || t
|
|
|
11543
11543
|
var ProgressTokenSchema = union([string2(), number2().int()]);
|
|
11544
11544
|
var CursorSchema = string2();
|
|
11545
11545
|
var TaskCreationParamsSchema = looseObject({
|
|
11546
|
-
ttl:
|
|
11546
|
+
ttl: number2().optional(),
|
|
11547
11547
|
pollInterval: number2().optional()
|
|
11548
11548
|
});
|
|
11549
11549
|
var TaskMetadataSchema = object({
|
|
@@ -11697,7 +11697,8 @@ var ClientCapabilitiesSchema = object({
|
|
|
11697
11697
|
roots: object({
|
|
11698
11698
|
listChanged: boolean2().optional()
|
|
11699
11699
|
}).optional(),
|
|
11700
|
-
tasks: ClientTasksCapabilitySchema.optional()
|
|
11700
|
+
tasks: ClientTasksCapabilitySchema.optional(),
|
|
11701
|
+
extensions: record(string2(), AssertObjectSchema).optional()
|
|
11701
11702
|
});
|
|
11702
11703
|
var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
11703
11704
|
protocolVersion: string2(),
|
|
@@ -11722,7 +11723,8 @@ var ServerCapabilitiesSchema = object({
|
|
|
11722
11723
|
tools: object({
|
|
11723
11724
|
listChanged: boolean2().optional()
|
|
11724
11725
|
}).optional(),
|
|
11725
|
-
tasks: ServerTasksCapabilitySchema.optional()
|
|
11726
|
+
tasks: ServerTasksCapabilitySchema.optional(),
|
|
11727
|
+
extensions: record(string2(), AssertObjectSchema).optional()
|
|
11726
11728
|
});
|
|
11727
11729
|
var InitializeResultSchema = ResultSchema.extend({
|
|
11728
11730
|
protocolVersion: string2(),
|
|
@@ -11837,6 +11839,7 @@ var ResourceSchema = object({
|
|
|
11837
11839
|
uri: string2(),
|
|
11838
11840
|
description: optional(string2()),
|
|
11839
11841
|
mimeType: optional(string2()),
|
|
11842
|
+
size: optional(number2()),
|
|
11840
11843
|
annotations: AnnotationsSchema.optional(),
|
|
11841
11844
|
_meta: optional(looseObject({}))
|
|
11842
11845
|
});
|
|
@@ -12376,7 +12379,7 @@ class UrlElicitationRequiredError extends McpError {
|
|
|
12376
12379
|
}
|
|
12377
12380
|
}
|
|
12378
12381
|
|
|
12379
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
12382
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
12380
12383
|
class ReadBuffer {
|
|
12381
12384
|
append(chunk) {
|
|
12382
12385
|
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
|
|
@@ -12406,7 +12409,7 @@ function serializeMessage(message) {
|
|
|
12406
12409
|
`;
|
|
12407
12410
|
}
|
|
12408
12411
|
|
|
12409
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
12412
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
12410
12413
|
class StdioServerTransport {
|
|
12411
12414
|
constructor(_stdin = process3.stdin, _stdout = process3.stdout) {
|
|
12412
12415
|
this._stdin = _stdin;
|
|
@@ -12507,7 +12510,8 @@ var checkResponseForErrors = (responseData) => {
|
|
|
12507
12510
|
var fetchContents = async ({
|
|
12508
12511
|
contentsQuery: { urls, formats, format, crawl_timeout },
|
|
12509
12512
|
YDC_API_KEY = process.env.YDC_API_KEY,
|
|
12510
|
-
getUserAgent
|
|
12513
|
+
getUserAgent,
|
|
12514
|
+
customHeaders
|
|
12511
12515
|
}) => {
|
|
12512
12516
|
if (!YDC_API_KEY) {
|
|
12513
12517
|
throw new Error("YDC_API_KEY is required for Contents API");
|
|
@@ -12523,6 +12527,7 @@ var fetchContents = async ({
|
|
|
12523
12527
|
const options = {
|
|
12524
12528
|
method: "POST",
|
|
12525
12529
|
headers: new Headers({
|
|
12530
|
+
...customHeaders,
|
|
12526
12531
|
"X-API-Key": YDC_API_KEY,
|
|
12527
12532
|
"Content-Type": "application/json",
|
|
12528
12533
|
"User-Agent": getUserAgent()
|
|
@@ -12581,7 +12586,8 @@ var ResearchResponseSchema = object({
|
|
|
12581
12586
|
var callResearch = async ({
|
|
12582
12587
|
researchQuery,
|
|
12583
12588
|
YDC_API_KEY = process.env.YDC_API_KEY,
|
|
12584
|
-
getUserAgent
|
|
12589
|
+
getUserAgent,
|
|
12590
|
+
customHeaders
|
|
12585
12591
|
}) => {
|
|
12586
12592
|
if (!YDC_API_KEY) {
|
|
12587
12593
|
throw new Error("YDC_API_KEY is required for Research API");
|
|
@@ -12589,6 +12595,7 @@ var callResearch = async ({
|
|
|
12589
12595
|
const response = await fetch(RESEARCH_API_URL, {
|
|
12590
12596
|
method: "POST",
|
|
12591
12597
|
headers: new Headers({
|
|
12598
|
+
...customHeaders,
|
|
12592
12599
|
"X-API-Key": YDC_API_KEY,
|
|
12593
12600
|
"Content-Type": "application/json",
|
|
12594
12601
|
"User-Agent": getUserAgent()
|
|
@@ -12797,7 +12804,8 @@ var ApiErrorResponseSchema = object({
|
|
|
12797
12804
|
var fetchSearchResults = async ({
|
|
12798
12805
|
YDC_API_KEY = process.env.YDC_API_KEY,
|
|
12799
12806
|
searchQuery,
|
|
12800
|
-
getUserAgent
|
|
12807
|
+
getUserAgent,
|
|
12808
|
+
customHeaders
|
|
12801
12809
|
}) => {
|
|
12802
12810
|
const url = new URL(SEARCH_API_URL);
|
|
12803
12811
|
const searchParams = new URLSearchParams;
|
|
@@ -12810,6 +12818,7 @@ var fetchSearchResults = async ({
|
|
|
12810
12818
|
const options = {
|
|
12811
12819
|
method: "GET",
|
|
12812
12820
|
headers: new Headers({
|
|
12821
|
+
...customHeaders,
|
|
12813
12822
|
"X-API-Key": YDC_API_KEY || "",
|
|
12814
12823
|
"User-Agent": getUserAgent()
|
|
12815
12824
|
})
|
|
@@ -12872,8 +12881,8 @@ Additional Context:
|
|
|
12872
12881
|
return `mailto:support@you.com?${params.toString()}`;
|
|
12873
12882
|
};
|
|
12874
12883
|
// src/shared/get-logger.ts
|
|
12875
|
-
var getLogger = (
|
|
12876
|
-
await
|
|
12884
|
+
var getLogger = (sendNotification) => async (params) => {
|
|
12885
|
+
await sendNotification({ method: "notifications/message", params });
|
|
12877
12886
|
};
|
|
12878
12887
|
|
|
12879
12888
|
// src/contents/contents.schemas.ts
|
|
@@ -12923,7 +12932,7 @@ var formatContentsResponse = (response, formats) => {
|
|
|
12923
12932
|
textParts.push(item.html.substring(0, 500));
|
|
12924
12933
|
if (item.html.length > 500) {
|
|
12925
12934
|
textParts.push(`...
|
|
12926
|
-
(truncated for display)`);
|
|
12935
|
+
(truncated for display — full HTML available in structuredContent)`);
|
|
12927
12936
|
}
|
|
12928
12937
|
textParts.push(`
|
|
12929
12938
|
`);
|
|
@@ -12979,10 +12988,9 @@ var registerContentsTool = ({
|
|
|
12979
12988
|
description: "Extract page content in markdown or HTML",
|
|
12980
12989
|
inputSchema: ContentsQuerySchema.shape,
|
|
12981
12990
|
outputSchema: ContentsStructuredContentSchema.shape
|
|
12982
|
-
}, async (
|
|
12983
|
-
const logger = getLogger(
|
|
12991
|
+
}, async (contentsQuery, { sendNotification }) => {
|
|
12992
|
+
const logger = getLogger(sendNotification);
|
|
12984
12993
|
try {
|
|
12985
|
-
const contentsQuery = ContentsQuerySchema.parse(toolInput);
|
|
12986
12994
|
const { urls, formats, format, crawl_timeout } = contentsQuery;
|
|
12987
12995
|
const requestFormats = formats || (format ? [format] : ["markdown"]);
|
|
12988
12996
|
const timeoutInfo = crawl_timeout ? ` with timeout: ${crawl_timeout}s` : "";
|
|
@@ -16883,7 +16891,7 @@ function object2(shape, params) {
|
|
|
16883
16891
|
};
|
|
16884
16892
|
return new ZodMiniObject(def);
|
|
16885
16893
|
}
|
|
16886
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
16894
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
16887
16895
|
function isZ4Schema(s) {
|
|
16888
16896
|
const schema = s;
|
|
16889
16897
|
return !!schema._zod;
|
|
@@ -17027,12 +17035,12 @@ function getLiteralValue(schema) {
|
|
|
17027
17035
|
return;
|
|
17028
17036
|
}
|
|
17029
17037
|
|
|
17030
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
17038
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
17031
17039
|
function isTerminal(status) {
|
|
17032
17040
|
return status === "completed" || status === "failed" || status === "cancelled";
|
|
17033
17041
|
}
|
|
17034
17042
|
|
|
17035
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17043
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/Options.js
|
|
17036
17044
|
var ignoreOverride = Symbol("Let zodToJsonSchema decide on which parser to use");
|
|
17037
17045
|
var defaultOptions = {
|
|
17038
17046
|
name: undefined,
|
|
@@ -17065,7 +17073,7 @@ var getDefaultOptions = (options) => typeof options === "string" ? {
|
|
|
17065
17073
|
...defaultOptions,
|
|
17066
17074
|
...options
|
|
17067
17075
|
};
|
|
17068
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17076
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/Refs.js
|
|
17069
17077
|
var getRefs = (options) => {
|
|
17070
17078
|
const _options = getDefaultOptions(options);
|
|
17071
17079
|
const currentPath = _options.name !== undefined ? [..._options.basePath, _options.definitionPath, _options.name] : _options.basePath;
|
|
@@ -17084,7 +17092,7 @@ var getRefs = (options) => {
|
|
|
17084
17092
|
]))
|
|
17085
17093
|
};
|
|
17086
17094
|
};
|
|
17087
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17095
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/errorMessages.js
|
|
17088
17096
|
function addErrorMessage(res, key, errorMessage, refs) {
|
|
17089
17097
|
if (!refs?.errorMessages)
|
|
17090
17098
|
return;
|
|
@@ -17099,7 +17107,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
|
|
|
17099
17107
|
res[key] = value;
|
|
17100
17108
|
addErrorMessage(res, key, errorMessage, refs);
|
|
17101
17109
|
}
|
|
17102
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17110
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js
|
|
17103
17111
|
var getRelativePath = (pathA, pathB) => {
|
|
17104
17112
|
let i = 0;
|
|
17105
17113
|
for (;i < pathA.length && i < pathB.length; i++) {
|
|
@@ -17108,7 +17116,7 @@ var getRelativePath = (pathA, pathB) => {
|
|
|
17108
17116
|
}
|
|
17109
17117
|
return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
|
|
17110
17118
|
};
|
|
17111
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17119
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/any.js
|
|
17112
17120
|
function parseAnyDef(refs) {
|
|
17113
17121
|
if (refs.target !== "openAi") {
|
|
17114
17122
|
return {};
|
|
@@ -17124,7 +17132,7 @@ function parseAnyDef(refs) {
|
|
|
17124
17132
|
};
|
|
17125
17133
|
}
|
|
17126
17134
|
|
|
17127
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17135
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/array.js
|
|
17128
17136
|
function parseArrayDef(def, refs) {
|
|
17129
17137
|
const res = {
|
|
17130
17138
|
type: "array"
|
|
@@ -17148,7 +17156,7 @@ function parseArrayDef(def, refs) {
|
|
|
17148
17156
|
return res;
|
|
17149
17157
|
}
|
|
17150
17158
|
|
|
17151
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17159
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js
|
|
17152
17160
|
function parseBigintDef(def, refs) {
|
|
17153
17161
|
const res = {
|
|
17154
17162
|
type: "integer",
|
|
@@ -17194,24 +17202,24 @@ function parseBigintDef(def, refs) {
|
|
|
17194
17202
|
return res;
|
|
17195
17203
|
}
|
|
17196
17204
|
|
|
17197
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17205
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js
|
|
17198
17206
|
function parseBooleanDef() {
|
|
17199
17207
|
return {
|
|
17200
17208
|
type: "boolean"
|
|
17201
17209
|
};
|
|
17202
17210
|
}
|
|
17203
17211
|
|
|
17204
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17212
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js
|
|
17205
17213
|
function parseBrandedDef(_def, refs) {
|
|
17206
17214
|
return parseDef(_def.type._def, refs);
|
|
17207
17215
|
}
|
|
17208
17216
|
|
|
17209
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17217
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js
|
|
17210
17218
|
var parseCatchDef = (def, refs) => {
|
|
17211
17219
|
return parseDef(def.innerType._def, refs);
|
|
17212
17220
|
};
|
|
17213
17221
|
|
|
17214
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17222
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/date.js
|
|
17215
17223
|
function parseDateDef(def, refs, overrideDateStrategy) {
|
|
17216
17224
|
const strategy = overrideDateStrategy ?? refs.dateStrategy;
|
|
17217
17225
|
if (Array.isArray(strategy)) {
|
|
@@ -17256,7 +17264,7 @@ var integerDateParser = (def, refs) => {
|
|
|
17256
17264
|
return res;
|
|
17257
17265
|
};
|
|
17258
17266
|
|
|
17259
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17267
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/default.js
|
|
17260
17268
|
function parseDefaultDef(_def, refs) {
|
|
17261
17269
|
return {
|
|
17262
17270
|
...parseDef(_def.innerType._def, refs),
|
|
@@ -17264,12 +17272,12 @@ function parseDefaultDef(_def, refs) {
|
|
|
17264
17272
|
};
|
|
17265
17273
|
}
|
|
17266
17274
|
|
|
17267
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17275
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js
|
|
17268
17276
|
function parseEffectsDef(_def, refs) {
|
|
17269
17277
|
return refs.effectStrategy === "input" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);
|
|
17270
17278
|
}
|
|
17271
17279
|
|
|
17272
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17280
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js
|
|
17273
17281
|
function parseEnumDef(def) {
|
|
17274
17282
|
return {
|
|
17275
17283
|
type: "string",
|
|
@@ -17277,7 +17285,7 @@ function parseEnumDef(def) {
|
|
|
17277
17285
|
};
|
|
17278
17286
|
}
|
|
17279
17287
|
|
|
17280
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17288
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js
|
|
17281
17289
|
var isJsonSchema7AllOfType = (type) => {
|
|
17282
17290
|
if ("type" in type && type.type === "string")
|
|
17283
17291
|
return false;
|
|
@@ -17319,7 +17327,7 @@ function parseIntersectionDef(def, refs) {
|
|
|
17319
17327
|
} : undefined;
|
|
17320
17328
|
}
|
|
17321
17329
|
|
|
17322
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17330
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js
|
|
17323
17331
|
function parseLiteralDef(def, refs) {
|
|
17324
17332
|
const parsedType2 = typeof def.value;
|
|
17325
17333
|
if (parsedType2 !== "bigint" && parsedType2 !== "number" && parsedType2 !== "boolean" && parsedType2 !== "string") {
|
|
@@ -17339,7 +17347,7 @@ function parseLiteralDef(def, refs) {
|
|
|
17339
17347
|
};
|
|
17340
17348
|
}
|
|
17341
17349
|
|
|
17342
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17350
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
|
|
17343
17351
|
var emojiRegex2 = undefined;
|
|
17344
17352
|
var zodPatterns = {
|
|
17345
17353
|
cuid: /^[cC][^\s-]{8,}$/,
|
|
@@ -17636,7 +17644,7 @@ function stringifyRegExpWithFlags(regex, refs) {
|
|
|
17636
17644
|
return pattern;
|
|
17637
17645
|
}
|
|
17638
17646
|
|
|
17639
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17647
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/record.js
|
|
17640
17648
|
function parseRecordDef(def, refs) {
|
|
17641
17649
|
if (refs.target === "openAi") {
|
|
17642
17650
|
console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
|
|
@@ -17688,7 +17696,7 @@ function parseRecordDef(def, refs) {
|
|
|
17688
17696
|
return schema;
|
|
17689
17697
|
}
|
|
17690
17698
|
|
|
17691
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17699
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/map.js
|
|
17692
17700
|
function parseMapDef(def, refs) {
|
|
17693
17701
|
if (refs.mapStrategy === "record") {
|
|
17694
17702
|
return parseRecordDef(def, refs);
|
|
@@ -17713,7 +17721,7 @@ function parseMapDef(def, refs) {
|
|
|
17713
17721
|
};
|
|
17714
17722
|
}
|
|
17715
17723
|
|
|
17716
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17724
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js
|
|
17717
17725
|
function parseNativeEnumDef(def) {
|
|
17718
17726
|
const object3 = def.values;
|
|
17719
17727
|
const actualKeys = Object.keys(def.values).filter((key) => {
|
|
@@ -17727,7 +17735,7 @@ function parseNativeEnumDef(def) {
|
|
|
17727
17735
|
};
|
|
17728
17736
|
}
|
|
17729
17737
|
|
|
17730
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17738
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/never.js
|
|
17731
17739
|
function parseNeverDef(refs) {
|
|
17732
17740
|
return refs.target === "openAi" ? undefined : {
|
|
17733
17741
|
not: parseAnyDef({
|
|
@@ -17737,7 +17745,7 @@ function parseNeverDef(refs) {
|
|
|
17737
17745
|
};
|
|
17738
17746
|
}
|
|
17739
17747
|
|
|
17740
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17748
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/null.js
|
|
17741
17749
|
function parseNullDef(refs) {
|
|
17742
17750
|
return refs.target === "openApi3" ? {
|
|
17743
17751
|
enum: ["null"],
|
|
@@ -17747,7 +17755,7 @@ function parseNullDef(refs) {
|
|
|
17747
17755
|
};
|
|
17748
17756
|
}
|
|
17749
17757
|
|
|
17750
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17758
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/union.js
|
|
17751
17759
|
var primitiveMappings = {
|
|
17752
17760
|
ZodString: "string",
|
|
17753
17761
|
ZodNumber: "number",
|
|
@@ -17815,7 +17823,7 @@ var asAnyOf = (def, refs) => {
|
|
|
17815
17823
|
return anyOf.length ? { anyOf } : undefined;
|
|
17816
17824
|
};
|
|
17817
17825
|
|
|
17818
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17826
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js
|
|
17819
17827
|
function parseNullableDef(def, refs) {
|
|
17820
17828
|
if (["ZodString", "ZodNumber", "ZodBigInt", "ZodBoolean", "ZodNull"].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
|
|
17821
17829
|
if (refs.target === "openApi3") {
|
|
@@ -17847,7 +17855,7 @@ function parseNullableDef(def, refs) {
|
|
|
17847
17855
|
return base && { anyOf: [base, { type: "null" }] };
|
|
17848
17856
|
}
|
|
17849
17857
|
|
|
17850
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17858
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/number.js
|
|
17851
17859
|
function parseNumberDef(def, refs) {
|
|
17852
17860
|
const res = {
|
|
17853
17861
|
type: "number"
|
|
@@ -17896,7 +17904,7 @@ function parseNumberDef(def, refs) {
|
|
|
17896
17904
|
return res;
|
|
17897
17905
|
}
|
|
17898
17906
|
|
|
17899
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17907
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/object.js
|
|
17900
17908
|
function parseObjectDef(def, refs) {
|
|
17901
17909
|
const forceOptionalIntoNullable = refs.target === "openAi";
|
|
17902
17910
|
const result = {
|
|
@@ -17966,7 +17974,7 @@ function safeIsOptional(schema) {
|
|
|
17966
17974
|
}
|
|
17967
17975
|
}
|
|
17968
17976
|
|
|
17969
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17977
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js
|
|
17970
17978
|
var parseOptionalDef = (def, refs) => {
|
|
17971
17979
|
if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
|
|
17972
17980
|
return parseDef(def.innerType._def, refs);
|
|
@@ -17985,7 +17993,7 @@ var parseOptionalDef = (def, refs) => {
|
|
|
17985
17993
|
} : parseAnyDef(refs);
|
|
17986
17994
|
};
|
|
17987
17995
|
|
|
17988
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
17996
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js
|
|
17989
17997
|
var parsePipelineDef = (def, refs) => {
|
|
17990
17998
|
if (refs.pipeStrategy === "input") {
|
|
17991
17999
|
return parseDef(def.in._def, refs);
|
|
@@ -18005,12 +18013,12 @@ var parsePipelineDef = (def, refs) => {
|
|
|
18005
18013
|
};
|
|
18006
18014
|
};
|
|
18007
18015
|
|
|
18008
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
18016
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js
|
|
18009
18017
|
function parsePromiseDef(def, refs) {
|
|
18010
18018
|
return parseDef(def.type._def, refs);
|
|
18011
18019
|
}
|
|
18012
18020
|
|
|
18013
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
18021
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/set.js
|
|
18014
18022
|
function parseSetDef(def, refs) {
|
|
18015
18023
|
const items = parseDef(def.valueType._def, {
|
|
18016
18024
|
...refs,
|
|
@@ -18030,7 +18038,7 @@ function parseSetDef(def, refs) {
|
|
|
18030
18038
|
return schema;
|
|
18031
18039
|
}
|
|
18032
18040
|
|
|
18033
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
18041
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js
|
|
18034
18042
|
function parseTupleDef(def, refs) {
|
|
18035
18043
|
if (def.rest) {
|
|
18036
18044
|
return {
|
|
@@ -18058,24 +18066,24 @@ function parseTupleDef(def, refs) {
|
|
|
18058
18066
|
}
|
|
18059
18067
|
}
|
|
18060
18068
|
|
|
18061
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
18069
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js
|
|
18062
18070
|
function parseUndefinedDef(refs) {
|
|
18063
18071
|
return {
|
|
18064
18072
|
not: parseAnyDef(refs)
|
|
18065
18073
|
};
|
|
18066
18074
|
}
|
|
18067
18075
|
|
|
18068
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
18076
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js
|
|
18069
18077
|
function parseUnknownDef(refs) {
|
|
18070
18078
|
return parseAnyDef(refs);
|
|
18071
18079
|
}
|
|
18072
18080
|
|
|
18073
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
18081
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js
|
|
18074
18082
|
var parseReadonlyDef = (def, refs) => {
|
|
18075
18083
|
return parseDef(def.innerType._def, refs);
|
|
18076
18084
|
};
|
|
18077
18085
|
|
|
18078
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
18086
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/selectParser.js
|
|
18079
18087
|
var selectParser = (def, typeName, refs) => {
|
|
18080
18088
|
switch (typeName) {
|
|
18081
18089
|
case ZodFirstPartyTypeKind.ZodString:
|
|
@@ -18153,7 +18161,7 @@ var selectParser = (def, typeName, refs) => {
|
|
|
18153
18161
|
}
|
|
18154
18162
|
};
|
|
18155
18163
|
|
|
18156
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
18164
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/parseDef.js
|
|
18157
18165
|
function parseDef(def, refs, forceResolution = false) {
|
|
18158
18166
|
const seenItem = refs.seen.get(def);
|
|
18159
18167
|
if (refs.override) {
|
|
@@ -18208,7 +18216,7 @@ var addMeta = (def, refs, jsonSchema) => {
|
|
|
18208
18216
|
}
|
|
18209
18217
|
return jsonSchema;
|
|
18210
18218
|
};
|
|
18211
|
-
// ../../node_modules/.bun/zod-to-json-schema@3.25.
|
|
18219
|
+
// ../../node_modules/.bun/zod-to-json-schema@3.25.2+3c5d820c62823f0b/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js
|
|
18212
18220
|
var zodToJsonSchema = (schema, options) => {
|
|
18213
18221
|
const refs = getRefs(options);
|
|
18214
18222
|
let definitions = typeof options === "object" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name2, schema2]) => ({
|
|
@@ -18268,7 +18276,7 @@ var zodToJsonSchema = (schema, options) => {
|
|
|
18268
18276
|
}
|
|
18269
18277
|
return combined;
|
|
18270
18278
|
};
|
|
18271
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
18279
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
18272
18280
|
function mapMiniTarget(t) {
|
|
18273
18281
|
if (!t)
|
|
18274
18282
|
return "draft-7";
|
|
@@ -18310,7 +18318,7 @@ function parseWithCompat(schema, data) {
|
|
|
18310
18318
|
return result.data;
|
|
18311
18319
|
}
|
|
18312
18320
|
|
|
18313
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
18321
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
18314
18322
|
var DEFAULT_REQUEST_TIMEOUT_MSEC = 60000;
|
|
18315
18323
|
|
|
18316
18324
|
class Protocol {
|
|
@@ -18514,6 +18522,10 @@ class Protocol {
|
|
|
18514
18522
|
this._progressHandlers.clear();
|
|
18515
18523
|
this._taskProgressTokens.clear();
|
|
18516
18524
|
this._pendingDebouncedNotifications.clear();
|
|
18525
|
+
for (const info of this._timeoutInfo.values()) {
|
|
18526
|
+
clearTimeout(info.timeoutId);
|
|
18527
|
+
}
|
|
18528
|
+
this._timeoutInfo.clear();
|
|
18517
18529
|
for (const controller of this._requestHandlerAbortControllers.values()) {
|
|
18518
18530
|
controller.abort();
|
|
18519
18531
|
}
|
|
@@ -18644,7 +18656,9 @@ class Protocol {
|
|
|
18644
18656
|
await capturedTransport?.send(errorResponse);
|
|
18645
18657
|
}
|
|
18646
18658
|
}).catch((error2) => this._onerror(new Error(`Failed to send response: ${error2}`))).finally(() => {
|
|
18647
|
-
this._requestHandlerAbortControllers.
|
|
18659
|
+
if (this._requestHandlerAbortControllers.get(request.id) === abortController) {
|
|
18660
|
+
this._requestHandlerAbortControllers.delete(request.id);
|
|
18661
|
+
}
|
|
18648
18662
|
});
|
|
18649
18663
|
}
|
|
18650
18664
|
_onprogress(notification) {
|
|
@@ -19145,7 +19159,7 @@ function mergeCapabilities(base, additional) {
|
|
|
19145
19159
|
return result;
|
|
19146
19160
|
}
|
|
19147
19161
|
|
|
19148
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
19162
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
19149
19163
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
19150
19164
|
var import_ajv_formats = __toESM(require_dist(), 1);
|
|
19151
19165
|
function createDefaultAjvInstance() {
|
|
@@ -19185,7 +19199,7 @@ class AjvJsonSchemaValidator {
|
|
|
19185
19199
|
}
|
|
19186
19200
|
}
|
|
19187
19201
|
|
|
19188
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
19202
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
|
|
19189
19203
|
class ExperimentalServerTasks {
|
|
19190
19204
|
constructor(_server) {
|
|
19191
19205
|
this._server = _server;
|
|
@@ -19263,7 +19277,7 @@ class ExperimentalServerTasks {
|
|
|
19263
19277
|
}
|
|
19264
19278
|
}
|
|
19265
19279
|
|
|
19266
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
19280
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
|
|
19267
19281
|
function assertToolsCallTaskCapability(requests, method, entityName) {
|
|
19268
19282
|
if (!requests) {
|
|
19269
19283
|
throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
@@ -19298,7 +19312,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
19298
19312
|
}
|
|
19299
19313
|
}
|
|
19300
19314
|
|
|
19301
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
19315
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
19302
19316
|
class Server extends Protocol {
|
|
19303
19317
|
constructor(_serverInfo, options) {
|
|
19304
19318
|
super(options);
|
|
@@ -19631,7 +19645,7 @@ class Server extends Protocol {
|
|
|
19631
19645
|
}
|
|
19632
19646
|
}
|
|
19633
19647
|
|
|
19634
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
19648
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
|
|
19635
19649
|
var COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
|
|
19636
19650
|
function isCompletable(schema) {
|
|
19637
19651
|
return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
|
|
@@ -19645,7 +19659,7 @@ var McpZodTypeKind;
|
|
|
19645
19659
|
McpZodTypeKind2["Completable"] = "McpCompletable";
|
|
19646
19660
|
})(McpZodTypeKind || (McpZodTypeKind = {}));
|
|
19647
19661
|
|
|
19648
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
19662
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
|
|
19649
19663
|
var TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;
|
|
19650
19664
|
function validateToolName(name) {
|
|
19651
19665
|
const warnings = [];
|
|
@@ -19703,7 +19717,7 @@ function validateAndWarnToolName(name) {
|
|
|
19703
19717
|
return result.isValid;
|
|
19704
19718
|
}
|
|
19705
19719
|
|
|
19706
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
19720
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
|
|
19707
19721
|
class ExperimentalMcpServerTasks {
|
|
19708
19722
|
constructor(_mcpServer) {
|
|
19709
19723
|
this._mcpServer = _mcpServer;
|
|
@@ -19718,7 +19732,7 @@ class ExperimentalMcpServerTasks {
|
|
|
19718
19732
|
}
|
|
19719
19733
|
}
|
|
19720
19734
|
|
|
19721
|
-
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.
|
|
19735
|
+
// ../../node_modules/.bun/@modelcontextprotocol+sdk@1.29.0+702d06f8eea47248/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
|
|
19722
19736
|
class McpServer {
|
|
19723
19737
|
constructor(serverInfo, options) {
|
|
19724
19738
|
this._registeredResources = {};
|
|
@@ -20302,6 +20316,9 @@ class McpServer {
|
|
|
20302
20316
|
annotations = rest.shift();
|
|
20303
20317
|
}
|
|
20304
20318
|
} else if (typeof firstArg === "object" && firstArg !== null) {
|
|
20319
|
+
if (Object.values(firstArg).some((v) => typeof v === "object" && v !== null)) {
|
|
20320
|
+
throw new Error(`Tool ${name} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);
|
|
20321
|
+
}
|
|
20305
20322
|
annotations = rest.shift();
|
|
20306
20323
|
}
|
|
20307
20324
|
}
|
|
@@ -20394,6 +20411,9 @@ function getZodSchemaObject(schema) {
|
|
|
20394
20411
|
if (isZodRawShapeCompat(schema)) {
|
|
20395
20412
|
return objectFromShape(schema);
|
|
20396
20413
|
}
|
|
20414
|
+
if (!isZodSchemaInstance(schema)) {
|
|
20415
|
+
throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");
|
|
20416
|
+
}
|
|
20397
20417
|
return schema;
|
|
20398
20418
|
}
|
|
20399
20419
|
function promptArgumentsFromSchema(schema) {
|
|
@@ -20440,8 +20460,8 @@ var EMPTY_COMPLETION_RESULT = {
|
|
|
20440
20460
|
// package.json
|
|
20441
20461
|
var package_default = {
|
|
20442
20462
|
name: "@youdotcom-oss/mcp",
|
|
20443
|
-
version: "2.
|
|
20444
|
-
description: "You.com
|
|
20463
|
+
version: "3.2.0-next.1",
|
|
20464
|
+
description: "You.com MCP server — web search, AI research, and content extraction via You.com APIs",
|
|
20445
20465
|
license: "MIT",
|
|
20446
20466
|
engines: {
|
|
20447
20467
|
node: ">=18",
|
|
@@ -20460,55 +20480,49 @@ var package_default = {
|
|
|
20460
20480
|
keywords: [
|
|
20461
20481
|
"mcp",
|
|
20462
20482
|
"web search",
|
|
20463
|
-
"model context protocol"
|
|
20483
|
+
"model context protocol",
|
|
20484
|
+
"ai research"
|
|
20464
20485
|
],
|
|
20465
20486
|
bin: "bin/stdio.js",
|
|
20466
20487
|
type: "module",
|
|
20467
20488
|
exports: {
|
|
20468
|
-
"
|
|
20489
|
+
".": "./src/main.ts"
|
|
20469
20490
|
},
|
|
20470
20491
|
files: [
|
|
20471
20492
|
"bin/stdio.js",
|
|
20472
|
-
"
|
|
20473
|
-
"
|
|
20474
|
-
"!./src/**/tests/*",
|
|
20475
|
-
"!./src/**/*.spec.@(tsx|ts)"
|
|
20493
|
+
"src",
|
|
20494
|
+
"server.json"
|
|
20476
20495
|
],
|
|
20477
20496
|
publishConfig: {
|
|
20478
20497
|
access: "public"
|
|
20479
20498
|
},
|
|
20480
20499
|
scripts: {
|
|
20481
|
-
build: "bun build ./src/stdio.ts --outfile ./bin/stdio.js --target=node",
|
|
20500
|
+
build: "bun build ./src/stdio-server.ts --outfile ./bin/stdio.js --target=node",
|
|
20482
20501
|
check: "bun run check:biome && bun run check:types && bun run check:package",
|
|
20483
20502
|
"check:biome": "biome check",
|
|
20484
20503
|
"check:package": "format-package --check",
|
|
20485
20504
|
"check:types": "tsc --noEmit",
|
|
20486
20505
|
"check:write": "biome check --write && bun run format:package",
|
|
20487
|
-
dev: "bun src/stdio.ts",
|
|
20506
|
+
dev: "bun src/stdio-server.ts",
|
|
20488
20507
|
"format:package": "format-package --write",
|
|
20489
|
-
|
|
20508
|
+
inspector: `test -n "$YDC_API_KEY" || (echo 'YDC_API_KEY is not set' && exit 1); mcp-inspector --config mcp-inspector.json -e YDC_API_KEY=$YDC_API_KEY`,
|
|
20490
20509
|
prepublishOnly: "bun run build",
|
|
20491
|
-
start: "bun run src/http.ts",
|
|
20492
20510
|
test: "bun test",
|
|
20493
|
-
"test:coverage": "bun test --coverage",
|
|
20494
|
-
"test:coverage:watch": "bun test --coverage --watch",
|
|
20495
20511
|
"test:watch": "bun test --watch"
|
|
20496
20512
|
},
|
|
20497
20513
|
mcpName: "io.github.youdotcom-oss/mcp",
|
|
20498
20514
|
dependencies: {
|
|
20499
|
-
"@
|
|
20500
|
-
|
|
20501
|
-
|
|
20502
|
-
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
20503
|
-
hono: "^4.11.7"
|
|
20515
|
+
"@modelcontextprotocol/sdk": "^1.28.0",
|
|
20516
|
+
"@youdotcom-oss/api": "0.5.1",
|
|
20517
|
+
zod: "^4.3.6"
|
|
20504
20518
|
},
|
|
20505
20519
|
devDependencies: {
|
|
20506
|
-
"@modelcontextprotocol/inspector": "0.
|
|
20520
|
+
"@modelcontextprotocol/inspector": "0.21.1"
|
|
20507
20521
|
}
|
|
20508
20522
|
};
|
|
20509
20523
|
|
|
20510
20524
|
// src/get-mcp-server.ts
|
|
20511
|
-
var
|
|
20525
|
+
var getMcpServer = () => new McpServer({
|
|
20512
20526
|
name: "You.com",
|
|
20513
20527
|
version: package_default.version
|
|
20514
20528
|
}, {
|
|
@@ -20521,7 +20535,7 @@ var getMCpServer = () => new McpServer({
|
|
|
20521
20535
|
|
|
20522
20536
|
// src/research/research.schemas.ts
|
|
20523
20537
|
var ResearchStructuredContentSchema = object({
|
|
20524
|
-
|
|
20538
|
+
contentType: string2().describe("Format of the content field"),
|
|
20525
20539
|
sourceCount: number2().describe("Number of sources used"),
|
|
20526
20540
|
sources: array(object({
|
|
20527
20541
|
url: string2().describe("Source URL"),
|
|
@@ -20541,12 +20555,12 @@ var formatResearchResults = (response) => {
|
|
|
20541
20555
|
}
|
|
20542
20556
|
],
|
|
20543
20557
|
structuredContent: {
|
|
20544
|
-
|
|
20558
|
+
contentType: response.output.content_type,
|
|
20545
20559
|
sourceCount: response.output.sources.length,
|
|
20546
20560
|
sources: response.output.sources.map((source) => ({
|
|
20547
20561
|
url: source.url,
|
|
20548
20562
|
title: source.title,
|
|
20549
|
-
snippetCount: source.snippets
|
|
20563
|
+
snippetCount: source.snippets?.length ?? 0
|
|
20550
20564
|
}))
|
|
20551
20565
|
}
|
|
20552
20566
|
};
|
|
@@ -20563,8 +20577,8 @@ var registerResearchTool = ({
|
|
|
20563
20577
|
description: "Research a topic with comprehensive answers and cited sources. Configurable effort levels (lite, standard, deep, exhaustive).",
|
|
20564
20578
|
inputSchema: ResearchQuerySchema.shape,
|
|
20565
20579
|
outputSchema: ResearchStructuredContentSchema.shape
|
|
20566
|
-
}, async (researchQuery) => {
|
|
20567
|
-
const logger = getLogger(
|
|
20580
|
+
}, async (researchQuery, { sendNotification }) => {
|
|
20581
|
+
const logger = getLogger(sendNotification);
|
|
20568
20582
|
try {
|
|
20569
20583
|
const response = await callResearch({
|
|
20570
20584
|
researchQuery,
|
|
@@ -20574,7 +20588,7 @@ var registerResearchTool = ({
|
|
|
20574
20588
|
const sourceCount = response.output.sources.length;
|
|
20575
20589
|
await logger({
|
|
20576
20590
|
level: "info",
|
|
20577
|
-
data: `Research
|
|
20591
|
+
data: `Research for "${researchQuery.input.substring(0, 100)}" complete: ${sourceCount} source(s)`
|
|
20578
20592
|
});
|
|
20579
20593
|
const { content, structuredContent } = formatResearchResults(response);
|
|
20580
20594
|
return { content, structuredContent };
|
|
@@ -20605,7 +20619,7 @@ Report this issue: ${reportLink}`
|
|
|
20605
20619
|
});
|
|
20606
20620
|
};
|
|
20607
20621
|
|
|
20608
|
-
// src/search/search.
|
|
20622
|
+
// src/search/search.schemas.ts
|
|
20609
20623
|
var SearchStructuredContentSchema = object({
|
|
20610
20624
|
resultCounts: object({
|
|
20611
20625
|
web: number2().describe("Web results"),
|
|
@@ -20731,8 +20745,8 @@ var registerSearchTool = ({
|
|
|
20731
20745
|
description: "Web and news search via You.com",
|
|
20732
20746
|
inputSchema: SearchQuerySchema.shape,
|
|
20733
20747
|
outputSchema: SearchStructuredContentSchema.shape
|
|
20734
|
-
}, async (searchQuery) => {
|
|
20735
|
-
const logger = getLogger(
|
|
20748
|
+
}, async (searchQuery, { sendNotification }) => {
|
|
20749
|
+
const logger = getLogger(sendNotification);
|
|
20736
20750
|
try {
|
|
20737
20751
|
const response = await fetchSearchResults({
|
|
20738
20752
|
searchQuery,
|
|
@@ -20801,10 +20815,10 @@ var useGetClientVersion = (mcp) => () => {
|
|
|
20801
20815
|
return setUserAgent("UNKNOWN");
|
|
20802
20816
|
};
|
|
20803
20817
|
|
|
20804
|
-
// src/stdio.ts
|
|
20805
|
-
var YDC_API_KEY = process.env.YDC_API_KEY;
|
|
20818
|
+
// src/stdio-server.ts
|
|
20819
|
+
var YDC_API_KEY = process.env.YDC_API_KEY || undefined;
|
|
20806
20820
|
try {
|
|
20807
|
-
const mcp =
|
|
20821
|
+
const mcp = getMcpServer();
|
|
20808
20822
|
const getUserAgent = useGetClientVersion(mcp);
|
|
20809
20823
|
registerSearchTool({ mcp, YDC_API_KEY, getUserAgent });
|
|
20810
20824
|
registerContentsTool({ mcp, YDC_API_KEY, getUserAgent });
|
|
@@ -20812,7 +20826,7 @@ try {
|
|
|
20812
20826
|
const transport = new StdioServerTransport;
|
|
20813
20827
|
await mcp.connect(transport);
|
|
20814
20828
|
} catch (error2) {
|
|
20815
|
-
process.stderr.write(`Failed to start server: ${error2}
|
|
20829
|
+
process.stderr.write(`Failed to start MCP server: ${error2}
|
|
20816
20830
|
`);
|
|
20817
20831
|
process.exit(1);
|
|
20818
20832
|
}
|