@ultimat3/core 31.32.0 → 31.33.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/core",
3
- "version": "31.32.0",
3
+ "version": "31.33.0",
4
4
  "description": "Ultimate's foundation: errors, context, env, config, clock, ids, logging, telemetry, lifecycle",
5
5
  "keywords": [
6
6
  "ultimate",
@@ -54,6 +54,6 @@
54
54
  "test": "bun test"
55
55
  },
56
56
  "dependencies": {
57
- "@ultimat3/schema": "31.32.0"
57
+ "@ultimat3/schema": "31.33.0"
58
58
  }
59
59
  }
@@ -3,7 +3,7 @@
3
3
  // opens its scope through this seam, so "what happens where there is no async context" has one
4
4
  // answer instead of one per module.
5
5
 
6
- // `node:async_hooks` is unavoidable and deliberate: nothing else in Bun makes a value ambient
6
+ // why: `node:async_hooks` is unavoidable and deliberate: nothing else in Bun makes a value ambient
7
7
  // across an `await` without threading it through every signature in the framework.
8
8
  import { AsyncLocalStorage } from 'node:async_hooks';
9
9
  import { UltimateError } from './errors';
package/src/bunfs.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  // Whether a directory is inside a `bun build --compile` executable's virtual filesystem. One answer
2
2
  // for every platform, because Bun spells its root two ways: `/$bunfs/` on POSIX and `B:\~BUN\`
3
3
  // (public form `B:/~BUN/`) on Windows — `BASE_PATH` / `BASE_PUBLIC_PATH` in Bun's
4
- // `StandaloneModuleGraph`, as of Bun 1.4.2. An entry that tested only the first resolved its app root
5
- // INSIDE the bundle on Windows, where no source exists, and every registry booted empty.
4
+ // `StandaloneModuleGraph`, as of Bun 1.4.2.
5
+ //
6
+ // An entry that tested only the first resolved its app root INSIDE the bundle on Windows, where no
7
+ // source exists, and every registry booted empty.
6
8
 
7
9
  /** Each prefix is followed by a separator or nothing, so `/$bunfsx` or `B:\~BUNDLE` never match. */
8
10
  const COMPILED_ROOT = /^(?:\/\$bunfs|[Bb]:[\\/]~BUN)(?:[\\/]|$)/;
@@ -2,8 +2,10 @@
2
2
  * The ONE URL rule for the two HTTP primitives: an action's export name derives `POST
