@mailwoman/core 4.12.0 → 4.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/data/coarse-placer/meta.json +44 -9
  2. package/data/coarse-placer/weights.bin +0 -0
  3. package/out/coarse-placer/featurize.d.ts +18 -7
  4. package/out/coarse-placer/featurize.d.ts.map +1 -1
  5. package/out/coarse-placer/featurize.js +47 -7
  6. package/out/coarse-placer/featurize.js.map +1 -1
  7. package/out/pipeline/index.d.ts +1 -1
  8. package/out/pipeline/index.d.ts.map +1 -1
  9. package/out/pipeline/index.js +1 -1
  10. package/out/pipeline/index.js.map +1 -1
  11. package/out/pipeline/reconcile.js +1 -1
  12. package/out/pipeline/reconcile.js.map +1 -1
  13. package/out/pipeline/runtime-pipeline.d.ts +13 -0
  14. package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
  15. package/out/pipeline/runtime-pipeline.js +44 -0
  16. package/out/pipeline/runtime-pipeline.js.map +1 -1
  17. package/out/pipeline/types.d.ts +20 -2
  18. package/out/pipeline/types.d.ts.map +1 -1
  19. package/out/resolver/index.d.ts +8 -4
  20. package/out/resolver/index.d.ts.map +1 -1
  21. package/out/resolver/index.js +8 -3
  22. package/out/resolver/index.js.map +1 -1
  23. package/out/resolver/types.d.ts +55 -8
  24. package/out/resolver/types.d.ts.map +1 -1
  25. package/out/resolver/types.js +5 -4
  26. package/out/resolver/types.js.map +1 -1
  27. package/package.json +2 -2
  28. package/out/resolver/remote-resolver.d.ts +0 -56
  29. package/out/resolver/remote-resolver.d.ts.map +0 -1
  30. package/out/resolver/remote-resolver.js +0 -68
  31. package/out/resolver/remote-resolver.js.map +0 -1
  32. package/out/resolver/resolve.d.ts +0 -21
  33. package/out/resolver/resolve.d.ts.map +0 -1
  34. package/out/resolver/resolve.js +0 -454
  35. package/out/resolver/resolve.js.map +0 -1
@@ -7,7 +7,7 @@
7
7
  * lookup backend.
8
8
  *
9
9
  * The interface is deliberately decoupled from any specific resolver implementation. The first
10
- * shipped impl is `@mailwoman/resolver-wof-sqlite`, but the same contract supports a future
10
+ * shipped impl is `@mailwoman/core/resolver-wof-sqlite`, but the same contract supports a future
11
11
  * `RemoteResolver` adapter (Phase 4.4 — Pelias / BAN / Nominatim) without a public-API break.
12
12
  *
13
13
  * See `docs/plan/phases/PHASE_4_3_resolver_integration.md` for the design intent.
@@ -15,8 +15,8 @@
15
15
  import type { AddressTree, ComponentTag } from "../decoder/types.js";
16
16
  /**
17
17
  * One candidate place returned by a resolver. Mirrors the shape used by
18
- * `@mailwoman/resolver-wof-sqlite`'s `PlaceCandidate` — kept structurally compatible so a callsite
19
- * holding a `PlaceCandidate` can be passed where a `ResolvedPlace` is expected.
18
+ * `@mailwoman/core/resolver-wof-sqlite`'s `PlaceCandidate` — kept structurally compatible so a
19
+ * callsite holding a `PlaceCandidate` can be passed where a `ResolvedPlace` is expected.
20
20
  */
