@mailwoman/core 10.1.0 → 10.2.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 (429) hide show
  1. package/lib/api/APIClient.ts +5 -6
  2. package/lib/api/arcgis.ts +5 -5
  3. package/lib/api/ckan.ts +2 -1
  4. package/lib/api/disk-storage.ts +3 -3
  5. package/lib/api/ogc.ts +56 -52
  6. package/lib/api/pacer.ts +1 -1
  7. package/lib/api/retry.ts +6 -4
  8. package/lib/api/test/transport.ts +20 -20
  9. package/lib/api.ts +1 -0
  10. package/lib/coarse-placer/coarse-placer.ts +4 -3
  11. package/lib/crypto/node.ts +1 -2
  12. package/lib/decoder/build-tree.ts +5 -5
  13. package/lib/decoder/parse-diff.ts +47 -31
  14. package/lib/decoder/proposals-to-tree.ts +1 -0
  15. package/lib/decoder/serialize/json.ts +9 -6
  16. package/lib/decoder/serialize/tuples.ts +2 -1
  17. package/lib/decoder/serialize/xml.ts +15 -14
  18. package/lib/decoder/tree/shape.ts +14 -14
  19. package/lib/decoder/tree/walk.ts +2 -2
  20. package/lib/decoder/types.ts +48 -2
  21. package/lib/env/schema.ts +21 -23
  22. package/lib/env/utils.ts +4 -3
  23. package/lib/env.ts +4 -4
  24. package/lib/fs/delimited.ts +35 -1
  25. package/lib/fs/readers.ts +2 -5
  26. package/lib/fs/zip.ts +1 -1
  27. package/lib/geocode/result.ts +337 -0
  28. package/lib/git.ts +1 -1
  29. package/lib/html/document.ts +6 -6
  30. package/lib/html/elements.ts +26 -23
  31. package/lib/identical.ts +20 -0
  32. package/lib/json.ts +5 -7
  33. package/lib/layers/coverage.ts +28 -1
  34. package/lib/layers/feature-count.ts +3 -3
  35. package/lib/layers/manifest.ts +22 -21
  36. package/lib/layers/schema.ts +25 -1
  37. package/lib/license/configured.ts +3 -3
  38. package/lib/license/key/file.ts +2 -1
  39. package/lib/license/key.ts +3 -3
  40. package/lib/license/stamp.ts +4 -4
  41. package/lib/locale/locale.ts +1 -1
  42. package/lib/locale/registry.ts +2 -2
  43. package/lib/module/compiled-freshness.ts +1 -1
  44. package/lib/module/package-command.ts +4 -2
  45. package/lib/module/packaged-data.ts +1 -1
  46. package/lib/module/resolve-from.ts +1 -1
  47. package/lib/numeric.ts +4 -4
  48. package/lib/objects.ts +3 -0
  49. package/lib/paths.ts +16 -1
  50. package/lib/pipeline/client-result.ts +14 -14
  51. package/lib/pipeline/result.ts +5 -4
  52. package/lib/pipeline/runtime-pipeline.ts +65 -42
  53. package/lib/pipeline/span-proposer.ts +1 -1
  54. package/lib/pipeline/types.ts +328 -161
  55. package/lib/pipeline.ts +32 -7
  56. package/lib/policy/proposal-collection.ts +1 -1
  57. package/lib/policy/registry.ts +5 -3
  58. package/lib/resolver/authoritative-provider.ts +17 -17
  59. package/lib/resolver/coverage-facts.ts +3 -3
  60. package/lib/resolver/fixture-authoritative-provider.ts +4 -0
  61. package/lib/resolver/lookup-types.ts +54 -14
  62. package/lib/resolver/postcode-format.ts +9 -9
  63. package/lib/resolver/referential.ts +2 -2
  64. package/lib/resolver/types.ts +155 -51
  65. package/lib/resolver.ts +22 -20
  66. package/lib/resources/git.ts +1 -1
  67. package/lib/resources/languages.ts +0 -2
  68. package/lib/resources/libpostal.ts +1 -1
  69. package/lib/resources/whosonfirst/PlacetypeDataSource.ts +2 -6
  70. package/lib/resources/whosonfirst/extract-repo.ts +2 -1
  71. package/lib/resources/whosonfirst/placetypes/admin.ts +20 -25
  72. package/lib/resources/whosonfirst/placetypes/mermaid.ts +4 -3
  73. package/lib/resources/whosonfirst/placetypes/specificity.ts +7 -7
  74. package/lib/resources.ts +1 -0
  75. package/lib/scripting/arguments.ts +6 -5
  76. package/lib/scripting/command.ts +3 -2
  77. package/lib/scripting/operation.ts +2 -2
  78. package/lib/scripting/utils.ts +3 -5
  79. package/lib/strings/python-json.ts +1 -1
  80. package/lib/tokenization/Span.ts +1 -1
  81. package/lib/trust-policies.ts +0 -2
  82. package/lib/types/Classification.ts +1 -1
  83. package/lib/types/classifier.ts +1 -1
  84. package/lib/utils/geodatabase-archive.ts +13 -5
  85. package/lib/utils/sqlite-rows.ts +3 -3
  86. package/lib/utils/stream-to-disk.ts +1 -3
  87. package/lib/utils/union-find.ts +1 -1
  88. package/lib/vale.ts +1 -1
  89. package/lib/workspaces.ts +2 -2
  90. package/out/api/APIClient.d.ts +3 -3
  91. package/out/api/APIClient.d.ts.map +1 -1
  92. package/out/api/APIClient.js +2 -3
  93. package/out/api/APIClient.js.map +1 -1
  94. package/out/api/arcgis.d.ts +2 -2
  95. package/out/api/arcgis.d.ts.map +1 -1
  96. package/out/api/arcgis.js +6 -6
  97. package/out/api/arcgis.js.map +1 -1
  98. package/out/api/ckan.d.ts +2 -1
  99. package/out/api/ckan.d.ts.map +1 -1
  100. package/out/api/ckan.js.map +1 -1
  101. package/out/api/disk-storage.d.ts +1 -1
  102. package/out/api/disk-storage.js +2 -2
  103. package/out/api/disk-storage.js.map +1 -1
  104. package/out/api/ogc.d.ts +32 -27
  105. package/out/api/ogc.d.ts.map +1 -1
  106. package/out/api/ogc.js +41 -46
  107. package/out/api/ogc.js.map +1 -1
  108. package/out/api/pacer.d.ts +1 -1
  109. package/out/api/pacer.js +1 -1
  110. package/out/api/retry.d.ts +6 -4
  111. package/out/api/retry.d.ts.map +1 -1
  112. package/out/api/retry.js +1 -1
  113. package/out/api/retry.js.map +1 -1
  114. package/out/api/test/transport.d.ts +11 -11
  115. package/out/api/test/transport.d.ts.map +1 -1
  116. package/out/api/test/transport.js +16 -16
  117. package/out/api/test/transport.js.map +1 -1
  118. package/out/api.d.ts +1 -0
  119. package/out/api.d.ts.map +1 -1
  120. package/out/api.js +1 -0
  121. package/out/api.js.map +1 -1
  122. package/out/coarse-placer/coarse-placer.d.ts +3 -2
  123. package/out/coarse-placer/coarse-placer.d.ts.map +1 -1
  124. package/out/coarse-placer/coarse-placer.js +1 -1
  125. package/out/coarse-placer/coarse-placer.js.map +1 -1
  126. package/out/crypto/node.d.ts +1 -2
  127. package/out/crypto/node.d.ts.map +1 -1
  128. package/out/crypto/node.js +1 -2
  129. package/out/crypto/node.js.map +1 -1
  130. package/out/decoder/build-tree.js +5 -5
  131. package/out/decoder/build-tree.js.map +1 -1
  132. package/out/decoder/parse-diff.d.ts +19 -19
  133. package/out/decoder/parse-diff.d.ts.map +1 -1
  134. package/out/decoder/parse-diff.js +28 -12
  135. package/out/decoder/parse-diff.js.map +1 -1
  136. package/out/decoder/proposals-to-tree.d.ts.map +1 -1
  137. package/out/decoder/proposals-to-tree.js +1 -0
  138. package/out/decoder/proposals-to-tree.js.map +1 -1
  139. package/out/decoder/serialize/json.d.ts +35 -17
  140. package/out/decoder/serialize/json.d.ts.map +1 -1
  141. package/out/decoder/serialize/json.js +28 -0
  142. package/out/decoder/serialize/json.js.map +1 -1
  143. package/out/decoder/serialize/tuples.d.ts +2 -1
  144. package/out/decoder/serialize/tuples.d.ts.map +1 -1
  145. package/out/decoder/serialize/tuples.js.map +1 -1
  146. package/out/decoder/serialize/xml.d.ts +12 -11
  147. package/out/decoder/serialize/xml.d.ts.map +1 -1
  148. package/out/decoder/serialize/xml.js +3 -3
  149. package/out/decoder/serialize/xml.js.map +1 -1
  150. package/out/decoder/tree/shape.d.ts +6 -6
  151. package/out/decoder/tree/shape.d.ts.map +1 -1
  152. package/out/decoder/tree/shape.js +8 -8
  153. package/out/decoder/tree/shape.js.map +1 -1
  154. package/out/decoder/tree/walk.d.ts +1 -1
  155. package/out/decoder/tree/walk.d.ts.map +1 -1
  156. package/out/decoder/tree/walk.js +1 -1
  157. package/out/decoder/tree/walk.js.map +1 -1
  158. package/out/decoder/types.d.ts +55 -2
  159. package/out/decoder/types.d.ts.map +1 -1
  160. package/out/decoder/types.js +39 -1
  161. package/out/decoder/types.js.map +1 -1
  162. package/out/env/schema.d.ts +11 -12
  163. package/out/env/schema.d.ts.map +1 -1
  164. package/out/env/schema.js +15 -17
  165. package/out/env/schema.js.map +1 -1
  166. package/out/env/utils.d.ts +2 -2
  167. package/out/env/utils.d.ts.map +1 -1
  168. package/out/env/utils.js +2 -2
  169. package/out/env/utils.js.map +1 -1
  170. package/out/env.js +4 -4
  171. package/out/env.js.map +1 -1
  172. package/out/fs/delimited.d.ts +18 -0
  173. package/out/fs/delimited.d.ts.map +1 -1
  174. package/out/fs/delimited.js +31 -1
  175. package/out/fs/delimited.js.map +1 -1
  176. package/out/fs/readers.d.ts +2 -4
  177. package/out/fs/readers.d.ts.map +1 -1
  178. package/out/fs/readers.js +2 -4
  179. package/out/fs/readers.js.map +1 -1
  180. package/out/fs/zip.js +1 -1
  181. package/out/fs/zip.js.map +1 -1
  182. package/out/geocode/result.d.ts +475 -0
  183. package/out/geocode/result.d.ts.map +1 -0
  184. package/out/geocode/result.js +280 -0
  185. package/out/geocode/result.js.map +1 -0
  186. package/out/git.js +1 -1
  187. package/out/git.js.map +1 -1
  188. package/out/html/document.d.ts +3 -3
  189. package/out/html/document.d.ts.map +1 -1
  190. package/out/html/document.js +4 -4
  191. package/out/html/document.js.map +1 -1
  192. package/out/html/elements.d.ts +18 -15
  193. package/out/html/elements.d.ts.map +1 -1
  194. package/out/html/elements.js +17 -16
  195. package/out/html/elements.js.map +1 -1
  196. package/out/identical.d.ts +16 -0
  197. package/out/identical.d.ts.map +1 -0
  198. package/out/identical.js +19 -0
  199. package/out/identical.js.map +1 -0
  200. package/out/json.d.ts +3 -5
  201. package/out/json.d.ts.map +1 -1
  202. package/out/json.js +3 -5
  203. package/out/json.js.map +1 -1
  204. package/out/layers/coverage.d.ts +26 -1
  205. package/out/layers/coverage.d.ts.map +1 -1
  206. package/out/layers/coverage.js.map +1 -1
  207. package/out/layers/feature-count.d.ts +1 -1
  208. package/out/layers/feature-count.d.ts.map +1 -1
  209. package/out/layers/feature-count.js +2 -2
  210. package/out/layers/feature-count.js.map +1 -1
  211. package/out/layers/manifest.d.ts +11 -10
  212. package/out/layers/manifest.d.ts.map +1 -1
  213. package/out/layers/manifest.js +12 -13
  214. package/out/layers/manifest.js.map +1 -1
  215. package/out/layers/schema.d.ts +23 -0
  216. package/out/layers/schema.d.ts.map +1 -1
  217. package/out/layers/schema.js +1 -1
  218. package/out/layers/schema.js.map +1 -1
  219. package/out/license/configured.d.ts +1 -1
  220. package/out/license/configured.d.ts.map +1 -1
  221. package/out/license/configured.js +2 -2
  222. package/out/license/configured.js.map +1 -1
  223. package/out/license/key/file.d.ts.map +1 -1
  224. package/out/license/key/file.js +2 -1
  225. package/out/license/key/file.js.map +1 -1
  226. package/out/license/key.d.ts +1 -1
  227. package/out/license/key.d.ts.map +1 -1
  228. package/out/license/key.js +2 -2
  229. package/out/license/key.js.map +1 -1
  230. package/out/license/stamp.d.ts +2 -2
  231. package/out/license/stamp.d.ts.map +1 -1
  232. package/out/license/stamp.js +2 -2
  233. package/out/license/stamp.js.map +1 -1
  234. package/out/locale/locale.d.ts +1 -1
  235. package/out/locale/locale.d.ts.map +1 -1
  236. package/out/locale/registry.d.ts +1 -1
  237. package/out/locale/registry.d.ts.map +1 -1
  238. package/out/locale/registry.js +1 -1
  239. package/out/locale/registry.js.map +1 -1
  240. package/out/module/compiled-freshness.js +1 -1
  241. package/out/module/compiled-freshness.js.map +1 -1
  242. package/out/module/package-command.d.ts +3 -2
  243. package/out/module/package-command.d.ts.map +1 -1
  244. package/out/module/package-command.js +3 -2
  245. package/out/module/package-command.js.map +1 -1
  246. package/out/module/packaged-data.js +1 -1
  247. package/out/module/packaged-data.js.map +1 -1
  248. package/out/module/resolve-from.js +1 -1
  249. package/out/module/resolve-from.js.map +1 -1
  250. package/out/numeric.d.ts +1 -1
  251. package/out/numeric.d.ts.map +1 -1
  252. package/out/numeric.js +3 -3
  253. package/out/numeric.js.map +1 -1
  254. package/out/objects.d.ts +3 -0
  255. package/out/objects.d.ts.map +1 -1
  256. package/out/objects.js +3 -0
  257. package/out/objects.js.map +1 -1
  258. package/out/paths.d.ts +20 -1
  259. package/out/paths.d.ts.map +1 -1
  260. package/out/paths.js +1 -1
  261. package/out/paths.js.map +1 -1
  262. package/out/pipeline/client-result.d.ts +15 -15
  263. package/out/pipeline/client-result.d.ts.map +1 -1
  264. package/out/pipeline/client-result.js +1 -1
  265. package/out/pipeline/result.d.ts +4 -3
  266. package/out/pipeline/result.d.ts.map +1 -1
  267. package/out/pipeline/runtime-pipeline.d.ts +16 -9
  268. package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
  269. package/out/pipeline/runtime-pipeline.js +43 -27
  270. package/out/pipeline/runtime-pipeline.js.map +1 -1
  271. package/out/pipeline/span-proposer.js +1 -1
  272. package/out/pipeline/span-proposer.js.map +1 -1
  273. package/out/pipeline/types.d.ts +394 -175
  274. package/out/pipeline/types.d.ts.map +1 -1
  275. package/out/pipeline/types.js +199 -4
  276. package/out/pipeline/types.js.map +1 -1
  277. package/out/pipeline.d.ts +4 -2
  278. package/out/pipeline.d.ts.map +1 -1
  279. package/out/pipeline.js +1 -1
  280. package/out/pipeline.js.map +1 -1
  281. package/out/policy/proposal-collection.d.ts +1 -1
  282. package/out/policy/proposal-collection.d.ts.map +1 -1
  283. package/out/policy/proposal-collection.js.map +1 -1
  284. package/out/policy/registry.d.ts +3 -1
  285. package/out/policy/registry.d.ts.map +1 -1
  286. package/out/policy/registry.js +4 -2
  287. package/out/policy/registry.js.map +1 -1
  288. package/out/resolver/authoritative-provider.d.ts +17 -17
  289. package/out/resolver/authoritative-provider.d.ts.map +1 -1
  290. package/out/resolver/authoritative-provider.js +2 -2
  291. package/out/resolver/coverage-facts.d.ts +3 -3
  292. package/out/resolver/coverage-facts.d.ts.map +1 -1
  293. package/out/resolver/fixture-authoritative-provider.d.ts.map +1 -1
  294. package/out/resolver/fixture-authoritative-provider.js +4 -0
  295. package/out/resolver/fixture-authoritative-provider.js.map +1 -1
  296. package/out/resolver/lookup-types.d.ts +52 -15
  297. package/out/resolver/lookup-types.d.ts.map +1 -1
  298. package/out/resolver/postcode-format.d.ts +3 -3
  299. package/out/resolver/postcode-format.d.ts.map +1 -1
  300. package/out/resolver/postcode-format.js +7 -7
  301. package/out/resolver/postcode-format.js.map +1 -1
  302. package/out/resolver/referential.d.ts +2 -2
  303. package/out/resolver/referential.d.ts.map +1 -1
  304. package/out/resolver/types.d.ts +126 -40
  305. package/out/resolver/types.d.ts.map +1 -1
  306. package/out/resolver/types.js +43 -1
  307. package/out/resolver/types.js.map +1 -1
  308. package/out/resolver.d.ts +5 -3
  309. package/out/resolver.d.ts.map +1 -1
  310. package/out/resolver.js +2 -2
  311. package/out/resolver.js.map +1 -1
  312. package/out/resources/git.js +1 -1
  313. package/out/resources/git.js.map +1 -1
  314. package/out/resources/languages.d.ts +0 -1
  315. package/out/resources/languages.d.ts.map +1 -1
  316. package/out/resources/languages.js +0 -1
  317. package/out/resources/languages.js.map +1 -1
  318. package/out/resources/libpostal.d.ts +1 -1
  319. package/out/resources/libpostal.d.ts.map +1 -1
  320. package/out/resources/whosonfirst/PlacetypeDataSource.d.ts +1 -1
  321. package/out/resources/whosonfirst/PlacetypeDataSource.d.ts.map +1 -1
  322. package/out/resources/whosonfirst/PlacetypeDataSource.js +2 -1
  323. package/out/resources/whosonfirst/PlacetypeDataSource.js.map +1 -1
  324. package/out/resources/whosonfirst/extract-repo.d.ts.map +1 -1
  325. package/out/resources/whosonfirst/extract-repo.js +2 -1
  326. package/out/resources/whosonfirst/extract-repo.js.map +1 -1
  327. package/out/resources/whosonfirst/placetypes/admin.d.ts +12 -12
  328. package/out/resources/whosonfirst/placetypes/admin.d.ts.map +1 -1
  329. package/out/resources/whosonfirst/placetypes/admin.js +9 -8
  330. package/out/resources/whosonfirst/placetypes/admin.js.map +1 -1
  331. package/out/resources/whosonfirst/placetypes/mermaid.d.ts +2 -1
  332. package/out/resources/whosonfirst/placetypes/mermaid.d.ts.map +1 -1
  333. package/out/resources/whosonfirst/placetypes/mermaid.js +1 -1
  334. package/out/resources/whosonfirst/placetypes/mermaid.js.map +1 -1
  335. package/out/resources/whosonfirst/placetypes/specificity.d.ts +3 -3
  336. package/out/resources/whosonfirst/placetypes/specificity.d.ts.map +1 -1
  337. package/out/resources/whosonfirst/placetypes/specificity.js +6 -6
  338. package/out/resources/whosonfirst/placetypes/specificity.js.map +1 -1
  339. package/out/resources.d.ts +1 -0
  340. package/out/resources.d.ts.map +1 -1
  341. package/out/resources.js +1 -0
  342. package/out/resources.js.map +1 -1
  343. package/out/scripting/arguments.d.ts +5 -4
  344. package/out/scripting/arguments.d.ts.map +1 -1
  345. package/out/scripting/arguments.js +5 -4
  346. package/out/scripting/arguments.js.map +1 -1
  347. package/out/scripting/command.d.ts +2 -2
  348. package/out/scripting/command.d.ts.map +1 -1
  349. package/out/scripting/command.js +1 -0
  350. package/out/scripting/command.js.map +1 -1
  351. package/out/scripting/operation.d.ts +1 -1
  352. package/out/scripting/operation.d.ts.map +1 -1
  353. package/out/scripting/operation.js +1 -1
  354. package/out/scripting/operation.js.map +1 -1
  355. package/out/scripting/utils.d.ts +3 -4
  356. package/out/scripting/utils.d.ts.map +1 -1
  357. package/out/scripting/utils.js +3 -4
  358. package/out/scripting/utils.js.map +1 -1
  359. package/out/strings/python-json.js +1 -1
  360. package/out/strings/python-json.js.map +1 -1
  361. package/out/tokenization/Span.d.ts +1 -1
  362. package/out/tokenization/Span.d.ts.map +1 -1
  363. package/out/tools/coarse-placer/build/dataset.d.ts +4 -2
  364. package/out/tools/coarse-placer/build/dataset.d.ts.map +1 -1
  365. package/out/tools/coarse-placer/build/dataset.js.map +1 -1
  366. package/out/tools/coarse-placer/build/outlier/exposure.d.ts +5 -3
  367. package/out/tools/coarse-placer/build/outlier/exposure.d.ts.map +1 -1
  368. package/out/tools/coarse-placer/build/outlier/exposure.js.map +1 -1
  369. package/out/tools/coarse-placer/build/outlier/latin.d.ts +3 -3
  370. package/out/tools/coarse-placer/build/outlier/oa.d.ts +3 -3
  371. package/out/tools/coarse-placer/eval/latin-offmap.d.ts +3 -3
  372. package/out/tools/coarse-placer/eval/openset.js +2 -2
  373. package/out/tools/coarse-placer/eval/openset.js.map +1 -1
  374. package/out/tools/coarse-placer/eval/quant-compare.d.ts +4 -4
  375. package/out/tools/coarse-placer/eval.d.ts +3 -3
  376. package/out/tools/coarse-placer/paths.js +1 -1
  377. package/out/tools/coarse-placer/paths.js.map +1 -1
  378. package/out/tools/coarse-placer/probe-frontier.d.ts +2 -2
  379. package/out/tools/coarse-placer/quantize.d.ts +2 -2
  380. package/out/tools/coarse-placer/train.d.ts +5 -5
  381. package/out/tools/download/libpostal-resources.d.ts.map +1 -1
  382. package/out/tools/download/libpostal-resources.js +2 -1
  383. package/out/tools/download/libpostal-resources.js.map +1 -1
  384. package/out/tools/download/ssl-address.d.ts +2 -2
  385. package/out/tools/generate-language-types.d.ts +1 -1
  386. package/out/tools/generate-language-types.js +1 -1
  387. package/out/tools/generate-language-types.js.map +1 -1
  388. package/out/trust-policies.d.ts +0 -1
  389. package/out/trust-policies.d.ts.map +1 -1
  390. package/out/trust-policies.js +0 -1
  391. package/out/trust-policies.js.map +1 -1
  392. package/out/types/Classification.d.ts +1 -1
  393. package/out/types/Classification.d.ts.map +1 -1
  394. package/out/types/classifier.d.ts +1 -1
  395. package/out/types/classifier.d.ts.map +1 -1
  396. package/out/utils/geodatabase-archive.d.ts +11 -4
  397. package/out/utils/geodatabase-archive.d.ts.map +1 -1
  398. package/out/utils/geodatabase-archive.js +1 -1
  399. package/out/utils/geodatabase-archive.js.map +1 -1
  400. package/out/utils/sqlite-rows.d.ts +2 -2
  401. package/out/utils/sqlite-rows.d.ts.map +1 -1
  402. package/out/utils/sqlite-rows.js +2 -2
  403. package/out/utils/sqlite-rows.js.map +1 -1
  404. package/out/utils/stream-to-disk.d.ts.map +1 -1
  405. package/out/utils/stream-to-disk.js +1 -1
  406. package/out/utils/stream-to-disk.js.map +1 -1
  407. package/out/utils/union-find.js +1 -1
  408. package/out/utils/union-find.js.map +1 -1
  409. package/out/vale.js +1 -1
  410. package/out/vale.js.map +1 -1
  411. package/out/workspaces.d.ts +1 -1
  412. package/out/workspaces.js +1 -1
  413. package/out/workspaces.js.map +1 -1
  414. package/package.json +46 -14
  415. package/tools/coarse-placer/build/dataset.ts +4 -2
  416. package/tools/coarse-placer/build/outlier/exposure.ts +5 -3
  417. package/tools/coarse-placer/build/outlier/latin.ts +3 -3
  418. package/tools/coarse-placer/build/outlier/oa.ts +3 -3
  419. package/tools/coarse-placer/eval/latin-offmap.ts +3 -3
  420. package/tools/coarse-placer/eval/openset.ts +3 -3
  421. package/tools/coarse-placer/eval/quant-compare.ts +4 -4
  422. package/tools/coarse-placer/eval.ts +3 -3
  423. package/tools/coarse-placer/paths.ts +1 -1
  424. package/tools/coarse-placer/probe-frontier.ts +2 -2
  425. package/tools/coarse-placer/quantize.ts +2 -2
  426. package/tools/coarse-placer/train.ts +5 -5
  427. package/tools/download/libpostal-resources.ts +2 -1
  428. package/tools/download/ssl-address.ts +2 -2
  429. package/tools/generate-language-types.ts +3 -3
