@fuzdev/fuz_app 0.51.0 → 0.53.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 (395) hide show
  1. package/dist/actions/CLAUDE.md +43 -10
  2. package/dist/actions/action_bridge.d.ts +3 -1
  3. package/dist/actions/action_bridge.d.ts.map +1 -1
  4. package/dist/actions/action_bridge.js +3 -1
  5. package/dist/actions/action_codegen.d.ts +28 -43
  6. package/dist/actions/action_codegen.d.ts.map +1 -1
  7. package/dist/actions/action_codegen.js +31 -50
  8. package/dist/actions/action_event.d.ts +44 -1
  9. package/dist/actions/action_event.d.ts.map +1 -1
  10. package/dist/actions/action_event.js +44 -1
  11. package/dist/actions/action_event_helpers.d.ts +26 -0
  12. package/dist/actions/action_event_helpers.d.ts.map +1 -1
  13. package/dist/actions/action_event_helpers.js +26 -1
  14. package/dist/actions/action_peer.d.ts +17 -0
  15. package/dist/actions/action_peer.d.ts.map +1 -1
  16. package/dist/actions/action_peer.js +8 -9
  17. package/dist/actions/action_registry.d.ts +1 -5
  18. package/dist/actions/action_registry.d.ts.map +1 -1
  19. package/dist/actions/action_registry.js +5 -11
  20. package/dist/actions/action_rpc.d.ts +20 -0
  21. package/dist/actions/action_rpc.d.ts.map +1 -1
  22. package/dist/actions/action_rpc.js +45 -20
  23. package/dist/actions/action_spec.d.ts +75 -6
  24. package/dist/actions/action_spec.d.ts.map +1 -1
  25. package/dist/actions/action_spec.js +36 -6
  26. package/dist/actions/frontend_rpc_client.d.ts +1 -9
  27. package/dist/actions/frontend_rpc_client.d.ts.map +1 -1
  28. package/dist/actions/frontend_rpc_client.js +1 -9
  29. package/dist/actions/register_action_ws.d.ts +19 -0
  30. package/dist/actions/register_action_ws.d.ts.map +1 -1
  31. package/dist/actions/register_action_ws.js +44 -1
  32. package/dist/actions/register_ws_endpoint.d.ts +3 -0
  33. package/dist/actions/register_ws_endpoint.d.ts.map +1 -1
  34. package/dist/actions/register_ws_endpoint.js +3 -0
  35. package/dist/actions/request_tracker.svelte.d.ts +24 -16
  36. package/dist/actions/request_tracker.svelte.d.ts.map +1 -1
  37. package/dist/actions/request_tracker.svelte.js +24 -16
  38. package/dist/actions/rpc_client.d.ts +0 -1
  39. package/dist/actions/rpc_client.d.ts.map +1 -1
  40. package/dist/actions/rpc_client.js +3 -17
  41. package/dist/actions/socket.svelte.d.ts +35 -16
  42. package/dist/actions/socket.svelte.d.ts.map +1 -1
  43. package/dist/actions/socket.svelte.js +33 -14
  44. package/dist/actions/transports.d.ts +15 -5
  45. package/dist/actions/transports.d.ts.map +1 -1
  46. package/dist/actions/transports.js +15 -15
  47. package/dist/actions/transports_http.d.ts +7 -0
  48. package/dist/actions/transports_http.d.ts.map +1 -1
  49. package/dist/actions/transports_http.js +7 -0
  50. package/dist/actions/transports_ws.d.ts +13 -0
  51. package/dist/actions/transports_ws.d.ts.map +1 -1
  52. package/dist/actions/transports_ws.js +13 -0
  53. package/dist/actions/transports_ws_auth_guard.d.ts +6 -4
  54. package/dist/actions/transports_ws_auth_guard.d.ts.map +1 -1
  55. package/dist/actions/transports_ws_auth_guard.js +6 -4
  56. package/dist/actions/transports_ws_backend.d.ts +14 -1
  57. package/dist/actions/transports_ws_backend.d.ts.map +1 -1
  58. package/dist/actions/transports_ws_backend.js +14 -10
  59. package/dist/auth/CLAUDE.md +64 -18
  60. package/dist/auth/account_queries.d.ts +7 -0
  61. package/dist/auth/account_queries.d.ts.map +1 -1
  62. package/dist/auth/account_queries.js +7 -0
  63. package/dist/auth/admin_action_specs.d.ts +5 -0
  64. package/dist/auth/admin_action_specs.d.ts.map +1 -1
  65. package/dist/auth/admin_action_specs.js +5 -0
  66. package/dist/auth/admin_actions.d.ts +1 -0
  67. package/dist/auth/admin_actions.d.ts.map +1 -1
  68. package/dist/auth/admin_actions.js +1 -0
  69. package/dist/auth/api_token_queries.d.ts +6 -0
  70. package/dist/auth/api_token_queries.d.ts.map +1 -1
  71. package/dist/auth/api_token_queries.js +6 -0
  72. package/dist/auth/app_settings_queries.d.ts +4 -0
  73. package/dist/auth/app_settings_queries.d.ts.map +1 -1
  74. package/dist/auth/app_settings_queries.js +4 -0
  75. package/dist/auth/audit_log_queries.d.ts +5 -0
  76. package/dist/auth/audit_log_queries.d.ts.map +1 -1
  77. package/dist/auth/audit_log_queries.js +5 -0
  78. package/dist/auth/audit_log_routes.d.ts +2 -2
  79. package/dist/auth/audit_log_routes.js +2 -2
  80. package/dist/auth/audit_log_schema.d.ts +2 -0
  81. package/dist/auth/audit_log_schema.d.ts.map +1 -1
  82. package/dist/auth/audit_log_schema.js +134 -55
  83. package/dist/auth/bearer_auth.d.ts +2 -0
  84. package/dist/auth/bearer_auth.d.ts.map +1 -1
  85. package/dist/auth/bearer_auth.js +2 -0
  86. package/dist/auth/bootstrap_account.d.ts +3 -0
  87. package/dist/auth/bootstrap_account.d.ts.map +1 -1
  88. package/dist/auth/bootstrap_account.js +3 -0
  89. package/dist/auth/cleanup.d.ts +6 -0
  90. package/dist/auth/cleanup.d.ts.map +1 -1
  91. package/dist/auth/cleanup.js +6 -0
  92. package/dist/auth/daemon_token_middleware.d.ts +4 -0
  93. package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
  94. package/dist/auth/daemon_token_middleware.js +4 -0
  95. package/dist/auth/invite_queries.d.ts +3 -0
  96. package/dist/auth/invite_queries.d.ts.map +1 -1
  97. package/dist/auth/invite_queries.js +3 -0
  98. package/dist/auth/permit_offer_action_specs.d.ts +6 -0
  99. package/dist/auth/permit_offer_action_specs.d.ts.map +1 -1
  100. package/dist/auth/permit_offer_action_specs.js +11 -0
  101. package/dist/auth/permit_offer_queries.d.ts +18 -0
  102. package/dist/auth/permit_offer_queries.d.ts.map +1 -1
  103. package/dist/auth/permit_offer_queries.js +18 -0
  104. package/dist/auth/permit_queries.d.ts +7 -0
  105. package/dist/auth/permit_queries.d.ts.map +1 -1
  106. package/dist/auth/permit_queries.js +7 -0
  107. package/dist/auth/request_context.d.ts +1 -0
  108. package/dist/auth/request_context.d.ts.map +1 -1
  109. package/dist/auth/request_context.js +1 -0
  110. package/dist/auth/role_schema.d.ts +2 -0
  111. package/dist/auth/role_schema.d.ts.map +1 -1
  112. package/dist/auth/role_schema.js +2 -0
  113. package/dist/auth/self_service_role_actions.d.ts +1 -0
  114. package/dist/auth/self_service_role_actions.d.ts.map +1 -1
  115. package/dist/auth/self_service_role_actions.js +1 -0
  116. package/dist/auth/session_lifecycle.d.ts +2 -0
  117. package/dist/auth/session_lifecycle.d.ts.map +1 -1
  118. package/dist/auth/session_lifecycle.js +2 -0
  119. package/dist/auth/session_middleware.d.ts +1 -0
  120. package/dist/auth/session_middleware.d.ts.map +1 -1
  121. package/dist/auth/session_middleware.js +1 -0
  122. package/dist/auth/session_queries.d.ts +9 -0
  123. package/dist/auth/session_queries.d.ts.map +1 -1
  124. package/dist/auth/session_queries.js +9 -0
  125. package/dist/cli/config.d.ts +1 -2
  126. package/dist/cli/config.d.ts.map +1 -1
  127. package/dist/cli/config.js +1 -2
  128. package/dist/cli/daemon.d.ts +6 -1
  129. package/dist/cli/daemon.d.ts.map +1 -1
  130. package/dist/cli/daemon.js +6 -1
  131. package/dist/db/assert_row.d.ts +2 -1
  132. package/dist/db/assert_row.d.ts.map +1 -1
  133. package/dist/db/assert_row.js +2 -1
  134. package/dist/db/create_db.d.ts +3 -1
  135. package/dist/db/create_db.d.ts.map +1 -1
  136. package/dist/db/create_db.js +3 -1
  137. package/dist/db/db.d.ts +15 -4
  138. package/dist/db/db.d.ts.map +1 -1
  139. package/dist/db/db.js +14 -3
  140. package/dist/db/db_pg.d.ts +4 -3
  141. package/dist/db/db_pg.d.ts.map +1 -1
  142. package/dist/db/db_pg.js +7 -5
  143. package/dist/db/db_pglite.d.ts +4 -4
  144. package/dist/db/db_pglite.js +4 -4
  145. package/dist/db/migrate.d.ts +7 -4
  146. package/dist/db/migrate.d.ts.map +1 -1
  147. package/dist/db/migrate.js +5 -2
  148. package/dist/db/sql_identifier.d.ts +2 -1
  149. package/dist/db/sql_identifier.d.ts.map +1 -1
  150. package/dist/db/sql_identifier.js +2 -1
  151. package/dist/db/status.d.ts +4 -1
  152. package/dist/db/status.d.ts.map +1 -1
  153. package/dist/db/status.js +5 -2
  154. package/dist/dev/setup.d.ts +15 -2
  155. package/dist/dev/setup.d.ts.map +1 -1
  156. package/dist/dev/setup.js +15 -2
  157. package/dist/env/dotenv.d.ts +2 -1
  158. package/dist/env/dotenv.d.ts.map +1 -1
  159. package/dist/env/dotenv.js +2 -1
  160. package/dist/env/load.d.ts +1 -3
  161. package/dist/env/load.d.ts.map +1 -1
  162. package/dist/env/load.js +1 -3
  163. package/dist/env/resolve.d.ts +1 -1
  164. package/dist/env/resolve.js +1 -1
  165. package/dist/env/update_env_variable.d.ts +2 -0
  166. package/dist/env/update_env_variable.d.ts.map +1 -1
  167. package/dist/env/update_env_variable.js +2 -0
  168. package/dist/hono_context.d.ts +2 -5
  169. package/dist/hono_context.d.ts.map +1 -1
  170. package/dist/hono_context.js +2 -5
  171. package/dist/http/common_routes.d.ts +0 -8
  172. package/dist/http/common_routes.d.ts.map +1 -1
  173. package/dist/http/common_routes.js +0 -8
  174. package/dist/http/db_routes.d.ts +0 -3
  175. package/dist/http/db_routes.d.ts.map +1 -1
  176. package/dist/http/db_routes.js +0 -3
  177. package/dist/http/error_schemas.d.ts +12 -11
  178. package/dist/http/error_schemas.d.ts.map +1 -1
  179. package/dist/http/error_schemas.js +11 -7
  180. package/dist/http/jsonrpc_errors.d.ts +0 -6
  181. package/dist/http/jsonrpc_errors.d.ts.map +1 -1
  182. package/dist/http/jsonrpc_errors.js +0 -6
  183. package/dist/http/origin.d.ts +6 -13
  184. package/dist/http/origin.d.ts.map +1 -1
  185. package/dist/http/origin.js +7 -14
  186. package/dist/http/pending_effects.d.ts +4 -0
  187. package/dist/http/pending_effects.d.ts.map +1 -1
  188. package/dist/http/pending_effects.js +4 -0
  189. package/dist/http/proxy.d.ts +3 -6
  190. package/dist/http/proxy.d.ts.map +1 -1
  191. package/dist/http/proxy.js +3 -6
  192. package/dist/http/route_spec.d.ts +14 -35
  193. package/dist/http/route_spec.d.ts.map +1 -1
  194. package/dist/http/route_spec.js +17 -22
  195. package/dist/http/schema_helpers.d.ts +0 -4
  196. package/dist/http/schema_helpers.d.ts.map +1 -1
  197. package/dist/http/schema_helpers.js +0 -4
  198. package/dist/http/surface.d.ts +2 -12
  199. package/dist/http/surface.d.ts.map +1 -1
  200. package/dist/http/surface.js +1 -12
  201. package/dist/rate_limiter.d.ts +30 -1
  202. package/dist/rate_limiter.d.ts.map +1 -1
  203. package/dist/rate_limiter.js +40 -1
  204. package/dist/realtime/sse.d.ts +7 -2
  205. package/dist/realtime/sse.d.ts.map +1 -1
  206. package/dist/realtime/sse.js +3 -2
  207. package/dist/realtime/sse_auth_guard.d.ts +21 -21
  208. package/dist/realtime/sse_auth_guard.d.ts.map +1 -1
  209. package/dist/realtime/sse_auth_guard.js +24 -24
  210. package/dist/realtime/subscriber_registry.d.ts +4 -5
  211. package/dist/realtime/subscriber_registry.d.ts.map +1 -1
  212. package/dist/realtime/subscriber_registry.js +4 -5
  213. package/dist/runtime/fs.d.ts +5 -3
  214. package/dist/runtime/fs.d.ts.map +1 -1
  215. package/dist/runtime/fs.js +5 -3
  216. package/dist/runtime/mock.d.ts +6 -3
  217. package/dist/runtime/mock.d.ts.map +1 -1
  218. package/dist/runtime/mock.js +6 -3
  219. package/dist/server/app_backend.d.ts +1 -0
  220. package/dist/server/app_backend.d.ts.map +1 -1
  221. package/dist/server/app_backend.js +1 -0
  222. package/dist/server/app_server.d.ts +31 -5
  223. package/dist/server/app_server.d.ts.map +1 -1
  224. package/dist/server/app_server.js +23 -7
  225. package/dist/server/startup.d.ts +0 -2
  226. package/dist/server/startup.d.ts.map +1 -1
  227. package/dist/server/startup.js +0 -2
  228. package/dist/server/static.d.ts +0 -1
  229. package/dist/server/static.d.ts.map +1 -1
  230. package/dist/server/static.js +0 -1
  231. package/dist/server/validate_nginx.d.ts +3 -3
  232. package/dist/server/validate_nginx.d.ts.map +1 -1
  233. package/dist/server/validate_nginx.js +0 -3
  234. package/dist/testing/CLAUDE.md +1 -1
  235. package/dist/testing/admin_integration.d.ts +5 -1
  236. package/dist/testing/admin_integration.d.ts.map +1 -1
  237. package/dist/testing/admin_integration.js +8 -6
  238. package/dist/testing/adversarial_404.d.ts +0 -2
  239. package/dist/testing/adversarial_404.d.ts.map +1 -1
  240. package/dist/testing/adversarial_404.js +0 -2
  241. package/dist/testing/adversarial_headers.d.ts +5 -4
  242. package/dist/testing/adversarial_headers.d.ts.map +1 -1
  243. package/dist/testing/adversarial_headers.js +5 -4
  244. package/dist/testing/adversarial_input.d.ts +4 -2
  245. package/dist/testing/adversarial_input.d.ts.map +1 -1
  246. package/dist/testing/adversarial_input.js +4 -2
  247. package/dist/testing/app_server.d.ts +25 -0
  248. package/dist/testing/app_server.d.ts.map +1 -1
  249. package/dist/testing/app_server.js +11 -2
  250. package/dist/testing/assertions.d.ts +23 -11
  251. package/dist/testing/assertions.d.ts.map +1 -1
  252. package/dist/testing/assertions.js +23 -11
  253. package/dist/testing/attack_surface.d.ts +0 -4
  254. package/dist/testing/attack_surface.d.ts.map +1 -1
  255. package/dist/testing/attack_surface.js +0 -4
  256. package/dist/testing/audit_completeness.d.ts +4 -1
  257. package/dist/testing/audit_completeness.d.ts.map +1 -1
  258. package/dist/testing/audit_completeness.js +4 -1
  259. package/dist/testing/auth_apps.d.ts +5 -10
  260. package/dist/testing/auth_apps.d.ts.map +1 -1
  261. package/dist/testing/auth_apps.js +5 -10
  262. package/dist/testing/data_exposure.d.ts +0 -11
  263. package/dist/testing/data_exposure.d.ts.map +1 -1
  264. package/dist/testing/data_exposure.js +0 -11
  265. package/dist/testing/db.d.ts +9 -7
  266. package/dist/testing/db.d.ts.map +1 -1
  267. package/dist/testing/db.js +9 -7
  268. package/dist/testing/error_coverage.d.ts +9 -14
  269. package/dist/testing/error_coverage.d.ts.map +1 -1
  270. package/dist/testing/error_coverage.js +9 -14
  271. package/dist/testing/integration.d.ts +4 -1
  272. package/dist/testing/integration.d.ts.map +1 -1
  273. package/dist/testing/integration.js +4 -1
  274. package/dist/testing/integration_helpers.d.ts +5 -34
  275. package/dist/testing/integration_helpers.d.ts.map +1 -1
  276. package/dist/testing/integration_helpers.js +5 -41
  277. package/dist/testing/middleware.d.ts +5 -10
  278. package/dist/testing/middleware.d.ts.map +1 -1
  279. package/dist/testing/middleware.js +5 -10
  280. package/dist/testing/mock_fs.d.ts +0 -2
  281. package/dist/testing/mock_fs.d.ts.map +1 -1
  282. package/dist/testing/mock_fs.js +0 -2
  283. package/dist/testing/rate_limiting.d.ts +3 -1
  284. package/dist/testing/rate_limiting.d.ts.map +1 -1
  285. package/dist/testing/rate_limiting.js +3 -1
  286. package/dist/testing/round_trip.d.ts +0 -2
  287. package/dist/testing/round_trip.d.ts.map +1 -1
  288. package/dist/testing/round_trip.js +0 -2
  289. package/dist/testing/rpc_attack_surface.d.ts +0 -2
  290. package/dist/testing/rpc_attack_surface.d.ts.map +1 -1
  291. package/dist/testing/rpc_attack_surface.js +0 -2
  292. package/dist/testing/rpc_helpers.d.ts +21 -14
  293. package/dist/testing/rpc_helpers.d.ts.map +1 -1
  294. package/dist/testing/rpc_helpers.js +21 -14
  295. package/dist/testing/rpc_round_trip.d.ts +0 -2
  296. package/dist/testing/rpc_round_trip.d.ts.map +1 -1
  297. package/dist/testing/rpc_round_trip.js +0 -2
  298. package/dist/testing/schema_generators.d.ts +5 -3
  299. package/dist/testing/schema_generators.d.ts.map +1 -1
  300. package/dist/testing/schema_generators.js +22 -3
  301. package/dist/testing/sse_round_trip.d.ts +3 -1
  302. package/dist/testing/sse_round_trip.d.ts.map +1 -1
  303. package/dist/testing/sse_round_trip.js +3 -1
  304. package/dist/testing/standard.d.ts +0 -2
  305. package/dist/testing/standard.d.ts.map +1 -1
  306. package/dist/testing/standard.js +0 -2
  307. package/dist/testing/stubs.d.ts +8 -3
  308. package/dist/testing/stubs.d.ts.map +1 -1
  309. package/dist/testing/stubs.js +10 -3
  310. package/dist/testing/surface_invariants.d.ts +14 -3
  311. package/dist/testing/surface_invariants.d.ts.map +1 -1
  312. package/dist/testing/surface_invariants.js +14 -3
  313. package/dist/testing/ws_round_trip.d.ts +13 -1
  314. package/dist/testing/ws_round_trip.d.ts.map +1 -1
  315. package/dist/ui/AccountSessions.svelte +9 -0
  316. package/dist/ui/AccountSessions.svelte.d.ts.map +1 -1
  317. package/dist/ui/AdminAccounts.svelte +10 -0
  318. package/dist/ui/AdminAccounts.svelte.d.ts.map +1 -1
  319. package/dist/ui/AdminAuditLog.svelte +10 -0
  320. package/dist/ui/AdminAuditLog.svelte.d.ts.map +1 -1
  321. package/dist/ui/AdminInvites.svelte +9 -0
  322. package/dist/ui/AdminInvites.svelte.d.ts.map +1 -1
  323. package/dist/ui/AdminOverview.svelte +10 -0
  324. package/dist/ui/AdminOverview.svelte.d.ts.map +1 -1
  325. package/dist/ui/AdminPermitHistory.svelte +9 -0
  326. package/dist/ui/AdminPermitHistory.svelte.d.ts.map +1 -1
  327. package/dist/ui/AdminSessions.svelte +10 -0
  328. package/dist/ui/AdminSessions.svelte.d.ts.map +1 -1
  329. package/dist/ui/AdminSettings.svelte +9 -0
  330. package/dist/ui/AdminSettings.svelte.d.ts.map +1 -1
  331. package/dist/ui/AdminSurface.svelte +9 -0
  332. package/dist/ui/AdminSurface.svelte.d.ts.map +1 -1
  333. package/dist/ui/AppShell.svelte +24 -0
  334. package/dist/ui/AppShell.svelte.d.ts +23 -0
  335. package/dist/ui/AppShell.svelte.d.ts.map +1 -1
  336. package/dist/ui/BootstrapForm.svelte +17 -0
  337. package/dist/ui/BootstrapForm.svelte.d.ts +4 -0
  338. package/dist/ui/BootstrapForm.svelte.d.ts.map +1 -1
  339. package/dist/ui/CLAUDE.md +1 -1
  340. package/dist/ui/ColumnLayout.svelte +11 -0
  341. package/dist/ui/ColumnLayout.svelte.d.ts +10 -0
  342. package/dist/ui/ColumnLayout.svelte.d.ts.map +1 -1
  343. package/dist/ui/Datatable.svelte +18 -0
  344. package/dist/ui/Datatable.svelte.d.ts +17 -0
  345. package/dist/ui/Datatable.svelte.d.ts.map +1 -1
  346. package/dist/ui/LoginForm.svelte +18 -0
  347. package/dist/ui/LoginForm.svelte.d.ts +9 -0
  348. package/dist/ui/LoginForm.svelte.d.ts.map +1 -1
  349. package/dist/ui/LogoutButton.svelte +9 -0
  350. package/dist/ui/LogoutButton.svelte.d.ts +8 -0
  351. package/dist/ui/LogoutButton.svelte.d.ts.map +1 -1
  352. package/dist/ui/MenuLink.svelte +10 -0
  353. package/dist/ui/MenuLink.svelte.d.ts +9 -0
  354. package/dist/ui/MenuLink.svelte.d.ts.map +1 -1
  355. package/dist/ui/OpenSignupToggle.svelte +9 -0
  356. package/dist/ui/OpenSignupToggle.svelte.d.ts.map +1 -1
  357. package/dist/ui/SignupForm.svelte +16 -0
  358. package/dist/ui/SignupForm.svelte.d.ts +4 -0
  359. package/dist/ui/SignupForm.svelte.d.ts.map +1 -1
  360. package/dist/ui/SurfaceExplorer.svelte +9 -0
  361. package/dist/ui/SurfaceExplorer.svelte.d.ts.map +1 -1
  362. package/dist/ui/audit_log_state.svelte.d.ts +6 -1
  363. package/dist/ui/audit_log_state.svelte.d.ts.map +1 -1
  364. package/dist/ui/audit_log_state.svelte.js +7 -2
  365. package/dist/ui/auth_state.svelte.d.ts +16 -4
  366. package/dist/ui/auth_state.svelte.d.ts.map +1 -1
  367. package/dist/ui/auth_state.svelte.js +16 -4
  368. package/dist/ui/form_state.svelte.d.ts +9 -0
  369. package/dist/ui/form_state.svelte.d.ts.map +1 -1
  370. package/dist/ui/form_state.svelte.js +9 -0
  371. package/dist/ui/loadable.svelte.d.ts +6 -1
  372. package/dist/ui/loadable.svelte.d.ts.map +1 -1
  373. package/dist/ui/loadable.svelte.js +6 -1
  374. package/dist/ui/permit_offers_state.svelte.d.ts +2 -0
  375. package/dist/ui/permit_offers_state.svelte.d.ts.map +1 -1
  376. package/dist/ui/permit_offers_state.svelte.js +2 -0
  377. package/dist/ui/popover.svelte.d.ts +17 -4
  378. package/dist/ui/popover.svelte.d.ts.map +1 -1
  379. package/dist/ui/popover.svelte.js +17 -4
  380. package/dist/ui/position_helpers.d.ts +1 -3
  381. package/dist/ui/position_helpers.d.ts.map +1 -1
  382. package/dist/ui/position_helpers.js +1 -3
  383. package/dist/ui/sidebar_state.svelte.d.ts +21 -9
  384. package/dist/ui/sidebar_state.svelte.d.ts.map +1 -1
  385. package/dist/ui/sidebar_state.svelte.js +16 -2
  386. package/dist/ui/table_state.svelte.d.ts +14 -0
  387. package/dist/ui/table_state.svelte.d.ts.map +1 -1
  388. package/dist/ui/table_state.svelte.js +14 -0
  389. package/dist/ui/ui_fetch.d.ts +1 -7
  390. package/dist/ui/ui_fetch.d.ts.map +1 -1
  391. package/dist/ui/ui_fetch.js +1 -7
  392. package/dist/ui/ui_format.d.ts +2 -14
  393. package/dist/ui/ui_format.d.ts.map +1 -1
  394. package/dist/ui/ui_format.js +2 -14
  395. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  # actions/ — SAES (Symmetric Action Event System)
