@selvajs/selva 4.21.0-beta.6 → 4.21.0-beta.8
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/build/adapter-node.js +1 -1
- package/build/client/_app/immutable/assets/0.CqqJCiiV.css +2 -0
- package/build/client/_app/immutable/assets/0.CqqJCiiV.css.br +0 -0
- package/build/client/_app/immutable/assets/0.CqqJCiiV.css.gz +0 -0
- package/build/client/_app/immutable/chunks/{BepzH9eI.js → DptnDNFA.js} +60 -55
- package/build/client/_app/immutable/chunks/DptnDNFA.js.br +0 -0
- package/build/client/_app/immutable/chunks/{BepzH9eI.js.gz → DptnDNFA.js.gz} +0 -0
- package/build/client/_app/immutable/chunks/DvJo0Zn0.js +1 -0
- package/build/client/_app/immutable/chunks/DvJo0Zn0.js.br +1 -0
- package/build/client/_app/immutable/chunks/DvJo0Zn0.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.DblLep9O.js → app.DPVyoSCt.js} +2 -2
- package/build/client/_app/immutable/entry/app.DPVyoSCt.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DPVyoSCt.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{15.BXIV1QfS.js → 15.0NRg5Hm0.js} +1 -1
- package/build/client/_app/immutable/nodes/15.0NRg5Hm0.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.0NRg5Hm0.js.gz +0 -0
- package/build/client/_app/immutable/nodes/21.DpKe0-GH.js +1 -0
- package/build/client/_app/immutable/nodes/21.DpKe0-GH.js.br +0 -0
- package/build/client/_app/immutable/nodes/21.DpKe0-GH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/24.DkL5kHzA.js +3 -0
- package/build/client/_app/immutable/nodes/24.DkL5kHzA.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.DkL5kHzA.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/.vite/manifest.json +20 -34
- package/build/server/_app/immutable/assets/_layout.CqqJCiiV.css +2 -0
- package/build/server/chunks/api-errors.js +18 -3
- package/build/server/chunks/api-errors.js.map +1 -1
- package/build/server/chunks/boot.server.js +1 -1
- package/build/server/chunks/computeRateLimit.server.js +1 -1
- package/build/server/chunks/delete-with-blobs.js +1 -1
- package/build/server/chunks/engine.server.js +50 -3
- package/build/server/chunks/engine.server.js.map +1 -1
- package/build/server/chunks/grasshopper.js +1 -1
- package/build/server/chunks/handlers.js +24 -20
- package/build/server/chunks/handlers.js.map +1 -1
- package/build/server/chunks/http2.js +1 -1
- package/build/server/chunks/instance.js +3 -3
- package/build/server/chunks/internal.js +1 -1
- package/build/server/chunks/{abort-Bfrdupaj.js → keepalive-vtcjhAV3.js} +6 -3
- package/build/server/chunks/keepalive-vtcjhAV3.js.map +1 -0
- package/build/server/chunks/oauth.js +70 -24
- package/build/server/chunks/oauth.js.map +1 -1
- package/build/server/chunks/package.js +1 -1
- package/build/server/chunks/package.js.map +1 -1
- package/build/server/chunks/permissions.server.js +1 -1
- package/build/server/chunks/providers.server.js +72 -3
- package/build/server/chunks/providers.server.js.map +1 -1
- package/build/server/chunks/resolve-server.js +1 -1
- package/build/server/chunks/schema-extraction.js +75 -8
- package/build/server/chunks/schema-extraction.js.map +1 -1
- package/build/server/chunks/server-config-write.js +1 -1
- package/build/server/chunks/server2.js +2 -2
- package/build/server/chunks/server2.js.map +1 -1
- package/build/server/chunks/serverStats.server.js +1 -1
- package/build/server/chunks/solve.server.js +4 -5
- package/build/server/chunks/solve.server.js.map +1 -1
- package/build/server/chunks/sveltekit.js +3 -4
- package/build/server/chunks/sveltekit.js.map +1 -1
- package/build/server/entries/endpoints/.well-known/oauth-authorization-server/_server.ts.js +6 -3
- package/build/server/entries/endpoints/.well-known/oauth-authorization-server/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/.well-known/oauth-protected-resource/_server.ts.js +6 -3
- package/build/server/entries/endpoints/.well-known/oauth-protected-resource/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/.well-known/oauth-protected-resource/mcp/_server.ts.js +6 -3
- package/build/server/entries/endpoints/.well-known/oauth-protected-resource/mcp/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/admin/compute/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/compute/actions/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/compute/status/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/system/health/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/system/update/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/users/_id_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/users/_id_/disable/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/admin/users/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/files/_...path_/_server.ts.js +1 -1
- package/build/server/entries/endpoints/api/v1/compute/_server.ts.js +10 -5
- package/build/server/entries/endpoints/api/v1/compute/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/api/v1/compute/schema/_server.ts.js +2 -2
- package/build/server/entries/endpoints/api/v1/definitions/_guid_/solve/_server.ts.js +3 -3
- package/build/server/entries/endpoints/mcp/_server.ts.js +43 -13
- package/build/server/entries/endpoints/mcp/_server.ts.js.map +1 -1
- package/build/server/entries/endpoints/oauth/register/_server.ts.js +1 -1
- package/build/server/entries/endpoints/oauth/token/_server.ts.js +1 -1
- package/build/server/entries/hooks.server.js +1 -1
- package/build/server/entries/pages/admin/compute/_page.server.ts.js +1 -2
- package/build/server/entries/pages/admin/compute/_page.server.ts.js.map +1 -1
- package/build/server/entries/pages/admin/system/_page.server.ts.js +3 -3
- package/build/server/entries/pages/admin/system/_page.server.ts.js.map +1 -1
- package/build/server/entries/pages/admin/system/_page.svelte.js +1 -1
- package/build/server/entries/pages/admin/system/_page.svelte.js.map +1 -1
- package/build/server/entries/pages/library/_guid_/_page.server.ts.js +198 -99
- package/build/server/entries/pages/library/_guid_/_page.server.ts.js.map +1 -1
- package/build/server/entries/pages/library/_guid_/_page.svelte.js +462 -30
- package/build/server/entries/pages/library/_guid_/_page.svelte.js.map +1 -1
- package/build/server/entries/pages/oauth/authorize/_page.server.ts.js +3 -2
- package/build/server/entries/pages/oauth/authorize/_page.server.ts.js.map +1 -1
- package/build/server/entries/pages/oauth/authorize/_page.svelte.js +8 -1
- package/build/server/entries/pages/oauth/authorize/_page.svelte.js.map +1 -1
- package/build/server/manifest-full.js +1 -1
- package/build/server/manifest.js +1 -1
- package/build/server/nodes/0.js +2 -2
- package/build/server/nodes/15.js +1 -1
- package/build/server/nodes/21.js +1 -1
- package/build/server/nodes/24.js +1 -1
- package/build/server/server.js +1 -1
- package/package.json +7 -7
- package/templates/.env.example +5 -3
- package/build/client/_app/immutable/assets/0.2jDm0bqh.css +0 -2
- package/build/client/_app/immutable/assets/0.2jDm0bqh.css.br +0 -0
- package/build/client/_app/immutable/assets/0.2jDm0bqh.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BepzH9eI.js.br +0 -0
- package/build/client/_app/immutable/chunks/BmoT9ksD.js +0 -1
- package/build/client/_app/immutable/chunks/BmoT9ksD.js.br +0 -1
- package/build/client/_app/immutable/chunks/BmoT9ksD.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.DblLep9O.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DblLep9O.js.gz +0 -0
- package/build/client/_app/immutable/nodes/15.BXIV1QfS.js.br +0 -0
- package/build/client/_app/immutable/nodes/15.BXIV1QfS.js.gz +0 -0
- package/build/client/_app/immutable/nodes/21.DvC40Ypm.js +0 -1
- package/build/client/_app/immutable/nodes/21.DvC40Ypm.js.br +0 -0
- package/build/client/_app/immutable/nodes/21.DvC40Ypm.js.gz +0 -0
- package/build/client/_app/immutable/nodes/24.CPSunfJJ.js +0 -3
- package/build/client/_app/immutable/nodes/24.CPSunfJJ.js.br +0 -0
- package/build/client/_app/immutable/nodes/24.CPSunfJJ.js.gz +0 -0
- package/build/server/_app/immutable/assets/_layout.2jDm0bqh.css +0 -2
- package/build/server/chunks/abort-Bfrdupaj.js.map +0 -1
- package/build/server/chunks/computeLimits.js +0 -33
- package/build/server/chunks/computeLimits.js.map +0 -1
- /package/build/client/_app/immutable/nodes/{0.CYdyv5To.js → 0.Ds0zeDAg.js} +0 -0
- /package/build/client/_app/immutable/nodes/{0.CYdyv5To.js.br → 0.Ds0zeDAg.js.br} +0 -0
- /package/build/client/_app/immutable/nodes/{0.CYdyv5To.js.gz → 0.Ds0zeDAg.js.gz} +0 -0
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { t as DISCOVERY_HEADERS } from "../../../../chunks/server2.js";
|
|
1
|
+
import { a as oauthUnavailable, i as oauthServer, t as DISCOVERY_HEADERS } from "../../../../chunks/server2.js";
|
|
3
2
|
import { t as publicUrl } from "../../../../chunks/origin.js";
|
|
4
3
|
import { json } from "@sveltejs/kit";
|
|
5
4
|
// src/routes/.well-known/oauth-authorization-server/+server.ts
|
|
6
|
-
var GET = ({ url }) =>
|
|
5
|
+
var GET = ({ url }) => {
|
|
6
|
+
const oauth = oauthServer(publicUrl(url).origin);
|
|
7
|
+
if (!oauth) return oauthUnavailable();
|
|
8
|
+
return json(oauth.authorizationServerMetadata(), { headers: DISCOVERY_HEADERS });
|
|
9
|
+
};
|
|
7
10
|
export { GET };
|
|
8
11
|
|
|
9
12
|
//# sourceMappingURL=_server.ts.js.map
|
package/build/server/entries/endpoints/.well-known/oauth-authorization-server/_server.ts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../src/routes/.well-known/oauth-authorization-server/+server.ts"],"sourcesContent":["import { json } from '@sveltejs/kit';\nimport {
|
|
1
|
+
{"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../src/routes/.well-known/oauth-authorization-server/+server.ts"],"sourcesContent":["import { json } from '@sveltejs/kit';\nimport { DISCOVERY_HEADERS, oauthServer, oauthUnavailable } from '#lib/server/oauth/server.js';\nimport { publicUrl } from '#lib/server/origin.js';\nimport type { RequestHandler } from './$types';\n\nexport const GET: RequestHandler = ({ url }) => {\n\tconst oauth = oauthServer(publicUrl(url).origin);\n\tif (!oauth) return oauthUnavailable();\n\treturn json(oauth.authorizationServerMetadata(), { headers: DISCOVERY_HEADERS });\n};\n"],"mappings":";;;;AAKA,IAAa,OAAuB,EAAE,UAAU;CAC/C,MAAM,QAAQ,YAAY,UAAU,GAAG,CAAC,CAAC,MAAM;CAC/C,IAAI,CAAC,OAAO,OAAO,iBAAiB;CACpC,OAAO,KAAK,MAAM,4BAA4B,GAAG,EAAE,SAAS,kBAAkB,CAAC;AAChF"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as DISCOVERY_HEADERS } from "../../../../chunks/server2.js";
|
|
1
|
+
import { a as oauthUnavailable, i as oauthServer, t as DISCOVERY_HEADERS } from "../../../../chunks/server2.js";
|
|
3
2
|
import { t as publicUrl } from "../../../../chunks/origin.js";
|
|
4
3
|
import { json } from "@sveltejs/kit";
|
|
5
4
|
// src/routes/.well-known/oauth-protected-resource/+server.ts
|
|
6
|
-
var GET = ({ url }) =>
|
|
5
|
+
var GET = ({ url }) => {
|
|
6
|
+
const oauth = oauthServer(publicUrl(url).origin);
|
|
7
|
+
if (!oauth) return oauthUnavailable();
|
|
8
|
+
return json(oauth.protectedResourceMetadata(), { headers: DISCOVERY_HEADERS });
|
|
9
|
+
};
|
|
7
10
|
export { GET };
|
|
8
11
|
|
|
9
12
|
//# sourceMappingURL=_server.ts.js.map
|
package/build/server/entries/endpoints/.well-known/oauth-protected-resource/_server.ts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../src/routes/.well-known/oauth-protected-resource/+server.ts"],"sourcesContent":["import { json } from '@sveltejs/kit';\nimport {
|
|
1
|
+
{"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../src/routes/.well-known/oauth-protected-resource/+server.ts"],"sourcesContent":["import { json } from '@sveltejs/kit';\nimport { DISCOVERY_HEADERS, oauthServer, oauthUnavailable } from '#lib/server/oauth/server.js';\nimport { publicUrl } from '#lib/server/origin.js';\nimport type { RequestHandler } from './$types';\n\n// The bare path is the fallback clients probe when a 401 carries no pointer.\nexport const GET: RequestHandler = ({ url }) => {\n\tconst oauth = oauthServer(publicUrl(url).origin);\n\tif (!oauth) return oauthUnavailable();\n\treturn json(oauth.protectedResourceMetadata(), { headers: DISCOVERY_HEADERS });\n};\n"],"mappings":";;;;AAMA,IAAa,OAAuB,EAAE,UAAU;CAC/C,MAAM,QAAQ,YAAY,UAAU,GAAG,CAAC,CAAC,MAAM;CAC/C,IAAI,CAAC,OAAO,OAAO,iBAAiB;CACpC,OAAO,KAAK,MAAM,0BAA0B,GAAG,EAAE,SAAS,kBAAkB,CAAC;AAC9E"}
|
package/build/server/entries/endpoints/.well-known/oauth-protected-resource/mcp/_server.ts.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as DISCOVERY_HEADERS } from "../../../../../chunks/server2.js";
|
|
1
|
+
import { a as oauthUnavailable, i as oauthServer, t as DISCOVERY_HEADERS } from "../../../../../chunks/server2.js";
|
|
3
2
|
import { t as publicUrl } from "../../../../../chunks/origin.js";
|
|
4
3
|
import { json } from "@sveltejs/kit";
|
|
5
4
|
// src/routes/.well-known/oauth-protected-resource/mcp/+server.ts
|
|
6
|
-
var GET = ({ url }) =>
|
|
5
|
+
var GET = ({ url }) => {
|
|
6
|
+
const oauth = oauthServer(publicUrl(url).origin);
|
|
7
|
+
if (!oauth) return oauthUnavailable();
|
|
8
|
+
return json(oauth.protectedResourceMetadata(), { headers: DISCOVERY_HEADERS });
|
|
9
|
+
};
|
|
7
10
|
export { GET };
|
|
8
11
|
|
|
9
12
|
//# sourceMappingURL=_server.ts.js.map
|
package/build/server/entries/endpoints/.well-known/oauth-protected-resource/mcp/_server.ts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../../src/routes/.well-known/oauth-protected-resource/mcp/+server.ts"],"sourcesContent":["import { json } from '@sveltejs/kit';\nimport {
|
|
1
|
+
{"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../../src/routes/.well-known/oauth-protected-resource/mcp/+server.ts"],"sourcesContent":["import { json } from '@sveltejs/kit';\nimport { DISCOVERY_HEADERS, oauthServer, oauthUnavailable } from '#lib/server/oauth/server.js';\nimport { publicUrl } from '#lib/server/origin.js';\nimport type { RequestHandler } from './$types';\n\nexport const GET: RequestHandler = ({ url }) => {\n\tconst oauth = oauthServer(publicUrl(url).origin);\n\tif (!oauth) return oauthUnavailable();\n\treturn json(oauth.protectedResourceMetadata(), { headers: DISCOVERY_HEADERS });\n};\n"],"mappings":";;;;AAKA,IAAa,OAAuB,EAAE,UAAU;CAC/C,MAAM,QAAQ,YAAY,UAAU,GAAG,CAAC,CAAC,MAAM;CAC/C,IAAI,CAAC,OAAO,OAAO,iBAAiB;CACpC,OAAO,KAAK,MAAM,0BAA0B,GAAG,EAAE,SAAS,kBAAkB,CAAC;AAC9E"}
|
|
@@ -6,7 +6,7 @@ import "../../../../../chunks/compute.js";
|
|
|
6
6
|
import { t as apiError } from "../../../../../chunks/api-errors.js";
|
|
7
7
|
import "../../../../../chunks/access2.server.js";
|
|
8
8
|
import { r as noContent, t as apiRoute } from "../../../../../chunks/http2.js";
|
|
9
|
-
import {
|
|
9
|
+
import { c as evictComputeClient } from "../../../../../chunks/engine.server.js";
|
|
10
10
|
import { t as serverResolver } from "../../../../../chunks/serverResolver.server.js";
|
|
11
11
|
import { json } from "@sveltejs/kit";
|
|
12
12
|
// src/lib/server/compute/evictChangedServers.ts
|
|
@@ -4,7 +4,7 @@ import { n as findServerById } from "../../../../../../chunks/utils.js";
|
|
|
4
4
|
import { t as apiError } from "../../../../../../chunks/api-errors.js";
|
|
5
5
|
import "../../../../../../chunks/access2.server.js";
|
|
6
6
|
import { t as apiRoute } from "../../../../../../chunks/http2.js";
|
|
7
|
-
import {
|
|
7
|
+
import { i as clearSolveResultCache, o as definitionByteCacheStats, r as clearDefinitionCache, u as solveCacheStats } from "../../../../../../chunks/engine.server.js";
|
|
8
8
|
import { t as openServerStats } from "../../../../../../chunks/serverStats.server.js";
|
|
9
9
|
import { json } from "@sveltejs/kit";
|
|
10
10
|
// src/routes/api/admin/compute/actions/+server.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as getComputeServerConfigStore } from "../../../../../../chunks/providers.server.js";
|
|
2
2
|
import { k as ApiErrorCode, y as requireManageCompute } from "../../../../../../chunks/access.js";
|
|
3
3
|
import { n as findServerById } from "../../../../../../chunks/utils.js";
|
|
4
|
-
import {
|
|
4
|
+
import { f as classifyProbeFailure } from "../../../../../../chunks/grasshopper.js";
|
|
5
5
|
import { t as apiError } from "../../../../../../chunks/api-errors.js";
|
|
6
6
|
import "../../../../../../chunks/access2.server.js";
|
|
7
7
|
import { t as apiRoute } from "../../../../../../chunks/http2.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as LocalComputeServerStore, T as providers, a as getComputeServerConfigStore } from "../../../../../../chunks/providers.server.js";
|
|
2
2
|
import { n as env } from "../../../../../../chunks/previous-key.js";
|
|
3
3
|
import { C as requirePermission } from "../../../../../../chunks/access.js";
|
|
4
4
|
import { n as findServerById } from "../../../../../../chunks/utils.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as actorFrom, l as getErrorReporter, u as getEventSink } from "../../../../../../chunks/providers.server.js";
|
|
2
2
|
import { n as env } from "../../../../../../chunks/previous-key.js";
|
|
3
3
|
import { C as requirePermission } from "../../../../../../chunks/access.js";
|
|
4
4
|
import { n as renderThrown } from "../../../../../../chunks/definitions.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as actorFrom, g as getPermissionStore, o as getDataProvider, r as getAuthProvider, u as getEventSink } from "../../../../../../chunks/providers.server.js";
|
|
2
2
|
import { b as requireManageInstanceUsers, k as ApiErrorCode, r as assertCanGrantPlatformPermissions } from "../../../../../../chunks/access.js";
|
|
3
3
|
import { t as SYSTEM_CONTEXT } from "../../../../../../chunks/context.js";
|
|
4
4
|
import { U as requireParams, z as parseBody } from "../../../../../../chunks/api.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as actorFrom, T as providers, r as getAuthProvider, u as getEventSink } from "../../../../../../../chunks/providers.server.js";
|
|
2
2
|
import { b as requireManageInstanceUsers, k as ApiErrorCode } from "../../../../../../../chunks/access.js";
|
|
3
3
|
import { U as requireParams } from "../../../../../../../chunks/api.js";
|
|
4
4
|
import { J as revokeUserApiTokens } from "../../../../../../../chunks/handlers.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as actorFrom, g as getPermissionStore, h as getOrganizationProvider, o as getDataProvider, r as getAuthProvider, u as getEventSink } from "../../../../../chunks/providers.server.js";
|
|
2
2
|
import { b as requireManageInstanceUsers, k as ApiErrorCode, r as assertCanGrantPlatformPermissions } from "../../../../../chunks/access.js";
|
|
3
3
|
import { t as SYSTEM_CONTEXT } from "../../../../../chunks/context.js";
|
|
4
4
|
import { z as parseBody } from "../../../../../chunks/api.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as definitionPaths, U as classifyAssetPath, x as getStorageProvider } from "../../../../../chunks/providers.server.js";
|
|
2
2
|
import { k as ApiErrorCode, n as accessDepsFromConfig } from "../../../../../chunks/access.js";
|
|
3
3
|
import { t as COVER_IMAGE_CONTENT_TYPES } from "../../../../../chunks/types2.js";
|
|
4
4
|
import { r as GuidSchema } from "../../../../../chunks/schemas.js";
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import { L as respondWithKeepalive, z as wantsKeepalive } from "../../../../../chunks/providers.server.js";
|
|
1
2
|
import { k as ApiErrorCode } from "../../../../../chunks/access.js";
|
|
2
3
|
import { g as SolveModeSchema } from "../../../../../chunks/api.js";
|
|
3
|
-
import { t as apiError } from "../../../../../chunks/api-errors.js";
|
|
4
|
-
import {
|
|
4
|
+
import { n as errorResponse, t as apiError } from "../../../../../chunks/api-errors.js";
|
|
5
|
+
import { a as computeRequestCap } from "../../../../../chunks/engine.server.js";
|
|
5
6
|
import { l as requireMaxBodySize } from "../../../../../chunks/admin-auth.server.js";
|
|
6
7
|
import { n as tryResolveShareToken } from "../../../../../chunks/resolve.server.js";
|
|
7
8
|
import { n as runSolve, t as mapSolveError } from "../../../../../chunks/solve.server.js";
|
|
8
9
|
// src/routes/api/v1/compute/+server.ts
|
|
9
|
-
var POST =
|
|
10
|
-
|
|
10
|
+
var POST = (event) => {
|
|
11
|
+
if (!wantsKeepalive(event.request)) return solve(event);
|
|
12
|
+
return respondWithKeepalive(solve(event).catch((err) => errorResponse(err, event.locals.log)));
|
|
13
|
+
};
|
|
14
|
+
async function solve({ request, locals, url }) {
|
|
15
|
+
requireMaxBodySize(request, computeRequestCap());
|
|
11
16
|
const loadStart = performance.now();
|
|
12
17
|
const prepMarks = [];
|
|
13
18
|
let prevMark = performance.now();
|
|
@@ -58,7 +63,7 @@ var POST = async ({ request, locals, url }) => {
|
|
|
58
63
|
} catch (err) {
|
|
59
64
|
mapSolveError(err, locals);
|
|
60
65
|
}
|
|
61
|
-
}
|
|
66
|
+
}
|
|
62
67
|
export { POST };
|
|
63
68
|
|
|
64
69
|
//# sourceMappingURL=_server.ts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../../src/routes/api/v1/compute/+server.ts"],"sourcesContent":["import type { RequestHandler } from './$types';\nimport { apiError, ApiErrorCode } from '#lib/server/api-errors.js';\nimport {
|
|
1
|
+
{"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../../src/routes/api/v1/compute/+server.ts"],"sourcesContent":["import type { RequestEvent, RequestHandler } from './$types';\nimport { apiError, ApiErrorCode, errorResponse } from '#lib/server/api-errors.js';\nimport { computeRequestCap } from '#lib/server/compute/engine.server.js';\nimport { requireMaxBodySize } from '#lib/server/admin-auth.server.js';\nimport { tryResolveShareToken } from '#lib/server/shareLinks/resolve.server.js';\nimport { runSolve, mapSolveError, type SolveAccess } from '#lib/server/compute/solve.server.js';\nimport { SolveModeSchema } from '@selvajs/server/api';\nimport { respondWithKeepalive, wantsKeepalive } from '@selvajs/solve/server';\n\ninterface ComputeRequest {\n\t/** Read for a remote `definitionUrl` only: a stored definition's inputs come from its schema. */\n\tinputs?: unknown;\n\tvalues: Record<string, unknown>;\n\tdefinitionUrl: string;\n\t/** Spec §6 channel selector. Defaults to 'live'. 'draft' requires editor. */\n\tchannel?: 'live' | 'draft';\n\t/**\n\t * Explicit version pick (versioning tab \"Run\"). Solves this exact version\n\t * instead of the channel pointer; editor-only, never share-token accessible.\n\t */\n\tversionId?: string;\n\t/** The caller's open live-event stream; see `SolveParams.streamId`. */\n\tstreamId?: string;\n\t/** See `SolveBodySchema.mode`. */\n\tmode?: string;\n}\n\n// The URL-addressed solve: takes an arbitrary `definitionUrl`, and is the only\n// route that accepts a share token. The solve mechanics it shares with\n// `/api/v1/definitions/{guid}/solve` live in `solve.server.ts`; what stays here\n// is the body shape and the share-token branch, which must NOT reach the\n// definition-addressed route.\n//\n// The web app asks for keep-alive, so a solve longer than the reverse proxy's read timeout\n// still lands. Errors then travel inside the 200, which is why they become responses here.\n\nexport const POST: RequestHandler = (event) => {\n\tif (!wantsKeepalive(event.request)) return solve(event);\n\treturn respondWithKeepalive(solve(event).catch((err) => errorResponse(err, event.locals.log)));\n};\n\nasync function solve({ request, locals, url }: RequestEvent): Promise<Response> {\n\t// Reject oversized payloads before buffering.\n\trequireMaxBodySize(request, computeRequestCap());\n\n\t// DEBUG (SELVA_FLAG_COMPUTE_DEBUG): start of server-side work. The solve metric's\n\t// `durationMs` wraps ONLY scheduler.solve, so everything before it (auth, DB reads,\n\t// definition fetch, input tree build) and the response serialization after it are\n\t// otherwise invisible. `runSolve` continues these marks and logs the breakdown.\n\tconst loadStart = performance.now();\n\tconst prepMarks: [string, number][] = [];\n\tlet prevMark = performance.now();\n\tconst mark = (label: string) => {\n\t\tprepMarks.push([label, performance.now() - prevMark]);\n\t\tprevMark = performance.now();\n\t};\n\n\ttry {\n\t\tconst body: ComputeRequest = await request.json();\n\t\tmark('body');\n\n\t\tconst { inputs, values } = body;\n\t\tconst definitionUrl = body.definitionUrl;\n\t\tconst channel: 'live' | 'draft' = body.channel ?? 'live';\n\t\tconst explicitVersionId = body.versionId ?? null;\n\n\t\tif (!values || !definitionUrl) {\n\t\t\tapiError(\n\t\t\t\t400,\n\t\t\t\tApiErrorCode.VALIDATION_FAILED,\n\t\t\t\t'Missing required fields: values or definitionUrl'\n\t\t\t);\n\t\t}\n\t\tconst mode = SolveModeSchema.default('full').safeParse(body.mode);\n\t\tif (!mode.success) {\n\t\t\tapiError(\n\t\t\t\t400,\n\t\t\t\tApiErrorCode.VALIDATION_FAILED,\n\t\t\t\t`Invalid mode: ${String(body.mode)}. Must be 'preview' or 'full'.`\n\t\t\t);\n\t\t}\n\t\tif (channel !== 'live' && channel !== 'draft') {\n\t\t\tapiError(\n\t\t\t\t400,\n\t\t\t\tApiErrorCode.VALIDATION_FAILED,\n\t\t\t\t`Invalid channel: ${channel}. Must be 'live' or 'draft'.`\n\t\t\t);\n\t\t}\n\n\t\t// Share-link tokens (spec §7); null for remote definitions or no token.\n\t\tconst isLocal = definitionUrl.startsWith('local:');\n\t\tconst guid = isLocal ? definitionUrl.substring(6) : null;\n\t\t// Explicit-version solves are editor-only, so don't resolve a share token\n\t\t// for them — force the logged-in editor gate instead.\n\t\tconst sharedAccess =\n\t\t\tisLocal && guid && !explicitVersionId\n\t\t\t\t? await tryResolveShareToken(request, url, guid, channel, { requireSolve: true })\n\t\t\t\t: null;\n\t\tmark('shareToken');\n\n\t\tif (!sharedAccess && (!locals.ctx || !locals.user)) {\n\t\t\tapiError(401, ApiErrorCode.UNAUTHORIZED, 'Unauthorized');\n\t\t}\n\n\t\t// Rate-limit bucket per caller: `share:{linkId}` for token solves so an\n\t\t// anonymous crowd on one public link can't drain the owner's budget.\n\t\tconst access: SolveAccess = sharedAccess\n\t\t\t? {\n\t\t\t\t\tkind: 'share',\n\t\t\t\t\tctx: sharedAccess.ctx,\n\t\t\t\t\tlink: sharedAccess.link,\n\t\t\t\t\trateLimitKey: `share:${sharedAccess.link.id}`\n\t\t\t\t}\n\t\t\t: { kind: 'user', ctx: locals.ctx!, rateLimitKey: `user:${locals.user!.id}` };\n\n\t\treturn await runSolve({\n\t\t\taccess,\n\t\t\tdefinitionUrl,\n\t\t\tinputs,\n\t\t\tvalues,\n\t\t\tchannel,\n\t\t\tversionId: explicitVersionId,\n\t\t\trequest,\n\t\t\tlocals,\n\t\t\tloadStart,\n\t\t\tprepMarks,\n\t\t\tstreamId: typeof body.streamId === 'string' ? body.streamId : null,\n\t\t\tsolveMode: mode.data\n\t\t});\n\t} catch (err) {\n\t\tmapSolveError(err, locals);\n\t}\n}\n"],"mappings":";;;;;;;;;AAoCA,IAAa,QAAwB,UAAU;CAC9C,IAAI,CAAC,eAAe,MAAM,OAAO,GAAG,OAAO,MAAM,KAAK;CACtD,OAAO,qBAAqB,MAAM,KAAK,CAAC,CAAC,OAAO,QAAQ,cAAc,KAAK,MAAM,OAAO,GAAG,CAAC,CAAC;AAC9F;AAEA,eAAe,MAAM,EAAE,SAAS,QAAQ,OAAwC;CAE/E,mBAAmB,SAAS,kBAAkB,CAAC;CAM/C,MAAM,YAAY,YAAY,IAAI;CAClC,MAAM,YAAgC,CAAC;CACvC,IAAI,WAAW,YAAY,IAAI;CAC/B,MAAM,QAAQ,UAAkB;EAC/B,UAAU,KAAK,CAAC,OAAO,YAAY,IAAI,IAAI,QAAQ,CAAC;EACpD,WAAW,YAAY,IAAI;CAC5B;CAEA,IAAI;EACH,MAAM,OAAuB,MAAM,QAAQ,KAAK;EAChD,KAAK,MAAM;EAEX,MAAM,EAAE,QAAQ,WAAW;EAC3B,MAAM,gBAAgB,KAAK;EAC3B,MAAM,UAA4B,KAAK,WAAW;EAClD,MAAM,oBAAoB,KAAK,aAAa;EAE5C,IAAI,CAAC,UAAU,CAAC,eACf,SACC,KACA,aAAa,mBACb,kDACD;EAED,MAAM,OAAO,gBAAgB,QAAQ,MAAM,CAAC,CAAC,UAAU,KAAK,IAAI;EAChE,IAAI,CAAC,KAAK,SACT,SACC,KACA,aAAa,mBACb,iBAAiB,OAAO,KAAK,IAAI,EAAE,+BACpC;EAED,IAAI,YAAY,UAAU,YAAY,SACrC,SACC,KACA,aAAa,mBACb,oBAAoB,QAAQ,6BAC7B;EAID,MAAM,UAAU,cAAc,WAAW,QAAQ;EACjD,MAAM,OAAO,UAAU,cAAc,UAAU,CAAC,IAAI;EAGpD,MAAM,eACL,WAAW,QAAQ,CAAC,oBACjB,MAAM,qBAAqB,SAAS,KAAK,MAAM,SAAS,EAAE,cAAc,KAAK,CAAC,IAC9E;EACJ,KAAK,YAAY;EAEjB,IAAI,CAAC,iBAAiB,CAAC,OAAO,OAAO,CAAC,OAAO,OAC5C,SAAS,KAAK,aAAa,cAAc,cAAc;EAKxD,MAAM,SAAsB,eACzB;GACA,MAAM;GACN,KAAK,aAAa;GAClB,MAAM,aAAa;GACnB,cAAc,SAAS,aAAa,KAAK;EAC1C,IACC;GAAE,MAAM;GAAQ,KAAK,OAAO;GAAM,cAAc,QAAQ,OAAO,KAAM;EAAK;EAE7E,OAAO,MAAM,SAAS;GACrB;GACA;GACA;GACA;GACA;GACA,WAAW;GACX;GACA;GACA;GACA;GACA,UAAU,OAAO,KAAK,aAAa,WAAW,KAAK,WAAW;GAC9D,WAAW,KAAK;EACjB,CAAC;CACF,SAAS,KAAK;EACb,cAAc,KAAK,MAAM;CAC1B;AACD"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { E as scoped, k as ApiErrorCode, l as requireCanCreateDefinition } from "../../../../../../chunks/access.js";
|
|
2
2
|
import { N as assertScope } from "../../../../../../chunks/api.js";
|
|
3
|
-
import {
|
|
3
|
+
import { n as assertCamelCaseSchema, o as postSchemaFormData, t as SchemaExtractionError, u as ComputeServerUnconfiguredError } from "../../../../../../chunks/schema-extraction.js";
|
|
4
4
|
import "../../../../../../chunks/compute.js";
|
|
5
5
|
import "../../../../../../chunks/definitions.js";
|
|
6
6
|
import { r as withApiRateLimit } from "../../../../../../chunks/sveltekit.js";
|
|
7
7
|
import { t as apiError } from "../../../../../../chunks/api-errors.js";
|
|
8
8
|
import { t as asHttpError } from "../../../../../../chunks/access2.server.js";
|
|
9
|
-
import {
|
|
9
|
+
import { g as MAX_DEFINITION_FILE_SIZE } from "../../../../../../chunks/engine.server.js";
|
|
10
10
|
import { t as serverResolver } from "../../../../../../chunks/serverResolver.server.js";
|
|
11
11
|
import { l as requireMaxBodySize } from "../../../../../../chunks/admin-auth.server.js";
|
|
12
12
|
// src/routes/api/v1/compute/schema/+server.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { F as acceptsGzip } from "../../../../../../../chunks/providers.server.js";
|
|
2
2
|
import { k as ApiErrorCode } from "../../../../../../../chunks/access.js";
|
|
3
3
|
import { C as idempotencyCallerId, E as runIdempotent, S as createApiIdempotencyStore, T as requestFingerprint, U as requireParams, h as SolveBodySchema, w as readIdempotencyKey, z as parseBody } from "../../../../../../../chunks/api.js";
|
|
4
4
|
import { r as withApiRateLimit } from "../../../../../../../chunks/sveltekit.js";
|
|
5
|
-
import {
|
|
5
|
+
import { r as handleApiError, t as apiError } from "../../../../../../../chunks/api-errors.js";
|
|
6
6
|
import { i as requireCaller } from "../../../../../../../chunks/http2.js";
|
|
7
|
-
import {
|
|
7
|
+
import { p as COMPUTE_REQUEST_MAX_BYTES } from "../../../../../../../chunks/engine.server.js";
|
|
8
8
|
import { l as requireMaxBodySize } from "../../../../../../../chunks/admin-auth.server.js";
|
|
9
9
|
import { n as runSolve, t as mapSolveError } from "../../../../../../../chunks/solve.server.js";
|
|
10
10
|
var solveIdempotencyStore = createApiIdempotencyStore(3e5);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { f as getLogger } from "../../../chunks/providers.server.js";
|
|
2
|
-
import { r as REGISTERED_CLIENT_SCOPES, u as resourceMetadataUrl } from "../../../chunks/oauth.js";
|
|
3
2
|
import { n as env } from "../../../chunks/previous-key.js";
|
|
4
3
|
import { V as apiScopeActionCovers } from "../../../chunks/access.js";
|
|
5
4
|
import { n as ApiScopeActionSchema, o as parseApiScope } from "../../../chunks/types.js";
|
|
6
5
|
import { r as GuidSchema } from "../../../chunks/schemas.js";
|
|
7
|
-
import {
|
|
6
|
+
import { s as resourceMetadataUrl } from "../../../chunks/oauth.js";
|
|
7
|
+
import { i as oauthServer } from "../../../chunks/server2.js";
|
|
8
8
|
import { t as publicUrl } from "../../../chunks/origin.js";
|
|
9
|
-
import {
|
|
9
|
+
import { o as getInputItems } from "../../../chunks/keepalive-vtcjhAV3.js";
|
|
10
10
|
import { t as buildOpenApiDocument } from "../../../chunks/openapi.js";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import * as z$1 from "zod/v4";
|
|
@@ -20449,6 +20449,9 @@ function sleep(ms, signal) {
|
|
|
20449
20449
|
function errorText(err) {
|
|
20450
20450
|
return err instanceof Error ? err.message : String(err);
|
|
20451
20451
|
}
|
|
20452
|
+
// ../mcp/src/app.ts
|
|
20453
|
+
/** The MIME type a client renders as an MCP App view rather than reading as text. */
|
|
20454
|
+
var MCP_APP_MIME_TYPE = "text/html;profile=mcp-app";
|
|
20452
20455
|
// ../mcp/src/spec.ts
|
|
20453
20456
|
var METHODS = /* @__PURE__ */ new Set([
|
|
20454
20457
|
"get",
|
|
@@ -20659,6 +20662,7 @@ function createMcpServer(options) {
|
|
|
20659
20662
|
const spec = indexOperations(options.openapi);
|
|
20660
20663
|
const tools = resolveTools(options.tools, spec);
|
|
20661
20664
|
for (const r of options.resources ?? []) checkCalls(`resource ${r.uri}`, r.calls, spec);
|
|
20665
|
+
checkViews(tools, options.resources ?? []);
|
|
20662
20666
|
/** `visible` limits which tools this request sees; undefined means all of them. */
|
|
20663
20667
|
function build(apiKey, fetch = options.fetch, visible) {
|
|
20664
20668
|
const clientOptions = {
|
|
@@ -20668,6 +20672,12 @@ function createMcpServer(options) {
|
|
|
20668
20672
|
};
|
|
20669
20673
|
const keys = [apiKey, ...options.apiKey ? [options.apiKey] : []];
|
|
20670
20674
|
const redact = (text) => keys.reduce((out, key) => out.split(key).join("[redacted]"), text);
|
|
20675
|
+
const redactValue = (value) => {
|
|
20676
|
+
if (typeof value === "string") return keys.some((k) => value.includes(k)) ? redact(value) : value;
|
|
20677
|
+
if (Array.isArray(value)) return value.map(redactValue);
|
|
20678
|
+
if (value && typeof value === "object") return Object.fromEntries(Object.entries(value).map(([k, v]) => [redact(k), redactValue(v)]));
|
|
20679
|
+
return value;
|
|
20680
|
+
};
|
|
20671
20681
|
function toResult(out) {
|
|
20672
20682
|
return {
|
|
20673
20683
|
content: [{
|
|
@@ -20678,7 +20688,8 @@ function createMcpServer(options) {
|
|
|
20678
20688
|
data,
|
|
20679
20689
|
mimeType
|
|
20680
20690
|
}))],
|
|
20681
|
-
...out.structured && { structuredContent: JSON.parse(redact(JSON.stringify(out.structured))) }
|
|
20691
|
+
...out.structured && { structuredContent: JSON.parse(redact(JSON.stringify(out.structured))) },
|
|
20692
|
+
...out.meta && { _meta: redactValue(out.meta) }
|
|
20682
20693
|
};
|
|
20683
20694
|
}
|
|
20684
20695
|
function errorResult(text) {
|
|
@@ -20712,7 +20723,11 @@ function createMcpServer(options) {
|
|
|
20712
20723
|
annotations: {
|
|
20713
20724
|
title: def.title,
|
|
20714
20725
|
...annotations
|
|
20715
|
-
}
|
|
20726
|
+
},
|
|
20727
|
+
...def.ui && { _meta: {
|
|
20728
|
+
ui: def.ui,
|
|
20729
|
+
"ui/resourceUri": def.ui.resourceUri
|
|
20730
|
+
} }
|
|
20716
20731
|
})) }));
|
|
20717
20732
|
server.setRequestHandler("tools/call", async (req, ctx) => {
|
|
20718
20733
|
const resolved = tools.get(req.params.name);
|
|
@@ -20760,27 +20775,30 @@ function createMcpServer(options) {
|
|
|
20760
20775
|
...ended,
|
|
20761
20776
|
calls,
|
|
20762
20777
|
argumentBytes: sizes(req.params.arguments),
|
|
20763
|
-
responseBytes: result ? jsonLength(result.content) + jsonLength(result.structuredContent) : 0
|
|
20778
|
+
responseBytes: result ? jsonLength(result.content) + jsonLength(result.structuredContent) + jsonLength(result._meta) : 0
|
|
20764
20779
|
});
|
|
20765
20780
|
}
|
|
20766
20781
|
});
|
|
20767
20782
|
if (options.resources?.length) {
|
|
20768
20783
|
const resources = options.resources;
|
|
20769
|
-
server.setRequestHandler("resources/list", () => ({ resources: resources.map(({ uri, name, description, mimeType }) => ({
|
|
20784
|
+
server.setRequestHandler("resources/list", () => ({ resources: resources.map(({ uri, name, description, mimeType, meta }) => ({
|
|
20770
20785
|
uri,
|
|
20771
20786
|
name,
|
|
20772
20787
|
description,
|
|
20773
|
-
mimeType
|
|
20788
|
+
mimeType,
|
|
20789
|
+
...meta && { _meta: meta }
|
|
20774
20790
|
})) }));
|
|
20775
20791
|
server.setRequestHandler("resources/read", async (req) => {
|
|
20776
20792
|
const resource = resources.find((r) => r.uri === req.params.uri);
|
|
20777
20793
|
if (!resource) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Unknown resource ${req.params.uri}`);
|
|
20778
20794
|
const api = createApiClient(spec, clientOptions, new Set(resource.calls));
|
|
20779
20795
|
const text = redact(await resource.read(api));
|
|
20796
|
+
const { uri, mimeType, meta } = resource;
|
|
20780
20797
|
return { contents: [{
|
|
20781
|
-
uri
|
|
20782
|
-
mimeType
|
|
20783
|
-
text
|
|
20798
|
+
uri,
|
|
20799
|
+
mimeType,
|
|
20800
|
+
text,
|
|
20801
|
+
...meta && { _meta: meta }
|
|
20784
20802
|
}] };
|
|
20785
20803
|
});
|
|
20786
20804
|
}
|
|
@@ -20980,6 +20998,16 @@ function resolveTools(defs, spec) {
|
|
|
20980
20998
|
}
|
|
20981
20999
|
return tools;
|
|
20982
21000
|
}
|
|
21001
|
+
function checkViews(tools, resources) {
|
|
21002
|
+
const views = new Set(resources.filter((r) => r.mimeType === MCP_APP_MIME_TYPE).map((r) => r.uri));
|
|
21003
|
+
for (const { def } of tools.values()) if (def.ui && !views.has(def.ui.resourceUri)) throw new Error(`Tool ${def.name} shows ${def.ui.resourceUri}, which no appResource serves`);
|
|
21004
|
+
const all = [...tools.values()];
|
|
21005
|
+
const appOnly = (t) => t.def.ui?.visibility?.includes("model") === false;
|
|
21006
|
+
for (const parent of all.filter((t) => t.def.ui && !appOnly(t))) for (const child of all.filter((t) => appOnly(t) && t.def.ui.resourceUri === parent.def.ui.resourceUri)) {
|
|
21007
|
+
const missing = child.actions.filter((a) => !parent.actions.includes(a));
|
|
21008
|
+
if (missing.length) throw new Error(`App tool ${child.def.name} needs \`${missing.join("`, `")}\`, which ${parent.def.name} does not; a key that can call ${parent.def.name} could not load its view`);
|
|
21009
|
+
}
|
|
21010
|
+
}
|
|
20983
21011
|
function checkCalls(owner, calls, spec) {
|
|
20984
21012
|
for (const id of calls) {
|
|
20985
21013
|
const op = spec.get(id);
|
|
@@ -21023,6 +21051,7 @@ function describe(err, hint) {
|
|
|
21023
21051
|
].join("\n");
|
|
21024
21052
|
return err instanceof Error ? err.message : String(err);
|
|
21025
21053
|
}
|
|
21054
|
+
new URL("../dist/views/solve.html", import.meta.url);
|
|
21026
21055
|
// src/lib/server/mcp/tools.ts
|
|
21027
21056
|
/**
|
|
21028
21057
|
* Selva's MCP tools: find a definition, read its inputs, solve it, read back numbers,
|
|
@@ -21379,9 +21408,10 @@ function trustedOrigins() {
|
|
|
21379
21408
|
return /* @__PURE__ */ new Set([...env.ORIGIN ? [new URL(env.ORIGIN).origin] : [], ...mcpAllowedOrigins()]);
|
|
21380
21409
|
}
|
|
21381
21410
|
function challengeFor(origin) {
|
|
21382
|
-
|
|
21411
|
+
const oauth = oauthServer(origin);
|
|
21412
|
+
return oauth ? {
|
|
21383
21413
|
resourceMetadataUrl: resourceMetadataUrl(origin),
|
|
21384
|
-
scopes: [...
|
|
21414
|
+
scopes: [...oauth.registeredScopes]
|
|
21385
21415
|
} : void 0;
|
|
21386
21416
|
}
|
|
21387
21417
|
var MAX_CACHED_ORIGINS = 4;
|