@nifrajs/cli 5.15.1 → 5.17.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 (171) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +11 -0
  3. package/dist/build-provenance.d.ts +14 -0
  4. package/dist/build-provenance.d.ts.map +1 -0
  5. package/dist/build-provenance.js +82 -0
  6. package/dist/build-provenance.js.map +1 -0
  7. package/dist/check-diagnostics.d.ts +1 -0
  8. package/dist/check-diagnostics.d.ts.map +1 -1
  9. package/dist/check-diagnostics.js +4 -0
  10. package/dist/check-diagnostics.js.map +1 -1
  11. package/dist/check-scan.d.ts +1 -1
  12. package/dist/check-scan.d.ts.map +1 -1
  13. package/dist/check-scan.js +6 -5
  14. package/dist/check-scan.js.map +1 -1
  15. package/dist/check-timings.d.ts +11 -0
  16. package/dist/check-timings.d.ts.map +1 -0
  17. package/dist/check-timings.js +23 -0
  18. package/dist/check-timings.js.map +1 -0
  19. package/dist/check.d.ts +3 -0
  20. package/dist/check.d.ts.map +1 -1
  21. package/dist/check.js +68 -28
  22. package/dist/check.js.map +1 -1
  23. package/dist/cli.d.ts.map +1 -1
  24. package/dist/cli.js +26 -11
  25. package/dist/cli.js.map +1 -1
  26. package/dist/command-catalog.d.ts +3 -0
  27. package/dist/command-catalog.d.ts.map +1 -1
  28. package/dist/command-catalog.js +25 -4
  29. package/dist/command-catalog.js.map +1 -1
  30. package/dist/dev-feed-tool.d.ts.map +1 -1
  31. package/dist/dev-feed-tool.js +4 -2
  32. package/dist/dev-feed-tool.js.map +1 -1
  33. package/dist/doctor.d.ts +5 -2
  34. package/dist/doctor.d.ts.map +1 -1
  35. package/dist/doctor.js +27 -9
  36. package/dist/doctor.js.map +1 -1
  37. package/dist/internal/named-imports.d.ts +4 -0
  38. package/dist/internal/named-imports.d.ts.map +1 -0
  39. package/dist/internal/named-imports.js +19 -0
  40. package/dist/internal/named-imports.js.map +1 -0
  41. package/dist/internal/rewrite-kit.d.ts +35 -0
  42. package/dist/internal/rewrite-kit.d.ts.map +1 -0
  43. package/dist/internal/rewrite-kit.js +14 -0
  44. package/dist/internal/rewrite-kit.js.map +1 -0
  45. package/dist/internal/source-facts.d.ts +37 -0
  46. package/dist/internal/source-facts.d.ts.map +1 -1
  47. package/dist/internal/source-facts.js +115 -0
  48. package/dist/internal/source-facts.js.map +1 -1
  49. package/dist/levels-tool.d.ts +3 -0
  50. package/dist/levels-tool.d.ts.map +1 -1
  51. package/dist/levels-tool.js +28 -18
  52. package/dist/levels-tool.js.map +1 -1
  53. package/dist/mcp-exec.js +1 -1
  54. package/dist/mcp-exec.js.map +1 -1
  55. package/dist/mcp-http.js +1 -1
  56. package/dist/mcp-io.d.ts +3 -1
  57. package/dist/mcp-io.d.ts.map +1 -1
  58. package/dist/mcp-io.js +9 -2
  59. package/dist/mcp-io.js.map +1 -1
  60. package/dist/mcp-isolate.d.ts.map +1 -1
  61. package/dist/mcp-isolate.js +3 -1
  62. package/dist/mcp-isolate.js.map +1 -1
  63. package/dist/mcp-project-child.d.ts +10 -0
  64. package/dist/mcp-project-child.d.ts.map +1 -1
  65. package/dist/mcp-project-child.js +12 -1
  66. package/dist/mcp-project-child.js.map +1 -1
  67. package/dist/mcp-tool-meta.d.ts.map +1 -1
  68. package/dist/mcp-tool-meta.js +4 -1
  69. package/dist/mcp-tool-meta.js.map +1 -1
  70. package/dist/recipes/5.16.0.d.ts +12 -0
  71. package/dist/recipes/5.16.0.d.ts.map +1 -0
  72. package/dist/recipes/5.16.0.js +31 -0
  73. package/dist/recipes/5.16.0.js.map +1 -0
  74. package/dist/recipes/5.17.0.d.ts +10 -0
  75. package/dist/recipes/5.17.0.d.ts.map +1 -0
  76. package/dist/recipes/5.17.0.js +20 -0
  77. package/dist/recipes/5.17.0.js.map +1 -0
  78. package/dist/recipes/index.d.ts.map +1 -1
  79. package/dist/recipes/index.js +4 -0
  80. package/dist/recipes/index.js.map +1 -1
  81. package/dist/review.d.ts.map +1 -1
  82. package/dist/review.js +3 -0
  83. package/dist/review.js.map +1 -1
  84. package/dist/rules/codes.d.ts +3 -0
  85. package/dist/rules/codes.d.ts.map +1 -1
  86. package/dist/rules/codes.js +3 -0
  87. package/dist/rules/codes.js.map +1 -1
  88. package/dist/rules/explanations.d.ts.map +1 -1
  89. package/dist/rules/explanations.js +15 -0
  90. package/dist/rules/explanations.js.map +1 -1
  91. package/dist/rules/route-hooks.d.ts +10 -0
  92. package/dist/rules/route-hooks.d.ts.map +1 -0
  93. package/dist/rules/route-hooks.js +88 -0
  94. package/dist/rules/route-hooks.js.map +1 -0
  95. package/dist/rules/silent-sse.d.ts +9 -0
  96. package/dist/rules/silent-sse.d.ts.map +1 -0
  97. package/dist/rules/silent-sse.js +89 -0
  98. package/dist/rules/silent-sse.js.map +1 -0
  99. package/dist/rules/source-scan.d.ts +4 -2
  100. package/dist/rules/source-scan.d.ts.map +1 -1
  101. package/dist/rules/source-scan.js +3 -1
  102. package/dist/rules/source-scan.js.map +1 -1
  103. package/dist/source-rewrites.d.ts +2 -20
  104. package/dist/source-rewrites.d.ts.map +1 -1
  105. package/dist/source-rewrites.js +3 -13
  106. package/dist/source-rewrites.js.map +1 -1
  107. package/dist/typecheck-cache.d.ts +6 -0
  108. package/dist/typecheck-cache.d.ts.map +1 -0
  109. package/dist/typecheck-cache.js +37 -0
  110. package/dist/typecheck-cache.js.map +1 -0
  111. package/dist/typecheck-coverage.js +1 -1
  112. package/dist/typecheck-coverage.js.map +1 -1
  113. package/dist/typed-api-rewrites.d.ts +3 -0
  114. package/dist/typed-api-rewrites.d.ts.map +1 -0
  115. package/dist/typed-api-rewrites.js +253 -0
  116. package/dist/typed-api-rewrites.js.map +1 -0
  117. package/dist/upgrade.d.ts.map +1 -1
  118. package/dist/upgrade.js +3 -1
  119. package/dist/upgrade.js.map +1 -1
  120. package/dist/verification-gates.d.ts +23 -0
  121. package/dist/verification-gates.d.ts.map +1 -0
  122. package/dist/verification-gates.js +8 -0
  123. package/dist/verification-gates.js.map +1 -0
  124. package/dist/verification.d.ts +2 -0
  125. package/dist/verification.d.ts.map +1 -1
  126. package/dist/verification.js +6 -0
  127. package/dist/verification.js.map +1 -1
  128. package/dist/work-graph.d.ts +17 -8
  129. package/dist/work-graph.d.ts.map +1 -1
  130. package/dist/work-graph.js +157 -104
  131. package/dist/work-graph.js.map +1 -1
  132. package/docs/examples.json +2 -2
  133. package/docs/llms-full.txt +585 -51
  134. package/docs/types.json +293 -94
  135. package/package.json +12 -12
  136. package/src/build-provenance.ts +107 -0
  137. package/src/check-diagnostics.ts +5 -0
  138. package/src/check-scan.ts +7 -4
  139. package/src/check-timings.ts +27 -0
  140. package/src/check.ts +77 -32
  141. package/src/cli.ts +33 -12
  142. package/src/command-catalog.ts +28 -4
  143. package/src/dev-feed-tool.ts +8 -3
  144. package/src/doctor.ts +37 -18
  145. package/src/internal/named-imports.ts +26 -0
  146. package/src/internal/rewrite-kit.ts +49 -0
  147. package/src/internal/source-facts.ts +158 -0
  148. package/src/levels-tool.ts +27 -18
  149. package/src/mcp-exec.ts +1 -1
  150. package/src/mcp-http.ts +1 -1
  151. package/src/mcp-io.ts +13 -1
  152. package/src/mcp-isolate.ts +4 -0
  153. package/src/mcp-project-child.ts +19 -1
  154. package/src/mcp-tool-meta.ts +5 -1
  155. package/src/recipes/5.16.0.ts +41 -0
  156. package/src/recipes/5.17.0.ts +28 -0
  157. package/src/recipes/index.ts +4 -0
  158. package/src/review.ts +3 -0
  159. package/src/rules/codes.ts +3 -0
  160. package/src/rules/explanations.ts +15 -0
  161. package/src/rules/route-hooks.ts +112 -0
  162. package/src/rules/silent-sse.ts +95 -0
  163. package/src/rules/source-scan.ts +8 -3
  164. package/src/source-rewrites.ts +18 -52
  165. package/src/typecheck-cache.ts +33 -0
  166. package/src/typecheck-coverage.ts +1 -1
  167. package/src/typed-api-rewrites.ts +308 -0
  168. package/src/upgrade.ts +2 -1
  169. package/src/verification-gates.ts +9 -0
  170. package/src/verification.ts +8 -0
  171. package/src/work-graph.ts +200 -121
@@ -299,14 +299,14 @@ to full-stack later without a rewrite.
299
299
  **Throughput - the realistic case.** Router micro-benchmarks flatter Hono (a single compiled
300
300
  regex), but a real request also pays for middleware and validation,
301
301
  context, and serialization. In the current matrix Nifra runs **level with Elysia on Bun** -
302
- 100% of Elysia on `GET /users/:id` and
303
- 100% on the validated `POST` - and
304
- **level with Fastify on Node** (107% of Fastify on GET,
305
- 105% on the validated `POST`), with Elysia, Hono,
306
- and Express behind. On **Deno** it runs at 107% of Elysia on
307
- GET and 127% on the validated `POST`. In the realistic shape (security headers + CORS +
302
+ 99% of Elysia on `GET /users/:id` and
303
+ 99% on the validated `POST` - and
304
+ **level with Fastify on Node** (104% of Fastify on GET,
305
+ 101% on the validated `POST`), with Elysia, Hono,
306
+ and Express behind. On **Deno** it runs at 105% of Elysia on
307
+ GET and 125% on the validated `POST`. In the realistic shape (security headers + CORS +
308
308
  bearer auth + cookies + validated query/body + a ~2.4 KB JSON response, measured on
309
- **Bun** with `oha`) Nifra runs at **110% of Elysia on GET and 114% on POST**. Treat benchmark
309
+ **Bun** with `oha`) Nifra runs at **109% of Elysia on GET and 109% on POST**. Treat benchmark
310
310
  rows as same-run evidence, not a permanent law of nature.
311
311
 
312
312
  -
@@ -661,15 +661,16 @@ combined with `hydrate = false`: nothing would ever render the page.
661
661
 
662
662
  Export a `searchSchema` - any Standard Schema (valibot, zod, arktype) - and the URL
663
663
  query becomes typed and validated on both sides: the loader receives it as
664
- `ctx.search` and the component reads the same value with
665
- `useSearch<typeof searchSchema>()`. Invalid or hostile input fails closed to the
666
- schema's defaults (never a 500), and the value is derived identically on the server and on each
667
- client navigation - so a query-reading page hydrates with no mismatch and never touches
664
+ `ctx.search` and the page receives the same value as its `search` prop,
665
+ typed by the schema. A nested component reads it with `useSearch("/reports")`;
666
+ the argument names the route, and a pattern the generated route table does not hold is a
667
+ compile error. Invalid or hostile input fails closed to the schema's defaults (never a 500),
668
+ and the value is derived identically on the server and on each client navigation - so a
669
+ query-reading page hydrates with no mismatch and never touches
668
670
  `window.location.search` by hand.
669
671
 
670
672
  ```tsx
671
673
  // routes/reports.tsx - a typed, validated ?page=&sort= query.
672
- import { useSearch } from "@nifrajs/web-react/router"
673
674
  import * as v from "valibot" // any Standard Schema works (valibot, zod, arktype)
674
675
  import type { Route } from "./+types/reports"
675
676
 
@@ -679,10 +680,11 @@ export const searchSchema = v.object({
679
680
  sort: v.optional(v.picklist(["new", "top"]), "new"),
680
681
  })
681
682
 
682
- // The component reads the SAME value - SSR-correct, so page/sort hydrate with no mismatch and you
683
- // never parse window.location.search by hand.
684
- export default function Reports({ data }: Route.ComponentProps) {
685
- const { page, sort } = useSearch<typeof searchSchema>() // { page: number; sort: "new" | "top" }
683
+ // The page gets the SAME value as the search prop - SSR-correct, so page/sort hydrate with no mismatch
684
+ // and you never parse window.location.search by hand. A nested component reads it with
685
+ // useSearch("/reports").
686
+ export default function Reports({ data, search }: Route.ComponentProps) {
687
+ const { page, sort } = search // { page: number; sort: "new" | "top" }
686
688
  return <Pager page={page} sort={sort} rows={data.rows} />
687
689
  }
688
690
 
@@ -695,13 +697,37 @@ export async function loader({ search, api }: Route.LoaderArgs) {
695
697
  }
696
698
  ```
697
699
 
698
- Without a `searchSchema`, `ctx.search` and `useSearch()` are
699
- the raw parsed query (`Record<string, unknown>`). `useSearch` ships on
700
- every adapter (React, Preact, Vue, Solid, Svelte), each in that framework's shape - a value on
701
- React/Preact, a `Ref` on Vue, an accessor on Solid/Svelte. For imperative reads and
702
- writes of the raw query, `useSearchParams()` mirrors react-router's
700
+ Without a `searchSchema`, `ctx.search`, the `search` prop and
701
+ `useSearch` are the raw parsed query (`Record<string, unknown>`).
702
+ `useSearch` and `useParams` ship on every adapter (React, Preact, Vue,
703
+ Solid, Svelte), each in that framework's shape - a value on React/Preact, a `Ref` on
704
+ Vue, an accessor on Solid/Svelte. `useParams("/users/:id")` is that route's
705
+ params. For imperative reads and writes of the raw query, `useSearchParams()` mirrors
706
+ react-router's
703
707
  `[params, setParams]` tuple.
704
708
 
709
+ A link may leave out a field the schema defaults: `href` takes the schema's
710
+ _input_, where the page and the hooks read its _output_. A route without params
711
+ types `props.params` with no keys, so reading one is a compile error. Under
712
+ `nifra check`, `NF-C059` flags a hook that names another page's route
713
+ and `NF-C060` a cast to `Href`; a project made by
714
+ `create-nifra` also fails on `NF-C057`, a dead path string.
715
+
716
+ `.svelte` and `.vue` routes get their `searchSchema` typed too,
717
+ under `svelte-check` and `vue-tsc`; plain `tsc` cannot read those
718
+ files and falls back to the raw query. A Svelte page takes `search` from its props. A
719
+ Vue page reads it with `useSearch("/reports")`: `@vue/compiler-sfc`
720
+ cannot resolve `Route.ComponentProps` for `defineProps`.
721
+
722
+ Coming from 5.15 or earlier, `nifra upgrade 5.16.0 --write` rewrites
723
+ `useSearch<typeof searchSchema>()`, `useParams<T>()` and the
724
+ bare calls in a page file to name that page's route. A hook in a layout, a component shared
725
+ by several pages or a `.svelte` or `.vue` file is listed by line instead:
726
+ only its author knows the route it renders in, and a shared component takes the pattern as a
727
+ prop typed as the union of its routes. The same run rewrites the query cache and
728
+ `formFor` calls; see
729
+ upgrading nifra.
730
+
705
731
  To WRITE search, build the link with `href` and hand it to `useNavigate`:
706
732
  `navigate(href({ to: "/reports", search: { page: 2 } }))`. `href` and
707
733
  `rawHref` are exported by every adapter's router entry (
@@ -717,23 +743,34 @@ search shape are compile errors, and a changed `searchSchema` shows up as a
717
743
 
718
744
  Each param is encoded as one path segment, so a value such as `a/b` or
719
745
  `//evil.com` stays inside the segment and never changes where the link goes. A
720
- param that is missing, empty, `.`, `..` or an unpaired surrogate throws a
721
- `TypeError` naming it. `navigate` takes only an `href` result,
746
+ param that is missing, empty, `.`, `..` or an unpaired surrogate does not
747
+ throw, since it usually comes from data and one bad row should not fail the page:
748
+ `href` logs a `console.error` once per distinct message (it remembers the
749
+ last 64, then starts over), naming the route and the param and never the value, and returns
750
+ an inert link that `Link`, `Navigate`, `navigate` and a
751
+ click, modified click or middle click on a plain anchor ignore, in every adapter. Before
752
+ hydration, or without scripts, a plain anchor holding it loads a path no route names: a 404, or the page of a dynamic route such as
753
+ `/:id` that matches any one segment;
754
+ an anchor that must never navigate leaves its `href` off with
755
+ `href={isInertHref(link) ? undefined : link}`. `onHrefRefused(report)` takes over the logging: it hears every refusal, in
756
+ place of the default, so an app can send them to its error tracker. `navigate` takes only an `href` result,
722
757
  or a history delta such as `navigate(-1)`; a string or a template literal is a
723
758
  compile error. So do React's `Link`, `NavLink` and `Navigate`
724
759
  (`<Link to={href({ to: "/pricing" })}>`) and the server's
725
760
  `redirect()`; when `to` is not a same-origin path,
726
761
  `Link` and `NavLink` render the anchor without an `href`,
727
762
  and `Navigate` and `setSearchParams` do not navigate; each logs a
728
- `console.error` that names the call and never the value. `redirect`
763
+ `console.error` that never holds the value. `redirect`
729
764
  takes an off-origin location with `{ external: true }`, which still refuses
730
765
  one holding a line break. For a same-origin path built elsewhere - a CMS link,
731
766
  `/llms.txt` - `rawHref("/llms.txt")` checks it (one leading
732
767
  `/`, no backslash or control character) and returns the same type. A link to
733
768
  another site is a plain `<a href>`. A path that comes from outside is
734
- checked where it is read: `rawHref` throws a `TypeError` for one that is
735
- not same-origin, so catch it at that call when a field cannot be trusted. A value that gets
736
- past it as a forged `Href` costs only its own link.
769
+ checked where it is read: `rawHref` returns the same inert link, and logs, for one that
770
+ is not same-origin. A value that gets past it as a forged `Href` costs only its own
771
+ link. `redirect` has no page to fall back to, so a refused location throws unless you
772
+ pass `{ fallback: href({ to: "/" }) }`: an action that has already written
773
+ should, so a bad value costs the destination and not a 500 after the write.
737
774
 
738
775
  ### Moving existing links to href()
739
776
 
@@ -2090,7 +2127,11 @@ import { t } from "@nifrajs/schema"
2090
2127
  import { createTodo } from "./db/write.ts"
2091
2128
 
2092
2129
  export const addTodo = serverFn(
2093
- { input: t.object({ text: t.string({ minLength: 1 }) }), capabilities: ["db.write"] },
2130
+ {
2131
+ input: t.object({ text: t.string({ minLength: 1 }) }),
2132
+ output: t.object({ id: t.string() }),
2133
+ capabilities: ["db.write"],
2134
+ },
2094
2135
  async ({ text }) => createTodo({ text }),
2095
2136
  )
2096
2137
  ```
@@ -2099,6 +2140,11 @@ The second argument receives the validated input and the ordinary Nifra `Context
2099
2140
  `c.env`, `c.clientIp`, `c.budget`, cookies and the capability
2100
2141
  guard are all there, because this is a route.
2101
2142
 
2143
+ The caller sees what `output` lets through: its type is the schema's output, and
2144
+ what the function returns must fit the schema's input, so a field the schema drops is not in
2145
+ the type the browser gets. A function that returns data without an `output` schema is
2146
+ refused at run time, so it is a compile error too; one that returns nothing needs no schema.
2147
+
2102
2148
  ### Mounting
2103
2149
 
2104
2150
  ```ts
@@ -2705,6 +2751,10 @@ broken. A store that also implements `fence()` keeps a purge that lands while a
2705
2751
  page renders from being undone when that render stores the page it built from the old data;
2706
2752
  both built-in stores do.
2707
2753
 
2754
+ ISR captures up to `maxEntryBytes` per document (2 MiB by default). Larger pages
2755
+ stream directly. `MemoryCacheStore` also has a `maxTotalBytes` budget
2756
+ for retained HTML (64 MiB by default) and evicts least-recently-used entries to stay within it.
2757
+
2708
2758
  Workers KV is eventually consistent: a purge is usually seen at once where it was made and
2709
2759
  reaches other locations as their copies expire, which Cloudflare puts at up to 60 seconds or
2710
2760
  more. Until then those locations serve the old page. A page one of them rebuilt from the old
@@ -3495,6 +3545,9 @@ resolves, you call `stream.close()`, or the client disconnects (
3495
3545
  `stream.signal`). It's a Web `ReadableStream` too, so it runs on Bun,
3496
3546
  Node, Deno, and the edge - no `new Function`, no per-runtime API.
3497
3547
 
3548
+ Use `stream.signal` to release subscriptions when the stream ends, including
3549
+ when the producer closes the stream or fails.
3550
+
3498
3551
  ```ts
3499
3552
  import { server } from "@nifrajs/core/server"
3500
3553
  import { sse } from "@nifrajs/core/sse"
