@nifrajs/cli 5.2.0 → 5.4.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 (100) hide show
  1. package/CHANGELOG.md +125 -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/5.4.0.d.ts +10 -0
  48. package/dist/recipes/5.4.0.d.ts.map +1 -0
  49. package/dist/recipes/5.4.0.js +25 -0
  50. package/dist/recipes/5.4.0.js.map +1 -0
  51. package/dist/recipes/index.d.ts.map +1 -1
  52. package/dist/recipes/index.js +4 -0
  53. package/dist/recipes/index.js.map +1 -1
  54. package/dist/review.d.ts.map +1 -1
  55. package/dist/review.js +2 -0
  56. package/dist/review.js.map +1 -1
  57. package/dist/rules/codes.d.ts +2 -0
  58. package/dist/rules/codes.d.ts.map +1 -1
  59. package/dist/rules/codes.js +2 -0
  60. package/dist/rules/codes.js.map +1 -1
  61. package/dist/rules/explanations.d.ts.map +1 -1
  62. package/dist/rules/explanations.js +12 -2
  63. package/dist/rules/explanations.js.map +1 -1
  64. package/dist/rules/pages.d.ts +25 -1
  65. package/dist/rules/pages.d.ts.map +1 -1
  66. package/dist/rules/pages.js +149 -33
  67. package/dist/rules/pages.js.map +1 -1
  68. package/dist/rules/route-statement.d.ts +10 -0
  69. package/dist/rules/route-statement.d.ts.map +1 -0
  70. package/dist/rules/route-statement.js +150 -0
  71. package/dist/rules/route-statement.js.map +1 -0
  72. package/dist/upgrade.d.ts +43 -10
  73. package/dist/upgrade.d.ts.map +1 -1
  74. package/dist/upgrade.js +161 -45
  75. package/dist/upgrade.js.map +1 -1
  76. package/docs/llms-full.txt +508 -190
  77. package/docs/types.json +217 -31
  78. package/package.json +11 -11
  79. package/src/assure-hydration.ts +7 -1
  80. package/src/check-diagnostics.ts +2 -0
  81. package/src/check-scan.ts +64 -25
  82. package/src/check.ts +8 -3
  83. package/src/cli.ts +22 -14
  84. package/src/db-tool.ts +2 -0
  85. package/src/env-file.ts +42 -7
  86. package/src/internal/source-facts.ts +312 -39
  87. package/src/mcp-exec.ts +13 -2
  88. package/src/mcp-http.ts +1 -1
  89. package/src/mcp-io.ts +72 -12
  90. package/src/mcp-isolate.ts +2 -0
  91. package/src/migrate-layout.ts +1 -0
  92. package/src/recipes/5.3.0.ts +36 -0
  93. package/src/recipes/5.4.0.ts +26 -0
  94. package/src/recipes/index.ts +4 -0
  95. package/src/review.ts +2 -0
  96. package/src/rules/codes.ts +2 -0
  97. package/src/rules/explanations.ts +12 -2
  98. package/src/rules/pages.ts +193 -33
  99. package/src/rules/route-statement.ts +170 -0
  100. 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",
@@ -2416,12 +2416,26 @@
2416
2416
  "signature": "export declare const CLIENT_ENTRY_PATH = \"/__nifra/client.js\";",
2417
2417
  "doc": "/**\n * The stable URL every SSR'd page points its client entry at.\n *\n * It has to be stable, and Bun's own URL is not: that one is a content hash over the entire client graph,\n * so it changes whenever anything the entry imports changes. This path redirects to whichever hashed\n * chunk Bun is serving at the moment the browser asks, which is the only formulation that stays correct\n * across a rebuild.\n */"
2418
2418
  },
2419
+ {
2420
+ "name": "CONTENT_TAG_MAX",
2421
+ "kind": "const",
2422
+ "package": "@nifrajs/core",
2423
+ "signature": "export declare const CONTENT_TAG_MAX: number;",
2424
+ "doc": "/**\n * Largest file tagged by its content. Its first request waits for one read of the whole file, ~0.1 s\n * per 256 MiB with hardware SHA-256 and several times that on a slow disk or CPU, so a larger file -\n * a long video that is only ever fetched by ranges, say - is tagged by its device, inode, size and\n * times. That tag is still strong and changes with any replacement, but differs between instances.\n */"
2425
+ },
2419
2426
  {
2420
2427
  "name": "CONTENT_TYPE",
2421
2428
  "kind": "const",
2422
2429
  "package": "@nifrajs/image",
2423
2430
  "signature": "export declare const CONTENT_TYPE: Record<OutputFormat, string>;"
2424
2431
  },
2432
+ {
2433
+ "name": "CONTENT_TYPES",
2434
+ "kind": "const",
2435
+ "package": "@nifrajs/core",
2436
+ "signature": "export declare const CONTENT_TYPES: Readonly<Record<string, string>>;",
2437
+ "doc": "/**\n * Media types by extension. A table rather than the runtime's own file typing, which Node and Deno\n * lack. Unknown extensions, and extensionless files such as ACME tokens, are\n * `application/octet-stream`, which together with `nosniff` keeps a browser from guessing a more\n * dangerous type.\n */"
2438
+ },
2425
2439
  {
2426
2440
  "name": "COPILOT_INSTRUCTIONS_PATH",
2427
2441
  "kind": "const",
@@ -3469,7 +3483,7 @@
3469
3483
  "name": "CollectionConfig",
3470
3484
  "kind": "interface",
3471
3485
  "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}"
3486
+ "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
3487
  },
3474
3488
  {
3475
3489
  "name": "CommandOutcome",
@@ -3517,6 +3531,12 @@
3517
3531
  "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
3532
  "doc": "/** Wiring the compiler injects into every node closure. */"
3519
3533
  },
