@fuzdev/fuz_app 0.180.0 → 0.182.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 (389) hide show
  1. package/dist/actions/CLAUDE.md +38 -20
  2. package/dist/actions/action_rpc.d.ts +25 -6
  3. package/dist/actions/action_rpc.d.ts.map +1 -1
  4. package/dist/actions/action_rpc.js +56 -48
  5. package/dist/actions/action_types.d.ts +31 -13
  6. package/dist/actions/action_types.d.ts.map +1 -1
  7. package/dist/actions/action_types.js +1 -1
  8. package/dist/actions/notification_sender.d.ts +83 -0
  9. package/dist/actions/notification_sender.d.ts.map +1 -0
  10. package/dist/actions/notification_sender.js +85 -0
  11. package/dist/actions/perform_action.d.ts +13 -4
  12. package/dist/actions/perform_action.d.ts.map +1 -1
  13. package/dist/actions/perform_action.js +27 -18
  14. package/dist/actions/register_action_ws.d.ts +20 -2
  15. package/dist/actions/register_action_ws.d.ts.map +1 -1
  16. package/dist/actions/register_action_ws.js +17 -5
  17. package/dist/actions/ws_socket_session.d.ts +3 -0
  18. package/dist/actions/ws_socket_session.d.ts.map +1 -1
  19. package/dist/actions/ws_socket_session.js +3 -2
  20. package/dist/auth/CLAUDE.md +84 -59
  21. package/dist/auth/account_actions.d.ts.map +1 -1
  22. package/dist/auth/account_actions.js +30 -3
  23. package/dist/auth/account_queries.d.ts +213 -2
  24. package/dist/auth/account_queries.d.ts.map +1 -1
  25. package/dist/auth/account_queries.js +255 -2
  26. package/dist/auth/account_route_schema.d.ts +26 -16
  27. package/dist/auth/account_route_schema.d.ts.map +1 -1
  28. package/dist/auth/account_route_schema.js +10 -24
  29. package/dist/auth/account_routes.d.ts +5 -7
  30. package/dist/auth/account_routes.d.ts.map +1 -1
  31. package/dist/auth/account_routes.js +110 -89
  32. package/dist/auth/admin_actions.d.ts.map +1 -1
  33. package/dist/auth/admin_actions.js +117 -25
  34. package/dist/auth/api_token_queries.d.ts +29 -12
  35. package/dist/auth/api_token_queries.d.ts.map +1 -1
  36. package/dist/auth/api_token_queries.js +42 -27
  37. package/dist/auth/audit_log_route_schema.d.ts +1 -1
  38. package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
  39. package/dist/auth/audit_log_routes.d.ts +1 -1
  40. package/dist/auth/audit_log_routes.d.ts.map +1 -1
  41. package/dist/auth/audit_log_routes.js +10 -12
  42. package/dist/auth/audit_log_schema.js +4 -4
  43. package/dist/auth/bearer_auth.d.ts +4 -3
  44. package/dist/auth/bearer_auth.d.ts.map +1 -1
  45. package/dist/auth/bearer_auth.js +37 -32
  46. package/dist/auth/bootstrap_account.d.ts +65 -37
  47. package/dist/auth/bootstrap_account.d.ts.map +1 -1
  48. package/dist/auth/bootstrap_account.js +115 -66
  49. package/dist/auth/bootstrap_route_schema.d.ts +6 -2
  50. package/dist/auth/bootstrap_route_schema.d.ts.map +1 -1
  51. package/dist/auth/bootstrap_route_schema.js +7 -2
  52. package/dist/auth/bootstrap_routes.d.ts +50 -33
  53. package/dist/auth/bootstrap_routes.d.ts.map +1 -1
  54. package/dist/auth/bootstrap_routes.js +109 -87
  55. package/dist/auth/bootstrap_token_store.d.ts +60 -0
  56. package/dist/auth/bootstrap_token_store.d.ts.map +1 -0
  57. package/dist/auth/bootstrap_token_store.js +39 -0
  58. package/dist/auth/credential_headers.d.ts +71 -0
  59. package/dist/auth/credential_headers.d.ts.map +1 -0
  60. package/dist/auth/credential_headers.js +100 -0
  61. package/dist/auth/daemon_token.d.ts +13 -1
  62. package/dist/auth/daemon_token.d.ts.map +1 -1
  63. package/dist/auth/daemon_token.js +14 -2
  64. package/dist/auth/daemon_token_middleware.d.ts +10 -11
  65. package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
  66. package/dist/auth/daemon_token_middleware.js +39 -30
  67. package/dist/auth/deps.d.ts +10 -11
  68. package/dist/auth/deps.d.ts.map +1 -1
  69. package/dist/auth/invite_queries.d.ts +18 -0
  70. package/dist/auth/invite_queries.d.ts.map +1 -1
  71. package/dist/auth/invite_queries.js +24 -0
  72. package/dist/auth/request_context.d.ts +97 -76
  73. package/dist/auth/request_context.d.ts.map +1 -1
  74. package/dist/auth/request_context.js +93 -104
  75. package/dist/auth/resolved_auth.d.ts +10 -5
  76. package/dist/auth/resolved_auth.d.ts.map +1 -1
  77. package/dist/auth/resolved_auth.js +2 -2
  78. package/dist/auth/role_grant_offer_action_specs.d.ts +2 -2
  79. package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
  80. package/dist/auth/role_grant_offer_action_specs.js +5 -3
  81. package/dist/auth/role_grant_offer_actions.d.ts +7 -11
  82. package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
  83. package/dist/auth/role_grant_offer_actions.js +97 -106
  84. package/dist/auth/role_grant_offer_ddl.d.ts +7 -1
  85. package/dist/auth/role_grant_offer_ddl.d.ts.map +1 -1
  86. package/dist/auth/role_grant_offer_ddl.js +9 -2
  87. package/dist/auth/role_grant_offer_notifications.d.ts +87 -38
  88. package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
  89. package/dist/auth/role_grant_offer_notifications.js +75 -22
  90. package/dist/auth/role_grant_offer_queries.d.ts +143 -9
  91. package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
  92. package/dist/auth/role_grant_offer_queries.js +266 -66
  93. package/dist/auth/role_grant_offer_schema.js +1 -1
  94. package/dist/auth/role_grant_queries.d.ts +57 -10
  95. package/dist/auth/role_grant_queries.d.ts.map +1 -1
  96. package/dist/auth/role_grant_queries.js +81 -22
  97. package/dist/auth/role_grant_sql.d.ts +21 -0
  98. package/dist/auth/role_grant_sql.d.ts.map +1 -1
  99. package/dist/auth/role_grant_sql.js +21 -0
  100. package/dist/auth/self_service_role_actions.d.ts.map +1 -1
  101. package/dist/auth/self_service_role_actions.js +9 -2
  102. package/dist/auth/session_cookie.d.ts +105 -25
  103. package/dist/auth/session_cookie.d.ts.map +1 -1
  104. package/dist/auth/session_cookie.js +124 -15
  105. package/dist/auth/session_middleware.d.ts +83 -54
  106. package/dist/auth/session_middleware.d.ts.map +1 -1
  107. package/dist/auth/session_middleware.js +92 -66
  108. package/dist/auth/session_queries.d.ts +95 -14
  109. package/dist/auth/session_queries.d.ts.map +1 -1
  110. package/dist/auth/session_queries.js +98 -19
  111. package/dist/auth/signup_route_schema.d.ts +5 -5
  112. package/dist/auth/signup_route_schema.d.ts.map +1 -1
  113. package/dist/auth/signup_route_schema.js +4 -4
  114. package/dist/auth/signup_routes.d.ts.map +1 -1
  115. package/dist/auth/signup_routes.js +17 -14
  116. package/dist/auth/standard_rpc_actions.d.ts +6 -19
  117. package/dist/auth/standard_rpc_actions.d.ts.map +1 -1
  118. package/dist/auth/standard_rpc_actions.js +5 -6
  119. package/dist/auth/token_scope.d.ts +6 -8
  120. package/dist/auth/token_scope.d.ts.map +1 -1
  121. package/dist/auth/token_scope.js +6 -9
  122. package/dist/dev/setup.d.ts +6 -1
  123. package/dist/dev/setup.d.ts.map +1 -1
  124. package/dist/dev/setup.js +42 -34
  125. package/dist/hono_context.d.ts +21 -0
  126. package/dist/hono_context.d.ts.map +1 -1
  127. package/dist/hono_context.js +17 -0
  128. package/dist/http/CLAUDE.md +156 -48
  129. package/dist/http/auth_shape.d.ts +4 -4
  130. package/dist/http/common_routes.js +1 -1
  131. package/dist/http/db_routes.d.ts +4 -3
  132. package/dist/http/db_routes.d.ts.map +1 -1
  133. package/dist/http/db_routes.js +14 -14
  134. package/dist/http/dev_route_error_check.d.ts +6 -3
  135. package/dist/http/dev_route_error_check.d.ts.map +1 -1
  136. package/dist/http/dev_route_error_check.js +6 -3
  137. package/dist/http/dev_set_cookie_check.d.ts +53 -0
  138. package/dist/http/dev_set_cookie_check.d.ts.map +1 -0
  139. package/dist/http/dev_set_cookie_check.js +80 -0
  140. package/dist/http/error_schemas.d.ts +45 -22
  141. package/dist/http/error_schemas.d.ts.map +1 -1
  142. package/dist/http/error_schemas.js +53 -26
  143. package/dist/http/header_lines.d.ts +42 -0
  144. package/dist/http/header_lines.d.ts.map +1 -0
  145. package/dist/http/header_lines.js +80 -0
  146. package/dist/http/host.d.ts +12 -9
  147. package/dist/http/host.d.ts.map +1 -1
  148. package/dist/http/host.js +25 -20
  149. package/dist/http/origin.d.ts +7 -22
  150. package/dist/http/origin.d.ts.map +1 -1
  151. package/dist/http/origin.js +11 -25
  152. package/dist/http/proxy.d.ts +1 -0
  153. package/dist/http/proxy.d.ts.map +1 -1
  154. package/dist/http/proxy.js +3 -0
  155. package/dist/http/request_headers.d.ts +95 -0
  156. package/dist/http/request_headers.d.ts.map +1 -0
  157. package/dist/http/request_headers.js +110 -0
  158. package/dist/http/request_target.d.ts +134 -0
  159. package/dist/http/request_target.d.ts.map +1 -0
  160. package/dist/http/request_target.js +193 -0
  161. package/dist/http/route_error_check.d.ts +4 -11
  162. package/dist/http/route_error_check.d.ts.map +1 -1
  163. package/dist/http/route_error_check.js +4 -21
  164. package/dist/http/route_result.d.ts +127 -23
  165. package/dist/http/route_result.d.ts.map +1 -1
  166. package/dist/http/route_result.js +97 -19
  167. package/dist/http/route_spec.d.ts +299 -83
  168. package/dist/http/route_spec.d.ts.map +1 -1
  169. package/dist/http/route_spec.js +548 -71
  170. package/dist/http/simple_request.d.ts +19 -14
  171. package/dist/http/simple_request.d.ts.map +1 -1
  172. package/dist/http/simple_request.js +17 -29
  173. package/dist/http/surface.d.ts +2 -0
  174. package/dist/http/surface.d.ts.map +1 -1
  175. package/dist/http/surface.js +4 -1
  176. package/dist/realtime/outbound_budget.d.ts +1 -2
  177. package/dist/realtime/outbound_budget.d.ts.map +1 -1
  178. package/dist/realtime/outbound_budget.js +1 -2
  179. package/dist/realtime/sse.d.ts +47 -17
  180. package/dist/realtime/sse.d.ts.map +1 -1
  181. package/dist/realtime/sse.js +115 -93
  182. package/dist/realtime/sse_constants.d.ts +7 -1
  183. package/dist/realtime/sse_constants.d.ts.map +1 -1
  184. package/dist/realtime/sse_constants.js +12 -1
  185. package/dist/realtime/sse_registry.d.ts +3 -3
  186. package/dist/realtime/sse_registry.js +3 -3
  187. package/dist/runtime/deps.d.ts +20 -4
  188. package/dist/runtime/deps.d.ts.map +1 -1
  189. package/dist/runtime/mock.d.ts +7 -1
  190. package/dist/runtime/mock.d.ts.map +1 -1
  191. package/dist/runtime/mock.js +33 -3
  192. package/dist/runtime/node.d.ts.map +1 -1
  193. package/dist/runtime/node.js +2 -1
  194. package/dist/runtime/secure_file.d.ts +71 -10
  195. package/dist/runtime/secure_file.d.ts.map +1 -1
  196. package/dist/runtime/secure_file.js +91 -11
  197. package/dist/server/app_backend.d.ts +0 -8
  198. package/dist/server/app_backend.d.ts.map +1 -1
  199. package/dist/server/app_backend.js +4 -4
  200. package/dist/server/app_server.d.ts +54 -33
  201. package/dist/server/app_server.d.ts.map +1 -1
  202. package/dist/server/app_server.js +69 -41
  203. package/dist/server/serve_fact_route.d.ts +3 -3
  204. package/dist/server/serve_fact_route.d.ts.map +1 -1
  205. package/dist/server/serve_fact_route.js +59 -55
  206. package/dist/server/static.d.ts +20 -0
  207. package/dist/server/static.d.ts.map +1 -1
  208. package/dist/server/static.js +56 -8
  209. package/dist/server/unmatched_route.d.ts +42 -0
  210. package/dist/server/unmatched_route.d.ts.map +1 -0
  211. package/dist/server/unmatched_route.js +64 -0
  212. package/dist/testing/CLAUDE.md +406 -1202
  213. package/dist/testing/app_server.d.ts +3 -1
  214. package/dist/testing/app_server.d.ts.map +1 -1
  215. package/dist/testing/app_server.js +5 -9
  216. package/dist/testing/auth_apps.d.ts.map +1 -1
  217. package/dist/testing/auth_apps.js +3 -2
  218. package/dist/testing/cross_backend/account_lifecycle.d.ts +11 -4
  219. package/dist/testing/cross_backend/account_lifecycle.d.ts.map +1 -1
  220. package/dist/testing/cross_backend/account_lifecycle.js +320 -6
  221. package/dist/testing/cross_backend/build_test_backend_paths.d.ts +4 -1
  222. package/dist/testing/cross_backend/build_test_backend_paths.d.ts.map +1 -1
  223. package/dist/testing/cross_backend/build_test_backend_paths.js +1 -1
  224. package/dist/testing/cross_backend/capabilities.d.ts +68 -5
  225. package/dist/testing/cross_backend/capabilities.d.ts.map +1 -1
  226. package/dist/testing/cross_backend/capabilities.js +20 -4
  227. package/dist/testing/cross_backend/cell_gated_create.js +1 -1
  228. package/dist/testing/cross_backend/conformance_case.d.ts +63 -21
  229. package/dist/testing/cross_backend/conformance_case.d.ts.map +1 -1
  230. package/dist/testing/cross_backend/conformance_table.d.ts +54 -12
  231. package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
  232. package/dist/testing/cross_backend/conformance_table.js +179 -23
  233. package/dist/testing/cross_backend/cookie_attributes.js +1 -1
  234. package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts +7 -1
  235. package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts.map +1 -1
  236. package/dist/testing/cross_backend/create_dual_spawn_global_setup.js +3 -3
  237. package/dist/testing/cross_backend/credential_conformance.d.ts +196 -0
  238. package/dist/testing/cross_backend/credential_conformance.d.ts.map +1 -0
  239. package/dist/testing/cross_backend/credential_conformance.js +296 -0
  240. package/dist/testing/cross_backend/credential_conformance.json +1284 -0
  241. package/dist/testing/cross_backend/credential_conformance_wire.d.ts +40 -0
  242. package/dist/testing/cross_backend/credential_conformance_wire.d.ts.map +1 -0
  243. package/dist/testing/cross_backend/credential_conformance_wire.js +293 -0
  244. package/dist/testing/cross_backend/credential_header_robustness.d.ts +1 -3
  245. package/dist/testing/cross_backend/credential_header_robustness.d.ts.map +1 -1
  246. package/dist/testing/cross_backend/credential_header_robustness.js +24 -55
  247. package/dist/testing/cross_backend/credential_wire.d.ts +112 -0
  248. package/dist/testing/cross_backend/credential_wire.d.ts.map +1 -0
  249. package/dist/testing/cross_backend/credential_wire.js +188 -0
  250. package/dist/testing/cross_backend/default_backend_configs.d.ts.map +1 -1
  251. package/dist/testing/cross_backend/default_backend_configs.js +22 -2
  252. package/dist/testing/cross_backend/default_spine_surface.d.ts +1 -26
  253. package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
  254. package/dist/testing/cross_backend/default_spine_surface.js +3 -7
  255. package/dist/testing/cross_backend/differential.d.ts +1 -1
  256. package/dist/testing/cross_backend/differential.d.ts.map +1 -1
  257. package/dist/testing/cross_backend/differential.js +3 -2
  258. package/dist/testing/cross_backend/differential_normalize.d.ts +23 -6
  259. package/dist/testing/cross_backend/differential_normalize.d.ts.map +1 -1
  260. package/dist/testing/cross_backend/differential_normalize.js +11 -5
  261. package/dist/testing/cross_backend/full_spine_mount.d.ts +4 -10
  262. package/dist/testing/cross_backend/full_spine_mount.d.ts.map +1 -1
  263. package/dist/testing/cross_backend/full_spine_mount.js +11 -4
  264. package/dist/testing/cross_backend/identity_parity.d.ts.map +1 -1
  265. package/dist/testing/cross_backend/identity_parity.js +4 -0
  266. package/dist/testing/cross_backend/in_process_setup.d.ts.map +1 -1
  267. package/dist/testing/cross_backend/in_process_setup.js +78 -4
  268. package/dist/testing/cross_backend/login_security.d.ts.map +1 -1
  269. package/dist/testing/cross_backend/login_security.js +13 -10
  270. package/dist/testing/cross_backend/peer_ping_ws.d.ts +1 -1
  271. package/dist/testing/cross_backend/peer_ping_ws.js +2 -2
  272. package/dist/testing/cross_backend/request_header_conformance.d.ts +174 -0
  273. package/dist/testing/cross_backend/request_header_conformance.d.ts.map +1 -0
  274. package/dist/testing/cross_backend/request_header_conformance.js +196 -0
  275. package/dist/testing/cross_backend/request_header_conformance.json +1158 -0
  276. package/dist/testing/cross_backend/request_header_conformance_wire.d.ts +39 -0
  277. package/dist/testing/cross_backend/request_header_conformance_wire.d.ts.map +1 -0
  278. package/dist/testing/cross_backend/request_header_conformance_wire.js +284 -0
  279. package/dist/testing/cross_backend/request_target_conformance.d.ts +298 -0
  280. package/dist/testing/cross_backend/request_target_conformance.d.ts.map +1 -0
  281. package/dist/testing/cross_backend/request_target_conformance.js +186 -0
  282. package/dist/testing/cross_backend/request_target_conformance.json +3765 -0
  283. package/dist/testing/cross_backend/request_target_conformance_wire.d.ts +32 -0
  284. package/dist/testing/cross_backend/request_target_conformance_wire.d.ts.map +1 -0
  285. package/dist/testing/cross_backend/request_target_conformance_wire.js +278 -0
  286. package/dist/testing/cross_backend/role_grant_offer_lifecycle.d.ts.map +1 -1
  287. package/dist/testing/cross_backend/role_grant_offer_lifecycle.js +173 -1
  288. package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts +5 -4
  289. package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts.map +1 -1
  290. package/dist/testing/cross_backend/role_grant_offer_notification_ws.js +185 -31
  291. package/dist/testing/cross_backend/rpc_adversarial.d.ts +6 -4
  292. package/dist/testing/cross_backend/rpc_adversarial.d.ts.map +1 -1
  293. package/dist/testing/cross_backend/rpc_adversarial.js +5 -2
  294. package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts +6 -7
  295. package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts.map +1 -1
  296. package/dist/testing/cross_backend/rust_spine_consumer_surface.js +4 -5
  297. package/dist/testing/cross_backend/session_cap.d.ts.map +1 -1
  298. package/dist/testing/cross_backend/session_cap.js +82 -34
  299. package/dist/testing/cross_backend/session_cookie_effect.d.ts +43 -0
  300. package/dist/testing/cross_backend/session_cookie_effect.d.ts.map +1 -0
  301. package/dist/testing/cross_backend/session_cookie_effect.js +103 -0
  302. package/dist/testing/cross_backend/session_login.d.ts +24 -0
  303. package/dist/testing/cross_backend/session_login.d.ts.map +1 -0
  304. package/dist/testing/cross_backend/session_login.js +31 -0
  305. package/dist/testing/cross_backend/setup.d.ts +117 -0
  306. package/dist/testing/cross_backend/setup.d.ts.map +1 -1
  307. package/dist/testing/cross_backend/setup.js +193 -9
  308. package/dist/testing/cross_backend/simple_request.d.ts.map +1 -1
  309. package/dist/testing/cross_backend/simple_request.js +5 -0
  310. package/dist/testing/cross_backend/spine_suites.d.ts +9 -1
  311. package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
  312. package/dist/testing/cross_backend/spine_suites.js +88 -5
  313. package/dist/testing/cross_backend/spine_surface_constants.d.ts +1 -1
  314. package/dist/testing/cross_backend/spine_surface_constants.d.ts.map +1 -1
  315. package/dist/testing/cross_backend/spine_surface_constants.js +1 -0
  316. package/dist/testing/cross_backend/sse_round_trip.d.ts +8 -5
  317. package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
  318. package/dist/testing/cross_backend/sse_round_trip.js +205 -64
  319. package/dist/testing/cross_backend/testing_backdoor.d.ts.map +1 -1
  320. package/dist/testing/cross_backend/testing_backdoor.js +5 -2
  321. package/dist/testing/cross_backend/testing_credential_read.d.ts +165 -0
  322. package/dist/testing/cross_backend/testing_credential_read.d.ts.map +1 -0
  323. package/dist/testing/cross_backend/testing_credential_read.js +175 -0
  324. package/dist/testing/cross_backend/testing_reset_actions.d.ts +19 -0
  325. package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
  326. package/dist/testing/cross_backend/testing_reset_actions.js +22 -6
  327. package/dist/testing/cross_backend/token_lifetime.d.ts.map +1 -1
  328. package/dist/testing/cross_backend/token_lifetime.js +58 -2
  329. package/dist/testing/cross_backend/transport_composition.d.ts +2 -4
  330. package/dist/testing/cross_backend/transport_composition.d.ts.map +1 -1
  331. package/dist/testing/cross_backend/transport_composition.js +13 -10
  332. package/dist/testing/cross_backend/ts_spine_backend_config.d.ts.map +1 -1
  333. package/dist/testing/cross_backend/ts_spine_backend_config.js +5 -3
  334. package/dist/testing/cross_backend/ws_endpoint.d.ts +11 -1
  335. package/dist/testing/cross_backend/ws_endpoint.d.ts.map +1 -1
  336. package/dist/testing/cross_backend/ws_endpoint.js +19 -2
  337. package/dist/testing/cross_backend/ws_role_gated.d.ts.map +1 -1
  338. package/dist/testing/cross_backend/ws_role_gated.js +2 -3
  339. package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
  340. package/dist/testing/cross_backend/ws_round_trip.js +28 -12
  341. package/dist/testing/cross_backend/xfail.d.ts +44 -11
  342. package/dist/testing/cross_backend/xfail.d.ts.map +1 -1
  343. package/dist/testing/cross_backend/xfail.js +68 -23
  344. package/dist/testing/data_exposure.d.ts.map +1 -1
  345. package/dist/testing/data_exposure.js +4 -3
  346. package/dist/testing/integration.d.ts +1 -2
  347. package/dist/testing/integration.d.ts.map +1 -1
  348. package/dist/testing/integration.js +14 -8
  349. package/dist/testing/integration_helpers.d.ts +50 -3
  350. package/dist/testing/integration_helpers.d.ts.map +1 -1
  351. package/dist/testing/integration_helpers.js +87 -9
  352. package/dist/testing/middleware.d.ts +3 -1
  353. package/dist/testing/middleware.d.ts.map +1 -1
  354. package/dist/testing/middleware.js +14 -7
  355. package/dist/testing/resolved_auth.d.ts +3 -1
  356. package/dist/testing/resolved_auth.d.ts.map +1 -1
  357. package/dist/testing/resolved_auth.js +4 -4
  358. package/dist/testing/round_trip.d.ts +6 -2
  359. package/dist/testing/round_trip.d.ts.map +1 -1
  360. package/dist/testing/round_trip.js +17 -6
  361. package/dist/testing/rpc_envelope_cases.d.ts.map +1 -1
  362. package/dist/testing/rpc_envelope_cases.js +7 -0
  363. package/dist/testing/rpc_helpers.d.ts +4 -2
  364. package/dist/testing/rpc_helpers.d.ts.map +1 -1
  365. package/dist/testing/rpc_helpers.js +6 -1
  366. package/dist/testing/rpc_round_trip.d.ts +13 -2
  367. package/dist/testing/rpc_round_trip.d.ts.map +1 -1
  368. package/dist/testing/rpc_round_trip.js +25 -6
  369. package/dist/testing/schema_generators.d.ts +2 -2
  370. package/dist/testing/schema_generators.d.ts.map +1 -1
  371. package/dist/testing/schema_generators.js +4 -4
  372. package/dist/testing/stubs.d.ts +2 -2
  373. package/dist/testing/stubs.d.ts.map +1 -1
  374. package/dist/testing/stubs.js +13 -10
  375. package/dist/testing/transports/fetch_transport.d.ts +6 -3
  376. package/dist/testing/transports/fetch_transport.d.ts.map +1 -1
  377. package/dist/testing/transports/fetch_transport.js +31 -19
  378. package/dist/testing/transports/raw_http.d.ts +61 -1
  379. package/dist/testing/transports/raw_http.d.ts.map +1 -1
  380. package/dist/testing/transports/raw_http.js +61 -1
  381. package/dist/testing/transports/ws_raw_client.d.ts +20 -0
  382. package/dist/testing/transports/ws_raw_client.d.ts.map +1 -1
  383. package/dist/testing/transports/ws_raw_client.js +10 -4
  384. package/dist/testing/transports/ws_transport.d.ts +21 -1
  385. package/dist/testing/transports/ws_transport.d.ts.map +1 -1
  386. package/dist/testing/transports/ws_transport.js +58 -20
  387. package/dist/testing/ws_round_trip.d.ts.map +1 -1
  388. package/dist/testing/ws_round_trip.js +8 -4
  389. package/package.json +1 -1
