@fuzdev/fuz_app 0.104.0 → 0.105.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/dist/actions/CLAUDE.md +2 -2
  2. package/dist/actions/action_bridge.d.ts.map +1 -1
  3. package/dist/actions/action_bridge.js +2 -2
  4. package/dist/actions/action_codegen.d.ts.map +1 -1
  5. package/dist/actions/action_codegen.js +3 -3
  6. package/dist/actions/action_dispatcher.d.ts.map +1 -1
  7. package/dist/actions/action_dispatcher.js +3 -3
  8. package/dist/actions/action_event.d.ts.map +1 -1
  9. package/dist/actions/action_event.js +11 -11
  10. package/dist/actions/action_event_data.d.ts.map +1 -1
  11. package/dist/actions/action_event_data.js +2 -2
  12. package/dist/actions/action_event_helpers.d.ts.map +1 -1
  13. package/dist/actions/action_event_helpers.js +2 -2
  14. package/dist/actions/action_event_types.d.ts.map +1 -1
  15. package/dist/actions/action_event_types.js +4 -4
  16. package/dist/actions/action_rpc.d.ts.map +1 -1
  17. package/dist/actions/action_rpc.js +13 -13
  18. package/dist/actions/action_spec.d.ts.map +1 -1
  19. package/dist/actions/action_spec.js +6 -6
  20. package/dist/actions/action_types.d.ts.map +1 -1
  21. package/dist/actions/broadcast_api.d.ts.map +1 -1
  22. package/dist/actions/broadcast_api.js +1 -1
  23. package/dist/actions/cancel.d.ts.map +1 -1
  24. package/dist/actions/cancel.js +3 -3
  25. package/dist/actions/compile_action_registry.d.ts.map +1 -1
  26. package/dist/actions/frontend_rpc_client.d.ts.map +1 -1
  27. package/dist/actions/frontend_rpc_client.js +3 -3
  28. package/dist/actions/heartbeat.d.ts.map +1 -1
  29. package/dist/actions/heartbeat.js +2 -2
  30. package/dist/actions/peer_ping.d.ts.map +1 -1
  31. package/dist/actions/peer_ping.js +6 -6
  32. package/dist/actions/peer_request.d.ts.map +1 -1
  33. package/dist/actions/perform_action.d.ts.map +1 -1
  34. package/dist/actions/perform_action.js +13 -13
  35. package/dist/actions/protocol.d.ts.map +1 -1
  36. package/dist/actions/protocol.js +1 -1
  37. package/dist/actions/register_action_ws.d.ts.map +1 -1
  38. package/dist/actions/register_action_ws.js +14 -11
  39. package/dist/actions/register_ws_endpoint.d.ts.map +1 -1
  40. package/dist/actions/register_ws_endpoint.js +3 -3
  41. package/dist/actions/request_tracker.svelte.d.ts.map +1 -1
  42. package/dist/actions/request_tracker.svelte.js +2 -2
  43. package/dist/actions/rpc_client.d.ts.map +1 -1
  44. package/dist/actions/rpc_client.js +7 -7
  45. package/dist/actions/socket.svelte.d.ts.map +1 -1
  46. package/dist/actions/socket.svelte.js +4 -3
  47. package/dist/actions/transports.d.ts.map +1 -1
  48. package/dist/actions/transports_http.d.ts.map +1 -1
  49. package/dist/actions/transports_http.js +7 -7
  50. package/dist/actions/transports_ws.d.ts.map +1 -1
  51. package/dist/actions/transports_ws.js +3 -3
  52. package/dist/actions/transports_ws_auth_guard.d.ts +4 -4
  53. package/dist/actions/transports_ws_auth_guard.d.ts.map +1 -1
  54. package/dist/actions/transports_ws_auth_guard.js +5 -5
  55. package/dist/actions/transports_ws_backend.d.ts.map +1 -1
  56. package/dist/actions/transports_ws_backend.js +2 -2
  57. package/dist/actions/ws_endpoint_spec.d.ts +2 -2
  58. package/dist/actions/ws_endpoint_spec.d.ts.map +1 -1
  59. package/dist/auth/CLAUDE.md +11 -7
  60. package/dist/auth/account_action_specs.d.ts +4 -4
  61. package/dist/auth/account_action_specs.d.ts.map +1 -1
  62. package/dist/auth/account_action_specs.js +18 -19
  63. package/dist/auth/account_actions.d.ts +3 -3
  64. package/dist/auth/account_actions.d.ts.map +1 -1
  65. package/dist/auth/account_actions.js +10 -10
  66. package/dist/auth/account_queries.d.ts.map +1 -1
  67. package/dist/auth/account_queries.js +6 -6
  68. package/dist/auth/account_route_schema.d.ts.map +1 -1
  69. package/dist/auth/account_route_schema.js +19 -19
  70. package/dist/auth/account_routes.d.ts +2 -2
  71. package/dist/auth/account_routes.d.ts.map +1 -1
  72. package/dist/auth/account_routes.js +27 -27
  73. package/dist/auth/account_schema.d.ts +13 -2
  74. package/dist/auth/account_schema.d.ts.map +1 -1
  75. package/dist/auth/account_schema.js +22 -11
  76. package/dist/auth/actor_lookup_action_specs.d.ts.map +1 -1
  77. package/dist/auth/actor_lookup_action_specs.js +5 -5
  78. package/dist/auth/actor_lookup_actions.d.ts +4 -2
  79. package/dist/auth/actor_lookup_actions.d.ts.map +1 -1
  80. package/dist/auth/actor_lookup_actions.js +3 -3
  81. package/dist/auth/actor_lookup_queries.d.ts.map +1 -1
  82. package/dist/auth/actor_search_action_specs.d.ts.map +1 -1
  83. package/dist/auth/actor_search_action_specs.js +6 -6
  84. package/dist/auth/actor_search_actions.d.ts +4 -2
  85. package/dist/auth/actor_search_actions.d.ts.map +1 -1
  86. package/dist/auth/actor_search_actions.js +5 -5
  87. package/dist/auth/actor_search_queries.d.ts.map +1 -1
  88. package/dist/auth/admin_action_specs.d.ts +2 -2
  89. package/dist/auth/admin_action_specs.d.ts.map +1 -1
  90. package/dist/auth/admin_action_specs.js +55 -55
  91. package/dist/auth/admin_actions.d.ts +5 -5
  92. package/dist/auth/admin_actions.d.ts.map +1 -1
  93. package/dist/auth/admin_actions.js +45 -44
  94. package/dist/auth/all_action_spec_registries.d.ts.map +1 -1
  95. package/dist/auth/all_action_spec_registries.js +1 -1
  96. package/dist/auth/all_cell_actions.d.ts.map +1 -1
  97. package/dist/auth/all_cell_actions.js +1 -1
  98. package/dist/auth/api_token.d.ts.map +1 -1
  99. package/dist/auth/api_token_queries.d.ts +7 -2
  100. package/dist/auth/api_token_queries.d.ts.map +1 -1
  101. package/dist/auth/api_token_queries.js +8 -3
  102. package/dist/auth/app_settings_queries.d.ts.map +1 -1
  103. package/dist/auth/app_settings_schema.d.ts.map +1 -1
  104. package/dist/auth/app_settings_schema.js +3 -3
  105. package/dist/auth/audit_emitter.d.ts +28 -20
  106. package/dist/auth/audit_emitter.d.ts.map +1 -1
  107. package/dist/auth/audit_emitter.js +37 -19
  108. package/dist/auth/audit_log_ddl.js +1 -1
  109. package/dist/auth/audit_log_queries.d.ts.map +1 -1
  110. package/dist/auth/audit_log_queries.js +2 -2
  111. package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
  112. package/dist/auth/audit_log_route_schema.js +1 -1
  113. package/dist/auth/audit_log_routes.d.ts.map +1 -1
  114. package/dist/auth/audit_log_routes.js +3 -3
  115. package/dist/auth/audit_log_schema.d.ts +2 -2
  116. package/dist/auth/audit_log_schema.d.ts.map +1 -1
  117. package/dist/auth/audit_log_schema.js +69 -68
  118. package/dist/auth/auth_ddl.js +3 -3
  119. package/dist/auth/auth_guard_resolver.d.ts.map +1 -1
  120. package/dist/auth/bearer_auth.d.ts.map +1 -1
  121. package/dist/auth/bootstrap_account.d.ts.map +1 -1
  122. package/dist/auth/bootstrap_account.js +5 -5
  123. package/dist/auth/bootstrap_route_schema.d.ts.map +1 -1
  124. package/dist/auth/bootstrap_route_schema.js +6 -6
  125. package/dist/auth/bootstrap_routes.d.ts.map +1 -1
  126. package/dist/auth/bootstrap_routes.js +7 -7
  127. package/dist/auth/cell_action_specs.d.ts +1 -1
  128. package/dist/auth/cell_action_specs.d.ts.map +1 -1
  129. package/dist/auth/cell_action_specs.js +47 -47
  130. package/dist/auth/cell_actions.d.ts +2 -2
  131. package/dist/auth/cell_actions.d.ts.map +1 -1
  132. package/dist/auth/cell_actions.js +37 -37
  133. package/dist/auth/cell_audit_action_specs.d.ts.map +1 -1
  134. package/dist/auth/cell_audit_action_specs.js +4 -4
  135. package/dist/auth/cell_audit_actions.d.ts.map +1 -1
  136. package/dist/auth/cell_audit_actions.js +3 -3
  137. package/dist/auth/cell_audit_events.d.ts.map +1 -1
  138. package/dist/auth/cell_audit_events.js +5 -5
  139. package/dist/auth/cell_audit_metadata.d.ts.map +1 -1
  140. package/dist/auth/cell_audit_metadata.js +3 -3
  141. package/dist/auth/cell_authorize.d.ts.map +1 -1
  142. package/dist/auth/cell_data_schema.d.ts.map +1 -1
  143. package/dist/auth/cell_data_schema.js +1 -1
  144. package/dist/auth/cell_field_action_specs.d.ts.map +1 -1
  145. package/dist/auth/cell_field_action_specs.js +16 -16
  146. package/dist/auth/cell_field_actions.d.ts +2 -2
  147. package/dist/auth/cell_field_actions.d.ts.map +1 -1
  148. package/dist/auth/cell_field_actions.js +11 -11
  149. package/dist/auth/cell_field_audit_metadata.d.ts.map +1 -1
  150. package/dist/auth/cell_field_audit_metadata.js +2 -2
  151. package/dist/auth/cell_grant_action_specs.d.ts.map +1 -1
  152. package/dist/auth/cell_grant_action_specs.js +15 -15
  153. package/dist/auth/cell_grant_actions.d.ts +2 -2
  154. package/dist/auth/cell_grant_actions.d.ts.map +1 -1
  155. package/dist/auth/cell_grant_actions.js +12 -12
  156. package/dist/auth/cell_grant_audit_metadata.d.ts.map +1 -1
  157. package/dist/auth/cell_grant_audit_metadata.js +3 -3
  158. package/dist/auth/cell_item_action_specs.d.ts +6 -2
  159. package/dist/auth/cell_item_action_specs.d.ts.map +1 -1
  160. package/dist/auth/cell_item_action_specs.js +25 -21
  161. package/dist/auth/cell_item_actions.d.ts +2 -2
  162. package/dist/auth/cell_item_actions.d.ts.map +1 -1
  163. package/dist/auth/cell_item_actions.js +14 -14
  164. package/dist/auth/cell_item_audit_metadata.d.ts.map +1 -1
  165. package/dist/auth/cell_item_audit_metadata.js +3 -3
  166. package/dist/auth/cell_relation_visibility.d.ts.map +1 -1
  167. package/dist/auth/cleanup.d.ts.map +1 -1
  168. package/dist/auth/cleanup.js +2 -2
  169. package/dist/auth/credential_type_schema.d.ts.map +1 -1
  170. package/dist/auth/credential_type_schema.js +5 -5
  171. package/dist/auth/daemon_token.d.ts.map +1 -1
  172. package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
  173. package/dist/auth/daemon_token_middleware.js +2 -2
  174. package/dist/auth/deps.d.ts +20 -5
  175. package/dist/auth/deps.d.ts.map +1 -1
  176. package/dist/auth/grant_path_schema.d.ts.map +1 -1
  177. package/dist/auth/grant_path_schema.js +8 -8
  178. package/dist/auth/invite_queries.d.ts.map +1 -1
  179. package/dist/auth/invite_schema.d.ts.map +1 -1
  180. package/dist/auth/invite_schema.js +2 -2
  181. package/dist/auth/keyring.d.ts.map +1 -1
  182. package/dist/auth/keyring.js +1 -1
  183. package/dist/auth/middleware.d.ts.map +1 -1
  184. package/dist/auth/middleware.js +7 -7
  185. package/dist/auth/migrations.d.ts.map +1 -1
  186. package/dist/auth/migrations.js +22 -20
  187. package/dist/auth/password.d.ts.map +1 -1
  188. package/dist/auth/password_argon2.d.ts.map +1 -1
  189. package/dist/auth/password_argon2.js +2 -2
  190. package/dist/auth/request_context.d.ts.map +1 -1
  191. package/dist/auth/request_context.js +7 -7
  192. package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
  193. package/dist/auth/role_grant_offer_action_specs.js +35 -35
  194. package/dist/auth/role_grant_offer_actions.d.ts +7 -4
  195. package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
  196. package/dist/auth/role_grant_offer_actions.js +43 -43
  197. package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
  198. package/dist/auth/role_grant_offer_notifications.js +13 -13
  199. package/dist/auth/role_grant_offer_queries.d.ts +1 -1
  200. package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
  201. package/dist/auth/role_grant_offer_queries.js +11 -11
  202. package/dist/auth/role_grant_offer_schema.d.ts.map +1 -1
  203. package/dist/auth/role_grant_offer_schema.js +7 -7
  204. package/dist/auth/role_grant_queries.d.ts.map +1 -1
  205. package/dist/auth/role_grant_queries.js +3 -3
  206. package/dist/auth/role_schema.d.ts.map +1 -1
  207. package/dist/auth/role_schema.js +7 -7
  208. package/dist/auth/scope_kind_schema.d.ts.map +1 -1
  209. package/dist/auth/self_service_role_action_specs.d.ts.map +1 -1
  210. package/dist/auth/self_service_role_action_specs.js +5 -5
  211. package/dist/auth/self_service_role_actions.d.ts +3 -3
  212. package/dist/auth/self_service_role_actions.d.ts.map +1 -1
  213. package/dist/auth/self_service_role_actions.js +9 -9
  214. package/dist/auth/session_cookie.d.ts.map +1 -1
  215. package/dist/auth/session_cookie.js +3 -3
  216. package/dist/auth/session_middleware.d.ts.map +1 -1
  217. package/dist/auth/session_middleware.js +4 -4
  218. package/dist/auth/session_queries.d.ts +14 -4
  219. package/dist/auth/session_queries.d.ts.map +1 -1
  220. package/dist/auth/session_queries.js +13 -3
  221. package/dist/auth/signup_route_schema.d.ts.map +1 -1
  222. package/dist/auth/signup_route_schema.js +6 -6
  223. package/dist/auth/signup_routes.d.ts.map +1 -1
  224. package/dist/auth/signup_routes.js +11 -11
  225. package/dist/auth/standard_action_specs.d.ts.map +1 -1
  226. package/dist/auth/standard_action_specs.js +1 -1
  227. package/dist/auth/standard_rpc_actions.d.ts +4 -4
  228. package/dist/auth/standard_rpc_actions.d.ts.map +1 -1
  229. package/dist/auth/standard_rpc_actions.js +3 -3
  230. package/dist/cli/args.d.ts.map +1 -1
  231. package/dist/cli/config.d.ts.map +1 -1
  232. package/dist/cli/daemon.d.ts.map +1 -1
  233. package/dist/cli/daemon.js +3 -3
  234. package/dist/cli/help.d.ts.map +1 -1
  235. package/dist/cli/help.js +1 -1
  236. package/dist/cli/logger.d.ts.map +1 -1
  237. package/dist/cli/logger.js +1 -1
  238. package/dist/cli/util.d.ts.map +1 -1
  239. package/dist/cli/util.js +1 -1
  240. package/dist/db/cell_audit_queries.d.ts.map +1 -1
  241. package/dist/db/cell_audit_queries.js +1 -1
  242. package/dist/db/cell_ddl.d.ts.map +1 -1
  243. package/dist/db/cell_ddl.js +7 -7
  244. package/dist/db/cell_field_queries.d.ts.map +1 -1
  245. package/dist/db/cell_grant_queries.d.ts.map +1 -1
  246. package/dist/db/cell_grant_queries.js +1 -1
  247. package/dist/db/cell_history_ddl.d.ts.map +1 -1
  248. package/dist/db/cell_history_ddl.js +4 -4
  249. package/dist/db/cell_item_queries.d.ts.map +1 -1
  250. package/dist/db/cell_queries.d.ts +1 -1
  251. package/dist/db/cell_queries.d.ts.map +1 -1
  252. package/dist/db/cell_queries.js +3 -3
  253. package/dist/db/create_db.d.ts.map +1 -1
  254. package/dist/db/create_db.js +1 -1
  255. package/dist/db/db.d.ts.map +1 -1
  256. package/dist/db/db_pg.d.ts.map +1 -1
  257. package/dist/db/db_pg.js +1 -1
  258. package/dist/db/db_pglite.d.ts.map +1 -1
  259. package/dist/db/db_pglite.js +1 -1
  260. package/dist/db/fact_ddl.d.ts.map +1 -1
  261. package/dist/db/fact_ddl.js +3 -3
  262. package/dist/db/fact_disk_storage.d.ts +1 -1
  263. package/dist/db/fact_disk_storage.d.ts.map +1 -1
  264. package/dist/db/fact_disk_storage.js +6 -6
  265. package/dist/db/fact_queries.d.ts +1 -1
  266. package/dist/db/fact_queries.d.ts.map +1 -1
  267. package/dist/db/fact_queries.js +2 -2
  268. package/dist/db/fact_store.d.ts +1 -1
  269. package/dist/db/fact_store.d.ts.map +1 -1
  270. package/dist/db/fact_store.js +9 -9
  271. package/dist/db/fact_store_errors.d.ts.map +1 -1
  272. package/dist/db/file_fact_url.d.ts +1 -1
  273. package/dist/db/file_fact_url.d.ts.map +1 -1
  274. package/dist/db/file_fact_url.js +1 -1
  275. package/dist/db/migrate.d.ts.map +1 -1
  276. package/dist/db/pg_error.d.ts.map +1 -1
  277. package/dist/db/query_deps.d.ts.map +1 -1
  278. package/dist/db/schema_ready.d.ts.map +1 -1
  279. package/dist/db/schema_ready.js +2 -2
  280. package/dist/db/status.d.ts.map +1 -1
  281. package/dist/db/status.js +6 -6
  282. package/dist/dev/setup.d.ts.map +1 -1
  283. package/dist/dev/setup.js +6 -6
  284. package/dist/env/dotenv.d.ts.map +1 -1
  285. package/dist/env/load.d.ts.map +1 -1
  286. package/dist/env/resolve.d.ts.map +1 -1
  287. package/dist/hono_context.d.ts.map +1 -1
  288. package/dist/hono_context.js +2 -2
  289. package/dist/http/auth_shape.d.ts.map +1 -1
  290. package/dist/http/auth_shape.js +6 -6
  291. package/dist/http/client_ip.d.ts.map +1 -1
  292. package/dist/http/common_routes.d.ts.map +1 -1
  293. package/dist/http/common_routes.js +8 -8
  294. package/dist/http/db_routes.d.ts.map +1 -1
  295. package/dist/http/db_routes.js +27 -23
  296. package/dist/http/error_schemas.d.ts +1 -1
  297. package/dist/http/error_schemas.d.ts.map +1 -1
  298. package/dist/http/error_schemas.js +13 -13
  299. package/dist/http/jsonrpc.d.ts.map +1 -1
  300. package/dist/http/jsonrpc.js +9 -9
  301. package/dist/http/jsonrpc_errors.d.ts.map +1 -1
  302. package/dist/http/jsonrpc_errors.js +21 -21
  303. package/dist/http/jsonrpc_helpers.d.ts.map +1 -1
  304. package/dist/http/jsonrpc_helpers.js +7 -7
  305. package/dist/http/middleware_spec.d.ts.map +1 -1
  306. package/dist/http/origin.d.ts.map +1 -1
  307. package/dist/http/pending_effects.d.ts.map +1 -1
  308. package/dist/http/proxy.d.ts.map +1 -1
  309. package/dist/http/proxy.js +1 -1
  310. package/dist/http/route_spec.d.ts.map +1 -1
  311. package/dist/http/route_spec.js +6 -6
  312. package/dist/http/schema_helpers.d.ts.map +1 -1
  313. package/dist/http/schema_helpers.js +1 -1
  314. package/dist/http/surface.d.ts.map +1 -1
  315. package/dist/http/surface.js +11 -11
  316. package/dist/http/surface_query.d.ts.map +1 -1
  317. package/dist/http/surface_query.js +1 -1
  318. package/dist/primitive_schemas.d.ts.map +1 -1
  319. package/dist/primitive_schemas.js +1 -1
  320. package/dist/rate_limiter.d.ts.map +1 -1
  321. package/dist/rate_limiter.js +4 -4
  322. package/dist/realtime/sse.d.ts.map +1 -1
  323. package/dist/realtime/sse.js +2 -2
  324. package/dist/realtime/sse_auth_guard.d.ts +4 -4
  325. package/dist/realtime/sse_auth_guard.d.ts.map +1 -1
  326. package/dist/realtime/sse_auth_guard.js +8 -8
  327. package/dist/realtime/subscriber_registry.d.ts.map +1 -1
  328. package/dist/runtime/deno.d.ts.map +1 -1
  329. package/dist/runtime/deno.js +7 -7
  330. package/dist/runtime/deps.d.ts.map +1 -1
  331. package/dist/runtime/fs.d.ts.map +1 -1
  332. package/dist/runtime/mock.d.ts.map +1 -1
  333. package/dist/runtime/mock.js +3 -3
  334. package/dist/runtime/node.d.ts.map +1 -1
  335. package/dist/runtime/node.js +7 -7
  336. package/dist/schema_meta.d.ts.map +1 -1
  337. package/dist/server/app_backend.d.ts +3 -3
  338. package/dist/server/app_backend.d.ts.map +1 -1
  339. package/dist/server/app_backend.js +3 -3
  340. package/dist/server/app_server.d.ts +6 -6
  341. package/dist/server/app_server.d.ts.map +1 -1
  342. package/dist/server/app_server.js +32 -32
  343. package/dist/server/app_server_context.d.ts.map +1 -1
  344. package/dist/server/env.d.ts.map +1 -1
  345. package/dist/server/env.js +9 -9
  346. package/dist/server/fact_write.d.ts +1 -1
  347. package/dist/server/fact_write.d.ts.map +1 -1
  348. package/dist/server/fact_write.js +2 -1
  349. package/dist/server/file_fact_fetcher.d.ts.map +1 -1
  350. package/dist/server/file_fact_fetcher.js +1 -1
  351. package/dist/server/serve_fact_route.d.ts.map +1 -1
  352. package/dist/server/serve_fact_route.js +15 -13
  353. package/dist/server/startup.d.ts.map +1 -1
  354. package/dist/server/static.d.ts.map +1 -1
  355. package/dist/server/validate_nginx.js +1 -1
  356. package/dist/server/x_accel.d.ts.map +1 -1
  357. package/dist/server/x_accel.js +1 -1
  358. package/dist/testing/CLAUDE.md +2 -2
  359. package/dist/testing/admin_integration.d.ts.map +1 -1
  360. package/dist/testing/admin_integration.js +62 -62
  361. package/dist/testing/adversarial_404.d.ts.map +1 -1
  362. package/dist/testing/adversarial_404.js +1 -1
  363. package/dist/testing/adversarial_headers.d.ts.map +1 -1
  364. package/dist/testing/adversarial_headers.js +15 -15
  365. package/dist/testing/adversarial_input.d.ts.map +1 -1
  366. package/dist/testing/adversarial_input.js +22 -22
  367. package/dist/testing/app_server.d.ts.map +1 -1
  368. package/dist/testing/app_server.js +32 -32
  369. package/dist/testing/assertions.d.ts.map +1 -1
  370. package/dist/testing/attack_surface.d.ts.map +1 -1
  371. package/dist/testing/attack_surface.js +12 -12
  372. package/dist/testing/audit_completeness.d.ts.map +1 -1
  373. package/dist/testing/audit_completeness.js +41 -41
  374. package/dist/testing/audit_drift_guard.d.ts +3 -1
  375. package/dist/testing/audit_drift_guard.d.ts.map +1 -1
  376. package/dist/testing/audit_drift_guard.js +12 -6
  377. package/dist/testing/auth_apps.d.ts.map +1 -1
  378. package/dist/testing/auth_apps.js +4 -4
  379. package/dist/testing/bootstrap_success.d.ts.map +1 -1
  380. package/dist/testing/bootstrap_success.js +11 -11
  381. package/dist/testing/connection_closer_helpers.d.ts.map +1 -1
  382. package/dist/testing/connection_closer_helpers.js +1 -1
  383. package/dist/testing/cross_backend/account_lifecycle.d.ts.map +1 -1
  384. package/dist/testing/cross_backend/account_lifecycle.js +1 -1
  385. package/dist/testing/cross_backend/action_manifest.d.ts.map +1 -1
  386. package/dist/testing/cross_backend/action_manifest.js +4 -4
  387. package/dist/testing/cross_backend/action_manifest_parity.d.ts.map +1 -1
  388. package/dist/testing/cross_backend/actor_lookup.d.ts.map +1 -1
  389. package/dist/testing/cross_backend/actor_lookup.js +3 -3
  390. package/dist/testing/cross_backend/actor_search.d.ts.map +1 -1
  391. package/dist/testing/cross_backend/actor_search.js +5 -5
  392. package/dist/testing/cross_backend/app_settings.d.ts.map +1 -1
  393. package/dist/testing/cross_backend/app_settings.js +6 -6
  394. package/dist/testing/cross_backend/backend_config.d.ts.map +1 -1
  395. package/dist/testing/cross_backend/bench/bench_report.d.ts.map +1 -1
  396. package/dist/testing/cross_backend/bench/bench_report.js +5 -5
  397. package/dist/testing/cross_backend/bench/run_cross_impl_bench.d.ts.map +1 -1
  398. package/dist/testing/cross_backend/bench/run_cross_impl_bench.js +2 -2
  399. package/dist/testing/cross_backend/bench/scenario.d.ts.map +1 -1
  400. package/dist/testing/cross_backend/bench/scenario.js +1 -1
  401. package/dist/testing/cross_backend/body_size.d.ts.map +1 -1
  402. package/dist/testing/cross_backend/body_size.js +1 -1
  403. package/dist/testing/cross_backend/bootstrap_backend.d.ts.map +1 -1
  404. package/dist/testing/cross_backend/bootstrap_backend.js +2 -2
  405. package/dist/testing/cross_backend/build_test_backend_paths.js +1 -1
  406. package/dist/testing/cross_backend/capabilities.js +2 -2
  407. package/dist/testing/cross_backend/cell_cross_helpers.d.ts.map +1 -1
  408. package/dist/testing/cross_backend/cell_crud.d.ts.map +1 -1
  409. package/dist/testing/cross_backend/cell_crud.js +5 -2
  410. package/dist/testing/cross_backend/cell_gated_create.d.ts.map +1 -1
  411. package/dist/testing/cross_backend/cell_gated_create.js +8 -7
  412. package/dist/testing/cross_backend/cell_grant_role.d.ts.map +1 -1
  413. package/dist/testing/cross_backend/cell_grant_role.js +2 -2
  414. package/dist/testing/cross_backend/cell_relations.d.ts.map +1 -1
  415. package/dist/testing/cross_backend/cell_relations.js +13 -13
  416. package/dist/testing/cross_backend/conformance_case.d.ts.map +1 -1
  417. package/dist/testing/cross_backend/conformance_case.js +11 -11
  418. package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
  419. package/dist/testing/cross_backend/conformance_table.js +11 -11
  420. package/dist/testing/cross_backend/cookie_attributes.d.ts.map +1 -1
  421. package/dist/testing/cross_backend/cookie_attributes.js +4 -4
  422. package/dist/testing/cross_backend/create_cross_backend_global_setup.d.ts +1 -1
  423. package/dist/testing/cross_backend/create_cross_backend_global_setup.d.ts.map +1 -1
  424. package/dist/testing/cross_backend/create_cross_backend_global_setup.js +1 -1
  425. package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts +1 -1
  426. package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts.map +1 -1
  427. package/dist/testing/cross_backend/create_dual_spawn_global_setup.js +1 -1
  428. package/dist/testing/cross_backend/credential_header_robustness.js +1 -1
  429. package/dist/testing/cross_backend/default_backend_configs.d.ts.map +1 -1
  430. package/dist/testing/cross_backend/default_backend_configs.js +12 -12
  431. package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
  432. package/dist/testing/cross_backend/default_spine_surface.js +9 -9
  433. package/dist/testing/cross_backend/fact_serving.d.ts.map +1 -1
  434. package/dist/testing/cross_backend/fact_serving.js +2 -2
  435. package/dist/testing/cross_backend/full_spine_mount.d.ts.map +1 -1
  436. package/dist/testing/cross_backend/full_spine_mount.js +4 -4
  437. package/dist/testing/cross_backend/identity_parity.d.ts.map +1 -1
  438. package/dist/testing/cross_backend/identity_parity.js +28 -24
  439. package/dist/testing/cross_backend/in_process_setup.d.ts.map +1 -1
  440. package/dist/testing/cross_backend/in_process_setup.js +9 -9
  441. package/dist/testing/cross_backend/login_security.d.ts.map +1 -1
  442. package/dist/testing/cross_backend/login_security.js +2 -2
  443. package/dist/testing/cross_backend/make_cross_backend_project.d.ts +1 -1
  444. package/dist/testing/cross_backend/make_cross_backend_project.d.ts.map +1 -1
  445. package/dist/testing/cross_backend/make_cross_backend_project.js +3 -3
  446. package/dist/testing/cross_backend/method_coverage.d.ts.map +1 -1
  447. package/dist/testing/cross_backend/origin.d.ts.map +1 -1
  448. package/dist/testing/cross_backend/origin.js +4 -4
  449. package/dist/testing/cross_backend/peer_ping_ws.d.ts.map +1 -1
  450. package/dist/testing/cross_backend/peer_ping_ws.js +6 -6
  451. package/dist/testing/cross_backend/ready.d.ts.map +1 -1
  452. package/dist/testing/cross_backend/role_grant_offer_enumeration.d.ts.map +1 -1
  453. package/dist/testing/cross_backend/role_grant_offer_enumeration.js +1 -1
  454. package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts.map +1 -1
  455. package/dist/testing/cross_backend/role_grant_offer_notification_ws.js +1 -1
  456. package/dist/testing/cross_backend/role_grant_participation.d.ts.map +1 -1
  457. package/dist/testing/cross_backend/rust_spine_stub_backend_config.d.ts.map +1 -1
  458. package/dist/testing/cross_backend/rust_spine_stub_backend_config.js +5 -5
  459. package/dist/testing/cross_backend/setup.d.ts.map +1 -1
  460. package/dist/testing/cross_backend/setup.js +36 -36
  461. package/dist/testing/cross_backend/spawn_backend.d.ts.map +1 -1
  462. package/dist/testing/cross_backend/spawn_backend.js +1 -1
  463. package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
  464. package/dist/testing/cross_backend/sse_round_trip.js +10 -7
  465. package/dist/testing/cross_backend/standard.d.ts.map +1 -1
  466. package/dist/testing/cross_backend/standard.js +5 -5
  467. package/dist/testing/cross_backend/testing_backdoor.d.ts.map +1 -1
  468. package/dist/testing/cross_backend/testing_backdoor.js +7 -7
  469. package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
  470. package/dist/testing/cross_backend/testing_reset_actions.js +24 -23
  471. package/dist/testing/cross_backend/testing_server_bun.d.ts.map +1 -1
  472. package/dist/testing/cross_backend/testing_server_bun.js +3 -3
  473. package/dist/testing/cross_backend/testing_server_core.d.ts.map +1 -1
  474. package/dist/testing/cross_backend/testing_server_core.js +1 -1
  475. package/dist/testing/cross_backend/testing_server_deno.d.ts.map +1 -1
  476. package/dist/testing/cross_backend/testing_server_deno.js +1 -1
  477. package/dist/testing/cross_backend/testing_server_node.d.ts.map +1 -1
  478. package/dist/testing/cross_backend/testing_server_node.js +3 -3
  479. package/dist/testing/cross_backend/ts_spine_backend_config.d.ts.map +1 -1
  480. package/dist/testing/cross_backend/ts_spine_backend_config.js +13 -13
  481. package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
  482. package/dist/testing/cross_backend/ws_round_trip.js +2 -2
  483. package/dist/testing/data_exposure.d.ts.map +1 -1
  484. package/dist/testing/data_exposure.js +8 -8
  485. package/dist/testing/db.d.ts.map +1 -1
  486. package/dist/testing/db.js +3 -3
  487. package/dist/testing/db_entities.d.ts.map +1 -1
  488. package/dist/testing/db_entities.js +1 -1
  489. package/dist/testing/entities.d.ts.map +1 -1
  490. package/dist/testing/entities.js +5 -5
  491. package/dist/testing/error_coverage.d.ts.map +1 -1
  492. package/dist/testing/integration.d.ts.map +1 -1
  493. package/dist/testing/integration.js +106 -106
  494. package/dist/testing/integration_helpers.d.ts.map +1 -1
  495. package/dist/testing/integration_helpers.js +3 -3
  496. package/dist/testing/middleware.d.ts.map +1 -1
  497. package/dist/testing/middleware.js +11 -11
  498. package/dist/testing/mock_fs.js +1 -1
  499. package/dist/testing/rate_limiting.d.ts.map +1 -1
  500. package/dist/testing/rate_limiting.js +23 -23
  501. package/dist/testing/role_grant_helpers.d.ts.map +1 -1
  502. package/dist/testing/role_grant_helpers.js +3 -3
  503. package/dist/testing/round_trip.d.ts.map +1 -1
  504. package/dist/testing/round_trip.js +6 -6
  505. package/dist/testing/rpc_attack_surface.d.ts.map +1 -1
  506. package/dist/testing/rpc_attack_surface.js +12 -12
  507. package/dist/testing/rpc_helpers.d.ts.map +1 -1
  508. package/dist/testing/rpc_helpers.js +11 -11
  509. package/dist/testing/rpc_round_trip.d.ts.map +1 -1
  510. package/dist/testing/rpc_round_trip.js +3 -3
  511. package/dist/testing/schema_generators.d.ts.map +1 -1
  512. package/dist/testing/schema_generators.js +3 -3
  513. package/dist/testing/schema_introspect.d.ts.map +1 -1
  514. package/dist/testing/schema_introspect.js +12 -12
  515. package/dist/testing/schema_parity.d.ts.map +1 -1
  516. package/dist/testing/schema_parity.js +7 -7
  517. package/dist/testing/schema_ready_fixture.d.ts.map +1 -1
  518. package/dist/testing/sse_round_trip.d.ts.map +1 -1
  519. package/dist/testing/sse_round_trip.js +8 -8
  520. package/dist/testing/standard.d.ts.map +1 -1
  521. package/dist/testing/standard.js +8 -8
  522. package/dist/testing/stubs.d.ts +6 -6
  523. package/dist/testing/stubs.d.ts.map +1 -1
  524. package/dist/testing/stubs.js +26 -23
  525. package/dist/testing/surface_invariants.d.ts.map +1 -1
  526. package/dist/testing/surface_invariants.js +5 -5
  527. package/dist/testing/testing_rate_limiter.d.ts.map +1 -1
  528. package/dist/testing/transports/bootstrap.d.ts.map +1 -1
  529. package/dist/testing/transports/bootstrap.js +4 -4
  530. package/dist/testing/transports/fetch_transport.d.ts.map +1 -1
  531. package/dist/testing/transports/sse_frame_reader.d.ts.map +1 -1
  532. package/dist/testing/transports/sse_transport.js +1 -1
  533. package/dist/testing/transports/ws_client.d.ts.map +1 -1
  534. package/dist/testing/transports/ws_client.js +1 -1
  535. package/dist/testing/transports/ws_transport.js +4 -4
  536. package/dist/testing/ws_round_trip.d.ts.map +1 -1
  537. package/dist/testing/ws_round_trip.js +21 -21
  538. package/dist/ui/AccountSessions.svelte +11 -11
  539. package/dist/ui/AdminAccounts.svelte +10 -10
  540. package/dist/ui/AdminAuditLog.svelte +14 -14
  541. package/dist/ui/AdminInvites.svelte +13 -13
  542. package/dist/ui/AdminOverview.svelte +22 -22
  543. package/dist/ui/AdminRoleGrantHistory.svelte +11 -11
  544. package/dist/ui/AdminSessions.svelte +12 -12
  545. package/dist/ui/AdminSettings.svelte +1 -1
  546. package/dist/ui/AdminSurface.svelte +3 -3
  547. package/dist/ui/AppShell.svelte +8 -8
  548. package/dist/ui/AppShell.svelte.d.ts.map +1 -1
  549. package/dist/ui/BootstrapForm.svelte +9 -9
  550. package/dist/ui/CLAUDE.md +1 -1
  551. package/dist/ui/ColumnLayout.svelte +2 -2
  552. package/dist/ui/ColumnLayout.svelte.d.ts.map +1 -1
  553. package/dist/ui/ConfirmButton.svelte +8 -8
  554. package/dist/ui/ConfirmButton.svelte.d.ts.map +1 -1
  555. package/dist/ui/Datatable.svelte +6 -6
  556. package/dist/ui/Datatable.svelte.d.ts.map +1 -1
  557. package/dist/ui/LoginForm.svelte +6 -6
  558. package/dist/ui/LogoutButton.svelte +2 -2
  559. package/dist/ui/LogoutButton.svelte.d.ts.map +1 -1
  560. package/dist/ui/MenuLink.svelte +5 -5
  561. package/dist/ui/MenuLink.svelte.d.ts.map +1 -1
  562. package/dist/ui/OpenSignupToggle.svelte +2 -2
  563. package/dist/ui/PopoverButton.svelte +10 -10
  564. package/dist/ui/PopoverButton.svelte.d.ts.map +1 -1
  565. package/dist/ui/RoleGrantOfferForm.svelte +8 -11
  566. package/dist/ui/RoleGrantOfferForm.svelte.d.ts.map +1 -1
  567. package/dist/ui/RoleGrantOfferHistory.svelte +11 -11
  568. package/dist/ui/RoleGrantOfferHistory.svelte.d.ts.map +1 -1
  569. package/dist/ui/RoleGrantOfferInbox.svelte +6 -6
  570. package/dist/ui/RoleGrantOfferInbox.svelte.d.ts.map +1 -1
  571. package/dist/ui/SignupForm.svelte +9 -9
  572. package/dist/ui/SurfaceExplorer.svelte +11 -11
  573. package/dist/ui/SurfaceExplorer.svelte.d.ts.map +1 -1
  574. package/dist/ui/account_sessions_state.svelte.d.ts.map +1 -1
  575. package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
  576. package/dist/ui/admin_accounts_state.svelte.js +2 -2
  577. package/dist/ui/admin_invites_state.svelte.d.ts.map +1 -1
  578. package/dist/ui/admin_rpc_adapters.d.ts.map +1 -1
  579. package/dist/ui/admin_rpc_adapters.js +5 -5
  580. package/dist/ui/admin_sessions_state.svelte.d.ts.map +1 -1
  581. package/dist/ui/app_settings_state.svelte.d.ts.map +1 -1
  582. package/dist/ui/async_slot.svelte.d.ts.map +1 -1
  583. package/dist/ui/audit_log_state.svelte.d.ts.map +1 -1
  584. package/dist/ui/audit_log_state.svelte.js +1 -1
  585. package/dist/ui/auth_state.svelte.js +4 -4
  586. package/dist/ui/form_state.svelte.d.ts.map +1 -1
  587. package/dist/ui/format_scope.d.ts.map +1 -1
  588. package/dist/ui/keyed_async_slot.svelte.d.ts.map +1 -1
  589. package/dist/ui/popover.svelte.d.ts.map +1 -1
  590. package/dist/ui/popover.svelte.js +1 -1
  591. package/dist/ui/position_helpers.js +1 -1
  592. package/dist/ui/role_grant_offers_state.svelte.d.ts.map +1 -1
  593. package/dist/ui/role_grant_offers_state.svelte.js +1 -1
  594. package/dist/ui/table_state.svelte.d.ts.map +1 -1
  595. package/dist/ui/ui_fetch.d.ts.map +1 -1
  596. package/dist/ui/ui_format.js +2 -2
  597. package/package.json +13 -12