2
2
 
3
- One declarative `ActionSpec` shape — `{method, kind, initiator, auth, side_effects, input, output, async, description}` — binds to three
3
+ One declarative `ActionSpec` shape — `{method, kind, initiator, auth, side_effects, input, output, async, description, streams?, error_reasons?}` — binds to three
4
4
  transport surfaces (REST, JSON-RPC, WebSocket) with uniform DEV-only output
5
5
  validation and symmetric send/receive. This directory holds the spec types,
6
6
  registry, codegen helpers, both transport bridges, the single-endpoint RPC
@@ -19,10 +19,10 @@ IMPORTANT: Every exported Zod schema is paired with a same-named `z.infer`
19
19
  type export. When adding new schemas, keep the pair invariant — it is the
20
20
  convention callers rely on for type imports.
21
21
 
22
- NOTE: The system is marked `@action-system-review` `action_registry`,
23
- `action_codegen`, and `action_bridge` still hold partial/stub API. Non-obvious
24
- future-churn sites are flagged in source. Treat the core bridge + RPC endpoint
25
- as stable; registry getters and codegen shapes may move.
22
+ NOTE: `ActionRegistry` keeps a few pre-built getters (auth filters,
23
+ initiator-direction filters) that codegen doesn't consume today — kept
24
+ low-cost for future filtering. Bridge, RPC endpoint, and per-derivation
25
+ codegen helpers are post-SAES-RPC-closeout stable.
26
26
 