@@ -179,18 +179,19 @@ and `FrontendActionHandlers`.
179
179
 
180
180
  ## Single JSON-RPC 2.0 endpoint (`actions/action_rpc.ts`)
181
181
 
182
- `create_rpc_endpoint({path, actions, log, action_ip_rate_limiter, action_account_rate_limiter}): RouteSpec[]`
182
+ `create_rpc_endpoint({path, actions, log, action_ip_rate_limiter, action_account_rate_limiter, notification_sender}): RouteSpec[]`
183
183
  produces **two** route specs on the same path (GET + POST) that share one
184
184
  internal dispatcher. The two limiters are required `RateLimiter | null` with
185
185
  no default — `null` is the explicit off switch — and the same holds on
186
186
  `register_action_ws`, so a hand mount can't run
187
187
  unthrottled by omission. `create_app_server` passes its own to every endpoint
188
- it mounts (../../../docs/usage.md §Rate limiters). Per-action auth lives inside the dispatcher; the outer routes
188
+ it mounts (../../../docs/usage.md §Rate limiters). `notification_sender` is
189
+ required on both the same way (§Notification sender). Per-action auth lives inside the dispatcher; the outer routes
189
190
  use `auth: {account: 'none', actor: 'none'}` and `transaction: false`.
190
191
 
