@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,447 @@
1
+ /**
2
+ * Direct Client Types
3
+ *
4
+ * Types for connecting to FrontMCP servers as an MCP client with LLM-aware responses.
5
+ */
6
+ import type { ServerCapabilities, Implementation, ClientCapabilities, ListResourcesResult, ReadResourceResult, ListResourceTemplatesResult, ListPromptsResult, GetPromptResult, CompleteResult, LoggingLevel } from '@modelcontextprotocol/sdk/types.js';
7
+ import type { FormattedTools, FormattedToolResult } from './llm-platform';
8
+ export type { FormattedTools, FormattedToolResult };
9
+ /**
10
+ * Supported LLM platforms for tool/result formatting.
11
+ *
12
+ * - `openai`: OpenAI function calling format
13
+ * - `claude`: Anthropic Claude tool format
14
+ * - `langchain`: LangChain tool schema format
15
+ * - `vercel-ai`: Vercel AI SDK tool format
16
+ * - `raw`: Raw MCP protocol format (no transformation)
17
+ */
18
+ export type LLMPlatform = 'openai' | 'claude' | 'langchain' | 'vercel-ai' | 'raw';
19
+ /**
20
+ * Options for searching skills.
21
+ */
22
+ export interface SearchSkillsOptions {
23
+ /** Filter by specific tags */
24
+ tags?: string[];
25
+ /** Filter by specific tools (skills must reference these tools) */
26
+ tools?: string[];
27
+ /** Maximum number of results (1-50, default: 10) */
28
+ limit?: number;
29
+ /** Require all specified tools to be available */
30
+ requireAllTools?: boolean;
31
+ }
32
+ /**
33
+ * A single skill search result item.
34
+ */
35
+ export interface SkillSearchResultItem {
36
+ /** Unique skill identifier */
37
+ id: string;
38
+ /** Display name */
39
+ name: string;
40
+ /** Description of what the skill does */
41
+ description: string;
42
+ /** Relevance score (0-1) */
43
+ score: number;
44
+ /** Tags associated with the skill */
45
+ tags?: string[];
46
+ /** Tools referenced by this skill with availability info */
47
+ tools: Array<{
48
+ name: string;
49
+ available: boolean;
50
+ }>;
51
+ /** Source of the skill */
52
+ source: 'local' | 'external';
53
+ }
54
+ /**
55
+ * Result of searching for skills.
56
+ */
57
+ export interface SearchSkillsResult {
58
+ /** List of matching skills */
59
+ skills: SkillSearchResultItem[];
60
+ /** Total number of matching skills */
61
+ total: number;
62
+ /** Whether there are more results beyond this page */
63
+ hasMore: boolean;
64
+ /** Guidance message for using the results */
65
+ guidance: string;
66
+ }
67
+ /**
68
+ * Options for loading skills.
69
+ */
70
+ export interface LoadSkillsOptions {
71
+ /** Format of the returned content */
72
+ format?: 'full' | 'instructions-only';
73
+ /** Whether to activate a skill session */
74
+ activateSession?: boolean;
75
+ /** Policy mode for the skill session */
76
+ policyMode?: 'strict' | 'approval' | 'permissive';
77
+ }
78
+ /**
79
+ * A single loaded skill item.
80
+ */
81
+ export interface LoadedSkillItem {
82
+ /** Unique skill identifier */
83
+ id: string;
84
+ /** Display name */
85
+ name: string;
86
+ /** Description of what the skill does */
87
+ description: string;
88
+ /** Instructions for using the skill */
89
+ instructions: string;
90
+ /** Tools used by this skill with their schemas */
91
+ tools: Array<{
92
+ name: string;
93
+ purpose?: string;
94
+ available: boolean;
95
+ inputSchema?: unknown;
96
+ outputSchema?: unknown;
97
+ }>;
98
+ /** Parameters that can be passed to the skill */
99
+ parameters?: Array<{
100
+ name: string;
101
+ description?: string;
102
+ required?: boolean;
103
+ type?: string;
104
+ }>;
105
+ /** Names of tools that are available */
106
+ availableTools: string[];
107
+ /** Names of tools that are missing */
108
+ missingTools: string[];
109
+ /** Whether all required tools are available */
110
+ isComplete: boolean;
111
+ /** Formatted content for LLM consumption */
112
+ formattedContent: string;
113
+ /** Session info if activateSession was true */
114
+ session?: {
115
+ activated: boolean;
116
+ sessionId?: string;
117
+ policyMode?: string;
118
+ allowedTools?: string[];
119
+ };
120
+ }
121
+ /**
122
+ * Result of loading skills.
123
+ */
124
+ export interface LoadSkillsResult {
125
+ /** Loaded skills */
126
+ skills: LoadedSkillItem[];
127
+ /** Summary of the load operation */
128
+ summary: {
129
+ totalSkills: number;
130
+ totalTools: number;
131
+ allToolsAvailable: boolean;
132
+ combinedWarnings?: string[];
133
+ };
134
+ /** Guidance for next steps */
135
+ nextSteps: string;
136
+ }
137
+ /**
138
+ * Options for listing skills.
139
+ */
140
+ export interface ListSkillsOptions {
141
+ /** Number of skills to skip (for pagination) */
142
+ offset?: number;
143
+ /** Maximum number of skills to return */
144
+ limit?: number;
145
+ /** Filter by specific tags */
146
+ tags?: string[];
147
+ /** Field to sort by */
148
+ sortBy?: 'name' | 'priority' | 'createdAt';
149
+ /** Sort order */
150
+ sortOrder?: 'asc' | 'desc';
151
+ /** Include hidden skills */
152
+ includeHidden?: boolean;
153
+ }
154
+ /**
155
+ * Result of listing skills.
156
+ */
157
+ export interface ListSkillsResult {
158
+ /** List of skills */
159
+ skills: Array<{
160
+ id: string;
161
+ name: string;
162
+ description: string;
163
+ tags?: string[];
164
+ priority?: number;
165
+ }>;
166
+ /** Total number of skills matching the filter */
167
+ total: number;
168
+ /** Whether there are more skills beyond this page */
169
+ hasMore: boolean;
170
+ }
171
+ /**
172
+ * An elicitation request from the server.
173
+ */
174
+ export interface ElicitationRequest {
175
+ /** Unique identifier for this elicitation */
176
+ elicitId: string;
177
+ /** Message to display to the user */
178
+ message: string;
179
+ /** JSON Schema for the expected response */
180
+ requestedSchema: Record<string, unknown>;
181
+ /** Mode of elicitation */
182
+ mode: 'form' | 'url';
183
+ /** Timestamp when the elicitation expires */
184
+ expiresAt: number;
185
+ }
186
+ /**
187
+ * Response to an elicitation request.
188
+ */
189
+ export interface ElicitationResponse {
190
+ /** User's action */
191
+ action: 'accept' | 'cancel' | 'decline';
192
+ /** Content if action is 'accept' */
193
+ content?: unknown;
194
+ }
195
+ /**
196
+ * Handler function for elicitation requests.
197
+ */
198
+ export type ElicitationHandler = (request: ElicitationRequest) => ElicitationResponse | Promise<ElicitationResponse>;
199
+ /**
200
+ * Options for argument completion.
201
+ */
202
+ export interface CompleteOptions {
203
+ /** Reference to the prompt or resource */
204
+ ref: {
205
+ type: 'ref/prompt';
206
+ name: string;
207
+ } | {
208
+ type: 'ref/resource';
209
+ uri: string;
210
+ };
211
+ /** The argument to complete */
212
+ argument: {
213
+ name: string;
214
+ value: string;
215
+ };
216
+ }
217
+ export type { CompleteResult };
218
+ /**
219
+ * MCP logging levels per spec.
220
+ * Re-export from MCP SDK for convenience.
221
+ */
222
+ export type McpLogLevel = LoggingLevel;
223
+ /**
224
+ * Client info for MCP protocol handshake.
225
+ * Used to identify the client and detect LLM platform.
226
+ */
227
+ export interface ClientInfo {
228
+ /** Client name (e.g., 'openai', 'my-agent') */
229
+ name: string;
230
+ /** Client version */
231
+ version: string;
232
+ }
233
+ /**
234
+ * Session options for connection.
235
+ */
236
+ export interface SessionOptions {
237
+ /** Session ID (auto-generated if not provided) */
238
+ id?: string;
239
+ /** User information for auth context */
240
+ user?: {
241
+ /** User subject identifier */
242
+ sub?: string;
243
+ /** User display name */
244
+ name?: string;
245
+ /** User email */
246
+ email?: string;
247
+ /** Additional user claims */
248
+ [key: string]: unknown;
249
+ };
250
+ }
251
+ /**
252
+ * Full connect options for generic `connect()` function.
253
+ *
254
+ * @example
255
+ * ```typescript
256
+ * const client = await connect(MyServer, {
257
+ * clientInfo: { name: 'my-agent', version: '1.0.0' },
258
+ * session: { id: 'session-123', user: { sub: 'user-1' } },
259
+ * authToken: 'jwt-token',
260
+ * capabilities: { tools: true },
261
+ * });
262
+ * ```
263
+ */
264
+ export interface ConnectOptions {
265
+ /** MCP client info for handshake (used for platform detection) */
266
+ clientInfo?: ClientInfo;
267
+ /** Session configuration */
268
+ session?: SessionOptions;
269
+ /** Direct auth token injection (e.g., JWT) */
270
+ authToken?: string;
271
+ /** Optional client capabilities override */
272
+ capabilities?: Partial<ClientCapabilities>;
273
+ }
274
+ /**
275
+ * Simplified connect options for LLM-specific helpers.
276
+ *
277
+ * @example
278
+ * ```typescript
279
+ * const client = await connectOpenAI(MyServer, {
280
+ * session: { id: 'session-123' },
281
+ * authToken: 'jwt-token',
282
+ * });
283
+ * ```
284
+ */
285
+ export interface LLMConnectOptions {
286
+ /** Session configuration */
287
+ session?: SessionOptions;
288
+ /** Direct auth token injection (e.g., JWT) */
289
+ authToken?: string;
290
+ /** Optional client capabilities override */
291
+ capabilities?: Partial<ClientCapabilities>;
292
+ }
293
+ /**
294
+ * Connected client interface for interacting with FrontMCP servers.
295
+ *
296
+ * The client provides MCP operations with responses formatted for the detected LLM platform.
297
+ * Tools are automatically formatted for OpenAI, Claude, LangChain, or Vercel AI SDK.
298
+ *
299
+ * @example
300
+ * ```typescript
301
+ * import { connectOpenAI } from '@frontmcp/sdk';
302
+ *
303
+ * const client = await connectOpenAI(MyServer, { authToken: 'token' });
304
+ *
305
+ * // Tools are already in OpenAI format
306
+ * const tools = await client.listTools();
307
+ *
308
+ * // Call and get formatted result
309
+ * const result = await client.callTool('weather', { city: 'NYC' });
310
+ *
311
+ * await client.close();
312
+ * ```
313
+ */
314
+ export interface DirectClient {
315
+ /**
316
+ * List all available tools, formatted for the detected LLM platform.
317
+ *
318
+ * Return format depends on platform:
319
+ * - OpenAI: `[{ type: 'function', function: { name, description, parameters, strict } }]`
320
+ * - Claude: `[{ name, description, input_schema }]`
321
+ * - LangChain: `[{ name, description, schema }]`
322
+ * - Vercel AI: `{ [name]: { description, parameters } }`
323
+ * - Raw: MCP `Tool[]` format
324
+ */
325
+ listTools(): Promise<FormattedTools>;
326
+ /**
327
+ * Call a tool and get the result, formatted for the detected LLM platform.
328
+ *
329
+ * @param name - Tool name
330
+ * @param args - Tool arguments
331
+ */
332
+ callTool(name: string, args?: Record<string, unknown>): Promise<FormattedToolResult>;
333
+ /**
334
+ * List all available resources.
335
+ */
336
+ listResources(): Promise<ListResourcesResult>;
337
+ /**
338
+ * Read a resource by URI.
339
+ *
340
+ * @param uri - Resource URI
341
+ */
342
+ readResource(uri: string): Promise<ReadResourceResult>;
343
+ /**
344
+ * List all available resource templates.
345
+ */
346
+ listResourceTemplates(): Promise<ListResourceTemplatesResult>;
347
+ /**
348
+ * List all available prompts.
349
+ */
350
+ listPrompts(): Promise<ListPromptsResult>;
351
+ /**
352
+ * Get a prompt with arguments.
353
+ *
354
+ * @param name - Prompt name
355
+ * @param args - Prompt arguments
356
+ */
357
+ getPrompt(name: string, args?: Record<string, string>): Promise<GetPromptResult>;
358
+ /** Get the session ID for this connection */
359
+ getSessionId(): string;
360
+ /** Get the client info used for the connection */
361
+ getClientInfo(): ClientInfo;
362
+ /** Get the server info from the MCP handshake */
363
+ getServerInfo(): Implementation;
364
+ /** Get the server capabilities from the MCP handshake */
365
+ getCapabilities(): ServerCapabilities;
366
+ /** Get the detected LLM platform (based on clientInfo) */
367
+ getDetectedPlatform(): LLMPlatform;
368
+ /**
369
+ * Close the connection and cleanup resources.
370
+ */
371
+ close(): Promise<void>;
372
+ /**
373
+ * Search for skills matching a query.
374
+ *
375
+ * @param query - Search query string
376
+ * @param options - Search options
377
+ * @returns Matching skills with relevance scores
378
+ */
379
+ searchSkills(query: string, options?: SearchSkillsOptions): Promise<SearchSkillsResult>;
380
+ /**
381
+ * Load one or more skills by ID.
382
+ *
383
+ * @param skillIds - Array of skill IDs to load
384
+ * @param options - Load options
385
+ * @returns Loaded skills with their content and tool info
386
+ */
387
+ loadSkills(skillIds: string[], options?: LoadSkillsOptions): Promise<LoadSkillsResult>;
388
+ /**
389
+ * List all available skills.
390
+ *
391
+ * @param options - List options (pagination, filtering)
392
+ * @returns Paginated list of skills
393
+ */
394
+ listSkills(options?: ListSkillsOptions): Promise<ListSkillsResult>;
395
+ /**
396
+ * Register a handler for elicitation requests.
397
+ *
398
+ * When a tool calls `this.elicit()`, the handler will be invoked with the
399
+ * elicitation details. Return the user's response.
400
+ *
401
+ * @param handler - Function to handle elicitation requests
402
+ * @returns Unsubscribe function
403
+ */
404
+ onElicitation(handler: ElicitationHandler): () => void;
405
+ /**
406
+ * Submit an elicitation result manually.
407
+ *
408
+ * Use this when handling elicitation asynchronously or through a separate channel.
409
+ *
410
+ * @param elicitId - The elicitation ID
411
+ * @param response - The user's response
412
+ */
413
+ submitElicitationResult(elicitId: string, response: ElicitationResponse): Promise<void>;
414
+ /**
415
+ * Request argument completion for a prompt or resource.
416
+ *
417
+ * @param options - Completion options (ref and argument)
418
+ * @returns Completion suggestions
419
+ */
420
+ complete(options: CompleteOptions): Promise<CompleteResult>;
421
+ /**
422
+ * Subscribe to updates for a resource.
423
+ *
424
+ * @param uri - Resource URI to subscribe to
425
+ */
426
+ subscribeResource(uri: string): Promise<void>;
427
+ /**
428
+ * Unsubscribe from updates for a resource.
429
+ *
430
+ * @param uri - Resource URI to unsubscribe from
431
+ */
432
+ unsubscribeResource(uri: string): Promise<void>;
433
+ /**
434
+ * Register a handler for resource update notifications.
435
+ *
436
+ * @param handler - Function called when a subscribed resource is updated
437
+ * @returns Unsubscribe function
438
+ */
439
+ onResourceUpdated(handler: (uri: string) => void): () => void;
440
+ /**
441
+ * Set the logging level for the server.
442
+ *
443
+ * @param level - The logging level
444
+ */
445
+ setLogLevel(level: McpLogLevel): Promise<void>;
446
+ }
447
+ //# sourceMappingURL=client.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.types.d.ts","sourceRoot":"","sources":["../../src/direct/client.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,YAAY,EACb,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1E,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC;AAEpD;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,GAAG,KAAK,CAAC;AAMlF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,eAAe,CAAC,EAAE,OAAO,C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C,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAExF;;;;;;OAMG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAEvF;;;;;OAKG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAMnE;;;;;;;;OAQG;IACH,aAAa,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,IAAI,CAAC;IAEvD;;;;;;;OAOG;IACH,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAMxF;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAM5D;;;;OAIG;IACH,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9C;;;;OAIG;IACH,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhD;;;;;OAKG;IACH,iBAAiB,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAM9D;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD"}
@@ -0,0 +1,188 @@
1
+ /**
2
+ * Connect Utilities
3
+ *
4
+ * Factory functions for creating DirectClient connections to FrontMCP servers.
5
+ * These utilities are separate from the decorator to keep @FrontMcp lean.
6
+ */
7
+ import type { FrontMcpConfigInput } from '../common';
8
+ import type { DirectClient, ConnectOptions, LLMConnectOptions } from './client.types';
9
+ /**
10
+ * Connect to a FrontMCP server with full options.
11
+ *
12
+ * Creates a DirectClient that connects via in-memory transport.
13
+ * The client provides MCP operations with LLM-aware response formatting.
14
+ *
15
+ * @param config - FrontMCP configuration (same as @FrontMcp decorator)
16
+ * @param options - Connection options including clientInfo, session, and authToken
17
+ * @returns Connected DirectClient instance
18
+ *
19
+ * @example Basic connection
20
+ * ```typescript
21
+ * import { connect } from '@frontmcp/sdk';
22
+ *
23
+ * const client = await connect(MyServerConfig);
24
+ * const tools = await client.listTools(); // Raw MCP format
25
+ * await client.close();
26
+ * ```
27
+ *
28
+ * @example With auth token
29
+ * ```typescript
30
+ * const client = await connect(MyServerConfig, {
31
+ * clientInfo: { name: 'my-agent', version: '1.0.0' },
32
+ * session: { id: 'session-123', user: { sub: 'user-1' } },
33
+ * authToken: 'jwt-token',
34
+ * });
35
+ * ```
36
+ *
37
+ * @example With custom client info (for platform detection)
38
+ * ```typescript
39
+ * const client = await connect(MyServerConfig, {
40
+ * clientInfo: { name: 'openai-agent', version: '1.0.0' },
41
+ * });
42
+ * // Tools will be formatted for OpenAI
43
+ * const tools = await client.listTools();
44
+ * ```
45
+ */
46
+ export declare function connect(config: FrontMcpConfigInput, options?: ConnectOptions): Promise<DirectClient>;
47
+ /**
48
+ * Connect to a FrontMCP server as an OpenAI client.
49
+ *
50
+ * Tools are automatically formatted for OpenAI function calling:
51
+ * ```json
52
+ * [{
53
+ * "type": "function",
54
+ * "function": {
55
+ * "name": "tool_name",
56
+ * "description": "Tool description",
57
+ * "parameters": { ... },
58
+ * "strict": true
59
+ * }
60
+ * }]
61
+ * ```
62
+ *
63
+ * @param config - FrontMCP configuration
64
+ * @param options - Connection options (session, authToken)
65
+ * @returns Connected DirectClient with OpenAI formatting
66
+ *
67
+ * @example
68
+ * ```typescript
69
+ * import { connectOpenAI } from '@frontmcp/sdk';
70
+ * import OpenAI from 'openai';
71
+ *
72
+ * const client = await connectOpenAI(MyServerConfig, {
73
+ * authToken: 'user-jwt-token',
74
+ * session: { id: 'user-123' },
75
+ * });
76
+ *
77
+ * const openai = new OpenAI();
78
+ * const tools = await client.listTools(); // Already OpenAI format!
79
+ *
80
+ * const response = await openai.chat.completions.create({
81
+ * model: 'gpt-4-turbo',
82
+ * tools,
83
+ * messages: [{ role: 'user', content: 'What is the weather?' }],
84
+ * });
85
+ *
86
+ * await client.close();
87
+ * ```
88
+ */
89
+ export declare function connectOpenAI(config: FrontMcpConfigInput, options?: LLMConnectOptions): Promise<DirectClient>;
90
+ /**
91
+ * Connect to a FrontMCP server as a Claude client.
92
+ *
93
+ * Tools are automatically formatted for Anthropic Claude:
94
+ * ```json
95
+ * [{
96
+ * "name": "tool_name",
97
+ * "description": "Tool description",
98
+ * "input_schema": { ... }
99
+ * }]
100
+ * ```
101
+ *
102
+ * @param config - FrontMCP configuration
103
+ * @param options - Connection options (session, authToken)
104
+ * @returns Connected DirectClient with Claude formatting
105
+ *
106
+ * @example
107
+ * ```typescript
108
+ * import { connectClaude } from '@frontmcp/sdk';
109
+ * import Anthropic from '@anthropic-ai/sdk';
110
+ *
111
+ * const client = await connectClaude(MyServerConfig, { authToken: 'token' });
112
+ * const tools = await client.listTools(); // Claude format
113
+ *
114
+ * const anthropic = new Anthropic();
115
+ * const response = await anthropic.messages.create({
116
+ * model: 'claude-3-opus-20240229',
117
+ * tools,
118
+ * messages: [{ role: 'user', content: 'What is the weather?' }],
119
+ * });
120
+ *
121
+ * await client.close();
122
+ * ```
123
+ */
124
+ export declare function connectClaude(config: FrontMcpConfigInput, options?: LLMConnectOptions): Promise<DirectClient>;
125
+ /**
126
+ * Connect to a FrontMCP server as a LangChain client.
127
+ *
128
+ * Tools are automatically formatted for LangChain:
129
+ * ```json
130
+ * [{
131
+ * "name": "tool_name",
132
+ * "description": "Tool description",
133
+ * "schema": { ... }
134
+ * }]
135
+ * ```
136
+ *
137
+ * @param config - FrontMCP configuration
138
+ * @param options - Connection options (session, authToken)
139
+ * @returns Connected DirectClient with LangChain formatting
140
+ *
141
+ * @example
142
+ * ```typescript
143
+ * import { connectLangChain } from '@frontmcp/sdk';
144
+ *
145
+ * const client = await connectLangChain(MyServerConfig);
146
+ * const tools = await client.listTools(); // LangChain format
147
+ *
148
+ * // Use with LangChain agent
149
+ * await client.close();
150
+ * ```
151
+ */
152
+ export declare function connectLangChain(config: FrontMcpConfigInput, options?: LLMConnectOptions): Promise<DirectClient>;
153
+ /**
154
+ * Connect to a FrontMCP server as a Vercel AI SDK client.
155
+ *
156
+ * Tools are automatically formatted for Vercel AI SDK:
157
+ * ```json
158
+ * {
159
+ * "tool_name": {
160
+ * "description": "Tool description",
161
+ * "parameters": { ... }
162
+ * }
163
+ * }
164
+ * ```
165
+ *
166
+ * @param config - FrontMCP configuration
167
+ * @param options - Connection options (session, authToken)
168
+ * @returns Connected DirectClient with Vercel AI SDK formatting
169
+ *
170
+ * @example
171
+ * ```typescript
172
+ * import { connectVercelAI } from '@frontmcp/sdk';
173
+ * import { generateText } from 'ai';
174
+ *
175
+ * const client = await connectVercelAI(MyServerConfig);
176
+ * const tools = await client.listTools(); // Vercel AI SDK format
177
+ *
178
+ * const { text } = await generateText({
179
+ * model: openai('gpt-4-turbo'),
180
+ * tools,
181
+ * prompt: 'What is the weather?',
182
+ * });
183
+ *
184
+ * await client.close();
185
+ * ```
186
+ */
187
+ export declare function connectVercelAI(config: FrontMcpConfigInput, options?: LLMConnectOptions): Promise<DirectClient>;
188
+ //# sourceMappingURL=connect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/direct/connect.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AA+CtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAsB,OAAO,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAI1G;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAKnH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAKnH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,mBAAmB,EAC3B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,YAAY,CAAC,CAKvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,CAKrH"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Direct Client Implementation
3
+ *
4
+ * Connects to a FrontMCP server as an MCP client with LLM-aware response formatting.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=direct-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"direct-client.d.ts","sourceRoot":"","sources":["../../src/direct/direct-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}