@nifrajs/cli 5.2.0 → 5.3.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 (95) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/dist/assure-hydration.d.ts.map +1 -1
  3. package/dist/assure-hydration.js +6 -2
  4. package/dist/assure-hydration.js.map +1 -1
  5. package/dist/check-diagnostics.d.ts.map +1 -1
  6. package/dist/check-diagnostics.js +2 -0
  7. package/dist/check-diagnostics.js.map +1 -1
  8. package/dist/check-scan.d.ts +9 -3
  9. package/dist/check-scan.d.ts.map +1 -1
  10. package/dist/check-scan.js +61 -24
  11. package/dist/check-scan.js.map +1 -1
  12. package/dist/check.d.ts.map +1 -1
  13. package/dist/check.js +3 -3
  14. package/dist/check.js.map +1 -1
  15. package/dist/cli.d.ts.map +1 -1
  16. package/dist/cli.js +22 -14
  17. package/dist/cli.js.map +1 -1
  18. package/dist/db-tool.d.ts.map +1 -1
  19. package/dist/db-tool.js +2 -1
  20. package/dist/db-tool.js.map +1 -1
  21. package/dist/env-file.d.ts.map +1 -1
  22. package/dist/env-file.js +41 -8
  23. package/dist/env-file.js.map +1 -1
  24. package/dist/internal/source-facts.d.ts +20 -4
  25. package/dist/internal/source-facts.d.ts.map +1 -1
  26. package/dist/internal/source-facts.js +248 -32
  27. package/dist/internal/source-facts.js.map +1 -1
  28. package/dist/mcp-exec.d.ts +1 -0
  29. package/dist/mcp-exec.d.ts.map +1 -1
  30. package/dist/mcp-exec.js +11 -3
  31. package/dist/mcp-exec.js.map +1 -1
  32. package/dist/mcp-http.js +1 -1
  33. package/dist/mcp-io.d.ts +23 -3
  34. package/dist/mcp-io.d.ts.map +1 -1
  35. package/dist/mcp-io.js +59 -12
  36. package/dist/mcp-io.js.map +1 -1
  37. package/dist/mcp-isolate.d.ts.map +1 -1
  38. package/dist/mcp-isolate.js +2 -1
  39. package/dist/mcp-isolate.js.map +1 -1
  40. package/dist/migrate-layout.d.ts.map +1 -1
  41. package/dist/migrate-layout.js +1 -0
  42. package/dist/migrate-layout.js.map +1 -1
  43. package/dist/recipes/5.3.0.d.ts +11 -0
  44. package/dist/recipes/5.3.0.d.ts.map +1 -0
  45. package/dist/recipes/5.3.0.js +35 -0
  46. package/dist/recipes/5.3.0.js.map +1 -0
  47. package/dist/recipes/index.d.ts.map +1 -1
  48. package/dist/recipes/index.js +2 -0
  49. package/dist/recipes/index.js.map +1 -1
  50. package/dist/review.d.ts.map +1 -1
  51. package/dist/review.js +2 -0
  52. package/dist/review.js.map +1 -1
  53. package/dist/rules/codes.d.ts +2 -0
  54. package/dist/rules/codes.d.ts.map +1 -1
  55. package/dist/rules/codes.js +2 -0
  56. package/dist/rules/codes.js.map +1 -1
  57. package/dist/rules/explanations.d.ts.map +1 -1
  58. package/dist/rules/explanations.js +12 -2
  59. package/dist/rules/explanations.js.map +1 -1
  60. package/dist/rules/pages.d.ts +25 -1
  61. package/dist/rules/pages.d.ts.map +1 -1
  62. package/dist/rules/pages.js +149 -33
  63. package/dist/rules/pages.js.map +1 -1
  64. package/dist/rules/route-statement.d.ts +10 -0
  65. package/dist/rules/route-statement.d.ts.map +1 -0
  66. package/dist/rules/route-statement.js +150 -0
  67. package/dist/rules/route-statement.js.map +1 -0
  68. package/dist/upgrade.d.ts +43 -10
  69. package/dist/upgrade.d.ts.map +1 -1
  70. package/dist/upgrade.js +161 -45
  71. package/dist/upgrade.js.map +1 -1
  72. package/docs/llms-full.txt +96 -13
  73. package/docs/types.json +124 -28
  74. package/package.json +11 -11
  75. package/src/assure-hydration.ts +7 -1
  76. package/src/check-diagnostics.ts +2 -0
  77. package/src/check-scan.ts +64 -25
  78. package/src/check.ts +8 -3
  79. package/src/cli.ts +22 -14
  80. package/src/db-tool.ts +2 -0
  81. package/src/env-file.ts +42 -7
  82. package/src/internal/source-facts.ts +312 -39
  83. package/src/mcp-exec.ts +13 -2
  84. package/src/mcp-http.ts +1 -1
  85. package/src/mcp-io.ts +72 -12
  86. package/src/mcp-isolate.ts +2 -0
  87. package/src/migrate-layout.ts +1 -0
  88. package/src/recipes/5.3.0.ts +36 -0
  89. package/src/recipes/index.ts +2 -0
  90. package/src/review.ts +2 -0
  91. package/src/rules/codes.ts +2 -0
  92. package/src/rules/explanations.ts +12 -2
  93. package/src/rules/pages.ts +193 -33
  94. package/src/rules/route-statement.ts +170 -0
  95. package/src/upgrade.ts +202 -47
package/docs/types.json CHANGED
@@ -317,7 +317,7 @@
317
317
  "name": "AgentAppClient",
318
318
  "kind": "class",
319
319
  "package": "@nifrajs/agent-app",
320
- "signature": "export declare class AgentAppClient {\n private readonly transport;\n private readonly requested;\n private readonly maxPending;\n private readonly resumeAttempts;\n private readonly resumeDelayMs;\n private currentSession;\n private granted;\n constructor(transport: AgentTransport, options?: AgentAppClientOptions);\n /** The current session view, or `undefined` before {@link createSession}/{@link resume}. */\n get session(): SessionView | undefined;\n /** Features the host granted at negotiation. */\n get features(): readonly string[];\n supports(feature: string): boolean;\n requireFeature(feature: string): void;\n /** Open a session and negotiate the feature set against the host's advertised capabilities. */\n createSession(input?: CreateSessionInput): Promise<SessionView>;\n /**\n * Stream a turn as ordered, deduplicated view models. The underlying transport receives the host's\n * full event stream, but every value yielded here is content-free.\n *\n * The host numbers events per session, and other clients can share the session, so the turn starts\n * at its first event: seqs between the last one this client saw and that event belong to other\n * clients' turns. Events still held behind a gap when the stream ends are released in order.\n *\n * When the connection breaks mid-turn, the client follows the turn again with `turn.attach` from the\n * last seq it received, so the views go on without a gap or a repeat. A host that cannot (it keeps\n * no turns, or no longer holds those events) refuses, and the break is thrown as before.\n */\n send(message: string, options?: {\n signal?: AbortSignal;\n }): AsyncIterable<AgentEventView>;\n /** Resume a persisted log by cursor. A cursor whose next record was evicted asks for a resync. */\n resume(input?: ResumeInput): Promise<ReplayResult>;\n /** List approvals awaiting a decision, projected to their identifiers only. */\n listApprovals(): Promise<readonly PendingApprovalView[]>;\n /** Approve or decline a pending approval. Returns the host's recorded decision. */\n resolveApproval(approvalId: string, approved: boolean, reason?: string): Promise<boolean>;\n /** Accept or decline a handoff. Returns the resulting handoff view when the host reports one. */\n resolveHandoff(input: ResolveHandoffInput): Promise<HandoffView | undefined>;\n /**\n * List every pending decision boundary (approvals and handoffs) as content-free item views. Gated\n * on the negotiated `inbox` feature.\n */\n listBoundaries(): Promise<readonly BoundaryItemView[]>;\n /** Inspect one boundary by request id, projected to a content-free item view. */\n inspectBoundary(requestId: string): Promise<BoundaryItemView | undefined>;\n /**\n * Drive one boundary command against its exact coordinate. Because the full {@link DecisionCoordinate}\n * (run, node, capability, request id, vector, expiry) rides on every call, a decision can only ever\n * resolve the boundary it names - never a different item - and the host fails a stale or mismatched\n * coordinate closed. `assign` carries the owner role in `to`.\n */\n decideBoundary(command: BoundaryCommand, coordinate: DecisionCoordinate, options?: {\n readonly to?: string;\n }): Promise<BoundaryDecisionResult>;\n /** Fetch a run snapshot by id, projected to a content-free {@link RunView}. */\n runSnapshot(runId: string): Promise<RunView>;\n /** Cancel the active turn / stop the session. */\n cancel(reason?: string): Promise<void>;\n /**\n * Escape hatch for host-specific commands outside the negotiated contract. Returns a bounded\n * {@link CommandOutcome}; the caller is responsible for keeping whatever it renders content-free.\n */\n command<T = unknown>(method: string, params?: unknown, signal?: AbortSignal): Promise<CommandOutcome<T>>;\n private adoptSnapshot;\n private expectSnapshot;\n private decodeResume;\n}"
320
+ "signature": "export declare class AgentAppClient {\n private readonly transport;\n private readonly requested;\n private readonly maxPending;\n private readonly resumeAttempts;\n private readonly resumeDelayMs;\n private currentSession;\n private granted;\n constructor(transport: AgentTransport, options?: AgentAppClientOptions);\n /** The current session view, or `undefined` before {@link createSession}/{@link resume}. */\n get session(): SessionView | undefined;\n /** Features the host granted at negotiation. */\n get features(): readonly string[];\n supports(feature: string): boolean;\n requireFeature(feature: string): void;\n /** Open a session and negotiate the feature set against the host's advertised capabilities. */\n createSession(input?: CreateSessionInput): Promise<SessionView>;\n /**\n * Stream a turn as ordered, deduplicated view models. The underlying transport receives the host's\n * full event stream, but every value yielded here is content-free.\n *\n * The host numbers events per session, and other clients can share the session, so the turn starts\n * at its first event: seqs between the last one this client saw and that event belong to other\n * clients' turns. Events still held behind a gap when the stream ends are released in order.\n *\n * When the connection breaks mid-turn, the client follows the turn again with `turn.attach` from the\n * last seq it delivered in order, so the views go on without a gap or a repeat. A host that cannot (it keeps\n * no turns, or no longer holds those events) refuses, and the break is thrown as before.\n */\n send(message: string, options?: {\n signal?: AbortSignal;\n }): AsyncIterable<AgentEventView>;\n /** Resume a persisted log by cursor. A cursor whose next record was evicted asks for a resync. */\n resume(input?: ResumeInput): Promise<ReplayResult>;\n /** List approvals awaiting a decision, projected to their identifiers only. */\n listApprovals(): Promise<readonly PendingApprovalView[]>;\n /** Approve or decline a pending approval. Returns the host's recorded decision. */\n resolveApproval(approvalId: string, approved: boolean, reason?: string): Promise<boolean>;\n /** Accept or decline a handoff. Returns the resulting handoff view when the host reports one. */\n resolveHandoff(input: ResolveHandoffInput): Promise<HandoffView | undefined>;\n /**\n * List every pending decision boundary (approvals and handoffs) as content-free item views. Gated\n * on the negotiated `inbox` feature.\n */\n listBoundaries(): Promise<readonly BoundaryItemView[]>;\n /** Inspect one boundary by request id, projected to a content-free item view. */\n inspectBoundary(requestId: string): Promise<BoundaryItemView | undefined>;\n /**\n * Drive one boundary command against its exact coordinate. Because the full {@link DecisionCoordinate}\n * (run, node, capability, request id, vector, expiry) rides on every call, a decision can only ever\n * resolve the boundary it names - never a different item - and the host fails a stale or mismatched\n * coordinate closed. `assign` carries the owner role in `to`.\n */\n decideBoundary(command: BoundaryCommand, coordinate: DecisionCoordinate, options?: {\n readonly to?: string;\n }): Promise<BoundaryDecisionResult>;\n /** Fetch a run snapshot by id, projected to a content-free {@link RunView}. */\n runSnapshot(runId: string): Promise<RunView>;\n /** Cancel the active turn / stop the session. */\n cancel(reason?: string): Promise<void>;\n /**\n * Escape hatch for host-specific commands outside the negotiated contract. Returns a bounded\n * {@link CommandOutcome}; the caller is responsible for keeping whatever it renders content-free.\n */\n command<T = unknown>(method: string, params?: unknown, signal?: AbortSignal): Promise<CommandOutcome<T>>;\n private adoptSnapshot;\n private expectSnapshot;\n private decodeResume;\n}"
321
321
  },
