@fuzdev/fuz_app 0.184.0 → 0.185.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 (85) hide show
  1. package/dist/actions/CLAUDE.md +4 -1
  2. package/dist/actions/register_action_ws.d.ts +14 -7
  3. package/dist/actions/register_action_ws.d.ts.map +1 -1
  4. package/dist/actions/ws_socket_session.d.ts +17 -4
  5. package/dist/actions/ws_socket_session.d.ts.map +1 -1
  6. package/dist/actions/ws_socket_session.js +38 -6
  7. package/dist/auth/CLAUDE.md +7 -4
  8. package/dist/auth/audit_log_routes.d.ts +1 -1
  9. package/dist/auth/audit_log_routes.d.ts.map +1 -1
  10. package/dist/auth/audit_log_routes.js +3 -2
  11. package/dist/auth/cleanup.d.ts +34 -3
  12. package/dist/auth/cleanup.d.ts.map +1 -1
  13. package/dist/auth/cleanup.js +11 -3
  14. package/dist/http/CLAUDE.md +1 -1
  15. package/dist/http/pending_effects.d.ts +8 -4
  16. package/dist/http/pending_effects.d.ts.map +1 -1
  17. package/dist/http/route_spec.d.ts +3 -3
  18. package/dist/http/route_spec.d.ts.map +1 -1
  19. package/dist/realtime/audit_log_sse.d.ts +1 -1
  20. package/dist/realtime/sse.d.ts +2 -2
  21. package/dist/realtime/sse.d.ts.map +1 -1
  22. package/dist/realtime/sse_constants.d.ts +1 -1
  23. package/dist/realtime/sse_constants.js +1 -1
  24. package/dist/server/app_server.d.ts +59 -71
  25. package/dist/server/app_server.d.ts.map +1 -1
  26. package/dist/server/app_server.js +52 -60
  27. package/dist/server/shutdown_drain.d.ts +69 -0
  28. package/dist/server/shutdown_drain.d.ts.map +1 -0
  29. package/dist/server/shutdown_drain.js +77 -0
  30. package/dist/testing/CLAUDE.md +73 -41
  31. package/dist/testing/admin_integration.d.ts +2 -2
  32. package/dist/testing/admin_integration.d.ts.map +1 -1
  33. package/dist/testing/admin_integration.js +36 -20
  34. package/dist/testing/cross_backend/bootstrap_backend.d.ts +3 -1
  35. package/dist/testing/cross_backend/bootstrap_backend.d.ts.map +1 -1
  36. package/dist/testing/cross_backend/bootstrap_backend.js +5 -1
  37. package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts +10 -1
  38. package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts.map +1 -1
  39. package/dist/testing/cross_backend/create_dual_spawn_global_setup.js +33 -7
  40. package/dist/testing/cross_backend/in_process_setup.d.ts +1 -1
  41. package/dist/testing/cross_backend/in_process_setup.js +1 -1
  42. package/dist/testing/cross_backend/rpc_success_fixtures.d.ts.map +1 -1
  43. package/dist/testing/cross_backend/rpc_success_fixtures.js +2 -1
  44. package/dist/testing/cross_backend/spawn_backend.d.ts +14 -0
  45. package/dist/testing/cross_backend/spawn_backend.d.ts.map +1 -1
  46. package/dist/testing/cross_backend/spawn_backend.js +56 -8
  47. package/dist/testing/cross_backend/spine_suites.d.ts +17 -14
  48. package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
  49. package/dist/testing/cross_backend/spine_suites.js +33 -13
  50. package/dist/testing/cross_backend/standard.d.ts +18 -82
  51. package/dist/testing/cross_backend/standard.d.ts.map +1 -1
  52. package/dist/testing/cross_backend/standard.js +6 -21
  53. package/dist/testing/cross_backend/standard_auth.d.ts +74 -0
  54. package/dist/testing/cross_backend/standard_auth.d.ts.map +1 -0
  55. package/dist/testing/cross_backend/standard_auth.js +28 -0
  56. package/dist/testing/cross_backend/standard_bundle.d.ts +48 -0
  57. package/dist/testing/cross_backend/standard_bundle.d.ts.map +1 -0
  58. package/dist/testing/cross_backend/standard_bundle.js +43 -0
  59. package/dist/testing/cross_backend/testing_reset_actions.d.ts +11 -0
  60. package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
  61. package/dist/testing/cross_backend/testing_reset_actions.js +13 -0
  62. package/dist/testing/cross_backend/testing_server_bun.d.ts.map +1 -1
  63. package/dist/testing/cross_backend/testing_server_bun.js +5 -4
  64. package/dist/testing/cross_backend/testing_server_core.d.ts +16 -3
  65. package/dist/testing/cross_backend/testing_server_core.d.ts.map +1 -1
  66. package/dist/testing/cross_backend/testing_server_core.js +20 -4
  67. package/dist/testing/cross_backend/ts_spine_backend_config.d.ts +6 -2
  68. package/dist/testing/cross_backend/ts_spine_backend_config.d.ts.map +1 -1
  69. package/dist/testing/cross_backend/ts_spine_backend_config.js +7 -3
  70. package/dist/testing/error_coverage.d.ts +5 -0
  71. package/dist/testing/error_coverage.d.ts.map +1 -1
  72. package/dist/testing/error_coverage.js +2 -1
  73. package/dist/testing/integration.d.ts +4 -20
  74. package/dist/testing/integration.d.ts.map +1 -1
  75. package/dist/testing/integration.js +49 -79
  76. package/dist/testing/integration_helpers.d.ts +16 -0
  77. package/dist/testing/integration_helpers.d.ts.map +1 -1
  78. package/dist/testing/integration_helpers.js +29 -1
  79. package/dist/testing/middleware_gate_probes.d.ts +55 -1
  80. package/dist/testing/middleware_gate_probes.d.ts.map +1 -1
  81. package/dist/testing/middleware_gate_probes.js +69 -3
  82. package/dist/testing/test_app.d.ts +3 -2
  83. package/dist/testing/test_app.d.ts.map +1 -1
  84. package/dist/testing/test_app.js +5 -4
  85. package/package.json +1 -1