191
192
  The HTTP RPC dispatcher is a thin shim around `perform_action`
192
193
  (`actions/perform_action.ts`). The shim owns wire-shape concerns (envelope
193
- parsing, GET vs POST split, the envelope responses — each a `route_raw`); the
194
+ parsing, GET vs POST split, the envelope responses — each a `route_raw` data result); the
194
195
  auth/validation/dispatch pipeline is shared with the WebSocket dispatcher.
195
196
 
196
197
  **Phase order: 401 → authz → 403 → 429 → 400 → handler.** Authorize first,
@@ -205,12 +206,12 @@ spines, and an authorized one is `invalid_params`.
205
206
 
206
207
  Shim responsibilities (per-request):
207
208
 
208
- 1. Parse envelope (POST body / GET query string, each through `parse_json_text`, `http/json_text.ts`, so JSON the Rust spine refuses is refused here too); parse errors → `parse_error` 400, a `GET` `params` that is no JSON `invalid_params`. GET reads `method` / `id` / `params` via Hono's `c.req.query()` — first occurrence wins on a duplicated key, unknown keys are ignored, and an empty value counts as missing. This is the cross-impl contract (the Rust GET dispatch mirrors it via `fuz_http`'s `query_first`, including the id numeric-vs-string normalization), pinned by the `query_shape` cross suite.
209
+ 1. Parse envelope (POST body / GET query string, each through `parse_json_text`, `http/json_text.ts`, so JSON the Rust spine refuses is refused here too); parse errors → `parse_error` 400, a `GET` `params` that is no JSON `invalid_params`. GET reads `method` / `id` / `params` with `query_first` over `route.query_pairs` (the query decoded strictly, `http/request_target.ts`) — a query holding an escape that doesn't decode is `invalid_request` on `id: null` with reason `undecodable query string` (`RPC_GET_UNDECODABLE_QUERY_REASON`), ahead of the method lookup; first occurrence wins on a duplicated key, unknown keys are ignored, and an empty value counts as missing. This is the cross-impl contract (the Rust GET dispatch mirrors it via `fuz_http`'s `query_first`, including the id numeric-vs-string normalization), pinned by the `query_shape` cross suite.
209
210
  2. Lookup method in the `compile_action_registry`-built map; unknown → `method_not_found`.