27
27
  ## Action specs (`action_spec.ts`)
28
28
 
@@ -47,6 +47,36 @@ Optional `streams?: string` names a companion `remote_notification` method
47
47
  emitted as request-scoped progress. Transport-agnostic handshake —
48
48
  registry-time validation that the named method exists is a consumer concern.
49
49
 
50
+ Optional `error_reasons?: ReadonlyArray<string>` declares the reason codes a
51
+ handler may surface via `error.data.reason`. Same precedent as `streams`:
52
+ declarative metadata for consumers (codegen, UI form-state matching, docs)
53
+ to read off the spec instead of scanning handler code. No runtime
54
+ enforcement — drift between declared reasons and what handlers actually
55
+ throw is caught per-module by source-scanning unit tests (see
56
+ `../../test/auth/permit_offer_actions.error_reasons.test.ts`). Reuses
57
+ the same `as const` string constants the handler throws (e.g.
58
+ `ERROR_OFFER_*` from `../auth/permit_offer_action_specs.ts`,
59
+ `ERROR_PERMIT_NOT_FOUND` from `../http/error_schemas.ts`) so call
60
+ sites can import either side. Standard transport errors (validation,
61
+ auth, rate-limit) stay implicit.
62
+
63
+ Optional `rate_limit?: 'ip' | 'account' | 'both'` opts the action into
64
+ the dispatcher's per-action rate-limit hook. Same hook fires on the HTTP
65
+ RPC dispatcher (`create_rpc_endpoint`) and the WebSocket dispatcher
66
+ (`register_action_ws`) — one budget per action, not per transport.
67
+ `'ip'` keys on the resolved client IP; `'account'` keys on
68
+ `request_context.actor.id` (post-auth) and is rejected at registration
69
+ when paired with `auth: 'public'` (no actor to key on); `'both'` runs
70
+ both checks. **Throttle-requests semantics** — every invocation records,
71
+ regardless of outcome (different from REST login's throttle-failures
72
+ that resets on success). The motivating threat is admin mutation oracles
73
+ (`invite_create` account-existence probe) where the _successful_
74
+ invocation is the threat. Limiters are configured at server-assembly
75
+ time via `AppServerOptions.action_ip_rate_limiter` /
76
+ `action_account_rate_limiter` and threaded into both dispatchers
77
+ automatically; consumers wiring `register_action_ws` directly forward
78
+ the same limiters from `AppServerContext`.
79
+
50
80
  Canonical spec shape: module-scope declaration with `satisfies` +