@@ -23,7 +23,7 @@ import { z } from 'zod';
23
23
  import { Uuid } from '@fuzdev/fuz_util/id.ts';
24
24
  import { ERROR_ROLE_GRANT_NOT_FOUND, ERROR_ROLE_NOT_WEB_GRANTABLE } from '../http/error_schemas.js';
25
25
  import { RoleName } from './role_schema.js';
26
- import { ROLE_GRANT_OFFER_MESSAGE_LENGTH_MAX, RoleGrantOfferJson, } from './role_grant_offer_schema.js';
26
+ import { ROLE_GRANT_OFFER_MESSAGE_LENGTH_MAX, RoleGrantOfferJson } from './role_grant_offer_schema.js';
27
27
  import { ROLE_GRANT_REVOKED_REASON_LENGTH_MAX } from './account_schema.js';
28
28
  import { ActingActor } from '../http/auth_shape.js';
29
29
  /** Error reason — caller tried to offer themselves a role_grant. */
@@ -57,26 +57,26 @@ export const ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH = 'role_grant_offer_a
57
57
  export const RoleGrantOfferCreateInput = z.strictObject({
58
58
  to_account_id: Uuid.meta({ description: 'Account id of the recipient.' }),
59
59
  to_actor_id: Uuid.nullish().meta({
60
- description: 'Optional actor-grain target on the recipient account. When set, only this actor may accept and the audit envelope carries it on offer-shape events. Must belong to `to_account_id`.',
60
+ description: 'Optional actor-grain target on the recipient account. When set, only this actor may accept and the audit envelope carries it on offer-shape events. Must belong to `to_account_id`.'
61
61
  }),
62
62
  role: RoleName.meta({ description: 'Role being offered.' }),
63
63
  scope_kind: z.string().nullish().meta({
64
- description: 'Machine-readable kind tag for `scope_id` — paired-null with `scope_id` (both null for global, both non-null for scoped). Required iff `scope_id` is set.',
64
+ description: 'Machine-readable kind tag for `scope_id` — paired-null with `scope_id` (both null for global, both non-null for scoped). Required iff `scope_id` is set.'
65
65
  }),
66
66
  scope_id: Uuid.nullish().meta({
67
- description: 'Scope id for resource-scoped grants (e.g. classroom id). `null` for global.',
67
+ description: 'Scope id for resource-scoped grants (e.g. classroom id). `null` for global.'
68
68
  }),
69
69
  message: z
70
70
  .string()
71
71
  .max(ROLE_GRANT_OFFER_MESSAGE_LENGTH_MAX)
72
72
  .nullish()
73
73
  .meta({ description: 'Optional free-form note from the grantor.' }),
74
- acting: ActingActor,
74
+ acting: ActingActor
75
75
  });