322
322
  {
323
323
  "name": "AgentAppClientOptions",
@@ -2312,7 +2312,7 @@
2312
2312
  "name": "BuildTargetOptions",
2313
2313
  "kind": "interface",
2314
2314
  "package": "@nifrajs/web",
2315
- "signature": "export interface BuildTargetOptions {\n /** The `routes/` directory to discover (absolute path). */\n readonly routesDir: string;\n /** Output directory for the assembled deploy dir (absolute path). Cleared and recreated, so the\n * build refuses one that is a filesystem root or is or contains the routes directory, the public\n * directory, an absolute entry module, or the working directory. */\n readonly outDir: string;\n /** A scratch directory for intermediate codegen (the generated server entry + manifest) and the\n * server bundle, cleaned up after. Absolute path. Checked the same way as `outDir`. */\n readonly workDir: string;\n /** The adapter's client runtime module (exports `mountRouter`), e.g. `\"@nifrajs/web-react/client\"`. */\n readonly clientModule: string;\n /** Import specifier (resolvable from `workDir`) of the module exporting `adapter`. */\n readonly adapterImport: string;\n /** Import specifier (resolvable from `workDir`) of the module exporting `backend`, or `undefined`. */\n readonly backendImport?: string;\n /** Import specifier (resolvable from `workDir`) of the module exporting `use` (app-level middleware\n * applied before page routes are declared), or `undefined`. Must resolve to the same edge-safe\n * module as `adapterImport`. */\n readonly useImport?: string;\n /** `createWebApp` options the server entry imports by name (`apiPrefix`, `mounts`, `csp`, ...), each\n * mapped to the specifier (resolvable from `workDir`) of the same edge-safe module as `adapterImport`. */\n readonly optionImports?: ServerEntryOptionImports;\n /** Factory that builds the app for `static` prerendering, GIVEN the client build's manifest - so the\n * emitted hydration `<script src>` uses the REAL content-hashed entry (`client.entry`) plus the same\n * styles/route-preload the server targets use. A pre-built instance can't work here: the hash isn't known\n * until `buildClient` runs inside `buildTarget`, so a hardcoded entry 404s → pages render but never\n * hydrate. Required for `target: \"static\"` (SSG drives `app.fetch`); ignored otherwise. */\n readonly prerenderApp?: (client: BuildManifest) => PrerenderAppLike | Promise<PrerenderAppLike>;\n /** Client-build plugins (e.g. the MDX/Vue/Solid Bun plugins). */\n readonly clientPlugins?: readonly BunPlugin[];\n /** Server-build plugins (e.g. the SSR variants). */\n readonly serverPlugins?: readonly BunPlugin[];\n /** Extra Bun.build resolve conditions for the CLIENT build. */\n readonly conditions?: readonly string[];\n /** Compile-time `define` replacements layered onto both builds. */\n readonly define?: Readonly<Record<string, string>>;\n /** Project-root static directory copied to deploy root. `false` disables it. */\n readonly publicDir?: string | false;\n /** Prefix of environment variables allowed into the client bundle (default `\"PUBLIC_\"`). */\n readonly publicEnvPrefix?: string;\n /** Reviewed false positives of the secret scan over the bundle, `public/` and prerendered pages. */\n readonly secretExemptions?: readonly SecretExemption[];\n /**\n * Vite-only CSS output policy. `false` emits one aggregate stylesheet. The native Bun build does not\n * support this switch and fails closed if it is supplied instead of silently ignoring it.\n */\n readonly cssCodeSplit?: boolean;\n /**\n * Activation policy for framework-owned SSR stylesheet links. Defaults to `\"blocking\"`; `\"deferred\"`\n * fetches with `media=\"print\"` and promotes before hydration. With Vite, pair it with\n * `cssCodeSplit: false`; the native Bun build supports the activation policy but keeps its existing\n * CSS output strategy.\n */\n readonly cssLoading?: CssLoadingMode;\n /** Document `<title>` for the generated server entry. */\n readonly title?: string;\n /** Trust the edge platform's client-address header for `c.clientIp` (`cloudflare`, `vercel`). Off by\n * default, leaving an edge app with no caller address. See {@link ServerEntryClientIp}. */\n readonly clientIp?: ServerEntryClientIp;\n}"
2315
+ "signature": "export interface BuildTargetOptions {\n /** The `routes/` directory to discover (absolute path). */\n readonly routesDir: string;\n /** Output directory for the assembled deploy dir (absolute path). Cleared and recreated, so the\n * build refuses one that is a filesystem root or is or contains the routes directory, the public\n * directory, an absolute entry module, or the working directory. */\n readonly outDir: string;\n /** A scratch directory for intermediate codegen (the generated server entry + manifest) and the\n * server bundle, cleaned up after. Absolute path. Checked the same way as `outDir`. */\n readonly workDir: string;\n /** The adapter's client runtime module (exports `mountRouter`), e.g. `\"@nifrajs/web-react/client\"`. */\n readonly clientModule: string;\n /** Import specifier (resolvable from `workDir`) of the module exporting `adapter`. */\n readonly adapterImport: string;\n /** Import specifier (resolvable from `workDir`) of the module exporting `backend`, or `undefined`. */\n readonly backendImport?: string;\n /** Import specifier (resolvable from `workDir`) of the module exporting `use` (app-level middleware\n * applied before page routes are declared), or `undefined`. Must resolve to the same edge-safe\n * module as `adapterImport`. */\n readonly useImport?: string;\n /** `createWebApp` options the server entry imports by name (`apiPrefix`, `mounts`, `csp`, ...), each\n * mapped to the specifier (resolvable from `workDir`) of the same edge-safe module as `adapterImport`. */\n readonly optionImports?: ServerEntryOptionImports;\n /** Factory that builds the app for `static` prerendering, GIVEN the client build's manifest - so the\n * emitted hydration `<script src>` uses the REAL content-hashed entry (`client.entry`) plus the same\n * styles/route-preload the server targets use. A pre-built instance can't work here: the hash isn't known\n * until `buildClient` runs inside `buildTarget`, so a hardcoded entry 404s → pages render but never\n * hydrate. Required for `target: \"static\"` (SSG drives `app.fetch`). For `bun` and `node` it is\n * optional: given, the opted-in routes are prerendered into `_prerendered/` and the server answers\n * them from their file; the other targets ignore it. */\n readonly prerenderApp?: (client: BuildManifest) => PrerenderAppLike | Promise<PrerenderAppLike>;\n /** Client-build plugins (e.g. the MDX/Vue/Solid Bun plugins). */\n readonly clientPlugins?: readonly BunPlugin[];\n /** Server-build plugins (e.g. the SSR variants). */\n readonly serverPlugins?: readonly BunPlugin[];\n /** Extra Bun.build resolve conditions for the CLIENT build. */\n readonly conditions?: readonly string[];\n /** Compile-time `define` replacements layered onto both builds. */\n readonly define?: Readonly<Record<string, string>>;\n /** Project-root static directory copied to deploy root. `false` disables it. */\n readonly publicDir?: string | false;\n /** Prefix of environment variables allowed into the client bundle (default `\"PUBLIC_\"`). */\n readonly publicEnvPrefix?: string;\n /** Reviewed false positives of the secret scan over the bundle, `public/` and prerendered pages. */\n readonly secretExemptions?: readonly SecretExemption[];\n /**\n * Vite-only CSS output policy. `false` emits one aggregate stylesheet. The native Bun build does not\n * support this switch and fails closed if it is supplied instead of silently ignoring it.\n */\n readonly cssCodeSplit?: boolean;\n /**\n * Activation policy for framework-owned SSR stylesheet links. Defaults to `\"blocking\"`; `\"deferred\"`\n * fetches with `media=\"print\"` and promotes before hydration. With Vite, pair it with\n * `cssCodeSplit: false`; the native Bun build supports the activation policy but keeps its existing\n * CSS output strategy.\n */\n readonly cssLoading?: CssLoadingMode;\n /** Document `<title>` for the generated server entry. */\n readonly title?: string;\n /** Trust the edge platform's client-address header for `c.clientIp` (`cloudflare`, `vercel`). Off by\n * default, leaving an edge app with no caller address. See {@link ServerEntryClientIp}. */\n readonly clientIp?: ServerEntryClientIp;\n}"
2316
2316
  },
2317
2317
  {
2318
2318
  "name": "BuildTargetPlan",
@@ -3469,7 +3469,7 @@
3469
3469
  "name": "CollectionConfig",
3470
3470
  "kind": "interface",
3471
3471
  "package": "@nifrajs/content",
3472
- "signature": "export interface CollectionConfig<S extends StandardSchemaV1> {\n /** Directory of content files, relative to the process cwd (or absolute). */\n readonly dir: string;\n /** Standard Schema validating each file's frontmatter. */\n readonly schema: S;\n /** File extensions to include (default `[\".md\", \".markdown\"]`). */\n readonly extensions?: readonly string[];\n}"
3472
+ "signature": "export interface CollectionConfig<S extends StandardSchemaV1> {\n /** Directory of content files, relative to the process cwd (or absolute). */\n readonly dir: string;\n /** Standard Schema validating each file's frontmatter. */\n readonly schema: S;\n /** File extensions to include (default `[\".md\", \".markdown\"]`). */\n readonly extensions?: readonly string[];\n /** Look for changes on every `all()` (default `true`): a directory listing and a `stat` per file,\n * so an edit shows without a restart. `false` lists and parses the directory once and returns that\n * snapshot from then on, for a server whose content ships with its build. `get` checks its one\n * file either way. */\n readonly watch?: boolean;\n}"
3473
3473
  },
3474
3474
  {
3475
3475
  "name": "CommandOutcome",
@@ -3517,6 +3517,12 @@
3517
3517
  "signature": "export interface CompileOptions {\n readonly catalog: StepCatalog;\n readonly planDigest: string;\n readonly artifactPort: ArtifactPort;\n readonly limits?: OrchestrationLimits;\n /** Called once a node's content-free effect key is derived (idempotent steps only). */\n onNodeEffect?(nodeId: string, key: NodeEffectKey): void;\n /** Called for each artifact ref a node produces through its port. */\n collectArtifact?(nodeId: string, ref: ArtifactRef): void;\n /** Called when a subagent node's run returns while its executor, which ignored the abort, keeps running. */\n onSubagentAbandoned?(nodeId: string, abandonment: SubagentAbandonment): void;\n /** Where abandoned subagent executors are counted for `maxAbandonedSubagents`. Default: one per compile. */\n readonly subagentAbandonment?: SubagentAbandonmentLedger;\n}",
3518
3518
  "doc": "/** Wiring the compiler injects into every node closure. */"
3519
3519
  },
