@nifrajs/cli 5.10.0 → 5.11.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 (61) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +10 -13
  4. package/dist/cli.js.map +1 -1
  5. package/dist/doctor.js +2 -2
  6. package/dist/doctor.js.map +1 -1
  7. package/dist/load.d.ts +2 -2
  8. package/dist/load.d.ts.map +1 -1
  9. package/dist/load.js +1 -1
  10. package/dist/load.js.map +1 -1
  11. package/dist/mcp-delegate.d.ts +17 -3
  12. package/dist/mcp-delegate.d.ts.map +1 -1
  13. package/dist/mcp-delegate.js +24 -9
  14. package/dist/mcp-delegate.js.map +1 -1
  15. package/dist/mcp-http.js +1 -1
  16. package/dist/mcp-relay.d.ts +37 -0
  17. package/dist/mcp-relay.d.ts.map +1 -0
  18. package/dist/mcp-relay.js +129 -0
  19. package/dist/mcp-relay.js.map +1 -0
  20. package/dist/mcp.d.ts.map +1 -1
  21. package/dist/mcp.js +55 -1
  22. package/dist/mcp.js.map +1 -1
  23. package/dist/migrate-layout.d.ts.map +1 -1
  24. package/dist/migrate-layout.js +45 -33
  25. package/dist/migrate-layout.js.map +1 -1
  26. package/dist/recipes/5.10.0.d.ts +3 -2
  27. package/dist/recipes/5.10.0.d.ts.map +1 -1
  28. package/dist/recipes/5.10.0.js +5 -4
  29. package/dist/recipes/5.10.0.js.map +1 -1
  30. package/dist/recipes/5.11.0.d.ts +10 -0
  31. package/dist/recipes/5.11.0.d.ts.map +1 -0
  32. package/dist/recipes/5.11.0.js +50 -0
  33. package/dist/recipes/5.11.0.js.map +1 -0
  34. package/dist/recipes/index.d.ts.map +1 -1
  35. package/dist/recipes/index.js +2 -0
  36. package/dist/recipes/index.js.map +1 -1
  37. package/dist/source-rewrites.d.ts +0 -5
  38. package/dist/source-rewrites.d.ts.map +1 -1
  39. package/dist/source-rewrites.js +232 -7
  40. package/dist/source-rewrites.js.map +1 -1
  41. package/dist/upgrade.d.ts +19 -1
  42. package/dist/upgrade.d.ts.map +1 -1
  43. package/dist/upgrade.js +55 -2
  44. package/dist/upgrade.js.map +1 -1
  45. package/docs/examples.json +2 -2
  46. package/docs/llms-full.txt +246 -63
  47. package/docs/types.json +316 -21
  48. package/package.json +11 -11
  49. package/src/cli.ts +10 -13
  50. package/src/doctor.ts +2 -2
  51. package/src/load.ts +6 -3
  52. package/src/mcp-delegate.ts +37 -11
  53. package/src/mcp-http.ts +1 -1
  54. package/src/mcp-relay.ts +155 -0
  55. package/src/mcp.ts +51 -1
  56. package/src/migrate-layout.ts +61 -29
  57. package/src/recipes/5.10.0.ts +5 -4
  58. package/src/recipes/5.11.0.ts +51 -0
  59. package/src/recipes/index.ts +2 -0
  60. package/src/source-rewrites.ts +250 -8
  61. package/src/upgrade.ts +71 -3
package/docs/types.json CHANGED
@@ -2485,6 +2485,12 @@
2485
2485
  "signature": "export declare const CLIENT_ENTRY_PATH = \"/__nifra/client.js\";",
2486
2486
  "doc": "/**\n * The stable URL every SSR'd page points its client entry at.\n *\n * It has to be stable, and Bun's own URL is not: that one is a content hash over the entire client graph,\n * so it changes whenever anything the entry imports changes. This path redirects to whichever hashed\n * chunk Bun is serving at the moment the browser asks, which is the only formulation that stays correct\n * across a rebuild.\n */"
2487
2487
  },
2488
+ {
2489
+ "name": "COMPONENT_OUTPUT_LIMIT",
2490
+ "kind": "const",
2491
+ "package": "@nifrajs/web",
2492
+ "signature": "export declare const COMPONENT_OUTPUT_LIMIT: 1048576;"
2493
+ },
2488
2494
  {
2489
2495
  "name": "CONTENT_SNAPSHOT_MAX",
2490
2496
  "kind": "const",
@@ -3463,14 +3469,14 @@
3463
3469
  "name": "ClientRouteHooks",
3464
3470
  "kind": "interface",
3465
3471
  "package": "@nifrajs/web",
3466
- "signature": "export interface ClientRouteHooks {\n readonly clientLoader?: ClientLoader;\n readonly clientAction?: ClientAction;\n /** The page's `shareData` export: `false` gives every reload of it fresh data. */\n readonly shareData?: boolean;\n /** The page's `keepAlive` export: the page stays mounted after a visitor leaves it. */\n readonly keepAlive?: true | KeepAliveOptions;\n /** Neutral boundary descriptors needed for soft-navigation interception. A boundary's loader lives in\n * the route's backend half, so the browser never learns whether one exists. */\n readonly boundaries?: ReadonlyArray<Omit<BoundaryDescriptor, \"hasLoad\">>;\n}",
3472
+ "signature": "export interface ClientRouteHooks {\n /** page's registered independently navigable route-slot identities. */\n readonly routeSlots?: Readonly<Record<string, readonly string[]>>;\n readonly clientLoader?: ClientLoader;\n readonly clientAction?: ClientAction;\n /** The page's `shareData` export: `false` gives every reload of it fresh data. */\n readonly shareData?: boolean;\n /** The page's `keepAlive` export: the page stays mounted after a visitor leaves it. */\n readonly keepAlive?: true | KeepAliveOptions;\n /** Neutral boundary descriptors needed for soft-navigation interception. A boundary's loader lives in\n * the route's backend half, so the browser never learns whether one exists. */\n readonly boundaries?: ReadonlyArray<Omit<BoundaryDescriptor, \"hasLoad\">>;\n}",
3467
3473
  "doc": "/** Client hooks populated by the generated route entry after a route chunk loads. */"
3468
3474
  },
3469
3475
  {
3470
3476
  "name": "ClientRouter",
3471
3477
  "kind": "interface",
3472
3478
  "package": "@nifrajs/web",
3473
- "signature": "export interface ClientRouter {\n /** Current state; stable reference between transitions (so `useSyncExternalStore` can bail). */\n snapshot: () => RouterState;\n /** Subscribe to transitions; returns an unsubscribe fn. */\n subscribe: (listener: () => void) => () => void;\n /**\n * Navigate to a path: match → fetch loader data → publish. No-op for an unmatched path. A loader\n * redirect to another route is followed; one that leaves the app (another origin, a `#fragment`, no\n * route) rejects with its target as `redirectTo`.\n */\n navigate: (path: string) => Promise<void>;\n /**\n * Submit an action (POST `body` to `action` in data mode): a redirect becomes a client\n * navigation; otherwise the data return is published as `actionData` and the active route's\n * loader is revalidated so the mutation is reflected. Pass `{ revalidate: false }` to SKIP that\n * revalidation - keep the current `data` and just publish the action's `actionData` (useful when\n * the action already returned everything that changed, saving the extra round-trip). A redirect\n * always loads its target regardless. Rejects on failure (caller falls back); once the server has\n * answered, at any status, the rejection's `redirectTo` names the page to load instead of posting\n * again. A revalidation answered with a terminal status renders that status route in the page's\n * place.\n */\n submit: (action: string, body: NonNullable<RequestInit[\"body\"]>, opts?: SubmitOptions) => Promise<void>;\n /** Run the initial route's client loader after the adapter has hydrated the SSR markup. */\n hydrate: () => Promise<void>;\n /**\n * Mark cached route data stale and refresh the active view. With `paths`, target exactly those\n * (e.g. the routes a mutation changed); without, invalidate the whole cache. The active route\n * refreshes immediately - refetched + republished - whenever it's in scope (an explicit list that\n * includes it, or an invalidate-all); other stale entries refetch lazily when next read (a\n * fetcher, or the next navigation/access). Rejects if the active refetch fails (like `navigate`).\n * A refetch answered with a terminal status renders that status route in the page's place; one\n * whose status page renders inside layouts rejects, so the caller can load the page as a document.\n * The keyed substrate for targeted revalidation (the `X-Nifra-Revalidate` header) and fetchers.\n */\n invalidate: (paths?: readonly string[]) => Promise<void>;\n /**\n * Warm a path's chunk + loader data into a bounded one-shot cache without publishing state -\n * a later `navigate` to it transitions with no network round-trip. Best-effort: failures and\n * unmatched paths are no-ops. Wired to link hover/focus by `installHistory`.\n */\n prefetch: (path: string) => Promise<void>;\n /**\n * Get (lazily creating) the stable {@link Fetcher} for `key` - an independent, concurrent\n * load/submit state machine for row-level mutations or side-channel loads that must not disturb\n * the active view. The same `key` always returns the same fetcher (so a binding can subscribe to a\n * stable store). Keys are app-chosen and typically stable (e.g. a row id).\n */\n fetcher: (key: string) => Fetcher;\n /** All live fetchers - for a global busy view (e.g. a `useFetchers` binding). */\n fetchers: () => readonly Fetcher[];\n /** Subscribe to any-fetcher-changed (a transition on any fetcher, or a new one created) - backs a\n * `useFetchers` binding; returns an unsubscribe fn. */\n subscribeFetchers: (listener: () => void) => () => void;\n /** Match a path against the manifest patterns (exposed for history/link wiring). */\n match: (path: string) => RouteMatch | null;\n}",
3479
+ "signature": "export interface ClientRouter {\n /** Current state; stable reference between transitions (so `useSyncExternalStore` can bail). */\n snapshot: () => RouterState;\n /** Subscribe to transitions; returns an unsubscribe fn. */\n subscribe: (listener: () => void) => () => void;\n /**\n * Navigate to a path: match → fetch loader data → publish. No-op for an unmatched path. A loader\n * redirect to another route is followed; one that leaves the app (another origin, a `#fragment`, no\n * route) rejects with its target as `redirectTo`.\n */\n navigate: (path: string) => Promise<void>;\n /**\n * Submit an action (POST `body` to `action` in data mode): a redirect becomes a client\n * navigation; otherwise the data return is published as `actionData` and the active route's\n * loader is revalidated so the mutation is reflected. Pass `{ revalidate: false }` to SKIP that\n * revalidation - keep the current `data` and just publish the action's `actionData` (useful when\n * the action already returned everything that changed, saving the extra round-trip). A redirect\n * always loads its target regardless. Rejects on failure (caller falls back); once the server has\n * answered, at any status, the rejection's `redirectTo` names the page to load instead of posting\n * again. A revalidation answered with a terminal status renders that status route in the page's\n * place.\n */\n submit: (action: string, body: NonNullable<RequestInit[\"body\"]>, opts?: SubmitOptions) => Promise<void>;\n /** Run the initial route's client loader after the adapter has hydrated the SSR markup. */\n hydrate: () => Promise<void>;\n /**\n * Mark cached route data stale and refresh the active view. With `paths`, target exactly those\n * (e.g. the routes a mutation changed); without, invalidate the whole cache. The active route\n * refreshes immediately - refetched + republished - whenever it's in scope (an explicit list that\n * includes it, or an invalidate-all); other stale entries refetch lazily when next read (a\n * fetcher, or the next navigation/access). Rejects if the active refetch fails (like `navigate`).\n * A refetch answered with a terminal status renders that status route in the page's place; one\n * whose status page renders inside layouts rejects, so the caller can load the page as a document.\n * The keyed substrate for targeted revalidation (the `X-Nifra-Revalidate` header) and fetchers.\n */\n invalidate: (paths?: readonly string[]) => Promise<void>;\n /**\n * Warm a path's chunk + loader data into a bounded one-shot cache without publishing state -\n * a later `navigate` to it transitions with no network round-trip. Best-effort: failures and\n * unmatched paths are no-ops. Wired to link hover/focus by `installHistory`.\n */\n prefetch: (path: string) => Promise<void>;\n /**\n * Get (lazily creating) the stable {@link Fetcher} for `key` - an independent, concurrent\n * load/submit state machine for row-level mutations or side-channel loads that must not disturb\n * the active view. The same `key` always returns the same fetcher (so a binding can subscribe to a\n * stable store). Keys are app-chosen and typically stable (e.g. a row id).\n */\n fetcher: (key: string) => Fetcher;\n /** All live fetchers - for a global busy view (e.g. a `useFetchers` binding). */\n fetchers: () => readonly Fetcher[];\n /** Subscribe to any-fetcher-changed (a transition on any fetcher, or a new one created) - backs a\n * `useFetchers` binding; returns an unsubscribe fn. */\n subscribeFetchers: (listener: () => void) => () => void;\n /** Match a path against the manifest patterns (exposed for history/link wiring). */\n match: (path: string) => RouteMatch | null;\n /** Load a route's lazy component chain before an independently mounted route slot renders it. */\n loadModule: (routeId: string, path?: string) => Promise<void>;\n /** Read and validate a route's slot registry after its module has loaded. */\n routeSlotsFor: (routeId: string) => RouteSlotRegistry;\n /** Read the generated manifest identity for a route id. */\n routePattern: (routeId: string) => string | undefined;\n}",
3474
3480
  "doc": "/** The agnostic router store consumed by per-adapter Router bindings. */"
3475
3481
  },
