akanjs 3.0.2 → 3.1.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/base/baseEnv.ts +0 -4
  3. package/base/primitiveRegistry.ts +2 -2
  4. package/client/cookie.ts +5 -1
  5. package/client/csrLocation.ts +122 -0
  6. package/client/csrTypes.ts +32 -4
  7. package/client/device.ts +2 -1
  8. package/client/frameConfig.ts +78 -7
  9. package/client/index.ts +3 -0
  10. package/client/makePageProto.tsx +3 -2
  11. package/client/native/external-view.ts +1 -0
  12. package/client/route/RootLayoutDefinition.ts +7 -1
  13. package/client/route/RouteHead.ts +108 -0
  14. package/client/route/index.ts +1 -0
  15. package/client/router.ts +36 -23
  16. package/client/rscNavigation.ts +8 -2
  17. package/client/viewportMeta.ts +60 -0
  18. package/client/webManifest.ts +18 -0
  19. package/common/Logger.ts +7 -2
  20. package/common/PipelineNames.ts +31 -0
  21. package/common/PipelinePattern.ts +70 -0
  22. package/common/PipelinePlanSchema.ts +490 -0
  23. package/common/backoff.ts +14 -0
  24. package/common/index.ts +39 -0
  25. package/common/pipelinePlan.ts +259 -0
  26. package/common/routeConvention.ts +1 -0
  27. package/common/types.ts +17 -0
  28. package/constant/constantRegistry.ts +26 -6
  29. package/dictionary/base.dictionary.ts +8 -0
  30. package/dictionary/trans.ts +9 -1
  31. package/document/into.ts +5 -0
  32. package/fetch/client/fetchClient.ts +135 -31
  33. package/fetch/client/httpClient.ts +45 -0
  34. package/fetch/client/wsClient.ts +125 -16
  35. package/fetch/fetchType/buildFetch.type.ts +1 -0
  36. package/index.ts +243 -10
  37. package/package.json +1 -5
  38. package/server/akanApp.ts +5 -2
  39. package/server/akanServer.ts +44 -8
  40. package/server/artifact/builderRpc.ts +8 -3
  41. package/server/artifact/ipcTypes.ts +5 -2
  42. package/server/di/diLifecycle.ts +39 -3
  43. package/server/di/utils.ts +28 -1
  44. package/server/ed25519Key.ts +48 -0
  45. package/server/index.ts +1 -0
  46. package/server/machine/index.ts +2 -0
  47. package/server/machine/machineAccount.ts +27 -0
  48. package/server/machine/machineToken.ts +151 -0
  49. package/server/mcp/McpApps.ts +256 -0
  50. package/server/mcp/McpDispatcher.ts +31 -7
  51. package/server/mcp/McpRouter.ts +209 -46
  52. package/server/ops/opsToken.ts +3 -10
  53. package/server/resolver/database.resolver.ts +3 -0
  54. package/server/resolver/signal.resolver.ts +40 -3
  55. package/server/routeElementComposer.tsx +78 -2
  56. package/server/routeState.ts +6 -0
  57. package/server/routeTreeBuilder.ts +26 -9
  58. package/server/routing/apiRouter.ts +6 -3
  59. package/server/routing/roomReplay.ts +88 -0
  60. package/server/rscClient.tsx +53 -8
  61. package/server/rscWorker.tsx +141 -27
  62. package/server/rscWorkerHost.ts +18 -5
  63. package/server/sitemap.ts +14 -0
  64. package/server/ssrFromRscRenderer.tsx +12 -6
  65. package/server/ssrTypes.ts +3 -1
  66. package/server/systemPageDocument.tsx +38 -30
  67. package/server/types.tsx +2 -0
  68. package/server/webRouter.ts +74 -5
  69. package/service/injectInfo.ts +9 -1
  70. package/service/ipcTypes.ts +2 -1
  71. package/service/predefinedAdaptor/database.adaptor.ts +1 -146
  72. package/service/predefinedAdaptor/queue.adaptor.ts +44 -6
  73. package/service/predefinedAdaptor/queueBackoff.ts +12 -0
  74. package/service/predefinedAdaptor/solidQueue.adaptor.ts +17 -13
  75. package/service/predefinedAdaptor/sql/SqlDocumentStore.ts +44 -2
  76. package/service/predefinedAdaptor/sql/dialect/postgres.ts +3 -0
  77. package/service/predefinedAdaptor/sql/dialect/sqlite.ts +5 -2
  78. package/service/predefinedAdaptor/sql/search/fts5.ts +1 -1
  79. package/service/predefinedAdaptor/sql/types.ts +8 -6
  80. package/service/predefinedAdaptor/sql/values.ts +0 -23
  81. package/service/serve.ts +5 -1
  82. package/signal/agent.signal.ts +1 -1
  83. package/signal/base.signal.ts +2 -2
  84. package/signal/endpointIdempotency.ts +53 -0
  85. package/signal/internalArg.ts +14 -0
  86. package/signal/mcp/McpDocument.ts +38 -1
  87. package/signal/mcp/mcpProtocol.ts +18 -0
  88. package/signal/signalContext.ts +58 -30
  89. package/signal/signalRegistry.ts +14 -4
  90. package/signal/types.ts +18 -3
  91. package/store/agent/StoreSurfaceSource.ts +1 -1
  92. package/store/agentic/StToolBuilder.ts +3 -0
  93. package/test/conformance.ts +9 -33
  94. package/types/base/baseEnv.d.ts +0 -4
  95. package/types/base/primitiveRegistry.d.ts +1 -1
  96. package/types/client/csrLocation.d.ts +32 -0
  97. package/types/client/csrTypes.d.ts +40 -4
  98. package/types/client/frameConfig.d.ts +14 -2
  99. package/types/client/index.d.ts +3 -0
  100. package/types/client/native/external-view.d.ts +1 -0
  101. package/types/client/route/RootLayoutDefinition.d.ts +2 -1
  102. package/types/client/route/RouteHead.d.ts +13 -0
  103. package/types/client/route/index.d.ts +1 -0
  104. package/types/client/router.d.ts +6 -0
  105. package/types/client/rscNavigation.d.ts +4 -0
  106. package/types/client/viewportMeta.d.ts +18 -0
  107. package/types/client/webManifest.d.ts +4 -0
  108. package/types/common/PipelineNames.d.ts +6 -0
  109. package/types/common/PipelinePattern.d.ts +14 -0
  110. package/types/common/PipelinePlanSchema.d.ts +9 -0
  111. package/types/common/backoff.d.ts +10 -0
  112. package/types/common/index.d.ts +5 -0
  113. package/types/common/pipelinePlan.d.ts +224 -0
  114. package/types/common/types.d.ts +16 -0
  115. package/types/constant/constantRegistry.d.ts +5 -2
  116. package/types/dictionary/base.dictionary.d.ts +1 -1
  117. package/types/dictionary/dictionary.d.ts +8 -8
  118. package/types/document/into.d.ts +9 -0
  119. package/types/fetch/client/fetchClient.d.ts +31 -4
  120. package/types/fetch/client/httpClient.d.ts +8 -0
  121. package/types/fetch/client/wsClient.d.ts +26 -2
  122. package/types/fetch/fetchType/buildFetch.type.d.ts +1 -0
  123. package/types/index.d.ts +230 -9
  124. package/types/server/akanServer.d.ts +16 -1
  125. package/types/server/artifact/builderRpc.d.ts +7 -2
  126. package/types/server/artifact/ipcTypes.d.ts +5 -1
  127. package/types/server/di/utils.d.ts +1 -0
  128. package/types/server/ed25519Key.d.ts +13 -0
  129. package/types/server/index.d.ts +1 -0
  130. package/types/server/machine/index.d.ts +2 -0
  131. package/types/server/machine/machineAccount.d.ts +5 -0
  132. package/types/server/machine/machineToken.d.ts +29 -0
  133. package/types/server/machine.d.ts +1 -0
  134. package/types/server/mcp/McpApps.d.ts +50 -0
  135. package/types/server/mcp/McpDispatcher.d.ts +4 -1
  136. package/types/server/mcp/McpRouter.d.ts +4 -0
  137. package/types/server/resolver/signal.resolver.d.ts +2 -1
  138. package/types/server/routeElementComposer.d.ts +24 -4
  139. package/types/server/routeState.d.ts +4 -1
  140. package/types/server/routing/roomReplay.d.ts +24 -0
  141. package/types/server/rscWorkerHost.d.ts +5 -2
  142. package/types/server/sitemap.d.ts +2 -0
  143. package/types/server/ssrFromRscRenderer.d.ts +3 -3
  144. package/types/server/ssrTypes.d.ts +4 -1
  145. package/types/server/systemPageDocument.d.ts +2 -0
  146. package/types/server/types.d.ts +4 -1
  147. package/types/server/webRouter.d.ts +3 -1
  148. package/types/service/ipcTypes.d.ts +2 -0
  149. package/types/service/predefinedAdaptor/database.adaptor.d.ts +1 -24
  150. package/types/service/predefinedAdaptor/queue.adaptor.d.ts +10 -3
  151. package/types/service/predefinedAdaptor/queueBackoff.d.ts +4 -0
  152. package/types/service/predefinedAdaptor/solidQueue.adaptor.d.ts +3 -3
  153. package/types/service/predefinedAdaptor/sql/SqlDocumentStore.d.ts +6 -1
  154. package/types/service/predefinedAdaptor/sql/dialect/postgres.d.ts +1 -0
  155. package/types/service/predefinedAdaptor/sql/dialect/sqlite.d.ts +1 -0
  156. package/types/service/predefinedAdaptor/sql/search/fts5.d.ts +1 -1
  157. package/types/service/predefinedAdaptor/sql/types.d.ts +9 -5
  158. package/types/service/predefinedAdaptor/sql/values.d.ts +0 -3
  159. package/types/service/serve.d.ts +3 -0
  160. package/types/signal/endpointIdempotency.d.ts +7 -0
  161. package/types/signal/internalArg.d.ts +10 -0
  162. package/types/signal/mcp/McpDocument.d.ts +8 -0
  163. package/types/signal/mcp/mcpProtocol.d.ts +17 -0
  164. package/types/signal/signalContext.d.ts +5 -3
  165. package/types/signal/signalRegistry.d.ts +4 -4
  166. package/types/signal/types.d.ts +21 -1
  167. package/types/store/agentic/StToolBuilder.d.ts +2 -0
  168. package/types/test/conformance.d.ts +7 -10
  169. package/types/ui/Agent/Chat.d.ts +5 -1
  170. package/types/ui/Agent/EmbedApproval.d.ts +1 -0
  171. package/types/ui/Agent/index.d.ts +3 -0
  172. package/types/ui/Agent/useKeyboardFrame.d.ts +2 -0
  173. package/types/ui/Agent/useScreenActions.d.ts +18 -0
  174. package/types/ui/BottomSheet.d.ts +1 -0
  175. package/types/ui/Constant/Doc.d.ts +11 -17
  176. package/types/ui/Constant/index.d.ts +7 -2
  177. package/types/ui/Constant/schemaDoc.d.ts +11 -0
  178. package/types/ui/Dialog/Modal.d.ts +6 -1
  179. package/types/ui/Dialog/index.d.ts +1 -1
  180. package/types/ui/Dialog/modalSurface.d.ts +12 -0
  181. package/types/ui/Layout/BottomTab.d.ts +11 -2
  182. package/types/ui/Layout/FrameSlotFallback.d.ts +9 -0
  183. package/types/ui/Layout/Navbar.d.ts +4 -1
  184. package/types/ui/Layout/TopInset.d.ts +1 -1
  185. package/types/ui/Layout/index.d.ts +3 -3
  186. package/types/ui/Link/Action.d.ts +5 -1
  187. package/types/ui/Link/Anchor.d.ts +5 -3
  188. package/types/ui/Link/activePath.d.ts +13 -0
  189. package/types/ui/Link/index.d.ts +1 -1
  190. package/types/ui/Modal.d.ts +6 -1
  191. package/types/ui/Model/EditModal.d.ts +6 -1
  192. package/types/ui/Model/New.d.ts +6 -1
  193. package/types/ui/Model/ViewEditModal.d.ts +6 -1
  194. package/types/ui/Model/ViewModal.d.ts +6 -1
  195. package/types/ui/Model/newFormOrigin.d.ts +7 -0
  196. package/types/ui/Portal.d.ts +3 -1
  197. package/types/ui/Reference/origin.d.ts +12 -0
  198. package/types/ui/Signal/Doc.d.ts +23 -18
  199. package/types/ui/Signal/Listener.d.ts +2 -6
  200. package/types/ui/Signal/Object.d.ts +6 -10
  201. package/types/ui/Signal/Response.d.ts +3 -6
  202. package/types/ui/Signal/RestApi.d.ts +11 -15
  203. package/types/ui/Signal/WebSocket.d.ts +11 -21
  204. package/types/ui/Signal/endpointEntries.d.ts +8 -0
  205. package/types/ui/Signal/index.d.ts +35 -12
  206. package/types/ui/Signal/signalText.d.ts +178 -0
  207. package/types/ui/System/CSR.d.ts +2 -2
  208. package/types/ui/System/Client.d.ts +4 -3
  209. package/types/ui/System/Common.d.ts +27 -6
  210. package/types/ui/System/SSR.d.ts +6 -6
  211. package/types/ui/Tooltip.d.ts +4 -2
  212. package/types/ui/index.d.ts +2 -1
  213. package/types/ui/overlayLayer.d.ts +6 -0
  214. package/types/ui/overlayPosition.d.ts +17 -0
  215. package/types/vendor/@akanjs/native/packages/cli/src/api.d.ts +14 -3
  216. package/types/vendor/@akanjs/native/packages/cli/src/commands/update.d.ts +1 -1
  217. package/types/vendor/@akanjs/native/packages/cli/src/config.d.ts +30 -5
  218. package/types/vendor/@akanjs/native/packages/cli/src/lib/compat.d.ts +8 -0
  219. package/types/vendor/@akanjs/native/packages/cli/src/lib/desktop-server.d.ts +5 -0
  220. package/types/vendor/@akanjs/native/packages/cli/src/lib/distribution.d.ts +22 -0
  221. package/types/vendor/@akanjs/native/packages/cli/src/lib/project.d.ts +4 -0
  222. package/types/vendor/@akanjs/native/packages/cli/src/lib/publish.d.ts +16 -10
  223. package/types/vendor/@akanjs/native/packages/cli/src/lib/updates.d.ts +51 -7
  224. package/types/vendor/@akanjs/native/packages/cli/src/lib/vectors.d.ts +1 -1
  225. package/types/vendor/@akanjs/native/packages/cli/src/platforms/windows-installer.d.ts +7 -0
  226. package/types/vendor/@akanjs/native/packages/cli/src/platforms/windows.d.ts +5 -0
  227. package/types/vendor/@akanjs/native/packages/core/src/kernel.d.ts +36 -0
  228. package/types/vendor/@akanjs/native/packages/desktop/src/plugin.d.ts +2 -0
  229. package/types/vendor/@akanjs/native/packages/desktop/src/server.d.ts +11 -0
  230. package/types/vendor/@akanjs/native/plugins/external-view/src/desktop.d.ts +17 -0
  231. package/types/vendor/@akanjs/native/plugins/external-view/src/index.d.ts +132 -0
  232. package/types/vendor/@akanjs/native/plugins/external-view/src.d.ts +1 -0
  233. package/types/vendor/@akanjs/native/plugins/updates/src/index.d.ts +8 -0
  234. package/types/vendor/@akanjs/native/plugins/window/src/desktop.d.ts +4 -1
  235. package/types/vendor/@akanjs/native/plugins/window/src/index.d.ts +49 -0
  236. package/types/vendor/use-agentic/types.d.ts +2 -0
  237. package/types/webkit/CsrStack.d.ts +1 -1
  238. package/types/webkit/McpAppAgent.d.ts +14 -0
  239. package/types/webkit/McpAppApprovals.d.ts +8 -0
  240. package/types/webkit/McpAppBridge.d.ts +101 -0
  241. package/types/webkit/McpAppView.d.ts +21 -0
  242. package/types/webkit/index.d.ts +1 -0
  243. package/types/webkit/useLocation.d.ts +1 -1
  244. package/types/webkit/useVisualViewportFrame.d.ts +13 -0
  245. package/ui/Agent/Chat.tsx +29 -10
  246. package/ui/Agent/Composer.tsx +2 -1
  247. package/ui/Agent/EmbedApproval.tsx +17 -0
  248. package/ui/Agent/RichInput.tsx +1 -1
  249. package/ui/Agent/index.ts +2 -0
  250. package/ui/Agent/useKeyboardFrame.ts +10 -0
  251. package/ui/Agent/useScreenActions.ts +45 -0
  252. package/ui/BottomSheet.tsx +82 -53
  253. package/ui/Constant/Doc.tsx +113 -60
  254. package/ui/Constant/index.ts +2 -2
  255. package/ui/Constant/schemaDoc.ts +86 -26
  256. package/ui/Dialog/LegacyModal.tsx +53 -52
  257. package/ui/Dialog/Modal.tsx +93 -49
  258. package/ui/Dialog/modalSurface.ts +61 -0
  259. package/ui/DragAction.tsx +1 -1
  260. package/ui/DraggableList.tsx +1 -1
  261. package/ui/Dropdown.tsx +4 -6
  262. package/ui/KeyboardAvoiding.tsx +1 -1
  263. package/ui/Layout/BottomInset.tsx +20 -14
  264. package/ui/Layout/BottomTab.tsx +42 -16
  265. package/ui/Layout/FrameSlotFallback.tsx +59 -0
  266. package/ui/Layout/Navbar.tsx +37 -11
  267. package/ui/Layout/Sider.tsx +1 -1
  268. package/ui/Layout/TopInset.tsx +15 -14
  269. package/ui/Link/Action.tsx +15 -5
  270. package/ui/Link/Anchor.tsx +25 -13
  271. package/ui/Link/activePath.ts +25 -0
  272. package/ui/Link/index.tsx +1 -1
  273. package/ui/Load/Pagination.tsx +1 -1
  274. package/ui/Load/Units.tsx +1 -1
  275. package/ui/Loading/ProgressBar.tsx +1 -1
  276. package/ui/Modal.tsx +9 -0
  277. package/ui/Model/EditModal.tsx +16 -1
  278. package/ui/Model/New.tsx +25 -2
  279. package/ui/Model/NewWrapper_Client.tsx +2 -0
  280. package/ui/Model/ViewEditModal.tsx +9 -0
  281. package/ui/Model/ViewModal.tsx +16 -1
  282. package/ui/Model/newFormOrigin.ts +45 -0
  283. package/ui/Popconfirm.tsx +5 -7
  284. package/ui/Portal.tsx +4 -7
  285. package/ui/Reference/origin.ts +31 -0
  286. package/ui/ScreenNavigator.tsx +1 -1
  287. package/ui/Select.tsx +2 -7
  288. package/ui/Signal/Arg.tsx +2 -2
  289. package/ui/Signal/Doc.tsx +125 -63
  290. package/ui/Signal/Endpoint.tsx +11 -10
  291. package/ui/Signal/Listener.tsx +7 -10
  292. package/ui/Signal/Object.tsx +7 -14
  293. package/ui/Signal/Response.tsx +24 -24
  294. package/ui/Signal/RestApi.tsx +63 -52
  295. package/ui/Signal/WebSocket.tsx +65 -72
  296. package/ui/Signal/endpointEntries.ts +25 -0
  297. package/ui/Signal/index.ts +23 -6
  298. package/ui/Signal/signalText.ts +59 -0
  299. package/ui/System/CSR.tsx +34 -8
  300. package/ui/System/Client.tsx +36 -5
  301. package/ui/System/Common.tsx +76 -32
  302. package/ui/System/SSR.tsx +73 -31
  303. package/ui/Toast.tsx +1 -1
  304. package/ui/Tooltip.tsx +84 -30
  305. package/ui/index.ts +11 -1
  306. package/ui/overlayLayer.ts +25 -2
  307. package/ui/overlayPosition.ts +90 -0
  308. package/ui/recipe/inputRecipe.ts +8 -1
  309. package/ui/styles.css +152 -0
  310. package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeActivity.kt +22 -2
  311. package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeKernel.kt +37 -0
  312. package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeUpdateReports.kt +169 -0
  313. package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeUpdates.kt +110 -38
  314. package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeVectors.kt +20 -0
  315. package/vendor/@akanjs/native/native/desktop/Cargo.lock +16 -16
  316. package/vendor/@akanjs/native/native/desktop/src/external.rs +651 -0
  317. package/vendor/@akanjs/native/native/desktop/src/json.rs +23 -0
  318. package/vendor/@akanjs/native/native/desktop/src/lib.rs +228 -5
  319. package/vendor/@akanjs/native/native/ios/Sources/AkanNativeApp.swift +2 -1
  320. package/vendor/@akanjs/native/native/ios/Sources/AkanNativeKernel.swift +47 -1
  321. package/vendor/@akanjs/native/native/ios/Sources/AkanNativeUpdateReports.swift +145 -0
  322. package/vendor/@akanjs/native/native/ios/Sources/AkanNativeUpdates.swift +112 -43
  323. package/vendor/@akanjs/native/native/ios/Sources/AkanNativeVectors.swift +18 -0
  324. package/vendor/@akanjs/native/native/ios/Sources/AkanNativeViewController.swift +24 -2
  325. package/vendor/@akanjs/native/packages/cli/src/api.ts +22 -6
  326. package/vendor/@akanjs/native/packages/cli/src/commands/build.ts +24 -8
  327. package/vendor/@akanjs/native/packages/cli/src/commands/update.ts +11 -9
  328. package/vendor/@akanjs/native/packages/cli/src/config.ts +35 -7
  329. package/vendor/@akanjs/native/packages/cli/src/lib/compat.ts +2 -0
  330. package/vendor/@akanjs/native/packages/cli/src/lib/configkeys.ts +6 -4
  331. package/vendor/@akanjs/native/packages/cli/src/lib/desktop-server.ts +11 -1
  332. package/vendor/@akanjs/native/packages/cli/src/lib/distribution.ts +73 -0
  333. package/vendor/@akanjs/native/packages/cli/src/lib/project.ts +15 -3
  334. package/vendor/@akanjs/native/packages/cli/src/lib/publish.ts +70 -23
  335. package/vendor/@akanjs/native/packages/cli/src/lib/updates.ts +159 -23
  336. package/vendor/@akanjs/native/packages/cli/src/lib/vectors.ts +2 -0
  337. package/vendor/@akanjs/native/packages/cli/src/platforms/android.ts +9 -4
  338. package/vendor/@akanjs/native/packages/cli/src/platforms/desktop-update.ts +1 -1
  339. package/vendor/@akanjs/native/packages/cli/src/platforms/desktop.ts +4 -2
  340. package/vendor/@akanjs/native/packages/cli/src/platforms/ios.ts +9 -4
  341. package/vendor/@akanjs/native/packages/cli/src/platforms/windows-installer.ts +25 -11
  342. package/vendor/@akanjs/native/packages/cli/src/platforms/windows.ts +14 -3
  343. package/vendor/@akanjs/native/packages/core/src/kernel.ts +49 -0
  344. package/vendor/@akanjs/native/packages/core/vectors/updates.json +31 -0
  345. package/vendor/@akanjs/native/packages/desktop/src/main.ts +3 -0
  346. package/vendor/@akanjs/native/packages/desktop/src/plugin.ts +2 -0
  347. package/vendor/@akanjs/native/packages/desktop/src/server.ts +70 -6
  348. package/vendor/@akanjs/native/plugins/external-view/native-plugin.json +23 -0
  349. package/vendor/@akanjs/native/plugins/external-view/src/desktop.ts +321 -0
  350. package/vendor/@akanjs/native/plugins/external-view/src/index.ts +106 -0
  351. package/vendor/@akanjs/native/plugins/updates/android/UpdatesPlugin.kt +133 -41
  352. package/vendor/@akanjs/native/plugins/updates/ios/UpdatesPlugin.swift +101 -36
  353. package/vendor/@akanjs/native/plugins/updates/native-plugin.json +4 -2
  354. package/vendor/@akanjs/native/plugins/updates/src/desktop.ts +15 -1
  355. package/vendor/@akanjs/native/plugins/updates/src/index.ts +7 -1
  356. package/vendor/@akanjs/native/plugins/window/native-plugin.json +4 -0
  357. package/vendor/@akanjs/native/plugins/window/src/desktop.ts +68 -1
  358. package/vendor/@akanjs/native/plugins/window/src/index.ts +47 -0
  359. package/vendor/use-agentic/ToolRunner.ts +8 -1
  360. package/vendor/use-agentic/types.ts +2 -0
  361. package/webkit/CsrRouteTable.ts +1 -0
  362. package/webkit/CsrStack.ts +9 -2
  363. package/webkit/McpAppAgent.ts +138 -0
  364. package/webkit/McpAppApprovals.ts +56 -0
  365. package/webkit/McpAppBridge.ts +291 -0
  366. package/webkit/McpAppView.ts +258 -0
  367. package/webkit/bootCsr.tsx +54 -5
  368. package/webkit/index.ts +1 -0
  369. package/webkit/useCsrValues.ts +16 -10
  370. package/webkit/useFrameRuntime.ts +10 -1
  371. package/webkit/useLocation.ts +4 -3
  372. package/webkit/useVisualViewportFrame.tsx +52 -0
  373. package/service/predefinedAdaptor/sql/driver/libsql.ts +0 -45
  374. package/types/service/predefinedAdaptor/sql/driver/libsql.d.ts +0 -20
  375. package/types/ui/Agent/useKeyboardInset.d.ts +0 -1
  376. package/types/ui/ServerPortal.d.ts +0 -15
  377. package/ui/Agent/useKeyboardInset.ts +0 -19
  378. package/ui/ServerPortal.tsx +0 -49