3534
+ {
3535
+ "name": "CompileSchemaOptions",
3536
+ "kind": "interface",
3537
+ "package": "@nifrajs/schema",
3538
+ "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}"
3539
+ },
3520
3540
  {
3521
3541
  "name": "CompiledComponentModule",
3522
3542
  "kind": "interface",
@@ -3687,6 +3707,13 @@
3687
3707
  "signature": "export type ContentFieldKey<Frontmatter extends Record<string, unknown>> = Extract<keyof Frontmatter, string>;",
3688
3708
  "doc": "/** A string frontmatter field name accepted by the index APIs. */"
3689
3709
  },
3710
+ {
3711
+ "name": "ContentHash",
3712
+ "kind": "interface",
3713
+ "package": "@nifrajs/core",
3714
+ "signature": "export interface ContentHash {\n update(bytes: Uint8Array): unknown;\n digest(encoding: \"base64url\"): string;\n}",
3715
+ "doc": "/** What node:crypto's `createHash` returns; Bun, Node and Deno all provide it. */"
3716
+ },
3690
3717
  {
3691
3718
  "name": "ContentPreference",
3692
3719
  "kind": "interface",
@@ -3718,6 +3745,19 @@
3718
3745
  "signature": "export interface ContentProps {\n /** Trusted, pre-rendered HTML (e.g. `entry.html`). */\n html: TrustedHtml\n /** Wrapper element (default `\"div\"`). */\n as?: string\n /** DOM passthrough (`class`, `style`, `id`, `data-*`, …). */\n [key: string]: unknown\n}",
3719
3746
  "doc": "/**\n * Hand-written types for `Content.svelte` (svelte-package would generate this). Consumers resolve this\n * through the `./content` export's `types` condition.\n */"
3720
3747
  },
3748
+ {
3749
+ "name": "ContentTagOptions",
3750
+ "kind": "interface",
3751
+ "package": "@nifrajs/core",
3752
+ "signature": "export interface ContentTagOptions {\n /** Most tags remembered at once (default 8192); past it the earliest is forgotten. */\n readonly limit?: number;\n /** The clock compared with a file's ctime (default `Date.now`). */\n readonly now?: () => number;\n}"
3753
+ },
3754
+ {
3755
+ "name": "ContentTags",
3756
+ "kind": "interface",
3757
+ "package": "@nifrajs/core",
3758
+ "signature": "export interface ContentTags {\n /** The tag remembered for this version of the file at `path`, if any. */\n cached(path: string, version: FileVersion): string | undefined;\n /** The tag of `bytes`, read whole from this version of the file at `path`. */\n ofBytes(path: string, version: FileVersion, bytes: Uint8Array): string;\n /**\n * The tag of this version of the file at `path`, read whole through `read`; requests for a version\n * already being read wait for that read. A file over {@link CONTENT_TAG_MAX} is not read: its tag\n * names its identity on this host instead, or is `undefined` where the runtime reports none.\n */\n ofFile(path: string, version: FileVersion, read: ReadAt): Promise<string | undefined>;\n}",
3759
+ "doc": "/**\n * Strong entity tags from what a file holds, the same for the same bytes on every instance and\n * runtime, so a replacement that keeps a file's size and timestamps still changes its tag. A tag is\n * remembered per real path for the version it was computed from, so serving a known file reads no\n * more than before.\n */"
3760
+ },
3721
3761
  {
3722
3762
  "name": "Context",
3723
3763
  "kind": "interface",
@@ -4181,7 +4221,7 @@
4181
4221
  "name": "CreateWebAppOptions",
4182
4222
  "kind": "interface",
4183
4223
  "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}"
4224
+ "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
4225
  },
4186
4226
  {
4187
4227
  "name": "CronError",
@@ -6259,7 +6299,7 @@
6259
6299
  "name": "FileStorage",
6260
6300
  "kind": "class",
6261
6301
  "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}"
6302
+ "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
6303
  },
6264
6304
  {
6265
6305
  "name": "FileType",
@@ -6268,6 +6308,13 @@
6268
6308
  "signature": "export interface FileType {\n /** Detected MIME type, e.g. `\"image/png\"`. */\n readonly mime: string;\n /** Canonical extension (no dot), e.g. `\"png\"`. */\n readonly ext: string;\n}",
6269
6309
  "doc": "/**\n * Magic-byte file-type detection - trust the bytes, not the `Content-Type` header (which a client\n * sets freely). Reads only the leading bytes; dependency-free + edge-safe. Covers the common upload\n * types; returns `null` for anything unrecognized (incl. text formats like SVG/CSV that have no magic\n * number - handle those explicitly if you accept them).\n */"
6270
6310
  },
6311
+ {
6312
+ "name": "FileVersion",
6313
+ "kind": "interface",
6314
+ "package": "@nifrajs/core",
6315
+ "signature": "export interface FileVersion {\n readonly dev: number;\n readonly ino: number;\n readonly size: number;\n readonly mtimeMs: number;\n readonly ctimeMs: number;\n}",
6316
+ "doc": "/**\n * The stat fields that tell one version of a file from another on one host: node:fs `Stats` as it is,\n * or Deno's `FileInfo` with its dates as epoch milliseconds and a field it lacks as `NaN`.\n */"
6317
+ },
6271
6318
  {
6272
6319
  "name": "FixOption",
6273
6320
  "kind": "interface",
@@ -6483,7 +6530,7 @@
6483
6530
  "name": "GraphqlHttpOptions",
6484
6531
  "kind": "interface",
6485
6532
  "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}"
6533
+ "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
6534
  },