3476
3482
  {
@@ -3656,7 +3662,7 @@
3656
3662
  "name": "ComponentClientAdapter",
3657
3663
  "kind": "interface",
3658
3664
  "package": "@nifrajs/web",
3659
- "signature": "export interface ComponentClientAdapter {\n readonly name: ComponentState[\"adapter\"];\n prepare(record: ComponentRecord, current: CurrentComponent, host?: Element, context?: {\n readonly records: readonly ComponentRecord[];\n }): unknown | Promise<unknown>;\n hydrate(host: Element, record: ComponentRecord, prepared: unknown, current: CurrentComponent): ComponentClientRoot | Promise<ComponentClientRoot>;\n create?(host: Element, record: ComponentRecord, prepared: unknown, current: CurrentComponent): ComponentClientRoot | Promise<ComponentClientRoot>;\n update(root: ComponentClientRoot, record: ComponentRecord, prepared: unknown, current: CurrentComponent): void | Promise<void>;\n}"
3665
+ "signature": "export interface ComponentClientAdapter {\n readonly name: ComponentState[\"adapter\"];\n prepare(record: ComponentRecord, current: CurrentComponent, host?: Element, context?: {\n readonly records: readonly ComponentRecord[];\n }): unknown | Promise<unknown>;\n hydrate(host: Element, record: ComponentRecord, prepared: unknown, current: CurrentComponent): ComponentClientRoot | Promise<ComponentClientRoot>;\n create?(host: Element, record: ComponentRecord, prepared: unknown, current: CurrentComponent): ComponentClientRoot | Promise<ComponentClientRoot>;\n update(root: ComponentClientRoot, record: ComponentRecord, prepared: unknown, current: CurrentComponent): void | Promise<void>;\n /** Update a mounted root from a progressive framework stream and return its bounded snapshot. */\n updateProgressive?(root: ComponentClientRoot, flight: ReadableStream<Uint8Array>, current: CurrentComponent, signal: AbortSignal): Promise<NonNullable<ComponentRecord[\"payload\"]>>;\n}"
3660
3666
  },
3661
3667
  {
3662
3668
  "name": "ComponentClientRoot",
@@ -3704,7 +3710,13 @@
3704
3710
  "name": "ComponentOwner",
3705
3711
  "kind": "interface",
3706
3712
  "package": "@nifrajs/web",
3707
- "signature": "export interface ComponentOwner {\n readonly components: readonly ServerComponentHandle[];\n readonly capabilities?: readonly string[];\n readonly instances: (ctx: ServerComponentContext) => readonly ComponentInstance[] | Promise<readonly ComponentInstance[]>;\n /** A public, non-secret token supplied by the application's auth integration. */\n readonly scope: \"anonymous\" | ((ctx: ServerComponentContext) => string | Promise<string>);\n}"
3713
+ "signature": "export interface ComponentOwner {\n readonly components: readonly ServerComponentHandle[];\n readonly capabilities?: readonly string[];\n /**\n * Opts the complete owner route document into the shared ISR store. This is an explicit\n * application contract: every loader, layout, owner callback, and rendered record for this\n * route must be independent of request identity and secrets. Runtime validation also requires\n * the anonymous owner scope and no component capabilities.\n * Request-header reads by route middleware/loaders/layouts, component authorization/loading, or\n * app hooks registered through `createWebApp({ use })` make that response ineligible for shared\n * storage. Replaced or uninspectable request views fail closed. Database, environment, global,\n * external-service, and other dependencies remain the application's responsibility.\n */\n readonly cache?: ComponentOwnerCachePolicy;\n readonly instances: (ctx: ServerComponentContext) => readonly ComponentInstance[] | Promise<readonly ComponentInstance[]>;\n /** A public, non-secret token supplied by the application's auth integration. */\n readonly scope: \"anonymous\" | ((ctx: ServerComponentContext) => string | Promise<string>);\n}"
3714
+ },
3715
+ {
3716
+ "name": "ComponentOwnerCachePolicy",
3717
+ "kind": "interface",
3718
+ "package": "@nifrajs/web",
3719
+ "signature": "export interface ComponentOwnerCachePolicy {\n /** The cache can serve this complete route document to any anonymous visitor. */\n readonly scope: \"public\";\n /**\n * Required assertion that route, loader, layout, and component output are request-independent.\n * Nifra observes request-header reads through owner-route middleware, layouts, component\n * authorization/loading, and app hooks registered with `createWebApp({ use })`. Accessing the\n * request from an owner loader is conservatively treated as a dependency, including a native\n * `Request` copy. Replaced/uninspectable request views fail closed. Database, environment, global,\n * external-service, and other dependencies remain the application's responsibility.\n */\n readonly requestIndependent: true;\n /** Positive freshness window in seconds for this complete owner route. */\n readonly revalidate: number;\n /** Public invalidation tags shared by this route's cached documents. */\n readonly tags?: readonly string[];\n}"
3708
3720
  },
3709
3721
  {
3710
3722
  "name": "ComponentPipelineOptions",
@@ -7060,7 +7072,7 @@
7060
7072
  "name": "HrefOptions",
7061
7073
  "kind": "type",
7062
7074
  "package": "@nifrajs/web",
7063
- "signature": "export type HrefOptions<K extends Pattern> = {\n readonly to: K;\n readonly search?: SearchOfRoute<K> | undefined;\n readonly hash?: string | undefined;\n} & ParamsOption<K>;",
7075
+ "signature": "export type HrefOptions<K extends Pattern> = {\n readonly to: K;\n readonly search?: SearchOfRoute<K> | undefined;\n readonly hash?: string | undefined;\n} & ParamsOption<K> & SlotOptions<K>;",
7064
7076
  "doc": "/**\n * What {@link href} takes: the route's pattern as `to`, its `params` (required when the pattern has\n * any, absent when it has none), the route's `search` as its `searchSchema` outputs it, and the `hash`\n * without its `#`.\n */"
7065
7077
  },
7066
7078
  {
@@ -8138,6 +8150,13 @@
8138
8150
  "package": "@nifrajs/content",
8139
8151
  "signature": "export type JoinedRow<Left extends Record<string, unknown>, Right extends Record<string, unknown>, Cardinality extends JoinCardinality> = {\n readonly left: Entry<Left>;\n readonly right: Cardinality extends \"one-to-one\" ? Entry<Right> | null : ReadonlyArray<Entry<Right>>;\n};"
8140
8152
  },
8153
+ {
8154
+ "name": "JsonByteLimitError",
8155
+ "kind": "class",
8156
+ "package": "@nifrajs/core",
8157
+ "signature": "export declare class JsonByteLimitError extends RangeError {\n constructor();\n}",
8158
+ "doc": "/** A JSON value would exceed the caller's UTF-8 byte budget. */"
8159
+ },
8141
8160
  {
8142
8161
  "name": "JsonReplyContext",
8143
8162
  "kind": "interface",
@@ -8773,6 +8792,12 @@
8773
8792
  "package": "@nifrajs/web",
8774
8793
  "signature": "export interface LoadGoogleFontResult {\n readonly family: string;\n /** A self-hosted `@font-face` stylesheet (one rule per written file). Import it from your app. */\n readonly css: string;\n /** Every file written to `outDir`. */\n readonly assets: readonly FontAsset[];\n /** `fontPreload()` link-attribute sets - spread the ones you want into a layout's `meta.link`.\n * Preloading *every* weight/subset is wasteful; usually preload just the primary subset + weight. */\n readonly preloads: readonly LinkDescriptor[];\n}"
8775
8794
  },
8795
+ {
8796
+ "name": "LoadedRouteSlot",
8797
+ "kind": "interface",
8798
+ "package": "@nifrajs/web",
8799
+ "signature": "export interface LoadedRouteSlot {\n readonly routeId: string;\n readonly path: string;\n readonly params: Record<string, string>;\n readonly search: Record<string, unknown>;\n readonly data: unknown;\n readonly serverComponents?: ComponentState;\n readonly layoutData?: readonly unknown[];\n readonly boundaries?: BoundaryStates;\n readonly live?: unknown;\n /** Parent path binds the loaded view to the authorization context that requested it. */\n readonly parentPath: string;\n readonly matchChain?: MatchChain;\n readonly chain: readonly unknown[];\n}"
8800
+ },
8776
8801
  {
8777
8802
  "name": "Loader",
8778
8803
  "kind": "type",
@@ -12318,6 +12343,13 @@
12318
12343
  "signature": "export declare const ROUTE_PATTERN_OVERLAP_MAX_STATES = 100000;",
12319
12344
  "doc": "/** Hard budget for the offline route-language intersection. Never use this on the request path. */"
12320
12345
  },
