@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,309 @@
1
+ import { Token } from '@frontmcp/di';
2
+ import { EntryLineage, EntryOwnerRef, SkillEntry, SkillType, SkillToolValidationMode } from '../common';
3
+ import { SkillChangeEvent } from './skill.events';
4
+ import { SkillInstance } from './skill.instance';
5
+ import { SkillRecord } from '../common/records';
6
+ import ProviderRegistry from '../provider/provider.registry';
7
+ import { RegistryAbstract, RegistryBuildMapResult } from '../regsitry';
8
+ import { Scope } from '../scope';
9
+ import { SkillSearchOptions, SkillSearchResult, SkillLoadResult, SkillListOptions, SkillListResult } from './skill-storage.interface';
10
+ import type { ExternalSkillProviderBase } from './providers/external-skill.provider';
11
+ import type { SyncResult } from './sync/sync-state.interface';
12
+ import { ServerCapabilities } from '@modelcontextprotocol/sdk/types.js';
13
+ import { SkillValidationReport } from './errors/skill-validation.error';
14
+ /**
15
+ * Indexed skill for efficient lookup.
16
+ */
17
+ export interface IndexedSkill {
18
+ token: Token;
19
+ instance: SkillInstance;
20
+ baseName: string;
21
+ lineage: EntryLineage;
22
+ ownerKey: string;
23
+ qualifiedName: string;
24
+ qualifiedId: string;
25
+ source: SkillRegistry;
26
+ }
27
+ /**
28
+ * Options for configuring SkillRegistry behavior.
29
+ */
30
+ export interface SkillRegistryOptions {
31
+ /**
32
+ * Default validation mode for all skills in this registry.
33
+ * Can be overridden per-skill via SkillMetadata.toolValidation.
34
+ *
35
+ * @default 'warn'
36
+ */
37
+ defaultToolValidation?: SkillToolValidationMode;
38
+ /**
39
+ * Whether to fail the entire registry initialization if any skill fails validation.
40
+ * Only applies when toolValidation is 'strict'.
41
+ *
42
+ * @default false
43
+ */
44
+ failOnInvalidSkills?: boolean;
45
+ }
46
+ /**
47
+ * Options for getting skills from the registry.
48
+ */
49
+ export interface GetSkillsOptions {
50
+ /**
51
+ * Whether to include hidden skills.
52
+ * @default false
53
+ */
54
+ includeHidden?: boolean;
55
+ /**
56
+ * Filter by visibility context.
57
+ * - 'mcp': Only skills visible via MCP (visibility = 'mcp' or 'both')
58
+ * - 'http': Only skills visible via HTTP (visibility = 'http' or 'both')
59
+ * - 'all': All skills regardless of visibility (default)
60
+ */
61
+ visibility?: 'mcp' | 'http' | 'all';
62
+ }
63
+ /**
64
+ * Interface for SkillRegistry consumers.
65
+ */
66
+ export interface SkillRegistryInterface {
67
+ owner: EntryOwnerRef;
68
+ /**
69
+ * Get all skills in the registry.
70
+ * @param options - Options for filtering skills (or boolean for backwards compatibility)
71
+ */
72
+ getSkills(options?: boolean | GetSkillsOptions): SkillEntry[];
73
+ /**
74
+ * Find a skill by name.
75
+ * @param name - The skill name
76
+ */
77
+ findByName(name: string): SkillEntry | undefined;
78
+ /**
79
+ * Find a skill by qualified name (includes owner prefix).
80
+ * @param qualifiedName - The qualified name (e.g., "my-app:review-pr")
81
+ */
82
+ findByQualifiedName(qualifiedName: string): SkillEntry | undefined;
83
+ /**
84
+ * Search for skills matching a query.
85
+ * @param query - Search query string
86
+ * @param options - Search options
87
+ */
88
+ search(query: string, options?: SkillSearchOptions): Promise<SkillSearchResult[]>;
89
+ /**
90
+ * Load a skill by ID.
91
+ * @param skillId - The skill identifier
92
+ */
93
+ loadSkill(skillId: string): Promise<SkillLoadResult | undefined>;
94
+ /**
95
+ * List skills with pagination.
96
+ * @param options - List options
97
+ */
98
+ listSkills(options?: SkillListOptions): Promise<SkillListResult>;
99
+ /**
100
+ * Check if any skills exist.
101
+ */
102
+ hasAny(): boolean;
103
+ /**
104
+ * Get total skill count.
105
+ * @param options - Count options
106
+ */
107
+ count(options?: {
108
+ tags?: string[];
109
+ includeHidden?: boolean;
110
+ }): Promise<number>;
111
+ /**
112
+ * Subscribe to skill change events.
113
+ * @param opts - Subscription options
114
+ * @param cb - Callback function
115
+ */
116
+ subscribe(opts: {
117
+ immediate?: boolean;
118
+ filter?: (skill: SkillEntry) => boolean;
119
+ }, cb: (event: SkillChangeEvent) => void): () => void;
120
+ /**
121
+ * Get MCP capabilities for skills.
122
+ */
123
+ getCapabilities(): Partial<ServerCapabilities>;
124
+ /**
125
+ * Validate all skills against the current tool registry.
126
+ * Should be called after all tools (including from plugins/adapters) are registered.
127
+ *
128
+ * @returns Validation report for all skills
129
+ * @throws SkillValidationError if failOnInvalidSkills is true and any skill fails
130
+ */
131
+ validateAllTools(): Promise<SkillValidationReport>;
132
+ /**
133
+ * Sync local skills to external storage.
134
+ * Only available when an external provider in persistent mode is set.
135
+ *
136
+ * @returns Sync result with added/updated/unchanged/removed counts, or null if no external provider
137
+ */
138
+ syncToExternal(): Promise<SyncResult | null>;
139
+ /**
140
+ * Get the external provider if one is configured.
141
+ */
142
+ getExternalProvider(): ExternalSkillProviderBase | undefined;
143
+ /**
144
+ * Check if the registry has an external provider.
145
+ */
146
+ hasExternalProvider(): boolean;
147
+ }
148
+ /**
149
+ * Registry for managing skills.
150
+ *
151
+ * The SkillRegistry is the main facade for:
152
+ * - Managing local skills (registered via @Skill decorator or skill() helper)
153
+ * - Searching skills using TF-IDF
154
+ * - Loading skill content (including fetching from URLs)
155
+ * - Tracking skill changes
156
+ */
157
+ export default class SkillRegistry extends RegistryAbstract<SkillInstance, SkillRecord, SkillType[]> implements SkillRegistryInterface {
158
+ /** Owner of this registry */
159
+ owner: EntryOwnerRef;
160
+ /** Local skills indexed for lookup */
161
+ private localRows;
162
+ /** Adopted skills from child registries */
163
+ private adopted;
164
+ /** Children registries */
165
+ private children;
166
+ /** O(1) indexes */
167
+ private byQualifiedId;
168
+ private byName;
169
+ private byOwnerAndName;
170
+ /** Version and emitter for change tracking */
171
+ private version;
172
+ private emitter;
173
+ /** Internal storage provider for search */
174
+ private storageProvider;
175
+ /** External skill provider for sync operations */
176
+ private externalProvider?;
177
+ /** Tool validator for checking tool availability */
178
+ private toolValidator?;
179
+ /** The scope this registry operates in */
180
+ readonly scope: Scope;
181
+ /** Registry-level options for validation behavior */
182
+ private readonly options;
183
+ constructor(providers: ProviderRegistry, list: SkillType[], owner: EntryOwnerRef, options?: SkillRegistryOptions);
184
+ protected buildMap(list: SkillType[]): RegistryBuildMapResult<SkillRecord>;
185
+ protected buildGraph(): void;
186
+ protected initialize(): Promise<void>;
187
+ /**
188
+ * Adopt skills from a child registry.
189
+ */
190
+ adoptFromChild(child: SkillRegistry, _childOwner: EntryOwnerRef): Promise<void>;
191
+ /**
192
+ * Get all skills in the registry.
193
+ * @param options - Options for filtering skills (or boolean for backwards compatibility)
194
+ */
195
+ getSkills(options?: boolean | GetSkillsOptions): SkillEntry[];
196
+ /**
197
+ * Get inline (local) skills only.
198
+ */
199
+ getInlineSkills(): SkillInstance[];
200
+ /**
201
+ * Find a skill by name.
202
+ */
203
+ findByName(name: string): SkillEntry | undefined;
204
+ /**
205
+ * Find a skill by qualified name.
206
+ */
207
+ findByQualifiedName(qualifiedName: string): SkillEntry | undefined;
208
+ /**
209
+ * Search for skills matching a query.
210
+ */
211
+ search(query: string, options?: SkillSearchOptions): Promise<SkillSearchResult[]>;
212
+ /**
213
+ * Load a skill by ID or name.
214
+ * Supports looking up by:
215
+ * - metadata.id (the unique identifier)
216
+ * - metadata.name (the display name)
217
+ * - qualified name (owner:name format)
218
+ */
219
+ loadSkill(skillId: string): Promise<SkillLoadResult | undefined>;
220
+ /**
221
+ * List skills with pagination.
222
+ */
223
+ listSkills(options?: SkillListOptions): Promise<SkillListResult>;
224
+ /**
225
+ * Check if any skills exist.
226
+ */
227
+ hasAny(): boolean;
228
+ /**
229
+ * Get total skill count.
230
+ */
231
+ count(options?: {
232
+ tags?: string[];
233
+ includeHidden?: boolean;
234
+ }): Promise<number>;
235
+ /**
236
+ * Subscribe to skill change events.
237
+ */
238
+ subscribe(opts: {
239
+ immediate?: boolean;
240
+ filter?: (skill: SkillEntry) => boolean;
241
+ }, cb: (event: SkillChangeEvent) => void): () => void;
242
+ /**
243
+ * Get MCP capabilities for skills.
244
+ */
245
+ getCapabilities(): Partial<ServerCapabilities>;
246
+ /**
247
+ * Validate all skills against the current tool registry.
248
+ * Should be called after all tools (including from plugins/adapters) are registered.
249
+ *
250
+ * This method:
251
+ * 1. Checks each skill's tool references against the tool registry
252
+ * 2. Respects per-skill and registry-level validation modes
253
+ * 3. Emits a 'validated' event with results
254
+ * 4. Optionally throws if failOnInvalidSkills is enabled
255
+ *
256
+ * @returns Validation report for all skills
257
+ * @throws SkillValidationError if failOnInvalidSkills is true and any skill fails
258
+ */
259
+ validateAllTools(): Promise<SkillValidationReport>;
260
+ private listAllIndexed;
261
+ private listAllInstances;
262
+ private reindex;
263
+ private makeRow;
264
+ private relineage;
265
+ private bump;
266
+ /**
267
+ * Set an external storage provider for skills.
268
+ *
269
+ * In read-only mode:
270
+ * - Search/list/load operations will query the external provider
271
+ *
272
+ * In persistent mode:
273
+ * - Local skills will be synced to external storage on syncToExternal()
274
+ * - Search/list/load operations still use local storage
275
+ *
276
+ * @param provider - External provider instance extending ExternalSkillProviderBase
277
+ */
278
+ setExternalProvider(provider: ExternalSkillProviderBase): void;
279
+ /**
280
+ * Get the external provider if one is configured.
281
+ */
282
+ getExternalProvider(): ExternalSkillProviderBase | undefined;
283
+ /**
284
+ * Check if the registry has an external provider.
285
+ */
286
+ hasExternalProvider(): boolean;
287
+ /**
288
+ * Sync local skills to external storage.
289
+ *
290
+ * This method:
291
+ * 1. Collects all local skill content
292
+ * 2. Calls syncSkills on the external provider
293
+ * 3. Returns the sync result with changes detected
294
+ *
295
+ * Only available when an external provider in persistent mode is configured.
296
+ *
297
+ * @returns Sync result or null if no external provider or in read-only mode
298
+ *
299
+ * @example
300
+ * ```typescript
301
+ * const result = await registry.syncToExternal();
302
+ * if (result) {
303
+ * console.log(`Synced: ${result.added.length} added, ${result.updated.length} updated`);
304
+ * }
305
+ * ```
306
+ */
307
+ syncToExternal(): Promise<SyncResult | null>;
308
+ }
309
+ //# sourceMappingURL=skill.registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill.registry.d.ts","sourceRoot":"","sources":["../../src/skill/skill.registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAa,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,uBAAuB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C;IAQ9C;;;;;;;;;;;;OAYG;IACG,gBAAgB,IAAI,OAAO,CAAC,qBAAqB,CAAC;IAoGxD,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,OAAO;IAqBf,OAAO,CAAC,OAAO;IAQf,OAAO,CAAC,SAAS;IAkBjB,OAAO,CAAC,IAAI;IAUZ;;;;;;;;;;;OAWG;IACH,mBAAmB,CAAC,QAAQ,EAAE,yBAAyB,GAAG,IAAI;IAa9D;;OAEG;IACH,mBAAmB,IAAI,yBAAyB,GAAG,SAAS;IAI5D;;OAEG;IACH,mBAAmB,IAAI,OAAO;IAI9B;;;;;;;;;;;;;;;;;;;OAmBG;IACG,cAAc,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;CAkDnD"}
@@ -0,0 +1,90 @@
1
+ import { Token } from '@frontmcp/di';
2
+ import { SkillMetadata, SkillRecord, SkillType, SkillInstructionSource } from '../common';
3
+ import { SkillContent } from '../common/interfaces';
4
+ /**
5
+ * Collect skill metadata from a decorated class.
6
+ *
7
+ * @param cls - The class to collect metadata from
8
+ * @returns The skill metadata
9
+ */
10
+ export declare function collectSkillMetadata(cls: SkillType): SkillMetadata;
11
+ /**
12
+ * Normalize any skill input to a SkillRecord.
13
+ *
14
+ * Handles:
15
+ * - Class with @Skill decorator → SkillClassTokenRecord
16
+ * - SkillValueRecord (from skill() helper) → passthrough
17
+ * - SkillFileRecord → passthrough
18
+ *
19
+ * @param item - The skill input to normalize
20
+ * @returns A normalized SkillRecord
21
+ * @throws Error if the input is invalid
22
+ */
23
+ export declare function normalizeSkill(item: unknown): SkillRecord;
24
+ /**
25
+ * Check if an object is a SkillRecord.
26
+ */
27
+ export declare function isSkillRecord(item: unknown): item is SkillRecord;
28
+ /**
29
+ * Get dependency tokens from a skill record for DI graph validation.
30
+ *
31
+ * @param rec - The skill record
32
+ * @returns Array of dependency tokens
33
+ */
34
+ export declare function skillDiscoveryDeps(rec: SkillRecord): Token[];
35
+ /**
36
+ * Load instructions from a skill instruction source.
37
+ *
38
+ * @param source - The instruction source (inline, file, or URL)
39
+ * @param basePath - Base path for resolving relative file paths
40
+ * @returns The loaded instructions as a string
41
+ */
42
+ export declare function loadInstructions(source: SkillInstructionSource, basePath?: string): Promise<string>;
43
+ /**
44
+ * Build SkillContent from metadata and resolved instructions.
45
+ *
46
+ * @param metadata - The skill metadata
47
+ * @param instructions - The resolved instructions string
48
+ * @returns The full skill content
49
+ */
50
+ export declare function buildSkillContent(metadata: SkillMetadata, instructions: string): SkillContent;
51
+ /**
52
+ * Format a skill for LLM consumption.
53
+ *
54
+ * Creates a markdown-formatted string with the skill instructions,
55
+ * tool information, and any warnings about missing tools.
56
+ *
57
+ * @param skill - The loaded skill content
58
+ * @param availableTools - List of available tools
59
+ * @param missingTools - List of missing tools
60
+ * @returns Formatted skill content as markdown
61
+ */
62
+ export declare function formatSkillForLLM(skill: SkillContent, availableTools: string[], missingTools: string[]): string;
63
+ /**
64
+ * Generate next steps guidance after loading skills.
65
+ *
66
+ * @param skills - Array of loaded skills with their tool availability
67
+ * @param allToolsAvailable - Whether all tools across all skills are available
68
+ * @returns Human-readable guidance string
69
+ */
70
+ export declare function generateNextSteps(skills: Array<{
71
+ name: string;
72
+ isComplete: boolean;
73
+ tools: Array<{
74
+ name: string;
75
+ available: boolean;
76
+ }>;
77
+ }>, allToolsAvailable: boolean): string;
78
+ /**
79
+ * Generate search guidance based on results.
80
+ *
81
+ * @param skills - Array of search results with executability info
82
+ * @param query - The original search query
83
+ * @returns Human-readable guidance string
84
+ */
85
+ export declare function generateSearchGuidance(skills: Array<{
86
+ name: string;
87
+ score: number;
88
+ canExecute: boolean;
89
+ }>, query: string): string;
90
+ //# sourceMappingURL=skill.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill.utils.d.ts","sourceRoot":"","sources":["../../src/skill/skill.utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAA2C,MAAM,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,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAAC,EACnE,KAAK,EAAE,MAAM,GACZ,MAAM,CAyBR"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Skill Sync Module
3
+ *
4
+ * Provides utilities for synchronizing local skills with external vector databases.
5
+ * Supports two modes:
6
+ * - Read-only: Pull skills from external source (no local persistence)
7
+ * - Persistent: SHA-based change detection, sync local skills to external store
8
+ *
9
+ * @module skill/sync
10
+ */
11
+ export { computeSkillHash, computeSkillHashComponents, areSkillsEqual } from './skill-hash';
12
+ export type { SkillHashComponents } from './skill-hash';
13
+ export { createEmptySyncState, serializeSyncState, deserializeSyncState } from './sync-state.interface';
14
+ export type { SkillSyncStatus, SkillSyncEntry, SkillSyncState, SerializedSkillSyncState, SkillSyncStateStore, SyncResult, } from './sync-state.interface';
15
+ export { MemorySyncStateStore } from './memory-sync-state.store';
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/skill/sync/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAGH,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5F,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACxG,YAAY,EACV,eAAe,EACf,cAAc,EACd,cAAc,EACd,wBAAwB,EACxB,mBAAmB,EACnB,UAAU,GACX,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { SkillSyncState, SkillSyncStateStore } from './sync-state.interface';
2
+ /**
3
+ * In-memory implementation of SkillSyncStateStore.
4
+ *
5
+ * Suitable for:
6
+ * - Development and testing
7
+ * - Single-instance deployments where persistence isn't required
8
+ * - Stateless sync operations (re-sync on each startup)
9
+ *
10
+ * Note: State is lost when the process exits.
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * const store = new MemorySyncStateStore();
15
+ *
16
+ * // Save state
17
+ * await store.save({ version: 1, lastFullSync: Date.now(), entries: new Map() });
18
+ *
19
+ * // Load state
20
+ * const state = await store.load();
21
+ * ```
22
+ */
23
+ export declare class MemorySyncStateStore implements SkillSyncStateStore {
24
+ private state;
25
+ /**
26
+ * Load the sync state from memory.
27
+ * @returns The stored state or null if not set
28
+ */
29
+ load(): Promise<SkillSyncState | null>;
30
+ /**
31
+ * Save the sync state to memory.
32
+ * @param state - The state to store
33
+ */
34
+ save(state: SkillSyncState): Promise<void>;
35
+ /**
36
+ * Clear the sync state from memory.
37
+ */
38
+ clear(): Promise<void>;
39
+ /**
40
+ * Check if any state is stored.
41
+ * Useful for determining if a full sync is needed.
42
+ */
43
+ hasState(): boolean;
44
+ /**
45
+ * Get the number of tracked skills.
46
+ */
47
+ getEntryCount(): number;
48
+ }
49
+ //# sourceMappingURL=memory-sync-state.store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-sync-state.store.d.ts","sourceRoot":"","sources":["../../../src/skill/sync/memory-sync-state.store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,oBAAqB,YAAW,mBAAmB;IAC9D,OAAO,CAAC,KAAK,CAA+B;IAE5C;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAa5C;;;OAGG;IACG,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAShD;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B;;;OAGG;IACH,QAAQ,IAAI,OAAO;IAInB;;OAEG;IACH,aAAa,IAAI,MAAM;CAGxB"}
@@ -0,0 +1,65 @@
1
+ import type { SkillContent } from '../../common/interfaces';
2
+ /**
3
+ * Components of a skill hash, useful for debugging and partial updates.
4
+ */
5
+ export interface SkillHashComponents {
6
+ /**
7
+ * SHA-256 hash of the instructions only.
8
+ */
9
+ instructionsHash: string;
10
+ /**
11
+ * SHA-256 hash of the tools array (sorted by name).
12
+ */
13
+ toolsHash: string;
14
+ /**
15
+ * SHA-256 hash of metadata (id, name, description).
16
+ */
17
+ metadataHash: string;
18
+ /**
19
+ * Combined hash of all components.
20
+ */
21
+ combinedHash: string;
22
+ }
23
+ /**
24
+ * Compute a deterministic SHA-256 hash of a skill's content.
25
+ * Used for change detection during sync operations.
26
+ *
27
+ * @param skill - The skill content to hash
28
+ * @returns Hexadecimal SHA-256 hash string
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * const hash1 = computeSkillHash(skill);
33
+ * // ... modify skill ...
34
+ * const hash2 = computeSkillHash(skill);
35
+ * if (hash1 !== hash2) {
36
+ * // Skill content changed, need to sync
37
+ * }
38
+ * ```
39
+ */
40
+ export declare function computeSkillHash(skill: SkillContent): string;
41
+ /**
42
+ * Compute detailed hash components for a skill.
43
+ * Useful for understanding what changed between versions.
44
+ *
45
+ * @param skill - The skill content to hash
46
+ * @returns Individual hash components and combined hash
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * const components = computeSkillHashComponents(skill);
51
+ * if (components.instructionsHash !== prevComponents.instructionsHash) {
52
+ * console.log('Instructions changed');
53
+ * }
54
+ * ```
55
+ */
56
+ export declare function computeSkillHashComponents(skill: SkillContent): SkillHashComponents;
57
+ /**
58
+ * Compare two skills for content equality using their hashes.
59
+ *
60
+ * @param skill1 - First skill
61
+ * @param skill2 - Second skill
62
+ * @returns True if skills have identical content
63
+ */
64
+ export declare function areSkillsEqual(skill1: SkillContent, skill2: SkillContent): boolean;
65
+ //# sourceMappingURL=skill-hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-hash.d.ts","sourceRoot":"","sources":["../../../src/skill/sync/skill-hash.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAiCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAG5D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,YAAY,GAAG,mBAAmB,CAmBnF;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAElF"}
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Status of a skill's synchronization with external storage.
3
+ */
4
+ export type SkillSyncStatus = 'synced' | 'pending' | 'failed';
5
+ /**
6
+ * Entry tracking the sync state of a single skill.
7
+ */
8
+ export interface SkillSyncEntry {
9
+ /**
10
+ * The skill's unique identifier.
11
+ */
12
+ skillId: string;
13
+ /**
14
+ * SHA-256 hash of the skill content at last sync.
15
+ */
16
+ hash: string;
17
+ /**
18
+ * Timestamp of the last successful sync (epoch ms).
19
+ */
20
+ lastSyncedAt: number;
21
+ /**
22
+ * Current sync status.
23
+ */
24
+ status: SkillSyncStatus;
25
+ /**
26
+ * Error message if status is 'failed'.
27
+ */
28
+ error?: string;
29
+ /**
30
+ * External storage ID if different from skillId.
31
+ * Used when external storage assigns its own identifiers.
32
+ */
33
+ externalId?: string;
34
+ }
35
+ /**
36
+ * Full sync state tracking all skills.
37
+ */
38
+ export interface SkillSyncState {
39
+ /**
40
+ * Version of the sync state format.
41
+ * Allows for future migrations.
42
+ */
43
+ version: number;
44
+ /**
45
+ * Timestamp of the last complete sync operation (epoch ms).
46
+ */
47
+ lastFullSync: number;
48
+ /**
49
+ * Map of skill ID to sync entry.
50
+ */
51
+ entries: Map<string, SkillSyncEntry>;
52
+ }
53
+ /**
54
+ * Serialized form of SkillSyncState for persistence.
55
+ */
56
+ export interface SerializedSkillSyncState {
57
+ version: number;
58
+ lastFullSync: number;
59
+ entries: Array<[string, SkillSyncEntry]>;
60
+ }
61
+ /**
62
+ * Interface for persisting skill sync state.
63
+ * Implementations can use memory, file system, or databases.
64
+ */
65
+ export interface SkillSyncStateStore {
66
+ /**
67
+ * Load the sync state from storage.
68
+ * @returns The sync state or null if not found
69
+ */
70
+ load(): Promise<SkillSyncState | null>;
71
+ /**
72
+ * Save the sync state to storage.
73
+ * @param state - The state to persist
74
+ */
75
+ save(state: SkillSyncState): Promise<void>;
76
+ /**
77
+ * Clear the sync state from storage.
78
+ */
79
+ clear(): Promise<void>;
80
+ }
81
+ /**
82
+ * Result of a sync operation.
83
+ */
84
+ export interface SyncResult {
85
+ /**
86
+ * IDs of newly added skills.
87
+ */
88
+ added: string[];
89
+ /**
90
+ * IDs of skills that were updated due to content changes.
91
+ */
92
+ updated: string[];
93
+ /**
94
+ * IDs of skills that were unchanged (hash matched).
95
+ */
96
+ unchanged: string[];
97
+ /**
98
+ * IDs of skills that were removed from external storage.
99
+ */
100
+ removed: string[];
101
+ /**
102
+ * IDs of skills that failed to sync with their errors.
103
+ */
104
+ failed: Array<{
105
+ skillId: string;
106
+ error: string;
107
+ }>;
108
+ /**
109
+ * Total duration of the sync operation in milliseconds.
110
+ */
111
+ durationMs: number;
112
+ }
113
+ /**
114
+ * Create an empty sync state with defaults.
115
+ */
116
+ export declare function createEmptySyncState(): SkillSyncState;
117
+ /**
118
+ * Serialize sync state for persistence.
119
+ */
120
+ export declare function serializeSyncState(state: SkillSyncState): SerializedSkillSyncState;
121
+ /**
122
+ * Deserialize sync state from persistence.
123
+ */
124
+ export declare function deserializeSyncState(data: SerializedSkillSyncState): SkillSyncState;
125
+ //# sourceMappingURL=sync-state.interface.d.ts.map