package/lib/pipeline.ts CHANGED
@@ -20,32 +20,57 @@ export {
20
20
 
21
21
  export { EMPTY_SPAN_PROPOSER_LEXICON, proposeSpans } from "#pipeline/span-proposer"
22
22
  export type { ProposedSpan, ProposedSpanKind, SpanProposerLexicon } from "#pipeline/span-proposer"
23
- export { deriveInputMode, PipelineFaultStage, QueryIntentCode, WORD_CONSISTENCY_SHIP_DEFAULT } from "#pipeline/types"
23
+
24
+ export {
25
+ CASE_NORMALIZATIONS,
26
+ caseNormalizationOf,
27
+ DEFAULT_CASE_NORMALIZATION,
28
+ DEFAULT_PLACER_COUNTRY_USE,
29
+ deriveInputMode,
30
+ InputModeSchema,
31
+ InputModeSelectionSchema,
32
+ PipelineFaultStage,
33
+ POIIntentSchema,
34
+ POIQueryResultSchema,
35
+ POIResultSchema,
36
+ POISpatialRelationSchema,
37
+ QueryIntentCode,
38
+ QueryIntentCodeSchema,
39
+ QueryIntentMarkerSchema,
40
+ QueryKindSchema,
41
+ WORD_CONSISTENCY_SHIP_DEFAULT,
42
+ } from "#pipeline/types"
24
43
 
25
44
  export type {
26
45
  AddressClassifier,
46
+ CaseNormalization,
27
47
  ClassifierOpts,
28
48
  FSTMatcherLike,
29
49
  InputMode,
50
+ InputModeSelection,
30
51
  LocaleDetector,
31
52
  LocaleHint,
32
- MachinePreferences,
33
- NormalizedInputLite,
34
53
  PhraseGrouper,
35
54
  PhraseKind,
36
55
  PhraseProposal,
37
- PipelineFault,
38
56
  PipelineOpts,
39
- PipelineResult,
40
57
  PipelineTiming,
41
- PlacetypePairPassthrough,
58
+ PlacetypePairSelection,
59
+ PlacerCountryUse,
42
60
  POIIntent,
43
- POIIntentOutcome,
61
+ POIQueryResult,
44
62
  POIResult,
63
+ POISpatialRelation,
45
64
  QueryIntentMarker,
46
65
  QueryKind,
47
66
  QueryKindResult,
48
67
  QueryShapeLite,
49
68
  RuntimePipelineStages,
69
+ StageSource,
50
70
  UserLocation,
71
+ WordConsistencyOpts,
72
+ WordConsistencySetting,
51
73
  } from "#pipeline/types"
74
+
75
+ export type { MachinePreferences } from "#pipeline/preferences"
76
+ export type { PipelineFault, PipelineResult } from "#pipeline/result"
@@ -43,7 +43,7 @@ export async function collectProposals(
43
43
  */
44
44
  export function filterByPolicy(
45
45
  proposals: readonly ClassificationProposal[],
46
- policy: PolicyRegistry | undefined,
46
+ policy: PolicyRegistry | null,
47
47
  locale: string | undefined
48
48
  ): ClassificationProposal[] {
49
49
  if (!policy) return [...proposals]
@@ -18,7 +18,7 @@ import type { ClassificationProposal } from "#types"
18
18
 
19
19
  const GLOBAL_LOCALE_KEY = "*"
20
20
 
21
- function policyKey(component: ComponentTag, locale: string | undefined): string {
21
+ function policyKey(component: ComponentTag, locale: string | null | undefined): string {
22
22
  return `${component}::${locale ?? GLOBAL_LOCALE_KEY}`
23
23
  }
24
24
 
@@ -32,9 +32,11 @@ export class InMemoryPolicyRegistry implements PolicyRegistry {
32
32
  #entries = new Map<string, ClassifierPolicy>()
33
33
 
34
34
  /**
35
- * Build a registry pre-loaded with `mode` for every component (default `neural_only`).
35
+ * Build a registry pre-loaded with `mode` for every component.
36
36
  *
37
37
  * The input-shape router passes a shape-derived default so the whole table starts from the routed prior.
38
+ *
39
+ * @param mode ["neural_only"] The policy every component starts with.
38
40
  */
39
41
  static withDefaults(mode: PolicyMode = "neural_only"): InMemoryPolicyRegistry {
40
42
  const registry = new InMemoryPolicyRegistry()
@@ -76,7 +78,7 @@ export class InMemoryPolicyRegistry implements PolicyRegistry {
76
78
  if (localized) return localized
77
79
  }
78
80
 
79
- const global = this.#entries.get(policyKey(component, undefined))
81
+ const global = this.#entries.get(policyKey(component, null))
80
82
 
81
83
  if (global) return global
82
84
 
@@ -7,8 +7,8 @@
7
7
  * Results include the provider's identity, licensing and provenance.
8
8
  * This keeps provider assertions separate from Mailwoman's inferences.
9
9
  *
10
- * An absent provider field remains `undefined`; the interface uses no substitute value such as `false`, `0`, or `""`.
11
- * Refusal and ambiguity are explicit outcomes.
10
+ * An absent provider field is `null`; the interface uses no substitute value such as `false`, `0`, or `""`.
11
+ * Refusal and ambiguity are explicit results.
12
12
  * Provider assertions do not overwrite Mailwoman's answer. The response contains both for the consumer to compare.
13
13
  * Provider product names stay out of this interface. Product-specific mapping belongs in an adapter package.
14
14
  */
@@ -25,8 +25,8 @@ export interface AuthoritativeQueryComponent {
25
25
  * Character offsets into {@link AuthoritativeQuery.normalizedQuery},
26
26
  * absent for components assembled from multiple spans.
27
27
  */
28
- start?: number
29
- end?: number
28
+ start: number | null
29
+ end: number | null
30
30
  }
31
31
 
32
32
  /**
@@ -40,15 +40,15 @@ export interface AuthoritativeQuery {
40
40
  /**
41
41
  * ISO 3166-1 alpha-2, absent when the pipeline could not commit to one.
42
42
  */
43
- countryCode?: string
43
+ countryCode: string | null
44
44
  /**
45
45
  * The caller's locale hint (BCP 47), when declared.
46
46
  */
47
- locale?: string
47
+ locale: string | null
48
48
  /**
49
49
  * Mailwoman's own confidence in the parse, [0, 1], where absent means unmeasured rather than zero.
50
50
  */
51
- parseConfidence?: number
51
+ parseConfidence: number | null
52
52
  }
53
53
 
54
54
  /**
@@ -74,25 +74,25 @@ export interface AuthoritativeMatch {
74
74
  * Authoritative object identifiers by scheme, lowercase keys owned by the adapter,
75
75
  * omitted when the provider supplies none.
76
76
  */
77
- objectIDs?: Readonly<Record<string, string>>
77
+ objectIDs: Readonly<Record<string, string>> | null
78
78
  /**
79
79
  * Canonical address fields as the provider returned them, keyed by the provider's own names
80
80
  * and deliberately not remapped to {@link ComponentTag}, because a lossy remap would
81
81
  * overwrite the assertion this interface exists to preserve.
82
82
  */
83
- canonicalFields?: Readonly<Record<string, string>>
84
- latitude?: number
85
- longitude?: number
83
+ canonicalFields: Readonly<Record<string, string>> | null
84
+ latitude: number | null
85
+ longitude: number | null
86
86
  /**
87
87
  * The provider's stated precision or tier for the coordinate, in the provider's own vocabulary,
88
88
  * because the resolver's tier taxonomy does not apply to an assertion Mailwoman did not make.
89
89
  */
90
- coordinatePrecision?: string
90
+ coordinatePrecision: string | null
91
91
  matchStatus: AuthoritativeMatchStatus
92
92
  /**
93
93
  * The provider's own match score, provider-defined in scale and ordinal only.
94
94
  */
95
- providerScore?: number
95
+ providerScore: number | null
96
96
  }
97
97
 
98
98
  /**
@@ -128,20 +128,20 @@ export interface AuthoritativeResponse {
128
128
  /**
129
129
  * Source attribution for downstream display, when the provider's terms require one.
130
130
  */
131
- attribution?: string
131
+ attribution: string | null
132
132
  /**
133
133
  * License or terms identifier for downstream display, retained so a consumer can keep
134
134
  * provider-derived records under the provider's terms using this result.
135
135
  */
136
- license?: string
136
+ license: string | null
137
137
  /**
138
138
  * When the provider answered, ISO-8601, absent when the transport does not surface it.
139
139
  */
140
- retrievedAt?: string
140
+ retrievedAt: string | null
141
141
  /**
142
142
  * The provider's dataset version or epoch, when it states one.
143
143
  */
144
- datasetVersion?: string
144
+ datasetVersion: string | null
145
145
  }
146
146
 
147
147
  /**
@@ -36,11 +36,11 @@ export interface CountryCoverageFact {
36
36
  /**
37
37
  * Measured hard-resolve rate (0..1) on the panel identified by `source`, when the receipt recorded one.
38
38
  */
39
- hardResolveRate?: number
39
+ hardResolveRate: number | null
40
40
  /**
41
41
  * Panel size behind `hardResolveRate`, when recorded.
42
42
  */
43
- sampleSize?: number
43
+ sampleSize: number | null
44
44
  /**
45
45
  * ISO-8601 date of the measurement / promote eval.
46
46
  */
@@ -76,7 +76,7 @@ export interface CountryBBoxFact {
76
76
  * {@link ResolverBackend}/{@link Resolver} handle so consumers read the facts from
77
77
  * the artifact they are actually resolving against.
78
78
  *
79
- * `undefined` on the handle means the artifact predates the manifest.
79
+ * `null` on the handle means the artifact predates the manifest.
80
80
  * Consumers then use the code constants.
81
81
  *
82
82
  * Those constants produce the same results as the pre-manifest implementation.
@@ -71,6 +71,9 @@ export function createFixtureAuthoritativeProvider(
71
71
  status: AuthoritativeResponseStatus.Refused,
72
72
  matches: [],
73
73
  attribution: FIXTURE_ATTRIBUTION,
74
+ license: null,
75
+ retrievedAt: null,
76
+ datasetVersion: null,
74
77
  }
75
78
  },
76
79
  }
@@ -101,6 +104,7 @@ export function fixtureExactMatch(overrides: Partial<AuthoritativeMatch> = {}):
101
104
  ],
102
105
  attribution: FIXTURE_ATTRIBUTION,
103
106
  license: "fixture-terms-v1",
107
+ retrievedAt: null,
104
108
  datasetVersion: "fixture-2026-08",
105
109
  }