3520
+ {
3521
+ "name": "CompileSchemaOptions",
3522
+ "kind": "interface",
3523
+ "package": "@nifrajs/schema",
3524
+ "signature": "export interface CompileSchemaOptions {\n /** Type-only import of the source schema, relative to the generated module. */\n readonly source: string;\n readonly exportName: string;\n}"
3525
+ },
3520
3526
  {
3521
3527
  "name": "CompiledComponentModule",
3522
3528
  "kind": "interface",
@@ -4181,7 +4187,7 @@
4181
4187
  "name": "CreateWebAppOptions",
4182
4188
  "kind": "interface",
4183
4189
  "package": "@nifrajs/web",
4184
- "signature": "export interface CreateWebAppOptions<Env = unknown> {\n readonly serverComponents?: import(\"../server-components/types.js\").ServerComponentRuntime;\n readonly adapter: RenderAdapter;\n readonly manifest: Manifest;\n /** URL of the built client entry (module script) injected into every page. */\n readonly clientEntry: string;\n /** Default document title for all pages. */\n readonly title?: string;\n /**\n * Resolve a fresh CSP nonce for each document request. The value is applied to every\n * framework-owned executable script; return `undefined` to keep the default nonce-free output.\n * Nonce-bearing documents are marked `private, no-store` so the request-specific value is not\n * replayed by browser, CDN, or ISR caches. The resolver does not declare a CSP header because the\n * policy's allowed sources are app-specific.\n */\n readonly nonce?: NonceResolver<Env>;\n /**\n * A hash-based Content-Security-Policy from `createCspPolicy`, instead of `nonce`. A document then\n * carries a nonce only when it needs one (it `defer()`s a value, or `meta` names the nonce in\n * `unsafeInlineScript`); every other page is nonce-free, gets the same CSP header on every request,\n * and stays cacheable by `withISR` or a CDN. `meta` still receives a nonce to name.\n */\n readonly csp?: CspPolicy;\n /**\n * Options for the underlying `server()` - `requestTimeoutMs`, `admission`, `gracefulSignals`, and\n * the rest of {@link ServerOptions}.\n *\n * Needed because the `Server` is constructed in here, so a caller has no other way to reach its\n * constructor: a page app could set no request timeout and no capacity gate, which are exactly the\n * two knobs a production readiness check looks for. An SSR app wants them MORE than a backend does -\n * a render is slow and allocation-heavy, so a burst that a JSON API would absorb is the one that\n * exhausts the pod.\n *\n * Applies to the whole app, {@link mounts} and the {@link api} auto-mount included: the capacity gate\n * sits at the fetch entry, ahead of the request hooks those are dispatched from.\n */\n readonly server?: ServerOptions;\n /**\n * Runs against the app BEFORE any page route is registered - the seam for `securityHeaders()`,\n * `requestId()`, `logger()`, a rate limit, or anything else applied with `use`.\n *\n * ```ts\n * createWebApp({\n * …,\n * use: (app) => {\n * app.use(securityHeaders())\n * app.use(requestId())\n * },\n * })\n * ```\n *\n * A callback rather than an array because `use` is overloaded - `Middleware`, `IdentityPlugin`,\n * `ContextPlugin` - and only the real call site instantiates the right overload. The return value\n * is ignored: this is for cross-cutting concerns, not for declaring routes (declare those on the\n * returned app, where they get their types).\n *\n * **Why the timing matters.** `beforeHandle`, `afterHandle`, `around`, `derive`/`decorate`, and\n * `onError` are snapshotted into each route AS IT IS DECLARED, and `createWebApp` declares every\n * page (plus the `/*` catch-all) before it returns - so a caller's `app.use(…)` afterwards would\n * bind them to no page, and outside production it throws (`HOOK_AFTER_PAGES`). `requestId()` is\n * exactly that case: it is a `derive`, so applied late it would leave every page without\n * `c.requestId`. A `group()` is its own scope and stays allowed. Route assurance evidence is order-scoped the same\n * way, so a late `securityHeaders()` leaves the pages unable to PROVE the header to `nifra assure`\n * even though it does still set it.\n *\n * `onRequest`/`onResponse` (and the response header/body hooks) are app-global arrays read at\n * request time, so those alone DO work when added late. Using this seam for everything avoids\n * having to remember which is which.\n *\n * Runs ahead of the {@link mounts} / {@link api} request hooks, so an `onRequest` middleware guards\n * a mounted auth handler too.\n *\n * A `ContextPlugin` applied here takes runtime effect but cannot widen the declared return type of\n * this function, so `c.requestId` is not typed on routes you declare afterwards. Named plugins are\n * idempotent, so `app.use(requestId())` on the returned app recovers the TYPE without applying the\n * plugin a second time.\n */\n readonly use?: (app: ReturnType<typeof server<Env>>) => void;\n /** Injected into each loader's `ctx.api` - typically an `inProcessClient(app)` (typed\n * per-route via `@nifrajs/client`'s `createRoutes`). Opaque to the core.\n *\n * **Auto-mount.** Every `inProcessClient(backend)` exposes the symbol-keyed platform-aware backend\n * mount interface from `@nifrajs/core/mount`; given an {@link apiPrefix}, `createWebApp` also serves\n * that backend over HTTP there: a request whose pathname starts with the prefix is dispatched before\n * page routing with the same `env`/`waitUntil` platform context, and the backend's `Response` is\n * returned untouched. The mount runs in `nifra dev` too. Without `apiPrefix` the backend is\n * loader-only.\n *\n * **Request-scoped loader calls.** While a page renders, its loaders, actions and boundaries get a\n * `ctx.api` bound to that request's platform identity: a backend handler reached through it sees the\n * visitor's `c.clientIp` (derived under this app's `server.clientIp` trust declaration), `c.env` and\n * `c.waitUntil`, so a per-caller rate limit or audit field keys on the real visitor. `c.clientIp` is\n * the supported way to read the caller - identity travels in the platform, so rebuilding a `Request`\n * does not lose it. Headers do NOT travel: the page request's `cookie` and `authorization` are never\n * copied, so a loader call is anonymous unless the loader passes headers on the call itself. */\n readonly api?: unknown;\n /** HTTP path prefix the {@link api} backend is mounted at, such as `\"/api\"`. A request whose\n * pathname is exactly the prefix or starts with `prefix + \"/\"` is dispatched to the backend before\n * page routing; the backend therefore defines its routes at the **full** path (`server().post(\"/api/\n * sync\", …)`), matching the in-process `inProcessClient` call sites. Unset or `\"\"`, nothing is\n * mounted: the app serves pages only and `api` stays a loader-only `ctx.api`. Mounting is also a\n * no-op when `api` does not expose the symbol mount.\n *\n * A page file under the prefix (`routes/api/report.tsx`) could never render - the backend answers\n * first and its 404 is final - so `createWebApp` throws, naming the file. The same holds for every\n * other pre-route mount. */\n readonly apiPrefix?: string;\n /**\n * Strip {@link apiPrefix} from the pathname before dispatching to `api` (default `false`).\n *\n * The default suits a backend that declares FULL paths (`server().post(\"/api/sync\", …)`), which is\n * right when it is only ever mounted here. Set this when the backend declares its routes WITHOUT the\n * prefix because it also runs standalone behind its own shell, so its paths cannot carry a prefix that\n * only exists when it is mounted. Without it every request 404s inside the backend, and the workaround\n * is a `Proxy` that rewrites each URL.\n */\n readonly apiStrip?: boolean;\n /**\n * Sub-apps mounted ahead of page routing - an auth handler, a webhook receiver, a stack's routes.\n *\n * Structural on purpose: anything with `{ path, app: { fetch } }` fits, so a library that exposes its\n * routes as such a list mounts as `mounts: theirRoutes` without `@nifrajs/web` taking a dependency on\n * it. `better-auth` is the motivating case - it is not a `backend` route, so `/api/auth/*` used to 404\n * silently.\n *\n * Tried longest-path-first and BEFORE the `api` mount, so a mount at `/api/auth` wins over a backend\n * at `/api` no matter which was declared first. `stripPrefix` is the per-mount form of {@link apiStrip}:\n * leave it off to pass the full path through. `opaque` states why a mount whose routes nifra cannot\n * read (better-auth's handler) is outside assurance; it is then listed as a known gap, with any\n * routes it declares reported as declared.\n */\n readonly mounts?: ReadonlyArray<{\n readonly path: string;\n readonly app: MountableApp<Env>;\n readonly stripPrefix?: boolean;\n readonly priority?: number;\n readonly fallbackOn?: 404;\n readonly opaque?: MountOptions<Env>[\"opaque\"];\n }>;\n /** Secret for **draft / preview mode** (see `enableDraft`). When set, a request carrying a valid\n * signed `__nifra_draft` cookie gets `ctx.draft === true` in loaders/actions (else always `false`).\n * Pair with `withISR({ draftSecret })` so editors bypass the cache. Omit to disable draft mode. */\n readonly draftSecret?: string;\n /** Per-route chunk URLs (`buildClient`'s `BuildManifest.routes`) - `routeId → [layout chunks…, own\n * chunk]`. When present, each page `modulepreload`s its matched route's chunks alongside the entry,\n * so the route code downloads in parallel (no entry→route-chunk waterfall). Omit ⇒ entry-only. */\n readonly routePreload?: Readonly<Record<string, readonly string[]>>;\n /** The app's bundled stylesheet URLs (`buildClient`'s `BuildManifest.css`) - the aggregate, injected\n * as `<link rel=\"stylesheet\">` in a page's `<head>`. Used as the fallback for any route absent from\n * {@link routeStyles}. Omit ⇒ no links (dev, where Vite injects CSS, or a CSS-free app). */\n readonly styles?: readonly string[];\n /** Per-route stylesheet URLs (`buildClient`'s `BuildManifest.routeStyles`) - `routeId → [chain CSS]`.\n * When a matched route has an entry here, only those (its layout chain + own CSS) are linked instead\n * of the aggregate `styles`, so a page ships only the CSS it uses. An empty array ⇒ no `<link>` (the\n * page imports no CSS). Routes absent here fall back to `styles`. Omit ⇒ always use `styles`. */\n readonly routeStyles?: Readonly<Record<string, readonly string[]>>;\n /** Locale key -> copy chunk URL (`buildClient`'s `BuildManifest.copyChunks`, the server manifest's\n * `copyChunks`). A production client build moves copy tables (`@nifrajs/i18n/copy`) into one chunk per\n * locale; each page lists them for the browser and preloads its own. Omit ⇒ tables keep their values. */\n readonly copyChunks?: Readonly<Record<string, string>>;\n /**\n * The app's locale routing, `defineI18nRouting()` from `@nifrajs/i18n/routing`, registered once:\n * export it as `i18n` from `backend/framework.ts`. Every document then takes its locale from the\n * URL: `<html lang dir>` from the registry unless the route's meta sets `lang`, a `Content-Language`\n * header, and the locale each adapter's `useLocale()` and `<I18nProvider>` read. A route under a\n * `[lang]` or `[[lang]]` directory is checked with its `matchSegment()` before any middleware: an\n * unserved locale, or a page missing from it, is a 404, and a non-canonical prefix (`/en/x` when the\n * default is unprefixed) redirects with a 308.\n */\n readonly i18n?: WebAppI18n;\n /**\n * Activation policy for framework-owned stylesheet links (default `\"blocking\"`). `\"deferred\"`\n * emits `media=\"print\"` links; the generated client waits for them and switches them to `all` before\n * mounting. Pair with an aggregate Vite stylesheet (`cssCodeSplit: false`) to prevent lazy-prefetch\n * CSS insertion. Non-hydrated pages always keep their stylesheet links blocking.\n */\n readonly cssLoading?: CssLoadingMode;\n /** SSG: the prerendered-path set (e.g. `enumerateStaticRoutes(routes).paths` or the build's\n * `prerendered.json`). Handed over as `window.__NIFRA_PRERENDERED__` on every page so a client soft-nav\n * into a prerendered route fetches its static `_data.json` instead of hitting the worker. A set over\n * 4 KB of JSON is served once from `/__nifra/prerendered.json?v=<version>`, cacheable for good, and\n * pages hand over only that URL; `prerenderRoutes` writes the file into a static output. */\n readonly prerenderedPaths?: readonly string[];\n /** Publish the project's `AGENTS.md` inside `/llms.txt` and `/llms-full.txt`. **Off by default**:\n * those endpoints are public and unauthenticated, while `AGENTS.md` is a repo file written for the\n * team - unreleased feature names, internal hostnames, and \"don't touch X yet\" notes live there\n * routinely. Turn it on only for a repo whose guidelines you would publish as a page. */\n readonly publishLocalGuidelines?: boolean;\n /** Serve `/llms.txt` and `/llms-full.txt`: the page routes, and the backend routes when the backend\n * is mounted over HTTP at {@link apiPrefix}, with their request and response schemas in the full\n * text. **Off by default**: both are public and unauthenticated, and they list every route, admin\n * and internal ones included. Turn it on for an app whose whole surface you would publish. */\n readonly llmsTxt?: boolean;\n /** SSG: per dynamic route pattern, its `getStaticPaths` `fallback` (from `enumerateStaticRoutes` or\n * the build's `prerendered.json`). A route mapped to `\"404\"` rejects any path NOT in\n * `prerenderedPaths` with the 404 page - the unlisted path simply doesn't exist. `\"ssr\"` (the\n * default for unmapped routes) renders unlisted paths on-demand. */\n readonly staticFallbacks?: Readonly<Record<string, \"ssr\" | \"404\">>;\n /** In-memory reference cache for explicitly `static` boundary values. It never persists payloads\n * across processes; operated/durable cache implementations stay outside the public framework. */\n readonly staticBoundaryCache?: import(\"../boundary.js\").StaticBoundaryCache;\n /** Observe every loader/action failure - for error-reporting plugins (Sentry-style). Called for\n * real throws (not control-flow `Response`s like `redirect`), **before** the nearest `_error`\n * boundary renders / a soft-nav 500 / a rethrow. A failure a boundary answers is also written to the\n * server's `logger` (under its `errorLogDetail`) whether or not this is set, exactly as an unhandled\n * error is. Observation only; its own throws are swallowed so a faulty reporter can't break\n * rendering. (`beforeLoader` is intentionally omitted - the core HTTP hooks already cover\n * pre-request work.) */\n readonly onLoaderError?: (error: unknown, ctx: {\n readonly request: Request;\n readonly params: Readonly<Record<string, string>>;\n readonly route: string;\n }) => void;\n}"
4190
+ "signature": "export interface CreateWebAppOptions<Env = unknown> {\n readonly serverComponents?: import(\"../server-components/types.js\").ServerComponentRuntime;\n readonly adapter: RenderAdapter;\n readonly manifest: Manifest;\n /** Cache production module imports and layout preparation, never request data. Defaults to NODE_ENV === \"production\"; disable for a mutable manifest. */\n readonly cacheRouteModules?: boolean;\n /** URL of the built client entry (module script) injected into every page. */\n readonly clientEntry: string;\n /** Default document title for all pages. */\n readonly title?: string;\n /**\n * Resolve a fresh CSP nonce for each document request. The value is applied to every\n * framework-owned executable script; return `undefined` to keep the default nonce-free output.\n * Nonce-bearing documents are marked `private, no-store` so the request-specific value is not\n * replayed by browser, CDN, or ISR caches. The resolver does not declare a CSP header because the\n * policy's allowed sources are app-specific.\n */\n readonly nonce?: NonceResolver<Env>;\n /**\n * A hash-based Content-Security-Policy from `createCspPolicy`, instead of `nonce`. A document then\n * carries a nonce only when it needs one (it `defer()`s a value, or `meta` names the nonce in\n * `unsafeInlineScript`); every other page is nonce-free, gets the same CSP header on every request,\n * and stays cacheable by `withISR` or a CDN. `meta` still receives a nonce to name.\n */\n readonly csp?: CspPolicy;\n /**\n * Options for the underlying `server()` - `requestTimeoutMs`, `admission`, `gracefulSignals`, and\n * the rest of {@link ServerOptions}.\n *\n * Needed because the `Server` is constructed in here, so a caller has no other way to reach its\n * constructor: a page app could set no request timeout and no capacity gate, which are exactly the\n * two knobs a production readiness check looks for. An SSR app wants them MORE than a backend does -\n * a render is slow and allocation-heavy, so a burst that a JSON API would absorb is the one that\n * exhausts the pod.\n *\n * Applies to the whole app, {@link mounts} and the {@link api} auto-mount included: the capacity gate\n * sits at the fetch entry, ahead of the request hooks those are dispatched from.\n */\n readonly server?: ServerOptions;\n /**\n * Runs against the app BEFORE any page route is registered - the seam for `securityHeaders()`,\n * `requestId()`, `logger()`, a rate limit, or anything else applied with `use`.\n *\n * ```ts\n * createWebApp({\n * …,\n * use: (app) => {\n * app.use(securityHeaders())\n * app.use(requestId())\n * },\n * })\n * ```\n *\n * A callback rather than an array because `use` is overloaded - `Middleware`, `IdentityPlugin`,\n * `ContextPlugin` - and only the real call site instantiates the right overload. The return value\n * is ignored: this is for cross-cutting concerns, not for declaring routes (declare those on the\n * returned app, where they get their types).\n *\n * **Why the timing matters.** `beforeHandle`, `afterHandle`, `around`, `derive`/`decorate`, and\n * `onError` are snapshotted into each route AS IT IS DECLARED, and `createWebApp` declares every\n * page (plus the `/*` catch-all) before it returns - so a caller's `app.use(…)` afterwards would\n * bind them to no page, and outside production it throws (`HOOK_AFTER_PAGES`). `requestId()` is\n * exactly that case: it is a `derive`, so applied late it would leave every page without\n * `c.requestId`. A `group()` is its own scope and stays allowed. Route assurance evidence is order-scoped the same\n * way, so a late `securityHeaders()` leaves the pages unable to PROVE the header to `nifra assure`\n * even though it does still set it.\n *\n * `onRequest`/`onResponse` (and the response header/body hooks) are app-global arrays read at\n * request time, so those alone DO work when added late. Using this seam for everything avoids\n * having to remember which is which.\n *\n * Runs ahead of the {@link mounts} / {@link api} request hooks, so an `onRequest` middleware guards\n * a mounted auth handler too.\n *\n * A `ContextPlugin` applied here takes runtime effect but cannot widen the declared return type of\n * this function, so `c.requestId` is not typed on routes you declare afterwards. Named plugins are\n * idempotent, so `app.use(requestId())` on the returned app recovers the TYPE without applying the\n * plugin a second time.\n */\n readonly use?: (app: ReturnType<typeof server<Env>>) => void;\n /** Injected into each loader's `ctx.api` - typically an `inProcessClient(app)` (typed\n * per-route via `@nifrajs/client`'s `createRoutes`). Opaque to the core.\n *\n * **Auto-mount.** Every `inProcessClient(backend)` exposes the symbol-keyed platform-aware backend\n * mount interface from `@nifrajs/core/mount`; given an {@link apiPrefix}, `createWebApp` also serves\n * that backend over HTTP there: a request whose pathname starts with the prefix is dispatched before\n * page routing with the same `env`/`waitUntil` platform context, and the backend's `Response` is\n * returned untouched. The mount runs in `nifra dev` too. Without `apiPrefix` the backend is\n * loader-only.\n *\n * **Request-scoped loader calls.** While a page renders, its loaders, actions and boundaries get a\n * `ctx.api` bound to that request's platform identity: a backend handler reached through it sees the\n * visitor's `c.clientIp` (derived under this app's `server.clientIp` trust declaration), `c.env` and\n * `c.waitUntil`, so a per-caller rate limit or audit field keys on the real visitor. `c.clientIp` is\n * the supported way to read the caller - identity travels in the platform, so rebuilding a `Request`\n * does not lose it. Headers do NOT travel: the page request's `cookie` and `authorization` are never\n * copied, so a loader call is anonymous unless the loader passes headers on the call itself. */\n readonly api?: unknown;\n /** HTTP path prefix the {@link api} backend is mounted at, such as `\"/api\"`. A request whose\n * pathname is exactly the prefix or starts with `prefix + \"/\"` is dispatched to the backend before\n * page routing; the backend therefore defines its routes at the **full** path (`server().post(\"/api/\n * sync\", …)`), matching the in-process `inProcessClient` call sites. Unset or `\"\"`, nothing is\n * mounted: the app serves pages only and `api` stays a loader-only `ctx.api`. Mounting is also a\n * no-op when `api` does not expose the symbol mount.\n *\n * A page file under the prefix (`routes/api/report.tsx`) could never render - the backend answers\n * first and its 404 is final - so `createWebApp` throws, naming the file. The same holds for every\n * other pre-route mount. */\n readonly apiPrefix?: string;\n /**\n * Strip {@link apiPrefix} from the pathname before dispatching to `api` (default `false`).\n *\n * The default suits a backend that declares FULL paths (`server().post(\"/api/sync\", …)`), which is\n * right when it is only ever mounted here. Set this when the backend declares its routes WITHOUT the\n * prefix because it also runs standalone behind its own shell, so its paths cannot carry a prefix that\n * only exists when it is mounted. Without it every request 404s inside the backend, and the workaround\n * is a `Proxy` that rewrites each URL.\n */\n readonly apiStrip?: boolean;\n /**\n * Sub-apps mounted ahead of page routing - an auth handler, a webhook receiver, a stack's routes.\n *\n * Structural on purpose: anything with `{ path, app: { fetch } }` fits, so a library that exposes its\n * routes as such a list mounts as `mounts: theirRoutes` without `@nifrajs/web` taking a dependency on\n * it. `better-auth` is the motivating case - it is not a `backend` route, so `/api/auth/*` used to 404\n * silently.\n *\n * Tried longest-path-first and BEFORE the `api` mount, so a mount at `/api/auth` wins over a backend\n * at `/api` no matter which was declared first. `stripPrefix` is the per-mount form of {@link apiStrip}:\n * leave it off to pass the full path through. `opaque` states why a mount whose routes nifra cannot\n * read (better-auth's handler) is outside assurance; it is then listed as a known gap, with any\n * routes it declares reported as declared.\n */\n readonly mounts?: ReadonlyArray<{\n readonly path: string;\n readonly app: MountableApp<Env>;\n readonly stripPrefix?: boolean;\n readonly priority?: number;\n readonly fallbackOn?: 404;\n readonly opaque?: MountOptions<Env>[\"opaque\"];\n }>;\n /** Secret for **draft / preview mode** (see `enableDraft`). When set, a request carrying a valid\n * signed `__nifra_draft` cookie gets `ctx.draft === true` in loaders/actions (else always `false`).\n * Pair with `withISR({ draftSecret })` so editors bypass the cache. Omit to disable draft mode. */\n readonly draftSecret?: string;\n /** Per-route chunk URLs (`buildClient`'s `BuildManifest.routes`) - `routeId → [layout chunks…, own\n * chunk]`. When present, each page `modulepreload`s its matched route's chunks alongside the entry,\n * so the route code downloads in parallel (no entry→route-chunk waterfall). Omit ⇒ entry-only. */\n readonly routePreload?: Readonly<Record<string, readonly string[]>>;\n /** The app's bundled stylesheet URLs (`buildClient`'s `BuildManifest.css`) - the aggregate, injected\n * as `<link rel=\"stylesheet\">` in a page's `<head>`. Used as the fallback for any route absent from\n * {@link routeStyles}. Omit ⇒ no links (dev, where Vite injects CSS, or a CSS-free app). */\n readonly styles?: readonly string[];\n /** Per-route stylesheet URLs (`buildClient`'s `BuildManifest.routeStyles`) - `routeId → [chain CSS]`.\n * When a matched route has an entry here, only those (its layout chain + own CSS) are linked instead\n * of the aggregate `styles`, so a page ships only the CSS it uses. An empty array ⇒ no `<link>` (the\n * page imports no CSS). Routes absent here fall back to `styles`. Omit ⇒ always use `styles`. */\n readonly routeStyles?: Readonly<Record<string, readonly string[]>>;\n /** Locale key -> copy chunk URL (`buildClient`'s `BuildManifest.copyChunks`, the server manifest's\n * `copyChunks`). A production client build moves copy tables (`@nifrajs/i18n/copy`) into one chunk per\n * locale; each page lists them for the browser and preloads its own. Omit ⇒ tables keep their values. */\n readonly copyChunks?: Readonly<Record<string, string>>;\n /**\n * The app's locale routing, `defineI18nRouting()` from `@nifrajs/i18n/routing`, registered once:\n * export it as `i18n` from `backend/framework.ts`. Every document then takes its locale from the\n * URL: `<html lang dir>` from the registry unless the route's meta sets `lang`, a `Content-Language`\n * header, and the locale each adapter's `useLocale()` and `<I18nProvider>` read. A route under a\n * `[lang]` or `[[lang]]` directory is checked with its `matchSegment()` before any middleware: an\n * unserved locale, or a page missing from it, is a 404, and a non-canonical prefix (`/en/x` when the\n * default is unprefixed) redirects with a 308.\n */\n readonly i18n?: WebAppI18n;\n /**\n * Activation policy for framework-owned stylesheet links (default `\"blocking\"`). `\"deferred\"`\n * emits `media=\"print\"` links; the generated client waits for them and switches them to `all` before\n * mounting. Pair with an aggregate Vite stylesheet (`cssCodeSplit: false`) to prevent lazy-prefetch\n * CSS insertion. Non-hydrated pages always keep their stylesheet links blocking.\n */\n readonly cssLoading?: CssLoadingMode;\n /** SSG: the prerendered-path set (e.g. `enumerateStaticRoutes(routes).paths` or the build's\n * `prerendered.json`). Handed over as `window.__NIFRA_PRERENDERED__` on every page so a client soft-nav\n * into a prerendered route fetches its static `_data.json` instead of hitting the worker. A set over\n * 4 KB of JSON is served once from `/__nifra/prerendered.json?v=<version>`, cacheable for good, and\n * pages hand over only that URL; `prerenderRoutes` writes the file into a static output. */\n readonly prerenderedPaths?: readonly string[];\n /**\n * Pages a self-hosted build prerendered, answered from their file instead of rendered. `nifra build\n * --target bun|node` wires this from its prerender pass. The page is served from the page route,\n * so `use` middleware and every request hook run first; a request with a query string, a navigation\n * data or component request, or a draft-mode visitor renders on demand as before. Ignored with\n * {@link nonce}, whose documents need a nonce minted for their request.\n */\n readonly prerenderedPages?: PrerenderedPages;\n /** Publish the project's `AGENTS.md` inside `/llms.txt` and `/llms-full.txt`. **Off by default**:\n * those endpoints are public and unauthenticated, while `AGENTS.md` is a repo file written for the\n * team - unreleased feature names, internal hostnames, and \"don't touch X yet\" notes live there\n * routinely. Turn it on only for a repo whose guidelines you would publish as a page. */\n readonly publishLocalGuidelines?: boolean;\n /** Serve `/llms.txt` and `/llms-full.txt`: the page routes, and the backend routes when the backend\n * is mounted over HTTP at {@link apiPrefix}, with their request and response schemas in the full\n * text. **Off by default**: both are public and unauthenticated, and they list every route, admin\n * and internal ones included. Turn it on for an app whose whole surface you would publish. */\n readonly llmsTxt?: boolean;\n /** SSG: per dynamic route pattern, its `getStaticPaths` `fallback` (from `enumerateStaticRoutes` or\n * the build's `prerendered.json`). A route mapped to `\"404\"` rejects any path NOT in\n * `prerenderedPaths` with the 404 page - the unlisted path simply doesn't exist. `\"ssr\"` (the\n * default for unmapped routes) renders unlisted paths on-demand. */\n readonly staticFallbacks?: Readonly<Record<string, \"ssr\" | \"404\">>;\n /** In-memory reference cache for explicitly `static` boundary values. It never persists payloads\n * across processes; operated/durable cache implementations stay outside the public framework. */\n readonly staticBoundaryCache?: import(\"../boundary.js\").StaticBoundaryCache;\n /** Observe every loader/action failure - for error-reporting plugins (Sentry-style). Called for\n * real throws (not control-flow `Response`s like `redirect`), **before** the nearest `_error`\n * boundary renders / a soft-nav 500 / a rethrow. A failure a boundary answers is also written to the\n * server's `logger` (under its `errorLogDetail`) whether or not this is set, exactly as an unhandled\n * error is. Observation only; its own throws are swallowed so a faulty reporter can't break\n * rendering. (`beforeLoader` is intentionally omitted - the core HTTP hooks already cover\n * pre-request work.) */\n readonly onLoaderError?: (error: unknown, ctx: {\n readonly request: Request;\n readonly params: Readonly<Record<string, string>>;\n readonly route: string;\n }) => void;\n}"
4185
4191
  },