12346
+ {
12347
+ "name": "ROUTE_SLOT_QUERY_PREFIX",
12348
+ "kind": "const",
12349
+ "package": "@nifrajs/web",
12350
+ "signature": "export declare const ROUTE_SLOT_QUERY_PREFIX = \"slot.\";",
12351
+ "doc": "/** Reserved query-key prefix carrying independently navigable route-slot targets. */"
12352
+ },
12321
12353
  {
12322
12354
  "name": "ROUTE_TABLE_FILE",
12323
12355
  "kind": "const",
@@ -12370,7 +12402,7 @@
12370
12402
  "name": "RateLimitOptions",
12371
12403
  "kind": "interface",
12372
12404
  "package": "@nifrajs/middleware",
12373
- "signature": "export interface RateLimitOptions {\n /** Where counters live. `MemoryStore` for dev; a shared store in production. */\n readonly store: RateLimitStore;\n /** Max requests allowed per window. */\n readonly max: number;\n /** Window length, in milliseconds. */\n readonly windowMs: number;\n /**\n * How many trusted reverse proxies sit in front of the app and append to `X-Forwarded-For`.\n * Default `0`. Prefer the app-level `server({ clientIp: { trustedHops } })` declaration, which the\n * default key already honors; this option is for a limiter that must read XFF on its own.\n *\n * The default key reads the client IP from `X-Forwarded-For` as the address your **edge** proxy\n * observed - the entry `trustedProxies` from the right (1 proxy → the rightmost hop; 2 → the\n * second-from-right; …). Your proxies append on the right, so a client can only inject fake hops on\n * the *left*, which this skips → not spoofable when `trustedProxies` matches your topology.\n *\n * ⚠️ With the default `0`, `X-Forwarded-For` is treated as fully client-controlled and **ignored**.\n * Reading the\n * *first* XFF hop - the old behavior - let any client mint a fresh bucket per request and defeat the\n * limiter.\n */\n readonly trustedProxies?: number;\n /** Exact trusted single-IP header, e.g. an infra-set `x-real-ip`. Not read unless configured. */\n readonly header?: string;\n /**\n * One shared bucket for every request that {@link header}/{@link trustedProxies} cannot key. Off by\n * default because it lets one client consume the quota for everyone. Enable only for intentional\n * global throttles; with neither `header` nor `trustedProxies` set, every request shares the bucket.\n */\n readonly allowGlobalKey?: boolean;\n /**\n * Bucket key for a request. Overrides the default key entirely - e.g. an authenticated user id.\n * `platform.clientIp` is the caller the app's `clientIp` trust declaration derived (the socket peer\n * when none is declared).\n *\n * It may return a promise, for a key that needs async work such as verifying a signed session\n * cookie with WebCrypto. A key that throws or rejects is charged to the client IP the default key\n * derives, so a forged or expired credential never earns a bucket of its own; when no client IP is\n * known either, the request is refused with a `500`, as an unkeyable request always is.\n */\n readonly key?: (req: Request, platform?: Platform) => string | Promise<string>;\n /**\n * Leave a request uncharged: it is not counted and carries no `RateLimit-*` headers. Runs before\n * the key is derived, so a health check or an internal probe never touches the store.\n */\n readonly skip?: (req: Request, platform?: Platform) => boolean;\n}"
12405
+ "signature": "export interface RateLimitOptions {\n /** Where counters live. `MemoryStore` for dev; a shared store in production. */\n readonly store: RateLimitStore;\n /** Max requests allowed per window. */\n readonly max: number;\n /** Window length, in milliseconds. */\n readonly windowMs: number;\n /**\n * How many trusted reverse proxies sit in front of the app and append to `X-Forwarded-For`.\n * Default `0`. Prefer the app-level `server({ clientIp: { trustedHops } })` declaration, which the\n * default key already honors; this option is for a limiter that must read XFF on its own.\n *\n * The default key reads the client IP from `X-Forwarded-For` as the address your **edge** proxy\n * observed - the entry `trustedProxies` from the right (1 proxy → the rightmost hop; 2 → the\n * second-from-right; …). Your proxies append on the right, so a client can only inject fake hops on\n * the *left*, which this skips → not spoofable when `trustedProxies` matches your topology.\n *\n * ⚠️ With the default `0`, `X-Forwarded-For` is treated as fully client-controlled and **ignored**.\n * Reading the\n * *first* XFF hop - the old behavior - let any client mint a fresh bucket per request and defeat the\n * limiter.\n */\n readonly trustedProxies?: number;\n /**\n * Trusted header containing exactly one IP, e.g. an infra-overwritten `x-real-ip`. A valid address is\n * canonicalized into the same bucket as the resolved caller IP (IPv4 normalized, IPv6 grouped by\n * `/64`). Missing, malformed, or comma-separated values fall through to `trustedProxies` /\n * `allowGlobalKey`; without a safe fallback the request fails closed with `500`.\n */\n readonly header?: string;\n /**\n * One shared bucket for every request that {@link header}/{@link trustedProxies} cannot key. Off by\n * default because it lets one client consume the quota for everyone. Enable only for intentional\n * global throttles; with neither `header` nor `trustedProxies` set, every request shares the bucket.\n */\n readonly allowGlobalKey?: boolean;\n /**\n * Bucket key for a request. Overrides the default key entirely - e.g. an authenticated user id.\n * `platform.clientIp` is the caller the app's `clientIp` trust declaration derived (the socket peer\n * when none is declared).\n *\n * It may return a promise, for a key that needs async work such as verifying a signed session\n * cookie with WebCrypto. A key that throws or rejects is charged to the client IP the default key\n * derives, so a forged or expired credential never earns a bucket of its own; when no client IP is\n * known either, the request is refused with a `500`, as an unkeyable request always is.\n */\n readonly key?: (req: Request, platform?: Platform) => string | Promise<string>;\n /**\n * Leave a request uncharged: it is not counted and carries no `RateLimit-*` headers. Runs before\n * the key is derived, so a health check or an internal probe never touches the store.\n */\n readonly skip?: (req: Request, platform?: Platform) => boolean;\n}"
12374
12406
  },
12375
12407
  {
12376
12408
  "name": "RateLimitResult",
@@ -13339,7 +13371,7 @@
13339
13371
  "name": "RevalidateEndpointOptions",
13340
13372
  "kind": "interface",
13341
13373
  "package": "@nifrajs/web",
13342
- "signature": "export interface RevalidateEndpointOptions {\n readonly store: CacheStore;\n /** Shared secret; the request's token must match it (constant-time). */\n readonly secret: string;\n /** Header carrying the secret. Default `x-nifra-revalidate-token`. */\n readonly tokenHeader?: string;\n /** Map a to-purge path → its cache key - MUST match the `withISR` `key` fn. The default uses the\n * revalidation request's origin plus the purged path, matching `withISR`'s default host-aware key. */\n readonly key?: (path: string, req: Request) => string;\n /** The `query` policy given to `withISR`, so a purged path's query string is keyed the same way.\n * Default `\"bypass\"`. A path whose query `withISR` never caches is refused with `400`. Ignored\n * when `key` is supplied. */\n readonly query?: ISRQuery;\n /**\n * A CDN to purge after the origin store (a `@nifrajs/web/cdn` provider). The origin goes first so a\n * CDN refetch cannot repopulate from a stale origin entry. The reply is `200` when the CDN accepted\n * the purge, `202` when it is queued (rate limit or retry), and `502` when the CDN refused it.\n */\n readonly cdn?: CdnPurgeTarget;\n /**\n * Caches below the pages whose entries carry the same tags, such as a `@nifrajs/cache` holding\n * loader data. A tag purge invalidates each of them first, then the page store, then the CDN, so a\n * page regenerated mid-purge cannot be rebuilt from stale data. A failure answers `500` before the\n * page store is touched, so a retry purges everything again. Path purges do not reach them.\n */\n readonly dataCaches?: readonly {\n invalidateTag(tag: string): unknown;\n }[];\n /**\n * The app's live runtime: a purge also tells live pages watching a purged tag to reload, after the\n * caches and before the CDN. A publish that fails answers `502` with `origin: \"done\"`.\n */\n readonly live?: {\n publish(...keys: string[]): Promise<void>;\n };\n}"
13374
+ "signature": "export interface RevalidateEndpointOptions {\n readonly store: CacheStore;\n /** The same app instance passed to `withISR`, for deployment-scoped owner-route path purges. */\n readonly app?: object;\n /** Shared secret; the request's token must match it (constant-time). */\n readonly secret: string;\n /** Header carrying the secret. Default `x-nifra-revalidate-token`. */\n readonly tokenHeader?: string;\n /** Map a to-purge path → its cache key - MUST match the `withISR` `key` fn. The default uses the\n * revalidation request's origin plus the purged path, matching `withISR`'s default host-aware key. */\n readonly key?: (path: string, req: Request) => string;\n /** The `query` policy given to `withISR`, so a purged path's query string is keyed the same way.\n * Default `\"bypass\"`. A path whose query `withISR` never caches is refused with `400`. Ignored\n * when `key` is supplied. */\n readonly query?: ISRQuery;\n /**\n * A CDN to purge after the origin store (a `@nifrajs/web/cdn` provider). The origin goes first so a\n * CDN refetch cannot repopulate from a stale origin entry. The reply is `200` when the CDN accepted\n * the purge, `202` when it is queued (rate limit or retry), and `502` when the CDN refused it.\n */\n readonly cdn?: CdnPurgeTarget;\n /**\n * Caches below the pages whose entries carry the same tags, such as a `@nifrajs/cache` holding\n * loader data. A tag purge invalidates each of them first, then the page store, then the CDN, so a\n * page regenerated mid-purge cannot be rebuilt from stale data. A failure answers `500` before the\n * page store is touched, so a retry purges everything again. Path purges do not reach them.\n */\n readonly dataCaches?: readonly {\n invalidateTag(tag: string): unknown;\n }[];\n /**\n * The app's live runtime: a purge also tells live pages watching a purged tag to reload, after the\n * caches and before the CDN. A publish that fails answers `502` with `origin: \"done\"`.\n */\n readonly live?: {\n publish(...keys: string[]): Promise<void>;\n };\n}"
13343
13375
  },
