@frontmcp/sdk 0.7.2 → 0.8.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 (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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-providers.vault.d.ts","sourceRoot":"","sources":["../../../src/auth/vault/auth-providers.vault.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAErG,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C;;GAEG;AACH,qBAAa,kBAAkB;IAI3B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAJ5B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAiB;gBAGtB,SAAS,EAAE,kBAAkB,EAC7B,SAAS,SAAmB,EAC7C,MAAM,CAAC,EAAE,cAAc;IAKzB;;;;;;;;OAQG;IACG,eAAe,CAAC,CAAC,SAAS,UAAU,EACxC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,CAAC,EACb,KAAK,EAAE,eAAe,EACtB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC;IAqBhB;;;;;;;;OAQG;IACG,aAAa,CAAC,CAAC,SAAS,UAAU,EACtC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,eAAe,EACtB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAmCpB;;;;;;;OAOG;IACG,gBAAgB,CACpB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,eAAe,EACtB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC;IAWhB;;;;;;;;OAQG;IACG,oBAAoB,CACxB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC;IAWhB;;;;;;;;OAQG;IACG,sBAAsB,CAC1B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,EAC1E,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC;IAYhB;;;;;;OAMG;IACG,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAoD9G;;;;;;;OAOG;IACH,OAAO,CAAC,aAAa;CAkBtB;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAkD,KAAK,CAAC,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * CredentialCache DI Token
3
+ *
4
+ * SDK-specific DI token for CredentialCache.
5
+ * The CredentialCache class itself is exported from @frontmcp/auth.
6
+ */
7
+ import { Token } from '@frontmcp/di';
8
+ import type { CredentialCache } from '@frontmcp/auth';
9
+ /**
10
+ * DI Token for CredentialCache
11
+ */
12
+ export declare const CREDENTIAL_CACHE: Token<CredentialCache>;
13
+ //# sourceMappingURL=credential-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-cache.d.ts","sourceRoot":"","sources":["../../../src/auth/vault/credential-cache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAA8C,KAAK,CAAC,eAAe,CAAC,CAAC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * EagerCredentialLoader - Loads credentials at session initialization
3
+ *
4
+ * Used for providers configured with `loading: 'eager'`.
5
+ * Credentials are loaded in parallel at session start.
6
+ */
7
+ import type { CredentialCache, CredentialFactoryContext, ResolvedCredential } from '@frontmcp/auth';
8
+ import type { AuthProvidersRegistry } from '../auth-providers.registry';
9
+ import { FrontMcpLogger } from '../../../common';
10
+ /**
11
+ * Result of eager loading
12
+ */
13
+ export interface EagerLoadResult {
14
+ /** Successfully loaded credentials */
15
+ loaded: Map<string, ResolvedCredential>;
16
+ /** Failed provider names with errors */
17
+ failed: Map<string, Error>;
18
+ /** Total loading time in ms */
19
+ duration: number;
20
+ }
21
+ /**
22
+ * EagerCredentialLoader - Loads credentials at session initialization
23
+ */
24
+ export declare class EagerCredentialLoader {
25
+ private readonly registry;
26
+ private readonly cache;
27
+ private readonly logger?;
28
+ constructor(registry: AuthProvidersRegistry, cache: CredentialCache, logger?: FrontMcpLogger);
29
+ /**
30
+ * Load all eager credentials for a session.
31
+ * Called during session initialization.
32
+ *
33
+ * @param context - Factory context with session/user info
34
+ * @returns Map of provider name to resolved credential
35
+ */
36
+ loadForSession(context: CredentialFactoryContext): Promise<EagerLoadResult>;
37
+ /**
38
+ * Load a single credential
39
+ */
40
+ private loadOne;
41
+ /**
42
+ * Wrap credential with resolved metadata
43
+ */
44
+ private wrapCredential;
45
+ }
46
+ //# sourceMappingURL=eager-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eager-loader.d.ts","sourceRoot":"","sources":["../../../../src/auth/vault/credential-loaders/eager-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAc,eAAe,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEhH,OAAO,KAAK,EAAE,qBAAqB,EAA4B,MAAM,4BAA4B,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IACxC,wCAAwC;IACxC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC3B,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,qBAAa,qBAAqB;IAI9B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAJxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAiB;gBAGtB,QAAQ,EAAE,qBAAqB,EAC/B,KAAK,EAAE,eAAe,EACvC,MAAM,CAAC,EAAE,cAAc;IAKzB;;;;;;OAMG;IACG,cAAc,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,eAAe,CAAC;IAoDjF;;OAEG;YACW,OAAO;IAgBrB;;OAEG;IACH,OAAO,CAAC,cAAc;CAcvB"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Credential Loaders - Eager and Lazy credential loading strategies
3
+ */
4
+ export { EagerCredentialLoader, type EagerLoadResult } from './eager-loader';
5
+ export { LazyCredentialLoader } from './lazy-loader';
6
+ export { extractCredentialExpiry } from '@frontmcp/auth';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/auth/vault/credential-loaders/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAGrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * LazyCredentialLoader - Loads credentials on first access
3
+ *
4
+ * Used for providers configured with `loading: 'lazy'` (default).
5
+ * Prevents concurrent loads for the same provider (deduplication).
6
+ */
7
+ import type { Credential, CredentialFactoryContext, ResolvedCredential } from '@frontmcp/auth';
8
+ import type { NormalizedProviderConfig } from '../auth-providers.registry';
9
+ import { FrontMcpLogger } from '../../../common';
10
+ /**
11
+ * LazyCredentialLoader - Loads credentials on first access
12
+ */
13
+ export declare class LazyCredentialLoader {
14
+ /** In-flight loading promises for deduplication */
15
+ private readonly loading;
16
+ private readonly logger?;
17
+ constructor(logger?: FrontMcpLogger);
18
+ /**
19
+ * Load a credential lazily.
20
+ * If already loading, returns the in-flight promise (deduplication).
21
+ *
22
+ * @param config - Provider configuration
23
+ * @param context - Factory context
24
+ * @returns Resolved credential or null
25
+ */
26
+ load<T extends Credential>(config: NormalizedProviderConfig<T>, context: CredentialFactoryContext): Promise<ResolvedCredential<T> | null>;
27
+ /**
28
+ * Perform the actual credential loading
29
+ */
30
+ private doLoad;
31
+ /**
32
+ * Refresh a credential using the provider's refresh function or factory
33
+ *
34
+ * @param config - Provider configuration
35
+ * @param context - Factory context with existing credential
36
+ * @returns Refreshed credential or null
37
+ */
38
+ refresh<T extends Credential>(config: NormalizedProviderConfig<T>, context: CredentialFactoryContext & {
39
+ existingCredential: T;
40
+ }): Promise<ResolvedCredential<T> | null>;
41
+ /**
42
+ * Check if a credential is currently being loaded
43
+ *
44
+ * @param name - Provider name
45
+ * @returns true if loading is in progress
46
+ */
47
+ isLoading(name: string): boolean;
48
+ /**
49
+ * Cancel all in-flight loads (for cleanup)
50
+ */
51
+ cancelAll(): void;
52
+ }
53
+ //# sourceMappingURL=lazy-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lazy-loader.d.ts","sourceRoot":"","sources":["../../../../src/auth/vault/credential-loaders/lazy-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAE/F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,mDAAmD;IACnD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyD;IACjF,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAiB;gBAE7B,MAAM,CAAC,EAAE,cAAc;IAInC;;;;;;;OAOG;IACG,IAAI,CAAC,CAAC,SAAS,UAAU,EAC7B,MAAM,EAAE,wBAAwB,CAAC,CAAC,CAAC,EACnC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAmBxC;;OAEG;YACW,MAAM;IAsCpB;;;;;;OAMG;IACG,OAAO,CAAC,CAAC,SAAS,UAAU,EAChC,MAAM,EAAE,wBAAwB,CAAC,CAAC,CAAC,EACnC,OAAO,EAAE,wBAAwB,GAAG;QAAE,kBAAkB,EAAE,CAAC,CAAA;KAAE,GAC5D,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAwCxC;;;;;OAKG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIhC;;OAEG;IACH,SAAS,IAAI,IAAI;CAGlB"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * AuthProviders Vault - Secure credential management for FrontMCP
3
+ *
4
+ * This module provides a production-grade credential vault system with:
5
+ * - Multiple credential types (OAuth, API Keys, SSH, Service Accounts, etc.)
6
+ * - Session/User/Global scoping
7
+ * - Lazy and eager loading strategies
8
+ * - Encrypted storage with zero-knowledge architecture
9
+ * - Context extension for `this.authProviders` in tools
10
+ *
11
+ * @example Register providers
12
+ * ```typescript
13
+ * @FrontMcp({
14
+ * authProviders: {
15
+ * providers: [
16
+ * {
17
+ * name: 'github',
18
+ * scope: 'user',
19
+ * loading: 'lazy',
20
+ * factory: async (ctx) => ({
21
+ * type: 'oauth',
22
+ * accessToken: await fetchGitHubToken(ctx.userSub),
23
+ * tokenType: 'Bearer',
24
+ * }),
25
+ * },
26
+ * ],
27
+ * },
28
+ * })
29
+ * class MyServer {}
30
+ * ```
31
+ *
32
+ * @example Use in tools
33
+ * ```typescript
34
+ * @Tool({ name: 'my_tool', authProviders: ['github'] })
35
+ * class MyTool extends ToolContext {
36
+ * async execute(input: Input) {
37
+ * const headers = await this.authProviders.headers('github');
38
+ * return fetch(url, { headers });
39
+ * }
40
+ * }
41
+ * ```
42
+ */
43
+ export type { CredentialScope, LoadingStrategy, GetCredentialOptions, ResolvedCredential, CredentialFactoryContext, CredentialFactory, CredentialRefreshFn, CredentialHeadersFn, CredentialProviderConfig, AuthProviderMapping, CredentialCacheEntry, VaultStorageKey, AuthProvidersVaultOptions, CredentialEventType, CredentialEvent, CacheStats, } from '@frontmcp/auth';
44
+ export { credentialScopeSchema, loadingStrategySchema, getCredentialOptionsSchema, credentialProviderConfigSchema, authProviderMappingSchema, authProvidersVaultOptionsSchema, CredentialCache, extractCredentialExpiry, } from '@frontmcp/auth';
45
+ export type { AuthProvidersAccessor } from './auth-providers.accessor';
46
+ export { AUTH_PROVIDERS_ACCESSOR } from './auth-providers.accessor';
47
+ export type { NormalizedProviderConfig } from './auth-providers.registry';
48
+ export { AuthProvidersRegistry, AUTH_PROVIDERS_REGISTRY } from './auth-providers.registry';
49
+ export { AuthProvidersVault, AUTH_PROVIDERS_VAULT } from './auth-providers.vault';
50
+ export { CREDENTIAL_CACHE } from './credential-cache';
51
+ export { EagerCredentialLoader, type EagerLoadResult } from './credential-loaders/eager-loader';
52
+ export { LazyCredentialLoader } from './credential-loaders/lazy-loader';
53
+ export { AuthProvidersAccessorImpl } from './auth-providers.accessor.impl';
54
+ export { createAuthProvidersProviders, isAuthProvidersEnabled, LAZY_CREDENTIAL_LOADER, } from './auth-providers.providers';
55
+ export { authProvidersContextExtension, getAuthProviders, tryGetAuthProviders, } from './auth-providers.context-extension';
56
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/vault/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAGH,YAAY,EACV,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,yBAAyB,EACzB,mBAAmB,EACnB,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EACzB,+BAA+B,EAC/B,eAAe,EACf,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGpE,YAAY,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAG3F,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAGlF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAGxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAG3E,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oCAAoC,CAAC"}
@@ -0,0 +1,162 @@
1
+ /**
2
+ * Context-aware configuration resolution with automatic fallbacks.
3
+ *
4
+ * Provides 3-level fallback resolution for entity configuration:
5
+ * 1. Entity-specific: `{entityType}.{entityName}.{key}`
6
+ * 2. Entity-type default: `{entityType}.{key}`
7
+ * 3. Global default: `{key}`
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * // For agent 'research-agent' looking for 'openaiKey':
12
+ * // Tries: agents.research-agent.openaiKey → agents.openaiKey → openaiKey
13
+ *
14
+ * const resolver = createContextResolver(configService, {
15
+ * entityType: 'agents',
16
+ * entityName: 'research-agent',
17
+ * });
18
+ *
19
+ * const apiKey = resolver.get('openaiKey');
20
+ * ```
21
+ *
22
+ * @packageDocumentation
23
+ */
24
+ import type { ConfigService } from './providers/config.service';
25
+ /**
26
+ * Entity types that support context-aware config resolution.
27
+ */
28
+ export type ConfigEntityType = 'agents' | 'plugins' | 'adapters';
29
+ /**
30
+ * Context for resolving configuration with fallbacks.
31
+ */
32
+ export interface ConfigResolutionContext {
33
+ /**
34
+ * Type of entity (agents, plugins, adapters).
35
+ */
36
+ entityType: ConfigEntityType;
37
+ /**
38
+ * Name of the specific entity.
39
+ */
40
+ entityName: string;
41
+ }
42
+ /**
43
+ * Interface for resolving configuration values.
44
+ * Used by adapter factory and other components that need config access.
45
+ */
46
+ export interface ConfigResolver {
47
+ /**
48
+ * Get a configuration value by path.
49
+ * Throws if not found.
50
+ *
51
+ * @param path - Dot-notation path (e.g., 'openaiKey')
52
+ * @returns The resolved value
53
+ * @throws Error if config key not found
54
+ */
55
+ get<T = unknown>(path: string): T;
56
+ /**
57
+ * Try to get a configuration value, returning undefined if not found.
58
+ *
59
+ * @param path - Dot-notation path
60
+ * @returns The resolved value or undefined
61
+ */
62
+ tryGet<T = unknown>(path: string): T | undefined;
63
+ }
64
+ /**
65
+ * Normalize an entity name for environment variable lookup.
66
+ * Converts to uppercase and replaces non-alphanumeric characters with underscores.
67
+ *
68
+ * @example
69
+ * ```typescript
70
+ * normalizeNameForEnv('research-agent') // 'RESEARCH_AGENT'
71
+ * normalizeNameForEnv('my agent') // 'MY_AGENT'
72
+ * normalizeNameForEnv('plugin.name') // 'PLUGIN_NAME'
73
+ * ```
74
+ */
75
+ export declare function normalizeNameForEnv(name: string): string;
76
+ /**
77
+ * Normalize a config path for nested object lookup.
78
+ * Replaces non-alphanumeric characters (except dots) with underscores in each segment.
79
+ *
80
+ * @example
81
+ * ```typescript
82
+ * normalizePathSegment('research-agent') // 'research_agent'
83
+ * ```
84
+ */
85
+ export declare function normalizePathSegment(segment: string): string;
86
+ /**
87
+ * Generate fallback paths for a config key based on entity context.
88
+ *
89
+ * Creates a 3-level fallback chain:
90
+ * 1. `{entityType}.{entityName}.{key}` - Entity-specific
91
+ * 2. `{entityType}.{key}` - Entity-type default
92
+ * 3. `{key}` - Global default
93
+ *
94
+ * @param key - The config key to look up
95
+ * @param context - Entity context (type and name)
96
+ * @returns Array of paths to try in order
97
+ *
98
+ * @example
99
+ * ```typescript
100
+ * generateFallbacks('openaiKey', { entityType: 'agents', entityName: 'research-agent' })
101
+ * // Returns: ['agents.research_agent.openaiKey', 'agents.openaiKey', 'openaiKey']
102
+ * ```
103
+ */
104
+ export declare function generateFallbacks(key: string, context: ConfigResolutionContext): string[];
105
+ /**
106
+ * Generate environment variable names for fallback lookup.
107
+ *
108
+ * Creates environment variable names matching the fallback paths:
109
+ * 1. `{ENTITY_TYPE}_{ENTITY_NAME}_{KEY}` - Entity-specific
110
+ * 2. `{ENTITY_TYPE}_{KEY}` - Entity-type default
111
+ * 3. `{KEY}` - Global default
112
+ *
113
+ * Note: Keys are converted to uppercase with non-alphanumeric chars replaced by underscores.
114
+ * CamelCase keys like 'openaiKey' become 'OPENAIKEY' (no word-boundary detection).
115
+ *
116
+ * @param key - The config key
117
+ * @param context - Entity context
118
+ * @returns Array of env var names to try
119
+ *
120
+ * @example
121
+ * ```typescript
122
+ * generateEnvFallbacks('openaiKey', { entityType: 'agents', entityName: 'research-agent' })
123
+ * // Returns: ['AGENTS_RESEARCH_AGENT_OPENAIKEY', 'AGENTS_OPENAIKEY', 'OPENAIKEY']
124
+ * ```
125
+ */
126
+ export declare function generateEnvFallbacks(key: string, context: ConfigResolutionContext): string[];
127
+ /**
128
+ * Resolve a config value with fallbacks.
129
+ * Tries each path in order until a value is found.
130
+ *
131
+ * @param config - ConfigService instance
132
+ * @param paths - Paths to try in order
133
+ * @returns The first found value, or undefined if none found
134
+ */
135
+ export declare function resolveWithFallbacks<T>(config: ConfigService<Record<string, unknown>>, paths: string[]): T | undefined;
136
+ /**
137
+ * Create a ConfigResolver that uses entity context for auto-fallbacks.
138
+ *
139
+ * @param config - ConfigService instance
140
+ * @param context - Entity context for generating fallbacks
141
+ * @returns ConfigResolver with fallback support
142
+ *
143
+ * @example
144
+ * ```typescript
145
+ * const resolver = createContextResolver(configService, {
146
+ * entityType: 'agents',
147
+ * entityName: 'research-agent',
148
+ * });
149
+ *
150
+ * // Tries: agents.research_agent.openaiKey → agents.openaiKey → openaiKey
151
+ * const apiKey = resolver.get('openaiKey');
152
+ * ```
153
+ */
154
+ export declare function createContextResolver(config: ConfigService<Record<string, unknown>>, context: ConfigResolutionContext): ConfigResolver;
155
+ /**
156
+ * Create a simple ConfigResolver without fallbacks (direct lookup only).
157
+ *
158
+ * @param config - ConfigService instance
159
+ * @returns ConfigResolver with direct lookup
160
+ */
161
+ export declare function createDirectResolver(config: ConfigService<Record<string, unknown>>): ConfigResolver;
162
+ //# sourceMappingURL=config-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-resolver.d.ts","sourceRoot":"","sources":["../../../src/builtin/config/config-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAMhE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,UAAU,EAAE,gBAAgB,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;;;OAOG;IACH,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC;IAElC;;;;;OAKG;IACH,MAAM,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;CAClD;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE5D;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,GAAG,MAAM,EAAE,CASzF;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,GAAG,MAAM,EAAE,CAW5F;AAMD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAC9C,KAAK,EAAE,MAAM,EAAE,GACd,CAAC,GAAG,SAAS,CASf;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAC9C,OAAO,EAAE,uBAAuB,GAC/B,cAAc,CAehB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,cAAc,CAenG"}
@@ -0,0 +1,63 @@
1
+ import { DynamicPlugin, ProviderType } from '../../common';
2
+ import type { ConfigPluginOptions, ConfigPluginOptionsInput } from './config.types';
3
+ /**
4
+ * ConfigPlugin - Environment variable management for FrontMCP.
5
+ *
6
+ * Provides typed access to configuration with convict-style nested path support.
7
+ * Loads from .env files, YAML config files, and validates with Zod schemas.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * // Basic usage (flat env vars)
12
+ * @FrontMcp({
13
+ * plugins: [
14
+ * ConfigPlugin.init({
15
+ * envPath: '.env',
16
+ * localEnvPath: '.env.local',
17
+ * }),
18
+ * ],
19
+ * })
20
+ * class MyServer {}
21
+ *
22
+ * // With typed schema (convict-style)
23
+ * import { z } from 'zod';
24
+ *
25
+ * const configSchema = z.object({
26
+ * database: z.object({
27
+ * url: z.string(),
28
+ * port: z.number().default(5432),
29
+ * }),
30
+ * debug: z.boolean().default(false),
31
+ * });
32
+ *
33
+ * @FrontMcp({
34
+ * plugins: [
35
+ * ConfigPlugin.init({
36
+ * schema: configSchema,
37
+ * basePath: __dirname,
38
+ * }),
39
+ * ],
40
+ * })
41
+ * class ProductionServer {}
42
+ *
43
+ * // In a tool:
44
+ * class MyTool extends ToolContext {
45
+ * async execute(input) {
46
+ * // Typed access with dot notation
47
+ * const dbUrl = this.config.getOrThrow('database.url');
48
+ * const port = this.config.get('database.port', 5432);
49
+ * const debug = this.config.get('debug');
50
+ * }
51
+ * }
52
+ * ```
53
+ */
54
+ export default class ConfigPlugin<TConfig extends object = Record<string, string>> extends DynamicPlugin<ConfigPluginOptions<TConfig>, ConfigPluginOptionsInput<TConfig>> {
55
+ static defaultOptions: ConfigPluginOptions;
56
+ options: ConfigPluginOptions<TConfig>;
57
+ constructor(options?: ConfigPluginOptionsInput<TConfig>);
58
+ /**
59
+ * Dynamic providers based on plugin options.
60
+ */
61
+ static dynamicProviders: <T extends object>(options: ConfigPluginOptionsInput<T>) => ProviderType[];
62
+ }
63
+ //# sourceMappingURL=config.plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.plugin.d.ts","sourceRoot":"","sources":["../../../src/builtin/config/config.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,YAAY,EAAiB,MAAM,cAAc,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAMpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAaH,MAAM,CAAC,OAAO,OAAO,YAAY,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAE,SAAQ,aAAa,CACtG,mBAAmB,CAAC,OAAO,CAAC,EAC5B,wBAAwB,CAAC,OAAO,CAAC,CAClC;IACC,MAAM,CAAC,cAAc,EAAE,mBAAmB,CAQxC;IAEF,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;gBAE1B,OAAO,GAAE,wBAAwB,CAAC,OAAO,CAAM;IAQ3D;;OAEG;IACH,OAAgB,gBAAgB,GAAI,CAAC,SAAS,MAAM,EAAE,SAAS,wBAAwB,CAAC,CAAC,CAAC,KAAG,YAAY,EAAE,CAmEzG;CACH"}
@@ -0,0 +1,7 @@
1
+ import { Reference } from '../../common';
2
+ import type { ConfigPluginOptions } from './config.types';
3
+ /**
4
+ * DI token for the plugin configuration.
5
+ */
6
+ export declare const ConfigPluginConfigToken: Reference<ConfigPluginOptions>;
7
+ //# sourceMappingURL=config.symbols.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.symbols.d.ts","sourceRoot":"","sources":["../../../src/builtin/config/config.symbols.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,CAAC,mBAAmB,CAEhC,CAAC"}
@@ -0,0 +1,71 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Options for ConfigPlugin initialization.
4
+ */
5
+ export interface ConfigPluginOptions<TConfig extends object = Record<string, string>> {
6
+ /**
7
+ * Zod schema defining the configuration structure.
8
+ * When provided, enables:
9
+ * - Type inference for config paths
10
+ * - Automatic env var mapping (database.url -> DATABASE_URL)
11
+ * - Schema validation with defaults
12
+ */
13
+ schema?: z.ZodType<TConfig>;
14
+ /**
15
+ * Path to the .env file.
16
+ * @default '.env'
17
+ */
18
+ envPath?: string;
19
+ /**
20
+ * Path to local override file.
21
+ * Local file takes precedence over base env file.
22
+ * @default '.env.local'
23
+ */
24
+ localEnvPath?: string;
25
+ /**
26
+ * Path to YAML config file.
27
+ * @default 'config.yml'
28
+ */
29
+ configPath?: string;
30
+ /**
31
+ * Whether to load .env files.
32
+ * Set to false if env is already loaded (e.g., by CLI).
33
+ * @default true
34
+ */
35
+ loadEnv?: boolean;
36
+ /**
37
+ * Whether to load YAML config file.
38
+ * @default false
39
+ */
40
+ loadYaml?: boolean;
41
+ /**
42
+ * Whether to populate process.env with loaded values.
43
+ * @default true
44
+ */
45
+ populateProcessEnv?: boolean;
46
+ /**
47
+ * Whether to throw on validation errors.
48
+ * @default true
49
+ */
50
+ strict?: boolean;
51
+ /**
52
+ * Base path for resolving .env and config files.
53
+ * @default process.cwd()
54
+ */
55
+ basePath?: string;
56
+ }
57
+ /**
58
+ * Input options (what users provide to init()).
59
+ * All fields are optional since we have defaults.
60
+ */
61
+ export type ConfigPluginOptionsInput<T extends object = Record<string, string>> = Partial<ConfigPluginOptions<T>>;
62
+ /**
63
+ * Parsed and validated environment configuration.
64
+ */
65
+ export interface ParsedEnvConfig {
66
+ /** Raw environment variables (string values) */
67
+ raw: Record<string, string>;
68
+ /** Parsed values (if schema provided) */
69
+ parsed?: Record<string, unknown>;
70
+ }
71
+ //# sourceMappingURL=config.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.types.d.ts","sourceRoot":"","sources":["../../../src/builtin/config/config.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,mBAAmB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAClF;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAE5B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;AAElH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Built-in ConfigPlugin for environment variable management.
3
+ *
4
+ * Provides typed access to configuration with convict-style nested path support.
5
+ * Loads from .env files, YAML config files, and validates with Zod schemas.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import { FrontMcp, App, ConfigPlugin } from '@frontmcp/sdk';
10
+ * import { z } from 'zod';
11
+ *
12
+ * // Define configuration schema
13
+ * const configSchema = z.object({
14
+ * database: z.object({
15
+ * url: z.string().describe('Database URL'),
16
+ * port: z.number().default(5432).describe('Database port'),
17
+ * }),
18
+ * debug: z.boolean().default(false),
19
+ * });
20
+ *
21
+ * @FrontMcp({
22
+ * plugins: [
23
+ * ConfigPlugin.init({
24
+ * schema: configSchema,
25
+ * basePath: __dirname,
26
+ * }),
27
+ * ],
28
+ * })
29
+ * class MyServer {}
30
+ *
31
+ * // In tools:
32
+ * class MyTool extends ToolContext {
33
+ * async execute(input) {
34
+ * // Typed access with dot notation
35
+ * const dbUrl = this.config.getOrThrow('database.url');
36
+ * const port = this.config.get('database.port', 5432);
37
+ * }
38
+ * }
39
+ * ```
40
+ *
41
+ * @packageDocumentation
42
+ */
43
+ export { default as ConfigPlugin } from './config.plugin';
44
+ export type { ConfigPluginOptions, ConfigPluginOptionsInput, ParsedEnvConfig } from './config.types';
45
+ export { ConfigService, ConfigMissingError, ConfigValidationError } from './providers/config.service';
46
+ export { loadConfig, deepMerge } from './providers/config-loader';
47
+ export type { ConfigLoaderOptions } from './providers/config-loader';
48
+ export { loadEnvFiles, parseEnvContent, parseEnvContentSync, populateProcessEnv, pathToEnvKey, setNestedValue, getNestedValue, extractSchemaPaths, mapEnvToNestedConfig, } from './providers/env-loader';
49
+ export { ConfigPluginConfigToken } from './config.symbols';
50
+ export { ConfigEntityType, ConfigResolutionContext, ConfigResolver, normalizeNameForEnv, normalizePathSegment, generateFallbacks, generateEnvFallbacks, resolveWithFallbacks, createContextResolver, createDirectResolver, } from './config-resolver';
51
+ import { ConfigService } from './providers/config.service';
52
+ /**
53
+ * Get the ConfigService from an execution context.
54
+ * Alternative to `this.config` for explicit function-style access.
55
+ *
56
+ * @throws Error if ConfigPlugin is not installed
57
+ */
58
+ export declare function getConfig<T extends {
59
+ get: (token: unknown) => unknown;
60
+ }>(ctx: T): ConfigService;
61
+ /**
62
+ * Try to get the ConfigService, returning undefined if not available.
63
+ * Use this for graceful degradation when the plugin might not be installed.
64
+ */
65
+ export declare function tryGetConfig<T extends {
66
+ tryGet?: (token: unknown) => unknown;
67
+ }>(ctx: T): ConfigService | undefined;
68
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/builtin/config/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAGH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG1D,YAAY,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGrG,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGtG,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAClE,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGrE,OAAO,EACL,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAG3D,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS;IAAE,GAAG,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAA;CAAE,EAAE,GAAG,EAAE,CAAC,GAAG,aAAa,CAE/F;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAA;CAAE,EAAE,GAAG,EAAE,CAAC,GAAG,aAAa,GAAG,SAAS,CAKlH"}
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Options for the config loader.
4
+ */
5
+ export interface ConfigLoaderOptions {
6
+ /** Base path for resolving files (default: process.cwd()) */
7
+ basePath?: string;
8
+ /** Path to .env file (default: '.env') */
9
+ envPath?: string;
10
+ /** Path to local override file (default: '.env.local') */
11
+ localEnvPath?: string;
12
+ /** Path to YAML config file (default: 'config.yml') */
13
+ configPath?: string;
14
+ /** Whether to load .env files (default: true) */
15
+ loadEnv?: boolean;
16
+ /** Whether to load YAML config (default: false - opt-in) */
17
+ loadYaml?: boolean;
18
+ /** Whether to populate process.env (default: true) */
19
+ populateProcessEnv?: boolean;
20
+ }
21
+ /**
22
+ * Load configuration from multiple sources and merge.
23
+ * Priority: env > yaml > schema defaults
24
+ *
25
+ * @param schema - Zod schema defining the configuration structure
26
+ * @param options - Loader options
27
+ * @returns Validated and merged configuration
28
+ */
29
+ export declare function loadConfig<T extends object>(schema: z.ZodType<T>, options?: ConfigLoaderOptions): Promise<T>;
30
+ /**
31
+ * Deep merge two objects, with source values taking precedence.
32
+ * Arrays are replaced, not merged.
33
+ */
34
+ declare function deepMerge(target: Record<string, unknown>, source: Record<string, unknown>): Record<string, unknown>;
35
+ export { deepMerge };
36
+ //# sourceMappingURL=config-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../../../../src/builtin/config/providers/config-loader.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAAC,CAAC,SAAS,MAAM,EAC/C,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,CAAC,CAAC,CAmDZ;AA2BD;;;GAGG;AACH,iBAAS,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAyB5G;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}