@@ -3513,14 +3566,20 @@ app.get("/notifications", (c) =>
3513
3566
  return new Promise<void>((resolve) =>
3514
3567
  stream.signal.addEventListener("abort", () => { off(); resolve() }, { once: true }),
3515
3568
  )
3516
- }, { keepAlive: 15_000 }),
3569
+ }, { keepAlive: 5_000 }),
3517
3570
  )
3518
3571
  ```
3519
3572
 
3520
3573
  `event:`, `id:`, and `retry:` are supported (and CR/LF is
3521
3574
  stripped from `event`/`id` to prevent frame injection); multi-line
3522
3575
  `data` is split into multiple `data:` lines per the spec; and
3523
- `keepAlive` emits comment pings so idle proxies don't drop the connection.
3576
+ `keepAlive` emits comment pings so idle proxies don't drop the connection. Bun also
3577
+ closes a connection that sends nothing for its idle timeout (10 seconds by default), so keep
3578
+ the interval well under the timeout you run with: `idleTimeoutSec` on
3579
+ `listen()`, `idleTimeout` on `Bun.serve()`. Under
3580
+ `listen()`, wrapping the producer in `withIdleTimeout` holds one
3581
+ stream's connection open instead; under a hand-written `Bun.serve` it changes
3582
+ nothing, so set `idleTimeout` there, above the slowest quiet period (0 to 255).
3524
3583
 
3525
3584
  A client that stops reading is dropped once it has `maxBufferedBytes` (default 1
3526
3585
  MiB) of events unread: `stream.signal` aborts with `sse_client_too_slow`,
@@ -3692,6 +3751,15 @@ const queryState = queryClient.dehydrate({
3692
3751
  // On the client, seed the app's client before query components mount.
3693
3752
  ```
3694
3753
 
3754
+ ### Typed keys
3755
+
3756
+ `getQueryData` and `setQueryData` take a key made with
3757
+ `queryKey<T>(key)`, which carries the type of the data stored under it:
3758
+ `const todosKey = queryKey<Todo[]>(["todos"])`. The fetcher must return that type,
3759
+ the read gives `Todo[] | undefined`, and a write of another type is a compile error, so a
3760
+ key and its data cannot drift apart. At run time the key is the array itself, so prefix
3761
+ invalidation works unchanged. A plain key still takes the type of its fetcher.
3762
+
3695
3763
  ### Invalidation
3696
3764
 
3697
3765
  After a mutation, `useQueryClient().invalidateQueries(key)` marks matching entries
