@fuzdev/fuz_app 0.51.0 → 0.52.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 (320) hide show
  1. package/dist/actions/CLAUDE.md +14 -1
  2. package/dist/actions/action_bridge.d.ts +3 -1
  3. package/dist/actions/action_bridge.d.ts.map +1 -1
  4. package/dist/actions/action_bridge.js +3 -1
  5. package/dist/actions/action_codegen.d.ts +18 -8
  6. package/dist/actions/action_codegen.d.ts.map +1 -1
  7. package/dist/actions/action_codegen.js +18 -8
  8. package/dist/actions/action_event.d.ts +44 -1
  9. package/dist/actions/action_event.d.ts.map +1 -1
  10. package/dist/actions/action_event.js +44 -1
  11. package/dist/actions/action_event_helpers.d.ts +26 -0
  12. package/dist/actions/action_event_helpers.d.ts.map +1 -1
  13. package/dist/actions/action_event_helpers.js +26 -1
  14. package/dist/actions/action_peer.d.ts +17 -0
  15. package/dist/actions/action_peer.d.ts.map +1 -1
  16. package/dist/actions/action_peer.js +8 -0
  17. package/dist/actions/action_registry.d.ts +1 -1
  18. package/dist/actions/action_registry.js +1 -1
  19. package/dist/actions/action_rpc.d.ts +4 -0
  20. package/dist/actions/action_rpc.d.ts.map +1 -1
  21. package/dist/actions/action_rpc.js +4 -0
  22. package/dist/actions/action_spec.d.ts +22 -2
  23. package/dist/actions/action_spec.d.ts.map +1 -1
  24. package/dist/actions/action_spec.js +16 -2
  25. package/dist/actions/register_action_ws.d.ts +3 -0
  26. package/dist/actions/register_action_ws.d.ts.map +1 -1
  27. package/dist/actions/register_action_ws.js +3 -0
  28. package/dist/actions/register_ws_endpoint.d.ts +3 -0
  29. package/dist/actions/register_ws_endpoint.d.ts.map +1 -1
  30. package/dist/actions/register_ws_endpoint.js +3 -0
  31. package/dist/actions/request_tracker.svelte.d.ts +14 -1
  32. package/dist/actions/request_tracker.svelte.d.ts.map +1 -1
  33. package/dist/actions/request_tracker.svelte.js +14 -1
  34. package/dist/actions/socket.svelte.d.ts +35 -15
  35. package/dist/actions/socket.svelte.d.ts.map +1 -1
  36. package/dist/actions/socket.svelte.js +33 -13
  37. package/dist/actions/transports.d.ts +12 -3
  38. package/dist/actions/transports.d.ts.map +1 -1
  39. package/dist/actions/transports.js +16 -7
  40. package/dist/actions/transports_http.d.ts +7 -0
  41. package/dist/actions/transports_http.d.ts.map +1 -1
  42. package/dist/actions/transports_http.js +7 -0
  43. package/dist/actions/transports_ws.d.ts +13 -0
  44. package/dist/actions/transports_ws.d.ts.map +1 -1
  45. package/dist/actions/transports_ws.js +13 -0
  46. package/dist/actions/transports_ws_auth_guard.d.ts +6 -2
  47. package/dist/actions/transports_ws_auth_guard.d.ts.map +1 -1
  48. package/dist/actions/transports_ws_auth_guard.js +6 -2
  49. package/dist/actions/transports_ws_backend.d.ts +14 -1
  50. package/dist/actions/transports_ws_backend.d.ts.map +1 -1
  51. package/dist/actions/transports_ws_backend.js +14 -1
  52. package/dist/auth/CLAUDE.md +40 -4
  53. package/dist/auth/account_queries.d.ts +10 -0
  54. package/dist/auth/account_queries.d.ts.map +1 -1
  55. package/dist/auth/account_queries.js +10 -0
  56. package/dist/auth/admin_actions.d.ts +1 -0
  57. package/dist/auth/admin_actions.d.ts.map +1 -1
  58. package/dist/auth/admin_actions.js +1 -0
  59. package/dist/auth/api_token_queries.d.ts +7 -0
  60. package/dist/auth/api_token_queries.d.ts.map +1 -1
  61. package/dist/auth/api_token_queries.js +7 -0
  62. package/dist/auth/app_settings_queries.d.ts +4 -0
  63. package/dist/auth/app_settings_queries.d.ts.map +1 -1
  64. package/dist/auth/app_settings_queries.js +4 -0
  65. package/dist/auth/audit_log_queries.d.ts +6 -0
  66. package/dist/auth/audit_log_queries.d.ts.map +1 -1
  67. package/dist/auth/audit_log_queries.js +6 -0
  68. package/dist/auth/audit_log_schema.d.ts +2 -0
  69. package/dist/auth/audit_log_schema.d.ts.map +1 -1
  70. package/dist/auth/audit_log_schema.js +134 -55
  71. package/dist/auth/bearer_auth.d.ts +2 -0
  72. package/dist/auth/bearer_auth.d.ts.map +1 -1
  73. package/dist/auth/bearer_auth.js +2 -0
  74. package/dist/auth/bootstrap_account.d.ts +3 -0
  75. package/dist/auth/bootstrap_account.d.ts.map +1 -1
  76. package/dist/auth/bootstrap_account.js +3 -0
  77. package/dist/auth/cleanup.d.ts +6 -0
  78. package/dist/auth/cleanup.d.ts.map +1 -1
  79. package/dist/auth/cleanup.js +6 -0
  80. package/dist/auth/daemon_token_middleware.d.ts +4 -0
  81. package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
  82. package/dist/auth/daemon_token_middleware.js +4 -0
  83. package/dist/auth/invite_queries.d.ts +4 -0
  84. package/dist/auth/invite_queries.d.ts.map +1 -1
  85. package/dist/auth/invite_queries.js +4 -0
  86. package/dist/auth/permit_offer_action_specs.d.ts +5 -0
  87. package/dist/auth/permit_offer_action_specs.d.ts.map +1 -1
  88. package/dist/auth/permit_offer_action_specs.js +10 -0
  89. package/dist/auth/permit_offer_queries.d.ts +19 -0
  90. package/dist/auth/permit_offer_queries.d.ts.map +1 -1
  91. package/dist/auth/permit_offer_queries.js +19 -0
  92. package/dist/auth/permit_queries.d.ts +8 -0
  93. package/dist/auth/permit_queries.d.ts.map +1 -1
  94. package/dist/auth/permit_queries.js +8 -0
  95. package/dist/auth/request_context.d.ts +1 -0
  96. package/dist/auth/request_context.d.ts.map +1 -1
  97. package/dist/auth/request_context.js +1 -0
  98. package/dist/auth/role_schema.d.ts +2 -0
  99. package/dist/auth/role_schema.d.ts.map +1 -1
  100. package/dist/auth/role_schema.js +2 -0
  101. package/dist/auth/self_service_role_actions.d.ts +1 -0
  102. package/dist/auth/self_service_role_actions.d.ts.map +1 -1
  103. package/dist/auth/self_service_role_actions.js +1 -0
  104. package/dist/auth/session_lifecycle.d.ts +3 -0
  105. package/dist/auth/session_lifecycle.d.ts.map +1 -1
  106. package/dist/auth/session_lifecycle.js +3 -0
  107. package/dist/auth/session_middleware.d.ts +5 -0
  108. package/dist/auth/session_middleware.d.ts.map +1 -1
  109. package/dist/auth/session_middleware.js +5 -0
  110. package/dist/auth/session_queries.d.ts +9 -0
  111. package/dist/auth/session_queries.d.ts.map +1 -1
  112. package/dist/auth/session_queries.js +9 -0
  113. package/dist/cli/config.d.ts +2 -0
  114. package/dist/cli/config.d.ts.map +1 -1
  115. package/dist/cli/config.js +2 -0
  116. package/dist/cli/daemon.d.ts +6 -1
  117. package/dist/cli/daemon.d.ts.map +1 -1
  118. package/dist/cli/daemon.js +6 -1
  119. package/dist/db/assert_row.d.ts +2 -1
  120. package/dist/db/assert_row.d.ts.map +1 -1
  121. package/dist/db/assert_row.js +2 -1
  122. package/dist/db/create_db.d.ts +3 -0
  123. package/dist/db/create_db.d.ts.map +1 -1
  124. package/dist/db/create_db.js +3 -0
  125. package/dist/db/db.d.ts +19 -4
  126. package/dist/db/db.d.ts.map +1 -1
  127. package/dist/db/db.js +18 -3
  128. package/dist/db/db_pg.d.ts +2 -1
  129. package/dist/db/db_pg.d.ts.map +1 -1
  130. package/dist/db/db_pg.js +5 -3
  131. package/dist/db/db_pglite.d.ts +3 -2
  132. package/dist/db/db_pglite.d.ts.map +1 -1
  133. package/dist/db/db_pglite.js +3 -2
  134. package/dist/db/migrate.d.ts +8 -4
  135. package/dist/db/migrate.d.ts.map +1 -1
  136. package/dist/db/migrate.js +6 -2
  137. package/dist/db/sql_identifier.d.ts +2 -1
  138. package/dist/db/sql_identifier.d.ts.map +1 -1
  139. package/dist/db/sql_identifier.js +2 -1
  140. package/dist/db/status.d.ts +4 -1
  141. package/dist/db/status.d.ts.map +1 -1
  142. package/dist/db/status.js +5 -2
  143. package/dist/dev/setup.d.ts +18 -2
  144. package/dist/dev/setup.d.ts.map +1 -1
  145. package/dist/dev/setup.js +18 -2
  146. package/dist/env/dotenv.d.ts +2 -1
  147. package/dist/env/dotenv.d.ts.map +1 -1
  148. package/dist/env/dotenv.js +2 -1
  149. package/dist/env/load.d.ts +1 -1
  150. package/dist/env/load.js +1 -1
  151. package/dist/env/resolve.d.ts +1 -1
  152. package/dist/env/resolve.js +1 -1
  153. package/dist/env/update_env_variable.d.ts +2 -0
  154. package/dist/env/update_env_variable.d.ts.map +1 -1
  155. package/dist/env/update_env_variable.js +2 -0
  156. package/dist/http/pending_effects.d.ts +4 -0
  157. package/dist/http/pending_effects.d.ts.map +1 -1
  158. package/dist/http/pending_effects.js +4 -0
  159. package/dist/http/proxy.d.ts +3 -0
  160. package/dist/http/proxy.d.ts.map +1 -1
  161. package/dist/http/proxy.js +3 -0
  162. package/dist/http/route_spec.d.ts +1 -0
  163. package/dist/http/route_spec.d.ts.map +1 -1
  164. package/dist/http/route_spec.js +7 -0
  165. package/dist/rate_limiter.d.ts +14 -1
  166. package/dist/rate_limiter.d.ts.map +1 -1
  167. package/dist/rate_limiter.js +14 -1
  168. package/dist/realtime/sse.d.ts +7 -1
  169. package/dist/realtime/sse.d.ts.map +1 -1
  170. package/dist/realtime/sse.js +3 -1
  171. package/dist/realtime/sse_auth_guard.d.ts +21 -21
  172. package/dist/realtime/sse_auth_guard.d.ts.map +1 -1
  173. package/dist/realtime/sse_auth_guard.js +24 -24
  174. package/dist/realtime/subscriber_registry.d.ts +4 -2
  175. package/dist/realtime/subscriber_registry.d.ts.map +1 -1
  176. package/dist/realtime/subscriber_registry.js +4 -2
  177. package/dist/runtime/fs.d.ts +5 -0
  178. package/dist/runtime/fs.d.ts.map +1 -1
  179. package/dist/runtime/fs.js +5 -0
  180. package/dist/runtime/mock.d.ts +6 -0
  181. package/dist/runtime/mock.d.ts.map +1 -1
  182. package/dist/runtime/mock.js +6 -0
  183. package/dist/server/app_backend.d.ts +1 -0
  184. package/dist/server/app_backend.d.ts.map +1 -1
  185. package/dist/server/app_backend.js +1 -0
  186. package/dist/server/app_server.d.ts +4 -0
  187. package/dist/server/app_server.d.ts.map +1 -1
  188. package/dist/server/app_server.js +4 -0
  189. package/dist/server/validate_nginx.d.ts +3 -0
  190. package/dist/server/validate_nginx.d.ts.map +1 -1
  191. package/dist/testing/admin_integration.d.ts +5 -0
  192. package/dist/testing/admin_integration.d.ts.map +1 -1
  193. package/dist/testing/admin_integration.js +5 -0
  194. package/dist/testing/adversarial_headers.d.ts +5 -3
  195. package/dist/testing/adversarial_headers.d.ts.map +1 -1
  196. package/dist/testing/adversarial_headers.js +5 -3
  197. package/dist/testing/adversarial_input.d.ts +4 -0
  198. package/dist/testing/adversarial_input.d.ts.map +1 -1
  199. package/dist/testing/adversarial_input.js +4 -0
  200. package/dist/testing/app_server.d.ts +3 -0
  201. package/dist/testing/app_server.d.ts.map +1 -1
  202. package/dist/testing/app_server.js +11 -0
  203. package/dist/testing/assertions.d.ts +23 -7
  204. package/dist/testing/assertions.d.ts.map +1 -1
  205. package/dist/testing/assertions.js +23 -7
  206. package/dist/testing/audit_completeness.d.ts +4 -0
  207. package/dist/testing/audit_completeness.d.ts.map +1 -1
  208. package/dist/testing/audit_completeness.js +4 -0
  209. package/dist/testing/auth_apps.d.ts +3 -0
  210. package/dist/testing/auth_apps.d.ts.map +1 -1
  211. package/dist/testing/auth_apps.js +3 -0
  212. package/dist/testing/db.d.ts +9 -1
  213. package/dist/testing/db.d.ts.map +1 -1
  214. package/dist/testing/db.js +9 -1
  215. package/dist/testing/error_coverage.d.ts +9 -0
  216. package/dist/testing/error_coverage.d.ts.map +1 -1
  217. package/dist/testing/error_coverage.js +9 -0
  218. package/dist/testing/integration.d.ts +4 -0
  219. package/dist/testing/integration.d.ts.map +1 -1
  220. package/dist/testing/integration.js +4 -0
  221. package/dist/testing/integration_helpers.d.ts +10 -4
  222. package/dist/testing/integration_helpers.d.ts.map +1 -1
  223. package/dist/testing/integration_helpers.js +10 -4
  224. package/dist/testing/middleware.d.ts +5 -0
  225. package/dist/testing/middleware.d.ts.map +1 -1
  226. package/dist/testing/middleware.js +5 -0
  227. package/dist/testing/rate_limiting.d.ts +3 -0
  228. package/dist/testing/rate_limiting.d.ts.map +1 -1
  229. package/dist/testing/rate_limiting.js +3 -0
  230. package/dist/testing/rpc_helpers.d.ts +21 -8
  231. package/dist/testing/rpc_helpers.d.ts.map +1 -1
  232. package/dist/testing/rpc_helpers.js +21 -8
  233. package/dist/testing/schema_generators.d.ts +7 -2
  234. package/dist/testing/schema_generators.d.ts.map +1 -1
  235. package/dist/testing/schema_generators.js +7 -2
  236. package/dist/testing/sse_round_trip.d.ts +3 -0
  237. package/dist/testing/sse_round_trip.d.ts.map +1 -1
  238. package/dist/testing/sse_round_trip.js +3 -0
  239. package/dist/testing/stubs.d.ts +7 -0
  240. package/dist/testing/stubs.d.ts.map +1 -1
  241. package/dist/testing/stubs.js +7 -0
  242. package/dist/testing/surface_invariants.d.ts +14 -0
  243. package/dist/testing/surface_invariants.d.ts.map +1 -1
  244. package/dist/testing/surface_invariants.js +14 -0
  245. package/dist/testing/ws_round_trip.d.ts +13 -1
  246. package/dist/testing/ws_round_trip.d.ts.map +1 -1
  247. package/dist/ui/AccountSessions.svelte +9 -0
  248. package/dist/ui/AccountSessions.svelte.d.ts.map +1 -1
  249. package/dist/ui/AdminAccounts.svelte +10 -0
  250. package/dist/ui/AdminAccounts.svelte.d.ts.map +1 -1
  251. package/dist/ui/AdminAuditLog.svelte +10 -0
  252. package/dist/ui/AdminAuditLog.svelte.d.ts.map +1 -1
  253. package/dist/ui/AdminInvites.svelte +9 -0
  254. package/dist/ui/AdminInvites.svelte.d.ts.map +1 -1
  255. package/dist/ui/AdminOverview.svelte +10 -0
  256. package/dist/ui/AdminOverview.svelte.d.ts.map +1 -1
  257. package/dist/ui/AdminPermitHistory.svelte +9 -0
  258. package/dist/ui/AdminPermitHistory.svelte.d.ts.map +1 -1
  259. package/dist/ui/AdminSessions.svelte +10 -0
  260. package/dist/ui/AdminSessions.svelte.d.ts.map +1 -1
  261. package/dist/ui/AdminSettings.svelte +9 -0
  262. package/dist/ui/AdminSettings.svelte.d.ts.map +1 -1
  263. package/dist/ui/AdminSurface.svelte +9 -0
  264. package/dist/ui/AdminSurface.svelte.d.ts.map +1 -1
  265. package/dist/ui/AppShell.svelte +24 -0
  266. package/dist/ui/AppShell.svelte.d.ts +23 -0
  267. package/dist/ui/AppShell.svelte.d.ts.map +1 -1
  268. package/dist/ui/BootstrapForm.svelte +17 -0
  269. package/dist/ui/BootstrapForm.svelte.d.ts +4 -0
  270. package/dist/ui/BootstrapForm.svelte.d.ts.map +1 -1
  271. package/dist/ui/ColumnLayout.svelte +11 -0
  272. package/dist/ui/ColumnLayout.svelte.d.ts +10 -0
  273. package/dist/ui/ColumnLayout.svelte.d.ts.map +1 -1
  274. package/dist/ui/Datatable.svelte +18 -0
  275. package/dist/ui/Datatable.svelte.d.ts +17 -0
  276. package/dist/ui/Datatable.svelte.d.ts.map +1 -1
  277. package/dist/ui/LoginForm.svelte +18 -0
  278. package/dist/ui/LoginForm.svelte.d.ts +9 -0
  279. package/dist/ui/LoginForm.svelte.d.ts.map +1 -1
  280. package/dist/ui/LogoutButton.svelte +9 -0
  281. package/dist/ui/LogoutButton.svelte.d.ts +8 -0
  282. package/dist/ui/LogoutButton.svelte.d.ts.map +1 -1
  283. package/dist/ui/MenuLink.svelte +10 -0
  284. package/dist/ui/MenuLink.svelte.d.ts +9 -0
  285. package/dist/ui/MenuLink.svelte.d.ts.map +1 -1
  286. package/dist/ui/OpenSignupToggle.svelte +9 -0
  287. package/dist/ui/OpenSignupToggle.svelte.d.ts.map +1 -1
  288. package/dist/ui/SignupForm.svelte +16 -0
  289. package/dist/ui/SignupForm.svelte.d.ts +4 -0
  290. package/dist/ui/SignupForm.svelte.d.ts.map +1 -1
  291. package/dist/ui/SurfaceExplorer.svelte +9 -0
  292. package/dist/ui/SurfaceExplorer.svelte.d.ts.map +1 -1
  293. package/dist/ui/audit_log_state.svelte.d.ts +6 -1
  294. package/dist/ui/audit_log_state.svelte.d.ts.map +1 -1
  295. package/dist/ui/audit_log_state.svelte.js +6 -1
  296. package/dist/ui/auth_state.svelte.d.ts +16 -4
  297. package/dist/ui/auth_state.svelte.d.ts.map +1 -1
  298. package/dist/ui/auth_state.svelte.js +16 -4
  299. package/dist/ui/form_state.svelte.d.ts +9 -0
  300. package/dist/ui/form_state.svelte.d.ts.map +1 -1
  301. package/dist/ui/form_state.svelte.js +9 -0
  302. package/dist/ui/loadable.svelte.d.ts +6 -1
  303. package/dist/ui/loadable.svelte.d.ts.map +1 -1
  304. package/dist/ui/loadable.svelte.js +6 -1
  305. package/dist/ui/permit_offers_state.svelte.d.ts +2 -0
  306. package/dist/ui/permit_offers_state.svelte.d.ts.map +1 -1
  307. package/dist/ui/permit_offers_state.svelte.js +2 -0
  308. package/dist/ui/popover.svelte.d.ts +17 -4
  309. package/dist/ui/popover.svelte.d.ts.map +1 -1
  310. package/dist/ui/popover.svelte.js +17 -4
  311. package/dist/ui/position_helpers.d.ts +1 -0
  312. package/dist/ui/position_helpers.d.ts.map +1 -1
  313. package/dist/ui/position_helpers.js +1 -0
  314. package/dist/ui/sidebar_state.svelte.d.ts +22 -9
  315. package/dist/ui/sidebar_state.svelte.d.ts.map +1 -1
  316. package/dist/ui/sidebar_state.svelte.js +17 -2
  317. package/dist/ui/table_state.svelte.d.ts +14 -0
  318. package/dist/ui/table_state.svelte.d.ts.map +1 -1
  319. package/dist/ui/table_state.svelte.js +14 -0
  320. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"action_rpc.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/action_rpc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAoB,KAAK,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAExE,OAAO,EAAgC,KAAK,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAE9F,OAAO,KAAK,EAAC,EAAE,EAAC,MA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;;;;;;;OAQG;IACH,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD;;;;OAIG;IACH,MAAM,EAAE,WAAW,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,MAAM,aAAa,CAAC,MAAM,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,CACxD,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,aAAa,KACd,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,yBAAyB,CAAC;IAChC,OAAO,EAAE,aAAa,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,SAAS,yBAAyB,EACjE,MAAM,KAAK,EACX,SAAS,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KACvE,SAGD,CAAC;AAEH,yCAAyC;AACzC,MAAM,WAAW,wBAAwB;IACxC,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1B,2CAA2C;IAC3C,GAAG,EAAE,MAAM,CAAC;CACZ;AA4DD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,mBAAmB,GAAI,SAAS,wBAAwB,KAAG,KAAK,CAAC,SAAS,CAsQtF,CAAC"}
