mailwoman 9.0.0 → 9.1.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 (878) hide show
  1. package/cli-kit/index.ts +1 -152
  2. package/cli-kit/shared.ts +176 -0
  3. package/cli.ts +52 -8
  4. package/commands/autocomplete.tsx +22 -6
  5. package/commands/clients/generate.tsx +1 -1
  6. package/commands/corpus/align-shard.tsx +1 -2
  7. package/commands/corpus/audit.tsx +1 -2
  8. package/commands/corpus/build.tsx +1 -2
  9. package/commands/corpus/download.tsx +1 -2
  10. package/commands/corpus/fetch.tsx +1 -2
  11. package/commands/corpus/golden/expand.tsx +1 -2
  12. package/commands/corpus/golden/promote.tsx +1 -2
  13. package/commands/corpus/golden-relabel.tsx +1 -2
  14. package/commands/corpus/ingest-csv.tsx +1 -2
  15. package/commands/corpus/overlay-manifest.tsx +1 -2
  16. package/commands/corpus/run.tsx +1 -2
  17. package/commands/corpus/shard/index.tsx +1 -2
  18. package/commands/corpus/shard/kryptonite.tsx +1 -2
  19. package/commands/corpus/shard/translit.tsx +1 -2
  20. package/commands/corpus/stats.tsx +1 -2
  21. package/commands/corpus/sub-venue-extract.tsx +1 -2
  22. package/commands/corpus/sub-venue-lexicon.tsx +1 -2
  23. package/commands/corpus/upload.tsx +1 -2
  24. package/commands/coverage/build.tsx +1 -1
  25. package/commands/data/index.tsx +121 -0
  26. package/commands/data/pull.tsx +1 -1
  27. package/commands/data/status.tsx +1 -1
  28. package/commands/dev/download/libpostal-resources.tsx +1 -2
  29. package/commands/dev/download/ssl-address.tsx +1 -2
  30. package/commands/dev/generate/country-reference.tsx +1 -2
  31. package/commands/dev/generate/language-types.tsx +1 -2
  32. package/commands/dev/generate/official-languages.tsx +1 -2
  33. package/commands/dev/generate/trace-fixture.tsx +2 -3
  34. package/commands/dev/jsonl-to-parquet.tsx +1 -2
  35. package/commands/dev/lint/corpus-shard.tsx +1 -2
  36. package/commands/dev/lint/mdx-angles.tsx +2 -3
  37. package/commands/dev/lint/shard-vocab.tsx +1 -2
  38. package/commands/doctor.tsx +114 -57
  39. package/commands/eval/capability-manifest.tsx +1 -1
  40. package/commands/eval/error-analysis.tsx +1 -1
  41. package/commands/eval/es-postcode-centroids.tsx +1 -1
  42. package/commands/eval/fragment-board.tsx +1 -1
  43. package/commands/eval/fragment-dev.tsx +1 -1
  44. package/commands/eval/gate.tsx +1 -1
  45. package/commands/eval/gauntlet-build.tsx +1 -1
  46. package/commands/eval/gauntlet.tsx +1 -1
  47. package/commands/eval/invariance.tsx +9 -5
  48. package/commands/eval/ledger-append.tsx +1 -1
  49. package/commands/eval/mask-regression.tsx +1 -1
  50. package/commands/eval/oa-resolver.tsx +1 -1
  51. package/commands/eval/oracle-k.tsx +1 -1
  52. package/commands/eval/parity.tsx +1 -1
  53. package/commands/eval/poi-board.tsx +1 -1
  54. package/commands/eval/preset-compare.tsx +1 -1
  55. package/commands/eval/score-trends.tsx +1 -1
  56. package/commands/filer/edgar-ingest.tsx +83 -0
  57. package/commands/filer/linkage-eval.tsx +1 -2
  58. package/commands/gazetteer/affix-relabel.tsx +23 -9
  59. package/commands/gazetteer/anchor-lexicon.tsx +1 -2
  60. package/commands/gazetteer/build/admin.tsx +2 -3
  61. package/commands/gazetteer/build/anchor-lookup.tsx +1 -2
  62. package/commands/gazetteer/build/bdc.tsx +2 -3
  63. package/commands/gazetteer/build/candidate.tsx +32 -4
  64. package/commands/gazetteer/build/coincident-roles.tsx +1 -2
  65. package/commands/gazetteer/build/fst.tsx +1 -2
  66. package/commands/gazetteer/build/fts.tsx +1 -2
  67. package/commands/gazetteer/build/index.tsx +3 -4
  68. package/commands/gazetteer/build/locality-surface-lexicon.tsx +1 -2
  69. package/commands/gazetteer/build/nl-pc6.tsx +1 -2
  70. package/commands/gazetteer/build/poi-brands.tsx +3 -4
  71. package/commands/gazetteer/build/poi.tsx +4 -5
  72. package/commands/gazetteer/build/postcode-codepoint.tsx +2 -3
  73. package/commands/gazetteer/build/postcode-geonames.tsx +3 -4
  74. package/commands/gazetteer/build/postcode-locality.tsx +1 -2
  75. package/commands/gazetteer/build/postcode-ni-osm.tsx +2 -3
  76. package/commands/gazetteer/build/postcode-prefix.tsx +2 -3
  77. package/commands/gazetteer/build/postcode-shard.tsx +2 -3
  78. package/commands/gazetteer/build/street-morphology.tsx +1 -2
  79. package/commands/gazetteer/build/street-type-lexicon.tsx +1 -2
  80. package/commands/gazetteer/census.tsx +1 -1
  81. package/commands/gazetteer/conventions.tsx +1 -2
  82. package/commands/gazetteer/granularity.tsx +1 -1
  83. package/commands/gazetteer/importance.tsx +73 -48
  84. package/commands/gazetteer/inspect/fst.tsx +8 -7
  85. package/commands/gazetteer/inspect/graph.tsx +1 -3
  86. package/commands/gazetteer/inspect/mermaid.tsx +1 -3
  87. package/commands/gazetteer/inspect/placetype-stats.tsx +1 -2
  88. package/commands/gazetteer/inspect/sync.tsx +1 -2
  89. package/commands/gazetteer/inspect/tree.tsx +1 -3
  90. package/commands/gazetteer/overture-ingest.tsx +1 -2
  91. package/commands/gazetteer/pair-index.tsx +2 -2
  92. package/commands/gazetteer/polygons.tsx +1 -2
  93. package/commands/gazetteer/postal-alias.tsx +1 -2
  94. package/commands/gazetteer/postal-city.tsx +1 -2
  95. package/commands/gazetteer/postcode-binary.tsx +1 -1
  96. package/commands/gazetteer/postcode-intl.tsx +1 -2
  97. package/commands/gazetteer/promote.tsx +2 -3
  98. package/commands/gazetteer/publish.tsx +2 -8
  99. package/commands/gazetteer/release.tsx +3 -4
  100. package/commands/gazetteer/verify-codepoint.tsx +1 -2
  101. package/commands/gazetteer/verify.tsx +2 -3
  102. package/commands/geocode.tsx +127 -7
  103. package/commands/gnaf/assemble.tsx +1 -2
  104. package/commands/openapi.tsx +1 -2
  105. package/commands/parse.tsx +86 -18
  106. package/commands/placer/build-dataset.tsx +1 -2
  107. package/commands/placer/eval.tsx +1 -2
  108. package/commands/placer/probe-frontier.tsx +1 -2
  109. package/commands/placer/quantize.tsx +1 -2
  110. package/commands/placer/train.tsx +1 -2
  111. package/commands/poi.tsx +7 -1
  112. package/commands/registry/convert/tx-hhsc.tsx +1 -2
  113. package/commands/registry/dedup-ceiling.tsx +1 -2
  114. package/commands/registry/gold-set-sample.tsx +1 -2
  115. package/commands/registry/matcher-scale.tsx +1 -2
  116. package/commands/registry/run.tsx +1 -1
  117. package/commands/registry/scorer-eval.tsx +1 -1
  118. package/commands/registry/train-scorer.tsx +1 -1
  119. package/commands/registry/viz.tsx +1 -2
  120. package/commands/release/hf.tsx +1 -1
  121. package/commands/reverse.tsx +8 -3
  122. package/commands/serve.tsx +1 -1
  123. package/commands/situs/address-points.tsx +1 -2
  124. package/commands/situs/attribution-manifest.tsx +1 -2
  125. package/commands/situs/build.tsx +1 -2
  126. package/commands/situs/interpolation-shard.tsx +1 -1
  127. package/commands/situs/interpolation.tsx +13 -15
  128. package/commands/skill/install.tsx +1 -2
  129. package/commands/tiger/fetch.tsx +1 -2
  130. package/commands/tiger/race-dots-map.tsx +1 -2
  131. package/commands/tiger/race-dots.tsx +1 -2
  132. package/commands/tiger/redistricting.tsx +1 -2
  133. package/commands/tiles/publish.tsx +1 -2
  134. package/commands/wof/graph.tsx +1 -2
  135. package/commands/wof/mermaid.tsx +1 -2
  136. package/commands/wof/prepare.tsx +1 -2
  137. package/commands/wof/sync.tsx +1 -2
  138. package/commands/wof/tree.tsx +1 -2
  139. package/dev-tools/postcode-coherence-coverage.run.ts +1 -1
  140. package/dev-tools/postcode-coherence-scale.run.ts +1 -1
  141. package/dev-tools/probe-query-intent.run.ts +154 -0
  142. package/dev-tools/probe-referential-delta.run.ts +169 -0
  143. package/dev-tools/score-hard-slice-board.run.ts +8 -0
  144. package/dev-tools/score-interesting-addresses.run.ts +102 -0
  145. package/dev-tools/score-street-name-boundaries.run.ts +84 -0
  146. package/dev-tools/score-world-structures.run.ts +108 -0
  147. package/doctor/checks.ts +51 -3
  148. package/doctor/runner.ts +78 -4
  149. package/eval-harness/de-order-eval.ts +189 -0
  150. package/eval-harness/demo-cascade-rows.ts +181 -0
  151. package/eval-harness/demo-cascade-smoke.ts +413 -0
  152. package/eval-harness/external-arenas.ts +175 -0
  153. package/eval-harness/fr-parse-recall.ts +286 -0
  154. package/eval-harness/gates/v2.3.0-nl-postcode.json +1 -1
  155. package/eval-harness/gates/v5.3.0-family.json +1 -1
  156. package/eval-harness/gates/v9.0.0-base.json +2 -0
  157. package/eval-harness/gauntlet/build-regression-db.ts +2 -1
  158. package/eval-harness/gauntlet/cases/ae/street-name-boundaries.jsonl +5 -0
  159. package/eval-harness/gauntlet/cases/ar/street-name-boundaries.jsonl +5 -0
  160. package/eval-harness/gauntlet/cases/at/street-name-boundaries.jsonl +2 -0
  161. package/eval-harness/gauntlet/cases/au/street-name-boundaries.jsonl +13 -0
  162. package/eval-harness/gauntlet/cases/br/brasilia-hierarchy.jsonl +4 -0
  163. package/eval-harness/gauntlet/cases/br/street-name-boundaries.jsonl +5 -0
  164. package/eval-harness/gauntlet/cases/br/world-structures.jsonl +5 -0
  165. package/eval-harness/gauntlet/cases/ca/street-name-boundaries.jsonl +15 -0
  166. package/eval-harness/gauntlet/cases/co/world-structures.jsonl +1 -0
  167. package/eval-harness/gauntlet/cases/cv/world-structures.jsonl +1 -0
  168. package/eval-harness/gauntlet/cases/de/street-name-boundaries.jsonl +4 -0
  169. package/eval-harness/gauntlet/cases/es/street-name-boundaries.jsonl +16 -0
  170. package/eval-harness/gauntlet/cases/fr/street-name-boundaries.jsonl +15 -0
  171. package/eval-harness/gauntlet/cases/gb/regression.jsonl +12 -0
  172. package/eval-harness/gauntlet/cases/gb/street-name-boundaries.jsonl +24 -0
  173. package/eval-harness/gauntlet/cases/gh/world-structures.jsonl +2 -0
  174. package/eval-harness/gauntlet/cases/hk/street-name-boundaries.jsonl +4 -0
  175. package/eval-harness/gauntlet/cases/hu/street-name-boundaries.jsonl +2 -0
  176. package/eval-harness/gauntlet/cases/id/street-name-boundaries.jsonl +1 -0
  177. package/eval-harness/gauntlet/cases/ie/world-structures.jsonl +1 -0
  178. package/eval-harness/gauntlet/cases/it/street-name-boundaries.jsonl +7 -0
  179. package/eval-harness/gauntlet/cases/jp/regression.jsonl +2 -0
  180. package/eval-harness/gauntlet/cases/jp/street-name-boundaries.jsonl +3 -0
  181. package/eval-harness/gauntlet/cases/jp/world-structures.jsonl +2 -0
  182. package/eval-harness/gauntlet/cases/kw/street-name-boundaries.jsonl +1 -0
  183. package/eval-harness/gauntlet/cases/mn/world-structures.jsonl +3 -0
  184. package/eval-harness/gauntlet/cases/mx/street-name-boundaries.jsonl +2 -0
  185. package/eval-harness/gauntlet/cases/ne/world-structures.jsonl +1 -0
  186. package/eval-harness/gauntlet/cases/ng/world-structures.jsonl +2 -0
  187. package/eval-harness/gauntlet/cases/ni/world-structures.jsonl +2 -0
  188. package/eval-harness/gauntlet/cases/om/street-name-boundaries.jsonl +1 -0
  189. package/eval-harness/gauntlet/cases/pt/street-name-boundaries.jsonl +4 -0
  190. package/eval-harness/gauntlet/cases/ru/street-name-boundaries.jsonl +4 -0
  191. package/eval-harness/gauntlet/cases/sa/street-name-boundaries.jsonl +4 -0
  192. package/eval-harness/gauntlet/cases/seed-case.ts +12 -0
  193. package/eval-harness/gauntlet/cases/sg/street-name-boundaries.jsonl +2 -0
  194. package/eval-harness/gauntlet/cases/th/street-name-boundaries.jsonl +4 -0
  195. package/eval-harness/gauntlet/cases/tr/street-name-boundaries.jsonl +1 -0
  196. package/eval-harness/gauntlet/cases/us/street-name-boundaries.jsonl +26 -0
  197. package/eval-harness/gauntlet/check-case.ts +165 -6
  198. package/eval-harness/gauntlet/harness.ts +7 -2
  199. package/eval-harness/gauntlet/schema.ts +10 -0
  200. package/eval-harness/invariance/runner.ts +173 -42
  201. package/eval-harness/oa-resolver-eval.ts +20 -16
  202. package/eval-harness/per-locale-f1.ts +598 -0
  203. package/eval-harness/promotion-gate.ts +341 -122
  204. package/eval-harness/score-affix.ts +203 -0
  205. package/eval-harness/score-country-homograph.ts +234 -0
  206. package/gazetteer-pipeline/admin/index.ts +2 -2
  207. package/gazetteer-pipeline/evidence-lexicons.ts +1 -1
  208. package/gazetteer-pipeline/index.ts +45 -4
  209. package/gazetteer-pipeline/postcode/index.ts +5 -5
  210. package/geocode-core.ts +259 -26
  211. package/out/cli-kit/index.d.ts +1 -78
  212. package/out/cli-kit/index.d.ts.map +1 -1
  213. package/out/cli-kit/index.js +1 -74
  214. package/out/cli-kit/index.js.map +1 -1
  215. package/out/cli-kit/shared.d.ts +97 -0
  216. package/out/cli-kit/shared.d.ts.map +1 -0
  217. package/out/cli-kit/shared.js +96 -0
  218. package/out/cli-kit/shared.js.map +1 -0
  219. package/out/cli.js +44 -6
  220. package/out/cli.js.map +1 -1
  221. package/out/commands/autocomplete.d.ts +10 -2
  222. package/out/commands/autocomplete.d.ts.map +1 -1
  223. package/out/commands/autocomplete.js +12 -4
  224. package/out/commands/autocomplete.js.map +1 -1
  225. package/out/commands/clients/generate.d.ts +1 -1
  226. package/out/commands/clients/generate.d.ts.map +1 -1
  227. package/out/commands/clients/generate.js +1 -1
  228. package/out/commands/clients/generate.js.map +1 -1
  229. package/out/commands/corpus/align-shard.d.ts +1 -1
  230. package/out/commands/corpus/align-shard.d.ts.map +1 -1
  231. package/out/commands/corpus/align-shard.js +1 -1
  232. package/out/commands/corpus/align-shard.js.map +1 -1
  233. package/out/commands/corpus/audit.d.ts +1 -1
  234. package/out/commands/corpus/audit.d.ts.map +1 -1
  235. package/out/commands/corpus/audit.js +1 -1
  236. package/out/commands/corpus/audit.js.map +1 -1
  237. package/out/commands/corpus/build.d.ts +1 -1
  238. package/out/commands/corpus/build.d.ts.map +1 -1
  239. package/out/commands/corpus/build.js +1 -1
  240. package/out/commands/corpus/build.js.map +1 -1
  241. package/out/commands/corpus/download.d.ts +1 -1
  242. package/out/commands/corpus/download.d.ts.map +1 -1
  243. package/out/commands/corpus/download.js +1 -1
  244. package/out/commands/corpus/download.js.map +1 -1
  245. package/out/commands/corpus/fetch.d.ts +1 -1
  246. package/out/commands/corpus/fetch.d.ts.map +1 -1
  247. package/out/commands/corpus/fetch.js +1 -1
  248. package/out/commands/corpus/fetch.js.map +1 -1
  249. package/out/commands/corpus/golden/expand.d.ts +1 -1
  250. package/out/commands/corpus/golden/expand.d.ts.map +1 -1
  251. package/out/commands/corpus/golden/expand.js +1 -1
  252. package/out/commands/corpus/golden/expand.js.map +1 -1
  253. package/out/commands/corpus/golden/promote.d.ts +1 -1
  254. package/out/commands/corpus/golden/promote.d.ts.map +1 -1
  255. package/out/commands/corpus/golden/promote.js +1 -1
  256. package/out/commands/corpus/golden/promote.js.map +1 -1
  257. package/out/commands/corpus/golden-relabel.d.ts +1 -1
  258. package/out/commands/corpus/golden-relabel.d.ts.map +1 -1
  259. package/out/commands/corpus/golden-relabel.js +1 -1
  260. package/out/commands/corpus/golden-relabel.js.map +1 -1
  261. package/out/commands/corpus/ingest-csv.d.ts +1 -1
  262. package/out/commands/corpus/ingest-csv.d.ts.map +1 -1
  263. package/out/commands/corpus/ingest-csv.js +1 -1
  264. package/out/commands/corpus/ingest-csv.js.map +1 -1
  265. package/out/commands/corpus/overlay-manifest.d.ts +1 -1
  266. package/out/commands/corpus/overlay-manifest.d.ts.map +1 -1
  267. package/out/commands/corpus/overlay-manifest.js +1 -1
  268. package/out/commands/corpus/overlay-manifest.js.map +1 -1
  269. package/out/commands/corpus/run.d.ts +1 -1
  270. package/out/commands/corpus/run.d.ts.map +1 -1
  271. package/out/commands/corpus/run.js +1 -1
  272. package/out/commands/corpus/run.js.map +1 -1
  273. package/out/commands/corpus/shard/index.d.ts +1 -1
  274. package/out/commands/corpus/shard/index.d.ts.map +1 -1
  275. package/out/commands/corpus/shard/index.js +1 -1
  276. package/out/commands/corpus/shard/index.js.map +1 -1
  277. package/out/commands/corpus/shard/kryptonite.d.ts +1 -1
  278. package/out/commands/corpus/shard/kryptonite.d.ts.map +1 -1
  279. package/out/commands/corpus/shard/kryptonite.js +1 -1
  280. package/out/commands/corpus/shard/kryptonite.js.map +1 -1
  281. package/out/commands/corpus/shard/translit.d.ts +1 -1
  282. package/out/commands/corpus/shard/translit.d.ts.map +1 -1
  283. package/out/commands/corpus/shard/translit.js +1 -1
  284. package/out/commands/corpus/shard/translit.js.map +1 -1
  285. package/out/commands/corpus/stats.d.ts +1 -1
  286. package/out/commands/corpus/stats.d.ts.map +1 -1
  287. package/out/commands/corpus/stats.js +1 -1
  288. package/out/commands/corpus/stats.js.map +1 -1
  289. package/out/commands/corpus/sub-venue-extract.d.ts +1 -1
  290. package/out/commands/corpus/sub-venue-extract.d.ts.map +1 -1
  291. package/out/commands/corpus/sub-venue-extract.js +1 -1
  292. package/out/commands/corpus/sub-venue-extract.js.map +1 -1
  293. package/out/commands/corpus/sub-venue-lexicon.d.ts +1 -1
  294. package/out/commands/corpus/sub-venue-lexicon.d.ts.map +1 -1
  295. package/out/commands/corpus/sub-venue-lexicon.js +1 -1
  296. package/out/commands/corpus/sub-venue-lexicon.js.map +1 -1
  297. package/out/commands/corpus/upload.d.ts +1 -1
  298. package/out/commands/corpus/upload.d.ts.map +1 -1
  299. package/out/commands/corpus/upload.js +1 -1
  300. package/out/commands/corpus/upload.js.map +1 -1
  301. package/out/commands/coverage/build.d.ts +1 -1
  302. package/out/commands/coverage/build.d.ts.map +1 -1
  303. package/out/commands/coverage/build.js +1 -1
  304. package/out/commands/coverage/build.js.map +1 -1
  305. package/out/commands/data/index.d.ts +32 -0
  306. package/out/commands/data/index.d.ts.map +1 -0
  307. package/out/commands/data/index.js +94 -0
  308. package/out/commands/data/index.js.map +1 -0
  309. package/out/commands/data/pull.d.ts +1 -1
  310. package/out/commands/data/pull.d.ts.map +1 -1
  311. package/out/commands/data/pull.js +1 -1
  312. package/out/commands/data/pull.js.map +1 -1
  313. package/out/commands/data/status.d.ts +1 -1
  314. package/out/commands/data/status.d.ts.map +1 -1
  315. package/out/commands/data/status.js +1 -1
  316. package/out/commands/data/status.js.map +1 -1
  317. package/out/commands/dev/download/libpostal-resources.d.ts +1 -1
  318. package/out/commands/dev/download/libpostal-resources.d.ts.map +1 -1
  319. package/out/commands/dev/download/libpostal-resources.js +1 -1
  320. package/out/commands/dev/download/libpostal-resources.js.map +1 -1
  321. package/out/commands/dev/download/ssl-address.d.ts +1 -1
  322. package/out/commands/dev/download/ssl-address.d.ts.map +1 -1
  323. package/out/commands/dev/download/ssl-address.js +1 -1
  324. package/out/commands/dev/download/ssl-address.js.map +1 -1
  325. package/out/commands/dev/generate/country-reference.d.ts.map +1 -1
  326. package/out/commands/dev/generate/country-reference.js +1 -1
  327. package/out/commands/dev/generate/country-reference.js.map +1 -1
  328. package/out/commands/dev/generate/language-types.d.ts.map +1 -1
  329. package/out/commands/dev/generate/language-types.js +1 -1
  330. package/out/commands/dev/generate/language-types.js.map +1 -1
  331. package/out/commands/dev/generate/official-languages.d.ts +1 -1
  332. package/out/commands/dev/generate/official-languages.d.ts.map +1 -1
  333. package/out/commands/dev/generate/official-languages.js +1 -1
  334. package/out/commands/dev/generate/official-languages.js.map +1 -1
  335. package/out/commands/dev/generate/trace-fixture.d.ts +1 -1
  336. package/out/commands/dev/generate/trace-fixture.d.ts.map +1 -1
  337. package/out/commands/dev/generate/trace-fixture.js +2 -2
  338. package/out/commands/dev/generate/trace-fixture.js.map +1 -1
  339. package/out/commands/dev/jsonl-to-parquet.d.ts +1 -1
  340. package/out/commands/dev/jsonl-to-parquet.d.ts.map +1 -1
  341. package/out/commands/dev/jsonl-to-parquet.js +1 -1
  342. package/out/commands/dev/jsonl-to-parquet.js.map +1 -1
  343. package/out/commands/dev/lint/corpus-shard.d.ts +1 -1
  344. package/out/commands/dev/lint/corpus-shard.d.ts.map +1 -1
  345. package/out/commands/dev/lint/corpus-shard.js +1 -1
  346. package/out/commands/dev/lint/corpus-shard.js.map +1 -1
  347. package/out/commands/dev/lint/mdx-angles.d.ts +1 -1
  348. package/out/commands/dev/lint/mdx-angles.d.ts.map +1 -1
  349. package/out/commands/dev/lint/mdx-angles.js +2 -2
  350. package/out/commands/dev/lint/mdx-angles.js.map +1 -1
  351. package/out/commands/dev/lint/shard-vocab.d.ts +1 -1
  352. package/out/commands/dev/lint/shard-vocab.d.ts.map +1 -1
  353. package/out/commands/dev/lint/shard-vocab.js +1 -1
  354. package/out/commands/dev/lint/shard-vocab.js.map +1 -1
  355. package/out/commands/doctor.d.ts +28 -8
  356. package/out/commands/doctor.d.ts.map +1 -1
  357. package/out/commands/doctor.js +94 -35
  358. package/out/commands/doctor.js.map +1 -1
  359. package/out/commands/eval/capability-manifest.d.ts +1 -1
  360. package/out/commands/eval/capability-manifest.d.ts.map +1 -1
  361. package/out/commands/eval/capability-manifest.js +1 -1
  362. package/out/commands/eval/capability-manifest.js.map +1 -1
  363. package/out/commands/eval/error-analysis.d.ts +1 -1
  364. package/out/commands/eval/error-analysis.d.ts.map +1 -1
  365. package/out/commands/eval/error-analysis.js +1 -1
  366. package/out/commands/eval/error-analysis.js.map +1 -1
  367. package/out/commands/eval/es-postcode-centroids.d.ts +1 -1
  368. package/out/commands/eval/es-postcode-centroids.d.ts.map +1 -1
  369. package/out/commands/eval/es-postcode-centroids.js +1 -1
  370. package/out/commands/eval/es-postcode-centroids.js.map +1 -1
  371. package/out/commands/eval/fragment-board.d.ts +1 -1
  372. package/out/commands/eval/fragment-board.d.ts.map +1 -1
  373. package/out/commands/eval/fragment-board.js +1 -1
  374. package/out/commands/eval/fragment-board.js.map +1 -1
  375. package/out/commands/eval/fragment-dev.d.ts +1 -1
  376. package/out/commands/eval/fragment-dev.d.ts.map +1 -1
  377. package/out/commands/eval/fragment-dev.js +1 -1
  378. package/out/commands/eval/fragment-dev.js.map +1 -1
  379. package/out/commands/eval/gate.d.ts +1 -1
  380. package/out/commands/eval/gate.d.ts.map +1 -1
  381. package/out/commands/eval/gate.js +1 -1
  382. package/out/commands/eval/gate.js.map +1 -1
  383. package/out/commands/eval/gauntlet-build.d.ts +1 -1
  384. package/out/commands/eval/gauntlet-build.d.ts.map +1 -1
  385. package/out/commands/eval/gauntlet-build.js +1 -1
  386. package/out/commands/eval/gauntlet-build.js.map +1 -1
  387. package/out/commands/eval/gauntlet.d.ts +1 -1
  388. package/out/commands/eval/gauntlet.d.ts.map +1 -1
  389. package/out/commands/eval/gauntlet.js +1 -1
  390. package/out/commands/eval/gauntlet.js.map +1 -1
  391. package/out/commands/eval/invariance.d.ts +9 -5
  392. package/out/commands/eval/invariance.d.ts.map +1 -1
  393. package/out/commands/eval/invariance.js +9 -5
  394. package/out/commands/eval/invariance.js.map +1 -1
  395. package/out/commands/eval/ledger-append.d.ts +1 -1
  396. package/out/commands/eval/ledger-append.d.ts.map +1 -1
  397. package/out/commands/eval/ledger-append.js +1 -1
  398. package/out/commands/eval/ledger-append.js.map +1 -1
  399. package/out/commands/eval/mask-regression.d.ts +1 -1
  400. package/out/commands/eval/mask-regression.d.ts.map +1 -1
  401. package/out/commands/eval/mask-regression.js +1 -1
  402. package/out/commands/eval/mask-regression.js.map +1 -1
  403. package/out/commands/eval/oa-resolver.d.ts +1 -1
  404. package/out/commands/eval/oa-resolver.d.ts.map +1 -1
  405. package/out/commands/eval/oa-resolver.js +1 -1
  406. package/out/commands/eval/oa-resolver.js.map +1 -1
  407. package/out/commands/eval/oracle-k.d.ts +1 -1
  408. package/out/commands/eval/oracle-k.d.ts.map +1 -1
  409. package/out/commands/eval/oracle-k.js +1 -1
  410. package/out/commands/eval/oracle-k.js.map +1 -1
  411. package/out/commands/eval/parity.d.ts +1 -1
  412. package/out/commands/eval/parity.d.ts.map +1 -1
  413. package/out/commands/eval/parity.js +1 -1
  414. package/out/commands/eval/parity.js.map +1 -1
  415. package/out/commands/eval/poi-board.d.ts +1 -1
  416. package/out/commands/eval/poi-board.d.ts.map +1 -1
  417. package/out/commands/eval/poi-board.js +1 -1
  418. package/out/commands/eval/poi-board.js.map +1 -1
  419. package/out/commands/eval/preset-compare.d.ts +1 -1
  420. package/out/commands/eval/preset-compare.d.ts.map +1 -1
  421. package/out/commands/eval/preset-compare.js +1 -1
  422. package/out/commands/eval/preset-compare.js.map +1 -1
  423. package/out/commands/eval/score-trends.d.ts +1 -1
  424. package/out/commands/eval/score-trends.d.ts.map +1 -1
  425. package/out/commands/eval/score-trends.js +1 -1
  426. package/out/commands/eval/score-trends.js.map +1 -1
  427. package/out/commands/filer/edgar-ingest.d.ts +21 -0
  428. package/out/commands/filer/edgar-ingest.d.ts.map +1 -0
  429. package/out/commands/filer/edgar-ingest.js +58 -0
  430. package/out/commands/filer/edgar-ingest.js.map +1 -0
  431. package/out/commands/filer/linkage-eval.d.ts +1 -1
  432. package/out/commands/filer/linkage-eval.d.ts.map +1 -1
  433. package/out/commands/filer/linkage-eval.js +1 -1
  434. package/out/commands/filer/linkage-eval.js.map +1 -1
  435. package/out/commands/gazetteer/affix-relabel.d.ts +6 -2
  436. package/out/commands/gazetteer/affix-relabel.d.ts.map +1 -1
  437. package/out/commands/gazetteer/affix-relabel.js +18 -8
  438. package/out/commands/gazetteer/affix-relabel.js.map +1 -1
  439. package/out/commands/gazetteer/anchor-lexicon.d.ts +1 -1
  440. package/out/commands/gazetteer/anchor-lexicon.d.ts.map +1 -1
  441. package/out/commands/gazetteer/anchor-lexicon.js +1 -1
  442. package/out/commands/gazetteer/anchor-lexicon.js.map +1 -1
  443. package/out/commands/gazetteer/build/admin.d.ts +1 -1
  444. package/out/commands/gazetteer/build/admin.d.ts.map +1 -1
  445. package/out/commands/gazetteer/build/admin.js +2 -2
  446. package/out/commands/gazetteer/build/admin.js.map +1 -1
  447. package/out/commands/gazetteer/build/anchor-lookup.d.ts +1 -1
  448. package/out/commands/gazetteer/build/anchor-lookup.d.ts.map +1 -1
  449. package/out/commands/gazetteer/build/anchor-lookup.js +1 -1
  450. package/out/commands/gazetteer/build/anchor-lookup.js.map +1 -1
  451. package/out/commands/gazetteer/build/bdc.d.ts +1 -1
  452. package/out/commands/gazetteer/build/bdc.d.ts.map +1 -1
  453. package/out/commands/gazetteer/build/bdc.js +2 -2
  454. package/out/commands/gazetteer/build/bdc.js.map +1 -1
  455. package/out/commands/gazetteer/build/candidate.d.ts +3 -1
  456. package/out/commands/gazetteer/build/candidate.d.ts.map +1 -1
  457. package/out/commands/gazetteer/build/candidate.js +27 -2
  458. package/out/commands/gazetteer/build/candidate.js.map +1 -1
  459. package/out/commands/gazetteer/build/coincident-roles.d.ts +1 -1
  460. package/out/commands/gazetteer/build/coincident-roles.d.ts.map +1 -1
  461. package/out/commands/gazetteer/build/coincident-roles.js +1 -1
  462. package/out/commands/gazetteer/build/coincident-roles.js.map +1 -1
  463. package/out/commands/gazetteer/build/fst.d.ts +1 -1
  464. package/out/commands/gazetteer/build/fst.d.ts.map +1 -1
  465. package/out/commands/gazetteer/build/fst.js +1 -1
  466. package/out/commands/gazetteer/build/fst.js.map +1 -1
  467. package/out/commands/gazetteer/build/fts.d.ts +1 -1
  468. package/out/commands/gazetteer/build/fts.d.ts.map +1 -1
  469. package/out/commands/gazetteer/build/fts.js +1 -1
  470. package/out/commands/gazetteer/build/fts.js.map +1 -1
  471. package/out/commands/gazetteer/build/index.d.ts +1 -1
  472. package/out/commands/gazetteer/build/index.d.ts.map +1 -1
  473. package/out/commands/gazetteer/build/index.js +2 -2
  474. package/out/commands/gazetteer/build/index.js.map +1 -1
  475. package/out/commands/gazetteer/build/locality-surface-lexicon.d.ts +1 -1
  476. package/out/commands/gazetteer/build/locality-surface-lexicon.d.ts.map +1 -1
  477. package/out/commands/gazetteer/build/locality-surface-lexicon.js +1 -1
  478. package/out/commands/gazetteer/build/locality-surface-lexicon.js.map +1 -1
  479. package/out/commands/gazetteer/build/nl-pc6.d.ts +1 -1
  480. package/out/commands/gazetteer/build/nl-pc6.d.ts.map +1 -1
  481. package/out/commands/gazetteer/build/nl-pc6.js +1 -1
  482. package/out/commands/gazetteer/build/nl-pc6.js.map +1 -1
  483. package/out/commands/gazetteer/build/poi-brands.d.ts +1 -1
  484. package/out/commands/gazetteer/build/poi-brands.d.ts.map +1 -1
  485. package/out/commands/gazetteer/build/poi-brands.js +2 -2
  486. package/out/commands/gazetteer/build/poi-brands.js.map +1 -1
  487. package/out/commands/gazetteer/build/poi.d.ts +1 -1
  488. package/out/commands/gazetteer/build/poi.d.ts.map +1 -1
  489. package/out/commands/gazetteer/build/poi.js +3 -3
  490. package/out/commands/gazetteer/build/poi.js.map +1 -1
  491. package/out/commands/gazetteer/build/postcode-codepoint.d.ts +1 -1
  492. package/out/commands/gazetteer/build/postcode-codepoint.d.ts.map +1 -1
  493. package/out/commands/gazetteer/build/postcode-codepoint.js +2 -2
  494. package/out/commands/gazetteer/build/postcode-codepoint.js.map +1 -1
  495. package/out/commands/gazetteer/build/postcode-geonames.d.ts +1 -1
  496. package/out/commands/gazetteer/build/postcode-geonames.d.ts.map +1 -1
  497. package/out/commands/gazetteer/build/postcode-geonames.js +2 -2
  498. package/out/commands/gazetteer/build/postcode-geonames.js.map +1 -1
  499. package/out/commands/gazetteer/build/postcode-locality.d.ts +1 -1
  500. package/out/commands/gazetteer/build/postcode-locality.d.ts.map +1 -1
  501. package/out/commands/gazetteer/build/postcode-locality.js +1 -1
  502. package/out/commands/gazetteer/build/postcode-locality.js.map +1 -1
  503. package/out/commands/gazetteer/build/postcode-ni-osm.d.ts +1 -1
  504. package/out/commands/gazetteer/build/postcode-ni-osm.d.ts.map +1 -1
  505. package/out/commands/gazetteer/build/postcode-ni-osm.js +2 -2
  506. package/out/commands/gazetteer/build/postcode-ni-osm.js.map +1 -1
  507. package/out/commands/gazetteer/build/postcode-prefix.d.ts +1 -1
  508. package/out/commands/gazetteer/build/postcode-prefix.d.ts.map +1 -1
  509. package/out/commands/gazetteer/build/postcode-prefix.js +2 -2
  510. package/out/commands/gazetteer/build/postcode-prefix.js.map +1 -1
  511. package/out/commands/gazetteer/build/postcode-shard.d.ts +1 -1
  512. package/out/commands/gazetteer/build/postcode-shard.d.ts.map +1 -1
  513. package/out/commands/gazetteer/build/postcode-shard.js +2 -2
  514. package/out/commands/gazetteer/build/postcode-shard.js.map +1 -1
  515. package/out/commands/gazetteer/build/street-morphology.d.ts +1 -1
  516. package/out/commands/gazetteer/build/street-morphology.d.ts.map +1 -1
  517. package/out/commands/gazetteer/build/street-morphology.js +1 -1
  518. package/out/commands/gazetteer/build/street-morphology.js.map +1 -1
  519. package/out/commands/gazetteer/build/street-type-lexicon.d.ts +1 -1
  520. package/out/commands/gazetteer/build/street-type-lexicon.d.ts.map +1 -1
  521. package/out/commands/gazetteer/build/street-type-lexicon.js +1 -1
  522. package/out/commands/gazetteer/build/street-type-lexicon.js.map +1 -1
  523. package/out/commands/gazetteer/census.d.ts +1 -1
  524. package/out/commands/gazetteer/census.d.ts.map +1 -1
  525. package/out/commands/gazetteer/census.js +1 -1
  526. package/out/commands/gazetteer/census.js.map +1 -1
  527. package/out/commands/gazetteer/conventions.d.ts +1 -1
  528. package/out/commands/gazetteer/conventions.d.ts.map +1 -1
  529. package/out/commands/gazetteer/conventions.js +1 -1
  530. package/out/commands/gazetteer/conventions.js.map +1 -1
  531. package/out/commands/gazetteer/granularity.d.ts +1 -1
  532. package/out/commands/gazetteer/granularity.d.ts.map +1 -1
  533. package/out/commands/gazetteer/granularity.js +1 -1
  534. package/out/commands/gazetteer/granularity.js.map +1 -1
  535. package/out/commands/gazetteer/importance.d.ts +14 -6
  536. package/out/commands/gazetteer/importance.d.ts.map +1 -1
  537. package/out/commands/gazetteer/importance.js +59 -42
  538. package/out/commands/gazetteer/importance.js.map +1 -1
  539. package/out/commands/gazetteer/inspect/fst.d.ts +1 -1
  540. package/out/commands/gazetteer/inspect/fst.d.ts.map +1 -1
  541. package/out/commands/gazetteer/inspect/fst.js +8 -6
  542. package/out/commands/gazetteer/inspect/fst.js.map +1 -1
  543. package/out/commands/gazetteer/inspect/graph.d.ts +1 -1
  544. package/out/commands/gazetteer/inspect/graph.d.ts.map +1 -1
  545. package/out/commands/gazetteer/inspect/graph.js +1 -2
  546. package/out/commands/gazetteer/inspect/graph.js.map +1 -1
  547. package/out/commands/gazetteer/inspect/mermaid.d.ts +1 -1
  548. package/out/commands/gazetteer/inspect/mermaid.d.ts.map +1 -1
  549. package/out/commands/gazetteer/inspect/mermaid.js +1 -2
  550. package/out/commands/gazetteer/inspect/mermaid.js.map +1 -1
  551. package/out/commands/gazetteer/inspect/placetype-stats.d.ts +1 -1
  552. package/out/commands/gazetteer/inspect/placetype-stats.d.ts.map +1 -1
  553. package/out/commands/gazetteer/inspect/placetype-stats.js +1 -1
  554. package/out/commands/gazetteer/inspect/placetype-stats.js.map +1 -1
  555. package/out/commands/gazetteer/inspect/sync.d.ts +1 -1
  556. package/out/commands/gazetteer/inspect/sync.d.ts.map +1 -1
  557. package/out/commands/gazetteer/inspect/sync.js +1 -1
  558. package/out/commands/gazetteer/inspect/sync.js.map +1 -1
  559. package/out/commands/gazetteer/inspect/tree.d.ts +1 -1
  560. package/out/commands/gazetteer/inspect/tree.d.ts.map +1 -1
  561. package/out/commands/gazetteer/inspect/tree.js +1 -2
  562. package/out/commands/gazetteer/inspect/tree.js.map +1 -1
  563. package/out/commands/gazetteer/overture-ingest.d.ts +1 -1
  564. package/out/commands/gazetteer/overture-ingest.d.ts.map +1 -1
  565. package/out/commands/gazetteer/overture-ingest.js +1 -1
  566. package/out/commands/gazetteer/overture-ingest.js.map +1 -1
  567. package/out/commands/gazetteer/pair-index.d.ts +1 -1
  568. package/out/commands/gazetteer/pair-index.d.ts.map +1 -1
  569. package/out/commands/gazetteer/pair-index.js +2 -2
  570. package/out/commands/gazetteer/pair-index.js.map +1 -1
  571. package/out/commands/gazetteer/polygons.d.ts +1 -1
  572. package/out/commands/gazetteer/polygons.d.ts.map +1 -1
  573. package/out/commands/gazetteer/polygons.js +1 -1
  574. package/out/commands/gazetteer/polygons.js.map +1 -1
  575. package/out/commands/gazetteer/postal-alias.d.ts +1 -1
  576. package/out/commands/gazetteer/postal-alias.d.ts.map +1 -1
  577. package/out/commands/gazetteer/postal-alias.js +1 -1
  578. package/out/commands/gazetteer/postal-alias.js.map +1 -1
  579. package/out/commands/gazetteer/postal-city.d.ts +1 -1
  580. package/out/commands/gazetteer/postal-city.d.ts.map +1 -1
  581. package/out/commands/gazetteer/postal-city.js +1 -1
  582. package/out/commands/gazetteer/postal-city.js.map +1 -1
  583. package/out/commands/gazetteer/postcode-binary.d.ts +1 -1
  584. package/out/commands/gazetteer/postcode-binary.d.ts.map +1 -1
  585. package/out/commands/gazetteer/postcode-binary.js +1 -1
  586. package/out/commands/gazetteer/postcode-binary.js.map +1 -1
  587. package/out/commands/gazetteer/postcode-intl.d.ts +1 -1
  588. package/out/commands/gazetteer/postcode-intl.d.ts.map +1 -1
  589. package/out/commands/gazetteer/postcode-intl.js +1 -1
  590. package/out/commands/gazetteer/postcode-intl.js.map +1 -1
  591. package/out/commands/gazetteer/promote.d.ts +1 -1
  592. package/out/commands/gazetteer/promote.d.ts.map +1 -1
  593. package/out/commands/gazetteer/promote.js +2 -2
  594. package/out/commands/gazetteer/promote.js.map +1 -1
  595. package/out/commands/gazetteer/publish.d.ts +1 -1
  596. package/out/commands/gazetteer/publish.d.ts.map +1 -1
  597. package/out/commands/gazetteer/publish.js +2 -2
  598. package/out/commands/gazetteer/publish.js.map +1 -1
  599. package/out/commands/gazetteer/release.d.ts +1 -1
  600. package/out/commands/gazetteer/release.d.ts.map +1 -1
  601. package/out/commands/gazetteer/release.js +2 -2
  602. package/out/commands/gazetteer/release.js.map +1 -1
  603. package/out/commands/gazetteer/verify-codepoint.d.ts +1 -1
  604. package/out/commands/gazetteer/verify-codepoint.d.ts.map +1 -1
  605. package/out/commands/gazetteer/verify-codepoint.js +1 -1
  606. package/out/commands/gazetteer/verify-codepoint.js.map +1 -1
  607. package/out/commands/gazetteer/verify.d.ts +1 -1
  608. package/out/commands/gazetteer/verify.d.ts.map +1 -1
  609. package/out/commands/gazetteer/verify.js +2 -2
  610. package/out/commands/gazetteer/verify.js.map +1 -1
  611. package/out/commands/geocode.d.ts +43 -1
  612. package/out/commands/geocode.d.ts.map +1 -1
  613. package/out/commands/geocode.js +104 -7
  614. package/out/commands/geocode.js.map +1 -1
  615. package/out/commands/gnaf/assemble.d.ts +1 -1
  616. package/out/commands/gnaf/assemble.d.ts.map +1 -1
  617. package/out/commands/gnaf/assemble.js +1 -1
  618. package/out/commands/gnaf/assemble.js.map +1 -1
  619. package/out/commands/openapi.d.ts +1 -1
  620. package/out/commands/openapi.d.ts.map +1 -1
  621. package/out/commands/openapi.js +1 -1
  622. package/out/commands/openapi.js.map +1 -1
  623. package/out/commands/parse.d.ts +23 -9
  624. package/out/commands/parse.d.ts.map +1 -1
  625. package/out/commands/parse.js +64 -16
  626. package/out/commands/parse.js.map +1 -1
  627. package/out/commands/placer/build-dataset.d.ts +2 -2
  628. package/out/commands/placer/build-dataset.d.ts.map +1 -1
  629. package/out/commands/placer/build-dataset.js +1 -1
  630. package/out/commands/placer/build-dataset.js.map +1 -1
  631. package/out/commands/placer/eval.d.ts +1 -1
  632. package/out/commands/placer/eval.d.ts.map +1 -1
  633. package/out/commands/placer/eval.js +1 -1
  634. package/out/commands/placer/eval.js.map +1 -1
  635. package/out/commands/placer/probe-frontier.d.ts +1 -1
  636. package/out/commands/placer/probe-frontier.d.ts.map +1 -1
  637. package/out/commands/placer/probe-frontier.js +1 -1
  638. package/out/commands/placer/probe-frontier.js.map +1 -1
  639. package/out/commands/placer/quantize.d.ts +1 -1
  640. package/out/commands/placer/quantize.d.ts.map +1 -1
  641. package/out/commands/placer/quantize.js +1 -1
  642. package/out/commands/placer/quantize.js.map +1 -1
  643. package/out/commands/placer/train.d.ts +1 -1
  644. package/out/commands/placer/train.d.ts.map +1 -1
  645. package/out/commands/placer/train.js +1 -1
  646. package/out/commands/placer/train.js.map +1 -1
  647. package/out/commands/poi.d.ts +1 -1
  648. package/out/commands/poi.d.ts.map +1 -1
  649. package/out/commands/poi.js +6 -1
  650. package/out/commands/poi.js.map +1 -1
  651. package/out/commands/registry/convert/tx-hhsc.d.ts +1 -1
  652. package/out/commands/registry/convert/tx-hhsc.d.ts.map +1 -1
  653. package/out/commands/registry/convert/tx-hhsc.js +1 -1
  654. package/out/commands/registry/convert/tx-hhsc.js.map +1 -1
  655. package/out/commands/registry/dedup-ceiling.d.ts +1 -1
  656. package/out/commands/registry/dedup-ceiling.d.ts.map +1 -1
  657. package/out/commands/registry/dedup-ceiling.js +1 -1
  658. package/out/commands/registry/dedup-ceiling.js.map +1 -1
  659. package/out/commands/registry/gold-set-sample.d.ts +1 -1
  660. package/out/commands/registry/gold-set-sample.d.ts.map +1 -1
  661. package/out/commands/registry/gold-set-sample.js +1 -1
  662. package/out/commands/registry/gold-set-sample.js.map +1 -1
  663. package/out/commands/registry/matcher-scale.d.ts +1 -1
  664. package/out/commands/registry/matcher-scale.d.ts.map +1 -1
  665. package/out/commands/registry/matcher-scale.js +1 -1
  666. package/out/commands/registry/matcher-scale.js.map +1 -1
  667. package/out/commands/registry/run.d.ts +1 -1
  668. package/out/commands/registry/run.d.ts.map +1 -1
  669. package/out/commands/registry/run.js +1 -1
  670. package/out/commands/registry/run.js.map +1 -1
  671. package/out/commands/registry/scorer-eval.d.ts +1 -1
  672. package/out/commands/registry/scorer-eval.d.ts.map +1 -1
  673. package/out/commands/registry/scorer-eval.js +1 -1
  674. package/out/commands/registry/scorer-eval.js.map +1 -1
  675. package/out/commands/registry/train-scorer.d.ts +1 -1
  676. package/out/commands/registry/train-scorer.d.ts.map +1 -1
  677. package/out/commands/registry/train-scorer.js +1 -1
  678. package/out/commands/registry/train-scorer.js.map +1 -1
  679. package/out/commands/registry/viz.d.ts +1 -1
  680. package/out/commands/registry/viz.d.ts.map +1 -1
  681. package/out/commands/registry/viz.js +1 -1
  682. package/out/commands/registry/viz.js.map +1 -1
  683. package/out/commands/release/hf.d.ts +1 -1
  684. package/out/commands/release/hf.d.ts.map +1 -1
  685. package/out/commands/release/hf.js +1 -1
  686. package/out/commands/release/hf.js.map +1 -1
  687. package/out/commands/reverse.d.ts +1 -1
  688. package/out/commands/reverse.d.ts.map +1 -1
  689. package/out/commands/reverse.js +7 -2
  690. package/out/commands/reverse.js.map +1 -1
  691. package/out/commands/serve.d.ts +1 -1
  692. package/out/commands/serve.d.ts.map +1 -1
  693. package/out/commands/serve.js.map +1 -1
  694. package/out/commands/situs/address-points.d.ts +1 -1
  695. package/out/commands/situs/address-points.d.ts.map +1 -1
  696. package/out/commands/situs/address-points.js +1 -1
  697. package/out/commands/situs/address-points.js.map +1 -1
  698. package/out/commands/situs/attribution-manifest.d.ts +1 -1
  699. package/out/commands/situs/attribution-manifest.d.ts.map +1 -1
  700. package/out/commands/situs/attribution-manifest.js +1 -1
  701. package/out/commands/situs/attribution-manifest.js.map +1 -1
  702. package/out/commands/situs/build.d.ts +1 -1
  703. package/out/commands/situs/build.d.ts.map +1 -1
  704. package/out/commands/situs/build.js +1 -1
  705. package/out/commands/situs/build.js.map +1 -1
  706. package/out/commands/situs/interpolation-shard.d.ts +1 -1
  707. package/out/commands/situs/interpolation-shard.d.ts.map +1 -1
  708. package/out/commands/situs/interpolation-shard.js +1 -1
  709. package/out/commands/situs/interpolation-shard.js.map +1 -1
  710. package/out/commands/situs/interpolation.d.ts +1 -1
  711. package/out/commands/situs/interpolation.d.ts.map +1 -1
  712. package/out/commands/situs/interpolation.js +13 -14
  713. package/out/commands/situs/interpolation.js.map +1 -1
  714. package/out/commands/skill/install.d.ts +1 -1
  715. package/out/commands/skill/install.d.ts.map +1 -1
  716. package/out/commands/skill/install.js +1 -1
  717. package/out/commands/skill/install.js.map +1 -1
  718. package/out/commands/tiger/fetch.d.ts +1 -1
  719. package/out/commands/tiger/fetch.d.ts.map +1 -1
  720. package/out/commands/tiger/fetch.js +1 -1
  721. package/out/commands/tiger/fetch.js.map +1 -1
  722. package/out/commands/tiger/race-dots-map.d.ts +1 -1
  723. package/out/commands/tiger/race-dots-map.d.ts.map +1 -1
  724. package/out/commands/tiger/race-dots-map.js +1 -1
  725. package/out/commands/tiger/race-dots-map.js.map +1 -1
  726. package/out/commands/tiger/race-dots.d.ts +1 -1
  727. package/out/commands/tiger/race-dots.d.ts.map +1 -1
  728. package/out/commands/tiger/race-dots.js +1 -1
  729. package/out/commands/tiger/race-dots.js.map +1 -1
  730. package/out/commands/tiger/redistricting.d.ts +1 -1
  731. package/out/commands/tiger/redistricting.d.ts.map +1 -1
  732. package/out/commands/tiger/redistricting.js +1 -1
  733. package/out/commands/tiger/redistricting.js.map +1 -1
  734. package/out/commands/tiles/publish.d.ts +1 -1
  735. package/out/commands/tiles/publish.d.ts.map +1 -1
  736. package/out/commands/tiles/publish.js +1 -1
  737. package/out/commands/tiles/publish.js.map +1 -1
  738. package/out/commands/wof/graph.d.ts.map +1 -1
  739. package/out/commands/wof/graph.js +1 -1
  740. package/out/commands/wof/graph.js.map +1 -1
  741. package/out/commands/wof/mermaid.d.ts.map +1 -1
  742. package/out/commands/wof/mermaid.js +1 -1
  743. package/out/commands/wof/mermaid.js.map +1 -1
  744. package/out/commands/wof/prepare.d.ts.map +1 -1
  745. package/out/commands/wof/prepare.js +1 -1
  746. package/out/commands/wof/prepare.js.map +1 -1
  747. package/out/commands/wof/sync.d.ts.map +1 -1
  748. package/out/commands/wof/sync.js +1 -1
  749. package/out/commands/wof/sync.js.map +1 -1
  750. package/out/commands/wof/tree.d.ts.map +1 -1
  751. package/out/commands/wof/tree.js +1 -1
  752. package/out/commands/wof/tree.js.map +1 -1
  753. package/out/dev-tools/postcode-coherence-coverage.run.js +1 -1
  754. package/out/dev-tools/postcode-coherence-coverage.run.js.map +1 -1
  755. package/out/dev-tools/postcode-coherence-scale.run.js +1 -1
  756. package/out/dev-tools/postcode-coherence-scale.run.js.map +1 -1
  757. package/out/dev-tools/probe-query-intent.run.d.ts +92 -0
  758. package/out/dev-tools/probe-query-intent.run.d.ts.map +1 -0
  759. package/out/dev-tools/probe-query-intent.run.js +145 -0
  760. package/out/dev-tools/probe-query-intent.run.js.map +1 -0
  761. package/out/dev-tools/probe-referential-delta.run.d.ts +35 -0
  762. package/out/dev-tools/probe-referential-delta.run.d.ts.map +1 -0
  763. package/out/dev-tools/probe-referential-delta.run.js +128 -0
  764. package/out/dev-tools/probe-referential-delta.run.js.map +1 -0
  765. package/out/dev-tools/score-hard-slice-board.run.d.ts +7 -0
  766. package/out/dev-tools/score-hard-slice-board.run.d.ts.map +1 -1
  767. package/out/dev-tools/score-hard-slice-board.run.js +8 -0
  768. package/out/dev-tools/score-hard-slice-board.run.js.map +1 -1
  769. package/out/dev-tools/score-interesting-addresses.run.d.ts +10 -0
  770. package/out/dev-tools/score-interesting-addresses.run.d.ts.map +1 -0
  771. package/out/dev-tools/score-interesting-addresses.run.js +76 -0
  772. package/out/dev-tools/score-interesting-addresses.run.js.map +1 -0
  773. package/out/dev-tools/score-street-name-boundaries.run.d.ts +9 -0
  774. package/out/dev-tools/score-street-name-boundaries.run.d.ts.map +1 -0
  775. package/out/dev-tools/score-street-name-boundaries.run.js +64 -0
  776. package/out/dev-tools/score-street-name-boundaries.run.js.map +1 -0
  777. package/out/dev-tools/score-world-structures.run.d.ts +19 -0
  778. package/out/dev-tools/score-world-structures.run.d.ts.map +1 -0
  779. package/out/dev-tools/score-world-structures.run.js +82 -0
  780. package/out/dev-tools/score-world-structures.run.js.map +1 -0
  781. package/out/doctor/checks.d.ts +10 -1
  782. package/out/doctor/checks.d.ts.map +1 -1
  783. package/out/doctor/checks.js +31 -3
  784. package/out/doctor/checks.js.map +1 -1
  785. package/out/doctor/runner.d.ts +32 -3
  786. package/out/doctor/runner.d.ts.map +1 -1
  787. package/out/doctor/runner.js +50 -4
  788. package/out/doctor/runner.js.map +1 -1
  789. package/out/eval-harness/de-order-eval.d.ts +68 -0
  790. package/out/eval-harness/de-order-eval.d.ts.map +1 -0
  791. package/out/eval-harness/de-order-eval.js +121 -0
  792. package/out/eval-harness/de-order-eval.js.map +1 -0
  793. package/out/eval-harness/demo-cascade-rows.d.ts +58 -0
  794. package/out/eval-harness/demo-cascade-rows.d.ts.map +1 -0
  795. package/out/eval-harness/demo-cascade-rows.js +113 -0
  796. package/out/eval-harness/demo-cascade-rows.js.map +1 -0
  797. package/out/eval-harness/demo-cascade-smoke.d.ts +105 -0
  798. package/out/eval-harness/demo-cascade-smoke.d.ts.map +1 -0
  799. package/out/eval-harness/demo-cascade-smoke.js +278 -0
  800. package/out/eval-harness/demo-cascade-smoke.js.map +1 -0
  801. package/out/eval-harness/external-arenas.d.ts +77 -0
  802. package/out/eval-harness/external-arenas.d.ts.map +1 -0
  803. package/out/eval-harness/external-arenas.js +115 -0
  804. package/out/eval-harness/external-arenas.js.map +1 -0
  805. package/out/eval-harness/fr-parse-recall.d.ts +85 -0
  806. package/out/eval-harness/fr-parse-recall.d.ts.map +1 -0
  807. package/out/eval-harness/fr-parse-recall.js +166 -0
  808. package/out/eval-harness/fr-parse-recall.js.map +1 -0
  809. package/out/eval-harness/gauntlet/build-regression-db.d.ts.map +1 -1
  810. package/out/eval-harness/gauntlet/build-regression-db.js +1 -1
  811. package/out/eval-harness/gauntlet/build-regression-db.js.map +1 -1
  812. package/out/eval-harness/gauntlet/cases/seed-case.d.ts +10 -1
  813. package/out/eval-harness/gauntlet/cases/seed-case.d.ts.map +1 -1
  814. package/out/eval-harness/gauntlet/cases/seed-case.js +4 -0
  815. package/out/eval-harness/gauntlet/cases/seed-case.js.map +1 -1
  816. package/out/eval-harness/gauntlet/check-case.d.ts +25 -2
  817. package/out/eval-harness/gauntlet/check-case.d.ts.map +1 -1
  818. package/out/eval-harness/gauntlet/check-case.js +146 -6
  819. package/out/eval-harness/gauntlet/check-case.js.map +1 -1
  820. package/out/eval-harness/gauntlet/harness.d.ts +4 -0
  821. package/out/eval-harness/gauntlet/harness.d.ts.map +1 -1
  822. package/out/eval-harness/gauntlet/harness.js +3 -2
  823. package/out/eval-harness/gauntlet/harness.js.map +1 -1
  824. package/out/eval-harness/gauntlet/schema.d.ts +8 -1
  825. package/out/eval-harness/gauntlet/schema.d.ts.map +1 -1
  826. package/out/eval-harness/gauntlet/schema.js +3 -0
  827. package/out/eval-harness/gauntlet/schema.js.map +1 -1
  828. package/out/eval-harness/invariance/runner.d.ts +60 -5
  829. package/out/eval-harness/invariance/runner.d.ts.map +1 -1
  830. package/out/eval-harness/invariance/runner.js +133 -36
  831. package/out/eval-harness/invariance/runner.js.map +1 -1
  832. package/out/eval-harness/oa-resolver-eval.d.ts +1 -1
  833. package/out/eval-harness/oa-resolver-eval.d.ts.map +1 -1
  834. package/out/eval-harness/oa-resolver-eval.js +16 -16
  835. package/out/eval-harness/oa-resolver-eval.js.map +1 -1
  836. package/out/eval-harness/per-locale-f1.d.ts +128 -0
  837. package/out/eval-harness/per-locale-f1.d.ts.map +1 -0
  838. package/out/eval-harness/per-locale-f1.js +399 -0
  839. package/out/eval-harness/per-locale-f1.js.map +1 -0
  840. package/out/eval-harness/promotion-gate.d.ts +30 -6
  841. package/out/eval-harness/promotion-gate.d.ts.map +1 -1
  842. package/out/eval-harness/promotion-gate.js +290 -102
  843. package/out/eval-harness/promotion-gate.js.map +1 -1
  844. package/out/eval-harness/score-affix.d.ts +85 -0
  845. package/out/eval-harness/score-affix.d.ts.map +1 -0
  846. package/out/eval-harness/score-affix.js +111 -0
  847. package/out/eval-harness/score-affix.js.map +1 -0
  848. package/out/eval-harness/score-country-homograph.d.ts +95 -0
  849. package/out/eval-harness/score-country-homograph.d.ts.map +1 -0
  850. package/out/eval-harness/score-country-homograph.js +121 -0
  851. package/out/eval-harness/score-country-homograph.js.map +1 -0
  852. package/out/gazetteer-pipeline/admin/index.js +2 -2
  853. package/out/gazetteer-pipeline/admin/index.js.map +1 -1
  854. package/out/gazetteer-pipeline/evidence-lexicons.js +1 -1
  855. package/out/gazetteer-pipeline/evidence-lexicons.js.map +1 -1
  856. package/out/gazetteer-pipeline/index.d.ts +26 -0
  857. package/out/gazetteer-pipeline/index.d.ts.map +1 -1
  858. package/out/gazetteer-pipeline/index.js +34 -4
  859. package/out/gazetteer-pipeline/index.js.map +1 -1
  860. package/out/gazetteer-pipeline/postcode/index.js +5 -5
  861. package/out/gazetteer-pipeline/postcode/index.js.map +1 -1
  862. package/out/geocode-core.d.ts +105 -6
  863. package/out/geocode-core.d.ts.map +1 -1
  864. package/out/geocode-core.js +165 -19
  865. package/out/geocode-core.js.map +1 -1
  866. package/out/query-intent.d.ts +73 -0
  867. package/out/query-intent.d.ts.map +1 -0
  868. package/out/query-intent.js +168 -0
  869. package/out/query-intent.js.map +1 -0
  870. package/out/resolver-backend.js +2 -2
  871. package/out/resolver-backend.js.map +1 -1
  872. package/out/tools/generate-clients.d.ts +1 -1
  873. package/out/tools/generate-clients.d.ts.map +1 -1
  874. package/out/tools/generate-clients.js.map +1 -1
  875. package/package.json +58 -28
  876. package/query-intent.ts +234 -0
  877. package/resolver-backend.ts +2 -2
  878. package/tools/generate-clients.ts +1 -2