4186
4192
  {
4187
4193
  "name": "CronError",
@@ -6259,7 +6265,7 @@
6259
6265
  "name": "FileStorage",
6260
6266
  "kind": "class",
6261
6267
  "package": "@nifrajs/storage",
6262
- "signature": "export declare class FileStorage implements StorageAdapter {\n private readonly root;\n private readonly metadataRoot;\n private readonly legacyMetadataRoot;\n private readonly stagingRoot;\n constructor(root: string);\n private metadataPathFor;\n /** `<key>.json`, where earlier versions kept a sidecar: `a.json` there is also key `a.json`'s parent. */\n private legacyMetadataPathFor;\n private containedPath;\n /** Resolve `key` to an absolute path, asserting it stays inside `root` (defense-in-depth on top of `assertSafeKey`). */\n private pathFor;\n private symlinkError;\n private assertTrustedDirectory;\n /**\n * Prove that another local principal cannot rename any directory leading to `base` after validation.\n * A sticky shared parent (the ordinary `/tmp` case) is safe only while its child belongs to this uid.\n * Root-owned system directories are trusted; a directory owned by any other uid is not.\n */\n private assertTrustedAncestorChain;\n /** Reject existing symbolic links below `base`; missing suffixes are safe for later creation. */\n private assertNoSymlinkPath;\n /** {@link openContained} for an object: a directory under the root is a key prefix, not an object. */\n private openObject;\n /**\n * Open an existing file without following its final component, then prove the descriptor is the file\n * still reachable through a symlink-free path below the same root inode. Reads use the descriptor,\n * not the pathname checked earlier, closing their check/open race.\n */\n private openContained;\n private assertOpenedContained;\n /**\n * Write `data` whole or not at all: staged in a sibling directory, then renamed over `path`, so a\n * reader never sees a half-written object and a failed write leaves the previous one. The renamed\n * inode is then proven to be the staged one, reachable beneath the same root.\n */\n private writeContained;\n /** A new, exclusively created file in the staging directory holding `data`. */\n private stage;\n /**\n * Create parents and open without truncating. The opened inode is validated against the current,\n * fully resolved path before any caller data is written, closing the check/open symlink race.\n */\n private writeInPlace;\n put(key: string, data: StorageData, options?: PutOptions): Promise<void>;\n get(key: string): Promise<StorageObject | null>;\n delete(key: string): Promise<void>;\n private readMetadata;\n private removeLegacyMetadata;\n exists(key: string): Promise<boolean>;\n /** Revalidate an opened inode immediately before unlinking its pathname. */\n private removeContained;\n list(options?: ListOptions): Promise<string[]>;\n /** The directory for key prefix `dirKey`, or `undefined` when no plain directory chain leads there. */\n private listingDirectory;\n private walk;\n}"
6268
+ "signature": "export declare class FileStorage implements StorageAdapter {\n private root;\n private metadataRoot;\n private legacyMetadataRoot;\n private stagingRoot;\n /** Each key's latest write, so this instance publishes a key's body and sidecar one put at a time. */\n private readonly writes;\n /** The directory holding the root and its bookkeeping, by real path and identity, once resolved. */\n private anchor;\n constructor(root: string);\n private placeRoot;\n /**\n * Resolve the directory holding the root (or its nearest existing ancestor) once, then work beneath\n * that real path and prove before every operation that it is still the same directory. Swapping an\n * ancestor, for a symbolic link or by a rename from whoever can write above the root, then cannot\n * redirect a later read, write or delete into another tree: the operation fails closed instead.\n */\n private pinRoot;\n private movedError;\n /**\n * Move the pin down to the directory holding the root once it exists. Pinned at first use, the\n * anchor is the nearest existing ancestor; a directory a first write creates below it was never\n * checked again, so swapping it for a link redirected every later operation. Called right after\n * such a write creates directories, and before every operation.\n */\n private pinHolder;\n private resolveAnchor;\n private metadataPathFor;\n /** `<key>.json`, where earlier versions kept a sidecar: `a.json` there is also key `a.json`'s parent. */\n private legacyMetadataPathFor;\n private containedPath;\n /** Resolve `key` to an absolute path, asserting it stays inside `root` (defense-in-depth on top of `assertSafeKey`). */\n private pathFor;\n private symlinkError;\n private assertTrustedDirectory;\n /**\n * Prove that another local principal cannot rename any directory leading to `base` after validation.\n * A sticky shared parent (the ordinary `/tmp` case) is safe only while its child belongs to this uid.\n * Root-owned system directories are trusted; a directory owned by any other uid is not.\n */\n private assertTrustedAncestorChain;\n /** Reject existing symbolic links below `base`; missing suffixes are safe for later creation. */\n private assertNoSymlinkPath;\n /** {@link openContained} for an object: a directory under the root is a key prefix, not an object. */\n private openObject;\n /**\n * Open an existing file without following its final component, then prove the descriptor is the file\n * still reachable through a symlink-free path below the same root inode. Reads use the descriptor,\n * not the pathname checked earlier, closing their check/open race.\n */\n private openContained;\n private assertOpenedContained;\n /**\n * Write `data` whole or not at all: staged in a sibling directory, then renamed over `path`, so a\n * reader never sees a half-written object and a failed write leaves the previous one. The renamed\n * inode is then proven to be the staged one, reachable beneath the same root.\n */\n private writeContained;\n /** A new, exclusively created file in the staging directory holding `data`. */\n private stage;\n /**\n * Create parents and open without truncating. The opened inode is validated against the current,\n * fully resolved path before any caller data is written, closing the check/open symlink race.\n */\n private writeInPlace;\n /** Run `write` after this instance's earlier write of `key` settles. */\n private serialized;\n put(key: string, data: StorageData, options?: PutOptions): Promise<void>;\n get(key: string): Promise<StorageObject | null>;\n delete(key: string): Promise<void>;\n private readMetadata;\n private removeLegacyMetadata;\n exists(key: string): Promise<boolean>;\n /** Revalidate an opened inode immediately before unlinking its pathname. */\n private removeContained;\n list(options?: ListOptions): Promise<string[]>;\n /** The directory for key prefix `dirKey`, or `undefined` when no plain directory chain leads there. */\n private listingDirectory;\n private walk;\n}"
6263
6269
  },
6264
6270
  {
6265
6271
  "name": "FileType",
@@ -6483,7 +6489,7 @@
6483
6489
  "name": "GraphqlHttpOptions",
6484
6490
  "kind": "interface",
6485
6491
  "package": "@nifrajs/graphql",
6486
- "signature": "export interface GraphqlHttpOptions<Context = unknown, Env = unknown> {\n /** The executable schema (types + resolvers), e.g. from `graphql`'s `buildSchema` or a schema builder. */\n readonly schema: GraphQLSchema;\n /** Build the resolver `contextValue` from the request (and nifra context when mounted). */\n readonly context?: GraphqlContextBuilder<Context, Env>;\n /** The nifra route context, when the caller has one (supplied by `mountGraphql`). */\n readonly nifra?: NifraContextLike<Env>;\n /** Maximum request body size in bytes. Default 1 MB. Rejected bodies answer 413. */\n readonly maxBodyBytes?: number;\n /** Maximum UTF-8 query size. Default 64 KiB, applied to POST and GET. */\n readonly maxQueryBytes?: number;\n /** Maximum UTF-8 serialized variables size. Default 256 KiB. */\n readonly maxVariablesBytes?: number;\n /** Maximum expanded field depth. Default 20. */\n readonly maxDepth?: number;\n /** Maximum aliases in one document. Default 100. */\n readonly maxAliases?: number;\n /** Maximum simple field complexity in one document. Default 1,000. */\n readonly maxComplexity?: number;\n /** Maximum operation definitions in one document. Default 10. */\n readonly maxOperations?: number;\n /**\n * Maximum pairs of fields sharing a response name in one selection set, counted through fragments.\n * Validation compares every such pair, so this bounds its cost. Default 2,000.\n */\n readonly maxFieldOverlaps?: number;\n /**\n * Maximum asynchronous resolver execution time. Default 10 seconds. The execution's abort signal,\n * which a resolver reads through `info.getAbortSignal()`, is aborted at this deadline and when the\n * request itself is aborted.\n */\n readonly executionTimeoutMs?: number;\n /** Prototype-pollution policy for the parsed JSON body. Default `\"reject\"`. */\n readonly protoPoisoning?: ProtoPoisoning;\n /**\n * Answer introspection queries (`__schema`, `__type`). Default `true`. Set `false` to refuse them\n * as a validation error (400); `__typename` still resolves. Shared with `subscriptions`.\n */\n readonly introspection?: boolean;\n /** Optional root value passed to the executor. */\n readonly rootValue?: unknown;\n /**\n * Origin allowlist for the CORS `access-control-allow-origin` header. Omit to reflect any origin\n * (`*`) - correct for a public API; set it to lock the browser callers down.\n */\n readonly allowedOrigins?: readonly string[];\n /**\n * Per-request authorization, run after the origin check and before the body is read or parsed; a\n * CORS preflight (`OPTIONS`) skips it. Return `false` to answer `401` with a GraphQL error envelope.\n */\n readonly authorize?: (request: Request) => boolean | Promise<boolean>;\n /** Emit the legacy always-200 `application/json` response shape instead of `application/graphql-response+json`. */\n readonly legacyJsonResponse?: boolean;\n /** Format request/execution errors. The default masks resolver messages and preserves request errors. */\n readonly formatError?: (error: GraphQLError, phase: \"request\" | \"execution\") => unknown;\n}"
6492
+ "signature": "export interface GraphqlHttpOptions<Context = unknown, Env = unknown> {\n /** The executable schema (types + resolvers), e.g. from `graphql`'s `buildSchema` or a schema builder. */\n readonly schema: GraphQLSchema;\n /** Build the resolver `contextValue` from the request (and nifra context when mounted). */\n readonly context?: GraphqlContextBuilder<Context, Env>;\n /** The nifra route context, when the caller has one (supplied by `mountGraphql`). */\n readonly nifra?: NifraContextLike<Env>;\n /** Maximum request body size in bytes. Default 1 MB. Rejected bodies answer 413. */\n readonly maxBodyBytes?: number;\n /** Maximum UTF-8 query size. Default 64 KiB, applied to POST and GET. */\n readonly maxQueryBytes?: number;\n /** Maximum UTF-8 serialized variables size. Default 256 KiB. */\n readonly maxVariablesBytes?: number;\n /** Maximum expanded field depth. Default 20. */\n readonly maxDepth?: number;\n /** Maximum aliases in one document. Default 100. */\n readonly maxAliases?: number;\n /** Maximum simple field complexity in one document. Default 1,000. */\n readonly maxComplexity?: number;\n /** Maximum operation definitions in one document. Default 10. */\n readonly maxOperations?: number;\n /**\n * Maximum pairs of fields sharing a response name in one selection set, counted through fragments.\n * Validation compares every such pair, so this bounds its cost. Default 2,000.\n */\n readonly maxFieldOverlaps?: number;\n /**\n * Maximum selections that fragments, named and inline, bring into the selection sets holding them,\n * summed over the document. Validation walks each one per selection set, so a long chain of\n * fragments that select almost nothing costs quadratic work within the depth and complexity limits.\n * Default 20,000.\n */\n readonly maxFragmentExpansion?: number;\n /**\n * Maximum fragment comparisons validation makes: in each selection set it compares every two\n * fragments spread there and, pair by pair, the fragments each reaches. Many fragments that select\n * few fields cost work in the square of their count within the other limits. The default admits a\n * binary tree of 255 fragments. Default 100,000.\n */\n readonly maxFragmentComparisons?: number;\n /**\n * Maximum asynchronous resolver execution time. Default 10 seconds. The execution's abort signal,\n * which a resolver reads through `info.getAbortSignal()`, is aborted at this deadline and when the\n * request itself is aborted.\n */\n readonly executionTimeoutMs?: number;\n /** Prototype-pollution policy for the parsed JSON body. Default `\"reject\"`. */\n readonly protoPoisoning?: ProtoPoisoning;\n /**\n * Answer introspection queries (`__schema`, `__type`). Default `true`. Set `false` to refuse them\n * as a validation error (400); `__typename` still resolves. Shared with `subscriptions`.\n */\n readonly introspection?: boolean;\n /** Optional root value passed to the executor. */\n readonly rootValue?: unknown;\n /**\n * Origin allowlist for the CORS `access-control-allow-origin` header. Omit to reflect any origin\n * (`*`) - correct for a public API; set it to lock the browser callers down.\n */\n readonly allowedOrigins?: readonly string[];\n /**\n * Per-request authorization, run after the origin check and before the body is read or parsed; a\n * CORS preflight (`OPTIONS`) skips it. Return `false` to answer `401` with a GraphQL error envelope.\n */\n readonly authorize?: (request: Request) => boolean | Promise<boolean>;\n /** Emit the legacy always-200 `application/json` response shape instead of `application/graphql-response+json`. */\n readonly legacyJsonResponse?: boolean;\n /** Format request/execution errors. The default masks resolver messages and preserves request errors. */\n readonly formatError?: (error: GraphQLError, phase: \"request\" | \"execution\") => unknown;\n}"
6487
6493
  },