@@ -118,6 +118,10 @@ const check_action_auth = (auth, request_context, credential_type) => {
118
118
  *
119
119
  * @param options - endpoint path, actions, and logger
120
120
  * @returns route specs (GET + POST) ready for `apply_route_specs`
121
+ * @throws Error if two actions share the same `spec.method` (registration-time
122
+ * duplicate detection); also throws if any action's `spec.input` is
123
+ * `z.null()` (JSON-RPC 2.0 §4.2 forbids `params: null` on the wire — use
124
+ * `z.void()` for parameterless methods).
121
125
  */
122
126
  export const create_rpc_endpoint = (options) => {
123
127
  const { path: endpoint_path, actions, log } = options;
@@ -5,6 +5,9 @@
5
5
  * auth, side effects, and input/output schemas. Bridge functions in
6
6
  * `actions/action_bridge.ts` derive `RouteSpec` and `EventSpec` from them.
7
7
  *
8
+ * @see `actions/action_rpc.ts` for the JSON-RPC dispatcher
9
+ * @see `actions/register_action_ws.ts` for the WebSocket dispatcher
10
+ *
8
11
  * TODO @action-system-review The action system (action_spec, action_registry,
9
12
  * action_codegen, action_bridge) will evolve significantly as RPC patterns settle.
10
13
  * Current state: bridge is stable, registry and codegen are partially stub API.
@@ -59,6 +62,16 @@ export declare const ActionSpec: z.ZodObject<{
59
62
  * consumer-side concern.
60
63
  */
61
64
  streams: z.ZodOptional<z.ZodString>;
65
+ /**
66
+ * Error reason codes this action may surface via `error.data.reason` on
67
+ * failure. Declarative metadata mirroring the `streams` precedent —
68
+ * codegen, UI form-state matching, and docs read it off the spec instead
69
+ * of scanning handler implementations. Reuses the same `as const` string
70
+ * constants the handler throws (e.g. `ERROR_OFFER_*`) so call sites can
71
+ * import either side. Optional — actions that surface only standard
72
+ * transport errors leave it unset.
73
+ */
74
+ error_reasons: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
62
75
  }, z.core.$strict>;
63
76
  export type ActionSpec = z.infer<typeof ActionSpec>;
64
77
  export declare const RequestResponseActionSpec: z.ZodObject<{
@@ -73,6 +86,7 @@ export declare const RequestResponseActionSpec: z.ZodObject<{
73
86
  output: z.ZodCustom<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
74
87
  description: z.ZodString;
75
88
  streams: z.ZodOptional<z.ZodString>;
89
+ error_reasons: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
76
90
  kind: z.ZodDefault<z.ZodLiteral<"request_response">>;
77
91
  auth: z.ZodUnion<readonly [z.ZodLiteral<"public">, z.ZodLiteral<"authenticated">, z.ZodLiteral<"keeper">, z.ZodObject<{
78
92
  role: z.ZodString;
@@ -90,6 +104,7 @@ export declare const RemoteNotificationActionSpec: z.ZodObject<{
90
104
  input: z.ZodCustom<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
91
105
  description: z.ZodString;
92
106
  streams: z.ZodOptional<z.ZodString>;
107
+ error_reasons: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
93
108
  kind: z.ZodDefault<z.ZodLiteral<"remote_notification">>;
94
109
  auth: z.ZodDefault<z.ZodNull>;
95
110
  side_effects: z.ZodDefault<z.ZodLiteral<true>>;
@@ -98,8 +113,8 @@ export declare const RemoteNotificationActionSpec: z.ZodObject<{
98
113
  }, z.core.$strict>;
99
114
  export type RemoteNotificationActionSpec = z.infer<typeof RemoteNotificationActionSpec>;
100
115
  /**
101
- * Local calls can wrap synchronous or asynchronous actions,
102
- * and are the escape hatch for remote APIs that do not support SAES.
116
+ * Local calls can wrap synchronous or asynchronous actions, and are the
117
+ * escape hatch for remote APIs that do not support SAES.
103
118
  */
104
119
  export declare const LocalCallActionSpec: z.ZodObject<{
105
120
  method: z.ZodString;
@@ -114,6 +129,7 @@ export declare const LocalCallActionSpec: z.ZodObject<{
114
129
  async: z.ZodBoolean;
115
130
  description: z.ZodString;
116
131
  streams: z.ZodOptional<z.ZodString>;
132
+ error_reasons: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
117
133
  kind: z.ZodDefault<z.ZodLiteral<"local_call">>;
118
134
  auth: z.ZodDefault<z.ZodNull>;
119
135
  }, z.core.$strict>;
@@ -130,6 +146,7 @@ export declare const ActionSpecUnion: z.ZodUnion<readonly [z.ZodObject<{
130
146
  output: z.ZodCustom<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
131
147
  description: z.ZodString;
132
148
  streams: z.ZodOptional<z.ZodString>;
149
+ error_reasons: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
133
150
  kind: z.ZodDefault<z.ZodLiteral<"request_response">>;
134
151
  auth: z.ZodUnion<readonly [z.ZodLiteral<"public">, z.ZodLiteral<"authenticated">, z.ZodLiteral<"keeper">, z.ZodObject<{
135
152
  role: z.ZodString;
@@ -145,6 +162,7 @@ export declare const ActionSpecUnion: z.ZodUnion<readonly [z.ZodObject<{
145
162
  input: z.ZodCustom<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
146
163
  description: z.ZodString;
147
164
  streams: z.ZodOptional<z.ZodString>;
165
+ error_reasons: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
148
166
  kind: z.ZodDefault<z.ZodLiteral<"remote_notification">>;
149
167
  auth: z.ZodDefault<z.ZodNull>;
150
168
  side_effects: z.ZodDefault<z.ZodLiteral<true>>;
@@ -163,10 +181,12 @@ export declare const ActionSpecUnion: z.ZodUnion<readonly [z.ZodObject<{
163
181
  async: z.ZodBoolean;
164
182
  description: z.ZodString;
165
183
  streams: z.ZodOptional<z.ZodString>;
184
+ error_reasons: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
166
185
  kind: z.ZodDefault<z.ZodLiteral<"local_call">>;
167
186
  auth: z.ZodDefault<z.ZodNull>;
168
187
  }, z.core.$strict>]>;
169
188
  export type ActionSpecUnion = z.infer<typeof ActionSpecUnion>;
189
+ /** Structural type guard for any `ActionSpecUnion` variant — checks `kind` is one of the three known values. */
170
190
  export declare const is_action_spec: (value: unknown) => value is ActionSpecUnion;
171
191
  export declare const ActionEventPhase: z.ZodEnum<{
172
192
  send_request: "send_request";
@@ -1 +1 @@
1
- {"version":3,"file":"action_spec.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/action_spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,UAAU;;;;EAAoE,CAAC;AAC5F,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,eAAe;;;;EAA0C,CAAC;AACvE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,UAAU;;oBAKrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAC7C,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;IAUtB;;;;;;OAMG;;kBAEF,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;kBAIpC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;kBAMvC,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAExF;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;kBAG9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CA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AAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;kBAIpC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;kBAMvC,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAExF;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;kBAG9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAI1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,gHAAgH;AAChH,eAAO,MAAM,cAAc,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,eAKoB,CAAC;AAE9E,eAAO,MAAM,gBAAgB;;;;;;;;;;EAU3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -5,6 +5,9 @@
5
5
  * auth, side effects, and input/output schemas. Bridge functions in
6
6
  * `actions/action_bridge.ts` derive `RouteSpec` and `EventSpec` from them.
7
7
  *
8
+ * @see `actions/action_rpc.ts` for the JSON-RPC dispatcher
9
+ * @see `actions/register_action_ws.ts` for the WebSocket dispatcher
10
+ *
8
11
  * TODO @action-system-review The action system (action_spec, action_registry,
9
12
  * action_codegen, action_bridge) will evolve significantly as RPC patterns settle.
10
13
  * Current state: bridge is stable, registry and codegen are partially stub API.
@@ -40,6 +43,16 @@ export const ActionSpec = z.strictObject({
40
43
  * consumer-side concern.
41
44
  */
42
45
  streams: z.string().optional(),
46
+ /**
47
+ * Error reason codes this action may surface via `error.data.reason` on
48
+ * failure. Declarative metadata mirroring the `streams` precedent —
49
+ * codegen, UI form-state matching, and docs read it off the spec instead
50
+ * of scanning handler implementations. Reuses the same `as const` string
51
+ * constants the handler throws (e.g. `ERROR_OFFER_*`) so call sites can
52
+ * import either side. Optional — actions that surface only standard
53
+ * transport errors leave it unset.
54
+ */
55
+ error_reasons: z.array(z.string()).readonly().optional(),
43
56
  });
44
57
  export const RequestResponseActionSpec = ActionSpec.extend({
45
58
  kind: z.literal('request_response').default('request_response'),
@@ -54,8 +67,8 @@ export const RemoteNotificationActionSpec = ActionSpec.extend({
54
67
  async: z.literal(true).default(true),
55
68
  });
56
69
  /**
57
- * Local calls can wrap synchronous or asynchronous actions,
58
- * and are the escape hatch for remote APIs that do not support SAES.
70
+ * Local calls can wrap synchronous or asynchronous actions, and are the
71
+ * escape hatch for remote APIs that do not support SAES.
59
72
  */
60
73
  export const LocalCallActionSpec = ActionSpec.extend({
61
74
  kind: z.literal('local_call').default('local_call'),
@@ -66,6 +79,7 @@ export const ActionSpecUnion = z.union([
66
79
  RemoteNotificationActionSpec,
67
80
  LocalCallActionSpec,
68
81
  ]);
82
+ /** Structural type guard for any `ActionSpecUnion` variant — checks `kind` is one of the three known values. */
69
83
  export const is_action_spec = (value) => value !== null &&
70
84
  typeof value === 'object' &&
71
85
  'method' in value &&
@@ -163,6 +163,9 @@ export interface RegisterActionWsResult {
163
163
  *
164
164
  * @returns the transport (supplied or freshly created) — retain it to wire
165
165
  * `create_ws_auth_guard` or broadcast on audit events.
166
+ * @mutates options.app - registers a `GET path` route via `upgradeWebSocket`
167
+ * @mutates options.transport - on every message, adds/removes connections
168
+ * in the transport's internal maps via `add_connection` / `remove_connection`
166
169
  */
167
170
  export declare const register_action_ws: <TCtx extends BaseHandlerContext>(options: RegisterActionWsOptions<TCtx>) => RegisterActionWsResult;
168
171
  //# sourceMappingURL=register_action_ws.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"register_action_ws.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/register_action_ws.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,KAAK,EAAC,OAAO,EAAE,IAAI,EAAC,MAAM,MAAM,CAAC;AACxC,OAAO,KAAK,EAAC,gBAAgB,EAAE,SAAS,EAAC,MAAM,SAAS,CAAC;AAEzD,OAAO,EAAS,KAAK,MAAM,IAAI,UAAU,EAAC,MAAM,yBAAyB,CAAC;AAC1E,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,wBAAwB,CAAC;AAiBjD,OAAO,EAAC,KAAK,MAAM,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAG7F,OAAO,EAAC,yBAAyB,EAAE,KAAK,kBAAkB,EAAC,MAAM,4BAA4B,CAAC;AAE9F,YAAY,EAAC,MAAM,EAAE,kBAAkB,EAAE,eAAe,EAAC,CAAC;AAE1D,0EAA0E;AAC1E,eAAO,MAAM,gCAAgC,QAAS,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IACjC,qFAAqF;IACrF,EAAE,EAAE,SAAS,CAAC;IACd,4EAA4E;IAC5E,aAAa,EAAE,IAAI,CAAC;IACpB,oDAAoD;IACpD,QAAQ,EAAE,kBAAkB,CAAC;IAC7B;;;OAGG;IACH,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,wFAAwF;IACxF,MAAM,EAAE,WAAW,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IAClC,+CAA+C;IAC/C,EAAE,EAAE,SAAS,CAAC;IACd,2CAA2C;IAC3C,aAAa,EAAE,IAAI,CAAC;IACpB,kGAAkG;IAClG,QAAQ,EAAE,kBAAkB,CAA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,CAAC;CACjB;AAED,wCAAwC;AACxC,MAAM,WAAW,uBAAuB,CAAC,IAAI,SAAS,kBAAkB;IACvE,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,GAAG,EAAE,IAAI,CAAC;IACV,iEAAiE;IACjE,gBAAgB,EAAE,gBAAgB,CAAC;IACnC;;;;;;;OAOG;IACH,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACrC;;;;;OAKG;IACH,cAAc,EAAE,CAAC,IAAI,EAAE,kBAAkB,EAAE,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/D;;;;OAIG;IACH,SAAS,CAAC,EAAE,yBAAyB,CAAC;IACtC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,sBAAsB,CAAC;IAC7C,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qDAAqD;IACrD,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE;;;;;OAKG;IACH,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpE;AAED,sCAAsC;AACtC,MAAM,WAAW,sBAAsB;IACtC,yEAAyE;IACzE,SAAS,EAAE,yBAAyB,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kBAAkB,GAAI,IAAI,SAAS,kBAAkB,EACjE,SAAS,uBAAuB,CAAC,IAAI,CAAC,KACpC,sBA8WF,CAAC"}
@@ -61,6 +61,9 @@ export const DEFAULT_SERVER_HEARTBEAT_TIMEOUT = 60_000;
61
61
  *
62
62
  * @returns the transport (supplied or freshly created) — retain it to wire
63
63
  * `create_ws_auth_guard` or broadcast on audit events.
64
+ * @mutates options.app - registers a `GET path` route via `upgradeWebSocket`
65
+ * @mutates options.transport - on every message, adds/removes connections
66
+ * in the transport's internal maps via `add_connection` / `remove_connection`
64
67
  */
65
68
  export const register_action_ws = (options) => {
66
69
  const { path, app, upgradeWebSocket, actions, extend_context, transport = new BackendWebsocketTransport(), heartbeat = true, artificial_delay = 0, log = new Logger('[ws]'), on_socket_open, on_socket_close, } = options;
@@ -41,6 +41,9 @@ export interface RegisterWsEndpointOptions<TCtx extends BaseHandlerContext> exte
41
41
  * Returns the `BackendWebsocketTransport` (supplied or freshly
42
42
  * created), same as `register_action_ws` — retain it to wire
43
43
  * `create_ws_auth_guard` on `on_audit_event` or to broadcast.
44
+ *
45
+ * @mutates options.app - applies origin/auth/role middleware via `app.use`,
46
+ * then registers the `GET path` route via the inner `register_action_ws`
44
47
  */
45
48
  export declare const register_ws_endpoint: <TCtx extends BaseHandlerContext>(options: RegisterWsEndpointOptions<TCtx>) => RegisterActionWsResult;
46
49
  //# sourceMappingURL=register_ws_endpoint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"register_ws_endpoint.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/register_ws_endpoint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAEN,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAE1D,0CAA0C;AAC1C,MAAM,WAAW,yBAAyB,CACzC,IAAI,SAAS,kBAAkB,CAC9B,SAAQ,uBAAuB,CAAC,IAAI,CAAC;IACtC;;;;OAIG;IACH,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,QAAQ,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,GAAI,IAAI,SAAS,kBAAkB,EACnE,SAAS,yBAAyB,CAAC,IAAI,CAAC,KACtC,sBAUF,CAAC"}
1
+ {"version":3,"file":"register_ws_endpoint.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/register_ws_endpoint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAEN,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAE1D,0CAA0C;AAC1C,MAAM,WAAW,yBAAyB,CACzC,IAAI,SAAS,kBAAkB,CAC9B,SAAQ,uBAAuB,CAAC,IAAI,CAAC;IACtC;;;;OAIG;IACH,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,QAAQ,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,GAAI,IAAI,SAAS,kBAAkB,EACnE,SAAS,yBAAyB,CAAC,IAAI,CAAC,KACtC,sBAUF,CAAC"}
@@ -26,6 +26,9 @@ import { register_action_ws, } from './register_action_ws.js';
26
26
  * Returns the `BackendWebsocketTransport` (supplied or freshly
27
27
  * created), same as `register_action_ws` — retain it to wire
28
28
  * `create_ws_auth_guard` on `on_audit_event` or to broadcast.
29
+ *
30
+ * @mutates options.app - applies origin/auth/role middleware via `app.use`,
31
+ * then registers the `GET path` route via the inner `register_action_ws`
29
32
  */
30
33
  export const register_ws_endpoint = (options) => {
31
34
  const { app, path, allowed_origins, required_role, log = new Logger('[ws]'), ...rest } = options;
@@ -35,18 +35,26 @@ export declare class RequestTracker {
35
35
  * Track a new request with the given id.
36
36
  * @param id - the request id
37
37
  * @returns a deferred promise that will be resolved when the response is received
38
+ * @mutates this - inserts a `RequestTrackerItem` into `pending_requests`
39
+ * and arms a timeout that auto-rejects after `request_timeout_ms`;
40
+ * clears any prior timeout for the same id
38
41
  */
39
42
  track_request(id: JsonrpcRequestId): Deferred<JsonrpcResponseOrError>;
40
43
  /**
41
44
  * Resolve a pending request with the given response data.
42
45
  * @param id - the request id
43
46
  * @param response - the response data
47
+ * @mutates this - clears the timeout, marks status `'success'`,
48
+ * resolves the deferred, and removes the entry from `pending_requests`
44
49
  */
45
50
  resolve_request(id: JsonrpcRequestId, response: JsonrpcResponseOrError): void;
46
51
  /**
47
52
  * Rejects a pending request with the given error.
48
53
  * @param id - the request id
49
54
  * @param error_message - the complete `JsonrpcErrorResponse` object
55
+ * @mutates this - clears the timeout, marks status `'failure'`,
56
+ * rejects the deferred with a `ThrownJsonrpcError`, and removes the
57
+ * entry from `pending_requests`
50
58
  */
51
59
  reject_request(id: JsonrpcRequestId, error_message: JsonrpcErrorResponse): void;
52
60
  /**
@@ -55,13 +63,18 @@ export declare class RequestTracker {
55
63
  */
56
64
  handle_message(message: any): void;
57
65
  /**
58
- * Cancel a pending request.
66
+ * Cancel a pending request without rejecting its deferred — just
67
+ * cleanup. The caller's promise stays unsettled; pair with an external
68
+ * resolution if needed.
59
69
  * @param id - the request id
70
+ * @mutates this - clears the timeout and removes the entry from `pending_requests`
60
71
  */
61
72
  cancel_request(id: JsonrpcRequestId): void;
62
73
  /**
63
74
  * Cancel all pending requests.
64
75
  * @param reason - optional reason to include in rejection
76
+ * @mutates this - clears every timeout, marks each status `'failure'`,
77
+ * rejects each deferred with `internal_error`, and empties `pending_requests`
65
78
  */
66
79
  cancel_all_requests(reason?: string): void;
67
80
  }
@@ -1 +1 @@
1
- {"version":3,"file":"request_tracker.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/request_tracker.svelte.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAkB,K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AAE,kBAAkB,CAAC,CAAmB;IAC7F,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;gBAExB,kBAAkB,SAAU;IAIxC;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,EAAE,gBAAgB,GAAG,QAAQ,CAAC,sBAAsB,CAAC;IA6BrE;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,EAAE,gBAAgB,EAAE,QAAQ,EAAE,sBAAsB,GAAG,IAAI;IAkB7E;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,EAAE,gBAAgB,EAAE,aAAa,EAAE,oBAAoB,GAAG,IAAI;IAuB/E;;;OAGG;IACH,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;IAiBlC;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,EAAE,gBAAgB,GAAG,IAAI;IAe1C;;;;;OAKG;IACH,mBAAmB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;CAiB1C"}
@@ -43,6 +43,9 @@ export class RequestTracker {
43
43
  * Track a new request with the given id.
44
44
  * @param id - the request id
45
45
  * @returns a deferred promise that will be resolved when the response is received
46
+ * @mutates this - inserts a `RequestTrackerItem` into `pending_requests`
47
+ * and arms a timeout that auto-rejects after `request_timeout_ms`;
48
+ * clears any prior timeout for the same id
46
49
  */
47
50
  track_request(id) {
48
51
  const deferred = create_deferred();
@@ -69,6 +72,8 @@ export class RequestTracker {
69
72
  * Resolve a pending request with the given response data.
70
73
  * @param id - the request id
71
74
  * @param response - the response data
75
+ * @mutates this - clears the timeout, marks status `'success'`,
76
+ * resolves the deferred, and removes the entry from `pending_requests`
72
77
  */
73
78
  resolve_request(id, response) {
74
79
  const request = this.pending_requests.get(id);
@@ -89,6 +94,9 @@ export class RequestTracker {
89
94
  * Rejects a pending request with the given error.
90
95
  * @param id - the request id
91
96
  * @param error_message - the complete `JsonrpcErrorResponse` object
97
+ * @mutates this - clears the timeout, marks status `'failure'`,
98
+ * rejects the deferred with a `ThrownJsonrpcError`, and removes the
99
+ * entry from `pending_requests`
92
100
  */
93
101
  reject_request(id, error_message) {
94
102
  const request = this.pending_requests.get(id);
@@ -127,8 +135,11 @@ export class RequestTracker {
127
135
  // ignore other messages
128
136
  }
129
137
  /**
130
- * Cancel a pending request.
138
+ * Cancel a pending request without rejecting its deferred — just
139
+ * cleanup. The caller's promise stays unsettled; pair with an external
140
+ * resolution if needed.
131
141
  * @param id - the request id
142
+ * @mutates this - clears the timeout and removes the entry from `pending_requests`
132
143
  */
133
144
  cancel_request(id) {
134
145
  const request = this.pending_requests.get(id);
@@ -145,6 +156,8 @@ export class RequestTracker {
145
156
  /**
146
157
  * Cancel all pending requests.
147
158
  * @param reason - optional reason to include in rejection
159
+ * @mutates this - clears every timeout, marks each status `'failure'`,
160
+ * rejects each deferred with `internal_error`, and empties `pending_requests`
148
161
  */
149
162
  cancel_all_requests(reason) {
150
163
  for (const [id, request] of this.pending_requests.entries()) {
@@ -8,13 +8,13 @@
8
8
  * server revokes auth), exposes reactive status for UI indicators, and ships
9
9
  * three correctness primitives default-on:
10
10
  *
11
- * - {@link FrontendWebsocketClient.request} — promise-based JSON-RPC with
11
+ * - `FrontendWebsocketClient.request` — promise-based JSON-RPC with
12
12
  * auto-assigned ids and a pending-id map. Intercepts responses on the
13
13
  * message path so request/response correlation is transport-level rather
14
14
  * than re-invented per consumer.
15
15
  * - **Durable queue** — `request()` calls made while disconnected buffer up
16
16
  * to `DEFAULT_QUEUE_MAX_SIZE` requests and flush on reopen. Overflow
17
- * rejects with `queue_overflow`. Raw {@link FrontendWebsocketClient.send}
17
+ * rejects with `queue_overflow`. Raw `FrontendWebsocketClient.send`
18
18
  * is drop-on-disconnect (fire-and-forget notifications want that).
19
19
  * - **Activity-aware heartbeat** — idles fire a shared `heartbeat` request;
20
20
  * receive-silence past `DEFAULT_HEARTBEAT_RECEIVE_TIMEOUT` closes
@@ -98,9 +98,9 @@ export interface FrontendWebsocketClientOptions {
98
98
  */
99
99
  heartbeat?: boolean | FrontendWebsocketHeartbeatOptions | null;
100
100
  /**
101
- * Durable queue for {@link FrontendWebsocketClient.request}. `true` or omit
101
+ * Durable queue for `FrontendWebsocketClient.request`. `true` or omit
102
102
  * for defaults; `false` disables buffering (requests while disconnected
103
- * reject immediately). Raw {@link FrontendWebsocketClient.send} is never
103
+ * reject immediately). Raw `FrontendWebsocketClient.send` is never
104
104
  * queued — use `request()` for RPC semantics.
105
105
  */
106
106
  queue?: boolean | FrontendWebsocketQueueOptions;
@@ -162,6 +162,10 @@ export declare class FrontendWebsocketClient implements WebsocketConnection, Dis
162
162
  * timer and transitions status to `closed` (since the lie of
163
163
  * `'reconnecting'` would be visible to UI indicators). Turning it back on
164
164
  * does not synthesize a reconnect — wait for the next close.
165
+ *
166
+ * @mutates this - replaces the reconnect policy fields; may also reset
167
+ * `status`, `reconnect_count`, and `current_reconnect_delay` when an
168
+ * in-flight reconnect timer is cancelled or rescheduled
165
169
  */
166
170
  set_reconnect(reconnect?: boolean | FrontendWebsocketReconnectOptions | null): void;
167
171
  /**
@@ -175,6 +179,9 @@ export declare class FrontendWebsocketClient implements WebsocketConnection, Dis
175
179
  * When connected, the live timer is restarted immediately so the new
176
180
  * `interval` / `receive_timeout` take effect without a reconnect; when
177
181
  * disconnected, just stashes the policy for the next open.
182
+ *
183
+ * @mutates this - replaces the heartbeat policy fields; restarts the
184
+ * live heartbeat timer when connected
178
185
  */
179
186
  set_heartbeat(heartbeat?: boolean | FrontendWebsocketHeartbeatOptions | null): void;
180
187
  /**
@@ -189,6 +196,9 @@ export declare class FrontendWebsocketClient implements WebsocketConnection, Dis
189
196
  * clears heartbeat) or the policy change of `set_reconnect(false)`
190
197
  * (which disables future reconnects). The queue stays intact so that
191
198
  * calling `connect` later flushes buffered work.
199
+ *
200
+ * @mutates this - clears the pending reconnect timer, sets `status` to
201
+ * `closed`, resets `reconnect_count` and `current_reconnect_delay`
192
202
  */
193
203
  cancel_reconnect(): void;
194
204
  get url(): string;
@@ -202,12 +212,21 @@ export declare class FrontendWebsocketClient implements WebsocketConnection, Dis
202
212
  * Open the WebSocket. No-op on SSR, or if the session has been revoked.
203
213
  * Cancels any pending reconnect and tears down any existing connection first;
204
214
  * an open prior socket is closed with a normal-closure code.
215
+ *
216
+ * @mutates this - replaces `ws`, sets `status` to `connecting` (or
217
+ * `closed` on construction failure), and on construction failure may
218
+ * schedule a reconnect (mutating `reconnect_count` /
219
+ * `current_reconnect_delay`)
205
220
  */
206
221
  connect(): void;
207
222
  /**
208
223
  * Close the WebSocket, cancel any pending reconnect, and reset the reconnect
209
224
  * backoff counters. Puts the client in `closed` status; call `connect()` to
210
225
  * reopen. Safe to call more than once.
226
+ *
227
+ * @mutates this - clears `ws`, heartbeat, and reconnect timers; sets
228
+ * `status` to `closed`; rejects every pending and queued request with
229
+ * `service_unavailable`
211
230
  */
212
231
  disconnect(code?: number): void;
213
232
  /** Explicit-resource-management hook — supports `using client = new FrontendWebsocketClient(url)`. */
@@ -238,17 +257,18 @@ export declare class FrontendWebsocketClient implements WebsocketConnection, Dis
238
257
  * for queued-but-never-sent (server doesn't know about it) and
239
258
  * response-beat-cancel races.
240
259
  *
241
- * Rejections throw `ThrownJsonrpcError` with a specific code so
242
- * `FrontendWebsocketTransport` can preserve the code verbatim in its
243
- * error envelope rather than collapsing every rejection to
244
- * `internal_error`:
245
- * - `unauthenticated` — session revoked (entry check or close code);
246
- * - `request_cancelled` — caller's `AbortSignal` fired;
247
- * - `queue_overflow` — durable queue full;
248
- * - `service_unavailable` — socket not connected / closed / torn down
249
- * mid-flight;
250
- * - `internal_error` — `ws.send` threw (serialization, buffer full);
251
- * - server's wire code verbatim JSON-RPC error frame from peer.
260
+ * @mutates this - inserts the new pending entry into `#pending` (or
261
+ * buffers into `#queue` when disconnected) and may bump
262
+ * `#next_request_id`, `#last_send_time`, `last_send_error`
263
+ * @throws ThrownJsonrpcError on the returned promise — never thrown
264
+ * synchronously. Rejection codes:
265
+ * - `unauthenticated` — session revoked (entry check or close code)
266
+ * - `request_cancelled` — caller's `AbortSignal` fired
267
+ * - `queue_overflow` — durable queue full
268
+ * - `service_unavailable` — socket not connected / closed / torn down
269
+ * mid-flight
270
+ * - `internal_error``ws.send` threw (serialization, buffer full)
271
+ * - server's wire code verbatim — JSON-RPC error frame from peer
252
272
  */
253
273
  request<R = unknown>(method: string, params?: unknown, options?: {
254
274
  signal?: AbortSignal;
@@ -1 +1 @@
1
- {"version":3,"file":"socket.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/socket.svelte.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAyC,KAAK,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAKjG,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAE5D,qDAAqD;AACrD,eAAO,MAAM,kBAAkB,OAAO,CAAC;AACvC,kCAAkC;AAClC,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAC5C,8DAA8D;AAC9D,eAAO,MAAM,2BAA2B,QAAQ,CAAC;AACjD,qEAAqE;AACrE,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,qDAAqD;AACrD,eAAO,MAAM,0BAA0B,QAAS,CAAC;AACjD,wFAAwF;AACxF,eAAO,MAAM,iCAAiC,QAAS,CAAC;AACxD,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C;;;;;;;;;GASG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,cAAc,GAAG,QAAQ,CAAC;AAE9F,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;AACjE,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,E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;;;;;;;;;OAcG;IACH,aAAa,CAAC,SAAS,GAAE,OAAO,GAAG,iCAAiC,GAAG,IAAW,GAAG,IAAI;IAazF;;;;;;;;;;;;;;;OAeG;IACH,gBAAgB,IAAI,IAAI;IAOxB,IAAI,GAAG,IAAI,MAAM,CAEhB;IAED;;;;OAIG;IACH,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;;;;;;;OASG;IACH,OAAO,IAAI,IAAI;IA2Bf;;;;;;;;OAQG;IACH,UAAU,CAAC,IAAI,GAAE,MAA2B,GAAG,IAAI;IASnD,sGAAsG;IACtG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI;IAIxB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAc3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;IACH,OAAO,CAAC,CAAC,GAAG,OAAO,EAClB,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,OAAY,EACpB,OAAO,GAAE;QAAC,MAAM,CAAC,EAAE,WAAW,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,EAAE,CAAC,EAAE,gBAAgB,CAAA;KAAM,GAC1E,OAAO,CAAC,CAAC,CAAC;IA2Eb,mBAAmB,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,IAAI;IAK9D,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,IAAI;CAyU1D;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,6BAA6B,GACzC,QAAQ,YAAY,EACpB,SAAS,OAAO,KACd,WAaF,CAAC"}
@@ -8,13 +8,13 @@
8
8
  * server revokes auth), exposes reactive status for UI indicators, and ships
9
9
  * three correctness primitives default-on:
10
10
  *
11
- * - {@link FrontendWebsocketClient.request} — promise-based JSON-RPC with
11
+ * - `FrontendWebsocketClient.request` — promise-based JSON-RPC with
12
12
  * auto-assigned ids and a pending-id map. Intercepts responses on the
13
13
  * message path so request/response correlation is transport-level rather
14
14
  * than re-invented per consumer.
15
15
  * - **Durable queue** — `request()` calls made while disconnected buffer up
16
16
  * to `DEFAULT_QUEUE_MAX_SIZE` requests and flush on reopen. Overflow
17
- * rejects with `queue_overflow`. Raw {@link FrontendWebsocketClient.send}
17
+ * rejects with `queue_overflow`. Raw `FrontendWebsocketClient.send`
18
18
  * is drop-on-disconnect (fire-and-forget notifications want that).
19
19
  * - **Activity-aware heartbeat** — idles fire a shared `heartbeat` request;
20
20
  * receive-silence past `DEFAULT_HEARTBEAT_RECEIVE_TIMEOUT` closes
@@ -140,6 +140,10 @@ export class FrontendWebsocketClient {
140
140
  * timer and transitions status to `closed` (since the lie of
141
141
  * `'reconnecting'` would be visible to UI indicators). Turning it back on
142
142
  * does not synthesize a reconnect — wait for the next close.
143
+ *
144
+ * @mutates this - replaces the reconnect policy fields; may also reset
145
+ * `status`, `reconnect_count`, and `current_reconnect_delay` when an
146
+ * in-flight reconnect timer is cancelled or rescheduled
143
147
  */
144
148
  set_reconnect(reconnect = null) {
145
149
  const next_auto = reconnect !== false;
@@ -187,6 +191,9 @@ export class FrontendWebsocketClient {
187
191
  * When connected, the live timer is restarted immediately so the new
188
192
  * `interval` / `receive_timeout` take effect without a reconnect; when
189
193
  * disconnected, just stashes the policy for the next open.
194
+ *
195
+ * @mutates this - replaces the heartbeat policy fields; restarts the
196
+ * live heartbeat timer when connected
190
197
  */
191
198
  set_heartbeat(heartbeat = null) {
192
199
  this.#heartbeat_enabled = heartbeat !== false;
@@ -212,6 +219,9 @@ export class FrontendWebsocketClient {
212
219
  * clears heartbeat) or the policy change of `set_reconnect(false)`
213
220
  * (which disables future reconnects). The queue stays intact so that
214
221
  * calling `connect` later flushes buffered work.
222
+ *
223
+ * @mutates this - clears the pending reconnect timer, sets `status` to
224
+ * `closed`, resets `reconnect_count` and `current_reconnect_delay`
215
225
  */
216
226
  cancel_reconnect() {
217
227
  if (this.#reconnect_timeout === null)
@@ -235,6 +245,11 @@ export class FrontendWebsocketClient {
235
245
  * Open the WebSocket. No-op on SSR, or if the session has been revoked.
236
246
  * Cancels any pending reconnect and tears down any existing connection first;
237
247
  * an open prior socket is closed with a normal-closure code.
248
+ *
249
+ * @mutates this - replaces `ws`, sets `status` to `connecting` (or
250
+ * `closed` on construction failure), and on construction failure may
251
+ * schedule a reconnect (mutating `reconnect_count` /
252
+ * `current_reconnect_delay`)
238
253
  */
239
254
  connect() {
240
255
  if (!BROWSER)
@@ -267,6 +282,10 @@ export class FrontendWebsocketClient {
267
282
  * Close the WebSocket, cancel any pending reconnect, and reset the reconnect
268
283
  * backoff counters. Puts the client in `closed` status; call `connect()` to
269
284
  * reopen. Safe to call more than once.
285
+ *
286
+ * @mutates this - clears `ws`, heartbeat, and reconnect timers; sets
287
+ * `status` to `closed`; rejects every pending and queued request with
288
+ * `service_unavailable`
270
289
  */
271
290
  disconnect(code = DEFAULT_CLOSE_CODE) {
272
291
  this.#cancel_reconnect();
@@ -320,17 +339,18 @@ export class FrontendWebsocketClient {
320
339
  * for queued-but-never-sent (server doesn't know about it) and
321
340
  * response-beat-cancel races.
322
341
  *
323
- * Rejections throw `ThrownJsonrpcError` with a specific code so
324
- * `FrontendWebsocketTransport` can preserve the code verbatim in its
325
- * error envelope rather than collapsing every rejection to
326
- * `internal_error`:
327
- * - `unauthenticated` — session revoked (entry check or close code);
328
- * - `request_cancelled` — caller's `AbortSignal` fired;
329
- * - `queue_overflow` — durable queue full;
330
- * - `service_unavailable` — socket not connected / closed / torn down
331
- * mid-flight;
332
- * - `internal_error` — `ws.send` threw (serialization, buffer full);
333
- * - server's wire code verbatim JSON-RPC error frame from peer.
342
+ * @mutates this - inserts the new pending entry into `#pending` (or
343
+ * buffers into `#queue` when disconnected) and may bump
344
+ * `#next_request_id`, `#last_send_time`, `last_send_error`
345
+ * @throws ThrownJsonrpcError on the returned promise — never thrown
346
+ * synchronously. Rejection codes:
347
+ * - `unauthenticated` — session revoked (entry check or close code)
348
+ * - `request_cancelled` — caller's `AbortSignal` fired
349
+ * - `queue_overflow` — durable queue full
350
+ * - `service_unavailable` — socket not connected / closed / torn down
351
+ * mid-flight
352
+ * - `internal_error``ws.send` threw (serialization, buffer full)
353
+ * - server's wire code verbatim — JSON-RPC error frame from peer
334
354
  */
335
355
  request(method, params = {}, options = {}) {
336
356
  return new Promise((resolve, reject) => {
@@ -60,15 +60,24 @@ export declare class Transports {
60
60
  */
61
61
  allow_fallback: boolean;
62
62
  /**
63
- * Registers a transport.
63
+ * Registers a transport. The first transport registered also becomes the current.
64
+ *
65
+ * @mutates this - inserts into `#transport_by_name`; sets `#current_transport`
66
+ * if no current is set
64
67
  */
65
68
  register_transport(transport: Transport): void;
69
+ /**
70
+ * Switch the current transport selection by name.
71
+ *
72
+ * @mutates this - sets `#current_transport`
73
+ * @throws Error if no transport with `transport_name` has been registered
74
+ */
66
75
  set_current_transport(transport_name: TransportName): void;
67
76
  /**
68
77
  * Gets either the current transport or the first ready transport
69
- * depending on `allow_fallback`, or throws an error.
78
+ * depending on `allow_fallback`.
70
79
  * @param transport_name - optional transport to use instead of the current
71
- * @throws when no transport available or ready
80
+ * @returns the resolved transport, or `null` when none is ready
72
81
  */
73
82
  get_transport(transport_name?: TransportName): Transport | null;
74
83
  is_ready(): boolean | null;
@@ -1 +1 @@
1
- {"version":3,"file":"transports.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/transports.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,KAAK,EACX,gCAAgC,EAChC,gCAAgC,EAChC,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,oBAAoB,EACpB,MAAM,oBAAoB,CAAC;AAE5B,mDAAmD;AACnD,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAC7C,sEAAsE;AACtE,eAAO,MAAM,iCAAiC,OAAO,CAAC;AACtD,yEAAyE;AACzE,eAAO,MAAM,iCAAiC,OAAO,CAAC;AAKtD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