@frontmcp/sdk 1.0.4 → 1.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (443) hide show
  1. package/agent/agent.instance.d.ts +5 -7
  2. package/agent/agent.instance.d.ts.map +1 -1
  3. package/agent/agent.scope.d.ts +4 -4
  4. package/agent/flows/call-agent.flow.d.ts +211 -205
  5. package/agent/flows/call-agent.flow.d.ts.map +1 -1
  6. package/agent/hooks/agent.hooks.d.ts +4 -4
  7. package/agent/hooks/agent.hooks.d.ts.map +1 -1
  8. package/agent/index.d.ts +1 -1
  9. package/auth/flows/auth.verify.flow.d.ts +48 -44
  10. package/auth/flows/auth.verify.flow.d.ts.map +1 -1
  11. package/auth/flows/oauth.authorize.flow.d.ts +119 -137
  12. package/auth/flows/oauth.authorize.flow.d.ts.map +1 -1
  13. package/auth/flows/oauth.callback.flow.d.ts +64 -64
  14. package/auth/flows/oauth.callback.flow.d.ts.map +1 -1
  15. package/auth/flows/oauth.provider-callback.flow.d.ts +52 -52
  16. package/auth/flows/oauth.provider-callback.flow.d.ts.map +1 -1
  17. package/auth/flows/oauth.register.flow.d.ts +35 -48
  18. package/auth/flows/oauth.register.flow.d.ts.map +1 -1
  19. package/auth/flows/oauth.token.flow.d.ts +53 -80
  20. package/auth/flows/oauth.token.flow.d.ts.map +1 -1
  21. package/auth/flows/session.verify.flow.d.ts +86 -83
  22. package/auth/flows/session.verify.flow.d.ts.map +1 -1
  23. package/auth/flows/well-known.jwks.flow.d.ts +61 -61
  24. package/auth/flows/well-known.jwks.flow.d.ts.map +1 -1
  25. package/auth/flows/well-known.oauth-authorization-server.flow.d.ts +66 -66
  26. package/auth/flows/well-known.oauth-authorization-server.flow.d.ts.map +1 -1
  27. package/auth/flows/well-known.prm.flow.d.ts +35 -36
  28. package/auth/flows/well-known.prm.flow.d.ts.map +1 -1
  29. package/auth/session/transport-session.manager.d.ts +1 -1
  30. package/auth/session/transport-session.manager.d.ts.map +1 -1
  31. package/auth/session/utils/session-id.utils.d.ts +2 -2
  32. package/auth/session/utils/session-id.utils.d.ts.map +1 -1
  33. package/builtin/authorities/authorities.plugin.d.ts +25 -0
  34. package/builtin/authorities/authorities.plugin.d.ts.map +1 -0
  35. package/builtin/authorities/authorities.plugin.options.d.ts +45 -0
  36. package/builtin/authorities/authorities.plugin.options.d.ts.map +1 -0
  37. package/builtin/authorities/index.d.ts +3 -0
  38. package/builtin/authorities/index.d.ts.map +1 -0
  39. package/builtin/config/config.plugin.d.ts +2 -2
  40. package/builtin/config/config.plugin.d.ts.map +1 -1
  41. package/builtin/config/config.types.d.ts +1 -1
  42. package/builtin/config/config.types.d.ts.map +1 -1
  43. package/builtin/config/index.d.ts +2 -2
  44. package/builtin/config/index.d.ts.map +1 -1
  45. package/builtin/config/providers/config-loader.d.ts +1 -1
  46. package/builtin/config/providers/config-loader.d.ts.map +1 -1
  47. package/builtin/config/providers/config.service.d.ts +2 -2
  48. package/builtin/config/providers/config.service.d.ts.map +1 -1
  49. package/builtin/config/providers/env-loader.d.ts +1 -1
  50. package/builtin/config/providers/env-loader.d.ts.map +1 -1
  51. package/channel/channel-notification.service.d.ts +52 -0
  52. package/channel/channel-notification.service.d.ts.map +1 -0
  53. package/channel/channel-scope.helper.d.ts +37 -0
  54. package/channel/channel-scope.helper.d.ts.map +1 -0
  55. package/channel/channel.events.d.ts +25 -0
  56. package/channel/channel.events.d.ts.map +1 -0
  57. package/channel/channel.instance.d.ts +105 -0
  58. package/channel/channel.instance.d.ts.map +1 -0
  59. package/channel/channel.registry.d.ts +65 -0
  60. package/channel/channel.registry.d.ts.map +1 -0
  61. package/channel/channel.types.d.ts +14 -0
  62. package/channel/channel.types.d.ts.map +1 -0
  63. package/channel/channel.utils.d.ts +19 -0
  64. package/channel/channel.utils.d.ts.map +1 -0
  65. package/channel/flows/list-channels.flow.d.ts +41 -0
  66. package/channel/flows/list-channels.flow.d.ts.map +1 -0
  67. package/channel/flows/send-channel-notification.flow.d.ts +38 -0
  68. package/channel/flows/send-channel-notification.flow.d.ts.map +1 -0
  69. package/channel/index.d.ts +14 -0
  70. package/channel/index.d.ts.map +1 -0
  71. package/channel/reply/channel-reply.tool.d.ts +15 -0
  72. package/channel/reply/channel-reply.tool.d.ts.map +1 -0
  73. package/channel/reply/reply.types.d.ts +14 -0
  74. package/channel/reply/reply.types.d.ts.map +1 -0
  75. package/channel/sources/agent-completion.source.d.ts +29 -0
  76. package/channel/sources/agent-completion.source.d.ts.map +1 -0
  77. package/channel/sources/app-event.source.d.ts +57 -0
  78. package/channel/sources/app-event.source.d.ts.map +1 -0
  79. package/channel/sources/index.d.ts +5 -0
  80. package/channel/sources/index.d.ts.map +1 -0
  81. package/channel/sources/job-completion.source.d.ts +28 -0
  82. package/channel/sources/job-completion.source.d.ts.map +1 -0
  83. package/channel/sources/webhook.source.d.ts +42 -0
  84. package/channel/sources/webhook.source.d.ts.map +1 -0
  85. package/common/common.schema.d.ts +11 -11
  86. package/common/common.schema.d.ts.map +1 -1
  87. package/common/decorators/agent.decorator.d.ts +4 -4
  88. package/common/decorators/agent.decorator.d.ts.map +1 -1
  89. package/common/decorators/channel.decorator.d.ts +59 -0
  90. package/common/decorators/channel.decorator.d.ts.map +1 -0
  91. package/common/decorators/front-mcp.decorator.d.ts +1 -1
  92. package/common/decorators/front-mcp.decorator.d.ts.map +1 -1
  93. package/common/decorators/index.d.ts +1 -0
  94. package/common/decorators/index.d.ts.map +1 -1
  95. package/common/decorators/job.decorator.d.ts +13 -9
  96. package/common/decorators/job.decorator.d.ts.map +1 -1
  97. package/common/decorators/tool.decorator.d.ts +12 -7
  98. package/common/decorators/tool.decorator.d.ts.map +1 -1
  99. package/common/entries/agent.entry.d.ts +6 -6
  100. package/common/entries/agent.entry.d.ts.map +1 -1
  101. package/common/entries/channel.entry.d.ts +58 -0
  102. package/common/entries/channel.entry.d.ts.map +1 -0
  103. package/common/entries/index.d.ts +1 -0
  104. package/common/entries/index.d.ts.map +1 -1
  105. package/common/entries/job.entry.d.ts +7 -7
  106. package/common/entries/job.entry.d.ts.map +1 -1
  107. package/common/entries/scope.entry.d.ts +32 -14
  108. package/common/entries/scope.entry.d.ts.map +1 -1
  109. package/common/entries/tool.entry.d.ts +12 -8
  110. package/common/entries/tool.entry.d.ts.map +1 -1
  111. package/common/flow/flow.utils.d.ts +1 -1
  112. package/common/flow/flow.utils.d.ts.map +1 -1
  113. package/common/interfaces/agent.interface.d.ts +8 -8
  114. package/common/interfaces/agent.interface.d.ts.map +1 -1
  115. package/common/interfaces/channel.interface.d.ts +131 -0
  116. package/common/interfaces/channel.interface.d.ts.map +1 -0
  117. package/common/interfaces/execution-context.interface.d.ts +27 -8
  118. package/common/interfaces/execution-context.interface.d.ts.map +1 -1
  119. package/common/interfaces/flow.interface.d.ts +6 -6
  120. package/common/interfaces/flow.interface.d.ts.map +1 -1
  121. package/common/interfaces/index.d.ts +1 -0
  122. package/common/interfaces/index.d.ts.map +1 -1
  123. package/common/interfaces/internal/flow.utils.d.ts +2 -2
  124. package/common/interfaces/internal/flow.utils.d.ts.map +1 -1
  125. package/common/interfaces/internal/registry.interface.d.ts +3 -1
  126. package/common/interfaces/internal/registry.interface.d.ts.map +1 -1
  127. package/common/interfaces/resource.interface.d.ts +7 -0
  128. package/common/interfaces/resource.interface.d.ts.map +1 -1
  129. package/common/interfaces/server.interface.d.ts +5 -3
  130. package/common/interfaces/server.interface.d.ts.map +1 -1
  131. package/common/interfaces/tool.interface.d.ts +18 -6
  132. package/common/interfaces/tool.interface.d.ts.map +1 -1
  133. package/common/metadata/adapter.metadata.d.ts +5 -6
  134. package/common/metadata/adapter.metadata.d.ts.map +1 -1
  135. package/common/metadata/agent.metadata.d.ts +94 -95
  136. package/common/metadata/agent.metadata.d.ts.map +1 -1
  137. package/common/metadata/app-filter.metadata.d.ts +21 -22
  138. package/common/metadata/app-filter.metadata.d.ts.map +1 -1
  139. package/common/metadata/app.metadata.d.ts +554 -547
  140. package/common/metadata/app.metadata.d.ts.map +1 -1
  141. package/common/metadata/auth-provider.metadata.d.ts +6 -7
  142. package/common/metadata/auth-provider.metadata.d.ts.map +1 -1
  143. package/common/metadata/channel.metadata.d.ts +286 -0
  144. package/common/metadata/channel.metadata.d.ts.map +1 -0
  145. package/common/metadata/flow.metadata.d.ts +14 -14
  146. package/common/metadata/flow.metadata.d.ts.map +1 -1
  147. package/common/metadata/front-mcp.metadata.d.ts +3591 -2715
  148. package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
  149. package/common/metadata/index.d.ts +1 -0
  150. package/common/metadata/index.d.ts.map +1 -1
  151. package/common/metadata/job.metadata.d.ts +26 -27
  152. package/common/metadata/job.metadata.d.ts.map +1 -1
  153. package/common/metadata/logger.metadata.d.ts +5 -6
  154. package/common/metadata/logger.metadata.d.ts.map +1 -1
  155. package/common/metadata/plugin.metadata.d.ts +21 -22
  156. package/common/metadata/plugin.metadata.d.ts.map +1 -1
  157. package/common/metadata/prompt.metadata.d.ts +24 -25
  158. package/common/metadata/prompt.metadata.d.ts.map +1 -1
  159. package/common/metadata/provider.metadata.d.ts +6 -7
  160. package/common/metadata/provider.metadata.d.ts.map +1 -1
  161. package/common/metadata/resource.metadata.d.ts +40 -41
  162. package/common/metadata/resource.metadata.d.ts.map +1 -1
  163. package/common/metadata/skill.metadata.d.ts +57 -57
  164. package/common/metadata/skill.metadata.d.ts.map +1 -1
  165. package/common/metadata/tool.metadata.d.ts +145 -120
  166. package/common/metadata/tool.metadata.d.ts.map +1 -1
  167. package/common/metadata/workflow.metadata.d.ts +43 -44
  168. package/common/metadata/workflow.metadata.d.ts.map +1 -1
  169. package/common/records/channel.record.d.ts +52 -0
  170. package/common/records/channel.record.d.ts.map +1 -0
  171. package/common/records/index.d.ts +1 -0
  172. package/common/records/index.d.ts.map +1 -1
  173. package/common/schemas/annotated-class.schema.d.ts +15 -15
  174. package/common/schemas/annotated-class.schema.d.ts.map +1 -1
  175. package/common/schemas/http-input.schema.d.ts +8 -9
  176. package/common/schemas/http-input.schema.d.ts.map +1 -1
  177. package/common/schemas/http-output.schema.d.ts +500 -496
  178. package/common/schemas/http-output.schema.d.ts.map +1 -1
  179. package/common/schemas/session-header.schema.d.ts +1 -2
  180. package/common/schemas/session-header.schema.d.ts.map +1 -1
  181. package/common/tokens/app.tokens.d.ts.map +1 -1
  182. package/common/tokens/channel.tokens.d.ts +14 -0
  183. package/common/tokens/channel.tokens.d.ts.map +1 -0
  184. package/common/tokens/front-mcp.tokens.d.ts +2 -2
  185. package/common/tokens/front-mcp.tokens.d.ts.map +1 -1
  186. package/common/tokens/index.d.ts +1 -0
  187. package/common/tokens/index.d.ts.map +1 -1
  188. package/common/tokens/tool.tokens.d.ts +1 -0
  189. package/common/tokens/tool.tokens.d.ts.map +1 -1
  190. package/common/types/auth/session.types.d.ts +49 -50
  191. package/common/types/auth/session.types.d.ts.map +1 -1
  192. package/common/types/common.types.d.ts +1 -1
  193. package/common/types/common.types.d.ts.map +1 -1
  194. package/common/types/options/elicitation/schema.d.ts +28 -28
  195. package/common/types/options/elicitation/schema.d.ts.map +1 -1
  196. package/common/types/options/ext-apps/schema.d.ts +20 -20
  197. package/common/types/options/ext-apps/schema.d.ts.map +1 -1
  198. package/common/types/options/ext-apps/typecheck.d.ts.map +1 -1
  199. package/common/types/options/health/schema.d.ts +16 -16
  200. package/common/types/options/health/schema.d.ts.map +1 -1
  201. package/common/types/options/http/index.d.ts +1 -1
  202. package/common/types/options/http/index.d.ts.map +1 -1
  203. package/common/types/options/http/interfaces.d.ts +41 -1
  204. package/common/types/options/http/interfaces.d.ts.map +1 -1
  205. package/common/types/options/http/schema.d.ts +21 -12
  206. package/common/types/options/http/schema.d.ts.map +1 -1
  207. package/common/types/options/http/typecheck.d.ts.map +1 -1
  208. package/common/types/options/logging/schema.d.ts +8 -8
  209. package/common/types/options/logging/schema.d.ts.map +1 -1
  210. package/common/types/options/observability/schema.d.ts +6 -6
  211. package/common/types/options/observability/schema.d.ts.map +1 -1
  212. package/common/types/options/pagination/schema.d.ts +13 -13
  213. package/common/types/options/pagination/schema.d.ts.map +1 -1
  214. package/common/types/options/redis/schema.d.ts +62 -62
  215. package/common/types/options/redis/schema.d.ts.map +1 -1
  216. package/common/types/options/redis/typecheck.d.ts.map +1 -1
  217. package/common/types/options/server-info/schema.d.ts +13 -13
  218. package/common/types/options/server-info/schema.d.ts.map +1 -1
  219. package/common/types/options/session/schema.d.ts +22 -22
  220. package/common/types/options/session/schema.d.ts.map +1 -1
  221. package/common/types/options/skills-http/schema.d.ts +63 -63
  222. package/common/types/options/skills-http/schema.d.ts.map +1 -1
  223. package/common/types/options/skills-http/typecheck.d.ts.map +1 -1
  224. package/common/types/options/sqlite/schema.d.ts +9 -9
  225. package/common/types/options/sqlite/schema.d.ts.map +1 -1
  226. package/common/types/options/sqlite/typecheck.d.ts.map +1 -1
  227. package/common/types/options/transport/schema.d.ts +140 -140
  228. package/common/types/options/transport/schema.d.ts.map +1 -1
  229. package/common/types/options/transport/typecheck.d.ts.map +1 -1
  230. package/common/utils/decide-request-intent.utils.d.ts +16 -17
  231. package/common/utils/decide-request-intent.utils.d.ts.map +1 -1
  232. package/common/utils/path.utils.d.ts +10 -1
  233. package/common/utils/path.utils.d.ts.map +1 -1
  234. package/completion/flows/complete.flow.d.ts +68 -69
  235. package/completion/flows/complete.flow.d.ts.map +1 -1
  236. package/context/frontmcp-context.d.ts +9 -7
  237. package/context/frontmcp-context.d.ts.map +1 -1
  238. package/direct/create.d.ts +1 -1
  239. package/direct/create.d.ts.map +1 -1
  240. package/elicitation/elicitation.types.d.ts +2 -2
  241. package/elicitation/elicitation.types.d.ts.map +1 -1
  242. package/elicitation/flows/elicitation-request.flow.d.ts +40 -40
  243. package/elicitation/flows/elicitation-request.flow.d.ts.map +1 -1
  244. package/elicitation/flows/elicitation-result.flow.d.ts +23 -23
  245. package/elicitation/flows/elicitation-result.flow.d.ts.map +1 -1
  246. package/elicitation/helpers/elicit.helper.d.ts +4 -4
  247. package/elicitation/helpers/elicit.helper.d.ts.map +1 -1
  248. package/elicitation/helpers/extend-output-schema.d.ts.map +1 -1
  249. package/elicitation/send-elicitation-result.tool.d.ts.map +1 -1
  250. package/errors/authorization-required.error.d.ts +44 -44
  251. package/errors/authorization-required.error.d.ts.map +1 -1
  252. package/errors/index.d.ts +3 -2
  253. package/errors/index.d.ts.map +1 -1
  254. package/errors/sdk.errors.d.ts +6 -0
  255. package/errors/sdk.errors.d.ts.map +1 -1
  256. package/errors/task.error.d.ts +55 -0
  257. package/errors/task.error.d.ts.map +1 -0
  258. package/errors/transport.errors.d.ts +6 -0
  259. package/errors/transport.errors.d.ts.map +1 -1
  260. package/esm/index.mjs +42394 -36842
  261. package/esm-loader/esm-auth.types.d.ts +5 -6
  262. package/esm-loader/esm-auth.types.d.ts.map +1 -1
  263. package/esm-loader/esm-manifest.d.ts +13 -14
  264. package/esm-loader/esm-manifest.d.ts.map +1 -1
  265. package/esm-loader/factories/esm-record-builders.d.ts +2 -2
  266. package/esm-loader/factories/esm-record-builders.d.ts.map +1 -1
  267. package/front-mcp/front-mcp.d.ts +3 -3
  268. package/front-mcp/front-mcp.d.ts.map +1 -1
  269. package/front-mcp/front-mcp.providers.d.ts +328 -28
  270. package/front-mcp/front-mcp.providers.d.ts.map +1 -1
  271. package/ha/ha-manager.d.ts +119 -0
  272. package/ha/ha-manager.d.ts.map +1 -0
  273. package/ha/ha.constants.d.ts +11 -0
  274. package/ha/ha.constants.d.ts.map +1 -0
  275. package/ha/ha.types.d.ts +42 -0
  276. package/ha/ha.types.d.ts.map +1 -0
  277. package/ha/heartbeat.service.d.ts +44 -0
  278. package/ha/heartbeat.service.d.ts.map +1 -0
  279. package/ha/index.d.ts +8 -0
  280. package/ha/index.d.ts.map +1 -0
  281. package/ha/notification-relay.d.ts +60 -0
  282. package/ha/notification-relay.d.ts.map +1 -0
  283. package/ha/session-takeover.d.ts +28 -0
  284. package/ha/session-takeover.d.ts.map +1 -0
  285. package/health/health.service.d.ts +5 -0
  286. package/health/health.service.d.ts.map +1 -1
  287. package/index.d.ts +45 -28
  288. package/index.d.ts.map +1 -1
  289. package/index.js +43391 -37819
  290. package/job/job.instance.d.ts +6 -8
  291. package/job/job.instance.d.ts.map +1 -1
  292. package/job/tools/execute-job.tool.d.ts.map +1 -1
  293. package/job/tools/get-job-status.tool.d.ts.map +1 -1
  294. package/job/tools/list-jobs.tool.d.ts.map +1 -1
  295. package/job/tools/register-job.tool.d.ts.map +1 -1
  296. package/job/tools/remove-job.tool.d.ts.map +1 -1
  297. package/logging/flows/set-level.flow.d.ts +38 -39
  298. package/logging/flows/set-level.flow.d.ts.map +1 -1
  299. package/notification/index.d.ts +1 -1
  300. package/notification/index.d.ts.map +1 -1
  301. package/notification/notification.service.d.ts +68 -4
  302. package/notification/notification.service.d.ts.map +1 -1
  303. package/package.json +18 -14
  304. package/prompt/flows/get-prompt.flow.d.ts +194 -189
  305. package/prompt/flows/get-prompt.flow.d.ts.map +1 -1
  306. package/prompt/flows/prompts-list.flow.d.ts +60 -56
  307. package/prompt/flows/prompts-list.flow.d.ts.map +1 -1
  308. package/resource/flows/read-resource.flow.d.ts +91 -86
  309. package/resource/flows/read-resource.flow.d.ts.map +1 -1
  310. package/resource/flows/resource-templates-list.flow.d.ts +62 -58
  311. package/resource/flows/resource-templates-list.flow.d.ts.map +1 -1
  312. package/resource/flows/resources-list.flow.d.ts +62 -58
  313. package/resource/flows/resources-list.flow.d.ts.map +1 -1
  314. package/resource/flows/subscribe-resource.flow.d.ts +38 -39
  315. package/resource/flows/subscribe-resource.flow.d.ts.map +1 -1
  316. package/resource/flows/unsubscribe-resource.flow.d.ts +38 -39
  317. package/resource/flows/unsubscribe-resource.flow.d.ts.map +1 -1
  318. package/resource/resource.events.d.ts +2 -0
  319. package/resource/resource.events.d.ts.map +1 -1
  320. package/resource/resource.registry.d.ts +7 -0
  321. package/resource/resource.registry.d.ts.map +1 -1
  322. package/scope/flows/http.request.flow.d.ts +58 -56
  323. package/scope/flows/http.request.flow.d.ts.map +1 -1
  324. package/scope/scope.instance.d.ts +81 -15
  325. package/scope/scope.instance.d.ts.map +1 -1
  326. package/server/adapters/base.host.adapter.d.ts +4 -1
  327. package/server/adapters/base.host.adapter.d.ts.map +1 -1
  328. package/server/adapters/express.host.adapter.d.ts +8 -2
  329. package/server/adapters/express.host.adapter.d.ts.map +1 -1
  330. package/server/middleware/csp.middleware.d.ts +64 -0
  331. package/server/middleware/csp.middleware.d.ts.map +1 -0
  332. package/server/middleware/host-validation.middleware.d.ts +25 -0
  333. package/server/middleware/host-validation.middleware.d.ts.map +1 -0
  334. package/server/security/security-audit.d.ts +66 -0
  335. package/server/security/security-audit.d.ts.map +1 -0
  336. package/server/server.instance.d.ts +4 -4
  337. package/server/server.instance.d.ts.map +1 -1
  338. package/skill/flows/http/llm-full-txt.flow.d.ts +27 -32
  339. package/skill/flows/http/llm-full-txt.flow.d.ts.map +1 -1
  340. package/skill/flows/http/llm-txt.flow.d.ts +27 -32
  341. package/skill/flows/http/llm-txt.flow.d.ts.map +1 -1
  342. package/skill/flows/http/skills-api.flow.d.ts +33 -38
  343. package/skill/flows/http/skills-api.flow.d.ts.map +1 -1
  344. package/skill/flows/load-skill.flow.d.ts +100 -100
  345. package/skill/flows/load-skill.flow.d.ts.map +1 -1
  346. package/skill/flows/search-skills.flow.d.ts +56 -57
  347. package/skill/flows/search-skills.flow.d.ts.map +1 -1
  348. package/task/flows/tasks-cancel.flow.d.ts +72 -0
  349. package/task/flows/tasks-cancel.flow.d.ts.map +1 -0
  350. package/task/flows/tasks-get.flow.d.ts +69 -0
  351. package/task/flows/tasks-get.flow.d.ts.map +1 -0
  352. package/task/flows/tasks-list.flow.d.ts +73 -0
  353. package/task/flows/tasks-list.flow.d.ts.map +1 -0
  354. package/task/flows/tasks-result.flow.d.ts +93 -0
  355. package/task/flows/tasks-result.flow.d.ts.map +1 -0
  356. package/task/helpers/cli-task-runner.d.ts +46 -0
  357. package/task/helpers/cli-task-runner.d.ts.map +1 -0
  358. package/task/helpers/in-process-task-runner.d.ts +28 -0
  359. package/task/helpers/in-process-task-runner.d.ts.map +1 -0
  360. package/task/helpers/process-liveness.d.ts +16 -0
  361. package/task/helpers/process-liveness.d.ts.map +1 -0
  362. package/task/helpers/task-id.d.ts +10 -0
  363. package/task/helpers/task-id.d.ts.map +1 -0
  364. package/task/helpers/task-notifier.d.ts +20 -0
  365. package/task/helpers/task-notifier.d.ts.map +1 -0
  366. package/task/helpers/task-runner.d.ts +47 -0
  367. package/task/helpers/task-runner.d.ts.map +1 -0
  368. package/task/helpers/task-runner.types.d.ts +32 -0
  369. package/task/helpers/task-runner.types.d.ts.map +1 -0
  370. package/task/index.d.ts +24 -0
  371. package/task/index.d.ts.map +1 -0
  372. package/task/runtime/execute-task-flag.d.ts +11 -0
  373. package/task/runtime/execute-task-flag.d.ts.map +1 -0
  374. package/task/runtime/execute-task.d.ts +21 -0
  375. package/task/runtime/execute-task.d.ts.map +1 -0
  376. package/task/store/index.d.ts +4 -0
  377. package/task/store/index.d.ts.map +1 -0
  378. package/task/store/storage-task.store.d.ts +42 -0
  379. package/task/store/storage-task.store.d.ts.map +1 -0
  380. package/task/store/task-store.factory.d.ts +58 -0
  381. package/task/store/task-store.factory.d.ts.map +1 -0
  382. package/task/store/task.store.d.ts +76 -0
  383. package/task/store/task.store.d.ts.map +1 -0
  384. package/task/task-scope.helper.d.ts +18 -0
  385. package/task/task-scope.helper.d.ts.map +1 -0
  386. package/task/task.registry.d.ts +68 -0
  387. package/task/task.registry.d.ts.map +1 -0
  388. package/task/task.types.d.ts +201 -0
  389. package/task/task.types.d.ts.map +1 -0
  390. package/tool/flows/call-tool.flow.d.ts +216 -197
  391. package/tool/flows/call-tool.flow.d.ts.map +1 -1
  392. package/tool/flows/tools-list.flow.d.ts +82 -76
  393. package/tool/flows/tools-list.flow.d.ts.map +1 -1
  394. package/tool/tool.instance.d.ts +4 -6
  395. package/tool/tool.instance.d.ts.map +1 -1
  396. package/tool/tool.utils.d.ts +2 -2
  397. package/tool/tool.utils.d.ts.map +1 -1
  398. package/transport/adapters/transport.local.adapter.d.ts +10 -11
  399. package/transport/adapters/transport.local.adapter.d.ts.map +1 -1
  400. package/transport/adapters/transport.sse.adapter.d.ts +5 -5
  401. package/transport/adapters/transport.sse.adapter.d.ts.map +1 -1
  402. package/transport/adapters/transport.streamable-http.adapter.d.ts +7 -7
  403. package/transport/adapters/transport.streamable-http.adapter.d.ts.map +1 -1
  404. package/transport/bus/index.d.ts +3 -0
  405. package/transport/bus/index.d.ts.map +1 -0
  406. package/transport/bus/redis-transport-bus.d.ts +90 -0
  407. package/transport/bus/redis-transport-bus.d.ts.map +1 -0
  408. package/transport/flows/handle.sse.flow.d.ts +17 -18
  409. package/transport/flows/handle.sse.flow.d.ts.map +1 -1
  410. package/transport/flows/handle.stateless-http.flow.d.ts +6 -7
  411. package/transport/flows/handle.stateless-http.flow.d.ts.map +1 -1
  412. package/transport/flows/handle.streamable-http.flow.d.ts +19 -19
  413. package/transport/flows/handle.streamable-http.flow.d.ts.map +1 -1
  414. package/transport/in-memory-server.d.ts +2 -3
  415. package/transport/in-memory-server.d.ts.map +1 -1
  416. package/transport/mcp-handlers/call-tool-request.handler.d.ts +2 -2
  417. package/transport/mcp-handlers/call-tool-request.handler.d.ts.map +1 -1
  418. package/transport/mcp-handlers/index.d.ts +719 -565
  419. package/transport/mcp-handlers/index.d.ts.map +1 -1
  420. package/transport/mcp-handlers/initialize-request.handler.d.ts.map +1 -1
  421. package/transport/mcp-handlers/mcp-error.utils.d.ts +15 -0
  422. package/transport/mcp-handlers/mcp-error.utils.d.ts.map +1 -0
  423. package/transport/mcp-handlers/mcp-handlers.types.d.ts +3 -3
  424. package/transport/mcp-handlers/mcp-handlers.types.d.ts.map +1 -1
  425. package/transport/mcp-handlers/skills-mcp.types.d.ts +97 -97
  426. package/transport/mcp-handlers/skills-mcp.types.d.ts.map +1 -1
  427. package/transport/mcp-handlers/tasks-cancel-request.handler.d.ts +4 -0
  428. package/transport/mcp-handlers/tasks-cancel-request.handler.d.ts.map +1 -0
  429. package/transport/mcp-handlers/tasks-get-request.handler.d.ts +4 -0
  430. package/transport/mcp-handlers/tasks-get-request.handler.d.ts.map +1 -0
  431. package/transport/mcp-handlers/tasks-list-request.handler.d.ts +4 -0
  432. package/transport/mcp-handlers/tasks-list-request.handler.d.ts.map +1 -0
  433. package/transport/mcp-handlers/tasks-result-request.handler.d.ts +4 -0
  434. package/transport/mcp-handlers/tasks-result-request.handler.d.ts.map +1 -0
  435. package/transport/transport.registry.d.ts +9 -4
  436. package/transport/transport.registry.d.ts.map +1 -1
  437. package/types/zod.types.d.ts +1 -1
  438. package/types/zod.types.d.ts.map +1 -1
  439. package/workflow/tools/execute-workflow.tool.d.ts.map +1 -1
  440. package/workflow/tools/get-workflow-status.tool.d.ts.map +1 -1
  441. package/workflow/tools/list-workflows.tool.d.ts.map +1 -1
  442. package/workflow/tools/register-workflow.tool.d.ts.map +1 -1
  443. package/workflow/tools/remove-workflow.tool.d.ts.map +1 -1