13344
13376
  {
13345
13377
  "name": "RevalidateOptions",
@@ -13837,7 +13869,7 @@
13837
13869
  "name": "RouteModule",
13838
13870
  "kind": "interface",
13839
13871
  "package": "@nifrajs/web",
13840
- "signature": "export interface RouteModule {\n readonly default: unknown;\n readonly loader?: Loader;\n /** Layout loader that must run before actions and is not retained across the action's render. */\n readonly gate?: boolean;\n readonly action?: Action;\n /**\n * Backend half only: which browser origins may POST to {@link action}. When omitted, a request\n * whose `Origin` is another site's is refused with 403 before middleware, gates or the action run;\n * requests without an `Origin` (non-browser clients) pass. An array allows exactly those origins\n * (and refuses a request without one); a function decides, receiving `null` when there is none.\n * Use it for a callback a third party posts to, such as an identity provider's `form_post`.\n * `Origin` is browser-enforced, not authentication: keep the action's own auth checks.\n */\n readonly allowedOrigins?: ReadonlyArray<string> | ((origin: string | null) => boolean);\n /**\n * Backend half only: the schema of what {@link loader} sends to the browser. Required whenever the\n * loader returns data. Keys it does not declare are dropped before the page renders; a declared\n * field of the wrong shape fails the request with a 500 naming the field's path.\n */\n readonly loaderOutput?: StandardSchemaV1;\n /** Backend half only: the schema of what {@link action} sends back, held to the same rule. */\n readonly actionOutput?: StandardSchemaV1;\n /**\n * Backend half only: the loader of a partially prerendered page's shared shell. It\n * receives no request, so its output is the same for every visitor and the shell is cached.\n */\n readonly shellLoader?: (ctx: ShellCtx) => unknown;\n /** Backend half only: the schema of what {@link shellLoader} returns. */\n readonly shellOutput?: StandardSchemaV1;\n /**\n * Backend half only: query parameters that select a different shell, each with its\n * closed set of values (`{ search: { color: [\"red\", \"blue\"] } }`). Any other parameter, or a value\n * outside its set, builds the default shell; holes still read the whole query.\n */\n readonly shellVariations?: ShellVariations;\n /** Optional client-only loader. It runs after hydration and on client navigations. */\n readonly clientLoader?: ClientLoader;\n /** Optional client-only submit wrapper. The server action remains mandatory for mutations. */\n readonly clientAction?: ClientAction;\n /** Named async boundaries owned by this route. The adapter renders their neutral state seam. A\n * boundary's `load` comes from {@link boundaryLoaders} in the route's backend half; the frontend\n * file declares only how it renders. */\n readonly boundaries?: readonly BoundaryRegistration[];\n /** Backend half only: each boundary's server loader, keyed by boundary name. */\n readonly boundaryLoaders?: Readonly<Record<string, BoundaryLoaderEntry>>;\n /** A Standard Schema validating this route's URL search params. When present, `ctx.search` is parsed +\n * validated against it (failing closed to the schema's defaults on invalid input); type it into the\n * loader with `LoaderArgs<Api, Env, typeof searchSchema>`. */\n readonly searchSchema?: StandardSchemaV1<unknown, Record<string, unknown>>;\n /** Search keys that are purely client-side UI (`\"tab\"`, a client-side `\"sort\"`, `\"modal\"`) and do NOT\n * affect this route's loader. When a client navigation stays on the same route + pathname and changes\n * ONLY these keys, the router updates the URL (so `useSearch` re-renders) WITHOUT re-running the loader.\n * Any other key change revalidates as usual - so omitting a data-affecting key here can never serve\n * stale data, it only forgoes the optimization. Client-only: the server always renders fresh. */\n readonly searchClientKeys?: readonly string[];\n /**\n * `false` gives every client reload of this page (an action's revalidation, `invalidate()`, a live\n * refresh) fresh data. By default a reload keeps the identity of the parts of `data` and the layouts'\n * data that it did not change, so an unchanged row keeps its DOM and component state, and a renderer\n * that memoizes on identity skips it. Not every unchanged row, though: an array whose first 32\n * elements all changed is taken whole, later unchanged elements included, so code that needs a row's\n * identity must not count on it. Opt out for a page whose code compares `data` against its value\n * from before the reload, or whose rows re-render whatever their identity, which then pay the\n * comparison for nothing. Client-only.\n */\n readonly shareData?: boolean;\n /**\n * Keep this page mounted after the visitor leaves it, so back and forward show it again as it was\n * left: its component state, form fields, inner scroll offsets and focus. At most three pages are\n * kept per tab, each for at most 10 minutes; a kept page is shown again only by a back or forward to\n * its own history entry, and its data reloads in place. A sign-in or sign-out drops every kept page.\n * Client-only.\n */\n readonly keepAlive?: true | KeepAliveOptions;\n readonly meta?: MetaInput;\n /**\n * Opt this route out of nifra's full-document client hydration. The server still renders the full\n * HTML document, loaders/actions still run, and native links/forms still work; the generated app\n * client, route chunks, and loader globals are omitted for hard navigations. Intended for static or\n * island-hydrated pages where interactivity is mounted by smaller, explicit client entries.\n */\n readonly hydrate?: boolean;\n /**\n * `false` renders this route's component in the browser only. The server still matches the route,\n * runs its gates and loaders, renders the layouts around it and embeds the data - it skips the\n * component alone, putting {@link HydrateFallback} (or nothing) in the page slot. The browser\n * hydrates against that, then renders the component. For a component that cannot render on a\n * server: one that reads `window` or a browser-only API while it renders.\n *\n * The module itself is still imported on the server, for its loader and options - so an import\n * that needs a browser at load time belongs inside the component (a dynamic `import()`), not at the\n * top of the file. Cannot be combined with `hydrate = false`: nothing would ever render the page.\n */\n readonly ssr?: boolean;\n /**\n * What the server renders in the page slot of an `ssr = false` route, and what the browser hydrates\n * before the component takes over - a skeleton, a spinner. Receives the same props as the\n * component, loader `data` included. Omitted ⇒ the slot is empty until the component renders.\n */\n readonly HydrateFallback?: unknown;\n /**\n * Any value to report through `useMatches` - a breadcrumb label, a render function, a flag a layout\n * reads about the page inside it. Layouts, pages, and status pages may export one. It is read from\n * the module on the server and in the browser, so it must be the same value on both.\n */\n readonly handle?: unknown;\n /**\n * On a root status page (`_404.tsx`, `_<status>.tsx`) or an `_error.tsx`. By default (`true`) the\n * page renders inside the layouts above it with their loader data and `meta`, as a nested `_404`\n * renders. When those layouts cannot render it - a loader throws, a gate or the middleware refuses -\n * a root status page renders alone and an `_error` inside its layouts without their data, with the\n * same status. `false` always renders them that way, and runs no layout loader for them.\n */\n readonly inLayouts?: boolean;\n /**\n * Opt a **static** route (no `:param`/`*`) into build-time prerendering (SSG): `prerenderRoutes`\n * (from `@nifrajs/web/build`) renders it to a static `index.html` at build. The loader runs at build\n * with the in-process `api` (build-safe data only - no per-request cookies/secrets); `defer()` on a\n * prerendered route resolves at build. For **dynamic** routes use {@link getStaticPaths} instead.\n */\n readonly prerender?: boolean;\n /**\n * Enumerate the concrete params to prerender for a **dynamic** (`:param`) route - the SSG path list\n * (blogs/docs/etc.). Runs at build; `prerenderRoutes` renders one `index.html` per returned path.\n */\n readonly getStaticPaths?: GetStaticPaths;\n /**\n * ISR freshness for this route, in **seconds**. `createWebApp` emits it as an\n * `x-nifra-isr-revalidate` response header that `withISR` reads to set the page's cache TTL\n * (overriding the wrapper's default). Older-than-`revalidate` cached pages are served stale while\n * regenerating. (Distinct from the action-revalidation `x-nifra-revalidate` header - a CSV path\n * list the client parses to refetch - so the two channels never alias.)\n */\n readonly revalidate?: number;\n /**\n * Bounded tags ISR on-demand invalidation (`?tag=...`) and a CDN purge reach this page by. A list, or\n * a function of the route's params and URL (`({ params }) => [\\`product:${params.id}\\`]`) for tags\n * per page. Tags travel to the CDN and reach anyone reading the origin: never put personal data in one.\n */\n readonly revalidateTags?: RevalidateTags;\n /**\n * No-framework island bundles (`@nifrajs/web/islands`) to load on this route, as `<script\n * type=\"module\">` in the document tail. Loaded **regardless of `hydrate`** - pair with\n * `export const hydrate = false` for a static page that ships zero framework JS and mounts\n * interactivity through `<Island>` markers + `mountIslands` enhancers instead.\n */\n readonly islandScripts?: readonly string[];\n}",
13872
+ "signature": "export interface RouteModule {\n readonly default: unknown;\n readonly loader?: Loader;\n /**\n * Named, independently navigable route regions. Each name is bound to route patterns from the\n * generated route table; URL state selects only one of these registered identities.\n */\n readonly routeSlots?: Readonly<Record<string, readonly string[]>>;\n /** Layout loader that must run before actions and is not retained across the action's render. */\n readonly gate?: boolean;\n readonly action?: Action;\n /**\n * Backend half only: which browser origins may POST to {@link action}. When omitted, a request\n * whose `Origin` is another site's is refused with 403 before middleware, gates or the action run;\n * requests without an `Origin` (non-browser clients) pass. An array allows exactly those origins\n * (and refuses a request without one); a function decides, receiving `null` when there is none.\n * Use it for a callback a third party posts to, such as an identity provider's `form_post`.\n * `Origin` is browser-enforced, not authentication: keep the action's own auth checks.\n */\n readonly allowedOrigins?: ReadonlyArray<string> | ((origin: string | null) => boolean);\n /**\n * Backend half only: the schema of what {@link loader} sends to the browser. Required whenever the\n * loader returns data. Keys it does not declare are dropped before the page renders; a declared\n * field of the wrong shape fails the request with a 500 naming the field's path.\n */\n readonly loaderOutput?: StandardSchemaV1;\n /** Backend half only: the schema of what {@link action} sends back, held to the same rule. */\n readonly actionOutput?: StandardSchemaV1;\n /**\n * Backend half only: the loader of a partially prerendered page's shared shell. It\n * receives no request, so its output is the same for every visitor and the shell is cached.\n */\n readonly shellLoader?: (ctx: ShellCtx) => unknown;\n /** Backend half only: the schema of what {@link shellLoader} returns. */\n readonly shellOutput?: StandardSchemaV1;\n /**\n * Backend half only: query parameters that select a different shell, each with its\n * closed set of values (`{ search: { color: [\"red\", \"blue\"] } }`). Any other parameter, or a value\n * outside its set, builds the default shell; holes still read the whole query.\n */\n readonly shellVariations?: ShellVariations;\n /** Optional client-only loader. It runs after hydration and on client navigations. */\n readonly clientLoader?: ClientLoader;\n /** Optional client-only submit wrapper. The server action remains mandatory for mutations. */\n readonly clientAction?: ClientAction;\n /** Named async boundaries owned by this route. The adapter renders their neutral state seam. A\n * boundary's `load` comes from {@link boundaryLoaders} in the route's backend half; the frontend\n * file declares only how it renders. */\n readonly boundaries?: readonly BoundaryRegistration[];\n /** Backend half only: each boundary's server loader, keyed by boundary name. */\n readonly boundaryLoaders?: Readonly<Record<string, BoundaryLoaderEntry>>;\n /** A Standard Schema validating this route's URL search params. When present, `ctx.search` is parsed +\n * validated against it (failing closed to the schema's defaults on invalid input); type it into the\n * loader with `LoaderArgs<Api, Env, typeof searchSchema>`. */\n readonly searchSchema?: StandardSchemaV1<unknown, Record<string, unknown>>;\n /** Search keys that are purely client-side UI (`\"tab\"`, a client-side `\"sort\"`, `\"modal\"`) and do NOT\n * affect this route's loader. When a client navigation stays on the same route + pathname and changes\n * ONLY these keys, the router updates the URL (so `useSearch` re-renders) WITHOUT re-running the loader.\n * Any other key change revalidates as usual - so omitting a data-affecting key here can never serve\n * stale data, it only forgoes the optimization. Client-only: the server always renders fresh. */\n readonly searchClientKeys?: readonly string[];\n /**\n * `false` gives every client reload of this page (an action's revalidation, `invalidate()`, a live\n * refresh) fresh data. By default a reload keeps the identity of the parts of `data` and the layouts'\n * data that it did not change, so an unchanged row keeps its DOM and component state, and a renderer\n * that memoizes on identity skips it. Not every unchanged row, though: an array whose first 32\n * elements all changed is taken whole, later unchanged elements included, so code that needs a row's\n * identity must not count on it. Opt out for a page whose code compares `data` against its value\n * from before the reload, or whose rows re-render whatever their identity, which then pay the\n * comparison for nothing. Client-only.\n */\n readonly shareData?: boolean;\n /**\n * Keep this page mounted after the visitor leaves it, so back and forward show it again as it was\n * left: its component state, form fields, inner scroll offsets and focus. At most three pages are\n * kept per tab, each for at most 10 minutes; a kept page is shown again only by a back or forward to\n * its own history entry, and its data reloads in place. A sign-in or sign-out drops every kept page.\n * Client-only.\n */\n readonly keepAlive?: true | KeepAliveOptions;\n readonly meta?: MetaInput;\n /**\n * Opt this route out of nifra's full-document client hydration. The server still renders the full\n * HTML document, loaders/actions still run, and native links/forms still work; the generated app\n * client, route chunks, and loader globals are omitted for hard navigations. Intended for static or\n * island-hydrated pages where interactivity is mounted by smaller, explicit client entries.\n */\n readonly hydrate?: boolean;\n /**\n * `false` renders this route's component in the browser only. The server still matches the route,\n * runs its gates and loaders, renders the layouts around it and embeds the data - it skips the\n * component alone, putting {@link HydrateFallback} (or nothing) in the page slot. The browser\n * hydrates against that, then renders the component. For a component that cannot render on a\n * server: one that reads `window` or a browser-only API while it renders.\n *\n * The module itself is still imported on the server, for its loader and options - so an import\n * that needs a browser at load time belongs inside the component (a dynamic `import()`), not at the\n * top of the file. Cannot be combined with `hydrate = false`: nothing would ever render the page.\n */\n readonly ssr?: boolean;\n /**\n * What the server renders in the page slot of an `ssr = false` route, and what the browser hydrates\n * before the component takes over - a skeleton, a spinner. Receives the same props as the\n * component, loader `data` included. Omitted ⇒ the slot is empty until the component renders.\n */\n readonly HydrateFallback?: unknown;\n /**\n * Any value to report through `useMatches` - a breadcrumb label, a render function, a flag a layout\n * reads about the page inside it. Layouts, pages, and status pages may export one. It is read from\n * the module on the server and in the browser, so it must be the same value on both.\n */\n readonly handle?: unknown;\n /**\n * On a root status page (`_404.tsx`, `_<status>.tsx`) or an `_error.tsx`. By default (`true`) the\n * page renders inside the layouts above it with their loader data and `meta`, as a nested `_404`\n * renders. When those layouts cannot render it - a loader throws, a gate or the middleware refuses -\n * a root status page renders alone and an `_error` inside its layouts without their data, with the\n * same status. `false` always renders them that way, and runs no layout loader for them.\n */\n readonly inLayouts?: boolean;\n /**\n * Opt a **static** route (no `:param`/`*`) into build-time prerendering (SSG): `prerenderRoutes`\n * (from `@nifrajs/web/build`) renders it to a static `index.html` at build. The loader runs at build\n * with the in-process `api` (build-safe data only - no per-request cookies/secrets); `defer()` on a\n * prerendered route resolves at build. For **dynamic** routes use {@link getStaticPaths} instead.\n */\n readonly prerender?: boolean;\n /**\n * Enumerate the concrete params to prerender for a **dynamic** (`:param`) route - the SSG path list\n * (blogs/docs/etc.). Runs at build; `prerenderRoutes` renders one `index.html` per returned path.\n */\n readonly getStaticPaths?: GetStaticPaths;\n /**\n * ISR freshness for this route, in **seconds**. `createWebApp` emits it as an\n * `x-nifra-isr-revalidate` response header that `withISR` reads to set the page's cache TTL\n * (overriding the wrapper's default). Older-than-`revalidate` cached pages are served stale while\n * regenerating. (Distinct from the action-revalidation `x-nifra-revalidate` header - a CSV path\n * list the client parses to refetch - so the two channels never alias.)\n */\n readonly revalidate?: number;\n /**\n * Bounded tags ISR on-demand invalidation (`?tag=...`) and a CDN purge reach this page by. A list, or\n * a function of the route's params and URL (`({ params }) => [\\`product:${params.id}\\`]`) for tags\n * per page. Tags travel to the CDN and reach anyone reading the origin: never put personal data in one.\n */\n readonly revalidateTags?: RevalidateTags;\n /**\n * No-framework island bundles (`@nifrajs/web/islands`) to load on this route, as `<script\n * type=\"module\">` in the document tail. Loaded **regardless of `hydrate`** - pair with\n * `export const hydrate = false` for a static page that ships zero framework JS and mounts\n * interactivity through `<Island>` markers + `mountIslands` enhancers instead.\n */\n readonly islandScripts?: readonly string[];\n}",
13841
13873
  "doc": "/** A route module - the default component + optional loader / action / meta. */"
13842
13874
  },