76
76
  /** Input for `role_grant_offer_accept`. */
77
77
  export const RoleGrantOfferAcceptInput = z.strictObject({
78
78
  offer_id: Uuid.meta({ description: 'The offer to accept.' }),
79
- acting: ActingActor,
79
+ acting: ActingActor
80
80
  });
81
81
  /** Input for `role_grant_offer_decline`. */
82
82
  export const RoleGrantOfferDeclineInput = z.strictObject({
@@ -86,20 +86,20 @@ export const RoleGrantOfferDeclineInput = z.strictObject({
86
86
  .max(ROLE_GRANT_OFFER_MESSAGE_LENGTH_MAX)
87
87
  .nullish()
88
88
  .meta({ description: 'Optional free-form reason given on decline.' }),
89
- acting: ActingActor,
89
+ acting: ActingActor
90
90
  });
91
91
  /** Input for `role_grant_offer_retract`. */
92
92
  export const RoleGrantOfferRetractInput = z.strictObject({
93
93
  offer_id: Uuid.meta({ description: 'The offer to retract.' }),
94
- acting: ActingActor,
94
+ acting: ActingActor
95
95
  });
96
96
  /** Input for `role_grant_offer_list`. `account_id` is admin-only (inspect another account's inbox). */
97
97
  export const RoleGrantOfferListInput = z
98
98
  .strictObject({
99
99
  account_id: Uuid.nullish().meta({
100
- description: 'Admin-only — list offers for another account. Defaults to the caller.',
100
+ description: 'Admin-only — list offers for another account. Defaults to the caller.'
101
101
  }),
102
- acting: ActingActor,
102
+ acting: ActingActor
103
103
  })
104
104
  .default({});
105
105
  /**
@@ -113,9 +113,9 @@ export const RoleGrantRevokeInput = z.strictObject({
113
113
  actor_id: Uuid.meta({ description: 'Actor whose role_grant to revoke.' }),
114
114
  role_grant_id: Uuid.meta({ description: 'The role_grant to revoke.' }),
115
115
  reason: z.string().max(ROLE_GRANT_REVOKED_REASON_LENGTH_MAX).nullish().meta({
116
- description: 'Optional free-form reason; stamped on `role_grant.revoked_reason` and surfaced on the revokee WS notification.',
116
+ description: 'Optional free-form reason; stamped on `role_grant.revoked_reason` and surfaced on the revokee WS notification.'
117
117
  }),
118
- acting: ActingActor,
118
+ acting: ActingActor
119
119
  });
120
120
  /**
121
121
  * Input for `role_grant_offer_history`. Returns every offer involving the account
@@ -125,26 +125,26 @@ export const RoleGrantRevokeInput = z.strictObject({
125
125
  export const RoleGrantOfferHistoryInput = z
126
126
  .strictObject({
127
127
  account_id: Uuid.nullish().meta({
128
- description: 'Admin-only — history for another account. Defaults to the caller.',
128
+ description: 'Admin-only — history for another account. Defaults to the caller.'
129
129
  }),
130
130
  limit: z.number().int().min(1).max(500).nullish().meta({
131
- description: 'Max rows to return (default 100).',
131
+ description: 'Max rows to return (default 100).'
132
132
  }),
133
133
  offset: z.number().int().min(0).nullish().meta({
134
- description: 'Pagination offset (default 0).',
134
+ description: 'Pagination offset (default 0).'
135
135
  }),
136
- acting: ActingActor,
136
+ acting: ActingActor
137
137
  })
138
138
  .default({});
139
139
  /** Output for `role_grant_offer_create`. */
140
140
  export const RoleGrantOfferCreateOutput = z.strictObject({
141
- offer: RoleGrantOfferJson,
141
+ offer: RoleGrantOfferJson
142
142
  });
143
143
  /** Output for `role_grant_offer_accept`. */
144
144
  export const RoleGrantOfferAcceptOutput = z.strictObject({
145
145
  role_grant_id: Uuid,
146
146
  offer: RoleGrantOfferJson,
147
- superseded_offer_ids: z.array(Uuid),
147
+ superseded_offer_ids: z.array(Uuid)
148
148
  });
149
149
  /** Output for `role_grant_offer_decline` / `role_grant_offer_retract`. */
150
150
  export const RoleGrantOfferOkOutput = z.strictObject({ ok: z.literal(true) });
@@ -155,7 +155,7 @@ export const RoleGrantOfferHistoryOutput = z.strictObject({ offers: z.array(Role
155
155
  /** Output for `role_grant_revoke`. */
156
156
  export const RoleGrantRevokeOutput = z.strictObject({
157
157
  ok: z.literal(true),
158
- revoked: z.literal(true),
158
+ revoked: z.literal(true)
159
159
  });
160
160
  /**
161
161
  * Input for `role_grant_assign` — the immediate admin-only conferral path, the
@@ -167,20 +167,20 @@ export const RoleGrantRevokeOutput = z.strictObject({
167
167
  export const RoleGrantAssignInput = z.strictObject({
168
168
  to_account_id: Uuid.meta({ description: 'Account id of the grantee.' }),
169
169
  to_actor_id: Uuid.nullish().meta({
170
- description: "Optional actor-grain target on the grantee account. When set, must belong to `to_account_id`. Omit to resolve the account's sole active actor — a multi-actor account must name one.",
170
+ description: "Optional actor-grain target on the grantee account. When set, must belong to `to_account_id`. Omit to resolve the account's sole active actor — a multi-actor account must name one."
171
171
  }),
172
172
  role: RoleName.meta({
173
- description: "Role to assign. Must be admin-grantable (its `grant_paths` includes `'admin'`).",
173
+ description: "Role to assign. Must be admin-grantable (its `grant_paths` includes `'admin'`)."
174
174
  }),
175
175
  scope_id: Uuid.nullish().meta({
176
- description: 'Scope id for resource-scoped grants. `null` for a global role_grant.',
176
+ description: 'Scope id for resource-scoped grants. `null` for a global role_grant.'
177
177
  }),
178
- acting: ActingActor,
178
+ acting: ActingActor
179
179
  });
180
180
  /** Output for `role_grant_assign`. */
181
181
  export const RoleGrantAssignOutput = z.strictObject({
182
182
  ok: z.literal(true),
183
- role_grant_id: Uuid,
183
+ role_grant_id: Uuid
184
184
  });
185
185
  // -- Action specs -----------------------------------------------------------
186
186
  /**
@@ -207,9 +207,9 @@ export const role_grant_offer_create_action_spec = {
207
207
  ERROR_ROLE_GRANT_OFFER_SELF_TARGET,
208
208
  ERROR_ROLE_GRANT_OFFER_ROLE_NOT_GRANTABLE,
209
209
  ERROR_ROLE_GRANT_OFFER_NOT_AUTHORIZED,
210
- ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH,
210
+ ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH
211
211
  ],
212
- rate_limit: 'account',
212
+ rate_limit: 'account'
213
213
  };
214
214
  export const role_grant_offer_accept_action_spec = {
215
215
  method: 'role_grant_offer_accept',
@@ -225,8 +225,8 @@ export const role_grant_offer_accept_action_spec = {
225
225
  ERROR_ROLE_GRANT_OFFER_NOT_FOUND,
226
226
  ERROR_ROLE_GRANT_OFFER_TERMINAL,
227
227
  ERROR_ROLE_GRANT_OFFER_EXPIRED,
228
- ERROR_ROLE_GRANT_OFFER_ACTOR_MISMATCH,
229
- ],
228
+ ERROR_ROLE_GRANT_OFFER_ACTOR_MISMATCH
229
+ ]
230
230
  };
231
231
  export const role_grant_offer_decline_action_spec = {
232
232
  method: 'role_grant_offer_decline',
@@ -238,7 +238,7 @@ export const role_grant_offer_decline_action_spec = {
238
238
  output: RoleGrantOfferOkOutput,
239
239
  async: true,
240
240
  description: 'Decline an offer. Recipient-only.',
241
- error_reasons: [ERROR_ROLE_GRANT_OFFER_NOT_FOUND, ERROR_ROLE_GRANT_OFFER_TERMINAL],
241
+ error_reasons: [ERROR_ROLE_GRANT_OFFER_NOT_FOUND, ERROR_ROLE_GRANT_OFFER_TERMINAL]
242
242
  };
243
243
  export const role_grant_offer_retract_action_spec = {
244
244
  method: 'role_grant_offer_retract',
@@ -250,7 +250,7 @@ export const role_grant_offer_retract_action_spec = {
250
250
  output: RoleGrantOfferOkOutput,
251
251
  async: true,
252
252
  description: 'Retract an offer. Grantor-only, pre-decision.',
253
- error_reasons: [ERROR_ROLE_GRANT_OFFER_NOT_FOUND, ERROR_ROLE_GRANT_OFFER_TERMINAL],
253
+ error_reasons: [ERROR_ROLE_GRANT_OFFER_NOT_FOUND, ERROR_ROLE_GRANT_OFFER_TERMINAL]
254
254
  };
255
255
  export const role_grant_offer_list_action_spec = {
256
256
  method: 'role_grant_offer_list',
@@ -261,7 +261,7 @@ export const role_grant_offer_list_action_spec = {
261
261
  input: RoleGrantOfferListInput,
262
262
  output: RoleGrantOfferListOutput,
263
263
  async: true,
264
- description: 'List pending, non-expired offers for the caller. Admins may pass `account_id` to inspect another account.',
264
+ description: 'List pending, non-expired offers for the caller. Admins may pass `account_id` to inspect another account.'
265
265
  };
266
266
  export const role_grant_offer_history_action_spec = {
267
267
  method: 'role_grant_offer_history',
@@ -272,7 +272,7 @@ export const role_grant_offer_history_action_spec = {
272
272
  input: RoleGrantOfferHistoryInput,
273
273
  output: RoleGrantOfferHistoryOutput,
274
274
  async: true,
275
- description: 'List every offer involving the caller (either direction), including terminal rows, newest first. Admins may pass `account_id` to inspect another account.',
275
+ description: 'List every offer involving the caller (either direction), including terminal rows, newest first. Admins may pass `account_id` to inspect another account.'
276
276
  };
277
277
  /**
278
278
  * `rate_limit: 'account'` bounds admin-side burn of `role_grant_revoke` —
@@ -291,7 +291,7 @@ export const role_grant_revoke_action_spec = {
291
291
  async: true,
292
292
  description: 'Revoke an active role_grant on a target actor. Admin-only. Supersedes any pending offers for the same (account, role, scope). Fires role_grant_revoke + role_grant_offer_supersede notifications.',
293
293
  error_reasons: [ERROR_ROLE_GRANT_NOT_FOUND, ERROR_ROLE_NOT_WEB_GRANTABLE],
294
- rate_limit: 'account',
294
+ rate_limit: 'account'
295
295
  };
296
296
  /**
297
297
  * `rate_limit: 'account'` bounds admin-side burn of `role_grant_assign` — the
@@ -309,7 +309,7 @@ export const role_grant_assign_action_spec = {
309
309
  async: true,
310
310
  description: "Immediately assign a role_grant to a target account — admin-only, no consent step (the capability-unlock UX). The role's `grant_paths` must include `'admin'`. Idempotent: re-assigning an active grant returns it. Emits a role_grant_create audit event.",
311
311
  error_reasons: [ERROR_ROLE_NOT_WEB_GRANTABLE, ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH],
312
- rate_limit: 'account',
312
+ rate_limit: 'account'
313
313
  };
314
314
  /**
315
315
  * All role-grant-offer action specs — a codegen-ready registry. Consumers spread
@@ -324,5 +324,5 @@ export const all_role_grant_offer_action_specs = [
324
324
  role_grant_offer_list_action_spec,
325
325
  role_grant_offer_history_action_spec,
326
326
  role_grant_revoke_action_spec,
327
- role_grant_assign_action_spec,
327
+ role_grant_assign_action_spec
328
328
  ];
@@ -42,10 +42,11 @@
42
42
  *
43
43
  * @module
44
44
  */
45
+ import type { Logger } from '@fuzdev/fuz_util/log.ts';
45
46
  import { type ActionContext, type RpcAction } from '../actions/action_rpc.js';
46
47
  import { type RoleSchemaResult } from './role_schema.js';
47
48
  import { type RequestContext } from './request_context.js';
48
- import type { RouteFactoryDeps } from './deps.js';
49
+ import type { ActionFactoryDeps } from './deps.js';
49
50
  import { type NotificationSender } from './role_grant_offer_notifications.js';
50
51
  /**
51
52
  * Authorization callback for `role_grant_offer_create`. Returns `true` to allow,
@@ -60,7 +61,9 @@ export type RoleGrantOfferCreateAuthorize = (auth: RequestContext, input: {
60
61
  to_account_id: string;
61
62
  role: string;
62
63
  scope_id: string | null;
63
- }, deps: Pick<RouteFactoryDeps, 'log'>, ctx: ActionContext) => boolean | Promise<boolean>;
64
+ }, deps: {
65
+ log: Logger;
66
+ }, ctx: ActionContext) => boolean | Promise<boolean>;
64
67
  /** Options for `create_role_grant_offer_actions`. */
65
68
  export interface RoleGrantOfferActionOptions {
66
69
  /**
@@ -84,11 +87,11 @@ export interface RoleGrantOfferActionOptions {
84
87
  * Create the eight role-grant-offer RPC actions (six offer-lifecycle methods
85
88
  * plus `role_grant_revoke` and the immediate `role_grant_assign`).
86
89
  *
87
- * @param deps - `RouteFactoryDeps` (`log`, `audit`, …) plus optional `notification_sender` for WS fan-out — when absent, WS fan-out is silently skipped (DB-only side effects still happen). Consumers wiring `BackendWebsocketTransport` assign its instance directly (the transport's `send_to_account` signature accepts the broader `JsonrpcMessageFromServerToClient`, which is contravariantly compatible)
90
+ * @param deps - `ActionFactoryDeps` (`log`, `audit`) plus optional `notification_sender` for WS fan-out — when absent, WS fan-out is silently skipped (DB-only side effects still happen). Consumers wiring `BackendWebsocketTransport` assign its instance directly (the transport's `send_to_account` signature accepts the broader `JsonrpcMessageFromServerToClient`, which is contravariantly compatible)
88
91
  * @param options - role schema, default TTL, authorization override
89
92
  * @returns the `RpcAction` array to spread into a `create_rpc_endpoint` call
90
93
  */
91
- export declare const create_role_grant_offer_actions: (deps: Pick<RouteFactoryDeps, "log" | "audit"> & {
94
+ export declare const create_role_grant_offer_actions: (deps: ActionFactoryDeps & {
92
95
  notification_sender?: NotificationSender | null;
93
96
  }, options?: RoleGrantOfferActionOptions) => Array<RpcAction>;
94
97
  //# sourceMappingURL=role_grant_offer_actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"role_grant_offer_actions.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/role_grant_offer_actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAIH,OAAO,EAGN,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAIN,KAAK,gBAAgB,EACrB,MAAM,kBAAkB,CAAC;AA2B1B,OAAO,EAA4C,KAAK,cAAc,EAAC,MAAM,sBAAsB,CAAC;AACpG,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,WAAW,CAAC;AAEhD,OAAO,EAON,KAAK,kBAAkB,EACvB,MAAM,qCAAqC,CAAC;AAoC7C;;;;;;;;GAQG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAC3C,IAAI,EAAE,cAAc,EACpB,KAAK,EAAE;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CAAC,EACrE,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,CAAC,EACnC,GAAG,EAAE,aAAa,KACd,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAEhC,qDAAqD;AACrD,MAAM,WAAW,2BAA2B;IAC3C;;;;;OAKG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,0FAA0F;IAC1F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,6BAA6B,CAAC;CAC1C;AAgCD;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,GAC3C,MAAM,IAAI,CAAC,gBAAgB,EAAE,KAAK,GAAG,OAAO,CA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eAAO,MAAM,+BAA+B,GAC3C,MAAM,iBAAiB,GAAG;IACzB,mBAAmB,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;CAChD,EACD,UAAS,2BAAgC,KACvC,KAAK,CAAC,SAAS,CAkiBjB,CAAC"}
@@ -42,19 +42,19 @@
42
42
  *
43
43
  * @module
44
44
  */
45
- import { rpc_action, } from '../actions/action_rpc.js';
45
+ import { rpc_action } from '../actions/action_rpc.js';
46
46
  import { jsonrpc_errors } from '../http/jsonrpc_errors.js';
47
47
  import { emit_after_commit } from '../http/pending_effects.js';
48
- import { builtin_role_specs_by_name, ROLE_ADMIN, role_has_grant_path, } from './role_schema.js';
48
+ import { builtin_role_specs_by_name, ROLE_ADMIN, role_has_grant_path } from './role_schema.js';
49
49
  import { GRANT_PATH_ADMIN } from './grant_path_schema.js';
50
- import { ROLE_GRANT_OFFER_DEFAULT_TTL_MS, to_role_grant_offer_json, } from './role_grant_offer_schema.js';
51
- import { query_role_grant_offer_create, query_role_grant_offer_decline, query_role_grant_offer_retract, query_role_grant_offer_list, query_role_grant_offer_history_for_account, query_accept_offer, RoleGrantOfferActorAccountMismatchError, RoleGrantOfferActorMismatchError, RoleGrantOfferAlreadyTerminalError, RoleGrantOfferExpiredError, RoleGrantOfferNotFoundError, RoleGrantOfferSelfTargetError, } from './role_grant_offer_queries.js';
52
- import { query_create_role_grant, query_role_grant_find_active_role_for_actor, query_revoke_role_grant, } from './role_grant_queries.js';
50
+ import { ROLE_GRANT_OFFER_DEFAULT_TTL_MS, to_role_grant_offer_json } from './role_grant_offer_schema.js';
51
+ import { query_role_grant_offer_create, query_role_grant_offer_decline, query_role_grant_offer_retract, query_role_grant_offer_list, query_role_grant_offer_history_for_account, query_accept_offer, RoleGrantOfferActorAccountMismatchError, RoleGrantOfferActorMismatchError, RoleGrantOfferAlreadyTerminalError, RoleGrantOfferExpiredError, RoleGrantOfferNotFoundError, RoleGrantOfferSelfTargetError } from './role_grant_offer_queries.js';
52
+ import { query_create_role_grant, query_role_grant_find_active_role_for_actor, query_revoke_role_grant } from './role_grant_queries.js';
53
53
  import { query_actor_by_id, query_active_actors_by_account } from './account_queries.js';
54
54
  import { has_scoped_role } from './request_context.js';
55
- import { build_role_grant_offer_accepted_notification, build_role_grant_offer_declined_notification, build_role_grant_offer_received_notification, build_role_grant_offer_retracted_notification, build_role_grant_offer_supersede_notification, build_role_grant_revoke_notification, } from './role_grant_offer_notifications.js';
55
+ import { build_role_grant_offer_accepted_notification, build_role_grant_offer_declined_notification, build_role_grant_offer_received_notification, build_role_grant_offer_retracted_notification, build_role_grant_offer_supersede_notification, build_role_grant_revoke_notification } from './role_grant_offer_notifications.js';
56
56
  import { ERROR_ROLE_GRANT_NOT_FOUND, ERROR_ROLE_NOT_WEB_GRANTABLE } from '../http/error_schemas.js';
57
- import { ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH, ERROR_ROLE_GRANT_OFFER_ACTOR_MISMATCH, ERROR_ROLE_GRANT_OFFER_EXPIRED, ERROR_ROLE_GRANT_OFFER_NOT_AUTHORIZED, ERROR_ROLE_GRANT_OFFER_NOT_FOUND, ERROR_ROLE_GRANT_OFFER_ROLE_NOT_GRANTABLE, ERROR_ROLE_GRANT_OFFER_SELF_TARGET, ERROR_ROLE_GRANT_OFFER_TERMINAL, role_grant_offer_create_action_spec, role_grant_offer_accept_action_spec, role_grant_offer_decline_action_spec, role_grant_offer_retract_action_spec, role_grant_offer_list_action_spec, role_grant_offer_history_action_spec, role_grant_revoke_action_spec, role_grant_assign_action_spec, } from './role_grant_offer_action_specs.js';
57
+ import { ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH, ERROR_ROLE_GRANT_OFFER_ACTOR_MISMATCH, ERROR_ROLE_GRANT_OFFER_EXPIRED, ERROR_ROLE_GRANT_OFFER_NOT_AUTHORIZED, ERROR_ROLE_GRANT_OFFER_NOT_FOUND, ERROR_ROLE_GRANT_OFFER_ROLE_NOT_GRANTABLE, ERROR_ROLE_GRANT_OFFER_SELF_TARGET, ERROR_ROLE_GRANT_OFFER_TERMINAL, role_grant_offer_create_action_spec, role_grant_offer_accept_action_spec, role_grant_offer_decline_action_spec, role_grant_offer_retract_action_spec, role_grant_offer_list_action_spec, role_grant_offer_history_action_spec, role_grant_revoke_action_spec, role_grant_assign_action_spec } from './role_grant_offer_action_specs.js';
58
58
  // -- Helpers ----------------------------------------------------------------
59
59
  /**
60
60
  * Fan out a batch of pre-written audit rows to the bound emitter's
@@ -85,7 +85,7 @@ const default_authorize = async (auth, _input, _deps, _ctx) => {
85
85
  * Create the eight role-grant-offer RPC actions (six offer-lifecycle methods
86
86
  * plus `role_grant_revoke` and the immediate `role_grant_assign`).
87
87
  *
88
- * @param deps - `RouteFactoryDeps` (`log`, `audit`, …) plus optional `notification_sender` for WS fan-out — when absent, WS fan-out is silently skipped (DB-only side effects still happen). Consumers wiring `BackendWebsocketTransport` assign its instance directly (the transport's `send_to_account` signature accepts the broader `JsonrpcMessageFromServerToClient`, which is contravariantly compatible)
88
+ * @param deps - `ActionFactoryDeps` (`log`, `audit`) plus optional `notification_sender` for WS fan-out — when absent, WS fan-out is silently skipped (DB-only side effects still happen). Consumers wiring `BackendWebsocketTransport` assign its instance directly (the transport's `send_to_account` signature accepts the broader `JsonrpcMessageFromServerToClient`, which is contravariantly compatible)
89
89
  * @param options - role schema, default TTL, authorization override
90
90
  * @returns the `RpcAction` array to spread into a `create_rpc_endpoint` call
91
91
  */
@@ -108,8 +108,8 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
108
108
  metadata: {
109
109
  role: input.role,
110
110
  scope_id: input.scope_id ?? null,
111
- to_account_id: input.to_account_id,
112
- },
111
+ to_account_id: input.to_account_id
112
+ }
113
113
  });
114
114
  };
115
115
  // Returns {offer} only — no auto-accept. Recipient must call
@@ -123,18 +123,18 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
123
123
  if (!role_has_grant_path(role_specs, input.role, GRANT_PATH_ADMIN)) {
124
124
  emit_create_failure_audit(ctx, auth, input);
125
125
  throw jsonrpc_errors.forbidden('role not grantable', {
126
- reason: ERROR_ROLE_GRANT_OFFER_ROLE_NOT_GRANTABLE,
126
+ reason: ERROR_ROLE_GRANT_OFFER_ROLE_NOT_GRANTABLE
127
127
  });
128
128
  }
129
129
  const authorized = await authorize(auth, {
130
130
  to_account_id: input.to_account_id,
131
131
  role: input.role,
132
- scope_id: input.scope_id ?? null,
132
+ scope_id: input.scope_id ?? null
133
133
  }, { log }, ctx);
134
134
  if (!authorized) {
135
135
  emit_create_failure_audit(ctx, auth, input);
136
136
  throw jsonrpc_errors.forbidden('not authorized to offer this role', {
137
- reason: ERROR_ROLE_GRANT_OFFER_NOT_AUTHORIZED,
137
+ reason: ERROR_ROLE_GRANT_OFFER_NOT_AUTHORIZED
138
138
  });
139
139
  }
140
140
  let offer;
@@ -147,20 +147,20 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
147
147
  scope_kind: input.scope_kind ?? null,
148
148
  scope_id: input.scope_id ?? null,
149
149
  message: input.message ?? null,
150
- expires_at: new Date(Date.now() + default_ttl_ms),
150
+ expires_at: new Date(Date.now() + default_ttl_ms)
151
151
  });
152
152
  }
153
153
  catch (err) {
154
154
  if (err instanceof RoleGrantOfferSelfTargetError) {
155
155
  emit_create_failure_audit(ctx, auth, input);
156
156
  throw jsonrpc_errors.invalid_params('cannot offer to self', {
157
- reason: ERROR_ROLE_GRANT_OFFER_SELF_TARGET,
157
+ reason: ERROR_ROLE_GRANT_OFFER_SELF_TARGET
158
158
  });
159
159
  }
160
160
  if (err instanceof RoleGrantOfferActorAccountMismatchError) {
161
161
  emit_create_failure_audit(ctx, auth, input);
162
162
  throw jsonrpc_errors.invalid_params('to_actor_id does not belong to to_account_id', {
163
- reason: ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH,
163
+ reason: ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH
164
164
  });
165
165
  }
166
166
  throw err;
@@ -177,8 +177,8 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
177
177
  offer_id: offer.id,
178
178
  role: offer.role,
179
179
  scope_id: offer.scope_id,
180
- to_account_id: offer.to_account_id,
181
- },
180
+ to_account_id: offer.to_account_id
181
+ }
182
182
  });
