Interface: Selector
Defined in: packages/core/src/domain/value-objects/selector.ts:11
Identifies one or more nodes in an artifact's AST.
Used in delta entries (to target nodes for modification or removal), in
metadataExtraction (to extract spec content), and in validation rules
(to assert structural constraints).
All string fields (matches, contains, where values) are matched
case-insensitively as regular expressions.
Properties
contains?
readonlyoptionalcontains?:string
Defined in: packages/core/src/domain/value-objects/selector.ts:17
Regex matched case-insensitively against the node's value.
index?
readonlyoptionalindex?:number
Defined in: packages/core/src/domain/value-objects/selector.ts:24
Targets the item at this zero-based index within an array-item or
sequence-item list. Mutually exclusive with where.
level?
readonlyoptionallevel?:number
Defined in: packages/core/src/domain/value-objects/selector.ts:35
For markdown section nodes, matches only sections at this heading level
(1 = #, 2 = ##, etc.). Non-markdown nodes without level will not match.
matches?
readonlyoptionalmatches?:string
Defined in: packages/core/src/domain/value-objects/selector.ts:15
Regex matched case-insensitively against the node's label.
parent?
readonlyoptionalparent?:Selector
Defined in: packages/core/src/domain/value-objects/selector.ts:19
Constrains the search to nodes whose nearest ancestor matches this selector.
type
readonlytype:string
Defined in: packages/core/src/domain/value-objects/selector.ts:13
Node type; must be one of the values returned by ArtifactParser.nodeTypes().
where?
readonlyoptionalwhere?:Readonly<Record<string,string>>
Defined in: packages/core/src/domain/value-objects/selector.ts:30
For array-item / sequence-item nodes that are objects, targets the
item whose fields match all key–value pairs (values are case-insensitive
regex). Mutually exclusive with index.