3
3
  * /api/<resource>/<verb>`, a query's derives `GET /_x/query/<kebab>`. Tier 0 and string math, so
4
4
  * `action`, `query` and `realtime` (all tier 3) derive the same URL with no sideways import and a
5
- * browser bundle pays a few hundred bytes for it. The one thing read rather than computed is the
6
- * style a caller did not name: `actionPath` takes it from the document the server rendered.
5
+ * browser bundle pays a few hundred bytes for it.
6
+ *
7
+ * The one thing read rather than computed is the style a caller did not name: `actionPath` takes it
8
+ * from the document the server rendered.
7
9
  */
8
10
 
9
11
  import { CLIENT_PATH_STYLE_META } from './page-meta';
@@ -2,8 +2,10 @@
2
2
  * The ONE browser HTTP function. Every client surface — `rpc()`, `queryClient()`, a signed upload,
3
3
  * the store's refetch — sends through here, so credentials, headers, the error decode, the records
4
4
  * envelope and the principal fence are decided once. A GET is a read: abortable on `rescope()`,
5
- * deduped when a `ClientFlight` is supplied. Anything else is a write: never deduped, never
6
- * aborted by the fence, and its records never adopted across one.
5
+ * deduped when a `ClientFlight` is supplied.
6
+ *
7
+ * Anything else is a write: never deduped, never aborted by the fence, and its records never
8
+ * adopted across one.
7
9
  *
8
10
  * `clientFlight` is NOT imported here at value level — a caller passes one, and only then
9
11
  * does its graph enter the bundle. Neither is `traceHeaders()`: the trace and budget headers come
@@ -1,7 +1,8 @@
1
1
  /**
2
- * "A write just went through this tab's client": the one signal a page-side cache of server
3
- * answers (the client router's prefetched documents) needs to stop trusting them. Emitted by
2
+ * "A write just went through this tab's client": the one signal a page-side cache of server answers
3
+ * (the client router's prefetched documents) needs to stop trusting them. Emitted by
4
4
  * `clientTransport` for every non-GET, landed or failed — a failed write may still have committed.
5
+ *
5
6
  * On `globalThis` under one `Symbol.for` key, like the page client: every bundle's copy of core
6
7
  * shares one listener set.
7
8
  */
@@ -1,8 +1,9 @@
1
1
  // Single responsibility: how many of one kind of work may run at once, and how many callers may
2
2
  // wait. THREE bounded pools shipped before this one — `@ultimat3/auth`'s kdf gate, `@ultimat3/ai`'s
3
- // hive pool, `@ultimat3/http`'s `maxInflight` — and only the first refuses past its queue. This
4
- // header counted `@ultimat3/scraping`'s pacer as a fourth until 2026-08-23 and it is not one: a
5
- // pacer bounds how OFTEN work starts, not how many run at once, so ten concurrent navigations all
3
+ // hive pool, `@ultimat3/http`'s `maxInflight` — and only the first refuses past its queue.
4
+ //
5
+ // This header counted `@ultimat3/scraping`'s pacer as a fourth until 2026-08-23 and it is not one:
6
+ // a pacer bounds how OFTEN work starts, not how many run at once, so ten concurrent navigations all
6
7
  // proceed merely staggered — no `maxConcurrent`, no queue bound, no refusal. Past the bound the
7
8
  // answer here is a refusal, never a longer queue: an unbounded queue converts a load spike into a
8
9
  // memory fault and answers it minutes late.
package/src/host-rules.ts CHANGED
@@ -1,7 +1,9 @@
1
- // `allowHosts`, as a decision every browser driver asks before a request leaves — never a note in
2
- // a README. A headless browser inside your network is the widest SSRF surface an app can own: one
1
+ // `allowHosts`, as a decision every browser driver asks before a request leaves — never a note in a
2
+ // README. A headless browser inside your network is the widest SSRF surface an app can own: one
3
3
  // injected `<img src="http://169.254.169.254/…">` on a page you do not control is a credential
4
- // read. In core because two tier-5 packages drive a browser (`scraping`, and `cli`'s `x shot`) and
4
+ // read.
5
+ //
6
+ // In core because two tier-5 packages drive a browser (`scraping`, and `cli`'s `x shot`) and
5
7
  // neither may import the other; two copies of this rule would be two answers to "may it leave".
6
8
 
7
9
  import { classifyAddress } from './address-class';
@@ -1,8 +1,10 @@
1
- // Single responsibility: identify an image and read its intrinsic pixel size from the header
2
- // bytes alone — never a decode, never a guess from a file extension. WebP, AVIF, GIF and SVG
3
- // have no built-in codec here, yet every `<img>` still needs `width`/`height` inlined, and
4
- // that is the only thing that keeps CLS at 0 for them. SVG declares its box in markup rather
5
- // than in header bytes, so that reading lives in `probe-svg.ts`.
1
+ // Single responsibility: identify an image and read its intrinsic pixel size from the header bytes
2
+ // alone — never a decode, never a guess from a file extension. WebP, AVIF, GIF and SVG have no
3
+ // built-in codec here, yet every `<img>` still needs `width`/`height` inlined, and that is the only
4
+ // thing that keeps CLS at 0 for them.
5
+ //
6
+ // SVG declares its box in markup rather than in header bytes, so that reading lives in
7
+ // `probe-svg.ts`.
6
8
 
7
9
  import { imageDecodeFailed, imageUnsupported } from './errors';
8
10
  import { exifOrientation, swapsAxes } from './exif-orientation';
package/src/index.ts CHANGED
@@ -999,6 +999,7 @@ export { timingSafeEqual } from './timing-safe-equal';
999
999
  export type { ToolDescriptionSource } from './tool-description';
1000
1000
  // A projected tool's description: `@ultimat3/mcp`'s and `@ultimat3/ai`'s, one tier apart from neither.
1001
1001
  export { toolDescription } from './tool-description';
1002
+ export { trimTrailingSlashes } from './trailing-slashes';
1002
1003
  export {
1003
1004
  frameworkVersion,
1004
1005
  readPackageVersion,
package/src/intl-cache.ts CHANGED
@@ -1,8 +1,9 @@
1
- // One bounded cache, on one canonical key, and one screen, for every `Intl` formatter the
2
- // framework builds.
3
- // A locale and a zone both arrive from a request header, so an unbounded `Map` keyed on the
1
+ // One bounded cache, on one canonical key, and one screen, for every `Intl` formatter the framework
2
+ // builds. A locale and a zone both arrive from a request header, so an unbounded `Map` keyed on the
4
3
  // caller's spelling is memory the client chooses — 31 MB and 55.1 MB, measured `As of 2026-08` and
5
- // written up in the README. The bound and the canonical key are two halves of ONE rule.
4
+ // written up in the README.
5
+ //
6
+ // The bound and the canonical key are two halves of ONE rule.
6
7
 
7
8
  import { UltimateError } from './errors';
8
9
 
@@ -1,8 +1,10 @@
1
1
  // Single responsibility: a fingerprint of caller input that is safe to PERSIST. `fingerprint()` is
2
2
  // an unkeyed SHA-256 prefix — fine as an in-memory sharing key, but stored beside a row it is an
3
3
  // offline oracle: a 6–20-digit account number or an ID number in an input, with the other fields
4
- // known, is brute-forced from a database read. Keyed with HMAC-SHA-256, the stored value proves
5
- // nothing to anyone without the app's signing secret.
4
+ // known, is brute-forced from a database read.
5
+ //
6
+ // Keyed with HMAC-SHA-256, the stored value proves nothing to anyone without the app's signing
7
+ // secret.
6
8
 
7
9
  import { canonicalJson } from './canonical-json';
8
10
  import { currentSigningSecret } from './cursor';
@@ -1,8 +1,9 @@
1
1
  // Text direction of a locale — a fact about the locale's script, and nothing about catalogs or
2
- // requests, which is why it is tier 0 rather than `@ultimat3/i18n`'s: `@ultimat3/ui`'s provider
3
- // reflects `dir` onto `<html>` from the locale it was handed, and reaching the i18n barrel for
4
- // that one function put the whole framework catalog into every browser chunk with a `UiProvider`
5
- // in it (issue #490). Import them from `@ultimat3/core`: i18n's re-export was deleted in 25.0.0.
2
+ // requests. Import it from `@ultimat3/core`: i18n's re-export was deleted in 25.0.0.
3
+ //
4
+ // Tier 0 rather than `@ultimat3/i18n`'s because `@ultimat3/ui`'s provider reflects `dir` onto
5
+ // `<html>` from the locale it was handed, and reaching the i18n barrel for that one function put
6
+ // the whole framework catalog into every browser chunk with a `UiProvider` in it (issue #490).
6
7
 
7
8
  export type Direction = 'ltr' | 'rtl';
8
9
 
@@ -1,8 +1,10 @@
1
1
  // A locale in a URL, as pure path arithmetic over an explicit locale list: the default locale is
2
- // the UNPREFIXED path, every other one is `/<locale>/…`. Tier 0 for `locale-direction.ts`' reason:
3
- // `@ultimat3/ui`'s `LocaleSwitcher` spells its links with it, and reaching the i18n barrel for one
4
- // function puts the whole framework catalog into every browser chunk (issue #490). i18n wraps these
5
- // with the app's configured locales (`localizedPath`, `splitLocalePrefix`), so apps call those.
2
+ // the UNPREFIXED path, every other one is `/<locale>/…`.
3
+ //
4
+ // Tier 0 for `locale-direction.ts`' reason: `@ultimat3/ui`'s `LocaleSwitcher` spells its links with
5
+ // it, and reaching the i18n barrel for one function puts the whole framework catalog into every
6
+ // browser chunk (issue #490). i18n wraps these with the app's configured locales (`localizedPath`,
7
+ // `splitLocalePrefix`), so apps call those.
6
8
 
7
9
  /** The segment a locale is written as in a URL: lowercase, so `pt-BR` is `/pt-br/`. */
8
10
  export function localeSegment(locale: string): string {
package/src/otlp.ts CHANGED
@@ -8,6 +8,7 @@ import { renderFixShellArg } from './error-render';
8
8
  import { type CodedErrorInit, UltimateError } from './errors';
9
9
  import { otlpEndpointLabel } from './otlp-post';
10
10
  import type { AttributeValue, SpanResource } from './telemetry';
11
+ import { trimTrailingSlashes } from './trailing-slashes';
11
12
  import { frameworkVersion } from './version';
12
13
 
13
14
  export class OtlpEndpointInvalidError extends UltimateError {
@@ -110,7 +111,7 @@ function parseEndpoint(signal: OtlpSignal, raw: string, perSignal: boolean, env:
110
111
  if (perSignal) return url.toString();
111
112
  // On the PATH, never on the string: `http://collector:4318?tenant=a` concatenated to
