@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
@@ -44,13 +44,12 @@
44
44
  * transaction, a failure row on the pool). `audit.notify` (SSE/WS broadcast)
45
45
  * fires post-commit in both paths.
46
46
  *
47
- * WS notifications fan out post-commit via `emit_after_commit` when a
48
- * `notification_sender` is wired: offer lifecycle transitions notify the
47
+ * WS notifications go through the handler context's sender
48
+ * (`ctx.notification_sender`), queued post-commit (`queue_offer_notification`,
49
+ * `queue_supersede_notifications`): offer lifecycle transitions notify the
49
50
  * counterparty, `role_grant_revoke` notifies the revokee (`role_grant_revoked`)
50
- * plus each superseded
51
- * pending offer's grantor. Under DEV each notification's params are checked
52
- * against its spec's schema before it is sent, a mismatch logged
53
- * (`create_validated_notification_sender`). `role_grant_revoke` of a global
51
+ * plus both parties of each superseded pending offer, and an accept each
52
+ * superseded sibling's grantor. `role_grant_revoke` of a global
54
53
  * grant also closes the revokee's connections gated on the role through
55
54
  * `deps.connection_closer`, after the commit.
56
55
  *
@@ -63,12 +62,12 @@ import { queue_connection_close } from '../actions/connection_closer.js';
63
62
  import { builtin_role_specs, is_builtin_role, ROLE_ADMIN, ROLE_KEEPER, role_has_grant_path } from './role_schema.js';
64
63
  import { GRANT_PATH_ADMIN } from './grant_path_schema.js';
65
64
  import { ROLE_GRANT_OFFER_DEFAULT_TTL_MS, to_role_grant_offer_json } from './role_grant_offer_schema.js';
66
- import { query_role_grant_offer_create, query_role_grant_offer_decline, query_role_grant_offer_retract, query_role_grant_offer_list, query_role_grant_offer_history_for_account, query_accept_offer, RoleGrantOfferActorAccountMismatchError, RoleGrantOfferActorMismatchError, RoleGrantOfferAlreadyTerminalError, RoleGrantOfferBuiltinRefusedError, RoleGrantOfferExpiredError, RoleGrantOfferNotFoundError, RoleGrantOfferSelfTargetError, query_role_grant_offer_supersede_outgoing } from './role_grant_offer_queries.js';
67
- import { query_account_has_active_global_role, query_account_has_global_role, query_count_active_accounts_with_global_role_for_update, query_create_role_grant, query_role_grant_find_active_role_for_actor, query_revoke_role_grant } from './role_grant_queries.js';
68
- import { query_actor_by_id, query_active_actors_by_account } from './account_queries.js';
65
+ import { query_role_grant_offer_create, query_role_grant_offer_decline, query_role_grant_offer_retract, query_role_grant_offer_list, query_role_grant_offer_history_for_account, query_accept_offer, RoleGrantOfferActorAccountMismatchError, RoleGrantOfferActorMismatchError, RoleGrantOfferGrantorNotActiveError, RoleGrantOfferRecipientNotActiveError, RoleGrantOfferAlreadyTerminalError, RoleGrantOfferBuiltinRefusedError, RoleGrantOfferExpiredError, RoleGrantOfferNotFoundError, RoleGrantOfferSelfTargetError, query_role_grant_offer_lock_for_revoke, query_role_grant_offer_supersede_outgoing } from './role_grant_offer_queries.js';
66
+ import { query_account_has_active_global_role, query_account_has_global_role, query_count_active_accounts_with_global_role_locked, query_create_role_grant, query_role_grant_find_active_role_for_actor, query_revoke_role_grant } from './role_grant_queries.js';
67
+ import { query_account_lock_for_revoke, query_active_actors_by_account } from './account_queries.js';
69
68
  import { has_scoped_role } from './request_context.js';
70
- import { build_role_grant_offer_accepted_notification, build_role_grant_offer_declined_notification, build_role_grant_offer_received_notification, build_role_grant_offer_retracted_notification, build_role_grant_offer_supersede_notification, build_role_grant_revoked_notification, create_validated_notification_sender } from './role_grant_offer_notifications.js';
71
- import { ERROR_INSUFFICIENT_PERMISSIONS, ERROR_ROLE_GRANT_NOT_FOUND, ERROR_ROLE_NOT_WEB_GRANTABLE } from '../http/error_schemas.js';
69
+ import { build_role_grant_offer_accepted_notification, build_role_grant_offer_declined_notification, build_role_grant_offer_received_notification, build_role_grant_offer_retracted_notification, build_role_grant_revoked_notification, queue_offer_notification, queue_supersede_notifications } from './role_grant_offer_notifications.js';
70
+ import { ERROR_AUTHENTICATION_REQUIRED, ERROR_INSUFFICIENT_PERMISSIONS, ERROR_ROLE_GRANT_NOT_FOUND, ERROR_ROLE_NOT_WEB_GRANTABLE } from '../http/error_schemas.js';
72
71
  import { ERROR_CANNOT_REVOKE_KEEPER_ADMIN, ERROR_CANNOT_REVOKE_LAST_ADMIN, ERROR_ROLE_GRANT_BUILTIN_SCOPED, ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH, ERROR_ROLE_GRANT_OFFER_ACTOR_MISMATCH, ERROR_ROLE_GRANT_OFFER_EXPIRED, ERROR_ROLE_GRANT_OFFER_NOT_AUTHORIZED, ERROR_ROLE_GRANT_OFFER_NOT_FOUND, ERROR_ROLE_GRANT_OFFER_ROLE_NOT_GRANTABLE, ERROR_ROLE_GRANT_OFFER_SELF_TARGET, ERROR_ROLE_GRANT_OFFER_TERMINAL, role_grant_offer_create_action_spec, role_grant_offer_accept_action_spec, role_grant_offer_decline_action_spec, role_grant_offer_retract_action_spec, role_grant_offer_list_action_spec, role_grant_offer_history_action_spec, role_grant_revoke_action_spec, role_grant_assign_action_spec } from './role_grant_offer_action_specs.js';