183
183
  const offer_json = to_role_grant_offer_json(offer);
184
184
  if (notification_sender) {
@@ -196,7 +196,7 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
196
196
  offer_id: input.offer_id,
197
197
  to_account_id: auth.account.id,
198
198
  actor_id: auth.actor.id,
199
- ip: ctx.client_ip,
199
+ ip: ctx.client_ip
200
200
  });
201
201
  }
202
202
  catch (err) {
@@ -211,7 +211,7 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
211
211
  }
212
212
  if (err instanceof RoleGrantOfferActorMismatchError) {
213
213
  throw jsonrpc_errors.forbidden('offer is targeted to a different actor', {
214
- reason: ERROR_ROLE_GRANT_OFFER_ACTOR_MISMATCH,
214
+ reason: ERROR_ROLE_GRANT_OFFER_ACTOR_MISMATCH
215
215
  });
216
216
  }
217
217
  throw err;
@@ -227,7 +227,7 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
227
227
  const offer_json = to_role_grant_offer_json(result.offer);
228
228
  const supersede_payloads = result.superseded_offers.map((sib) => ({
229
229
  offer: to_role_grant_offer_json(sib),
230
- from_account_id: sib.from_account_id,
230
+ from_account_id: sib.from_account_id
231
231
  }));
232
232
  // Audit events are written in-transaction by query_accept_offer; wire