112
113
  // `…/?tenant=a/v1/traces`, a request to `/` whose query merely ends in the receiver's path.
113
- url.pathname = `${url.pathname.replace(/\/+$/, '')}/v1/${signal}`;
114
+ url.pathname = `${trimTrailingSlashes(url.pathname)}/v1/${signal}`;
114
115
  return url.toString();
115
116
  }
116
117
 
@@ -1,9 +1,11 @@
1
1
  /**
2
2
  * The trace and request-budget headers a SERVER-side typed call carries onward, installed into the
3
3
  * transport's slot by the code that makes them meaningful — `runWithContext` and `startSpan` — and
4
- * never at import. A browser runs neither, so its slot stays empty and `clientTransport` carries
5
- * zero bytes of telemetry, context or logger: that graph was 12.9 kB of every island that called
6
- * `rpc()` or `queryClient()`, for a header a browser never has a value for.
4
+ * never at import.
5
+ *
6
+ * A browser runs neither, so its slot stays empty and `clientTransport` carries zero bytes of
7
+ * telemetry, context or logger: that graph was 12.9 kB of every island that called `rpc()` or
8
+ * `queryClient()`, for a header a browser never has a value for.
7
9
  */
8
10
 
9
11
  import { traceHeaders } from './client-wire';
package/src/page.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  /**
2
2
  * `@ultimat3/core/page` — the ONE light entry for browser code: the page handle, the principal
3
3
  * fence, the names a document, a service worker and an island agree on, and `UltimateError` with
4
- * the render helper a refusal's `fix:` needs. What it never carries is a titles TABLE: any barrel
5
- * import retains the anchored `core-error-codes.ts` and `schema-error-codes.ts`, and a browser
6
- * that loaded no table titles a code from its name. The barrel re-exports every name here;
7
- * `page-bundle.test.ts` fails if this entry ever grows a table back.
4
+ * the render helper a refusal's `fix:` needs.
5
+ *
6
+ * What it never carries is a titles TABLE: any barrel import retains the anchored
7
+ * `core-error-codes.ts` and `schema-error-codes.ts`, and a browser that loaded no table titles a
8
+ * code from its name. The barrel re-exports every name here; `page-bundle.test.ts` fails if this
9
+ * entry ever grows a table back.
8
10
  */