73
72
  // -- Helpers ----------------------------------------------------------------
74
73
  /**
@@ -109,17 +108,12 @@ const default_authorize = async (auth, _input, _deps, _ctx) => {
109
108
  * Create the role-grant-offer RPC actions: the offer-lifecycle methods plus
110
109
  * `role_grant_revoke` and the immediate `role_grant_assign`.
111
110
  *
112
- * @param deps - `RevokingActionFactoryDeps` (`log`, `audit`, and the `connection_closer` a revoked global grant closes the revokee's role-gated connections through) plus optional `notification_sender` for WS fan-out — when absent, WS fan-out is silently skipped (DB-only side effects still happen). Consumers wiring `ConnectionRegistry` assign its instance directly (the registry's `send_to_account` signature accepts the broader `JsonrpcMessageFromServerToClient`, which is contravariantly compatible)
111
+ * @param deps - `RevokingActionFactoryDeps`: `log`, `audit`, and the `connection_closer` a revoked global grant closes the revokee's role-gated connections through. WS notifications go through the handler context's `notification_sender`, not a dep
113
112
  * @param options - role registry, default TTL, authorization override
114
113
  * @returns the `RpcAction` array to spread into a `create_rpc_endpoint` call
115
114
  */
116
115
  export const create_role_grant_offer_actions = (deps, options = {}) => {
117
116
  const { log, audit, connection_closer } = deps;
118
- // under DEV each notification sent is checked against its spec's params
119
- // schema, a mismatch logged, as DEV output validation does
120
- const notification_sender = deps.notification_sender
121
- ? create_validated_notification_sender(deps.notification_sender, log)
122
- : null;
123
117
  const role_specs = options.roles?.role_specs ?? builtin_role_specs;
124
118
  const default_ttl_ms = options.default_ttl_ms ?? ROLE_GRANT_OFFER_DEFAULT_TTL_MS;
125
119
  const authorize = options.authorize ?? default_authorize;
@@ -181,6 +175,26 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
181
175
  });
182
176
  return error;
183
177
  };
178
+ // The refusal for a recipient that is missing or soft-deleted: an actor
179
+ // named that is no active actor of the account is the mismatch, else the
180
+ // account is not found. Offer-create and assign answer a deleted recipient
181
+ // exactly as a missing one, so the call says nothing a missing id wouldn't.
182
+ const recipient_not_found_error = (to_actor_id) => to_actor_id != null
183
+ ? jsonrpc_errors.invalid_params('to_actor_id does not belong to to_account_id', {
184
+ reason: ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH
185
+ })
186
+ : jsonrpc_errors.not_found('account');
187
+ // The recipient's active actors, refusing a recipient that can't receive a
188
+ // role: a missing or soft-deleted account (no active actor), or a named
189
+ // actor that is not one of them. Runs after every authority gate, so a
190
+ // caller refused the conferral learns nothing of the recipient.
191
+ const require_active_recipient = async (ctx, to_account_id, to_actor_id) => {
192
+ const actors = await query_active_actors_by_account(ctx, to_account_id);
193
+ if (to_actor_id != null ? !actors.some((a) => a.id === to_actor_id) : actors.length === 0) {
194
+ throw recipient_not_found_error(to_actor_id);
195
+ }
196
+ return actors;
197
+ };
184
198
  // Returns {offer} only — no auto-accept. Recipient must call
185
199
  // role_grant_offer_accept; admin tests drive the full consent flow over
186
200
  // RPC (see testing/admin_integration.ts `offer_and_accept`), or seed
@@ -224,6 +238,8 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
224
238
  reason: ERROR_ROLE_GRANT_OFFER_NOT_AUTHORIZED
225
239
  });
226
240
  }
241
+ // Both parties' rules live in the query, after every authority gate above,
242
+ // so a caller refused the conferral learns nothing of the recipient.
227
243
  let offer;
228
244
  try {
229
245
  offer = await query_role_grant_offer_create(ctx, {
@@ -244,10 +260,19 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
244
260
  reason: ERROR_ROLE_GRANT_OFFER_SELF_TARGET
245
261
  });
246
262
  }
247
- if (err instanceof RoleGrantOfferActorAccountMismatchError) {
263
+ if (err instanceof RoleGrantOfferActorAccountMismatchError ||
264
+ err instanceof RoleGrantOfferRecipientNotActiveError) {
248
265
  await emit_create_failure_audit(ctx, auth, input);
249
- throw jsonrpc_errors.invalid_params('to_actor_id does not belong to to_account_id', {
250
- reason: ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH
266
+ // a named actor is the mismatch, else the account is not found —
267
+ // the answers `role_grant_assign` gives the same recipient
268
+ throw recipient_not_found_error(input.to_actor_id);
269
+ }
270
+ // The caller's own account was deleted while the request was in flight:
271
+ // refused as the dead credential it now is, as `account_token_create`
272
+ // refuses it, with no audit row from an account that is gone.
273
+ if (err instanceof RoleGrantOfferGrantorNotActiveError) {
274
+ throw jsonrpc_errors.unauthenticated('unauthenticated', {
275
+ reason: ERROR_AUTHENTICATION_REQUIRED
251
276
  });
252
277
  }
253
278
  throw err;
@@ -268,11 +293,7 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
268
293
  }
269
294
  });