package/cli-kit/index.ts CHANGED
@@ -2,157 +2,6 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * The command toolkit for `mailwoman/commands/*` — Pastel/Ink helper types, the one-shot
7
- * {@linkcode useCommandTask} runner, and the {@linkcode CheckList} renderer. Lives OUTSIDE
8
- * `commands/` (Pastel treats every file there as a command) and OUTSIDE `sdk/` (`sdk/` submodules
9
- * mean data acquisition). Built with `createElement`, not JSX, so the module stays plain `.ts` —
10
- * importable under node's type stripping (the dev `node →` exports condition).
11
5
  */
12
6
 
13
- import { type PlacetypeRole, PlacetypeRoles } from "@mailwoman/core"
14
- import { Box, Text } from "ink"
15
- import { createElement as h, useEffect, useState } from "react"
16
- import type * as React from "react"
17
- import type * as zod from "zod"
18
-
19
- /**
20
- * Type-helper to infer the positional arguments of a command.
21
- */
22
- export interface PositionalArguments<T extends zod.ZodTypeAny> {
23
- args: zod.infer<T>
24
- }
25
-
26
- /**
27
- * React component for a command with positional arguments.
28
- */
29
- export type PositionalCommandComponent<T extends zod.ZodTypeAny> = React.FC<PositionalArguments<T>>
30
-
31
- /**
32
- * Type-helper to infer the options of a command.
33
- */
34
- export interface CommandProps<
35
- OptionProps extends zod.ZodObject,
36
- PositionalProps extends zod.ZodTypeAny | unknown = unknown,
37
- > {
38
- options: zod.infer<OptionProps>
39
- args: PositionalProps extends zod.ZodTypeAny ? zod.infer<PositionalProps> : unknown[]
40
- }
41
-
42
- /**
43
- * React component for a command with options.
44
- */
45
- export type CommandComponent<
46
- OptionProps extends zod.ZodObject,
47
- PositionalProps extends zod.ZodTypeAny | unknown = unknown,
48
- > = React.FC<CommandProps<OptionProps, PositionalProps>>
49
-
50
- /**
51
- * The lifecycle of a command's one-shot async task.
52
- */
53
- export type CommandTaskState<T> =
54
- | { status: "running" }
55
- | { status: "done"; result: T }
56
- | { status: "error"; message: string }
57
-
58
- /**
59
- * Run a command's one-shot async task and own the exit-code discipline: rejection renders the error state and exits 1;
60
- * resolution exits with `exitCode(result)` (default 0) — always AFTER the final frame committed. Replaces the
61
- * copy-pasted useEffect/useState/setImmediate dance in every command.
62
- */
63
- /* oxlint-disable react-hooks/exhaustive-deps -- One-shot by design: the task/exitCode closures
64
- capture their options at mount; tracking them (fresh closure per render) would re-run the task
65
- every render. The empty/[state] deps are the point. */
66
- export function useCommandTask<T>(task: () => Promise<T>, exitCode?: (result: T) => number): CommandTaskState<T> {
67
- const [state, setState] = useState<CommandTaskState<T>>({ status: "running" })
68
-
69
- useEffect(() => {
70
- void task().then(
71
- (result) => setState({ status: "done", result }),
72
- (error: unknown) =>
73
- setState({ status: "error", message: error instanceof Error ? (error.stack ?? error.message) : String(error) })
74
- )
75
- }, [])
76
-
77
- useEffect(() => {
78
- if (state.status === "running") return
79
- const code = state.status === "error" ? 1 : (exitCode?.(state.result) ?? 0)
80
- setImmediate(() => process.exit(code))
81
- }, [state])
82
-
83
- return state
84
- }
85
-
86
- /* oxlint-enable react-hooks/exhaustive-deps */
87
-
88
- /**
89
- * Build a guidance-grade error whose rendered form is exactly `message` — no stack. {@linkcode useCommandTask} renders
90
- * `error.stack ?? error.message`, which is right for unexpected failures but turns deliberate user-facing guidance
91
- * ("Set $MAILWOMAN_WOF_DB…") into a stack dump. Throw `commandError(msg)` for those instead of `new Error(msg)`.
92
- */
93
- export function commandError(message: string): Error {
94
- const error = new Error(message)
95
- error.stack = message
96
-
97
- return error
98
- }
99
-
100
- /**
101
- * One ✓/✗ line in a {@linkcode CheckList}.
102
- */
103
- export interface Check {
104
- ok: boolean
105
- check: string
106
- detail?: string
107
- }
108
-
109
- /**
110
- * The ✓/✗ check-list + PASS/FAIL renderer (extracted from `gazetteer verify`). Pass `verdict` to append the summary
111
- * line.
112
- */
113
- export function CheckList({ checks, verdict }: { checks: readonly Check[]; verdict?: boolean }): React.ReactElement {
114
- const lines = checks.map((c, i) =>
115
- h(
116
- Text,
117
- { key: i, color: c.ok ? "green" : "red" },
118
- `${c.ok ? "✓" : "✗"} ${c.check}${c.detail ? `: ${c.detail}` : ""}`
119
- )
120
- )
121
-
122
- const summary =
123
- verdict === undefined
124
- ? null
125
- : h(
126
- Text,
127
- { color: verdict ? "green" : "red" },
128
- `${verdict ? "PASS" : "FAIL"} (${checks.filter((c) => c.ok).length}/${checks.length} checks)`
129
- )
130
-
131
- return h(Box, { flexDirection: "column" }, ...lines, summary)
132
- }
133
-
134
- /**
135
- * Parse a `--roles a,b,c` flag into validated {@link PlacetypeRole}s, or `undefined` when the flag is absent (which
136
- * every caller reads as "all roles").
137
- *
138
- * Rejects an unknown role with {@link commandError} rather than silently filtering it — a typo in a role name would
139
- * otherwise produce an empty, entirely plausible-looking result.
140
- */
141
- export function parseRoles(raw: string | undefined): PlacetypeRole[] | undefined {
142
- if (!raw) return undefined
143
-
144
- const valid = new Set<string>(PlacetypeRoles)
145
-
146
- const parsed = raw
147
- .split(",")
148
- .map((s) => s.trim())
149
- .filter(Boolean)
150
-
151
- for (const role of parsed) {
152
- if (!valid.has(role)) {
153
- throw commandError(`Unknown placetype role '${role}'. Valid roles: ${PlacetypeRoles.join(", ")}.`)
154
- }
155
- }
156
-
157
- return parsed as PlacetypeRole[]
158
- }
7
+ export * from "./shared.ts"
@@ -0,0 +1,176 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The command toolkit for `mailwoman/commands/*` — Pastel/Ink helper types, the one-shot
7
+ * {@linkcode useCommandTask} runner, and the {@linkcode CheckList} renderer. Lives OUTSIDE
8
+ * `commands/` (Pastel treats every file there as a command) and OUTSIDE `sdk/` (`sdk/` submodules
9
+ * mean data acquisition). Built with `createElement`, not JSX, so the module stays plain `.ts` —
10
+ * importable under node's type stripping (the dev `node →` exports condition).
11
+ */
12
+
13
+ import { type PlacetypeRole, PlacetypeRoles } from "@mailwoman/core"
14
+ import { Box, Text } from "ink"
15
+ import { createElement as h, useEffect, useState } from "react"
16
+ import type * as React from "react"
17
+ import type * as zod from "zod"
18
+
19
+ /**
20
+ * Type-helper to infer the positional arguments of a command.
21
+ */
22
+ export interface PositionalArguments<T extends zod.ZodTypeAny> {
23
+ args: zod.infer<T>
24
+ }
25
+
26
+ /**
27
+ * React component for a command with positional arguments.
28
+ */
29
+ export type PositionalCommandComponent<T extends zod.ZodTypeAny> = React.FC<PositionalArguments<T>>
30
+
31
+ /**
32
+ * Type-helper to infer the options of a command.
33
+ */
34
+ export interface CommandProps<
35
+ OptionProps extends zod.ZodObject,
36
+ PositionalProps extends zod.ZodTypeAny | unknown = unknown,
37
+ > {
38
+ options: zod.infer<OptionProps>
39
+ args: PositionalProps extends zod.ZodTypeAny ? zod.infer<PositionalProps> : unknown[]
40
+ }
41
+
42
+ /**
43
+ * React component for a command with options.
44
+ */
45
+ export type CommandComponent<
46
+ OptionProps extends zod.ZodObject,
47
+ PositionalProps extends zod.ZodTypeAny | unknown = unknown,
48
+ > = React.FC<CommandProps<OptionProps, PositionalProps>>
49
+
50
+ /**
51
+ * The lifecycle of a command's one-shot async task.
52
+ */
53
+ export type CommandTaskState<T> =
54
+ | { status: "running" }
55
+ | { status: "done"; result: T }
56
+ | { status: "error"; message: string }
57
+
58
+ /**
59
+ * Run a command's one-shot async task and own the exit-code discipline: rejection renders the error state and exits 1;
60
+ * resolution exits with `exitCode(result)` (default 0) — always AFTER the final frame committed. Replaces the
61
+ * copy-pasted useEffect/useState/setImmediate dance in every command.
62
+ */
63
+ /* oxlint-disable react-hooks/exhaustive-deps -- One-shot by design: the task/exitCode closures
64
+ capture their options at mount; tracking them (fresh closure per render) would re-run the task
65
+ every render. The empty/[state] deps are the point. */
66
+ export function useCommandTask<T>(task: () => Promise<T>, exitCode?: (result: T) => number): CommandTaskState<T> {
67
+ const [state, setState] = useState<CommandTaskState<T>>({ status: "running" })
68
+
69
+ useEffect(() => {
70
+ void task().then(
71
+ (result) => setState({ status: "done", result }),
72
+ (error: unknown) =>
73
+ setState({ status: "error", message: error instanceof Error ? (error.stack ?? error.message) : String(error) })
74
+ )
75
+ }, [])
76
+
77
+ useEffect(() => {
78
+ if (state.status === "running") return
79
+ const code = state.status === "error" ? 1 : (exitCode?.(state.result) ?? 0)
80
+ setImmediate(() => process.exit(code))
81
+ }, [state])
82
+
83
+ return state
84
+ }
85
+
86
+ /* oxlint-enable react-hooks/exhaustive-deps */
87
+
88
+ /**
89
+ * Emit a command's final output as raw bytes, bypassing Ink's `<Text>` renderer.
90
+ *
91
+ * Ink word-wraps rendered text at the terminal width — and at 80 columns when stdout is piped — which corrupts
92
+ * machine-readable output: a JSON string value longer than the width gets real newlines inserted mid-string, breaking
93
+ * the document (observed 2026-08-07: `geocode --format json` on "Toledo Ohio" wrapped `intent_markers[].message` at 80
94
+ * cols). Machine formats (json/jsonld/xml/tuple, `--json` flags) must never pass through `<Text>`.
95
+ *
96
+ * Returns `null` so the caller can `return writeRawStdout(result)` from the done branch. Safe to call from render:
97
+ * {@linkcode useCommandTask} renders the done frame exactly once before its `process.exit`. Same pattern as
98
+ * `commands/gazetteer/inspect/graph.tsx`.
99
+ */
100
+ export function writeRawStdout(text: string): null {
101
+ process.stdout.write(text + "\n")
102
+
103
+ return null
104
+ }
105
+
106
+ /**
107
+ * Build a guidance-grade error whose rendered form is exactly `message` — no stack. {@linkcode useCommandTask} renders
108
+ * `error.stack ?? error.message`, which is right for unexpected failures but turns deliberate user-facing guidance
109
+ * ("Set $MAILWOMAN_WOF_DB…") into a stack dump. Throw `commandError(msg)` for those instead of `new Error(msg)`.
110
+ */
111
+ export function commandError(message: string): Error {
112
+ const error = new Error(message)
113
+ error.stack = message
114
+
115
+ return error
116
+ }
117
+
118
+ /**
119
+ * One ✓/✗ line in a {@linkcode CheckList}.
120
+ */
121
+ export interface Check {
122
+ ok: boolean
123
+ check: string
124
+ detail?: string
125
+ }
126
+
127
+ /**
128
+ * The ✓/✗ check-list + PASS/FAIL renderer (extracted from `gazetteer verify`). Pass `verdict` to append the summary
129
+ * line.
130
+ */
131
+ export function CheckList({ checks, verdict }: { checks: readonly Check[]; verdict?: boolean }): React.ReactElement {
132
+ const lines = checks.map((c, i) =>
133
+ h(
134
+ Text,
135
+ { key: i, color: c.ok ? "green" : "red" },
136
+ `${c.ok ? "✓" : "✗"} ${c.check}${c.detail ? `: ${c.detail}` : ""}`
137
+ )
138
+ )
139
+
140
+ const summary =
141
+ verdict === undefined
142
+ ? null
143
+ : h(
144
+ Text,
145
+ { color: verdict ? "green" : "red" },
146
+ `${verdict ? "PASS" : "FAIL"} (${checks.filter((c) => c.ok).length}/${checks.length} checks)`
147
+ )
148
+
149
+ return h(Box, { flexDirection: "column" }, ...lines, summary)
150
+ }
151
+
152
+ /**
153
+ * Parse a `--roles a,b,c` flag into validated {@link PlacetypeRole}s, or `undefined` when the flag is absent (which
154
+ * every caller reads as "all roles").
155
+ *
156
+ * Rejects an unknown role with {@link commandError} rather than silently filtering it — a typo in a role name would
157
+ * otherwise produce an empty, entirely plausible-looking result.
158
+ */
159
+ export function parseRoles(raw: string | undefined): PlacetypeRole[] | undefined {
160
+ if (!raw) return undefined
161
+
162
+ const valid = new Set<string>(PlacetypeRoles)
163
+
164
+ const parsed = raw
165
+ .split(",")
166
+ .map((s) => s.trim())
167
+ .filter(Boolean)
168
+
169
+ for (const role of parsed) {
170
+ if (!valid.has(role)) {
171
+ throw commandError(`Unknown placetype role '${role}'. Valid roles: ${PlacetypeRoles.join(", ")}.`)
172
+ }
173
+ }
174
+
175
+ return parsed as PlacetypeRole[]
176
+ }
package/cli.ts CHANGED
@@ -7,22 +7,66 @@
7
7
  */