@@ -4481,9 +4549,11 @@ app.use(basicAuth({ username: "admin", password: process.env.PASS!, realm: "stag
4481
4549
  ### Response caching
4482
4550
 
4483
4551
  `cache` is a full response cache with a pluggable store, `Vary`-aware keys,
4484
- and a byte cap. It **bypasses `Set-Cookie`** and honors request/response
4485
- `Cache-Control` (`no-store`/`private`) so it never serves one
4486
- user's response to another. `MemoryResponseCache` is per-instance and refuses
4552
+ and a byte cap. It checks the final response's `Set-Cookie`, `Vary`,
4553
+ and `Cache-Control` before storing an entry. Keep request gates that must run on
4554
+ hits before the cache. A custom store must retain the entire entry, including its
4555
+ `finalized` flag. Older entries without that flag miss.
4556
+ `MemoryResponseCache` is per-instance and refuses
4487
4557
  `NODE_ENV=production` unless opted in - use a shared store in prod. `prettyJson`
4488
4558
  pretty-prints JSON responses (capped, with an optional query toggle).
4489
4559
 
@@ -6146,8 +6216,10 @@ export const getSessions = () => (manager ??= createSessions({
6146
6216
  ### Log in & out
6147
6217
 
6148
6218
  A loader can _read_ the session but can't write cookies - so login/logout live in plain
6149
- Nifra routes that have the full `Context`. `regenerate()` rotates the
6150
- session id on login to defend against fixation; the `Set-Cookie` rides the redirect.
6219
+ Nifra routes that have the full `Context`. Store-backed sessions rotate their ID
6220
+ when a configured `identity` key changes. Call `regenerate()` to rotate
6221
+ explicitly, including on login when `identity` is omitted. The
6222
+ `Set-Cookie` rides the redirect.
6151
6223
 
6152
6224
  ```ts
6153
6225
  // backend/app.ts - login/logout are plain nifra routes (full Context → they can WRITE the cookie).
@@ -7583,6 +7655,10 @@ that fails is not delivered; `onError` gets a `TypeError` naming the
7583
7655
  issues, with the frame as its `cause`. Frames keep their arrival order, an async
7584
7656
  schema included.
7585
7657
 
7658
+ `maxPendingMessages` defaults to 256 per iterator and per validation queue.
7659
+ An iterator that falls behind ends and discards its buffered frames. If validation falls
7660
+ behind, the socket closes with code `4008`. Both report through `onError`.
7661
+
7586
7662
  ```ts
7587
7663
  import { client } from "@nifrajs/client"
7588
7664
  import { type InferOutput, server } from "@nifrajs/core/server"
@@ -8361,7 +8437,7 @@ The dev server with true HMR, on port 4321. Bun runs it unless `vitePlugins` are
8361
8437
 
8362
8438
  `nifra build [--target <t>] [--out <dir>] [--transport <module>] [--prerender <paths>] [--report]`
8363
8439
 
8364
- A complete deploy directory for `bun`, `node`, `deno`, `cloudflare`, `vercel` or `static`. The server entry is generated from `backend/framework.ts`, `backend/app.ts` and `routes/`. `--report` prints each chunk's size. `--transport` builds the client to reach its server through that module's `fetch`, for a native shell. `--prerender` (static target) also prerenders the named pages, comma-separated, whether or not their route exports `prerender`.
8440
+ A complete deploy directory for `bun`, `node`, `deno`, `cloudflare`, `vercel` or `static`. The server entry is generated from `backend/framework.ts`, `backend/app.ts` and `routes/`. `--report` prints chunk sizes and initial framework JavaScript and CSS by route. `--transport` builds the client to reach its server through that module's `fetch`, for a native shell. `--prerender` (static target) also prerenders the named pages, comma-separated, whether or not their route exports `prerender`.
8365
8441
 
8366
8442
  `nifra start [--port <n>] [--out <dir>]`
8367
8443
 
@@ -8380,7 +8456,9 @@ What it does
8380
8456
 
8381
8457
  `nifra check [--lints-only] [--json] [--sarif]`
8382
8458
 
8383
- Typecheck plus contract lints: a hand-rolled `fetch()` to your own API, an untyped client, backend code reached from browser code. `--lints-only` skips tsc; `--sarif` emits SARIF 2.1.0.
8459
+ Typecheck and contract lints. Use `--incremental` to reuse TypeScript 5 or 6
8460
+ compiler state and `--timings` to see where the check spent its time.
8461
+ `--lints-only` skips tsc. `--sarif` emits SARIF 2.1.0.
8384
8462
 
8385
8463
  `nifra review [--diff <ref>] [--strict] [--fix] [--write]`
8386
8464
 
@@ -8449,9 +8527,11 @@ One JSON verdict over every applicable gate, each recorded as pass, fail or skip
8449
8527
 
8450
8528
  The verification ladder: L0 typed contract, L1 route assurance, L2 capability lockfile, L3 route manifest, L4 invariant-tested. `--min` fails below a level.
8451
8529
 
8452
- `nifra prove [--file <path>] [--min <n>]`
8530
+ `nifra prove [--file <path>] [--min <n>] [--run]`
8453
8531
 
8454
- Plan the cheapest proofs for the changed files and report a machine-checkable stop condition. Needs a fresh build.
8532
+ Plan cumulative verification gates against a build with matching source and artifact
8533
+ digests from `nifra build`. Run `nifra prove --run` to execute
8534
+ the gates and regenerate saved proofs for the v2 evidence envelope.
8455
8535
 
8456
8536
  `nifra capabilities snapshot | check | explain`
8457
8537
 
@@ -8628,8 +8708,8 @@ starts from unless nothing else, installed or declared, names one.
8628
8708
 
8629
8709
  ```bash
8630
8710
  nifra upgrade --list # the release targets this CLI knows
8631
- nifra upgrade 5.15.1 # dry-run: every planned edit, nothing written
8632
- nifra upgrade 5.15.1 --write # apply; it verifies with nifra check once the target is installed
8711
+ nifra upgrade 5.17.0 # dry-run: every planned edit, nothing written
8712
+ nifra upgrade 5.17.0 --write # apply; it verifies with nifra check once the target is installed
8633
8713
  # if pins were already bumped by hand, add --from <installed-version>
8634
8714
  bun install # install the new pins
8635
8715
  nifra check # verify against them
@@ -8671,6 +8751,19 @@ see mixed nifra versions. A
8671
8751
  `--write` drops those entries so the next `bun install` records them
8672
8752
  again (see stale file: links).
8673
8753
 
8754
+ A recipe can also rewrite source on the syntax tree, with the project's own TypeScript, for
8755
+ a call shape an import move cannot express. A rewrite changes only a shape it recognizes
8756
+ whole and lists every other site by file and line under "to edit by hand"; it never
8757
+ guesses. The 5.16 recipe carries three, for APIs the route table and the backend now type:
8758
+ `route-hooks` writes the page's own route into `useSearch` and
8759
+ `useParams` (the type-argument and bare forms are removed), `query-keys`
8760
+ wraps the key in `getQueryData` and `setQueryData` in
8761
+ `queryKey(...)`, and `form-for` turns
8762
+ `formFor<App, "/path">()` into
8763
+ `formFor<App>()("/path")`. None changes what runs: afterwards, run
8764
+ `nifra types` and `tsc`, and whatever is left shows as an error at its
8765
+ line.
8766
+
8674
8767
  A `link:` or `file:` dependency outside the root that installs its own
8675
8768
  `@nifrajs/*` at another version stops the upgrade before anything is written: its
8676
8769
  imports resolve from its own `node_modules`, so after the upgrade a
@@ -13021,6 +13114,414 @@ patched the server HTML. In development the page reports it to the dev server as
13021
13114
  installed in the project, `nifra_hydrate` reproduces it with a stable diagnostic.
13022
13115
  See hydration.
13023
13116
 
13117
+ ### Server components
13118
+
13119
+ #### NIFRA_COMPONENT_REQUEST
13120
+
13121
+ A server component request failed. The error carries a `code` and no further
13122
+ detail, so look on the server for the cause.
13123
+
13124
+ -
13125
+ `component_input` (422): the props the page sent failed the component's input
13126
+ schema.
13127
+
13128
+ -
13129
+ `component_denied` (401, 403 or 404): the request was not same-origin (call components from
13130
+ your own pages), or the component's `authorize` callback refused it with a 401, 403
13131
+ or 404.
13132
+
13133
+ -
13134
+ `component_version` (409): the browser's build differs from the server's, usually
13135
+ after a deploy. Reload the page.
13136
+
13137
+ -
13138
+ `component_busy` (429): every render slot is busy and the waiting queue is full. Reduce how
13139
+ many components render at once, or the work each one does.
13140
+
13141
+ -
13142
+ `component_timeout` or `component_cancelled`: the component outran its
13143
+ deadline, or the request was aborted first, for example by the visitor navigating away. For a
13144
+ timeout, speed up the data the component waits on.
13145
+
13146
+ #### NIFRA_COMPONENT_BUILD
13147
+
13148
+ The server component build refused the project: a component module, a build entry, or the
13149
+ source graph breaks a rule the compiler relies on. The message names the rule.
13150
+
13151
+ **Fix:** fix the one thing the message names and rebuild. The build never ships a
13152
+ bundle it refused.
13153
+
13154
+ ### Rendering and deployment
13155
+
13156
+ #### NIFRA_PPR_CONTRACT
13157
+
13158
+ A partially prerendered route broke the contract that lets its shell be shared between
13159
+ visitors: a visitor-specific loader, a dynamic hole set up wrongly, a nonce in the shell, or an
13160
+ invalid `ppr` option.
13161
+
13162
+ **Fix:** keep per-visitor data out of the shell (move it into a dynamic boundary,
13163
+ or mark a layout loader `gate`), give every hole a `boundaryLoaders`
13164
+ entry, and use `csp: createCspPolicy(...)` instead of a per-request nonce.
13165
+
13166
+ #### NIFRA_DEPLOYMENT_OUTPUT
13167
+
13168
+ A deployment adapter or the build output it was given broke a deployment rule: an unsafe or
13169
+ oversized output tree, a path collision, or an adapter that does not implement the interface
13170
+ this Nifra build supports.
13171
+
13172
+ **Fix:** emit additions only through the returned `files` array, keep
13173
+ paths relative and distinct, and match the adapter API version this Nifra build supports.
13174
+
13175
+ #### NIFRA_CLIENT_BUILD_NO_GRAPH
13176
+
13177
+ The client build's result had no metafile (or one without inputs or outputs), so Nifra cannot
13178
+ prove which modules reached the browser. It refuses to write the bundle rather than guess.
13179
+
13180
+ **Fix:** build the client through Nifra's build, which keeps the bundler's
13181
+ metafile. A custom build step must request the metafile and pass it through.
13182
+
13183
+ #### NIFRA_ROUTE_SLOT_UNAVAILABLE
13184
+
13185
+ A route slot named a parent route, a slot name, or a target route that is not registered, so
13186
+ the slot cannot render.
13187
+
13188
+ **Fix:** register the route the slot points at, and spell the slot name as the
13189
+ parent route declares it.
13190
+
13191
+ ### Middleware, stores and sessions
13192
+
13193
+ #### NIFRA_MEMORY_STORE_IN_PRODUCTION
13194
+
13195
+ An in-memory store (rate-limit MemoryStore, MemoryIdempotencyStore, MemoryResponseCache, MemorySessionStore) was created in production. Each instance keeps its own copy, so limits, de-duplication, cached responses or sessions differ per instance and are lost on restart.
13196
+
13197
+ - Use a shared store: Give the middleware or session manager a store every instance reads and writes (Redis or another shared backend) instead of the Memory* default.
13198
+
13199
+ - Single instance only: Pass { allowInProduction: true } when exactly one instance serves traffic and losing state on restart is acceptable.
13200
+
13201
+ #### NIFRA_CORS_CREDENTIALS_WILDCARD
13202
+
13203
+ cors() was given `credentials: true` with `origin: "*"`. Browsers refuse a wildcard origin on a credentialed request, so the combination can never work.
13204
+
13205
+ **Fix:** List the explicit origin(s) that may send credentials instead of the wildcard.
13206
+
13207
+ #### NIFRA_SECRET_TOO_SHORT
13208
+
13209
+ A signing secret is shorter than the 32 bytes (256 bits) nifra requires, so it is refused instead of used.
13210
+
13211
+ **Fix:** Generate one with `openssl rand -base64 32` and load it from the environment.
13212
+
13213
+ #### NIFRA_MIDDLEWARE_ORDER
13214
+
13215
+ A middleware that protects routes was installed after the routes it should guard, so those routes were registered without it.
13216
+
13217
+ **Fix:** Call app.use(...) for it before registering the routes it protects.
13218
+
13219
+ #### NIFRA_CONTEXT_STORAGE_MISSING
13220
+
13221
+ getContext() ran outside a request that went through contextStorage(): the middleware was not installed before the route, or the code ran outside any request (a partially prerendered shell is built outside every request).
13222
+
13223
+ **Fix:** Add app.use(contextStorage()) before the route and call getContext() during that request. For a PPR shell, read the request in a dynamic boundary's loader instead.
13224
+
13225
+ #### NIFRA_SESSION_STORE_CONSISTENCY
13226
+
13227
+ The session manager was given an eventually consistent store such as KVSessionStore. Logout and rotation need a read to see the write that revoked a session, which that kind of store does not promise.
13228
+
13229
+ **Fix:** Use a strongly consistent shared SessionStore.
13230
+
13231
+ ### Routes, wire and data
13232
+
13233
+ #### NIFRA_ROUTE_CONFIG
13234
+
13235
+ A route is misconfigured, and registration refuses it at boot rather than failing on the first request. The error's `code` names the rule (DUPLICATE_ROUTE, INVALID_PATH, INVALID_METHOD, WILDCARD_NOT_LAST, INVALID_IDEMPOTENCY, ...).
13236
+
13237
+ **Fix:** Read the `code` and the message, then correct the route definition they name. The server does not start until the route is valid.
13238
+
13239
+ #### NIFRA_ROUTE_FILES
13240
+
13241
+ The file routes, or a route's exports, break a convention the router relies on: two files map to one URL, two `_404` files answer the same URLs, an optional segment is mixed with literal text, a layout exports an `action`, or a route turns off both server rendering and hydration.
13242
+
13243
+ **Fix:** The message names the files and the rule. Keep one file per URL, one `_404` per scope, and put actions in route files, not layouts.
13244
+
13245
+ #### NIFRA_WIRE_INVALID
13246
+
13247
+ A value could not be encoded or decoded on the typed wire: a malformed frame, an unsupported codec or content type, a payload over maxBytes, or a value that is not JSON serializable.
13248
+
13249
+ **Fix:** Send values the wire can carry, from a client built against this server's contract. For an oversized payload, send less or raise maxBytes on purpose.
13250
+
13251
+ #### NIFRA_STORAGE_KEY
13252
+
13253
+ A storage key was refused before any read or write: it is empty or over 1024 characters, is absolute, has a backslash, NUL, "..", or an empty or "." segment, escapes the storage root, or reaches the file through a symbolic link, a moved root directory or an untrusted writable directory.
13254
+
13255
+ **Fix:** Build keys as relative, forward-slash paths that stay under the storage root, and never put unchecked user input into a key. For a symbolic link, a moved root or an untrusted directory, the message names what to check on the filesystem.
13256
+
13257
+ #### NIFRA_STORAGE_READ_LIMIT
13258
+
13259
+ An R2 object is larger than maxReadBytes (or reports invalid size metadata), so R2Storage refuses to buffer it. The key itself was valid.
13260
+
13261
+ **Fix:** Raise maxReadBytes on the R2Storage if objects of that size are expected; otherwise find why the object is larger than the limit.
13262
+
13263
+ #### NIFRA_OPENAPI_IMPORT
13264
+
13265
+ The OpenAPI document cannot be imported: it is malformed, uses a version outside 3.0.x, 3.1.x and 3.2.x, exceeds an import limit, or holds a construct Nifra cannot represent (a parameter $ref, an unsupported path template).
13266
+
13267
+ **Fix:** The message names the path in the document. Fix that part, and inline parameter $refs before importing: refs are never resolved.
13268
+
13269
+ #### NIFRA_SCHEMA_DECLARATION
13270
+
13271
+ A schema declaration uses something the schema builder cannot accept: a file list nested in a list, a file field outside t.form(), a header name that is not lower-cased, a declassified field with no reason, or a feature precompile refuses (custom registry kinds, runtime-only metadata).
13272
+
13273
+ **Fix:** The message names the declaration and what it expects. Declare file fields in t.form(), give declassified a reason, and keep precompiled schemas to plain, compilable shapes.
13274
+
13275
+ #### NIFRA_ASSURANCE_INPUT
13276
+
13277
+ An assurance, capability, manifest or evidence declaration is malformed: an id, path glob, scope, provenance, method or policy field outside what the registry accepts.
13278
+
13279
+ **Fix:** The message names the field and the accepted form (lowercase dot/dash ids, absolute path globs, a known scope). Correct the declaration; `nifra check` reports the same project-wide.
13280
+
13281
+ #### NIFRA_EFFECT_INVALID
13282
+
13283
+ An effect, saga or durable-journal declaration, or the store behind it, broke its contract: a value out of range, a missing step, or a store that is not durable where durability is required.
13284
+
13285
+ **Fix:** The message names the part. Where it says `store.durability === "durable"`, back the journal with a durable store; otherwise correct the id, cost or limit it names.
13286
+
13287
+ #### NIFRA_CONTENT_INVALID
13288
+
13289
+ A content collection, its baked index, or an MDX extension is malformed or out of range.
13290
+
13291
+ **Fix:** The message names the index, bucket or extension. Correct the collection definition it names.
13292
+
13293
+ #### NIFRA_JOBS_INVALID
13294
+
13295
+ A job, its payload, or a dead-letter record cannot be stored as data: a duplicate job name, an Error instance, a custom prototype, an accessor, or a record the dead-letter view cannot read.
13296
+
13297
+ **Fix:** Make the payload plain data (objects, arrays, strings, numbers, booleans), and give each job one name.
13298
+
13299
+ #### NIFRA_I18N_CONFIG
13300
+
13301
+ The locale, copy-table or localized-path configuration breaks a rule: a duplicate id or canonical pathname, two locales sharing an hreflang, a draft default locale, or a copy value of the wrong kind.
13302
+
13303
+ **Fix:** The message names the locale, table or pathname. Make the ids and pathnames unique and give each locale its own hreflang.
13304
+
13305
+ ### Build and assets
13306
+
13307
+ #### NIFRA_BUILD_PLUGIN
13308
+
13309
+ A build plugin (CSS Modules, SCSS, StyleX, a Vue single-file component, Svelte MDX) failed on a file or is missing a compiler dependency.
13310
+
13311
+ **Fix:** The message names the file and the compiler's own reason. Fix that source, or install the compiler package it says is missing or incompatible.
13312
+
13313
+ #### NIFRA_BUILD_OUTPUT
13314
+
13315
+ The client or server build, or the directory it writes to, broke a rule: no entry-point output, an output or public directory that is a symlink, escapes its root or overlaps the other, a build target the chosen option does not fit, or a glob pattern the bundler cannot read.
13316
+
13317
+ **Fix:** The message names the path, target or option. Move the output or public directory, drop the option the target does not support, or give the bundler a literal pattern.
13318
+
13319
+ #### NIFRA_ASSET_INVALID
13320
+
13321
+ A font, web manifest or service-worker asset was refused: a download from a non-allowed host or over its size limit, a stylesheet with no usable font files, an unknown manifest value, or a path with characters an asset path cannot hold.
13322
+
13323
+ **Fix:** The message names the family, URL or field. Request only Google-hosted fonts within the limits, and use the manifest values and path characters it lists.
13324
+
13325
+ ### Framework warnings
13326
+
13327
+ #### NIFRA_VUE_WARNING
13328
+
13329
+ Vue's development build warned about a component. The text after `[Vue warn]:` names the problem, and Vue's component trace names the component it happened in.
13330
+
13331
+ **Fix:** Fix the component the trace names. Do not silence Vue's warn handler: each warning is raised for a real mistake in that component.
13332
+
13333
+ #### NIFRA_SVELTE_DIAGNOSTIC
13334
+
13335
+ Svelte's development build reported a mistake. The identifier after `[svelte]` (or at the end of the https://svelte.dev/e/ link) is Svelte's own stable code.
13336
+
13337
+ **Fix:** Open https://svelte.dev/e/<code> for the cause and the repair, then fix the component the message locates.
13338
+
13339
+ #### NIFRA_REACT_WARNING
13340
+
13341
+ React reported a mistake: a development warning that links to react.dev/link/..., or an error whose message links to react.dev/errors/... (a minified production error).
13342
+
13343
+ **Fix:** Open the link in the message for the cause and the repair, then fix the component React's trace names. A react.dev/errors message is a thrown error, not a warning.
13344
+
13345
+ ### More framework warnings
13346
+
13347
+ #### NIFRA_PREACT_DIAGNOSTIC
13348
+
13349
+ Preact's debug build reported a mistake in a component: invalid nesting, a duplicate key, an invalid element type, a hook outside render, a render loop, or a prop of the wrong type. Preact has no stable code, so the message text is the identifier.
13350
+
13351
+ **Fix:** Fix the component the message names; Preact appends its component stack. Do not remove preact/debug to quiet it: each message is raised for a real mistake.
13352
+
13353
+ ### Configuration and runtime
13354
+
13355
+ #### NIFRA_HEADER_VALUE_INVALID
13356
+
13357
+ A response header or cookie value was refused: a control character, a newline, a leading or trailing space, an illegal character in a cookie Domain or Path, a `__Host-` cookie with a Domain, a cookie over its size limit, or a framing header set statically.
13358
+
13359
+ **Fix:** The message names the header or cookie. Remove the character it names, and set per-response headers with c.set.headers (cookies with c.set.cookie) instead of statically.
13360
+
13361
+ #### NIFRA_CSP_CONFIG
13362
+
13363
+ The Content-Security-Policy or inline-script setup conflicts: a cspHeader and a nonce resolver both writing the header, an executable inline script without a nonce, content the inert head.script slot refuses, or a policy used before it was prepared.
13364
+
13365
+ **Fix:** The message names the conflict. Use either `nonce` or `csp: createCspPolicy(...)`, give executable scripts a non-empty nonce, and use unsafeInlineScript() only where the message says to.
13366
+
13367
+ #### NIFRA_CDN_CONFIG
13368
+
13369
+ A CDN adapter was given a missing binding or a store that cannot do what was asked (for example invalidate by tag), or an option outside what it accepts.
13370
+
13371
+ **Fix:** The message names the adapter and what to pass (the `cache` binding, the @vercel/functions helper, a store that supports tags). Pass it where the CDN is configured.
13372
+
13373
+ #### NIFRA_PARITY_FAILED
13374
+
13375
+ The development/production parity check failed (identity parity or manifest parity), or its scan hit the limit before it could decide.
13376
+
13377
+ **Fix:** Read the differences the message lists and make development and production agree. When the scan limit was reached, narrow the scan by running from the app or workspace root.
13378
+
13379
+ #### NIFRA_API_MISUSE
13380
+
13381
+ An API was called in a state it does not allow: next() called twice, a request body read as a stream after it was consumed, a response body sent twice, headers written after the response was committed, notFound() applied twice or inside a group, or a query used with no query client.
13382
+
13383
+ **Fix:** The message names the call. Call it once, before the response is committed, and on the object it belongs to (read bodies with c.req.bytes() in a hook; apply notFound() to the parent server).
13384
+
13385
+ #### NIFRA_WEBSOCKET_INVALID
13386
+
13387
+ A WebSocket was opened or closed in a way the protocol or the client does not allow: a close reason over 123 UTF-8 bytes, a close code a server may not send, a path with a dot segment, or an in-process client that has no socket.
13388
+
13389
+ **Fix:** Close with a reason of at most 123 bytes and a code in 1000-1003, 1007-1014 or 3000-4999. Open sockets against a listening app, at a path without `.` or `..` segments.
13390
+
13391
+ #### NIFRA_VALUE_NOT_SERIALIZABLE
13392
+
13393
+ A value could not be turned into JSON or the typed wire: a circular reference, a BigInt, a non-finite number, a class instance, an undefined field or array item, or a type the wire has no encoding for.
13394
+
13395
+ **Fix:** Send plain data: objects, arrays, strings, finite numbers and booleans. Convert BigInt and class instances to plain values before they cross the boundary.
13396
+
13397
+ #### NIFRA_CRON_INVALID
13398
+
13399
+ A cron schedule or job registration is invalid: not five space-separated fields, an empty, out-of-range or malformed term, or two jobs with the same name.
13400
+
13401
+ **Fix:** Write the schedule as five space-separated fields with each value in its range, and register each job name once.
13402
+
13403
+ #### NIFRA_GRAPHQL_REQUEST
13404
+
13405
+ A GraphQL request was malformed (no `query`, a body that is not a JSON object, variables that are not a JSON object), or mountGraphql was configured in a way it refuses.
13406
+
13407
+ **Fix:** For a request, send a JSON object with a `query` string and an object for `variables`. For mountGraphql, call `.use(websocket())` before enabling subscriptions, and guard sockets with the same authorization as the HTTP endpoint.
13408
+
13409
+ #### NIFRA_IMAGE_INVALID
13410
+
13411
+ An image could not be processed or generated: a source that failed to decode or changed while it was being opened, variants without positive dimensions, or generated output over its size limit.
13412
+
13413
+ **Fix:** The message names the step. Give the image a valid source and positive dimensions, and keep generated output within maxBytes.
13414
+
13415
+ #### NIFRA_HTTP_RESPONSE_INVALID
13416
+
13417
+ The server adapter could not write or read the HTTP message: a status code outside the valid range, a body whose length disagrees with its Content-Length, an invalid header character, or a request that closed early.
13418
+
13419
+ **Fix:** Return a valid status, send a body that matches the Content-Length you set (or omit it), and keep header names and values to legal characters.
13420
+
13421
+ #### NIFRA_OPTION_RENAMED
13422
+
13423
+ An option was renamed in this version, and the old name is no longer read.
13424
+
13425
+ **Fix:** The message gives the new name. Rename the option where you pass it.
13426
+
13427
+ #### NIFRA_CLIENT_REFUSED
13428
+
13429
+ The typed client refused a response or a request: a response that breaks the route's declared contract, a server-sent event over its size limit, or a form field that is neither text nor a file.
13430
+
13431
+ **Fix:** For a contract violation, make the server return what its route declares (or update the declaration). For a form body, send strings and files only.
13432
+
13433
+ #### NIFRA_TOOL_INVALID
13434
+
13435
+ A tool declaration, its adapter, or its approval or budget settings break a rule: an option of the wrong type, a limit exceeded, a missing approval, or a duplicate tool name.
13436
+
13437
+ **Fix:** The message names the tool and the field. Correct the declaration; `nifra check` reports the same project-wide.
13438
+
13439
+ #### NIFRA_JWKS_UNAVAILABLE
13440
+
13441
+ The JWKS endpoint used to verify tokens could not be used: the fetch failed, the response could not be read or was over its size limit, the key set was invalid, or the URL is not https.
13442
+
13443
+ **Fix:** The message gives the status or reason. Check that the JWKS URL is reachable over https (localhost is allowed) and returns a valid key set within maxBytes.
13444
+
13445
+ #### NIFRA_BODY_PARSER_REFUSED
13446
+
13447
+ bodyParser was given a media type nifra already handles (JSON, a form, multipart) or one a browser can send from any site without a preflight request.
13448
+
13449
+ **Fix:** The message names the media type and what to do instead: body schemas already read JSON and forms, multipart uses multipartBody from @nifrajs/core/multipart, and a no-preflight type must be read in the handler.
13450
+
13451
+ #### NIFRA_IDEMPOTENCY_STORE_CORRUPT
13452
+
13453
+ A stored idempotency record could not be replayed: its body or status is not in the form the middleware wrote.
13454
+
13455
+ **Fix:** First confirm whether the original operation completed: deleting the record lets the next retry with that key run the handler again, which repeats any side effect already done (a charge, an email). Delete the record only once the operation is known not to have completed, or reconcile its effect by hand. If it recurs, check that nothing else writes to the idempotency store and that the store does not alter values.
13456
+
13457
+ #### NIFRA_AUTHJS_REQUEST_FAILED
13458
+
13459
+ The Auth.js bridge called an Auth.js endpoint (sign in, sign out, CSRF token) and it failed or did not answer.
13460
+
13461
+ **Fix:** The message gives the HTTP status. Check that the Auth.js endpoint is mounted and answering.
13462
+
13463
+ #### NIFRA_ACTION_FAILED
13464
+
13465
+ A route action request answered with a non-OK status, so the router threw instead of returning a result.
13466
+
13467
+ **Fix:** The message gives the status and the action URL. Look at the response and logs for that status on the server.
13468
+
13469
+ #### NIFRA_STRICT_MODE
13470
+
13471
+ A startup check failed while strict mode is on, so the process refuses to start instead of running with the problem.
13472
+
13473
+ **Fix:** Fix the problems the message lists above that line. Strict mode is meant to turn them into a startup failure.
13474
+
13475
+ #### NIFRA_LIBRARY_RESOLUTION
13476
+
13477
+ A UI library or optional peer did not resolve to one working copy: two copies of React reached server rendering (react-dom renders with a different React than your components import), or an optional peer is missing or failed to load.
13478
+
13479
+ **Fix:** For two copies, dedupe the library in your package manager so react-dom and your components import the same React. For a peer, the message names it and the underlying error: install it, or use the default build.
13480
+
13481
+ ### Configuration and runtime
13482
+
13483
+ #### NIFRA_RUNTIME_MISSING
13484
+
13485
+ A feature was used without its opt-in runtime installed: WebSocket routes, server-sent events, MCP declarations or the Node-direct renderer ship as separate plugins so apps that do not use them stay small.
13486
+
13487
+ **Fix:** The message names the plugin. Add the `.use(...)` it shows (websocket() from @nifrajs/core/ws, the streaming runtime, mcp(), or nodeDirect() from @nifrajs/core/node-direct) on the app that declares the routes, before those routes are declared. A child app that declares its own routes needs its own `.use(...)`; for WebSocket routes mounted from a child, install it where the message says (the parent or the child).
13488
+
13489
+ #### NIFRA_SERVER_LIFECYCLE
13490
+
13491
+ The server was configured at the wrong time or on the wrong runtime: a hook added after the page routes were declared (no page runs it), configuration changed after listen() sealed the server, or listen() called outside Bun.
13492
+
13493
+ **Fix:** Move the call before listen(). For a late hook, apply it in createWebApp({ use }) to cover the pages, or inside app.group(prefix, ...). Off Bun, serve with @nifrajs/node or @nifrajs/deno, or hand app.fetch to a fetch-compatible runtime.
13494
+
13495
+ ### Options
13496
+
13497
+ #### NIFRA_LIVE_CONFIG
13498
+
13499
+ The live (real-time) options are invalid: a missing or short secret, a hub and bus configured
13500
+ together, a path that is not absolute, or a subject that does not return a string.
13501
+
13502
+ **Fix:** the message names the option. A secret must be at least 32 bytes (
13503
+ `openssl rand -base64 32`), and `hub` and `bus` are exclusive.
13504
+
13505
+ #### NIFRA_OPTION_INVALID
13506
+
13507
+ An option passed to a Nifra function (`createWebApp`, a route, the CDN, ISR, a
13508
+ manifest) has a value outside what it accepts.
13509
+
13510
+ **Fix:** the message names the option and the shape it accepts. Correct the value
13511
+ at the call that sets it; nothing is silently coerced.
13512
+
13513
+ #### NIFRA_SOLID_DIAGNOSTIC
13514
+
13515
+ Solid 2.0's development build reported a reactivity mistake. The message opens with Solid's own
13516
+ stable code in square brackets (`[STRICT_READ_UNTRACKED]`), then names the owner path,
13517
+ the source location, and the guide for that code. Nifra records it in the dev feed so
13518
+ `nifra explain` and `nifra_explain` return it with the rest of your errors.
13519
+
13520
+ **Fix:** open the repair guide the message names (
13521
+ `node_modules/solid-js/skills/reactivity-diagnostics/SKILL.md`, anchored by the
13522
+ lower-cased code) and apply its repair at the reported location. Do not silence the report:
13523
+ Solid raises each one for a real defect or a real cost.
13524
+
13024
13525
  #### NIFRA_SCHEMA_PARSE
13025
13526
 
13026
13527
  Data crossing a boundary did not match its declared schema.
@@ -14635,7 +15136,7 @@ the command below, which runs every recipe since its installed version. The 5.6
14635
15136
  its imports and dependencies; the follow-up changes below need a hand.
14636
15137
 
14637
15138
  ```sh
14638
- nifra upgrade 5.15.1
15139
+ nifra upgrade 5.17.0
14639
15140
  ```
14640
15141
 
14641
15142
  -
@@ -15066,9 +15567,9 @@ Migrate a backend. For the full
15066
15567
  rendering and route model, see Loaders & actions
15067
15568
  and Routing.
15068
15569
 
15069
- The current dynamic SSR snapshot reports Nifra at 15× the throughput
15070
- of Next.js, 6.9× Nuxt, 4× SvelteKit, and
15071
- 2× SolidStart on the measured pages. See the
15570
+ The current dynamic SSR snapshot reports Nifra at 29× the throughput
15571
+ of Next.js, 16× Nuxt, 6.1× SvelteKit, and
15572
+ 2.3× SolidStart on the measured pages. See the
15072
15573
  benchmark methodology and full results.
15073
15574
 
15074
15575
  ## Nifra - Migrate route by route
@@ -15419,6 +15920,22 @@ semantic conventions, and ships no SDK. Cache operations, background jobs and ev
15419
15920
  join the request's trace through the context you bind them to, and a small bridge puts the
15420
15921
  OpenTelemetry SDK's own database and HTTP spans under the same tree.
15421
15922
 
15923
+ ### Find the slow stage of a page
15924
+
15925
+ Load the page with `nifra dev` running, then call `nifra_inspect`.
15926
+ The trace includes the request duration, ISR status when available, and the route's
15927
+ `routeTiming`. Its `phases` report page loaders, layout loaders,
15928
+ output validation, serialization, and rendering in milliseconds. Loader phases can
15929
+ overlap. A streamed response is measured through the initial response, before deferred
15930
+ values settle. An ISR hit or a stale response served from cache shows the cache status.
15931
+
15932
+ Run `nifra build --report` for the matched page and layout chunks, the client
15933
+ entry, their eager JavaScript imports, and the route stylesheet URLs. The per-route gzip
15934
+ totals estimate the initial framework assets. A literal `hydrate = false` shows
15935
+ zero framework JavaScript and keeps the stylesheet sizes. A hydration setting the build
15936
+ cannot determine shows an unknown JavaScript size. Use browser resource timing to measure dynamic imports, island scripts, locale-specific chunks, and bytes
15937
+ transferred with your server's compression and cache settings.
15938
+
15422
15939
  ### Request spans
15423
15940
 
15424
15941
  ```ts
@@ -17562,8 +18079,8 @@ so `achieved` is the highest rung with unbroken support underneath, and it is
17562
18079
  `-1` when even L0 fails.
17563
18080
 
17564
18081
  -
17565
- **L0 typed contract** - `nifra check` passes: the frontend and
17566
- backend cannot have silently diverged.
18082
+ **L0 typed contract** - `nifra check` passes and the compiler
18083
+ confirms the types across the frontend and backend.
17567
18084
 
17568
18085
  -
17569
18086
  **L1 route assurance** - every route is classified, and the enforcement a rule
@@ -18942,6 +19459,10 @@ For hand-rolled own-API `fetch()` calls, `nifra check` stays conservative: simpl
18942
19459
  that match a statically visible Nifra route get an exact typed-client rewrite diff; dynamic URLs, custom
18943
19460
  headers, bodies, query strings, or ambiguous routes fall back to manual steps.
18944
19461
 
19462
+ Run `nifra check --incremental --timings` while editing. TypeScript 5 and 6 reuse compiler state
19463
+ in `.nifra/check/`. The report includes elapsed milliseconds for the typecheck, source reads,
19464
+ lint and diagnostic phases. Pass `--json` for the same timings as structured data.
19465
+
18945
19466
  ## `nifra i18n check` - the catalog gate
18946
19467
 
18947
19468
  `nifra i18n check [entry]` imports the module that exports your `locales` (from `defineLocales`) and
@@ -19051,6 +19572,13 @@ and limits: [Where your code and secrets run](https://nifra.dev/docs/agents#proj
19051
19572
 
19052
19573
  `nifra check --json` returns stable diagnostic codes and machine-actionable evidence. `nifra assure --json --strict` returns one versioned bundle with explicit pass, fail, and skip gate results plus a `green` or `red` verdict. Use `nifra fix --code NF-...` for a registered fix recipe, and `nifra contracts snapshot` to opt into route contract drift detection.
19053
19574
 
19575
+ `nifra prove --min 2 --json` plans the same cumulative gates as `nifra levels`. Use
19576
+ `nifra prove --run --min 2 --json` to execute the plan and return passing or failing results
19577
+ bound to the current source graph and build artifact digests. Run `nifra build` first. It records
19578
+ content digests for project source, public assets, and the emitted build. Proofs require the current
19579
+ digests to match that record and every requested gate to pass. Use `--file` for impact hints.
19580
+ Regenerate saved proofs for the v2 evidence envelope with `nifra prove --run`.
19581
+
19054
19582
  Assurance configs may append application-supplied rule packs. Pack codes must not use the reserved `NF-` prefix. Rules are pure source scans and run after the built-in rules.
19055
19583
 
19056
19584
  Run the client from (or point it at) your project root. The protocol is hand-rolled
@@ -20913,6 +21441,10 @@ const app = server()
20913
21441
  - **`combine()` / `namedCombine()`** - reusable runtime bundles for middleware/plugins.
20914
21442
  - **`requestId()` / `logger()` / `etag()` / `compression()` / `cacheControl()` /
20915
21443
  `idempotency()` / `healthcheck()` / `openapi()`** - additional operational middleware for APIs.
21444
+ - **`compression({ inlineMax })`** - on Node, gzip runs on the thread pool by default, which pays when a
21445
+ process has idle cores. With one process per core (a cluster, or `reusePort`), set `inlineMax` (bytes) to
21446
+ gzip buffered bodies up to that size on the calling thread; streamed bodies are unaffected. At 1 CPU
21447
+ per process on Node 26 (2-66 KB bodies) it measured 1.5-4x the pool's throughput.
20916
21448
 
20917
21449
  ## Header middleware: declared headers and `onResponseHeaders`
20918
21450
 
@@ -21197,7 +21729,7 @@ do on `@nifrajs/node`.
21197
21729
  `Content-Length` is declared is sent with that length and cut off, not finished, if the stream ends
21198
21730
  short or runs long.
21199
21731
  - **Headers uWS frames itself** - `Content-Length`, `Transfer-Encoding` and `Date` - are dropped from the
21200
- app's response, and uWS adds a `uWebSockets: 20` header it cannot be told to omit.
21732
+ app's response. The `uWebSockets: 20` banner uWS would add is switched off for the thread that loads the adapter; a worker thread switches off its own by loading it.
21201
21733
  - **Header values are checked** for CR, LF and other control characters before anything is written, and
21202
21734
  a status outside 100-999 is refused: either is a `500`, reported through the app's logger.
21203
21735
  - **uWS's parser, not Node's.** It rejects a repeated `Host`, a request carrying both `Content-Length`
@@ -21769,6 +22301,7 @@ skills/
21769
22301
  nifra-api/SKILL.md typed routes, schemas, middleware, WebSockets, the never-throwing client
21770
22302
  nifra-web/SKILL.md file routing, loaders/actions, SSR, islands, the client/server boundary
21771
22303
  nifra-verify/SKILL.md check, assure, capabilities, manifest diff, the verification ladder
22304
+ nifra-errors/SKILL.md every stable error and `nifra check` code, with its cause and repair (generated)
21772
22305
  ```
21773
22306
 
21774
22307
  ## Install
@@ -21882,9 +22415,10 @@ import { assertSafeKey, StorageKeyError } from "@nifrajs/storage"
21882
22415
 
21883
22416
  ## API
21884
22417
 
21885
- - `new MemoryStorage()` · `new FileStorage(root)` · `new R2Storage(bucket)`.
22418
+ - `new MemoryStorage()` · `new FileStorage(root)` · `new R2Storage(bucket, { maxReadBytes? })`.
21886
22419
  - `put(key, data, { contentType?, metadata? })` - `data` is `Uint8Array | ArrayBuffer | string`.
21887
22420
  - `get(key)` → `{ body, size, contentType?, metadata? } | null` · `delete(key)` · `exists(key)` · `list({ prefix?, limit? })`.
22421
+ `R2Storage.get` defaults to a 16 MiB read limit and throws a `RangeError` for oversized objects.
21888
22422
  `FileStorage.list` reads and sorts each directory it enters, so even `limit: 1` costs time in
21889
22423
  proportion to those directories' entries; split a very large store across key prefixes.
21890
22424
  - `assertSafeKey(key)` / `StorageKeyError` · `toBytes(data)`.
@@ -22793,7 +23327,7 @@ done-gate, or `nifra mcp` to give the agent live project tools.
22793
23327
 
22794
23328
  ## @nifrajs/core
22795
23329
 
22796
- `AdmissionController`, `AdmissionDecision`, `AnyServer`, `AuthHeaders`, `AuthMaybePromise`, `AuthenticationFailure`, `AuthenticationFailureReason`, `AuthenticationInput`, `AuthenticationResult`, `AuthenticationStage`, `AuthenticationSuccess`, `Context`, `ContextPlugin`, `CookieOptions`, `CookieSecret`, `DeclaredMountRoute`, `DefinePluginResult`, `DurableObjectNamespaceLike`, `ExecutionContext`, `FRAMEWORK_NAME`, `FetchApp`, `FrameworkError`, `FrameworkName`, `Handler`, `IdentityPlugin`, `InferInput`, `InferOutput`, `JoinRoutePath`, `LambdaEvent`, `LambdaHandler`, `LambdaResponse`, `LambdaV1Event`, `LambdaV2Event`, `ListenTlsOptions`, `LogFields`, `Logger`, `METHODS`, `McpPromptDescriptor`, `McpResourceDescriptor`, `Method`, `Middleware`, `MountFetchOptions`, `MountOptions`, `MountableApp`, `NetlifyEvent`, `NetlifyHandler`, `NifraFeatureVersion`, `NifraPlugin`, `NifraWebSocket`, `NodeRequestContext`, `NodeRequestHook`, `NodeResponseBodyHook`, `NodeResponseContext`, `NodeResponseHook`, `NodeServeOutcome`, `OnRequestResult`, `OpaqueMountDeclaration`, `Params`, `PlainRender`, `Platform`, `PlatformResponse`, `PluginTypeCollapsed`, `PrefixRegistry`, `Prettify`, `PromptArgument`, `PromptMessage`, `ROUTE_PATTERN_OVERLAP_MAX_STATES`, `RedactOptions`, `Registry`, `RequestLocal`, `RequestPath`, `ResponseBodyHook`, `ResponseBodyReplacement`, `ResponseControls`, `ResponseFinalization`, `ResponseHeadersHook`, `ResponseHeadersView`, `ResponseMapFor`, `ResponseResult`, `RouteConfigError`, `RouteConfigErrorCode`, `RouteDescriptor`, `RouteInfo`, `RouteInfoFor`, `RouteMethod`, `RoutePatternOverlapLimitError`, `RouteSchema`, `Router`, `RouterMatch`, `RunningServer`, `SSEContext`, `SSEInit`, `SSEMessage`, `SSEStream`, `ScheduledController`, `ScheduledHandler`, `Server`, `ServerOptions`, `StandardIssue`, `StandardResult`, `StandardSchemaV1`, `StandardTypes`, `StandardWebSocket`, `StatusResponse`, `ToolAnnotations`, `TopicAdapter`, `TypedSSEStream`, `UrlParts`, `VERSION`, `ValidationOutcome`, `VercelHandler`, `Version`, `WebSocketContext`, `WebSocketData`, `WebSocketHandler`, `WebSocketUpgradeOutcome`, `authenticated`, `beforeHandler`, `carryRequestLocals`, `commonSecretPatterns`, `cookieNamePrefix`, `defineContextPlugin`, `defineIdentityPlugin`, `definePlugin`, `defineRouterPlugin`, `echoParam`, `hasDuplicateCookie`, `isAuthenticatedRequest`, `isSameOriginForm`, `isSameOriginPath`, `isSameOriginRequest`, `jsonLogger`, `markAuthenticatedRequest`, `parseCookies`, `pathnameOf`, `redactLogFields`, `rejected`, `replacedRequestOf`, `requestLocal`, `routePatternOverlap`, `routeTemplateOf`, `serializeCookie`, `server`, `signValue`, `silentLogger`, `staticResponse`, `status`, `toFetchHandler`, `toLambdaHandler`, `toNetlifyHandler`, `toVercelHandler`, `unsignValue`, `urlPartsOf`, `varyOn`, `writableResponse`
23330
+ `AdmissionController`, `AdmissionDecision`, `AnyServer`, `AuthHeaders`, `AuthMaybePromise`, `AuthenticationFailure`, `AuthenticationFailureReason`, `AuthenticationInput`, `AuthenticationResult`, `AuthenticationStage`, `AuthenticationSuccess`, `Context`, `ContextPlugin`, `CookieOptions`, `CookieSecret`, `DeclaredMountRoute`, `DefinePluginResult`, `DurableObjectNamespaceLike`, `ExecutionContext`, `FRAMEWORK_NAME`, `FetchApp`, `FrameworkError`, `FrameworkName`, `Handler`, `IdentityPlugin`, `InferInput`, `InferOutput`, `JoinRoutePath`, `LambdaEvent`, `LambdaHandler`, `LambdaResponse`, `LambdaV1Event`, `LambdaV2Event`, `ListenTlsOptions`, `LogFields`, `Logger`, `METHODS`, `McpPromptDescriptor`, `McpResourceDescriptor`, `Method`, `Middleware`, `MountFetchOptions`, `MountOptions`, `MountableApp`, `NetlifyEvent`, `NetlifyHandler`, `NifraFeatureVersion`, `NifraPlugin`, `NifraWebSocket`, `NodeRequestContext`, `NodeRequestHook`, `NodeResponseBodyHook`, `NodeResponseContext`, `NodeResponseHook`, `NodeServeOutcome`, `OnRequestResult`, `OpaqueMountDeclaration`, `Params`, `PlainRender`, `Platform`, `PlatformResponse`, `PluginTypeCollapsed`, `PrefixRegistry`, `Prettify`, `PromptArgument`, `PromptMessage`, `ROUTE_PATTERN_OVERLAP_MAX_STATES`, `RedactOptions`, `Registry`, `RequestLocal`, `RequestPath`, `ResponseBodyHook`, `ResponseBodyReplacement`, `ResponseControls`, `ResponseFinalization`, `ResponseHeadersHook`, `ResponseHeadersView`, `ResponseMapFor`, `ResponseResult`, `RouteConfigError`, `RouteConfigErrorCode`, `RouteDescriptor`, `RouteInfo`, `RouteInfoFor`, `RouteMethod`, `RoutePatternOverlapLimitError`, `RouteSchema`, `Router`, `RouterMatch`, `RunningServer`, `SSEContext`, `SSEInit`, `SSEMessage`, `SSEStream`, `ScheduledController`, `ScheduledHandler`, `Server`, `ServerOptions`, `StandardIssue`, `StandardResult`, `StandardSchemaV1`, `StandardTypes`, `StandardWebSocket`, `StatusResponse`, `ToolAnnotations`, `TopicAdapter`, `TypedSSEStream`, `UrlParts`, `VERSION`, `ValidationOutcome`, `VercelHandler`, `Version`, `WebSocketContext`, `WebSocketData`, `WebSocketHandler`, `WebSocketUpgradeOutcome`, `authenticated`, `beforeHandler`, `carryRequestLocals`, `commonSecretPatterns`, `cookieNamePrefix`, `defineContextPlugin`, `defineIdentityPlugin`, `definePlugin`, `defineRouterPlugin`, `echoParam`, `hasDuplicateCookie`, `isAuthenticatedRequest`, `isSameOriginForm`, `isSameOriginPath`, `isSameOriginRequest`, `jsonLogger`, `markAuthenticatedRequest`, `parseCookies`, `pathnameOf`, `redactLogFields`, `rejected`, `replacedRequestOf`, `requestLocal`, `routePatternOverlap`, `routeTemplateOf`, `serializeCookie`, `server`, `sharedResponseCacheBypass`, `signValue`, `silentLogger`, `staticResponse`, `status`, `toFetchHandler`, `toLambdaHandler`, `toNetlifyHandler`, `toVercelHandler`, `unsignValue`, `urlPartsOf`, `varyOn`, `writableResponse`
22797
23331
 
22798
23332
  ## @nifrajs/cron
22799
23333
 
@@ -22917,7 +23451,7 @@ done-gate, or `nifra mcp` to give the agent live project tools.
22917
23451
 
22918
23452
  ## @nifrajs/web
22919
23453
 
22920
- `ACTION_GLOBAL`, `Action`, `BOUNDARY_GLOBAL`, `BackendOnly`, `Blocker`, `BlockerController`, `BlockerFunction`, `BlockerLocation`, `BlockerState`, `Boundary`, `BoundaryDescriptor`, `BoundaryError`, `BoundaryLoaderEntry`, `BoundaryLoadersOf`, `BoundaryMode`, `BoundaryRegistration`, `BoundaryRequestCtx`, `BoundaryState`, `BoundaryStates`, `BoundaryStatus`, `BrowserNavigate`, `BuildAssetSet`, `CacheStore`, `CachedResponse`, `CdnPurgeOutcome`, `CdnPurgeTarget`, `ClientAction`, `ClientActionArgs`, `ClientActionResult`, `ClientLoader`, `ClientLoaderArgs`, `ClientRequestBody`, `ClientRouteHooks`, `ClientRouter`, `ClientRouterOptions`, `CreateCspPolicyOptions`, `CreateNonceResolverOptions`, `CreateWebAppOptions`, `CspHeaderContext`, `CspPolicy`, `CssLoadingMode`, `DATA_GLOBAL`, `DATA_HEADER`, `DEFAULT_CSS_LOADING`, `DEFAULT_DEV_PORT`, `DRAFT_COOKIE`, `DataText`, `Deferred`, `DehydrateOptions`, `DehydratedQueryInfo`, `DehydratedState`, `DocumentParts`, `DraftCookieControls`, `DynamicBoundary`, `DynamicBoundaryBatch`, `EnableDraftOptions`, `FetchRouteData`, `Fetcher`, `FetcherState`, `FontDisplay`, `FontFace`, `FontPreloadInput`, `FontSource`, `GenerateClientEntryOptions`, `GenerateServerManifestOptions`, `GetStaticPaths`, `HANDOVER_ID`, `HostPolicy`, `HostPolicyOptions`, `HostPolicyRule`, `Href`, `HrefOptions`, `HtmlSanitizer`, `IDLE_BLOCKER`, `ISRApp`, `ISROptions`, `ISRPlatform`, `ISRQuery`, `ISRStoreOp`, `ISR_REVALIDATE_HEADER`, `ISR_REVALIDATE_TAGS_HEADER`, `ISR_STATUS_HEADER`, `IdentityEpochContext`, `InertScriptType`, `InfiniteData`, `InfiniteQueryHandle`, `InfiniteQueryOptions`, `InterceptBoundary`, `Intercepted`, `KVCacheStore`, `KVCacheStoreOptions`, `KVNamespaceLike`, `KeepAliveOptions`, `KeepAliveServerOptions`, `KeptPage`, `LAYOUT_DATA_GLOBAL`, `LOCALES_GLOBAL`, `LayoutEntry`, `LinkDescriptor`, `LiveClientEntry`, `Loader`, `LoaderContext`, `LoaderResponseControls`, `LoadingEntry`, `Manifest`, `MatchChain`, `MemoryCacheStore`, `MemoryCacheStoreOptions`, `MemoryStaticBoundaryCache`, `Meta`, `MetaArgs`, `MetaDescriptor`, `MetaInput`, `MiddlewareOutcome`, `MountRouterOptions`, `MutationCallbacks`, `MutationCancelledError`, `MutationContext`, `MutationHandle`, `MutationState`, `MutationStatus`, `NAV_FROM_HEADER`, `NavigateFunction`, `NavigateOptions`, `NonceContext`, `NonceGenerator`, `NonceHeader`, `NonceHeaderContext`, `NonceResolver`, `NotFoundEntry`, `NotFoundScope`, `OpenGraphInput`, `PREFETCH_HEADER`, `PRE_HYDRATION_GUARD`, `PageLocale`, `PageLocales`, `PendingBoundary`, `PrefetchMode`, `PrerenderedPageReaderOptions`, `PrerenderedPages`, `PreviewEndpointOptions`, `QueryClient`, `QueryClientOptions`, `QueryHandle`, `QueryOptions`, `QueryState`, `QueryStatus`, `REDIRECT_HEADER`, `RETAIN_HEADER`, `REVALIDATE_HEADER`, `ROOT_ATTRIBUTE`, `ROUTE_GLOBAL`, `RedirectOptions`, `RenderAdapter`, `RenderAdapterConformanceError`, `RenderAdapterConformanceFixture`, `RenderAssemblyCache`, `RenderPageInput`, `RenderPageOptions`, `RenderProps`, `RenderStreamOptions`, `RenderedPage`, `RevalidateEndpointOptions`, `RevalidateOptions`, `RevalidateResult`, `RevalidateTags`, `RevalidateTagsInput`, `RouteEntry`, `RouteMatch`, `RouteMiddleware`, `RouteModule`, `RoutePattern`, `RouteSlotName`, `RouteSlotPatternsOf`, `RouteSlotRegistry`, `RouteSlotTarget`, `RouteTable`, `RouterState`, `SERVER_FN_MODULE`, `STATUS_HEADER`, `SanitizedHtml`, `ScriptDescriptor`, `SearchOf`, `SharedBoundary`, `SharedHoleCtx`, `ShellCtx`, `ShouldRevalidate`, `ShouldRevalidateArgs`, `SsrModuleLoader`, `StaticBoundary`, `StaticBoundaryCache`, `StaticBoundaryImportEdge`, `StaticBoundaryRoot`, `StaticCtx`, `StaticPath`, `StaticPaths`, `StaticRoutes`, `StatusPageOptions`, `Submission`, `SubmitOptions`, `TrustedHtml`, `UIMatch`, `UnsafeScriptDescriptor`, `WebAppI18n`, `assertCssLoadingCompatible`, `assertRenderAdapterConformance`, `assertStaticBoundaryImports`, `boundaryDescriptors`, `boundaryModeKey`, `buildManifest`, `canonical`, `closeBoundary`, `createClientRouter`, `createCspPolicy`, `createHostPolicy`, `createMatcher`, `createMutation`, `createNonceResolver`, `createQueryClient`, `createWebApp`, `defer`, `disableDraft`, `enableDraft`, `enumerateStaticRoutes`, `filePathToPattern`, `filePathToPatterns`, `fontFace`, `fontPreload`, `generateClientEntry`, `generateServerManifest`, `getBrowserNavigate`, `gone`, `hashQueryKey`, `href`, `isCacheablePage`, `isDraftEnabled`, `isHostPolicy`, `jsonLd`, `localeOfProps`, `mergeHeads`, `nifraScriptHashes`, `normalizeCssLoading`, `notFound`, `openGraph`, `pageLocaleIn`, `prerenderedPageReader`, `previewEndpoint`, `rawHref`, `redirect`, `registerBlocker`, `renderPage`, `renderPageResult`, `resolveChainMeta`, `resolveDynamicBoundaries`, `resolveMeta`, `resolvePublicPath`, `resolveStaticBoundaries`, `revalidate`, `revalidateEndpoint`, `rotateIdentityEpoch`, `sanitizeHtml`, `sanitizedHtml`, `searchOf`, `searchOfChain`, `serializeData`, `serializeSearch`, `setBlockerController`, `setBrowserNavigate`, `setSsrModuleLoader`, `ssrModuleLoader`, `startDynamicBoundaries`, `statusPage`, `trustHtml`, `unsafeInlineScript`, `webProjectEvidence`, `withISR`
23454
+ `ACTION_GLOBAL`, `Action`, `BOUNDARY_GLOBAL`, `BackendOnly`, `Blocker`, `BlockerController`, `BlockerFunction`, `BlockerLocation`, `BlockerState`, `Boundary`, `BoundaryDescriptor`, `BoundaryError`, `BoundaryLoaderEntry`, `BoundaryLoadersOf`, `BoundaryMode`, `BoundaryRegistration`, `BoundaryRequestCtx`, `BoundaryState`, `BoundaryStates`, `BoundaryStatus`, `BrowserNavigate`, `BuildAssetSet`, `CacheStore`, `CachedResponse`, `CdnPurgeOutcome`, `CdnPurgeTarget`, `ClientAction`, `ClientActionArgs`, `ClientActionResult`, `ClientLoader`, `ClientLoaderArgs`, `ClientRequestBody`, `ClientRouteHooks`, `ClientRouter`, `ClientRouterOptions`, `CreateCspPolicyOptions`, `CreateNonceResolverOptions`, `CreateWebAppOptions`, `CspHeaderContext`, `CspPolicy`, `CssLoadingMode`, `DATA_GLOBAL`, `DATA_HEADER`, `DEFAULT_CSS_LOADING`, `DEFAULT_DEV_PORT`, `DRAFT_COOKIE`, `DataText`, `Deferred`, `DehydrateOptions`, `DehydratedQueryInfo`, `DehydratedState`, `DocumentParts`, `DraftCookieControls`, `DynamicBoundary`, `DynamicBoundaryBatch`, `EnableDraftOptions`, `FetchRouteData`, `Fetcher`, `FetcherState`, `FontDisplay`, `FontFace`, `FontPreloadInput`, `FontSource`, `GenerateClientEntryOptions`, `GenerateServerManifestOptions`, `GetStaticPaths`, `HANDOVER_ID`, `HostPolicy`, `HostPolicyOptions`, `HostPolicyRule`, `Href`, `HrefOptions`, `HrefRefusal`, `HtmlSanitizer`, `IDLE_BLOCKER`, `ISRApp`, `ISROptions`, `ISRPlatform`, `ISRQuery`, `ISRStoreOp`, `ISR_REVALIDATE_HEADER`, `ISR_REVALIDATE_TAGS_HEADER`, `ISR_STATUS_HEADER`, `IdentityEpochContext`, `InertScriptType`, `InfiniteData`, `InfiniteQueryHandle`, `InfiniteQueryOptions`, `InterceptBoundary`, `Intercepted`, `KVCacheStore`, `KVCacheStoreOptions`, `KVNamespaceLike`, `KeepAliveOptions`, `KeepAliveServerOptions`, `KeptPage`, `LAYOUT_DATA_GLOBAL`, `LOCALES_GLOBAL`, `LayoutEntry`, `LinkDescriptor`, `LiveClientEntry`, `Loader`, `LoaderContext`, `LoaderResponseControls`, `LoadingEntry`, `Manifest`, `MatchChain`, `MemoryCacheStore`, `MemoryCacheStoreOptions`, `MemoryStaticBoundaryCache`, `Meta`, `MetaArgs`, `MetaDescriptor`, `MetaInput`, `MiddlewareOutcome`, `MountRouterOptions`, `MutationCallbacks`, `MutationCancelledError`, `MutationContext`, `MutationHandle`, `MutationState`, `MutationStatus`, `NAV_FROM_HEADER`, `NavigateFunction`, `NavigateOptions`, `NonceContext`, `NonceGenerator`, `NonceHeader`, `NonceHeaderContext`, `NonceResolver`, `NotFoundEntry`, `NotFoundScope`, `OpenGraphInput`, `PREFETCH_HEADER`, `PRE_HYDRATION_GUARD`, `PageLocale`, `PageLocales`, `ParamsOfFrom`, `PendingBoundary`, `PlainKeyDefault`, `PlainQueryKey`, `PrefetchMode`, `PrerenderedPageReaderOptions`, `PrerenderedPages`, `PreviewEndpointOptions`, `QueryClient`, `QueryClientOptions`, `QueryHandle`, `QueryKey`, `QueryOptions`, `QueryState`, `QueryStatus`, `REDIRECT_HEADER`, `RETAIN_HEADER`, `REVALIDATE_HEADER`, `ROOT_ATTRIBUTE`, `ROUTE_GLOBAL`, `RedirectOptions`, `RenderAdapter`, `RenderAdapterConformanceError`, `RenderAdapterConformanceFixture`, `RenderAssemblyCache`, `RenderPageInput`, `RenderPageOptions`, `RenderProps`, `RenderStreamOptions`, `RenderedPage`, `RevalidateEndpointOptions`, `RevalidateOptions`, `RevalidateResult`, `RevalidateTags`, `RevalidateTagsInput`, `RouteEntry`, `RouteFrom`, `RouteMatch`, `RouteMiddleware`, `RouteModule`, `RouteParamsOf`, `RoutePattern`, `RouteSearchInOf`, `RouteSearchOf`, `RouteSlotName`, `RouteSlotPatternsOf`, `RouteSlotRegistry`, `RouteSlotTarget`, `RouteTable`, `RouteTablePattern`, `RouterState`, `SERVER_FN_MODULE`, `STATUS_HEADER`, `SanitizedHtml`, `ScriptDescriptor`, `SearchInputOf`, `SearchOf`, `SearchOfFrom`, `SharedBoundary`, `SharedHoleCtx`, `ShellCtx`, `ShouldRevalidate`, `ShouldRevalidateArgs`, `SsrModuleLoader`, `StaticBoundary`, `StaticBoundaryCache`, `StaticBoundaryImportEdge`, `StaticBoundaryRoot`, `StaticCtx`, `StaticPath`, `StaticPaths`, `StaticRoutes`, `StatusPageOptions`, `Submission`, `SubmitOptions`, `TrustedHtml`, `UIMatch`, `UnsafeScriptDescriptor`, `WebAppI18n`, `assertCssLoadingCompatible`, `assertRenderAdapterConformance`, `assertStaticBoundaryImports`, `boundaryDescriptors`, `boundaryModeKey`, `buildManifest`, `canonical`, `closeBoundary`, `createClientRouter`, `createCspPolicy`, `createHostPolicy`, `createMatcher`, `createMutation`, `createNonceResolver`, `createQueryClient`, `createWebApp`, `defer`, `disableDraft`, `enableDraft`, `enumerateStaticRoutes`, `filePathToPattern`, `filePathToPatterns`, `fontFace`, `fontPreload`, `generateClientEntry`, `generateServerManifest`, `getBrowserNavigate`, `gone`, `hashQueryKey`, `href`, `isCacheablePage`, `isDraftEnabled`, `isHostPolicy`, `isInertHref`, `jsonLd`, `localeOfProps`, `mergeHeads`, `nifraScriptHashes`, `normalizeCssLoading`, `notFound`, `onHrefRefused`, `openGraph`, `pageLocaleIn`, `prerenderedPageReader`, `previewEndpoint`, `queryKey`, `rawHref`, `redirect`, `registerBlocker`, `renderPage`, `renderPageResult`, `resolveChainMeta`, `resolveDynamicBoundaries`, `resolveMeta`, `resolvePublicPath`, `resolveStaticBoundaries`, `revalidate`, `revalidateEndpoint`, `rotateIdentityEpoch`, `sanitizeHtml`, `sanitizedHtml`, `searchOf`, `searchOfChain`, `serializeData`, `serializeSearch`, `setBlockerController`, `setBrowserNavigate`, `setSsrModuleLoader`, `ssrModuleLoader`, `startDynamicBoundaries`, `statusPage`, `trustHtml`, `unsafeInlineScript`, `webProjectEvidence`, `withISR`
22921
23455
 
22922
23456
  ## @nifrajs/web-preact
22923
23457