13843
13875
  {
@@ -13892,6 +13924,131 @@
13892
13924
  "signature": "export interface RouteSchema {\n /** Explicit external-protocol mode. The handler owns raw `c.req` parsing/streaming; no JSON body\n * parser or schema-driven 422 path is installed. A finite transport cap still applies by default. */\n readonly wire?: \"raw\";\n /**\n * Choose trust-boundary order for sensitive routes. Public routes validate first by default;\n * routes with `authenticate()` default to auth first. `validate-before-auth` is an explicit\n * compatibility escape hatch, while `auth-before-validation` can reject without parsing the body.\n */\n readonly validationOrder?: \"validate-before-auth\" | \"auth-before-validation\";\n /** Transport body cap for this route. Defaults to the server's maxBodyBytes. Use a finite\n * smaller/larger limit for a specific endpoint. The 'unlimited' value is an explicit\n * streaming/upload exemption and requires a non-empty bodyLimitReason for auditability.\n *\n * 'unlimited' is legal only for schema-less streaming/upload routes. It is rejected with `body` or\n * `idempotency`, because those lanes buffer the body before user code can apply a protocol-specific\n * bound. Read an unlimited route from `c.req.body` as a stream and bound it by the protocol it speaks;\n * `nifra.body-bounded` is deliberately NOT published for an unlimited route. */\n readonly bodyLimit?: number | \"unlimited\";\n /** Required explanation when bodyLimit is 'unlimited' (for example, a streaming upload is\n * bounded by an upstream object-store protocol). */\n readonly bodyLimitReason?: string;\n /** Declared effect tokens. Reflected for assurance; never read by validation or serialization. */\n readonly capabilities?: readonly string[];\n /**\n * Dedupe retries of this (mutating) route on an `Idempotency-Key` header. The first request runs and\n * its response is stored; a retry with the same key replays that response without re-running the\n * handler, and a key reused with a different body is rejected (409). A missing key on an\n * idempotency-required route fails closed (400). Off the hot path - routes without it are unchanged.\n */\n readonly idempotency?: IdempotencyConfig;\n /**\n * Highest data-sensitivity this route's response body carries (`public` | `pii` | `secret`). A\n * declarative, compile-time + introspection fact - never validated at runtime. Reflected for tooling,\n * recorded in the capability lockfile (so a route that starts returning PII is a reviewable change),\n * and read by downstream policy (e.g. a partner-API surface refusing to expose `pii`/`secret`).\n */\n readonly classification?: DataClassification;\n /**\n * Inline **route-assurance evidence**: the enforcement posture this route carries, declared adjacent to\n * the handler (e.g. `[NIFRA_ASSURANCE.AUTHENTICATED]`). Each id becomes route-scoped `declared` evidence\n * in reflection, so a `nifra.assurance.ts` policy `require:` clause is satisfiable WITHOUT rewriting an\n * in-handler guard into a `withRouteAssurance`-marked middleware. Ids are lowercase dot/dash segments\n * (invalid ids throw at registration). Reflected for the assurance gate; never read on the hot path.\n *\n * This is an author ASSERTION (recorded as `source: \"declared\"`), not runtime proof - like every\n * assurance marker it is trusted by the static gate, which matches on the evidence id, not its source.\n * Declare an id only on a route whose guard actually enforces it; a false declaration silently satisfies\n * the policy. (`source` is retained in reflection, so a stricter policy or reviewer can still tell\n * declared evidence from enforcement-module evidence.)\n */\n readonly assurance?: readonly string[];\n /**\n * Mark this route a **dynamic route family**: a template (`/api/:slug/:resource`) whose concrete\n * resources are resolved at runtime (auto-CRUD over tenant-defined tables, a catch-all dispatcher).\n * Purely declarative - it does not change dispatch. It surfaces in reflection so the assurance gate and\n * tooling treat the one templated route as a deliberate family whose evidence covers every runtime-\n * resolved resource, instead of reading it as a single forgotten route.\n */\n readonly family?: boolean;\n /** Optional **path-params schema**. Path params arrive as strings (`/users/:id` -> `c.params.id`);\n * declaring a schema validates them at the boundary (a malformed `:id` is a `422` before the handler,\n * like `body`/`query`) and can coerce them (use `t.query({ id: t.integer() })` for a numeric param).\n * The schema must cover every path param; with the strict default an undeclared path param is rejected.\n * When omitted, `c.params` stays the path-inferred `Record<name, string>`. */\n readonly params?: StandardSchemaV1;\n /** Optional request-header schema; the validated output is `c.headers` and a failure is a `422`.\n * Every client sends headers a route never declares (`host`, `user-agent`, `accept`), so a closed\n * object schema (`t.object`) validates only the names it declares, each read case-insensitively and\n * keyed as declared. `t.headers` is the open form: it receives every header, names lower-cased,\n * and coerces values like `t.query`. A schema that does not expose its JSON Schema (a zod\n * `.strict()` or valibot `strictObject`) receives every header, so declare it open. */\n readonly headers?: StandardSchemaV1;\n /** Optional request-cookie schema. It validates the cookies parsed from the `Cookie` header -\n * names as sent, values URL-decoded strings, the first of a repeated name - before the handler\n * runs, and the validated output is `c.cookies`. A failure is a `422`, like `headers`. A browser\n * sends every cookie the site has set, so declare the ones the route reads with an open schema\n * (`t.cookies`, `t.looseObject`) rather than rejecting the rest. */\n readonly cookies?: StandardSchemaV1;\n readonly body?: StandardSchemaV1;\n readonly query?: StandardSchemaV1;\n /** Optional **response contract**. When declared: the handler's return is type-checked against it\n * (the implementation can't drift from the contract), the typed client sees THIS as the response type\n * (the contract - not the handler's incidental return), and it's emitted into OpenAPI/JSON-Schema so\n * tooling and coding agents can read the exact shape. It is **not** validated at runtime (zero\n * hot-path cost) - purely a compile-time + introspection contract. */\n readonly response?: StandardSchemaV1;\n /**\n * Optional **error-response contract**: a map of HTTP status code → the Standard Schema of that error's\n * body. Declares a route's failure modes so they flow into OpenAPI (as non-2xx `responses`), the\n * `/llms.txt` context, and other introspection - the whole contract, not just the happy path, is legible\n * to tooling and coding agents. Like `response`, it is **not** validated at runtime (zero hot-path cost);\n * it's a compile-time + introspection contract. Example: `{ 404: NotFound, 409: Conflict }`. */\n readonly errors?: Readonly<Record<number, StandardSchemaV1>>;\n /**\n * Optional **SSE event contract**: the Standard Schema of each event's `data` payload on a\n * streaming route (declared via `app.sse()`). Marks the route as a typed event stream - the\n * typed client grows a `.subscribe()` for it, and the schema flows into reflection. Like\n * `response`, it is **not** validated at runtime (zero hot-path cost); the server-side\n * `stream.send()` is compile-time-checked against it instead.\n */\n readonly sse?: StandardSchemaV1;\n /**\n * Hook fired when the request fails `headers`/`cookies`/`params`/`body`/`query` validation, before the handler\n * runs. `kind` says which input failed. Its return value selects one of three outcomes (may be async):\n * - a **`Response`** → returned as-is, short-circuiting the route (custom error envelope, redirect, …).\n * - **any other value** → treated as a repaired payload and **re-validated once** against the same\n * schema. If it now passes, the handler runs with it; if it still fails, the original `422` stands.\n * Re-validation means a bad return can't bypass the schema - the trust boundary holds.\n * - **`undefined`** → give up; the original validation `422` is returned unchanged.\n * A route hook **overrides** the app-wide default set via `server({ onValidationError })`; return\n * `undefined` to fall through to the plain `422` even when an app default exists. Typical uses: a custom\n * error envelope, coercing the input, or prompting an LLM to repair the payload (re-validated, so it can't\n * bypass the schema).\n */\n readonly onValidationError?: (issues: ReadonlyArray<StandardIssue>, ctx: Context, kind: \"body\" | \"query\" | \"params\" | \"headers\" | \"cookies\") => Response | unknown | Promise<Response | unknown>;\n}",
13893
13925
  "doc": "/** Per-route input schemas. Each is any Standard Schema (zod/valibot/arktype/…). */"
13894
13926
  },
