@x12i/memorix-resolvers
v1.33.0
Published
Pluggable resolver APIs for Memorix — normalize join keys, bridge lookups, and domain-specific relationship resolution
Readme
@x12i/memorix-resolvers
Pluggable resolver APIs for Memorix. Resolvers normalize join keys, bridge lookups, and domain-specific relationship signals without baking domain knowledge into the pipeline engine.
Used in:
- Pipeline
resolution/enrichmentstages — via descriptorprocessing.resolvers(seememorix-pipeline) - Associator requests — optional
resolvers/normalizationblocks before cross-record join rules
Design
- Resolver registry — register built-in and custom resolver types.
- Resolver steps — run one or more resolvers against a source record.
- Domain plug-ins — networking, pharma, marketing, identity, or any future domain implements the same
ResolverDefinitionAPI. - Remote resolvers — HTTP providers registered through Explorer
/pipeline/registry/partsand merged at pipeline run time.
The engine does not branch on resolver type. A CIDR containment resolver, pharma SKU resolver, and marketing campaign resolver are all ordinary plug-ins.
Usage
import {
createResolverRegistry,
builtinResolvers,
runResolverSteps,
type ResolverDefinition,
} from "@x12i/memorix-resolvers";
const registry = createResolverRegistry(builtinResolvers);
const myResolver: ResolverDefinition<{ outputPath: string }> = {
type: "my-domain",
create(config) {
return {
async resolve(input) {
return {
outputs: [{ path: config.outputPath, values: ["resolved"] }],
stats: { inputsScanned: 1, valuesParsed: 1, valuesRejected: 0, matchesFound: 1, ambiguousMatches: 0 },
diagnostics: [],
};
},
};
},
};
registry.register(myResolver);
const result = await runResolverSteps(registry, {
steps: [{ type: "my-domain", resolverKey: "step-1", config: { outputPath: "data.key" } }],
record: { data: {} },
});Built-in resolvers
| Type | Purpose | Typical pipeline stage |
|------|---------|------------------------|
| exact-match | Copy normalized values from source paths to an output path | resolution |
| multi-value | Split comma-separated scalars into array join fields | resolution |
| bridge-index | Map readable keys through a bridge collection to target join keys | resolution |
| markdown-key-value | Parse **Label:** value markdown strings into plain objects | resolution |
| markdown-pipe-records | Parse pipe-delimited **ID:** … \| **Name:** … lines into object arrays | resolution |
| path-existence-classifier | Classify path objects into attackPathExistence enum (supported|possible|limited|none|unknown) from pathContext / attackPathMeaning | resolution |
| identifier-key | Ensure concept.identifier.identifierKey (kind + values, :-joined) | resolution |
| vulnerability-concept | Fix vulnerability snapshot title + hostVulnerability identifier + vulnerabilityGroupIdentifierKey | resolution |
| subnet-cidr | Normalize CIDR or resolve asset IPs to canonical subnet CIDRs | resolution |
| subnet-key | Derive legacy subnetIp / subnetId from IP or CIDR network portion | resolution |
| topology-extractor | Build associatedTopology from associatedData or subnet IP lookup | resolution |
| zone-from-topology | Remediate UNKNOWN subnet data.zone from topology-raw graph | enrichment |
Assignments are declared per object type in entity descriptor processing.resolvers. The pipeline parts catalog (loadPipelinePartsCatalog) indexes which types use each resolver.
Related packages
- Running resolvers — operational guide
@x12i/memorix-pipeline— runs resolver steps during resolution/enrichment stages@x12i/memorix-associator— may run resolvers in association request rules before joins- Operational design note