8
8
 
9
9
  import { readFileSync } from "node:fs"
10
+ import { findPackageJSON } from "node:module"
10
11
 
11
12
  import { parseJSONStrict } from "@mailwoman/core/objects"
13
+ import { cliArguments, scriptEntryPath } from "@mailwoman/core/scripting/utils"
12
14
  import Pastel from "pastel"
13
15
 
14
- // Read the real version from this package's package.json rather than hardcoding it (it drifted to
15
- // 0.1.0 while the package shipped 4.x). `import.meta.url` points at the compiled out/cli.js, so
16
- // `../package.json` resolves to the installed package root in every layout (dev, tarball, global).
17
- const { version } = parseJSONStrict<{ version: string }>(
18
- readFileSync(new URL("../package.json", import.meta.url), "utf8")
19
- )
16
+ const packageJSONPath = findPackageJSON(import.meta.url)
17
+
18
+ if (!packageJSONPath) {
19
+ throw new Error("Could not find package.json for mailwoman/cli")
20
+ }
21
+
22
+ const packageJSON = parseJSONStrict<{ version: string }>(readFileSync(packageJSONPath, "utf8"))
20
23
 
21
24
  const app = new Pastel({
22
25
  importMeta: import.meta,
23
26
  description: "A calibrated, retrieval-augmented postal-address parser — CLI + library.",
24
27
  name: "Mailwoman CLI",
25
- version,
28
+ version: packageJSON.version,
26
29
  })