@@ -523,7 +523,10 @@ The rules a caller would miss:
523
523
  admits. A dead credential is closed `WS_CLOSE_SESSION_REVOKED`, a lost role
524
524
  `WS_CLOSE_PERMISSION_REVOKED`, a failed re-read `WS_CLOSE_INTERNAL_ERROR` —
525
525
  fail closed. A refused socket evicts nothing and runs neither hook
526
- (../../../docs/security.md §Connection Admission).
526
+ (../../../docs/security.md §Connection Admission). The open — the re-read
527
+ and `on_socket_open` — is held on `deps.request_tracker`, so a shutdown
528
+ landing in it waits rather than closing the database under it
529
+ (`http/CLAUDE.md` §Pending Effects).
527
530
  - **Frames wait for admission and `on_socket_open`.** Frames arriving earlier
528
531
  are queued (bounded; overflow closes 1008) and dispatched in order after, so
529
532
  an `on_socket_open` hook that awaits `registry.request_connection` on its
@@ -274,13 +274,20 @@ export interface RegisterActionWsOptions {
274
274
  */
275
275
  on_effect_error?: (error: unknown, context: EffectErrorContext) => void;
276
276
  /**
277
- * Where each message accepted for dispatch is held, from acceptance until
278
- * its handler has returned and its effect flush — run after the reply is
279
- * sent, so nothing else holds it — has settled. `create_app_server` passes
280
- * its view of `deps.request_tracker` (`create_request_tracker_view`), which
281
- * its HTTP requests share, so `AppServer.close` waits for a message as it
282
- * does a request. A message the tracker refuses (once closed) is answered
283
- * `service_unavailable` (`WS_SHUTTING_DOWN_MESSAGE`) and never dispatched.
277
+ * Where each socket's open and each message accepted for dispatch are
278
+ * held. The open — admission's credential re-read, `on_socket_open`, and
279
+ * the start of the queued frames' dispatch — is held from before the
280
+ * pending registration until it ends, on every path; a message from
281
+ * acceptance until its handler has returned and its effect flush — run
282
+ * after the reply is sent, so nothing else holds it — has settled.
283
+ * `create_app_server` passes its view of `deps.request_tracker`
284
+ * (`create_request_tracker_view`), which its HTTP requests share, so
285
+ * `AppServer.close` waits for an upgrade's re-read and a message as it
286
+ * does a request, and the database never closes under either within the
287
+ * drain bound. An open the closed tracker refuses holds nothing (under
288
+ * `AppServer.close` the registry closed first, so it is born closed); a message it refuses is
289
+ * answered `service_unavailable` (`WS_SHUTTING_DOWN_MESSAGE`) and never
290
+ * dispatched.
284
291
  * Required, so it can't be forgotten: a hand mount passes
285
292
  * `deps.request_tracker` (or one it drains before closing the database), or
286
293
  * `null` when it owns its shutdown otherwise (a test harness).
@@ -1 +1 @@
1
- {"version":3,"file":"register_action_ws.d.ts","sourceRoot":"","sources":["../../src/lib/actions/register_action_ws.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAU,KAAK,MAAM,IAAI,UAAU,EAAE,MAAM,yBAAy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tC,MAAM,WAAW,sBAAsB;IACtC,wEAAwE;IACxE,QAAQ,EAAE,kBAAkB,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,uBAAuB,KAAG,sBAyLrE,CAAC"}
@@ -67,9 +67,22 @@
67
67
  * `close_all_connections`) a refusal is `WS_CLOSE_GOING_AWAY` instead, so the
68
68
  * client reconnects rather than treating its credential as revoked: an upgrade
69
69
  * pending at the close-all is closed by it — and its abort makes the refusal
70
- * that follows the re-read send nothing more, even when the database closed
71
- * under that re-read — and one that registers after it is born closed and
72
- * skips the re-read (`ConnectionRegistry` module doc, "Shutdown").
70
+ * that follows the re-read send nothing more — and one that registers after
71
+ * it is born closed and skips the re-read (`ConnectionRegistry` module doc,
72
+ * "Shutdown").
73
+ *
74
+ * The open — admission with its re-read, `on_socket_open`, and the start of
75
+ * the queued frames' dispatch — is held on the `request_tracker` from before
76
+ * the pending registration until each queued frame has taken its own hold,
77
+ * on every path out (a refusal, a failed re-read, a hook that throws). So
78
+ * `AppServer.close` waits for a re-read the shutdown lands in, and the
79
+ * database closes after it, not under it — as the Rust spine's upgrade hold
80
+ * does, though that one lasts through the socket's close write
81
+ * (`http/CLAUDE.md` §Pending Effects). An `on_socket_open` that never returns holds
82
+ * the shutdown to `shutdown_drain_timeout_ms`; past that bound a re-read the
83
+ * closing database fails is still refused with nothing more sent. A tracker
84
+ * already closed holds nothing: under `AppServer.close` the registry closed
85
+ * first, so such an upgrade is born closed.
73
86
  *
74
87
  * Frames that arrive before admission are queued, not dispatched: nothing runs
75
88
  * on a credential that has not been re-read. They dispatch in arrival order
@@ -290,7 +303,7 @@ export interface WsSocketEndpoint {
290
303
  notification_sender: NotificationSender;
291
304
  /** Called when an eager pending effect of a frame's action rejects; `undefined` for none. */
292
305
  on_effect_error: ((error: unknown, context: EffectErrorContext) => void) | undefined;
293
- /** Where each message accepted for dispatch is held until its flush settles; `null` for nowhere. */
306
+ /** Where each socket's open (admission, `on_socket_open`) and each message accepted for dispatch are held, a message until its flush settles; `null` for nowhere. */
294
307
  request_tracker: RequestTracker | null;
295
308
  /** Roles the endpoint's upgrade is gated on; empty for an ungated endpoint. */
296
309
  required_roles: ReadonlyArray<RoleName>;
@@ -1 +1 @@
1
- {"version":3,"file":"ws_socket_session.d.ts","sourceRoot":"","sources":["../../src/lib/actions/ws_socket_session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAKN,KAAK,YAAY,EACjB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAEN,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AASnE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAsBnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAKvF;;;;;;;;;;;;;;;;GAgBG;AAC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AAC;IACtC,yEAAyE;IACzE,cAAc,EAAE,CAAC,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;IAC/E,kGAAkG;IAClG,eAAe,EAAE,CAAC,CAAC,GAAG,EAAE,kBAAkB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;IACjF,iEAAiE;IACjE,sBAAsB,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3C,2EAA2E;IAC3E,2BAA2B,EAAE,WAAW,GAAG,IAAI,CAAC;IAChD,oEAAoE;IACpE,mBAAmB,EAAE,kBAAkB,CAAC;IACxC,6FAA6F;IAC7F,eAAe,EAAE,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACrF,qKAAqK;IACrK,eAAe,EAAE,cAAc,GAAG,IAAI,CAAC;IACvC,+EAA+E;IAC/E,cAAc,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;CACxC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC/B,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,mGAAmG;IACnG,cAAc,EAAE;QAAE,eAAe,EAAE,cAAc,GAAG,IAAI,CAAA;KAAE,GAAG,SAAS,CAAC;IACvE;;;;OAIG;IACH,QAAQ,EAAE,YAAY,CAAC;IACvB,gGAAgG;IAChG,eAAe,EAAE,cAAc,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,GACnC,UAAU,gBAAgB,EAC1B,SAAS,eAAe,KACtB,QAsrBF,CAAC"}
@@ -67,9 +67,22 @@
67
67
  * `close_all_connections`) a refusal is `WS_CLOSE_GOING_AWAY` instead, so the
68
68
  * client reconnects rather than treating its credential as revoked: an upgrade
69
69
  * pending at the close-all is closed by it — and its abort makes the refusal
70
- * that follows the re-read send nothing more, even when the database closed
71
- * under that re-read — and one that registers after it is born closed and
72
- * skips the re-read (`ConnectionRegistry` module doc, "Shutdown").
70
+ * that follows the re-read send nothing more — and one that registers after
71
+ * it is born closed and skips the re-read (`ConnectionRegistry` module doc,
72
+ * "Shutdown").
73
+ *
74
+ * The open — admission with its re-read, `on_socket_open`, and the start of
75
+ * the queued frames' dispatch — is held on the `request_tracker` from before
76
+ * the pending registration until each queued frame has taken its own hold,
77
+ * on every path out (a refusal, a failed re-read, a hook that throws). So
78
+ * `AppServer.close` waits for a re-read the shutdown lands in, and the
79
+ * database closes after it, not under it — as the Rust spine's upgrade hold
80
+ * does, though that one lasts through the socket's close write
81
+ * (`http/CLAUDE.md` §Pending Effects). An `on_socket_open` that never returns holds
82
+ * the shutdown to `shutdown_drain_timeout_ms`; past that bound a re-read the
83
+ * closing database fails is still refused with nothing more sent. A tracker
84
+ * already closed holds nothing: under `AppServer.close` the registry closed
85
+ * first, so such an upgrade is born closed.
73
86
  *
74
87
  * Frames that arrive before admission are queued, not dispatched: nothing runs
75
88
  * on a credential that has not been re-read. They dispatch in arrival order
@@ -389,9 +402,10 @@ export const create_ws_socket_events = (endpoint, upgrade) => {
389
402
  recheck = await recheck_admission({ db }, { resolved, request_context: upgrade_context, required_roles });
390
403
  }
391
404
  catch (error) {
392
- // fail closed — never admitted unchecked. During shutdown the
393
- // database may close under the re-read; that is the shutdown's
394
- // refusal, not a failure.
405
+ // fail closed — never admitted unchecked. A shutdown that gave
406
+ // up on the held re-read at its drain bound may close the
407
+ // database under it; that is the shutdown's refusal, not a
408
+ // failure.
395
409
  if (registry.is_closing()) {
396
410
  log.info('ws upgrade admission: re-check ended by the shutdown', error);
397
411
  }
@@ -438,7 +452,25 @@ export const create_ws_socket_events = (endpoint, upgrade) => {
438
452
  was_admitted = true;
439
453
  return connection_id;
440
454
  };
455
+ // Admit the socket, run `on_socket_open`, and start the queued frames'
456
+ // dispatch, held on the tracker throughout (module doc, "Admission: the
457
+ // revocation race").
441
458
  const open_socket = async (ws) => {
459
+ // Synchronously, before the pending registration: a shutdown that
460
+ // starts while the re-read or the hook runs waits for both, so the
461
+ // database never closes under them. A closed tracker answers `null`
462
+ // and holds nothing — under `AppServer.close` the registry closed
463
+ // first, so the registration below is born closed and reads nothing.
464
+ const held = request_tracker?.accept() ?? null;
465
+ try {
466
+ await admit_and_open(ws);
467
+ }
468
+ finally {
469
+ // each queued frame's dispatch has taken its own hold by now
470
+ held?.finish(null);
471
+ }
472
+ };
473
+ const admit_and_open = async (ws) => {
442
474
  const connection_id = await admit_upgrade(ws);
443
475
  if (connection_id === null)
444
476
  return;
@@ -550,8 +550,11 @@ a call. Caps and limits are on the spec modules.
550
550
  `auth/cleanup.ts`, twin of the Rust `fuz_auth::auth_cleanup`:
551
551
  `run_auth_cleanup` (one pass — the session sweep, which closes the swept
552
552
  sessions' connections, then the offer-expiry sweep, audited exactly once)
553
- and `start_auth_cleanup` (scheduled on `start_periodic`, `periodic.ts`). Off
554
- by default in `create_app_server`; run it in the process that holds the
555
- connections, never from another process against a live server's database.
556
- The rules are the module TSDoc and `periodic.ts`'s (whose `stop()` differs
553
+ and `start_auth_cleanup` (scheduled on `start_periodic`, `periodic.ts`).
554
+ `create_app_server`'s `auth_cleanup` is required, an `AuthCleanupSchedule`
555
+ (`{every_ms}` or `'off'`, twin of the Rust `fuz_auth::AuthCleanupSchedule`);
556
+ `AppServer.close` waits for a pass in progress within its drain bound and
557
+ counts one still running at the bound (`ShutdownDrainGivenUp.upkeep`). Run it
558
+ in the process that holds the connections, never from another process
559
+ against a live server's database. The rules are the module TSDoc and `periodic.ts`'s (whose `stop()` differs
557
560
  from the Rust shutdown); wiring is ../../../docs/usage.md §Auth cleanup.
@@ -31,7 +31,7 @@ export interface AuditLogRouteOptions {
31
31
  registry: SseRegistry<SseNotification>;
32
32
  log: Logger;
33
33
  /**
34
- * Each stream's keep-alive interval (`SseResponseOptions.keep_alive_ms`)
34
+ * Each stream's keep-alive interval (`SseStreamOptions.keep_alive_ms`)
35
35
  * — a test server shortens it. Validated here, at route creation.
36
36
  *
37
37
  * @default SSE_KEEP_ALIVE_INTERVAL_MS
@@ -1 +1 @@
1
- {"version":3,"file":"audit_log_routes.d.ts","sourceRoot":"","sources":["../../src/lib/auth/audit_log_routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGtD,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAU7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAS/D,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACpC,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE;QACR,QAAQ,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;QACvC,GAAG,EAAE,MAAM,CAAC;QACZ;;;;;WAKG;QACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC9B,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,eAAO,MAAM,4BAA4B,GAAI,UAAU,oBAAoB,KAAG,KAAK,CAAC,SAAS,CA6H5F,CAAC"}
1
+ {"version":3,"file":"audit_log_routes.d.ts","sourceRoot":"","sources":["../../src/lib/auth/audit_log_routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGtD,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAU7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAS/D,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACpC,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE;QACR,QAAQ,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;QACvC,GAAG,EAAE,MAAM,CAAC;QACZ;;;;;WAKG;QACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC9B,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,eAAO,MAAM,4BAA4B,GAAI,UAAU,oBAAoB,KAAG,KAAK,CAAC,SAAS,CA8H5F,CAAC"}
@@ -141,8 +141,9 @@ export const create_audit_log_route_specs = (options) => {
141
141
  }
142
142
  };
143
143
  const refusal = await reread().catch((error) => {
144
- // the shutdown closed the registration and then the database
145
- // under the re-read: the answer is the shutdown's — admission
144
+ // a shutdown that gave up on this request at its drain bound may
145
+ // have closed the database under the re-read: the answer is the
146
+ // shutdown's — admission
146
147
  // below refuses, since a closing registry admits nothing —
147
148
  // not a failure
148
149
  if (registry.closing) {
@@ -83,7 +83,11 @@
83
83
  * that, so the standard assembly is one option:
84
84
  *
85
85
  * ```ts
86
- * const server = await create_app_server({backend, auth_cleanup: true, ...});
86
+ * const server = await create_app_server({
87
+ * backend,
88
+ * auth_cleanup: {every_ms: DEFAULT_AUTH_CLEANUP_INTERVAL_MS},
89
+ * ...
90
+ * });
87
91
  * // on shutdown: stops the schedule, then closes the database
88
92
  * await server.close();
89
93
  * ```
@@ -103,7 +107,10 @@
103
107
  * token is cancelled; a promise cannot be dropped, so `stop` ends the schedule
104
108
  * at once and its promise resolves when the pass in progress — if there is
105
109
  * one — has finished. Awaiting it before closing the database lets that pass
106
- * end on a live pool rather than fail on a closed one.
110
+ * end on a live pool rather than fail on a closed one. `AppServer.close`
111
+ * waits for it within its drain bound, as the Rust shutdown joins its upkeep,
112
+ * and counts a pass still running at the bound as given up on
113
+ * (`ShutdownDrainGivenUp.upkeep`).
107
114
  *
108
115
  * @module
109
116
  */
@@ -221,6 +228,29 @@ export declare const cleanup_expired_role_grant_offers: (deps: AuthCleanupDeps)
221
228
  * @throws Error re-thrown from the first sweep that fails (no per-sweep isolation here)
222
229
  */
223
230
  export declare const run_auth_cleanup: (deps: AuthCleanupDeps) => Promise<AuthCleanupResult>;
231
+ /**
232
+ * Whether a server runs the auth cleanup beside itself, and how often —
233
+ * `create_app_server`'s `auth_cleanup` option.
234
+ *
235
+ * A required choice, with no default: every server names it, so none gets or
236
+ * loses the sweeps without writing it out.
237
+ *
238
+ * - `{every_ms}` — `start_auth_cleanup` on that interval: a pass as the
239
+ * server finishes assembly, then one per `every_ms`
240
+ * (`DEFAULT_AUTH_CLEANUP_INTERVAL_MS` unless the server has a reason to
241
+ * differ) — what a production server runs. Must be a positive finite
242
+ * number no greater than `PERIODIC_INTERVAL_MS_MAX`.
243
+ * - `'off'` — no cleanup: an in-process test harness (a background pass
244
+ * deletes rows and writes audit rows mid-test), a test server held to a
245
+ * spine that schedules none, or a process whose sweeps run elsewhere
246
+ * (`run_auth_cleanup` on a schedule of its own).
247
+ *
248
+ * Twin of the Rust `fuz_auth::AuthCleanupSchedule` (`Every(Duration)` /
249
+ * `Off`).
250
+ */
251
+ export type AuthCleanupSchedule = {
252
+ every_ms: number;
253
+ } | 'off';
224
254
  /** Options for `start_auth_cleanup`. */
225
255
  export interface AuthCleanupScheduleOptions {
226
256
  /**
@@ -236,7 +266,8 @@ export interface AuthCleanupScheduleOptions {
236
266
  *
237
267
  * The auth surface's upkeep in one call — start it once migrations have run
238
268
  * and stop it before the database closes (see the module doc's § Scheduling).
239
- * `create_app_server`'s `auth_cleanup` option does both.
269
+ * `create_app_server`'s `auth_cleanup` option (an `AuthCleanupSchedule`)
270
+ * does both.
240
271
  *
241
272
  * Built on `start_periodic`, which fixes the loop's rules: the startup pass
242
273
  * starts before this returns, passes never overlap, a slow pass delays the
@@ -1 +1 @@
1
- {"version":3,"file":"cleanup.d.ts","sourceRoot":"","sources":["../../src/lib/auth/cleanup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvD;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC,QAAiB,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,SAAS;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;;;OAOG;IACH,KAAK,EAAE,YAAY,CAAC;IACpB;;;;;;;;;OASG;IACH,iBAAiB,EAAE,gBAAgB,CAAC;CACpC;AAED,+FAA+F;AAC/F,MAAM,WAAW,iBAAiB;IACjC,8EAA8E;IAC9E,gBAAgB,EAAE,MAAM,CAAC;IACzB,6DAA6D;IAC7D,cAAc,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,wBAAwB,GAAU,MAAM,eAAe,KAAG,OAAO,CAAC,MAAM,CAwCpF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,iCAAiC,GAAU,MAAM,eAAe,KAAG,OAAO,CAAC,MAAM,CAgC7F,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,gBAAgB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ACH,eAAO,MAAM,wBAAwB,GAAU,MAAM,eAAe,KAAG,OAAO,CAAC,MAAM,CAwCpF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,iCAAiC,GAAU,MAAM,eAAe,KAAG,OAAO,CAAC,MAAM,CAgC7F,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,gBAAgB,GAAU,MAAM,eAAe,KAAG,OAAO,CAAC,iBAAiB,CAIvF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,KAAK,CAAC;AAE/D,wCAAwC;AACxC,MAAM,WAAW,0BAA0B;IAC1C;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,kBAAkB,GAC9B,MAAM,eAAe,EACrB,UAAS,0BAA+B,KACtC,YAWD,CAAC"}
@@ -83,7 +83,11 @@
83
83
  * that, so the standard assembly is one option:
84
84
  *
85
85
  * ```ts
86
- * const server = await create_app_server({backend, auth_cleanup: true, ...});
86
+ * const server = await create_app_server({
87
+ * backend,
88
+ * auth_cleanup: {every_ms: DEFAULT_AUTH_CLEANUP_INTERVAL_MS},
89
+ * ...
90
+ * });
87
91
  * // on shutdown: stops the schedule, then closes the database
88
92
  * await server.close();
89
93
  * ```
@@ -103,7 +107,10 @@
103
107
  * token is cancelled; a promise cannot be dropped, so `stop` ends the schedule
104
108
  * at once and its promise resolves when the pass in progress — if there is
105
109
  * one — has finished. Awaiting it before closing the database lets that pass
106
- * end on a live pool rather than fail on a closed one.
110
+ * end on a live pool rather than fail on a closed one. `AppServer.close`
111
+ * waits for it within its drain bound, as the Rust shutdown joins its upkeep,
112
+ * and counts a pass still running at the bound as given up on
113
+ * (`ShutdownDrainGivenUp.upkeep`).
107
114
  *
108
115
  * @module
109
116
  */
@@ -267,7 +274,8 @@ export const run_auth_cleanup = async (deps) => {
267
274
  *
268
275
  * The auth surface's upkeep in one call — start it once migrations have run
269
276
  * and stop it before the database closes (see the module doc's § Scheduling).
270
- * `create_app_server`'s `auth_cleanup` option does both.
277
+ * `create_app_server`'s `auth_cleanup` option (an `AuthCleanupSchedule`)
278
+ * does both.
271
279
  *
272
280
  * Built on `start_periodic`, which fixes the loop's rules: the startup pass
273
281
  * starts before this returns, passes never overlap, a slow pass delays the
@@ -378,7 +378,7 @@ The rules a caller would miss:
378
378
  - **Defer, never schedule.** A thunk, not `Promise.resolve().then(fn)`: a microtask would run before the wrapping `COMMIT` resumes and announce state that may roll back.
379
379
  - **Discard on rollback, at the dispatch site.** Both dispatch sites (`http/route_spec.ts`, `actions/perform_action.ts`) wrap the handler in `dispatch_with_post_commit_rollback`, which truncates the deferred queue on a throw. A `transaction: false` handler that opens its own transaction (`/login`, `/password`, signup, bootstrap) runs it through `transaction_with_post_commit_rollback`, which discards what that transaction queued even when the handler catches the failure and answers normally. The eager queue is never truncated.
380
380
  - **Drain at the outer flush.** `flush_request_effects` is the one flush: the HTTP middleware in `server/app_server.ts` (awaited before the response under `await_pending_effects: true`, else left running) and the per-message WS flush (awaited after the reply is sent). It invokes the deferred thunks before awaiting the eager writes, so a connection close never waits behind a slow audit INSERT, and wraps each thunk in its own `try/catch`, so one failure can't starve its siblings. Eager rejections go to the log and `on_effect_error` (`{transport, method, path}`).
381
- - **Held from acceptance.** Every HTTP request and every WS message accepted for dispatch is held on the backend's one `RequestTracker` (`AppDeps.request_tracker`; `register_action_ws`'s `request_tracker` for a hand mount) from acceptance until its handler has returned and its flush has settled (`accept()` → `AcceptedRequest.finish(flush)`). `AppServer.close` waits for every held request, then the audit emitter's writes, repeating until both are empty, within `shutdown_drain_timeout_ms` — a handler still running when the close starts is waited for, then its flush (a WS handler's `signal` is aborted by the socket close first). Once it starts draining, the server's view of the tracker (`create_request_tracker_view`, closed by `close()`) refuses what arrives: an HTTP request answers 503 `service_unavailable` (the failed-checkout shape), and a WS message — reachable only on a socket the close-all didn't end (a hand mount) — the `service_unavailable` JSON-RPC error (`WS_SHUTTING_DOWN_MESSAGE`); the backend's tracker stays open for a later server. `_testing_drain_effects` waits only for the flushes (`drain_flushes`) and the audit writes, never a running handler: its own request is one, and its flush starts only after it answers. Never await `drain_inflight` — or `AppServer.close` — from inside a request: it waits on its own caller (`AppServer.close` until its bound). **Twin difference:** the Rust spine also waits for an HTTP request already dispatched, but at shutdown drops a WS message's dispatch still in its handler with its socket loop — it rolls back — while one whose commit has started finishes, its post-commit effects included; here every accepted message runs to completion and its reply is refused.
381
+ - **Held from acceptance.** Every HTTP request and every WS message accepted for dispatch is held on the backend's one `RequestTracker` (`AppDeps.request_tracker`; `register_action_ws`'s `request_tracker` for a hand mount) from acceptance until its handler has returned and its flush has settled (`accept()` → `AcceptedRequest.finish(flush)`). A WebSocket's open is held too, with no flush — admission's credential re-read, `on_socket_open`, and the start of the queued frames' dispatch (`finish(null)` on every path) — so a shutdown landing in a re-read waits for it rather than closing the database under it, as the Rust spine's upgrade hold does. `AppServer.close` waits for every held request, then the audit emitter's writes, repeating until both are empty, within `shutdown_drain_timeout_ms` — a handler still running when the close starts is waited for, then its flush (a WS handler's `signal` is aborted by the socket close first). Once it starts draining, the server's view of the tracker (`create_request_tracker_view`, closed by `close()`) refuses what arrives: an HTTP request answers 503 `service_unavailable` (the failed-checkout shape), and a WS message — reachable only on a socket the close-all didn't end (a hand mount) — the `service_unavailable` JSON-RPC error (`WS_SHUTTING_DOWN_MESSAGE`); the backend's tracker stays open for a later server. `_testing_drain_effects` waits only for the flushes (`drain_flushes`) and the audit writes, never a running handler: its own request is one, and its flush starts only after it answers. Never await `drain_inflight` — or `AppServer.close` — from inside a request: it waits on its own caller (`AppServer.close` until its bound). **Twin difference:** the Rust spine also waits for an HTTP request already dispatched, but at shutdown drops a WS message's dispatch still in its handler with its socket loop — it rolls back — while one whose commit has started finishes, its post-commit effects included; here every accepted message runs to completion and its reply is refused. The Rust upgrade hold (`ConnectionRegistry::hold_upgrade`) lasts the whole upgraded future, so its shutdown also waits for each socket's close (a refusal's included) to be written; here the hold ends with the open, and the close-all's frames are not waited for.
382
382
 
383
383
  ```typescript
384
384
  emit_after_commit(ctx, () => ctx.notification_sender.send_to_account(account_id, msg));
@@ -199,10 +199,14 @@ export declare const flush_request_effects: (pending_effects: ReadonlyArray<Prom
199
199
  * Every request the server accepted — an HTTP request, a WS message accepted
200
200
  * for dispatch — held from acceptance until its handler has returned and its
201
201
  * effect flush has settled, so `AppServer.close` can wait for both before the
202
- * database closes. One tracker per backend (`AppDeps.request_tracker`), shared
203
- * by every transport, so a request is held the same way whichever transport
204
- * accepted it. Its `drain_inflight` / `inflight_count` match `AuditEmitter`'s,
205
- * the other set the shutdown drain waits on.
202
+ * database closes. A WebSocket's open is held the same way, with no flush:
203
+ * from before its pending registration until its admission re-read,
204
+ * `on_socket_open`, and the start of its queued frames' dispatch are done
205
+ * (`actions/ws_socket_session.ts`). One tracker per backend
206
+ * (`AppDeps.request_tracker`), shared by every transport, so a request is
207
+ * held the same way whichever transport accepted it. Its `drain_inflight` /
208
+ * `inflight_count` match `AuditEmitter`'s, the other set the shutdown drain
209
+ * waits on.
206
210
  *
207
211
  * The flushes are held apart as well, for a drain that must not wait on a
208
212
  * running handler — `_testing_drain_effects`, whose own request is one: a
@@ -1 +1 @@
1
- {"version":3,"file":"pending_effects.d.ts","sourceRoot":"","sources":["../../src/lib/http/pending_effects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,sDAAsD;IACtD,SAAS,EAAE,MAAM,GAAG,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;CAC1B;AAED,+CAA+C;AAC/C,MAAM,WAAW,eAAe;IAC/B;;;;OAIG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;CAC9C;AAED,8CAA8C;AAC9C,eAAO,MAAM,sBAAsB,QAAO,cAkDzC,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,2BAA2B,GAAI,QAAQ,cAAc,KAAG,cAYpE,CAAC"}
@@ -24,7 +24,7 @@ import { type RestErrorDef, type REST_AUTHENTICATION_REQUIRED, type REST_CREDENT
24
24
  import type { RateLimitKey } from '../rate_limiter.js';
25
25
  import type { MiddlewareSpec } from './middleware_spec.js';
26
26
  import { type ReadonlyJson, type RouteFailOf, type RouteOk, type RouteRaw, type RouteRawBody, type RouteResult, type RouteSse } from './route_result.js';
27
- import type { OpenedSseStream, SseResponseOptions, SseStream } from '../realtime/sse.js';
27
+ import type { OpenedSseStream, SseStreamOptions, SseStream } from '../realtime/sse.js';
28
28
  import { type RouteAuth } from './auth_shape.js';
29
29
  import { type JsonBodyResult } from './json_text.js';
30
30
  import { type QueryPairsRead } from './request_target.js';
@@ -220,7 +220,7 @@ export interface RouteContext<TAuth extends RequestContext | null = RequestConte
220
220
  post_commit_effects: Array<() => void | Promise<void>>;
221
221
  }
222
222
  /** Options for `RouteContext.open_sse`. */
223
- export interface RouteOpenSseOptions extends SseResponseOptions {
223
+ export interface RouteOpenSseOptions extends SseStreamOptions {
224
224
  /**
225
225
  * Logger for the stream's serialization and `on_close` listener errors and
226
226
  * its outbound-overflow warning. Default: the `log` given `apply_route_specs`.
@@ -233,7 +233,7 @@ export interface RouteOpenSseOptions extends SseResponseOptions {
233
233
  * which `create_app_server` passes. Injected, so this module stays free of
234
234
  * `hono/streaming`.
235
235
  */
236
- export type RouteSseOpener = <T>(c: Context, log: Logger, options?: SseResponseOptions) => OpenedSseStream<T>;
236
+ export type RouteSseOpener = <T>(c: Context, log: Logger, options?: SseStreamOptions) => OpenedSseStream<T>;
237
237
  /**
238
238
  * Route handler function — receives the `RouteContext` and returns a result
239
239
  * (`route_ok`, `route_fail`, `route_raw`, `route_sse` in
@@ -1 +1 @@
1
- {"version":3,"file":"route_spec.d.ts","sourceRoot":"","sources":["../../src/lib/http/route_spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAW,IAAI,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAEtE,OAAO,EAEN,KAAK,SAAS,EAEd,KAAK,UAAU,EACf,KAAK,KAAK,EACV,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGtC,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAQ9B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAavD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAEN,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEzF,OAAO,EAGN,KAAK,SAAS,EACd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrE,OAAO,EAI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E,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B,KACC,qBA8BF,CAAC;AAuKF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,mBAAmB,GAAI,GAAG,OAAO,EAAE,UAAU,qBAAqB,KAAG,QAyBjF,CAAC;AAwOF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,KAAK,IAAI,EAAE,OAAO,KAAK,CAAC,cAAc,CAAC,KAAG,IAIhF,CAAC;AAsGF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,eAAO,MAAM,iBAAiB,GAC7B,KAAK,IAAI,EACT,OAAO,KAAK,CAAC,SAAS,CAAC,EACvB,qBAAqB,iBAAiB,EACtC,KAAK,MAAM,EACX,IAAI,EAAE,EACN,UAAU,sBAAsB,KAC9B,IAuKF,CAAC;AAeF,uCAAuC;AACvC,MAAM,WAAW,sBAAsB;IACtC,iHAAiH;IACjH,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC1B;AA4CD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,EAAE,OAAO,KAAK,CAAC,SAAS,CAAC,KAAG,KAAK,CAAC,SAAS,CAK3F,CAAC"}
@@ -170,7 +170,7 @@ export declare const create_audit_log_sse: (options: {
170
170
  */
171
171
  max_per_scope?: number | null;
172
172
  /**
173
- * Each stream's keep-alive interval (`SseResponseOptions.keep_alive_ms`), in
173
+ * Each stream's keep-alive interval (`SseStreamOptions.keep_alive_ms`), in
174
174
  * ms; `null` turns keep-alives off. A test server shortens it.
175
175
  *
176
176
  * @default SSE_KEEP_ALIVE_INTERVAL_MS
@@ -68,7 +68,7 @@ export interface SseNotification {
68
68
  params: unknown;
69
69
  }
70
70
  /** Options for `create_sse_stream`. */
71
- export interface SseResponseOptions {
71
+ export interface SseStreamOptions {
72
72
  /**
73
73
  * The account the stream belongs to, named in the warning logged when the
74
74
  * stream ends on its outbound budget.
@@ -124,7 +124,7 @@ export interface OpenedSseStream<T> {
124
124
  * @throws Error when `options.keep_alive_ms` is out of range
125
125
  * (`validate_sse_keep_alive_ms`)
126
126
  */
127
- export declare const create_sse_stream: <T = unknown>(c: Context, log: Logger, options?: SseResponseOptions) => OpenedSseStream<T>;
127
+ export declare const create_sse_stream: <T = unknown>(c: Context, log: Logger, options?: SseStreamOptions) => OpenedSseStream<T>;
128
128
  /** Spec for a push event — declares params schema, description, and channel. */
129
129
  export interface EventSpec {
130
130
  /** Event method name, used as the JSON-RPC notification `method`. */
@@ -1 +1 @@
1
- {"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../src/lib/realtime/sse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAYrE;;;;GAIG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,OAAO;IACrC;;;;OAIG;IACH,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IACxB,wBAAwB;IACxB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC/B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;CAChB;AAED,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,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ACvE,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B,GAAI,CAAC,SAAS,eAAe,EACrE,aAAa;IAAE,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,KAAK,IAAI,CAAA;CAAE,EAC9D,aAAa,KAAK,CAAC,SAAS,CAAC,EAC7B,KAAK,MAAM,KACT;IAAE,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,KAAK,IAAI,CAAA;CAmBjD,CAAC"}
@@ -37,7 +37,7 @@ export declare const SSE_KEEP_ALIVE_INTERVAL_MS = 15000;
37
37
  export declare const SSE_KEEP_ALIVE_INTERVAL_MS_MAX = 2147483647;
38
38
  /**
39
39
  * Throw unless `keep_alive_ms` is a valid keep-alive interval
40
- * (`SseResponseOptions.keep_alive_ms`):
40
+ * (`SseStreamOptions.keep_alive_ms`):
41
41
  * `undefined` (the default), `null` (off), or a positive number of ms up to
42
42
  * `SSE_KEEP_ALIVE_INTERVAL_MS_MAX`. Timers read anything else — zero, a
43
43
  * negative, `NaN`, `Infinity`, or past the max — as an interval of about
@@ -42,7 +42,7 @@ export const SSE_KEEP_ALIVE_INTERVAL_MS = 15_000;
42
42
  export const SSE_KEEP_ALIVE_INTERVAL_MS_MAX = 2_147_483_647;
43
43
  /**
44
44
  * Throw unless `keep_alive_ms` is a valid keep-alive interval
45
- * (`SseResponseOptions.keep_alive_ms`):
45
+ * (`SseStreamOptions.keep_alive_ms`):
46
46
  * `undefined` (the default), `null` (off), or a positive number of ms up to
47
47
  * `SSE_KEEP_ALIVE_INTERVAL_MS_MAX`. Timers read anything else — zero, a
48
48
  * negative, `NaN`, `Infinity`, or past the max — as an interval of about