6488
6535
  {
6489
6536
  "name": "GraphqlPubSub",
@@ -6508,7 +6555,7 @@
6508
6555
  "name": "GraphqlWsOptions",
6509
6556
  "kind": "interface",
6510
6557
  "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}"
6558
+ "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
6559
  },
6513
6560
  {
6514
6561
  "name": "GuardOptions",
@@ -7073,7 +7120,7 @@
7073
7120
  "name": "ImageHandlerOptions",
7074
7121
  "kind": "interface",
7075
7122
  "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}"
7123
+ "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
7124
  },
7078
7125
  {
7079
7126
  "name": "ImageInfo",
@@ -8682,7 +8729,7 @@
8682
8729
  "name": "MemoryCacheStore",
8683
8730
  "kind": "class",
8684
8731
  "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}",
8732
+ "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
8733
  "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
8734
  },
8688
8735
  {
@@ -8815,14 +8862,14 @@
8815
8862
  "name": "MemorySessionStore",
8816
8863
  "kind": "class",
8817
8864
  "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 */"
8865
+ "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}",
8866
+ "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
8867
  },
8821
8868
  {
8822
8869
  "name": "MemorySessionStoreOptions",
8823
8870
  "kind": "interface",
8824
8871
  "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}"
8872
+ "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
8873
  },
8827
8874
  {
8828
8875
  "name": "MemoryStaticBoundaryCache",
@@ -10453,14 +10500,14 @@
10453
10500
  "name": "PiBackend",
10454
10501
  "kind": "class",
10455
10502
  "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}",
10503
+ "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
10504
  "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
10505
  },
10459
10506
  {
10460
10507
  "name": "PiBackend",
10461
10508
  "kind": "class",
10462
10509
  "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}",
10510
+ "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
10511
  "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
10512
  },
10466
10513
  {
@@ -10826,7 +10873,7 @@
10826
10873
  "name": "PrerenderEntry",
10827
10874
  "kind": "interface",
10828
10875
  "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}"
10876
+ "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
10877
  },
10831
10878
  {
10832
10879
  "name": "PrerenderOptions",
@@ -10840,6 +10887,19 @@
10840
10887
  "package": "@nifrajs/web",
10841
10888
  "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
10889
  },
10890
+ {
10891
+ "name": "PrerenderedPageReaderOptions",
10892
+ "kind": "interface",
10893
+ "package": "@nifrajs/web",
10894
+ "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}"
10895
+ },
10896
+ {
10897
+ "name": "PrerenderedPages",
10898
+ "kind": "interface",
10899
+ "package": "@nifrajs/web",
10900
+ "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}",
10901
+ "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 */"
10902
+ },
10843
10903
  {
10844
10904
  "name": "PresignableStorageAdapter",
10845
10905
  "kind": "interface",
@@ -11538,6 +11598,13 @@
11538
11598
  "package": "@nifrajs/mcp",
11539
11599
  "signature": "export interface ReactWidgetOptions {\n /** The widget's `ui://` resource URI, e.g. `ui://orders/table`. */\n readonly uri: string;\n readonly name: string;\n readonly description?: string;\n readonly title?: string;\n /** Absolute path to a `.tsx`/`.jsx` module whose DEFAULT export is a React component. It receives the\n * tool's `structuredContent` as props. */\n readonly component: string;\n /** Extra `<head>` content (styles, fonts). The bridge + component bundle are injected for you. */\n readonly head?: string;\n /** Minify the client bundle (default true). */\n readonly minify?: boolean;\n}"
11540
11600
  },
11601
+ {
11602
+ "name": "ReadAt",
11603
+ "kind": "type",
11604
+ "package": "@nifrajs/core",
11605
+ "signature": "export type ReadAt = (bytes: Uint8Array, position: number) => Promise<number>;",
11606
+ "doc": "/** Reads into `bytes` from byte `position` of a file, resolving to the count read (0 at its end). */"
11607
+ },
11541
11608
  {
11542
11609
  "name": "Readable",
11543
11610
  "kind": "interface",
@@ -11605,6 +11672,13 @@
11605
11672
  "package": "@nifrajs/core",
11606
11673
  "signature": "export interface ReconciliationWorkerResult {\n readonly acquired: boolean;\n readonly pages: number;\n readonly scanned: number;\n readonly handled: number;\n}"
11607
11674
  },
11675
+ {
11676
+ "name": "RecordingObservationLifecycle",
11677
+ "kind": "interface",
11678
+ "package": "@nifrajs/otel",
11679
+ "signature": "export interface RecordingObservationLifecycle extends ObservationLifecycle {\n /** Record already-completed work without allocating an active observation. */\n record(input: StartObservation, end: EndObservation): NifraSpan;\n}",
11680
+ "doc": "/** Factory lifecycles can record completed work; custom start-only implementations remain valid. */"
11681
+ },
11608
11682
  {
11609
11683
  "name": "RecoveryCrashError",
11610
11684
  "kind": "class",
@@ -11823,7 +11897,7 @@
11823
11897
  "name": "RenderAdapter",
11824
11898
  "kind": "interface",
11825
11899
  "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}",
11900
+ "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
11901
  "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
11902
  },
11829
11903
  {
@@ -11891,7 +11965,7 @@
11891
11965
  "kind": "const",
11892
11966
  "package": "@nifrajs/web-vue",
11893
11967
  "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. */"
11968
+ "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
11969
  },
11896
11970
  {
11897
11971
  "name": "RenderStreamOptions",
@@ -13231,7 +13305,7 @@
13231
13305
  "name": "RunOptions",
13232
13306
  "kind": "interface",
13233
13307
  "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}"
13308
+ "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
13309
  },
13236
13310
  {
13237
13311
  "name": "RunParallelNode",
@@ -13866,7 +13940,7 @@
13866
13940
  "kind": "const",
13867
13941
  "package": "@nifrajs/web-vue",
13868
13942
  "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 */"
13943
+ "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
13944
  },