package/signal/types.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { DefaultPrimitiveName, UnCls } from "akanjs/base";
2
- import type { ServiceModel } from "akanjs/service";
2
+ import type { AkanJob, ServiceModel } from "akanjs/service";
3
3
  import type { RateLimitBudget } from "./endpointRateLimit";
4
4
  import type { GuardCls } from "./guard";
5
5
  import type { MiddlewareCls } from "./middleware";
@@ -89,6 +89,11 @@ export interface SignalOption<Response = any, Nullable extends boolean = false,
89
89
  * it. Losing the race does not stop the handler, which runs to completion with nobody holding its result.
90
90
  */
91
91
  timeout?: number;
92
+ /**
93
+ * A `process` job that failed its last attempt, with `this` the internal: the dead letter, called once per job on
94
+ * whichever queue ran it. Throwing from it is logged and changes nothing.
95
+ */
96
+ onFailed?: (this: any, job: AkanJob, error: unknown) => Promise<void> | void;
92
97
  partial?: _Key[] | readonly _Key[];
93
98
  /**
94
99
  * Milliseconds to reuse the answer, keyed by endpoint and arguments; unset caches nothing. Only a `query` with no
@@ -191,6 +196,8 @@ export interface SerializedSignal {
191
196
  crud?: SerializedSignalMcp;
192
197
  /** Which generated CRUD verbs a person-only guard protects, by the same verb map; only the `false` keys travel. */