233
233
  // them through `audit.notify` post-commit so SSE/WS broadcasts fire.
@@ -245,7 +245,7 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
245
245
  notification_sender.send_to_account(sib.from_account_id, build_role_grant_offer_supersede_notification({
246
246
  offer: sib.offer,
247
247
  reason: 'sibling_accepted',
248
- cause_id: result.offer.id,
248
+ cause_id: result.offer.id
249
249
  }));
250
250
  }
251
251
  }
@@ -253,7 +253,7 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
253
253
  return {
254
254
  role_grant_id: result.role_grant.id,
255
255
  offer: offer_json,
256
- superseded_offer_ids: result.superseded_offers.map((o) => o.id),
256
+ superseded_offer_ids: result.superseded_offers.map((o) => o.id)
257
257
  };
258
258
  };
259
259
  const decline_handler = async (input, ctx) => {
@@ -284,8 +284,8 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
284
284
  offer_id: declined.id,
285
285
  role: declined.role,
286
286
  scope_id: declined.scope_id,
287
- reason: input.reason ?? undefined,
288
- },
287
+ reason: input.reason ?? undefined
288
+ }
289
289
  });
290
290
  if (notification_sender) {
291
291
  // Grantor's account_id rides on `declined.from_account_id` from
@@ -325,8 +325,8 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
325
325
  metadata: {
326
326
  offer_id: retracted.id,
327
327
  role: retracted.role,
328
- scope_id: retracted.scope_id,
329
- },
328
+ scope_id: retracted.scope_id
329
+ }
330
330
  });
