@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
@@ -11,10 +11,13 @@ import '../assert_dev_env.js';
11
11
  *
12
12
  * - **the cap bounds concurrent sessions, by eviction not refusal** — logging in
13
13
  * `max_sessions + 1` times succeeds every time (a login is never denied for
14
- * being the one over the line), and the newest cookie resolves afterward.
15
- * - **the evicted session is the oldest** — the first login's cookie no longer
16
- * authenticates once the cap is exceeded. A spine with no cap authenticates it
17
- * fine, which is exactly the defect this catches.
14
+ * being the one over the line), every one of the newest `max_sessions`
15
+ * cookies resolves afterward, and the account lists exactly `max_sessions`
16
+ * sessions.
17
+ * - **the evicted session is the oldest, and only it** — the first login's
18
+ * cookie no longer authenticates once the cap is exceeded. A spine with no
19
+ * cap authenticates it fine, and one evicting all but the newest fails the
20
+ * newest-`max_sessions` check, which is exactly the defects this catches.
18
21
  * - **the session list marks the caller's own session `is_current`** — each
19
22
  * login's `account_session_list` marks exactly one row, its own, over HTTP
20
23
  * and (when `ws` mounts the account actions) over a socket the login
@@ -24,16 +27,27 @@ import '../assert_dev_env.js';
24
27
  * - **an evicted session's socket is closed** (when `ws` is supplied) — the cap
25
28
  * deletes the session row, and a WebSocket never re-reads its session, so
26
29
  * the login that evicts it must close the socket it opened
27
- * (`WS_CLOSE_SESSION_REVOKED`), once the eviction has committed. A spine
28
- * that only deletes the row leaves the socket running on a dead session.
30
+ * (`WS_CLOSE_SESSION_REVOKED` with its reason), once the eviction has
31
+ * committed, and leave a socket on a session it kept open and dispatching. A
32
+ * spine that only deletes the row leaves the socket running on a dead
33
+ * session; one that closes the account's sockets drops the kept one.
34
+ * - **concurrent logins at the cap all succeed** and leave the account at
35
+ * exactly the cap. The logins of one account take turns on its row lock, so
36
+ * each evicts against a count holding the ones before it; without that, two
37
+ * logins each count without the other's row and both commit above the cap,
38
+ * or deadlock in their evictions and answer 500. The burst can only show the
39
+ * race when it happens: the exact pin — a login waiting on another's
40
+ * uncommitted mint — is each spine's own real-Postgres test (and a backend
41
+ * on a one-connection engine serializes the burst whatever it locks).
29
42
  *
30
43
  * **Why `max_sessions + 1` logins and not `max_sessions`.** The starting session
31
44
  * count isn't zero and isn't guaranteed equal across impls — `create_account`
32
45
  * seeds its own session on the Rust cradle. Overshooting by one guarantees at
33
46
  * least one eviction whatever the baseline is, and the *oldest* login is the
34
- * first to go either way. Asserting on the first and last sessions rather than
35
- * on a row count keeps the case wire-observable (no DB channel) and
36
- * baseline-independent.
47
+ * first to go either way. Once the logins overshoot, the account holds exactly
48
+ * the cap — the newest `max_sessions`, all of them this case's logins — so the
49
+ * session count and the per-login checks are baseline-independent and
50
+ * wire-observable (no DB channel).
37
51
  *
38
52
  * Both surfaces are flat REST (`POST /api/account/login`, `GET /api/account/status`)
39
53
  * on every spine, so this is an imperative suite (not a `conformance_table` row)
@@ -44,23 +58,19 @@ import '../assert_dev_env.js';
44
58
  * fourth `Set-Cookie` parser — reading the raw header is `cookie_attributes.ts`'s
45
59
  * job, and this case only needs "does this login still authenticate".
46
60
  *
47
- * What it does **not** pin: concurrent creators. Two simultaneous logins can
48
- * each evict against a stale count under Read Committed and both commit above
49
- * the cap — see `query_session_enforce_limit`'s race note. That needs a
50
- * barrier-based test against one backend, not a parity case.
51
- *
52
61
  * @module
