@kya-os/mcp-i 0.1.0-alpha.3.9 → 1.2.0

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.
Files changed (328) hide show
  1. package/README.md +350 -213
  2. package/dist/149.js +1 -0
  3. package/dist/189.js +1 -0
  4. package/dist/261.js +1 -0
  5. package/dist/28.js +1 -0
  6. package/dist/295.js +1 -0
  7. package/dist/460.js +1 -0
  8. package/dist/570.js +1 -0
  9. package/dist/634.js +1 -0
  10. package/dist/647.js +1 -0
  11. package/dist/67.js +1 -0
  12. package/dist/739.js +1 -0
  13. package/dist/742.js +1 -0
  14. package/dist/904.js +1 -0
  15. package/dist/938.js +1 -0
  16. package/dist/auth/api-key.d.ts +16 -0
  17. package/dist/auth/api-key.js +82 -0
  18. package/dist/auth/jwt.d.ts +43 -0
  19. package/dist/auth/jwt.js +51 -0
  20. package/dist/auth/oauth/factory.d.ts +12 -0
  21. package/dist/auth/oauth/factory.js +36 -0
  22. package/dist/auth/oauth/index.d.ts +5 -0
  23. package/dist/auth/oauth/index.js +27 -0
  24. package/dist/auth/oauth/providers/proxy-provider.d.ts +13 -0
  25. package/dist/auth/oauth/providers/proxy-provider.js +159 -0
  26. package/dist/auth/oauth/router.d.ts +4 -0
  27. package/dist/auth/oauth/router.js +294 -0
  28. package/dist/auth/oauth/storage/memory-storage.d.ts +12 -0
  29. package/dist/auth/oauth/storage/memory-storage.js +40 -0
  30. package/dist/auth/oauth/types.d.ts +112 -0
  31. package/dist/cache/__tests__/cloudflare-kv-nonce-cache.test.d.ts +4 -0
  32. package/dist/cache/__tests__/cloudflare-kv-nonce-cache.test.js +176 -0
  33. package/dist/cache/__tests__/concurrency.test.d.ts +5 -0
  34. package/dist/cache/__tests__/concurrency.test.js +300 -0
  35. package/dist/cache/__tests__/dynamodb-nonce-cache.test.d.ts +4 -0
  36. package/dist/cache/__tests__/dynamodb-nonce-cache.test.js +176 -0
  37. package/dist/cache/__tests__/memory-nonce-cache.test.d.ts +4 -0
  38. package/dist/cache/__tests__/memory-nonce-cache.test.js +132 -0
  39. package/dist/cache/__tests__/nonce-cache-factory-simple.test.d.ts +4 -0
  40. package/dist/cache/__tests__/nonce-cache-factory-simple.test.js +133 -0
  41. package/dist/cache/__tests__/nonce-cache-factory.test.d.ts +4 -0
  42. package/dist/cache/__tests__/nonce-cache-factory.test.js +252 -0
  43. package/dist/cache/__tests__/redis-nonce-cache.test.d.ts +4 -0
  44. package/dist/cache/__tests__/redis-nonce-cache.test.js +95 -0
  45. package/dist/cache/cloudflare-kv-nonce-cache.d.ts +14 -0
  46. package/dist/cache/cloudflare-kv-nonce-cache.js +93 -0
  47. package/dist/cache/dynamodb-nonce-cache.d.ts +15 -0
  48. package/dist/cache/dynamodb-nonce-cache.js +92 -0
  49. package/dist/cache/index.d.ts +16 -0
  50. package/dist/cache/index.js +32 -0
  51. package/dist/cache/memory-nonce-cache.d.ts +44 -0
  52. package/dist/cache/memory-nonce-cache.js +105 -0
  53. package/dist/cache/nonce-cache-factory.d.ts +20 -0
  54. package/dist/cache/nonce-cache-factory.js +208 -0
  55. package/dist/cache/redis-nonce-cache.d.ts +14 -0
  56. package/dist/cache/redis-nonce-cache.js +53 -0
  57. package/dist/compiler/compiler-context.d.ts +23 -0
  58. package/dist/compiler/compiler-context.js +24 -0
  59. package/dist/compiler/config/constants.d.ts +41 -0
  60. package/dist/compiler/config/constants.js +45 -0
  61. package/dist/compiler/config/index.d.ts +252 -0
  62. package/dist/compiler/config/index.js +15 -0
  63. package/dist/compiler/config/injection.d.ts +26 -0
  64. package/dist/compiler/config/injection.js +58 -0
  65. package/dist/compiler/config/schemas/experimental/index.d.ts +91 -0
  66. package/dist/compiler/config/schemas/experimental/index.js +16 -0
  67. package/dist/compiler/config/schemas/experimental/oauth.d.ts +74 -0
  68. package/dist/compiler/config/schemas/experimental/oauth.js +25 -0
  69. package/dist/compiler/config/schemas/index.d.ts +6 -0
  70. package/dist/compiler/config/schemas/index.js +17 -0
  71. package/dist/compiler/config/schemas/paths.d.ts +9 -0
  72. package/dist/compiler/config/schemas/paths.js +12 -0
  73. package/dist/compiler/config/schemas/transport/http.d.ts +82 -0
  74. package/dist/compiler/config/schemas/transport/http.js +33 -0
  75. package/dist/compiler/config/schemas/transport/stdio.d.ts +9 -0
  76. package/dist/compiler/config/schemas/transport/stdio.js +15 -0
  77. package/dist/compiler/config/schemas/webpack.d.ts +3 -0
  78. package/dist/compiler/config/schemas/webpack.js +15 -0
  79. package/dist/compiler/config/types.d.ts +1 -0
  80. package/dist/compiler/config/types.js +2 -0
  81. package/dist/compiler/config/utils.d.ts +20 -0
  82. package/dist/compiler/config/utils.js +36 -0
  83. package/dist/compiler/generate-env-code.d.ts +1 -0
  84. package/dist/compiler/generate-env-code.js +8 -0
  85. package/dist/compiler/generate-import-code.d.ts +1 -0
  86. package/dist/compiler/generate-import-code.js +24 -0
  87. package/dist/compiler/get-webpack-config/get-entries.d.ts +3 -0
  88. package/dist/compiler/get-webpack-config/get-entries.js +29 -0
  89. package/dist/compiler/get-webpack-config/get-externals.d.ts +7 -0
  90. package/dist/compiler/get-webpack-config/get-externals.js +88 -0
  91. package/dist/compiler/get-webpack-config/get-injected-variables.d.ts +8 -0
  92. package/dist/compiler/get-webpack-config/get-injected-variables.js +25 -0
  93. package/dist/compiler/get-webpack-config/index.d.ts +4 -0
  94. package/dist/compiler/get-webpack-config/index.js +101 -0
  95. package/dist/compiler/get-webpack-config/plugins.d.ts +8 -0
  96. package/dist/compiler/get-webpack-config/plugins.js +132 -0
  97. package/dist/compiler/get-webpack-config/resolve-tsconfig-paths.d.ts +9 -0
  98. package/dist/compiler/get-webpack-config/resolve-tsconfig-paths.js +40 -0
  99. package/dist/compiler/index.d.ts +6 -0
  100. package/dist/compiler/index.js +194 -0
  101. package/dist/compiler/on-first-build.d.ts +3 -0
  102. package/dist/compiler/on-first-build.js +58 -0
  103. package/dist/compiler/parse-xmcp-config.d.ts +9 -0
  104. package/dist/compiler/parse-xmcp-config.js +155 -0
  105. package/dist/compiler/start-http-server.d.ts +1 -0
  106. package/dist/compiler/start-http-server.js +34 -0
  107. package/dist/index.d.ts +12 -0
  108. package/dist/index.js +38 -0
  109. package/dist/index.js.LICENSE.txt +49 -0
  110. package/dist/runtime/__tests__/audit.test.d.ts +4 -0
  111. package/dist/runtime/__tests__/audit.test.js +328 -0
  112. package/dist/runtime/__tests__/identity.test.d.ts +4 -0
  113. package/dist/runtime/__tests__/identity.test.js +164 -0
  114. package/dist/runtime/__tests__/mcpi-runtime.test.d.ts +4 -0
  115. package/dist/runtime/__tests__/mcpi-runtime.test.js +372 -0
  116. package/dist/runtime/__tests__/proof.test.d.ts +4 -0
  117. package/dist/runtime/__tests__/proof.test.js +302 -0
  118. package/dist/runtime/__tests__/session.test.d.ts +4 -0
  119. package/dist/runtime/__tests__/session.test.js +254 -0
  120. package/dist/runtime/__tests__/well-known.test.d.ts +4 -0
  121. package/dist/runtime/__tests__/well-known.test.js +312 -0
  122. package/dist/runtime/adapter-express.js +2 -0
  123. package/dist/runtime/adapter-express.js.LICENSE.txt +252 -0
  124. package/dist/runtime/adapter-nextjs.js +2 -0
  125. package/dist/runtime/adapter-nextjs.js.LICENSE.txt +53 -0
  126. package/dist/runtime/adapters/express/index.d.ts +2 -0
  127. package/dist/runtime/adapters/express/index.js +48 -0
  128. package/dist/runtime/adapters/nextjs/index.d.ts +8 -0
  129. package/dist/runtime/adapters/nextjs/index.js +18 -0
  130. package/dist/runtime/audit.d.ts +93 -0
  131. package/dist/runtime/audit.js +212 -0
  132. package/dist/runtime/debug.d.ts +118 -0
  133. package/dist/runtime/debug.js +612 -0
  134. package/dist/runtime/delegation-hooks.d.ts +85 -0
  135. package/dist/runtime/delegation-hooks.js +116 -0
  136. package/dist/runtime/demo.d.ts +71 -0
  137. package/dist/runtime/demo.js +135 -0
  138. package/dist/runtime/headers.d.ts +1 -0
  139. package/dist/runtime/headers.js +9 -0
  140. package/dist/runtime/http.js +2 -0
  141. package/dist/runtime/http.js.LICENSE.txt +252 -0
  142. package/dist/runtime/identity.d.ts +105 -0
  143. package/dist/runtime/identity.js +232 -0
  144. package/dist/runtime/index.d.ts +16 -0
  145. package/dist/runtime/index.js +56 -0
  146. package/dist/runtime/mcpi-runtime.d.ts +164 -0
  147. package/dist/runtime/mcpi-runtime.js +352 -0
  148. package/dist/runtime/proof.d.ts +87 -0
  149. package/dist/runtime/proof.js +223 -0
  150. package/dist/runtime/session.d.ts +88 -0
  151. package/dist/runtime/session.js +216 -0
  152. package/dist/runtime/stdio.js +2 -0
  153. package/dist/runtime/stdio.js.LICENSE.txt +1 -0
  154. package/dist/runtime/templates/home.d.ts +2 -0
  155. package/dist/runtime/templates/home.js +50 -0
  156. package/dist/runtime/transports/http/base-streamable-http.d.ts +25 -0
  157. package/dist/runtime/transports/http/base-streamable-http.js +16 -0
  158. package/dist/runtime/transports/http/http-context.d.ts +9 -0
  159. package/dist/runtime/transports/http/http-context.js +8 -0
  160. package/dist/runtime/transports/http/index.js +55 -0
  161. package/dist/runtime/transports/http/setup-cors.d.ts +4 -0
  162. package/dist/runtime/transports/http/setup-cors.js +24 -0
  163. package/dist/runtime/transports/http/stateless-streamable-http.d.ts +39 -0
  164. package/dist/runtime/transports/http/stateless-streamable-http.js +331 -0
  165. package/dist/runtime/transports/stdio/index.d.ts +1 -0
  166. package/dist/runtime/transports/stdio/index.js +51 -0
  167. package/dist/runtime/utils/server.d.ts +42 -0
  168. package/dist/runtime/utils/server.js +39 -0
  169. package/dist/runtime/utils/tools.d.ts +8 -0
  170. package/dist/runtime/utils/tools.js +115 -0
  171. package/dist/runtime/verifier-middleware.d.ts +76 -0
  172. package/dist/runtime/verifier-middleware.js +322 -0
  173. package/dist/runtime/well-known.d.ts +151 -0
  174. package/dist/runtime/well-known.js +258 -0
  175. package/dist/storage/config.d.ts +28 -0
  176. package/dist/storage/config.js +79 -0
  177. package/dist/storage/delegation.d.ts +59 -0
  178. package/dist/storage/delegation.js +130 -0
  179. package/dist/storage/merkle-verifier.d.ts +84 -0
  180. package/dist/storage/merkle-verifier.js +261 -0
  181. package/dist/test/__tests__/nonce-cache-integration.test.d.ts +1 -0
  182. package/dist/test/__tests__/nonce-cache-integration.test.js +116 -0
  183. package/dist/test/__tests__/nonce-cache.test.d.ts +1 -0
  184. package/dist/test/__tests__/nonce-cache.test.js +122 -0
  185. package/dist/test/__tests__/runtime-integration.test.d.ts +4 -0
  186. package/dist/test/__tests__/runtime-integration.test.js +192 -0
  187. package/dist/test/__tests__/test-infrastructure.test.d.ts +4 -0
  188. package/dist/test/__tests__/test-infrastructure.test.js +178 -0
  189. package/dist/test/deterministic-keys.d.ts +31 -0
  190. package/dist/test/deterministic-keys.js +108 -0
  191. package/dist/test/examples/test-usage-example.d.ts +140 -0
  192. package/dist/test/examples/test-usage-example.js +175 -0
  193. package/dist/test/index.d.ts +11 -0
  194. package/dist/test/index.js +27 -0
  195. package/dist/test/local-verification.d.ts +28 -0
  196. package/dist/test/local-verification.js +342 -0
  197. package/dist/test/mock-identity-provider.d.ts +96 -0
  198. package/dist/test/mock-identity-provider.js +243 -0
  199. package/dist/test/runtime-integration.d.ts +63 -0
  200. package/dist/test/runtime-integration.js +140 -0
  201. package/dist/test/test-environment.d.ts +26 -0
  202. package/dist/test/test-environment.js +50 -0
  203. package/dist/types/declarations.d.ts +1 -0
  204. package/dist/types/declarations.js +6 -0
  205. package/dist/types/middleware.d.ts +2 -0
  206. package/dist/types/middleware.js +2 -0
  207. package/dist/types/tool.d.ts +80 -0
  208. package/dist/types/tool.js +2 -0
  209. package/dist/utils/cli-icons.d.ts +3 -0
  210. package/dist/utils/cli-icons.js +7 -0
  211. package/dist/utils/constants.d.ts +6 -0
  212. package/dist/utils/constants.js +13 -0
  213. package/dist/utils/context.d.ts +33 -0
  214. package/dist/utils/context.js +58 -0
  215. package/dist/utils/file-watcher.d.ts +19 -0
  216. package/dist/utils/file-watcher.js +49 -0
  217. package/dist/utils/fs-utils.d.ts +2 -0
  218. package/dist/utils/fs-utils.js +22 -0
  219. package/dist/utils/path-validation.d.ts +3 -0
  220. package/dist/utils/path-validation.js +56 -0
  221. package/dist/utils/spawn-process.d.ts +9 -0
  222. package/dist/utils/spawn-process.js +50 -0
  223. package/dist/utils/subscribable.d.ts +12 -0
  224. package/dist/utils/subscribable.js +44 -0
  225. package/package.json +91 -77
  226. package/dist/cjs/auto.js +0 -16
  227. package/dist/cjs/cli-mode.d.ts +0 -16
  228. package/dist/cjs/cli-mode.js +0 -32
  229. package/dist/cjs/crypto.d.ts +0 -16
  230. package/dist/cjs/crypto.js +0 -212
  231. package/dist/cjs/dev-helper.d.ts +0 -3
  232. package/dist/cjs/dev-helper.js +0 -46
  233. package/dist/cjs/encrypted-storage.d.ts +0 -11
  234. package/dist/cjs/encrypted-storage.js +0 -73
  235. package/dist/cjs/index.d.ts +0 -56
  236. package/dist/cjs/index.js +0 -727
  237. package/dist/cjs/logger.d.ts +0 -32
  238. package/dist/cjs/logger.js +0 -85
  239. package/dist/cjs/nextjs.d.ts +0 -10
  240. package/dist/cjs/nextjs.js +0 -83
  241. package/dist/cjs/platform-info.d.ts +0 -36
  242. package/dist/cjs/platform-info.js +0 -274
  243. package/dist/cjs/polling.d.ts +0 -13
  244. package/dist/cjs/polling.js +0 -52
  245. package/dist/cjs/registry/index.d.ts +0 -12
  246. package/dist/cjs/registry/index.js +0 -56
  247. package/dist/cjs/registry/knowthat.d.ts +0 -17
  248. package/dist/cjs/registry/knowthat.js +0 -173
  249. package/dist/cjs/rotation.d.ts +0 -35
  250. package/dist/cjs/rotation.js +0 -102
  251. package/dist/cjs/storage.d.ts +0 -41
  252. package/dist/cjs/storage.js +0 -163
  253. package/dist/cjs/transport.d.ts +0 -35
  254. package/dist/cjs/transport.js +0 -300
  255. package/dist/cjs/types.d.ts +0 -206
  256. package/dist/cjs/vercel-adapter.d.ts +0 -8
  257. package/dist/cjs/vercel-adapter.js +0 -67
  258. package/dist/esm/auto.d.ts +0 -13
  259. package/dist/esm/auto.d.ts.map +0 -1
  260. package/dist/esm/auto.js +0 -30
  261. package/dist/esm/auto.js.map +0 -1
  262. package/dist/esm/cli-mode.d.ts +0 -52
  263. package/dist/esm/cli-mode.d.ts.map +0 -1
  264. package/dist/esm/cli-mode.js +0 -59
  265. package/dist/esm/cli-mode.js.map +0 -1
  266. package/dist/esm/crypto.d.ts +0 -51
  267. package/dist/esm/crypto.d.ts.map +0 -1
  268. package/dist/esm/crypto.js +0 -230
  269. package/dist/esm/crypto.js.map +0 -1
  270. package/dist/esm/dev-helper.d.ts +0 -15
  271. package/dist/esm/dev-helper.d.ts.map +0 -1
  272. package/dist/esm/dev-helper.js +0 -63
  273. package/dist/esm/dev-helper.js.map +0 -1
  274. package/dist/esm/encrypted-storage.d.ts +0 -19
  275. package/dist/esm/encrypted-storage.d.ts.map +0 -1
  276. package/dist/esm/encrypted-storage.js +0 -48
  277. package/dist/esm/encrypted-storage.js.map +0 -1
  278. package/dist/esm/index.d.ts +0 -129
  279. package/dist/esm/index.d.ts.map +0 -1
  280. package/dist/esm/index.js +0 -853
  281. package/dist/esm/index.js.map +0 -1
  282. package/dist/esm/logger.d.ts +0 -46
  283. package/dist/esm/logger.d.ts.map +0 -1
  284. package/dist/esm/logger.js +0 -100
  285. package/dist/esm/logger.js.map +0 -1
  286. package/dist/esm/nextjs.d.ts +0 -22
  287. package/dist/esm/nextjs.d.ts.map +0 -1
  288. package/dist/esm/nextjs.js +0 -83
  289. package/dist/esm/nextjs.js.map +0 -1
  290. package/dist/esm/package.json +0 -1
  291. package/dist/esm/platform-info.d.ts +0 -74
  292. package/dist/esm/platform-info.d.ts.map +0 -1
  293. package/dist/esm/platform-info.js +0 -293
  294. package/dist/esm/platform-info.js.map +0 -1
  295. package/dist/esm/polling.d.ts +0 -29
  296. package/dist/esm/polling.d.ts.map +0 -1
  297. package/dist/esm/polling.js +0 -76
  298. package/dist/esm/polling.js.map +0 -1
  299. package/dist/esm/registry/index.d.ts +0 -43
  300. package/dist/esm/registry/index.d.ts.map +0 -1
  301. package/dist/esm/registry/index.js +0 -89
  302. package/dist/esm/registry/index.js.map +0 -1
  303. package/dist/esm/registry/knowthat.d.ts +0 -44
  304. package/dist/esm/registry/knowthat.d.ts.map +0 -1
  305. package/dist/esm/registry/knowthat.js +0 -220
  306. package/dist/esm/registry/knowthat.js.map +0 -1
  307. package/dist/esm/rotation.d.ts +0 -57
  308. package/dist/esm/rotation.d.ts.map +0 -1
  309. package/dist/esm/rotation.js +0 -133
  310. package/dist/esm/rotation.js.map +0 -1
  311. package/dist/esm/storage.d.ts +0 -65
  312. package/dist/esm/storage.d.ts.map +0 -1
  313. package/dist/esm/storage.js +0 -160
  314. package/dist/esm/storage.js.map +0 -1
  315. package/dist/esm/transport.d.ts +0 -52
  316. package/dist/esm/transport.d.ts.map +0 -1
  317. package/dist/esm/transport.js +0 -340
  318. package/dist/esm/transport.js.map +0 -1
  319. package/dist/esm/types.d.ts +0 -293
  320. package/dist/esm/types.d.ts.map +0 -1
  321. package/dist/esm/types.js +0 -5
  322. package/dist/esm/types.js.map +0 -1
  323. package/dist/esm/vercel-adapter.d.ts +0 -26
  324. package/dist/esm/vercel-adapter.d.ts.map +0 -1
  325. package/dist/esm/vercel-adapter.js +0 -80
  326. package/dist/esm/vercel-adapter.js.map +0 -1
  327. /package/dist/{cjs → auth/oauth}/types.js +0 -0
  328. /package/dist/{cjs/auto.d.ts → runtime/transports/http/index.d.ts} +0 -0
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RedisNonceCache = void 0;
4
+ /**
5
+ * Redis-based nonce cache implementation
6
+ * Suitable for multi-instance deployments
7
+ */
8
+ class RedisNonceCache {
9
+ redis; // Redis client - type depends on redis library used
10
+ keyPrefix;
11
+ constructor(redis, keyPrefix = "mcpi:nonce:") {
12
+ this.redis = redis;
13
+ this.keyPrefix = keyPrefix;
14
+ }
15
+ getKey(nonce) {
16
+ return `${this.keyPrefix}${nonce}`;
17
+ }
18
+ async has(nonce) {
19
+ try {
20
+ const key = this.getKey(nonce);
21
+ const exists = await this.redis.exists(key);
22
+ return exists === 1;
23
+ }
24
+ catch (error) {
25
+ console.error("Redis has() operation failed:", error);
26
+ throw new Error(`Failed to check nonce existence: ${error}`);
27
+ }
28
+ }
29
+ async add(nonce, ttl) {
30
+ try {
31
+ const key = this.getKey(nonce);
32
+ // Use SET with NX (not exists) and EX (expiry) for atomic add-if-absent
33
+ // This is truly atomic in Redis
34
+ const result = await this.redis.set(key, "1", "EX", ttl, "NX");
35
+ if (result !== "OK") {
36
+ throw new Error(`Nonce ${nonce} already exists - potential replay attack`);
37
+ }
38
+ }
39
+ catch (error) {
40
+ // Re-throw our own errors
41
+ if (error.message?.includes("already exists")) {
42
+ throw error;
43
+ }
44
+ console.error("Redis add() operation failed:", error);
45
+ throw new Error(`Failed to add nonce to cache: ${error}`);
46
+ }
47
+ }
48
+ async cleanup() {
49
+ // Redis handles expiry automatically, so this is a no-op
50
+ // This method exists to satisfy the interface
51
+ }
52
+ }
53
+ exports.RedisNonceCache = RedisNonceCache;
@@ -0,0 +1,23 @@
1
+ import { CompilerMode } from ".";
2
+ import { XmcpConfigOuputSchema } from "./config";
3
+ interface CompilerContext {
4
+ /** The mode of the compiler. */
5
+ mode: CompilerMode;
6
+ /** Whether the adapter is enabled. */
7
+ adapter?: boolean;
8
+ /** The platforms to build for. */
9
+ platforms: {
10
+ /** Generates a .vercel folder to deploy on Vercel */
11
+ vercel?: boolean;
12
+ };
13
+ /** The paths to the tools. */
14
+ toolPaths: Set<string>;
15
+ /** Whether the middleware is enabled. */
16
+ hasMiddleware: boolean;
17
+ /** The parsed config. */
18
+ xmcpConfig?: XmcpConfigOuputSchema;
19
+ }
20
+ export declare const compilerContext: import("../utils/context").Context<CompilerContext>;
21
+ export declare const compilerContextProvider: (initialValue: Omit<CompilerContext, "toolPaths" | "hasMiddleware">, callback: () => void) => void;
22
+ export declare const getXmcpConfig: () => XmcpConfigOuputSchema;
23
+ export {};
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getXmcpConfig = exports.compilerContextProvider = exports.compilerContext = void 0;
4
+ const context_1 = require("../utils/context");
5
+ exports.compilerContext = (0, context_1.createContext)({
6
+ name: "xmcp-compiler",
7
+ });
8
+ // Preset some defaults for the compiler context
9
+ const compilerContextProvider = (initialValue, callback) => {
10
+ return exports.compilerContext.provider({
11
+ ...initialValue,
12
+ toolPaths: new Set(),
13
+ hasMiddleware: false,
14
+ }, callback);
15
+ };
16
+ exports.compilerContextProvider = compilerContextProvider;
17
+ const getXmcpConfig = () => {
18
+ const { xmcpConfig } = exports.compilerContext.getContext();
19
+ if (!xmcpConfig) {
20
+ throw new Error("xmcp config not found");
21
+ }
22
+ return xmcpConfig;
23
+ };
24
+ exports.getXmcpConfig = getXmcpConfig;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Default values for CORS config
3
+ */
4
+ export declare const DEFAULT_CORS_CONFIG: {
5
+ origin: string;
6
+ methods: string[];
7
+ allowedHeaders: string[];
8
+ exposedHeaders: string[];
9
+ credentials: boolean;
10
+ maxAge: number;
11
+ };
12
+ /**
13
+ * Default values for the HTTP transport
14
+ */
15
+ export declare const DEFAULT_HTTP_CONFIG: {
16
+ port: number;
17
+ host: string;
18
+ bodySizeLimit: number;
19
+ debug: boolean;
20
+ endpoint: string;
21
+ cors: {
22
+ origin: string;
23
+ methods: string[];
24
+ allowedHeaders: string[];
25
+ exposedHeaders: string[];
26
+ credentials: boolean;
27
+ maxAge: number;
28
+ };
29
+ };
30
+ /**
31
+ * Default values for the STDIO transport
32
+ */
33
+ export declare const DEFAULT_STDIO_CONFIG: {
34
+ debug: boolean;
35
+ };
36
+ /**
37
+ * Default values for the tools directory
38
+ */
39
+ export declare const DEFAULT_PATHS_CONFIG: {
40
+ tools: string;
41
+ };
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ // ------------------------------------------------------------
3
+ // Constants
4
+ // ------------------------------------------------------------
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DEFAULT_PATHS_CONFIG = exports.DEFAULT_STDIO_CONFIG = exports.DEFAULT_HTTP_CONFIG = exports.DEFAULT_CORS_CONFIG = void 0;
7
+ /**
8
+ * Default values for CORS config
9
+ */
10
+ exports.DEFAULT_CORS_CONFIG = {
11
+ origin: "*",
12
+ methods: ["GET", "POST"],
13
+ allowedHeaders: [
14
+ "Content-Type",
15
+ "Authorization",
16
+ "mcp-session-id",
17
+ "mcp-protocol-version",
18
+ ],
19
+ exposedHeaders: ["Content-Type", "Authorization", "mcp-session-id"],
20
+ credentials: false,
21
+ maxAge: 86400,
22
+ };
23
+ /**
24
+ * Default values for the HTTP transport
25
+ */
26
+ exports.DEFAULT_HTTP_CONFIG = {
27
+ port: 3000,
28
+ host: "127.0.0.1",
29
+ bodySizeLimit: 1024 * 1024 * 10, // 10MB
30
+ debug: false,
31
+ endpoint: "/mcp",
32
+ cors: exports.DEFAULT_CORS_CONFIG,
33
+ };
34
+ /**
35
+ * Default values for the STDIO transport
36
+ */
37
+ exports.DEFAULT_STDIO_CONFIG = {
38
+ debug: false,
39
+ };
40
+ /**
41
+ * Default values for the tools directory
42
+ */
43
+ exports.DEFAULT_PATHS_CONFIG = {
44
+ tools: "src/tools",
45
+ };
@@ -0,0 +1,252 @@
1
+ import { z } from "zod";
2
+ import { Configuration } from "webpack";
3
+ /**
4
+ * xmcp Config schema
5
+ */
6
+ export declare const configSchema: z.ZodObject<{
7
+ stdio: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
8
+ debug: z.ZodDefault<z.ZodBoolean>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ debug: boolean;
11
+ }, {
12
+ debug?: boolean | undefined;
13
+ }>]>>>;
14
+ http: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodOptional<z.ZodDefault<z.ZodObject<{
15
+ port: z.ZodOptional<z.ZodNumber>;
16
+ host: z.ZodOptional<z.ZodString>;
17
+ bodySizeLimit: z.ZodOptional<z.ZodNumber>;
18
+ debug: z.ZodOptional<z.ZodBoolean>;
19
+ endpoint: z.ZodOptional<z.ZodString>;
20
+ cors: z.ZodOptional<z.ZodObject<{
21
+ origin: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">, z.ZodBoolean]>>;
22
+ methods: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
23
+ allowedHeaders: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
24
+ exposedHeaders: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
25
+ credentials: z.ZodOptional<z.ZodBoolean>;
26
+ maxAge: z.ZodOptional<z.ZodNumber>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ origin?: string | boolean | string[] | undefined;
29
+ methods?: string | string[] | undefined;
30
+ allowedHeaders?: string | string[] | undefined;
31
+ exposedHeaders?: string | string[] | undefined;
32
+ credentials?: boolean | undefined;
33
+ maxAge?: number | undefined;
34
+ }, {
35
+ origin?: string | boolean | string[] | undefined;
36
+ methods?: string | string[] | undefined;
37
+ allowedHeaders?: string | string[] | undefined;
38
+ exposedHeaders?: string | string[] | undefined;
39
+ credentials?: boolean | undefined;
40
+ maxAge?: number | undefined;
41
+ }>>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ port?: number | undefined;
44
+ host?: string | undefined;
45
+ bodySizeLimit?: number | undefined;
46
+ debug?: boolean | undefined;
47
+ endpoint?: string | undefined;
48
+ cors?: {
49
+ origin?: string | boolean | string[] | undefined;
50
+ methods?: string | string[] | undefined;
51
+ allowedHeaders?: string | string[] | undefined;
52
+ exposedHeaders?: string | string[] | undefined;
53
+ credentials?: boolean | undefined;
54
+ maxAge?: number | undefined;
55
+ } | undefined;
56
+ }, {
57
+ port?: number | undefined;
58
+ host?: string | undefined;
59
+ bodySizeLimit?: number | undefined;
60
+ debug?: boolean | undefined;
61
+ endpoint?: string | undefined;
62
+ cors?: {
63
+ origin?: string | boolean | string[] | undefined;
64
+ methods?: string | string[] | undefined;
65
+ allowedHeaders?: string | string[] | undefined;
66
+ exposedHeaders?: string | string[] | undefined;
67
+ credentials?: boolean | undefined;
68
+ maxAge?: number | undefined;
69
+ } | undefined;
70
+ }>>>]>>;
71
+ experimental: z.ZodOptional<z.ZodObject<{
72
+ oauth: z.ZodOptional<z.ZodObject<{
73
+ endpoints: z.ZodObject<{
74
+ authorizationUrl: z.ZodString;
75
+ tokenUrl: z.ZodString;
76
+ revocationUrl: z.ZodOptional<z.ZodString>;
77
+ userInfoUrl: z.ZodOptional<z.ZodString>;
78
+ registerUrl: z.ZodString;
79
+ }, "strip", z.ZodTypeAny, {
80
+ authorizationUrl: string;
81
+ tokenUrl: string;
82
+ registerUrl: string;
83
+ revocationUrl?: string | undefined;
84
+ userInfoUrl?: string | undefined;
85
+ }, {
86
+ authorizationUrl: string;
87
+ tokenUrl: string;
88
+ registerUrl: string;
89
+ revocationUrl?: string | undefined;
90
+ userInfoUrl?: string | undefined;
91
+ }>;
92
+ issuerUrl: z.ZodString;
93
+ baseUrl: z.ZodString;
94
+ serviceDocumentationUrl: z.ZodOptional<z.ZodString>;
95
+ pathPrefix: z.ZodDefault<z.ZodString>;
96
+ defaultScopes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ endpoints: {
99
+ authorizationUrl: string;
100
+ tokenUrl: string;
101
+ registerUrl: string;
102
+ revocationUrl?: string | undefined;
103
+ userInfoUrl?: string | undefined;
104
+ };
105
+ issuerUrl: string;
106
+ baseUrl: string;
107
+ pathPrefix: string;
108
+ defaultScopes: string[];
109
+ serviceDocumentationUrl?: string | undefined;
110
+ }, {
111
+ endpoints: {
112
+ authorizationUrl: string;
113
+ tokenUrl: string;
114
+ registerUrl: string;
115
+ revocationUrl?: string | undefined;
116
+ userInfoUrl?: string | undefined;
117
+ };
118
+ issuerUrl: string;
119
+ baseUrl: string;
120
+ serviceDocumentationUrl?: string | undefined;
121
+ pathPrefix?: string | undefined;
122
+ defaultScopes?: string[] | undefined;
123
+ }>>;
124
+ adapter: z.ZodOptional<z.ZodEnum<["express", "nextjs"]>>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ oauth?: {
127
+ endpoints: {
128
+ authorizationUrl: string;
129
+ tokenUrl: string;
130
+ registerUrl: string;
131
+ revocationUrl?: string | undefined;
132
+ userInfoUrl?: string | undefined;
133
+ };
134
+ issuerUrl: string;
135
+ baseUrl: string;
136
+ pathPrefix: string;
137
+ defaultScopes: string[];
138
+ serviceDocumentationUrl?: string | undefined;
139
+ } | undefined;
140
+ adapter?: "express" | "nextjs" | undefined;
141
+ }, {
142
+ oauth?: {
143
+ endpoints: {
144
+ authorizationUrl: string;
145
+ tokenUrl: string;
146
+ registerUrl: string;
147
+ revocationUrl?: string | undefined;
148
+ userInfoUrl?: string | undefined;
149
+ };
150
+ issuerUrl: string;
151
+ baseUrl: string;
152
+ serviceDocumentationUrl?: string | undefined;
153
+ pathPrefix?: string | undefined;
154
+ defaultScopes?: string[] | undefined;
155
+ } | undefined;
156
+ adapter?: "express" | "nextjs" | undefined;
157
+ }>>;
158
+ paths: z.ZodOptional<z.ZodObject<{
159
+ tools: z.ZodDefault<z.ZodString>;
160
+ }, "strip", z.ZodTypeAny, {
161
+ tools: string;
162
+ }, {
163
+ tools?: string | undefined;
164
+ }>>;
165
+ webpack: z.ZodOptional<z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodAny>>>;
166
+ }, "strip", z.ZodTypeAny, {
167
+ stdio?: boolean | {
168
+ debug: boolean;
169
+ } | undefined;
170
+ http?: boolean | {
171
+ port?: number | undefined;
172
+ host?: string | undefined;
173
+ bodySizeLimit?: number | undefined;
174
+ debug?: boolean | undefined;
175
+ endpoint?: string | undefined;
176
+ cors?: {
177
+ origin?: string | boolean | string[] | undefined;
178
+ methods?: string | string[] | undefined;
179
+ allowedHeaders?: string | string[] | undefined;
180
+ exposedHeaders?: string | string[] | undefined;
181
+ credentials?: boolean | undefined;
182
+ maxAge?: number | undefined;
183
+ } | undefined;
184
+ } | undefined;
185
+ experimental?: {
186
+ oauth?: {
187
+ endpoints: {
188
+ authorizationUrl: string;
189
+ tokenUrl: string;
190
+ registerUrl: string;
191
+ revocationUrl?: string | undefined;
192
+ userInfoUrl?: string | undefined;
193
+ };
194
+ issuerUrl: string;
195
+ baseUrl: string;
196
+ pathPrefix: string;
197
+ defaultScopes: string[];
198
+ serviceDocumentationUrl?: string | undefined;
199
+ } | undefined;
200
+ adapter?: "express" | "nextjs" | undefined;
201
+ } | undefined;
202
+ paths?: {
203
+ tools: string;
204
+ } | undefined;
205
+ webpack?: ((args_0: any, ...args: unknown[]) => any) | undefined;
206
+ }, {
207
+ stdio?: boolean | {
208
+ debug?: boolean | undefined;
209
+ } | undefined;
210
+ http?: boolean | {
211
+ port?: number | undefined;
212
+ host?: string | undefined;
213
+ bodySizeLimit?: number | undefined;
214
+ debug?: boolean | undefined;
215
+ endpoint?: string | undefined;
216
+ cors?: {
217
+ origin?: string | boolean | string[] | undefined;
218
+ methods?: string | string[] | undefined;
219
+ allowedHeaders?: string | string[] | undefined;
220
+ exposedHeaders?: string | string[] | undefined;
221
+ credentials?: boolean | undefined;
222
+ maxAge?: number | undefined;
223
+ } | undefined;
224
+ } | undefined;
225
+ experimental?: {
226
+ oauth?: {
227
+ endpoints: {
228
+ authorizationUrl: string;
229
+ tokenUrl: string;
230
+ registerUrl: string;
231
+ revocationUrl?: string | undefined;
232
+ userInfoUrl?: string | undefined;
233
+ };
234
+ issuerUrl: string;
235
+ baseUrl: string;
236
+ serviceDocumentationUrl?: string | undefined;
237
+ pathPrefix?: string | undefined;
238
+ defaultScopes?: string[] | undefined;
239
+ } | undefined;
240
+ adapter?: "express" | "nextjs" | undefined;
241
+ } | undefined;
242
+ paths?: {
243
+ tools?: string | undefined;
244
+ } | undefined;
245
+ webpack?: ((args_0: any, ...args: unknown[]) => any) | undefined;
246
+ }>;
247
+ type WebpackConfig = {
248
+ webpack?: (config: Configuration) => Configuration;
249
+ };
250
+ export type XmcpConfigInputSchema = Omit<z.input<typeof configSchema>, "webpack"> & WebpackConfig;
251
+ export type XmcpConfigOuputSchema = Omit<z.output<typeof configSchema>, "webpack"> & WebpackConfig;
252
+ export {};
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.configSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const schemas_1 = require("./schemas");
6
+ /**
7
+ * xmcp Config schema
8
+ */
9
+ exports.configSchema = zod_1.z.object({
10
+ stdio: schemas_1.stdioTransportConfigSchema.optional(),
11
+ http: schemas_1.httpTransportConfigSchema.optional(),
12
+ experimental: schemas_1.experimentalConfigSchema.optional(),
13
+ paths: schemas_1.pathsConfigSchema.optional(),
14
+ webpack: schemas_1.webpackConfigSchema.optional(),
15
+ });
@@ -0,0 +1,26 @@
1
+ import { HttpTransportConfig } from "./schemas/transport/http";
2
+ export declare function injectHttpVariables(httpConfig: HttpTransportConfig | boolean, mode: string): {
3
+ HTTP_CONFIG?: undefined;
4
+ } | {
5
+ HTTP_CONFIG: string;
6
+ };
7
+ export type HttpVariables = ReturnType<typeof injectHttpVariables>;
8
+ export declare function injectCorsVariables(httpConfig: HttpTransportConfig | null): {
9
+ HTTP_CORS_CONFIG: string;
10
+ };
11
+ export type CorsVariables = ReturnType<typeof injectCorsVariables>;
12
+ export declare function injectOAuthVariables(userConfig: any): {
13
+ OAUTH_CONFIG: string;
14
+ };
15
+ export type OAuthVariables = ReturnType<typeof injectOAuthVariables>;
16
+ export declare function injectPathsVariables(userConfig: any): {
17
+ TOOLS_PATH: string;
18
+ };
19
+ export type PathsVariables = ReturnType<typeof injectPathsVariables>;
20
+ export declare function injectStdioVariables(stdioConfig: any): {
21
+ STDIO_CONFIG?: undefined;
22
+ } | {
23
+ STDIO_CONFIG: string;
24
+ };
25
+ export type StdioVariables = ReturnType<typeof injectStdioVariables>;
26
+ export type InjectedVariables = HttpVariables | CorsVariables | OAuthVariables | PathsVariables | StdioVariables;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.injectHttpVariables = injectHttpVariables;
4
+ exports.injectCorsVariables = injectCorsVariables;
5
+ exports.injectOAuthVariables = injectOAuthVariables;
6
+ exports.injectPathsVariables = injectPathsVariables;
7
+ exports.injectStdioVariables = injectStdioVariables;
8
+ const utils_1 = require("./utils");
9
+ function injectHttpVariables(httpConfig, mode) {
10
+ const resolvedConfig = (0, utils_1.getResolvedHttpConfig)(httpConfig);
11
+ if (!resolvedConfig)
12
+ return {};
13
+ return {
14
+ HTTP_CONFIG: JSON.stringify({
15
+ port: resolvedConfig.port,
16
+ host: resolvedConfig.host,
17
+ bodySizeLimit: resolvedConfig.bodySizeLimit,
18
+ endpoint: resolvedConfig.endpoint,
19
+ stateless: true,
20
+ debug: mode === "development",
21
+ }),
22
+ };
23
+ }
24
+ function injectCorsVariables(httpConfig) {
25
+ const corsConfig = (0, utils_1.getResolvedCorsConfig)(httpConfig);
26
+ return {
27
+ HTTP_CORS_CONFIG: JSON.stringify({
28
+ origin: corsConfig.origin ?? "",
29
+ methods: corsConfig.methods ?? "",
30
+ allowedHeaders: corsConfig.allowedHeaders ?? "",
31
+ exposedHeaders: corsConfig.exposedHeaders ?? "",
32
+ credentials: corsConfig.credentials ?? false,
33
+ maxAge: corsConfig.maxAge ?? 0,
34
+ }),
35
+ };
36
+ }
37
+ function injectOAuthVariables(userConfig) {
38
+ const oauthConfig = (0, utils_1.getResolvedOAuthConfig)(userConfig);
39
+ return {
40
+ OAUTH_CONFIG: JSON.stringify(oauthConfig),
41
+ };
42
+ }
43
+ function injectPathsVariables(userConfig) {
44
+ const pathsConfig = (0, utils_1.getResolvedPathsConfig)(userConfig);
45
+ return {
46
+ TOOLS_PATH: JSON.stringify(pathsConfig.tools),
47
+ };
48
+ }
49
+ function injectStdioVariables(stdioConfig) {
50
+ if (!stdioConfig)
51
+ return {};
52
+ const debug = typeof stdioConfig === "object" ? stdioConfig.debug : false;
53
+ return {
54
+ STDIO_CONFIG: JSON.stringify({
55
+ debug,
56
+ }),
57
+ };
58
+ }
@@ -0,0 +1,91 @@
1
+ import { z } from "zod";
2
+ export declare const adapterConfigSchema: z.ZodEnum<["express", "nextjs"]>;
3
+ export type AdapterConfig = z.infer<typeof adapterConfigSchema>;
4
+ export declare const experimentalConfigSchema: z.ZodObject<{
5
+ oauth: z.ZodOptional<z.ZodObject<{
6
+ endpoints: z.ZodObject<{
7
+ authorizationUrl: z.ZodString;
8
+ tokenUrl: z.ZodString;
9
+ revocationUrl: z.ZodOptional<z.ZodString>;
10
+ userInfoUrl: z.ZodOptional<z.ZodString>;
11
+ registerUrl: z.ZodString;
12
+ }, "strip", z.ZodTypeAny, {
13
+ authorizationUrl: string;
14
+ tokenUrl: string;
15
+ registerUrl: string;
16
+ revocationUrl?: string | undefined;
17
+ userInfoUrl?: string | undefined;
18
+ }, {
19
+ authorizationUrl: string;
20
+ tokenUrl: string;
21
+ registerUrl: string;
22
+ revocationUrl?: string | undefined;
23
+ userInfoUrl?: string | undefined;
24
+ }>;
25
+ issuerUrl: z.ZodString;
26
+ baseUrl: z.ZodString;
27
+ serviceDocumentationUrl: z.ZodOptional<z.ZodString>;
28
+ pathPrefix: z.ZodDefault<z.ZodString>;
29
+ defaultScopes: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ endpoints: {
32
+ authorizationUrl: string;
33
+ tokenUrl: string;
34
+ registerUrl: string;
35
+ revocationUrl?: string | undefined;
36
+ userInfoUrl?: string | undefined;
37
+ };
38
+ issuerUrl: string;
39
+ baseUrl: string;
40
+ pathPrefix: string;
41
+ defaultScopes: string[];
42
+ serviceDocumentationUrl?: string | undefined;
43
+ }, {
44
+ endpoints: {
45
+ authorizationUrl: string;
46
+ tokenUrl: string;
47
+ registerUrl: string;
48
+ revocationUrl?: string | undefined;
49
+ userInfoUrl?: string | undefined;
50
+ };
51
+ issuerUrl: string;
52
+ baseUrl: string;
53
+ serviceDocumentationUrl?: string | undefined;
54
+ pathPrefix?: string | undefined;
55
+ defaultScopes?: string[] | undefined;
56
+ }>>;
57
+ adapter: z.ZodOptional<z.ZodEnum<["express", "nextjs"]>>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ oauth?: {
60
+ endpoints: {
61
+ authorizationUrl: string;
62
+ tokenUrl: string;
63
+ registerUrl: string;
64
+ revocationUrl?: string | undefined;
65
+ userInfoUrl?: string | undefined;
66
+ };
67
+ issuerUrl: string;
68
+ baseUrl: string;
69
+ pathPrefix: string;
70
+ defaultScopes: string[];
71
+ serviceDocumentationUrl?: string | undefined;
72
+ } | undefined;
73
+ adapter?: "express" | "nextjs" | undefined;
74
+ }, {
75
+ oauth?: {
76
+ endpoints: {
77
+ authorizationUrl: string;
78
+ tokenUrl: string;
79
+ registerUrl: string;
80
+ revocationUrl?: string | undefined;
81
+ userInfoUrl?: string | undefined;
82
+ };
83
+ issuerUrl: string;
84
+ baseUrl: string;
85
+ serviceDocumentationUrl?: string | undefined;
86
+ pathPrefix?: string | undefined;
87
+ defaultScopes?: string[] | undefined;
88
+ } | undefined;
89
+ adapter?: "express" | "nextjs" | undefined;
90
+ }>;
91
+ export type ExperimentalConfig = z.infer<typeof experimentalConfigSchema>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.experimentalConfigSchema = exports.adapterConfigSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const oauth_1 = require("./oauth");
6
+ // ------------------------------------------------------------
7
+ // Adapter config schema (perhaps a separate file but it's small yet)
8
+ // ------------------------------------------------------------
9
+ exports.adapterConfigSchema = zod_1.z.enum(["express", "nextjs"]);
10
+ // ------------------------------------------------------------
11
+ // Experimental features schema
12
+ // ------------------------------------------------------------
13
+ exports.experimentalConfigSchema = zod_1.z.object({
14
+ oauth: oauth_1.oauthConfigSchema.optional(),
15
+ adapter: exports.adapterConfigSchema.optional(),
16
+ });