@frontmcp/sdk 1.10.15 → 1.11.0-rc.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 (1007) hide show
  1. package/agent/agent.instance.d.ts.map +1 -1
  2. package/agent/agent.scope.d.ts +3 -0
  3. package/agent/agent.scope.d.ts.map +1 -1
  4. package/agent/flows/call-agent.flow.d.ts +3 -3
  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/answer/answer-budget.d.ts +51 -0
  9. package/answer/answer-budget.d.ts.map +1 -0
  10. package/answer/answer-meter.d.ts +30 -0
  11. package/answer/answer-meter.d.ts.map +1 -0
  12. package/answer/client-profile.d.ts +48 -0
  13. package/answer/client-profile.d.ts.map +1 -0
  14. package/answer/index.d.ts +7 -0
  15. package/answer/index.d.ts.map +1 -0
  16. package/app/app.registry.d.ts.map +1 -1
  17. package/app/app.utils.d.ts +1 -1
  18. package/app/app.utils.d.ts.map +1 -1
  19. package/app/instances/app.lazy.instance.d.ts +68 -0
  20. package/app/instances/app.lazy.instance.d.ts.map +1 -0
  21. package/app/instances/app.remote.instance.d.ts +2 -0
  22. package/app/instances/app.remote.instance.d.ts.map +1 -1
  23. package/app/instances/empty-app-registries.d.ts +52 -0
  24. package/app/instances/empty-app-registries.d.ts.map +1 -0
  25. package/app/lazy/lazy-app.rules.d.ts +31 -0
  26. package/app/lazy/lazy-app.rules.d.ts.map +1 -0
  27. package/app/lazy/lazy-manifest.d.ts +33 -0
  28. package/app/lazy/lazy-manifest.d.ts.map +1 -0
  29. package/app/lazy/lazy-placeholders.d.ts +29 -0
  30. package/app/lazy/lazy-placeholders.d.ts.map +1 -0
  31. package/auth/flows/auth.verify.flow.d.ts +1 -1
  32. package/auth/flows/auth.verify.flow.d.ts.map +1 -1
  33. package/auth/flows/oauth-flows.d.ts +3 -0
  34. package/auth/flows/oauth-flows.d.ts.map +1 -0
  35. package/auth/flows/oauth.auth-ui.flow.d.ts +1 -1
  36. package/auth/flows/oauth.auth-ui.flow.d.ts.map +1 -1
  37. package/auth/flows/oauth.authorize.flow.d.ts +2 -2
  38. package/auth/flows/oauth.authorize.flow.d.ts.map +1 -1
  39. package/auth/flows/oauth.callback.flow.d.ts +2 -2
  40. package/auth/flows/oauth.callback.flow.d.ts.map +1 -1
  41. package/auth/flows/oauth.connect.flow.d.ts +1 -1
  42. package/auth/flows/oauth.connect.flow.d.ts.map +1 -1
  43. package/auth/flows/oauth.provider-callback.flow.d.ts +2 -2
  44. package/auth/flows/oauth.provider-callback.flow.d.ts.map +1 -1
  45. package/auth/flows/oauth.register.flow.d.ts +1 -1
  46. package/auth/flows/oauth.register.flow.d.ts.map +1 -1
  47. package/auth/flows/oauth.token.flow.d.ts +1 -1
  48. package/auth/flows/oauth.token.flow.d.ts.map +1 -1
  49. package/auth/flows/oauth.userinfo.flow.d.ts +1 -1
  50. package/auth/flows/oauth.userinfo.flow.d.ts.map +1 -1
  51. package/auth/flows/session.verify.flow.d.ts +4 -0
  52. package/auth/flows/session.verify.flow.d.ts.map +1 -1
  53. package/auth/flows/well-known.jwks.flow.d.ts +1 -1
  54. package/auth/flows/well-known.jwks.flow.d.ts.map +1 -1
  55. package/auth/flows/well-known.oauth-authorization-server.flow.d.ts +1 -1
  56. package/auth/flows/well-known.oauth-authorization-server.flow.d.ts.map +1 -1
  57. package/auth/instances/instance.local-primary-auth.d.ts.map +1 -1
  58. package/browser/agent/agent-builtin-tools.mjs +1 -1
  59. package/browser/agent/agent.instance.mjs +5 -2
  60. package/browser/agent/agent.scope.mjs +9 -0
  61. package/browser/agent/flows/call-agent.flow.mjs +15 -3
  62. package/browser/answer/answer-budget.mjs +221 -0
  63. package/browser/answer/answer-meter.mjs +53 -0
  64. package/browser/answer/client-profile.mjs +79 -0
  65. package/browser/answer/index.mjs +34 -0
  66. package/browser/app/app.registry.mjs +19 -7
  67. package/browser/app/app.utils.mjs +23 -2
  68. package/browser/app/instances/app.lazy.instance.mjs +371 -0
  69. package/browser/app/instances/app.remote.instance.mjs +12 -82
  70. package/browser/app/instances/empty-app-registries.mjs +87 -0
  71. package/browser/app/lazy/lazy-app.rules.mjs +104 -0
  72. package/browser/app/lazy/lazy-manifest.mjs +102 -0
  73. package/browser/app/lazy/lazy-placeholders.mjs +36 -0
  74. package/browser/auth/flows/oauth-flows.mjs +39 -0
  75. package/browser/auth/flows/oauth.auth-ui.flow.mjs +2 -1
  76. package/browser/auth/flows/oauth.authorize.flow.mjs +2 -1
  77. package/browser/auth/flows/oauth.callback.flow.mjs +2 -1
  78. package/browser/auth/flows/oauth.connect.flow.mjs +2 -1
  79. package/browser/auth/flows/oauth.provider-callback.flow.mjs +2 -1
  80. package/browser/auth/flows/oauth.register.flow.mjs +2 -1
  81. package/browser/auth/flows/oauth.token.flow.mjs +2 -1
  82. package/browser/auth/flows/oauth.userinfo.flow.mjs +2 -1
  83. package/browser/auth/flows/session.verify.flow.mjs +1 -1
  84. package/browser/auth/flows/well-known.jwks.flow.mjs +1 -1
  85. package/browser/auth/flows/well-known.oauth-authorization-server.flow.mjs +1 -1
  86. package/browser/auth/flows/well-known.prm.flow.mjs +1 -1
  87. package/browser/auth/instances/instance.local-primary-auth.mjs +2 -16
  88. package/browser/builtin/call-recorder/call-record.mjs +7 -0
  89. package/browser/builtin/call-recorder/call-record.writer.mjs +70 -0
  90. package/browser/builtin/call-recorder/call-recorder.options.mjs +23 -0
  91. package/browser/builtin/call-recorder/call-recorder.plugin.mjs +209 -0
  92. package/browser/builtin/call-recorder/index.mjs +5 -0
  93. package/browser/channel/flows/list-channels.flow.mjs +1 -1
  94. package/browser/channel/flows/send-channel-notification.flow.mjs +1 -1
  95. package/browser/channel/reply/reply.types.mjs +1 -1
  96. package/browser/common/decorators/duty.decorator.mjs +24 -0
  97. package/browser/common/decorators/front-mcp.decorator.mjs +13 -2
  98. package/browser/common/decorators/hook.decorator.mjs +19 -1
  99. package/browser/common/decorators/http-route.decorator.mjs +46 -0
  100. package/browser/common/decorators/index.mjs +3 -1
  101. package/browser/common/decorators/job.decorator.mjs +7 -0
  102. package/browser/common/decorators/provider.decorator.mjs +1 -1
  103. package/browser/common/decorators/resource.decorator.mjs +22 -0
  104. package/browser/common/entries/job.entry.mjs +1 -1
  105. package/browser/common/entries/tool.entry.mjs +53 -25
  106. package/browser/common/flow/flow.utils.mjs +1 -1
  107. package/browser/common/index.mjs +5 -5
  108. package/browser/common/interfaces/agent.interface.mjs +6 -2
  109. package/browser/common/interfaces/duty.interface.mjs +0 -0
  110. package/browser/common/interfaces/execution-context.interface.mjs +39 -1
  111. package/browser/common/interfaces/flow.interface.mjs +38 -0
  112. package/browser/common/interfaces/http-route.interface.mjs +20 -0
  113. package/browser/common/interfaces/index.mjs +3 -1
  114. package/browser/common/interfaces/internal/flow.utils.mjs +3 -0
  115. package/browser/common/interfaces/job.interface.mjs +28 -11
  116. package/browser/common/interfaces/logger.interface.mjs +2 -0
  117. package/browser/common/interfaces/resource.interface.mjs +3 -2
  118. package/browser/common/interfaces/tool.interface.mjs +5 -10
  119. package/browser/common/metadata/adapter.metadata.mjs +1 -1
  120. package/browser/common/metadata/agent.metadata.mjs +1 -1
  121. package/browser/common/metadata/app-filter.metadata.mjs +1 -1
  122. package/browser/common/metadata/app.metadata.mjs +15 -1
  123. package/browser/common/metadata/auth-provider.metadata.mjs +1 -1
  124. package/browser/common/metadata/channel.metadata.mjs +1 -1
  125. package/browser/common/metadata/duty.metadata.mjs +32 -0
  126. package/browser/common/metadata/enabled.metadata.mjs +16 -0
  127. package/browser/common/metadata/flow.metadata.mjs +1 -1
  128. package/browser/common/metadata/front-mcp-stores.mjs +43 -0
  129. package/browser/common/metadata/front-mcp.metadata.mjs +85 -26
  130. package/browser/common/metadata/hook.metadata.mjs +26 -0
  131. package/browser/common/metadata/http-route.metadata.mjs +20 -0
  132. package/browser/common/metadata/index.mjs +8 -4
  133. package/browser/common/metadata/job.metadata.mjs +20 -3
  134. package/browser/common/metadata/logger.metadata.mjs +1 -1
  135. package/browser/common/metadata/materialized.metadata.mjs +13 -0
  136. package/browser/common/metadata/output-policy.mjs +76 -12
  137. package/browser/common/metadata/plugin.metadata.mjs +1 -1
  138. package/browser/common/metadata/prompt.metadata.mjs +4 -2
  139. package/browser/common/metadata/provider.metadata.mjs +2 -2
  140. package/browser/common/metadata/resource.metadata.mjs +20 -4
  141. package/browser/common/metadata/skill.metadata.mjs +1 -1
  142. package/browser/common/metadata/tool.metadata.mjs +6 -1
  143. package/browser/common/metadata/ui-serving-mode.mjs +1 -1
  144. package/browser/common/metadata/workflow.metadata.mjs +3 -2
  145. package/browser/common/records/app.record.mjs +1 -0
  146. package/browser/common/schemas/annotated-class.schema.mjs +9 -4
  147. package/browser/common/schemas/http-input.schema.mjs +1 -1
  148. package/browser/common/schemas/http-output.schema.mjs +1 -1
  149. package/browser/common/schemas/session-header.schema.mjs +1 -1
  150. package/browser/common/tokens/app.tokens.mjs +1 -0
  151. package/browser/common/tokens/front-mcp.tokens.mjs +10 -1
  152. package/browser/common/tokens/job.tokens.mjs +2 -0
  153. package/browser/common/tokens/prompt.tokens.mjs +1 -0
  154. package/browser/common/tokens/resource.tokens.mjs +5 -0
  155. package/browser/common/tokens/tool.tokens.mjs +2 -0
  156. package/browser/common/types/auth/session.types.mjs +1 -1
  157. package/browser/common/types/index.mjs +1 -1
  158. package/browser/common/types/options/clients/index.mjs +5 -0
  159. package/browser/common/types/options/clients/schema.mjs +15 -0
  160. package/browser/common/types/options/devtools/index.mjs +5 -0
  161. package/browser/common/types/options/devtools/schema.mjs +8 -0
  162. package/browser/common/types/options/elicitation/schema.mjs +7 -2
  163. package/browser/common/types/options/ext-apps/schema.mjs +1 -1
  164. package/browser/common/types/options/health/schema.mjs +1 -1
  165. package/browser/common/types/options/http/schema.mjs +17 -2
  166. package/browser/common/types/options/index.mjs +5 -0
  167. package/browser/common/types/options/instructions-budget/index.mjs +7 -0
  168. package/browser/common/types/options/instructions-budget/schema.mjs +26 -0
  169. package/browser/common/types/options/lifecycle/index.mjs +5 -0
  170. package/browser/common/types/options/lifecycle/schema.mjs +9 -0
  171. package/browser/common/types/options/logging/schema.mjs +1 -1
  172. package/browser/common/types/options/metrics/schema.mjs +1 -1
  173. package/browser/common/types/options/observability/schema.mjs +4 -2
  174. package/browser/common/types/options/offload/index.mjs +5 -0
  175. package/browser/common/types/options/offload/schema.mjs +16 -0
  176. package/browser/common/types/options/outbound-fetch/schema.mjs +1 -1
  177. package/browser/common/types/options/pagination/schema.mjs +1 -1
  178. package/browser/common/types/options/redis/schema.mjs +13 -3
  179. package/browser/common/types/options/registry/schema.mjs +1 -1
  180. package/browser/common/types/options/server-info/schema.mjs +1 -1
  181. package/browser/common/types/options/session/schema.mjs +1 -1
  182. package/browser/common/types/options/skills-http/schema.mjs +3 -2
  183. package/browser/common/types/options/sqlite/resolve.mjs +1 -0
  184. package/browser/common/types/options/sqlite/schema.mjs +1 -1
  185. package/browser/common/types/options/transport/schema.mjs +1 -1
  186. package/browser/common/utils/caller-dir.utils.mjs +36 -0
  187. package/browser/common/utils/decide-request-intent.utils.mjs +1 -1
  188. package/browser/common/utils/forward-headers.utils.mjs +58 -0
  189. package/browser/common/utils/index.mjs +1 -1
  190. package/browser/common/utils/tool-lookup.utils.mjs +35 -5
  191. package/browser/completion/flows/complete.flow.mjs +35 -3
  192. package/browser/context/frontmcp-context-storage.mjs +10 -5
  193. package/browser/context/metadata.utils.mjs +9 -5
  194. package/browser/direct/connect.mjs +22 -16
  195. package/browser/direct/direct-client.mjs +2 -1
  196. package/browser/duty/duty.lifecycle.mjs +172 -0
  197. package/browser/duty/duty.runner.mjs +161 -0
  198. package/browser/elicitation/flows/elicitation-request.flow.mjs +1 -1
  199. package/browser/elicitation/flows/elicitation-result.flow.mjs +1 -1
  200. package/browser/elicitation/helpers/elicit.helper.mjs +5 -1
  201. package/browser/elicitation/helpers/extend-output-schema.mjs +3 -1
  202. package/browser/elicitation/helpers/validate-elicitation-content.mjs +1 -1
  203. package/browser/elicitation/index.mjs +1 -0
  204. package/browser/elicitation/questions/ask-question.mjs +131 -0
  205. package/browser/elicitation/questions/index.mjs +43 -0
  206. package/browser/elicitation/questions/question-inbox.routes.mjs +184 -0
  207. package/browser/elicitation/questions/question-scope.helper.mjs +66 -0
  208. package/browser/elicitation/questions/question-store.factory.mjs +104 -0
  209. package/browser/elicitation/questions/question-subject.mjs +14 -0
  210. package/browser/elicitation/questions/question.errors.mjs +51 -0
  211. package/browser/elicitation/questions/question.store.mjs +216 -0
  212. package/browser/elicitation/send-elicitation-result.tool.mjs +1 -1
  213. package/browser/elicitation/store/elicitation-store.factory.mjs +10 -32
  214. package/browser/errors/authorization-required.error.mjs +1 -1
  215. package/browser/errors/browser-entry-point.errors.mjs +19 -0
  216. package/browser/errors/browser-store.errors.mjs +39 -0
  217. package/browser/errors/build-store.errors.mjs +15 -0
  218. package/browser/errors/duty.errors.mjs +23 -0
  219. package/browser/errors/http-route.errors.mjs +48 -0
  220. package/browser/errors/index.mjs +80 -4
  221. package/browser/errors/job.errors.mjs +92 -2
  222. package/browser/errors/lazy-app.errors.mjs +30 -0
  223. package/browser/errors/mcp.error.mjs +90 -2
  224. package/browser/errors/misconfiguration.mjs +2 -1
  225. package/browser/errors/offload.errors.mjs +59 -0
  226. package/browser/errors/provider.errors.mjs +9 -0
  227. package/browser/errors/registry.errors.mjs +24 -1
  228. package/browser/errors/sdk.errors.mjs +6 -0
  229. package/browser/errors/shared-server.errors.mjs +31 -0
  230. package/browser/errors/transport.errors.mjs +31 -0
  231. package/browser/esm-loader/esm-auth.types.mjs +1 -1
  232. package/browser/esm-loader/esm-manifest.mjs +1 -1
  233. package/browser/esm-loader/factories/esm-record-builders.mjs +1 -1
  234. package/browser/flows/deferred-flow.mjs +20 -0
  235. package/browser/flows/flow.instance.mjs +165 -21
  236. package/browser/flows/flow.registry.mjs +1 -1
  237. package/browser/flows/flow.stages.mjs +39 -3
  238. package/browser/front-mcp/detached-job.flag.mjs +26 -0
  239. package/browser/front-mcp/front-mcp.mjs +167 -81
  240. package/browser/front-mcp/manifest-mode.flag.mjs +12 -0
  241. package/browser/front-mcp/shutdown-signals.mjs +24 -2
  242. package/browser/front-mcp/static-startup.check.mjs +1 -1
  243. package/browser/front-mcp/stdio-console.mjs +28 -0
  244. package/browser/hooks/entry-class-hooks.mjs +10 -0
  245. package/browser/hooks/hook-observers.mjs +86 -0
  246. package/browser/hooks/hook-order.mjs +155 -0
  247. package/browser/hooks/hook.registry.mjs +40 -9
  248. package/browser/http-route/flows/http.route.flow.mjs +171 -0
  249. package/browser/http-route/http-route.table.mjs +148 -0
  250. package/browser/http-route/people-sign-in.routes.mjs +112 -0
  251. package/browser/http-route/sse-route.stream.mjs +100 -0
  252. package/browser/index.cjs +46101 -37156
  253. package/browser/index.mjs +220 -12
  254. package/browser/job/execution/index.mjs +2 -1
  255. package/browser/job/execution/job-execution.manager.mjs +426 -34
  256. package/browser/job/flows/execute-job.flow.mjs +68 -9
  257. package/browser/job/index.mjs +12 -5
  258. package/browser/job/job-admission.mjs +117 -0
  259. package/browser/job/job-attempt.mjs +72 -6
  260. package/browser/job/job-run-access.mjs +29 -0
  261. package/browser/job/job-scope.helper.mjs +98 -16
  262. package/browser/job/job.instance.mjs +3 -2
  263. package/browser/job/resources/job-run.resource.mjs +51 -0
  264. package/browser/job/runner/detached-job.worker.mjs +84 -0
  265. package/browser/job/runner/job-runner.mjs +74 -0
  266. package/browser/job/runner/run-flusher.mjs +86 -0
  267. package/browser/job/store/index.mjs +5 -1
  268. package/browser/job/store/job-definition-store.factory.mjs +14 -2
  269. package/browser/job/store/job-state-store.factory.mjs +25 -4
  270. package/browser/job/store/job-state.interface.mjs +11 -0
  271. package/browser/job/store/memory-job-state.store.mjs +26 -2
  272. package/browser/job/store/redis-job-state.store.mjs +39 -10
  273. package/browser/job/store/storage-job-definition.store.mjs +47 -0
  274. package/browser/job/store/storage-job-state.store.mjs +83 -0
  275. package/browser/job/tools/cancel-job.tool.mjs +46 -0
  276. package/browser/job/tools/execute-job.tool.mjs +5 -3
  277. package/browser/job/tools/get-job-status.tool.mjs +3 -20
  278. package/browser/job/tools/index.mjs +6 -4
  279. package/browser/job/tools/list-jobs.tool.mjs +1 -1
  280. package/browser/job/tools/register-job.tool.mjs +1 -1
  281. package/browser/job/tools/remove-job.tool.mjs +1 -1
  282. package/browser/logger/logger.registry.mjs +11 -0
  283. package/browser/logging/flows/set-level.flow.mjs +1 -1
  284. package/browser/manifest/build-manifest.mjs +20 -0
  285. package/browser/manifest/build-server-manifest.mjs +181 -0
  286. package/browser/manifest/index.mjs +12 -0
  287. package/browser/manifest/instructions-budget.check.mjs +14 -0
  288. package/browser/manifest/manifest-lint.mjs +63 -0
  289. package/browser/manifest/server-manifest.schema.mjs +107 -0
  290. package/browser/mcp-registry/flows/server-card.flow.mjs +1 -1
  291. package/browser/mcp-registry/flows/well-known.ai-catalog.flow.mjs +1 -1
  292. package/browser/metrics/metrics.service.mjs +1 -1
  293. package/browser/notification/notification.service.mjs +10 -3
  294. package/browser/offload/offload-pool.mjs +323 -0
  295. package/browser/offload/offload-worker.globals.mjs +36 -0
  296. package/browser/offload/offload-worker.source.mjs +102 -0
  297. package/browser/offload/offload.service.mjs +29 -0
  298. package/browser/offload/read-in-worker.mjs +25 -0
  299. package/browser/offload/run-job-in-worker.mjs +39 -0
  300. package/browser/offload/worker-job.runner.mjs +38 -0
  301. package/browser/offload/worker-jobs.mjs +21 -0
  302. package/browser/offload/worker-resource.reader.mjs +83 -0
  303. package/browser/offload/worker-resources.mjs +30 -0
  304. package/browser/plugin/plugin.registry.mjs +15 -2
  305. package/browser/prompt/flows/get-prompt.flow.mjs +34 -2
  306. package/browser/prompt/flows/prompts-list.flow.mjs +14 -3
  307. package/browser/prompt/prompt.registry.mjs +4 -0
  308. package/browser/provider/create-container.mjs +84 -0
  309. package/browser/provider/provider.lifecycle.mjs +62 -0
  310. package/browser/provider/provider.registry.mjs +86 -1
  311. package/browser/provider/provider.utils.mjs +5 -2
  312. package/browser/provider/store.provider.mjs +28 -0
  313. package/browser/remote-mcp/mcp-client.service.mjs +9 -8
  314. package/browser/resource/flows/read-resource.flow.mjs +68 -7
  315. package/browser/resource/flows/resource-templates-list.flow.mjs +15 -3
  316. package/browser/resource/flows/resources-list.flow.mjs +22 -4
  317. package/browser/resource/flows/subscribe-resource.flow.mjs +33 -11
  318. package/browser/resource/flows/unsubscribe-resource.flow.mjs +1 -1
  319. package/browser/resource/materialized/index.mjs +14 -0
  320. package/browser/resource/materialized/materialized-resource.context.mjs +30 -0
  321. package/browser/resource/materialized/materialized-resources.mjs +82 -0
  322. package/browser/resource/materialized/resource-store.mjs +197 -0
  323. package/browser/resource/resource.instance.mjs +2 -1
  324. package/browser/resource/resource.registry.mjs +4 -0
  325. package/browser/scope/browser-stores.mjs +132 -0
  326. package/browser/scope/dev-events-observability.mjs +14 -0
  327. package/browser/scope/flows/http.request.flow.mjs +1 -1
  328. package/browser/scope/flows/request-log.redaction.mjs +17 -3
  329. package/browser/scope/http-scope.helper.mjs +10 -4
  330. package/browser/scope/observability-scope.helper.mjs +8 -2
  331. package/browser/scope/scope.instance.mjs +142 -52
  332. package/browser/server/security/replaceable-directory.mjs +16 -0
  333. package/browser/server/security/resolve-allowed-hosts.mjs +32 -0
  334. package/browser/server/security/same-origin.mjs +35 -0
  335. package/browser/server/security/security-audit.mjs +3 -3
  336. package/browser/server/server.validation.mjs +25 -4
  337. package/browser/shared/browser-shared-server.mjs +8 -0
  338. package/browser/skill/flows/filter-skills.flow.mjs +1 -1
  339. package/browser/skill/flows/http/llm-full-txt.flow.mjs +1 -1
  340. package/browser/skill/flows/http/llm-txt.flow.mjs +1 -1
  341. package/browser/skill/flows/http/skills-api.flow.mjs +1 -1
  342. package/browser/skill/flows/load-skill.flow.mjs +1 -1
  343. package/browser/skill/flows/search-skills.flow.mjs +1 -1
  344. package/browser/skill/sep-2640/sep-2640.per-skill.mjs +13 -11
  345. package/browser/skill/skill-instructions.helper.mjs +30 -9
  346. package/browser/skill/skill-scope.helper.mjs +2 -1
  347. package/browser/skill/skill.registry.mjs +1 -0
  348. package/browser/skill/sync/skill-hash.mjs +5 -4
  349. package/browser/storage/sqlite-storage.provider.mjs +24 -0
  350. package/browser/subsystems.mjs +71 -0
  351. package/browser/surface/entry-enabled.mjs +26 -0
  352. package/browser/surface/file-signal.mjs +118 -0
  353. package/browser/surface/index.mjs +20 -0
  354. package/browser/surface/live-surface.mjs +126 -0
  355. package/browser/surface/unchanged-lists.mjs +17 -0
  356. package/browser/task/flows/tasks-cancel.flow.mjs +1 -1
  357. package/browser/task/flows/tasks-get.flow.mjs +1 -1
  358. package/browser/task/flows/tasks-list.flow.mjs +1 -1
  359. package/browser/task/flows/tasks-result.flow.mjs +1 -1
  360. package/browser/task/helpers/cli-task-runner.mjs +6 -3
  361. package/browser/task/index.mjs +3 -1
  362. package/browser/task/store/task-store.factory.mjs +9 -22
  363. package/browser/task/task-scope.runtime.mjs +19 -0
  364. package/browser/third-party/protocol-client.mjs +6 -0
  365. package/browser/tool/flows/call-tool.flow.mjs +195 -18
  366. package/browser/tool/flows/tools-list.flow.mjs +37 -18
  367. package/browser/tool/tool-output-policy.mjs +24 -0
  368. package/browser/tool/tool.instance.mjs +5 -5
  369. package/browser/tool/tool.registry.mjs +25 -1
  370. package/browser/tool/tool.utils.mjs +50 -9
  371. package/browser/transport/adapters/transport.local.adapter.mjs +4 -4
  372. package/browser/transport/flows/handle.mcp-20260728.flow.mjs +55 -6
  373. package/browser/transport/flows/handle.sse.flow.mjs +14 -2
  374. package/browser/transport/flows/handle.stateless-http.flow.mjs +1 -1
  375. package/browser/transport/flows/handle.streamable-http.flow.mjs +14 -2
  376. package/browser/transport/in-memory-server.mjs +4 -4
  377. package/browser/transport/mcp-20260728/dispatcher.mjs +1 -1
  378. package/browser/transport/mcp-20260728/request-state.mjs +2 -1
  379. package/browser/transport/mcp-20260728/result-decorator.mjs +11 -1
  380. package/browser/transport/mcp-20260728/subscriptions.mjs +16 -5
  381. package/browser/transport/mcp-handlers/initialize-request.handler.mjs +1 -1
  382. package/browser/transport/mcp-handlers/mcp-error.utils.mjs +15 -3
  383. package/browser/transport/mcp-handlers/skills-mcp.types.mjs +1 -1
  384. package/browser/transport/mcp-server.factory.mjs +14 -0
  385. package/browser/transport/stdio-revision-router.mjs +43 -7
  386. package/browser/transport/streamable-http-preload.mjs +19 -0
  387. package/browser/transport/web-fetch-handler.mjs +17 -5
  388. package/browser/transport/web-standard-mcp.mjs +4 -3
  389. package/browser/utils/abort.utils.mjs +10 -0
  390. package/browser/workflow/engine/workflow-step.executor.mjs +6 -5
  391. package/browser/workflow/tools/execute-workflow.tool.mjs +1 -1
  392. package/browser/workflow/tools/get-workflow-status.tool.mjs +3 -20
  393. package/browser/workflow/tools/list-workflows.tool.mjs +1 -1
  394. package/browser/workflow/tools/register-workflow.tool.mjs +1 -1
  395. package/browser/workflow/tools/remove-workflow.tool.mjs +1 -1
  396. package/builtin/call-recorder/call-record.d.ts +34 -0
  397. package/builtin/call-recorder/call-record.d.ts.map +1 -0
  398. package/builtin/call-recorder/call-record.writer.d.ts +26 -0
  399. package/builtin/call-recorder/call-record.writer.d.ts.map +1 -0
  400. package/builtin/call-recorder/call-recorder.options.d.ts +23 -0
  401. package/builtin/call-recorder/call-recorder.options.d.ts.map +1 -0
  402. package/builtin/call-recorder/call-recorder.plugin.d.ts +40 -0
  403. package/builtin/call-recorder/call-recorder.plugin.d.ts.map +1 -0
  404. package/builtin/call-recorder/index.d.ts +4 -0
  405. package/builtin/call-recorder/index.d.ts.map +1 -0
  406. package/channel/reply/reply.types.d.ts +1 -1
  407. package/channel/reply/reply.types.d.ts.map +1 -1
  408. package/common/common.schema.d.ts +1 -1
  409. package/common/common.schema.d.ts.map +1 -1
  410. package/common/decorators/duty.decorator.d.ts +11 -0
  411. package/common/decorators/duty.decorator.d.ts.map +1 -0
  412. package/common/decorators/front-mcp.decorator.d.ts.map +1 -1
  413. package/common/decorators/hook.decorator.d.ts +21 -10
  414. package/common/decorators/hook.decorator.d.ts.map +1 -1
  415. package/common/decorators/http-route.decorator.d.ts +9 -0
  416. package/common/decorators/http-route.decorator.d.ts.map +1 -0
  417. package/common/decorators/index.d.ts +2 -0
  418. package/common/decorators/index.d.ts.map +1 -1
  419. package/common/decorators/job.decorator.d.ts.map +1 -1
  420. package/common/decorators/provider.decorator.d.ts +1 -1
  421. package/common/decorators/provider.decorator.d.ts.map +1 -1
  422. package/common/decorators/resource.decorator.d.ts.map +1 -1
  423. package/common/decorators/tool.decorator.d.ts +1 -1
  424. package/common/decorators/tool.decorator.d.ts.map +1 -1
  425. package/common/dynamic/dynamic.plugin.d.ts +17 -0
  426. package/common/dynamic/dynamic.plugin.d.ts.map +1 -1
  427. package/common/entries/job.entry.d.ts +2 -1
  428. package/common/entries/job.entry.d.ts.map +1 -1
  429. package/common/entries/scope.entry.d.ts +17 -0
  430. package/common/entries/scope.entry.d.ts.map +1 -1
  431. package/common/entries/tool.entry.d.ts +24 -11
  432. package/common/entries/tool.entry.d.ts.map +1 -1
  433. package/common/flow/flow.utils.d.ts.map +1 -1
  434. package/common/interfaces/agent.interface.d.ts.map +1 -1
  435. package/common/interfaces/app.interface.d.ts +2 -2
  436. package/common/interfaces/app.interface.d.ts.map +1 -1
  437. package/common/interfaces/duty.interface.d.ts +10 -0
  438. package/common/interfaces/duty.interface.d.ts.map +1 -0
  439. package/common/interfaces/execution-context.interface.d.ts +27 -0
  440. package/common/interfaces/execution-context.interface.d.ts.map +1 -1
  441. package/common/interfaces/flow.interface.d.ts +32 -1
  442. package/common/interfaces/flow.interface.d.ts.map +1 -1
  443. package/common/interfaces/http-route.interface.d.ts +42 -0
  444. package/common/interfaces/http-route.interface.d.ts.map +1 -0
  445. package/common/interfaces/index.d.ts +2 -0
  446. package/common/interfaces/index.d.ts.map +1 -1
  447. package/common/interfaces/internal/flow.utils.d.ts.map +1 -1
  448. package/common/interfaces/job.interface.d.ts +19 -5
  449. package/common/interfaces/job.interface.d.ts.map +1 -1
  450. package/common/interfaces/logger.interface.d.ts +6 -1
  451. package/common/interfaces/logger.interface.d.ts.map +1 -1
  452. package/common/interfaces/provider.interface.d.ts +12 -0
  453. package/common/interfaces/provider.interface.d.ts.map +1 -1
  454. package/common/interfaces/resource.interface.d.ts.map +1 -1
  455. package/common/interfaces/tool.interface.d.ts.map +1 -1
  456. package/common/metadata/agent.metadata.d.ts +3 -3
  457. package/common/metadata/agent.metadata.d.ts.map +1 -1
  458. package/common/metadata/app.metadata.d.ts +87 -10
  459. package/common/metadata/app.metadata.d.ts.map +1 -1
  460. package/common/metadata/channel.metadata.d.ts +2 -2
  461. package/common/metadata/duty.metadata.d.ts +32 -0
  462. package/common/metadata/duty.metadata.d.ts.map +1 -0
  463. package/common/metadata/enabled.metadata.d.ts +18 -0
  464. package/common/metadata/enabled.metadata.d.ts.map +1 -0
  465. package/common/metadata/flow.metadata.d.ts +2 -2
  466. package/common/metadata/flow.metadata.d.ts.map +1 -1
  467. package/common/metadata/front-mcp-stores.d.ts +5 -0
  468. package/common/metadata/front-mcp-stores.d.ts.map +1 -0
  469. package/common/metadata/front-mcp.metadata.d.ts +2572 -172
  470. package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
  471. package/common/metadata/hook.metadata.d.ts +43 -2
  472. package/common/metadata/hook.metadata.d.ts.map +1 -1
  473. package/common/metadata/http-route.metadata.d.ts +44 -0
  474. package/common/metadata/http-route.metadata.d.ts.map +1 -0
  475. package/common/metadata/index.d.ts +4 -0
  476. package/common/metadata/index.d.ts.map +1 -1
  477. package/common/metadata/job.metadata.d.ts +47 -3
  478. package/common/metadata/job.metadata.d.ts.map +1 -1
  479. package/common/metadata/materialized.metadata.d.ts +33 -0
  480. package/common/metadata/materialized.metadata.d.ts.map +1 -0
  481. package/common/metadata/output-policy.d.ts +71 -1
  482. package/common/metadata/output-policy.d.ts.map +1 -1
  483. package/common/metadata/plugin.metadata.d.ts +5 -5
  484. package/common/metadata/prompt.metadata.d.ts +8 -0
  485. package/common/metadata/prompt.metadata.d.ts.map +1 -1
  486. package/common/metadata/provider.metadata.d.ts +1 -1
  487. package/common/metadata/resource.metadata.d.ts +43 -0
  488. package/common/metadata/resource.metadata.d.ts.map +1 -1
  489. package/common/metadata/skill.metadata.d.ts +2 -2
  490. package/common/metadata/skill.metadata.d.ts.map +1 -1
  491. package/common/metadata/tool.metadata.d.ts +36 -13
  492. package/common/metadata/tool.metadata.d.ts.map +1 -1
  493. package/common/metadata/ui-serving-mode.d.ts +1 -1
  494. package/common/metadata/workflow.metadata.d.ts +2 -2
  495. package/common/metadata/workflow.metadata.d.ts.map +1 -1
  496. package/common/records/app.record.d.ts +18 -3
  497. package/common/records/app.record.d.ts.map +1 -1
  498. package/common/schemas/annotated-class.schema.d.ts +6 -6
  499. package/common/schemas/annotated-class.schema.d.ts.map +1 -1
  500. package/common/schemas/http-output.schema.d.ts +1 -1
  501. package/common/schemas/http-output.schema.d.ts.map +1 -1
  502. package/common/tokens/app.tokens.d.ts.map +1 -1
  503. package/common/tokens/front-mcp.tokens.d.ts.map +1 -1
  504. package/common/tokens/job.tokens.d.ts +2 -0
  505. package/common/tokens/job.tokens.d.ts.map +1 -1
  506. package/common/tokens/prompt.tokens.d.ts +1 -0
  507. package/common/tokens/prompt.tokens.d.ts.map +1 -1
  508. package/common/tokens/resource.tokens.d.ts +5 -0
  509. package/common/tokens/resource.tokens.d.ts.map +1 -1
  510. package/common/tokens/tool.tokens.d.ts +2 -0
  511. package/common/tokens/tool.tokens.d.ts.map +1 -1
  512. package/common/types/auth/session.types.d.ts +4 -0
  513. package/common/types/auth/session.types.d.ts.map +1 -1
  514. package/common/types/options/clients/index.d.ts +4 -0
  515. package/common/types/options/clients/index.d.ts.map +1 -0
  516. package/common/types/options/clients/interfaces.d.ts +47 -0
  517. package/common/types/options/clients/interfaces.d.ts.map +1 -0
  518. package/common/types/options/clients/schema.d.ts +20 -0
  519. package/common/types/options/clients/schema.d.ts.map +1 -0
  520. package/common/types/options/devtools/index.d.ts +3 -0
  521. package/common/types/options/devtools/index.d.ts.map +1 -0
  522. package/common/types/options/devtools/schema.d.ts +15 -0
  523. package/common/types/options/devtools/schema.d.ts.map +1 -0
  524. package/common/types/options/elicitation/index.d.ts +1 -1
  525. package/common/types/options/elicitation/index.d.ts.map +1 -1
  526. package/common/types/options/elicitation/interfaces.d.ts +38 -0
  527. package/common/types/options/elicitation/interfaces.d.ts.map +1 -1
  528. package/common/types/options/elicitation/schema.d.ts +3 -1
  529. package/common/types/options/elicitation/schema.d.ts.map +1 -1
  530. package/common/types/options/ext-apps/schema.d.ts +1 -1
  531. package/common/types/options/ext-apps/schema.d.ts.map +1 -1
  532. package/common/types/options/health/schema.d.ts +1 -1
  533. package/common/types/options/health/schema.d.ts.map +1 -1
  534. package/common/types/options/http/index.d.ts +1 -1
  535. package/common/types/options/http/index.d.ts.map +1 -1
  536. package/common/types/options/http/interfaces.d.ts +35 -2
  537. package/common/types/options/http/interfaces.d.ts.map +1 -1
  538. package/common/types/options/http/schema.d.ts +6 -1
  539. package/common/types/options/http/schema.d.ts.map +1 -1
  540. package/common/types/options/index.d.ts +5 -0
  541. package/common/types/options/index.d.ts.map +1 -1
  542. package/common/types/options/instructions-budget/index.d.ts +3 -0
  543. package/common/types/options/instructions-budget/index.d.ts.map +1 -0
  544. package/common/types/options/instructions-budget/schema.d.ts +29 -0
  545. package/common/types/options/instructions-budget/schema.d.ts.map +1 -0
  546. package/common/types/options/lifecycle/index.d.ts +3 -0
  547. package/common/types/options/lifecycle/index.d.ts.map +1 -0
  548. package/common/types/options/lifecycle/schema.d.ts +20 -0
  549. package/common/types/options/lifecycle/schema.d.ts.map +1 -0
  550. package/common/types/options/logging/schema.d.ts +1 -1
  551. package/common/types/options/logging/schema.d.ts.map +1 -1
  552. package/common/types/options/metrics/schema.d.ts +1 -1
  553. package/common/types/options/metrics/schema.d.ts.map +1 -1
  554. package/common/types/options/observability/interfaces.d.ts +29 -0
  555. package/common/types/options/observability/interfaces.d.ts.map +1 -1
  556. package/common/types/options/observability/schema.d.ts +3 -1
  557. package/common/types/options/observability/schema.d.ts.map +1 -1
  558. package/common/types/options/offload/index.d.ts +3 -0
  559. package/common/types/options/offload/index.d.ts.map +1 -0
  560. package/common/types/options/offload/schema.d.ts +34 -0
  561. package/common/types/options/offload/schema.d.ts.map +1 -0
  562. package/common/types/options/outbound-fetch/schema.d.ts +1 -1
  563. package/common/types/options/outbound-fetch/schema.d.ts.map +1 -1
  564. package/common/types/options/pagination/schema.d.ts +1 -1
  565. package/common/types/options/pagination/schema.d.ts.map +1 -1
  566. package/common/types/options/redis/schema.d.ts +4 -2
  567. package/common/types/options/redis/schema.d.ts.map +1 -1
  568. package/common/types/options/registry/schema.d.ts +1 -1
  569. package/common/types/options/registry/schema.d.ts.map +1 -1
  570. package/common/types/options/server-info/schema.d.ts +1 -1
  571. package/common/types/options/server-info/schema.d.ts.map +1 -1
  572. package/common/types/options/session/schema.d.ts +9 -1
  573. package/common/types/options/session/schema.d.ts.map +1 -1
  574. package/common/types/options/skills-http/index.d.ts +1 -1
  575. package/common/types/options/skills-http/index.d.ts.map +1 -1
  576. package/common/types/options/skills-http/interfaces.d.ts +27 -5
  577. package/common/types/options/skills-http/interfaces.d.ts.map +1 -1
  578. package/common/types/options/skills-http/schema.d.ts +9 -3
  579. package/common/types/options/skills-http/schema.d.ts.map +1 -1
  580. package/common/types/options/sqlite/resolve.d.ts +2 -0
  581. package/common/types/options/sqlite/resolve.d.ts.map +1 -1
  582. package/common/types/options/sqlite/schema.d.ts +1 -1
  583. package/common/types/options/sqlite/schema.d.ts.map +1 -1
  584. package/common/types/options/transport/schema.d.ts +3 -1
  585. package/common/types/options/transport/schema.d.ts.map +1 -1
  586. package/common/utils/caller-dir.utils.d.ts +2 -0
  587. package/common/utils/caller-dir.utils.d.ts.map +1 -1
  588. package/common/utils/forward-headers.utils.d.ts +12 -0
  589. package/common/utils/forward-headers.utils.d.ts.map +1 -0
  590. package/common/utils/tool-lookup.utils.d.ts +13 -3
  591. package/common/utils/tool-lookup.utils.d.ts.map +1 -1
  592. package/completion/flows/complete.flow.d.ts +9 -2
  593. package/completion/flows/complete.flow.d.ts.map +1 -1
  594. package/context/frontmcp-context-storage.d.ts +7 -4
  595. package/context/frontmcp-context-storage.d.ts.map +1 -1
  596. package/context/metadata.utils.d.ts +11 -5
  597. package/context/metadata.utils.d.ts.map +1 -1
  598. package/direct/connect.d.ts +4 -2
  599. package/direct/connect.d.ts.map +1 -1
  600. package/duty/duty.lifecycle.d.ts +27 -0
  601. package/duty/duty.lifecycle.d.ts.map +1 -0
  602. package/duty/duty.runner.d.ts +61 -0
  603. package/duty/duty.runner.d.ts.map +1 -0
  604. package/elicitation/elicitation.types.d.ts +13 -0
  605. package/elicitation/elicitation.types.d.ts.map +1 -1
  606. package/elicitation/flows/elicitation-request.flow.d.ts +1 -1
  607. package/elicitation/flows/elicitation-request.flow.d.ts.map +1 -1
  608. package/elicitation/flows/elicitation-result.flow.d.ts +1 -1
  609. package/elicitation/flows/elicitation-result.flow.d.ts.map +1 -1
  610. package/elicitation/helpers/elicit.helper.d.ts +8 -0
  611. package/elicitation/helpers/elicit.helper.d.ts.map +1 -1
  612. package/elicitation/helpers/extend-output-schema.d.ts.map +1 -1
  613. package/elicitation/hooks/elicitation.hooks.d.ts +10 -8
  614. package/elicitation/hooks/elicitation.hooks.d.ts.map +1 -1
  615. package/elicitation/index.d.ts +1 -0
  616. package/elicitation/index.d.ts.map +1 -1
  617. package/elicitation/questions/ask-question.d.ts +29 -0
  618. package/elicitation/questions/ask-question.d.ts.map +1 -0
  619. package/elicitation/questions/index.d.ts +7 -0
  620. package/elicitation/questions/index.d.ts.map +1 -0
  621. package/elicitation/questions/question-inbox.routes.d.ts +17 -0
  622. package/elicitation/questions/question-inbox.routes.d.ts.map +1 -0
  623. package/elicitation/questions/question-scope.helper.d.ts +41 -0
  624. package/elicitation/questions/question-scope.helper.d.ts.map +1 -0
  625. package/elicitation/questions/question-store.factory.d.ts +44 -0
  626. package/elicitation/questions/question-store.factory.d.ts.map +1 -0
  627. package/elicitation/questions/question-subject.d.ts +8 -0
  628. package/elicitation/questions/question-subject.d.ts.map +1 -0
  629. package/elicitation/questions/question.errors.d.ts +30 -0
  630. package/elicitation/questions/question.errors.d.ts.map +1 -0
  631. package/elicitation/questions/question.store.d.ts +89 -0
  632. package/elicitation/questions/question.store.d.ts.map +1 -0
  633. package/elicitation/store/elicitation-store.factory.d.ts.map +1 -1
  634. package/errors/authorization-required.error.d.ts +1 -1
  635. package/errors/authorization-required.error.d.ts.map +1 -1
  636. package/errors/browser-entry-point.errors.d.ts +14 -0
  637. package/errors/browser-entry-point.errors.d.ts.map +1 -0
  638. package/errors/browser-store.errors.d.ts +56 -0
  639. package/errors/browser-store.errors.d.ts.map +1 -0
  640. package/errors/build-store.errors.d.ts +7 -0
  641. package/errors/build-store.errors.d.ts.map +1 -0
  642. package/errors/duty.errors.d.ts +10 -0
  643. package/errors/duty.errors.d.ts.map +1 -0
  644. package/errors/error-handler.d.ts +1 -0
  645. package/errors/error-handler.d.ts.map +1 -1
  646. package/errors/http-route.errors.d.ts +30 -0
  647. package/errors/http-route.errors.d.ts.map +1 -0
  648. package/errors/index.d.ts +13 -5
  649. package/errors/index.d.ts.map +1 -1
  650. package/errors/job.errors.d.ts +41 -1
  651. package/errors/job.errors.d.ts.map +1 -1
  652. package/errors/lazy-app.errors.d.ts +26 -0
  653. package/errors/lazy-app.errors.d.ts.map +1 -0
  654. package/errors/mcp.error.d.ts +71 -1
  655. package/errors/mcp.error.d.ts.map +1 -1
  656. package/errors/misconfiguration.d.ts.map +1 -1
  657. package/errors/offload.errors.d.ts +32 -0
  658. package/errors/offload.errors.d.ts.map +1 -0
  659. package/errors/provider.errors.d.ts +7 -0
  660. package/errors/provider.errors.d.ts.map +1 -1
  661. package/errors/registry.errors.d.ts +16 -0
  662. package/errors/registry.errors.d.ts.map +1 -1
  663. package/errors/sdk.errors.d.ts +6 -0
  664. package/errors/sdk.errors.d.ts.map +1 -1
  665. package/errors/shared-server.errors.d.ts +18 -0
  666. package/errors/shared-server.errors.d.ts.map +1 -0
  667. package/errors/transport.errors.d.ts +19 -0
  668. package/errors/transport.errors.d.ts.map +1 -1
  669. package/esm/index.mjs +189 -39
  670. package/esm/job/tools/index.mjs +10 -0
  671. package/esm/transport/index.mjs +19 -0
  672. package/esm/workflow/tools/index.mjs +9 -0
  673. package/flows/deferred-flow.d.ts +18 -0
  674. package/flows/deferred-flow.d.ts.map +1 -0
  675. package/flows/flow.instance.d.ts +19 -0
  676. package/flows/flow.instance.d.ts.map +1 -1
  677. package/flows/flow.registry.d.ts.map +1 -1
  678. package/flows/flow.stages.d.ts +9 -1
  679. package/flows/flow.stages.d.ts.map +1 -1
  680. package/front-mcp/detached-job.flag.d.ts +15 -0
  681. package/front-mcp/detached-job.flag.d.ts.map +1 -0
  682. package/front-mcp/front-mcp.d.ts +29 -1
  683. package/front-mcp/front-mcp.d.ts.map +1 -1
  684. package/front-mcp/manifest-mode.flag.d.ts +4 -0
  685. package/front-mcp/manifest-mode.flag.d.ts.map +1 -0
  686. package/front-mcp/shutdown-signals.d.ts +17 -3
  687. package/front-mcp/shutdown-signals.d.ts.map +1 -1
  688. package/front-mcp/stdio-console.d.ts +3 -0
  689. package/front-mcp/stdio-console.d.ts.map +1 -0
  690. package/hooks/entry-class-hooks.d.ts +4 -0
  691. package/hooks/entry-class-hooks.d.ts.map +1 -1
  692. package/hooks/hook-observers.d.ts +54 -0
  693. package/hooks/hook-observers.d.ts.map +1 -0
  694. package/hooks/hook-order.d.ts +24 -0
  695. package/hooks/hook-order.d.ts.map +1 -0
  696. package/hooks/hook.registry.d.ts +9 -7
  697. package/hooks/hook.registry.d.ts.map +1 -1
  698. package/http-route/flows/http.route.flow.d.ts +37 -0
  699. package/http-route/flows/http.route.flow.d.ts.map +1 -0
  700. package/http-route/http-route.table.d.ts +40 -0
  701. package/http-route/http-route.table.d.ts.map +1 -0
  702. package/http-route/people-sign-in.routes.d.ts +17 -0
  703. package/http-route/people-sign-in.routes.d.ts.map +1 -0
  704. package/http-route/sse-route.stream.d.ts +42 -0
  705. package/http-route/sse-route.stream.d.ts.map +1 -0
  706. package/index.d.ts +129 -79
  707. package/index.d.ts.map +1 -1
  708. package/index.js +189 -39
  709. package/job/execution/index.d.ts +2 -2
  710. package/job/execution/index.d.ts.map +1 -1
  711. package/job/execution/job-execution.manager.d.ts +120 -2
  712. package/job/execution/job-execution.manager.d.ts.map +1 -1
  713. package/job/flows/execute-job.flow.d.ts +22 -6
  714. package/job/flows/execute-job.flow.d.ts.map +1 -1
  715. package/job/index.d.ts +4 -0
  716. package/job/index.d.ts.map +1 -1
  717. package/job/job-admission.d.ts +45 -0
  718. package/job/job-admission.d.ts.map +1 -0
  719. package/job/job-attempt.d.ts +29 -5
  720. package/job/job-attempt.d.ts.map +1 -1
  721. package/job/job-run-access.d.ts +15 -0
  722. package/job/job-run-access.d.ts.map +1 -0
  723. package/job/job-scope.helper.d.ts +39 -11
  724. package/job/job-scope.helper.d.ts.map +1 -1
  725. package/job/job.instance.d.ts +2 -1
  726. package/job/job.instance.d.ts.map +1 -1
  727. package/job/resources/job-run.resource.d.ts +15 -0
  728. package/job/resources/job-run.resource.d.ts.map +1 -0
  729. package/job/runner/detached-job.worker.d.ts +16 -0
  730. package/job/runner/detached-job.worker.d.ts.map +1 -0
  731. package/job/runner/job-runner.d.ts +35 -0
  732. package/job/runner/job-runner.d.ts.map +1 -0
  733. package/job/runner/run-flusher.d.ts +42 -0
  734. package/job/runner/run-flusher.d.ts.map +1 -0
  735. package/job/store/index.d.ts +2 -0
  736. package/job/store/index.d.ts.map +1 -1
  737. package/job/store/job-definition-store.factory.d.ts +8 -5
  738. package/job/store/job-definition-store.factory.d.ts.map +1 -1
  739. package/job/store/job-state-store.factory.d.ts +10 -6
  740. package/job/store/job-state-store.factory.d.ts.map +1 -1
  741. package/job/store/job-state.interface.d.ts +42 -1
  742. package/job/store/job-state.interface.d.ts.map +1 -1
  743. package/job/store/memory-job-state.store.d.ts +8 -0
  744. package/job/store/memory-job-state.store.d.ts.map +1 -1
  745. package/job/store/redis-job-state.store.d.ts +15 -1
  746. package/job/store/redis-job-state.store.d.ts.map +1 -1
  747. package/job/store/storage-job-definition.store.d.ts +25 -0
  748. package/job/store/storage-job-definition.store.d.ts.map +1 -0
  749. package/job/store/storage-job-state.store.d.ts +34 -0
  750. package/job/store/storage-job-state.store.d.ts.map +1 -0
  751. package/job/tools/cancel-job.tool.d.ts +10 -0
  752. package/job/tools/cancel-job.tool.d.ts.map +1 -0
  753. package/job/tools/execute-job.tool.d.ts +11 -1
  754. package/job/tools/execute-job.tool.d.ts.map +1 -1
  755. package/job/tools/get-job-status.tool.d.ts +0 -12
  756. package/job/tools/get-job-status.tool.d.ts.map +1 -1
  757. package/job/tools/index.d.ts +1 -0
  758. package/job/tools/index.d.ts.map +1 -1
  759. package/job/tools/index.js +39 -0
  760. package/lazy-subsystems.d.ts +2 -0
  761. package/lazy-subsystems.d.ts.map +1 -0
  762. package/logger/logger.registry.d.ts.map +1 -1
  763. package/manifest/build-manifest.d.ts +17 -0
  764. package/manifest/build-manifest.d.ts.map +1 -0
  765. package/manifest/build-server-manifest.d.ts +28 -0
  766. package/manifest/build-server-manifest.d.ts.map +1 -0
  767. package/manifest/index.d.ts +6 -0
  768. package/manifest/index.d.ts.map +1 -0
  769. package/manifest/instructions-budget.check.d.ts +15 -0
  770. package/manifest/instructions-budget.check.d.ts.map +1 -0
  771. package/manifest/manifest-lint.d.ts +29 -0
  772. package/manifest/manifest-lint.d.ts.map +1 -0
  773. package/manifest/server-manifest.schema.d.ts +234 -0
  774. package/manifest/server-manifest.schema.d.ts.map +1 -0
  775. package/mcp-registry/flows/server-card.flow.d.ts +1 -1
  776. package/mcp-registry/flows/server-card.flow.d.ts.map +1 -1
  777. package/mcp-registry/flows/well-known.ai-catalog.flow.d.ts +1 -1
  778. package/mcp-registry/flows/well-known.ai-catalog.flow.d.ts.map +1 -1
  779. package/notification/notification.service.d.ts.map +1 -1
  780. package/offload/index.d.ts +3 -0
  781. package/offload/index.d.ts.map +1 -0
  782. package/offload/offload-pool.d.ts +41 -0
  783. package/offload/offload-pool.d.ts.map +1 -0
  784. package/offload/offload-worker.globals.d.ts +34 -0
  785. package/offload/offload-worker.globals.d.ts.map +1 -0
  786. package/offload/offload-worker.source.d.ts +3 -0
  787. package/offload/offload-worker.source.d.ts.map +1 -0
  788. package/offload/offload.service.d.ts +15 -0
  789. package/offload/offload.service.d.ts.map +1 -0
  790. package/offload/offload.types.d.ts +30 -0
  791. package/offload/offload.types.d.ts.map +1 -0
  792. package/offload/read-in-worker.d.ts +5 -0
  793. package/offload/read-in-worker.d.ts.map +1 -0
  794. package/offload/run-job-in-worker.d.ts +9 -0
  795. package/offload/run-job-in-worker.d.ts.map +1 -0
  796. package/offload/worker-job.runner.d.ts +5 -0
  797. package/offload/worker-job.runner.d.ts.map +1 -0
  798. package/offload/worker-jobs.d.ts +14 -0
  799. package/offload/worker-jobs.d.ts.map +1 -0
  800. package/offload/worker-resource.reader.d.ts +21 -0
  801. package/offload/worker-resource.reader.d.ts.map +1 -0
  802. package/offload/worker-resources.d.ts +24 -0
  803. package/offload/worker-resources.d.ts.map +1 -0
  804. package/package.json +23 -11
  805. package/plugin/enforced-metadata.check.d.ts +7 -6
  806. package/plugin/enforced-metadata.check.d.ts.map +1 -1
  807. package/plugin/plugin.registry.d.ts +2 -0
  808. package/plugin/plugin.registry.d.ts.map +1 -1
  809. package/prompt/flows/get-prompt.flow.d.ts +12 -4
  810. package/prompt/flows/get-prompt.flow.d.ts.map +1 -1
  811. package/prompt/flows/prompts-list.flow.d.ts +3 -1
  812. package/prompt/flows/prompts-list.flow.d.ts.map +1 -1
  813. package/prompt/prompt.registry.d.ts +2 -0
  814. package/prompt/prompt.registry.d.ts.map +1 -1
  815. package/provider/create-container.d.ts +31 -0
  816. package/provider/create-container.d.ts.map +1 -0
  817. package/provider/provider.lifecycle.d.ts +23 -0
  818. package/provider/provider.lifecycle.d.ts.map +1 -0
  819. package/provider/provider.registry.d.ts +27 -0
  820. package/provider/provider.registry.d.ts.map +1 -1
  821. package/provider/provider.utils.d.ts.map +1 -1
  822. package/provider/store.provider.d.ts +13 -0
  823. package/provider/store.provider.d.ts.map +1 -0
  824. package/remote-mcp/mcp-client.service.d.ts.map +1 -1
  825. package/resource/flows/read-resource.flow.d.ts +15 -5
  826. package/resource/flows/read-resource.flow.d.ts.map +1 -1
  827. package/resource/flows/resource-templates-list.flow.d.ts +3 -1
  828. package/resource/flows/resource-templates-list.flow.d.ts.map +1 -1
  829. package/resource/flows/resources-list.flow.d.ts +3 -1
  830. package/resource/flows/resources-list.flow.d.ts.map +1 -1
  831. package/resource/flows/subscribe-resource.flow.d.ts +6 -2
  832. package/resource/flows/subscribe-resource.flow.d.ts.map +1 -1
  833. package/resource/materialized/index.d.ts +4 -0
  834. package/resource/materialized/index.d.ts.map +1 -0
  835. package/resource/materialized/materialized-resource.context.d.ts +13 -0
  836. package/resource/materialized/materialized-resource.context.d.ts.map +1 -0
  837. package/resource/materialized/materialized-resources.d.ts +31 -0
  838. package/resource/materialized/materialized-resources.d.ts.map +1 -0
  839. package/resource/materialized/resource-store.d.ts +72 -0
  840. package/resource/materialized/resource-store.d.ts.map +1 -0
  841. package/resource/resource.instance.d.ts.map +1 -1
  842. package/resource/resource.registry.d.ts +2 -0
  843. package/resource/resource.registry.d.ts.map +1 -1
  844. package/scope/browser-stores.d.ts +73 -0
  845. package/scope/browser-stores.d.ts.map +1 -0
  846. package/scope/dev-events-observability.d.ts +11 -0
  847. package/scope/dev-events-observability.d.ts.map +1 -0
  848. package/scope/flows/http.request.flow.d.ts +2 -0
  849. package/scope/flows/http.request.flow.d.ts.map +1 -1
  850. package/scope/flows/request-log.redaction.d.ts +4 -0
  851. package/scope/flows/request-log.redaction.d.ts.map +1 -1
  852. package/scope/http-scope.helper.d.ts +3 -0
  853. package/scope/http-scope.helper.d.ts.map +1 -1
  854. package/scope/observability-scope.helper.d.ts +3 -1
  855. package/scope/observability-scope.helper.d.ts.map +1 -1
  856. package/scope/scope.instance.d.ts +10 -1
  857. package/scope/scope.instance.d.ts.map +1 -1
  858. package/server/adapters/express.host.adapter.d.ts +2 -2
  859. package/server/adapters/express.host.adapter.d.ts.map +1 -1
  860. package/server/adapters/utf8-json.parser.d.ts +3 -0
  861. package/server/adapters/utf8-json.parser.d.ts.map +1 -0
  862. package/server/security/replaceable-directory.d.ts +9 -0
  863. package/server/security/replaceable-directory.d.ts.map +1 -0
  864. package/server/security/resolve-allowed-hosts.d.ts +16 -0
  865. package/server/security/resolve-allowed-hosts.d.ts.map +1 -1
  866. package/server/security/same-origin.d.ts +12 -0
  867. package/server/security/same-origin.d.ts.map +1 -0
  868. package/server/security/security-audit.d.ts.map +1 -1
  869. package/server/security/unix-socket-guard.d.ts +12 -0
  870. package/server/security/unix-socket-guard.d.ts.map +1 -0
  871. package/server/server.validation.d.ts.map +1 -1
  872. package/shared/browser-shared-server.d.ts +3 -0
  873. package/shared/browser-shared-server.d.ts.map +1 -0
  874. package/shared/ensure-shared-server.d.ts +58 -0
  875. package/shared/ensure-shared-server.d.ts.map +1 -0
  876. package/shared/flows/shared.drain.flow.d.ts +49 -0
  877. package/shared/flows/shared.drain.flow.d.ts.map +1 -0
  878. package/shared/flows/shared.identify.flow.d.ts +48 -0
  879. package/shared/flows/shared.identify.flow.d.ts.map +1 -0
  880. package/shared/index.d.ts +8 -0
  881. package/shared/index.d.ts.map +1 -0
  882. package/shared/shared-attach.d.ts +35 -0
  883. package/shared/shared-attach.d.ts.map +1 -0
  884. package/shared/shared-embedded.d.ts +12 -0
  885. package/shared/shared-embedded.d.ts.map +1 -0
  886. package/shared/shared-endpoint.d.ts +44 -0
  887. package/shared/shared-endpoint.d.ts.map +1 -0
  888. package/shared/shared-files.d.ts +28 -0
  889. package/shared/shared-files.d.ts.map +1 -0
  890. package/shared/shared-serve.d.ts +34 -0
  891. package/shared/shared-serve.d.ts.map +1 -0
  892. package/shared/shared-server.identity.d.ts +15 -0
  893. package/shared/shared-server.identity.d.ts.map +1 -0
  894. package/shared/shared-server.lifecycle.d.ts +40 -0
  895. package/shared/shared-server.lifecycle.d.ts.map +1 -0
  896. package/shared/shared-server.options.d.ts +38 -0
  897. package/shared/shared-server.options.d.ts.map +1 -0
  898. package/shared/shared-version.d.ts +3 -0
  899. package/shared/shared-version.d.ts.map +1 -0
  900. package/shared/start-lock.d.ts +28 -0
  901. package/shared/start-lock.d.ts.map +1 -0
  902. package/shared/unix-socket-fetch.d.ts +6 -0
  903. package/shared/unix-socket-fetch.d.ts.map +1 -0
  904. package/skill/flows/filter-skills.flow.d.ts +1 -1
  905. package/skill/flows/filter-skills.flow.d.ts.map +1 -1
  906. package/skill/flows/load-skill.flow.d.ts +1 -1
  907. package/skill/flows/load-skill.flow.d.ts.map +1 -1
  908. package/skill/sep-2640/sep-2640.per-skill.d.ts +7 -5
  909. package/skill/sep-2640/sep-2640.per-skill.d.ts.map +1 -1
  910. package/skill/skill-instructions.helper.d.ts +17 -11
  911. package/skill/skill-instructions.helper.d.ts.map +1 -1
  912. package/skill/skill-scope.helper.d.ts.map +1 -1
  913. package/skill/skill.registry.d.ts +2 -1
  914. package/skill/skill.registry.d.ts.map +1 -1
  915. package/skill/sync/skill-hash.d.ts.map +1 -1
  916. package/storage/sqlite-storage.provider.d.ts +14 -0
  917. package/storage/sqlite-storage.provider.d.ts.map +1 -0
  918. package/subsystems.d.ts +13 -0
  919. package/subsystems.d.ts.map +1 -0
  920. package/surface/entry-enabled.d.ts +10 -0
  921. package/surface/entry-enabled.d.ts.map +1 -0
  922. package/surface/file-signal.d.ts +27 -0
  923. package/surface/file-signal.d.ts.map +1 -0
  924. package/surface/index.d.ts +5 -0
  925. package/surface/index.d.ts.map +1 -0
  926. package/surface/live-surface.d.ts +73 -0
  927. package/surface/live-surface.d.ts.map +1 -0
  928. package/surface/unchanged-lists.d.ts +8 -0
  929. package/surface/unchanged-lists.d.ts.map +1 -0
  930. package/task/flows/tasks-cancel.flow.d.ts +1 -1
  931. package/task/flows/tasks-cancel.flow.d.ts.map +1 -1
  932. package/task/flows/tasks-get.flow.d.ts +1 -1
  933. package/task/flows/tasks-get.flow.d.ts.map +1 -1
  934. package/task/flows/tasks-list.flow.d.ts +1 -1
  935. package/task/flows/tasks-list.flow.d.ts.map +1 -1
  936. package/task/flows/tasks-result.flow.d.ts +1 -1
  937. package/task/flows/tasks-result.flow.d.ts.map +1 -1
  938. package/task/helpers/cli-task-runner.d.ts +6 -1
  939. package/task/helpers/cli-task-runner.d.ts.map +1 -1
  940. package/task/index.d.ts +1 -1
  941. package/task/index.d.ts.map +1 -1
  942. package/task/store/task-store.factory.d.ts.map +1 -1
  943. package/task/task-scope.runtime.d.ts +9 -0
  944. package/task/task-scope.runtime.d.ts.map +1 -0
  945. package/third-party/import-protocol-client.d.ts +3 -0
  946. package/third-party/import-protocol-client.d.ts.map +1 -0
  947. package/third-party/import-protocol-client.js +1 -0
  948. package/third-party/protocol-client.d.ts +4 -0
  949. package/third-party/protocol-client.d.ts.map +1 -0
  950. package/third-party/protocol-client.js +1 -0
  951. package/tool/flows/call-tool.flow.d.ts +48 -5
  952. package/tool/flows/call-tool.flow.d.ts.map +1 -1
  953. package/tool/flows/tools-list.flow.d.ts +6 -2
  954. package/tool/flows/tools-list.flow.d.ts.map +1 -1
  955. package/tool/tool-output-policy.d.ts +33 -0
  956. package/tool/tool-output-policy.d.ts.map +1 -0
  957. package/tool/tool.instance.d.ts +3 -3
  958. package/tool/tool.instance.d.ts.map +1 -1
  959. package/tool/tool.registry.d.ts +4 -0
  960. package/tool/tool.registry.d.ts.map +1 -1
  961. package/tool/tool.utils.d.ts +2 -2
  962. package/tool/tool.utils.d.ts.map +1 -1
  963. package/tool/ui/platform-adapters.d.ts +2 -1
  964. package/tool/ui/platform-adapters.d.ts.map +1 -1
  965. package/transport/adapters/transport.local.adapter.d.ts +1 -1
  966. package/transport/adapters/transport.local.adapter.d.ts.map +1 -1
  967. package/transport/event-stores/index.d.ts +2 -2
  968. package/transport/flows/handle.mcp-20260728.flow.d.ts +17 -0
  969. package/transport/flows/handle.mcp-20260728.flow.d.ts.map +1 -1
  970. package/transport/flows/handle.sse.flow.d.ts +3 -1
  971. package/transport/flows/handle.sse.flow.d.ts.map +1 -1
  972. package/transport/flows/handle.streamable-http.flow.d.ts +3 -1
  973. package/transport/flows/handle.streamable-http.flow.d.ts.map +1 -1
  974. package/transport/in-memory-server.d.ts.map +1 -1
  975. package/transport/index.js +57 -0
  976. package/transport/mcp-20260728/request-state.d.ts.map +1 -1
  977. package/transport/mcp-20260728/result-decorator.d.ts +5 -3
  978. package/transport/mcp-20260728/result-decorator.d.ts.map +1 -1
  979. package/transport/mcp-20260728/subscriptions.d.ts +5 -0
  980. package/transport/mcp-20260728/subscriptions.d.ts.map +1 -1
  981. package/transport/mcp-handlers/index.d.ts +551 -551
  982. package/transport/mcp-handlers/index.d.ts.map +1 -1
  983. package/transport/mcp-handlers/logging-set-level-request.handler.d.ts +1 -1
  984. package/transport/mcp-handlers/mcp-error.utils.d.ts +1 -1
  985. package/transport/mcp-handlers/mcp-error.utils.d.ts.map +1 -1
  986. package/transport/mcp-handlers/mcp-handlers.types.d.ts +1 -1
  987. package/transport/mcp-handlers/mcp-handlers.types.d.ts.map +1 -1
  988. package/transport/mcp-handlers/mcp-surface.d.ts +2 -1
  989. package/transport/mcp-handlers/mcp-surface.d.ts.map +1 -1
  990. package/transport/mcp-handlers/skills-mcp.types.d.ts +1 -1
  991. package/transport/mcp-handlers/skills-mcp.types.d.ts.map +1 -1
  992. package/transport/mcp-server.factory.d.ts +3 -0
  993. package/transport/mcp-server.factory.d.ts.map +1 -0
  994. package/transport/stdio-revision-router.d.ts +6 -1
  995. package/transport/stdio-revision-router.d.ts.map +1 -1
  996. package/transport/streamable-http-preload.d.ts +3 -0
  997. package/transport/streamable-http-preload.d.ts.map +1 -0
  998. package/transport/web-fetch-handler.d.ts +2 -2
  999. package/transport/web-fetch-handler.d.ts.map +1 -1
  1000. package/transport/web-standard-mcp.d.ts.map +1 -1
  1001. package/utils/abort.utils.d.ts +6 -0
  1002. package/utils/abort.utils.d.ts.map +1 -0
  1003. package/workflow/engine/workflow-step.executor.d.ts +5 -0
  1004. package/workflow/engine/workflow-step.executor.d.ts.map +1 -1
  1005. package/workflow/tools/get-workflow-status.tool.d.ts +0 -12
  1006. package/workflow/tools/get-workflow-status.tool.d.ts.map +1 -1
  1007. package/workflow/tools/index.js +37 -0