106
110
  }
@@ -36,8 +36,8 @@ export interface AddressPointHit {
36
36
  * A query that never contained those values cannot supply them.
37
37
  * Optional, because some sources omit one or both.
38
38
  */
39
- localityNorm?: string
40
- postcode?: string
39
+ localityNorm: string | null
40
+ postcode: string | null
41
41
  }
42
42
 
43
43
  /**
@@ -74,7 +74,7 @@ export interface AddressPointLookup {
74
74
  * bounding box scopes the `(street, number)` probe instead.
75
75
  * US situs never passes it, so the Latin path stays byte-stable.
76
76
  */
77
- bbox?: { minLat: number; maxLat: number; minLon: number; maxLon: number }
77
+ bbox: { minLat: number; maxLat: number; minLon: number; maxLon: number } | null
78
78
  }): AddressPointHit | null
79
79
  }
80
80
 
@@ -99,13 +99,13 @@ export interface InterpolatedPointHit {
99
99
  /**
100
100
  * False when only the opposite side's range contained the number (right block, wrong side).
101
101
  */
102
- parityMatched?: boolean
102
+ parityMatched: boolean | null
103
103
  /**
104
104
  * `both` means neighbors bracketed it.
105
105
  *
106
106
  * `single` means one-sided extrapolation with larger uncertainty.
107
107
  */
108
- bracket?: "both" | "single"
108
+ bracket: "both" | "single" | null
109
109
  /**
110
110
  * Honest uncertainty radius in meters (half the matched segment length).
111
111
  */
@@ -144,8 +144,7 @@ export interface InterpolationLookup {
144
144
  * so it ships in the artifact.
145
145
  * The resolver applies it as the default whenever `ResolveOpts.interpolationRadiusCalibration` is absent.
146
146
  *
147
- * `undefined` means the artifact defines no multiplier.
148
- * An implementation without the property also reports no multiplier.
147
+ * `null` means the artifact defines no multiplier.
149
148
  *
150
149
  * Extracts built before the metadata table existed use that behavior.
151
150
  * The ladder then uses the caller-supplied factor or raw value, as before.
@@ -153,7 +152,7 @@ export interface InterpolationLookup {
153
152
  * Implementations must read this at open time (constructor/factory), never per-lookup.
154
153
  * `find()` is synchronous by design.
155
154
  */
156
- readonly radiusCalibration?: number
155
+ readonly radiusCalibration: number | null
157
156
  }
158
157
 
159
158
  /**
@@ -195,30 +194,71 @@ export interface StreetCentroidLookup {
195
194
  }
196
195
 
197
196
  /**
198
- * One admin-ancestry entry a PFX1 node asserts (coarsest-first: country → constituent country → district).
197
+ * One Who's On First place in an administrative ancestry.
198
+ *
199
+ * A PFX1 node lists them coarsest first.
200
+ * A POI result lists them deepest first.
199
201
  */
200
- export interface PostcodePrefixAncestor {
202
+ export interface WOFAncestor {
203
+ /**
204
+ * The WOF placetype, such as `"country"`, `"macroregion"` or `"region"`.
205
+ */
201
206
  placetype: string
207
+ /**
208
+ * The Who's On First ID that consumers join against the gazetteer.
209
+ */
202
210
  wofID: number
211
+ /**
212
+ * The display name.
213
+ * It keeps a trace readable without a gazetteer lookup.
214
+ */
215
+ name: string
216
+ }
217
+
218
+ /**
219
+ * One POI found near a search center, with its distance from that center in meters.
220
+ */
221
+ export interface POIDistanceHit {
203
222
  name: string
223
+ lat: number
224
+ lon: number
225
+ distanceM: number
226
+ country: string
227
+ confidence: number
204
228
  }
205
229
 
230
+ /**
231
+ * One gazetteer hit for a postcode.
232
+ *
233
+ * A `lat` and `lon` of 0 mean the postcode is known but has no centroid.
234
+ */
235
+ export interface PostcodePlace {
236
+ country: string
237
+ lat: number
238
+ lon: number
239
+ }
240
+
241
+ /**
242
+ * One admin-ancestry entry a PFX1 node asserts (coarsest-first: country → constituent country → district).
243
+ */
244
+ export type PostcodePrefixAncestor = WOFAncestor
245
+
206
246
  /**
207
247
  * A PFX1 postcode-prefix node, the partial-code prior's payload ({@link ResolveOpts.postcodePrefixPrior}).
208
248
  *
209
249
  * The coordinate is optional and its absence is meaningful.
210
250
  * An ancestry-only tier such as Northern Ireland's BT districts includes `ancestors` and no `lat`/`lon`.
211
251
  *
212
- * The type represents that omission as absence.
252
+ * The type represents that omission as `null`.
213
253
  * `radiusP95Km` is mandatory whenever a coordinate is present, because a 1-digit US band
214
254
  * and a GB outward code are both a prefix with a centroid and differ by 200×.
215
255
  */
216
256
  export interface PostcodePrefixNode {
217
257
  prefix: string
218
258
  ancestors: readonly PostcodePrefixAncestor[]
219
- lat?: number
220
- lon?: number
221
- radiusP95Km?: number
259
+ lat: number | null
260
+ lon: number | null
261
+ radiusP95Km: number | null
222
262
  unitCount: number
223
263
  }
224
264
 
@@ -10,7 +10,7 @@
10
10
  * across all jurisdictions to stand as country evidence, and in which calling context.
11
11
  *
12
12
  * That split matters because the two questions have different answers. Codex's `candidateSystemsForPostcode`
13
- * asks which of its ten address systems accept a string, so a shape unique among those ten still says
13
+ * asks which of its ten address systems accept a string, so a shape unique among those ten still reveals
14
14
  * little about the other 240 jurisdictions. The tables below are a narrower claim, each entry verified
15
15
  * as non-overlapping, and they stay narrow deliberately.
16
16
  *
@@ -24,8 +24,8 @@ import { wholePostcodeShape } from "@mailwoman/codex/postcode/shapes"
24
24
  /**
25
25
  * Shapes that identify a country unambiguously, by their codex label.
26
26
  *
27
- * They are a stronger signal than the language-based coarse placer, which conflates GB
28
- * and US and routes some GB addresses to US namesakes.
27
+ * They are a stronger signal than the language-based coarse placer.
28
+ * That placer conflates GB and US and routes some GB addresses to US namesakes.
29
29
  * Letters-first formats never match a US ZIP.
30
30
  *
31
31
  * Extend this list only with a shape verified as non-overlapping across jurisdictions,
@@ -41,8 +41,8 @@ const SINGLE_COUNTRY_SHAPE_LABELS: ReadonlyArray<readonly [label: string, countr
41
41
  ["GB", "GB"],
42
42
  // CA `K2P 1L4` — `A#A #A#`, ending `\d[A-Z]\d`, distinct from GB's `\d[A-Z]{2}`.
43
43
  ["CA", "CA"],
44
- // IE Eircode `D02 AF30` — a routing key plus a 4-alnum unique part,
45
- // which separates it from GB's 3-character `\d[A-Z]{2}` inward.
44
+ // IE Eircode `D02 AF30` is a routing key plus a 4-alnum unique part.
45
+ // That part separates it from GB's 3-character `\d[A-Z]{2}` inward.
46
46
  // Belfast `BT1 5GS` stays GB, because Northern Ireland uses GB postcodes.
47
47
  ["IE", "IE"],
48
48
  ]
@@ -50,8 +50,8 @@ const SINGLE_COUNTRY_SHAPE_LABELS: ReadonlyArray<readonly [label: string, countr
50
50
  /**
51
51
  * The compiled form of {@linkcode SINGLE_COUNTRY_SHAPE_LABELS}, resolved once at module load.
52
52
  *
53
- * A label this module states and codex does not carry therefore throws on first import, where
54
- * resolving per call would instead let that label refuse every postcode it was meant to accept.
53
+ * A label this module states and codex does not define therefore throws on first import,
54
+ * where resolving per call would instead let that label refuse every postcode it was meant to accept.
55
55
  */
56
56
  const SINGLE_COUNTRY_SHAPES: ReadonlyArray<readonly [re: RegExp, country: string]> = SINGLE_COUNTRY_SHAPE_LABELS.map(
57
57
  ([label, country]) => [wholePostcodeShape(label), country]
@@ -60,7 +60,7 @@ const SINGLE_COUNTRY_SHAPES: ReadonlyArray<readonly [re: RegExp, country: string
60
60
  /**
61
61
  * The country a parsed postcode's format implies, or null.
62
62
  */
63
- export function countryFromPostcodeFormat(postcode: string | undefined): string | null {
63
+ export function countryFromPostcodeFormat(postcode: string | null | undefined): string | null {
64
64
  const p = postcode?.trim()
65
65
 
66
66
  if (!p) return null
@@ -103,7 +103,7 @@ const NL_PC6: RegExp = wholePostcodeShape("NL")
103
103
  * claim, so a consumer applies it only to a tree that is a bare postcode, where the
104
104
  * street-fragment collision the single-country list must exclude cannot arise.
105
105
  */
106
- export function countriesFromPostcodeFormat(postcode: string | undefined): readonly string[] {
106
+ export function countriesFromPostcodeFormat(postcode: string | null | undefined): readonly string[] {
107
107
  const p = postcode?.trim()
108
108
 
109
109
  if (!p) return []
@@ -81,8 +81,8 @@ export function referentialFromPopulation(population: number | null | undefined)
81
81
  * That position matches the existing order for a candidate with no population.
82
82
  */
83
83
  export interface ReferentiallyRankable {
84
- referential?: number
85
- population?: number
84
+ referential?: number | null
85
+ population?: number | null
86
86
  }
87
87
 
88
88
  /**