@x12i/memorix-insights
v1.32.0
Published
Pluggable insight processors for Memorix — staged fact resolution and judgment generation
Readme
@x12i/memorix-insights
Pluggable insight processors for Memorix. The platform runs processors generically by processorId; implementations may be local functions or HTTP APIs.
Used in the pipeline enrichment stage via descriptor processing.insightStages. See memorix-pipeline for stage order and orchestration.
Concepts
- Stage: a processor with
inputKindandoutputKind(e.g.cidr→cidr-path-facts→insights). - Engine:
runInsightProcessorfor one stage,runInsightPipelinefor ordered stages. - Registry:
createInsightProcessorRegistry+builtinInsightProcessors; remote processors via Explorer/pipeline/registry/parts.
Built-in processors
| Processor id | Input → output | Purpose |
|--------------|----------------|---------|
| network.cidr-topology-path-resolver | cidr → cidr-path-facts | Structural topology facts from topology-raw |
| network.cidr-zone-path-insights | cidr-path-facts → insights | Zone flags and judgment insights |
Topology resolution emits structural facts only. Zone insight generation applies zone rules and emits judgments — keep stages separate in descriptor assignments.
CIDR example
import {
createInsightProcessorRegistry,
runInsightPipeline,
builtinInsightProcessors,
} from "@x12i/memorix-insights";
const registry = createInsightProcessorRegistry(builtinInsightProcessors);
const result = await runInsightPipeline(registry, {
input: "10.150.68.0/24",
stages: [
{
processorId: "network.cidr-topology-path-resolver",
sources: {
topologyDb: "memorix-knowledge",
topologyCollection: "topology-raw",
},
},
{
processorId: "network.cidr-zone-path-insights",
sources: { zonesCollection: "topology-zones-snapshots" },
},
],
});Pipeline integration
Descriptor example (simplified):
{
"processing": {
"insightStages": [
{
"processorId": "network.cidr-topology-path-resolver",
"inputPath": "data.subnetCidrs",
"sources": { "topologyCollection": "topology-raw" }
},
{
"processorId": "network.cidr-zone-path-insights",
"sources": { "zonesCollection": "topology-zones-snapshots" }
}
]
}
}runEnrichmentStage in @x12i/memorix-pipeline wires record context, passes insightRegistry, and writes processor outputs back onto the record.
Related
- Running enrichment — full orchestration guide
@x12i/memorix-pipeline— enrichment stage runner and parts catalog@x12i/memorix-resolvers— resolution-stage join normalization (separate from insights)