270
295
  const offer_json = to_role_grant_offer_json(offer);
271
- if (notification_sender) {
272
- emit_after_commit(ctx, () => {
273
- notification_sender.send_to_account(offer.to_account_id, build_role_grant_offer_received_notification({ offer: offer_json }));
274
- });
275
- }
296
+ queue_offer_notification(ctx, offer.to_account_id, build_role_grant_offer_received_notification({ offer: offer_json }));
276
297
  return { offer: offer_json };
277
298
  };
278
299
  const accept_handler = async (input, ctx) => {
@@ -304,47 +325,36 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
304
325
  if (err instanceof RoleGrantOfferBuiltinRefusedError) {
305
326
  throw await refuse_builtin_accept(ctx, auth, err);
306
327
  }
328
+ // The caller's own account was deleted while the request was in flight:
329
+ // refused as the dead credential it now is, as offer-create refuses a
330
+ // grantor deleted in flight, with no audit row from an account that is gone.
331
+ if (err instanceof RoleGrantOfferRecipientNotActiveError) {
332
+ throw jsonrpc_errors.unauthenticated('unauthenticated', {
333
+ reason: ERROR_AUTHENTICATION_REQUIRED
334
+ });
335
+ }
307
336
  throw err;
308
337
  }
309
- // Look up the grantor's account_id inside the transaction so the
310
- // post-commit notification has a valid target. One cheap SELECT by
311
- // PK — the alternative (widening `query_accept_offer` again) would
312
- // bleed transport concerns into the query layer. A replay
313
- // (`created: false`) notifies nothing, so it skips the lookup.
314
- const grantor_actor = notification_sender && result.created
315
- ? await query_actor_by_id(ctx, result.offer.from_actor_id)
316
- : null;
317
- const grantor_account_id = grantor_actor?.account_id ?? null;
318
338
  const offer_json = to_role_grant_offer_json(result.offer);
319
- const supersede_payloads = result.superseded_offers.map((sib) => ({
320
- offer: to_role_grant_offer_json(sib),
321
- from_account_id: sib.from_account_id
322
- }));
323
339
  // Audit events are written in-transaction by query_accept_offer; wire
324
340
  // them through `audit.notify` post-commit so SSE/WS broadcasts fire.
325
- // WS notifications ride the same deferred post-commit thunk so the
326
- // grantor sees "accepted" and each superseded grantor sees "supersede"
327
- // only once the accept has durably committed — and never if it rolls
328
- // back (the dispatch site discards `post_commit_effects` on rollback).
329
- // A replay (or a race loser) wrote nothing — the accept that minted the
330
- // grant already audited it and notified the grantor — so it queues
331
- // nothing; repeating the notification would let any replay send them
332
- // without bound.
341
+ // The WS notifications are queued behind them on the same post-commit
342
+ // queue, so the grantor sees "accepted" and each superseded grantor sees
343
+ // "supersede" only once the accept has durably committed — and never if
344
+ // it rolls back (the dispatch site discards `post_commit_effects` on
345
+ // rollback). A replay (or a race loser) wrote nothing — the accept that
346
+ // minted the grant already audited it and notified the grantor — so it
347
+ // queues nothing; repeating the notification would let any replay send
348
+ // them without bound. Only the siblings' grantors hear the supersede: their
349
+ // recipient is the caller, whose answer lists `superseded_offer_ids`.
333
350
  if (result.created) {
334
351
  emit_after_commit(ctx, () => {
335
352
  fan_out_audit_events(result.audit_events, audit);
336
- if (notification_sender && grantor_account_id) {
337
- notification_sender.send_to_account(grantor_account_id, build_role_grant_offer_accepted_notification({ offer: offer_json }));
338
- }
339
- if (notification_sender) {
340
- for (const sib of supersede_payloads) {
341
- notification_sender.send_to_account(sib.from_account_id, build_role_grant_offer_supersede_notification({
342
- offer: sib.offer,
343
- reason: 'sibling_accepted',
344
- cause_id: result.offer.id
345
- }));
346
- }
347
- }
353
+ });
354
+ queue_offer_notification(ctx, result.from_account_id, build_role_grant_offer_accepted_notification({ offer: offer_json }));
355
+ queue_supersede_notifications(ctx, result.superseded_offers, 'sibling_accepted', {
356
+ grantor: { kind: 'id', id: result.offer.id },
357
+ recipient: null
348
358
  });
349
359
  }
350
360
  return {
@@ -385,15 +395,10 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
385
395
  }
386
396
  });
387
397
  const offer_json = to_role_grant_offer_json(declined);