6488
6494
  {
6489
6495
  "name": "GraphqlPubSub",
@@ -6508,7 +6514,7 @@
6508
6514
  "name": "GraphqlWsOptions",
6509
6515
  "kind": "interface",
6510
6516
  "package": "@nifrajs/graphql",
6511
- "signature": "export interface GraphqlWsOptions<Context extends Record<string, unknown> = Record<string, unknown>> {\n /** The executable schema. */\n readonly schema: GraphQLSchema;\n /** Build the resolver `contextValue` from the upgrade request. Shared with the HTTP transport. */\n readonly context?: GraphqlContextBuilder<Context>;\n /**\n * Admit a socket from its upgrade request, before {@link onConnect}; return `false` (or throw) to\n * reject the connection. `mountGraphql({ subscriptions: true })` passes its HTTP `authorize` here.\n */\n readonly authorize?: (request: Request) => boolean | Promise<boolean>;\n /**\n * Called once per connection with the client's `connection_init` payload; return `false` (or throw)\n * to reject the connection. The seam for authenticating a socket from an init token.\n */\n readonly onConnect?: (payload: ConnectionInitMessage[\"payload\"], request: Request) => boolean | Promise<boolean>;\n /** Additional raw `graphql-ws` server options merged last (advanced escape hatch). */\n readonly serverOptions?: Partial<ServerOptions>;\n /** Same query/complexity limits as the HTTP transport. */\n readonly maxQueryBytes?: number;\n readonly maxVariablesBytes?: number;\n readonly maxDepth?: number;\n readonly maxAliases?: number;\n readonly maxComplexity?: number;\n readonly maxOperations?: number;\n readonly maxFieldOverlaps?: number;\n /** Maximum concurrent subscription operation ids per connection. Default 20. */\n readonly maxSubscriptions?: number;\n /**\n * Answer introspection (`__schema`, `__type`). Default `true`. Set `false` to refuse such an\n * operation with an `error` frame; `__typename` still resolves.\n */\n readonly introspection?: boolean;\n /**\n * Maximum time for initial execute/subscribe setup. Default 10 seconds. Each operation's abort\n * signal, which a resolver reads through `info.getAbortSignal()`, is aborted at this deadline, when\n * the client completes the operation, and when the socket closes.\n */\n readonly executionTimeoutMs?: number;\n}"
6517
+ "signature": "export interface GraphqlWsOptions<Context extends Record<string, unknown> = Record<string, unknown>> {\n /** The executable schema. */\n readonly schema: GraphQLSchema;\n /** Build the resolver `contextValue` from the upgrade request. Shared with the HTTP transport. */\n readonly context?: GraphqlContextBuilder<Context>;\n /**\n * Admit a socket from its upgrade request, before {@link onConnect}; return `false` (or throw) to\n * reject the connection. `mountGraphql({ subscriptions: true })` passes its HTTP `authorize` here.\n */\n readonly authorize?: (request: Request) => boolean | Promise<boolean>;\n /**\n * Called once per connection with the client's `connection_init` payload; return `false` (or throw)\n * to reject the connection. The seam for authenticating a socket from an init token.\n */\n readonly onConnect?: (payload: ConnectionInitMessage[\"payload\"], request: Request) => boolean | Promise<boolean>;\n /** Additional raw `graphql-ws` server options merged last (advanced escape hatch). */\n readonly serverOptions?: Partial<ServerOptions>;\n /** Same query/complexity limits as the HTTP transport. */\n readonly maxQueryBytes?: number;\n readonly maxVariablesBytes?: number;\n readonly maxDepth?: number;\n readonly maxAliases?: number;\n readonly maxComplexity?: number;\n readonly maxOperations?: number;\n readonly maxFieldOverlaps?: number;\n readonly maxFragmentExpansion?: number;\n readonly maxFragmentComparisons?: number;\n /** Maximum concurrent subscription operation ids per connection. Default 20. */\n readonly maxSubscriptions?: number;\n /**\n * Answer introspection (`__schema`, `__type`). Default `true`. Set `false` to refuse such an\n * operation with an `error` frame; `__typename` still resolves.\n */\n readonly introspection?: boolean;\n /**\n * Maximum time for initial execute/subscribe setup. Default 10 seconds. Each operation's abort\n * signal, which a resolver reads through `info.getAbortSignal()`, is aborted at this deadline, when\n * the client completes the operation, and when the socket closes.\n */\n readonly executionTimeoutMs?: number;\n}"
6512
6518
  },
6513
6519
  {
6514
6520
  "name": "GuardOptions",
@@ -7073,7 +7079,7 @@
7073
7079
  "name": "ImageHandlerOptions",
7074
7080
  "kind": "interface",
7075
7081
  "package": "@nifrajs/image",
7076
- "signature": "export interface ImageHandlerOptions {\n /** Codec backend. Default: {@link bunImageBackend} (requires the Bun runtime). */\n readonly backend?: ImageBackend;\n /** Absolute directory that local (path) sources resolve under. Path-traversal- and symlink-guarded.\n * Omit to **disable local sources** (every path source → 403). */\n readonly root?: string;\n /** Exact origins (`https://cdn.example`) allowed for remote sources. Omitted/empty ⇒ **no remote\n * sources** (fail-closed against SSRF). Only `http:`/`https:` URLs are ever considered. */\n readonly allowedOrigins?: readonly string[];\n /** Max bytes read from a source before rejecting (413). Default 20 MiB. */\n readonly maxSourceBytes?: number;\n /** Max source pixels (w×h) before rejecting (413) - decompression-bomb guard. Default 40 MP. */\n readonly maxSourcePixels?: number;\n /** Hard cap on the requested width; larger `?w` is clamped down. Default 3840. */\n readonly maxWidth?: number;\n /** Max concurrent transforms (codec work is CPU/memory-heavy). Excess requests queue. Default 4. */\n readonly concurrency?: number;\n /**\n * Max requests reading a source at once - the admission width. Sized above `concurrency` on purpose:\n * a remote source is network-bound, and holding a codec slot across a 10s fetch would let a handful\n * of slow origins idle the CPU lane out entirely. Default `concurrency * 2`.\n *\n * This is also the memory bound: at most this many source buffers exist at once, so the ceiling is\n * `sourceConcurrency * maxSourceBytes` (default 8 x 20 MiB = 160 MiB) plus the codec's own working\n * set. Lower it, or `maxSourceBytes`, on a small instance.\n */\n readonly sourceConcurrency?: number;\n /** Maximum queued image requests beyond the admission width. Default `concurrency * 16`. */\n readonly maxQueue?: number;\n /** `Cache-Control: public, max-age=<n>` seconds. Default 1 hour. */\n readonly cacheMaxAge?: number;\n /** Add `immutable` to Cache-Control. Off by default: enable only when every source URL changes with\n * its content, otherwise browsers are allowed to retain a changed image until the full max-age. */\n readonly immutable?: boolean;\n /** Quality used when `?q` is absent. Default 75. */\n readonly defaultQuality?: number;\n /** Remote-fetch timeout (ms). Default 10 000. */\n readonly fetchTimeoutMs?: number;\n /** `fetch` implementation for remote sources (injectable for custom timeouts/proxy and for tests).\n * Default: the global `fetch`. */\n readonly fetch?: typeof fetch;\n /** Require **signed URLs**: every request must carry a valid `&s=` HMAC over `(src, w, q[, exp])` or\n * it's rejected with `403`. Use the SAME `secret` as your `selfHostedLoader`/`signImageUrl`. This\n * locks the endpoint to URLs your app minted - the defense against resize-bombing. */\n readonly signing?: {\n readonly secret: string;\n };\n}"
7082
+ "signature": "export interface ImageHandlerOptions {\n /** Codec backend. Default: {@link bunImageBackend} (requires the Bun runtime). */\n readonly backend?: ImageBackend;\n /** Absolute directory that local (path) sources resolve under. Path-traversal- and symlink-guarded,\n * and a hidden name (a segment starting with `.` other than `.well-known`) is not found, as with\n * `@nifrajs/web`'s public files. Omit to **disable local sources** (every path source → 403). */\n readonly root?: string;\n /** Exact origins (`https://cdn.example`) allowed for remote sources. Omitted/empty ⇒ **no remote\n * sources** (fail-closed against SSRF). Only `http:`/`https:` URLs are ever considered. */\n readonly allowedOrigins?: readonly string[];\n /** Max bytes read from a source before rejecting (413). Default 20 MiB. */\n readonly maxSourceBytes?: number;\n /** Max source pixels (w×h) before rejecting (413) - decompression-bomb guard. Default 40 MP. */\n readonly maxSourcePixels?: number;\n /** Hard cap on the requested width; larger `?w` is clamped down. Default 3840. */\n readonly maxWidth?: number;\n /** Max concurrent transforms (codec work is CPU/memory-heavy). Excess requests queue. Default 4. */\n readonly concurrency?: number;\n /**\n * Max requests reading a source at once - the admission width. Sized above `concurrency` on purpose:\n * a remote source is network-bound, and holding a codec slot across a 10s fetch would let a handful\n * of slow origins idle the CPU lane out entirely. Default `concurrency * 2`.\n *\n * This is also the memory bound: at most this many source buffers exist at once, so the ceiling is\n * `sourceConcurrency * maxSourceBytes` (default 8 x 20 MiB = 160 MiB) plus the codec's own working\n * set. Lower it, or `maxSourceBytes`, on a small instance.\n */\n readonly sourceConcurrency?: number;\n /** Maximum queued image requests beyond the admission width. Default `concurrency * 16`. */\n readonly maxQueue?: number;\n /** `Cache-Control: public, max-age=<n>` seconds. Default 1 hour. */\n readonly cacheMaxAge?: number;\n /** Add `immutable` to Cache-Control. Off by default: enable only when every source URL changes with\n * its content, otherwise browsers are allowed to retain a changed image until the full max-age. */\n readonly immutable?: boolean;\n /** Quality used when `?q` is absent. Default 75. */\n readonly defaultQuality?: number;\n /** Remote-fetch timeout (ms). Default 10 000. */\n readonly fetchTimeoutMs?: number;\n /** `fetch` implementation for remote sources (injectable for custom timeouts/proxy and for tests).\n * Default: the global `fetch`. */\n readonly fetch?: typeof fetch;\n /** Require **signed URLs**: every request must carry a valid `&s=` HMAC over `(src, w, q[, exp])` or\n * it's rejected with `403`. Use the SAME `secret` as your `selfHostedLoader`/`signImageUrl`. This\n * locks the endpoint to URLs your app minted - the defense against resize-bombing. */\n readonly signing?: {\n readonly secret: string;\n };\n}"
7077
7083
  },
7078
7084
  {
7079
7085
  "name": "ImageInfo",
@@ -8682,7 +8688,7 @@
8682
8688
  "name": "MemoryCacheStore",
8683
8689
  "kind": "class",
8684
8690
  "package": "@nifrajs/web",
8685
- "signature": "export declare class MemoryCacheStore implements CacheStore {\n private readonly cache;\n private readonly max;\n private readonly tagEpoch;\n private order;\n private readonly purgedKeys;\n private readonly purgedTags;\n constructor(options?: MemoryCacheStoreOptions);\n get(key: string): Promise<CachedResponse | undefined>;\n fence(): number;\n set(key: string, value: CachedResponse): Promise<void>;\n delete(key: string): Promise<void>;\n invalidateTag(tag: string): Promise<void>;\n private purgedAfter;\n private markPurged;\n private pruneTagEpochs;\n}",
8691
+ "signature": "export declare class MemoryCacheStore implements CacheStore {\n private readonly cache;\n private readonly max;\n private readonly tagEpoch;\n private order;\n private readonly purgedKeys;\n private readonly purgedTags;\n private purgeFloor;\n constructor(options?: MemoryCacheStoreOptions);\n get(key: string): Promise<CachedResponse | undefined>;\n fence(): number;\n set(key: string, value: CachedResponse): Promise<void>;\n delete(key: string): Promise<void>;\n invalidateTag(tag: string): Promise<void>;\n private purgedAfter;\n private markPurged;\n private pruneTagEpochs;\n}",
8686
8692
  "doc": "/**\n * In-process ISR cache. Refuses to run in production unless explicitly allowed (mirrors the\n * rate-limit `MemoryStore` - a per-instance cache is unsafe across instances). Bounded **LRU**: a\n * read or write bumps the entry, so the least-recently-used evicts past `max` (a hot, frequently-read\n * page survives a burst of new pages).\n */"
8687
8693
  },
8688
8694
  {
@@ -8815,14 +8821,14 @@
8815
8821
  "name": "MemorySessionStore",
8816
8822
  "kind": "class",
8817
8823
  "package": "@nifrajs/auth",
8818
- "signature": "export declare class MemorySessionStore implements SessionStore {\n private readonly sessions;\n private readonly max;\n constructor(options?: MemorySessionStoreOptions);\n get(id: string): Promise<SessionRecord | undefined>;\n set(id: string, record: SessionRecord): Promise<void>;\n delete(id: string): Promise<void>;\n}",
8819
- "doc": "/**\n * In-process session store. Refuses to run in production unless explicitly allowed (mirrors the ISR\n * `MemoryCacheStore` + the rate-limit `MemoryStore` - a per-instance store is unsafe across instances).\n * Bounded: oldest-inserted entries evict past `max`.\n */"
8824
+ "signature": "export declare class MemorySessionStore implements SessionStore {\n private readonly sessions;\n private readonly markers;\n private readonly max;\n constructor(options?: MemorySessionStoreOptions);\n private mapFor;\n get(id: string): Promise<SessionRecord | undefined>;\n set(id: string, record: SessionRecord): Promise<void>;\n delete(id: string): Promise<void>;\n}",
8825
+ "doc": "/**\n * In-process session store. Refuses to run in production unless explicitly allowed (mirrors the ISR\n * `MemoryCacheStore` + the rate-limit `MemoryStore` - a per-instance store is unsafe across instances).\n * Bounded: oldest-inserted entries evict past `max`, sessions and revocation markers each on their own.\n */"
8820
8826
  },
8821
8827
  {
8822
8828
  "name": "MemorySessionStoreOptions",
8823
8829
  "kind": "interface",
8824
8830
  "package": "@nifrajs/auth",
8825
- "signature": "export interface MemorySessionStoreOptions {\n /** Allow the in-memory store in production. Off by default - per-instance sessions don't hold across\n * instances and are lost on restart. */\n readonly allowInProduction?: boolean;\n /** Hard cap on stored sessions; the oldest-inserted is evicted past it (default 10_000). */\n readonly max?: number;\n}"
8831
+ "signature": "export interface MemorySessionStoreOptions {\n /** Allow the in-memory store in production. Off by default - per-instance sessions don't hold across\n * instances and are lost on restart. */\n readonly allowInProduction?: boolean;\n /** Hard cap on stored sessions; the oldest-inserted is evicted past it (default 10_000). Revocation\n * markers are capped by it separately, so new sessions never evict one. */\n readonly max?: number;\n}"
8826
8832
  },
