@fuzdev/fuz_app 0.150.0 → 0.152.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 (597) hide show
  1. package/README.md +1 -1
  2. package/dist/actions/CLAUDE.md +324 -299
  3. package/dist/actions/action_bridge.d.ts +5 -86
  4. package/dist/actions/action_bridge.d.ts.map +1 -1
  5. package/dist/actions/action_bridge.js +4 -84
  6. package/dist/actions/action_codegen.d.ts +8 -166
  7. package/dist/actions/action_codegen.d.ts.map +1 -1
  8. package/dist/actions/action_codegen.js +19 -95
  9. package/dist/actions/action_dispatcher.d.ts +10 -0
  10. package/dist/actions/action_dispatcher.d.ts.map +1 -1
  11. package/dist/actions/action_dispatcher.js +9 -6
  12. package/dist/actions/action_event.d.ts +1 -2
  13. package/dist/actions/action_event.d.ts.map +1 -1
  14. package/dist/actions/action_event.js +7 -13
  15. package/dist/actions/action_event_helpers.d.ts +1 -40
  16. package/dist/actions/action_event_helpers.d.ts.map +1 -1
  17. package/dist/actions/action_event_helpers.js +1 -25
  18. package/dist/actions/action_rpc.d.ts +10 -215
  19. package/dist/actions/action_rpc.d.ts.map +1 -1
  20. package/dist/actions/action_rpc.js +56 -111
  21. package/dist/actions/action_spec.d.ts +2 -2
  22. package/dist/actions/action_spec.js +2 -2
  23. package/dist/actions/action_types.d.ts +229 -8
  24. package/dist/actions/action_types.d.ts.map +1 -1
  25. package/dist/actions/action_types.js +56 -5
  26. package/dist/actions/broadcast_api.d.ts +22 -17
  27. package/dist/actions/broadcast_api.d.ts.map +1 -1
  28. package/dist/actions/broadcast_api.js +16 -27
  29. package/dist/actions/cancel.d.ts +4 -13
  30. package/dist/actions/cancel.d.ts.map +1 -1
  31. package/dist/actions/cancel.js +5 -17
  32. package/dist/actions/compile_action_registry.d.ts +1 -2
  33. package/dist/actions/compile_action_registry.d.ts.map +1 -1
  34. package/dist/actions/connection_closer.d.ts +120 -50
  35. package/dist/actions/connection_closer.d.ts.map +1 -1
  36. package/dist/actions/connection_closer.js +139 -31
  37. package/dist/actions/{transports_ws_backend.d.ts → connection_registry.d.ts} +120 -132
  38. package/dist/actions/connection_registry.d.ts.map +1 -0
  39. package/dist/actions/{transports_ws_backend.js → connection_registry.js} +149 -152
  40. package/dist/actions/frontend_rpc_client.d.ts +52 -2
  41. package/dist/actions/frontend_rpc_client.d.ts.map +1 -1
  42. package/dist/actions/frontend_rpc_client.js +42 -4
  43. package/dist/actions/peer_ping.d.ts +7 -9
  44. package/dist/actions/peer_ping.d.ts.map +1 -1
  45. package/dist/actions/peer_ping.js +6 -8
  46. package/dist/actions/peer_request.d.ts +6 -5
  47. package/dist/actions/peer_request.d.ts.map +1 -1
  48. package/dist/actions/peer_request.js +6 -5
  49. package/dist/actions/perform_action.d.ts +36 -28
  50. package/dist/actions/perform_action.d.ts.map +1 -1
  51. package/dist/actions/perform_action.js +60 -34
  52. package/dist/actions/protocol.d.ts +14 -0
  53. package/dist/actions/protocol.d.ts.map +1 -1
  54. package/dist/actions/protocol.js +18 -0
  55. package/dist/actions/register_action_ws.d.ts +137 -298
  56. package/dist/actions/register_action_ws.d.ts.map +1 -1
  57. package/dist/actions/register_action_ws.js +155 -923
  58. package/dist/actions/socket.svelte.d.ts +9 -0
  59. package/dist/actions/socket.svelte.d.ts.map +1 -1
  60. package/dist/actions/socket.svelte.js +16 -5
  61. package/dist/actions/transports.d.ts +88 -34
  62. package/dist/actions/transports.d.ts.map +1 -1
  63. package/dist/actions/transports.js +76 -76
  64. package/dist/actions/transports_http.d.ts +48 -12
  65. package/dist/actions/transports_http.d.ts.map +1 -1
  66. package/dist/actions/transports_http.js +75 -44
  67. package/dist/actions/transports_ws.d.ts +29 -0
  68. package/dist/actions/transports_ws.d.ts.map +1 -1
  69. package/dist/actions/transports_ws.js +34 -8
  70. package/dist/actions/ws_endpoint_spec.d.ts +52 -75
  71. package/dist/actions/ws_endpoint_spec.d.ts.map +1 -1
  72. package/dist/actions/ws_endpoint_spec.js +27 -10
  73. package/dist/actions/ws_outbound_writer.d.ts +3 -3
  74. package/dist/actions/ws_outbound_writer.js +3 -3
  75. package/dist/actions/ws_socket_session.d.ts +321 -0
  76. package/dist/actions/ws_socket_session.d.ts.map +1 -0
  77. package/dist/actions/ws_socket_session.js +783 -0
  78. package/dist/auth/CLAUDE.md +70 -44
  79. package/dist/auth/account_action_specs.d.ts +2 -0
  80. package/dist/auth/account_action_specs.d.ts.map +1 -1
  81. package/dist/auth/account_actions.d.ts +1 -1
  82. package/dist/auth/account_actions.d.ts.map +1 -1
  83. package/dist/auth/account_actions.js +9 -3
  84. package/dist/auth/account_queries.d.ts +10 -0
  85. package/dist/auth/account_queries.d.ts.map +1 -1
  86. package/dist/auth/account_queries.js +27 -17
  87. package/dist/auth/account_routes.d.ts +2 -1
  88. package/dist/auth/account_routes.d.ts.map +1 -1
  89. package/dist/auth/account_routes.js +14 -17
  90. package/dist/auth/account_schema.d.ts +5 -5
  91. package/dist/auth/account_schema.d.ts.map +1 -1
  92. package/dist/auth/account_schema.js +5 -2
  93. package/dist/auth/actor_lookup_actions.d.ts +1 -1
  94. package/dist/auth/actor_lookup_actions.d.ts.map +1 -1
  95. package/dist/auth/actor_lookup_actions.js +1 -1
  96. package/dist/auth/actor_search_action_specs.d.ts.map +1 -1
  97. package/dist/auth/actor_search_action_specs.js +2 -1
  98. package/dist/auth/actor_search_actions.d.ts +1 -1
  99. package/dist/auth/actor_search_actions.d.ts.map +1 -1
  100. package/dist/auth/actor_search_actions.js +1 -1
  101. package/dist/auth/actor_search_queries.d.ts +5 -5
  102. package/dist/auth/actor_search_queries.d.ts.map +1 -1
  103. package/dist/auth/actor_search_queries.js +7 -7
  104. package/dist/auth/admin_action_specs.d.ts.map +1 -1
  105. package/dist/auth/admin_action_specs.js +3 -1
  106. package/dist/auth/admin_actions.d.ts +1 -1
  107. package/dist/auth/admin_actions.d.ts.map +1 -1
  108. package/dist/auth/admin_actions.js +12 -42
  109. package/dist/auth/all_cell_actions.d.ts +6 -4
  110. package/dist/auth/all_cell_actions.d.ts.map +1 -1
  111. package/dist/auth/all_cell_actions.js +1 -1
  112. package/dist/auth/api_token_queries.d.ts +1 -0
  113. package/dist/auth/api_token_queries.d.ts.map +1 -1
  114. package/dist/auth/api_token_queries.js +1 -0
  115. package/dist/auth/audit_emitter.d.ts +3 -3
  116. package/dist/auth/audit_emitter.js +2 -2
  117. package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
  118. package/dist/auth/audit_log_route_schema.js +3 -2
  119. package/dist/auth/audit_log_routes.d.ts +20 -11
  120. package/dist/auth/audit_log_routes.d.ts.map +1 -1
  121. package/dist/auth/audit_log_routes.js +49 -29
  122. package/dist/auth/audit_log_schema.d.ts +13 -21
  123. package/dist/auth/audit_log_schema.d.ts.map +1 -1
  124. package/dist/auth/audit_log_schema.js +10 -18
  125. package/dist/auth/bearer_auth.d.ts +7 -4
  126. package/dist/auth/bearer_auth.d.ts.map +1 -1
  127. package/dist/auth/bearer_auth.js +21 -15
  128. package/dist/auth/cell_action_helpers.d.ts +89 -0
  129. package/dist/auth/cell_action_helpers.d.ts.map +1 -0
  130. package/dist/auth/cell_action_helpers.js +113 -0
  131. package/dist/auth/cell_actions.d.ts +22 -13
  132. package/dist/auth/cell_actions.d.ts.map +1 -1
  133. package/dist/auth/cell_actions.js +105 -167
  134. package/dist/auth/cell_audit_actions.d.ts +1 -1
  135. package/dist/auth/cell_audit_actions.d.ts.map +1 -1
  136. package/dist/auth/cell_audit_actions.js +3 -12
  137. package/dist/auth/cell_audit_metadata.d.ts +1 -1
  138. package/dist/auth/cell_audit_metadata.js +1 -1
  139. package/dist/auth/cell_field_actions.d.ts +1 -1
  140. package/dist/auth/cell_field_actions.d.ts.map +1 -1
  141. package/dist/auth/cell_field_actions.js +16 -66
  142. package/dist/auth/cell_grant_action_specs.d.ts +2 -2
  143. package/dist/auth/cell_grant_action_specs.js +3 -3
  144. package/dist/auth/cell_grant_actions.d.ts +73 -11
  145. package/dist/auth/cell_grant_actions.d.ts.map +1 -1
  146. package/dist/auth/cell_grant_actions.js +63 -55
  147. package/dist/auth/cell_grant_audit_metadata.d.ts +6 -3
  148. package/dist/auth/cell_grant_audit_metadata.d.ts.map +1 -1
  149. package/dist/auth/cell_grant_audit_metadata.js +7 -4
  150. package/dist/auth/cell_item_actions.d.ts +1 -1
  151. package/dist/auth/cell_item_actions.d.ts.map +1 -1
  152. package/dist/auth/cell_item_actions.js +21 -82
  153. package/dist/auth/cleanup.d.ts +1 -1
  154. package/dist/auth/cleanup.d.ts.map +1 -1
  155. package/dist/auth/cleanup.js +6 -3
  156. package/dist/auth/credential_deadline.d.ts +3 -3
  157. package/dist/auth/credential_deadline.js +3 -3
  158. package/dist/auth/credential_type_schema.d.ts +5 -5
  159. package/dist/auth/credential_type_schema.js +5 -5
  160. package/dist/auth/daemon_token_middleware.d.ts +12 -6
  161. package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
  162. package/dist/auth/daemon_token_middleware.js +28 -17
  163. package/dist/auth/deps.d.ts +4 -4
  164. package/dist/auth/fail_floor.d.ts +55 -0
  165. package/dist/auth/fail_floor.d.ts.map +1 -0
  166. package/dist/auth/fail_floor.js +63 -0
  167. package/dist/auth/invite_queries.d.ts +3 -15
  168. package/dist/auth/invite_queries.d.ts.map +1 -1
  169. package/dist/auth/invite_queries.js +3 -21
  170. package/dist/auth/middleware.d.ts +12 -7
  171. package/dist/auth/middleware.d.ts.map +1 -1
  172. package/dist/auth/middleware.js +42 -29
  173. package/dist/auth/migrations.d.ts +5 -33
  174. package/dist/auth/migrations.d.ts.map +1 -1
  175. package/dist/auth/migrations.js +9 -16
  176. package/dist/auth/request_context.d.ts +101 -71
  177. package/dist/auth/request_context.d.ts.map +1 -1
  178. package/dist/auth/request_context.js +137 -140
  179. package/dist/auth/resolved_auth.d.ts +122 -36
  180. package/dist/auth/resolved_auth.d.ts.map +1 -1
  181. package/dist/auth/resolved_auth.js +89 -38
  182. package/dist/auth/role_grant_offer_action_specs.d.ts +99 -14
  183. package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
  184. package/dist/auth/role_grant_offer_action_specs.js +26 -13
  185. package/dist/auth/role_grant_offer_actions.d.ts +13 -7
  186. package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
  187. package/dist/auth/role_grant_offer_actions.js +14 -12
  188. package/dist/auth/role_grant_offer_notifications.d.ts +3 -3
  189. package/dist/auth/role_grant_offer_notifications.js +1 -1
  190. package/dist/auth/role_grant_offer_queries.d.ts +0 -5
  191. package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
  192. package/dist/auth/role_grant_offer_queries.js +9 -41
  193. package/dist/auth/role_grant_queries.d.ts +17 -67
  194. package/dist/auth/role_grant_queries.d.ts.map +1 -1
  195. package/dist/auth/role_grant_queries.js +34 -106
  196. package/dist/auth/role_grant_sql.d.ts +42 -0
  197. package/dist/auth/role_grant_sql.d.ts.map +1 -0
  198. package/dist/auth/role_grant_sql.js +54 -0
  199. package/dist/auth/scope_kind_schema.d.ts +1 -1
  200. package/dist/auth/scope_kind_schema.js +1 -1
  201. package/dist/auth/self_service_role_actions.d.ts +1 -1
  202. package/dist/auth/self_service_role_actions.d.ts.map +1 -1
  203. package/dist/auth/self_service_role_actions.js +1 -1
  204. package/dist/auth/session_queries.d.ts +2 -1
  205. package/dist/auth/session_queries.d.ts.map +1 -1
  206. package/dist/auth/session_queries.js +2 -1
  207. package/dist/auth/signup_routes.d.ts +2 -1
  208. package/dist/auth/signup_routes.d.ts.map +1 -1
  209. package/dist/auth/signup_routes.js +14 -13
  210. package/dist/auth/standard_rpc_actions.d.ts +1 -1
  211. package/dist/auth/standard_rpc_actions.d.ts.map +1 -1
  212. package/dist/auth/token_scope.d.ts +19 -46
  213. package/dist/auth/token_scope.d.ts.map +1 -1
  214. package/dist/auth/token_scope.js +23 -41
  215. package/dist/db/CLAUDE.md +9 -4
  216. package/dist/db/cell_ddl.d.ts +5 -142
  217. package/dist/db/cell_ddl.d.ts.map +1 -1
  218. package/dist/db/cell_ddl.js +17 -16
  219. package/dist/db/cell_field_queries.d.ts +0 -13
  220. package/dist/db/cell_field_queries.d.ts.map +1 -1
  221. package/dist/db/cell_field_queries.js +0 -16
  222. package/dist/db/cell_grant_queries.d.ts +10 -5
  223. package/dist/db/cell_grant_queries.d.ts.map +1 -1
  224. package/dist/db/cell_grant_queries.js +13 -7
  225. package/dist/db/cell_item_queries.d.ts +0 -7
  226. package/dist/db/cell_item_queries.d.ts.map +1 -1
  227. package/dist/db/cell_item_queries.js +0 -10
  228. package/dist/db/cell_queries.d.ts +12 -48
  229. package/dist/db/cell_queries.d.ts.map +1 -1
  230. package/dist/db/cell_queries.js +24 -55
  231. package/dist/db/cell_view_sql.d.ts +1 -6
  232. package/dist/db/cell_view_sql.d.ts.map +1 -1
  233. package/dist/db/cell_view_sql.js +1 -2
  234. package/dist/db/fact_ddl.d.ts +5 -30
  235. package/dist/db/fact_ddl.d.ts.map +1 -1
  236. package/dist/db/fact_ddl.js +14 -13
  237. package/dist/db/fact_store.d.ts +11 -0
  238. package/dist/db/fact_store.d.ts.map +1 -1
  239. package/dist/db/fact_store.js +4 -1
  240. package/dist/db/migrate.d.ts +44 -6
  241. package/dist/db/migrate.d.ts.map +1 -1
  242. package/dist/db/migrate.js +63 -4
  243. package/dist/dev/setup.d.ts +18 -14
  244. package/dist/dev/setup.d.ts.map +1 -1
  245. package/dist/dev/setup.js +42 -39
  246. package/dist/env/dotenv.d.ts +2 -2
  247. package/dist/env/dotenv.js +2 -2
  248. package/dist/env/update_env_variable.d.ts +33 -21
  249. package/dist/env/update_env_variable.d.ts.map +1 -1
  250. package/dist/env/update_env_variable.js +54 -35
  251. package/dist/hono_context.d.ts +15 -90
  252. package/dist/hono_context.d.ts.map +1 -1
  253. package/dist/hono_context.js +9 -56
  254. package/dist/http/CLAUDE.md +35 -20
  255. package/dist/http/auth_shape.d.ts +1 -8
  256. package/dist/http/auth_shape.d.ts.map +1 -1
  257. package/dist/http/auth_shape.js +6 -12
  258. package/dist/http/common_routes.d.ts.map +1 -1
  259. package/dist/http/common_routes.js +3 -2
  260. package/dist/http/db_routes.d.ts +3 -3
  261. package/dist/http/db_routes.js +3 -3
  262. package/dist/http/error_schemas.d.ts +1 -2
  263. package/dist/http/error_schemas.d.ts.map +1 -1
  264. package/dist/http/error_schemas.js +1 -2
  265. package/dist/http/health_schema.d.ts +16 -0
  266. package/dist/http/health_schema.d.ts.map +1 -0
  267. package/dist/http/health_schema.js +12 -0
  268. package/dist/http/jsonrpc_errors.d.ts +22 -2
  269. package/dist/http/jsonrpc_errors.d.ts.map +1 -1
  270. package/dist/http/jsonrpc_errors.js +41 -3
  271. package/dist/http/jsonrpc_helpers.d.ts +60 -17
  272. package/dist/http/jsonrpc_helpers.d.ts.map +1 -1
  273. package/dist/http/jsonrpc_helpers.js +67 -25
  274. package/dist/http/origin.d.ts +30 -1
  275. package/dist/http/origin.d.ts.map +1 -1
  276. package/dist/http/origin.js +46 -9
  277. package/dist/http/origin_wildcard.d.ts +97 -0
  278. package/dist/http/origin_wildcard.d.ts.map +1 -0
  279. package/dist/http/origin_wildcard.js +142 -0
  280. package/dist/http/pending_effects.d.ts +28 -0
  281. package/dist/http/pending_effects.d.ts.map +1 -1
  282. package/dist/http/pending_effects.js +32 -1
  283. package/dist/http/route_spec.d.ts +4 -3
  284. package/dist/http/route_spec.d.ts.map +1 -1
  285. package/dist/http/route_spec.js +54 -45
  286. package/dist/http/surface.d.ts +1 -1
  287. package/dist/http/surface.d.ts.map +1 -1
  288. package/dist/http/surface_query.d.ts +9 -50
  289. package/dist/http/surface_query.d.ts.map +1 -1
  290. package/dist/http/surface_query.js +48 -94
  291. package/dist/realtime/audit_log_sse.d.ts +180 -0
  292. package/dist/realtime/audit_log_sse.d.ts.map +1 -0
  293. package/dist/realtime/audit_log_sse.js +154 -0
  294. package/dist/realtime/sse.d.ts +21 -6
  295. package/dist/realtime/sse.d.ts.map +1 -1
  296. package/dist/realtime/sse.js +33 -10
  297. package/dist/realtime/sse_constants.d.ts +29 -2
  298. package/dist/realtime/sse_constants.d.ts.map +1 -1
  299. package/dist/realtime/sse_constants.js +35 -2
  300. package/dist/realtime/{subscriber_registry.d.ts → sse_registry.d.ts} +12 -12
  301. package/dist/realtime/sse_registry.d.ts.map +1 -0
  302. package/dist/realtime/{subscriber_registry.js → sse_registry.js} +4 -4
  303. package/dist/schema_meta.d.ts +30 -10
  304. package/dist/schema_meta.d.ts.map +1 -1
  305. package/dist/schema_meta.js +85 -21
  306. package/dist/sensitivity.d.ts +9 -3
  307. package/dist/sensitivity.d.ts.map +1 -1
  308. package/dist/sensitivity.js +3 -2
  309. package/dist/server/app_backend.d.ts +8 -5
  310. package/dist/server/app_backend.d.ts.map +1 -1
  311. package/dist/server/app_backend.js +6 -12
  312. package/dist/server/app_server.d.ts +62 -51
  313. package/dist/server/app_server.d.ts.map +1 -1
  314. package/dist/server/app_server.js +84 -71
  315. package/dist/server/app_server_context.d.ts +1 -1
  316. package/dist/server/app_server_context.d.ts.map +1 -1
  317. package/dist/server/env.d.ts +24 -20
  318. package/dist/server/env.d.ts.map +1 -1
  319. package/dist/server/env.js +24 -34
  320. package/dist/server/serve_fact_route.d.ts +12 -16
  321. package/dist/server/serve_fact_route.d.ts.map +1 -1
  322. package/dist/server/serve_fact_route.js +59 -34
  323. package/dist/server/static.d.ts.map +1 -1
  324. package/dist/server/static.js +2 -2
  325. package/dist/testing/CLAUDE.md +179 -158
  326. package/dist/testing/admin_integration.d.ts.map +1 -1
  327. package/dist/testing/admin_integration.js +10 -19
  328. package/dist/testing/adversarial_headers.d.ts.map +1 -1
  329. package/dist/testing/adversarial_headers.js +8 -0
  330. package/dist/testing/app_server.d.ts +9 -77
  331. package/dist/testing/app_server.d.ts.map +1 -1
  332. package/dist/testing/app_server.js +31 -112
  333. package/dist/testing/attack_surface.d.ts.map +1 -1
  334. package/dist/testing/attack_surface.js +3 -4
  335. package/dist/testing/audit_completeness.d.ts.map +1 -1
  336. package/dist/testing/audit_completeness.js +4 -5
  337. package/dist/testing/auth_apps.d.ts +3 -3
  338. package/dist/testing/auth_apps.d.ts.map +1 -1
  339. package/dist/testing/auth_apps.js +9 -6
  340. package/dist/testing/connection_closer_helpers.d.ts +8 -16
  341. package/dist/testing/connection_closer_helpers.d.ts.map +1 -1
  342. package/dist/testing/connection_closer_helpers.js +7 -20
  343. package/dist/testing/cross_backend/action_manifest.d.ts +15 -4
  344. package/dist/testing/cross_backend/action_manifest.d.ts.map +1 -1
  345. package/dist/testing/cross_backend/action_manifest.js +13 -3
  346. package/dist/testing/cross_backend/action_manifest_parity.d.ts +15 -7
  347. package/dist/testing/cross_backend/action_manifest_parity.d.ts.map +1 -1
  348. package/dist/testing/cross_backend/action_manifest_parity.js +8 -1
  349. package/dist/testing/cross_backend/body_size.d.ts.map +1 -1
  350. package/dist/testing/cross_backend/body_size.js +25 -22
  351. package/dist/testing/cross_backend/build_test_backend_paths.d.ts +22 -3
  352. package/dist/testing/cross_backend/build_test_backend_paths.d.ts.map +1 -1
  353. package/dist/testing/cross_backend/build_test_backend_paths.js +34 -11
  354. package/dist/testing/cross_backend/capabilities.d.ts +13 -7
  355. package/dist/testing/cross_backend/capabilities.d.ts.map +1 -1
  356. package/dist/testing/cross_backend/cell_grant_role.js +2 -2
  357. package/dist/testing/cross_backend/cell_grant_steward.d.ts +4 -0
  358. package/dist/testing/cross_backend/cell_grant_steward.d.ts.map +1 -0
  359. package/dist/testing/cross_backend/cell_grant_steward.js +120 -0
  360. package/dist/testing/cross_backend/cell_relations.d.ts.map +1 -1
  361. package/dist/testing/cross_backend/cell_relations.js +21 -0
  362. package/dist/testing/cross_backend/conformance_table.d.ts +1 -1
  363. package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
  364. package/dist/testing/cross_backend/default_backend_configs.d.ts +18 -4
  365. package/dist/testing/cross_backend/default_backend_configs.d.ts.map +1 -1
  366. package/dist/testing/cross_backend/default_backend_configs.js +29 -9
  367. package/dist/testing/cross_backend/default_spine_surface.d.ts +7 -7
  368. package/dist/testing/cross_backend/default_spine_surface.js +2 -2
  369. package/dist/testing/cross_backend/fact_serving.d.ts.map +1 -1
  370. package/dist/testing/cross_backend/fact_serving.js +48 -0
  371. package/dist/testing/cross_backend/full_spine_mount.d.ts +3 -4
  372. package/dist/testing/cross_backend/full_spine_mount.d.ts.map +1 -1
  373. package/dist/testing/cross_backend/full_spine_mount.js +9 -2
  374. package/dist/testing/cross_backend/origin_scope.d.ts.map +1 -1
  375. package/dist/testing/cross_backend/origin_scope.js +5 -13
  376. package/dist/testing/cross_backend/peer_ping_ws.d.ts.map +1 -1
  377. package/dist/testing/cross_backend/peer_ping_ws.js +29 -4
  378. package/dist/testing/cross_backend/postgres_database.d.ts +32 -0
  379. package/dist/testing/cross_backend/postgres_database.d.ts.map +1 -1
  380. package/dist/testing/cross_backend/postgres_database.js +56 -1
  381. package/dist/testing/cross_backend/query_shape.d.ts.map +1 -1
  382. package/dist/testing/cross_backend/query_shape.js +18 -1
  383. package/dist/testing/cross_backend/role_grant_offer_lifecycle.d.ts.map +1 -1
  384. package/dist/testing/cross_backend/role_grant_offer_lifecycle.js +23 -1
  385. package/dist/testing/cross_backend/rpc_success_fixtures.js +2 -2
  386. package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts +1 -1
  387. package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts.map +1 -1
  388. package/dist/testing/cross_backend/rust_spine_stub_backend_config.d.ts +17 -5
  389. package/dist/testing/cross_backend/rust_spine_stub_backend_config.d.ts.map +1 -1
  390. package/dist/testing/cross_backend/rust_spine_stub_backend_config.js +5 -4
  391. package/dist/testing/cross_backend/session_cap.d.ts +8 -0
  392. package/dist/testing/cross_backend/session_cap.d.ts.map +1 -1
  393. package/dist/testing/cross_backend/session_cap.js +66 -2
  394. package/dist/testing/cross_backend/setup.d.ts.map +1 -1
  395. package/dist/testing/cross_backend/setup.js +5 -4
  396. package/dist/testing/cross_backend/spine_suites.d.ts +4 -1
  397. package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
  398. package/dist/testing/cross_backend/spine_suites.js +21 -0
  399. package/dist/testing/cross_backend/spine_surface_constants.d.ts +22 -7
  400. package/dist/testing/cross_backend/spine_surface_constants.d.ts.map +1 -1
  401. package/dist/testing/cross_backend/spine_surface_constants.js +22 -7
  402. package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
  403. package/dist/testing/cross_backend/sse_round_trip.js +4 -3
  404. package/dist/testing/cross_backend/standard.d.ts +6 -12
  405. package/dist/testing/cross_backend/standard.d.ts.map +1 -1
  406. package/dist/testing/cross_backend/test_cell_grant_steward_revoke_authorize.d.ts +8 -0
  407. package/dist/testing/cross_backend/test_cell_grant_steward_revoke_authorize.d.ts.map +1 -0
  408. package/dist/testing/cross_backend/test_cell_grant_steward_revoke_authorize.js +22 -0
  409. package/dist/testing/cross_backend/testing_backdoor.d.ts.map +1 -1
  410. package/dist/testing/cross_backend/testing_backdoor.js +4 -6
  411. package/dist/testing/cross_backend/testing_origin_check.d.ts +1 -1
  412. package/dist/testing/cross_backend/testing_origin_check.d.ts.map +1 -1
  413. package/dist/testing/cross_backend/testing_origin_check.js +1 -1
  414. package/dist/testing/cross_backend/testing_reset_actions.d.ts +10 -5
  415. package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
  416. package/dist/testing/cross_backend/testing_reset_actions.js +7 -6
  417. package/dist/testing/cross_backend/testing_server_bun.d.ts.map +1 -1
  418. package/dist/testing/cross_backend/testing_server_bun.js +5 -4
  419. package/dist/testing/cross_backend/testing_server_core.d.ts +6 -7
  420. package/dist/testing/cross_backend/testing_server_core.d.ts.map +1 -1
  421. package/dist/testing/cross_backend/testing_server_core.js +1 -1
  422. package/dist/testing/cross_backend/testing_server_node.d.ts.map +1 -1
  423. package/dist/testing/cross_backend/testing_server_node.js +13 -2
  424. package/dist/testing/cross_backend/token_lifetime.d.ts.map +1 -1
  425. package/dist/testing/cross_backend/token_lifetime.js +68 -0
  426. package/dist/testing/cross_backend/transport_composition.d.ts +1 -1
  427. package/dist/testing/cross_backend/transport_composition.d.ts.map +1 -1
  428. package/dist/testing/cross_backend/transport_composition.js +45 -3
  429. package/dist/testing/cross_backend/ts_spine_backend_config.d.ts +16 -2
  430. package/dist/testing/cross_backend/ts_spine_backend_config.d.ts.map +1 -1
  431. package/dist/testing/cross_backend/ts_spine_backend_config.js +11 -8
  432. package/dist/testing/cross_backend/ws_action_rate_limit.d.ts.map +1 -1
  433. package/dist/testing/cross_backend/ws_action_rate_limit.js +30 -12
  434. package/dist/testing/cross_backend/ws_connection_cap.d.ts.map +1 -1
  435. package/dist/testing/cross_backend/ws_connection_cap.js +5 -7
  436. package/dist/testing/cross_backend/ws_endpoint.d.ts +2 -3
  437. package/dist/testing/cross_backend/ws_endpoint.d.ts.map +1 -1
  438. package/dist/testing/cross_backend/ws_envelope.d.ts +17 -0
  439. package/dist/testing/cross_backend/ws_envelope.d.ts.map +1 -0
  440. package/dist/testing/cross_backend/ws_envelope.js +172 -0
  441. package/dist/testing/cross_backend/ws_inbound_dispatch.d.ts +16 -0
  442. package/dist/testing/cross_backend/ws_inbound_dispatch.d.ts.map +1 -1
  443. package/dist/testing/cross_backend/ws_inbound_dispatch.js +8 -4
  444. package/dist/testing/cross_backend/ws_outbound_overflow.d.ts.map +1 -1
  445. package/dist/testing/cross_backend/ws_outbound_overflow.js +5 -8
  446. package/dist/testing/cross_backend/ws_role_gated.js +2 -2
  447. package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
  448. package/dist/testing/cross_backend/ws_round_trip.js +6 -4
  449. package/dist/{cli/daemon.d.ts → testing/daemon_info.d.ts} +15 -47
  450. package/dist/testing/daemon_info.d.ts.map +1 -0
  451. package/dist/testing/daemon_info.js +108 -0
  452. package/dist/testing/daemon_token_rotation.js +1 -1
  453. package/dist/testing/data_exposure.d.ts.map +1 -1
  454. package/dist/testing/data_exposure.js +3 -4
  455. package/dist/testing/db.js +2 -2
  456. package/dist/testing/integration.d.ts.map +1 -1
  457. package/dist/testing/integration.js +35 -65
  458. package/dist/testing/integration_helpers.d.ts +0 -15
  459. package/dist/testing/integration_helpers.d.ts.map +1 -1
  460. package/dist/testing/integration_helpers.js +2 -42
  461. package/dist/testing/middleware.d.ts +20 -12
  462. package/dist/testing/middleware.d.ts.map +1 -1
  463. package/dist/testing/middleware.js +49 -40
  464. package/dist/testing/rate_limiting.d.ts.map +1 -1
  465. package/dist/testing/rate_limiting.js +13 -22
  466. package/dist/testing/resolved_auth.d.ts +30 -0
  467. package/dist/testing/resolved_auth.d.ts.map +1 -0
  468. package/dist/testing/resolved_auth.js +41 -0
  469. package/dist/testing/rpc_envelope_cases.d.ts.map +1 -1
  470. package/dist/testing/rpc_envelope_cases.js +3 -0
  471. package/dist/testing/rpc_helpers.d.ts +1 -1
  472. package/dist/testing/rpc_helpers.d.ts.map +1 -1
  473. package/dist/testing/rpc_helpers.js +2 -1
  474. package/dist/testing/sse_round_trip.d.ts +5 -4
  475. package/dist/testing/sse_round_trip.d.ts.map +1 -1
  476. package/dist/testing/sse_round_trip.js +2 -2
  477. package/dist/testing/stubs.d.ts +2 -2
  478. package/dist/testing/stubs.d.ts.map +1 -1
  479. package/dist/testing/stubs.js +24 -21
  480. package/dist/testing/test_origin.d.ts +25 -0
  481. package/dist/testing/test_origin.d.ts.map +1 -0
  482. package/dist/testing/test_origin.js +28 -0
  483. package/dist/testing/transports/raw_http.d.ts +54 -0
  484. package/dist/testing/transports/raw_http.d.ts.map +1 -1
  485. package/dist/testing/transports/raw_http.js +58 -0
  486. package/dist/testing/transports/ws_raw_client.d.ts +8 -0
  487. package/dist/testing/transports/ws_raw_client.d.ts.map +1 -1
  488. package/dist/testing/transports/ws_raw_client.js +13 -0
  489. package/dist/testing/transports/ws_transport.d.ts +15 -2
  490. package/dist/testing/transports/ws_transport.d.ts.map +1 -1
  491. package/dist/testing/transports/ws_transport.js +4 -2
  492. package/dist/testing/ws_round_trip.d.ts +27 -25
  493. package/dist/testing/ws_round_trip.d.ts.map +1 -1
  494. package/dist/testing/ws_round_trip.js +34 -26
  495. package/dist/ui/AccountSessions.svelte +48 -19
  496. package/dist/ui/AccountSessions.svelte.d.ts +2 -17
  497. package/dist/ui/AccountSessions.svelte.d.ts.map +1 -1
  498. package/dist/ui/AdminAccounts.svelte +6 -1
  499. package/dist/ui/AdminAuditLog.svelte +61 -22
  500. package/dist/ui/AdminAuditLog.svelte.d.ts.map +1 -1
  501. package/dist/ui/AdminInvites.svelte +1 -1
  502. package/dist/ui/AdminOverview.svelte +76 -37
  503. package/dist/ui/AdminOverview.svelte.d.ts.map +1 -1
  504. package/dist/ui/AdminRoleGrantHistory.svelte +6 -1
  505. package/dist/ui/AdminSessions.svelte +1 -1
  506. package/dist/ui/AppShell.svelte +3 -2
  507. package/dist/ui/AppShell.svelte.d.ts +3 -2
  508. package/dist/ui/AppShell.svelte.d.ts.map +1 -1
  509. package/dist/ui/CLAUDE.md +121 -35
  510. package/dist/ui/Datatable.svelte +33 -18
  511. package/dist/ui/Datatable.svelte.d.ts +2 -14
  512. package/dist/ui/Datatable.svelte.d.ts.map +1 -1
  513. package/dist/ui/OpenSignupToggle.svelte +10 -1
  514. package/dist/ui/OpenSignupToggle.svelte.d.ts.map +1 -1
  515. package/dist/ui/PopoverButton.svelte +13 -8
  516. package/dist/ui/PopoverButton.svelte.d.ts.map +1 -1
  517. package/dist/ui/RoleGrantOfferForm.svelte +3 -2
  518. package/dist/ui/RoleGrantOfferForm.svelte.d.ts +3 -2
  519. package/dist/ui/RoleGrantOfferForm.svelte.d.ts.map +1 -1
  520. package/dist/ui/RoleGrantOfferHistory.svelte +3 -3
  521. package/dist/ui/RoleGrantOfferInbox.svelte +19 -15
  522. package/dist/ui/RoleGrantOfferInbox.svelte.d.ts.map +1 -1
  523. package/dist/ui/SurfaceExplorer.svelte +66 -27
  524. package/dist/ui/SurfaceExplorer.svelte.d.ts.map +1 -1
  525. package/dist/ui/account_sessions_state.svelte.d.ts +7 -14
  526. package/dist/ui/account_sessions_state.svelte.d.ts.map +1 -1
  527. package/dist/ui/admin_accounts_state.svelte.d.ts +14 -9
  528. package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
  529. package/dist/ui/admin_accounts_state.svelte.js +6 -4
  530. package/dist/ui/admin_invites_state.svelte.d.ts +2 -2
  531. package/dist/ui/admin_invites_state.svelte.d.ts.map +1 -1
  532. package/dist/ui/admin_rpc_adapters.d.ts +9 -9
  533. package/dist/ui/admin_rpc_adapters.d.ts.map +1 -1
  534. package/dist/ui/admin_rpc_adapters.js +9 -9
  535. package/dist/ui/app_settings_state.svelte.d.ts +2 -2
  536. package/dist/ui/app_settings_state.svelte.d.ts.map +1 -1
  537. package/dist/ui/audit_log_state.svelte.d.ts +70 -13
  538. package/dist/ui/audit_log_state.svelte.d.ts.map +1 -1
  539. package/dist/ui/audit_log_state.svelte.js +239 -47
  540. package/dist/ui/backend_probe.svelte.d.ts +93 -0
  541. package/dist/ui/backend_probe.svelte.d.ts.map +1 -0
  542. package/dist/ui/backend_probe.svelte.js +140 -0
  543. package/dist/ui/format_scope.d.ts +7 -7
  544. package/dist/ui/format_scope.d.ts.map +1 -1
  545. package/dist/ui/format_scope.js +4 -4
  546. package/dist/ui/keyed_async_slot.svelte.d.ts +2 -2
  547. package/dist/ui/keyed_async_slot.svelte.js +2 -2
  548. package/dist/ui/popover.svelte.d.ts +18 -19
  549. package/dist/ui/popover.svelte.d.ts.map +1 -1
  550. package/dist/ui/popover.svelte.js +103 -16
  551. package/dist/ui/role_grant_offers_state.svelte.d.ts +41 -46
  552. package/dist/ui/role_grant_offers_state.svelte.d.ts.map +1 -1
  553. package/dist/ui/role_grant_offers_state.svelte.js +37 -19
  554. package/dist/ui/ui_format.d.ts +17 -0
  555. package/dist/ui/ui_format.d.ts.map +1 -1
  556. package/dist/ui/ui_format.js +20 -0
  557. package/package.json +9 -8
  558. package/dist/actions/register_ws_endpoint.d.ts +0 -79
  559. package/dist/actions/register_ws_endpoint.d.ts.map +0 -1
  560. package/dist/actions/register_ws_endpoint.js +0 -109
  561. package/dist/actions/transports_ws_auth_guard.d.ts +0 -96
  562. package/dist/actions/transports_ws_auth_guard.d.ts.map +0 -1
  563. package/dist/actions/transports_ws_auth_guard.js +0 -141
  564. package/dist/actions/transports_ws_backend.d.ts.map +0 -1
  565. package/dist/cli/args.d.ts +0 -55
  566. package/dist/cli/args.d.ts.map +0 -1
  567. package/dist/cli/args.js +0 -100
  568. package/dist/cli/config.d.ts +0 -47
  569. package/dist/cli/config.d.ts.map +0 -1
  570. package/dist/cli/config.js +0 -77
  571. package/dist/cli/daemon.d.ts.map +0 -1
  572. package/dist/cli/daemon.js +0 -181
  573. package/dist/cli/help.d.ts +0 -124
  574. package/dist/cli/help.d.ts.map +0 -1
  575. package/dist/cli/help.js +0 -215
  576. package/dist/cli/logger.d.ts +0 -46
  577. package/dist/cli/logger.d.ts.map +0 -1
  578. package/dist/cli/logger.js +0 -48
  579. package/dist/cli/util.d.ts +0 -36
  580. package/dist/cli/util.d.ts.map +0 -1
  581. package/dist/cli/util.js +0 -50
  582. package/dist/realtime/sse_auth_guard.d.ts +0 -197
  583. package/dist/realtime/sse_auth_guard.d.ts.map +0 -1
  584. package/dist/realtime/sse_auth_guard.js +0 -239
  585. package/dist/realtime/subscriber_registry.d.ts.map +0 -1
  586. package/dist/testing/bootstrap_success.d.ts +0 -29
  587. package/dist/testing/bootstrap_success.d.ts.map +0 -1
  588. package/dist/testing/bootstrap_success.js +0 -144
  589. package/dist/testing/mock_fs.d.ts +0 -20
  590. package/dist/testing/mock_fs.d.ts.map +0 -1
  591. package/dist/testing/mock_fs.js +0 -28
  592. package/dist/testing/standard.d.ts +0 -122
  593. package/dist/testing/standard.d.ts.map +0 -1
  594. package/dist/testing/standard.js +0 -73
  595. package/dist/testing/testing_rate_limiter.d.ts +0 -65
  596. package/dist/testing/testing_rate_limiter.d.ts.map +0 -1
  597. package/dist/testing/testing_rate_limiter.js +0 -80