27
30
 
28
- await app.run()
31
+ /**
32
+ * Commands whose bare invocation (`mailwoman <name>` and nothing else) should print their own help.
33
+ *
34
+ * Without this, commander answers a missing required operand with one unhelpful line — `error: missing required
35
+ * argument 'address'` — and no usage, no flags, no example (#1577). Pastel never exposes its commander `program`, so
36
+ * the only seam is the argv we hand `app.run`: append `--help` and let commander render the real, always-in-sync help
37
+ * for that subcommand.
38
+ *
39
+ * Deliberately narrow — the user arguments must be EXACTLY `[<name>]`. Deciding "no operand was given" for a richer
40
+ * argv would mean re-implementing commander's knowledge of which flags take values, and getting that wrong turns a real
41
+ * geocode into a help screen.
42
+ */
43
+ const HELP_ON_BARE_INVOCATION = new Set(["geocode"])
44
+
45
+ /**
46
+ * A bare invocation is one user argument: the command name, nothing after it.
47
+ */
48
+ const BARE_INVOCATION_ARGUMENT_COUNT = 1
49
+
50
+ const userArguments = cliArguments()
51
+
52
+ const bareInvocation =
53
+ userArguments.length === BARE_INVOCATION_ARGUMENT_COUNT && HELP_ON_BARE_INVOCATION.has(userArguments[0]!)
54
+
55
+ if (bareInvocation) {
56
+ // Commander's help handler exits 0, but a missing required operand is still a usage error — and
57
+ // `mailwoman data` (no subcommand) already answers help-with-exit-1, so that is the house contract.
58
+ // Node re-reads `process.exitCode` after emitting 'exit', so a listener can still raise it.
59
+ process.once("exit", () => {
60
+ process.exitCode = 1
61
+ })
62
+ }
63
+
64
+ // Rebuilt in commander's node-style shape (`[runtime, script, ...user]`) from the blessed accessors — it slices from
65
+ // index 2 and only ever reads argv[1] as a script path. argv[0] is never consulted once `program.name()` is set, which
66
+ // Pastel does above.
67
+ await app.run([
68
+ "node",
69
+ scriptEntryPath(),
70
+ ...userArguments,
71
+ ...(bareInvocation ? (["--help"] as const) : ([] as const)),
72
+ ])
@@ -19,11 +19,10 @@ import { readFileSync } from "node:fs"
19
19
 