13927
+ {
13928
+ "name": "RouteSlot",
13929
+ "kind": "function",
13930
+ "package": "@nifrajs/web-preact",
13931
+ "signature": "export declare function RouteSlot({ name, fallback, error }: RouteSlotProps): VNode | null;"
13932
+ },
13933
+ {
13934
+ "name": "RouteSlot",
13935
+ "kind": "function",
13936
+ "package": "@nifrajs/web-react",
13937
+ "signature": "export declare function RouteSlot({ name, fallback, error }: RouteSlotProps): ReactNode;",
13938
+ "doc": "/** Render the registered route's complete layout and page chain in this independently navigable region. */"
13939
+ },
13940
+ {
13941
+ "name": "RouteSlot",
13942
+ "kind": "const",
13943
+ "package": "@nifrajs/web-vue",
13944
+ "signature": "export declare const RouteSlot: import(\"vue\").DefineComponent<import(\"vue\").ExtractPropTypes<{\n name: {\n type: PropType<RouteSlotName>;\n required: true;\n };\n}>, () => import(\"vue\").VNode<import(\"vue\").RendererNode, import(\"vue\").RendererElement, {\n [key: string]: any;\n}> | import(\"vue\").VNode<import(\"vue\").RendererNode, import(\"vue\").RendererElement, {\n [key: string]: any;\n}>[] | null, {}, {}, {}, import(\"vue\").ComponentOptionsMixin, import(\"vue\").ComponentOptionsMixin, {}, string, import(\"vue\").PublicProps, Readonly<import(\"vue\").ExtractPropTypes<{\n name: {\n type: PropType<RouteSlotName>;\n required: true;\n };\n}>> & Readonly<{}>, {}, {}, {}, {}, string, import(\"vue\").ComponentProvideOptions, true, {}, any>;"
13945
+ },
13946
+ {
13947
+ "name": "RouteSlotController",
13948
+ "kind": "interface",
13949
+ "package": "@nifrajs/web-preact",
13950
+ "signature": "export interface RouteSlotController {\n readonly target: string | undefined;\n readonly status: RouteSlotStatus;\n readonly content: LoadedRouteSlot | undefined;\n readonly error: string | undefined;\n open(target: RouteSlotTarget): void;\n close(): void;\n}"
13951
+ },
13952
+ {
13953
+ "name": "RouteSlotController",
13954
+ "kind": "interface",
13955
+ "package": "@nifrajs/web-react",
13956
+ "signature": "export interface RouteSlotController {\n readonly target: string | undefined;\n readonly status: RouteSlotStatus;\n readonly content: LoadedRouteSlot | undefined;\n readonly error: string | undefined;\n open(target: RouteSlotTarget): void;\n close(): void;\n}"
13957
+ },
13958
+ {
13959
+ "name": "RouteSlotController",
13960
+ "kind": "interface",
13961
+ "package": "@nifrajs/web-svelte",
13962
+ "signature": "export interface RouteSlotController {\n readonly target: string | undefined;\n open(target: RouteSlotTarget): void;\n close(): void;\n}"
13963
+ },
13964
+ {
13965
+ "name": "RouteSlotController",
13966
+ "kind": "interface",
13967
+ "package": "@nifrajs/web-vue",
13968
+ "signature": "export interface RouteSlotController {\n readonly target: ComputedRef<string | undefined>;\n readonly status: ComputedRef<RouteSlotStatus>;\n readonly content: ComputedRef<LoadedRouteSlot | undefined>;\n readonly error: ComputedRef<string | undefined>;\n open(target: RouteSlotTarget): void;\n close(): void;\n}"
13969
+ },
13970
+ {
13971
+ "name": "RouteSlotLoadError",
13972
+ "kind": "class",
13973
+ "package": "@nifrajs/web",
13974
+ "signature": "export declare class RouteSlotLoadError extends Error {\n readonly code: string;\n constructor(code: string);\n}"
13975
+ },
13976
+ {
13977
+ "name": "RouteSlotName",
13978
+ "kind": "type",
13979
+ "package": "@nifrajs/web",
13980
+ "signature": "export type RouteSlotName = NamesInRoute<RouteTable[keyof RouteTable]> & string;",
13981
+ "doc": "/** Union of slot names registered by the generated route manifest. */"
13982
+ },
13983
+ {
13984
+ "name": "RouteSlotPatternsOf",
13985
+ "kind": "type",
13986
+ "package": "@nifrajs/web",
13987
+ "signature": "export type RouteSlotPatternsOf<T> = T extends {\n readonly routeSlots: infer Slots;\n} ? Slots extends Readonly<Record<string, readonly string[]>> ? Slots : Readonly<Record<never, never>> : Readonly<Record<never, never>>;",
13988
+ "doc": "/** Preserve route-module slot declarations in the generated, per-route `RouteTable`. */"
13989
+ },
13990
+ {
13991
+ "name": "RouteSlotProps",
13992
+ "kind": "interface",
13993
+ "package": "@nifrajs/web-preact",
13994
+ "signature": "export interface RouteSlotProps {\n readonly name: RouteSlotName;\n readonly fallback?: ComponentChildren;\n readonly error?: ComponentChildren | ((code: string) => ComponentChildren);\n}"
13995
+ },
13996
+ {
13997
+ "name": "RouteSlotProps",
13998
+ "kind": "interface",
13999
+ "package": "@nifrajs/web-react",
14000
+ "signature": "export interface RouteSlotProps {\n readonly name: RouteSlotName;\n readonly fallback?: ReactNode;\n readonly error?: ReactNode | ((code: string) => ReactNode);\n}"
14001
+ },
14002
+ {
14003
+ "name": "RouteSlotProps",
14004
+ "kind": "interface",
14005
+ "package": "@nifrajs/web-svelte",
14006
+ "signature": "export interface RouteSlotProps {\n name: RouteSlotName\n /** Rendered while the addressed route is loading. */\n children?: Snippet\n /** Rendered when the authorized route request fails, with a stable error code. */\n error?: Snippet<[code: string]>\n}"
14007
+ },
14008
+ {
14009
+ "name": "RouteSlotRegistry",
14010
+ "kind": "type",
14011
+ "package": "@nifrajs/web",
14012
+ "signature": "export type RouteSlotRegistry = Readonly<Record<string, readonly string[]>>;"
14013
+ },
14014
+ {
14015
+ "name": "RouteSlotRuntime",
14016
+ "kind": "interface",
14017
+ "package": "@nifrajs/web",
14018
+ "signature": "export interface RouteSlotRuntime {\n readonly router: RouteSlotRouter;\n readonly routes: Readonly<Record<string, readonly unknown[]>>;\n readonly searchSchemas: Readonly<Record<string, readonly (StandardSchemaV1 | undefined)[]>> | undefined;\n readonly matchChains: Readonly<Record<string, MatchChain>> | undefined;\n}"
14019
+ },
14020
+ {
14021
+ "name": "RouteSlotSnapshot",
14022
+ "kind": "interface",
14023
+ "package": "@nifrajs/web",
14024
+ "signature": "export interface RouteSlotSnapshot {\n readonly key?: string;\n readonly status: RouteSlotStatus;\n readonly content?: LoadedRouteSlot;\n readonly error?: string;\n}"
14025
+ },
14026
+ {
14027
+ "name": "RouteSlotStateError",
14028
+ "kind": "class",
14029
+ "package": "@nifrajs/web",
14030
+ "signature": "export declare class RouteSlotStateError extends TypeError {\n readonly code: \"malformed\" | \"unknown_slot\" | \"unknown_route\" | \"invalid_target\" | \"too_large\";\n constructor(code: RouteSlotStateError[\"code\"], message?: string);\n}"
14031
+ },
14032
+ {
14033
+ "name": "RouteSlotStatus",
14034
+ "kind": "type",
14035
+ "package": "@nifrajs/web",
14036
+ "signature": "export type RouteSlotStatus = \"idle\" | \"loading\" | \"ready\" | \"error\";"
14037
+ },
14038
+ {
14039
+ "name": "RouteSlotStore",
14040
+ "kind": "class",
14041
+ "package": "@nifrajs/web",
14042
+ "signature": "export declare class RouteSlotStore {\n #private;\n constructor(_storeKey: string, onUnused?: () => void);\n get disposed(): boolean;\n get active(): boolean;\n readonly getSnapshot: () => RouteSlotSnapshot;\n readonly getServerSnapshot: () => RouteSlotSnapshot;\n readonly subscribe: (listener: () => void) => (() => void);\n sync(key: string, loader?: RouteSlotLoader, error?: string): void;\n dispose(): void;\n refreshForRuntimeChange(): void;\n}",
14043
+ "doc": "/** One shared lifecycle for every adapter consuming the same parent page and slot name. */"
14044
+ },
14045
+ {
14046
+ "name": "RouteSlotTarget",
14047
+ "kind": "type",
14048
+ "package": "@nifrajs/web",
14049
+ "signature": "export type RouteSlotTarget = Href<keyof RouteTable & string>;",
14050
+ "doc": "/** A typed route URL that a registered route slot may display. */"
14051
+ },
13895
14052
  {
13896
14053
  "name": "RouteSnapshot",
13897
14054
  "kind": "interface",
@@ -14877,8 +15034,8 @@
14877
15034
  "name": "SecretExemption",
14878
15035
  "kind": "interface",
14879
15036
  "package": "@nifrajs/web",
14880
- "signature": "export interface SecretExemption {\n readonly rule: SecretRule;\n /** The finding's file as reported: app-relative for a source or `public/` file, output-relative for\n * an emitted file. */\n readonly file?: string;\n /** For `private-env-value`: the variable whose value may ship. */\n readonly env?: string;\n readonly reason: string;\n}",
14881
- "doc": "/**\n * One reviewed false positive. It names the rule, where the finding is and why it may ship: there is\n * no exemption by value, so a credential that turns up somewhere else still fails the build.\n */"
15037
+ "signature": "export interface SecretExemption {\n readonly rule: SecretRule;\n /** Exempt this rule throughout the named file. Source and `public/` paths are app-relative;\n * emitted-file paths are output-relative. */\n readonly file?: string;\n /** For `private-env-value`: exempt every finding sourced from this variable across scanned output. */\n readonly env?: string;\n readonly reason: string;\n}",
15038
+ "doc": "/**\n * One reviewed false positive. A file scope exempts a rule throughout that file. For\n * `private-env-value`, an env scope exempts every finding sourced from that variable anywhere in\n * scanned output.\n */"
14882
15039
  },
14883
15040
  {
14884
15041
  "name": "SecretFinding",
@@ -15130,20 +15287,20 @@
15130
15287
  "name": "ServerComponentRenderAdapter",
15131
15288
  "kind": "interface",
15132
15289
  "package": "@nifrajs/web",
15133
- "signature": "export interface ServerComponentRenderAdapter {\n readonly name: \"react\" | \"vue\" | \"svelte\" | \"solid\" | \"preact\";\n readonly version: 1;\n render(view: unknown, props: unknown, context: ComponentRenderContext): ComponentRender | Promise<ComponentRender>;\n}"
15290
+ "signature": "export interface ServerComponentRenderAdapter {\n readonly name: \"react\" | \"vue\" | \"svelte\" | \"solid\" | \"preact\";\n readonly version: 1;\n render(view: unknown, props: unknown, context: ComponentRenderContext): ComponentRender | Promise<ComponentRender>;\n /** Optional React Flight stream for progressive owner refreshes. */\n renderProgressive?(view: unknown, props: unknown, context: ComponentRenderContext): ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>;\n}"
15134
15291
  },
15135
15292
  {
15136
15293
  "name": "ServerComponentRuntime",
15137
15294
  "kind": "interface",
15138
15295
  "package": "@nifrajs/web",
15139
- "signature": "export interface ServerComponentRuntime {\n owns(routeId: string): boolean;\n capabilities(routeId: string): readonly string[];\n classify(request: Request, routeId: string): import(\"./protocol.js\").ComponentRequest | undefined;\n execute(routeId: string, context: ServerComponentContext, selection?: import(\"./protocol.js\").ComponentRequest, nonce?: string): Promise<ComponentState>;\n response(state: ComponentState, selection: import(\"./protocol.js\").ComponentRequest): Response;\n failure(error: unknown): Response;\n /** Whether the route's partially prerendered holes may show server components. */\n hosts?(routeId: string): boolean;\n /** Render `component` as the route's hole `key`, with the hole loader's output as its input. */\n hole?(routeId: string, component: object, key: string, input: unknown, context: ServerComponentContext): Promise<ComponentRecord>;\n}",
15296
+ "signature": "export interface ServerComponentRuntime {\n owns(routeId: string): boolean;\n capabilities(routeId: string): readonly string[];\n /** Deployment/build/adapter/route identity for explicitly public owner-page ISR entries. */\n cacheIdentity?(routeId: string): string | undefined;\n /** Public ISR policy for the complete document of an opted-in owner route. */\n cachePolicy?(routeId: string): ComponentOwnerCachePolicy | undefined;\n classify(request: Request, routeId: string): import(\"./protocol.js\").ComponentRequest | undefined;\n execute(routeId: string, context: ServerComponentContext, selection?: import(\"./protocol.js\").ComponentRequest, nonce?: string): Promise<ComponentState>;\n /** Progressive owner refresh; present only when the render adapter supports it. */\n progressive?(routeId: string, context: ServerComponentContext, selection: import(\"./protocol.js\").ComponentRequest, nonce?: string): Promise<Response>;\n response(state: ComponentState, selection: import(\"./protocol.js\").ComponentRequest): Response;\n failure(error: unknown): Response;\n /** Whether the route's partially prerendered holes may show server components. */\n hosts?(routeId: string): boolean;\n /** Render `component` as the route's hole `key`, with the hole loader's output as its input. */\n hole?(routeId: string, component: object, key: string, input: unknown, context: ServerComponentContext): Promise<ComponentRecord>;\n}",
15140
15297
  "doc": "/** Optional seam passed to createWebApp; disabled applications have no runtime import of this feature. */"
15141
15298
  },
15142
15299
  {
15143
15300
  "name": "ServerComponentsOptions",
15144
15301
  "kind": "interface",
15145
15302
  "package": "@nifrajs/web",
15146
- "signature": "export interface ServerComponentsOptions {\n readonly build: string;\n readonly adapter: ServerComponentRenderAdapter;\n readonly owners: Readonly<Record<string, ComponentOwner>>;\n /**\n * Route id to the server components its partially prerendered holes may show, each\n * through `serverHole`. A route is an owner or hosts holes, never both.\n */\n readonly holes?: Readonly<Record<string, ComponentHoles>>;\n readonly capabilities?: readonly CapabilityDefinition[];\n readonly assets?: readonly string[];\n}"
15303
+ "signature": "export interface ServerComponentsOptions {\n readonly build: string;\n /** Unique per deployed environment when any owner opts into public ISR caching. */\n readonly deployment?: string;\n readonly adapter: ServerComponentRenderAdapter;\n readonly owners: Readonly<Record<string, ComponentOwner>>;\n /**\n * Route id to the server components its partially prerendered holes may show, each\n * through `serverHole`. A route is an owner or hosts holes, never both.\n */\n readonly holes?: Readonly<Record<string, ComponentHoles>>;\n readonly capabilities?: readonly CapabilityDefinition[];\n readonly assets?: readonly string[];\n}"
15147
15304
  },