9
11
 
10
12
  // The client seam's own functions, for the hooks a browser island calls: the one transport, the
@@ -89,6 +91,7 @@ export { fillTemplate, templateParams } from './route-path-template';
89
91
  export { onSessionLost, sessionIsLost } from './session-lost';
90
92
  // The key the theme boot script reads and the toggle island writes.
91
93
  export { THEME_STORAGE_KEY } from './theme-storage';
94
+ export { trimTrailingSlashes } from './trailing-slashes';
92
95
  // A poll a hidden tab and a lost session stop: here, so an island polling reaches no realtime.
93
96
  export type { VisibleIntervalOptions } from './visible-interval';
94
97
  export { visibleInterval } from './visible-interval';
@@ -1,8 +1,10 @@
1
1
  // Test support: drop the probe databases a KILLED run of the same suite left behind. A per-run name
2
2
  // (`probe-database.ts`) is never reused, so nothing else would ever drop it — the fixed name it
3
- // replaced was dropped by the next run. Only a database whose run is provably over goes: its pid
4
- // dead on this host, no backend connected, AND older than `PROBE_DATABASE_MIN_AGE_MS` — a run on
5
- // another host that has created its database and not yet connected reads dead and idle here.
3
+ // replaced was dropped by the next run.
4
+ //
5
+ // Only a database whose run is provably over goes: its pid dead on this host, no backend connected,
6
+ // AND older than `PROBE_DATABASE_MIN_AGE_MS` — a run on another host that has created its database
7
+ // and not yet connected reads dead and idle here.
6
8
 
7
9
  import { stringField } from './error-render';
8
10
  import type { PgExecutor } from './pg-executor';
@@ -1,8 +1,10 @@
1
1
  // Single responsibility: reading a request body through a COUNTING reader, so a payload past the
