@nifrajs/cli 1.12.0 → 1.13.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.
- package/dist/cli.js +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +23 -13
- package/dist/doctor.js.map +1 -1
- package/dist/mcp-http.js +1 -1
- package/docs/types.json +55 -8
- package/package.json +9 -9
- package/src/cli.ts +1 -1
- package/src/doctor.ts +27 -12
- package/src/mcp-http.ts +1 -1
package/dist/cli.js
CHANGED
|
@@ -100,7 +100,7 @@ routes/ from the current directory. Run from your project root.
|
|
|
100
100
|
Port: \`dev\` and \`start\` share the default ${DEFAULT_DEV_PORT}. Override with \`--port <n>\` (alias \`-p\`) or the
|
|
101
101
|
\`PORT\` env var (\`--port\` wins over \`PORT\`, which wins over the default).`;
|
|
102
102
|
// Kept in lockstep with packages/cli/package.json by check:publish's version-consistency gate.
|
|
103
|
-
const CLI_VERSION = "1.
|
|
103
|
+
const CLI_VERSION = "1.13.0";
|
|
104
104
|
// A render adapter + nifra server are opaque to the CLI (it just forwards them); cast at the seam.
|
|
105
105
|
const asAdapter = (v) => v;
|
|
106
106
|
const asBunPlugins = (v) => v;
|
package/dist/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,aAAa,EAA6B,MAAM,YAAY,CAAA;AAiC1E;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAY1D;AAED;8DAC8D;AAC9D,wBAAgB,YAAY,CAC1B,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,GACnD,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAK3B;AAED;;;GAGG;AACH,wBAAgB,qBAA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X,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAoDpC;AAyDD,qFAAqF;AACrF,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CA8B5E;AAED,0GAA0G;AAC1G,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAqD3E;AAED,6FAA6F;AAC7F,wBAAsB,SAAS,CAC7B,GAAG,EAAE,MAAM,EACX,IAAI,GAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GACjE,OAAO,CAAC,OAAO,CAAC,CAgElB"}
|
package/dist/doctor.js
CHANGED
|
@@ -196,26 +196,36 @@ const displayPath = (cwd, path) => {
|
|
|
196
196
|
export async function collectDuplicateInstalls(cwd, rootPackage) {
|
|
197
197
|
const importers = await workspaceImporters(cwd, rootPackage);
|
|
198
198
|
const byPackage = new Map();
|
|
199
|
+
const record = (name, copy, importer) => {
|
|
200
|
+
let copies = byPackage.get(name);
|
|
201
|
+
if (copies === undefined) {
|
|
202
|
+
copies = new Map();
|
|
203
|
+
byPackage.set(name, copies);
|
|
204
|
+
}
|
|
205
|
+
const entry = copies.get(copy.path) ?? { version: copy.version, importers: new Set() };
|
|
206
|
+
entry.importers.add(importer);
|
|
207
|
+
copies.set(copy.path, entry);
|
|
208
|
+
};
|
|
209
|
+
const targets = new Set();
|
|
199
210
|
for (const importer of importers) {
|
|
200
211
|
for (const name of duplicateTargets(importer.package)) {
|
|
201
212
|
if (importer.package.name === name)
|
|
202
213
|
continue;
|
|
214
|
+
targets.add(name);
|
|
203
215
|
const copy = await resolvedInstalledCopy(importer.root, cwd, name);
|
|
204
|
-
if (copy
|
|
205
|
-
|
|
206
|
-
let copies = byPackage.get(name);
|
|
207
|
-
if (copies === undefined) {
|
|
208
|
-
copies = new Map();
|
|
209
|
-
byPackage.set(name, copies);
|
|
210
|
-
}
|
|
211
|
-
const record = copies.get(copy.path) ?? {
|
|
212
|
-
version: copy.version,
|
|
213
|
-
importers: new Set(),
|
|
214
|
-
};
|
|
215
|
-
record.importers.add(displayPath(cwd, importer.root));
|
|
216
|
-
copies.set(copy.path, record);
|
|
216
|
+
if (copy !== undefined)
|
|
217
|
+
record(name, copy, displayPath(cwd, importer.root));
|
|
217
218
|
}
|
|
218
219
|
}
|
|
220
|
+
// Probe the workspace root for every target too, even when the root manifest doesn't declare it.
|
|
221
|
+
// A hoisted root copy is reachable from any package that lacks its own nested one, so leaving it
|
|
222
|
+
// out hides the very split it should catch: every declaring package nested onto one copy while the
|
|
223
|
+
// root resolved a different one, which reads as a single copy when only declarers are consulted.
|
|
224
|
+
for (const name of targets) {
|
|
225
|
+
const copy = await resolvedInstalledCopy(cwd, cwd, name);
|
|
226
|
+
if (copy !== undefined)
|
|
227
|
+
record(name, copy, ".");
|
|
228
|
+
}
|
|
219
229
|
const findings = [];
|
|
220
230
|
for (const [name, copies] of [...byPackage.entries()].sort(([a], [b]) => a.localeCompare(b))) {
|
|
221
231
|
if (copies.size < 2)
|
package/dist/doctor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAsB,aAAa,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE1E,uGAAuG;AACvG,4FAA4F;AAC5F,MAAM,QAAQ,GAAwB,IAAI,GAAG,CAAS;IACpD,GAAG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KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;YACvD,OAAO,CAAC,GAAG,CAAC,KAAK,GAAG,qCAAqC,GAAG,KAAK,CAAC,CAAA;YAClE,KAAK,MAAM,CAAC,IAAI,KAAK;gBAAE,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;QACjE,CAAC;IACH,CAAC;IACD,IAAI,MAAM,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxC,OAAO,CAAC,GAAG,CACT,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,sEAAsE,CACpG,CAAA;QACD,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC/C,OAAO,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;YACnC,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;gBAClC,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,OAAO,OAAO,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACrF,CAAC;QACH,CAAC;QACD,OAAO,CAAC,GAAG,CACT,mGAAmG,CACpG,CAAA;IACH,CAAC;IACD,IAAI,KAAK,CAAC,IAAI,GAAG,CAAC;QAChB,OAAO,CAAC,GAAG,CACT,iGAAiG,CAClG,CAAA;IACH,OAAO,KAAK,CAAA;AACd,CAAC"}
|
package/dist/mcp-http.js
CHANGED
|
@@ -19,7 +19,7 @@ import { loadTypesCorpus } from "./types-search.js";
|
|
|
19
19
|
// tool factory + the transport core from one entry: `import { respondMcpHttp, docsTools } from "@nifrajs/cli/mcp"`.
|
|
20
20
|
export { docsTools } from "./mcp-docs-tools.js";
|
|
21
21
|
// Kept in lockstep with packages/cli/package.json by check:publish's version-consistency gate.
|
|
22
|
-
const VERSION = "1.
|
|
22
|
+
const VERSION = "1.13.0";
|
|
23
23
|
const SERVER_INFO = { name: "nifra-docs", version: VERSION };
|
|
24
24
|
const DOCS_HEALTH = "nifra docs MCP — POST JSON-RPC 2.0 here (methods: initialize, tools/list, tools/call). Tools: nifra_docs, nifra_example.";
|
|
25
25
|
/** The two project-independent tools, reading the package's bundled corpus from disk (CLI use). */
|
package/docs/types.json
CHANGED
|
@@ -1573,6 +1573,27 @@
|
|
|
1573
1573
|
"signature": "export declare const commonSecretPatterns: ReadonlyArray<RegExp>;",
|
|
1574
1574
|
"doc": "/**\n * A conservative, high-signal set of patterns for {@link RedactOptions.valuePatterns} — opt in by\n * passing it (or a subset) to `jsonLogger`/`redactLogFields`. Covers bearer tokens, JWTs, emails, and a\n * few well-known key formats (Stripe, GitHub, AWS access-key ids). Chosen to minimize false positives;\n * add your own (e.g. internal id formats) as needed. Every pattern is global so all matches are scrubbed.\n */"
|
|
1575
1575
|
},
|
|
1576
|
+
{
|
|
1577
|
+
"name": "compareRoutePatternSpecificity",
|
|
1578
|
+
"kind": "function",
|
|
1579
|
+
"package": "@nifrajs/core",
|
|
1580
|
+
"signature": "export declare function compareRoutePatternSpecificity(left: CompiledRoutePattern, right: CompiledRoutePattern): number;",
|
|
1581
|
+
"doc": "/** Core precedence: static > param > wildcard at the first differing segment, independent of order. */"
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
"name": "CompiledRoutePattern",
|
|
1585
|
+
"kind": "interface",
|
|
1586
|
+
"package": "@nifrajs/core",
|
|
1587
|
+
"signature": "export interface CompiledRoutePattern {\n readonly [COMPILED_ROUTE_PATTERN]: true;\n readonly pattern: string;\n readonly segments: readonly RoutePatternSegment[];\n readonly paramNames: readonly string[];\n}",
|
|
1588
|
+
"doc": "/**\n * Compiled route grammar shared by runtime routers, browser navigation, mocks, and adapters.\n *\n * The result, its two arrays, and every segment are frozen because consumers share one instance. In\n * particular, a segment must not diverge from the lazily cached regex after first match. The measured\n * sub-microsecond cost per route is paid only at registration and preserves that runtime invariant.\n */"
|
|
1589
|
+
},
|
|
1590
|
+
{
|
|
1591
|
+
"name": "compileRoutePattern",
|
|
1592
|
+
"kind": "function",
|
|
1593
|
+
"package": "@nifrajs/core",
|
|
1594
|
+
"signature": "export declare function compileRoutePattern(pattern: string): CompiledRoutePattern;",
|
|
1595
|
+
"doc": "/** Parse and validate Nifra's strict route grammar once. Trailing slashes remain significant. */"
|
|
1596
|
+
},
|
|
1576
1597
|
{
|
|
1577
1598
|
"name": "compileVue",
|
|
1578
1599
|
"kind": "function",
|
|
@@ -2348,6 +2369,13 @@
|
|
|
2348
2369
|
"signature": "export interface DecodedImage {\n /** RGBA bytes, length `width * height * 4`. */\n readonly data: Uint8Array;\n readonly width: number;\n readonly height: number;\n}",
|
|
2349
2370
|
"doc": "/** A decoded image: RGBA pixels + dimensions — the lingua franca of WASM codecs (jSquash, Photon, …). */"
|
|
2350
2371
|
},
|
|
2372
|
+
{
|
|
2373
|
+
"name": "decodeRouteParams",
|
|
2374
|
+
"kind": "function",
|
|
2375
|
+
"package": "@nifrajs/core",
|
|
2376
|
+
"signature": "export declare function decodeRouteParams(raw: Record<string, string>): Record<string, string> | null;",
|
|
2377
|
+
"doc": "/** Decode router captures under one rule. Plain values take the zero-allocation path; malformed\n * escapes return `null`, allowing HTTP to emit 400 while client navigation declines the match. */"
|
|
2378
|
+
},
|
|
2351
2379
|
{
|
|
2352
2380
|
"name": "DEFAULT_ASSURANCE_CONFIG",
|
|
2353
2381
|
"kind": "const",
|
|
@@ -3633,8 +3661,8 @@
|
|
|
3633
3661
|
"name": "HandlersFor",
|
|
3634
3662
|
"kind": "type",
|
|
3635
3663
|
"package": "@nifrajs/core",
|
|
3636
|
-
"signature": "export type HandlersFor<C extends ContractShape
|
|
3637
|
-
"doc": "
|
|
3664
|
+
"signature": "export type HandlersFor<C extends ContractShape, Ctx = NonNullable<unknown>> = {\n [K in keyof C]: (context: ContextForOp<C[K]> & Ctx) => MaybePromise<HandlerReturnForOp<C[K]>>;\n};",
|
|
3665
|
+
"doc": "/**\n * The handlers `implement` requires: one per operation, typed from the op's input + response contract,\n * intersected with the host app's accumulated `derive`/`decorate` context - the same\n * `Context & Ctx` an inline {@link Handler} receives, so a handler graduates either way unchanged.\n */"
|
|
3638
3666
|
},
|
|
3639
3667
|
{
|
|
3640
3668
|
"name": "hash8",
|
|
@@ -4040,8 +4068,8 @@
|
|
|
4040
4068
|
"name": "implement",
|
|
4041
4069
|
"kind": "function",
|
|
4042
4070
|
"package": "@nifrajs/core",
|
|
4043
|
-
"signature": "export declare function implement<const C extends ContractShape, H extends HandlersFor<C>>(contract: C, handlers: H): Server<RegistryFromImpl<C, H
|
|
4044
|
-
"doc": "/**\n * Bind handlers to a contract, producing a real {@link Server} you can `.listen()`\n * or `.fetch()`. Each op is registered through the same path as the inline\n * builder, so the result is identical to writing the routes inline — handlers\n * lift over **unchanged** (\"graduation\"), and body/query schemas validate at the\n * request boundary exactly as in inline mode.\n */"
|
|
4071
|
+
"signature": "export declare function implement<const C extends ContractShape, H extends HandlersFor<C, Ctx>, R extends Registry = EmptyRegistry, Ctx = NonNullable<unknown>>(contract: C, handlers: H, app?: Server<R, Ctx>): Server<R & RegistryFromImpl<C, H, Ctx>, Ctx>;",
|
|
4072
|
+
"doc": "/**\n * Bind handlers to a contract, producing a real {@link Server} you can `.listen()`\n * or `.fetch()`. Each op is registered through the same path as the inline\n * builder, so the result is identical to writing the routes inline — handlers\n * lift over **unchanged** (\"graduation\"), and body/query schemas validate at the\n * request boundary exactly as in inline mode.\n *\n * Pass a pre-configured `app` to give the contract's routes a middleware chain. A route captures the\n * server's `derive`/`decorate`/assurance chain **at registration**, so anything applied to the\n * returned server afterwards reaches the contract's routes not at all - the app must already carry it:\n *\n * ```ts\n * const app = implement(contract, handlers, server().use(auth).derive(sessionOf))\n * ```\n *\n * That is also the seam that lets `nifra assure` prove rather than merely classify a contract-first\n * app: the plugin that installs the enforcement is what declares the evidence\n * ({@link withRouteAssurance}), and only a plugin installed *before* registration is captured. Handlers\n * then see the app's `Ctx`, and the returned server keeps any routes the app already had.\n */"
|
|
4045
4073
|
},
|
|
4046
4074
|
{
|
|
4047
4075
|
"name": "ImportChange",
|
|
@@ -4888,6 +4916,13 @@
|
|
|
4888
4916
|
"signature": "export declare function matchesAssuranceSelector(route: Pick<ReflectedRoute, \"method\" | \"path\" | \"tool\">, selector: AssuranceRouteSelector): boolean;",
|
|
4889
4917
|
"doc": "/** Shared selector semantics for policy rules and framework adapters. */"
|
|
4890
4918
|
},
|
|
4919
|
+
{
|
|
4920
|
+
"name": "matchRoutePattern",
|
|
4921
|
+
"kind": "function",
|
|
4922
|
+
"package": "@nifrajs/core",
|
|
4923
|
+
"signature": "export declare function matchRoutePattern(compiled: CompiledRoutePattern, pathname: string): RoutePatternMatch;",
|
|
4924
|
+
"doc": "/** Match one compiled pattern and return decoded captures. The caller decides cross-pattern order. */"
|
|
4925
|
+
},
|
|
4891
4926
|
{
|
|
4892
4927
|
"name": "MAX_COST_AXES",
|
|
4893
4928
|
"kind": "const",
|
|
@@ -6728,7 +6763,7 @@
|
|
|
6728
6763
|
"name": "RegistryFromImpl",
|
|
6729
6764
|
"kind": "type",
|
|
6730
6765
|
"package": "@nifrajs/core",
|
|
6731
|
-
"signature": "export type RegistryFromImpl<C extends ContractShape, H extends HandlersFor<C>> = {\n [P in C[keyof C][\"path\"]]: {\n [K in keyof C as C[K][\"path\"] extends P ? C[K][\"method\"] : never]: {\n readonly params: Params<C[K][\"path\"]>;\n readonly query: OpQuery<C[K]>;\n readonly body: OpBody<C[K]>;\n readonly output: C[K] extends {\n response: infer R extends StandardSchemaV1;\n } ? InferOutput<R> : H[K] extends AnyFn ? OutputOf<H[K]> : unknown;\n readonly errors: OpErrors<C[K]>;\n readonly sse: never;\n };\n };\n};",
|
|
6766
|
+
"signature": "export type RegistryFromImpl<C extends ContractShape, H extends HandlersFor<C, Ctx>, Ctx = NonNullable<unknown>> = {\n [P in C[keyof C][\"path\"]]: {\n [K in keyof C as C[K][\"path\"] extends P ? C[K][\"method\"] : never]: {\n readonly params: Params<C[K][\"path\"]>;\n readonly query: OpQuery<C[K]>;\n readonly body: OpBody<C[K]>;\n readonly output: C[K] extends {\n response: infer R extends StandardSchemaV1;\n } ? InferOutput<R> : H[K] extends AnyFn ? OutputOf<H[K]> : unknown;\n readonly errors: OpErrors<C[K]>;\n readonly sse: never;\n };\n };\n};",
|
|
6732
6767
|
"doc": "/**\n * The registry produced by `implement`: input from the contract op; `output` is the declared `response`\n * contract when present (it wins — exactly as in the inline path), else the bound HANDLER's return — so\n * the implemented server stays route-for-route identical to the equivalent inline server (the\n * mode-conformance guarantee), and a contract-typed client and a `typeof app`-typed client agree.\n */"
|
|
6733
6768
|
},
|
|
6734
6769
|
{
|
|
@@ -7341,11 +7376,23 @@
|
|
|
7341
7376
|
"signature": "export interface RoutePattern {\n readonly routeId: string;\n readonly pattern: string;\n}",
|
|
7342
7377
|
"doc": "/** A route id paired with its nifra pattern (e.g. `\":id\"` segments) — the matcher input. */"
|
|
7343
7378
|
},
|
|
7379
|
+
{
|
|
7380
|
+
"name": "RoutePatternMatch",
|
|
7381
|
+
"kind": "type",
|
|
7382
|
+
"package": "@nifrajs/core",
|
|
7383
|
+
"signature": "export type RoutePatternMatch = {\n readonly matched: true;\n readonly params: Record<string, string>;\n} | {\n readonly matched: false;\n readonly reason: \"not-found\" | \"malformed\";\n};"
|
|
7384
|
+
},
|
|
7385
|
+
{
|
|
7386
|
+
"name": "RoutePatternSegment",
|
|
7387
|
+
"kind": "type",
|
|
7388
|
+
"package": "@nifrajs/core",
|
|
7389
|
+
"signature": "export type RoutePatternSegment = {\n readonly kind: \"static\";\n readonly value: string;\n} | {\n readonly kind: \"param\";\n readonly name: string;\n} | {\n readonly kind: \"wildcard\";\n readonly name: string;\n};"
|
|
7390
|
+
},
|
|
7344
7391
|
{
|
|
7345
7392
|
"name": "Router",
|
|
7346
7393
|
"kind": "class",
|
|
7347
7394
|
"package": "@nifrajs/core",
|
|
7348
|
-
"signature": "export declare class Router<T> {\n private readonly root;\n /**\n * Fast path: fully-static paths (no `:param`/`*`) resolve in a single map\n * lookup keyed by the full path, skipping the trie walk entirely. Values are\n * the same `Terminal` objects held in the trie, so adding a method later\n * updates both views at once.\n */\n private readonly staticRoutes;\n /**\n * Scratch storage for param/wildcard captures during a synchronous trie walk. `find()` copies the\n * values into the returned params object before clearing this array, so returned matches never share\n * mutable state. Kept per Router instance, not module-global, to avoid cross-app coupling.\n */\n private readonly paramValuesScratch;\n constructor();\n /**\n * Register a payload for `method` + `path`. Throws {@link RouteConfigError}\n * (boot-time, L2) on a duplicate route, a malformed pattern, or conflicting\n * parameter names for the same path shape.\n */\n add(method: Method,
|
|
7395
|
+
"signature": "export declare class Router<T> {\n private readonly root;\n /**\n * Fast path: fully-static paths (no `:param`/`*`) resolve in a single map\n * lookup keyed by the full path, skipping the trie walk entirely. Values are\n * the same `Terminal` objects held in the trie, so adding a method later\n * updates both views at once.\n */\n private readonly staticRoutes;\n /**\n * Scratch storage for param/wildcard captures during a synchronous trie walk. `find()` copies the\n * values into the returned params object before clearing this array, so returned matches never share\n * mutable state. Kept per Router instance, not module-global, to avoid cross-app coupling.\n */\n private readonly paramValuesScratch;\n constructor();\n /**\n * Register a payload for `method` + `path`. Throws {@link RouteConfigError}\n * (boot-time, L2) on a duplicate route, a malformed pattern, or conflicting\n * parameter names for the same path shape.\n */\n add(method: Method, pattern: string | CompiledRoutePattern, payload: T): void;\n /**\n * Resolve `method` + `path`. Tolerant of a missing leading slash and of\n * method casing. Never throws.\n */\n find(method: string, path: string): RouterMatch<T>;\n private findDynamic;\n private maybeCacheDynamicMatch;\n}",
|
|
7349
7396
|
"doc": "/**\n * Radix-style segment trie router. Matching precedence is static > param >\n * wildcard. Parameter/wildcard values are returned RAW (not percent-decoded);\n * the server boundary decodes and rejects malformed encodings with a 400,\n * keeping this layer pure and allocation-light.\n *\n * @typeParam T - the payload stored per (method, path); a route descriptor in\n * practice, but the router is agnostic to it.\n */"
|
|
7350
7397
|
},
|
|
7351
7398
|
{
|
|
@@ -8021,7 +8068,7 @@
|
|
|
8021
8068
|
"name": "Server",
|
|
8022
8069
|
"kind": "class",
|
|
8023
8070
|
"package": "@nifrajs/core",
|
|
8024
|
-
"signature": "export declare class Server<R extends Registry = EmptyRegistry, Ctx = EmptyContext> {\n private readonly router;\n /** WebSocket routes, matched separately at upgrade time (a GET + `Upgrade: websocket`). */\n private readonly wsRouter;\n private wsRouteCount;\n /** In-process pub/sub backing `ws.subscribe(topic)` + `app.publish(topic, data)` (single-instance).\n * Created by the first `app.ws()` via the `@nifrajs/core/ws` runtime — `undefined` until then, so a\n * no-WebSocket app never constructs (or bundles) it. */\n private topics;\n private readonly routeList;\n private readonly maxBodyBytes;\n private readonly wsMaxPayloadBytes;\n private readonly requestTimeoutMs;\n private readonly acceptInboundDeadlines;\n private readonly maxInboundDeadlineMs;\n private readonly deadlineAdmissionOptions;\n private readonly gracefulSignals;\n /** Capacity-admission gate; `undefined` = off (the request path pays nothing). */\n private readonly capacityGate;\n private readonly onCapabilityUse;\n /** Effect-ledger defaults pinned at construction; per-route `ledgered` copies add route identity. */\n private readonly effectLedger;\n /** App-wide idempotency store (explicit option, else a lazily-created in-process default). */\n private readonly configuredIdempotencyStore;\n private lazyIdempotencyStore;\n private readonly logger;\n /** App-wide validation-error fallback; a route's own `schema.onValidationError` takes precedence. */\n private readonly defaultOnValidationError?;\n private bunServer;\n private readonly derives;\n private readonly decorations;\n private readonly beforeHandleHooks;\n private readonly afterHandleHooks;\n private readonly onErrorHooks;\n private readonly aroundHooks;\n private readonly onRequestHooks;\n private readonly onResponseHooks;\n private readonly onResponseFinalizedHooks;\n private readonly responseRequests;\n /** Names of plugins/middleware already applied via `use` — for idempotent dedupe. */\n private readonly appliedPlugins;\n /** Order-scoped evidence captured by routes registered after an assured plugin. */\n private readonly activeAssurance;\n /** App-wide evidence from global hooks; applies retroactively to every route. */\n private readonly globalAssurance;\n /** App-declared MCP resources / prompts (via {@link resource} / {@link prompt}), read by `nifra mcp`. */\n private readonly mcpResourceList;\n private readonly mcpPromptList;\n /**\n * Every registered route's raw router entry + descriptor, in order — the replay source for\n * {@link merge}. The entry already carries the chains captured at registration (derives,\n * decorations, before/after/around/onError), so a merged route behaves exactly as it did on\n * the server that defined it.\n */\n private readonly rawEntries;\n constructor(options?: ServerOptions);\n /** Add a per-request, computed context extension for subsequent routes. */\n derive<D extends object>(fn: (context: Context & Ctx) => MaybePromise<D>): Server<R, Ctx & D>;\n /** Add a static context value for subsequent routes. */\n decorate<const K extends string, V>(key: K, value: V): Server<R, Ctx & Record<K, V>>;\n /**\n * Run before routing on the raw request. Return a `Response` to short-circuit, or a replacement\n * `Request` to continue routing with a rewritten method/URL/headers. Global.\n */\n onRequest(fn: (req: Request, platform?: Platform<EnvOf<Ctx>>) => MaybePromise<OnRequestResult>): this;\n /** Run after validation, before the handler; a non-`undefined` return short-circuits. Order-scoped. */\n beforeHandle(fn: (context: Context & Ctx) => MaybePromise<unknown>): this;\n /**\n * Wrap the matched route lifecycle for subsequent routes. This is intentionally generic over the\n * route output, so wrappers like async context storage do not force Node's direct JSON path through\n * a Web `Response`. The first registered wrapper is outermost.\n */\n around(fn: <T>(context: Context & Ctx, next: () => MaybePromise<T>) => MaybePromise<T>): this;\n /** Transform the handler's result before it is serialized. Order-scoped. */\n afterHandle(fn: (result: unknown, context: Context & Ctx) => MaybePromise<unknown>): this;\n /** Handle a thrown error; a non-`undefined` return becomes the response (else the default 500). Order-scoped. */\n onError(fn: (error: unknown, context: Context & Ctx) => MaybePromise<unknown>): this;\n /** Transform every outgoing response — success, error, 404, 405, short-circuit. Global. */\n onResponse(fn: (response: Response, req: Request) => MaybePromise<Response>): this;\n /** Observe the terminal response after all transformations. Observers are ordered and fail-open. */\n onResponseFinalized(fn: (outcome: ResponseFinalization, req: Request) => MaybePromise<void>): this;\n /**\n * Apply a type-**identity** plugin ({@link IdentityPlugin}, from {@link defineIdentityPlugin}) — it\n * registers routes/hooks but doesn't change the types, so this returns `this` with the route registry\n * and context fully intact. This overload exists specifically so a *named* identity plugin (e.g.\n * `@nifrajs/better-auth`) threads the registry: its `& { pluginName }` intersection would otherwise\n * defeat the generic inference of the transforming overload below and collapse the result to `any`.\n */\n use(plugin: IdentityPlugin): this;\n /**\n * Apply a **plugin function** — `(app) => app`, typically built with {@link definePlugin}. It's\n * called with `this` and its result is returned, so an inline plugin's `derive`/`decorate` thread\n * the added context to handlers defined after `use` (the overload is generic over the concrete\n * `this`). A named plugin already applied is skipped (idempotent dedupe).\n */\n use<Out extends AnyServer>(plugin: (app: this) => Out): Out;\n /**\n * Apply a {@link Middleware} bundle — wire each hook it provides to its lifecycle point. Returns\n * `this` (no context-type merging); call it before the routes its `beforeHandle`/`afterHandle`\n * should cover (those are order-scoped; `onRequest`/`onResponse` are global). A named bundle already\n * applied is skipped (idempotent).\n */\n use(mw: Middleware): this;\n get<Path extends string, S extends RouteSchema, H extends Handler<Path, S, Ctx>>(path: Path, schema: S, handler: H): Server<AddRoute<R, \"GET\", Path, RouteInfoFor<Path, S, OutputOf<H>>>, Ctx>;\n get<Path extends string, H extends Handler<Path, RouteSchema, Ctx>>(path: Path, handler: H): Server<AddRoute<R, \"GET\", Path, RouteInfoFor<Path, Record<never, never>, OutputOf<H>>>, Ctx>;\n /**\n * Register a **typed SSE route** — a GET endpoint streaming `text/event-stream` whose event\n * payloads are contracted by `schema.sse`. The handler receives the validated context plus a\n * {@link TypedSSEStream}: `stream.send(event)` is compile-time-checked against the schema and\n * JSON-serialized into the SSE `data:` field. The typed client sees the marker and grows a\n * `.subscribe(onEvent)` for the route with the same payload type — end-to-end typed streaming.\n *\n * const app = server().sse(\"/feed\", { sse: t.object({ id: t.integer(), title: t.string() }) },\n * async (c, stream) => {\n * stream.send({ id: 1, title: \"hello\" }) // typed\n * await waitForDisconnect(stream.signal)\n * },\n * { keepAlive: 15_000 })\n *\n * // client: const off = api.feed.subscribe((post) => console.log(post.title))\n *\n * `init` passes through to the underlying {@link sse} helper (`keepAlive`, extra headers). The\n * connection closes when the handler resolves, `stream.close()` runs, or the client disconnects\n * (`stream.signal`). Query/body schemas validate exactly as on any other route.\n */\n sse<Path extends string, S extends RouteSchema & {\n sse: StandardSchemaV1;\n }>(path: Path, schema: S, run: (context: Context<Path, S> & Ctx, stream: TypedSSEStream<InferOutput<S[\"sse\"]>>) => void | Promise<void>, init?: SSEInit): Server<AddRoute<R, \"GET\", Path, RouteInfoFor<Path, S, Response>>, Ctx>;\n post<Path extends string, S extends RouteSchema, H extends Handler<Path, S, Ctx>>(path: Path, schema: S, handler: H): Server<AddRoute<R, \"POST\", Path, RouteInfoFor<Path, S, OutputOf<H>>>, Ctx>;\n post<Path extends string, H extends Handler<Path, RouteSchema, Ctx>>(path: Path, handler: H): Server<AddRoute<R, \"POST\", Path, RouteInfoFor<Path, Record<never, never>, OutputOf<H>>>, Ctx>;\n put<Path extends string, S extends RouteSchema, H extends Handler<Path, S, Ctx>>(path: Path, schema: S, handler: H): Server<AddRoute<R, \"PUT\", Path, RouteInfoFor<Path, S, OutputOf<H>>>, Ctx>;\n put<Path extends string, H extends Handler<Path, RouteSchema, Ctx>>(path: Path, handler: H): Server<AddRoute<R, \"PUT\", Path, RouteInfoFor<Path, Record<never, never>, OutputOf<H>>>, Ctx>;\n patch<Path extends string, S extends RouteSchema, H extends Handler<Path, S, Ctx>>(path: Path, schema: S, handler: H): Server<AddRoute<R, \"PATCH\", Path, RouteInfoFor<Path, S, OutputOf<H>>>, Ctx>;\n patch<Path extends string, H extends Handler<Path, RouteSchema, Ctx>>(path: Path, handler: H): Server<AddRoute<R, \"PATCH\", Path, RouteInfoFor<Path, Record<never, never>, OutputOf<H>>>, Ctx>;\n delete<Path extends string, S extends RouteSchema, H extends Handler<Path, S, Ctx>>(path: Path, schema: S, handler: H): Server<AddRoute<R, \"DELETE\", Path, RouteInfoFor<Path, S, OutputOf<H>>>, Ctx>;\n delete<Path extends string, H extends Handler<Path, RouteSchema, Ctx>>(path: Path, handler: H): Server<AddRoute<R, \"DELETE\", Path, RouteInfoFor<Path, Record<never, never>, OutputOf<H>>>, Ctx>;\n tool<Name extends string, S extends {\n description: string;\n input: StandardSchemaV1;\n output?: StandardSchemaV1;\n annotations?: ToolAnnotations;\n }, H extends (input: InferOutput<S[\"input\"]>, ctx: Context & Ctx) => MaybePromise<S[\"output\"] extends StandardSchemaV1 ? InferOutput<S[\"output\"]> : unknown>>(name: Name, config: S, handler: H): Server<AddRoute<R, \"POST\", `/_nifra/tool/${Name}`, RouteInfoFor<`/_nifra/tool/${Name}`, S[\"output\"] extends StandardSchemaV1 ? {\n body: S[\"input\"];\n response: S[\"output\"];\n } : {\n body: S[\"input\"];\n }, OutputOf<H>>>, Ctx>;\n /**\n * Declare an MCP **resource** — read-only data an agent can fetch through `nifra mcp` (app config, a\n * generated document, …). `read` runs in the app process, so capture whatever app state it needs in the\n * closure. `uri` is the MCP resource identifier (e.g. `\"myapp://config\"`). The sibling of {@link tool}\n * for the resource half of MCP.\n */\n resource(uri: string, config: {\n readonly name: string;\n readonly description?: string;\n readonly mimeType?: string;\n }, read: McpResourceDescriptor[\"read\"]): Server<R, Ctx>;\n /**\n * Declare an MCP **prompt** — a reusable prompt template an agent can fetch through `nifra mcp`.\n * `handler` receives the caller's arguments and returns the rendered messages.\n */\n prompt(name: string, config: {\n readonly description: string;\n readonly arguments?: readonly PromptArgument[];\n }, handler: McpPromptDescriptor[\"handler\"]): Server<R, Ctx>;\n /** The MCP resources declared via {@link resource} — enumerated by `nifra mcp`. */\n mcpResources(): readonly McpResourceDescriptor[];\n /** The MCP prompts declared via {@link prompt} — enumerated by `nifra mcp`. */\n mcpPrompts(): readonly McpPromptDescriptor[];\n /**\n * Register a **WebSocket** route. The connection upgrades on a `GET` to `path` carrying\n * `Upgrade: websocket`; the optional `handler.upgrade(c)` runs in the request context first and may\n * reject (return a `Response`) or seed per-connection `ws.data`. WebSockets are served by the\n * adapter (`listen()`, `@nifrajs/node`, `@nifrajs/deno`, `toFetchHandler`) — not by bare `app.fetch`, which\n * has no socket (a WS path through `app.fetch` is a normal HTTP response).\n *\n * app.ws(\"/chat\", { open: (ws) => ws.send(\"hi\"), message: (ws, data) => ws.send(data) })\n */\n ws<Data = unknown, Schema extends StandardSchemaV1 | undefined = undefined>(path: string, handler: WebSocketHandler<Data, EnvOf<Ctx>, Schema>): this;\n /**\n * Broadcast `data` to every WebSocket connection subscribed to `topic` (via `ws.subscribe(topic)`).\n * In-process and **single-instance** (see {@link TopicRegistry}) — a multi-instance deploy must bridge\n * an external fan-out (Redis, a Durable Object) to this. A no-op when nobody is subscribed.\n */\n publish(topic: string, data: string | ArrayBufferView | ArrayBuffer): void;\n private route;\n /**\n * Low-level route registration shared by the inline builder and `implement()`.\n * Captures the server's current `derive`/`decorate` chain into the route — this\n * is the \"compiled\", order-scoped per-route chain.\n */\n register(method: Method, path: string, schema: RouteSchema | undefined, handler: (context: never) => unknown): void;\n /** Resolve a route's declared idempotency into a pinned store + defaults, or `undefined` when off. */\n private resolveIdempotency;\n /** The app-wide idempotency store: the configured one, else a lazily-created shared in-process store. */\n private defaultIdempotencyStore;\n /**\n * Merge another server's routes into this one — the composition escape hatch for large apps.\n *\n * WHY: the fluent chain accumulates one type-alias level per route, and TypeScript resolves\n * that stack in one recursion — a single chain hits TS2589 at ~95 routes. Groups keep every\n * chain short: build each domain (`listings`, `agents`, …) as its own `server()` (its registry\n * resolves independently), then `app.merge(listings).merge(agents)` — each merge adds ONE level\n * regardless of group size. 300+ routes stay fully typed (see many-routes.test-d.ts). The\n * other escape hatch is contract-first `implement()`, whose registry is a single object type.\n *\n * Semantics: merged routes keep the chains captured where they were DEFINED — the group's\n * `derive`/`decorate`/`beforeHandle`/`afterHandle`/`onError`/`around` apply to its routes\n * exactly as they did standalone, so a group wires its own plugins. The group's request-level\n * hooks (`onRequest`/`onResponse`/`onResponseFinalized`) are appended to this server's. This\n * server's route-scoped chains do NOT retroactively wrap merged routes (order-scoped, like\n * routes registered before a `derive`). Fail closed: a path+method collision throws\n * `RouteConfigError` at merge time, and a group with WebSocket routes is refused (register\n * those on the parent).\n */\n merge<R2 extends Registry, Ctx2>(other: Server<R2, Ctx2>): Server<R & R2, Ctx>;\n /**\n * Enumerate the registered routes (method, path, input schemas), in registration\n * order. Powers `toOpenAPI` and other introspection; the router trie itself no\n * longer holds the original patterns.\n */\n routes(): ReadonlyArray<RouteDescriptor>;\n /**\n * Resolve a `Request` to a `Response` — the whole lifecycle, testable without a port. The\n * optional `platform` carries edge inputs (`env`, `waitUntil`); edge adapters pass it, and\n * Bun/Node/Deno omit it (then `c.env` is `undefined` and `c.waitUntil` runs fire-and-forget).\n */\n fetch(req: Request, platform?: Platform<EnvOf<Ctx>>): MaybePromise<Response>;\n private fetchSource;\n private fetchSourceInner;\n /** Web response path when Bun already matched the route. The lifecycle and response hooks remain\n * exactly the same as {@link fetchSource}; only portable URL scanning + trie lookup are skipped. */\n private fetchMatched;\n private fetchMatchedInner;\n /**\n * Run `produce` under the capacity gate: admit → run → release exactly once when the response is\n * produced (or the run throws). Only reached when {@link capacityGate} is set, so the off path pays\n * nothing. The slot is held for the duration of handler execution, not the streaming of the body —\n * capacity here bounds concurrent *work*, matching how in-flight is counted.\n */\n private admitGated;\n private runAdmitted;\n /**\n * Like {@link fetch}, but renders a plain-data result **without** building a Web `Response` — the\n * `@nifrajs/node` adapter serializes the returned primitives straight to the socket, skipping the undici\n * `Response` build + body drain (the bulk of the Node bridge cost, measured ≈4µs/req). A handler that\n * returns a `Response`, an error/short-circuit, or any registered `onResponse` hook falls back to the\n * full Web path (`{ kind: \"response\" }`), so behavior is identical — only the common JSON-data case is\n * faster. Same lifecycle as {@link fetch} (body cap, validation, hooks all run); only the final\n * render differs.\n */\n resolveNode(req: Request, platform?: Platform<EnvOf<Ctx>>): MaybePromise<NodeServeOutcome>;\n resolveNodeSource(source: RequestSource, platform?: Platform<EnvOf<Ctx>>): MaybePromise<NodeServeOutcome>;\n /**\n * Resolve a WebSocket upgrade — the seam every serving adapter uses. Returns `pass` (not a WS\n * upgrade for a registered route → handle as normal HTTP), `reject` (a WS route matched but\n * `upgrade()` rejected, or the path was malformed → return `response`), or `upgrade` (perform the\n * runtime upgrade, then dispatch the native socket's events to `handler`, seeding `ws.data` with\n * `data`). Runs the route's `upgrade(c)` guard in a real request context. Synchronous unless\n * `upgrade()` is async; a throw rejects with a flat 500 (no detail leaked).\n */\n resolveWebSocketUpgrade(req: Request, platform?: Platform<EnvOf<Ctx>>): MaybePromise<WebSocketUpgradeOutcome>;\n /** Bun `fetch` when WS routes exist: try a WS upgrade first, else run the normal HTTP lifecycle.\n * `undefined` ⇒ Bun owns the upgraded socket; a `Response` ⇒ a normal reply or a rejected upgrade.\n * (The socket dispatch itself lives in `ws-bun.ts`, loaded via `@nifrajs/core/ws`.) */\n private bunFetchWithWebSocket;\n /**\n * The shared lifecycle, generic over how the final value is rendered: `finalize` turns a handler's\n * result + `set` into the output `T` (`toResponse` → a Web `Response`; `toNodeOutcome` → node-direct\n * primitives), `wrapResponse` lifts an early/error `Response` into that same `T`, and `onTimeout`\n * produces the 503. The Web `fetch` and `resolveNode` are thin callers over this one routing +\n * context + lifecycle implementation — no duplication across the trust boundary.\n */\n private dispatch;\n /**\n * onRequest short-circuit path. Synchronous as long as every hook returns synchronously (the\n * common case — e.g. CORS returning `undefined` for a non-preflight request): an `async` version\n * here put EVERY request of any app with one onRequest hook onto the promise machinery, profiled\n * at ~13% of a realistic request. The first hook that returns a Promise hands the REMAINING\n * hooks to the async continuation; behavior is identical.\n */\n private runWithOnRequest;\n /** Async tail of {@link runWithOnRequest}: applies the first awaited hook's outcome, then runs\n * the remaining hooks (awaiting freely — we're already async here). */\n private continueOnRequest;\n private takeResponseRequest;\n /**\n * Route → build context → run. Synchronous through to the handler for a **bare** route\n * ({@link RouteEntry.bare}), so a sync handler produces its result with zero promise allocations;\n * routes with validation/hooks keep the full async {@link runLifecycle}, unchanged.\n */\n private routeAndRun;\n /** Run a route that has already been matched by the runtime or Nifra's portable router. */\n private runMatched;\n /**\n * Idempotency dedupe lane. Reads the `Idempotency-Key`, fingerprints the request, and consults the\n * store: a fresh key runs the handler (via {@link runMatchedLanes} with the body buffered) and stores\n * the response; a repeat key replays it without re-running; a key reused with a different body or an\n * in-flight duplicate is rejected. Every branch materializes a `Response`, then adapts to `T` via the\n * caller's `wrapResponse`, so it works on the Web fetch path and the Node-native outcome path alike.\n */\n private runIdempotent;\n /** Run a matched route through its selected execution lane (fused/bare/bodyOnly/queryOnly/lifecycle). */\n private runMatchedLanes;\n /**\n * Seal a ledgered request and deliver the sealed ledger to the sink. An empty ledger (declared\n * capabilities, none exercised) is not delivered — there is nothing to audit. This post-effect\n * ledger is observational: transactional/durable audit belongs in\n * the owned effect transaction, so a sink outage must not turn a successful effect into a retryable\n * 500 that can duplicate it.\n */\n private settleEffectLedger;\n /** The narrowest bare route: a syntactic `() => ...` handler cannot observe the context argument, so\n * successful requests can skip allocating `RequestContext`. Errors still allocate one for logging. */\n private runContextlessBare;\n private contextlessBareError;\n /**\n * The synchronous fast path for a {@link RouteEntry.bare} route: apply static decorations, call the\n * handler, render the result — **no `await`** unless the handler itself returns a promise. It mirrors\n * the bare slice of {@link runLifecycle} (which a bare route would otherwise no-op through) and shares\n * {@link logRequestError}; a bare route has no `onError` hooks, so error handling is fully synchronous\n * (a thrown `Response` is control flow; anything else is a logged flat 500). This is where nifra skips\n * the per-request async-frame tax — the same win codegen routers get, but without `eval`.\n */\n private runBare;\n /** Bare-route error rendering — identical to {@link runLifecycle}'s catch minus the (absent) onError\n * loop: a thrown `Response` is returned as deliberate control flow; anything else is logged + 500. */\n /**\n * Build a route's fused Web lane (see {@link RouteEntry.fusedWeb}). Composition happens once at\n * registration; the returned closure is what every request to the route runs. Behavior is\n * byte-identical to the generic `runBare`/`runContextlessBare` + `toResponse` pair — same\n * decoration order, same error routing (thrown `Response` = control flow; anything else logs and\n * 500s), same respond semantics (the lifecycle parity suite pins it).\n */\n private buildFusedWeb;\n private bareError;\n private runWithAround;\n private runAround;\n private runBodyOnly;\n /** Validate + run the handler for the bodyOnly path — shared by the inline fast path and the\n * streaming fallback. A method (not per-request closures) so the hot path allocates nothing\n * beyond the one `.then` continuation. */\n private finishBodyOnly;\n private executeHandler;\n private handleValidationErrorRecovery;\n private applyBodyValidation;\n private runQueryOnly;\n /** Validate-result → set `ctx.query` → run handler. A method (not a per-request closure), the\n * query analogue of {@link applyBodyValidation}. */\n private applyQueryValidation;\n /**\n * Thread the response through each global `onResponse` hook. Stays SYNCHRONOUS until a hook\n * actually returns a Promise — an `async` version forced a promise + microtask on EVERY response\n * of any app with an onResponse hook (cors/securityHeaders/etag/timing all use onResponse), the\n * same ~13%/req tax the onRequest walk was de-async'd to avoid. The first async hook hands the\n * rest to {@link continueOnResponse}.\n */\n private applyOnResponse;\n private applyOnResponseAndFinalize;\n private completeResponseFinalization;\n private failResponseFinalization;\n /** Notify terminal observers in order while isolating both sync and async failures. */\n private notifyResponseFinalized;\n /** Async tail of {@link applyOnResponse}: runs the remaining hooks once one has gone async. */\n private continueOnResponse;\n /**\n * Bound the response time. On timeout we abort `ctx.signal` (so cancellation-aware\n * handlers can bail) and return 503; the in-flight work keeps running but its\n * result is discarded — JS can't forcibly cancel a promise.\n */\n private withTimeout;\n /**\n * The post-match lifecycle: validate → derive → beforeHandle → handler → afterHandle, with onError.\n * Generic over the render: a success value goes through `finalize(result, set)` (a Web `Response`, or\n * node-direct primitives); an early/error `Response` (validation, thrown, 500) through `wrapResponse`.\n */\n private runLifecycle;\n private handleLifecycleError;\n /** Log an unhandled request error to the (redacting) logger — shared by {@link runLifecycle} and the\n * bare fast path ({@link bareError}) so both record the same fields. Never throws; never leaks. */\n private logRequestError;\n private readAndValidateBody;\n /**\n * Read the body as text, capped at `maxBodyBytes`. Rejects (`null`) on a\n * `Content-Length` over the cap *before* buffering, and aborts mid-stream once the\n * running byte count exceeds it — so a lying or absent length can't force us to\n * buffer an oversized payload.\n *\n * Fast path: when a non-chunked request carries a `Content-Length` within the cap,\n * a native `req.json()` is already bounded — under HTTP/1.1 + HTTP/2 framing the\n * runtime delivers at most `Content-Length` bytes — so we skip the manual stream\n * loop and a separate text decode. It trusts the wire\n * *framing*, not the header value: nifra only ever receives framed Requests from the\n * runtime's HTTP server, never a hand-built one with a mismatched length. Chunked or\n * length-less bodies fall through to the streaming byte-cap guard below.\n */\n private readBoundedJson;\n /** Compile portable route registrations into Bun's native route table. Apps with request-rewrite\n * hooks or WebSockets retain the single portable dispatcher because those features must run before\n * route selection/upgrade. Named wildcards also stay on the fallback until Bun exposes their raw\n * capture semantics; static and `:param` routes take the native lane. */\n private buildBunNativeRoutes;\n /**\n * Start a `Bun.serve` instance bound to `port` (use `0` for an ephemeral port).\n *\n * `reusePort` sets `SO_REUSEPORT` so **multiple processes can bind the same port** and the kernel\n * load-balances connections across them — the standard way to use every core (Bun is\n * single-threaded per process). Spawn one process per core, each calling\n * `app.listen(PORT, { reusePort: true })`; see `examples/cluster.ts`. Every process must opt in,\n * and all of them must be the same app. Linux balances ~evenly; macOS accepts the flag but may\n * favor one socket (fine for dev, measure on Linux for production numbers).\n *\n * `hostname` is the bind address, defaulting to Bun's `0.0.0.0` (every interface). Pass\n * `\"127.0.0.1\"` to bind loopback only - an admin surface, a sidecar, or anything that must not be\n * reachable off the box. Omitting it when you meant to restrict is a real exposure, so it is a\n * first-class option rather than something a caller has to drop down to `Bun.serve` for.\n */\n listen(port: number, options?: {\n readonly reusePort?: boolean;\n readonly hostname?: string;\n }): RunningServer;\n /**\n * Gracefully stop: wait for in-flight requests to finish (up to `drainMs`), then\n * issue a single terminal stop — graceful if everything drained, forced if\n * stragglers remain. Safe to call when not listening.\n *\n * The Bun semantics: poll `pendingRequests` (awaiting\n * `stop()`'s promise drops in-flight requests), and decide graceful-vs-forced in\n * ONE call (Bun can't escalate an already-graceful `stop()` to a forced close).\n * New connections may be accepted during the drain window; in a real deploy the\n * load balancer has already stopped routing here, and `drainMs` bounds it.\n */\n stop({ drainMs }?: {\n drainMs?: number;\n }): Promise<void>;\n private installSignalHandlers;\n}",
|
|
8071
|
+
"signature": "export declare class Server<R extends Registry = EmptyRegistry, Ctx = EmptyContext> {\n private readonly catalog;\n /** WebSocket routes, matched separately at upgrade time (a GET + `Upgrade: websocket`). */\n private readonly wsRouter;\n private wsRouteCount;\n /** In-process pub/sub backing `ws.subscribe(topic)` + `app.publish(topic, data)` (single-instance).\n * Created by the first `app.ws()` via the `@nifrajs/core/ws` runtime — `undefined` until then, so a\n * no-WebSocket app never constructs (or bundles) it. */\n private topics;\n private readonly maxBodyBytes;\n private readonly wsMaxPayloadBytes;\n private readonly requestTimeoutMs;\n private readonly acceptInboundDeadlines;\n private readonly maxInboundDeadlineMs;\n private readonly deadlineAdmissionOptions;\n private readonly gracefulSignals;\n /** Capacity-admission gate; `undefined` = off (the request path pays nothing). */\n private readonly capacityGate;\n private readonly onCapabilityUse;\n /** Effect-ledger defaults pinned at construction; per-route `ledgered` copies add route identity. */\n private readonly effectLedger;\n /** App-wide idempotency store (explicit option, else a lazily-created in-process default). */\n private readonly configuredIdempotencyStore;\n private lazyIdempotencyStore;\n private readonly logger;\n /** App-wide validation-error fallback; a route's own `schema.onValidationError` takes precedence. */\n private readonly defaultOnValidationError?;\n private bunServer;\n private sealed;\n private readonly derives;\n private readonly decorations;\n private readonly beforeHandleHooks;\n private readonly afterHandleHooks;\n private readonly onErrorHooks;\n private readonly aroundHooks;\n private readonly onRequestHooks;\n private readonly onResponseHooks;\n private readonly onResponseFinalizedHooks;\n private readonly responseRequests;\n /** Names of plugins/middleware already applied via `use` — for idempotent dedupe. */\n private readonly appliedPlugins;\n /** Order-scoped evidence captured by routes registered after an assured plugin. */\n private readonly activeAssurance;\n /** App-wide evidence from global hooks; applies retroactively to every route. */\n private readonly globalAssurance;\n /** App-declared MCP resources / prompts (via {@link resource} / {@link prompt}), read by `nifra mcp`. */\n private readonly mcpResourceList;\n private readonly mcpPromptList;\n constructor(options?: ServerOptions);\n private assertConfigurable;\n /** Add a per-request, computed context extension for subsequent routes. */\n derive<D extends object>(fn: (context: Context & Ctx) => MaybePromise<D>): Server<R, Ctx & D>;\n /** Add a static context value for subsequent routes. */\n decorate<const K extends string, V>(key: K, value: V): Server<R, Ctx & Record<K, V>>;\n /**\n * Run before routing on the raw request. Return a `Response` to short-circuit, or a replacement\n * `Request` to continue routing with a rewritten method/URL/headers. Global.\n */\n onRequest(fn: (req: Request, platform?: Platform<EnvOf<Ctx>>) => MaybePromise<OnRequestResult>): this;\n /** Run after validation, before the handler; a non-`undefined` return short-circuits. Order-scoped. */\n beforeHandle(fn: (context: Context & Ctx) => MaybePromise<unknown>): this;\n /**\n * Wrap the matched route lifecycle for subsequent routes. This is intentionally generic over the\n * route output, so wrappers like async context storage do not force Node's direct JSON path through\n * a Web `Response`. The first registered wrapper is outermost.\n */\n around(fn: <T>(context: Context & Ctx, next: () => MaybePromise<T>) => MaybePromise<T>): this;\n /** Transform the handler's result before it is serialized. Order-scoped. */\n afterHandle(fn: (result: unknown, context: Context & Ctx) => MaybePromise<unknown>): this;\n /** Handle a thrown error; a non-`undefined` return becomes the response (else the default 500). Order-scoped. */\n onError(fn: (error: unknown, context: Context & Ctx) => MaybePromise<unknown>): this;\n /** Transform every outgoing response — success, error, 404, 405, short-circuit. Global. */\n onResponse(fn: (response: Response, req: Request) => MaybePromise<Response>): this;\n /** Observe the terminal response after all transformations. Observers are ordered and fail-open. */\n onResponseFinalized(fn: (outcome: ResponseFinalization, req: Request) => MaybePromise<void>): this;\n /**\n * Apply a type-**identity** plugin ({@link IdentityPlugin}, from {@link defineIdentityPlugin}) — it\n * registers routes/hooks but doesn't change the types, so this returns `this` with the route registry\n * and context fully intact. This overload exists specifically so a *named* identity plugin (e.g.\n * `@nifrajs/better-auth`) threads the registry: its `& { pluginName }` intersection would otherwise\n * defeat the generic inference of the transforming overload below and collapse the result to `any`.\n */\n use(plugin: IdentityPlugin): this;\n /**\n * Apply a **plugin function** — `(app) => app`, typically built with {@link definePlugin}. It's\n * called with `this` and its result is returned, so an inline plugin's `derive`/`decorate` thread\n * the added context to handlers defined after `use` (the overload is generic over the concrete\n * `this`). A named plugin already applied is skipped (idempotent dedupe).\n */\n use<Out extends AnyServer>(plugin: (app: this) => Out): Out;\n /**\n * Apply a {@link Middleware} bundle — wire each hook it provides to its lifecycle point. Returns\n * `this` (no context-type merging); call it before the routes its `beforeHandle`/`afterHandle`\n * should cover (those are order-scoped; `onRequest`/`onResponse` are global). A named bundle already\n * applied is skipped (idempotent).\n */\n use(mw: Middleware): this;\n get<Path extends string, S extends RouteSchema, H extends Handler<Path, S, Ctx>>(path: Path, schema: S, handler: H): Server<AddRoute<R, \"GET\", Path, RouteInfoFor<Path, S, OutputOf<H>>>, Ctx>;\n get<Path extends string, H extends Handler<Path, RouteSchema, Ctx>>(path: Path, handler: H): Server<AddRoute<R, \"GET\", Path, RouteInfoFor<Path, Record<never, never>, OutputOf<H>>>, Ctx>;\n /**\n * Register a **typed SSE route** — a GET endpoint streaming `text/event-stream` whose event\n * payloads are contracted by `schema.sse`. The handler receives the validated context plus a\n * {@link TypedSSEStream}: `stream.send(event)` is compile-time-checked against the schema and\n * JSON-serialized into the SSE `data:` field. The typed client sees the marker and grows a\n * `.subscribe(onEvent)` for the route with the same payload type — end-to-end typed streaming.\n *\n * const app = server().sse(\"/feed\", { sse: t.object({ id: t.integer(), title: t.string() }) },\n * async (c, stream) => {\n * stream.send({ id: 1, title: \"hello\" }) // typed\n * await waitForDisconnect(stream.signal)\n * },\n * { keepAlive: 15_000 })\n *\n * // client: const off = api.feed.subscribe((post) => console.log(post.title))\n *\n * `init` passes through to the underlying {@link sse} helper (`keepAlive`, extra headers). The\n * connection closes when the handler resolves, `stream.close()` runs, or the client disconnects\n * (`stream.signal`). Query/body schemas validate exactly as on any other route.\n */\n sse<Path extends string, S extends RouteSchema & {\n sse: StandardSchemaV1;\n }>(path: Path, schema: S, run: (context: Context<Path, S> & Ctx, stream: TypedSSEStream<InferOutput<S[\"sse\"]>>) => void | Promise<void>, init?: SSEInit): Server<AddRoute<R, \"GET\", Path, RouteInfoFor<Path, S, Response>>, Ctx>;\n post<Path extends string, S extends RouteSchema, H extends Handler<Path, S, Ctx>>(path: Path, schema: S, handler: H): Server<AddRoute<R, \"POST\", Path, RouteInfoFor<Path, S, OutputOf<H>>>, Ctx>;\n post<Path extends string, H extends Handler<Path, RouteSchema, Ctx>>(path: Path, handler: H): Server<AddRoute<R, \"POST\", Path, RouteInfoFor<Path, Record<never, never>, OutputOf<H>>>, Ctx>;\n put<Path extends string, S extends RouteSchema, H extends Handler<Path, S, Ctx>>(path: Path, schema: S, handler: H): Server<AddRoute<R, \"PUT\", Path, RouteInfoFor<Path, S, OutputOf<H>>>, Ctx>;\n put<Path extends string, H extends Handler<Path, RouteSchema, Ctx>>(path: Path, handler: H): Server<AddRoute<R, \"PUT\", Path, RouteInfoFor<Path, Record<never, never>, OutputOf<H>>>, Ctx>;\n patch<Path extends string, S extends RouteSchema, H extends Handler<Path, S, Ctx>>(path: Path, schema: S, handler: H): Server<AddRoute<R, \"PATCH\", Path, RouteInfoFor<Path, S, OutputOf<H>>>, Ctx>;\n patch<Path extends string, H extends Handler<Path, RouteSchema, Ctx>>(path: Path, handler: H): Server<AddRoute<R, \"PATCH\", Path, RouteInfoFor<Path, Record<never, never>, OutputOf<H>>>, Ctx>;\n delete<Path extends string, S extends RouteSchema, H extends Handler<Path, S, Ctx>>(path: Path, schema: S, handler: H): Server<AddRoute<R, \"DELETE\", Path, RouteInfoFor<Path, S, OutputOf<H>>>, Ctx>;\n delete<Path extends string, H extends Handler<Path, RouteSchema, Ctx>>(path: Path, handler: H): Server<AddRoute<R, \"DELETE\", Path, RouteInfoFor<Path, Record<never, never>, OutputOf<H>>>, Ctx>;\n tool<Name extends string, S extends {\n description: string;\n input: StandardSchemaV1;\n output?: StandardSchemaV1;\n annotations?: ToolAnnotations;\n }, H extends (input: InferOutput<S[\"input\"]>, ctx: Context & Ctx) => MaybePromise<S[\"output\"] extends StandardSchemaV1 ? InferOutput<S[\"output\"]> : unknown>>(name: Name, config: S, handler: H): Server<AddRoute<R, \"POST\", `/_nifra/tool/${Name}`, RouteInfoFor<`/_nifra/tool/${Name}`, S[\"output\"] extends StandardSchemaV1 ? {\n body: S[\"input\"];\n response: S[\"output\"];\n } : {\n body: S[\"input\"];\n }, OutputOf<H>>>, Ctx>;\n /**\n * Declare an MCP **resource** — read-only data an agent can fetch through `nifra mcp` (app config, a\n * generated document, …). `read` runs in the app process, so capture whatever app state it needs in the\n * closure. `uri` is the MCP resource identifier (e.g. `\"myapp://config\"`). The sibling of {@link tool}\n * for the resource half of MCP.\n */\n resource(uri: string, config: {\n readonly name: string;\n readonly description?: string;\n readonly mimeType?: string;\n }, read: McpResourceDescriptor[\"read\"]): Server<R, Ctx>;\n /**\n * Declare an MCP **prompt** — a reusable prompt template an agent can fetch through `nifra mcp`.\n * `handler` receives the caller's arguments and returns the rendered messages.\n */\n prompt(name: string, config: {\n readonly description: string;\n readonly arguments?: readonly PromptArgument[];\n }, handler: McpPromptDescriptor[\"handler\"]): Server<R, Ctx>;\n /** The MCP resources declared via {@link resource} — enumerated by `nifra mcp`. */\n mcpResources(): readonly McpResourceDescriptor[];\n /** The MCP prompts declared via {@link prompt} — enumerated by `nifra mcp`. */\n mcpPrompts(): readonly McpPromptDescriptor[];\n /**\n * Register a **WebSocket** route. The connection upgrades on a `GET` to `path` carrying\n * `Upgrade: websocket`; the optional `handler.upgrade(c)` runs in the request context first and may\n * reject (return a `Response`) or seed per-connection `ws.data`. WebSockets are served by the\n * adapter (`listen()`, `@nifrajs/node`, `@nifrajs/deno`, `toFetchHandler`) — not by bare `app.fetch`, which\n * has no socket (a WS path through `app.fetch` is a normal HTTP response).\n *\n * app.ws(\"/chat\", { open: (ws) => ws.send(\"hi\"), message: (ws, data) => ws.send(data) })\n */\n ws<Data = unknown, Schema extends StandardSchemaV1 | undefined = undefined>(path: string, handler: WebSocketHandler<Data, EnvOf<Ctx>, Schema>): this;\n /**\n * Broadcast `data` to every WebSocket connection subscribed to `topic` (via `ws.subscribe(topic)`).\n * In-process and **single-instance** (see {@link TopicRegistry}) — a multi-instance deploy must bridge\n * an external fan-out (Redis, a Durable Object) to this. A no-op when nobody is subscribed.\n */\n publish(topic: string, data: string | ArrayBufferView | ArrayBuffer): void;\n private route;\n /**\n * Low-level route registration shared by the inline builder and `implement()`.\n * Captures the server's current `derive`/`decorate` chain into the route — this\n * is the \"compiled\", order-scoped per-route chain.\n */\n register(method: Method, path: string, schema: RouteSchema | undefined, handler: (context: never) => unknown): void;\n /** Register a contract/group route batch atomically. Every route captures the same current chain it\n * would capture through {@link register}; no route becomes visible unless the full batch validates. */\n registerBatch(routes: readonly {\n readonly method: Method;\n readonly path: string;\n readonly schema: RouteSchema | undefined;\n readonly handler: (context: never) => unknown;\n }[]): void;\n private prepareRoute;\n /** Collapse route-invariant lifecycle decisions into one runner at registration. The request path\n * performs no eligibility ladder: it supplies request state to this already-selected plan. */\n private compileExecutionPlan;\n /** Resolve a route's declared idempotency into a pinned store + defaults, or `undefined` when off. */\n private resolveIdempotency;\n /** The app-wide idempotency store: the configured one, else a lazily-created shared in-process store. */\n private defaultIdempotencyStore;\n /**\n * Merge another server's routes into this one — the composition escape hatch for large apps.\n *\n * WHY: the fluent chain accumulates one type-alias level per route, and TypeScript resolves\n * that stack in one recursion — a single chain hits TS2589 at ~95 routes. Groups keep every\n * chain short: build each domain (`listings`, `agents`, …) as its own `server()` (its registry\n * resolves independently), then `app.merge(listings).merge(agents)` — each merge adds ONE level\n * regardless of group size. 300+ routes stay fully typed (see many-routes.test-d.ts). The\n * other escape hatch is contract-first `implement()`, whose registry is a single object type.\n *\n * Semantics: merged routes keep the chains captured where they were DEFINED — the group's\n * `derive`/`decorate`/`beforeHandle`/`afterHandle`/`onError`/`around` apply to its routes\n * exactly as they did standalone, so a group wires its own plugins. The group's request-level\n * hooks (`onRequest`/`onResponse`/`onResponseFinalized`) are appended to this server's. This\n * server's route-scoped chains do NOT retroactively wrap merged routes (order-scoped, like\n * routes registered before a `derive`). Fail closed: a path+method collision throws\n * `RouteConfigError` at merge time, and a group with WebSocket routes is refused (register\n * those on the parent).\n */\n merge<R2 extends Registry, Ctx2>(other: Server<R2, Ctx2>): Server<R & R2, Ctx>;\n /** A fused renderer closes over runtime services to keep its seven-argument JSC fast path. Merging\n * rebinds that closure once to the executing server; generic plans already receive the runtime. */\n private bindFusedRuntime;\n /**\n * Enumerate the registered routes (method, path, input schemas), in registration\n * order. Powers `toOpenAPI` and other introspection; the router trie itself no\n * longer holds the original patterns.\n */\n routes(): ReadonlyArray<RouteDescriptor>;\n /**\n * Resolve a `Request` to a `Response` — the whole lifecycle, testable without a port. The\n * optional `platform` carries edge inputs (`env`, `waitUntil`); edge adapters pass it, and\n * Bun/Node/Deno omit it (then `c.env` is `undefined` and `c.waitUntil` runs fire-and-forget).\n */\n fetch(req: Request, platform?: Platform<EnvOf<Ctx>>): MaybePromise<Response>;\n private fetchSource;\n private fetchSourceInner;\n /** Web response path when Bun already matched the route. The lifecycle and response hooks remain\n * exactly the same as {@link fetchSource}; only portable URL scanning + trie lookup are skipped. */\n private fetchMatched;\n private fetchMatchedInner;\n /**\n * Run `produce` under the capacity gate: admit → run → release exactly once when the response is\n * produced (or the run throws). Only reached when {@link capacityGate} is set, so the off path pays\n * nothing. The slot is held for the duration of handler execution, not the streaming of the body —\n * capacity here bounds concurrent *work*, matching how in-flight is counted.\n */\n private admitGated;\n private runAdmitted;\n /**\n * Like {@link fetch}, but renders a plain-data result **without** building a Web `Response` — the\n * `@nifrajs/node` adapter serializes the returned primitives straight to the socket, skipping the undici\n * `Response` build + body drain (the bulk of the Node bridge cost, measured ≈4µs/req). A handler that\n * returns a `Response`, an error/short-circuit, or any registered `onResponse` hook falls back to the\n * full Web path (`{ kind: \"response\" }`), so behavior is identical — only the common JSON-data case is\n * faster. Same lifecycle as {@link fetch} (body cap, validation, hooks all run); only the final\n * render differs.\n */\n resolveNode(req: Request, platform?: Platform<EnvOf<Ctx>>): MaybePromise<NodeServeOutcome>;\n resolveNodeSource(source: RequestSource, platform?: Platform<EnvOf<Ctx>>): MaybePromise<NodeServeOutcome>;\n /**\n * Resolve a WebSocket upgrade — the seam every serving adapter uses. Returns `pass` (not a WS\n * upgrade for a registered route → handle as normal HTTP), `reject` (a WS route matched but\n * `upgrade()` rejected, or the path was malformed → return `response`), or `upgrade` (perform the\n * runtime upgrade, then dispatch the native socket's events to `handler`, seeding `ws.data` with\n * `data`). Runs the route's `upgrade(c)` guard in a real request context. Synchronous unless\n * `upgrade()` is async; a throw rejects with a flat 500 (no detail leaked).\n */\n resolveWebSocketUpgrade(req: Request, platform?: Platform<EnvOf<Ctx>>): MaybePromise<WebSocketUpgradeOutcome>;\n /** Bun `fetch` when WS routes exist: try a WS upgrade first, else run the normal HTTP lifecycle.\n * `undefined` ⇒ Bun owns the upgraded socket; a `Response` ⇒ a normal reply or a rejected upgrade.\n * (The socket dispatch itself lives in `ws-bun.ts`, loaded via `@nifrajs/core/ws`.) */\n private bunFetchWithWebSocket;\n /**\n * The shared lifecycle, generic over how the final value is rendered: `finalize` turns a handler's\n * result + `set` into the output `T` (`toResponse` → a Web `Response`; `toNodeOutcome` → node-direct\n * primitives), `wrapResponse` lifts an early/error `Response` into that same `T`, and `onTimeout`\n * produces the 503. The Web `fetch` and `resolveNode` are thin callers over this one routing +\n * context + lifecycle implementation — no duplication across the trust boundary.\n */\n private dispatch;\n /**\n * onRequest short-circuit path. Synchronous as long as every hook returns synchronously (the\n * common case — e.g. CORS returning `undefined` for a non-preflight request): an `async` version\n * here put EVERY request of any app with one onRequest hook onto the promise machinery, profiled\n * at ~13% of a realistic request. The first hook that returns a Promise hands the REMAINING\n * hooks to the async continuation; behavior is identical.\n */\n private runWithOnRequest;\n /** Async tail of {@link runWithOnRequest}: applies the first awaited hook's outcome, then runs\n * the remaining hooks (awaiting freely — we're already async here). */\n private continueOnRequest;\n private takeResponseRequest;\n /**\n * Route → build context → run. Synchronous through to the handler for a **bare** route\n * (selected by its compiled plan), so a sync handler produces its result with zero promise allocations;\n * routes with validation/hooks keep the full async {@link runLifecycle}, unchanged.\n */\n private routeAndRun;\n /** Run a route that has already been matched by the runtime or Nifra's portable router. */\n private runMatched;\n /**\n * Idempotency dedupe lane. Reads the `Idempotency-Key`, fingerprints the request, and consults the\n * store: a fresh key runs the handler (via {@link runMatchedLanes} with the body buffered) and stores\n * the response; a repeat key replays it without re-running; a key reused with a different body or an\n * in-flight duplicate is rejected. Every branch materializes a `Response`, then adapts to `T` via the\n * caller's `wrapResponse`, so it works on the Web fetch path and the Node-native outcome path alike.\n */\n private runIdempotent;\n /** Supply request-specific deadline state to the route's precompiled execution plan. */\n private runMatchedLanes;\n /**\n * Seal a ledgered request and deliver the sealed ledger to the sink. An empty ledger (declared\n * capabilities, none exercised) is not delivered — there is nothing to audit. This post-effect\n * ledger is observational: transactional/durable audit belongs in\n * the owned effect transaction, so a sink outage must not turn a successful effect into a retryable\n * 500 that can duplicate it.\n */\n private settleEffectLedger;\n /** The narrowest bare route: a syntactic `() => ...` handler cannot observe the context argument, so\n * successful requests can skip allocating `RequestContext`. Errors still allocate one for logging. */\n private runContextlessBare;\n private contextlessBareError;\n /**\n * The synchronous fast path selected by a route's execution plan: apply static decorations, call the\n * handler, render the result — **no `await`** unless the handler itself returns a promise. It mirrors\n * the bare slice of {@link runLifecycle} (which a bare route would otherwise no-op through) and shares\n * {@link logRequestError}; a bare route has no `onError` hooks, so error handling is fully synchronous\n * (a thrown `Response` is control flow; anything else is a logged flat 500). This is where nifra skips\n * the per-request async-frame tax — the same win codegen routers get, but without `eval`.\n */\n private runBare;\n /** Bare-route error rendering — identical to {@link runLifecycle}'s catch minus the (absent) onError\n * loop: a thrown `Response` is returned as deliberate control flow; anything else is logged + 500. */\n /**\n * Build a route's fused Web renderer. Composition happens once at\n * registration; the returned closure is what every request to the route runs. Behavior is\n * byte-identical to the generic `runBare`/`runContextlessBare` + `toResponse` pair — same\n * decoration order, same error routing (thrown `Response` = control flow; anything else logs and\n * 500s), same respond semantics (the lifecycle parity suite pins it).\n */\n private buildFusedWeb;\n private bareError;\n private runWithAround;\n private runAround;\n private runBodyOnly;\n /** Validate + run the handler for the bodyOnly path — shared by the inline fast path and the\n * streaming fallback. A method (not per-request closures) so the hot path allocates nothing\n * beyond the one `.then` continuation. */\n private finishBodyOnly;\n private executeHandler;\n private handleValidationErrorRecovery;\n private applyBodyValidation;\n private runQueryOnly;\n /** Validate-result → set `ctx.query` → run handler. A method (not a per-request closure), the\n * query analogue of {@link applyBodyValidation}. */\n private applyQueryValidation;\n /**\n * Thread the response through each global `onResponse` hook. Stays SYNCHRONOUS until a hook\n * actually returns a Promise — an `async` version forced a promise + microtask on EVERY response\n * of any app with an onResponse hook (cors/securityHeaders/etag/timing all use onResponse), the\n * same ~13%/req tax the onRequest walk was de-async'd to avoid. The first async hook hands the\n * rest to {@link continueOnResponse}.\n */\n private applyOnResponse;\n private applyOnResponseAndFinalize;\n private completeResponseFinalization;\n private failResponseFinalization;\n /** Notify terminal observers in order while isolating both sync and async failures. */\n private notifyResponseFinalized;\n /** Async tail of {@link applyOnResponse}: runs the remaining hooks once one has gone async. */\n private continueOnResponse;\n /**\n * Bound the response time. On timeout we abort `ctx.signal` (so cancellation-aware\n * handlers can bail) and return 503; the in-flight work keeps running but its\n * result is discarded — JS can't forcibly cancel a promise.\n */\n private withTimeout;\n /**\n * The post-match lifecycle: validate → derive → beforeHandle → handler → afterHandle, with onError.\n * Generic over the render: a success value goes through `finalize(result, set)` (a Web `Response`, or\n * node-direct primitives); an early/error `Response` (validation, thrown, 500) through `wrapResponse`.\n */\n private runLifecycle;\n private handleLifecycleError;\n /** Log an unhandled request error to the (redacting) logger — shared by {@link runLifecycle} and the\n * bare fast path ({@link bareError}) so both record the same fields. Never throws; never leaks. */\n private logRequestError;\n private readAndValidateBody;\n /** Apply validation and its recovery hook on the generic lifecycle lane. Recovery is completed\n * before derives/beforeHandle run, matching the body-only and query-only execution lanes. */\n private applyLifecycleValidation;\n /**\n * Read the body as text, capped at `maxBodyBytes`. Rejects (`null`) on a\n * `Content-Length` over the cap *before* buffering, and aborts mid-stream once the\n * running byte count exceeds it — so a lying or absent length can't force us to\n * buffer an oversized payload.\n *\n * Fast path: when a non-chunked request carries a `Content-Length` within the cap,\n * a native `req.json()` is already bounded — under HTTP/1.1 + HTTP/2 framing the\n * runtime delivers at most `Content-Length` bytes — so we skip the manual stream\n * loop and a separate text decode. It trusts the wire\n * *framing*, not the header value: nifra only ever receives framed Requests from the\n * runtime's HTTP server, never a hand-built one with a mismatched length. Chunked or\n * length-less bodies fall through to the streaming byte-cap guard below.\n */\n private readBoundedJson;\n /** Adapt one route's compiled execution plan to Bun's already-matched request shape. Route\n * semantics remain in the plan; this closure only supplies native params and deadline fallback. */\n private compileBunNativeHandler;\n /** Compile portable route registrations into Bun's native route table. Apps with request-rewrite\n * hooks or WebSockets retain the single portable dispatcher because those features must run before\n * route selection/upgrade. Named wildcards also stay on the fallback until Bun exposes their raw\n * capture semantics; static and `:param` routes take the native lane. */\n private buildBunNativeRoutes;\n /**\n * Start a `Bun.serve` instance bound to `port` (use `0` for an ephemeral port).\n *\n * `reusePort` sets `SO_REUSEPORT` so **multiple processes can bind the same port** and the kernel\n * load-balances connections across them — the standard way to use every core (Bun is\n * single-threaded per process). Spawn one process per core, each calling\n * `app.listen(PORT, { reusePort: true })`; see `examples/cluster.ts`. Every process must opt in,\n * and all of them must be the same app. Linux balances ~evenly; macOS accepts the flag but may\n * favor one socket (fine for dev, measure on Linux for production numbers).\n *\n * `hostname` is the bind address, defaulting to Bun's `0.0.0.0` (every interface). Pass\n * `\"127.0.0.1\"` to bind loopback only - an admin surface, a sidecar, or anything that must not be\n * reachable off the box. Omitting it when you meant to restrict is a real exposure, so it is a\n * first-class option rather than something a caller has to drop down to `Bun.serve` for.\n */\n listen(port: number, options?: {\n readonly reusePort?: boolean;\n readonly hostname?: string;\n }): RunningServer;\n /**\n * Gracefully stop: wait for in-flight requests to finish (up to `drainMs`), then\n * issue a single terminal stop — graceful if everything drained, forced if\n * stragglers remain. Safe to call when not listening.\n *\n * The Bun semantics: poll `pendingRequests` (awaiting\n * `stop()`'s promise drops in-flight requests), and decide graceful-vs-forced in\n * ONE call (Bun can't escalate an already-graceful `stop()` to a forced close).\n * New connections may be accepted during the drain window; in a real deploy the\n * load balancer has already stopped routing here, and `drainMs` bounds it.\n */\n stop({ drainMs }?: {\n drainMs?: number;\n }): Promise<void>;\n private installSignalHandlers;\n}",
|
|
8025
8072
|
"doc": "/**\n * The inline server. Routes are chainable and fully type-inferred. `derive`/\n * `decorate` extend the handler context (`Ctx`) for routes defined *after* them,\n * with full types; `Ctx` is server-only and never touches the client registry.\n *\n * app.decorate(\"db\", db).derive((c) => ({ user: auth(c) }))\n * .get(\"/me\", (c) => c.user) // c.user + c.db are typed\n */"
|
|
8026
8073
|
},
|
|
8027
8074
|
{
|
|
@@ -9618,7 +9665,7 @@
|
|
|
9618
9665
|
"name": "VERSION",
|
|
9619
9666
|
"kind": "const",
|
|
9620
9667
|
"package": "@nifrajs/core",
|
|
9621
|
-
"signature": "export declare const VERSION: \"1.
|
|
9668
|
+
"signature": "export declare const VERSION: \"1.13.0\";",
|
|
9622
9669
|
"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, so the literal can't go stale\n * (it shipped at \"0.0.0\" through 1.0.0 before those guards existed). Kept narrow (`as const`) so\n * consumers can pin it at the type level — see `test/version.test-d.ts`.\n */"
|
|
9623
9670
|
},
|
|
9624
9671
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nifrajs/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "The nifra CLI — zero-config dev/build/start for a nifra app (`nifra dev`, `nifra build`, `nifra start`).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@nifrajs/client": "1.
|
|
45
|
-
"@nifrajs/core": "1.
|
|
46
|
-
"@nifrajs/mcp": "1.
|
|
47
|
-
"@nifrajs/runner": "1.
|
|
48
|
-
"@nifrajs/schema": "1.
|
|
49
|
-
"@nifrajs/testing": "1.
|
|
50
|
-
"@nifrajs/web": "1.
|
|
51
|
-
"create-nifra": "1.
|
|
44
|
+
"@nifrajs/client": "1.13.0",
|
|
45
|
+
"@nifrajs/core": "1.13.0",
|
|
46
|
+
"@nifrajs/mcp": "1.13.0",
|
|
47
|
+
"@nifrajs/runner": "1.13.0",
|
|
48
|
+
"@nifrajs/schema": "1.13.0",
|
|
49
|
+
"@nifrajs/testing": "1.13.0",
|
|
50
|
+
"@nifrajs/web": "1.13.0",
|
|
51
|
+
"create-nifra": "1.13.0"
|
|
52
52
|
},
|
|
53
53
|
"repository": {
|
|
54
54
|
"type": "git",
|
package/src/cli.ts
CHANGED
|
@@ -114,7 +114,7 @@ Port: \`dev\` and \`start\` share the default ${DEFAULT_DEV_PORT}. Override with
|
|
|
114
114
|
\`PORT\` env var (\`--port\` wins over \`PORT\`, which wins over the default).`
|
|
115
115
|
|
|
116
116
|
// Kept in lockstep with packages/cli/package.json by check:publish's version-consistency gate.
|
|
117
|
-
const CLI_VERSION = "1.
|
|
117
|
+
const CLI_VERSION = "1.13.0"
|
|
118
118
|
|
|
119
119
|
// A render adapter + nifra server are opaque to the CLI (it just forwards them); cast at the seam.
|
|
120
120
|
const asAdapter = (v: unknown): RenderAdapter => v as RenderAdapter
|
package/src/doctor.ts
CHANGED
|
@@ -266,25 +266,40 @@ export async function collectDuplicateInstalls(
|
|
|
266
266
|
): Promise<DuplicateInstallFinding[]> {
|
|
267
267
|
const importers = await workspaceImporters(cwd, rootPackage)
|
|
268
268
|
const byPackage = new Map<string, Map<string, { version: string; importers: Set<string> }>>()
|
|
269
|
+
const record = (
|
|
270
|
+
name: string,
|
|
271
|
+
copy: { path: string; version: string },
|
|
272
|
+
importer: string,
|
|
273
|
+
): void => {
|
|
274
|
+
let copies = byPackage.get(name)
|
|
275
|
+
if (copies === undefined) {
|
|
276
|
+
copies = new Map()
|
|
277
|
+
byPackage.set(name, copies)
|
|
278
|
+
}
|
|
279
|
+
const entry = copies.get(copy.path) ?? { version: copy.version, importers: new Set<string>() }
|
|
280
|
+
entry.importers.add(importer)
|
|
281
|
+
copies.set(copy.path, entry)
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
const targets = new Set<string>()
|
|
269
285
|
for (const importer of importers) {
|
|
270
286
|
for (const name of duplicateTargets(importer.package)) {
|
|
271
287
|
if (importer.package.name === name) continue
|
|
288
|
+
targets.add(name)
|
|
272
289
|
const copy = await resolvedInstalledCopy(importer.root, cwd, name)
|
|
273
|
-
if (copy
|
|
274
|
-
let copies = byPackage.get(name)
|
|
275
|
-
if (copies === undefined) {
|
|
276
|
-
copies = new Map()
|
|
277
|
-
byPackage.set(name, copies)
|
|
278
|
-
}
|
|
279
|
-
const record = copies.get(copy.path) ?? {
|
|
280
|
-
version: copy.version,
|
|
281
|
-
importers: new Set<string>(),
|
|
282
|
-
}
|
|
283
|
-
record.importers.add(displayPath(cwd, importer.root))
|
|
284
|
-
copies.set(copy.path, record)
|
|
290
|
+
if (copy !== undefined) record(name, copy, displayPath(cwd, importer.root))
|
|
285
291
|
}
|
|
286
292
|
}
|
|
287
293
|
|
|
294
|
+
// Probe the workspace root for every target too, even when the root manifest doesn't declare it.
|
|
295
|
+
// A hoisted root copy is reachable from any package that lacks its own nested one, so leaving it
|
|
296
|
+
// out hides the very split it should catch: every declaring package nested onto one copy while the
|
|
297
|
+
// root resolved a different one, which reads as a single copy when only declarers are consulted.
|
|
298
|
+
for (const name of targets) {
|
|
299
|
+
const copy = await resolvedInstalledCopy(cwd, cwd, name)
|
|
300
|
+
if (copy !== undefined) record(name, copy, ".")
|
|
301
|
+
}
|
|
302
|
+
|
|
288
303
|
const findings: DuplicateInstallFinding[] = []
|
|
289
304
|
for (const [name, copies] of [...byPackage.entries()].sort(([a], [b]) => a.localeCompare(b))) {
|
|
290
305
|
if (copies.size < 2) continue
|
package/src/mcp-http.ts
CHANGED
|
@@ -26,7 +26,7 @@ export { docsTools } from "./mcp-docs-tools.ts"
|
|
|
26
26
|
export type { TypeEntry } from "./types-search.ts"
|
|
27
27
|
|
|
28
28
|
// Kept in lockstep with packages/cli/package.json by check:publish's version-consistency gate.
|
|
29
|
-
const VERSION = "1.
|
|
29
|
+
const VERSION = "1.13.0"
|
|
30
30
|
const SERVER_INFO = { name: "nifra-docs", version: VERSION }
|
|
31
31
|
const DOCS_HEALTH =
|
|
32
32
|
"nifra docs MCP — POST JSON-RPC 2.0 here (methods: initialize, tools/list, tools/call). Tools: nifra_docs, nifra_example."
|