193
198
  agents?: SerializedSignalMcp;
199
+ /** The app or lib that registered the signal, first registrant first: an app extending a lib module reads `["shared", "sceny"]`. */
200
+ origin?: string[];
194
201
  }
195
202
 
196
203
  /** Keyed by generated verb, mirroring the `guards` map `slice()` takes. The root slice's own flag rides on `slice[""]`. */
@@ -203,7 +210,10 @@ export interface SerializedSignalMcp {
203
210
 
204
211
  export type SignalType = "restapi" | "websocket";
205
212
 
206
- export type WebsocketReqData = { key: string; data: unknown[]; subscribe?: boolean };
213
+ /** Where a client's copy of a room stands: the numbering it came from, and the last frame it took. */
214
+ export type WebsocketRoomCursor = { epoch: string; seq: number };
215
+ /** `since` asks a resubscribe to send what was published after it, if the server still can. */
216
+ export type WebsocketReqData = { key: string; data: unknown[]; subscribe?: boolean; since?: WebsocketRoomCursor };
207
217
  export type WebsocketMessageData = { type: "msg"; key: string; data: object | object[] };
208
218
  /**
209
219
  * `op` is relative to the room, not the database: a row edited out of a filter is `leave` there and `enter` where it
@@ -224,7 +234,12 @@ export type WebsocketSubscribeAck = {
224
234
  roomId: string;
225
235
  requestRoomId: string;
226
236
  subscribe: boolean;
237
+ /** The room's numbering at the subscribe, when the server numbers its frames. */
238
+ cursor?: WebsocketRoomCursor;
239
+ /** Answering `since`: `true` when every frame after it was sent ahead of this ack, `false` for a gap. */
240
+ replayed?: boolean;
227
241
  };