13871
13945
  {
13872
13946
  "name": "SearchSchemaOf",
@@ -13982,7 +14056,7 @@
13982
14056
  "name": "ServeOptions",
13983
14057
  "kind": "interface",
13984
14058
  "package": "@nifrajs/node",
13985
- "signature": "export interface ServeOptions {\n readonly port: number;\n readonly hostname?: string;\n /**\n * Protocol used when the adapter constructs `Request.url`.\n *\n * The default is `\"https\"` when {@link ServeOptions.tls} is set and `\"http\"` otherwise. Deployments\n * behind TLS termination can set `\"https\"` (or a trusted infra-aware function) so app code that reads\n * `request.url` sees the public scheme. Forwarded headers are not trusted implicitly.\n */\n readonly protocol?: RequestProtocolOption;\n /**\n * Serve HTTPS directly, with no proxy in front: `{ cert, key }` as PEM text or the files' bytes\n * (`readFileSync(\"cert.pem\")`), plus any other `node:tls` server option (`passphrase`, `ca`,\n * `requestCert` for client certificates, `minVersion`, `SNICallback`, ...). Unset, the server speaks\n * plain HTTP, which is what a proxy or platform that terminates TLS expects.\n */\n readonly tls?: TlsOptions;\n /** Reject requests whose normalized Host authority is not in this allowlist or callback result. */\n readonly allowedHosts?: readonly string[] | ((host: string) => boolean);\n /** Use this validated authority when constructing Request.url, ignoring the inbound Host value. */\n readonly canonicalHost?: string;\n /**\n * Install SIGTERM/SIGINT handlers that call `stop()` for a graceful drain on\n * `docker stop` / Ctrl-C. Off by default - taking over process signals is opt-in,\n * mirroring nifra's Bun `listen({ gracefulSignals })`.\n * `{ drainMs }` sets how long in-flight requests get before the stop forces them closed\n * (default 10_000).\n *\n * The app-level request timeout (`server({ requestTimeoutMs })` → 503) and body cap\n * are *not* set here - they live inside `app.fetch`, so they already apply through\n * this adapter. Slow-client protection is Node's built-in `requestTimeout` (300s) /\n * `headersTimeout` (60s) defaults.\n */\n readonly signals?: boolean | {\n readonly drainMs?: number;\n };\n /**\n * Serve static files from disk for matching GET/HEAD requests *before* the app runs - non-matching\n * requests fall through to `app.fetch` with the node-direct fast path intact (no perf regression on\n * SSR/API routes). Replaces the hand-rolled `/assets/*` reader in self-hosted entries.\n */\n readonly static?: ServeStaticOptions;\n /**\n * Make a hand-rolled `return new Response(body)` ride the direct-write lane, by swapping\n * `globalThis.Response` for a stand-in that defers a *simple* construction (a string body, no\n * `statusText`, no headers or a plain header record) the way `c.text` / `c.json` already do.\n *\n * Off by default: prefer `c.text` / `c.json`, which get this without a global swap. Reach for the\n * flag only when handlers construct `Response` by hand on the hot path. It patches a process-global\n * builtin, so every `new Response(...)` anywhere in the process goes through the stand-in -\n * transparent (non-simple bodies build a real `Response`, and simple ones stay `instanceof\n * Response`), but a broad enough change to be opt-in.\n */\n readonly fastResponse?: boolean;\n}"
14059
+ "signature": "export interface ServeOptions {\n readonly port: number;\n readonly hostname?: string;\n /**\n * Protocol used when the adapter constructs `Request.url`.\n *\n * The default is `\"https\"` when {@link ServeOptions.tls} is set and `\"http\"` otherwise. Deployments\n * behind TLS termination can set `\"https\"` (or a trusted infra-aware function) so app code that reads\n * `request.url` sees the public scheme. Forwarded headers are not trusted implicitly.\n */\n readonly protocol?: RequestProtocolOption;\n /**\n * Serve HTTPS directly, with no proxy in front: `{ cert, key }` as PEM text or the files' bytes\n * (`readFileSync(\"cert.pem\")`), plus any other `node:tls` server option (`passphrase`, `ca`,\n * `requestCert` for client certificates, `minVersion`, `SNICallback`, ...). Unset, the server speaks\n * plain HTTP, which is what a proxy or platform that terminates TLS expects.\n */\n readonly tls?: TlsOptions;\n /** Reject requests whose normalized Host authority is not in this allowlist or callback result. */\n readonly allowedHosts?: readonly string[] | ((host: string) => boolean);\n /** Use this validated authority when constructing Request.url, ignoring the inbound Host value. */\n readonly canonicalHost?: string;\n /**\n * Install SIGTERM/SIGINT handlers that call `stop()` for a graceful drain on\n * `docker stop` / Ctrl-C. Off by default - taking over process signals is opt-in,\n * mirroring nifra's Bun `listen({ gracefulSignals })`.\n * `{ drainMs }` sets how long in-flight requests get before the stop forces them closed\n * (default 10_000).\n *\n * The app-level request timeout (`server({ requestTimeoutMs })` → 503) and body cap\n * are *not* set here - they live inside `app.fetch`, so they already apply through\n * this adapter. Slow-client protection is Node's built-in `requestTimeout` (300s) /\n * `headersTimeout` (60s) defaults.\n */\n readonly signals?: boolean | {\n readonly drainMs?: number;\n };\n /**\n * Serve static files from disk for matching GET/HEAD requests *before* the app runs - non-matching\n * requests fall through to `app.fetch` with the node-direct fast path intact (no perf regression on\n * SSR/API routes). Replaces the hand-rolled `/assets/*` reader in self-hosted entries. An array\n * serves several directories; the first mount whose prefix (and `files`, when set) takes a path\n * answers it.\n */\n readonly static?: ServeStaticOptions | readonly ServeStaticOptions[];\n /**\n * Make a hand-rolled `return new Response(body)` ride the direct-write lane, by swapping\n * `globalThis.Response` for a stand-in that defers a *simple* construction (a string body, no\n * `statusText`, no headers or a plain header record) the way `c.text` / `c.json` already do.\n *\n * Off by default: prefer `c.text` / `c.json`, which get this without a global swap. Reach for the\n * flag only when handlers construct `Response` by hand on the hot path. It patches a process-global\n * builtin, so every `new Response(...)` anywhere in the process goes through the stand-in -\n * transparent (non-simple bodies build a real `Response`, and simple ones stay `instanceof\n * Response`), but a broad enough change to be opt-in.\n */\n readonly fastResponse?: boolean;\n}"
13986
14060
  },