21
21
  export interface ResolvedPlace {
22
22
  /** Resolver-specific place identifier (e.g. WOF id). */
@@ -69,8 +69,8 @@ export interface ResolvedPlace {
69
69
  * Pull-based contract for a single resolver query. The resolver knows nothing about `AddressTree` —
70
70
  * it just answers "what place is named X, optionally constrained by Y?"
71
71
  *
72
- * Structurally compatible with `PlaceLookup` from `@mailwoman/resolver-wof-sqlite` so the latter
73
- * satisfies this interface without an adapter shim.
72
+ * Structurally compatible with `PlaceLookup` from `@mailwoman/core/resolver-wof-sqlite` so the
73
+ * latter satisfies this interface without an adapter shim.
74
74
  */
75
75
  export interface ResolverBackend {
76
76
  findPlace(query: {
@@ -254,6 +254,19 @@ export interface ResolveOpts {
254
254
  * the harness swept). Only consulted when `anchorPosterior` is set.
255
255
  */
256
256
  anchorWeight?: number;
257
+ /**
258
+ * #743/#194 — a CONFIDENT coarse-placer country applied as a HARD candidate filter
259
+ * (`query.country`), not the soft {@link anchorPosterior} boost. This collapses the off-continent
260
+ * tail for LOW-population places the soft prior can't move (FI/PL — their towns lose to a
261
+ * high-pop namesake in the population-first gazetteer even when the country is pinned). On a miss
262
+ * the node is left UNRESOLVED ("in-region or unresolved") rather than re-resolved globally — the
263
+ * off-continent rows are precisely the ones whose locality isn't in the country's gazetteer
264
+ * slice, so a global fallback just re-admits the wrong-continent guess (measured: it collapses
265
+ * back to the soft-prior baseline). The win is coverage-bounded: tail collapse at a recall cost
266
+ * set by how complete the country's gazetteer is (PL −9.5pp, FI −32pp). Undefined (default) →
267
+ * byte-stable. Ignored when a resolved parent or {@link defaultCountry} already pins the country.
268
+ */
269
+ hardCountry?: string;
257
270
  /**
258
271
  * Recover the dropped locality in a DUAL-ROLE-place address (#405, epic #402). Many places occupy
259
272
  * multiple admin tiers under one name — city-states (Berlin/Hamburg/Bremen = city == state),
@@ -303,6 +316,39 @@ export interface ResolveOpts {
303
316
  * Report: docs/articles/evals/2026-06-14-interp-radius-calibration.md.
304
317
  */
305
318
  interpolationRadiusCalibration?: number;
319
+ /**
320
+ * Span-rescore tier (#370). When set, AND the tree resolved nothing, recover a dropped/fragmented
321
+ * locality from the raw text: enumerate raw-token spans, exact-match the same-country gazetteer
322
+ * (longest-wins + postcode-consistency gate), and inject the recovered locality as a resolved
323
+ * node. Targets the EU no-result tail the model leaves when it fragments an accented locality
324
+ * token ("Grudziądz" → "Grudzi"+"dz", #555). Default-off + byte-stable when unset; never disturbs
325
+ * a tree that already resolved (the #685 brake). Validated in
326
+ * `docs/articles/evals/2026-06-23-370-span-rescore.mdx`.
327
+ */
328
+ spanRescore?: boolean;
329
+ /**
330
+ * Postcode-consistency gate radius (km) for the span-rescore tier — reject a recovered locality
331
+ * farther than this from where the postcode resolves. Only bites when the backend has postcode
332
+ * coverage (else no anchor, no gate). Default 50.
333
+ */
334
+ spanRescoreGateKm?: number;
335
+ /**
336
+ * Postcode-disambiguated locality selection (#370 "Lever A"). When set, AND a locality resolves
337
+ * far from a resolved sibling postcode, re-pick the same-named candidate (from the lookup's
338
+ * already- captured `alternatives`) nearest the postcode; if none reconciles within the gate,
339
+ * fall the coordinate back to the postcode point and flag `postcode_city_mismatch`. Targets the
340
+ * dominant failure mode on the EU/AU panel — a same-named town resolved to the wrong instance
341
+ * while the postcode that would disambiguate it sits resolved in the same tree (e.g. "06260
342
+ * Saint-Pierre" → 617 km off, postcode 06260 correct). Only bites where the backend resolved the
343
+ * postcode to a point (so it composes with postcode coverage, #193). Default-off + byte-stable
344
+ * when unset.
345
+ */
346
+ postcodeConsistency?: boolean;
347
+ /**
348
+ * Gate radius (km) for {@link postcodeConsistency} — a locality farther than this from the
349
+ * resolved postcode is re-picked or demoted. Default 50.
350
+ */
351
+ postcodeConsistencyGateKm?: number;
306
352
  hierarchyCompletion?: boolean;
307
353
  /** @deprecated Renamed to {@link hierarchyCompletion} (#405 generalized #387). Still honored. */
308
354
  cityStateFallback?: boolean;
@@ -358,9 +404,10 @@ export declare const DEFAULT_PLACETYPE_MAP: PlacetypeMap;
358
404
  * candidate (which is QA-visible). Same exact-type preference applies.
359
405
  *
360
406
  * This table is the single source of truth for that expansion, shared by every lookup backend
361
- * (`@mailwoman/resolver-wof-sqlite`, `@mailwoman/resolver-wof-wasm`, and the demo's httpvfs lookup)
362
- * so the Node and browser resolvers can't drift. Keyed by the REQUESTED placetype. Placetypes
363
- * without an entry pass through unchanged — an explicit `placetype: "borough"` query stays narrow.
407
+ * (`@mailwoman/core/resolver-wof-sqlite`, `@mailwoman/core/resolver-wof-wasm`, and the demo's
408
+ * httpvfs lookup) so the Node and browser resolvers can't drift. Keyed by the REQUESTED placetype.
409
+ * Placetypes without an entry pass through unchanged — an explicit `placetype: "borough"` query
410
+ * stays narrow.
364
411
  */
365
412
  export declare const PLACETYPE_FILTER_GROUPS: Readonly<Record<string, readonly string[]>>;
366
413
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../resolver/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE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,CAAC,UAAU,EAAE,IAAI,GAAG,IAAI,CAAA;AAC7D,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAAA;AAC9E,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,MAAM,EAAE,GAAG,IAAI,CAAA;AAsB5F;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,kBAAkB,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAKnG;AAED;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACxB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;CACxE"}
@@ -7,7 +7,7 @@
7
7
  * lookup backend.
8
8
  *
9
9
  * The interface is deliberately decoupled from any specific resolver implementation. The first
10
- * shipped impl is `@mailwoman/resolver-wof-sqlite`, but the same contract supports a future
10
+ * shipped impl is `@mailwoman/core/resolver-wof-sqlite`, but the same contract supports a future
11
11
  * `RemoteResolver` adapter (Phase 4.4 — Pelias / BAN / Nominatim) without a public-API break.
12
12
  *
13
13
  * See `docs/plan/phases/PHASE_4_3_resolver_integration.md` for the design intent.
@@ -50,9 +50,10 @@ export const DEFAULT_PLACETYPE_MAP = {
50
50
  * candidate (which is QA-visible). Same exact-type preference applies.
51
51
  *
52
52
  * This table is the single source of truth for that expansion, shared by every lookup backend
53
- * (`@mailwoman/resolver-wof-sqlite`, `@mailwoman/resolver-wof-wasm`, and the demo's httpvfs lookup)
54
- * so the Node and browser resolvers can't drift. Keyed by the REQUESTED placetype. Placetypes
55
- * without an entry pass through unchanged — an explicit `placetype: "borough"` query stays narrow.
53
+ * (`@mailwoman/core/resolver-wof-sqlite`, `@mailwoman/core/resolver-wof-wasm`, and the demo's
54
+ * httpvfs lookup) so the Node and browser resolvers can't drift. Keyed by the REQUESTED placetype.
55
+ * Placetypes without an entry pass through unchanged — an explicit `placetype: "borough"` query
56
+ * stays narrow.
56
57
  */
57
58
  export const PLACETYPE_FILTER_GROUPS = {
58
59
  locality: ["locality", "borough", "localadmin"],
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../resolver/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAkUH,MAAM,CAAC,MAAM,qBAAqB,GAAiB;IAClD,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;IACpB,kBAAkB,EAAE,UAAU;IAC9B,SAAS,EAAE,QAAQ;IACnB,0FAA0F;IAC1F,6FAA6F;IAC7F,2FAA2F;IAC3F,QAAQ,EAAE,YAAY;CACtB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAgD;IACnF,QAAQ,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY,CAAC;IAC/C,MAAM,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,MAAM,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC;CACjC,CAAA;AAUD,MAAM,UAAU,qBAAqB,CAAC,UAAoC;IACzE,IAAI,CAAC,UAAU;QAAE,OAAO,IAAI,CAAA;IAC5B,MAAM,GAAG,GAAa,EAAE,CAAA;IACxB,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACpC,KAAK,MAAM,QAAQ,IAAI,uBAAuB,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YAC1E,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBAAE,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAChD,CAAC;IACF,CAAC;IACD,OAAO,GAAG,CAAA;AACX,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,yBAAyB,GAAwB,IAAI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AAuB,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YAC1E,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBAAE,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAChD,CAAC;IACF,CAAC;IACD,OAAO,GAAG,CAAA;AACX,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,CAAA;AAE9F;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mBAAmB,CAAC,kBAA0B,EAAE,kBAA0B;IACzF,MAAM,KAAK,GAAG,uBAAuB,CAAC,kBAAkB,CAAC,CAAA;IACzD,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAA;IACxB,IAAI,kBAAkB,KAAK,kBAAkB;QAAE,OAAO,KAAK,CAAA;IAC3D,OAAO,yBAAyB,CAAC,GAAG,CAAC,kBAAkB,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAA;AAC/F,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailwoman/core",
3
- "version": "4.12.0",
3
+ "version": "4.14.0",
4
4
  "description": "Mailwoman core: tokenization, classification primitives, solver, formatter, resources, filters, solvers, utils.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -66,7 +66,7 @@
66
66
  "pino-pretty": "^13.1.3",
67
67
  "pluralize": "^8.0.0",
68
68
  "regenerate": "^1.4.2",
69
- "spliterator": "^2.0.0",
69
+ "spliterator": "^2.2.1",
70
70
  "table": "^6.9.0"
71
71
  },
72
72
  "devDependencies": {
@@ -1,56 +0,0 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
- * `RemoteResolver` — the `Resolver` interface (`resolveTree`) over HTTP. The adapter the interface
7
- * docstring anticipated (Phase 4.4): a client POSTs a parsed `AddressTree` + the serializable
8
- * `ResolveOpts` to a resolver service, which owns the gazetteer + situs/interpolation shards,
9
- * runs the cascade, and returns the resolved tree. Two payoffs:
10
- *
11
- * 1. **Multi-instance** — stateless parser nodes (the ~30 MB ONNX model) talk to ONE resolver service
12
- * (the multi-GB gazetteer + shards). `parse` locally, `new RemoteResolver(...).resolveTree`
13
- * remotely — same interface the in-process `WofResolver` satisfies, so it's a drop-in.
14
- * 2. **Canary** — point it at a second resolver build (or an adapter fronting Pelias/Nominatim/BAN)
15
- * and diff the resolved trees through the identical contract.
16
- *
17
- * Pure transport: `fetch` only, no node-specific deps (runs in the browser too). The
18
- * `addressPoints` / `interpolation` opts are LIVE SQLite handles — not serializable — so they're
19
- * stripped before the POST; the resolver service supplies its own from the tree's region (the
20
- * data lives server-side, which is the whole point). All other opts (defaultCountry, calibration,
21
- * hierarchyCompletion, …) ride along.
22
- */
23
- import type { AddressTree } from "../decoder/types.js";
24
- import type { ResolveOpts, Resolver } from "./types.js";
25
- /** `ResolveOpts` minus the non-serializable live lookup handles. What actually crosses the wire. */
26
- export type SerializableResolveOpts = Omit<ResolveOpts, "addressPoints" | "interpolation">;
27
- /** Strip the live lookup handles from `ResolveOpts` so the rest can be JSON-serialized over HTTP. */
28
- export declare function serializableResolveOpts(opts?: ResolveOpts): SerializableResolveOpts | undefined;
29
- export interface RemoteResolverOpts {
30
- /**
31
- * Full URL of the resolver service's resolve-tree endpoint, e.g.
32
- * `http://resolver:7081/api/resolve-tree`.
33
- */
34
- endpoint: string;
35
- /** Injectable fetch (tests / custom agents). Defaults to the global `fetch`. */
36
- fetch?: typeof fetch;
37
- /** Per-request timeout in ms. Default 10000. */
38
- timeoutMs?: number;
39
- /** Extra headers (auth, tracing). `Content-Type: application/json` is always set. */
40
- headers?: Record<string, string>;
41
- }
42
- /** The wire request body `POST <endpoint>` expects (and the matching server handler parses). */
43
- export interface ResolveTreeRequest {
44
- tree: AddressTree;
45
- opts?: SerializableResolveOpts;
46
- }
47
- /** The wire response body the server returns. */
48
- export interface ResolveTreeResponse {
49
- tree: AddressTree;
50
- }
51
- export declare class RemoteResolver implements Resolver {
52
- #private;
53
- constructor(opts: RemoteResolverOpts);
54
- resolveTree(tree: AddressTree, opts?: ResolveOpts): Promise<AddressTree>;
55
- }
56
- //# sourceMappingURL=remote-resolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remote-resolver.d.ts","sourceRoot":"","sources":["../../resolver/remote-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAEvD,oGAAoG;AACpG,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,WAAW,EAAE,eAAe,GAAG,eAAe,CAAC,CAAA;AAE1F,qGAAqG;AACrG,wBAAgB,uBAAuB,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,uBAAuB,GAAG,SAAS,CAI/F;AAED,MAAM,WAAW,kBAAkB;IAClC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB,gFAAgF;IAChF,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;IACpB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC;AAED,gGAAgG;AAChG,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,WAAW,CAAA;IACjB,IAAI,CAAC,EAAE,uBAAuB,CAAA;CAC9B;AAED,iDAAiD;AACjD,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,WAAW,CAAA;CACjB;AAED,qBAAa,cAAe,YAAW,QAAQ;;gBAMlC,IAAI,EAAE,kBAAkB;IAQ9B,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;CAuB9E"}
@@ -1,68 +0,0 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
- * `RemoteResolver` — the `Resolver` interface (`resolveTree`) over HTTP. The adapter the interface
7
- * docstring anticipated (Phase 4.4): a client POSTs a parsed `AddressTree` + the serializable
8
- * `ResolveOpts` to a resolver service, which owns the gazetteer + situs/interpolation shards,
9
- * runs the cascade, and returns the resolved tree. Two payoffs:
10
- *
11
- * 1. **Multi-instance** — stateless parser nodes (the ~30 MB ONNX model) talk to ONE resolver service
12
- * (the multi-GB gazetteer + shards). `parse` locally, `new RemoteResolver(...).resolveTree`
13
- * remotely — same interface the in-process `WofResolver` satisfies, so it's a drop-in.
14
- * 2. **Canary** — point it at a second resolver build (or an adapter fronting Pelias/Nominatim/BAN)
15
- * and diff the resolved trees through the identical contract.
16
- *
17
- * Pure transport: `fetch` only, no node-specific deps (runs in the browser too). The
18
- * `addressPoints` / `interpolation` opts are LIVE SQLite handles — not serializable — so they're
19
- * stripped before the POST; the resolver service supplies its own from the tree's region (the
20
- * data lives server-side, which is the whole point). All other opts (defaultCountry, calibration,
21
- * hierarchyCompletion, …) ride along.
22
- */
23
- /** Strip the live lookup handles from `ResolveOpts` so the rest can be JSON-serialized over HTTP. */
24
- export function serializableResolveOpts(opts) {
25
- if (!opts)
26
- return undefined;
27
- const { addressPoints: _ap, interpolation: _ip, ...rest } = opts;
28
- return rest;
29
- }
30
- export class RemoteResolver {
31
- #endpoint;
32
- #fetch;
33
- #timeoutMs;
34
- #headers;
35
- constructor(opts) {
36
- if (!opts.endpoint)
37
- throw new Error("RemoteResolver: `endpoint` is required");
38
- this.#endpoint = opts.endpoint;
39
- this.#fetch = opts.fetch ?? globalThis.fetch;
40
- this.#timeoutMs = opts.timeoutMs ?? 10_000;
41
- this.#headers = opts.headers ?? {};
42
- }
43
- async resolveTree(tree, opts) {
44
- const controller = new AbortController();
45
- const timer = setTimeout(() => controller.abort(), this.#timeoutMs);
46
- try {
47
- const body = { tree, opts: serializableResolveOpts(opts) };
48
- const res = await this.#fetch(this.#endpoint, {
49
- method: "POST",
50
- headers: { "Content-Type": "application/json", ...this.#headers },
51
- body: JSON.stringify(body),
52
- signal: controller.signal,
53
- });
54
- if (!res.ok) {
55
- throw new Error(`RemoteResolver: ${this.#endpoint} → HTTP ${res.status} ${res.statusText}`);
56
- }
57
- const json = (await res.json());
58
- if (!json || !json.tree || !Array.isArray(json.tree.roots)) {
59
- throw new Error("RemoteResolver: malformed response (missing `tree.roots`)");
60
- }
61
- return json.tree;
62
- }
63
- finally {
64
- clearTimeout(timer);
65
- }
66
- }
67
- }
68
- //# sourceMappingURL=remote-resolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remote-resolver.js","sourceRoot":"","sources":["../../resolver/remote-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAQH,qGAAqG;AACrG,MAAM,UAAU,uBAAuB,CAAC,IAAkB;IACzD,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAA;IAC3B,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAA;IAChE,OAAO,IAAI,CAAA;AACZ,CAAC;AA2BD,MAAM,OAAO,cAAc;IACjB,SAAS,CAAQ;IACjB,MAAM,CAAc;IACpB,UAAU,CAAQ;IAClB,QAAQ,CAAwB;IAEzC,YAAY,IAAwB;QACnC,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAA;QAC7E,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK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,CAAC;YACD,OAAO,IAAI,CAAC,IAAI,CAAA;QACjB,CAAC;gBAAS,CAAC;YACV,YAAY,CAAC,KAAK,CAAC,CAAA;QACpB,CAAC;IACF,CAAC;CACD"}
@@ -1,21 +0,0 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
- * `resolveTree` — walk an `AddressTree` top-down and decorate matched nodes with resolver- supplied
7
- * attribution + coordinates.
8
- *
9
- * The walk is parent-constraint-aware: when a parent node resolves to a place id, its children's
10
- * lookups are scoped to descendants of that parent. This dramatically narrows the search space
11
- * for ambiguous names — `Springfield` under a resolved `Illinois` parent resolves to the IL one,
12
- * not the MA one.
13
- */
14
- import { type Resolver, type ResolverBackend } from "./types.js";
15
- /**
16
- * Build a `Resolver` backed by a `ResolverBackend`. The backend can be any concrete impl
17
- * structurally compatible with `PlaceLookup` — e.g. `new WofSqlitePlaceLookup({ databasePath
18
- * }).asResolverBackend()` or a fake for tests.
19
- */
20
- export declare function createWofResolver(backend: ResolverBackend): Resolver;
21
- //# sourceMappingURL=resolve.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../resolver/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EASN,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,MAAM,YAAY,CAAA;AAEnB;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,eAAe,GAAG,QAAQ,CAEpE"}