akanjs 3.0.0-alpha.2 → 3.0.0-alpha.21

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 (388) hide show
  1. package/README.ko.md +1 -1
  2. package/README.md +1 -1
  3. package/base/symbols.ts +4 -0
  4. package/client/clientRuntime.ts +8 -0
  5. package/client/cn.ts +7 -0
  6. package/client/csrTypes.ts +2 -0
  7. package/client/frameDebug.ts +3 -2
  8. package/common/Logger.ts +4 -0
  9. package/common/deepObjectify.ts +21 -7
  10. package/common/index.ts +14 -0
  11. package/common/mcpExposure.ts +99 -0
  12. package/common/pathSet.ts +17 -5
  13. package/common/routeConvention.ts +30 -0
  14. package/constant/crystalize.ts +3 -1
  15. package/constant/fieldInfo.ts +6 -0
  16. package/constant/getDefault.ts +37 -9
  17. package/constant/immerify.ts +1 -1
  18. package/constant/index.ts +2 -0
  19. package/constant/labelOf.ts +17 -0
  20. package/constant/mask.ts +60 -0
  21. package/constant/purify.ts +17 -11
  22. package/constant/types.ts +14 -12
  23. package/dictionary/DictionaryLookup.ts +30 -0
  24. package/dictionary/agent.dictionary.ts +31 -0
  25. package/dictionary/agentTurn.dictionary.ts +29 -0
  26. package/dictionary/base.dictionary.ts +8 -0
  27. package/dictionary/dictInfo.ts +8 -0
  28. package/dictionary/dictionary.ts +9 -3
  29. package/dictionary/index.ts +1 -0
  30. package/document/database.ts +21 -0
  31. package/document/filterMeta.ts +7 -0
  32. package/document/index.ts +1 -0
  33. package/document/into.ts +7 -1
  34. package/document/noDocumentError.ts +12 -0
  35. package/fetch/agentTurn.ts +19 -0
  36. package/fetch/client/fetchClient.ts +71 -13
  37. package/fetch/client/wsClient.ts +17 -2
  38. package/fetch/fetchType/endpointFetch.type.ts +10 -4
  39. package/fetch/index.ts +1 -0
  40. package/local/apps/serverLifecycle/serverLifecycle-local.db +0 -0
  41. package/local/apps/serverLifecycle/serverLifecycle-local.db-shm +0 -0
  42. package/local/apps/serverLifecycle/serverLifecycle-local.db-wal +0 -0
  43. package/local/apps/serverLifecycle/serverLifecycle-local_solid.db +0 -0
  44. package/local/apps/serverLifecycle/serverLifecycle-local_solid.db-shm +0 -0
  45. package/local/apps/serverLifecycle/serverLifecycle-local_solid.db-wal +0 -0
  46. package/package.json +11 -9
  47. package/server/akanApp.ts +30 -34
  48. package/server/akanOption.ts +65 -7
  49. package/server/akanServer.ts +172 -7
  50. package/server/animatedImage.ts +83 -0
  51. package/server/artifact/routeClientCache.ts +14 -0
  52. package/server/assetEncoding.ts +47 -0
  53. package/server/devtools/signalSerializer.ts +2 -2
  54. package/server/devtools/types.ts +2 -2
  55. package/server/di/diLifecycle.ts +31 -3
  56. package/server/di/predefinedAdaptor.ts +6 -0
  57. package/server/imageOptimizer.ts +33 -46
  58. package/server/index.ts +1 -2
  59. package/server/mcp/McpAuth.ts +177 -0
  60. package/server/mcp/McpDispatcher.ts +245 -0
  61. package/server/mcp/McpEventStream.ts +76 -0
  62. package/server/mcp/McpExecutionContext.ts +105 -0
  63. package/server/mcp/McpRouter.ts +591 -0
  64. package/server/mcp/index.ts +5 -0
  65. package/server/resolver/CascadeRunner.ts +1 -1
  66. package/server/resolver/database.resolver.ts +42 -5
  67. package/server/resolver/service.resolver.ts +29 -0
  68. package/server/resolver/signal.resolver.ts +16 -1
  69. package/server/routeTreeBuilder.ts +2 -44
  70. package/server/rscWorker.tsx +6 -2
  71. package/server/subRouteIndexDocument.tsx +61 -0
  72. package/server/systemPageDocument.tsx +2 -2
  73. package/server/systemPages.tsx +49 -16
  74. package/server/vendor/akanjs-fetch.ts +1 -0
  75. package/server/webRouter.ts +159 -35
  76. package/service/agent.service.ts +14 -0
  77. package/service/base.service.ts +2 -1
  78. package/service/index.ts +1 -0
  79. package/service/predefinedAdaptor/database.adaptor.ts +78 -24
  80. package/service/predefinedAdaptor/deepseekLlm.ts +230 -0
  81. package/service/predefinedAdaptor/index.ts +3 -0
  82. package/service/predefinedAdaptor/insightQuery.ts +183 -0
  83. package/service/predefinedAdaptor/llm.adaptor.ts +76 -0
  84. package/service/predefinedAdaptor/role.adaptor.ts +2 -0
  85. package/service/predefinedAdaptor/schedule.adaptor.ts +12 -5
  86. package/service/serviceModule.ts +17 -0
  87. package/service/types.ts +4 -0
  88. package/signal/agent/AgentCatalogue.ts +165 -0
  89. package/signal/agent/index.ts +1 -0
  90. package/signal/agent.signal.ts +42 -0
  91. package/signal/agentTurn.ts +8 -0
  92. package/signal/agentTurnStream.ts +48 -0
  93. package/signal/base.signal.ts +2 -1
  94. package/signal/endpointInfo.ts +38 -2
  95. package/signal/guard.ts +13 -1
  96. package/signal/guards.ts +52 -1
  97. package/signal/index.ts +6 -0
  98. package/signal/mcp/McpDocument.ts +286 -0
  99. package/signal/mcp/McpProgress.ts +106 -0
  100. package/signal/mcp/McpUriTemplate.ts +85 -0
  101. package/signal/mcp/Msg.ts +368 -0
  102. package/signal/mcp/index.ts +5 -0
  103. package/signal/mcp/mcpProtocol.ts +120 -0
  104. package/signal/middleware.ts +7 -3
  105. package/signal/openapi/openapi.ts +32 -171
  106. package/signal/schema/JsonSchemaBuilder.ts +211 -0
  107. package/signal/schema/index.ts +1 -0
  108. package/signal/signalContext.ts +85 -9
  109. package/signal/slice.ts +9 -9
  110. package/signal/types.ts +1 -1
  111. package/store/action.ts +11 -22
  112. package/store/actionTag.ts +33 -0
  113. package/store/agent/AgentBridge.ts +323 -0
  114. package/store/agent/AgentContext.ts +74 -0
  115. package/store/agent/AgentPrompts.ts +82 -0
  116. package/store/agent/AgentVisibility.ts +68 -0
  117. package/store/agent/ScreenReader.ts +208 -0
  118. package/store/agent/StoreCatalogue.ts +351 -0
  119. package/store/agent/StoreSurfaceSource.ts +122 -0
  120. package/store/agent/index.ts +9 -0
  121. package/store/agent/storeSurface.ts +28 -0
  122. package/store/agent/types.ts +50 -0
  123. package/store/agentic/StToolBuilder.ts +199 -0
  124. package/store/agentic/attachAgentic.ts +22 -0
  125. package/store/agentic/index.ts +5 -0
  126. package/store/agentic/readableValue.ts +17 -0
  127. package/store/agentic/useStExpose.ts +18 -0
  128. package/store/agentic/useStState.ts +35 -0
  129. package/store/baseSt.ts +7 -0
  130. package/store/databaseStateNames.ts +31 -0
  131. package/store/formSetterNames.ts +21 -0
  132. package/store/index.ts +8 -0
  133. package/store/rootStore.ts +3 -1
  134. package/store/sliceRole.ts +36 -0
  135. package/store/state.ts +2 -12
  136. package/store/store.ts +19 -1
  137. package/store/storeInstance.ts +165 -20
  138. package/store/storeRegistry.ts +16 -1
  139. package/store/types.ts +18 -0
  140. package/store/withSelector.ts +7 -8
  141. package/test/registerDom.ts +4 -0
  142. package/types/base/symbols.d.ts +4 -0
  143. package/types/client/cn.d.ts +5 -0
  144. package/types/client/csrTypes.d.ts +2 -0
  145. package/types/common/Logger.d.ts +2 -0
  146. package/types/common/deepObjectify.d.ts +4 -2
  147. package/types/common/index.d.ts +2 -1
  148. package/types/common/mcpExposure.d.ts +60 -0
  149. package/types/common/routeConvention.d.ts +8 -0
  150. package/types/constant/fieldInfo.d.ts +1 -0
  151. package/types/constant/getDefault.d.ts +5 -0
  152. package/types/constant/index.d.ts +2 -0
  153. package/types/constant/labelOf.d.ts +6 -0
  154. package/types/constant/mask.d.ts +34 -0
  155. package/types/constant/purify.d.ts +2 -2
  156. package/types/constant/types.d.ts +2 -2
  157. package/types/dictionary/DictionaryLookup.d.ts +14 -0
  158. package/types/dictionary/agent.dictionary.d.ts +1 -0
  159. package/types/dictionary/agentTurn.dictionary.d.ts +1 -0
  160. package/types/dictionary/base.dictionary.d.ts +1 -1
  161. package/types/dictionary/dictInfo.d.ts +6 -0
  162. package/types/dictionary/dictionary.d.ts +11 -9
  163. package/types/dictionary/index.d.ts +1 -0
  164. package/types/document/database.d.ts +20 -0
  165. package/types/document/filterMeta.d.ts +1 -0
  166. package/types/document/index.d.ts +1 -0
  167. package/types/document/into.d.ts +6 -1
  168. package/types/document/noDocumentError.d.ts +12 -0
  169. package/types/fetch/agentTurn.d.ts +593 -0
  170. package/types/fetch/client/fetchClient.d.ts +10 -0
  171. package/types/fetch/fetchType/endpointFetch.type.d.ts +5 -3
  172. package/types/fetch/index.d.ts +1 -0
  173. package/types/server/akanOption.d.ts +35 -7
  174. package/types/server/akanServer.d.ts +44 -1
  175. package/types/server/animatedImage.d.ts +7 -0
  176. package/types/server/artifact/routeClientCache.d.ts +6 -0
  177. package/types/server/assetEncoding.d.ts +7 -0
  178. package/types/server/devtools/types.d.ts +2 -2
  179. package/types/server/di/predefinedAdaptor.d.ts +4 -1
  180. package/types/server/index.d.ts +0 -2
  181. package/types/server/mcp/McpAuth.d.ts +62 -0
  182. package/types/server/mcp/McpDispatcher.d.ts +54 -0
  183. package/types/server/mcp/McpEventStream.d.ts +18 -0
  184. package/types/server/mcp/McpExecutionContext.d.ts +44 -0
  185. package/types/server/mcp/McpRouter.d.ts +60 -0
  186. package/types/server/mcp/index.d.ts +5 -0
  187. package/types/server/mcp.d.ts +1 -0
  188. package/types/server/subRouteIndexDocument.d.ts +8 -0
  189. package/types/server/systemPageDocument.d.ts +1 -0
  190. package/types/server/systemPages.d.ts +5 -0
  191. package/types/server/vendor/akanjs-fetch.d.ts +1 -0
  192. package/types/service/agent.service.d.ts +12 -0
  193. package/types/service/base.service.d.ts +4 -0
  194. package/types/service/index.d.ts +1 -0
  195. package/types/service/predefinedAdaptor/database.adaptor.d.ts +24 -2
  196. package/types/service/predefinedAdaptor/deepseekLlm.d.ts +64 -0
  197. package/types/service/predefinedAdaptor/index.d.ts +3 -0
  198. package/types/service/predefinedAdaptor/insightQuery.d.ts +50 -0
  199. package/types/service/predefinedAdaptor/llm.adaptor.d.ts +68 -0
  200. package/types/service/predefinedAdaptor/role.adaptor.d.ts +2 -0
  201. package/types/service/predefinedAdaptor/schedule.adaptor.d.ts +10 -6
  202. package/types/service/types.d.ts +4 -1
  203. package/types/signal/agent/AgentCatalogue.d.ts +100 -0
  204. package/types/signal/agent/index.d.ts +1 -0
  205. package/types/signal/agent.d.ts +1 -0
  206. package/types/signal/agent.signal.d.ts +29 -0
  207. package/types/signal/agentTurn.d.ts +9 -0
  208. package/types/signal/agentTurnStream.d.ts +16 -0
  209. package/types/signal/base.signal.d.ts +1 -1
  210. package/types/signal/endpointInfo.d.ts +21 -3
  211. package/types/signal/guard.d.ts +11 -0
  212. package/types/signal/guards.d.ts +22 -1
  213. package/types/signal/index.d.ts +6 -0
  214. package/types/signal/mcp/McpDocument.d.ts +65 -0
  215. package/types/signal/mcp/McpProgress.d.ts +40 -0
  216. package/types/signal/mcp/McpUriTemplate.d.ts +26 -0
  217. package/types/signal/mcp/Msg.d.ts +143 -0
  218. package/types/signal/mcp/index.d.ts +5 -0
  219. package/types/signal/mcp/mcpProtocol.d.ts +107 -0
  220. package/types/signal/mcp.d.ts +1 -0
  221. package/types/signal/openapi/openapi.d.ts +3 -3
  222. package/types/signal/schema/JsonSchemaBuilder.d.ts +47 -0
  223. package/types/signal/schema/index.d.ts +1 -0
  224. package/types/signal/schema.d.ts +1 -0
  225. package/types/signal/signalContext.d.ts +16 -1
  226. package/types/signal/slice.d.ts +8 -8
  227. package/types/signal/types.d.ts +1 -1
  228. package/types/store/actionTag.d.ts +21 -0
  229. package/types/store/agent/AgentBridge.d.ts +77 -0
  230. package/types/store/agent/AgentContext.d.ts +16 -0
  231. package/types/store/agent/AgentPrompts.d.ts +31 -0
  232. package/types/store/agent/AgentVisibility.d.ts +21 -0
  233. package/types/store/agent/ScreenReader.d.ts +11 -0
  234. package/types/store/agent/StoreCatalogue.d.ts +26 -0
  235. package/types/store/agent/StoreSurfaceSource.d.ts +18 -0
  236. package/types/store/agent/index.d.ts +9 -0
  237. package/types/store/agent/storeSurface.d.ts +14 -0
  238. package/types/store/agent/types.d.ts +49 -0
  239. package/types/store/agent.d.ts +1 -0
  240. package/types/store/agentic/StToolBuilder.d.ts +41 -0
  241. package/types/store/agentic/attachAgentic.d.ts +14 -0
  242. package/types/store/agentic/index.d.ts +5 -0
  243. package/types/store/agentic/readableValue.d.ts +3 -0
  244. package/types/store/agentic/useStExpose.d.ts +8 -0
  245. package/types/store/agentic/useStState.d.ts +12 -0
  246. package/types/store/agentic.d.ts +1 -0
  247. package/types/store/baseSt.d.ts +29 -22
  248. package/types/store/databaseStateNames.d.ts +25 -0
  249. package/types/store/formSetterNames.d.ts +16 -0
  250. package/types/store/index.d.ts +7 -0
  251. package/types/store/rootStore.d.ts +5 -1
  252. package/types/store/sliceRole.d.ts +25 -0
  253. package/types/store/store.d.ts +7 -2
  254. package/types/store/storeInstance.d.ts +33 -1
  255. package/types/store/storeRegistry.d.ts +5 -0
  256. package/types/store/types.d.ts +15 -0
  257. package/types/store/withSelector.d.ts +7 -8
  258. package/types/test/registerDom.d.ts +1 -0
  259. package/types/ui/Agent/Approval.d.ts +7 -0
  260. package/types/ui/Agent/Bubble.d.ts +13 -0
  261. package/types/ui/Agent/Chat.d.ts +24 -0
  262. package/types/ui/Agent/Context.d.ts +9 -0
  263. package/types/ui/Agent/Dock.d.ts +16 -0
  264. package/types/ui/Agent/Guide.d.ts +9 -0
  265. package/types/ui/Agent/Section.d.ts +10 -0
  266. package/types/ui/Agent/StateKey.d.ts +16 -0
  267. package/types/ui/Agent/Tool.d.ts +15 -0
  268. package/types/ui/Agent/Transcript.d.ts +13 -0
  269. package/types/ui/Agent/Zone.d.ts +23 -0
  270. package/types/ui/Agent/fetchRunner.d.ts +12 -0
  271. package/types/ui/Agent/index.d.ts +17 -0
  272. package/types/ui/Agent/index_.d.ts +1 -0
  273. package/types/ui/Agent/sessionHistory.d.ts +12 -0
  274. package/types/ui/Agent.d.ts +1 -0
  275. package/types/ui/Badge.d.ts +1 -1
  276. package/types/ui/Button.d.ts +1 -1
  277. package/types/ui/CsrImage.d.ts +1 -1
  278. package/types/ui/Dropdown.d.ts +2 -0
  279. package/types/ui/Image.d.ts +3 -3
  280. package/types/ui/Layout/BottomInset.d.ts +2 -1
  281. package/types/ui/Layout/index.d.ts +1 -1
  282. package/types/ui/Signal/style.d.ts +4 -1
  283. package/types/ui/UiOverride/context.d.ts +14 -2
  284. package/types/ui/agentAttrs.d.ts +14 -0
  285. package/types/ui/index.d.ts +4 -1
  286. package/types/ui/overlayLayer.d.ts +24 -0
  287. package/types/ui/recipe/badgeRecipe.d.ts +7 -3
  288. package/types/ui/recipe/buttonRecipe.d.ts +7 -3
  289. package/types/ui/recipe/inputRecipe.d.ts +5 -1
  290. package/types/vendor/use-agentic/AgentProvider.d.ts +18 -0
  291. package/types/vendor/use-agentic/AgentScope.d.ts +9 -0
  292. package/types/vendor/use-agentic/AgentSession.d.ts +50 -0
  293. package/types/vendor/use-agentic/Agentic.d.ts +21 -0
  294. package/types/vendor/use-agentic/AgenticSurface.d.ts +44 -0
  295. package/types/vendor/use-agentic/httpRunner.d.ts +15 -0
  296. package/types/vendor/use-agentic/index.d.ts +13 -0
  297. package/types/vendor/use-agentic/surfaceContext.d.ts +5 -0
  298. package/types/vendor/use-agentic/types.d.ts +133 -0
  299. package/types/vendor/use-agentic/useAgent.d.ts +4 -0
  300. package/types/vendor/use-agentic/useAgentGuide.d.ts +6 -0
  301. package/types/vendor/use-agentic/useAgentResource.d.ts +7 -0
  302. package/types/vendor/use-agentic/useAgentState.d.ts +13 -0
  303. package/types/vendor/use-agentic/useAgentTool.d.ts +16 -0
  304. package/types/vendor/use-agentic.d.ts +1 -0
  305. package/types/webkit/index.d.ts +3 -0
  306. package/types/webkit/lazy.d.ts +12 -0
  307. package/types/webkit/useCsrValues.d.ts +3 -3
  308. package/types/webkit/useEscapeKey.d.ts +5 -0
  309. package/types/webkit/useFrameRuntime.d.ts +6 -1
  310. package/types/webkit/useScreenScope.d.ts +18 -0
  311. package/ui/Agent/Approval.tsx +29 -0
  312. package/ui/Agent/Bubble.tsx +74 -0
  313. package/ui/Agent/Chat.tsx +225 -0
  314. package/ui/Agent/Context.tsx +38 -0
  315. package/ui/Agent/Dock.tsx +72 -0
  316. package/ui/Agent/Guide.tsx +16 -0
  317. package/ui/Agent/Section.tsx +24 -0
  318. package/ui/Agent/StateKey.tsx +44 -0
  319. package/ui/Agent/Tool.tsx +66 -0
  320. package/ui/Agent/Transcript.tsx +33 -0
  321. package/ui/Agent/Zone.tsx +48 -0
  322. package/ui/Agent/fetchRunner.ts +30 -0
  323. package/ui/Agent/index.ts +12 -0
  324. package/ui/Agent/index_.tsx +4 -0
  325. package/ui/Agent/sessionHistory.ts +33 -0
  326. package/ui/Badge.tsx +3 -3
  327. package/ui/BottomSheet.tsx +5 -0
  328. package/ui/Button.tsx +6 -2
  329. package/ui/Constant/Doc.tsx +1 -1
  330. package/ui/CsrImage.tsx +1 -1
  331. package/ui/Data/ListContainer.tsx +1 -1
  332. package/ui/DatePicker.tsx +5 -4
  333. package/ui/Dialog/Modal.tsx +12 -15
  334. package/ui/DraggableList.tsx +3 -1
  335. package/ui/Dropdown.tsx +33 -11
  336. package/ui/Field.tsx +30 -16
  337. package/ui/Image.tsx +3 -3
  338. package/ui/Input.tsx +14 -5
  339. package/ui/Layout/BottomInset.tsx +6 -1
  340. package/ui/Load/Units.tsx +11 -2
  341. package/ui/Load/View.tsx +7 -2
  342. package/ui/Loading/ProgressBar.tsx +8 -1
  343. package/ui/Menu.tsx +7 -8
  344. package/ui/Model/EditModal.tsx +37 -2
  345. package/ui/Model/SureToRemove.tsx +2 -1
  346. package/ui/Model/index_.tsx +42 -15
  347. package/ui/ObjectId.tsx +3 -4
  348. package/ui/Pagination.tsx +3 -4
  349. package/ui/Popconfirm.tsx +8 -7
  350. package/ui/Select.tsx +6 -4
  351. package/ui/Signal/RestApi.tsx +43 -16
  352. package/ui/Signal/WebSocket.tsx +1 -1
  353. package/ui/Signal/style.ts +6 -1
  354. package/ui/Switch.tsx +2 -0
  355. package/ui/System/CSR.tsx +6 -2
  356. package/ui/System/ThemeToggle.tsx +55 -33
  357. package/ui/ToggleSelect.tsx +4 -3
  358. package/ui/Tooltip.tsx +2 -1
  359. package/ui/UiOverride/context.ts +14 -2
  360. package/ui/agentAttrs.ts +19 -0
  361. package/ui/index.ts +10 -1
  362. package/ui/overlayLayer.ts +39 -0
  363. package/ui/recipe/badgeRecipe.ts +22 -3
  364. package/ui/recipe/buttonRecipe.ts +51 -2
  365. package/ui/recipe/factory.ts +2 -2
  366. package/ui/recipe/inputRecipe.ts +18 -4
  367. package/vendor/use-agentic/AgentProvider.tsx +39 -0
  368. package/vendor/use-agentic/AgentScope.tsx +20 -0
  369. package/vendor/use-agentic/AgentSession.ts +292 -0
  370. package/vendor/use-agentic/Agentic.tsx +44 -0
  371. package/vendor/use-agentic/AgenticSurface.ts +294 -0
  372. package/vendor/use-agentic/WIRE.md +57 -0
  373. package/vendor/use-agentic/httpRunner.ts +115 -0
  374. package/vendor/use-agentic/index.ts +14 -0
  375. package/vendor/use-agentic/surfaceContext.ts +9 -0
  376. package/vendor/use-agentic/types.ts +144 -0
  377. package/vendor/use-agentic/useAgent.ts +17 -0
  378. package/vendor/use-agentic/useAgentGuide.ts +16 -0
  379. package/vendor/use-agentic/useAgentResource.ts +30 -0
  380. package/vendor/use-agentic/useAgentState.ts +61 -0
  381. package/vendor/use-agentic/useAgentTool.ts +55 -0
  382. package/webkit/bootCsr.tsx +2 -33
  383. package/webkit/index.ts +3 -0
  384. package/webkit/lazy.tsx +27 -3
  385. package/webkit/useCsrValues.ts +121 -4
  386. package/webkit/useEscapeKey.tsx +42 -0
  387. package/webkit/useFrameRuntime.ts +65 -32
  388. package/webkit/useScreenScope.tsx +49 -0