8827
8833
  {
8828
8834
  "name": "MemoryStaticBoundaryCache",
@@ -10453,14 +10459,14 @@
10453
10459
  "name": "PiBackend",
10454
10460
  "kind": "class",
10455
10461
  "package": "@nifrajs/coding-agent",
10456
- "signature": "export declare class PiBackend implements AgentBackend {\n readonly info: AgentBackendInfo;\n private readonly options;\n private readonly maxRecordBytes;\n private readonly maxMessageChars;\n private readonly sessions;\n constructor(options?: PiBackendOptions);\n createSession(input: CreateSessionInput): Promise<AgentSessionSnapshot>;\n send(input: SendMessageInput): AsyncIterable<AgentEvent>;\n cancel(sessionId: string, reason?: string): Promise<void>;\n snapshot(sessionId: string): Promise<AgentSessionSnapshot>;\n reload(sessionId: string): Promise<ReloadResult>;\n resolveApproval(sessionId: string, approvalId: string, approved: boolean): Promise<boolean | undefined>;\n close(sessionId: string): Promise<void>;\n private requireSession;\n private spawnProcess;\n private attachProcess;\n private readStdout;\n private readStderr;\n private consumeText;\n private consumeRecord;\n private emit;\n private updateSnapshot;\n private failActive;\n private endTurn;\n private finishTurn;\n private cancelTurn;\n private clearTurnSignal;\n private clearTurn;\n}",
10462
+ "signature": "export declare class PiBackend implements AgentBackend {\n readonly info: AgentBackendInfo;\n private readonly options;\n private readonly maxRecordBytes;\n private readonly maxMessageChars;\n private readonly sessions;\n constructor(options?: PiBackendOptions);\n createSession(input: CreateSessionInput): Promise<AgentSessionSnapshot>;\n send(input: SendMessageInput): AsyncIterable<AgentEvent>;\n cancel(sessionId: string, reason?: string): Promise<void>;\n snapshot(sessionId: string): Promise<AgentSessionSnapshot>;\n reload(sessionId: string): Promise<ReloadResult>;\n resolveApproval(sessionId: string, approvalId: string, approved: boolean): Promise<boolean | undefined>;\n close(sessionId: string): Promise<void>;\n private requireSession;\n private spawnProcess;\n private attachProcess;\n private readStdout;\n private readStderr;\n private consumeText;\n private consumeRecord;\n private emit;\n private updateSnapshot;\n private failActive;\n private endTurn;\n private finishTurn;\n private cancelTurn;\n private endDrain;\n private clearTurnSignal;\n private clearTurn;\n}",
10457
10463
  "doc": "/**\n * Spawn Pi in its documented JSONL RPC mode and translate its events into the Nifra protocol.\n *\n * This adapter intentionally talks to the public Pi process protocol instead of importing Pi into\n * any Nifra framework package. A future SDK adapter can implement the same AgentBackend contract.\n */"
10458
10464
  },
10459
10465
  {
10460
10466
  "name": "PiBackend",
10461
10467
  "kind": "class",
10462
10468
  "package": "@nifrajs/pi",
10463
- "signature": "export declare class PiBackend implements AgentBackend {\n readonly info: AgentBackendInfo;\n private readonly options;\n private readonly maxRecordBytes;\n private readonly maxMessageChars;\n private readonly sessions;\n constructor(options?: PiBackendOptions);\n createSession(input: CreateSessionInput): Promise<AgentSessionSnapshot>;\n send(input: SendMessageInput): AsyncIterable<AgentEvent>;\n cancel(sessionId: string, reason?: string): Promise<void>;\n snapshot(sessionId: string): Promise<AgentSessionSnapshot>;\n reload(sessionId: string): Promise<ReloadResult>;\n resolveApproval(sessionId: string, approvalId: string, approved: boolean): Promise<boolean | undefined>;\n close(sessionId: string): Promise<void>;\n private requireSession;\n private spawnProcess;\n private attachProcess;\n private readStdout;\n private readStderr;\n private consumeText;\n private consumeRecord;\n private emit;\n private updateSnapshot;\n private failActive;\n private endTurn;\n private finishTurn;\n private cancelTurn;\n private clearTurnSignal;\n private clearTurn;\n}",
10469
+ "signature": "export declare class PiBackend implements AgentBackend {\n readonly info: AgentBackendInfo;\n private readonly options;\n private readonly maxRecordBytes;\n private readonly maxMessageChars;\n private readonly sessions;\n constructor(options?: PiBackendOptions);\n createSession(input: CreateSessionInput): Promise<AgentSessionSnapshot>;\n send(input: SendMessageInput): AsyncIterable<AgentEvent>;\n cancel(sessionId: string, reason?: string): Promise<void>;\n snapshot(sessionId: string): Promise<AgentSessionSnapshot>;\n reload(sessionId: string): Promise<ReloadResult>;\n resolveApproval(sessionId: string, approvalId: string, approved: boolean): Promise<boolean | undefined>;\n close(sessionId: string): Promise<void>;\n private requireSession;\n private spawnProcess;\n private attachProcess;\n private readStdout;\n private readStderr;\n private consumeText;\n private consumeRecord;\n private emit;\n private updateSnapshot;\n private failActive;\n private endTurn;\n private finishTurn;\n private cancelTurn;\n private endDrain;\n private clearTurnSignal;\n private clearTurn;\n}",
10464
10470
  "doc": "/**\n * Spawn Pi in its documented JSONL RPC mode and translate its events into the Nifra protocol.\n *\n * This adapter intentionally talks to the public Pi process protocol instead of importing Pi into\n * any Nifra framework package. A future SDK adapter can implement the same AgentBackend contract.\n */"
10465
10471
  },
10466
10472
  {
@@ -10826,7 +10832,7 @@
10826
10832
  "name": "PrerenderEntry",
10827
10833
  "kind": "interface",
10828
10834
  "package": "@nifrajs/web",
10829
- "signature": "export interface PrerenderEntry {\n /** The route pattern that was prerendered (e.g. `/`, `/about`). */\n readonly path: string;\n /** The written file, relative to `outDir` (e.g. `index.html`, `about/index.html`). */\n readonly file: string;\n /** Byte length of the written HTML. */\n readonly bytes: number;\n /** The loader-data file written alongside (`<path>/_data.json`) so a client soft-nav INTO this\n * route skips the worker. Absent when the data-mode response is NDJSON (a deferred loader). */\n readonly dataFile?: string;\n}"
10835
+ "signature": "export interface PrerenderEntry {\n /** The route pattern that was prerendered (e.g. `/`, `/about`). */\n readonly path: string;\n /** The written file, relative to `outDir` (e.g. `index.html`, `about/index.html`). */\n readonly file: string;\n /** Byte length of the written HTML. */\n readonly bytes: number;\n /** The loader-data file written alongside (`<path>/_data.json`) so a client soft-nav INTO this\n * route skips the worker. Absent when the data-mode response is NDJSON (a deferred loader). */\n readonly dataFile?: string;\n /** The document headers a self-hosted server sends with this file (its `content-language` and CSP).\n * Absent when the render was specific to its request - it set a cookie, was private or no-store, or\n * varied on a request header - so a server keeps rendering this path on demand. */\n readonly serveHeaders?: Readonly<Record<string, string>>;\n}"
10830
10836
  },
10831
10837
  {
10832
10838
  "name": "PrerenderOptions",
@@ -10840,6 +10846,19 @@
10840
10846
  "package": "@nifrajs/web",
10841
10847
  "signature": "export interface PrerenderResult {\n readonly prerendered: readonly PrerenderEntry[];\n readonly skipped: readonly {\n readonly path: string;\n readonly reason: string;\n }[];\n /** Per dynamic route pattern, its `getStaticPaths` `fallback` (`\"ssr\"` default) - so the deploy\n * layer knows whether unlisted paths should hit the worker (`\"ssr\"`) or 404 (`\"404\"`). */\n readonly fallbacks: Readonly<Record<string, \"ssr\" | \"404\">>;\n}"
10842
10848
  },
10849
+ {
10850
+ "name": "PrerenderedPageReaderOptions",
10851
+ "kind": "interface",
10852
+ "package": "@nifrajs/web",
10853
+ "signature": "export interface PrerenderedPageReaderOptions {\n /** Absolute path of the directory the build wrote the prerendered pages into. */\n readonly dir: string;\n /** Each page path mapped to its file, relative to `dir`. */\n readonly files: Readonly<Record<string, string>>;\n /** Bytes of HTML kept in memory once read (default 32 MiB); a page past the budget is read per request. */\n readonly cacheBytes?: number;\n}"
10854
+ },
10855
+ {
10856
+ "name": "PrerenderedPages",
10857
+ "kind": "interface",
10858
+ "package": "@nifrajs/web",
10859
+ "signature": "export interface PrerenderedPages {\n /** Each servable path, spelled as a request URL spells it, mapped to the document headers its\n * build-time render answered with (a prerender entry's `serveHeaders`). */\n readonly pages: Readonly<Record<string, Readonly<Record<string, string>>>>;\n /** The page's HTML, or `undefined` to render it on demand instead. */\n read(pathname: string): Promise<string | undefined>;\n}",
10860
+ "doc": "/**\n * Pages a self-hosted build prerendered, which `createWebApp` answers from their file instead of\n * rendering them. The file is served from inside the app, after `use` middleware, so a gate in front of\n * the pages still runs.\n */"
10861
+ },
10843
10862
  {
10844
10863
  "name": "PresignableStorageAdapter",
10845
10864
  "kind": "interface",
@@ -11605,6 +11624,13 @@
11605
11624
  "package": "@nifrajs/core",
11606
11625
  "signature": "export interface ReconciliationWorkerResult {\n readonly acquired: boolean;\n readonly pages: number;\n readonly scanned: number;\n readonly handled: number;\n}"
11607
11626
  },
11627
+ {
11628
+ "name": "RecordingObservationLifecycle",
11629
+ "kind": "interface",
11630
+ "package": "@nifrajs/otel",
11631
+ "signature": "export interface RecordingObservationLifecycle extends ObservationLifecycle {\n /** Record already-completed work without allocating an active observation. */\n record(input: StartObservation, end: EndObservation): NifraSpan;\n}",
11632
+ "doc": "/** Factory lifecycles can record completed work; custom start-only implementations remain valid. */"
11633
+ },
11608
11634
  {
11609
11635
  "name": "RecoveryCrashError",
11610
11636
  "kind": "class",
@@ -11823,7 +11849,7 @@
11823
11849
  "name": "RenderAdapter",
11824
11850
  "kind": "interface",
11825
11851
  "package": "@nifrajs/web",
11826
- "signature": "export interface RenderAdapter {\n /**\n * Render a route's layout `chain` (outermost layout → page) to a Web stream of HTML bytes,\n * including the framework's hydration markers. When `options.nonce` is set, every executable\n * `<script>` the framework streams (out-of-order Suspense runtimes, serialized resources) must\n * carry it, or a nonce-based Content-Security-Policy blocks it and the boundary never resolves.\n */\n renderToStream(chain: readonly unknown[], props: RenderProps, options?: RenderStreamOptions): ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>;\n /**\n * Render the chain to a complete HTML string when no content is deferred. `options.nonce` is the\n * document's CSP nonce, for any inline script the renderer emits (Solid's hydration data).\n */\n renderToString?(chain: readonly unknown[], props: RenderProps, options?: RenderStreamOptions): string | Promise<string>;\n /** Per-document bootstrap markup injected into `<head>` for client hydration. */\n hydrationHead(nonce?: string): string;\n /**\n * Set when a render can produce markup that belongs outside the app root. Every render is then\n * passed `options.parts` to fill; an adapter without it never is, and pays nothing for the seam.\n */\n readonly documentParts?: boolean;\n}",
11852
+ "signature": "export interface RenderAdapter {\n /**\n * Render a route's layout `chain` (outermost layout → page) to a Web stream of HTML bytes,\n * including the framework's hydration markers. When `options.nonce` is set, every executable\n * `<script>` the framework streams (out-of-order Suspense runtimes, serialized resources) must\n * carry it, or a nonce-based Content-Security-Policy blocks it and the boundary never resolves.\n */\n renderToStream(chain: readonly unknown[], props: RenderProps, options?: RenderStreamOptions): ReadableStream<Uint8Array> | Promise<ReadableStream<Uint8Array>>;\n /**\n * Render the chain to a complete HTML string when no content is deferred. `options.nonce` is the\n * document's CSP nonce, for any inline script the renderer emits (Solid's hydration data); a\n * document that sends a policy keeps the nonce only when the returned HTML carries it. Return\n * `undefined` when the render suspended on something only `renderToStream` waits for (React's\n * `use` or `lazy` inside `<Suspense>`): the page is then streamed instead.\n */\n renderToString?(chain: readonly unknown[], props: RenderProps, options?: RenderStreamOptions): string | undefined | Promise<string | undefined>;\n /** Per-document bootstrap markup injected into `<head>` for client hydration. */\n hydrationHead(nonce?: string): string;\n /**\n * Set when a render can produce markup that belongs outside the app root. Every render is then\n * passed `options.parts` to fill; an adapter without it never is, and pays nothing for the seam.\n */\n readonly documentParts?: boolean;\n}",
11827
11853
  "doc": "/**\n * The seam every render adapter implements. New adapters should prove these invariants with\n * `assertRenderAdapterConformance`; framework-specific behavior remains locally tested.\n */"
11828
11854
  },
11829
11855
  {
@@ -11891,7 +11917,7 @@
11891
11917
  "kind": "const",
11892
11918
  "package": "@nifrajs/web-vue",
11893
11919
  "signature": "export declare const RenderPropsProvider: import(\"vue\").DefineComponent<import(\"vue\").ExtractPropTypes<{\n value: {\n type: ObjectConstructor;\n required: true;\n };\n}>, () => import(\"vue\").VNode<import(\"vue\").RendererNode, import(\"vue\").RendererElement, {\n [key: string]: any;\n}>[] | undefined, {}, {}, {}, import(\"vue\").ComponentOptionsMixin, import(\"vue\").ComponentOptionsMixin, {}, string, import(\"vue\").PublicProps, Readonly<import(\"vue\").ExtractPropTypes<{\n value: {\n type: ObjectConstructor;\n required: true;\n };\n}>> & Readonly<{}>, {}, {}, {}, {}, string, import(\"vue\").ComponentProvideOptions, true, {}, any>;",
11894
- "doc": "/** The provider `compose` wraps the chain in for {@link useMatches}: a `computed` view of its `value`\n * prop, so the injected ref follows each navigation's props. Renders its default slot. */"
11920
+ "doc": "/** Provides {@link useMatches}' render props to its subtree: a `computed` view of its `value` prop, so\n * the injected ref follows each navigation's props. Renders its default slot. `compose` provides the\n * same key through its single route-context component. */"
11895
11921
  },
11896
11922
  {
11897
11923
  "name": "RenderStreamOptions",
@@ -13231,7 +13257,7 @@
13231
13257
  "name": "RunOptions",
13232
13258
  "kind": "interface",
13233
13259
  "package": "@nifrajs/runner",
13234
- "signature": "export interface RunOptions {\n /** Origin used to resolve relative paths. Default `\"http://nifra.local\"`. */\n readonly origin?: string;\n /** Cap on captured body text, in characters. Default 65536. */\n readonly maxBodyChars?: number;\n}"
13260
+ "signature": "export interface RunOptions {\n /** Origin used to resolve relative paths. Default `\"http://nifra.local\"`. */\n readonly origin?: string;\n /** Cap on captured body text, in characters: a non-negative integer, or `Infinity` for none.\n * Default 65536. */\n readonly maxBodyChars?: number;\n}"
13235
13261
  },
