PtcRunner.Context (PtcRunner v0.2.0)
View SourceManages variable bindings for program execution.
Stores context variables and provides lookup functionality.
Summary
Functions
Retrieves a variable from context.
Creates a new context with variables and tools.
Sets a variable in context.
Types
Functions
Retrieves a variable from context.
Returns nil if variable doesn't exist, per architecture.md specifications.
Arguments
- context: The context
- name: Variable name to retrieve
Returns
{:ok, value}if variable exists{:ok, nil}if variable doesn't exist
Creates a new context with variables and tools.
Arguments
- variables: Map of variable names to values
- tools: Map of tool names to functions (reserved for Phase 4)
Returns
- New Context struct
Sets a variable in context.
Arguments
- context: The context
- name: Variable name
- value: Value to set
Returns
- Updated context