15148
15305
  {
15149
15306
  "name": "ServerComponentsPluginOptions",
@@ -15590,7 +15747,7 @@
15590
15747
  "name": "SingleCopyOptions",
15591
15748
  "kind": "interface",
15592
15749
  "package": "@nifrajs/core",
15593
- "signature": "export interface SingleCopyOptions {\n /** The app root whose copy wins. Defaults to `process.cwd()`. */\n readonly cwd?: string;\n /** Package names or `@scope/*` patterns. Defaults to the `nifra.singleCopy` declaration. */\n readonly packages?: readonly string[];\n /**\n * Throw instead of warning when a declared package keeps a second copy (a version skew, or a file\n * with no counterpart in the app's copy). Read by {@link registerSingleCopy}; defaults to the\n * declaration's `strict` flag, or {@link SINGLE_COPY_STRICT_ENV} set to `1`/`true`.\n */\n readonly strict?: boolean;\n /**\n * Called for every skip: by {@link registerSingleCopy} for each planned `version-skew`, and by the\n * plugin for each `no-counterpart` file it lets through at load time. Unset, the plugin stays silent\n * (a bundle's duplicates are the identity preflight's to report); the registrar always warns, or\n * throws in strict mode, and calls this as well.\n */\n readonly onSkip?: (skip: SingleCopySkip) => void;\n}"
15750
+ "signature": "export interface SingleCopyOptions {\n /** The app root whose copy wins. Defaults to its nearest declaration, or `process.cwd()` if none. */\n readonly cwd?: string;\n /** Package names or `@scope/*` patterns. Defaults to the `nifra.singleCopy` declaration. */\n readonly packages?: readonly string[];\n /**\n * Throw instead of warning when a declared package keeps a second copy (a version skew, or a file\n * with no counterpart in the app's copy). Read by {@link registerSingleCopy}; defaults to the\n * declaration's `strict` flag, or {@link SINGLE_COPY_STRICT_ENV} set to `1`/`true`.\n */\n readonly strict?: boolean;\n /**\n * Called for every skip: by {@link registerSingleCopy} for each planned `version-skew`, and by the\n * plugin for each `no-counterpart` file it lets through at load time. Unset, the plugin stays silent\n * (a bundle's duplicates are the identity preflight's to report); the registrar always warns, or\n * throws in strict mode, and calls this as well.\n */\n readonly onSkip?: (skip: SingleCopySkip) => void;\n}"
15594
15751
  },
15595
15752
  {
15596
15753
  "name": "SingleCopyPlan",
@@ -17045,21 +17202,28 @@
17045
17202
  "kind": "interface",
17046
17203
  "package": "@nifrajs/auth",
17047
17204
  "signature": "export interface UnauthenticatedResponse {\n /** An error status, 400-599. Default `401`. */\n readonly status?: number;\n /** The body; present but `undefined` sends none. Default `{ ok: false, error: \"unauthorized\" }`. */\n readonly body?: unknown;\n /** Response headers, such as a `www-authenticate` challenge. */\n readonly headers?: Readonly<Record<string, string>>;\n}",
17048
- "doc": "/** The response a guard denies a missing session with, in place of the default `401` JSON. */"
17205
+ "doc": "/**\n * The response a guard denies a missing session with, in place of the default `401` JSON. Every\n * nifra auth package's guard options named `unauthenticated` takes this shape.\n */"
17049
17206
  },
17050
17207
  {
17051
17208
  "name": "UnauthenticatedResponse",
17052
17209
  "kind": "interface",
17053
17210
  "package": "@nifrajs/authjs",
17054
17211
  "signature": "export interface UnauthenticatedResponse {\n /** An error status, 400-599. Default `401`. */\n readonly status?: number;\n /** The body; present but `undefined` sends none. Default `{ ok: false, error: \"unauthorized\" }`. */\n readonly body?: unknown;\n /** Response headers, such as a `www-authenticate` challenge. */\n readonly headers?: Readonly<Record<string, string>>;\n}",
17055
- "doc": "/** The response a guard denies a missing session with, in place of the default `401` JSON. */"
17212
+ "doc": "/**\n * The response a guard denies a missing session with, in place of the default `401` JSON. Every\n * nifra auth package's guard options named `unauthenticated` takes this shape.\n */"
17056
17213
  },
17057
17214
  {
17058
17215
  "name": "UnauthenticatedResponse",
17059
17216
  "kind": "interface",
17060
17217
  "package": "@nifrajs/better-auth",
17061
17218
  "signature": "export interface UnauthenticatedResponse {\n /** An error status, 400-599. Default `401`. */\n readonly status?: number;\n /** The body; present but `undefined` sends none. Default `{ ok: false, error: \"unauthorized\" }`. */\n readonly body?: unknown;\n /** Response headers, such as a `www-authenticate` challenge. */\n readonly headers?: Readonly<Record<string, string>>;\n}",
17062
- "doc": "/** The response a guard denies a missing session with, in place of the default `401` JSON. */"
17219
+ "doc": "/**\n * The response a guard denies a missing session with, in place of the default `401` JSON. Every\n * nifra auth package's guard options named `unauthenticated` takes this shape.\n */"
17220
+ },
17221
+ {
17222
+ "name": "UnauthenticatedResponse",
17223
+ "kind": "interface",
17224
+ "package": "@nifrajs/core",
17225
+ "signature": "export interface UnauthenticatedResponse {\n /** An error status, 400-599. Default `401`. */\n readonly status?: number;\n /** The body; present but `undefined` sends none. Default `{ ok: false, error: \"unauthorized\" }`. */\n readonly body?: unknown;\n /** Response headers, such as a `www-authenticate` challenge. */\n readonly headers?: Readonly<Record<string, string>>;\n}",
17226
+ "doc": "/**\n * The response a guard denies a missing session with, in place of the default `401` JSON. Every\n * nifra auth package's guard options named `unauthenticated` takes this shape.\n */"
17063
17227
  },
17064
17228
  {
17065
17229
  "name": "UndiciTransportOptions",
@@ -17092,7 +17256,7 @@
17092
17256
  "kind": "type",
17093
17257
  "package": "@nifrajs/uploads",
17094
17258
  "signature": "export type UploadResult = {\n readonly ok: true;\n readonly mime: string;\n readonly ext: string;\n readonly bytes: Uint8Array;\n} | {\n readonly ok: false;\n readonly reason: \"too_large\" | \"empty\" | \"unrecognized\" | \"type_not_allowed\";\n /** The sniffed type, when one was detected (set for `type_not_allowed`). */\n readonly detected?: FileType;\n};",
17095
- "doc": "/**\n * Validate an upload's **size** and **real type** (by magic bytes, not the client's `Content-Type`).\n * Pair with `c.boundedBody(maxBytes)` from `@nifrajs/core` to bound the *read* itself: read the body\n * under the cap, then `validateUpload(bytes, …)` to confirm the size + sniff the type.\n */"
17259
+ "doc": "/**\n * Validate an upload's **size** and **real type** (by magic bytes, not the client's `Content-Type`).\n * Direct request reads follow the configured route body limit. Use `c.boundedBody(maxBytes)` from `@nifrajs/core`\n * for an explicit per-read cap, then `validateUpload(bytes, …)` to confirm the size and sniff the type.\n */"
17096
17260
  },
17097
17261
  {
17098
17262
  "name": "UrlParts",
@@ -17215,14 +17379,14 @@
17215
17379
  "name": "VERSION",
17216
17380
  "kind": "const",
17217
17381
  "package": "@nifrajs/core",
17218
- "signature": "export declare const VERSION: \"5.10.0\";",
17382
+ "signature": "export declare const VERSION: \"5.11.0\";",
17219
17383
  "doc": "/**\n * Current package version. A hardcoded literal on purpose - core runs on the edge (no fs), so it can't\n * read its own package.json at runtime. `scripts/version.ts` rewrites it on every release bump and\n * `check:publish` asserts it equals `@nifrajs/core`'s package version.\n */"
17220
17384
  },
17221
17385
  {
17222
17386
  "name": "VERSION",
17223
17387
  "kind": "const",
17224
17388
  "package": "nifra",
17225
- "signature": "export declare const VERSION: \"5.10.0\";",
17389
+ "signature": "export declare const VERSION: \"5.11.0\";",
17226
17390
  "doc": "/**\n * Current package version. A hardcoded literal on purpose - core runs on the edge (no fs), so it can't\n * read its own package.json at runtime. `scripts/version.ts` rewrites it on every release bump and\n * `check:publish` asserts it equals `@nifrajs/core`'s package version.\n */"
17227
17391
  },
17228
17392
  {
@@ -18001,6 +18165,13 @@
18001
18165
  "signature": "export declare function assertTransportTextBounded(text: string, options: TransportDecodeOptions): void;",
18002
18166
  "doc": "/**\n * Enforce the transport byte cap on already-read text - the same limit (and the same error) the\n * streaming reader applies during a bounded read. Exported for callers that read a body through a\n * native, non-streaming path (the typed client's in-process branch) and still owe the cap contract.\n */"
18003
18167
  },
18168
+ {
18169
+ "name": "assertUnauthenticated",
18170
+ "kind": "function",
18171
+ "package": "@nifrajs/core",
18172
+ "signature": "export declare function assertUnauthenticated(options: {\n readonly redirectTo?: string;\n readonly unauthenticated?: UnauthenticatedResponse;\n}, owner: string): void;",
18173
+ "doc": "/**\n * A dev-authored denial that is not an error status, or that competes with a redirect, fails loud.\n * A mutation-taking guard must say one thing, and `unauthenticated.status` must stay an HTTP error\n * status. `owner` names the package in the message: `[nifra/<owner>]`.\n */"
18174
+ },
18004
18175
  {
18005
18176
  "name": "assure",
18006
18177
  "kind": "function",
@@ -18194,6 +18365,13 @@
18194
18365
  "signature": "export declare function boundaryModeKey(mode: BoundaryMode): string;",
18195
18366
  "doc": "/** Stable mode label for adapter registries and diagnostics. */"
18196
18367
  },
18368
+ {
18369
+ "name": "boundedJsonText",
18370
+ "kind": "function",
18371
+ "package": "@nifrajs/core",
18372
+ "signature": "export declare function boundedJsonText(value: unknown, maxBytes: number): {\n readonly text: string;\n readonly byteLength: number;\n} | undefined;",
18373
+ "doc": "/**\n * Serialize a JSON value only when its exact UTF-8 size fits `maxBytes`. The preflight snapshots\n * enumerable values and `toJSON` results while counting, so an oversized output is rejected before\n * constructing the escaped JSON string or its encoded byte buffer. Returns `undefined` for a root\n * value with no JSON representation, matching `JSON.stringify`.\n */"
18374
+ },
18197
18375
  {
18198
18376
  "name": "boundedSqliteQuery",
18199
18377
  "kind": "function",
@@ -20954,6 +21132,18 @@
20954
21132
  "package": "@nifrajs/cli",
20955
21133
  "signature": "export declare function getFixRecipe(id: string): FixRecipe | undefined;"
20956
21134
  },
21135
+ {
21136
+ "name": "getRouteSlotRuntime",
21137
+ "kind": "function",
21138
+ "package": "@nifrajs/web",
21139
+ "signature": "export declare function getRouteSlotRuntime(): RouteSlotRuntime | undefined;"
21140
+ },
21141
+ {
21142
+ "name": "getRouteSlotStore",
21143
+ "kind": "function",
21144
+ "package": "@nifrajs/web",
21145
+ "signature": "export declare function getRouteSlotStore(parentPath: string, name: string): RouteSlotStore;"
21146
+ },
20957
21147
  {
20958
21148
  "name": "getSession",
20959
21149
  "kind": "function",
@@ -21075,6 +21265,13 @@
21075
21265
  "signature": "export declare function hasResidentBody(response: Response): boolean;",
21076
21266
  "doc": "/** Whether {@link markResidentBody} recorded `response`. Another copy of this module did not. */"
21077
21267
  },
21268
+ {
21269
+ "name": "hasRouteSlotsSearch",
21270
+ "kind": "function",
21271
+ "package": "@nifrajs/web",
21272
+ "signature": "export declare function hasRouteSlotsSearch(search: string): boolean;",
21273
+ "doc": "/** Check raw query text for framework-owned slot keys, including percent-encoded names. */"
21274
+ },
21078
21275
  {
21079
21276
  "name": "hash8",
21080
21277
  "kind": "function",
@@ -21863,6 +22060,13 @@
21863
22060
  "signature": "export declare function loadGoogleFont(options: GoogleFontOptions, io: LoadGoogleFontIO): Promise<LoadGoogleFontResult>;",
21864
22061
  "doc": "/**\n * Download a Google font, self-host it, and return a CLS-safe `@font-face` stylesheet + preloads.\n * See the module header for the full flow and security model. I/O (`fetch`, `writeFile`) is injectable\n * so this is unit-testable without the network.\n */"
21865
22062
  },