210
- 3. GET read restriction — GET rejected for `side_effects: true` actions. Every response the GET handler writes, its refusals included, carries `Cache-Control: no-store` (`RPC_GET_CACHE_CONTROL`; a pre-handler middleware refusal, like the origin 403, does not): a read answers one caller at one moment.
211
- 4. Build `PerformActionInput` from `get_resolved_auth(c)` + `get_client_ip` + `c.req.raw.signal`. Test-preset escape hatch reads `has_test_context_preset(c)` + `REQUEST_CONTEXT_KEY`.
211
+ 3. GET read restriction — GET rejected for `side_effects: true` actions. Every answer of the GET route carries `Cache-Control: no-store` (`RPC_GET_CACHE_CONTROL`), declared as the spec's `response_headers`, so the handler's refusals and the error catch's 500 carry it too; a refusal by middleware ahead of the route, like the origin 403, does not: a read answers one caller at one moment.
212
+ 4. Build `PerformActionInput` from the route context: `route.credential`, `route.client_ip`, `route.signal`. The test-preset escape hatch reads `route.has_test_context_preset` and `route.auth`.
212
213
  5. Call `perform_action` (shared core).
213
- 6. Bind result via `serialize_action_result(id, result, method, log)` (`actions/perform_action.ts`, shared with WS) → `{body, status}`, written with `c.json`'s bytes and content type and returned as a `route_raw`, as is every envelope the shim answers: no REST definition describes one.
214
+ 6. Bind result via `serialize_action_result(id, result, method, log)` (`actions/perform_action.ts`, shared with WS) → `{body, status}`, spelled with `c.json`'s bytes and content type as a `route_raw` data result, as is every envelope the shim answers: no REST definition describes one.
214
215
 