331
331
  if (notification_sender) {
332
332
  const offer_json = to_role_grant_offer_json(retracted);
@@ -381,10 +381,10 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
381
381
  outcome: 'failure',
382
382
  target_account_id,
383
383
  target_actor_id,
384
- metadata: { role: role_grant_row.role, role_grant_id: input.role_grant_id },
384
+ metadata: { role: role_grant_row.role, role_grant_id: input.role_grant_id }
385
385
  });
386
386
  throw jsonrpc_errors.forbidden('role not web-grantable', {
387
- reason: ERROR_ROLE_NOT_WEB_GRANTABLE,
387
+ reason: ERROR_ROLE_NOT_WEB_GRANTABLE
388
388
  });
389
389
  }
390
390
  const result = await query_revoke_role_grant(ctx, input.role_grant_id, input.actor_id, auth.actor.id, input.reason ?? null);
@@ -401,8 +401,8 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
401
401
  role: result.role,
402
402
  role_grant_id: result.id,
403
403
  scope_id: result.scope_id,
404
- reason: input.reason ?? undefined,
405
- },
404
+ reason: input.reason ?? undefined
405
+ }
406
406
  });
407
407
  // Supersede cascade — the recipient is known (`offer.to_account_id`),
408
408
  // so populate `target_account_id` rather than leaving it null;
