Interface: Extractor
Defined in: packages/core/src/domain/value-objects/extractor.ts:54
Declares how to extract structured content from an AST.
Generic, reusable value object — can be used by metadata extraction, compliance gates, impact analysis, or any feature that needs to pull structured data from artifact ASTs.
Selector handles node selection. Extractor adds post-processing:
what to extract from matched nodes, how to clean up the result, and
optionally how to map matched nodes into structured objects.
Properties
capture?
readonlyoptionalcapture?:string
Defined in: packages/core/src/domain/value-objects/extractor.ts:60
Regex with capture group applied to the extracted text.
extract?
readonlyoptionalextract?:"content"|"label"|"both"
Defined in: packages/core/src/domain/value-objects/extractor.ts:58
What to extract from each matched node. Defaults to 'content'.
fields?
readonlyoptionalfields?:Readonly<Record<string,FieldMapping>>
Defined in: packages/core/src/domain/value-objects/extractor.ts:71
Structured field mapping for complex objects. When present, each matched node produces one object with the declared fields.
groupBy?
readonlyoptionalgroupBy?:"label"
Defined in: packages/core/src/domain/value-objects/extractor.ts:64
Group matched nodes by their label (after strip).
selector
readonlyselector:Selector
Defined in: packages/core/src/domain/value-objects/extractor.ts:56
Selector identifying the AST node(s) to extract from.
strip?
readonlyoptionalstrip?:string
Defined in: packages/core/src/domain/value-objects/extractor.ts:62
Regex removed from labels/values before output.
transform?
readonlyoptionaltransform?:ExtractorTransformDeclaration
Defined in: packages/core/src/domain/value-objects/extractor.ts:66
Named post-processing callback (e.g. 'resolveSpecPath').