388
- if (notification_sender) {
389
- // Grantor's account_id rides on `declined.from_account_id` from
390
- // the decline RETURNING — no second SELECT needed. The decline
391
- // reason rides along on `offer.decline_reason` — the DB set it
392
- // in the RETURNING above.
393
- emit_after_commit(ctx, () => {
394
- notification_sender.send_to_account(declined.from_account_id, build_role_grant_offer_declined_notification({ offer: offer_json }));
395
- });
396
- }
398
+ // Grantor's account_id rides on `declined.from_account_id` from the
399
+ // decline RETURNING — no second SELECT needed. The decline reason rides
400
+ // along on `offer.decline_reason` — the DB set it in the RETURNING above.
401
+ queue_offer_notification(ctx, declined.from_account_id, build_role_grant_offer_declined_notification({ offer: offer_json }));
397
402
  // the terminal offer, as accept answers its own
398
403
  return { offer: offer_json };
399
404
  };
@@ -427,11 +432,7 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
427
432
  }
428
433
  });
429
434
  const offer_json = to_role_grant_offer_json(retracted);
430
- if (notification_sender) {
431
- emit_after_commit(ctx, () => {
432
- notification_sender.send_to_account(retracted.to_account_id, build_role_grant_offer_retracted_notification({ offer: offer_json }));
433
- });
434
- }
435
+ queue_offer_notification(ctx, retracted.to_account_id, build_role_grant_offer_retracted_notification({ offer: offer_json }));
435
436
  // the terminal offer, as accept answers its own
436
437
  return { offer: offer_json };
437
438
  };
@@ -504,13 +505,20 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
504
505
  });
505
506
  }
506
507
  if ((await query_account_has_active_global_role(ctx, target_account_id, ROLE_ADMIN)) &&
507
- (await query_count_active_accounts_with_global_role_for_update(ctx, ROLE_ADMIN, input.role_grant_id)) === 0) {
508
+ (await query_count_active_accounts_with_global_role_locked(ctx, ROLE_ADMIN, input.role_grant_id)) === 0) {
508
509
  await emit_revoke_failure();
509
510
  throw jsonrpc_errors.forbidden("cannot revoke the last admin's admin grant", {
510
511
  reason: ERROR_CANNOT_REVOKE_LAST_ADMIN
511
512
  });
512
513
  }
513
514
  }
515
+ // The revokee's account row, then every offer the revoke supersedes — the
516
+ // revokee's incoming siblings and its outgoing offers — in one statement in
517
+ // id order, before the grant is touched (`query_account_lock_for_revoke`
518
+ // and `query_role_grant_offer_lock_for_revoke` have why). After the guard,
519
+ // which holds an admin revokee's row already.
520
+ await query_account_lock_for_revoke(ctx, input.actor_id);
521
+ await query_role_grant_offer_lock_for_revoke(ctx, input.actor_id, role_grant_row.role, role_grant_row.scope_id);
514
522
  const result = await query_revoke_role_grant(ctx, input.role_grant_id, input.actor_id, auth.actor.id, input.reason ?? null);
515
523
  if (!result) {
516
524
  // Raced with another revoker or the role_grant was revoked between
@@ -563,30 +571,21 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
563
571
  }
564
572
  });
565
573
  }
566
- if (notification_sender) {
567
- const superseded = result.superseded_offers.map((o) => ({
568
- offer: to_role_grant_offer_json(o),
569
- from_account_id: o.from_account_id
570
- }));
571
- const cause_id = result.id;
572
- const reason = input.reason ?? null;
573
- emit_after_commit(ctx, () => {
574
- notification_sender.send_to_account(target_account_id, build_role_grant_revoked_notification({
575
- role_grant_id: result.id,
576
- role: result.role,
577
- scope_kind: result.scope_kind,
578
- scope_id: result.scope_id,
579
- reason
580
- }));
581
- for (const sib of superseded) {
582
- notification_sender.send_to_account(sib.from_account_id, build_role_grant_offer_supersede_notification({
583
- offer: sib.offer,
584
- reason: 'role_grant_revoked',
585
- cause_id
586
- }));
587
- }
588
- });
589
- }
574
+ queue_offer_notification(ctx, target_account_id, build_role_grant_revoked_notification({
575
+ role_grant_id: result.id,
576
+ role: result.role,
577
+ scope_kind: result.scope_kind,
578
+ scope_id: result.scope_id,
579
+ reason: input.reason ?? null
580
+ }));
581
+ // Both parties of each superseded offer: the revokee is the recipient of
582
+ // its incoming siblings and the grantor of its outgoing offers, and the
583
+ // other party of each is told as well.
584
+ const revoked_grant = { kind: 'id', id: result.id };
585
+ queue_supersede_notifications(ctx, result.superseded_offers, 'role_grant_revoked', {
586
+ grantor: revoked_grant,
587
+ recipient: revoked_grant
588
+ });
590
589
  return { ok: true, revoked: true };
591
590
  };
592
591
  // The immediate admin-only conferral path — the consent-free sibling of
@@ -655,22 +654,14 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
655
654
  // active actor of `to_account_id`; otherwise the account's sole active
656
655
  // actor is used (a multi-actor account must name one). A missing /
657
656
  // actorless account 404-masks.
658
- const actors = await query_active_actors_by_account(ctx, input.to_account_id);
657
+ const actors = await require_active_recipient(ctx, input.to_account_id, input.to_actor_id);
659
658
  let target_actor_id;
660
659
  if (input.to_actor_id != null) {
661
- if (!actors.some((a) => a.id === input.to_actor_id)) {
662
- throw jsonrpc_errors.invalid_params('to_actor_id does not belong to to_account_id', {
663
- reason: ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH
664
- });
665
- }
666
660
  target_actor_id = input.to_actor_id;
667
661
  }