2
- // cap is never held in full. It lives in core because two transports need the identical guarantee
3
- // and cannot share it any other way: `@ultimat3/http` (tier 2) owns `bodyLimitBytes`, and
4
- // `@ultimat3/mcp` (tier 4) serves a bare `Request` that never passes through http's pipeline —
5
- // `await request.json()` there was governed only by Bun's 128 MiB default.
2
+ // cap is never held in full.
3
+ //
4
+ // It lives in core because two transports need the identical guarantee and cannot share it any
5
+ // other way: `@ultimat3/http` (tier 2) owns `bodyLimitBytes`, and `@ultimat3/mcp` (tier 4) serves a
6
+ // bare `Request` that never passes through http's pipeline — `await request.json()` there was
7
+ // governed only by Bun's 128 MiB default.
6
8
 
7
9
  import { assert } from './assert';
8
10
 
@@ -1,8 +1,9 @@
1
1
  // How much of THIS request's budget is left, and the one header that carries it to the next hop.
2
- // The header name lives here rather than in `@ultimat3/http` because both ends need it and only
3
- // one of them is tier 2: the reader is http's `resolveTimeoutMs`, the writer is a typed client in
4
- // tier 0, and a second literal in the writer is a propagation that silently stops working the day
5
- // either string is edited.
2
+ //
3
+ // The header name lives here rather than in `@ultimat3/http` because both ends need it and only one
4
+ // of them is tier 2: the reader is http's `resolveTimeoutMs`, the writer is a typed client in tier
5
+ // 0, and a second literal in the writer is a propagation that silently stops working the day either
6
+ // string is edited.
6
7
 
7
8
  import type { Ctx } from './context';
8
9
  import { tryUseContext } from './context';
@@ -2,6 +2,7 @@
2
2
  // process that imports `@ultimat3/core` — not just the CLI. `@ultimat3/schema` is tier 0 alongside
3
3
  // this package and cannot call `registerErrorCodes()` itself: that would be `schema -> core`, an
4
4
  // import this package's own dependency-free promise forbids in that direction and always will.
5
+ //
5
6
  // The other direction is DECLARED (`core -> schema`, `scripts/lib/tiers.ts`), so the titles are
6
7
  // READ from schema rather than restated here.
7
8
  //
@@ -1,9 +1,10 @@
1
1
  // Single responsibility: the three X_SEAL_* refusals and the errors that carry them. Three codes
2
2
  // rather than one "it will not open" because each names a different fact — no key at all, a key
3
- // this process was not given, a value that did not authenticate — and a different thing to do
4
- // next. No error here carries a key, a plaintext or the sealed string itself. Titles live in
5
- // `core-error-codes.ts` and the retry class in `error-retry.ts`, so this module runs nothing at
6
- // import and stays out of every bundle that does not seal.
3
+ // this process was not given, a value that did not authenticate — and a different thing to do next.
4
+ // No error here carries a key, a plaintext or the sealed string itself.
5
+ //
6
+ // Titles live in `core-error-codes.ts` and the retry class in `error-retry.ts`, so this module runs
7
+ // nothing at import and stays out of every bundle that does not seal.
7
8
 
8
9
  import { renderCauseValue } from './error-render';
9
10
  import { UltimateError } from './errors';
@@ -1,8 +1,10 @@
1
1
  // Reading TypeScript source without a parser: comments — and optionally string contents — replaced
2
- // by spaces, newlines kept so line numbers survive. Moved here from `@ultimat3/cli`'s `ts-scan.ts`
3
- // on 2026-09-05 because `@ultimat3/i18n`'s key extractor (tier 1) needed exactly this and could not
4
- // import a tier-5 package: a `// … t('…')` in a comment was a phantom key `x i18n sync` would have
5
- // written as `"…": "⟦…⟧"`. One masking implementation, at the tier every scanner can reach.
2
+ // by spaces, newlines kept so line numbers survive.
3
+ //
4
+ // Moved here from `@ultimat3/cli`'s `ts-scan.ts` on 2026-09-05 because `@ultimat3/i18n`'s key
5
+ // extractor (tier 1) needed exactly this and could not import a tier-5 package: a `// … t('…')` in
6
+ // a comment was a phantom key `x i18n sync` would have written as `"…": "⟦…⟧"`. One masking
7
+ // implementation, at the tier every scanner can reach.
6
8
 
7
9
  // `ReadonlySet`, so a consumer cannot mutate what every scan reads.
8
10
  export const QUOTES: ReadonlySet<string> = new Set(["'", '"', '`']);
