Skip to main content

Crate veridikt_derive

Crate veridikt_derive 

Source
Expand description

The derived layer (spec §8): static extraction from host source. Input: the files in derivation scope (D-061) plus the declared state symbols; output: derived nodes and edges with confidence labels, plus the drop counters (G-7: dropped and counted, never guessed). v1 languages: Python and TypeScript (T6); Go, Java, Rust arrive at T8.

Structs§

DeriveConfig
DerivePack
One activated language pack (D-070): the validated PackSpec as data plus the tree-sitter grammar handle, passed in as a separate argument so veridikt_intent stays tree-sitter-free (D-070d). veridikt_cli builds these from its loader and the grammar registry.
DeriveResult
DerivedEdge
PackSpec
A language pack as validated data (§13). Carries no tree-sitter types.
SourceUnit
One file in derivation scope: path relative to the project root, content, and the module assigned by §7.5 (D-061 — the CLI computes scope).
StateSymbol
A declared State node’s host binding (§8.3 targets): the qname the touch edges point at, the host identifier the heuristics look for, and where it is defined.

Enums§

DerivedConfidence
§8.4 confidence, mirrored from the §13 contract for the same dependency reason as DerivedEdgeKind.
DerivedEdgeKind
Edge kinds the derived layer produces (§8.2, §8.3). A subset of the §6.1 set, defined here because the dependency direction forbids reaching into veridikt_graph (§13); the CLI maps these onto graph edges.

Functions§

custom_strategy_names
Names of the custom import strategies registered in this crate (D-071b). The named-impl escape hatch: a pack’s kind = "custom", name = "<id>" must name one of these, validated at pack load (E0414). Each requires its own D-entry; rust_use_paths (D-071c) is the first.
derive
The crate boundary (G-4): derivation scope in → derived nodes and edges with confidences out. Files with no supported language are skipped (the CLI filters by language already; this is belt and braces).