215
216
  Error paths: `ThrownJsonrpcError` (recognized through
216
217
  `to_thrown_jsonrpc_error` in `http/jsonrpc_errors.ts` by its realm-global
@@ -247,6 +248,7 @@ interface ActionContext {
247
248
  credential_type: BuiltinCredentialType | null; // same value the credential_types gate consumed
248
249
  log: Logger;
249
250
  notify: (method, params) => void; // HTTP: DEV-mode warn + drop; WS: socket-scoped
251
+ notification_sender: NotificationSender; // every socket of an account, on every mounted registry; never null
250
252
  signal: AbortSignal; // HTTP: client-disconnect; WS: AbortSignal.any([socket_close, request_cancel])
251
253
  }
252
254
 
@@ -261,7 +263,9 @@ interface RpcAction {
261
263
  `rpc_action<TSpec extends RequestResponseActionSpec>(spec, handler)` pins
262
264
  the handler's input / output types to `Infer<TSpec['input']>` /
263
265
  `Infer<TSpec['output']>` and tightens `ctx.auth` per the conditional
264
- `HandlerForSpec<TSpec>`:
266
+ `HandlerForSpec<TSpec>`, built on `RequestContextForAuth`
267
+ (`auth/request_context.ts`) — the same narrowing a REST handler's
268
+ `route.auth` takes:
265
269
 
266
270
  - `auth.actor === 'required'` → `ctx.auth: RequestActorContext`.
267
271
  - `auth.account === 'required' && auth.actor === 'none'` → `ctx.auth: RequestContext`.
@@ -273,11 +277,9 @@ at the factory call instead of at runtime. The bracketed form
273
277
  `AuthAxisState` union (when the spec was typed without preserving its
274
278
  literal) falls through to the loosest tier instead of the narrowest.
275
279
 
276
- zzz uses a codegen-driven `Record<Method, Handler>` map for the same
277
- narrowing — ideal when handlers are stateless free functions. fuz_app's
278
- handlers close over factory-captured deps (`log`, `audit`,
279
- `options.app_settings`, `options.max_tokens`), so per-pair typing via
280
- `rpc_action()` is the right shape here.
280
+ fuz_app's handlers close over factory-captured deps (`log`, `audit`,
281
+ `options.max_tokens`), so per-pair typing via `rpc_action()` is the shape
282
+ that fits.
281
283
 
282
284
  ## Shared dispatch core (`actions/perform_action.ts`)
283
285
 
@@ -295,12 +297,13 @@ Pipeline (401 → authz → 403 → 429 → 400 → handler):
295
297
  5. Validate params (400) — first, one walk of object params (`scan_json_value` in `http/schema_helpers.ts`, iterative) refuses, on every input, an own `__proto__` key at any depth with `data.reason` `params_proto_key` (`ERROR_PARAMS_PROTO_KEY`), then U+0000 in any string or key with `params_nul` (`ERROR_PARAMS_NUL` — Postgres refuses it in `text` and `jsonb`); the Rust twin walks after its params-shape check, so a non-object `params` stays the schema's reasonless refusal; then `spec.input` parses them (`parse`) with void / `?? {}` rules; a void input (`is_void_schema`: `s.void`) reads absent, `null` (GET `?params=null`), and `{}` alike as the no-arg call (`to_input_params` in `http/schema_helpers.ts`, via `to_void_params`, the twin of the Rust `require_void_params`; the peer receive path in `ActionDispatcher` runs the same normalizer) and refuses any other shape. A refusal is `to_invalid_params_error`: the generic `invalid params`, `data.reason` when the first issue's field declares an `invalid_reason` in its `meta` and no issue sits on the input itself, such as an unknown key (`resolve_issues_invalid_reason`, `schema_meta.ts` — see ../../../docs/architecture.md §Error Schema System), and the issues DEV-only, as `WireIssue`s (`to_wire_issues`)
296
298
  6. Dispatch + DEV output validation + error normalization — `spec.side_effects` picks transaction vs pool. `ThrownJsonrpcError` preserves code + data; generic throws become `internal_error`
297
299
 
298
- `PerformActionInput` carries `auth` (the request's `ResolvedAuth`, `null` for
300
+ `PerformActionInput` carries `credential` (the request's `ResolvedAuth`, `null` for
299
301
  anonymous — the authorization phase reads its account, the post-authorization
300
302
  gates its type and scope, `ActionContext` its type and session hash),
301
303
  `client_ip`, `signal`, `notify`, optional `connection_id`, optional `preset`.
302
304
  `PerformActionDeps` carries `db` (pool-level), `pending_effects`, `log`,
303
- the two rate limiters. Audit writes are out-of-band: factories close over
305
+ the two rate limiters, and `notification_sender` — put on the context, wrapped
306
+ under DEV in `create_validated_notification_sender` once per dispatch. Audit writes are out-of-band: factories close over
304
307
  `AppDeps.audit` independently.
305
308
 
306
309
  Authorization-phase resolution failures from the auth domain come back as
@@ -594,8 +597,8 @@ Fan-out, to admitted connections only, each returning how many connections
594
597
  accepted the message: `broadcast(notification)` to every connection;
595
598
  `broadcast_filtered(message, predicate)` runs per-connection ACL predicate over
596
599
  `ConnectionIdentity`; `send_to_account` wraps `broadcast_filtered` and
597
- structurally satisfies `NotificationSender` (see `auth/CLAUDE.md` §WS
598
- notifications). A server→client request has no broadcast form; it targets one
600
+ structurally satisfies `NotificationSender` (§Notification sender; the
601
+ role-grant-offer sends: `auth/CLAUDE.md` §WS notifications). A server→client request has no broadcast form; it targets one
599
602
  connection (`request_connection`, below).
600
603
 
601
604
  Server→client request/response (ActionPeer): `request_connection(connection_id,
@@ -759,6 +762,20 @@ identifiers, and an outcome outside the enum is no revocation. Reacting to them
759
762
  another user's connection by guessing a session hash or token id. Twin of the
760
763
  Rust spine's `register_revocation_guard`.
761
764
 
765
+ ## Notification sender (`actions/notification_sender.ts`)
766
+
767
+ `NotificationSender` (`send_to_account(account_id, message): number`, which a
768
+ `ConnectionRegistry` satisfies) is what a handler sends through, as
769
+ `ctx.notification_sender` on every `ActionContext`, so no factory takes one.
770
+ `AppDeps.notification_sender` is the backend's `RealtimeNotificationSender`,
771
+ one fan-out over every WS registry (twin of the Rust
772
+ `backend.notification_sender()`); `create_app_server` adds each registry it
773
+ mounts and removes it on `close` or a failed assembly. Both dispatchers
774
+ require it; a hand mount passes `backend.deps.notification_sender` (or
775
+ `noop_notification_sender`) and adds its own registry
776
+ (../../../docs/usage.md §WebSocket Endpoint). Membership and failure rules:
777
+ TSDoc. The role-grant-offer sends: `auth/CLAUDE.md` §WS notifications.
778
+
762
779
  ## WebSocket endpoints
763
780
 
764
781
  ### `create_app_server.ws_endpoints` — canonical mount surface
@@ -768,7 +785,8 @@ of `WsEndpointSpec` or a factory
768
785
  `(ctx: AppServerContext) => ReadonlyArray<WsEndpointSpec>`; factory form
769
786
  runs after server context is assembled so action lists can depend on
770
787
  `ctx.deps` / `ctx.action_*_rate_limiter`. Each entry is auto-mounted via
771
- `register_action_ws` against the assembled Hono app.
788
+ `register_action_ws` against the assembled Hono app, and its registry added to
789
+ `deps.notification_sender` and `deps.connection_closer`.
772
790
 
773
791
  `upgrade_websocket: UpgradeWebSocket` is the Hono runtime adapter's
774
792
  module-level helper — `upgradeWebSocket` from `@hono/bun`, or from
@@ -841,12 +859,12 @@ shape `{account: 'required', actor: 'required', roles?, required_scope:
841
859
  1. `verify_request_source(allowed_origins)` — 403
842
860
  2. `require_auth` — 401
843
861
  3. `require_token_scope('surface:ws_upgrade')` — a narrowed token cannot hold a socket (403 `token_scope_required`)
844
- 4. The authorization phase (`run_authorization_phase`, `auth/request_context.ts`) — resolves the acting actor (`?acting=` through `parse_acting`; malformed reads as omitted, and the route declares no query schema, so a credential-less `?acting=garbage` is still the 401), seeds `REQUEST_CONTEXT_KEY`
862
+ 4. The authorization phase (`run_authorization_phase`, `auth/request_context.ts`) — resolves the acting actor (`?acting=` through `parse_acting`; malformed reads as omitted, and the route declares no query schema, so a credential-less `?acting=garbage` is still the 401; a query holding an escape that doesn't decode is refused here, 400 `invalid_query_params`, after the 401 and the scope gate), seeds `REQUEST_CONTEXT_KEY`
845
863
  5. `require_role(required_roles)` when the endpoint is gated — any-of disjunction (coarse upgrade-time gate; per-action `auth` in each spec still applies at dispatch time)
846
864
  6. `upgradeWebSocket`
847
865
 
848
866
  Only `GET` is mounted (Hono serves `HEAD` through it, guards included), so any
849
- other method on the path is a 404. Takes
867
+ other method on the path is the app's 405 (`Allow: GET, HEAD`; `server/unmatched_route.ts`), and a `GET` asking for no upgrade its 404. Takes
850
868
  `allowed_origins` (required — `create_app_server` passes the server's), the
851
869
  required `connection_closer` and action limiters, and optional
852
870
  `required_roles`; returns `{registry}`. Most consumers reach for
@@ -16,11 +16,20 @@ import type { Logger } from '@fuzdev/fuz_util/log.ts';
16
16
  import type { RpcAction } from './action_types.js';
17
17
  import { type RouteSpec } from '../http/route_spec.js';
18
18
  import type { RateLimiter } from '../rate_limiter.js';
19
+ import type { NotificationSender } from './notification_sender.js';
19
20
  /**
20
- * The `Cache-Control` every response of the RPC endpoint's `GET` route carries
21
- * — a read is per caller and per moment, so nothing may store it.
21
+ * The `Cache-Control` every answer of the RPC endpoint's `GET` route carries
22
+ * — a read is per caller and per moment, so nothing may store it. Declared as
23
+ * the route's `response_headers`, so the error catch's answer carries it too.
22
24
  */
23
25
  export declare const RPC_GET_CACHE_CONTROL = "no-store";
26
+ /**
27
+ * The `data.reason` of the RPC `GET`'s `invalid_request` when an escape in
28
+ * its query string doesn't decode (`read_query_pairs`) — before any key is
29
+ * read, so the answer echoes no id. The Rust spine's `rpc_get_handler`
30
+ * answers the same literal.
31
+ */
32
+ export declare const RPC_GET_UNDECODABLE_QUERY_REASON = "undecodable query string";
24
33
  /** Options for `create_rpc_endpoint`. */
25
34
  export interface CreateRpcEndpointOptions {
26
35
  /** Mount path for the endpoint (e.g., `/api/rpc`). */
@@ -48,6 +57,15 @@ export interface CreateRpcEndpointOptions {
48
57
  * Share one instance with the WebSocket action dispatcher.
49
58
  */
50
59
  action_account_rate_limiter: RateLimiter | null;
60
+ /**
61
+ * What every handler's `ctx.notification_sender` sends through. Required,
62
+ * with no default, like the limiters: a sender left out would drop every
63
+ * notification silently. `create_app_server` passes the backend's
64
+ * (`AppDeps.notification_sender`), which reaches the WebSocket registries
65
+ * it mounts; a hand mount with no live connection to reach passes
66
+ * `noop_notification_sender`.
67
+ */
68
+ notification_sender: NotificationSender;
51
69
  }
52
70
  /**
53
71
  * Single JSON-RPC 2.0 endpoint — the canonical RPC transport binding.
@@ -74,9 +92,10 @@ export interface CreateRpcEndpointOptions {
74
92
  * 8. **Dispatch** — acquire DB handle (transaction for mutations, pool for reads),
75
93
  * construct `ActionContext`, call handler, return JSON-RPC response.
76
94
  *
77
- * GET is restricted to `side_effects: false` actions, and every response the
78
- * GET handler writes, its refusals included, carries `Cache-Control: no-store`
79
- * (`RPC_GET_CACHE_CONTROL`) — a refusal by middleware ahead of it does not.
95
+ * GET is restricted to `side_effects: false` actions, and every answer of the
96
+ * GET route, its refusals and the error catch's included, carries
97
+ * `Cache-Control: no-store` (`RPC_GET_CACHE_CONTROL`, its `response_headers`)
98
+ * — a refusal by middleware ahead of the route does not.
80
99
  * All errors use JSON-RPC format: `{jsonrpc, id, error: {code, message, data?}}`.
81
100
  *
82
101
  * The RouteSpecs use `auth: {type: 'none'}` because auth is checked per-action
@@ -87,7 +106,7 @@ export interface CreateRpcEndpointOptions {
87
106
  * middleware's scope (`assert_credential_routes_in_auth_scope`) whether it
88
107
  * arrives as `rpc_endpoints` or through `create_route_specs`.
89
108
  *
90
- * @param options - endpoint path, actions, logger, and the two action rate limiters
109
+ * @param options - endpoint path, actions, logger, the two action rate limiters, and the notification sender
91
110
  * @returns route specs (GET + POST) ready for `apply_route_specs`
92
111
  * @throws Error if two actions share the same `spec.method` (registration-time
93
112
  * duplicate detection); also throws if any action's `spec.input` is a null
@@ -1 +1 @@
1
- {"version":3,"file":"action_rpc.d.ts","sourceRoot":"","sources":["../../src/lib/actions/action_rpc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAmC,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAiBxF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;A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,CAAC;IACZ;;;;;;;;OAQG;IACH,sBAAsB,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3C;;;;;;;OAOG;IACH,2BAA2B,EAAE,WAAW,GAAG,IAAI,CAAC;IAChD;;;;;;;OAOG;IACH,mBAAmB,EAAE,kBAAkB,CAAC;CACxC;AAaD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,eAAO,MAAM,mBAAmB,GAAI,SAAS,wBAAwB,KAAG,KAAK,CAAC,SAAS,CAkOtF,CAAC"}
@@ -17,28 +17,33 @@ import { literal, unknown } from '@fuzdev/fuz_schema/schema.ts';
17
17
  import { UnreachableError } from '@fuzdev/fuz_util/error.ts';
18
18
  import { define_route } from '../http/route_spec.js';
19
19
  import { route_raw } from '../http/route_result.js';
20
- import { get_client_ip } from '../http/client_ip.js';
21
- import { get_request_context } from '../auth/request_context.js';
22
- import { get_resolved_auth } from '../auth/resolved_auth.js';
23
- import { has_test_context_preset } from '../hono_context.js';
24
20
  import { compile_action_registry } from './compile_action_registry.js';
25
21
  import { jsonrpc_error_messages, jsonrpc_error_code_to_http_status, JSONRPC_ERROR_CODES } from '../http/jsonrpc_errors.js';
26
22
  import { classify_jsonrpc_message, create_jsonrpc_error_response } from '../http/jsonrpc_helpers.js';
27
23
  import { perform_action, serialize_action_result } from './perform_action.js';
28
- import { parse_json_text, read_json_body } from '../http/json_text.js';
24
+ import { parse_json_text } from '../http/json_text.js';
25
+ import { query_first } from '../http/request_target.js';
29
26
  /**
30
- * The `Cache-Control` every response of the RPC endpoint's `GET` route carries
31
- * — a read is per caller and per moment, so nothing may store it.
27
+ * The `Cache-Control` every answer of the RPC endpoint's `GET` route carries
28
+ * — a read is per caller and per moment, so nothing may store it. Declared as
29
+ * the route's `response_headers`, so the error catch's answer carries it too.
32
30
  */
33
31
  export const RPC_GET_CACHE_CONTROL = 'no-store';
32
+ /**
33
+ * The `data.reason` of the RPC `GET`'s `invalid_request` when an escape in
34
+ * its query string doesn't decode (`read_query_pairs`) — before any key is
35
+ * read, so the answer echoes no id. The Rust spine's `rpc_get_handler`
36
+ * answers the same literal.
37
+ */
38
+ export const RPC_GET_UNDECODABLE_QUERY_REASON = 'undecodable query string';
39
+ /** The `Content-Type` `c.json` writes, which every envelope answers with. */
40
+ const JSON_CONTENT_TYPE = { 'Content-Type': 'application/json' };
34
41
  /**
35
42
  * A JSON-RPC envelope answered at `status`, with the bytes and `Content-Type`
36
43
  * `c.json` writes, as a raw result: the endpoint answers envelopes, its
37
44
  * refusals included, which no REST definition describes.
38
45
  */
39
- const envelope_response = (c, envelope, status) => route_raw(c.body(JSON.stringify(envelope), status, {
40
- 'Content-Type': 'application/json'
41
- }));
46
+ const envelope_response = (envelope, status) => route_raw({ status, headers: JSON_CONTENT_TYPE, body: JSON.stringify(envelope) });
42
47
  /**
43
48
  * Single JSON-RPC 2.0 endpoint — the canonical RPC transport binding.
44
49
  *
@@ -64,9 +69,10 @@ const envelope_response = (c, envelope, status) => route_raw(c.body(JSON.stringi
64
69
  * 8. **Dispatch** — acquire DB handle (transaction for mutations, pool for reads),
65
70
  * construct `ActionContext`, call handler, return JSON-RPC response.
66
71
  *
67
- * GET is restricted to `side_effects: false` actions, and every response the
68
- * GET handler writes, its refusals included, carries `Cache-Control: no-store`
69
- * (`RPC_GET_CACHE_CONTROL`) — a refusal by middleware ahead of it does not.
72
+ * GET is restricted to `side_effects: false` actions, and every answer of the
73
+ * GET route, its refusals and the error catch's included, carries
74
+ * `Cache-Control: no-store` (`RPC_GET_CACHE_CONTROL`, its `response_headers`)
75
+ * — a refusal by middleware ahead of the route does not.
70
76
  * All errors use JSON-RPC format: `{jsonrpc, id, error: {code, message, data?}}`.
71
77
  *
72
78
  * The RouteSpecs use `auth: {type: 'none'}` because auth is checked per-action
@@ -77,7 +83,7 @@ const envelope_response = (c, envelope, status) => route_raw(c.body(JSON.stringi
77
83
  * middleware's scope (`assert_credential_routes_in_auth_scope`) whether it
78
84
  * arrives as `rpc_endpoints` or through `create_route_specs`.
79
85
  *
80
- * @param options - endpoint path, actions, logger, and the two action rate limiters
86
+ * @param options - endpoint path, actions, logger, the two action rate limiters, and the notification sender
81
87
  * @returns route specs (GET + POST) ready for `apply_route_specs`
82
88
  * @throws Error if two actions share the same `spec.method` (registration-time
83
89
  * duplicate detection); also throws if any action's `spec.input` is a null
@@ -86,7 +92,7 @@ const envelope_response = (c, envelope, status) => route_raw(c.body(JSON.stringi
86
92
  * or its `spec.output` is a void schema.
87
93
  */
88
94
  export const create_rpc_endpoint = (options) => {
89
- const { path: endpoint_path, actions, log, action_ip_rate_limiter, action_account_rate_limiter } = options;
95
+ const { path: endpoint_path, actions, log, action_ip_rate_limiter, action_account_rate_limiter, notification_sender } = options;
90
96
  const { action_map } = compile_action_registry(actions, 'RPC action');
91
97
  /**
92
98
  * HTTP-shape dispatch shim — the GET/POST entry points share this:
@@ -102,13 +108,13 @@ export const create_rpc_endpoint = (options) => {
102
108
  *
103
109
  * @param restrict_to_reads - `true` for GET (rejects `side_effects: true` actions)
104
110
  */
105
- const dispatch = async (c, route, method_name, raw_params, id, restrict_to_reads) => {
111
+ const dispatch = async (route, method_name, raw_params, id, restrict_to_reads) => {
106
112
  const action = action_map.get(method_name);
107
113
  if (!action) {
108
- return envelope_response(c, create_jsonrpc_error_response(id, jsonrpc_error_messages.method_not_found(method_name)), jsonrpc_error_code_to_http_status(JSONRPC_ERROR_CODES.method_not_found));
114
+ return envelope_response(create_jsonrpc_error_response(id, jsonrpc_error_messages.method_not_found(method_name)), jsonrpc_error_code_to_http_status(JSONRPC_ERROR_CODES.method_not_found));
109
115
  }
110
116
  if (restrict_to_reads && action.spec.side_effects) {
111
- return envelope_response(c, create_jsonrpc_error_response(id, jsonrpc_error_messages.invalid_request({
117
+ return envelope_response(create_jsonrpc_error_response(id, jsonrpc_error_messages.invalid_request({
112
118
  reason: `method '${method_name}' has side effects and must use POST`
113
119
  })), jsonrpc_error_code_to_http_status(JSONRPC_ERROR_CODES.invalid_request));
114
120
  }
@@ -122,16 +128,14 @@ export const create_rpc_endpoint = (options) => {
122
128
  // set `TEST_CONTEXT_PRESET_KEY` to `TEST_CONTEXT_PRESET`. Production middleware never
123
129
  // sets the flag; the shim honors it and `perform_action` trusts the
124
130
  // pre-baked context instead of running the live authorization phase.
125
- const preset = has_test_context_preset(c)
126
- ? { request_context: get_request_context(c) }
127
- : undefined;
131
+ const preset = route.has_test_context_preset ? { request_context: route.auth } : undefined;
128
132
  const result = await perform_action({
129
133
  action,
130
134
  raw_params,
131
135
  request_id: id,
132
- auth: get_resolved_auth(c),
133
- client_ip: get_client_ip(c),
134
- signal: c.req.raw.signal,
136
+ credential: route.credential,
137
+ client_ip: route.client_ip,
138
+ signal: route.signal,
135
139
  notify,
136
140
  preset
137
141
  }, {
@@ -139,25 +143,23 @@ export const create_rpc_endpoint = (options) => {
139
143
  pending_effects: route.pending_effects,
140
144
  post_commit_effects: route.post_commit_effects,
141
145
  log,
146
+ notification_sender,
142
147
  action_ip_rate_limiter,
143
148
  action_account_rate_limiter
144
149
  });
145
150
  const { body, status } = serialize_action_result(id, result, method_name, log);
146
151
  // `status` is 200 or one of the JSON-RPC → HTTP status codes the
147
152
  // dispatcher emits (the value space is verified by
148
- // `jsonrpc_error_code_to_http_status`), which the cast to Hono's
149
- // `ContentfulStatusCode` bridges. The content type is `c.json`'s.
150
- return route_raw(c.body(body, status, {
151
- 'Content-Type': 'application/json'
152
- }));
153
+ // `jsonrpc_error_code_to_http_status`). The content type is `c.json`'s.
154
+ return route_raw({ status, headers: JSON_CONTENT_TYPE, body });
153
155
  };
154
156
  // POST handler — parse JSON-RPC envelope from body
155
- const post_handler = async (c, route) => {
157
+ const post_handler = async (route) => {
156
158
  // step 1: parse envelope
157
- const read = await read_json_body(c.req);
159
+ const read = await route.read_json_body();
158
160
  if (!read.ok) {
159
161
  const error = create_jsonrpc_error_response(null, jsonrpc_error_messages.parse_error());
160
- return envelope_response(c, error, 400);
162
+ return envelope_response(error, 400);
161
163
  }
162
164
  const body = read.value;
163
165
  // the classifier the WS path runs; HTTP issues no server-initiated
@@ -167,40 +169,42 @@ export const create_rpc_endpoint = (options) => {
167
169
  switch (classified.kind) {
168
170
  case 'request': {
169
171
  const { method, params, id } = classified.request;
170
- return dispatch(c, route, method, params, id, false);
172
+ return dispatch(route, method, params, id, false);
171
173
  }
172
174
  case 'invalid':
173
- return envelope_response(c, create_jsonrpc_error_response(classified.id, classified.error), 400);
175
+ return envelope_response(create_jsonrpc_error_response(classified.id, classified.error), 400);
174
176
  case 'notification':
175
177
  case 'response':
176
- return envelope_response(c, create_jsonrpc_error_response(null, jsonrpc_error_messages.invalid_request()), 400);
178
+ return envelope_response(create_jsonrpc_error_response(null, jsonrpc_error_messages.invalid_request()), 400);
177
179
  default:
178
180
  throw new UnreachableError(classified);
179
181
  }
180
182
  };
181
183
  // GET handler — extract method and params from query string
182
- const get_handler = async (c, route) => {
183
- // A read answers for one caller at one moment: no cache — the browser's,
184
- // a proxy's — may keep it and answer a later call, or another caller,
185
- // with it. Every response of the route, errors included.
186
- c.header('Cache-Control', RPC_GET_CACHE_CONTROL);
187
- // step 1: parse from query string
188
- const method_name = c.req.query('method');
184
+ const get_handler = async (route) => {
185
+ // step 1: parse from query string, every escape in it decoded strictly
186
+ // before any key is read, so no key reads a query another would refuse
187
+ const query = route.query_pairs;
188
+ if (!query.ok) {
189
+ const error = create_jsonrpc_error_response(null, jsonrpc_error_messages.invalid_request({ reason: RPC_GET_UNDECODABLE_QUERY_REASON }));
190
+ return envelope_response(error, 400);
191
+ }
192
+ const method_name = query_first(query.value, 'method');
189
193
  if (!method_name) {
190
194
  const error = create_jsonrpc_error_response(null, jsonrpc_error_messages.invalid_request({ reason: 'missing method query parameter' }));
191
- return envelope_response(c, error, 400);
195
+ return envelope_response(error, 400);
192
196
  }
193
- const id_raw = c.req.query('id');
197
+ const id_raw = query_first(query.value, 'id');
194
198
  if (!id_raw) {
195
199
  const error = create_jsonrpc_error_response(null, jsonrpc_error_messages.invalid_request({ reason: 'missing id query parameter' }));
196
- return envelope_response(c, error, 400);
200
+ return envelope_response(error, 400);
197
201
  }
198
202
  // parse integer ids so GET ?id=42 matches POST {id: 42} behavior
199
203
  // JSON-RPC spec: "Numbers SHOULD NOT contain fractional parts"
200
204
  const id_num = Number(id_raw);
201
205
  const id = Number.isInteger(id_num) && String(id_num) === id_raw ? id_num : id_raw;
202
206
  // parse params from query string (optional — null input schemas need no params)
203
- const params_raw = c.req.query('params');
207
+ const params_raw = query_first(query.value, 'params');
204
208
  let params;
205
209
  if (params_raw !== undefined) {
206
210
  try {
@@ -208,10 +212,10 @@ export const create_rpc_endpoint = (options) => {
208
212
  }
209
213
  catch {
210
214
  const error = create_jsonrpc_error_response(id, jsonrpc_error_messages.invalid_params('params query parameter is not valid JSON'));
211
- return envelope_response(c, error, 400);
215
+ return envelope_response(error, 400);
212
216
  }
213
217
  }
214
- return dispatch(c, route, method_name, params, id, true);
218
+ return dispatch(route, method_name, params, id, true);
215
219
  };
216
220
  return [
217
221
  define_route({
@@ -236,6 +240,10 @@ export const create_rpc_endpoint = (options) => {
236
240
  reads_credential: true,
237
241
  // answers JSON-RPC envelopes, not REST bodies
238
242
  jsonrpc: true,
243
+ // a read answers for one caller at one moment: no cache — the
244
+ // browser's, a proxy's — may keep it and answer a later call, or
245
+ // another caller, with it
246
+ response_headers: { 'Cache-Control': RPC_GET_CACHE_CONTROL },
239
247
  handler: get_handler,
240
248
  description: `JSON-RPC 2.0 endpoint (side-effect-free reads) — ${actions.length} method${actions.length === 1 ? '' : 's'}`,
241
249
  input: literal(null), // params from query string, validated by dispatcher
@@ -22,11 +22,12 @@ import type { Logger } from '@fuzdev/fuz_util/log.ts';
22
22
  import type { Infer } from '@fuzdev/fuz_schema/schema.ts';
23
23
  import type { ActionSpecUnion, RequestResponseActionSpec } from './action_spec.js';
24
24
  import type { Uuid } from '../primitive_schemas.js';
25
- import type { RequestActorContext, RequestContext } from '../auth/request_context.js';
25
+ import type { RequestActorContext, RequestContext, RequestContextForAuth } from '../auth/request_context.js';
26
26
  import type { BuiltinCredentialType } from '../auth/credential_type_schema.js';
27
27
  import type { Db } from '../db/db.js';
28
28
  import type { JsonrpcRequestId } from '../http/jsonrpc.js';
29
29
  import type { RequestClient } from './peer_request.js';
30
+ import type { NotificationSender } from './notification_sender.js';
30
31
  /**
31
32
  * A spec paired with its optional handler — the composable unit passed to
32
33
  * `register_action_ws` and `create_rpc_client`. The server uses both
@@ -133,6 +134,20 @@ export interface ActionContext {
133
134
  * the notification method this handler is expected to emit.
134
135
  */
135
136
  notify: (method: string, params: unknown) => void;
137
+ /**
138
+ * Sends a server-initiated notification to every live WebSocket connection
139
+ * of any account, from a handler on either transport — unlike `notify`,
140
+ * which reaches only the originating connection. The dispatcher supplies
141
+ * the backend's sender (`AppDeps.notification_sender`), which reaches
142
+ * every WebSocket registry the server mounts, so a send from an HTTP RPC
143
+ * handler reaches the account's sockets; with no WebSocket endpoint
144
+ * mounted it reaches no one. Queue sends after the commit
145
+ * (`emit_after_commit`, or `queue_offer_notification` for the role-grant
146
+ * notifications), never inline. Under DEV each role_grant_offer
147
+ * notification's params are checked against its spec
148
+ * (`create_validated_notification_sender`).
149
+ */
150
+ notification_sender: NotificationSender;
136
151
  /**
137
152
  * AbortSignal that fires when the originating request is cancelled
138
153
  * (client disconnect on HTTP, socket close or per-request cancel
@@ -196,21 +211,23 @@ export interface RpcAction {
196
211
  handler: ActionHandler;
197
212
  }
198
213
  /**
199
- * Conditional handler shape for `rpc_action` — picks the narrowest
200
- * `ctx.auth` type the dispatcher's runtime guarantee allows:
214
+ * The handler for a narrowed `auth` (`RequestContextForAuth`):
215
+ * `ActorActionHandler` for an acting actor, `AuthActionHandler` for an
216
+ * account, `ActionHandler` otherwise.
217
+ */
218
+ type HandlerForAuth<TAuth extends RequestContext | null, TInput, TOutput> = [TAuth] extends [
219
+ RequestActorContext
220
+ ] ? ActorActionHandler<TInput, TOutput> : [TAuth] extends [RequestContext] ? AuthActionHandler<TInput, TOutput> : ActionHandler<TInput, TOutput>;
221
+ /**
222
+ * Conditional handler shape for `rpc_action` — the narrowest `ctx.auth` the
223
+ * dispatcher's runtime guarantee allows, read off the spec's `auth` by
224
+ * `RequestContextForAuth`, the narrowing REST route handlers share:
201
225
  *
202
226
  * - `auth.actor === 'required'` → `ActorActionHandler` (`ctx.auth: RequestActorContext`).
203
227
  * - `auth.account === 'required' && auth.actor === 'none'` → `AuthActionHandler` (`ctx.auth: RequestContext`).
204
- * - else (public, optional axes) → `ActionHandler` (`ctx.auth: RequestContext | null`).
205
- *
206
- * The bracketed form `[T] extends ['required']` defeats distributive
207
- * conditionals so a degraded `AuthAxisState` union (when the spec was
208
- * typed without preserving its literal) falls through to the loosest
209
- * tier instead of collapsing to the narrowest.
228
+ * - else (public, optional axes, a degraded union) → `ActionHandler` (`ctx.auth: RequestContext | null`).
210
229
  */
211
- export type HandlerForSpec<TSpec extends RequestResponseActionSpec> = [
212
- TSpec['auth']['actor']
213
- ] extends ['required'] ? ActorActionHandler<Infer<TSpec['input']>, Infer<TSpec['output']>> : [TSpec['auth']['account']] extends ['required'] ? AuthActionHandler<Infer<TSpec['input']>, Infer<TSpec['output']>> : ActionHandler<Infer<TSpec['input']>, Infer<TSpec['output']>>;
230
+ export type HandlerForSpec<TSpec extends RequestResponseActionSpec> = HandlerForAuth<RequestContextForAuth<TSpec['auth']>, Infer<TSpec['input']>, Infer<TSpec['output']>>;
214
231
  /**
215
232
  * Pair a spec with a handler while preserving per-method input/output types
216
233
  * and selecting the narrowest `ctx.auth` shape the spec literal admits.
@@ -230,7 +247,7 @@ export type HandlerForSpec<TSpec extends RequestResponseActionSpec> = [
230
247
  * runtime guarantee without a manual narrowing call.
231
248
  *
232
249
  * Fits fuz_app's factory-closure pattern (handlers close over
233
- * `grantable_roles`, `app_settings` ref, `notification_sender`, etc.).
250
+ * `grantable_roles`, `connection_closer`, etc.).
234
251
  * zzz uses a different shape — a codegen-keyed `Record<Method, Handler>`
235
252
  * map typed via generated `ActionInputs`/`ActionOutputs` — which works when
236
253
  * handlers are pure (no closure state) and specs are codegen-enumerated.
@@ -258,4 +275,5 @@ export type HandlerForSpec<TSpec extends RequestResponseActionSpec> = [
258
275
  * ```
259
276
  */
260
277
  export declare const rpc_action: <TSpec extends RequestResponseActionSpec>(spec: TSpec, handler: HandlerForSpec<TSpec>) => RpcAction;
278
+ export {};
261
279
  //# sourceMappingURL=action_types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"action_types.d.ts","sourceRoot":"","sources":["../../src/lib/actions/action_types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACtF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,MAAM,CAAC,KAAK,SAAS,eAAe,GAAG,eAAe;IACtE,IAAI,EAAE,KAAK,CAAC;IACZ,sJAAsJ;IACtJ,OAAO,CAAC,EAAE,aAAa,CAAC;CACxB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,aAAa;IAC7B,+DAA+D;IAC/D,IAAI,EAAE,cAAc,GAAG,IAA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,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,CAAC,MAAM,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,CAC7D,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,kBAAkB,KACnB,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;;;;GAIG;AACH,KAAK,cAAc,CAAC,KAAK,SAAS,cAAc,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS;IAC3F,mBAAmB;CACnB,GACE,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,CAAC,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,GAC/B,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEnC;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,CAAC,KAAK,SAAS,yBAAyB,IAAI,cAAc,CACnF,qBAAqB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EACpC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,EACrB,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CACtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,SAAS,yBAAyB,EACjE,MAAM,KAAK,EACX,SAAS,cAAc,CAAC,KAAK,CAAC,KAC5B,SAGD,CAAC"}
@@ -37,7 +37,7 @@
37
37
  * runtime guarantee without a manual narrowing call.
38
38
  *
39
39
  * Fits fuz_app's factory-closure pattern (handlers close over
40
- * `grantable_roles`, `app_settings` ref, `notification_sender`, etc.).
40
+ * `grantable_roles`, `connection_closer`, etc.).
41
41
  * zzz uses a different shape — a codegen-keyed `Record<Method, Handler>`
42
42
  * map typed via generated `ActionInputs`/`ActionOutputs` — which works when
43
43
  * handlers are pure (no closure state) and specs are codegen-enumerated.