228
- export type WebsocketPublishData = { type: "pub"; roomId: string; data: object | object[] };
242
+ /** `seq` numbers the frames one server process delivers for a room, one apart. */
243
+ export type WebsocketPublishData = { type: "pub"; roomId: string; data: object | object[]; seq?: number };
229
244
  export type WebsocketAuthAck = { type: "auth"; revokedRooms: string[] };
230
245
  export type WebsocketResData = WebsocketMessageData | WebsocketSubscribeAck | WebsocketPublishData | WebsocketAuthAck;
@@ -52,8 +52,8 @@ export class StoreSurfaceSource implements SurfaceSource {
52
52
  : "path must be an internal path starting with /.",
53
53
  run: async (args) => {
54
54
  const path = String(args.path);
55
- router.push(path);
56
55
  try {
56
+ router.push(path);
57
57
  await router.navigation();
58
58
  } catch {
59
59
  throw new Error(
@@ -33,6 +33,8 @@ export interface StToolMeta {
33
33
  settle?: boolean;
34
34
  confirm?: ToolConfirm;
35
35
  guard?: ToolGuard;
36
+ /** What a person reads for this action in a command palette, in their language (an `l()` result); never the model. */
37
+ label?: string;
36
38
  }
37
39
 
38
40
  /** A scalar, an enum, or one array level of either. */
@@ -141,6 +143,7 @@ export class StToolBuilder<Args extends unknown[] = []> {
141
143
  description: spec.desc,
142
144
  settle: spec.meta.settle,
143
145
  parameters: StToolBuilder.parametersOf(spec.args),
146
+ label: () => live.current.meta.label,
144
147
 
145
148
  ...(spec.meta.confirm === undefined && !name.startsWith("remove")
146
149
  ? {}
@@ -4,7 +4,6 @@ import path from "node:path";
4
4
  import {
5
5
  DEFAULT_TOKENIZER,
6
6
  getSolidConfig,
7
- LibsqlDatabase,
8
7
  PostgresDatabase,
9
8
  PostgresDialect,
10
9
  RedisCache,
@@ -16,12 +15,11 @@ import {
16
15
  SqliteDialect,
17
16
  } from "akanjs/service";
18
17
 
19
- type ConformanceBackend = "redis" | "postgres" | "libsql";
18
+ type ConformanceBackend = "redis" | "postgres";
20
19
 
21
20
  export type ConformanceCacheKind = "solid" | "redis";
22
21
 
23
- /** `libsqlRemote` is a sqld server shared by every run, so it only hosts cases that bring their own table. */
24
- export type SqlDriverKind = "sqlite" | "libsql" | "postgres" | "libsqlRemote";
22
+ export type SqlDriverKind = "sqlite" | "postgres";
25
23
 
26
24
  export interface SqlDriverOptions {
27
25
  insight?: boolean;
@@ -31,7 +29,7 @@ export interface SqlDriverOptions {
31
29
 
32
30
  export interface SqlDriver {
33
31
  kind: SqlDriverKind;
34
- database: SqliteDatabase | LibsqlDatabase | PostgresDatabase;
32
+ database: SqliteDatabase | PostgresDatabase;
35
33
  dialect: SqlDialect;
36
34
  /** A new adaptor on the same storage — what a process restart sees, so only what was committed. */
37
35
  restart: () => Promise<SqlDriver>;
@@ -45,10 +43,9 @@ export interface SqlDriver {
45
43
  const backendEnvNames = {
46
44
  redis: "AKAN_TEST_REDIS_URL",
47
45
  postgres: "AKAN_TEST_POSTGRES_URL",
48
- libsql: "AKAN_TEST_LIBSQL_URL",
49
46
  } as const;
50
47
 
51
- /** `bun run testConformance` (`infra/test/compose.yaml`) sets all three backends; plain `bun test` runs SQLite. */
48
+ /** `bun run testConformance` (`infra/test/compose.yaml`) sets both backends; plain `bun test` runs SQLite. */
52
49
  export class ConformanceEnv {
53
50
  static readonly #announced = new Set<string>();
54
51
  /** Where a deployment points an app at its data. A test that hands its storage in has these cleared first. */
@@ -56,9 +53,6 @@ export class ConformanceEnv {
56
53
  "AKAN_DATABASE_MODES",
57
54
  "AKAN_SOLID_DB_PATH",
58
55
  "SQLITE_DATABASE_PATH",
59
- "LIBSQL_URL",
60
- "LIBSQL_URI",
61
- "LIBSQL_AUTH_TOKEN",
62
56
  "POSTGRES_URL",
63
57
  "POSTGRES_URI",
64
58
  "POSTGRES_HOST",
@@ -199,24 +193,12 @@ export class ConformanceEnv {
199
193
  }
200
194
 
201
195
  /** The local drivers always, and each remote one whose backend the suite can reach. */
202
- static sqlDrivers(suite: string, { remote = false }: { remote?: boolean } = {}): SqlDriverKind[] {
196
+ static sqlDrivers(suite: string): SqlDriverKind[] {
203
197
  const kinds: SqlDriverKind[] = ["sqlite"];
204
- if (ConformanceEnv.#hasLibsqlBinding(suite)) kinds.push("libsql");
205
198
  if (ConformanceEnv.has(suite, "postgres")) kinds.push("postgres");
206
- if (remote && ConformanceEnv.has(suite, "libsql")) kinds.push("libsqlRemote");
207
199
  return kinds;
208
200
  }
209
201
 
210
- static #hasLibsqlBinding(suite: string) {
211
- if (process.platform !== "win32" || process.arch !== "arm64") return true;
212
- const key = `${suite}:libsql-binding`;
213
- if (!ConformanceEnv.#announced.has(key)) {
214
- ConformanceEnv.#announced.add(key);
215
- console.info(`[conformance] ${suite}: local libsql cases skipped — libsql publishes no win32-arm64 binding`);
216
- }
217
- return false;
218
- }
219
-
220
202
  /**
221
203
  * The real adaptor, initialised as the DI container would, on storage nothing else sees. `insight` gives Postgres a
222
204
  * login role for `InsightQuery`; `memory` puts SQLite in memory, as `TestServer` does.
@@ -229,14 +211,12 @@ export class ConformanceEnv {
229
211
  kind: SqlDriverKind,
230
212
  { insight = false, memory = false, search: searchConfig }: SqlDriverOptions,
231
213
  ): Promise<{ config: object; remove: () => Promise<void> }> {
232
- const search = { enabled: kind !== "libsqlRemote", tokenizer: DEFAULT_TOKENIZER, ...searchConfig };
214
+ const search = { enabled: true, tokenizer: DEFAULT_TOKENIZER, ...searchConfig };
233
215
  if (kind === "postgres") {
234
216
  const { url, insightUrl, drop } = await ConformanceEnv.postgresSchema("akan_sql", { insight });
235
217
  return { config: { url, insightUrl, search }, remove: drop };
236
218
  }
237
- if (kind === "libsqlRemote")
238
- return { config: { url: ConformanceEnv.url("libsql"), search }, remove: async () => undefined };
239
- if (kind === "sqlite" && memory)
219
+ if (memory)
240
220
  return {
241
221
  config: { filePath: ":memory:", journalMode: "MEMORY", synchronous: "OFF", foreignKeys: true, search },
242
222
  remove: async () => undefined,
@@ -244,10 +224,7 @@ export class ConformanceEnv {
244
224
  const { dir, remove } = await ConformanceEnv.tempDir(`akan-${kind}`);
245
225
  const filePath = path.join(dir, "conformance.db");
246
226
  return {
247
- config:
248
- kind === "sqlite"
249
- ? { filePath, journalMode: "WAL", busyTimeoutMs: 5000, synchronous: "NORMAL", foreignKeys: true, search }
250
- : { url: `file:${filePath}`, search },
227
+ config: { filePath, journalMode: "WAL", busyTimeoutMs: 5000, synchronous: "NORMAL", foreignKeys: true, search },
251
228
  remove,
252
229
  };
253
230
  }
@@ -262,8 +239,7 @@ export class ConformanceEnv {
262
239
  storage: { config: object; remove: () => Promise<void> },
263
240
  ): Promise<SqlDriver> {
264
241
  const scheduler = new Scheduler();
265
- const database =
266
- kind === "postgres" ? new PostgresDatabase() : kind === "sqlite" ? new SqliteDatabase() : new LibsqlDatabase();
242
+ const database = kind === "postgres" ? new PostgresDatabase() : new SqliteDatabase();
267
243
  Object.assign(database, { scheduler, config: storage.config });
268
244
  await database.onInit();
269
245
  const shutdown = async () => {
@@ -21,10 +21,6 @@ export type BackendEnv = {
21
21
  cacheSize?: number;
22
22
  tempStore?: string;
23
23
  };
24
- libsql?: {
25
- url?: string;
26
- authToken?: string;
27
- };
28
24
  postgres?: {
29
25
  url?: string;
30
26
  host?: string;
@@ -152,7 +152,7 @@ declare global {
152
152
  [CLIENT_VALUE]: Dayjs;
153
153
  [DEFAULT_VALUE]: Dayjs;
154
154
  [PURIFIED_VALUE]: Dayjs;
155
- [EXAMPLE_VALUE]: string;
155
+ [EXAMPLE_VALUE]: Dayjs;
156
156
  validate(value: Date): boolean;
157
157
  parseValue(input: Date): Dayjs;
158
158
  serializeValue(value: Dayjs | Date): Date;
@@ -0,0 +1,32 @@
1
+ export interface CsrMemoryOwner {
2
+ leave: (href: string) => void;
3
+ reload: () => void;
4
+ }
5
+ declare global {
6
+ var __AKAN_CSR_LOCATION__: CsrLocation | undefined;
7
+ var __AKAN_EMBED__: {
8
+ kind: "mcp-app";
9
+ origin?: string;
10
+ account?: Record<string, unknown> | null;
11
+ } | undefined;
12
+ }
13
+ export declare class CsrLocation {
14
+ #private;
15
+ get isMemory(): boolean;
16
+ /** The owner takes what a document load would do, which a view cannot: it has no document to load in its place. */
17
+ useMemory(href: string, owner: CsrMemoryOwner): void;
18
+ /** Path, search and hash, without the origin. */
19
+ get href(): string;
20
+ get pathname(): string;
21
+ get search(): string;
22
+ get hash(): string;
23
+ get state(): unknown;
24
+ /** `href` as a route reads it: an absolute URL on this document's origin loses the origin, anything else is kept. */
25
+ strip(href: string): string;
26
+ push(state: unknown, href: string): void;
27
+ replace(state: unknown, href?: string): void;
28
+ back(): void;
29
+ assign(href: string): void;
30
+ reload(): void;
31
+ }
32
+ export declare const csrLocation: CsrLocation;
@@ -14,13 +14,22 @@ export type PageSafeAreaConfig = boolean | "top" | "bottom" | {
14
14
  /** `"stream"` flushes the shell (`Loading` included) then streams; a redirect in suspended content becomes a client one.
15
15
  * `"block"` buffers the whole document, so an error in slow content can still render a clean error page. */
16
16
  export type SsrRenderMode = "stream" | "block";
17
+ /** Px per Tailwind breakpoint (sm 40rem, md 48rem, lg 64rem, xl 80rem, 2xl 96rem), each from its own width up. */
18
+ export interface ResponsiveInset {
19
+ base: number;
20
+ sm?: number;
21
+ md?: number;
22
+ lg?: number;
23
+ xl?: number;
24
+ "2xl"?: number;
25
+ }
17
26
  export interface PageConfig {
18
27
  transition?: TransitionType;
19
28
  safeArea?: PageSafeAreaConfig;
20
- /** Top chrome reservation in px. Use true for the default 48px reservation. */
21
- topInset?: number | boolean;
22
- /** Bottom chrome reservation in px. Use true for the default 48px reservation. */
23
- bottomInset?: number | boolean;
29
+ /** Top chrome reservation in px, or px per breakpoint. Use true for the default 48px reservation. */
30
+ topInset?: number | boolean | ResponsiveInset;
31
+ /** Bottom chrome reservation in px, or px per breakpoint. Use true for the default 48px reservation. */
32
+ bottomInset?: number | boolean | ResponsiveInset;
24
33
  gesture?: boolean;
25
34
  cache?: boolean;
26
35
  /** Initial full-document SSR strategy. Defaults to `"stream"`. */
@@ -39,6 +48,16 @@ export interface CsrState {
39
48
  bottomSafeArea: number;
40
49
  topInset: number;
41
50
  bottomInset: number;
51
+ /** The declared per-breakpoint insets; `topInset`/`bottomInset` hold their value at the width they resolved at. */
52
+ responsiveInset?: {
53
+ top: ResponsiveInset;
54
+ bottom: ResponsiveInset;
55
+ };
56
+ /** Web only: the sides whose safe area `env(safe-area-inset-*)` measures, since a browser tells script nothing. */
57
+ safeAreaEnv?: {
58
+ top: boolean;
59
+ bottom: boolean;
60
+ };
42
61
  gesture: boolean;
43
62
  cache: boolean;
44
63
  ssr: SsrRenderMode;
@@ -111,13 +130,29 @@ export interface RouteRender {
111
130
  resolveNotFound?: () => PromiseOrObject<LayoutNotFoundRender | undefined>;
112
131
  resolveError?: () => PromiseOrObject<LayoutErrorRender | undefined>;
113
132
  resolveHead?: ResolveHead;
133
+ /** Parses the declared args without rendering, so a path value the type refuses answers not-found before any byte. */
134
+ checkArgs?: (props: PageProps) => Promise<void>;
114
135
  getPageConfig?: () => PromiseOrObject<PageConfig | undefined>;
115
136
  getLayoutPageConfig?: () => PromiseOrObject<PageConfig | undefined>;
116
137
  /** A root layout's `theme`, readable before it renders. */
117
138
  getLayoutTheme?: () => PromiseOrObject<string | undefined>;
139
+ /** A root layout's `viewport`, readable before it renders: the document shell writes it ahead of the body. */
140
+ getLayoutViewport?: () => PromiseOrObject<RouteViewport | undefined>;
141
+ /** A root layout's `manifest`, which the server answers at the URL its documents link. */
142
+ getLayoutManifest?: () => PromiseOrObject<WebAppManifest | undefined>;
118
143
  /** The `page()` chain behind a page render, when it was declared as one — what a page prompt is read off. */
119
144
  getRouteDefinition?: () => PromiseOrObject<RouteDefinition | undefined>;
120
145
  }
146
+ export interface RouteViewport {
147
+ /** `viewport-fit=cover`: the page runs under the notch and home indicator, and `env(safe-area-inset-*)` measures them. */
148
+ fitCover?: boolean;
149
+ /** What the on-screen keyboard resizes; `resizes-content` shrinks the layout viewport, and `dvh` with it. */
150
+ interactiveWidget?: "resizes-visual" | "resizes-content" | "overlays-content";
151
+ /** The browser chrome's color: one for every theme, or one per theme name the app switches between. */
152
+ themeColor?: string | {
153
+ [theme: string]: string;
154
+ };
155
+ }
121
156
  export interface WebAppManifestIcon {
122
157
  src: string;
123
158
  sizes?: string;
@@ -161,6 +196,7 @@ export interface LayoutModule {
161
196
  reconnect?: boolean;
162
197
  wsConnect?: boolean;
163
198
  layoutStyle?: "mobile" | "web";
199
+ viewport?: RouteViewport;
164
200
  Loading?: LayoutLoadingRender;
165
201
  NotFound?: LayoutNotFoundRender;
166
202
  Error?: LayoutErrorRender;
@@ -1,4 +1,4 @@
1
- import type { PageConfig, PageState } from "./csrTypes.d.ts";
1
+ import type { PageConfig, PageState, ResponsiveInset } from "./csrTypes.d.ts";
2
2
  export type DevicePlatform = "ios" | "android" | "web" | (string & {});
3
3
  export type SafeAreaInsets = {
4
4
  top: number;
@@ -11,10 +11,22 @@ export interface ResolvePageStateOptions {
11
11
  platform: DevicePlatform;
12
12
  deviceSafeArea: SafeAreaInsets;
13
13
  cssSafeArea?: SafeAreaInsets;
14
+ /** The viewport width in px a responsive inset resolves at; left out, it resolves at `base`. */
15
+ width?: number;
14
16
  }
17
+ /** Tailwind's default breakpoints in rem, the widths a `ResponsiveInset` keys on. */
18
+ export declare const insetBreakpoints: readonly [readonly ["sm", 40], readonly ["md", 48], readonly ["lg", 64], readonly ["xl", 80], readonly ["2xl", 96]];
19
+ export type InsetBreakpoint = "base" | (typeof insetBreakpoints)[number][0];
15
20
  export declare function validatePageConfig(routeKey: string, config?: PageConfig): void;
21
+ export declare const isResponsiveInset: (inset: PageConfig["topInset"]) => inset is ResponsiveInset;
22
+ /** The inset at each breakpoint, each one the nearest declared value at or below it. */
23
+ export declare function insetsByBreakpoint(inset: PageConfig["topInset"]): {
24
+ [bp in InsetBreakpoint]: number;
25
+ };
26
+ /** The inset in force at `width` px, assuming a 16px rem. */
27
+ export declare function insetAt(inset: PageConfig["topInset"], width?: number): number;
16
28
  export declare function mergePageConfigs(configChain?: PageConfig[]): PageConfig;
17
29
  export declare function getExplicitPageConfigKeys(configChain?: PageConfig[]): Partial<Record<keyof PageConfig, boolean>>;
18
30
  export declare const defaultPageState: PageState;
19
- export declare function resolvePageState({ configChain, path, basePath, platform, deviceSafeArea, cssSafeArea, }: ResolvePageStateOptions): PageState;
31
+ export declare function resolvePageState({ configChain, path, basePath, platform, deviceSafeArea, cssSafeArea, width, }: ResolvePageStateOptions): PageState;
20
32
  export declare function readCssSafeAreaInsets(): SafeAreaInsets;
@@ -2,6 +2,7 @@ export * from "./clientRuntime.d.ts";
2
2
  export * from "./cn.d.ts";
3
3
  export * from "./cookie.d.ts";
4
4
  export * from "./createFont.d.ts";
5
+ export * from "./csrLocation.d.ts";
5
6
  export * from "./csrTypes.d.ts";
6
7
  export * from "./decorators.d.ts";
7
8
  export * from "./device.d.ts";
@@ -17,3 +18,5 @@ export * from "./storage.d.ts";
17
18
  export * from "./translator.d.ts";
18
19
  export * from "./types.d.ts";
19
20
  export * from "./useClient.d.ts";
21
+ export * from "./viewportMeta.d.ts";
22
+ export * from "./webManifest.d.ts";
@@ -0,0 +1 @@
1
+ export * from "../../vendor/@akanjs/native/plugins/external-view/src/index.d.ts";
@@ -1,4 +1,4 @@
1
- import type { LayoutModule, PageModule, WebAppManifest } from "../csrTypes.d.ts";
1
+ import type { LayoutModule, PageModule, RouteViewport, WebAppManifest } from "../csrTypes.d.ts";
2
2
  import type { ReactFont } from "../types.d.ts";
3
3
  import { LayoutDefinition } from "./LayoutDefinition.d.ts";
4
4
  import type { RouteArgsShape, RouteKind } from "./RouteDefinition.d.ts";
@@ -12,5 +12,6 @@ export declare class RootLayoutDefinition<Args extends RouteArgsShape = Record<n
12
12
  reconnect(on?: boolean): this;
13
13
  wsConnect(on?: boolean): this;
14
14
  layoutStyle(style: "mobile" | "web"): this;
15
+ viewport(viewport: RouteViewport): this;
15
16
  protected extendModule(module: PageModule & LayoutModule): PageModule & LayoutModule;
16
17
  }
@@ -0,0 +1,13 @@
1
+ import { type ReactNode } from "react";
2
+ import type { ResolveHeadResult } from "../csrTypes.d.ts";
3
+ type TagProps = Record<string, unknown>;
4
+ /** Merges the `.head()` of every route level, root first: a deeper level takes over each singleton tag it writes. */
5
+ export declare class RouteHead {
6
+ #private;
7
+ static merge(levels: ResolveHeadResult[]): ResolveHeadResult;
8
+ /** What makes two tags the same tag; `null` for one that never replaces another. */
9
+ static keyOf(tag: string, props: TagProps): string | null;
10
+ /** `merge` for plain JSX heads, root first. */
11
+ static mergeNodes(nodes: ReactNode[]): ReactNode;
12
+ }
13
+ export {};
@@ -2,6 +2,7 @@ export * from "./LayoutDefinition.d.ts";
2
2
  export * from "./PageDefinition.d.ts";
3
3
  export * from "./RootLayoutDefinition.d.ts";
4
4
  export * from "./RouteDefinition.d.ts";
5
+ export * from "./RouteHead.d.ts";
5
6
  export * from "./resolveRouteModule.d.ts";
6
7
  export * from "./routeArgs.d.ts";
7
8
  export * from "./routeBuilders.d.ts";
@@ -1,5 +1,11 @@
1
1
  export interface RouteOptions {
2
2
  scrollToTop?: boolean;
3
+ /**
4
+ * Writes the URL and the store's path and search params without asking the server for the page, as for `?peek=`;
5
+ * honoured only when the path stays the same. A server component reading `.search()` sees it at the next full
6
+ * navigation.
7
+ */
8
+ shallow?: boolean;
3
9
  }
4
10
  export interface RouteManifest {
5
11
  routes: string[];
@@ -7,6 +7,8 @@ declare global {
7
7
  var __AKAN_RSC_NAVIGATE__: ((href: string, options?: {
8
8
  replace?: boolean;
9
9
  scrollToTop?: boolean;
10
+ shallow?: boolean;
11
+ pop?: boolean;
10
12
  }) => Promise<void>) | undefined;
11
13
  var __AKAN_DEV_SYNC_NAVIGATION__: ((href: string, kind: "push" | "replace" | "back" | "pop") => void) | undefined;
12
14
  var __AKAN_DEV_SYNC_NAVIGATION_APPLYING__: boolean | undefined;
@@ -18,6 +20,7 @@ export declare const isRscNavigationFromCache: () => boolean;
18
20
  export declare const navigateRsc: (href: string, options?: {
19
21
  replace?: boolean;
20
22
  scrollToTop?: boolean;
23
+ shallow?: boolean;
21
24
  }) => Promise<void> | undefined;
22
25
  export declare const refreshRsc: () => Promise<void> | undefined;
23
26
  export declare const useRscNavigation: () => {
@@ -26,5 +29,6 @@ export declare const useRscNavigation: () => {
26
29
  navigate: (href: string, options?: {
27
30
  replace?: boolean;
28
31
  scrollToTop?: boolean;
32
+ shallow?: boolean;
29
33
  }) => Promise<void> | undefined;
30
34
  };
@@ -0,0 +1,18 @@
1
+ import type { RouteViewport } from "./csrTypes.d.ts";
2
+ export interface ThemeColorTag {
3
+ content: string;
4
+ media?: string;
5
+ }
6
+ /** Turns a root layout's `.viewport()` into the `viewport` and `theme-color` meta tags every document shell writes. */
7
+ export declare class ViewportMeta {
8
+ #private;
9
+ static content(viewport: RouteViewport | undefined, { native }?: {
10
+ native?: boolean;
11
+ }): string;
12
+ /** The request's theme when it is known; otherwise `light`/`dark` follow the OS until the client names the theme. */
13
+ static themeColors(viewport: RouteViewport | undefined, theme?: string): ThemeColorTag[];
14
+ static applyContent(viewport: RouteViewport | undefined, { native }?: {
15
+ native?: boolean;
16
+ }): void;
17
+ static applyThemeColor(viewport: RouteViewport | undefined, theme?: string): void;
18
+ }
@@ -0,0 +1,4 @@
1
+ /** Where an SSR document links its root layout's `.manifest()`; the server answers it from that layout. */
2
+ export declare const webManifestHref: (basePath?: string | null) => string;
3
+ /** A `.manifest()` object in the browser's own snake_case keys, at every depth. */
4
+ export declare const toManifestJson: (value: unknown) => unknown;
@@ -0,0 +1,6 @@
1
+ export declare class PipelineNames {
2
+ static isReservedEnv(name: string): boolean;
3
+ static idError(id: string): string | null;
4
+ static secretNameError(name: string): string | null;
5
+ static envNameError(name: string): string | null;
6
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The one glob dialect of `when`, shared by the planner (`branch`, `app`) and the executor (`changed`) so both decide
3
+ * alike. `*` is any run without `/`, `**` any run including `/` (and with its `/` also no segment at all), `?` one
4
+ * character but `/`; everything else is literal and case-sensitive. A leading `!` excludes.
5
+ */
6
+ export declare class PipelinePattern {
7
+ #private;
8
+ /** True when some positive pattern matches (or none is given) and no `!` pattern does. */
9
+ static matches(pattern: string | readonly string[], value: string): boolean;
10
+ /** `changed`: true when at least one of `values` matches. */
11
+ static matchesAny(pattern: string | readonly string[], values: readonly string[]): boolean;
12
+ /** Braces and character classes are refused rather than given a meaning, so no implementation can read them apart. */
13
+ static validate(pattern: string | readonly string[]): string | null;
14
+ }
@@ -0,0 +1,9 @@
1
+ import { type PipelinePlan, type PipelinePlanResult } from "./pipelinePlan.d.ts";
2
+ /** Strict: an unknown key, kind, action or version is refused, never ignored. Structure only, no executor policy. */
3
+ export declare class PipelinePlanSchema {
4
+ #private;
5
+ /** What an executor reads off `--out`: the size is checked before the text is parsed. */
6
+ static parseText(text: string): PipelinePlanResult;
7
+ static parseResult(value: unknown): PipelinePlanResult;
8
+ static parse(value: unknown): PipelinePlan;
9
+ }
@@ -0,0 +1,10 @@
1
+ export interface BackoffPolicy {
2
+ /** The first wait in ms; each attempt in a row doubles it. */
3
+ min?: number;
4
+ max?: number;
5
+ /** The share of each wait drawn at random, 0 to 1, so callers one outage dropped together come back apart. */
6
+ jitter?: number;
7
+ }
8
+ export declare class Backoff {
9
+ static delay(attempt: number, { min, max, jitter }?: BackoffPolicy): number;
10
+ }
@@ -1,5 +1,6 @@
1
1
  export { applyMixins, getAllPropertyDescriptors } from "./applyMixins.d.ts";
2
2
  export { authTokenKey, cookieHeaderHasAuthToken, isAuthTokenKey, isOwnAuthToken, legacyAuthTokenKey, readAuthToken, } from "./authToken.d.ts";
3
+ export { Backoff, type BackoffPolicy } from "./backoff.d.ts";
3
4
  export { CodeAgentClient, type CodeAgentTransport } from "./CodeAgentClient.d.ts";
4
5
  export { CodeTranscript, type CodeTranscriptPart } from "./CodeTranscript.d.ts";
5
6
  export { capitalize, lowerlize } from "./capitalize.d.ts";
@@ -28,7 +29,11 @@ export { type Align, MarkdownTable, type TableBlock } from "./markdownTable.d.ts
28
29
  export { isMcpDescribableArg, type McpExposureEndpoint, type McpExposureOption, mcpBaseVerbOf, mcpHintsOf, mcpRefusalOf, } from "./mcpExposure.d.ts";
29
30
  export { deepObjectify, objectify, plainFieldsOf } from "./objectify.d.ts";
30
31
  export { pathGet, pathGetLoose, pathSet, toPathSegments } from "./objectPath.d.ts";
32
+ export { PipelineNames } from "./PipelineNames.d.ts";
33
+ export { PipelinePattern } from "./PipelinePattern.d.ts";
34
+ export { PipelinePlanSchema } from "./PipelinePlanSchema.d.ts";
31
35
  export { formatPhone, isPhoneNumber } from "./phone.d.ts";
36
+ export { type PipelineActionName, type PipelineDiagnostic, type PipelineMilestone, type PipelineOtaPlatform, type PipelinePlan, type PipelinePlanActionStep, type PipelinePlanAppActionStep, type PipelinePlanContext, type PipelinePlanOtaStep, type PipelinePlanPhase, type PipelinePlanPost, type PipelinePlanResult, type PipelinePlanRetry, type PipelinePlanShellStep, type PipelinePlanSlot, type PipelinePlanSource, type PipelinePlanStage, type PipelinePlanStep, type PipelineSkip, type PipelineTrigger, pipelineActionNames, pipelineActions, pipelineEnvNamePattern, pipelineIdPattern, pipelineMilestones, pipelineOtaPlatforms, pipelinePlanLimits, pipelinePlanSlots, pipelinePlanVersion, pipelineReservedEnv, pipelineRuntimeEnv, pipelineSecretNamePattern, pipelineTriggers, } from "./pipelinePlan.d.ts";
32
37
  export { type RouteLayer, RouteLayering } from "./RouteLayering.d.ts";
33
38
  export { randomPick, randomPicks } from "./randomPick.d.ts";
34
39
  export { hostFromRequest, isJsonContentType, originFromRequest } from "./requestOrigin.d.ts";