13987
14061
  {
13988
14062
  "name": "ServePublicDirOptions",
@@ -13994,7 +14068,7 @@
13994
14068
  "name": "ServeStaticOptions",
13995
14069
  "kind": "interface",
13996
14070
  "package": "@nifrajs/node",
13997
- "signature": "export interface ServeStaticOptions {\n /** Directory to read files from - an absolute path or a `file://` URL (`new URL(\"./assets/\", import.meta.url)`). */\n readonly dir: string | URL;\n /** URL prefix these files are served under. Default `\"/assets\"`. Use `\"/\"` to serve the whole dir. */\n readonly prefix?: string;\n /** Emit `cache-control: public, max-age=31536000, immutable` - correct for content-hashed files. Default `true`. */\n readonly immutable?: boolean;\n /**\n * URL paths of the content-hashed files, such as a client build manifest's `assets`. When set,\n * `immutable` applies only to these; any other file is sent with its validators and no\n * `cache-control`, so a file that keeps its name across deploys still revalidates.\n */\n readonly hashedFiles?: Iterable<string>;\n /** Extra headers merged onto every served file. */\n readonly headers?: Readonly<Record<string, string>>;\n /**\n * Whether a path with a dot-leading segment (`/.env`, `/.git/config`, `/.hidden/app.js`) is\n * served. Default `\"deny\"`: answered `404` - the same response as a missing file, so probing\n * can't distinguish \"hidden\" from \"absent\". Dotfiles land in build output by accident, not by\n * design (`.env` next to the bundle, a `.git` dir in a copied tree), so serving them is opt-in.\n * Set `\"allow\"` if the directory deliberately contains them (e.g. `/.well-known`).\n */\n readonly dotfiles?: \"deny\" | \"allow\";\n}",
14071
+ "signature": "export interface ServeStaticOptions {\n /** Directory to read files from - an absolute path or a `file://` URL (`new URL(\"./assets/\", import.meta.url)`). */\n readonly dir: string | URL;\n /** URL prefix these files are served under. Default `\"/assets\"`. Use `\"/\"` to serve the whole dir. */\n readonly prefix?: string;\n /** Emit `cache-control: public, max-age=31536000, immutable` - correct for content-hashed files. Default `true`. */\n readonly immutable?: boolean;\n /**\n * URL paths of the content-hashed files, such as a client build manifest's `assets`. When set,\n * `immutable` applies only to these; any other file is sent with its validators and no\n * `cache-control`, so a file that keeps its name across deploys still revalidates.\n */\n readonly hashedFiles?: Iterable<string>;\n /**\n * `cache-control` for a file that is not served immutable (`immutable: false`, or a file outside\n * `hashedFiles`). Unset, such a file carries only its validators.\n */\n readonly cacheControl?: string;\n /**\n * URL paths (as sent, percent-encoded) of the only files this mount serves. Any other path under\n * `prefix` passes to the next mount, then the app, without this mount touching the filesystem - so\n * a mount over a directory that also holds the server bundle can expose just the build's listed\n * files. A later mount over the same paths can still serve the rest.\n */\n readonly files?: Iterable<string>;\n /** Extra headers merged onto every served file. */\n readonly headers?: Readonly<Record<string, string>>;\n /**\n * Whether a path with a dot-leading segment (`/.env`, `/.git/config`, `/.hidden/app.js`) is\n * served. Default `\"deny\"`: answered `404` - the same response as a missing file, so probing\n * can't distinguish \"hidden\" from \"absent\". Dotfiles land in build output by accident, not by\n * design (`.env` next to the bundle, a `.git` dir in a copied tree), so serving them is opt-in.\n * `/.well-known` is public by definition (RFC 8615) and always served, as `servePublicDir` does.\n * The rule applies to the requested path and again to the file it resolves to, so a visible name\n * linking to `.env` is denied too. Set `\"allow\"` if the directory deliberately holds dotfiles.\n */\n readonly dotfiles?: \"deny\" | \"allow\";\n}",
13998
14072
  "doc": "/**\n * Serve static files from a directory (e.g. the client build) under a URL prefix - so a self-hosted\n * Node deploy doesn't need a CDN or a hand-rolled `/assets/*` handler. (On Cloudflare/Vercel the\n * platform serves assets; this is for `node server.js`.)\n */"
13999
14073
  },
14000
14074
  {
@@ -14269,6 +14343,13 @@
14269
14343
  "package": "nifra",
14270
14344
  "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
14345
  },