13236
13262
  {
13237
13263
  "name": "RunParallelNode",
@@ -13866,7 +13892,7 @@
13866
13892
  "kind": "const",
13867
13893
  "package": "@nifrajs/web-vue",
13868
13894
  "signature": "export declare const SearchProvider: import(\"vue\").DefineComponent<import(\"vue\").ExtractPropTypes<{\n value: {\n type: ObjectConstructor;\n required: true;\n };\n}>, () => import(\"vue\").VNode<import(\"vue\").RendererNode, import(\"vue\").RendererElement, {\n [key: string]: any;\n}>[] | undefined, {}, {}, {}, import(\"vue\").ComponentOptionsMixin, import(\"vue\").ComponentOptionsMixin, {}, string, import(\"vue\").PublicProps, Readonly<import(\"vue\").ExtractPropTypes<{\n value: {\n type: ObjectConstructor;\n required: true;\n };\n}>> & Readonly<{}>, {}, {}, {}, {}, string, import(\"vue\").ComponentProvideOptions, true, {}, any>;",
13869
- "doc": "/**\n * The provider `compose` wraps the layout tree in. It `provide`s a `computed` view of its `value` prop,\n * so as the mount re-renders with each navigation's search the injected ref updates reactively (setup\n * runs once, but the computed keeps tracking the prop). Renders its default slot (the folded chain).\n */"
13895
+ "doc": "/**\n * Provides `useSearch`'s value to its subtree. It `provide`s a `computed` view of its `value` prop,\n * so as the mount re-renders with each navigation's search the injected ref updates reactively (setup\n * runs once, but the computed keeps tracking the prop). Renders its default slot. `compose` provides the\n * same key through its single route-context component.\n */"
13870
13896
  },
13871
13897
  {
13872
13898
  "name": "SearchSchemaOf",
@@ -14269,6 +14295,13 @@
14269
14295
  "package": "nifra",
14270
14296
  "signature": "export interface ServerOptions {\n /**\n * Max request body size (bytes), the default transport cap for every route. Default 1_000_000.\n * A route can choose a finite `schema.bodyLimit` of its own; an explicit `'unlimited'` route\n * requires `schema.bodyLimitReason` and is intended only for a separately bounded streaming or\n * upload integration.\n *\n * Framework readers (the body-schema lane, `c.boundedJson`) enforce the cap when they read. A\n * route WITHOUT a body schema (raw body, file upload, BYO-validation) is covered too: direct\n * `c.req` reads (`json()`, `arrayBuffer()`, the raw `body` stream, ...) are capped in place -\n * lazily, nothing is buffered until code actually reads - and answer 413 past the limit.\n * `c.boundedBody(n)` states its own explicit per-read limit, above or below the route's cap.\n */\n readonly maxBodyBytes?: number;\n /**\n * Prototype-poisoning policy for JSON bodies (the schema path and `c.boundedJson`). An own\n * `__proto__` key, or a `constructor` carrying a `prototype`, is the payload shape that turns a\n * later innocent merge/assign into prototype pollution. `\"reject\"` (default) answers the same\n * flat 400 as malformed JSON; `\"strip\"` removes the offending keys and continues; `\"ignore\"`\n * parses as-is (only for routes that never merge body input into other objects). Every guarded\n * payload pays one iterative pass over its parsed object nodes; `\"ignore\"` skips it.\n */\n readonly protoPoisoning?: \"reject\" | \"strip\" | \"ignore\";\n /**\n * Other sites whose HTML forms may post to a body-schema route: exact origins, or a function that\n * receives the `Origin`. A urlencoded, multipart or `text/plain` body is one a form on any site can\n * send with the visitor's cookies and no preflight, so one whose `Origin` names another site is\n * refused with `403` before it is read. Same-origin posts and requests without an `Origin`, such\n * as server-to-server calls, pass. JSON is not affected: a browser preflights it, so CORS decides.\n */\n readonly formOrigins?: ReadonlyArray<string> | ((origin: string) => boolean);\n /**\n * Declare that every `Request` reaching `app.fetch` was framed by a runtime HTTP parser, so its\n * `Content-Length` is an exact transport boundary rather than a hint. Set this ONLY when the\n * runtime's own request object is handed through untouched with no adapter in between to mark it -\n * a bare `export default app` on an edge runtime. Every supported ingress already marks itself:\n * `listen()` on Bun, `toFetchHandler(app)` on Workers/edge, `@nifrajs/deno`, and `@nifrajs/node`\n * (which reads exact bytes and never needs the mark). Reach for this option only for an ingress\n * nifra does not ship an adapter for.\n *\n * Left off (default), the JSON body lane copies the body out and enforces the cap on DELIVERED\n * bytes, because an unmarked request may have been rebuilt by an adapter that kept a caller's\n * `content-length` while decoding a payload of a different size. That check costs an extra pass\n * over the body, which is why an edge deployment that cannot be lied to may opt out of it.\n *\n * Do not set this on an app whose `fetch` is also called with `Request`s assembled from\n * untrusted input.\n */\n readonly trustBodyFraming?: boolean;\n /**\n * Max inbound WebSocket message size (bytes). A larger message never reaches the handler and the\n * socket closes with `1009`. Default: `maxBodyBytes` (1 MB). Bun and Node stop buffering at the cap,\n * so a huge frame is never held in memory; on Bun a mounted app's smaller cap, and on Deno and\n * Workers every cap, is checked after the runtime has buffered the whole message.\n */\n readonly wsMaxPayloadBytes?: number;\n /** Per-request timeout (ms): a slower request gets a 503 and `ctx.signal` aborts. 0 disables (default). */\n readonly requestTimeoutMs?: number;\n /** WebSocket upgrade admission/guard timeout (ms). Default 10_000; set to 0 only for a deliberate unbounded guard. */\n readonly wsUpgradeTimeoutMs?: number;\n /**\n * How to derive `c.clientIp` behind a reverse proxy or CDN. Omit (default) to trust only the raw\n * socket peer and never believe a forwarded header. Set `{ trustedHops: n }` when the app sits\n * behind `n` proxies you operate (the caller is read from `X-Forwarded-For` past those hops), or\n * `{ header: name }` to trust one edge-set header's first value. Declaring trust the app can't\n * actually enforce lets clients forge their IP, so leave it unset unless a proxy really fronts you.\n */\n readonly clientIp?: ClientIpTrust;\n /**\n * Admit the public `x-nifra-deadline` header and let it shorten local work. Disabled by default:\n * services that participate in trusted cross-service deadline propagation opt in explicitly,\n * while ordinary/public HTTP routes pay no header-admission tax and ignore hostile client values.\n */\n readonly acceptInboundDeadlines?: boolean;\n /**\n * Maximum time accepted from an inbound `x-nifra-deadline`, in milliseconds. An incoming absolute\n * deadline may shorten this cap (and `requestTimeoutMs`, when configured), never extend it.\n * Default 30_000; applies only when `acceptInboundDeadlines` is enabled and the header is present.\n */\n readonly maxInboundDeadlineMs?: number;\n /**\n * When `listen()`ing, install SIGTERM/SIGINT handlers that gracefully `stop()`. Default false.\n * `{ drainMs }` sets how long in-flight requests get to finish before the stop forces them closed\n * (default 10_000) - keep it under the platform's kill grace period (`docker stop` waits 10 s).\n */\n readonly gracefulSignals?: boolean | {\n readonly drainMs?: number;\n };\n /**\n * Capacity-admission gate (see {@link AdmissionController}). Bounds concurrent in-flight work so a\n * healthy instance sheds load (`429` + `Retry-After`) instead of accepting more than it can finish.\n * Off by default. Enabling it disables the fused native-route fast path (requests route through the\n * shared matched lane where the gate runs); when unset, the request path pays nothing.\n */\n readonly admission?: AdmissionController;\n /**\n * Optional token-only observation hook called by `useCapability(c, id)`. It receives no request,\n * parameters, body, tenant, or values. Routes without capability declarations keep the old hot path.\n */\n readonly onCapabilityUse?: (event: CapabilityUseEvent) => void;\n /** Structured logger for framework events (redacts secrets). Default: JSON to stderr. */\n readonly logger?: Logger;\n /**\n * How much of an unhandled error reaches the log for a 500. Never reaches the client either way -\n * the response is always a bare `internal_error`.\n *\n * - `\"full\"` (default) - `name`, the error's own text as `detail`, and `stack`.\n * - `\"message\"` - `name` and `detail`, no stack.\n * - `\"none\"` - `name` only.\n *\n * An error's text can quote the input that produced it, which is how request data ends up in a log\n * sink. The framework's answer is the redacting logger rather than blanket suppression: pass\n * `logger: jsonLogger({ valuePatterns: commonSecretPatterns })` to scrub tokens, JWTs, and emails\n * out of `detail` and `stack` while keeping the diagnosis. Reach for `\"none\"` when the sink itself\n * is the thing you don't trust.\n */\n readonly errorLogDetail?: \"full\" | \"message\" | \"none\";\n /**\n * App-wide fallback fired when a route **without its own `onValidationError`** fails body/query\n * validation. Same contract as the per-route hook (`(issues, ctx, kind) => Response | repaired-value |\n * undefined`): a route's own hook takes precedence, and a route can fall through to the plain `422` by\n * returning `undefined`. Use it for one app-wide error envelope (like tRPC's `errorFormatter` /\n * Fastify's `setErrorHandler`) instead of repeating a formatter per route.\n */\n readonly onValidationError?: RouteSchema[\"onValidationError\"];\n /**\n * What to do when an order-scoped hook (`derive`/`authenticate`/`beforeHandle`/`around`/\n * `aroundCapability`/`afterHandle`/`onError`/`decorate`) covers no route because it was added after\n * the last route was registered. `register()` snapshots the current chain into each route as it is\n * declared, so a hook appended after every route reaches nothing and is silently dead. A `merge()`d\n * route keeps the chain of the server that declared it, so a hook followed only by merges is dead\n * too. The same report covers `responseContract()` and `effectLedger()` installed after routes they\n * would have covered (a declared response, declared capabilities). `\"warn\"` (default) logs once at\n * seal (first `listen()`/`fetch`/`resolveNode`); `\"error\"` throws a `FrameworkError`\n * (`UNUSED_SCOPED_HOOKS`); `\"off\"` skips the bookkeeping entirely, including the one-frame stack\n * capture. App-global hooks (`onRequest`/`onResponse`/...) are unaffected in every mode.\n *\n * This is a development-time diagnostic: the whole audit is guarded by `process.env.NODE_ENV !==\n * \"production\"`, so any bundler that defines `NODE_ENV` (vite/esbuild/webpack/next, `bun build\n * --production`) dead-code-eliminates it, leaving zero bytes and zero per-request cost in the shipped\n * bundle. It fires in development, test, and CI - where you catch the mistake - not in production.\n */\n readonly unusedScopedHooks?: \"warn\" | \"error\" | \"off\";\n}"
14271
14297
  },
14298
+ {
14299
+ "name": "ServerPrerenderedPage",
14300
+ "kind": "interface",
14301
+ "package": "@nifrajs/web",
14302
+ "signature": "export interface ServerPrerenderedPage {\n readonly file: string;\n readonly headers: Readonly<Record<string, string>>;\n}",
14303
+ "doc": "/** One page a self-hosting build prerendered: its file and the headers it is served with. */"
14304
+ },
14272
14305
  {
14273
14306
  "name": "ServerZoneGuardOptions",
14274
14307
  "kind": "type",
@@ -14339,7 +14372,7 @@
14339
14372
  "name": "SessionManager",
14340
14373
  "kind": "interface",
14341
14374
  "package": "@nifrajs/auth",
14342
- "signature": "export interface SessionManager<Data extends Record<string, unknown> = Record<string, unknown>> {\n /** Load the session from the request cookie (verified + un-expired), or a fresh anonymous one. */\n get(c: SessionContext): Promise<Session<Data>>;\n /** Read-only load from a raw `Request` - for `@nifrajs/web` loaders (which can read the request but not\n * write cookies). Identical verify/expiry to {@link get}; commit/destroy in a route or action. */\n read(request: Request): Promise<Session<Data>>;\n /** Persist the session: write the store (store mode) + the signed cookie. */\n commit(c: SessionContext, session: Session<Data>): Promise<void>;\n /** End the session: drop the store record (store mode) + clear the cookie. */\n destroy(c: SessionContext, session?: Session<Data>): Promise<void>;\n /** Rotate the session id on the next commit (call on privilege change - login - to defend against\n * session fixation). Data is preserved; the old store record is dropped. */\n regenerate(session: Session<Data>): void;\n}"
14375
+ "signature": "export interface SessionManager<Data extends Record<string, unknown> = Record<string, unknown>> {\n /** Load the session from the request cookie (verified + un-expired), or a fresh anonymous one. */\n get(c: SessionContext): Promise<Session<Data>>;\n /** Read-only load from a raw `Request` - for `@nifrajs/web` loaders (which can read the request but not\n * write cookies). Identical verify/expiry to {@link get}; commit/destroy in a route or action. */\n read(request: Request): Promise<Session<Data>>;\n /** Persist the session: write the store (store mode) + the signed cookie. */\n commit(c: SessionContext, session: Session<Data>): Promise<void>;\n /** End the session: drop the store record (store mode) + clear the cookie. In store mode the id is\n * also marked revoked, so a request that loaded the session earlier cannot write it back. The\n * `session` passed in is emptied and detached: committing it later in the same request starts a\n * new session holding only what was set since. A session object not passed in stays bound to the\n * ended id, and committing it writes nothing. */\n destroy(c: SessionContext, session?: Session<Data>): Promise<void>;\n /** Rotate the session id on the next commit (call on privilege change - login - to defend against\n * session fixation). Data is preserved; the old store record is dropped. */\n regenerate(session: Session<Data>): void;\n}"
14343
14376
  },
14344
14377
  {
14345
14378
  "name": "SessionMigrationError",
@@ -14385,7 +14418,7 @@
14385
14418
  "kind": "interface",
14386
14419
  "package": "@nifrajs/auth",
14387
14420
  "signature": "export interface SessionStore {\n /** The record for `id`, or `undefined` on a miss. */\n get(id: string): Promise<SessionRecord | undefined>;\n /** Store (or overwrite) the record for `id`. */\n set(id: string, record: SessionRecord): Promise<void>;\n /** Drop `id` (logout / regeneration). A no-op if absent. */\n delete(id: string): Promise<void>;\n}",
14388
- "doc": "/**\n * Pluggable session backend (store mode). Async so a network store (KV/Redis) fits the same shape.\n * **Production needs a shared/durable store** so sessions hold across instances - {@link MemorySessionStore}\n * prod-guards against the per-instance footgun.\n */"
14421
+ "doc": "/**\n * Pluggable session backend (store mode). Async so a network store (KV/Redis) fits the same shape.\n * **Production needs a shared/durable store** so sessions hold across instances - {@link MemorySessionStore}\n * prod-guards against the per-instance footgun. Logout and rotation also write a revocation marker, an\n * empty record under `<id>.revoked`, so a store must accept that key like any other, and keep it until\n * its `expiresAt`: a marker dropped earlier lets a request that loaded the session before the logout\n * write it back.\n */"
14389
14422
  },
14390
14423
  {
14391
14424
  "name": "SessionStore",
@@ -15928,14 +15961,14 @@
15928
15961
  "name": "VERSION",
15929
15962
  "kind": "const",
15930
15963
  "package": "@nifrajs/core",
15931
- "signature": "export declare const VERSION: \"5.2.0\";",
15964
+ "signature": "export declare const VERSION: \"5.3.0\";",
15932
15965
  "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 */"
15933
15966
  },
15934
15967
  {
15935
15968
  "name": "VERSION",
15936
15969
  "kind": "const",
15937
15970
  "package": "nifra",
15938
- "signature": "export declare const VERSION: \"5.2.0\";",
15971
+ "signature": "export declare const VERSION: \"5.3.0\";",
15939
15972
  "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 */"
15940
15973
  },
15941
15974
  {
@@ -16597,6 +16630,13 @@
16597
16630
  "signature": "export declare function assertBudgetRemaining(budget: RequestBudget, requiredMs?: number): void;",
16598
16631
  "doc": "/** Fail before starting work that cannot fit inside the remaining time. */"
16599
16632
  },
