@mailwoman/core 10.1.0 → 10.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/APIClient.ts +5 -6
- package/lib/api/arcgis.ts +5 -5
- package/lib/api/ckan.ts +2 -1
- package/lib/api/disk-storage.ts +3 -3
- package/lib/api/ogc.ts +56 -52
- package/lib/api/pacer.ts +1 -1
- package/lib/api/retry.ts +6 -4
- package/lib/api/test/transport.ts +20 -20
- package/lib/api.ts +1 -0
- package/lib/coarse-placer/coarse-placer.ts +4 -3
- package/lib/crypto/node.ts +1 -2
- package/lib/decoder/build-tree.ts +5 -5
- package/lib/decoder/parse-diff.ts +47 -31
- package/lib/decoder/proposals-to-tree.ts +1 -0
- package/lib/decoder/serialize/json.ts +9 -6
- package/lib/decoder/serialize/tuples.ts +2 -1
- package/lib/decoder/serialize/xml.ts +15 -14
- package/lib/decoder/tree/shape.ts +14 -14
- package/lib/decoder/tree/walk.ts +2 -2
- package/lib/decoder/types.ts +48 -2
- package/lib/env/schema.ts +21 -23
- package/lib/env/utils.ts +4 -3
- package/lib/env.ts +4 -4
- package/lib/fs/delimited.ts +35 -1
- package/lib/fs/readers.ts +2 -5
- package/lib/fs/zip.ts +1 -1
- package/lib/geocode/result.ts +337 -0
- package/lib/git.ts +1 -1
- package/lib/html/document.ts +6 -6
- package/lib/html/elements.ts +26 -23
- package/lib/identical.ts +20 -0
- package/lib/json.ts +5 -7
- package/lib/layers/coverage.ts +28 -1
- package/lib/layers/feature-count.ts +3 -3
- package/lib/layers/manifest.ts +22 -21
- package/lib/layers/schema.ts +25 -1
- package/lib/license/configured.ts +3 -3
- package/lib/license/key/file.ts +2 -1
- package/lib/license/key.ts +3 -3
- package/lib/license/stamp.ts +4 -4
- package/lib/locale/locale.ts +1 -1
- package/lib/locale/registry.ts +2 -2
- package/lib/module/compiled-freshness.ts +1 -1
- package/lib/module/package-command.ts +4 -2
- package/lib/module/packaged-data.ts +1 -1
- package/lib/module/resolve-from.ts +1 -1
- package/lib/numeric.ts +4 -4
- package/lib/objects.ts +3 -0
- package/lib/paths.ts +16 -1
- package/lib/pipeline/client-result.ts +14 -14
- package/lib/pipeline/result.ts +5 -4
- package/lib/pipeline/runtime-pipeline.ts +65 -42
- package/lib/pipeline/span-proposer.ts +1 -1
- package/lib/pipeline/types.ts +328 -161
- package/lib/pipeline.ts +32 -7
- package/lib/policy/proposal-collection.ts +1 -1
- package/lib/policy/registry.ts +5 -3
- package/lib/resolver/authoritative-provider.ts +17 -17
- package/lib/resolver/coverage-facts.ts +3 -3
- package/lib/resolver/fixture-authoritative-provider.ts +4 -0
- package/lib/resolver/lookup-types.ts +54 -14
- package/lib/resolver/postcode-format.ts +9 -9
- package/lib/resolver/referential.ts +2 -2
- package/lib/resolver/types.ts +155 -51
- package/lib/resolver.ts +22 -20
- package/lib/resources/git.ts +1 -1
- package/lib/resources/languages.ts +0 -2
- package/lib/resources/libpostal.ts +1 -1
- package/lib/resources/whosonfirst/PlacetypeDataSource.ts +2 -6
- package/lib/resources/whosonfirst/extract-repo.ts +2 -1
- package/lib/resources/whosonfirst/placetypes/admin.ts +20 -25
- package/lib/resources/whosonfirst/placetypes/mermaid.ts +4 -3
- package/lib/resources/whosonfirst/placetypes/specificity.ts +7 -7
- package/lib/resources.ts +1 -0
- package/lib/scripting/arguments.ts +6 -5
- package/lib/scripting/command.ts +3 -2
- package/lib/scripting/operation.ts +2 -2
- package/lib/scripting/utils.ts +3 -5
- package/lib/strings/python-json.ts +1 -1
- package/lib/tokenization/Span.ts +1 -1
- package/lib/trust-policies.ts +0 -2
- package/lib/types/Classification.ts +1 -1
- package/lib/types/classifier.ts +1 -1
- package/lib/utils/geodatabase-archive.ts +13 -5
- package/lib/utils/sqlite-rows.ts +3 -3
- package/lib/utils/stream-to-disk.ts +1 -3
- package/lib/utils/union-find.ts +1 -1
- package/lib/vale.ts +1 -1
- package/lib/workspaces.ts +2 -2
- package/out/api/APIClient.d.ts +3 -3
- package/out/api/APIClient.d.ts.map +1 -1
- package/out/api/APIClient.js +2 -3
- package/out/api/APIClient.js.map +1 -1
- package/out/api/arcgis.d.ts +2 -2
- package/out/api/arcgis.d.ts.map +1 -1
- package/out/api/arcgis.js +6 -6
- package/out/api/arcgis.js.map +1 -1
- package/out/api/ckan.d.ts +2 -1
- package/out/api/ckan.d.ts.map +1 -1
- package/out/api/ckan.js.map +1 -1
- package/out/api/disk-storage.d.ts +1 -1
- package/out/api/disk-storage.js +2 -2
- package/out/api/disk-storage.js.map +1 -1
- package/out/api/ogc.d.ts +32 -27
- package/out/api/ogc.d.ts.map +1 -1
- package/out/api/ogc.js +41 -46
- package/out/api/ogc.js.map +1 -1
- package/out/api/pacer.d.ts +1 -1
- package/out/api/pacer.js +1 -1
- package/out/api/retry.d.ts +6 -4
- package/out/api/retry.d.ts.map +1 -1
- package/out/api/retry.js +1 -1
- package/out/api/retry.js.map +1 -1
- package/out/api/test/transport.d.ts +11 -11
- package/out/api/test/transport.d.ts.map +1 -1
- package/out/api/test/transport.js +16 -16
- package/out/api/test/transport.js.map +1 -1
- package/out/api.d.ts +1 -0
- package/out/api.d.ts.map +1 -1
- package/out/api.js +1 -0
- package/out/api.js.map +1 -1
- package/out/coarse-placer/coarse-placer.d.ts +3 -2
- package/out/coarse-placer/coarse-placer.d.ts.map +1 -1
- package/out/coarse-placer/coarse-placer.js +1 -1
- package/out/coarse-placer/coarse-placer.js.map +1 -1
- package/out/crypto/node.d.ts +1 -2
- package/out/crypto/node.d.ts.map +1 -1
- package/out/crypto/node.js +1 -2
- package/out/crypto/node.js.map +1 -1
- package/out/decoder/build-tree.js +5 -5
- package/out/decoder/build-tree.js.map +1 -1
- package/out/decoder/parse-diff.d.ts +19 -19
- package/out/decoder/parse-diff.d.ts.map +1 -1
- package/out/decoder/parse-diff.js +28 -12
- package/out/decoder/parse-diff.js.map +1 -1
- package/out/decoder/proposals-to-tree.d.ts.map +1 -1
- package/out/decoder/proposals-to-tree.js +1 -0
- package/out/decoder/proposals-to-tree.js.map +1 -1
- package/out/decoder/serialize/json.d.ts +35 -17
- package/out/decoder/serialize/json.d.ts.map +1 -1
- package/out/decoder/serialize/json.js +28 -0
- package/out/decoder/serialize/json.js.map +1 -1
- package/out/decoder/serialize/tuples.d.ts +2 -1
- package/out/decoder/serialize/tuples.d.ts.map +1 -1
- package/out/decoder/serialize/tuples.js.map +1 -1
- package/out/decoder/serialize/xml.d.ts +12 -11
- package/out/decoder/serialize/xml.d.ts.map +1 -1
- package/out/decoder/serialize/xml.js +3 -3
- package/out/decoder/serialize/xml.js.map +1 -1
- package/out/decoder/tree/shape.d.ts +6 -6
- package/out/decoder/tree/shape.d.ts.map +1 -1
- package/out/decoder/tree/shape.js +8 -8
- package/out/decoder/tree/shape.js.map +1 -1
- package/out/decoder/tree/walk.d.ts +1 -1
- package/out/decoder/tree/walk.d.ts.map +1 -1
- package/out/decoder/tree/walk.js +1 -1
- package/out/decoder/tree/walk.js.map +1 -1
- package/out/decoder/types.d.ts +55 -2
- package/out/decoder/types.d.ts.map +1 -1
- package/out/decoder/types.js +39 -1
- package/out/decoder/types.js.map +1 -1
- package/out/env/schema.d.ts +11 -12
- package/out/env/schema.d.ts.map +1 -1
- package/out/env/schema.js +15 -17
- package/out/env/schema.js.map +1 -1
- package/out/env/utils.d.ts +2 -2
- package/out/env/utils.d.ts.map +1 -1
- package/out/env/utils.js +2 -2
- package/out/env/utils.js.map +1 -1
- package/out/env.js +4 -4
- package/out/env.js.map +1 -1
- package/out/fs/delimited.d.ts +18 -0
- package/out/fs/delimited.d.ts.map +1 -1
- package/out/fs/delimited.js +31 -1
- package/out/fs/delimited.js.map +1 -1
- package/out/fs/readers.d.ts +2 -4
- package/out/fs/readers.d.ts.map +1 -1
- package/out/fs/readers.js +2 -4
- package/out/fs/readers.js.map +1 -1
- package/out/fs/zip.js +1 -1
- package/out/fs/zip.js.map +1 -1
- package/out/geocode/result.d.ts +475 -0
- package/out/geocode/result.d.ts.map +1 -0
- package/out/geocode/result.js +280 -0
- package/out/geocode/result.js.map +1 -0
- package/out/git.js +1 -1
- package/out/git.js.map +1 -1
- package/out/html/document.d.ts +3 -3
- package/out/html/document.d.ts.map +1 -1
- package/out/html/document.js +4 -4
- package/out/html/document.js.map +1 -1
- package/out/html/elements.d.ts +18 -15
- package/out/html/elements.d.ts.map +1 -1
- package/out/html/elements.js +17 -16
- package/out/html/elements.js.map +1 -1
- package/out/identical.d.ts +16 -0
- package/out/identical.d.ts.map +1 -0
- package/out/identical.js +19 -0
- package/out/identical.js.map +1 -0
- package/out/json.d.ts +3 -5
- package/out/json.d.ts.map +1 -1
- package/out/json.js +3 -5
- package/out/json.js.map +1 -1
- package/out/layers/coverage.d.ts +26 -1
- package/out/layers/coverage.d.ts.map +1 -1
- package/out/layers/coverage.js.map +1 -1
- package/out/layers/feature-count.d.ts +1 -1
- package/out/layers/feature-count.d.ts.map +1 -1
- package/out/layers/feature-count.js +2 -2
- package/out/layers/feature-count.js.map +1 -1
- package/out/layers/manifest.d.ts +11 -10
- package/out/layers/manifest.d.ts.map +1 -1
- package/out/layers/manifest.js +12 -13
- package/out/layers/manifest.js.map +1 -1
- package/out/layers/schema.d.ts +23 -0
- package/out/layers/schema.d.ts.map +1 -1
- package/out/layers/schema.js +1 -1
- package/out/layers/schema.js.map +1 -1
- package/out/license/configured.d.ts +1 -1
- package/out/license/configured.d.ts.map +1 -1
- package/out/license/configured.js +2 -2
- package/out/license/configured.js.map +1 -1
- package/out/license/key/file.d.ts.map +1 -1
- package/out/license/key/file.js +2 -1
- package/out/license/key/file.js.map +1 -1
- package/out/license/key.d.ts +1 -1
- package/out/license/key.d.ts.map +1 -1
- package/out/license/key.js +2 -2
- package/out/license/key.js.map +1 -1
- package/out/license/stamp.d.ts +2 -2
- package/out/license/stamp.d.ts.map +1 -1
- package/out/license/stamp.js +2 -2
- package/out/license/stamp.js.map +1 -1
- package/out/locale/locale.d.ts +1 -1
- package/out/locale/locale.d.ts.map +1 -1
- package/out/locale/registry.d.ts +1 -1
- package/out/locale/registry.d.ts.map +1 -1
- package/out/locale/registry.js +1 -1
- package/out/locale/registry.js.map +1 -1
- package/out/module/compiled-freshness.js +1 -1
- package/out/module/compiled-freshness.js.map +1 -1
- package/out/module/package-command.d.ts +3 -2
- package/out/module/package-command.d.ts.map +1 -1
- package/out/module/package-command.js +3 -2
- package/out/module/package-command.js.map +1 -1
- package/out/module/packaged-data.js +1 -1
- package/out/module/packaged-data.js.map +1 -1
- package/out/module/resolve-from.js +1 -1
- package/out/module/resolve-from.js.map +1 -1
- package/out/numeric.d.ts +1 -1
- package/out/numeric.d.ts.map +1 -1
- package/out/numeric.js +3 -3
- package/out/numeric.js.map +1 -1
- package/out/objects.d.ts +3 -0
- package/out/objects.d.ts.map +1 -1
- package/out/objects.js +3 -0
- package/out/objects.js.map +1 -1
- package/out/paths.d.ts +20 -1
- package/out/paths.d.ts.map +1 -1
- package/out/paths.js +1 -1
- package/out/paths.js.map +1 -1
- package/out/pipeline/client-result.d.ts +15 -15
- package/out/pipeline/client-result.d.ts.map +1 -1
- package/out/pipeline/client-result.js +1 -1
- package/out/pipeline/result.d.ts +4 -3
- package/out/pipeline/result.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.d.ts +16 -9
- package/out/pipeline/runtime-pipeline.d.ts.map +1 -1
- package/out/pipeline/runtime-pipeline.js +43 -27
- package/out/pipeline/runtime-pipeline.js.map +1 -1
- package/out/pipeline/span-proposer.js +1 -1
- package/out/pipeline/span-proposer.js.map +1 -1
- package/out/pipeline/types.d.ts +394 -175
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/types.js +199 -4
- package/out/pipeline/types.js.map +1 -1
- package/out/pipeline.d.ts +4 -2
- package/out/pipeline.d.ts.map +1 -1
- package/out/pipeline.js +1 -1
- package/out/pipeline.js.map +1 -1
- package/out/policy/proposal-collection.d.ts +1 -1
- package/out/policy/proposal-collection.d.ts.map +1 -1
- package/out/policy/proposal-collection.js.map +1 -1
- package/out/policy/registry.d.ts +3 -1
- package/out/policy/registry.d.ts.map +1 -1
- package/out/policy/registry.js +4 -2
- package/out/policy/registry.js.map +1 -1
- package/out/resolver/authoritative-provider.d.ts +17 -17
- package/out/resolver/authoritative-provider.d.ts.map +1 -1
- package/out/resolver/authoritative-provider.js +2 -2
- package/out/resolver/coverage-facts.d.ts +3 -3
- package/out/resolver/coverage-facts.d.ts.map +1 -1
- package/out/resolver/fixture-authoritative-provider.d.ts.map +1 -1
- package/out/resolver/fixture-authoritative-provider.js +4 -0
- package/out/resolver/fixture-authoritative-provider.js.map +1 -1
- package/out/resolver/lookup-types.d.ts +52 -15
- package/out/resolver/lookup-types.d.ts.map +1 -1
- package/out/resolver/postcode-format.d.ts +3 -3
- package/out/resolver/postcode-format.d.ts.map +1 -1
- package/out/resolver/postcode-format.js +7 -7
- package/out/resolver/postcode-format.js.map +1 -1
- package/out/resolver/referential.d.ts +2 -2
- package/out/resolver/referential.d.ts.map +1 -1
- package/out/resolver/types.d.ts +126 -40
- package/out/resolver/types.d.ts.map +1 -1
- package/out/resolver/types.js +43 -1
- package/out/resolver/types.js.map +1 -1
- package/out/resolver.d.ts +5 -3
- package/out/resolver.d.ts.map +1 -1
- package/out/resolver.js +2 -2
- package/out/resolver.js.map +1 -1
- package/out/resources/git.js +1 -1
- package/out/resources/git.js.map +1 -1
- package/out/resources/languages.d.ts +0 -1
- package/out/resources/languages.d.ts.map +1 -1
- package/out/resources/languages.js +0 -1
- package/out/resources/languages.js.map +1 -1
- package/out/resources/libpostal.d.ts +1 -1
- package/out/resources/libpostal.d.ts.map +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.d.ts +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.d.ts.map +1 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.js +2 -1
- package/out/resources/whosonfirst/PlacetypeDataSource.js.map +1 -1
- package/out/resources/whosonfirst/extract-repo.d.ts.map +1 -1
- package/out/resources/whosonfirst/extract-repo.js +2 -1
- package/out/resources/whosonfirst/extract-repo.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.d.ts +12 -12
- package/out/resources/whosonfirst/placetypes/admin.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/admin.js +9 -8
- package/out/resources/whosonfirst/placetypes/admin.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/mermaid.d.ts +2 -1
- package/out/resources/whosonfirst/placetypes/mermaid.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/mermaid.js +1 -1
- package/out/resources/whosonfirst/placetypes/mermaid.js.map +1 -1
- package/out/resources/whosonfirst/placetypes/specificity.d.ts +3 -3
- package/out/resources/whosonfirst/placetypes/specificity.d.ts.map +1 -1
- package/out/resources/whosonfirst/placetypes/specificity.js +6 -6
- package/out/resources/whosonfirst/placetypes/specificity.js.map +1 -1
- package/out/resources.d.ts +1 -0
- package/out/resources.d.ts.map +1 -1
- package/out/resources.js +1 -0
- package/out/resources.js.map +1 -1
- package/out/scripting/arguments.d.ts +5 -4
- package/out/scripting/arguments.d.ts.map +1 -1
- package/out/scripting/arguments.js +5 -4
- package/out/scripting/arguments.js.map +1 -1
- package/out/scripting/command.d.ts +2 -2
- package/out/scripting/command.d.ts.map +1 -1
- package/out/scripting/command.js +1 -0
- package/out/scripting/command.js.map +1 -1
- package/out/scripting/operation.d.ts +1 -1
- package/out/scripting/operation.d.ts.map +1 -1
- package/out/scripting/operation.js +1 -1
- package/out/scripting/operation.js.map +1 -1
- package/out/scripting/utils.d.ts +3 -4
- package/out/scripting/utils.d.ts.map +1 -1
- package/out/scripting/utils.js +3 -4
- package/out/scripting/utils.js.map +1 -1
- package/out/strings/python-json.js +1 -1
- package/out/strings/python-json.js.map +1 -1
- package/out/tokenization/Span.d.ts +1 -1
- package/out/tokenization/Span.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/dataset.d.ts +4 -2
- package/out/tools/coarse-placer/build/dataset.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/dataset.js.map +1 -1
- package/out/tools/coarse-placer/build/outlier/exposure.d.ts +5 -3
- package/out/tools/coarse-placer/build/outlier/exposure.d.ts.map +1 -1
- package/out/tools/coarse-placer/build/outlier/exposure.js.map +1 -1
- package/out/tools/coarse-placer/build/outlier/latin.d.ts +3 -3
- package/out/tools/coarse-placer/build/outlier/oa.d.ts +3 -3
- package/out/tools/coarse-placer/eval/latin-offmap.d.ts +3 -3
- package/out/tools/coarse-placer/eval/openset.js +2 -2
- package/out/tools/coarse-placer/eval/openset.js.map +1 -1
- package/out/tools/coarse-placer/eval/quant-compare.d.ts +4 -4
- package/out/tools/coarse-placer/eval.d.ts +3 -3
- package/out/tools/coarse-placer/paths.js +1 -1
- package/out/tools/coarse-placer/paths.js.map +1 -1
- package/out/tools/coarse-placer/probe-frontier.d.ts +2 -2
- package/out/tools/coarse-placer/quantize.d.ts +2 -2
- package/out/tools/coarse-placer/train.d.ts +5 -5
- package/out/tools/download/libpostal-resources.d.ts.map +1 -1
- package/out/tools/download/libpostal-resources.js +2 -1
- package/out/tools/download/libpostal-resources.js.map +1 -1
- package/out/tools/download/ssl-address.d.ts +2 -2
- package/out/tools/generate-language-types.d.ts +1 -1
- package/out/tools/generate-language-types.js +1 -1
- package/out/tools/generate-language-types.js.map +1 -1
- package/out/trust-policies.d.ts +0 -1
- package/out/trust-policies.d.ts.map +1 -1
- package/out/trust-policies.js +0 -1
- package/out/trust-policies.js.map +1 -1
- package/out/types/Classification.d.ts +1 -1
- package/out/types/Classification.d.ts.map +1 -1
- package/out/types/classifier.d.ts +1 -1
- package/out/types/classifier.d.ts.map +1 -1
- package/out/utils/geodatabase-archive.d.ts +11 -4
- package/out/utils/geodatabase-archive.d.ts.map +1 -1
- package/out/utils/geodatabase-archive.js +1 -1
- package/out/utils/geodatabase-archive.js.map +1 -1
- package/out/utils/sqlite-rows.d.ts +2 -2
- package/out/utils/sqlite-rows.d.ts.map +1 -1
- package/out/utils/sqlite-rows.js +2 -2
- package/out/utils/sqlite-rows.js.map +1 -1
- package/out/utils/stream-to-disk.d.ts.map +1 -1
- package/out/utils/stream-to-disk.js +1 -1
- package/out/utils/stream-to-disk.js.map +1 -1
- package/out/utils/union-find.js +1 -1
- package/out/utils/union-find.js.map +1 -1
- package/out/vale.js +1 -1
- package/out/vale.js.map +1 -1
- package/out/workspaces.d.ts +1 -1
- package/out/workspaces.js +1 -1
- package/out/workspaces.js.map +1 -1
- package/package.json +46 -14
- package/tools/coarse-placer/build/dataset.ts +4 -2
- package/tools/coarse-placer/build/outlier/exposure.ts +5 -3
- package/tools/coarse-placer/build/outlier/latin.ts +3 -3
- package/tools/coarse-placer/build/outlier/oa.ts +3 -3
- package/tools/coarse-placer/eval/latin-offmap.ts +3 -3
- package/tools/coarse-placer/eval/openset.ts +3 -3
- package/tools/coarse-placer/eval/quant-compare.ts +4 -4
- package/tools/coarse-placer/eval.ts +3 -3
- package/tools/coarse-placer/paths.ts +1 -1
- package/tools/coarse-placer/probe-frontier.ts +2 -2
- package/tools/coarse-placer/quantize.ts +2 -2
- package/tools/coarse-placer/train.ts +5 -5
- package/tools/download/libpostal-resources.ts +2 -1
- package/tools/download/ssl-address.ts +2 -2
- 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
|
-
|
|
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
|
-
|
|
58
|
+
PlacetypePairSelection,
|
|
59
|
+
PlacerCountryUse,
|
|
42
60
|
POIIntent,
|
|
43
|
-
|
|
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 |
|
|
46
|
+
policy: PolicyRegistry | null,
|
|
47
47
|
locale: string | undefined
|
|
48
48
|
): ClassificationProposal[] {
|
|
49
49
|
if (!policy) return [...proposals]
|
package/lib/policy/registry.ts
CHANGED
|
@@ -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
|
|
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,
|
|
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
|
|
11
|
-
* Refusal and ambiguity are explicit
|
|
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
|
|
29
|
-
end
|
|
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
|
|
43
|
+
countryCode: string | null
|
|
44
44
|
/**
|
|
45
45
|
* The caller's locale hint (BCP 47), when declared.
|
|
46
46
|
*/
|
|
47
|
-
locale
|
|
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
|
|
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
|
|
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
|
|
84
|
-
latitude
|
|
85
|
-
longitude
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
140
|
+
retrievedAt: string | null
|
|
141
141
|
/**
|
|
142
142
|
* The provider's dataset version or epoch, when it states one.
|
|
143
143
|
*/
|
|
144
|
-
datasetVersion
|
|
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
|
|
39
|
+
hardResolveRate: number | null
|
|
40
40
|
/**
|
|
41
41
|
* Panel size behind `hardResolveRate`, when recorded.
|
|
42
42
|
*/
|
|
43
|
-
sampleSize
|
|
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
|
-
* `
|
|
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
|
|
40
|
-
postcode
|
|
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
|
|
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
|
|
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
|
|
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
|
-
* `
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
220
|
-
lon
|
|
221
|
-
radiusP95Km
|
|
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
|
|
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
|
|
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`
|
|
45
|
-
//
|
|
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
|
|
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
|
/**
|