@kya-os/mcp-i 0.1.0 → 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 (229) hide show
  1. package/README.md +406 -71
  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/auth/oauth/types.js +2 -0
  32. package/dist/cache/__tests__/cloudflare-kv-nonce-cache.test.d.ts +4 -0
  33. package/dist/cache/__tests__/cloudflare-kv-nonce-cache.test.js +176 -0
  34. package/dist/cache/__tests__/concurrency.test.d.ts +5 -0
  35. package/dist/cache/__tests__/concurrency.test.js +300 -0
  36. package/dist/cache/__tests__/dynamodb-nonce-cache.test.d.ts +4 -0
  37. package/dist/cache/__tests__/dynamodb-nonce-cache.test.js +176 -0
  38. package/dist/cache/__tests__/memory-nonce-cache.test.d.ts +4 -0
  39. package/dist/cache/__tests__/memory-nonce-cache.test.js +132 -0
  40. package/dist/cache/__tests__/nonce-cache-factory-simple.test.d.ts +4 -0
  41. package/dist/cache/__tests__/nonce-cache-factory-simple.test.js +133 -0
  42. package/dist/cache/__tests__/nonce-cache-factory.test.d.ts +4 -0
  43. package/dist/cache/__tests__/nonce-cache-factory.test.js +252 -0
  44. package/dist/cache/__tests__/redis-nonce-cache.test.d.ts +4 -0
  45. package/dist/cache/__tests__/redis-nonce-cache.test.js +95 -0
  46. package/dist/cache/cloudflare-kv-nonce-cache.d.ts +14 -0
  47. package/dist/cache/cloudflare-kv-nonce-cache.js +93 -0
  48. package/dist/cache/dynamodb-nonce-cache.d.ts +15 -0
  49. package/dist/cache/dynamodb-nonce-cache.js +92 -0
  50. package/dist/cache/index.d.ts +16 -0
  51. package/dist/cache/index.js +32 -0
  52. package/dist/cache/memory-nonce-cache.d.ts +44 -0
  53. package/dist/cache/memory-nonce-cache.js +105 -0
  54. package/dist/cache/nonce-cache-factory.d.ts +20 -0
  55. package/dist/cache/nonce-cache-factory.js +208 -0
  56. package/dist/cache/redis-nonce-cache.d.ts +14 -0
  57. package/dist/cache/redis-nonce-cache.js +53 -0
  58. package/dist/compiler/compiler-context.d.ts +23 -0
  59. package/dist/compiler/compiler-context.js +24 -0
  60. package/dist/compiler/config/constants.d.ts +41 -0
  61. package/dist/compiler/config/constants.js +45 -0
  62. package/dist/compiler/config/index.d.ts +252 -0
  63. package/dist/compiler/config/index.js +15 -0
  64. package/dist/compiler/config/injection.d.ts +26 -0
  65. package/dist/compiler/config/injection.js +58 -0
  66. package/dist/compiler/config/schemas/experimental/index.d.ts +91 -0
  67. package/dist/compiler/config/schemas/experimental/index.js +16 -0
  68. package/dist/compiler/config/schemas/experimental/oauth.d.ts +74 -0
  69. package/dist/compiler/config/schemas/experimental/oauth.js +25 -0
  70. package/dist/compiler/config/schemas/index.d.ts +6 -0
  71. package/dist/compiler/config/schemas/index.js +17 -0
  72. package/dist/compiler/config/schemas/paths.d.ts +9 -0
  73. package/dist/compiler/config/schemas/paths.js +12 -0
  74. package/dist/compiler/config/schemas/transport/http.d.ts +82 -0
  75. package/dist/compiler/config/schemas/transport/http.js +33 -0
  76. package/dist/compiler/config/schemas/transport/stdio.d.ts +9 -0
  77. package/dist/compiler/config/schemas/transport/stdio.js +15 -0
  78. package/dist/compiler/config/schemas/webpack.d.ts +3 -0
  79. package/dist/compiler/config/schemas/webpack.js +15 -0
  80. package/dist/compiler/config/types.d.ts +1 -0
  81. package/dist/compiler/config/types.js +2 -0
  82. package/dist/compiler/config/utils.d.ts +20 -0
  83. package/dist/compiler/config/utils.js +36 -0
  84. package/dist/compiler/generate-env-code.d.ts +1 -0
  85. package/dist/compiler/generate-env-code.js +8 -0
  86. package/dist/compiler/generate-import-code.d.ts +1 -0
  87. package/dist/compiler/generate-import-code.js +24 -0
  88. package/dist/compiler/get-webpack-config/get-entries.d.ts +3 -0
  89. package/dist/compiler/get-webpack-config/get-entries.js +29 -0
  90. package/dist/compiler/get-webpack-config/get-externals.d.ts +7 -0
  91. package/dist/compiler/get-webpack-config/get-externals.js +88 -0
  92. package/dist/compiler/get-webpack-config/get-injected-variables.d.ts +8 -0
  93. package/dist/compiler/get-webpack-config/get-injected-variables.js +25 -0
  94. package/dist/compiler/get-webpack-config/index.d.ts +4 -0
  95. package/dist/compiler/get-webpack-config/index.js +101 -0
  96. package/dist/compiler/get-webpack-config/plugins.d.ts +8 -0
  97. package/dist/compiler/get-webpack-config/plugins.js +132 -0
  98. package/dist/compiler/get-webpack-config/resolve-tsconfig-paths.d.ts +9 -0
  99. package/dist/compiler/get-webpack-config/resolve-tsconfig-paths.js +40 -0
  100. package/dist/compiler/index.d.ts +6 -0
  101. package/dist/compiler/index.js +194 -0
  102. package/dist/compiler/on-first-build.d.ts +3 -0
  103. package/dist/compiler/on-first-build.js +58 -0
  104. package/dist/compiler/parse-xmcp-config.d.ts +9 -0
  105. package/dist/compiler/parse-xmcp-config.js +155 -0
  106. package/dist/compiler/start-http-server.d.ts +1 -0
  107. package/dist/compiler/start-http-server.js +34 -0
  108. package/dist/index.d.ts +12 -54
  109. package/dist/index.js +22 -190
  110. package/dist/index.js.LICENSE.txt +49 -0
  111. package/dist/runtime/__tests__/audit.test.d.ts +4 -0
  112. package/dist/runtime/__tests__/audit.test.js +328 -0
  113. package/dist/runtime/__tests__/identity.test.d.ts +4 -0
  114. package/dist/runtime/__tests__/identity.test.js +164 -0
  115. package/dist/runtime/__tests__/mcpi-runtime.test.d.ts +4 -0
  116. package/dist/runtime/__tests__/mcpi-runtime.test.js +372 -0
  117. package/dist/runtime/__tests__/proof.test.d.ts +4 -0
  118. package/dist/runtime/__tests__/proof.test.js +302 -0
  119. package/dist/runtime/__tests__/session.test.d.ts +4 -0
  120. package/dist/runtime/__tests__/session.test.js +254 -0
  121. package/dist/runtime/__tests__/well-known.test.d.ts +4 -0
  122. package/dist/runtime/__tests__/well-known.test.js +312 -0
  123. package/dist/runtime/adapter-express.js +2 -0
  124. package/dist/runtime/adapter-express.js.LICENSE.txt +252 -0
  125. package/dist/runtime/adapter-nextjs.js +2 -0
  126. package/dist/runtime/adapter-nextjs.js.LICENSE.txt +53 -0
  127. package/dist/runtime/adapters/express/index.d.ts +2 -0
  128. package/dist/runtime/adapters/express/index.js +48 -0
  129. package/dist/runtime/adapters/nextjs/index.d.ts +8 -0
  130. package/dist/runtime/adapters/nextjs/index.js +18 -0
  131. package/dist/runtime/audit.d.ts +93 -0
  132. package/dist/runtime/audit.js +212 -0
  133. package/dist/runtime/debug.d.ts +118 -0
  134. package/dist/runtime/debug.js +612 -0
  135. package/dist/runtime/delegation-hooks.d.ts +85 -0
  136. package/dist/runtime/delegation-hooks.js +116 -0
  137. package/dist/runtime/demo.d.ts +71 -0
  138. package/dist/runtime/demo.js +135 -0
  139. package/dist/runtime/headers.d.ts +1 -0
  140. package/dist/runtime/headers.js +9 -0
  141. package/dist/runtime/http.js +2 -0
  142. package/dist/runtime/http.js.LICENSE.txt +252 -0
  143. package/dist/runtime/identity.d.ts +105 -0
  144. package/dist/runtime/identity.js +232 -0
  145. package/dist/runtime/index.d.ts +16 -0
  146. package/dist/runtime/index.js +56 -0
  147. package/dist/runtime/mcpi-runtime.d.ts +164 -0
  148. package/dist/runtime/mcpi-runtime.js +352 -0
  149. package/dist/runtime/proof.d.ts +87 -0
  150. package/dist/runtime/proof.js +223 -0
  151. package/dist/runtime/session.d.ts +88 -0
  152. package/dist/runtime/session.js +216 -0
  153. package/dist/runtime/stdio.js +2 -0
  154. package/dist/runtime/stdio.js.LICENSE.txt +1 -0
  155. package/dist/runtime/templates/home.d.ts +2 -0
  156. package/dist/runtime/templates/home.js +50 -0
  157. package/dist/runtime/transports/http/base-streamable-http.d.ts +25 -0
  158. package/dist/runtime/transports/http/base-streamable-http.js +16 -0
  159. package/dist/runtime/transports/http/http-context.d.ts +9 -0
  160. package/dist/runtime/transports/http/http-context.js +8 -0
  161. package/dist/runtime/transports/http/index.d.ts +1 -0
  162. package/dist/runtime/transports/http/index.js +55 -0
  163. package/dist/runtime/transports/http/setup-cors.d.ts +4 -0
  164. package/dist/runtime/transports/http/setup-cors.js +24 -0
  165. package/dist/runtime/transports/http/stateless-streamable-http.d.ts +39 -0
  166. package/dist/runtime/transports/http/stateless-streamable-http.js +331 -0
  167. package/dist/runtime/transports/stdio/index.d.ts +1 -0
  168. package/dist/runtime/transports/stdio/index.js +51 -0
  169. package/dist/runtime/utils/server.d.ts +42 -0
  170. package/dist/runtime/utils/server.js +39 -0
  171. package/dist/runtime/utils/tools.d.ts +8 -0
  172. package/dist/runtime/utils/tools.js +115 -0
  173. package/dist/runtime/verifier-middleware.d.ts +76 -0
  174. package/dist/runtime/verifier-middleware.js +322 -0
  175. package/dist/runtime/well-known.d.ts +151 -0
  176. package/dist/runtime/well-known.js +258 -0
  177. package/dist/storage/config.d.ts +28 -0
  178. package/dist/storage/config.js +79 -0
  179. package/dist/storage/delegation.d.ts +59 -0
  180. package/dist/storage/delegation.js +130 -0
  181. package/dist/storage/merkle-verifier.d.ts +84 -0
  182. package/dist/storage/merkle-verifier.js +261 -0
  183. package/dist/test/__tests__/nonce-cache-integration.test.d.ts +1 -0
  184. package/dist/test/__tests__/nonce-cache-integration.test.js +116 -0
  185. package/dist/test/__tests__/nonce-cache.test.d.ts +1 -0
  186. package/dist/test/__tests__/nonce-cache.test.js +122 -0
  187. package/dist/test/__tests__/runtime-integration.test.d.ts +4 -0
  188. package/dist/test/__tests__/runtime-integration.test.js +192 -0
  189. package/dist/test/__tests__/test-infrastructure.test.d.ts +4 -0
  190. package/dist/test/__tests__/test-infrastructure.test.js +178 -0
  191. package/dist/test/deterministic-keys.d.ts +31 -0
  192. package/dist/test/deterministic-keys.js +108 -0
  193. package/dist/test/examples/test-usage-example.d.ts +140 -0
  194. package/dist/test/examples/test-usage-example.js +175 -0
  195. package/dist/test/index.d.ts +11 -0
  196. package/dist/test/index.js +27 -0
  197. package/dist/test/local-verification.d.ts +28 -0
  198. package/dist/test/local-verification.js +342 -0
  199. package/dist/test/mock-identity-provider.d.ts +96 -0
  200. package/dist/test/mock-identity-provider.js +243 -0
  201. package/dist/test/runtime-integration.d.ts +63 -0
  202. package/dist/test/runtime-integration.js +140 -0
  203. package/dist/test/test-environment.d.ts +26 -0
  204. package/dist/test/test-environment.js +50 -0
  205. package/dist/types/declarations.d.ts +1 -0
  206. package/dist/types/declarations.js +6 -0
  207. package/dist/types/middleware.d.ts +2 -0
  208. package/dist/types/middleware.js +2 -0
  209. package/dist/types/tool.d.ts +80 -0
  210. package/dist/types/tool.js +2 -0
  211. package/dist/utils/cli-icons.d.ts +3 -0
  212. package/dist/utils/cli-icons.js +7 -0
  213. package/dist/utils/constants.d.ts +6 -0
  214. package/dist/utils/constants.js +13 -0
  215. package/dist/utils/context.d.ts +33 -0
  216. package/dist/utils/context.js +58 -0
  217. package/dist/utils/file-watcher.d.ts +19 -0
  218. package/dist/utils/file-watcher.js +49 -0
  219. package/dist/utils/fs-utils.d.ts +2 -0
  220. package/dist/utils/fs-utils.js +22 -0
  221. package/dist/utils/path-validation.d.ts +3 -0
  222. package/dist/utils/path-validation.js +56 -0
  223. package/dist/utils/spawn-process.d.ts +9 -0
  224. package/dist/utils/spawn-process.js +50 -0
  225. package/dist/utils/subscribable.d.ts +12 -0
  226. package/dist/utils/subscribable.js +44 -0
  227. package/package.json +99 -21
  228. package/dist/index.d.ts.map +0 -1
  229. package/dist/index.js.map +0 -1