@@ -418,14 +418,14 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
418
418
  role: offer.role,
419
419
  scope_id: offer.scope_id,
420
420
  reason: 'role_grant_revoked',
421
- cause_id: result.id,
422
- },
421
+ cause_id: result.id
422
+ }
423
423
  });
424
424
  }
425
425
  if (notification_sender) {
426
426
  const superseded = result.superseded_offers.map((o) => ({
427
427
  offer: to_role_grant_offer_json(o),
428
- from_account_id: o.from_account_id,
428
+ from_account_id: o.from_account_id
429
429
  }));
430
430
  const cause_id = result.id;
431
431
  const reason = input.reason ?? null;
@@ -434,13 +434,13 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
434
434
  role_grant_id: result.id,
435
435
  role: result.role,
436
436
  scope_id: result.scope_id,
437
- reason,
437
+ reason
438
438
  }));
439
439
  for (const sib of superseded) {
440
440
  notification_sender.send_to_account(sib.from_account_id, build_role_grant_offer_supersede_notification({
441
441
  offer: sib.offer,
442
442
  reason: 'role_grant_revoked',
443
- cause_id,
443
+ cause_id
444
444
  }));
445
445
  }
446
446
  });
@@ -465,10 +465,10 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
465
465
  outcome: 'failure',