@@ -0,0 +1,69 @@
1
+ /**
2
+ * tasks/get flow — returns the current state snapshot of a task.
3
+ *
4
+ * Per MCP 2025-11-25 §Getting Tasks. Non-blocking: returns the record as-is,
5
+ * whether `working`, `input_required`, or terminal.
6
+ *
7
+ * @module task/flows/tasks-get.flow
8
+ */
9
+ import { z } from '@frontmcp/lazy-zod';
10
+ import { type AuthInfo } from '@frontmcp/protocol';
11
+ import { FlowBase, type FlowRunOptions } from '../../common';
12
+ declare const inputSchema: import("@frontmcp/lazy-zod").ZodObject<{
13
+ request: import("@frontmcp/lazy-zod").ZodObject<{
14
+ method: import("@frontmcp/lazy-zod").ZodLiteral<"tasks/get">;
15
+ params: import("@frontmcp/lazy-zod").ZodObject<{
16
+ _meta: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodObject<{
17
+ progressToken: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodUnion<readonly [import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodNumber]>>;
18
+ "io.modelcontextprotocol/related-task": import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodObject<{
19
+ taskId: import("@frontmcp/lazy-zod").ZodString;
20
+ }, import("zod/v4/core").$strip>>;
21
+ }, import("zod/v4/core").$loose>>;
22
+ taskId: import("@frontmcp/lazy-zod").ZodString;
23
+ }, import("zod/v4/core").$strip>;
24
+ }, import("zod/v4/core").$strip>;
25
+ ctx: import("@frontmcp/lazy-zod").ZodAny;
26
+ }, import("zod/v4/core").$strip>;
27
+ declare const outputSchema: import("@frontmcp/lazy-zod").ZodObject<{
28
+ _meta: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodObject<{
29
+ progressToken: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodUnion<readonly [import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodNumber]>>;
30
+ "io.modelcontextprotocol/related-task": import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodObject<{
31
+ taskId: import("@frontmcp/lazy-zod").ZodString;
32
+ }, import("zod/v4/core").$strip>>;
33
+ }, import("zod/v4/core").$loose>>;
34
+ taskId: import("@frontmcp/lazy-zod").ZodString;
35
+ status: import("@frontmcp/lazy-zod").ZodEnum<{
36
+ working: "working";
37
+ input_required: "input_required";
38
+ completed: "completed";
39
+ failed: "failed";
40
+ cancelled: "cancelled";
41
+ }>;
42
+ ttl: import("@frontmcp/lazy-zod").ZodUnion<readonly [import("@frontmcp/lazy-zod").ZodNumber, import("@frontmcp/lazy-zod").ZodNull]>;
43
+ createdAt: import("@frontmcp/lazy-zod").ZodString;
44
+ lastUpdatedAt: import("@frontmcp/lazy-zod").ZodString;
45
+ pollInterval: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodNumber>;
46
+ statusMessage: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
47
+ }, import("zod/v4/core").$strip>;
48
+ declare const stateSchema: import("@frontmcp/lazy-zod").ZodObject<{
49
+ taskId: import("@frontmcp/lazy-zod").ZodString;
50
+ sessionId: import("@frontmcp/lazy-zod").ZodString;
51
+ authInfo: z.ZodType<AuthInfo>;
52
+ }, import("zod/v4/core").$strip>;
53
+ declare const plan: {
54
+ readonly pre: ["parseInput"];
55
+ readonly execute: ["fetchAndRespond"];
56
+ };
57
+ declare global {
58
+ interface ExtendFlows {
59
+ 'tasks:get': FlowRunOptions<TasksGetFlow, typeof plan, typeof inputSchema, typeof outputSchema, typeof stateSchema>;
60
+ }
61
+ }
62
+ declare const name: "tasks:get";
63
+ export default class TasksGetFlow extends FlowBase<typeof name> {
64
+ logger: import("../../common").FrontMcpLogger;
65
+ parseInput(): Promise<void>;
66
+ fetchAndRespond(): Promise<void>;
67
+ }
68
+ export {};
69
+ //# sourceMappingURL=tasks-get.flow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks-get.flow.d.ts","sourceRoot":"","sources":["../../../src/task/flows/tasks-get.flow.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAA6C,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9F,OAAO,EAAQ,QAAQ,EAA8B,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAU/F,QAAA,MAAM,WAAW;;;;;;;;;;;;;;gCAGf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;gCAAsB,CAAC;AAEzC,QAAA,MAAM,WAAW;;;cAGM,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;gCACxC,CAAC;AAEH,QAAA,MAAM,IAAI;;;CAG2B,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,WAAW,EAAE,cAAc,CAAC,YAAY,EAAE,OAAO,IAAI,EAAE,OAAO,WAAW,EAAE,OAAO,YAAY,EAAE,OAAO,WAAW,CAAC,CAAC;KACrH;CACF;AAED,QAAA,MAAM,IAAI,EAAG,WAAoB,CAAC;AAUlC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IAC7D,MAAM,wCAA0C;IAG1C,UAAU;IAuBV,eAAe;CAUtB"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * tasks/list flow — paginated, session-scoped list of tasks.
3
+ *
4
+ * Per MCP 2025-11-25 §Task Listing and §Security: we only return tasks owned
5
+ * by the requesting session. The list capability is advertised only when
6
+ * requestors are identifiable; otherwise listing tasks would leak metadata.
7
+ *
8
+ * @module task/flows/tasks-list.flow
9
+ */
10
+ import { z } from '@frontmcp/lazy-zod';
11
+ import { type AuthInfo } from '@frontmcp/protocol';
12
+ import { FlowBase, type FlowRunOptions } from '../../common';
13
+ declare const inputSchema: import("@frontmcp/lazy-zod").ZodObject<{
14
+ request: import("@frontmcp/lazy-zod").ZodObject<{
15
+ params: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodObject<{
16
+ _meta: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodObject<{
17
+ progressToken: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodUnion<readonly [import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodNumber]>>;
18
+ "io.modelcontextprotocol/related-task": import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodObject<{
19
+ taskId: import("@frontmcp/lazy-zod").ZodString;
20
+ }, import("zod/v4/core").$strip>>;
21
+ }, import("zod/v4/core").$loose>>;
22
+ cursor: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
23
+ }, import("zod/v4/core").$strip>>;
24
+ method: import("@frontmcp/lazy-zod").ZodLiteral<"tasks/list">;
25
+ }, import("zod/v4/core").$strip>;
26
+ ctx: import("@frontmcp/lazy-zod").ZodAny;
27
+ }, import("zod/v4/core").$strip>;
28
+ declare const outputSchema: import("@frontmcp/lazy-zod").ZodObject<{
29
+ _meta: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodObject<{
30
+ progressToken: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodUnion<readonly [import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodNumber]>>;
31
+ "io.modelcontextprotocol/related-task": import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodObject<{
32
+ taskId: import("@frontmcp/lazy-zod").ZodString;
33
+ }, import("zod/v4/core").$strip>>;
34
+ }, import("zod/v4/core").$loose>>;
35
+ nextCursor: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
36
+ tasks: import("@frontmcp/lazy-zod").ZodArray<import("@frontmcp/lazy-zod").ZodObject<{
37
+ taskId: import("@frontmcp/lazy-zod").ZodString;
38
+ status: import("@frontmcp/lazy-zod").ZodEnum<{
39
+ working: "working";
40
+ input_required: "input_required";
41
+ completed: "completed";
42
+ failed: "failed";
43
+ cancelled: "cancelled";
44
+ }>;
45
+ ttl: import("@frontmcp/lazy-zod").ZodUnion<readonly [import("@frontmcp/lazy-zod").ZodNumber, import("@frontmcp/lazy-zod").ZodNull]>;
46
+ createdAt: import("@frontmcp/lazy-zod").ZodString;
47
+ lastUpdatedAt: import("@frontmcp/lazy-zod").ZodString;
48
+ pollInterval: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodNumber>;
49
+ statusMessage: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
50
+ }, import("zod/v4/core").$strip>>;
51
+ }, import("zod/v4/core").$loose>;
52
+ declare const stateSchema: import("@frontmcp/lazy-zod").ZodObject<{
53
+ sessionId: import("@frontmcp/lazy-zod").ZodString;
54
+ cursor: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodString>;
55
+ authInfo: z.ZodType<AuthInfo>;
56
+ }, import("zod/v4/core").$strip>;
57
+ declare const plan: {
58
+ readonly pre: ["parseInput"];
59
+ readonly execute: ["listAndRespond"];
60
+ };
61
+ declare global {
62
+ interface ExtendFlows {
63
+ 'tasks:list': FlowRunOptions<TasksListFlow, typeof plan, typeof inputSchema, typeof outputSchema, typeof stateSchema>;
64
+ }
65
+ }
66
+ declare const name: "tasks:list";
67
+ export default class TasksListFlow extends FlowBase<typeof name> {
68
+ logger: import("../../common").FrontMcpLogger;
69
+ parseInput(): Promise<void>;
70
+ listAndRespond(): Promise<void>;
71
+ }
72
+ export {};
73
+ //# sourceMappingURL=tasks-list.flow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks-list.flow.d.ts","sourceRoot":"","sources":["../../../src/task/flows/tasks-list.flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAiD,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAElG,OAAO,EAAQ,QAAQ,EAA8B,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAI/F,QAAA,MAAM,WAAW;;;;;;;;;;;;;;gCAGf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;gCAAwB,CAAC;AAE3C,QAAA,MAAM,WAAW;;;cAGM,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;gCACxC,CAAC;AAEH,QAAA,MAAM,IAAI;;;CAG2B,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,YAAY,EAAE,cAAc,CAC1B,aAAa,EACb,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,YAAY,EACnB,OAAO,WAAW,CACnB,CAAC;KACH;CACF;AAED,QAAA,MAAM,IAAI,EAAG,YAAqB,CAAC;AAUnC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IAC9D,MAAM,wCAA2C;IAG3C,UAAU;IAuBV,cAAc;CAWrB"}
@@ -0,0 +1,93 @@
1
+ /**
2
+ * tasks/result flow — blocks until the task reaches a terminal status, then
3
+ * returns the underlying request's result verbatim.
4
+ *
5
+ * Per MCP 2025-11-25 §Result Retrieval:
6
+ * - For terminal tasks, MUST return exactly what the underlying request would
7
+ * have returned (a `CallToolResult` on success, or the original JSON-RPC
8
+ * error on failure).
9
+ * - For non-terminal tasks, MUST block until terminal. We use the store's
10
+ * pub/sub `subscribeTerminal` so cross-node unblocking works automatically.
11
+ * - The response MUST include `_meta['io.modelcontextprotocol/related-task']`
12
+ * with the `taskId` (unlike `tasks/get`/`list`/`cancel`).
13
+ *
14
+ * @module task/flows/tasks-result.flow
15
+ */
16
+ import { z } from '@frontmcp/lazy-zod';
17
+ import { type AuthInfo } from '@frontmcp/protocol';
18
+ import { FlowBase, type FlowRunOptions } from '../../common';
19
+ declare const inputSchema: import("@frontmcp/lazy-zod").ZodObject<{
20
+ request: import("@frontmcp/lazy-zod").ZodObject<{
21
+ method: import("@frontmcp/lazy-zod").ZodLiteral<"tasks/result">;
22
+ params: import("@frontmcp/lazy-zod").ZodObject<{
23
+ _meta: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodObject<{
24
+ progressToken: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodUnion<readonly [import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodNumber]>>;
25
+ "io.modelcontextprotocol/related-task": import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodObject<{
26
+ taskId: import("@frontmcp/lazy-zod").ZodString;
27
+ }, import("zod/v4/core").$strip>>;
28
+ }, import("zod/v4/core").$loose>>;
29
+ taskId: import("@frontmcp/lazy-zod").ZodString;
30
+ }, import("zod/v4/core").$strip>;
31
+ }, import("zod/v4/core").$strip>;
32
+ ctx: import("@frontmcp/lazy-zod").ZodAny;
33
+ }, import("zod/v4/core").$strip>;
34
+ declare const outputSchema: import("@frontmcp/lazy-zod").ZodObject<{
35
+ _meta: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodObject<{
36
+ progressToken: import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodUnion<readonly [import("@frontmcp/lazy-zod").ZodString, import("@frontmcp/lazy-zod").ZodNumber]>>;
37
+ "io.modelcontextprotocol/related-task": import("@frontmcp/lazy-zod").ZodOptional<import("@frontmcp/lazy-zod").ZodObject<{
38
+ taskId: import("@frontmcp/lazy-zod").ZodString;
39
+ }, import("zod/v4/core").$strip>>;
40
+ }, import("zod/v4/core").$loose>>;
41
+ }, import("zod/v4/core").$loose>;
42
+ declare const stateSchema: import("@frontmcp/lazy-zod").ZodObject<{
43
+ taskId: import("@frontmcp/lazy-zod").ZodString;
44
+ sessionId: import("@frontmcp/lazy-zod").ZodString;
45
+ authInfo: z.ZodType<AuthInfo>;
46
+ }, import("zod/v4/core").$strip>;
47
+ declare const plan: {
48
+ readonly pre: ["parseInput"];
49
+ readonly execute: ["awaitTerminal"];
50
+ };
51
+ declare global {
52
+ interface ExtendFlows {
53
+ 'tasks:result': FlowRunOptions<TasksResultFlow, typeof plan, typeof inputSchema, typeof outputSchema, typeof stateSchema>;
54
+ }
55
+ }
56
+ declare const name: "tasks:result";
57
+ export default class TasksResultFlow extends FlowBase<typeof name> {
58
+ logger: import("../../common").FrontMcpLogger;
59
+ parseInput(): Promise<void>;
60
+ awaitTerminal(): Promise<void>;
61
+ /**
62
+ * Block until the task reaches a terminal state.
63
+ *
64
+ * Two wake-up paths:
65
+ * 1. `subscribeTerminal` — instant for backends whose pub/sub reaches this
66
+ * process (memory, Redis/Upstash, SQLite within the same process).
67
+ * 2. Periodic `store.get` polling — the only path that works for the
68
+ * SQLite backend when the caller and the runner live in different
69
+ * processes (CLI runner + future stdio invocation). Without this, those
70
+ * callers would block forever since the child's EventEmitter never
71
+ * reaches the parent.
72
+ */
73
+ private waitForTerminal;
74
+ private pollDelayMs;
75
+ private respondWithOutcome;
76
+ }
77
+ /**
78
+ * Thrown from `tasks:result` when the underlying request terminated in error.
79
+ * The handler converts this back into the exact JSON-RPC error per spec.
80
+ */
81
+ export declare class JsonRpcReplayError extends Error {
82
+ readonly code: number;
83
+ readonly data: unknown;
84
+ readonly taskId: string;
85
+ constructor(code: number, message: string, data: unknown, taskId: string);
86
+ toJsonRpcError(): {
87
+ code: number;
88
+ message: string;
89
+ data?: unknown;
90
+ };
91
+ }
92
+ export {};
93
+ //# sourceMappingURL=tasks-result.flow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks-result.flow.d.ts","sourceRoot":"","sources":["../../../src/task/flows/tasks-result.flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAA2D,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE5G,OAAO,EAAQ,QAAQ,EAA8B,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAU/F,QAAA,MAAM,WAAW;;;;;;;;;;;;;;gCAGf,CAAC;AAKH,QAAA,MAAM,YAAY;;;;;;;gCAA6B,CAAC;AAEhD,QAAA,MAAM,WAAW;;;cAGM,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;gCACxC,CAAC;AAEH,QAAA,MAAM,IAAI;;;CAG2B,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,cAAc,EAAE,cAAc,CAC5B,eAAe,EACf,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,YAAY,EACnB,OAAO,WAAW,CACnB,CAAC;KACH;CACF;AAED,QAAA,MAAM,IAAI,EAAG,cAAuB,CAAC;AAUrC,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IAChE,MAAM,wCAA6C;IAG7C,UAAU;IAuBV,aAAa;IAcnB;;;;;;;;;;;OAWG;YACW,eAAe;IAgE7B,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,kBAAkB;CAoB3B;AAED;;;GAGG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;aAEzB,IAAI,EAAE,MAAM;aAEZ,IAAI,EAAE,OAAO;aACb,MAAM,EAAE,MAAM;gBAHd,IAAI,EAAE,MAAM,EAC5B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,MAAM;IAKhC,cAAc,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE;CAQpE"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * CLI task runner — spawns a detached worker process that executes the tool
3
+ * and writes the terminal outcome back to the persistent store.
4
+ *
5
+ * The worker is launched via `frontmcp __run-task <taskId>` using either:
6
+ * 1. An explicit `tasks.cliRunnerCommand` override, or
7
+ * 2. The currently-running executable (`argv[0]` + `argv[1]`),
8
+ * 3. Falling back to `node <entrypoint>`.
9
+ *
10
+ * Cancellation uses `process.kill(pid, SIGTERM)`. The worker is expected to
11
+ * observe the signal via the AbortSignal surfaced on `ToolContext.signal`.
12
+ *
13
+ * @module task/helpers/cli-task-runner
14
+ */
15
+ import type { FrontMcpLogger } from '../../common';
16
+ import type { TaskStore } from '../store';
17
+ import type { TaskRecord } from '../task.types';
18
+ import type { SpawnContext, TaskRunner } from './task-runner.types';
19
+ export interface CliTaskRunnerCommand {
20
+ exe: string;
21
+ args?: string[];
22
+ }
23
+ export interface CliTaskRunnerDeps {
24
+ store: TaskStore;
25
+ /** Explicit command override. When omitted, the runner uses `argv[0]`+`argv[1]`. */
26
+ command?: CliTaskRunnerCommand;
27
+ logger?: FrontMcpLogger;
28
+ }
29
+ declare const RUN_TASK_SUBCOMMAND = "__run-task";
30
+ declare const RUN_TASK_ENV_VAR = "FRONTMCP_RUN_TASK_ID";
31
+ export declare class CliTaskRunner implements TaskRunner {
32
+ private readonly deps;
33
+ readonly kind: "cli";
34
+ constructor(deps: CliTaskRunnerDeps);
35
+ run(record: TaskRecord, _context: SpawnContext): Promise<void>;
36
+ /**
37
+ * Transition a task to `failed` when we couldn't even get a worker off the
38
+ * ground. Publishes the terminal event so any `tasks/result` waiter is
39
+ * unblocked, and is best-effort (a failing store write is only logged).
40
+ */
41
+ private markBootstrapFailure;
42
+ cancel(record: TaskRecord): Promise<void>;
43
+ private resolveCommand;
44
+ }
45
+ export { RUN_TASK_SUBCOMMAND, RUN_TASK_ENV_VAR };
46
+ //# sourceMappingURL=cli-task-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-task-runner.d.ts","sourceRoot":"","sources":["../../../src/task/helpers/cli-task-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEpE,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,SAAS,CAAC;IACjB,oFAAoF;IACpF,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,mBAAmB,eAAe,CAAC;AACzC,QAAA,MAAM,gBAAgB,yBAAyB,CAAC;AAEhD,qBAAa,aAAc,YAAW,UAAU;IAGlC,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,QAAQ,CAAC,IAAI,EAAG,KAAK,CAAU;gBAEF,IAAI,EAAE,iBAAiB;IAE9C,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IA+CpE;;;;OAIG;YACW,oBAAoB;IAsB5B,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAyB/C,OAAO,CAAC,cAAc;CAoBvB;AAED,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * In-process task runner — dispatches the task via a microtask on the current
3
+ * Node event loop. The default runner for long-lived servers.
4
+ *
5
+ * @module task/helpers/in-process-task-runner
6
+ */
7
+ import type { FrontMcpLogger } from '../../common';
8
+ import type { TaskStore } from '../store';
9
+ import type { TaskRegistry } from '../task.registry';
10
+ import type { TaskRecord } from '../task.types';
11
+ import type { TaskNotifier } from './task-notifier';
12
+ import { type TaskRunnerScope } from './task-runner';
13
+ import type { SpawnContext, TaskRunner } from './task-runner.types';
14
+ export interface InProcessTaskRunnerDeps {
15
+ scope: TaskRunnerScope;
16
+ store: TaskStore;
17
+ registry: TaskRegistry;
18
+ notifier: TaskNotifier;
19
+ logger?: FrontMcpLogger;
20
+ }
21
+ export declare class InProcessTaskRunner implements TaskRunner {
22
+ private readonly deps;
23
+ readonly kind: "in-process";
24
+ constructor(deps: InProcessTaskRunnerDeps);
25
+ run(record: TaskRecord, context: SpawnContext): Promise<void>;
26
+ cancel(record: TaskRecord): Promise<void>;
27
+ }
28
+ //# sourceMappingURL=in-process-task-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-process-task-runner.d.ts","sourceRoot":"","sources":["../../../src/task/helpers/in-process-task-runner.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,qBAAa,mBAAoB,YAAW,UAAU;IAGxC,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,QAAQ,CAAC,IAAI,EAAG,YAAY,CAAU;gBAET,IAAI,EAAE,uBAAuB;IAEpD,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB7D,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAIhD"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Cross-platform process liveness probe.
3
+ *
4
+ * `process.kill(pid, 0)` is the canonical "is this PID alive" check on POSIX.
5
+ * It sends no signal but throws `ESRCH` if the PID is gone. Windows also
6
+ * supports it via Node's `process.kill` polyfill (reports the target's
7
+ * existence via the same error semantics).
8
+ *
9
+ * Used by `CliTaskRunner.cancel` and by `SqliteTaskStore` orphan detection to
10
+ * decide whether a `working`/`input_required` task is still being executed.
11
+ *
12
+ * @module task/helpers/process-liveness
13
+ */
14
+ /** Returns `true` if a process with the given PID is alive and accessible. */
15
+ export declare function isAlive(pid: number): boolean;
16
+ //# sourceMappingURL=process-liveness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process-liveness.d.ts","sourceRoot":"","sources":["../../../src/task/helpers/process-liveness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,8EAA8E;AAC9E,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAY5C"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Task ID generation — cryptographically secure per MCP spec §Security.
3
+ *
4
+ * Uses `randomUUID()` from `@frontmcp/utils` for cross-platform (Node/browser)
5
+ * consistency, as required by `CLAUDE.md` "Crypto Utilities".
6
+ *
7
+ * @module task/helpers/task-id
8
+ */
9
+ export declare function generateTaskId(): string;
10
+ //# sourceMappingURL=task-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-id.d.ts","sourceRoot":"","sources":["../../../src/task/helpers/task-id.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,wBAAgB,cAAc,IAAI,MAAM,CAEvC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Task status notifier — bridges TaskRecord state transitions to
3
+ * `notifications/tasks/status` delivery via the SDK notification service.
4
+ *
5
+ * Per spec §Task Notifications, the notification MUST carry the full Task
6
+ * wire shape, and SHOULD NOT include `io.modelcontextprotocol/related-task`
7
+ * in `_meta` (the `taskId` field on the params is the source of truth).
8
+ *
9
+ * @module task/helpers/task-notifier
10
+ */
11
+ import type { FrontMcpLogger } from '../../common';
12
+ import type { NotificationService } from '../../notification/notification.service';
13
+ import { type TaskRecord } from '../task.types';
14
+ export declare class TaskNotifier {
15
+ private readonly notifications;
16
+ private readonly logger?;
17
+ constructor(notifications: NotificationService, logger?: FrontMcpLogger | undefined);
18
+ sendStatus(record: TaskRecord): void;
19
+ }
20
+ //# sourceMappingURL=task-notifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-notifier.d.ts","sourceRoot":"","sources":["../../../src/task/helpers/task-notifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAE7D,qBAAa,YAAY;IAErB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;gBADP,aAAa,EAAE,mBAAmB,EAClC,MAAM,CAAC,EAAE,cAAc,YAAA;IAG1C,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;CAkBrC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Task runner — executes a `tools/call` request in the background and records
3
+ * its terminal outcome.
4
+ *
5
+ * Called synchronously (fire-and-forget) from the task-creation path in the
6
+ * existing `tools:call-tool` flow. The outer HTTP request will already have
7
+ * returned the `CreateTaskResult` by the time this resumes.
8
+ *
9
+ * Runtime approach: we re-dispatch the underlying `tools/call` request through
10
+ * `scope.runFlowForOutput('tools:call-tool', ...)` with the `task` field
11
+ * stripped so the flow executes the tool normally. Any result or thrown error
12
+ * is captured into a TaskOutcome and written to the store as a terminal state.
13
+ *
14
+ * Cross-node cancel: we subscribe to the cancel channel for the duration of
15
+ * execution. If a cancel is signalled, the AbortController fires, which the
16
+ * tool is expected to observe through the standard execution context.
17
+ *
18
+ * @module task/helpers/task-runner
19
+ */
20
+ import type { FrontMcpLogger } from '../../common';
21
+ import type { TaskStore } from '../store';
22
+ import type { TaskRegistry } from '../task.registry';
23
+ import { type TaskRecord } from '../task.types';
24
+ import type { TaskNotifier } from './task-notifier';
25
+ /** Narrow interface over scope to avoid circular type import. */
26
+ export interface TaskRunnerScope {
27
+ runFlowForOutput<TInput = unknown, TOutput = unknown>(name: 'tools:call-tool', input: TInput): Promise<TOutput>;
28
+ }
29
+ export interface RunTaskParams {
30
+ /** Persisted record (already stored in status `working`). */
31
+ record: TaskRecord;
32
+ /** Raw request params AFTER removing the `task` field, to pass to the flow. */
33
+ cleanedRequestParams: Record<string, unknown>;
34
+ /** The original request handler context (carries authInfo etc.). */
35
+ ctx: unknown;
36
+ scope: TaskRunnerScope;
37
+ store: TaskStore;
38
+ registry: TaskRegistry;
39
+ notifier: TaskNotifier;
40
+ logger?: FrontMcpLogger;
41
+ }
42
+ /**
43
+ * Schedule background execution and return immediately. The returned Promise
44
+ * resolves once the task reaches a terminal state — primarily useful in tests.
45
+ */
46
+ export declare function runTaskInBackground(params: RunTaskParams): Promise<void>;
47
+ //# sourceMappingURL=task-runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-runner.d.ts","sourceRoot":"","sources":["../../../src/task/helpers/task-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAqC,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,iEAAiE;AACjE,MAAM,WAAW,eAAe;IAC9B,gBAAgB,CAAC,MAAM,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACjH;AAED,MAAM,WAAW,aAAa;IAC5B,6DAA6D;IAC7D,MAAM,EAAE,UAAU,CAAC;IACnB,+EAA+E;IAC/E,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9C,oEAAoE;IACpE,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAIxE"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Runner abstraction — picks how a task-augmented `tools/call` actually gets
3
+ * executed. Long-lived Node servers use the in-process runner (a microtask
4
+ * dispatch). CLI hosts spawn a detached child process so the work survives
5
+ * the short-lived parent.
6
+ *
7
+ * @module task/helpers/task-runner.types
8
+ */
9
+ import type { TaskRecord } from '../task.types';
10
+ export interface SpawnContext {
11
+ /** Raw request params after stripping the `task` field, passed to the tool. */
12
+ cleanedRequestParams: Record<string, unknown>;
13
+ /** Original request handler context (carries authInfo etc.). */
14
+ ctx: unknown;
15
+ }
16
+ export interface TaskRunner {
17
+ readonly kind: 'in-process' | 'cli';
18
+ /**
19
+ * Start executing `record`. Implementations are fire-and-forget — the promise
20
+ * resolves once execution has been *scheduled*, not completed. A successful
21
+ * resolve does NOT mean the task is done; state transitions are persisted via
22
+ * the TaskStore.
23
+ */
24
+ run(record: TaskRecord, context: SpawnContext): Promise<void>;
25
+ /**
26
+ * Attempt to cancel execution of a record. Called from `tasks/cancel` after
27
+ * the store transition to `cancelled` has already been written. Implementations
28
+ * should be idempotent and tolerate absent executors.
29
+ */
30
+ cancel(record: TaskRecord): Promise<void>;
31
+ }
32
+ //# sourceMappingURL=task-runner.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-runner.types.d.ts","sourceRoot":"","sources":["../../../src/task/helpers/task-runner.types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,YAAY;IAC3B,+EAA+E;IAC/E,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9C,gEAAgE;IAChE,GAAG,EAAE,OAAO,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,KAAK,CAAC;IAEpC;;;;;OAKG;IACH,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9D;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @frontmcp/sdk task module — MCP 2025-11-25 background tasks support.
3
+ *
4
+ * See: https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/tasks
5
+ *
6
+ * @module task
7
+ */
8
+ export * from './task.types';
9
+ export * from './store';
10
+ export { TaskRegistry, type TaskCapabilityInputs } from './task.registry';
11
+ export { computeTaskCapabilities } from './task-scope.helper';
12
+ export { TaskNotifier } from './helpers/task-notifier';
13
+ export { generateTaskId } from './helpers/task-id';
14
+ export { runTaskInBackground, type RunTaskParams, type TaskRunnerScope } from './helpers/task-runner';
15
+ export type { TaskRunner, SpawnContext } from './helpers/task-runner.types';
16
+ export { InProcessTaskRunner, type InProcessTaskRunnerDeps } from './helpers/in-process-task-runner';
17
+ export { CliTaskRunner, type CliTaskRunnerDeps, type CliTaskRunnerCommand, RUN_TASK_SUBCOMMAND, RUN_TASK_ENV_VAR, } from './helpers/cli-task-runner';
18
+ export { isAlive } from './helpers/process-liveness';
19
+ export { isTaskWorkerProcess, TASK_WORKER_MODE_FLAG } from './runtime/execute-task-flag';
20
+ export { default as TasksGetFlow } from './flows/tasks-get.flow';
21
+ export { default as TasksResultFlow } from './flows/tasks-result.flow';
22
+ export { default as TasksCancelFlow } from './flows/tasks-cancel.flow';
23
+ export { default as TasksListFlow } from './flows/tasks-list.flow';
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/task/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACtG,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,KAAK,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AACrG,OAAO,EACL,aAAa,EACb,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAKrD,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzF,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Small helpers for the task-worker mode that can be safely imported by any
3
+ * layer without pulling the full FrontMcpInstance graph (which would otherwise
4
+ * create a cycle via scope → transport → task → execute-task → front-mcp).
5
+ *
6
+ * @module task/runtime/execute-task-flag
7
+ */
8
+ export declare const TASK_WORKER_MODE_FLAG: "__taskWorkerMode";
9
+ /** True when this process was launched as a task worker. */
10
+ export declare function isTaskWorkerProcess(): boolean;
11
+ //# sourceMappingURL=execute-task-flag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute-task-flag.d.ts","sourceRoot":"","sources":["../../../src/task/runtime/execute-task-flag.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,eAAO,MAAM,qBAAqB,EAAG,kBAA2B,CAAC;AAEjE,4DAA4D;AAC5D,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Task-worker entrypoint.
3
+ *
4
+ * Called by the `__run-task <taskId>` CLI subcommand. Loads the user's
5
+ * FrontMCP config, boots a minimal scope (no HTTP transport), looks up the
6
+ * pending task record, runs the tool through the same flow pipeline the
7
+ * Node server would, and exits.
8
+ *
9
+ * The FRONTMCP_RUN_TASK_ID environment variable is set by the parent's
10
+ * `CliTaskRunner` so this module (and `scope.instance.ts`) can detect it is
11
+ * being invoked as a worker rather than as a long-lived server.
12
+ *
13
+ * @module task/runtime/execute-task
14
+ */
15
+ import { type FrontMcpConfigInput } from '../../common';
16
+ /**
17
+ * Boot the user's FrontMCP config in task-worker mode and run a single task
18
+ * to completion. Returns the exit code the worker should use.
19
+ */
20
+ export declare function executeTaskWorker(options: FrontMcpConfigInput, taskId: string): Promise<number>;
21
+ //# sourceMappingURL=execute-task.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute-task.d.ts","sourceRoot":"","sources":["../../../src/task/runtime/execute-task.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAA0B,KAAK,mBAAmB,EAAuB,MAAM,cAAc,CAAC;AASrG;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA0HrG"}
@@ -0,0 +1,4 @@
1
+ export type { TaskStore, TaskTerminalCallback, TaskCancelCallback, TaskUnsubscribe, TaskListPage } from './task.store';
2
+ export { StorageTaskStore } from './storage-task.store';
3
+ export { createTaskStore, createMemoryTaskStore, TaskStoreNotSupportedError, type TaskStoreOptions, type TaskStoreResult, } from './task-store.factory';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/task/store/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,0BAA0B,EAC1B,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Storage-backed TaskStore implementation.
3
+ *
4
+ * Uses `@frontmcp/utils` storage abstractions (memory / Redis / Upstash) with
5
+ * automatic TTL, key namespacing, and pub/sub for cross-node signalling.
6
+ *
7
+ * Key layout (under the store's NamespacedStorage):
8
+ * - `records:{sessionId}:{taskId}` — the TaskRecord JSON
9
+ * - Pub/sub channels:
10
+ * - `terminal:{taskId}` — fires when a task reaches terminal status
11
+ * - `cancel:{taskId}` — fires when a task is asked to cancel
12
+ *
13
+ * @module task/store/storage-task.store
14
+ */
15
+ import { type NamespacedStorage } from '@frontmcp/utils';
16
+ import { type FrontMcpLogger } from '../../common';
17
+ import { type TaskRecord } from '../task.types';
18
+ import type { TaskCancelCallback, TaskListPage, TaskStore, TaskTerminalCallback, TaskUnsubscribe } from './task.store';
19
+ export declare class StorageTaskStore implements TaskStore {
20
+ private readonly storage;
21
+ private readonly records;
22
+ private readonly logger?;
23
+ private readonly terminalCallbacks;
24
+ private readonly terminalSubs;
25
+ private readonly cancelCallbacks;
26
+ private readonly cancelSubs;
27
+ constructor(storage: NamespacedStorage, logger?: FrontMcpLogger);
28
+ create(record: TaskRecord): Promise<void>;
29
+ get(taskId: string, sessionId: string): Promise<TaskRecord | null>;
30
+ update(taskId: string, sessionId: string, patch: Partial<TaskRecord>): Promise<TaskRecord | null>;
31
+ delete(taskId: string, sessionId: string): Promise<void>;
32
+ list(sessionId: string, opts?: {
33
+ cursor?: string;
34
+ pageSize?: number;
35
+ }): Promise<TaskListPage>;
36
+ subscribeTerminal(taskId: string, _sessionId: string, cb: TaskTerminalCallback): Promise<TaskUnsubscribe>;
37
+ publishTerminal(record: TaskRecord): Promise<void>;
38
+ subscribeCancel(taskId: string, _sessionId: string, cb: TaskCancelCallback): Promise<TaskUnsubscribe>;
39
+ publishCancel(taskId: string, _sessionId: string): Promise<void>;
40
+ destroy(): Promise<void>;
41
+ }
42
+ //# sourceMappingURL=storage-task.store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage-task.store.d.ts","sourceRoot":"","sources":["../../../src/task/store/storage-task.store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAKL,KAAK,iBAAiB,EAEvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,SAAS,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAYvH,qBAAa,gBAAiB,YAAW,SAAS;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAC5C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA2B;IACnD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAiB;IAEzC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAgD;IAClF,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAkC;IAC/D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA8C;IAC9E,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkC;gBAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,cAAc;IAMzD,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAazC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAalE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAqBjG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIxD,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,YAAY,CAAC;IA8BjG,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;IAsDzG,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IA6BlD,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,kBAAkB,GAAG,OAAO,CAAC,eAAe,CAAC;IA2CrG,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAuChE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAoB/B"}