feat(registry): discover third-party enricher/type packs via entry points#157
Open
thau0x01 wants to merge 2 commits into
Open
feat(registry): discover third-party enricher/type packs via entry points#157thau0x01 wants to merge 2 commits into
thau0x01 wants to merge 2 commits into
Conversation
…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.
eb91a2e to
17b3d82
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/orflowsint_types/.load_all_enrichers()andload_all_types()now also iterate theflowsint.enrichersandflowsint.typesentry-point groups and import the referenced module, firing the existing@flowsint_enricher/@flowsint_typedecorators 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
The referenced module is imported once; its
__init__imports the submodules that define the decorated classes.Notes
_enrichers_loaded/_types_loadedguards.