@@ -0,0 +1,27 @@
1
+ import { type StorageConfig } from '@frontmcp/utils';
2
+ import { type DutyInterface, type OnBootstrap, type OnReady, type OnShutdown, type ResolvedDutyMetadata } from '../common';
3
+ import type ProviderRegistry from '../provider/provider.registry';
4
+ type DutyInstance = DutyInterface & Partial<OnBootstrap & OnReady & OnShutdown>;
5
+ /** The lifecycle the provider registry runs for a `@Duty` instance: its own hooks, plus starting and stopping it. */
6
+ export declare function dutyLifecycleOf(duty: object, metadata: ResolvedDutyMetadata, providers: ProviderRegistry): DutyLifecycle;
7
+ /** Start the duties built in `providers` as a server does once it serves: each one's own `onReady()`, then its runs. */
8
+ export declare function startDuties(providers: ProviderRegistry): Promise<void>;
9
+ /** Where the leases live: the server's Redis when it has one, otherwise a SQLite file every process on the machine opens. */
10
+ export declare function dutyStorageConfig(redis: unknown): StorageConfig;
11
+ export declare class DutyLifecycle implements OnBootstrap, OnReady, OnShutdown {
12
+ private readonly duty;
13
+ private readonly metadata;
14
+ private readonly providers;
15
+ private started?;
16
+ private claimedKey?;
17
+ constructor(duty: DutyInstance, metadata: ResolvedDutyMetadata, providers: ProviderRegistry);
18
+ onBootstrap(): Promise<void>;
19
+ onReady(): Promise<void>;
20
+ onShutdown(): Promise<void>;
21
+ private startRunner;
22
+ /** Take `key` for this duty's class in this process: another class with the same key would never run here. */
23
+ private claim;
24
+ private releaseClaim;
25
+ }
26
+ export {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I,CAAC;YAUnB,WAAW;IA4BzB,8GAA8G;IAC9G,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,YAAY;CAQrB"}
@@ -0,0 +1,61 @@
1
+ import { type NamespacedStorage } from '@frontmcp/utils';
2
+ import type { DutyRunContext, FrontMcpLogger } from '../common';
3
+ /** The store operations a lease needs; the SQLite, Redis and memory stores run each one atomically. */
4
+ export type DutyLeaseStorage = Pick<NamespacedStorage, 'set' | 'ttl' | 'expireIfEquals' | 'deleteIfEquals'>;
5
+ export type DutyLogger = Pick<FrontMcpLogger, 'verbose' | 'info' | 'warn' | 'error'>;
6
+ export interface DutyRunnerOptions {
7
+ name: string;
8
+ key: string;
9
+ everyMs: number;
10
+ leaseMs: number;
11
+ storage: DutyLeaseStorage;
12
+ logger: DutyLogger;
13
+ run(context: DutyRunContext): unknown;
14
+ }
15
+ /**
16
+ * Runs a duty every `everyMs` while this process holds its lease, and contends for the lease otherwise. The lease is a
17
+ * key holding this runner's id with a TTL, so it expires by the store's clock when the holder stops renewing it. The
18
+ * holder renews it every third of `leaseMs`, and again before each run, so a holder that wakes after another process
19
+ * took the lease over never runs again.
20
+ */
21
+ export declare class DutyRunner {
22
+ private readonly options;
23
+ private readonly holder;
24
+ private readonly leaseSeconds;
25
+ private readonly ranKey;
26
+ private holding;
27
+ private stopped;
28
+ private reportedHeldElsewhere;
29
+ private leaseCheck?;
30
+ private leaseTimer?;
31
+ private leaseDeadline?;
32
+ private tickTimer?;
33
+ private inFlight?;
34
+ constructor(options: DutyRunnerOptions);
35
+ /** Contend for the lease once now, then renew or contend again every third of the lease. */
36
+ start(): Promise<void>;
37
+ /** Stop contending, abort the run in flight and wait for it while still renewing the lease, then release it. */
38
+ stop(): Promise<void>;
39
+ private checkLease;
40
+ private acquire;
41
+ /** Extend the lease while it holds this runner's id, and give up holding it by the time the store could end it. */
42
+ private renew;
43
+ /**
44
+ * Stop at `deadline` (monotonic) unless a renew succeeds first: the store ends the lease no sooner, so this process
45
+ * never runs past the point where another one could take the lease over, even while the store can't be reached.
46
+ */
47
+ private holdUntil;
48
+ private reportHeldElsewhere;
49
+ /**
50
+ * Start the runs, the first once the interval the last run (in any process) started has passed, or a whole interval
51
+ * from now when the store can't say when that was.
52
+ */
53
+ private hold;
54
+ private lose;
55
+ private scheduleTick;
56
+ private tick;
57
+ private runIfHeld;
58
+ /** Renew the lease right before a run, so a holder that lost it while paused never runs, and mark the run. */
59
+ private claimRun;
60
+ }
61
+ //# sourceMappingURL=duty.runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duty.runner.d.ts","sourceRoot":"","sources":["../../src/duty/duty.runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAErE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhE,uGAAuG;AACvG,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,EAAE,KAAK,GAAG,KAAK,GAAG,gBAAgB,GAAG,gBAAgB,CAAC,CAAC;AAE5G,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAErF,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,EAAE,UAAU,CAAC;IACnB,GAAG,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC;CACvC;AAOD;;;;;GAKG;AACH,qBAAa,UAAU;IAaT,OAAO,CAAC,QAAQ,CAAC,OAAO;IAZpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,qBAAqB,CAAS;IACtC,OAAO,CAAC,UAAU,CAAC,CAAgB;IACnC,OAAO,CAAC,UAAU,CAAC,CAAgC;IACnD,OAAO,CAAC,aAAa,CAAC,CAAgC;IACtD,OAAO,CAAC,SAAS,CAAC,CAAgC;IAClD,OAAO,CAAC,QAAQ,CAAC,CAAc;gBAEF,OAAO,EAAE,iBAAiB;IAMvD,4FAA4F;IACtF,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAK5B,gHAAgH;IAC1G,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAiBb,UAAU;YAkBV,OAAO;IAMrB,mHAAmH;YACrG,KAAK;IAOnB;;;OAGG;IACH,OAAO,CAAC,SAAS;IAYjB,OAAO,CAAC,mBAAmB;IAQ3B;;;OAGG;YACW,IAAI;IAQlB,OAAO,CAAC,IAAI;IASZ,OAAO,CAAC,YAAY;YAQN,IAAI;YAYJ,SAAS;IASvB,8GAA8G;YAChG,QAAQ;CAevB"}
@@ -67,6 +67,19 @@ export interface ElicitOptions {
67
67
  * Required for URL mode.
68
68
  */
69
69
  url?: string;
70
+ /**
71
+ * Keep the question for the caller after this call stops waiting (`elicitation.persistent`): a person answers it in
72
+ * the inbox, not the client, and the answer reaches this call, or the next call of the same caller that asks `key`.
73
+ * `ttl` is how long this call waits; `persist.ttlMs` how long the question and its answer are kept (longer).
74
+ */
75
+ persist?: PersistOptions;
76
+ }
77
+ /** `ElicitOptions.persist`. */
78
+ export interface PersistOptions {
79
+ /** Names the question among the caller's: asking a key that is waiting asks the same question. */
80
+ key: string;
81
+ /** How long the question, and an answer no call took yet, are kept, in ms. @default elicitation.persistent.ttlMs */
82
+ ttlMs?: number;
70
83
  }
71
84
  /**
72
85
  * Typed elicitation result that preserves the schema type.
@@ -1 +1 @@
1
- {"version":3,"file":"elicitation.types.d.ts","s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;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,yBAAyB,SAAS,CAAC"}
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @module elicitation/flows/elicitation-request.flow
8
8
  */
9
- import { z } from '@frontmcp/lazy-zod';
9
+ import { internalZ as z } from '@frontmcp/lazy-zod';
10
10
  import { FlowBase, type FlowRunOptions } from '../../common';
11
11
  import { type PendingElicitRecord } from '../store';
12
12
  declare const inputSchema: import("@frontmcp/lazy-zod").ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"elicitation-request.flow.d.ts","sourceRoot":"","sources":["../../../src/elicitation/flows/elicitation-request.flow.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAGvC,OAAO,EAAQ,QAAQ,EAA8B,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAG/F,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;gCAkBf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;mBAYU,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC;gCACxD,CAAC;AAEH,QAAA,MAAM,WAAW;;;;;;;;;;;;;;mBAWsB,CAAC,CAAC,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;;;;;;;;;;;uBAdrD,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC;;gCAiBxD,CAAC;AAEH,QAAA,MAAM,IAAI;;;;CAI2B,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,qBAAqB,EAAE,cAAc,CACnC,sBAAsB,EACtB,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,YAAY,EACnB,OAAO,WAAW,CACnB,CAAC;KACH;CACF;AAED,QAAA,MAAM,IAAI,EAAG,qBAA8B,CAAC;AAG5C;;;;;;;;;;;;GAYG;AAQH,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IACvE,MAAM,wCAAoD;IAGpD,UAAU;IAqBV,eAAe;IAcf,gBAAgB;IAehB,kBAAkB;IA0BlB,kBAAkB;IAwBlB,QAAQ;CAuBf;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
1
+ {"version":3,"file":"elicitation-request.flow.d.ts","sourceRoot":"","sources":["../../../src/elicitation/flows/elicitation-request.flow.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,IAAI,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAQ,QAAQ,EAA8B,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAG/F,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;gCAkBf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;mBAYU,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC;gCACxD,CAAC;AAEH,QAAA,MAAM,WAAW;;;;;;;;;;;;;;mBAWsB,CAAC,CAAC,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;;;;;;;;;;;uBAdrD,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC;;gCAiBxD,CAAC;AAEH,QAAA,MAAM,IAAI;;;;CAI2B,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,qBAAqB,EAAE,cAAc,CACnC,sBAAsB,EACtB,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,YAAY,EACnB,OAAO,WAAW,CACnB,CAAC;KACH;CACF;AAED,QAAA,MAAM,IAAI,EAAG,qBAA8B,CAAC;AAG5C;;;;;;;;;;;;GAYG;AAQH,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IACvE,MAAM,wCAAoD;IAGpD,UAAU;IAqBV,eAAe;IAcf,gBAAgB;IAehB,kBAAkB;IA0BlB,kBAAkB;IAwBlB,QAAQ;CAuBf;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @module elicitation/flows/elicitation-result.flow
8
8
  */
9
- import { z } from '@frontmcp/lazy-zod';
9
+ import { internalZ as z } from '@frontmcp/lazy-zod';
10
10
  import { FlowBase, type FlowRunOptions } from '../../common';
11
11
  import type { ElicitResult } from '../elicitation.types';
12
12
  import type { PendingElicitRecord } from '../store';
@@ -1 +1 @@
1
- {"version":3,"file":"elicitation-result.flow.d.ts","sourceRoot":"","sources":["../../../src/elicitation/flows/elicitation-result.flow.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAEvC,OAAO,EAAQ,QAAQ,EAA8B,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE/F,OAAO,KAAK,EAAE,YAAY,EAAgB,MAAM,sBAAsB,CAAC;AAEvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,QAAA,MAAM,WAAW;;;;;;;;;;gCAQf,CAAC;AAEH,QAAA,MAAM,YAAY;;;YAMc,CAAC,CAAC,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;gCACjE,CAAC;AAEH,QAAA,MAAM,WAAW;;;;;;;;mBAIsB,CAAC,CAAC,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;kBAC3C,CAAC,CAAC,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;;;;;gBARzC,CAAC,CAAC,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;;gCAWjE,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S,CAAC;;gCAWjE,CAAC;AAEH,QAAA,MAAM,IAAI;;;;CAI2B,CAAC;AAEtC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,WAAW;QACnB,oBAAoB,EAAE,cAAc,CAClC,qBAAqB,EACrB,OAAO,IAAI,EACX,OAAO,WAAW,EAClB,OAAO,YAAY,EACnB,OAAO,WAAW,CACnB,CAAC;KACH;CACF;AAED,QAAA,MAAM,IAAI,EAAG,oBAA6B,CAAC;AAG3C;;;;;;;;;;;GAWG;AAQH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,QAAQ,CAAC,OAAO,IAAI,CAAC;IACtE,MAAM,wCAAmD;IAGnD,UAAU;IAkBV,aAAa;IAuBb,eAAe;IA+Cf,WAAW;IAoBX,aAAa;IA+Bb,QAAQ;CAYf;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
@@ -10,6 +10,7 @@ import { type ZodType } from '@frontmcp/lazy-zod';
10
10
  import { type FrontMcpContext } from '../../context';
11
11
  import { type ClientCapabilities } from '../../notification';
12
12
  import { type ElicitOptions, type ElicitResult } from '../elicitation.types';
13
+ import { type QuestionStore } from '../questions/question.store';
13
14
  /**
14
15
  * Transport interface for elicitation.
15
16
  * Matches the shape exposed by FrontMcpContext.
@@ -37,6 +38,13 @@ export interface ElicitHelperDeps {
37
38
  * @default false
38
39
  */
39
40
  elicitationEnabled?: boolean;
41
+ /** The scope's persistent questions (`elicitation.persistent`), with their default TTL. */
42
+ questions?: {
43
+ store: QuestionStore;
44
+ ttlMs: number;
45
+ };
46
+ /** Aborts when the call stops; a persistent question then stops waiting. */
47
+ signal?: AbortSignal;
40
48
  }
41
49
  /**
42
50
  * Perform an elicitation request.
@@ -1 +1 @@
1
- {"version":3,"file":"elicit.helper.d.ts","sourceRoot":"","sources":["../../../src/elicitation/helpers/elicit.helper.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAmB,KAAK,OAAO,EAAE,MAAM,oBAAoB,CA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AAE,WAAW,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,OAAO,EACnD,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,CAAC,EAClB,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,YAAY,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAgHjE;AAOD;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"extend-output-schema.d.ts","sourceRoot":"","sources":["../../../src/elicitation/helpers/extend-output-schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gCAAgC,CAC9C,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAClD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA0CzB"}
1
+ {"version":3,"file":"extend-output-schema.d.ts","sourceRoot":"","sources":["../../../src/elicitation/helpers/extend-output-schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gCAAgC,CAC9C,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAClD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA6CzB"}
@@ -29,10 +29,11 @@
29
29
  * ```
30
30
  */
31
31
  export declare const ElicitationRequestHook: {
32
- Stage: (stage: "finalize" | "parseInput" | "validateRequest" | "generateElicitId" | "storePendingRecord" | "buildRequestParams", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationRequestFlow>) => MethodDecorator;
33
- Will: (stage: "finalize" | "parseInput" | "validateRequest" | "generateElicitId" | "storePendingRecord" | "buildRequestParams", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationRequestFlow>) => MethodDecorator;
34
- Did: (stage: "finalize" | "parseInput" | "validateRequest" | "generateElicitId" | "storePendingRecord" | "buildRequestParams", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationRequestFlow>) => MethodDecorator;
35
- Around: (stage: "finalize" | "parseInput" | "validateRequest" | "generateElicitId" | "storePendingRecord" | "buildRequestParams", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationRequestFlow>) => MethodDecorator;
32
+ Stage: (stage: "finalize" | "parseInput" | "validateRequest" | "generateElicitId" | "storePendingRecord" | "buildRequestParams", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationRequestFlow>) => import("../../common").FlowHookDecorator<import("../../common").FlowHookMethod<import("@frontmcp/sdk").ElicitationRequestFlow>>;
33
+ Will: (stage: "finalize" | "parseInput" | "validateRequest" | "generateElicitId" | "storePendingRecord" | "buildRequestParams", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationRequestFlow>) => import("../../common").FlowHookDecorator<import("../../common").FlowHookMethod<import("@frontmcp/sdk").ElicitationRequestFlow>>;
34
+ Did: (stage: "finalize" | "parseInput" | "validateRequest" | "generateElicitId" | "storePendingRecord" | "buildRequestParams", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationRequestFlow>) => import("../../common").FlowHookDecorator<import("../../common").FlowHookMethod<import("@frontmcp/sdk").ElicitationRequestFlow>>;
35
+ Around: (stage: "finalize" | "parseInput" | "validateRequest" | "generateElicitId" | "storePendingRecord" | "buildRequestParams", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationRequestFlow>) => import("../../common").FlowHookDecorator<import("../../common").AroundFlowHookMethod<import("@frontmcp/sdk").ElicitationRequestFlow>>;
36
+ Finally: (stage: "finalize" | "parseInput" | "validateRequest" | "generateElicitId" | "storePendingRecord" | "buildRequestParams", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationRequestFlow>) => import("../../common").FlowHookDecorator<import("../../common").FlowHookMethod<import("@frontmcp/sdk").ElicitationRequestFlow>>;
36
37
  };
37
38
  /**
38
39
  * Hook decorators for the elicitation:result flow.
@@ -58,9 +59,10 @@ export declare const ElicitationRequestHook: {
58
59
  * ```
59
60
  */
60
61
  export declare const ElicitationResultHook: {
61
- Stage: (stage: "finalize" | "parseInput" | "lookupPending" | "validateContent" | "buildResult" | "publishResult", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationResultFlow>) => MethodDecorator;
62
- Will: (stage: "finalize" | "parseInput" | "lookupPending" | "validateContent" | "buildResult" | "publishResult", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationResultFlow>) => MethodDecorator;
63
- Did: (stage: "finalize" | "parseInput" | "lookupPending" | "validateContent" | "buildResult" | "publishResult", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationResultFlow>) => MethodDecorator;
64
- Around: (stage: "finalize" | "parseInput" | "lookupPending" | "validateContent" | "buildResult" | "publishResult", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationResultFlow>) => MethodDecorator;
62
+ Stage: (stage: "finalize" | "parseInput" | "lookupPending" | "validateContent" | "buildResult" | "publishResult", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationResultFlow>) => import("../../common").FlowHookDecorator<import("../../common").FlowHookMethod<import("@frontmcp/sdk").ElicitationResultFlow>>;
63
+ Will: (stage: "finalize" | "parseInput" | "lookupPending" | "validateContent" | "buildResult" | "publishResult", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationResultFlow>) => import("../../common").FlowHookDecorator<import("../../common").FlowHookMethod<import("@frontmcp/sdk").ElicitationResultFlow>>;
64
+ Did: (stage: "finalize" | "parseInput" | "lookupPending" | "validateContent" | "buildResult" | "publishResult", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationResultFlow>) => import("../../common").FlowHookDecorator<import("../../common").FlowHookMethod<import("@frontmcp/sdk").ElicitationResultFlow>>;
65
+ Around: (stage: "finalize" | "parseInput" | "lookupPending" | "validateContent" | "buildResult" | "publishResult", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationResultFlow>) => import("../../common").FlowHookDecorator<import("../../common").AroundFlowHookMethod<import("@frontmcp/sdk").ElicitationResultFlow>>;
66
+ Finally: (stage: "finalize" | "parseInput" | "lookupPending" | "validateContent" | "buildResult" | "publishResult", opts?: import("../../common").HookOptions<import("@frontmcp/sdk").ElicitationResultFlow>) => import("../../common").FlowHookDecorator<import("../../common").FlowHookMethod<import("@frontmcp/sdk").ElicitationResultFlow>>;
65
67
  };
66
68
  //# sourceMappingURL=elicitation.hooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"elicitation.hooks.d.ts","sourceRoot":"","sources":["../../../src/elicitation/hooks/elicitation.hooks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,sBAAsB;;;;;CAA4D,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,qBAAqB;;;;;CAA0D,CAAC"}
1
+ {"version":3,"file":"elicitation.hooks.d.ts","sourceRoot":"","sources":["../../../src/elicitation/hooks/elicitation.hooks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,sBAAsB;;;;;;CAA4D,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,qBAAqB;;;;;;CAA0D,CAAC"}
@@ -15,4 +15,5 @@ export * from './elicitation.types';
15
15
  export { ELICITATION_FALLBACK_JSON_SCHEMA, type ElicitationFallbackResponse } from './elicitation-fallback.schema';
16
16
  export * from './store';
17
17
  export * from './helpers';
18
+ export * from './questions';
18
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/elicitation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,cAAc,qBAAqB,CAAC;AAGpC,OAAO,EAAE,gCAAgC,EAAE,KAAK,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAGnH,cAAc,SAAS,CAAC;AAGxB,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/elicitation/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,cAAc,qBAAqB,CAAC;AAGpC,OAAO,EAAE,gCAAgC,EAAE,KAAK,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAGnH,cAAc,SAAS,CAAC;AAGxB,cAAc,WAAW,CAAC;AAG1B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { type ZodType } from '@frontmcp/lazy-zod';
2
+ import { type ElicitOptions, type ElicitResult, type PersistOptions } from '../elicitation.types';
3
+ import { type ElicitHelperDeps } from '../helpers/elicit.helper';
4
+ import { type QuestionStore } from './question.store';
5
+ export interface PersistentAskDeps {
6
+ store: QuestionStore;
7
+ subject: string;
8
+ /** Aborted when the call stops: the question stays for the next call. */
9
+ signal?: AbortSignal;
10
+ }
11
+ export interface PersistentAskOptions {
12
+ key: string;
13
+ /** How long the question, and an answer nobody took yet, are kept. */
14
+ ttlMs: number;
15
+ /** How long this call waits for the answer. */
16
+ waitMs: number;
17
+ }
18
+ /**
19
+ * Ask a question that outlives this call: kept for `subject` under `key`, answered in the inbox. Resolves with the
20
+ * answer once: at once when one is waiting, or when it arrives while this call waits. Rejects with
21
+ * `QuestionPendingError` when the call stops waiting (timer or abort), and `QuestionSupersededError` when a newer call
22
+ * of the subject asks the question; either way the question, and its answer, stay for the next call.
23
+ */
24
+ export declare function askPersistentQuestion<S extends ZodType>(deps: PersistentAskDeps, message: string, schema: S, options: PersistentAskOptions): Promise<ElicitResult<S extends ZodType<infer O> ? O : unknown>>;
25
+ /** `this.elicit(message, schema, { persist })`: checks the call, then asks for the caller the request names. */
26
+ export declare function elicitPersistent<S extends ZodType>(deps: Pick<ElicitHelperDeps, 'questions' | 'signal' | 'tryGetContext'>, message: string, requestedSchema: S, options: ElicitOptions & {
27
+ persist: PersistOptions;
28
+ }): Promise<ElicitResult<S extends ZodType<infer O> ? O : unknown>>;
29
+ //# sourceMappingURL=ask-question.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ask-question.d.ts","sourceRoot":"","sources":["../../../src/elicitation/questions/ask-question.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIhF,OAAO,EAAsB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtH,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,OAAO,EAA+D,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMnH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAQD,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,MAAM,EAAE,MAAM,CAAC;CAChB;AAeD;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,SAAS,OAAO,EAC3D,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,YAAY,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAyFjE;AAED,gHAAgH;AAChH,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,OAAO,EACtD,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,WAAW,GAAG,QAAQ,GAAG,eAAe,CAAC,EACtE,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,CAAC,EAClB,OAAO,EAAE,aAAa,GAAG;IAAE,OAAO,EAAE,cAAc,CAAA;CAAE,GACnD,OAAO,CAAC,YAAY,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CA+BjE"}
@@ -0,0 +1,7 @@
1
+ export { printQuestionInboxLink, questionInboxRoutes, QUESTION_INBOX_PATH, QUESTIONS_PATH, } from './question-inbox.routes';
2
+ export { questionSubjectOf } from './question-subject';
3
+ export { createQuestionStore, resolveQuestionStorage, type QuestionStorageSources, type QuestionStoreFactoryOptions, type QuestionStoreResult, } from './question-store.factory';
4
+ export { QuestionStore, QUESTIONS_TOPIC, type AskOutcome, type PersistentQuestion, type QuestionOutcome, type QuestionRequest, type QuestionStoreOptions, } from './question.store';
5
+ export { DEFAULT_QUESTION_TTL_MS, type PersistentQuestions } from './question-scope.helper';
6
+ export { InvalidQuestionStoreError, QuestionAlreadyAnsweredError, QuestionNotFoundError, QuestionPendingError, QuestionStoreBusyError, QuestionSupersededError, } from './question.errors';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elicitation/questions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,aAAa,EACb,eAAe,EACf,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EACL,yBAAyB,EACzB,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type ExecutionContextBase, type HttpRouteType } from '../../common';
2
+ import { type QuestionStore } from './question.store';
3
+ export declare const QUESTION_INBOX_PATH = "/_frontmcp/inbox";
4
+ export declare const QUESTIONS_PATH = "/_frontmcp/questions";
5
+ /**
6
+ * Print a one-time sign-in link to the question inbox of the caller of `context` (a tool, an agent) on the server's
7
+ * stderr, where the person at the machine reads it, as they read the startup token. The person who opens it, in a
8
+ * browser or with `frontmcp inbox`, sees and answers that caller's questions, and no one else's. The caller gets only
9
+ * the link's expiry. By default (`elicitation.persistent.inboxLinks: 'terminal'`) the link is printed only while stderr
10
+ * is a terminal: stderr that goes to a log, an MCP client or an agent would let its reader answer the questions.
11
+ */
12
+ export declare function printQuestionInboxLink(context: ExecutionContextBase): {
13
+ expiresAt: number;
14
+ };
15
+ /** The inbox routes of a scope's persistent questions: subject routes, which show a person their subject's questions. */
16
+ export declare function questionInboxRoutes(store: QuestionStore): HttpRouteType[];
17
+ //# sourceMappingURL=question-inbox.routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-inbox.routes.d.ts","sourceRoot":"","sources":["../../../src/elicitation/questions/question-inbox.routes.ts"],"names":[],"mappings":"AAIA,OAAO,EAKL,KAAK,oBAAoB,EAEzB,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;AAItB,OAAO,EAA4C,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEhG,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AACtD,eAAO,MAAM,cAAc,yBAAyB,CAAC;AAiCrD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,oBAAoB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CA4B3F;AAED,yHAAyH;AACzH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,EAAE,CAqDzE"}
@@ -0,0 +1,41 @@
1
+ import { type SqliteAdapterOptions } from '@frontmcp/utils';
2
+ import { type FrontMcpLogger } from '../../common';
3
+ import { type InboxLinks, type PersistentQuestionsOptionsInterface, type PersistentQuestionsStorage } from '../../common/types/options/elicitation';
4
+ import { type QuestionStoreResult } from './question-store.factory';
5
+ import { type QuestionStore } from './question.store';
6
+ /** @default 24 hours */
7
+ export declare const DEFAULT_QUESTION_TTL_MS = 86400000;
8
+ /** `elicitation.persistent`, checked: `true` is the defaults; a mistake fails the boot. */
9
+ export declare function parsePersistentQuestionsOptions(persistent: unknown): PersistentQuestionsOptionsInterface;
10
+ /** `elicitation.persistent`, checked for where the server runs: a mistake, or an edge runtime, fails the boot. */
11
+ export declare function persistentQuestionsSettings(persistent: unknown, onEdgeRuntime: boolean): PersistentQuestionsOptionsInterface;
12
+ /**
13
+ * The option whose Redis or SQLite the questions would open, as `resolveQuestionStorage` picks it, or their default
14
+ * SQLite file: a browser opens none of them.
15
+ */
16
+ export declare function questionsServerStore(storage: PersistentQuestionsStorage | undefined, server: {
17
+ redis?: unknown;
18
+ sqlite?: unknown;
19
+ elicitation?: {
20
+ redis?: unknown;
21
+ };
22
+ }): string | undefined;
23
+ /** A scope's persistent questions: the store, a question's default TTL, and where inbox links go. */
24
+ export interface PersistentQuestions {
25
+ store: QuestionStore;
26
+ ttlMs: number;
27
+ type: QuestionStoreResult['type'];
28
+ inboxLinks: InboxLinks;
29
+ }
30
+ /** Open the store `elicitation.persistent` asks for, keyed apart from other servers on it; undefined while it is off. */
31
+ export declare function openPersistentQuestions(options: {
32
+ persistent: unknown;
33
+ /** `info.name`: servers of another name that share the storage do not share its questions. */
34
+ serverName?: string;
35
+ redis?: unknown;
36
+ sqlite?: SqliteAdapterOptions;
37
+ /** Whether the server runs on an edge runtime, where no store of a question runs. */
38
+ onEdgeRuntime?: boolean;
39
+ logger: FrontMcpLogger;
40
+ }): Promise<PersistentQuestions | undefined>;
41
+ //# sourceMappingURL=question-scope.helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-scope.helper.d.ts","sourceRoot":"","sources":["../../../src/elicitation/questions/question-scope.helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EACL,KAAK,UAAU,EACf,KAAK,mCAAmC,EACxC,KAAK,0BAA0B,EAChC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAA+C,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEjH,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,wBAAwB;AACxB,eAAO,MAAM,uBAAuB,WAAa,CAAC;AA4BlD,2FAA2F;AAC3F,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,OAAO,GAAG,mCAAmC,CAMxG;AAWD,kHAAkH;AAClH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,OAAO,EACnB,aAAa,EAAE,OAAO,GACrB,mCAAmC,CAIrC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,0BAA0B,GAAG,SAAS,EAC/C,MAAM,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;CAAE,GAC/E,MAAM,GAAG,SAAS,CAMpB;AAED,qGAAqG;AACrG,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAClC,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,yHAAyH;AACzH,wBAAsB,uBAAuB,CAAC,OAAO,EAAE;IACrD,UAAU,EAAE,OAAO,CAAC;IACpB,8FAA8F;IAC9F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,qFAAqF;IACrF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,EAAE,cAAc,CAAC;CACxB,GAAG,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAkB3C"}
@@ -0,0 +1,44 @@
1
+ import { type RootStorage, type SqliteAdapterOptions } from '@frontmcp/utils';
2
+ import { type FrontMcpLogger } from '../../common';
3
+ import { type PersistentQuestionsStorage } from '../../common/types/options/elicitation';
4
+ import { QuestionStore } from './question.store';
5
+ export interface QuestionStoreFactoryOptions {
6
+ storage: PersistentQuestionsStorage;
7
+ /** @default 'mcp:questions:' */
8
+ keyPrefix?: string;
9
+ /** `'auto'` (the default) encrypts when a secret is given or `MCP_ELICITATION_SECRET` (or a fallback) is set. */
10
+ encryption?: {
11
+ enabled?: boolean | 'auto';
12
+ secret?: string;
13
+ };
14
+ /** How often a SQLite store checks for another process's write, in milliseconds. */
15
+ pollIntervalMs?: number;
16
+ /** Changes within this window wake the waiting calls and the inbox once, in milliseconds. */
17
+ coalesceMs?: number;
18
+ logger?: FrontMcpLogger;
19
+ }
20
+ export interface QuestionStoreResult {
21
+ store: QuestionStore;
22
+ type: PersistentQuestionsStorage['type'];
23
+ encrypted: boolean;
24
+ /** The storage the store owns, for inspection. */
25
+ storage: RootStorage;
26
+ }
27
+ /** Open a question store through the storage factory, with its change feed; an unusable backend fails, never falls back. */
28
+ export declare function createQuestionStore(options: QuestionStoreFactoryOptions): Promise<QuestionStoreResult>;
29
+ export interface QuestionStorageSources {
30
+ /** `elicitation.persistent.storage`. */
31
+ storage?: PersistentQuestionsStorage;
32
+ /** `elicitation.redis`, else the server's `redis`. */
33
+ redis?: unknown;
34
+ /** The server's `sqlite`, with its path resolved. */
35
+ sqlite?: SqliteAdapterOptions;
36
+ }
37
+ /**
38
+ * Where questions are kept: `elicitation.persistent.storage`, else the server's Redis, else its SQLite file, else
39
+ * `questions.sqlite` in `$FRONTMCP_HOME` (`~/.frontmcp`), made owner-only, and refused when another user could read
40
+ * or replace it. Serverless and edge runtimes have no default: a question there must outlive the instance, so they
41
+ * need a store that is named.
42
+ */
43
+ export declare function resolveQuestionStorage(sources: QuestionStorageSources): Promise<PersistentQuestionsStorage>;
44
+ //# sourceMappingURL=question-store.factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-store.factory.d.ts","sourceRoot":"","sources":["../../../src/elicitation/questions/question-store.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,WAAW,EAChB,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAuC,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AAIzF,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMjD,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,0BAA0B,CAAC;IACpC,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iHAAiH;IACjH,UAAU,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7D,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6FAA6F;IAC7F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,0BAA0B,CAAC,MAAM,CAAC,CAAC;IACzC,SAAS,EAAE,OAAO,CAAC;IACnB,kDAAkD;IAClD,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,4HAA4H;AAC5H,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAuB5G;AAED,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,OAAO,CAAC,EAAE,0BAA0B,CAAC;IACrC,sDAAsD;IACtD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,qDAAqD;IACrD,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAsBjH"}
@@ -0,0 +1,8 @@
1
+ import { type AuthInfo } from '@frontmcp/protocol';
2
+ /**
3
+ * Who a persistent question belongs to: `principal:<iss>#<sub>` for a signed-in caller (`principal:<sub>` when its token
4
+ * names no issuer), so a later session of the same user gets the answer and a user of another issuer does not, else
5
+ * `session:<id>` for the session the server verified, else nobody (undefined).
6
+ */
7
+ export declare function questionSubjectOf(authInfo: Partial<AuthInfo> | undefined): string | undefined;
8
+ //# sourceMappingURL=question-subject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question-subject.d.ts","sourceRoot":"","sources":["../../../src/elicitation/questions/question-subject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAKnD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAM7F"}
@@ -0,0 +1,30 @@
1
+ import { InternalMcpError, PublicMcpError } from '../../errors/mcp.error';
2
+ /** A persistent question has no answer yet: it stays in the inbox, and the next call that asks it gets the answer. */
3
+ export declare class QuestionPendingError extends PublicMcpError {
4
+ readonly key: string;
5
+ readonly expiresAt: number;
6
+ constructor(key: string, expiresAt: number);
7
+ }
8
+ /** A newer call of the same caller asked the question, and waits for its answer instead of this one. */
9
+ export declare class QuestionSupersededError extends PublicMcpError {
10
+ readonly key: string;
11
+ constructor(key: string);
12
+ }
13
+ /** No question with this id is waiting for the person answering: it never was, it expired, or it is another's. */
14
+ export declare class QuestionNotFoundError extends PublicMcpError {
15
+ readonly mcpErrorCode: -32002;
16
+ constructor();
17
+ }
18
+ /** The question was answered already: its first answer is the one its call gets. */
19
+ export declare class QuestionAlreadyAnsweredError extends PublicMcpError {
20
+ constructor();
21
+ }
22
+ /** Other writers kept changing a question while this call tried to change it. */
23
+ export declare class QuestionStoreBusyError extends InternalMcpError {
24
+ constructor();
25
+ }
26
+ /** Thrown at boot for an `elicitation.persistent` store the server cannot open or use. */
27
+ export declare class InvalidQuestionStoreError extends InternalMcpError {
28
+ constructor(reason: string);
29
+ }
30
+ //# sourceMappingURL=question.errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"question.errors.d.ts","sourceRoot":"","sources":["../../../src/elicitation/questions/question.errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAmB,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE3F,sHAAsH;AACtH,qBAAa,oBAAqB,SAAQ,cAAc;IACtD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;gBAEf,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAU3C;AAED,wGAAwG;AACxG,qBAAa,uBAAwB,SAAQ,cAAc;IACzD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;gBAET,GAAG,EAAE,MAAM;CAIxB;AAED,kHAAkH;AAClH,qBAAa,qBAAsB,SAAQ,cAAc;IACvD,QAAQ,CAAC,YAAY,SAAsC;;CAK5D;AAED,oFAAoF;AACpF,qBAAa,4BAA6B,SAAQ,cAAc;;CAI/D;AAED,iFAAiF;AACjF,qBAAa,sBAAuB,SAAQ,gBAAgB;;CAI3D;AAED,0FAA0F;AAC1F,qBAAa,yBAA0B,SAAQ,gBAAgB;gBACjD,MAAM,EAAE,MAAM;CAG3B"}
@@ -0,0 +1,89 @@
1
+ import { type ChangeFeed, type NamespacedStorage } from '@frontmcp/utils';
2
+ import { type HttpRouteTopicSource } from '../../common/metadata/http-route.metadata';
3
+ import { type ElicitResult } from '../elicitation.types';
4
+ /** The topic a store publishes whenever a question is asked, answered or taken. */
5
+ export declare const QUESTIONS_TOPIC = "questions";
6
+ /** A question as the inbox shows it. */
7
+ export interface PersistentQuestion {
8
+ id: string;
9
+ key: string;
10
+ message: string;
11
+ requestedSchema: Record<string, unknown>;
12
+ createdAt: number;
13
+ expiresAt: number;
14
+ /** Answered, and waiting for the call that takes the answer. */
15
+ answered: boolean;
16
+ }
17
+ export interface QuestionRequest {
18
+ /** Who was asked: `principal:<sub>` or `session:<id>`. */
19
+ subject: string;
20
+ key: string;
21
+ message: string;
22
+ requestedSchema: Record<string, unknown>;
23
+ ttlMs: number;
24
+ /** The call that waits for the answer; the newest call to ask a question is the one that gets it. */
25
+ waiter: string;
26
+ }
27
+ export type QuestionOutcome = {
28
+ kind: 'answered';
29
+ answer: ElicitResult;
30
+ expiresAt: number;
31
+ } | {
32
+ kind: 'waiting';
33
+ question: PersistentQuestion;
34
+ } | {
35
+ kind: 'superseded';
36
+ };
37
+ /** What asking gives: the answer, taken now, or the question this call now waits on. */
38
+ export type AskOutcome = Exclude<QuestionOutcome, {
39
+ kind: 'superseded';
40
+ }>;
41
+ export interface QuestionStoreOptions {
42
+ /** Owned by the store: it is disconnected on `close()`. */
43
+ storage: NamespacedStorage;
44
+ feed: ChangeFeed;
45
+ /** Encrypts each record with a key derived from it and the record's subject, and keys records by HMACs. */
46
+ secret?: string;
47
+ }
48
+ /**
49
+ * Persistent questions, kept per subject in a storage with atomic compare-and-set: one record per subject and key,
50
+ * whose answer the newest call waiting on it takes, once.
51
+ */
52
+ export declare class QuestionStore implements HttpRouteTopicSource {
53
+ private readonly options;
54
+ constructor(options: QuestionStoreOptions);
55
+ get encrypted(): boolean;
56
+ /** Ask a question: its answer when it was answered (taken now), else the question, now waited on by `waiter`. */
57
+ ask(request: QuestionRequest): Promise<AskOutcome>;
58
+ /** The answer for `waiter`, taken once; `superseded` when the question is gone or a newer call waits on it. */
59
+ take(subject: string, key: string, waiter: string): Promise<QuestionOutcome>;
60
+ /**
61
+ * Put back an answer a call took but could not hand on, so the next call that asks gets it. `expiresAt`, the expiry of
62
+ * the question it was taken from, is kept: an answer put back never outlives its question, and one past it is dropped.
63
+ */
64
+ restore(request: QuestionRequest, answer: ElicitResult, expiresAt?: number): Promise<void>;
65
+ /** The questions asked of `subject`, oldest first. */
66
+ list(subject: string): Promise<PersistentQuestion[]>;
67
+ /**
68
+ * Answer a question of `subject`. Another subject's question is "not found", like one that never was; an `accept`
69
+ * must match the question's schema; only the first answer is kept.
70
+ */
71
+ answer(subject: string, id: string, answer: ElicitResult): Promise<void>;
72
+ /** Call `listener` when a question is asked, answered or taken, here or in another process on the storage. */
73
+ subscribe(topic: string, listener: () => void): () => void;
74
+ close(): Promise<void>;
75
+ private create;
76
+ private claim;
77
+ private replace;
78
+ private read;
79
+ private records;
80
+ /** The record, unless it cannot be read, belongs at another key, or has expired: such a record is deleted. */
81
+ private live;
82
+ private encode;
83
+ private decode;
84
+ private recordKey;
85
+ /** A storage key part that names `value` without showing it: an HMAC with the secret, else a SHA-256. */
86
+ private digest;
87
+ private changed;
88
+ }
89
+ //# sourceMappingURL=question.store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3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QA,OAAO;CAOtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"elicitation-store.factory.d.ts","sourceRoot":"","sources":["../../../src/elicitation/store/elicitation-store.factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAA8C,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEnH,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGpG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAI5D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;;;OAIG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAE1B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAE5B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;;;;;;;;;;OAeG;IACH,UAAU,CAAC,EAAE;QACX;;;;;;WAMG;QACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAE3B;;;WAGG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,EAAE,gBAAgB,CAAC;IAExB;;OAEG;IACH,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;IAEzD;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AA4BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,sBAAsB,CAAC,OAAO,GAAE,uBAA4B,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAwLnH;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,UAAU,CAAC,EAAE;QACX,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACE,GACL,sBAAsB,CAwBxB;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,WAAW,EACpB,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE;QACX,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACE,GACL,sBAAsB,CAsCxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,kBAAkB,EAChC,YAAY,GAAE;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;CACpB,GACL,gBAAgB,CAgBlB"}
1
+ {"version":3,"file":"elicitation-store.factory.d.ts","sourceRoot":"","sources":["../../../src/elicitation/store/elicitation-store.factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAA8C,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEnH,OAAO,EAAsB,KAAK,cAAc,EAAE,K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AAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,UAAU,CAAC,EAAE;QACX,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACE,GACL,sBAAsB,CAwBxB;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,WAAW,EACpB,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE;QACX,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACE,GACL,sBAAsB,CAsCxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,kBAAkB,EAChC,YAAY,GAAE;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;CACpB,GACL,gBAAgB,CAgBlB"}
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * Supports MCP elicit flow for clients that support it.
13
13
  */
14
- import { z } from '@frontmcp/lazy-zod';
14
+ import { internalZ as z } from '@frontmcp/lazy-zod';
15
15
  import { PublicMcpError } from './mcp.error';
16
16
  /**
17
17
  * Session mode determines how authorization state is stored