14346
+ {
14347
+ "name": "ServerPrerenderedPage",
14348
+ "kind": "interface",
14349
+ "package": "@nifrajs/web",
14350
+ "signature": "export interface ServerPrerenderedPage {\n readonly file: string;\n readonly headers: Readonly<Record<string, string>>;\n}",
14351
+ "doc": "/** One page a self-hosting build prerendered: its file and the headers it is served with. */"
14352
+ },
14272
14353
  {
14273
14354
  "name": "ServerZoneGuardOptions",
14274
14355
  "kind": "type",
@@ -14339,7 +14420,7 @@
14339
14420
  "name": "SessionManager",
14340
14421
  "kind": "interface",
14341
14422
  "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}"
14423
+ "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
14424
  },
14344
14425
  {
14345
14426
  "name": "SessionMigrationError",
@@ -14385,7 +14466,7 @@
14385
14466
  "kind": "interface",
14386
14467
  "package": "@nifrajs/auth",
14387
14468
  "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 */"
14469
+ "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
14470
  },
14390
14471
  {
14391
14472
  "name": "SessionStore",
@@ -15928,14 +16009,14 @@
15928
16009
  "name": "VERSION",
15929
16010
  "kind": "const",
15930
16011
  "package": "@nifrajs/core",
15931
- "signature": "export declare const VERSION: \"5.2.0\";",
16012
+ "signature": "export declare const VERSION: \"5.4.0\";",
15932
16013
  "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
16014
  },
15934
16015
  {
15935
16016
  "name": "VERSION",
15936
16017
  "kind": "const",
15937
16018
  "package": "nifra",
15938
- "signature": "export declare const VERSION: \"5.2.0\";",
16019
+ "signature": "export declare const VERSION: \"5.4.0\";",
15939
16020
  "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
16021
  },
15941
16022
  {
@@ -16597,6 +16678,13 @@
16597
16678
  "signature": "export declare function assertBudgetRemaining(budget: RequestBudget, requiredMs?: number): void;",
16598
16679
  "doc": "/** Fail before starting work that cannot fit inside the remaining time. */"
16599
16680
  },
16681
+ {
16682
+ "name": "assertByteLimit",
16683
+ "kind": "function",
16684
+ "package": "@nifrajs/core",
16685
+ "signature": "export declare function assertByteLimit(value: number, name?: string): void;",
16686
+ "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. */"
16687
+ },
16600
16688
  {
16601
16689
  "name": "assertCssLoadingCompatible",
16602
16690
  "kind": "function",
@@ -17417,6 +17505,13 @@
17417
17505
  "signature": "export declare function compileRunPlanLayers(source: RunPlan | unknown, options: CompileOptions): readonly WorkflowStep[];",
17418
17506
  "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
17507
  },
17508
+ {
17509
+ "name": "compileSchema",
17510
+ "kind": "function",
17511
+ "package": "@nifrajs/schema",
17512
+ "signature": "export declare function compileSchema<T extends TSchema>(schema: NifraSchema<T>, options: CompileSchemaOptions): string;",
17513
+ "doc": "/** Generate a typed module with static validation code. Run at build time, then import its export at runtime. */"
17514
+ },
17420
17515
  {
17421
17516
  "name": "compileVue",
17422
17517
  "kind": "function",
@@ -17431,6 +17526,13 @@
17431
17526
  "signature": "export declare function compileVueStyles(source: string, filename: string): string;",
17432
17527
  "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
17528
  },
17529
+ {
17530
+ "name": "compiledFormat",
17531
+ "kind": "function",
17532
+ "package": "@nifrajs/schema",
17533
+ "signature": "export declare function compiledFormat(name: string, value: string): boolean;",
17534
+ "doc": "/** The format callback used by generated validators; custom formats retain their registry semantics. */"
17535
+ },
17434
17536
  {
17435
17537
  "name": "componentBuild",
17436
17538
  "kind": "const",
@@ -17576,6 +17678,20 @@
17576
17678
  "signature": "export declare function constrainedParts(parts: readonly MixedPart[]): readonly MixedPart[] | undefined;",
17577
17679
  "doc": "/**\n * The parts of a mixed segment when at least one of its parameters has a constraint, else\n * `undefined`. It is the fourth argument to {@link matchMixedSegment}; done once, at registration.\n */"
17578
17680
  },
17681
+ {
17682
+ "name": "contentTags",
17683
+ "kind": "function",
17684
+ "package": "@nifrajs/core",
17685
+ "signature": "export declare function contentTags(createHash: (algorithm: \"sha256\") => ContentHash, options?: ContentTagOptions): ContentTags;",
17686
+ "doc": "/** Tags from `createHash` - node:crypto's, which every runtime nifra serves files on provides. */"
17687
+ },
17688
+ {
17689
+ "name": "contentTypeOf",
17690
+ "kind": "function",
17691
+ "package": "@nifrajs/core",
17692
+ "signature": "export declare function contentTypeOf(path: string): string;",
17693
+ "doc": "/** The media type for a file path or name by its extension, case-insensitively. */"
17694
+ },
17579
17695
  {
17580
17696
  "name": "contextStorage",
17581
17697
  "kind": "function",
@@ -17658,7 +17774,7 @@
17658
17774
  "kind": "function",
17659
17775
  "package": "@nifrajs/web",
17660
17776
  "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 */"
17777
+ "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
17778
  },
17663
17779
  {
17664
17780
  "name": "copyRef",
@@ -18019,7 +18135,7 @@
18019
18135
  "name": "createObservationLifecycle",
18020
18136
  "kind": "function",
18021
18137
  "package": "@nifrajs/otel",
18022
- "signature": "export declare function createObservationLifecycle(options?: ObservationLifecycleOptions): ObservationLifecycle;",
18138
+ "signature": "export declare function createObservationLifecycle(options?: ObservationLifecycleOptions): RecordingObservationLifecycle;",
18023
18139
  "doc": "/** Creates an independent lifecycle factory. Adapters are always called fail-open. */"
18024
18140
  },