51
81
  `{method}_action_spec` naming, preserving the literal `method` type and
52
82
  dropping per-spec `*_METHOD` constants (readers dereference `.method` at
@@ -80,8 +110,11 @@ The remaining asymmetry today is runtime: there is no
80
110
  `create_backend_rpc_client` and `create_broadcast_api` returns
81
111
  `Promise<void>` (fire-and-forget broadcast) rather than the
82
112
  `Promise<Result<{value}, {error}>>` shape `FrontendActionsApi` methods
83
- return. Closing those gaps is captured in the SAES quest's API
84
- review III deferred set — wait for a second backend runtime case.
113
+ return. Closing those gaps is on the deferred follow-up set in the
114
+ [SAES RPC closeout](https://github.com/ryanatkn/grimoire/blob/main/quests/HISTORY.md#saes-rpc-direction-2026-04)
115
+ (grimoire `lore/fuz_app/TODO.md` § Future Directions tracks the symmetric
116
+ backend signature, backend RPC client, and local-call symmetry items) —
117
+ wait for a second backend runtime case.
85
118
 
86
119
  `ActionRegistry(specs)` is a query/filter wrapper over `ActionSpecUnion[]`.
87
120
  Codegen-used getter groups:
@@ -105,8 +138,8 @@ Codegen-used getter groups:
105
138
  `request_response` join): `backend_initiated_specs`,
106
139
  `backend_initiated_methods`.
107
140
 
108
- Other getters (auth, initiator-direction) are pre-built stubs flagged
109
- `@action-system-review`.
141
+ Other getters (auth filters, initiator-direction filters) are pre-built
142
+ API surface unused by codegen today.
110
143
 
111
144
  `action_codegen.ts` provides gen helpers (used by consumer `*.gen.ts` files,
112
145
  not the runtime):
@@ -176,7 +209,7 @@ and `FrontendActionHandlers`.
176
209
  - `generate_action_event_datas(specs, imports, {same_file?, collections_path?, include_protocol_actions?})` — `ActionEventDatas` interface; per-spec variant by kind (`ActionEventRequestResponseData` / `ActionEventRemoteNotificationData` / `ActionEventLocalCallData`). `same_file` (default `true`) is the file-layout switch: when `true`, assumes `ActionInputs` / `ActionOutputs` are in the same module and adds no import (the zzz pattern); when `false`, adds the type imports from `collections_path` (default `'./action_collections.js'`). `collections_path` alone is a no-op — the surprising omit-vs-default behavior of earlier versions has been replaced.
177
210
  - `generate_frontend_actions_api(specs, imports, {interface_name?, method_filter?, collections_path?, sync_returns_value?, include_protocol_actions?})` — emits the typed `FrontendActionsApi` interface (configurable via `interface_name`, default `'FrontendActionsApi'`). One method signature per spec via `generate_actions_api_method_signature`. Protocol actions filtered by default; `method_filter: (spec) => boolean` runs after the protocol-action filter. Renamed from `generate_actions_api` in API review III to make the side-of-the-wire intent visible at every consumer site.
178
211
  - `generate_frontend_action_handlers(specs, imports, {collections_path?, include_protocol_actions?})` — `FrontendActionHandlers` interface (Tier 2 only — wraps `generate_phase_handlers` with `action_event_type: 'TypedActionEvent'`). Pair with `generate_typed_action_event_alias`.
179
- - `generate_backend_actions_api(specs, imports, {interface_name?, spec_array_name?, specs_module?, collections_path?, qualify_spec?, include_protocol_actions?})` — `BackendActionsApi` interface AND `broadcast_action_specs: ReadonlyArray<ActionSpecUnion>` array (both names configurable). Filter: `kind === 'remote_notification' && initiator !== 'frontend'`, with `streams`-target methods (request-scoped progress notifications invoked via `ctx.notify`) excluded — the discriminator is `ActionSpec.streams`, not a manual list. Adds `ActionInputs` (from `collections_path`) + `ActionSpecUnion`, plus `* as specs` from `specs_module` unless `qualify_spec` is set. Method shape today is `(input) => Promise<void>` (matches `create_broadcast_api`'s fire-and-forget runtime); generalizing to per-kind shapes via `generate_actions_api_method_signature` is deferred until a second backend runtime constructor lands (see SAES quest § API review III deferred set).
212
+ - `generate_backend_actions_api(specs, imports, {interface_name?, spec_array_name?, specs_module?, collections_path?, qualify_spec?, include_protocol_actions?})` — `BackendActionsApi` interface AND `broadcast_action_specs: ReadonlyArray<ActionSpecUnion>` array (both names configurable). Filter: `kind === 'remote_notification' && initiator !== 'frontend'`, with `streams`-target methods (request-scoped progress notifications invoked via `ctx.notify`) excluded — the discriminator is `ActionSpec.streams`, not a manual list. Adds `ActionInputs` (from `collections_path`) + `ActionSpecUnion`, plus `* as specs` from `specs_module` unless `qualify_spec` is set. Method shape today is `(input) => Promise<void>` (matches `create_broadcast_api`'s fire-and-forget runtime); generalizing to per-kind shapes via `generate_actions_api_method_signature` is deferred until a second backend runtime constructor lands (tracked in grimoire `lore/fuz_app/TODO.md` § Future Directions, _Symmetric backend signature shape_).
180
213
  - `generate_backend_action_handlers_map(imports, options?)` — emits the `BackendActionHandlers` mapped type (`{[K in BackendRequestResponseMethod]: (input: ActionInputs[K], ctx: BackendHandlerContext) => ActionOutputs[K] | Promise<ActionOutputs[K]>}`). Replaces the hand-maintained `Exclude<>` + parallel mapped-type pattern (zzz had this at `zzz/src/lib/server/zzz_action_handlers.ts:42-66`). Configurable type name, method enum name, and context type name; configurable `collections_path` / `metatypes_path` for the type imports.
181
214
 
182
215
  ### Wrapper + multi-source helper
@@ -49,7 +49,8 @@ export declare const derive_http_method: (side_effects: ActionSideEffects) => Ro
49
49
  * @param spec - the action spec (must have non-null `auth`)
50
50
  * @param options - HTTP-specific options (path, handler, optional overrides)
51
51
  * @returns a `RouteSpec` ready for `apply_route_specs`
52
- * @throws if `spec.auth` is null
52
+ * @throws Error if `spec.auth` is null (only `request_response` actions can
53
+ * become routes; notifications and local calls cannot)
53
54
  */
54
55
  export declare const create_action_route_spec: (spec: ActionSpec, options: ActionRouteOptions) => RouteSpec;
55
56
  /**
@@ -60,6 +61,7 @@ export declare const create_action_route_spec: (spec: ActionSpec, options: Actio
60
61
  * @param spec - the action spec (must have `kind: 'remote_notification'`)
61
62
  * @param options - optional event-specific options (channel)
62
63
  * @returns an `EventSpec` ready for `create_validated_broadcaster`
64
+ * @throws Error if `spec.kind` is not `'remote_notification'`
63
65
  */
64
66
  export declare const create_action_event_spec: (spec: ActionSpec, options?: ActionEventOptions) => EventSpec;
65
67
  //# sourceMappingURL=action_bridge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"action_bridge.d.ts","sourceRoot":"../src/lib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AkB,KACzB,SAmBF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,GACpC,MAAM,UAAU,EAChB,UAAU,kBAAkB,KAC1B,SAYF,CAAC"}
@@ -35,7 +35,8 @@ export const derive_http_method = (side_effects) => {
35
35
  * @param spec - the action spec (must have non-null `auth`)
36
36
  * @param options - HTTP-specific options (path, handler, optional overrides)
37
37
  * @returns a `RouteSpec` ready for `apply_route_specs`
38
- * @throws if `spec.auth` is null
38
+ * @throws Error if `spec.auth` is null (only `request_response` actions can
39
+ * become routes; notifications and local calls cannot)
39
40
  */
40
41
  export const create_action_route_spec = (spec, options) => {
41
42
  if (spec.auth === null) {
@@ -63,6 +64,7 @@ export const create_action_route_spec = (spec, options) => {
63
64
  * @param spec - the action spec (must have `kind: 'remote_notification'`)
64
65
  * @param options - optional event-specific options (channel)
65
66
  * @returns an `EventSpec` ready for `create_validated_broadcaster`
67
+ * @throws Error if `spec.kind` is not `'remote_notification'`
66
68
  */
67
69
  export const create_action_event_spec = (spec, options) => {
68
70
  if (spec.kind !== 'remote_notification') {
@@ -22,9 +22,6 @@ export type ProtocolActionMethod = (typeof PROTOCOL_ACTION_METHODS)[number];
22
22
  * });
23
23
  */
24
24
  export declare const is_protocol_action_method: (method: string) => method is ProtocolActionMethod;
25
- /**
26
- * Represents an import item with its kind (type, value, or namespace).
27
- */
28
25
  interface ImportItem {
29
26
  name: string;
30
27
  kind: 'type' | 'value' | 'namespace';
@@ -56,51 +53,41 @@ export declare class ImportBuilder {
56
53
  #private;
57
54
  imports: Map<string, Map<string, ImportItem>>;
58
55
  /**
59
- * Add a value import to be included in the generated code.
60
- * @param from - the module to import from
61
- * @param what - what to import (value)
56
+ * Add a value import. Accepts `* as ns` strings as namespace imports.
57
+ *
58
+ * @returns `this` for chaining
59
+ * @mutates this - inserts into the internal `imports` map
62
60
  */
63
61
  add(from: string, what: string): this;
64
62
  /**
65
- * Add a type import to be included in the generated code.
66
- * @param from - the module to import from
67
- * @param what - what to import (type)
63
+ * Add a type-only import.
64
+ *
65
+ * @returns `this` for chaining
66
+ * @mutates this - inserts into the internal `imports` map (downgrade to
67
+ * type is suppressed if already registered as a value)
68
68
  */
69
69
  add_type(from: string, what: string): this;
70
- /**
71
- * Add multiple value imports from the same module.
72
- */
73
70
  add_many(from: string, ...items: Array<string>): this;
74
- /**
75
- * Add multiple type imports from the same module.
76
- */
77
71
  add_types(from: string, ...items: Array<string>): this;
78
72
  /**
79
- * Generate the import statements.
80
- * If all imports from a module are types, uses `import type` syntax.
73
+ * Generate the import statements. When every import from a module is a
74
+ * type, emits `import type {…}` so the whole statement disappears at
75
+ * compile time.
81
76
  */
82
77
  build(): string;
83
- /**
84
- * Check if the builder has any imports.
85
- */
86
78
  has_imports(): boolean;
87
- /**
88
- * Get the number of import statements that will be generated.
89
- */
90
79
  get import_count(): number;
91
- /**
92
- * Preview what imports will be generated (useful for debugging).
93
- * @returns array of import statement strings
94
- */
80
+ /** Build the same statement list as `build` without joining — for inspection in tests. */
95
81
  preview(): Array<string>;
96
82
  /**
97
83
  * Clear all imports.
84
+ *
85
+ * @returns `this` for chaining
86
+ * @mutates this - empties the internal `imports` map
98
87
  */
99
88
  clear(): this;
100
89
  }
101
- /**
102
- * Determines which phases an executor can handle based on the action spec.
103
- */
90
+ /** Phases an executor can handle for the given spec — kind + initiator → set of phases. */
104
91
  export declare const get_executor_phases: (spec: ActionSpecUnion, executor: "frontend" | "backend") => Array<ActionEventPhase>;
105
92
  /** Default `collections_path` — every consumer's gen producers point at the sibling `action_collections.js`. */
106
93
  export declare const DEFAULT_COLLECTIONS_PATH = "./action_collections.js";
@@ -129,16 +116,14 @@ export declare const get_handler_return_type: (spec: ActionSpecUnion, phase: Act
129
116
  *
130
117
  * @param options.action_event_type - custom type name to use instead of `ActionEvent`
131
118
  * (consumers can define a narrowed type that carries typed input/output via their codegen maps)
132
- * @param options.collections_path - import path the side-effect `ActionOutputs` import
119
+ * @param options.collections_path - Import path the side-effect `ActionOutputs` import
133
120
  * resolves to. Defaults to `'./action_collections.js'`.
134
121
  */
135
122
  export declare const generate_phase_handlers: (spec: ActionSpecUnion, executor: "frontend" | "backend", imports: ImportBuilder, options?: {
136
123
  action_event_type?: string;
137
124
  collections_path?: string;
138
125
  }) => string;
139
- /**
140
- * Creates a file banner comment.
141
- */
126
+ /** "DO NOT EDIT" banner naming the gen producer. */
142
127
  export declare const create_banner: (origin_path: string) => string;
143
128
  export declare const to_action_spec_identifier: (method: string) => string;
144
129
  export declare const to_action_spec_input_identifier: (method: string) => string;
@@ -169,13 +154,11 @@ export declare const to_action_spec_output_identifier: (method: string) => strin
169
154
  * follows so wrappers no longer pre-register imports a per-spec emit might
170
155
  * not actually use.
171
156
  *
172
- * @param spec - the action spec to emit
173
- * @param imports - import builder to register references on
174
- * @param options.sync_returns_value - when true (default), sync local_call
157
+ * @param options.sync_returns_value - When true (default), sync `local_call`
175
158
  * methods return the output value directly; when false they're wrapped in
176
159
  * `Result<{value, error}>` like async methods. Set to `false` if your
177
- * FrontendActionsApi treats every method uniformly.
178
- * @param options.collections_path - import path that `ActionInputs` /
160
+ * `FrontendActionsApi` treats every method uniformly.
161
+ * @param options.collections_path - Import path that `ActionInputs` /
179
162
  * `ActionOutputs` resolve to. Defaults to `'./action_collections.js'`.
180
163
  * @returns one line like `foo: (input: ActionInputs['foo'], options?: RpcClientCallOptions) => Promise<Result<...>>;`
181
164
  */
@@ -368,7 +351,7 @@ export declare const generate_frontend_action_handlers: (specs: ReadonlyArray<Ac
368
351
  * Method signature shape today is `(input) => Promise<void>` — matches the
369
352
  * fire-and-forget runtime of `create_broadcast_api`. Generalizing per-kind
370
353
  * via `generate_actions_api_method_signature` is deferred until a second
371
- * backend runtime constructor lands (see SAES quest § API review III).
354
+ * backend runtime constructor lands.
372
355
  *
373
356
  * @param options.qualify_spec - per-spec qualified identifier callback for
374
357
  * multi-source consumers. When set, the helper emits the callback's return
@@ -434,6 +417,11 @@ export interface SpecSource {
434
417
  * per-call callback wasn't enough; the import dance + dup-check was the
435
418
  * real boilerplate.
436
419
  *
420
+ * @throws Error if two sources contain the same method name (same-method
421
+ * detection is the consumer's primary debugging signal). Also throws if
422
+ * the returned `qualify_spec` is later called with a method not registered
423
+ * in any source.
424
+ *
437
425
  * @example
438
426
  * ```ts
439
427
  * const sources = [
@@ -454,9 +442,6 @@ export interface SpecSource {
454
442
  * });
455
443
  * };
456
444
  * ```
457
- *
458
- * @throws if two sources contain the same method name (same-method detection
459
- * is the consumer's primary debugging signal).
460
445
  */
461
446
  export declare const create_namespace_qualifier: (sources: ReadonlyArray<SpecSource>, imports: ImportBuilder) => {
462
447
  qualify_spec: (spec: ActionSpecUnion) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"action_codegen.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/action_codegen.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,eAAe,EAAE,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAGxE;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,kCAAmC,CAAC;AAExE,8FAA8F;AAC9F,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAI5E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,GAAI,QAAQ,MAAM,KAAG,MAAM,IAAI,oBACrC,CAAC;AAEjC;;GAEG;AACH,UAAU,UAAU;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,WAAW,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,aAAa;;IACzB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAa;IAE1D;;;;OAIG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAQrC;;;;OAIG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AC;IAChD,SAAS,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;CA6B1C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC9B,KAAG,MAYH,CAAC"}
@@ -49,9 +49,10 @@ export const is_protocol_action_method = (method) => PROTOCOL_METHOD_SET.has(met
49
49
  export class ImportBuilder {
50
50
  imports = new Map();
51
51
  /**
52
- * Add a value import to be included in the generated code.
53
- * @param from - the module to import from
54
- * @param what - what to import (value)
52
+ * Add a value import. Accepts `* as ns` strings as namespace imports.
53
+ *
54
+ * @returns `this` for chaining
55
+ * @mutates this - inserts into the internal `imports` map
55
56
  */
56
57
  add(from, what) {
57
58
  // Handle namespace imports specially
@@ -61,34 +62,27 @@ export class ImportBuilder {
61
62
  return this.#add_import(from, what, 'value');
62
63
  }
63
64
  /**
64
- * Add a type import to be included in the generated code.
65
- * @param from - the module to import from
66
- * @param what - what to import (type)
65
+ * Add a type-only import.
66
+ *
67
+ * @returns `this` for chaining
68
+ * @mutates this - inserts into the internal `imports` map (downgrade to
69
+ * type is suppressed if already registered as a value)
67
70
  */
68
71
  add_type(from, what) {
69
72
  return this.#add_import(from, what, 'type');
70
73
  }
71
- /**
72
- * Add multiple value imports from the same module.
73
- */
74
74
  add_many(from, ...items) {
75
75
  for (const item of items) {
76
76
  this.add(from, item);
77
77
  }
78
78
  return this;
79
79
  }
80
- /**
81
- * Add multiple type imports from the same module.
82
- */
83
80
  add_types(from, ...items) {
84
81
  for (const item of items) {
85
82
  this.add_type(from, item);
86
83
  }
87
84
  return this;
88
85
  }
89
- /**
90
- * Internal method to add an import with its kind.
91
- */
92
86
  #add_import(from, name, kind) {
93
87
  // Skip empty imports
94
88
  if (!name || (kind !== 'namespace' && name === '')) {
@@ -107,42 +101,33 @@ export class ImportBuilder {
107
101
  return this;
108
102
  }
109
103
  /**
110
- * Generate the import statements.
111
- * If all imports from a module are types, uses `import type` syntax.
104
+ * Generate the import statements. When every import from a module is a
105
+ * type, emits `import type {…}` so the whole statement disappears at
106
+ * compile time.
112
107
  */
113
108
  build() {
114
109
  return this.#generate_import_statements().join('\n');
115
110
  }
116
- /**
117
- * Check if the builder has any imports.
118
- */
119
111
  has_imports() {
120
112
  return this.imports.size > 0;
121
113
  }
122
- /**
123
- * Get the number of import statements that will be generated.
124
- */
125
114
  get import_count() {
126
115
  return this.imports.size;
127
116
  }
128
- /**
129
- * Preview what imports will be generated (useful for debugging).
130
- * @returns array of import statement strings
131
- */
117
+ /** Build the same statement list as `build` without joining — for inspection in tests. */
132
118
  preview() {
133
119
  return this.#generate_import_statements();
134
120
  }
135
121
  /**
136
122
  * Clear all imports.
123
+ *
124
+ * @returns `this` for chaining
125
+ * @mutates this - empties the internal `imports` map
137
126
  */
138
127
  clear() {
139
128
  this.imports.clear();
140
129
  return this;
141
130
  }
142
- /**
143
- * Internal helper to generate import statements from the current state.
144
- * Shared by both build() and preview() methods.
145
- */
146
131
  #generate_import_statements() {
147
132
  const statements = [];
148
133
  for (const [from, module_imports] of this.imports) {
@@ -185,9 +170,7 @@ export class ImportBuilder {
185
170
  return statements;
186
171
  }
187
172
  }
188
- /**
189
- * Determines which phases an executor can handle based on the action spec.
190
- */
173
+ /** Phases an executor can handle for the given spec — kind + initiator → set of phases. */
191
174
  export const get_executor_phases = (spec, executor) => {
192
175
  const { kind, initiator } = spec;
193
176
  const phases = [];
@@ -214,9 +197,9 @@ export const get_executor_phases = (spec, executor) => {
214
197
  }
215
198
  if (can_receive) {
216
199
  phases.push('receive_request', 'send_response');
217
- // TODO @action-system-review This adds send_error redundantly when initiator:'both'
218
- // (already added above). Deduplication via Set at the end handles it,
219
- // but the logic should be consolidated when the action system is revisited.
200
+ // TODO consolidate `send_error` is added redundantly when
201
+ // initiator:'both' (already pushed above); the trailing Set dedup
202
+ // handles it.
220
203
  phases.push('send_error');
221
204
  }
222
205
  break;
@@ -289,7 +272,7 @@ export const get_handler_return_type = (spec, phase, imports, collections_path =
289
272
  *
290
273
  * @param options.action_event_type - custom type name to use instead of `ActionEvent`
291
274
  * (consumers can define a narrowed type that carries typed input/output via their codegen maps)
292
- * @param options.collections_path - import path the side-effect `ActionOutputs` import
275
+ * @param options.collections_path - Import path the side-effect `ActionOutputs` import
293
276
  * resolves to. Defaults to `'./action_collections.js'`.
294
277
  */
295
278
  export const generate_phase_handlers = (spec, executor, imports, options) => {
@@ -315,9 +298,7 @@ export const generate_phase_handlers = (spec, executor, imports, options) => {
315
298
  .join(';\n\t\t');
316
299
  return `${method}?: {\n\t\t${phase_handlers};\n\t}`;
317
300
  };
318
- /**
319
- * Creates a file banner comment.
320
- */
301
+ /** "DO NOT EDIT" banner naming the gen producer. */
321
302
  export const create_banner = (origin_path) => `generated by ${origin_path} - DO NOT EDIT OR RISK LOST DATA`;
322
303
  // TODO rethink these, see also zzz `codegen.ts`
323
304
  export const to_action_spec_identifier = (method) => `${method}_action_spec`;
@@ -349,13 +330,11 @@ export const to_action_spec_output_identifier = (method) => `${to_action_spec_id
349
330
  * follows so wrappers no longer pre-register imports a per-spec emit might
350
331
  * not actually use.
351
332
  *
352
- * @param spec - the action spec to emit
353
- * @param imports - import builder to register references on
354
- * @param options.sync_returns_value - when true (default), sync local_call
333
+ * @param options.sync_returns_value - When true (default), sync `local_call`
355
334
  * methods return the output value directly; when false they're wrapped in
356
335
  * `Result<{value, error}>` like async methods. Set to `false` if your
357
- * FrontendActionsApi treats every method uniformly.
358
- * @param options.collections_path - import path that `ActionInputs` /
336
+ * `FrontendActionsApi` treats every method uniformly.
337
+ * @param options.collections_path - Import path that `ActionInputs` /
359
338
  * `ActionOutputs` resolve to. Defaults to `'./action_collections.js'`.
360
339
  * @returns one line like `foo: (input: ActionInputs['foo'], options?: RpcClientCallOptions) => Promise<Result<...>>;`
361
340
  */
@@ -839,7 +818,7 @@ ${lines};
839
818
  * Method signature shape today is `(input) => Promise<void>` — matches the
840
819
  * fire-and-forget runtime of `create_broadcast_api`. Generalizing per-kind
841
820
  * via `generate_actions_api_method_signature` is deferred until a second
842
- * backend runtime constructor lands (see SAES quest § API review III).
821
+ * backend runtime constructor lands.
843
822
  *
844
823
  * @param options.qualify_spec - per-spec qualified identifier callback for
845
824
  * multi-source consumers. When set, the helper emits the callback's return
@@ -936,6 +915,11 @@ export type ${type_name} = {
936
915
  * per-call callback wasn't enough; the import dance + dup-check was the
937
916
  * real boilerplate.
938
917
  *
918
+ * @throws Error if two sources contain the same method name (same-method
919
+ * detection is the consumer's primary debugging signal). Also throws if
920
+ * the returned `qualify_spec` is later called with a method not registered
921
+ * in any source.
922
+ *
939
923
  * @example
940
924
  * ```ts
941
925
  * const sources = [
@@ -956,9 +940,6 @@ export type ${type_name} = {
956
940
  * });
957
941
  * };
958
942
  * ```
959
- *
960
- * @throws if two sources contain the same method name (same-method detection
961
- * is the consumer's primary debugging signal).
962
943
  */
963
944
  export const create_namespace_qualifier = (sources, imports) => {
964
945
  const method_to_ns = new Map();
@@ -33,22 +33,60 @@ export declare class ActionEvent<TMethod extends string = string, TPhase extends
33
33
  };
34
34
  constructor(environment: ActionEventEnvironment, spec: ActionSpecUnion, data: ActionEventDataUnion<TMethod>);
35
35
  toJSON(): ActionEventDataUnion<TMethod>;
36
+ /**
37
+ * Subscribe a listener fired on every `data` transition.
38
+ *
39
+ * @param listener - called with `(new_data, old_data, event)` after each mutation
40
+ * @returns unsubscribe function
41
+ * @mutates this - adds `listener` to the internal observer set
42
+ */
36
43
  observe(listener: ActionEventChangeObserver<TMethod>): () => void;
44
+ /**
45
+ * Replace the event's `data` and notify observers.
46
+ *
47
+ * @mutates this - sets `data` and fires every registered observer in insertion order
48
+ */
37
49
  set_data(new_data: ActionEventDataUnion<TMethod>): void;
38
50
  /**
39
51
  * Parse input data according to the action's schema.
52
+ *
53
+ * @returns `this` for chaining with `handle_async` / `handle_sync`
54
+ * @mutates this - transitions step from `initial` to `parsed` (or to
55
+ * `failed` / `receive_error` on validation or response error)
56
+ * @throws Error if called from a step other than `initial`
40
57
  */
41
58
  parse(): this;
42
59
  /**
43
60
  * Execute the handler for the current phase.
61
+ *
62
+ * @mutates this - transitions step `parsed → handling → handled`, or to
63
+ * `failed` / `send_error` / `receive_error` on handler throw. No-op
64
+ * when already `failed`.
65
+ * @throws Error if called from a step other than `parsed` (or `failed`,
66
+ * which no-ops). Handler-thrown `ThrownJsonrpcError` is caught and
67
+ * routed through error phases; other throws are wrapped as
68
+ * `internal_error`.
44
69
  */
45
70
  handle_async(): Promise<void>;
46
71
  /**
47
- * Execute handler synchronously (only for sync local_call actions).
72
+ * Execute handler synchronously (only for sync `local_call` actions).
73
+ *
74
+ * @mutates this - transitions step `parsed → handling → handled`, or to
75
+ * `failed` on handler throw. No-op when already `failed`.
76
+ * @throws Error if the spec is not a sync `local_call`, or if called
77
+ * from a step other than `parsed` (or `failed`, which no-ops).
48
78
  */
49
79
  handle_sync(): void;
50
80
  /**
51
81
  * Transition to a new phase.
82
+ *
83
+ * @param phase - the next phase to transition into
84
+ * @mutates this - replaces `data` with a fresh phase-initial record,
85
+ * carrying forward `request` / `response` / `error` / `output` as
86
+ * appropriate for the kind/phase pair
87
+ * @throws Error if called from a step other than `handled` (or
88
+ * `failed`, which no-ops), or if the phase transition is illegal for
89
+ * the current phase
52
90
  */
53
91
  transition(phase: ActionEventPhase): void;
54
92
  is_complete(): boolean;
@@ -59,10 +97,15 @@ export declare class ActionEvent<TMethod extends string = string, TPhase extends
59
97
  }
60
98
  /**
61
99
  * Create an action event from a spec and initial input.
100
+ *
101
+ * @throws Error if `initial_phase` is omitted and the executor cannot
102
+ * initiate the action (per `spec.initiator`)
62
103
  */
63
104
  export declare const create_action_event: <TMethod extends string = string>(environment: ActionEventEnvironment, spec: ActionSpecUnion, input: unknown, initial_phase?: ActionEventPhase) => ActionEvent<TMethod>;
64
105
  /**
65
106
  * Reconstruct an action event from serialized JSON data.
107
+ *
108
+ * @throws Error if the JSON's `method` field has no spec registered in `environment`
66
109
  */
67
110
  export declare const create_action_event_from_json: <TMethod extends string = string>(json: ActionEventDataUnion<TMethod>, environment: ActionEventEnvironment) => ActionEvent<TMethod>;
68
111
  export declare const parse_action_event: (raw_json: unknown, environment: ActionEventEnvironment) => ActionEvent;
@@ -1 +1 @@
1
- {"version":3,"file":"action_event.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/actions/action_event.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAC,gBAAgB,EAAc,eAAe,EAAC,MAAM,kBAAkB,CAAC;AAWpF,OAAO,KAAK,EACX,cAAc,EACd,sBAAsB,EACtB,mBAAmB,EAEnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAC,sBAAsB,EAAE,eAAe,EAAC,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAkB,KAAK,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAclF,MAAM,MAAM,yBAAyB,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,IAAI,CACxE,QAAQ,EAAE,oBAAoB,CAAC,OAAO,CAAC,EACvC,QAAQ,EAAE,oBAAoB,CAAC,OAAO,CAAC,EACvC,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,KACvB,IAAI,CAAC;AAEV;;GAEG;AACH,qBAAa,WAAW,CACvB,OAAO,SAAS,MAAM,GAAG,MAAM,EAC/B,MAAM,SAAS,gBAAgB,GAAG,gBAAgB,EAClD,KAAK,SAAS,eAAe,GAAG,eAAe;;IAK/C,QAAQ,CAAC,WAAW,EAAE,sBAAsB,CAAC;IAC7C;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG;QAAC,MAAM,EAAE,OAAO,CAAA;KAAC,CAAC;IAEnD,IAAI,IAAI,IAAI,oBAAoB,CAAC,OAAO,CAAC,GAAG;QA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