pub enum AstNode {
Show 29 variants
Export {
declaration: Box<SpannedAstNode>,
},
Entity {
name: String,
version: Option<String>,
annotations: HashMap<String, Value>,
domain: Option<String>,
body: Option<EntityBody>,
},
Resource {
name: String,
annotations: HashMap<String, Value>,
unit_name: Option<String>,
domain: Option<String>,
},
Flow {
resource_name: String,
annotations: HashMap<String, Value>,
from_entity: String,
to_entity: String,
quantity: Option<String>,
},
Pattern {
name: String,
regex: String,
},
Role {
name: String,
domain: Option<String>,
},
Relation {
name: String,
subject_role: String,
predicate: String,
object_role: String,
via_flow: Option<String>,
},
RoleBinding {
role: String,
entity: String,
},
Dimension {
name: String,
},
UnitDeclaration {
symbol: String,
dimension: String,
factor: String,
base_unit: String,
},
Policy {
name: String,
version: Option<String>,
metadata: PolicyMetadata,
expression: Expression,
},
Instance {
name: String,
entity_type: String,
fields: HashMap<String, Expression>,
},
ConceptChange {
name: String,
from_version: String,
to_version: String,
migration_policy: String,
breaking_change: bool,
},
Metric {
name: String,
expression: Expression,
metadata: MetricMetadata,
},
MappingDecl {
name: String,
target: TargetFormat,
rules: Vec<MappingRule>,
},
ProjectionDecl {
name: String,
target: TargetFormat,
overrides: Vec<ProjectionOverride>,
},
Cell {
name: String,
annotations: HashMap<String, Value>,
},
SystemDependency {
name: String,
version: Option<String>,
annotations: HashMap<String, Value>,
},
Runtime {
name: String,
version: String,
annotations: HashMap<String, Value>,
},
Tool {
name: String,
version: String,
annotations: HashMap<String, Value>,
},
DependencySet {
name: String,
annotations: HashMap<String, Value>,
},
Service {
name: String,
version: Option<String>,
annotations: HashMap<String, Value>,
},
Mount {
name: String,
annotations: HashMap<String, Value>,
},
Endpoint {
name: String,
annotations: HashMap<String, Value>,
},
NetworkFlow {
name: String,
from_ref: String,
to_ref: String,
annotations: HashMap<String, Value>,
},
Credential {
name: String,
annotations: HashMap<String, Value>,
},
Record {
declaration: RecordDecl,
},
Enum {
declaration: EnumDecl,
},
Operation {
declaration: OperationDecl,
},
}Expand description
AST Node types representing all SEA DSL declarations
Variants§
Export
Export wrapper for public declarations
Fields
declaration: Box<SpannedAstNode>Entity
Entity declaration
Fields
body: Option<EntityBody>Optional typed body entity "X" { ... }. Absent on legacy
bodyless entities so existing AST JSON stays byte-identical.
Resource
Resource declaration
Fields
Flow
Flow declaration - resource transfer between entities
Fields
Pattern
Pattern declaration - named regex for string validation
Role
Role declaration - participant category
Relation
Relation declaration - predicate connecting roles
Fields
RoleBinding
Role binding declaration - binds a previously-declared role to a previously-declared entity
Dimension
Dimension declaration for units
UnitDeclaration
Unit declaration - custom unit definition
Fields
Policy
Policy declaration - validation rule or constraint
Instance
Instance declaration - entity instance with field values
ConceptChange
ConceptChange declaration - version migration
Fields
Metric
Metric declaration - observable metric
MappingDecl
Mapping declaration - format mapping rules
ProjectionDecl
Projection declaration - output configuration
Cell
Cell declaration - isolated agent execution unit (cell-environment projection)
SystemDependency
SystemDependency declaration - OS package or native library
Runtime
Runtime declaration - language runtime or compiler toolchain
Tool
Tool declaration - package manager, task runner, or developer CLI
DependencySet
DependencySet declaration - application dependency closure
Service
Service declaration - background or attached service
Mount
Mount declaration - filesystem exposure
Endpoint
Endpoint declaration - declared network destination
NetworkFlow
NetworkFlow declaration - allowed communication relation
Credential
Credential declaration - scoped secret requirement
Record
Record declaration - structured DTO input/output
Fields
declaration: RecordDeclEnum
Enum declaration - closed set of named wires
Operation
Operation declaration - inbound command/query contract
Fields
declaration: OperationDecl