18025
18141
  {
@@ -19340,6 +19456,13 @@
19340
19456
  "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
19457
  "doc": "/** Rehydrate a deterministic join artifact. */"
19342
19458
  },
19459
+ {
19460
+ "name": "fromPrecompiled",
19461
+ "kind": "function",
19462
+ "package": "@nifrajs/schema",
19463
+ "signature": "export declare function fromPrecompiled<T extends TSchema>(schema: T, check: (value: unknown) => boolean): StandardSchemaV1<Static<T>, Static<T>> & {\n readonly jsonSchema: T;\n};",
19464
+ "doc": "/** Wrap a build-generated checker without shipping a schema builder or dynamic compiler. */"
19465
+ },
19343
19466
  {
19344
19467
  "name": "fromTypeBox",
19345
19468
  "kind": "function",
@@ -19400,7 +19523,7 @@
19400
19523
  "name": "generateServerEntry",
19401
19524
  "kind": "function",
19402
19525
  "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;",
19526
+ "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
19527
  "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
19528
  },
19406
19529
  {
@@ -19563,6 +19686,13 @@
19563
19686
  "signature": "export declare function hasDuplicateCookie(header: string | null | undefined, targetName: string): boolean;",
19564
19687
  "doc": "/** True when a raw Cookie header contains the same exact cookie name more than once. */"
19565
19688
  },
19689
+ {
19690
+ "name": "hasResidentBody",
19691
+ "kind": "function",
19692
+ "package": "@nifrajs/core",
19693
+ "signature": "export declare function hasResidentBody(response: Response): boolean;",
19694
+ "doc": "/** Whether {@link markResidentBody} recorded `response`. Another copy of this module did not. */"
19695
+ },
19566
19696
  {
19567
19697
  "name": "hash8",
19568
19698
  "kind": "function",
@@ -19692,6 +19822,13 @@
19692
19822
  "signature": "export declare function idleServerFnState<Output>(): ServerFnState<Output>;",
19693
19823
  "doc": "/** The idle state, shared so a server render and the first client render agree by reference. */"
19694
19824
  },
19825
+ {
19826
+ "name": "ifRangeAllowsPartial",
19827
+ "kind": "function",
19828
+ "package": "@nifrajs/core",
19829
+ "signature": "export declare function ifRangeAllowsPartial(ifRange: string | null, etag: string | undefined, lastModified: number | undefined): boolean;",
19830
+ "doc": "/**\n * Whether `If-Range` (the header, or `null`) lets a range request be answered partially; otherwise the\n * whole file is the conformant answer, not a fallback. An entity tag must equal the file's strong\n * `etag` (RFC 9110 section 13.1.5). A date must equal `lastModified` to the second, and counts only\n * for a file with no strong tag: a client holding the tag sends it, and a date cannot tell apart two\n * versions dated in the same second - here or on another instance - so resuming by one could splice\n * them.\n */"
19831
+ },
19695
19832
  {
19696
19833
  "name": "imageDimensions",
19697
19834
  "kind": "function",
@@ -19917,6 +20054,13 @@
19917
20054
  "signature": "export declare function isDraftEnabled(request: Request, secret: string): Promise<boolean>;",
19918
20055
  "doc": "/**\n * Whether `request` carries a **valid**, unexpired signed draft cookie (constant-time verify via\n * `unsignValue`). `createWebApp` uses it to set `ctx.draft`; `withISR` uses it to bypass the cache for\n * editors. A missing, forged, tampered, or expired cookie returns `false`.\n */"
19919
20056
  },
20057
+ {
20058
+ "name": "isHiddenPath",
20059
+ "kind": "function",
20060
+ "package": "@nifrajs/core",
20061
+ "signature": "export declare function isHiddenPath(rel: string): boolean;",
20062
+ "doc": "/**\n * Whether a relative path crosses a dot-segment other than `.well-known` (RFC 8615, public by\n * definition). Serving, the build's `public/` copy and the parity listing all apply it, so an editor\n * or VCS artifact (`.env`, `.git/`, `.DS_Store`) is neither served nor shipped. Both separators split:\n * a request path uses `/`, a relative file path the OS separator.\n */"
20063
+ },
19920
20064
  {
19921
20065
  "name": "isHydrationMismatch",
19922
20066
  "kind": "function",
@@ -19964,6 +20108,13 @@
19964
20108
  "package": "@nifrajs/web",
19965
20109
  "signature": "export declare function isNativeServerView(value: unknown): value is NativeServerView;"
19966
20110
  },
20111
+ {
20112
+ "name": "isNotModified",
20113
+ "kind": "function",
20114
+ "package": "@nifrajs/core",
20115
+ "signature": "export declare function isNotModified(ifNoneMatch: string | null, ifModifiedSince: string | null, etag: string | undefined, lastModified: number | undefined): boolean;",
20116
+ "doc": "/**\n * Whether the client's copy is current, so the answer is a bodyless 304. `If-None-Match` (the header,\n * or `null`) decides whenever it is sent (RFC 9110 section 13.2.2), by weak comparison with `etag`, and\n * `*` matches any file. Otherwise an `If-Modified-Since` at or after `lastModified` (epoch\n * milliseconds), compared at the whole seconds an HTTP date carries; an unparseable date, or a file\n * with no date, is never current.\n */"
20117
+ },
19967
20118
  {
19968
20119
  "name": "isProcessAlive",
19969
20120
  "kind": "function",
@@ -20173,6 +20324,13 @@
20173
20324
  "signature": "export declare function language<const L extends readonly string[]>(options: LanguageOptions<L>): ContextPlugin<{\n language: L[number];\n languageMatch: LanguageMatch;\n}>;",
20174
20325
  "doc": "/**\n * Derives `c.language` from `Accept-Language` and emits `Content-Language` by default.\n *\n * Header-only by design. For the full detector - `?lang=` query parameter → cookie →\n * `Accept-Language`, with optional cookie persistence - use `localeDetector()` from\n * `@nifrajs/i18n/detector`; use one or the other, not both.\n */"
20175
20326
  },