20
20
  import { $public } from "@mailwoman/core/env"
21
21
  import { Text } from "ink"
22
+ import { type CommandComponent, commandError, useCommandTask, writeRawStdout } from "mailwoman/cli-kit"
22
23
  import { argument } from "pastel"
23
24
  import zod from "zod"
24
25
 
25
- import { type CommandComponent, commandError, useCommandTask } from "../cli-kit/index.ts"
26
-
27
26
  export { ArgumentsSchema as args, AutocompleteConfigSchema as options }
28
27
 
29
28
  const ArgumentsSchema = zod
@@ -63,7 +62,15 @@ export interface AutocompleteEntry {
63
62
  name: string
64
63
  placetype: string
65
64
  wofID: number
66
- importance: number
65
+ /**
66
+ * The referential likelihood suggestions are ranked by (ROAD_TO_V9 §2).
67
+ */
68
+ referential: number
69
+ /**
70
+ * Encyclopedic importance when the artifact carries one — displayed, never ranked on. `undefined` = no article, or a
71
+ * pre-v5 binary.
72
+ */
73
+ encyclopedic?: number
67
74
  completionTokens: string[]
68
75
  }
69
76
 
@@ -115,7 +122,8 @@ export async function runAutocomplete(
115
122
  name: s.name,
116
123
  placetype: s.placetype,
117
124
  wofID: s.wofID,
118
- importance: s.importance,
125
+ referential: s.referential,
126
+ ...(s.encyclopedic === undefined ? {} : { encyclopedic: s.encyclopedic }),
119
127
  completionTokens: s.completionTokens,
120
128
  }))
