mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-26 23:28:43 +00:00
182 lines
8.7 KiB
Diff
182 lines
8.7 KiB
Diff
diff --git a/dist/public-C-9H-ftO.cjs b/dist/public-C-9H-ftO.cjs
|
|
index 2427ea1fbf85eccf15bfb804aa80a8d7381232e7..0789ac0292e6ce5200fc73597bd5829083ab90d6 100644
|
|
--- a/dist/public-C-9H-ftO.cjs
|
|
+++ b/dist/public-C-9H-ftO.cjs
|
|
@@ -1038,7 +1038,6 @@ async function discoverMetadataWithFallback(serverUrl, wellKnownType, fetchFn, o
|
|
else {
|
|
const wellKnownPath = buildWellKnownPath(wellKnownType, issuer.pathname);
|
|
url = new URL(wellKnownPath, opts?.metadataServerUrl ?? issuer);
|
|
- url.search = issuer.search;
|
|
}
|
|
let response = await tryMetadataDiscovery(url, protocolVersion, fetchFn);
|
|
if (!opts?.metadataUrl && shouldAttemptFallback(response, issuer.pathname)) response = await tryMetadataDiscovery(new URL(`/.well-known/${wellKnownType}`, issuer), protocolVersion, fetchFn);
|
|
@@ -1222,7 +1221,6 @@ async function startAuthorization(authorizationServerUrl, { metadata, clientInfo
|
|
authorizationUrl.searchParams.set("redirect_uri", String(redirectUrl));
|
|
if (state) authorizationUrl.searchParams.set("state", state);
|
|
if (scope) authorizationUrl.searchParams.set("scope", scope);
|
|
- if (scope?.split(" ").includes("offline_access")) authorizationUrl.searchParams.append("prompt", "consent");
|
|
if (resource) authorizationUrl.searchParams.set("resource", resourceIndicatorToString(resource));
|
|
return {
|
|
authorizationUrl,
|
|
@@ -2833,7 +2831,16 @@ var Client = class extends require_src.Protocol {
|
|
}));
|
|
return require_src.runInputRequiredFlow({
|
|
getRequestHandler: (method) => this._getRequestHandler(method),
|
|
- buildContext: (baseCtx) => this.buildContext(baseCtx, void 0),
|
|
+ buildContext: (baseCtx) => this.buildContext({
|
|
+ ...baseCtx,
|
|
+ mcpReq: {
|
|
+ ...baseCtx.mcpReq,
|
|
+ origin: {
|
|
+ request: flow.request,
|
|
+ options: flow.options
|
|
+ }
|
|
+ }
|
|
+ }, void 0),
|
|
sessionId: this.transport?.sessionId
|
|
}, this._inputRequiredDriverConfig, decoded, flow);
|
|
}
|
|
@@ -3992,7 +3999,7 @@ var Client = class extends require_src.Protocol {
|
|
_excludeInvalidXMcpHeaderTools(result) {
|
|
if (this.getProtocolEra() !== "modern" || !this.transport || detectProbeTransportKind(this.transport) === "stdio") return;
|
|
const filtered = result.tools.filter((tool) => {
|
|
- const scan = require_src.scanXMcpHeaderDeclarations(tool.inputSchema);
|
|
+ const scan = require_src.scanXMcpHeaderDeclarations(tool?.inputSchema);
|
|
if (!scan.valid) {
|
|
console.warn(`[mcp-sdk] excluding tool '${tool.name}' from tools/list: invalid x-mcp-header declaration — ${scan.reason}`);
|
|
return false;
|
|
diff --git a/dist/public-CvV4ZHkX.mjs b/dist/public-CvV4ZHkX.mjs
|
|
index fdb69ef9ee42ad4e1019cb4c9c727617286fe916..dee9ecf8c451aa2e400efd823965565282e5bc5c 100644
|
|
--- a/dist/public-CvV4ZHkX.mjs
|
|
+++ b/dist/public-CvV4ZHkX.mjs
|
|
@@ -1035,7 +1035,6 @@ async function discoverMetadataWithFallback(serverUrl, wellKnownType, fetchFn, o
|
|
else {
|
|
const wellKnownPath = buildWellKnownPath(wellKnownType, issuer.pathname);
|
|
url = new URL(wellKnownPath, opts?.metadataServerUrl ?? issuer);
|
|
- url.search = issuer.search;
|
|
}
|
|
let response = await tryMetadataDiscovery(url, protocolVersion, fetchFn);
|
|
if (!opts?.metadataUrl && shouldAttemptFallback(response, issuer.pathname)) response = await tryMetadataDiscovery(new URL(`/.well-known/${wellKnownType}`, issuer), protocolVersion, fetchFn);
|
|
@@ -1219,7 +1218,6 @@ async function startAuthorization(authorizationServerUrl, { metadata, clientInfo
|
|
authorizationUrl.searchParams.set("redirect_uri", String(redirectUrl));
|
|
if (state) authorizationUrl.searchParams.set("state", state);
|
|
if (scope) authorizationUrl.searchParams.set("scope", scope);
|
|
- if (scope?.split(" ").includes("offline_access")) authorizationUrl.searchParams.append("prompt", "consent");
|
|
if (resource) authorizationUrl.searchParams.set("resource", resourceIndicatorToString(resource));
|
|
return {
|
|
authorizationUrl,
|
|
@@ -2830,7 +2828,16 @@ var Client = class extends Protocol {
|
|
}));
|
|
return runInputRequiredFlow({
|
|
getRequestHandler: (method) => this._getRequestHandler(method),
|
|
- buildContext: (baseCtx) => this.buildContext(baseCtx, void 0),
|
|
+ buildContext: (baseCtx) => this.buildContext({
|
|
+ ...baseCtx,
|
|
+ mcpReq: {
|
|
+ ...baseCtx.mcpReq,
|
|
+ origin: {
|
|
+ request: flow.request,
|
|
+ options: flow.options
|
|
+ }
|
|
+ }
|
|
+ }, void 0),
|
|
sessionId: this.transport?.sessionId
|
|
}, this._inputRequiredDriverConfig, decoded, flow);
|
|
}
|
|
@@ -3989,7 +3996,7 @@ var Client = class extends Protocol {
|
|
_excludeInvalidXMcpHeaderTools(result) {
|
|
if (this.getProtocolEra() !== "modern" || !this.transport || detectProbeTransportKind(this.transport) === "stdio") return;
|
|
const filtered = result.tools.filter((tool) => {
|
|
- const scan = scanXMcpHeaderDeclarations(tool.inputSchema);
|
|
+ const scan = scanXMcpHeaderDeclarations(tool?.inputSchema);
|
|
if (!scan.valid) {
|
|
console.warn(`[mcp-sdk] excluding tool '${tool.name}' from tools/list: invalid x-mcp-header declaration — ${scan.reason}`);
|
|
return false;
|
|
diff --git a/dist/src-CeKsbNLO.mjs b/dist/src-CeKsbNLO.mjs
|
|
index 4d390185ad2167d0e256fbf3aba1367a7e343bc0..4d3e1f21a69d5b426900dcb71f82a9c77eb79990 100644
|
|
--- a/dist/src-CeKsbNLO.mjs
|
|
+++ b/dist/src-CeKsbNLO.mjs
|
|
@@ -1092,11 +1092,7 @@ function build$1() {
|
|
properties: z.record(z.string(), JSONValueSchema$1).optional(),
|
|
required: z.array(z.string()).optional()
|
|
}).catchall(z.unknown()),
|
|
- outputSchema: z.object({
|
|
- type: z.literal("object"),
|
|
- properties: z.record(z.string(), JSONValueSchema$1).optional(),
|
|
- required: z.array(z.string()).optional()
|
|
- }).catchall(z.unknown()).optional(),
|
|
+ outputSchema: z.looseObject({ $schema: z.string().optional() }).optional(),
|
|
annotations: ToolAnnotationsSchema$1.optional(),
|
|
execution: ToolExecutionSchema$1.optional(),
|
|
_meta: z.record(z.string(), z.unknown()).optional()
|
|
@@ -1108,7 +1104,7 @@ function build$1() {
|
|
/**
|
|
* The server's response to a {@linkcode ListToolsRequest | tools/list} request from the client.
|
|
*/
|
|
- const ListToolsResultSchema$1 = PaginatedResultSchema$1.extend({ tools: z.array(ToolSchema$1) });
|
|
+ const ListToolsResultSchema$1 = PaginatedResultSchema$1.extend({ tools: z.array(z.unknown()) });
|
|
/**
|
|
* The server's response to a tool call.
|
|
*/
|
|
@@ -2858,7 +2854,7 @@ function build() {
|
|
const ListToolsResultSchema$1 = wireResult({
|
|
ttlMs: z.number().int().min(0),
|
|
cacheScope: z.enum(["public", "private"]),
|
|
- tools: z.array(ToolSchema$1),
|
|
+ tools: z.array(z.unknown()),
|
|
nextCursor: CursorSchema$1.optional()
|
|
});
|
|
const ListPromptsResultSchema$1 = wireResult({
|
|
@@ -3119,7 +3115,7 @@ function build() {
|
|
"tools/list": liftedResult({
|
|
ttlMs: z.number().int().min(0),
|
|
cacheScope: z.enum(["public", "private"]),
|
|
- tools: z.array(ToolSchema$1),
|
|
+ tools: z.array(z.unknown()),
|
|
nextCursor: CursorSchema$1.optional()
|
|
}),
|
|
"prompts/get": liftedResult({
|
|
diff --git a/dist/src-ohtppAR3.cjs b/dist/src-ohtppAR3.cjs
|
|
index 7d9314447f98b6aea72649b4fed009fd306b8919..f8c6e461e23e23f5182d07d8f689df3916dc2a7f 100644
|
|
--- a/dist/src-ohtppAR3.cjs
|
|
+++ b/dist/src-ohtppAR3.cjs
|
|
@@ -1093,11 +1093,7 @@ function build$1() {
|
|
properties: zod_v4.record(zod_v4.string(), JSONValueSchema$1).optional(),
|
|
required: zod_v4.array(zod_v4.string()).optional()
|
|
}).catchall(zod_v4.unknown()),
|
|
- outputSchema: zod_v4.object({
|
|
- type: zod_v4.literal("object"),
|
|
- properties: zod_v4.record(zod_v4.string(), JSONValueSchema$1).optional(),
|
|
- required: zod_v4.array(zod_v4.string()).optional()
|
|
- }).catchall(zod_v4.unknown()).optional(),
|
|
+ outputSchema: zod_v4.looseObject({ $schema: zod_v4.string().optional() }).optional(),
|
|
annotations: ToolAnnotationsSchema$1.optional(),
|
|
execution: ToolExecutionSchema$1.optional(),
|
|
_meta: zod_v4.record(zod_v4.string(), zod_v4.unknown()).optional()
|
|
@@ -1109,7 +1105,7 @@ function build$1() {
|
|
/**
|
|
* The server's response to a {@linkcode ListToolsRequest | tools/list} request from the client.
|
|
*/
|
|
- const ListToolsResultSchema$1 = PaginatedResultSchema$1.extend({ tools: zod_v4.array(ToolSchema$1) });
|
|
+ const ListToolsResultSchema$1 = PaginatedResultSchema$1.extend({ tools: zod_v4.array(zod_v4.unknown()) });
|
|
/**
|
|
* The server's response to a tool call.
|
|
*/
|
|
@@ -2859,7 +2855,7 @@ function build() {
|
|
const ListToolsResultSchema$1 = wireResult({
|
|
ttlMs: zod_v4.number().int().min(0),
|
|
cacheScope: zod_v4.enum(["public", "private"]),
|
|
- tools: zod_v4.array(ToolSchema$1),
|
|
+ tools: zod_v4.array(zod_v4.unknown()),
|
|
nextCursor: CursorSchema$1.optional()
|
|
});
|
|
const ListPromptsResultSchema$1 = wireResult({
|
|
@@ -3120,7 +3116,7 @@ function build() {
|
|
"tools/list": liftedResult({
|
|
ttlMs: zod_v4.number().int().min(0),
|
|
cacheScope: zod_v4.enum(["public", "private"]),
|
|
- tools: zod_v4.array(ToolSchema$1),
|
|
+ tools: zod_v4.array(zod_v4.unknown()),
|
|
nextCursor: CursorSchema$1.optional()
|
|
}),
|
|
"prompts/get": liftedResult({
|