@@ -7,14 +7,14 @@
7
7
  * `GET /audit/stream` SSE route — streams aren't an action-kind, so they
8
8
  * stay on REST. The event payload broadcast on the stream surfaces via
9
9
  * `audit_log_event_specs` (one `EventSpec` per audit event type) declared
10
- * alongside the broadcaster in `realtime/sse_auth_guard.ts`.
10
+ * alongside the broadcaster in `realtime/audit_log_sse.ts`.
11
11
  *
12
12
  * @module
13
13
  */
14
14
  import type { Logger } from '@fuzdev/fuz_util/log.ts';
15
15
  import type { RouteSpec } from '../http/route_spec.js';
16
16
  import { type SseNotification } from '../realtime/sse.js';
17
- import type { SubscriberRegistry } from '../realtime/subscriber_registry.js';
17
+ import type { SseRegistry } from '../realtime/sse_registry.js';
18
18
  /** Options for audit log route specs. */
19
19
  export interface AuditLogRouteOptions {
20
20
  /** Role required to access audit routes. Default `'admin'`. */
@@ -28,8 +28,15 @@ export interface AuditLogRouteOptions {
28
28
  * (`create_audit_log_sse`, or `AppServerContext.audit_sse`) satisfies it.
29
29
  */
30
30
  stream?: {
31
- registry: SubscriberRegistry<SseNotification>;
31
+ registry: SseRegistry<SseNotification>;
32
32
  log: Logger;
33
+ /**
34
+ * Each stream's keep-alive interval (`SseResponseOptions.keep_alive_ms`)
35
+ * — a test server shortens it. Validated here, at route creation.
36
+ *
37
+ * @default SSE_KEEP_ALIVE_INTERVAL_MS
38
+ */
39
+ keep_alive_ms?: number | null;
33
40
  };
34
41
  }
35
42
  /**
@@ -46,23 +53,25 @@ export interface AuditLogRouteOptions {
46
53
  * route-spec pipeline, before the handler and so before any stream is
47
54
  * registered — a revocation landing after them would close nothing. So the
48
55
  * handler registers the stream **pending**
49
- * (`SubscriberRegistry.subscribe_pending`), then re-reads the credential
50
- * (`revalidate_resolved_auth`) and the acting actor's role grants, and only
51
- * then admits (`SubscriberRegistry.admit`). A revocation that committed before
52
- * those reads is seen by them — `401 authentication_required` for a dead
53
- * credential, `403 insufficient_permissions` for a lost role — and one whose
56
+ * (`SseRegistry.subscribe_pending`), then re-reads the credential, the
57
+ * acting actor, and its role grants (`recheck_admission`, which the WebSocket
58
+ * upgrade shares), and only then admits (`SseRegistry.admit`). A
59
+ * revocation that committed before those reads is seen by them —
60
+ * `401 authentication_required` for a dead credential or an acting actor
61
+ * deleted since the gates ran, `403 insufficient_permissions` for a lost
62
+ * role — and one whose
54
63
  * close ran after the registration found the pending entry: admission then
55
64
  * fails, and the response is a `200` whose body is the connect comment and
56
65
  * nothing else — to an `EventSource`, a stream closed an instant after it
57
66
  * opened (the client's reconnect is answered by the gates, with the precise
58
67
  * status). A pending registration receives no audit row, counts toward no cap,
59
68
  * and is removed when a re-read refuses the request. Once the server is
60
- * shutting down (`SubscriberRegistry` class doc, "Shutdown") the registration
69
+ * shutting down (`SseRegistry` class doc, "Shutdown") the registration
61
70
  * is born closed, the re-reads are skipped, and the answer is that same
62
71
  * connect comment alone — as it is when the shutdown closes a registration
63
72
  * whose re-read is in flight, even if the re-read then fails. The twin of the
64
- * Rust spine's `audit_stream_router`, which registers before its role read
65
- * rather than repeating it.
73
+ * Rust spine's `audit_stream_router`, which runs the same order through its
74
+ * `recheck_admission`.
66
75
  *
67
76
  * ## Credential deadline
68
77
  *
@@ -1 +1 @@
1
- {"version":3,"file":"audit_log_routes.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/audit_log_routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAUvD,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAW7E,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACpC,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE;QACR,QAAQ,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;QAC9C,GAAG,EAAE,MAAM,CAAC;KACZ,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,4BAA4B,GAAI,UAAU,oBAAoB,KAAG,KAAK,CAAC,SAAS,CAmH5F,CAAC"}
1
+ {"version":3,"file":"audit_log_routes.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/audit_log_routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAUvD,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAW/D,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACpC,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE;QACR,QAAQ,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;QACvC,GAAG,EAAE,MAAM,CAAC;QACZ;;;;;WAKG;QACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC9B,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,eAAO,MAAM,4BAA4B,GAAI,UAAU,oBAAoB,KAAG,KAAK,CAAC,SAAS,CAgI5F,CAAC"}
@@ -7,18 +7,20 @@
7
7
  * `GET /audit/stream` SSE route — streams aren't an action-kind, so they
8
8
  * stay on REST. The event payload broadcast on the stream surfaces via
9
9
  * `audit_log_event_specs` (one `EventSpec` per audit event type) declared
10
- * alongside the broadcaster in `realtime/sse_auth_guard.ts`.
10
+ * alongside the broadcaster in `realtime/audit_log_sse.ts`.
11
11
  *
12
12
  * @module
13
13
  */
14
+ import { UnreachableError } from '@fuzdev/fuz_util/error.ts';
14
15
  import { ERROR_AUTHENTICATION_REQUIRED, ERROR_INSUFFICIENT_PERMISSIONS } from '../http/error_schemas.js';
15
- import { AUTH_API_TOKEN_ID_KEY, TEST_CONTEXT_PRESET_KEY } from '../hono_context.js';
16
+ import { TEST_CONTEXT_PRESET_KEY } from '../hono_context.js';
16
17
  import { create_audit_log_route_shape, DEFAULT_AUDIT_STREAM_ROLE } from './audit_log_route_schema.js';
17
18
  import { create_sse_response } from '../realtime/sse.js';
18
- import { AUTH_SESSION_TOKEN_HASH_KEY, has_scoped_role, refresh_role_grants, require_request_context } from './request_context.js';
19
- import { get_resolved_auth, revalidate_resolved_auth } from './resolved_auth.js';
19
+ import { validate_sse_keep_alive_ms } from '../realtime/sse_constants.js';
20
+ import { require_request_context } from './request_context.js';
21
+ import { get_resolved_auth, recheck_admission, resolved_auth_api_token_id, resolved_auth_session_hash } from './resolved_auth.js';
20
22
  import { schedule_credential_deadline } from './credential_deadline.js';
21
- import { AUDIT_LOG_CHANNEL } from '../realtime/sse_auth_guard.js';
23
+ import { AUDIT_LOG_CHANNEL } from '../realtime/audit_log_sse.js';
22
24
  /**
23
25
  * Create the optional audit-log SSE route spec.
24
26
  *
@@ -33,23 +35,25 @@ import { AUDIT_LOG_CHANNEL } from '../realtime/sse_auth_guard.js';
33
35
  * route-spec pipeline, before the handler and so before any stream is
34
36
  * registered — a revocation landing after them would close nothing. So the
35
37
  * handler registers the stream **pending**
36
- * (`SubscriberRegistry.subscribe_pending`), then re-reads the credential
37
- * (`revalidate_resolved_auth`) and the acting actor's role grants, and only
38
- * then admits (`SubscriberRegistry.admit`). A revocation that committed before
39
- * those reads is seen by them — `401 authentication_required` for a dead
40
- * credential, `403 insufficient_permissions` for a lost role — and one whose
38
+ * (`SseRegistry.subscribe_pending`), then re-reads the credential, the
39
+ * acting actor, and its role grants (`recheck_admission`, which the WebSocket
40
+ * upgrade shares), and only then admits (`SseRegistry.admit`). A
41
+ * revocation that committed before those reads is seen by them —
42
+ * `401 authentication_required` for a dead credential or an acting actor
43
+ * deleted since the gates ran, `403 insufficient_permissions` for a lost
44
+ * role — and one whose
41
45
  * close ran after the registration found the pending entry: admission then
42
46
  * fails, and the response is a `200` whose body is the connect comment and
43
47
  * nothing else — to an `EventSource`, a stream closed an instant after it
44
48
  * opened (the client's reconnect is answered by the gates, with the precise
45
49
  * status). A pending registration receives no audit row, counts toward no cap,
46
50
  * and is removed when a re-read refuses the request. Once the server is
47
- * shutting down (`SubscriberRegistry` class doc, "Shutdown") the registration
51
+ * shutting down (`SseRegistry` class doc, "Shutdown") the registration
48
52
  * is born closed, the re-reads are skipped, and the answer is that same
49
53
  * connect comment alone — as it is when the shutdown closes a registration
50
54
  * whose re-read is in flight, even if the re-read then fails. The twin of the
51
- * Rust spine's `audit_stream_router`, which registers before its role read
52
- * rather than repeating it.
55
+ * Rust spine's `audit_stream_router`, which runs the same order through its
56
+ * `recheck_admission`.
53
57
  *
54
58
  * ## Credential deadline
55
59
  *
@@ -67,7 +71,8 @@ import { AUDIT_LOG_CHANNEL } from '../realtime/sse_auth_guard.js';
67
71
  export const create_audit_log_route_specs = (options) => {
68
72
  if (!options?.stream)
69
73
  return [];
70
- const { registry, log } = options.stream;
74
+ const { registry, log, keep_alive_ms } = options.stream;
75
+ validate_sse_keep_alive_ms(keep_alive_ms);
71
76
  const required_role = options.required_role ?? DEFAULT_AUDIT_STREAM_ROLE;
72
77
  return [
73
78
  {
@@ -84,13 +89,16 @@ export const create_audit_log_route_specs = (options) => {
84
89
  // sessions only, so `api_token_id` is null here; it is registered
85
90
  // when present so that a consumer widening the credential gate
86
91
  // still has a revoked token's stream closed by `token_revoke`.
87
- const token_hash = c.get(AUTH_SESSION_TOKEN_HASH_KEY) ?? null;
88
- const api_token_id = c.get(AUTH_API_TOKEN_ID_KEY) ?? null;
92
+ // Both come off the resolved credential, which carries each only
93
+ // for its own credential type.
94
+ const resolved = get_resolved_auth(c);
95
+ const session_hash = resolved_auth_session_hash(resolved);
96
+ const api_token_id = resolved_auth_api_token_id(resolved);
89
97
  // Register pending first: from here every revocation finds the
90
98
  // stream (TSDoc, "Admission").
91
99
  const pending = registry.subscribe_pending({
92
100
  channels: [AUDIT_LOG_CHANNEL],
93
- scope: token_hash ?? undefined,
101
+ scope: session_hash ?? undefined,
94
102
  groups: api_token_id === null ? [ctx.account.id] : [ctx.account.id, api_token_id]
95
103
  });
96
104
  // The pending registration is released on every path that does not
@@ -107,20 +115,31 @@ export const create_audit_log_route_specs = (options) => {
107
115
  // refuses whatever they answer.
108
116
  if (!c.get(TEST_CONTEXT_PRESET_KEY) && !registry.closing) {
109
117
  const reread = async () => {
110
- const resolved = get_resolved_auth(c);
111
- const credential_is_live = resolved !== null && (await revalidate_resolved_auth(route, resolved));
112
- if (!credential_is_live) {
113
- log.info('audit stream: credential revoked during the request', ctx.account.id);
114
- return c.json({ error: ERROR_AUTHENTICATION_REQUIRED }, 401);
115
- }
116
118
  // Global grants only, like the `require_role` gate that ran in
117
119
  // the pipeline — a scoped grant must not open the instance-wide
118
120
  // stream.
119
- if (!has_scoped_role(await refresh_role_grants(ctx, route), required_role, null)) {
120
- log.info('audit stream: role revoked during the request', ctx.account.id);
121
- return c.json({ error: ERROR_INSUFFICIENT_PERMISSIONS, required_roles: [required_role] }, 403);
121
+ const recheck = resolved === null
122
+ ? 'credential_revoked'
123
+ : await recheck_admission(route, {
124
+ resolved,
125
+ request_context: ctx,
126
+ required_roles: [required_role]
127
+ });
128
+ switch (recheck) {
129
+ case 'admitted':
130
+ return null;
131
+ case 'credential_revoked':
132
+ log.info('audit stream: credential revoked during the request', ctx.account.id);
133
+ return c.json({ error: ERROR_AUTHENTICATION_REQUIRED }, 401);
134
+ case 'actor_inactive':
135
+ log.info('audit stream: acting actor deleted during the request', ctx.account.id);
136
+ return c.json({ error: ERROR_AUTHENTICATION_REQUIRED }, 401);
137
+ case 'role_revoked':
138
+ log.info('audit stream: role revoked during the request', ctx.account.id);
139
+ return c.json({ error: ERROR_INSUFFICIENT_PERMISSIONS, required_roles: [required_role] }, 403);
140
+ default:
141
+ throw new UnreachableError(recheck);
122
142
  }
123
- return null;
124
143
  };
125
144
  const refusal = await reread().catch((error) => {
126
145
  // the shutdown closed the registration and then the database
@@ -146,7 +165,8 @@ export const create_audit_log_route_specs = (options) => {
146
165
  // whose listener runs at once and removes the registration, so
147
166
  // `admit` refuses it rather than evicting a live stream for it.
148
167
  const { response, stream } = create_sse_response(c, log, {
149
- account_id: ctx.account.id
168
+ account_id: ctx.account.id,
169
+ keep_alive_ms
150
170
  });
151
171
  stream.on_close(pending.unsubscribe);
152
172
  admitted = registry.admit(pending, stream);
@@ -158,7 +178,7 @@ export const create_audit_log_route_specs = (options) => {
158
178
  // The stream ends when the credential it opened on expires —
159
179
  // closed as a revocation closes it (TSDoc, "Credential
160
180
  // deadline").
161
- stream.on_close(schedule_credential_deadline(get_resolved_auth(c)?.credential_deadline ?? null, () => {
181
+ stream.on_close(schedule_credential_deadline(resolved?.credential_deadline ?? null, () => {
162
182
  log.info('audit stream: credential expired', ctx.account.id);
163
183
  stream.close();
164
184
  }));
@@ -50,8 +50,8 @@ export declare const AuditEventType: z.ZodEnum<{
50
50
  }>;
51
51
  export type AuditEventType = z.infer<typeof AuditEventType>;
52
52
  /**
53
- * What a **successful** audit row invalidates — the axis both revocation
54
- * listeners (`create_ws_auth_guard`, `create_sse_auth_guard`) dispatch on.
53
+ * What a **successful** audit row invalidates — the axis the revocation
54
+ * listener (`create_revocation_guard`) dispatches on.
55
55
  *
56
56
  * - `none` — the row invalidates no live connection.
57
57
  * - `session` — one session: the connections whose session-token hash equals
@@ -63,8 +63,8 @@ export type AuditEventType = z.infer<typeof AuditEventType>;
63
63
  * `metadata.role`, when the revoked grant was global
64
64
  * (`to_global_role_revocation`).
65
65
  *
66
- * The scope says what the row invalidated; both listeners act on every scope
67
- * alike. On `role` that matters for the WebSocket too: per-message dispatch
66
+ * The scope says what the row invalidated; the listener acts on every scope
67
+ * alike, for every transport. On `role` that matters for the WebSocket too: per-message dispatch
68
68
  * re-authorizes each request against its own action, but a socket admitted by
69
69
  * a role gate also receives every server push its endpoint sends, which no
70
70
  * dispatch ever re-checks — so a socket that lost the gating role is closed,
@@ -74,9 +74,8 @@ export type AuditEventType = z.infer<typeof AuditEventType>;
74
74
  */
75
75
  export type RevocationScope = 'none' | 'session' | 'token' | 'account' | 'role';
76
76
  /**
77
- * The `RevocationScope` of every builtin audit event — declared once, so the
78
- * WebSocket and SSE revocation listeners read one answer instead of keeping a
79
- * list each. Typed over `AuditEventType`, so a new event type does not compile
77
+ * The `RevocationScope` of every builtin audit event — declared once, the one
78
+ * answer the revocation listener reads, and the twin of the Rust spine's table. Typed over `AuditEventType`, so a new event type does not compile
80
79
  * until it declares its scope here.
81
80
  *
82
81
  * A scope other than `none` marks an event whose success invalidates a live
@@ -104,15 +103,16 @@ export declare const to_revocation_scope: (event_type: string) => RevocationScop
104
103
  * The account and role a successful `role`-scope row took away, when the
105
104
  * revoked grant was **global** — `null` otherwise.
106
105
  *
107
- * A role gate (`register_ws_endpoint`'s `required_roles`, the audit stream's
106
+ * A role gate (`register_action_ws`'s `required_roles`, the audit stream's
108
107
  * `require_role`) admits on global grants only, so revoking a scoped grant
109
108
  * takes away nothing a gate admitted on and closes nothing. A row with no
110
109
  * `metadata.scope_id` reads as global: when unsure, closing is the safe side.
111
110
  * The target is `target_account_id ?? account_id`, as for the `account` scope.
112
- * Both revocation listeners read it, so a socket and a stream gated on one
113
- * role close on the same rows.
111
+ * The revocation guard reads it for every transport, so a socket and a
112
+ * stream gated on one role close on the same rows.
114
113
  *
115
- * Twin of the Rust spine's `global_role_revocation`.
114
+ * Twin of the role arm of the Rust spine's
115
+ * `ConnectionCloseTarget::from_audit_event`.
116
116
  *
117
117
  * @param event - a row whose scope is `role` (the caller dispatched on it)
118
118
  * @returns the account and role to close on, or `null` when the row names no
@@ -380,14 +380,6 @@ export interface AuditLogEvent {
380
380
  created_at: string;
381
381
  metadata: Record<string, unknown> | null;
382
382
  }
383
- /**
384
- * Narrow metadata type for a known event type.
385
- *
386
- * Use after checking `event_type` to get typed metadata access.
387
- */
388
- export declare const get_audit_metadata: <T extends AuditEventType>(event: AuditLogEvent & {
389
- event_type: T;
390
- }) => AuditMetadataMap[T] | null;
391
383
  /** Input for creating an audit log entry. */
392
384
  export interface AuditLogInput<T extends string = AuditEventType> {
393
385
  event_type: T;
@@ -486,7 +478,7 @@ export interface AuditLogListOptions {
486
478
  * types registered via `create_audit_log_config({extra_events})` round-trip
487
479
  * through queries, `on_audit_event` callbacks, and JSON-RPC responses
488
480
  * identically to builtins. `AuditLogInput<T>` stays parameterized on the
489
- * write side so `AuditMetadataMap` narrowing via `get_audit_metadata` works.
481
+ * write side so `AuditMetadataMap` narrows metadata per event type.
490
482
  */
491
483
  export declare const AuditLogEventJson: z.ZodObject<{
492
484
  id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
@@ -545,7 +537,7 @@ export declare const RoleGrantHistoryEventJson: z.ZodObject<{
545
537
  target_username: z.ZodNullable<z.ZodString>;
546
538
  }, z.core.$strict>;
547
539
  export type RoleGrantHistoryEventJson = z.infer<typeof RoleGrantHistoryEventJson>;
548
- /** Zod schema for admin session listing (session + username). */
540
+ /** Zod schema for admin session listing (session + username, without `is_current`). */
549
541
  export declare const AdminSessionJson: z.ZodObject<{
550
542
  id: z.core.$ZodBranded<z.ZodString, "SessionId", "out">;
551
543
  account_id: z.core.$ZodBranded<z.ZodUUID, "Uuid", "out">;
@@ -1 +1 @@
1
- {"version":3,"file":"audit_log_schema.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/audit_log_schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAS,MAAM,yBAAyB,CAAC;AAkBt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5F,wEAAwE;AACxE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;kBAGpC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF,uFAAuF;AACvF,eAAO,MAAM,gBAAgB;;;;;;kBAE3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -62,9 +62,8 @@ export const AUDIT_EVENT_TYPES = Object.freeze([
62
62
  /** Zod schema for audit event types. */
63
63
  export const AuditEventType = z.enum(AUDIT_EVENT_TYPES);
64
64
  /**
65
- * The `RevocationScope` of every builtin audit event — declared once, so the
66
- * WebSocket and SSE revocation listeners read one answer instead of keeping a
67
- * list each. Typed over `AuditEventType`, so a new event type does not compile
65
+ * The `RevocationScope` of every builtin audit event — declared once, the one
66
+ * answer the revocation listener reads, and the twin of the Rust spine's table. Typed over `AuditEventType`, so a new event type does not compile
68
67
  * until it declares its scope here.
69
68
  *
70
69
  * A scope other than `none` marks an event whose success invalidates a live
@@ -123,15 +122,16 @@ export const to_revocation_scope = (event_type) => Object.hasOwn(audit_event_rev
123
122
  * The account and role a successful `role`-scope row took away, when the
124
123
  * revoked grant was **global** — `null` otherwise.
125
124
  *
126
- * A role gate (`register_ws_endpoint`'s `required_roles`, the audit stream's
125
+ * A role gate (`register_action_ws`'s `required_roles`, the audit stream's
127
126
  * `require_role`) admits on global grants only, so revoking a scoped grant
128
127
  * takes away nothing a gate admitted on and closes nothing. A row with no
129
128
  * `metadata.scope_id` reads as global: when unsure, closing is the safe side.
130
129
  * The target is `target_account_id ?? account_id`, as for the `account` scope.
131
- * Both revocation listeners read it, so a socket and a stream gated on one
132
- * role close on the same rows.
130
+ * The revocation guard reads it for every transport, so a socket and a
131
+ * stream gated on one role close on the same rows.
133
132
  *
134
- * Twin of the Rust spine's `global_role_revocation`.
133
+ * Twin of the role arm of the Rust spine's
134
+ * `ConnectionCloseTarget::from_audit_event`.
135
135
  *
136
136
  * @param event - a row whose scope is `role` (the caller dispatched on it)
137
137
  * @returns the account and role to close on, or `null` when the row names no
@@ -462,14 +462,6 @@ export const audit_metadata_schemas = Object.freeze({
462
462
  })
463
463
  })
464
464
  });
465
- /**
466
- * Narrow metadata type for a known event type.
467
- *
468
- * Use after checking `event_type` to get typed metadata access.
469
- */
470
- export const get_audit_metadata = (event) => {
471
- return event.metadata;
472
- };
473
465
  /** Builtin fuz_app audit-log config — every existing event type and its metadata schema. */
474
466
  export const builtin_audit_log_config = Object.freeze({
475
467
  event_types: AUDIT_EVENT_TYPES,
@@ -526,7 +518,7 @@ export const AUDIT_LOG_DEFAULT_LIMIT = 50;
526
518
  * types registered via `create_audit_log_config({extra_events})` round-trip
527
519
  * through queries, `on_audit_event` callbacks, and JSON-RPC responses
528
520
  * identically to builtins. `AuditLogInput<T>` stays parameterized on the
529
- * write side so `AuditMetadataMap` narrowing via `get_audit_metadata` works.
521
+ * write side so `AuditMetadataMap` narrows metadata per event type.
530
522
  */
531
523
  export const AuditLogEventJson = z.strictObject({
532
524
  id: Uuid,
@@ -551,7 +543,7 @@ export const RoleGrantHistoryEventJson = AuditLogEventJson.extend({
551
543
  username: z.string().nullable(),
552
544
  target_username: z.string().nullable()
553
545
  });
554
- /** Zod schema for admin session listing (session + username). */
555
- export const AdminSessionJson = AuthSessionJson.extend({
546
+ /** Zod schema for admin session listing (session + username, without `is_current`). */
547
+ export const AdminSessionJson = AuthSessionJson.omit({ is_current: true }).extend({
556
548
  username: z.string()
557
549
  });
@@ -34,9 +34,12 @@ import type { QueryDeps } from '../db/query_deps.js';
34
34
  * A token that fails the `is_api_token_shaped` precheck soft-fails before
35
35
  * the database is touched.
36
36
  * Auth scheme matching is case-insensitive per RFC 7235.
37
- * On success, sets `c.var.auth_account_id`, `CREDENTIAL_TYPE_KEY = 'api_token'`,
38
- * and `AUTH_API_TOKEN_ID_KEY`. Skips when an account is already authenticated
39
- * (e.g. by session middleware). Acting-actor resolution + `RequestContext`
37
+ * On success, sets the `api_token` arm of `ResolvedAuth` (`RESOLVED_AUTH_KEY`):
38
+ * the account, the token id, its scope, and its deadline. The last leg of the
39
+ * chain, it skips when an earlier one (the daemon token or a session cookie)
40
+ * already resolved the request — before reading the header, so a token sent
41
+ * beside a winning credential is never looked up and its `last_used_at` /
42
+ * `last_used_ip` never move. Acting-actor resolution + `RequestContext`
40
43
  * construction are deferred to the dispatcher's authorization phase.
41
44
  *
42
45
  * There is deliberately **no rate limit on this path**, and no 429 — every
@@ -50,7 +53,7 @@ import type { QueryDeps } from '../db/query_deps.js';
50
53
  *
51
54
  * @param deps - query dependencies (pool-level db for middleware)
52
55
  * @param log - the logger instance
53
- * @mutates Hono context - sets `ACCOUNT_ID_KEY`, `CREDENTIAL_TYPE_KEY`, `AUTH_API_TOKEN_ID_KEY`, and `CREDENTIAL_DEADLINE_KEY` on success
56
+ * @mutates Hono context - sets `RESOLVED_AUTH_KEY` on success
54
57
  */
55
58
  export declare const create_bearer_auth_middleware: (deps: QueryDeps, log: Logger) => MiddlewareHandler;
56
59
  //# sourceMappingURL=bearer_auth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bearer_auth.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/bearer_auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAYtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,6BAA6B,GAAI,MAAM,SAAS,EAAE,KAAK,MAAM,KAAG,iBAgF5E,CAAC"}
1
+ {"version":3,"file":"bearer_auth.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/bearer_auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAOtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,6BAA6B,GAAI,MAAM,SAAS,EAAE,KAAK,MAAM,KAAG,iBAkF5E,CAAC"}
@@ -15,8 +15,9 @@
15
15
  * @module
16
16
  */
17
17
  import { DEV } from 'esm-env';
18
- import { AUTH_API_TOKEN_ID_KEY, ACCOUNT_ID_KEY, CREDENTIAL_DEADLINE_KEY, CREDENTIAL_TYPE_KEY, TOKEN_SCOPE_KEY } from '../hono_context.js';
18
+ import { RESOLVED_AUTH_KEY } from '../hono_context.js';
19
19
  import { credential_deadline_after } from './credential_deadline.js';
20
+ import { get_resolved_auth } from './resolved_auth.js';
20
21
  import { is_api_token_shaped } from './api_token.js';
21
22
  import { query_validate_api_token } from './api_token_queries.js';
22
23
  import { get_client_ip } from '../http/client_ip.js';
@@ -38,9 +39,12 @@ import { is_browser_context } from '../http/origin.js';
38
39
  * A token that fails the `is_api_token_shaped` precheck soft-fails before
39
40
  * the database is touched.
40
41
  * Auth scheme matching is case-insensitive per RFC 7235.
41
- * On success, sets `c.var.auth_account_id`, `CREDENTIAL_TYPE_KEY = 'api_token'`,
42
- * and `AUTH_API_TOKEN_ID_KEY`. Skips when an account is already authenticated
43
- * (e.g. by session middleware). Acting-actor resolution + `RequestContext`
42
+ * On success, sets the `api_token` arm of `ResolvedAuth` (`RESOLVED_AUTH_KEY`):
43
+ * the account, the token id, its scope, and its deadline. The last leg of the
44
+ * chain, it skips when an earlier one (the daemon token or a session cookie)
45
+ * already resolved the request — before reading the header, so a token sent
46
+ * beside a winning credential is never looked up and its `last_used_at` /
47
+ * `last_used_ip` never move. Acting-actor resolution + `RequestContext`
44
48
  * construction are deferred to the dispatcher's authorization phase.
45
49
  *
46
50
  * There is deliberately **no rate limit on this path**, and no 429 — every
@@ -54,12 +58,12 @@ import { is_browser_context } from '../http/origin.js';
54
58
  *
55
59
  * @param deps - query dependencies (pool-level db for middleware)
56
60
  * @param log - the logger instance
57
- * @mutates Hono context - sets `ACCOUNT_ID_KEY`, `CREDENTIAL_TYPE_KEY`, `AUTH_API_TOKEN_ID_KEY`, and `CREDENTIAL_DEADLINE_KEY` on success
61
+ * @mutates Hono context - sets `RESOLVED_AUTH_KEY` on success
58
62
  */
59
63
  export const create_bearer_auth_middleware = (deps, log) => {
60
64
  return async (c, next) => {
61
- // Skip if an account is already authenticated (e.g. by session middleware)
62
- if (c.get(ACCOUNT_ID_KEY) != null) {
65
+ // an earlier leg (daemon token, session cookie) already resolved the request
66
+ if (get_resolved_auth(c) !== null) {
63
67
  await next();
64
68
  return;
65
69
  }
@@ -112,14 +116,16 @@ export const create_bearer_auth_middleware = (deps, log) => {
112
116
  await next();
113
117
  return;
114
118
  }
115
- c.set(ACCOUNT_ID_KEY, api_token.account_id);
116
- c.set(CREDENTIAL_TYPE_KEY, 'api_token');
117
- c.set(AUTH_API_TOKEN_ID_KEY, api_token.id);
118
- // Parsed by the query, which refuses a token whose stored scope is
119
- // unreadable — there is no default to fall back to.
120
- c.set(TOKEN_SCOPE_KEY, api_token.scope);
121
- // the row's expiry, read on the database clock; none for an eternal token
122
- c.set(CREDENTIAL_DEADLINE_KEY, credential_deadline_after([api_token.expires_in_ms]));
119
+ c.set(RESOLVED_AUTH_KEY, {
120
+ credential_type: 'api_token',
121
+ account_id: api_token.account_id,
122
+ api_token_id: api_token.id,
123
+ // Parsed by the query, which refuses a token whose stored scope is
124
+ // unreadable — there is no default to fall back to.
125
+ scope: api_token.scope,
126
+ // the row's expiry, read on the database clock; none for an eternal token
127
+ credential_deadline: credential_deadline_after([api_token.expires_in_ms])
128
+ });
123
129
  await next();
124
130
  };
125
131
  };
@@ -0,0 +1,89 @@
1
+ /**
2
+ * The cell verbs' shared gates and audit emit.
3
+ *
4
+ * Every gate loads the cell, reads its grants where the tier consults them,
5
+ * applies the tier's predicate, and answers a miss and a denial with the same
6
+ * `cell_not_found` 404. A 403 on denial would confirm the row exists, so a
7
+ * caller with no authority could walk ids and read a private cell's existence
8
+ * off the difference; one wire shape for both is the IDOR mask. Each gate
9
+ * returns the loaded row, so a handler that needs it doesn't re-read it.
10
+ *
11
+ * Twins of the Rust `fuz_cell_actions` helpers; `require_viewable_cell`
12
+ * covers both of Rust's authenticated and `_optional_auth` read gates.
13
+ *
14
+ * @module
15
+ */
16
+ import type { ActionActorContext, ActionContext } from '../actions/action_types.js';
17
+ import { jsonrpc_errors } from '../http/jsonrpc_errors.js';
18
+ import type { QueryDeps } from '../db/query_deps.js';
19
+ import { type CellRow } from '../db/cell_queries.js';
20
+ import type { Uuid } from '../primitive_schemas.js';
21
+ import type { AuditLogInput } from './audit_log_schema.js';
22
+ import type { AuditEmitter } from './audit_emitter.js';
23
+ import type { RequestActorContext, RequestContext } from './request_context.js';
24
+ /**
25
+ * The 404 every cell gate answers for a miss and a denial alike.
26
+ *
27
+ * @returns the `cell_not_found` JSON-RPC error
28
+ */
29
+ export declare const cell_not_found_error: () => ReturnType<typeof jsonrpc_errors.not_found>;
30
+ /**
31
+ * Load a cell and gate the caller on `can_view_cell`, 404-masking a miss and a
32
+ * denial alike.
33
+ *
34
+ * The read tier: a create's parent, a clone's source, the far endpoint a write
35
+ * links to (so a link is no existence oracle), and the endpoints of the
36
+ * public relation lists, where `auth` may be `null`.
37
+ *
38
+ * @param deps - query deps
39
+ * @param auth - the caller, or `null` when unauthenticated
40
+ * @param cell_id - the cell to load
41
+ * @returns the loaded row
42
+ * @throws the `cell_not_found` 404 on a miss or a denial
43
+ */
44
+ export declare const require_viewable_cell: (deps: QueryDeps, auth: RequestContext | null, cell_id: Uuid) => Promise<CellRow>;
45
+ /**
46
+ * Load a cell and gate the caller on `can_edit_cell`, 404-masking a miss and a
47
+ * denial alike.
48
+ *
49
+ * The write tier: `cell_update` / `cell_delete`, the source a field write
50
+ * writes, and the parent every item mutation writes.
51
+ *
52
+ * @param deps - query deps
53
+ * @param auth - the caller
54
+ * @param cell_id - the cell to load
55
+ * @returns the loaded row
56
+ * @throws the `cell_not_found` 404 on a miss or a denial
57
+ */
58
+ export declare const require_editable_cell: (deps: QueryDeps, auth: RequestActorContext, cell_id: Uuid) => Promise<CellRow>;
59
+ /**
60
+ * Load a cell and gate the caller on `can_manage_cell`, 404-masking a miss and
61
+ * a denial alike.
62
+ *
63
+ * The manage tier: `cell_audit_list`, `cell_grant_create`, `cell_grant_list`.
64
+ * Manage is admin-or-owner and not a grant level, so no grant is read. A
65
+ * viewer or an editor gets the same mask a stranger does: an audit timeline
66
+ * and a share list say who touched the cell, which is more sensitive than the
67
+ * content.
68
+ *
69
+ * @param deps - query deps
70
+ * @param auth - the caller
71
+ * @param cell_id - the cell to load
72
+ * @returns the loaded row
73
+ * @throws the `cell_not_found` 404 on a miss or a denial
74
+ */
75
+ export declare const require_manageable_cell: (deps: QueryDeps, auth: RequestActorContext, cell_id: Uuid) => Promise<CellRow>;
76
+ /**
77
+ * Emit a cell-domain audit event for the caller, with `actor_id`,
78
+ * `account_id`, and `ip` lifted from `auth` and `ctx`. `metadata` is the
79
+ * event's own envelope.
80
+ *
81
+ * @param ctx - the action context
82
+ * @param audit - the bound audit emitter
83
+ * @param auth - the caller
84
+ * @param event_type - the cell event
85
+ * @param metadata - the event's metadata envelope
86
+ * @mutates `audit_log` table - inserts the row through `audit.emit`
87
+ */
88
+ export declare const emit_cell_audit: <T extends string>(ctx: ActionContext | ActionActorContext, audit: AuditEmitter, auth: RequestActorContext, event_type: T, metadata: AuditLogInput<T>["metadata"]) => void;
89
+ //# sourceMappingURL=cell_action_helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"c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