466
466
  target_account_id: input.to_account_id,
467
467
  target_actor_id: input.to_actor_id ?? null,
468
- metadata: { role: input.role, scope_id: input.scope_id ?? null },
468
+ metadata: { role: input.role, scope_id: input.scope_id ?? null }
469
469
  });
470
470
  throw jsonrpc_errors.forbidden('role not web-grantable', {
471
- reason: ERROR_ROLE_NOT_WEB_GRANTABLE,
471
+ reason: ERROR_ROLE_NOT_WEB_GRANTABLE
472
472
  });
473
473
  }
474
474
  // Resolve the grant's target actor. A supplied `to_actor_id` must be an
@@ -482,7 +482,7 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
482
482
  if (input.to_actor_id != null) {
483
483
  if (!actors.some((a) => a.id === input.to_actor_id)) {
484
484
  throw jsonrpc_errors.invalid_params('to_actor_id does not belong to to_account_id', {
485
- reason: ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH,
485
+ reason: ERROR_ROLE_GRANT_OFFER_ACTOR_ACCOUNT_MISMATCH
486
486
  });
487
487
  }
488
488
  target_actor_id = input.to_actor_id;
@@ -504,7 +504,7 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
504
504
  role: input.role,
505
505
  scope_kind: null,
506
506
  scope_id: input.scope_id ?? null,
507
- granted_by: auth.actor.id,
507
+ granted_by: auth.actor.id
508
508
  });
509
509
  audit.emit_role_grant_target(ctx, auth, {
510
510
  event_type: 'role_grant_create',
@@ -513,8 +513,8 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
513
513
  metadata: {
514
514
  role: grant.role,
515
515
  role_grant_id: grant.id,
516
- scope_id: grant.scope_id,
517
- },
516
+ scope_id: grant.scope_id
517
+ }
518
518
  });
519
519
  return { ok: true, role_grant_id: grant.id };
520
520
  };
@@ -526,6 +526,6 @@ export const create_role_grant_offer_actions = (deps, options = {}) => {
526
526
  rpc_action(role_grant_offer_list_action_spec, list_handler),
527
527
  rpc_action(role_grant_offer_history_action_spec, history_handler),
528
528
  rpc_action(role_grant_revoke_action_spec, revoke_handler),
529
- rpc_action(role_grant_assign_action_spec, assign_handler),
529
+ rpc_action(role_grant_assign_action_spec, assign_handler)
530
530
  ];
531
531
  };
@@ -1 +1 @@
1
- {"version":3,"file":"role_grant_offer_notifications.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/role_grant_offer_notifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAqB,KAAK,IAAI,EAAC,MAAM,wBAAwB,CAAC;AAIrE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;A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AAM,qBAAqB;;;;;kBAKhC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAI1E,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUhB,CAAC;AAEzC,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUjB,CAAC;AAEzC,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUhB,CAAC;AAEzC,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUhB,CAAC;AAEzC,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWjB,CAAC;AAEzC,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;CAUR,CAAC;AAIzC;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC,EAAE,KAAK,CAAC,SAAS,CAOhE,CAAC;AAIF,eAAO,MAAM,4CAA4C,GACxD,QAAQ,4BAA4B,KAClC,mBACgF,CAAC;AAEpF,eAAO,MAAM,6CAA6C,GACzD,QAAQ,6BAA6B,KACnC,mBACiF,CAAC;AAErF,eAAO,MAAM,4CAA4C,GACxD,QAAQ,4BAA4B,KAClC,mBACgF,CAAC;AAEpF,eAAO,MAAM,4CAA4C,GACxD,QAAQ,4BAA4B,KAClC,mBACgF,CAAC;AAEpF,eAAO,MAAM,6CAA6C,GACzD,QAAQ,6BAA6B,KACnC,mBACiF,CAAC;AAErF,eAAO,MAAM,oCAAoC,GAChD,QAAQ,qBAAqB,KAC3B,mBACwE,CAAC"}
1
+ {"version":3,"file":"role_grant_offer_notifications.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/auth/role_grant_offer_notifications.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,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