121
129
  }
@@ -126,9 +134,11 @@ function formatSuggestions(entries: AutocompleteEntry[]): string {
126
134
  return entries
127
135
  .map((e, i) => {
128
136
  const completion = e.completionTokens.length ? ` [+${e.completionTokens.join(" ")}]` : ""
129
- const imp = e.importance.toFixed(4)
137
+ const ref = e.referential.toFixed(4)
138
+ // Absent encyclopedic prints nothing at all — "enc:0.0000" would assert an article that is not there.
139
+ const enc = e.encyclopedic === undefined ? "" : `, enc:${e.encyclopedic.toFixed(4)}`
130
140
 
131
- return `${String(i + 1).padStart(2)}. ${e.name}${completion} (${e.placetype}, wof:${e.wofID}, imp:${imp})`
141
+ return `${String(i + 1).padStart(2)}. ${e.name}${completion} (${e.placetype}, wof:${e.wofID}, ref:${ref}${enc})`
132
142
  })
133
143
  .join("\n")
134
144
  }
@@ -158,6 +168,12 @@ const AutocompleteCommand: CommandComponent<typeof AutocompleteConfigSchema, typ
158
168
  return <Text dimColor>Searching...</Text>
159
169
  }
160
170
 
171
+ // --json emits a raw JSON array — bypass Ink's word-wrapping <Text> renderer, which corrupts
172
+ // long lines at 80 cols when piped (see writeRawStdout).
173
+ if (options.json) {
174
+ return writeRawStdout(state.result)
175
+ }
176
+
161
177
  return <Text>{state.result}</Text>
162
178
  }
163
179
 
@@ -15,9 +15,9 @@
15
15
  */
16
16
 
17
17
  import { Box, Text } from "ink"
18
+ import { CheckList, type CommandComponent, useCommandTask } from "mailwoman/cli-kit"
18
19
  import zod from "zod"
19
20
 
20
- import { CheckList, type CommandComponent, useCommandTask } from "../../cli-kit/index.ts"
21
21
  import { generateClients } from "../../tools/generate-clients.ts"
22
22
 
23
23
  export const description = "Generate + verify the Python and Rust API clients from the emitted OpenAPI specs"
@@ -8,10 +8,9 @@
8
8
  */
9
9
 
10
10
  import { Text } from "ink"
11
+ import { type CommandComponent, useCommandTask } from "mailwoman/cli-kit"
11
12
  import zod from "zod"
12
13
 
13
- import { type CommandComponent, useCommandTask } from "../../cli-kit/index.ts"
14
-
15
14
  const OptionsSchema = zod.object({
16
15
  input: zod.string().describe("Canonical jsonl input"),
17
16
  output: zod.string().describe("Labeled jsonl output"),
@@ -9,11 +9,10 @@
9
9
 
10
10
  import { audit } from "@mailwoman/corpus/tools"
11
11
  import { Text } from "ink"
12
+ import { type CommandComponent, useCommandTask } from "mailwoman/cli-kit"
12
13
  import { argument } from "pastel"
13
14
  import zod from "zod"
14
15
 
15
- import { type CommandComponent, useCommandTask } from "../../cli-kit/index.ts"
16
-
17
16
  const ArgsSchema = zod.tuple([
18
17
  zod.string().describe(
19
18
  argument({
@@ -18,11 +18,10 @@ import { parseJSONStrict } from "@mailwoman/core/objects"
18
18
  import { buildCorpus, defaultAdapterRegistry, type BuildStage } from "@mailwoman/corpus"
19
19
  import type { AdapterOptions } from "@mailwoman/corpus/types"
20
20
  import { Box, Text } from "ink"
21
+ import { type CommandComponent, commandError, useCommandTask } from "mailwoman/cli-kit"
21
22
  import { useState } from "react"
22
23
  import zod from "zod"
23
24
 
24
- import { type CommandComponent, commandError, useCommandTask } from "../../cli-kit/index.ts"
25
-
26
25
  /**
27
26
  * `--inputs` accepts either:
28
27
  *
@@ -13,12 +13,11 @@
13
13
  */
14
14
 
15
15
  import { Box, Text } from "ink"
16
+ import { type CommandComponent, useCommandTask } from "mailwoman/cli-kit"
16
17
  import { useState } from "react"
17
18
  import zod from "zod"
18
19
  import { $ } from "zx"
19
20
 
20
- import { type CommandComponent, useCommandTask } from "../../cli-kit/index.ts"
21
-
22
21
  const DEFAULT_BUCKET = "mailwoman-assets"
23
22
 
24
23
  const OptionsSchema = zod.object({
@@ -24,11 +24,10 @@ import {
24
24
  fetchWikidataSubVenue,
25
25
  } from "@mailwoman/corpus/tools"
26
26
  import { Text } from "ink"
27
+ import { type CommandComponent, useCommandTask } from "mailwoman/cli-kit"
27
28
  import { argument } from "pastel"
28
29
  import zod from "zod"
29
30
 
30
- import { type CommandComponent, useCommandTask } from "../../cli-kit/index.ts"
31
-
32
31
  const ArgsSchema = zod.tuple([
33
32
  zod
34
33
  .enum([
@@ -11,10 +11,9 @@
11
11
 
12
12
  import { expandGolden } from "@mailwoman/corpus/tools"
13
13
  import { Text } from "ink"
14
+ import { type CommandComponent, useCommandTask } from "mailwoman/cli-kit"
14
15
  import zod from "zod"
15
16
 
16
- import { type CommandComponent, useCommandTask } from "../../../cli-kit/index.ts"
17
-
18
17
  const OptionsSchema = zod.object({
19
18
  corpus: zod
20
19
  .string()
@@ -11,10 +11,9 @@
11
11
 
12
12
  import { promoteGolden } from "@mailwoman/corpus/tools"
13
13
  import { Text } from "ink"
14
+ import { type CommandComponent, useCommandTask } from "mailwoman/cli-kit"
14
15
  import zod from "zod"
15
16
 
16
- import { type CommandComponent, useCommandTask } from "../../../cli-kit/index.ts"
17
-
18
17
  const OptionsSchema = zod.object({
19
18
  input: zod.string().describe("Candidates JSONL from corpus golden expand"),
20
19
  bumpTo: zod.string().describe("Target golden version dir (e.g. v0.1.1)"),
@@ -11,10 +11,9 @@
11
11
  */
12
12
 
13
13
  import { Text } from "ink"
14
+ import { type CommandComponent, useCommandTask } from "mailwoman/cli-kit"
14
15
  import zod from "zod"
15
16
 
16
- import { type CommandComponent, useCommandTask } from "../../cli-kit/index.ts"
17
-
18
17
  const OptionsSchema = zod.object({
19
18
  input: zod.string().describe("Parent golden version dir (read-only), e.g. data/eval/golden/v0.1.2"),
20
19
  output: zod.string().describe("Output golden version dir, e.g. data/eval/golden/v0.1.3"),
@@ -10,10 +10,9 @@
10
10
 
11
11
  import { ingestCSV } from "@mailwoman/corpus/tools"
12
12
  import { Text } from "ink"
13
+ import { type CommandComponent, useCommandTask } from "mailwoman/cli-kit"
13
14
  import zod from "zod"
14
15
 
15
- import { type CommandComponent, useCommandTask } from "../../cli-kit/index.ts"
16
-
17
16
  const OptionsSchema = zod.object({
18
17
  input: zod.string().describe("CSV file to ingest"),
19
18
  table: zod.string().optional().describe("SQLite table name (default: derived from the input filename)"),
@@ -8,10 +8,9 @@
8
8
  */
9
9
 
10
10
  import { Text } from "ink"
11
+ import { type CommandComponent, useCommandTask } from "mailwoman/cli-kit"
11
12
  import zod from "zod"
12
13
 
13
- import { type CommandComponent, useCommandTask } from "../../cli-kit/index.ts"
14
-
15
14
  const OptionsSchema = zod.object({
16
15
  base: zod.string().describe("Base corpus manifest path"),
17
16
  newDir: zod.string().describe("New overlay corpus dir"),
@@ -13,11 +13,10 @@
13
13
  import { ProgressBar } from "@inkjs/ui"
14
14
  import { defaultAdapterRegistry, runAdapter } from "@mailwoman/corpus"
15
15
  import { Box, Text } from "ink"
16
+ import { type CommandComponent, commandError, useCommandTask } from "mailwoman/cli-kit"
16
17
  import { useState } from "react"
17
18
  import zod from "zod"
18
19
 
19
- import { type CommandComponent, commandError, useCommandTask } from "../../cli-kit/index.ts"
20
-
21
20
  const ArgumentsSchema = zod.array(zod.string().describe("Adapter id (e.g. wof-admin, ban, openaddresses)"))
22
21
 
23
22
  const RunConfigSchema = zod.object({
@@ -15,10 +15,9 @@ import { createWriteStream } from "node:fs"
15
15
 
16
16
  import { getShardRecipe, listShardRecipes, type ShardRecipeOpts } from "@mailwoman/corpus"
17
17
  import { Box, Text } from "ink"
18
+ import { type CommandComponent, commandError, useCommandTask } from "mailwoman/cli-kit"
18
19
  import zod from "zod"
19
20
 
20
- import { type CommandComponent, commandError, useCommandTask } from "../../../cli-kit/index.ts"
21
-
22
21
  /**
23
22
  * Bare `mailwoman corpus shard` stays the recipe runner now that `shard/` hosts subcommands.
24
23
  */
@@ -10,10 +10,9 @@
10
10
 
11
11
  import { buildKryptoniteShard } from "@mailwoman/corpus/tools"
12
12
  import { Text } from "ink"
13
+ import { type CommandComponent, useCommandTask } from "mailwoman/cli-kit"
13
14
  import zod from "zod"
14
15
 
15
- import { type CommandComponent, useCommandTask } from "../../../cli-kit/index.ts"
16
-
17
16
  const OptionsSchema = zod.object({
18
17
  jsonl: zod.string().describe("Canonical kryptonite JSONL to shard"),
19
18
  baseManifest: zod.string().describe("Base corpus MANIFEST.json whose shards carry forward"),
@@ -11,10 +11,9 @@
11
11
 
12
12
  import { buildTranslitShard } from "@mailwoman/corpus/tools"
13
13
  import { Text } from "ink"
14
+ import { type CommandComponent, useCommandTask } from "mailwoman/cli-kit"
14
15
  import zod from "zod"
15
16
 
16
- import { type CommandComponent, useCommandTask } from "../../../cli-kit/index.ts"
17
-
18
17
  const OptionsSchema = zod.object({
19
18
  jsonl: zod.string().describe("Canonical transliteration JSONL to shard"),
20
19
  baseManifest: zod.string().describe("Base corpus MANIFEST.json whose shards carry forward"),