Crate runtara_dsl

Crate runtara_dsl 

Source
Expand description

DSL Type Definitions - Single Source of Truth

This crate defines the scenario DSL types used throughout the codebase:

  • Runtime deserialization of scenario JSON
  • Compiler type-safe access to scenario structure
  • Auto-generation of JSON Schema via schemars (in build.rs)

Changes to these types automatically update specs/dsl/v{VERSION}/schema.json on rebuild.

Modules§

agent_meta
Agent capability metadata types for runtime introspection
paths
spec
Specification Generation Module

Structs§

AgentStep
Executes an agent capability
CompositeValue
A composite value that builds structured objects or arrays from nested MappingValues.
ConditionOperation
An operation in a condition expression
ConditionalStep
Evaluates conditions and branches execution
ConnectionStep
Acquire a connection dynamically for use with secure agents.
ExecutionGraph
The execution graph containing all steps and control flow
ExecutionPlanEdge
An edge in the execution plan defining control flow
FileData
Base64-encoded file data structure. Used for file inputs/outputs in scenarios and operators.
FinishStep
Exit point step - defines scenario outputs
ImmediateValue
An immediate (literal) value.
LogStep
Emit custom log/debug events during workflow execution
Note
Visual annotation for scenario editor UI
Position
Position coordinates for UI elements
ReferenceValue
A reference to data at a specific path.
Scenario
Complete scenario definition
SchemaField
A field definition for input/output schemas.
SplitConfig
Configuration for a Split step. Defines the array to iterate over and execution options.
SplitStep
Iterates over an array, executing subgraph for each item
StartScenarioStep
Executes a nested child scenario
StepCommon
Common fields shared by all step types
StepTypeInfo
Metadata about a step type for documentation
SwitchCase
A single case in a Switch step. Defines a match condition and the output to produce if matched.
SwitchConfig
Configuration for a Switch step. Defines the value to switch on, the cases to match, and the default output.
SwitchStep
Multi-way branch based on value matching
Variable
A typed variable definition with its value.
WhileConfig
Configuration for a While step.
WhileStep
Conditional loop - repeat subgraph until condition is false

Enums§

ChildVersion
Child scenario version specification
CompositeInner
Inner value for CompositeValue - either an object or array of MappingValues.
ConditionArgument
An argument to a condition operation. Can be a nested expression or a mapping value (reference or immediate).
ConditionExpression
A condition expression for conditional branching. Can be either an operation (with operator and arguments) or a simple value check.
ConditionOperator
Condition expression operators
LogLevel
Log level for Log steps
MappingValue
A mapping value specifies how to obtain data for a field.
MemoryTier
Memory allocation tier for scenario execution
SchemaFieldType
Data types for schema fields. Used in input/output schema definitions.
Step
Union of all step types, discriminated by stepType field
SwitchMatchType
Match type for switch cases. Supports all ConditionOperator values plus compound match types.
ValueType
Type hints for reference values. Used to interpret data from unknown sources (e.g., HTTP responses).
VariableType
Data types for variables. Matches the operator field types for consistency.

Constants§

DSL_VERSION
DSL version - bump when making breaking changes

Functions§

get_step_types
Get metadata for all step types (collected via inventory from step_registration.rs)
parse_execution_graph
Parse an execution graph from JSON Value
parse_scenario
Parse a complete scenario from JSON Value

Type Aliases§

InputMapping
Maps data from various sources to step inputs. Keys are destination field names, values specify how to obtain the data.