@@ -0,0 +1,252 @@
1
+ /*!
2
+ * accepts
3
+ * Copyright(c) 2014 Jonathan Ong
4
+ * Copyright(c) 2015 Douglas Christopher Wilson
5
+ * MIT Licensed
6
+ */
7
+
8
+ /*!
9
+ * body-parser
10
+ * Copyright(c) 2014 Jonathan Ong
11
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
12
+ * MIT Licensed
13
+ */
14
+
15
+ /*!
16
+ * body-parser
17
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
18
+ * MIT Licensed
19
+ */
20
+
21
+ /*!
22
+ * bytes
23
+ * Copyright(c) 2012-2014 TJ Holowaychuk
24
+ * Copyright(c) 2015 Jed Watson
25
+ * MIT Licensed
26
+ */
27
+
28
+ /*!
29
+ * content-disposition
30
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
31
+ * MIT Licensed
32
+ */
33
+
34
+ /*!
35
+ * content-type
36
+ * Copyright(c) 2015 Douglas Christopher Wilson
37
+ * MIT Licensed
38
+ */
39
+
40
+ /*!
41
+ * cookie
42
+ * Copyright(c) 2012-2014 Roman Shtylman
43
+ * Copyright(c) 2015 Douglas Christopher Wilson
44
+ * MIT Licensed
45
+ */
46
+
47
+ /*!
48
+ * depd
49
+ * Copyright(c) 2014-2018 Douglas Christopher Wilson
50
+ * MIT Licensed
51
+ */
52
+
53
+ /*!
54
+ * destroy
55
+ * Copyright(c) 2014 Jonathan Ong
56
+ * Copyright(c) 2015-2022 Douglas Christopher Wilson
57
+ * MIT Licensed
58
+ */
59
+
60
+ /*!
61
+ * ee-first
62
+ * Copyright(c) 2014 Jonathan Ong
63
+ * MIT Licensed
64
+ */
65
+
66
+ /*!
67
+ * encodeurl
68
+ * Copyright(c) 2016 Douglas Christopher Wilson
69
+ * MIT Licensed
70
+ */
71
+
72
+ /*!
73
+ * escape-html
74
+ * Copyright(c) 2012-2013 TJ Holowaychuk
75
+ * Copyright(c) 2015 Andreas Lubbe
76
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
77
+ * MIT Licensed
78
+ */
79
+
80
+ /*!
81
+ * etag
82
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
83
+ * MIT Licensed
84
+ */
85
+
86
+ /*!
87
+ * express
88
+ * Copyright(c) 2009-2013 TJ Holowaychuk
89
+ * Copyright(c) 2013 Roman Shtylman
90
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
91
+ * MIT Licensed
92
+ */
93
+
94
+ /*!
95
+ * express
96
+ * Copyright(c) 2009-2013 TJ Holowaychuk
97
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
98
+ * MIT Licensed
99
+ */
100
+
101
+ /*!
102
+ * finalhandler
103
+ * Copyright(c) 2014-2022 Douglas Christopher Wilson
104
+ * MIT Licensed
105
+ */
106
+
107
+ /*!
108
+ * forwarded
109
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
110
+ * MIT Licensed
111
+ */
112
+
113
+ /*!
114
+ * fresh
115
+ * Copyright(c) 2012 TJ Holowaychuk
116
+ * Copyright(c) 2016-2017 Douglas Christopher Wilson
117
+ * MIT Licensed
118
+ */
119
+
120
+ /*!
121
+ * http-errors
122
+ * Copyright(c) 2014 Jonathan Ong
123
+ * Copyright(c) 2016 Douglas Christopher Wilson
124
+ * MIT Licensed
125
+ */
126
+
127
+ /*!
128
+ * media-typer
129
+ * Copyright(c) 2014 Douglas Christopher Wilson
130
+ * MIT Licensed
131
+ */
132
+
133
+ /*!
134
+ * merge-descriptors
135
+ * Copyright(c) 2014 Jonathan Ong
136
+ * Copyright(c) 2015 Douglas Christopher Wilson
137
+ * MIT Licensed
138
+ */
139
+
140
+ /*!
141
+ * methods
142
+ * Copyright(c) 2013-2014 TJ Holowaychuk
143
+ * Copyright(c) 2015-2016 Douglas Christopher Wilson
144
+ * MIT Licensed
145
+ */
146
+
147
+ /*!
148
+ * mime-db
149
+ * Copyright(c) 2014 Jonathan Ong
150
+ * Copyright(c) 2015-2022 Douglas Christopher Wilson
151
+ * MIT Licensed
152
+ */
153
+
154
+ /*!
155
+ * mime-types
156
+ * Copyright(c) 2014 Jonathan Ong
157
+ * Copyright(c) 2015 Douglas Christopher Wilson
158
+ * MIT Licensed
159
+ */
160
+
161
+ /*!
162
+ * negotiator
163
+ * Copyright(c) 2012 Federico Romero
164
+ * Copyright(c) 2012-2014 Isaac Z. Schlueter
165
+ * Copyright(c) 2015 Douglas Christopher Wilson
166
+ * MIT Licensed
167
+ */
168
+
169
+ /*!
170
+ * on-finished
171
+ * Copyright(c) 2013 Jonathan Ong
172
+ * Copyright(c) 2014 Douglas Christopher Wilson
173
+ * MIT Licensed
174
+ */
175
+
176
+ /*!
177
+ * parseurl
178
+ * Copyright(c) 2014 Jonathan Ong
179
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
180
+ * MIT Licensed
181
+ */
182
+
183
+ /*!
184
+ * proxy-addr
185
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
186
+ * MIT Licensed
187
+ */
188
+
189
+ /*!
190
+ * range-parser
191
+ * Copyright(c) 2012-2014 TJ Holowaychuk
192
+ * Copyright(c) 2015-2016 Douglas Christopher Wilson
193
+ * MIT Licensed
194
+ */
195
+
196
+ /*!
197
+ * raw-body
198
+ * Copyright(c) 2013-2014 Jonathan Ong
199
+ * Copyright(c) 2014-2022 Douglas Christopher Wilson
200
+ * MIT Licensed
201
+ */
202
+
203
+ /*!
204
+ * send
205
+ * Copyright(c) 2012 TJ Holowaychuk
206
+ * Copyright(c) 2014-2022 Douglas Christopher Wilson
207
+ * MIT Licensed
208
+ */
209
+
210
+ /*!
211
+ * serve-static
212
+ * Copyright(c) 2010 Sencha Inc.
213
+ * Copyright(c) 2011 TJ Holowaychuk
214
+ * Copyright(c) 2014-2016 Douglas Christopher Wilson
215
+ * MIT Licensed
216
+ */
217
+
218
+ /*!
219
+ * statuses
220
+ * Copyright(c) 2014 Jonathan Ong
221
+ * Copyright(c) 2016 Douglas Christopher Wilson
222
+ * MIT Licensed
223
+ */
224
+
225
+ /*!
226
+ * toidentifier
227
+ * Copyright(c) 2016 Douglas Christopher Wilson
228
+ * MIT Licensed
229
+ */
230
+
231
+ /*!
232
+ * type-is
233
+ * Copyright(c) 2014 Jonathan Ong
234
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
235
+ * MIT Licensed
236
+ */
237
+
238
+ /*!
239
+ * unpipe
240
+ * Copyright(c) 2015 Douglas Christopher Wilson
241
+ * MIT Licensed
242
+ */
243
+
244
+ /*!
245
+ * vary
246
+ * Copyright(c) 2014-2017 Douglas Christopher Wilson
247
+ * MIT Licensed
248
+ */
249
+
250
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
251
+
252
+ /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */