Skip to content

feat(registry): discover third-party enricher/type packs via entry points#157

Open
thau0x01 wants to merge 2 commits into
reconurge:mainfrom
thau0x01:feat/enricher-type-plugin-discovery
Open

feat(registry): discover third-party enricher/type packs via entry points#157
thau0x01 wants to merge 2 commits into
reconurge:mainfrom
thau0x01:feat/enricher-type-plugin-discovery

Conversation

@thau0x01

@thau0x01 thau0x01 commented Jun 3, 2026

Copy link
Copy Markdown

What

Adds an opt-in entry-point discovery hook so external packages can ship Flowsint enrichers and types from their own top-level package, without vendoring them inside flowsint_enrichers/ or flowsint_types/.

load_all_enrichers() and load_all_types() now also iterate the flowsint.enrichers and flowsint.types entry-point groups and import the referenced module, firing the existing @flowsint_enricher / @flowsint_type decorators into the global registries.

Why

Today discovery is a filesystem walk of a single package directory, so the only way to add enrichers/types is to edit this repo. This hook lets people maintain private or domain-specific packs (e.g. country-specific OSINT sources) as separate, independently-versioned distributions that only need to be installed alongside Flowsint.

How a pack registers

[project.entry-points."flowsint.enrichers"]
my_pack = "my_pack.enrichers"

[project.entry-points."flowsint.types"]
my_pack = "my_pack.types"

The referenced module is imported once; its __init__ imports the submodules that define the decorated classes.

Notes

  • Additive and backwards-compatible: with no third-party packs installed, behavior is unchanged.
  • Plugin import failures are caught, logged to stderr, and skipped — matching the existing in-tree walk behavior.
  • Stays idempotent via the existing _enrichers_loaded / _types_loaded guards.

thau0x01 added 2 commits June 3, 2026 00:05
…ints

Add an entry-point discovery hook to load_all_enrichers() and load_all_types()
so external packages can ship Flowsint enrichers and types from their own
top-level package, without living inside flowsint_enrichers/ or flowsint_types/.

Packs register under the "flowsint.enrichers" and "flowsint.types" entry-point
groups; the loader imports the referenced module, firing the existing
@flowsint_enricher / @flowsint_type decorators into the global registries.
Failures are logged and skipped, matching the existing in-tree walk behavior.

This is additive and backwards-compatible: with no third-party packs installed,
behavior is unchanged.
Add docs/developers/external-packs.mdx explaining the flowsint.enrichers /
flowsint.types entry-point discovery added in this PR: when to use an external
pack, how discovery works, building a pack (entry points, types, enrichers,
subpackage wiring, side-effect-free top-level __init__), installing, verifying,
and troubleshooting. Includes a worked example of a Brazilian pack
(flowsint-enrichers-br) with CPF/CNPJ types and a CNPJ -> Organization lookup
via the public BrasilAPI. Cross-link it from the managing-enrichers and
managing-types guides.
@thau0x01 thau0x01 force-pushed the feat/enricher-type-plugin-discovery branch from eb91a2e to 17b3d82 Compare June 3, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant