@frontmcp/sdk 0.7.2 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (630) hide show
  1. package/agent/adapters/adapter.factory.d.ts +27 -18
  2. package/agent/adapters/adapter.factory.d.ts.map +1 -1
  3. package/agent/agent.instance.d.ts +5 -0
  4. package/agent/agent.instance.d.ts.map +1 -1
  5. package/agent/agent.scope.d.ts +54 -72
  6. package/agent/agent.scope.d.ts.map +1 -1
  7. package/agent/flows/call-agent.flow.d.ts +1 -0
  8. package/agent/flows/call-agent.flow.d.ts.map +1 -1
  9. package/app/instances/app.local.instance.d.ts +3 -0
  10. package/app/instances/app.local.instance.d.ts.map +1 -1
  11. package/app/instances/app.remote.instance.d.ts +3 -0
  12. package/app/instances/app.remote.instance.d.ts.map +1 -1
  13. package/auth/auth.registry.d.ts.map +1 -1
  14. package/auth/authorization/authorization.types.d.ts +7 -180
  15. package/auth/authorization/authorization.types.d.ts.map +1 -1
  16. package/auth/authorization/index.d.ts +2 -0
  17. package/auth/authorization/index.d.ts.map +1 -1
  18. package/auth/authorization/orchestrated.accessor.d.ts +161 -0
  19. package/auth/authorization/orchestrated.accessor.d.ts.map +1 -0
  20. package/auth/authorization/orchestrated.authorization.d.ts +19 -4
  21. package/auth/authorization/orchestrated.authorization.d.ts.map +1 -1
  22. package/auth/authorization/orchestrated.context-extension.d.ts +108 -0
  23. package/auth/authorization/orchestrated.context-extension.d.ts.map +1 -0
  24. package/auth/cimd/index.d.ts +14 -0
  25. package/auth/cimd/index.d.ts.map +1 -0
  26. package/auth/flows/auth.verify.flow.d.ts.map +1 -1
  27. package/auth/flows/oauth.authorize.flow.d.ts +30 -3
  28. package/auth/flows/oauth.authorize.flow.d.ts.map +1 -1
  29. package/auth/flows/oauth.callback.flow.d.ts +11 -3
  30. package/auth/flows/oauth.callback.flow.d.ts.map +1 -1
  31. package/auth/flows/oauth.provider-callback.flow.d.ts +118 -0
  32. package/auth/flows/oauth.provider-callback.flow.d.ts.map +1 -0
  33. package/auth/flows/oauth.register.flow.d.ts +1 -1
  34. package/auth/flows/oauth.token.flow.d.ts +1 -1
  35. package/auth/flows/session.verify.flow.d.ts +8 -0
  36. package/auth/flows/session.verify.flow.d.ts.map +1 -1
  37. package/auth/flows/well-known.jwks.flow.d.ts +3 -3
  38. package/auth/flows/well-known.oauth-authorization-server.flow.d.ts +3 -2
  39. package/auth/flows/well-known.oauth-authorization-server.flow.d.ts.map +1 -1
  40. package/auth/flows/well-known.prm.flow.d.ts +1 -1
  41. package/auth/instances/instance.local-primary-auth.d.ts +88 -1
  42. package/auth/instances/instance.local-primary-auth.d.ts.map +1 -1
  43. package/auth/machine-id.d.ts +14 -0
  44. package/auth/machine-id.d.ts.map +1 -1
  45. package/auth/session/encrypted-authorization-vault.d.ts +2 -3
  46. package/auth/session/encrypted-authorization-vault.d.ts.map +1 -1
  47. package/auth/session/federated-auth.session.d.ts +252 -0
  48. package/auth/session/federated-auth.session.d.ts.map +1 -0
  49. package/auth/session/index.d.ts +6 -2
  50. package/auth/session/index.d.ts.map +1 -1
  51. package/auth/session/orchestrated-token.store.d.ts +155 -0
  52. package/auth/session/orchestrated-token.store.d.ts.map +1 -0
  53. package/auth/session/record/session.base.d.ts +7 -7
  54. package/auth/session/record/session.base.d.ts.map +1 -1
  55. package/auth/session/record/session.mcp.d.ts +11 -0
  56. package/auth/session/record/session.mcp.d.ts.map +1 -0
  57. package/auth/session/redis-session.store.d.ts +10 -5
  58. package/auth/session/redis-session.store.d.ts.map +1 -1
  59. package/auth/session/session-crypto.d.ts +6 -9
  60. package/auth/session/session-crypto.d.ts.map +1 -1
  61. package/{store/store.factory.d.ts → auth/session/session-store.factory.d.ts} +10 -36
  62. package/auth/session/session-store.factory.d.ts.map +1 -0
  63. package/auth/session/session.service.d.ts +4 -8
  64. package/auth/session/session.service.d.ts.map +1 -1
  65. package/auth/session/session.transport.d.ts +8 -2
  66. package/auth/session/session.transport.d.ts.map +1 -1
  67. package/auth/session/session.types.d.ts +5 -5
  68. package/auth/session/session.types.d.ts.map +1 -1
  69. package/auth/session/token.refresh.d.ts +1 -2
  70. package/auth/session/token.refresh.d.ts.map +1 -1
  71. package/auth/session/transport-session.manager.d.ts +7 -6
  72. package/auth/session/transport-session.manager.d.ts.map +1 -1
  73. package/auth/session/utils/session-id.utils.d.ts +18 -1
  74. package/auth/session/utils/session-id.utils.d.ts.map +1 -1
  75. package/auth/session/vercel-kv-session.store.d.ts +16 -16
  76. package/auth/session/vercel-kv-session.store.d.ts.map +1 -1
  77. package/auth/utils/authorization-id.utils.d.ts +12 -0
  78. package/auth/utils/authorization-id.utils.d.ts.map +1 -0
  79. package/auth/utils/index.d.ts +1 -2
  80. package/auth/utils/index.d.ts.map +1 -1
  81. package/auth/vault/auth-providers.accessor.d.ts +153 -0
  82. package/auth/vault/auth-providers.accessor.d.ts.map +1 -0
  83. package/auth/vault/auth-providers.accessor.impl.d.ts +52 -0
  84. package/auth/vault/auth-providers.accessor.impl.d.ts.map +1 -0
  85. package/auth/vault/auth-providers.context-extension.d.ts +68 -0
  86. package/auth/vault/auth-providers.context-extension.d.ts.map +1 -0
  87. package/auth/vault/auth-providers.providers.d.ts +40 -0
  88. package/auth/vault/auth-providers.providers.d.ts.map +1 -0
  89. package/auth/vault/auth-providers.registry.d.ts +110 -0
  90. package/auth/vault/auth-providers.registry.d.ts.map +1 -0
  91. package/auth/vault/auth-providers.vault.d.ts +93 -0
  92. package/auth/vault/auth-providers.vault.d.ts.map +1 -0
  93. package/auth/vault/credential-cache.d.ts +13 -0
  94. package/auth/vault/credential-cache.d.ts.map +1 -0
  95. package/auth/vault/credential-loaders/eager-loader.d.ts +46 -0
  96. package/auth/vault/credential-loaders/eager-loader.d.ts.map +1 -0
  97. package/auth/vault/credential-loaders/index.d.ts +7 -0
  98. package/auth/vault/credential-loaders/index.d.ts.map +1 -0
  99. package/auth/vault/credential-loaders/lazy-loader.d.ts +53 -0
  100. package/auth/vault/credential-loaders/lazy-loader.d.ts.map +1 -0
  101. package/auth/vault/index.d.ts +56 -0
  102. package/auth/vault/index.d.ts.map +1 -0
  103. package/builtin/config/config-resolver.d.ts +162 -0
  104. package/builtin/config/config-resolver.d.ts.map +1 -0
  105. package/builtin/config/config.plugin.d.ts +63 -0
  106. package/builtin/config/config.plugin.d.ts.map +1 -0
  107. package/builtin/config/config.symbols.d.ts +7 -0
  108. package/builtin/config/config.symbols.d.ts.map +1 -0
  109. package/builtin/config/config.types.d.ts +71 -0
  110. package/builtin/config/config.types.d.ts.map +1 -0
  111. package/builtin/config/index.d.ts +68 -0
  112. package/builtin/config/index.d.ts.map +1 -0
  113. package/builtin/config/providers/config-loader.d.ts +36 -0
  114. package/builtin/config/providers/config-loader.d.ts.map +1 -0
  115. package/builtin/config/providers/config.service.d.ts +108 -0
  116. package/builtin/config/providers/config.service.d.ts.map +1 -0
  117. package/builtin/config/providers/env-loader.d.ts +76 -0
  118. package/builtin/config/providers/env-loader.d.ts.map +1 -0
  119. package/builtin/index.d.ts +7 -0
  120. package/builtin/index.d.ts.map +1 -0
  121. package/common/decorators/front-mcp.decorator.d.ts.map +1 -1
  122. package/common/decorators/hook.decorator.d.ts +0 -10
  123. package/common/decorators/hook.decorator.d.ts.map +1 -1
  124. package/common/decorators/index.d.ts +1 -0
  125. package/common/decorators/index.d.ts.map +1 -1
  126. package/common/decorators/skill.decorator.d.ts +105 -0
  127. package/common/decorators/skill.decorator.d.ts.map +1 -0
  128. package/common/dynamic/dynamic.adapter.d.ts +14 -4
  129. package/common/dynamic/dynamic.adapter.d.ts.map +1 -1
  130. package/common/entries/app.entry.d.ts +2 -0
  131. package/common/entries/app.entry.d.ts.map +1 -1
  132. package/common/entries/index.d.ts +1 -0
  133. package/common/entries/index.d.ts.map +1 -1
  134. package/common/entries/prompt.entry.d.ts +0 -6
  135. package/common/entries/prompt.entry.d.ts.map +1 -1
  136. package/common/entries/resource.entry.d.ts +0 -6
  137. package/common/entries/resource.entry.d.ts.map +1 -1
  138. package/common/entries/scope.entry.d.ts +2 -0
  139. package/common/entries/scope.entry.d.ts.map +1 -1
  140. package/common/entries/skill.entry.d.ts +95 -0
  141. package/common/entries/skill.entry.d.ts.map +1 -0
  142. package/common/entries/tool.entry.d.ts +17 -9
  143. package/common/entries/tool.entry.d.ts.map +1 -1
  144. package/common/interfaces/agent.interface.d.ts +35 -6
  145. package/common/interfaces/agent.interface.d.ts.map +1 -1
  146. package/common/interfaces/execution-context.interface.d.ts +14 -0
  147. package/common/interfaces/execution-context.interface.d.ts.map +1 -1
  148. package/common/interfaces/index.d.ts +1 -0
  149. package/common/interfaces/index.d.ts.map +1 -1
  150. package/common/interfaces/internal/primary-auth-provider.interface.d.ts +1 -7
  151. package/common/interfaces/internal/primary-auth-provider.interface.d.ts.map +1 -1
  152. package/common/interfaces/internal/registry.interface.d.ts +4 -1
  153. package/common/interfaces/internal/registry.interface.d.ts.map +1 -1
  154. package/common/interfaces/skill.interface.d.ts +91 -0
  155. package/common/interfaces/skill.interface.d.ts.map +1 -0
  156. package/common/interfaces/tool.interface.d.ts +39 -0
  157. package/common/interfaces/tool.interface.d.ts.map +1 -1
  158. package/common/metadata/agent.metadata.d.ts +62 -2
  159. package/common/metadata/agent.metadata.d.ts.map +1 -1
  160. package/common/metadata/app.metadata.d.ts +168 -169
  161. package/common/metadata/app.metadata.d.ts.map +1 -1
  162. package/common/metadata/front-mcp.metadata.d.ts +2182 -721
  163. package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
  164. package/common/metadata/index.d.ts +1 -0
  165. package/common/metadata/index.d.ts.map +1 -1
  166. package/common/metadata/plugin.metadata.d.ts +8 -1
  167. package/common/metadata/plugin.metadata.d.ts.map +1 -1
  168. package/common/metadata/skill.metadata.d.ts +366 -0
  169. package/common/metadata/skill.metadata.d.ts.map +1 -0
  170. package/common/metadata/tool.metadata.d.ts +71 -0
  171. package/common/metadata/tool.metadata.d.ts.map +1 -1
  172. package/common/records/index.d.ts +1 -0
  173. package/common/records/index.d.ts.map +1 -1
  174. package/common/records/skill.record.d.ts +55 -0
  175. package/common/records/skill.record.d.ts.map +1 -0
  176. package/common/schemas/annotated-class.schema.d.ts +1 -0
  177. package/common/schemas/annotated-class.schema.d.ts.map +1 -1
  178. package/common/schemas/http-output.schema.d.ts +24 -24
  179. package/common/tokens/app.tokens.d.ts.map +1 -1
  180. package/common/tokens/front-mcp.tokens.d.ts.map +1 -1
  181. package/common/tokens/index.d.ts +1 -0
  182. package/common/tokens/index.d.ts.map +1 -1
  183. package/common/tokens/plugin.tokens.d.ts +1 -0
  184. package/common/tokens/plugin.tokens.d.ts.map +1 -1
  185. package/common/tokens/skill.tokens.d.ts +18 -0
  186. package/common/tokens/skill.tokens.d.ts.map +1 -0
  187. package/common/tokens/tool.tokens.d.ts +2 -0
  188. package/common/tokens/tool.tokens.d.ts.map +1 -1
  189. package/common/types/auth/session.types.d.ts +21 -0
  190. package/common/types/auth/session.types.d.ts.map +1 -1
  191. package/common/types/options/auth/app-auth.schema.d.ts +80 -84
  192. package/common/types/options/auth/app-auth.schema.d.ts.map +1 -1
  193. package/common/types/options/auth/index.d.ts +6 -8
  194. package/common/types/options/auth/index.d.ts.map +1 -1
  195. package/common/types/options/auth/{auth.interfaces.d.ts → interfaces.d.ts} +17 -48
  196. package/common/types/options/auth/interfaces.d.ts.map +1 -0
  197. package/common/types/options/auth/orchestrated.schema.d.ts +160 -84
  198. package/common/types/options/auth/orchestrated.schema.d.ts.map +1 -1
  199. package/common/types/options/auth/public.schema.d.ts +0 -21
  200. package/common/types/options/auth/public.schema.d.ts.map +1 -1
  201. package/common/types/options/auth/{auth.schema.d.ts → schema.d.ts} +81 -85
  202. package/common/types/options/auth/schema.d.ts.map +1 -0
  203. package/common/types/options/auth/shared.schemas.d.ts +12 -0
  204. package/common/types/options/auth/shared.schemas.d.ts.map +1 -1
  205. package/common/types/options/auth/transparent.schema.d.ts +0 -21
  206. package/common/types/options/auth/transparent.schema.d.ts.map +1 -1
  207. package/common/types/options/auth/typecheck.d.ts +2 -0
  208. package/common/types/options/auth/typecheck.d.ts.map +1 -0
  209. package/common/types/options/auth/{auth.utils.d.ts → utils.d.ts} +2 -2
  210. package/common/types/options/auth/utils.d.ts.map +1 -0
  211. package/common/types/options/elicitation/index.d.ts +4 -0
  212. package/common/types/options/elicitation/index.d.ts.map +1 -0
  213. package/common/types/options/elicitation/interfaces.d.ts +80 -0
  214. package/common/types/options/elicitation/interfaces.d.ts.map +1 -0
  215. package/common/types/options/elicitation/schema.d.ts +75 -0
  216. package/common/types/options/elicitation/schema.d.ts.map +1 -0
  217. package/common/types/options/ext-apps/index.d.ts +3 -0
  218. package/common/types/options/ext-apps/index.d.ts.map +1 -0
  219. package/common/types/options/ext-apps/interfaces.d.ts +2 -0
  220. package/common/types/options/ext-apps/interfaces.d.ts.map +1 -0
  221. package/common/types/options/ext-apps/schema.d.ts +80 -0
  222. package/common/types/options/ext-apps/schema.d.ts.map +1 -0
  223. package/common/types/options/http/index.d.ts +4 -0
  224. package/common/types/options/http/index.d.ts.map +1 -0
  225. package/common/types/options/http/interfaces.d.ts +23 -0
  226. package/common/types/options/http/interfaces.d.ts.map +1 -0
  227. package/common/types/options/http/schema.d.ts +18 -0
  228. package/common/types/options/http/schema.d.ts.map +1 -0
  229. package/common/types/options/index.d.ts +10 -6
  230. package/common/types/options/index.d.ts.map +1 -1
  231. package/common/types/options/logging/index.d.ts +5 -0
  232. package/common/types/options/logging/index.d.ts.map +1 -0
  233. package/common/types/options/logging/interfaces.d.ts +41 -0
  234. package/common/types/options/logging/interfaces.d.ts.map +1 -0
  235. package/common/types/options/logging/schema.d.ts +24 -0
  236. package/common/types/options/logging/schema.d.ts.map +1 -0
  237. package/common/types/options/pagination/index.d.ts +4 -0
  238. package/common/types/options/pagination/index.d.ts.map +1 -0
  239. package/common/types/options/pagination/interfaces.d.ts +43 -0
  240. package/common/types/options/pagination/interfaces.d.ts.map +1 -0
  241. package/common/types/options/pagination/schema.d.ts +41 -0
  242. package/common/types/options/pagination/schema.d.ts.map +1 -0
  243. package/common/types/options/redis/index.d.ts +4 -0
  244. package/common/types/options/redis/index.d.ts.map +1 -0
  245. package/common/types/options/redis/interfaces.d.ts +81 -0
  246. package/common/types/options/redis/interfaces.d.ts.map +1 -0
  247. package/common/types/options/{redis.options.d.ts → redis/schema.d.ts} +2 -2
  248. package/common/types/options/redis/schema.d.ts.map +1 -0
  249. package/common/types/options/server-info/index.d.ts +4 -0
  250. package/common/types/options/server-info/index.d.ts.map +1 -0
  251. package/common/types/options/server-info/interfaces.d.ts +27 -0
  252. package/common/types/options/server-info/interfaces.d.ts.map +1 -0
  253. package/common/types/options/{server-info.options.d.ts → server-info/schema.d.ts} +13 -10
  254. package/common/types/options/server-info/schema.d.ts.map +1 -0
  255. package/common/types/options/session/index.d.ts +4 -0
  256. package/common/types/options/session/index.d.ts.map +1 -0
  257. package/common/types/options/session/interfaces.d.ts +66 -0
  258. package/common/types/options/session/interfaces.d.ts.map +1 -0
  259. package/common/types/options/session/schema.d.ts +79 -0
  260. package/common/types/options/session/schema.d.ts.map +1 -0
  261. package/common/types/options/skills-http/index.d.ts +4 -0
  262. package/common/types/options/skills-http/index.d.ts.map +1 -0
  263. package/common/types/options/skills-http/interfaces.d.ts +321 -0
  264. package/common/types/options/skills-http/interfaces.d.ts.map +1 -0
  265. package/common/types/options/skills-http/schema.d.ts +139 -0
  266. package/common/types/options/skills-http/schema.d.ts.map +1 -0
  267. package/common/types/options/transport/index.d.ts +4 -0
  268. package/common/types/options/transport/index.d.ts.map +1 -0
  269. package/common/types/options/transport/interfaces.d.ts +354 -0
  270. package/common/types/options/transport/interfaces.d.ts.map +1 -0
  271. package/common/types/options/transport/schema.d.ts +309 -0
  272. package/common/types/options/transport/schema.d.ts.map +1 -0
  273. package/common/types/options/transport/typecheck.d.ts +2 -0
  274. package/common/types/options/transport/typecheck.d.ts.map +1 -0
  275. package/common/utils/decide-request-intent.utils.d.ts +3 -3
  276. package/common/utils/decide-request-intent.utils.d.ts.map +1 -1
  277. package/context/context-extension.d.ts +1 -28
  278. package/context/context-extension.d.ts.map +1 -1
  279. package/context/frontmcp-context-storage.d.ts.map +1 -1
  280. package/context/frontmcp-context.d.ts +36 -39
  281. package/context/frontmcp-context.d.ts.map +1 -1
  282. package/context/frontmcp-context.provider.d.ts +3 -9
  283. package/context/frontmcp-context.provider.d.ts.map +1 -1
  284. package/context/index.d.ts +5 -20
  285. package/context/index.d.ts.map +1 -1
  286. package/context/metadata.utils.d.ts +24 -0
  287. package/context/metadata.utils.d.ts.map +1 -0
  288. package/direct/client.types.d.ts +447 -0
  289. package/direct/client.types.d.ts.map +1 -0
  290. package/direct/connect.d.ts +188 -0
  291. package/direct/connect.d.ts.map +1 -0
  292. package/direct/direct-client.d.ts +7 -0
  293. package/direct/direct-client.d.ts.map +1 -0
  294. package/direct/direct-server.d.ts +38 -0
  295. package/direct/direct-server.d.ts.map +1 -0
  296. package/direct/direct.types.d.ts +134 -0
  297. package/direct/direct.types.d.ts.map +1 -0
  298. package/direct/index.d.ts +15 -0
  299. package/direct/index.d.ts.map +1 -0
  300. package/direct/llm-platform.d.ts +94 -0
  301. package/direct/llm-platform.d.ts.map +1 -0
  302. package/elicitation/elicitation-fallback.schema.d.ts +32 -0
  303. package/elicitation/elicitation-fallback.schema.d.ts.map +1 -0
  304. package/elicitation/elicitation.types.d.ts +160 -0
  305. package/elicitation/elicitation.types.d.ts.map +1 -0
  306. package/elicitation/flows/elicitation-request.flow.d.ts +98 -0
  307. package/elicitation/flows/elicitation-request.flow.d.ts.map +1 -0
  308. package/elicitation/flows/elicitation-result.flow.d.ts +79 -0
  309. package/elicitation/flows/elicitation-result.flow.d.ts.map +1 -0
  310. package/elicitation/flows/index.d.ts +10 -0
  311. package/elicitation/flows/index.d.ts.map +1 -0
  312. package/elicitation/helpers/elicit.helper.d.ts +65 -0
  313. package/elicitation/helpers/elicit.helper.d.ts.map +1 -0
  314. package/elicitation/helpers/extend-output-schema.d.ts +31 -0
  315. package/elicitation/helpers/extend-output-schema.d.ts.map +1 -0
  316. package/elicitation/helpers/fallback.helper.d.ts +60 -0
  317. package/elicitation/helpers/fallback.helper.d.ts.map +1 -0
  318. package/elicitation/helpers/index.d.ts +12 -0
  319. package/elicitation/helpers/index.d.ts.map +1 -0
  320. package/elicitation/helpers/validate-elicitation-content.d.ts +52 -0
  321. package/elicitation/helpers/validate-elicitation-content.d.ts.map +1 -0
  322. package/elicitation/hooks/elicitation.hooks.d.ts +66 -0
  323. package/elicitation/hooks/elicitation.hooks.d.ts.map +1 -0
  324. package/elicitation/hooks/index.d.ts +9 -0
  325. package/elicitation/hooks/index.d.ts.map +1 -0
  326. package/elicitation/index.d.ts +18 -0
  327. package/elicitation/index.d.ts.map +1 -0
  328. package/elicitation/send-elicitation-result.tool.d.ts +18 -0
  329. package/elicitation/send-elicitation-result.tool.d.ts.map +1 -0
  330. package/elicitation/store/elicitation-encryption.d.ts +134 -0
  331. package/elicitation/store/elicitation-encryption.d.ts.map +1 -0
  332. package/elicitation/store/elicitation-store.factory.d.ts +197 -0
  333. package/elicitation/store/elicitation-store.factory.d.ts.map +1 -0
  334. package/elicitation/store/elicitation.store.d.ts +191 -0
  335. package/elicitation/store/elicitation.store.d.ts.map +1 -0
  336. package/elicitation/store/encrypted-elicitation.store.d.ts +121 -0
  337. package/elicitation/store/encrypted-elicitation.store.d.ts.map +1 -0
  338. package/elicitation/store/index.d.ts +14 -0
  339. package/elicitation/store/index.d.ts.map +1 -0
  340. package/elicitation/store/storage-elicitation.store.d.ts +118 -0
  341. package/elicitation/store/storage-elicitation.store.d.ts.map +1 -0
  342. package/errors/elicitation.error.d.ts +115 -0
  343. package/errors/elicitation.error.d.ts.map +1 -0
  344. package/errors/index.d.ts +1 -0
  345. package/errors/index.d.ts.map +1 -1
  346. package/esm/index.mjs +30824 -19537
  347. package/esm/package.json +13 -7
  348. package/ext-apps/ext-apps.handler.d.ts +177 -0
  349. package/ext-apps/ext-apps.handler.d.ts.map +1 -0
  350. package/ext-apps/ext-apps.types.d.ts +273 -0
  351. package/ext-apps/ext-apps.types.d.ts.map +1 -0
  352. package/ext-apps/index.d.ts +13 -0
  353. package/ext-apps/index.d.ts.map +1 -0
  354. package/flows/flow.instance.d.ts.map +1 -1
  355. package/front-mcp/front-mcp.d.ts +64 -2
  356. package/front-mcp/front-mcp.d.ts.map +1 -1
  357. package/front-mcp/front-mcp.providers.d.ts +604 -236
  358. package/front-mcp/front-mcp.providers.d.ts.map +1 -1
  359. package/index.d.ts +17 -0
  360. package/index.d.ts.map +1 -1
  361. package/index.js +31066 -19707
  362. package/notification/index.d.ts +1 -1
  363. package/notification/index.d.ts.map +1 -1
  364. package/notification/notification.service.d.ts +18 -0
  365. package/notification/notification.service.d.ts.map +1 -1
  366. package/package.json +13 -7
  367. package/plugin/plugin.registry.d.ts +2 -0
  368. package/plugin/plugin.registry.d.ts.map +1 -1
  369. package/provider/provider.registry.d.ts +8 -3
  370. package/provider/provider.registry.d.ts.map +1 -1
  371. package/scope/flows/http.request.flow.d.ts +4 -0
  372. package/scope/flows/http.request.flow.d.ts.map +1 -1
  373. package/scope/scope.instance.d.ts +74 -0
  374. package/scope/scope.instance.d.ts.map +1 -1
  375. package/server/server.instance.d.ts +3 -3
  376. package/server/server.instance.d.ts.map +1 -1
  377. package/skill/auth/index.d.ts +10 -0
  378. package/skill/auth/index.d.ts.map +1 -0
  379. package/skill/auth/skill-http-auth.d.ts +112 -0
  380. package/skill/auth/skill-http-auth.d.ts.map +1 -0
  381. package/skill/cache/index.d.ts +13 -0
  382. package/skill/cache/index.d.ts.map +1 -0
  383. package/skill/cache/skill-http-cache.d.ts +144 -0
  384. package/skill/cache/skill-http-cache.d.ts.map +1 -0
  385. package/skill/cache/skill-http-cache.factory.d.ts +83 -0
  386. package/skill/cache/skill-http-cache.factory.d.ts.map +1 -0
  387. package/skill/cache/skill-http-cache.holder.d.ts +35 -0
  388. package/skill/cache/skill-http-cache.holder.d.ts.map +1 -0
  389. package/skill/errors/index.d.ts +3 -0
  390. package/skill/errors/index.d.ts.map +1 -0
  391. package/skill/errors/skill-validation.error.d.ts +110 -0
  392. package/skill/errors/skill-validation.error.d.ts.map +1 -0
  393. package/skill/errors/tool-not-allowed.error.d.ts +66 -0
  394. package/skill/errors/tool-not-allowed.error.d.ts.map +1 -0
  395. package/skill/flows/http/index.d.ts +12 -0
  396. package/skill/flows/http/index.d.ts.map +1 -0
  397. package/skill/flows/http/llm-full-txt.flow.d.ts +70 -0
  398. package/skill/flows/http/llm-full-txt.flow.d.ts.map +1 -0
  399. package/skill/flows/http/llm-txt.flow.d.ts +77 -0
  400. package/skill/flows/http/llm-txt.flow.d.ts.map +1 -0
  401. package/skill/flows/http/skills-api.flow.d.ts +81 -0
  402. package/skill/flows/http/skills-api.flow.d.ts.map +1 -0
  403. package/skill/flows/index.d.ts +13 -0
  404. package/skill/flows/index.d.ts.map +1 -0
  405. package/skill/flows/load-skill.flow.d.ts +169 -0
  406. package/skill/flows/load-skill.flow.d.ts.map +1 -0
  407. package/skill/flows/search-skills.flow.d.ts +101 -0
  408. package/skill/flows/search-skills.flow.d.ts.map +1 -0
  409. package/skill/guards/index.d.ts +2 -0
  410. package/skill/guards/index.d.ts.map +1 -0
  411. package/skill/guards/tool-authorization.guard.d.ts +87 -0
  412. package/skill/guards/tool-authorization.guard.d.ts.map +1 -0
  413. package/skill/hooks/index.d.ts +2 -0
  414. package/skill/hooks/index.d.ts.map +1 -0
  415. package/skill/hooks/skill-tool.hook.d.ts +52 -0
  416. package/skill/hooks/skill-tool.hook.d.ts.map +1 -0
  417. package/skill/index.d.ts +74 -0
  418. package/skill/index.d.ts.map +1 -0
  419. package/skill/providers/external-skill.provider.d.ts +240 -0
  420. package/skill/providers/external-skill.provider.d.ts.map +1 -0
  421. package/skill/providers/index.d.ts +12 -0
  422. package/skill/providers/index.d.ts.map +1 -0
  423. package/skill/providers/memory-skill.provider.d.ts +97 -0
  424. package/skill/providers/memory-skill.provider.d.ts.map +1 -0
  425. package/skill/session/index.d.ts +4 -0
  426. package/skill/session/index.d.ts.map +1 -0
  427. package/skill/session/skill-session-store.interface.d.ts +79 -0
  428. package/skill/session/skill-session-store.interface.d.ts.map +1 -0
  429. package/skill/session/skill-session.manager.d.ts +137 -0
  430. package/skill/session/skill-session.manager.d.ts.map +1 -0
  431. package/skill/session/skill-session.types.d.ts +303 -0
  432. package/skill/session/skill-session.types.d.ts.map +1 -0
  433. package/skill/skill-http.utils.d.ts +107 -0
  434. package/skill/skill-http.utils.d.ts.map +1 -0
  435. package/skill/skill-mode.utils.d.ts +53 -0
  436. package/skill/skill-mode.utils.d.ts.map +1 -0
  437. package/skill/skill-scope.helper.d.ts +55 -0
  438. package/skill/skill-scope.helper.d.ts.map +1 -0
  439. package/skill/skill-storage.factory.d.ts +194 -0
  440. package/skill/skill-storage.factory.d.ts.map +1 -0
  441. package/skill/skill-storage.interface.d.ts +230 -0
  442. package/skill/skill-storage.interface.d.ts.map +1 -0
  443. package/skill/skill-validator.d.ts +63 -0
  444. package/skill/skill-validator.d.ts.map +1 -0
  445. package/skill/skill.events.d.ts +88 -0
  446. package/skill/skill.events.d.ts.map +1 -0
  447. package/skill/skill.instance.d.ts +92 -0
  448. package/skill/skill.instance.d.ts.map +1 -0
  449. package/skill/skill.registry.d.ts +309 -0
  450. package/skill/skill.registry.d.ts.map +1 -0
  451. package/skill/skill.utils.d.ts +90 -0
  452. package/skill/skill.utils.d.ts.map +1 -0
  453. package/skill/sync/index.d.ts +16 -0
  454. package/skill/sync/index.d.ts.map +1 -0
  455. package/skill/sync/memory-sync-state.store.d.ts +49 -0
  456. package/skill/sync/memory-sync-state.store.d.ts.map +1 -0
  457. package/skill/sync/skill-hash.d.ts +65 -0
  458. package/skill/sync/skill-hash.d.ts.map +1 -0
  459. package/skill/sync/sync-state.interface.d.ts +125 -0
  460. package/skill/sync/sync-state.interface.d.ts.map +1 -0
  461. package/skill/tools/index.d.ts +21 -0
  462. package/skill/tools/index.d.ts.map +1 -0
  463. package/skill/tools/load-skills.tool.d.ts +76 -0
  464. package/skill/tools/load-skills.tool.d.ts.map +1 -0
  465. package/skill/tools/search-skills.tool.d.ts +61 -0
  466. package/skill/tools/search-skills.tool.d.ts.map +1 -0
  467. package/tool/flows/call-tool.flow.d.ts +1 -0
  468. package/tool/flows/call-tool.flow.d.ts.map +1 -1
  469. package/tool/flows/tools-list.flow.d.ts +15 -0
  470. package/tool/flows/tools-list.flow.d.ts.map +1 -1
  471. package/tool/tool.instance.d.ts +8 -0
  472. package/tool/tool.instance.d.ts.map +1 -1
  473. package/tool/tool.registry.d.ts +11 -0
  474. package/tool/tool.registry.d.ts.map +1 -1
  475. package/tool/tool.utils.d.ts.map +1 -1
  476. package/tool/ui/template-helpers.d.ts +0 -5
  477. package/tool/ui/template-helpers.d.ts.map +1 -1
  478. package/transport/adapters/streamable-http-transport.d.ts.map +1 -1
  479. package/transport/adapters/transport.local.adapter.d.ts +54 -9
  480. package/transport/adapters/transport.local.adapter.d.ts.map +1 -1
  481. package/transport/adapters/transport.sse.adapter.d.ts +11 -2
  482. package/transport/adapters/transport.sse.adapter.d.ts.map +1 -1
  483. package/transport/adapters/transport.streamable-http.adapter.d.ts +21 -2
  484. package/transport/adapters/transport.streamable-http.adapter.d.ts.map +1 -1
  485. package/transport/event-stores/event-store.factory.d.ts +96 -0
  486. package/transport/event-stores/event-store.factory.d.ts.map +1 -0
  487. package/transport/event-stores/index.d.ts +47 -0
  488. package/transport/event-stores/index.d.ts.map +1 -0
  489. package/transport/event-stores/memory.event-store.d.ts +51 -0
  490. package/transport/event-stores/memory.event-store.d.ts.map +1 -0
  491. package/transport/event-stores/redis.event-store.d.ts +79 -0
  492. package/transport/event-stores/redis.event-store.d.ts.map +1 -0
  493. package/transport/flows/handle.sse.flow.d.ts.map +1 -1
  494. package/transport/flows/handle.streamable-http.flow.d.ts +3 -1
  495. package/transport/flows/handle.streamable-http.flow.d.ts.map +1 -1
  496. package/transport/in-memory-server.d.ts +85 -0
  497. package/transport/in-memory-server.d.ts.map +1 -0
  498. package/transport/index.d.ts +47 -0
  499. package/transport/index.d.ts.map +1 -1
  500. package/transport/mcp-handlers/complete-request.handler.d.ts +3 -84
  501. package/transport/mcp-handlers/complete-request.handler.d.ts.map +1 -1
  502. package/transport/mcp-handlers/get-prompt-request.handler.d.ts +3 -128
  503. package/transport/mcp-handlers/get-prompt-request.handler.d.ts.map +1 -1
  504. package/transport/mcp-handlers/index.d.ts +463 -490
  505. package/transport/mcp-handlers/index.d.ts.map +1 -1
  506. package/transport/mcp-handlers/initialize-request.handler.d.ts.map +1 -1
  507. package/transport/mcp-handlers/list-prompts-request.handler.d.ts +3 -70
  508. package/transport/mcp-handlers/list-prompts-request.handler.d.ts.map +1 -1
  509. package/transport/mcp-handlers/list-resource-templates-request.handler.d.ts +3 -72
  510. package/transport/mcp-handlers/list-resource-templates-request.handler.d.ts.map +1 -1
  511. package/transport/mcp-handlers/list-resources-request.handler.d.ts +3 -72
  512. package/transport/mcp-handlers/list-resources-request.handler.d.ts.map +1 -1
  513. package/transport/mcp-handlers/list-tools-request.handler.d.ts +3 -85
  514. package/transport/mcp-handlers/list-tools-request.handler.d.ts.map +1 -1
  515. package/transport/mcp-handlers/read-resource-request.handler.d.ts +3 -61
  516. package/transport/mcp-handlers/read-resource-request.handler.d.ts.map +1 -1
  517. package/transport/mcp-handlers/skills-list-request.handler.d.ts +9 -0
  518. package/transport/mcp-handlers/skills-list-request.handler.d.ts.map +1 -0
  519. package/transport/mcp-handlers/skills-load-request.handler.d.ts +9 -0
  520. package/transport/mcp-handlers/skills-load-request.handler.d.ts.map +1 -0
  521. package/transport/mcp-handlers/skills-mcp.types.d.ts +157 -0
  522. package/transport/mcp-handlers/skills-mcp.types.d.ts.map +1 -0
  523. package/transport/mcp-handlers/skills-search-request.handler.d.ts +9 -0
  524. package/transport/mcp-handlers/skills-search-request.handler.d.ts.map +1 -0
  525. package/transport/transport.registry.d.ts +9 -1
  526. package/transport/transport.registry.d.ts.map +1 -1
  527. package/transport/transport.types.d.ts +1 -8
  528. package/transport/transport.types.d.ts.map +1 -1
  529. package/auth/jwks/dev-key-persistence.d.ts +0 -64
  530. package/auth/jwks/dev-key-persistence.d.ts.map +0 -1
  531. package/auth/jwks/index.d.ts +0 -4
  532. package/auth/jwks/index.d.ts.map +0 -1
  533. package/auth/jwks/jwks.service.d.ts +0 -58
  534. package/auth/jwks/jwks.service.d.ts.map +0 -1
  535. package/auth/jwks/jwks.types.d.ts +0 -33
  536. package/auth/jwks/jwks.types.d.ts.map +0 -1
  537. package/auth/jwks/jwks.utils.d.ts +0 -5
  538. package/auth/jwks/jwks.utils.d.ts.map +0 -1
  539. package/auth/oauth/flows/oauth.authorize.flow.d.ts +0 -32
  540. package/auth/oauth/flows/oauth.authorize.flow.d.ts.map +0 -1
  541. package/auth/oauth/flows/oauth.device-authorization.flow.d.ts +0 -47
  542. package/auth/oauth/flows/oauth.device-authorization.flow.d.ts.map +0 -1
  543. package/auth/oauth/flows/oauth.introspect.flow.d.ts +0 -27
  544. package/auth/oauth/flows/oauth.introspect.flow.d.ts.map +0 -1
  545. package/auth/oauth/flows/oauth.par.flow.d.ts +0 -28
  546. package/auth/oauth/flows/oauth.par.flow.d.ts.map +0 -1
  547. package/auth/oauth/flows/oauth.revoke.flow.d.ts +0 -26
  548. package/auth/oauth/flows/oauth.revoke.flow.d.ts.map +0 -1
  549. package/auth/oauth/flows/oauth.token.flow.d.ts +0 -58
  550. package/auth/oauth/flows/oauth.token.flow.d.ts.map +0 -1
  551. package/auth/oauth/flows/oauth.userinfo.flow.d.ts +0 -23
  552. package/auth/oauth/flows/oauth.userinfo.flow.d.ts.map +0 -1
  553. package/auth/oauth/flows/oidc.logout.flow.d.ts +0 -19
  554. package/auth/oauth/flows/oidc.logout.flow.d.ts.map +0 -1
  555. package/auth/session/authorization-vault.d.ts +0 -612
  556. package/auth/session/authorization-vault.d.ts.map +0 -1
  557. package/auth/session/authorization.store.d.ts +0 -302
  558. package/auth/session/authorization.store.d.ts.map +0 -1
  559. package/auth/session/record/session.stateful.d.ts +0 -21
  560. package/auth/session/record/session.stateful.d.ts.map +0 -1
  561. package/auth/session/record/session.stateless.d.ts +0 -18
  562. package/auth/session/record/session.stateless.d.ts.map +0 -1
  563. package/auth/session/record/session.transparent.d.ts +0 -18
  564. package/auth/session/record/session.transparent.d.ts.map +0 -1
  565. package/auth/session/session.crypto.d.ts +0 -8
  566. package/auth/session/session.crypto.d.ts.map +0 -1
  567. package/auth/session/session.schema.d.ts +0 -6
  568. package/auth/session/session.schema.d.ts.map +0 -1
  569. package/auth/session/token.store.d.ts +0 -36
  570. package/auth/session/token.store.d.ts.map +0 -1
  571. package/auth/session/token.vault.d.ts +0 -27
  572. package/auth/session/token.vault.d.ts.map +0 -1
  573. package/auth/session/vault-encryption.d.ts +0 -190
  574. package/auth/session/vault-encryption.d.ts.map +0 -1
  575. package/auth/utils/audience.validator.d.ts +0 -130
  576. package/auth/utils/audience.validator.d.ts.map +0 -1
  577. package/auth/utils/www-authenticate.utils.d.ts +0 -98
  578. package/auth/utils/www-authenticate.utils.d.ts.map +0 -1
  579. package/common/migrate/auth-transport.migrate.d.ts +0 -63
  580. package/common/migrate/auth-transport.migrate.d.ts.map +0 -1
  581. package/common/migrate/index.d.ts +0 -2
  582. package/common/migrate/index.d.ts.map +0 -1
  583. package/common/types/options/auth/auth.interfaces.d.ts.map +0 -1
  584. package/common/types/options/auth/auth.schema.d.ts.map +0 -1
  585. package/common/types/options/auth/auth.typecheck.d.ts +0 -2
  586. package/common/types/options/auth/auth.typecheck.d.ts.map +0 -1
  587. package/common/types/options/auth/auth.utils.d.ts.map +0 -1
  588. package/common/types/options/auth/transport.deprecated.d.ts +0 -64
  589. package/common/types/options/auth/transport.deprecated.d.ts.map +0 -1
  590. package/common/types/options/http.options.d.ts +0 -15
  591. package/common/types/options/http.options.d.ts.map +0 -1
  592. package/common/types/options/logging.options.d.ts +0 -29
  593. package/common/types/options/logging.options.d.ts.map +0 -1
  594. package/common/types/options/redis.options.d.ts.map +0 -1
  595. package/common/types/options/server-info.options.d.ts.map +0 -1
  596. package/common/types/options/session.options.d.ts +0 -148
  597. package/common/types/options/session.options.d.ts.map +0 -1
  598. package/common/types/options/transport.options.d.ts +0 -178
  599. package/common/types/options/transport.options.d.ts.map +0 -1
  600. package/context/request-context-storage.d.ts +0 -90
  601. package/context/request-context-storage.d.ts.map +0 -1
  602. package/context/request-context.d.ts +0 -185
  603. package/context/request-context.d.ts.map +0 -1
  604. package/context/request-context.provider.d.ts +0 -38
  605. package/context/request-context.provider.d.ts.map +0 -1
  606. package/context/session-key.provider.d.ts +0 -46
  607. package/context/session-key.provider.d.ts.map +0 -1
  608. package/store/adapters/store.base.adapter.d.ts +0 -22
  609. package/store/adapters/store.base.adapter.d.ts.map +0 -1
  610. package/store/adapters/store.memory.adapter.d.ts +0 -27
  611. package/store/adapters/store.memory.adapter.d.ts.map +0 -1
  612. package/store/adapters/store.redis.adapter.d.ts +0 -34
  613. package/store/adapters/store.redis.adapter.d.ts.map +0 -1
  614. package/store/adapters/store.vercel-kv.adapter.d.ts +0 -87
  615. package/store/adapters/store.vercel-kv.adapter.d.ts.map +0 -1
  616. package/store/index.d.ts +0 -11
  617. package/store/index.d.ts.map +0 -1
  618. package/store/store.factory.d.ts.map +0 -1
  619. package/store/store.helpers.d.ts +0 -10
  620. package/store/store.helpers.d.ts.map +0 -1
  621. package/store/store.registry.d.ts +0 -14
  622. package/store/store.registry.d.ts.map +0 -1
  623. package/store/store.tokens.d.ts +0 -4
  624. package/store/store.tokens.d.ts.map +0 -1
  625. package/store/store.types.d.ts +0 -65
  626. package/store/store.types.d.ts.map +0 -1
  627. package/store/store.utils.d.ts +0 -9
  628. package/store/store.utils.d.ts.map +0 -1
  629. package/transport/transport.event-store.d.ts +0 -11
  630. package/transport/transport.event-store.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"redis.options.d.ts","sourceRoot":"","sources":["../../../../src/common/types/options/redis.options.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;EAAiC,CAAC;AACpE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAyDpE;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;iBASH,CAAC;AAE9B,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAMvE;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;iBAmBN,CAAC;AAE9B,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAmB7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA4E,CAAC;AAE5G;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAMnE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAoD,CAAC;AAErF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAMrE;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,IAAI,oBAAoB,CAEtF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,IAAI,uBAAuB,CAE5F;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,IAAI,oBAAoB,CAE1F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"server-info.options.d.ts","sourceRoot":"","sources":["../../../../src/common/types/options/server-info.options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,MAAM,iBAAiB,GAAG;IAE9B,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;CAChB,CAAA;AAGD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;iBAMO,CAAC"}
@@ -1,148 +0,0 @@
1
- import { z } from 'zod';
2
- import { AIPlatformType } from '../auth/session.types';
3
- export type SessionMode = 'stateful' | 'stateless';
4
- export type TransportIdMode = 'uuid' | 'jwt';
5
- /**
6
- * A single platform mapping entry for custom client-to-platform detection.
7
- */
8
- export interface PlatformMappingEntry {
9
- /** Pattern to match against clientInfo.name (string for exact match, RegExp for pattern) */
10
- pattern: string | RegExp;
11
- /** The platform type to assign when pattern matches */
12
- platform: AIPlatformType;
13
- }
14
- /**
15
- * Configuration for platform detection from MCP client info.
16
- */
17
- export interface PlatformDetectionConfig {
18
- /**
19
- * Custom mappings to check before default detection.
20
- * Mappings are evaluated in order; first match wins.
21
- */
22
- mappings?: PlatformMappingEntry[];
23
- /**
24
- * If true, skip default detection when no custom mapping matches.
25
- * The platform will be 'unknown' instead of attempting keyword-based detection.
26
- * @default false
27
- */
28
- customOnly?: boolean;
29
- }
30
- export type SessionOptions = {
31
- /**
32
- * Defines how the session lifecycle and nested tokens are managed.
33
- *
34
- * Modes:
35
- * - `'stateful'`: Session and nested tokens are stored in a server-side store (e.g., Redis).
36
- * - `'stateless'`: All session data (including nested tokens) is embedded within a signed/encrypted JWT.
37
- *
38
- * **Behavior:**
39
- * - When using `'stateful'`:
40
- * - Nested OAuth tokens are **never exposed** in the JWT.
41
- * - Tokens are encrypted and persisted in Redis under a session key.
42
- * - The client receives only a lightweight reference (session key) instead of full credentials.
43
- * - Results in smaller JWT payloads and reduces token leakage risk.
44
- * - Allows seamless refresh of nested provider tokens without requiring user re-authorization.
45
- * - Recommended for multi-application environments or setups using short-lived OAuth tokens.
46
- *
47
- * - When using `'stateless'`:
48
- * - Stores all nested tokens directly within the JWT, enabling fully client-managed sessions.
49
- * - Does **not support token refresh** — once a nested provider token expires, re-authorization is required.
50
- * - Simplifies implementation but may degrade UX when tokens are short-lived.
51
- * - Best suited for lightweight or single-application environments where token rotation is less critical.
52
- *
53
- * @default 'stateful'
54
- */
55
- sessionMode?: SessionMode | ((issuer: string) => Promise<SessionMode> | SessionMode);
56
- /**
57
- * Defines how the Transport ID is generated, verified, and used across sessions.
58
- *
59
- * Modes:
60
- * - `'uuid'`: Generates a random UUID per session.
61
- * - `'jwt'`: Uses a signed JWT for stateless sessions, signed with a generated session key.
62
- *
63
- * **Behavior: **
64
- * - When using `'jwt'`:
65
- * - Requires an active Redis connection to support distributed, stateless transport sessions.
66
- * - Each token is verified using a generated public key associated with the existing session.
67
- * - Enables access to a streamable HTTP transport session ID.
68
- * - For distributed systems, verification is optimized by checking if the session is already
69
- * verified by an existing live transport ID. This allows fast validation when multiple
70
- * transports are connected to a shared queue (high-availability setup).
71
- * - If the JWT's transport ID is not found on the current worker node, the system attempts
72
- * to connect to the corresponding remote transport in the distributed infrastructure.
73
- *
74
- * - When using `'uuid'`:
75
- * - Provides a strict, node-bound session transport (single-node mode).
76
- * - Each request verifies the `Authorization` header and searches for a matching transport ID
77
- * derived from the hashed authorization header and the generated transport UUID.
78
- * - If no matching transport ID is found, an error (`TransportNotInitialized`) is thrown.
79
- *
80
- * @default 'uuid'
81
- */
82
- transportIdMode?: TransportIdMode | ((issuer: string) => Promise<TransportIdMode> | TransportIdMode);
83
- /**
84
- * Configuration for detecting the AI platform from MCP client info.
85
- * Allows custom mappings to override or supplement the default keyword-based detection.
86
- */
87
- platformDetection?: PlatformDetectionConfig;
88
- };
89
- /**
90
- * Zod schema for platform mapping entry.
91
- * Note: RegExp cannot be validated by zod, so we use passthrough for pattern.
92
- */
93
- export declare const platformMappingEntrySchema: z.ZodObject<{
94
- pattern: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>]>;
95
- platform: z.ZodEnum<{
96
- unknown: "unknown";
97
- continue: "continue";
98
- openai: "openai";
99
- claude: "claude";
100
- gemini: "gemini";
101
- cursor: "cursor";
102
- cody: "cody";
103
- "generic-mcp": "generic-mcp";
104
- "ext-apps": "ext-apps";
105
- }>;
106
- }, z.core.$strip>;
107
- /**
108
- * Zod schema for platform detection configuration.
109
- */
110
- export declare const platformDetectionConfigSchema: z.ZodObject<{
111
- mappings: z.ZodOptional<z.ZodArray<z.ZodObject<{
112
- pattern: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>]>;
113
- platform: z.ZodEnum<{
114
- unknown: "unknown";
115
- continue: "continue";
116
- openai: "openai";
117
- claude: "claude";
118
- gemini: "gemini";
119
- cursor: "cursor";
120
- cody: "cody";
121
- "generic-mcp": "generic-mcp";
122
- "ext-apps": "ext-apps";
123
- }>;
124
- }, z.core.$strip>>>;
125
- customOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
126
- }, z.core.$strip>;
127
- export declare const sessionOptionsSchema: z.ZodObject<{
128
- sessionMode: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"stateful">, z.ZodLiteral<"stateless">, z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>]>>>;
129
- transportIdMode: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"uuid">, z.ZodLiteral<"jwt">, z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>]>>>;
130
- platformDetection: z.ZodOptional<z.ZodObject<{
131
- mappings: z.ZodOptional<z.ZodArray<z.ZodObject<{
132
- pattern: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>]>;
133
- platform: z.ZodEnum<{
134
- unknown: "unknown";
135
- continue: "continue";
136
- openai: "openai";
137
- claude: "claude";
138
- gemini: "gemini";
139
- cursor: "cursor";
140
- cody: "cody";
141
- "generic-mcp": "generic-mcp";
142
- "ext-apps": "ext-apps";
143
- }>;
144
- }, z.core.$strip>>>;
145
- customOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
146
- }, z.core.$strip>>;
147
- }, z.core.$strip>;
148
- //# sourceMappingURL=session.options.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"session.options.d.ts","sourceRoot":"","sources":["../../../../src/common/types/options/session.options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAwB,MAAM,uBAAuB,CAAC;AAE7E,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,WAAW,CAAC;AACnD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,KAAK,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,4FAA4F;IAC5F,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,uDAAuD;IACvD,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAClC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC,CAAC;IACrF;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,eAAe,CAAC,EAAE,eAAe,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC,CAAC;IAErG;;;OAGG;IACH,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;CAC7C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;iBAGrC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;iBAGxC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;iBAUO,CAAC"}
@@ -1,178 +0,0 @@
1
- import { z } from 'zod';
2
- import { SessionMode, TransportIdMode, PlatformMappingEntry, PlatformDetectionConfig, platformDetectionConfigSchema } from './session.options';
3
- export type { SessionMode, TransportIdMode, PlatformMappingEntry, PlatformDetectionConfig };
4
- /**
5
- * Transport persistence configuration
6
- * Enables session persistence to Redis/Vercel KV and automatic transport recreation after server restart.
7
- *
8
- * **Auto-enable behavior**: When top-level `redis` is configured at the `@FrontMcp` level,
9
- * transport persistence is automatically enabled using that configuration.
10
- * - To disable: explicitly set `enabled: false`
11
- * - To use different redis config: explicitly set `redis: {...}`
12
- */
13
- export declare const transportPersistenceConfigSchema: z.ZodObject<{
14
- enabled: z.ZodDefault<z.ZodBoolean>;
15
- redis: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
16
- provider: z.ZodLiteral<"redis">;
17
- host: z.ZodString;
18
- port: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
19
- password: z.ZodOptional<z.ZodString>;
20
- db: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
21
- tls: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22
- keyPrefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
23
- defaultTtlMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
24
- }, z.core.$strip>, z.ZodObject<{
25
- provider: z.ZodLiteral<"vercel-kv">;
26
- url: z.ZodOptional<z.ZodString>;
27
- token: z.ZodOptional<z.ZodString>;
28
- keyPrefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
29
- defaultTtlMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
30
- }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
31
- host: z.ZodString;
32
- port: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
33
- password: z.ZodOptional<z.ZodString>;
34
- db: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
35
- tls: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
36
- keyPrefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
37
- defaultTtlMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
38
- }, z.core.$strip>, z.ZodTransform<{
39
- provider: "redis";
40
- host: string;
41
- port: number;
42
- db: number;
43
- tls: boolean;
44
- keyPrefix: string;
45
- defaultTtlMs: number;
46
- password?: string | undefined;
47
- }, {
48
- host: string;
49
- port: number;
50
- db: number;
51
- tls: boolean;
52
- keyPrefix: string;
53
- defaultTtlMs: number;
54
- password?: string | undefined;
55
- }>>]>>;
56
- defaultTtlMs: z.ZodDefault<z.ZodNumber>;
57
- }, z.core.$strip>;
58
- /**
59
- * Transport options schema
60
- * Consolidates transport protocol config + session lifecycle config
61
- */
62
- export declare const transportOptionsSchema: z.ZodObject<{
63
- sessionMode: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"stateful">, z.ZodLiteral<"stateless">, z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>]>>>;
64
- transportIdMode: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"uuid">, z.ZodLiteral<"jwt">, z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>]>>>;
65
- platformDetection: z.ZodOptional<z.ZodObject<{
66
- mappings: z.ZodOptional<z.ZodArray<z.ZodObject<{
67
- pattern: z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>]>;
68
- platform: z.ZodEnum<{
69
- unknown: "unknown";
70
- continue: "continue";
71
- openai: "openai";
72
- claude: "claude";
73
- gemini: "gemini";
74
- cursor: "cursor";
75
- cody: "cody";
76
- "generic-mcp": "generic-mcp";
77
- "ext-apps": "ext-apps";
78
- }>;
79
- }, z.core.$strip>>>;
80
- customOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
81
- }, z.core.$strip>>;
82
- enableLegacySSE: z.ZodDefault<z.ZodBoolean>;
83
- enableSseListener: z.ZodDefault<z.ZodBoolean>;
84
- enableStreamableHttp: z.ZodDefault<z.ZodBoolean>;
85
- enableStatelessHttp: z.ZodDefault<z.ZodBoolean>;
86
- enableStatefulHttp: z.ZodDefault<z.ZodBoolean>;
87
- requireSessionForStreamable: z.ZodDefault<z.ZodBoolean>;
88
- persistence: z.ZodOptional<z.ZodObject<{
89
- enabled: z.ZodDefault<z.ZodBoolean>;
90
- redis: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
91
- provider: z.ZodLiteral<"redis">;
92
- host: z.ZodString;
93
- port: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
94
- password: z.ZodOptional<z.ZodString>;
95
- db: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
96
- tls: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
97
- keyPrefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
98
- defaultTtlMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
99
- }, z.core.$strip>, z.ZodObject<{
100
- provider: z.ZodLiteral<"vercel-kv">;
101
- url: z.ZodOptional<z.ZodString>;
102
- token: z.ZodOptional<z.ZodString>;
103
- keyPrefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
104
- defaultTtlMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
105
- }, z.core.$strip>, z.ZodPipe<z.ZodObject<{
106
- host: z.ZodString;
107
- port: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
108
- password: z.ZodOptional<z.ZodString>;
109
- db: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
110
- tls: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
111
- keyPrefix: z.ZodDefault<z.ZodOptional<z.ZodString>>;
112
- defaultTtlMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
113
- }, z.core.$strip>, z.ZodTransform<{
114
- provider: "redis";
115
- host: string;
116
- port: number;
117
- db: number;
118
- tls: boolean;
119
- keyPrefix: string;
120
- defaultTtlMs: number;
121
- password?: string | undefined;
122
- }, {
123
- host: string;
124
- port: number;
125
- db: number;
126
- tls: boolean;
127
- keyPrefix: string;
128
- defaultTtlMs: number;
129
- password?: string | undefined;
130
- }>>]>>;
131
- defaultTtlMs: z.ZodDefault<z.ZodNumber>;
132
- }, z.core.$strip>>;
133
- distributed: z.ZodOptional<z.ZodObject<{
134
- enabled: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"auto">]>>;
135
- providerCaching: z.ZodOptional<z.ZodBoolean>;
136
- }, z.core.$strip>>;
137
- }, z.core.$strip>;
138
- /**
139
- * Transport options type (with defaults applied)
140
- */
141
- export type TransportOptions = z.infer<typeof transportOptionsSchema>;
142
- /**
143
- * Transport options input type (for user configuration)
144
- */
145
- export type TransportOptionsInput = z.input<typeof transportOptionsSchema>;
146
- /**
147
- * Transport persistence configuration type
148
- */
149
- export type TransportPersistenceConfig = z.infer<typeof transportPersistenceConfigSchema>;
150
- /**
151
- * Transport persistence configuration input type
152
- */
153
- export type TransportPersistenceConfigInput = z.input<typeof transportPersistenceConfigSchema>;
154
- /**
155
- * Platform detection configuration type
156
- */
157
- export type PlatformDetectionConfigType = z.infer<typeof platformDetectionConfigSchema>;
158
- /**
159
- * Distributed mode configuration type (with defaults applied)
160
- */
161
- export type DistributedConfig = NonNullable<TransportOptions['distributed']>;
162
- /**
163
- * Distributed mode configuration input type (for user configuration)
164
- */
165
- export type DistributedConfigInput = {
166
- enabled?: boolean | 'auto';
167
- providerCaching?: boolean;
168
- };
169
- /**
170
- * Check if distributed mode is enabled based on configuration.
171
- * Handles 'auto' detection for serverless environments.
172
- */
173
- export declare function isDistributedMode(config?: DistributedConfigInput): boolean;
174
- /**
175
- * Get effective provider caching setting based on distributed config.
176
- */
177
- export declare function shouldCacheProviders(config?: DistributedConfigInput): boolean;
178
- //# sourceMappingURL=transport.options.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transport.options.d.ts","sourceRoot":"","sources":["../../../../src/common/types/options/transport.options.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EAEvB,6BAA6B,EAC9B,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,CAAC;AAM5F;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyB3C,CAAC;AAMH;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiJjC,CAAC;AAMH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE/F;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAExF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,WAAW,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAyB1E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAU7E"}
@@ -1,90 +0,0 @@
1
- /**
2
- * RequestContextStorage - AsyncLocalStorage wrapper for request-scoped context
3
- *
4
- * Provides concurrent-safe request context propagation using Node.js AsyncLocalStorage.
5
- * Access through DI only - never use static imports to access the storage directly.
6
- *
7
- * @example
8
- * ```typescript
9
- * // In a flow or middleware
10
- * const storage = this.get(RequestContextStorage);
11
- * await storage.runFromHeaders(request.headers, {
12
- * sessionId: sessionId,
13
- * authInfo: authInfo,
14
- * scopeId: scope.id,
15
- * }, async () => {
16
- * // All code here can access the context via DI
17
- * const ctx = this.get(REQUEST_CONTEXT);
18
- * });
19
- * ```
20
- */
21
- import { RequestContext, RequestContextArgs } from './request-context';
22
- /**
23
- * RequestContextStorage provides request-scoped context via AsyncLocalStorage.
24
- *
25
- * This is a GLOBAL-scoped provider because it manages the storage itself,
26
- * not the per-request data. The actual RequestContext is accessed via
27
- * the REQUEST_CONTEXT token which is REQUEST-scoped.
28
- */
29
- export declare class RequestContextStorage {
30
- /**
31
- * Run a callback with a new RequestContext.
32
- *
33
- * @param args - Arguments to create the context
34
- * @param fn - Async function to run with the context
35
- * @returns Result of the callback
36
- */
37
- run<T>(args: RequestContextArgs, fn: () => T | Promise<T>): T | Promise<T>;
38
- /**
39
- * Run with context extracted from HTTP headers.
40
- *
41
- * Automatically parses trace context from headers using W3C Trace Context
42
- * specification with fallback to x-frontmcp-trace-id.
43
- *
44
- * @param headers - HTTP headers
45
- * @param args - Additional context args (sessionId, authInfo, scopeId)
46
- * @param fn - Async function to run
47
- * @returns Result of the callback
48
- */
49
- runFromHeaders<T>(headers: Record<string, unknown>, args: Omit<RequestContextArgs, 'traceContext' | 'metadata'>, fn: () => T | Promise<T>): T | Promise<T>;
50
- /**
51
- * Run with an existing RequestContext.
52
- *
53
- * Useful when you need to propagate an existing context to a new async scope.
54
- *
55
- * @param context - Existing RequestContext
56
- * @param fn - Async function to run
57
- * @returns Result of the callback
58
- */
59
- runWithContext<T>(context: RequestContext, fn: () => T | Promise<T>): T | Promise<T>;
60
- /**
61
- * Get the current RequestContext.
62
- *
63
- * @returns Current context or undefined if not in a request scope
64
- */
65
- getStore(): RequestContext | undefined;
66
- /**
67
- * Get the current RequestContext, throwing if not available.
68
- *
69
- * @throws Error if not in a request scope
70
- */
71
- getStoreOrThrow(): RequestContext;
72
- /**
73
- * Check if currently running within a request context.
74
- *
75
- * @returns True if a RequestContext is available
76
- */
77
- hasContext(): boolean;
78
- /**
79
- * Update the authInfo in the current context.
80
- *
81
- * This mutates the existing context in place to preserve internal state
82
- * (marks, store, sessionMetadata) while updating auth info.
83
- *
84
- * @param authInfo - Auth info fields to set/update (merged with existing)
85
- * @param fn - Function to run after update
86
- * @returns Result of the callback
87
- */
88
- updateAuthInfo<T>(authInfo: RequestContextArgs['authInfo'], fn: () => T | Promise<T>): T | Promise<T>;
89
- }
90
- //# sourceMappingURL=request-context-storage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"request-context-storage.d.ts","sourceRoot":"","sources":["../../src/context/request-context-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAmB,MAAM,mBAAmB,CAAC;AAWxF;;;;;;GAMG;AACH,qBAKa,qBAAqB;IAChC;;;;;;OAMG;IACH,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAK1E;;;;;;;;;;OAUG;IACH,cAAc,CAAC,CAAC,EACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,IAAI,EAAE,IAAI,CAAC,kBAAkB,EAAE,cAAc,GAAG,UAAU,CAAC,EAC3D,EAAE,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GACvB,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAWjB;;;;;;;;OAQG;IACH,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAIpF;;;;OAIG;IACH,QAAQ,IAAI,cAAc,GAAG,SAAS;IAItC;;;;OAIG;IACH,eAAe,IAAI,cAAc;IAQjC;;;;OAIG;IACH,UAAU,IAAI,OAAO;IAIrB;;;;;;;;;OASG;IACH,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,kBAAkB,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAMtG"}
@@ -1,185 +0,0 @@
1
- /**
2
- * RequestContext - Production-ready request context for FrontMCP
3
- *
4
- * Provides request-scoped state that flows through the entire async execution
5
- * chain via AsyncLocalStorage. Access via DI only using the REQUEST_CONTEXT token.
6
- */
7
- import { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
8
- import { FrontMcpLogger } from '../common/interfaces/logger.interface';
9
- import { TraceContext } from './trace-context';
10
- import type { SessionIdPayload } from '../common/types';
11
- /**
12
- * Request metadata extracted from HTTP headers.
13
- */
14
- export interface RequestMetadata {
15
- /** User-Agent header */
16
- userAgent?: string;
17
- /** Content-Type header */
18
- contentType?: string;
19
- /** Accept header */
20
- accept?: string;
21
- /** Client IP address (from x-forwarded-for or socket) */
22
- clientIp?: string;
23
- /** Custom headers matching x-frontmcp-* pattern */
24
- customHeaders: Record<string, string>;
25
- }
26
- /**
27
- * Arguments for creating a RequestContext.
28
- */
29
- export interface RequestContextArgs {
30
- /** Optional request ID (generated if not provided) */
31
- requestId?: string;
32
- /** Optional trace context (generated if not provided) */
33
- traceContext?: TraceContext;
34
- /** Session identifier (required) */
35
- sessionId: string;
36
- /** Authentication information (can be partial, progressively populated) */
37
- authInfo: Partial<AuthInfo>;
38
- /** Scope identifier (required) */
39
- scopeId: string;
40
- /** Optional timestamp (defaults to Date.now()) */
41
- timestamp?: number;
42
- /** Optional request metadata */
43
- metadata?: RequestMetadata;
44
- }
45
- /**
46
- * RequestContext provides per-request state that flows through
47
- * the entire async execution chain via AsyncLocalStorage.
48
- *
49
- * Access via DI only using the REQUEST_CONTEXT token:
50
- * ```typescript
51
- * const ctx = this.get(REQUEST_CONTEXT);
52
- * console.log(ctx.requestId, ctx.traceContext.traceId);
53
- * ```
54
- */
55
- export declare class RequestContext {
56
- /** Unique request identifier (UUID v4) */
57
- readonly requestId: string;
58
- /** W3C Trace Context or generated trace ID */
59
- readonly traceContext: TraceContext;
60
- /** Session identifier (from mcp-session-id header or authorization) */
61
- readonly sessionId: string;
62
- /**
63
- * Authentication information.
64
- * Note: This is mutable to allow updating after authorization is verified.
65
- * It's Partial<AuthInfo> because auth info is progressively populated
66
- * throughout the request lifecycle (some fields like transport are only
67
- * available after the transport is established).
68
- */
69
- private _authInfo;
70
- /** Scope identifier */
71
- readonly scopeId: string;
72
- /** Request start timestamp */
73
- readonly timestamp: number;
74
- /** Request metadata (headers, user-agent, etc.) */
75
- readonly metadata: RequestMetadata;
76
- /** Timing marks for performance tracking */
77
- private readonly marks;
78
- /** Request-scoped data store */
79
- private readonly store;
80
- constructor(args: RequestContextArgs);
81
- /**
82
- * Get authentication information.
83
- * Returns Partial<AuthInfo> because auth info is progressively populated.
84
- */
85
- get authInfo(): Partial<AuthInfo>;
86
- /**
87
- * Update auth info after authorization is verified.
88
- * Called by checkAuthorization stage after session verification.
89
- * Can be called multiple times to progressively add fields.
90
- *
91
- * @param authInfo - The auth info fields to set/update
92
- * @internal
93
- */
94
- updateAuthInfo(authInfo: Partial<AuthInfo>): void;
95
- /**
96
- * Session metadata including protocol, platform type, and node info.
97
- * Only available after session verification in authenticated flows.
98
- */
99
- private _sessionMetadata?;
100
- /**
101
- * Get session metadata.
102
- *
103
- * Contains protocol type, platform type, nodeId, and authSignature.
104
- * Only available after session verification completes.
105
- *
106
- * @returns Session metadata or undefined if not yet verified
107
- */
108
- get sessionMetadata(): SessionIdPayload | undefined;
109
- /**
110
- * Update session metadata after session verification.
111
- * Called by checkAuthorization stage after session verification.
112
- *
113
- * @param metadata - Session metadata from verified session
114
- * @internal
115
- */
116
- updateSessionMetadata(metadata: SessionIdPayload): void;
117
- /**
118
- * Get a child logger with request context attached.
119
- *
120
- * Creates a child logger with a prefix containing the request ID and trace ID
121
- * for easy request tracing in logs.
122
- *
123
- * @param parentLogger - The parent logger to create a child from
124
- * @returns A logger with requestId and traceId in the prefix
125
- */
126
- getLogger(parentLogger: FrontMcpLogger): FrontMcpLogger;
127
- /**
128
- * Mark a timing point for performance tracking.
129
- *
130
- * @param name - Name of the timing mark
131
- */
132
- mark(name: string): void;
133
- /**
134
- * Get elapsed time in milliseconds between two marks.
135
- *
136
- * @param from - Start mark name (defaults to 'init')
137
- * @param to - End mark name (defaults to current time)
138
- * @returns Elapsed time in milliseconds
139
- */
140
- elapsed(from?: string, to?: string): number;
141
- /**
142
- * Get all timing marks.
143
- *
144
- * @returns Read-only map of mark names to timestamps
145
- */
146
- getMarks(): ReadonlyMap<string, number>;
147
- /**
148
- * Store request-scoped data.
149
- *
150
- * @param key - Storage key
151
- * @param value - Value to store
152
- */
153
- set<T>(key: string | symbol, value: T): void;
154
- /**
155
- * Retrieve request-scoped data.
156
- *
157
- * @param key - Storage key
158
- * @returns Stored value or undefined
159
- */
160
- get<T>(key: string | symbol): T | undefined;
161
- /**
162
- * Check if a key exists in the request-scoped store.
163
- *
164
- * @param key - Storage key
165
- * @returns True if key exists
166
- */
167
- has(key: string | symbol): boolean;
168
- /**
169
- * Delete a key from the request-scoped store.
170
- *
171
- * @param key - Storage key
172
- * @returns True if key was deleted
173
- */
174
- delete(key: string | symbol): boolean;
175
- /**
176
- * Get a summary of the context for logging.
177
- *
178
- * Note: sessionId is hashed to prevent accidental exposure of user-identifying
179
- * session identifiers in logs while still allowing correlation.
180
- *
181
- * @returns Object with key context fields
182
- */
183
- toLogContext(): Record<string, unknown>;
184
- }
185
- //# sourceMappingURL=request-context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"request-context.d.ts","sourceRoot":"","sources":["../../src/context/request-context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAwB,MAAM,iBAAiB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC5B,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC5B;AAED;;;;;;;;;GASG;AACH,qBAAa,cAAc;IACzB,0CAA0C;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,8CAA8C;IAC9C,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IAEpC,uEAAuE;IACvE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;;;;;OAMG;IACH,OAAO,CAAC,SAAS,CAAoB;IAErC,uBAAuB;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,8BAA8B;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B,mDAAmD;IACnD,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IAEnC,4CAA4C;IAC5C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkC;IAExD,gCAAgC;IAChC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA4C;gBAEtD,IAAI,EAAE,kBAAkB;IAmBpC;;;OAGG;IACH,IAAI,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,CAEhC;IAED;;;;;;;OAOG;IACH,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI;IAKjD;;;OAGG;IACH,OAAO,CAAC,gBAAgB,CAAC,CAAmB;IAE5C;;;;;;;OAOG;IACH,IAAI,eAAe,IAAI,gBAAgB,GAAG,SAAS,CAElD;IAED;;;;;;OAMG;IACH,qBAAqB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAIvD;;;;;;;;OAQG;IACH,SAAS,CAAC,YAAY,EAAE,cAAc,GAAG,cAAc;IAMvD;;;;OAIG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIxB;;;;;;OAMG;IACH,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;IAM3C;;;;OAIG;IACH,QAAQ,IAAI,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC;IAIvC;;;;;OAKG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAI5C;;;;;OAKG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,GAAG,SAAS;IAI3C;;;;;OAKG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO;IAIlC;;;;;OAKG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO;IAIrC;;;;;;;OAOG;IACH,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAYxC"}
@@ -1,38 +0,0 @@
1
- /**
2
- * REQUEST_CONTEXT Provider
3
- *
4
- * Defines the DI token and factory provider for accessing RequestContext.
5
- * The context is retrieved from AsyncLocalStorage via RequestContextStorage.
6
- */
7
- import { ProviderFactoryType } from '../common/interfaces/provider.interface';
8
- import { RequestContext } from './request-context';
9
- import { RequestContextStorage } from './request-context-storage';
10
- /**
11
- * DI token for accessing the current RequestContext.
12
- *
13
- * Use this token to inject the current request context in any provider or context:
14
- *
15
- * @example
16
- * ```typescript
17
- * // In a tool/resource/prompt
18
- * const ctx = this.get(REQUEST_CONTEXT);
19
- * console.log(ctx.requestId, ctx.traceContext.traceId);
20
- *
21
- * // In a provider with constructor injection
22
- * constructor(
23
- * @Inject(REQUEST_CONTEXT) private ctx: RequestContext
24
- * ) {}
25
- * ```
26
- */
27
- export declare const REQUEST_CONTEXT: unique symbol;
28
- /**
29
- * Factory provider for RequestContext.
30
- *
31
- * This provider is marked as REQUEST scope and retrieves the current
32
- * RequestContext from AsyncLocalStorage via RequestContextStorage.
33
- *
34
- * Note: This provider will throw if called outside of a request scope
35
- * (i.e., without first calling RequestContextStorage.run or runFromHeaders).
36
- */
37
- export declare const RequestContextProvider: ProviderFactoryType<RequestContext, readonly [typeof RequestContextStorage]>;
38
- //# sourceMappingURL=request-context.provider.d.ts.map