53
62
  */
54
63
  import { describe, test, assert } from 'vitest';
55
64
  import { parse } from '@fuzdev/fuz_schema/schema.ts';
56
65
  import { heartbeat_action_spec } from '../../actions/heartbeat.js';
57
- import { WS_CLOSE_SESSION_REVOKED } from '../../actions/transports.js';
66
+ import { WS_CLOSE_SESSION_REVOKED, WS_CLOSE_SESSION_REVOKED_REASON } from '../../actions/transports.js';
58
67
  import { DEFAULT_MAX_SESSIONS } from '../../auth/account_route_schema.js';
59
68
  import { SessionListOutput } from '../../auth/account_action_specs.js';
60
69
  import { DEFAULT_TEST_PASSWORD } from '../test_credentials.js';
61
70
  import { create_ws_transport } from '../transports/ws_transport.js';
62
71
  import { test_if } from './capabilities.js';
63
72
  import { cross_rpc_call, expect_output } from './cross_rpc.js';
73
+ import { login_fresh_session } from './session_login.js';
64
74
  import { SPINE_ACCOUNT_LOGIN_PATH, SPINE_ACCOUNT_STATUS_PATH, SPINE_RPC_PATH } from './spine_surface_constants.js';
65
75
  export const describe_session_cap_cross_tests = (options) => {
66
76
  const { setup_test, ws, ws_account_actions = false, ws_account_roles = [] } = options;
@@ -72,19 +82,15 @@ export const describe_session_cap_cross_tests = (options) => {
72
82
  // never collides (see `setup.ts`).
73
83
  const username = 'session_cap_user';
74
84
  /** Log `username` in on a fresh transport — one login, one session, one jar. */
75
- const login = async (fixture, label) => {
76
- const transport = fixture.fresh_transport();
77
- const res = await transport(login_path, {
78
- method: 'POST',
79
- headers: { 'content-type': 'application/json' },
80
- body: JSON.stringify({ username, password: DEFAULT_TEST_PASSWORD })
81
- });
82
- assert.strictEqual(res.status, 200, `${label} must succeed — the cap evicts, it never refuses`);
83
- assert.ok(transport.cookies().length > 0, `${label} must set a session cookie on its jar`);
84
- return transport;
85
- };
85
+ const login = (fixture, label) => login_fresh_session(fixture, {
86
+ login_path,
87
+ username,
88
+ password: DEFAULT_TEST_PASSWORD,
89
+ // a refused login past the cap is the defect, not a test fault
90
+ label: `${label} (the cap evicts, it never refuses)`
91
+ });
86
92
  describe('per-account session cap parity', () => {
87
- test(`logging in ${max_sessions + 1} times evicts the oldest session (newest cookie resolves, first does not)`, async () => {
93
+ test(`logging in ${max_sessions + 1} times evicts the oldest session (the newest ${max_sessions} resolve, the first does not)`, async () => {
88
94
  const fixture = await setup_test();
89
95
  await fixture.create_account({ username, password_value: DEFAULT_TEST_PASSWORD });
90
96
  // One transport per login, each with its own empty jar, so each ends up
@@ -102,9 +108,36 @@ export const describe_session_cap_cross_tests = (options) => {
102
108
  await res.text();
103
109
  return res.status;
104
110
  };
105
- assert.strictEqual(await status_on(sessions[sessions.length - 1]), 200, 'the newest session must still resolve — the cap must evict, not refuse');
111
+ // every one of the newest `max_sessions` still resolves — so the cap
112
+ // evicts the oldest, not every session but the newest
113
+ const newest = sessions.slice(1);
114
+ const newest_statuses = await Promise.all(newest.map(status_on));
115
+ assert.deepStrictEqual(newest_statuses, newest.map(() => 200), `each of the newest ${max_sessions} sessions must still resolve — the cap must evict ` +
116
+ 'the oldest, not refuse and not evict more');
106
117
  assert.strictEqual(await status_on(sessions[0]), 401, `the oldest session must be evicted once the account exceeds ${max_sessions} sessions ` +
107
118
  '(a spine with no cap authenticates this cookie)');
119
+ // and the account holds exactly the cap — the logins pushed out
120
+ // whatever it held before them, and nothing past them
121
+ const { sessions: listed } = expect_output(await cross_rpc_call(newest[newest.length - 1], rpc_path, 'account_session_list', undefined, {}), SessionListOutput);
122
+ assert.strictEqual(listed.length, max_sessions, `the account must hold exactly ${max_sessions} sessions after the cap evicts`);
123
+ });
124
+ test(`${max_sessions * 3} concurrent logins all succeed and leave exactly ${max_sessions} sessions`, async () => {
125
+ const fixture = await setup_test();
126
+ await fixture.create_account({ username, password_value: DEFAULT_TEST_PASSWORD });
127
+ const burst = max_sessions * 3;
128
+ // each asserts its own 200 — a login lost to an eviction deadlock is a 500
129
+ const sessions = await Promise.all(Array.from({ length: burst }, (_, i) => login(fixture, `concurrent login ${i + 1}/${burst}`)));
130
+ let listed = null;
131
+ for (const transport of sessions) {
132
+ const result = await cross_rpc_call(transport, rpc_path, 'account_session_list', undefined, {});
133
+ // an evicted login's transport is the anonymous caller
134
+ if (!result.ok)
135
+ continue;
136
+ listed = expect_output(result, SessionListOutput).sessions.length;
137
+ break;
138
+ }
139
+ assert.strictEqual(listed, max_sessions, `the account must hold exactly ${max_sessions} sessions after a concurrent burst — ` +
140
+ 'each login evicting against the sessions committed before it');
108
141
  });
109
142
  test("the session list marks the caller's own session current, and none for a bearer or daemon token", async () => {
110
143
  const fixture = await setup_test();
@@ -163,7 +196,10 @@ export const describe_session_cap_cross_tests = (options) => {
163
196
  });
164
197
  // `max_sessions` further logins leave the watched session outside the
165
198
  // newest `max_sessions`, so it is evicted whatever sessions the account
166
- // held before it (`create_account` seeds one on some cradles).
199
+ // held before it (`create_account` seeds one on some cradles). A socket on
200
+ // the first of those logins — inside the newest `max_sessions` throughout —
201
+ // must stay open: the eviction closes the evicted session's sockets, not
202
+ // the account's.
167
203
  test_if(ws !== undefined, 'a session the cap evicts has its open socket closed', async () => {
168
204
  const fixture = await setup_test();
169
205
  await fixture.create_account({
@@ -171,25 +207,37 @@ export const describe_session_cap_cross_tests = (options) => {
171
207
  password_value: DEFAULT_TEST_PASSWORD,
172
208
  roles: [...ws_account_roles]
173
209
  });
174
- const victim = await login(fixture, 'the login whose socket is watched');
175
- const client = await create_ws_transport({
210
+ const open_socket = (transport) => create_ws_transport({
176
211
  base_url: ws.base_url,
177
212
  ws_path: ws.ws_path,
178
- cookies: victim.cookies(),
213
+ cookies: transport.cookies(),
179
214
  origin: ws.origin
180
215
  });
216
+ const victim = await login(fixture, 'the login whose socket is watched');
217
+ const client = await open_socket(victim);
218
+ let survivor = null;
181
219
  try {
182
220
  // admitted and dispatching before the evicting logins
183
221
  await client.request(1, heartbeat_action_spec.method, {});
184
222
  for (let i = 0; i < max_sessions; i++) {
185
- await login(fixture, `evicting login ${i + 1}/${max_sessions}`);
223
+ const evicting = await login(fixture, `evicting login ${i + 1}/${max_sessions}`);
224
+ if (i === 0) {
225
+ survivor = await open_socket(evicting);
226
+ await survivor.request(1, heartbeat_action_spec.method, {});
227
+ }
186
228
  }
187
229
  const closed = await client.wait_for_close(2000);
188
230
  assert.ok(closed, `the socket of a session evicted past ${max_sessions} sessions did not close within 2s`);
189
231
  assert.strictEqual(client.close_code, WS_CLOSE_SESSION_REVOKED);
232
+ assert.strictEqual(client.close_reason, WS_CLOSE_SESSION_REVOKED_REASON);
233
+ // the socket on a session the cap kept still dispatches — the reply is
234
+ // the barrier: a close the eviction sent it lands ahead of it
235
+ assert.ok(survivor, 'the surviving socket was opened');
236
+ assert.deepStrictEqual(await survivor.request(2, heartbeat_action_spec.method, {}), {}, "a kept session's socket must still dispatch");
237
+ assert.strictEqual(survivor.close_code, null, "a kept session's socket must stay open");
190
238
  }
191
239
  finally {
192
- await client.close();
240
+ await Promise.all([client.close(), survivor?.close()]);
193
241
  }
194
242
  });
195
243
  });
@@ -0,0 +1,43 @@
1
+ import '../assert_dev_env.js';
2
+ /**
3
+ * What a response does to the session cookie, by its `Set-Cookie` lines for
4
+ * the cookie's name, in order:
5
+ *
6
+ * - `none` — no line for the session cookie
7
+ * - `clear` — exactly one line, the clearing string
8
+ * - `set` — exactly one line minting a cookie: a non-empty value, the fixed
9
+ * attributes, a positive `Max-Age`
10
+ * - `clear_then_set` — the clear followed by a mint, what a login answers when
11
+ * the request carried a session cookie that does not verify: the session
12
+ * middleware prepares the clear before the handler appends the new cookie
13
+ */
14
+ export type SessionCookieEffect = 'none' | 'clear' | 'set' | 'clear_then_set';
15
+ /**
16
+ * The `Set-Cookie` lines that name the session cookie, in response order.
17
+ *
18
+ * @param set_cookies - every `Set-Cookie` line of the response, in order
19
+ * @param cookie_name - the session cookie's name
20
+ */
21
+ export declare const filter_session_set_cookies: (set_cookies: ReadonlyArray<string>, cookie_name: string) => Array<string>;
22
+ /**
23
+ * Classify what a response does to the session cookie.
24
+ *
25
+ * @param set_cookies - every `Set-Cookie` line of the response, in order
26
+ * @param cookie_name - the session cookie's name
27
+ * @returns the effect, or `null` when the session cookie's lines are none of
28
+ * the shapes `SessionCookieEffect` names — two mints, a clear after a mint, a
29
+ * clear or mint whose bytes differ from the formatters'
30
+ */
31
+ export declare const classify_session_cookie_effect: (set_cookies: ReadonlyArray<string>, cookie_name: string) => SessionCookieEffect | null;
32
+ /**
33
+ * The `Set-Cookie` lines that would hand the client a session cookie: a line
34
+ * for the session cookie's name whose value is non-empty or whose `Max-Age` is
35
+ * positive. Read loosely, unlike `classify_session_cookie_effect`, so a mint in
36
+ * a shape no formatter writes still counts — this is the floor a refusal is
37
+ * held to, and a malformed mint is still a mint.
38
+ *
39
+ * @param set_cookies - every `Set-Cookie` line of the response, in order
40
+ * @param cookie_name - the session cookie's name
41
+ */
42
+ export declare const find_session_cookie_mints: (set_cookies: ReadonlyArray<string>, cookie_name: string) => Array<string>;
43
+ //# sourceMappingURL=session_cookie_effect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session_cookie_effect.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/session_cookie_effect.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAwB9B;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,gBAAgB,CAAC;AAQ9E;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,GACtC,aAAa,aAAa,CAAC,MAAM,CAAC,EAClC,aAAa,MAAM,KACjB,KAAK,CAAC,MAAM,CAAwE,CAAC;AAwBxF;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,GAC1C,aAAa,aAAa,CAAC,MAAM,CAAC,EAClC,aAAa,MAAM,KACjB,mBAAmB,GAAG,IAmBxB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,GACrC,aAAa,aAAa,CAAC,MAAM,CAAC,EAClC,aAAa,MAAM,KACjB,KAAK,CAAC,MAAM,CAQZ,CAAC"}
@@ -0,0 +1,103 @@
1
+ import '../assert_dev_env.js';
2
+ /**
3
+ * What a response does to the session cookie, read off its `Set-Cookie`
4
+ * lines — shared by the conformance runner (`expect.set_cookie` and its
5
+ * always-on no-mint-on-refusal floor) and the cross-backend differential,
6
+ * which compares the classification across backends since it compares header
7
+ * names, not values.
8
+ *
9
+ * Both readings spell the expected lines through the spine's own formatters
10
+ * (`format_session_clear_cookie`, `format_session_set_cookie`), so the harness
11
+ * and the spine cannot drift apart silently: a clear or a mint whose bytes
12
+ * differ from what the formatters write — an attribute moved, dropped or
13
+ * added — classifies as no effect at all (`null`).
14
+ *
15
+ * @module
16
+ */
17
+ import { format_session_clear_cookie, format_session_set_cookie, is_cookie_value } from '../../auth/session_cookie.js';
18
+ /** The name a `Set-Cookie` line sets — the text before its first `=`, or `null` with none. */
19
+ const set_cookie_name = (line) => {
20
+ const eq = line.indexOf('=');
21
+ return eq <= 0 ? null : line.slice(0, eq).trim();
22
+ };
23
+ /**
24
+ * The `Set-Cookie` lines that name the session cookie, in response order.
25
+ *
26
+ * @param set_cookies - every `Set-Cookie` line of the response, in order
27
+ * @param cookie_name - the session cookie's name
28
+ */
29
+ export const filter_session_set_cookies = (set_cookies, cookie_name) => set_cookies.filter((line) => set_cookie_name(line) === cookie_name);
30
+ /** The positive integer a `Max-Age=` attribute spells, else `null`. */
31
+ const MAX_AGE_REGEX = /;\s*max-age=(\d+)\s*(?:;|$)/i;
32
+ /**
33
+ * Whether `line` mints the session cookie byte for byte as
34
+ * `format_session_set_cookie` writes it: a non-empty cookie-octet value and a
35
+ * positive `Max-Age`.
36
+ */
37
+ const is_session_mint_line = (line, cookie_name) => {
38
+ if (!line.startsWith(`${cookie_name}=`))
39
+ return false;
40
+ const rest = line.slice(cookie_name.length + 1);
41
+ const semi = rest.indexOf(';');
42
+ if (semi === -1)
43
+ return false;
44
+ const value = rest.slice(0, semi);
45
+ if (value === '' || !is_cookie_value(value))
46
+ return false;
47
+ const max_age_match = MAX_AGE_REGEX.exec(rest);
48
+ if (!max_age_match?.[1])
49
+ return false;
50
+ const max_age = Number(max_age_match[1]);
51
+ if (!Number.isSafeInteger(max_age) || max_age <= 0)
52
+ return false;
53
+ return line === format_session_set_cookie(cookie_name, value, max_age);
54
+ };
55
+ /**
56
+ * Classify what a response does to the session cookie.
57
+ *
58
+ * @param set_cookies - every `Set-Cookie` line of the response, in order
59
+ * @param cookie_name - the session cookie's name
60
+ * @returns the effect, or `null` when the session cookie's lines are none of
61
+ * the shapes `SessionCookieEffect` names — two mints, a clear after a mint, a
62
+ * clear or mint whose bytes differ from the formatters'
63
+ */
64
+ export const classify_session_cookie_effect = (set_cookies, cookie_name) => {
65
+ const lines = filter_session_set_cookies(set_cookies, cookie_name);
66
+ const clear = format_session_clear_cookie(cookie_name);
67
+ if (lines.length === 0)
68
+ return 'none';
69
+ const [first, second] = lines;
70
+ if (lines.length === 1 && first !== undefined) {
71
+ if (first === clear)
72
+ return 'clear';
73
+ if (is_session_mint_line(first, cookie_name))
74
+ return 'set';
75
+ return null;
76
+ }
77
+ if (lines.length === 2 &&
78
+ first === clear &&
79
+ second !== undefined &&
80
+ is_session_mint_line(second, cookie_name)) {
81
+ return 'clear_then_set';
82
+ }
83
+ return null;
84
+ };
85
+ /**
86
+ * The `Set-Cookie` lines that would hand the client a session cookie: a line
87
+ * for the session cookie's name whose value is non-empty or whose `Max-Age` is
88
+ * positive. Read loosely, unlike `classify_session_cookie_effect`, so a mint in
89
+ * a shape no formatter writes still counts — this is the floor a refusal is
90
+ * held to, and a malformed mint is still a mint.
91
+ *
92
+ * @param set_cookies - every `Set-Cookie` line of the response, in order
93
+ * @param cookie_name - the session cookie's name
94
+ */
95
+ export const find_session_cookie_mints = (set_cookies, cookie_name) => filter_session_set_cookies(set_cookies, cookie_name).filter((line) => {
96
+ const rest = line.slice(line.indexOf('=') + 1);
97
+ const semi = rest.indexOf(';');
98
+ const value = (semi === -1 ? rest : rest.slice(0, semi)).trim();
99
+ if (value !== '')
100
+ return true;
101
+ const max_age = MAX_AGE_REGEX.exec(rest)?.[1];
102
+ return max_age !== undefined && Number(max_age) > 0;
103
+ });
@@ -0,0 +1,24 @@
1
+ import '../assert_dev_env.js';
2
+ import type { FetchTransport } from '../transports/fetch_transport.js';
3
+ import type { TestFixture } from './setup.js';
4
+ /** Options for `login_fresh_session`. */
5
+ export interface LoginFreshSessionOptions {
6
+ /** REST login route path. */
7
+ readonly login_path: string;
8
+ readonly username: string;
9
+ readonly password: string;
10
+ /** Names the login in a failure message. */
11
+ readonly label: string;
12
+ }
13
+ /**
14
+ * Log `username` in on a fresh transport: one login, one session, one jar
15
+ * holding exactly that session's cookie, which every call on the transport
16
+ * re-sends. The fixture's own transport carries the keeper's cookie, so a
17
+ * login there would leave the jar holding two.
18
+ *
19
+ * @param fixture - the per-test fixture whose backend the login goes to
20
+ * @param options - the route, the credentials, and a label for failures
21
+ * @returns the transport holding the new session's cookie
22
+ */
23
+ export declare const login_fresh_session: (fixture: TestFixture, options: LoginFreshSessionOptions) => Promise<FetchTransport>;
24
+ //# sourceMappingURL=session_login.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session_login.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/session_login.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAY9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,yCAAyC;AACzC,MAAM,WAAW,wBAAwB;IACxC,6BAA6B;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,4CAA4C;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,GAC/B,SAAS,WAAW,EACpB,SAAS,wBAAwB,KAC/B,OAAO,CAAC,cAAc,CAWxB,CAAC"}
@@ -0,0 +1,31 @@
1
+ import '../assert_dev_env.js';
2
+ /**
3
+ * One more session for an account, on a jar of its own — for the cross
4
+ * suites that hold several sessions of one account at once (the session cap,
5
+ * a session-scoped revocation).
6
+ *
7
+ * @module
8
+ */
9
+ import { assert } from 'vitest';
10
+ /**
11
+ * Log `username` in on a fresh transport: one login, one session, one jar
12
+ * holding exactly that session's cookie, which every call on the transport
13
+ * re-sends. The fixture's own transport carries the keeper's cookie, so a
14
+ * login there would leave the jar holding two.
15
+ *
16
+ * @param fixture - the per-test fixture whose backend the login goes to
17
+ * @param options - the route, the credentials, and a label for failures
18
+ * @returns the transport holding the new session's cookie
19
+ */
20
+ export const login_fresh_session = async (fixture, options) => {
21
+ const { login_path, username, password, label } = options;
22
+ const transport = fixture.fresh_transport();
23
+ const res = await transport(login_path, {
24
+ method: 'POST',
25
+ headers: { 'content-type': 'application/json' },
26
+ body: JSON.stringify({ username, password })
27
+ });
28
+ assert.strictEqual(res.status, 200, `${label} must succeed (status ${res.status})`);
29
+ assert.ok(transport.cookies().length > 0, `${label} must set a session cookie on its jar`);
30
+ return transport;
31
+ };
@@ -204,6 +204,42 @@ export interface TestFixture {
204
204
  * RPC over the keeper's daemon-token channel (the driver has no keyring).
205
205
  */
206
206
  readonly mint_expired_session: () => Promise<string>;
207
+ /**
208
+ * Mint a session for the keeper account, prove it authenticates
209
+ * (`assert_credential_authenticates`), revoke it, and return the
210
+ * ready-to-send `Cookie` header value (`name=value`): the signed cookie
211
+ * still verifies, its `auth_session` row is gone. Throws when the session
212
+ * did not authenticate or the revoke removed no row. Backs the
213
+ * `revoked_session` conformance principal. In-process mints through the
214
+ * session queries and revokes with `query_session_revoke_for_account`;
215
+ * cross-process logs the keeper in over the production login route and
216
+ * revokes that session with `account_session_revoke`, so the fixture's own
217
+ * keeper session lives on.
218
+ */
219
+ readonly mint_revoked_session: () => Promise<string>;
220
+ /**
221
+ * Mint an API token for the keeper account, prove it authenticates, revoke
222
+ * it, and return the raw token; throws when it did not authenticate or the
223
+ * revoke removed no row. Backs the `revoked_token` conformance principal.
224
+ * In-process through the token queries; cross-process over the production
225
+ * `account_token_create` and `account_token_revoke`.
226
+ */
227
+ readonly mint_revoked_token: () => Promise<string>;
228
+ /**
229
+ * Return a raw API token that authenticated and whose row is now past its
230
+ * `expires_at`. Backs the `expired_token` conformance principal. Both
231
+ * fixtures mint an account (`create_account`, so the keeper's own
232
+ * credentials live on), prove its eternal token authenticates, then pull
233
+ * the account's credential expiries in to `EXPIRED_TOKEN_SHORTEN_SECONDS`
234
+ * from now with the statement behind `_testing_shorten_credential_expiry`
235
+ * (`query_shorten_credential_expiry`), and wait `EXPIRED_TOKEN_WAIT_MS`, so
236
+ * the row expires as a real one does: `expires_at` after `created_at`, then
237
+ * passed. Cross-process the statement runs through the backdoor, which the
238
+ * backend must mount. In-process it runs directly; backdating the expiry
239
+ * into the past instead would skip the wait but leave `expires_at` before
240
+ * `created_at`, a row no lifetime writes.
241
+ */
242
+ readonly mint_expired_token: () => Promise<string>;
207
243
  /**
208
244
  * Whether the suites' audit reads refuse metadata keys an event type
209
245
  * doesn't declare — the setup's `reject_unknown_audit_metadata_keys`.
@@ -482,6 +518,87 @@ export declare const capture_migration_tracker: (handle: ReconstructedBootstrapp
482
518
  * clock precision.
483
519
  */
484
520
  export declare const EXPIRED_SESSION_OFFSET_SECONDS = -60;
521
+ /**
522
+ * The seconds `mint_expired_token` pulls a token's expiry in to — over
523
+ * `_testing_shorten_credential_expiry` cross-process, with its statement
524
+ * in-process — the backdoor's floor
525
+ * (`TESTING_SHORTEN_CREDENTIAL_EXPIRY_MIN_SECONDS`, which this module does not
526
+ * import: its module carries the in-process backend), so the wait is as short
527
+ * as the backdoor allows; a floor raised past it fails the call loud.
528
+ */
529
+ export declare const EXPIRED_TOKEN_SHORTEN_SECONDS = 1;
530
+ /**
531
+ * How long `mint_expired_token` waits after the shorten answers, on both
532
+ * fixtures: the row's `expires_at` is `EXPIRED_TOKEN_SHORTEN_SECONDS` past the
533
+ * database's `NOW()` of a statement that ran before the answer, so once this
534
+ * much has passed on the same clock the row is expired when the token is sent.
535
+ * The margin covers the timer firing early by its rounding.
536
+ */
537
+ export declare const EXPIRED_TOKEN_WAIT_MS: number;
538
+ /** What `assert_credential_authenticates` sends and expects. */
539
+ export interface AssertCredentialAuthenticatesOptions {
540
+ /**
541
+ * A transport carrying no credential of its own: an empty jar, refused
542
+ * otherwise, since a cookie it carried would answer for the credential.
543
+ */
544
+ readonly transport: FetchTransport;
545
+ /** The RPC endpoint `account_verify` is mounted on. */
546
+ readonly rpc_path: string;
547
+ /** The credential, alone: a `cookie`, an `authorization`, or a daemon token. */
548
+ readonly headers: Readonly<Record<string, string>>;
549
+ /** The account the credential must answer as. */
550
+ readonly account_id: string;
551
+ /** The fixture accessor checking, named in the error. */
552
+ readonly accessor: string;
553
+ }
554
+ /**
555
+ * Prove a credential authenticates — `account_verify` answers 200 as the
556
+ * expected account — before a fixture accessor kills it. A revoked or expired
557
+ * credential reaches the same lookup a never-issued one does, so without this
558
+ * a `mint_revoked_*` that minted nothing (or a token that never worked) would
559
+ * pass every row its principal backs; with it, the principal's refusal can
560
+ * only come from the revocation or the expiry.
561
+ *
562
+ * @param options - the transport, endpoint, credential and expected account
563
+ * @throws Error naming the accessor when the credential does not answer as the account
564
+ */
565
+ export declare const assert_credential_authenticates: (options: AssertCredentialAuthenticatesOptions) => Promise<void>;
566
+ /** The seeds a `_testing_reset` answer carries, matched to what was requested. */
567
+ export interface MatchedTestingResetSeeds<TAccount> {
568
+ /** Each requested account's seed, keyed by the username as requested. */
569
+ readonly extra_accounts: Readonly<Record<string, TAccount>>;
570
+ /** The seeded actors in the requested order. */
571
+ readonly extra_actors: ReadonlyArray<{
572
+ id: Uuid;
573
+ name: string;
574
+ }>;
575
+ }
576
+ /**
577
+ * Match a `_testing_reset` answer's seeded accounts and actors to the request,
578
+ * by username (as the spines store it, lowercase) and by actor name — never by
579
+ * position. Every spine implements the backdoor itself, so a seed it drops,
580
+ * duplicates, renames, or reorders must fail the setup rather than hand a test
581
+ * the wrong account or none.
582
+ *
583
+ * @param backend_name - the backend that answered, for the error
584
+ * @param requested - the usernames and actor names the reset asked for
585
+ * @param seeded - the reset's `extra_accounts` and `extra_actors`
586
+ * @throws Error naming the backend and each missing, unexpected, or duplicated seed
587
+ */
588
+ export declare const match_testing_reset_seeds: <TAccount extends {
589
+ readonly account: {
590
+ readonly username: string;
591
+ };
592
+ }>(backend_name: string, requested: {
593
+ readonly usernames: ReadonlyArray<string>;
594
+ readonly actor_names: ReadonlyArray<string>;
595
+ }, seeded: {
596
+ readonly extra_accounts: ReadonlyArray<TAccount>;
597
+ readonly extra_actors: ReadonlyArray<{
598
+ id: Uuid;
599
+ name: string;
600
+ }>;
601
+ }) => MatchedTestingResetSeeds<TAccount>;
485
602
  /**
486
603
  * Build a `SetupTest` against a spawned + bootstrapped backend.
487
604
  *
@@ -1 +1 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/lib/testing/cross_backend/setup.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAMN,KAAK,KAAK,EACV,KAAK,SAAS,EACd,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAuB,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAKvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAA0B,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACxC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,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