22063
+ {
22064
+ "name": "loadRouteSlot",
22065
+ "kind": "function",
22066
+ "package": "@nifrajs/web",
22067
+ "signature": "export declare function loadRouteSlot(runtime: RouteSlotRuntime, name: string, parentPath: string, targetValue: string, signal: AbortSignal): Promise<LoadedRouteSlot>;",
22068
+ "doc": "/** Resolve an addressed slot through the current router and its normal authorized route-data path. */"
22069
+ },
21866
22070
  {
21867
22071
  "name": "localeCookie",
21868
22072
  "kind": "function",
@@ -22479,6 +22683,12 @@
22479
22683
  "signature": "export declare function onPageShow(callback: () => void): void;",
22480
22684
  "doc": "/**\n * Run `callback` each time the `keepAlive` page this component renders in is shown again, once it is\n * back in the document with its scroll and focus. Unlike Vue's `onActivated`, not when it first mounts.\n */"
22481
22685
  },
22686
+ {
22687
+ "name": "onRouteSlotIdentityChange",
22688
+ "kind": "function",
22689
+ "package": "@nifrajs/web",
22690
+ "signature": "export declare function onRouteSlotIdentityChange(listener: () => void): () => void;"
22691
+ },
22482
22692
  {
22483
22693
  "name": "openGraph",
22484
22694
  "kind": "function",
@@ -22852,6 +23062,13 @@
22852
23062
  "signature": "export declare function parseReviewReport(input: unknown): Promise<ReviewReport>;",
22853
23063
  "doc": "/** Parse a JSON string or unknown value into a bounded, deeply frozen review report. */"
22854
23064
  },
23065
+ {
23066
+ "name": "parseRouteSlots",
23067
+ "kind": "function",
23068
+ "package": "@nifrajs/web",
23069
+ "signature": "export declare function parseRouteSlots(path: string): RouteSlotTargets;",
23070
+ "doc": "/** Parse and strictly validate flat `slot.<name>=<target>` query values. */"
23071
+ },
22855
23072
  {
22856
23073
  "name": "parseRubricVerdict",
22857
23074
  "kind": "function",
@@ -24215,6 +24432,18 @@
24215
24432
  "signature": "export declare function routePatternOverlap(left: string, right: string): string | undefined;",
24216
24433
  "doc": "/**\n * Return a deterministic path accepted by both patterns, or `undefined` when their path languages are\n * disjoint. A pattern ending in optional params is every concrete path it serves, so `/users/:id?`\n * overlaps `/users` as well as `/users/me`.\n *\n * This is a build/check-time NFA product, never a request-time operation. Route literals are the only\n * input alphabet needed: a literal character is tried verbatim, while `a` is a representative for\n * the unrestricted non-slash character class. No user route text is compiled as a regular expression.\n *\n * A constrained parameter is modelled as its constraint: a value from its list, or a run of its\n * class within its bounds. In a segment that has several parameters the router is stricter than\n * that - it places the literals first and tests the values afterwards - so for such a segment the\n * answer errs towards reporting an overlap that no request can reach, never towards missing one.\n * The state budget is one budget for the whole call, however many concrete paths the two sides have.\n */"
24217
24434
  },
24435
+ {
24436
+ "name": "routeSlotSyncKey",
24437
+ "kind": "function",
24438
+ "package": "@nifrajs/web",
24439
+ "signature": "export declare function routeSlotSyncKey(parentPath: string, name: string, target: string | undefined, error: string | undefined, pending: boolean): string;"
24440
+ },
24441
+ {
24442
+ "name": "routeSlotTargetFromPath",
24443
+ "kind": "function",
24444
+ "package": "@nifrajs/web",
24445
+ "signature": "export declare function routeSlotTargetFromPath(path: string, name: string): {\n readonly target?: string;\n readonly error?: string;\n};"
24446
+ },
24218
24447
  {
24219
24448
  "name": "routeTemplateOf",
24220
24449
  "kind": "function",
@@ -24821,6 +25050,19 @@
24821
25050
  "signature": "export declare function setMountedRouter(router: ClientRouter | undefined): void;",
24822
25051
  "doc": "/** Register (or clear) the router that owns fetchers - called by `mountRouter`. Not for app use. */"
24823
25052
  },
25053
+ {
25054
+ "name": "setRouteSlot",
25055
+ "kind": "function",
25056
+ "package": "@nifrajs/web",
25057
+ "signature": "export declare function setRouteSlot(path: string, name: string, target: string | null): string;",
25058
+ "doc": "/** Change a single slot while retaining the other URL-addressed slots. */"
25059
+ },
25060
+ {
25061
+ "name": "setRouteSlotRuntime",
25062
+ "kind": "function",
25063
+ "package": "@nifrajs/web",
25064
+ "signature": "export declare function setRouteSlotRuntime(runtime: RouteSlotRuntime): void;"
25065
+ },
24824
25066
  {
24825
25067
  "name": "setSsrModuleLoader",
24826
25068
  "kind": "function",
@@ -25239,6 +25481,12 @@
25239
25481
  "signature": "export declare function stripImageMetadata(bytes: Uint8Array, backend: ImageReencoder, options?: StripImageMetadataOptions): Promise<Uint8Array>;",
25240
25482
  "doc": "/**\n * Re-encode an image to its intrinsic size, dropping all embedded metadata. Returns clean bytes.\n * A source over `maxPixels` throws {@link ImagePixelLimitError} without being decoded. Each call\n * holds a full decoded image in memory, so bound how many run at once where uploads arrive.\n */"
25241
25483
  },
25484
+ {
25485
+ "name": "stripRouteSlots",
25486
+ "kind": "function",
25487
+ "package": "@nifrajs/web",
25488
+ "signature": "export declare function stripRouteSlots(path: string): string;"
25489
+ },
25242
25490
  {
25243
25491
  "name": "stripSvgPreamble",
25244
25492
  "kind": "function",
@@ -25375,6 +25623,12 @@
25375
25623
  "signature": "export declare function svgToVueSfc(xml: string): string;",
25376
25624
  "doc": "/** Wrap raw SVG XML in a template-only Vue SFC (single root → Vue inherits attrs onto the `<svg>`). */"
25377
25625
  },
25626
+ {
25627
+ "name": "syncRouteSlotStore",
25628
+ "kind": "function",
25629
+ "package": "@nifrajs/web",
25630
+ "signature": "export declare function syncRouteSlotStore(store: RouteSlotStore, parentPath: string, name: string, target: string | undefined, error: string | undefined, pending: boolean): string;"
25631
+ },
25378
25632
  {
25379
25633
  "name": "systemClock",
25380
25634
  "kind": "const",
@@ -25760,6 +26014,13 @@
25760
26014
  "signature": "export declare function uiResourceMeta(uri: string): Record<string, unknown>;",
25761
26015
  "doc": "/** The MCP Apps `_meta.ui.resourceUri` link. */"
25762
26016
  },
26017
+ {
26018
+ "name": "unauthenticatedResult",
26019
+ "kind": "function",
26020
+ "package": "@nifrajs/core",
26021
+ "signature": "export declare function unauthenticatedResult(custom: UnauthenticatedResponse | undefined): ResponseResult;",
26022
+ "doc": "/**\n * The response one guard rejection carries: what the options declared, or the default `401` JSON\n * (`{ ok: false, error: \"unauthorized\" }`). An explicit `body` of `undefined` sends no body.\n */"
26023
+ },
25763
26024
  {
25764
26025
  "name": "undiciTransport",
25765
26026
  "kind": "function",
@@ -26227,6 +26488,33 @@
26227
26488
  "signature": "export declare function useQueryClient(): Pick<QueryClient, \"invalidateQueries\">;",
26228
26489
  "doc": "/** Access the query client to imperatively `invalidateQueries(keyOrPrefix)` (e.g. after a mutation). */"
26229
26490
  },
26491
+ {
26492
+ "name": "useRouteSlot",
26493
+ "kind": "function",
26494
+ "package": "@nifrajs/web-preact",
26495
+ "signature": "export declare function useRouteSlot(name: RouteSlotName): RouteSlotController;"
26496
+ },
26497
+ {
26498
+ "name": "useRouteSlot",
26499
+ "kind": "function",
26500
+ "package": "@nifrajs/web-react",
26501
+ "signature": "export declare function useRouteSlot(name: RouteSlotName): RouteSlotController;",
26502
+ "doc": "/** Read or navigate one route slot without changing any sibling slot's URL state or component tree. */"
26503
+ },
26504
+ {
26505
+ "name": "useRouteSlot",
26506
+ "kind": "function",
26507
+ "package": "@nifrajs/web-svelte",
26508
+ "signature": "export declare function useRouteSlot(name: RouteSlotName): RouteSlotController;",
26509
+ "doc": "/** Read or update the URL state for one slot while preserving every sibling slot. */"
26510
+ },
26511
+ {
26512
+ "name": "useRouteSlot",
26513
+ "kind": "function",
26514
+ "package": "@nifrajs/web-vue",
26515
+ "signature": "export declare function useRouteSlot(name: RouteSlotName): RouteSlotController;",
26516
+ "doc": "/** Read or navigate one route slot without changing any sibling slot's URL state or component tree. */"
26517
+ },
26230
26518
  {
26231
26519
  "name": "useSearch",
26232
26520
  "kind": "function",
@@ -26630,7 +26918,7 @@
26630
26918
  "name": "withIdleTimeout",
26631
26919
  "kind": "function",
26632
26920
  "package": "@nifrajs/core",
26633
- "signature": "export declare function withIdleTimeout<T>(c: Context, seconds: number, work: () => MaybePromise<T>): MaybePromise<T>;",
26921
+ "signature": "export declare function withIdleTimeout<T>(c: Pick<Context, \"signal\">, seconds: number, work: () => MaybePromise<T>): MaybePromise<T>;",
26634
26922
  "doc": "/**\n * Run `work` with the idle timeout of the request's connection set to `seconds` (`0` turns it off),\n * then put back the listener's.\n *\n * Bun closes a connection that moves no bytes for `listen()`'s `idleTimeoutSec` seconds (10 by\n * default), and a handler that is still working sends none, so an export or a long upstream call is\n * cut mid-flight. Raising `idleTimeoutSec` raises it for every connection, idle keep-alive ones\n * included; this raises it for one request. The listener's value is back before the response goes\n * out because Bun keeps the last value on the socket for the requests that follow on it, so a value\n * left in place would hold an idle connection open.\n *\n * The request's deadline (`requestTimeoutMs`, an inbound deadline) still bounds the response: when it\n * fires, the 503 is sent with the listener's timeout back and `c.signal` aborts, but `work`\n * keeps running unless it stops on that signal. Scopes nest: while several run on one request the\n * longest applies, and `0` outlasts any number. `seconds` runs from 0 to 255, the longest Bun holds\n * an idle connection; work that may idle longer takes `0`.\n *\n * A streamed response is sent after the handler returns, so call this inside the stream's producer\n * to hold it until the last chunk. Off `listen()` - another adapter, `app.fetch` in a test - it runs\n * `work` unchanged.\n *\n * @example\n * ```ts\n * import { withIdleTimeout } from \"@nifrajs/core/idle-timeout\"\n *\n * app.post(\"/exports\", (c) => withIdleTimeout(c, 0, () => buildExport(c.body)))\n * // Every route declared after this one:\n * app.around((c, next) => withIdleTimeout(c, 120, next))\n * ```\n */"
26635
26923
  },
26636
26924
  {
@@ -26647,6 +26935,13 @@
26647
26935
  "signature": "export declare function withRouteAssurance<T extends object>(target: T, declaration: AssuranceDeclaration | readonly AssuranceDeclaration[]): T;",
26648
26936
  "doc": "/** Attach enforcement evidence to the middleware/plugin that installs it. */"
26649
26937
  },
26938
+ {
26939
+ "name": "withRouteSlots",
26940
+ "kind": "function",
26941
+ "package": "@nifrajs/web",
26942
+ "signature": "export declare function withRouteSlots(path: string, targets: RouteSlotTargets): string;",
26943
+ "doc": "/** Replace the slot query values while preserving unrelated query text byte for byte. */"
26944
+ },
26650
26945
  {
26651
26946
  "name": "wrapWebSocketMessageValidation",
26652
26947
  "kind": "function",