@@ -0,0 +1,10 @@
1
+ // `trimTrailingSlashes`: a string without its trailing `/` run, in one linear pass. `/\/+$/` is
2
+ // quadratic on a long run of slashes followed by anything else (CodeQL `js/polynomial-redos`), and
3
+ // a base URL, an issuer or an origin is often operator or caller input.
4
+
5
+ /** `value` with every trailing `/` removed; `'///'` becomes `''`. */
6
+ export function trimTrailingSlashes(value: string): string {
7
+ let end = value.length;
8
+ while (end > 0 && value.charCodeAt(end - 1) === 47) end -= 1;
9
+ return end === value.length ? value : value.slice(0, end);
10
+ }
package/src/type-pins.ts CHANGED
@@ -1,8 +1,9 @@
1
- // Compile-time pins for the actor-facts seam, the config surface, the request-context patch and
2
- // the route and cache-tier vocabularies.
3
- // Source, not a `.test.ts`, on purpose: `tsconfig.json` excludes `src/**/*.test.ts`, so `tsc -b`
4
- // never reads a test file and a type-level assertion written there can never fail. This module
5
- // emits nothing and exports nothing anybody imports — a regression is a build error.
1
+ // Compile-time pins for the actor-facts seam, the config surface, the request-context patch and the
2
+ // route and cache-tier vocabularies. Source, not a `.test.ts`, on purpose: `tsconfig.json` excludes
3
+ // `src/**/*.test.ts`, so `tsc -b` never reads a test file and a type-level assertion written there
4
+ // can never fail.
5
+ //
6
+ // This module emits nothing and exports nothing anybody imports — a regression is a build error.
6
7
 
7
8
  import type { Actor, ActorFactMap, FactKeysOf, FactMapOf } from './actor';
8
9
  import type { CacheTierName } from './cache-vocabulary';
package/src/version.ts CHANGED
@@ -3,8 +3,9 @@
3
3
  // manifest is `private` and carries no `version`, and after `npm install` a walk above the package
4
4
  // lands in `node_modules/` where there is no manifest at all. Both mistakes fail silently.
5
5
 
6
+ // why: `frameworkVersion()` is synchronous and `Bun.file` reads only asynchronously.
6
7
  import { existsSync, readFileSync } from 'node:fs';
7
- // Bun has no path-join primitive; `import.meta.dir` is the module's own directory in both the
8
+ // why: Bun has no path-join primitive; `import.meta.dir` is the module's own directory in both the
8
9
  // checked-out `src/` layout and the published `dist/` one, each exactly one level below the
9
10
  // package root.
10
11
  import { resolve } from 'node:path';
package/src/wire-dates.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  /**
2
2
  * Which values of an answer were instants. `JSON.stringify` writes a `Date` as its ISO string and
3
3
  * nothing on the far side can tell it from text, so a read's row typed `Date` reached its caller as
4
- * a string — and every app converted at its own edge (`wireDate()`). The server knows: it walks the
5
- * answer once, names each `Date` by its path in `x-ultimate-dates`, and `clientTransport` turns
6
- * exactly those strings back into `Date`s. The body is unchanged, so a client that ignores the
7
- * header reads what it always read.
4
+ * a string — and every app converted at its own edge (`wireDate()`).
5
+ *
6
+ * The server knows: it walks the answer once, names each `Date` by its path in `x-ultimate-dates`,
7
+ * and `clientTransport` turns exactly those strings back into `Date`s. The body is unchanged, so a
8
+ * client that ignores the header reads what it always read.
8
9
  *
9
10
  * A path is a list of segments: a string is an object key, a number an array index, and `null`
10
11
  * EVERY element of an array — what a list of rows folds to (`[[null, "publishedAt"]]`), so the
@@ -1,8 +1,9 @@
1
- // The write in flight on the server: the digest of the idempotency key the request that is
2
- // running arrived with. `@ultimat3/action`'s HTTP projection opens the scope; the layers that turn
3
- // a committed row into a `records` frame read it — entity's row observer in-process, and the
4
- // Postgres driver, which writes it into the WAL for the replicator to find. Server-only: it rides
5
- // core's one `AsyncLocalStorage` seam, which a browser bundle does not have.
1
+ // The write in flight on the server: the digest of the idempotency key the request that is running
2
+ // arrived with. `@ultimat3/action`'s HTTP projection opens the scope; the layers that turn a
3
+ // committed row into a `records` frame read it — entity's row observer in-process, and the Postgres
4
+ // driver, which writes it into the WAL for the replicator to find.
5
+ //
6
+ // Server-only: it rides core's one `AsyncLocalStorage` seam, which a browser bundle does not have.
6
7
 
7
8
  import { asyncContext } from './async-context';
8
9
  import { isWriteDigest } from './write-digest';