16633
+ {
16634
+ "name": "assertByteLimit",
16635
+ "kind": "function",
16636
+ "package": "@nifrajs/core",
16637
+ "signature": "export declare function assertByteLimit(value: number, name?: string): void;",
16638
+ "doc": "/** Security/resource limits must be finite byte counts. Invalid values otherwise make `> maxBytes`\n * comparisons fail open (notably for `NaN`) and can re-enable unbounded buffering. */"
16639
+ },
16600
16640
  {
16601
16641
  "name": "assertCssLoadingCompatible",
16602
16642
  "kind": "function",
@@ -17417,6 +17457,13 @@
17417
17457
  "signature": "export declare function compileRunPlanLayers(source: RunPlan | unknown, options: CompileOptions): readonly WorkflowStep[];",
17418
17458
  "doc": "/**\n * Compile `source` into one {@link WorkflowStep} per top-level DAG layer, preserving the same\n * ceilings and lowering as {@link compileRunPlan}. A driver can run the layers in order and hold at\n * a layer boundary (a safe-pause point) without a second scheduler: each layer is still executed by\n * the kernel {@link WorkflowRunner}, and the layer split is the very partition compileRunPlan folds\n * into a single `sequence`.\n */"
17419
17459
  },
17460
+ {
17461
+ "name": "compileSchema",
17462
+ "kind": "function",
17463
+ "package": "@nifrajs/schema",
17464
+ "signature": "export declare function compileSchema<T extends TSchema>(schema: NifraSchema<T>, options: CompileSchemaOptions): string;",
17465
+ "doc": "/** Generate a typed module with static validation code. Run at build time, then import its export at runtime. */"
17466
+ },
17420
17467
  {
17421
17468
  "name": "compileVue",
17422
17469
  "kind": "function",
@@ -17431,6 +17478,13 @@
17431
17478
  "signature": "export declare function compileVueStyles(source: string, filename: string): string;",
17432
17479
  "doc": "/**\n * Compile a `.vue` SFC's `<style>` blocks to a single CSS string (scoped selectors rewritten to\n * `[data-v-<id>]` when `scoped`). Returns `\"\"` for a style-less SFC. The matching scope attribute is\n * baked into the markup by {@link compileVue}.\n */"
17433
17480
  },
17481
+ {
17482
+ "name": "compiledFormat",
17483
+ "kind": "function",
17484
+ "package": "@nifrajs/schema",
17485
+ "signature": "export declare function compiledFormat(name: string, value: string): boolean;",
17486
+ "doc": "/** The format callback used by generated validators; custom formats retain their registry semantics. */"
17487
+ },
17434
17488
  {
17435
17489
  "name": "componentBuild",
17436
17490
  "kind": "const",
@@ -17658,7 +17712,7 @@
17658
17712
  "kind": "function",
17659
17713
  "package": "@nifrajs/web",
17660
17714
  "signature": "export declare function copyPublicDir(from: string, to: string): Promise<string[]>;",
17661
- "doc": "/**\n * Copy `from` into `to`, returning the URL paths copied (sorted).\n *\n * Lives here, not beside `servePublicDir`, because it is BUILD-time: it reaches for `Bun.Glob` and\n * `node:fs`, and `public-dir.ts` is reachable from the client bundle graph through the package\n * entry - a dynamic `import(\"bun\")` there fails the browser build outright.\n */"
17715
+ "doc": "/**\n * Copy `from` into `to`, returning the URL paths copied (sorted). Hidden entries other than\n * `.well-known` are skipped, as development never serves them: every target ships this list, and a\n * CDN-hosted one serves whatever was copied.\n *\n * Lives here, not beside `servePublicDir`, because it is BUILD-time: it reaches for `Bun.Glob` and\n * `node:fs`, and `public-dir.ts` is reachable from the client bundle graph through the package\n * entry - a dynamic `import(\"bun\")` there fails the browser build outright.\n */"
17662
17716
  },
17663
17717
  {
17664
17718
  "name": "copyRef",
@@ -18019,7 +18073,7 @@
18019
18073
  "name": "createObservationLifecycle",
18020
18074
  "kind": "function",
18021
18075
  "package": "@nifrajs/otel",
18022
- "signature": "export declare function createObservationLifecycle(options?: ObservationLifecycleOptions): ObservationLifecycle;",
18076
+ "signature": "export declare function createObservationLifecycle(options?: ObservationLifecycleOptions): RecordingObservationLifecycle;",
18023
18077
  "doc": "/** Creates an independent lifecycle factory. Adapters are always called fail-open. */"
18024
18078
  },
18025
18079
  {
@@ -19340,6 +19394,13 @@
19340
19394
  "signature": "export declare function fromBakedJoin<Left extends Record<string, unknown>, Right extends Record<string, unknown>, On extends SharedKey<Left, Right>, Cardinality extends JoinCardinality>(baked: BakedCollectionJoin<Left, Right, On, Cardinality>): IndexedJoin<Left, Right, On, Cardinality>;",
19341
19395
  "doc": "/** Rehydrate a deterministic join artifact. */"
19342
19396
  },
19397
+ {
19398
+ "name": "fromPrecompiled",
19399
+ "kind": "function",
19400
+ "package": "@nifrajs/schema",
19401
+ "signature": "export declare function fromPrecompiled<T extends TSchema>(schema: T, check: (value: unknown) => boolean): StandardSchemaV1<Static<T>, Static<T>> & {\n readonly jsonSchema: T;\n};",
19402
+ "doc": "/** Wrap a build-generated checker without shipping a schema builder or dynamic compiler. */"
19403
+ },
19343
19404
  {
19344
19405
  "name": "fromTypeBox",
19345
19406
  "kind": "function",
@@ -19400,7 +19461,7 @@
19400
19461
  "name": "generateServerEntry",
19401
19462
  "kind": "function",
19402
19463
  "package": "@nifrajs/web",
19403
- "signature": "export declare function generateServerEntry(options: {\n readonly target: BuildTarget;\n /** Import specifier for the module exporting `adapter` (e.g. `\"../framework.ts\"`). */\n readonly adapterImport: string;\n /** Import specifier for the module exporting `backend`, or `undefined` for a frontend-only app. */\n readonly backendImport?: string;\n /** Import specifier for the module exporting `use`, or `undefined`. Must resolve to the\n * same edge-safe module as `adapterImport`. */\n readonly useImport?: string;\n /** `createWebApp` options to import by name, each mapped to the specifier of the edge-safe module\n * that exports it. */\n readonly optionImports?: ServerEntryOptionImports;\n /** Document `<title>` passed to `createWebApp`. */\n readonly title?: string;\n /** Encoded root-relative public file paths copied into the deploy directory. */\n readonly publicFiles?: readonly string[];\n /** URL paths of the content-hashed client outputs (the build manifest's `assets`). When given, a\n * self-hosted entry caches only these immutably; otherwise every file under `/assets/` is. */\n readonly hashedFiles?: readonly string[];\n /** Trust the edge platform's client-address header for `c.clientIp`. See {@link ServerEntryClientIp}. */\n readonly clientIp?: ServerEntryClientIp;\n /** The server manifest exports `copyChunks` (the client build split copy tables by locale). */\n readonly copyChunks?: boolean;\n}): string;",
19464
+ "signature": "export declare function generateServerEntry(options: {\n readonly target: BuildTarget;\n /** Import specifier for the module exporting `adapter` (e.g. `\"../framework.ts\"`). */\n readonly adapterImport: string;\n /** Import specifier for the module exporting `backend`, or `undefined` for a frontend-only app. */\n readonly backendImport?: string;\n /** Import specifier for the module exporting `use`, or `undefined`. Must resolve to the\n * same edge-safe module as `adapterImport`. */\n readonly useImport?: string;\n /** `createWebApp` options to import by name, each mapped to the specifier of the edge-safe module\n * that exports it. */\n readonly optionImports?: ServerEntryOptionImports;\n /** Document `<title>` passed to `createWebApp`. */\n readonly title?: string;\n /** Encoded root-relative public file paths copied into the deploy directory. */\n readonly publicFiles?: readonly string[];\n /** URL paths of the content-hashed client outputs (the build manifest's `assets`). When given, a\n * self-hosted entry caches only these immutably; otherwise every file under `/assets/` is. */\n readonly hashedFiles?: readonly string[];\n /** Trust the edge platform's client-address header for `c.clientIp`. See {@link ServerEntryClientIp}. */\n readonly clientIp?: ServerEntryClientIp;\n /** The server manifest exports `copyChunks` (the client build split copy tables by locale). */\n readonly copyChunks?: boolean;\n /** `bun` / `node` only: the pages the build prerendered into `_prerendered/`, by request path, which\n * the app answers from their file (see `createWebApp`'s `prerenderedPages`). */\n readonly prerenderedPages?: Readonly<Record<string, ServerPrerenderedPage>>;\n}): string;",
19404
19465
  "doc": "/**\n * Codegen the per-target **server entry** module (source text) for `buildServer` to bundle. It imports\n * the app's `adapter` (from `framework.ts`), the optional `backend` (from `backend.ts`), and the\n * generated `{ manifest, clientEntry }` (from `./server-manifest`), builds `createWebApp`, then wires\n * the right host:\n * - `cloudflare` / `vercel`: `export default` the fetch handler (the platform serves /assets/* itself).\n * - `deno`: same fetch-handler default, plus `Deno.serve` self-host when run directly.\n * - `bun` / `node`: a self-hosting server that ALSO serves the client bundle from disk (those\n * runtimes have a filesystem; the static `/assets/*` sit next to the entry).\n * `adapterImport`/`backendImport` are the specifiers the entry uses (relative to where it's written) -\n * `buildServer` writes the entry next to `serverEntry`, so they're resolved from there. Pure (string in,\n * string out) so the generation is unit-testable without a real build.\n */"
19405
19466
  },
19406
19467
  {
@@ -19563,6 +19624,13 @@
19563
19624
  "signature": "export declare function hasDuplicateCookie(header: string | null | undefined, targetName: string): boolean;",
19564
19625
  "doc": "/** True when a raw Cookie header contains the same exact cookie name more than once. */"
19565
19626
  },
19627
+ {
19628
+ "name": "hasResidentBody",
19629
+ "kind": "function",
19630
+ "package": "@nifrajs/core",
19631
+ "signature": "export declare function hasResidentBody(response: Response): boolean;",
19632
+ "doc": "/** Whether {@link markResidentBody} recorded `response`. Another copy of this module did not. */"
19633
+ },
19566
19634
  {
19567
19635
  "name": "hash8",
19568
19636
  "kind": "function",
@@ -20262,6 +20330,13 @@
20262
20330
  "signature": "export declare function markIdempotencySafeToRetry(context: object): void;",
20263
20331
  "doc": "/**\n * Opt a concrete 5xx response into releasing its idempotency reservation, but only while the\n * request-local effect scope still proves that no owned effect began.\n */"
20264
20332
  },
20333
+ {
20334
+ "name": "markResidentBody",
20335
+ "kind": "function",
20336
+ "package": "@nifrajs/core",
20337
+ "signature": "export declare function markResidentBody(response: Response): Response;",
20338
+ "doc": "/**\n * Record a Response whose body the framework serialized into memory before building it. An\n * in-process client reads only such a body whole; any other, a handler's own stream included, is\n * read under its byte cap.\n */"
20339
+ },
20265
20340
  {
20266
20341
  "name": "matchMixedSegment",
20267
20342
  "kind": "function",
@@ -21208,7 +21283,7 @@
21208
21283
  "kind": "function",
21209
21284
  "package": "@nifrajs/web",
21210
21285
  "signature": "export declare function pipeWebBodyToNode(body: ReadableStream<Uint8Array> | null, res: NodeResLike): Promise<void>;",
21211
- "doc": "/**\n * Stream a Web `Response` body to a Node response chunk-by-chunk. Buffering the whole body (e.g.\n * `arrayBuffer()`) waits for the stream to END - which an open-ended SSE (`text/event-stream`) body never\n * does, so it hung `nifra dev` (the Bun production server streamed it fine). This flushes each chunk as it\n * arrives and cancels the reader if the client disconnects; a finite body just streams its chunk(s) + ends.\n */"
21286
+ "doc": "/**\n * Stream a Web `Response` body to a Node response chunk-by-chunk. Buffering the whole body (e.g.\n * `arrayBuffer()`) waits for the stream to END - which an open-ended SSE (`text/event-stream`) body never\n * does, so it hung `nifra dev` (the Bun production server streamed it fine). This flushes each chunk as it\n * arrives and cancels the reader if the client disconnects; a finite body just streams its chunk(s) + ends.\n * A write the socket can't take yet is waited out (`drain`) before the next read, so a slow client\n * holds one chunk rather than the whole body.\n */"
21212
21287
  },
21213
21288
  {
21214
21289
  "name": "plainError",
@@ -21351,12 +21426,19 @@
21351
21426
  "signature": "export declare function prerenderRoutes(options: PrerenderOptions): Promise<PrerenderResult>;",
21352
21427
  "doc": "/**\n * Render every opted-in static route to a static `index.html` under `outDir`. Run AFTER `buildClient`\n * (so the app references the hashed client entry). Returns a report of what was emitted vs skipped -\n * the caller can use `prerendered` to wire a hybrid deploy (e.g. exclude those paths from the SSR\n * worker so the CDN serves the static file). Never throws on a per-route miss: a non-OK response or a\n * non-opted/dynamic route is recorded in `skipped` and the build continues.\n */"
21353
21428
  },
21429
+ {
21430
+ "name": "prerenderedPageReader",
21431
+ "kind": "function",
21432
+ "package": "@nifrajs/web",
21433
+ "signature": "export declare function prerenderedPageReader(options: PrerenderedPageReaderOptions): (pathname: string) => Promise<string | undefined>;",
21434
+ "doc": "/**\n * Read a self-hosted build's prerendered pages for `createWebApp`'s `prerenderedPages`. Only the build's\n * own files are reachable, each opened only once its real path is inside `dir`, so a link planted in the\n * deployed tree cannot point a page elsewhere. A deploy's files do not change while it runs, so a page\n * is kept after its first read; `undefined` (a missing or refused file) renders the page on demand.\n */"
21435
+ },
21354
21436
  {
21355
21437
  "name": "prettyJson",
21356
21438
  "kind": "function",
21357
21439
  "package": "@nifrajs/middleware",
21358
21440
  "signature": "export declare function prettyJson(options?: PrettyJsonOptions): import(\"@nifrajs/core\").IdentityPlugin<never>;",
21359
- "doc": "/**\n * Pretty-print JSON responses for debugging and developer-facing APIs. It only touches JSON content,\n * skips encoded responses, caps inspection size, and leaves invalid JSON untouched.\n */"
21441
+ "doc": "/**\n * Pretty-print JSON responses for debugging and developer-facing APIs. It only touches JSON content,\n * skips encoded responses, caps inspection size, and leaves invalid JSON untouched, as well as a\n * document nested deeply enough that its indented form would outgrow it many times over.\n */"
21360
21442
  },
21361
21443
  {
21362
21444
  "name": "previewEndpoint",
@@ -21696,6 +21778,13 @@
21696
21778
  "package": "@nifrajs/cli",
21697
21779
  "signature": "export declare function recordProof(bundle: EvidenceBundle, proof: ProofEvidence): EvidenceBundle;"
21698
21780
  },
21781
+ {
21782
+ "name": "recordResidentBodies",
21783
+ "kind": "function",
21784
+ "package": "@nifrajs/core",
21785
+ "signature": "export declare function recordResidentBodies(): void;",
21786
+ "doc": "/** Called by an in-process client: nothing else reads the record, so until then it can be skipped. */"
21787
+ },
21699
21788
  {
21700
21789
  "name": "recordTrajectory",
21701
21790
  "kind": "const",
@@ -22032,6 +22121,13 @@
22032
22121
  "signature": "export declare function reservedKeyFor(segment: string): string | undefined;",
22033
22122
  "doc": "/**\n * The reserved key a static path segment collides with, or undefined. Params (`:id`) and wildcards\n * (`*rest`) never collide - they are not spelled as property accesses.\n */"
22034
22123
  },
22124
+ {
22125
+ "name": "residentBodiesRecorded",
22126
+ "kind": "const",
22127
+ "package": "@nifrajs/core",
22128
+ "signature": "export declare let residentBodiesRecorded: boolean;",
22129
+ "doc": "/** Set once an in-process client exists, so the leanest response lane records its bodies too. */"
22130
+ },
22035
22131
  {
22036
22132
  "name": "resolveChainMeta",
22037
22133
  "kind": "function",