20327
+ {
20328
+ "name": "lastModifiedOf",
20329
+ "kind": "function",
20330
+ "package": "@nifrajs/core",
20331
+ "signature": "export declare function lastModifiedOf(version: FileVersion): number | undefined;",
20332
+ "doc": "/**\n * The time a file can be dated by in Last-Modified, or `undefined`: its mtime, only while that is\n * the time of its own last change. A copy or build that keeps or normalizes timestamps - `cp -p`,\n * `rsync -a`, tar, a container image layer, SOURCE_DATE_EPOCH, the Nix store's 1 s - gives a\n * same-size replacement the old file's date, so its files are left undated and their content tag\n * validates them alone.\n */"
20333
+ },
20176
20334
  {
20177
20335
  "name": "lintPostgresStatement",
20178
20336
  "kind": "function",
@@ -20262,6 +20420,13 @@
20262
20420
  "signature": "export declare function markIdempotencySafeToRetry(context: object): void;",
20263
20421
  "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
20422
  },
20423
+ {
20424
+ "name": "markResidentBody",
20425
+ "kind": "function",
20426
+ "package": "@nifrajs/core",
20427
+ "signature": "export declare function markResidentBody(response: Response): Response;",
20428
+ "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 */"
20429
+ },
20265
20430
  {
20266
20431
  "name": "matchMixedSegment",
20267
20432
  "kind": "function",
@@ -21208,7 +21373,7 @@
21208
21373
  "kind": "function",
21209
21374
  "package": "@nifrajs/web",
21210
21375
  "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 */"
21376
+ "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
21377
  },
21213
21378
  {
21214
21379
  "name": "plainError",
@@ -21351,12 +21516,19 @@
21351
21516
  "signature": "export declare function prerenderRoutes(options: PrerenderOptions): Promise<PrerenderResult>;",
21352
21517
  "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
21518
  },
21519
+ {
21520
+ "name": "prerenderedPageReader",
21521
+ "kind": "function",
21522
+ "package": "@nifrajs/web",
21523
+ "signature": "export declare function prerenderedPageReader(options: PrerenderedPageReaderOptions): (pathname: string) => Promise<string | undefined>;",
21524
+ "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 */"
21525
+ },
21354
21526
  {
21355
21527
  "name": "prettyJson",
21356
21528
  "kind": "function",
21357
21529
  "package": "@nifrajs/middleware",
21358
21530
  "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 */"
21531
+ "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
21532
  },
21361
21533
  {
21362
21534
  "name": "previewEndpoint",
@@ -21696,6 +21868,13 @@
21696
21868
  "package": "@nifrajs/cli",
21697
21869
  "signature": "export declare function recordProof(bundle: EvidenceBundle, proof: ProofEvidence): EvidenceBundle;"
21698
21870
  },
21871
+ {
21872
+ "name": "recordResidentBodies",
21873
+ "kind": "function",
21874
+ "package": "@nifrajs/core",
21875
+ "signature": "export declare function recordResidentBodies(): void;",
21876
+ "doc": "/** Called by an in-process client: nothing else reads the record, so until then it can be skipped. */"
21877
+ },
21699
21878
  {
21700
21879
  "name": "recordTrajectory",
21701
21880
  "kind": "const",
@@ -22032,6 +22211,13 @@
22032
22211
  "signature": "export declare function reservedKeyFor(segment: string): string | undefined;",
22033
22212
  "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
22213
  },
22214
+ {
22215
+ "name": "residentBodiesRecorded",
22216
+ "kind": "const",
22217
+ "package": "@nifrajs/core",
22218
+ "signature": "export declare let residentBodiesRecorded: boolean;",
22219
+ "doc": "/** Set once an in-process client exists, so the leanest response lane records its bodies too. */"
22220
+ },
22035
22221
  {
22036
22222
  "name": "resolveChainMeta",
22037
22223
  "kind": "function",
@@ -22698,7 +22884,7 @@
22698
22884
  "kind": "function",
22699
22885
  "package": "@nifrajs/web",
22700
22886
  "signature": "export declare function servePublicDir(options: ServePublicDirOptions): (request: Request) => Promise<Response | undefined>;",
22701
- "doc": "/**\n * Build a static-file handler for `dir`.\n *\n * Returns `undefined` on any miss so the caller **falls through to routing** - a static probe must\n * never shadow a route. That ordering is also why a `routes/robots.txt.tsx` beats a\n * `public/robots.txt` only if the caller checks routes first; the documented precedence is that the\n * static probe runs first, so `public/` wins, and an app wanting the route should not ship both.\n */"
22887
+ "doc": "/**\n * Build a static-file handler for `dir`.\n *\n * Returns `undefined` on any miss so the caller **falls through to routing** - a static probe must\n * never shadow a route. That ordering is also why a `routes/robots.txt.tsx` beats a\n * `public/robots.txt` only if the caller checks routes first; the documented precedence is that the\n * static probe runs first, so `public/` wins, and an app wanting the route should not ship both.\n *\n * A file is sent with a strong `ETag` from its bytes, the tag `@nifrajs/node`'s `static` reader and\n * the Deno entry send, and with `Last-Modified` only while its mtime is that of its own last change,\n * so a replacement that keeps a file's size and timestamps is never judged current or resumed into.\n */"
22702
22888
  },
22703
22889
  {
22704
22890
  "name": "serveTestApp",