@@ -0,0 +1,165 @@
1
+ import { mcpBaseVerbOf } from "akanjs/common";
2
+ import { FetchClient } from "akanjs/fetch";
3
+ import type { SerializedEndpoint, SerializedSignal, SerializedSlice } from "../types";
4
+
5
+ /** Where an endpoint came from, which is what decides where an audience's opt-in for it can be written. */
6
+ export type AgentOrigin = "base" | "slice" | "endpoint";
7
+
8
+ /** Which generated CRUD verb a `base` candidate is. Its opt-in lives on the signal, not on the endpoint. */
9
+ export type AgentBaseVerb = NonNullable<ReturnType<typeof mcpBaseVerbOf>>;
10
+
11
+ /** One endpoint a signal registry holds, before any audience has decided anything about it. */
12
+ export interface AgentCandidate {
13
+ refName: string;
14
+ key: string;
15
+ endpoint: SerializedEndpoint;
16
+ origin: AgentOrigin;
17
+ /** The signal it belongs to. A generated verb carries no option of its own, so its opt-in is written here. */
18
+ signal: SerializedSignal;
19
+ /** The slice this key was generated from, where the opt-in for a `slice` candidate is written. */
20
+ slice?: SerializedSlice;
21
+ baseVerb?: AgentBaseVerb;
22
+ }
23
+
24
+ /** An opt-in a catalogue did not honour, with the reason it did not. */
25
+ export interface AgentRefusal {
26
+ key: string;
27
+ reason: string;
28
+ }
29
+
30
+ /** A published entry carrying no description its author wrote, and what to write so that it does. */
31
+ export interface AgentUndescribed {
32
+ key: string;
33
+ reason: string;
34
+ }
35
+
36
+ export interface AgentCatalogueOptions {
37
+ resolveDescription?: (key: string) => string | undefined;
38
+ excludeSignals?: string[];
39
+ }
40
+
41
+ /**
42
+ * The half of an agent catalogue that does not depend on who is asking.
43
+ *
44
+ * Enumerating what a signal registry holds, keeping that order stable, holding one name per entry, and resolving
45
+ * the words a module wrote in its dictionary are the same work for every audience — an external MCP client, an
46
+ * in-page agent driving the store, a transport that does not exist yet. What differs is only which option admits
47
+ * an endpoint and what shape it is published in, and both of those stay with the audience that decides them.
48
+ *
49
+ * Separated while exactly one audience existed. The cost then is moving code between two files; the cost later is
50
+ * telling two audiences apart inside one class that never expected a second.
51
+ */
52
+ export class AgentCatalogue {
53
+ /**
54
+ * Everything a registry holds, in an order that does not move between boots: clients cache a catalogue, and an
55
+ * LLM prompt cache keys on its exact text, so an order that depends on object iteration is a cache that misses.
56
+ *
57
+ * Every endpoint is listed, including ones no audience will take. Deciding is the caller's half.
58
+ */
59
+ static candidates(
60
+ serializedSignal: Record<string, SerializedSignal>,
61
+ { excludeSignals = ["base"] }: { excludeSignals?: string[] } = {},
62
+ ): AgentCandidate[] {
63
+ const excluded = new Set(excludeSignals);
64
+ const candidates: AgentCandidate[] = [];
65
+ for (const [refName, signal] of Object.entries(serializedSignal)) {
66
+ if (excluded.has(refName)) continue;
67
+ for (const [key, endpoint] of Object.entries(FetchClient.getBaseEndpoint(refName, signal))) {
68
+ const baseVerb = mcpBaseVerbOf(refName, key);
69
+ if (baseVerb) candidates.push({ refName, key, endpoint, origin: "base", signal, baseVerb });
70
+ }
71
+ for (const [suffix, slice] of Object.entries(signal.slice ?? {})) {
72
+ for (const [key, endpoint] of Object.entries(FetchClient.getEndpointFromSlice(refName, suffix, slice)))
73
+ candidates.push({ refName, key, endpoint, origin: "slice", signal, slice });
74
+ }
75
+ for (const [key, endpoint] of Object.entries(signal.endpoint))
76
+ candidates.push({ refName, key, endpoint, origin: "endpoint", signal });
77
+ }
78
+ return candidates.sort((a, b) => a.refName.localeCompare(b.refName) || a.key.localeCompare(b.key));
79
+ }
80
+
81
+ /**
82
+ * What opted in and was refused anyway. Collected rather than merely dropped so a server can say so at boot:
83
+ * the rejections an audience makes are fail-closed by design, and an author whose deliberate opt-in vanished
84
+ * from the catalogue otherwise has nowhere to look but the framework source.
85
+ */
86
+ readonly refusals: AgentRefusal[] = [];
87
+
88
+ readonly #options: AgentCatalogueOptions;
89
+ readonly #claimed = new Set<string>();
90
+ /** Keyed so an entry read twice — once as a tool and again as a template — is reported once. */
91
+ readonly #undescribedByKey = new Map<string, string>();
92
+
93
+ constructor(options: AgentCatalogueOptions = {}) {
94
+ this.#options = options;
95
+ }
96
+
97
+ /**
98
+ * What is published with no description of its own. Description is the one field a model picks an entry by, so
99
+ * one without it is a broken entry rather than an untidy one — and a source scanner cannot answer this: it
100
+ * reads files, where an opt-in is visible only as a literal in a builder call and where the model `.desc()`
101
+ * every generated entry borrows is not written as a description of the entry at all.
102
+ */
103
+ get undescribed(): AgentUndescribed[] {
104
+ return [...this.#undescribedByKey].map(([key, reason]) => ({ key, reason }));
105
+ }
106
+
107
+ /**
108
+ * Takes the name for this entry, or refuses it because something else already holds it.
109
+ *
110
+ * A name must be unique within a catalogue, across every kind of entry it publishes. Keys are globally unique
111
+ * by construction, so a collision means two signals disagree — the first in candidate order keeps it, which is
112
+ * what makes the catalogue the same on the next boot either way.
113
+ */
114
+ claim(key: string): boolean {
115
+ if (this.#claimed.has(key)) {
116
+ this.refuse(key, "another endpoint is already published under this name.");
117
+ return false;
118
+ }
119
+ this.#claimed.add(key);
120
+ return true;
121
+ }
122
+
123
+ refuse(key: string, reason: string) {
124
+ this.refusals.push({ key, reason });
125
+ }
126
+
127
+ texts(titleKey: string, descKey = `${titleKey}.desc`) {
128
+ const title = this.#options.resolveDescription?.(titleKey);
129
+ const description = this.#options.resolveDescription?.(descKey);
130
+ return { ...(title ? { title } : {}), ...(description ? { description } : {}) };
131
+ }
132
+
133
+ /**
134
+ * Every entry the framework generates borrows the model's own words, because none of them has any of its own.
135
+ *
136
+ * `slice()` generates the root slice under the empty key and `baseSliceDictionary` fills its text, so
137
+ * `<model>List` and `<model>Insight` publish as "Slice List - Universal" whatever the dictionary says. The five
138
+ * base CRUD entries are no better off: `getBaseSignalDictionary` writes "Get Banner" as both title and
139
+ * description, and both are assigned last, so a module author has nowhere to write over either one.
140
+ *
141
+ * That matters more here than anywhere else — description is the one field a model picks an entry by, and "Get
142
+ * Banner" says nothing about what a Banner is. So the model's `.desc()` is appended rather than substituted:
143
+ * on `removeBanner` a bare model description would read as if the tool returned one. And when the model has no
144
+ * `.desc()` either, the entry is recorded as undescribed — its only possible text is missing, and that is the
145
+ * one thing a source scanner cannot see.
146
+ */
147
+ entryTexts(refName: string, key: string) {
148
+ const borrowed = `its only text is the model's own, and \`${refName}\` has no \`.desc()\` to lend it.`;
149
+ if (key === `${refName}List` || key === `${refName}Insight`) {
150
+ const texts = this.texts(`${refName}.modelName`, `${refName}.modelDesc`);
151
+ if (!texts.description) this.#undescribedByKey.set(key, borrowed);
152
+ return texts;
153
+ }
154
+ const texts = this.texts(`${refName}.signal.${key}`);
155
+ if (!mcpBaseVerbOf(refName, key)) {
156
+ if (!texts.description)
157
+ this.#undescribedByKey.set(key, "it has no dictionary `.desc()`, so an agent has its name and nothing else.");
158
+ return texts;
159
+ }
160
+ const modelDesc = this.#options.resolveDescription?.(`${refName}.modelDesc`);
161
+ if (!modelDesc) this.#undescribedByKey.set(key, borrowed);
162
+ const generated = texts.description ?? texts.title;
163
+ return modelDesc ? { ...texts, description: generated ? `${generated} — ${modelDesc}` : modelDesc } : texts;
164
+ }
165
+ }
@@ -0,0 +1 @@
1
+ export * from "./AgentCatalogue";
@@ -0,0 +1,42 @@
1
+ import { Any } from "akanjs/base";
2
+ import type { AgentWireContext, AgentWireMessage, AgentWireTool, LlmTurnRequest } from "akanjs/service";
3
+ import { srv } from "akanjs/service";
4
+ import { AgentTurn } from "./agentTurn";
5
+ import { AgentTurnStream } from "./agentTurnStream";
6
+ import { endpoint } from "./endpoint";
7
+ import { AgentRelayAccess } from "./guards";
8
+ import { internal } from "./internal";
9
+ import { Req } from "./internalArg";
10
+ import { serverSignal } from "./serverSignal";
11
+ import { SignalRegistry } from "./signalRegistry";
12
+
13
+ export class AgentInternal extends internal(srv.agent, ({ initialize }) => ({
14
+ warnOpenRelay: initialize().exec(() => {
15
+ AgentRelayAccess.warnIfOpen();
16
+ }),
17
+ })) {}
18
+
19
+ export class AgentEndpoint extends endpoint(srv.agent, ({ mutation }) => ({
20
+
21
+ runAgentTurn: mutation(AgentTurn, { guards: [AgentRelayAccess] })
22
+ .body("messages", [Any])
23
+ .body("tools", [Any])
24
+ .body("context", [Any])
25
+ .body("instructions", String, { nullable: true })
26
+ .with(Req)
27
+ .exec(async function (messages, tools, context, instructions, request) {
28
+ const turn: LlmTurnRequest = {
29
+ messages: messages as unknown as AgentWireMessage[],
30
+ tools: tools as unknown as AgentWireTool[],
31
+ context: context as unknown as AgentWireContext[],
32
+ ...(instructions ? { instructions } : {}),
33
+ };
34
+ if (AgentTurnStream.wants(request as Bun.BunRequest))
35
+
36
+ return AgentTurnStream.response((onDelta) => this.agentService.runTurn(turn, onDelta)) as unknown as AgentTurn;
37
+ return await this.agentService.runTurn(turn);
38
+ }),
39
+ })) {}
40
+
41
+ export class Agent extends serverSignal(AgentEndpoint, AgentInternal) {}
42
+ export const agent = SignalRegistry.registerService("agent" as const, AgentInternal, AgentEndpoint, Agent);
@@ -0,0 +1,8 @@
1
+ import { by, DatabaseRegistry } from "akanjs/document";
2
+ import { AgentTurn } from "akanjs/fetch";
3
+
4
+ export { AgentStop, AgentTurn, agentTurnConstant } from "akanjs/fetch";
5
+
6
+ export class AgentTurnDocument extends by(AgentTurn) {}
7
+
8
+ export const agentTurnDocument = DatabaseRegistry.buildScalar("agentTurn" as const, AgentTurnDocument);
@@ -0,0 +1,48 @@
1
+ import type { AgentWireToolCall } from "akanjs/service";
2
+
3
+ interface StreamedTurn {
4
+ text?: string;
5
+ toolCalls?: AgentWireToolCall[];
6
+ stop?: "end" | "toolUse";
7
+ }
8
+
9
+ /**
10
+ * The streaming half of the agent turn wire (use-agentic WIRE.md): the same endpoint answers `text/event-stream`
11
+ * when the request asks for it, one RunnerEvent JSON per SSE `data:` line, ending with `done`. The signal layer
12
+ * passes a raw `Response` through untouched, which is what lets one mutation serve both shapes.
13
+ */
14
+ export class AgentTurnStream {
15
+ static wants(request: Bun.BunRequest): boolean {
16
+ return !!request.headers.get("accept")?.includes("text/event-stream");
17
+ }
18
+
19
+ static response(run: (onDelta: (delta: string) => void) => Promise<StreamedTurn>): Response {
20
+ const encoder = new TextEncoder();
21
+ const stream = new ReadableStream<Uint8Array>({
22
+ async start(controller) {
23
+ const send = (event: object) => controller.enqueue(encoder.encode(`data: ${JSON.stringify(event)}\n\n`));
24
+ try {
25
+ let streamed = 0;
26
+ const turn = await run((delta) => {
27
+ if (!delta) return;
28
+ streamed += delta.length;
29
+ send({ type: "text", delta });
30
+ });
31
+
32
+ if (!streamed && turn.text) send({ type: "text", delta: turn.text });
33
+ const toolCalls = turn.toolCalls ?? [];
34
+ for (const call of toolCalls) send({ type: "toolCall", id: call.id, name: call.name, args: call.args });
35
+ send({ type: "done", stop: turn.stop === "toolUse" || toolCalls.length ? "toolUse" : "end" });
36
+ } catch (error) {
37
+
38
+ send({ type: "error", message: error instanceof Error ? error.message : String(error) });
39
+ } finally {
40
+ controller.close();
41
+ }
42
+ },
43
+ });
44
+ return new Response(stream, {
45
+ headers: { "content-type": "text/event-stream", "cache-control": "no-cache", connection: "keep-alive" },
46
+ });
47
+ }
48
+ }
@@ -1,5 +1,6 @@
1
1
  import { FetchClient } from "akanjs/fetch";
2
2
  import { srv } from "akanjs/service";
3
+ import { agent } from "./agent.signal";
3
4
  import { endpoint } from "./endpoint";
4
5
  import { internal } from "./internal";
5
6
  import { serverSignal } from "./serverSignal";
@@ -28,7 +29,7 @@ export class BaseEndpoint extends endpoint(srv.base, ({ query, mutation, message
28
29
  export class Base extends serverSignal(BaseEndpoint, BaseInternal) {}
29
30
  export const base = SignalRegistry.registerService("base" as const, BaseInternal, BaseEndpoint, Base);
30
31
 
31
- const createBaseFetch = () => FetchClient.from(base);
32
+ const createBaseFetch = () => FetchClient.from(base, agent);
32
33
  type BaseFetch = ReturnType<typeof createBaseFetch>;
33
34
 
34
35
  let fetchCache: BaseFetch | undefined;
@@ -1,4 +1,5 @@
1
1
  import {
2
+ Any,
2
3
  arraiedModel,
3
4
  type Cls,
4
5
  type Dayjs,
@@ -19,9 +20,22 @@ import type {
19
20
  } from "akanjs/constant";
20
21
  import type { ServiceModel } from "akanjs/service";
21
22
  import type { InternalArgCls } from "./internalArg";
23
+ import type { PromptResult } from "./mcp";
22
24
  import type { ArgType, SignalOption, SrvMap } from "./types";
23
25
 
24
- export type EndpointType = "query" | "mutation" | "pubsub" | "message";
26
+ export type EndpointType = "query" | "mutation" | "pubsub" | "message" | "prompt";
27
+
28
+ /**
29
+ * A prompt travels as `Any` because `PrimitiveRegistry.has(Any)` is true, so `resolveReturn` and `makeResponse`
30
+ * hand the messages back untouched. Registering a scalar for `PromptMessage` would buy nothing the builder's
31
+ * `exec` constraint does not already give, and would push a client-side model into every app that never uses one.
32
+ *
33
+ * It does not follow that a prompt's payload is unmasked. What a return ref masks is the value's own fields, and
34
+ * a prompt's are fixed by the protocol; the document inside an attachment is a JSON string by the time any return
35
+ * ref could reach it. So masking is declared at the attachment instead — `Msg.mask` — where the model is named
36
+ * and a payload that lost its class on the way still masks correctly.
37
+ */
38
+ const promptCarrier = Any;
25
39
 
26
40
  export interface EndpointArgProps<Optional extends boolean = false> {
27
41
  nullable?: Optional;
@@ -140,6 +154,7 @@ export class EndpointInfo<
140
154
  _ServerArg = DocumentModel<_ArgType>,
141
155
  >(name: ArgName, arg: Arg, option?: EndpointArgProps<Optional>) {
142
156
  if (this.execFn) throw new Error("Query function is already set");
157
+ this.#assertPromptArg("body");
143
158
  this.argNames.push(name);
144
159
  this.args.push(EndpointInfo.getArgInfo("body", name, arg, option));
145
160
  return this as unknown as EndpointInfo<
@@ -165,6 +180,7 @@ export class EndpointInfo<
165
180
  >(name: string, arg: Arg, option?: Omit<EndpointArgProps, "nullable">) {
166
181
  if (this.execFn) throw new Error("Query function is already set");
167
182
  else if (this.args.at(-1)?.option?.nullable) throw new Error("Last argument is nullable");
183
+ this.#assertPromptArg("room");
168
184
  this.argNames.push(name);
169
185
  this.args.push(EndpointInfo.getArgInfo("room", name, arg, option));
170
186
  return this as unknown as EndpointInfo<
@@ -191,6 +207,7 @@ export class EndpointInfo<
191
207
  >(name: string, arg: Arg, option?: EndpointArgProps<Optional>) {
192
208
  if (this.execFn) throw new Error("Query function is already set");
193
209
  else if (this.args.at(-1)?.option?.nullable) throw new Error("Last argument is nullable");
210
+ this.#assertPromptArg("msg");
194
211
  this.argNames.push(name);
195
212
  this.args.push(EndpointInfo.getArgInfo("msg", name, arg, option));
196
213
  return this as unknown as EndpointInfo<
@@ -230,6 +247,14 @@ export class EndpointInfo<
230
247
  Nullable
231
248
  >;
232
249
  }
250
+ /**
251
+ * `prompts/get` sends `arguments` as `{ [key: string]: string }` — there is no place in the request for an
252
+ * object body, and no socket behind a prompt for a room or a message. `param` and `search` survive because
253
+ * both already travel as text in a URL.
254
+ */
255
+ #assertPromptArg(argType: ArgType) {
256
+ if (this.type === "prompt") throw new Error(`A prompt takes .param() and .search() only, not .${argType}()`);
257
+ }
233
258
  _addArgs(args: ArgInfo<EndpointArgProps<boolean>>[]) {
234
259
  for (const arg of args) {
235
260
  const argRef = arraiedModel(arg.enum ?? arg.argRef, arg.arrDepth);
@@ -284,7 +309,9 @@ export class EndpointInfo<
284
309
  ...args: [...ServerArgs, ...InternalArgs]
285
310
  ) => ReqType extends "pubsub"
286
311
  ? Promise<void> | void
287
- : PromiseOrObject<DocumentModel<FieldToValue<Returns>> | (Nullable extends true ? null | undefined : never)>,
312
+ : ReqType extends "prompt"
313
+ ? PromiseOrObject<PromptResult>
314
+ : PromiseOrObject<DocumentModel<FieldToValue<Returns>> | (Nullable extends true ? null | undefined : never)>,
288
315
  >(
289
316
  execFn: ExecFn,
290
317
  ): EndpointInfo<
@@ -342,6 +369,13 @@ export type BuildEndpoint<SrvModule extends ServiceModel = ServiceModel> = {
342
369
  returnRef: Returns,
343
370
  signalOption?: SignalOption<Returns, Nullable>,
344
371
  ) => EndpointInfo<"message", SrvMap<SrvModule>, [], [], [], [], Returns, never, never, Nullable>;
372
+ /**
373
+ * Declares an MCP prompt. It takes no return type because the return is always `PromptMessage[]`, and no
374
+ * `.body()` because `prompts/get` sends its arguments as a flat string map — see `param`.
375
+ */
376
+ prompt: (
377
+ signalOption?: SignalOption<typeof promptCarrier, false>,
378
+ ) => EndpointInfo<"prompt", SrvMap<SrvModule>, [], [], [], [], typeof promptCarrier, never, never, false>;
345
379
  };
346
380
 
347
381
  export const buildEndpoint = {
@@ -361,6 +395,8 @@ export const buildEndpoint = {
361
395
  returnRef: Returns,
362
396
  signalOption?: SignalOption<Returns, Nullable>,
363
397
  ) => new EndpointInfo("message", returnRef, signalOption),
398
+ prompt: (signalOption?: SignalOption<typeof promptCarrier, false>) =>
399
+ new EndpointInfo("prompt", promptCarrier, signalOption),
364
400
  } as unknown as BuildEndpoint<any>;
365
401
 
366
402
  export type EndpointBuilder<SrvModule extends ServiceModel = ServiceModel> = (builder: BuildEndpoint<SrvModule>) => {
package/signal/guard.ts CHANGED
@@ -5,12 +5,24 @@ export interface Guard {
5
5
  canPass(context: SignalContext): PromiseOrObject<boolean>;
6
6
  }
7
7
 
8
- export type GuardCls<Name extends string = string> = Cls<Guard, { readonly name: Name }>;
8
+ /**
9
+ * What a guard needs in order to answer. `account` reads the caller and nothing else, so it can be evaluated
10
+ * with no arguments — which is what lets a catalogue hide what the caller certainly cannot use. `resource` needs
11
+ * the call's arguments and fails closed without them, so evaluating one early would erase legitimate entries.
12
+ *
13
+ * Required, with no default. Exposure is decided by a guard rather than by an opt-in, so an unmarked guard would
14
+ * silently take the `resource` path and list its endpoint to every caller — the whole guarded surface's names,
15
+ * refused only at call time. There is no safe guess here, so the author states it.
16
+ */
17
+ export type GuardScope = "account" | "resource";
18
+
19
+ export type GuardCls<Name extends string = string> = Cls<Guard, { readonly name: Name; readonly scope: GuardScope }>;
9
20
 
10
21
  /** Creates a named guard base class for signal access checks. */
11
22
  export const guard = <T extends string>(name: T): GuardCls<T> => {
12
23
  return class Guard {
13
24
  static name = name;
25
+ static scope: GuardScope = "account";
14
26
  canPass(context: SignalContext): PromiseOrObject<boolean> {
15
27
  return true;
16
28
  }
package/signal/guards.ts CHANGED
@@ -1,8 +1,10 @@
1
- import type { Guard } from "./guard";
1
+ import { Logger } from "akanjs/common";
2
+ import type { Guard, GuardScope } from "./guard";
2
3
  import type { SignalContext } from "./signalContext";
3
4
 
4
5
  export class Public implements Guard {
5
6
  static name = "Public";
7
+ static scope: GuardScope = "account";
6
8
  canPass(context: SignalContext): boolean {
7
9
  return true;
8
10
  }
@@ -10,7 +12,56 @@ export class Public implements Guard {
10
12
 
11
13
  export class None implements Guard {
12
14
  static name = "None";
15
+ static scope: GuardScope = "account";
13
16
  canPass(context: SignalContext): boolean {
14
17
  return false;
15
18
  }
16
19
  }
20
+
21
+ export type AgentRelayPolicy = (context: SignalContext) => boolean | Promise<boolean>;
22
+
23
+ /**
24
+ * Gate for the `runAgentTurn` relay. Every tool runs in the caller's own browser session, so the LLM key is the
25
+ * one thing this endpoint spends — ungated, any visitor can bill the app's provider through fetch alone.
26
+ *
27
+ * The framework has no account model to gate on, so with no policy registered it allows everyone — what `Public`
28
+ * said before, but with a seam: a product hardens it at boot, e.g.
29
+ * `AgentRelayAccess.use((context) => !!context.get("account"))`. The policy is the app's; the framework cannot know it.
30
+ */
31
+ export class AgentRelayAccess implements Guard {
32
+
33
+ static name = "AgentRelayAccess";
34
+
35
+ static scope: GuardScope = "account";
36
+ static #policy: AgentRelayPolicy | null = null;
37
+ static #logger = new Logger("AgentRelayAccess");
38
+
39
+ static use(policy: AgentRelayPolicy | null) {
40
+ AgentRelayAccess.#policy = policy;
41
+ }
42
+
43
+ static get hasPolicy() {
44
+ return !!AgentRelayAccess.#policy;
45
+ }
46
+
47
+ /** Runs at boot, after the app entry has evaluated — a module-scope check would fire before `use()` could. */
48
+ static warnIfOpen() {
49
+ if (AgentRelayAccess.#policy) return;
50
+ AgentRelayAccess.#logger.warn(
51
+ 'runAgentTurn is open to every caller — anyone can spend the LLM key. Register a policy at boot: AgentRelayAccess.use((context) => !!context.get("account")), or set AKAN_AGENT=false.',
52
+ );
53
+ }
54
+
55
+ async canPass(context: SignalContext): Promise<boolean> {
56
+ const policy = AgentRelayAccess.#policy;
57
+ if (!policy) return true;
58
+ try {
59
+ return await policy(context);
60
+ } catch (error) {
61
+ AgentRelayAccess.#logger.warn(
62
+ `agent relay policy threw, failing closed: ${error instanceof Error ? error.message : String(error)}`,
63
+ );
64
+ return false;
65
+ }
66
+ }
67
+ }
package/signal/index.ts CHANGED
@@ -1,3 +1,7 @@
1
+ export * from "./agent";
2
+ export * from "./agent.signal";
3
+ export * from "./agentTurn";
4
+ export * from "./agentTurnStream";
1
5
  export * from "./base.signal";
2
6
  export * from "./endpoint";
3
7
  export * from "./endpointInfo";
@@ -8,8 +12,10 @@ export * from "./intercept";
8
12
  export * from "./internal";
9
13
  export * from "./internalArg";
10
14
  export * from "./internalInfo";
15
+ export * from "./mcp";
11
16
  export * from "./middleware";
12
17
  export * from "./openapi";
18
+ export * from "./schema";
13
19
  export * from "./serializer";
14
20
  export * from "./serverSignal";
15
21
  export * from "./signalContext";