668
662
  else if (actors.length === 1) {
669
663
  target_actor_id = actors[0].id;
670
664
  }
671
- else if (actors.length === 0) {
672
- throw jsonrpc_errors.not_found('account');
673
- }
674
665
  else {
675
666
  throw jsonrpc_errors.invalid_params('to_actor_id is required for a multi-actor account');
676
667
  }
@@ -54,7 +54,13 @@ export declare const role_grant_offer_expr: (alias: string) => import("../db/sql
54
54
  * `DeclinedOffer` shape every offer-superseding cascade returns (the revoke
55
55
  * cascades in `auth/role_grant_queries.ts`, decline + accept-supersede in
56
56
  * `auth/role_grant_offer_queries.ts`). The CTE must be named `updated` and
57
- * `RETURNING` the full offer row.
57
+ * `RETURNING` the full offer row, and the tail ends the statement.
58
+ *
59
+ * Ordered oldest first, by `created_at` then `id`: an `UPDATE … RETURNING`
60
+ * comes back in no fixed order, and the callers emit an audit row and a
61
+ * notification per row in the order returned, so without it two runs (or the
62
+ * two spines) write the same cascade in different orders. Twin of the Rust
63
+ * `updated_offer_select`.
58
64
  */
59
65
  export declare const ROLE_GRANT_OFFER_WITH_GRANTOR_SELECT: string;
60
66
  export declare const ROLE_GRANT_OFFER_SCHEMA = "\nCREATE TABLE IF NOT EXISTS role_grant_offer (\n id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n from_actor_id UUID NOT NULL REFERENCES actor(id) ON DELETE CASCADE,\n to_account_id UUID NOT NULL REFERENCES account(id) ON DELETE CASCADE,\n to_actor_id UUID NULL REFERENCES actor(id) ON DELETE CASCADE,\n role TEXT NOT NULL,\n scope_kind TEXT NULL,\n scope_id UUID NULL,\n message TEXT NULL,\n created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n expires_at TIMESTAMPTZ NOT NULL,\n accepted_at TIMESTAMPTZ NULL,\n declined_at TIMESTAMPTZ NULL,\n decline_reason TEXT NULL,\n retracted_at TIMESTAMPTZ NULL,\n superseded_at TIMESTAMPTZ NULL,\n resulting_role_grant_id UUID NULL REFERENCES role_grant(id) ON DELETE SET NULL,\n CONSTRAINT role_grant_offer_single_terminal CHECK (\n (accepted_at IS NOT NULL)::int\n + (declined_at IS NOT NULL)::int\n + (retracted_at IS NOT NULL)::int\n + (superseded_at IS NOT NULL)::int\n <= 1\n ),\n CONSTRAINT role_grant_offer_role_grant_iff_accepted CHECK (\n (accepted_at IS NOT NULL) = (resulting_role_grant_id IS NOT NULL)\n ),\n CONSTRAINT role_grant_offer_reason_iff_declined CHECK (\n decline_reason IS NULL OR declined_at IS NOT NULL\n ),\n CONSTRAINT role_grant_offer_scope_kind_paired CHECK (\n (scope_kind IS NULL) = (scope_id IS NULL)\n )\n)";
@@ -1 +1 @@
1
- {"version":3,"file":"role_grant_offer_ddl.d.ts","sourceRoot":"","sources":["../../src/lib/auth/role_grant_offer_ddl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,mHAAmH;AACnH,eAAO,MAAM,oCAAoC,yCAAyC,CAAC;AAE3F;;;;;;GAMG;AACH,eAAO,MAAM,wCAAwC,WAAW,CAAC;AAEjE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,4QAkBmB,CAAC;AAEzD;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,8DAQhC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,oCAAoC,QAMI,CAAC;AAKtD,eAAO,MAAM,uBAAuB,qzCAkClC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qCAAqC,2XAYpB,CAAC;AAE/B,+EAA+E;AAC/E,eAAO,MAAM,4BAA4B,kOAMX,CAAC"}
1
+ {"version":3,"file":"role_grant_offer_ddl.d.ts","sourceRoot":"","sources":["../../src/lib/auth/role_grant_offer_ddl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,mHAAmH;AACnH,eAAO,MAAM,oCAAoC,yCAAyC,CAAC;AAE3F;;;;;;GAMG;AACH,eAAO,MAAM,wCAAwC,WAAW,CAAC;AAEjE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,4QAkBmB,CAAC;AAEzD;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,8DAQhC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oCAAoC,QAOnB,CAAC;AAK/B,eAAO,MAAM,uBAAuB,qzCAkClC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qCAAqC,2XAYpB,CAAC;AAE/B,+EAA+E;AAC/E,eAAO,MAAM,4BAA4B,kOAMX,CAAC"}
@@ -81,11 +81,18 @@ export const role_grant_offer_expr = iso8601_timestamp_expr(ROLE_GRANT_OFFER_COL
81
81
  * `DeclinedOffer` shape every offer-superseding cascade returns (the revoke
82
82
  * cascades in `auth/role_grant_queries.ts`, decline + accept-supersede in
83
83
  * `auth/role_grant_offer_queries.ts`). The CTE must be named `updated` and
84
- * `RETURNING` the full offer row.
84
+ * `RETURNING` the full offer row, and the tail ends the statement.
85
+ *
86
+ * Ordered oldest first, by `created_at` then `id`: an `UPDATE … RETURNING`
87
+ * comes back in no fixed order, and the callers emit an audit row and a
88
+ * notification per row in the order returned, so without it two runs (or the
89
+ * two spines) write the same cascade in different orders. Twin of the Rust
90
+ * `updated_offer_select`.
85
91
  */
86
92
  export const ROLE_GRANT_OFFER_WITH_GRANTOR_SELECT = `SELECT ${qualify_columns(ROLE_GRANT_OFFER_COLUMNS, 'u', role_grant_offer_expr('u'))}, grantor.account_id AS from_account_id
87
93
  FROM updated u
88
- JOIN actor grantor ON grantor.id = u.from_actor_id`;
94
+ JOIN actor grantor ON grantor.id = u.from_actor_id
95
+ ORDER BY u.created_at, u.id`;
89
96
  // Frozen v1 body — `expire_audited_at` is added by the appended
90
97
  // `role_grant_offer_expire_audited_at` migration (with its partial sweep
91
98
  // index), so a fresh bootstrap and an old deployed DB converge on one shape.
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Role grant offer WebSocket notification specs, builders, and the narrow
3
- * `NotificationSender` interface that decouples offer/revoke send sites
4
- * from `ConnectionRegistry`.
2
+ * Role grant offer WebSocket notification specs, builders, and the helpers
3
+ * the handlers queue them with (`queue_offer_notification`,
4
+ * `queue_supersede_notifications`).
5
5
  *
6
6
  * These `RemoteNotificationActionSpec`s cover the consentful-role-grants
7
7
  * lifecycle events the server pushes to affected accounts:
@@ -10,9 +10,9 @@
10
10
  * - `role_grant_offer_retracted` → recipient's sockets when a grantor retracts
11
11
  * - `role_grant_offer_accepted` → grantor's sockets when the recipient accepts
12
12
  * - `role_grant_offer_declined` → grantor's sockets when the recipient declines
13
- * - `role_grant_offer_supersede` → grantor's sockets when a sibling accept,
14
- * a revoke of the resulting role_grant, or destruction of the parent scope
15
- * row obsoletes their pending offer
13
+ * - `role_grant_offer_supersede` → each live party to a pending offer a
14
+ * cascade ended — a sibling accept, a revoke, an account removal — but the
15
+ * one the cascade's own answer or socket close already covers
16
16
  * - `role_grant_revoked` → revokee's sockets when one of their active
17
17
  * role_grants is revoked by the `role_grant_revoke` action (companion to the
18
18
  * `role_grant_revoke` audit event)
@@ -29,10 +29,9 @@
29
29
  * action set of an RPC list that carries the role_grant_offer actions, so the
30
30
  * surface lists them on the WS endpoint as `remote_notification` methods. An
31
31
  * inbound frame for one is still answered `method_not_found`, as no handler is
32
- * registered. Under DEV,
33
- * `create_role_grant_offer_actions` checks each params object it sends
34
- * against its spec's `input` (`create_validated_notification_sender`);
35
- * production sends unchecked.
32
+ * registered. Under DEV, `perform_action` hands every action handler a sender
33
+ * wrapped in `create_validated_notification_sender`, so each params object
34
+ * sent is checked against its spec's `input`; production sends unchecked.
36
35
  *
37
36
  * @module
38
37
  */
@@ -42,23 +41,9 @@ import { type Uuid } from '../primitive_schemas.js';
42
41
  import type { Action } from '../actions/action_types.js';
43
42
  import type { EventSpec } from '../realtime/sse.js';
44
43
  import type { JsonrpcNotification } from '../http/jsonrpc.js';
45
- /**
46
- * Narrow structural capability for sending a JSON-RPC notification to every
47
- * socket bound to an account.
48
- *
49
- * `ConnectionRegistry` satisfies this interface — its
50
- * `send_to_account(account_id, message)` signature accepts the broader
51
- * `JsonrpcMessageFromServerToClient` type, which is contravariantly
52
- * compatible with `JsonrpcNotification` here. The interface stays local so
53
- * handlers don't couple to the concrete registry, and tests can inject a
54
- * capturing stub with no WS machinery.
55
- *
56
- * Returns the number of sockets the notification was sent to — callers
57
- * typically ignore it (used by telemetry / tests).
58
- */
59
- export interface NotificationSender {
60
- send_to_account: (account_id: Uuid, message: JsonrpcNotification) => number;
61
- }
44
+ import { type EmitAfterCommitContext } from '../http/pending_effects.js';
45
+ import type { NotificationSender } from '../actions/notification_sender.js';
46
+ import { type SupersededOffer } from './role_grant_offer_schema.js';
62
47
  export declare const ROLE_GRANT_OFFER_RECEIVED_NOTIFICATION_METHOD = "role_grant_offer_received";
63
48
  export declare const ROLE_GRANT_OFFER_RETRACTED_NOTIFICATION_METHOD = "role_grant_offer_retracted";
64
49
  export declare const ROLE_GRANT_OFFER_ACCEPTED_NOTIFICATION_METHOD = "role_grant_offer_accepted";
@@ -158,14 +143,17 @@ export declare const RoleGrantOfferDeclinedParams: import("@fuzdev/fuz_schema/sc
158
143
  }>;
159
144
  export type RoleGrantOfferDeclinedParams = Infer<typeof RoleGrantOfferDeclinedParams>;
160
145
  /**
161
- * Params for `role_grant_offer_supersede`. Fires to the grantor's sockets when
162
- * their pending offer is obsoleted — either by a sibling accept
163
- * (`reason: 'sibling_accepted'`), by revoke of the resulting role_grant or of
164
- * one of the grantor's own (`reason: 'role_grant_revoked'`), or by deletion of
165
- * the parent scope row
166
- * the offer was bound to (`reason: 'scope_destroyed'`). `cause_id` points
167
- * at the accepted offer id, the revoked role_grant id, or the destroyed scope
168
- * row id respectively.
146
+ * Params for `role_grant_offer_supersede`, sent to a party of a pending offer
147
+ * a cascade ended: a sibling accept (`reason: 'sibling_accepted'`), a revoke of
148
+ * the recipient's grant or of any grant of the grantor's actor
149
+ * (`reason: 'role_grant_revoked'`), or the removal of either party's account
150
+ * (`reason: 'account_deleted'`). `cause_id` points at the accepted offer, the
151
+ * revoked role_grant, or the removed account respectively — the `cause_id` of
152
+ * the offer's `role_grant_offer_supersede` audit row — except on a recipient's
153
+ * frame of its grantor's account removal, where it is the offer's grantor
154
+ * actor (`from_actor_id`), an id the recipient already holds. The audit
155
+ * metadata's reason set is wider: a consumer's scope teardown audits
156
+ * `scope_destroyed`, which no notification carries.
169
157
  */
170
158
  export declare const RoleGrantOfferSupersedeParams: import("@fuzdev/fuz_schema/schema.ts").ObjectSchema<{
171
159
  offer: import("@fuzdev/fuz_schema/schema.ts").ObjectSchema<{
@@ -186,7 +174,7 @@ export declare const RoleGrantOfferSupersedeParams: import("@fuzdev/fuz_schema/s
186
174
  superseded_at: import("@fuzdev/fuz_schema/schema.ts").NullableSchema<import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").StringSchema>>;
187
175
  resulting_role_grant_id: import("@fuzdev/fuz_schema/schema.ts").NullableSchema<import("@fuzdev/fuz_schema/schema.ts").BrandSchema<import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").StringSchema>, "Uuid">>;
188
176
  }>;
189
- reason: import("@fuzdev/fuz_schema/schema.ts").OneOfSchema<readonly ["sibling_accepted", "role_grant_revoked", "scope_destroyed"]>;
177
+ reason: import("@fuzdev/fuz_schema/schema.ts").OneOfSchema<readonly ["sibling_accepted", "role_grant_revoked", "account_deleted"]>;
190
178
  cause_id: import("@fuzdev/fuz_schema/schema.ts").BrandSchema<import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").StringSchema>, "Uuid">;
191
179
  }>;
192
180
  export type RoleGrantOfferSupersedeParams = Infer<typeof RoleGrantOfferSupersedeParams>;
@@ -351,7 +339,7 @@ export declare const role_grant_offer_supersede_notification_spec: {
351
339
  superseded_at: import("@fuzdev/fuz_schema/schema.ts").NullableSchema<import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").StringSchema>>;
352
340
  resulting_role_grant_id: import("@fuzdev/fuz_schema/schema.ts").NullableSchema<import("@fuzdev/fuz_schema/schema.ts").BrandSchema<import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").StringSchema>, "Uuid">>;
353
341
  }>;
354
- reason: import("@fuzdev/fuz_schema/schema.ts").OneOfSchema<readonly ["sibling_accepted", "role_grant_revoked", "scope_destroyed"]>;
342
+ reason: import("@fuzdev/fuz_schema/schema.ts").OneOfSchema<readonly ["sibling_accepted", "role_grant_revoked", "account_deleted"]>;
355
343
  cause_id: import("@fuzdev/fuz_schema/schema.ts").BrandSchema<import("@fuzdev/fuz_schema/schema.ts").PipeSchema<string, import("@fuzdev/fuz_schema/schema.ts").StringSchema>, "Uuid">;
356
344
  }>;
357
345
  output: import("@fuzdev/fuz_schema/schema.ts").VoidSchema;
@@ -398,7 +386,8 @@ export declare const role_grant_offer_notification_specs: Array<EventSpec>;
398
386
  * a mismatch logged as an error the way DEV output validation logs one; the
399
387
  * notification is sent either way, unchanged. A method that is no
400
388
  * role_grant_offer notification passes unchecked. In production the sender is
401
- * returned as it is.
389
+ * returned as it is. `perform_action` wraps the sender of every handler
390
+ * context, so every send site is checked whichever factory it sits in.
402
391
  *
403
392
  * @param sender - the sender to wrap
404
393
  * @param log - where a mismatch is logged
@@ -411,4 +400,64 @@ export declare const build_role_grant_offer_accepted_notification: (params: Role
411
400
  export declare const build_role_grant_offer_declined_notification: (params: RoleGrantOfferDeclinedParams) => JsonrpcNotification;
412
401
  export declare const build_role_grant_offer_supersede_notification: (params: RoleGrantOfferSupersedeParams) => JsonrpcNotification;
413
402
  export declare const build_role_grant_revoked_notification: (params: RoleGrantRevokedParams) => JsonrpcNotification;
403
+ /**
404
+ * What the queue helpers read of a handler context; `ActionContext` satisfies
405
+ * it.
406
+ */
407
+ export interface NotificationQueueContext extends EmitAfterCommitContext {
408
+ notification_sender: NotificationSender;
409
+ }
410
+ /**
411
+ * Queue `message` to every socket bound to `account_id`, sent once the
412
+ * handler's transaction commits and dropped when it rolls back, so a
413
+ * notification never announces state that never landed.
414
+ *
415
+ * Twin of the Rust spine's `queue_offer_notification`.
416
+ *
417
+ * @param ctx - the handler context, whose sender the send goes through
418
+ * @param account_id - the recipient account
419
+ * @param message - the notification, from one of the builders above
420
+ */
421
+ export declare const queue_offer_notification: (ctx: NotificationQueueContext, account_id: Uuid, message: JsonrpcNotification) => void;
422
+ /**
423
+ * The `cause_id` a party of a superseded offer is sent: an id the cascade
424
+ * names (`id` — the accepted offer, the revoked role_grant, the removed
425
+ * account), or the offer's own grantor actor (`from_actor`, an id its
426
+ * recipient already holds). Twin of the Rust `SupersedeCause`.
427
+ */
428
+ export type SupersedeCause = {
429
+ kind: 'id';
430
+ id: Uuid;
431
+ } | {
432
+ kind: 'from_actor';
433
+ };
434
+ /**
435
+ * Which parties of a superseded offer a cascade tells, and the `cause_id`
436
+ * each is sent; `null` leaves that party out. A party the cascade's own answer
437
+ * covers (the accepting recipient) or whose account it removes (its
438
+ * connections close) is left out by the call site, which knows which side
439
+ * that party is on. A recipient told of its grantor's account removal is sent
440
+ * the grantor's actor, never the account id, which no recipient sees
441
+ * otherwise. Twin of the Rust `SupersedeAudience`.
442
+ */
443
+ export interface SupersedeAudience {
444
+ grantor: SupersedeCause | null;
445
+ recipient: SupersedeCause | null;
446
+ }
447
+ /**
448
+ * Queue a `role_grant_offer_supersede` notification to the parties of each
449
+ * superseded offer `audience` names, each with its own `cause_id` — the
450
+ * grantor (`from_account_id`, off the cascade's `RETURNING`) and the recipient
451
+ * (`to_account_id`). Sent in the cascade's row order, which is the order of
452
+ * its audit rows, each offer's parties together and its grantor ahead of its
453
+ * recipient — one fixed order, so both spines send a cascade's frames alike.
454
+ *
455
+ * Twin of the Rust spine's `queue_supersede_notifications`.
456
+ *
457
+ * @param ctx - the handler context, whose sender the sends go through
458
+ * @param superseded - the offers the cascade superseded
459
+ * @param reason - why they were superseded
460
+ * @param audience - which party of each offer is told, and the `cause_id` it is sent
461
+ */
462
+ export declare const queue_supersede_notifications: (ctx: NotificationQueueContext, superseded: ReadonlyArray<SupersededOffer>, reason: RoleGrantOfferSupersedeParams["reason"], audience: SupersedeAudience) => void;
414
463
  //# sourceMappingURL=role_grant_offer_notifications.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"role_grant_offer_notifications.d.ts","sourceRoot":"","sources":["../../src/lib/auth/role_grant_offer_notifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAKN,KAAK,KAAK,EAEV,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAsC,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAExF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAO9D;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,kBAAkB;IAClC,eAAe,EAAE,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,mBAAmB,KAAK,MAAM,CAAC;CAC5E;AAID,eAAO,MAAM,6CAA6C,8BAA8B,CAAC;AACzF,eAAO,MAAM,8CAA8C,+BAA+B,CAAC;AAC3F,eAAO,MAAM,6CAA6C,8BAA8B,CAAC;AACzF,eAAO,MAAM,6CAA6C,8BAA8B,CAAC;AACzF,eAAO,MAAM,8CAA8C,+B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,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWjB,CAAC;AAEzC,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;CAUT,CAAC;AAczC;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC,EAAE,aAAa,CAAC,MAAM,CACH,CAAC;AAEtE;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,EAAE,KAAK,CAAC,SAAS,CACwB,CAAC;AAM1F;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oCAAoC,GAChD,QAAQ,kBAAkB,EAC1B,KAAK,MAAM,KACT,kBAcF,CAAC;AAIF,eAAO,MAAM,4CAA4C,GACxD,QAAQ,4BAA4B,KAClC,mBACgF,CAAC;AAEpF,eAAO,MAAM,6CAA6C,GACzD,QAAQ,6BAA6B,KACnC,mBACiF,CAAC;AAErF,eAAO,MAAM,4CAA4C,GACxD,QAAQ,4BAA4B,KAClC,mBACgF,CAAC;AAEpF,eAAO,MAAM,4CAA4C,GACxD,QAAQ,4BAA4B,KAClC,mBACgF,CAAC;AAEpF,eAAO,MAAM,6CAA6C,GACzD,QAAQ,6BAA6B,KACnC,mBACiF,CAAC;AAErF,eAAO,MAAM,qCAAqC,GACjD,QAAQ,sBAAsB,KAC5B,mBACyE,CAAC"}
1
+ {"version":3,"file":"role_grant_offer_notifications.d.ts","sourceRoot":"","sources":["../../src/lib/auth/role_grant_offer_notifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAKN,KAAK,KAAK,EAEV,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAsC,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAExF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAA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