@blazingagents/sdk 0.55.0 → 0.55.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.
|
@@ -2,7 +2,6 @@ import { z } from "zod";
|
|
|
2
2
|
import { mcpConnectionIdSchema } from "../ids.js";
|
|
3
3
|
import { MAX_MCP_ATTACHMENT_METADATA_KEY_LENGTH, MAX_MCP_ATTACHMENT_METADATA_KEYS, MAX_MCP_BEARER_TOKEN_LENGTH, MAX_MCP_CONNECTION_NAME_LENGTH, MAX_MCP_CONNECTION_TEST_LATENCY_MS, MAX_MCP_CONNECTION_URL_LENGTH, MAX_MCP_OAUTH_CLIENT_ID_LENGTH, MAX_MCP_OAUTH_CLIENT_SECRET_LENGTH, MAX_MCP_OAUTH_SCOPE_LENGTH, MAX_MCP_SERVER_NAME_LENGTH, MAX_MCP_SERVER_VERSION_LENGTH, MAX_MCP_TOOL_NAME_LENGTH, MAX_MCP_TOOLS_PER_CONNECTION, } from "../limitations.js";
|
|
4
4
|
import { atLeastOneFieldMessage, hasObjectKeys, hasUniqueValues, } from "../utils.js";
|
|
5
|
-
const OPAQUE_MCP_OAUTH_TOKEN_PATTERN = /^[A-Za-z0-9_-]{43}$/;
|
|
6
5
|
export const mcpConnectionAuthTypeSchema = z.enum([
|
|
7
6
|
"none",
|
|
8
7
|
"bearer",
|
|
@@ -216,12 +215,10 @@ export const mcpOauthAuthorizationLaunchResponseSchema = z
|
|
|
216
215
|
.url()
|
|
217
216
|
.refine((value) => {
|
|
218
217
|
const url = new URL(value);
|
|
219
|
-
return (url.
|
|
218
|
+
return ((url.protocol === "https:" || url.protocol === "http:") &&
|
|
220
219
|
url.username === "" &&
|
|
221
220
|
url.password === "" &&
|
|
222
|
-
url.hash === ""
|
|
223
|
-
url.searchParams.size === 1 &&
|
|
224
|
-
OPAQUE_MCP_OAUTH_TOKEN_PATTERN.test(url.searchParams.get("setup") ?? ""));
|
|
221
|
+
url.hash === "");
|
|
225
222
|
}),
|
|
226
223
|
})
|
|
227
224
|
.strip();
|